PageSourceSearch

https://reactflow.dev/_next/static/chunks/071h.kamtb7jm.js

js reactflow.dev collected 2026-10-02 02:32:03 UTC 97,890 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,732331,8164,692423,954542,542550,145850,746658,183502,603760,250149,678152,t=>{"use strict";t.i(335884);var e,n,r,i,o,a,u,s,l,c,h,f,d,p,y,g={value:()=>{}};function m(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw Error("illegal type: "+t);r[t]=[]}return new x(r)}function x(t){this._=t}function v(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=g,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}function w(){}function _(t){return null==t?w:function(){return this.querySelector(t)}}function b(){return[]}function M(t){return null==t?b:function(){return this.querySelectorAll(t)}}function E(t){return function(){return this.matches(t)}}function $(t){return function(e){return e.matches(t)}}x.prototype=m.prototype={constructor:x,on:function(t,e){var n,r=this._,i=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!r.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,a=i.length;if(arguments.length<2){for(;++o<a;)if((n=(t=i[o]).type)&&(n=function(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}(r[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=i[o]).type)r[n]=v(r[n],t.name,e);else if(null==e)for(n in r)r[n]=v(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new x(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=Array(n),o=0;o<n;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(r=this._[t],o=0,n=r.length;o<n;++o)r[o].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(e,n)}},t.s(["dispatch",0,m],8164);var A=Array.prototype.find;function k(){return this.firstElementChild}var z=Array.prototype.filter;function N(){return Array.from(this.children)}function P(t){return Array(t.length)}function T(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function I(t,e,n,r,i,o){for(var a,u=0,s=e.length,l=o.length;u<l;++u)(a=e[u])?(a.__data__=o[u],r[u]=a):n[u]=new T(t,o[u]);for(;u<s;++u)(a=e[u])&&(i[u]=a)}function S(t,e,n,r,i,o,a){var u,s,l,c=new Map,h=e.length,f=o.length,d=Array(h);for(u=0;u<h;++u)(s=e[u])&&(d[u]=l=a.call(s,s.__data__,u,e)+"",c.has(l)?i[u]=s:c.set(l,s));for(u=0;u<f;++u)l=a.call(t,o[u],u,o)+"",(s=c.get(l))?(r[u]=s,s.__data__=o[u],c.delete(l)):n[u]=new T(t,o[u]);for(u=0;u<h;++u)(s=e[u])&&c.get(d[u])===s&&(i[u]=s)}function H(t){return t.__data__}function B(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}T.prototype={constructor:T,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};var C="http://www.w3.org/1999/xhtml";let R={svg:"http://www.w3.org/2000/svg",xhtml:C,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function L(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),R.hasOwnProperty(e)?{space:R[e],local:t}:t}function D(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function X(t,e){return t.style.getPropertyValue(e)||D(t).getComputedStyle(t,null).getPropertyValue(e)}function O(t){return t.trim().split(/^|\s+/)}function Y(t){return t.classList||new V(t)}function V(t){this._node=t,this._names=O(t.getAttribute("class")||"")}function q(t,e){for(var n=Y(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function j(t,e){for(var n=Y(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function F(){this.textContent=""}function K(){this.innerHTML=""}function U(){this.nextSibling&&this.parentNode.appendChild(this)}function W(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Z(t){var e=L(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===C&&e.documentElement.namespaceURI===C?e.createElement(t):e.createElementNS(n,t)}})(e)}function G(){return null}function Q(){var t=this.parentNode;t&&t.removeChild(this)}function J(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function tt(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function te(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,o=e.length;r<o;++r)(n=e[r],t.type&&n.type!==t.type||n.name!==t.name)?e[++i]=n:this.removeEventListener(n.type,n.listener,n.options);++i?e.length=i:delete this.__on}}}function tn(t,e,n){return function(){var r,i=this.__on,o=function(t){e.call(this,t,this.__data__)};if(i){for(var a=0,u=i.length;a<u;++a)if((r=i[a]).type===t.type&&r.name===t.name){this.removeEventListener(r.type,r.listener,r.options),this.addEventListener(r.type,r.listener=o,r.options=n),r.value=e;return}}this.addEventListener(t.type,o,n),r={type:t.type,name:t.name,value:e,listener:o,options:n},i?i.push(r):this.__on=[r]}}function tr(t,e,n){var r=D(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dis
1patchEvent(i)}V.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var ti=[null];function to(t,e){this._groups=t,this._parents=e}function ta(){return new to([[document.documentElement]],ti)}function tu(t){return"string"==typeof t?new to([[document.querySelector(t)]],[document.documentElement]):new to([[t]],ti)}function ts(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}to.prototype=ta.prototype={constructor:to,select:function(t){"function"!=typeof t&&(t=_(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a,u=e[i],s=u.length,l=r[i]=Array(s),c=0;c<s;++c)(o=u[c])&&(a=t.call(o,o.__data__,c,u))&&("__data__"in o&&(a.__data__=o.__data__),l[c]=a);return new to(r,this._parents)},selectAll:function(t){if("function"==typeof t){var e;e=t,t=function(){var t;return t=e.apply(this,arguments),null==t?[]:Array.isArray(t)?t:Array.from(t)}}else t=M(t);for(var n=this._groups,r=n.length,i=[],o=[],a=0;a<r;++a)for(var u,s=n[a],l=s.length,c=0;c<l;++c)(u=s[c])&&(i.push(t.call(u,u.__data__,c,s)),o.push(u));return new to(i,o)},selectChild:function(t){var e;return this.select(null==t?k:(e="function"==typeof t?t:$(t),function(){return A.call(this.children,e)}))},selectChildren:function(t){var e;return this.selectAll(null==t?N:(e="function"==typeof t?t:$(t),function(){return z.call(this.children,e)}))},filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new to(r,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,H);var n=e?S:I,r=this._parents,i=this._groups;"function"!=typeof t&&(x=t,t=function(){return x});for(var o=i.length,a=Array(o),u=Array(o),s=Array(o),l=0;l<o;++l){var c=r[l],h=i[l],f=h.length,d="object"==typeof(m=t.call(c,c&&c.__data__,l,r))&&"length"in m?m:Array.from(m),p=d.length,y=u[l]=Array(p),g=a[l]=Array(p);n(c,h,y,g,s[l]=Array(f),d,e);for(var m,x,v,w,_=0,b=0;_<p;++_)if(v=y[_]){for(_>=b&&(b=_+1);!(w=g[b])&&++b<p;);v._next=w||null}}return(a=new to(a,r))._enter=u,a._exit=s,a},enter:function(){return new to(this._enter||this._groups.map(P),this._parents)},exit:function(){return new to(this._exit||this._groups.map(P),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,o=this.exit();return"function"==typeof t?(r=t(r))&&(r=r.selection()):r=r.append(t+""),null!=e&&(i=e(i))&&(i=i.selection()),null==n?o.remove():n(o),r&&i?r.merge(i).order():i},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,r=e._groups,i=n.length,o=r.length,a=Math.min(i,o),u=Array(i),s=0;s<a;++s)for(var l,c=n[s],h=r[s],f=c.length,d=u[s]=Array(f),p=0;p<f;++p)(l=c[p]||h[p])&&(d[p]=l);for(;s<i;++s)u[s]=n[s];return new to(u,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],o=i.length-1,a=i[o];--o>=0;)(r=i[o])&&(a&&4^r.compareDocumentPosition(a)&&a.parentNode.insertBefore(r,a),a=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=B);for(var n=this._groups,r=n.length,i=Array(r),o=0;o<r;++o){for(var a,u=n[o],s=u.length,l=i[o]=Array(s),c=0;c<s;++c)(a=u[c])&&(l[c]=a);l.sort(e)}return new to(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,o=r.length;i<o;++i){var a=r[i];if(a)return a}return null},size:function(){let t=0;for(let e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,o=e[n],a=0,u=o.length;a<u;++a)(i=o[a])&&t.call(i,i.__data__,a,o);return this},attr:function(t,e){var n=L(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,null==n?"":n)):X(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=O(t+"");
1if(arguments.length<2){for(var r=Y(this.node()),i=-1,o=n.length;++i<o;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?q:j)(this,t)}}:e?function(t){return function(){q(this,t)}}:function(t){return function(){j(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?F:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?K:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(U)},lower:function(){return this.each(W)},append:function(t){var e="function"==typeof t?t:Z(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:Z(t),r=null==e?G:"function"==typeof e?e:_(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})},remove:function(){return this.each(Q)},clone:function(t){return this.select(t?tt:J)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}),a=o.length;if(arguments.length<2){var u=this.node().__on;if(u){for(var s,l=0,c=u.length;l<c;++l)for(r=0,s=u[l];r<a;++r)if((i=o[r]).type===s.type&&i.name===s.name)return s.value}return}for(r=0,u=e?tn:te;r<a;++r)this.each(u(o[r],e,n));return this},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return tr(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return tr(this,t,e)}})(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r,i=t[e],o=0,a=i.length;o<a;++o)(r=i[o])&&(yield r)}},t.s(["select",0,tu],692423),t.s(["pointer",0,ts],954542);let tl={passive:!1},tc={capture:!0,passive:!1};function th(t){t.stopImmediatePropagation()}function tf(t){t.preventDefault(),t.stopImmediatePropagation()}function td(t){var e=t.document.documentElement,n=tu(t).on("dragstart.drag",tf,tc);"onselectstart"in e?n.on("selectstart.drag",tf,tc):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function tp(t,e){var n=t.document.documentElement,r=tu(t).on("dragstart.drag",null);e&&(r.on("click.drag",tf,tc),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}let ty=t=>()=>t;function tg(t,{sourceEvent:e,subject:n,target:r,identifier:i,active:o,x:a,y:u,dx:s,dy:l,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:u,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:l,enumerable:!0,configurable:!0},_:{value:c}})}function tm(t){return!t.ctrlKey&&!t.button}function tx(){return this.parentNode}function tv(t,e){return null==e?{x:t.x,y:t.y}:e}function tw(){return navigator.maxTouchPoints||"ontouchstart"in this}function t_(){var t,e,n,r,i=tm,o=tx,a=tv,u=tw,s={},l=m("start","drag","end"),c=0,h=0;function f(t){t.on("mousedown.drag",d).filter(u).on("touchstart.drag",g).on("touchmove.drag",x,tl).on("touchend.drag touchcancel.drag",v).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(a,u){if(!r&&i.call(this,a,u)){var s=w(this,o.call(this,a,u),a,u,"mouse");s&&(tu(a.view).on("mousemove.drag",p,tc).on("mouseup.drag",y,tc),td(a.view),th(a),n=!1,t=a.clientX,e=a.clientY,s("start",a))}}function p(r){if(tf(r),!n){var i=r.clientX-t,o=r.clientY-e;n=i*i+o*o>h}s.mouse("drag",r)}function y(t){tu(t.view).on("mousemove.drag mouseup.drag",null),tp(t.view,n),tf(t),s.mouse("end",t)}function g(t,e){if(i.call(this,t,e)){var n,r,a=t.changedTouches,u=o.call(this,t,e),s=a.length;for(n=0;n<s;++n)(r=w(this,u,t,e,a[n].identifier,a[n]))&&(th(t),r("start",t,a[n]))}}function x(t){var e,n,r=t.changedTouches,i=r.length;for(e=0;e<i;++e)(n=s[r[e].identifier])&&(tf(t),n("drag",t,r[e]))}function v(t){var e,n,i=t.changedTouches,o=i.length;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),e=0;e<o;++e)(n=s[i[e].identifier])&&(th(t),n("end",t,i[e]))}function w(t,e,n,r,i,o){var u,h,d,p=l.copy(),y=ts(o||n,e);if(null!=(d=a.call(t,new tg("beforestart",{sourceEvent:n,target:f,identifier:i,active:c,x:y[0],y:y[1],dx:0,dy:0,dispatch:p}),r)))return u=d.x-y[0]||0,h=d.y-y[1]||0,function n(o,a,l){var g,m=y;switch(o){case"start":s[i]=n,g=c++;break;case"end":delete s[i],--c;case"drag":y=ts(l||a,e),g=c}p.call(o,t,new tg(o,{sourceEvent:a,subject:d,target:f,identifier:i,active:g,x:y[0]+u,y:y[1]+h,dx:y[0]-m[0],dy:y[1]-m[1],dispatch:p}),r)}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:ty(!!t),f):i},f.container=function(t){return arguments.length?(o="function"==typeof t?t:ty(t),f):o},f.subject=function(t){return arguments.length?(a="function"==typeof t?t:ty(t),f):a},f.touchable=function(t){return arguments.length?(u="function"==typeof t?t:ty(!!t),f):u},f.on=function(){var t=l.on.apply(l,arguments);return t===l?f:t},f.clickDistance=function(t){return arguments.length?(h=(t*=1)*t,f):Math.sqrt(h)},f}function tb(t){return((t=Math.exp(t))+1/t)/2}tg.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t},t.s(["dragDisable",0,td],542550),t.s(["dragEnable",0,tp],145850);let tM=function t(e,n,r){function i(t,i){var o,a,u=t[0],s=t[1],l=t[2],c=i[0],h=i[1],f=i[2],d=c-u,p=h-s,y=d*d+p*p;if(y<1e-12)a=Math.log(f/l)/e,o=function(t){return[u+t*d,s+t*p,l*Math.exp(e*t*a)]};else{var g=Math.sqrt(y),m=(f*f-l*l+r*y)/(2*l*n*g),x=(f*f-l*l-r*y)/(2*f*n*g),v=Math.log(Math.sqrt(m*m+1)-m);a=(Math.log(Math.sqrt(x*x+1)-x)-v)/e,o=function(t){var r,i,o=t*a,c=tb(v),h=l/(n*g)*(c*(((r=Math.exp(2*(r=e*o+v)))-1)/(r+1))-((i=Math.exp(i=v))-1/i)/2);return[u+h*d,s+h*p,l*c/tb(e*o+v)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return i.rho=function(e){var n=Math.max(.001,+e),r=n*n;return t(n,r,r*r)},i}(Math.SQRT2,2,4);var tE,t$,tA=0,tk=0,tz=0,tN=0,tP=0,tT=0,tI="object"==typeof performance&&performance.now?performance:Date,tS="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function tH(){return tP||(tS(tB),tP=tI.now()+tT)}function tB(){tP=0}function tC(){this._call=this._time=this._next=null}function tR(t,e,n){var r=new tC;return r.restart(t,e,n),r}function tL(){tP=(tN=tI.now())+tT,tA=tk=0;
1try{tH(),++tA;for(var t,e=tE;e;)(t=tP-e._time)>=0&&e._call.call(void 0,t),e=e._next;--tA}finally{tA=0,function(){for(var t,e,n=tE,r=1/0;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:tE=e);t$=t,tX(r)}(),tP=0}}function tD(){var t=tI.now(),e=t-tN;e>1e3&&(tT-=e,tN=t)}function tX(t){!tA&&(tk&&(tk=clearTimeout(tk)),t-tP>24?(t<1/0&&(tk=setTimeout(tL,t-tI.now()-tT)),tz&&(tz=clearInterval(tz))):(tz||(tN=tI.now(),tz=setInterval(tD,1e3)),tA=1,tS(tL)))}function tO(t,e,n){var r=new tC;return e=null==e?0:+e,r.restart(n=>{r.stop(),t(n+e)},e,n),r}tC.prototype=tR.prototype={constructor:tC,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?tH():+n)+(null==e?0:+e),this._next||t$===this||(t$?t$._next=this:tE=this,t$=this),this._call=t,this._time=n,tX()},stop:function(){this._call&&(this._call=null,this._time=1/0,tX())}};var tY=m("start","end","cancel","interrupt"),tV=[];function tq(t,e,n,r,i,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function o(s){var l,c,h,f;if(1!==n.state)return u();for(l in i)if((f=i[l]).name===n.name){if(3===f.state)return tO(o);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[l]):+l<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[l])}if(tO(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(s))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(l=0,n.state=3,r=Array(h=n.tween.length),c=-1;l<h;++l)(f=n.tween[l].value.call(t,t.__data__,n.index,n.group))&&(r[++c]=f);r.length=c+1}}function a(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(u),n.state=5,1),o=-1,a=r.length;++o<a;)r[o].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),u())}function u(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=tR(function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:r,group:i,on:tY,tween:tV,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function tj(t,e){var n=tK(t,e);if(n.state>0)throw Error("too late; already scheduled");return n}function tF(t,e){var n=tK(t,e);if(n.state>3)throw Error("too late; already running");return n}function tK(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw Error("transition not found");return n}function tU(t,e){var n,r,i,o=t.__transition,a=!0;if(o){for(i in e=null==e?null:e+"",o){if((n=o[i]).name!==e){a=!1;continue}r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[i]}a&&delete t.__transition}}function tW(t,e){return t*=1,e*=1,function(n){return t*(1-n)+e*n}}var tZ=180/Math.PI,tG={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function tQ(t,e,n,r,i,o){var a,u,s;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(s=t*n+e*r)&&(n-=t*s,r-=e*s),(u=Math.sqrt(n*n+r*r))&&(n/=u,r/=u,s/=u),t*r<e*n&&(t=-t,e=-e,s=-s,a=-a),{translateX:i,translateY:o,rotate:Math.atan2(e,t)*tZ,skewX:Math.atan(s)*tZ,scaleX:a,scaleY:u}}function tJ(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(o,a){var u,s,l,c,h=[],f=[];return o=t(o),a=t(a),!function(t,r,i,o,a,u){if(t!==i||r!==o){var s=a.push("translate(",null,e,null,n);u.push({i:s-4,x:tW(t,i)},{i:s-2,x:tW(r,o)})}else(i||o)&&a.push("translate("+i+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,h,f),u=o.rotate,s=a.rotate,u!==s?(u-s>180?s+=360:s-u>180&&(u+=360),f.push({i:h.push(i(h)+"rotate(",null,r)-2,x:tW(u,s)})):s&&h.push(i(h)+"rotate("+s+r),l=o.skewX,c=a.skewX,l!==c?f.push({i:h.push(i(h)+"skewX(",null,r)-2,x:tW(l,c)}):c&&h.push(i(h)+"skewX("+c+r),!function(t,e,n,r,o,a){if(t!==n||e!==r){var u=o.push(i(o)+"scale(",null,",",null,")");a.push({i:u-4,x:tW(t,n)},{i:u-2,x:tW(e,r)})}else(1!==n||1!==r)&&o.push(i(o)+"scale("+n+","+r+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,h,f),o=a=null,function(t){for(var e,n=-1,r=f.length;++n<r;)h[(e=f[n]).i]=e.x(t);return h.join("")}}}var t0=tJ(function(t){let e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?tG:tQ(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),t1=tJ(function(t){return null==t?tG:(s||(s=document.createElementNS("http://www.w3.org/2000/svg","g")),s.setAttribute("transform",t),t=s.transform.baseVal.consolidate())?tQ((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):tG},", ",")",")");function t2(t,e,n){var r=t._id;return t.each(function(){var t=tF(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return tK(t,r).value[e]}}function t5(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function t3(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function t4(){}var t8="\\s*([+-]?\\d+)\\s*",t6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",t9="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",t7=/^#([0-9a-f]{3,8})$/,et=RegExp(`^rgb\\(${t8},${t8},${t8}\\)$`),ee=RegExp(`^rgb\\(${t9},${t9},${t9}\\)$`),en=RegExp(`^rgba\\(${t8},${t8},${t8},${t6}\\)$`),er=RegExp(`^rgba\\(${t9},${t9},${t9},${t6}\\)$`),ei=RegExp(`^hsl\\(${t6},${t9},${t9}\\)$`),eo=RegExp(`^hsla\\(${t6},${t9},${t9},${t6}\\)$`),ea={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function eu(){return this.rgb().formatHex()}function es(){return this.rgb().formatRgb()}function el(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=t7.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?ec(e):3===n?
1new ed(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?eh(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?eh(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=et.exec(t))?new ed(e[1],e[2],e[3],1):(e=ee.exec(t))?new ed(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=en.exec(t))?eh(e[1],e[2],e[3],e[4]):(e=er.exec(t))?eh(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ei.exec(t))?ev(e[1],e[2]/100,e[3]/100,1):(e=eo.exec(t))?ev(e[1],e[2]/100,e[3]/100,e[4]):ea.hasOwnProperty(t)?ec(ea[t]):"transparent"===t?new ed(NaN,NaN,NaN,0):null}function ec(t){return new ed(t>>16&255,t>>8&255,255&t,1)}function eh(t,e,n,r){return r<=0&&(t=e=n=NaN),new ed(t,e,n,r)}function ef(t,e,n,r){var i;return 1==arguments.length?((i=t)instanceof t4||(i=el(i)),i)?new ed((i=i.rgb()).r,i.g,i.b,i.opacity):new ed:new ed(t,e,n,null==r?1:r)}function ed(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function ep(){return`#${ex(this.r)}${ex(this.g)}${ex(this.b)}`}function ey(){let t=eg(this.opacity);return`${1===t?"rgb(":"rgba("}${em(this.r)}, ${em(this.g)}, ${em(this.b)}${1===t?")":`, ${t})`}`}function eg(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function em(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ex(t){return((t=em(t))<16?"0":"")+t.toString(16)}function ev(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new e_(t,e,n,r)}function ew(t){if(t instanceof e_)return new e_(t.h,t.s,t.l,t.opacity);if(t instanceof t4||(t=el(t)),!t)return new e_;if(t instanceof e_)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),o=Math.max(e,n,r),a=NaN,u=o-i,s=(o+i)/2;return u?(a=e===o?(n-r)/u+(n<r)*6:n===o?(r-e)/u+2:(e-n)/u+4,u/=s<.5?o+i:2-o-i,a*=60):u=s>0&&s<1?0:a,new e_(a,u,s,t.opacity)}function e_(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function eb(t){return(t=(t||0)%360)<0?t+360:t}function eM(t){return Math.max(0,Math.min(1,t||0))}function eE(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}function e$(t,e,n,r,i){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*n+(1+3*t+3*o-3*a)*r+a*i)/6}t5(t4,el,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:eu,formatHex:eu,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return ew(this).formatHsl()},formatRgb:es,toString:es}),t5(ed,ef,t3(t4,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new ed(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new ed(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new ed(em(this.r),em(this.g),em(this.b),eg(this.opacity))},displayable(){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:ep,formatHex:ep,formatHex8:function(){return`#${ex(this.r)}${ex(this.g)}${ex(this.b)}${ex((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:ey,toString:ey})),t5(e_,function(t,e,n,r){return 1==arguments.length?ew(t):new e_(t,e,n,null==r?1:r)},t3(t4,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new e_(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new e_(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new ed(eE(t>=240?t-240:t+120,i,r),eE(t,i,r),eE(t<120?t+240:t-120,i,r),this.opacity)},clamp(){return new e_(eb(this.h),eM(this.s),eM(this.l),eg(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=eg(this.opacity);return`${1===t?"hsl(":"hsla("}${eb(this.h)}, ${100*eM(this.s)}%, ${100*eM(this.l)}%${1===t?")":`, ${t})`}`}})),t.s(["interpolateNumber",0,tW],746658);let eA=t=>()=>t;function ek(t,e){var n=e-t;return n?function(e){return t+e*n}:eA(isNaN(t)?e:t)}let ez=function t(e){var n,r=1==(n=+e)?ek:function(t,e){var r,i,o;return e-t?(r=t,i=e,r=Math.pow(r,o=n),i=Math.pow(i,o)-r,o=1/o,function(t){return Math.pow(r+t*i,o)}):eA(isNaN(t)?e:t)};function i(t,e){var n=r((t=ef(t)).r,(e=ef(e)).r),i=r(t.g,e.g),o=r(t.b,e.b),a=ek(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=i(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function eN(t){return function(e){var n,r,i=e.length,o=Array(i),a=Array(i),u=Array(i);for(n=0;n<i;++n)r=ef(e[n]),o[n]=r.r||0,a[n]=r.g||0,u[n]=r.b||0;return o=t(o),a=t(a),u=t(u),r.opacity=1,function(t){return r.r=o(t),r.g=a(t),r.b=u(t),r+""}}}eN(function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],o=t[r+1],a=r>0?t[r-1]:2*i-o,u=r<e-1?t[r+2]:2*o-i;return e$((n-r/e)*e,a,i,o,u)}}),eN(function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],o=t[r%e],a=t[(r+1)%e],u=t[(r+2)%e];return e$((n-r/e)*e,i,o,a,u)}});var eP=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,eT=RegExp(eP.source,"g");function eI(t,e){var n,r,i,o,a,u=eP.lastIndex=eT.lastIndex=0,s=-1,l=[],c=[];for(t+="",e+="";(i=eP.exec(t))&&(o=eT.exec(e));)(a=o.index)>u&&(a=e.slice(u,a),l[s]?l[s]+=a:l[++s]=a),(i=i[0])===(o=o[0])?l[s]?l[s]+=o:l[++s]=o:(l[++s]=null,c.push({i:s,x:tW(i,o)})),u=eT.lastIndex;return u<e.length&&(a=e.slice(u),l[s]?l[s]+=a:l[++s]=a),l.length<2?c[0]?(n=c[0].x,function(t){return n(t)+""}):(r=e,function(){return r}):(e=c.length,function(t){for(var n,r=0;r<e;++r)l[(n=c[r]).i]=n.x(t);return l.join("")})}function eS(t,e){var n;return("number"==typeof e?tW:e instanceof el?ez:(n=el(e))?(e=n,ez):eI)(t,e)}var eH=ta.prototype.constructor;function eB(t){return function(){this.style.removeProperty(t)}}var eC=0;function eR(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}var eL=ta.prototype;eR.prototype=(function(t){return ta().transition(t)}).prototype={constructor:eR,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=_(t));for(var r=this._groups,i=r.length,o=Array(i),a=0;a<i;++a)for(var u,s,l=r[a],c=l.length,h=o[a]=Array(c),f=0;f<c;++f)(u=l[f])&&(s=t.call(u,u.__data__,f,l))&&("__data__"in u&&(s.__data__=u.__data__),h[f]=s,tq(h[f],e,n,f,h,tK(u,n)));return new eR(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=M(t));for(var r=this._groups,i=r.length,o=[],a=[],u=0;u<i;++u)for(var s,l=r[u],c=l.length,h=0;h<c;++h)if(s=l[h]){for(var f,d=t.call(s,s.__data__,h,l),p=tK(s,n),y=0,g=d.length;y<g;++y)(f=d[y])&&tq(f,e,n,y,d,p);o.push(d),a.push(s)}return new eR(o,a,e,n)},selectChild:eL.selectChild,selectChildren:eL.selectChildren,filter:function(t){"function"!=typeof t&&(t=E(t));for(var e=this._groups,n=e.length,r=Array(n),i=0;i<n;++i)for(var o,a=e[i],u=a.length,s=r[i]=[],l=0;l<u;++l)(o=a[l])&&t.call(o,o.__data__,l,a)&&s.push(o);return new eR(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var e=this._groups,n=t._groups,r=e.length,i=n.length,o=Math.min(r,i),a=Array(r),u=0;u<o;++u)for(var s,l=e[u],c=n[u],h=l.length,f=a[u]=Array(h),d=0;d<h;++d)(s=l[d]||c[d])&&(f[d]=s);for(;u<r;++u)a[u]=e[u];return new eR(a,this._parents,this._name,this._id)},selection:function(){return new eH(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=++eC,r=this._groups,i=r.length,o=0;o<i;
1++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)if(a=u[l]){var c=tK(a,e);tq(a,t,n,l,u,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new eR(r,this._parents,t,n)},call:eL.call,nodes:eL.nodes,node:eL.node,size:eL.size,empty:eL.empty,each:eL.each,on:function(t,e){var n,r,i,o,a,u,s=this._id;return arguments.length<2?tK(this.node(),s).on.on(t):this.each((n=s,r=t,i=e,u=(r+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})?tj:tF,function(){var t=u(this,n),e=t.on;e!==o&&(a=(o=e).copy()).on(r,i),t.on=a}))},attr:function(t,e){var n=L(t),r="transform"===n?t1:eS;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var r,i,o;return function(){var a,u,s=n(this);return null==s?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}}:function(t,e,n){var r,i,o;return function(){var a,u,s=n(this);return null==s?void this.removeAttribute(t):(a=this.getAttribute(t))===(u=s+"")?null:a===r&&u===i?o:(i=u,o=e(r=a,s))}})(n,r,t2(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===r?i:i=e(r=a,n)}}:function(t,e,n){var r,i,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===r?i:i=e(r=a,n)}})(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw Error();var r=L(t);return this.tween(n,(r.local?function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttributeNS(t.space,t.local,i.call(this,e))}),n}return i._value=e,i}:function(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&function(e){this.setAttribute(t,i.call(this,e))}),n}return i._value=e,i})(r,e))},style:function(t,e,n){var r,i,o,a,u,s,l,c,h,f,d,p,y,g,m,x,v,w,_,b,M,E="transform"==(t+="")?t0:eS;return null==e?this.styleTween(t,(r=t,function(){var t=X(this,r),e=(this.style.removeProperty(r),X(this,r));return t===e?null:t===i&&e===o?a:a=E(i=t,o=e)})).on("end.style."+t,eB(t)):"function"==typeof e?this.styleTween(t,(u=t,s=t2(this,"style."+t,e),function(){var t=X(this,u),e=s(this),n=e+"";return null==e&&(this.style.removeProperty(u),n=e=X(this,u)),t===n?null:t===l&&n===c?h:(c=n,h=E(l=t,e))})).each((f=this._id,v="end."+(x="style."+(d=t)),function(){var t=tF(this,f),e=t.on,n=null==t.value[x]?m||(m=eB(d)):void 0;(e!==p||g!==n)&&(y=(p=e).copy()).on(v,g=n),t.on=y})):this.styleTween(t,(w=t,M=e+"",function(){var t=X(this,w);return t===M?null:t===_?b:b=E(_=t,e)}),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw Error();return this.tween(r,function(t,e,n){var r,i;function o(){var o=e.apply(this,arguments);return o!==i&&(r=(i=o)&&function(e){this.style.setProperty(t,o.call(this,e),n)}),r}return o._value=e,o}(t,e,null==n?"":n))},text:function(t){var e,n;return this.tween("text","function"==typeof t?(e=t2(this,"text",t),function(){var t=e(this);this.textContent=null==t?"":t}):(n=null==t?"":t+"",function(){this.textContent=n}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&function(t){this.textContent=r.call(this,t)}),e}return r._value=t,r}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=tK(this.node(),n).tween,o=0,a=i.length;o<a;++o)if((r=i[o]).name===t)return r.value;return null}return this.each((null==e?function(t,e){var n,r;return function(){var i=tF(this,t),o=i.tween;if(o!==n){r=n=o;for(var a=0,u=r.length;a<u;++a)if(r[a].name===e){(r=r.slice()).splice(a,1);break}}i.tween=r}}:function(t,e,n){var r,i;if("function"!=typeof n)throw Error();return function(){var o=tF(this,t),a=o.tween;if(a!==r){i=(r=a).slice();for(var u={name:e,value:n},s=0,l=i.length;s<l;++s)if(i[s].name===e){i[s]=u;break}s===l&&i.push(u)}o.tween=i}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){tj(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){tj(this,t).delay=e}})(e,t)):tK(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){tF(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){tF(this,t).duration=e}})(e,t)):tK(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw Error();return function(){tF(this,t).ease=e}}(e,t)):tK(this.node(),e).ease},easeVarying:function(t){var e;if("function"!=typeof t)throw Error();return this.each((e=this._id,function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw Error();tF(this,e).ease=n}))},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise(function(o,a){var u={value:a},s={value:function(){0==--i&&o()}};n.each(function(){var n=tF(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(u),e._.interrupt.push(u),e._.end.push(s)),n.on=e}),0===i&&o()})},[Symbol.iterator]:eL[Symbol.iterator]};var eD={time:null,delay:0,duration:250,ease:function(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}};ta.prototype.interrupt=function(t){return this.each(function(){tU(this,t)})},ta.prototype.transition=function(t){var e,n;t instanceof eR?(e=t._id,t=t._name):(e=++eC,(n=eD).time=tH(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,o=0;o<i;
1++o)for(var a,u=r[o],s=u.length,l=0;l<s;++l)(a=u[l])&&tq(a,t,e,l,u,n||function(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw Error(`transition ${e} not found`);return n}(a,e));return new eR(r,this._parents,t,e)},t.s([],183502),t.s(["interrupt",0,tU],603760);let eX=t=>()=>t;function eO(t,{sourceEvent:e,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function eY(t,e,n){this.k=t,this.x=e,this.y=n}eY.prototype={constructor:eY,scale:function(t){return 1===t?this:new eY(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new eY(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var eV=new eY(1,0,0);function eq(t){for(;!t.__zoom;)if(!(t=t.parentNode))return eV;return t.__zoom}function ej(t){t.stopImmediatePropagation()}function eF(t){t.preventDefault(),t.stopImmediatePropagation()}function eK(t){return(!t.ctrlKey||"wheel"===t.type)&&!t.button}function eU(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function eW(){return this.__zoom||eV}function eZ(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function eG(){return navigator.maxTouchPoints||"ontouchstart"in this}function eQ(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],o=t.invertY(e[0][1])-n[0][1],a=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function eJ(){var t,e,n,r=eK,i=eU,o=eQ,a=eZ,u=eG,s=[0,1/0],l=[[-1/0,-1/0],[1/0,1/0]],c=250,h=tM,f=m("start","zoom","end"),d=0,p=10;function y(t){t.property("__zoom",eW).on("wheel.zoom",M,{passive:!1}).on("mousedown.zoom",E).on("dblclick.zoom",$).filter(u).on("touchstart.zoom",A).on("touchmove.zoom",k).on("touchend.zoom touchcancel.zoom",z).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function g(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new eY(e,t.x,t.y)}function x(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new eY(t.k,r,i)}function v(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function w(t,e,n,r){t.on("start.zoom",function(){_(this,arguments).event(r).start()}).on("interrupt.zoom end.zoom",function(){_(this,arguments).event(r).end()}).tween("zoom",function(){var t=arguments,o=_(this,t).event(r),a=i.apply(this,t),u=null==n?v(a):"function"==typeof n?n.apply(this,t):n,s=Math.max(a[1][0]-a[0][0],a[1][1]-a[0][1]),l=this.__zoom,c="function"==typeof e?e.apply(this,t):e,f=h(l.invert(u).concat(s/l.k),c.invert(u).concat(s/c.k));return function(t){if(1===t)t=c;else{var e=f(t),n=s/e[2];t=new eY(n,u[0]-e[0]*n,u[1]-e[1]*n)}o.zoom(null,t)}})}function _(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=i.apply(t,e),this.taps=0}function M(t,...e){if(r.apply(this,arguments)){var n=_(this,e).event(t),i=this.__zoom,u=Math.max(s[0],Math.min(s[1],i.k*Math.pow(2,a.apply(this,arguments)))),c=ts(t);if(n.wheel)(n.mouse[0][0]!==c[0]||n.mouse[0][1]!==c[1])&&(n.mouse[1]=i.invert(n.mouse[0]=c)),clearTimeout(n.wheel);else{if(i.k===u)return;n.mouse=[c,i.invert(c)],tU(this),n.start()}eF(t),n.wheel=setTimeout(function(){n.wheel=null,n.end()}
vendor: 4,106 bytes, line 1
1,150),n.zoom("mouse",o(x(g(i,u),n.mouse[0],n.mouse[1]),n.extent,l))}}function E(t,...e){if(!n&&r.apply(this,arguments)){var i=t.currentTarget,a=_(this,e,!0).event(t),u=tu(t.view).on("mousemove.zoom",function(t){if(eF(t),!a.moved){var e=t.clientX-c,n=t.clientY-h;a.moved=e*e+n*n>d}a.event(t).zoom("mouse",o(x(a.that.__zoom,a.mouse[0]=ts(t,i),a.mouse[1]),a.extent,l))},!0).on("mouseup.zoom",function(t){u.on("mousemove.zoom mouseup.zoom",null),tp(t.view,a.moved),eF(t),a.event(t).end()},!0),s=ts(t,i),c=t.clientX,h=t.clientY;td(t.view),ej(t),a.mouse=[s,this.__zoom.invert(s)],tU(this),a.start()}}function $(t,...e){if(r.apply(this,arguments)){var n=this.__zoom,a=ts(t.changedTouches?t.changedTouches[0]:t,this),u=n.invert(a),s=n.k*(t.shiftKey?.5:2),h=o(x(g(n,s),a,u),i.apply(this,e),l);eF(t),c>0?tu(this).transition().duration(c).call(w,h,a,t):tu(this).call(y.transform,h,a,t)}}function A(n,...i){if(r.apply(this,arguments)){var o,a,u,s,l=n.touches,c=l.length,h=_(this,i,n.changedTouches.length===c).event(n);for(ej(n),a=0;a<c;++a)s=[s=ts(u=l[a],this),this.__zoom.invert(s),u.identifier],h.touch0?h.touch1||h.touch0[2]===s[2]||(h.touch1=s,h.taps=0):(h.touch0=s,o=!0,h.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(h.taps<2&&(e=s[0],t=setTimeout(function(){t=null},500)),tU(this),h.start())}}function k(t,...e){if(this.__zooming){var n,r,i,a,u=_(this,e).event(t),s=t.changedTouches,c=s.length;for(eF(t),n=0;n<c;++n)i=ts(r=s[n],this),u.touch0&&u.touch0[2]===r.identifier?u.touch0[0]=i:u.touch1&&u.touch1[2]===r.identifier&&(u.touch1[0]=i);if(r=u.that.__zoom,u.touch1){var h=u.touch0[0],f=u.touch0[1],d=u.touch1[0],p=u.touch1[1],y=(y=d[0]-h[0])*y+(y=d[1]-h[1])*y,m=(m=p[0]-f[0])*m+(m=p[1]-f[1])*m;r=g(r,Math.sqrt(y/m)),i=[(h[0]+d[0])/2,(h[1]+d[1])/2],a=[(f[0]+p[0])/2,(f[1]+p[1])/2]}else{if(!u.touch0)return;i=u.touch0[0],a=u.touch0[1]}u.zoom("touch",o(x(r,i,a),u.extent,l))}}function z(t,...r){if(this.__zooming){var i,o,a=_(this,r).event(t),u=t.changedTouches,s=u.length;for(ej(t),n&&clearTimeout(n),n=setTimeout(function(){n=null},500),i=0;i<s;++i)o=u[i],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.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&&(o=ts(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<p)){var l=tu(this).on("dblclick.zoom");l&&l.apply(this,arguments)}}}return y.transform=function(t,e,n,r){var i=t.selection?t.selection():t;i.property("__zoom",eW),t!==i?w(t,e,n,r):i.interrupt().each(function(){_(this,arguments).event(r).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},y.scaleBy=function(t,e,n,r){y.scaleTo(t,function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n},n,r)},y.scaleTo=function(t,e,n,r){y.transform(t,function(){var t=i.apply(this,arguments),r=this.__zoom,a=null==n?v(t):"function"==typeof n?n.apply(this,arguments):n,u=r.invert(a),s="function"==typeof e?e.apply(this,arguments):e;return o(x(g(r,s),a,u),t,l)},n,r)},y.translateBy=function(t,e,n,r){y.transform(t,function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),i.apply(this,arguments),l)},null,r)},y.translateTo=function(t,e,n,r,a){y.transform(t,function(){var t=i.apply(this,arguments),a=this.__zoom,u=null==r?v(t):"function"==typeof r?r.apply(this,arguments):r;return o(eV.translate(u[0],u[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,l)},r,a)},b.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1==++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0==--this.active&&(delete this.that.__zooming,this.emit
1("end")),this},emit:function(t){var e=tu(this.that).datum();f.call(t,this.that,new eO(t,{sourceEvent:this.sourceEvent,target:y,type:t,transform:this.that.__zoom,dispatch:f}),e)}},y.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:eX(+t),y):a},y.filter=function(t){return arguments.length?(r="function"==typeof t?t:eX(!!t),y):r},y.touchable=function(t){return arguments.length?(u="function"==typeof t?t:eX(!!t),y):u},y.extent=function(t){return arguments.length?(i="function"==typeof t?t:eX([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),y):i},y.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],y):[s[0],s[1]]},y.translateExtent=function(t){return arguments.length?(l[0][0]=+t[0][0],l[1][0]=+t[1][0],l[0][1]=+t[0][1],l[1][1]=+t[1][1],y):[[l[0][0],l[0][1]],[l[1][0],l[1][1]]]},y.constrain=function(t){return arguments.length?(o=t,y):o},y.duration=function(t){return arguments.length?(c=+t,y):c},y.interpolate=function(t){return arguments.length?(h=t,y):h},y.on=function(){var t=f.on.apply(f,arguments);return t===f?y:t},y.clickDistance=function(t){return arguments.length?(d=(t*=1)*t,y):Math.sqrt(d)},y.tapDistance=function(t){return arguments.length?(p=+t,y):p},y}function e0(t,e){var n,r,i=typeof e;return null==e||"boolean"===i?eA(e):("number"===i?tW:"string"===i?(r=el(e))?(e=r,ez):eI:e instanceof el?ez:e instanceof Date?function(t,e){var n=new Date;return t*=1,e*=1,function(r){return n.setTime(t*(1-r)+e*r),n}}:!ArrayBuffer.isView(n=e)||n instanceof DataView?Array.isArray(e)?function(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,o=Array(i),a=Array(r);for(n=0;n<i;++n)o[n]=e0(t[n],e[n]);for(;n<r;++n)a[n]=e[n];return function(t){for(n=0;n<i;++n)a[n]=o[n](t);return a}}:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?function(t,e){var n,r={},i={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?r[n]=e0(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}}:tW:function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(o){for(n=0;n<r;++n)i[n]=t[n]*(1-o)+e[n]*o;return i}})(t,e)}eq.prototype=eY.prototype,t.s([],250149),t.s(["interpolate",0,e0],678152);let e1={error001:(t="react")=>`Seems like you have not used ${"svelte"===t?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${t}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,{id:e,sourceHandle:n,targetHandle:r})=>`Couldn't create edge for ${t} handle id: "${"source"===t?n:r}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:t=>`Edge with id "${t}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},e2=[[-1/0,-1/0],[1/0,1/0]],e5={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:e,y:n})=>`Moved selected node ${t}. New position, x: ${e}, y: ${n}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};(e=l||(l={})).Strict="strict",e.Loose="loose",(n=c||(c={})).Free="free",n.Vertical="vertical",n.Horizontal="horizontal",(r=h||(h={}
1)).Partial="partial",r.Full="full",(i=f||(f={})).Bezier="default",i.Straight="straight",i.Step="step",i.SmoothStep="smoothstep",i.SimpleBezier="simplebezier",(o=d||(d={})).Arrow="arrow",o.ArrowClosed="arrowclosed",(a=p||(p={})).Left="left",a.Top="top",a.Right="right",a.Bottom="bottom";let e3={[p.Left]:p.Right,[p.Right]:p.Left,[p.Top]:p.Bottom,[p.Bottom]:p.Top},e4=t=>!!t&&"object"==typeof t&&"id"in t&&"source"in t&&"target"in t,e8=t=>!!t&&"object"==typeof t&&"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),e6=(t,e=[0,0])=>{let{width:n,height:r}=nE(t),i=t.origin??e,o=n*i[0],a=r*i[1];return{x:t.position.x-o,y:t.position.y-a}},e9=(t,e={})=>{let n={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(t=>{(void 0===e.filter||e.filter(t))&&(n=ns(n,nf(t)),r=!0)}),r?nc(n):{x:0,y:0,width:0,height:0}},e7=(t,e)=>{let n=new Set;return t.forEach(t=>{n.add(t.id)}),e.filter(t=>n.has(t.source)||n.has(t.target))};async function nt({nodes:t,width:e,height:n,panZoom:r,minZoom:i,maxZoom:o},a){let u,s;if(0===t.size)return!0;let l=n_(e9((u=new Map,s=a?.nodes?new Set(a.nodes.map(t=>t.id)):null,t.forEach(t=>{let e;if(a?.includeHiddenNodes){let{width:n,height:r}=nE(t);e=n>0&&r>0}else e=!!(t.measured.width&&t.measured.height&&!t.hidden);e&&(!s||s.has(t.id))&&u.set(t.id,t)}),u)),e,n,a?.minZoom??i,a?.maxZoom??o,a?.padding??.1);return await r.setViewport(l,{duration:a?.duration,ease:a?.ease,interpolate:a?.interpolate}),!0}function ne({nodeId:t,nextPosition:e,nodeLookup:n,nodeOrigin:r=[0,0],nodeExtent:i,onError:o}){let a=n.get(t),u=a.parentId?n.get(a.parentId):void 0,{x:s,y:l}=u?u.internals.positionAbsolute:{x:0,y:0},c=a.origin??r,h=a.extent||i;if("parent"!==a.extent||a.expandParent)u&&nM(a.extent)&&(h=[[a.extent[0][0]+s,a.extent[0][1]+l],[a.extent[1][0]+s,a.extent[1][1]+l]]);else if(u){let{width:t,height:e}=nE(u);t&&e&&(h=[[s,l],[s+t,l+e]])}else o?.("005",e1.error005());let f=nM(h)?ni(e,h,a.measured):e;return(void 0===a.measured.width||void 0===a.measured.height)&&o?.("015",e1.error015()),{position:{x:f.x-s+(a.measured.width??0)*c[0],y:f.y-l+(a.measured.height??0)*c[1]},positionAbsolute:f}}async function nn({nodesToRemove:t=[],edgesToRemove:e=[],nodes:n,edges:r,onBeforeDelete:i}){let o=new Set(t.map(t=>t.id)),a=[];for(let t of n){if(!1===t.deletable)continue;let e=o.has(t.id),n=!e&&t.parentId&&a.find(e=>e.id===t.parentId);(e||n)&&a.push(t)}let u=new Set(e.map(t=>t.id)),s=r.filter(t=>!1!==t.deletable),l=e7(a,s);for(let t of s)u.has(t.id)&&!l.find(e=>e.id===t.id)&&l.push(t);if(!i)return{edges:l,nodes:a};let c=await i({nodes:a,edges:l});return"boolean"==typeof c?c?{edges:l,nodes:a}:{edges:[],nodes:[]}:c}let nr=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),ni=(t={x:0,y:0},e,n)=>({x:nr(t.x,e[0][0],e[1][0]-(n?.width??0)),y:nr(t.y,e[0][1],e[1][1]-(n?.height??0))});function no(t,e,n){let{width:r,height:i}=nE(n),{x:o,y:a}=n.internals.positionAbsolute;return ni(t,[[o,a],[o+r,a+i]],e)}let na=(t,e,n)=>t<e?nr(Math.abs(t-e),1,e)/e:t>n?-nr(Math.abs(t-n),1,e)/e:0,nu=(t,e,n=15,r=40)=>[na(t.x,r,e.width-r)*n,na(t.y,r,e.height-r)*n],ns=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),nl=({x:t,y:e,width:n,height:r})=>({x:t,y:e,x2:t+n,y2:e+r}),nc=({x:t,y:e,x2:n,y2:r})=>({x:t,y:e,width:n-t,height:r-e}),nh=(t,e=[0,0])=>{let{x:n,y:r}=e8(t)?t.internals.positionAbsolute:e6(t,e);return{x:n,y:r,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},nf=(t,e=[0,0])=>{let{x:n,y:r}=e8(t)?t.internals.positionAbsolute:e6(t,e);return{x:n,y:r,x2:n+(t.measured?.width??t.width??t.initialWidth??0),y2:r+(t.measured?.height??t.height??t.initialHeight??0)}},nd=(t,e)=>nc(ns(nl(t),nl(e))),np=(t,e,n,r,i,o,a,u)=>Math.ceil(Math.max(0,Math.min(t+n,i+a)-Math.max(t,i))*Math.max(0,Math.min(e+r,o+u)-Math.max(e,o))),ny=(t,e)=>np(t.x,t.y,t.width,t.height,e.x,e.y,e.width,e.height),ng=t=>!isNaN(t)&&isFinite(t),nm=(t,e=[1,1])=>({x:e[0]*Math.round(t.x/e[0]),y:e[1]*Math.round(t.y/e[1])}),nx=({x:t,y:e},[n,r,i],o=!1,a=[1,1])=>{let u={x:(t-n)/i,y:(e-r)/i};return o?nm(u,a):u},nv=({x:t,y:e},[n,r,i])=>({x:t*i+n,y:e*i+r});function nw(t,e){if("number"==typeof t)return Math.floor((e-e/(1+t))*.5);if("string"==typeof t&&t.endsWith("px")){let e=parseFloat(t);if(!Number.isNaN(e))return Math.floor(e)}if("string"==typeof t&&t.endsWith("%")){let n=parseFloat(t);if(!Number.isNaN(n))return Math.floor(e*n*.01)}return console.error(`The padding value "${t}
1" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}let n_=(t,e,n,r,i,o)=>{let a=function(t,e,n){if("string"==typeof t||"number"==typeof t){let r=nw(t,n),i=nw(t,e);return{top:r,right:i,bottom:r,left:i,x:2*i,y:2*r}}if("object"==typeof t){let r=nw(t.top??t.y??0,n),i=nw(t.bottom??t.y??0,n),o=nw(t.left??t.x??0,e),a=nw(t.right??t.x??0,e);return{top:r,right:a,bottom:i,left:o,x:o+a,y:r+i}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}(o,e,n),u=nr(Math.min((e-a.x)/t.width,(n-a.y)/t.height),r,i),s=t.x+t.width/2,l=t.y+t.height/2,c=e/2-s*u,h=n/2-l*u,f=function(t,e,n,r,i,o){let{x:a,y:u}=nv(t,[e,n,r]),{x:s,y:l}=nv({x:t.x+t.width,y:t.y+t.height},[e,n,r]);return{left:Math.floor(a),top:Math.floor(u),right:Math.floor(i-s),bottom:Math.floor(o-l)}}(t,c,h,u,e,n),d={left:Math.min(f.left-a.left,0),top:Math.min(f.top-a.top,0),right:Math.min(f.right-a.right,0),bottom:Math.min(f.bottom-a.bottom,0)};return{x:c-d.left+d.right,y:h-d.top+d.bottom,zoom:u}},nb=()=>"u">typeof navigator&&navigator?.userAgent?.indexOf("Mac")>=0;function nM(t){return null!=t&&"parent"!==t}function nE(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function n$(t,{snapGrid:e=[0,0],snapToGrid:n=!1,transform:r,containerBounds:i}){let{x:o,y:a}=nP(t),u=nx({x:o-(i?.left??0),y:a-(i?.top??0)},r),{x:s,y:l}=n?nm(u,e):u;return{xSnapped:s,ySnapped:l,...u}}let nA=t=>({width:t.offsetWidth,height:t.offsetHeight}),nk=t=>t?.getRootNode?.()||window?.document,nz=["INPUT","SELECT","TEXTAREA"],nN=t=>"clientX"in t,nP=(t,e)=>{let n=nN(t),r=n?t.clientX:t.touches?.[0].clientX,i=n?t.clientY:t.touches?.[0].clientY;return{x:r-(e?.left??0),y:i-(e?.top??0)}},nT=(t,e,n,r,i)=>{let o=e.querySelectorAll(`.${t}`);return o&&o.length?Array.from(o).map(e=>{let o=e.getBoundingClientRect();return{id:e.getAttribute("data-handleid"),type:t,nodeId:i,position:e.getAttribute("data-handlepos"),x:(o.left-n.left)/r,y:(o.top-n.top)/r,...nA(e)}}):null};function nI({sourceX:t,sourceY:e,targetX:n,targetY:r,sourceControlX:i,sourceControlY:o,targetControlX:a,targetControlY:u}){let s=.125*t+.375*i+.375*a+.125*n,l=.125*e+.375*o+.375*u+.125*r,c=Math.abs(s-t),h=Math.abs(l-e);return[s,l,c,h]}function nS(t,e){return t>=0?.5*t:25*e*Math.sqrt(-t)}function nH({pos:t,x1:e,y1:n,x2:r,y2:i,c:o}){switch(t){case p.Left:return[e-nS(e-r,o),n];case p.Right:return[e+nS(r-e,o),n];case p.Top:return[e,n-nS(n-i,o)];case p.Bottom:return[e,n+nS(i-n,o)]}}function nB({sourceX:t,sourceY:e,targetX:n,targetY:r}){let i=Math.abs(n-t)/2,o=Math.abs(r-e)/2;return[n<t?n+i:n-i,r<e?r+o:r-o,i,o]}let nC=({source:t,sourceHandle:e,target:n,targetHandle:r})=>`xy-edge__${t}${e||""}-${n}${r||""}`,nR={[p.Left]:{x:-1,y:0},[p.Right]:{x:1,y:0},[p.Top]:{x:0,y:-1},[p.Bottom]:{x:0,y:1}},nL=({source:t,sourcePosition:e=p.Bottom,target:n})=>e===p.Left||e===p.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},nD=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function nX(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function nO(t){if(!t)return null;let e=[],n=[];for(let r of t)r.width=r.width??1,r.height=r.height??1,"source"===r.type?e.push(r):"target"===r.type&&n.push(r);return{source:e,target:n}}function nY(t,e,n=p.Left,r=!1){let i=(e?.x??0)+t.internals.positionAbsolute.x,o=(e?.y??0)+t.internals.positionAbsolute.y,{width:a,height:u}=e??nE(t);if(r)return{x:i+a/2,y:o+u/2};switch(e?.position??n){case p.Top:return{x:i+a/2,y:o};case p.Right:return{x:i+a,y:o+u/2};case p.Bottom:return{x:i+a/2,y:o+u};case p.Left:return{x:i,y:o+u/2}}}function nV(t,e){return t&&(e?t.find(t=>t.id===e):t[0])||null}function nq(t,e){if(!t)return"";if("string"==typeof t)return t;let n=e?`${e}__`:"";return`${n}${Object.keys(t).sort().map(e=>`${e}=${t[e]}`).join("&")}`}let nj={left:0,center:50,right:100},nF={top:0,center:50,bottom:100},nK={nodeOrigin:[0,0],nodeExtent:e2,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},nU={...nK,checkEquality:!0};function nW(t,e){let n={...t};for(let t in e)void 0!==e[t]&&(n[t]=e[t]);return n}function nZ(t){return"manual"===t}function nG(t,e,n,r,i){let{elevateNodesOnSelect:o,nodeOrigin:a,nodeExtent:u,zIndexMode:s}=nW(nK,r),l=t.parentId,c=e.get(l);if(!c)return void console.warn(`Parent node ${l} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);!function(t,e){if(!t.parentId)return;let n=e.get(t.parentId);n?n.set(t.id,t):e.set(t.parentId,new Map([[t.id,t]]))}(t,n),i&&!c.parentId&&void 0===c.internals.rootParentIndex&&"auto"===s&&(c.internals.rootParentIndex=++i.i,c.internals.z=c.internals.z+10*i.i),i&&void 0!==c.internals.rootParentIndex&&(i.i=c.internals.rootParentIndex);let{x:h,y:f,z:d}=function(t,e,n,r,i,o){let{x:a,y:u}=e.internals.positionAbsolute,s=nE(t),l=e6(t,n),c=nM(t.extent)?ni(l,t.extent,s):l,h=ni({x:a+c.x,y:u+c.y},r,s);"parent"===t.extent&&(h=no(h,s,e));let f=nQ(t,i,o),d=e.internals.z??0;return{x:h.x,y:h.y,z:d>=f?d+1:f}}(t,c,a,u,o&&!nZ(s)?1e3:0,s),{positionAbsolute:p}=t.internals,y=h!==p.x||f!==p.y;
1(y||d!==t.internals.z)&&e.set(t.id,{...t,internals:{...t.internals,positionAbsolute:y?{x:h,y:f}:p,z:d}})}function nQ(t,e,n){let r=ng(t.zIndex)?t.zIndex:0;return nZ(n)?r:r+(t.selected?e:0)}function nJ(t,e,n,r=[0,0]){let i=[],o=new Map;for(let n of t){let t=e.get(n.parentId);if(!t)continue;let r=nd(o.get(n.parentId)?.expandedRect??nh(t),n.rect);o.set(n.parentId,{expandedRect:r,parent:t})}return o.size>0&&o.forEach(({expandedRect:e,parent:o},a)=>{let u=o.internals.positionAbsolute,s=nE(o),l=o.origin??r,c=e.x<u.x?Math.round(Math.abs(u.x-e.x)):0,h=e.y<u.y?Math.round(Math.abs(u.y-e.y)):0,f=Math.max(s.width,Math.round(e.width)),d=Math.max(s.height,Math.round(e.height)),p=(f-s.width)*l[0],y=(d-s.height)*l[1];(c>0||h>0||p||y)&&(i.push({id:a,type:"position",position:{x:o.position.x-c+p,y:o.position.y-h+y}}),n.get(a)?.forEach(e=>{t.some(t=>t.id===e.id)||i.push({id:e.id,type:"position",position:{x:e.position.x+c,y:e.position.y+h}})})),(s.width<e.width||s.height<e.height||c||h)&&i.push({id:a,type:"dimensions",setAttributes:!0,dimensions:{width:f+(c?l[0]*c-p:0),height:d+(h?l[1]*h-y:0)}})}),i}async function n0({delta:t,panZoom:e,transform:n,translateExtent:r,width:i,height:o}){if(!e||!t.x&&!t.y)return!1;let a=await e.setViewportConstrained({x:n[0]+t.x,y:n[1]+t.y,zoom:n[2]},[[0,0],[i,o]],r);return!!a&&(a.x!==n[0]||a.y!==n[1]||a.k!==n[2])}function n1(t,e,n,r,i,o){let a=i,u=r.get(a)||new Map;r.set(a,u.set(n,e)),a=`${i}-${t}`;let s=r.get(a)||new Map;if(r.set(a,s.set(n,e)),o){a=`${i}-${t}-${o}`;let u=r.get(a)||new Map;r.set(a,u.set(n,e))}}function n2(t,e,n){let r=t;do{if(r?.matches?.(e))return!0;if(r===n)break;r=r?.parentElement}while(r)return!1}function n5({nodeId:t,dragItems:e,nodeLookup:n,dragging:r=!0}){let i=[];for(let[t,o]of e){let e=n.get(t)?.internals.userNode;e&&i.push({...e,position:o.position,dragging:r})}if(!t)return[i[0],i];let o=n.get(t)?.internals.userNode;return[o?{...o,position:e.get(t)?.position||o.position,dragging:r}:i[0],i]}function n3(t,e,n,r,i,o=!1){let a=r.get(t);if(!a)return null;let u="strict"===i?a.internals.handleBounds?.[e]:[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]],s=(n?u?.find(t=>t.id===n):u?.[0])??null;return s&&o?{...s,...nY(a,s,s.position,!0)}:s}function n4(t,e){return t?t:e?.classList.contains("target")?"target":e?.classList.contains("source")?"source":null}let n8=()=>!0;function n6(t,{handle:e,connectionMode:n,fromNodeId:r,fromHandleId:i,fromType:o,doc:a,lib:u,flowId:s,isValidConnection:c=n8,nodeLookup:h}){let f="target"===o,d=e?a.querySelector(`.${u}-flow__handle[data-id="${s}-${e?.nodeId}-${e?.id}-${e?.type}"]`):null,{x:p,y}=nP(t),g=a.elementFromPoint(p,y),m=g?.classList.contains(`${u}-flow__handle`)?g:d,x={handleDomNode:m,isValid:!1,connection:null,toHandle:null};if(m){let t=n4(void 0,m),e=m.getAttribute("data-nodeid"),o=m.getAttribute("data-handleid"),a=m.classList.contains("connectable"),u=m.classList.contains("connectableend");if(!e||!t)return x;let s={source:f?e:r,sourceHandle:f?o:i,target:f?r:e,targetHandle:f?i:o};x.connection=s,x.isValid=a&&u&&(n===l.Strict?f&&"source"===t||!f&&"target"===t:e!==r||o!==i)&&c(s),x.toHandle=n3(e,t,o,h,n,!0)}return x}let n9=t=>({x:t.x,y:t.y,zoom:t.k}),n7=({x:t,y:e,zoom:n})=>eV.translate(t,e).scale(n),rt=(t,e)=>t.target.closest(`.${e}`),re=(t,e)=>2===e&&Array.isArray(t)&&t.includes(2),rn=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,rr=(t,e=0,n=rn,r=()=>{})=>{let i="number"==typeof e&&e>0;return i||r(),i?t.transition().duration(e).ease(n).on("end",r):t},ri=t=>{let e=t.ctrlKey&&nb()?10:1;return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*e};function ro(t){let e=t.includes("right")||t.includes("left"),n=t.includes("bottom")||t.includes("top");return{isHorizontal:e,isVertical:n,affectsX:t.includes("left"),affectsY:t.includes("top")}}function ra(t,e){return Math.max(0,e-t)}function ru(t,e){return Math.max(0,t-e)}function rs(t,e,n){return Math.max(0,e-t,t-n)}(u=y||(y={})).Line="line",u.Handle="handle";let rl={width:0,height:0,x:0,y:0},rc={...rl,pointerX:0,pointerY:0,aspectRatio:1};t.s(["ConnectionLineType",0,f,"ConnectionMode",0,l,"MarkerType",0,d,"PanOnScrollMode",0,c,"Position",0,p,"ResizeControlVariant",0,y,"SelectionMode",0,h,"XYDrag",0,function({onNodeMouseDown:t,getStoreItems:e,onDragStart:n,onDrag:r,onDragStop:i}){let o={x:null,y:null},a=0,u=new Map,s=!1,l={x:0,y:0},c=null,h=!1,f=null,d=!1,p=!1,y=null;return{update:function({noDragClassName:g,handleSelector:m,domNode:x,isSelectable:v,nodeId:w,nodeClickDistance:_=0}){function b({x:t,y:n}
1){let{nodeLookup:i,nodeExtent:a,snapGrid:s,snapToGrid:l,nodeOrigin:c,onNodeDrag:h,onSelectionDrag:f,onError:d,updateNodePositions:g}=e();o={x:t,y:n};let m=!1,x=u.size>1,v=x&&a?nl(e9(u)):null,_=x&&l?function({dragItems:t,snapGrid:e,x:n,y:r}){let i=t.values().next().value;if(!i)return null;let o={x:n-i.distance.x,y:r-i.distance.y},a=nm(o,e);return{x:a.x-o.x,y:a.y-o.y}}({dragItems:u,snapGrid:s,x:t,y:n}):null;for(let[e,r]of u){if(!i.has(e))continue;let o={x:t-r.distance.x,y:n-r.distance.y};l&&(o=_?{x:Math.round(o.x+_.x),y:Math.round(o.y+_.y)}:nm(o,s));let u=null;if(x&&a&&!r.extent&&v){let{positionAbsolute:t}=r.internals,e=t.x-v.x+a[0][0],n=t.x+r.measured.width-v.x2+a[1][0];u=[[e,t.y-v.y+a[0][1]],[n,t.y+r.measured.height-v.y2+a[1][1]]]}let{position:h,positionAbsolute:f}=ne({nodeId:e,nextPosition:o,nodeLookup:i,nodeExtent:u||a,nodeOrigin:c,onError:d});m=m||r.position.x!==h.x||r.position.y!==h.y,r.position=h,r.internals.positionAbsolute=f}if(p=p||m,m&&(g(u,!0),y&&(r||h||!w&&f))){let[t,e]=n5({nodeId:w,dragItems:u,nodeLookup:i});r?.(y,u,t,e),h?.(y,t,e),w||f?.(y,e)}}async function M(){if(!c)return;let{transform:t,panBy:n,autoPanSpeed:r,autoPanOnNodeDrag:i}=e();if(!i){s=!1,cancelAnimationFrame(a);return}let[u,h]=nu(l,c,r);(0!==u||0!==h)&&(o.x=(o.x??0)-u/t[2],o.y=(o.y??0)-h/t[2],await n({x:u,y:h})&&b(o)),a=requestAnimationFrame(M)}function E(r){let{nodeLookup:i,multiSelectionActive:a,nodesDraggable:s,transform:l,snapGrid:f,snapToGrid:d,selectNodesOnDrag:p,onNodeDragStart:y,onSelectionDragStart:g,unselectNodesAndEdges:m}=e();h=!0,p&&v||a||!w||i.get(w)?.selected||m(),v&&p&&w&&t?.(w);let x=n$(r.sourceEvent,{transform:l,snapGrid:f,snapToGrid:d,containerBounds:c});if(o=x,(u=function(t,e,n,r){let i=new Map;for(let[o,a]of t)if((a.selected||a.id===r)&&(!a.parentId||!function t(e,n){if(!e.parentId)return!1;let r=n.get(e.parentId);return!!r&&(!!r.selected||t(r,n))}(a,t))&&(a.draggable||e&&void 0===a.draggable)){let e=t.get(o);e&&i.set(o,{id:o,position:e.position||{x:0,y:0},distance:{x:n.x-e.internals.positionAbsolute.x,y:n.y-e.internals.positionAbsolute.y},extent:e.extent,parentId:e.parentId,origin:e.origin,expandParent:e.expandParent,internals:{positionAbsolute:e.internals.positionAbsolute||{x:0,y:0}},measured:{width:e.measured.width??0,height:e.measured.height??0}})}return i}(i,s,x,w)).size>0&&(n||y||!w&&g)){let[t,e]=n5({nodeId:w,dragItems:u,nodeLookup:i});n?.(r.sourceEvent,u,t,e),y?.(r.sourceEvent,t,e),w||g?.(r.sourceEvent,e)}}f=tu(x);let $=t_().clickDistance(_).on("start",t=>{let{domNode:n,nodeDragThreshold:r,transform:i,snapGrid:a,snapToGrid:u}=e();c=n?.getBoundingClientRect()||null,d=!1,p=!1,y=t.sourceEvent,0===r&&E(t),o=n$(t.sourceEvent,{transform:i,snapGrid:a,snapToGrid:u,containerBounds:c}),l=nP(t.sourceEvent,c)}).on("drag",t=>
1{let{autoPanOnNodeDrag:n,transform:r,snapGrid:i,snapToGrid:a,nodeDragThreshold:f,nodeLookup:p}=e(),g=n$(t.sourceEvent,{transform:r,snapGrid:i,snapToGrid:a,containerBounds:c});if(y=t.sourceEvent,("touchmove"===t.sourceEvent.type&&t.sourceEvent.touches.length>1||w&&!p.has(w))&&(d=!0),!d){if(!s&&n&&h&&(s=!0,M()),!h){let e=nP(t.sourceEvent,c),n=e.x-l.x,r=e.y-l.y;Math.sqrt(n*n+r*r)>f&&E(t)}(o.x!==g.xSnapped||o.y!==g.ySnapped)&&u&&h&&(l=nP(t.sourceEvent,c),b(g))}}).on("end",t=>{if(!h||d){d&&u.size>0&&e().updateNodePositions(u,!1);return}if(s=!1,h=!1,cancelAnimationFrame(a),u.size>0){let{nodeLookup:n,updateNodePositions:r,onNodeDragStop:o,onSelectionDragStop:a}=e();if(p&&(r(u,!1),p=!1),i||o||!w&&a){let[e,r]=n5({nodeId:w,dragItems:u,nodeLookup:n,dragging:!1});i?.(t.sourceEvent,u,e,r),o?.(t.sourceEvent,e,r),w||a?.(t.sourceEvent,r)}}}).filter(t=>{let e=t.target;return!t.button&&(!g||!n2(e,`.${g}`,x))&&(!m||n2(e,m,x))});f.call($)},destroy:function(){f?.on(".drag",null)}}},"XYHandle",0,{onPointerDown:function(t,{connectionMode:e,connectionRadius:n,handleId:r,nodeId:i,edgeUpdaterType:o,isTarget:a,domNode:u,nodeLookup:s,lib:l,autoPanOnConnect:c,flowId:h,panBy:f,cancelConnection:d,onConnectStart:y,onConnect:g,onConnectEnd:m,isValidConnection:x=n8,onReconnectEnd:v,updateConnection:w,getTransform:_,getFromHandle:b,autoPanSpeed:M,dragThreshold:E=1,handleDomNode:$}){let A,k=nk(t.target),z=0,{x:N,y:P}=nP(t),T=n4(o,$),I=u?.getBoundingClientRect(),S=!1;if(!I||!T)return;let H=n3(i,T,r,s,e);if(!H)return;let B=nP(t,I),C=!1,R=null,L=!1,D=null,X={...H,nodeId:i,type:T,position:H.position},O=s.get(i),Y={inProgress:!0,isValid:null,from:nY(O,X,p.Left,!0),fromHandle:X,fromPosition:X.position,fromNode:O,to:B,toHandle:null,toPosition:e3[X.position],toNode:null,pointer:B};function V(){S=!0,w(Y),y?.(t,{nodeId:i,handleId:r,handleType:T})}function q(t){var o,u;let d;if(!S){let{x:e,y:n}=nP(t),r=e-N,i=n-P;if(!(r*r+i*i>E*E))return;V()}if(!b()||!X)return void j(t);let y=_();A=function(t,e,n,r){let i=[],o=1/0;for(let a of function(t,e,n){let r=[],i={x:t.x-n,y:t.y-n,width:2*n,height:2*n};for(let t of e.values())ny(i,nh(t))>0&&r.push(t);return r}(t,n,e+250))for(let n of[...a.internals.handleBounds?.source??[],...a.internals.handleBounds?.target??[]]){if(r.nodeId===n.nodeId&&r.type===n.type&&r.id===n.id)continue;let{x:u,y:s}=nY(a,n,n.position,!0),l=Math.sqrt(Math.pow(u-t.x,2)+Math.pow(s-t.y,2));l>e||(l<o?(i=[{...n,x:u,y:s}],o=l):l===o&&i.push({...n,x:u,y:s}))}if(!i.length)return null;if(i.length>1){let t="source"===r.type?"target":"source";return i.find(e=>e.type===t)??i[0]}return i[0]}(nx(B=nP(t,I),y,!1,[1,1]),n,s,X),C||(!function t(){if(!c||!I)return;let[e,n]=nu(B,I,M);f({x:e,y:n}),z=requestAnimationFrame(t)}(),C=!0);let g=n6(t,{handle:A,connectionMode:e,fromNodeId:i,fromHandleId:r,fromType:a?"target":"source",isValidConnection:x,doc:k,lib:l,flowId:h,nodeLookup:s});D=g.handleDomNode,R=g.connection,o=!!A,u=g.isValid,d=null,u?d=!0:o&&!u&&(d=!1),L=d;let m=s.get(i),v=m?nY(m,X,p.Left,!0):Y.from,$={...Y,from:v,isValid:L,to:g.toHandle&&L?nv({x:g.toHandle.x,y:g.toHandle.y},y):B,toHandle:g.toHandle,toPosition:L&&g.toHandle?g.toHandle.position:e3[X.position],toNode:g.toHandle?s.get(g.toHandle.nodeId):null,pointer:B};w($),Y=$}function j(t){if(!("touches"in t)||!(t.touches.length>0)){if(S){(A||D)&&R&&L&&g?.(R);let{inProgress:e,...n}=Y,r={...n,toPosition:Y.toHandle?Y.toPosition:null};m?.(t,r),o&&v?.(t,r)}d(),cancelAnimationFrame(z),C=!1,L=!1,R=null,D=null,k.removeEventListener("mousemove",q),k.removeEventListener("mouseup",j),k.removeEventListener("touchmove",q),k.removeEventListener("touchend",j)}}0===E&&V(),k.addEventListener("mousemove",q),k.addEventListener("mouseup",j),k.addEventListener("touchmove",q),k.addEventListener("touchend",j)},isValid:n6},"XYMinimap",0,function({domNode:t,panZoom:e,getTransform:n,getViewScale:r}){let i=tu(t);return{update:function({translateExtent:t,width:o,height:a,zoomStep:u=1,pannable:s=!0,zoomable:l=!0,inversePan:c=!1}){let h=[0,0],f=eJ().on("start",t=>{("mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type)&&(h=[t.sourceEvent.clientX??t.sourceEvent.touches[0].clientX,t.sourceEvent.clientY??t.sourceEvent.touches[0].clientY])}).on("zoom",s?i=>{let u=n();if("mousemove"!==i.sourceEvent.type&&"touchmove"!==i.sourceEvent.type||!e)return;let s=[i.sourceEvent.clientX??i.sourceEvent.touches[0].clientX,i.sourceEvent.clientY??i.sourceEvent.touches[0].clientY],l=[s[0]-h[0],s[1]-h[1]];h=s;let f=r()*Math.max(u[2],Math.log(u[2]))*(c?-1:1),d={x:u[0]-l[0]*f,y:u[1]-l[1]*f};e.setViewportConstrained({x:d.x,y:d.y,zoom:u[2]},[[0,0],[o,a]],t)}:null).on("zoom.wheel",l?t=>{if("wheel"!==t.sourceEvent.type||!e)return;let r=n(),i=t.sourceEvent.ctrlKey&&nb()?10:1,o=-t.sourceEvent.deltaY*(1===t.sourceEvent.deltaMode?.05:t.sourceEvent.deltaMode?
11:.002)*u,a=r[2]*Math.pow(2,o*i);e.scaleTo(a)}:null);i.call(f,{})},destroy:function(){i.on("zoom",null)},pointer:ts}},"XYPanZoom",0,function({domNode:t,minZoom:e,maxZoom:n,translateExtent:r,viewport:i,onPanZoom:o,onPanZoomStart:a,onPanZoomEnd:u,onDraggingChange:s}){let l={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},h=t.getBoundingClientRect(),f=[[0,0],[h.width,h.height]],d="u">typeof ResizeObserver?new ResizeObserver(t=>{let e=t[0];e&&(f=[[0,0],[e.contentRect.width,e.contentRect.height]])}):null;d?.observe(t);let p=eJ().extent(()=>f).scaleExtent([e,n]).translateExtent(r),y=tu(t).call(p);w({x:i.x,y:i.y,zoom:nr(i.zoom,e,n)},[[0,0],[h.width,h.height]],r);let g=y.on("wheel.zoom"),m=y.on("dblclick.zoom");async function x(t,e){return!!y&&new Promise(n=>{p?.interpolate(e?.interpolate==="linear"?e0:tM).transform(rr(y,e?.duration,e?.ease,()=>n(!0)),t)})}function v(){p.on("zoom",null)}async function w(t,e,n){let r=n7(t),i=p?.constrain()(r,e,n);return i&&await x(i),i}return p.wheelDelta(ri),{update:function({noWheelClassName:t,noPanClassName:e,onPaneContextMenu:n,userSelectionActive:r,panOnScroll:i,panOnDrag:h,panOnScrollMode:f,panOnScrollSpeed:d,preventScrolling:x,zoomOnPinch:w,zoomOnScroll:_,zoomOnDoubleClick:b,panActivationKeyPressed:M=!1,zoomActivationKeyPressed:E,lib:$,onTransformChange:A,connectionInProgress:k,paneClickDistance:z,selectionOnDrag:N}){r&&!l.isZoomingOrPanning&&v();let P=i&&!E&&!r;p.clickDistance(N?1/0:!ng(z)||z<0?0:z);let T=P?function({zoomPanValues:t,noWheelClassName:e,d3Selection:n,d3Zoom:r,panOnScrollMode:i,panOnScrollSpeed:o,zoomOnPinch:a,onPanZoomStart:u,onPanZoom:s,onPanZoomEnd:l}){return h=>{if(rt(h,e))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();let f=n.property("__zoom").k||1;if(h.ctrlKey&&a){let t=ts(h),e=f*Math.pow(2,ri(h));r.scaleTo(n,e,t,h);return}let d=1===h.deltaMode?20:1,p=i===c.Vertical?0:h.deltaX*d,y=i===c.Horizontal?0:h.deltaY*d;!nb()&&h.shiftKey&&i!==c.Vertical&&(p=h.deltaY*d,y=0),r.translateBy(n,-(p/f)*o,-(y/f)*o,{internal:!0});let g=n9(n.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?s?.(h,g):(t.isPanScrolling=!0,u?.(h,g)),t.panScrollTimeout=setTimeout(()=>{l?.(h,g),t.isPanScrolling=!1},150)}}({zoomPanValues:l,noWheelClassName:t,d3Selection:y,d3Zoom:p,panOnScrollMode:f,panOnScrollSpeed:d,zoomOnPinch:w,onPanZoomStart:a,onPanZoom:o,onPanZoomEnd:u}):function({noWheelClassName:t,preventScrolling:e,d3ZoomHandler:n}){return function(r,i){let o="wheel"===r.type,a=!e&&o&&!r.ctrlKey,u=rt(r,t);if(r.ctrlKey&&o&&u&&r.preventDefault(),a||u)return null;r.preventDefault(),n.call(this,r,i)}}({noWheelClassName:t,preventScrolling:x,d3ZoomHandler:g});y.on("wheel.zoom",T,{passive:!1});let I=function({zoomPanValues:t,onDraggingChange:e,onPanZoomStart:n}){return r=>{if(r.sourceEvent?.internal)return;let i=n9(r.transform);t.mouseButton=r.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=i,r.sourceEvent?.type==="mousedown"&&e(!0),n&&n?.(r.sourceEvent,i)}}({zoomPanValues:l,onDraggingChange:s,onPanZoomStart:a});p.on("start",I);let S=function({zoomPanValues:t,panOnDrag:e,onPaneContextMenu:n,onTransformChange:r,onPanZoom:i}){return o=>{t.usedRightMouseButton=!!(n&&re(e,t.mouseButton??0)),o.sourceEvent?.sync||r([o.transform.x,o.transform.y,o.transform.k]),i&&!o.sourceEvent?.internal&&i?.(o.sourceEvent,n9(o.transform))}}({zoomPanValues:l,panOnDrag:h,onPaneContextMenu:!!n,onPanZoom:o,onTransformChange:A});p.on("zoom",S);let H=function({zoomPanValues:t,panOnDrag:e,panOnScroll:n,onDraggingChange:r,onPanZoomEnd:i,onPaneContextMenu:o}){return a=>{if(!a.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,o&&re(e,t.mouseButton??0)&&!t.usedRightMouseButton&&a.sourceEvent&&o(a.sourceEvent),t.usedRightMouseButton=!1,r(!1),i)){let e=n9(a.transform);t.prevViewport=e,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{i?.(a.sourceEvent,e)},150*!!n)}}}({zoomPanValues:l,panOnDrag:h,panOnScroll:i,onPaneContextMenu:n,onPanZoomEnd:u,onDraggingChange:s});p.on("end",H);let B=function({panActivationKeyPressed:t,zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:r,panOnDrag:i,panOnScroll:o,zoomOnDoubleClick:a,userSelectionActive:u,noWheelClassName:s,noPanClassName:l,lib:c,connectionInProgress:h}){return f=>{let d=e||n,p=r&&f.ctrlKey,y="wheel"===f.type;if(1===f.button&&"mousedown"===f.type&&(rt(f,`${c}-flow__node`)||rt(f,`${c}-flow__edge`)||rt(f,`${c}-flow__selection`)||rt(f,`${c}-flow__nodesselection`)))return!0;
1if(!i&&!d&&!o&&!a&&!r||u||h&&!y||rt(f,s)&&y||rt(f,l)&&(!y||o&&y&&!e)||!r&&f.ctrlKey&&y)return!1;if(!r&&"touchstart"===f.type&&f.touches?.length>1)return f.preventDefault(),!1;if(!d&&!o&&!p&&y||!i&&("mousedown"===f.type||"touchstart"===f.type)||Array.isArray(i)&&!i.includes(f.button)&&"mousedown"===f.type)return!1;let g=Array.isArray(i)&&i.includes(f.button)||!f.button||f.button<=1;return(!f.ctrlKey||y||t)&&g}}({panActivationKeyPressed:M,zoomActivationKeyPressed:E,panOnDrag:h,zoomOnScroll:_,panOnScroll:i,zoomOnDoubleClick:b,zoomOnPinch:w,userSelectionActive:r,noPanClassName:e,noWheelClassName:t,lib:$,connectionInProgress:k});p.filter(B),b?y.on("dblclick.zoom",m):y.on("dblclick.zoom",null)},destroy:v,setViewport:async function t(t,e){let n=n7(t);return await x(n,e),n},setViewportConstrained:w,getViewport:function(){let t=y?eq(y.node()):{x:0,y:0,k:1};return{x:t.x,y:t.y,zoom:t.k}},scaleTo:async function t(t,e){return!!y&&new Promise(n=>{p?.interpolate(e?.interpolate==="linear"?e0:tM).scaleTo(rr(y,e?.duration,e?.ease,()=>n(!0)),t)})},scaleBy:async function t(t,e){return!!y&&new Promise(n=>{p?.interpolate(e?.interpolate==="linear"?e0:tM).scaleBy(rr(y,e?.duration,e?.ease,()=>n(!0)),t)})},setScaleExtent:function(t){p?.scaleExtent(t)},setTranslateExtent:function(t){p?.translateExtent(t)},syncViewport:function(t){if(y){let e=n7(t),n=y.property("__zoom");(n.k!==t.zoom||n.x!==t.x||n.y!==t.y)&&p?.transform(y,e,null,{sync:!0})}},setClickDistance:function(t){let e=!ng(t)||t<0?0:t;p?.clickDistance(e)}}},"XYResizer",0,function({domNode:t,nodeId:e,getStoreItems:n,onChange:r,onEnd:i}){let o=tu(t),a={controlDirection:ro("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};return{update:function({controlPosition:t,boundaries:u,keepAspectRatio:s,resizeDirection:l,onResizeStart:c,onResize:h,onResizeEnd:f,shouldResize:d}){let p,y,g,m,x={...rl},v={...rc};a={boundaries:u,resizeDirection:l,keepAspectRatio:s,controlDirection:ro(t)};let w=null,_=[],b=!1,M=t_().on("start",t=>{let{nodeLookup:r,transform:i,snapGrid:o,snapToGrid:a,nodeOrigin:u,paneDomNode:s}=n();if(!(p=r.get(e)))return;w=s?.getBoundingClientRect()??null;let{xSnapped:l,ySnapped:h}=n$(t.sourceEvent,{transform:i,snapGrid:o,snapToGrid:a,containerBounds:w});for(let[t,n]of(v={...x={width:p.measured.width??0,height:p.measured.height??0,x:p.position.x??0,y:p.position.y??0},pointerX:l,pointerY:h,aspectRatio:x.width/x.height},y=void 0,g=nM(p.extent)?p.extent:void 0,p.parentId&&("parent"===p.extent||p.expandParent)&&(y=r.get(p.parentId)),y&&"parent"===p.extent&&(g=[[0,0],[y.measured.width,y.measured.height]]),_=[],m=void 0,r))if(n.parentId===e&&(_.push({id:t,position:{...n.position},extent:n.extent}),"parent"===n.extent||n.expandParent)){let t=function(t,e,n){let r=e.position.x+t.position.x,i=e.position.y+t.position.y,o=t.measured.width??0,a=t.measured.height??0,u=n[0]*o,s=n[1]*a;return[[r-u,i-s],[r+o-u,i+a-s]]}(n,p,n.origin??u);m=m?[[Math.min(t[0][0],m[0][0]),Math.min(t[0][1],m[0][1])],[Math.max(t[1][0],m[1][0]),Math.max(t[1][1],m[1][1])]]:t}c?.(t,{...x})}).on("drag",t=>
1{let{transform:e,snapGrid:i,snapToGrid:o,nodeOrigin:u}=n(),s=n$(t.sourceEvent,{transform:e,snapGrid:i,snapToGrid:o,containerBounds:w}),l=[];if(!p)return;let{x:c,y:f,width:M,height:E}=x,$={},A=p.origin??u,{width:k,height:z,x:N,y:P}=function(t,e,n,r,i,o,a,u){var s,l,c,h;let{affectsX:f,affectsY:d}=e,{isHorizontal:p,isVertical:y}=e,g=p&&y,{xSnapped:m,ySnapped:x}=n,{minWidth:v,maxWidth:w,minHeight:_,maxHeight:b}=r,{x:M,y:E,width:$,height:A,aspectRatio:k}=t,z=Math.floor(p?m-t.pointerX:0),N=Math.floor(y?x-t.pointerY:0),P=$+(f?-z:z),T=A+(d?-N:N),I=-o[0]*$,S=-o[1]*A,H=rs(P,v,w),B=rs(T,_,b);if(a){let t=0,e=0;f&&z<0?t=ra(M+z+I,a[0][0]):!f&&z>0&&(t=ru(M+P+I,a[1][0])),d&&N<0?e=ra(E+N+S,a[0][1]):!d&&N>0&&(e=ru(E+T+S,a[1][1])),H=Math.max(H,t),B=Math.max(B,e)}if(u){let t=0,e=0;f&&z>0?t=ru(M+z,u[0][0]):!f&&z<0&&(t=ra(M+P,u[1][0])),d&&N>0?e=ru(E+N,u[0][1]):!d&&N<0&&(e=ra(E+T,u[1][1])),H=Math.max(H,t),B=Math.max(B,e)}if(i){if(p){(H=Math.max(H,rs(P/k,_,b)*k),a)&&(H=Math.max(H,(f||d)&&(!f||d||!g)?ra(E+S+(f?z:-z)/k,a[0][1])*k:ru(E+S+P/k,a[1][1])*k));u&&(H=Math.max(H,(f||d)&&(!f||d||!g)?ru(E+(f?z:-z)/k,u[0][1])*k:ra(E+P/k,u[1][1])*k))}if(y){(B=Math.max(B,rs(T*k,v,w)/k),a)&&(B=Math.max(B,(f||d)&&(!d||f||!g)?ra(M+(d?N:-N)*k+I,a[0][0])/k:ru(M+T*k+I,a[1][0])/k));u&&(B=Math.max(B,(f||d)&&(!d||f||!g)?ru(M+(d?N:-N)*k,u[0][0])/k:ra(M+T*k,u[1][0])/k))}}N+=N<0?B:-B,z+=z<0?H:-H,i&&(g?P>T*k?N=((s=f,l=d,s?!l:l)?-z:z)/k:z=((c=f,h=d,c?!h:h)?-N:N)*k:p?(N=z/k,d=f):(z=N*k,f=d));let C=f?M+z:M,R=d?E+N:E;return{width:$+(f?-z:z),height:A+(d?-N:N),x:o[0]*z*(f?-1:1)+C,y:o[1]*N*(d?-1:1)+R}}(v,a.controlDirection,s,a.boundaries,a.keepAspectRatio,A,g,m),T=k!==M,I=z!==E,S=N!==c&&T,H=P!==f&&I;if(!S&&!H&&!T&&!I)return;if((S||H||1===A[0]||1===A[1])&&($.x=S?N:x.x,$.y=H?P:x.y,x.x=$.x,x.y=$.y,_.length>0)){let t=N-c,e=P-f;for(let n of _)n.position={x:n.position.x-t+A[0]*(k-M),y:n.position.y-e+A[1]*(z-E)},l.push(n)}if((T||I)&&($.width=T&&(!a.resizeDirection||"horizontal"===a.resizeDirection)?k:x.width,$.height=I&&(!a.resizeDirection||"vertical"===a.resizeDirection)?z:x.height,x.width=$.width,x.height=$.height),y&&p.expandParent){let t=A[0]*($.width??0);$.x&&$.x<t&&(x.x=t,v.x=v.x-($.x-t));let e=A[1]*($.height??0);$.y&&$.y<e&&(x.y=e,v.y=v.y-($.y-e))}let B=function({width:t,prevWidth:e,height:n,prevHeight:r,affectsX:i,affectsY:o}){let a=t-e,u=n-r,s=[a>0?1:a<0?-1:0,u>0?1:u<0?-1:0];return a&&i&&(s[0]=-1*s[0]),u&&o&&(s[1]=-1*s[1]),s}({width:x.width,prevWidth:M,height:x.height,prevHeight:E,affectsX:a.controlDirection.affectsX,affectsY:a.controlDirection.affectsY}),C={...x,direction:B};!1!==d?.(t,C)&&(b=!0,h?.(t,C),r($,l))}).on("end",t=>{b&&(f?.(t,{...x}),i?.({...x}),b=!1)});o.call(M)},destroy:function(){o.on(".drag",null)}}},"XY_RESIZER_HANDLE_POSITIONS",0,["top-left","top-right","bottom-left","bottom-right"],"XY_RESIZER_LINE_POSITIONS",0,["top","right","bottom","left"],"addEdge",0,(t,e,n={})=>{let r,i;if(!t.source||!t.target)return n.onError?.("006",e1.error006()),e;let o=n.getEdgeId||nC;return(i=r=e4(t)?{...t}:{...t,id:o(t)},e.some(t=>t.source===i.source&&t.target===i.target&&(t.sourceHandle===i.sourceHandle||!t.sourceHandle&&!i.sourceHandle)&&(t.targetHandle===i.targetHandle||!t.targetHandle&&!i.targetHandle)))?e:(null===r.sourceHandle&&delete r.sourceHandle,null===r.targetHandle&&delete r.targetHandle,e.concat(r))},"adoptUserNodes",0,function(t,e,n,r={}){let i=nW(nU,r),o={i:0},a=new Map(e),u=i?.elevateNodesOnSelect&&!nZ(i.zIndexMode)?1e3:0,s=t.length>0,l=!1;for(let c of(e.clear(),n.clear(),t)){let t=a.get(c.id);if(i.checkEquality&&c===t?.internals.userNode)e.set(c.id,t);else{let n=ni(e6(c,i.nodeOrigin),nM(c.extent)?c.extent:i.nodeExtent,nE(c));t={...i.defaults,...c,measured:{width:c.measured?.width,height:c.measured?.height},internals:{positionAbsolute:n,handleBounds:function(t,e){if(!t.handles)return t.measured?e?.internals.handleBounds:void 0;let n=[],r=[];for(let e of t.handles){let i={id:e.id,width:e.width??1,height:e.height??1,nodeId:t.id,x:e.x,y:e.y,position:e.position,type:e.type};"source"===e.type?n.push(i):"target"===e.type&&r.push(i)}return{source:n,target:r}}(c,t),z:nQ(c,u,i.zIndexMode),userNode:c}},e.set(c.id,t)}void 0!==t.measured&&void 0!==t.measured.width&&void 0!==t.measured.height||t.hidden||(s=!1),c.parentId&&nG(t,e,n,r,o),l||=c.selected??!1}return{nodesInitialized:s,hasSelectedNodes:l}},"areConnectionMapsEqual",0,function(t,e){if(!t&&!e)return!0;
1if(!t||!e||t.size!==e.size)return!1;if(!t.size&&!e.size)return!0;for(let n of t.keys())if(!e.has(n))return!1;return!0},"areSetsEqual",0,function(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0},"calcAutoPan",0,nu,"calculateNodePosition",0,ne,"createDevWarn",0,(t,e)=>(t,e)=>{},"createMarkerIds",0,function(t,{id:e,defaultColor:n,defaultMarkerStart:r,defaultMarkerEnd:i}){let o=new Set;return t.reduce((t,a)=>([a.markerStart||r,a.markerEnd||i].forEach(r=>{if(r&&"object"==typeof r){let i=nq(r,e);o.has(i)||(t.push({id:i,color:r.color||n,...r}),o.add(i))}}),t),[]).sort((t,e)=>t.id.localeCompare(e.id))},"defaultAriaLabelConfig",0,e5,"elementSelectionKeys",0,["Enter"," ","Escape"],"errorMessages",0,e1,"evaluateAbsolutePosition",0,function(t,e={width:0,height:0},n,r,i){let o={...t},a=r.get(n);if(a){let t=a.origin||i;o.x+=a.internals.positionAbsolute.x-(e.width??0)*t[0],o.y+=a.internals.positionAbsolute.y-(e.height??0)*t[1]}return o},"fitViewport",0,nt,"getBezierEdgeCenter",0,nI,"getBezierPath",0,function({sourceX:t,sourceY:e,sourcePosition:n=p.Bottom,targetX:r,targetY:i,targetPosition:o=p.Top,curvature:a=.25}){let[u,s]=nH({pos:n,x1:t,y1:e,x2:r,y2:i,c:a}),[l,c]=nH({pos:o,x1:r,y1:i,x2:t,y2:e,c:a}),[h,f,d,y]=nI({sourceX:t,sourceY:e,targetX:r,targetY:i,sourceControlX:u,sourceControlY:s,targetControlX:l,targetControlY:c});return[`M${t},${e} C${u},${s} ${l},${c} ${r},${i}`,h,f,d,y]},"getBoundsOfRects",0,nd,"getConnectedEdges",0,e7,"getConnectionStatus",0,function(t){return null===t?null:t?"valid":"invalid"},"getDimensions",0,nA,"getEdgeCenter",0,nB,"getEdgePosition",0,function(t){let{sourceNode:e,targetNode:n}=t;if(!nX(e)||!nX(n))return null;let r=e.internals.handleBounds||nO(e.handles),i=n.internals.handleBounds||nO(n.handles),o=nV(r?.source??[],t.sourceHandle),a=nV(t.connectionMode===l.Strict?i?.target??[]:(i?.target??[]).concat(i?.source??[]),t.targetHandle);if(!o||!a)return t.onError?.("008",e1.error008(!o?"source":"target",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;let u=o?.position||p.Bottom,s=a?.position||p.Top,c=nY(e,o,u),h=nY(n,a,s);return{sourceX:c.x,sourceY:c.y,targetX:h.x,targetY:h.y,sourcePosition:u,targetPosition:s}},"getEdgeToolbarTransform",0,function(t,e,n,r="center",i="center"){return`translate(${t}px, ${e}px) scale(${1/n}) translate(${-(nj[r]??50)}%, ${-(nF[i]??50)}%)`},"getElementsToRemove",0,nn,"getElevatedEdgeZIndex",0,function({sourceNode:t,targetNode:e,selected:n=!1,zIndex:r=0,elevateOnSelect:i=!1,zIndexMode:o="basic"}){if("manual"===o)return r;let a=Math.max(t.parentId||i&&t.selected?t.internals.z:0,e.parentId||i&&e.selected?e.internals.z:0);return(i&&n?r+1e3:r)+a},"getEventPosition",0,nP,"getHandlePosition",0,nY,"getHostForElement",0,nk,"getIncomers",0,(t,e,n)=>{if(!t.id)return[];let r=new Set;return n.forEach(e=>{e.target===t.id&&r.add(e.source)}),e.filter(t=>r.has(t.id))},"getInternalNodesBounds",0,e9,"getMarkerId",0,nq,"getNodeDimensions",0,nE,"getNodeToolbarTransform",0,function(t,e,n,r,i){let o=.5;"start"===i?o=0:"end"===i&&(o=1);let a=[(t.x+t.width*o)*e.zoom+e.x,t.y*e.zoom+e.y-r],u=[-100*o,-100];switch(n){case p.Right:a=[(t.x+t.width)*e.zoom+e.x+r,(t.y+t.height*o)*e.zoom+e.y],u=[0,-100*o];break;case p.Bottom:a[1]=(t.y+t.height)*e.zoom+e.y+r,u[1]=0;break;case p.Left:a=[t.x*e.zoom+e.x-r,(t.y+t.height*o)*e.zoom+e.y],u=[-100,-100*o]}return`translate(${a[0]}px, ${a[1]}px) translate(${u[0]}%, ${u[1]}%)`},"getNodesBounds",0,(t,e={nodeOrigin:[0,0]})=>{if(0===t.length)return{x:0,y:0,width:0,height:0};let n=!1,r=t.reduce((t,r)=>{let i="string"==typeof r,o=e.nodeLookup||i?void 0:r;return(e.nodeLookup&&(o=i?e.nodeLookup.get(r):e8(r)?r:e.nodeLookup.get(r.id)),o)?(n=!0,ns(t,nf(o,e.nodeOrigin))):t},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return n?nc(r):{x:0,y:0,width:0,height:0}},"getNodesInside",0,(t,e,[n,r,i]=[0,0,1],o=!1,a=!1)=>{let u=(e.x-n)/i,s=(e.y-r)/i,l=e.width/i,c=e.height/i,h=[];for(let e of t.values()){let{measured:t,selectable:n=!0,hidden:r=!1}=e;if(a&&!n||r)continue;let i=t.width??e.width??e.initialWidth??0,f=t.height??e.height??e.initialHeight??0,{x:d,y:p}=e.internals.positionAbsolute,y=np(u,s,l,c,d,p,i,f),g=i*f,m=o&&y>0;(!e.internals.handleBounds||m||y>=g||e.dragging)&&h.push(e)}return h},"getOutgoers",0,(t,e,n)=>{if(!t.id)return[];let r=new Set;
1return n.forEach(e=>{e.source===t.id&&r.add(e.target)}),e.filter(t=>r.has(t.id))},"getOverlappingArea",0,ny,"getSmoothStepPath",0,function({sourceX:t,sourceY:e,sourcePosition:n=p.Bottom,targetX:r,targetY:i,targetPosition:o=p.Top,borderRadius:a=5,centerX:u,centerY:s,offset:l=20,stepPosition:c=.5}){let[h,f,d,y,g]=function({source:t,sourcePosition:e=p.Bottom,target:n,targetPosition:r=p.Top,center:i,offset:o,stepPosition:a}){let u,s,l=nR[e],c=nR[r],h={x:t.x+l.x*o,y:t.y+l.y*o},f={x:n.x+c.x*o,y:n.y+c.y*o},d=nL({source:h,sourcePosition:e,target:f}),y=0!==d.x?"x":"y",g=d[y],m=[],x={x:0,y:0},v={x:0,y:0},[,,w,_]=nB({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(l[y]*c[y]==-1){"x"===y?(u=i.x??h.x+(f.x-h.x)*a,s=i.y??(h.y+f.y)/2):(u=i.x??(h.x+f.x)/2,s=i.y??h.y+(f.y-h.y)*a);let t=[{x:u,y:h.y},{x:u,y:f.y}],e=[{x:h.x,y:s},{x:f.x,y:s}];m=l[y]===g?"x"===y?t:e:"x"===y?e:t}else{let i=[{x:h.x,y:f.y}],a=[{x:f.x,y:h.y}];if(m="x"===y?l.x===g?a:i:l.y===g?i:a,e===r){let e=Math.abs(t[y]-n[y]);if(e<=o){let r=Math.min(o-1,o-e);l[y]===g?x[y]=(h[y]>t[y]?-1:1)*r:v[y]=(f[y]>n[y]?-1:1)*r}}if(e!==r){let t="x"===y?"y":"x",e=l[y]===c[t],n=h[t]>f[t],r=h[t]<f[t];(1===l[y]&&(!e&&n||e&&r)||1!==l[y]&&(!e&&r||e&&n))&&(m="x"===y?i:a)}let d={x:h.x+x.x,y:h.y+x.y},p={x:f.x+v.x,y:f.y+v.y};Math.max(Math.abs(d.x-m[0].x),Math.abs(p.x-m[0].x))>=Math.max(Math.abs(d.y-m[0].y),Math.abs(p.y-m[0].y))?(u=(d.x+p.x)/2,s=m[0].y):(u=m[0].x,s=(d.y+p.y)/2)}let b={x:h.x+x.x,y:h.y+x.y},M={x:f.x+v.x,y:f.y+v.y};return[[t,...b.x!==m[0].x||b.y!==m[0].y?[b]:[],...m,...M.x!==m[m.length-1].x||M.y!==m[m.length-1].y?[M]:[],n],u,s,w,_]}({source:{x:t,y:e},sourcePosition:n,target:{x:r,y:i},targetPosition:o,center:{x:u,y:s},offset:l,stepPosition:c}),m=`M${h[0].x} ${h[0].y}`;for(let t=1;t<h.length-1;t++)m+=function(t,e,n,r){let i=Math.min(nD(t,e)/2,nD(e,n)/2,r),{x:o,y:a}=e;if(t.x===o&&o===n.x||t.y===a&&a===n.y)return`L${o} ${a}`;if(t.y===a){let e=t.x<n.x?-1:1,r=t.y<n.y?1:-1;return`L ${o+i*e},${a}Q ${o},${a} ${o},${a+i*r}`}let u=t.x<n.x?1:-1,s=t.y<n.y?-1:1;return`L ${o},${a+i*s}Q ${o},${a} ${o+i*u},${a}`}(h[t-1],h[t],h[t+1],a);return[m+=`L${h[h.length-1].x} ${h[h.length-1].y}`,f,d,y,g]},"getStraightPath",0,function({sourceX:t,sourceY:e,targetX:n,targetY:r}){let[i,o,a,u]=nB({sourceX:t,sourceY:e,targetX:n,targetY:r});return[`M ${t},${e}L ${n},${r}`,i,o,a,u]},"getViewportForBounds",0,n_,"handleConnectionChange",0,function(t,e,n){if(!n)return;let r=[];t.forEach((t,n)=>{e?.has(n)||r.push(t)}),r.length&&n(r)},"handleExpandParent",0,nJ,"infiniteExtent",0,e2,"initialConnection",0,{inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null},"isEdgeBase",0,e4,"isEdgeVisible",0,function({sourceNode:t,targetNode:e,width:n,height:r,transform:i}){let o=ns(nf(t),nf(e));return o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1),ny({x:-i[0]/i[2],y:-i[1]/i[2],width:n/i[2],height:r/i[2]},nc(o))>0},"isInputDOMNode",0,function(t){let e=t.composedPath?.()?.[0]||t.target;return e?.nodeType===1&&(nz.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey"))},"isMacOs",0,nb,"isMouseEvent",0,nN,"isNodeBase",0,t=>!!t&&"object"==typeof t&&"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),"isNumeric",0,ng,"isRectObject",0,t=>ng(t.width)&&ng(t.height)&&ng(t.x)&&ng(t.y),"mergeAriaLabelConfig",0,function(t){return{...e5,...t||{}}},"nodeHasDimensions",0,function(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0},"nodeToRect",0,nh,"panBy",0,n0,"pointToRendererPoint",0,nx,"reconnectEdge",0,(t,e,n,r={shouldReplaceId:!0})=>{let{id:i,...o}=t;if(!e.source||!e.target)return r.onError?.("006",e1.error006()),n;if(!n.find(e=>e.id===t.id))return r.onError?.("007",e1.error007(i)),n;let a=r.getEdgeId||nC,u={...o,id:r.shouldReplaceId?a(e):i,source:e.source,target:e.target,sourceHandle:e.sourceHandle,targetHandle:e.targetHandle};return n.filter(t=>t.id!==i).concat(u)},"rendererPointToPoint",0,nv,"shallowNodeData",0,function(t,e){if(null===t||null===e)return!1;let n=Array.isArray(t)?t:[t],r=Array.isArray(e)?e:[e];if(n.length!==r.length)return!1;for(let t=0;t<n.length;t++)if(n[t].id!==r[t].id||n[t].type!==r[t].type||!Object.is(n[t].data,r[t].data))return!1;return!0},"snapPosition",0,nm,"updateAbsolutePositions",0,function(t,e,n){let r=nW(nK,n);for(let n of t.values())if(n.parentId)nG(n,t,e,r);else{let t=ni(e6(n,r.nodeOrigin),nM(n.extent)?n.extent:r.nodeExtent,nE(n));n.internals.positionAbsolute=t}},"updateConnectionLookup",0,function(t,e,n){for(let r of(t.clear(),e.clear(),n)){let{source:n,target:i,sourceHandle:o=null,targetHandle:a=null}=r,u={edgeId:r.id,source:n,target:i,sourceHandle:o,targetHandle:a},s=`${n}-${o}--${i}-${a}`;n1("source",u,`${i}-${a}
1--${n}-${o}`,t,n,o),n1("target",u,s,t,i,a),e.set(r.id,r)}},"updateNodeInternals",0,function(t,e,n,r,i,o,a){let u=r?.querySelector(".xyflow__viewport"),s=!1;if(!u)return{changes:[],updatedInternals:s};let l=[],c=window.getComputedStyle(u),{m22:h}=new window.DOMMatrixReadOnly(c.transform),f=[];for(let r of t.values()){let t=e.get(r.id);if(!t)continue;if(t.hidden){e.set(t.id,{...t,internals:{...t.internals,handleBounds:void 0}}),s=!0;continue}let u=nA(r.nodeElement),c=t.measured.width!==u.width||t.measured.height!==u.height;if(u.width&&u.height&&(c||!t.internals.handleBounds||r.force)){let d=r.nodeElement.getBoundingClientRect(),p=nM(t.extent)?t.extent:o,{positionAbsolute:y}=t.internals;if(t.parentId&&"parent"===t.extent){let n=e.get(t.parentId);n&&(y=no(y,u,n))}else p&&(y=ni(y,p,u));let g={...t,measured:u,internals:{...t.internals,positionAbsolute:y,handleBounds:{source:nT("source",r.nodeElement,d,h,t.id),target:nT("target",r.nodeElement,d,h,t.id)}}};e.set(t.id,g),t.parentId&&nG(g,e,n,{nodeOrigin:i,zIndexMode:a}),s=!0,c&&(l.push({id:t.id,type:"dimensions",dimensions:u}),t.expandParent&&t.parentId&&f.push({id:t.id,parentId:t.parentId,rect:nh(g,i)}
1))}}if(f.length>0){let t=nJ(f,e,n,i);l.push(...t)}return{changes:l,updatedInternals:s}},"withResolvers",0,function(){let t,e;return{promise:new Promise((n,r)=>{t=n,e=r}),resolve:t,reject:e}}],732331)}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.