- WordPress core y plugins - Tema Twenty Twenty-Four configurado - Plugin allow-unfiltered-html.php simplificado - .gitignore configurado para excluir wp-config.php y uploads 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 line
233 KiB
JavaScript
Executable File
1 line
233 KiB
JavaScript
Executable File
(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<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=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;r<e.length;r++)""!==(n=s(e[r]))&&(t+=(t&&" ")+n);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}function l(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var f="function"==typeof Symbol&&Symbol.observable||"@@observable",d=function(){return Math.random().toString(36).substring(7).split("").join(".")},p={INIT:"@@redux/INIT"+d(),REPLACE:"@@redux/REPLACE"+d(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+d()}};function h(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function v(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(l(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(l(1));return n(v)(e,t)}if("function"!=typeof e)throw new Error(l(2));var o=e,i=t,a=[],c=a,u=!1;function s(){c===a&&(c=a.slice())}function d(){if(u)throw new Error(l(3));return i}function g(e){if("function"!=typeof e)throw new Error(l(4));if(u)throw new Error(l(5));var t=!0;return s(),c.push(e),function(){if(t){if(u)throw new Error(l(6));t=!1,s();var n=c.indexOf(e);c.splice(n,1),a=null}}}function m(e){if(!h(e))throw new Error(l(7));if(void 0===e.type)throw new Error(l(8));if(u)throw new Error(l(9));try{u=!0,i=o(i,e)}finally{u=!1}for(var t=a=c,n=0;n<t.length;n++){(0,t[n])()}return e}function y(e){if("function"!=typeof e)throw new Error(l(10));o=e,m({type:p.REPLACE})}function b(){var e,t=g;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(l(11));function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[f]=function(){return this},e}return m({type:p.INIT}),(r={dispatch:m,subscribe:g,getState:d,replaceReducer:y})[f]=b,r}function g(e,t){return function(){return t(e.apply(this,arguments))}}function m(e,t){if("function"==typeof e)return g(e,t);if("object"!=typeof e||null===e)throw new Error(l(16));var n={};for(var r in e){var o=e[r];"function"==typeof o&&(n[r]=g(o,t))}return n}function y(e){if(e.__esModule)return e;var t=Object.defineProperty({},"__esModule",{value:!0});return Object.keys(e).forEach((function(n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})})),t}var b={exports:{}},w={exports:{}},_={},E="function"==typeof Symbol&&Symbol.for,x=E?Symbol.for("react.element"):60103,O=E?Symbol.for("react.portal"):60106,S=E?Symbol.for("react.fragment"):60107,j=E?Symbol.for("react.strict_mode"):60108,N=E?Symbol.for("react.profiler"):60114,M=E?Symbol.for("react.provider"):60109,C=E?Symbol.for("react.context"):60110,k=E?Symbol.for("react.async_mode"):60111,P=E?Symbol.for("react.concurrent_mode"):60111,D=E?Symbol.for("react.forward_ref"):60112,T=E?Symbol.for("react.suspense"):60113,I=E?Symbol.for("react.suspense_list"):60120,A=E?Symbol.for("react.memo"):60115,L=E?Symbol.for("react.lazy"):60116,R=E?Symbol.for("react.block"):60121,z=E?Symbol.for("react.fundamental"):60117,B=E?Symbol.for("react.responder"):60118,U=E?Symbol.for("react.scope"):60119;function Y(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case x:switch(e=e.type){case k:case P:case S:case N:case j:case T:return e;default:switch(e=e&&e.$$typeof){case C:case D:case L:case A:case M:return e;default:return t}}case O:return t}}}function X(e){return Y(e)===P}_.AsyncMode=k,_.ConcurrentMode=P,_.ContextConsumer=C,_.ContextProvider=M,_.Element=x,_.ForwardRef=D,_.Fragment=S,_.Lazy=L,_.Memo=A,_.Portal=O,_.Profiler=N,_.StrictMode=j,_.Suspense=T,_.isAsyncMode=function(e){return X(e)||Y(e)===k},_.isConcurrentMode=X,_.isContextConsumer=function(e){return Y(e)===C},_.isContextProvider=function(e){return Y(e)===M},_.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===x},_.isForwardRef=function(e){return Y(e)===D},_.isFragment=function(e){return Y(e)===S},_.isLazy=function(e){return Y(e)===L},_.isMemo=function(e){return Y(e)===A},_.isPortal=function(e){return Y(e)===O},_.isProfiler=function(e){return Y(e)===N},_.isStrictMode=function(e){return Y(e)===j},_.isSuspense=function(e){return Y(e)===T},_.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===S||e===P||e===N||e===j||e===T||e===I||"object"==typeof e&&null!==e&&(e.$$typeof===L||e.$$typeof===A||e.$$typeof===M||e.$$typeof===C||e.$$typeof===D||e.$$typeof===z||e.$$typeof===B||e.$$typeof===U||e.$$typeof===R)},_.typeOf=Y,w.exports=_;var H=Object.getOwnPropertySymbols,V=Object.prototype.hasOwnProperty,F=Object.prototype.propertyIsEnumerable;function G(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}})()&&Object.assign,Function.call.bind(Object.prototype.hasOwnProperty);function Z(e,t,n,r,o){}Z.resetWarningCache=function(){0};w.exports;function $(){}function W(){}W.resetWarningCache=$;b.exports=function(){function e(e,t,n,r,o,i){if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==i){var a=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw a.name="Invariant Violation",a}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:W,resetWarningCache:$};return n.PropTypes=n,n}();b.exports;var K=o.a.createContext(null);var q=function(e){e()},Q=function(){return q};var J={notify:function(){},get:function(){return[]}};function ee(e,t){var n,r=J;function o(){a.onStateChange&&a.onStateChange()}function i(){n||(n=t?t.addNestedSub(o):e.subscribe(o),r=function(){var e=Q(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var r=!0,o=n={callback:e,next:null,prev:n};return o.prev?o.prev.next=o:t=o,function(){r&&null!==t&&(r=!1,o.next?o.next.prev=o.prev:n=o.prev,o.prev?o.prev.next=o.next:t=o.next)}}}}())}var a={addNestedSub:function(e){return i(),r.subscribe(e)},notifyNestedSubs:function(){r.notify()},handleChangeWrapper:o,isSubscribed:function(){return Boolean(n)},trySubscribe:i,tryUnsubscribe:function(){n&&(n(),n=void 0,r.clear(),r=J)},getListeners:function(){return r}};return a}var te="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?r.useLayoutEffect:r.useEffect;function ne(e){var t=e.store,n=e.context,i=e.children,a=Object(r.useMemo)((function(){var e=ee(t);return e.onStateChange=e.notifyNestedSubs,{store:t,subscription:e}}),[t]),c=Object(r.useMemo)((function(){return t.getState()}),[t]);te((function(){var e=a.subscription;return e.trySubscribe(),c!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[a,c]);var u=n||K;return o.a.createElement(u.Provider,{value:a},i)}var re=w.exports,oe={};oe[re.ForwardRef]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},oe[re.Memo]={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0};var ie={},ae=60103,ce=60106,ue=60107,se=60108,le=60114,fe=60109,de=60110,pe=60112,he=60113,ve=60120,ge=60115,me=60116,ye=60121,be=60122,we=60117,_e=60129,Ee=60131;if("function"==typeof Symbol&&Symbol.for){var xe=Symbol.for;ae=xe("react.element"),ce=xe("react.portal"),ue=xe("react.fragment"),se=xe("react.strict_mode"),le=xe("react.profiler"),fe=xe("react.provider"),de=xe("react.context"),pe=xe("react.forward_ref"),he=xe("react.suspense"),ve=xe("react.suspense_list"),ge=xe("react.memo"),me=xe("react.lazy"),ye=xe("react.block"),be=xe("react.server.block"),we=xe("react.fundamental"),_e=xe("react.debug_trace_mode"),Ee=xe("react.legacy_hidden")}function Oe(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case ae:switch(e=e.type){case ue:case le:case se:case he:case ve:return e;default:switch(e=e&&e.$$typeof){case de:case pe:case me:case ge:case fe:return e;default:return t}}case ce:return t}}}var Se=fe,je=ae,Ne=pe,Me=ue,Ce=me,ke=ge,Pe=ce,De=le,Te=se,Ie=he;function Ae(){return Object(r.useContext)(K)}function Le(e){void 0===e&&(e=K);var t=e===K?Ae:function(){return Object(r.useContext)(e)};return function(){return t().store}}ie.ContextConsumer=de,ie.ContextProvider=Se,ie.Element=je,ie.ForwardRef=Ne,ie.Fragment=Me,ie.Lazy=Ce,ie.Memo=ke,ie.Portal=Pe,ie.Profiler=De,ie.StrictMode=Te,ie.Suspense=Ie,ie.isAsyncMode=function(){return!1},ie.isConcurrentMode=function(){return!1},ie.isContextConsumer=function(e){return Oe(e)===de},ie.isContextProvider=function(e){return Oe(e)===fe},ie.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===ae},ie.isForwardRef=function(e){return Oe(e)===pe},ie.isFragment=function(e){return Oe(e)===ue},ie.isLazy=function(e){return Oe(e)===me},ie.isMemo=function(e){return Oe(e)===ge},ie.isPortal=function(e){return Oe(e)===ce},ie.isProfiler=function(e){return Oe(e)===le},ie.isStrictMode=function(e){return Oe(e)===se},ie.isSuspense=function(e){return Oe(e)===he},ie.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===ue||e===le||e===_e||e===se||e===he||e===ve||e===Ee||"object"==typeof e&&null!==e&&(e.$$typeof===me||e.$$typeof===ge||e.$$typeof===fe||e.$$typeof===de||e.$$typeof===pe||e.$$typeof===we||e.$$typeof===ye||e[0]===be)},ie.typeOf=Oe;var Re=Le();function ze(e){void 0===e&&(e=K);var t=e===K?Re:Le(e);return function(){return t().dispatch}}var Be=ze(),Ue=function(e,t){return e===t};function Ye(e){void 0===e&&(e=K);var t=e===K?Ae:function(){return Object(r.useContext)(e)};return function(e,n){void 0===n&&(n=Ue);var o=t(),i=function(e,t,n,o){var i,a=Object(r.useReducer)((function(e){return e+1}),0)[1],c=Object(r.useMemo)((function(){return ee(n,o)}),[n,o]),u=Object(r.useRef)(),s=Object(r.useRef)(),l=Object(r.useRef)(),f=Object(r.useRef)(),d=n.getState();try{if(e!==s.current||d!==l.current||u.current){var p=e(d);i=void 0!==f.current&&t(p,f.current)?f.current:p}else i=f.current}catch(e){throw u.current&&(e.message+="\nThe error may be correlated with this previous error:\n"+u.current.stack+"\n\n"),e}return te((function(){s.current=e,l.current=d,f.current=i,u.current=void 0})),te((function(){function e(){try{var e=n.getState();if(e===l.current)return;var r=s.current(e);if(t(r,f.current))return;f.current=r,l.current=e}catch(e){u.current=e}a()}return c.onStateChange=e,c.trySubscribe(),e(),function(){return c.tryUnsubscribe()}}),[n,c]),i}(e,n,o.store,o.subscription);return Object(r.useDebugValue)(i),i}}var Xe,He=Ye();function Ve(e,t){return{type:e,payload:t}}Xe=i.unstable_batchedUpdates,q=Xe;var Fe=Object.freeze({__proto__:null,setOnConnect:function(e){return Ve("SET_ON_CONNECT",{onConnect:e})},setOnConnectStart:function(e){return Ve("SET_ON_CONNECT_START",{onConnectStart:e})},setOnConnectStop:function(e){return Ve("SET_ON_CONNECT_STOP",{onConnectStop:e})},setOnConnectEnd:function(e){return Ve("SET_ON_CONNECT_END",{onConnectEnd:e})},setElements:function(e){return Ve("SET_ELEMENTS",e)},updateNodeDimensions:function(e){return Ve("UPDATE_NODE_DIMENSIONS",e)},updateNodePos:function(e){return Ve("UPDATE_NODE_POS",e)},updateNodePosDiff:function(e){return Ve("UPDATE_NODE_POS_DIFF",e)},setUserSelection:function(e){return Ve("SET_USER_SELECTION",e)},updateUserSelection:function(e){return Ve("UPDATE_USER_SELECTION",e)},unsetUserSelection:function(){return Ve("UNSET_USER_SELECTION")},setSelection:function(e){return Ve("SET_SELECTION",{selectionActive:e})},unsetNodesSelection:function(){return Ve("UNSET_NODES_SELECTION",{nodesSelectionActive:!1})},resetSelectedElements:function(){return Ve("RESET_SELECTED_ELEMENTS",{selectedElements:null})},setSelectedElements:function(e){return Ve("SET_SELECTED_ELEMENTS",e)},addSelectedElements:function(e){return Ve("ADD_SELECTED_ELEMENTS",e)},updateTransform:function(e){return Ve("UPDATE_TRANSFORM",{transform:e})},updateSize:function(e){return Ve("UPDATE_SIZE",{width:e.width||500,height:e.height||500})},initD3Zoom:function(e){return Ve("INIT_D3ZOOM",e)},setMinZoom:function(e){return Ve("SET_MINZOOM",e)},setMaxZoom:function(e){return Ve("SET_MAXZOOM",e)},setTranslateExtent:function(e){return Ve("SET_TRANSLATEEXTENT",e)},setConnectionPosition:function(e){return Ve("SET_CONNECTION_POSITION",{connectionPosition:e})},setConnectionNodeId:function(e){return Ve("SET_CONNECTION_NODEID",e)},setSnapToGrid:function(e){return Ve("SET_SNAPTOGRID",{snapToGrid:e})},setSnapGrid:function(e){return Ve("SET_SNAPGRID",{snapGrid:e})},setInteractive:function(e){return Ve("SET_INTERACTIVE",{nodesDraggable:e,nodesConnectable:e,elementsSelectable:e})},setNodesDraggable:function(e){return Ve("SET_NODES_DRAGGABLE",{nodesDraggable:e})},setNodesConnectable:function(e){return Ve("SET_NODES_CONNECTABLE",{nodesConnectable:e})},setElementsSelectable:function(e){return Ve("SET_ELEMENTS_SELECTABLE",{elementsSelectable:e})},setMultiSelectionActive:function(e){return Ve("SET_MULTI_SELECTION_ACTIVE",{multiSelectionActive:e})},setConnectionMode:function(e){return Ve("SET_CONNECTION_MODE",{connectionMode:e})},setNodeExtent:function(e){return Ve("SET_NODE_EXTENT",e)}});function Ge(e){var t=Be(),n=e(Fe);return Object(r.useMemo)((function(){return m(n,t)}),[t,n])}var Ze=He,$e=function(){return Re()};function We(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Ke(e,t){if(e){if("string"==typeof e)return We(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?We(e,t):void 0}}function qe(e){return function(e){if(Array.isArray(e))return We(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||Ke(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Qe(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){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)||Ke(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.")}()}var Je=function(e){var t=null==e?void 0:e.target;return["INPUT","SELECT","TEXTAREA","BUTTON"].includes(null==t?void 0:t.nodeName)||(null==t?void 0:t.hasAttribute("contenteditable"))},et=function(e){return{width:e.offsetWidth,height:e.offsetHeight}},tt=function(e){var t=arguments.length>1&&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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ot(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ot(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=function(e){return"id"in e&&"source"in e&&"target"in e},ct=function(e){return"id"in e&&!("source"in e)&&!("target"in e)},ut=function(e,t,n,r){var o=e.x,i=e.y,a=Qe(t,3),c=a[0],u=a[1],s=a[2],l=Qe(r,2),f=l[0],d=l[1],p={x:(o-c)/s,y:(i-u)/s};return n?{x:f*Math.round(p.x/f),y:d*Math.round(p.y/d)}:p},st=function(e){return function(t){var n=e.getState(),r=n.transform,o=n.snapToGrid,i=n.snapGrid;return ut(t,r,o,i)}},lt=function(e,t){var n,r;return it(it({},e),{},{id:e.id.toString(),type:e.type||"default",__rf:{position:nt(e.position,t),width:(null===(n=e.style)||void 0===n?void 0:n.width)||null,height:(null===(r=e.style)||void 0===r?void 0:r.height)||null,handleBounds:{},isDragging:!1}})},ft=function(e){return it(it({},e),{},{source:e.source.toString(),target:e.target.toString(),sourceHandle:e.sourceHandle?e.sourceHandle.toString():null,targetHandle:e.targetHandle?e.targetHandle.toString():null,id:e.id.toString(),type:e.type||"default"})},dt=function(e,t){return{x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}},pt=function(e){var t=e.x,n=e.y;return{x:t,y:n,x2:t+e.width,y2:n+e.height}},ht=function(e){var t=e.x,n=e.y;return{x:t,y:n,width:e.x2-t,height:e.y2-n}},vt=function(e){var t=e.reduce((function(e,t){var n=t.__rf,r=(n=void 0===n?{}:n).position,o=n.width,i=n.height;return dt(e,pt(it(it({},r),{},{width:o,height:i})))}),{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ht(t)},gt=function(e,t){var n=arguments.length>2&&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<n;++t){if(!(e=arguments[t]+"")||e in r||/[\s.]/.test(e))throw new Error("illegal type: "+e);r[e]=[]}return new Ot(r)}function Ot(e){this._=e}function St(e,t){return e.trim().split(/^|\s+/).map((function(e){var n="",r=e.indexOf(".");if(r>=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;r<o;++r)if((n=e[r]).name===t)return n.value}function Nt(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Et,e=e.slice(0,r).concat(e.slice(r+1));break}return null!=n&&e.push({name:t,value:n}),e}Ot.prototype=xt.prototype={constructor:Ot,on:function(e,t){var n,r=this._,o=St(e+"",r),i=-1,a=o.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++i<a;)if(n=(e=o[i]).type)r[n]=Nt(r[n],e.name,t);else if(null==t)for(n in r)r[n]=Nt(r[n],e.name,null);return this}for(;++i<a;)if((n=(e=o[i]).type)&&(n=jt(r[n],e.name)))return n},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Ot(e)},call:function(e,t){if((n=arguments.length-2)>0)for(var n,r,o=new Array(n),i=0;i<n;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(i=0,n=(r=this._[e]).length;i<n;++i)r[i].value.apply(t,o)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],o=0,i=r.length;o<i;++o)r[o].value.apply(t,n)}};var Mt="http://www.w3.org/1999/xhtml",Ct={svg:"http://www.w3.org/2000/svg",xhtml:Mt,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function kt(e){var t=e+="",n=t.indexOf(":");return n>=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;c<s;++c)(a=t[c])?(a.__data__=i[c],r[c]=a):n[c]=new Gt(e,i[c]);for(;c<u;++c)(a=t[c])&&(o[c]=a)}function Wt(e,t,n,r,o,i,a){var c,u,s,l=new Map,f=t.length,d=i.length,p=new Array(f);for(c=0;c<f;++c)(u=t[c])&&(p[c]=s=a.call(u,u.__data__,c,t)+"",l.has(s)?o[c]=u:l.set(s,u));for(c=0;c<d;++c)s=a.call(e,i[c],c,i)+"",(u=l.get(s))?(r[c]=u,u.__data__=i[c],l.delete(s)):n[c]=new Gt(e,i[c]);for(c=0;c<f;++c)(u=t[c])&&l.get(p[c])===u&&(o[c]=u)}function Kt(e){return e.__data__}function qt(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}function Qt(e,t){return e<t?-1:e>t?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<o;)n.add(t[r])}function yn(e,t){for(var n=vn(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function bn(e){return function(){mn(this,e)}}function wn(e){return function(){yn(this,e)}}function _n(e,t){return function(){(t.apply(this,arguments)?mn:yn)(this,e)}}function En(){this.textContent=""}function xn(e){return function(){this.textContent=e}}function On(e){return function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}}function Sn(){this.innerHTML=""}function jn(e){return function(){this.innerHTML=e}}function Nn(e){return function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}}function Mn(){this.nextSibling&&this.parentNode.appendChild(this)}function Cn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function kn(){return null}function Pn(){var e=this.parentNode;e&&e.removeChild(this)}function Dn(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Tn(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function In(e){return e.trim().split(/^|\s+/).map((function(e){var t="",n=e.indexOf(".");return n>=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<i;++r)n=t[r],e.type&&n.type!==e.type||n.name!==e.name?t[++o]=n:this.removeEventListener(n.type,n.listener,n.options);++o?t.length=o:delete this.__on}}}function Ln(e,t,n){return function(){var r,o=this.__on,i=function(e){return function(t){e.call(this,t,this.__data__)}}(t);if(o)for(var a=0,c=o.length;a<c;++a)if((r=o[a]).type===e.type&&r.name===e.name)return this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=i,r.options=n),void(r.value=t);this.addEventListener(e.type,i,n),r={type:e.type,name:e.name,value:t,listener:i,options:n},o?o.push(r):this.__on=[r]}}function Rn(e,t,n){var r=an(e),o=r.CustomEvent;"function"==typeof o?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function zn(e,t){return function(){return Rn(this,e,t)}}function Bn(e,t){return function(){return Rn(this,e,t.apply(this,arguments))}}Gt.prototype={constructor:Gt,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}},gn.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=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<n;++o)for(var i,a,c=t[o],u=c.length,s=r[o]=new Array(u),l=0;l<u;++l)(i=c[l])&&(a=e.call(i,i.__data__,l,c))&&("__data__"in i&&(a.__data__=i.__data__),s[l]=a);return new Yn(r,this._parents)},selectAll:function(e){e="function"==typeof e?function(e){return function(){return Lt(e.apply(this,arguments))}}(e):zt(e);for(var t=this._groups,n=t.length,r=[],o=[],i=0;i<n;++i)for(var a,c=t[i],u=c.length,s=0;s<u;++s)(a=c[s])&&(r.push(e.call(a,a.__data__,s,c)),o.push(a));return new Yn(r,o)},selectChild:function(e){return this.select(null==e?Xt:function(e){return function(){return Yt.call(this.children,e)}}("function"==typeof e?e:Ut(e)))},selectChildren:function(e){return this.selectAll(null==e?Vt:function(e){return function(){return Ht.call(this.children,e)}}("function"==typeof e?e:Ut(e)))},filter:function(e){"function"!=typeof e&&(e=Bt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],c=a.length,u=r[o]=[],s=0;s<c;++s)(i=a[s])&&e.call(i,i.__data__,s,a)&&u.push(i);return new Yn(r,this._parents)},data:function(e,t){if(!arguments.length)return Array.from(this,Kt);var n=t?Wt:$t,r=this._parents,o=this._groups;"function"!=typeof e&&(e=Zt(e));for(var i=o.length,a=new Array(i),c=new Array(i),u=new Array(i),s=0;s<i;++s){var l=r[s],f=o[s],d=f.length,p=qt(e.call(l,l&&l.__data__,s,r)),h=p.length,v=c[s]=new Array(h),g=a[s]=new Array(h),m=u[s]=new Array(d);n(l,f,v,g,m,p,t);for(var y,b,w=0,_=0;w<h;++w)if(y=v[w]){for(w>=_&&(_=w+1);!(b=g[_])&&++_<h;);y._next=b||null}}return(a=new Yn(a,r))._enter=c,a._exit=u,a},enter:function(){return new Yn(this._enter||this._groups.map(Ft),this._parents)},exit:function(){return new Yn(this._exit||this._groups.map(Ft),this._parents)},join:function(e,t,n){var r=this.enter(),o=this,i=this.exit();return"function"==typeof e?(r=e(r))&&(r=r.selection()):r=r.append(e+""),null!=t&&(o=t(o))&&(o=o.selection()),null==n?i.remove():n(i),r&&o?r.merge(o).order():o},merge:function(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,i=r.length,a=Math.min(o,i),c=new Array(o),u=0;u<a;++u)for(var s,l=n[u],f=r[u],d=l.length,p=c[u]=new Array(d),h=0;h<d;++h)(s=l[h]||f[h])&&(p[h]=s);for(;u<o;++u)c[u]=n[u];return new Yn(c,this._parents)},selection:function(){return this},order:function(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r,o=e[t],i=o.length-1,a=o[i];--i>=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;i<r;++i){for(var a,c=n[i],u=c.length,s=o[i]=new Array(u),l=0;l<u;++l)(a=c[l])&&(s[l]=a);s.sort(t)}return new Yn(o,this._parents).order()},call:function(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,i=r.length;o<i;++o){var a=r[o];if(a)return a}return null},size:function(){let e=0;for(const t of this)++e;return e},empty:function(){return!this.node()},each:function(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o,i=t[n],a=0,c=i.length;a<c;++a)(o=i[a])&&e.call(o,o.__data__,a,i);return this},attr:function(e,t){var n=kt(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==t?n.local?en:Jt:"function"==typeof t?n.local?on:rn:n.local?nn:tn)(n,t))},style:function(e,t,n){return arguments.length>1?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<i;)if(!r.contains(n[o]))return!1;return!0}return this.each(("function"==typeof t?_n:t?bn:wn)(n,t))},text:function(e){return arguments.length?this.each(null==e?En:("function"==typeof e?On:xn)(e)):this.node().textContent},html:function(e){return arguments.length?this.each(null==e?Sn:("function"==typeof e?Nn:jn)(e)):this.node().innerHTML},raise:function(){return this.each(Mn)},lower:function(){return this.each(Cn)},append:function(e){var t="function"==typeof e?e:Tt(e);return this.select((function(){return this.appendChild(t.apply(this,arguments))}))},insert:function(e,t){var n="function"==typeof e?e:Tt(e),r=null==t?kn:"function"==typeof t?t:At(t);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(Pn)},clone:function(e){return this.select(e?Tn:Dn)},datum:function(e){return arguments.length?this.property("__data__",e):this.node().__data__},on:function(e,t,n){var r,o,i=In(e+""),a=i.length;if(!(arguments.length<2)){for(c=t?Ln:An,r=0;r<a;++r)this.each(c(i[r],t,n));return this}var c=this.node().__on;if(c)for(var u,s=0,l=c.length;s<l;++s)for(r=0,u=c[s];r<a;++r)if((o=i[r]).type===u.type&&o.name===u.name)return u.value},dispatch:function(e,t){return this.each(("function"==typeof t?Bn:zn)(e,t))},[Symbol.iterator]:function*(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r,o=e[t],i=0,a=o.length;i<a;++i)(r=o[i])&&(yield r)}};const Fn={capture:!0,passive:!1};function Gn(e){e.preventDefault(),e.stopImmediatePropagation()}function Zn(e){var t=e.document.documentElement,n=Hn(e).on("dragstart.drag",Gn,Fn);"onselectstart"in t?n.on("selectstart.drag",Gn,Fn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function $n(e,t){var n=e.document.documentElement,r=Hn(e).on("dragstart.drag",null);t&&(r.on("click.drag",Gn,Fn),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}function Wn(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Kn(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function qn(){}var Qn="\\s*([+-]?\\d+)\\s*",Jn="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",er="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",tr=/^#([0-9a-f]{3,8})$/,nr=new RegExp("^rgb\\("+[Qn,Qn,Qn]+"\\)$"),rr=new RegExp("^rgb\\("+[er,er,er]+"\\)$"),or=new RegExp("^rgba\\("+[Qn,Qn,Qn,Jn]+"\\)$"),ir=new RegExp("^rgba\\("+[er,er,er,Jn]+"\\)$"),ar=new RegExp("^hsl\\("+[Jn,er,er]+"\\)$"),cr=new RegExp("^hsla\\("+[Jn,er,er,Jn]+"\\)$"),ur={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};function sr(){return this.rgb().formatHex()}function lr(){return this.rgb().formatRgb()}function fr(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=tr.exec(e))?(n=t[1].length,t=parseInt(t[1],16),6===n?dr(t):3===n?new gr(t>>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*(n<r):n===i?(r-t)/c+2:(t-n)/c+4,c/=u<.5?i+o:2-i-o,a*=60):c=u>0&&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 i<t.length&&(o=t.slice(i),c[a]?c[a]+=o:c[++a]=o),c.length<2?u[0]?function(e){return function(t){return e(t)+""}}(u[0].x):function(e){return function(){return e}}(t):(t=u.length,function(e){for(var n,r=0;r<t;++r)c[(n=u[r]).i]=n.x(e);return c.join("")})}var Dr,Tr=180/Math.PI,Ir={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ar(e,t,n,r,o,i){var a,c,u;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,u/=c),e*r<t*n&&(e=-e,t=-t,u=-u,a=-a),{translateX:o,translateY:i,rotate:Math.atan2(t,e)*Tr,skewX:Math.atan(u)*Tr,scaleX:a,scaleY:c}}function Lr(e,t,n,r){function o(e){return e.length?e.pop()+" ":""}return function(i,a){var c=[],u=[];return i=e(i),a=e(a),function(e,r,o,i,a,c){if(e!==o||r!==i){var u=a.push("translate(",null,t,null,n);c.push({i:u-4,x:Mr(e,o)},{i:u-2,x:Mr(r,i)})}else(o||i)&&a.push("translate("+o+t+i+n)}(i.translateX,i.translateY,a.translateX,a.translateY,c,u),function(e,t,n,i){e!==t?(e-t>180?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<r;)c[(t=u[n]).i]=t.x(e);return c.join("")}}}var Rr=Lr((function(e){const t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Ir:Ar(t.a,t.b,t.c,t.d,t.e,t.f)}),"px, ","px)","deg)"),zr=Lr((function(e){return null==e?Ir:(Dr||(Dr=document.createElementNS("http://www.w3.org/2000/svg","g")),Dr.setAttribute("transform",e),(e=Dr.transform.baseVal.consolidate())?Ar((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):Ir)}),", ",")",")");function Br(e){return((e=Math.exp(e))+1/e)/2}var Ur,Yr,Xr=function e(t,n,r){function o(e,o){var i,a,c=e[0],u=e[1],s=e[2],l=o[0],f=o[1],d=o[2],p=l-c,h=f-u,v=p*p+h*h;if(v<1e-12)a=Math.log(d/s)/t,i=function(e){return[c+e*p,u+e*h,s*Math.exp(t*e*a)]};else{var g=Math.sqrt(v),m=(d*d-s*s+r*v)/(2*s*n*g),y=(d*d-s*s-r*v)/(2*d*n*g),b=Math.log(Math.sqrt(m*m+1)-m),w=Math.log(Math.sqrt(y*y+1)-y);a=(w-b)/t,i=function(e){var r=e*a,o=Br(b),i=s/(n*g)*(o*function(e){return((e=Math.exp(2*e))-1)/(e+1)}(t*r+b)-function(e){return((e=Math.exp(e))-1/e)/2}(b));return[c+i*p,u+i*h,s*o/Br(t*r+b)]}}return i.duration=1e3*a*t/Math.SQRT2,i}return o.rho=function(t){var n=Math.max(.001,+t),r=n*n;return e(n,r,r*r)},o}(Math.SQRT2,2,4),Hr=0,Vr=0,Fr=0,Gr=0,Zr=0,$r=0,Wr="object"==typeof performance&&performance.now?performance:Date,Kr="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function qr(){return Zr||(Kr(Qr),Zr=Wr.now()+$r)}function Qr(){Zr=0}function Jr(){this._call=this._time=this._next=null}function eo(e,t,n){var r=new Jr;return r.restart(e,t,n),r}function to(){Zr=(Gr=Wr.now())+$r,Hr=Vr=0;try{!function(){qr(),++Hr;for(var e,t=Ur;t;)(e=Zr-t._time)>=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]):+s<t&&(d.state=6,d.timer.stop(),d.on.call("cancel",e,e.__data__,d.index,d.group),delete o[s])}if(oo((function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(u))})),n.state=2,n.on.call("start",e,e.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(f=n.tween.length),s=0,l=-1;s<f;++s)(d=n.tween[s].value.call(e,e.__data__,n.index,n.group))&&(r[++l]=d);r.length=l+1}}function a(t){for(var o=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),i=-1,a=r.length;++i<a;)r[i].call(e,o);5===n.state&&(n.on.call("end",e,e.__data__,n.index,n.group),c())}function c(){for(var r in n.state=6,n.timer.stop(),delete o[t],o)return;delete e.__transition}o[t]=n,n.timer=eo((function(e){n.state=1,n.timer.restart(i,n.delay,n.time),n.delay<=e&&i(e-n.delay)}),0,n.time)}(e,n,{name:t,index:r,group:o,on:io,tween:ao,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:0})}function uo(e,t){var n=lo(e,t);if(n.state>0)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<c;++a)if(r[a].name===t){(r=r.slice()).splice(a,1);break}o.tween=r}}function ho(e,t,n){var r,o;if("function"!=typeof n)throw new Error;return function(){var i=so(this,e),a=i.tween;if(a!==r){o=(r=a).slice();for(var c={name:t,value:n},u=0,s=o.length;u<s;++u)if(o[u].name===t){o[u]=c;break}u===s&&o.push(c)}i.tween=o}}function vo(e,t,n){var r=e._id;return e.each((function(){var e=so(this,r);(e.value||(e.value={}))[t]=n.apply(this,arguments)})),function(e){return lo(e,r).value[t]}}function go(e,t){var n;return("number"==typeof t?Mr:t instanceof fr?Nr:(n=fr(t))?(t=n,Nr):Pr)(e,t)}function mo(e){return function(){this.removeAttribute(e)}}function yo(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bo(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttribute(e);return a===i?null:a===r?o:o=t(r=a,n)}}function wo(e,t,n){var r,o,i=n+"";return function(){var a=this.getAttributeNS(e.space,e.local);return a===i?null:a===r?o:o=t(r=a,n)}}function _o(e,t,n){var r,o,i;return function(){var a,c,u=n(this);if(null!=u)return(a=this.getAttribute(e))===(c=u+"")?null:a===r&&c===o?i:(o=c,i=t(r=a,u));this.removeAttribute(e)}}function Eo(e,t,n){var r,o,i;return function(){var a,c,u=n(this);if(null!=u)return(a=this.getAttributeNS(e.space,e.local))===(c=u+"")?null:a===r&&c===o?i:(o=c,i=t(r=a,u));this.removeAttributeNS(e.space,e.local)}}function xo(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Oo(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function So(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&Oo(e,o)),n}return o._value=t,o}function jo(e,t){var n,r;function o(){var o=t.apply(this,arguments);return o!==r&&(n=(r=o)&&xo(e,o)),n}return o._value=t,o}function No(e,t){return function(){uo(this,e).delay=+t.apply(this,arguments)}}function Mo(e,t){return t=+t,function(){uo(this,e).delay=t}}function Co(e,t){return function(){so(this,e).duration=+t.apply(this,arguments)}}function ko(e,t){return t=+t,function(){so(this,e).duration=t}}function Po(e,t){if("function"!=typeof t)throw new Error;return function(){so(this,e).ease=t}}function Do(e,t,n){var r,o,i=function(e){return(e+"").trim().split(/^|\s+/).every((function(e){var t=e.indexOf(".");return t>=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<o;++a)for(var c,u,s=r[a],l=s.length,f=i[a]=new Array(l),d=0;d<l;++d)(c=s[d])&&(u=e.call(c,c.__data__,d,s))&&("__data__"in c&&(u.__data__=c.__data__),f[d]=u,co(f[d],t,n,d,f,lo(c,n)));return new Uo(i,this._parents,t,n)},selectAll:function(e){var t=this._name,n=this._id;"function"!=typeof e&&(e=zt(e));for(var r=this._groups,o=r.length,i=[],a=[],c=0;c<o;++c)for(var u,s=r[c],l=s.length,f=0;f<l;++f)if(u=s[f]){for(var d,p=e.call(u,u.__data__,f,s),h=lo(u,n),v=0,g=p.length;v<g;++v)(d=p[v])&&co(d,t,n,v,p,h);i.push(p),a.push(u)}return new Uo(i,a,t,n)},selectChild:Xo.selectChild,selectChildren:Xo.selectChildren,filter:function(e){"function"!=typeof e&&(e=Bt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var i,a=t[o],c=a.length,u=r[o]=[],s=0;s<c;++s)(i=a[s])&&e.call(i,i.__data__,s,a)&&u.push(i);return new Uo(r,this._parents,this._name,this._id)},merge:function(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,i=Math.min(r,o),a=new Array(r),c=0;c<i;++c)for(var u,s=t[c],l=n[c],f=s.length,d=a[c]=new Array(f),p=0;p<f;++p)(u=s[p]||l[p])&&(d[p]=u);for(;c<r;++c)a[c]=t[c];return new Uo(a,this._parents,this._name,this._id)},selection:function(){return new To(this._groups,this._parents)},transition:function(){for(var e=this._name,t=this._id,n=Yo(),r=this._groups,o=r.length,i=0;i<o;++i)for(var a,c=r[i],u=c.length,s=0;s<u;++s)if(a=c[s]){var l=lo(a,t);co(a,e,n,s,c,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Uo(r,this._parents,e,n)},call:Xo.call,nodes:Xo.nodes,node:Xo.node,size:Xo.size,empty:Xo.empty,each:Xo.each,on:function(e,t){var n=this._id;return arguments.length<2?lo(this.node(),n).on.on(e):this.each(Do(n,e,t))},attr:function(e,t){var n=kt(e),r="transform"===n?zr:go;return this.attrTween(e,"function"==typeof t?(n.local?Eo:_o)(n,r,vo(this,"attr."+e,t)):null==t?(n.local?yo:mo)(n):(n.local?wo:bo)(n,r,t))},attrTween:function(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;var r=kt(e);return this.tween(n,(r.local?So:jo)(r,t))},style:function(e,t,n){var r="transform"==(e+="")?Rr:go;return null==t?this.styleTween(e,function(e,t){var n,r,o;return function(){var i=ln(this,e),a=(this.style.removeProperty(e),ln(this,e));return i===a?null:i===n&&a===r?o:o=t(n=i,r=a)}}(e,r)).on("end.style."+e,Io(e)):"function"==typeof t?this.styleTween(e,function(e,t,n){var r,o,i;return function(){var a=ln(this,e),c=n(this),u=c+"";return null==c&&(this.style.removeProperty(e),u=c=ln(this,e)),a===u?null:a===r&&u===o?i:(o=u,i=t(r=a,c))}}(e,r,vo(this,"style."+e,t))).each(function(e,t){var n,r,o,i,a="style."+t,c="end."+a;return function(){var u=so(this,e),s=u.on,l=null==u.value[a]?i||(i=Io(t)):void 0;s===n&&o===l||(r=(n=s).copy()).on(c,o=l),u.on=r}}(this._id,e)):this.styleTween(e,function(e,t,n){var r,o,i=n+"";return function(){var a=ln(this,e);return a===i?null:a===r?o:o=t(r=a,n)}}(e,r,t),n).on("end.style."+e,null)},styleTween:function(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==t)return this.tween(r,null);if("function"!=typeof t)throw new Error;return this.tween(r,Lo(e,t,null==n?"":n))},text:function(e){return this.tween("text","function"==typeof e?function(e){return function(){var t=e(this);this.textContent=null==t?"":t}}(vo(this,"text",e)):function(e){return function(){this.textContent=e}}(null==e?"":e+""))},textTween:function(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(null==e)return this.tween(t,null);if("function"!=typeof e)throw new Error;return this.tween(t,zo(e))},remove:function(){return this.on("end.remove",function(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}(this._id))},tween:function(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r,o=lo(this.node(),n).tween,i=0,a=o.length;i<a;++i)if((r=o[i]).name===e)return r.value;return null}return this.each((null==t?po:ho)(n,e,t))},delay:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?No:Mo)(t,e)):lo(this.node(),t).delay},duration:function(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Co:ko)(t,e)):lo(this.node(),t).duration},ease:function(e){var t=this._id;return arguments.length?this.each(Po(t,e)):lo(this.node(),t).ease},easeVarying:function(e){if("function"!=typeof e)throw new Error;return this.each(function(e,t){return function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw new Error;so(this,e).ease=n}}(this._id,e))},end:function(){var e,t,n=this,r=n._id,o=n.size();return new Promise((function(i,a){var c={value:a},u={value:function(){0==--o&&i()}};n.each((function(){var n=so(this,r),o=n.on;o!==e&&((t=(e=o).copy())._.cancel.push(c),t._.interrupt.push(c),t._.end.push(u)),n.on=t})),0===o&&i()}))},[Symbol.iterator]:Xo[Symbol.iterator]};var Ho={time:null,delay:0,duration:250,ease:function(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}};function Vo(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}Xn.prototype.interrupt=function(e){return this.each((function(){fo(this,e)}))},Xn.prototype.transition=function(e){var t,n;e instanceof Uo?(t=e._id,e=e._name):(t=Yo(),(n=Ho).time=qr(),e=null==e?null:e+"");for(var r=this._groups,o=r.length,i=0;i<o;++i)for(var a,c=r[i],u=c.length,s=0;s<u;++s)(a=c[s])&&co(a,e,t,s,c,n||Vo(a,t));return new Uo(r,this._parents,e,t)};var Fo=e=>()=>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;a<l;++a)u=[u=Vn(c=s[a],this),this.__zoom.invert(u),c.identifier],f.touch0?f.touch1||f.touch0[2]===u[2]||(f.touch1=u,f.taps=0):(f.touch0=u,i=!0,f.taps=1+!!e);e&&(e=clearTimeout(e)),i&&(f.taps<2&&(t=u[0],e=setTimeout((function(){e=null}),500)),fo(this),f.start())}}function j(e,...t){if(this.__zooming){var n,r,o,a,c=w(this,t).event(e),u=e.changedTouches,l=u.length;for(Ko(e),n=0;n<l;++n)o=Vn(r=u[n],this),c.touch0&&c.touch0[2]===r.identifier?c.touch0[0]=o:c.touch1&&c.touch1[2]===r.identifier&&(c.touch1[0]=o);if(r=c.that.__zoom,c.touch1){var f=c.touch0[0],d=c.touch0[1],p=c.touch1[0],h=c.touch1[1],v=(v=p[0]-f[0])*v+(v=p[1]-f[1])*v,y=(y=h[0]-d[0])*y+(y=h[1]-d[1])*y;r=g(r,Math.sqrt(v/y)),o=[(f[0]+p[0])/2,(f[1]+p[1])/2],a=[(d[0]+h[0])/2,(d[1]+h[1])/2]}else{if(!c.touch0)return;o=c.touch0[0],a=c.touch0[1]}c.zoom("touch",i(m(r,o,a),c.extent,s))}}function N(e,...r){if(this.__zooming){var o,i,a=w(this,r).event(e),c=e.changedTouches,u=c.length;for(Wo(e),n&&clearTimeout(n),n=setTimeout((function(){n=null}),500),o=0;o<u;++o)i=c[o],a.touch0&&a.touch0[2]===i.identifier?delete a.touch0:a.touch1&&a.touch1[2]===i.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(i=Vn(i,this),Math.hypot(t[0]-i[0],t[1]-i[1])<h)){var s=Hn(this).on("dblclick.zoom");s&&s.apply(this,arguments)}}}return v.transform=function(e,t,n,r){var o=e.selection?e.selection():e;o.property("__zoom",Jo),e!==o?b(e,t,n,r):o.interrupt().each((function(){w(this,arguments).event(r).start().zoom(null,"function"==typeof t?t.apply(this,arguments):t).end()}))},v.scaleBy=function(e,t,n,r){v.scaleTo(e,(function(){var e=this.__zoom.k,n="function"==typeof t?t.apply(this,arguments):t;return e*n}),n,r)},v.scaleTo=function(e,t,n,r){v.transform(e,(function(){var e=o.apply(this,arguments),r=this.__zoom,a=null==n?y(e):"function"==typeof n?n.apply(this,arguments):n,c=r.invert(a),u="function"==typeof t?t.apply(this,arguments):t;return i(m(g(r,u),a,c),e,s)}),n,r)},v.translateBy=function(e,t,n,r){v.transform(e,(function(){return i(this.__zoom.translate("function"==typeof t?t.apply(this,arguments):t,"function"==typeof n?n.apply(this,arguments):n),o.apply(this,arguments),s)}),null,r)},v.translateTo=function(e,t,n,r,a){v.transform(e,(function(){var e=o.apply(this,arguments),a=this.__zoom,c=null==r?y(e):"function"==typeof r?r.apply(this,arguments):r;return i($o.translate(c[0],c[1]).scale(a.k).translate("function"==typeof t?-t.apply(this,arguments):-t,"function"==typeof n?-n.apply(this,arguments):-n),e,s)}),r,a)},_.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,t){return this.mouse&&"mouse"!==e&&(this.mouse[1]=t.invert(this.mouse[0])),this.touch0&&"touch"!==e&&(this.touch0[1]=t.invert(this.touch0[0])),this.touch1&&"touch"!==e&&(this.touch1[1]=t.invert(this.touch1[0])),this.that.__zoom=t,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var t=Hn(this.that).datum();d.call(e,this.that,new Go(e,{sourceEvent:this.sourceEvent,target:v,type:e,transform:this.that.__zoom,dispatch:d}),t)}},v.wheelDelta=function(e){return arguments.length?(a="function"==typeof e?e:Fo(+e),v):a},v.filter=function(e){return arguments.length?(r="function"==typeof e?e:Fo(!!e),v):r},v.touchable=function(e){return arguments.length?(c="function"==typeof e?e:Fo(!!e),v):c},v.extent=function(e){return arguments.length?(o="function"==typeof e?e:Fo([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),v):o},v.scaleExtent=function(e){return arguments.length?(u[0]=+e[0],u[1]=+e[1],v):[u[0],u[1]]},v.translateExtent=function(e){return arguments.length?(s[0][0]=+e[0][0],s[1][0]=+e[1][0],s[0][1]=+e[0][1],s[1][1]=+e[1][1],v):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},v.constrain=function(e){return arguments.length?(i=e,v):i},v.duration=function(e){return arguments.length?(l=+e,v):l},v.interpolate=function(e){return arguments.length?(f=e,v):f},v.on=function(){var e=d.on.apply(d,arguments);return e===d?v:e},v.clickDistance=function(e){return arguments.length?(p=(e=+e)*e,v):Math.sqrt(p)},v.tapDistance=function(e){return arguments.length?(h=+e,v):h},v}().scaleExtent([e.minZoom,e.maxZoom]).translateExtent(t),r=Hn(P.current).call(n),o=tt(x[0],t[0][0],t[1][0]),i=tt(x[1],t[0][1],t[1][1]),a=tt(S,e.minZoom,e.maxZoom),c=$o.translate(o,i).scale(a);n.transform(r,c),R({d3Zoom:n,d3Selection:r,d3ZoomHandler:r.on("wheel.zoom"),transform:[o,i,a]})}}),[]),Object(r.useEffect)((function(){A&&I&&(f&&!B?A.on("wheel",(function(e){if(li(e))return!1;e.preventDefault(),e.stopImmediatePropagation();var t=A.property("__zoom").k||1;if(e.ctrlKey&&s){var n=Vn(e),r=-e.deltaY*(1===e.deltaMode?.05:e.deltaMode?1:.002)*10,o=t*Math.pow(2,r);I.scaleTo(A,o,n)}else{var i=1===e.deltaMode?20:1,a=v===ui.Vertical?0:e.deltaX*i,c=v===ui.Horizontal?0:e.deltaY*i;I.translateBy(A,-a/t*p,-c/t*p)}})).on("wheel.zoom",null):void 0!==L&&A.on("wheel",(function(e){if(!C||li(e))return null;e.preventDefault()})).on("wheel.zoom",L))}),[f,v,A,I,L,B,s,C]),Object(r.useEffect)((function(){I&&(y?I.on("zoom",null):I.on("zoom",(function(e){if(z([e.transform.x,e.transform.y,e.transform.k]),t){var n=si(e.transform);t(n)}})))}),[y,I,z,t]),Object(r.useEffect)((function(){I&&(n?I.on("start",(function(e){var t=si(e.transform);D.current=t,n(t)})):I.on("start",null))}),[I,n]),Object(r.useEffect)((function(){I&&(i?I.on("end",(function(e){if(function(e,t){return e.x!==t.x||e.y!==t.y||e.zoom!==t.k}(D.current,e.transform)){var t=si(e.transform);D.current=t,i(t)}})):I.on("end",null))}),[I,i]),Object(r.useEffect)((function(){I&&I.filter((function(e){var t=B||c,n=s&&e.ctrlKey;return!!(_||t||f||m||s)&&(!y&&(!(!m&&"dblclick"===e.type)&&((!li(e)||"wheel"!==e.type)&&((!e.target.closest(".react-flow__node")&&!e.target.closest(".react-flow__edge")||"wheel"===e.type)&&((!e.target.closest(".react-flow__nodesselection")||"wheel"===e.type)&&(!(!s&&e.ctrlKey&&"wheel"===e.type)&&(!!(t||f||n||"wheel"!==e.type)&&(!!(_||"mousedown"!==e.type&&"touchstart"!==e.type)&&!(e.ctrlKey&&"wheel"!==e.type||e.button)))))))))}))}),[I,c,s,f,m,_,y,b,B]),o.a.createElement("div",{className:"react-flow__renderer react-flow__zoompane",ref:P},k)};function di(e){var t=e.target.closest(".react-flow");if(t){var n=t.getBoundingClientRect();return{x:e.clientX-n.left,y:e.clientY-n.top}}}var pi=function(){var e=Ze((function(e){return e.userSelectionRect}));return e.draw?o.a.createElement("div",{className:"react-flow__selection",style:{width:e.width,height:e.height,transform:"translate(".concat(e.x,"px, ").concat(e.y,"px)")}}):null},hi=Object(r.memo)((function(e){var t=e.selectionKeyPressed,n=Ze((function(e){return e.selectionActive})),r=Ze((function(e){return e.elementsSelectable})),i=Ge((function(e){return e.setUserSelection})),a=Ge((function(e){return e.updateUserSelection})),c=Ge((function(e){return e.unsetUserSelection})),u=Ge((function(e){return e.unsetNodesSelection}));if(!r||!(n||t))return null;return o.a.createElement("div",{className:"react-flow__selectionpane",onMouseDown:function(e){var t=di(e);t&&i(t)},onMouseMove:function(e){if(t&&n){var r=di(e);r&&a(r)}},onMouseUp:function(){return c()},onMouseLeave:function(){c(),u()}},o.a.createElement(pi,null))})),vi={exports:{}},gi={};function mi(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=mi(e[t]))&&(r&&(r+=" "),r+=n);else for(t in e)e[t]&&(r&&(r+=" "),r+=t);return r}var yi=y(Object.freeze({__proto__:null,default:function(){for(var e,t,n=0,r="";n<arguments.length;)(e=arguments[n++])&&(t=mi(e))&&(r&&(r+=" "),r+=t);return r}})),bi={},wi={};Object.defineProperty(wi,"__esModule",{value:!0}),wi.findInArray=function(e,t){for(var n=0,r=e.length;n<r;n++)if(t.apply(t,[e[n],n,e]))return e[n]},wi.isFunction=function(e){return"function"==typeof e||"[object Function]"===Object.prototype.toString.call(e)},wi.isNum=function(e){return"number"==typeof e&&!isNaN(e)},wi.int=function(e){return parseInt(e,10)},wi.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))};var _i={};Object.defineProperty(_i,"__esModule",{value:!0}),_i.getPrefix=xi,_i.browserPrefixToKey=Oi,_i.browserPrefixToStyle=function(e,t){return t?"-".concat(t.toLowerCase(),"-").concat(e):e},_i.default=void 0;var Ei=["Moz","Webkit","O","ms"];function xi(){var e,t,n=arguments.length>0&&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<Ei.length;o++)if(Oi(n,Ei[o])in r)return Ei[o];return""}function Oi(e,t){return t?"".concat(t).concat(function(e){for(var t="",n=!0,r=0;r<e.length;r++)n?(t+=e[r].toUpperCase(),n=!1):"-"===e[r]?n=!0:t+=e[r];return t}(e)):e}var Si=xi();function ji(e){return(ji="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)}_i.default=Si,Object.defineProperty(bi,"__esModule",{value:!0}),bi.matchesSelector=Ii,bi.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(Ii(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},bi.addEvent=function(e,t,n,r){if(!e)return;var o=Pi({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},bi.removeEvent=function(e,t,n,r){if(!e)return;var o=Pi({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},bi.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ni.int)(n.borderTopWidth),t+=(0,Ni.int)(n.borderBottomWidth)},bi.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,Ni.int)(n.borderLeftWidth),t+=(0,Ni.int)(n.borderRightWidth)},bi.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ni.int)(n.paddingTop),t-=(0,Ni.int)(n.paddingBottom)},bi.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,Ni.int)(n.paddingLeft),t-=(0,Ni.int)(n.paddingRight)},bi.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,i=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:i}},bi.createCSSTransform=function(e,t){var n=Ai(e,t,"px");return Di({},(0,Mi.browserPrefixToKey)("transform",Mi.default),n)},bi.createSVGTransform=function(e,t){return Ai(e,t,"")},bi.getTranslation=Ai,bi.getTouch=function(e,t){return e.targetTouches&&(0,Ni.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,Ni.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},bi.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},bi.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&Li(e.body,"react-draggable-transparent-selection")},bi.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&Ri(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(e){}},bi.addClassName=Li,bi.removeClassName=Ri;var Ni=wi,Mi=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==ji(e)&&"function"!=typeof e)return{default:e};var n=Ci(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}(_i);function Ci(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(Ci=function(e){return e?n:t})(e)}function ki(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 Pi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ki(Object(n),!0).forEach((function(t){Di(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ki(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Di(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var Ti="";function Ii(e,t){return Ti||(Ti=(0,Ni.findInArray)(["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"],(function(t){return(0,Ni.isFunction)(e[t])}))),!!(0,Ni.isFunction)(e[Ti])&&e[Ti](t)}function Ai(e,t,n){var r=e.x,o=e.y,i="translate(".concat(r).concat(n,",").concat(o).concat(n,")");if(t){var a="".concat("string"==typeof t.x?t.x:t.x+n),c="".concat("string"==typeof t.y?t.y:t.y+n);i="translate(".concat(a,", ").concat(c,")")+i}return i}function Li(e,t){e.classList?e.classList.add(t):e.className.match(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)")))||(e.className+=" ".concat(t))}function Ri(e,t){e.classList?e.classList.remove(t):e.className=e.className.replace(new RegExp("(?:^|\\s)".concat(t,"(?!\\S)"),"g"),"")}var zi={};Object.defineProperty(zi,"__esModule",{value:!0}),zi.getBoundPosition=function(e,t,n){if(!e.props.bounds)return[t,n];var r=e.props.bounds;r="string"==typeof r?r:function(e){return{left:e.left,top:e.top,right:e.right,bottom:e.bottom}}(r);var o=Yi(e);if("string"==typeof r){var i,a=o.ownerDocument,c=a.defaultView;if(!((i="parent"===r?o.parentNode:a.querySelector(r))instanceof c.HTMLElement))throw new Error('Bounds selector "'+r+'" could not find an element.');var u=i,s=c.getComputedStyle(o),l=c.getComputedStyle(u);r={left:-o.offsetLeft+(0,Bi.int)(l.paddingLeft)+(0,Bi.int)(s.marginLeft),top:-o.offsetTop+(0,Bi.int)(l.paddingTop)+(0,Bi.int)(s.marginTop),right:(0,Ui.innerWidth)(u)-(0,Ui.outerWidth)(o)-o.offsetLeft+(0,Bi.int)(l.paddingRight)-(0,Bi.int)(s.marginRight),bottom:(0,Ui.innerHeight)(u)-(0,Ui.outerHeight)(o)-o.offsetTop+(0,Bi.int)(l.paddingBottom)-(0,Bi.int)(s.marginBottom)}}(0,Bi.isNum)(r.right)&&(t=Math.min(t,r.right));(0,Bi.isNum)(r.bottom)&&(n=Math.min(n,r.bottom));(0,Bi.isNum)(r.left)&&(t=Math.max(t,r.left));(0,Bi.isNum)(r.top)&&(n=Math.max(n,r.top));return[t,n]},zi.snapToGrid=function(e,t,n){var r=Math.round(t/e[0])*e[0],o=Math.round(n/e[1])*e[1];return[r,o]},zi.canDragX=function(e){return"both"===e.props.axis||"x"===e.props.axis},zi.canDragY=function(e){return"both"===e.props.axis||"y"===e.props.axis},zi.getControlPosition=function(e,t,n){var r="number"==typeof t?(0,Ui.getTouch)(e,t):null;if("number"==typeof t&&!r)return null;var o=Yi(n),i=n.props.offsetParent||o.offsetParent||o.ownerDocument.body;return(0,Ui.offsetXYFromParent)(r||e,i,n.props.scale)},zi.createCoreData=function(e,t,n){var r=e.state,o=!(0,Bi.isNum)(r.lastX),i=Yi(e);return o?{node:i,deltaX:0,deltaY:0,lastX:t,lastY:n,x:t,y:n}:{node:i,deltaX:t-r.lastX,deltaY:n-r.lastY,lastX:r.lastX,lastY:r.lastY,x:t,y:n}},zi.createDraggableData=function(e,t){var n=e.props.scale;return{node:t.node,x:e.state.x+t.deltaX/n,y:e.state.y+t.deltaY/n,deltaX:t.deltaX/n,deltaY:t.deltaY/n,lastX:e.state.x,lastY:e.state.y}};var Bi=wi,Ui=bi;function Yi(e){var t=e.findDOMNode();if(!t)throw new Error("<DraggableCore>: 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<t;n++)r[n]=e[n];return r}function na(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ra(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function oa(e,t){return(oa=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function ia(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=ua(e);if(t){var o=ua(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return aa(this,n)}}function aa(e,t){if(t&&("object"===Vi(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return ca(e)}function ca(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function ua(e){return(ua=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function sa(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var la={start:"touchstart",move:"touchmove",stop:"touchend"},fa={start:"mousedown",move:"mousemove",stop:"mouseup"},da=fa,pa=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&oa(e,t)}(i,e);var t,n,r,o=ia(i);function i(){var e;na(this,i);for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return sa(ca(e=o.call.apply(o,[this].concat(n))),"state",{dragging:!1,lastX:NaN,lastY:NaN,touchIdentifier:null}),sa(ca(e),"mounted",!1),sa(ca(e),"handleDragStart",(function(t){if(e.props.onMouseDown(t),!e.props.allowAnyClick&&"number"==typeof t.button&&0!==t.button)return!1;var n=e.findDOMNode();if(!n||!n.ownerDocument||!n.ownerDocument.body)throw new Error("<DraggableCore> 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<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function m(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<i.length;r++)n=i[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(r=0;r<i.length;r++)n=i[r],t.indexOf(n)>=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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){C(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(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 E(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 E(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 E(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function x(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function O(e,t){return(O=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=M(e);if(t){var o=M(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return j(this,n)}}function j(e,n){if(n&&("object"===t(n)||"function"==typeof n))return n;if(void 0!==n)throw new TypeError("Derived constructors may only return object or undefined");return N(e)}function N(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function M(e){return(M=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}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}var k=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&O(e,t)}(l,e);var t,r,o,a=S(l);function l(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),C(N(t=a.call(this,e)),"onDragStart",(function(e,n){if((0,d.default)("Draggable: onDragStart: %j",n),!1===t.props.onStart(e,(0,s.createDraggableData)(N(t),n)))return!1;t.setState({dragging:!0,dragged:!0})})),C(N(t),"onDrag",(function(e,n){if(!t.state.dragging)return!1;(0,d.default)("Draggable: onDrag: %j",n);var r=(0,s.createDraggableData)(N(t),n),o={x:r.x,y:r.y};if(t.props.bounds){var i=o.x,a=o.y;o.x+=t.state.slackX,o.y+=t.state.slackY;var c=_((0,s.getBoundPosition)(N(t),o.x,o.y),2),u=c[0],l=c[1];o.x=u,o.y=l,o.slackX=t.state.slackX+(i-o.x),o.slackY=t.state.slackY+(a-o.y),r.x=o.x,r.y=o.y,r.deltaX=o.x-t.state.x,r.deltaY=o.y-t.state.y}if(!1===t.props.onDrag(e,r))return!1;t.setState(o)})),C(N(t),"onDragStop",(function(e,n){if(!t.state.dragging)return!1;if(!1===t.props.onStop(e,(0,s.createDraggableData)(N(t),n)))return!1;(0,d.default)("Draggable: onDragStop: %j",n);var r={dragging:!1,slackX:0,slackY:0};if(Boolean(t.props.position)){var o=t.props.position,i=o.x,a=o.y;r.x=i,r.y=a}t.setState(r)})),t.state={dragging:!1,dragged:!1,x:e.position?e.position.x:e.defaultPosition.x,y:e.position?e.position.y:e.defaultPosition.y,prevPropsPosition:w({},e.position),slackX:0,slackY:0,isElementSVG:!1},!e.position||e.onDrag||e.onStop||console.warn("A `position` was applied to this <Draggable>, 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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ya(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ya(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var wa=function(e){var t=e.onSelectionDragStart,n=e.onSelectionDrag,i=e.onSelectionDragStop,a=e.onSelectionContextMenu,c=Qe(Ze((function(e){return e.transform})),3),u=c[0],s=c[1],l=c[2],f=Ze((function(e){return e.selectedNodesBbox})),d=Ze((function(e){return e.selectionActive})),p=Ze((function(e){return e.selectedElements})),h=Ze((function(e){return e.snapToGrid})),v=Ze((function(e){return e.snapGrid})),g=Ze((function(e){return e.nodes})),m=Ge((function(e){return e.updateNodePosDiff})),y=Object(r.useRef)(null),b=Object(r.useMemo)((function(){return h?v:[1,1]}),[h,v]),w=Object(r.useMemo)((function(){return p?p.filter(ct).map((function(e){var t=g.find((function(t){return t.id===e.id}));return ba(ba({},t),{},{position:null==t?void 0:t.__rf.position})})):[]}),[p,g]),_=Object(r.useMemo)((function(){return{transform:"translate(".concat(u,"px,").concat(s,"px) scale(").concat(l,")")}}),[u,s,l]),E=Object(r.useMemo)((function(){return{width:f.width,height:f.height,top:f.y,left:f.x}}),[f]),x=Object(r.useCallback)((function(e){null==t||t(e,w)}),[t,w]),O=Object(r.useCallback)((function(e,t){n&&n(e,w),m({diff:{x:t.deltaX,y:t.deltaY},isDragging:!0})}),[n,w,m]),S=Object(r.useCallback)((function(e){m({isDragging:!1}),null==i||i(e,w)}),[w,i]),j=Object(r.useCallback)((function(e){var t=p?p.filter(ct).map((function(e){return g.find((function(t){return t.id===e.id}))})):[];null==a||a(e,t)}),[a]);return!p||d?null:o.a.createElement("div",{className:"react-flow__nodesselection",style:_},o.a.createElement(ma,{scale:l,grid:b,onStart:function(e){return x(e)},onDrag:function(e,t){return O(e,t)},onStop:function(e){return S(e)},nodeRef:y,enableUserSelectHack:!1},o.a.createElement("div",{ref:y,className:"react-flow__nodesselection-rect",onContextMenu:j,style:E})))},_a=function(e){var t=e.children,n=e.onPaneClick,i=e.onPaneContextMenu,a=e.onPaneScroll,c=e.onElementsRemove,u=e.deleteKeyCode,s=e.onMove,l=e.onMoveStart,f=e.onMoveEnd,d=e.selectionKeyCode,p=e.multiSelectionKeyCode,h=e.zoomActivationKeyCode,v=e.elementsSelectable,g=e.zoomOnScroll,m=e.zoomOnPinch,y=e.panOnScroll,b=e.panOnScrollSpeed,w=e.panOnScrollMode,_=e.zoomOnDoubleClick,E=e.paneMoveable,x=e.defaultPosition,O=e.defaultZoom,S=e.translateExtent,j=e.preventScrolling,N=e.onSelectionDragStart,M=e.onSelectionDrag,C=e.onSelectionDragStop,k=e.onSelectionContextMenu,P=Ge((function(e){return e.unsetNodesSelection})),D=Ge((function(e){return e.resetSelectedElements})),T=Ze((function(e){return e.nodesSelectionActive})),I=rt(d);!function(e){var t=e.deleteKeyCode,n=e.multiSelectionKeyCode,o=e.onElementsRemove,i=$e(),a=Ge((function(e){return e.unsetNodesSelection})),c=Ge((function(e){return e.setMultiSelectionActive})),u=Ge((function(e){return e.resetSelectedElements})),s=rt(t),l=rt(n);Object(r.useEffect)((function(){var e=i.getState(),t=e.edges,n=e.selectedElements;if(o&&s&&n){var r=n.filter(ct),c=mt(r,t),l=[].concat(qe(n),qe(c)).reduce((function(e,t){return e.set(t.id,t)}),new Map);o(Array.from(l.values())),a(),u()}}),[s]),Object(r.useEffect)((function(){c(l)}),[l])}({onElementsRemove:c,deleteKeyCode:u,multiSelectionKeyCode:p});var A=Object(r.useCallback)((function(e){null==n||n(e),P(),D()}),[n]),L=Object(r.useCallback)((function(e){null==i||i(e)}),[i]),R=Object(r.useCallback)((function(e){null==a||a(e)}),[a]);return o.a.createElement(fi,{onMove:s,onMoveStart:l,onMoveEnd:f,selectionKeyPressed:I,elementsSelectable:v,zoomOnScroll:g,zoomOnPinch:m,panOnScroll:y,panOnScrollSpeed:b,panOnScrollMode:w,zoomOnDoubleClick:_,paneMoveable:E,defaultPosition:x,defaultZoom:O,translateExtent:S,zoomActivationKeyCode:h,preventScrolling:j},t,o.a.createElement(hi,{selectionKeyPressed:I}),T&&o.a.createElement(wa,{onSelectionDragStart:N,onSelectionDrag:M,onSelectionDragStop:C,onSelectionContextMenu:k}),o.a.createElement("div",{className:"react-flow__pane",onClick:A,onContextMenu:L,onWheel:R}))};_a.displayName="FlowRenderer";var Ea=Object(r.memo)(_a),xa=function(e){var t=Ze((function(e){return e.transform})),n=Ze((function(e){return e.selectedElements})),i=Ze((function(e){return e.nodesDraggable})),a=Ze((function(e){return e.nodesConnectable})),c=Ze((function(e){return e.elementsSelectable})),u=Ze((function(e){return e.width})),s=Ze((function(e){return e.height})),l=Ze((function(e){return e.nodes})),f=Ge((function(e){return e.updateNodeDimensions})),d=e.onlyRenderVisibleElements?gt(l,{x:0,y:0,width:u,height:s},t,!0):l,p=Object(r.useMemo)((function(){return{transform:"translate(".concat(t[0],"px,").concat(t[1],"px) scale(").concat(t[2],")")}}),[t[0],t[1],t[2]]),h=Object(r.useMemo)((function(){return"undefined"==typeof ResizeObserver?null:new ResizeObserver((function(e){var t=e.map((function(e){return{id:e.target.getAttribute("data-id"),nodeElement:e.target}}));f(t)}))}),[]);return o.a.createElement("div",{className:"react-flow__nodes",style:p},d.map((function(r){var u=r.type||"default",s=e.nodeTypes[u]||e.nodeTypes.default;e.nodeTypes[u]||console.warn('Node type "'.concat(u,'" not found. Using fallback type "default".'));var l=!!(r.draggable||i&&void 0===r.draggable),f=!!(r.selectable||c&&void 0===r.selectable),d=!!(r.connectable||a&&void 0===r.connectable);return o.a.createElement(s,{key:r.id,id:r.id,className:r.className,style:r.style,type:u,data:r.data,sourcePosition:r.sourcePosition,targetPosition:r.targetPosition,isHidden:r.isHidden,xPos:r.__rf.position.x,yPos:r.__rf.position.y,isDragging:r.__rf.isDragging,isInitialized:null!==r.__rf.width&&null!==r.__rf.height,snapGrid:e.snapGrid,snapToGrid:e.snapToGrid,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onElementClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onNodeDoubleClick:e.onNodeDoubleClick,onNodeDragStart:e.onNodeDragStart,onNodeDrag:e.onNodeDrag,onNodeDragStop:e.onNodeDragStop,scale:t[2],selected:(null==n?void 0:n.some((function(e){return e.id===r.id})))||!1,isDraggable:l,isSelectable:f,isConnectable:d,resizeObserver:h,dragHandle:r.dragHandle})})))};xa.displayName="NodeRenderer";var Oa=Object(r.memo)(xa),Sa=["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"];function ja(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 Na=function(e){var t=e.x,n=e.y,i=e.label,a=e.labelStyle,l=void 0===a?{}:a,f=e.labelShowBg,d=void 0===f||f,p=e.labelBgStyle,h=void 0===p?{}:p,v=e.labelBgPadding,g=void 0===v?[2,4]:v,m=e.labelBgBorderRadius,y=void 0===m?2:m,b=e.children,w=e.className,_=u(e,Sa),E=Object(r.useRef)(null),x=Qe(Object(r.useState)({x:0,y:0,width:0,height:0}),2),O=x[0],S=x[1],j=s(["react-flow__edge-textwrapper",w]);return Object(r.useEffect)((function(){if(E.current){var e=E.current.getBBox();S({x:e.x,y:e.y,width:e.width,height:e.height})}}),[i]),void 0!==i&&i?o.a.createElement("g",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ja(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ja(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({transform:"translate(".concat(t-O.width/2," ").concat(n-O.height/2,")"),className:j},_),d&&o.a.createElement("rect",{width:O.width+2*g[0],x:-g[0],y:-g[1],height:O.height+2*g[1],className:"react-flow__edge-textbg",style:h,rx:y,ry:y}),o.a.createElement("text",{className:"react-flow__edge-text",y:O.height/2,dy:"0.3em",ref:E,style:l},i),b):null},Ma=Object(r.memo)(Na),Ca=function(e,t){return void 0!==t&&t?"url(#".concat(t,")"):void 0!==e?"url(#react-flow__".concat(e,")"):"none"},ka=[ri.Left,ri.Right],Pa=function(e){var t=e.sourceX,n=e.sourceY,r=e.targetX,o=e.targetY,i=e.sourcePosition,a=void 0===i?ri.Bottom:i,c=e.targetPosition,u=void 0===c?ri.Top:c,s=ka.includes(a),l=ka.includes(u);if(s&&!l||l&&!s){var f=s?Math.abs(r-t):0,d=t>r?t-f:t+f,p=s?0:Math.abs(o-n);return[d,n<o?n+p:n-p,f,p]}var h=Math.abs(r-t)/2,v=r<t?r+h:r-h,g=Math.abs(o-n)/2;return[v,o<n?o+g:o-g,h,g]};function Da(e){var t=e.sourceX,n=e.sourceY,r=e.sourcePosition,o=void 0===r?ri.Bottom:r,i=e.targetX,a=e.targetY,c=e.targetPosition,u=void 0===c?ri.Top:c,s=e.centerX,l=e.centerY,f=Qe(Pa({sourceX:t,sourceY:n,targetX:i,targetY:a}),2),d=f[0],p=f[1],h=[ri.Left,ri.Right],v=void 0!==s?s:d,g=void 0!==l?l:p,m="M".concat(t,",").concat(n," C").concat(t,",").concat(g," ").concat(i,",").concat(g," ").concat(i,",").concat(a);return h.includes(o)&&h.includes(u)?m="M".concat(t,",").concat(n," C").concat(v,",").concat(n," ").concat(v,",").concat(a," ").concat(i,",").concat(a):h.includes(u)?m="M".concat(t,",").concat(n," Q").concat(t,",").concat(a," ").concat(i,",").concat(a):h.includes(o)&&(m="M".concat(t,",").concat(n," Q").concat(i,",").concat(n," ").concat(i,",").concat(a)),m}var Ta=Object(r.memo)((function(e){var t=e.sourceX,n=e.sourceY,r=e.targetX,i=e.targetY,a=e.sourcePosition,c=void 0===a?ri.Bottom:a,u=e.targetPosition,s=void 0===u?ri.Top:u,l=e.label,f=e.labelStyle,d=e.labelShowBg,p=e.labelBgStyle,h=e.labelBgPadding,v=e.labelBgBorderRadius,g=e.style,m=e.arrowHeadType,y=e.markerEndId,b=Qe(Pa({sourceX:t,sourceY:n,targetX:r,targetY:i,sourcePosition:c,targetPosition:s}),2),w=b[0],_=b[1],E=Da({sourceX:t,sourceY:n,sourcePosition:c,targetX:r,targetY:i,targetPosition:s}),x=l?o.a.createElement(Ma,{x:w,y:_,label:l,labelStyle:f,labelShowBg:d,labelBgStyle:p,labelBgPadding:h,labelBgBorderRadius:v}):null,O=Ca(m,y);return o.a.createElement(o.a.Fragment,null,o.a.createElement("path",{style:g,d:E,className:"react-flow__edge-path",markerEnd:O}),x)})),Ia=function(e,t,n){return"L ".concat(e,",").concat(t-n,"Q ").concat(e,",").concat(t," ").concat(e+n,",").concat(t)},Aa=function(e,t,n){return"L ".concat(e+n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t-n)},La=function(e,t,n){return"L ".concat(e,",").concat(t-n,"Q ").concat(e,",").concat(t," ").concat(e-n,",").concat(t)},Ra=function(e,t,n){return"L ".concat(e-n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t-n)},za=function(e,t,n){return"L ".concat(e+n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t+n)},Ba=function(e,t,n){return"L ".concat(e,",").concat(t+n,"Q ").concat(e,",").concat(t," ").concat(e+n,",").concat(t)},Ua=function(e,t,n){return"L ".concat(e,",").concat(t+n,"Q ").concat(e,",").concat(t," ").concat(e-n,",").concat(t)},Ya=function(e,t,n){return"L ".concat(e-n,",").concat(t,"Q ").concat(e,",").concat(t," ").concat(e,",").concat(t+n)};function Xa(e){var t=e.sourceX,n=e.sourceY,r=e.sourcePosition,o=void 0===r?ri.Bottom:r,i=e.targetX,a=e.targetY,c=e.targetPosition,u=void 0===c?ri.Top:c,s=e.borderRadius,l=void 0===s?5:s,f=e.centerX,d=e.centerY,p=Qe(Pa({sourceX:t,sourceY:n,targetX:i,targetY:a}),4),h=p[0],v=p[1],g=p[2],m=p[3],y=Math.min(l,Math.abs(i-t)),b=Math.min(l,Math.abs(a-n)),w=Math.min(y,b,g,m),_=[ri.Left,ri.Right],E=void 0!==f?f:h,x=void 0!==d?d:v,O=null,S=null;return t<=i?(O=n<=a?Ia(t,x,w):Ba(t,x,w),S=n<=a?Ya(i,x,w):Ra(i,x,w)):(O=n<a?La(t,x,w):Ua(t,x,w),S=n<a?za(i,x,w):Aa(i,x,w)),_.includes(o)&&_.includes(u)?t<=i?(O=n<=a?Ya(E,n,w):Ra(E,n,w),S=n<=a?Ia(E,a,w):Ba(E,a,w)):(o===ri.Right&&u===ri.Left||o===ri.Left&&u===ri.Right||o===ri.Left&&u===ri.Left)&&(O=n<=a?za(E,n,w):Aa(E,n,w),S=n<=a?La(E,a,w):Ua(E,a,w)):_.includes(o)&&!_.includes(u)?(O=t<=i?n<=a?Ya(i,n,w):Ra(i,n,w):n<=a?za(i,n,w):Aa(i,n,w),S=""):!_.includes(o)&&_.includes(u)&&(O=t<=i?n<=a?Ia(t,a,w):Ba(t,a,w):n<=a?La(t,a,w):Ua(t,a,w),S=""),"M ".concat(t,",").concat(n).concat(O).concat(S,"L ").concat(i,",").concat(a)}var Ha=Object(r.memo)((function(e){var t=e.sourceX,n=e.sourceY,r=e.targetX,i=e.targetY,a=e.label,c=e.labelStyle,u=e.labelShowBg,s=e.labelBgStyle,l=e.labelBgPadding,f=e.labelBgBorderRadius,d=e.style,p=e.sourcePosition,h=void 0===p?ri.Bottom:p,v=e.targetPosition,g=void 0===v?ri.Top:v,m=e.arrowHeadType,y=e.markerEndId,b=e.borderRadius,w=void 0===b?5:b,_=Qe(Pa({sourceX:t,sourceY:n,targetX:r,targetY:i,sourcePosition:h,targetPosition:g}),2),E=_[0],x=_[1],O=Xa({sourceX:t,sourceY:n,sourcePosition:h,targetX:r,targetY:i,targetPosition:g,borderRadius:w}),S=Ca(m,y),j=a?o.a.createElement(Ma,{x:E,y:x,label:a,labelStyle:c,labelShowBg:u,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:f}):null;return o.a.createElement(o.a.Fragment,null,o.a.createElement("path",{style:d,className:"react-flow__edge-path",d:O,markerEnd:S}),j)})),Va=function(e){var t=e.connectionNodeId,n=e.connectionHandleId,i=e.connectionHandleType,a=e.connectionLineStyle,c=e.connectionPositionX,u=e.connectionPositionY,s=e.connectionLineType,l=void 0===s?ci.Bezier:s,f=e.nodes,d=void 0===f?[]:f,p=e.transform,h=e.isConnectable,v=e.CustomConnectionLineComponent,g=Qe(Object(r.useState)(null),2),m=g[0],y=g[1],b=t,w=n;if(Object(r.useEffect)((function(){var e=d.find((function(e){return e.id===b}))||null;y(e)}),[]),!m||!h)return null;var _=function(e,t,n){var r="source"===n?"target":"source",o=t.__rf.handleBounds[n]||t.__rf.handleBounds[r];return e?o.find((function(t){return t.id===e})):o[0]}(w,m,i),E=_?_.x+_.width/2:m.__rf.width/2,x=_?_.y+_.height/2:m.__rf.height,O=m.__rf.position.x+E,S=m.__rf.position.y+x,j=(c-p[0])/p[2],N=(u-p[1])/p[2],M=(null==_?void 0:_.position)===ri.Left||(null==_?void 0:_.position)===ri.Right?ri.Left:ri.Top;if(v)return o.a.createElement("g",{className:"react-flow__connection"},o.a.createElement(v,{sourceX:O,sourceY:S,sourcePosition:null==_?void 0:_.position,targetX:j,targetY:N,targetPosition:M,connectionLineType:l,connectionLineStyle:a,sourceNode:m,sourceHandle:_}));var C="";return C=l===ci.Bezier?Da({sourceX:O,sourceY:S,sourcePosition:null==_?void 0:_.position,targetX:j,targetY:N,targetPosition:M}):l===ci.Step?Xa({sourceX:O,sourceY:S,sourcePosition:null==_?void 0:_.position,targetX:j,targetY:N,targetPosition:M,borderRadius:0}):l===ci.SmoothStep?Xa({sourceX:O,sourceY:S,sourcePosition:null==_?void 0:_.position,targetX:j,targetY:N,targetPosition:M}):"M".concat(O,",").concat(S," ").concat(j,",").concat(N),o.a.createElement("g",{className:"react-flow__connection"},o.a.createElement("path",{d:C,className:"react-flow__connection-path",style:a}))},Fa=function(e){var t=e.id,n=e.children;return o.a.createElement("marker",{className:"react-flow__arrowhead",id:t,markerWidth:"12.5",markerHeight:"12.5",viewBox:"-10 -10 20 20",orient:"auto",refX:"0",refY:"0"},n)},Ga=function(e){var t=e.color;return o.a.createElement("defs",null,o.a.createElement(Fa,{id:"react-flow__arrowclosed"},o.a.createElement("polyline",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1",fill:t,points:"-5,-4 0,0 -5,4 -5,-4"})),o.a.createElement(Fa,{id:"react-flow__arrow"},o.a.createElement("polyline",{stroke:t,strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",fill:"none",points:"-5,-4 0,0 -5,4"})))};function Za(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 $a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Za(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Za(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Ga.displayName="MarkerDefinitions";var Wa=Object(r.memo)((function(e){return o.a.createElement(Ha,$a($a({},e),{},{borderRadius:0}))})),Ka=Object(r.memo)((function(e){var t=e.sourceX,n=e.sourceY,r=e.targetX,i=e.targetY,a=e.label,c=e.labelStyle,u=e.labelShowBg,s=e.labelBgStyle,l=e.labelBgPadding,f=e.labelBgBorderRadius,d=e.style,p=e.arrowHeadType,h=e.markerEndId,v=Math.abs(i-n)/2,g=i<n?i+v:i-v,m=Math.abs(r-t)/2,y=r<t?r+m:r-m,b=Ca(p,h),w=a?o.a.createElement(Ma,{x:y,y:g,label:a,labelStyle:c,labelShowBg:u,labelBgStyle:s,labelBgPadding:l,labelBgBorderRadius:f}):null;return o.a.createElement(o.a.Fragment,null,o.a.createElement("path",{style:d,className:"react-flow__edge-path",d:"M ".concat(t,",").concat(n,"L ").concat(r,",").concat(i),markerEnd:b}),w)}));function qa(e,t,n,r,o,i,a){var c=a.elementFromPoint(e.clientX,e.clientY),u=(null==c?void 0:c.classList.contains("target"))||!1,s=(null==c?void 0:c.classList.contains("source"))||!1,l={elementBelow:c,isValid:!1,connection:{source:null,target:null,sourceHandle:null,targetHandle:null},isHoveringHandle:!1};if(c&&(u||s)&&(l.isHoveringHandle=!0,t!==ai.Strict||(n&&s||!n&&u))){var f=c.getAttribute("data-nodeid"),d=c.getAttribute("data-handleid"),p=n?{source:f,sourceHandle:d,target:r,targetHandle:o}:{source:r,sourceHandle:o,target:f,targetHandle:d};l.connection=p,l.isValid=i(p)}return l}function Qa(e){null==e||e.classList.remove("react-flow__handle-valid"),null==e||e.classList.remove("react-flow__handle-connecting")}function Ja(e,t,n,r,o,i,a,c,u,s,l,f,d,p){var h,v,g,m=e.target.closest(".react-flow"),y=(h=e.target,(null===(v=h.getRootNode)||void 0===v?void 0:v.call(h))||(null===(g=window)||void 0===g?void 0:g.document));if(y){var b=y.elementFromPoint(e.clientX,e.clientY),w=null==b?void 0:b.classList.contains("target"),_=null==b?void 0:b.classList.contains("source");if(m&&(w||_||s)){var E,x=s||(w?"target":"source"),O=m.getBoundingClientRect();o({x:e.clientX-O.left,y:e.clientY-O.top}),r({connectionNodeId:n,connectionHandleId:t,connectionHandleType:x}),null==f||f(e,{nodeId:n,handleId:t,handleType:x}),y.addEventListener("mousemove",S),y.addEventListener("mouseup",(function e(o){var f=qa(o,u,a,n,t,c,y),h=f.connection,v=f.isValid;null==d||d(o),v&&(null==i||i(h)),null==p||p(o),s&&l&&l(o),Qa(E),r({connectionNodeId:null,connectionHandleId:null,connectionHandleType:null}),y.removeEventListener("mousemove",S),y.removeEventListener("mouseup",e)}))}}function S(e){o({x:e.clientX-O.left,y:e.clientY-O.top});var r=qa(e,u,a,n,t,c,y),i=r.connection,s=r.elementBelow,l=r.isValid;if(!r.isHoveringHandle)return Qa(E);!(i.source===i.target)&&s&&(E=s,s.classList.add("react-flow__handle-connecting"),s.classList.toggle("react-flow__handle-valid",l))}}var ec=function(e,t,n){return n===ri.Left?e-t:n===ri.Right?e+t:e},tc=function(e,t,n){return n===ri.Top?e-t:n===ri.Bottom?e+t:e},nc=function(e){var t=e.className,n=e.position,r=e.centerX,i=e.centerY,a=e.radius,c=void 0===a?10:a;return o.a.createElement("circle",{className:s(["react-flow__edgeupdater",t]),cx:ec(r,c,n),cy:tc(i,c,n),r:c,stroke:"transparent",fill:"transparent"})},rc=function(e){var t=function(t){var n=t.id,i=t.className,a=t.type,c=t.data,u=t.onClick,l=t.onEdgeDoubleClick,f=t.selected,d=t.animated,p=t.label,h=t.labelStyle,v=t.labelShowBg,g=t.labelBgStyle,m=t.labelBgPadding,y=t.labelBgBorderRadius,b=t.style,w=t.arrowHeadType,_=t.source,E=t.target,x=t.sourceX,O=t.sourceY,S=t.targetX,j=t.targetY,N=t.sourcePosition,M=t.targetPosition,C=t.elementsSelectable,k=t.markerEndId,P=t.isHidden,D=t.sourceHandleId,T=t.targetHandleId,I=t.handleEdgeUpdate,A=t.onConnectEdge,L=t.onContextMenu,R=t.onMouseEnter,z=t.onMouseMove,B=t.onMouseLeave,U=t.edgeUpdaterRadius,Y=t.onEdgeUpdateStart,X=t.onEdgeUpdateEnd,H=Ge((function(e){return e.addSelectedElements})),V=Ge((function(e){return e.setConnectionNodeId})),F=Ge((function(e){return e.unsetNodesSelection})),G=Ge((function(e){return e.setConnectionPosition})),Z=Ze((function(e){return e.connectionMode})),$=Qe(Object(r.useState)(!1),2),W=$[0],K=$[1],q=!C&&!u,Q=s(["react-flow__edge","react-flow__edge-".concat(a),i,{selected:f,animated:d,inactive:q,updating:W}]),J=Object(r.useMemo)((function(){var e={id:n,source:_,target:E,type:a};return D&&(e.sourceHandle=D),T&&(e.targetHandle=T),void 0!==c&&(e.data=c),e}),[n,_,E,a,D,T,c]),ee=Object(r.useCallback)((function(e){C&&(F(),H(J)),null==u||u(e,J)}),[C,J,u]),te=Object(r.useCallback)((function(e){null==l||l(e,J)}),[J,l]),ne=Object(r.useCallback)((function(e){null==L||L(e,J)}),[J,L]),re=Object(r.useCallback)((function(e){null==R||R(e,J)}),[J,L]),oe=Object(r.useCallback)((function(e){null==z||z(e,J)}),[J,L]),ie=Object(r.useCallback)((function(e){null==B||B(e,J)}),[J,L]),ae=Object(r.useCallback)((function(e,t){var n=t?E:_,r=t?T:D,o=t;null==Y||Y(e,J),Ja(e,r,n,V,G,A,o,(function(){return!0}),Z,t?"target":"source",X?function(e){return X(e,J)}:void 0)}),[n,_,E,a,D,T,V,G,J,A]),ce=Object(r.useCallback)((function(e){ae(e,!0)}),[n,_,D,ae]),ue=Object(r.useCallback)((function(e){ae(e,!1)}),[n,E,T,ae]),se=Object(r.useCallback)((function(){return K(!0)}),[K]),le=Object(r.useCallback)((function(){return K(!1)}),[K]);return P?null:o.a.createElement("g",{className:Q,onClick:ee,onDoubleClick:te,onContextMenu:ne,onMouseEnter:re,onMouseMove:oe,onMouseLeave:ie},o.a.createElement(e,{id:n,source:_,target:E,selected:f,animated:d,label:p,labelStyle:h,labelShowBg:v,labelBgStyle:g,labelBgPadding:m,labelBgBorderRadius:y,data:c,style:b,arrowHeadType:w,sourceX:x,sourceY:O,targetX:S,targetY:j,sourcePosition:N,targetPosition:M,markerEndId:k,sourceHandleId:D,targetHandleId:T}),I&&o.a.createElement("g",{onMouseDown:ce,onMouseEnter:se,onMouseOut:le},o.a.createElement(nc,{position:N,centerX:x,centerY:O,radius:U})),I&&o.a.createElement("g",{onMouseDown:ue,onMouseEnter:se,onMouseOut:le},o.a.createElement(nc,{position:M,centerX:S,centerY:j,radius:U})))};return t.displayName="EdgeWrapper",Object(r.memo)(t)};function oc(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 ic(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?oc(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):oc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ac(e,t){var n=arguments.length>2&&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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?wc(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):wc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({"data-handleid":M,"data-nodeid":w,"data-handlepos":l,className:D,onMouseDown:P,ref:t},b),m)}));Ec.displayName="Handle";var xc=Object(r.memo)(Ec),Oc=function(e){var t=e.data,n=e.isConnectable,r=e.targetPosition,i=void 0===r?ri.Top:r,a=e.sourcePosition,c=void 0===a?ri.Bottom:a;return o.a.createElement(o.a.Fragment,null,o.a.createElement(xc,{type:"target",position:i,isConnectable:n}),t.label,o.a.createElement(xc,{type:"source",position:c,isConnectable:n}))};Oc.displayName="DefaultNode";var Sc=Object(r.memo)(Oc),jc=function(e){var t=e.data,n=e.isConnectable,r=e.sourcePosition,i=void 0===r?ri.Bottom:r;return o.a.createElement(o.a.Fragment,null,t.label,o.a.createElement(xc,{type:"source",position:i,isConnectable:n}))};jc.displayName="InputNode";var Nc=Object(r.memo)(jc),Mc=function(e){var t=e.data,n=e.isConnectable,r=e.targetPosition,i=void 0===r?ri.Top:r;return o.a.createElement(o.a.Fragment,null,o.a.createElement(xc,{type:"target",position:i,isConnectable:n}),t.label)};Mc.displayName="OutputNode";var Cc=Object(r.memo)(Mc);function kc(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 Pc=function(e){var t=function(t){var n=t.id,i=t.type,a=t.data,u=t.scale,l=t.xPos,f=t.yPos,d=t.selected,p=t.onClick,h=t.onMouseEnter,v=t.onMouseMove,g=t.onMouseLeave,m=t.onContextMenu,y=t.onNodeDoubleClick,b=t.onNodeDragStart,w=t.onNodeDrag,_=t.onNodeDragStop,E=t.style,x=t.className,O=t.isDraggable,S=t.isSelectable,j=t.isConnectable,N=t.selectNodesOnDrag,M=t.sourcePosition,C=t.targetPosition,k=t.isHidden,P=t.isInitialized,D=t.snapToGrid,T=t.snapGrid,I=t.isDragging,A=t.resizeObserver,L=t.dragHandle,R=Ge((function(e){return e.updateNodeDimensions})),z=Ge((function(e){return e.addSelectedElements})),B=Ge((function(e){return e.updateNodePosDiff})),U=Ge((function(e){return e.unsetNodesSelection})),Y=Object(r.useRef)(null),X=Object(r.useMemo)((function(){return{id:n,type:i,position:{x:l,y:f},data:a}}),[n,i,l,f,a]),H=Object(r.useMemo)((function(){return D?T:[1,1]}),[D,T]),V=Object(r.useMemo)((function(){return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?kc(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):kc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({zIndex:d?10:3,transform:"translate(".concat(l,"px,").concat(f,"px)"),pointerEvents:S||O||p||h||v||g?"all":"none",opacity:P?1:0},E)}),[d,l,f,S,O,p,P,E,h,v,g]),F=Object(r.useMemo)((function(){if(h&&!I)return function(e){return h(e,X)}}),[h,I,X]),G=Object(r.useMemo)((function(){if(v&&!I)return function(e){return v(e,X)}}),[v,I,X]),Z=Object(r.useMemo)((function(){if(g&&!I)return function(e){return g(e,X)}}),[g,I,X]),$=Object(r.useMemo)((function(){if(m)return function(e){return m(e,X)}}),[m,X]),W=Object(r.useCallback)((function(e){O||(S&&(U(),d||z(X)),null==p||p(e,X))}),[S,d,O,p,X]),K=Object(r.useCallback)((function(e){null==b||b(e,X),N&&S?(U(),d||z(X)):N||d||!S||(U(),z([]))}),[X,d,N,S,b]),q=Object(r.useCallback)((function(e,t){w&&(X.position.x+=t.deltaX,X.position.y+=t.deltaY,w(e,X)),B({id:n,diff:{x:t.deltaX,y:t.deltaY},isDragging:!0})}),[n,X,w]),Q=Object(r.useCallback)((function(e){if(!I)return!S||N||d||z(X),void(null==p||p(e,X));B({id:X.id,isDragging:!1}),null==_||_(e,X)}),[X,S,N,p,_,I,d]),J=Object(r.useCallback)((function(e){null==y||y(e,X)}),[X,y]);if(Object(r.useLayoutEffect)((function(){Y.current&&!k&&R([{id:n,nodeElement:Y.current,forceUpdate:!0}])}),[n,k,M,C]),Object(r.useEffect)((function(){if(Y.current){var e=Y.current;return null==A||A.observe(e),function(){return null==A?void 0:A.unobserve(e)}}}),[]),k)return null;var ee=s(["react-flow__node","react-flow__node-".concat(i),x,{selected:d,selectable:S}]);return o.a.createElement(ga,{onStart:K,onDrag:q,onStop:Q,scale:u,disabled:!O,cancel:".nodrag",nodeRef:Y,grid:H,enableUserSelectHack:!1,handle:L},o.a.createElement("div",{className:ee,ref:Y,style:V,onMouseEnter:F,onMouseMove:G,onMouseLeave:Z,onContextMenu:$,onClick:W,onDoubleClick:J,"data-id":n},o.a.createElement(yc,{value:n},o.a.createElement(e,{id:n,data:a,type:i,xPos:l,yPos:f,selected:d,isConnectable:j,sourcePosition:M,targetPosition:C,isDragging:I,dragHandle:L}))))};return t.displayName="NodeWrapper",Object(r.memo)(t)};function Dc(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 Tc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Dc(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Dc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ic=function(e){var t=e.onSelectionChange,n=Ze((function(e){return e.selectedElements}));return Object(r.useEffect)((function(){t(n)}),[n]),null},Ac=function e(t,n){if(t===n)return!0;if(t&&n&&"object"==typeof t&&"object"==typeof n){if(t.constructor!==n.constructor)return!1;var r,o,i;if(Array.isArray(t)){if((r=t.length)!=n.length)return!1;for(o=r;0!=o--;)if(!e(t[o],n[o]))return!1;return!0}if(t.constructor===RegExp)return t.source===n.source&&t.flags===n.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===n.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===n.toString();if((r=(i=Object.keys(t)).length)!==Object.keys(n).length)return!1;for(o=r;0!=o--;)if(!Object.prototype.hasOwnProperty.call(n,i[o]))return!1;for(o=r;0!=o--;){var a=i[o];if(!e(t[a],n[a]))return!1}return!0}return t!=t&&n!=n};function Lc(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 Rc=function(e,t){var n=e.getBoundingClientRect();return{source:zc(".source",e,n,t),target:zc(".target",e,n,t)}},zc=function(e,t,n,r){var o=t.querySelectorAll(e);return o&&o.length?Array.from(o).map((function(e){var t=e.getBoundingClientRect(),o=et(e);return function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Lc(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Lc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({id:e.getAttribute("data-handleid"),position:e.getAttribute("data-handlepos"),x:(t.left-n.left)/r,y:(t.top-n.top)/r},o)})):null};function Bc(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 Uc(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Bc(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Bc(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Yc(){var e=arguments.length>0&&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.x<S?O.x:S,y:O.y<j?O.y:j,width:Math.abs(O.x-S),height:Math.abs(O.y-j)}),M=gt(e.nodes,N,e.transform,!1,!0),C=mt(M,e.edges),k=[].concat(qe(M),qe(C)),P=!Ac(k,e.selectedElements),D=P?{selectedElements:k.length>0?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;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?$c(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Kc={input:Nc,default:Sc,output:Cc},qc={default:Ta,straight:Ka,step:Wa,smoothstep:Ha},Qc=Object(r.forwardRef)((function(e,t){var n=e.elements,i=void 0===n?[]:n,a=e.className,c=e.nodeTypes,l=void 0===c?Kc:c,f=e.edgeTypes,d=void 0===f?qc:f,p=e.onElementClick,h=e.onLoad,v=e.onMove,g=e.onMoveStart,m=e.onMoveEnd,y=e.onElementsRemove,b=e.onConnect,w=e.onConnectStart,_=e.onConnectStop,E=e.onConnectEnd,x=e.onNodeMouseEnter,O=e.onNodeMouseMove,S=e.onNodeMouseLeave,j=e.onNodeContextMenu,N=e.onNodeDoubleClick,M=e.onNodeDragStart,C=e.onNodeDrag,k=e.onNodeDragStop,P=e.onSelectionChange,D=e.onSelectionDragStart,T=e.onSelectionDrag,I=e.onSelectionDragStop,A=e.onSelectionContextMenu,L=e.connectionMode,R=void 0===L?ai.Strict:L,z=e.connectionLineType,B=void 0===z?ci.Bezier:z,U=e.connectionLineStyle,Y=e.connectionLineComponent,X=e.deleteKeyCode,H=void 0===X?"Backspace":X,V=e.selectionKeyCode,F=void 0===V?"Shift":V,G=e.multiSelectionKeyCode,Z=void 0===G?"Meta":G,$=e.zoomActivationKeyCode,W=void 0===$?"Meta":$,K=e.snapToGrid,q=void 0!==K&&K,Q=e.snapGrid,J=void 0===Q?[15,15]:Q,ee=e.onlyRenderVisibleElements,te=void 0!==ee&&ee,ne=e.selectNodesOnDrag,re=void 0===ne||ne,oe=e.nodesDraggable,ie=e.nodesConnectable,ae=e.elementsSelectable,ce=e.minZoom,ue=e.maxZoom,se=e.defaultZoom,le=void 0===se?1:se,fe=e.defaultPosition,de=void 0===fe?[0,0]:fe,pe=e.translateExtent,he=e.preventScrolling,ve=void 0===he||he,ge=e.nodeExtent,me=e.arrowHeadColor,ye=void 0===me?"#b1b1b7":me,be=e.markerEndId,we=e.zoomOnScroll,_e=void 0===we||we,Ee=e.zoomOnPinch,xe=void 0===Ee||Ee,Oe=e.panOnScroll,Se=void 0!==Oe&&Oe,je=e.panOnScrollSpeed,Ne=void 0===je?.5:je,Me=e.panOnScrollMode,Ce=void 0===Me?ui.Free:Me,ke=e.zoomOnDoubleClick,Pe=void 0===ke||ke,De=e.paneMoveable,Te=void 0===De||De,Ie=e.onPaneClick,Ae=e.onPaneScroll,Le=e.onPaneContextMenu,Re=e.children,ze=e.onEdgeUpdate,Be=e.onEdgeContextMenu,Ue=e.onEdgeDoubleClick,Ye=e.onEdgeMouseEnter,Xe=e.onEdgeMouseMove,He=e.onEdgeMouseLeave,Ve=e.onEdgeUpdateStart,Fe=e.onEdgeUpdateEnd,Ge=e.edgeUpdaterRadius,Ze=void 0===Ge?10:Ge,$e=e.nodeTypesId,We=void 0===$e?"1":$e,Ke=e.edgeTypesId,qe=void 0===Ke?"1":Ke,Qe=u(e,Zc),Je=Object(r.useMemo)((function(){return function(e){var t={input:Pc(e.input||Nc),default:Pc(e.default||Sc),output:Pc(e.output||Cc)},n=Object.keys(e).filter((function(e){return!["input","default","output"].includes(e)})).reduce((function(t,n){return t[n]=Pc(e[n]||Sc),t}),{});return Tc(Tc({},t),n)}(l)}),[We]),et=Object(r.useMemo)((function(){return function(e){var t={default:rc(e.default||Ta),straight:rc(e.bezier||Ka),step:rc(e.step||Wa),smoothstep:rc(e.step||Ha)},n=Object.keys(e).filter((function(e){return!["default","bezier"].includes(e)})).reduce((function(t,n){return t[n]=rc(e[n]||Ta),t}),{});return ic(ic({},t),n)}(d)}),[qe]),tt=s(["react-flow",a]);return o.a.createElement("div",Wc(Wc({},Qe),{},{ref:t,className:tt}),o.a.createElement(Fc,null,o.a.createElement(vc,{onLoad:h,onMove:v,onMoveStart:g,onMoveEnd:m,onElementClick:p,onNodeMouseEnter:x,onNodeMouseMove:O,onNodeMouseLeave:S,onNodeContextMenu:j,onNodeDoubleClick:N,onNodeDragStart:M,onNodeDrag:C,onNodeDragStop:k,nodeTypes:Je,edgeTypes:et,connectionMode:R,connectionLineType:B,connectionLineStyle:U,connectionLineComponent:Y,selectionKeyCode:F,onElementsRemove:y,deleteKeyCode:H,multiSelectionKeyCode:Z,zoomActivationKeyCode:W,onConnect:b,onConnectStart:w,onConnectStop:_,onConnectEnd:E,snapToGrid:q,snapGrid:J,onlyRenderVisibleElements:te,nodesDraggable:oe,nodesConnectable:ie,elementsSelectable:ae,selectNodesOnDrag:re,minZoom:ce,maxZoom:ue,defaultZoom:le,defaultPosition:de,translateExtent:pe,preventScrolling:ve,nodeExtent:ge,arrowHeadColor:ye,markerEndId:be,zoomOnScroll:_e,zoomOnPinch:xe,zoomOnDoubleClick:Pe,panOnScroll:Se,panOnScrollSpeed:Ne,panOnScrollMode:Ce,paneMoveable:Te,onPaneClick:Ie,onPaneScroll:Ae,onPaneContextMenu:Le,onSelectionDragStart:D,onSelectionDrag:T,onSelectionDragStop:I,onSelectionContextMenu:A,onEdgeUpdate:ze,onEdgeContextMenu:Be,onEdgeDoubleClick:Ue,onEdgeMouseEnter:Ye,onEdgeMouseMove:Xe,onEdgeMouseLeave:He,onEdgeUpdateStart:Ve,onEdgeUpdateEnd:Fe,edgeUpdaterRadius:Ze}),o.a.createElement(gc,{elements:i}),P&&o.a.createElement(Ic,{onSelectionChange:P}),Re))}));Qc.displayName="ReactFlow";var Jc=function(e){var t=e.x,n=e.y,r=e.width,i=e.height,a=e.style,c=e.color,u=e.strokeColor,l=e.strokeWidth,f=e.className,d=e.borderRadius,p=e.shapeRendering,h=a||{},v=h.background,g=h.backgroundColor,m=c||v||g;return o.a.createElement("rect",{className:s(["react-flow__minimap-node",f]),x:t,y:n,rx:d,ry:d,width:r,height:i,fill:m,stroke:u,strokeWidth:l,shapeRendering:p})};Jc.displayName="MiniMapNode";var eu=Object(r.memo)(Jc),tu=function(e){var t,n=e.style,r=e.className,i=e.nodeStrokeColor,a=void 0===i?"#555":i,c=e.nodeColor,u=void 0===c?"#fff":c,l=e.nodeClassName,f=void 0===l?"":l,d=e.nodeBorderRadius,p=void 0===d?5:d,h=e.nodeStrokeWidth,v=void 0===h?2:h,g=e.maskColor,m=void 0===g?"rgb(240, 242, 243, 0.7)":g,y=Ze((function(e){return e.width})),b=Ze((function(e){return e.height})),w=Qe(Ze((function(e){return e.transform})),3),_=w[0],E=w[1],x=w[2],O=Ze((function(e){return e.nodes})),S=s(["react-flow__minimap",r]),j=(null==n?void 0:n.width)||200,N=(null==n?void 0:n.height)||150,M=u instanceof Function?u:function(){return u},C=a instanceof Function?a:function(){return a},k=f instanceof Function?f:function(){return f},P=O&&O.length,D=vt(O),T={x:-_/x,y:-E/x,width:y/x,height:b/x},I=P?(t=T,ht(dt(pt(D),pt(t)))):T,A=I.width/j,L=I.height/N,R=Math.max(A,L),z=R*j,B=R*N,U=5*R,Y=I.x-(z-I.width)/2-U,X=I.y-(B-I.height)/2-U,H=z+2*U,V=B+2*U,F="undefined"==typeof window||window.chrome?"crispEdges":"geometricPrecision";return o.a.createElement("svg",{width:j,height:N,viewBox:"".concat(Y," ").concat(X," ").concat(H," ").concat(V),style:n,className:S},O.filter((function(e){return!e.isHidden})).map((function(e){return o.a.createElement(eu,{key:e.id,x:e.__rf.position.x,y:e.__rf.position.y,width:e.__rf.width,height:e.__rf.height,style:e.style,className:k(e),color:M(e),borderRadius:p,strokeColor:C(e),strokeWidth:v,shapeRendering:F})})),o.a.createElement("path",{className:"react-flow__minimap-mask",d:"M".concat(Y-U,",").concat(X-U,"h").concat(H+2*U,"v").concat(V+2*U,"h").concat(-H-2*U,"z\n M").concat(T.x,",").concat(T.y,"h").concat(T.width,"v").concat(T.height,"h").concat(-T.width,"z"),fill:m,fillRule:"evenodd"}))};tu.displayName="MiniMap";var nu;function ru(){return(ru=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var ou,iu=function(e){return r.createElement("svg",ru({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},e),nu||(nu=r.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})))};function au(){return(au=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var cu,uu=function(e){return r.createElement("svg",au({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},e),ou||(ou=r.createElement("path",{d:"M0 0h32v4.2H0z"})))};function su(){return(su=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var lu,fu=function(e){return r.createElement("svg",su({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},e),cu||(cu=r.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0 0 27.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94a.919.919 0 0 1-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})))};function du(){return(du=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var pu,hu=function(e){return r.createElement("svg",du({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},e),lu||(lu=r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})))};function vu(){return(vu=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}var gu=function(e){return r.createElement("svg",vu({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},e),pu||(pu=r.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 0 0 0 13.714v15.238A3.056 3.056 0 0 0 3.048 32h18.285a3.056 3.056 0 0 0 3.048-3.048V13.714a3.056 3.056 0 0 0-3.048-3.047zM12.19 24.533a3.056 3.056 0 0 1-3.047-3.047 3.056 3.056 0 0 1 3.047-3.048 3.056 3.056 0 0 1 3.048 3.048 3.056 3.056 0 0 1-3.048 3.047z"})))},mu=["children","className"];function yu(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 bu=function(e){var t=e.children,n=e.className,r=u(e,mu);return o.a.createElement("button",function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?yu(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):yu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({type:"button",className:s(["react-flow__controls-button",n])},r),t)},wu=function(e){var t=e.style,n=e.showZoom,i=void 0===n||n,a=e.showFitView,c=void 0===a||a,u=e.showInteractive,l=void 0===u||u,f=e.fitViewParams,d=e.onZoomIn,p=e.onZoomOut,h=e.onFitView,v=e.onInteractiveChange,g=e.className,m=e.children,y=Qe(Object(r.useState)(!1),2),b=y[0],w=y[1],_=Ge((function(e){return e.setInteractive})),E=pc(),x=E.zoomIn,O=E.zoomOut,S=E.fitView,j=Ze((function(e){return e.nodesDraggable&&e.nodesConnectable&&e.elementsSelectable})),N=s(["react-flow__controls",g]),M=Object(r.useCallback)((function(){null==x||x(),null==d||d()}),[x,d]),C=Object(r.useCallback)((function(){null==O||O(),null==p||p()}),[O,p]),k=Object(r.useCallback)((function(){null==S||S(f),null==h||h()}),[S,f,h]),P=Object(r.useCallback)((function(){null==_||_(!j),null==v||v(!j)}),[j,_,v]);return Object(r.useEffect)((function(){w(!0)}),[]),b?o.a.createElement("div",{className:N,style:t},i&&o.a.createElement(o.a.Fragment,null,o.a.createElement(bu,{onClick:M,className:"react-flow__controls-zoomin"},o.a.createElement(iu,null)),o.a.createElement(bu,{onClick:C,className:"react-flow__controls-zoomout"},o.a.createElement(uu,null))),c&&o.a.createElement(bu,{className:"react-flow__controls-fitview",onClick:k},o.a.createElement(fu,null)),l&&o.a.createElement(bu,{className:"react-flow__controls-interactive",onClick:P},j?o.a.createElement(gu,null):o.a.createElement(hu,null)),m):null};wu.displayName="Controls";var _u,Eu=Object(r.memo)(wu);function xu(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 Ou(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xu(Object(n),!0).forEach((function(t){c(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xu(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Su=(c(_u={},ii.Dots,"#81818a"),c(_u,ii.Lines,"#eee"),_u),ju=function(e){var t=e.variant,n=void 0===t?ii.Dots:t,i=e.gap,a=void 0===i?15:i,c=e.size,u=void 0===c?.4:c,l=e.color,f=e.style,d=e.className,p=Qe(Ze((function(e){return e.transform})),3),h=p[0],v=p[1],g=p[2],m=Object(r.useMemo)((function(){return"pattern-".concat(Math.floor(1e5*Math.random()))}),[]),y=s(["react-flow__background",d]),b=a*g,w=h%b,_=v%b,E=n===ii.Lines,x=l||Su[n],O=E?function(e,t,n){return o.a.createElement("path",{stroke:n,strokeWidth:t,d:"M".concat(e/2," 0 V").concat(e," M0 ").concat(e/2," H").concat(e)})}(b,u,x):function(e,t){return o.a.createElement("circle",{cx:e,cy:e,r:e,fill:t})}(u*g,x);return o.a.createElement("svg",{className:y,style:Ou(Ou({},f),{},{width:"100%",height:"100%"})},o.a.createElement("pattern",{id:m,x:w,y:_,width:b,height:b,patternUnits:"userSpaceOnUse"},O),o.a.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:"url(#".concat(m,")")}))};ju.displayName="Background";var Nu=Object(r.memo)(ju),Mu=function(e){var t=e.children,n=Object(r.useMemo)((function(){return Xc(Hc)}),[]);return o.a.createElement(ne,{store:n},t)};Mu.displayName="ReactFlowProvider"},1064:function(e,t,n){var r;try{r={cloneDeep:n(1318),constant:n(1142),defaults:n(1319),each:n(1189),filter:n(1192),find:n(1320),flatten:n(1215),forEach:n(1190),forIn:n(1324),has:n(35),isUndefined:n(1201),last:n(1325),map:n(1202),mapValues:n(1326),max:n(1327),merge:n(1329),min:n(1335),minBy:n(1336),now:n(568),pick:n(1337),range:n(1342),reduce:n(1204),sortBy:n(1345),uniqueId:n(1350),values:n(1208),zipObject:n(1351)}}catch(e){}r||(r=window._),e.exports=r},1071:function(e,t,n){"use strict";var r=n(1064),o=n(1083).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){return r.max(r.map(e.nodes(),(function(t){var n=e.node(t).rank;if(!r.isUndefined(n))return n})))}e.exports={addDummyNode:i,simplify:function(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},asNonCompoundGraph:function(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},successorWeights:function(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)},predecessorWeights:function(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)},intersectRect:function(e,t){var n,r,o=e.x,i=e.y,a=t.x-o,c=t.y-i,u=e.width/2,s=e.height/2;if(!a&&!c)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(c)*u>Math.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;++c<u;){var s=t[c],l=i?i(n[s],e[s],s,n,e):void 0;void 0===l&&(l=e[s]),a?o(n,s,l):r(n,s,l)}return n}},1118:function(e,t,n){var r=n(550),o=n(1247),i=n(1248),a=n(1249),c=n(1250),u=n(1251);function s(e){var t=this.__data__=new r(e);this.size=t.size}s.prototype.clear=o,s.prototype.delete=i,s.prototype.get=a,s.prototype.has=c,s.prototype.set=u,e.exports=s},1119:function(e,t,n){var r=n(1120),o=n(543),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){var a=e[t];i.call(e,t)&&o(a,n)&&(void 0!==n||t in e)||r(e,t,n)}},1120:function(e,t,n){var r=n(1176);e.exports=function(e,t,n){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}},1121:function(e,t,n){var r=n(566)(Object.getPrototypeOf,Object);e.exports=r},1122:function(e,t,n){var r=n(1143),o=n(1270)(r);e.exports=o},1123:function(e,t,n){var r=n(549),o=n(546);e.exports=function(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}},1124:function(e,t,n){var r=n(1103),o=n(1205),i=n(1206);e.exports=function(e,t){return i(o(e,t,r),e+"")}},1125:function(e,t,n){var r=n(543),o=n(542),i=n(553),a=n(178);e.exports=function(e,t,n){if(!a(n))return!1;var c=typeof t;return!!("number"==c?o(n)&&i(t,n.length):"string"==c&&t in n)&&r(n[t],e)}},1126:function(e,t,n){"use strict";var r=n(1064);e.exports={longestPath:function(e){var t={};r.forEach(e.sources(),(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}))},slack:function(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}}},1137:function(e,t,n){"use strict";var r=n(1078);e.exports=o;function o(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["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function i(e,t){e[t]?e[t]++:e[t]=1}function a(e,t){--e[t]||delete e[t]}function c(e,t,n,o){var i=""+t,a=""+n;if(!e&&i>a){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;++n<r&&!1!==t(e[n],n,e););return e}},1139:function(e,t,n){var r=n(1180),o=n(1181),i=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols,c=a?function(e){return null==e?[]:(e=Object(e),r(a(e),(function(t){return i.call(e,t)})))}:o;e.exports=c},1140:function(e,t){e.exports=function(e,t){for(var n=-1,r=t.length,o=e.length;++n<r;)e[o+n]=t[n];return e}},1141:function(e,t,n){var r=n(1185);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},1142:function(e,t){e.exports=function(e){return function(){return e}}},1143:function(e,t,n){var r=n(1144),o=n(1098);e.exports=function(e,t){return e&&r(e,t,o)}},1144:function(e,t,n){var r=n(1269)();e.exports=r},1145:function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e){n[++t]=e})),n}},1146:function(e,t,n){var r=n(1140),o=n(1296);e.exports=function e(t,n,i,a,c){var u=-1,s=t.length;for(i||(i=o),c||(c=[]);++u<s;){var l=t[u];n>0&&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;++o<i;){var a=e[o],c=t(a);if(null!=c&&(void 0===u?c==c&&!r(c):n(c,u)))var u=c,s=a}return s}},1174:function(e,t,n){e.exports={graphlib:n(1083),layout:n(1317),debug:n(1374),util:{time:n(1071).time,notime:n(1071).notime},version:n(1375)}},1175:function(e,t,n){var r=n(1118),o=n(1138),i=n(1119),a=n(1252),c=n(1254),u=n(1178),s=n(1179),l=n(1257),f=n(1258),d=n(1183),p=n(1259),h=n(544),v=n(1260),g=n(1261),m=n(1187),y=n(177),b=n(545),w=n(1265),_=n(178),E=n(1267),x=n(1098),O=n(1102),S={};S["[object Arguments]"]=S["[object Array]"]=S["[object ArrayBuffer]"]=S["[object DataView]"]=S["[object Boolean]"]=S["[object Date]"]=S["[object Float32Array]"]=S["[object Float64Array]"]=S["[object Int8Array]"]=S["[object Int16Array]"]=S["[object Int32Array]"]=S["[object Map]"]=S["[object Number]"]=S["[object Object]"]=S["[object RegExp]"]=S["[object Set]"]=S["[object String]"]=S["[object Symbol]"]=S["[object Uint8Array]"]=S["[object Uint8ClampedArray]"]=S["[object Uint16Array]"]=S["[object Uint32Array]"]=!0,S["[object Error]"]=S["[object Function]"]=S["[object WeakMap]"]=!1,e.exports=function e(t,n,j,N,M,C){var k,P=1&n,D=2&n,T=4&n;if(j&&(k=M?j(t,N,M,C):j(t)),void 0!==k)return k;if(!_(t))return t;var I=y(t);if(I){if(k=v(t),!P)return s(t,k)}else{var A=h(t),L="[object Function]"==A||"[object GeneratorFunction]"==A;if(b(t))return u(t,P);if("[object Object]"==A||"[object Arguments]"==A||L&&!M){if(k=D||L?{}:m(t),!P)return D?f(t,c(k,t)):l(t,a(k,t))}else{if(!S[A])return M?t:{};k=g(t,A,P)}}C||(C=new r);var R=C.get(t);if(R)return R;C.set(t,k),E(t)?t.forEach((function(r){k.add(e(r,n,j,r,t,C))})):w(t)&&t.forEach((function(r,o){k.set(o,e(r,n,j,o,t,C))}));var z=I?void 0:(T?D?p:d:D?O:x)(t);return o(z||t,(function(r,o){z&&(r=t[o=r]),i(k,o,e(r,n,j,o,t,C))})),k}},1176:function(e,t,n){var r=n(152),o=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=o},1177:function(e,t,n){var r=n(1253),o=n(352),i=n(177),a=n(545),c=n(553),u=n(547),s=Object.prototype.hasOwnProperty;e.exports=function(e,t){var n=i(e),l=!n&&o(e),f=!n&&!l&&a(e),d=!n&&!l&&!f&&u(e),p=n||l||f||d,h=p?r(e.length,String):[],v=h.length;for(var g in e)!t&&!s.call(e,g)||p&&("length"==g||f&&("offset"==g||"parent"==g)||d&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||c(g,v))||h.push(g);return h}},1178:function(e,t,n){(function(e){var r=n(97),o=t&&!t.nodeType&&t,i=o&&"object"==typeof e&&e&&!e.nodeType&&e,a=i&&i.exports===o?r.Buffer:void 0,c=a?a.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var n=e.length,r=c?c(n):new e.constructor(n);return e.copy(r),r}}).call(this,n(276)(e))},1179:function(e,t){e.exports=function(e,t){var n=-1,r=e.length;for(t||(t=Array(r));++n<r;)t[n]=e[n];return t}},1180:function(e,t){e.exports=function(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}},1181:function(e,t){e.exports=function(){return[]}},1182:function(e,t,n){var r=n(1140),o=n(1121),i=n(1139),a=n(1181),c=Object.getOwnPropertySymbols?function(e){for(var t=[];e;)r(t,i(e)),e=o(e);return t}:a;e.exports=c},1183:function(e,t,n){var r=n(1184),o=n(1139),i=n(1098);e.exports=function(e){return r(e,i,o)}},1184:function(e,t,n){var r=n(1140),o=n(177);e.exports=function(e,t,n){var i=t(e);return o(e)?i:r(i,n(e))}},1185:function(e,t,n){var r=n(97).Uint8Array;e.exports=r},1186:function(e,t,n){var r=n(1141);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}},1187:function(e,t,n){var r=n(1188),o=n(1121),i=n(358);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(o(e))}},1188:function(e,t,n){var r=n(178),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}}();e.exports=i},1189:function(e,t,n){e.exports=n(1190)},1190:function(e,t,n){var r=n(1138),o=n(1122),i=n(1191),a=n(177);e.exports=function(e,t){return(a(e)?r:o)(e,i(t))}},1191:function(e,t,n){var r=n(1103);e.exports=function(e){return"function"==typeof e?e:r}},1192:function(e,t,n){var r=n(1180),o=n(1271),i=n(1090),a=n(177);e.exports=function(e,t){return(a(e)?r:o)(e,i(t,3))}},1193:function(e,t,n){var r=n(1274),o=n(198);e.exports=function e(t,n,i,a,c){return t===n||(null==t||null==n||!o(t)&&!o(n)?t!=t&&n!=n:r(t,n,i,a,e,c))}},1194:function(e,t,n){var r=n(1195),o=n(1277),i=n(1196);e.exports=function(e,t,n,a,c,u){var s=1&n,l=e.length,f=t.length;if(l!=f&&!(s&&f>l))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);++h<l;){var m=e[h],y=t[h];if(a)var b=s?a(y,m,h,t,e,u):a(m,y,h,e,t,u);if(void 0!==b){if(b)continue;v=!1;break}if(g){if(!o(t,(function(e,t){if(!i(g,t)&&(m===e||c(m,e,n,a,u)))return g.push(t)}))){v=!1;break}}else if(m!==y&&!c(m,y,n,a,u)){v=!1;break}}return u.delete(e),u.delete(t),v}},1195:function(e,t,n){var r=n(558),o=n(1275),i=n(1276);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,e.exports=a},1196:function(e,t){e.exports=function(e,t){return e.has(t)}},1197:function(e,t,n){var r=n(178);e.exports=function(e){return e==e&&!r(e)}},1198:function(e,t){e.exports=function(e,t){return function(n){return null!=n&&(n[e]===t&&(void 0!==t||e in Object(n)))}}},1199:function(e,t,n){var r=n(1284),o=n(565);e.exports=function(e,t){return null!=e&&o(e,t,r)}},1200:function(e,t){e.exports=function(e){return function(t){return null==t?void 0:t[e]}}},1201:function(e,t){e.exports=function(e){return void 0===e}},1202:function(e,t,n){var r=n(552),o=n(1090),i=n(1203),a=n(177);e.exports=function(e,t){return(a(e)?r:i)(e,o(t,3))}},1203:function(e,t,n){var r=n(1122),o=n(542);e.exports=function(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}},1204:function(e,t,n){var r=n(1287),o=n(1122),i=n(1090),a=n(1288),c=n(177);e.exports=function(e,t,n){var u=c(e)?r:a,s=arguments.length<3;return u(e,i(t,4),n,s,o)}},1205:function(e,t,n){var r=n(1297),o=Math.max;e.exports=function(e,t,n){return t=o(void 0===t?e.length-1:t,0),function(){for(var i=arguments,a=-1,c=o(i.length-t,0),u=Array(c);++a<c;)u[a]=i[t+a];a=-1;for(var s=Array(t+1);++a<t;)s[a]=i[a];return s[t]=n(u),r(e,this,s)}}},1206:function(e,t,n){var r=n(1298),o=n(1299)(r);e.exports=o},1207:function(e,t,n){var r=n(542),o=n(198);e.exports=function(e){return o(e)&&r(e)}},1208:function(e,t,n){var r=n(1305),o=n(1098);e.exports=function(e){return null==e?[]:r(e,o(e))}},1209:function(e,t,n){var r=n(1078),o=n(1210);e.exports=function(e,t,n,r){return function(e,t,n,r){var i,a,c={},u=new o,s=function(e){var t=e.v!==i?e.v:e.w,r=c[t],o=n(e),s=a.distance+o;if(o<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+e+" Weight: "+o);s<r.distance&&(r.distance=s,r.predecessor=i,u.decrease(t,s))};e.nodes().forEach((function(e){var n=e===t?0:Number.POSITIVE_INFINITY;c[e]={distance:n},u.add(e,n)}));for(;u.size()>0&&(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<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}},1211:function(e,t,n){var r=n(1078);e.exports=function(e){var t=0,n=[],o={},i=[];return e.nodes().forEach((function(a){r.has(o,a)||function a(c){var u=o[c]={onStack:!0,lowlink:t,index:t++};if(n.push(c),e.successors(c).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 s,l=[];do{s=n.pop(),o[s].onStack=!1,l.push(s)}while(c!==s);i.push(l)}}(a)})),i}},1212:function(e,t,n){var r=n(1078);function o(e){var t={},n={},o=[];if(r.each(e.sinks(),(function a(c){if(r.has(n,c))throw new i;r.has(t,c)||(n[c]=!0,t[c]=!0,r.each(e.predecessors(c),a),delete n[c],o.push(c))})),r.size(t)!==e.nodeCount())throw new i;return o}function i(){}e.exports=o,o.CycleException=i,i.prototype=new Error},1213:function(e,t,n){var r=n(1078);e.exports=function(e,t,n){r.isArray(t)||(t=[t]);var o=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return r.each(t,(function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);!function e(t,n,o,i,a,c){r.has(i,n)||(i[n]=!0,o||c.push(n),r.each(a(n),(function(n){e(t,n,o,i,a,c)})),o&&c.push(n))}(e,t,"post"===n,a,o,i)})),i}},1214:function(e,t,n){var r=n(569);e.exports=function(e){return e?(e=r(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},1215:function(e,t,n){var r=n(1146);e.exports=function(e){return(null==e?0:e.length)?r(e,1):[]}},1216:function(e,t,n){var r=n(1120),o=n(543);e.exports=function(e,t,n){(void 0!==n&&!o(e[t],n)||void 0===n&&!(t in e))&&r(e,t,n)}},1217:function(e,t){e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},1218:function(e,t){e.exports=function(e,t){return e<t}},1219:function(e,t,n){"use strict";var r=n(1064),o=n(1083).Graph,i=n(1126).slack;function a(e,t){return r.forEach(e.nodes(),(function n(o){r.forEach(t.nodeEdges(o),(function(r){var a=r.v,c=o===a?r.w:a;e.hasNode(c)||i(t,r)||(e.setNode(c,{}),e.setEdge(o,c,{}),n(c))}))})),e.nodeCount()}function c(e,t){return r.minBy(t.edges(),(function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return i(t,n)}))}function u(e,t,n){r.forEach(e.nodes(),(function(e){t.node(e).rank+=n}))}e.exports=function(e){var t,n,r=new o({directed:!1}),s=e.nodes()[0],l=e.nodeCount();r.setNode(s,{});for(;a(r,e)<l;)t=c(r,e),n=r.hasNode(t.v)?i(e,t):-i(e,t),u(r,e,n);return r}},1244:function(e,t,n){var r=n(1245);e.exports={Graph:r.Graph,json:n(1307),alg:n(1308),version:r.version}},1245:function(e,t,n){e.exports={Graph:n(1137),version:n(1306)}},1246:function(e,t,n){var r=n(1175);e.exports=function(e){return r(e,4)}},1247:function(e,t,n){var r=n(550);e.exports=function(){this.__data__=new r,this.size=0}},1248:function(e,t){e.exports=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n}},1249:function(e,t){e.exports=function(e){return this.__data__.get(e)}},1250:function(e,t){e.exports=function(e){return this.__data__.has(e)}},1251:function(e,t,n){var r=n(550),o=n(364),i=n(558);e.exports=function(e,t){var n=this.__data__;if(n instanceof r){var a=n.__data__;if(!o||a.length<199)return a.push([e,t]),this.size=++n.size,this;n=this.__data__=new i(a)}return n.set(e,t),this.size=n.size,this}},1252:function(e,t,n){var r=n(1112),o=n(1098);e.exports=function(e,t){return e&&r(t,o(t),e)}},1253:function(e,t){e.exports=function(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}},1254:function(e,t,n){var r=n(1112),o=n(1102);e.exports=function(e,t){return e&&r(t,o(t),e)}},1255:function(e,t,n){var r=n(178),o=n(358),i=n(1256),a=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=o(e),n=[];for(var c in e)("constructor"!=c||!t&&a.call(e,c))&&n.push(c);return n}},1256:function(e,t){e.exports=function(e){var t=[];if(null!=e)for(var n in Object(e))t.push(n);return t}},1257:function(e,t,n){var r=n(1112),o=n(1139);e.exports=function(e,t){return r(e,o(e),t)}},1258:function(e,t,n){var r=n(1112),o=n(1182);e.exports=function(e,t){return r(e,o(e),t)}},1259:function(e,t,n){var r=n(1184),o=n(1182),i=n(1102);e.exports=function(e){return r(e,i,o)}},1260:function(e,t){var n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&n.call(e,"index")&&(r.index=e.index,r.input=e.input),r}},1261:function(e,t,n){var r=n(1141),o=n(1262),i=n(1263),a=n(1264),c=n(1186);e.exports=function(e,t,n){var u=e.constructor;switch(t){case"[object ArrayBuffer]":return r(e);case"[object Boolean]":case"[object Date]":return new u(+e);case"[object DataView]":return o(e,n);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 c(e,n);case"[object Map]":return new u;case"[object Number]":case"[object String]":return new u(e);case"[object RegExp]":return i(e);case"[object Set]":return new u;case"[object Symbol]":return a(e)}}},1262:function(e,t,n){var r=n(1141);e.exports=function(e,t){var n=t?r(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.byteLength)}},1263:function(e,t){var n=/\w*$/;e.exports=function(e){var t=new e.constructor(e.source,n.exec(e));return t.lastIndex=e.lastIndex,t}},1264:function(e,t,n){var r=n(274),o=r?r.prototype:void 0,i=o?o.valueOf:void 0;e.exports=function(e){return i?Object(i.call(e)):{}}},1265:function(e,t,n){var r=n(1266),o=n(554),i=n(561),a=i&&i.isMap,c=a?o(a):r;e.exports=c},1266:function(e,t,n){var r=n(544),o=n(198);e.exports=function(e){return o(e)&&"[object Map]"==r(e)}},1267:function(e,t,n){var r=n(1268),o=n(554),i=n(561),a=i&&i.isSet,c=a?o(a):r;e.exports=c},1268:function(e,t,n){var r=n(544),o=n(198);e.exports=function(e){return o(e)&&"[object Set]"==r(e)}},1269:function(e,t){e.exports=function(e){return function(t,n,r){for(var o=-1,i=Object(t),a=r(t),c=a.length;c--;){var u=a[e?c:++o];if(!1===n(i[u],u,i))break}return t}}},1270:function(e,t,n){var r=n(542);e.exports=function(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,c=Object(n);(t?a--:++a<i)&&!1!==o(c[a],a,c););return n}}},1271:function(e,t,n){var r=n(1122);e.exports=function(e,t){var n=[];return r(e,(function(e,r,o){t(e,r,o)&&n.push(e)})),n}},1272:function(e,t,n){var r=n(1273),o=n(1281),i=n(1198);e.exports=function(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)}}},1273:function(e,t,n){var r=n(1118),o=n(1193);e.exports=function(e,t,n,i){var a=n.length,c=a,u=!i;if(null==e)return!c;for(e=Object(e);a--;){var s=n[a];if(u&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++a<c;){var l=(s=n[a])[0],f=e[l],d=s[1];if(u&&s[2]){if(void 0===f&&!(l in e))return!1}else{var p=new r;if(i)var h=i(f,d,l,e,t,p);if(!(void 0===h?o(d,f,3,i,p):h))return!1}}return!0}},1274:function(e,t,n){var r=n(1118),o=n(1194),i=n(1278),a=n(1280),c=n(544),u=n(177),s=n(545),l=n(547),f="[object Object]",d=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,p,h,v){var g=u(e),m=u(t),y=g?"[object Array]":c(e),b=m?"[object Array]":c(t),w=(y="[object Arguments]"==y?f:y)==f,_=(b="[object Arguments]"==b?f:b)==f,E=y==b;if(E&&s(e)){if(!s(t))return!1;g=!0,w=!1}if(E&&!w)return v||(v=new r),g||l(e)?o(e,t,n,p,h,v):i(e,t,y,n,p,h,v);if(!(1&n)){var x=w&&d.call(e,"__wrapped__"),O=_&&d.call(t,"__wrapped__");if(x||O){var S=x?e.value():e,j=O?t.value():t;return v||(v=new r),h(S,j,n,p,v)}}return!!E&&(v||(v=new r),a(e,t,n,p,h,v))}},1275:function(e,t){e.exports=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}},1276:function(e,t){e.exports=function(e){return this.__data__.has(e)}},1277:function(e,t){e.exports=function(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}},1278:function(e,t,n){var r=n(274),o=n(1185),i=n(543),a=n(1194),c=n(1279),u=n(1145),s=r?r.prototype:void 0,l=s?s.valueOf:void 0;e.exports=function(e,t,n,r,s,f,d){switch(n){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||!f(new o(e),new o(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return i(+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 p=c;case"[object Set]":var h=1&r;if(p||(p=u),e.size!=t.size&&!h)return!1;var v=d.get(e);if(v)return v==t;r|=2,d.set(e,t);var g=a(p(e),p(t),r,s,f,d);return d.delete(e),g;case"[object Symbol]":if(l)return l.call(e)==l.call(t)}return!1}},1279:function(e,t){e.exports=function(e){var t=-1,n=Array(e.size);return e.forEach((function(e,r){n[++t]=[r,e]})),n}},1280:function(e,t,n){var r=n(1183),o=Object.prototype.hasOwnProperty;e.exports=function(e,t,n,i,a,c){var u=1&n,s=r(e),l=s.length;if(l!=r(t).length&&!u)return!1;for(var f=l;f--;){var d=s[f];if(!(u?d in t:o.call(t,d)))return!1}var p=c.get(e),h=c.get(t);if(p&&h)return p==t&&h==e;var v=!0;c.set(e,t),c.set(t,e);for(var g=u;++f<l;){var m=e[d=s[f]],y=t[d];if(i)var b=u?i(y,m,d,t,e,c):i(m,y,d,e,t,c);if(!(void 0===b?m===y||a(m,y,n,i,c):b)){v=!1;break}g||(g="constructor"==d)}if(v&&!g){var w=e.constructor,_=t.constructor;w==_||!("constructor"in e)||!("constructor"in t)||"function"==typeof w&&w instanceof w&&"function"==typeof _&&_ instanceof _||(v=!1)}return c.delete(e),c.delete(t),v}},1281:function(e,t,n){var r=n(1197),o=n(1098);e.exports=function(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}},1282:function(e,t,n){var r=n(1193),o=n(1283),i=n(1199),a=n(557),c=n(1197),u=n(1198),s=n(546);e.exports=function(e,t){return a(e)&&c(t)?u(s(e),t):function(n){var a=o(n,e);return void 0===a&&a===t?i(n,e):r(t,a,3)}}},1283:function(e,t,n){var r=n(1123);e.exports=function(e,t,n){var o=null==e?void 0:r(e,t);return void 0===o?n:o}},1284:function(e,t){e.exports=function(e,t){return null!=e&&t in Object(e)}},1285:function(e,t,n){var r=n(1200),o=n(1286),i=n(557),a=n(546);e.exports=function(e){return i(e)?r(a(e)):o(e)}},1286:function(e,t,n){var r=n(1123);e.exports=function(e){return function(t){return r(t,e)}}},1287:function(e,t){e.exports=function(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}},1288:function(e,t){e.exports=function(e,t,n,r,o){return o(e,(function(e,o,i){n=r?(r=!1,e):t(n,e,o,i)})),n}},1289:function(e,t,n){var r=n(560),o=n(544),i=n(542),a=n(1290),c=n(1291);e.exports=function(e){if(null==e)return 0;if(i(e))return a(e)?c(e):e.length;var t=o(e);return"[object Map]"==t||"[object Set]"==t?e.size:r(e).length}},1290:function(e,t,n){var r=n(180),o=n(177),i=n(198);e.exports=function(e){return"string"==typeof e||!o(e)&&i(e)&&"[object String]"==r(e)}},1291:function(e,t,n){var r=n(1292),o=n(1091),i=n(1293);e.exports=function(e){return o(e)?i(e):r(e)}},1292:function(e,t,n){var r=n(1200)("length");e.exports=r},1293:function(e,t){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",o="\\ud83c[\\udffb-\\udfff]",i="[^\\ud800-\\udfff]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",c="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+r+"|"+o+")"+"?",s="[\\ufe0e\\ufe0f]?"+u+("(?:\\u200d(?:"+[i,a,c].join("|")+")[\\ufe0e\\ufe0f]?"+u+")*"),l="(?:"+[i+r+"?",r,a,c,n].join("|")+")",f=RegExp(o+"(?="+o+")|"+l+s,"g");e.exports=function(e){for(var t=f.lastIndex=0;f.test(e);)++t;return t}},1294:function(e,t,n){var r=n(1138),o=n(1188),i=n(1143),a=n(1090),c=n(1121),u=n(177),s=n(545),l=n(351),f=n(178),d=n(547);e.exports=function(e,t,n){var p=u(e),h=p||s(e)||d(e);if(t=a(t,4),null==n){var v=e&&e.constructor;n=h?p?new v:[]:f(e)&&l(v)?o(c(e)):{}}return(h?r:i)(e,(function(e,r,o){return t(n,e,r,o)})),n}},1295:function(e,t,n){var r=n(1146),o=n(1124),i=n(1300),a=n(1207),c=o((function(e){return i(r(e,1,a,!0))}));e.exports=c},1296:function(e,t,n){var r=n(274),o=n(352),i=n(177),a=r?r.isConcatSpreadable:void 0;e.exports=function(e){return i(e)||o(e)||!!(a&&e&&e[a])}},1297:function(e,t){e.exports=function(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)}},1298:function(e,t,n){var r=n(1142),o=n(1176),i=n(1103),a=o?function(e,t){return o(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=a},1299:function(e,t){var n=Date.now;e.exports=function(e){var t=0,r=0;return function(){var o=n(),i=16-(o-r);if(r=o,i>0){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<f;){var g=e[s],m=t?t(g):g;if(g=n||0!==g?g:0,d&&m==m){for(var y=h.length;y--;)if(h[y]===m)continue e;t&&h.push(m),p.push(g)}else l(h,m,n)||(h!==p&&h.push(m),p.push(g))}return p}},1301:function(e,t,n){var r=n(1084);e.exports=function(e,t){return!!(null==e?0:e.length)&&r(e,t,0)>-1}},1302:function(e,t){e.exports=function(e,t,n){for(var r=-1,o=null==e?0:e.length;++r<o;)if(n(t,e[r]))return!0;return!1}},1303:function(e,t,n){var r=n(567),o=n(1304),i=n(1145),a=r&&1/i(new r([,-0]))[1]==1/0?function(e){return new r(e)}:o;e.exports=a},1304:function(e,t){e.exports=function(){}},1305:function(e,t,n){var r=n(552);e.exports=function(e,t){return r(t,(function(t){return e[t]}))}},1306:function(e,t){e.exports="2.1.8"},1307:function(e,t,n){var r=n(1078),o=n(1137);function i(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 a(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}))}e.exports={write:function(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:i(e),edges:a(e)};r.isUndefined(e.graph())||(t.value=r.clone(e.graph()));return t},read:function(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}}},1308:function(e,t,n){e.exports={components:n(1309),dijkstra:n(1209),dijkstraAll:n(1310),findCycles:n(1311),floydWarshall:n(1312),isAcyclic:n(1313),postorder:n(1314),preorder:n(1315),prim:n(1316),tarjan:n(1211),topsort:n(1212)}},1309:function(e,t,n){var r=n(1078);e.exports=function(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}},1310:function(e,t,n){var r=n(1209),o=n(1078);e.exports=function(e,t,n){return o.transform(e.nodes(),(function(o,i){o[i]=r(e,i,t,n)}),{})}},1311:function(e,t,n){var r=n(1078),o=n(1211);e.exports=function(e){return r.filter(o(e),(function(t){return t.length>1||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;c<a.distance&&(a.distance=c,a.predecessor=o.predecessor)}))}))})),r}(e,t||o,n||function(t){return e.outEdges(t)})};var o=r.constant(1)},1313:function(e,t,n){var r=n(1212);e.exports=function(e){try{r(e)}catch(e){if(e instanceof r.CycleException)return!1;throw e}return!0}},1314:function(e,t,n){var r=n(1213);e.exports=function(e,t){return r(e,t,"post")}},1315:function(e,t,n){var r=n(1213);e.exports=function(e,t){return r(e,t,"pre")}},1316:function(e,t,n){var r=n(1078),o=n(1137),i=n(1210);e.exports=function(e,t){var n,a=new o,c={},u=new i;function s(e){var r=e.v===n?e.w:e.v,o=u.priority(r);if(void 0!==o){var i=t(e);i<o&&(c[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);var l=!1;for(;u.size()>0;){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<r;)for(var l=t[n],f=a(l),d=-1,p=f.length;++d<p;){var h=f[d],v=e[h];(void 0===v||o(v,c[h])&&!u.call(e,h))&&(e[h]=l[h])}return e}));e.exports=s},1320:function(e,t,n){var r=n(1321)(n(1322));e.exports=r},1321:function(e,t,n){var r=n(1090),o=n(542),i=n(1098);e.exports=function(e){return function(t,n,a){var c=Object(t);if(!o(t)){var u=r(n,3);t=i(t),n=function(e){return u(c[e],e,c)}}var s=e(t,n,a);return s>-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);++r<i;){var u=n[r];u&&e(t,u,r,a)}return t}))}},1335:function(e,t,n){var r=n(1147),o=n(1218),i=n(1103);e.exports=function(e){return e&&e.length?r(e,i,o):void 0}},1336:function(e,t,n){var r=n(1147),o=n(1090),i=n(1218);e.exports=function(e,t){return e&&e.length?r(e,o(t,2),i):void 0}},1337:function(e,t,n){var r=n(1338),o=n(1341)((function(e,t){return null==e?{}:r(e,t)}));e.exports=o},1338:function(e,t,n){var r=n(1339),o=n(1199);e.exports=function(e,t){return r(e,t,(function(t,n){return o(e,n)}))}},1339:function(e,t,n){var r=n(1123),o=n(1340),i=n(549);e.exports=function(e,t,n){for(var a=-1,c=t.length,u={};++a<c;){var s=t[a],l=r(e,s);n(l,s)&&o(u,i(s,e),l)}return u}},1340:function(e,t,n){var r=n(1119),o=n(549),i=n(553),a=n(178),c=n(546);e.exports=function(e,t,n,u){if(!a(e))return e;for(var s=-1,l=(t=o(t,e)).length,f=l-1,d=e;null!=d&&++s<l;){var p=c(t[s]),h=n;if("__proto__"===p||"constructor"===p||"prototype"===p)return e;if(s!=f){var v=d[p];void 0===(h=u?u(v,p,d):void 0)&&(h=a(v)?v:i(t[s+1])?[]:{})}r(d,p,h),d=d[p]}return e}},1341:function(e,t,n){var r=n(1215),o=n(1205),i=n(1206);e.exports=function(e){return i(o(e,void 0,r),e+"")}},1342:function(e,t,n){var r=n(1343)();e.exports=r},1343:function(e,t,n){var r=n(1344),o=n(1125),i=n(1214);e.exports=function(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)}}},1344:function(e,t){var n=Math.ceil,r=Math.max;e.exports=function(e,t,o,i){for(var a=-1,c=r(n((t-e)/(o||1)),0),u=Array(c);c--;)u[i?c:++a]=e,e+=o;return u}},1345:function(e,t,n){var r=n(1146),o=n(1346),i=n(1124),a=n(1125),c=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),[])}));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<c;){var s=r(i[o],a[o]);if(s)return 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&&e<t||l&&n&&i&&!o&&!a||u&&n&&i||!c&&i||!s)return-1}return 0}},1350:function(e,t,n){var r=n(551),o=0;e.exports=function(e){var t=++o;return r(e)+t}},1351:function(e,t,n){var r=n(1119),o=n(1352);e.exports=function(e,t){return o(e||[],t||[],r)}},1352:function(e,t){e.exports=function(e,t,n){for(var r=-1,o=e.length,i=t.length,a={};++r<o;){var c=r<i?t[r]:void 0;n(a,e[r],c)}return a}},1353:function(e,t,n){"use strict";var r=n(1064),o=n(1354);e.exports={run:function(e){var t="greedy"===e.graph().acyclicer?o(e,function(e){return function(t){return e.edge(t).weight}}(e)):function(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}(e);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"))}))},undo:function(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)}}))}}},1354:function(e,t,n){var r=n(1064),o=n(1083).Graph,i=n(1355);e.exports=function(e,t){if(e.nodeCount()<=1)return[];var n=function(e,t){var n=new o,a=0,c=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),c=Math.max(c,n.node(e.v).out+=o),a=Math.max(a,n.node(e.w).in+=o)}));var s=r.range(c+a+3).map((function(){return new i})),l=a+1;return r.forEach(n.nodes(),(function(e){u(s,l,n.node(e))})),{graph:n,buckets:s,zeroIdx:l}}(e,t||a),s=function(e,t,n){var r,o=[],i=t[t.length-1],a=t[0];for(;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 u=t.length-2;u>0;--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;c<s;++i,++c)f.points=[],r={width:0,height:0,edgeLabel:f,edgeObj:t,rank:c},n=o.addDummyNode(e,"edge",r,"_d"),c===d&&(r.width=f.width,r.height=f.height,r.dummy="edge-label",r.labelpos=f.labelpos),e.setEdge(a,n,{weight:f.weight},l),0===i&&e.graph().dummyChains.push(n),a=n;e.setEdge(a,u,{weight:f.weight},l)}(e,t)}))},undo:function(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)}))}}},1357:function(e,t,n){"use strict";var r=n(1126).longestPath,o=n(1219),i=n(1358);e.exports=function(e){switch(e.graph().ranker){case"network-simplex":c(e);break;case"tight-tree":!function(e){r(e),o(e)}(e);break;case"longest-path":a(e);break;default:c(e)}};var a=r;function c(e){i(e)}},1358:function(e,t,n){"use strict";var r=n(1064),o=n(1219),i=n(1126).slack,a=n(1126).longestPath,c=n(1083).alg.preorder,u=n(1083).alg.postorder,s=n(1071).simplify;function l(e){e=s(e),a(e);var t,n=o(e);for(p(n),f(n,e);t=v(n);)m(n,e,t,g(n,e,t))}function f(e,t){var n=u(e,e.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(e,t,n){var r=e.node(n).parent;e.edge(n,r).cutvalue=d(e,t,n)}(e,t,n)}))}function d(e,t,n){var o=e.node(n).parent,i=!0,a=t.edge(n,o),c=0;return a||(i=!1,a=t.edge(o,n)),c=a.weight,r.forEach(t.nodeEdges(n),(function(r){var a,u,s=r.v===n,l=s?r.w:r.v;if(l!==o){var f=s===i,d=t.edge(r).weight;if(c+=f?d:-d,a=n,u=l,e.hasEdge(a,u)){var p=e.edge(n,l).cutvalue;c+=f?-p:p}}})),c}function p(e,t){arguments.length<2&&(t=e.nodes()[0]),h(e,{},1,t)}function h(e,t,n,o,i){var a=n,c=e.node(o);return t[o]=!0,r.forEach(e.neighbors(o),(function(i){r.has(t,i)||(n=h(e,t,n,i,o))})),c.low=a,c.lim=n++,i?c.parent=i:delete c.parent,n}function v(e){return r.find(e.edges(),(function(t){return e.edge(t).cutvalue<0}))}function g(e,t,n){var o=n.v,a=n.w;t.hasEdge(o,a)||(o=n.w,a=n.v);var c=e.node(o),u=e.node(a),s=c,l=!1;c.lim>u.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<r.rank;)u++;s===c&&(l=!1)}if(!l){for(;u<a.length-1&&e.node(s=a[u+1]).minRank<=r.rank;)u++;s=a[u]}e.setParent(n,s),n=e.successors(n)[0]}}))}},1360:function(e,t,n){var r=n(1064),o=n(1071);e.exports={run:function(e){var t=o.addDummyNode(e,"root",{},"_root"),n=function(e){var t={};return r.forEach(e.children(),(function(n){!function n(o,i){var a=e.children(o);a&&a.length&&r.forEach(a,(function(e){n(e,i+1)}));t[o]=i}(n,1)})),t}(e),i=r.max(r.values(n))-1,a=2*i+1;e.graph().nestingRoot=t,r.forEach(e.edges(),(function(t){e.edge(t).minlen*=a}));var c=function(e){return r.reduce(e.edges(),(function(t,n){return t+e.edge(n).weight}),0)}(e)+1;r.forEach(e.children(),(function(u){!function e(t,n,i,a,c,u,s){var l=t.children(s);if(!l.length)return void(s!==n&&t.setEdge(n,s,{weight:0,minlen:i}));var f=o.addBorderNode(t,"_bt"),d=o.addBorderNode(t,"_bb"),p=t.node(s);t.setParent(f,s),p.borderTop=f,t.setParent(d,s),p.borderBottom=d,r.forEach(l,(function(r){e(t,n,i,a,c,u,r);var o=t.node(r),l=o.borderTop?o.borderTop:r,p=o.borderBottom?o.borderBottom:r,h=o.borderTop?a:2*a,v=l!==p?1:c-u[s]+1;t.setEdge(f,l,{weight:h,minlen:v,nestingEdge:!0}),t.setEdge(p,d,{weight:h,minlen:v,nestingEdge:!0})})),t.parent(s)||t.setEdge(n,f,{weight:0,minlen:c+u[s]})}(e,t,a,c,i,n,u)})),e.graph().nodeRankFactor=a},cleanup:function(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)}))}}},1361:function(e,t,n){var r=n(1064),o=n(1071);function i(e,t,n,r,i,a){var c={width:0,height:0,rank:a,borderType:t},u=i[t][a-1],s=o.addDummyNode(e,"border",c,n);i[t][a]=s,e.setParent(s,r),u&&e.setEdge(u,s,{weight:1})}e.exports=function(e){r.forEach(e.children(),(function t(n){var o=e.children(n),a=e.node(n);if(o.length&&r.forEach(o,t),r.has(a,"minRank")){a.borderLeft=[],a.borderRight=[];for(var c=a.minRank,u=a.maxRank+1;c<u;++c)i(e,"borderLeft","_bl",n,a,c),i(e,"borderRight","_br",n,a,c)}}))}},1362:function(e,t,n){"use strict";var r=n(1064);function o(e){r.forEach(e.nodes(),(function(t){i(e.node(t))})),r.forEach(e.edges(),(function(t){i(e.edge(t))}))}function i(e){var t=e.width;e.width=e.height,e.height=t}function a(e){e.y=-e.y}function c(e){var t=e.x;e.x=e.y,e.y=t}e.exports={adjust:function(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||o(e)},undo:function(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||function(e){r.forEach(e.nodes(),(function(t){a(e.node(t))})),r.forEach(e.edges(),(function(t){var n=e.edge(t);r.forEach(n.points,a),r.has(n,"y")&&a(n)}))}(e);"lr"!==t&&"rl"!==t||(!function(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,"x")&&c(n)}))}(e),o(e))}}},1363:function(e,t,n){"use strict";var r=n(1064),o=n(1364),i=n(1365),a=n(1366),c=n(1370),u=n(1371),s=n(1083).Graph,l=n(1071);function f(e,t,n){return r.map(t,(function(t){return c(e,t,n)}))}function d(e,t){var n=new s;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}))}))}e.exports=function(e){var t=l.maxRank(e),n=f(e,r.range(1,t+1),"inEdges"),a=f(e,r.range(t-1,-1,-1),"outEdges"),c=o(e);p(e,c);for(var u,s=Number.POSITIVE_INFINITY,h=0,v=0;v<4;++h,++v){d(h%2?n:a,h%4>=2),c=l.buildLayerMatrix(e);var g=i(e,c);g<s&&(v=0,u=r.cloneDeep(c),s=g)}p(e,u)}},1364:function(e,t,n){"use strict";var r=n(1064);e.exports=function(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[]}));var a=r.sortBy(n,(function(t){return e.node(t).rank}));return r.forEach(a,(function n(o){if(r.has(t,o))return;t[o]=!0;var a=e.node(o);i[a.rank].push(o),r.forEach(e.successors(o),n)})),i}},1365:function(e,t,n){"use strict";var r=n(1064);function o(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 c=2*a-1;a-=1;var u=r.map(new Array(c),(function(){return 0})),s=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;s+=e.weight*n}))),s}e.exports=function(e,t){for(var n=0,r=1;r<t.length;++r)n+=o(e,t[r-1],t[r]);return n}},1366:function(e,t,n){var r=n(1064),o=n(1367),i=n(1368),a=n(1369);e.exports=function e(t,n,c,u){var s=t.children(n),l=t.node(n),f=l?l.borderLeft:void 0,d=l?l.borderRight:void 0,p={};f&&(s=r.filter(s,(function(e){return e!==f&&e!==d})));var h=o(t,s);r.forEach(h,(function(n){if(t.children(n.v).length){var o=e(t,n.v,c,u);p[n.v]=o,r.has(o,"barycenter")&&(i=n,a=o,r.isUndefined(i.barycenter)?(i.barycenter=a.barycenter,i.weight=a.weight):(i.barycenter=(i.barycenter*i.weight+a.barycenter*a.weight)/(i.weight+a.weight),i.weight+=a.weight))}var i,a}));var v=i(h,c);!function(e,t){r.forEach(e,(function(e){e.vs=r.flatten(e.vs.map((function(e){return t[e]?t[e].vs:e})),!0)}))}(v,p);var g=a(v,u);if(f&&(g.vs=r.flatten([f,g.vs,d],!0),t.predecessors(f).length)){var m=t.node(t.predecessors(f)[0]),y=t.node(t.predecessors(d)[0]);r.has(g,"barycenter")||(g.barycenter=0,g.weight=0),g.barycenter=(g.barycenter*g.weight+m.order+y.order)/(g.weight+2),g.weight+=2}return g}},1367:function(e,t,n){var r=n(1064);e.exports=function(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}}))}},1368:function(e,t,n){"use strict";var r=n(1064);e.exports=function(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]))})),function(e){var t=[];function n(e){return function(t){t.merged||(r.isUndefined(t.barycenter)||r.isUndefined(e.barycenter)||t.barycenter>=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.barycenter<t.barycenter?-1:e.barycenter>t.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;!(a<i||d<a)||o.dummy&&e.node(t).dummy||u(n,r,t)}))})),a=l+1,i=d)})),o})),n}function c(e,t){var n={};function o(t,o,i,a,c){var s;r.forEach(r.range(o,i),(function(o){s=t[o],e.node(s).dummy&&r.forEach(e.predecessors(s),(function(t){var r=e.node(t);r.dummy&&(r.order<a||r.order>c)&&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<c[p]&&!s(n,e,p)&&(a[p]=e,a[e]=i[e]=i[p],t=c[p])}}))})),{root:i,align:a}}function f(e,t,n,i,a){var c={},u=function(e,t,n,i){var a=new o,c=e.graph(),u=function(e,t,n){return function(o,i,a){var c,u=o.node(i),s=o.node(a),l=0;if(l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":c=-u.width/2;break;case"r":c=u.width/2}if(c&&(l+=n?c:-c),c=0,l+=(u.dummy?t:e)/2,l+=(s.dummy?t:e)/2,l+=s.width/2,r.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":c=s.width/2;break;case"r":c=-s.width/2}return c&&(l+=n?c:-c),c=0,l}}(c.nodesep,c.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],c=a.edge(i,r);a.setEdge(i,r,Math.max(u(e,t,o),c||0))}o=t}))})),a}(e,t,n,a),s=a?"borderLeft":"borderRight";function l(e,t){for(var n=u.nodes(),r=n.pop(),o={};r;)o[r]?e(r):(o[r]=!0,n.push(r),n=n.concat(t(r))),r=n.pop()}return l((function(e){c[e]=u.inEdges(e).reduce((function(e,t){return Math.max(e,c[t.v]+u.edge(t))}),0)}),u.predecessors.bind(u)),l((function(t){var n=u.outEdges(t).reduce((function(e,t){return Math.min(e,c[t.w]-u.edge(t))}),Number.POSITIVE_INFINITY),r=e.node(t);n!==Number.POSITIVE_INFINITY&&r.borderType!==s&&(c[t]=Math.max(c[t],n))}),u.successors.bind(u)),r.forEach(i,(function(e){c[e]=c[n[e]]})),c}function d(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=function(e,t){return e.node(t).width}(e,r)/2;n=Math.max(t+i,n),o=Math.min(t-i,o)})),n-o}))}function p(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 c,u=n+a,s=e[u];if(s!==t){var l=r.values(s);(c="l"===a?o-r.min(l):i-r.max(l))&&(e[u]=r.mapValues(s,(function(e){return e+c})))}}))}))}function h(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}))}e.exports={positionX:function(e){var t,n=i.buildLayerMatrix(e),o=r.merge(a(e,n),c(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),c=l(e,t,o,a),s=f(e,t,c.root,c.align,"r"===n);"r"===n&&(s=r.mapValues(s,(function(e){return-e}))),u[i+n]=s}))}));var s=d(e,u);return p(u,s),h(u,e.graph().align)},findType1Conflicts:a,findType2Conflicts:c,addConflict:u,hasConflict:s,verticalAlignment:l,horizontalCompaction:f,alignCoordinates:p,findSmallestWidthAlignment:d,balance:h}},1374:function(e,t,n){var r=n(1064),o=n(1071),i=n(1083).Graph;e.exports={debugOrdering:function(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}}},1375:function(e,t){e.exports="0.8.5"}}]); |