集成,总结MES功能
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

6 рядки
204 KiB

  1. !(function(){var Bd=Object.defineProperty,Vd=Object.defineProperties;var Yd=Object.getOwnPropertyDescriptors;var fi=Object.getOwnPropertySymbols;var Zc=Object.prototype.hasOwnProperty,qc=Object.prototype.propertyIsEnumerable;var Ys=Math.pow,Kc=(ye,se,ee)=>se in ye?Bd(ye,se,{enumerable:!0,configurable:!0,writable:!0,value:ee}):ye[se]=ee,ce=(ye,se)=>{for(var ee in se||(se={}))Zc.call(se,ee)&&Kc(ye,ee,se[ee]);if(fi)for(var ee of fi(se))qc.call(se,ee)&&Kc(ye,ee,se[ee]);return ye},st=(ye,se)=>Vd(ye,Yd(se));var Pr=(ye,se)=>{var ee={};for(var be in ye)Zc.call(ye,be)&&se.indexOf(be)<0&&(ee[be]=ye[be]);if(ye!=null&&fi)for(var be of fi(ye))se.indexOf(be)<0&&qc.call(ye,be)&&(ee[be]=ye[be]);return ee};(self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[565],{60258:function(ye,se,ee){"use strict";ee.d(se,{R:function(){return fd}});function be(e){if(Array.isArray(e))return e}function Ue(e,t){var n=e==null?null:typeof Symbol!="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(n!=null){var r,o,s,i,c=[],l=!0,d=!1;try{if(s=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=s.call(n)).done)&&(c.push(r.value),c.length!==t);l=!0);}catch(h){d=!0,o=h}finally{try{if(!l&&n.return!=null&&(i=n.return(),Object(i)!==i))return}finally{if(d)throw o}}return c}}function je(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function He(e,t){if(e){if(typeof e=="string")return je(e,t);var n={}.toString.call(e).slice(8,-1);return n==="Object"&&e.constructor&&(n=e.constructor.name),n==="Map"||n==="Set"?Array.from(e):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?je(e,t):void 0}}function Oe(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  2. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ze(e,t){return be(e)||Ue(e,t)||He(e,t)||Oe()}var m=ee(67294);function ne(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=ne(e[n]))!==""&&(t+=(t&&" ")+r);else for(let n in e)e[n]&&(t+=(t&&" ")+n);return t}var lt=ee(52798);const Be=e=>{let t;const n=new Set,r=(h,g)=>{const v=typeof h=="function"?h(t):h;if(!Object.is(v,t)){const w=t;t=(g!=null?g:typeof v!="object"||v===null)?v:Object.assign({},t,v),n.forEach(M=>M(t,w))}},o=()=>t,l={setState:r,getState:o,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h)),destroy:()=>{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()}},d=t=e(r,o,l);return l},Ce=e=>e?Be(e):Be;var ze=e=>(console.warn("[DEPRECATED] Default export is deprecated. Instead use import { createStore } from 'zustand/vanilla'."),Ce(e));const{useDebugValue:Ge}=m,{useSyncExternalStoreWithSelector:Ve}=lt,De=e=>e;function Ie(e,t=De,n){const r=Ve(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return Ge(r),r}const xe=(e,t)=>{const n=Ce(e),r=(o,s=t)=>Ie(n,o,s);return Object.assign(r,n),r},Le=(e,t)=>e?xe(e,t):xe;function ue(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,o]of e)if(!Object.is(o,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 gt=(e,t)=>(console.warn("[DEPRECATED] Default export is deprecated. Instead use `import { shallow } from 'zustand/shallow'`."),ue(e,t)),Z={value:function(){}};function qe(){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 ae(n)}function ae(e){this._=e}function ft(e,t){return e.trim().split(/^|\s+/).map(function(n){var r="",o=n.indexOf(".");if(o>=0&&(r=n.slice(o+1),n=n.slice(0,o)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:r}})}ae.prototype=qe.prototype={constructor:ae,on:function(t,n){var r=this._,o=ft(t+"",r),s,i=-1,c=o.length;if(arguments.length<2){for(;++i<c;)if((s=(t=o[i]).type)&&(s=Fe(r[s],t.name)))return s;return}if(n!=null&&typeof n!="function")throw new Error("invalid callback: "+n);for(;++i<c;)if(s=(t=o[i]).type)r[s]=ht(r[s],t.name,n);else if(n==null)for(s in r)r[s]=ht(r[s],t.name,null);return this},copy:function(){var t={},n=this._;for(var r in n)t[r]=n[r].slice();return new ae(t)},call:function(t,n){if((s=arguments.length-2)>0)for(var r=new Array(s),o=0,s,i;o<s;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],o=0,s=i.length;o<s;++o)i[o].value.apply(n,r)},apply:function(t,n,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],s=0,i=o.length;s<i;++s)o[s].value.apply(n,r)}};function Fe(e,t){for(var n=0,r=e.length,o;n<r;++n)if((o=e[n]).name===t)return o.value}function ht(e,t,n){for(var r=0,o=e.length;r<o;++r)if(e[r].name===t){e[r]=Z,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var pt=qe;function St(){}function Dt(e){return e==null?St:function(){return this.querySelector(e)}}function et(e){typeof e!="function"&&(e=Dt(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],i=s.length,c=r[o]=new Array(i),l,d,h=0;h<i;++h)(l=s[h])&&(d=e.call(l,l.__data__,h,s))&&("__data__"in l&&(d.__data__=l.__data__),c[h]=d);return new _t(r,this._parents)}function yt(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function nt(){return[]}function Xt(e){return e==null?nt:function(){return this.querySelectorAll(e)}}function at(e){return function(){return yt(e.apply(this,arguments))}}function H(e){typeof e=="function"?e=at(e):e=Xt(e);for(var t=this._groups,n=t.length,r=[],o=[],s=0;s<n;++s)for(var i=t[s],c=i.length,l,d=0;d<c;++d)(l=i[d])&&(r.push(e.call(l,l.__data__,d,i)),o.push(l));return new _t(r,o)}function D(e){return function(){return this.matches(e)}}function j(e){return function(t){return t.matches(e)}}var le=Array.prototype.find;function ve(e){return function(){return le.call(this.children,e)}}function me(){return this.firstElementChild}function Me(e){return this.select(e==null?me:ve(typeof e=="function"?e:j(e)))}var Xe=Array.prototype.filter;function ct(){return Array.from(this.children)}function Nt(e){return function(){return Xe.call(this.children,e)}}function wt(e){return this.selectAll(e==null?ct:Nt(typeof e=="function"?e:j(e)))}function At(e){typeof e!="function"&&(e=D(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],i=s.length,c=r[o]=[],l,d=0;d<i;++d)(l=s[d])&&e.call(l,l.__data__,d,s)&&c.push(l);return new _t(r,this._parents)}function Kn(e){return new Array(e.length)}function Tn(){return new _t(this._enter||this._groups.map(Kn),this._parents)}function Ir(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Ir.prototype={constructor:Ir,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 di(e){return function(){return e}}function hi(e,t,n,r,o,s){for(var i=0,c,l=t.length,d=s.length;i<d;++i)(c=t[i])?(c.__data__=s[i],r[i]=c):n[i]=new Ir(e,s[i]);for(;i<l;++i)(c=t[i])&&(o[i]=c)}function pi(e,t,n,r,o,s,i){var c,l,d=new Map,h=t.length,g=s.length,v=new Array(h),w;for(c=0;c<h;++c)(l=t[c])&&(v[c]=w=i.call(l,l.__data__,c,t)+"",d.has(w)?o[c]=l:d.set(w,l));for(c=0;c<g;++c)w=i.call(e,s[c],c,s)+"",(l=d.get(w))?(r[c]=l,l.__data__=s[c],d.delete(w)):n[c]=new Ir(e,s[c]);for(c=0;c<h;++c)(l=t[c])&&d.get(v[c])===l&&(o[c]=l)}function Rr(e){return e.__data__}function mi(e,t){if(!arguments.length)return Array.from(this,Rr);var n=t?pi:hi,r=this._parents,o=this._groups;typeof e!="function"&&(e=di(e));for(var s=o.length,i=new Array(s),c=new Array(s),l=new Array(s),d=0;d<s;++d){var h=r[d],g=o[d],v=g.length,w=po(e.call(h,h&&h.__data__,d,r)),M=w.length,_=c[d]=new Array(M),P=i[d]=new Array(M),S=l[d]=new Array(v);n(h,g,_,P,S,w,t);for(var k=0,I=0,N,$;k<M;++k)if(N=_[k]){for(k>=I&&(I=k+1);!($=P[I])&&++I<M;);N._next=$||null}}return i=new _t(i,r),i._enter=c,i._exit=l,i}function po(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function xt(){return new _t(this._exit||this._groups.map(Kn),this._parents)}function Zn(e,t,n){var r=this.enter(),o=this,s=this.exit();return typeof e=="function"?(r=e(r),r&&(r=r.selection())):r=r.append(e+""),t!=null&&(o=t(o),o&&(o=o.selection())),n==null?s.remove():n(s),r&&o?r.merge(o).order():o}function $e(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,o=n.length,s=r.length,i=Math.min(o,s),c=new Array(o),l=0;l<i;++l)for(var d=n[l],h=r[l],g=d.length,v=c[l]=new Array(g),w,M=0;M<g;++M)(w=d[M]||h[M])&&(v[M]=w);for(;l<o;++l)c[l]=n[l];return new _t(c,this._parents)}function mo(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],o=r.length-1,s=r[o],i;--o>=0;)(i=r[o])&&(s&&i.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(i,s),s=i);return this}function $r(e){e||(e=Or);function t(g,v){return g&&v?e(g.__data__,v.__data__):!g-!v}for(var n=this._groups,r=n.length,o=new Array(r),s=0;s<r;++s){for(var i=n[s],c=i.length,l=o[s]=new Array(c),d,h=0;h<c;++h)(d=i[h])&&(l[h]=d);l.sort(t)}return new _t(o,this._parents).order()}function Or(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Xs(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function Gs(){return Array.from(this)}function gi(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length;o<s;++o){var i=r[o];if(i)return i}return null}function Ws(){let e=0;for(const t of this)++e;return e}function Us(){return!this.node()}function js(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var o=t[n],s=0,i=o.length,c;s<i;++s)(c=o[s])&&e.call(c,c.__data__,s,o);return this}var go="http://www.w3.org/1999/xhtml",yi={svg:"http://www.w3.org/2000/svg",xhtml:go,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function An(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),yi.hasOwnProperty(t)?{space:yi[t],local:e}:e}function Ks(e){return function(){this.removeAttribute(e)}}function Zs(e){return function(){this.removeAttributeNS(e.space,e.local)}}function qs(e,t){return function(){this.setAttribute(e,t)}}function xi(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function yn(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function vi(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 wi(e,t){var n=An(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?Zs:Ks:typeof t=="function"?n.local?vi:yn:n.local?xi:qs)(n,t))}function yo(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Qs(e){return function(){this.style.removeProperty(e)}}function Js(e,t,n){return function(){this.style.setProperty(e,t,n)}}function bi(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function qn(e,t,n){return arguments.length>1?this.each((t==null?Qs:typeof t=="function"?bi:Js)(e,t,n==null?"":n)):on(this.node(),e)}function on(e,t){return e.style.getPropertyValue(t)||yo(e).getComputedStyle(e,null).getPropertyValue(t)}function Si(e){return function(){delete this[e]}}function xo(e,t){return function(){this[e]=t}}function _i(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Ei(e,t){return arguments.length>1?this.each((t==null?Si:typeof t=="function"?_i:xo)(e,t)):this.node()[e]}function vo(e){return e.trim().split(/^|\s+/)}function Qn(e){return e.classList||new wo(e)}function wo(e){this._node=e,this._names=vo(e.getAttribute("class")||"")}wo.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 bo(e,t){for(var n=Qn(e),r=-1,o=t.length;++r<o;)n.add(t[r])}function Dr(e,t){for(var n=Qn(e),r=-1,o=t.length;++r<o;)n.remove(t[r])}function Ci(e){return function(){bo(this,e)}}function Ni(e){return function(){Dr(this,e)}}function So(e,t){return function(){(t.apply(this,arguments)?bo:Dr)(this,e)}}function Mi(e,t){var n=vo(e+"");if(arguments.length<2){for(var r=Qn(this.node()),o=-1,s=n.length;++o<s;)if(!r.contains(n[o]))return!1;return!0}return this.each((typeof t=="function"?So:t?Ci:Ni)(n,t))}function Ti(){this.textContent=""}function Ai(e){return function(){this.textContent=e}}function ki(e){return function(){var t=e.apply(this,arguments);this.textContent=t==null?"":t}}function Pi(e){return arguments.length?this.each(e==null?Ti:(typeof e=="function"?ki:Ai)(e)):this.node().textContent}function Ii(){this.innerHTML=""}function _o(e){return function(){this.innerHTML=e}}function Eo(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t==null?"":t}}function zr(e){return arguments.length?this.each(e==null?Ii:(typeof e=="function"?Eo:_o)(e)):this.node().innerHTML}function Co(){this.nextSibling&&this.parentNode.appendChild(this)}function Ri(){return this.each(Co)}function kn(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function $i(){return this.each(kn)}function No(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===go&&t.documentElement.namespaceURI===go?t.createElement(e):t.createElementNS(n,e)}}function zt(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qt(e){var t=An(e);return(t.local?zt:No)(t)}function Oi(e){var t=typeof e=="function"?e:Qt(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function Lr(){return null}function Mo(e,t){var n=typeof e=="function"?e:Qt(e),r=t==null?Lr:typeof t=="function"?t:Dt(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function To(){var e=this.parentNode;e&&e.removeChild(this)}function Ao(){return this.each(To)}function ko(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Hr(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Di(e){return this.select(e?Hr:ko)}function Lt(e){return arguments.length?this.property("__data__",e):this.node().__data__}function ea(e){return function(t){e.call(this,t,this.__data__)}}function ta(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 na(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,o=t.length,s;n<o;++n)s=t[n],(!e.type||s.type===e.type)&&s.name===e.name?this.removeEventListener(s.type,s.listener,s.options):t[++r]=s;++r?t.length=r:delete this.__on}}}function ra(e,t,n){return function(){var r=this.__on,o,s=ea(t);if(r){for(var i=0,c=r.length;i<c;++i)if((o=r[i]).type===e.type&&o.name===e.name){this.removeEventListener(o.type,o.listener,o.options),this.addEventListener(o.type,o.listener=s,o.options=n),o.value=t;return}}this.addEventListener(e.type,s,n),o={type:e.type,name:e.name,value:t,listener:s,options:n},r?r.push(o):this.__on=[o]}}function oa(e,t,n){var r=ta(e+""),o,s=r.length,i;if(arguments.length<2){var c=this.node().__on;if(c){for(var l=0,d=c.length,h;l<d;++l)for(o=0,h=c[l];o<s;++o)if((i=r[o]).type===h.type&&i.name===h.name)return h.value}return}for(c=t?ra:na,o=0;o<s;++o)this.each(c(r[o],t,n));return this}function zi(e,t,n){var r=yo(e),o=r.CustomEvent;typeof o=="function"?o=new o(t,n):(o=r.document.createEvent("Event"),n?(o.initEvent(t,n.bubbles,n.cancelable),o.detail=n.detail):o.initEvent(t,!1,!1)),e.dispatchEvent(o)}function ia(e,t){return function(){return zi(this,e,t)}}function sa(e,t){return function(){return zi(this,e,t.apply(this,arguments))}}function aa(e,t){return this.each((typeof t=="function"?sa:ia)(e,t))}function*Li(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],o=0,s=r.length,i;o<s;++o)(i=r[o])&&(yield i)}var Po=[null];function _t(e,t){this._groups=e,this._parents=t}function Fr(){return new _t([[document.documentElement]],Po)}function Hi(){return this}_t.prototype=Fr.prototype={constructor:_t,select:et,selectAll:H,selectChild:Me,selectChildren:wt,filter:At,data:mi,enter:Tn,exit:xt,join:Zn,merge:$e,selection:Hi,order:mo,sort:$r,call:Xs,nodes:Gs,node:gi,size:Ws,empty:Us,each:js,attr:wi,style:qn,property:Ei,classed:Mi,text:Pi,html:zr,raise:Ri,lower:$i,append:Oi,insert:Mo,remove:Ao,clone:Di,datum:Lt,on:oa,dispatch:aa,[Symbol.iterator]:Li};var sn=Fr;function kt(e){return typeof e=="string"?new _t([[document.querySelector(e)]],[document.documentElement]):new _t([[e]],Po)}const Fi={passive:!1},Pn={capture:!0,passive:!1};function Br(e){e.stopImmediatePropagation()}function an(e){e.preventDefault(),e.stopImmediatePropagation()}function xn(e){var t=e.document.documentElement,n=kt(e).on("dragstart.drag",an,Pn);"onselectstart"in t?n.on("selectstart.drag",an,Pn):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Io(e,t){var n=e.document.documentElement,r=kt(e).on("dragstart.drag",null);t&&(r.on("click.drag",an,Pn),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Bi=1e-12;function Vr(e){return((e=Math.exp(e))+1/e)/2}function ca(e){return((e=Math.exp(e))-1/e)/2}function Vi(e){return((e=Math.exp(2*e))-1)/(e+1)}var ua=function e(t,n,r){function o(s,i){var c=s[0],l=s[1],d=s[2],h=i[0],g=i[1],v=i[2],w=h-c,M=g-l,_=w*w+M*M,P,S;if(_<Bi)S=Math.log(v/d)/t,P=function(q){return[c+q*w,l+q*M,d*Math.exp(t*q*S)]};else{var k=Math.sqrt(_),I=(v*v-d*d+r*_)/(2*d*n*k),N=(v*v-d*d-r*_)/(2*v*n*k),$=Math.log(Math.sqrt(I*I+1)-I),V=Math.log(Math.sqrt(N*N+1)-N);S=(V-$)/t,P=function(q){var F=q*S,K=Vr($),U=d/(n*k)*(K*Vi(t*F+$)-ca($));return[c+U*w,l+U*M,d*K/Vr(t*F+$)]}}return P.duration=S*1e3*t/Math.SQRT2,P}return o.rho=function(s){var i=Math.max(.001,+s),c=i*i,l=c*c;return e(i,c,l)},o}(Math.SQRT2,2,4);function Ro(e){let t;for(;t=e.sourceEvent;)e=t;return e}function Gt(e,t){if(e=Ro(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 o=t.getBoundingClientRect();return[e.clientX-o.left-t.clientLeft,e.clientY-o.top-t.clientTop]}}return[e.pageX,e.pageY]}var Jt=0,Jn=0,er=0,$o=1e3,Wt,tr,nr=0,cn=0,rr=0,or=typeof performance=="object"&&performance.now?performance:Date,Oo=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Yr(){return cn||(Oo(la),cn=or.now()+rr)}function la(){cn=0}function Xr(){this._call=this._time=this._next=null}Xr.prototype=Yi.prototype={constructor:Xr,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Yr():+n)+(t==null?0:+t),!this._next&&tr!==this&&(tr?tr._next=this:Wt=this,tr=this),this._call=e,this._time=n,Gr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Gr())}};function Yi(e,t,n){var r=new Xr;return r.restart(e,t,n),r}function fa(){Yr(),++Jt;for(var e=Wt,t;e;)(t=cn-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Jt}function Xi(){cn=(nr=or.now())+rr,Jt=Jn=0;try{fa()}finally{Jt=0,Gi(),cn=0}}function da(){var e=or.now(),t=e-nr;t>$o&&(rr-=t,nr=e)}function Gi(){for(var e,t=Wt,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:Wt=n);tr=e,Gr(r)}function Gr(e){if(!Jt){Jn&&(Jn=clearTimeout(Jn));var t=e-cn;t>24?(e<1/0&&(Jn=setTimeout(Xi,e-or.now()-rr)),er&&(er=clearInterval(er))):(er||(nr=or.now(),er=setInterval(da,$o)),Jt=1,Oo(Xi))}}function Wi(e,t,n){var r=new Xr;return t=t==null?0:+t,r.restart(o=>{r.stop(),e(o+t)},t,n),r}var ha=pt("start","end","cancel","interrupt"),pa=[],Ui=0,ji=1,Et=2,ir=3,Do=4,Wr=5,un=6;function sr(e,t,n,r,o,s){var i=e.__transition;if(!i)e.__transition={};else if(n in i)return;Ki(e,n,{name:t,index:r,group:o,on:ha,tween:pa,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Ui})}function Ur(e,t){var n=Pt(e,t);if(n.state>Ui)throw new Error("too late; already scheduled");return n}function Ht(e,t){var n=Pt(e,t);if(n.state>ir)throw new Error("too late; already running");return n}function Pt(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function Ki(e,t,n){var r=e.__transition,o;r[t]=n,n.timer=Yi(s,0,n.time);function s(d){n.state=ji,n.timer.restart(i,n.delay,n.time),n.delay<=d&&i(d-n.delay)}function i(d){var h,g,v,w;if(n.state!==ji)return l();for(h in r)if(w=r[h],w.name===n.name){if(w.state===ir)return Wi(i);w.state===Do?(w.state=un,w.timer.stop(),w.on.call("interrupt",e,e.__data__,w.index,w.group),delete r[h]):+h<t&&(w.state=un,w.timer.stop(),w.on.call("cancel",e,e.__data__,w.index,w.group),delete r[h])}if(Wi(function(){n.state===ir&&(n.state=Do,n.timer.restart(c,n.delay,n.time),c(d))}),n.state=Et,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Et){for(n.state=ir,o=new Array(v=n.tween.length),h=0,g=-1;h<v;++h)(w=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(o[++g]=w);o.length=g+1}}function c(d){for(var h=d<n.duration?n.ease.call(null,d/n.duration):(n.timer.restart(l),n.state=Wr,1),g=-1,v=o.length;++g<v;)o[g].call(e,h);n.state===Wr&&(n.on.call("end",e,e.__data__,n.index,n.group),l())}function l(){n.state=un,n.timer.stop(),delete r[t];for(var d in r)return;delete e.__transition}}function vn(e,t){var n=e.__transition,r,o,s=!0,i;if(n){t=t==null?null:t+"";for(i in n){if((r=n[i]).name!==t){s=!1;continue}o=r.state>Et&&r.state<Wr,r.state=un,r.timer.stop(),r.on.call(o?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete n[i]}s&&delete e.__transition}}function zo(e){return this.each(function(){vn(this,e)})}function en(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ft=180/Math.PI,In={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function ar(e,t,n,r,o,s){var i,c,l;return(i=Math.sqrt(e*e+t*t))&&(e/=i,t/=i),(l=e*n+t*r)&&(n-=e*l,r-=t*l),(c=Math.sqrt(n*n+r*r))&&(n/=c,r/=c,l/=c),e*r<t*n&&(e=-e,t=-t,l=-l,i=-i),{translateX:o,translateY:s,rotate:Math.atan2(t,e)*Ft,skewX:Math.atan(l)*Ft,scaleX:i,scaleY:c}}var cr;function Zi(e){var t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?In:ar(t.a,t.b,t.c,t.d,t.e,t.f)}function qi(e){return e==null||(cr||(cr=document.createElementNS("http://www.w3.org/2000/svg","g")),cr.setAttribute("transform",e),!(e=cr.transform.baseVal.consolidate()))?In:(e=e.matrix,ar(e.a,e.b,e.c,e.d,e.e,e.f))}function Lo(e,t,n,r){function o(d){return d.length?d.pop()+" ":""}function s(d,h,g,v,w,M){if(d!==g||h!==v){var _=w.push("translate(",null,t,null,n);M.push({i:_-4,x:en(d,g)},{i:_-2,x:en(h,v)})}else(g||v)&&w.push("translate("+g+t+v+n)}function i(d,h,g,v){d!==h?(d-h>180?h+=360:h-d>180&&(d+=360),v.push({i:g.push(o(g)+"rotate(",null,r)-2,x:en(d,h)})):h&&g.push(o(g)+"rotate("+h+r)}function c(d,h,g,v){d!==h?v.push({i:g.push(o(g)+"skewX(",null,r)-2,x:en(d,h)}):h&&g.push(o(g)+"skewX("+h+r)}function l(d,h,g,v,w,M){if(d!==g||h!==v){var _=w.push(o(w)+"scale(",null,",",null,")");M.push({i:_-4,x:en(d,g)},{i:_-2,x:en(h,v)})}else(g!==1||v!==1)&&w.push(o(w)+"scale("+g+","+v+")")}return function(d,h){var g=[],v=[];return d=e(d),h=e(h),s(d.translateX,d.translateY,h.translateX,h.translateY,g,v),i(d.rotate,h.rotate,g,v),c(d.skewX,h.skewX,g,v),l(d.scaleX,d.scaleY,h.scaleX,h.scaleY,g,v),d=h=null,function(w){for(var M=-1,_=v.length,P;++M<_;)g[(P=v[M]).i]=P.x(w);return g.join("")}}}var Qi=Lo(Zi,"px, ","px)","deg)"),Ji=Lo(qi,", ",")",")");function Ho(e,t){var n,r;return function(){var o=Ht(this,e),s=o.tween;if(s!==n){r=n=s;for(var i=0,c=r.length;i<c;++i)if(r[i].name===t){r=r.slice(),r.splice(i,1);break}}o.tween=r}}function jr(e,t,n){var r,o;if(typeof n!="function")throw new Error;return function(){var s=Ht(this,e),i=s.tween;if(i!==r){o=(r=i).slice();for(var c={name:t,value:n},l=0,d=o.length;l<d;++l)if(o[l].name===t){o[l]=c;break}l===d&&o.push(c)}s.tween=o}}function ma(e,t){var n=this._id;if(e+="",arguments.length<2){for(var r=Pt(this.node(),n).tween,o=0,s=r.length,i;o<s;++o)if((i=r[o]).name===e)return i.value;return null}return this.each((t==null?Ho:jr)(n,e,t))}function ur(e,t,n){var r=e._id;return e.each(function(){var o=Ht(this,r);(o.value||(o.value={}))[t]=n.apply(this,arguments)}),function(o){return Pt(o,r).value[t]}}function Kr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Fo(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Rn(){}var $n=.7,lr=1/$n,wn="\\s*([+-]?\\d+)\\s*",On="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",It="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",bn=/^#([0-9a-f]{3,8})$/,Zr=new RegExp("^rgb\\(".concat(wn,",").concat(wn,",").concat(wn,"\\)$")),Bo=new RegExp("^rgb\\(".concat(It,",").concat(It,",").concat(It,"\\)$")),fr=new RegExp("^rgba\\(".concat(wn,",").concat(wn,",").concat(wn,",").concat(On,"\\)$")),Vo=new RegExp("^rgba\\(".concat(It,",").concat(It,",").concat(It,",").concat(On,"\\)$")),es=new RegExp("^hsl\\(".concat(On,",").concat(It,",").concat(It,"\\)$")),ts=new RegExp("^hsla\\(".concat(On,",").concat(It,",").concat(It,",").concat(On,"\\)$")),Yo={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};Kr(Rn,Dn,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:Xo,formatHex:Xo,formatHex8:ns,formatHsl:Go,formatRgb:Wo,toString:Wo});function Xo(){return this.rgb().formatHex()}function ns(){return this.rgb().formatHex8()}function Go(){return Zo(this).formatHsl()}function Wo(){return this.rgb().formatRgb()}function Dn(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=bn.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?qr(t):n===3?new bt(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Sn(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Sn(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=Zr.exec(e))?new bt(t[1],t[2],t[3],1):(t=Bo.exec(e))?new bt(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=fr.exec(e))?Sn(t[1],t[2],t[3],t[4]):(t=Vo.exec(e))?Sn(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=es.exec(e))?Ko(t[1],t[2]/100,t[3]/100,1):(t=ts.exec(e))?Ko(t[1],t[2]/100,t[3]/100,t[4]):Yo.hasOwnProperty(e)?qr(Yo[e]):e==="transparent"?new bt(NaN,NaN,NaN,0):null}function qr(e){return new bt(e>>16&255,e>>8&255,e&255,1)}function Sn(e,t,n,r){return r<=0&&(e=t=n=NaN),new bt(e,t,n,r)}function tn(e){return e instanceof Rn||(e=Dn(e)),e?(e=e.rgb(),new bt(e.r,e.g,e.b,e.opacity)):new bt}function rs(e,t,n,r){return arguments.length===1?tn(e):new bt(e,t,n,r==null?1:r)}function bt(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Kr(bt,rs,Fo(Rn,{brighter:function(t){return t=t==null?lr:Math.pow(lr,t),new bt(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?$n:Math.pow($n,t),new bt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new bt(nn(this.r),nn(this.g),nn(this.b),dr(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Uo,formatHex:Uo,formatHex8:os,formatRgb:jo,toString:jo}));function Uo(){return"#".concat(ln(this.r)).concat(ln(this.g)).concat(ln(this.b))}function os(){return"#".concat(ln(this.r)).concat(ln(this.g)).concat(ln(this.b)).concat(ln((isNaN(this.opacity)?1:this.opacity)*255))}function jo(){var e=dr(this.opacity);return"".concat(e===1?"rgb(":"rgba(").concat(nn(this.r),", ").concat(nn(this.g),", ").concat(nn(this.b)).concat(e===1?")":", ".concat(e,")"))}function dr(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function nn(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function ln(e){return e=nn(e),(e<16?"0":"")+e.toString(16)}function Ko(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Rt(e,t,n,r)}function Zo(e){if(e instanceof Rt)return new Rt(e.h,e.s,e.l,e.opacity);if(e instanceof Rn||(e=Dn(e)),!e)return new Rt;if(e instanceof Rt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=NaN,c=s-o,l=(s+o)/2;return c?(t===s?i=(n-r)/c+(n<r)*6:n===s?i=(r-t)/c+2:i=(t-n)/c+4,c/=l<.5?s+o:2-s-o,i*=60):c=l>0&&l<1?0:i,new Rt(i,c,l,e.opacity)}function is(e,t,n,r){return arguments.length===1?Zo(e):new Rt(e,t,n,r==null?1:r)}function Rt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Kr(Rt,is,Fo(Rn,{brighter:function(t){return t=t==null?lr:Math.pow(lr,t),new Rt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?$n:Math.pow($n,t),new Rt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,s=2*r-o;return new bt(Mt(t>=240?t-240:t+120,s,o),Mt(t,s,o),Mt(t<120?t+240:t-120,s,o),this.opacity)},clamp:function(){return new Rt(Qr(this.h),hr(this.s),hr(this.l),dr(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=dr(this.opacity);return"".concat(t===1?"hsl(":"hsla(").concat(Qr(this.h),", ").concat(hr(this.s)*100,"%, ").concat(hr(this.l)*100,"%").concat(t===1?")":", ".concat(t,")"))}}));function Qr(e){return e=(e||0)%360,e<0?e+360:e}function hr(e){return Math.max(0,Math.min(1,e||0))}function Mt(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Jr(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function ss(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function pr(){}var mr=.7,eo=1/mr,zn="\\s*([+-]?\\d+)\\s*",gr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ut="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",ga=/^#([0-9a-f]{3,8})$/,ya=new RegExp("^rgb\\(".concat(zn,",").concat(zn,",").concat(zn,"\\)$")),xa=new RegExp("^rgb\\(".concat(Ut,",").concat(Ut,",").concat(Ut,"\\)$")),a=new RegExp("^rgba\\(".concat(zn,",").concat(zn,",").concat(zn,",").concat(gr,"\\)$")),u=new RegExp("^rgba\\(".concat(Ut,",").concat(Ut,",").concat(Ut,",").concat(gr,"\\)$")),f=new RegExp("^hsl\\(".concat(gr,",").concat(Ut,",").concat(Ut,"\\)$")),p=new RegExp("^hsla\\(".concat(gr,",").concat(Ut,",").concat(Ut,",").concat(gr,"\\)$")),x={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};Jr(pr,Q,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:b,formatHex:b,formatHex8:T,formatHsl:z,formatRgb:X,toString:X});function b(){return this.rgb().formatHex()}function T(){return this.rgb().formatHex8()}function z(){return Qe(this).formatHsl()}function X(){return this.rgb().formatRgb()}function Q(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=ga.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?G(t):n===3?new ge(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?ie(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?ie(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=ya.exec(e))?new ge(t[1],t[2],t[3],1):(t=xa.exec(e))?new ge(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=a.exec(e))?ie(t[1],t[2],t[3],t[4]):(t=u.exec(e))?ie(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=f.exec(e))?ut(t[1],t[2]/100,t[3]/100,1):(t=p.exec(e))?ut(t[1],t[2]/100,t[3]/100,t[4]):x.hasOwnProperty(e)?G(x[e]):e==="transparent"?new ge(NaN,NaN,NaN,0):null}function G(e){return new ge(e>>16&255,e>>8&255,e&255,1)}function ie(e,t,n,r){return r<=0&&(e=t=n=NaN),new ge(e,t,n,r)}function _e(e){return e instanceof pr||(e=Q(e)),e?(e=e.rgb(),new ge(e.r,e.g,e.b,e.opacity)):new ge}function Se(e,t,n,r){return arguments.length===1?_e(e):new ge(e,t,n,r==null?1:r)}function ge(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Jr(ge,Se,ss(pr,{brighter:function(t){return t=t==null?eo:Math.pow(eo,t),new ge(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=t==null?mr:Math.pow(mr,t),new ge(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},clamp:function(){return new ge(Pe(this.r),Pe(this.g),Pe(this.b),de(this.opacity))},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:pe,formatHex:pe,formatHex8:Te,formatRgb:Ne,toString:Ne}));function pe(){return"#".concat(Ye(this.r)).concat(Ye(this.g)).concat(Ye(this.b))}function Te(){return"#".concat(Ye(this.r)).concat(Ye(this.g)).concat(Ye(this.b)).concat(Ye((isNaN(this.opacity)?1:this.opacity)*255))}function Ne(){var e=de(this.opacity);return"".concat(e===1?"rgb(":"rgba(").concat(Pe(this.r),", ").concat(Pe(this.g),", ").concat(Pe(this.b)).concat(e===1?")":", ".concat(e,")"))}function de(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Pe(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Ye(e){return e=Pe(e),(e<16?"0":"")+e.toString(16)}function ut(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new mt(e,t,n,r)}function Qe(e){if(e instanceof mt)return new mt(e.h,e.s,e.l,e.opacity);if(e instanceof pr||(e=Q(e)),!e)return new mt;if(e instanceof mt)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,o=Math.min(t,n,r),s=Math.max(t,n,r),i=NaN,c=s-o,l=(s+o)/2;return c?(t===s?i=(n-r)/c+(n<r)*6:n===s?i=(r-t)/c+2:i=(t-n)/c+4,c/=l<.5?s+o:2-s-o,i*=60):c=l>0&&l<1?0:i,new mt(i,c,l,e.opacity)}function Ee(e,t,n,r){return arguments.length===1?Qe(e):new mt(e,t,n,r==null?1:r)}function mt(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Jr(mt,Ee,ss(pr,{brighter:function(t){return t=t==null?eo:Math.pow(eo,t),new mt(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=t==null?mr:Math.pow(mr,t),new mt(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+(this.h<0)*360,n=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*n,s=2*r-o;return new ge(_n(t>=240?t-240:t+120,s,o),_n(t,s,o),_n(t<120?t+240:t-120,s,o),this.opacity)},clamp:function(){return new mt(jt(this.h),Kt(this.s),Kt(this.l),de(this.opacity))},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=de(this.opacity);return"".concat(t===1?"hsl(":"hsla(").concat(jt(this.h),", ").concat(Kt(this.s)*100,"%, ").concat(Kt(this.l)*100,"%").concat(t===1?")":", ".concat(t,")"))}}));function jt(e){return e=(e||0)%360,e<0?e+360:e}function Kt(e){return Math.max(0,Math.min(1,e||0))}function _n(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}function Ln(e,t,n,r,o){var s=e*e,i=s*e;return((1-3*e+3*s-i)*t+(4-6*s+3*i)*n+(1+3*e+3*s-3*i)*r+i*o)/6}function yr(e){var t=e.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,t-1):Math.floor(n*t),o=e[r],s=e[r+1],i=r>0?e[r-1]:2*o-s,c=r<t-1?e[r+2]:2*s-o;return Ln((n-r/t)*t,i,o,s,c)}}function as(e){var t=e.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*t),o=e[(r+t-1)%t],s=e[r%t],i=e[(r+1)%t],c=e[(r+2)%t];return Ln((n-r/t)*t,o,s,i,c)}}var va=function(e){return function(){return e}};function wa(e,t){return function(n){return e+n*t}}function Qc(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 Xd(e,t){var n=t-e;return n?wa(e,n>180||n<-180?n-360*Math.round(n/360):n):constant(isNaN(e)?t:e)}function Jc(e){return(e=+e)==1?ba:function(t,n){return n-t?Qc(t,n,e):va(isNaN(t)?n:t)}}function ba(e,t){var n=t-e;return n?wa(e,n):va(isNaN(e)?t:e)}var Sa=function e(t){var n=Jc(t);function r(o,s){var i=n((o=Se(o)).r,(s=Se(s)).r),c=n(o.g,s.g),l=n(o.b,s.b),d=ba(o.opacity,s.opacity);return function(h){return o.r=i(h),o.g=c(h),o.b=l(h),o.opacity=d(h),o+""}}return r.gamma=e,r}(1);function _a(e){return function(t){var n=t.length,r=new Array(n),o=new Array(n),s=new Array(n),i,c;for(i=0;i<n;++i)c=Se(t[i]),r[i]=c.r||0,o[i]=c.g||0,s[i]=c.b||0;return r=e(r),o=e(o),s=e(s),c.opacity=1,function(l){return c.r=r(l),c.g=o(l),c.b=s(l),c+""}}}var Gd=_a(yr),Wd=_a(as),cs=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,us=new RegExp(cs.source,"g");function eu(e){return function(){return e}}function tu(e){return function(t){return e(t)+""}}function nu(e,t){var n=cs.lastIndex=us.lastIndex=0,r,o,s,i=-1,c=[],l=[];for(e=e+"",t=t+"";(r=cs.exec(e))&&(o=us.exec(t));)(s=o.index)>n&&(s=t.slice(n,s),c[i]?c[i]+=s:c[++i]=s),(r=r[0])===(o=o[0])?c[i]?c[i]+=o:c[++i]=o:(c[++i]=null,l.push({i,x:en(r,o)})),n=us.lastIndex;return n<t.length&&(s=t.slice(n),c[i]?c[i]+=s:c[++i]=s),c.length<2?l[0]?tu(l[0].x):eu(t):(t=l.length,function(d){for(var h=0,g;h<t;++h)c[(g=l[h]).i]=g.x(d);return c.join("")})}function Ea(e,t){var n;return(typeof t=="number"?en:t instanceof Dn?Sa:(n=Dn(t))?(t=n,Sa):nu)(e,t)}function ru(e){return function(){this.removeAttribute(e)}}function ou(e){return function(){this.removeAttributeNS(e.space,e.local)}}function iu(e,t,n){var r,o=n+"",s;return function(){var i=this.getAttribute(e);return i===o?null:i===r?s:s=t(r=i,n)}}function su(e,t,n){var r,o=n+"",s;return function(){var i=this.getAttributeNS(e.space,e.local);return i===o?null:i===r?s:s=t(r=i,n)}}function au(e,t,n){var r,o,s;return function(){var i,c=n(this),l;return c==null?void this.removeAttribute(e):(i=this.getAttribute(e),l=c+"",i===l?null:i===r&&l===o?s:(o=l,s=t(r=i,c)))}}function cu(e,t,n){var r,o,s;return function(){var i,c=n(this),l;return c==null?void this.removeAttributeNS(e.space,e.local):(i=this.getAttributeNS(e.space,e.local),l=c+"",i===l?null:i===r&&l===o?s:(o=l,s=t(r=i,c)))}}function uu(e,t){var n=An(e),r=n==="transform"?Ji:Ea;return this.attrTween(e,typeof t=="function"?(n.local?cu:au)(n,r,ur(this,"attr."+e,t)):t==null?(n.local?ou:ru)(n):(n.local?su:iu)(n,r,t))}function lu(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function fu(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function du(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&fu(e,s)),n}return o._value=t,o}function hu(e,t){var n,r;function o(){var s=t.apply(this,arguments);return s!==r&&(n=(r=s)&&lu(e,s)),n}return o._value=t,o}function pu(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=An(e);return this.tween(n,(r.local?du:hu)(r,t))}function mu(e,t){return function(){Ur(this,e).delay=+t.apply(this,arguments)}}function gu(e,t){return t=+t,function(){Ur(this,e).delay=t}}function yu(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?mu:gu)(t,e)):Pt(this.node(),t).delay}function xu(e,t){return function(){Ht(this,e).duration=+t.apply(this,arguments)}}function vu(e,t){return t=+t,function(){Ht(this,e).duration=t}}function wu(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?xu:vu)(t,e)):Pt(this.node(),t).duration}function bu(e,t){if(typeof t!="function")throw new Error;return function(){Ht(this,e).ease=t}}function Su(e){var t=this._id;return arguments.length?this.each(bu(t,e)):Pt(this.node(),t).ease}function _u(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Ht(this,e).ease=n}}function Eu(e){if(typeof e!="function")throw new Error;return this.each(_u(this._id,e))}function Cu(e){typeof e!="function"&&(e=D(e));for(var t=this._groups,n=t.length,r=new Array(n),o=0;o<n;++o)for(var s=t[o],i=s.length,c=r[o]=[],l,d=0;d<i;++d)(l=s[d])&&e.call(l,l.__data__,d,s)&&c.push(l);return new fn(r,this._parents,this._name,this._id)}function Nu(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,r=t.length,o=n.length,s=Math.min(r,o),i=new Array(r),c=0;c<s;++c)for(var l=t[c],d=n[c],h=l.length,g=i[c]=new Array(h),v,w=0;w<h;++w)(v=l[w]||d[w])&&(g[w]=v);for(;c<r;++c)i[c]=t[c];return new fn(i,this._parents,this._name,this._id)}function Mu(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 Tu(e,t,n){var r,o,s=Mu(t)?Ur:Ht;return function(){var i=s(this,e),c=i.on;c!==r&&(o=(r=c).copy()).on(t,n),i.on=o}}function Au(e,t){var n=this._id;return arguments.length<2?Pt(this.node(),n).on.on(e):this.each(Tu(n,e,t))}function ku(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function Pu(){return this.on("end.remove",ku(this._id))}function Iu(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Dt(e));for(var r=this._groups,o=r.length,s=new Array(o),i=0;i<o;++i)for(var c=r[i],l=c.length,d=s[i]=new Array(l),h,g,v=0;v<l;++v)(h=c[v])&&(g=e.call(h,h.__data__,v,c))&&("__data__"in h&&(g.__data__=h.__data__),d[v]=g,sr(d[v],t,n,v,d,Pt(h,n)));return new fn(s,this._parents,t,n)}function Ru(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Xt(e));for(var r=this._groups,o=r.length,s=[],i=[],c=0;c<o;++c)for(var l=r[c],d=l.length,h,g=0;g<d;++g)if(h=l[g]){for(var v=e.call(h,h.__data__,g,l),w,M=Pt(h,n),_=0,P=v.length;_<P;++_)(w=v[_])&&sr(w,t,n,_,v,M);s.push(v),i.push(h)}return new fn(s,i,t,n)}var $u=sn.prototype.constructor;function Ou(){return new $u(this._groups,this._parents)}function Du(e,t){var n,r,o;return function(){var s=on(this,e),i=(this.style.removeProperty(e),on(this,e));return s===i?null:s===n&&i===r?o:o=t(n=s,r=i)}}function Ca(e){return function(){this.style.removeProperty(e)}}function zu(e,t,n){var r,o=n+"",s;return function(){var i=on(this,e);return i===o?null:i===r?s:s=t(r=i,n)}}function Lu(e,t,n){var r,o,s;return function(){var i=on(this,e),c=n(this),l=c+"";return c==null&&(l=c=(this.style.removeProperty(e),on(this,e))),i===l?null:i===r&&l===o?s:(o=l,s=t(r=i,c))}}function Hu(e,t){var n,r,o,s="style."+t,i="end."+s,c;return function(){var l=Ht(this,e),d=l.on,h=l.value[s]==null?c||(c=Ca(t)):void 0;(d!==n||o!==h)&&(r=(n=d).copy()).on(i,o=h),l.on=r}}function Fu(e,t,n){var r=(e+="")=="transform"?Qi:Ea;return t==null?this.styleTween(e,Du(e,r)).on("end.style."+e,Ca(e)):typeof t=="function"?this.styleTween(e,Lu(e,r,ur(this,"style."+e,t))).each(Hu(this._id,e)):this.styleTween(e,zu(e,r,t),n).on("end.style."+e,null)}function Bu(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function Vu(e,t,n){var r,o;function s(){var i=t.apply(this,arguments);return i!==o&&(r=(o=i)&&Bu(e,i,n)),r}return s._value=t,s}function Yu(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,Vu(e,t,n==null?"":n))}function Xu(e){return function(){this.textContent=e}}function Gu(e){return function(){var t=e(this);this.textContent=t==null?"":t}}function Wu(e){return this.tween("text",typeof e=="function"?Gu(ur(this,"text",e)):Xu(e==null?"":e+""))}function Uu(e){return function(t){this.textContent=e.call(this,t)}}function ju(e){var t,n;function r(){var o=e.apply(this,arguments);return o!==n&&(t=(n=o)&&Uu(o)),t}return r._value=e,r}function Ku(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,ju(e))}function Zu(){for(var e=this._name,t=this._id,n=Na(),r=this._groups,o=r.length,s=0;s<o;++s)for(var i=r[s],c=i.length,l,d=0;d<c;++d)if(l=i[d]){var h=Pt(l,t);sr(l,e,n,d,i,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new fn(r,this._parents,e,n)}function qu(){var e,t,n=this,r=n._id,o=n.size();return new Promise(function(s,i){var c={value:i},l={value:function(){--o===0&&s()}};n.each(function(){var d=Ht(this,r),h=d.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(l)),d.on=t}),o===0&&s()})}var Qu=0;function fn(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Ju(e){return sn().transition(e)}function Na(){return++Qu}var dn=sn.prototype;fn.prototype=Ju.prototype={constructor:fn,select:Iu,selectAll:Ru,selectChild:dn.selectChild,selectChildren:dn.selectChildren,filter:Cu,merge:Nu,selection:Ou,transition:Zu,call:dn.call,nodes:dn.nodes,node:dn.node,size:dn.size,empty:dn.empty,each:dn.each,on:Au,attr:uu,attrTween:pu,style:Fu,styleTween:Yu,text:Wu,textTween:Ku,remove:Pu,tween:ma,delay:yu,duration:wu,ease:Su,easeVarying:Eu,end:qu,[Symbol.iterator]:dn[Symbol.iterator]};function Ud(e){return e*e*e}function jd(e){return--e*e*e+1}function el(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var tl={time:null,delay:0,duration:250,ease:el};function nl(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 rl(e){var t,n;e instanceof fn?(t=e._id,e=e._name):(t=Na(),(n=tl).time=Yr(),e=e==null?null:e+"");for(var r=this._groups,o=r.length,s=0;s<o;++s)for(var i=r[s],c=i.length,l,d=0;d<c;++d)(l=i[d])&&sr(l,e,t,d,i,n||nl(l,t));return new fn(r,this._parents,e,t)}sn.prototype.interrupt=zo,sn.prototype.transition=rl;var qo=e=>()=>e;function ol(e,{sourceEvent:t,target:n,transform:r,dispatch:o}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function hn(e,t,n){this.k=e,this.x=t,this.y=n}hn.prototype={constructor:hn,scale:function(e){return e===1?this:new hn(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new hn(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 pn=new hn(1,0,0);il.prototype=hn.prototype;function il(e){for(;!e.__zoom;)if(!(e=e.parentNode))return pn;return e.__zoom}function ls(e){e.stopImmediatePropagation()}function to(e){e.preventDefault(),e.stopImmediatePropagation()}function sl(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function al(){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 Ma(){return this.__zoom||pn}function cl(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function ul(){return navigator.maxTouchPoints||"ontouchstart"in this}function ll(e,t,n){var r=e.invertX(t[0][0])-n[0][0],o=e.invertX(t[1][0])-n[1][0],s=e.invertY(t[0][1])-n[0][1],i=e.invertY(t[1][1])-n[1][1];return e.translate(o>r?(r+o)/2:Math.min(0,r)||Math.max(0,o),i>s?(s+i)/2:Math.min(0,s)||Math.max(0,i))}function fl(){var e=sl,t=al,n=ll,r=cl,o=ul,s=[0,1/0],i=[[-1/0,-1/0],[1/0,1/0]],c=250,l=ua,d=pt("start","zoom","end"),h,g,v,w=500,M=150,_=0,P=10;function S(y){y.property("__zoom",Ma).on("wheel.zoom",q,{passive:!1}).on("mousedown.zoom",F).on("dblclick.zoom",K).filter(o).on("touchstart.zoom",U).on("touchmove.zoom",te).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}S.transform=function(y,A,E,R){var L=y.selection?y.selection():y;L.property("__zoom",Ma),y!==L?$(y,A,E,R):L.interrupt().each(function(){V(this,arguments).event(R).start().zoom(null,typeof A=="function"?A.apply(this,arguments):A).end()})},S.scaleBy=function(y,A,E,R){S.scaleTo(y,function(){var L=this.__zoom.k,C=typeof A=="function"?A.apply(this,arguments):A;return L*C},E,R)},S.scaleTo=function(y,A,E,R){S.transform(y,function(){var L=t.apply(this,arguments),C=this.__zoom,O=E==null?N(L):typeof E=="function"?E.apply(this,arguments):E,Y=C.invert(O),B=typeof A=="function"?A.apply(this,arguments):A;return n(I(k(C,B),O,Y),L,i)},E,R)},S.translateBy=function(y,A,E,R){S.transform(y,function(){return n(this.__zoom.translate(typeof A=="function"?A.apply(this,arguments):A,typeof E=="function"?E.apply(this,arguments):E),t.apply(this,arguments),i)},null,R)},S.translateTo=function(y,A,E,R,L){S.transform(y,function(){var C=t.apply(this,arguments),O=this.__zoom,Y=R==null?N(C):typeof R=="function"?R.apply(this,arguments):R;return n(pn.translate(Y[0],Y[1]).scale(O.k).translate(typeof A=="function"?-A.apply(this,arguments):-A,typeof E=="function"?-E.apply(this,arguments):-E),C,i)},R,L)};function k(y,A){return A=Math.max(s[0],Math.min(s[1],A)),A===y.k?y:new hn(A,y.x,y.y)}function I(y,A,E){var R=A[0]-E[0]*y.k,L=A[1]-E[1]*y.k;return R===y.x&&L===y.y?y:new hn(y.k,R,L)}function N(y){return[(+y[0][0]+ +y[1][0])/2,(+y[0][1]+ +y[1][1])/2]}function $(y,A,E,R){y.on("start.zoom",function(){V(this,arguments).event(R).start()}).on("interrupt.zoom end.zoom",function(){V(this,arguments).event(R).end()}).tween("zoom",function(){var L=this,C=arguments,O=V(L,C).event(R),Y=t.apply(L,C),B=E==null?N(Y):typeof E=="function"?E.apply(L,C):E,re=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),oe=L.__zoom,we=typeof A=="function"?A.apply(L,C):A,ke=l(oe.invert(B).concat(re/oe.k),we.invert(B).concat(re/we.k));return function(Re){if(Re===1)Re=we;else{var We=ke(Re),rt=re/We[2];Re=new hn(rt,B[0]-We[0]*rt,B[1]-We[1]*rt)}O.zoom(null,Re)}})}function V(y,A,E){return!E&&y.__zooming||new J(y,A)}function J(y,A){this.that=y,this.args=A,this.active=0,this.sourceEvent=null,this.extent=t.apply(y,A),this.taps=0}J.prototype={event:function(y){return y&&(this.sourceEvent=y),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(y,A){return this.mouse&&y!=="mouse"&&(this.mouse[1]=A.invert(this.mouse[0])),this.touch0&&y!=="touch"&&(this.touch0[1]=A.invert(this.touch0[0])),this.touch1&&y!=="touch"&&(this.touch1[1]=A.invert(this.touch1[0])),this.that.__zoom=A,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(y){var A=kt(this.that).datum();d.call(y,this.that,new ol(y,{sourceEvent:this.sourceEvent,target:S,type:y,transform:this.that.__zoom,dispatch:d}),A)}};function q(y,...A){if(!e.apply(this,arguments))return;var E=V(this,A).event(y),R=this.__zoom,L=Math.max(s[0],Math.min(s[1],R.k*Math.pow(2,r.apply(this,arguments)))),C=Gt(y);if(E.wheel)(E.mouse[0][0]!==C[0]||E.mouse[0][1]!==C[1])&&(E.mouse[1]=R.invert(E.mouse[0]=C)),clearTimeout(E.wheel);else{if(R.k===L)return;E.mouse=[C,R.invert(C)],vn(this),E.start()}to(y),E.wheel=setTimeout(O,M),E.zoom("mouse",n(I(k(R,L),E.mouse[0],E.mouse[1]),E.extent,i));function O(){E.wheel=null,E.end()}}function F(y,...A){if(v||!e.apply(this,arguments))return;var E=y.currentTarget,R=V(this,A,!0).event(y),L=kt(y.view).on("mousemove.zoom",B,!0).on("mouseup.zoom",re,!0),C=Gt(y,E),O=y.clientX,Y=y.clientY;xn(y.view),ls(y),R.mouse=[C,this.__zoom.invert(C)],vn(this),R.start();function B(oe){if(to(oe),!R.moved){var we=oe.clientX-O,ke=oe.clientY-Y;R.moved=we*we+ke*ke>_}R.event(oe).zoom("mouse",n(I(R.that.__zoom,R.mouse[0]=Gt(oe,E),R.mouse[1]),R.extent,i))}function re(oe){L.on("mousemove.zoom mouseup.zoom",null),Io(oe.view,R.moved),to(oe),R.event(oe).end()}}function K(y,...A){if(e.apply(this,arguments)){var E=this.__zoom,R=Gt(y.changedTouches?y.changedTouches[0]:y,this),L=E.invert(R),C=E.k*(y.shiftKey?.5:2),O=n(I(k(E,C),R,L),t.apply(this,A),i);to(y),c>0?kt(this).transition().duration(c).call($,O,R,y):kt(this).call(S.transform,O,R,y)}}function U(y,...A){if(e.apply(this,arguments)){var E=y.touches,R=E.length,L=V(this,A,y.changedTouches.length===R).event(y),C,O,Y,B;for(ls(y),O=0;O<R;++O)Y=E[O],B=Gt(Y,this),B=[B,this.__zoom.invert(B),Y.identifier],L.touch0?!L.touch1&&L.touch0[2]!==B[2]&&(L.touch1=B,L.taps=0):(L.touch0=B,C=!0,L.taps=1+!!h);h&&(h=clearTimeout(h)),C&&(L.taps<2&&(g=B[0],h=setTimeout(function(){h=null},w)),vn(this),L.start())}}function te(y,...A){if(this.__zooming){var E=V(this,A).event(y),R=y.changedTouches,L=R.length,C,O,Y,B;for(to(y),C=0;C<L;++C)O=R[C],Y=Gt(O,this),E.touch0&&E.touch0[2]===O.identifier?E.touch0[0]=Y:E.touch1&&E.touch1[2]===O.identifier&&(E.touch1[0]=Y);if(O=E.that.__zoom,E.touch1){var re=E.touch0[0],oe=E.touch0[1],we=E.touch1[0],ke=E.touch1[1],Re=(Re=we[0]-re[0])*Re+(Re=we[1]-re[1])*Re,We=(We=ke[0]-oe[0])*We+(We=ke[1]-oe[1])*We;O=k(O,Math.sqrt(Re/We)),Y=[(re[0]+we[0])/2,(re[1]+we[1])/2],B=[(oe[0]+ke[0])/2,(oe[1]+ke[1])/2]}else if(E.touch0)Y=E.touch0[0],B=E.touch0[1];else return;E.zoom("touch",n(I(O,Y,B),E.extent,i))}}function W(y,...A){if(this.__zooming){var E=V(this,A).event(y),R=y.changedTouches,L=R.length,C,O;for(ls(y),v&&clearTimeout(v),v=setTimeout(function(){v=null},w),C=0;C<L;++C)O=R[C],E.touch0&&E.touch0[2]===O.identifier?delete E.touch0:E.touch1&&E.touch1[2]===O.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&&(O=Gt(O,this),Math.hypot(g[0]-O[0],g[1]-O[1])<P)){var Y=kt(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return S.wheelDelta=function(y){return arguments.length?(r=typeof y=="function"?y:qo(+y),S):r},S.filter=function(y){return arguments.length?(e=typeof y=="function"?y:qo(!!y),S):e},S.touchable=function(y){return arguments.length?(o=typeof y=="function"?y:qo(!!y),S):o},S.extent=function(y){return arguments.length?(t=typeof y=="function"?y:qo([[+y[0][0],+y[0][1]],[+y[1][0],+y[1][1]]]),S):t},S.scaleExtent=function(y){return arguments.length?(s[0]=+y[0],s[1]=+y[1],S):[s[0],s[1]]},S.translateExtent=function(y){return arguments.length?(i[0][0]=+y[0][0],i[1][0]=+y[1][0],i[0][1]=+y[0][1],i[1][1]=+y[1][1],S):[[i[0][0],i[0][1]],[i[1][0],i[1][1]]]},S.constrain=function(y){return arguments.length?(n=y,S):n},S.duration=function(y){return arguments.length?(c=+y,S):c},S.interpolate=function(y){return arguments.length?(l=y,S):l},S.on=function(){var y=d.on.apply(d,arguments);return y===d?S:y},S.clickDistance=function(y){return arguments.length?(_=(y=+y)*y,S):Math.sqrt(_)},S.tapDistance=function(y){return arguments.length?(P=+y,S):P},S}var Qo=e=>()=>e;function fs(e,{sourceEvent:t,subject:n,target:r,identifier:o,active:s,x:i,y:c,dx:l,dy:d,dispatch:h}){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:o,enumerable:!0,configurable:!0},active:{value:s,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:d,enumerable:!0,configurable:!0},_:{value:h}})}fs.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function dl(e){return!e.ctrlKey&&!e.button}function hl(){return this.parentNode}function pl(e,t){return t==null?{x:e.x,y:e.y}:t}function ml(){return navigator.maxTouchPoints||"ontouchstart"in this}function gl(){var e=dl,t=hl,n=pl,r=ml,o={},s=pt("start","drag","end"),i=0,c,l,d,h,g=0;function v(N){N.on("mousedown.drag",w).filter(r).on("touchstart.drag",P).on("touchmove.drag",S,Fi).on("touchend.drag touchcancel.drag",k).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(N,$){if(!(h||!e.call(this,N,$))){var V=I(this,t.call(this,N,$),N,$,"mouse");V&&(kt(N.view).on("mousemove.drag",M,Pn).on("mouseup.drag",_,Pn),xn(N.view),Br(N),d=!1,c=N.clientX,l=N.clientY,V("start",N))}}function M(N){if(an(N),!d){var $=N.clientX-c,V=N.clientY-l;d=$*$+V*V>g}o.mouse("drag",N)}function _(N){kt(N.view).on("mousemove.drag mouseup.drag",null),Io(N.view,d),an(N),o.mouse("end",N)}function P(N,$){if(e.call(this,N,$)){var V=N.changedTouches,J=t.call(this,N,$),q=V.length,F,K;for(F=0;F<q;++F)(K=I(this,J,N,$,V[F].identifier,V[F]))&&(Br(N),K("start",N,V[F]))}}function S(N){var $=N.changedTouches,V=$.length,J,q;for(J=0;J<V;++J)(q=o[$[J].identifier])&&(an(N),q("drag",N,$[J]))}function k(N){var $=N.changedTouches,V=$.length,J,q;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),J=0;J<V;++J)(q=o[$[J].identifier])&&(Br(N),q("end",N,$[J]))}function I(N,$,V,J,q,F){var K=s.copy(),U=Gt(F||V,$),te,W,y;if((y=n.call(N,new fs("beforestart",{sourceEvent:V,target:v,identifier:q,active:i,x:U[0],y:U[1],dx:0,dy:0,dispatch:K}),J))!=null)return te=y.x-U[0]||0,W=y.y-U[1]||0,function A(E,R,L){var C=U,O;switch(E){case"start":o[q]=A,O=i++;break;case"end":delete o[q],--i;case"drag":U=Gt(L||R,$),O=i;break}K.call(E,N,new fs(E,{sourceEvent:R,subject:y,target:v,identifier:q,active:O,x:U[0]+te,y:U[1]+W,dx:U[0]-C[0],dy:U[1]-C[1],dispatch:K}),J)}}return v.filter=function(N){return arguments.length?(e=typeof N=="function"?N:Qo(!!N),v):e},v.container=function(N){return arguments.length?(t=typeof N=="function"?N:Qo(N),v):t},v.subject=function(N){return arguments.length?(n=typeof N=="function"?N:Qo(N),v):n},v.touchable=function(N){return arguments.length?(r=typeof N=="function"?N:Qo(!!N),v):r},v.on=function(){var N=s.on.apply(s,arguments);return N===s?v:N},v.clickDistance=function(N){return arguments.length?(g=(N=+N)*N,v):Math.sqrt(g)},v}var Kd=ee(73935);const Jo=(0,m.createContext)(null),yl=Jo.Provider,Bt={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=>`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.`},Ta=Bt.error001();function Ke(e,t){const n=(0,m.useContext)(Jo);if(n===null)throw new Error(Ta);return Ie(n,e,t)}const dt=()=>{const e=(0,m.useContext)(Jo);if(e===null)throw new Error(Ta);return(0,m.useMemo)(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe,destroy:e.destroy}),[e])},xl=e=>e.userSelectionActive?"none":"all";function vl(s){var i=s,{position:e,children:t,className:n,style:r}=i,o=Pr(i,["position","children","className","style"]);const c=Ke(xl),l=`${e}`.split("-");return m.createElement("div",ce({className:ne(["react-flow__panel",n,...l]),style:st(ce({},r),{pointerEvents:c})},o),t)}function wl({proOptions:e,position:t="bottom-right"}){return e!=null&&e.hideAttribution?null:m.createElement(vl,{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 bl=g=>{var v=g,{x:e,y:t,label:n,labelStyle:r={},labelShowBg:o=!0,labelBgStyle:s={},labelBgPadding:i=[2,4],labelBgBorderRadius:c=2,children:l,className:d}=v,h=Pr(v,["x","y","label","labelStyle","labelShowBg","labelBgStyle","labelBgPadding","labelBgBorderRadius","children","className"]);const w=(0,m.useRef)(null),[M,_]=(0,m.useState)({x:0,y:0,width:0,height:0}),P=ne(["react-flow__edge-textwrapper",d]);return(0,m.useEffect)(()=>{if(w.current){const S=w.current.getBBox();_({x:S.x,y:S.y,width:S.width,height:S.height})}},[n]),typeof n=="undefined"||!n?null:m.createElement("g",ce({transform:`translate(${e-M.width/2} ${t-M.height/2})`,className:P,visibility:M.width?"visible":"hidden"},h),o&&m.createElement("rect",{width:M.width+2*i[0],x:-i[0],y:-i[1],height:M.height+2*i[1],className:"react-flow__edge-textbg",style:s,rx:c,ry:c}),m.createElement("text",{className:"react-flow__edge-text",y:M.height/2,dy:"0.3em",ref:w,style:r},n),l)};var Sl=(0,m.memo)(bl);const ds=e=>({width:e.offsetWidth,height:e.offsetHeight}),xr=(e,t=0,n=1)=>Math.min(Math.max(e,t),n),hs=(e={x:0,y:0},t)=>({x:xr(e.x,t[0][0],t[1][0]),y:xr(e.y,t[0][1],t[1][1])}),Aa=(e,t,n)=>e<t?xr(Math.abs(e-t),1,50)/50:e>n?-xr(Math.abs(e-n),1,50)/50:0,ka=(e,t)=>{const n=Aa(e.x,35,t.width-35)*20,r=Aa(e.y,35,t.height-35)*20;return[n,r]},Pa=e=>{var t;return((t=e.getRootNode)==null?void 0:t.call(e))||(window==null?void 0:window.document)},Ia=(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)}),no=({x:e,y:t,width:n,height:r})=>({x:e,y:t,x2:e+n,y2:t+r}),Ra=({x:e,y:t,x2:n,y2:r})=>({x:e,y:t,width:n-e,height:r-t}),$a=e=>st(ce({},e.positionAbsolute||{x:0,y:0}),{width:e.width||0,height:e.height||0}),Zd=(e,t)=>Ra(Ia(no(e),no(t))),ps=(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)},_l=e=>Vt(e.width)&&Vt(e.height)&&Vt(e.x)&&Vt(e.y),Vt=e=>!isNaN(e)&&isFinite(e),tt=Symbol.for("internals"),Oa=["Enter"," ","Escape"],ei=(e,t)=>{},El=e=>"nativeEvent"in e;function ms(e){var o,s;const t=El(e)?e.nativeEvent:e,n=((s=(o=t.composedPath)==null?void 0:o.call(t))==null?void 0:s[0])||e.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const Da=e=>"clientX"in e,En=(e,t)=>{var s,i,c,l;const n=Da(e),r=n?e.clientX:(s=e.touches)==null?void 0:s[0].clientX,o=n?e.clientY:(i=e.touches)==null?void 0:i[0].clientY;return{x:r-((c=t==null?void 0:t.left)!=null?c:0),y:o-((l=t==null?void 0:t.top)!=null?l:0)}},ti=()=>{var e;return typeof navigator!="undefined"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0},ro=({id:e,path:t,labelX:n,labelY:r,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:c,labelBgPadding:l,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:v,interactionWidth:w=20})=>m.createElement(m.Fragment,null,m.createElement("path",{id:e,style:h,d:t,fill:"none",className:"react-flow__edge-path",markerEnd:g,markerStart:v}),w&&m.createElement("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:w,className:"react-flow__edge-interaction"}),o&&Vt(n)&&Vt(r)?m.createElement(Sl,{x:n,y:r,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:c,labelBgPadding:l,labelBgBorderRadius:d}):null);ro.displayName="BaseEdge";const qd=(e,t)=>typeof t!="undefined"&&t?`url(#${t})`:typeof e!="undefined"?`url(#react-flow__${e})`:"none";function oo(e,t,n){return n===void 0?n:r=>{const o=t().edges.find(s=>s.id===e);o&&n(r,ce({},o))}}function za({sourceX:e,sourceY:t,targetX:n,targetY:r}){const o=Math.abs(n-e)/2,s=n<e?n+o:n-o,i=Math.abs(r-t)/2,c=r<t?r+i:r-i;return[s,c,o,i]}function La({sourceX:e,sourceY:t,targetX:n,targetY:r,sourceControlX:o,sourceControlY:s,targetControlX:i,targetControlY:c}){const l=e*.125+o*.375+i*.375+n*.125,d=t*.125+s*.375+c*.375+r*.125,h=Math.abs(l-e),g=Math.abs(d-t);return[l,d,h,g]}var Hn;(function(e){e.Strict="strict",e.Loose="loose"})(Hn||(Hn={}));var Fn;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(Fn||(Fn={}));var io;(function(e){e.Partial="partial",e.Full="full"})(io||(io={}));var Cn;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(Cn||(Cn={}));var ni;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(ni||(ni={}));var fe;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(fe||(fe={}));function Ha({pos:e,x1:t,y1:n,x2:r,y2:o}){return e===fe.Left||e===fe.Right?[.5*(t+r),n]:[t,.5*(n+o)]}function Fa({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:r,targetY:o,targetPosition:s=fe.Top}){const[i,c]=Ha({pos:n,x1:e,y1:t,x2:r,y2:o}),[l,d]=Ha({pos:s,x1:r,y1:o,x2:e,y2:t}),[h,g,v,w]=La({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:i,sourceControlY:c,targetControlX:l,targetControlY:d});return[`M${e},${t} C${i},${c} ${l},${d} ${r},${o}`,h,g,v,w]}const gs=(0,m.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=fe.Bottom,targetPosition:s=fe.Top,label:i,labelStyle:c,labelShowBg:l,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:M,interactionWidth:_})=>{const[P,S,k]=Fa({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s});return m.createElement(ro,{path:P,labelX:S,labelY:k,label:i,labelStyle:c,labelShowBg:l,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:M,interactionWidth:_})});gs.displayName="SimpleBezierEdge";const Ba={[fe.Left]:{x:-1,y:0},[fe.Right]:{x:1,y:0},[fe.Top]:{x:0,y:-1},[fe.Bottom]:{x:0,y:1}},Cl=({source:e,sourcePosition:t=fe.Bottom,target:n})=>t===fe.Left||t===fe.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},Va=(e,t)=>Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2));function Nl({source:e,sourcePosition:t=fe.Bottom,target:n,targetPosition:r=fe.Top,center:o,offset:s}){var J,q;const i=Ba[t],c=Ba[r],l={x:e.x+i.x*s,y:e.y+i.y*s},d={x:n.x+c.x*s,y:n.y+c.y*s},h=Cl({source:l,sourcePosition:t,target:d}),g=h.x!==0?"x":"y",v=h[g];let w=[],M,_;const P={x:0,y:0},S={x:0,y:0},[k,I,N,$]=za({sourceX:e.x,sourceY:e.y,targetX:n.x,targetY:n.y});if(i[g]*c[g]===-1){M=(J=o.x)!=null?J:k,_=(q=o.y)!=null?q:I;const F=[{x:M,y:l.y},{x:M,y:d.y}],K=[{x:l.x,y:_},{x:d.x,y:_}];i[g]===v?w=g==="x"?F:K:w=g==="x"?K:F}else{const F=[{x:l.x,y:d.y}],K=[{x:d.x,y:l.y}];if(g==="x"?w=i.x===v?K:F:w=i.y===v?F:K,t===r){const A=Math.abs(e[g]-n[g]);if(A<=s){const E=Math.min(s-1,s-A);i[g]===v?P[g]=(l[g]>e[g]?-1:1)*E:S[g]=(d[g]>n[g]?-1:1)*E}}if(t!==r){const A=g==="x"?"y":"x",E=i[g]===c[A],R=l[A]>d[A],L=l[A]<d[A];(i[g]===1&&(!E&&R||E&&L)||i[g]!==1&&(!E&&L||E&&R))&&(w=g==="x"?F:K)}const U={x:l.x+P.x,y:l.y+P.y},te={x:d.x+S.x,y:d.y+S.y},W=Math.max(Math.abs(U.x-w[0].x),Math.abs(te.x-w[0].x)),y=Math.max(Math.abs(U.y-w[0].y),Math.abs(te.y-w[0].y));W>=y?(M=(U.x+te.x)/2,_=w[0].y):(M=w[0].x,_=(U.y+te.y)/2)}return[[e,{x:l.x+P.x,y:l.y+P.y},...w,{x:d.x+S.x,y:d.y+S.y},n],M,_,N,$]}function Ml(e,t,n,r){const o=Math.min(Va(e,t)/2,Va(t,n)/2,r),{x:s,y:i}=t;if(e.x===s&&s===n.x||e.y===i&&i===n.y)return`L${s} ${i}`;if(e.y===i){const d=e.x<n.x?-1:1,h=e.y<n.y?1:-1;return`L ${s+o*d},${i}Q ${s},${i} ${s},${i+o*h}`}const c=e.x<n.x?1:-1,l=e.y<n.y?-1:1;return`L ${s},${i+o*l}Q ${s},${i} ${s+o*c},${i}`}function ys({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:r,targetY:o,targetPosition:s=fe.Top,borderRadius:i=5,centerX:c,centerY:l,offset:d=20}){const[h,g,v,w,M]=Nl({source:{x:e,y:t},sourcePosition:n,target:{x:r,y:o},targetPosition:s,center:{x:c,y:l},offset:d});return[h.reduce((P,S,k)=>{let I="";return k>0&&k<h.length-1?I=Ml(h[k-1],S,h[k+1],i):I=`${k===0?"M":"L"}${S.x} ${S.y}`,P+=I,P},""),g,v,w,M]}const ri=(0,m.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:c,labelBgPadding:l,labelBgBorderRadius:d,style:h,sourcePosition:g=fe.Bottom,targetPosition:v=fe.Top,markerEnd:w,markerStart:M,pathOptions:_,interactionWidth:P})=>{const[S,k,I]=ys({sourceX:e,sourceY:t,sourcePosition:g,targetX:n,targetY:r,targetPosition:v,borderRadius:_==null?void 0:_.borderRadius,offset:_==null?void 0:_.offset});return m.createElement(ro,{path:S,labelX:k,labelY:I,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:c,labelBgPadding:l,labelBgBorderRadius:d,style:h,markerEnd:w,markerStart:M,interactionWidth:P})});ri.displayName="SmoothStepEdge";const xs=(0,m.memo)(e=>{var t;return m.createElement(ri,st(ce({},e),{pathOptions:(0,m.useMemo)(()=>{var n;return{borderRadius:0,offset:(n=e.pathOptions)==null?void 0:n.offset}},[(t=e.pathOptions)==null?void 0:t.offset])}))});xs.displayName="StepEdge";function Tl({sourceX:e,sourceY:t,targetX:n,targetY:r}){const[o,s,i,c]=za({sourceX:e,sourceY:t,targetX:n,targetY:r});return[`M ${e},${t}L ${n},${r}`,o,s,i,c]}const vs=(0,m.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:c,labelBgPadding:l,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:v,interactionWidth:w})=>{const[M,_,P]=Tl({sourceX:e,sourceY:t,targetX:n,targetY:r});return m.createElement(ro,{path:M,labelX:_,labelY:P,label:o,labelStyle:s,labelShowBg:i,labelBgStyle:c,labelBgPadding:l,labelBgBorderRadius:d,style:h,markerEnd:g,markerStart:v,interactionWidth:w})});vs.displayName="StraightEdge";function oi(e,t){return e>=0?.5*e:t*25*Math.sqrt(-e)}function Ya({pos:e,x1:t,y1:n,x2:r,y2:o,c:s}){switch(e){case fe.Left:return[t-oi(t-r,s),n];case fe.Right:return[t+oi(r-t,s),n];case fe.Top:return[t,n-oi(n-o,s)];case fe.Bottom:return[t,n+oi(o-n,s)]}}function Xa({sourceX:e,sourceY:t,sourcePosition:n=fe.Bottom,targetX:r,targetY:o,targetPosition:s=fe.Top,curvature:i=.25}){const[c,l]=Ya({pos:n,x1:e,y1:t,x2:r,y2:o,c:i}),[d,h]=Ya({pos:s,x1:r,y1:o,x2:e,y2:t,c:i}),[g,v,w,M]=La({sourceX:e,sourceY:t,targetX:r,targetY:o,sourceControlX:c,sourceControlY:l,targetControlX:d,targetControlY:h});return[`M${e},${t} C${c},${l} ${d},${h} ${r},${o}`,g,v,w,M]}const ii=(0,m.memo)(({sourceX:e,sourceY:t,targetX:n,targetY:r,sourcePosition:o=fe.Bottom,targetPosition:s=fe.Top,label:i,labelStyle:c,labelShowBg:l,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:M,pathOptions:_,interactionWidth:P})=>{const[S,k,I]=Xa({sourceX:e,sourceY:t,sourcePosition:o,targetX:n,targetY:r,targetPosition:s,curvature:_==null?void 0:_.curvature});return m.createElement(ro,{path:S,labelX:k,labelY:I,label:i,labelStyle:c,labelShowBg:l,labelBgStyle:d,labelBgPadding:h,labelBgBorderRadius:g,style:v,markerEnd:w,markerStart:M,interactionWidth:P})});ii.displayName="BezierEdge";const ws=(0,m.createContext)(null),Al=ws.Provider;ws.Consumer;const kl=()=>(0,m.useContext)(ws),Pl=e=>"id"in e&&"source"in e&&"target"in e,Ga=e=>"id"in e&&!("source"in e)&&!("target"in e),Qd=(e,t,n)=>{if(!Ga(e))return[];const r=n.filter(o=>o.source===e.id).map(o=>o.target);return t.filter(o=>r.includes(o.id))},Jd=(e,t,n)=>{if(!Ga(e))return[];const r=n.filter(o=>o.target===e.id).map(o=>o.source);return t.filter(o=>r.includes(o.id))},Wa=({source:e,sourceHandle:t,target:n,targetHandle:r})=>`reactflow__edge-${e}${t||""}-${n}${r||""}`,bs=(e,t)=>typeof e=="undefined"?"":typeof e=="string"?e:`${t?`${t}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`,Il=(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)),Rl=(e,t)=>{if(!e.source||!e.target)return ei("006",Bt.error006()),t;let n;return Pl(e)?n=ce({},e):n=st(ce({},e),{id:Wa(e)}),Il(n,t)?t:t.concat(n)},$l=(e,t,n,r={shouldReplaceId:!0})=>{const l=e,{id:o}=l,s=Pr(l,["id"]);if(!t.source||!t.target)return ei("006",Bt.error006()),n;if(!n.find(d=>d.id===o))return ei("007",Bt.error007(o)),n;const c=st(ce({},s),{id:r.shouldReplaceId?Wa(t):o,source:t.source,target:t.target,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle});return n.filter(d=>d.id!==o).concat(c)},eh=(e,t,n,r={shouldReplaceId:!0})=>(console.warn("[DEPRECATED] `updateEdge` is deprecated. Instead use `reconnectEdge` https://reactflow.dev/api-reference/utils/reconnect-edge"),$l(e,t,n,r)),Ss=({x:e,y:t},[n,r,o],s,[i,c])=>{const l={x:(e-n)/o,y:(t-r)/o};return s?{x:i*Math.round(l.x/i),y:c*Math.round(l.y/c)}:l},Ua=({x:e,y:t},[n,r,o])=>({x:e*o+n,y:t*o+r}),vr=(e,t=[0,0])=>{var s,i;if(!e)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=((s=e.width)!=null?s:0)*t[0],r=((i=e.height)!=null?i:0)*t[1],o={x:e.position.x-n,y:e.position.y-r};return st(ce({},o),{positionAbsolute:e.positionAbsolute?{x:e.positionAbsolute.x-n,y:e.positionAbsolute.y-r}:o})},si=(e,t=[0,0])=>{if(e.length===0)return{x:0,y:0,width:0,height:0};const n=e.reduce((r,o)=>{const{x:s,y:i}=vr(o,t).positionAbsolute;return Ia(r,no({x:s,y:i,width:o.width||0,height:o.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Ra(n)},th=(e,t=[0,0])=>(console.warn("[DEPRECATED] `getRectOfNodes` is deprecated. Instead use `getNodesBounds` https://reactflow.dev/api-reference/utils/get-nodes-bounds."),si(e,t)),ja=(e,t,[n,r,o]=[0,0,1],s=!1,i=!1,c=[0,0])=>{const l={x:(t.x-n)/o,y:(t.y-r)/o,width:t.width/o,height:t.height/o},d=[];return e.forEach(h=>{const{width:g,height:v,selectable:w=!0,hidden:M=!1}=h;if(i&&!w||M)return!1;const{positionAbsolute:_}=vr(h,c),P={x:_.x,y:_.y,width:g||0,height:v||0},S=ps(l,P),k=typeof g=="undefined"||typeof v=="undefined"||g===null||v===null,I=s&&S>0,N=(g||0)*(v||0);(k||I||S>=N||h.dragging)&&d.push(h)}),d},Ka=(e,t)=>{const n=e.map(r=>r.id);return t.filter(r=>n.includes(r.source)||n.includes(r.target))},nh=(e,t,n,r,o,s=.1)=>{const{x:i,y:c,zoom:l}=_s(e,t,n,r,o,s);return console.warn("[DEPRECATED] `getTransformForBounds` is deprecated. Instead use `getViewportForBounds`. Beware that the return value is type Viewport (`{ x: number, y: number, zoom: number }`) instead of Transform (`[number, number, number]`). https://reactflow.dev/api-reference/utils/get-viewport-for-bounds"),[i,c,l]},_s=(e,t,n,r,o,s=.1)=>{const i=t/(e.width*(1+s)),c=n/(e.height*(1+s)),l=Math.min(i,c),d=xr(l,r,o),h=e.x+e.width/2,g=e.y+e.height/2,v=t/2-h*d,w=n/2-g*d;return{x:v,y:w,zoom:d}},Bn=(e,t=0)=>e.transition().duration(t);function Za(e,t,n,r){return(t[n]||[]).reduce((o,s)=>{var i,c,l,d;return`${e.id}-${s.id}-${n}`!==r&&o.push({id:s.id||null,type:n,nodeId:e.id,x:((c=(i=e.positionAbsolute)==null?void 0:i.x)!=null?c:0)+s.x+s.width/2,y:((d=(l=e.positionAbsolute)==null?void 0:l.y)!=null?d:0)+s.y+s.height/2}),o},[])}function Ol(e,t,n,r,o,s){const{x:i,y:c}=En(e),d=t.elementsFromPoint(i,c).find(M=>M.classList.contains("react-flow__handle"));if(d){const M=d.getAttribute("data-nodeid");if(M){const _=Es(void 0,d),P=d.getAttribute("data-handleid"),S=s({nodeId:M,id:P,type:_});if(S){const k=o.find(I=>I.nodeId===M&&I.type===_&&I.id===P);return{handle:{id:P,type:_,nodeId:M,x:(k==null?void 0:k.x)||n.x,y:(k==null?void 0:k.y)||n.y},validHandleResult:S}}}}let h=[],g=1/0;if(o.forEach(M=>{const _=Math.sqrt(Ys(M.x-n.x,2)+Ys(M.y-n.y,2));if(_<=r){const P=s(M);_<=g&&(_<g?h=[{handle:M,validHandleResult:P}]:_===g&&h.push({handle:M,validHandleResult:P}),g=_)}}),!h.length)return{handle:null,validHandleResult:qa()};if(h.length===1)return h[0];const v=h.some(({validHandleResult:M})=>M.isValid),w=h.some(({handle:M})=>M.type==="target");return h.find(({handle:M,validHandleResult:_})=>w?M.type==="target":v?_.isValid:!0)||h[0]}const Dl={source:null,target:null,sourceHandle:null,targetHandle:null},qa=()=>({handleDomNode:null,isValid:!1,connection:Dl,endHandle:null});function Qa(e,t,n,r,o,s,i){const c=o==="target",l=i.querySelector(`.react-flow__handle[data-id="${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`),d=st(ce({},qa()),{handleDomNode:l});if(l){const h=Es(void 0,l),g=l.getAttribute("data-nodeid"),v=l.getAttribute("data-handleid"),w=l.classList.contains("connectable"),M=l.classList.contains("connectableend"),_={source:c?g:n,sourceHandle:c?v:r,target:c?n:g,targetHandle:c?r:v};d.connection=_,w&&M&&(t===Hn.Strict?c&&h==="source"||!c&&h==="target":g!==n||v!==r)&&(d.endHandle={nodeId:g,handleId:v,type:h},d.isValid=s(_))}return d}function zl({nodes:e,nodeId:t,handleId:n,handleType:r}){return e.reduce((o,s)=>{if(s[tt]){const{handleBounds:i}=s[tt];let c=[],l=[];i&&(c=Za(s,i,"source",`${t}-${n}-${r}`),l=Za(s,i,"target",`${t}-${n}-${r}`)),o.push(...c,...l)}return o},[])}function Es(e,t){return e||(t!=null&&t.classList.contains("target")?"target":t!=null&&t.classList.contains("source")?"source":null)}function Cs(e){e==null||e.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function Ll(e,t){let n=null;return t?n="valid":e&&!t&&(n="invalid"),n}function Ja({event:e,handleId:t,nodeId:n,onConnect:r,isTarget:o,getState:s,setState:i,isValidConnection:c,edgeUpdaterType:l,onReconnectEnd:d}){const h=Pa(e.target),{connectionMode:g,domNode:v,autoPanOnConnect:w,connectionRadius:M,onConnectStart:_,panBy:P,getNodes:S,cancelConnection:k}=s();let I=0,N;const{x:$,y:V}=En(e),J=h==null?void 0:h.elementFromPoint($,V),q=Es(l,J),F=v==null?void 0:v.getBoundingClientRect();if(!F||!q)return;let K,U=En(e,F),te=!1,W=null,y=!1,A=null;const E=zl({nodes:S(),nodeId:n,handleId:t,handleType:q}),R=()=>{if(!w)return;const[O,Y]=ka(U,F);P({x:O,y:Y}),I=requestAnimationFrame(R)};i({connectionPosition:U,connectionStatus:null,connectionNodeId:n,connectionHandleId:t,connectionHandleType:q,connectionStartHandle:{nodeId:n,handleId:t,type:q},connectionEndHandle:null}),_==null||_(e,{nodeId:n,handleId:t,handleType:q});function L(O){const{transform:Y}=s();U=En(O,F);const{handle:B,validHandleResult:re}=Ol(O,h,Ss(U,Y,!1,[1,1]),M,E,oe=>Qa(oe,g,n,t,o?"target":"source",c,h));if(N=B,te||(R(),te=!0),A=re.handleDomNode,W=re.connection,y=re.isValid,i({connectionPosition:N&&y?Ua({x:N.x,y:N.y},Y):U,connectionStatus:Ll(!!N,y),connectionEndHandle:re.endHandle}),!N&&!y&&!A)return Cs(K);W.source!==W.target&&A&&(Cs(K),K=A,A.classList.add("connecting","react-flow__handle-connecting"),A.classList.toggle("valid",y),A.classList.toggle("react-flow__handle-valid",y))}function C(O){var Y,B;(N||A)&&W&&y&&(r==null||r(W)),(B=(Y=s()).onConnectEnd)==null||B.call(Y,O),l&&(d==null||d(O)),Cs(K),k(),cancelAnimationFrame(I),te=!1,y=!1,W=null,A=null,h.removeEventListener("mousemove",L),h.removeEventListener("mouseup",C),h.removeEventListener("touchmove",L),h.removeEventListener("touchend",C)}h.addEventListener("mousemove",L),h.addEventListener("mouseup",C),h.addEventListener("touchmove",L),h.addEventListener("touchend",C)}const ec=()=>!0,Hl=e=>({connectionStartHandle:e.connectionStartHandle,connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName}),Fl=(e,t,n)=>r=>{const{connectionStartHandle:o,connectionEndHandle:s,connectionClickStartHandle:i}=r;return{connecting:(o==null?void 0:o.nodeId)===e&&(o==null?void 0:o.handleId)===t&&(o==null?void 0:o.type)===n||(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.handleId)===t&&(s==null?void 0:s.type)===n,clickConnecting:(i==null?void 0:i.nodeId)===e&&(i==null?void 0:i.handleId)===t&&(i==null?void 0:i.type)===n}},tc=(0,m.forwardRef)((M,w)=>{var _=M,{type:e="source",position:t=fe.Top,isValidConnection:n,isConnectable:r=!0,isConnectableStart:o=!0,isConnectableEnd:s=!0,id:i,onConnect:c,children:l,className:d,onMouseDown:h,onTouchStart:g}=_,v=Pr(_,["type","position","isValidConnection","isConnectable","isConnectableStart","isConnectableEnd","id","onConnect","children","className","onMouseDown","onTouchStart"]);var U,te;const P=i||null,S=e==="target",k=dt(),I=kl(),{connectOnClick:N,noPanClassName:$}=Ke(Hl,ue),{connecting:V,clickConnecting:J}=Ke(Fl(I,P,e),ue);I||(te=(U=k.getState()).onError)==null||te.call(U,"010",Bt.error010());const q=W=>{const{defaultEdgeOptions:y,onConnect:A,hasDefaultEdges:E}=k.getState(),R=ce(ce({},y),W);if(E){const{edges:L,setEdges:C}=k.getState();C(Rl(R,L))}A==null||A(R),c==null||c(R)},F=W=>{if(!I)return;const y=Da(W);o&&(y&&W.button===0||!y)&&Ja({event:W,handleId:P,nodeId:I,onConnect:q,isTarget:S,getState:k.getState,setState:k.setState,isValidConnection:n||k.getState().isValidConnection||ec}),y?h==null||h(W):g==null||g(W)},K=W=>{const{onClickConnectStart:y,onClickConnectEnd:A,connectionClickStartHandle:E,connectionMode:R,isValidConnection:L}=k.getState();if(!I||!E&&!o)return;if(!E){y==null||y(W,{nodeId:I,handleId:P,handleType:e}),k.setState({connectionClickStartHandle:{nodeId:I,type:e,handleId:P}});return}const C=Pa(W.target),O=n||L||ec,{connection:Y,isValid:B}=Qa({nodeId:I,id:P,type:e},R,E.nodeId,E.handleId||null,E.type,O,C);B&&q(Y),A==null||A(W),k.setState({connectionClickStartHandle:null})};return m.createElement("div",ce({"data-handleid":P,"data-nodeid":I,"data-handlepos":t,"data-id":`${I}-${P}-${e}`,className:ne(["react-flow__handle",`react-flow__handle-${t}`,"nodrag",$,d,{source:!S,target:S,connectable:r,connectablestart:o,connectableend:s,connecting:J,connectionindicator:r&&(o&&!V||s&&V)}]),onMouseDown:F,onTouchStart:F,onClick:N?K:void 0,ref:w},v),l)});tc.displayName="Handle";var ai=(0,m.memo)(tc);const nc=({data:e,isConnectable:t,targetPosition:n=fe.Top,sourcePosition:r=fe.Bottom})=>m.createElement(m.Fragment,null,m.createElement(ai,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label,m.createElement(ai,{type:"source",position:r,isConnectable:t}));nc.displayName="DefaultNode";var Ns=(0,m.memo)(nc);const rc=({data:e,isConnectable:t,sourcePosition:n=fe.Bottom})=>m.createElement(m.Fragment,null,e==null?void 0:e.label,m.createElement(ai,{type:"source",position:n,isConnectable:t}));rc.displayName="InputNode";var oc=(0,m.memo)(rc);const ic=({data:e,isConnectable:t,targetPosition:n=fe.Top})=>m.createElement(m.Fragment,null,m.createElement(ai,{type:"target",position:n,isConnectable:t}),e==null?void 0:e.label);ic.displayName="OutputNode";var sc=(0,m.memo)(ic);const Ms=()=>null;Ms.displayName="GroupNode";const Bl=e=>({selectedNodes:e.getNodes().filter(t=>t.selected),selectedEdges:e.edges.filter(t=>t.selected).map(t=>ce({},t))}),ci=e=>e.id;function Vl(e,t){return ue(e.selectedNodes.map(ci),t.selectedNodes.map(ci))&&ue(e.selectedEdges.map(ci),t.selectedEdges.map(ci))}const ac=(0,m.memo)(({onSelectionChange:e})=>{const t=dt(),{selectedNodes:n,selectedEdges:r}=Ke(Bl,Vl);return(0,m.useEffect)(()=>{const o={nodes:n,edges:r};e==null||e(o),t.getState().onSelectionChange.forEach(s=>s(o))},[n,r,e]),null});ac.displayName="SelectionListener";const Yl=e=>!!e.onSelectionChange;function Xl({onSelectionChange:e}){const t=Ke(Yl);return e||t?m.createElement(ac,{onSelectionChange:e}):null}const Gl=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 wr(e,t){(0,m.useEffect)(()=>{typeof e!="undefined"&&t(e)},[e])}function Ae(e,t,n){(0,m.useEffect)(()=>{typeof t!="undefined"&&n({[e]:t})},[t])}const Wl=({nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:o,onConnectStart:s,onConnectEnd:i,onClickConnectStart:c,onClickConnectEnd:l,nodesDraggable:d,nodesConnectable:h,nodesFocusable:g,edgesFocusable:v,edgesUpdatable:w,elevateNodesOnSelect:M,minZoom:_,maxZoom:P,nodeExtent:S,onNodesChange:k,onEdgesChange:I,elementsSelectable:N,connectionMode:$,snapGrid:V,snapToGrid:J,translateExtent:q,connectOnClick:F,defaultEdgeOptions:K,fitView:U,fitViewOptions:te,onNodesDelete:W,onEdgesDelete:y,onNodeDrag:A,onNodeDragStart:E,onNodeDragStop:R,onSelectionDrag:L,onSelectionDragStart:C,onSelectionDragStop:O,noPanClassName:Y,nodeOrigin:B,rfId:re,autoPanOnConnect:oe,autoPanOnNodeDrag:we,onError:ke,connectionRadius:Re,isValidConnection:We,nodeDragThreshold:rt})=>{const{setNodes:vt,setEdges:Tt,setDefaultNodesAndEdges:ot,setMinZoom:Zt,setMaxZoom:Yt,setTranslateExtent:it,setNodeExtent:$t,reset:Je}=Ke(Gl,ue),he=dt();return(0,m.useEffect)(()=>{const Ot=r==null?void 0:r.map(Vn=>ce(ce({},Vn),K));return ot(n,Ot),()=>{Je()}},[]),Ae("defaultEdgeOptions",K,he.setState),Ae("connectionMode",$,he.setState),Ae("onConnect",o,he.setState),Ae("onConnectStart",s,he.setState),Ae("onConnectEnd",i,he.setState),Ae("onClickConnectStart",c,he.setState),Ae("onClickConnectEnd",l,he.setState),Ae("nodesDraggable",d,he.setState),Ae("nodesConnectable",h,he.setState),Ae("nodesFocusable",g,he.setState),Ae("edgesFocusable",v,he.setState),Ae("edgesUpdatable",w,he.setState),Ae("elementsSelectable",N,he.setState),Ae("elevateNodesOnSelect",M,he.setState),Ae("snapToGrid",J,he.setState),Ae("snapGrid",V,he.setState),Ae("onNodesChange",k,he.setState),Ae("onEdgesChange",I,he.setState),Ae("connectOnClick",F,he.setState),Ae("fitViewOnInit",U,he.setState),Ae("fitViewOnInitOptions",te,he.setState),Ae("onNodesDelete",W,he.setState),Ae("onEdgesDelete",y,he.setState),Ae("onNodeDrag",A,he.setState),Ae("onNodeDragStart",E,he.setState),Ae("onNodeDragStop",R,he.setState),Ae("onSelectionDrag",L,he.setState),Ae("onSelectionDragStart",C,he.setState),Ae("onSelectionDragStop",O,he.setState),Ae("noPanClassName",Y,he.setState),Ae("nodeOrigin",B,he.setState),Ae("rfId",re,he.setState),Ae("autoPanOnConnect",oe,he.setState),Ae("autoPanOnNodeDrag",we,he.setState),Ae("onError",ke,he.setState),Ae("connectionRadius",Re,he.setState),Ae("isValidConnection",We,he.setState),Ae("nodeDragThreshold",rt,he.setState),wr(e,vt),wr(t,Tt),wr(_,Zt),wr(P,Yt),wr(q,it),wr(S,$t),null},cc={display:"none"},Ul={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},uc="react-flow__node-desc",lc="react-flow__edge-desc",jl="react-flow__aria-live",Kl=e=>e.ariaLiveMessage;function Zl({rfId:e}){const t=Ke(Kl);return m.createElement("div",{id:`${jl}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:Ul},t)}function ql({rfId:e,disableKeyboardA11y:t}){return m.createElement(m.Fragment,null,m.createElement("div",{id:`${uc}-${e}`,style:cc},"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:`${lc}-${e}`,style:cc},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!t&&m.createElement(Zl,{rfId:e}))}var so=(e=null,t={actInsideInputWithModifier:!0})=>{const[n,r]=(0,m.useState)(!1),o=(0,m.useRef)(!1),s=(0,m.useRef)(new Set([])),[i,c]=(0,m.useMemo)(()=>{if(e!==null){const d=(Array.isArray(e)?e:[e]).filter(g=>typeof g=="string").map(g=>g.split("+")),h=d.reduce((g,v)=>g.concat(...v),[]);return[d,h]}return[[],[]]},[e]);return(0,m.useEffect)(()=>{const l=typeof document!="undefined"?document:null,d=(t==null?void 0:t.target)||l;if(e!==null){const h=w=>{if(o.current=w.ctrlKey||w.metaKey||w.shiftKey,(!o.current||o.current&&!t.actInsideInputWithModifier)&&ms(w))return!1;const _=dc(w.code,c);s.current.add(w[_]),fc(i,s.current,!1)&&(w.preventDefault(),r(!0))},g=w=>{if((!o.current||o.current&&!t.actInsideInputWithModifier)&&ms(w))return!1;const _=dc(w.code,c);fc(i,s.current,!0)?(r(!1),s.current.clear()):s.current.delete(w[_]),w.key==="Meta"&&s.current.clear(),o.current=!1},v=()=>{s.current.clear(),r(!1)};return d==null||d.addEventListener("keydown",h),d==null||d.addEventListener("keyup",g),window.addEventListener("blur",v),()=>{d==null||d.removeEventListener("keydown",h),d==null||d.removeEventListener("keyup",g),window.removeEventListener("blur",v)}}},[e,r]),n};function fc(e,t,n){return e.filter(r=>n||r.length===t.size).some(r=>r.every(o=>t.has(o)))}function dc(e,t){return t.includes(e)?"code":"key"}function hc(e,t,n,r){var c,l,d,h,g,v,w,M;const o=e.parentNode||e.parentId;if(!o)return n;const s=t.get(o),i=vr(s,r);return hc(s,t,{x:((c=n.x)!=null?c:0)+i.x,y:((l=n.y)!=null?l:0)+i.y,z:((h=(d=s[tt])==null?void 0:d.z)!=null?h:0)>((g=n.z)!=null?g:0)?(w=(v=s[tt])==null?void 0:v.z)!=null?w:0:(M=n.z)!=null?M:0},r)}function pc(e,t,n){e.forEach(r=>{var s,i;const o=r.parentNode||r.parentId;if(o&&!e.has(o))throw new Error(`Parent node ${o} not found`);if(o||n!=null&&n[r.id]){const{x:c,y:l,z:d}=hc(r,e,st(ce({},r.position),{z:(i=(s=r[tt])==null?void 0:s.z)!=null?i:0}),t);r.positionAbsolute={x:c,y:l},r[tt].z=d,n!=null&&n[r.id]&&(r[tt].isParent=!0)}})}function Ts(e,t,n,r){const o=new Map,s={},i=r?1e3:0;return e.forEach(c=>{var w;const l=(Vt(c.zIndex)?c.zIndex:0)+(c.selected?i:0),d=t.get(c.id),h=st(ce({},c),{positionAbsolute:{x:c.position.x,y:c.position.y}}),g=c.parentNode||c.parentId;g&&(s[g]=!0);const v=(d==null?void 0:d.type)&&(d==null?void 0:d.type)!==c.type;Object.defineProperty(h,tt,{enumerable:!1,value:{handleBounds:v||(w=d==null?void 0:d[tt])==null?void 0:w.handleBounds,z:l}}),o.set(c.id,h)}),pc(o,n,s),o}function mc(e,t={}){var M,_,P;const{getNodes:n,width:r,height:o,minZoom:s,maxZoom:i,d3Zoom:c,d3Selection:l,fitViewOnInitDone:d,fitViewOnInit:h,nodeOrigin:g}=e(),v=t.initial&&!d&&h;if(c&&l&&(v||!t.initial)){const S=n().filter(I=>{var $;const N=t.includeHiddenNodes?I.width&&I.height:!I.hidden;return($=t.nodes)!=null&&$.length?N&&t.nodes.some(V=>V.id===I.id):N}),k=S.every(I=>I.width&&I.height);if(S.length>0&&k){const I=si(S,g),{x:N,y:$,zoom:V}=_s(I,r,o,(M=t.minZoom)!=null?M:s,(_=t.maxZoom)!=null?_:i,(P=t.padding)!=null?P:.1),J=pn.translate(N,$).scale(V);return typeof t.duration=="number"&&t.duration>0?c.transform(Bn(l,t.duration),J):c.transform(l,J),!0}}return!1}function Ql(e,t){return e.forEach(n=>{const r=t.get(n.id);r&&t.set(r.id,st(ce({},r),{[tt]:r[tt],selected:n.selected}))}),new Map(t)}function Jl(e,t){return t.map(n=>{const r=e.find(o=>o.id===n.id);return r&&(n.selected=r.selected),n})}function ui({changedNodes:e,changedEdges:t,get:n,set:r}){const{nodeInternals:o,edges:s,onNodesChange:i,onEdgesChange:c,hasDefaultNodes:l,hasDefaultEdges:d}=n();e!=null&&e.length&&(l&&r({nodeInternals:Ql(e,o)}),i==null||i(e)),t!=null&&t.length&&(d&&r({edges:Jl(t,s)}),c==null||c(t))}const br=()=>{},ef={zoomIn:br,zoomOut:br,zoomTo:br,getZoom:()=>1,setViewport:br,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:br,fitBounds:br,project:e=>e,screenToFlowPosition:e=>e,flowToScreenPosition:e=>e,viewportInitialized:!1},tf=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection}),nf=()=>{const e=dt(),{d3Zoom:t,d3Selection:n}=Ke(tf,ue);return(0,m.useMemo)(()=>n&&t?{zoomIn:o=>t.scaleBy(Bn(n,o==null?void 0:o.duration),1.2),zoomOut:o=>t.scaleBy(Bn(n,o==null?void 0:o.duration),1/1.2),zoomTo:(o,s)=>t.scaleTo(Bn(n,s==null?void 0:s.duration),o),getZoom:()=>e.getState().transform[2],setViewport:(o,s)=>{var h,g,v;const[i,c,l]=e.getState().transform,d=pn.translate((h=o.x)!=null?h:i,(g=o.y)!=null?g:c).scale((v=o.zoom)!=null?v:l);t.transform(Bn(n,s==null?void 0:s.duration),d)},getViewport:()=>{const[o,s,i]=e.getState().transform;return{x:o,y:s,zoom:i}},fitView:o=>mc(e.getState,o),setCenter:(o,s,i)=>{const{width:c,height:l,maxZoom:d}=e.getState(),h=typeof(i==null?void 0:i.zoom)!="undefined"?i.zoom:d,g=c/2-o*h,v=l/2-s*h,w=pn.translate(g,v).scale(h);t.transform(Bn(n,i==null?void 0:i.duration),w)},fitBounds:(o,s)=>{var M;const{width:i,height:c,minZoom:l,maxZoom:d}=e.getState(),{x:h,y:g,zoom:v}=_s(o,i,c,l,d,(M=s==null?void 0:s.padding)!=null?M:.1),w=pn.translate(h,g).scale(v);t.transform(Bn(n,s==null?void 0:s.duration),w)},project:o=>{const{transform:s,snapToGrid:i,snapGrid:c}=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"),Ss(o,s,i,c)},screenToFlowPosition:o=>{const{transform:s,snapToGrid:i,snapGrid:c,domNode:l}=e.getState();if(!l)return o;const{x:d,y:h}=l.getBoundingClientRect(),g={x:o.x-d,y:o.y-h};return Ss(g,s,i,c)},flowToScreenPosition:o=>{const{transform:s,domNode:i}=e.getState();if(!i)return o;const{x:c,y:l}=i.getBoundingClientRect(),d=Ua(o,s);return{x:d.x+c,y:d.y+l}},viewportInitialized:!0}:ef,[t,n])};function gc(){const e=nf(),t=dt(),n=(0,m.useCallback)(()=>t.getState().getNodes().map(_=>ce({},_)),[]),r=(0,m.useCallback)(_=>t.getState().nodeInternals.get(_),[]),o=(0,m.useCallback)(()=>{const{edges:_=[]}=t.getState();return _.map(P=>ce({},P))},[]),s=(0,m.useCallback)(_=>{const{edges:P=[]}=t.getState();return P.find(S=>S.id===_)},[]),i=(0,m.useCallback)(_=>{const{getNodes:P,setNodes:S,hasDefaultNodes:k,onNodesChange:I}=t.getState(),N=P(),$=typeof _=="function"?_(N):_;if(k)S($);else if(I){const V=$.length===0?N.map(J=>({type:"remove",id:J.id})):$.map(J=>({item:J,type:"reset"}));I(V)}},[]),c=(0,m.useCallback)(_=>{const{edges:P=[],setEdges:S,hasDefaultEdges:k,onEdgesChange:I}=t.getState(),N=typeof _=="function"?_(P):_;if(k)S(N);else if(I){const $=N.length===0?P.map(V=>({type:"remove",id:V.id})):N.map(V=>({item:V,type:"reset"}));I($)}},[]),l=(0,m.useCallback)(_=>{const P=Array.isArray(_)?_:[_],{getNodes:S,setNodes:k,hasDefaultNodes:I,onNodesChange:N}=t.getState();if(I){const V=[...S(),...P];k(V)}else if(N){const $=P.map(V=>({item:V,type:"add"}));N($)}},[]),d=(0,m.useCallback)(_=>{const P=Array.isArray(_)?_:[_],{edges:S=[],setEdges:k,hasDefaultEdges:I,onEdgesChange:N}=t.getState();if(I)k([...S,...P]);else if(N){const $=P.map(V=>({item:V,type:"add"}));N($)}},[]),h=(0,m.useCallback)(()=>{const{getNodes:_,edges:P=[],transform:S}=t.getState(),[k,I,N]=S;return{nodes:_().map($=>ce({},$)),edges:P.map($=>ce({},$)),viewport:{x:k,y:I,zoom:N}}},[]),g=(0,m.useCallback)(({nodes:_,edges:P})=>{const{nodeInternals:S,getNodes:k,edges:I,hasDefaultNodes:N,hasDefaultEdges:$,onNodesDelete:V,onEdgesDelete:J,onNodesChange:q,onEdgesChange:F}=t.getState(),K=(_||[]).map(A=>A.id),U=(P||[]).map(A=>A.id),te=k().reduce((A,E)=>{const R=E.parentNode||E.parentId,L=!K.includes(E.id)&&R&&A.find(O=>O.id===R);return(typeof E.deletable=="boolean"?E.deletable:!0)&&(K.includes(E.id)||L)&&A.push(E),A},[]),W=I.filter(A=>typeof A.deletable=="boolean"?A.deletable:!0),y=W.filter(A=>U.includes(A.id));if(te||y){const A=Ka(te,W),E=[...y,...A],R=E.reduce((L,C)=>(L.includes(C.id)||L.push(C.id),L),[]);if(($||N)&&($&&t.setState({edges:I.filter(L=>!R.includes(L.id))}),N&&(te.forEach(L=>{S.delete(L.id)}),t.setState({nodeInternals:new Map(S)}))),R.length>0&&(J==null||J(E),F&&F(R.map(L=>({id:L,type:"remove"})))),te.length>0&&(V==null||V(te),q)){const L=te.map(C=>({id:C.id,type:"remove"}));q(L)}}},[]),v=(0,m.useCallback)(_=>{const P=_l(_),S=P?null:t.getState().nodeInternals.get(_.id);return!P&&!S?[null,null,P]:[P?_:$a(S),S,P]},[]),w=(0,m.useCallback)((_,P=!0,S)=>{const[k,I,N]=v(_);return k?(S||t.getState().getNodes()).filter($=>{if(!N&&($.id===I.id||!$.positionAbsolute))return!1;const V=$a($),J=ps(V,k);return P&&J>0||J>=k.width*k.height}):[]},[]),M=(0,m.useCallback)((_,P,S=!0)=>{const[k]=v(_);if(!k)return!1;const I=ps(k,P);return S&&I>0||I>=k.width*k.height},[]);return(0,m.useMemo)(()=>st(ce({},e),{getNodes:n,getNode:r,getEdges:o,getEdge:s,setNodes:i,setEdges:c,addNodes:l,addEdges:d,toObject:h,deleteElements:g,getIntersectingNodes:w,isNodeIntersecting:M}),[e,n,r,o,s,i,c,l,d,h,g,w,M])}const rf={actInsideInputWithModifier:!1};var of=({deleteKeyCode:e,multiSelectionKeyCode:t})=>{const n=dt(),{deleteElements:r}=gc(),o=so(e,rf),s=so(t);(0,m.useEffect)(()=>{if(o){const{edges:i,getNodes:c}=n.getState(),l=c().filter(h=>h.selected),d=i.filter(h=>h.selected);r({nodes:l,edges:d}),n.setState({nodesSelectionActive:!1})}},[o]),(0,m.useEffect)(()=>{n.setState({multiSelectionActive:s})},[s])};function sf(e){const t=dt();(0,m.useEffect)(()=>{let n;const r=()=>{var s,i;if(!e.current)return;const o=ds(e.current);(o.height===0||o.width===0)&&((i=(s=t.getState()).onError)==null||i.call(s,"004",Bt.error004())),t.setState({width:o.width||500,height:o.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 As={position:"absolute",width:"100%",height:"100%",top:0,left:0},af=(e,t)=>e.x!==t.x||e.y!==t.y||e.zoom!==t.k,li=e=>({x:e.x,y:e.y,zoom:e.k}),Sr=(e,t)=>e.target.closest(`.${t}`),yc=(e,t)=>t===2&&Array.isArray(e)&&e.includes(2),xc=e=>{const t=e.ctrlKey&&ti()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*t},cf=e=>({d3Zoom:e.d3Zoom,d3Selection:e.d3Selection,d3ZoomHandler:e.d3ZoomHandler,userSelectionActive:e.userSelectionActive}),uf=({onMove:e,onMoveStart:t,onMoveEnd:n,onPaneContextMenu:r,zoomOnScroll:o=!0,zoomOnPinch:s=!0,panOnScroll:i=!1,panOnScrollSpeed:c=.5,panOnScrollMode:l=Fn.Free,zoomOnDoubleClick:d=!0,elementsSelectable:h,panOnDrag:g=!0,defaultViewport:v,translateExtent:w,minZoom:M,maxZoom:_,zoomActivationKeyCode:P,preventScrolling:S=!0,children:k,noWheelClassName:I,noPanClassName:N})=>{const $=(0,m.useRef)(),V=dt(),J=(0,m.useRef)(!1),q=(0,m.useRef)(!1),F=(0,m.useRef)(null),K=(0,m.useRef)({x:0,y:0,zoom:0}),{d3Zoom:U,d3Selection:te,d3ZoomHandler:W,userSelectionActive:y}=Ke(cf,ue),A=so(P),E=(0,m.useRef)(0),R=(0,m.useRef)(!1),L=(0,m.useRef)();return sf(F),(0,m.useEffect)(()=>{if(F.current){const C=F.current.getBoundingClientRect(),O=fl().scaleExtent([M,_]).translateExtent(w),Y=kt(F.current).call(O),B=pn.translate(v.x,v.y).scale(xr(v.zoom,M,_)),re=[[0,0],[C.width,C.height]],oe=O.constrain()(B,re,w);O.transform(Y,oe),O.wheelDelta(xc),V.setState({d3Zoom:O,d3Selection:Y,d3ZoomHandler:Y.on("wheel.zoom"),transform:[oe.x,oe.y,oe.k],domNode:F.current.closest(".react-flow")})}},[]),(0,m.useEffect)(()=>{te&&U&&(i&&!A&&!y?te.on("wheel.zoom",C=>{if(Sr(C,I))return!1;C.preventDefault(),C.stopImmediatePropagation();const O=te.property("__zoom").k||1;if(C.ctrlKey&&s){const We=Gt(C),rt=xc(C),vt=O*Math.pow(2,rt);U.scaleTo(te,vt,We,C);return}const Y=C.deltaMode===1?20:1;let B=l===Fn.Vertical?0:C.deltaX*Y,re=l===Fn.Horizontal?0:C.deltaY*Y;!ti()&&C.shiftKey&&l!==Fn.Vertical&&(B=C.deltaY*Y,re=0),U.translateBy(te,-(B/O)*c,-(re/O)*c,{internal:!0});const oe=li(te.property("__zoom")),{onViewportChangeStart:we,onViewportChange:ke,onViewportChangeEnd:Re}=V.getState();clearTimeout(L.current),R.current||(R.current=!0,t==null||t(C,oe),we==null||we(oe)),R.current&&(e==null||e(C,oe),ke==null||ke(oe),L.current=setTimeout(()=>{n==null||n(C,oe),Re==null||Re(oe),R.current=!1},150))},{passive:!1}):typeof W!="undefined"&&te.on("wheel.zoom",function(C,O){if(!S&&C.type==="wheel"&&!C.ctrlKey||Sr(C,I))return null;C.preventDefault(),W.call(this,C,O)},{passive:!1}))},[y,i,l,te,U,W,A,s,S,I,t,e,n]),(0,m.useEffect)(()=>{U&&U.on("start",C=>{var B,re;if(!C.sourceEvent||C.sourceEvent.internal)return null;E.current=(B=C.sourceEvent)==null?void 0:B.button;const{onViewportChangeStart:O}=V.getState(),Y=li(C.transform);J.current=!0,K.current=Y,((re=C.sourceEvent)==null?void 0:re.type)==="mousedown"&&V.setState({paneDragging:!0}),O==null||O(Y),t==null||t(C.sourceEvent,Y)})},[U,t]),(0,m.useEffect)(()=>{U&&(y&&!J.current?U.on("zoom",null):y||U.on("zoom",C=>{var Y,B;const{onViewportChange:O}=V.getState();if(V.setState({transform:[C.transform.x,C.transform.y,C.transform.k]}),q.current=!!(r&&yc(g,(Y=E.current)!=null?Y:0)),(e||O)&&!((B=C.sourceEvent)!=null&&B.internal)){const re=li(C.transform);O==null||O(re),e==null||e(C.sourceEvent,re)}}))},[y,U,e,g,r]),(0,m.useEffect)(()=>{U&&U.on("end",C=>{var Y;if(!C.sourceEvent||C.sourceEvent.internal)return null;const{onViewportChangeEnd:O}=V.getState();if(J.current=!1,V.setState({paneDragging:!1}),r&&yc(g,(Y=E.current)!=null?Y:0)&&!q.current&&r(C.sourceEvent),q.current=!1,(n||O)&&af(K.current,C.transform)){const B=li(C.transform);K.current=B,clearTimeout($.current),$.current=setTimeout(()=>{O==null||O(B),n==null||n(C.sourceEvent,B)},i?150:0)}})},[U,i,g,n,r]),(0,m.useEffect)(()=>{U&&U.filter(C=>{const O=A||o,Y=s&&C.ctrlKey;if((g===!0||Array.isArray(g)&&g.includes(1))&&C.button===1&&C.type==="mousedown"&&(Sr(C,"react-flow__node")||Sr(C,"react-flow__edge")))return!0;if(!g&&!O&&!i&&!d&&!s||y||!d&&C.type==="dblclick"||Sr(C,I)&&C.type==="wheel"||Sr(C,N)&&(C.type!=="wheel"||i&&C.type==="wheel"&&!A)||!s&&C.ctrlKey&&C.type==="wheel"||!O&&!i&&!Y&&C.type==="wheel"||!g&&(C.type==="mousedown"||C.type==="touchstart")||Array.isArray(g)&&!g.includes(C.button)&&C.type==="mousedown")return!1;const B=Array.isArray(g)&&g.includes(C.button)||!C.button||C.button<=1;return(!C.ctrlKey||C.type==="wheel")&&B})},[y,U,o,s,i,d,g,h,A]),m.createElement("div",{className:"react-flow__renderer",ref:F,style:As},k)},lf=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function ff(){const{userSelectionActive:e,userSelectionRect:t}=Ke(lf,ue);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 vc(e,t){var o,s;const n=t.parentNode||t.parentId,r=e.find(i=>i.id===n);if(r){const i=t.position.x+t.width-r.width,c=t.position.y+t.height-r.height;if(i>0||c>0||t.position.x<0||t.position.y<0){if(r.style=ce({},r.style)||{},r.style.width=(o=r.style.width)!=null?o:r.width,r.style.height=(s=r.style.height)!=null?s:r.height,i>0&&(r.style.width+=i),c>0&&(r.style.height+=c),t.position.x<0){const l=Math.abs(t.position.x);r.position.x=r.position.x-l,r.style.width+=l,t.position.x=0}if(t.position.y<0){const l=Math.abs(t.position.y);r.position.y=r.position.y-l,r.style.height+=l,t.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function wc(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,o)=>{const s=e.filter(c=>c.id===o.id);if(s.length===0)return r.push(o),r;const i=ce({},o);for(const c of s)if(c)switch(c.type){case"select":{i.selected=c.selected;break}case"position":{typeof c.position!="undefined"&&(i.position=c.position),typeof c.positionAbsolute!="undefined"&&(i.positionAbsolute=c.positionAbsolute),typeof c.dragging!="undefined"&&(i.dragging=c.dragging),i.expandParent&&vc(r,i);break}case"dimensions":{typeof c.dimensions!="undefined"&&(i.width=c.dimensions.width,i.height=c.dimensions.height),typeof c.updateStyle!="undefined"&&(i.style=ce(ce({},i.style||{}),c.dimensions)),typeof c.resizing=="boolean"&&(i.resizing=c.resizing),i.expandParent&&vc(r,i);break}case"remove":return r}return r.push(i),r},n)}function ks(e,t){return wc(e,t)}function df(e,t){return wc(e,t)}const Nn=(e,t)=>({id:e,type:"select",selected:t});function _r(e,t){return e.reduce((n,r)=>{const o=t.includes(r.id);return!r.selected&&o?(r.selected=!0,n.push(Nn(r.id,!0))):r.selected&&!o&&(r.selected=!1,n.push(Nn(r.id,!1))),n},[])}const Ps=(e,t)=>n=>{n.target===t.current&&(e==null||e(n))},hf=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging}),bc=(0,m.memo)(({isSelecting:e,selectionMode:t=io.Full,panOnDrag:n,onSelectionStart:r,onSelectionEnd:o,onPaneClick:s,onPaneContextMenu:i,onPaneScroll:c,onPaneMouseEnter:l,onPaneMouseMove:d,onPaneMouseLeave:h,children:g})=>{const v=(0,m.useRef)(null),w=dt(),M=(0,m.useRef)(0),_=(0,m.useRef)(0),P=(0,m.useRef)(),{userSelectionActive:S,elementsSelectable:k,dragging:I}=Ke(hf,ue),N=()=>{w.setState({userSelectionActive:!1,userSelectionRect:null}),M.current=0,_.current=0},$=W=>{s==null||s(W),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},V=W=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){W.preventDefault();return}i==null||i(W)},J=c?W=>c(W):void 0,q=W=>{const{resetSelectedElements:y,domNode:A}=w.getState();if(P.current=A==null?void 0:A.getBoundingClientRect(),!k||!e||W.button!==0||W.target!==v.current||!P.current)return;const{x:E,y:R}=En(W,P.current);y(),w.setState({userSelectionRect:{width:0,height:0,startX:E,startY:R,x:E,y:R}}),r==null||r(W)},F=W=>{var vt,Tt;const{userSelectionRect:y,nodeInternals:A,edges:E,transform:R,onNodesChange:L,onEdgesChange:C,nodeOrigin:O,getNodes:Y}=w.getState();if(!e||!P.current||!y)return;w.setState({userSelectionActive:!0,nodesSelectionActive:!1});const B=En(W,P.current),re=(vt=y.startX)!=null?vt:0,oe=(Tt=y.startY)!=null?Tt:0,we=st(ce({},y),{x:B.x<re?B.x:re,y:B.y<oe?B.y:oe,width:Math.abs(B.x-re),height:Math.abs(B.y-oe)}),ke=Y(),Re=ja(A,we,R,t===io.Partial,!0,O),We=Ka(Re,E).map(ot=>ot.id),rt=Re.map(ot=>ot.id);if(M.current!==rt.length){M.current=rt.length;const ot=_r(ke,rt);ot.length&&(L==null||L(ot))}if(_.current!==We.length){_.current=We.length;const ot=_r(E,We);ot.length&&(C==null||C(ot))}w.setState({userSelectionRect:we})},K=W=>{if(W.button!==0)return;const{userSelectionRect:y}=w.getState();!S&&y&&W.target===v.current&&($==null||$(W)),w.setState({nodesSelectionActive:M.current>0}),N(),o==null||o(W)},U=W=>{S&&(w.setState({nodesSelectionActive:M.current>0}),o==null||o(W)),N()},te=k&&(e||S);return m.createElement("div",{className:ne(["react-flow__pane",{dragging:I,selection:e}]),onClick:te?void 0:Ps($,v),onContextMenu:Ps(V,v),onWheel:Ps(J,v),onMouseEnter:te?void 0:l,onMouseDown:te?q:void 0,onMouseMove:te?F:d,onMouseUp:te?K:void 0,onMouseLeave:te?U:h,ref:v,style:As},g,m.createElement(ff,null))});bc.displayName="Pane";function Sc(e,t){const n=e.parentNode||e.parentId;if(!n)return!1;const r=t.get(n);return r?r.selected?!0:Sc(r,t):!1}function _c(e,t,n){let r=e;do{if(r!=null&&r.matches(t))return!0;if(r===n.current)return!1;r=r.parentElement}while(r);return!1}function pf(e,t,n,r){return Array.from(e.values()).filter(o=>(o.selected||o.id===r)&&(!o.parentNode||o.parentId||!Sc(o,e))&&(o.draggable||t&&typeof o.draggable=="undefined")).map(o=>{var s,i,c,l;return{id:o.id,position:o.position||{x:0,y:0},positionAbsolute:o.positionAbsolute||{x:0,y:0},distance:{x:n.x-((i=(s=o.positionAbsolute)==null?void 0:s.x)!=null?i:0),y:n.y-((l=(c=o.positionAbsolute)==null?void 0:c.y)!=null?l:0)},delta:{x:0,y:0},extent:o.extent,parentNode:o.parentNode||o.parentId,parentId:o.parentNode||o.parentId,width:o.width,height:o.height,expandParent:o.expandParent}})}function mf(e,t){return!t||t==="parent"?t:[t[0],[t[1][0]-(e.width||0),t[1][1]-(e.height||0)]]}function Ec(e,t,n,r,o=[0,0],s){const i=mf(e,e.extent||r);let c=i;const l=e.parentNode||e.parentId;if(e.extent==="parent"&&!e.expandParent)if(l&&e.width&&e.height){const g=n.get(l),{x:v,y:w}=vr(g,o).positionAbsolute;c=g&&Vt(v)&&Vt(w)&&Vt(g.width)&&Vt(g.height)?[[v+e.width*o[0],w+e.height*o[1]],[v+g.width-e.width+e.width*o[0],w+g.height-e.height+e.height*o[1]]]:c}else s==null||s("005",Bt.error005()),c=i;else if(e.extent&&l&&e.extent!=="parent"){const g=n.get(l),{x:v,y:w}=vr(g,o).positionAbsolute;c=[[e.extent[0][0]+v,e.extent[0][1]+w],[e.extent[1][0]+v,e.extent[1][1]+w]]}let d={x:0,y:0};if(l){const g=n.get(l);d=vr(g,o).positionAbsolute}const h=c&&c!=="parent"?hs(t,c):t;return{position:{x:h.x-d.x,y:h.y-d.y},positionAbsolute:h}}function Is({nodeId:e,dragItems:t,nodeInternals:n}){const r=t.map(o=>{const s=n.get(o.id);return st(ce({},s),{position:o.position,positionAbsolute:o.positionAbsolute})});return[e?r.find(o=>o.id===e):r[0],r]}const Cc=(e,t,n,r)=>{const o=t.querySelectorAll(e);if(!o||!o.length)return null;const s=Array.from(o),i=t.getBoundingClientRect(),c={x:i.width*r[0],y:i.height*r[1]};return s.map(l=>{const d=l.getBoundingClientRect();return ce({id:l.getAttribute("data-handleid"),position:l.getAttribute("data-handlepos"),x:(d.left-i.left-c.x)/n,y:(d.top-i.top-c.y)/n},ds(l))})};function ao(e,t,n){return n===void 0?n:r=>{const o=t().nodeInternals.get(e);o&&n(r,ce({},o))}}function Rs({id:e,store:t,unselect:n=!1,nodeRef:r}){const{addSelectedNodes:o,unselectNodesAndEdges:s,multiSelectionActive:i,nodeInternals:c,onError:l}=t.getState(),d=c.get(e);if(!d){l==null||l("012",Bt.error012(e));return}t.setState({nodesSelectionActive:!1}),d.selected?(n||d.selected&&i)&&(s({nodes:[d],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):o([e])}function gf(){const e=dt();return(0,m.useCallback)(({sourceEvent:n})=>{const{transform:r,snapGrid:o,snapToGrid:s}=e.getState(),i=n.touches?n.touches[0].clientX:n.clientX,c=n.touches?n.touches[0].clientY:n.clientY,l={x:(i-r[0])/r[2],y:(c-r[1])/r[2]};return ce({xSnapped:s?o[0]*Math.round(l.x/o[0]):l.x,ySnapped:s?o[1]*Math.round(l.y/o[1]):l.y},l)},[])}function $s(e){return(t,n,r)=>e==null?void 0:e(t,r)}function Nc({nodeRef:e,disabled:t=!1,noDragClassName:n,handleSelector:r,nodeId:o,isSelectable:s,selectNodesOnDrag:i}){const c=dt(),[l,d]=(0,m.useState)(!1),h=(0,m.useRef)([]),g=(0,m.useRef)({x:null,y:null}),v=(0,m.useRef)(0),w=(0,m.useRef)(null),M=(0,m.useRef)({x:0,y:0}),_=(0,m.useRef)(null),P=(0,m.useRef)(!1),S=(0,m.useRef)(!1),k=(0,m.useRef)(!1),I=gf();return(0,m.useEffect)(()=>{if(e!=null&&e.current){const N=kt(e.current),$=({x:q,y:F})=>{const{nodeInternals:K,onNodeDrag:U,onSelectionDrag:te,updateNodePositions:W,nodeExtent:y,snapGrid:A,snapToGrid:E,nodeOrigin:R,onError:L}=c.getState();g.current={x:q,y:F};let C=!1,O={x:0,y:0,x2:0,y2:0};if(h.current.length>1&&y){const B=si(h.current,R);O=no(B)}if(h.current=h.current.map(B=>{var ke,Re;const re={x:q-B.distance.x,y:F-B.distance.y};E&&(re.x=A[0]*Math.round(re.x/A[0]),re.y=A[1]*Math.round(re.y/A[1]));const oe=[[y[0][0],y[0][1]],[y[1][0],y[1][1]]];h.current.length>1&&y&&!B.extent&&(oe[0][0]=B.positionAbsolute.x-O.x+y[0][0],oe[1][0]=B.positionAbsolute.x+((ke=B.width)!=null?ke:0)-O.x2+y[1][0],oe[0][1]=B.positionAbsolute.y-O.y+y[0][1],oe[1][1]=B.positionAbsolute.y+((Re=B.height)!=null?Re:0)-O.y2+y[1][1]);const we=Ec(B,re,K,oe,R,L);return C=C||B.position.x!==we.position.x||B.position.y!==we.position.y,B.position=we.position,B.positionAbsolute=we.positionAbsolute,B}),!C)return;W(h.current,!0,!0),d(!0);const Y=o?U:$s(te);if(Y&&_.current){const[B,re]=Is({nodeId:o,dragItems:h.current,nodeInternals:K});Y(_.current,B,re)}},V=()=>{var K,U;if(!w.current)return;const[q,F]=ka(M.current,w.current);if(q!==0||F!==0){const{transform:te,panBy:W}=c.getState();g.current.x=((K=g.current.x)!=null?K:0)-q/te[2],g.current.y=((U=g.current.y)!=null?U:0)-F/te[2],W({x:q,y:F})&&$(g.current)}v.current=requestAnimationFrame(V)},J=q=>{var R;const{nodeInternals:F,multiSelectionActive:K,nodesDraggable:U,unselectNodesAndEdges:te,onNodeDragStart:W,onSelectionDragStart:y}=c.getState();S.current=!0;const A=o?W:$s(y);(!i||!s)&&!K&&o&&((R=F.get(o))!=null&&R.selected||te()),o&&s&&i&&Rs({id:o,store:c,nodeRef:e});const E=I(q);if(g.current=E,h.current=pf(F,U,E,o),A&&h.current){const[L,C]=Is({nodeId:o,dragItems:h.current,nodeInternals:F});A(q.sourceEvent,L,C)}};if(t)N.on(".drag",null);else{const q=gl().on("start",F=>{const{domNode:K,nodeDragThreshold:U}=c.getState();U===0&&J(F),k.current=!1;const te=I(F);g.current=te,w.current=(K==null?void 0:K.getBoundingClientRect())||null,M.current=En(F.sourceEvent,w.current)}).on("drag",F=>{var W,y,A,E;const K=I(F),{autoPanOnNodeDrag:U,nodeDragThreshold:te}=c.getState();if(F.sourceEvent.type==="touchmove"&&F.sourceEvent.touches.length>1&&(k.current=!0),!k.current){if(!P.current&&S.current&&U&&(P.current=!0,V()),!S.current){const R=K.xSnapped-((y=(W=g==null?void 0:g.current)==null?void 0:W.x)!=null?y:0),L=K.ySnapped-((E=(A=g==null?void 0:g.current)==null?void 0:A.y)!=null?E:0);Math.sqrt(R*R+L*L)>te&&J(F)}(g.current.x!==K.xSnapped||g.current.y!==K.ySnapped)&&h.current&&S.current&&(_.current=F.sourceEvent,M.current=En(F.sourceEvent,w.current),$(K))}}).on("end",F=>{if(!(!S.current||k.current)&&(d(!1),P.current=!1,S.current=!1,cancelAnimationFrame(v.current),h.current)){const{updateNodePositions:K,nodeInternals:U,onNodeDragStop:te,onSelectionDragStop:W}=c.getState(),y=o?te:$s(W);if(K(h.current,!1,!1),y){const[A,E]=Is({nodeId:o,dragItems:h.current,nodeInternals:U});y(F.sourceEvent,A,E)}}}).filter(F=>{const K=F.target;return!F.button&&(!n||!_c(K,`.${n}`,e))&&(!r||_c(K,r,e))});return N.call(q),()=>{N.on(".drag",null)}}}},[e,t,n,r,s,c,o,i,I]),l}function Mc(){const e=dt();return(0,m.useCallback)(n=>{const{nodeInternals:r,nodeExtent:o,updateNodePositions:s,getNodes:i,snapToGrid:c,snapGrid:l,onError:d,nodesDraggable:h}=e.getState(),g=i().filter(k=>k.selected&&(k.draggable||h&&typeof k.draggable=="undefined")),v=c?l[0]:5,w=c?l[1]:5,M=n.isShiftPressed?4:1,_=n.x*v*M,P=n.y*w*M,S=g.map(k=>{if(k.positionAbsolute){const I={x:k.positionAbsolute.x+_,y:k.positionAbsolute.y+P};c&&(I.x=l[0]*Math.round(I.x/l[0]),I.y=l[1]*Math.round(I.y/l[1]));const{positionAbsolute:N,position:$}=Ec(k,I,r,o,void 0,d);k.position=$,k.positionAbsolute=N}return k});s(S,!0,!1)},[])}const Er={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var co=e=>{const t=({id:n,type:r,data:o,xPos:s,yPos:i,xPosOrigin:c,yPosOrigin:l,selected:d,onClick:h,onMouseEnter:g,onMouseMove:v,onMouseLeave:w,onContextMenu:M,onDoubleClick:_,style:P,className:S,isDraggable:k,isSelectable:I,isConnectable:N,isFocusable:$,selectNodesOnDrag:V,sourcePosition:J,targetPosition:q,hidden:F,resizeObserver:K,dragHandle:U,zIndex:te,isParent:W,noDragClassName:y,noPanClassName:A,initialized:E,disableKeyboardA11y:R,ariaLabel:L,rfId:C,hasHandleBounds:O})=>{const Y=dt(),B=(0,m.useRef)(null),re=(0,m.useRef)(null),oe=(0,m.useRef)(J),we=(0,m.useRef)(q),ke=(0,m.useRef)(r),Re=I||k||h||g||v||w,We=Mc(),rt=ao(n,Y.getState,g),vt=ao(n,Y.getState,v),Tt=ao(n,Y.getState,w),ot=ao(n,Y.getState,M),Zt=ao(n,Y.getState,_),Yt=Je=>{const{nodeDragThreshold:he}=Y.getState();if(I&&(!V||!k||he>0)&&Rs({id:n,store:Y,nodeRef:B}),h){const Ot=Y.getState().nodeInternals.get(n);Ot&&h(Je,ce({},Ot))}},it=Je=>{if(!ms(Je)&&!R)if(Oa.includes(Je.key)&&I){const he=Je.key==="Escape";Rs({id:n,store:Y,unselect:he,nodeRef:B})}else k&&d&&Object.prototype.hasOwnProperty.call(Er,Je.key)&&(Y.setState({ariaLiveMessage:`Moved selected node ${Je.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~s}, y: ${~~i}`}),We({x:Er[Je.key].x,y:Er[Je.key].y,isShiftPressed:Je.shiftKey}))};(0,m.useEffect)(()=>()=>{re.current&&(K==null||K.unobserve(re.current),re.current=null)},[]),(0,m.useEffect)(()=>{if(B.current&&!F){const Je=B.current;(!E||!O||re.current!==Je)&&(re.current&&(K==null||K.unobserve(re.current)),K==null||K.observe(Je),re.current=Je)}},[F,E,O]),(0,m.useEffect)(()=>{const Je=ke.current!==r,he=oe.current!==J,Ot=we.current!==q;B.current&&(Je||he||Ot)&&(Je&&(ke.current=r),he&&(oe.current=J),Ot&&(we.current=q),Y.getState().updateNodeDimensions([{id:n,nodeElement:B.current,forceUpdate:!0}]))},[n,r,J,q]);const $t=Nc({nodeRef:B,disabled:F||!k,noDragClassName:y,handleSelector:U,nodeId:n,isSelectable:I,selectNodesOnDrag:V});return F?null:m.createElement("div",{className:ne(["react-flow__node",`react-flow__node-${r}`,{[A]:k},S,{selected:d,selectable:I,parent:W,dragging:$t}]),ref:B,style:ce({zIndex:te,transform:`translate(${c}px,${l}px)`,pointerEvents:Re?"all":"none",visibility:E?"visible":"hidden"},P),"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:rt,onMouseMove:vt,onMouseLeave:Tt,onContextMenu:ot,onClick:Yt,onDoubleClick:Zt,onKeyDown:$?it:void 0,tabIndex:$?0:void 0,role:$?"button":void 0,"aria-describedby":R?void 0:`${uc}-${C}`,"aria-label":L},m.createElement(Al,{value:n},m.createElement(e,{id:n,data:o,type:r,xPos:s,yPos:i,selected:d,isConnectable:N,sourcePosition:J,targetPosition:q,dragging:$t,dragHandle:U,zIndex:te})))};return t.displayName="NodeWrapper",(0,m.memo)(t)};const yf=e=>{const t=e.getNodes().filter(n=>n.selected);return st(ce({},si(t,e.nodeOrigin)),{transformString:`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`,userSelectionActive:e.userSelectionActive})};function xf({onSelectionContextMenu:e,noPanClassName:t,disableKeyboardA11y:n}){const r=dt(),{width:o,height:s,x:i,y:c,transformString:l,userSelectionActive:d}=Ke(yf,ue),h=Mc(),g=(0,m.useRef)(null);if((0,m.useEffect)(()=>{var M;n||(M=g.current)==null||M.focus({preventScroll:!0})},[n]),Nc({nodeRef:g}),d||!o||!s)return null;const v=e?M=>{const _=r.getState().getNodes().filter(P=>P.selected);e(M,_)}:void 0,w=M=>{Object.prototype.hasOwnProperty.call(Er,M.key)&&h({x:Er[M.key].x,y:Er[M.key].y,isShiftPressed:M.shiftKey})};return m.createElement("div",{className:ne(["react-flow__nodesselection","react-flow__container",t]),style:{transform:l}},m.createElement("div",{ref:g,className:"react-flow__nodesselection-rect",onContextMenu:v,tabIndex:n?void 0:-1,onKeyDown:n?void 0:w,style:{width:o,height:s,top:c,left:i}}))}var vf=(0,m.memo)(xf);const wf=e=>e.nodesSelectionActive,Tc=({children:e,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:i,deleteKeyCode:c,onMove:l,onMoveStart:d,onMoveEnd:h,selectionKeyCode:g,selectionOnDrag:v,selectionMode:w,onSelectionStart:M,onSelectionEnd:_,multiSelectionKeyCode:P,panActivationKeyCode:S,zoomActivationKeyCode:k,elementsSelectable:I,zoomOnScroll:N,zoomOnPinch:$,panOnScroll:V,panOnScrollSpeed:J,panOnScrollMode:q,zoomOnDoubleClick:F,panOnDrag:K,defaultViewport:U,translateExtent:te,minZoom:W,maxZoom:y,preventScrolling:A,onSelectionContextMenu:E,noWheelClassName:R,noPanClassName:L,disableKeyboardA11y:C})=>{const O=Ke(wf),Y=so(g),B=so(S),re=B||K,oe=B||V,we=Y||v&&re!==!0;return of({deleteKeyCode:c,multiSelectionKeyCode:P}),m.createElement(uf,{onMove:l,onMoveStart:d,onMoveEnd:h,onPaneContextMenu:s,elementsSelectable:I,zoomOnScroll:N,zoomOnPinch:$,panOnScroll:oe,panOnScrollSpeed:J,panOnScrollMode:q,zoomOnDoubleClick:F,panOnDrag:!Y&&re,defaultViewport:U,translateExtent:te,minZoom:W,maxZoom:y,zoomActivationKeyCode:k,preventScrolling:A,noWheelClassName:R,noPanClassName:L},m.createElement(bc,{onSelectionStart:M,onSelectionEnd:_,onPaneClick:t,onPaneMouseEnter:n,onPaneMouseMove:r,onPaneMouseLeave:o,onPaneContextMenu:s,onPaneScroll:i,panOnDrag:re,isSelecting:!!we,selectionMode:w},e,O&&m.createElement(vf,{onSelectionContextMenu:E,noPanClassName:L,disableKeyboardA11y:C})))};Tc.displayName="FlowRenderer";var bf=(0,m.memo)(Tc);function Sf(e){return Ke((0,m.useCallback)(n=>e?ja(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[e]))}function _f(e){const t={input:co(e.input||oc),default:co(e.default||Ns),output:co(e.output||sc),group:co(e.group||Ms)},n={},r=Object.keys(e).filter(o=>!["input","default","output","group"].includes(o)).reduce((o,s)=>(o[s]=co(e[s]||Ns),o),n);return ce(ce({},t),r)}const Ef=({x:e,y:t,width:n,height:r,origin:o})=>!n||!r?{x:e,y:t}:o[0]<0||o[1]<0||o[0]>1||o[1]>1?{x:e,y:t}:{x:e-n*o[0],y:t-r*o[1]},Cf=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,updateNodeDimensions:e.updateNodeDimensions,onError:e.onError}),Ac=e=>{const{nodesDraggable:t,nodesConnectable:n,nodesFocusable:r,elementsSelectable:o,updateNodeDimensions:s,onError:i}=Ke(Cf,ue),c=Sf(e.onlyRenderVisibleElements),l=(0,m.useRef)(),d=(0,m.useMemo)(()=>{if(typeof ResizeObserver=="undefined")return null;const h=new ResizeObserver(g=>{const v=g.map(w=>({id:w.target.getAttribute("data-id"),nodeElement:w.target,forceUpdate:!0}));s(v)});return l.current=h,h},[]);return(0,m.useEffect)(()=>()=>{var h;(h=l==null?void 0:l.current)==null||h.disconnect()},[]),m.createElement("div",{className:"react-flow__nodes",style:As},c.map(h=>{var $,V,J,q,F,K,U,te;let g=h.type||"default";e.nodeTypes[g]||(i==null||i("003",Bt.error003(g)),g="default");const v=e.nodeTypes[g]||e.nodeTypes.default,w=!!(h.draggable||t&&typeof h.draggable=="undefined"),M=!!(h.selectable||o&&typeof h.selectable=="undefined"),_=!!(h.connectable||n&&typeof h.connectable=="undefined"),P=!!(h.focusable||r&&typeof h.focusable=="undefined"),S=e.nodeExtent?hs(h.positionAbsolute,e.nodeExtent):h.positionAbsolute,k=($=S==null?void 0:S.x)!=null?$:0,I=(V=S==null?void 0:S.y)!=null?V:0,N=Ef({x:k,y:I,width:(J=h.width)!=null?J:0,height:(q=h.height)!=null?q:0,origin:e.nodeOrigin});return m.createElement(v,{key:h.id,id:h.id,className:h.className,style:h.style,type:g,data:h.data,sourcePosition:h.sourcePosition||fe.Bottom,targetPosition:h.targetPosition||fe.Top,hidden:h.hidden,xPos:k,yPos:I,xPosOrigin:N.x,yPosOrigin:N.y,selectNodesOnDrag:e.selectNodesOnDrag,onClick:e.onNodeClick,onMouseEnter:e.onNodeMouseEnter,onMouseMove:e.onNodeMouseMove,onMouseLeave:e.onNodeMouseLeave,onContextMenu:e.onNodeContextMenu,onDoubleClick:e.onNodeDoubleClick,selected:!!h.selected,isDraggable:w,isSelectable:M,isConnectable:_,isFocusable:P,resizeObserver:d,dragHandle:h.dragHandle,zIndex:(K=(F=h[tt])==null?void 0:F.z)!=null?K:0,isParent:!!((U=h[tt])!=null&&U.isParent),noDragClassName:e.noDragClassName,noPanClassName:e.noPanClassName,initialized:!!h.width&&!!h.height,rfId:e.rfId,disableKeyboardA11y:e.disableKeyboardA11y,ariaLabel:h.ariaLabel,hasHandleBounds:!!((te=h[tt])!=null&&te.handleBounds)})}))};Ac.displayName="NodeRenderer";var Nf=(0,m.memo)(Ac);const Mf=(e,t,n)=>n===fe.Left?e-t:n===fe.Right?e+t:e,Tf=(e,t,n)=>n===fe.Top?e-t:n===fe.Bottom?e+t:e,kc="react-flow__edgeupdater",Pc=({position:e,centerX:t,centerY:n,radius:r=10,onMouseDown:o,onMouseEnter:s,onMouseOut:i,type:c})=>m.createElement("circle",{onMouseDown:o,onMouseEnter:s,onMouseOut:i,className:ne([kc,`${kc}-${c}`]),cx:Mf(t,r,e),cy:Tf(n,r,e),r,stroke:"transparent",fill:"transparent"}),Af=()=>!0;var Cr=e=>{const t=({id:n,className:r,type:o,data:s,onClick:i,onEdgeDoubleClick:c,selected:l,animated:d,label:h,labelStyle:g,labelShowBg:v,labelBgStyle:w,labelBgPadding:M,labelBgBorderRadius:_,style:P,source:S,target:k,sourceX:I,sourceY:N,targetX:$,targetY:V,sourcePosition:J,targetPosition:q,elementsSelectable:F,hidden:K,sourceHandleId:U,targetHandleId:te,onContextMenu:W,onMouseEnter:y,onMouseMove:A,onMouseLeave:E,reconnectRadius:R,onReconnect:L,onReconnectStart:C,onReconnectEnd:O,markerEnd:Y,markerStart:B,rfId:re,ariaLabel:oe,isFocusable:we,isReconnectable:ke,pathOptions:Re,interactionWidth:We,disableKeyboardA11y:rt})=>{const vt=(0,m.useRef)(null),[Tt,ot]=(0,m.useState)(!1),[Zt,Yt]=(0,m.useState)(!1),it=dt(),$t=(0,m.useMemo)(()=>`url('#${bs(B,re)}')`,[B,re]),Je=(0,m.useMemo)(()=>`url('#${bs(Y,re)}')`,[Y,re]);if(K)return null;const he=Ct=>{var rn;const{edges:qt,addSelectedEdges:Gn,unselectNodesAndEdges:Wn,multiSelectionActive:Un}=it.getState(),gn=qt.find(fo=>fo.id===n);gn&&(F&&(it.setState({nodesSelectionActive:!1}),gn.selected&&Un?(Wn({nodes:[],edges:[gn]}),(rn=vt.current)==null||rn.blur()):Gn([n])),i&&i(Ct,gn))},Ot=oo(n,it.getState,c),Vn=oo(n,it.getState,W),uo=oo(n,it.getState,y),Nr=oo(n,it.getState,A),Mr=oo(n,it.getState,E),mn=(Ct,qt)=>{if(Ct.button!==0)return;const{edges:Gn,isValidConnection:Wn}=it.getState(),Un=qt?k:S,gn=(qt?te:U)||null,rn=qt?"target":"source",fo=Wn||Af,Ds=qt,ho=Gn.find(jn=>jn.id===n);Yt(!0),C==null||C(Ct,ho,rn);const zs=jn=>{Yt(!1),O==null||O(jn,ho,rn)};Ja({event:Ct,handleId:gn,nodeId:Un,onConnect:jn=>L==null?void 0:L(ho,jn),isTarget:Ds,getState:it.getState,setState:it.setState,isValidConnection:fo,edgeUpdaterType:rn,onReconnectEnd:zs})},Tr=Ct=>mn(Ct,!0),Yn=Ct=>mn(Ct,!1),Xn=()=>ot(!0),Ar=()=>ot(!1),kr=!F&&!i,lo=Ct=>{var qt;if(!rt&&Oa.includes(Ct.key)&&F){const{unselectNodesAndEdges:Gn,addSelectedEdges:Wn,edges:Un}=it.getState();Ct.key==="Escape"?((qt=vt.current)==null||qt.blur(),Gn({edges:[Un.find(rn=>rn.id===n)]})):Wn([n])}};return m.createElement("g",{className:ne(["react-flow__edge",`react-flow__edge-${o}`,r,{selected:l,animated:d,inactive:kr,updating:Tt}]),onClick:he,onDoubleClick:Ot,onContextMenu:Vn,onMouseEnter:uo,onMouseMove:Nr,onMouseLeave:Mr,onKeyDown:we?lo:void 0,tabIndex:we?0:void 0,role:we?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":oe===null?void 0:oe||`Edge from ${S} to ${k}`,"aria-describedby":we?`${lc}-${re}`:void 0,ref:vt},!Zt&&m.createElement(e,{id:n,source:S,target:k,selected:l,animated:d,label:h,labelStyle:g,labelShowBg:v,labelBgStyle:w,labelBgPadding:M,labelBgBorderRadius:_,data:s,style:P,sourceX:I,sourceY:N,targetX:$,targetY:V,sourcePosition:J,targetPosition:q,sourceHandleId:U,targetHandleId:te,markerStart:$t,markerEnd:Je,pathOptions:Re,interactionWidth:We}),ke&&m.createElement(m.Fragment,null,(ke==="source"||ke===!0)&&m.createElement(Pc,{position:J,centerX:I,centerY:N,radius:R,onMouseDown:Tr,onMouseEnter:Xn,onMouseOut:Ar,type:"source"}),(ke==="target"||ke===!0)&&m.createElement(Pc,{position:q,centerX:$,centerY:V,radius:R,onMouseDown:Yn,onMouseEnter:Xn,onMouseOut:Ar,type:"target"})))};return t.displayName="EdgeWrapper",(0,m.memo)(t)};function kf(e){const t={default:Cr(e.default||ii),straight:Cr(e.bezier||vs),step:Cr(e.step||xs),smoothstep:Cr(e.step||ri),simplebezier:Cr(e.simplebezier||gs)},n={},r=Object.keys(e).filter(o=>!["default","bezier"].includes(o)).reduce((o,s)=>(o[s]=Cr(e[s]||ii),o),n);return ce(ce({},t),r)}function Ic(e,t,n=null){const r=((n==null?void 0:n.x)||0)+t.x,o=((n==null?void 0:n.y)||0)+t.y,s=(n==null?void 0:n.width)||t.width,i=(n==null?void 0:n.height)||t.height;switch(e){case fe.Top:return{x:r+s/2,y:o};case fe.Right:return{x:r+s,y:o+i/2};case fe.Bottom:return{x:r+s/2,y:o+i};case fe.Left:return{x:r,y:o+i/2}}}function Rc(e,t){return e?e.length===1||!t?e[0]:t&&e.find(n=>n.id===t)||null:null}const Pf=(e,t,n,r,o,s)=>{const i=Ic(n,e,t),c=Ic(s,r,o);return{sourceX:i.x,sourceY:i.y,targetX:c.x,targetY:c.y}};function If({sourcePos:e,targetPos:t,sourceWidth:n,sourceHeight:r,targetWidth:o,targetHeight:s,width:i,height:c,transform:l}){const d={x:Math.min(e.x,t.x),y:Math.min(e.y,t.y),x2:Math.max(e.x+n,t.x+o),y2:Math.max(e.y+r,t.y+s)};d.x===d.x2&&(d.x2+=1),d.y===d.y2&&(d.y2+=1);const h=no({x:(0-l[0])/l[2],y:(0-l[1])/l[2],width:i/l[2],height:c/l[2]}),g=Math.max(0,Math.min(h.x2,d.x2)-Math.max(h.x,d.x)),v=Math.max(0,Math.min(h.y2,d.y2)-Math.max(h.y,d.y));return Math.ceil(g*v)>0}function $c(e){var r,o,s,i,c;const t=((r=e==null?void 0:e[tt])==null?void 0:r.handleBounds)||null,n=t&&(e==null?void 0:e.width)&&(e==null?void 0:e.height)&&typeof((o=e==null?void 0:e.positionAbsolute)==null?void 0:o.x)!="undefined"&&typeof((s=e==null?void 0:e.positionAbsolute)==null?void 0:s.y)!="undefined";return[{x:((i=e==null?void 0:e.positionAbsolute)==null?void 0:i.x)||0,y:((c=e==null?void 0:e.positionAbsolute)==null?void 0:c.y)||0,width:(e==null?void 0:e.width)||0,height:(e==null?void 0:e.height)||0},t,!!n]}const Rf=[{level:0,isMaxLevel:!0,edges:[]}];function $f(e,t,n=!1){let r=-1;const o=e.reduce((i,c)=>{var h,g;const l=Vt(c.zIndex);let d=l?c.zIndex:0;if(n){const v=t.get(c.target),w=t.get(c.source),M=c.selected||(v==null?void 0:v.selected)||(w==null?void 0:w.selected),_=Math.max(((h=w==null?void 0:w[tt])==null?void 0:h.z)||0,((g=v==null?void 0:v[tt])==null?void 0:g.z)||0,1e3);d=(l?c.zIndex:0)+(M?_:0)}return i[d]?i[d].push(c):i[d]=[c],r=d>r?d:r,i},{}),s=Object.entries(o).map(([i,c])=>{const l=+i;return{edges:c,level:l,isMaxLevel:l===r}});return s.length===0?Rf:s}function Of(e,t,n){const r=Ke((0,m.useCallback)(o=>e?o.edges.filter(s=>{const i=t.get(s.source),c=t.get(s.target);return(i==null?void 0:i.width)&&(i==null?void 0:i.height)&&(c==null?void 0:c.width)&&(c==null?void 0:c.height)&&If({sourcePos:i.positionAbsolute||{x:0,y:0},targetPos:c.positionAbsolute||{x:0,y:0},sourceWidth:i.width,sourceHeight:i.height,targetWidth:c.width,targetHeight:c.height,width:o.width,height:o.height,transform:o.transform})}):o.edges,[e,t]));return $f(r,t,n)}const Df=({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"}),zf=({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"}),Oc={[ni.Arrow]:Df,[ni.ArrowClosed]:zf};function Lf(e){const t=dt();return(0,m.useMemo)(()=>{var o,s;return Object.prototype.hasOwnProperty.call(Oc,e)?Oc[e]:((s=(o=t.getState()).onError)==null||s.call(o,"009",Bt.error009(e)),null)},[e])}const Hf=({id:e,type:t,color:n,width:r=12.5,height:o=12.5,markerUnits:s="strokeWidth",strokeWidth:i,orient:c="auto-start-reverse"})=>{const l=Lf(t);return l?m.createElement("marker",{className:"react-flow__arrowhead",id:e,markerWidth:`${r}`,markerHeight:`${o}`,viewBox:"-10 -10 20 20",markerUnits:s,orient:c,refX:"0",refY:"0"},m.createElement(l,{color:n,strokeWidth:i})):null},Ff=({defaultColor:e,rfId:t})=>n=>{const r=[];return n.edges.reduce((o,s)=>([s.markerStart,s.markerEnd].forEach(i=>{if(i&&typeof i=="object"){const c=bs(i,t);r.includes(c)||(o.push(ce({id:c,color:i.color||e},i)),r.push(c))}}),o),[]).sort((o,s)=>o.id.localeCompare(s.id))},Dc=({defaultColor:e,rfId:t})=>{const n=Ke((0,m.useCallback)(Ff({defaultColor:e,rfId:t}),[e,t]),(r,o)=>!(r.length!==o.length||r.some((s,i)=>s.id!==o[i].id)));return m.createElement("defs",null,n.map(r=>m.createElement(Hf,{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})))};Dc.displayName="MarkerDefinitions";var Bf=(0,m.memo)(Dc);const Vf=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}),zc=({defaultMarkerColor:e,onlyRenderVisibleElements:t,elevateEdgesOnSelect:n,rfId:r,edgeTypes:o,noPanClassName:s,onEdgeContextMenu:i,onEdgeMouseEnter:c,onEdgeMouseMove:l,onEdgeMouseLeave:d,onEdgeClick:h,onEdgeDoubleClick:g,onReconnect:v,onReconnectStart:w,onReconnectEnd:M,reconnectRadius:_,children:P,disableKeyboardA11y:S})=>{const{edgesFocusable:k,edgesUpdatable:I,elementsSelectable:N,width:$,height:V,connectionMode:J,nodeInternals:q,onError:F}=Ke(Vf,ue),K=Of(t,q,n);return $?m.createElement(m.Fragment,null,K.map(({level:U,edges:te,isMaxLevel:W})=>m.createElement("svg",{key:U,style:{zIndex:U},width:$,height:V,className:"react-flow__edges react-flow__container"},W&&m.createElement(Bf,{defaultColor:e,rfId:r}),m.createElement("g",null,te.map(y=>{var it,$t;const[A,E,R]=$c(q.get(y.source)),[L,C,O]=$c(q.get(y.target));if(!R||!O)return null;let Y=y.type||"default";o[Y]||(F==null||F("011",Bt.error011(Y)),Y="default");const B=o[Y]||o.default,re=J===Hn.Strict?C.target:((it=C.target)!=null?it:[]).concat(($t=C.source)!=null?$t:[]),oe=Rc(E.source,y.sourceHandle),we=Rc(re,y.targetHandle),ke=(oe==null?void 0:oe.position)||fe.Bottom,Re=(we==null?void 0:we.position)||fe.Top,We=!!(y.focusable||k&&typeof y.focusable=="undefined"),rt=y.reconnectable||y.updatable,vt=typeof v!="undefined"&&(rt||I&&typeof rt=="undefined");if(!oe||!we)return F==null||F("008",Bt.error008(oe,y)),null;const{sourceX:Tt,sourceY:ot,targetX:Zt,targetY:Yt}=Pf(A,oe,ke,L,we,Re);return m.createElement(B,{key:y.id,id:y.id,className:ne([y.className,s]),type:Y,data:y.data,selected:!!y.selected,animated:!!y.animated,hidden:!!y.hidden,label:y.label,labelStyle:y.labelStyle,labelShowBg:y.labelShowBg,labelBgStyle:y.labelBgStyle,labelBgPadding:y.labelBgPadding,labelBgBorderRadius:y.labelBgBorderRadius,style:y.style,source:y.source,target:y.target,sourceHandleId:y.sourceHandle,targetHandleId:y.targetHandle,markerEnd:y.markerEnd,markerStart:y.markerStart,sourceX:Tt,sourceY:ot,targetX:Zt,targetY:Yt,sourcePosition:ke,targetPosition:Re,elementsSelectable:N,onContextMenu:i,onMouseEnter:c,onMouseMove:l,onMouseLeave:d,onClick:h,onEdgeDoubleClick:g,onReconnect:v,onReconnectStart:w,onReconnectEnd:M,reconnectRadius:_,rfId:r,ariaLabel:y.ariaLabel,isFocusable:We,isReconnectable:vt,pathOptions:"pathOptions"in y?y.pathOptions:void 0,interactionWidth:y.interactionWidth,disableKeyboardA11y:S})})))),P):null};zc.displayName="EdgeRenderer";var Yf=(0,m.memo)(zc);const Xf=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function Gf({children:e}){const t=Ke(Xf);return m.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:t}},e)}function Wf(e){const t=gc(),n=(0,m.useRef)(!1);(0,m.useEffect)(()=>{!n.current&&t.viewportInitialized&&e&&(setTimeout(()=>e(t),1),n.current=!0)},[e,t.viewportInitialized])}const Uf={[fe.Left]:fe.Right,[fe.Right]:fe.Left,[fe.Top]:fe.Bottom,[fe.Bottom]:fe.Top},Lc=({nodeId:e,handleType:t,style:n,type:r=Cn.Bezier,CustomComponent:o,connectionStatus:s})=>{var V,J,q,F,K,U,te;const{fromNode:i,handleId:c,toX:l,toY:d,connectionMode:h}=Ke((0,m.useCallback)(W=>({fromNode:W.nodeInternals.get(e),handleId:W.connectionHandleId,toX:(W.connectionPosition.x-W.transform[0])/W.transform[2],toY:(W.connectionPosition.y-W.transform[1])/W.transform[2],connectionMode:W.connectionMode}),[e]),ue),g=(V=i==null?void 0:i[tt])==null?void 0:V.handleBounds;let v=g==null?void 0:g[t];if(h===Hn.Loose&&(v=v||(g==null?void 0:g[t==="source"?"target":"source"])),!i||!v)return null;const w=c?v.find(W=>W.id===c):v[0],M=w?w.x+w.width/2:((J=i.width)!=null?J:0)/2,_=w?w.y+w.height/2:(q=i.height)!=null?q:0,P=((K=(F=i.positionAbsolute)==null?void 0:F.x)!=null?K:0)+M,S=((te=(U=i.positionAbsolute)==null?void 0:U.y)!=null?te:0)+_,k=w==null?void 0:w.position,I=k?Uf[k]:null;if(!k||!I)return null;if(o)return m.createElement(o,{connectionLineType:r,connectionLineStyle:n,fromNode:i,fromHandle:w,fromX:P,fromY:S,toX:l,toY:d,fromPosition:k,toPosition:I,connectionStatus:s});let N="";const $={sourceX:P,sourceY:S,sourcePosition:k,targetX:l,targetY:d,targetPosition:I};return r===Cn.Bezier?[N]=Xa($):r===Cn.Step?[N]=ys(st(ce({},$),{borderRadius:0})):r===Cn.SmoothStep?[N]=ys($):r===Cn.SimpleBezier?[N]=Fa($):N=`M${P},${S} ${l},${d}`,m.createElement("path",{d:N,fill:"none",className:"react-flow__connection-path",style:n})};Lc.displayName="ConnectionLine";const jf=e=>({nodeId:e.connectionNodeId,handleType:e.connectionHandleType,nodesConnectable:e.nodesConnectable,connectionStatus:e.connectionStatus,width:e.width,height:e.height});function Kf({containerStyle:e,style:t,type:n,component:r}){const{nodeId:o,handleType:s,nodesConnectable:i,width:c,height:l,connectionStatus:d}=Ke(jf,ue);return!(o&&s&&c&&i)?null:m.createElement("svg",{style:e,width:c,height:l,className:"react-flow__edges react-flow__connectionline react-flow__container"},m.createElement("g",{className:ne(["react-flow__connection",d])},m.createElement(Lc,{nodeId:o,handleType:s,style:t,type:n,CustomComponent:r,connectionStatus:d})))}function Hc(e,t){const n=(0,m.useRef)(null),r=dt();return(0,m.useMemo)(()=>t(e),[e])}const Fc=({nodeTypes:e,edgeTypes:t,onMove:n,onMoveStart:r,onMoveEnd:o,onInit:s,onNodeClick:i,onEdgeClick:c,onNodeDoubleClick:l,onEdgeDoubleClick:d,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:v,onNodeContextMenu:w,onSelectionContextMenu:M,onSelectionStart:_,onSelectionEnd:P,connectionLineType:S,connectionLineStyle:k,connectionLineComponent:I,connectionLineContainerStyle:N,selectionKeyCode:$,selectionOnDrag:V,selectionMode:J,multiSelectionKeyCode:q,panActivationKeyCode:F,zoomActivationKeyCode:K,deleteKeyCode:U,onlyRenderVisibleElements:te,elementsSelectable:W,selectNodesOnDrag:y,defaultViewport:A,translateExtent:E,minZoom:R,maxZoom:L,preventScrolling:C,defaultMarkerColor:O,zoomOnScroll:Y,zoomOnPinch:B,panOnScroll:re,panOnScrollSpeed:oe,panOnScrollMode:we,zoomOnDoubleClick:ke,panOnDrag:Re,onPaneClick:We,onPaneMouseEnter:rt,onPaneMouseMove:vt,onPaneMouseLeave:Tt,onPaneScroll:ot,onPaneContextMenu:Zt,onEdgeContextMenu:Yt,onEdgeMouseEnter:it,onEdgeMouseMove:$t,onEdgeMouseLeave:Je,onReconnect:he,onReconnectStart:Ot,onReconnectEnd:Vn,reconnectRadius:uo,noDragClassName:Nr,noWheelClassName:Mr,noPanClassName:mn,elevateEdgesOnSelect:Tr,disableKeyboardA11y:Yn,nodeOrigin:Xn,nodeExtent:Ar,rfId:kr})=>{const lo=Hc(e,_f),Ct=Hc(t,kf);return Wf(s),m.createElement(bf,{onPaneClick:We,onPaneMouseEnter:rt,onPaneMouseMove:vt,onPaneMouseLeave:Tt,onPaneContextMenu:Zt,onPaneScroll:ot,deleteKeyCode:U,selectionKeyCode:$,selectionOnDrag:V,selectionMode:J,onSelectionStart:_,onSelectionEnd:P,multiSelectionKeyCode:q,panActivationKeyCode:F,zoomActivationKeyCode:K,elementsSelectable:W,onMove:n,onMoveStart:r,onMoveEnd:o,zoomOnScroll:Y,zoomOnPinch:B,zoomOnDoubleClick:ke,panOnScroll:re,panOnScrollSpeed:oe,panOnScrollMode:we,panOnDrag:Re,defaultViewport:A,translateExtent:E,minZoom:R,maxZoom:L,onSelectionContextMenu:M,preventScrolling:C,noDragClassName:Nr,noWheelClassName:Mr,noPanClassName:mn,disableKeyboardA11y:Yn},m.createElement(Gf,null,m.createElement(Yf,{edgeTypes:Ct,onEdgeClick:c,onEdgeDoubleClick:d,onlyRenderVisibleElements:te,onEdgeContextMenu:Yt,onEdgeMouseEnter:it,onEdgeMouseMove:$t,onEdgeMouseLeave:Je,onReconnect:he,onReconnectStart:Ot,onReconnectEnd:Vn,reconnectRadius:uo,defaultMarkerColor:O,noPanClassName:mn,elevateEdgesOnSelect:!!Tr,disableKeyboardA11y:Yn,rfId:kr},m.createElement(Kf,{style:k,type:S,component:I,containerStyle:N})),m.createElement("div",{className:"react-flow__edgelabel-renderer"}),m.createElement(Nf,{nodeTypes:lo,onNodeClick:i,onNodeDoubleClick:l,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:v,onNodeContextMenu:w,selectNodesOnDrag:y,onlyRenderVisibleElements:te,noPanClassName:mn,noDragClassName:Nr,disableKeyboardA11y:Yn,nodeOrigin:Xn,nodeExtent:Ar,rfId:kr})))};Fc.displayName="GraphView";var Zf=(0,m.memo)(Fc);const Os=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Mn={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:Os,nodeExtent:Os,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Hn.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!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:ei,isValidConnection:void 0},qf=()=>Le((e,t)=>st(ce({},Mn),{setNodes:n=>{const{nodeInternals:r,nodeOrigin:o,elevateNodesOnSelect:s}=t();e({nodeInternals:Ts(n,r,o,s)})},getNodes:()=>Array.from(t().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:r={}}=t();e({edges:n.map(o=>ce(ce({},r),o))})},setDefaultNodesAndEdges:(n,r)=>{const o=typeof n!="undefined",s=typeof r!="undefined",i=o?Ts(n,new Map,t().nodeOrigin,t().elevateNodesOnSelect):new Map;e({nodeInternals:i,edges:s?r:[],hasDefaultNodes:o,hasDefaultEdges:s})},updateNodeDimensions:n=>{const{onNodesChange:r,nodeInternals:o,fitViewOnInit:s,fitViewOnInitDone:i,fitViewOnInitOptions:c,domNode:l,nodeOrigin:d}=t(),h=l==null?void 0:l.querySelector(".react-flow__viewport");if(!h)return;const g=window.getComputedStyle(h),{m22:v}=new window.DOMMatrixReadOnly(g.transform),w=n.reduce((_,P)=>{const S=o.get(P.id);if(S!=null&&S.hidden)o.set(S.id,st(ce({},S),{[tt]:st(ce({},S[tt]),{handleBounds:void 0})}));else if(S){const k=ds(P.nodeElement);!!(k.width&&k.height&&(S.width!==k.width||S.height!==k.height||P.forceUpdate))&&(o.set(S.id,ce(st(ce({},S),{[tt]:st(ce({},S[tt]),{handleBounds:{source:Cc(".source",P.nodeElement,v,d),target:Cc(".target",P.nodeElement,v,d)}})}),k)),_.push({id:S.id,type:"dimensions",dimensions:k}))}return _},[]);pc(o,d);const M=i||s&&!i&&mc(t,ce({initial:!0},c));e({nodeInternals:new Map(o),fitViewOnInitDone:M}),(w==null?void 0:w.length)>0&&(r==null||r(w))},updateNodePositions:(n,r=!0,o=!1)=>{const{triggerNodeChanges:s}=t(),i=n.map(c=>{const l={id:c.id,type:"position",dragging:o};return r&&(l.positionAbsolute=c.positionAbsolute,l.position=c.position),l});s(i)},triggerNodeChanges:n=>{const{onNodesChange:r,nodeInternals:o,hasDefaultNodes:s,nodeOrigin:i,getNodes:c,elevateNodesOnSelect:l}=t();if(n!=null&&n.length){if(s){const d=ks(n,c()),h=Ts(d,o,i,l);e({nodeInternals:h})}r==null||r(n)}},addSelectedNodes:n=>{const{multiSelectionActive:r,edges:o,getNodes:s}=t();let i,c=null;r?i=n.map(l=>Nn(l,!0)):(i=_r(s(),n),c=_r(o,[])),ui({changedNodes:i,changedEdges:c,get:t,set:e})},addSelectedEdges:n=>{const{multiSelectionActive:r,edges:o,getNodes:s}=t();let i,c=null;r?i=n.map(l=>Nn(l,!0)):(i=_r(o,n),c=_r(s(),[])),ui({changedNodes:c,changedEdges:i,get:t,set:e})},unselectNodesAndEdges:({nodes:n,edges:r}={})=>{const{edges:o,getNodes:s}=t(),i=n||s(),c=r||o,l=i.map(h=>(h.selected=!1,Nn(h.id,!1))),d=c.map(h=>Nn(h.id,!1));ui({changedNodes:l,changedEdges:d,get:t,set:e})},setMinZoom:n=>{const{d3Zoom:r,maxZoom:o}=t();r==null||r.scaleExtent([n,o]),e({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:r,minZoom:o}=t();r==null||r.scaleExtent([o,n]),e({maxZoom:n})},setTranslateExtent:n=>{var r;(r=t().d3Zoom)==null||r.translateExtent(n),e({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:r}=t(),s=r().filter(c=>c.selected).map(c=>Nn(c.id,!1)),i=n.filter(c=>c.selected).map(c=>Nn(c.id,!1));ui({changedNodes:s,changedEdges:i,get:t,set:e})},setNodeExtent:n=>{const{nodeInternals:r}=t();r.forEach(o=>{o.positionAbsolute=hs(o.position,n)}),e({nodeExtent:n,nodeInternals:new Map(r)})},panBy:n=>{const{transform:r,width:o,height:s,d3Zoom:i,d3Selection:c,translateExtent:l}=t();if(!i||!c||!n.x&&!n.y)return!1;const d=pn.translate(r[0]+n.x,r[1]+n.y).scale(r[2]),h=[[0,0],[o,s]],g=i==null?void 0:i.constrain()(d,h,l);return i.transform(c,g),r[0]!==g.x||r[1]!==g.y||r[2]!==g.k},cancelConnection:()=>e({connectionNodeId:Mn.connectionNodeId,connectionHandleId:Mn.connectionHandleId,connectionHandleType:Mn.connectionHandleType,connectionStatus:Mn.connectionStatus,connectionStartHandle:Mn.connectionStartHandle,connectionEndHandle:Mn.connectionEndHandle}),reset:()=>e(ce({},Mn))}),Object.is),Bc=({children:e})=>{const t=(0,m.useRef)(null);return t.current||(t.current=qf()),m.createElement(yl,{value:t.current},e)};Bc.displayName="ReactFlowProvider";const Vc=({children:e})=>(0,m.useContext)(Jo)?m.createElement(m.Fragment,null,e):m.createElement(Bc,null,e);Vc.displayName="ReactFlowWrapper";const Qf={input:oc,default:Ns,output:sc,group:Ms},Jf={default:ii,straight:vs,step:xs,smoothstep:ri,simplebezier:gs},ed=[0,0],td=[15,15],nd={x:0,y:0,zoom:1},rd={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},od=(0,m.forwardRef)((hh,Fd)=>{var jc=hh,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,className:o,nodeTypes:s=Qf,edgeTypes:i=Jf,onNodeClick:c,onEdgeClick:l,onInit:d,onMove:h,onMoveStart:g,onMoveEnd:v,onConnect:w,onConnectStart:M,onConnectEnd:_,onClickConnectStart:P,onClickConnectEnd:S,onNodeMouseEnter:k,onNodeMouseMove:I,onNodeMouseLeave:N,onNodeContextMenu:$,onNodeDoubleClick:V,onNodeDragStart:J,onNodeDrag:q,onNodeDragStop:F,onNodesDelete:K,onEdgesDelete:U,onSelectionChange:te,onSelectionDragStart:W,onSelectionDrag:y,onSelectionDragStop:A,onSelectionContextMenu:E,onSelectionStart:R,onSelectionEnd:L,connectionMode:C=Hn.Strict,connectionLineType:O=Cn.Bezier,connectionLineStyle:Y,connectionLineComponent:B,connectionLineContainerStyle:re,deleteKeyCode:oe="Backspace",selectionKeyCode:we="Shift",selectionOnDrag:ke=!1,selectionMode:Re=io.Full,panActivationKeyCode:We="Space",multiSelectionKeyCode:rt=ti()?"Meta":"Control",zoomActivationKeyCode:vt=ti()?"Meta":"Control",snapToGrid:Tt=!1,snapGrid:ot=td,onlyRenderVisibleElements:Zt=!1,selectNodesOnDrag:Yt=!0,nodesDraggable:it,nodesConnectable:$t,nodesFocusable:Je,nodeOrigin:he=ed,edgesFocusable:Ot,edgesUpdatable:Vn,elementsSelectable:uo,defaultViewport:Nr=nd,minZoom:Mr=.5,maxZoom:mn=2,translateExtent:Tr=Os,preventScrolling:Yn=!0,nodeExtent:Xn,defaultMarkerColor:Ar="#b1b1b7",zoomOnScroll:kr=!0,zoomOnPinch:lo=!0,panOnScroll:Ct=!1,panOnScrollSpeed:qt=.5,panOnScrollMode:Gn=Fn.Free,zoomOnDoubleClick:Wn=!0,panOnDrag:Un=!0,onPaneClick:gn,onPaneMouseEnter:rn,onPaneMouseMove:fo,onPaneMouseLeave:Ds,onPaneScroll:ho,onPaneContextMenu:zs,children:Xc,onEdgeContextMenu:jn,onEdgeDoubleClick:dd,onEdgeMouseEnter:hd,onEdgeMouseMove:pd,onEdgeMouseLeave:md,onEdgeUpdate:gd,onEdgeUpdateStart:yd,onEdgeUpdateEnd:xd,onReconnect:Ls,onReconnectStart:Hs,onReconnectEnd:Fs,reconnectRadius:Bs=10,edgeUpdaterRadius:vd=10,onNodesChange:wd,onEdgesChange:bd,noDragClassName:Sd="nodrag",noWheelClassName:_d="nowheel",noPanClassName:Gc="nopan",fitView:Ed=!1,fitViewOptions:Cd,connectOnClick:Nd=!0,attributionPosition:Md,proOptions:Td,defaultEdgeOptions:Ad,elevateNodesOnSelect:kd=!0,elevateEdgesOnSelect:Pd=!1,disableKeyboardA11y:Wc=!1,autoPanOnConnect:Id=!0,autoPanOnNodeDrag:Rd=!0,connectionRadius:$d=20,isValidConnection:Od,onError:Dd,style:zd,id:Uc,nodeDragThreshold:Ld}=jc,Hd=Pr(jc,["nodes","edges","defaultNodes","defaultEdges","className","nodeTypes","edgeTypes","onNodeClick","onEdgeClick","onInit","onMove","onMoveStart","onMoveEnd","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","onNodeMouseEnter","onNodeMouseMove","onNodeMouseLeave","onNodeContextMenu","onNodeDoubleClick","onNodeDragStart","onNodeDrag","onNodeDragStop","onNodesDelete","onEdgesDelete","onSelectionChange","onSelectionDragStart","onSelectionDrag","onSelectionDragStop","onSelectionContextMenu","onSelectionStart","onSelectionEnd","connectionMode","connectionLineType","connectionLineStyle","connectionLineComponent","connectionLineContainerStyle","deleteKeyCode","selectionKeyCode","selectionOnDrag","selectionMode","panActivationKeyCode","multiSelectionKeyCode","zoomActivationKeyCode","snapToGrid","snapGrid","onlyRenderVisibleElements","selectNodesOnDrag","nodesDraggable","nodesConnectable","nodesFocusable","nodeOrigin","edgesFocusable","edgesUpdatable","elementsSelectable","defaultViewport","minZoom","maxZoom","translateExtent","preventScrolling","nodeExtent","defaultMarkerColor","zoomOnScroll","zoomOnPinch","panOnScroll","panOnScrollSpeed","panOnScrollMode","zoomOnDoubleClick","panOnDrag","onPaneClick","onPaneMouseEnter","onPaneMouseMove","onPaneMouseLeave","onPaneScroll","onPaneContextMenu","children","onEdgeContextMenu","onEdgeDoubleClick","onEdgeMouseEnter","onEdgeMouseMove","onEdgeMouseLeave","onEdgeUpdate","onEdgeUpdateStart","onEdgeUpdateEnd","onReconnect","onReconnectStart","onReconnectEnd","reconnectRadius","edgeUpdaterRadius","onNodesChange","onEdgesChange","noDragClassName","noWheelClassName","noPanClassName","fitView","fitViewOptions","connectOnClick","attributionPosition","proOptions","defaultEdgeOptions","elevateNodesOnSelect","elevateEdgesOnSelect","disableKeyboardA11y","autoPanOnConnect","autoPanOnNodeDrag","connectionRadius","isValidConnection","onError","style","id","nodeDragThreshold"]);const Vs=Uc||"1";return m.createElement("div",st(ce({},Hd),{style:ce(ce({},zd),rd),ref:Fd,className:ne(["react-flow",o]),"data-testid":"rf__wrapper",id:Uc}),m.createElement(Vc,null,m.createElement(Zf,{onInit:d,onMove:h,onMoveStart:g,onMoveEnd:v,onNodeClick:c,onEdgeClick:l,onNodeMouseEnter:k,onNodeMouseMove:I,onNodeMouseLeave:N,onNodeContextMenu:$,onNodeDoubleClick:V,nodeTypes:s,edgeTypes:i,connectionLineType:O,connectionLineStyle:Y,connectionLineComponent:B,connectionLineContainerStyle:re,selectionKeyCode:we,selectionOnDrag:ke,selectionMode:Re,deleteKeyCode:oe,multiSelectionKeyCode:rt,panActivationKeyCode:We,zoomActivationKeyCode:vt,onlyRenderVisibleElements:Zt,selectNodesOnDrag:Yt,defaultViewport:Nr,translateExtent:Tr,minZoom:Mr,maxZoom:mn,preventScrolling:Yn,zoomOnScroll:kr,zoomOnPinch:lo,zoomOnDoubleClick:Wn,panOnScroll:Ct,panOnScrollSpeed:qt,panOnScrollMode:Gn,panOnDrag:Un,onPaneClick:gn,onPaneMouseEnter:rn,onPaneMouseMove:fo,onPaneMouseLeave:Ds,onPaneScroll:ho,onPaneContextMenu:zs,onSelectionContextMenu:E,onSelectionStart:R,onSelectionEnd:L,onEdgeContextMenu:jn,onEdgeDoubleClick:dd,onEdgeMouseEnter:hd,onEdgeMouseMove:pd,onEdgeMouseLeave:md,onReconnect:Ls!=null?Ls:gd,onReconnectStart:Hs!=null?Hs:yd,onReconnectEnd:Fs!=null?Fs:xd,reconnectRadius:Bs!=null?Bs:vd,defaultMarkerColor:Ar,noDragClassName:Sd,noWheelClassName:_d,noPanClassName:Gc,elevateEdgesOnSelect:Pd,rfId:Vs,disableKeyboardA11y:Wc,nodeOrigin:he,nodeExtent:Xn}),m.createElement(Wl,{nodes:e,edges:t,defaultNodes:n,defaultEdges:r,onConnect:w,onConnectStart:M,onConnectEnd:_,onClickConnectStart:P,onClickConnectEnd:S,nodesDraggable:it,nodesConnectable:$t,nodesFocusable:Je,edgesFocusable:Ot,edgesUpdatable:Vn,elementsSelectable:uo,elevateNodesOnSelect:kd,minZoom:Mr,maxZoom:mn,nodeExtent:Xn,onNodesChange:wd,onEdgesChange:bd,snapToGrid:Tt,snapGrid:ot,connectionMode:C,translateExtent:Tr,connectOnClick:Nd,defaultEdgeOptions:Ad,fitView:Ed,fitViewOptions:Cd,onNodesDelete:K,onEdgesDelete:U,onNodeDragStart:J,onNodeDrag:q,onNodeDragStop:F,onSelectionDrag:y,onSelectionDragStart:W,onSelectionDragStop:A,noPanClassName:Gc,nodeOrigin:he,rfId:Vs,autoPanOnConnect:Id,autoPanOnNodeDrag:Rd,onError:Dd,connectionRadius:$d,isValidConnection:Od,nodeDragThreshold:Ld}),m.createElement(Xl,{onSelectionChange:te}),Xc,m.createElement(wl,{proOptions:Td,position:Md}),m.createElement(ql,{rfId:Vs,disableKeyboardA11y:Wc})))});od.displayName="ReactFlow";const id=e=>{var t;return(t=e.domNode)==null?void 0:t.querySelector(".react-flow__edgelabel-renderer")};function rh({children:e}){const t=Ke(id);return t?createPortal(e,t):null}function oh(){const e=dt();return useCallback(t=>{const{domNode:n,updateNodeDimensions:r}=e.getState(),s=(Array.isArray(t)?t:[t]).reduce((i,c)=>{const l=n==null?void 0:n.querySelector(`.react-flow__node[data-id="${c}"]`);return l&&i.push({id:c,nodeElement:l,forceUpdate:!0}),i},[]);requestAnimationFrame(()=>r(s))},[])}const sd=e=>e.getNodes();function ih(){return Ke(sd,shallow)}const ad=e=>e.edges;function sh(){return Ke(ad,shallow)}const cd=e=>({x:e.transform[0],y:e.transform[1],zoom:e.transform[2]});function ah(){return Ke(cd,shallow)}function Yc(e){return t=>{const[n,r]=(0,m.useState)(t),o=(0,m.useCallback)(s=>r(i=>e(s,i)),[]);return[n,r,o]}}const ch=Yc(ks),uh=Yc(df);function lh({onStart:e,onChange:t,onEnd:n}){const r=dt();useEffect(()=>{r.setState({onViewportChangeStart:e})},[e]),useEffect(()=>{r.setState({onViewportChange:t})},[t]),useEffect(()=>{r.setState({onViewportChangeEnd:n})},[n])}function fh({onChange:e}){const t=dt();useEffect(()=>{const n=[...t.getState().onSelectionChange,e];return t.setState({onSelectionChange:n}),()=>{const r=t.getState().onSelectionChange.filter(o=>o!==e);t.setState({onSelectionChange:r})}},[e])}const ud=e=>t=>t.nodeInternals.size===0?!1:t.getNodes().filter(n=>e.includeHiddenNodes?!0:!n.hidden).every(n=>{var r;return((r=n[tt])==null?void 0:r.handleBounds)!==void 0}),ld={includeHiddenNodes:!1};function dh(e=ld){return Ke(ud(e))}var fd=function(t){var n=(0,m.useState)(t),r=Ze(n,2),o=r[0],s=r[1],i=(0,m.useCallback)(function(c){s(function(l){return ks(c,l)})},[o]);return[o,s,i]}},43775:function(ye,se,ee){"use strict";ee.d(se,{Zi:function(){return lt}});function be(Be,Ce,ze,Ge,Ve,De,Ie){try{var xe=Be[De](Ie),Le=xe.value}catch(ue){return void ze(ue)}xe.done?Ce(Le):Promise.resolve(Le).then(Ge,Ve)}function Ue(Be){return function(){var Ce=this,ze=arguments;return new Promise(function(Ge,Ve){var De=Be.apply(Ce,ze);function Ie(Le){be(De,Ge,Ve,Ie,xe,"next",Le)}function xe(Le){be(De,Ge,Ve,Ie,xe,"throw",Le)}Ie(void 0)})}}var je=ee(89033),He=ee.n(je),Oe=ee(67294),Ze=(0,Oe.createContext)({}),m=function(){var Ce=useContext(FlowViewContext),ze=Ce.reactFlowInstance;return{reactFlowInstance:ze}},ne=function(){var Ce=useContext(FlowViewContext),ze=Ce.setMiniMapPosition,Ge=function(De,Ie){ze({x:De,y:Ie})};return{setMiniMapPosition:Ge}},lt=function(){var Ce=(0,Oe.useContext)(Ze),ze=Ce.updateSelectNode,Ge=Ce.updateSelectEdge,Ve=Ce.updateSelectEdges,De=Ce.updateSelectNodes,Ie=Ce.setMiniMapPosition,xe=Ce.reactFlowInstance,Le=Ce.flowViewRef,ue=(0,Oe.useCallback)(function(et){if(xe)return xe.getNode(et)},[xe]),gt=(0,Oe.useCallback)(function(){if(xe)return xe.getNodes()},[xe]),Z=(0,Oe.useCallback)(function(et,yt){xe&&xe.zoomTo(et,{duration:yt})},[xe]),qe=(0,Oe.useCallback)(function(et,yt){var nt=ue(et);nt&&xe&&xe.fitView({nodes:[{id:et}],duration:yt})},[ue,xe]),ae=(0,Oe.useCallback)(function(et,yt){Ie&&Ie({x:et,y:yt})},[Ie]),ft=(0,Oe.useCallback)(function(){if(xe)return xe.getViewport()},[xe]),Fe=(0,Oe.useCallback)(function(et,yt){if(xe)return xe.setViewport(et,{duration:yt})},[xe]),ht=(0,Oe.useCallback)(function(et){if(xe)return xe.fitView({duration:et})},[xe]),pt=(0,Oe.useCallback)(Ue(He().mark(function et(){return He().wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:document.exitFullScreen();case 1:case"end":return nt.stop()}},et)})),[]),St=(0,Oe.useCallback)(function(){setTimeout(function(){ht()},500)},[ht]),Dt=(0,Oe.useCallback)(Ue(He().mark(function et(){return He().wrap(function(nt){for(;;)switch(nt.prev=nt.next){case 0:(Le==null?void 0:Le.current).requestFullscreen().then(function(){St()}).catch(function(Xt){console.error(Xt)});case 1:case"end":return nt.stop()}},et)})),[St]);return(0,Oe.useEffect)(function(){St&&document.addEventListener("fullscreenchange",St)},[St]),{selectNode:ze,selectEdge:Ge,selectEdges:Ve,selectNodes:De,getNode:ue,getNodes:gt,zoomTo:Z,getViewport:ft,setViewport:Fe,zoomToNode:qe,fitView:ht,setMiniMapPosition:ae,instance:xe,fullScreen:Dt,exitFullScreen:pt}}},87080:function(ye,se,ee){"use strict";ee.d(se,{kc:function(){return Jr}});var be="acss";function Ue(a){"@babel/helpers - typeof";return Ue=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(u){return typeof u}:function(u){return u&&typeof Symbol=="function"&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u},Ue(a)}function je(a,u){if(Ue(a)!="object"||!a)return a;var f=a[Symbol.toPrimitive];if(f!==void 0){var p=f.call(a,u||"default");if(Ue(p)!="object")return p;throw new TypeError("@@toPrimitive must return a primitive value.")}return(u==="string"?String:Number)(a)}function He(a){var u=je(a,"string");return Ue(u)=="symbol"?u:u+""}function Oe(a,u,f){return(u=He(u))in a?Object.defineProperty(a,u,{value:f,enumerable:!0,configurable:!0,writable:!0}):a[u]=f,a}function Ze(a,u){var f=Object.keys(a);if(Object.getOwnPropertySymbols){var p=Object.getOwnPropertySymbols(a);u&&(p=p.filter(function(x){return Object.getOwnPropertyDescriptor(a,x).enumerable})),f.push.apply(f,p)}return f}function m(a){for(var u=1;u<arguments.length;u++){var f=arguments[u]!=null?arguments[u]:{};u%2?Ze(Object(f),!0).forEach(function(p){Oe(a,p,f[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(f)):Ze(Object(f)).forEach(function(p){Object.defineProperty(a,p,Object.getOwnPropertyDescriptor(f,p))})}return a}var ne=ee(67294),lt=ee.t(ne,2);function Be(a,u){if(!(a instanceof u))throw new TypeError("Cannot call a class as a function")}function Ce(a,u){for(var f=0;f<u.length;f++){var p=u[f];p.enumerable=p.enumerable||!1,p.configurable=!0,"value"in p&&(p.writable=!0),Object.defineProperty(a,He(p.key),p)}}function ze(a,u,f){return u&&Ce(a.prototype,u),f&&Ce(a,f),Object.defineProperty(a,"prototype",{writable:!1}),a}var Ge=!1;function Ve(a){if(a.sheet)return a.sheet;for(var u=0;u<document.styleSheets.length;u++)if(document.styleSheets[u].ownerNode===a)return document.styleSheets[u]}function De(a){var u=document.createElement("style");return u.setAttribute("data-emotion",a.key),a.nonce!==void 0&&u.setAttribute("nonce",a.nonce),u.appendChild(document.createTextNode("")),u.setAttribute("data-s",""),u}var Ie=function(){function a(f){var p=this;this._insertTag=function(x){var b;p.tags.length===0?p.insertionPoint?b=p.insertionPoint.nextSibling:p.prepend?b=p.container.firstChild:b=p.before:b=p.tags[p.tags.length-1].nextSibling,p.container.insertBefore(x,b),p.tags.push(x)},this.isSpeedy=f.speedy===void 0?!Ge:f.speedy,this.tags=[],this.ctr=0,this.nonce=f.nonce,this.key=f.key,this.container=f.container,this.prepend=f.prepend,this.insertionPoint=f.insertionPoint,this.before=null}var u=a.prototype;return u.hydrate=function(p){p.forEach(this._insertTag)},u.insert=function(p){this.ctr%(this.isSpeedy?65e3:1)===0&&this._insertTag(De(this));var x=this.tags[this.tags.length-1];if(this.isSpeedy){var b=Ve(x);try{b.insertRule(p,b.cssRules.length)}catch(T){}}else x.appendChild(document.createTextNode(p));this.ctr++},u.flush=function(){this.tags.forEach(function(p){var x;return(x=p.parentNode)==null?void 0:x.removeChild(p)}),this.tags=[],this.ctr=0},a}(),xe=Math.abs,Le=String.fromCharCode,ue=Object.assign;function gt(a,u){return Fe(a,0)^45?(((u<<2^Fe(a,0))<<2^Fe(a,1))<<2^Fe(a,2))<<2^Fe(a,3):0}function Z(a){return a.trim()}function qe(a,u){return(a=u.exec(a))?a[0]:a}function ae(a,u,f){return a.replace(u,f)}function ft(a,u){return a.indexOf(u)}function Fe(a,u){return a.charCodeAt(u)|0}function ht(a,u,f){return a.slice(u,f)}function pt(a){return a.length}function St(a){return a.length}function Dt(a,u){return u.push(a),a}function et(a,u){return a.map(u).join("")}var yt=1,nt=1,Xt=0,at=0,H=0,D="";function j(a,u,f,p,x,b,T){return{value:a,root:u,parent:f,type:p,props:x,children:b,line:yt,column:nt,length:T,return:""}}function le(a,u){return ue(j("",null,null,"",null,null,0),a,{length:-a.length},u)}function ve(){return H}function me(){return H=at>0?Fe(D,--at):0,nt--,H===10&&(nt=1,yt--),H}function Me(){return H=at<Xt?Fe(D,at++):0,nt++,H===10&&(nt=1,yt++),H}function Xe(){return Fe(D,at)}function ct(){return at}function Nt(a,u){return ht(D,a,u)}function wt(a){switch(a){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function At(a){return yt=nt=1,Xt=pt(D=a),at=0,[]}function Kn(a){return D="",a}function Tn(a){return Z(Nt(at-1,Rr(a===91?a+2:a===40?a+1:a)))}function Ir(a){return Kn(hi(At(a)))}function di(a){for(;(H=Xe())&&H<33;)Me();return wt(a)>2||wt(H)>3?"":" "}function hi(a){for(;Me();)switch(wt(H)){case 0:append(po(at-1),a);break;case 2:append(Tn(H),a);break;default:append(from(H),a)}return a}function pi(a,u){for(;--u&&Me()&&!(H<48||H>102||H>57&&H<65||H>70&&H<97););return Nt(a,ct()+(u<6&&Xe()==32&&Me()==32))}function Rr(a){for(;Me();)switch(H){case a:return at;case 34:case 39:a!==34&&a!==39&&Rr(H);break;case 40:a===41&&Rr(a);break;case 92:Me();break}return at}function mi(a,u){for(;Me()&&a+H!==57;)if(a+H===84&&Xe()===47)break;return"/*"+Nt(u,at-1)+"*"+Le(a===47?a:Me())}function po(a){for(;!wt(Xe());)Me();return Nt(a,at)}var xt="-ms-",Zn="-moz-",$e="-webkit-",mo="comm",$r="rule",Or="decl",Xs="@page",Gs="@media",gi="@import",Ws="@charset",Us="@viewport",js="@supports",go="@document",yi="@namespace",An="@keyframes",Ks="@font-face",Zs="@counter-style",qs="@font-feature-values",xi="@layer";function yn(a,u){for(var f="",p=St(a),x=0;x<p;x++)f+=u(a[x],x,a,u)||"";return f}function vi(a,u,f,p){switch(a.type){case xi:if(a.children.length)break;case gi:case Or:return a.return=a.return||a.value;case mo:return"";case An:return a.return=a.value+"{"+yn(a.children,p)+"}";case $r:a.value=a.props.join(",")}return pt(f=yn(a.children,p))?a.return=a.value+"{"+f+"}":""}function wi(a){var u=St(a);return function(f,p,x,b){for(var T="",z=0;z<u;z++)T+=a[z](f,p,x,b)||"";return T}}function yo(a){return function(u){u.root||(u=u.return)&&a(u)}}function Qs(a,u,f,p){if(a.length>-1&&!a.return)switch(a.type){case DECLARATION:a.return=prefix(a.value,a.length,f);return;case KEYFRAMES:return serialize([copy(a,{value:replace(a.value,"@","@"+WEBKIT)})],p);case RULESET:if(a.length)return combine(a.props,function(x){switch(match(x,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return serialize([copy(a,{props:[replace(x,/:(read-\w+)/,":"+MOZ+"$1")]})],p);case"::placeholder":return serialize([copy(a,{props:[replace(x,/:(plac\w+)/,":"+WEBKIT+"input-$1")]}),copy(a,{props:[replace(x,/:(plac\w+)/,":"+MOZ+"$1")]}),copy(a,{props:[replace(x,/:(plac\w+)/,MS+"input-$1")]})],p)}return""})}}function Js(a){switch(a.type){case RULESET:a.props=a.props.map(function(u){return combine(tokenize(u),function(f,p,x){switch(charat(f,0)){case 12:return substr(f,1,strlen(f));case 0:case 40:case 43:case 62:case 126:return f;case 58:x[++p]==="global"&&(x[p]="",x[++p]="\f"+substr(x[p],p=1,-1));case 32:return p===1?"":f;default:switch(p){case 0:return a=f,sizeof(x)>1?"":f;case(p=sizeof(x)-1):case 2:return p===2?f+a+a:f+a;default:return f}}})})}}function bi(a){return Kn(qn("",null,null,null,[""],a=At(a),0,[0],a))}function qn(a,u,f,p,x,b,T,z,X){for(var Q=0,G=0,ie=T,_e=0,Se=0,ge=0,pe=1,Te=1,Ne=1,de=0,Pe="",Ye=x,ut=b,Qe=p,Ee=Pe;Te;)switch(ge=de,de=Me()){case 40:if(ge!=108&&Fe(Ee,ie-1)==58){ft(Ee+=ae(Tn(de),"&","&\f"),"&\f")!=-1&&(Ne=-1);break}case 34:case 39:case 91:Ee+=Tn(de);break;case 9:case 10:case 13:case 32:Ee+=di(ge);break;case 92:Ee+=pi(ct()-1,7);continue;case 47:switch(Xe()){case 42:case 47:Dt(Si(mi(Me(),ct()),u,f),X);break;default:Ee+="/"}break;case 123*pe:z[Q++]=pt(Ee)*Ne;case 125*pe:case 59:case 0:switch(de){case 0:case 125:Te=0;case 59+G:Ne==-1&&(Ee=ae(Ee,/\f/g,"")),Se>0&&pt(Ee)-ie&&Dt(Se>32?xo(Ee+";",p,f,ie-1):xo(ae(Ee," ","")+";",p,f,ie-2),X);break;case 59:Ee+=";";default:if(Dt(Qe=on(Ee,u,f,Q,G,x,z,Pe,Ye=[],ut=[],ie),b),de===123)if(G===0)qn(Ee,u,Qe,Qe,Ye,b,ie,z,ut);else switch(_e===99&&Fe(Ee,3)===110?100:_e){case 100:case 108:case 109:case 115:qn(a,Qe,Qe,p&&Dt(on(a,Qe,Qe,0,0,x,z,Pe,x,Ye=[],ie),ut),x,ut,ie,z,p?Ye:ut);break;default:qn(Ee,Qe,Qe,Qe,[""],ut,0,z,ut)}}Q=G=Se=0,pe=Ne=1,Pe=Ee="",ie=T;break;case 58:ie=1+pt(Ee),Se=ge;default:if(pe<1){if(de==123)--pe;else if(de==125&&pe++==0&&me()==125)continue}switch(Ee+=Le(de),de*pe){case 38:Ne=G>0?1:(Ee+="\f",-1);break;case 44:z[Q++]=(pt(Ee)-1)*Ne,Ne=1;break;case 64:Xe()===45&&(Ee+=Tn(Me())),_e=Xe(),G=ie=pt(Pe=Ee+=po(ct())),de++;break;case 45:ge===45&&pt(Ee)==2&&(pe=0)}}return b}function on(a,u,f,p,x,b,T,z,X,Q,G){for(var ie=x-1,_e=x===0?b:[""],Se=St(_e),ge=0,pe=0,Te=0;ge<p;++ge)for(var Ne=0,de=ht(a,ie+1,ie=xe(pe=T[ge])),Pe=a;Ne<Se;++Ne)(Pe=Z(pe>0?_e[Ne]+" "+de:ae(de,/&\f/g,_e[Ne])))&&(X[Te++]=Pe);return j(a,u,f,x===0?$r:z,X,Q,G)}function Si(a,u,f){return j(a,u,f,mo,Le(ve()),ht(a,2,-2),0)}function xo(a,u,f,p){return j(a,u,f,Or,ht(a,0,p),ht(a,p+1,-1),p)}var _i=function(u,f,p){for(var x=0,b=0;x=b,b=Xe(),x===38&&b===12&&(f[p]=1),!wt(b);)Me();return Nt(u,at)},Ei=function(u,f){var p=-1,x=44;do switch(wt(x)){case 0:x===38&&Xe()===12&&(f[p]=1),u[p]+=_i(at-1,f,p);break;case 2:u[p]+=Tn(x);break;case 4:if(x===44){u[++p]=Xe()===58?"&\f":"",f[p]=u[p].length;break}default:u[p]+=Le(x)}while(x=Me());return u},vo=function(u,f){return Kn(Ei(At(u),f))},Qn=new WeakMap,wo=function(u){if(!(u.type!=="rule"||!u.parent||u.length<1)){for(var f=u.value,p=u.parent,x=u.column===p.column&&u.line===p.line;p.type!=="rule";)if(p=p.parent,!p)return;if(!(u.props.length===1&&f.charCodeAt(0)!==58&&!Qn.get(p))&&!x){Qn.set(u,!0);for(var b=[],T=vo(f,b),z=p.props,X=0,Q=0;X<T.length;X++)for(var G=0;G<z.length;G++,Q++)u.props[Q]=b[X]?T[X].replace(/&\f/g,z[G]):z[G]+" "+T[X]}}},bo=function(u){if(u.type==="decl"){var f=u.value;f.charCodeAt(0)===108&&f.charCodeAt(2)===98&&(u.return="",u.value="")}};function Dr(a,u){switch(gt(a,u)){case 5103:return $e+"print-"+a+a;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return $e+a+a;case 5349:case 4246:case 4810:case 6968:case 2756:return $e+a+Zn+a+xt+a+a;case 6828:case 4268:return $e+a+xt+a+a;case 6165:return $e+a+xt+"flex-"+a+a;case 5187:return $e+a+ae(a,/(\w+).+(:[^]+)/,$e+"box-$1$2"+xt+"flex-$1$2")+a;case 5443:return $e+a+xt+"flex-item-"+ae(a,/flex-|-self/,"")+a;case 4675:return $e+a+xt+"flex-line-pack"+ae(a,/align-content|flex-|-self/,"")+a;case 5548:return $e+a+xt+ae(a,"shrink","negative")+a;case 5292:return $e+a+xt+ae(a,"basis","preferred-size")+a;case 6060:return $e+"box-"+ae(a,"-grow","")+$e+a+xt+ae(a,"grow","positive")+a;case 4554:return $e+ae(a,/([^-])(transform)/g,"$1"+$e+"$2")+a;case 6187:return ae(ae(ae(a,/(zoom-|grab)/,$e+"$1"),/(image-set)/,$e+"$1"),a,"")+a;case 5495:case 3959:return ae(a,/(image-set\([^]*)/,$e+"$1$`$1");case 4968:return ae(ae(a,/(.+:)(flex-)?(.*)/,$e+"box-pack:$3"+xt+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+$e+a+a;case 4095:case 3583:case 4068:case 2532:return ae(a,/(.+)-inline(.+)/,$e+"$1$2")+a;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(pt(a)-1-u>6)switch(Fe(a,u+1)){case 109:if(Fe(a,u+4)!==45)break;case 102:return ae(a,/(.+:)(.+)-([^]+)/,"$1"+$e+"$2-$3$1"+Zn+(Fe(a,u+3)==108?"$3":"$2-$3"))+a;case 115:return~ft(a,"stretch")?Dr(ae(a,"stretch","fill-available"),u)+a:a}break;case 4949:if(Fe(a,u+1)!==115)break;case 6444:switch(Fe(a,pt(a)-3-(~ft(a,"!important")&&10))){case 107:return ae(a,":",":"+$e)+a;case 101:return ae(a,/(.+:)([^;!]+)(;|!.+)?/,"$1"+$e+(Fe(a,14)===45?"inline-":"")+"box$3$1"+$e+"$2$3$1"+xt+"$2box$3")+a}break;case 5936:switch(Fe(a,u+11)){case 114:return $e+a+xt+ae(a,/[svh]\w+-[tblr]{2}/,"tb")+a;case 108:return $e+a+xt+ae(a,/[svh]\w+-[tblr]{2}/,"tb-rl")+a;case 45:return $e+a+xt+ae(a,/[svh]\w+-[tblr]{2}/,"lr")+a}return $e+a+xt+a+a}return a}var Ci=function(u,f,p,x){if(u.length>-1&&!u.return)switch(u.type){case Or:u.return=Dr(u.value,u.length);break;case An:return yn([le(u,{value:ae(u.value,"@","@"+$e)})],x);case $r:if(u.length)return et(u.props,function(b){switch(qe(b,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return yn([le(u,{props:[ae(b,/:(read-\w+)/,":"+Zn+"$1")]})],x);case"::placeholder":return yn([le(u,{props:[ae(b,/:(plac\w+)/,":"+$e+"input-$1")]}),le(u,{props:[ae(b,/:(plac\w+)/,":"+Zn+"$1")]}),le(u,{props:[ae(b,/:(plac\w+)/,xt+"input-$1")]})],x)}return""})}},Ni=[Ci],So=function(u){var f=u.key;if(f==="css"){var p=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(p,function(pe){var Te=pe.getAttribute("data-emotion");Te.indexOf(" ")!==-1&&(document.head.appendChild(pe),pe.setAttribute("data-s",""))})}var x=u.stylisPlugins||Ni,b={},T,z=[];T=u.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+f+' "]'),function(pe){for(var Te=pe.getAttribute("data-emotion").split(" "),Ne=1;Ne<Te.length;Ne++)b[Te[Ne]]=!0;z.push(pe)});var X,Q=[wo,bo];{var G,ie=[vi,yo(function(pe){G.insert(pe)})],_e=wi(Q.concat(x,ie)),Se=function(Te){return yn(bi(Te),_e)};X=function(Te,Ne,de,Pe){G=de,Se(Te?Te+"{"+Ne.styles+"}":Ne.styles),Pe&&(ge.inserted[Ne.name]=!0)}}var ge={key:f,sheet:new Ie({key:f,container:T,nonce:u.nonce,speedy:u.speedy,prepend:u.prepend,insertionPoint:u.insertionPoint}),nonce:u.nonce,inserted:b,registered:{},insert:X};return ge.sheet.hydrate(z),ge};function Mi(a){for(var u=0,f,p=0,x=a.length;x>=4;++p,x-=4)f=a.charCodeAt(p)&255|(a.charCodeAt(++p)&255)<<8|(a.charCodeAt(++p)&255)<<16|(a.charCodeAt(++p)&255)<<24,f=(f&65535)*1540483477+((f>>>16)*59797<<16),f^=f>>>24,u=(f&65535)*1540483477+((f>>>16)*59797<<16)^(u&65535)*1540483477+((u>>>16)*59797<<16);switch(x){case 3:u^=(a.charCodeAt(p+2)&255)<<16;case 2:u^=(a.charCodeAt(p+1)&255)<<8;case 1:u^=a.charCodeAt(p)&255,u=(u&65535)*1540483477+((u>>>16)*59797<<16)}return u^=u>>>13,u=(u&65535)*1540483477+((u>>>16)*59797<<16),((u^u>>>15)>>>0).toString(36)}var Ti={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function Ai(a){var u=Object.create(null);return function(f){return u[f]===void 0&&(u[f]=a(f)),u[f]}}var ki=!1,Pi=/[A-Z]|^ms/g,Ii=/_EMO_([^_]+?)_([^]*?)_EMO_/g,_o=function(u){return u.charCodeAt(1)===45},Eo=function(u){return u!=null&&typeof u!="boolean"},zr=Ai(function(a){return _o(a)?a:a.replace(Pi,"-$&").toLowerCase()}),Co=function(u,f){switch(u){case"animation":case"animationName":if(typeof f=="string")return f.replace(Ii,function(p,x,b){return zt={name:x,styles:b,next:zt},x})}return Ti[u]!==1&&!_o(u)&&typeof f=="number"&&f!==0?f+"px":f},Ri="Component selectors can only be used in conjunction with @emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware compiler transform.";function kn(a,u,f){if(f==null)return"";var p=f;if(p.__emotion_styles!==void 0)return p;switch(typeof f){case"boolean":return"";case"object":{var x=f;if(x.anim===1)return zt={name:x.name,styles:x.styles,next:zt},x.name;var b=f;if(b.styles!==void 0){var T=b.next;if(T!==void 0)for(;T!==void 0;)zt={name:T.name,styles:T.styles,next:zt},T=T.next;var z=b.styles+";";return z}return $i(a,u,f)}case"function":{if(a!==void 0){var X=zt,Q=f(a);return zt=X,kn(a,u,Q)}break}}var G=f;if(u==null)return G;var ie=u[G];return ie!==void 0?ie:G}function $i(a,u,f){var p="";if(Array.isArray(f))for(var x=0;x<f.length;x++)p+=kn(a,u,f[x])+";";else for(var b in f){var T=f[b];if(typeof T!="object"){var z=T;u!=null&&u[z]!==void 0?p+=b+"{"+u[z]+"}":Eo(z)&&(p+=zr(b)+":"+Co(b,z)+";")}else{if(b==="NO_COMPONENT_SELECTOR"&&ki)throw new Error(Ri);if(Array.isArray(T)&&typeof T[0]=="string"&&(u==null||u[T[0]]===void 0))for(var X=0;X<T.length;X++)Eo(T[X])&&(p+=zr(b)+":"+Co(b,T[X])+";");else{var Q=kn(a,u,T);switch(b){case"animation":case"animationName":{p+=zr(b)+":"+Q+";";break}default:p+=b+"{"+Q+"}"}}}}return p}var No=/label:\s*([^\s;\n{]+)\s*(;|$)/g,zt;function Qt(a,u,f){if(a.length===1&&typeof a[0]=="object"&&a[0]!==null&&a[0].styles!==void 0)return a[0];var p=!0,x="";zt=void 0;var b=a[0];if(b==null||b.raw===void 0)p=!1,x+=kn(f,u,b);else{var T=b;x+=T[0]}for(var z=1;z<a.length;z++)if(x+=kn(f,u,a[z]),p){var X=b;x+=X[z]}No.lastIndex=0;for(var Q="",G;(G=No.exec(x))!==null;)Q+="-"+G[1];var ie=Mi(x)+Q;return{name:ie,styles:x,next:zt}}var Oi=!0;function Lr(a,u,f){var p="";return f.split(" ").forEach(function(x){a[x]!==void 0?u.push(a[x]+";"):p+=x+" "}),p}var Mo=function(u,f,p){var x=u.key+"-"+f.name;(p===!1||Oi===!1)&&u.registered[x]===void 0&&(u.registered[x]=f.styles)},To=function(u,f,p){Mo(u,f,p);var x=u.key+"-"+f.name;if(u.inserted[f.name]===void 0){var b=f;do u.insert(f===b?"."+x:"",b,u.sheet,!0),b=b.next;while(b!==void 0)}};function Ao(a,u){if(a.inserted[u.name]===void 0)return a.insert("",u,a.sheet,!0)}function ko(a,u,f){var p=[],x=Lr(a,p,f);return p.length<2?f:x+u(p)}var Hr=function(u){var f=So(u);f.sheet.speedy=function(z){this.isSpeedy=z},f.compat=!0;var p=function(){for(var X=arguments.length,Q=new Array(X),G=0;G<X;G++)Q[G]=arguments[G];var ie=Qt(Q,f.registered,void 0);return To(f,ie,!1),f.key+"-"+ie.name},x=function(){for(var X=arguments.length,Q=new Array(X),G=0;G<X;G++)Q[G]=arguments[G];var ie=Qt(Q,f.registered),_e="animation-"+ie.name;return Ao(f,{name:ie.name,styles:"@keyframes "+_e+"{"+ie.styles+"}"}),_e},b=function(){for(var X=arguments.length,Q=new Array(X),G=0;G<X;G++)Q[G]=arguments[G];var ie=Qt(Q,f.registered);Ao(f,ie)},T=function(){for(var X=arguments.length,Q=new Array(X),G=0;G<X;G++)Q[G]=arguments[G];return ko(f.registered,p,Di(Q))};return{css:p,cx:T,injectGlobal:b,keyframes:x,hydrate:function(X){X.forEach(function(Q){f.inserted[Q]=!0})},flush:function(){f.registered={},f.inserted={},f.sheet.flush()},sheet:f.sheet,cache:f,getRegisteredStyles:Lr.bind(null,f.registered),merge:ko.bind(null,f.registered,p)}},Di=function a(u){for(var f="",p=0;p<u.length;p++){var x=u[p];if(x!=null){var b=void 0;switch(typeof x){case"boolean":break;case"object":{if(Array.isArray(x))b=a(x);else{b="";for(var T in x)x[T]&&T&&(b&&(b+=" "),b+=T)}break}default:b=x}b&&(f&&(f+=" "),f+=b)}}return f},Lt=Hr({key:"css"}),ea=Lt.flush,ta=Lt.hydrate,na=Lt.cx,ra=Lt.merge,oa=Lt.getRegisteredStyles,zi=Lt.injectGlobal,ia=Lt.keyframes,sa=Lt.css,aa=Lt.sheet,Li=Lt.cache,Po=function(){function a(){Be(this,a),Oe(this,"_cacheList",[Li])}return ze(a,[{key:"add",value:function(f){var p=this.getCache(f.key);return p||(this._cacheList.push(f),f)}},{key:"delete",value:function(f){this._cacheList=this._cacheList.filter(function(p){return p.key!==f.key})}},{key:"hasCache",value:function(f){return this._cacheList.some(function(p){return p.key===f.key})}},{key:"getCache",value:function(f){return this._cacheList.find(function(p){return p.key===f})}},{key:"getCacheList",value:function(){return this._cacheList}}]),a}(),_t=typeof document!="undefined",Fr=function(u,f){return"".concat(u,"-").concat(f)},Hi=function(u,f,p,x){var b=x.hashPriority||"high";Mo(u,f,p);var T=".".concat(Fr(u.key,f.name)),z=b==="low"?":where(".concat(T,")"):T;if(u.inserted[f.name]===void 0){var X="",Q=f;do{var G=u.insert(f===Q?z:"",Q,u.sheet,!0);!_t&&G!==void 0&&(X+=G),Q=Q.next}while(Q!==void 0);if(!_t&&X.length!==0)return X}},sn=function(u){return Ue(u)==="object"&&"styles"in u&&"name"in u&&"toString"in u},kt=function a(u){for(var f="",p=0;p<u.length;p++){var x=u[p];if(x!==null){var b=void 0;switch(Ue(x)){case"boolean":break;case"object":{if(Array.isArray(x))b=a(x);else{b="";for(var T in x)x[T]&&T&&(b&&(b+=" "),b+=T)}break}default:b=x}b&&(f&&(f+=" "),f+=b)}}return f},Fi=function(u,f,p){var x=[],b=Lr(u,x,p);return x.length<2?p:b+f(x)},Pn=function(u,f){return function(){for(var p=arguments.length,x=new Array(p),b=0;b<p;b++)x[b]=arguments[b];var T=Qt(x,u.registered,void 0);return Hi(u,T,!1,f),Fr(u.key,T.name)}},Br=function(u,f){return function(){for(var p=arguments.length,x=new Array(p),b=0;b<p;b++)x[b]=arguments[b];var T=x.map(function(z){return sn(z)?f(z):z});return Fi(u.registered,f,kt(T))}},an=function(u,f){var p=Pn(u,{hashPriority:f.hashPriority||"high",label:f.label}),x=Br(u,p);return{css:p,cx:x}},xn=function(){for(var u=arguments.length,f=new Array(u),p=0;p<u;p++)f[p]=arguments[p];return Qt(f)},Io=function(u){return(0,ne.createContext)(u)},Bi=ee(87462),Vr=function(u){var f=new WeakMap;return function(p){if(f.has(p))return f.get(p);var x=u(p);return f.set(p,x),x}},ca=function(u){return u()},Vi=lt.useInsertionEffect?lt.useInsertionEffect:!1,ua=null,Ro=Vi||ne.useLayoutEffect,Gt=!1,Jt=ne.createContext(typeof HTMLElement!="undefined"?So({key:"css"}):null),Jn=Jt.Provider,er=function(){return useContext(Jt)},$o=function(u){return(0,ne.forwardRef)(function(f,p){var x=(0,ne.useContext)(Jt);return u(f,x,p)})},Wt=ne.createContext({}),tr=function(){return React.useContext(Wt)},nr=function(u,f){if(typeof f=="function"){var p=f(u);return p}return(0,Bi.Z)({},u,f)},cn=Vr(function(a){return Vr(function(u){return nr(a,u)})}),rr=function(u){var f=ne.useContext(Wt);return u.theme!==f&&(f=cn(f)(u.theme)),ne.createElement(Wt.Provider,{value:f},u.children)};function or(a){var u=a.displayName||a.name||"Component",f=function(b,T){var z=React.useContext(Wt);return React.createElement(a,_extends({theme:z,ref:T},b))},p=React.forwardRef(f);return p.displayName="WithTheme("+u+")",hoistNonReactStatics(p,a)}var Oo={}.hasOwnProperty,Yr="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",la=function(u,f){var p={};for(var x in f)Oo.call(f,x)&&(p[x]=f[x]);return p[Yr]=u,p},Xr=function(u){var f=u.cache,p=u.serialized,x=u.isStringTag;return registerStyles(f,p,x),useInsertionEffectAlwaysWithSyncFallback(function(){return insertStyles(f,p,x)}),null},Yi=null,fa=null,Xi=ee(8679),da=function(u,f){var p=arguments;if(f==null||!hasOwn.call(f,"css"))return React.createElement.apply(void 0,p);var x=p.length,b=new Array(x);b[0]=Emotion,b[1]=createEmotionProps(u,f);for(var T=2;T<x;T++)b[T]=p[T];return React.createElement.apply(null,b)},Gi=$o(function(a,u){var f=a.styles,p=Qt([f],void 0,ne.useContext(Wt)),x=ne.useRef();return Ro(function(){var b=u.key+"-global",T=new u.sheet.constructor({key:b,nonce:u.sheet.nonce,container:u.sheet.container,speedy:u.sheet.isSpeedy}),z=!1,X=document.querySelector('style[data-emotion="'+b+" "+p.name+'"]');return u.sheet.tags.length&&(T.before=u.sheet.tags[0]),X!==null&&(z=!0,X.setAttribute("data-emotion",b),T.hydrate([X])),x.current=[T,z],function(){T.flush()}},[u]),Ro(function(){var b=x.current,T=b[0],z=b[1];if(z){b[1]=!1;return}if(p.next!==void 0&&To(u,p.next,!0),T.tags.length){var X=T.tags[T.tags.length-1].nextElementSibling;T.before=X,T.flush()}u.insert("",p,T,!1)},[u,p.name]),null});function Gr(){for(var a=arguments.length,u=new Array(a),f=0;f<a;f++)u[f]=arguments[f];return serializeStyles(u)}var Wi=function(){var u=Gr.apply(void 0,arguments),f="animation-"+u.name;return{name:f,styles:"@keyframes "+f+"{"+u.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},ha=function a(u){for(var f=u.length,p=0,x="";p<f;p++){var b=u[p];if(b!=null){var T=void 0;switch(typeof b){case"boolean":break;case"object":{if(Array.isArray(b))T=a(b);else{T="";for(var z in b)b[z]&&z&&(T&&(T+=" "),T+=z)}break}default:T=b}T&&(x&&(x+=" "),x+=T)}}return x};function pa(a,u,f){var p=[],x=getRegisteredStyles(a,p,f);return p.length<2?f:x+u(p)}var Ui=function(u){var f=u.cache,p=u.serializedArr;return useInsertionEffectAlwaysWithSyncFallback(function(){for(var x=0;x<p.length;x++)insertStyles(f,p[x],!1)}),null},ji=null,Et=ee(85893),ir=function(u){return function(){for(var f=arguments.length,p=new Array(f),x=0;x<f;x++)p[x]=arguments[x];return(0,ne.memo)(function(b){var T=u();return(0,Et.jsx)(Gi,{styles:Qt(p,void 0,m(m({},b),{},{theme:T}))})})}},Do=function(u){return function(f){var p=u(f);return function(x){var b=p(x),T=b.styles;return T}}};function Wr(a,u){if(a==null)return{};var f={};for(var p in a)if({}.hasOwnProperty.call(a,p)){if(u.includes(p))continue;f[p]=a[p]}return f}function un(a,u){if(a==null)return{};var f,p,x=Wr(a,u);if(Object.getOwnPropertySymbols){var b=Object.getOwnPropertySymbols(a);for(p=0;p<b.length;p++)f=b[p],u.includes(f)||{}.propertyIsEnumerable.call(a,f)&&(x[f]=a[f])}return x}var sr=ee(85088),Ur=["children","prefix","speedy","getStyleManager","container","nonce","insertionPoint","stylisPlugins","linters"],Ht=function(u){return(0,ne.memo)(function(f){var p=f.children,x=f.prefix,b=f.speedy,T=f.getStyleManager,z=f.container,X=f.nonce,Q=f.insertionPoint,G=f.stylisPlugins,ie=f.linters,_e=un(f,Ur),Se=(0,ne.useContext)(u),ge=x!=null?x:Se.sheet.key,pe=z!=null?z:Se.sheet.container,Te=b!=null?b:Se.sheet.isSpeedy,Ne=(0,ne.useMemo)(function(){var Pe=!1,Ye=Hr({speedy:Te!=null?Te:Pe,key:ge,container:pe,nonce:X,insertionPoint:Q,stylisPlugins:G});if(typeof ee.g!="undefined"){var ut=ee.g.__ANTD_STYLE_CACHE_MANAGER_FOR_SSR__;ut&&(Ye.cache=ut.add(Ye.cache))}return Ye},[ge,Te,pe,X,Q,G]);(0,ne.useEffect)(function(){T==null||T(Ne)},[Ne]);var de=(0,Et.jsx)(u.Provider,{value:Ne,children:p});return Object.keys(_e).length||pe?(0,Et.jsx)(sr.V9,m(m({linters:ie,container:pe},_e),{},{children:de})):de})};function Pt(a){if(Array.isArray(a))return a}function Ki(a,u){var f=a==null?null:typeof Symbol!="undefined"&&a[Symbol.iterator]||a["@@iterator"];if(f!=null){var p,x,b,T,z=[],X=!0,Q=!1;try{if(b=(f=f.call(a)).next,u===0){if(Object(f)!==f)return;X=!1}else for(;!(X=(p=b.call(f)).done)&&(z.push(p.value),z.length!==u);X=!0);}catch(G){Q=!0,x=G}finally{try{if(!X&&f.return!=null&&(T=f.return(),Object(T)!==T))return}finally{if(Q)throw x}}return z}}function vn(a,u){(u==null||u>a.length)&&(u=a.length);for(var f=0,p=Array(u);f<u;f++)p[f]=a[f];return p}function zo(a,u){if(a){if(typeof a=="string")return vn(a,u);var f={}.toString.call(a).slice(8,-1);return f==="Object"&&a.constructor&&(f=a.constructor.name),f==="Map"||f==="Set"?Array.from(a):f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f)?vn(a,u):void 0}}function en(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  3. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ft(a,u){return Pt(a)||Ki(a,u)||zo(a,u)||en()}var In=ee(9361),ar=function(){var u=In.Z.useToken(),f=u.token;return f},cr=function(u){return m(m({},u),{},{mobile:u.xs,tablet:u.md,laptop:u.lg,desktop:u.xxl})},Zi=function(){var u=ar(),f={xs:"@media (max-width: ".concat(u.screenXSMax,"px)"),sm:"@media (max-width: ".concat(u.screenSMMax,"px)"),md:"@media (max-width: ".concat(u.screenMDMax,"px)"),lg:"@media (max-width: ".concat(u.screenLGMax,"px)"),xl:"@media (max-width: ".concat(u.screenXLMax,"px)"),xxl:"@media (min-width: ".concat(u.screenXXLMin,"px)")};return(0,ne.useMemo)(function(){return cr(f)},[u])},qi=function(u,f){return Object.entries(u).map(function(p){var x=Ft(p,2),b=x[0],T=x[1],z=T;return sn(T)||(z=xn(T)),f[b]?"".concat(f[b]," {").concat(z.styles,"}"):""}).join("")},Lo=["stylish","appearance","isDarkMode","prefixCls","iconPrefixCls"],Qi=["prefixCls","iconPrefixCls"],Ji=function(u){var f=u.hashPriority,p=u.useTheme,x=u.EmotionContext;return function(b,T){var z=T==null?void 0:T.__BABEL_FILE_NAME__,X=!!z;return function(Q){var G=p(),ie=(0,ne.useContext)(x),_e=ie.cache,Se=an(_e,{hashPriority:(T==null?void 0:T.hashPriority)||f,label:T==null?void 0:T.label}),ge=Se.cx,pe=Se.css,Te=Zi(),Ne=(0,ne.useMemo)(function(){var de;if(b instanceof Function){var Pe=G.stylish,Ye=G.appearance,ut=G.isDarkMode,Qe=G.prefixCls,Ee=G.iconPrefixCls,mt=un(G,Lo),jt=function(_n){return qi(_n,Te)};Object.assign(jt,Te),de=b({token:mt,stylish:Pe,appearance:Ye,isDarkMode:ut,prefixCls:Qe,iconPrefixCls:Ee,cx:ge,css:xn,responsive:jt},Q)}else de=b;return Ue(de)==="object"&&(sn(de)?de=pe(de):de=Object.fromEntries(Object.entries(de).map(function(Kt){var _n=Ft(Kt,2),Ln=_n[0],yr=_n[1],as=X?"".concat(z,"-").concat(Ln):void 0;return Ue(yr)==="object"?X?[Ln,pe(yr,"label:".concat(as))]:[Ln,pe(yr)]:[Ln,yr]}))),de},[Q,G]);return(0,ne.useMemo)(function(){var de=G.prefixCls,Pe=G.iconPrefixCls,Ye=un(G,Qi);return{styles:Ne,cx:ge,theme:Ye,prefixCls:de,iconPrefixCls:Pe}},[Ne,G])}}},Ho=rr,jr=Wt,ma=function(u){if(!u.ThemeContext)throw"ThemeContext is required. Please check your config.";jr=u.ThemeContext,Ho=createStyledThemeProvider(u)},ur=function(u){if(u.ThemeProvider)return u.ThemeProvider;var f=u.ThemeContext;return function(p){return(0,Et.jsx)(f.Provider,{value:p.theme,children:p.children})}};function Kr(a){if(Array.isArray(a))return vn(a)}function Fo(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Rn(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
  4. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function $n(a){return Kr(a)||Fo(a)||zo(a)||Rn()}var lr=ee(45360),wn=ee(26855),On=ee(85576),It=ee(28459),bn=function(u){return typeof window!="undefined"?matchMedia&&matchMedia("(prefers-color-scheme: ".concat(u,")")):{matches:!1}},Zr,Bo=(0,ne.createContext)({appearance:"light",setAppearance:function(){},isDarkMode:!1,themeMode:"light",setThemeMode:function(){},browserPrefers:(Zr=bn("dark"))!==null&&Zr!==void 0&&Zr.matches?"dark":"light"}),fr=function(){return(0,ne.useContext)(Bo)},Vo=(0,ne.memo)(function(a){var u=a.children,f=a.theme,p=a.prefixCls,x=a.getStaticInstance,b=a.staticInstanceConfig,T=fr(),z=T.appearance,X=T.isDarkMode,Q=lr.ZP.useMessage(b==null?void 0:b.message),G=Ft(Q,2),ie=G[0],_e=G[1],Se=wn.ZP.useNotification(b==null?void 0:b.notification),ge=Ft(Se,2),pe=ge[0],Te=ge[1],Ne=On.Z.useModal(),de=Ft(Ne,2),Pe=de[0],Ye=de[1];(0,ne.useEffect)(function(){x==null||x({message:ie,modal:Pe,notification:pe})},[]);var ut=(0,ne.useMemo)(function(){var Qe=X?In.Z.darkAlgorithm:In.Z.defaultAlgorithm,Ee=f;if(typeof f=="function"&&(Ee=f(z)),!Ee)return{algorithm:Qe};var mt=Ee.algorithm?Ee.algorithm instanceof Array?Ee.algorithm:[Ee.algorithm]:[];return m(m({},Ee),{},{algorithm:Ee.algorithm?[Qe].concat($n(mt)):Qe})},[f,X]);return(0,Et.jsxs)(It.ZP,{prefixCls:p,theme:ut,children:[_e,Te,Ye,u]})});Vo.displayName="AntdProvider";var es=Vo;function ts(a,u){var f=a==null?null:typeof Symbol!="undefined"&&a[Symbol.iterator]||a["@@iterator"];if(f!=null){var p,x,b,T,z=[],X=!0,Q=!1;try{if(b=(f=f.call(a)).next,u===0){if(Object(f)!==f)return;X=!1}else for(;!(X=(p=b.call(f)).done)&&(z.push(p.value),z.length!==u);X=!0);}catch(G){Q=!0,x=G}finally{try{if(!X&&f.return!=null&&(T=f.return(),Object(T)!==T))return}finally{if(Q)throw x}}return z}}function Yo(a,u){return Xo(a)||ts(a,u)||ns(a,u)||Wo()}function Xo(a){if(Array.isArray(a))return a}function ns(a,u){if(a){if(typeof a=="string")return Go(a,u);var f=Object.prototype.toString.call(a).slice(8,-1);if(f==="Object"&&a.constructor&&(f=a.constructor.name),f==="Map"||f==="Set")return Array.from(a);if(f==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(f))return Go(a,u)}}function Go(a,u){(u==null||u>a.length)&&(u=a.length);for(var f=0,p=new Array(u);f<u;f++)p[f]=a[f];return p}function Wo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
  5. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Dn(a,u){var f=u||{},p=f.defaultValue,x=f.value,b=f.onChange,T=f.postState,z=ne.useState(function(){return x!==void 0?x:p!==void 0?typeof p=="function"?p():p:typeof a=="function"?a():a}),X=Yo(z,2),Q=X[0],G=X[1],ie=x!==void 0?x:Q;T&&(ie=T(ie));function _e(Se){G(Se),ie!==Se&&b&&b(Se,ie)}return[ie,_e]}var qr=Dn,Sn=function(u){typeof ne.startTransition=="function"?(0,ne.startTransition)(u):u()},tn,rs=function(u){var f=u.themeMode,p=u.setAppearance,x=u.setBrowserPrefers,b=function(){Sn(function(){bn("dark").matches?p("dark"):p("light")})},T=function(){Sn(function(){bn("dark").matches?x("dark"):x("light")})};return(0,ne.useLayoutEffect)(function(){if(f!=="auto"){Sn(function(){p(f)});return}return setTimeout(b,1),tn||(tn=bn("dark")),tn.addEventListener("change",b),function(){tn.removeEventListener("change",b)}},[f]),(0,ne.useLayoutEffect)(function(){return tn||(tn=bn("dark")),tn.addEventListener("change",T),function(){tn.removeEventListener("change",T)}},[]),null},bt=(0,ne.memo)(function(a){var u,f=a.children,p=a.appearance,x=a.defaultAppearance,b=a.onAppearanceChange,T=a.themeMode,z=a.defaultThemeMode,X=a.onThemeModeChange,Q=a.useTheme,G=Q(),ie=G.appearance,_e=G.themeMode,Se=qr("light",{value:T,defaultValue:z!=null?z:_e,onChange:function(Kt){return X==null?void 0:X(Kt)}}),ge=Ft(Se,2),pe=ge[0],Te=ge[1],Ne=qr("light",{value:p,defaultValue:x!=null?x:ie,onChange:function(Kt){return b==null?void 0:b(Kt)}}),de=Ft(Ne,2),Pe=de[0],Ye=de[1],ut=(0,ne.useState)((u=bn("dark"))!==null&&u!==void 0&&u.matches?"dark":"light"),Qe=Ft(ut,2),Ee=Qe[0],mt=Qe[1];return(0,Et.jsxs)(Bo.Provider,{value:{themeMode:pe,setThemeMode:Te,appearance:Pe,setAppearance:Ye,isDarkMode:Pe==="dark",browserPrefers:Ee},children:[typeof window!="undefined"&&(0,Et.jsx)(rs,{themeMode:pe,setAppearance:Ye,setBrowserPrefers:mt}),f]})});bt.displayName="ThemeSwitcher";var Uo=bt,os=function(u){var f=u.css,p=u.token;return{buttonDefaultHover:f({backgroundColor:p.colorBgContainer,border:"1px solid ".concat(p.colorBorder),cursor:"pointer",":hover":{color:p.colorPrimaryHover,borderColor:p.colorPrimaryHover},":active":{color:p.colorPrimaryActive,borderColor:p.colorPrimaryActive}})}},jo=function(u){return Object.fromEntries(Object.entries(u).map(function(f){var p=Ft(f,2),x=p[0],b=p[1];return[x,b.styles]}))},dr=function(){var u=ar(),f=fr(),p=f.appearance,x=f.isDarkMode;return(0,ne.useMemo)(function(){return jo(os({token:u,css:xn,appearance:p,isDarkMode:x}))},[u,p,x])},nn=function(){var u=ar(),f=dr();return(0,ne.useMemo)(function(){return m(m({},u),{},{stylish:f})},[u,f])},ln=["stylish"],Ko=function(u){var f=u.children,p=u.customToken,x=u.defaultCustomToken,b=u.customStylish,T=u.prefixCls,z=u.StyledThemeProvider,X=fr(),Q=X.appearance,G=X.isDarkMode,ie=nn(),_e=ie.stylish,Se=un(ie,ln),ge=(0,ne.useMemo)(function(){return x?x instanceof Function?x({token:Se,appearance:Q,isDarkMode:G}):x:{}},[x,Se,Q]),pe=(0,ne.useMemo)(function(){return p instanceof Function?m(m({},ge),p({token:Se,appearance:Q,isDarkMode:G})):m(m({},ge),p)},[ge,p,Se,Q]),Te=(0,ne.useMemo)(function(){return b?b({token:m(m({},Se),pe),stylish:_e,appearance:Q,isDarkMode:G,css:xn}):{}},[b,Se,pe,_e,Q]),Ne=(0,ne.useMemo)(function(){return m(m({},Te),_e)},[Te,_e]),de=m(m(m(m({},Se),pe),{},{stylish:Ne},X),{},{prefixCls:T});return(0,Et.jsx)(z,{theme:de,children:f})},Zo=Ko,is=function(u){var f=u.styledConfig?ur(u.styledConfig):void 0,p=u.StyleEngineContext;return(0,ne.memo)(function(x){var b=x.children,T=x.customToken,z=x.customStylish,X=x.theme,Q=x.getStaticInstance,G=x.prefixCls,ie=x.staticInstanceConfig,_e=x.appearance,Se=x.defaultAppearance,ge=x.onAppearanceChange,pe=x.themeMode,Te=x.defaultThemeMode,Ne=x.onThemeModeChange,de=x.styled,Pe=(0,ne.useContext)(p),Ye=Pe.prefixCls,ut=Pe.StyledThemeContext,Qe=Pe.CustomThemeContext,Ee=(0,ne.useContext)(Qe),mt=de?ur(de):f||Ho,jt=G||Ye;return(0,Et.jsx)(p.Provider,{value:{prefixCls:jt,StyledThemeContext:(de==null?void 0:de.ThemeContext)||ut||jr,CustomThemeContext:Qe},children:(0,Et.jsx)(Uo,{themeMode:pe,defaultThemeMode:Te,onThemeModeChange:Ne,defaultAppearance:Se,appearance:_e,onAppearanceChange:ge,useTheme:u.useTheme,children:(0,Et.jsx)(es,{prefixCls:jt,staticInstanceConfig:ie,theme:X,getStaticInstance:Q,children:(0,Et.jsx)(Zo,{prefixCls:jt,customToken:T,defaultCustomToken:Ee,customStylish:z,StyledThemeProvider:mt,children:b})})})})})},Rt=function(u){return function(){var f=u.StyleEngineContext,p=(0,ne.useContext)(f),x=p.StyledThemeContext,b=p.CustomThemeContext,T=p.prefixCls,z=nn(),X=fr(),Q=(0,ne.useContext)(b),G=(0,ne.useContext)(x!=null?x:jr)||{},ie=(0,ne.useContext)(It.ZP.ConfigContext),_e=ie.iconPrefixCls,Se=ie.getPrefixCls,ge=Se(),pe=T&&T!=="ant"?T:ge,Te=(0,ne.useMemo)(function(){return m(m(m(m({},z),X),Q),{},{prefixCls:pe,iconPrefixCls:_e})},[z,X,Q,pe,_e]);return!G||Object.keys(G).length===0?Te:m(m({},G),{},{prefixCls:pe,iconPrefixCls:_e})}},Qr=new Po;typeof ee.g!="undefined"&&(ee.g.__ANTD_STYLE_CACHE_MANAGER_FOR_SSR__=Qr);var hr=function(u){var f,p,x,b=m(m({},u),{},{key:(f=u.key)!==null&&f!==void 0?f:"zcss",speedy:(p=u.speedy)!==null&&p!==void 0?p:!1}),T=Hr({key:b.key,speedy:b.speedy,container:b.container}),z=Io(T),X=Ht(z);T.cache=Qr.add(T.cache);var Q=(0,ne.createContext)(b.customToken?b.customToken:{}),G=(x=b.styled)===null||x===void 0?void 0:x.ThemeContext,ie=(0,ne.createContext)({CustomThemeContext:Q,StyledThemeContext:G,prefixCls:b==null?void 0:b.prefixCls,iconPrefixCls:b==null?void 0:b.iconPrefixCls}),_e=Rt({StyleEngineContext:ie}),Se=Ji({hashPriority:b.hashPriority,useTheme:_e,EmotionContext:z}),ge=ir(_e),pe=Do(Se),Te=is({styledConfig:b.styled,StyleEngineContext:ie,useTheme:_e});Te.displayName="AntdStyleThemeProvider";var Ne=an(T.cache,{hashPriority:b.hashPriority}),de=Ne.cx,Pe=T.injectGlobal,Ye=T.keyframes;return{createStyles:Se,createGlobalStyle:ge,createStylish:pe,css:xn,cx:de,keyframes:Ye,injectGlobal:Pe,styleManager:T,useTheme:_e,StyleProvider:X,ThemeProvider:Te}},Mt=hr({key:be,speedy:!1}),Jr=Mt.createStyles,ss=Mt.createGlobalStyle,pr=Mt.createStylish,mr=Mt.css,eo=Mt.cx,zn=Mt.keyframes,gr=Mt.injectGlobal,Ut=Mt.styleManager,ga=Mt.ThemeProvider,ya=Mt.StyleProvider,xa=Mt.useTheme},8679:function(ye,se,ee){"use strict";var be=ee(59864),Ue={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},je={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},He={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Oe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},Ze={};Ze[be.ForwardRef]=He,Ze[be.Memo]=Oe;function m(De){return be.isMemo(De)?Oe:Ze[De.$$typeof]||Ue}var ne=Object.defineProperty,lt=Object.getOwnPropertyNames,Be=Object.getOwnPropertySymbols,Ce=Object.getOwnPropertyDescriptor,ze=Object.getPrototypeOf,Ge=Object.prototype;function Ve(De,Ie,xe){if(typeof Ie!="string"){if(Ge){var Le=ze(Ie);Le&&Le!==Ge&&Ve(De,Le,xe)}var ue=lt(Ie);Be&&(ue=ue.concat(Be(Ie)));for(var gt=m(De),Z=m(Ie),qe=0;qe<ue.length;++qe){var ae=ue[qe];if(!je[ae]&&!(xe&&xe[ae])&&!(Z&&Z[ae])&&!(gt&&gt[ae])){var ft=Ce(Ie,ae);try{ne(De,ae,ft)}catch(Fe){}}}}return De}ye.exports=Ve},69921:function(ye,se){"use strict";var ee=typeof Symbol=="function"&&Symbol.for,be=ee?Symbol.for("react.element"):60103,Ue=ee?Symbol.for("react.portal"):60106,je=ee?Symbol.for("react.fragment"):60107,He=ee?Symbol.for("react.strict_mode"):60108,Oe=ee?Symbol.for("react.profiler"):60114,Ze=ee?Symbol.for("react.provider"):60109,m=ee?Symbol.for("react.context"):60110,ne=ee?Symbol.for("react.async_mode"):60111,lt=ee?Symbol.for("react.concurrent_mode"):60111,Be=ee?Symbol.for("react.forward_ref"):60112,Ce=ee?Symbol.for("react.suspense"):60113,ze=ee?Symbol.for("react.suspense_list"):60120,Ge=ee?Symbol.for("react.memo"):60115,Ve=ee?Symbol.for("react.lazy"):60116,De=ee?Symbol.for("react.block"):60121,Ie=ee?Symbol.for("react.fundamental"):60117,xe=ee?Symbol.for("react.responder"):60118,Le=ee?Symbol.for("react.scope"):60119;function ue(Z){if(typeof Z=="object"&&Z!==null){var qe=Z.$$typeof;switch(qe){case be:switch(Z=Z.type,Z){case ne:case lt:case je:case Oe:case He:case Ce:return Z;default:switch(Z=Z&&Z.$$typeof,Z){case m:case Be:case Ve:case Ge:case Ze:return Z;default:return qe}}case Ue:return qe}}}function gt(Z){return ue(Z)===lt}se.AsyncMode=ne,se.ConcurrentMode=lt,se.ContextConsumer=m,se.ContextProvider=Ze,se.Element=be,se.ForwardRef=Be,se.Fragment=je,se.Lazy=Ve,se.Memo=Ge,se.Portal=Ue,se.Profiler=Oe,se.StrictMode=He,se.Suspense=Ce,se.isAsyncMode=function(Z){return gt(Z)||ue(Z)===ne},se.isConcurrentMode=gt,se.isContextConsumer=function(Z){return ue(Z)===m},se.isContextProvider=function(Z){return ue(Z)===Ze},se.isElement=function(Z){return typeof Z=="object"&&Z!==null&&Z.$$typeof===be},se.isForwardRef=function(Z){return ue(Z)===Be},se.isFragment=function(Z){return ue(Z)===je},se.isLazy=function(Z){return ue(Z)===Ve},se.isMemo=function(Z){return ue(Z)===Ge},se.isPortal=function(Z){return ue(Z)===Ue},se.isProfiler=function(Z){return ue(Z)===Oe},se.isStrictMode=function(Z){return ue(Z)===He},se.isSuspense=function(Z){return ue(Z)===Ce},se.isValidElementType=function(Z){return typeof Z=="string"||typeof Z=="function"||Z===je||Z===lt||Z===Oe||Z===He||Z===Ce||Z===ze||typeof Z=="object"&&Z!==null&&(Z.$$typeof===Ve||Z.$$typeof===Ge||Z.$$typeof===Ze||Z.$$typeof===m||Z.$$typeof===Be||Z.$$typeof===Ie||Z.$$typeof===xe||Z.$$typeof===Le||Z.$$typeof===De)},se.typeOf=ue},59864:function(ye,se,ee){"use strict";ye.exports=ee(69921)},50139:function(ye,se,ee){"use strict";var be=ee(67294),Ue=ee(61688);function je(Be,Ce){return Be===Ce&&(Be!==0||1/Be===1/Ce)||Be!==Be&&Ce!==Ce}var He=typeof Object.is=="function"?Object.is:je,Oe=Ue.useSyncExternalStore,Ze=be.useRef,m=be.useEffect,ne=be.useMemo,lt=be.useDebugValue;se.useSyncExternalStoreWithSelector=function(Be,Ce,ze,Ge,Ve){var De=Ze(null);if(De.current===null){var Ie={hasValue:!1,value:null};De.current=Ie}else Ie=De.current;De=ne(function(){function Le(ae){if(!ue){if(ue=!0,gt=ae,ae=Ge(ae),Ve!==void 0&&Ie.hasValue){var ft=Ie.value;if(Ve(ft,ae))return Z=ft}return Z=ae}if(ft=Z,He(gt,ae))return ft;var Fe=Ge(ae);return Ve!==void 0&&Ve(ft,Fe)?ft:(gt=ae,Z=Fe)}var ue=!1,gt,Z,qe=ze===void 0?null:ze;return[function(){return Le(Ce())},qe===null?void 0:function(){return Le(qe())}]},[Ce,ze,Ge,Ve]);var xe=Oe(Be,De[0],De[1]);return m(function(){Ie.hasValue=!0,Ie.value=xe},[xe]),lt(xe),xe}},52798:function(ye,se,ee){"use strict";ye.exports=ee(50139)},40298:function(ye,se,ee){var be=ee(56055).default;function Ue(){"use strict";ye.exports=Ue=function(){return He},ye.exports.__esModule=!0,ye.exports.default=ye.exports;var je,He={},Oe=Object.prototype,Ze=Oe.hasOwnProperty,m=Object.defineProperty||function(H,D,j){H[D]=j.value},ne=typeof Symbol=="function"?Symbol:{},lt=ne.iterator||"@@iterator",Be=ne.asyncIterator||"@@asyncIterator",Ce=ne.toStringTag||"@@toStringTag";function ze(H,D,j){return Object.defineProperty(H,D,{value:j,enumerable:!0,configurable:!0,writable:!0}),H[D]}try{ze({},"")}catch(H){ze=function(j,le,ve){return j[le]=ve}}function Ge(H,D,j,le){var ve=D&&D.prototype instanceof gt?D:gt,me=Object.create(ve.prototype),Me=new Xt(le||[]);return m(me,"_invoke",{value:Dt(H,j,Me)}),me}function Ve(H,D,j){try{return{type:"normal",arg:H.call(D,j)}}catch(le){return{type:"throw",arg:le}}}He.wrap=Ge;var De="suspendedStart",Ie="suspendedYield",xe="executing",Le="completed",ue={};function gt(){}function Z(){}function qe(){}var ae={};ze(ae,lt,function(){return this});var ft=Object.getPrototypeOf,Fe=ft&&ft(ft(at([])));Fe&&Fe!==Oe&&Ze.call(Fe,lt)&&(ae=Fe);var ht=qe.prototype=gt.prototype=Object.create(ae);function pt(H){["next","throw","return"].forEach(function(D){ze(H,D,function(j){return this._invoke(D,j)})})}function St(H,D){function j(ve,me,Me,Xe){var ct=Ve(H[ve],H,me);if(ct.type!=="throw"){var Nt=ct.arg,wt=Nt.value;return wt&&be(wt)=="object"&&Ze.call(wt,"__await")?D.resolve(wt.__await).then(function(At){j("next",At,Me,Xe)},function(At){j("throw",At,Me,Xe)}):D.resolve(wt).then(function(At){Nt.value=At,Me(Nt)},function(At){return j("throw",At,Me,Xe)})}Xe(ct.arg)}var le;m(this,"_invoke",{value:function(me,Me){function Xe(){return new D(function(ct,Nt){j(me,Me,ct,Nt)})}return le=le?le.then(Xe,Xe):Xe()}})}function Dt(H,D,j){var le=De;return function(ve,me){if(le===xe)throw Error("Generator is already running");if(le===Le){if(ve==="throw")throw me;return{value:je,done:!0}}for(j.method=ve,j.arg=me;;){var Me=j.delegate;if(Me){var Xe=et(Me,j);if(Xe){if(Xe===ue)continue;return Xe}}if(j.method==="next")j.sent=j._sent=j.arg;else if(j.method==="throw"){if(le===De)throw le=Le,j.arg;j.dispatchException(j.arg)}else j.method==="return"&&j.abrupt("return",j.arg);le=xe;var ct=Ve(H,D,j);if(ct.type==="normal"){if(le=j.done?Le:Ie,ct.arg===ue)continue;return{value:ct.arg,done:j.done}}ct.type==="throw"&&(le=Le,j.method="throw",j.arg=ct.arg)}}}function et(H,D){var j=D.method,le=H.iterator[j];if(le===je)return D.delegate=null,j==="throw"&&H.iterator.return&&(D.method="return",D.arg=je,et(H,D),D.method==="throw")||j!=="return"&&(D.method="throw",D.arg=new TypeError("The iterator does not provide a '"+j+"' method")),ue;var ve=Ve(le,H.iterator,D.arg);if(ve.type==="throw")return D.method="throw",D.arg=ve.arg,D.delegate=null,ue;var me=ve.arg;return me?me.done?(D[H.resultName]=me.value,D.next=H.nextLoc,D.method!=="return"&&(D.method="next",D.arg=je),D.delegate=null,ue):me:(D.method="throw",D.arg=new TypeError("iterator result is not an object"),D.delegate=null,ue)}function yt(H){var D={tryLoc:H[0]};1 in H&&(D.catchLoc=H[1]),2 in H&&(D.finallyLoc=H[2],D.afterLoc=H[3]),this.tryEntries.push(D)}function nt(H){var D=H.completion||{};D.type="normal",delete D.arg,H.completion=D}function Xt(H){this.tryEntries=[{tryLoc:"root"}],H.forEach(yt,this),this.reset(!0)}function at(H){if(H||H===""){var D=H[lt];if(D)return D.call(H);if(typeof H.next=="function")return H;if(!isNaN(H.length)){var j=-1,le=function ve(){for(;++j<H.length;)if(Ze.call(H,j))return ve.value=H[j],ve.done=!1,ve;return ve.value=je,ve.done=!0,ve};return le.next=le}}throw new TypeError(be(H)+" is not iterable")}return Z.prototype=qe,m(ht,"constructor",{value:qe,configurable:!0}),m(qe,"constructor",{value:Z,configurable:!0}),Z.displayName=ze(qe,Ce,"GeneratorFunction"),He.isGeneratorFunction=function(H){var D=typeof H=="function"&&H.constructor;return!!D&&(D===Z||(D.displayName||D.name)==="GeneratorFunction")},He.mark=function(H){return Object.setPrototypeOf?Object.setPrototypeOf(H,qe):(H.__proto__=qe,ze(H,Ce,"GeneratorFunction")),H.prototype=Object.create(ht),H},He.awrap=function(H){return{__await:H}},pt(St.prototype),ze(St.prototype,Be,function(){return this}),He.AsyncIterator=St,He.async=function(H,D,j,le,ve){ve===void 0&&(ve=Promise);var me=new St(Ge(H,D,j,le),ve);return He.isGeneratorFunction(D)?me:me.next().then(function(Me){return Me.done?Me.value:me.next()})},pt(ht),ze(ht,Ce,"Generator"),ze(ht,lt,function(){return this}),ze(ht,"toString",function(){return"[object Generator]"}),He.keys=function(H){var D=Object(H),j=[];for(var le in D)j.push(le);return j.reverse(),function ve(){for(;j.length;){var me=j.pop();if(me in D)return ve.value=me,ve.done=!1,ve}return ve.done=!0,ve}},He.values=at,Xt.prototype={constructor:Xt,reset:function(D){if(this.prev=0,this.next=0,this.sent=this._sent=je,this.done=!1,this.delegate=null,this.method="next",this.arg=je,this.tryEntries.forEach(nt),!D)for(var j in this)j.charAt(0)==="t"&&Ze.call(this,j)&&!isNaN(+j.slice(1))&&(this[j]=je)},stop:function(){this.done=!0;var D=this.tryEntries[0].completion;if(D.type==="throw")throw D.arg;return this.rval},dispatchException:function(D){if(this.done)throw D;var j=this;function le(Nt,wt){return Me.type="throw",Me.arg=D,j.next=Nt,wt&&(j.method="next",j.arg=je),!!wt}for(var ve=this.tryEntries.length-1;ve>=0;--ve){var me=this.tryEntries[ve],Me=me.completion;if(me.tryLoc==="root")return le("end");if(me.tryLoc<=this.prev){var Xe=Ze.call(me,"catchLoc"),ct=Ze.call(me,"finallyLoc");if(Xe&&ct){if(this.prev<me.catchLoc)return le(me.catchLoc,!0);if(this.prev<me.finallyLoc)return le(me.finallyLoc)}else if(Xe){if(this.prev<me.catchLoc)return le(me.catchLoc,!0)}else{if(!ct)throw Error("try statement without catch or finally");if(this.prev<me.finallyLoc)return le(me.finallyLoc)}}}},abrupt:function(D,j){for(var le=this.tryEntries.length-1;le>=0;--le){var ve=this.tryEntries[le];if(ve.tryLoc<=this.prev&&Ze.call(ve,"finallyLoc")&&this.prev<ve.finallyLoc){var me=ve;break}}me&&(D==="break"||D==="continue")&&me.tryLoc<=j&&j<=me.finallyLoc&&(me=null);var Me=me?me.completion:{};return Me.type=D,Me.arg=j,me?(this.method="next",this.next=me.finallyLoc,ue):this.complete(Me)},complete:function(D,j){if(D.type==="throw")throw D.arg;return D.type==="break"||D.type==="continue"?this.next=D.arg:D.type==="return"?(this.rval=this.arg=D.arg,this.method="return",this.next="end"):D.type==="normal"&&j&&(this.next=j),ue},finish:function(D){for(var j=this.tryEntries.length-1;j>=0;--j){var le=this.tryEntries[j];if(le.finallyLoc===D)return this.complete(le.completion,le.afterLoc),nt(le),ue}},catch:function(D){for(var j=this.tryEntries.length-1;j>=0;--j){var le=this.tryEntries[j];if(le.tryLoc===D){var ve=le.completion;if(ve.type==="throw"){var me=ve.arg;nt(le)}return me}}throw Error("illegal catch attempt")},delegateYield:function(D,j,le){return this.delegate={iterator:at(D),resultName:j,nextLoc:le},this.method==="next"&&(this.arg=je),ue}},He}ye.exports=Ue,ye.exports.__esModule=!0,ye.exports.default=ye.exports},56055:function(ye){function se(ee){"@babel/helpers - typeof";return ye.exports=se=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(be){return typeof be}:function(be){return be&&typeof Symbol=="function"&&be.constructor===Symbol&&be!==Symbol.prototype?"symbol":typeof be},ye.exports.__esModule=!0,ye.exports.default=ye.exports,se(ee)}ye.exports=se,ye.exports.__esModule=!0,ye.exports.default=ye.exports},89033:function(ye,se,ee){var be=ee(40298)();ye.exports=be;try{regeneratorRuntime=be}catch(Ue){typeof globalThis=="object"?globalThis.regeneratorRuntime=be:Function("r","regeneratorRuntime = r")(be)}}}]);
  6. }());