1import{r as C,g as Wg,W as M,c as Pn}from"./react-vendor--NTErjm9.js";function b0(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const a=Object.getOwnPropertyDescriptor(r,i);a&&Object.defineProperty(e,i,a.get?a:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function ye(e){if(typeof e=="string"||typeof e=="number")return""+e;let t="";if(Array.isArray(e))for(let n=0,r;n<e.length;n++)(r=ye(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var Xg={exports:{}},Zg={},Qg={exports:{}},Jg={};/** 2 * @license React 3 * use-sync-external-store-shim.production.js 4 * 5 * Copyright (c) Meta Platforms, Inc. and affiliates. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE file in the root directory of this source tree. 9 */var jt=C;function w0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var x0=typeof Object.is=="function"?Object.is:w0,E0=jt.useState,S0=jt.useEffect,N0=jt.useLayoutEffect,R0=jt.useDebugValue;function A0(e,t){var n=t(),r=E0({inst:{value:n,getSnapshot:t}}),i=r[0].inst,a=r[1];return N0(function(){i.value=n,i.getSnapshot=t,Fr(i)&&a({inst:i})},[e,n,t]),S0(function(){return Fr(i)&&a({inst:i}),e(function(){Fr(i)&&a({inst:i})})},[e]),R0(n),n}function Fr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!x0(e,n)}catch{return!0}}function q0(e,t){return t()}var C0=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?q0:A0;Jg.useSyncExternalStore=jt.useSyncExternalStore!==void 0?jt.useSyncExternalStore:C0;Qg.exports=Jg;var I0=Qg.exports;/** 10 * @license React 11 * use-sync-external-store-shim/with-selector.production.js 12 * 13 * Copyright (c) Meta Platforms, Inc. and affiliates. 14 * 15 * This source code is licensed under the MIT license found in the 16 * LICENSE file in the root directory of this source tree. 17 */var cr=C,T0=I0;function M0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var P0=typeof Object.is=="function"?Object.is:M0,O0=T0.useSyncExternalStore,k0=cr.useRef,$0=cr.useEffect,D0=cr.useMemo,L0=cr.useDebugValue;Zg.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var a=k0(null);if(a.current===null){var o={hasValue:!1,value:null};a.current=o}else o=a.current;a=D0(function(){function u(h){if(!f){if(f=!0,c=h,h=r(h),i!==void 0&&o.hasValue){var v=o.value;if(i(v,h))return l=v}return l=h}if(v=l,P0(c,h))return v;var p=r(h);return i!==void 0&&i(v,p)?(c=h,v):(c=h,l=p)}var f=!1,c,l,d=n===void 0?null:n;return[function(){return u(t())},d===null?void 0:function(){return u(d())}]},[t,n,r,i]);var s=O0(e,a[0],a[1]);return $0(function(){o.hasValue=!0,o.value=s},[s]),L0(s),s};Xg.exports=Zg;var F0=Xg.exports;const z0=Wg(F0),H0={},Jc=e=>{let t;const n=new Set,r=(c,l)=>{const d=typeof c=="function"?c(t):c;if(!Object.is(d,t)){const h=t;t=l??(typeof d!="object"||d===null)?d:Object.assign({}
17,t,d),n.forEach(v=>v(t,h))}},i=()=>t,u={setState:r,getState:i,getInitialState:()=>f,subscribe:c=>(n.add(c),()=>n.delete(c)),destroy:()=>{(H0?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},f=t=e(r,i,u);return u},B0=e=>e?Jc(e):Jc,{useDebugValue:V0}=M,{useSyncExternalStoreWithSelector:G0}=z0,j0=e=>e;function ev(e,t=j0,n){const r=G0(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return V0(r),r}const ef=(e,t)=>{const n=B0(e),r=(i,a=t)=>ev(n,i,a);return Object.assign(r,n),r},U0=(e,t)=>e?ef(e,t):ef;function ge(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[r,i]of e)if(!Object.is(i,t.get(r)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const r of e)if(!t.has(r))return!1;return!0}const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(const r of n)if(!Object.prototype.hasOwnProperty.call(t,r)||!Object.is(e[r],t[r]))return!1;return!0}var K0={value:()=>{}};function Sn(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+"")||r in n||/[\s.]/.test(r))throw new Error("illegal type: "+r);n[r]=[]}return new jn(n)}function jn(e){this._=e}function Y0(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",i=n.indexOf(".");if(i>=0&&(r=n.slice(i+1),n=n.slice(0,i)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}jn.prototype=Sn.prototype={constructor:jn,on:function(e,t){var n=this._,r=Y0(e+"",n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=W0(n[i],e.name)))return i;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=tf(n[i],e.name,t);else if(t==null)for(i in n)n[i]=tf(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new jn(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=new Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function W0(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function tf(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=K0,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Gu="http://www.w3.org/1999/xhtml";const nf={svg:"http://www.w3.org/2000/svg",xhtml:Gu,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function fr(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),nf.hasOwnProperty(t)?{space:nf[t],local:e}:e}function X0(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Gu&&t.documentElement.namespaceURI===Gu?t.createElement(e):t.createElementNS(n,e)}}function Z0(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function tv(e){var t=fr(e);return(t.local?Z0:X0)(t)}function Q0(){}function cc(e){return e==null?Q0:function(){return this.querySelector(e)}}function J0(e){typeof e!="function"&&(e=cc(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=new Array(o),u,f,c=0;c<o;++c)(u=a[c])&&(f=e.call(u,u.__data__,c,a))&&("__data__"in u&&(f.__data__=u.__data__),s[c]=f);return new Ce(r,this._parents)}function e_(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function t_(){return[]}function nv(e){return e==null?t_:function(){return this.querySelectorAll(e)}}function n_(e){return function(){return e_(e.apply(this,arguments))}}function r_(e){typeof e=="function"?e=n_(e):e=nv(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,u,f=0;f<s;++f)(u=o[f])&&(r.push(e.call(u,u.__data__,f,o)),i.push(u));return new Ce(r,i)}function rv(e){return function(){return this.matches(e)}}function iv(e){return function(t){return t.matches(e)}}var i_=Array.prototype.find;function a_(e){return function(){return i_.call(this.children,e)}}function o_(){return this.firstElementChild}function s_(e){return this.select(e==null?o_:a_(typeof e=="function"?e:iv(e)))}var u_=Array.prototype.filter;function c_(){return Array.from(this.children)}function f_(e){return function(){return u_.call(this.children,e)}}function l_(e){return this.selectAll(e==null?c_:f_(typeof e=="function"?e:iv(e)))}function d_(e){typeof e!="function"&&(e=rv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],u,f=0;f<o;++f)(u=a[f])&&e.call(u,u.__data__,f,a)&&s.push(u);return new Ce(r,this._parents)}function av(e){return new Array(e.length)}function h_(){return new Ce(this._enter||this._groups.map(av),this._parents)}function Wn(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Wn.prototype={constructor:Wn,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function p_(e){return function(){return e}}function g_(e,t,n,r,i,a){for(var o=0,s,u=t.length,f=a.length;o<f;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new Wn(e,a[o]);for(;o<u;
vendor: 5,928 bytes, line 17
17++o)(s=t[o])&&(i[o]=s)}function v_(e,t,n,r,i,a,o){var s,u,f=new Map,c=t.length,l=a.length,d=new Array(c),h;for(s=0;s<c;++s)(u=t[s])&&(d[s]=h=o.call(u,u.__data__,s,t)+"",f.has(h)?i[s]=u:f.set(h,u));for(s=0;s<l;++s)h=o.call(e,a[s],s,a)+"",(u=f.get(h))?(r[s]=u,u.__data__=a[s],f.delete(h)):n[s]=new Wn(e,a[s]);for(s=0;s<c;++s)(u=t[s])&&f.get(d[s])===u&&(i[s]=u)}function y_(e){return e.__data__}function m_(e,t){if(!arguments.length)return Array.from(this,y_);var n=t?v_:g_,r=this._parents,i=this._groups;typeof e!="function"&&(e=p_(e));for(var a=i.length,o=new Array(a),s=new Array(a),u=new Array(a),f=0;f<a;++f){var c=r[f],l=i[f],d=l.length,h=__(e.call(c,c&&c.__data__,f,r)),v=h.length,p=s[f]=new Array(v),g=o[f]=new Array(v),y=u[f]=new Array(d);n(c,l,p,g,y,h,t);for(var _=0,w=0,m,S;_<v;++_)if(m=p[_]){for(_>=w&&(w=_+1);!(S=g[w])&&++w<v;);m._next=S||null}}return o=new Ce(o,r),o._enter=s,o._exit=u,o}function __(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function b_(){return new Ce(this._exit||this._groups.map(av),this._parents)}function w_(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(i=t(i),i&&(i=i.selection())),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function x_(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=new Array(i),u=0;u<o;++u)for(var f=n[u],c=r[u],l=f.length,d=s[u]=new Array(l),h,v=0;v<l;++v)(h=f[v]||c[v])&&(d[v]=h);for(;u<i;++u)s[u]=n[u];return new Ce(s,this._parents)}function E_(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function S_(e){e||(e=N_);function t(l,d){return l&&d?e(l.__data__,d.__data__):!l-!d}for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,u=i[a]=new Array(s),f,c=0;c<s;++c)(f=o[c])&&(u[c]=f);u.sort(t)}return new Ce(i,this._parents).order()}function N_(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function R_(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function A_(){return Array.from(this)}function q_(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function C_(){let e=0;for(const t of this)++e;return e}function I_(){return!this.node()}function T_(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function M_(e){return function(){this.removeAttribute(e)}}function P_(e){return function(){this.removeAttributeNS(e.space,e.local)}}function O_(e,t){return function(){this.setAttribute(e,t)}}function k_(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function $_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function D_(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function L_(e,t){var n=fr(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?P_:M_:typeof t=="function"?n.local?D_:$_:n.local?k_:O_)(n,t))}function ov(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function F_(e){return function(){this.style.removeProperty(e)}}function z_(e,t,n){return function(){this.style.setProperty(e,t,n)}}function H_(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function B_(e,t,n){return arguments.length>1?this.each((t==null?F_:typeof t=="function"?H_:z_)(e,t,n??"")):Ut(this.node(),e)}function Ut(e,t){return e.style.getPropertyValue(t)||ov(e).getComputedStyle(e,null).getPropertyValue(t)}function V_(e){return function(){delete this[e]}}function G_(e,t){return function(){this[e]=t}}function j_(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function U_(e,t){return arguments.length>1?this.each((t==null?V_:typeof t=="function"?j_:G_)(e,t)):this.node()[e]}function sv(e){return e.trim().split(/^|\s+/)}function fc(e){return e.classList||new uv(e)}function uv(e){this._node=e,this._names=sv(e.getAttribute("class")||"")}uv.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function cv(e,t){for(var n=fc(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function fv(e,t){for(var n=fc(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function K_(e){return function(){cv(this,e)}}function Y_(e){return function(){fv(this,e)}}function W_(e,t){return function(){(t.apply(this,arguments)?cv:fv)(this,e)}}function X_(e,t){var n=sv(e+"");if(arguments.length<2){for(var r=fc(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t=="function"?W_:t?K_:Y_)(n,t))}function Z_(){this.textContent=""}function Q_(e){return function(){this.textContent=e}}function J_(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function eb(e){return arguments.length?this.each(e==null?Z_:(typeof e=="function"?J_:Q_)(e)):this.node().textContent}function tb(){this.innerHTML=""}function nb(e){return function(){this.innerHTML=e}}function rb(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function ib(e){return arguments.length?this.each(e==null?tb:(typeof e=="function"?rb:nb)(e)):this.node().innerHTML}function ab(){this.nextSibling&&this.parentNode.appendChild(this)}function ob(){return this.each(ab)}
vendor: 4,322 bytes, line 17
17function sb(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ub(){return this.each(sb)}function cb(e){var t=typeof e=="function"?e:tv(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function fb(){return null}function lb(e,t){var n=typeof e=="function"?e:tv(e),r=t==null?fb:typeof t=="function"?t:cc(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function db(){var e=this.parentNode;e&&e.removeChild(this)}function hb(){return this.each(db)}function pb(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function gb(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function vb(e){return this.select(e?gb:pb)}function yb(e){return arguments.length?this.property("__data__",e):this.node().__data__}function mb(e){return function(t){e.call(this,t,this.__data__)}}function _b(e){return e.trim().split(/^|\s+/).map(function(t){var n="",r=t.indexOf(".");return r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),{type:t,name:n}})}function bb(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function wb(e,t,n){return function(){var r=this.__on,i,a=mb(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function xb(e,t,n){var r=_b(e+""),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var u=0,f=s.length,c;u<f;++u)for(i=0,c=s[u];i<a;++i)if((o=r[i]).type===c.type&&o.name===c.name)return c.value}return}for(s=t?wb:bb,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function lv(e,t,n){var r=ov(e),i=r.CustomEvent;typeof i=="function"?i=new i(t,n):(i=r.document.createEvent("Event"),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Eb(e,t){return function(){return lv(this,e,t)}}function Sb(e,t){return function(){return lv(this,e,t.apply(this,arguments))}}function Nb(e,t){return this.each((typeof t=="function"?Sb:Eb)(e,t))}function*Rb(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var dv=[null];function Ce(e,t){this._groups=e,this._parents=t}function Nn(){return new Ce([[document.documentElement]],dv)}function Ab(){return this}Ce.prototype=Nn.prototype={constructor:Ce,select:J0,selectAll:r_,selectChild:s_,selectChildren:l_,filter:d_,data:m_,enter:h_,exit:b_,join:w_,merge:x_,selection:Ab,order:E_,sort:S_,call:R_,nodes:A_,node:q_,size:C_,empty:I_,each:T_,attr:L_,style:B_,property:U_,classed:X_,text:eb,html:ib,raise:ob,lower:ub,append:cb,insert:lb,remove:hb,clone:vb,datum:yb,on:xb,dispatch:Nb,[Symbol.iterator]:Rb};function Ie(e){return typeof e=="string"?new Ce([[document.querySelector(e)]],[document.documentElement]):new Ce([[e]],dv)}function qb(e){let t;for(;t=e.sourceEvent;)e=t;return e}function $e(e,t){if(e=qb(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,r=r.matrixTransform(t.getScreenCTM().inverse()),[r.x,r.y]}if(t.getBoundingClientRect){var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]}}return[e.pageX,e.pageY]}const Cb={passive:!1},vn={capture:!0,passive:!1};function zr(e){e.stopImmediatePropagation()}function Bt(e){e.preventDefault(),e.stopImmediatePropagation()}function hv(e){var t=e.document.documentElement,n=Ie(e).on("dragstart.drag",Bt,vn);"onselectstart"in t?n.on("selectstart.drag",Bt,vn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function pv(e,t){var n=e.document.documentElement,r=Ie(e).on("dragstart.drag",null);t&&(r.on("click.drag",Bt,vn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}
vendor: 16,819 bytes, line 17
17const On=e=>()=>e;function ju(e,{sourceEvent:t,subject:n,target:r,identifier:i,active:a,x:o,y:s,dx:u,dy:f,dispatch:c}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,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:a,enumerable:!0,configurable:!0},x:{value:o,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:u,enumerable:!0,configurable:!0},dy:{value:f,enumerable:!0,configurable:!0},_:{value:c}})}ju.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function Ib(e){return!e.ctrlKey&&!e.button}function Tb(){return this.parentNode}function Mb(e,t){return t??{x:e.x,y:e.y}}function Pb(){return navigator.maxTouchPoints||"ontouchstart"in this}function Ob(){var e=Ib,t=Tb,n=Mb,r=Pb,i={},a=Sn("start","drag","end"),o=0,s,u,f,c,l=0;function d(m){m.on("mousedown.drag",h).filter(r).on("touchstart.drag",g).on("touchmove.drag",y,Cb).on("touchend.drag touchcancel.drag",_).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(m,S){if(!(c||!e.call(this,m,S))){var x=w(this,t.call(this,m,S),m,S,"mouse");x&&(Ie(m.view).on("mousemove.drag",v,vn).on("mouseup.drag",p,vn),hv(m.view),zr(m),f=!1,s=m.clientX,u=m.clientY,x("start",m))}}function v(m){if(Bt(m),!f){var S=m.clientX-s,x=m.clientY-u;f=S*S+x*x>l}i.mouse("drag",m)}function p(m){Ie(m.view).on("mousemove.drag mouseup.drag",null),pv(m.view,f),Bt(m),i.mouse("end",m)}function g(m,S){if(e.call(this,m,S)){var x=m.changedTouches,R=t.call(this,m,S),I=x.length,A,P;for(A=0;A<I;++A)(P=w(this,R,m,S,x[A].identifier,x[A]))&&(zr(m),P("start",m,x[A]))}}function y(m){var S=m.changedTouches,x=S.length,R,I;for(R=0;R<x;++R)(I=i[S[R].identifier])&&(Bt(m),I("drag",m,S[R]))}function _(m){var S=m.changedTouches,x=S.length,R,I;for(c&&clearTimeout(c),c=setTimeout(function(){c=null},500),R=0;R<x;++R)(I=i[S[R].identifier])&&(zr(m),I("end",m,S[R]))}function w(m,S,x,R,I,A){var P=a.copy(),T=$e(A||x,S),$,O,b;if((b=n.call(m,new ju("beforestart",{sourceEvent:x,target:d,identifier:I,active:o,x:T[0],y:T[1],dx:0,dy:0,dispatch:P}),R))!=null)return $=b.x-T[0]||0,O=b.y-T[1]||0,function q(E,k,L){var N=T,D;switch(E){case"start":i[I]=q,D=o++;break;case"end":delete i[I],--o;case"drag":T=$e(L||k,S),D=o;break}P.call(E,m,new ju(E,{sourceEvent:k,subject:b,target:d,identifier:I,active:D,x:T[0]+$,y:T[1]+O,dx:T[0]-N[0],dy:T[1]-N[1],dispatch:P}),R)}}return d.filter=function(m){return arguments.length?(e=typeof m=="function"?m:On(!!m),d):e},d.container=function(m){return arguments.length?(t=typeof m=="function"?m:On(m),d):t},d.subject=function(m){return arguments.length?(n=typeof m=="function"?m:On(m),d):n},d.touchable=function(m){return arguments.length?(r=typeof m=="function"?m:On(!!m),d):r},d.on=function(){var m=a.on.apply(a,arguments);return m===a?d:m},d.clickDistance=function(m){return arguments.length?(l=(m=+m)*m,d):Math.sqrt(l)},d}function lc(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function gv(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Rn(){}var yn=.7,Xn=1/yn,Vt="\\s*([+-]?\\d+)\\s*",mn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ue="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",kb=/^#([0-9a-f]{3,8})$/,$b=new RegExp(`^rgb\\(${Vt},${Vt},${Vt}\\)$`),Db=new RegExp(`^rgb\\(${Ue},${Ue},${Ue}\\)$`),Lb=new RegExp(`^rgba\\(${Vt},${Vt},${Vt},${mn}\\)$`),Fb=new RegExp(`^rgba\\(${Ue},${Ue},${Ue},${mn}\\)$`),zb=new RegExp(`^hsl\\(${mn},${Ue},${Ue}\\)$`),Hb=new RegExp(`^hsla\\(${mn},${Ue},${Ue},${mn}\\)$`),rf={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};lc(Rn,_n,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:af,formatHex:af,formatHex8:Bb,formatHsl:Vb,formatRgb:of,toString:of});function af(){return this.rgb().formatHex()}function Bb(){return this.rgb().formatHex8()}function Vb(){return vv(this).formatHsl()}function of(){return this.rgb().formatRgb()}function _n(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=kb.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?sf(t):n===3?new Se(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?kn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?kn(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$b.exec(e))?new Se(t[1],t[2],t[3],1):(t=Db.exec(e))?new Se(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Lb.exec(e))?kn(t[1],t[2],t[3],t[4]):(t=Fb.exec(e))?kn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=zb.exec(e))?ff(t[1],t[2]/100,t[3]/100,1):(t=Hb.exec(e))?ff(t[1],t[2]/100,t[3]/100,t[4]):rf.hasOwnProperty(e)?sf(rf[e]):e==="transparent"?new Se(NaN,NaN,NaN,0):null}function sf(e){return new Se(e>>16&255,e>>8&255,e&255,1)}function kn(e,t,n,r){return r<=0&&(e=t=n=NaN),new Se(e,t,n,r)}function Gb(e){return e instanceof Rn||(e=_n(e)),e?(e=e.rgb(),new Se(e.r,e.g,e.b,e.opacity)):new Se}function Uu(e,t,n,r){return arguments.length===1?Gb(e):new Se(e,t,n,r??1)}function Se(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}lc(Se,Uu,gv(Rn,{brighter(e){return e=e==null?Xn:Math.pow(Xn,e),new Se(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?yn:Math.pow(yn,e),new Se(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Se(Rt(this.r),Rt(this.g),Rt(this.b),Zn(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:uf,formatHex:uf,formatHex8:jb,formatRgb:cf,toString:cf}));function uf(){return`#${Et(this.r)}${Et(this.g)}${Et(this.b)}`}function jb(){return`#${Et(this.r)}${Et(this.g)}${Et(this.b)}${Et((isNaN(this.opacity)?1:this.opacity)*255)}`}function cf(){const e=Zn(this.opacity);return`${e===1?"rgb(":"rgba("}${Rt(this.r)}, ${Rt(this.g)}, ${Rt(this.b)}${e===1?")":`, ${e})`}`}function Zn(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rt(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Et(e){return e=Rt(e),(e<16?"0":"")+e.toString(16)}function ff(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new De(e,t,n,r)}function vv(e){if(e instanceof De)return new De(e.h,e.s,e.l,e.opacity);if(e instanceof Rn||(e=_n(e)),!e)return new De;if(e instanceof De)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,u=(a+i)/2;return s?(t===a?o=(n-r)/s+(n<r)*6:n===a?o=(r-t)/s+2:o=(t-n)/s+4,s/=u<.5?a+i:2-a-i,o*=60):s=u>0&&u<1?0:o,new De(o,s,u,e.opacity)}function Ub(e,t,n,r){return arguments.length===1?vv(e):new De(e,t,n,r??1)}function De(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}lc(De,Ub,gv(Rn,{brighter(e){return e=e==null?Xn:Math.pow(Xn,e),new De(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?yn:Math.pow(yn,e),new De(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new Se(Hr(e>=240?e-240:e+120,i,r),Hr(e,i,r),Hr(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new De(lf(this.h),$n(this.s),$n(this.l),Zn(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(){const e=Zn(this.opacity);return`${e===1?"hsl(":"hsla("}${lf(this.h)}, ${$n(this.s)*100}%, ${$n(this.l)*100}%${e===1?")":`, ${e})`}`}}));function lf(e){return e=(e||0)%360,e<0?e+360:e}function $n(e){return Math.max(0,Math.min(1,e||0))}function Hr(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const yv=e=>()=>e;function Kb(e,t){return function(n){return e+n*t}}function Yb(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(r){return Math.pow(e+r*t,n)}}function Wb(e){return(e=+e)==1?mv:function(t,n){return n-t?Yb(t,n,e):yv(isNaN(t)?n:t)}}function mv(e,t){var n=t-e;return n?Kb(e,n):yv(isNaN(e)?t:e)}const df=function e(t){var n=Wb(t);function r(i,a){var o=n((i=Uu(i)).r,(a=Uu(a)).r),s=n(i.g,a.g),u=n(i.b,a.b),f=mv(i.opacity,a.opacity);return function(c){return i.r=o(c),i.g=s(c),i.b=u(c),i.opacity=f(c),i+""}}return r.gamma=e,r}(1);function lt(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ku=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Br=new RegExp(Ku.source,"g");function Xb(e){return function(){return e}}function Zb(e){return function(t){return e(t)+""}}function Qb(e,t){var n=Ku.lastIndex=Br.lastIndex=0,r,i,a,o=-1,s=[],u=[];for(e=e+"",t=t+"";(r=Ku.exec(e))&&(i=Br.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,u.push({i:o,x:lt(r,i)})),n=Br.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?u[0]?Zb(u[0].x):Xb(t):(t=u.length,function(f){for(var c=0,l;c<t;++c)s[(l=u[c]).i]=l.x(f);return s.join("")})}var hf=180/Math.PI,Yu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function _v(e,t,n,r,i,a){var o,s,u;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(u=e*n+t*r)&&(n-=e*u,r-=t*u),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,u/=s),e*r<t*n&&(e=-e,t=-t,u=-u,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*hf,skewX:Math.atan(u)*hf,scaleX:o,scaleY:s}}var Dn;function Jb(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Yu:_v(t.a,t.b,t.c,t.d,t.e,t.f)}function ew(e){return e==null||(Dn||(Dn=document.createElementNS("http://www.w3.org/2000/svg","g")),Dn.setAttribute("transform",e),!(e=Dn.transform.baseVal.consolidate()))?Yu:(e=e.matrix,_v(e.a,e.b,e.c,e.d,e.e,e.f))}function bv(e,t,n,r){function i(f){return f.length?f.pop()+" ":""}function a(f,c,l,d,h,v){if(f!==l||c!==d){var p=h.push("translate(",null,t,null,n);v.push({i:p-4,x:lt(f,l)},{i:p-2,x:lt(c,d)})}else(l||d)&&h.push("translate("+l+t+d+n)}function o(f,c,l,d){f!==c?(f-c>180?c+=360:c-f>180&&(f+=360),d.push({i:l.push(i(l)+"rotate(",null,r)-2,x:lt(f,c)})):c&&l.push(i(l)+"rotate("+c+r)}function s(f,c,l,d){f!==c?d.push({i:l.push(i(l)+"skewX(",null,r)-2,x:lt(f,c)}):c&&l.push(i(l)+"skewX("+c+r)}function u(f,c,l,d,h,v){if(f!==l||c!==d){var p=h.push(i(h)+"scale(",null,",",null,")");v.push({i:p-4,x:lt(f,l)},{i:p-2,x:lt(c,d)})}else(l!==1||d!==1)&&h.push(i(h)+"scale("+l+","+d+")")}return function(f,c){var l=[],d=[];return f=e(f),c=e(c),a(f.translateX,f.translateY,c.translateX,c.translateY,l,d),o(f.rotate,c.rotate,l,d),s(f.skewX,c.skewX,l,d),u(f.scaleX,f.scaleY,c.scaleX,c.scaleY,l,d),f=c=null,function(h){for(var v=-1,p=d.length,g;++v<p;)l[(g=d[v]).i]=g.x(h);return l.join("")}}}var tw=bv(Jb,"px, ","px)","deg)"),nw=bv(ew,", ",")",")"),rw=1e-12;function pf(e){return((e=Math.exp(e))+1/e)/2}function iw(e){return((e=Math.exp(e))-1/e)/2}function aw(e){return((e=Math.exp(2*e))-1)/(e+1)}const ow=function e(t,n,r){function i(a,o){var s=a[0],u=a[1],f=a[2],c=o[0],l=o[1],d=o[2],h=c-s,v=l-u,p=h*h+v*v,g,y;if(p<rw)y=Math.log(d/f)/t,g=function(R){return[s+R*h,u+R*v,f*Math.exp(t*R*y)]};else{var _=Math.sqrt(p),w=(d*d-f*f+r*p)/(2*f*n*_),m=(d*d-f*f-r*p)/(2*d*n*_),S=Math.log(Math.sqrt(w*w+1)-w),x=Math.log(Math.sqrt(m*m+1)-m);y=(x-S)/t,g=function(R){var I=R*y,A=pf(S),P=f/(n*_)*(A*aw(t*I+S)-iw(S));return[s+P*h,u+P*v,f*A/pf(t*I+S)]}}return g.duration=y*1e3*t/Math.SQRT2,g}return i.rho=function(a){var o=Math.max(.001,+a),s=o*o,u=s*s;return e(o,s,u)},i}(Math.SQRT2,2,4);var Kt=0,sn=0,tn=0,wv=1e3,Qn,un,Jn=0,Ct=0,lr=0,bn=typeof performance=="object"&&performance.now?performance:Date,xv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function dc(){return Ct||(xv(sw),Ct=bn.now()+lr)}function sw(){Ct=0}function er(){this._call=this._time=this._next=null}er.prototype=hc.prototype={constructor:er,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?dc():+n)+(t==null?0:+t),!this._next&&un!==this&&(un?un._next=this:Qn=this,un=this),this._call=e,this._time=n,Wu()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wu())}};function hc(e,t,n){var r=new er;return r.restart(e,t,n),r}function uw(){dc(),++Kt;for(var e=Qn,t;e;)(t=Ct-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Kt}function gf(){Ct=(Jn=bn.now())+lr,Kt=sn=0;try{uw()}finally{Kt=0,fw(),Ct=0}}function cw(){var e=bn.now(),t=e-Jn;t>wv&&(lr-=t,Jn=e)}function fw(){for(var e,t=Qn,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Qn=n);un=e,Wu(r)}function Wu(e){if(!Kt){sn&&(sn=clearTimeout(sn));var t=e-Ct;t>24?(e<1/0&&(sn=setTimeout(gf,e-bn.now()-lr)),tn&&(tn=clearInterval(tn))):(tn||(Jn=bn.now(),tn=setInterval(cw,wv)),Kt=1,xv(gf))}}function vf(e,t,n){var r=new er;return t=t==null?0:+t,r.restart(i=>{r.stop(),e(i+t)},t,n),r}var lw=Sn("start","end","cancel","interrupt"),dw=[],Ev=0,yf=1,Xu=2,Un=3,mf=4,Zu=5,Kn=6;function dr(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;hw(e,n,{name:t,index:r,group:i,on:lw,tween:dw,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Ev})}function pc(e,t){var n=Fe(e,t);if(n.state>Ev)throw new Error("too late; already scheduled");return n}function Ke(e,t){var n=Fe(e,t);if(n.state>Un)throw new Error("too late; already running");return n}function Fe(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function hw(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=hc(a,0,n.time);function a(f){n.state=yf,n.timer.restart(o,n.delay,n.time),n.delay<=f&&o(f-n.delay)}function o(f){var c,l,d,h;if(n.state!==yf)return u();for(c in r)if(h=r[c],h.name===n.name){if(h.state===Un)return vf(o);h.state===mf?(h.state=Kn,h.timer.stop(),h.on.call("interrupt",e,e.__data__,h.index,h.group),delete r[c]):+c<t&&(h.state=Kn,h.timer.stop(),h.on.call("cancel",e,e.__data__,h.index,h.group),delete r[c])}if(vf(function(){n.state===Un&&(n.state=mf,n.timer.restart(s,n.delay,n.time),s(f))}),n.state=Xu,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Xu){for(n.state=Un,i=new Array(d=n.tween.length),c=0,l=-1;c<d;++c)(h=n.tween[c].value.call(e,e.__data__,n.index,n.group))&&(i[
vendor: 6,287 bytes, line 17
17++l]=h);i.length=l+1}}function s(f){for(var c=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(u),n.state=Zu,1),l=-1,d=i.length;++l<d;)i[l].call(e,c);n.state===Zu&&(n.on.call("end",e,e.__data__,n.index,n.group),u())}function u(){n.state=Kn,n.timer.stop(),delete r[t];for(var f in r)return;delete e.__transition}}function Yn(e,t){var n=e.__transition,r,i,a=!0,o;if(n){t=t==null?null:t+"";for(o in n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>Xu&&r.state<Zu,r.state=Kn,r.timer.stop(),r.on.call(i?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function pw(e){return this.each(function(){Yn(this,e)})}function gw(e,t){var n,r;return function(){var i=Ke(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function vw(e,t,n){var r,i;if(typeof n!="function")throw new Error;return function(){var a=Ke(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},u=0,f=i.length;u<f;++u)if(i[u].name===t){i[u]=s;break}u===f&&i.push(s)}a.tween=i}}function yw(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Fe(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?gw:vw)(n,e,t))}function gc(e,t,n){var r=e._id;return e.each(function(){var i=Ke(this,r);(i.value||(i.value={}))[t]=n.apply(this,arguments)}),function(i){return Fe(i,r).value[t]}}function Sv(e,t){var n;return(typeof t=="number"?lt:t instanceof _n?df:(n=_n(t))?(t=n,df):Qb)(e,t)}function mw(e){return function(){this.removeAttribute(e)}}function _w(e){return function(){this.removeAttributeNS(e.space,e.local)}}function bw(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function ww(e,t,n){var r,i=n+"",a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function xw(e,t,n){var r,i,a;return function(){var o,s=n(this),u;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),u=s+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,s)))}}function Ew(e,t,n){var r,i,a;return function(){var o,s=n(this),u;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),u=s+"",o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,s)))}}function Sw(e,t){var n=fr(e),r=n==="transform"?nw:Sv;return this.attrTween(e,typeof t=="function"?(n.local?Ew:xw)(n,r,gc(this,"attr."+e,t)):t==null?(n.local?_w:mw)(n):(n.local?ww:bw)(n,r,t))}function Nw(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Rw(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function Aw(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Rw(e,a)),n}return i._value=t,i}function qw(e,t){var n,r;function i(){var a=t.apply(this,arguments);return a!==r&&(n=(r=a)&&Nw(e,a)),n}return i._value=t,i}function Cw(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var r=fr(e);return this.tween(n,(r.local?Aw:qw)(r,t))}function Iw(e,t){return function(){pc(this,e).delay=+t.apply(this,arguments)}}function Tw(e,t){return t=+t,function(){pc(this,e).delay=t}}function Mw(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Iw:Tw)(t,e)):Fe(this.node(),t).delay}function Pw(e,t){return function(){Ke(this,e).duration=+t.apply(this,arguments)}}function Ow(e,t){return t=+t,function(){Ke(this,e).duration=t}}function kw(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?Pw:Ow)(t,e)):Fe(this.node(),t).duration}function $w(e,t){if(typeof t!="function")throw new Error;return function(){Ke(this,e).ease=t}}function Dw(e){var t=this._id;return arguments.length?this.each($w(t,e)):Fe(this.node(),t).ease}function Lw(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ke(this,e).ease=n}}function Fw(e){if(typeof e!="function")throw new Error;return this.each(Lw(this._id,e))}function zw(e){typeof e!="function"&&(e=rv(e));for(var t=this._groups,n=t.length,r=new Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],u,f=0;f<o;++f)(u=a[f])&&e.call(u,u.__data__,f,a)&&s.push(u);return new rt(r,this._parents,this._name,this._id)}function Hw(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var u=t[s],f=n[s],c=u.length,l=o[s]=new Array(c),d,h=0;h<c;++h)(d=u[h]||f[h])&&(l[h]=d);for(;s<r;++s)o[s]=t[s];return new rt(o,this._parents,this._name,this._id)}function Bw(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function Vw(e,t,n){var r,i,a=Bw(t)?pc:Ke;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function Gw(e,t){var n=this._id;return arguments.length<2?Fe(this.node(),n).on.on(e):this.each(Vw(n,e,t))}function jw(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Uw(){return this.on("end.remove",jw(this._id))}function Kw(e){var t=this._name,n=this._id;typeof e!="function"&&(e=cc(e));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s=r[o],u=s.length,f=a[o]=new Array(u),c,l,d=0;d<u;++d)(c=s[d])&&(l=e.call(c,c.__data__,d,s))&&("__data__"in c&&(l.__data__=c.__data__),f[d]=l,dr(f[d],t,n,d,f,Fe(c,n)));return new rt(a,this._parents,t,n)}function Yw(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nv(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var u=r[s],f=u.length,c,l=0;l<f;++l)if(c=u[l]){for(var d=e.call(c,c.__data__,l,u),h,v=Fe(c,n),p=0,g=d.length;p<g;++p)(h=d[p])&&dr(h,t,n,p,d,v);a.push(d),o.push(c)}return new rt(a,o,t,n)}var Ww=Nn.prototype.constructor;function Xw(){return new Ww(this._groups,this._parents)}function Zw(e,t){var n,r,i;return function(){var a=Ut(this,e),o=(this.style.removeProperty(e),Ut(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function Nv(e){return function(){this.style.removeProperty(e)}}function Qw(e,t,n){var r,i=n+"",a;return function(){var o=Ut(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}
vendor: 13,605 bytes, line 17
17function Jw(e,t,n){var r,i,a;return function(){var o=Ut(this,e),s=n(this),u=s+"";return s==null&&(u=s=(this.style.removeProperty(e),Ut(this,e))),o===u?null:o===r&&u===i?a:(i=u,a=t(r=o,s))}}function e1(e,t){var n,r,i,a="style."+t,o="end."+a,s;return function(){var u=Ke(this,e),f=u.on,c=u.value[a]==null?s||(s=Nv(t)):void 0;(f!==n||i!==c)&&(r=(n=f).copy()).on(o,i=c),u.on=r}}function t1(e,t,n){var r=(e+="")=="transform"?tw:Sv;return t==null?this.styleTween(e,Zw(e,r)).on("end.style."+e,Nv(e)):typeof t=="function"?this.styleTween(e,Jw(e,r,gc(this,"style."+e,t))).each(e1(this._id,e)):this.styleTween(e,Qw(e,r,t),n).on("end.style."+e,null)}function n1(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function r1(e,t,n){var r,i;function a(){var o=t.apply(this,arguments);return o!==i&&(r=(i=o)&&n1(e,o,n)),r}return a._value=t,a}function i1(e,t,n){var r="style."+(e+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!="function")throw new Error;return this.tween(r,r1(e,t,n??""))}function a1(e){return function(){this.textContent=e}}function o1(e){return function(){var t=e(this);this.textContent=t??""}}function s1(e){return this.tween("text",typeof e=="function"?o1(gc(this,"text",e)):a1(e==null?"":e+""))}function u1(e){return function(t){this.textContent=e.call(this,t)}}function c1(e){var t,n;function r(){var i=e.apply(this,arguments);return i!==n&&(t=(n=i)&&u1(i)),t}return r._value=e,r}function f1(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,c1(e))}function l1(){for(var e=this._name,t=this._id,n=Rv(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,u,f=0;f<s;++f)if(u=o[f]){var c=Fe(u,t);dr(u,e,n,f,o,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new rt(r,this._parents,e,n)}function d1(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},u={value:function(){--i===0&&a()}};n.each(function(){var f=Ke(this,r),c=f.on;c!==e&&(t=(e=c).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(u)),f.on=t}),i===0&&a()})}var h1=0;function rt(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Rv(){return++h1}var Ze=Nn.prototype;rt.prototype={constructor:rt,select:Kw,selectAll:Yw,selectChild:Ze.selectChild,selectChildren:Ze.selectChildren,filter:zw,merge:Hw,selection:Xw,transition:l1,call:Ze.call,nodes:Ze.nodes,node:Ze.node,size:Ze.size,empty:Ze.empty,each:Ze.each,on:Gw,attr:Sw,attrTween:Cw,style:t1,styleTween:i1,text:s1,textTween:f1,remove:Uw,tween:yw,delay:Mw,duration:kw,ease:Dw,easeVarying:Fw,end:d1,[Symbol.iterator]:Ze[Symbol.iterator]};const tI=e=>+e;function nI(e){return--e*e*e+1}function p1(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var g1={time:null,delay:0,duration:250,ease:p1};function v1(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function y1(e){var t,n;e instanceof rt?(t=e._id,e=e._name):(t=Rv(),(n=g1).time=dc(),e=e==null?null:e+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,u,f=0;f<s;++f)(u=o[f])&&dr(u,e,t,f,o,n||v1(u,t));return new rt(r,this._parents,e,t)}Nn.prototype.interrupt=pw;Nn.prototype.transition=y1;const Ln=e=>()=>e;function m1(e,{sourceEvent:t,target:n,transform:r,dispatch:i}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:i}})}function Je(e,t,n){this.k=e,this.x=t,this.y=n}Je.prototype={constructor:Je,scale:function(e){return e===1?this:new Je(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Je(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var nt=new Je(1,0,0);Je.prototype;function Vr(e){e.stopImmediatePropagation()}function nn(e){e.preventDefault(),e.stopImmediatePropagation()}function _1(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function b1(){var e=this;return e instanceof SVGElement?(e=e.ownerSVGElement||e,e.hasAttribute("viewBox")?(e=e.viewBox.baseVal,[[e.x,e.y],[e.x+e.width,e.y+e.height]]):[[0,0],[e.width.baseVal.value,e.height.baseVal.value]]):[[0,0],[e.clientWidth,e.clientHeight]]}function _f(){return this.__zoom||nt}function w1(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function x1(){return navigator.maxTouchPoints||"ontouchstart"in this}function E1(e,t,n){var r=e.invertX(t[0][0])-n[0][0],i=e.invertX(t[1][0])-n[1][0],a=e.invertY(t[0][1])-n[0][1],o=e.invertY(t[1][1])-n[1][1];return e.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}function Av(){var e=_1,t=b1,n=E1,r=w1,i=x1,a=[0,1/0],o=[[-1/0,-1/0],[1/0,1/0]],s=250,u=ow,f=Sn("start","zoom","end"),c,l,d,h=500,v=150,p=0,g=10;function y(b){b.property("__zoom",_f).on("wheel.zoom",I,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",P).filter(i).on("touchstart.zoom",T).on("touchmove.zoom",$).on("touchend.zoom touchcancel.zoom",O).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}y.transform=function(b,q,E,k){var L=b.selection?b.selection():b;L.property("__zoom",_f),b!==L?S(b,q,E,k):L.interrupt().each(function(){x(this,arguments).event(k).start().zoom(null,typeof q=="function"?q.apply(this,arguments):q).end()})},y.scaleBy=function(b,q,E,k){y.scaleTo(b,function(){var L=this.__zoom.k,N=typeof q=="function"?q.apply(this,arguments):q;return L*N},E,k)},y.scaleTo=function(b,q,E,k){y.transform(b,function(){var L=t.apply(this,arguments),N=this.__zoom,D=E==null?m(L):typeof E=="function"?E.apply(this,arguments):E,F=N.invert(D),z=typeof q=="function"?q.apply(this,arguments):q;return n(w(_(N,z),D,F),L,o)},E,k)},y.translateBy=function(b,q,E,k){y.transform(b,function(){return n(this.__zoom.translate(typeof q=="function"?q.apply(this,arguments):q,typeof E=="function"?E.apply(this,arguments):E),t.apply(this,arguments),o)},null,k)},y.translateTo=function(b,q,E,k,L){y.transform(b,function(){var N=t.apply(this,arguments),D=this.__zoom,F=k==null?m(N):typeof k=="function"?k.apply(this,arguments):k;return n(nt.translate(F[0],F[1]).scale(D.k).translate(typeof q=="function"?-q.apply(this,arguments):-q,typeof E=="function"?-E.apply(this,arguments):-E),N,o)},k,L)};function _(b,q){return q=Math.max(a[0],Math.min(a[1],q)),q===b.k?b:new Je(q,b.x,b.y)}function w(b,q,E){var k=q[0]-E[0]*b.k,L=q[1]-E[1]*b.k;return k===b.x&&L===b.y?b:new Je(b.k,k,L)}function m(b){return[(+b[0][0]+ +b[1][0])/2,(+b[0][1]+ +b[1][1])/2]}function S(b,q,E,k){b.on("start.zoom",function(){x(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){x(this,arguments).event(k).end()}).tween("zoom",function(){var L=this,N=arguments,D=x(L,N).event(k),F=t.apply(L,N),z=E==null?m(F):typeof E=="function"?E.apply(L,N):E,B=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),H=L.__zoom,U=typeof q=="function"?q.apply(L,N):q,W=u(H.invert(z).concat(B/H.k),U.invert(z).concat(B/U.k));return function(Q){if(Q===1)Q=U;else{var te=W(Q),ee=B/te[2];Q=new Je(ee,z[0]-te[0]*ee,z[1]-te[1]*ee)}D.zoom(null,Q)}})}function x(b,q,E){return!E&&b.__zooming||new R(b,q)}function R(b,q){this.that=b,this.args=q,this.active=0,this.sourceEvent=null,this.extent=t.apply(b,q),this.taps=0}R.prototype={event:function(b){return b&&(this.sourceEvent=b),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(b,q){return this.mouse&&b!=="mouse"&&(this.mouse[1]=q.invert(this.mouse[0])),this.touch0&&b!=="touch"&&(this.touch0[1]=q.invert(this.touch0[0])),this.touch1&&b!=="touch"&&(this.touch1[1]=q.invert(this.touch1[0])),this.that.__zoom=q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(b){var q=Ie(this.that).datum();f.call(b,this.that,new m1(b,{sourceEvent:this.sourceEvent,target:y,transform:this.that.__zoom,dispatch:f}),q)}};function I(b,...q){if(!e.apply(this,arguments))return;var E=x(this,q).event(b),k=this.__zoom,L=Math.max(a[0],Math.min(a[1],k.k*Math.pow(2,r.apply(this,arguments)))),N=$e(b);if(E.wheel)(E.mouse[0][0]!==N[0]||E.mouse[0][1]!==N[1])&&(E.mouse[1]=k.invert(E.mouse[0]=N)),clearTimeout(E.wheel);else{if(k.k===L)return;E.mouse=[N,k.invert(N)],Yn(this),E.start()}nn(b),E.wheel=setTimeout(D,v),E.zoom("mouse",n(w(_(k,L),E.mouse[0],E.mouse[1]),E.extent,o));function D(){E.wheel=null,E.end()}}function A(b,...q){if(d||!e.apply(this,arguments))return;var E=b.currentTarget,k=x(this,q,!0).event(b),L=Ie(b.view).on("mousemove.zoom",z,!0).on("mouseup.zoom",B,!0),N=$e(b,E),D=b.clientX,F=b.clientY;hv(b.view),Vr(b),k.mouse=[N,this.__zoom.invert(N)],Yn(this),k.start();function z(H){if(nn(H),!k.moved){var U=H.clientX-D,W=H.clientY-F;k.moved=U*U+W*W>p}k.event(H).zoom("mouse",n(w(k.that.__zoom,k.mouse[0]=$e(H,E),k.mouse[1]),k.extent,o))}function B(H){L.on("mousemove.zoom mouseup.zoom",null),pv(H.view,k.moved),nn(H),k.event(H).end()}}function P(b,...q){if(e.apply(this,arguments)){var E=this.__zoom,k=$e(b.changedTouches?b.changedTouches[0]:b,this),L=E.invert(k),N=E.k*(b.shiftKey?.5:2),D=n(w(_(E,N),k,L),t.apply(this,q),o);nn(b),s>0?Ie(this).transition().duration(s).call(S,D,k,b):Ie(this).call(y.transform,D,k,b)}}function T(b,...q){if(e.apply(this,arguments)){var E=b.touches,k=E.length,L=x(this,q,b.changedTouches.length===k).event(b),N,D,F,z;for(Vr(b),D=0;D<k;++D)F=E[D],z=$e(F,this),z=[z,this.__zoom.invert(z),F.identifier],L.touch0?!L.touch1&&L.touch0[2]!==z[2]&&(L.touch1=z,L.taps=0):(L.touch0=z,N=!0,L.taps=1+!!c);c&&(c=clearTimeout(c)),N&&(L.taps<2&&(l=z[0],c=setTimeout(function(){c=null},h)),Yn(this),L.start())}}function $(b,...q){if(this.__zooming){var E=x(this,q).event(b),k=b.changedTouches,L=k.length,N,D,F,z;for(nn(b),N=0;N<L;++N)D=k[N],F=$e(D,this),E.touch0&&E.touch0[2]===D.identifier?E.touch0[0]=F:E.touch1&&E.touch1[2]===D.identifier&&(E.touch1[0]=F);if(D=E.that.__zoom,E.touch1){var B=E.touch0[0],H=E.touch0[1],U=E.touch1[0],W=E.touch1[1],Q=(Q=U[0]-B[0])*Q+(Q=U[1]-B[1])*Q,te=(te=W[0]-H[0])*te+(te=W[1]-H[1])*te;D=_(D,Math.sqrt(Q/te)),F=[(B[0]+U[0])/2,(B[1]+U[1])/2],z=[(H[0]+W[0])/2,(H[1]+W[1])/2]}else if(E.touch0)F=E.touch0[0],z=E.touch0[1];else return;E.zoom("touch",n(w(D,F,z),E.extent,o))}}function O(b,...q){if(this.__zooming){var E=x(this,q).event(b),k=b.changedTouches,L=k.length,N,D;for(Vr(b),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),N=0;N<L;++N)D=k[N],E.touch0&&E.touch0[2]===D.identifier?delete E.touch0:E.touch1&&E.touch1[2]===D.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(D=$e(D,this),Math.hypot(l[0]-D[0],l[1]-D[1])<g)){var F=Ie(this).on("dblclick.zoom");F&&F.apply(this,arguments)}}}return y.wheelDelta=function(b){return arguments.length?(r=typeof b=="function"?b:Ln(+b),y):r},y.filter=function(b){return arguments.length?(e=typeof b=="function"?b:Ln(!!b),y):e},y.touchable=function(b){return arguments.length?(i=typeof b=="function"?b:Ln(!!b),y):i},y.extent=function(b){return arguments.length?(t=typeof b=="function"?b:Ln([[+b[0][0],+b[0][1]],[+b[1][0],+b[1][1]]]),y):t},y.scaleExtent=function(b){return arguments.length?(a[0]=+b[0],a[1]=+b[1],y):[a[0],a[1]]},y.translateExtent=function(b){return arguments.length?(o[0][0]=+b[0][0],o[1][0]=+b[1][0],o[0][1]=+b[0][1],o[1][1]=+b[1][1],y):[[o[0][0],o[0][1]],[o[1][0],o[1][1]]]},y.constrain=function(b){return arguments.length?(n=b,y):n},y.duration=function(b){return arguments.length?(s=+b,y):s},y.interpolate=function(b){return arguments.length?(u=b,y):u},y.on=function(){var b=f.on.apply(f,arguments);return b===f?y:b},y.clickDistance=function(b){return arguments.length?(p=(b=+b)*b,y):Math.sqrt(p)},y.tapDistance=function(b){return arguments.length?(g=+b,y):g},y}const hr=C.createContext(null),S1=hr.Provider,it={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.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:e=>`Node type "${e}" not found. Using fallback type "default".`,error004:()=>"The React Flow 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:e=>`The old edge with id=${e} does not exist.`,error009:e=>`Marker type "${e}" doesn't exist.`,error008:(e,t)=>`Couldn't create edge for ${e?"target":"source"} handle id: "${e?t.targetHandle:t.sourceHandle}", edge id: ${t.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:e=>`Edge type "${e}" not found. Using fallback type "default".`,error012:e=>
17`Node with id "${e}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},qv=it.error001();function re(e,t){const n=C.useContext(hr);if(n===null)throw new Error(qv);return ev(n,e,t)}const le=()=>{const e=C.useContext(hr);if(e===null)throw new Error(qv);return C.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},N1=e=>e.userSelectionActive?"none":"all";function vc({position:e,children:t,className:n,style:r,...i}){const a=re(N1),o=`${e}`.split("-");return M.createElement("div",{className:ye(["react-flow__panel",n,...o]),style:{...r,pointerEvents:a},...i},t)}function R1({proOptions:e,position:t="bottom-right"}){return e?.hideAttribution?null:M.createElement(vc,{position:t,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},M.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const A1=({x:e,y:t,label:n,labelStyle:r={},labelShowBg:i=!0,labelBgStyle:a={},labelBgPadding:o=[2,4],labelBgBorderRadius:s=2,children:u,className:f,...c})=>{const l=C.useRef(null),[d,h]=C.useState({x:0,y:0,width:0,height:0}),v=ye(["react-flow__edge-textwrapper",f]);return C.useEffect(()=>{if(l.current){const p=l.current.getBBox();h({x:p.x,y:p.y,width:p.width,height:p.height})}},[n]),typeof n>"u"||!n?null:M.createElement("g",{transform:`translate(${e-d.width/2} ${t-d.height/2})`,className:v,visibility:d.width?"visible":"hidden",...c},i&&M.createElement("rect",{width:d.width+2*o[0],x:-o[0],y:-o[1],height:d.height+2*o[1],className:"react-flow__edge-textbg",style:a,rx:s,ry:s}),M.createElement("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:l,style:r},n),u)};var q1=C.memo(A1);const yc=e=>({width:e.offsetWidth,height:e.offsetHeight}),Yt=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),mc=(e={x:0,y:0},t)=>({x:Yt(e.x,t[0][0],t[1][0]),y:Yt(e.y,t[0][1],t[1][1])}),bf=(e,t,n)=>e<t?Yt(Math.abs(e-t),1,50)/50:e>n?-Yt(Math.abs(e-n),1,50)/50:0,Cv=(e,t)=>{const n=bf(e.x,35,t.width-35)*20,r=bf(e.y,35,t.height-35)*20;return[n,r]},Iv=e=>e.getRootNode?.()||window?.document,Tv=(e,t)=>({x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x2,t.x2),y2:Math.max(e.y2,t.y2)}),wn=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Mv=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),wf=e=>({...e.positionAbsolute||{x:0,y:0},width:e.width||0,height:e.height||0}),C1=(e,t)=>Mv(Tv(wn(e),wn(t))),Qu=(e,t)=>{const n=Math.max(0,Math.min(e.x+e.width,t.x+t.width)-Math.max(e.x,t.x)),r=Math.max(0,Math.min(e.y+e.height,t.y+t.height)-Math.max(e.y,t.y));return Math.ceil(n*r)},I1=e=>Te(e.width)&&Te(e.height)&&Te(e.x)&&Te(e.y),Te=e=>!isNaN(e)&&isFinite(e),oe=Symbol.for("internals"),Pv=["Enter"," ","Escape"],T1=(e,t)=>{},M1=e=>"nativeEvent"in e;function Ju(e){const n=(M1(e)?e.nativeEvent:e).composedPath?.()?.[0]||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n?.nodeName)||n?.hasAttribute("contenteditable")||!!n?.closest(".nokey")}const Ov=e=>"clientX"in e,vt=(e,t)=>{const n=Ov(e),r=n?e.clientX:e.touches?.[0].clientX,i=n?e.clientY:e.touches?.[0].clientY;return{x:r-(t?.left??0),y:i-(t?.top??0)}},tr=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,An=({id:e,path:t,labelX:n,labelY:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:f,style:c,markerEnd:l,markerStart:d,interactionWidth:h=20})=>M.createElement(M.Fragment,null,M.createElement("path",{id:e,style:c,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:l,markerStart:d}),h&&M.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),i&&Te(n)&&Te(r)?M.createElement(q1,{x:n,y:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:f}):null);An.displayName="BaseEdge";function rn(e,t,n){return n===void 0?n:r=>{const i=t().edges.find(a=>a.id===e);i&&n(r,{...i})}}function kv({sourceX:e,sourceY:t,targetX:n,targetY:r}){const i=Math.abs(n-e)/2,a=n<e?n+i:n-i,o=Math.abs(r-t)/2,s=r<t?r+o:r-o;return[a,s,i,o]}function $v({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:i,sourceControlY:a,targetControlX:o,targetControlY:s}){const u=e*.125+i*.375+o*.375+n*.125,f=t*.125+a*.375+s*.375+r*.125,c=Math.abs(u-e),l=Math.abs(f-t);return[u,f,c,l]}var It;(function(e){e.Strict="strict",e.Loose="loose"})(It||(It={}));var St;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(St||(St={}));var xn;(function(e){e.Partial="partial",e.Full="full"})(xn||(xn={}));var ht;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(ht||(ht={}));var nr;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(nr||(nr={}));var j;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(j||(j={}));function xf({pos:e,x1:t,y1:n,x2:r,y2:i}){return e===j.Left||e===j.Right?[.5*(t+r),n]:[t,.5*(n+i)]}function Dv({sourceX:e,sourceY:t,sourcePosition:n=j.Bottom,targetX:r,targetY:i,targetPosition:a=j.Top}){const[o,s]=xf({pos:n,x1:e,y1:t,x2:r,y2:i}),[u,f]=xf({pos:a,x1:r,y1:i,x2:e,y2:t}),[c,l,d,h]=$v({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:o,sourceControlY:s,targetControlX:u,targetControlY:f});return[`M${e},${t} C${o},${s} ${u},${f} ${r},${i}`,c,l,d,h]}const _c=C.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=j.Bottom,targetPosition:a=j.Top,label:o,labelStyle:s,labelShowBg:u,labelBgStyle:f,labelBgPadding:c,labelBgBorderRadius:l,style:d,markerEnd:h,markerStart:v,interactionWidth:p})=>{const[g,y,_]=Dv({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:a});return M.createElement(An,{path:g,labelX:y,labelY:_,label:o,labelStyle:s,labelShowBg:u,labelBgStyle:f,labelBgPadding:c,labelBgBorderRadius:l,style:d,markerEnd:h,markerStart:v,interactionWidth:p})});_c.displayName="SimpleBezierEdge";const Ef={[j.Left]:{x:-1,y:0},[j.Right]:{x:1,y:0},[j.Top]:{x:0,y:-1},[j.Bottom]:{x:0,y:1}},P1=({source:e,sourcePosition:t=j.Bottom,target:n})=>t===j.Left||t===j.Right?e.x<n.x?{x:1,y:0}:{x:-1,y:0}:e.y<n.y?{x:0,y:1}:{x:0,y:-1},Sf=(e,t)=>
17Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function O1({source:e,sourcePosition:t=j.Bottom,target:n,targetPosition:r=j.Top,center:i,offset:a}){const o=Ef[t],s=Ef[r],u={x:e.x+o.x*a,y:e.y+o.y*a},f={x:n.x+s.x*a,y:n.y+s.y*a},c=P1({source:u,sourcePosition:t,target:f}),l=c.x!==0?"x":"y",d=c[l];let h=[],v,p;const g={x:0,y:0},y={x:0,y:0},[_,w,m,S]=kv({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(o[l]*s[l]===-1){v=i.x??_,p=i.y??w;const R=[{x:v,y:u.y},{x:v,y:f.y}],I=[{x:u.x,y:p},{x:f.x,y:p}];o[l]===d?h=l==="x"?R:I:h=l==="x"?I:R}else{const R=[{x:u.x,y:f.y}],I=[{x:f.x,y:u.y}];if(l==="x"?h=o.x===d?I:R:h=o.y===d?R:I,t===r){const O=Math.abs(e[l]-n[l]);if(O<=a){const b=Math.min(a-1,a-O);o[l]===d?g[l]=(u[l]>e[l]?-1:1)*b:y[l]=(f[l]>n[l]?-1:1)*b}}if(t!==r){const O=l==="x"?"y":"x",b=o[l]===s[O],q=u[O]>f[O],E=u[O]<f[O];(o[l]===1&&(!b&&q||b&&E)||o[l]!==1&&(!b&&E||b&&q))&&(h=l==="x"?R:I)}const A={x:u.x+g.x,y:u.y+g.y},P={x:f.x+y.x,y:f.y+y.y},T=Math.max(Math.abs(A.x-h[0].x),Math.abs(P.x-h[0].x)),$=Math.max(Math.abs(A.y-h[0].y),Math.abs(P.y-h[0].y));T>
17=$?(v=(A.x+P.x)/2,p=h[0].y):(v=h[0].x,p=(A.y+P.y)/2)}return[[e,{x:u.x+g.x,y:u.y+g.y},...h,{x:f.x+y.x,y:f.y+y.y},n],v,p,m,S]}function k1(e,t,n,r){const i=Math.min(Sf(e,t)/2,Sf(t,n)/2,r),{x:a,y:o}=t;if(e.x===a&&a===n.x||e.y===o&&o===n.y)return`L${a} ${o}`;if(e.y===o){const f=e.x<n.x?-1:1,c=e.y<n.y?1:-1;return`L ${a+i*f},${o}Q ${a},${o} ${a},${o+i*c}`}const s=e.x<n.x?1:-1,u=e.y<n.y?-1:1;return`L ${a},${o+i*u}Q ${a},${o} ${a+i*s},${o}`}function ec({sourceX:e,sourceY:t,sourcePosition:n=j.Bottom,targetX:r,targetY:i,targetPosition:a=j.Top,borderRadius:o=5,centerX:s,centerY:u,offset:f=20}){const[c,l,d,h,v]=O1({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:i},targetPosition:a,center:{x:s,y:u},offset:f});return[c.reduce((g,y,_)=>{let w="";return _>0&&_<c.length-1?w=k1(c[_-1],y,c[_+1],o):w=`${_===0?"M":"L"}${y.x} ${y.y}`,g+=w,g},""),l,d,h,v]}const pr=C.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:f,style:c,sourcePosition:l=j.Bottom,targetPosition:d=j.Top,markerEnd:h,markerStart:v,pathOptions:p,interactionWidth:g})=>{const[y,_,w]=ec({sourceX:e,sourceY:t,sourcePosition:l,targetX:n,targetY:r,targetPosition:d,borderRadius:p?.borderRadius,offset:p?.offset});return M.createElement(An,{path:y,labelX:_,labelY:w,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:f,style:c,markerEnd:h,markerStart:v,interactionWidth:g})});pr.displayName="SmoothStepEdge";const bc=C.memo(e=>M.createElement(pr,{...e,pathOptions:C.useMemo(()=>({borderRadius:0,offset:e.pathOptions?.offset}),[e.pathOptions?.offset])}));bc.displayName="StepEdge";function $1({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[i,a,o,s]=kv({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,i,a,o,s]}const wc=C.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:f,style:c,markerEnd:l,markerStart:d,interactionWidth:h})=>{const[v,p,g]=$1({sourceX:e,sourceY:t,targetX:n,targetY:r});return M.createElement(An,{path:v,labelX:p,labelY:g,label:i,labelStyle:a,labelShowBg:o,labelBgStyle:s,labelBgPadding:u,labelBgBorderRadius:f,style:c,markerEnd:l,markerStart:d,interactionWidth:h})});wc.displayName="StraightEdge";function Fn(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Nf({pos:e,x1:t,y1:n,x2:r,y2:i,c:a}){switch(e){case j.Left:return[t-Fn(t-r,a),n];case j.Right:return[t+Fn(r-t,a),n];case j.Top:return[t,n-Fn(n-i,a)];case j.Bottom:return[t,n+Fn(i-n,a)]}}function Lv({sourceX:e,sourceY:t,sourcePosition:n=j.Bottom,targetX:r,targetY:i,targetPosition:a=j.Top,curvature:o=.25}){const[s,u]=Nf({pos:n,x1:e,y1:t,x2:r,y2:i,c:o}),[f,c]=Nf({pos:a,x1:r,y1:i,x2:e,y2:t,c:o}),[l,d,h,v]=$v({sourceX:e,sourceY:t,targetX:r,targetY:i,sourceControlX:s,sourceControlY:u,targetControlX:f,targetControlY:c});return[`M${e},${t} C${s},${u} ${f},${c} ${r},${i}`,l,d,h,v]}const rr=C.memo(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:i=j.Bottom,targetPosition:a=j.Top,label:o,labelStyle:s,labelShowBg:u,labelBgStyle:f,labelBgPadding:c,labelBgBorderRadius:l,style:d,markerEnd:h,markerStart:v,pathOptions:p,interactionWidth:g})=>{const[y,_,w]=Lv({sourceX:e,sourceY:t,sourcePosition:i,targetX:n,targetY:r,targetPosition:a,curvature:p?.curvature});return M.createElement(An,{path:y,labelX:_,labelY:w,label:o,labelStyle:s,labelShowBg:u,labelBgStyle:f,labelBgPadding:c,labelBgBorderRadius:l,style:d,markerEnd:h,markerStart:v,interactionWidth:g})});rr.displayName="BezierEdge";const xc=C.createContext(null),D1=xc.Provider;xc.Consumer;const L1=()=>C.useContext(xc),F1=e=>"id"in e&&"source"in e&&"target"in e,z1=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,tc=(e,t)=>typeof e>"u"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,H1=(e,t)=>t.some(n=>n.source===e.source&&n.target===e.target&&(n.sourceHandle===e.sourceHandle||!n.sourceHandle&&!e.sourceHandle)&&(n.targetHandle===e.targetHandle||!n.targetHandle&&!e.targetHandle)),B1=(e,t)=>{if(!e.source||!e.target)return t;let n;return F1(e)?n={...e}:n={...e,id:z1(e)},H1(n,t)?t:t.concat(n)},nc=({x:e,y:t},[n,r,i],a,[o,s])=>{const u={x:(e-n)/i,y:(t-r)/i};return a?{x:o*Math.round(u.x/o),y:s*Math.round(u.y/s)}:u},Fv=({x:e,y:t},[n,r,i])=>({x:e*i+n,y:t*i+r}),At=(e,t=[0,0])=>{if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(e.width??0)*t[0],r=(e.height??0)*t[1],i={x:e.position.x-n,y:e.position.y-r};return{...i,positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:i}},gr=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,i)=>{const{x:a,y:o}=At(i,t).positionAbsolute;return Tv(r,wn({x:a,y:o,width:i.width||0,height:i.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Mv(n)},zv=(e,t,[n,r,i]=[0,0,1],a=!1,o=!1,s=[0,0])=>{const u={x:(t.x-n)/i,y:(t.y-r)/i,width:t.width/i,height:t.height/i},f=[];return e.forEach(c=>{const{width:l,height:d,selectable:h=!0,hidden:v=!1}=c;if(o&&!h||v)return!1;const{positionAbsolute:p}=At(c,s),g={x:p.x,y:p.y,width:l||0,height:d||0},y=Qu(u,g),_=typeof l>"u"||typeof d>"u"||l===null||d===null,w=a&&y>0,m=(l||0)*(d||0);(_||w||y>=m||c.dragging)&&f.push(c)}),f},Hv=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},Bv=(e,t,n,r,i,a=.1)=>{const o=t/(e.width*(1+a)),s=n/(e.height*(1+a)),u=Math.min(o,s),f=Yt(u,r,i),c=e.x+e.width/2,l=e.y+e.height/2,d=t/2-c*f,h=n/2-l*f;return{x:d,y:h,zoom:f}},xt=(e,t=0)=>e.transition().duration(t);function Rf(e,t,n,r){return(t[n]||[]).reduce((i,a)=>(`${e.id}-${a.id}-${n}`!==r&&i.push({id:a.id||null,type:n,nodeId:e.id,x:(e.positionAbsolute?.x??0)+a.x+a.width/2,y:(e.positionAbsolute?.y??0)+a.y+a.height/2}),i),[])}function V1(e,t,n,r,i,a){const{x:o,y:s}=vt(e),f=t.elementsFromPoint(o,s).find(v=>v.classList.contains("react-flow__handle"));if(f){const v=f.getAttribute("data-nodeid");if(v){const p=Ec(void 0,f),g=f.getAttribute("data-handleid"),y=a({nodeId:v,id:g,type:p});if(y){const _=i.find(w=>w.nodeId===v&&w.type===p&&w.id===g);return{handle:{id:g,type:p,nodeId:v,x:_?.x||n.x,y:_?.y||n.y},validHandleResult:y}}}}let c=[],l=1/0;if(i.forEach(v=>{const p=Math.sqrt((v.x-n.x)**2+(v.y-n.y)**2);if(p<=r){const g=a(v);p<=l&&(p<l?c=[{handle:v,validHandleResult:g}]:p===l&&c.push({handle:v,validHandleResult:g}),l=p)}}),!c.length)return{handle:null,validHandleResult:Vv()};if(c.length===1)return c[0];const d=c.some(({validHandleResult:v})=>v.isValid),h=c.some(({handle:v})=>v.type==="target");return c.find(({handle:v,validHandleResult:p})=>h?v.type==="target":d?p.isValid:!0)||c[0]}const G1={source:null,target:null,sourceHandle:null,targetHandle:null},Vv=()=>
17({handleDomNode:null,isValid:!1,connection:G1,endHandle:null});function Gv(e,t,n,r,i,a,o){const s=i==="target",u=o.querySelector(`.react-flow__handle[data-id="${e?.nodeId}-${e?.id}-${e?.type}"]`),f={...Vv(),handleDomNode:u};if(u){const c=Ec(void 0,u),l=u.getAttribute("data-nodeid"),d=u.getAttribute("data-handleid"),h=u.classList.contains("connectable"),v=u.classList.contains("connectableend"),p={source:s?l:n,sourceHandle:s?d:r,target:s?n:l,targetHandle:s?r:d};f.connection=p,h&&v&&(t===It.Strict?s&&c==="source"||!s&&c==="target":l!==n||d!==r)&&(f.endHandle={nodeId:l,handleId:d,type:c},f.isValid=a(p))}return f}function j1({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((i,a)=>{if(a[oe]){const{handleBounds:o}=a[oe];let s=[],u=[];o&&(s=Rf(a,o,"source",`${t}-${n}-${r}`),u=Rf(a,o,"target",`${t}-${n}-${r}`)),i.push(...s,...u)}return i},[])}function Ec(e,t){return e||(t?.classList.contains("target")?"target":t?.classList.contains("source")?"source":null)}function Gr(e){e?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function U1(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function jv({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:i,getState:a,setState:o,isValidConnection:s,edgeUpdaterType:u,onReconnectEnd:f}){const c=Iv(e.target),{connectionMode:l,domNode:d,autoPanOnConnect:h,connectionRadius:v,onConnectStart:p,panBy:g,getNodes:y,cancelConnection:_}=a();let w=0,m;const{x:S,y:x}=vt(e),R=c?.elementFromPoint(S,x),I=Ec(u,R),A=d?.getBoundingClientRect();if(!A||!I)return;let P,T=vt(e,A),$=!1,O=null,b=!1,q=null;const E=j1({nodes:y(),nodeId:n,handleId:t,handleType:I}),k=()=>{if(!h)return;const[D,F]=Cv(T,A);g({x:D,y:F}),w=requestAnimationFrame(k)};o({connectionPosition:T,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:I,connectionStartHandle:{nodeId:n,handleId:t,type:I},connectionEndHandle:null}),p?.(e,{nodeId:n,handleId:t,handleType:I});function L(D){const{transform:F}=a();T=vt(D,A);const{handle:z,validHandleResult:B}=V1(D,c,nc(T,F,!1,[1,1]),v,E,H=>Gv(H,l,n,t,i?"target":"source",s,c));if(m=z,$||(k(),$=!0),q=B.handleDomNode,O=B.connection,b=B.isValid,o({connectionPosition:m&&b?Fv({x:m.x,y:m.y},F):T,connectionStatus:U1(!!m,b),connectionEndHandle:B.endHandle}),!m&&!b&&!q)return Gr(P);O.source!==O.target&&q&&(Gr(P),P=q,q.classList.add("connecting","react-flow__handle-connecting"),q.classList.toggle("valid",b),q.classList.toggle("react-flow__handle-valid",b))}function N(D){(m||q)&&O&&b&&r?.(O),a().onConnectEnd?.(D),u&&f?.(D),Gr(P),_(),cancelAnimationFrame(w),$=!1,b=!1,O=null,q=null,c.removeEventListener("mousemove",L),c.removeEventListener("mouseup",N),c.removeEventListener("touchmove",L),c.removeEventListener("touchend",N)}c.addEventListener("mousemove",L),c.addEventListener("mouseup",N),c.addEventListener("touchmove",L),c.addEventListener("touchend",N)}const Af=()=>!0,K1=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Y1=(e,t,n)=>r=>{const{connectionStartHandle:i,connectionEndHandle:a,connectionClickStartHandle:o}=r;return{connecting:i?.nodeId===e&&i?.handleId===t&&i?.type===n||a?.nodeId===e&&a?.handleId===t&&a?.type===n,clickConnecting:o?.nodeId===e&&o?.handleId===t&&o?.type===n}},Uv=C.forwardRef(({type:e="source",position:t=j.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:i=!0,isConnectableEnd:a=!0,id:o,onConnect:s,children:u,className:f,onMouseDown:c,onTouchStart:l,...d},h)=>{const v=o||null,p=e==="target",g=le(),y=L1(),{connectOnClick:_,noPanClassName:w}=re(K1,ge),{connecting:m,clickConnecting:S}=re(Y1(y,v,e),ge);y||g.getState().onError?.("010",it.error010());const x=A=>{const{defaultEdgeOptions:P,onConnect:T,hasDefaultEdges:$}=g.getState(),O={...P,...A};if($){const{edges:b,setEdges:q}=g.getState();q(B1(O,b))}T?.(O),s?.(O)},R=A=>{if(!y)return;const P=Ov(A);i&&(P&&A.button===0||!P)&&jv({event:A,handleId:v,nodeId:y,onConnect:x,isTarget:p,getState:g.getState,setState:g.setState,isValidConnection:n||g.getState().isValidConnection||Af}),P?c?.(A):l?.(A)},I=A=>{const{onClickConnectStart:P,onClickConnectEnd:T,connectionClickStartHandle:$,connectionMode:O,isValidConnection:b}=g.getState();if(!y||!$&&!i)return;if(!$){P?.(A,{nodeId:y,handleId:v,handleType:e}),g.setState({connectionClickStartHandle:{nodeId:y,type:e,handleId:v}});return}const q=Iv(A.target),E=n||b||Af,{connection:k,isValid:L}=Gv({nodeId:y,id:v,type:e},O,$.nodeId,$.handleId||null,$.type,E,q);L&&x(k),T?.(A),g.setState({connectionClickStartHandle:null})};return M.createElement("div",{"data-handleid":v,"data-nodeid":y,"data-handlepos":t,"data-id":`${y}-${v}-${e}`,className:ye(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",w,f,{source:!p,target:p,connectable:r,connectablestart:i,connectableend:a,connecting:S,connectionindicator:r&&(i&&!m||a&&m)}]),onMouseDown:R,onTouchStart:R,onClick:_?I:void 0,ref:h,...d},u)});Uv.displayName="Handle";var ir=C.memo(Uv);const Kv=({data:e,isConnectable:t,targetPosition:n=j.Top,sourcePosition:r=j.Bottom})=>M.createElement(M.Fragment,null,M.createElement(ir,{type:"target",position:n,isConnectable:t}),e?.label,M.createElement(ir,{type:"source",position:r,isConnectable:t}));Kv.displayName="DefaultNode";var rc=C.memo(Kv);const Yv=({data:e,isConnectable:t,sourcePosition:n=j.Bottom})=>M.createElement(M.Fragment,null,e?.label,M.createElement(ir,{type:"source",position:n,isConnectable:t}));Yv.displayName="InputNode";var Wv=C.memo(Yv);const Xv=({data:e,isConnectable:t,targetPosition:n=j.Top})=>M.createElement(M.Fragment,null,M.createElement(ir,{type:"target",position:n,isConnectable:t}),e?.label);Xv.displayName="OutputNode";
17var Zv=C.memo(Xv);const Sc=()=>null;Sc.displayName="GroupNode";const W1=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>({...t}))}),zn=e=>e.id;function X1(e,t){return ge(e.selectedNodes.map(zn),t.selectedNodes.map(zn))&&ge(e.selectedEdges.map(zn),t.selectedEdges.map(zn))}const Qv=C.memo(({onSelectionChange:e})=>{const t=le(),{selectedNodes:n,selectedEdges:r}=re(W1,X1);return C.useEffect(()=>{const i={nodes:n,edges:r};e?.(i),t.getState().onSelectionChange.forEach(a=>a(i))},[n,r,e]),null});Qv.displayName="SelectionListener";const Z1=e=>!!e.onSelectionChange;function Q1({onSelectionChange:e}){const t=re(Z1);return e||t?M.createElement(Qv,{onSelectionChange:e}):null}const J1=e=>({setNodes:e.setNodes,setEdges:e.setEdges,setDefaultNodesAndEdges:e.setDefaultNodesAndEdges,setMinZoom:e.setMinZoom,setMaxZoom:e.setMaxZoom,setTranslateExtent:e.setTranslateExtent,setNodeExtent:e.setNodeExtent,reset:e.reset});function Dt(e,t){C.useEffect(()=>{typeof e<"u"&&t(e)},[e])}function Z(e,t,n){C.useEffect(()=>{typeof t<"u"&&n({[e]:t})},[t])}const ex=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:i,onConnectStart:a,onConnectEnd:o,onClickConnectStart:s,onClickConnectEnd:u,nodesDraggable:f,nodesConnectable:c,nodesFocusable:l,edgesFocusable:d,edgesUpdatable:h,elevateNodesOnSelect:v,minZoom:p,maxZoom:g,nodeExtent:y,onNodesChange:_,onEdgesChange:w,elementsSelectable:m,connectionMode:S,snapGrid:x,snapToGrid:R,translateExtent:I,connectOnClick:A,defaultEdgeOptions:P,fitView:T,fitViewOptions:$,onNodesDelete:O,onEdgesDelete:b,onNodeDrag:q,onNodeDragStart:E,onNodeDragStop:k,onSelectionDrag:L,onSelectionDragStart:N,onSelectionDragStop:D,noPanClassName:F,nodeOrigin:z,rfId:B,autoPanOnConnect:H,autoPanOnNodeDrag:U,onError:W,connectionRadius:Q,isValidConnection:te,nodeDragThreshold:ee})=>{const{setNodes:J,setEdges:fe,setDefaultNodesAndEdges:se,setMinZoom:ve,setMaxZoom:de,setTranslateExtent:K,setNodeExtent:he,reset:G}=re(J1,ge),V=le();return C.useEffect(()=>{const ae=r?.map(Oe=>({...Oe,...P}));return se(n,ae),()=>{G()}},[]),Z("defaultEdgeOptions",P,V.setState),Z("connectionMode",S,V.setState),Z("onConnect",i,V.setState),Z("onConnectStart",a,V.setState),Z("onConnectEnd",o,V.setState),Z("onClickConnectStart",s,V.setState),Z("onClickConnectEnd",u,V.setState),Z("nodesDraggable",f,V.setState),Z("nodesConnectable",c,V.setState),Z("nodesFocusable",l,V.setState),Z("edgesFocusable",d,V.setState),Z("edgesUpdatable",h,V.setState),Z("elementsSelectable",m,V.setState),Z("elevateNodesOnSelect",v,V.setState),Z("snapToGrid",R,V.setState),Z("snapGrid",x,V.setState),Z("onNodesChange",_,V.setState),Z("onEdgesChange",w,V.setState),Z("connectOnClick",A,V.setState),Z("fitViewOnInit",T,V.setState),Z("fitViewOnInitOptions",$,V.setState),Z("onNodesDelete",O,V.setState),Z("onEdgesDelete",b,V.setState),Z("onNodeDrag",q,V.setState),Z("onNodeDragStart",E,V.setState),Z("onNodeDragStop",k,V.setState),Z("onSelectionDrag",L,V.setState),Z("onSelectionDragStart",N,V.setState),Z("onSelectionDragStop",D,V.setState),Z("noPanClassName",F,V.setState),Z("nodeOrigin",z,V.setState),Z("rfId",B,V.setState),Z("autoPanOnConnect",H,V.setState),Z("autoPanOnNodeDrag",U,V.setState),Z("onError",W,V.setState),Z("connectionRadius",Q,V.setState),Z("isValidConnection",te,V.setState),Z("nodeDragThreshold",ee,V.setState),Dt(e,J),Dt(t,fe),Dt(p,ve),Dt(g,de),Dt(I,K),Dt(y,he),null},qf={display:"none"},tx={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jv="react-flow__node-desc",ey="react-flow__edge-desc",nx="react-flow__aria-live",rx=e=>e.ariaLiveMessage;function ix({rfId:e}){const t=re(rx);return M.createElement("div",{id:`${nx}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:tx},t)}function ax({rfId:e,disableKeyboardA11y:t}){return M.createElement(M.Fragment,null,M.createElement("div",{id:`${Jv}-${e}`,style:qf},"Press enter or space to select a node.",!t&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),M.createElement("div",{id:`${ey}-${e}`,style:qf},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&M.createElement(ix,{rfId:e}))}var En=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=C.useState(!1),i=C.useRef(!1),a=C.useRef(new Set([])),[o,s]=C.useMemo(()=>
17{if(e!==null){const f=(Array.isArray(e)?e:[e]).filter(l=>typeof l=="string").map(l=>l.split("+")),c=f.reduce((l,d)=>l.concat(...d),[]);return[f,c]}return[[],[]]},[e]);return C.useEffect(()=>{const u=typeof document<"u"?document:null,f=t?.target||u;if(e!==null){const c=h=>{if(i.current=h.ctrlKey||h.metaKey||h.shiftKey,(!i.current||i.current&&!t.actInsideInputWithModifier)&&Ju(h))return!1;const p=If(h.code,s);a.current.add(h[p]),Cf(o,a.current,!1)&&(h.preventDefault(),r(!0))},l=h=>{if((!i.current||i.current&&!t.actInsideInputWithModifier)&&Ju(h))return!1;const p=If(h.code,s);Cf(o,a.current,!0)?(r(!1),a.current.clear()):a.current.delete(h[p]),h.key==="Meta"&&a.current.clear(),i.current=!1},d=()=>{a.current.clear(),r(!1)};return f?.addEventListener("keydown",c),f?.addEventListener("keyup",l),window.addEventListener("blur",d),()=>{f?.removeEventListener("keydown",c),f?.removeEventListener("keyup",l),window.removeEventListener("blur",d)}}},[e,r]),n};function Cf(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(i=>t.has(i)))}function If(e,t){return t.includes(e)?"code":"key"}function ty(e,t,n,r){const i=e.parentNode||e.parentId;if(!i)return n;const a=t.get(i),o=At(a,r);return ty(a,t,{x:(n.x??0)+o.x,y:(n.y??0)+o.y,z:(a[oe]?.z??0)>(n.z??0)?a[oe]?.z??0:n.z??0},r)}function ny(e,t,n){e.forEach(r=>{const i=r.parentNode||r.parentId;if(i&&!e.has(i))throw new Error(`Parent node ${i} not found`);if(i||n?.[r.id]){const{x:a,y:o,z:s}=ty(r,e,{...r.position,z:r[oe]?.z??0},t);r.positionAbsolute={x:a,y:o},r[oe].z=s,n?.[r.id]&&(r[oe].isParent=!0)}})}function jr(e,t,n,r){const i=new Map,a={},o=r?1e3:0;return e.forEach(s=>{const u=(Te(s.zIndex)?s.zIndex:0)+(s.selected?o:0),f=t.get(s.id),c={...s,positionAbsolute:{x:s.position.x,y:s.position.y}},l=s.parentNode||s.parentId;l&&(a[l]=!0);const d=f?.type&&f?.type!==s.type;Object.defineProperty(c,oe,{enumerable:!1,value:{handleBounds:d?void 0:f?.[oe]?.handleBounds,z:u}}),i.set(s.id,c)}),ny(i,n,a),i}function ry(e,t={}){const{getNodes:n,width:r,height:i,minZoom:a,maxZoom:o,d3Zoom:s,d3Selection:u,fitViewOnInitDone:f,fitViewOnInit:c,nodeOrigin:l}=e(),d=t.initial&&!f&&c;if(s&&u&&(d||!t.initial)){const v=n().filter(g=>{const y=t.includeHiddenNodes?g.width&&g.height:!g.hidden;return t.nodes?.length?y&&t.nodes.some(_=>_.id===g.id):y}),p=v.every(g=>g.width&&g.height);if(v.length>0&&p){const g=gr(v,l),{x:y,y:_,zoom:w}=Bv(g,r,i,t.minZoom??a,t.maxZoom??o,t.padding??.1),m=nt.translate(y,_).scale(w);return typeof t.duration=="number"&&t.duration>0?s.transform(xt(u,t.duration),m):s.transform(u,m),!0}}return!1}function ox(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,{...r,[oe]:r[oe],selected:n.selected})}),new Map(t)}function sx(e,t){return t.map(n=>{const r=e.find(i=>i.id===n.id);return r&&(n.selected=r.selected),n})}function Hn({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:i,edges:a,onNodesChange:o,onEdgesChange:s,hasDefaultNodes:u,hasDefaultEdges:f}=n();e?.length&&(u&&r({nodeInternals:ox(e,i)}),o?.(e)),t?.length&&(f&&r({edges:sx(t,a)}),s?.(t))}const Lt=()=>{},ux={zoomIn:Lt,zoomOut:Lt,zoomTo:Lt,getZoom:()=>1,setViewport:Lt,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:Lt,fitBounds:Lt,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},cx=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),fx=()=>{const e=le(),{d3Zoom:t,d3Selection:n}=re(cx,ge);return C.useMemo(()=>n&&t?{zoomIn:i=>t.scaleBy(xt(n,i?.duration),1.2),zoomOut:i=>t.scaleBy(xt(n,i?.duration),1/1.2),zoomTo:(i,a)=>t.scaleTo(xt(n,a?.duration),i),getZoom:()=>e.getState().transform[2],setViewport:(i,a)=>{const[o,s,u]=e.getState().transform,f=nt.translate(i.x??o,i.y??s).scale(i.zoom??u);t.transform(xt(n,a?.duration),f)},getViewport:()=>{const[i,a,o]=e.getState().transform;return{x:i,y:a,zoom:o}},fitView:i=>ry(e.getState,i),setCenter:(i,a,o)=>{const{width:s,height:u,maxZoom:f}=e.getState(),c=typeof o?.zoom<"u"?o.zoom:f,l=s/2-i*c,d=u/2-a*c,h=nt.translate(l,d).scale(c);t.transform(xt(n,o?.duration),h)},fitBounds:(i,a)=>{const{width:o,height:s,minZoom:u,maxZoom:f}=e.getState(),{x:c,y:l,zoom:d}=Bv(i,o,s,u,f,a?.padding??.1),h=nt.translate(c,l).scale(d);t.transform(xt(n,a?.duration),h)},project:i=>
17{const{transform:a,snapToGrid:o,snapGrid:s}=e.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),nc(i,a,o,s)},screenToFlowPosition:i=>{const{transform:a,snapToGrid:o,snapGrid:s,domNode:u}=e.getState();if(!u)return i;const{x:f,y:c}=u.getBoundingClientRect(),l={x:i.x-f,y:i.y-c};return nc(l,a,o,s)},flowToScreenPosition:i=>{const{transform:a,domNode:o}=e.getState();if(!o)return i;const{x:s,y:u}=o.getBoundingClientRect(),f=Fv(i,a);return{x:f.x+s,y:f.y+u}},viewportInitialized:!0}:ux,[t,n])};function Nc(){const e=fx(),t=le(),n=C.useCallback(()=>t.getState().getNodes().map(p=>({...p})),[]),r=C.useCallback(p=>t.getState().nodeInternals.get(p),[]),i=C.useCallback(()=>{const{edges:p=[]}=t.getState();return p.map(g=>({...g}))},[]),a=C.useCallback(p=>{const{edges:g=[]}=t.getState();return g.find(y=>y.id===p)},[]),o=C.useCallback(p=>{const{getNodes:g,setNodes:y,hasDefaultNodes:_,onNodesChange:w}=t.getState(),m=g(),S=typeof p=="function"?p(m):p;if(_)y(S);else if(w){const x=S.length===0?m.map(R=>({type:"remove",id:R.id})):S.map(R=>({item:R,type:"reset"}));w(x)}},[]),s=C.useCallback(p=>{const{edges:g=[],setEdges:y,hasDefaultEdges:_,onEdgesChange:w}=t.getState(),m=typeof p=="function"?p(g):p;if(_)y(m);else if(w){const S=m.length===0?g.map(x=>({type:"remove",id:x.id})):m.map(x=>({item:x,type:"reset"}));w(S)}},[]),u=C.useCallback(p=>{const g=Array.isArray(p)?p:[p],{getNodes:y,setNodes:_,hasDefaultNodes:w,onNodesChange:m}=t.getState();if(w){const x=[...y(),...g];_(x)}else if(m){const S=g.map(x=>({item:x,type:"add"}));m(S)}},[]),f=C.useCallback(p=>{const g=Array.isArray(p)?p:[p],{edges:y=[],setEdges:_,hasDefaultEdges:w,onEdgesChange:m}=t.getState();if(w)_([...y,...g]);else if(m){const S=g.map(x=>({item:x,type:"add"}));m(S)}},[]),c=C.useCallback(()=>{const{getNodes:p,edges:g=[],transform:y}=t.getState(),[_,w,m]=y;return{nodes:p().map(S=>({...S})),edges:g.map(S=>({...S})),viewport:{x:_,y:w,zoom:m}}},[]),l=C.useCallback(({nodes:p,edges:g})=>{const{nodeInternals:y,getNodes:_,edges:w,hasDefaultNodes:m,hasDefaultEdges:S,onNodesDelete:x,onEdgesDelete:R,onNodesChange:I,onEdgesChange:A}=t.getState(),P=(p||[]).map(q=>q.id),T=(g||[]).map(q=>q.id),$=_().reduce((q,E)=>{const k=E.parentNode||E.parentId,L=!P.includes(E.id)&&k&&q.find(D=>D.id===k);return(typeof E.deletable=="boolean"?E.deletable:!0)&&(P.includes(E.id)||L)&&q.push(E),q},[]),O=w.filter(q=>typeof q.deletable=="boolean"?q.deletable:!0),b=O.filter(q=>T.includes(q.id));if($||b){const q=Hv($,O),E=[...b,...q],k=E.reduce((L,N)=>(L.includes(N.id)||L.push(N.id),L),[]);if((S||m)&&(S&&t.setState({edges:w.filter(L=>!k.includes(L.id))}),m&&($.forEach(L=>{y.delete(L.id)}),t.setState({nodeInternals:new Map(y)}))),k.length>0&&(R?.(E),A&&A(k.map(L=>({id:L,type:"remove"})))),$.length>0&&(x?.($),I)){const L=$.map(N=>({id:N.id,type:"remove"}));I(L)}}},[]),d=C.useCallback(p=>{const g=I1(p),y=g?null:t.getState().nodeInternals.get(p.id);return!g&&!y?[null,null,g]:[g?p:wf(y),y,g]},[]),h=C.useCallback((p,g=!0,y)=>{const[_,w,m]=d(p);return _?(y||t.getState().getNodes()).filter(S=>{if(!m&&(S.id===w.id||!S.positionAbsolute))return!1;const x=wf(S),R=Qu(x,_);return g&&R>0||R>=_.width*_.height}):[]},[]),v=C.useCallback((p,g,y=!0)=>{const[_]=d(p);if(!_)return!1;const w=Qu(_,g);return y&&w>0||w>=_.width*_.height},[]);return C.useMemo(()=>({...e,getNodes:n,getNode:r,getEdges:i,getEdge:a,setNodes:o,setEdges:s,addNodes:u,addEdges:f,toObject:c,deleteElements:l,getIntersectingNodes:h,isNodeIntersecting:v}),[e,n,r,i,a,o,s,u,f,c,l,h,v])}const lx={actInsideInputWithModifier:!1};var dx=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=le(),{deleteElements:r}=Nc(),i=En(e,lx),a=En(t);C.useEffect(()=>{if(i){const{edges:o,getNodes:s}=n.getState(),u=s().filter(c=>c.selected),f=o.filter(c=>c.selected);r({nodes:u,edges:f}),n.setState({nodesSelectionActive:!1})}},[i]),C.useEffect(()=>{n.setState({multiSelectionActive:a})},[a])};function hx(e){const t=le();C.useEffect(()=>{let n;const r=()=>{if(!e.current)return;const i=yc(e.current);(i.height===0||i.width===0)&&t.getState().onError?.("004",it.error004()),t.setState({width:i.width||500,height:i.height||500})};return r(),window.addEventListener("resize",r),e.current&&(n=new ResizeObserver(()=>r()),n.observe(e.current)),()=>{window.removeEventListener("resize",r),n&&e.current&&n.unobserve(e.current)}},[])}const Rc={position:"absolute",width:"100%",height:"100%",top:0,left:0},px=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,Bn=e=>({x:e.x,y:e.y,zoom:e.k}),Ft=(e,t)=>
17e.target.closest(`.${t}`),Tf=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),Mf=e=>{const t=e.ctrlKey&&tr()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},gx=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),vx=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:i=!0,zoomOnPinch:a=!0,panOnScroll:o=!1,panOnScrollSpeed:s=.5,panOnScrollMode:u=St.Free,zoomOnDoubleClick:f=!0,elementsSelectable:c,panOnDrag:l=!0,defaultViewport:d,translateExtent:h,minZoom:v,maxZoom:p,zoomActivationKeyCode:g,preventScrolling:y=!0,children:_,noWheelClassName:w,noPanClassName:m})=>{const S=C.useRef(),x=le(),R=C.useRef(!1),I=C.useRef(!1),A=C.useRef(null),P=C.useRef({x:0,y:0,zoom:0}),{d3Zoom:T,d3Selection:$,d3ZoomHandler:O,userSelectionActive:b}=re(gx,ge),q=En(g),E=C.useRef(0),k=C.useRef(!1),L=C.useRef();return hx(A),C.useEffect(()=>{if(A.current){const N=A.current.getBoundingClientRect(),D=Av().scaleExtent([v,p]).translateExtent(h),F=Ie(A.current).call(D),z=nt.translate(d.x,d.y).scale(Yt(d.zoom,v,p)),B=[[0,0],[N.width,N.height]],H=D.constrain()(z,B,h);D.transform(F,H),D.wheelDelta(Mf),x.setState({d3Zoom:D,d3Selection:F,d3ZoomHandler:F.on("wheel.zoom"),transform:[H.x,H.y,H.k],domNode:A.current.closest(".react-flow")})}},[]),C.useEffect(()=>{$&&T&&(o&&!q&&!b?$.on("wheel.zoom",N=>{if(Ft(N,w))return!1;N.preventDefault(),N.stopImmediatePropagation();const D=$.property("__zoom").k||1;if(N.ctrlKey&&a){const te=$e(N),ee=Mf(N),J=D*Math.pow(2,ee);T.scaleTo($,J,te,N);return}const F=N.deltaMode===1?20:1;let z=u===St.Vertical?0:N.deltaX*F,B=u===St.Horizontal?0:N.deltaY*F;!tr()&&N.shiftKey&&u!==St.Vertical&&(z=N.deltaY*F,B=0),T.translateBy($,-(z/D)*s,-(B/D)*s,{internal:!0});const H=Bn($.property("__zoom")),{onViewportChangeStart:U,onViewportChange:W,onViewportChangeEnd:Q}=x.getState();clearTimeout(L.current),k.current||(k.current=!0,t?.(N,H),U?.(H)),k.current&&(e?.(N,H),W?.(H),L.current=setTimeout(()=>{n?.(N,H),Q?.(H),k.current=!1},150))},{passive:!1}):typeof O<"u"&&$.on("wheel.zoom",function(N,D){if(!y&&N.type==="wheel"&&!N.ctrlKey||Ft(N,w))return null;N.preventDefault(),O.call(this,N,D)},{passive:!1}))},[b,o,u,$,T,O,q,a,y,w,t,e,n]),C.useEffect(()=>{T&&T.on("start",N=>{if(!N.sourceEvent||N.sourceEvent.internal)return null;E.current=N.sourceEvent?.button;const{onViewportChangeStart:D}=x.getState(),F=Bn(N.transform);R.current=!0,P.current=F,N.sourceEvent?.type==="mousedown"&&x.setState({paneDragging:!0}),D?.(F),t?.(N.sourceEvent,F)})},[T,t]),C.useEffect(()=>{T&&(b&&!R.current?T.on("zoom",null):b||T.on("zoom",N=>{const{onViewportChange:D}=x.getState();if(x.setState({transform:[N.transform.x,N.transform.y,N.transform.k]}),I.current=!!(r&&Tf(l,E.current??0)),(e||D)&&!N.sourceEvent?.internal){const F=Bn(N.transform);D?.(F),e?.(N.sourceEvent,F)}}))},[b,T,e,l,r]),C.useEffect(()=>{T&&T.on("end",N=>{if(!N.sourceEvent||N.sourceEvent.internal)return null;const{onViewportChangeEnd:D}=x.getState();if(R.current=!1,x.setState({paneDragging:!1}),r&&Tf(l,E.current??0)&&!I.current&&r(N.sourceEvent),I.current=!1,(n||D)&&px(P.current,N.transform)){const F=Bn(N.transform);P.current=F,clearTimeout(S.current),S.current=setTimeout(()=>{D?.(F),n?.(N.sourceEvent,F)},o?150:0)}})},[T,o,l,n,r]),C.useEffect(()=>{T&&T.filter(N=>{const D=q||i,F=a&&N.ctrlKey;if((l===!0||Array.isArray(l)&&l.includes(1))&&N.button===1&&N.type==="mousedown"&&(Ft(N,"react-flow__node")||Ft(N,"react-flow__edge")))return!0;if(!l&&!D&&!o&&!f&&!a||b||!f&&N.type==="dblclick"||Ft(N,w)&&N.type==="wheel"||Ft(N,m)&&(N.type!=="wheel"||o&&N.type==="wheel"&&!q)||!a&&N.ctrlKey&&N.type==="wheel"||!D&&!o&&!F&&N.type==="wheel"||!l&&(N.type==="mousedown"||N.type==="touchstart")||Array.isArray(l)&&!l.includes(N.button)&&N.type==="mousedown")return!1;const z=Array.isArray(l)&&l.includes(N.button)||!N.button||N.button<=1;return(!N.ctrlKey||N.type==="wheel")&&z})},[b,T,i,a,o,f,l,c,q]),M.createElement("div",{className:"react-flow__renderer",ref:A,style:Rc},_)},yx=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function mx(){const{userSelectionActive:e,userSelectionRect:t}=re(yx,ge);return e&&t?M.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:t.width,height:t.height,transform:`translate(${t.x}px, ${t.y}px)`}}):null}function Pf(e,t){const n=t.parentNode||t.parentId,r=e.find(i=>i.id===n);
17if(r){const i=t.position.x+t.width-r.width,a=t.position.y+t.height-r.height;if(i>0||a>0||t.position.x<0||t.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,i>0&&(r.style.width+=i),a>0&&(r.style.height+=a),t.position.x<0){const o=Math.abs(t.position.x);r.position.x=r.position.x-o,r.style.width+=o,t.position.x=0}if(t.position.y<0){const o=Math.abs(t.position.y);r.position.y=r.position.y-o,r.style.height+=o,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function iy(e,t){if(e.some(r=>r.type==="reset"))return e.filter(r=>r.type==="reset").map(r=>r.item);const n=e.filter(r=>r.type==="add").map(r=>r.item);return t.reduce((r,i)=>{const a=e.filter(s=>s.id===i.id);if(a.length===0)return r.push(i),r;const o={...i};for(const s of a)if(s)switch(s.type){case"select":{o.selected=s.selected;break}case"position":{typeof s.position<"u"&&(o.position=s.position),typeof s.positionAbsolute<"u"&&(o.positionAbsolute=s.positionAbsolute),typeof s.dragging<"u"&&(o.dragging=s.dragging),o.expandParent&&Pf(r,o);break}case"dimensions":{typeof s.dimensions<"u"&&(o.width=s.dimensions.width,o.height=s.dimensions.height),typeof s.updateStyle<"u"&&(o.style={...o.style||{},...s.dimensions}),typeof s.resizing=="boolean"&&(o.resizing=s.resizing),o.expandParent&&Pf(r,o);break}case"remove":return r}return r.push(o),r},n)}function ay(e,t){return iy(e,t)}function _x(e,t){return iy(e,t)}const dt=(e,t)=>({id:e,type:"select",selected:t});function Ht(e,t){return e.reduce((n,r)=>{const i=t.includes(r.id);return!r.selected&&i?(r.selected=!0,n.push(dt(r.id,!0))):r.selected&&!i&&(r.selected=!1,n.push(dt(r.id,!1))),n},[])}const Ur=(e,t)=>n=>{n.target===t.current&&e?.(n)}
17,bx=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),oy=C.memo(({isSelecting:e,selectionMode:t=xn.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:i,onPaneClick:a,onPaneContextMenu:o,onPaneScroll:s,onPaneMouseEnter:u,onPaneMouseMove:f,onPaneMouseLeave:c,children:l})=>{const d=C.useRef(null),h=le(),v=C.useRef(0),p=C.useRef(0),g=C.useRef(),{userSelectionActive:y,elementsSelectable:_,dragging:w}=re(bx,ge),m=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),v.current=0,p.current=0},S=O=>{a?.(O),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},x=O=>{if(Array.isArray(n)&&n?.includes(2)){O.preventDefault();return}o?.(O)},R=s?O=>s(O):void 0,I=O=>{const{resetSelectedElements:b,domNode:q}=h.getState();if(g.current=q?.getBoundingClientRect(),!_||!e||O.button!==0||O.target!==d.current||!g.current)return;const{x:E,y:k}=vt(O,g.current);b(),h.setState({userSelectionRect:{width:0,height:0,startX:E,startY:k,x:E,y:k}}),r?.(O)},A=O=>{const{userSelectionRect:b,nodeInternals:q,edges:E,transform:k,onNodesChange:L,onEdgesChange:N,nodeOrigin:D,getNodes:F}=h.getState();if(!e||!g.current||!b)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const z=vt(O,g.current),B=b.startX??0,H=b.startY??0,U={...b,x:z.x<B?z.x:B,y:z.y<H?z.y:H,width:Math.abs(z.x-B),height:Math.abs(z.y-H)},W=F(),Q=zv(q,U,k,t===xn.Partial,!0,D),te=Hv(Q,E).map(J=>J.id),ee=Q.map(J=>J.id);if(v.current!==ee.length){v.current=ee.length;const J=Ht(W,ee);J.length&&L?.(J)}if(p.current!==te.length){p.current=te.length;const J=Ht(E,te);J.length&&N?.(J)}h.setState({userSelectionRect:U})},P=O=>{if(O.button!==0)return;const{userSelectionRect:b}=h.getState();!y&&b&&O.target===d.current&&S?.(O),h.setState({nodesSelectionActive:v.current>0}),m(),i?.(O)},T=O=>{y&&(h.setState({nodesSelectionActive:v.current>0}),i?.(O)),m()},$=_&&(e||y);return M.createElement("div",{className:ye(["react-flow__pane",{dragging:w,selection:e}]),onClick:$?void 0:Ur(S,d),onContextMenu:Ur(x,d),onWheel:Ur(R,d),onMouseEnter:$?void 0:u,onMouseDown:$?I:void 0,onMouseMove:$?A:f,onMouseUp:$?P:void 0,onMouseLeave:$?T:c,ref:d,style:Rc},l,M.createElement(mx,null))});oy.displayName="Pane";function sy(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return r?r.selected?!0:sy(r,t):!1}function Of(e,t,n){let r=e;do{if(r?.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function wx(e,t,n,r){return Array.from(e.values()).filter(i=>(i.selected||i.id===r)&&(!i.parentNode||i.parentId||!sy(i,e))&&(i.draggable||t&&typeof i.draggable>"u")).map(i=>({id:i.id,position:i.position||{x:0,y:0},positionAbsolute:i.positionAbsolute||{x:0,y:0},distance:{x:n.x-(i.positionAbsolute?.x??0),y:n.y-(i.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:i.extent,parentNode:i.parentNode||i.parentId,parentId:i.parentNode||i.parentId,width:i.width,height:i.height,expandParent:i.expandParent}))}function xx(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function uy(e,t,n,r,i=[0,0],a){const o=xx(e,e.extent||r);let s=o;const u=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(u&&e.width&&e.height){const l=n.get(u),{x:d,y:h}=At(l,i).positionAbsolute;s=l&&Te(d)&&Te(h)&&Te(l.width)&&Te(l.height)?[[d+e.width*i[0],h+e.height*i[1]],[d+l.width-e.width+e.width*i[0],h+l.height-e.height+e.height*i[1]]]:s}else a?.("005",it.error005()),s=o;else if(e.extent&&u&&e.extent!=="parent"){const l=n.get(u),{x:d,y:h}=At(l,i).positionAbsolute;s=[[e.extent[0][0]+d,e.extent[0][1]+h],[e.extent[1][0]+d,e.extent[1][1]+h]]}let f={x:0,y:0};if(u){const l=n.get(u);f=At(l,i).positionAbsolute}const c=s&&s!=="parent"?mc(t,s):t;return{position:{x:c.x-f.x,y:c.y-f.y},positionAbsolute:c}}function Kr({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(i=>({...n.get(i.id),position:i.position,positionAbsolute:i.positionAbsolute}));return[e?r.find(i=>i.id===e):r[0],r]}const kf=(e,t,n,r)=>{const i=t.querySelectorAll(e);if(!i||!i.length)return null;const a=Array.from(i),o=t.getBoundingClientRect(),s={x:o.width*r[0],y:o.height*r[1]};return a.map(u=>{const f=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),position:u.getAttribute("data-handlepos"),x:(f.left-o.left-s.x)/n,y:(f.top-o.top-s.y)/n,...yc(u)}})};function an(e,t,n){return n===void 0?n:r=>{const i=t().nodeInternals.get(e);i&&n(r,{...i})}}function ic({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:i,unselectNodesAndEdges:a,multiSelectionActive:o,nodeInternals:s,onError:u}=t.getState(),f=s.get(e);if(!f){u?.("012",it.error012(e));return}t.setState({nodesSelectionActive:!1}),f.selected?(n||f.selected&&o)&&(a({nodes:[f],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):i([e])}function Ex(){const e=le();return C.useCallback(({sourceEvent:n})=>
17{const{transform:r,snapGrid:i,snapToGrid:a}=e.getState(),o=n.touches?n.touches[0].clientX:n.clientX,s=n.touches?n.touches[0].clientY:n.clientY,u={x:(o-r[0])/r[2],y:(s-r[1])/r[2]};return{xSnapped:a?i[0]*Math.round(u.x/i[0]):u.x,ySnapped:a?i[1]*Math.round(u.y/i[1]):u.y,...u}},[])}function Yr(e){return(t,n,r)=>e?.(t,r)}function cy({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:i,isSelectable:a,selectNodesOnDrag:o}){const s=le(),[u,f]=C.useState(!1),c=C.useRef([]),l=C.useRef({x:null,y:null}),d=C.useRef(0),h=C.useRef(null),v=C.useRef({x:0,y:0}),p=C.useRef(null),g=C.useRef(!1),y=C.useRef(!1),_=C.useRef(!1),w=Ex();return C.useEffect(()=>{if(e?.current){const m=Ie(e.current),S=({x:I,y:A})=>{const{nodeInternals:P,onNodeDrag:T,onSelectionDrag:$,updateNodePositions:O,nodeExtent:b,snapGrid:q,snapToGrid:E,nodeOrigin:k,onError:L}=s.getState();l.current={x:I,y:A};let N=!1,D={x:0,y:0,x2:0,y2:0};if(c.current.length>1&&b){const z=gr(c.current,k);D=wn(z)}if(c.current=c.current.map(z=>{const B={x:I-z.distance.x,y:A-z.distance.y};E&&(B.x=q[0]*Math.round(B.x/q[0]),B.y=q[1]*Math.round(B.y/q[1]));const H=[[b[0][0],b[0][1]],[b[1][0],b[1][1]]];c.current.length>1&&b&&!z.extent&&(H[0][0]=z.positionAbsolute.x-D.x+b[0][0],H[1][0]=z.positionAbsolute.x+(z.width??0)-D.x2+b[1][0],H[0][1]=z.positionAbsolute.y-D.y+b[0][1],H[1][1]=z.positionAbsolute.y+(z.height??0)-D.y2+b[1][1]);const U=uy(z,B,P,H,k,L);return N=N||z.position.x!==U.position.x||z.position.y!==U.position.y,z.position=U.position,z.positionAbsolute=U.positionAbsolute,z}),!N)return;O(c.current,!0,!0),f(!0);const F=i?T:Yr($);if(F&&p.current){const[z,B]=Kr({nodeId:i,dragItems:c.current,nodeInternals:P});F(p.current,z,B)}},x=()=>{if(!h.current)return;const[I,A]=Cv(v.current,h.current);if(I!==0||A!==0){const{transform:P,panBy:T}=s.getState();l.current.x=(l.current.x??0)-I/P[2],l.current.y=(l.current.y??0)-A/P[2],T({x:I,y:A})&&S(l.current)}d.current=requestAnimationFrame(x)},R=I=>{const{nodeInternals:A,multiSelectionActive:P,nodesDraggable:T,unselectNodesAndEdges:$,onNodeDragStart:O,onSelectionDragStart:b}=s.getState();y.current=!0;const q=i?O:Yr(b);(!o||!a)&&!P&&i&&(A.get(i)?.selected||$()),i&&a&&o&&ic({id:i,store:s,nodeRef:e});const E=w(I);if(l.current=E,c.current=wx(A,T,E,i),q&&c.current){const[k,L]=Kr({nodeId:i,dragItems:c.current,nodeInternals:A});q(I.sourceEvent,k,L)}};if(t)m.on(".drag",null);else{const I=Ob().on("start",A=>{const{domNode:P,nodeDragThreshold:T}=s.getState();T===0&&R(A),_.current=!1;const $=w(A);l.current=$,h.current=P?.getBoundingClientRect()||null,v.current=vt(A.sourceEvent,h.current)}).on("drag",A=>{const P=w(A),{autoPanOnNodeDrag:T,nodeDragThreshold:$}=s.getState();if(A.sourceEvent.type==="touchmove"&&A.sourceEvent.touches.length>1&&(_.current=!0),!_.current){if(!g.current&&y.current&&T&&(g.current=!0,x()),!y.current){const O=P.xSnapped-(l?.current?.x??0),b=P.ySnapped-(l?.current?.y??0);Math.sqrt(O*O+b*b)>$&&R(A)}(l.current.x!==P.xSnapped||l.current.y!==P.ySnapped)&&c.current&&y.current&&(p.current=A.sourceEvent,v.current=vt(A.sourceEvent,h.current),S(P))}}).on("end",A=>{if(!(!y.current||_.current)&&(f(!1),g.current=!1,y.current=!1,cancelAnimationFrame(d.current),c.current)){const{updateNodePositions:P,nodeInternals:T,onNodeDragStop:$,onSelectionDragStop:O}=s.getState(),b=i?$:Yr(O);if(P(c.current,!1,!1),b){const[q,E]=Kr({nodeId:i,dragItems:c.current,nodeInternals:T});b(A.sourceEvent,q,E)}}}).filter(A=>{const P=A.target;return!A.button&&(!n||!Of(P,`.${n}`,e))&&(!r||Of(P,r,e))});return m.call(I),()=>{m.on(".drag",null)}}}},[e,t,n,r,a,s,i,o,w]),u}function fy(){const e=le();return C.useCallback(n=>{const{nodeInternals:r,nodeExtent:i,updateNodePositions:a,getNodes:o,snapToGrid:s,snapGrid:u,onError:f,nodesDraggable:c}=e.getState(),l=o().filter(_=>_.selected&&(_.draggable||c&&typeof _.draggable>"u")),d=s?u[0]:5,h=s?u[1]:5,v=n.isShiftPressed?4:1,p=n.x*d*v,g=n.y*h*v,y=l.map(_=>{if(_.positionAbsolute){const w={x:_.positionAbsolute.x+p,y:_.positionAbsolute.y+g};s&&(w.x=u[0]*Math.round(w.x/u[0]),w.y=u[1]*Math.round(w.y/u[1]));const{positionAbsolute:m,position:S}=uy(_,w,r,i,void 0,f);_.position=S,_.positionAbsolute=m}return _});a(y,!0,!1)},[])}const Gt={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var on=e=>{const t=({id:n,type:r,data:i,xPos:a,yPos:o,xPosOrigin:s,yPosOrigin:u,selected:f,onClick:c,onMouseEnter:l,onMouseMove:d,onMouseLeave:h,onContextMenu:v,onDoubleClick:p,style:g,className:y,isDraggable:_,isSelectable:w,isConnectable:m,isFocusable:S,selectNodesOnDrag:x,sourcePosition:R,targetPosition:I,hidden:A,resizeObserver:P,dragHandle:T,zIndex:$,isParent:O,noDragClassName:b,noPanClassName:q,initialized:E,disableKeyboardA11y:k,ariaLabel:L,rfId:N,hasHandleBounds:D})=>{const F=le(),z=C.useRef(null),B=C.useRef(null),H=C.useRef(R),U=C.useRef(I),W=C.useRef(r),Q=w||_||c||l||d||h,te=fy(),ee=an(n,F.getState,l),J=an(n,F.getState,d),fe=an(n,F.getState,h),se=an(n,F.getState,v),ve=an(n,F.getState,p),de=G=>{const{nodeDragThreshold:V}=F.getState();if(w&&(!x||!_||V>0)&&ic({id:n,store:F,nodeRef:z}),c){const ae=F.getState().nodeInternals.get(n);ae&&c(G,{...ae})}},K=G=>{if(!Ju(G)&&!k)if(Pv.includes(G.key)&&w){const V=G.key==="Escape";ic({id:n,store:F,unselect:V,nodeRef:z})}
17else _&&f&&Object.prototype.hasOwnProperty.call(Gt,G.key)&&(F.setState({ariaLiveMessage:`Moved selected node ${G.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~a}, y: ${~~o}`}),te({x:Gt[G.key].x,y:Gt[G.key].y,isShiftPressed:G.shiftKey}))};C.useEffect(()=>()=>{B.current&&(P?.unobserve(B.current),B.current=null)},[]),C.useEffect(()=>{if(z.current&&!A){const G=z.current;(!E||!D||B.current!==G)&&(B.current&&P?.unobserve(B.current),P?.observe(G),B.current=G)}},[A,E,D]),C.useEffect(()=>{const G=W.current!==r,V=H.current!==R,ae=U.current!==I;z.current&&(G||V||ae)&&(G&&(W.current=r),V&&(H.current=R),ae&&(U.current=I),F.getState().updateNodeDimensions([{id:n,nodeElement:z.current,forceUpdate:!0}]))},[n,r,R,I]);const he=cy({nodeRef:z,disabled:A||!_,noDragClassName:b,handleSelector:T,nodeId:n,isSelectable:w,selectNodesOnDrag:x});return A?null:M.createElement("div",{className:ye(["react-flow__node",`react-flow__node-${r}`,{[q]:_},y,{selected:f,selectable:w,parent:O,dragging:he}]),ref:z,style:{zIndex:$,transform:`translate(${s}px,${u}px)`,pointerEvents:Q?"all":"none",visibility:E?"visible":"hidden",...g},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:ee,onMouseMove:J,onMouseLeave:fe,onContextMenu:se,onClick:de,onDoubleClick:ve,onKeyDown:S?K:void 0,tabIndex:S?0:void 0,role:S?"button":void 0,"aria-describedby":k?void 0:`${Jv}-${N}`,"aria-label":L},M.createElement(D1,{value:n},M.createElement(e,{id:n,data:i,type:r,xPos:a,yPos:o,selected:f,isConnectable:m,sourcePosition:R,targetPosition:I,dragging:he,dragHandle:T,zIndex:$})))};return t.displayName="NodeWrapper",C.memo(t)};const Sx=e=>{const t=e.getNodes().filter(n=>n.selected);return{...gr(t,e.nodeOrigin),transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive}};function Nx({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=le(),{width:i,height:a,x:o,y:s,transformString:u,userSelectionActive:f}=re(Sx,ge),c=fy(),l=C.useRef(null);if(C.useEffect(()=>{n||l.current?.focus({preventScroll:!0})},[n]),cy({nodeRef:l}),f||!i||!a)return null;const d=e?v=>{const p=r.getState().getNodes().filter(g=>g.selected);e(v,p)}:void 0,h=v=>{Object.prototype.hasOwnProperty.call(Gt,v.key)&&c({x:Gt[v.key].x,y:Gt[v.key].y,isShiftPressed:v.shiftKey})};return M.createElement("div",{className:ye(["react-flow__nodesselection","react-flow__container",t]),style:{transform:u}},M.createElement("div",{ref:l,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:i,height:a,top:s,left:o}}))}var Rx=C.memo(Nx);const Ax=e=>e.nodesSelectionActive,ly=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,deleteKeyCode:s,onMove:u,onMoveStart:f,onMoveEnd:c,selectionKeyCode:l,selectionOnDrag:d,selectionMode:h,onSelectionStart:v,onSelectionEnd:p,multiSelectionKeyCode:g,panActivationKeyCode:y,zoomActivationKeyCode:_,elementsSelectable:w,zoomOnScroll:m,zoomOnPinch:S,panOnScroll:x,panOnScrollSpeed:R,panOnScrollMode:I,zoomOnDoubleClick:A,panOnDrag:P,defaultViewport:T,translateExtent:$,minZoom:O,maxZoom:b,preventScrolling:q,onSelectionContextMenu:E,noWheelClassName:k,noPanClassName:L,disableKeyboardA11y:N})=>{const D=re(Ax),F=En(l),z=En(y),B=z||P,H=z||x,U=F||d&&B!==!0;return dx({deleteKeyCode:s,multiSelectionKeyCode:g}),M.createElement(vx,{onMove:u,onMoveStart:f,onMoveEnd:c,onPaneContextMenu:a,elementsSelectable:w,zoomOnScroll:m,zoomOnPinch:S,panOnScroll:H,panOnScrollSpeed:R,panOnScrollMode:I,zoomOnDoubleClick:A,panOnDrag:!F&&B,defaultViewport:T,translateExtent:$,minZoom:O,maxZoom:b,zoomActivationKeyCode:_,preventScrolling:q,noWheelClassName:k,noPanClassName:L},M.createElement(oy,{onSelectionStart:v,onSelectionEnd:p,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:i,onPaneContextMenu:a,onPaneScroll:o,panOnDrag:B,isSelecting:!!U,selectionMode:h},e,D&&M.createElement(Rx,{onSelectionContextMenu:E,noPanClassName:L,disableKeyboardA11y:N})))};ly.displayName="FlowRenderer";var qx=C.memo(ly);function Cx(e){return re(C.useCallback(n=>e?zv(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function Ix(e){const t={input:on(e.input||Wv),default:on(e.default||rc),output:on(e.output||Zv),group:on(e.group||Sc)},n={},r=Object.keys(e).filter(i=>!["input","default","output","group"].includes(i)).reduce((i,a)=>(i[a]=on(e[a]||rc),i),n);return{...t,...r}}const Tx=({x:e,y:t,width:n,height:r,origin:i})=>!n||!r?{x:e,y:t}:i[0]<0||i[1]<0||i[0]>1||i[1]>1?{x:e,y:t}:{x:e-n*i[0],y:t-r*i[1]},Mx=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,no
17desFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),dy=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:i,updateNodeDimensions:a,onError:o}=re(Mx,ge),s=Cx(e.onlyRenderVisibleElements),u=C.useRef(),f=C.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const c=new ResizeObserver(l=>{const d=l.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));a(d)});return u.current=c,c},[]);return C.useEffect(()=>()=>{u?.current?.disconnect()},[]),M.createElement("div",{className:"react-flow__nodes",style:Rc},s.map(c=>{let l=c.type||"default";e.nodeTypes[l]||(o?.("003",it.error003(l)),l="default");const d=e.nodeTypes[l]||e.nodeTypes.default,h=!!(c.draggable||t&&typeof c.draggable>"u"),v=!!(c.selectable||i&&typeof c.selectable>"u"),p=!!(c.connectable||n&&typeof c.connectable>"u"),g=!!(c.focusable||r&&typeof c.focusable>"u"),y=e.nodeExtent?mc(c.positionAbsolute,e.nodeExtent):c.positionAbsolute,_=y?.x??0,w=y?.y??0,m=Tx({x:_,y:w,width:c.width??0,height:c.height??0,origin:e.nodeOrigin});return M.createElement(d,{key:c.id,id:c.id,className:c.className,style:c.style,type:l,data:c.data,sourcePosition:c.sourcePosition||j.Bottom,targetPosition:c.targetPosition||j.Top,hidden:c.hidden,xPos:_,yPos:w,xPosOrigin:m.x,yPosOrigin:m.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!c.selected,isDraggable:h,isSelectable:v,isConnectable:p,isFocusable:g,resizeObserver:f,dragHandle:c.dragHandle,zIndex:c[oe]?.z??0,isParent:!!c[oe]?.isParent,noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!c.width&&!!c.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:c.ariaLabel,hasHandleBounds:!!c[oe]?.handleBounds})}))};dy.displayName="NodeRenderer";var Px=C.memo(dy);const Ox=(e,t,n)=>n===j.Left?e-t:n===j.Right?e+t:e,kx=(e,t,n)=>n===j.Top?e-t:n===j.Bottom?e+t:e,$f="react-flow__edgeupdater",Df=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:i,onMouseEnter:a,onMouseOut:o,type:s})=>M.createElement("circle",{onMouseDown:i,onMouseEnter:a,onMouseOut:o,className:ye([$f,`${$f}-${s}`]),cx:Ox(t,r,e),cy:kx(n,r,e),r,stroke:"transparent",fill:"transparent"}),$x=()=>!0;var zt=e=>{const t=({id:n,className:r,type:i,data:a,onClick:o,onEdgeDoubleClick:s,selected:u,animated:f,label:c,labelStyle:l,labelShowBg:d,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:p,style:g,source:y,target:_,sourceX:w,sourceY:m,targetX:S,targetY:x,sourcePosition:R,targetPosition:I,elementsSelectable:A,hidden:P,sourceHandleId:T,targetHandleId:$,onContextMenu:O,onMouseEnter:b,onMouseMove:q,onMouseLeave:E,reconnectRadius:k,onReconnect:L,onReconnectStart:N,onReconnectEnd:D,markerEnd:F,markerStart:z,rfId:B,ariaLabel:H,isFocusable:U,isReconnectable:W,pathOptions:Q,interactionWidth:te,disableKeyboardA11y:ee})=>{const J=C.useRef(null),[fe,se]=C.useState(!1),[ve,de]=C.useState(!1),K=le(),he=C.useMemo(()=>`url('#${tc(z,B)}')`,[z,B]),G=C.useMemo(()=>`url('#${tc(F,B)}')`,[F,B]);if(P)return null;const V=pe=>{const{edges:Ae,addSelectedEdges:me,unselectNodesAndEdges:be,multiSelectionActive:$t}=K.getState(),Ge=Ae.find(bt=>bt.id===n);Ge&&(A&&(K.setState({nodesSelectionActive:!1}),Ge.selected&&$t?(be({nodes:[],edges:[Ge]}),J.current?.blur()):me([n])),o&&o(pe,Ge))},ae=rn(n,K.getState,s),Oe=rn(n,K.getState,O),Be=rn(n,K.getState,b),_e=rn(n,K.getState,q),ue=rn(n,K.getState,E),Ee=(pe,Ae)=>{if(pe.button!==0)return;const{edges:me,isValidConnection:be}=K.getState(),$t=Ae?_:y,Ge=(Ae?$:T)||null,bt=Ae?"target":"source",kr=be||$x,$r=Ae,en=me.find(wt=>wt.id===n);de(!0),N?.(pe,en,bt);const Dr=wt=>{de(!1),D?.(wt,en,bt)};jv({event:pe,handleId:Ge,nodeId:$t,onConnect:wt=>L?.(en,wt),isTarget:$r,getState:K.getState,setState:K.setState,isValidConnection:kr,edgeUpdaterType:bt,onReconnectEnd:Dr})},ke=pe=>Ee(pe,!0),We=pe=>Ee(pe,!1),Ve=()=>se(!0),Re=()=>se(!1),Xe=!A&&!o,ut=pe=>{if(!ee&&Pv.includes(pe.key)&&A){const{unselectNodesAndEdges:Ae,addSelectedEdges:me,edges:be}=K.getState();pe.key==="Escape"?(J.current?.blur(),Ae({edges:[be.find(Ge=>Ge.id===n)]})):me([n])}};return M.createElement("g",{className:ye(["react-flow__edge",`react-flow__edge-${i}`,r,{selected:u,animated:f,inactive:Xe,updating:fe}]),onClick:V,onDoubleClick:ae,onContextMenu:Oe,onMouseEnter:Be,onMouseMove:_e,onMouseLeave:ue,onKeyDown:U?ut:void 0,tabIndex:U?0:void 0,role:U?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":H===null?void 0:H||`Edge from ${y} to ${_}`,"aria-describedby":U?`${ey}-${B}`:void 0,ref:J},!ve&&M.createElement(e,{id:n,source:y,target:_,selected:u,animated:f,label:c,labelStyle:l,labelShowBg:d,labelBgStyle:h,labelBgPadding:v,labelBgBorderRadius:p,data:a,style:g,sourceX:w,sourceY:m,targetX:S,targetY:x,sourcePosition:R,targetPosition:I,sourceHandleId:T,targetHandleId:$,markerStart:he,markerEnd:G,pathOptions:Q,interactionWidth:te}),W&&M.createElement(M.Fragment,null,(W==="source"||W===!0)&&M.createElement(Df,{position:R,centerX:w,centerY:m,radius:k,onMouseDown:ke,onMouseEnter:Ve,onMouseOut:Re,type:"source"}),(W==="target"||W===!0)&&M.createElement(Df,{position:I,centerX:S,centerY:x,radius:k,onMouseDown:We,onMouseEnter:Ve,onMouseOut:Re,type:"target"})))};return t.displayName="EdgeWrapper",C.memo(t)};function Dx(e){const t={default:zt(e.default||rr),straight:zt(e.bezier||wc),step:zt(e.step||bc),smoothstep:zt(e.step||pr),simplebezier:zt(e.simplebezier||_c)},n={},r=Object.keys(e).filter(i=>!["default","bezier"].includes(i)).reduce((i,a)=>(i[a]=zt(e[a]||rr),i),n);return{...t,...r}}function Lf(e,t,n=null){const r=(n?.x||0)+t.x,i=(n?.y||0)+t.y,a=n?.width||t.width,o=n?.height||t.height;switch(e){case j.Top:return{x:r+a/2,y:i};case j.Right:return{x:r+a,y:i+o/2};case j.Bottom:return{x:r+a/2,y:i+o};case j.Left:return{x:r,y:i+o/2}}}function Ff(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const Lx=(e,t,n,r,i,a)=>{const o=Lf(n,e,t),s=Lf(a,r,i);return{sourceX:o.x,sourceY:o.y,targetX:s.x,targetY:s.y}};
17function Fx({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:i,targetHeight:a,width:o,height:s,transform:u}){const f={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+i),y2:Math.max(e.y+r,t.y+a)};f.x===f.x2&&(f.x2+=1),f.y===f.y2&&(f.y2+=1);const c=wn({x:(0-u[0])/u[2],y:(0-u[1])/u[2],width:o/u[2],height:s/u[2]}),l=Math.max(0,Math.min(c.x2,f.x2)-Math.max(c.x,f.x)),d=Math.max(0,Math.min(c.y2,f.y2)-Math.max(c.y,f.y));return Math.ceil(l*d)>0}function zf(e){const t=e?.[oe]?.handleBounds||null,n=t&&e?.width&&e?.height&&typeof e?.positionAbsolute?.x<"u"&&typeof e?.positionAbsolute?.y<"u";return[{x:e?.positionAbsolute?.x||0,y:e?.positionAbsolute?.y||0,width:e?.width||0,height:e?.height||0},t,!!n]}const zx=[{level:0,isMaxLevel:!0,edges:[]}];function Hx(e,t,n=!1){let r=-1;const i=e.reduce((o,s)=>{const u=Te(s.zIndex);let f=u?s.zIndex:0;if(n){const c=t.get(s.target),l=t.get(s.source),d=s.selected||c?.selected||l?.selected,h=Math.max(l?.[oe]?.z||0,c?.[oe]?.z||0,1e3);f=(u?s.zIndex:0)+(d?h:0)}return o[f]?o[f].push(s):o[f]=[s],r=f>r?f:r,o},{}),a=Object.entries(i).map(([o,s])=>{const u=+o;return{edges:s,level:u,isMaxLevel:u===r}});return a.length===0?zx:a}function Bx(e,t,n){const r=re(C.useCallback(i=>e?i.edges.filter(a=>{const o=t.get(a.source),s=t.get(a.target);return o?.width&&o?.height&&s?.width&&s?.height&&Fx({sourcePos:o.positionAbsolute||{x:0,y:0},targetPos:s.positionAbsolute||{x:0,y:0},sourceWidth:o.width,sourceHeight:o.height,targetWidth:s.width,targetHeight:s.height,width:i.width,height:i.height,transform:i.transform})}):i.edges,[e,t]));return Hx(r,t,n)}const Vx=({color:e="none",strokeWidth:t=1})=>M.createElement("polyline",{style:{stroke:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),Gx=({color:e="none",strokeWidth:t=1})=>M.createElement("polyline",{style:{stroke:e,fill:e,strokeWidth:t},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Hf={[nr.Arrow]:Vx,[nr.ArrowClosed]:Gx};function jx(e){const t=le();return C.useMemo(()=>Object.prototype.hasOwnProperty.call(Hf,e)?Hf[e]:(t.getState().onError?.("009",it.error009(e)),null),[e])}const Ux=({id:e,type:t,color:n,width:r=12.5,height:i=12.5,markerUnits:a="strokeWidth",strokeWidth:o,orient:s="auto-start-reverse"})=>{const u=jx(t);return u?M.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${i}`,viewBox:"-10 -10 20 20",markerUnits:a,orient:s,refX:"0",refY:"0"},M.createElement(u,{color:n,strokeWidth:o})):null},Kx=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((i,a)=>
17([a.markerStart,a.markerEnd].forEach(o=>{if(o&&typeof o=="object"){const s=tc(o,t);r.includes(s)||(i.push({id:s,color:o.color||e,...o}),r.push(s))}}),i),[]).sort((i,a)=>i.id.localeCompare(a.id))},hy=({defaultColor:e,rfId:t})=>{const n=re(C.useCallback(Kx({defaultColor:e,rfId:t}),[e,t]),(r,i)=>!(r.length!==i.length||r.some((a,o)=>a.id!==i[o].id)));return M.createElement("defs",null,n.map(r=>M.createElement(Ux,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};hy.displayName="MarkerDefinitions";var Yx=C.memo(hy);const Wx=e=>({nodesConnectable:e.nodesConnectable,edgesFocusable:e.edgesFocusable,edgesUpdatable:e.edgesUpdatable,elementsSelectable:e.elementsSelectable,width:e.width,height:e.height,connectionMode:e.connectionMode,nodeInternals:e.nodeInternals,onError:e.onError}),py=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:i,noPanClassName:a,onEdgeContextMenu:o,onEdgeMouseEnter:s,onEdgeMouseMove:u,onEdgeMouseLeave:f,onEdgeClick:c,onEdgeDoubleClick:l,onReconnect:d,onReconnectStart:h,onReconnectEnd:v,reconnectRadius:p,children:g,disableKeyboardA11y:y})=>{const{edgesFocusable:_,edgesUpdatable:w,elementsSelectable:m,width:S,height:x,connectionMode:R,nodeInternals:I,onError:A}=re(Wx,ge),P=Bx(t,I,n);return S?M.createElement(M.Fragment,null,P.map(({level:T,edges:$,isMaxLevel:O})=>M.createElement("svg",{key:T,style:{zIndex:T},width:S,height:x,className:"react-flow__edges react-flow__container"},O&&M.createElement(Yx,{defaultColor:e,rfId:r}),M.createElement("g",null,$.map(b=>{const[q,E,k]=zf(I.get(b.source)),[L,N,D]=zf(I.get(b.target));if(!k||!D)return null;let F=b.type||"default";i[F]||(A?.("011",it.error011(F)),F="default");const z=i[F]||i.default,B=R===It.Strict?N.target:(N.target??[]).concat(N.source??[]),H=Ff(E.source,b.sourceHandle),U=Ff(B,b.targetHandle),W=H?.position||j.Bottom,Q=U?.position||j.Top,te=!!(b.focusable||_&&typeof b.focusable>"u"),ee=b.reconnectable||b.updatable,J=typeof d<"u"&&(ee||w&&typeof ee>"u");if(!H||!U)return A?.("008",it.error008(H,b)),null;const{sourceX:fe,sourceY:se,targetX:ve,targetY:de}=Lx(q,H,W,L,U,Q);return M.createElement(z,{key:b.id,id:b.id,className:ye([b.className,a]),type:F,data:b.data,selected:!!b.selected,animated:!!b.animated,hidden:!!b.hidden,label:b.label,labelStyle:b.labelStyle,labelShowBg:b.labelShowBg,labelBgStyle:b.labelBgStyle,labelBgPadding:b.labelBgPadding,labelBgBorderRadius:b.labelBgBorderRadius,style:b.style,source:b.source,target:b.target,sourceHandleId:b.sourceHandle,targetHandleId:b.targetHandle,markerEnd:b.markerEnd,markerStart:b.markerStart,sourceX:fe,sourceY:se,targetX:ve,targetY:de,sourcePosition:W,targetPosition:Q,elementsSelectable:m,onContextMenu:o,onMouseEnter:s,onMouseMove:u,onMouseLeave:f,onClick:c,onEdgeDoubleClick:l,onReconnect:d,onReconnectStart:h,onReconnectEnd:v,reconnectRadius:p,rfId:r,ariaLabel:b.ariaLabel,isFocusable:te,isReconnectable:J,pathOptions:"pathOptions"in b?b.pathOptions:void 0,interactionWidth:b.interactionWidth,disableKeyboardA11y:y})})))),g):null};py.displayName="EdgeRenderer";var Xx=C.memo(py);const Zx=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Qx({children:e}){const t=re(Zx);return M.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function Jx(e){const t=Nc(),n=C.useRef(!1);C.useEffect(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const eE={[j.Left]:j.Right,[j.Right]:j.Left,[j.Top]:j.Bottom,[j.Bottom]:j.Top},gy=({nodeId:e,handleType:t,style:n,type:r=ht.Bezier,CustomComponent:i,connectionStatus:a})=>{const{fromNode:o,handleId:s,toX:u,toY:f,connectionMode:c}=re(C.useCallback(x=>({fromNode:x.nodeInternals.get(e),handleId:x.connectionHandleId,toX:(x.connectionPosition.x-x.transform[0])/x.transform[2],toY:(x.connectionPosition.y-x.transform[1])/x.transform[2],connectionMode:x.connectionMode}),[e]),ge),l=o?.[oe]?.handleBounds;let d=l?.[t];if(c===It.Loose&&(d=d||l?.[t==="source"?"target":"source"]),!o||!d)return null;const h=s?d.find(x=>x.id===s):d[0],v=h?h.x+h.width/2:(o.width??0)/2,p=h?h.y+h.height/2:o.height??0,g=(o.positionAbsolute?.x??0)+v,y=(o.positionAbsolute?.y??0)+p,_=h?.position,w=_?eE[_]:null;if(!_||!w)return null;if(i)return M.createElement(i,{connectionLineType:r,connectionLineStyle:n,fromNode:o,fromHandle:h,fromX:g,fromY:y,toX:u,toY:f,fromPosition:_,toPosition:w,connectionStatus:a});let m="";const S={sourceX:g,sourceY:y,sourcePosition:_,targetX:u,targetY:f,targetPosition:w};return r===ht.Bezier?[m]=Lv(S):r===ht.Step?[m]=ec({...S,borderRadius:0}):r===ht.SmoothStep?[m]=ec(S):r===ht.SimpleBezier?[m]=Dv(S):m=`M${g},${y} ${u},${f}`,M.createElement("path",{d:m,fill:"none",className:"react-flow__connection-path",style:n})};gy.displayName="ConnectionLine";const tE=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function nE({containerStyle:e,style:t,type:n,component:r}){const{nodeId:i,handleType:a,nodesConnectable:o,width:s,height:u,connectionStatus:f}=re(tE,ge);return!(i&&a&&s&&o)?null:M.createElement("svg",{style:e,width:s,height:u,className:"react-flow__edges react-flow__connectionline react-flow__container"},M.createElement("g",{className:ye(["react-flow__connection",f])},M.createElement(gy,{nodeId:i,handleType:a,style:t,type:n,CustomComponent:r,connectionStatus:f})))}function Bf(e,t){return C.useRef(null),le(),C.useMemo(()=>t(e),[e])}const vy=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:i,onInit:a,onNodeClick:o,onEdgeClick:s,onNodeDoubleClick:u,onEdgeDoubleClick:f,onNodeMouseEnter:c,onNodeMouseMove:l,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:v,onSelectionStart:p,onSelectionEnd:g,connectionLineType:y,connectionLineStyle:_,connectionLineComponent:w,connectionLineContainerStyle:m,selectionKeyCode:S,selectionOnDrag:x,selectionMode:R,multiSelectionKeyCode:I,panActivationKeyCode:A,zoomActivationKeyCode:P,deleteKeyCode:T,onlyRenderVisibleElements:$,elementsSelectable:O,selectNodesOnDrag:b,defaultViewport:q,translateExtent:E,minZoom:k,maxZoom:L,preventScrolling:N,defaultMarkerColor:D,zoomOnScroll:F,zoomOnPinch:z,panOnScroll:B,panOnScrollSpeed:H,panOnScrollMode:U,zoomOnDoubleClick:W,panOnDrag:Q,onPaneClick:te,onPaneMouseEnter:ee,onPaneMouseMove:J,onPaneMouseLeave:fe,onPaneScroll:se,onPaneContextMenu:ve,onEdgeContextMenu:de,onEdgeMouseEnter:K,onEdgeMouseMove:he,onEdgeMouseLeave:G,onReconnect:V,onReconnectStart:ae,onReconnectEnd:Oe,reconnectRadius:Be,noDragClassName:_e,noWheelClassName:ue,noPanClassName:Ee,elevateEdgesOnSelect:ke,disableKeyboardA11y:We,nodeOrigin:Ve,nodeExtent:Re,rfId:Xe})=>{const ut=Bf(e,Ix),pe=Bf(t,Dx);return Jx(a),M.createElement(qx,{onPaneClick:te,onPaneMouseEnter:ee,onPaneMouseMove:J,onPaneMouseLeave:fe,onPaneContextMenu:ve,onPaneScroll:se,deleteKeyCode:T,selectionKeyCode:S,selectionOnDrag:x,selectionMode:R,onSelectionStart:p,onSelectionEnd:g,multiSelectionKeyCode:I,panActivationKeyCode:A,zoomActivationKeyCode:P,elementsSelectable:O,onMove:n,onMoveStart:r,onMoveEnd:i,zoomOnScroll:F,zoomOnPinch:z,zoomOnDoubleClick:W,panOnScroll:B,panOnScrollSpeed:H,panOnScrollMode:U,panOnDrag:Q,defaultViewport:q,translateExtent:E,minZoom:k,maxZoom:L,onSelectionContextMenu:v,preventScrolling:N,noDragClassName:_e,noWheelClassName:ue,noPanClassName:Ee,disableKeyboardA11y:We},M.createElement(Qx,null,M.createElement(Xx,{edgeTypes:pe,onEdgeClick:s,onEdgeDoubleClick:f,onlyRenderVisibleElements:$,onEdgeContextMenu:de,onEdgeMouseEnter:K,onEdgeMouseMove:he,onEdgeMouseLeave:G,onReconnect:V,onReconnectStart:ae,onReconnectEnd:Oe,reconnectRadius:Be,defaultMarkerColor:D,noPanClassName:Ee,elevateEdgesOnSelect:!!ke,disableKeyboardA11y:We,rfId:Xe},M.createElement(nE,{style:_,type:y,component:w,containerStyle:m})),M.createElement("div",{className:"react-flow__edgelabel-renderer"}),M.createElement(Px,{nodeTypes:ut,onNodeClick:o,onNodeDoubleClick:u,onNodeMouseEnter:c,onNodeMouseMove:l,onNodeMouseLeave:d,onNodeContextMenu:h,selectNodesOnDrag:b,onlyRenderVisibleElements:$,noPanClassName:Ee,noDragClassName:_e,disableKeyboardA11y:We,nodeOrigin:Ve,nodeExtent:Re,rfId:Xe})))};vy.displayName="GraphView";var rE=C.memo(vy);const ac=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],ct={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:ac,nodeExtent:ac,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:It.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGri
17d:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:T1,isValidConnection:void 0},iE=()=>U0((e,t)=>({...ct,setNodes:n=>{const{nodeInternals:r,nodeOrigin:i,elevateNodesOnSelect:a}=t();e({nodeInternals:jr(n,r,i,a)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(i=>({...r,...i}))})},setDefaultNodesAndEdges:(n,r)=>{const i=typeof n<"u",a=typeof r<"u",o=i?jr(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:o,edges:a?r:[],hasDefaultNodes:i,hasDefaultEdges:a})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:i,fitViewOnInit:a,fitViewOnInitDone:o,fitViewOnInitOptions:s,domNode:u,nodeOrigin:f}=t(),c=u?.querySelector(".react-flow__viewport");if(!c)return;const l=window.getComputedStyle(c),{m22:d}=new window.DOMMatrixReadOnly(l.transform),h=n.reduce((p,g)=>{const y=i.get(g.id);if(y?.hidden)i.set(y.id,{...y,[oe]:{...y[oe],handleBounds:void 0}});else if(y){const _=yc(g.nodeElement);!!(_.width&&_.height&&(y.width!==_.width||y.height!==_.height||g.forceUpdate))&&(i.set(y.id,{...y,[oe]:{...y[oe],handleBounds:{source:kf(".source",g.nodeElement,d,f),target:kf(".target",g.nodeElement,d,f)}},..._}),p.push({id:y.id,type:"dimensions",dimensions:_}))}return p},[]);ny(i,f);const v=o||a&&!o&&ry(t,{initial:!0,...s});e({nodeInternals:new Map(i),fitViewOnInitDone:v}),h?.length>0&&r?.(h)},updateNodePositions:(n,r=!0,i=!1)=>{const{triggerNodeChanges:a}=t(),o=n.map(s=>{const u={id:s.id,type:"position",dragging:i};return r&&(u.positionAbsolute=s.positionAbsolute,u.position=s.position),u});a(o)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:i,hasDefaultNodes:a,nodeOrigin:o,getNodes:s,elevateNodesOnSelect:u}=t();if(n?.length){if(a){const f=ay(n,s()),c=jr(f,i,o,u);e({nodeInternals:c})}r?.(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:i,getNodes:a}=t();let o,s=null;r?o=n.map(u=>dt(u,!0)):(o=Ht(a(),n),s=Ht(i,[])),Hn({changedNodes:o,changedEdges:s,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:i,getNodes:a}=t();let o,s=null;r?o=n.map(u=>dt(u,!0)):(o=Ht(i,n),s=Ht(a(),[])),Hn({changedNodes:s,changedEdges:o,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:i,getNodes:a}=t(),o=n||a(),s=r||i,u=o.map(c=>(c.selected=!1,dt(c.id,!1))),f=s.map(c=>dt(c.id,!1));Hn({changedNodes:u,changedEdges:f,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:i}=t();r?.scaleExtent([n,i]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:i}=t();r?.scaleExtent([i,n]),e({maxZoom:n})},setTranslateExtent:n=>{t().d3Zoom?.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),a=r().filter(s=>s.selected).map(s=>dt(s.id,!1)),o=n.filter(s=>s.selected).map(s=>dt(s.id,!1));Hn({changedNodes:a,changedEdges:o,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(i=>{i.positionAbsolute=mc(i.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:i,height:a,d3Zoom:o,d3Selection:s,translateExtent:u}=t();if(!o||!s||!n.x&&!n.y)return!1;const f=nt.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),c=[[0,0],[i,a]],l=o?.constrain()(f,c,u);return o.transform(s,l),r[0]!==l.x||r[1]!==l.y||r[2]!==l.k},cancelConnection:()=>e({connectionNodeId:ct.connectionNodeId,connectionHandleId:ct.connectionHandleId,connectionHandleType:ct.connectionHandleType,connectionStatus:ct.connectionStatus,connectionStartHandle:ct.connectionStartHandle,connectionEndHandle:ct.connectionEndHandle}),reset:()=>e({...ct})}),Object.is),yy=({children:e})=>{const t=C.useRef(null);return t.current||(t.current=iE()),M.createElement(S1,{value:t.current},e)};yy.displayName="ReactFlowProvider";const my=({children:e})=>C.useContext(hr)?M.createElement(M.Fragment,null,e):M.createElement(yy,null,e);my.displayName="ReactFlowWrapper";const aE={input:Wv,default:rc,output:Zv,group:Sc},oE={default:rr,straight:wc,step:bc,smoothstep:pr,simplebezier:_c},sE=[0,0],uE=[15,15],cE={x:0,y:0,zoom:1},fE={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},lE=C.forwardRef(({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:i,nodeTypes:a=aE,edgeTypes:o=oE,onNodeClick:s,onEdgeClick:u,onInit:f,onMove:c,onMoveStart:l,onMoveEnd:d,onConnect:h,onConnectStart:v,onConnectEnd:p,onClickConnectStart:g,onClickConnectEnd:y,onNodeMouseEnter:_,onNodeMouseMove:w,onNodeMouseLeave:m,onNodeContextMenu:S,onNodeDoubleClick:x,onNodeDragStart:R,onNodeDrag:I,onNodeDragStop:A,onNodesDelete:P,onEdgesDelete:T,onSelectionChange:$,onSelectionDragStart:O,onSelectionDrag:b,onSelectionDragStop:q,onSelectionContextMenu:E,onSelectionStart:k,onSelectionEnd:L,connectionMode:N=It.Strict,connectionLineType:D=ht.Bezier,connectionLineStyle:F,connectionLineComponent:z,connectionLineContainerStyle:B,deleteKeyCode:H="Backspace",selectionKeyCode:U="Shift",selectionOnDrag:W=!1,selectionMode:Q=xn.Full,panActivationKeyCode:te="Space",multiSelectionKeyCode:ee=tr()?"Meta":"Control",zoomActivationKeyCode:J=tr()?"Meta":"Control",snapToGri
17d:fe=!1,snapGrid:se=uE,onlyRenderVisibleElements:ve=!1,selectNodesOnDrag:de=!0,nodesDraggable:K,nodesConnectable:he,nodesFocusable:G,nodeOrigin:V=sE,edgesFocusable:ae,edgesUpdatable:Oe,elementsSelectable:Be,defaultViewport:_e=cE,minZoom:ue=.5,maxZoom:Ee=2,translateExtent:ke=ac,preventScrolling:We=!0,nodeExtent:Ve,defaultMarkerColor:Re="#b1b1b7",zoomOnScroll:Xe=!0,zoomOnPinch:ut=!0,panOnScroll:pe=!1,panOnScrollSpeed:Ae=.5,panOnScrollMode:me=St.Free,zoomOnDoubleClick:be=!0,panOnDrag:$t=!0,onPaneClick:Ge,onPaneMouseEnter:bt,onPaneMouseMove:kr,onPaneMouseLeave:$r,onPaneScroll:en,onPaneContextMenu:Dr,children:Wc,onEdgeContextMenu:wt,onEdgeDoubleClick:Hm,onEdgeMouseEnter:Bm,onEdgeMouseMove:Vm,onEdgeMouseLeave:Gm,onEdgeUpdate:jm,onEdgeUpdateStart:Um,onEdgeUpdateEnd:Km,onReconnect:Ym,onReconnectStart:Wm,onReconnectEnd:Xm,reconnectRadius:Zm=10,edgeUpdaterRadius:Qm=10,onNodesChange:Jm,onEdgesChange:e0,noDragClassName:t0="nodrag",noWheelClassName:n0="nowheel",noPanClassName:Xc="nopan",fitView:r0=!1,fitViewOptions:i0,connectOnClick:a0=!0,attributionPosition:o0,proOptions:s0,defaultEdgeOptions:u0,elevateNodesOnSelect:c0=!0,elevateEdgesOnSelect:f0=!1,disableKeyboardA11y:Zc=!1,autoPanOnConnect:l0=!0,autoPanOnNodeDrag:d0=!0,connectionRadius:h0=20,isValidConnection:p0,onError:g0,style:v0,id:Qc,nodeDragThreshold:y0,...m0},_0)=>{const Lr=Qc||"1";return M.createElement("div",{...m0,style:{...v0,...fE},ref:_0,className:ye(["react-flow",i]),"data-testid":"rf__wrapper",id:Qc},M.createElement(my,null,M.createElement(rE,{onInit:f,onMove:c,onMoveStart:l,onMoveEnd:d,onNodeClick:s,onEdgeClick:u,onNodeMouseEnter:_,onNodeMouseMove:w,onNodeMouseLeave:m,onNodeContextMenu:S,onNodeDoubleClick:x,nodeTypes:a,edgeTypes:o,connectionLineType:D,connectionLineStyle:F,connectionLineComponent:z,connectionLineContainerStyle:B,selectionKeyCode:U,selectionOnDrag:W,selectionMode:Q,deleteKeyCode:H,multiSelectionKeyCode:ee,panActivationKeyCode:te,zoomActivationKeyCode:J,onlyRenderVisibleElements:ve,selectNodesOnDrag:de,defaultViewport:_e,translateExtent:ke,minZoom:ue,maxZoom:Ee,preventScrolling:We,zoomOnScroll:Xe,zoomOnPinch:ut,zoomOnDoubleClick:be,panOnScroll:pe,panOnScrollSpeed:Ae,panOnScrollMode:me,panOnDrag:$t,onPaneClick:Ge,onPaneMouseEnter:bt,onPaneMouseMove:kr,onPaneMouseLeave:$r,onPaneScroll:en,onPaneContextMenu:Dr,onSelectionContextMenu:E,onSelectionStart:k,onSelectionEnd:L,onEdgeContextMenu:wt,onEdgeDoubleClick:Hm,onEdgeMouseEnter:Bm,onEdgeMouseMove:Vm,onEdgeMouseLeave:Gm,onReconnect:Ym??jm,onReconnectStart:Wm??Um,onReconnectEnd:Xm??Km,reconnectRadius:Zm??Qm,defaultMarkerColor:Re,noDragClassName:t0,noWheelClassName:n0,noPanClassName:Xc,elevateEdgesOnSelect:f0,rfId:Lr,disableKeyboardA11y:Zc,nodeOrigin:V,nodeExtent:Ve}),M.createElement(ex,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:h,onConnectStart:v,onConnectEnd:p,onClickConnectStart:g,onClickConnectEnd:y,nodesDraggable:K,nodesConnectable:he,nodesFocusable:G,edgesFocusable:ae,edgesUpdatable:Oe,elementsSelectable:Be,elevateNodesOnSelect:c0,minZoom:ue,maxZoom:Ee,nodeExtent:Ve,onNodesChange:Jm,onEdgesChange:e0,snapToGrid:fe,snapGrid:se,connectionMode:N,translateExtent:ke,connectOnClick:a0,defaultEdgeOptions:u0,fitView:r0,fitViewOptions:i0,onNodesDelete:P,onEdgesDelete:T,onNodeDragStart:R,onNodeDrag:I,onNodeDragStop:A,onSelectionDrag:b,onSelectionDragStart:O,onSelectionDragStop:q,noPanClassName:Xc,nodeOrigin:V,rfId:Lr,autoPanOnConnect:l0,autoPanOnNodeDrag:d0,onError:g0,connectionRadius:h0,isValidConnection:p0,nodeDragThreshold:y0}),M.createElement(Q1,{onSelectionChange:$}),Wc,M.createElement(R1,{proOptions:s0,position:o0}),M.createElement(ax,{rfId:Lr,disableKeyboardA11y:Zc})))});lE.displayName="ReactFlow";function _y(e){return t=>{const[n,r]=C.useState(t),i=C.useCallback(a=>r(o=>e(a,o)),[]);return[n,r,i]}}const rI=_y(ay),iI=_y(_x),by=({id:e,x:t,y:n,width:r,height:i,style:a,color:o,strokeColor:s,strokeWidth:u,className:f,borderRadius:c,shapeRendering:l,onClick:d,selected:h})=>{const{background:v,backgroundColor:p}=a||{},g=o||v||p;return M.createElement("rect",{className:ye(["react-flow__minimap-node",{selected:h},f]),x:t,y:n,rx:c,ry:c,width:r,height:i,fill:g,stroke:s,strokeWidth:u,shapeRendering:l,onClick:d?y=>d(y,e):void 0})};by.displayName="MiniMapNode";var dE=C.memo(by);const hE=e=>e.nodeOrigin,pE=e=>e.getNodes().filter(t=>!t.hidden&&t.width&&t.height),Wr=e=>e instanceof Function?e:()=>e;
17function gE({nodeStrokeColor:e="transparent",nodeColor:t="#e2e2e2",nodeClassName:n="",nodeBorderRadius:r=5,nodeStrokeWidth:i=2,nodeComponent:a=dE,onClick:o}){const s=re(pE,ge),u=re(hE),f=Wr(t),c=Wr(e),l=Wr(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return M.createElement(M.Fragment,null,s.map(h=>{const{x:v,y:p}=At(h,u).positionAbsolute;return M.createElement(a,{key:h.id,x:v,y:p,width:h.width,height:h.height,style:h.style,selected:h.selected,className:l(h),color:f(h),borderRadius:r,strokeColor:c(h),strokeWidth:i,shapeRendering:d,onClick:o,id:h.id})}))}var vE=C.memo(gE);const yE=200,mE=150,_E=e=>{const t=e.getNodes(),n={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]};return{viewBB:n,boundingRect:t.length>0?C1(gr(t,e.nodeOrigin),n):n,rfId:e.rfId}},bE="react-flow__minimap-desc";function wy({style:e,className:t,nodeStrokeColor:n="transparent",nodeColor:r="#e2e2e2",nodeClassName:i="",nodeBorderRadius:a=5,nodeStrokeWidth:o=2,nodeComponent:s,maskColor:u="rgb(240, 240, 240, 0.6)",maskStrokeColor:f="none",maskStrokeWidth:c=1,position:l="bottom-right",onClick:d,onNodeClick:h,pannable:v=!1,zoomable:p=!1,ariaLabel:g="React Flow mini map",inversePan:y=!1,zoomStep:_=10,offsetScale:w=5}){const m=le(),S=C.useRef(null),{boundingRect:x,viewBB:R,rfId:I}=re(_E,ge),A=e?.width??yE,P=e?.height??mE,T=x.width/A,$=x.height/P,O=Math.max(T,$),b=O*A,q=O*P,E=w*O,k=x.x-(b-x.width)/2-E,L=x.y-(q-x.height)/2-E,N=b+E*2,D=q+E*2,F=`${bE}-${I}`,z=C.useRef(0);z.current=O,C.useEffect(()=>{if(S.current){const U=Ie(S.current),W=ee=>{const{transform:J,d3Selection:fe,d3Zoom:se}=m.getState();if(ee.sourceEvent.type!=="wheel"||!fe||!se)return;const ve=-ee.sourceEvent.deltaY*(ee.sourceEvent.deltaMode===1?.05:ee.sourceEvent.deltaMode?1:.002)*_,de=J[2]*Math.pow(2,ve);se.scaleTo(fe,de)},Q=ee=>{const{transform:J,d3Selection:fe,d3Zoom:se,translateExtent:ve,width:de,height:K}=m.getState();if(ee.sourceEvent.type!=="mousemove"||!fe||!se)return;const he=z.current*Math.max(1,J[2])*(y?-1:1),G={x:J[0]-ee.sourceEvent.movementX*he,y:J[1]-ee.sourceEvent.movementY*he},V=[[0,0],[de,K]],ae=nt.translate(G.x,G.y).scale(J[2]),Oe=se.constrain()(ae,V,ve);se.transform(fe,Oe)},te=Av().on("zoom",v?Q:null).on("zoom.wheel",p?W:null);return U.call(te),()=>{U.on("zoom",null)}}},[v,p,y,_]);const B=d?U=>{const W=$e(U);d(U,{x:W[0],y:W[1]})}:void 0,H=h?(U,W)=>{const Q=m.getState().nodeInternals.get(W);h(U,Q)}:void 0;return M.createElement(vc,{position:l,style:e,className:ye(["react-flow__minimap",t]),"data-testid":"rf__minimap"},M.createElement("svg",{width:A,height:P,viewBox:`${k} ${L} ${N} ${D}`,role:"img","aria-labelledby":F,ref:S,onClick:B},g&&M.createElement("title",{id:F},g),M.createElement(vE,{onClick:H,nodeColor:r,nodeStrokeColor:n,nodeBorderRadius:a,nodeClassName:i,nodeStrokeWidth:o,nodeComponent:s}),M.createElement("path",{className:"react-flow__minimap-mask",d:`M${k-E},${L-E}h${N+E*2}v${D+E*2}h${-N-E*2}z 18 M${R.x},${R.y}h${R.width}v${R.height}h${-R.width}z`,fill:u,fillRule:"evenodd",stroke:f,strokeWidth:c,pointerEvents:"none"})))}wy.displayName="MiniMap";var aI=C.memo(wy);function wE(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},M.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function xE(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},M.createElement("path",{d:"M0 0h32v4.2H0z"}))}function EE(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},M.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function SE(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},M.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function NE(){return M.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},M.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const cn=({children:e,className:t,...n})=>M.createElement("button",{type:"button",className:ye(["react-flow__controls-button",t]),...n},e);cn.displayName="ControlButton";const RE=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom}),xy=({style:e,showZoom:t=!0,showFitView:n=!0,showInteractive:r=!0,fitViewOptions:i,onZoomIn:a,onZoomOut:o,onFitView:s,onInteractiveChange:u,className:f,children:c,position:l="bottom-left"})=>{const d=le(),[h,v]=C.useState(!1),{isInteractive:p,minZoomReached:g,maxZoomReached:y}=re(RE,ge),{zoomIn:_,zoomOut:w,fitView:m}=Nc();if(C.useEffect(()=>
18{v(!0)},[]),!h)return null;const S=()=>{_(),a?.()},x=()=>{w(),o?.()},R=()=>{m(i),s?.()},I=()=>{d.setState({nodesDraggable:!p,nodesConnectable:!p,elementsSelectable:!p}),u?.(!p)};return M.createElement(vc,{className:ye(["react-flow__controls",f]),position:l,style:e,"data-testid":"rf__controls"},t&&M.createElement(M.Fragment,null,M.createElement(cn,{onClick:S,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:y},M.createElement(wE,null)),M.createElement(cn,{onClick:x,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:g},M.createElement(xE,null))),n&&M.createElement(cn,{className:"react-flow__controls-fitview",onClick:R,title:"fit view","aria-label":"fit view"},M.createElement(EE,null)),r&&M.createElement(cn,{className:"react-flow__controls-interactive",onClick:I,title:"toggle interactivity","aria-label":"toggle interactivity"},p?M.createElement(NE,null):M.createElement(SE,null)),c)};xy.displayName="Controls";var oI=C.memo(xy),Le;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(Le||(Le={}));function AE({color:e,dimensions:t,lineWidth:n}){return M.createElement("path",{stroke:e,strokeWidth:n,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`})}function qE({color:e,radius:t}){return M.createElement("circle",{cx:t,cy:t,r:t,fill:e})}const CE={[Le.Dots]:"#91919a",[Le.Lines]:"#eee",[Le.Cross]:"#e2e2e2"},IE={[Le.Dots]:1,[Le.Lines]:1,[Le.Cross]:6},TE=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function Ey({id:e,variant:t=Le.Dots,gap:n=20,size:r,lineWidth:i=1,offset:a=2,color:o,style:s,className:u}){const f=C.useRef(null),{transform:c,patternId:l}=re(TE,ge),d=o||CE[t],h=r||IE[t],v=t===Le.Dots,p=t===Le.Cross,g=Array.isArray(n)?n:[n,n],y=[g[0]*c[2]||1,g[1]*c[2]||1],_=h*c[2],w=p?[_,_]:y,m=v?[_/a,_/a]:[w[0]/a,w[1]/a];return M.createElement("svg",{className:ye(["react-flow__background",u]),style:{...s,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:f,"data-testid":"rf__background"},M.createElement("pattern",{id:l+e,x:c[0]%y[0],y:c[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${m[0]},-${m[1]})`},v?M.createElement(qE,{color:d,radius:_/a}):M.createElement(AE,{dimensions:w,color:d,lineWidth:i})),M.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${l+e})`}))}Ey.displayName="Background";var sI=C.memo(Ey);function Ac(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Xr,Vf;function ME(){if(Vf)return Xr;Vf=1;function e(){this.__data__=[],this.size=0}return Xr=e,Xr}var Zr,Gf;function Wt(){if(Gf)return Zr;Gf=1;function e(t,n){return t===n||t!==t&&n!==n}return Zr=e,Zr}var Qr,jf;function vr(){if(jf)return Qr;jf=1;var e=Wt();function t(n,r){for(var i=n.length;i--;)if(e(n[i][0],r))return i;return-1}return Qr=t,Qr}var Jr,Uf;function PE(){if(Uf)return Jr;Uf=1;var e=vr(),t=Array.prototype,n=t.splice;function r(i){var a=this.__data__,o=e(a,i);if(o<0)return!1;var s=a.length-1;return o==s?a.pop():n.call(a,o,1),--this.size,!0}return Jr=r,Jr}var ei,Kf;function OE(){if(Kf)return ei;Kf=1;var e=vr();function t(n){var r=this.__data__,i=e(r,n);return i<0?void 0:r[i][1]}return ei=t,ei}var ti,Yf;function kE(){if(Yf)return ti;Yf=1;var e=vr();function t(n){return e(this.__data__,n)>-1}return ti=t,ti}var ni,Wf;function $E(){if(Wf)return ni;Wf=1;var e=vr();function t(n,r){var i=this.__data__,a=e(i,n);return a<0?(++this.size,i.push([n,r])):i[a][1]=r,this}return ni=t,ni}var ri,Xf;function yr(){if(Xf)return ri;Xf=1;var e=ME(),t=PE(),n=OE(),r=kE(),i=$E();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var f=o[s];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,ri=a,ri}var ii,Zf;function DE(){if(Zf)return ii;Zf=1;var e=yr();function t(){this.__data__=new e,this.size=0}return ii=t,ii}var ai,Qf;function LE(){if(Qf)return ai;Qf=1;function e(t){var n=this.__data__,r=n.delete(t);return this.size=n.size,r}return ai=e,ai}var oi,Jf;function FE(){if(Jf)return oi;Jf=1;function e(t){return this.__data__.get(t)}return oi=e,oi}var si,el;function zE(){if(el)return si;el=1;function e(t){return this.__data__.has(t)}return si=e,si}var ui,tl;function Sy(){if(tl)return ui;tl=1;var e=typeof Pn=="object"&&Pn&&Pn.Object===Object&&Pn;return ui=e,ui}var ci,nl;function ze(){if(nl)return ci;nl=1;var e=Sy(),t=typeof self=="object"&&self&&self.Object===Object&&self,n=e||t||Function("return this")();return ci=n,ci}var fi,rl;function Xt(){if(rl)return fi;rl=1;
vendor: 10,205 bytes, line 18
18var e=ze(),t=e.Symbol;return fi=t,fi}var li,il;function HE(){if(il)return li;il=1;var e=Xt(),t=Object.prototype,n=t.hasOwnProperty,r=t.toString,i=e?e.toStringTag:void 0;function a(o){var s=n.call(o,i),u=o[i];try{o[i]=void 0;var f=!0}catch{}var c=r.call(o);return f&&(s?o[i]=u:delete o[i]),c}return li=a,li}var di,al;function BE(){if(al)return di;al=1;var e=Object.prototype,t=e.toString;function n(r){return t.call(r)}return di=n,di}var hi,ol;function Tt(){if(ol)return hi;ol=1;var e=Xt(),t=HE(),n=BE(),r="[object Null]",i="[object Undefined]",a=e?e.toStringTag:void 0;function o(s){return s==null?s===void 0?i:r:a&&a in Object(s)?t(s):n(s)}return hi=o,hi}var pi,sl;function Me(){if(sl)return pi;sl=1;function e(t){var n=typeof t;return t!=null&&(n=="object"||n=="function")}return pi=e,pi}var gi,ul;function qn(){if(ul)return gi;ul=1;var e=Tt(),t=Me(),n="[object AsyncFunction]",r="[object Function]",i="[object GeneratorFunction]",a="[object Proxy]";function o(s){if(!t(s))return!1;var u=e(s);return u==r||u==i||u==n||u==a}return gi=o,gi}var vi,cl;function VE(){if(cl)return vi;cl=1;var e=ze(),t=e["__core-js_shared__"];return vi=t,vi}var yi,fl;function GE(){if(fl)return yi;fl=1;var e=VE(),t=function(){var r=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function n(r){return!!t&&t in r}return yi=n,yi}var mi,ll;function Ny(){if(ll)return mi;ll=1;var e=Function.prototype,t=e.toString;function n(r){if(r!=null){try{return t.call(r)}catch{}try{return r+""}catch{}}return""}return mi=n,mi}var _i,dl;function jE(){if(dl)return _i;dl=1;var e=qn(),t=GE(),n=Me(),r=Ny(),i=/[\\^$.*+?()[\]{}|]/g,a=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,f=s.hasOwnProperty,c=RegExp("^"+u.call(f).replace(i,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function l(d){if(!n(d)||t(d))return!1;var h=e(d)?c:a;return h.test(r(d))}return _i=l,_i}var bi,hl;function UE(){if(hl)return bi;hl=1;function e(t,n){return t?.[n]}return bi=e,bi}var wi,pl;function Mt(){if(pl)return wi;pl=1;var e=jE(),t=UE();function n(r,i){var a=t(r,i);return e(a)?a:void 0}return wi=n,wi}var xi,gl;function qc(){if(gl)return xi;gl=1;var e=Mt(),t=ze(),n=e(t,"Map");return xi=n,xi}var Ei,vl;function mr(){if(vl)return Ei;vl=1;var e=Mt(),t=e(Object,"create");return Ei=t,Ei}var Si,yl;function KE(){if(yl)return Si;yl=1;var e=mr();function t(){this.__data__=e?e(null):{},this.size=0}return Si=t,Si}var Ni,ml;function YE(){if(ml)return Ni;ml=1;function e(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}return Ni=e,Ni}var Ri,_l;function WE(){if(_l)return Ri;_l=1;var e=mr(),t="__lodash_hash_undefined__",n=Object.prototype,r=n.hasOwnProperty;function i(a){var o=this.__data__;if(e){var s=o[a];return s===t?void 0:s}return r.call(o,a)?o[a]:void 0}return Ri=i,Ri}var Ai,bl;function XE(){if(bl)return Ai;bl=1;var e=mr(),t=Object.prototype,n=t.hasOwnProperty;function r(i){var a=this.__data__;return e?a[i]!==void 0:n.call(a,i)}return Ai=r,Ai}var qi,wl;function ZE(){if(wl)return qi;wl=1;var e=mr(),t="__lodash_hash_undefined__";function n(r,i){var a=this.__data__;return this.size+=this.has(r)?0:1,a[r]=e&&i===void 0?t:i,this}return qi=n,qi}var Ci,xl;function QE(){if(xl)return Ci;xl=1;var e=KE(),t=YE(),n=WE(),r=XE(),i=ZE();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var f=o[s];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Ci=a,Ci}var Ii,El;function JE(){if(El)return Ii;El=1;var e=QE(),t=yr(),n=qc();function r(){this.size=0,this.__data__={hash:new e,map:new(n||t),string:new e}}return Ii=r,Ii}var Ti,Sl;function eS(){if(Sl)return Ti;Sl=1;function e(t){var n=typeof t;return n=="string"||n=="number"||n=="symbol"||n=="boolean"?t!=="__proto__":t===null}return Ti=e,Ti}var Mi,Nl;function _r(){if(Nl)return Mi;Nl=1;var e=eS();function t(n,r){var i=n.__data__;return e(r)?i[typeof r=="string"?"string":"hash"]:i.map}return Mi=t,Mi}var Pi,Rl;function tS(){if(Rl)return Pi;Rl=1;var e=_r();function t(n){var r=e(this,n).delete(n);return this.size-=r?1:0,r}return Pi=t,Pi}var Oi,Al;function nS(){if(Al)return Oi;Al=1;var e=_r();function t(n){return e(this,n).get(n)}return Oi=t,Oi}var ki,ql;function rS(){if(ql)return ki;ql=1;var e=_r();function t(n){return e(this,n).has(n)}return ki=t,ki}var $i,Cl;function iS(){if(Cl)return $i;Cl=1;var e=_r();function t(n,r){var i=e(this,n),a=i.size;return i.set(n,r),this.size+=i.size==a?0:1,this}return $i=t,$i}var Di,Il;function Cc(){if(Il)return Di;Il=1;var e=JE(),t=tS(),n=nS(),r=rS(),i=iS();function a(o){var s=-1,u=o==null?0:o.length;for(this.clear();++s<u;){var f=o[s];this.set(f[0],f[1])}}return a.prototype.clear=e,a.prototype.delete=t,a.prototype.get=n,a.prototype.has=r,a.prototype.set=i,Di=a,Di}var Li,Tl;function aS(){if(Tl)return Li;Tl=1;var e=yr(),t=qc(),n=Cc(),r=200;function i(a,o){var s=this.__data__;if(s instanceof e){var u=s.__data__;if(!t||u.length<r-1)return u.push([a,o]),this.size=++s.size,this;s=this.__data__=new n(u)}return s.set(a,o),this.size=s.size,this}return Li=i,Li}var Fi,Ml;function br(){if(Ml)return Fi;Ml=1;var e=yr(),t=DE(),n=LE(),r=FE(),i=zE(),a=aS();function o(s){var u=this.__data__=new e(s);this.size=u.size}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=r,o.prototype.has=i,o.prototype.set=a,Fi=o,Fi}var zi,Pl;function Ic(){if(Pl)return zi;Pl=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i&&n(t[r],r,t)!==!1;);return t}return zi=e,zi}var Hi,Ol;function Ry(){if(Ol)return Hi;Ol=1;var e=Mt(),t=function(){try{var n=e(Object,"defineProperty");return n({},"",{}),n}catch{}}();return Hi=t,Hi}var Bi,kl;function wr(){if(kl)return Bi;kl=1;var e=Ry();function t(n,r,i){r=="__proto__"&&e?e(n,r,{configurable:!0,enumerable:!0,value:i,writable:!0}):n[r]=i}return Bi=t,Bi}var Vi,$l;function xr(){if($l)return Vi;$l=1;var e=wr(),t=Wt(),n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s){var u=a[o];(!(r.call(a,o)&&t(u,s))||s===void 0&&!(o in a))&&e(a,o,s)}return Vi=i,Vi}var Gi,Dl;function Cn(){if(Dl)return Gi;Dl=1;var e=xr(),t=wr();function n(r,i,a,o){var s=!a;a||(a={});for(var u=-1,f=i.length;++u<f;){var c=i[u],l=o?o(a[c],r[c],c,a,r):void 0;l===void 0&&(l=r[c]),s?t(a,c,l):e(a,c,l)}return a}return Gi=n,Gi}var ji,Ll;function oS(){if(Ll)return ji;Ll=1;function e(t,n){for(var r=-1,i=Array(t);++r<t;)i[r]=n(r);return i}return ji=e,ji}var Ui,Fl;function Ye(){if(Fl)return Ui;Fl=1;function e(t){return t!=null&&typeof t=="object"}return Ui=e,Ui}var Ki,zl;function sS(){if(zl)return Ki;zl=1;var e=Tt(),t=Ye(),n="[object Arguments]";function r(i){return t(i)&&e(i)==n}return Ki=r,Ki}var Yi,Hl;function In(){if(Hl)return Yi;Hl=1;var e=sS(),t=Ye(),n=Object.prototype,r=n.hasOwnProperty,i=n.propertyIsEnumerable,a=e(function(){return arguments}())?e:function(o){return t(o)&&r.call(o,"callee")&&!i.call(o,"callee")};return Yi=a,Yi}var Wi,Bl;function ce(){if(Bl)return Wi;Bl=1;var e=Array.isArray;return Wi=e,Wi}var fn={exports:{}},Xi,Vl;function uS(){if(Vl)return Xi;Vl=1;function e(){return!1}return Xi=e,Xi}fn.exports;var Gl;function Zt(){return Gl||(Gl=1,function(e,t){var n=ze(),r=uS(),i=t&&!t.nodeType&&t,a=i&&!0&&e&&!e.nodeType&&e,o=a&&a.exports===i,s=o?n.Buffer:void 0,u=s?s.isBuffer:void 0,f=u||r;e.exports=f}(fn,fn.exports)),fn.exports}var Zi,jl;function Er(){if(jl)return Zi;jl=1;var e=9007199254740991,t=/^(?:0|[1-9]\d*)$/;function n(r,i){var a=typeof r;return i=i??e,!!i&&(a=="number"||a!="symbol"&&t.test(r))&&r>-1&&r%1==0&&r<i}return Zi=n,Zi}var Qi,Ul;function Tc(){if(Ul)return Qi;Ul=1;var e=9007199254740991;function t(n){return typeof n=="number"&&n>-1&&n%1==0&&n<=e}return Qi=t,Qi}var Ji,Kl;function cS(){if(Kl)return Ji;Kl=1;var e=Tt(),t=Tc(),n=Ye(),r="[object Arguments]",i="[object Array]",a="[object Boolean]",o="[object Date]",s="[object Error]",u="[object Function]",f="[object Map]",c="[object Number]",l="[object Object]",d="[object RegExp]",h="[object Set]",v="[object String]",p="[object WeakMap]",g="[object ArrayBuffer]",y="[object DataView]",_="[object Float32Array]",w="[object Float64Array]",m="[object Int8Array]",S="[object Int16Array]",x="[object Int32Array]",R="[object Uint8Array]",I="[object Uint8ClampedArray]",A="[object Uint16Array]",P="[object Uint32Array]",T={};T[_]=T[w]=T[m]=T[S]=T[x]=T[R]=T[I]=T[A]=T[P]=!0,T[r]=T[i]=T[g]=T[a]=T[y]=T[o]=T[s]=T[u]=T[f]=T[c]=T[l]=T[d]=T[h]=T[v]=T[p]=!1;function $(O){return n(O)&&t(O.length)&&!!T[e(O)]}return Ji=$,Ji}var ea,Yl;function Sr(){if(Yl)return ea;Yl=1;function e(t){return function(n){return t(n)}}return ea=e,ea}var ln={exports:{}};ln.exports;var Wl;function Mc(){return Wl||(Wl=1,function(e,t){var n=Sy(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a&&n.process,s=function(){try{var u=i&&i.require&&i.require("util").types;return u||o&&o.binding&&o.binding("util")}catch{}}();e.exports=s}(ln,ln.exports)),ln.exports}var ta,Xl;function Tn(){if(Xl)return ta;Xl=1;var e=cS(),t=Sr(),n=Mc(),r=n&&n.isTypedArray,i=r?t(r):e;return ta=i,ta}var na,Zl;function Ay(){if(Zl)return na;Zl=1;var e=oS(),t=In(),n=ce(),r=Zt(),i=Er(),a=Tn(),o=Object.prototype,s=o.hasOwnProperty;function u(f,c){var l=n(f),d=!l&&t(f),h=!l&&!d&&r(f),v=!l&&!d&&!h&&a(f),p=l||d||h||v,g=p?e(f.length,String):[],y=g.length;for(var _ in f)(c||s.call(f,_))&&!(p&&(_=="length"||h&&(_=="offset"||_=="parent")||v&&(_=="buffer"||_=="byteLength"||_=="byteOffset")||i(_,y)))&&g.push(_);return g}return na=u,na}var ra,Ql;function Nr(){if(Ql)return ra;Ql=1;var e=Object.prototype;function t(n){var r=n&&n.constructor,i=typeof r=="function"&&r.prototype||e;return n===i}return ra=t,ra}var ia,Jl;function qy(){if(Jl)return ia;Jl=1;function e(t,n){return function(r){return t(n(r))}}return ia=e,ia}var aa,ed;function fS(){if(ed)return aa;ed=1;var e=qy(),t=e(Object.keys,Object);return aa=t,aa}var oa,td;function Pc(){if(td)return oa;td=1;var e=Nr(),t=fS(),n=Object.prototype,r=n.hasOwnProperty;function i(a){if(!e(a))return t(a);var o=[];for(var s in Object(a))r.call(a,s)&&s!="constructor"&&o.push(s);return o}return oa=i,oa}var sa,nd;function ot(){if(nd)return sa;nd=1;var e=qn(),t=Tc();function n(r){return r!=null&&t(r.length)&&!e(r)}return sa=n,sa}var ua,rd;
18function _t(){if(rd)return ua;rd=1;var e=Ay(),t=Pc(),n=ot();function r(i){return n(i)?e(i):t(i)}return ua=r,ua}var ca,id;function lS(){if(id)return ca;id=1;var e=Cn(),t=_t();function n(r,i){return r&&e(i,t(i),r)}return ca=n,ca}var fa,ad;function dS(){if(ad)return fa;ad=1;function e(t){var n=[];if(t!=null)for(var r in Object(t))n.push(r);return n}return fa=e,fa}var la,od;function hS(){if(od)return la;od=1;var e=Me(),t=Nr(),n=dS(),r=Object.prototype,i=r.hasOwnProperty;function a(o){if(!e(o))return n(o);var s=t(o),u=[];for(var f in o)f=="constructor"&&(s||!i.call(o,f))||u.push(f);return u}return la=a,la}var da,sd;function Pt(){if(sd)return da;sd=1;var e=Ay(),t=hS(),n=ot();function r(i){return n(i)?e(i,!0):t(i)}return da=r,da}var ha,ud;function pS(){if(ud)return ha;ud=1;var e=Cn(),t=Pt();function n(r,i){return r&&e(i,t(i),r)}return ha=n,ha}var dn={exports:{}};dn.exports;var cd;function Cy(){return cd||(cd=1,function(e,t){var n=ze(),r=t&&!t.nodeType&&t,i=r&&!0&&e&&!e.nodeType&&e,a=i&&i.exports===r,o=a?n.Buffer:void 0,s=o?o.allocUnsafe:void 0;function u(f,c){if(c)return f.slice();var l=f.length,d=s?s(l):new f.constructor(l);return f.copy(d),d}e.exports=u}(dn,dn.exports)),dn.exports}var pa,fd;function Iy(){if(fd)return pa;fd=1;function e(t,n){var r=-1,i=t.length;for(n||(n=Array(i));++r<i;)n[r]=t[r];return n}return pa=e,pa}var ga,ld;function Ty(){if(ld)return ga;ld=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=0,o=[];++r<i;){var s=t[r];n(s,r,t)&&(o[a++]=s)}return o}return ga=e,ga}var va,dd;function My(){if(dd)return va;dd=1;function e(){return[]}return va=e,va}var ya,hd;function Oc(){if(hd)return ya;hd=1;var e=Ty(),t=My(),n=Object.prototype,r=n.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(o){return o==null?[]:(o=Object(o),e(i(o),function(s){return r.call(o,s)}))}:t;return ya=a,ya}var ma,pd;function gS(){if(pd)return ma;pd=1;var e=Cn(),t=Oc();function n(r,i){return e(r,t(r),i)}return ma=n,ma}var _a,gd;function kc(){if(gd)return _a;gd=1;function e(t,n){for(var r=-1,i=n.length,a=t.length;++r<i;)t[a+r]=n[r];return t}return _a=e,_a}var ba,vd;function Rr(){if(vd)return ba;vd=1;var e=qy(),t=e(Object.getPrototypeOf,Object);return ba=t,ba}var wa,yd;function Py(){if(yd)return wa;yd=1;var e=kc(),t=Rr(),n=Oc(),r=My(),i=Object.getOwnPropertySymbols,a=i?function(o){for(var s=[];o;)e(s,n(o)),o=t(o);return s}:r;return wa=a,wa}var xa,md;function vS(){if(md)return xa;md=1;var e=Cn(),t=Py();function n(r,i){return e(r,t(r),i)}return xa=n,xa}var Ea,_d;function Oy(){if(_d)return Ea;_d=1;var e=kc(),t=ce();function n(r,i,a){var o=i(r);return t(r)?o:e(o,a(r))}return Ea=n,Ea}var Sa,bd;function ky(){if(bd)return Sa;bd=1;var e=Oy(),t=Oc(),n=_t();function r(i){return e(i,n,t)}return Sa=r,Sa}var Na,wd;function yS(){if(wd)return Na;wd=1;var e=Oy(),t=Py(),n=Pt();function r(i){return e(i,n,t)}return Na=r,Na}var Ra,xd;function mS(){if(xd)return Ra;xd=1;var e=Mt(),t=ze(),n=e(t,"DataView");return Ra=n,Ra}var Aa,Ed;function _S(){if(Ed)return Aa;Ed=1;var e=Mt(),t=ze(),n=e(t,"Promise");return Aa=n,Aa}var qa,Sd;function $y(){if(Sd)return qa;Sd=1;var e=Mt(),t=ze(),n=e(t,"Set");return qa=n,qa}var Ca,Nd;function bS(){if(Nd)return Ca;Nd=1;var e=Mt(),t=ze(),n=e(t,"WeakMap");return Ca=n,Ca}var Ia,Rd;function Qt(){if(Rd)return Ia;Rd=1;var e=mS(),t=qc(),n=_S(),r=$y(),i=bS(),a=Tt(),o=Ny(),s="[object Map]",u="[object Object]",f="[object Promise]",c="[object Set]",l="[object WeakMap]",d="[object DataView]",h=o(e),v=o(t),p=o(n),g=o(r),y=o(i),_=a;return(e&&_(new e(new ArrayBuffer(1)))!=d||t&&_(new t)!=s||n&&_(n.resolve())!=f||r&&_(new r)!=c||i&&_(new i)!=l)&&(_=function(w){var m=a(w),S=m==u?w.constructor:void 0,x=S?o(S):"";if(x)switch(x){case h:return d;case v:return s;case p:return f;case g:return c;case y:return l}return m}),Ia=_,Ia}var Ta,Ad;function wS(){if(Ad)return Ta;Ad=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r){var i=r.length,a=new r.constructor(i);return i&&typeof r[0]=="string"&&t.call(r,"index")&&(a.index=r.index,a.input=r.input),a}return Ta=n,Ta}var Ma,qd;function Dy(){if(qd)return Ma;qd=1;var e=ze(),t=e.Uint8Array;return Ma=t,Ma}var Pa,Cd;function $c(){if(Cd)return Pa;Cd=1;var e=Dy();function t(n){var r=new n.constructor(n.byteLength);return new e(r).set(new e(n)),r}return Pa=t,Pa}var Oa,Id;function xS(){if(Id)return Oa;Id=1;var e=$c();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.byteLength)}return Oa=t,Oa}var ka,Td;function ES(){if(Td)return ka;Td=1;var e=/\w*$/;function t(n){var r=new n.constructor(n.source,e.exec(n));return r.lastIndex=n.lastIndex,r}return ka=t,ka}var $a,Md;function SS(){if(Md)return $a;Md=1;var e=Xt(),t=e?e.prototype:void 0,n=t?t.valueOf:void 0;function r(i){return n?Object(n.call(i)):{}}return $a=r,$a}var Da,Pd;function Ly(){if(Pd)return Da;Pd=1;var e=$c();function t(n,r){var i=r?e(n.buffer):n.buffer;return new n.constructor(i,n.byteOffset,n.length)}return Da=t,Da}var La,Od;function NS(){if(Od)return La;Od=1;var e=$c(),t=xS(),n=ES(),r=SS(),i=Ly(),a="[object Boolean]",o="[object Date]",s="[object Map]",u="[object Number]",f="[object RegExp]",c="[object Set]",l="[object String]",d="[object Symbol]",h="[object ArrayBuffer]",v="[object DataView]",p="[object Float32Array]",g="[object Float64Array
18]",y="[object Int8Array]",_="[object Int16Array]",w="[object Int32Array]",m="[object Uint8Array]",S="[object Uint8ClampedArray]",x="[object Uint16Array]",R="[object Uint32Array]";function I(A,P,T){var $=A.constructor;switch(P){case h:return e(A);case a:case o:return new $(+A);case v:return t(A,T);case p:case g:case y:case _:case w:case m:case S:case x:case R:return i(A,T);case s:return new $;case u:case l:return new $(A);case f:return n(A);case c:return new $;case d:return r(A)}}return La=I,La}var Fa,kd;function Fy(){if(kd)return Fa;kd=1;var e=Me(),t=Object.create,n=function(){function r(){}return function(i){if(!e(i))return{};if(t)return t(i);r.prototype=i;var a=new r;return r.prototype=void 0,a}}();return Fa=n,Fa}var za,$d;function zy(){if($d)return za;$d=1;var e=Fy(),t=Rr(),n=Nr();function r(i){return typeof i.constructor=="function"&&!n(i)?e(t(i)):{}}return za=r,za}var Ha,Dd;function RS(){if(Dd)return Ha;Dd=1;var e=Qt(),t=Ye(),n="[object Map]";function r(i){return t(i)&&e(i)==n}return Ha=r,Ha}var Ba,Ld;function AS(){if(Ld)return Ba;Ld=1;var e=RS(),t=Sr(),n=Mc(),r=n&&n.isMap,i=r?t(r):e;return Ba=i,Ba}var Va,Fd;function qS(){if(Fd)return Va;Fd=1;var e=Qt(),t=Ye(),n="[object Set]";function r(i){return t(i)&&e(i)==n}return Va=r,Va}var Ga,zd;function CS(){if(zd)return Ga;zd=1;var e=qS(),t=Sr(),n=Mc(),r=n&&n.isSet,i=r?t(r):e;return Ga=i,Ga}var ja,Hd;function Hy(){if(Hd)return ja;Hd=1;var e=br(),t=Ic(),n=xr(),r=lS(),i=pS(),a=Cy(),o=Iy(),s=gS(),u=vS(),f=ky(),c=yS(),l=Qt(),d=wS(),h=NS(),v=zy(),p=ce(),g=Zt(),y=AS(),_=Me(),w=CS(),m=_t(),S=Pt(),x=1,R=2,I=4,A="[object Arguments]",P="[object Array]",T="[object Boolean]",$="[object Date]",O="[object Error]",b="[object Function]",q="[object GeneratorFunction]",E="[object Map]",k="[object Number]",L="[object Object]",N="[object RegExp]",D="[object Set]",F="[object String]",z="[object Symbol]",B="[object WeakMap]",H="[object ArrayBuffer]",U="[object DataView]",W="[object Float32Array]",Q="[object Float64Array]",te="[object Int8Array]",ee="[object Int16Array]",J="[object Int32Array]",fe="[object Uint8Array]",se="[object Uint8ClampedArray]",ve="[object Uint16Array]",de="[object Uint32Array]",K={};K[A]=K[P]=K[H]=K[U]=K[T]=K[$]=K[W]=K[Q]=K[te]=K[ee]=K[J]=K[E]=K[k]=K[L]=K[N]=K[D]=K[F]=K[z]=K[fe]=K[se]=K[ve]=K[de]=!0,K[O]=K[b]=K[B]=!1;function he(G,V,ae,Oe,Be,_e){var ue,Ee=V&x,ke=V&R,We=V&I;if(ae&&(ue=Be?ae(G,Oe,Be,_e):ae(G)),ue!==void 0)return ue;if(!_(G))return G;var Ve=p(G);if(Ve){if(ue=d(G),!Ee)return o(G,ue)}else{var Re=l(G),Xe=Re==b||Re==q;if(g(G))return a(G,Ee);if(Re==L||Re==A||Xe&&!Be){if(ue=ke||Xe?{}:v(G),!Ee)return ke?u(G,i(ue,G)):s(G,r(ue,G))}else{if(!K[Re])return Be?G:{};ue=h(G,Re,Ee)}}_e||(_e=new e);var ut=_e.get(G);if(ut)return ut;_e.set(G,ue),w(G)?G.forEach(function(me){ue.add(he(me,V,ae,me,G,_e))}):y(G)&&G.forEach(function(me,be){ue.set(be,he(me,V,ae,be,G,_e))});
vendor: 5,305 bytes, line 18
18var pe=We?ke?c:f:ke?S:m,Ae=Ve?void 0:pe(G);return t(Ae||G,function(me,be){Ae&&(be=me,me=G[be]),n(ue,be,he(me,V,ae,be,G,_e))}),ue}return ja=he,ja}var Ua,Bd;function IS(){if(Bd)return Ua;Bd=1;var e=Hy(),t=4;function n(r){return e(r,t)}return Ua=n,Ua}var Ka,Vd;function Dc(){if(Vd)return Ka;Vd=1;function e(t){return function(){return t}}return Ka=e,Ka}var Ya,Gd;function TS(){if(Gd)return Ya;Gd=1;function e(t){return function(n,r,i){for(var a=-1,o=Object(n),s=i(n),u=s.length;u--;){var f=s[t?u:++a];if(r(o[f],f,o)===!1)break}return n}}return Ya=e,Ya}var Wa,jd;function Lc(){if(jd)return Wa;jd=1;var e=TS(),t=e();return Wa=t,Wa}var Xa,Ud;function Fc(){if(Ud)return Xa;Ud=1;var e=Lc(),t=_t();function n(r,i){return r&&e(r,i,t)}return Xa=n,Xa}var Za,Kd;function MS(){if(Kd)return Za;Kd=1;var e=ot();function t(n,r){return function(i,a){if(i==null)return i;if(!e(i))return n(i,a);for(var o=i.length,s=r?o:-1,u=Object(i);(r?s--:++s<o)&&a(u[s],s,u)!==!1;);return i}}return Za=t,Za}var Qa,Yd;function Ar(){if(Yd)return Qa;Yd=1;var e=Fc(),t=MS(),n=t(e);return Qa=n,Qa}var Ja,Wd;function Ot(){if(Wd)return Ja;Wd=1;function e(t){return t}return Ja=e,Ja}var eo,Xd;function By(){if(Xd)return eo;Xd=1;var e=Ot();function t(n){return typeof n=="function"?n:e}return eo=t,eo}var to,Zd;function Vy(){if(Zd)return to;Zd=1;var e=Ic(),t=Ar(),n=By(),r=ce();function i(a,o){var s=r(a)?e:t;return s(a,n(o))}return to=i,to}var no,Qd;function Gy(){return Qd||(Qd=1,no=Vy()),no}var ro,Jd;function PS(){if(Jd)return ro;Jd=1;var e=Ar();function t(n,r){var i=[];return e(n,function(a,o,s){r(a,o,s)&&i.push(a)}),i}return ro=t,ro}var io,eh;function OS(){if(eh)return io;eh=1;var e="__lodash_hash_undefined__";function t(n){return this.__data__.set(n,e),this}return io=t,io}var ao,th;function kS(){if(th)return ao;th=1;function e(t){return this.__data__.has(t)}return ao=e,ao}var oo,nh;function jy(){if(nh)return oo;nh=1;var e=Cc(),t=OS(),n=kS();function r(i){var a=-1,o=i==null?0:i.length;for(this.__data__=new e;++a<o;)this.add(i[a])}return r.prototype.add=r.prototype.push=t,r.prototype.has=n,oo=r,oo}var so,rh;function $S(){if(rh)return so;rh=1;function e(t,n){for(var r=-1,i=t==null?0:t.length;++r<i;)if(n(t[r],r,t))return!0;return!1}return so=e,so}var uo,ih;function Uy(){if(ih)return uo;ih=1;function e(t,n){return t.has(n)}return uo=e,uo}var co,ah;function Ky(){if(ah)return co;ah=1;var e=jy(),t=$S(),n=Uy(),r=1,i=2;function a(o,s,u,f,c,l){var d=u&r,h=o.length,v=s.length;if(h!=v&&!(d&&v>h))return!1;var p=l.get(o),g=l.get(s);if(p&&g)return p==s&&g==o;var y=-1,_=!0,w=u&i?new e:void 0;for(l.set(o,s),l.set(s,o);++y<h;){var m=o[y],S=s[y];if(f)var x=d?f(S,m,y,s,o,l):f(m,S,y,o,s,l);if(x!==void 0){if(x)continue;_=!1;break}if(w){if(!t(s,function(R,I){if(!n(w,I)&&(m===R||c(m,R,u,f,l)))return w.push(I)})){_=!1;break}}else if(!(m===S||c(m,S,u,f,l))){_=!1;break}}return l.delete(o),l.delete(s),_}return co=a,co}var fo,oh;function DS(){if(oh)return fo;oh=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i,a){r[++n]=[a,i]}),r}return fo=e,fo}var lo,sh;function zc(){if(sh)return lo;sh=1;function e(t){var n=-1,r=Array(t.size);return t.forEach(function(i){r[++n]=i}),r}return lo=e,lo}var ho,uh;function LS(){if(uh)return ho;uh=1;var e=Xt(),t=Dy(),n=Wt(),r=Ky(),i=DS(),a=zc(),o=1,s=2,u="[object Boolean]",f="[object Date]",c="[object Error]",l="[object Map]",d="[object Number]",h="[object RegExp]",v="[object Set]",p="[object String]",g="[object Symbol]",y="[object ArrayBuffer]",_="[object DataView]",w=e?e.prototype:void 0,m=w?w.valueOf:void 0;function S(x,R,I,A,P,T,$){switch(I){case _:if(x.byteLength!=R.byteLength||x.byteOffset!=R.byteOffset)return!1;x=x.buffer,R=R.buffer;case y:return!(x.byteLength!=R.byteLength||!T(new t(x),new t(R)));case u:case f:case d:return n(+x,+R);case c:return x.name==R.name&&x.message==R.message;case h:case p:return x==R+"";case l:var O=i;case v:var b=A&o;if(O||(O=a),x.size!=R.size&&!b)return!1;var q=$.get(x);if(q)return q==R;A|=s,$.set(x,R);var E=r(O(x),O(R),A,P,T,$);return $.delete(x),E;case g:if(m)return m.call(x)==m.call(R)}return!1}return ho=S,ho}var po,ch;function FS(){if(ch)return po;ch=1;var e=ky(),t=1,n=Object.prototype,r=n.hasOwnProperty;function i(a,o,s,u,f,c){var l=s&t,d=e(a),h=d.length,v=e(o),p=v.length;if(h!=p&&!l)return!1;for(var g=h;g--;){var y=d[g];if(!(l?y in o:r.call(o,y)))return!1}var _=c.get(a),w=c.get(o);if(_&&w)return _==o&&w==a;var m=!0;c.set(a,o),c.set(o,a);for(var S=l;++g<h;){y=d[g];var x=a[y],R=o[y];if(u)var I=l?u(R,x,y,o,a,c):u(x,R,y,a,o,c);if(!(I===void 0?x===R||f(x,R,s,u,c):I)){m=!1;break}S||(S=y=="constructor")}if(m&&!S){var A=a.constructor,P=o.constructor;A!=P&&"constructor"in a&&"constructor"in o&&!(typeof A=="function"&&A instanceof A&&typeof P=="function"&&P instanceof P)&&(m=!1)}return c.delete(a),c.delete(o),m}return po=i,po}var go,fh;function zS(){if(fh)return go;fh=1;var e=br(),t=Ky(),n=LS(),r=FS(),i=Qt(),a=ce(),o=Zt(),s=Tn(),u=1,f="[object Arguments]",c="[object Array]",l="[object Object]",d=Object.prototype,h=d.hasOwnProperty;function v(p,g,y,_,w,m){var S=a(p),x=a(g),R=S?c:i(p),I=x?c:i(g);R=R==f?l:R,I=I==f?l:I;var A=R==l,P=I==l,T=R==I;if(T&&o(p)){if(!o(g))return!1;S=!0,A=!1}if(T&&!A)return m||(m=new e),S||s(p)?t(p,g,y,_,w,m):n(p,g,R,y,_,w,m);if(!(y&u)){var $=A&&h.call(p,"__wrapped__"),O=P&&h.call(g,"__wrapped__");
vendor: 4,107 bytes, line 18
18if($||O){var b=$?p.value():p,q=O?g.value():g;return m||(m=new e),w(b,q,y,_,m)}}return T?(m||(m=new e),r(p,g,y,_,w,m)):!1}return go=v,go}var vo,lh;function Yy(){if(lh)return vo;lh=1;var e=zS(),t=Ye();function n(r,i,a,o,s){return r===i?!0:r==null||i==null||!t(r)&&!t(i)?r!==r&&i!==i:e(r,i,a,o,n,s)}return vo=n,vo}var yo,dh;function HS(){if(dh)return yo;dh=1;var e=br(),t=Yy(),n=1,r=2;function i(a,o,s,u){var f=s.length,c=f,l=!u;if(a==null)return!c;for(a=Object(a);f--;){var d=s[f];if(l&&d[2]?d[1]!==a[d[0]]:!(d[0]in a))return!1}for(;++f<c;){d=s[f];var h=d[0],v=a[h],p=d[1];if(l&&d[2]){if(v===void 0&&!(h in a))return!1}else{var g=new e;if(u)var y=u(v,p,h,a,o,g);if(!(y===void 0?t(p,v,n|r,u,g):y))return!1}}return!0}return yo=i,yo}var mo,hh;function Wy(){if(hh)return mo;hh=1;var e=Me();function t(n){return n===n&&!e(n)}return mo=t,mo}var _o,ph;function BS(){if(ph)return _o;ph=1;var e=Wy(),t=_t();function n(r){for(var i=t(r),a=i.length;a--;){var o=i[a],s=r[o];i[a]=[o,s,e(s)]}return i}return _o=n,_o}var bo,gh;function Xy(){if(gh)return bo;gh=1;function e(t,n){return function(r){return r==null?!1:r[t]===n&&(n!==void 0||t in Object(r))}}return bo=e,bo}var wo,vh;function VS(){if(vh)return wo;vh=1;var e=HS(),t=BS(),n=Xy();function r(i){var a=t(i);return a.length==1&&a[0][2]?n(a[0][0],a[0][1]):function(o){return o===i||e(o,i,a)}}return wo=r,wo}var xo,yh;function Jt(){if(yh)return xo;yh=1;var e=Tt(),t=Ye(),n="[object Symbol]";function r(i){return typeof i=="symbol"||t(i)&&e(i)==n}return xo=r,xo}var Eo,mh;function Hc(){if(mh)return Eo;mh=1;var e=ce(),t=Jt(),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;function i(a,o){if(e(a))return!1;var s=typeof a;return s=="number"||s=="symbol"||s=="boolean"||a==null||t(a)?!0:r.test(a)||!n.test(a)||o!=null&&a in Object(o)}return Eo=i,Eo}var So,_h;function GS(){if(_h)return So;_h=1;var e=Cc(),t="Expected a function";function n(r,i){if(typeof r!="function"||i!=null&&typeof i!="function")throw new TypeError(t);var a=function(){var o=arguments,s=i?i.apply(this,o):o[0],u=a.cache;if(u.has(s))return u.get(s);var f=r.apply(this,o);return a.cache=u.set(s,f)||u,f};return a.cache=new(n.Cache||e),a}return n.Cache=e,So=n,So}var No,bh;function jS(){if(bh)return No;bh=1;var e=GS(),t=500;function n(r){var i=e(r,function(o){return a.size===t&&a.clear(),o}),a=i.cache;return i}return No=n,No}var Ro,wh;function US(){if(wh)return Ro;wh=1;var e=jS(),t=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n=/\\(\\)?/g,r=e(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(t,function(o,s,u,f){a.push(u?f.replace(n,"$1"):s||o)}),a});return Ro=r,Ro}var Ao,xh;function qr(){if(xh)return Ao;xh=1;function e(t,n){for(var r=-1,i=t==null?0:t.length,a=Array(i);++r<i;)a[r]=n(t[r],r,t);return a}return Ao=e,Ao}var qo,Eh;function KS(){if(Eh)return qo;Eh=1;var e=Xt(),t=qr(),n=ce(),r=Jt(),i=e?e.prototype:void 0,a=i?i.toString:void 0;function o(s){if(typeof s=="string")return s;if(n(s))return t(s,o)+"";if(r(s))return a?a.call(s):"";var u=s+"";return u=="0"&&1/s==-1/0?"-0":u}return qo=o,qo}var Co,Sh;function Zy(){if(Sh)return Co;Sh=1;var e=KS();function t(n){return n==null?"":e(n)}return Co=t,Co}var Io,Nh;function Cr(){if(Nh)return Io;Nh=1;var e=ce(),t=Hc(),n=US(),r=Zy();function i(a,o){return e(a)?a:t(a,o)?[a]:n(r(a))}return Io=i,Io}var To,Rh;function Mn(){if(Rh)return To;Rh=1;var e=Jt();function t(n){if(typeof n=="string"||e(n))return n;var r=n+"";return r=="0"&&1/n==-1/0?"-0":r}return To=t,To}var Mo,Ah;function Ir(){if(Ah)return Mo;Ah=1;var e=Cr(),t=Mn();function n(r,i){i=e(i,r);for(var a=0,o=i.length;r!=null&&a<o;)r=r[t(i[a++])];return a&&a==o?r:void 0}return Mo=n,Mo}var Po,qh;function YS(){if(qh)return Po;qh=1;var e=Ir();function t(n,r,i){var a=n==null?void 0:e(n,r);return a===void 0?i:a}return Po=t,Po}var Oo,Ch;function WS(){if(Ch)return Oo;Ch=1;function e(t,n){return t!=null&&n in Object(t)}return Oo=e,Oo}var ko,Ih;function Qy(){if(Ih)return ko;Ih=1;var e=Cr(),t=In(),n=ce(),r=Er(),i=Tc(),a=Mn();function o(s,u,f){u=e(u,s);for(var c=-1,l=u.length,d=!1;++c<l;){var h=a(u[c]);
18if(!(d=s!=null&&f(s,h)))break;s=s[h]}return d||++c!=l?d:(l=s==null?0:s.length,!!l&&i(l)&&r(h,l)&&(n(s)||t(s)))}return ko=o,ko}var $o,Th;function Jy(){if(Th)return $o;Th=1;var e=WS(),t=Qy();function n(r,i){return r!=null&&t(r,i,e)}return $o=n,$o}var Do,Mh;function XS(){if(Mh)return Do;Mh=1;var e=Yy(),t=YS(),n=Jy(),r=Hc(),i=Wy(),a=Xy(),o=Mn(),s=1,u=2;function f(c,l){return r(c)&&i(l)?a(o(c),l):function(d){var h=t(d,c);return h===void 0&&h===l?n(d,c):e(l,h,s|u)}}return Do=f,Do}var Lo,Ph;function em(){if(Ph)return Lo;Ph=1;function e(t){return function(n){return n?.[t]}}return Lo=e,Lo}var Fo,Oh;function ZS(){if(Oh)return Fo;Oh=1;var e=Ir();function t(n){return function(r){return e(r,n)}}return Fo=t,Fo}var zo,kh;function QS(){if(kh)return zo;kh=1;var e=em(),t=ZS(),n=Hc(),r=Mn();function i(a){return n(a)?e(r(a)):t(a)}return zo=i,zo}var Ho,$h;function st(){if($h)return Ho;$h=1;var e=VS(),t=XS(),n=Ot(),r=ce(),i=QS();function a(o){return typeof o=="function"?o:o==null?n:typeof o=="object"?r(o)?t(o[0],o[1]):e(o):i(o)}return Ho=a,Ho}var Bo,Dh;function tm(){if(Dh)return Bo;Dh=1;var e=Ty(),t=PS(),n=st(),r=ce();function i(a,o){var s=r(a)?e:t;return s(a,n(o,3))}return Bo=i,Bo}var Vo,Lh;function JS(){if(Lh)return Vo;Lh=1;var e=Object.prototype,t=e.hasOwnProperty;function n(r,i){return r!=null&&t.call(r,i)}return Vo=n,Vo}var Go,Fh;function nm(){if(Fh)return Go;Fh=1;var e=JS(),t=Qy();function n(r,i){return r!=null&&t(r,i,e)}return Go=n,Go}var jo,zh;function eN(){if(zh)return jo;zh=1;var e=Pc(),t=Qt(),n=In(),r=ce(),i=ot(),a=Zt(),o=Nr(),s=Tn(),u="[object Map]",f="[object Set]",c=Object.prototype,l=c.hasOwnProperty;function d(h){if(h==null)return!0;if(i(h)&&(r(h)||typeof h=="string"||typeof h.splice=="function"||a(h)||s(h)||n(h)))return!h.length;var v=t(h);if(v==u||v==f)return!h.size;if(o(h))return!e(h).length;for(var p in h)if(l.call(h,p))return!1;return!0}return jo=d,jo}var Uo,Hh;function rm(){if(Hh)return Uo;Hh=1;function e(t){return t===void 0}return Uo=e,Uo}var Ko,Bh;function im(){if(Bh)return Ko;Bh=1;var e=Ar(),t=ot();function n(r,i){var a=-1,o=t(r)?Array(r.length):[];return e(r,function(s,u,f){o[++a]=i(s,u,f)}),o}return Ko=n,Ko}var Yo,Vh;function am(){if(Vh)return Yo;Vh=1;var e=qr(),t=st(),n=im(),r=ce();function i(a,o){var s=r(a)?e:n;return s(a,t(o,3))}return Yo=i,Yo}var Wo,Gh;function tN(){if(Gh)return Wo;Gh=1;function e(t,n,r,i){var a=-1,o=t==null?0:t.length;for(i&&o&&(r=t[++a]);++a<o;)r=n(r,t[a],a,t);return r}return Wo=e,Wo}var Xo,jh;function nN(){if(jh)return Xo;jh=1;function e(t,n,r,i,a){return a(t,function(o,s,u){r=i?(i=!1,o):n(r,o,s,u)}),r}return Xo=e,Xo}var Zo,Uh;function om(){if(Uh)return Zo;Uh=1;var e=tN(),t=Ar(),n=st(),r=nN(),i=ce();function a(o,s,u){var f=i(o)?e:r,c=arguments.length<3;return f(o,n(s,4),u,c,t)}return Zo=a,Zo}var Qo,Kh;function rN(){if(Kh)return Qo;Kh=1;var e=Tt(),t=ce(),n=Ye(),r="[object String]";function i(a){return typeof a=="string"||!t(a)&&n(a)&&e(a)==r}return Qo=i,Qo}var Jo,Yh;function iN(){if(Yh)return Jo;Yh=1;var e=em(),t=e("length");return Jo=t,Jo}var es,Wh;function aN(){if(Wh)return es;Wh=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="\\u200d",s=RegExp("["+o+e+i+a+"]");function u(f){return s.test(f)}return es=u,es}var ts,Xh;function oN(){if(Xh)return ts;Xh=1;var e="\\ud800-\\udfff",t="\\u0300-\\u036f",n="\\ufe20-\\ufe2f",r="\\u20d0-\\u20ff",i=t+n+r,a="\\ufe0e\\ufe0f",o="["+e+"]",s="["+i+"]",u="\\ud83c[\\udffb-\\udfff]",f="(?:"+s+"|"+u+")",c="[^"+e+"]",l="(?:\\ud83c[\\udde6-\\uddff]){2}",d="[\\ud800-\\udbff][\\udc00-\\udfff]",h="\\u200d",v=f+"?",p="["+a+"]?",g="(?:"+h+"(?:"+[c,l,d].join("|")+")"+p+v+")*",y=p+v+g,_="(?:"+[c+s+"?",s,l,d,o].join("|")+")",w=RegExp(u+"(?="+u+")|"+_+y,"g");function m(S){for(var x=w.lastIndex=0;w.test(S);)++x;return x}return ts=m,ts}var ns,Zh;function sN(){if(Zh)return ns;Zh=1;var e=iN(),t=aN(),n=oN();function r(i){return t(i)?n(i):e(i)}return ns=r,ns}var rs,Qh;function uN(){if(Qh)return rs;Qh=1;var e=Pc(),t=Qt(),n=ot(),r=rN(),i=sN(),a="[object Map]",o="[object Set]";function s(u){if(u==null)return 0;if(n(u))return r(u)?i(u):u.length;var f=t(u);return f==a||f==o?u.size:e(u).length}return rs=s,rs}var is,Jh;function cN(){if(Jh)return is;Jh=1;var e=Ic(),t=Fy(),n=Fc(),r=st(),i=Rr(),a=ce(),o=Zt(),s=qn(),u=Me(),f=Tn();function c(l,d,h){var v=a(l),p=v||o(l)||f(l);if(d=r(d,4),h==null){var g=l&&l.constructor;p?h=v?new g:[]:u(l)?h=s(g)?t(i(l)):{}:h={}}return(p?e:n)(l,function(y,_,w){return d(h,y,_,w)}),h}return is=c,is}var as,ep;function fN(){if(ep)return as;ep=1;var e=Xt(),t=In(),n=ce(),r=e?e.isConcatSpreadable:void 0;function i(a){return n(a)||t(a)||!!(r&&a&&a[r])}return as=i,as}var os,tp;function Bc(){if(tp)return os;tp=1;var e=kc(),t=fN();function n(r,i,a,o,s){var u=-1,f=r.length;for(a||(a=t),s||(s=[]);++u<f;){var c=r[u];i>0&&a(c)?i>
181?n(c,i-1,a,o,s):e(s,c):o||(s[s.length]=c)}return s}return os=n,os}var ss,np;function lN(){if(np)return ss;np=1;function e(t,n,r){switch(r.length){case 0:return t.call(n);case 1:return t.call(n,r[0]);case 2:return t.call(n,r[0],r[1]);case 3:return t.call(n,r[0],r[1],r[2])}return t.apply(n,r)}return ss=e,ss}var us,rp;function sm(){if(rp)return us;rp=1;var e=lN(),t=Math.max;function n(r,i,a){return i=t(i===void 0?r.length-1:i,0),function(){for(var o=arguments,s=-1,u=t(o.length-i,0),f=Array(u);++s<u;)f[s]=o[i+s];s=-1;for(var c=Array(i+1);++s<i;)c[s]=o[s];return c[i]=a(f),e(r,this,c)}}return us=n,us}var cs,ip;function dN(){if(ip)return cs;ip=1;var e=Dc(),t=Ry(),n=Ot(),r=t?function(i,a){return t(i,"toString",{configurable:!0,enumerable:!1,value:e(a),writable:!0})}:n;return cs=r,cs}var fs,ap;function hN(){if(ap)return fs;ap=1;var e=800,t=16,n=Date.now;function r(i){var a=0,o=0;return function(){var s=n(),u=t-(s-o);if(o=s,u>0){if(++a>=e)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return fs=r,fs}var ls,op;function um(){if(op)return ls;op=1;var e=dN(),t=hN(),n=t(e);return ls=n,ls}var ds,sp;function Tr(){if(sp)return ds;sp=1;var e=Ot(),t=sm(),n=um();function r(i,a){return n(t(i,a,e),i+"")}return ds=r,ds}var hs,up;function cm(){if(up)return hs;up=1;function e(t,n,r,i){for(var a=t.length,o=r+(i?1:-1);i?o--:++o<a;)if(n(t[o],o,t))return o;return-1}return hs=e,hs}var ps,cp;function pN(){if(cp)return ps;cp=1;function e(t){return t!==t}return ps=e,ps}var gs,fp;function gN(){if(fp)return gs;fp=1;function e(t,n,r){for(var i=r-1,a=t.length;++i<a;)if(t[i]===n)return i;return-1}return gs=e,gs}var vs,lp;function vN(){if(lp)return vs;lp=1;var e=cm(),t=pN(),n=gN();function r(i,a,o){return a===a?n(i,a,o):e(i,t,o)}return vs=r,vs}var ys,dp;function yN(){if(dp)return ys;dp=1;var e=vN();function t(n,r){var i=n==null?0:n.length;return!!i&&e(n,r,0)>-1}return ys=t,ys}var ms,hp;function mN(){if(hp)return ms;hp=1;function e(t,n,r){for(var i=-1,a=t==null?0:t.length;++i<a;)if(r(n,t[i]))return!0;return!1}return ms=e,ms}var _s,pp;function _N(){if(pp)return _s;pp=1;function e(){}return _s=e,_s}var bs,gp;function bN(){if(gp)return bs;gp=1;var e=$y(),t=_N(),n=zc(),r=1/0,i=e&&1/n(new e([,-0]))[1]==r?function(a){return new e(a)}:t;return bs=i,bs}var ws,vp;function wN(){if(vp)return ws;vp=1;var e=jy(),t=yN(),n=mN(),r=Uy(),i=bN(),a=zc(),o=200;function s(u,f,c){var l=-1,d=t,h=u.length,v=!0,p=[],g=p;if(c)v=!1,d=n;else if(h>=o){var y=f?null:i(u);if(y)return a(y);v=!1,d=r,g=new e}else g=f?[]:p;e:for(;++l<h;){var _=u[l],w=f?f(_):_;if(_=c||_!==0?_:0,v&&w===w){for(var m=g.length;m--;)if(g[m]===w)continue e;f&&g.push(w),p.push(_)}else d(g,w,c)||(g!==p&&g.push(w),p.push(_))}return p}return ws=s,ws}var xs,yp;function fm(){if(yp)return xs;yp=1;var e=ot(),t=Ye();function n(r){return t(r)&&e(r)}return xs=n,xs}var Es,mp;function xN(){if(mp)return Es;mp=1;var e=Bc(),t=Tr(),n=wN(),r=fm(),i=t(function(a){return n(e(a,1,r,!0))});return Es=i,Es}var Ss,_p;function EN(){if(_p)return Ss;_p=1;var e=qr();function t(n,r){return e(r,function(i){return n[i]})}return Ss=t,Ss}var Ns,bp;function lm(){if(bp)return Ns;bp=1;var e=EN(),t=_t();function n(r){return r==null?[]:e(r,t(r))}return Ns=n,Ns}var Rs,wp;function Pe(){if(wp)return Rs;wp=1;var e;if(typeof Ac=="function")try{e={clone:IS(),constant:Dc(),each:Gy(),filter:tm(),has:nm(),isArray:ce(),isEmpty:eN(),isFunction:qn(),isUndefined:rm(),keys:_t(),map:am(),reduce:om(),size:uN(),transform:cN(),union:xN(),values:lm()}}catch{}return e||(e=window._),Rs=e,Rs}var As,xp;function Vc(){if(xp)return As;xp=1;var e=Pe();As=i;var t="\0",n="\0",r="�";function i(c){this._isDirected=e.has(c,"directed")?c.directed:!0,this._isMultigraph=e.has(c,"multigraph")?c.multigraph:!1,this._isCompound=e.has(c,"compound")?c.compound:!1,this._label=void 0,this._defaultNodeLabelFn=e.constant(void 0),this._defaultEdgeLabelFn=e.constant(void 0),this._nodes={}
18,this._isCompound&&(this._parent={},this._children={},this._children[n]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(c){return this._label=c,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(c){return e.isFunction(c)||(c=e.constant(c)),this._defaultNodeLabelFn=c,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return e.keys(this._nodes)},i.prototype.sources=function(){var c=this;return e.filter(this.nodes(),function(l){return e.isEmpty(c._in[l])})},i.prototype.sinks=function(){var c=this;return e.filter(this.nodes(),function(l){return e.isEmpty(c._out[l])})},i.prototype.setNodes=function(c,l){var d=arguments,h=this;return e.each(c,function(v){d.length>1?h.setNode(v,l):h.setNode(v)}),this},i.prototype.setNode=function(c,l){return e.has(this._nodes,c)?(arguments.length>1&&(this._nodes[c]=l),this):(this._nodes[c]=arguments.length>
181?l:this._defaultNodeLabelFn(c),this._isCompound&&(this._parent[c]=n,this._children[c]={},this._children[n][c]=!0),this._in[c]={},this._preds[c]={},this._out[c]={},this._sucs[c]={},++this._nodeCount,this)},i.prototype.node=function(c){return this._nodes[c]},i.prototype.hasNode=function(c){return e.has(this._nodes,c)},i.prototype.removeNode=function(c){var l=this;if(e.has(this._nodes,c)){var d=function(h){l.removeEdge(l._edgeObjs[h])};delete this._nodes[c],this._isCompound&&(this._removeFromParentsChildList(c),delete this._parent[c],e.each(this.children(c),function(h){l.setParent(h)}),delete this._children[c]),e.each(e.keys(this._in[c]),d),delete this._in[c],delete this._preds[c],e.each(e.keys(this._out[c]),d),delete this._out[c],delete this._sucs[c],--this._nodeCount}return this},i.prototype.setParent=function(c,l){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(e.isUndefined(l))l=n;else{l+="";for(var d=l;!e.isUndefined(d);d=this.parent(d))if(d===c)throw new Error("Setting "+l+" as parent of "+c+" would create a cycle");this.setNode(l)}return this.setNode(c),this._removeFromParentsChildList(c),this._parent[c]=l,this._children[l][c]=!0,this},i.prototype._removeFromParentsChildList=function(c){delete this._children[this._parent[c]][c]},i.prototype.parent=function(c){if(this._isCompound){var l=this._parent[c];if(l!==n)return l}},i.prototype.children=function(c){if(e.isUndefined(c)&&(c=n),this._isCompound){var l=this._children[c];if(l)return e.keys(l)}else{if(c===n)return this.nodes();if(this.hasNode(c))return[]}},i.prototype.predecessors=function(c){var l=this._preds[c];if(l)return e.keys(l)},i.prototype.successors=function(c){var l=this._sucs[c];if(l)return e.keys(l)},i.prototype.neighbors=function(c){var l=this.predecessors(c);if(l)return e.union(l,this.successors(c))},i.prototype.isLeaf=function(c){var l;return this.isDirected()?l=this.successors(c):l=this.neighbors(c),l.length===0},i.prototype.filterNodes=function(c){var l=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});l.setGraph(this.graph());var d=this;e.each(this._nodes,function(p,g){c(g)&&l.setNode(g,p)}),e.each(this._edgeObjs,function(p){l.hasNode(p.v)&&l.hasNode(p.w)&&l.setEdge(p,d.edge(p))});var h={};function v(p){var g=d.parent(p);return g===void 0||l.hasNode(g)?(h[p]=g,g):g in h?h[g]:v(g)}return this._isCompound&&e.each(l.nodes(),function(p){l.setParent(p,v(p))}),l},i.prototype.setDefaultEdgeLabel=function(c){return e.isFunction(c)||(c=e.constant(c)),this._defaultEdgeLabelFn=c,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return e.values(this._edgeObjs)},i.prototype.setPath=function(c,l){var d=this,h=arguments;return e.reduce(c,function(v,p){return h.length>1?d.setEdge(v,p,l):d.setEdge(v,p),p}),this},i.prototype.setEdge=function(){var c,l,d,h,v=!1,p=arguments[0];typeof p=="object"&&p!==null&&"v"in p?(c=p.v,l=p.w,d=p.name,arguments.length===2&&(h=arguments[1],v=!0)):(c=p,l=arguments[1],d=arguments[3],arguments.length>2&&(h=arguments[2],v=!0)),c=""+c,l=""+l,e.isUndefined(d)||(d=""+d);var g=s(this._isDirected,c,l,d);if(e.has(this._edgeLabels,g))return v&&(this._edgeLabels[g]=h),this;if(!e.isUndefined(d)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(c),this.setNode(l),this._edgeLabels[g]=v?h:this._defaultEdgeLabelFn(c,l,d);var y=u(this._isDirected,c,l,d);return c=y.v,l=y.w,Object.freeze(y),this._edgeObjs[g]=y,a(this._preds[l],c),a(this._sucs[c],l),this._in[l][g]=y,this._out[c][g]=y,this._edgeCount++,this},i.prototype.edge=function(c,l,d){var h=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,c,l,d);return this._edgeLabels[h]},i.prototype.hasEdge=function(c,l,d){var h=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,c,l,d);return e.has(this._edgeLabels,h)},i.prototype.removeEdge=function(c,l,d){var h=arguments.length===1?f(this._isDirected,arguments[0]):s(this._isDirected,c,l,d),v=this._edgeObjs[h];return v&&(c=v.v,l=v.w,delete this._edgeLabels[h],delete this._edgeObjs[h],o(this._preds[l],c),o(this._sucs[c],l),delete this._in[l][h],delete this._out[c][h],this._edgeCount--),this},i.prototype.inEdges=function(c,l){var d=this._in[c];if(d){var h=e.values(d);return l?e.filter(h,function(v){return v.v===l}):h}},i.prototype.outEdges=function(c,l){var d=this._out[c];if(d){var h=e.values(d);return l?e.filter(h,function(v){return v.w===l}):h}},i.prototype.nodeEdges=function(c,l){var d=this.inEdges(c,l);if(d)return d.concat(this.outEdges(c,l))};function a(c,l){c[l]?c[l]++:c[l]=1}
18function o(c,l){--c[l]||delete c[l]}function s(c,l,d,h){var v=""+l,p=""+d;if(!c&&v>p){var g=v;v=p,p=g}return v+r+p+r+(e.isUndefined(h)?t:h)}function u(c,l,d,h){var v=""+l,p=""+d;if(!c&&v>p){var g=v;v=p,p=g}var y={v,w:p};return h&&(y.name=h),y}function f(c,l){return s(c,l.v,l.w,l.name)}return As}var qs,Ep;function SN(){return Ep||(Ep=1,qs="2.1.8"),qs}var Cs,Sp;function NN(){return Sp||(Sp=1,Cs={Graph:Vc(),version:SN()}),Cs}var Is,Np;function RN(){if(Np)return Is;Np=1;var e=Pe(),t=Vc();Is={write:n,read:a};function n(o){var s={options:{directed:o.isDirected(),multigraph:o.isMultigraph(),compound:o.isCompound()},nodes:r(o),edges:i(o)};return e.isUndefined(o.graph())||(s.value=e.clone(o.graph())),s}function r(o){return e.map(o.nodes(),function(s){var u=o.node(s),f=o.parent(s),c={v:s};return e.isUndefined(u)||(c.value=u),e.isUndefined(f)||(c.parent=f),c})}function i(o){return e.map(o.edges(),function(s){var u=o.edge(s),f={v:s.v,w:s.w};return e.isUndefined(s.name)||(f.name=s.name),e.isUndefined(u)||(f.value=u),f})}function a(o){var s=new t(o.options).setGraph(o.value);return e.each(o.nodes,function(u){s.setNode(u.v,u.value),u.parent&&s.setParent(u.v,u.parent)}),e.each(o.edges,function(u){s.setEdge({v:u.v,w:u.w,name:u.name},u.value)}),s}return Is}var Ts,Rp;function AN(){if(Rp)return Ts;Rp=1;var e=Pe();Ts=t;function t(n){var r={},i=[],a;function o(s){e.has(r,s)||(r[s]=!0,a.push(s),e.each(n.successors(s),o),e.each(n.predecessors(s),o))}return e.each(n.nodes(),function(s){a=[],o(s),a.length&&i.push(a)}),i}return Ts}var Ms,Ap;function dm(){if(Ap)return Ms;Ap=1;var e=Pe();Ms=t;function t(){this._arr=[],this._keyIndices={}}return t.prototype.size=function(){return this._arr.length},t.prototype.keys=function(){return this._arr.map(function(n){return n.key})},t.prototype.has=function(n){return e.has(this._keyIndices,n)},t.prototype.priority=function(n){var r=this._keyIndices[n];if(r!==void 0)return this._arr[r].priority},t.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},t.prototype.add=function(n,r){var i=this._keyIndices;if(n=String(n),!e.has(i,n)){var a=this._arr,o=a.length;return i[n]=o,a.push({key:n,priority:r}),this._decrease(o),!0}return!1},t.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var n=this._arr.pop();return delete this._keyIndices[n.key],this._heapify(0),n.key},t.prototype.decrease=function(n,r){var i=this._keyIndices[n];if(r>this._arr[i].priority)throw new Error("New priority is greater than current priority. Key: "+n+" Old: "+this._arr[i].priority+" New: "+r);this._arr[i].priority=r,this._decrease(i)},t.prototype._heapify=function(n){var r=this._arr,i=2*n,a=i+1,o=n;i<r.length&&(o=r[i].priority<r[o].priority?i:o,a<r.length&&(o=r[a].priority<r[o].priority?a:o),o!==n&&(this._swap(n,o),this._heapify(o)
18))},t.prototype._decrease=function(n){for(var r=this._arr,i=r[n].priority,a;n!==0&&(a=n>>1,!(r[a].priority<i));)this._swap(n,a),n=a},t.prototype._swap=function(n,r){var i=this._arr,a=this._keyIndices,o=i[n],s=i[r];i[n]=s,i[r]=o,a[s.key]=n,a[o.key]=r},Ms}var Ps,qp;function hm(){if(qp)return Ps;qp=1;var e=Pe(),t=dm();Ps=r;var n=e.constant(1);function r(a,o,s,u){return i(a,String(o),s||n,u||function(f){return a.outEdges(f)})}function i(a,o,s,u){var f={},c=new t,l,d,h=function(v){var p=v.v!==l?v.v:v.w,g=f[p],y=s(v),_=d.distance+y;if(y<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+v+" Weight: "+y);_<g.distance&&(g.distance=_,g.predecessor=l,c.decrease(p,_))};for(a.nodes().forEach(function(v){var p=v===o?0:Number.POSITIVE_INFINITY;f[v]={distance:p},c.add(v,p)});c.size()>0&&(l=c.removeMin(),d=f[l],d.distance!==Number.POSITIVE_INFINITY);)u(l).forEach(h);return f}return Ps}var Os,Cp;function qN(){if(Cp)return Os;Cp=1;var e=hm(),t=Pe();Os=n;function n(r,i,a){return t.transform(r.nodes(),function(o,s){o[s]=e(r,s,i,a)},{})}return Os}var ks,Ip;function pm(){if(Ip)return ks;Ip=1;var e=Pe();ks=t;function t(n){var r=0,i=[],a={},o=[];function s(u){var f=a[u]={onStack:!0,lowlink:r,index:r++};if(i.push(u),n.successors(u).forEach(function(d){e.has(a,d)?a[d].onStack&&(f.lowlink=Math.min(f.lowlink,a[d].index)):(s(d),f.lowlink=Math.min(f.lowlink,a[d].lowlink))}),f.lowlink===f.index){var c=[],l;do l=i.pop(),a[l].onStack=!1,c.push(l);while(u!==l);o.push(c)}}return n.nodes().forEach(function(u){e.has(a,u)||s(u)}),o}return ks}var $s,Tp;function CN(){if(Tp)return $s;Tp=1;var e=Pe(),t=pm();$s=n;function n(r){return e.filter(t(r),function(i){return i.length>1||i.length===1&&r.hasEdge(i[0],i[0])})}return $s}var Ds,Mp;function IN(){if(Mp)return Ds;Mp=1;var e=Pe();Ds=n;var t=e.constant(1);function n(i,a,o){return r(i,a||t,o||function(s){return i.outEdges(s)})}function r(i,a,o){var s={},u=i.nodes();return u.forEach(function(f){s[f]={},s[f][f]={distance:0},u.forEach(function(c){f!==c&&(s[f][c]={distance:Number.POSITIVE_INFINITY})}),o(f).forEach(function(c){var l=c.v===f?c.w:c.v,d=a(c);s[f][l]={distance:d,predecessor:f}})}),u.forEach(function(f){var c=s[f];u.forEach(function(l){var d=s[l];u.forEach(function(h){var v=d[f],p=c[h],g=d[h],y=v.distance+p.distance;y<g.distance&&(g.distance=y,g.predecessor=p.predecessor)})})}),s}return Ds}var Ls,Pp;function gm(){if(Pp)return Ls;Pp=1;var e=Pe();Ls=t,t.CycleException=n;function t(r){var i={},a={},o=[];function s(u){if(e.has(a,u))throw new n;e.has(i,u)||(a[u]=!0,i[u]=!0,e.each(r.predecessors(u),s),delete a[u],o.push(u))}if(e.each(r.sinks(),s),e.size(i)!==r.nodeCount())throw new n;return o}function n(){}return n.prototype=new Error,Ls}var Fs,Op;function TN(){if(Op)return Fs;Op=1;var e=gm();Fs=t;function t(n){try{e(n)}catch(r){if(r instanceof e.CycleException)return!1;throw r}return!0}return Fs}var zs,kp;function vm(){if(kp)return zs;kp=1;var e=Pe();zs=t;function t(r,i,a){e.isArray(i)||(i=[i]);var o=(r.isDirected()?r.successors:r.neighbors).bind(r),s=[],u={};return e.each(i,function(f){if(!r.hasNode(f))throw new Error("Graph does not have node: "+f);n(r,f,a==="post",u,o,s)}),s}function n(r,i,a,o,s,u){e.has(o,i)||(o[i]=!0,a||u.push(i),e.each(s(i),function(f){n(r,f,a,o,s,u)}),a&&u.push(i))}return zs}var Hs,$p;function MN(){if($p)return Hs;$p=1;var e=vm();Hs=t;function t(n,r){return e(n,r,"post")}return Hs}var Bs,Dp;function PN(){if(Dp)return Bs;Dp=1;var e=vm();Bs=t;function t(n,r){return e(n,r,"pre")}return Bs}var Vs,Lp;function ON(){if(Lp)return Vs;Lp=1;var e=Pe(),t=Vc(),n=dm();Vs=r;function r(i,a){var o=new t,s={},u=new n,f;function c(d){var h=d.v===f?d.w:d.v,v=u.priority(h);if(v!==void 0){var p=a(d);p<v&&(s[h]=f,u.decrease(h,p))}}if(i.nodeCount()===0)return o;e.each(i.nodes(),function(d){u.add(d,Number.POSITIVE_INFINITY),o.setNode(d)}),u.decrease(i.nodes()[0],0);for(var l=!1;u.size()>0;){if(f=u.removeMin(),e.has(s,f))o.setEdge(f,s[f]);else{if(l)throw new Error("Input graph is not connected: "+i);l=!0}i.nodeEdges(f).forEach(c)}return o}return Vs}var Gs,Fp;function kN(){return Fp||(Fp=1,Gs={components:AN(),dijkstra:hm(),dijkstraAll:qN(),findCycles:CN(),floydWarshall:IN(),isAcyclic:TN(),postorder:MN(),preorder:PN(),prim:ON(),tarjan:pm(),topsort:gm()}),Gs}var js,zp;function $N(){if(zp)return js;zp=1;var e=NN();return js={Graph:e.Graph,json:RN(),alg:kN(),version:e.version},js}var ar;if(typeof Ac=="function")try{ar=$N()}catch{}ar||(ar=window.graphlib);var He=ar,Us,Hp;function DN(){if(Hp)return Us;Hp=1;var e=Hy(),t=1,n=4;function r(i){return e(i,t|n)}return Us=r,Us}var Ks,Bp;function Mr(){if(Bp)return Ks;Bp=1;var e=Wt(),t=ot(),n=Er(),r=Me();
18function i(a,o,s){if(!r(s))return!1;var u=typeof o;return(u=="number"?t(s)&&n(o,s.length):u=="string"&&o in s)?e(s[o],a):!1}return Ks=i,Ks}var Ys,Vp;function LN(){if(Vp)return Ys;Vp=1;var e=Tr(),t=Wt(),n=Mr(),r=Pt(),i=Object.prototype,a=i.hasOwnProperty,o=e(function(s,u){s=Object(s);var f=-1,c=u.length,l=c>2?u[2]:void 0;for(l&&n(u[0],u[1],l)&&(c=1);++f<c;)for(var d=u[f],h=r(d),v=-1,p=h.length;++v<p;){var g=h[v],y=s[g];(y===void 0||t(y,i[g])&&!a.call(s,g))&&(s[g]=d[g])}return s});return Ys=o,Ys}var Ws,Gp;function FN(){if(Gp)return Ws;Gp=1;var e=st(),t=ot(),n=_t();function r(i){return function(a,o,s){var u=Object(a);if(!t(a)){var f=e(o,3);a=n(a),o=function(l){return f(u[l],l,u)}}var c=i(a,o,s);return c>-1?u[f?a[c]:c]:void 0}}return Ws=r,Ws}var Xs,jp;function zN(){if(jp)return Xs;jp=1;var e=/\s/;function t(n){for(var r=n.length;r--&&e.test(n.charAt(r)););return r}return Xs=t,Xs}var Zs,Up;function HN(){if(Up)return Zs;Up=1;var e=zN(),t=/^\s+/;function n(r){return r&&r.slice(0,e(r)+1).replace(t,"")}return Zs=n,Zs}var Qs,Kp;function BN(){if(Kp)return Qs;Kp=1;var e=HN(),t=Me(),n=Jt(),r=NaN,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,o=/^0o[0-7]+$/i,s=parseInt;function u(f){if(typeof f=="number")return f;if(n(f))return r;if(t(f)){var c=typeof f.valueOf=="function"?f.valueOf():f;f=t(c)?c+"":c}if(typeof f!="string")return f===0?f:+f;f=e(f);var l=a.test(f);return l||o.test(f)?s(f.slice(2),l?2:8):i.test(f)?r:+f}return Qs=u,Qs}var Js,Yp;function ym(){if(Yp)return Js;Yp=1;var e=BN(),t=1/0,n=17976931348623157e292;function r(i){if(!i)return i===0?i:0;if(i=e(i),i===t||i===-t){var a=i<0?-1:1;return a*n}return i===i?i:0}return Js=r,Js}var eu,Wp;function VN(){if(Wp)return eu;Wp=1;var e=ym();function t(n){var r=e(n),i=r%1;return r===r?i?r-i:r:0}return eu=t,eu}var tu,Xp;function GN(){if(Xp)return tu;Xp=1;var e=cm(),t=st(),n=VN(),r=Math.max;function i(a,o,s){var u=a==null?0:a.length;if(!u)return-1;var f=s==null?0:n(s);return f<0&&(f=r(u+f,0)),e(a,t(o,3),f)}return tu=i,tu}var nu,Zp;function jN(){if(Zp)return nu;Zp=1;var e=FN(),t=GN(),n=e(t);return nu=n,nu}var ru,Qp;function mm(){if(Qp)return ru;Qp=1;var e=Bc();function t(n){var r=n==null?0:n.length;return r?e(n,1):[]}return ru=t,ru}var iu,Jp;function UN(){if(Jp)return iu;Jp=1;var e=Lc(),t=By(),n=Pt();function r(i,a){return i==null?i:e(i,t(a),n)}return iu=r,iu}var au,eg;function KN(){if(eg)return au;eg=1;function e(t){var n=t==null?0:t.length;return n?t[n-1]:void 0}return au=e,au}var ou,tg;function YN(){if(tg)return ou;tg=1;var e=wr(),t=Fc(),n=st();function r(i,a){var o={};return a=n(a,3),t(i,function(s,u,f){e(o,u,a(s,u,f))}),o}return ou=r,ou}var su,ng;function Gc(){if(ng)return su;ng=1;var e=Jt();function t(n,r,i){for(var a=-1,o=n.length;++a<o;){var s=n[a],u=r(s);if(u!=null&&(f===void 0?u===u&&!e(u):i(u,f)))var f=u,c=s}return c}return su=t,su}var uu,rg;function WN(){if(rg)return uu;rg=1;function e(t,n){return t>n}return uu=e,uu}var cu,ig;function XN(){if(ig)return cu;ig=1;var e=Gc(),t=WN(),n=Ot();function r(i){return i&&i.length?e(i,n,t):void 0}return cu=r,cu}var fu,ag;function _m(){if(ag)return fu;ag=1;var e=wr(),t=Wt();function n(r,i,a){(a!==void 0&&!t(r[i],a)||a===void 0&&!(i in r))&&e(r,i,a)}return fu=n,fu}var lu,og;function ZN(){if(og)return lu;og=1;var e=Tt(),t=Rr(),n=Ye(),r="[object Object]",i=Function.prototype,a=Object.prototype,o=i.toString,s=a.hasOwnProperty,u=o.call(Object);function f(c){if(!n(c)||e(c)!=r)return!1;var l=t(c);if(l===null)return!0;var d=s.call(l,"constructor")&&l.constructor;return typeof d=="function"&&d instanceof d&&o.call(d)==u}return lu=f,lu}var du,sg;function bm(){if(sg)return du;sg=1;function e(t,n){if(!(n==="constructor"&&typeof t[n]=="function")&&n!="__proto__")return t[n]}return du=e,du}var hu,ug;function QN(){if(ug)return hu;ug=1;var e=Cn(),t=Pt();function n(r){return e(r,t(r))}return hu=n,hu}var pu,cg;function JN(){if(cg)return pu;cg=1;var e=_m(),t=Cy(),n=Ly(),r=Iy(),i=zy(),a=In(),o=ce(),s=fm(),u=Zt(),f=qn(),c=Me(),l=ZN(),d=Tn(),h=bm(),v=QN();function p(g,y,_,w,m,S,x){var R=h(g,_),I=h(y,_),A=x.get(I);if(A){e(g,_,A);return}var P=S?S(R,I,_+"",g,y,x):void 0,T=P===void 0;if(T){var $=o(I),O=!$&&u(I),b=!$&&!O&&d(I);
18P=I,$||O||b?o(R)?P=R:s(R)?P=r(R):O?(T=!1,P=t(I,!0)):b?(T=!1,P=n(I,!0)):P=[]:l(I)||a(I)?(P=R,a(R)?P=v(R):(!c(R)||f(R))&&(P=i(I))):T=!1}T&&(x.set(I,P),m(P,I,w,S,x),x.delete(I)),e(g,_,P)}return pu=p,pu}var gu,fg;function eR(){if(fg)return gu;fg=1;var e=br(),t=_m(),n=Lc(),r=JN(),i=Me(),a=Pt(),o=bm();function s(u,f,c,l,d){u!==f&&n(f,function(h,v){if(d||(d=new e),i(h))r(u,f,v,c,s,l,d);else{var p=l?l(o(u,v),h,v+"",u,f,d):void 0;p===void 0&&(p=h),t(u,v,p)}},a)}return gu=s,gu}var vu,lg;function tR(){if(lg)return vu;lg=1;var e=Tr(),t=Mr();function n(r){return e(function(i,a){var o=-1,s=a.length,u=s>1?a[s-1]:void 0,f=s>2?a[2]:void 0;for(u=r.length>3&&typeof u=="function"?(s--,u):void 0,f&&t(a[0],a[1],f)&&(u=s<3?void 0:u,s=1),i=Object(i);++o<s;){var c=a[o];c&&r(i,c,o,u)}return i})}return vu=n,vu}var yu,dg;function nR(){if(dg)return yu;dg=1;var e=eR(),t=tR(),n=t(function(r,i,a){e(r,i,a)});return yu=n,yu}var mu,hg;function wm(){if(hg)return mu;hg=1;function e(t,n){return t<n}return mu=e,mu}var _u,pg;function rR(){if(pg)return _u;pg=1;var e=Gc(),t=wm(),n=Ot();function r(i){return i&&i.length?e(i,n,t):void 0}return _u=r,_u}var bu,gg;function iR(){if(gg)return bu;gg=1;var e=Gc(),t=st(),n=wm();function r(i,a){return i&&i.length?e(i,t(a,2),n):void 0}return bu=r,bu}var wu,vg;function aR(){if(vg)return wu;vg=1;var e=ze(),t=function(){return e.Date.now()};return wu=t,wu}var xu,yg;function oR(){if(yg)return xu;yg=1;var e=xr(),t=Cr(),n=Er(),r=Me(),i=Mn();function a(o,s,u,f){if(!r(o))return o;s=t(s,o);for(var c=-1,l=s.length,d=l-1,h=o;h!=null&&++c<l;){var v=i(s[c]),p=u;if(v==="__proto__"||v==="constructor"||v==="prototype")return o;if(c!=d){var g=h[v];p=f?f(g,v,h):void 0,p===void 0&&(p=r(g)?g:n(s[c+1])?[]:{})}e(h,v,p),h=h[v]}return o}return xu=a,xu}var Eu,mg;function sR(){if(mg)return Eu;mg=1;var e=Ir(),t=oR(),n=Cr();function r(i,a,o){for(var s=-1,u=a.length,f={};++s<u;){var c=a[s],l=e(i,c);o(l,c)&&t(f,n(c,i),l)}return f}return Eu=r,Eu}var Su,_g;function uR(){if(_g)return Su;_g=1;var e=sR(),t=Jy();function n(r,i){return e(r,i,function(a,o){return t(r,o)})}return Su=n,Su}var Nu,bg;function cR(){if(bg)return Nu;bg=1;var e=mm(),t=sm(),n=um();function r(i){return n(t(i,void 0,e),i+"")}return Nu=r,Nu}var Ru,wg;function fR(){if(wg)return Ru;wg=1;var e=uR(),t=cR(),n=t(function(r,i){return r==null?{}:e(r,i)});return Ru=n,Ru}var Au,xg;function lR(){if(xg)return Au;xg=1;var e=Math.ceil,t=Math.max;function n(r,i,a,o){for(var s=-1,u=t(e((i-r)/(a||1)),0),f=Array(u);u--;)f[o?u:++s]=r,r+=a;return f}return Au=n,Au}var qu,Eg;function dR(){if(Eg)return qu;Eg=1;var e=lR(),t=Mr(),n=ym();function r(i){return function(a,o,s){return s&&typeof s!="number"&&t(a,o,s)&&(o=s=void 0),a=n(a),o===void 0?(o=a,a=0):o=n(o),s=s===void 0?a<o?1:-1:n(s),e(a,o,s,i)}}return qu=r,qu}var Cu,Sg;function hR(){if(Sg)return Cu;Sg=1;var e=dR(),t=e();return Cu=t,Cu}var Iu,Ng;function pR(){if(Ng)return Iu;Ng=1;function e(t,n){var r=t.length;for(t.sort(n);r--;)t[r]=t[r].value;return t}return Iu=e,Iu}var Tu,Rg;function gR(){if(Rg)return Tu;Rg=1;var e=Jt();function t(n,r){if(n!==r){var i=n!==void 0,a=n===null,o=n===n,s=e(n),u=r!==void 0,f=r===null,c=r===r,l=e(r);if(!f&&!l&&!s&&n>r||s&&u&&c&&!f&&!l||a&&u&&c||!i&&c||!o)return 1;if(!a&&!s&&!l&&n<r||l&&i&&o&&!a&&!s||f&&i&&o||!u&&o||!c)return-1}return 0}return Tu=t,Tu}var Mu,Ag;function vR(){if(Ag)return Mu;Ag=1;var e=gR();function t(n,r,i){for(var a=-1,o=n.criteria,s=r.criteria,u=o.length,f=i.length;++a<u;){var c=e(o[a],s[a]);if(c){if(a>=f)return c;var l=i[a];return c*(l=="desc"?-1:1)}}return n.index-r.index}return Mu=t,Mu}var Pu,qg;function yR(){if(qg)return Pu;qg=1;var e=qr(),t=Ir(),n=st(),r=im(),i=pR(),a=Sr(),o=vR(),s=Ot(),u=ce();function f(c,l,d){l.length?l=e(l,function(p){return u(p)?function(g){return t(g,p.length===1?p[0]:p)}:p}):l=[s];var h=-1;l=e(l,a(n));var v=r(c,function(p,g,y){var _=e(l,function(w){return w(p)});return{criteria:_,index:++h,value:p}});return i(v,function(p,g){return o(p,g,d)})}return Pu=f,Pu}var Ou,Cg;function mR(){if(Cg)return Ou;Cg=1;var e=Bc(),t=yR(),n=Tr(),r=Mr(),i=n(function(a,o){if(a==null)return[];var s=o.length;return s>1&&r(a,o[0],o[1])?o=[]:s>2&&r(o[0],o[1],o[2])&&(o=[o[0]]),t(a,e(o,1),[])});return Ou=i,Ou}var ku,Ig;function _R(){if(Ig)return ku;Ig=1;var e=Zy(),t=0;function n(r){var i=++t;return e(r)+i}return ku=n,ku}var $u,Tg;function bR(){if(Tg)return $u;Tg=1;function e(t,n,r){for(var i=-1,a=t.length,o=n.length,s={};++i<a;){var u=i<o?n[i]:void 0;r(s,t[i],u)}return s}return $u=e,$u}var Du,Mg;function wR(){if(Mg)return Du;Mg=1;
18var e=xr(),t=bR();function n(r,i){return t(r||[],i||[],e)}return Du=n,Du}var or;if(typeof Ac=="function")try{or={cloneDeep:DN(),constant:Dc(),defaults:LN(),each:Gy(),filter:tm(),find:jN(),flatten:mm(),forEach:Vy(),forIn:UN(),has:nm(),isUndefined:rm(),last:KN(),map:am(),mapValues:YN(),max:XN(),merge:nR(),min:rR(),minBy:iR(),now:aR(),pick:fR(),range:hR(),reduce:om(),sortBy:mR(),uniqueId:_R(),values:lm(),zipObject:wR()}}catch{}or||(or=window._);var ie=or,xR=Pr;function Pr(){var e={};e._next=e._prev=e,this._sentinel=e}Pr.prototype.dequeue=function(){var e=this._sentinel,t=e._prev;if(t!==e)return xm(t),t};Pr.prototype.enqueue=function(e){var t=this._sentinel;e._prev&&e._next&&xm(e),e._next=t._next,t._next._prev=e,t._next=e,e._prev=t};Pr.prototype.toString=function(){for(var e=[],t=this._sentinel,n=t._prev;n!==t;)e.push(JSON.stringify(n,ER)),n=n._prev;return"["+e.join(", ")+"]"};function xm(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function ER(e,t){if(e!=="_next"&&e!=="_prev")return t}var et=ie,SR=He.Graph,NR=xR,RR=qR,AR=et.constant(1);function qR(e,t){if(e.nodeCount()<=1)return[];var n=IR(e,t||AR),r=CR(n.graph,n.buckets,n.zeroIdx);return et.flatten(et.map(r,function(i){return e.outEdges(i.v,i.w)}),!0)}function CR(e,t,n){for(var r=[],i=t[t.length-1],a=t[0],o;e.nodeCount();){for(;o=a.dequeue();)Lu(e,t,n,o);for(;o=i.dequeue();)Lu(e,t,n,o);if(e.nodeCount()){for(var s=t.length-2;s>0;--s)if(o=t[s].dequeue(),o){r=r.concat(Lu(e,t,n,o,!0));break}}}return r}function Lu(e,t,n,r,i){var a=i?[]:void 0;return et.forEach(e.inEdges(r.v),function(o){var s=e.edge(o),u=e.node(o.v);i&&a.push({v:o.v,w:o.w}),u.out-=s,oc(t,n,u)}),et.forEach(e.outEdges(r.v),function(o){var s=e.edge(o),u=o.w,f=e.node(u);f.in-=s,oc(t,n,f)}),e.removeNode(r.v),a}function IR(e,t){var n=new SR,r=0,i=0;et.forEach(e.nodes(),function(s){n.setNode(s,{v:s,in:0,out:0})}),et.forEach(e.edges(),function(s){var u=n.edge(s.v,s.w)||0,f=t(s),c=u+f;n.setEdge(s.v,s.w,c),i=Math.max(i,n.node(s.v).out+=f),r=Math.max(r,n.node(s.w).in+=f)});var a=et.range(i+r+3).map(function(){return new NR}),o=r+1;return et.forEach(n.nodes(),function(s){oc(a,o,n.node(s))}),{graph:n,buckets:a,zeroIdx:o}}function oc(e,t,n){n.out?n.in?e[n.out-n.in+t].enqueue(n):e[e.length-1].enqueue(n):e[0].enqueue(n)}var Nt=ie,TR=RR,MR={run:PR,undo:kR};function PR(e){var t=e.graph().acyclicer==="greedy"?TR(e,n(e)):OR(e);Nt.forEach(t,function(r){var i=e.edge(r);e.removeEdge(r),i.forwardName=r.name,i.reversed=!0,e.setEdge(r.w,r.v,i,Nt.uniqueId("rev"))});function n(r){return function(i){return r.edge(i).weight}}}function OR(e){var t=[],n={},r={};function i(a){Nt.has(r,a)||(r[a]=!0,n[a]=!0,Nt.forEach(e.outEdges(a),function(o){Nt.has(n,o.w)?t.push(o):i(o.w)}),delete n[a])}return Nt.forEach(e.nodes(),i),t}function kR(e){Nt.forEach(e.edges(),function(t){var n=e.edge(t);if(n.reversed){e.removeEdge(t);var r=n.forwardName;delete n.reversed,delete n.forwardName,e.setEdge(t.w,t.v,n,r)}})}var ne=ie,Em=He.Graph,Ne={addDummyNode:Sm,simplify:$R,asNonCompoundGraph:DR,successorWeights:LR,predecessorWeights:FR,intersectRect:zR,buildLayerMatrix:HR,normalizeRanks:BR,removeEmptyRanks:VR,addBorderNode:GR,maxRank:Nm,partition:jR,time:UR,notime:KR};function Sm(e,t,n,r){var i;do i=ne.uniqueId(r);while(e.hasNode(i));return n.dummy=t,e.setNode(i,n),i}function $R(e){var t=new Em().setGraph(e.graph());return ne.forEach(e.nodes(),function(n){t.setNode(n,e.node(n))}),ne.forEach(e.edges(),function(n){var r=t.edge(n.v,n.w)||{weight:0,minlen:1},i=e.edge(n);t.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})}),t}function DR(e){var t=new Em({multigraph:e.isMultigraph()}).setGraph(e.graph());return ne.forEach(e.nodes(),function(n){e.children(n).length||t.setNode(n,e.node(n))}),ne.forEach(e.edges(),function(n){t.setEdge(n,e.edge(n))}),t}function LR(e){var t=ne.map(e.nodes(),function(n){var r={};return ne.forEach(e.outEdges(n),function(i){r[i.w]=(r[i.w]||0)+e.edge(i).weight}),r});return ne.zipObject(e.nodes(),t)}function FR(e){var t=ne.map(e.nodes(),function(n){var r={};return ne.forEach(e.inEdges(n),function(i){r[i.v]=(r[i.v]||0)+e.edge(i).weight}),r});return ne.zipObject(e.nodes(),t)}function zR(e,t){var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2;if(!i&&!a)throw new Error("Not possible to find intersection inside of the rectangle");var u,f;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),u=s*i/a,f=s):(i<0&&(o=-o),u=o,f=o*a/i),{x:n+u,y:r+f}}function HR(e){var t=ne.map(ne.range(Nm(e)+1),function(){return[]});return ne.forEach(e.nodes(),function(n){var r=e.node(n),i=r.rank;ne.isUndefined(i)||(t[i][r.order]=n)}),t}function BR(e){var t=ne.min(ne.map(e.nodes(),function(n){return e.no
18de(n).rank}));ne.forEach(e.nodes(),function(n){var r=e.node(n);ne.has(r,"rank")&&(r.rank-=t)})}function VR(e){var t=ne.min(ne.map(e.nodes(),function(a){return e.node(a).rank})),n=[];ne.forEach(e.nodes(),function(a){var o=e.node(a).rank-t;n[o]||(n[o]=[]),n[o].push(a)});var r=0,i=e.graph().nodeRankFactor;ne.forEach(n,function(a,o){ne.isUndefined(a)&&o%i!==0?--r:r&&ne.forEach(a,function(s){e.node(s).rank+=r})})}function GR(e,t,n,r){var i={width:0,height:0};return arguments.length>=4&&(i.rank=n,i.order=r),Sm(e,"border",i,t)}function Nm(e){return ne.max(ne.map(e.nodes(),function(t){var n=e.node(t).rank;if(!ne.isUndefined(n))return n}))}function jR(e,t){var n={lhs:[],rhs:[]};return ne.forEach(e,function(r){t(r)?n.lhs.push(r):n.rhs.push(r)}),n}function UR(e,t){var n=ne.now();try{return t()}finally{console.log(e+" time: "+(ne.now()-n)+"ms")}}function KR(e,t){return t()}var Rm=ie,YR=Ne,WR={run:XR,undo:QR};function XR(e){e.graph().dummyChains=[],Rm.forEach(e.edges(),function(t){ZR(e,t)})}function ZR(e,t){var n=t.v,r=e.node(n).rank,i=t.w,a=e.node(i).rank,o=t.name,s=e.edge(t),u=s.labelRank;if(a!==r+1){e.removeEdge(t);var f,c,l;for(l=0,++r;r<a;++l,++r)s.points=[],c={width:0,height:0,edgeLabel:s,edgeObj:t,rank:r},f=YR.addDummyNode(e,"edge",c,"_d"),r===u&&(c.width=s.width,c.height=s.height,c.dummy="edge-label",c.labelpos=s.labelpos),e.setEdge(n,f,{weight:s.weight},o),l===0&&e.graph().dummyChains.push(f),n=f;e.setEdge(n,i,{weight:s.weight},o)}}function QR(e){Rm.forEach(e.graph().dummyChains,function(t){var n=e.node(t),r=n.edgeLabel,i;for(e.setEdge(n.edgeObj,r);n.dummy;)i=e.successors(t)[0],e.removeNode(t),r.points.push({x:n.x,y:n.y}),n.dummy==="edge-label"&&(r.x=n.x,r.y=n.y,r.width=n.width,r.height=n.height),t=i,n=e.node(t)})}var Vn=ie,Or={longestPath:JR,slack:eA};function JR(e){var t={};function n(r){var i=e.node(r);if(Vn.has(t,r))return i.rank;t[r]=!0;var a=Vn.min(Vn.map(e.outEdges(r),function(o){return n(o.w)-e.edge(o).minlen}));return(a===Number.POSITIVE_INFINITY||a===void 0||a===null)&&(a=0),i.rank=a}Vn.forEach(e.sources(),n)}function eA(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var sr=ie,tA=He.Graph,ur=Or.slack,Am=nA;function nA(e){var t=new tA({directed:!1}),n=e.nodes()[0],r=e.nodeCount();t.setNode(n,{});for(var i,a;rA(t,e)<r;)i=iA(t,e),a=t.hasNode(i.v)?ur(e,i):-ur(e,i),aA(t,e,a);return t}function rA(e,t){function n(r){sr.forEach(t.nodeEdges(r),function(i){var a=i.v,o=r===a?i.w:a;
18!e.hasNode(o)&&!ur(t,i)&&(e.setNode(o,{}),e.setEdge(r,o,{}),n(o))})}return sr.forEach(e.nodes(),n),e.nodeCount()}function iA(e,t){return sr.minBy(t.edges(),function(n){if(e.hasNode(n.v)!==e.hasNode(n.w))return ur(t,n)})}function aA(e,t,n){sr.forEach(e.nodes(),function(r){t.node(r).rank+=n})}var at=ie,oA=Am,sA=Or.slack,uA=Or.longestPath,cA=He.alg.preorder,fA=He.alg.postorder,lA=Ne.simplify,dA=kt;kt.initLowLimValues=Uc;kt.initCutValues=jc;kt.calcCutValue=qm;kt.leaveEdge=Im;kt.enterEdge=Tm;kt.exchangeEdges=Mm;function kt(e){e=lA(e),uA(e);var t=oA(e);Uc(t),jc(t,e);for(var n,r;n=Im(t);)r=Tm(t,e,n),Mm(t,e,n,r)}function jc(e,t){var n=fA(e,e.nodes());n=n.slice(0,n.length-1),at.forEach(n,function(r){hA(e,t,r)})}function hA(e,t,n){var r=e.node(n),i=r.parent;e.edge(n,i).cutvalue=qm(e,t,n)}function qm(e,t,n){var r=e.node(n),i=r.parent,a=!0,o=t.edge(n,i),s=0;return o||(a=!1,o=t.edge(i,n)),s=o.weight,at.forEach(t.nodeEdges(n),function(u){var f=u.v===n,c=f?u.w:u.v;if(c!==i){var l=f===a,d=t.edge(u).weight;if(s+=l?d:-d,gA(e,n,c)){var h=e.edge(n,c).cutvalue;s+=l?-h:h}}}),s}function Uc(e,t){arguments.length<2&&(t=e.nodes()[0]),Cm(e,{},1,t)}function Cm(e,t,n,r,i){var a=n,o=e.node(r);return t[r]=!0,at.forEach(e.neighbors(r),function(s){at.has(t,s)||(n=Cm(e,t,n,s,r))}),o.low=a,o.lim=n++,i?o.parent=i:delete o.parent,n}function Im(e){return at.find(e.edges(),function(t){return e.edge(t).cutvalue<0})}function Tm(e,t,n){var r=n.v,i=n.w;t.hasEdge(r,i)||(r=n.w,i=n.v);var a=e.node(r),o=e.node(i),s=a,u=!1;a.lim>o.lim&&(s=o,u=!0);var f=at.filter(t.edges(),function(c){return u===Pg(e,e.node(c.v),s)&&u!==Pg(e,e.node(c.w),s)});return at.minBy(f,function(c){return sA(t,c)})}function Mm(e,t,n,r){var i=n.v,a=n.w;e.removeEdge(i,a),e.setEdge(r.v,r.w,{}),Uc(e),jc(e,t),pA(e,t)}function pA(e,t){var n=at.find(e.nodes(),function(i){return!t.node(i).parent}),r=cA(e,n);r=r.slice(1),at.forEach(r,function(i){var a=e.node(i).parent,o=t.edge(i,a),s=!1;o||(o=t.edge(a,i),s=!0),t.node(i).rank=t.node(a).rank+(s?o.minlen:-o.minlen)})}function gA(e,t,n){return e.hasEdge(t,n)}function Pg(e,t,n){return n.low<=t.lim&&t.lim<=n.lim}var vA=Or,Pm=vA.longestPath,yA=Am,mA=dA,_A=bA;function bA(e){switch(e.graph().ranker){case"network-simplex":Og(e);break;case"tight-tree":xA(e);break;case"longest-path":wA(e);break;default:Og(e)}}var wA=Pm;function xA(e){Pm(e),yA(e)}function Og(e){mA(e)}var sc=ie,EA=SA;function SA(e){var t=RA(e);sc.forEach(e.graph().dummyChains,function(n){for(var r=e.node(n),i=r.edgeObj,a=NA(e,t,i.v,i.w),o=a.path,s=a.lca,u=0,f=o[u],c=!0;n!==i.w;){if(r=e.node(n),c){for(;(f=o[u])!==s&&e.node(f).maxRank<r.rank;)u++;f===s&&(c=!1)}if(!c){for(;u<o.length-1&&e.node(f=o[u+1]).minRank<=r.rank;)u++;f=o[u]}e.setParent(n,f),n=e.successors(n)[0]}})}function NA(e,t,n,r){var i=[],a=[],o=Math.min(t[n].low,t[r].low),s=Math.max(t[n].lim,t[r].lim),u,f;u=n;do u=e.parent(u),i.push(u);while(u&&(t[u].low>o||s>t[u].lim));for(f=u,u=r;(u=e.parent(u))!==f;)a.push(u);return{path:i.concat(a.reverse()),lca:f}}function RA(e){var t={},n=0;function r(i){var a=n;sc.forEach(e.children(i),r),t[i]={low:a,lim:n++}}return sc.forEach(e.children(),r),t}var tt=ie,uc=Ne,AA={run:qA,cleanup:TA};function qA(e){var t=uc.addDummyNode(e,"root",{},"_root"),n=CA(e),r=tt.max(tt.values(n))-1,i=2*r+1;e.graph().nestingRoot=t,tt.forEach(e.edges(),function(o){e.edge(o).minlen*=i});var a=IA(e)+1;tt.forEach(e.children(),function(o){Om(e,t,i,a,r,n,o)}),e.graph().nodeRankFactor=i}function Om(e,t,n,r,i,a,o){var s=e.children(o);if(!s.length){o!==t&&e.setEdge(t,o,{weight:0,minlen:n});return}var u=uc.addBorderNode(e,"_bt"),f=uc.addBorderNode(e,"_bb"),c=e.node(o);e.setParent(u,o),c.borderTop=u,e.setParent(f,o),c.borderBottom=f,tt.forEach(s,function(l){Om(e,t,n,r,i,a,l);var d=e.node(l),h=d.borderTop?d.borderTop:l,v=d.borderBottom?d.borderBottom:l,p=d.borderTop?r:2*r,g=h!==v?1:i-a[o]+1;e.setEdge(u,h,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(v,f,{weight:p,minlen:g,nestingEdge:!0})}),e.parent(o)||e.setEdge(t,u,{weight:0,minlen:i+a[o]})}function CA(e){var t={};function n(r,i){var a=e.children(r);a&&a.length&&tt.forEach(a,function(o){n(o,i+1)}),t[r]=i}return tt.forEach(e.children(),function(r){n(r,1)}),t}function IA(e){return tt.reduce(e.edges(),function(t,n){return t+e.edge(n).weight},0)}function TA(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,tt.forEach(e.edges(),function(n){var r=e.edge(n);r.nestingEdge&&e.removeEdge(n)})}var Fu=ie,MA=Ne,PA=OA;function OA(e){function t(n){var r=e.children(n),i=e.node(n);if(r.length&&Fu.forEach(r,t),Fu.has(i,"minRank")){i.borderLeft=[],i.borderRight=[];for(var a=i.minRank,o=i.maxRank+1;a<o;++a)kg(e,"borderLeft","_bl",n,i,a),kg(e,"borderRight","_br",n,i,a)}}Fu.forEach(e.children(),t)}function kg(e,t,n,r,i,a){var o={width:0,height:0,rank:a,borderType:t},s=i[t][a-1],u=MA.addDummyNode(e,"border",o,n);i[t][a]=u,e.setParent(u,r),s&&e.setEdge(s,u,{weight:1})}var je=ie,kA={adjust:$A,undo:DA};function $A(e){var t=e.graph().rankdir.toLowerCase();(t==="lr"||t==="rl")&&km(e)}function DA(e){var t=e.graph().rankdir.toLowerCase();(t==="bt"||t==="rl")&&LA(e),(t==="lr"||t==="rl")&&(FA(e),km(e))}function km(e){je.forEach(e.nodes(),function(t){$g(e.node(t))}),je.forEach(e.edges(),function(t){$g(e.edge(t))})}function $g(e){var t=e.width;e.width=e.height,e.height=t}function LA(e){je.forEach(e.nodes(),function(t){zu(e.node(t))}),je.forEach(e.edges(),function(t){var n=e.edge(t);je.forEach(n.points,zu),je.has(n,"y")&&zu(n)})}function zu(e){e.y=-e.y}function FA(e){je.forEach(e.nodes(),function(t){Hu(e.node(t))}),je.forEach(e.edges(),function(t){var n=e.edge(t);je.forEach(n.points,Hu),je.has(n,"x")&&Hu(n)})}function Hu(e){var t=e.x;e.x=e.y,e.y=t}var Qe=ie,zA=HA;function HA(e){var t={},n=Qe.filter(e.nodes(),function(s){return!e.children(s).length}
18),r=Qe.max(Qe.map(n,function(s){return e.node(s).rank})),i=Qe.map(Qe.range(r+1),function(){return[]});function a(s){if(!Qe.has(t,s)){t[s]=!0;var u=e.node(s);i[u.rank].push(s),Qe.forEach(e.successors(s),a)}}var o=Qe.sortBy(n,function(s){return e.node(s).rank});return Qe.forEach(o,a),i}var ft=ie,BA=VA;function VA(e,t){for(var n=0,r=1;r<t.length;++r)n+=GA(e,t[r-1],t[r]);return n}function GA(e,t,n){for(var r=ft.zipObject(n,ft.map(n,function(f,c){return c})),i=ft.flatten(ft.map(t,function(f){return ft.sortBy(ft.map(e.outEdges(f),function(c){return{pos:r[c.w],weight:e.edge(c).weight}}),"pos")}),!0),a=1;a<n.length;)a<<=1;var o=2*a-1;a-=1;var s=ft.map(new Array(o),function(){return 0}),u=0;return ft.forEach(i.forEach(function(f){var c=f.pos+a;s[c]+=f.weight;for(var l=0;c>0;)c%2&&(l+=s[c+1]),c=c-1>>1,s[c]+=f.weight;u+=f.weight*l})),u}var Dg=ie,jA=UA;function UA(e,t){return Dg.map(t,function(n){var r=e.inEdges(n);if(r.length){var i=Dg.reduce(r,function(a,o){var s=e.edge(o),u=e.node(o.v);return{sum:a.sum+s.weight*u.order,weight:a.weight+s.weight}},{sum:0,weight:0});return{v:n,barycenter:i.sum/i.weight,weight:i.weight}}else return{v:n}})}var qe=ie,KA=YA;function YA(e,t){var n={};qe.forEach(e,function(i,a){var o=n[i.v]={indegree:0,in:[],out:[],vs:[i.v],i:a};qe.isUndefined(i.barycenter)||(o.barycenter=i.barycenter,o.weight=i.weight)}),qe.forEach(t.edges(),function(i){var a=n[i.v],o=n[i.w];!qe.isUndefined(a)&&!qe.isUndefined(o)&&(o.indegree++,a.out.push(n[i.w]))});var r=qe.filter(n,function(i){return!i.indegree});return WA(r)}function WA(e){var t=[];function n(a){return function(o){o.merged||(qe.isUndefined(o.barycenter)||qe.isUndefined(a.barycenter)||o.barycenter>=a.barycenter)&&XA(a,o)}}function r(a){return function(o){o.in.push(a),--o.indegree===0&&e.push(o)}}for(;e.length;){var i=e.pop();t.push(i),qe.forEach(i.in.reverse(),n(i)),qe.forEach(i.out,r(i))}return qe.map(qe.filter(t,function(a){return!a.merged}),function(a){return qe.pick(a,["vs","i","barycenter","weight"])})}function XA(e,t){var n=0,r=0;e.weight&&(n+=e.barycenter*e.weight,r+=e.weight),t.weight&&(n+=t.barycenter*t.weight,r+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=n/r,e.weight=r,e.i=Math.min(t.i,e.i),t.merged=!0}var hn=ie,ZA=Ne,QA=JA;function JA(e,t){var n=ZA.partition(e,function(c){return hn.has(c,"barycenter")}),r=n.lhs,i=hn.sortBy(n.rhs,function(c){return-c.i}),a=[],o=0,s=0,u=0;r.sort(eq(!!t)),u=Lg(a,i,u),hn.forEach(r,function(c){u+=c.vs.length,a.push(c.vs),o+=c.barycenter*c.weight,s+=c.weight,u=Lg(a,i,u)});var f={vs:hn.flatten(a,!0)};return s&&(f.barycenter=o/s,f.weight=s),f}function Lg(e,t,n){for(var r;t.length&&(r=hn.last(t)).i<=n;)t.pop(),e.push(r.vs),n++;return n}function eq(e){return function(t,n){return t.barycenter<n.barycenter?-1:t.barycenter>n.barycenter?1:e?n.i-t.i:t.i-n.i}}var pt=ie,tq=jA,nq=KA,rq=QA,iq=$m;function $m(e,t,n,r){var i=e.children(t),a=e.node(t),o=a?a.borderLeft:void 0,s=a?a.borderRight:void 0,u={};o&&(i=pt.filter(i,function(v){return v!==o&&v!==s}));var f=tq(e,i);pt.forEach(f,function(v){if(e.children(v.v).length){var p=$m(e,v.v,n,r);u[v.v]=p,pt.has(p,"barycenter")&&oq(v,p)}});var c=nq(f,n);aq(c,u);var l=rq(c,r);if(o&&(l.vs=pt.flatten([o,l.vs,s],!0),e.predecessors(o).length)){var d=e.node(e.predecessors(o)[0]),h=e.node(e.predecessors(s)[0]);pt.has(l,"barycenter")||(l.barycenter=0,l.weight=0),l.barycenter=(l.barycenter*l.weight+d.order+h.order)/(l.weight+2),l.weight+=2}return l}function aq(e,t){pt.forEach(e,function(n){n.vs=pt.flatten(n.vs.map(function(r){return t[r]?t[r].vs:r}),!0)})}function oq(e,t){pt.isUndefined(e.barycenter)?(e.barycenter=t.barycenter,e.weight=t.weight):(e.barycenter=(e.barycenter*e.weight+t.barycenter*t.weight)/(e.weight+t.weight),e.weight+=t.weight)}var pn=ie,sq=He.Graph,uq=cq;function cq(e,t,n){var r=fq(e),i=new sq({compound:!0}).setGraph({root:r}).setDefaultNodeLabel(function(a){return e.node(a)});return pn.forEach(e.nodes(),function(a){var o=e.node(a),s=e.parent(a);(o.rank===t||o.minRank<=t&&t<=o.maxRank)&&(i.setNode(a),i.setParent(a,s||r),pn.forEach(e[n](a),function(u){var f=u.v===a?u.w:u.v,c=i.edge(f,a),l=pn.isUndefined(c)?0:c.weight;i.setEdge(f,a,{weight:e.edge(u).weight+l})}),pn.has(o,"minRank")&&i.setNode(a,{borderLeft:o.borderLeft[t],borderRight:o.borderRight[t]}))}),i}function fq(e){for(var t;e.hasNode(t=pn.uniqueId("_root")););return t}var lq=ie,dq=hq;function hq(e,t,n){var r={},i;lq.forEach(n,function(a){for(var o=e.parent(a),s,u;o;
18){if(s=e.parent(o),s?(u=r[s],r[s]=o):(u=i,i=o),u&&u!==o){t.setEdge(u,o);return}o=s}})}var yt=ie,pq=zA,gq=BA,vq=iq,yq=uq,mq=dq,_q=He.Graph,Fg=Ne,bq=wq;function wq(e){var t=Fg.maxRank(e),n=zg(e,yt.range(1,t+1),"inEdges"),r=zg(e,yt.range(t-1,-1,-1),"outEdges"),i=pq(e);Hg(e,i);for(var a=Number.POSITIVE_INFINITY,o,s=0,u=0;u<4;++s,++u){xq(s%2?n:r,s%4>=2),i=Fg.buildLayerMatrix(e);var f=gq(e,i);f<a&&(u=0,o=yt.cloneDeep(i),a=f)}Hg(e,o)}function zg(e,t,n){return yt.map(t,function(r){return yq(e,r,n)})}function xq(e,t){var n=new _q;yt.forEach(e,function(r){var i=r.graph().root,a=vq(r,i,n,t);yt.forEach(a.vs,function(o,s){r.node(o).order=s}),mq(r,n,a.vs)})}function Hg(e,t){yt.forEach(t,function(n){yt.forEach(n,function(r,i){e.node(r).order=i})})}var Y=ie,Eq=He.Graph,Sq=Ne,Nq={positionX:$q};function Rq(e,t){var n={};function r(i,a){var o=0,s=0,u=i.length,f=Y.last(a);return Y.forEach(a,function(c,l){var d=qq(e,c),h=d?e.node(d).order:u;(d||c===f)&&(Y.forEach(a.slice(s,l+1),function(v){Y.forEach(e.predecessors(v),function(p){var g=e.node(p),y=g.order;(y<o||h<y)&&!(g.dummy&&e.node(v).dummy)&&Dm(n,p,v)})}),s=l+1,o=h)}),a}return Y.reduce(t,r),n}function Aq(e,t){var n={};function r(a,o,s,u,f){var c;Y.forEach(Y.range(o,s),function(l){c=a[l],e.node(c).dummy&&Y.forEach(e.predecessors(c),function(d){var h=e.node(d);h.dummy&&(h.order<u||h.order>f)&&Dm(n,d,c)})})}function i(a,o){var s=-1,u,f=0;return Y.forEach(o,function(c,l){if(e.node(c).dummy==="border"){var d=e.predecessors(c);d.length&&(u=e.node(d[0]).order,r(o,f,l,s,u),f=l,s=u)}r(o,f,o.length,u,a.length)}),o}return Y.reduce(t,i),n}function qq(e,t){if(e.node(t).dummy)return Y.find(e.predecessors(t),function(n){return e.node(n).dummy})}function Dm(e,t,n){if(t>n){var r=t;t=n,n=r}var i=e[t];i||(e[t]=i={}),i[n]=!0}function Cq(e,t,n){if(t>n){var r=t;t=n,n=r}return Y.has(e[t],n)}function Iq(e,t,n,r){var i={},a={},o={};return Y.forEach(t,function(s){Y.forEach(s,function(u,f){i[u]=u,a[u]=u,o[u]=f})}),Y.forEach(t,function(s){var u=-1;Y.forEach(s,function(f){var c=r(f);if(c.length){c=Y.sortBy(c,function(p){return o[p]});for(var l=(c.length-1)/2,d=Math.floor(l),h=Math.ceil(l);d<=h;++d){var v=c[d];a[f]===f&&u<o[v]&&!Cq(n,f,v)&&(a[v]=f,a[f]=i[f]=i[v],u=o[v])}}})}),{root:i,align:a}}function Tq(e,t,n,r,i){var a={},o=Mq(e,t,n,i),s=i?"borderLeft":"borderRight";function u(l,d){for(var h=o.nodes(),v=h.pop(),p={};v;)p[v]?l(v):(p[v]=!0,h.push(v),h=h.concat(d(v))),v=h.pop()}function f(l){a[l]=o.inEdges(l).reduce(function(d,h){return Math.max(d,a[h.v]+o.edge(h))},0)}function c(l){var d=o.outEdges(l).reduce(function(v,p){return Math.min(v,a[p.w]-o.edge(p))},Number.POSITIVE_INFINITY),h=e.node(l);d!==Number.POSITIVE_INFINITY&&h.borderType!==s&&(a[l]=Math.max(a[l],d))}return u(f,o.predecessors.bind(o)),u(c,o.successors.bind(o)),Y.forEach(r,function(l){a[l]=a[n[l]]}),a}function Mq(e,t,n,r){var i=new Eq,a=e.graph(),o=Dq(a.nodesep,a.edgesep,r);return Y.forEach(t,function(s){var u;Y.forEach(s,function(f){var c=n[f];if(i.setNode(c),u){var l=n[u],d=i.edge(l,c);i.setEdge(l,c,Math.max(o(e,f,u),d||0))}u=f})}),i}function Pq(e,t){return Y.minBy(Y.values(t),function(n){var r=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return Y.forIn(n,function(a,o){var s=Lq(e,o)/2;r=Math.max(a+s,r),i=Math.min(a-s,i)}),r-i})}function Oq(e,t){var n=Y.values(t),r=Y.min(n),i=Y.max(n);Y.forEach(["u","d"],function(a){Y.forEach(["l","r"],function(o){var s=a+o,u=e[s],f;if(u!==t){var c=Y.values(u);f=o==="l"?r-Y.min(c):i-Y.max(c),f&&(e[s]=Y.mapValues(u,function(l){return l+f}))}})})}function kq(e,t){return Y.mapValues(e.ul,function(n,r){if(t)return e[t.toLowerCase()][r];var i=Y.sortBy(Y.map(e,r));return(i[1]+i[2])/2})}function $q(e){var t=Sq.buildLayerMatrix(e),n=Y.merge(Rq(e,t),Aq(e,t)),r={},i;Y.forEach(["u","d"],function(o){i=o==="u"?t:Y.values(t).reverse(),Y.forEach(["l","r"],function(s){s==="r"&&(i=Y.map(i,function(l){return Y.values(l).reverse()}));var u=(o==="u"?e.predecessors:e.successors).bind(e),f=Iq(e,i,n,u),c=Tq(e,i,f.root,f.align,s==="r");s==="r"&&(c=Y.mapValues(c,function(l){return-l})),r[o+s]=c})});var a=Pq(e,r);return Oq(r,a),kq(r,e.graph().align)}function Dq(e,t,n){return function(r,i,a){var o=r.node(i),s=r.node(a),u=0,f;if(u+=o.width/2,Y.has(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":f=-o.width/2;break;case"r":f=o.width/2;break}if(f&&(u+=n?f:-f),f=0,u+=(o.dummy?t:e)/2,u+=(s.dummy?t:e)/2,u+=s.width/2,Y.has(s,"labelpos"))switch(s.labelpos.toLowerCase()){case"l":f=s.width/2;break;case"r":f=-s.width/2;break}return f&&(u+=n?f:-f),f=0,u}}
18function Lq(e,t){return e.node(t).width}var gn=ie,Lm=Ne,Fq=Nq.positionX,zq=Hq;function Hq(e){e=Lm.asNonCompoundGraph(e),Bq(e),gn.forEach(Fq(e),function(t,n){e.node(n).x=t})}function Bq(e){var t=Lm.buildLayerMatrix(e),n=e.graph().ranksep,r=0;gn.forEach(t,function(i){var a=gn.max(gn.map(i,function(o){return e.node(o).height}));gn.forEach(i,function(o){e.node(o).y=r+a/2}),r+=a+n})}var X=ie,Bg=MR,Vg=WR,Vq=_A,Gq=Ne.normalizeRanks,jq=EA,Uq=Ne.removeEmptyRanks,Gg=AA,Kq=PA,jg=kA,Yq=bq,Wq=zq,mt=Ne,Xq=He.Graph,Zq=Qq;function Qq(e,t){var n=t&&t.debugTiming?mt.time:mt.notime;n("layout",function(){var r=n(" buildLayoutGraph",function(){return cC(e)});n(" runLayout",function(){Jq(r,n)}),n(" updateInputGraph",function(){eC(e,r)})})}function Jq(e,t){t(" makeSpaceForEdgeLabels",function(){fC(e)}),t(" removeSelfEdges",function(){_C(e)}),t(" acyclic",function(){Bg.run(e)}),t(" nestingGraph.run",function(){Gg.run(e)}),t(" rank",function(){Vq(mt.asNonCompoundGraph(e))}),t(" injectEdgeLabelProxies",function(){lC(e)}),t(" removeEmptyRanks",function(){Uq(e)}),t(" nestingGraph.cleanup",function(){Gg.cleanup(e)}),t(" normalizeRanks",function(){Gq(e)}
18),t(" assignRankMinMax",function(){dC(e)}),t(" removeEdgeLabelProxies",function(){hC(e)}),t(" normalize.run",function(){Vg.run(e)}),t(" parentDummyChains",function(){jq(e)}),t(" addBorderSegments",function(){Kq(e)}),t(" order",function(){Yq(e)}),t(" insertSelfEdges",function(){bC(e)}),t(" adjustCoordinateSystem",function(){jg.adjust(e)}),t(" position",function(){Wq(e)}),t(" positionSelfEdges",function(){wC(e)}),t(" removeBorderNodes",function(){mC(e)}),t(" normalize.undo",function(){Vg.undo(e)}),t(" fixupEdgeLabelCoords",function(){vC(e)}),t(" undoCoordinateSystem",function(){jg.undo(e)}),t(" translateGraph",function(){pC(e)}),t(" assignNodeIntersects",function(){gC(e)}),t(" reversePoints",function(){yC(e)}),t(" acyclic.undo",function(){Bg.undo(e)})}function eC(e,t){X.forEach(e.nodes(),function(n){var r=e.node(n),i=t.node(n);r&&(r.x=i.x,r.y=i.y,t.children(n).length&&(r.width=i.width,r.height=i.height))}),X.forEach(e.edges(),function(n){var r=e.edge(n),i=t.edge(n);r.points=i.points,X.has(i,"x")&&(r.x=i.x,r.y=i.y)}),e.graph().width=t.graph().width,e.graph().height=t.graph().height}var tC=["nodesep","edgesep","ranksep","marginx","marginy"],nC={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},rC=["acyclicer","ranker","rankdir","align"],iC=["width","height"],aC={width:0,height:0},oC=["minlen","weight","width","height","labeloffset"],sC={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},uC=["labelpos"];function cC(e){var t=new Xq({multigraph:!0,compound:!0}),n=Vu(e.graph());return t.setGraph(X.merge({},nC,Bu(n,tC),X.pick(n,rC))),X.forEach(e.nodes(),function(r){var i=Vu(e.node(r));t.setNode(r,X.defaults(Bu(i,iC),aC)),t.setParent(r,e.parent(r))}),X.forEach(e.edges(),function(r){var i=Vu(e.edge(r));t.setEdge(r,X.merge({},sC,Bu(i,oC),X.pick(i,uC)))}),t}function fC(e){var t=e.graph();t.ranksep/=2,X.forEach(e.edges(),function(n){var r=e.edge(n);r.minlen*=2,r.labelpos.toLowerCase()!=="c"&&(t.rankdir==="TB"||t.rankdir==="BT"?r.width+=r.labeloffset:r.height+=r.labeloffset)})}function lC(e){X.forEach(e.edges(),function(t){var n=e.edge(t);if(n.width&&n.height){var r=e.node(t.v),i=e.node(t.w),a={rank:(i.rank-r.rank)/2+r.rank,e:t};mt.addDummyNode(e,"edge-proxy",a,"_ep")}})}function dC(e){var t=0;X.forEach(e.nodes(),function(n){var r=e.node(n);r.borderTop&&(r.minRank=e.node(r.borderTop).rank,r.maxRank=e.node(r.borderBottom).rank,t=X.max(t,r.maxRank))}),e.graph().maxRank=t}function hC(e){X.forEach(e.nodes(),function(t){var n=e.node(t);n.dummy==="edge-proxy"&&(e.edge(n.e).labelRank=n.rank,e.removeNode(t))})}function pC(e){var t=Number.POSITIVE_INFINITY,n=0,r=Number.POSITIVE_INFINITY,i=0,a=e.graph(),o=a.marginx||0,s=a.marginy||0;function u(f){var c=f.x,l=f.y,d=f.width,h=f.height;t=Math.min(t,c-d/2),n=Math.max(n,c+d/2),r=Math.min(r,l-h/2),i=Math.max(i,l+h/2)}X.forEach(e.nodes(),function(f){u(e.node(f))}),X.forEach(e.edges(),function(f){var c=e.edge(f);X.has(c,"x")&&u(c)}),t-=o,r-=s,X.forEach(e.nodes(),function(f){var c=e.node(f);c.x-=t,c.y-=r}),X.forEach(e.edges(),function(f){var c=e.edge(f);
18X.forEach(c.points,function(l){l.x-=t,l.y-=r}),X.has(c,"x")&&(c.x-=t),X.has(c,"y")&&(c.y-=r)}),a.width=n-t+o,a.height=i-r+s}function gC(e){X.forEach(e.edges(),function(t){var n=e.edge(t),r=e.node(t.v),i=e.node(t.w),a,o;n.points?(a=n.points[0],o=n.points[n.points.length-1]):(n.points=[],a=i,o=r),n.points.unshift(mt.intersectRect(r,a)),n.points.push(mt.intersectRect(i,o))})}function vC(e){X.forEach(e.edges(),function(t){var n=e.edge(t);if(X.has(n,"x"))switch((n.labelpos==="l"||n.labelpos==="r")&&(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset;break}})}function yC(e){X.forEach(e.edges(),function(t){var n=e.edge(t);n.reversed&&n.points.reverse()})}function mC(e){X.forEach(e.nodes(),function(t){if(e.children(t).length){var n=e.node(t),r=e.node(n.borderTop),i=e.node(n.borderBottom),a=e.node(X.last(n.borderLeft)),o=e.node(X.last(n.borderRight));n.width=Math.abs(o.x-a.x),n.height=Math.abs(i.y-r.y),n.x=a.x+n.width/2,n.y=r.y+n.height/2}}),X.forEach(e.nodes(),function(t){e.node(t).dummy==="border"&&e.removeNode(t)})}function _C(e){X.forEach(e.edges(),function(t){if(t.v===t.w){var n=e.node(t.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:t,label:e.edge(t)}),e.removeEdge(t)}})}function bC(e){var t=mt.buildLayerMatrix(e);X.forEach(t,function(n){var r=0;X.forEach(n,function(i,a){var o=e.node(i);o.order=a+r,X.forEach(o.selfEdges,function(s){mt.addDummyNode(e,"selfedge",{width:s.label.width,height:s.label.height,rank:o.rank,order:a+ ++r,e:s.e,label:s.label},"_se")}),delete o.selfEdges})})}function wC(e){X.forEach(e.nodes(),function(t){var n=e.node(t);if(n.dummy==="selfedge"){var r=e.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;e.setEdge(n.e,n.label),e.removeNode(t),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}})}function Bu(e,t){return X.mapValues(X.pick(e,t),Number)}function Vu(e){var t={};return X.forEach(e,function(n,r){t[r.toLowerCase()]=n}),t}var Gn=ie,xC=Ne,EC=He.Graph,SC={debugOrdering:NC};function NC(e){var t=xC.buildLayerMatrix(e),n=new EC({compound:!0,multigraph:!0}).setGraph({});return Gn.forEach(e.nodes(),function(r){n.setNode(r,{label:r}),n.setParent(r,"layer"+e.node(r).rank)}),Gn.forEach(e.edges(),function(r){n.setEdge(r.v,r.w,{},r.name)}),Gn.forEach(t,function(r,i){var a="layer"+i;n.setNode(a,{rank:"same"}),Gn.reduce(r,function(o,s){return n.setEdge(o,s,{style:"invis"}),s})}),n}var RC="0.8.5",Fm={graphlib:He,layout:Zq,debug:SC,util:{time:Ne.time,notime:Ne.notime},version:RC};const AC=Wg(Fm),uI=b0({__proto__:null,default:AC},[Fm]);function cI(e,t){let n,r;if(t===void 0)for(const i of e)i!=null&&(n===void 0?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)));else{let i=-1;for(let a of e)(a=t(a,++i,e))!=null&&(n===void 0?a>=a&&(n=r=a):(n>a&&(n=a),r<a&&(r=a)))}return[n,r]}function fI(e,t){var n,r=1;e==null&&(e=0),t==null&&(t=0);function i(){var a,o=n.length,s,u=0,f=0;for(a=0;a<o;++a)s=n[a],u+=s.x,f+=s.y;for(u=(u/o-e)*r,f=(f/o-t)*r,a=0;a<o;++a)s=n[a],s.x-=u,s.y-=f}return i.initialize=function(a){n=a},i.x=function(a){return arguments.length?(e=+a,i):e},i.y=function(a){return arguments.length?(t=+a,i):t},i.strength=function(a){return arguments.length?(r=+a,i):r},i}function qC(e){const t=+this._x.call(null,e),n=+this._y.call(null,e);return zm(this.cover(t,n),t,n,e)}function zm(e,t,n,r){if(isNaN(t)||isNaN(n))return e;var i,a=e._root,o={data:r},s=e._x0,u=e._y0,f=e._x1,c=e._y1,l,d,h,v,p,g,y,_;if(!a)return e._root=o,e;for(;a.length;)if((p=t>=(l=(s+f)/2))?s=l:f=l,(g=n>=(d=(u+c)/2))?u=d:c=d,i=a,!(a=a[y=g<<1|p]))return i[y]=o,e;if(h=+e._x.call(null,a.data),v=+e._y.call(null,a.data),t===h&&n===v)return o.next=a,i?i[y]=o:e._root=o,e;do i=i?i[y]=new Array(4):e._root=new Array(4),(p=t>=(l=(s+f)/2))?s=l:f=l,(g=n>=(d=(u+c)/2))?u=d:c=d;while((y=g<<1|p)===(_=(v>=d)<<1|h>=l));return i[_]=a,i[y]=o,e}function CC(e){var t,n,r=e.length,i,a,o=new Array(r),s=new Array(r),u=1/0,f=1/0,c=-1/0,l=-1/0;for(n=0;n<r;++n)isNaN(i=+this._x.call(null,t=e[n]))||isNaN(a=+this._y.call(null,t))||(o[n]=i,s[n]=a,i<u&&(u=i),i>c&&(c=i),a<f&&(f=a),a>l&&(l=a));if(u>c||f>l)return this;for(this.cover(u,f).cover(c,l),n=0;n<r;++n)zm(this,o[n],s[n],e[n]);return this}function IC(e,t){if(isNaN(e=+e)||isNaN(t=+t))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(e))+1,a=(r=Math.floor(t))+1;else{for(var o=i-n||1,s=this._root,u,f;n>e||e>=i||r>t||t>=a;)switch(f=(t<r)<<1|e<n,u=new Array(4),u[f]=s,s=u,o*=2,f){case 0:i=n+o,a=r+o;break;case 1:n=i-o,a=r+o;break;case 2:i=n+o,r=a-o;break;case 3:n=i-o,r=a-o;break}this._root&&this._root.length&&(this._root=s)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this}function TC(){var e=[];return this.visit(function(t){if(!t.length)do e.push(t.data);while(t=t.next)}),e}function MC(e){return arguments.length?this.cover(+e[0][0],+e[0][1]).cover(+e[1][0],+e[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function we(e,t,n,r,i){this.node=e,this.x0=t,this.y0=n,this.x1=r,this.y1=i}
vendor: 9,128 bytes, line 18
18function PC(e,t,n){var r,i=this._x0,a=this._y0,o,s,u,f,c=this._x1,l=this._y1,d=[],h=this._root,v,p;for(h&&d.push(new we(h,i,a,c,l)),n==null?n=1/0:(i=e-n,a=t-n,c=e+n,l=t+n,n*=n);v=d.pop();)if(!(!(h=v.node)||(o=v.x0)>c||(s=v.y0)>l||(u=v.x1)<i||(f=v.y1)<a))if(h.length){var g=(o+u)/2,y=(s+f)/2;d.push(new we(h[3],g,y,u,f),new we(h[2],o,y,g,f),new we(h[1],g,s,u,y),new we(h[0],o,s,g,y)),(p=(t>=y)<<1|e>=g)&&(v=d[d.length-1],d[d.length-1]=d[d.length-1-p],d[d.length-1-p]=v)}else{var _=e-+this._x.call(null,h.data),w=t-+this._y.call(null,h.data),m=_*_+w*w;if(m<n){var S=Math.sqrt(n=m);i=e-S,a=t-S,c=e+S,l=t+S,r=h.data}}return r}function OC(e){if(isNaN(c=+this._x.call(null,e))||isNaN(l=+this._y.call(null,e)))return this;var t,n=this._root,r,i,a,o=this._x0,s=this._y0,u=this._x1,f=this._y1,c,l,d,h,v,p,g,y;if(!n)return this;if(n.length)for(;;){if((v=c>=(d=(o+u)/2))?o=d:u=d,(p=l>=(h=(s+f)/2))?s=h:f=h,t=n,!(n=n[g=p<<1|v]))return this;if(!n.length)break;(t[g+1&3]||t[g+2&3]||t[g+3&3])&&(r=t,y=g)}for(;n.data!==e;)if(i=n,!(n=n.next))return this;return(a=n.next)&&delete n.next,i?(a?i.next=a:delete i.next,this):t?(a?t[g]=a:delete t[g],(n=t[0]||t[1]||t[2]||t[3])&&n===(t[3]||t[2]||t[1]||t[0])&&!n.length&&(r?r[y]=n:this._root=n),this):(this._root=a,this)}function kC(e){for(var t=0,n=e.length;t<n;++t)this.remove(e[t]);return this}function $C(){return this._root}function DC(){var e=0;return this.visit(function(t){if(!t.length)do++e;while(t=t.next)}),e}function LC(e){var t=[],n,r=this._root,i,a,o,s,u;for(r&&t.push(new we(r,this._x0,this._y0,this._x1,this._y1));n=t.pop();)if(!e(r=n.node,a=n.x0,o=n.y0,s=n.x1,u=n.y1)&&r.length){var f=(a+s)/2,c=(o+u)/2;(i=r[3])&&t.push(new we(i,f,c,s,u)),(i=r[2])&&t.push(new we(i,a,c,f,u)),(i=r[1])&&t.push(new we(i,f,o,s,c)),(i=r[0])&&t.push(new we(i,a,o,f,c))}return this}function FC(e){var t=[],n=[],r;for(this._root&&t.push(new we(this._root,this._x0,this._y0,this._x1,this._y1));r=t.pop();){var i=r.node;if(i.length){var a,o=r.x0,s=r.y0,u=r.x1,f=r.y1,c=(o+u)/2,l=(s+f)/2;(a=i[0])&&t.push(new we(a,o,s,c,l)),(a=i[1])&&t.push(new we(a,c,s,u,l)),(a=i[2])&&t.push(new we(a,o,l,c,f)),(a=i[3])&&t.push(new we(a,c,l,u,f))}n.push(r)}for(;r=n.pop();)e(r.node,r.x0,r.y0,r.x1,r.y1);return this}function zC(e){return e[0]}function HC(e){return arguments.length?(this._x=e,this):this._x}function BC(e){return e[1]}function VC(e){return arguments.length?(this._y=e,this):this._y}function Kc(e,t,n){var r=new Yc(t??zC,n??BC,NaN,NaN,NaN,NaN);return e==null?r:r.addAll(e)}function Yc(e,t,n,r,i,a){this._x=e,this._y=t,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Ug(e){for(var t={data:e.data},n=t;e=e.next;)n=n.next={data:e.data};return t}var xe=Kc.prototype=Yc.prototype;xe.copy=function(){var e=new Yc(this._x,this._y,this._x0,this._y0,this._x1,this._y1),t=this._root,n,r;if(!t)return e;if(!t.length)return e._root=Ug(t),e;for(n=[{source:t,target:e._root=new Array(4)}];t=n.pop();)for(var i=0;i<4;++i)(r=t.source[i])&&(r.length?n.push({source:r,target:t.target[i]=new Array(4)}):t.target[i]=Ug(r));return e};xe.add=qC;xe.addAll=CC;xe.cover=IC;xe.data=TC;xe.extent=MC;xe.find=PC;xe.remove=OC;xe.removeAll=kC;xe.root=$C;xe.size=DC;xe.visit=LC;xe.visitAfter=FC;xe.x=HC;xe.y=VC;function qt(e){return function(){return e}}function gt(e){return(e()-.5)*1e-6}function GC(e){return e.x+e.vx}function jC(e){return e.y+e.vy}function lI(e){var t,n,r,i=1,a=1;typeof e!="function"&&(e=qt(e==null?1:+e));function o(){for(var f,c=t.length,l,d,h,v,p,g,y=0;y<a;++y)for(l=Kc(t,GC,jC).visitAfter(s),f=0;f<c;++f)d=t[f],p=n[d.index],g=p*p,h=d.x+d.vx,v=d.y+d.vy,l.visit(_);function _(w,m,S,x,R){var I=w.data,A=w.r,P=p+A;if(I){if(I.index>d.index){var T=h-I.x-I.vx,$=v-I.y-I.vy,O=T*T+$*$;O<P*P&&(T===0&&(T=gt(r),O+=T*T),$===0&&($=gt(r),O+=$*$),O=(P-(O=Math.sqrt(O)))/O*i,d.vx+=(T*=O)*(P=(A*=A)/(g+A)),d.vy+=($*=O)*P,I.vx-=T*(P=1-P),I.vy-=$*P)}return}return m>h+P||x<h-P||S>v+P||R<v-P}}function s(f){if(f.data)return f.r=n[f.data.index];for(var c=f.r=0;c<4;++c)f[c]&&f[c].r>f.r&&(f.r=f[c].r)}function u(){if(t){var f,c=t.length,l;for(n=new Array(c),f=0;f<c;++f)l=t[f],n[l.index]=+e(l,f,t)}}return o.initialize=function(f,c){t=f,r=c,u()},o.iterations=function(f){return arguments.length?(a=+f,o):a},o.strength=function(f){return arguments.length?(i=+f,o):i},o.radius=function(f){return arguments.length?(e=typeof f=="function"?f:qt(+f),u(),o):e},o}function UC(e){return e.index}function Kg(e,t){var n=e.get(t);if(!n)throw new Error("node not found: "+t);return n}function dI(e){var t=UC,n=l,r,i=qt(30),a,o,s,u,f,c=1;e==null&&(e=[]);function l(g){return 1/Math.min(s[g.source.index],s[g.target.index])}function d(g){for(var y=0,_=e.length;y<c;++y)for(var w=0,m,S,x,R,I,A,P;w<_;++w)m=e[w],S=m.source,x=m.target,R=x.x+x.vx-S.x-S.vx||gt(f),I=x.y+x.vy-S.y-S.vy||gt(f),A=Math.sqrt(R*R+I*I),A=(A-a[w])/A*g*r[w],R*=A,I*=A,x.vx-=R*(P=u[w]),x.vy-=I*P,S.vx+=R*(P=1-P),S.vy+=I*P}function h(){if(o){var g,y=o.length,_=e.length,w=new Map(o.map((S,x)=>[t(S,x,o),S])),m;for(g=0,s=new Array(y);g<_;++g)m=e[g],m.index=g,typeof m.source!="object"&&(m.source=Kg(w,m.source)),typeof m.target!="object"&&(m.target=Kg(w,m.target)),s[m.source.index]=(s[m.source.index]||0)+1,s[m.target.index]=(s[m.target.index]||0)+1;for(g=0,u=new Array(_);g<_;++g)m=e[g],u[g]=s[m.source.index]/(s[m.source.index]+s[m.target.index]);r=new Array(_),v(),a=new Array(_),p()}}function v(){if(o)for(var g=0,y=e.length;g<y;++g)r[g]=+n(e[g],g,e)}function p(){if(o)for(var g=0,y=e.length;g<y;++g)a[g]=+i(e[g],g,e)}return d.initialize=function(g,y){o=g,f=y,h()},d.links=function(g){return arguments.length?(e=g,h(),d):e},d.id=function(g){return arguments.length?(t=g,d):t},d.iterations=function(g){return arguments.length?(c=+g,d):c},d.strength=function(g){return arguments.length?(n=typeof g=="function"?g:qt(+g),v(),d):n},d.distance=function(g){return arguments.length?(i=typeof g=="function"?g:qt(+g),p(),d):i},d}const KC=1664525,YC=1013904223,Yg=4294967296;function WC(){let e=1;return()=>(e=(KC*e+YC)%Yg)/Yg}function XC(e){return e.x}function ZC(e){return e.y}var QC=10,JC=Math.PI*(3-Math.sqrt(5));function hI(e){var t,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=new Map,u=hc(l),f=Sn("tick","end"),c=WC();e==null&&(e=[]);function l(){d(),f.call("tick",t),n<r&&(u.stop(),f.call("end",t))}function d(p){var g,y=e.length,_;p===void 0&&(p=1);for(var w=0;w<p;++w)for(n+=(a-n)*i,s.forEach(function(m){m(n)}),g=0;g<y;++g)_=e[g],_.fx==null?_.x+=_.vx*=o:(_.x=_.fx,_.vx=0),_.fy==null?_.y+=_.vy*=o:(_.y=_.fy,_.vy=0);return t}function h(){for(var p=0,g=e.length,y;p<g;++p){if(y=e[p],y.index=p,y.fx!=null&&(y.x=y.fx),y.fy!=null&&(y.y=y.fy),isNaN(y.x)||isNaN(y.y)){var _=QC*Math.sqrt(.5+p),w=p*JC;y.x=_*Math.cos(w),y.y=_*Math.sin(w)}(isNaN(y.vx)||isNaN(y.vy))&&(y.vx=y.vy=0)}}function v(p){return p.initialize&&p.initialize(e,c),p}return h(),t={tick:d,restart:function(){return u.restart(l),t},stop:function(){return u.stop(),t},nodes:function(p){return arguments.length?(e=p,h(),s.forEach(v),t):e},alpha:function(p){return arguments.length?(n=+p,t):n},alphaMin:function(p){return arguments.length?(r=+p,t):r},alphaDecay:function(p){return arguments.length?(i=+p,t):+i},alphaTarget:function(p){return arguments.length?(a=+p,t):a},velocityDecay:function(p){return arguments.length?(o=1-p,t):1-o},randomSource:function(p){return arguments.length?(c=p,s.forEach(v),t):c},force:function(p,g){return arguments.length>1?(g==null?s.delete(p):s.set(p,v(g)),t):s.get(p)},find:function(p,g,y){var _=0,w=e.length,m,S,x,R,I;for(y==null?y=1/0:y*=y,_=0;_<w;++_)R=e[_],m=p-R.x,S=g-R.y,x=m*m+S*S,x<y&&(I=R,y=x);return I},on:function(p,g){return arguments.length>1?(f.on(p,g),t):f.on(p)}}}function pI(){var e,t,n,r,i=qt(-30),a,o=1,s=1/0,u=.81;function f(h){var v,p=e.length,g=Kc(e,XC,ZC).visitAfter(l);for(r=h,v=0;v<p;++v)t=e[v],g.visit(d)}function c(){if(e){var h,v=e.length,p;for(a=new Array(v),h=0;h<v;++h)p=e[h],a[p.index]=+i(p,h,e)}}function l(h){var v=0,p,g,y=0,_,w,m;if(h.length){for(_=w=m=0;m<4;++m)(p=h[m])&&(g=Math.abs(p.value))&&(v+=p.value,y+=g,_+=g*p.x,w+=g*p.y);h.x=_/y,h.y=w/y}else{p=h,p.x=p.data.x,p.y=p.data.y;do v+=a[p.data.index];while(p=p.next)}h.value=v}function d(h,v,p,g){if(!h.value)return!0;var y=h.x-t.x,_=h.y-t.y,w=g-v,m=y*y+_*_;if(w*w/u<m)return m<s&&(y===0&&(y=gt(n),m+=y*y),_===0&&(_=gt(n),m+=_*_),m<o&&(m=Math.sqrt(o*m)),t.vx+=y*h.value*r/m,t.vy+=_*h.value*r/m),!0;if(h.length||m>=s)return;(h.data!==t||h.next)&&(y===0&&(y=gt(n),m+=y*y),_===0&&(_=gt(n),m+=_*_),m<o&&(m=Math.sqrt(o*m)));do h.data!==t&&(w=a[h.data.index]*r/m,t.vx+=y*w,t.vy+=_*w);while(h=h.next)}return f.initialize=function(h,v){e=h,n=v,c()},f.strength=function(h){return arguments.length?(i=typeof h=="function"?h:qt(+h),c(),f):i},f.distanceMin=function(h){return arguments.length?(o=h*h,f):Math.sqrt(o)},f.distanceMax=function(h){return arguments.length?(s=h*h,f):Math.sqrt(s)},f.theta=function(h){return arguments.length?(u=h*h,f):Math.sqrt(u)},f}export{sI as B,oI as C,ir as H,aI as M,j as P,yy as R,rI as a,iI as b,lE as c,En as d,AC as e,B1 as f,ec as g,Le as h,uI as i,fI as j,lI as k,dI as l,pI as m,Ie as n,Ob as o,cI as p,nt as q,nI as r,hI as s,tI as t,Nc as u,F0 as w,Av as z};
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.