omp-memory 0.2.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,216 @@
1
+ (function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const d of c.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&o(d)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function My(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var fh={exports:{}},as={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Lm;function LS(){if(Lm)return as;Lm=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function l(o,s,c){var d=null;if(c!==void 0&&(d=""+c),s.key!==void 0&&(d=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:n,type:o,key:d,ref:s!==void 0?s:null,props:c}}return as.Fragment=e,as.jsx=l,as.jsxs=l,as}var Um;function US(){return Um||(Um=1,fh.exports=LS()),fh.exports}var D=US(),dh={exports:{}},Be={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var km;function kS(){if(km)return Be;km=1;var n=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),d=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.for("react.view_transition"),E=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=E&&O[E]||O["@@iterator"],typeof O=="function"?O:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,N={};function C(O,V,F){this.props=O,this.context=V,this.refs=N,this.updater=F||b}C.prototype.isReactComponent={},C.prototype.setState=function(O,V){if(typeof O!="object"&&typeof O!="function"&&O!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,O,V,"setState")},C.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function M(){}M.prototype=C.prototype;function S(O,V,F){this.props=O,this.context=V,this.refs=N,this.updater=F||b}var T=S.prototype=new M;T.constructor=S,_(T,C.prototype),T.isPureReactComponent=!0;var L=Array.isArray;function R(){}var H={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function Y(O,V,F){var K=F.ref;return{$$typeof:n,type:O,key:V,ref:K!==void 0?K:null,props:F}}function Z(O,V){return Y(O.type,V,O.props)}function I(O){return typeof O=="object"&&O!==null&&O.$$typeof===n}function G(O){var V={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(F){return V[F]})}var j=/\/+/g;function X(O,V){return typeof O=="object"&&O!==null&&O.key!=null?G(""+O.key):V.toString(36)}function B(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(R,R):(O.status="pending",O.then(function(V){O.status==="pending"&&(O.status="fulfilled",O.value=V)},function(V){O.status==="pending"&&(O.status="rejected",O.reason=V)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function k(O,V,F,K,J){var ee=typeof O;(ee==="undefined"||ee==="boolean")&&(O=null);var ie=!1;if(O===null)ie=!0;else switch(ee){case"bigint":case"string":case"number":ie=!0;break;case"object":switch(O.$$typeof){case n:case e:ie=!0;break;case p:return ie=O._init,k(ie(O._payload),V,F,K,J)}}if(ie)return J=J(O),ie=K===""?"."+X(O,0):K,L(J)?(F="",ie!=null&&(F=ie.replace(j,"$&/")+"/"),k(J,V,F,"",function(me){return me})):J!=null&&(I(J)&&(J=Z(J,F+(J.key==null||O&&O.key===J.key?"":(""+J.key).replace(j,"$&/")+"/")+ie)),V.push(J)),1;ie=0;var le=K===""?".":K+":";if(L(O))for(var ce=0;ce<O.length;ce++)K=O[ce],ee=le+X(K,ce),ie+=k(K,V,F,ee,J);else if(ce=w(O),typeof ce=="function")for(O=ce.call(O),ce=0;!(K=O.next()).done;)K=K.value,ee=le+X(K,ce++),ie+=k(K,V,F,ee,J);else if(ee==="object"){if(typeof O.then=="function")return k(B(O),V,F,K,J);throw V=String(O),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return ie}function U(O,V,F){if(O==null)return O;var K=[],J=0;return k(O,K,"","",function(ee){return V.call(F,ee,J++)}),K}function Q(O){if(O._status===-1){var V=O._result,F=V();F.then(function(K){(O._status===0||O._status===-1)&&(O._status=1,O._result=K,F.status===void 0&&(F.status="fulfilled",F.value=K))},function(K){(O._status===0||O._status===-1)&&(O._status=2,O._result=K,F.status===void 0&&(F.status="rejected",F.reason=K))}),O._status===-1&&(O._status=0,O._result=F)}if(O._status===1)return O._result.default;throw O._result}var P=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)};function re(O){var V=H.T,F={};F.types=V!==null?V.types:null,H.T=F;try{var K=O(),J=H.S;J!==null&&J(F,K),typeof K=="object"&&K!==null&&typeof K.then=="function"&&K.then(R,P)}catch(ee){P(ee)}finally{V!==null&&F.types!==null&&(V.types=F.types),H.T=V}}function fe(O){var V=H.T;if(V!==null){var F=V.types;F===null?V.types=[O]:F.indexOf(O)===-1&&F.push(O)}else re(fe.bind(null,O))}var oe={map:U,forEach:function(O,V,F){U(O,function(){V.apply(this,arguments)},F)},count:function(O){var V=0;return U(O,function(){V++}),V},toArray:function(O){return U(O,function(V){return V})||[]},only:function(O){if(!I(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Be.Activity=y,Be.Children=oe,Be.Component=C,Be.Fragment=l,Be.Profiler=s,Be.PureComponent=S,Be.StrictMode=o,Be.Suspense=g,Be.ViewTransition=v,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Be.__COMPILER_RUNTIME={__proto__:null,c:function(O){return H.H.useMemoCache(O)}},Be.addTransitionType=fe,Be.cache=function(O){return function(){return O.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(O,V,F){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var K=_({},O.props),J=O.key;if(V!=null)for(ee in V.key!==void 0&&(J=""+V.key),V)!z.call(V,ee)||ee==="key"||ee==="__self"||ee==="__source"||ee==="ref"&&V.ref===void 0||(K[ee]=V[ee]);var ee=arguments.length-2;if(ee===1)K.children=F;else if(1<ee){for(var ie=Array(ee),le=0;le<ee;le++)ie[le]=arguments[le+2];K.children=ie}return Y(O.type,J,K)},Be.createContext=function(O){return O={$$typeof:d,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:c,_context:O},O},Be.createElement=function(O,V,F){var K,J={},ee=null;if(V!=null)for(K in V.key!==void 0&&(ee=""+V.key),V)z.call(V,K)&&K!=="key"&&K!=="__self"&&K!=="__source"&&(J[K]=V[K]);var ie=arguments.length-2;if(ie===1)J.children=F;else if(1<ie){for(var le=Array(ie),ce=0;ce<ie;ce++)le[ce]=arguments[ce+2];J.children=le}if(O&&O.defaultProps)for(K in ie=O.defaultProps,ie)J[K]===void 0&&(J[K]=ie[K]);return Y(O,ee,J)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(O){return{$$typeof:h,render:O}},Be.isValidElement=I,Be.lazy=function(O){return{$$typeof:p,_payload:{_status:-1,_result:O},_init:Q}},Be.memo=function(O,V){return{$$typeof:m,type:O,compare:V===void 0?null:V}},Be.startTransition=re,Be.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Be.use=function(O){return H.H.use(O)},Be.useActionState=function(O,V,F){return H.H.useActionState(O,V,F)},Be.useCallback=function(O,V){return H.H.useCallback(O,V)},Be.useContext=function(O){return H.H.useContext(O)},Be.useDebugValue=function(){},Be.useDeferredValue=function(O,V){return H.H.useDeferredValue(O,V)},Be.useEffect=function(O,V){return H.H.useEffect(O,V)},Be.useEffectEvent=function(O){return H.H.useEffectEvent(O)},Be.useId=function(){return H.H.useId()},Be.useImperativeHandle=function(O,V,F){return H.H.useImperativeHandle(O,V,F)},Be.useInsertionEffect=function(O,V){return H.H.useInsertionEffect(O,V)},Be.useLayoutEffect=function(O,V){return H.H.useLayoutEffect(O,V)},Be.useMemo=function(O,V){return H.H.useMemo(O,V)},Be.useOptimistic=function(O,V){return H.H.useOptimistic(O,V)},Be.useReducer=function(O,V,F){return H.H.useReducer(O,V,F)},Be.useRef=function(O){return H.H.useRef(O)},Be.useState=function(O){return H.H.useState(O)},Be.useSyncExternalStore=function(O,V,F){return H.H.useSyncExternalStore(O,V,F)},Be.useTransition=function(){return H.H.useTransition()},Be.version="19.3.1",Be}var Ym;function zc(){return Ym||(Ym=1,dh.exports=kS()),dh.exports}var de=zc();const lc=My(de);var hh={exports:{}},os={},gh={exports:{}},mh={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var qm;function YS(){return qm||(qm=1,(function(n){function e(B,k){var U=B.length;B.push(k);e:for(;0<U;){var Q=U-1>>>1,P=B[Q];if(0<s(P,k))B[Q]=k,B[U]=P,U=Q;else break e}}function l(B){return B.length===0?null:B[0]}function o(B){if(B.length===0)return null;var k=B[0],U=B.pop();if(U!==k){B[0]=U;e:for(var Q=0,P=B.length,re=P>>>1;Q<re;){var fe=2*(Q+1)-1,oe=B[fe],O=fe+1,V=B[O];if(0>s(oe,U))O<P&&0>s(V,oe)?(B[Q]=V,B[O]=U,Q=O):(B[Q]=oe,B[fe]=U,Q=fe);else if(O<P&&0>s(V,U))B[Q]=V,B[O]=U,Q=O;else break e}}return k}function s(B,k){var U=B.sortIndex-k.sortIndex;return U!==0?U:B.id-k.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;n.unstable_now=function(){return c.now()}}else{var d=Date,h=d.now();n.unstable_now=function(){return d.now()-h}}var g=[],m=[],p=1,y=null,v=3,E=!1,w=!1,b=!1,_=!1,N=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function S(B){for(var k=l(m);k!==null;){if(k.callback===null)o(m);else if(k.startTime<=B)o(m),k.sortIndex=k.expirationTime,e(g,k);else break;k=l(m)}}function T(B){if(b=!1,S(B),!w)if(l(g)!==null)w=!0,L||(L=!0,I());else{var k=l(m);k!==null&&X(T,k.startTime-B)}}var L=!1,R=-1,H=5,z=-1;function Y(){return _?!0:!(n.unstable_now()-z<H)}function Z(){if(_=!1,L){var B=n.unstable_now();z=B;var k=!0;try{e:{w=!1,b&&(b=!1,C(R),R=-1),E=!0;var U=v;try{t:{for(S(B),y=l(g);y!==null&&!(y.expirationTime>B&&Y());){var Q=y.callback;if(typeof Q=="function"){y.callback=null,v=y.priorityLevel;var P=Q(y.expirationTime<=B);if(B=n.unstable_now(),typeof P=="function"){y.callback=P,S(B),k=!0;break t}y===l(g)&&o(g),S(B)}else o(g);y=l(g)}if(y!==null)k=!0;else{var re=l(m);re!==null&&X(T,re.startTime-B),k=!1}}break e}finally{y=null,v=U,E=!1}k=void 0}}finally{k?I():L=!1}}}var I;if(typeof M=="function")I=function(){M(Z)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,j=G.port2;G.port1.onmessage=Z,I=function(){j.postMessage(null)}}else I=function(){N(Z,0)};function X(B,k){R=N(function(){B(n.unstable_now())},k)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(B){B.callback=null},n.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<B?Math.floor(1e3/B):5},n.unstable_getCurrentPriorityLevel=function(){return v},n.unstable_next=function(B){switch(v){case 1:case 2:case 3:var k=3;break;default:k=v}var U=v;v=k;try{return B()}finally{v=U}},n.unstable_requestPaint=function(){_=!0},n.unstable_runWithPriority=function(B,k){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var U=v;v=B;try{return k()}finally{v=U}},n.unstable_scheduleCallback=function(B,k,U){var Q=n.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?Q+U:Q):U=Q,B){case 1:var P=-1;break;case 2:P=250;break;case 5:P=1073741823;break;case 4:P=1e4;break;default:P=5e3}return P=U+P,B={id:p++,callback:k,priorityLevel:B,startTime:U,expirationTime:P,sortIndex:-1},U>Q?(B.sortIndex=U,e(m,B),l(g)===null&&B===l(m)&&(b?(C(R),R=-1):b=!0,X(T,U-Q))):(B.sortIndex=P,e(g,B),w||E||(w=!0,L||(L=!0,I()))),B},n.unstable_shouldYield=Y,n.unstable_wrapCallback=function(B){var k=v;return function(){var U=v;v=k;try{return B.apply(this,arguments)}finally{v=U}}}})(mh)),mh}var Vm;function qS(){return Vm||(Vm=1,gh.exports=YS()),gh.exports}var ph={exports:{}},on={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var Xm;function VS(){if(Xm)return on;Xm=1;var n=zc();function e(p){var y="https://react.dev/errors/"+p;if(1<arguments.length){y+="?args[]="+encodeURIComponent(arguments[1]);for(var v=2;v<arguments.length;v++)y+="&args[]="+encodeURIComponent(arguments[v])}return"Minified React error #"+p+"; visit "+y+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(e(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal"),c=Symbol.for("react.recoverable"),d=Symbol.for("react.optimistic_key");function h(p,y,v){var E=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:E==null?null:E===d?d:""+E,children:p,containerInfo:y,implementation:v}}var g=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(p,y){if(p==="font")return"";if(typeof y=="string")return y==="use-credentials"?y:""}return on.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,on.browser=function(p){return{$$typeof:c,_reason:p}},on.createPortal=function(p,y){var v=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!y||y.nodeType!==1&&y.nodeType!==9&&y.nodeType!==11)throw Error(e(299));return h(p,y,null,v)},on.flushSync=function(p){var y=g.T,v=o.p;try{if(g.T=null,o.p=2,p)return p()}finally{g.T=y,o.p=v,o.d.f()}},on.preconnect=function(p,y){typeof p=="string"&&(y?(y=y.crossOrigin,y=typeof y=="string"?y==="use-credentials"?y:"":void 0):y=null,o.d.C(p,y))},on.prefetchDNS=function(p){typeof p=="string"&&o.d.D(p)},on.preinit=function(p,y){if(typeof p=="string"&&y&&typeof y.as=="string"){var v=y.as,E=m(v,y.crossOrigin),w=typeof y.integrity=="string"?y.integrity:void 0,b=typeof y.fetchPriority=="string"?y.fetchPriority:void 0;v==="style"?o.d.S(p,typeof y.precedence=="string"?y.precedence:void 0,{crossOrigin:E,integrity:w,fetchPriority:b}):v==="script"&&o.d.X(p,{crossOrigin:E,integrity:w,fetchPriority:b,nonce:typeof y.nonce=="string"?y.nonce:void 0})}},on.preinitModule=function(p,y){if(typeof p=="string")if(typeof y=="object"&&y!==null){if(y.as==null||y.as==="script"){var v=m(y.as,y.crossOrigin);o.d.M(p,{crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}}else y==null&&o.d.M(p)},on.preload=function(p,y){if(typeof p=="string"&&typeof y=="object"&&y!==null&&typeof y.as=="string"){var v=y.as,E=m(v,y.crossOrigin);o.d.L(p,v,{crossOrigin:E,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,type:typeof y.type=="string"?y.type:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0,referrerPolicy:typeof y.referrerPolicy=="string"?y.referrerPolicy:void 0,imageSrcSet:typeof y.imageSrcSet=="string"?y.imageSrcSet:void 0,imageSizes:typeof y.imageSizes=="string"?y.imageSizes:void 0,media:typeof y.media=="string"?y.media:void 0})}},on.preloadModule=function(p,y){if(typeof p=="string")if(y){var v=m(y.as,y.crossOrigin);o.d.m(p,{as:typeof y.as=="string"&&y.as!=="script"?y.as:void 0,crossOrigin:v,integrity:typeof y.integrity=="string"?y.integrity:void 0,nonce:typeof y.nonce=="string"?y.nonce:void 0,fetchPriority:typeof y.fetchPriority=="string"?y.fetchPriority:void 0})}else o.d.m(p)},on.requestFormReset=function(p){o.d.r(p)},on.unstable_batchedUpdates=function(p,y){return p(y)},on.useFormState=function(p,y,v){return g.H.useFormState(p,y,v)},on.useFormStatus=function(){return g.H.useHostTransitionStatus()},on.version="19.3.1",on}var Gm;function Ty(){if(Gm)return ph.exports;Gm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),ph.exports=VS(),ph.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var Zm;function XS(){if(Zm)return os;Zm=1;var n=qS(),e=zc(),l=Ty();function o(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function c(t){for(var i=t,a=i;a&&!a.alternate;)i=a,(i.flags&4098)!==0&&(t=i.return),a=i.return;for(;i.return;)i=i.return;return i.tag===3?t:null}function d(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function h(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function g(t){if(c(t)!==t)throw Error(o(188))}function m(t){var i=t.alternate;if(!i){if(i=c(t),i===null)throw Error(o(188));return i!==t?null:t}for(var a=t,r=i;;){var u=a.return;if(u===null)break;var f=u.alternate;if(f===null){if(r=u.return,r!==null){a=r;continue}break}if(u.child===f.child){for(f=u.child;f;){if(f===a)return g(u),t;if(f===r)return g(u),i;f=f.sibling}throw Error(o(188))}if(a.return!==r.return)a=u,r=f;else{for(var x=!1,A=u.child;A;){if(A===a){x=!0,a=u,r=f;break}if(A===r){x=!0,r=u,a=f;break}A=A.sibling}if(!x){for(A=f.child;A;){if(A===a){x=!0,a=f,r=u;break}if(A===r){x=!0,r=f,a=u;break}A=A.sibling}if(!x)throw Error(o(189))}}if(a.alternate!==r)throw Error(o(190))}if(a.tag!==3)throw Error(o(188));return a.stateNode.current===a?t:i}function p(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=p(t),i!==null)return i;t=t.sibling}return null}function y(t,i,a,r,u,f){for(;t!==null;){if((t.tag===5||t.tag===27||t.tag===6)&&a(t,r,u,f)||(t.tag!==22||t.memoizedState===null)&&(i||t.tag!==5&&t.tag!==27)&&y(t.child,i,a,r,u,f))return!0;t=t.sibling}return!1}function v(t){for(t=t.return;t!==null;){if(t.tag===3||t.tag===5||t.tag===27)return t;t=t.return}return null}function E(t){var i=!1;for(t=t.return;t!==null&&(t.tag===4&&(i=!0),!(t.tag===3||t.tag===5||t.tag===27));)t=t.return;return i}function w(t){var i=[null,null],a=v(t);return a===null||b(i,t,a.child,{foundSelf:!1}),i}function b(t,i,a,r){for(;a!==null;){if(a===i)r.foundSelf=!0;else if(a.tag===5||a.tag===27||a.tag===6){if(r.foundSelf)return t[1]=a,!0;t[0]=a}else if((a.tag!==22||a.memoizedState===null)&&b(t,i,a.child,r))return!0;a=a.sibling}return!1}function _(t){switch(t.tag){case 5:case 27:case 6:return t.stateNode;case 3:return t.stateNode.containerInfo;default:throw Error(o(559))}}var N=null,C=null;function M(t,i,a){return t===a?!0:t===i?(N=t,!0):!1}function S(t,i,a){return t===a?(C=t,!1):t===i?(C!==null&&(N=t),!0):!1}function T(t){if(t===null)return null;do t=t===null?null:t.return;while(t&&t.tag!==5&&t.tag!==27&&t.tag!==3);return t||null}function L(t,i,a){for(var r=0,u=t;u;u=a(u))r++;u=0;for(var f=i;f;f=a(f))u++;for(;0<r-u;)t=a(t),r--;for(;0<u-r;)i=a(i),u--;for(;r--;){if(t===i||i!==null&&t===i.alternate)return t;t=a(t),i=a(i)}return null}var R=Object.assign,H=Symbol.for("react.element"),z=Symbol.for("react.transitional.element"),Y=Symbol.for("react.portal"),Z=Symbol.for("react.fragment"),I=Symbol.for("react.strict_mode"),G=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),X=Symbol.for("react.context"),B=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),U=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),P=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),fe=Symbol.for("react.legacy_hidden"),oe=Symbol.for("react.memo_cache_sentinel"),O=Symbol.for("react.view_transition"),V=Symbol.for("react.recoverable"),F=Symbol.iterator;function K(t){return t===null||typeof t!="object"?null:(t=F&&t[F]||t["@@iterator"],typeof t=="function"?t:null)}var J=Symbol.for("react.client.reference");function ee(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===J?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case Z:return"Fragment";case G:return"Profiler";case I:return"StrictMode";case k:return"Suspense";case U:return"SuspenseList";case re:return"Activity";case O:return"ViewTransition"}if(typeof t=="object")switch(t.$$typeof){case Y:return"Portal";case X:return t.displayName||"Context";case j:return(t._context.displayName||"Context")+".Consumer";case B:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case Q:return i=t.displayName||null,i!==null?i:ee(t.type)||"Memo";case P:i=t._payload,t=t._init;try{return ee(t(i))}catch{}}return null}var ie=Array.isArray,le=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ve=[],Se=-1;function be(t){return{current:t}}function xe(t){0>Se||(t.current=ve[Se],ve[Se]=null,Se--)}function pe(t,i){Se++,ve[Se]=t.current,t.current=i}var Ee=be(null),Me=be(null),je=be(null),He=be(null);function Ue(t,i){switch(pe(je,i),pe(Me,t),pe(Ee,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?Q2(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=Q2(i),t=K2(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}xe(Ee),pe(Ee,t)}function Le(){xe(Ee),xe(Me),xe(je)}function qe(t){var i=t.memoizedState;i!==null&&(qo._currentValue=i.memoizedState,pe(He,t)),i=Ee.current;var a=K2(i,t.type);i!==a&&(pe(Me,t),pe(Ee,a))}function at(t){Me.current===t&&(xe(Ee),xe(Me)),He.current===t&&(xe(He),qo._currentValue=me)}var $e,ct;function Ve(t){if($e===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);$e=i&&i[1]||"",ct=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+$e+t+ct}var Ie=!1;function Je(t,i){if(!t||Ie)return"";Ie=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(i){var ge=function(){throw Error()};if(Object.defineProperty(ge.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ge,[])}catch(_e){var W=_e}Reflect.construct(t,[],ge)}else{try{ge.call()}catch(_e){W=_e}ge=!1;try{var se=Object.getOwnPropertyDescriptor(t.prototype,"props");Object.defineProperty(t.prototype,"props",{configurable:!0,set:function(){throw Error()}}),ge=!0,new t}finally{ge&&(se!==void 0?Object.defineProperty(t.prototype,"props",se):delete t.prototype.props)}}}else{try{throw Error()}catch(_e){W=_e}(ge=t())&&typeof ge.catch=="function"&&ge.catch(function(){})}}catch(_e){if(_e&&W&&typeof _e.stack=="string")return[_e.stack,W.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var f=r.DetermineComponentFrameRoot(),x=f[0],A=f[1];if(x&&A){var q=x.split(`
44
+ `),ne=A.split(`
45
+ `);for(u=r=0;r<q.length&&!q[r].includes("DetermineComponentFrameRoot");)r++;for(;u<ne.length&&!ne[u].includes("DetermineComponentFrameRoot");)u++;if(r===q.length||u===ne.length)for(r=q.length-1,u=ne.length-1;1<=r&&0<=u&&q[r]!==ne[u];)u--;for(;1<=r&&0<=u;r--,u--)if(q[r]!==ne[u]){if(r!==1||u!==1)do if(r--,u--,0>u||q[r]!==ne[u]){var ue=`
46
+ `+q[r].replace(" at new "," at ");return t.displayName&&ue.includes("<anonymous>")&&(ue=ue.replace("<anonymous>",t.displayName)),ue}while(1<=r&&0<=u);break}}}finally{Ie=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ve(a):""}function gt(t,i){switch(t.tag){case 26:case 27:case 5:return Ve(t.type);case 16:return Ve("Lazy");case 13:return t.child!==i&&i!==null?Ve("Suspense Fallback"):Ve("Suspense");case 19:return Ve("SuspenseList");case 0:case 15:return Je(t.type,!1);case 11:return Je(t.type.render,!1);case 1:return Je(t.type,!0);case 31:return Ve("Activity");case 30:return Ve("ViewTransition");default:return""}}function et(t){try{var i="",a=null;do i+=gt(t,a),a=t,t=t.return;while(t);return i}catch(r){return`
47
+ Error generating stack: `+r.message+`
48
+ `+r.stack}}var rt=Object.prototype.hasOwnProperty,ft=n.unstable_scheduleCallback,pt=n.unstable_cancelCallback,yt=n.unstable_shouldYield,mt=n.unstable_requestPaint,Xe=n.unstable_now,Mt=n.unstable_getCurrentPriorityLevel,ye=n.unstable_ImmediatePriority,Re=n.unstable_UserBlockingPriority,Ae=n.unstable_NormalPriority,Fe=n.unstable_LowPriority,Oe=n.unstable_IdlePriority,tt=n.log,Ke=n.unstable_setDisableYieldValue,vt=null,Ze=null;function dt(t){if(typeof tt=="function"&&Ke(t),Ze&&typeof Ze.setStrictMode=="function")try{Ze.setStrictMode(vt,t)}catch{}}var ht=Math.clz32?Math.clz32:rn,bt=Math.log,Qt=Math.LN2;function rn(t){return t>>>=0,t===0?32:31-(bt(t)/Qt|0)|0}var sn=256,zn=262144,Rn=4194304;function gn(t){var i=t&42;if(i!==0)return i;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&-t;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function Dn(t,i,a){var r=t.pendingLanes;if(r===0)return 0;var u=0,f=t.suspendedLanes,x=t.pingedLanes;t=t.warmLanes;var A=r&134217727;return A!==0?(r=A&~f,r!==0?u=gn(r):(x&=A,x!==0?u=gn(x):a||(a=A&~t,a!==0&&(u=gn(a))))):(A=r&~f,A!==0?u=gn(A):x!==0?u=gn(x):a||(a=r&~t,a!==0&&(u=gn(a)))),u===0?0:i!==0&&i!==u&&(i&f)===0&&(f=u&-u,a=i&-i,f>=a||f===32&&(a&4194048)!==0)?i:u}function En(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function oi(t,i){(i&8)!==0&&(i|=i&32);var a=t.entangledLanes;if(a!==0)for(t=t.entanglements,a&=i;0<a;){var r=31-ht(a),u=1<<r;i|=t[r],a&=~u}return i}function da(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function bl(){var t=Rn;return Rn<<=1,(Rn&62914560)===0&&(Rn=4194304),t}function Fi(t){for(var i=[],a=0;31>a;a++)i.push(t);return i}function ri(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function ha(t,i,a,r,u,f){var x=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var A=t.entanglements,q=t.expirationTimes,ne=t.hiddenUpdates;for(a=x&~a;0<a;){var ue=31-ht(a),ge=1<<ue;A[ue]=0,q[ue]=-1;var W=ne[ue];if(W!==null)for(ne[ue]=null,ue=0;ue<W.length;ue++){var se=W[ue];se!==null&&(se.lane&=-536870913)}a&=~ge}r!==0&&Sl(t,r,0),f!==0&&u===0&&t.tag!==0&&(t.suspendedLanes|=f&~(x&~i))}function Sl(t,i,a){t.pendingLanes|=i,t.suspendedLanes&=~i;var r=31-ht(i);t.entangledLanes|=i,t.entanglements[r]=t.entanglements[r]|1073741824|a&261930}function _l(t,i){var a=t.entangledLanes|=i;for(t=t.entanglements;a;){var r=31-ht(a),u=1<<r;u&i|t[r]&i&&(t[r]|=i),a&=~u}}function wl(t,i){var a=i&-i;return a=(a&42)!==0?1:Pi(a),(a&(t.suspendedLanes|i))!==0?0:a}function Pi(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Wi(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function El(){var t=ce.p;return t!==0?t:(t=window.event,t===void 0?32:Om(t.type))}function Nl(t,i){var a=ce.p;try{return ce.p=t,i()}finally{ce.p=a}}var mn=Math.random().toString(36).slice(2),Rt="__reactFiber$"+mn,Lt="__reactProps$"+mn,Zn="__reactContainer$"+mn,Cl="__reactEvents$"+mn,ga="__reactListeners$"+mn,ma="__reactHandles$"+mn,Ml="__reactResources$"+mn,si="__reactMarker$"+mn,Ni="__reactLoad$"+mn;function Ci(t){delete t[Rt],delete t[Lt],delete t[ga],delete t[ma]}function jn(t){var i;if(i=t[Rt])return i;for(var a=t.parentNode;a;){if(i=a[Zn]||a[Rt]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(t=cm(t);t!==null;){if(a=t[Rt])return a;t=cm(t)}return i}t=a,a=t.parentNode}return null}function Qn(t){if(t=t[Rt]||t[Zn]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function ui(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(o(33))}function Kn(t){var i=t[Ml];return i||(i=t[Ml]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ot(t){t[si]=!0}function Tl(t){t[Ni]=void 0}var Al=new Set,el={};function Nn(t,i){Mi(t,i),Mi(t+"Capture",i)}function Mi(t,i){for(el[t]=i,t=0;t<i.length;t++)Al.add(i[t])}var hr=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),Pa={},Wa={};function gr(t){return rt.call(Wa,t)?!0:rt.call(Pa,t)?!1:hr.test(t)?Wa[t]=!0:(Pa[t]=!0,!1)}var nt=!1;function eo(){var t=nt;return nt=!1,t}function Ol(t,i,a){if(gr(i))if(a===null)t.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,a)}}function zl(t,i,a){if(a===null)t.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,a)}}function un(t,i,a,r){if(r===null)t.removeAttribute(a);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(i,a,r)}}function Pt(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function to(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function ci(t,i,a){var r=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,f=r.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return u.call(this)},set:function(x){a=""+x,f.call(this,x)}}),Object.defineProperty(t,i,{enumerable:r.enumerable}),{getValue:function(){return a},setValue:function(x){a=""+x},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function Hn(t){if(!t._valueTracker){var i=to(t)?"checked":"value";t._valueTracker=ci(t,i,""+t[i])}}function tl(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var a=i.getValue(),r="";return t&&(r=to(t)?t.checked?"true":"false":t.value),t=r,t!==a?(i.setValue(t),!0):!1}var mr=/[\n"\\]/g;function cn(t){return t.replace(mr,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function pa(t,i,a,r,u,f,x,A){t.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?t.type=x:t.removeAttribute("type"),i!=null?x==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+Pt(i)):t.value!==""+Pt(i)&&(t.value=""+Pt(i)):x!=="submit"&&x!=="reset"||t.removeAttribute("value"),i!=null?x==="number"&&t.value==i?ya(t,Pt(t.value)):ya(t,Pt(i)):a!=null?ya(t,Pt(a)):r!=null&&t.removeAttribute("value"),u==null&&f!=null&&(t.defaultChecked=!!f),u!=null&&(t.checked=u&&typeof u!="function"&&typeof u!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?t.name=""+Pt(A):t.removeAttribute("name")}function no(t,i,a,r,u,f,x,A){if(f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"&&(t.type=f),i!=null||a!=null){if(!(f!=="submit"&&f!=="reset"||i!=null)){Hn(t);return}a=a!=null?""+Pt(a):"",i=i!=null?""+Pt(i):a,A||i===t.value||(t.value=i),t.defaultValue=i}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,t.checked=A?t.checked:!!r,t.defaultChecked=!!r,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(t.name=x),Hn(t)}function ya(t,i){t.defaultValue!==""+i&&(t.defaultValue=""+i)}function Ti(t,i,a,r){if(t=t.options,i){i={};for(var u=0;u<a.length;u++)i["$"+a[u]]=!0;for(a=0;a<t.length;a++)u=i.hasOwnProperty("$"+t[a].value),t[a].selected!==u&&(t[a].selected=u),u&&r&&(t[a].defaultSelected=!0)}else{for(a=""+Pt(a),i=null,u=0;u<t.length;u++){if(t[u].value===a){t[u].selected=!0,r&&(t[u].defaultSelected=!0);return}i!==null||t[u].disabled||(i=t[u])}i!==null&&(i.selected=!0)}}function io(t,i,a){if(i!=null&&(i=""+Pt(i),i!==t.value&&(t.value=i),a==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=a!=null?""+Pt(a):""}function lo(t,i,a,r){if(i==null){if(r!=null){if(a!=null)throw Error(o(92));if(ie(r)){if(1<r.length)throw Error(o(93));r=r[0]}a=r}a==null&&(a=""),i=a}a=Pt(i),t.defaultValue=a,r=t.textContent,r===a&&r!==""&&r!==null&&(t.value=r),Hn(t)}function Ai(t,i){if(i){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=i;return}}t.textContent=i}var pr=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ao(t,i,a){var r=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?r?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":r?t.setProperty(i,a):typeof a!="number"||a===0||pr.has(i)?i==="float"?t.cssFloat=a:t[i]=(""+a).trim():t[i]=a+"px"}function oo(t,i,a){if(i!=null&&typeof i!="object")throw Error(o(62));if(t=t.style,a!=null){for(var r in a)!a.hasOwnProperty(r)||i!=null&&i.hasOwnProperty(r)||(r.indexOf("--")===0?t.setProperty(r,""):r==="float"?t.cssFloat="":t[r]="",nt=!0);for(var u in i)r=i[u],i.hasOwnProperty(u)&&a[u]!==r&&(ao(t,u,r),nt=!0)}else for(var f in i)i.hasOwnProperty(f)&&ao(t,f,i[f])}function va(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Rl=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["maskType","mask-type"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),yr=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Dl(t){return yr.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Wt(){}var xa=null;function Oi(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var fn=null,fi=null;function ro(t){var i=Qn(t);if(i&&(t=i.stateNode)){var a=t[Lt]||null;e:switch(t=i.stateNode,i.type){case"input":if(pa(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+cn(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var r=a[i];if(r!==t&&r.form===t.form){var u=r[Lt]||null;if(!u)throw Error(o(90));pa(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(i=0;i<a.length;i++)r=a[i],r.form===t.form&&tl(r)}break e;case"textarea":io(t,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&Ti(t,!!a.multiple,i,!1)}}}var zi=!1;function nl(t,i,a){if(zi)return t(i,a);zi=!0;try{var r=t(i);return r}finally{if(zi=!1,(fn!==null||fi!==null)&&(Ou(),fn&&(i=fn,t=fi,fi=fn=null,ro(i),t)))for(i=0;i<t.length;i++)ro(t[i])}}function $n(t,i){var a=t.stateNode;if(a===null)return null;var r=a[Lt]||null;if(r===null)return null;a=r[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(t=t.type,r=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!r;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(o(231,i,typeof a));return a}var dn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ri=!1;if(dn)try{var In={};Object.defineProperty(In,"passive",{get:function(){Ri=!0}}),window.addEventListener("test",In,In),window.removeEventListener("test",In,In)}catch{Ri=!1}var pn=null,Di=null,il=null;function vr(){if(il)return il;var t,i=Di,a=i.length,r,u="value"in pn?pn.value:pn.textContent,f=u.length;for(t=0;t<a&&i[t]===u[t];t++);var x=a-t;for(r=1;r<=x&&i[a-r]===u[f-r];r++);return il=u.slice(t,1<r?1-r:void 0)}function Rs(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function Ds(){return!0}function X0(){return!1}function yn(t){function i(a,r,u,f,x){this._reactName=a,this._targetInst=u,this.type=r,this.nativeEvent=f,this.target=x,this.currentTarget=null;for(var A in t)t.hasOwnProperty(A)&&(a=t[A],this[A]=a?a(f):f[A]);return this.isDefaultPrevented=(f.defaultPrevented!=null?f.defaultPrevented:f.returnValue===!1)?Ds:X0,this.isPropagationStopped=X0,this}return R(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=Ds)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=Ds)},persist:function(){},isPersistent:Ds}),i}var jl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},js=yn(jl),xr=R({},jl,{view:0,detail:0}),sb=yn(xr),Ic,Jc,br,Hs=R({},xr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Pc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==br&&(br&&t.type==="mousemove"?(Ic=t.screenX-br.screenX,Jc=t.screenY-br.screenY):Jc=Ic=0,br=t),Ic)},movementY:function(t){return"movementY"in t?t.movementY:Jc}}),G0=yn(Hs),ub=R({},Hs,{dataTransfer:0}),cb=yn(ub),fb=R({},xr,{relatedTarget:0}),Fc=yn(fb),db=R({},jl,{animationName:0,elapsedTime:0,pseudoElement:0}),hb=yn(db),gb=R({},jl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),mb=yn(gb),pb=R({},jl,{data:0}),Z0=yn(pb),yb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},vb={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},xb={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function bb(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=xb[t])?!!i[t]:!1}function Pc(){return bb}var Sb=R({},xr,{key:function(t){if(t.key){var i=yb[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=Rs(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?vb[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Pc,charCode:function(t){return t.type==="keypress"?Rs(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Rs(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),_b=yn(Sb),wb=R({},Hs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Q0=yn(wb),Eb=R({},jl,{submitter:0}),Nb=yn(Eb),Cb=R({},xr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Pc}),Mb=yn(Cb),Tb=R({},jl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Ab=yn(Tb),Ob=R({},Hs,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),zb=yn(Ob),Rb=R({},jl,{newState:0,oldState:0,source:0}),Db=yn(Rb),jb=[9,13,27,32],Wc=dn&&"CompositionEvent"in window,Sr=null;dn&&"documentMode"in document&&(Sr=document.documentMode);var Hb=dn&&"TextEvent"in window&&!Sr,K0=dn&&(!Wc||Sr&&8<Sr&&11>=Sr),$0=" ",I0=!1;function J0(t,i){switch(t){case"keyup":return jb.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function F0(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var so=!1;function Bb(t,i){switch(t){case"compositionend":return F0(i);case"keypress":return i.which!==32?null:(I0=!0,$0);case"textInput":return t=i.data,t===$0&&I0?null:t;default:return null}}function Lb(t,i){if(so)return t==="compositionend"||!Wc&&J0(t,i)?(t=vr(),il=Di=pn=null,so=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return K0&&i.locale!=="ko"?null:i.data;default:return null}}var Ub={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function P0(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!Ub[t.type]:i==="textarea"}function W0(t,i,a,r){fn?fi?fi.push(r):fi=[r]:fn=r,i=Bu(i,"onChange"),0<i.length&&(a=new js("onChange","change",null,a,r),t.push({event:a,listeners:i}))}var _r=null,wr=null;function kb(t){Y2(t,0)}function Bs(t){var i=ui(t);if(tl(i))return t}function eg(t,i){if(t==="change")return i}var tg=!1;if(dn){var ef;if(dn){var tf="oninput"in document;if(!tf){var ng=document.createElement("div");ng.setAttribute("oninput","return;"),tf=typeof ng.oninput=="function"}ef=tf}else ef=!1;tg=ef&&(!document.documentMode||9<document.documentMode)}function ig(){_r&&(_r.detachEvent("onpropertychange",lg),wr=_r=null)}function lg(t){if(t.propertyName==="value"&&Bs(wr)){var i=[];W0(i,wr,t,Oi(t)),nl(kb,i)}}function Yb(t,i,a){t==="focusin"?(ig(),_r=i,wr=a,_r.attachEvent("onpropertychange",lg)):t==="focusout"&&ig()}function qb(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return Bs(wr)}function Vb(t,i){if(t==="click")return Bs(i)}function Xb(t,i){if(t==="input"||t==="change")return Bs(i)}function Gb(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var Bn=typeof Object.is=="function"?Object.is:Gb;function Er(t,i){if(Bn(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var a=Object.keys(t),r=Object.keys(i);if(a.length!==r.length)return!1;for(r=0;r<a.length;r++){var u=a[r];if(!rt.call(i,u)||!Bn(t[u],i[u]))return!1}return!0}function nf(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}function ag(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function og(t,i){var a=ag(t);t=0;for(var r;a;){if(a.nodeType===3){if(r=t+a.textContent.length,t<=i&&r>=i)return{node:a,offset:i-t};t=r}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=ag(a)}}function rg(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?rg(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function sg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=nf(t.document);i instanceof t.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)t=i.contentWindow;else break;i=nf(t.document)}return i}function lf(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var Zb=dn&&"documentMode"in document&&11>=document.documentMode,uo=null,af=null,Nr=null,of=!1;function ug(t,i,a){var r=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;of||uo==null||uo!==nf(r)||(r=uo,"selectionStart"in r&&lf(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Nr&&Er(Nr,r)||(Nr=r,r=Bu(af,"onSelect"),0<r.length&&(i=new js("onSelect","select",null,i,a),t.push({event:i,listeners:r}),i.target=uo)))}function ba(t,i){var a={};return a[t.toLowerCase()]=i.toLowerCase(),a["Webkit"+t]="webkit"+i,a["Moz"+t]="moz"+i,a}var co={animationend:ba("Animation","AnimationEnd"),animationiteration:ba("Animation","AnimationIteration"),animationstart:ba("Animation","AnimationStart"),transitionrun:ba("Transition","TransitionRun"),transitionstart:ba("Transition","TransitionStart"),transitioncancel:ba("Transition","TransitionCancel"),transitionend:ba("Transition","TransitionEnd")},rf={},cg={};dn&&(cg=document.createElement("div").style,"AnimationEvent"in window||(delete co.animationend.animation,delete co.animationiteration.animation,delete co.animationstart.animation),"TransitionEvent"in window||delete co.transitionend.transition);function Sa(t){if(rf[t])return rf[t];if(!co[t])return t;var i=co[t],a;for(a in i)if(i.hasOwnProperty(a)&&a in cg)return rf[t]=i[a];return t}var fg=Sa("animationend"),dg=Sa("animationiteration"),hg=Sa("animationstart"),Qb=Sa("transitionrun"),Kb=Sa("transitionstart"),$b=Sa("transitioncancel"),gg=Sa("transitionend"),mg=new Map,sf="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");sf.push("scrollEnd");function di(t,i){mg.set(t,i),Nn(i,[t])}var Ib=0;function ll(t,i){if(t.name!=null&&t.name!=="auto")return t.name;if(i.autoName!==null)return i.autoName;t=pi.identifierPrefix;var a=Ib++;return t="_"+t+"t_"+a.toString(32)+"_",i.autoName=t}function pg(t){if(t==null||typeof t=="string")return t;var i=null,a=zo;if(a!==null)for(var r=0;r<a.length;r++){var u=t[a[r]];if(u!=null){if(u==="none")return"none";i=i==null?u:i+(" "+u)}}return i??t.default}function al(t,i){return t=pg(t),i=pg(i),i==null?t==="auto"?null:t:i==="auto"?null:i}var Ls=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Jn=[],fo=0,uf=0;function Us(){for(var t=fo,i=uf=fo=0;i<t;){var a=Jn[i];Jn[i++]=null;var r=Jn[i];Jn[i++]=null;var u=Jn[i];Jn[i++]=null;var f=Jn[i];if(Jn[i++]=null,r!==null&&u!==null){var x=r.pending;x===null?u.next=u:(u.next=x.next,x.next=u),r.pending=u}f!==0&&yg(a,u,f)}}function ks(t,i,a,r){Jn[fo++]=t,Jn[fo++]=i,Jn[fo++]=a,Jn[fo++]=r,uf|=r,t.lanes|=r,t=t.alternate,t!==null&&(t.lanes|=r)}function cf(t,i,a,r){return ks(t,i,a,r),Ys(t)}function _a(t,i){return ks(t,null,null,i),Ys(t)}function yg(t,i,a){t.lanes|=a;var r=t.alternate;r!==null&&(r.lanes|=a);for(var u=!1,f=t.return;f!==null;)f.childLanes|=a,r=f.alternate,r!==null&&(r.childLanes|=a),f.tag===22&&(t=f.stateNode,t===null||t._visibility&1||(u=!0)),t=f,f=f.return;return t.tag===3?(f=t.stateNode,u&&i!==null&&(u=31-ht(a),t=f.hiddenUpdates,r=t[u],r===null?t[u]=[i]:r.push(i),i.lane=a|536870912),f):null}function Ys(t){if(50<Kr)throw Kr=0,Au=null,Error(o(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var ho={};function Jb(t,i,a,r){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Cn(t,i,a,r){return new Jb(t,i,a,r)}function ff(t){return t=t.prototype,!(!t||!t.isReactComponent)}function ol(t,i){var a=t.alternate;return a===null?(a=Cn(t.tag,i,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=i,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&1206910976,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,i=t.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function vg(t,i){t.flags&=1206910978;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,i=a.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function qs(t,i,a,r,u,f){var x=0;if(r=t,typeof r=="function")ff(r)&&(x=1);else if(typeof r=="string")x=ES(t,a,Ee.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(r){case re:return t=Cn(31,a,i,u),t.elementType=re,t.lanes=f,t;case Z:return wa(a.children,u,f,i);case I:x=8,u|=24;break;case G:return t=Cn(12,a,i,u|2),t.elementType=G,t.lanes=f,t;case k:return t=Cn(13,a,i,u),t.elementType=k,t.lanes=f,t;case U:return t=Cn(19,a,i,u),t.elementType=U,t.lanes=f,t;case fe:case O:return t=u|32,t=Cn(30,a,i,t),t.elementType=O,t.lanes=f,t.stateNode={autoName:null,paired:null,clones:null,ref:null},t;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case X:x=10;break e;case j:x=9;break e;case B:x=11;break e;case Q:x=14;break e;case P:x=16,r=null;break e}x=29,a=Error(o(130,t===null?"null":typeof t,"")),r=null}return i=Cn(x,a,i,u),i.elementType=t,i.type=r,i.lanes=f,i}function wa(t,i,a,r){return t=Cn(7,t,r,i),t.lanes=a,t}function df(t,i,a){return t=Cn(6,t,null,i),t.lanes=a,t}function xg(t){var i=Cn(18,null,null,0);return i.stateNode=t,i}function hf(t,i,a){return i=Cn(4,t.children!==null?t.children:[],t.key,i),i.lanes=a,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var bg=new WeakMap;function Fn(t,i){if(typeof t=="object"&&t!==null){var a=bg.get(t);return a!==void 0?a:(i={value:t,source:i,stack:et(i)},bg.set(t,i),i)}return{value:t,source:i,stack:et(i)}}var go=[],mo=0,Vs=null,Cr=0,Pn=[],Wn=0,Hl=null,ji=1,Hi="";function rl(t,i){go[mo++]=Cr,go[mo++]=Vs,Vs=t,Cr=i}function Sg(t,i,a){Pn[Wn++]=ji,Pn[Wn++]=Hi,Pn[Wn++]=Hl,Hl=t;var r=ji;t=Hi;var u=32-ht(r)-1;r&=~(1<<u),a+=1;var f=32-ht(i)+u;if(30<f){var x=u-u%5;f=(r&(1<<x)-1).toString(32),r>>=x,u-=x,ji=1<<32-ht(i)+u|a<<u|r,Hi=f+t}else ji=1<<f|a<<u|r,Hi=t}function Xs(t){t.return!==null&&(rl(t,1),Sg(t,1,0))}function gf(t){for(;t===Vs;)Vs=go[--mo],go[mo]=null,Cr=go[--mo],go[mo]=null;for(;t===Hl;)Hl=Pn[--Wn],Pn[Wn]=null,Hi=Pn[--Wn],Pn[Wn]=null,ji=Pn[--Wn],Pn[Wn]=null}function _g(t,i){Pn[Wn++]=ji,Pn[Wn++]=Hi,Pn[Wn++]=Hl,ji=i.id,Hi=i.overflow,Hl=t}var $t=null,Tt=null,Qe=!1,Bl=null,ei=!1,mf=Error(o(519));function Ll(t){var i=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Mr(Fn(i,t)),mf}function wg(t){var i=t.stateNode,a=t.type,r=t.memoizedProps;switch(i[Rt]=t,i[Lt]=r,a){case"dialog":We("cancel",i),We("close",i);break;case"iframe":case"object":case"embed":We("load",i);break;case"video":case"audio":for(a=0;a<Ir.length;a++)We(Ir[a],i);break;case"source":We("error",i);break;case"img":case"image":case"link":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"input":We("invalid",i),no(i,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":We("invalid",i);break;case"textarea":We("invalid",i),lo(i,r.value,r.defaultValue,r.children)}a=r.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||r.suppressHydrationWarning===!0||G2(i.textContent,a)?(r.popover!=null&&(We("beforetoggle",i),We("toggle",i)),r.onScroll!=null&&We("scroll",i),r.onScrollEnd!=null&&We("scrollend",i),r.onClick!=null&&(i.onclick=Wt),i=!0):i=!1,i||Ll(t,!0)}function Gs(t){for($t=t.return;$t;)switch($t.tag){case 5:case 31:case 13:ei=!1;return;case 27:case 3:ei=!0;return;default:$t=$t.return}}function po(t){if(t!==$t)return!1;if(!Qe)return Gs(t),Qe=!0,!1;var i=t.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Zd(t.type,t.memoizedProps)),a=!a),a&&Tt&&Ll(t),Gs(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));Tt=um(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(317));Tt=um(t)}else i===27?(i=Tt,Wl(t.type)?(t=eh,eh=null,Tt=t):Tt=i):Tt=$t?ni(t.stateNode.nextSibling):null;return!0}function Ea(){Tt=$t=null,Qe=!1}function pf(){var t=Bl;return t!==null&&(An===null?An=t:An.push.apply(An,t),Bl=null),t}function Mr(t){Bl===null?Bl=[t]:Bl.push(t)}var yf=be(null),Na=null,sl=null;function Ul(t,i,a){pe(yf,i._currentValue),i._currentValue=a}function ul(t){t._currentValue=yf.current,xe(yf)}function Zs(t,i,a){for(;t!==null;){var r=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,r!==null&&(r.childLanes|=i)):r!==null&&(r.childLanes&i)!==i&&(r.childLanes|=i),t===a)break;t=t.return}}function vf(t,i,a,r){var u=t.child;for(u!==null&&(u.return=t);u!==null;){var f=u.dependencies;if(f!==null){var x=u.child;f=f.firstContext;e:for(;f!==null;){var A=f;f=u;for(var q=0;q<i.length;q++)if(A.context===i[q]){f.lanes|=a,A=f.alternate,A!==null&&(A.lanes|=a),Zs(f.return,a,t),r||(x=null);break e}f=A.next}}else if(u.tag===18){if(x=u.return,x===null)throw Error(o(341));x.lanes|=a,f=x.alternate,f!==null&&(f.lanes|=a),Zs(x,a,t),x=null}else u.tag===13&&u.memoizedState!==null&&u.memoizedState.dehydrated===null?(u.lanes|=a,x=u.alternate,x!==null&&(x.lanes|=a),Zs(u.return,a,t),x=u.child,x=x!==null?x.sibling:null):x=u.child;if(x!==null)x.return=u;else for(x=u;x!==null;){if(x===t){x=null;break}if(u=x.sibling,u!==null){u.return=x.return,x=u;break}x=x.return}u=x}}function Ca(t,i,a,r){t=null;for(var u=i,f=!1;u!==null;){if(!f){if((u.flags&524288)!==0)f=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var x=u.alternate;if(x===null)throw Error(o(387));if(x=x.memoizedProps,x!==null){var A=u.type;Bn(u.pendingProps.value,x.value)||(t!==null?t.push(A):t=[A])}}else if(u===He.current){if(x=u.alternate,x===null)throw Error(o(387));x.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(t!==null?t.push(qo):t=[qo])}u=u.return}return t!==null&&vf(i,t,a,r),i.flags|=262144,t!==null}function Qs(t){for(t=t.firstContext;t!==null;){if(!Bn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Ma(t){Na=t,sl=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function en(t){return Eg(Na,t)}function Ks(t,i){return Na===null&&Ma(t),Eg(t,i)}function Eg(t,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},sl===null){if(t===null)throw Error(o(308));sl=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else sl=sl.next=i;return a}var Fb=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(a,r){t.push(r)}};this.abort=function(){i.aborted=!0,t.forEach(function(a){return a()})}},Pb=n.unstable_scheduleCallback,Wb=n.unstable_NormalPriority,Ut={$$typeof:X,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xf(){return{controller:new Fb,data:new Map,refCount:0}}function Tr(t){t.refCount--,t.refCount===0&&Pb(Wb,function(){t.controller.abort()})}function Ng(t,i){if((t.pendingLanes&4194048)!==0){var a=t.transitionTypes;for(a===null&&(a=t.transitionTypes=[]),t=0;t<i.length;t++){var r=i[t];a.indexOf(r)===-1&&a.push(r)}}}var Ar=null;function e3(t){var i=t.transitionTypes;return t.transitionTypes=null,i}var Or=null,bf=0,Ta=0,yo=null;function t3(t,i){if(Or===null){var a=Or=[];bf=0,Ta=Bd(),yo={status:"pending",value:void 0,then:function(r){a.push(r)}}}return bf++,i.then(Cg,Cg),i}function Cg(){if(--bf===0&&(Ar=null,Or!==null)){yo!==null&&(yo.status="fulfilled");var t=Or;Or=null,Ta=0,yo=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function n3(t,i){var a=[],r={status:"pending",value:null,reason:null,then:function(u){a.push(u)}};return t.then(function(){r.status="fulfilled",r.value=i;for(var u=0;u<a.length;u++)(0,a[u])(i)},function(u){for(r.status="rejected",r.reason=u,u=0;u<a.length;u++)(0,a[u])(void 0)}),r}var Mg=le.S;le.S=function(t,i){if(x2=Xe(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&t3(t,i),Ar!==null)for(var a=Ho;a!==null;)Ng(a,Ar),a=a.next;if(a=t.types,a!==null){for(var r=Ho;r!==null;)Ng(r,a),r=r.next;if(Ta!==0){r=Ar,r===null&&(r=Ar=[]);for(var u=0;u<a.length;u++){var f=a[u];r.indexOf(f)===-1&&r.push(f)}}}Mg!==null&&Mg(t,i)};var Aa=be(null);function Sf(){var t=Aa.current;return t!==null?t:Ct.pooledCache}function $s(t,i){i===null?pe(Aa,Aa.current):pe(Aa,i.pool)}function Tg(){var t=Sf();return t===null?null:{parent:Ut._currentValue,pool:t}}var vo=Error(o(460)),_f=Error(o(474)),Is=Error(o(542)),Js={then:function(){}};function Ag(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Og(t,i,a){switch(a=t[a],a===void 0?t.push(i):a!==i&&(i.then(Wt,Wt),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,Rg(t),t===void 0&&!("reason"in i)?Error(o(600)):t;default:if(typeof i.status=="string")i.then(Wt,Wt);else{if(t=Ct,t!==null&&100<t.shellSuspendCounter)throw Error(o(482));t=i,t.status="pending",t.then(function(r){if(i.status==="pending"){var u=i;u.status="fulfilled",u.value=r}},function(r){if(i.status==="pending"){var u=i;u.status="rejected",u.reason=r}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,Rg(t),t}throw za=i,vo}}function Oa(t){try{var i=t._init;return i(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(za=a,vo):a}}var za=null;function zg(){if(za===null)throw Error(o(459));var t=za;return za=null,t}function Rg(t){if(t===vo||t===Is)throw Error(o(483))}var xo=null,zr=0;function Fs(t){var i=zr;return zr+=1,xo===null&&(xo=[]),Og(xo,t,i)}function kl(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function Ps(t,i){throw i.$$typeof===H?Error(o(525)):(t=Object.prototype.toString.call(i),Error(o(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function Dg(t){function i(te,$){if(t){var ae=te.deletions;ae===null?(te.deletions=[$],te.flags|=16):ae.push($)}}function a(te,$){if(!t)return null;for(;$!==null;)i(te,$),$=$.sibling;return null}function r(te){for(var $=new Map;te!==null;)te.key===null?$.set(te.index,te):$.set(te.key,te),te=te.sibling;return $}function u(te,$){return te=ol(te,$),te.index=0,te.sibling=null,te}function f(te,$,ae){return te.index=ae,t?(ae=te.alternate,ae!==null?(ae=ae.index,ae<$?(te.flags|=2,$):ae):(te.flags|=134217730,$)):(te.flags|=1048576,$)}function x(te){return t&&te.alternate===null&&(te.flags|=134217730),te}function A(te,$,ae,he){return $===null||$.tag!==6?($=df(ae,te.mode,he),$.return=te,$):($=u($,ae),$.return=te,$)}function q(te,$,ae,he){var Ne=ae.type;return Ne===Z?(te=ue(te,$,ae.props.children,he,ae.key),kl(te,ae),te):$!==null&&($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===P&&Oa(Ne)===$.type)?($=u($,ae.props),kl($,ae),$.return=te,$):($=qs(ae.type,ae.key,ae.props,null,te.mode,he),kl($,ae),$.return=te,$)}function ne(te,$,ae,he){return $===null||$.tag!==4||$.stateNode.containerInfo!==ae.containerInfo||$.stateNode.implementation!==ae.implementation?($=hf(ae,te.mode,he),$.return=te,$):($=u($,ae.children||[]),$.return=te,$)}function ue(te,$,ae,he,Ne){return $===null||$.tag!==7?($=wa(ae,te.mode,he,Ne),$.return=te,$):($=u($,ae),$.return=te,$)}function ge(te,$,ae){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=df(""+$,te.mode,ae),$.return=te,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case z:return ae=qs($.type,$.key,$.props,null,te.mode,ae),kl(ae,$),ae.return=te,ae;case Y:return $=hf($,te.mode,ae),$.return=te,$;case P:return $=Oa($),ge(te,$,ae)}if(ie($)||K($))return $=wa($,te.mode,ae,null),$.return=te,$;if(typeof $.then=="function")return ge(te,Fs($),ae);if($.$$typeof===X)return ge(te,Ks(te,$),ae);Ps(te,$)}return null}function W(te,$,ae,he){var Ne=$!==null?$.key:null;if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return Ne!==null?null:A(te,$,""+ae,he);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case z:return ae.key===Ne?q(te,$,ae,he):null;case Y:return ae.key===Ne?ne(te,$,ae,he):null;case P:return ae=Oa(ae),W(te,$,ae,he)}if(ie(ae)||K(ae))return Ne!==null?null:ue(te,$,ae,he,null);if(typeof ae.then=="function")return W(te,$,Fs(ae),he);if(ae.$$typeof===X)return W(te,$,Ks(te,ae),he);Ps(te,ae)}return null}function se(te,$,ae,he,Ne){if(typeof he=="string"&&he!==""||typeof he=="number"||typeof he=="bigint")return te=te.get(ae)||null,A($,te,""+he,Ne);if(typeof he=="object"&&he!==null){switch(he.$$typeof){case z:return te=te.get(he.key===null?ae:he.key)||null,q($,te,he,Ne);case Y:return te=te.get(he.key===null?ae:he.key)||null,ne($,te,he,Ne);case P:return he=Oa(he),se(te,$,ae,he,Ne)}if(ie(he)||K(he))return te=te.get(ae)||null,ue($,te,he,Ne,null);if(typeof he.then=="function")return se(te,$,ae,Fs(he),Ne);if(he.$$typeof===X)return se(te,$,ae,Ks($,he),Ne);Ps($,he)}return null}function _e(te,$,ae,he){for(var Ne=null,lt=null,Te=$,De=$=0,qt=null;Te!==null&&De<ae.length;De++){Te.index>De?(qt=Te,Te=null):qt=Te.sibling;var st=W(te,Te,ae[De],he);if(st===null){Te===null&&(Te=qt);break}t&&Te&&st.alternate===null&&i(te,Te),$=f(st,$,De),lt===null?Ne=st:lt.sibling=st,lt=st,Te=qt}if(De===ae.length)return a(te,Te),Qe&&rl(te,De),Ne;if(Te===null){for(;De<ae.length;De++)Te=ge(te,ae[De],he),Te!==null&&($=f(Te,$,De),lt===null?Ne=Te:lt.sibling=Te,lt=Te);return Qe&&rl(te,De),Ne}for(Te=r(Te);De<ae.length;De++)qt=se(Te,te,De,ae[De],he),qt!==null&&(t&&(st=qt.alternate,st!==null&&Te.delete(st.key===null?De:st.key)),$=f(qt,$,De),lt===null?Ne=qt:lt.sibling=qt,lt=qt);return t&&Te.forEach(function(la){return i(te,la)}),Qe&&rl(te,De),Ne}function Ce(te,$,ae,he){if(ae==null)throw Error(o(151));for(var Ne=null,lt=null,Te=$,De=$=0,qt=null,st=ae.next();Te!==null&&!st.done;De++,st=ae.next()){Te.index>De?(qt=Te,Te=null):qt=Te.sibling;var la=W(te,Te,st.value,he);if(la===null){Te===null&&(Te=qt);break}t&&Te&&la.alternate===null&&i(te,Te),$=f(la,$,De),lt===null?Ne=la:lt.sibling=la,lt=la,Te=qt}if(st.done)return a(te,Te),Qe&&rl(te,De),Ne;if(Te===null){for(;!st.done;De++,st=ae.next())st=ge(te,st.value,he),st!==null&&($=f(st,$,De),lt===null?Ne=st:lt.sibling=st,lt=st);return Qe&&rl(te,De),Ne}for(Te=r(Te);!st.done;De++,st=ae.next())st=se(Te,te,De,st.value,he),st!==null&&(t&&(qt=st.alternate,qt!==null&&Te.delete(qt.key===null?De:qt.key)),$=f(st,$,De),lt===null?Ne=st:lt.sibling=st,lt=st);return t&&Te.forEach(function(BS){return i(te,BS)}),Qe&&rl(te,De),Ne}function Ye(te,$,ae,he){if(typeof ae=="object"&&ae!==null&&ae.type===Z&&ae.key===null&&ae.props.ref===void 0&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case z:e:{for(var Ne=ae.key;$!==null;){if($.key===Ne){if(Ne=ae.type,Ne===Z){if($.tag===7){a(te,$.sibling),he=u($,ae.props.children),kl(he,ae),he.return=te,te=he;break e}}else if($.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===P&&Oa(Ne)===$.type){a(te,$.sibling),he=u($,ae.props),kl(he,ae),he.return=te,te=he;break e}a(te,$);break}else i(te,$);$=$.sibling}ae.type===Z?(he=wa(ae.props.children,te.mode,he,ae.key),kl(he,ae),he.return=te,te=he):(he=qs(ae.type,ae.key,ae.props,null,te.mode,he),kl(he,ae),he.return=te,te=he)}return x(te);case Y:e:{for(Ne=ae.key;$!==null;){if($.key===Ne)if($.tag===4&&$.stateNode.containerInfo===ae.containerInfo&&$.stateNode.implementation===ae.implementation){a(te,$.sibling),he=u($,ae.children||[]),he.return=te,te=he;break e}else{a(te,$);break}else i(te,$);$=$.sibling}he=hf(ae,te.mode,he),he.return=te,te=he}return x(te);case P:return ae=Oa(ae),Ye(te,$,ae,he)}if(ie(ae))return _e(te,$,ae,he);if(K(ae)){if(Ne=K(ae),typeof Ne!="function")throw Error(o(150));return ae=Ne.call(ae),Ce(te,$,ae,he)}if(typeof ae.then=="function")return Ye(te,$,Fs(ae),he);if(ae.$$typeof===X)return Ye(te,$,Ks(te,ae),he);Ps(te,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,$!==null&&$.tag===6?(a(te,$.sibling),he=u($,ae),he.return=te,te=he):(a(te,$),he=df(ae,te.mode,he),he.return=te,te=he),x(te)):a(te,$)}return function(te,$,ae,he){try{zr=0;var Ne=Ye(te,$,ae,he);return xo=null,Ne}catch(Te){if(Te===vo||Te===Is)throw Te;var lt=Cn(29,Te,null,te.mode);return lt.lanes=he,lt.return=te,lt}finally{}}}var Ra=Dg(!0),jg=Dg(!1),Yl=!1;function wf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function ql(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function Vl(t,i,a){var r=t.updateQueue;if(r===null)return null;if(r=r.shared,(xt&2)!==0){var u=r.pending;return u===null?i.next=i:(i.next=u.next,u.next=i),r.pending=i,i=Ys(t),yg(t,null,a),i}return ks(t,r,i,a),Ys(t)}function Rr(t,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var r=i.lanes;r&=t.pendingLanes,a|=r,i.lanes=a,_l(t,a)}}function Nf(t,i){var a=t.updateQueue,r=t.alternate;if(r!==null&&(r=r.updateQueue,a===r)){var u=null,f=null;if(a=a.firstBaseUpdate,a!==null){do{var x={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};f===null?u=f=x:f=f.next=x,a=a.next}while(a!==null);f===null?u=f=i:f=f.next=i}else u=f=i;a={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:f,shared:r.shared,callbacks:r.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=i:t.next=i,a.lastBaseUpdate=i}var Cf=!1;function Dr(){if(Cf){var t=yo;if(t!==null)throw t}}function jr(t,i,a,r){Cf=!1;var u=t.updateQueue;Yl=!1;var f=u.firstBaseUpdate,x=u.lastBaseUpdate,A=u.shared.pending;if(A!==null){u.shared.pending=null;var q=A,ne=q.next;q.next=null,x===null?f=ne:x.next=ne,x=q;var ue=t.alternate;ue!==null&&(ue=ue.updateQueue,A=ue.lastBaseUpdate,A!==x&&(A===null?ue.firstBaseUpdate=ne:A.next=ne,ue.lastBaseUpdate=q))}if(f!==null){var ge=u.baseState;x=0,ue=ne=q=null,A=f;do{var W=A.lane&-536870913,se=W!==A.lane;if(se?(it&W)===W:(r&W)===W){W!==0&&W===Ta&&(Cf=!0),ue!==null&&(ue=ue.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var _e=t,Ce=A;W=i;var Ye=a;switch(Ce.tag){case 1:if(_e=Ce.payload,typeof _e=="function"){ge=_e.call(Ye,ge,W);break e}ge=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ce.payload,W=typeof _e=="function"?_e.call(Ye,ge,W):_e,W==null)break e;ge=R({},ge,W);break e;case 2:Yl=!0}}W=A.callback,W!==null&&(t.flags|=64,se&&(t.flags|=8192),se=u.callbacks,se===null?u.callbacks=[W]:se.push(W))}else se={lane:W,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ue===null?(ne=ue=se,q=ge):ue=ue.next=se,x|=W;if(A=A.next,A===null){if(A=u.shared.pending,A===null)break;se=A,A=se.next,se.next=null,u.lastBaseUpdate=se,u.shared.pending=null}}while(!0);ue===null&&(q=ge),u.baseState=q,u.firstBaseUpdate=ne,u.lastBaseUpdate=ue,f===null&&(u.shared.lanes=0),Il|=x,t.lanes=x,t.memoizedState=ge}}function Hg(t,i){if(typeof t!="function")throw Error(o(191,t));t.call(i)}function Bg(t,i){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)Hg(a[t],i)}var Xl=be(null),Ws=be(0);function Lg(t,i){t=gl,pe(Ws,t),pe(Xl,i),gl=t|i.baseLanes}function Mf(){pe(Ws,gl),pe(Xl,Xl.current)}function Tf(){gl=Ws.current,xe(Xl),xe(Ws)}var tn=be(null),hn=null;function Gl(t){var i=t.alternate;pe(nn,nn.current&1),pe(tn,t),hn===null&&(i===null||Xl.current!==null||i.memoizedState!==null)&&(hn=t)}function Af(t){pe(nn,nn.current),pe(tn,t),hn===null&&(hn=t)}function Ug(t){t.tag===22?(pe(nn,nn.current),pe(tn,t),hn===null&&(hn=t)):Zl()}function Zl(){pe(nn,nn.current),pe(tn,tn.current)}function Ln(t){xe(tn),hn===t&&(hn=null),xe(nn)}var nn=be(0);function Hr(t,i){pe(tn,tn.current),pe(nn,i)}function Of(t){xe(nn),xe(tn),hn===t&&(hn=null)}function eu(t){for(var i=t;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Pd(a)||Wd(a)))return i}else if(i.tag===19&&i.memoizedProps.revealOrder!=="independent"){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var cl=0,ke=null,Nt=null,kt=null,tu=!1,bo=!1,Da=!1,nu=0,Br=0,So=null,i3=0;function jt(){throw Error(o(321))}function zf(t,i){if(i===null)return!1;for(var a=0;a<i.length&&a<t.length;a++)if(!Bn(t[a],i[a]))return!1;return!0}function Rf(t,i,a,r,u,f){return cl=f,ke=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,le.H=t===null||t.memoizedState===null?S1:_1,Da=!1,f=a(r,u),Da=!1,bo&&(f=Yg(i,a,r,u)),kg(t),f}function kg(t){le.H=uu;var i=Nt!==null&&Nt.next!==null;if(cl=0,kt=Nt=ke=null,tu=!1,Br=0,So=null,i)throw Error(o(300));t===null||Yt||(t=t.dependencies,t!==null&&Qs(t)&&(Yt=!0))}function Yg(t,i,a,r){ke=t;var u=0;do{if(bo&&(So=null),Br=0,bo=!1,25<=u)throw Error(o(301));if(u+=1,kt=Nt=null,t.updateQueue!=null){var f=t.updateQueue;f.lastEffect=null,f.events=null,f.stores=null,f.memoCache!=null&&(f.memoCache.index=0)}le.H=f3,f=i(a,r)}while(bo);return f}function l3(){var t=le.H,i=t.useState()[0];return i=typeof i.then=="function"?Lr(i):i,t=t.useState()[0],(Nt!==null?Nt.memoizedState:null)!==t&&(ke.flags|=1024),i}function Df(){var t=nu!==0;return nu=0,t}function jf(t,i,a){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~a}function Hf(t){if(tu){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}tu=!1}cl=0,kt=Nt=ke=null,bo=!1,Br=nu=0,So=null}function vn(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return kt===null?ke.memoizedState=kt=t:kt=kt.next=t,kt}function Bt(){if(Nt===null){var t=ke.alternate;t=t!==null?t.memoizedState:null}else t=Nt.next;var i=kt===null?ke.memoizedState:kt.next;if(i!==null)kt=i,Nt=t;else{if(t===null)throw ke.alternate===null?Error(o(467)):Error(o(310));Nt=t,t={memoizedState:Nt.memoizedState,baseState:Nt.baseState,baseQueue:Nt.baseQueue,queue:Nt.queue,next:null},kt===null?ke.memoizedState=kt=t:kt=kt.next=t}return kt}function iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Lr(t){var i=Br;return Br+=1,So===null&&(So=[]),t=Og(So,t,i),i=ke,(kt===null?i.memoizedState:kt.next)===null&&(i=i.alternate,le.H=i===null||i.memoizedState===null?S1:_1),t}function lu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Lr(t);if(t.$$typeof===V)return;if(t.$$typeof===X)return en(t)}throw Error(o(438,String(t)))}function Bf(t){var i=null,a=ke.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var r=ke.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(i={data:r.data.map(function(u){return u.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=iu(),ke.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(t),r=0;r<t;r++)a[r]=oe;return i.index++,a}function fl(t,i){return typeof i=="function"?i(t):i}function au(t){var i=Bt();return Lf(i,Nt,t)}function Lf(t,i,a){var r=t.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=a;var u=t.baseQueue,f=r.pending;if(f!==null){if(u!==null){var x=u.next;u.next=f.next,f.next=x}i.baseQueue=u=f,r.pending=null}if(f=t.baseState,u===null)t.memoizedState=f;else{i=u.next;var A=x=null,q=null,ne=i,ue=!1;do{var ge=ne.lane&-536870913;if(ge!==ne.lane?(it&ge)===ge:(cl&ge)===ge){var W=ne.revertLane;if(W===0)q!==null&&(q=q.next={lane:0,revertLane:0,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null}),ge===Ta&&(ue=!0);else if((cl&W)===W){ne=ne.next,W===Ta&&(ue=!0);continue}else ge={lane:0,revertLane:ne.revertLane,gesture:null,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},q===null?(A=q=ge,x=f):q=q.next=ge,ke.lanes|=W,Il|=W;ge=ne.action,Da&&a(f,ge),f=ne.hasEagerState?ne.eagerState:a(f,ge)}else W={lane:ge,revertLane:ne.revertLane,gesture:ne.gesture,action:ne.action,hasEagerState:ne.hasEagerState,eagerState:ne.eagerState,next:null},q===null?(A=q=W,x=f):q=q.next=W,ke.lanes|=ge,Il|=ge;ne=ne.next}while(ne!==null&&ne!==i);if(q===null?x=f:q.next=A,!Bn(f,t.memoizedState)&&(Yt=!0,ue&&(a=yo,a!==null)))throw a;t.memoizedState=f,t.baseState=x,t.baseQueue=q,r.lastRenderedState=f}return u===null&&(r.lanes=0),[t.memoizedState,r.dispatch]}function Uf(t){var i=Bt(),a=i.queue;if(a===null)throw Error(o(311));a.lastRenderedReducer=t;var r=a.dispatch,u=a.pending,f=i.memoizedState;if(u!==null){a.pending=null;var x=u=u.next;do f=t(f,x.action),x=x.next;while(x!==u);Bn(f,i.memoizedState)||(Yt=!0),i.memoizedState=f,i.baseQueue===null&&(i.baseState=f),a.lastRenderedState=f}return[f,r]}function qg(t,i,a){var r=ke,u=Bt(),f=Qe;if(f){if(a===void 0)throw Error(o(407));a=a()}else a=i();var x=!Bn((Nt||u).memoizedState,a);if(x&&(u.memoizedState=a,Yt=!0),u=u.queue,qf(Gg.bind(null,r,u,t),[t]),t=u.getSnapshot!==i||x||kt!==null&&(kt.memoizedState.tag&1)!==0,_o(t?9:8,{destroy:void 0},Xg.bind(null,r,u,a,i),null),t){if(r.flags|=2048,Ct===null)throw Error(o(349));f||(cl&127)!==0||Vg(r,i,a)}return a}function Vg(t,i,a){t.flags|=16384,t={getSnapshot:i,value:a},i=ke.updateQueue,i===null?(i=iu(),ke.updateQueue=i,i.stores=[t]):(a=i.stores,a===null?i.stores=[t]:a.push(t))}function Xg(t,i,a,r){i.value=a,i.getSnapshot=r,Zg(i)&&Qg(t)}function Gg(t,i,a){return a(function(){Zg(i)&&Qg(t)})}function Zg(t){var i=t.getSnapshot;t=t.value;try{var a=i();return!Bn(t,a)}catch{return!0}}function Qg(t){var i=_a(t,2);i!==null&&On(i,t,2)}function kf(t){var i=vn();if(typeof t=="function"){var a=t;if(t=a(),Da){dt(!0);try{a()}finally{dt(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:t},i}function Kg(t,i,a,r){return t.baseState=a,Lf(t,Nt,typeof r=="function"?r:fl)}function a3(t,i,a,r,u){if(su(t))throw Error(o(485));if(t=i.action,t!==null){var f={payload:u,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){f.listeners.push(x)}};le.T!==null?a(!0):f.isTransition=!1,r(f),a=i.pending,a===null?(f.next=i.pending=f,$g(i,f)):(f.next=a.next,i.pending=a.next=f)}}function $g(t,i){var a=i.action,r=i.payload,u=t.state;if(i.isTransition){var f=le.T,x={};x.types=f!==null?f.types:null,le.T=x;try{var A=a(u,r),q=le.S;q!==null&&q(x,A),Ig(t,i,A)}catch(ne){Yf(t,i,ne)}finally{f!==null&&x.types!==null&&(f.types=x.types),le.T=f}}else try{f=a(u,r),Ig(t,i,f)}catch(ne){Yf(t,i,ne)}}function Ig(t,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(r){Jg(t,i,r)},function(r){return Yf(t,i,r)}):Jg(t,i,a)}function Jg(t,i,a){i.status="fulfilled",i.value=a,Fg(i),t.state=a,i=t.pending,i!==null&&(a=i.next,a===i?t.pending=null:(a=a.next,i.next=a,$g(t,a)))}function Yf(t,i,a){var r=t.pending;if(t.pending=null,r!==null){r=r.next;do i.status="rejected",i.reason=a,Fg(i),i=i.next;while(i!==r)}t.action=null}function Fg(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function Pg(t,i){return i}function Wg(t,i){if(Qe){var a=Ct.formState;if(a!==null){e:{var r=ke;if(Qe){if(Tt){t:{for(var u=Tt,f=ei;u.nodeType!==8;){if(!f){u=null;break t}if(u=ni(u.nextSibling),u===null){u=null;break t}}f=u.data,u=f==="F!"||f==="F"?u:null}if(u){Tt=ni(u.nextSibling),r=u.data==="F!";break e}}Ll(r)}r=!1}r&&(i=a[0])}}return a=vn(),a.memoizedState=a.baseState=i,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pg,lastRenderedState:i},a.queue=r,a=v1.bind(null,ke,r),r.dispatch=a,r=kf(!1),f=Qf.bind(null,ke,!1,r.queue),r=vn(),u={state:i,dispatch:null,action:t,pending:null},r.queue=u,a=a3.bind(null,ke,u,f,a),u.dispatch=a,r.memoizedState=t,[i,a,!1]}function e1(t){var i=Bt();return t1(i,Nt,t)}function t1(t,i,a){if(i=Lf(t,i,Pg)[0],t=au(fl)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var r=Lr(i)}catch(x){throw x===vo?Is:x}else r=i;i=Bt();var u=i.queue,f=u.dispatch;return a!==i.memoizedState&&(ke.flags|=2048,_o(9,{destroy:void 0},o3.bind(null,u,a),null)),[r,f,t]}function o3(t,i){t.action=i}function n1(t){var i=Bt(),a=Nt;if(a!==null)return t1(i,a,t);Bt(),i=i.memoizedState,a=Bt();var r=a.queue.dispatch;return a.memoizedState=t,[i,r,!1]}function _o(t,i,a,r){return t={tag:t,create:a,deps:r,inst:i,next:null},i=ke.updateQueue,i===null&&(i=iu(),ke.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=t.next=t:(r=a.next,a.next=t,t.next=r,i.lastEffect=t),t}function i1(){return Bt().memoizedState}function ou(t,i,a,r){var u=vn();ke.flags|=t,u.memoizedState=_o(1|i,{destroy:void 0},a,r===void 0?null:r)}function ru(t,i,a,r){var u=Bt();r=r===void 0?null:r;var f=u.memoizedState.inst;Nt!==null&&r!==null&&zf(r,Nt.memoizedState.deps)?u.memoizedState=_o(i,f,a,r):(ke.flags|=t,u.memoizedState=_o(1|i,f,a,r))}function l1(t,i){ou(8390656,8,t,i)}function qf(t,i){ru(2048,8,t,i)}function r3(t){ke.flags|=4;var i=ke.updateQueue;if(i===null)i=iu(),ke.updateQueue=i,i.events=[t];else{var a=i.events;a===null?i.events=[t]:a.push(t)}}function a1(t){var i=Bt().memoizedState;return r3({ref:i,nextImpl:t}),function(){if((xt&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}function o1(t,i){return ru(4,2,t,i)}function r1(t,i){return ru(4,4,t,i)}function s1(t,i){if(typeof i=="function"){t=t();var a=i(t);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function u1(t,i,a){a=a!=null?a.concat([t]):null,ru(4,4,s1.bind(null,i,t),a)}function Vf(){}function c1(t,i){var a=Bt();i=i===void 0?null:i;var r=a.memoizedState;return i!==null&&zf(i,r[1])?r[0]:(a.memoizedState=[t,i],t)}function f1(t,i){var a=Bt();i=i===void 0?null:i;var r=a.memoizedState;if(i!==null&&zf(i,r[1]))return r[0];if(r=t(),Da){dt(!0);try{t()}finally{dt(!1)}}return a.memoizedState=[r,i],r}function Xf(t,i,a){return a===void 0||(cl&1073741824)!==0&&(it&261930)===0?t.memoizedState=i:(t.memoizedState=a,t=S2(),ke.lanes|=t,Il|=t,a)}function d1(t,i,a,r){return Bn(a,i)?a:Xl.current!==null?(t=Xf(t,a,r),Bn(t,i)||(Yt=!0),t):(cl&106)===0||(cl&1073741824)!==0&&(it&261930)===0?(Yt=!0,t.memoizedState=a):(t=S2(),ke.lanes|=t,Il|=t,i)}function h1(t,i,a,r,u){var f=ce.p;ce.p=f!==0&&8>f?f:8;var x=le.T,A={};A.types=x!==null?x.types:null,le.T=A,Qf(t,!1,i,a);try{var q=u(),ne=le.S;if(ne!==null&&ne(A,q),q!==null&&typeof q=="object"&&typeof q.then=="function"){var ue=n3(q,r);Ur(t,i,ue,qn(t))}else Ur(t,i,r,qn(t))}catch(ge){Ur(t,i,{then:function(){},status:"rejected",reason:ge},qn())}finally{ce.p=f,x!==null&&A.types!==null&&(x.types=A.types),le.T=x}}function s3(){}function Gf(t,i,a,r){if(t.tag!==5)throw Error(o(476));var u=g1(t).queue;h1(t,u,i,me,a===null?s3:function(){return m1(t),a(r)})}function g1(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:me,baseState:me,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:me},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fl,lastRenderedState:a},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function m1(t){var i=g1(t);i.next===null&&(i=t.alternate.memoizedState),Ur(t,i.next.queue,{},qn())}function Zf(){return en(qo)}function p1(){return Bt().memoizedState}function y1(){return Bt().memoizedState}function u3(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var a=qn();t=ql(a);var r=Vl(i,t,a);r!==null&&(On(r,i,a),Rr(r,i,a)),i={cache:xf()},t.payload=i;return}i=i.return}}function c3(t,i,a){var r=qn();a={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},su(t)?x1(i,a):(a=cf(t,i,a,r),a!==null&&(On(a,t,r),b1(a,i,r)))}function v1(t,i,a){var r=qn();Ur(t,i,a,r)}function Ur(t,i,a,r){var u={lane:r,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(su(t))x1(i,u);else{var f=t.alternate;if(t.lanes===0&&(f===null||f.lanes===0)&&(f=i.lastRenderedReducer,f!==null))try{var x=i.lastRenderedState,A=f(x,a);if(u.hasEagerState=!0,u.eagerState=A,Bn(A,x))return ks(t,i,u,0),Ct===null&&Us(),!1}catch{}finally{}if(a=cf(t,i,u,r),a!==null)return On(a,t,r),b1(a,i,r),!0}return!1}function Qf(t,i,a,r){if(r={lane:2,revertLane:Bd(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},su(t)){if(i)throw Error(o(479))}else i=cf(t,a,r,2),i!==null&&On(i,t,2)}function su(t){var i=t.alternate;return t===ke||i!==null&&i===ke}function x1(t,i){bo=tu=!0;var a=t.pending;a===null?i.next=i:(i.next=a.next,a.next=i),t.pending=i}function b1(t,i,a){if((a&4194048)!==0){var r=i.lanes;r&=t.pendingLanes,a|=r,i.lanes=a,_l(t,a)}}var uu={readContext:en,use:lu,useCallback:jt,useContext:jt,useEffect:jt,useImperativeHandle:jt,useLayoutEffect:jt,useInsertionEffect:jt,useMemo:jt,useReducer:jt,useRef:jt,useState:jt,useDebugValue:jt,useDeferredValue:jt,useTransition:jt,useSyncExternalStore:jt,useId:jt,useHostTransitionStatus:jt,useFormState:jt,useActionState:jt,useOptimistic:jt,useMemoCache:jt,useCacheRefresh:jt,useEffectEvent:jt},S1={readContext:en,use:lu,useCallback:function(t,i){return vn().memoizedState=[t,i===void 0?null:i],t},useContext:en,useEffect:l1,useImperativeHandle:function(t,i,a){a=a!=null?a.concat([t]):null,ou(4194308,4,s1.bind(null,i,t),a)},useLayoutEffect:function(t,i){return ou(4194308,4,t,i)},useInsertionEffect:function(t,i){ou(4,2,t,i)},useMemo:function(t,i){var a=vn();i=i===void 0?null:i;var r=t();if(Da){dt(!0);try{t()}finally{dt(!1)}}return a.memoizedState=[r,i],r},useReducer:function(t,i,a){var r=vn();if(a!==void 0){var u=a(i);if(Da){dt(!0);try{a(i)}finally{dt(!1)}}}else u=i;return r.memoizedState=r.baseState=u,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:u},r.queue=t,t=t.dispatch=c3.bind(null,ke,t),[r.memoizedState,t]},useRef:function(t){var i=vn();return t={current:t},i.memoizedState=t},useState:function(t){t=kf(t);var i=t.queue,a=v1.bind(null,ke,i);return i.dispatch=a,[t.memoizedState,a]},useDebugValue:Vf,useDeferredValue:function(t,i){var a=vn();return Xf(a,t,i)},useTransition:function(){var t=kf(!1);return t=h1.bind(null,ke,t.queue,!0,!1),vn().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,a){var r=ke,u=vn();if(Qe){if(a===void 0)throw Error(o(407));a=a()}else{if(a=i(),Ct===null)throw Error(o(349));(it&127)!==0||Vg(r,i,a)}u.memoizedState=a;var f={value:a,getSnapshot:i};return u.queue=f,l1(Gg.bind(null,r,f,t),[t]),r.flags|=2048,_o(9,{destroy:void 0},Xg.bind(null,r,f,a,i),null),a},useId:function(){var t=vn(),i=Ct.identifierPrefix;if(Qe){var a=Hi,r=ji;a=(r&~(1<<32-ht(r)-1)).toString(32)+a,i="_"+i+"R_"+a,a=nu++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=i3++,i="_"+i+"r_"+a.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:Zf,useFormState:Wg,useActionState:Wg,useOptimistic:function(t){var i=vn();i.memoizedState=i.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=Qf.bind(null,ke,!0,a),a.dispatch=i,[t,i]},useMemoCache:Bf,useCacheRefresh:function(){return vn().memoizedState=u3.bind(null,ke)},useEffectEvent:function(t){var i=vn(),a={impl:t};return i.memoizedState=a,function(){if((xt&2)!==0)throw Error(o(440));return a.impl.apply(void 0,arguments)}}},_1={readContext:en,use:lu,useCallback:c1,useContext:en,useEffect:qf,useImperativeHandle:u1,useInsertionEffect:o1,useLayoutEffect:r1,useMemo:f1,useReducer:au,useRef:i1,useState:function(){return au(fl)},useDebugValue:Vf,useDeferredValue:function(t,i){var a=Bt();return d1(a,Nt.memoizedState,t,i)},useTransition:function(){var t=au(fl)[0],i=Bt().memoizedState;return[typeof t=="boolean"?t:Lr(t),i]},useSyncExternalStore:qg,useId:p1,useHostTransitionStatus:Zf,useFormState:e1,useActionState:e1,useOptimistic:function(t,i){var a=Bt();return Kg(a,Nt,t,i)},useMemoCache:Bf,useCacheRefresh:y1,useEffectEvent:a1},f3={readContext:en,use:lu,useCallback:c1,useContext:en,useEffect:qf,useImperativeHandle:u1,useInsertionEffect:o1,useLayoutEffect:r1,useMemo:f1,useReducer:Uf,useRef:i1,useState:function(){return Uf(fl)},useDebugValue:Vf,useDeferredValue:function(t,i){var a=Bt();return Nt===null?Xf(a,t,i):d1(a,Nt.memoizedState,t,i)},useTransition:function(){var t=Uf(fl)[0],i=Bt().memoizedState;return[typeof t=="boolean"?t:Lr(t),i]},useSyncExternalStore:qg,useId:p1,useHostTransitionStatus:Zf,useFormState:n1,useActionState:n1,useOptimistic:function(t,i){var a=Bt();return Nt!==null?Kg(a,Nt,t,i):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Bf,useCacheRefresh:y1,useEffectEvent:a1};function Kf(t,i,a,r){i=t.memoizedState,a=a(r,i),a=a==null?i:R({},i,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var $f={enqueueSetState:function(t,i,a){t=t._reactInternals;var r=qn(),u=ql(r);u.payload=i,a!=null&&(u.callback=a),i=Vl(t,u,r),i!==null&&(On(i,t,r),Rr(i,t,r))},enqueueReplaceState:function(t,i,a){t=t._reactInternals;var r=qn(),u=ql(r);u.tag=1,u.payload=i,a!=null&&(u.callback=a),i=Vl(t,u,r),i!==null&&(On(i,t,r),Rr(i,t,r))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var a=qn(),r=ql(a);r.tag=2,i!=null&&(r.callback=i),i=Vl(t,r,a),i!==null&&(On(i,t,a),Rr(i,t,a))}};function w1(t,i,a,r,u,f,x){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(r,f,x):i.prototype&&i.prototype.isPureReactComponent?!Er(a,r)||!Er(u,f):!0}function E1(t,i,a,r){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,r),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,r),i.state!==t&&$f.enqueueReplaceState(i,i.state,null)}function ja(t,i){var a=i;if("ref"in i){a={};for(var r in i)r!=="ref"&&(a[r]=i[r])}if(t=t.defaultProps){a===i&&(a=R({},a));for(var u in t)a[u]===void 0&&(a[u]=t[u])}return a}function N1(t){Ls(t)}function C1(t){console.error(t)}function M1(t){Ls(t)}function cu(t,i){try{var a=t.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(r){setTimeout(function(){throw r})}}function T1(t,i,a){try{var r=t.onCaughtError;r(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function If(t,i,a){return a=ql(a),a.tag=3,a.payload={element:null},a.callback=function(){cu(t,i)},a}function A1(t){return t=ql(t),t.tag=3,t}function O1(t,i,a,r){var u=a.type.getDerivedStateFromError;if(typeof u=="function"){var f=r.value;t.payload=function(){return u(f)},t.callback=function(){T1(i,a,r)}}var x=a.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(t.callback=function(){T1(i,a,r),typeof u!="function"&&(Jl===null?Jl=new Set([this]):Jl.add(this));var A=r.stack;this.componentDidCatch(r.value,{componentStack:A!==null?A:""})})}function d3(t,i,a,r,u){if(a.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(i=a.alternate,i!==null&&Ca(i,a,u,!0),a=tn.current,a!==null){switch(a.tag){case 31:case 13:case 19:return hn===null?zu():a.alternate===null&&Ht===0&&(Ht=3),a.flags&=-257,a.flags|=65536,a.lanes=u,r===Js?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([r]):i.add(r),Dd(t,r,u)),!1;case 22:return a.flags|=65536,r===Js?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([r])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([r]):a.add(r)),Dd(t,r,u)),!1}throw Error(o(435,a.tag))}return Dd(t,r,u),zu(),!1}if(Qe)return i=tn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=u,r!==mf&&(t=Error(o(422),{cause:r}),Mr(Fn(t,a)))):(r!==mf&&(i=Error(o(423),{cause:r}),Mr(Fn(i,a))),t=t.current.alternate,t.flags|=65536,u&=-u,t.lanes|=u,r=Fn(r,a),u=If(t.stateNode,r,u),Nf(t,u),Ht!==4&&(Ht=2)),!1;var f=Error(o(520),{cause:r});if(f=Fn(f,a),Qr===null?Qr=[f]:Qr.push(f),Ht!==4&&(Ht=2),i===null)return!0;r=Fn(r,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,t=u&-u,a.lanes|=t,t=If(a.stateNode,r,t),Nf(a,t),!1;case 1:if(i=a.type,f=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||f!==null&&typeof f.componentDidCatch=="function"&&(Jl===null||!Jl.has(f))))return a.flags|=65536,u&=-u,a.lanes|=u,u=A1(u),O1(u,t,a,r),Nf(a,u),!1;break;case 22:if(a.memoizedState!==null)return a.flags|=65536,!1}a=a.return}while(a!==null);return!1}var Jf=Error(o(461)),Yt=!1;function Kt(t,i,a,r){i.child=t===null?jg(i,null,a,r):Ra(i,t.child,a,r)}function z1(t,i,a,r,u){a=a.render;var f=i.ref;if("ref"in r){var x={};for(var A in r)A!=="ref"&&(x[A]=r[A])}else x=r;return Ma(i),r=Rf(t,i,a,x,f,u),A=Df(),t!==null&&!Yt?(jf(t,i,u),dl(t,i,u)):(Qe&&A&&Xs(i),i.flags|=1,Kt(t,i,r,u),i.child)}function R1(t,i,a,r,u){if(t===null){var f=a.type;return typeof f=="function"&&!ff(f)&&f.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=f,D1(t,i,f,r,u)):(t=qs(a.type,null,r,i,i.mode,u),t.ref=i.ref,t.return=i,i.child=t)}if(f=t.child,!ld(t,u)){var x=f.memoizedProps;if(a=a.compare,a=a!==null?a:Er,a(x,r)&&t.ref===i.ref)return dl(t,i,u)}return i.flags|=1,t=ol(f,r),t.ref=i.ref,t.return=i,i.child=t}function D1(t,i,a,r,u){if(t!==null){var f=t.memoizedProps;if(Er(f,r)&&t.ref===i.ref)if(Yt=!1,i.pendingProps=r=f,ld(t,u))(t.flags&131072)!==0&&(Yt=!0);else return i.lanes=t.lanes,dl(t,i,u)}return Ff(t,i,a,r,u)}function j1(t,i,a,r){var u=r.children,f=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((i.flags&128)!==0){if(f=f!==null?f.baseLanes|a:a,t!==null){for(r=i.child=t.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;r=u&~f}else r=0,i.child=null;return H1(t,i,f,a,r)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&$s(i,f!==null?f.cachePool:null),f!==null?Lg(i,f):Mf(),Ug(i);else return r=i.lanes=536870912,H1(t,i,f!==null?f.baseLanes|a:a,a,r)}else f!==null?($s(i,f.cachePool),Lg(i,f),Zl(),i.memoizedState=null):(t!==null&&$s(i,null),Mf(),Zl());return Kt(t,i,u,a),i.child}function kr(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function H1(t,i,a,r,u){var f=Sf();return f=f===null?null:{parent:Ut._currentValue,pool:f},i.memoizedState={baseLanes:a,cachePool:f},t!==null&&$s(i,null),Mf(),Ug(i),t!==null&&Ca(t,i,r,!0),i.childLanes=u,null}function fu(t,i){return i=du({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function B1(t,i,a){return Ra(i,t.child,null,a),t=fu(i,i.pendingProps),t.flags|=2,Ln(i),i.memoizedState=null,t}function h3(t,i,a){var r=i.pendingProps,u=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(Qe){if(r.mode==="hidden")return t=fu(i,r),i.lanes=536870912,t.memoizedState={baseLanes:0,cachePool:null},kr(null,t);if(Af(i),(t=Tt)?(t=sm(t,ei),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Hl!==null?{id:ji,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},a=xg(t),a.return=i,i.child=a,$t=i,Tt=null)):t=null,t===null)throw Ll(i);return i.lanes=536870912,null}return fu(i,r)}var f=t.memoizedState;if(f!==null){var x=f.dehydrated;if(Af(i),u)if(i.flags&256)i.flags&=-257,i=B1(t,i,a);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(o(558));else if(Yt||Ca(t,i,a,!1),u=(a&t.childLanes)!==0,Yt||u){if(Xl.current===null){if(r=Ct,r!==null&&(x=wl(r,a),x!==0&&x!==f.retryLane))throw f.retryLane=x,_a(t,x),On(r,t,x),Jf;zu()}i=B1(t,i,a)}else t=f.treeContext,Tt=ni(x.nextSibling),$t=i,Qe=!0,Bl=null,ei=!1,t!==null&&_g(i,t),i=fu(i,r),i.flags|=134221824;return i}return t=ol(t.child,{mode:r.mode,children:r.children}),t.ref=i.ref,i.child=t,t.return=i,t}function wo(t,i){var a=i.ref;if(a===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(o(284));(t===null||t.ref!==a)&&(i.flags|=4194816)}}function Ff(t,i,a,r,u){return Ma(i),a=Rf(t,i,a,r,void 0,u),r=Df(),t!==null&&!Yt?(jf(t,i,u),dl(t,i,u)):(Qe&&r&&Xs(i),i.flags|=1,Kt(t,i,a,u),i.child)}function L1(t,i,a,r,u,f){return Ma(i),i.updateQueue=null,a=Yg(i,r,a,u),kg(t),r=Df(),t!==null&&!Yt?(jf(t,i,f),dl(t,i,f)):(Qe&&r&&Xs(i),i.flags|=1,Kt(t,i,a,f),i.child)}function U1(t,i,a,r,u){if(Ma(i),i.stateNode===null){var f=ho,x=a.contextType;typeof x=="object"&&x!==null&&(f=en(x)),f=new a(r,f),i.memoizedState=f.state!==null&&f.state!==void 0?f.state:null,f.updater=$f,i.stateNode=f,f._reactInternals=i,f=i.stateNode,f.props=r,f.state=i.memoizedState,f.refs={},wf(i),x=a.contextType,f.context=typeof x=="object"&&x!==null?en(x):ho,f.state=i.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(Kf(i,a,x,r),f.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof f.getSnapshotBeforeUpdate=="function"||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(x=f.state,typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount(),x!==f.state&&$f.enqueueReplaceState(f,f.state,null),jr(i,r,f,u),Dr(),f.state=i.memoizedState),typeof f.componentDidMount=="function"&&(i.flags|=4194308),r=!0}else if(t===null){f=i.stateNode;var A=i.memoizedProps,q=ja(a,A);f.props=q;var ne=f.context,ue=a.contextType;x=ho,typeof ue=="object"&&ue!==null&&(x=en(ue));var ge=a.getDerivedStateFromProps;ue=typeof ge=="function"||typeof f.getSnapshotBeforeUpdate=="function",A=i.pendingProps!==A,ue||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(A||ne!==x)&&E1(i,f,r,x),Yl=!1;var W=i.memoizedState;f.state=W,jr(i,r,f,u),Dr(),ne=i.memoizedState,A||W!==ne||Yl?(typeof ge=="function"&&(Kf(i,a,ge,r),ne=i.memoizedState),(q=Yl||w1(i,a,q,r,W,ne,x))?(ue||typeof f.UNSAFE_componentWillMount!="function"&&typeof f.componentWillMount!="function"||(typeof f.componentWillMount=="function"&&f.componentWillMount(),typeof f.UNSAFE_componentWillMount=="function"&&f.UNSAFE_componentWillMount()),typeof f.componentDidMount=="function"&&(i.flags|=4194308)):(typeof f.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=r,i.memoizedState=ne),f.props=r,f.state=ne,f.context=x,r=q):(typeof f.componentDidMount=="function"&&(i.flags|=4194308),r=!1)}else{f=i.stateNode,Ef(t,i),x=i.memoizedProps,ue=ja(a,x),f.props=ue,ge=i.pendingProps,W=f.context,ne=a.contextType,q=ho,typeof ne=="object"&&ne!==null&&(q=en(ne)),A=a.getDerivedStateFromProps,(ne=typeof A=="function"||typeof f.getSnapshotBeforeUpdate=="function")||typeof f.UNSAFE_componentWillReceiveProps!="function"&&typeof f.componentWillReceiveProps!="function"||(x!==ge||W!==q)&&E1(i,f,r,q),Yl=!1,W=i.memoizedState,f.state=W,jr(i,r,f,u),Dr();var se=i.memoizedState;x!==ge||W!==se||Yl||t!==null&&t.dependencies!==null&&Qs(t.dependencies)?(typeof A=="function"&&(Kf(i,a,A,r),se=i.memoizedState),(ue=Yl||w1(i,a,ue,r,W,se,q)||t!==null&&t.dependencies!==null&&Qs(t.dependencies))?(ne||typeof f.UNSAFE_componentWillUpdate!="function"&&typeof f.componentWillUpdate!="function"||(typeof f.componentWillUpdate=="function"&&f.componentWillUpdate(r,se,q),typeof f.UNSAFE_componentWillUpdate=="function"&&f.UNSAFE_componentWillUpdate(r,se,q)),typeof f.componentDidUpdate=="function"&&(i.flags|=4),typeof f.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof f.componentDidUpdate!="function"||x===t.memoizedProps&&W===t.memoizedState||(i.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&W===t.memoizedState||(i.flags|=1024),i.memoizedProps=r,i.memoizedState=se),f.props=r,f.state=se,f.context=q,r=ue):(typeof f.componentDidUpdate!="function"||x===t.memoizedProps&&W===t.memoizedState||(i.flags|=4),typeof f.getSnapshotBeforeUpdate!="function"||x===t.memoizedProps&&W===t.memoizedState||(i.flags|=1024),r=!1)}return f=r,wo(t,i),r=(i.flags&128)!==0,f||r?(f=i.stateNode,a=r&&typeof a.getDerivedStateFromError!="function"?null:f.render(),i.flags|=1,t!==null&&r?(i.child=Ra(i,t.child,null,u),i.child=Ra(i,null,a,u)):Kt(t,i,a,u),i.memoizedState=f.state,t=i.child):t=dl(t,i,u),t}function k1(t,i,a,r){return Ea(),i.flags|=256,Kt(t,i,a,r),i.child}var Pf={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Wf(t){return{baseLanes:t,cachePool:Tg()}}function ed(t,i,a){return t=t!==null?t.childLanes&~a:0,i&&(t|=Yn),t}function Y1(t,i,a){var r=i.pendingProps,u=!1,f=(i.flags&128)!==0,x;if((x=f)||(x=t!==null&&t.memoizedState===null?!1:(nn.current&2)!==0),x&&(u=!0,i.flags&=-129),x=(i.flags&32)!==0,i.flags&=-33,t===null){if(Qe){if(u?Gl(i):Zl(),(t=Tt)?(t=sm(t,ei),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:Hl!==null?{id:ji,overflow:Hi}:null,retryLane:536870912,hydrationErrors:null},a=xg(t),a.return=i,i.child=a,$t=i,Tt=null)):t=null,t===null)throw Ll(i);return Wd(t)?i.lanes=32:i.lanes=536870912,null}return f=r.children,r=r.fallback,u?(Zl(),u=i.mode,f=du({mode:"hidden",children:f},u),r=wa(r,u,a,null),f.return=i,r.return=i,f.sibling=r,i.child=f,r=i.child,r.memoizedState=Wf(a),r.childLanes=ed(t,x,a),i.memoizedState=Pf,kr(null,r)):(Gl(i),td(i,f))}var A=t.memoizedState;if(A!==null){var q=A.dehydrated;if(q!==null)return g3(t,i,f,x,r,q,A,a)}return u?(Zl(),u=r.fallback,f=i.mode,A=t.child,q=A.sibling,r=ol(A,{mode:"hidden",children:r.children}),r.subtreeFlags=A.subtreeFlags&1206910976,q!==null?u=ol(q,u):(u=wa(u,f,a,null),u.flags|=2),u.return=i,r.return=i,r.sibling=u,i.child=r,kr(null,r),r=i.child,u=t.child.memoizedState,u===null?u=Wf(a):(f=u.cachePool,f!==null?(A=Ut._currentValue,f=f.parent!==A?{parent:A,pool:A}:f):f=Tg(),u={baseLanes:u.baseLanes|a,cachePool:f}),r.memoizedState=u,r.childLanes=ed(t,x,a),i.memoizedState=Pf,kr(t.child,r)):(Gl(i),a=t.child,t=a.sibling,a=ol(a,{mode:"visible",children:r.children}),a.return=i,a.sibling=null,t!==null&&(x=i.deletions,x===null?(i.deletions=[t],i.flags|=16):x.push(t)),i.child=a,i.memoizedState=null,a)}function td(t,i){return i=du({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function du(t,i){return t=Cn(22,t,null,i),t.lanes=0,t}function hu(t,i,a){return Ra(i,t.child,null,a),t=td(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function g3(t,i,a,r,u,f,x,A){if(a)return i.flags&256?(Gl(i),i.flags&=-257,hu(t,i,A)):i.memoizedState!==null?(Zl(),i.child=t.child,i.flags|=128,null):(Zl(),f=u.fallback,x=i.mode,u=du({mode:"visible",children:u.children},x),f=wa(f,x,A,null),f.flags|=2,u.return=i,f.return=i,u.sibling=f,i.child=u,Ra(i,t.child,null,A),u=i.child,u.memoizedState=Wf(A),u.childLanes=ed(t,r,A),i.memoizedState=Pf,kr(null,u));if(Gl(i),Wd(f)){if(r=f.nextSibling&&f.nextSibling.dataset,r)var q=r.dgst;return r=q,r!==""&&(u=Error(o(419)),u.stack="",u.digest=r,Mr({value:u,source:null,stack:null})),hu(t,i,A)}if(Yt||Ca(t,i,A,!1),r=(A&t.childLanes)!==0,Yt||r){if(Xl.current!==null)return hu(t,i,A);if(r=Ct,r!==null&&(u=wl(r,A),u!==0&&u!==x.retryLane))throw x.retryLane=u,_a(t,u),On(r,t,u),Jf;return Pd(f)||zu(),hu(t,i,A)}return Pd(f)?(i.flags|=192,i.child=t.child,null):(t=x.treeContext,Tt=ni(f.nextSibling),$t=i,Qe=!0,Bl=null,ei=!1,t!==null&&_g(i,t),i=td(i,u.children),i.flags|=134221824,i)}function q1(t,i,a){t.lanes|=i;var r=t.alternate;r!==null&&(r.lanes|=i),Zs(t.return,i,a)}function V1(t){for(var i=null;t!==null;){var a=t.alternate;a!==null&&eu(a)===null&&(i=t),t=t.sibling}return i}function gu(t,i,a,r,u,f){var x=t.memoizedState;x===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:r,tail:a,tailMode:u,treeForkCount:f}:(x.isBackwards=i,x.rendering=null,x.renderingStartTime=0,x.last=r,x.tail=a,x.tailMode=u,x.treeForkCount=f)}function nd(t){var i=t.child;for(t.child=null;i!==null;){var a=i.sibling;i.sibling=t.child,t.child=i,i=a}}function id(t,i,a){var r=i.pendingProps,u=r.revealOrder,f=r.tail;r=r.children;var x=nn.current;if(i.flags&128)return Hr(i,x),null;var A=(x&2)!==0;if(A?(x=x&1|2,i.flags|=128):x&=1,Hr(i,x),u==="backwards"&&t!==null?(nd(t),Kt(t,i,r,a),nd(t)):Kt(t,i,r,a),r=Qe?Cr:0,!A&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&q1(t,a,i);else if(t.tag===19)q1(t,a,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(u){case"backwards":a=V1(i.child),a===null?(u=i.child,i.child=null):(u=a.sibling,a.sibling=null,nd(i)),gu(i,!0,u,null,f,r);break;case"unstable_legacy-backwards":for(a=null,u=i.child,i.child=null;u!==null;){if(t=u.alternate,t!==null&&eu(t)===null){i.child=u;break}t=u.sibling,u.sibling=a,a=u,u=t}gu(i,!0,a,null,f,r);break;case"together":gu(i,!1,null,null,void 0,r);break;case"independent":i.memoizedState=null;break;default:a=V1(i.child),a===null?(u=i.child,i.child=null):(u=a.sibling,a.sibling=null),gu(i,!1,u,a,f,r)}return i.child}function X1(t,i,a){var r=i.pendingProps;return Ul(i,i.type,r.value),Kt(t,i,r.children,a),i.child}function dl(t,i,a){if(t!==null&&(i.dependencies=t.dependencies),Il|=i.lanes,(a&i.childLanes)===0)if(t!==null){if(Ca(t,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(o(153));if(i.child!==null){for(t=i.child,a=ol(t,t.pendingProps),i.child=a,a.return=i;t.sibling!==null;)t=t.sibling,a=a.sibling=ol(t,t.pendingProps),a.return=i;a.sibling=null}return i.child}function ld(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&Qs(t)))}function m3(t,i,a){switch(i.tag){case 3:Ue(i,i.stateNode.containerInfo),Ul(i,Ut,t.memoizedState.cache),Ea();break;case 27:case 5:qe(i);break;case 4:Ue(i,i.stateNode.containerInfo);break;case 10:Ul(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Af(i),null;break;case 13:var r=i.memoizedState;if(r!==null){if(r.dehydrated!==null)return Gl(i),i.flags|=128,null;r=Ca(t,i,a,!1);var u=i.child.childLanes;return r||(a&u)!==0?Y1(t,i,a):(Gl(i),t=dl(t,i,a),t!==null?t.sibling:null)}Gl(i);break;case 19:if(i.flags&128)return id(t,i,a);if(u=(t.flags&128)!==0,r=(a&i.childLanes)!==0,r||(Ca(t,i,a,!1),r=(a&i.childLanes)!==0),u){if(r)return id(t,i,a);i.flags|=128}if(u=i.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),Hr(i,nn.current),r)break;return null;case 22:return i.lanes=0,j1(t,i,a,i.pendingProps);case 24:Ul(i,Ut,t.memoizedState.cache)}return dl(t,i,a)}function G1(t,i,a){if(t!==null)if(t.memoizedProps!==i.pendingProps)Yt=!0;else{if(!ld(t,a)&&(i.flags&128)===0)return Yt=!1,m3(t,i,a);Yt=(t.flags&131072)!==0}else Yt=!1,Qe&&(i.flags&1048576)!==0&&Sg(i,Cr,i.index);switch(i.lanes=0,i.tag){case 16:e:{var r=i.pendingProps;if(t=Oa(i.elementType),i.type=t,typeof t=="function")ff(t)?(r=ja(t,r),i.tag=1,i=U1(null,i,t,r,a)):(i.tag=0,i=Ff(null,i,t,r,a));else{if(t!=null){var u=t.$$typeof;if(u===B){i.tag=11,i=z1(null,i,t,r,a);break e}else if(u===Q){i.tag=14,i=R1(null,i,t,r,a);break e}else if(u===X){i.tag=10,i.type=t,i=X1(null,i,a);break e}}throw i=ee(t)||t,Error(o(306,i,""))}}return i;case 0:return Ff(t,i,i.type,i.pendingProps,a);case 1:return r=i.type,u=ja(r,i.pendingProps),U1(t,i,r,u,a);case 3:e:{if(Ue(i,i.stateNode.containerInfo),t===null)throw Error(o(387));r=i.pendingProps;var f=i.memoizedState;u=f.element,Ef(t,i),jr(i,r,null,a);var x=i.memoizedState;if(r=x.cache,Ul(i,Ut,r),r!==f.cache&&vf(i,[Ut],a,!0),Dr(),r=x.element,f.isDehydrated)if(f={element:r,isDehydrated:!1,cache:x.cache},i.updateQueue.baseState=f,i.memoizedState=f,i.flags&256){i=k1(t,i,r,a);break e}else if(r!==u){u=Fn(Error(o(424)),i),Mr(u),i=k1(t,i,r,a);break e}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(Tt=ni(t.firstChild),$t=i,Qe=!0,Bl=null,ei=!0,a=jg(i,null,r,a),i.child=a;a;)a.flags=a.flags&-3|134221824,a=a.sibling}else{if(Ea(),r===u){i=dl(t,i,a);break e}Kt(t,i,r,a)}i=i.child}return i;case 26:return wo(t,i),t===null?(a=mm(i.type,null,i.pendingProps,null))?i.memoizedState=a:Qe||(i.stateNode=$2(i.type,i.pendingProps,je.current,i)):i.memoizedState=mm(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return qe(i),t===null&&Qe&&(r=i.stateNode=fm(i.type,i.pendingProps,je.current),$t=i,ei=!0,u=Tt,Wl(i.type)?(eh=u,Tt=ni(r.firstChild)):Tt=u),Kt(t,i,i.pendingProps.children,a),wo(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&Qe&&((u=r=Tt)&&(r=uS(r,i.type,i.pendingProps,ei),r!==null?(i.stateNode=r,$t=i,Tt=ni(r.firstChild),ei=!1,u=!0):u=!1),u||Ll(i)),qe(i),u=i.type,f=i.pendingProps,x=t!==null?t.memoizedProps:null,r=f.children,Zd(u,f)?r=null:x!==null&&Zd(u,x)&&(i.flags|=32),i.memoizedState!==null&&(u=Rf(t,i,l3,null,null,a),qo._currentValue=u),wo(t,i),Kt(t,i,r,a),i.child;case 6:return t===null&&Qe&&((t=a=Tt)&&(a=cS(a,i.pendingProps,ei),a!==null?(i.stateNode=a,$t=i,Tt=null,t=!0):t=!1),t||Ll(i)),null;case 13:return Y1(t,i,a);case 4:return Ue(i,i.stateNode.containerInfo),r=i.pendingProps,t===null?i.child=Ra(i,null,r,a):Kt(t,i,r,a),i.child;case 11:return z1(t,i,i.type,i.pendingProps,a);case 7:return r=i.pendingProps,wo(t,i),Kt(t,i,r,a),i.child;case 8:return Kt(t,i,i.pendingProps.children,a),i.child;case 12:return Kt(t,i,i.pendingProps.children,a),i.child;case 10:return X1(t,i,a);case 9:return u=i.type._context,r=i.pendingProps.children,Ma(i),u=en(u),r=r(u),i.flags|=1,Kt(t,i,r,a),i.child;case 14:return R1(t,i,i.type,i.pendingProps,a);case 15:return D1(t,i,i.type,i.pendingProps,a);case 19:return id(t,i,a);case 31:return h3(t,i,a);case 22:return j1(t,i,a,i.pendingProps);case 24:return Ma(i),r=en(Ut),t===null?(u=Sf(),u===null&&(u=Ct,f=xf(),u.pooledCache=f,f.refCount++,f!==null&&(u.pooledCacheLanes|=a),u=f),i.memoizedState={parent:r,cache:u},wf(i),Ul(i,Ut,u)):((t.lanes&a)!==0&&(Ef(t,i),jr(i,null,null,a),Dr()),u=t.memoizedState,f=i.memoizedState,u.parent!==r?(u={parent:r,cache:r},i.memoizedState=u,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=u),Ul(i,Ut,r)):(r=f.cache,Ul(i,Ut,r),r!==u.cache&&vf(i,[Ut],a,!0))),Kt(t,i,i.pendingProps.children,a),i.child;case 30:return i.stateNode===null&&(i.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=i.pendingProps,r.name!=null&&r.name!=="auto"?i.flags|=t===null?18882560:18874368:Qe&&Xs(i),t!==null&&t.memoizedProps.name!==r.name?i.flags|=4194816:wo(t,i),Kt(t,i,r.children,a),i.child;case 29:throw i.pendingProps}throw Error(o(156,i.tag))}function hl(t){t.flags|=4}function ad(t,i,a,r,u){var f;if((f=(t.mode&32)!==0)&&(f=a===null?xm(i,r):xm(i,r)&&(r.src!==a.src||r.srcSet!==a.srcSet)),f){if(t.flags|=16777216,(u&335544128)===u)if(t.stateNode.complete)t.flags|=8192;else if(N2())t.flags|=8192;else throw za=Js,_f}else t.flags&=-16777217}function Z1(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!bm(i))if(N2())t.flags|=8192;else throw za=Js,_f}function mu(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?bl():536870912,t.lanes|=i,To|=i)}function Yr(t,i){if(!Qe)switch(t.tailMode){case"visible":break;case"collapsed":for(var a=t.tail,r=null;a!==null;)a.alternate!==null&&(r=a),a=a.sibling;r===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:r.sibling=null;break;default:for(i=t.tail,a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?t.tail=null:a.sibling=null}}function At(t){var i=t.alternate!==null&&t.alternate.child===t.child,a=0,r=0;if(i)for(var u=t.child;u!==null;)a|=u.lanes|u.childLanes,r|=u.subtreeFlags&1206910976,r|=u.flags&1206910976,u.return=t,u=u.sibling;else for(u=t.child;u!==null;)a|=u.lanes|u.childLanes,r|=u.subtreeFlags,r|=u.flags,u.return=t,u=u.sibling;return t.subtreeFlags|=r,t.childLanes=a,i}function p3(t,i,a){var r=i.pendingProps;switch(gf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(i),null;case 1:return At(i),null;case 3:return a=i.stateNode,r=null,t!==null&&(r=t.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),ul(Ut),Le(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(po(i)?hl(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,pf())),At(i),null;case 26:var u=i.type,f=i.memoizedState;return t===null?(hl(i),f!==null?(At(i),Z1(i,f)):(At(i),ad(i,u,null,r,a))):f?f!==t.memoizedState?(hl(i),At(i),Z1(i,f)):(At(i),i.flags&=-16777217):(t=t.memoizedProps,t!==r&&hl(i),At(i),ad(i,u,t,r,a)),null;case 27:if(at(i),a=je.current,u=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==r&&hl(i);else{if(!r){if(i.stateNode===null)throw Error(o(166));return At(i),i.subtreeFlags&=-33554433,null}t=Ee.current,po(i)?wg(i):(t=fm(u,r,a),i.stateNode=t,hl(i))}return At(i),i.subtreeFlags&=-33554433,null;case 5:if(at(i),u=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==r&&hl(i);else{if(!r){if(i.stateNode===null)throw Error(o(166));return At(i),i.subtreeFlags&=-33554433,null}if(f=Ee.current,po(i))wg(i);else{var x=Fr(je.current);switch(f){case 1:f=x.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:f=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":f=x.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":f=x.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":f=x.createElement("div"),f.innerHTML="<script><\/script>",f=f.removeChild(f.firstChild);break;case"select":f=typeof r.is=="string"?x.createElement("select",{is:r.is}):x.createElement("select"),r.multiple?f.multiple=!0:r.size&&(f.size=r.size);break;default:f=typeof r.is=="string"?x.createElement(u,{is:r.is}):x.createElement(u)}}f[Rt]=i,f[Lt]=r;e:for(x=i.child;x!==null;){if(x.tag===5||x.tag===6)f.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===i)break e;for(;x.sibling===null;){if(x.return===null||x.return===i)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}i.stateNode=f;e:switch(an(f,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&hl(i)}}return At(i),i.subtreeFlags&=-33554433,ad(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,a),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==r&&hl(i);else{if(typeof r!="string"&&i.stateNode===null)throw Error(o(166));if(t=je.current,po(i)){if(t=i.stateNode,a=i.memoizedProps,r=null,u=$t,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}t[Rt]=i,t=!!(t.nodeValue===a||r!==null&&r.suppressHydrationWarning===!0||G2(t.nodeValue,a)),t||Ll(i,!0)}else t=Fr(t).createTextNode(r),t[Rt]=i,i.stateNode=t}return At(i),null;case 31:if(a=i.memoizedState,t===null||t.memoizedState!==null){if(r=po(i),a!==null){if(t===null){if(!r)throw Error(o(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(o(557));t[Rt]=i}else Ea(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;At(i),t=!1}else a=pf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return i.flags&256?(Ln(i),i):(Ln(i),null);if((i.flags&128)!==0)throw Error(o(558))}return At(i),null;case 13:if(r=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(u=po(i),r!==null&&r.dehydrated!==null){if(t===null){if(!u)throw Error(o(318));if(u=i.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[Rt]=i}else Ea(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;At(i),u=!1}else u=pf(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=u),u=!0;if(!u)return i.flags&256?(Ln(i),i):(Ln(i),null)}return Ln(i),(i.flags&128)!==0?(i.lanes=a,i):(a=r!==null,t=t!==null&&t.memoizedState!==null,a&&(r=i.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),f=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(f=r.memoizedState.cachePool.pool),f!==u&&(r.flags|=2048)),a!==t&&a&&(i.child.flags|=8192),mu(i,i.updateQueue),At(i),null);case 4:return Le(),t===null&&Yd(i.stateNode.containerInfo),i.flags|=67108864,At(i),null;case 10:return ul(i.type),At(i),null;case 19:if(Of(i),r=i.memoizedState,r===null)return At(i),null;if(u=(i.flags&128)!==0,f=r.rendering,f===null)if(u)Yr(r,!1);else{if(Ht!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(f=eu(t),f!==null){for(i.flags|=128,Yr(r,!1),t=f.updateQueue,i.updateQueue=t,mu(i,t),i.subtreeFlags=0,t=a,a=i.child;a!==null;)vg(a,t),a=a.sibling;return Hr(i,nn.current&1|2),Qe&&rl(i,r.treeForkCount),i.child}t=t.sibling}r.tail!==null&&Xe()>Mu&&(i.flags|=128,u=!0,Yr(r,!1),i.lanes=4194304)}else{if(!u)if(t=eu(f),t!==null){if(i.flags|=128,u=!0,t=t.updateQueue,i.updateQueue=t,mu(i,t),Yr(r,!0),r.tail===null&&r.tailMode!=="collapsed"&&r.tailMode!=="visible"&&!f.alternate&&!Qe)return At(i),null}else 2*Xe()-r.renderingStartTime>Mu&&a!==536870912&&(i.flags|=128,u=!0,Yr(r,!1),i.lanes=4194304);r.isBackwards?(f.sibling=i.child,i.child=f):(t=r.last,t!==null?t.sibling=f:i.child=f,r.last=f)}if(r.tail!==null){t=r.tail;e:{for(a=t;a!==null;){if(a.alternate!==null){a=!1;break e}a=a.sibling}a=!0}return r.rendering=t,r.tail=t.sibling,r.renderingStartTime=Xe(),t.sibling=null,f=nn.current,f=u?f&1|2:f&1,r.tailMode==="visible"||r.tailMode==="collapsed"||!a||Qe?Hr(i,f):(a=f,pe(tn,i),pe(nn,a),hn===null&&(hn=i)),Qe&&rl(i,r.treeForkCount),t}return At(i),null;case 22:case 23:return Ln(i),Tf(),r=i.memoizedState!==null,t!==null?t.memoizedState!==null!==r&&(i.flags|=8192):r&&(i.flags|=8192),r?(a&536870912)!==0&&(i.flags&128)===0&&(At(i),i.subtreeFlags&6&&(i.flags|=8192)):At(i),a=i.updateQueue,a!==null&&mu(i,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==a&&(i.flags|=2048),t!==null&&xe(Aa),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),ul(Ut),At(i),null;case 25:return null;case 30:return i.flags|=33554432,At(i),null}throw Error(o(156,i.tag))}function y3(t,i){switch(gf(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return ul(Ut),Le(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return at(i),null;case 31:if(i.memoizedState!==null){if(Ln(i),i.alternate===null)throw Error(o(340));Ea()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(Ln(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(o(340));Ea()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return Of(i),t=i.flags,t&65536?(i.flags=t&-65537|128,t=i.memoizedState,t!==null&&(t.rendering=null,t.tail=null),i.flags|=4,i):null;case 4:return Le(),null;case 10:return ul(i.type),null;case 22:case 23:return Ln(i),Tf(),t!==null&&xe(Aa),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return ul(Ut),null;case 25:return null;default:return null}}function Q1(t,i){switch(gf(i),i.tag){case 3:ul(Ut),Le();break;case 26:case 27:case 5:at(i);break;case 4:Le();break;case 31:i.memoizedState!==null&&Ln(i);break;case 13:Ln(i);break;case 19:Of(i);break;case 10:ul(i.type);break;case 22:case 23:Ln(i),Tf(),t!==null&&xe(Aa);break;case 24:ul(Ut)}}function qr(t,i){try{var a=i.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var u=r.next;a=u;do{if((a.tag&t)===t){r=void 0;var f=a.create,x=a.inst;r=f(),x.destroy=r}a=a.next}while(a!==u)}}catch(A){wt(i,i.return,A)}}function Ql(t,i,a){try{var r=i.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var f=u.next;r=f;do{if((r.tag&t)===t){var x=r.inst,A=x.destroy;if(A!==void 0){x.destroy=void 0,u=i;var q=a,ne=A;try{ne()}catch(ue){wt(u,q,ue)}}}r=r.next}while(r!==f)}}catch(ue){wt(i,i.return,ue)}}function K1(t){var i=t.updateQueue;if(i!==null){var a=t.stateNode;try{Bg(i,a)}catch(r){wt(t,t.return,r)}}}function $1(t,i,a){a.props=ja(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(r){wt(t,i,r)}}function Bi(t,i){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var r=t.stateNode;break;case 30:var u=t.stateNode,f=ll(t.memoizedProps,u);(u.ref===null||u.ref.name!==f)&&(u.ref=tm(f)),r=u.ref;break;case 7:if(t.stateNode===null){var x=new Vn(t);y(t.child,!1,rS,x,void 0,void 0),t.stateNode=x}r=t.stateNode;break;default:r=t.stateNode}typeof a=="function"?t.refCleanup=a(r):a.current=r}}catch(A){wt(t,i,A)}}function ln(t,i){var a=t.ref,r=t.refCleanup;if(a!==null)if(typeof r=="function")try{r()}catch(u){wt(t,i,u)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(u){wt(t,i,u)}else a.current=null}function pu(t,i){if((t.tag===5||t.tag===27||t.tag===6)&&t.alternate===null&&i!==null)for(var a=0;a<i.length;a++)rm(t.stateNode,i[a])}function I1(t){for(var i=t.return;i!==null&&(rd(i)&&rm(t.stateNode,i.stateNode),!od(i));)i=i.return}function Vr(t){for(var i=t.return;i!==null&&(rd(i)&&sS(t.stateNode,i.stateNode),!od(i));)i=i.return}function od(t){return t.tag===5||t.tag===3||t.tag===27}function rd(t){return t&&t.tag===7&&t.stateNode!==null}function sd(t){var i=t.type,a=t.memoizedProps,r=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&r.focus();break e;case"img":a.src?r.src=a.src:a.srcSet&&(r.srcset=a.srcSet)}}catch(u){wt(t,t.return,u)}}function ud(t,i,a){try{var r=t.stateNode;X3(r,t.type,a,i),r[Lt]=i}catch(u){wt(t,t.return,u)}}function J1(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&Wl(t.type)||t.tag===4}function cd(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||J1(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&Wl(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function fd(t,i,a,r){var u=t.tag;if(u===5||u===6)u=t.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(u,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(u),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Wt)),pu(t,r),nt=!0;else if(u!==4&&(u===27&&(pu(t,r),r=null,Wl(t.type)&&(a=t.stateNode,i=null)),t=t.child,t!==null))for(fd(t,i,a,r),t=t.sibling;t!==null;)fd(t,i,a,r),t=t.sibling}function yu(t,i,a,r){var u=t.tag;if(u===5||u===6)u=t.stateNode,i?a.insertBefore(u,i):a.appendChild(u),pu(t,r),nt=!0;else if(u!==4&&(u===27&&(pu(t,r),r=null,Wl(t.type)&&(a=t.stateNode)),t=t.child,t!==null))for(yu(t,i,a,r),t=t.sibling;t!==null;)yu(t,i,a,r),t=t.sibling}function F1(t){var i=t.stateNode,a=t.memoizedProps;try{for(var r=t.type,u=i.attributes;u.length;)i.removeAttributeNode(u[0]);an(i,r,a),i[Rt]=t,i[Lt]=a}catch(f){wt(t,t.return,f)}}var vu=!1,Un=null;function P1(t){(t.tag===30||(t.subtreeFlags&33554432)!==0)&&(vu=!0)}var Li=null;function W1(){var t=Li;return Li=null,t}var Mn=0;function Eo(t,i,a,r,u){return Mn=0,e2(t.child,i,a,r,u)}function e2(t,i,a,r,u){for(var f=!1;t!==null;){if(t.tag===5){var x=t.stateNode;if(r!==null){var A=$d(x);r.push(A),A.view&&(f=!0)}else f||$d(x).view&&(f=!0);vu=!0,W2(x,Mn===0?i:i+"_"+Mn,a),Mn++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&u||e2(t.child,i,a,r,u)&&(f=!0));t=t.sibling}return f}function Ui(t,i){for(;t!==null;)t.tag===5?em(t.stateNode,t.memoizedProps):(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&i||Ui(t.child,i)),t=t.sibling}function xu(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if((t.tag!==22||t.memoizedState===null)&&(xu(t),t.tag===30&&(t.flags&18874368)!==0&&t.stateNode.paired)){var i=t.memoizedProps;if(i.name==null||i.name==="auto")throw Error(o(544));var a=i.name;i=al(i.default,i.share),i!=="none"&&(Eo(t,a,i,null,!1)||Ui(t.child,!1))}t=t.sibling}}function dd(t,i){if(t.tag===30){var a=t.stateNode,r=t.memoizedProps,u=ll(r,a),f=al(r.default,a.paired?r.share:r.enter);f!=="none"?Eo(t,u,f,null,!1)?(xu(t),a.paired||i||Ro(t,r.onEnter)):Ui(t.child,!1):xu(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)dd(t,i),t=t.sibling;else xu(t)}function hd(t){if(Un!==null&&Un.size!==0){var i=Un;if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var a=t.memoizedProps,r=a.name;if(r!=null&&r!=="auto"){var u=i.get(r);if(u!==void 0){var f=al(a.default,a.share);if(f!=="none"&&(Eo(t,r,f,null,!1)?(f=t.stateNode,u.paired=f,f.paired=u,Ro(t,a.onShare)):Ui(t.child,!1)),i.delete(r),i.size===0)break}}}hd(t)}t=t.sibling}}}function gd(t){if(t.tag===30){var i=t.memoizedProps,a=ll(i,t.stateNode),r=Un!==null?Un.get(a):void 0,u=al(i.default,r!==void 0?i.share:i.exit);u!=="none"&&(Eo(t,a,u,null,!1)?r!==void 0?(u=t.stateNode,r.paired=u,u.paired=r,Un.delete(a),Ro(t,i.onShare)):Ro(t,i.onExit):Ui(t.child,!1)),Un!==null&&hd(t)}else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)gd(t),t=t.sibling;else Un!==null&&hd(t)}function t2(t){for(t=t.child;t!==null;){if(t.tag===30){var i=t.memoizedProps,a=ll(i,t.stateNode);i=al(i.default,i.update),t.flags&=-5,i!=="none"&&Eo(t,a,i,t.memoizedState=[],!1)}else(t.subtreeFlags&33554432)!==0&&t2(t);t=t.sibling}}function md(t){if((t.subtreeFlags&18874368)!==0)for(t=t.child;t!==null;){if(t.tag!==22||t.memoizedState===null){if(t.tag===30&&(t.flags&18874368)!==0){var i=t.stateNode;i.paired!==null&&(i.paired=null,Ui(t.child,!1))}md(t)}t=t.sibling}}function bu(t){if(t.tag===30)t.stateNode.paired=null,Ui(t.child,!1),md(t);else if((t.subtreeFlags&33554432)!==0)for(t=t.child;t!==null;)bu(t),t=t.sibling;else md(t)}function n2(t){for(t=t.child;t!==null;)t.tag===30?Ui(t.child,!1):(t.subtreeFlags&33554432)!==0&&n2(t),t=t.sibling}function pd(t,i,a,r,u,f,x){for(var A=!1;i!==null;){if(i.tag===5){var q=i.stateNode;if(f!==null&&Mn<f.length){var ne=f[Mn],ue=$d(q);(ne.view||ue.view)&&(A=!0);var ge;if(ge=(t.flags&4)===0)if(ue.clip)ge=!0;else{ge=ne.rect;var W=ue.rect;ge=ge.y!==W.y||ge.x!==W.x||ge.height!==W.height||ge.width!==W.width}ge&&(t.flags|=4),ue.abs?ue=!ne.abs:(ne=ne.rect,ue=ue.rect,ue=ne.height!==ue.height||ne.width!==ue.width),ue&&(t.flags|=32)}else t.flags|=32;(t.flags&4)!==0&&W2(q,Mn===0?a:a+"_"+Mn,u),A&&(t.flags&4)!==0||(Li===null&&(Li=[]),Li.push(q,Mn===0?r:r+"_"+Mn,i.memoizedProps)),Mn++}else(i.tag!==22||i.memoizedState===null)&&(i.tag===30&&x?t.flags|=i.flags&32:pd(t,i.child,a,r,u,f,x)&&(A=!0));i=i.sibling}return A}function i2(t,i){for(t=t.child;t!==null;){if(t.tag===30){var a=t.memoizedProps,r=t.stateNode,u=ll(a,r),f=al(a.default,a.update),x;x=t.memoizedState,t.memoizedState=null,r=t;var A=t.child;Mn=0,u=pd(r,A,u,u,f,x,!1),(t.flags&4)!==0&&u&&Ro(t,a.onUpdate)}else(t.subtreeFlags&33554432)!==0&&i2(t);t=t.sibling}}var It=!1,St=!1,ki=!1,yd=!1,l2=typeof WeakSet=="function"?WeakSet:Set,Jt=null,Yi=!1,Xr=!1,Su=!1,vd=!1;function v3(t,i,a){if(t=t.containerInfo,Xd=Vo,t=sg(t),lf(t)){if("selectionStart"in t)var r={start:t.selectionStart,end:t.selectionEnd};else e:{r=(r=t.ownerDocument)&&r.defaultView||window;var u=r.getSelection&&r.getSelection();if(u&&u.rangeCount!==0){r=u.anchorNode;var f=u.anchorOffset,x=u.focusNode;u=u.focusOffset;try{r.nodeType,x.nodeType}catch{r=null;break e}var A=0,q=-1,ne=-1,ue=0,ge=0,W=t,se=null;t:for(;;){for(var _e;W!==r||f!==0&&W.nodeType!==3||(q=A+f),W!==x||u!==0&&W.nodeType!==3||(ne=A+u),W.nodeType===3&&(A+=W.nodeValue.length),(_e=W.firstChild)!==null;)se=W,W=_e;for(;;){if(W===t)break t;if(se===r&&++ue===f&&(q=A),se===x&&++ge===u&&(ne=A),(_e=W.nextSibling)!==null)break;W=se,se=W.parentNode}W=_e}r=q===-1||ne===-1?null:{start:q,end:ne}}else r=null}r=r||{start:0,end:0}}else r=null;for(Gd={focusedElem:t,selectionRange:r},Vo=!1,a=(a&335544064)===a,Jt=i,i=a?9270:1024;Jt!==null;){if(t=Jt,a&&(r=t.deletions,r!==null))for(f=0;f<r.length;f++)a&&gd(r[f]);if(t.alternate===null&&(t.flags&2)!==0)a&&P1(t),_u(a);else{if(t.tag===22){if(r=t.alternate,t.memoizedState!==null){r!==null&&r.memoizedState===null&&a&&gd(r),_u(a);continue}else if(r!==null&&r.memoizedState!==null){a&&P1(t),_u(a);continue}}r=t.child,(t.subtreeFlags&i)!==0&&r!==null?(r.return=t,Jt=r):(a&&t2(t),_u(a))}}Un=null}function _u(t){for(;Jt!==null;){var i=Jt,a=t,r=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 15:break;case 1:if((u&1024)!==0&&r!==null){a=void 0,u=r.memoizedProps,r=r.memoizedState;var f=i.stateNode;try{var x=ja(i.type,u);a=f.getSnapshotBeforeUpdate(x,r),f.__reactInternalSnapshotBeforeUpdate=a}catch(A){wt(i,i.return,A)}}break;case 3:if((u&1024)!==0){if(r=i.stateNode.containerInfo,a=r.nodeType,a===9)Fd(r);else if(a===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Fd(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:a&&r!==null&&(a=ll(r.memoizedProps,r.stateNode),u=i.memoizedProps,u=al(u.default,u.update),u!=="none"&&Eo(r,a,u,r.memoizedState=[],!0));break;default:if((u&1024)!==0)throw Error(o(163))}if(r=i.sibling,r!==null){r.return=i.return,Jt=r;break}Jt=i.return}}function a2(t,i,a){var r=a.flags;switch(a.tag){case 0:case 11:case 15:qi(t,a),r&4&&qr(5,a);break;case 1:if(qi(t,a),r&4)if(t=a.stateNode,i===null)try{t.componentDidMount()}catch(x){wt(a,a.return,x)}else{var u=ja(a.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(u,i,t.__reactInternalSnapshotBeforeUpdate)}catch(x){wt(a,a.return,x)}}r&64&&K1(a),r&512&&Bi(a,a.return);break;case 3:if(qi(t,a),r&64&&(t=a.updateQueue,t!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{Bg(t,i)}catch(x){wt(a,a.return,x)}}break;case 27:i===null&&r&4&&F1(a);case 26:case 5:qi(t,a),i===null&&r&4&&sd(a),r&512&&Bi(a,a.return);break;case 12:qi(t,a);break;case 31:qi(t,a),r&4&&u2(t,a);break;case 13:qi(t,a),r&4&&c2(t,a),r&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=O3.bind(null,a),fS(t,a))));break;case 22:if(r=a.memoizedState!==null||It,!r){var f=i!==null&&i.memoizedState!==null||St;i=It,u=St,It=r,(St=f)&&!u?(r=2,(a.subtreeFlags&8772)!==0&&(r|=1),mi(t,a,r)):qi(t,a),It=i,St=u}break;case 30:qi(t,a),r&512&&Bi(a,a.return);break;case 7:r&512&&Bi(a,a.return);default:qi(t,a)}}function xd(t,i){for(t=t.child;t!==null;)o2(t,i),t=t.sibling}function o2(t,i){switch(t.tag){case 5:case 26:try{var a=t.stateNode;if(i){var r=a.style;typeof r.setProperty=="function"?r.setProperty("display","none","important"):r.display="none"}else{var u=t.stateNode,f=t.memoizedProps.style,x=f!=null&&f.hasOwnProperty("display")?f.display:null;u.style.display=x==null||typeof x=="boolean"?"":(""+x).trim()}}catch(q){wt(t,t.return,q)}bd(t,i);break;case 6:try{t.stateNode.nodeValue=i?"":t.memoizedProps,nt=!0}catch(q){wt(t,t.return,q)}break;case 18:try{var A=t.stateNode;i?P2(A,!0):P2(t.stateNode,!1)}catch(q){wt(t,t.return,q)}break;case 22:case 23:t.memoizedState===null&&xd(t,i);break;default:xd(t,i)}}function bd(t,i){if(t.subtreeFlags&67108864)for(t=t.child;t!==null;){e:{var a=t,r=i;switch(a.tag){case 4:o2(a,r);break e;case 22:a.memoizedState===null&&bd(a,r);break e;default:bd(a,r)}}t=t.sibling}}function r2(t){var i=t.alternate;i!==null&&(t.alternate=null,r2(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&Ci(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var zt=null,Tn=!1;function hi(t,i,a){for(a=a.child;a!==null;)s2(t,i,a),a=a.sibling}function s2(t,i,a){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(vt,a)}catch{}switch(a.tag){case 26:St||ln(a,i),hi(t,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&!St&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:St||ln(a,i),Vr(a);var r=zt,u=Tn;Wl(a.type)&&(zt=a.stateNode,Tn=!1),hi(t,i,a),dm(a.stateNode,a.type,a.memoizedProps),zt=r,Tn=u;break;case 5:St||ln(a,i),Vr(a);case 6:if(a.tag===6&&Vr(a),r=zt,u=Tn,zt=null,hi(t,i,a),zt=r,Tn=u,zt!==null)if(Tn)try{(zt.nodeType===9?zt.body:zt.nodeName==="HTML"?zt.ownerDocument.body:zt).removeChild(a.stateNode),nt=!0}catch(f){wt(a,i,f)}else try{zt.removeChild(a.stateNode),nt=!0}catch(f){wt(a,i,f)}break;case 18:zt!==null&&(Tn?(t=zt,F2(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),Xo(t)):F2(zt,a.stateNode));break;case 4:r=zt,u=Tn,zt=a.stateNode.containerInfo,Tn=!0,hi(t,i,a),zt=r,Tn=u;break;case 0:case 11:case 14:case 15:Ql(2,a,i),St||Ql(4,a,i),hi(t,i,a);break;case 1:St||(ln(a,i),r=a.stateNode,typeof r.componentWillUnmount=="function"&&$1(a,i,r)),hi(t,i,a);break;case 21:hi(t,i,a);break;case 22:St=(r=St)||a.memoizedState!==null,hi(t,i,a),St=r;break;case 30:ln(a,i),hi(t,i,a);break;case 7:St||ln(a,i),hi(t,i,a);break;default:hi(t,i,a)}}function u2(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Xo(t)}catch(a){wt(i,i.return,a)}}}function c2(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Xo(t)}catch(a){wt(i,i.return,a)}}function x3(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new l2),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new l2),i;default:throw Error(o(435,t.tag))}}function wu(t,i){var a=x3(t);i.forEach(function(r){if(!a.has(r)){a.add(r);var u=z3.bind(null,t,r);r.then(u,u)}})}function xn(t,i,a){var r=i.deletions;if(r!==null)for(var u=0;u<r.length;u++){var f=r[u],x=t,A=i,q=A;e:for(;q!==null;){switch(q.tag){case 27:if(Wl(q.type)){zt=q.stateNode,Tn=!1;break e}break;case 5:zt=q.stateNode,Tn=!1;break e;case 3:case 4:zt=q.stateNode.containerInfo,Tn=!0;break e}q=q.return}if(zt===null)throw Error(o(160));s2(x,A,f),zt=null,Tn=!1,x=f.alternate,x!==null&&(x.return=null),f.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)f2(i,t,a),i=i.sibling}var gi=null;function f2(t,i,a){var r=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:if(u&4&&(r=t.updateQueue,r=r!==null?r.events:null,r!==null))for(var f=0;f<r.length;f++){var x=r[f];x.ref.impl=x.nextImpl}xn(i,t,a),bn(t),u&4&&(Ql(3,t,t.return),qr(3,t),Ql(5,t,t.return));break;case 1:xn(i,t,a),bn(t),u&512&&(St||r===null||ln(r,r.return)),u&64&&It&&(t=t.updateQueue,t!==null&&(i=t.callbacks,i!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?i:a.concat(i))));break;case 26:if(f=gi,xn(i,t,a),bn(t),u&512&&(St||r===null||ln(r,r.return)),u&4)if(u=r!==null?r.memoizedState:null,a=t.memoizedState,r===null)if(a===null)if(t.stateNode===null)if(It)t.stateNode=$2(t.type,t.memoizedProps,i.containerInfo,t);else{e:{i=t.type,a=t.memoizedProps,u=f.ownerDocument||f;t:switch(i){case"title":r=u.getElementsByTagName("title")[0],(!r||r[si]||r[Rt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=u.createElement(i),u.head.insertBefore(r,u.querySelector("head > title"))),an(r,i,a),r[Rt]=t,Ot(r),i=r;break e;case"link":if(f=vm("link","href",u).get(i+(a.href||""))){for(x=0;x<f.length;x++)if(r=f[x],r.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&r.getAttribute("rel")===(a.rel==null?null:a.rel)&&r.getAttribute("title")===(a.title==null?null:a.title)&&r.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){f.splice(x,1);break t}}r=u.createElement(i),an(r,i,a),u.head.appendChild(r);break;case"meta":if(f=vm("meta","content",u).get(i+(a.content||""))){for(x=0;x<f.length;x++)if(r=f[x],r.getAttribute("content")===(a.content==null?null:""+a.content)&&r.getAttribute("name")===(a.name==null?null:a.name)&&r.getAttribute("property")===(a.property==null?null:a.property)&&r.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&r.getAttribute("charset")===(a.charSet==null?null:a.charSet)){f.splice(x,1);break t}}r=u.createElement(i),an(r,i,a),u.head.appendChild(r);break;default:throw Error(o(468,i))}r[Rt]=t,Ot(r),i=r}t.stateNode=i}else It||lh(f,t.type,t.stateNode);else t.stateNode=ym(f,a,t.memoizedProps);else u!==a?(u===null?(i=r.stateNode,i===null||St||i.parentNode.removeChild(i)):u.count--,a===null?It||lh(f,t.type,t.stateNode):ym(f,a,t.memoizedProps)):a===null&&t.stateNode!==null&&ud(t,t.memoizedProps,r.memoizedProps);break;case 27:xn(i,t,a),bn(t),u&512&&(St||r===null||ln(r,r.return)),r!==null&&u&4&&ud(t,t.memoizedProps,r.memoizedProps);break;case 5:if(f=ki,ki=!1,xn(i,t,a),ki=f,bn(t),u&512&&(St||r===null||ln(r,r.return)),t.flags&32){i=t.stateNode;try{Ai(i,""),nt=!0}catch(ue){wt(t,t.return,ue)}}u&4&&t.stateNode!=null&&(i=t.memoizedProps,ud(t,i,r!==null?r.memoizedProps:i)),u&1024&&(yd=!0);break;case 6:if(xn(i,t,a),bn(t),u&4){if(t.stateNode===null)throw Error(o(162));i=t.memoizedProps,a=t.stateNode;try{a.nodeValue=i,nt=!0}catch(ue){wt(t,t.return,ue)}}break;case 3:if(nt=!1,Uu=null,f=gi,gi=Pr(i.containerInfo),xn(i,t,a),gi=f,bn(t),u&4&&r!==null&&r.memoizedState.isDehydrated)try{Xo(i.containerInfo)}catch(ue){wt(t,t.return,ue)}yd&&(yd=!1,d2(t)),nt=!1;break;case 4:u=ki,ki=It,r=eo(),f=gi,gi=Pr(t.stateNode.containerInfo),xn(i,t,a),bn(t),gi=f,nt&&Xr&&(Su=!0),nt=r,ki=u;break;case 12:xn(i,t,a),bn(t);break;case 31:xn(i,t,a),bn(t),u&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,wu(t,i)));break;case 13:xn(i,t,a),bn(t),t.child.flags&8192&&t.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(Cu=Xe()),u&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,wu(t,i)));break;case 22:f=t.memoizedState!==null,x=r!==null&&r.memoizedState!==null;var A=It,q=St,ne=ki;It=A||f,ki=ne||f,St=q||x,xn(i,t,a),St=q,ki=ne,It=A,bn(t),u&8192&&(i=t.stateNode,i._visibility=f?i._visibility&-2:i._visibility|1,!f||r===null||x||It||St||(i=x||St,a=It,r=St,It=f||It,St=i,Kl(t,2),It=a,St=r),!f&&ki||xd(t,f)),u&4&&(i=t.updateQueue,i!==null&&(a=i.retryQueue,a!==null&&(i.retryQueue=null,wu(t,a))));break;case 19:xn(i,t,a),bn(t),u&4&&(i=t.updateQueue,i!==null&&(t.updateQueue=null,wu(t,i)));break;case 30:u&512&&(St||r===null||ln(r,r.return)),u=eo(),f=Xr,x=(a&335544064)===a,A=t.memoizedProps,Xr=x&&al(A.default,A.update)!=="none",xn(i,t,a),bn(t),x&&r!==null&&nt&&(t.flags|=4),Xr=f,nt=u;break;case 21:break;case 7:u&512&&(St||r===null||ln(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=t);default:xn(i,t,a),bn(t)}}function bn(t){var i=t.flags;if(i&2){try{for(var a,r=t.return;r!==null;){if(J1(r)){a=r;break}r=r.return}r=null;for(var u=t.return;u!==null;){if(rd(u)){var f=u.stateNode;r===null?r=[f]:r.push(f)}if(od(u))break;u=u.return}var x=r;if(a==null)throw Error(o(160));switch(a.tag){case 27:var A=a.stateNode,q=cd(t);yu(t,q,A,x);break;case 5:var ne=a.stateNode;a.flags&32&&(Ai(ne,""),a.flags&=-33);var ue=cd(t);yu(t,ue,ne,x);break;case 3:case 4:var ge=a.stateNode.containerInfo,W=cd(t);fd(t,W,ge,x);break;default:throw Error(o(161))}}catch(se){wt(t,t.return,se)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function d2(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;d2(i),i.tag===5&&i.flags&1024&&(i=i.stateNode,Vo=!0,i.reset(),Vo=!1),t=t.sibling}}function No(t,i){if(i.subtreeFlags&9270)for(i=i.child;i!==null;)h2(i,t),i=i.sibling;else i2(i)}function h2(t,i){var a=t.alternate;if(a===null)dd(t,!1);else switch(t.tag){case 3:if(vd=Yi=!1,W1(),No(i,t),!Yi&&!Su){if(t=Li,t!==null)for(var r=0;r<t.length;r+=3){a=t[r];var u=t[r+1];em(a,t[r+2]),a=a.ownerDocument.documentElement,a!==null&&a.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group("+u+")"})}t=i.containerInfo,t=t.nodeType===9?t.documentElement:t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName===""&&(t.style.viewTransitionName="none",t.animate({opacity:[0,0],pointerEvents:["none","none"]},{duration:0,fill:"forwards",pseudoElement:"::view-transition-group(root)"}),t.animate({width:[0,0],height:[0,0]},{duration:0,fill:"forwards",pseudoElement:"::view-transition"})),vd=!0}Li=null;break;case 5:No(i,t);break;case 4:r=Yi,Yi=!1,No(i,t),Yi&&(Su=!0),Yi=r;break;case 22:t.memoizedState===null&&(a.memoizedState!==null?dd(t,!1):No(i,t));break;case 30:r=Yi,u=W1(),Yi=!1,No(i,t),Yi&&(t.flags|=4);var f=t.memoizedProps,x=t.stateNode;i=ll(f,x),x=ll(a.memoizedProps,x);var A=al(f.default,f.update);A==="none"?i=!1:(f=a.memoizedState,a.memoizedState=null,a=t.child,Mn=0,i=pd(t,a,i,x,A,f,!0),Mn!==(f===null?0:f.length)&&(t.flags|=32)),(t.flags&4)!==0&&i?(Ro(t,t.memoizedProps.onUpdate),Li=u):u!==null&&(u.push.apply(u,Li),Li=u),Yi=(t.flags&32)!==0?!0:r;break;default:No(i,t)}}function qi(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)a2(t,i.alternate,i),i=i.sibling}function Kl(t,i){for(t=t.child;t!==null;){var a=t,r=i;switch(a.tag){case 0:case 11:case 14:case 15:Ql(4,a,a.return),Kl(a,r);break;case 1:ln(a,a.return);var u=a.stateNode;typeof u.componentWillUnmount=="function"&&$1(a,a.return,u),Kl(a,r);break;case 27:(r&2)!==0&&dm(a.stateNode,a.type,a.memoizedProps);case 5:ln(a,a.return),a.tag!==5&&a.tag!==27||Vr(a),Kl(a,r);break;case 6:Vr(a);break;case 26:ln(a,a.return),u=a.stateNode,a.memoizedState!==null||u===null||St||u.parentNode.removeChild(u),Kl(a,r);break;case 22:a.memoizedState===null&&Kl(a,r);break;case 30:ln(a,a.return),Kl(a,r);break;case 7:ln(a,a.return);default:Kl(a,r)}t=t.sibling}}function mi(t,i,a){for(a=(i.subtreeFlags&8772)!==0?a:a&-2,i=i.child;i!==null;){var r=i.alternate,u=t,f=i,x=f.flags,A=(a&1)!==0;switch(f.tag){case 0:case 11:case 15:mi(u,f,a),qr(4,f);break;case 1:if(mi(u,f,a),r=f,u=r.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(ue){wt(r,r.return,ue)}if(r=f,u=r.updateQueue,u!==null){var q=r.stateNode;try{var ne=u.shared.hiddenCallbacks;if(ne!==null)for(u.shared.hiddenCallbacks=null,u=0;u<ne.length;u++)Hg(ne[u],q)}catch(ue){wt(r,r.return,ue)}}A&&x&64&&K1(f),Bi(f,f.return);break;case 27:(a&2)!==0&&F1(f);case 5:f.tag!==5&&f.tag!==27||I1(f),mi(u,f,a),A&&r===null&&x&4&&sd(f),Bi(f,f.return);break;case 6:I1(f);break;case 26:q=f.stateNode,f.memoizedState!==null||q===null||It||lh(Pr(q.ownerDocument),f.type,q),mi(u,f,a),A&&r===null&&x&4&&sd(f),Bi(f,f.return);break;case 12:mi(u,f,a);break;case 31:mi(u,f,a),A&&x&4&&u2(u,f);break;case 13:mi(u,f,a),A&&x&4&&c2(u,f);break;case 22:f.memoizedState===null&&mi(u,f,a),Bi(f,f.return);break;case 30:mi(u,f,a),Bi(f,f.return);break;case 7:Bi(f,f.return);default:mi(u,f,a)}i=i.sibling}}function Sd(t,i){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Tr(a))}function _d(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Tr(t))}function ti(t,i,a,r){var u=(a&335544064)===a;if(i.subtreeFlags&(u?10262:10256))for(i=i.child;i!==null;)g2(t,i,a,r),i=i.sibling;else u&&n2(i)}function g2(t,i,a,r){var u=(a&335544064)===a;u&&i.alternate===null&&i.return!==null&&i.return.alternate!==null&&bu(i);var f=i.flags;switch(i.tag){case 0:case 11:case 15:ti(t,i,a,r),f&2048&&qr(9,i);break;case 1:ti(t,i,a,r);break;case 3:ti(t,i,a,r),u&&vd&&(t=t.containerInfo,t=t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,t.style.viewTransitionName==="root"&&(t.style.viewTransitionName=""),t=t.ownerDocument.documentElement,t!==null&&t.style.viewTransitionName==="none"&&(t.style.viewTransitionName="")),f&2048&&(f=null,i.alternate!==null&&(f=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==f&&(i.refCount++,f!=null&&Tr(f)));break;case 12:if(f&2048){ti(t,i,a,r),f=i.stateNode;try{var x=i.memoizedProps,A=x.id,q=x.onPostCommit;typeof q=="function"&&q(A,i.alternate===null?"mount":"update",f.passiveEffectDuration,-0)}catch(ne){wt(i,i.return,ne)}}else ti(t,i,a,r);break;case 31:ti(t,i,a,r);break;case 13:ti(t,i,a,r);break;case 23:break;case 22:x=i.stateNode,A=i.alternate,i.memoizedState!==null?(u&&A!==null&&A.memoizedState===null&&bu(A),x._visibility&2?ti(t,i,a,r):Gr(t,i)):(u&&A!==null&&A.memoizedState!==null&&bu(i),x._visibility&2?ti(t,i,a,r):(x._visibility|=2,Co(t,i,a,r,(i.subtreeFlags&10256)!==0||!1))),f&2048&&Sd(A,i);break;case 24:ti(t,i,a,r),f&2048&&_d(i.alternate,i);break;case 30:u&&(f=i.alternate,f!==null&&(Ui(f.child,!0),Ui(i.child,!0))),ti(t,i,a,r);break;default:ti(t,i,a,r)}}function Co(t,i,a,r,u){for(u=u&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var f=t,x=i,A=a,q=r,ne=x.flags;switch(x.tag){case 0:case 11:case 15:Co(f,x,A,q,u),qr(8,x);break;case 23:break;case 22:var ue=x.stateNode;x.memoizedState!==null?ue._visibility&2?Co(f,x,A,q,u):Gr(f,x):(ue._visibility|=2,Co(f,x,A,q,u)),u&&ne&2048&&Sd(x.alternate,x);break;case 24:Co(f,x,A,q,u),u&&ne&2048&&_d(x.alternate,x);break;default:Co(f,x,A,q,u)}i=i.sibling}}function Gr(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=t,r=i,u=r.flags;switch(r.tag){case 22:Gr(a,r),u&2048&&Sd(r.alternate,r);break;case 24:Gr(a,r),u&2048&&_d(r.alternate,r);break;default:Gr(a,r)}i=i.sibling}}var Ha=8192;function Ba(t,i,a){if(t.subtreeFlags&Ha)for(t=t.child;t!==null;)m2(t,i,a),t=t.sibling}function m2(t,i,a){switch(t.tag){case 26:Ba(t,i,a),t.flags&Ha&&(t.memoizedState!==null?NS(a,gi,t.memoizedState,t.memoizedProps):(t=t.stateNode,(i&335544128)===i&&_m(a,t)));break;case 5:Ba(t,i,a),t.flags&Ha&&(t=t.stateNode,(i&335544128)===i&&_m(a,t));break;case 3:case 4:var r=gi;gi=Pr(t.stateNode.containerInfo),Ba(t,i,a),gi=r;break;case 22:t.memoizedState===null&&(r=t.alternate,r!==null&&r.memoizedState!==null?(r=Ha,Ha=16777216,Ba(t,i,a),Ha=r):Ba(t,i,a));break;case 30:if((t.flags&Ha)!==0&&(r=t.memoizedProps.name,r!=null&&r!=="auto")){var u=t.stateNode;u.paired=null,Un===null&&(Un=new Map),Un.set(r,u)}Ba(t,i,a);break;default:Ba(t,i,a)}}function p2(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function Zr(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var r=i[a];Jt=r,v2(r,t)}p2(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)y2(t),t=t.sibling}function y2(t){switch(t.tag){case 0:case 11:case 15:Zr(t),t.flags&2048&&Ql(9,t,t.return);break;case 3:Zr(t);break;case 12:Zr(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,Eu(t)):Zr(t);break;default:Zr(t)}}function Eu(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var r=i[a];Jt=r,v2(r,t)}p2(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:Ql(8,i,i.return),Eu(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,Eu(i));break;default:Eu(i)}t=t.sibling}}function v2(t,i){for(;Jt!==null;){var a=Jt;switch(a.tag){case 0:case 11:case 15:Ql(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var r=a.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Tr(a.memoizedState.cache)}if(r=a.child,r!==null)r.return=a,Jt=r;else e:for(a=t;Jt!==null;){r=Jt;var u=r.sibling,f=r.return;if(r2(r),r===a){Jt=null;break e}if(u!==null){u.return=f,Jt=u;break e}Jt=f}}}var b3={getCacheForType:function(t){var i=en(Ut),a=i.data.get(t);return a===void 0&&(a=t(),i.data.set(t,a)),a},cacheSignal:function(){return en(Ut).controller.signal}},S3=typeof WeakMap=="function"?WeakMap:Map,xt=0,Ct=null,Pe=null,it=0,_t=0,kn=null,$l=!1,Mo=!1,wd=!1,gl=0,Ht=0,Il=0,La=0,Nu=0,Yn=0,To=0,Qr=null,An=null,Ed=!1,Cu=0,x2=0,Mu=1/0,Tu=null,Jl=null,Dt=0,pi=null,Ua=null,Vi=0,Nd=0,Cd=null,b2=null,Ao=null,Oo=null,zo=null,Kr=0,Au=null;function qn(){return(xt&2)!==0&&it!==0?it&-it:le.T!==null?Bd():El()}function S2(){if(Yn===0)if((it&536870912)===0||Qe){var t=zn;zn<<=1,(zn&3932160)===0&&(zn=262144),Yn=t}else Yn=536870912;return t=tn.current,t!==null&&(t.flags|=32),Yn}function Ro(t,i){if(i!=null){var a=t.stateNode,r=a.ref;r===null&&(r=a.ref=tm(ll(t.memoizedProps,a))),Oo===null&&(Oo=[]),Oo.push(i.bind(null,r))}}function On(t,i,a){(t===Ct&&(_t===2||_t===9)||t.cancelPendingCommit!==null)&&(Do(t,0),Fl(t,it,Yn,!1)),ri(t,a),((xt&2)===0||t!==Ct)&&(t===Ct&&((xt&2)===0&&(La|=a),Ht===4&&Fl(t,it,Yn,!1)),Xi(t))}function _2(t,i,a){if((xt&6)!==0)throw Error(o(327));var r=!a&&(i&127)===0&&(i&t.expiredLanes)===0||En(t,i),u=r?E3(t,i):Td(t,i,!0),f=r;do{if(u===0){Mo&&!r&&Fl(t,i,0,!1);break}else{if(a=t.current.alternate,f&&!_3(a)){u=Td(t,i,!1),f=!1;continue}if(u===2){if(f=i,t.errorRecoveryDisabledLanes&f)var x=0;else x=t.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){i=x;e:{var A=t;u=Qr;var q=A.current.memoizedState.isDehydrated;if(q&&(Do(A,x).flags|=256),x=Td(A,x,!1),x!==2&&x!==6){if(wd&&!q){A.errorRecoveryDisabledLanes|=f,La|=f,u=4;break e}f=An,An=u,f!==null&&(An===null?An=f:An.push.apply(An,f))}u=x}if(f=!1,u!==2)continue}}if(u===1){Do(t,0),Fl(t,i,0,!0);break}e:{switch(r=t,f=u,f){case 0:case 1:throw Error(o(345));case 4:if((i&4194048)!==i&&(i&62914560)!==i)break;case 6:Fl(r,i,Yn,!$l);break e;case 2:An=null;break;case 3:case 5:break;default:throw Error(o(329))}if((i&62914560)===i&&(u=Cu+300-Xe(),10<u)){if(Fl(r,i,Yn,!$l),Dn(r,0,!0)!==0)break e;Vi=i,r.timeoutHandle=Kd(w2.bind(null,r,a,An,Tu,Ed,i,Yn,La,To,$l,f,"Throttled",-0,0),u);break e}w2(r,a,An,Tu,Ed,i,Yn,La,To,$l,f,null,-0,0)}}break}while(!0);Xi(t)}function w2(t,i,a,r,u,f,x,A,q,ne,ue,ge,W,se){t.timeoutHandle=-1;var _e=i.subtreeFlags,Ce=(f&335544064)===f;if(ge=null,(Ce||_e&8192||(_e&16785408)===16785408)&&(ge={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Wt},Un=null,m2(i,f,ge),Ce&&(_e=ge,Ce=t.containerInfo,Ce=(Ce.nodeType===9?Ce:Ce.ownerDocument).__reactViewTransition,Ce!=null&&(_e.count++,_e.waitingForViewTransition=!0,_e=ts.bind(_e),Ce.finished.then(_e,_e))),_e=(f&62914560)===f?Cu-Xe():(f&4194048)===f?x2-Xe():0,_e=CS(ge,_e),_e!==null)){Vi=f,t.cancelPendingCommit=_e(z2.bind(null,t,i,f,a,r,u,x,A,q,ne,ue,ge,null,W,se)),Fl(t,f,x,!ne);return}z2(t,i,f,a,r,u,x,A,q,ne,ue,ge)}function _3(t){for(var i=t;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var r=0;r<a.length;r++){var u=a[r],f=u.getSnapshot;u=u.value;try{if(!Bn(f(),u))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function Fl(t,i,a,r){i=oi(t,i),i&=~Nu,i&=~La,t.suspendedLanes|=i,t.pingedLanes&=~i,r&&(t.warmLanes|=i),r=t.expirationTimes;for(var u=i;0<u;){var f=31-ht(u),x=1<<f;r[f]=-1,u&=~x}a!==0&&Sl(t,a,i)}function Ou(){return(xt&6)===0?($r(0),!1):!0}function Md(){if(Pe!==null){if(_t===0)var t=Pe.return;else t=Pe,sl=Na=null,Hf(t),xo=null,zr=0,t=Pe;for(;t!==null;)Q1(t.alternate,t),t=t.return;Pe=null}}function Do(t,i){var a=t.timeoutHandle;return a!==-1&&(t.timeoutHandle=-1,Q3(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),Vi=0,Md(),Ct=t,Pe=a=ol(t.current,null),it=i,_t=0,kn=null,$l=!1,Mo=En(t,i),wd=!1,To=Yn=Nu=La=Il=Ht=0,An=Qr=null,Ed=!1,gl=oi(t,i),Us(),a}function E2(t,i){ke=null,le.H=uu,i===vo||i===Is?(i=zg(),_t=3):i===_f?(i=zg(),_t=4):_t=i===Jf?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,kn=i,Pe===null&&(Ht=1,cu(t,Fn(i,t.current)))}function N2(){var t=tn.current;return t===null?!0:(it&4194048)===it?hn===null:(it&62914560)===it||(it&536870912)!==0?t===hn:!1}function C2(){var t=le.H;return le.H=uu,t===null?uu:t}function M2(){var t=le.A;return le.A=b3,t}function zu(){Ht=4,$l||(it&4194048)!==it&&tn.current!==null||(Mo=!0),(Il&134217727)===0&&(La&134217727)===0||Ct===null||Fl(Ct,it,Yn,!1)}function Td(t,i,a){var r=xt;xt|=2;var u=C2(),f=M2();(Ct!==t||it!==i)&&(Tu=null,Do(t,i)),i=!1;var x=Ht;e:do try{if(_t!==0&&Pe!==null){var A=Pe,q=kn;switch(_t){case 8:Md(),x=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(i=!0);var ne=_t;if(_t=0,kn=null,jo(t,A,q,ne),a&&Mo){x=0;break e}break;default:ne=_t,_t=0,kn=null,jo(t,A,q,ne)}}w3(),x=Ht;break}catch(ue){E2(t,ue)}while(!0);return i&&t.shellSuspendCounter++,sl=Na=null,xt=r,le.H=u,le.A=f,Pe===null&&(Ct=null,it=0,Us()),x}function w3(){for(;Pe!==null;)T2(Pe)}function E3(t,i){var a=xt;xt|=2;var r=C2(),u=M2();Ct!==t||it!==i?(Tu=null,Mu=Xe()+500,Do(t,i)):Mo=En(t,i);e:do try{if(_t!==0&&Pe!==null){i=Pe;var f=kn;t:switch(_t){case 1:_t=0,kn=null,jo(t,i,f,1);break;case 2:case 9:if(Ag(f)){_t=0,kn=null,A2(i);break}i=function(){_t!==2&&_t!==9||Ct!==t||(_t=7),Xi(t)},f.then(i,i);break e;case 3:_t=7;break e;case 4:_t=5;break e;case 7:Ag(f)?(_t=0,kn=null,A2(i)):(_t=0,kn=null,jo(t,i,f,7));break;case 5:var x=null;switch(Pe.tag){case 26:x=Pe.memoizedState;case 5:case 27:var A=Pe;if(x?bm(x):A.stateNode.complete){_t=0,kn=null;var q=A.sibling;if(q!==null)Pe=q;else{var ne=A.return;ne!==null?(Pe=ne,Ru(ne)):Pe=null}break t}}_t=0,kn=null,jo(t,i,f,5);break;case 6:_t=0,kn=null,jo(t,i,f,6);break;case 8:Md(),Ht=6;break e;default:throw Error(o(462))}}N3();break}catch(ue){E2(t,ue)}while(!0);return sl=Na=null,le.H=r,le.A=u,xt=a,Pe!==null?0:(Ct=null,it=0,Us(),Ht)}function N3(){for(;Pe!==null&&!yt();)T2(Pe)}function T2(t){var i=G1(t.alternate,t,gl);t.memoizedProps=t.pendingProps,i===null?Ru(t):Pe=i}function A2(t){var i=t,a=i.alternate;switch(i.tag){case 15:case 0:i=L1(a,i,i.pendingProps,i.type,void 0,it);break;case 11:i=L1(a,i,i.pendingProps,i.type.render,i.ref,it);break;case 5:Hf(i);var r=i;r===$t&&(Qe?(Gs(r),r.tag===5&&r.stateNode!=null&&(Tt=r.stateNode)):(Gs(r),Qe=!0));default:Q1(a,i),i=Pe=vg(i,gl),i=G1(a,i,gl)}t.memoizedProps=t.pendingProps,i===null?Ru(t):Pe=i}function jo(t,i,a,r){sl=Na=null,Hf(i),xo=null,zr=0;var u=i.return;try{if(d3(t,u,i,a,it)){Ht=1,cu(t,Fn(a,t.current)),Pe=null;return}}catch(f){if(u!==null)throw Pe=u,f;Ht=1,cu(t,Fn(a,t.current)),Pe=null;return}i.flags&32768?(Qe||r===1?t=!0:Mo||(it&536870912)!==0?t=!1:($l=t=!0,(r===2||r===9||r===3||r===6)&&(r=tn.current,r!==null&&r.tag===13&&(r.flags|=16384))),O2(i,t)):Ru(i)}function Ru(t){var i=t;do{if((i.flags&32768)!==0){O2(i,$l);return}t=i.return;var a=p3(i.alternate,i,gl);if(a!==null){Pe=a;return}if(i=i.sibling,i!==null){Pe=i;return}Pe=i=t}while(i!==null);Ht===0&&(Ht=5)}function O2(t,i){do{var a=y3(t.alternate,t);if(a!==null){a.flags&=32767,Pe=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(t=t.sibling,t!==null)){Pe=t;return}Pe=t=a}while(t!==null);Ht=6,Pe=null}function z2(t,i,a,r,u,f,x,A,q,ne,ue,ge){t.cancelPendingCommit=null;do Du();while(Dt!==0);if((xt&6)!==0)throw Error(o(327));if(i!==null){if(i===t.current)throw Error(o(177));t===Ct&&(Pe=Ct=null,it=0),Ua=i,pi=t,Vi=a,Cd=u,b2=r,C3(t,i,a,x,A,q,ge)}}function C3(t,i,a,r,u,f,x){var A=i.lanes|i.childLanes;if(Nd=A,A|=uf,ha(t,a,A,r,u,f),Oo=null,(a&335544064)===a?(zo=e3(t),r=10262):(zo=null,r=10256),(i.subtreeFlags&r)!==0||(i.flags&r)!==0?(t.callbackNode=null,t.callbackPriority=0,R3(Ae,function(){return Rd(),null})):(t.callbackNode=null,t.callbackPriority=0),vu=!1,r=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||r){r=le.T,le.T=null,u=ce.p,ce.p=2,f=xt,xt|=4;try{v3(t,i,a)}finally{xt=f,ce.p=u,le.T=r}}Dt=1,vu?Ao=P3(x,t.containerInfo,zo,Ad,Od,T3,zd,Rd,M3):(Ad(),Od(),zd())}function M3(t){if(Dt!==0){var i=pi.onRecoverableError;i(t,{componentStack:null})}}function T3(){Dt===3&&(Dt=0,h2(Ua,pi),Dt=4)}function Ad(){if(Dt===1){Dt=0;var t=pi,i=Ua,a=Vi,r=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||r){r=le.T,le.T=null;var u=ce.p;ce.p=2;var f=xt;xt|=4;try{Xr=Su=!1,f2(i,t,a),a=Gd;var x=sg(t.containerInfo),A=a.focusedElem,q=a.selectionRange;if(x!==A&&A&&A.ownerDocument&&rg(A.ownerDocument.documentElement,A)){if(q!==null&&lf(A)){var ne=q.start,ue=q.end;if(ue===void 0&&(ue=ne),"selectionStart"in A)A.selectionStart=ne,A.selectionEnd=Math.min(ue,A.value.length);else{var ge=A.ownerDocument||document,W=ge&&ge.defaultView||window;if(W.getSelection){var se=W.getSelection(),_e=A.textContent.length,Ce=Math.min(q.start,_e),Ye=q.end===void 0?Ce:Math.min(q.end,_e);!se.extend&&Ce>Ye&&(x=Ye,Ye=Ce,Ce=x);var te=og(A,Ce),$=og(A,Ye);if(te&&$&&(se.rangeCount!==1||se.anchorNode!==te.node||se.anchorOffset!==te.offset||se.focusNode!==$.node||se.focusOffset!==$.offset)){var ae=ge.createRange();ae.setStart(te.node,te.offset),se.removeAllRanges(),Ce>Ye?(se.addRange(ae),se.extend($.node,$.offset)):(ae.setEnd($.node,$.offset),se.addRange(ae))}}}}for(ge=[],se=A;se=se.parentNode;)se.nodeType===1&&ge.push({element:se,left:se.scrollLeft,top:se.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ge.length;A++){var he=ge[A];he.element.scrollLeft=he.left,he.element.scrollTop=he.top}}Vo=!!Xd,Gd=Xd=null}finally{xt=f,ce.p=u,le.T=r}}t.current=i,Dt=2}}function Od(){if(Dt===2){Dt=0;var t=pi,i=Ua,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=le.T,le.T=null;var r=ce.p;ce.p=2;var u=xt;xt|=4;try{a2(t,i.alternate,i)}finally{xt=u,ce.p=r,le.T=a}}Dt=3}}function zd(){if(Dt===4||Dt===3){Dt=0;var t=Ao;Ao=null,mt();var i=pi,a=Ua,r=Vi,u=b2,f=(r&335544064)===r?10262:10256;if((a.subtreeFlags&f)!==0||(a.flags&f)!==0?Dt=5:(Dt=0,Ua=pi=null,R2(i,i.pendingLanes)),f=i.pendingLanes,f===0&&(Jl=null),Wi(r),a=a.stateNode,Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(vt,a,void 0,(a.current.flags&128)===128)}catch{}if(u!==null){a=le.T,f=ce.p,ce.p=2,le.T=null;try{for(var x=i.onRecoverableError,A=0;A<u.length;A++){var q=u[A];x(q.value,{componentStack:q.stack})}}finally{le.T=a,ce.p=f}}if(u=Oo,x=zo,zo=null,u!==null&&(Oo=null,x===null&&(x=[]),t!==null))for(q=0;q<u.length;q++)a=(0,u[q])(x),a!==void 0&&t.finished.finally(a);(Vi&3)!==0&&Du(),Xi(i),f=i.pendingLanes,(r&261930)!==0&&(f&42)!==0?i===Au?Kr++:(Kr=0,Au=i):(Kr=0,Au=null),$r(0)}}function R2(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,Tr(i)))}function Du(){return Ao!==null&&(Ao.skipTransition(),Ao=null),Ad(),Od(),zd(),Rd()}function Rd(){if(Dt!==5)return!1;var t=pi,i=Nd;Nd=0;var a=Wi(Vi),r=le.T,u=ce.p;try{ce.p=32>a?32:a,le.T=null,a=Cd,Cd=null;var f=pi,x=Vi;if(Dt=0,Ua=pi=null,Vi=0,(xt&6)!==0)throw Error(o(331));var A=xt;if(xt|=4,y2(f.current),g2(f,f.current,x,a),xt=A,$r(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(vt,f)}catch{}return!0}finally{ce.p=u,le.T=r,R2(t,i)}}function D2(t,i,a){i=Fn(a,i),i=If(t.stateNode,i,2),t=Vl(t,i,2),t!==null&&(ri(t,2),Xi(t))}function wt(t,i,a){if(t.tag===3)D2(t,t,a);else for(;i!==null;){if(i.tag===3){D2(i,t,a);break}else if(i.tag===1){var r=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(Jl===null||!Jl.has(r))){t=Fn(a,t),a=A1(2),r=Vl(i,a,2),r!==null&&(O1(a,r,i,t),ri(r,2),Xi(r));break}}i=i.return}}function Dd(t,i,a){var r=t.pingCache;if(r===null){r=t.pingCache=new S3;var u=new Set;r.set(i,u)}else u=r.get(i),u===void 0&&(u=new Set,r.set(i,u));u.has(a)||(wd=!0,u.add(a),t=A3.bind(null,t,i,a),i.then(t,t))}function A3(t,i,a){var r=t.pingCache;r!==null&&r.delete(i),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,Ct===t&&(it&a)===a&&((Ht===4||Ht===3&&(it&62914560)===it&&300>Xe()-Cu)&&(xt&2)===0?Do(t,0):Nu|=a,To===it&&(To=0)),Xi(t)}function j2(t,i){i===0&&(i=bl()),t=_a(t,i),t!==null&&(ri(t,i),Xi(t))}function O3(t){var i=t.memoizedState,a=0;i!==null&&(a=i.retryLane),j2(t,a)}function z3(t,i){var a=0;switch(t.tag){case 31:case 13:var r=t.stateNode,u=t.memoizedState;u!==null&&(a=u.retryLane);break;case 19:r=t.stateNode;break;case 22:r=t.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(i),j2(t,a)}function R3(t,i){return ft(t,i)}var Ho=null,Bo=null,jd=!1,ju=!1,Hd=!1,Pl=0;function Xi(t){t!==Bo&&t.next===null&&(Bo===null?Ho=Bo=t:Bo=Bo.next=t),ju=!0,jd||(jd=!0,j3())}function $r(t,i){if(!Hd&&ju){Hd=!0;do for(var a=!1,r=Ho;r!==null;){if(t!==0){var u=r.pendingLanes;if(u===0)var f=0;else{var x=r.suspendedLanes,A=r.pingedLanes;f=(1<<31-ht(42|t)+1)-1,f&=u&~(x&~A),f=f&201326741?f&201326741|1:f?f|2:0}f!==0&&(a=!0,U2(r,f))}else f=it,f=Dn(r,r===Ct?f:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(f&3)===0||En(r,f)||(a=!0,U2(r,f));r=r.next}while(a);Hd=!1}}function D3(){H2()}function H2(){ju=jd=!1;var t=0;Pl!==0&&Z3()&&(t=Pl);for(var i=Xe(),a=null,r=Ho;r!==null;){var u=r.next,f=B2(r,i);f===0?(r.next=null,a===null?Ho=u:a.next=u,u===null&&(Bo=a)):(a=r,(t!==0||(f&3)!==0)&&(ju=!0)),r=u}Dt!==0&&Dt!==5||$r(t),Pl!==0&&(Pl=0)}function B2(t,i){for(var a=t.suspendedLanes,r=t.pingedLanes,u=t.expirationTimes,f=t.pendingLanes&-62914561;0<f;){var x=31-ht(f),A=1<<x,q=u[x];q===-1?((A&a)===0||(A&r)!==0)&&(u[x]=da(A,i)):q<=i&&(t.expiredLanes|=A),f&=~A}if(i=Ct,a=it,a=Dn(t,t===i?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r=t.callbackNode,a===0||t===i&&(_t===2||_t===9)||t.cancelPendingCommit!==null)return r!==null&&r!==null&&pt(r),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||En(t,a)){if(i=a&-a,i===t.callbackPriority)return i;switch(r!==null&&pt(r),Wi(a)){case 2:case 8:a=Re;break;case 32:a=Ae;break;case 268435456:a=Oe;break;default:a=Ae}return r=L2.bind(null,t),a=ft(a,r),t.callbackPriority=i,t.callbackNode=a,i}return r!==null&&r!==null&&pt(r),t.callbackPriority=2,t.callbackNode=null,2}function L2(t,i){if(Dt!==0&&Dt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(Du()&&t.callbackNode!==a)return null;var r=it;return r=Dn(t,t===Ct?r:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),r===0?null:(_2(t,r,i),B2(t,Xe()),t.callbackNode!=null&&t.callbackNode===a?L2.bind(null,t):null)}function U2(t,i){if(Du())return null;_2(t,i,!0)}function j3(){K3(function(){(xt&6)!==0?ft(ye,D3):H2()})}function Bd(){if(Pl===0){var t=Ta;t===0&&(t=sn,sn<<=1,(sn&261888)===0&&(sn=256)),Pl=t}return Pl}function k2(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:Dl(t)}function H3(t,i,a,r,u){if(i==="submit"&&a&&a.stateNode===u){var f=k2((u[Lt]||null).action),x=r.submitter;x&&(i=(i=x[Lt]||null)?k2(i.formAction):x.getAttribute("formAction"),i!==null&&(f=i,x=null));var A=new js("action","action",null,r,u);t.push({event:A,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Pl!==0){var q=new FormData(u,x);Gf(a,{pending:!0,data:q,method:u.method,action:f},null,q)}}else typeof f=="function"&&(A.preventDefault(),q=new FormData(u,x),Gf(a,{pending:!0,data:q,method:u.method,action:f},f,q))},currentTarget:u}]})}}for(var Ld=0;Ld<sf.length;Ld++){var Ud=sf[Ld],B3=Ud.toLowerCase(),L3=Ud[0].toUpperCase()+Ud.slice(1);di(B3,"on"+L3)}di(fg,"onAnimationEnd"),di(dg,"onAnimationIteration"),di(hg,"onAnimationStart"),di("dblclick","onDoubleClick"),di("focusin","onFocus"),di("focusout","onBlur"),di(Qb,"onTransitionRun"),di(Kb,"onTransitionStart"),di($b,"onTransitionCancel"),di(gg,"onTransitionEnd"),Mi("onMouseEnter",["mouseout","mouseover"]),Mi("onMouseLeave",["mouseout","mouseover"]),Mi("onPointerEnter",["pointerout","pointerover"]),Mi("onPointerLeave",["pointerout","pointerover"]),Nn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Nn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Nn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Nn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Nn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ir="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),U3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ir));function Y2(t,i){i=(i&4)!==0;for(var a=0;a<t.length;a++){var r=t[a],u=r.event;r=r.listeners;e:{var f=void 0;if(i)for(var x=r.length-1;0<=x;x--){var A=r[x],q=A.instance,ne=A.currentTarget;if(A=A.listener,q!==f&&u.isPropagationStopped())break e;f=A,u.currentTarget=ne;try{f(u)}catch(ue){Ls(ue)}u.currentTarget=null,f=q}else for(x=0;x<r.length;x++){if(A=r[x],q=A.instance,ne=A.currentTarget,A=A.listener,q!==f&&u.isPropagationStopped())break e;f=A,u.currentTarget=ne;try{f(u)}catch(ue){Ls(ue)}u.currentTarget=null,f=q}}}}function We(t,i){var a=i[Cl];a===void 0&&(a=i[Cl]=new Set);var r=t+"__bubble";a.has(r)||(q2(i,t,2,!1),a.add(r))}function kd(t,i,a){var r=0;i&&(r|=4),q2(a,t,r,i)}var Hu="_reactListening"+Math.random().toString(36).slice(2);function Yd(t){if(!t[Hu]){t[Hu]=!0,Al.forEach(function(a){a!=="selectionchange"&&(U3.has(a)||kd(a,!1,t),kd(a,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[Hu]||(i[Hu]=!0,kd("selectionchange",!1,i))}}function q2(t,i,a,r){switch(Om(i)){case 2:var u=OS;break;case 8:u=zS;break;default:u=oh}a=u.bind(null,i,a,t),u=void 0,!Ri||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(u=!0),r?u!==void 0?t.addEventListener(i,a,{capture:!0,passive:u}):t.addEventListener(i,a,!0):u!==void 0?t.addEventListener(i,a,{passive:u}):t.addEventListener(i,a,!1)}function qd(t,i,a,r,u){var f=r;if((i&1)===0&&(i&2)===0&&r!==null)e:for(;;){if(r===null)return;var x=r.tag;if(x===3||x===4){var A=r.stateNode.containerInfo;if(A===u)break;if(x===4)for(x=r.return;x!==null;){var q=x.tag;if((q===3||q===4)&&x.stateNode.containerInfo===u)return;x=x.return}for(;A!==null;){if(x=jn(A),x===null)return;if(q=x.tag,q===5||q===6||q===26||q===27){r=f=x;continue e}A=A.parentNode}}r=r.return}nl(function(){var ne=f,ue=Oi(a),ge=[];e:{var W=mg.get(t);if(W!==void 0){var se=js,_e=t;switch(t){case"keypress":if(Rs(a)===0)break e;case"keydown":case"keyup":se=_b;break;case"focusin":_e="focus",se=Fc;break;case"focusout":_e="blur",se=Fc;break;case"beforeblur":case"afterblur":se=Fc;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":se=G0;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":se=cb;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":se=Mb;break;case fg:case dg:case hg:se=hb;break;case gg:se=Ab;break;case"scroll":case"scrollend":se=sb;break;case"wheel":se=zb;break;case"copy":case"cut":case"paste":se=mb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":se=Q0;break;case"submit":se=Nb;break;case"toggle":case"beforetoggle":se=Db}var Ce=(i&4)!==0,Ye=!Ce&&(t==="scroll"||t==="scrollend"),te=Ce?W!==null?W+"Capture":null:W;Ce=[];for(var $=ne,ae;$!==null;){var he=$;if(ae=he.stateNode,he=he.tag,he!==5&&he!==26&&he!==27||ae===null||te===null||(he=$n($,te),he!=null&&Ce.push(Jr($,he,ae))),Ye)break;$=$.return}0<Ce.length&&(W=new se(W,_e,null,a,ue),ge.push({event:W,listeners:Ce}))}}if((i&7)===0){e:{if(se=t==="mouseover"||t==="pointerover",W=t==="mouseout"||t==="pointerout",se&&a!==xa&&(_e=a.relatedTarget||a.fromElement)&&(jn(_e)||_e[Zn]))break e;(W||se)&&(_e=ue.window===ue?ue:(se=ue.ownerDocument)?se.defaultView||se.parentWindow:window,W?(se=a.relatedTarget||a.toElement,W=ne,se=se?jn(se):null,se!==null&&(Ye=c(se),Ce=se.tag,se!==Ye||Ce!==5&&Ce!==27&&Ce!==6)&&(se=null)):(W=null,se=ne),W!==se&&(Ce=G0,he="onMouseLeave",te="onMouseEnter",$="mouse",(t==="pointerout"||t==="pointerover")&&(Ce=Q0,he="onPointerLeave",te="onPointerEnter",$="pointer"),Ye=W==null?_e:ui(W),ae=se==null?_e:ui(se),_e=new Ce(he,$+"leave",W,a,ue),_e.target=Ye,_e.relatedTarget=ae,he=null,jn(ue)===ne&&(Ce=new Ce(te,$+"enter",se,a,ue),Ce.target=ae,Ce.relatedTarget=Ye,he=Ce),Ye=he,Ce=W&&se?L(W,se,k3):null,W!==null&&V2(ge,_e,W,Ce,!1),se!==null&&Ye!==null&&V2(ge,Ye,se,Ce,!0)))}e:{if(W=ne?ui(ne):window,se=W.nodeName&&W.nodeName.toLowerCase(),se==="select"||se==="input"&&W.type==="file")var Ne=eg;else if(P0(W))if(tg)Ne=Xb;else{Ne=qb;var lt=Yb}else se=W.nodeName,!se||se.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?ne&&va(ne.elementType)&&(Ne=eg):Ne=Vb;if(Ne&&(Ne=Ne(t,ne))){W0(ge,Ne,a,ue);break e}lt&&lt(t,W,ne)}switch(lt=ne?ui(ne):window,t){case"focusin":(P0(lt)||lt.contentEditable==="true")&&(uo=lt,af=ne,Nr=null);break;case"focusout":Nr=af=uo=null;break;case"mousedown":of=!0;break;case"contextmenu":case"mouseup":case"dragend":of=!1,ug(ge,a,ue);break;case"selectionchange":if(Zb)break;case"keydown":case"keyup":ug(ge,a,ue)}var Te;if(Wc)e:{switch(t){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else so?J0(t,a)&&(De="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(De="onCompositionStart");De&&(K0&&a.locale!=="ko"&&(so||De!=="onCompositionStart"?De==="onCompositionEnd"&&so&&(Te=vr()):(pn=ue,Di="value"in pn?pn.value:pn.textContent,so=!0)),lt=Bu(ne,De),0<lt.length&&(De=new Z0(De,t,null,a,ue),ge.push({event:De,listeners:lt}),Te?De.data=Te:(Te=F0(a),Te!==null&&(De.data=Te)))),(Te=Hb?Bb(t,a):Lb(t,a))&&(De=Bu(ne,"onBeforeInput"),0<De.length&&(lt=new Z0("onBeforeInput","beforeinput",null,a,ue),ge.push({event:lt,listeners:De}),lt.data=Te)),H3(ge,t,ne,a,ue)}Y2(ge,i)})}function Jr(t,i,a){return{instance:t,listener:i,currentTarget:a}}function Bu(t,i){for(var a=i+"Capture",r=[];t!==null;){var u=t,f=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||f===null||(u=$n(t,a),u!=null&&r.unshift(Jr(t,u,f)),u=$n(t,i),u!=null&&r.push(Jr(t,u,f))),t.tag===3)return r;t=t.return}return[]}function k3(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function V2(t,i,a,r,u){for(var f=i._reactName,x=[];a!==null&&a!==r;){var A=a,q=A.alternate,ne=A.stateNode;if(A=A.tag,q!==null&&q===r)break;A!==5&&A!==26&&A!==27||ne===null||(q=ne,u?(ne=$n(a,f),ne!=null&&x.unshift(Jr(a,ne,q))):u||(ne=$n(a,f),ne!=null&&x.push(Jr(a,ne,q)))),a=a.return}x.length!==0&&t.push({event:i,listeners:x})}var Y3=/\r\n?/g,q3=/\u0000|\uFFFD/g;function X2(t){return(typeof t=="string"?t:""+t).replace(Y3,`
49
+ `).replace(q3,"")}function G2(t,i){return i=X2(i),X2(t)===i}function Et(t,i,a,r,u,f){switch(a){case"children":if(typeof r=="string")i==="body"||i==="textarea"&&r===""||Ai(t,r);else if(typeof r=="number"||typeof r=="bigint")i!=="body"&&Ai(t,""+r);else return;break;case"className":zl(t,"class",r);break;case"tabIndex":zl(t,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":zl(t,a,r);break;case"style":oo(t,r,f);return;case"data":if(i!=="object"){zl(t,"data",r);break}case"src":case"href":if(r===""&&(i!=="a"||a!=="href")){t.removeAttribute(a);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=Dl(r),t.setAttribute(a,r);break;case"action":case"formAction":if(typeof r=="function"){t.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof f=="function"&&(a==="formAction"?(i!=="input"&&Et(t,i,"name",u.name,u,null),Et(t,i,"formEncType",u.formEncType,u,null),Et(t,i,"formMethod",u.formMethod,u,null),Et(t,i,"formTarget",u.formTarget,u,null)):(Et(t,i,"encType",u.encType,u,null),Et(t,i,"method",u.method,u,null),Et(t,i,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){t.removeAttribute(a);break}r=Dl(r),t.setAttribute(a,r);break;case"onClick":r!=null&&(t.onclick=Wt);return;case"onScroll":r!=null&&We("scroll",t);return;case"onScrollEnd":r!=null&&We("scrollend",t);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(a=r.__html,a!=null){if(u.children!=null)throw Error(o(60));(f!=null?f.__html:void 0)!==a&&(t.innerHTML=a)}}break;case"multiple":t.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":t.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){t.removeAttribute("xlink:href");break}a=Dl(r),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"credentialless":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":r===!0?t.setAttribute(a,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?t.setAttribute(a,r):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?t.setAttribute(a,r):t.removeAttribute(a);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?t.removeAttribute(a):t.setAttribute(a,r);break;case"popover":We("beforetoggle",t),We("toggle",t),Ol(t,"popover",r);break;case"xlinkActuate":un(t,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":un(t,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":un(t,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":un(t,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":un(t,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":un(t,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":un(t,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":un(t,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":un(t,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Ol(t,"is",r);break;case"innerText":case"textContent":return;default:if(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")a=Rl.get(a)||a,Ol(t,a,r);else return}nt=!0}function Vd(t,i,a,r,u,f){switch(a){case"style":oo(t,r,f);return;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(a=r.__html,a!=null){if(u.children!=null)throw Error(o(60));(f!=null?f.__html:void 0)!==a&&(t.innerHTML=a)}}break;case"children":if(typeof r=="string")Ai(t,r);else if(typeof r=="number"||typeof r=="bigint")Ai(t,""+r);else return;break;case"onScroll":r!=null&&We("scroll",t);return;case"onScrollEnd":r!=null&&We("scrollend",t);return;case"onClick":r!=null&&(t.onclick=Wt);return;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":return;case"innerText":case"textContent":return;default:if(!el.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(u=a.endsWith("Capture"),f=a.slice(2,u?a.length-7:void 0),i=t[Lt]||null,i=i!=null?i[a]:null,typeof i=="function"&&t.removeEventListener(f,i,u),typeof r=="function")){typeof i!="function"&&i!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(f,r,u);break e}nt=!0,a in t?t[a]=r:r===!0?t.setAttribute(a,""):Ol(t,a,r)}return}nt=!0}function an(t,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",t),We("load",t);var r=!1,u=!1,f;for(f in a)if(a.hasOwnProperty(f)){var x=a[f];if(x!=null)switch(f){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Et(t,i,f,x,a,null)}}u&&Et(t,i,"srcSet",a.srcSet,a,null),r&&Et(t,i,"src",a.src,a,null);return;case"input":We("invalid",t);var A=f=x=u=null,q=null,ne=null;for(r in a)if(a.hasOwnProperty(r)){var ue=a[r];if(ue!=null)switch(r){case"name":u=ue;break;case"type":x=ue;break;case"checked":q=ue;break;case"defaultChecked":ne=ue;break;case"value":f=ue;break;case"defaultValue":A=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(o(137,i));break;default:Et(t,i,r,ue,a,null)}}no(t,f,A,q,ne,x,u,!1);return;case"select":We("invalid",t),r=x=f=null;for(u in a)if(a.hasOwnProperty(u)&&(A=a[u],A!=null))switch(u){case"value":f=A;break;case"defaultValue":x=A;break;case"multiple":r=A;default:Et(t,i,u,A,a,null)}i=f,a=x,t.multiple=!!r,i!=null?Ti(t,!!r,i,!1):a!=null&&Ti(t,!!r,a,!0);return;case"textarea":We("invalid",t),f=u=r=null;for(x in a)if(a.hasOwnProperty(x)&&(A=a[x],A!=null))switch(x){case"value":r=A;break;case"defaultValue":u=A;break;case"children":f=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(o(91));break;default:Et(t,i,x,A,a,null)}lo(t,r,u,f);return;case"option":for(q in a)if(a.hasOwnProperty(q)&&(r=a[q],r!=null))switch(q){case"selected":t.selected=r&&typeof r!="function"&&typeof r!="symbol";break;default:Et(t,i,q,r,a,null)}return;case"dialog":We("beforetoggle",t),We("toggle",t),We("cancel",t),We("close",t);break;case"iframe":case"object":We("load",t);break;case"video":case"audio":for(r=0;r<Ir.length;r++)We(Ir[r],t);break;case"image":We("error",t),We("load",t);break;case"details":We("toggle",t);break;case"embed":case"source":case"link":We("error",t),We("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(ne in a)if(a.hasOwnProperty(ne)&&(r=a[ne],r!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,i));default:Et(t,i,ne,r,a,null)}return;default:if(va(i)){for(ue in a)a.hasOwnProperty(ue)&&(r=a[ue],r!==void 0&&Vd(t,i,ue,r,a,void 0));return}}for(A in a)a.hasOwnProperty(A)&&(r=a[A],r!=null&&Et(t,i,A,r,a,null))}var V3={};function X3(t,i,a,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,f=null,x=null,A=null,q=null,ne=null,ue=null;for(se in a){var ge=a[se];if(a.hasOwnProperty(se)&&ge!=null)switch(se){case"checked":break;case"value":break;case"defaultValue":q=ge;default:r.hasOwnProperty(se)||Et(t,i,se,null,r,ge)}}for(var W in r){var se=r[W];if(ge=a[W],r.hasOwnProperty(W)&&(se!=null||ge!=null))switch(W){case"type":se!==ge&&(nt=!0),f=se;break;case"name":se!==ge&&(nt=!0),u=se;break;case"checked":se!==ge&&(nt=!0),ne=se;break;case"defaultChecked":se!==ge&&(nt=!0),ue=se;break;case"value":se!==ge&&(nt=!0),x=se;break;case"defaultValue":se!==ge&&(nt=!0),A=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(o(137,i));break;default:se!==ge&&Et(t,i,W,se,r,ge)}}pa(t,x,A,q,ne,ue,f,u);return;case"select":se=x=A=W=null;for(f in a)if(q=a[f],a.hasOwnProperty(f)&&q!=null)switch(f){case"value":break;case"multiple":se=q;default:r.hasOwnProperty(f)||Et(t,i,f,null,r,q)}for(u in r)if(f=r[u],q=a[u],r.hasOwnProperty(u)&&(f!=null||q!=null))switch(u){case"value":f!==q&&(nt=!0),W=f;break;case"defaultValue":f!==q&&(nt=!0),A=f;break;case"multiple":f!==q&&(nt=!0),x=f;default:f!==q&&Et(t,i,u,f,r,q)}i=A,a=x,r=se,W!=null?Ti(t,!!a,W,!1):!!r!=!!a&&(i!=null?Ti(t,!!a,i,!0):Ti(t,!!a,a?[]:"",!1));return;case"textarea":se=W=null;for(A in a)if(u=a[A],a.hasOwnProperty(A)&&u!=null&&!r.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Et(t,i,A,null,r,u)}for(x in r)if(u=r[x],f=a[x],r.hasOwnProperty(x)&&(u!=null||f!=null))switch(x){case"value":u!==f&&(nt=!0),W=u;break;case"defaultValue":u!==f&&(nt=!0),se=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==f&&Et(t,i,x,u,r,f)}io(t,W,se);return;case"option":for(var _e in a)if(W=a[_e],a.hasOwnProperty(_e)&&W!=null&&!r.hasOwnProperty(_e))switch(_e){case"selected":t.selected=!1;break;default:Et(t,i,_e,null,r,W)}for(q in r)if(W=r[q],se=a[q],r.hasOwnProperty(q)&&W!==se&&(W!=null||se!=null))switch(q){case"selected":W!==se&&(nt=!0),t.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:Et(t,i,q,W,r,se)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in a)W=a[Ce],a.hasOwnProperty(Ce)&&W!=null&&!r.hasOwnProperty(Ce)&&Et(t,i,Ce,null,r,W);for(ne in r)if(W=r[ne],se=a[ne],r.hasOwnProperty(ne)&&W!==se&&(W!=null||se!=null))switch(ne){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(o(137,i));break;default:Et(t,i,ne,W,r,se)}return;default:if(va(i)){for(var Ye in a)W=a[Ye],a.hasOwnProperty(Ye)&&W!==void 0&&!r.hasOwnProperty(Ye)&&Vd(t,i,Ye,void 0,r,W);for(ue in r)W=r[ue],se=a[ue],!r.hasOwnProperty(ue)||W===se||W===void 0&&se===void 0||Vd(t,i,ue,W,r,se);return}}for(var te in a)W=a[te],a.hasOwnProperty(te)&&W!=null&&!r.hasOwnProperty(te)&&Et(t,i,te,null,r,W);for(ge in r)W=r[ge],se=a[ge],!r.hasOwnProperty(ge)||W===se||W==null&&se==null||Et(t,i,ge,W,r,se)}function Z2(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function G3(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,a=performance.getEntriesByType("resource"),r=0;r<a.length;r++){var u=a[r],f=u.transferSize,x=u.initiatorType,A=u.duration;if(f&&A&&Z2(x)){for(x=0,A=u.responseEnd,r+=1;r<a.length;r++){var q=a[r],ne=q.startTime;if(ne>A)break;var ue=q.transferSize,ge=q.initiatorType;ue&&Z2(ge)&&(q=q.responseEnd,x+=ue*(q<A?1:(A-ne)/(q-ne)))}if(--r,i+=8*(f+x)/(u.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Xd=null,Gd=null;function Fr(t){return t.nodeType===9?t:t.ownerDocument}function Q2(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function K2(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function $2(t,i,a,r){return a=Fr(a).createElement(t),a[Rt]=r,a[Lt]=i,an(a,t,i),Ot(a),a}function Zd(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function Z3(){var t=window.event;return t&&t.type==="popstate"?t===Qd?!1:(Qd=t,!0):(Qd=null,!1)}var Kd=typeof setTimeout=="function"?setTimeout:void 0,Q3=typeof clearTimeout=="function"?clearTimeout:void 0,I2=typeof Promise=="function"?Promise:void 0,J2=typeof requestAnimationFrame=="function"?requestAnimationFrame:Kd,K3=typeof queueMicrotask=="function"?queueMicrotask:typeof I2<"u"?function(t){return I2.resolve(null).then(t).catch($3)}:Kd;function $3(t){setTimeout(function(){throw t})}function Wl(t){return t==="head"}function F2(t,i){var a=i,r=0;do{var u=a.nextSibling;if(t.removeChild(a),u&&u.nodeType===8)if(a=u.data,a==="/$"||a==="/&"){if(r===0){t.removeChild(u),Xo(i);return}r--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")r++;else if(a==="html")th(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,th(a);for(var f=a.firstChild;f;){var x=f.nextSibling,A=f.nodeName;f[si]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&f.rel.toLowerCase()==="stylesheet"||a.removeChild(f),f=x}}else a==="body"&&th(t.ownerDocument.body);a=u}while(a);Xo(i)}function P2(t,i){var a=t;t=0;do{var r=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),r&&r.nodeType===8)if(a=r.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=r}while(a)}function W2(t,i,a){if(i=CSS.escape(i)!==i?"r-"+btoa(i).replace(/=/g,""):i,t.style.viewTransitionName=i,a!=null&&(t.style.viewTransitionClass=a),a=getComputedStyle(t),a.display==="inline"){if(i=t.getClientRects(),i.length===1)var r=1;else for(var u=r=0;u<i.length;u++){var f=i[u];0<f.width&&0<f.height&&r++}r===1&&(t=t.style,t.display=i.length===1?"inline-block":"block",t.marginTop="-"+a.paddingTop,t.marginBottom="-"+a.paddingBottom)}}function em(t,i){t=t.style,i=i.style;var a=i!=null?i.hasOwnProperty("viewTransitionName")?i.viewTransitionName:i.hasOwnProperty("view-transition-name")?i["view-transition-name"]:null:null;t.viewTransitionName=a==null||typeof a=="boolean"?"":(""+a).trim(),a=i!=null?i.hasOwnProperty("viewTransitionClass")?i.viewTransitionClass:i.hasOwnProperty("view-transition-class")?i["view-transition-class"]:null:null,t.viewTransitionClass=a==null||typeof a=="boolean"?"":(""+a).trim(),t.display==="inline-block"&&(i==null?t.display=t.margin="":(a=i.display,t.display=a==null||typeof a=="boolean"?"":a,a=i.margin,a!=null?t.margin=a:(a=i.hasOwnProperty("marginTop")?i.marginTop:i["margin-top"],t.marginTop=a==null||typeof a=="boolean"?"":a,i=i.hasOwnProperty("marginBottom")?i.marginBottom:i["margin-bottom"],t.marginBottom=i==null||typeof i=="boolean"?"":i)))}function I3(t,i,a){return a=a.ownerDocument.defaultView,{rect:t,abs:i.position==="absolute"||i.position==="fixed",clip:i.clipPath!=="none"||i.overflow!=="visible"||i.filter!=="none"||i.mask!=="none"||i.mask!=="none"||i.borderRadius!=="0px",view:0<=t.bottom&&0<=t.right&&t.top<=a.innerHeight&&t.left<=a.innerWidth}}function $d(t){var i=t.getBoundingClientRect(),a=getComputedStyle(t);return I3(i,a,t)}function J3(t){return t.documentElement.clientHeight}function F3(t){this.addEventListener("load",t),this.addEventListener("error",t)}function P3(t,i,a,r,u,f,x,A,q){var ne=i.nodeType===9?i:i.ownerDocument;try{var ue=ne.startViewTransition({update:function(){var W=ne.defaultView,se=W.navigation&&W.navigation.transition,_e=ne.fonts.status;r();var Ce=[];if(_e==="loaded"&&(J3(ne),ne.fonts.status==="loading"&&Ce.push(ne.fonts.ready)),_e=Ce.length,t!==null)for(var Ye=t.suspenseyImages,te=0,$=0;$<Ye.length;$++){var ae=Ye[$];if(!ae.complete){var he=ae.getBoundingClientRect();if(0<he.bottom&&0<he.right&&he.top<W.innerHeight&&he.left<W.innerWidth){if(te+=Sm(ae),te>ku){Ce.length=_e;break}ae=new Promise(F3.bind(ae)),Ce.push(ae)}}}if(0<Ce.length)return W=Promise.race([Promise.all(Ce),new Promise(function(Ne){return setTimeout(Ne,500)})]).then(u,u),(se?Promise.allSettled([se.finished,W]):W).then(f,f);if(u(),se)return se.finished.then(f,f);f()},types:a});ne.__reactViewTransition=ue;var ge=[];return ue.ready.then(function(){for(var W=ne.documentElement.getAnimations({subtree:!0}),se=0;se<W.length;se++){var _e=W[se],Ce=_e.effect,Ye=Ce.pseudoElement;if(Ye!=null&&Ye.startsWith("::view-transition")){ge.push(_e),_e=Ce.getKeyframes();for(var te=Ye=void 0,$=!0,ae=0;ae<_e.length;ae++){var he=_e[ae],Ne=he.width;if(Ye===void 0)Ye=Ne;else if(Ye!==Ne){$=!1;break}if(Ne=he.height,te===void 0)te=Ne;else if(te!==Ne){$=!1;break}delete he.width,delete he.height,he.transform==="none"&&delete he.transform}$&&Ye!==void 0&&te!==void 0&&(Ce.setKeyframes(_e),$=getComputedStyle(Ce.target,Ce.pseudoElement),$.width!==Ye||$.height!==te)&&($=_e[0],$.width=Ye,$.height=te,$=_e[_e.length-1],$.width=Ye,$.height=te,Ce.setKeyframes(_e))}}x()},function(W){ne.__reactViewTransition===ue&&(ne.__reactViewTransition=null);try{if(typeof W=="object"&&W!==null)switch(W.name){case"InvalidStateError":(W.message==="View transition was skipped because document visibility state is hidden."||W.message==="Skipping view transition because document visibility state has become hidden."||W.message==="Skipping view transition because viewport size changed."||W.message==="Transition was aborted because of invalid state")&&(W=null)}W!==null&&q(W)}finally{r(),u(),x()}}),ue.finished.finally(function(){for(var W=0;W<ge.length;W++)ge[W].cancel();ne.__reactViewTransition===ue&&(ne.__reactViewTransition=null),A()}),ue}catch{return r(),u(),x(),null}}function ka(t,i){this._scope=document.documentElement,this._selector="::view-transition-"+t+"("+i+")"}ka.prototype.animate=function(t,i){return i=typeof i=="number"?{duration:i}:R({},i),i.pseudoElement=this._selector,this._scope.animate(t,i)},ka.prototype.getAnimations=function(){for(var t=this._scope,i=this._selector,a=t.getAnimations({subtree:!0}),r=[],u=0;u<a.length;u++){var f=a[u].effect;f!==null&&f.target===t&&f.pseudoElement===i&&r.push(a[u])}return r},ka.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function tm(t){return{name:t,group:new ka("group",t),imagePair:new ka("image-pair",t),old:new ka("old",t),new:new ka("new",t)}}function Vn(t){this._fragmentFiber=t,this._observers=this._eventListeners=null}Vn.prototype.addEventListener=function(t,i,a){var r=null,u=null;if(!(a!=null&&typeof a!="boolean"&&(r=a.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var f=this._eventListeners;if(im(f,t,i,a)===-1){var x=this,A=i;a!=null&&typeof a!="boolean"&&a.once===!0&&(A=function(q){x.removeEventListener(t,i,a),typeof i=="function"?i.call(this,q):i.handleEvent(q)}),r!==null&&(u=x.removeEventListener.bind(x,t,i,a),r.addEventListener("abort",u,{once:!0}),u=r.removeEventListener.bind(r,"abort",u)),r=Lo(a),f.push({type:t,listener:i,optionsOrUseCapture:a,attachedListener:A,cleanup:u}),y(this._fragmentFiber.child,!1,W3,t,A,r)}this._eventListeners=f}};function W3(t,i,a,r){return _(t).addEventListener(i,a,r),!1}Vn.prototype.removeEventListener=function(t,i,a){var r=this._eventListeners;if(r!==null&&(i=im(r,t,i,a),i!==-1)){var u=r[i];a=u.attachedListener;var f=u.cleanup;u=Lo(u.optionsOrUseCapture),y(this._fragmentFiber.child,!1,eS,t,a,u),r.splice(i,1),f!==null&&f()}};function eS(t,i,a,r){return _(t).removeEventListener(i,a,r),!1}function Lo(t){return t!=null&&typeof t!="boolean"&&(t.once===!0||t.signal instanceof AbortSignal)?{capture:t.capture,passive:t.passive}:t}function nm(t){return t==null?"c=0":typeof t=="boolean"?"c="+(t?"1":"0"):"c="+(t.capture?"1":"0")}function im(t,i,a,r){if(t.length===0)return-1;r=nm(r);for(var u=0;u<t.length;u++){var f=t[u];if(f.type===i&&f.listener===a&&nm(f.optionsOrUseCapture)===r)return u}return-1}Vn.prototype.dispatchEvent=function(t){var i=v(this._fragmentFiber);if(i===null)return!0;i=_(i);var a=this._eventListeners;if(a!==null&&0<a.length||!t.bubbles){var r=i.nodeType===9?i.createComment(""):document.createTextNode("");if(a)for(var u=0;u<a.length;u++){var f=a[u];r.addEventListener(f.type,f.attachedListener,Lo(f.optionsOrUseCapture))}if(i.appendChild(r),t=r.dispatchEvent(t),a)for(u=0;u<a.length;u++)f=a[u],r.removeEventListener(f.type,f.attachedListener,Lo(f.optionsOrUseCapture));return i.removeChild(r),t}return i.dispatchEvent(t)},Vn.prototype.focus=function(t){y(this._fragmentFiber.child,!0,lm,t,void 0,void 0)};function lm(t,i){return t.tag===6?!1:(t=_(t),dS(t,i))}Vn.prototype.focusLast=function(t){var i=[];y(this._fragmentFiber.child,!0,Id,i,void 0,void 0);for(var a=i.length-1;0<=a&&!lm(i[a],t);a--);};function Id(t,i){return i.push(t),!1}Vn.prototype.blur=function(){var t=v(this._fragmentFiber);t!==null&&(t=_(t),t=Fr(t).activeElement,t!==null&&y(this._fragmentFiber.child,!1,tS,t,void 0,void 0))};function tS(t,i){return t.tag===6?!1:(t=_(t),t===i||t.contains(i)?(i.blur(),!0):!1)}Vn.prototype.observeUsing=function(t){this._observers===null&&(this._observers=new Set),this._observers.add(t),y(this._fragmentFiber.child,!1,nS,t,void 0,void 0)};function nS(t,i){return t.tag===6||(t=_(t),i.observe(t)),!1}Vn.prototype.unobserveUsing=function(t){var i=this._observers;if(i!==null&&i.has(t)){i.delete(t),y(this._fragmentFiber.child,!1,iS,t,void 0,void 0);for(var a=i=0;a<yi.length;a++){var r=yi[a];r.fragmentInstance===this&&r.observer===t?t.unobserve(r.instance):yi[i++]=r}yi.length=i}};function iS(t,i){return t.tag===6||(t=_(t),i.unobserve(t)),!1}var yi=[],Jd=!1;function lS(t,i,a){yi.push({fragmentInstance:t,observer:i,instance:a}),Jd||(Jd=!0,hS(function(){Jd=!1;var r=yi;yi=[];for(var u=0;u<r.length;u++){var f=r[u];f.observer.unobserve(f.instance)}}))}Vn.prototype.getClientRects=function(){var t=[];return y(this._fragmentFiber.child,!1,aS,t,void 0,void 0),t};function aS(t,i){if(t.tag===6){t=t.stateNode;var a=t.ownerDocument.createRange();a.selectNodeContents(t),i.push.apply(i,a.getClientRects())}else t=_(t),i.push.apply(i,t.getClientRects());return!1}Vn.prototype.getRootNode=function(t){var i=v(this._fragmentFiber);return i===null?this:_(i).getRootNode(t)},Vn.prototype.compareDocumentPosition=function(t){var i=v(this._fragmentFiber);if(i===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var a=[];y(this._fragmentFiber.child,!1,Id,a,void 0,void 0);var r=_(i);if(a.length===0){if(a=r,E(this._fragmentFiber)){e:{for(i=this._fragmentFiber.return;i!==null;){if(i.tag===4){i=i.stateNode.containerInfo;break e}if(i.tag===3||i.tag===5||i.tag===27)break;i=i.return}i=null}i!=null&&(a=i)}i=this._fragmentFiber;var u=r=a.compareDocumentPosition(t);return a===t?u=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(a=w(i)[1],a===null?u=Node.DOCUMENT_POSITION_PRECEDING:(t=_(a).compareDocumentPosition(t),u=t===0||t&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),u|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}i=_(a[0]),u=_(a[a.length-1]);var f=E(this._fragmentFiber)?i.parentElement:r;if(f==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=f.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY,f=f.compareDocumentPosition(u)&Node.DOCUMENT_POSITION_CONTAINED_BY;var x=i.compareDocumentPosition(t),A=u.compareDocumentPosition(t),q=x&Node.DOCUMENT_POSITION_CONTAINED_BY||A&Node.DOCUMENT_POSITION_CONTAINED_BY;return A=r&&f&&x&Node.DOCUMENT_POSITION_FOLLOWING&&A&Node.DOCUMENT_POSITION_PRECEDING,i=r&&i===t||f&&u===t||q||A?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&i===t||!f&&u===t?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:x,i&Node.DOCUMENT_POSITION_DISCONNECTED||i&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||oS(i,this._fragmentFiber,a[0],a[a.length-1],t)?i:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function oS(t,i,a,r,u){var f=jn(u);if(t&Node.DOCUMENT_POSITION_CONTAINED_BY){if(a=!!f)e:{for(;f!==null;){if(f.tag===7&&(f===i||f.alternate===i)){a=!0;break e}f=f.return}a=!1}return a}if(t&Node.DOCUMENT_POSITION_CONTAINS){if(f===null)return f=u.ownerDocument,u===f||u===f.documentElement||u===f.body;e:{for(f=i,i=v(i);f!==null;){if(!(f.tag!==5&&f.tag!==3&&f.tag!==27||f!==i&&f.alternate!==i)){f=!0;break e}f=f.return}f=!1}return f}return t&Node.DOCUMENT_POSITION_PRECEDING?((i=!!f)&&!(i=f===a)&&(i=L(a,f,T),i===null?i=!1:(y(i,!0,M,f,a),f=N,N=null,i=f!==null)),i):t&Node.DOCUMENT_POSITION_FOLLOWING?((i=!!f)&&!(i=f===r)&&(i=L(r,f,T),i===null?i=!1:(y(i,!0,S,f,r),f=N,C=N=null,i=f!==null)),i):!1}function am(t,i){var a=t.ownerDocument.createRange();a.selectNodeContents(t),t=a.getBoundingClientRect(),window.scrollTo(window.scrollX+t.left,i?window.scrollY+t.top:window.scrollY+t.bottom-window.innerHeight)}Vn.prototype.scrollIntoView=function(t){if(typeof t=="object")throw Error(o(566));var i=[];y(this._fragmentFiber.child,!1,Id,i,void 0,void 0);var a=t!==!1;if(i.length===0){var r=w(this._fragmentFiber);if(r=a?r[1]||r[0]||v(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){t=_(r),am(t,a);return}if(r=_(r),r.nodeType!==9){if(r.nodeType===11){a="host"in r?r.host:null,a!==null&&a.scrollIntoView(t);return}r.scrollIntoView(t)}}for(r=a?i.length-1:0;r!==(a?-1:i.length);){var u=i[r];u.tag===6?(u=_(u),am(u,a)):_(u).scrollIntoView(t),r+=a?-1:1}};function rS(t,i){return t=_(t),om(t,i),!1}function om(t,i){t.reactFragments==null&&(t.reactFragments=new Set),t.reactFragments.add(i)}function rm(t,i){var a=i._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var u=a[r];t.addEventListener(u.type,u.attachedListener,Lo(u.optionsOrUseCapture))}t.nodeType!==3&&(a=i._observers,a!==null&&a.forEach(function(f){for(var x=0,A=0;A<yi.length;A++){var q=yi[A];(q.fragmentInstance!==i||q.observer!==f||q.instance!==t)&&(yi[x++]=q)}yi.length=x,f.observe(t)}),om(t,i))}function sS(t,i){var a=i._eventListeners;if(a!==null)for(var r=0;r<a.length;r++){var u=a[r];t.removeEventListener(u.type,u.attachedListener,Lo(u.optionsOrUseCapture))}t.nodeType!==3&&(a=i._observers,a!==null&&a.forEach(function(f){typeof f.rootMargin=="string"?lS(i,f,t):f.unobserve(t)}),t.reactFragments!=null&&t.reactFragments.delete(i))}function Fd(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Fd(a),Ci(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function uS(t,i,a,r){for(;t.nodeType===1;){var u=a;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!r&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(r){if(!t[si])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(f=t.getAttribute("rel"),f==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(f!==u.rel||t.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||t.getAttribute("title")!==(u.title==null?null:u.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(f=t.getAttribute("src"),(f!==(u.src==null?null:u.src)||t.getAttribute("type")!==(u.type==null?null:u.type)||t.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&f&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var f=u.name==null?null:""+u.name;if(u.type==="hidden"&&t.getAttribute("name")===f)return t}else return t;if(t=ni(t.nextSibling),t===null)break}return null}function cS(t,i,a){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=ni(t.nextSibling),t===null))return null;return t}function sm(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=ni(t.nextSibling),t===null))return null;return t}function Pd(t){return t.data==="$?"||t.data==="$~"}function Wd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function fS(t,i){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||a.readyState!=="loading")i();else{var r=function(){i(),a.removeEventListener("DOMContentLoaded",r)};a.addEventListener("DOMContentLoaded",r),t._reactRetry=r}}function ni(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var eh=null;function um(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(i===0)return ni(t.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}t=t.nextSibling}return null}function cm(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return t;i--}else a!=="/$"&&a!=="/&"||i++}t=t.previousSibling}return null}function dS(t,i){function a(){r=!0}if(t.ownerDocument.activeElement===t)return!0;var r=!1;try{t.ownerDocument.addEventListener("focus",a,!0),(t.focus||HTMLElement.prototype.focus).call(t,i)}finally{t.ownerDocument.removeEventListener("focus",a,!0)}return r}function hS(t){J2(function(){J2(function(i){return t(i)})})}function fm(t,i,a){switch(i=Fr(a),t){case"html":if(t=i.documentElement,!t)throw Error(o(452));return t;case"head":if(t=i.head,!t)throw Error(o(453));return t;case"body":if(t=i.body,!t)throw Error(o(454));return t;default:throw Error(o(451))}}function dm(t,i,a){for(var r in a){var u=a[r];a.hasOwnProperty(r)&&u!=null&&Et(t,i,r,null,V3,u)}a.dangerouslySetInnerHTML!=null&&(t.textContent=""),t.onclick===Wt&&(t.onclick=null),Ci(t)}function th(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Ci(t)}var ii=new Map,hm=new Set;function Pr(t){if(typeof t.getRootNode=="function"){var i=t.getRootNode();if(i.nodeType===9||i.nodeType===11)return i}return t.nodeType===9?t:t.ownerDocument}var ml=ce.d;ce.d={f:gS,r:mS,D:pS,C:yS,L:vS,m:xS,X:SS,S:bS,M:_S};function gS(){var t=ml.f(),i=Ou();return t||i}function mS(t){var i=Qn(t);i!==null&&i.tag===5&&i.type==="form"?m1(i):ml.r(t)}var Uo=typeof document>"u"?null:document;function gm(t,i,a){var r=Uo;if(r&&typeof i=="string"&&i){var u=cn(i);u='link[rel="'+t+'"][href="'+u+'"]',typeof a=="string"&&(u+='[crossorigin="'+a+'"]'),hm.has(u)||(hm.add(u),t={rel:t,crossOrigin:a,href:i},r.querySelector(u)===null&&(i=r.createElement("link"),an(i,"link",t),Ot(i),r.head.appendChild(i)))}}function pS(t){ml.D(t),gm("dns-prefetch",t,null)}function yS(t,i){ml.C(t,i),gm("preconnect",t,i)}function vS(t,i,a){ml.L(t,i,a);var r=Uo;if(r&&t&&i){var u='link[rel="preload"][as="'+cn(i)+'"]';i==="image"&&a&&a.imageSrcSet?(u+='[imagesrcset="'+cn(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(u+='[imagesizes="'+cn(a.imageSizes)+'"]')):u+='[href="'+cn(t)+'"]';var f=u;switch(i){case"style":f=ko(t);break;case"script":f=Yo(t)}if(!(ii.has(f)||(t=R({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:t,as:i},a),ii.set(f,t),r.querySelector(u)!==null||i==="style"&&r.querySelector(Wr(f))||i==="script"&&r.querySelector(es(f))))){var x=r.createElement("link");an(x,"link",t),i==="style"&&(x[Ni]=!0,x.onload=x.onerror=function(){Tl(x)}),Ot(x),r.head.appendChild(x)}}}function xS(t,i){ml.m(t,i);var a=Uo;if(a&&t){var r=i&&typeof i.as=="string"?i.as:"script",u='link[rel="modulepreload"][as="'+cn(r)+'"][href="'+cn(t)+'"]',f=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":f=Yo(t)}if(!ii.has(f)&&(t=R({rel:"modulepreload",href:t},i),ii.set(f,t),a.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(es(f)))return}r=a.createElement("link"),an(r,"link",t),Ot(r),a.head.appendChild(r)}}}function bS(t,i,a){ml.S(t,i,a);var r=Uo;if(r&&t){var u=Kn(r).hoistableStyles,f=ko(t);i=i||"default";var x=u.get(f);if(!x){var A={loading:0,preload:null};if(x=r.querySelector(Wr(f)))A.loading=5;else{t=R({rel:"stylesheet",href:t,"data-precedence":i},a),(a=ii.get(f))&&nh(t,a);var q=x=r.createElement("link");Ot(q),an(q,"link",t),q._p=new Promise(function(ne,ue){q.onload=ne,q.onerror=ue}),q.addEventListener("load",function(){A.loading|=1}),q.addEventListener("error",function(){A.loading|=2}),A.loading|=4,Lu(x,i,r)}x={type:"stylesheet",instance:x,count:1,state:A},u.set(f,x)}}}function SS(t,i){ml.X(t,i);var a=Uo;if(a&&t){var r=Kn(a).hoistableScripts,u=Yo(t),f=r.get(u);f||(f=a.querySelector(es(u)),f||(t=R({src:t,async:!0},i),(i=ii.get(u))&&ih(t,i),f=a.createElement("script"),Ot(f),an(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function _S(t,i){ml.M(t,i);var a=Uo;if(a&&t){var r=Kn(a).hoistableScripts,u=Yo(t),f=r.get(u);f||(f=a.querySelector(es(u)),f||(t=R({src:t,async:!0,type:"module"},i),(i=ii.get(u))&&ih(t,i),f=a.createElement("script"),Ot(f),an(f,"link",t),a.head.appendChild(f)),f={type:"script",instance:f,count:1,state:null},r.set(u,f))}}function mm(t,i,a,r){var u=(u=je.current)?Pr(u):null;if(!u)throw Error(o(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(a=ko(a.href),i=Kn(u).hoistableStyles,r=i.get(a),r||(r={type:"style",instance:null,count:0,state:null},i.set(a,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=ko(a.href);var f=Kn(u).hoistableStyles,x=f.get(t);if(x||(u=u.ownerDocument||u,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},f.set(t,x),(f=u.querySelector(Wr(t)))?f._p||(x.instance=f,x.state.loading=5):(f=ii.get(t),f||(f={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},ii.set(t,f)),wS(u,t,f,x.state))),i&&r===null)throw Error(o(528,""));return x}if(i&&r!==null)throw Error(o(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(a=Yo(a),i=Kn(u).hoistableScripts,r=i.get(a),r||(r={type:"script",instance:null,count:0,state:null},i.set(a,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,t))}}function ko(t){return'href="'+cn(t)+'"'}function Wr(t){return'link[rel="stylesheet"]['+t+"]"}function pm(t){return R({},t,{"data-precedence":t.precedence,precedence:null})}function wS(t,i,a,r){if(i=t.querySelector('link[rel="preload"][as="style"]['+i+"]")){if(i[Ni]!==!0){r.loading=1;return}}else i=t.createElement("link"),i[Ni]=!0,i.onload=i.onerror=Tl.bind(null,i),an(i,"link",a),Ot(i),t.head.appendChild(i);r.preload=i,i.addEventListener("load",function(){return r.loading|=1}),i.addEventListener("error",function(){return r.loading|=2})}function Yo(t){return'[src="'+cn(t)+'"]'}function es(t){return"script[async]"+t}function ym(t,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var r=t.querySelector('style[data-href~="'+cn(a.href)+'"]');if(r)return i.instance=r,Ot(r),r;var u=R({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return r=(t.ownerDocument||t).createElement("style"),Ot(r),an(r,"style",u),Lu(r,a.precedence,t),i.instance=r;case"stylesheet":u=ko(a.href);var f=t.querySelector(Wr(u));if(f)return i.state.loading|=4,i.instance=f,Ot(f),f;r=pm(a),(u=ii.get(u))&&nh(r,u),f=(t.ownerDocument||t).createElement("link"),Ot(f);var x=f;return x._p=new Promise(function(A,q){x.onload=A,x.onerror=q}),an(f,"link",r),i.state.loading|=4,Lu(f,a.precedence,t),i.instance=f;case"script":return f=Yo(a.src),(u=t.querySelector(es(f)))?(i.instance=u,Ot(u),u):(r=a,(u=ii.get(f))&&(r=R({},a),ih(r,u)),t=t.ownerDocument||t,u=t.createElement("script"),Ot(u),an(u,"link",r),t.head.appendChild(u),i.instance=u);case"void":return null;default:throw Error(o(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(r=i.instance,i.state.loading|=4,Lu(r,a.precedence,t));return i.instance}function Lu(t,i,a){for(var r=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,f=u,x=0;x<r.length;x++){var A=r[x];if(A.dataset.precedence===i)f=A;else if(f!==u)break}f?f.parentNode.insertBefore(t,f.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(t,i.firstChild))}function nh(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function ih(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var Uu=null;function vm(t,i,a){if(Uu===null){var r=new Map,u=Uu=new Map;u.set(a,r)}else u=Uu,r=u.get(a),r||(r=new Map,u.set(a,r));if(r.has(t))return r;for(r.set(t,null),a=a.getElementsByTagName(t),u=0;u<a.length;u++){var f=a[u];if(!(f[si]||f[Rt]||t==="link"&&f.getAttribute("rel")==="stylesheet")&&f.namespaceURI!=="http://www.w3.org/2000/svg"){var x=f.getAttribute(i)||"";x=t+x;var A=r.get(x);A?A.push(f):r.set(x,[f])}}return r}function lh(t,i,a){t=t.ownerDocument||t,t.head.insertBefore(a,i==="title"?t.querySelector("head > title"):null)}function ES(t,i,a){if(a===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return t=i.disabled,typeof i.precedence=="string"&&t==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function xm(t,i){return t==="img"&&i.src!=null&&i.src!==""&&i.onLoad==null&&i.loading!=="lazy"}function bm(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Sm(t){return(t.width||100)*(t.height||100)*(typeof devicePixelRatio=="number"?devicePixelRatio:1)*.25}function _m(t,i){typeof i.decode=="function"&&(t.imgCount++,i.complete||(t.imgBytes+=Sm(i),t.suspenseyImages.push(i)),t=MS.bind(t),i.decode().then(t,t))}function NS(t,i,a,r){if(a.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var u=ko(r.href),f=i.querySelector(Wr(u));if(f){i=f._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=ts.bind(t),i.then(t,t)),a.state.loading|=4,a.instance=f,Ot(f);return}f=i.ownerDocument||i,r=pm(r),(u=ii.get(u))&&nh(r,u),f=f.createElement("link"),Ot(f);var x=f;x._p=new Promise(function(A,q){x.onload=A,x.onerror=q}),an(f,"link",r),a.instance=f}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=ts.bind(t),i.addEventListener("load",a),i.addEventListener("error",a))}}var ku=0;function CS(t,i){return t.stylesheets&&t.count===0&&qu(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var r=setTimeout(function(){if(t.stylesheets&&qu(t,t.stylesheets),t.unsuspend){var f=t.unsuspend;t.unsuspend=null,f()}},6e4+i);0<t.imgBytes&&ku===0&&(ku=62500*G3());var u=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&qu(t,t.stylesheets),t.unsuspend)){var f=t.unsuspend;t.unsuspend=null,f()}},(t.imgBytes>ku?50:800)+i);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function wm(t){if(t.count===0&&(t.imgCount===0||!t.waitingForImages)){if(t.stylesheets)qu(t,t.stylesheets);else if(t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}}}function ts(){this.count--,wm(this)}function MS(){this.imgCount--,wm(this)}var Yu=null;function qu(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,Yu=new Map,i.forEach(TS,t),Yu=null,ts.call(t))}function TS(t,i){if(!(i.state.loading&4)){var a=Yu.get(t);if(a)var r=a.get(null);else{a=new Map,Yu.set(t,a);for(var u=t.querySelectorAll("link[data-precedence],style[data-precedence]"),f=0;f<u.length;f++){var x=u[f];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(a.set(x.dataset.precedence,x),r=x)}r&&a.set(null,r)}u=i.instance,x=u.getAttribute("data-precedence"),f=a.get(x)||r,f===r&&a.set(null,u),a.set(x,u),this.count++,r=ts.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),f?f.parentNode.insertBefore(u,f.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(u,t.firstChild)),i.state.loading|=4}}var qo={$$typeof:X,Provider:null,Consumer:null,_currentValue:me,_currentValue2:me,_threadCount:0};function AS(t,i,a,r,u,f,x,A,q){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fi(0),this.hiddenUpdates=Fi(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=f,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=q,this.transitionTypes=null,this.incompleteTransitions=new Map}function Em(t,i,a,r,u,f,x,A,q,ne,ue,ge){return t=new AS(t,i,a,x,q,ne,ue,ge,A),i=1,f===!0&&(i|=24),f=Cn(3,null,null,i),t.current=f,f.stateNode=t,i=xf(),i.refCount++,t.pooledCache=i,i.refCount++,f.memoizedState={element:r,isDehydrated:a,cache:i},wf(f),t}function Nm(t){return t?(t=ho,t):ho}function Cm(t,i,a,r,u,f){u=Nm(u),r.context===null?r.context=u:r.pendingContext=u,r=ql(i),r.payload={element:a},f=f===void 0?null:f,f!==null&&(r.callback=f),a=Vl(t,r,i),a!==null&&(On(a,t,i),Rr(a,t,i))}function Mm(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<i?a:i}}function ah(t,i){Mm(t,i),(t=t.alternate)&&Mm(t,i)}function Tm(t){if(t.tag===13||t.tag===31){var i=_a(t,67108864);i!==null&&On(i,t,67108864),ah(t,67108864)}}function Am(t){if(t.tag===13||t.tag===31){var i=qn();i=Pi(i);var a=_a(t,i);a!==null&&On(a,t,i),ah(t,i)}}var Vo=!0;function OS(t,i,a,r){var u=le.T;le.T=null;var f=ce.p;try{ce.p=2,oh(t,i,a,r)}finally{ce.p=f,le.T=u}}function zS(t,i,a,r){var u=le.T;le.T=null;var f=ce.p;try{ce.p=8,oh(t,i,a,r)}finally{ce.p=f,le.T=u}}function oh(t,i,a,r){if(Vo){var u=rh(r);if(u===null)qd(t,i,r,Vu,a),zm(t,r);else if(DS(u,t,i,a,r))r.stopPropagation();else if(zm(t,r),i&4&&-1<RS.indexOf(t)){for(;u!==null;){var f=Qn(u);if(f!==null)switch(f.tag){case 3:if(f=f.stateNode,f.current.memoizedState.isDehydrated){var x=gn(f.pendingLanes);if(x!==0){var A=f;for(A.pendingLanes|=2,A.entangledLanes|=2;x;){var q=1<<31-ht(x);A.entanglements[1]|=q,x&=~q}Xi(f),(xt&6)===0&&(Mu=Xe()+500,$r(0))}}break;case 31:case 13:A=_a(f,2),A!==null&&On(A,f,2),Ou(),ah(f,2)}if(f=rh(r),f===null&&qd(t,i,r,Vu,a),f===u)break;u=f}u!==null&&r.stopPropagation()}else qd(t,i,r,null,a)}}function rh(t){return t=Oi(t),sh(t)}var Vu=null;function sh(t){if(Vu=null,t=jn(t),t!==null){var i=c(t);if(i===null)t=null;else{var a=i.tag;if(a===13){if(t=d(i),t!==null)return t;t=null}else if(a===31){if(t=h(i),t!==null)return t;t=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return Vu=t,null}function Om(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"fullscreenerror":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"resize":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Mt()){case ye:return 2;case Re:return 8;case Ae:case Fe:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var uh=!1,ea=null,ta=null,na=null,ns=new Map,is=new Map,ia=[],RS="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function zm(t,i){switch(t){case"focusin":case"focusout":ea=null;break;case"dragenter":case"dragleave":ta=null;break;case"mouseover":case"mouseout":na=null;break;case"pointerover":case"pointerout":ns.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":is.delete(i.pointerId)}}function ls(t,i,a,r,u,f){return t===null||t.nativeEvent!==f?(t={blockedOn:i,domEventName:a,eventSystemFlags:r,nativeEvent:f,targetContainers:[u]},i!==null&&(i=Qn(i),i!==null&&Tm(i)),t):(t.eventSystemFlags|=r,i=t.targetContainers,u!==null&&i.indexOf(u)===-1&&i.push(u),t)}function DS(t,i,a,r,u){switch(i){case"focusin":return ea=ls(ea,t,i,a,r,u),!0;case"dragenter":return ta=ls(ta,t,i,a,r,u),!0;case"mouseover":return na=ls(na,t,i,a,r,u),!0;case"pointerover":var f=u.pointerId;return ns.set(f,ls(ns.get(f)||null,t,i,a,r,u)),!0;case"gotpointercapture":return f=u.pointerId,is.set(f,ls(is.get(f)||null,t,i,a,r,u)),!0}return!1}function Rm(t){var i=jn(t.target);if(i!==null){var a=c(i);if(a!==null){if(i=a.tag,i===13){if(i=d(a),i!==null){t.blockedOn=i,Nl(t.priority,function(){Am(a)});return}}else if(i===31){if(i=h(a),i!==null){t.blockedOn=i,Nl(t.priority,function(){Am(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Xu(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var a=rh(t.nativeEvent);if(a===null){a=t.nativeEvent;var r=new a.constructor(a.type,a);xa=r,a.target.dispatchEvent(r),xa=null}else return i=Qn(a),i!==null&&Tm(i),t.blockedOn=a,!1;i.shift()}return!0}function Dm(t,i,a){Xu(t)&&a.delete(i)}function jS(){uh=!1,ea!==null&&Xu(ea)&&(ea=null),ta!==null&&Xu(ta)&&(ta=null),na!==null&&Xu(na)&&(na=null),ns.forEach(Dm),is.forEach(Dm)}function Gu(t,i){t.blockedOn===i&&(t.blockedOn=null,uh||(uh=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,jS)))}var Zu=null;function jm(t){Zu!==t&&(Zu=t,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){Zu===t&&(Zu=null);for(var i=0;i<t.length;i+=3){var a=t[i],r=t[i+1],u=t[i+2];if(typeof r!="function"){if(sh(r||a)===null)continue;break}var f=Qn(a);f!==null&&(t.splice(i,3),i-=3,Gf(f,{pending:!0,data:u,method:a.method,action:r},r,u))}}))}function Xo(t){function i(q){return Gu(q,t)}ea!==null&&Gu(ea,t),ta!==null&&Gu(ta,t),na!==null&&Gu(na,t),ns.forEach(i),is.forEach(i);for(var a=0;a<ia.length;a++){var r=ia[a];r.blockedOn===t&&(r.blockedOn=null)}for(;0<ia.length&&(a=ia[0],a.blockedOn===null);)Rm(a),a.blockedOn===null&&ia.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(r=0;r<a.length;r+=3){var u=a[r],f=a[r+1],x=u[Lt]||null;if(typeof f=="function")x||jm(a);else if(x){var A=null;if(f&&f.hasAttribute("formAction")){if(u=f,x=f[Lt]||null)A=x.formAction;else if(sh(u)!==null)continue}else A=x.action;typeof A=="function"?a[r+1]=A:(a.splice(r,3),r-=3),jm(a)}}}function Hm(){function t(f){f.canIntercept&&f.info==="react-transition"&&f.intercept({handler:function(){return new Promise(function(x){return u=x})},focusReset:"manual",scroll:"manual"})}function i(){u!==null&&(u(),u=null),r||setTimeout(a,20)}function a(){if(!r&&!navigation.transition){var f=navigation.currentEntry;f&&f.url!=null&&navigation.navigate(f.url,{state:f.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){r=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),u!==null&&(u(),u=null)}}}function ch(t){this._internalRoot=t}Qu.prototype.render=ch.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(o(409));var a=i.current,r=qn();Cm(a,r,t,i,null,null)},Qu.prototype.unmount=ch.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;Cm(t.current,2,null,t,null,null),Ou(),i[Zn]=null}};function Qu(t){this._internalRoot=t}Qu.prototype.unstable_scheduleHydration=function(t){if(t){var i=El();t={blockedOn:null,target:t,priority:i};for(var a=0;a<ia.length&&i!==0&&i<ia[a].priority;a++);ia.splice(a,0,t),a===0&&Rm(t)}};var Bm=e.version;if(Bm!=="19.3.1")throw Error(o(527,Bm,"19.3.1"));ce.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(o(188)):(t=Object.keys(t).join(","),Error(o(268,t)));return t=m(i),t=t!==null?p(t):null,t=t===null?null:t.stateNode,t};var HS={bundleType:0,version:"19.3.1",rendererPackageName:"react-dom",currentDispatcherRef:le,reconcilerVersion:"19.3.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{vt=Ku.inject(HS),Ze=Ku}catch{}}return os.createRoot=function(t,i){if(!s(t))throw Error(o(299));var a=!1,r="",u=N1,f=C1,x=M1;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(u=i.onUncaughtError),i.onCaughtError!==void 0&&(f=i.onCaughtError),i.onRecoverableError!==void 0&&(x=i.onRecoverableError)),i=Em(t,1,!1,null,null,a,r,null,u,f,x,Hm),t[Zn]=i.current,Yd(t),new ch(i)},os.hydrateRoot=function(t,i,a){if(!s(t))throw Error(o(299));var r=!1,u="",f=N1,x=C1,A=M1,q=null;return a!=null&&(a.unstable_strictMode===!0&&(r=!0),a.identifierPrefix!==void 0&&(u=a.identifierPrefix),a.onUncaughtError!==void 0&&(f=a.onUncaughtError),a.onCaughtError!==void 0&&(x=a.onCaughtError),a.onRecoverableError!==void 0&&(A=a.onRecoverableError),a.formState!==void 0&&(q=a.formState)),i=Em(t,1,!0,i,a??null,r,u,q,f,x,A,Hm),i.context=Nm(null),a=i.current,r=qn(),r=Pi(r),u=ql(r),u.callback=null,Vl(a,u,r),a=r,i.current.lanes=a,ri(i,a),Xi(i),t[Zn]=i.current,Yd(t),new Qu(i)},os.version="19.3.1",os}var Qm;function GS(){if(Qm)return hh.exports;Qm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),hh.exports=XS(),hh.exports}var ZS=GS();const QS=My(ZS);/**
50
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
51
+ *
52
+ * This source code is licensed under the MIT license found in the
53
+ * LICENSE file in the root directory of this source tree.
54
+ *
55
+ * @lightSyntaxTransform
56
+ * @noflow
57
+ * @nolint
58
+ * @preventMunge
59
+ * @preserve-invariant-messages
60
+ */var yh,Km;function KS(){if(Km)return yh;Km=1;var n=Object.create,e=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,s=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty,d=(U,Q)=>{for(var P in Q)e(U,P,{get:Q[P],enumerable:!0})},h=(U,Q,P,re)=>{if(Q&&typeof Q=="object"||typeof Q=="function")for(let fe of o(Q))!c.call(U,fe)&&fe!==P&&e(U,fe,{get:()=>Q[fe],enumerable:!(re=l(Q,fe))||re.enumerable});return U},g=(U,Q,P)=>(P=U!=null?n(s(U)):{},h(!U||!U.__esModule?e(P,"default",{value:U,enumerable:!0}):P,U)),m=U=>h(e({},"__esModule",{value:!0}),U),p={};d(p,{$dispatcherGuard:()=>H,$makeReadOnly:()=>Y,$reset:()=>z,$structuralCheck:()=>k,c:()=>M,clearRenderCounterRegistry:()=>I,renderCounterRegistry:()=>Z,useRenderCounter:()=>X}),yh=m(p);var y=g(zc()),{useRef:v,useEffect:E,isValidElement:w}=y,b,_=(b=y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE)!=null?b:y.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,N=Symbol.for("react.memo_cache_sentinel"),C,M=typeof((C=y.__COMPILER_RUNTIME)==null?void 0:C.c)=="function"?y.__COMPILER_RUNTIME.c:function(Q){return y.useMemo(()=>{const P=new Array(Q);for(let re=0;re<Q;re++)P[re]=N;return P[N]=!0,P},[])},S={};["readContext","useCallback","useContext","useEffect","useImperativeHandle","useInsertionEffect","useLayoutEffect","useMemo","useReducer","useRef","useState","useDebugValue","useDeferredValue","useTransition","useMutableSource","useSyncExternalStore","useId","unstable_isNewReconciler","getCacheSignal","getCacheForType","useCacheRefresh"].forEach(U=>{S[U]=()=>{throw new Error(`[React] Unexpected React hook call (${U}) from a React compiled function. Check that all hooks are called directly and named according to convention ('use[A-Z]') `)}});var T=null;S.useMemoCache=U=>{if(T==null)throw new Error("React Compiler internal invariant violation: unexpected null dispatcher");return T.useMemoCache(U)};function L(U){return _.ReactCurrentDispatcher.current=U,_.ReactCurrentDispatcher.current}var R=[];function H(U){const Q=_.ReactCurrentDispatcher.current;if(U===0){if(R.push(Q),R.length===1&&(T=Q),Q===S)throw new Error("[React] Unexpected call to custom hook or component from a React compiled function. Check that (1) all hooks are called directly and named according to convention ('use[A-Z]') and (2) components are returned as JSX instead of being directly invoked.");L(S)}else if(U===1){const P=R.pop();if(P==null)throw new Error("React Compiler internal error: unexpected null in guard stack");R.length===0&&(T=null),L(P)}else if(U===2)R.push(Q),L(T);else if(U===3){const P=R.pop();if(P==null)throw new Error("React Compiler internal error: unexpected null in guard stack");L(P)}else throw new Error("React Compiler internal error: unreachable block"+U)}function z(U){for(let Q=0;Q<U.length;Q++)U[Q]=N}function Y(){throw new Error("TODO: implement $makeReadOnly in react-compiler-runtime")}var Z=new Map;function I(){for(const U of Z.values())U.forEach(Q=>{Q.count=0})}function G(U,Q){let P=Z.get(U);P==null&&(P=new Set,Z.set(U,P)),P.add(Q)}function j(U,Q){const P=Z.get(U);P!=null&&P.delete(Q)}function X(U){const Q=v(null);Q.current!=null&&(Q.current.count+=1),E(()=>{if(Q.current==null){const P={count:0};G(U,P),Q.current=P}return()=>{Q.current!==null&&j(U,Q.current)}})}var B=new Set;function k(U,Q,P,re,fe,oe){function O(K,J,ee,ie){const le=`${re}:${oe} [${fe}] ${P}${ee} changed from ${K} to ${J} at depth ${ie}`;B.has(le)||(B.add(le),console.error(le))}const V=2;function F(K,J,ee,ie){if(!(ie>V)){if(K===J)return;if(typeof K!=typeof J)O(`type ${typeof K}`,`type ${typeof J}`,ee,ie);else if(typeof K=="object"){const le=Array.isArray(K),ce=Array.isArray(J);if(K===null&&J!==null)O("null",`type ${typeof J}`,ee,ie);else if(J===null)O(`type ${typeof K}`,"null",ee,ie);else if(K instanceof Map)if(!(J instanceof Map))O("Map instance","other value",ee,ie);else if(K.size!==J.size)O(`Map instance with size ${K.size}`,`Map instance with size ${J.size}`,ee,ie);else for(const[me,ve]of K)J.has(me)?F(ve,J.get(me),`${ee}.get(${me})`,ie+1):O(`Map instance with key ${me}`,`Map instance without key ${me}`,ee,ie);else if(J instanceof Map)O("other value","Map instance",ee,ie);else if(K instanceof Set)if(!(J instanceof Set))O("Set instance","other value",ee,ie);else if(K.size!==J.size)O(`Set instance with size ${K.size}`,`Set instance with size ${J.size}`,ee,ie);else for(const me of J)K.has(me)||O(`Set instance without element ${me}`,`Set instance with element ${me}`,ee,ie);else if(J instanceof Set)O("other value","Set instance",ee,ie);else if(le||ce)if(le!==ce)O(`type ${le?"array":"object"}`,`type ${ce?"array":"object"}`,ee,ie);else if(K.length!==J.length)O(`array with length ${K.length}`,`array with length ${J.length}`,ee,ie);else for(let me=0;me<K.length;me++)F(K[me],J[me],`${ee}[${me}]`,ie+1);else if(w(K)||w(J))w(K)!==w(J)?O(`type ${w(K)?"React element":"object"}`,`type ${w(J)?"React element":"object"}`,ee,ie):K.type!==J.type?O(`React element of type ${K.type}`,`React element of type ${J.type}`,ee,ie):F(K.props,J.props,`[props of ${ee}]`,ie+1);else{for(const me in J)me in K||O(`object without key ${me}`,`object with key ${me}`,ee,ie);for(const me in K)me in J?F(K[me],J[me],`${ee}.${me}`,ie+1):O(`object with key ${me}`,`object without key ${me}`,ee,ie)}}else{if(typeof K=="function")return;isNaN(K)||isNaN(J)?isNaN(K)!==isNaN(J)&&O(`${isNaN(K)?"NaN":"non-NaN value"}`,`${isNaN(J)?"NaN":"non-NaN value"}`,ee,ie):K!==J&&O(K,J,ee,ie)}}}F(U,Q,"",0)}return yh}var we=KS();function Gt(n){if(typeof n=="string"||typeof n=="number")return""+n;let e="";if(Array.isArray(n))for(let l=0,o;l<n.length;l++)(o=Gt(n[l]))!==""&&(e+=(e&&" ")+o);else for(let l in n)n[l]&&(e+=(e&&" ")+l);return e}var $S={value:()=>{}};function Ms(){for(var n=0,e=arguments.length,l={},o;n<e;++n){if(!(o=arguments[n]+"")||o in l||/[\s.]/.test(o))throw new Error("illegal type: "+o);l[o]=[]}return new ac(l)}function ac(n){this._=n}function IS(n,e){return n.trim().split(/^|\s+/).map(function(l){var o="",s=l.indexOf(".");if(s>=0&&(o=l.slice(s+1),l=l.slice(0,s)),l&&!e.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:o}})}ac.prototype=Ms.prototype={constructor:ac,on:function(n,e){var l=this._,o=IS(n+"",l),s,c=-1,d=o.length;if(arguments.length<2){for(;++c<d;)if((s=(n=o[c]).type)&&(s=JS(l[s],n.name)))return s;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++c<d;)if(s=(n=o[c]).type)l[s]=$m(l[s],n.name,e);else if(e==null)for(s in l)l[s]=$m(l[s],n.name,null);return this},copy:function(){var n={},e=this._;for(var l in e)n[l]=e[l].slice();return new ac(n)},call:function(n,e){if((s=arguments.length-2)>0)for(var l=new Array(s),o=0,s,c;o<s;++o)l[o]=arguments[o+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(c=this._[n],o=0,s=c.length;o<s;++o)c[o].value.apply(e,l)},apply:function(n,e,l){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var o=this._[n],s=0,c=o.length;s<c;++s)o[s].value.apply(e,l)}};function JS(n,e){for(var l=0,o=n.length,s;l<o;++l)if((s=n[l]).name===e)return s.value}function $m(n,e,l){for(var o=0,s=n.length;o<s;++o)if(n[o].name===e){n[o]=$S,n=n.slice(0,o).concat(n.slice(o+1));break}return l!=null&&n.push({name:e,value:l}),n}var kh="http://www.w3.org/1999/xhtml",Im={svg:"http://www.w3.org/2000/svg",xhtml:kh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Rc(n){var e=n+="",l=e.indexOf(":");return l>=0&&(e=n.slice(0,l))!=="xmlns"&&(n=n.slice(l+1)),Im.hasOwnProperty(e)?{space:Im[e],local:n}:n}function FS(n){return function(){var e=this.ownerDocument,l=this.namespaceURI;return l===kh&&e.documentElement.namespaceURI===kh?e.createElement(n):e.createElementNS(l,n)}}function PS(n){return function(){return this.ownerDocument.createElementNS(n.space,n.local)}}function Ay(n){var e=Rc(n);return(e.local?PS:FS)(e)}function WS(){}function c0(n){return n==null?WS:function(){return this.querySelector(n)}}function e4(n){typeof n!="function"&&(n=c0(n));for(var e=this._groups,l=e.length,o=new Array(l),s=0;s<l;++s)for(var c=e[s],d=c.length,h=o[s]=new Array(d),g,m,p=0;p<d;++p)(g=c[p])&&(m=n.call(g,g.__data__,p,c))&&("__data__"in g&&(m.__data__=g.__data__),h[p]=m);return new Gn(o,this._parents)}function t4(n){return n==null?[]:Array.isArray(n)?n:Array.from(n)}function n4(){return[]}function Oy(n){return n==null?n4:function(){return this.querySelectorAll(n)}}function i4(n){return function(){return t4(n.apply(this,arguments))}}function l4(n){typeof n=="function"?n=i4(n):n=Oy(n);for(var e=this._groups,l=e.length,o=[],s=[],c=0;c<l;++c)for(var d=e[c],h=d.length,g,m=0;m<h;++m)(g=d[m])&&(o.push(n.call(g,g.__data__,m,d)),s.push(g));return new Gn(o,s)}function zy(n){return function(){return this.matches(n)}}function Ry(n){return function(e){return e.matches(n)}}var a4=Array.prototype.find;function o4(n){return function(){return a4.call(this.children,n)}}function r4(){return this.firstElementChild}function s4(n){return this.select(n==null?r4:o4(typeof n=="function"?n:Ry(n)))}var u4=Array.prototype.filter;function c4(){return Array.from(this.children)}function f4(n){return function(){return u4.call(this.children,n)}}function d4(n){return this.selectAll(n==null?c4:f4(typeof n=="function"?n:Ry(n)))}function h4(n){typeof n!="function"&&(n=zy(n));for(var e=this._groups,l=e.length,o=new Array(l),s=0;s<l;++s)for(var c=e[s],d=c.length,h=o[s]=[],g,m=0;m<d;++m)(g=c[m])&&n.call(g,g.__data__,m,c)&&h.push(g);return new Gn(o,this._parents)}function Dy(n){return new Array(n.length)}function g4(){return new Gn(this._enter||this._groups.map(Dy),this._parents)}function yc(n,e){this.ownerDocument=n.ownerDocument,this.namespaceURI=n.namespaceURI,this._next=null,this._parent=n,this.__data__=e}yc.prototype={constructor:yc,appendChild:function(n){return this._parent.insertBefore(n,this._next)},insertBefore:function(n,e){return this._parent.insertBefore(n,e)},querySelector:function(n){return this._parent.querySelector(n)},querySelectorAll:function(n){return this._parent.querySelectorAll(n)}};function m4(n){return function(){return n}}function p4(n,e,l,o,s,c){for(var d=0,h,g=e.length,m=c.length;d<m;++d)(h=e[d])?(h.__data__=c[d],o[d]=h):l[d]=new yc(n,c[d]);for(;d<g;++d)(h=e[d])&&(s[d]=h)}function y4(n,e,l,o,s,c,d){var h,g,m=new Map,p=e.length,y=c.length,v=new Array(p),E;for(h=0;h<p;++h)(g=e[h])&&(v[h]=E=d.call(g,g.__data__,h,e)+"",m.has(E)?s[h]=g:m.set(E,g));for(h=0;h<y;++h)E=d.call(n,c[h],h,c)+"",(g=m.get(E))?(o[h]=g,g.__data__=c[h],m.delete(E)):l[h]=new yc(n,c[h]);for(h=0;h<p;++h)(g=e[h])&&m.get(v[h])===g&&(s[h]=g)}function v4(n){return n.__data__}function x4(n,e){if(!arguments.length)return Array.from(this,v4);var l=e?y4:p4,o=this._parents,s=this._groups;typeof n!="function"&&(n=m4(n));for(var c=s.length,d=new Array(c),h=new Array(c),g=new Array(c),m=0;m<c;++m){var p=o[m],y=s[m],v=y.length,E=b4(n.call(p,p&&p.__data__,m,o)),w=E.length,b=h[m]=new Array(w),_=d[m]=new Array(w),N=g[m]=new Array(v);l(p,y,b,_,N,E,e);for(var C=0,M=0,S,T;C<w;++C)if(S=b[C]){for(C>=M&&(M=C+1);!(T=_[M])&&++M<w;);S._next=T||null}}return d=new Gn(d,o),d._enter=h,d._exit=g,d}function b4(n){return typeof n=="object"&&"length"in n?n:Array.from(n)}function S4(){return new Gn(this._exit||this._groups.map(Dy),this._parents)}function _4(n,e,l){var o=this.enter(),s=this,c=this.exit();return typeof n=="function"?(o=n(o),o&&(o=o.selection())):o=o.append(n+""),e!=null&&(s=e(s),s&&(s=s.selection())),l==null?c.remove():l(c),o&&s?o.merge(s).order():s}function w4(n){for(var e=n.selection?n.selection():n,l=this._groups,o=e._groups,s=l.length,c=o.length,d=Math.min(s,c),h=new Array(s),g=0;g<d;++g)for(var m=l[g],p=o[g],y=m.length,v=h[g]=new Array(y),E,w=0;w<y;++w)(E=m[w]||p[w])&&(v[w]=E);for(;g<s;++g)h[g]=l[g];return new Gn(h,this._parents)}function E4(){for(var n=this._groups,e=-1,l=n.length;++e<l;)for(var o=n[e],s=o.length-1,c=o[s],d;--s>=0;)(d=o[s])&&(c&&d.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(d,c),c=d);return this}function N4(n){n||(n=C4);function e(y,v){return y&&v?n(y.__data__,v.__data__):!y-!v}for(var l=this._groups,o=l.length,s=new Array(o),c=0;c<o;++c){for(var d=l[c],h=d.length,g=s[c]=new Array(h),m,p=0;p<h;++p)(m=d[p])&&(g[p]=m);g.sort(e)}return new Gn(s,this._parents).order()}function C4(n,e){return n<e?-1:n>e?1:n>=e?0:NaN}function M4(){var n=arguments[0];return arguments[0]=this,n.apply(null,arguments),this}function T4(){return Array.from(this)}function A4(){for(var n=this._groups,e=0,l=n.length;e<l;++e)for(var o=n[e],s=0,c=o.length;s<c;++s){var d=o[s];if(d)return d}return null}function O4(){let n=0;for(const e of this)++n;return n}function z4(){return!this.node()}function R4(n){for(var e=this._groups,l=0,o=e.length;l<o;++l)for(var s=e[l],c=0,d=s.length,h;c<d;++c)(h=s[c])&&n.call(h,h.__data__,c,s);return this}function D4(n){return function(){this.removeAttribute(n)}}function j4(n){return function(){this.removeAttributeNS(n.space,n.local)}}function H4(n,e){return function(){this.setAttribute(n,e)}}function B4(n,e){return function(){this.setAttributeNS(n.space,n.local,e)}}function L4(n,e){return function(){var l=e.apply(this,arguments);l==null?this.removeAttribute(n):this.setAttribute(n,l)}}function U4(n,e){return function(){var l=e.apply(this,arguments);l==null?this.removeAttributeNS(n.space,n.local):this.setAttributeNS(n.space,n.local,l)}}function k4(n,e){var l=Rc(n);if(arguments.length<2){var o=this.node();return l.local?o.getAttributeNS(l.space,l.local):o.getAttribute(l)}return this.each((e==null?l.local?j4:D4:typeof e=="function"?l.local?U4:L4:l.local?B4:H4)(l,e))}function jy(n){return n.ownerDocument&&n.ownerDocument.defaultView||n.document&&n||n.defaultView}function Y4(n){return function(){this.style.removeProperty(n)}}function q4(n,e,l){return function(){this.style.setProperty(n,e,l)}}function V4(n,e,l){return function(){var o=e.apply(this,arguments);o==null?this.style.removeProperty(n):this.style.setProperty(n,o,l)}}function X4(n,e,l){return arguments.length>1?this.each((e==null?Y4:typeof e=="function"?V4:q4)(n,e,l??"")):Wo(this.node(),n)}function Wo(n,e){return n.style.getPropertyValue(e)||jy(n).getComputedStyle(n,null).getPropertyValue(e)}function G4(n){return function(){delete this[n]}}function Z4(n,e){return function(){this[n]=e}}function Q4(n,e){return function(){var l=e.apply(this,arguments);l==null?delete this[n]:this[n]=l}}function K4(n,e){return arguments.length>1?this.each((e==null?G4:typeof e=="function"?Q4:Z4)(n,e)):this.node()[n]}function Hy(n){return n.trim().split(/^|\s+/)}function f0(n){return n.classList||new By(n)}function By(n){this._node=n,this._names=Hy(n.getAttribute("class")||"")}By.prototype={add:function(n){var e=this._names.indexOf(n);e<0&&(this._names.push(n),this._node.setAttribute("class",this._names.join(" ")))},remove:function(n){var e=this._names.indexOf(n);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(n){return this._names.indexOf(n)>=0}};function Ly(n,e){for(var l=f0(n),o=-1,s=e.length;++o<s;)l.add(e[o])}function Uy(n,e){for(var l=f0(n),o=-1,s=e.length;++o<s;)l.remove(e[o])}function $4(n){return function(){Ly(this,n)}}function I4(n){return function(){Uy(this,n)}}function J4(n,e){return function(){(e.apply(this,arguments)?Ly:Uy)(this,n)}}function F4(n,e){var l=Hy(n+"");if(arguments.length<2){for(var o=f0(this.node()),s=-1,c=l.length;++s<c;)if(!o.contains(l[s]))return!1;return!0}return this.each((typeof e=="function"?J4:e?$4:I4)(l,e))}function P4(){this.textContent=""}function W4(n){return function(){this.textContent=n}}function e_(n){return function(){var e=n.apply(this,arguments);this.textContent=e??""}}function t_(n){return arguments.length?this.each(n==null?P4:(typeof n=="function"?e_:W4)(n)):this.node().textContent}function n_(){this.innerHTML=""}function i_(n){return function(){this.innerHTML=n}}function l_(n){return function(){var e=n.apply(this,arguments);this.innerHTML=e??""}}function a_(n){return arguments.length?this.each(n==null?n_:(typeof n=="function"?l_:i_)(n)):this.node().innerHTML}function o_(){this.nextSibling&&this.parentNode.appendChild(this)}function r_(){return this.each(o_)}function s_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function u_(){return this.each(s_)}function c_(n){var e=typeof n=="function"?n:Ay(n);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function f_(){return null}function d_(n,e){var l=typeof n=="function"?n:Ay(n),o=e==null?f_:typeof e=="function"?e:c0(e);return this.select(function(){return this.insertBefore(l.apply(this,arguments),o.apply(this,arguments)||null)})}function h_(){var n=this.parentNode;n&&n.removeChild(this)}function g_(){return this.each(h_)}function m_(){var n=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function p_(){var n=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(n,this.nextSibling):n}function y_(n){return this.select(n?p_:m_)}function v_(n){return arguments.length?this.property("__data__",n):this.node().__data__}function x_(n){return function(e){n.call(this,e,this.__data__)}}function b_(n){return n.trim().split(/^|\s+/).map(function(e){var l="",o=e.indexOf(".");return o>=0&&(l=e.slice(o+1),e=e.slice(0,o)),{type:e,name:l}})}function S_(n){return function(){var e=this.__on;if(e){for(var l=0,o=-1,s=e.length,c;l<s;++l)c=e[l],(!n.type||c.type===n.type)&&c.name===n.name?this.removeEventListener(c.type,c.listener,c.options):e[++o]=c;++o?e.length=o:delete this.__on}}}function __(n,e,l){return function(){var o=this.__on,s,c=x_(e);if(o){for(var d=0,h=o.length;d<h;++d)if((s=o[d]).type===n.type&&s.name===n.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=c,s.options=l),s.value=e;return}}this.addEventListener(n.type,c,l),s={type:n.type,name:n.name,value:e,listener:c,options:l},o?o.push(s):this.__on=[s]}}function w_(n,e,l){var o=b_(n+""),s,c=o.length,d;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,m=h.length,p;g<m;++g)for(s=0,p=h[g];s<c;++s)if((d=o[s]).type===p.type&&d.name===p.name)return p.value}return}for(h=e?__:S_,s=0;s<c;++s)this.each(h(o[s],e,l));return this}function ky(n,e,l){var o=jy(n),s=o.CustomEvent;typeof s=="function"?s=new s(e,l):(s=o.document.createEvent("Event"),l?(s.initEvent(e,l.bubbles,l.cancelable),s.detail=l.detail):s.initEvent(e,!1,!1)),n.dispatchEvent(s)}function E_(n,e){return function(){return ky(this,n,e)}}function N_(n,e){return function(){return ky(this,n,e.apply(this,arguments))}}function C_(n,e){return this.each((typeof e=="function"?N_:E_)(n,e))}function*M_(){for(var n=this._groups,e=0,l=n.length;e<l;++e)for(var o=n[e],s=0,c=o.length,d;s<c;++s)(d=o[s])&&(yield d)}var Yy=[null];function Gn(n,e){this._groups=n,this._parents=e}function Ts(){return new Gn([[document.documentElement]],Yy)}function T_(){return this}Gn.prototype=Ts.prototype={constructor:Gn,select:e4,selectAll:l4,selectChild:s4,selectChildren:d4,filter:h4,data:x4,enter:g4,exit:S4,join:_4,merge:w4,selection:T_,order:E4,sort:N4,call:M4,nodes:T4,node:A4,size:O4,empty:z4,each:R4,attr:k4,style:X4,property:K4,classed:F4,text:t_,html:a_,raise:r_,lower:u_,append:c_,insert:d_,remove:g_,clone:y_,datum:v_,on:w_,dispatch:C_,[Symbol.iterator]:M_};function Xn(n){return typeof n=="string"?new Gn([[document.querySelector(n)]],[document.documentElement]):new Gn([[n]],Yy)}var A_=0;function Jm(){this._="@"+(++A_).toString(36)}Jm.prototype={constructor:Jm,get:function(n){for(var e=this._;!(e in n);)if(!(n=n.parentNode))return;return n[e]},set:function(n,e){return n[this._]=e},remove:function(n){return this._ in n&&delete n[this._]},toString:function(){return this._}};function O_(n){let e;for(;e=n.sourceEvent;)n=e;return n}function vi(n,e){if(n=O_(n),e===void 0&&(e=n.currentTarget),e){var l=e.ownerSVGElement||e;if(l.createSVGPoint){var o=l.createSVGPoint();return o.x=n.clientX,o.y=n.clientY,o=o.matrixTransform(e.getScreenCTM().inverse()),[o.x,o.y]}if(e.getBoundingClientRect){var s=e.getBoundingClientRect();return[n.clientX-s.left-e.clientLeft,n.clientY-s.top-e.clientTop]}}return[n.pageX,n.pageY]}const z_={passive:!1},ys={capture:!0,passive:!1};function vh(n){n.stopImmediatePropagation()}function Io(n){n.preventDefault(),n.stopImmediatePropagation()}function qy(n){var e=n.document.documentElement,l=Xn(n).on("dragstart.drag",Io,ys);"onselectstart"in e?l.on("selectstart.drag",Io,ys):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Vy(n,e){var l=n.document.documentElement,o=Xn(n).on("dragstart.drag",null);e&&(o.on("click.drag",Io,ys),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in l?o.on("selectstart.drag",null):(l.style.MozUserSelect=l.__noselect,delete l.__noselect)}var $u=n=>()=>n;function Yh(n,{sourceEvent:e,subject:l,target:o,identifier:s,active:c,x:d,y:h,dx:g,dy:m,dispatch:p}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:l,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:d,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:p}})}Yh.prototype.on=function(){var n=this._.on.apply(this._,arguments);return n===this._?this:n};function R_(n){return!n.ctrlKey&&!n.button}function D_(){return this.parentNode}function j_(n,e){return e??{x:n.x,y:n.y}}function H_(){return navigator.maxTouchPoints||"ontouchstart"in this}function Xy(){var n=R_,e=D_,l=j_,o=H_,s={},c=Ms("start","drag","end"),d=0,h,g,m,p,y=0;function v(S){S.on("mousedown.drag",E).filter(o).on("touchstart.drag",_).on("touchmove.drag",N,z_).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function E(S,T){if(!(p||!n.call(this,S,T))){var L=M(this,e.call(this,S,T),S,T,"mouse");L&&(Xn(S.view).on("mousemove.drag",w,ys).on("mouseup.drag",b,ys),qy(S.view),vh(S),m=!1,h=S.clientX,g=S.clientY,L("start",S))}}function w(S){if(Io(S),!m){var T=S.clientX-h,L=S.clientY-g;m=T*T+L*L>y}s.mouse("drag",S)}function b(S){Xn(S.view).on("mousemove.drag mouseup.drag",null),Vy(S.view,m),Io(S),s.mouse("end",S)}function _(S,T){if(n.call(this,S,T)){var L=S.changedTouches,R=e.call(this,S,T),H=L.length,z,Y;for(z=0;z<H;++z)(Y=M(this,R,S,T,L[z].identifier,L[z]))&&(vh(S),Y("start",S,L[z]))}}function N(S){var T=S.changedTouches,L=T.length,R,H;for(R=0;R<L;++R)(H=s[T[R].identifier])&&(Io(S),H("drag",S,T[R]))}function C(S){var T=S.changedTouches,L=T.length,R,H;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),R=0;R<L;++R)(H=s[T[R].identifier])&&(vh(S),H("end",S,T[R]))}function M(S,T,L,R,H,z){var Y=c.copy(),Z=vi(z||L,T),I,G,j;if((j=l.call(S,new Yh("beforestart",{sourceEvent:L,target:v,identifier:H,active:d,x:Z[0],y:Z[1],dx:0,dy:0,dispatch:Y}),R))!=null)return I=j.x-Z[0]||0,G=j.y-Z[1]||0,function X(B,k,U){var Q=Z,P;switch(B){case"start":s[H]=X,P=d++;break;case"end":delete s[H],--d;case"drag":Z=vi(U||k,T),P=d;break}Y.call(B,S,new Yh(B,{sourceEvent:k,subject:j,target:v,identifier:H,active:P,x:Z[0]+I,y:Z[1]+G,dx:Z[0]-Q[0],dy:Z[1]-Q[1],dispatch:Y}),R)}}return v.filter=function(S){return arguments.length?(n=typeof S=="function"?S:$u(!!S),v):n},v.container=function(S){return arguments.length?(e=typeof S=="function"?S:$u(S),v):e},v.subject=function(S){return arguments.length?(l=typeof S=="function"?S:$u(S),v):l},v.touchable=function(S){return arguments.length?(o=typeof S=="function"?S:$u(!!S),v):o},v.on=function(){var S=c.on.apply(c,arguments);return S===c?v:S},v.clickDistance=function(S){return arguments.length?(y=(S=+S)*S,v):Math.sqrt(y)},v}function ur(n,e,l){n.prototype=e.prototype=l,l.constructor=n}function As(n,e){var l=Object.create(n.prototype);for(var o in e)l[o]=e[o];return l}function ca(){}var Qa=.7,er=1/Qa,Jo="\\s*([+-]?\\d+)\\s*",vs="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Qi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",B_=/^#([0-9a-f]{3,8})$/,L_=new RegExp(`^rgb\\(${Jo},${Jo},${Jo}\\)$`),U_=new RegExp(`^rgb\\(${Qi},${Qi},${Qi}\\)$`),k_=new RegExp(`^rgba\\(${Jo},${Jo},${Jo},${vs}\\)$`),Y_=new RegExp(`^rgba\\(${Qi},${Qi},${Qi},${vs}\\)$`),q_=new RegExp(`^hsl\\(${vs},${Qi},${Qi}\\)$`),V_=new RegExp(`^hsla\\(${vs},${Qi},${Qi},${vs}\\)$`),Fm={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};ur(ca,Ka,{copy(n){return Object.assign(new this.constructor,this,n)},displayable(){return this.rgb().displayable()},hex:Pm,formatHex:Pm,formatHex8:X_,formatHsl:G_,formatRgb:Wm,toString:Wm});function Pm(){return this.rgb().formatHex()}function X_(){return this.rgb().formatHex8()}function G_(){return Gy(this).formatHsl()}function Wm(){return this.rgb().formatRgb()}function Ka(n){var e,l;return n=(n+"").trim().toLowerCase(),(e=B_.exec(n))?(l=e[1].length,e=parseInt(e[1],16),l===6?ep(e):l===3?new Ft(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):l===8?Iu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):l===4?Iu(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=L_.exec(n))?new Ft(e[1],e[2],e[3],1):(e=U_.exec(n))?new Ft(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=k_.exec(n))?Iu(e[1],e[2],e[3],e[4]):(e=Y_.exec(n))?Iu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=q_.exec(n))?ip(e[1],e[2]/100,e[3]/100,1):(e=V_.exec(n))?ip(e[1],e[2]/100,e[3]/100,e[4]):Fm.hasOwnProperty(n)?ep(Fm[n]):n==="transparent"?new Ft(NaN,NaN,NaN,0):null}function ep(n){return new Ft(n>>16&255,n>>8&255,n&255,1)}function Iu(n,e,l,o){return o<=0&&(n=e=l=NaN),new Ft(n,e,l,o)}function d0(n){return n instanceof ca||(n=Ka(n)),n?(n=n.rgb(),new Ft(n.r,n.g,n.b,n.opacity)):new Ft}function qh(n,e,l,o){return arguments.length===1?d0(n):new Ft(n,e,l,o??1)}function Ft(n,e,l,o){this.r=+n,this.g=+e,this.b=+l,this.opacity=+o}ur(Ft,qh,As(ca,{brighter(n){return n=n==null?er:Math.pow(er,n),new Ft(this.r*n,this.g*n,this.b*n,this.opacity)},darker(n){return n=n==null?Qa:Math.pow(Qa,n),new Ft(this.r*n,this.g*n,this.b*n,this.opacity)},rgb(){return this},clamp(){return new Ft(Ga(this.r),Ga(this.g),Ga(this.b),vc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:tp,formatHex:tp,formatHex8:Z_,formatRgb:np,toString:np}));function tp(){return`#${Xa(this.r)}${Xa(this.g)}${Xa(this.b)}`}function Z_(){return`#${Xa(this.r)}${Xa(this.g)}${Xa(this.b)}${Xa((isNaN(this.opacity)?1:this.opacity)*255)}`}function np(){const n=vc(this.opacity);return`${n===1?"rgb(":"rgba("}${Ga(this.r)}, ${Ga(this.g)}, ${Ga(this.b)}${n===1?")":`, ${n})`}`}function vc(n){return isNaN(n)?1:Math.max(0,Math.min(1,n))}function Ga(n){return Math.max(0,Math.min(255,Math.round(n)||0))}function Xa(n){return n=Ga(n),(n<16?"0":"")+n.toString(16)}function ip(n,e,l,o){return o<=0?n=e=l=NaN:l<=0||l>=1?n=e=NaN:e<=0&&(n=NaN),new bi(n,e,l,o)}function Gy(n){if(n instanceof bi)return new bi(n.h,n.s,n.l,n.opacity);if(n instanceof ca||(n=Ka(n)),!n)return new bi;if(n instanceof bi)return n;n=n.rgb();var e=n.r/255,l=n.g/255,o=n.b/255,s=Math.min(e,l,o),c=Math.max(e,l,o),d=NaN,h=c-s,g=(c+s)/2;return h?(e===c?d=(l-o)/h+(l<o)*6:l===c?d=(o-e)/h+2:d=(e-l)/h+4,h/=g<.5?c+s:2-c-s,d*=60):h=g>0&&g<1?0:d,new bi(d,h,g,n.opacity)}function Q_(n,e,l,o){return arguments.length===1?Gy(n):new bi(n,e,l,o??1)}function bi(n,e,l,o){this.h=+n,this.s=+e,this.l=+l,this.opacity=+o}ur(bi,Q_,As(ca,{brighter(n){return n=n==null?er:Math.pow(er,n),new bi(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Qa:Math.pow(Qa,n),new bi(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=this.h%360+(this.h<0)*360,e=isNaN(n)||isNaN(this.s)?0:this.s,l=this.l,o=l+(l<.5?l:1-l)*e,s=2*l-o;return new Ft(xh(n>=240?n-240:n+120,s,o),xh(n,s,o),xh(n<120?n+240:n-120,s,o),this.opacity)},clamp(){return new bi(lp(this.h),Ju(this.s),Ju(this.l),vc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const n=vc(this.opacity);return`${n===1?"hsl(":"hsla("}${lp(this.h)}, ${Ju(this.s)*100}%, ${Ju(this.l)*100}%${n===1?")":`, ${n})`}`}}));function lp(n){return n=(n||0)%360,n<0?n+360:n}function Ju(n){return Math.max(0,Math.min(1,n||0))}function xh(n,e,l){return(n<60?e+(l-e)*n/60:n<180?l:n<240?e+(l-e)*(240-n)/60:e)*255}const Zy=Math.PI/180,Qy=180/Math.PI,xc=18,Ky=.96422,$y=1,Iy=.82521,Jy=4/29,Fo=6/29,Fy=3*Fo*Fo,K_=Fo*Fo*Fo;function Py(n){if(n instanceof Ki)return new Ki(n.l,n.a,n.b,n.opacity);if(n instanceof yl)return Wy(n);n instanceof Ft||(n=d0(n));var e=wh(n.r),l=wh(n.g),o=wh(n.b),s=bh((.2225045*e+.7168786*l+.0606169*o)/$y),c,d;return e===l&&l===o?c=d=s:(c=bh((.4360747*e+.3850649*l+.1430804*o)/Ky),d=bh((.0139322*e+.0971045*l+.7141733*o)/Iy)),new Ki(116*s-16,500*(c-s),200*(s-d),n.opacity)}function $_(n,e,l,o){return arguments.length===1?Py(n):new Ki(n,e,l,o??1)}function Ki(n,e,l,o){this.l=+n,this.a=+e,this.b=+l,this.opacity=+o}ur(Ki,$_,As(ca,{brighter(n){return new Ki(this.l+xc*(n??1),this.a,this.b,this.opacity)},darker(n){return new Ki(this.l-xc*(n??1),this.a,this.b,this.opacity)},rgb(){var n=(this.l+16)/116,e=isNaN(this.a)?n:n+this.a/500,l=isNaN(this.b)?n:n-this.b/200;return e=Ky*Sh(e),n=$y*Sh(n),l=Iy*Sh(l),new Ft(_h(3.1338561*e-1.6168667*n-.4906146*l),_h(-.9787684*e+1.9161415*n+.033454*l),_h(.0719453*e-.2289914*n+1.4052427*l),this.opacity)}}));function bh(n){return n>K_?Math.pow(n,1/3):n/Fy+Jy}function Sh(n){return n>Fo?n*n*n:Fy*(n-Jy)}function _h(n){return 255*(n<=.0031308?12.92*n:1.055*Math.pow(n,1/2.4)-.055)}function wh(n){return(n/=255)<=.04045?n/12.92:Math.pow((n+.055)/1.055,2.4)}function I_(n){if(n instanceof yl)return new yl(n.h,n.c,n.l,n.opacity);if(n instanceof Ki||(n=Py(n)),n.a===0&&n.b===0)return new yl(NaN,0<n.l&&n.l<100?0:NaN,n.l,n.opacity);var e=Math.atan2(n.b,n.a)*Qy;return new yl(e<0?e+360:e,Math.sqrt(n.a*n.a+n.b*n.b),n.l,n.opacity)}function J_(n,e,l,o){return arguments.length===1?I_(n):new yl(n,e,l,o??1)}function yl(n,e,l,o){this.h=+n,this.c=+e,this.l=+l,this.opacity=+o}function Wy(n){if(isNaN(n.h))return new Ki(n.l,0,0,n.opacity);var e=n.h*Zy;return new Ki(n.l,Math.cos(e)*n.c,Math.sin(e)*n.c,n.opacity)}ur(yl,J_,As(ca,{brighter(n){return new yl(this.h,this.c,this.l+xc*(n??1),this.opacity)},darker(n){return new yl(this.h,this.c,this.l-xc*(n??1),this.opacity)},rgb(){return Wy(this).rgb()}}));var ev=-.14861,h0=1.78277,g0=-.29227,Dc=-.90649,xs=1.97294,ap=xs*Dc,op=xs*h0,rp=h0*g0-Dc*ev;function F_(n){if(n instanceof Za)return new Za(n.h,n.s,n.l,n.opacity);n instanceof Ft||(n=d0(n));var e=n.r/255,l=n.g/255,o=n.b/255,s=(rp*o+ap*e-op*l)/(rp+ap-op),c=o-s,d=(xs*(l-s)-g0*c)/Dc,h=Math.sqrt(d*d+c*c)/(xs*s*(1-s)),g=h?Math.atan2(d,c)*Qy-120:NaN;return new Za(g<0?g+360:g,h,s,n.opacity)}function Vh(n,e,l,o){return arguments.length===1?F_(n):new Za(n,e,l,o??1)}function Za(n,e,l,o){this.h=+n,this.s=+e,this.l=+l,this.opacity=+o}ur(Za,Vh,As(ca,{brighter(n){return n=n==null?er:Math.pow(er,n),new Za(this.h,this.s,this.l*n,this.opacity)},darker(n){return n=n==null?Qa:Math.pow(Qa,n),new Za(this.h,this.s,this.l*n,this.opacity)},rgb(){var n=isNaN(this.h)?0:(this.h+120)*Zy,e=+this.l,l=isNaN(this.s)?0:this.s*e*(1-e),o=Math.cos(n),s=Math.sin(n);return new Ft(255*(e+l*(ev*o+h0*s)),255*(e+l*(g0*o+Dc*s)),255*(e+l*(xs*o)),this.opacity)}}));var jc=n=>()=>n;function tv(n,e){return function(l){return n+l*e}}function P_(n,e,l){return n=Math.pow(n,l),e=Math.pow(e,l)-n,l=1/l,function(o){return Math.pow(n+o*e,l)}}function W_(n,e){var l=e-n;return l?tv(n,l>180||l<-180?l-360*Math.round(l/360):l):jc(isNaN(n)?e:n)}function ew(n){return(n=+n)==1?Po:function(e,l){return l-e?P_(e,l,n):jc(isNaN(e)?l:e)}}function Po(n,e){var l=e-n;return l?tv(n,l):jc(isNaN(n)?e:n)}var bc=(function n(e){var l=ew(e);function o(s,c){var d=l((s=qh(s)).r,(c=qh(c)).r),h=l(s.g,c.g),g=l(s.b,c.b),m=Po(s.opacity,c.opacity);return function(p){return s.r=d(p),s.g=h(p),s.b=g(p),s.opacity=m(p),s+""}}return o.gamma=n,o})(1);function tw(n,e){e||(e=[]);var l=n?Math.min(e.length,n.length):0,o=e.slice(),s;return function(c){for(s=0;s<l;++s)o[s]=n[s]*(1-c)+e[s]*c;return o}}function nw(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function iw(n,e){var l=e?e.length:0,o=n?Math.min(l,n.length):0,s=new Array(o),c=new Array(l),d;for(d=0;d<o;++d)s[d]=gs(n[d],e[d]);for(;d<l;++d)c[d]=e[d];return function(h){for(d=0;d<o;++d)c[d]=s[d](h);return c}}function lw(n,e){var l=new Date;return n=+n,e=+e,function(o){return l.setTime(n*(1-o)+e*o),l}}function Gi(n,e){return n=+n,e=+e,function(l){return n*(1-l)+e*l}}function aw(n,e){var l={},o={},s;(n===null||typeof n!="object")&&(n={}),(e===null||typeof e!="object")&&(e={});for(s in e)s in n?l[s]=gs(n[s],e[s]):o[s]=e[s];return function(c){for(s in l)o[s]=l[s](c);return o}}var Xh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Eh=new RegExp(Xh.source,"g");function ow(n){return function(){return n}}function rw(n){return function(e){return n(e)+""}}function nv(n,e){var l=Xh.lastIndex=Eh.lastIndex=0,o,s,c,d=-1,h=[],g=[];for(n=n+"",e=e+"";(o=Xh.exec(n))&&(s=Eh.exec(e));)(c=s.index)>l&&(c=e.slice(l,c),h[d]?h[d]+=c:h[++d]=c),(o=o[0])===(s=s[0])?h[d]?h[d]+=s:h[++d]=s:(h[++d]=null,g.push({i:d,x:Gi(o,s)})),l=Eh.lastIndex;return l<e.length&&(c=e.slice(l),h[d]?h[d]+=c:h[++d]=c),h.length<2?g[0]?rw(g[0].x):ow(e):(e=g.length,function(m){for(var p=0,y;p<e;++p)h[(y=g[p]).i]=y.x(m);return h.join("")})}function gs(n,e){var l=typeof e,o;return e==null||l==="boolean"?jc(e):(l==="number"?Gi:l==="string"?(o=Ka(e))?(e=o,bc):nv:e instanceof Ka?bc:e instanceof Date?lw:nw(e)?tw:Array.isArray(e)?iw:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?aw:Gi)(n,e)}var sp=180/Math.PI,Gh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function iv(n,e,l,o,s,c){var d,h,g;return(d=Math.sqrt(n*n+e*e))&&(n/=d,e/=d),(g=n*l+e*o)&&(l-=n*g,o-=e*g),(h=Math.sqrt(l*l+o*o))&&(l/=h,o/=h,g/=h),n*o<e*l&&(n=-n,e=-e,g=-g,d=-d),{translateX:s,translateY:c,rotate:Math.atan2(e,n)*sp,skewX:Math.atan(g)*sp,scaleX:d,scaleY:h}}var Fu;function sw(n){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(n+"");return e.isIdentity?Gh:iv(e.a,e.b,e.c,e.d,e.e,e.f)}function uw(n){return n==null||(Fu||(Fu=document.createElementNS("http://www.w3.org/2000/svg","g")),Fu.setAttribute("transform",n),!(n=Fu.transform.baseVal.consolidate()))?Gh:(n=n.matrix,iv(n.a,n.b,n.c,n.d,n.e,n.f))}function lv(n,e,l,o){function s(m){return m.length?m.pop()+" ":""}function c(m,p,y,v,E,w){if(m!==y||p!==v){var b=E.push("translate(",null,e,null,l);w.push({i:b-4,x:Gi(m,y)},{i:b-2,x:Gi(p,v)})}else(y||v)&&E.push("translate("+y+e+v+l)}function d(m,p,y,v){m!==p?(m-p>180?p+=360:p-m>180&&(m+=360),v.push({i:y.push(s(y)+"rotate(",null,o)-2,x:Gi(m,p)})):p&&y.push(s(y)+"rotate("+p+o)}function h(m,p,y,v){m!==p?v.push({i:y.push(s(y)+"skewX(",null,o)-2,x:Gi(m,p)}):p&&y.push(s(y)+"skewX("+p+o)}function g(m,p,y,v,E,w){if(m!==y||p!==v){var b=E.push(s(E)+"scale(",null,",",null,")");w.push({i:b-4,x:Gi(m,y)},{i:b-2,x:Gi(p,v)})}else(y!==1||v!==1)&&E.push(s(E)+"scale("+y+","+v+")")}return function(m,p){var y=[],v=[];return m=n(m),p=n(p),c(m.translateX,m.translateY,p.translateX,p.translateY,y,v),d(m.rotate,p.rotate,y,v),h(m.skewX,p.skewX,y,v),g(m.scaleX,m.scaleY,p.scaleX,p.scaleY,y,v),m=p=null,function(E){for(var w=-1,b=v.length,_;++w<b;)y[(_=v[w]).i]=_.x(E);return y.join("")}}}var cw=lv(sw,"px, ","px)","deg)"),fw=lv(uw,", ",")",")"),dw=1e-12;function up(n){return((n=Math.exp(n))+1/n)/2}function hw(n){return((n=Math.exp(n))-1/n)/2}function gw(n){return((n=Math.exp(2*n))-1)/(n+1)}var oc=(function n(e,l,o){function s(c,d){var h=c[0],g=c[1],m=c[2],p=d[0],y=d[1],v=d[2],E=p-h,w=y-g,b=E*E+w*w,_,N;if(b<dw)N=Math.log(v/m)/e,_=function(R){return[h+R*E,g+R*w,m*Math.exp(e*R*N)]};else{var C=Math.sqrt(b),M=(v*v-m*m+o*b)/(2*m*l*C),S=(v*v-m*m-o*b)/(2*v*l*C),T=Math.log(Math.sqrt(M*M+1)-M),L=Math.log(Math.sqrt(S*S+1)-S);N=(L-T)/e,_=function(R){var H=R*N,z=up(T),Y=m/(l*C)*(z*gw(e*H+T)-hw(T));return[h+Y*E,g+Y*w,m*z/up(e*H+T)]}}return _.duration=Math.abs(N)*1e3*e/Math.SQRT2,_}return s.rho=function(c){var d=Math.max(.001,+c),h=d*d,g=h*h;return n(d,h,g)},s})(Math.SQRT2,2,4);function av(n){return(function e(l){l=+l;function o(s,c){var d=n((s=Vh(s)).h,(c=Vh(c)).h),h=Po(s.s,c.s),g=Po(s.l,c.l),m=Po(s.opacity,c.opacity);return function(p){return s.h=d(p),s.s=h(p),s.l=g(Math.pow(p,l)),s.opacity=m(p),s+""}}return o.gamma=e,o})(1)}av(W_);av(Po);var tr=0,fs=0,rs=0,ov=1e3,Sc,ds,_c=0,$a=0,Hc=0,bs=typeof performance=="object"&&performance.now?performance:Date,rv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(n){setTimeout(n,17)};function m0(){return $a||(rv(mw),$a=bs.now()+Hc)}function mw(){$a=0}function wc(){this._call=this._time=this._next=null}wc.prototype=p0.prototype={constructor:wc,restart:function(n,e,l){if(typeof n!="function")throw new TypeError("callback is not a function");l=(l==null?m0():+l)+(e==null?0:+e),!this._next&&ds!==this&&(ds?ds._next=this:Sc=this,ds=this),this._call=n,this._time=l,Zh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Zh())}};function p0(n,e,l){var o=new wc;return o.restart(n,e,l),o}function pw(){m0(),++tr;for(var n=Sc,e;n;)(e=$a-n._time)>=0&&n._call.call(void 0,e),n=n._next;--tr}function cp(){$a=(_c=bs.now())+Hc,tr=fs=0;try{pw()}finally{tr=0,vw(),$a=0}}function yw(){var n=bs.now(),e=n-_c;e>ov&&(Hc-=e,_c=n)}function vw(){for(var n,e=Sc,l,o=1/0;e;)e._call?(o>e._time&&(o=e._time),n=e,e=e._next):(l=e._next,e._next=null,e=n?n._next=l:Sc=l);ds=n,Zh(o)}function Zh(n){if(!tr){fs&&(fs=clearTimeout(fs));var e=n-$a;e>24?(n<1/0&&(fs=setTimeout(cp,Math.ceil(n-bs.now()-Hc)+1)),rs&&(rs=clearInterval(rs))):(rs||(_c=bs.now(),rs=setInterval(yw,ov)),tr=1,rv(cp))}}function fp(n,e,l){var o=new wc;return e=e==null?0:+e,o.restart(s=>{o.stop(),n(s+e)},e,l),o}function xw(n){return((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2}var y0=3;(function n(e){e=+e;function l(o){return Math.pow(o,e)}return l.exponent=n,l})(y0);(function n(e){e=+e;function l(o){return 1-Math.pow(1-o,e)}return l.exponent=n,l})(y0);(function n(e){e=+e;function l(o){return((o*=2)<=1?Math.pow(o,e):2-Math.pow(2-o,e))/2}return l.exponent=n,l})(y0);function Ec(n){return(Math.pow(2,-10*n)-.0009765625)*1.0009775171065494}var v0=1.70158;(function n(e){e=+e;function l(o){return(o=+o)*o*(e*(o-1)+o)}return l.overshoot=n,l})(v0);(function n(e){e=+e;function l(o){return--o*o*((o+1)*e+o)+1}return l.overshoot=n,l})(v0);(function n(e){e=+e;function l(o){return((o*=2)<1?o*o*((e+1)*o-e):(o-=2)*o*((e+1)*o+e)+2)/2}return l.overshoot=n,l})(v0);var nr=2*Math.PI,x0=1,b0=.3;(function n(e,l){var o=Math.asin(1/(e=Math.max(1,e)))*(l/=nr);function s(c){return e*Ec(- --c)*Math.sin((o-c)/l)}return s.amplitude=function(c){return n(c,l*nr)},s.period=function(c){return n(e,c)},s})(x0,b0);(function n(e,l){var o=Math.asin(1/(e=Math.max(1,e)))*(l/=nr);function s(c){return 1-e*Ec(c=+c)*Math.sin((c+o)/l)}return s.amplitude=function(c){return n(c,l*nr)},s.period=function(c){return n(e,c)},s})(x0,b0);(function n(e,l){var o=Math.asin(1/(e=Math.max(1,e)))*(l/=nr);function s(c){return((c=c*2-1)<0?e*Ec(-c)*Math.sin((o-c)/l):2-e*Ec(c)*Math.sin((o+c)/l))/2}return s.amplitude=function(c){return n(c,l*nr)},s.period=function(c){return n(e,c)},s})(x0,b0);var bw=Ms("start","end","cancel","interrupt"),Sw=[],sv=0,dp=1,Qh=2,rc=3,hp=4,Kh=5,sc=6;function Bc(n,e,l,o,s,c){var d=n.__transition;if(!d)n.__transition={};else if(l in d)return;_w(n,l,{name:e,index:o,group:s,on:bw,tween:Sw,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:sv})}function S0(n,e){var l=wi(n,e);if(l.state>sv)throw new Error("too late; already scheduled");return l}function Ji(n,e){var l=wi(n,e);if(l.state>rc)throw new Error("too late; already running");return l}function wi(n,e){var l=n.__transition;if(!l||!(l=l[e]))throw new Error("transition not found");return l}function _w(n,e,l){var o=n.__transition,s;o[e]=l,l.timer=p0(c,0,l.time);function c(m){l.state=dp,l.timer.restart(d,l.delay,l.time),l.delay<=m&&d(m-l.delay)}function d(m){var p,y,v,E;if(l.state!==dp)return g();for(p in o)if(E=o[p],E.name===l.name){if(E.state===rc)return fp(d);E.state===hp?(E.state=sc,E.timer.stop(),E.on.call("interrupt",n,n.__data__,E.index,E.group),delete o[p]):+p<e&&(E.state=sc,E.timer.stop(),E.on.call("cancel",n,n.__data__,E.index,E.group),delete o[p])}if(fp(function(){l.state===rc&&(l.state=hp,l.timer.restart(h,l.delay,l.time),h(m))}),l.state=Qh,l.on.call("start",n,n.__data__,l.index,l.group),l.state===Qh){for(l.state=rc,s=new Array(v=l.tween.length),p=0,y=-1;p<v;++p)(E=l.tween[p].value.call(n,n.__data__,l.index,l.group))&&(s[++y]=E);s.length=y+1}}function h(m){for(var p=m<l.duration?l.ease.call(null,m/l.duration):(l.timer.restart(g),l.state=Kh,1),y=-1,v=s.length;++y<v;)s[y].call(n,p);l.state===Kh&&(l.on.call("end",n,n.__data__,l.index,l.group),g())}function g(){l.state=sc,l.timer.stop(),delete o[e];for(var m in o)return;delete n.__transition}}function uc(n,e){var l=n.__transition,o,s,c=!0,d;if(l){e=e==null?null:e+"";for(d in l){if((o=l[d]).name!==e){c=!1;continue}s=o.state>Qh&&o.state<Kh,o.state=sc,o.timer.stop(),o.on.call(s?"interrupt":"cancel",n,n.__data__,o.index,o.group),delete l[d]}c&&delete n.__transition}}function ww(n){return this.each(function(){uc(this,n)})}function Ew(n,e){var l,o;return function(){var s=Ji(this,n),c=s.tween;if(c!==l){o=l=c;for(var d=0,h=o.length;d<h;++d)if(o[d].name===e){o=o.slice(),o.splice(d,1);break}}s.tween=o}}function Nw(n,e,l){var o,s;if(typeof l!="function")throw new Error;return function(){var c=Ji(this,n),d=c.tween;if(d!==o){s=(o=d).slice();for(var h={name:e,value:l},g=0,m=s.length;g<m;++g)if(s[g].name===e){s[g]=h;break}g===m&&s.push(h)}c.tween=s}}function Cw(n,e){var l=this._id;if(n+="",arguments.length<2){for(var o=wi(this.node(),l).tween,s=0,c=o.length,d;s<c;++s)if((d=o[s]).name===n)return d.value;return null}return this.each((e==null?Ew:Nw)(l,n,e))}function _0(n,e,l){var o=n._id;return n.each(function(){var s=Ji(this,o);(s.value||(s.value={}))[e]=l.apply(this,arguments)}),function(s){return wi(s,o).value[e]}}function uv(n,e){var l;return(typeof e=="number"?Gi:e instanceof Ka?bc:(l=Ka(e))?(e=l,bc):nv)(n,e)}function Mw(n){return function(){this.removeAttribute(n)}}function Tw(n){return function(){this.removeAttributeNS(n.space,n.local)}}function Aw(n,e,l){var o,s=l+"",c;return function(){var d=this.getAttribute(n);return d===s?null:d===o?c:c=e(o=d,l)}}function Ow(n,e,l){var o,s=l+"",c;return function(){var d=this.getAttributeNS(n.space,n.local);return d===s?null:d===o?c:c=e(o=d,l)}}function zw(n,e,l){var o,s,c;return function(){var d,h=l(this),g;return h==null?void this.removeAttribute(n):(d=this.getAttribute(n),g=h+"",d===g?null:d===o&&g===s?c:(s=g,c=e(o=d,h)))}}function Rw(n,e,l){var o,s,c;return function(){var d,h=l(this),g;return h==null?void this.removeAttributeNS(n.space,n.local):(d=this.getAttributeNS(n.space,n.local),g=h+"",d===g?null:d===o&&g===s?c:(s=g,c=e(o=d,h)))}}function Dw(n,e){var l=Rc(n),o=l==="transform"?fw:uv;return this.attrTween(n,typeof e=="function"?(l.local?Rw:zw)(l,o,_0(this,"attr."+n,e)):e==null?(l.local?Tw:Mw)(l):(l.local?Ow:Aw)(l,o,e))}function jw(n,e){return function(l){this.setAttribute(n,e.call(this,l))}}function Hw(n,e){return function(l){this.setAttributeNS(n.space,n.local,e.call(this,l))}}function Bw(n,e){var l,o;function s(){var c=e.apply(this,arguments);return c!==o&&(l=(o=c)&&Hw(n,c)),l}return s._value=e,s}function Lw(n,e){var l,o;function s(){var c=e.apply(this,arguments);return c!==o&&(l=(o=c)&&jw(n,c)),l}return s._value=e,s}function Uw(n,e){var l="attr."+n;if(arguments.length<2)return(l=this.tween(l))&&l._value;if(e==null)return this.tween(l,null);if(typeof e!="function")throw new Error;var o=Rc(n);return this.tween(l,(o.local?Bw:Lw)(o,e))}function kw(n,e){return function(){S0(this,n).delay=+e.apply(this,arguments)}}function Yw(n,e){return e=+e,function(){S0(this,n).delay=e}}function qw(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?kw:Yw)(e,n)):wi(this.node(),e).delay}function Vw(n,e){return function(){Ji(this,n).duration=+e.apply(this,arguments)}}function Xw(n,e){return e=+e,function(){Ji(this,n).duration=e}}function Gw(n){var e=this._id;return arguments.length?this.each((typeof n=="function"?Vw:Xw)(e,n)):wi(this.node(),e).duration}function Zw(n,e){if(typeof e!="function")throw new Error;return function(){Ji(this,n).ease=e}}function Qw(n){var e=this._id;return arguments.length?this.each(Zw(e,n)):wi(this.node(),e).ease}function Kw(n,e){return function(){var l=e.apply(this,arguments);if(typeof l!="function")throw new Error;Ji(this,n).ease=l}}function $w(n){if(typeof n!="function")throw new Error;return this.each(Kw(this._id,n))}function Iw(n){typeof n!="function"&&(n=zy(n));for(var e=this._groups,l=e.length,o=new Array(l),s=0;s<l;++s)for(var c=e[s],d=c.length,h=o[s]=[],g,m=0;m<d;++m)(g=c[m])&&n.call(g,g.__data__,m,c)&&h.push(g);return new xl(o,this._parents,this._name,this._id)}function Jw(n){if(n._id!==this._id)throw new Error;for(var e=this._groups,l=n._groups,o=e.length,s=l.length,c=Math.min(o,s),d=new Array(o),h=0;h<c;++h)for(var g=e[h],m=l[h],p=g.length,y=d[h]=new Array(p),v,E=0;E<p;++E)(v=g[E]||m[E])&&(y[E]=v);for(;h<o;++h)d[h]=e[h];return new xl(d,this._parents,this._name,this._id)}function Fw(n){return(n+"").trim().split(/^|\s+/).every(function(e){var l=e.indexOf(".");return l>=0&&(e=e.slice(0,l)),!e||e==="start"})}function Pw(n,e,l){var o,s,c=Fw(e)?S0:Ji;return function(){var d=c(this,n),h=d.on;h!==o&&(s=(o=h).copy()).on(e,l),d.on=s}}function Ww(n,e){var l=this._id;return arguments.length<2?wi(this.node(),l).on.on(n):this.each(Pw(l,n,e))}function e5(n){return function(){var e=this.parentNode;for(var l in this.__transition)if(+l!==n)return;e&&e.removeChild(this)}}function t5(){return this.on("end.remove",e5(this._id))}function n5(n){var e=this._name,l=this._id;typeof n!="function"&&(n=c0(n));for(var o=this._groups,s=o.length,c=new Array(s),d=0;d<s;++d)for(var h=o[d],g=h.length,m=c[d]=new Array(g),p,y,v=0;v<g;++v)(p=h[v])&&(y=n.call(p,p.__data__,v,h))&&("__data__"in p&&(y.__data__=p.__data__),m[v]=y,Bc(m[v],e,l,v,m,wi(p,l)));return new xl(c,this._parents,e,l)}function i5(n){var e=this._name,l=this._id;typeof n!="function"&&(n=Oy(n));for(var o=this._groups,s=o.length,c=[],d=[],h=0;h<s;++h)for(var g=o[h],m=g.length,p,y=0;y<m;++y)if(p=g[y]){for(var v=n.call(p,p.__data__,y,g),E,w=wi(p,l),b=0,_=v.length;b<_;++b)(E=v[b])&&Bc(E,e,l,b,v,w);c.push(v),d.push(p)}return new xl(c,d,e,l)}var l5=Ts.prototype.constructor;function a5(){return new l5(this._groups,this._parents)}function o5(n,e){var l,o,s;return function(){var c=Wo(this,n),d=(this.style.removeProperty(n),Wo(this,n));return c===d?null:c===l&&d===o?s:s=e(l=c,o=d)}}function cv(n){return function(){this.style.removeProperty(n)}}function r5(n,e,l){var o,s=l+"",c;return function(){var d=Wo(this,n);return d===s?null:d===o?c:c=e(o=d,l)}}function s5(n,e,l){var o,s,c;return function(){var d=Wo(this,n),h=l(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(n),Wo(this,n))),d===g?null:d===o&&g===s?c:(s=g,c=e(o=d,h))}}function u5(n,e){var l,o,s,c="style."+e,d="end."+c,h;return function(){var g=Ji(this,n),m=g.on,p=g.value[c]==null?h||(h=cv(e)):void 0;(m!==l||s!==p)&&(o=(l=m).copy()).on(d,s=p),g.on=o}}function c5(n,e,l){var o=(n+="")=="transform"?cw:uv;return e==null?this.styleTween(n,o5(n,o)).on("end.style."+n,cv(n)):typeof e=="function"?this.styleTween(n,s5(n,o,_0(this,"style."+n,e))).each(u5(this._id,n)):this.styleTween(n,r5(n,o,e),l).on("end.style."+n,null)}function f5(n,e,l){return function(o){this.style.setProperty(n,e.call(this,o),l)}}function d5(n,e,l){var o,s;function c(){var d=e.apply(this,arguments);return d!==s&&(o=(s=d)&&f5(n,d,l)),o}return c._value=e,c}function h5(n,e,l){var o="style."+(n+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(e==null)return this.tween(o,null);if(typeof e!="function")throw new Error;return this.tween(o,d5(n,e,l??""))}function g5(n){return function(){this.textContent=n}}function m5(n){return function(){var e=n(this);this.textContent=e??""}}function p5(n){return this.tween("text",typeof n=="function"?m5(_0(this,"text",n)):g5(n==null?"":n+""))}function y5(n){return function(e){this.textContent=n.call(this,e)}}function v5(n){var e,l;function o(){var s=n.apply(this,arguments);return s!==l&&(e=(l=s)&&y5(s)),e}return o._value=n,o}function x5(n){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(n==null)return this.tween(e,null);if(typeof n!="function")throw new Error;return this.tween(e,v5(n))}function b5(){for(var n=this._name,e=this._id,l=fv(),o=this._groups,s=o.length,c=0;c<s;++c)for(var d=o[c],h=d.length,g,m=0;m<h;++m)if(g=d[m]){var p=wi(g,e);Bc(g,n,l,m,d,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new xl(o,this._parents,n,l)}function S5(){var n,e,l=this,o=l._id,s=l.size();return new Promise(function(c,d){var h={value:d},g={value:function(){--s===0&&c()}};l.each(function(){var m=Ji(this,o),p=m.on;p!==n&&(e=(n=p).copy(),e._.cancel.push(h),e._.interrupt.push(h),e._.end.push(g)),m.on=e}),s===0&&c()})}var _5=0;function xl(n,e,l,o){this._groups=n,this._parents=e,this._name=l,this._id=o}function fv(){return++_5}var pl=Ts.prototype;xl.prototype={constructor:xl,select:n5,selectAll:i5,selectChild:pl.selectChild,selectChildren:pl.selectChildren,filter:Iw,merge:Jw,selection:a5,transition:b5,call:pl.call,nodes:pl.nodes,node:pl.node,size:pl.size,empty:pl.empty,each:pl.each,on:Ww,attr:Dw,attrTween:Uw,style:c5,styleTween:h5,text:p5,textTween:x5,remove:t5,tween:Cw,delay:qw,duration:Gw,ease:Qw,easeVarying:$w,end:S5,[Symbol.iterator]:pl[Symbol.iterator]};var w5={time:null,delay:0,duration:250,ease:xw};function E5(n,e){for(var l;!(l=n.__transition)||!(l=l[e]);)if(!(n=n.parentNode))throw new Error(`transition ${e} not found`);return l}function N5(n){var e,l;n instanceof xl?(e=n._id,n=n._name):(e=fv(),(l=w5).time=m0(),n=n==null?null:n+"");for(var o=this._groups,s=o.length,c=0;c<s;++c)for(var d=o[c],h=d.length,g,m=0;m<h;++m)(g=d[m])&&Bc(g,n,e,m,d,l||E5(g,e));return new xl(o,this._parents,n,e)}Ts.prototype.interrupt=ww;Ts.prototype.transition=N5;var Pu=n=>()=>n;function C5(n,{sourceEvent:e,target:l,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:n,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function vl(n,e,l){this.k=n,this.x=e,this.y=l}vl.prototype={constructor:vl,scale:function(n){return n===1?this:new vl(this.k*n,this.x,this.y)},translate:function(n,e){return n===0&e===0?this:new vl(this.k,this.x+this.k*n,this.y+this.k*e)},apply:function(n){return[n[0]*this.k+this.x,n[1]*this.k+this.y]},applyX:function(n){return n*this.k+this.x},applyY:function(n){return n*this.k+this.y},invert:function(n){return[(n[0]-this.x)/this.k,(n[1]-this.y)/this.k]},invertX:function(n){return(n-this.x)/this.k},invertY:function(n){return(n-this.y)/this.k},rescaleX:function(n){return n.copy().domain(n.range().map(this.invertX,this).map(n.invert,n))},rescaleY:function(n){return n.copy().domain(n.range().map(this.invertY,this).map(n.invert,n))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Lc=new vl(1,0,0);dv.prototype=vl.prototype;function dv(n){for(;!n.__zoom;)if(!(n=n.parentNode))return Lc;return n.__zoom}function Nh(n){n.stopImmediatePropagation()}function ss(n){n.preventDefault(),n.stopImmediatePropagation()}function M5(n){return(!n.ctrlKey||n.type==="wheel")&&!n.button}function T5(){var n=this;return n instanceof SVGElement?(n=n.ownerSVGElement||n,n.hasAttribute("viewBox")?(n=n.viewBox.baseVal,[[n.x,n.y],[n.x+n.width,n.y+n.height]]):[[0,0],[n.width.baseVal.value,n.height.baseVal.value]]):[[0,0],[n.clientWidth,n.clientHeight]]}function gp(){return this.__zoom||Lc}function A5(n){return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*(n.ctrlKey?10:1)}function O5(){return navigator.maxTouchPoints||"ontouchstart"in this}function z5(n,e,l){var o=n.invertX(e[0][0])-l[0][0],s=n.invertX(e[1][0])-l[1][0],c=n.invertY(e[0][1])-l[0][1],d=n.invertY(e[1][1])-l[1][1];return n.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),d>c?(c+d)/2:Math.min(0,c)||Math.max(0,d))}function hv(){var n=M5,e=T5,l=z5,o=A5,s=O5,c=[0,1/0],d=[[-1/0,-1/0],[1/0,1/0]],h=250,g=oc,m=Ms("start","zoom","end"),p,y,v,E=500,w=150,b=0,_=10;function N(j){j.property("__zoom",gp).on("wheel.zoom",H,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",Y).filter(s).on("touchstart.zoom",Z).on("touchmove.zoom",I).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}N.transform=function(j,X,B,k){var U=j.selection?j.selection():j;U.property("__zoom",gp),j!==U?T(j,X,B,k):U.interrupt().each(function(){L(this,arguments).event(k).start().zoom(null,typeof X=="function"?X.apply(this,arguments):X).end()})},N.scaleBy=function(j,X,B,k){N.scaleTo(j,function(){var U=this.__zoom.k,Q=typeof X=="function"?X.apply(this,arguments):X;return U*Q},B,k)},N.scaleTo=function(j,X,B,k){N.transform(j,function(){var U=e.apply(this,arguments),Q=this.__zoom,P=B==null?S(U):typeof B=="function"?B.apply(this,arguments):B,re=Q.invert(P),fe=typeof X=="function"?X.apply(this,arguments):X;return l(M(C(Q,fe),P,re),U,d)},B,k)},N.translateBy=function(j,X,B,k){N.transform(j,function(){return l(this.__zoom.translate(typeof X=="function"?X.apply(this,arguments):X,typeof B=="function"?B.apply(this,arguments):B),e.apply(this,arguments),d)},null,k)},N.translateTo=function(j,X,B,k,U){N.transform(j,function(){var Q=e.apply(this,arguments),P=this.__zoom,re=k==null?S(Q):typeof k=="function"?k.apply(this,arguments):k;return l(Lc.translate(re[0],re[1]).scale(P.k).translate(typeof X=="function"?-X.apply(this,arguments):-X,typeof B=="function"?-B.apply(this,arguments):-B),Q,d)},k,U)};function C(j,X){return X=Math.max(c[0],Math.min(c[1],X)),X===j.k?j:new vl(X,j.x,j.y)}function M(j,X,B){var k=X[0]-B[0]*j.k,U=X[1]-B[1]*j.k;return k===j.x&&U===j.y?j:new vl(j.k,k,U)}function S(j){return[(+j[0][0]+ +j[1][0])/2,(+j[0][1]+ +j[1][1])/2]}function T(j,X,B,k){j.on("start.zoom",function(){L(this,arguments).event(k).start()}).on("interrupt.zoom end.zoom",function(){L(this,arguments).event(k).end()}).tween("zoom",function(){var U=this,Q=arguments,P=L(U,Q).event(k),re=e.apply(U,Q),fe=B==null?S(re):typeof B=="function"?B.apply(U,Q):B,oe=Math.max(re[1][0]-re[0][0],re[1][1]-re[0][1]),O=U.__zoom,V=typeof X=="function"?X.apply(U,Q):X,F=g(O.invert(fe).concat(oe/O.k),V.invert(fe).concat(oe/V.k));return function(K){if(K===1)K=V;else{var J=F(K),ee=oe/J[2];K=new vl(ee,fe[0]-J[0]*ee,fe[1]-J[1]*ee)}P.zoom(null,K)}})}function L(j,X,B){return!B&&j.__zooming||new R(j,X)}function R(j,X){this.that=j,this.args=X,this.active=0,this.sourceEvent=null,this.extent=e.apply(j,X),this.taps=0}R.prototype={event:function(j){return j&&(this.sourceEvent=j),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(j,X){return this.mouse&&j!=="mouse"&&(this.mouse[1]=X.invert(this.mouse[0])),this.touch0&&j!=="touch"&&(this.touch0[1]=X.invert(this.touch0[0])),this.touch1&&j!=="touch"&&(this.touch1[1]=X.invert(this.touch1[0])),this.that.__zoom=X,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(j){var X=Xn(this.that).datum();m.call(j,this.that,new C5(j,{sourceEvent:this.sourceEvent,target:N,transform:this.that.__zoom,dispatch:m}),X)}};function H(j,...X){if(!n.apply(this,arguments))return;var B=L(this,X).event(j),k=this.__zoom,U=Math.max(c[0],Math.min(c[1],k.k*Math.pow(2,o.apply(this,arguments)))),Q=vi(j);if(B.wheel)(B.mouse[0][0]!==Q[0]||B.mouse[0][1]!==Q[1])&&(B.mouse[1]=k.invert(B.mouse[0]=Q)),clearTimeout(B.wheel);else{if(k.k===U)return;B.mouse=[Q,k.invert(Q)],uc(this),B.start()}ss(j),B.wheel=setTimeout(P,w),B.zoom("mouse",l(M(C(k,U),B.mouse[0],B.mouse[1]),B.extent,d));function P(){B.wheel=null,B.end()}}function z(j,...X){if(v||!n.apply(this,arguments))return;var B=j.currentTarget,k=L(this,X,!0).event(j),U=Xn(j.view).on("mousemove.zoom",fe,!0).on("mouseup.zoom",oe,!0),Q=vi(j,B),P=j.clientX,re=j.clientY;qy(j.view),Nh(j),k.mouse=[Q,this.__zoom.invert(Q)],uc(this),k.start();function fe(O){if(ss(O),!k.moved){var V=O.clientX-P,F=O.clientY-re;k.moved=V*V+F*F>b}k.event(O).zoom("mouse",l(M(k.that.__zoom,k.mouse[0]=vi(O,B),k.mouse[1]),k.extent,d))}function oe(O){U.on("mousemove.zoom mouseup.zoom",null),Vy(O.view,k.moved),ss(O),k.event(O).end()}}function Y(j,...X){if(n.apply(this,arguments)){var B=this.__zoom,k=vi(j.changedTouches?j.changedTouches[0]:j,this),U=B.invert(k),Q=B.k*(j.shiftKey?.5:2),P=l(M(C(B,Q),k,U),e.apply(this,X),d);ss(j),h>0?Xn(this).transition().duration(h).call(T,P,k,j):Xn(this).call(N.transform,P,k,j)}}function Z(j,...X){if(n.apply(this,arguments)){var B=j.touches,k=B.length,U=L(this,X,j.changedTouches.length===k).event(j),Q,P,re,fe;for(Nh(j),P=0;P<k;++P)re=B[P],fe=vi(re,this),fe=[fe,this.__zoom.invert(fe),re.identifier],U.touch0?!U.touch1&&U.touch0[2]!==fe[2]&&(U.touch1=fe,U.taps=0):(U.touch0=fe,Q=!0,U.taps=1+!!p);p&&(p=clearTimeout(p)),Q&&(U.taps<2&&(y=fe[0],p=setTimeout(function(){p=null},E)),uc(this),U.start())}}function I(j,...X){if(this.__zooming){var B=L(this,X).event(j),k=j.changedTouches,U=k.length,Q,P,re,fe;for(ss(j),Q=0;Q<U;++Q)P=k[Q],re=vi(P,this),B.touch0&&B.touch0[2]===P.identifier?B.touch0[0]=re:B.touch1&&B.touch1[2]===P.identifier&&(B.touch1[0]=re);if(P=B.that.__zoom,B.touch1){var oe=B.touch0[0],O=B.touch0[1],V=B.touch1[0],F=B.touch1[1],K=(K=V[0]-oe[0])*K+(K=V[1]-oe[1])*K,J=(J=F[0]-O[0])*J+(J=F[1]-O[1])*J;P=C(P,Math.sqrt(K/J)),re=[(oe[0]+V[0])/2,(oe[1]+V[1])/2],fe=[(O[0]+F[0])/2,(O[1]+F[1])/2]}else if(B.touch0)re=B.touch0[0],fe=B.touch0[1];else return;B.zoom("touch",l(M(P,re,fe),B.extent,d))}}function G(j,...X){if(this.__zooming){var B=L(this,X).event(j),k=j.changedTouches,U=k.length,Q,P;for(Nh(j),v&&clearTimeout(v),v=setTimeout(function(){v=null},E),Q=0;Q<U;++Q)P=k[Q],B.touch0&&B.touch0[2]===P.identifier?delete B.touch0:B.touch1&&B.touch1[2]===P.identifier&&delete B.touch1;if(B.touch1&&!B.touch0&&(B.touch0=B.touch1,delete B.touch1),B.touch0)B.touch0[1]=this.__zoom.invert(B.touch0[0]);else if(B.end(),B.taps===2&&(P=vi(P,this),Math.hypot(y[0]-P[0],y[1]-P[1])<_)){var re=Xn(this).on("dblclick.zoom");re&&re.apply(this,arguments)}}}return N.wheelDelta=function(j){return arguments.length?(o=typeof j=="function"?j:Pu(+j),N):o},N.filter=function(j){return arguments.length?(n=typeof j=="function"?j:Pu(!!j),N):n},N.touchable=function(j){return arguments.length?(s=typeof j=="function"?j:Pu(!!j),N):s},N.extent=function(j){return arguments.length?(e=typeof j=="function"?j:Pu([[+j[0][0],+j[0][1]],[+j[1][0],+j[1][1]]]),N):e},N.scaleExtent=function(j){return arguments.length?(c[0]=+j[0],c[1]=+j[1],N):[c[0],c[1]]},N.translateExtent=function(j){return arguments.length?(d[0][0]=+j[0][0],d[1][0]=+j[1][0],d[0][1]=+j[0][1],d[1][1]=+j[1][1],N):[[d[0][0],d[0][1]],[d[1][0],d[1][1]]]},N.constrain=function(j){return arguments.length?(l=j,N):l},N.duration=function(j){return arguments.length?(h=+j,N):h},N.interpolate=function(j){return arguments.length?(g=j,N):g},N.on=function(){var j=m.on.apply(m,arguments);return j===m?N:j},N.clickDistance=function(j){return arguments.length?(b=(j=+j)*j,N):Math.sqrt(b)},N.tapDistance=function(j){return arguments.length?(_=+j,N):_},N}const _i={error001:(n="react")=>`Seems like you have not used ${n==="svelte"?"SvelteFlowProvider":"ReactFlowProvider"} as an ancestor. Help: https://${n}flow.dev/error#001`,error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:n=>`Node type "${n}" not found. Using fallback type "default".`,error004:()=>"The parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:n=>`The old edge with id=${n} does not exist.`,error009:n=>`Marker type "${n}" doesn't exist.`,error008:(n,{id:e,sourceHandle:l,targetHandle:o})=>`Couldn't create edge for ${n} handle id: "${n==="source"?l:o}", edge id: ${e}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:n=>`Edge type "${n}" not found. Using fallback type "default".`,error012:n=>`Node with id "${n}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(n="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${n}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs.",error016:n=>`Edge with id "${n}" does not exist, it may have been removed. This can happen when an edge is deleted before the "onEdgeClick" handler is called.`},ir=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],gv="5%",mv=["Enter"," ","Escape"],pv={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:n,x:e,y:l})=>`Moved selected node ${n}. New position, x: ${e}, y: ${l}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};let yv=(function(n){return n.Strict="strict",n.Loose="loose",n})({}),vv=(function(n){return n.Free="free",n.Vertical="vertical",n.Horizontal="horizontal",n})({}),$h=(function(n){return n.Partial="partial",n.Full="full",n})({});const cc={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};let Qo=(function(n){return n.Bezier="default",n.Straight="straight",n.Step="step",n.SmoothStep="smoothstep",n.SimpleBezier="simplebezier",n})({}),mp=(function(n){return n.Arrow="arrow",n.ArrowClosed="arrowclosed",n})({}),Xt=(function(n){return n.Left="left",n.Top="top",n.Right="right",n.Bottom="bottom",n})({});const pp={left:"right",right:"left",top:"bottom",bottom:"top"},xv=n=>!!n&&typeof n=="object"&&"id"in n&&"source"in n&&"target"in n,R5=n=>!!n&&typeof n=="object"&&"id"in n&&"position"in n&&!("source"in n)&&!("target"in n),w0=n=>!!n&&typeof n=="object"&&"id"in n&&"internals"in n&&!("source"in n)&&!("target"in n),Uc=(n,e=[0,0])=>{const{width:l,height:o}=Ei(n),s=n.origin??e,c=l*s[0],d=o*s[1];return{x:n.position.x-c,y:n.position.y-d}},D5=(n,e={nodeOrigin:[0,0]})=>{if(n.length===0)return{x:0,y:0,width:0,height:0};let l=!1;const o=n.reduce((s,c)=>{const d=typeof c=="string";let h=!e.nodeLookup&&!d?c:void 0;return e.nodeLookup&&(h=d?e.nodeLookup.get(c):w0(c)?c:e.nodeLookup.get(c.id)),h?(l=!0,kc(s,Nc(h,e.nodeOrigin))):s},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return l?Yc(o):{x:0,y:0,width:0,height:0}},Os=(n,e={})=>{let l={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return n.forEach(s=>{(e.filter===void 0||e.filter(s))&&(l=kc(l,Nc(s)),o=!0)}),o?Yc(l):{x:0,y:0,width:0,height:0}},E0=(n,e,[l,o,s]=[0,0,1],c=!1,d=!1)=>{const h=(e.x-l)/s,g=(e.y-o)/s,m=e.width/s,p=e.height/s,y=[];for(const v of n.values()){const{measured:E,selectable:w=!0,hidden:b=!1}=v;if(d&&!w||b)continue;const _=E.width??v.width??v.initialWidth??0,N=E.height??v.height??v.initialHeight??0,{x:C,y:M}=v.internals.positionAbsolute,S=_v(h,g,m,p,C,M,_,N),T=_*N,L=c&&S>0;(!v.internals.handleBounds||L||S>=T||v.dragging)&&y.push(v)}return y};function j5(n,e){const l=new Map,o=e!=null&&e.nodes?new Set(e.nodes.map(s=>s.id)):null;return n.forEach(s=>{let c;if(e!=null&&e.includeHiddenNodes){const{width:d,height:h}=Ei(s);c=d>0&&h>0}else c=!!(s.measured.width&&s.measured.height&&!s.hidden);c&&(!o||o.has(s.id))&&l.set(s.id,s)}),l}async function H5({nodes:n,width:e,height:l,panZoom:o,minZoom:s,maxZoom:c},d){if(n.size===0)return!0;const h=j5(n,d),g=Os(h),m=C0(g,e,l,(d==null?void 0:d.minZoom)??s,(d==null?void 0:d.maxZoom)??c,(d==null?void 0:d.padding)??"5%");return o.setViewport(m,{duration:d==null?void 0:d.duration,ease:d==null?void 0:d.ease,interpolate:d==null?void 0:d.interpolate})}function bv({nodeId:n,nextPosition:e,nodeLookup:l,nodeOrigin:o=[0,0],nodeExtent:s,onError:c}){const d=l.get(n),h=d.parentId?l.get(d.parentId):void 0,{x:g,y:m}=h?h.internals.positionAbsolute:{x:0,y:0},p=d.origin??o;let y=d.extent||s;if(d.extent==="parent"&&!d.expandParent)if(!h)c==null||c("005",_i.error005());else{const{width:E,height:w}=Ei(h);E&&w&&(y=[[g,m],[g+E,m+w]])}else h&&Es(d.extent)&&(y=[[d.extent[0][0]+g,d.extent[0][1]+m],[d.extent[1][0]+g,d.extent[1][1]+m]]);const v=Es(y)?Ss(e,y,d.measured):e;return(d.measured.width===void 0||d.measured.height===void 0)&&(c==null||c("015",_i.error015())),{position:{x:v.x-g+(d.measured.width??0)*p[0],y:v.y-m+(d.measured.height??0)*p[1]},positionAbsolute:v}}async function B5({nodesToRemove:n=[],edgesToRemove:e=[],nodes:l,edges:o,onBeforeDelete:s}){const c=new Set(n.map(w=>w.id)),d=new Map,h=new Map;for(const w of l)if(w.deletable!==!1&&(c.has(w.id)&&d.set(w.id,w),w.parentId)){const b=h.get(w.parentId)??[];b.push(w),h.set(w.parentId,b)}const g=[...d.keys()];for(let w=0;w<g.length;w++)for(const b of h.get(g[w])??[])d.has(b.id)||(d.set(b.id,b),g.push(b.id));const m=new Set(e.map(w=>w.id)),p=new Map;for(const w of o)w.deletable!==!1&&(d.has(w.source)||d.has(w.target))&&p.set(w.id,w);for(const w of o)w.deletable!==!1&&m.has(w.id)&&!p.has(w.id)&&p.set(w.id,w);const y=l.filter(w=>d.has(w.id)),v=Array.from(p.values());if(!s)return{edges:v,nodes:y};const E=await s({nodes:y,edges:v});return typeof E=="boolean"?E?{edges:v,nodes:y}:{edges:[],nodes:[]}:E}const lr=(n,e=0,l=1)=>Math.min(Math.max(n,e),l),Ss=(n={x:0,y:0},e,l)=>({x:lr(n.x,e[0][0],e[1][0]-((l==null?void 0:l.width)??0)),y:lr(n.y,e[0][1],e[1][1]-((l==null?void 0:l.height)??0))});function L5(n,e,l){const{width:o,height:s}=Ei(l),{x:c,y:d}=l.internals.positionAbsolute;return Ss(n,[[c,d],[c+o,d+s]],e)}const yp=(n,e,l)=>n<e?lr(Math.abs(n-e),1,e)/e:n>l?-lr(Math.abs(n-l),1,e)/e:0,N0=(n,e,l=15,o=40)=>[yp(n.x,o,e.width-o)*l,yp(n.y,o,e.height-o)*l],kc=(n,e)=>({x:Math.min(n.x,e.x),y:Math.min(n.y,e.y),x2:Math.max(n.x2,e.x2),y2:Math.max(n.y2,e.y2)}),Ih=({x:n,y:e,width:l,height:o})=>({x:n,y:e,x2:n+l,y2:e+o}),Yc=({x:n,y:e,x2:l,y2:o})=>({x:n,y:e,width:l-n,height:o-e}),_s=(n,e=[0,0])=>{var s,c;const{x:l,y:o}=w0(n)?n.internals.positionAbsolute:Uc(n,e);return{x:l,y:o,width:((s=n.measured)==null?void 0:s.width)??n.width??n.initialWidth??0,height:((c=n.measured)==null?void 0:c.height)??n.height??n.initialHeight??0}},Nc=(n,e=[0,0])=>{var s,c;const{x:l,y:o}=w0(n)?n.internals.positionAbsolute:Uc(n,e);return{x:l,y:o,x2:l+(((s=n.measured)==null?void 0:s.width)??n.width??n.initialWidth??0),y2:o+(((c=n.measured)==null?void 0:c.height)??n.height??n.initialHeight??0)}},Sv=(n,e)=>Yc(kc(Ih(n),Ih(e))),_v=(n,e,l,o,s,c,d,h)=>{const g=Math.max(0,Math.min(n+l,s+d)-Math.max(n,s)),m=Math.max(0,Math.min(e+o,c+h)-Math.max(e,c));return Math.ceil(g*m)},Cc=(n,e)=>_v(n.x,n.y,n.width,n.height,e.x,e.y,e.width,e.height),vp=n=>{if(typeof n!="object"||n===null)return!1;const e=n;return Zi(e.width)&&Zi(e.height)&&Zi(e.x)&&Zi(e.y)},Zi=n=>typeof n=="number"&&!isNaN(n)&&isFinite(n),wv=(n,e)=>(l,o)=>{},zs=(n,e=[1,1])=>({x:e[0]*Math.round(n.x/e[0]),y:e[1]*Math.round(n.y/e[1])}),ar=({x:n,y:e},[l,o,s],c=!1,d=[1,1])=>{const h={x:(n-l)/s,y:(e-o)/s};return c?zs(h,d):h},or=({x:n,y:e},[l,o,s])=>({x:n*s+l,y:e*s+o});function Go(n,e){if(typeof n=="number")return Math.floor(n);if(typeof n=="string"&&n.endsWith("px")){const l=parseFloat(n);if(!Number.isNaN(l))return Math.floor(l)}if(typeof n=="string"&&n.endsWith("%")){const l=parseFloat(n);if(!Number.isNaN(l))return Math.floor(e*l*.01)}return console.error(`The padding value "${n}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function U5(n,e,l){if(typeof n=="string"||typeof n=="number"){const o=Go(n,l),s=Go(n,e);return{top:o,right:s,bottom:o,left:s,x:s*2,y:o*2}}if(typeof n=="object"){const o=Go(n.top??n.y??0,l),s=Go(n.bottom??n.y??0,l),c=Go(n.left??n.x??0,e),d=Go(n.right??n.x??0,e);return{top:o,right:d,bottom:s,left:c,x:c+d,y:o+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function k5(n,e,l,o,s,c){const{x:d,y:h}=or(n,[e,l,o]),{x:g,y:m}=or({x:n.x+n.width,y:n.y+n.height},[e,l,o]),p=s-g,y=c-m;return{left:Math.floor(d),top:Math.floor(h),right:Math.floor(p),bottom:Math.floor(y)}}const C0=(n,e,l,o=0,s=1/0,c=0)=>{const d=U5(c,e,l),h=(e-d.x)/n.width,g=(l-d.y)/n.height,m=lr(Math.min(h,g),o,s),p=n.x+n.width/2,y=n.y+n.height/2,v=e/2-p*m,E=l/2-y*m,w=k5(n,v,E,m,e,l),b={left:Math.min(w.left-d.left,0),top:Math.min(w.top-d.top,0),right:Math.min(w.right-d.right,0),bottom:Math.min(w.bottom-d.bottom,0)};return{x:v-b.left+b.right,y:E-b.top+b.bottom,zoom:m}},ws=()=>{var n;return typeof navigator<"u"&&((n=navigator==null?void 0:navigator.userAgent)==null?void 0:n.indexOf("Mac"))>=0};function Es(n){return n!=null&&n!=="parent"}function Ei(n){var e,l;return{width:((e=n.measured)==null?void 0:e.width)??n.width??n.initialWidth??0,height:((l=n.measured)==null?void 0:l.height)??n.height??n.initialHeight??0}}function Y5(n){var e,l;return(((e=n.measured)==null?void 0:e.width)??n.width??n.initialWidth)!==void 0&&(((l=n.measured)==null?void 0:l.height)??n.height??n.initialHeight)!==void 0}function Ev(n,e={width:0,height:0},l,o,s){const c={...n},d=o.get(l);if(d){const h=d.origin||s;c.x+=d.internals.positionAbsolute.x-(e.width??0)*h[0],c.y+=d.internals.positionAbsolute.y-(e.height??0)*h[1]}return c}function xp(n,e){if(n.size!==e.size)return!1;for(const l of n)if(!e.has(l))return!1;return!0}function q5(){let n,e;return{promise:new Promise((l,o)=>{n=l,e=o}),resolve:n,reject:e}}function V5(n){return{...pv,...n||{}}}function X5(n,e,l){return e?l?`${n}-${e}-${l}`:`${n}-${e}`:n}function G5(n,{nodeId:e,type:l,handleId:o}){var s;return Array.from(((s=n.get(X5(e,l,o)))==null?void 0:s.values())??[])}function Nv(n){return n===null?null:n?"valid":"invalid"}function bp(n){return n instanceof MouseEvent||qc(n)}function Sp(n){return n instanceof WheelEvent}function qc(n){return typeof TouchEvent<"u"&&n instanceof TouchEvent}function ms(n){return n instanceof MouseEvent}function _p(n){if(qc(n)){const e=n.touches[0]??n.changedTouches[0];return[(e==null?void 0:e.clientX)??0,(e==null?void 0:e.clientY)??0]}return[n.clientX,n.clientY]}function ps(n,{snapGrid:e=[0,0],snapToGrid:l=!1,transform:o,containerBounds:s}){const{x:c,y:d}=Si(n),h=ar({x:c-((s==null?void 0:s.left)??0),y:d-((s==null?void 0:s.top)??0)},o),{x:g,y:m}=l?zs(h,e):h;return{xSnapped:g,ySnapped:m,...h}}const M0=n=>({width:n.offsetWidth,height:n.offsetHeight}),Cv=n=>{var e;return((e=n==null?void 0:n.getRootNode)==null?void 0:e.call(n))||(window==null?void 0:window.document)},Z5=["INPUT","SELECT","TEXTAREA"];function Mv(n){var l,o;const e=((o=(l=n.composedPath)==null?void 0:l.call(n))==null?void 0:o[0])||n.target;return(e==null?void 0:e.nodeType)!==1?!1:Z5.includes(e.nodeName)||e.hasAttribute("contenteditable")||!!e.closest(".nokey")}const Si=(n,e)=>{var c,d;const l=ms(n),o=l?n.clientX:(c=n.touches)==null?void 0:c[0].clientX,s=l?n.clientY:(d=n.touches)==null?void 0:d[0].clientY;return{x:o-((e==null?void 0:e.left)??0),y:s-((e==null?void 0:e.top)??0)}},wp=(n,e,l,o,s)=>{const c=e.querySelectorAll(`.${n}`);return!c||!c.length?null:Array.from(c).map(d=>{const h=d.getBoundingClientRect();return{id:d.getAttribute("data-handleid"),type:n,nodeId:s,position:d.getAttribute("data-handlepos"),x:(h.left-l.left)/o,y:(h.top-l.top)/o,...M0(d)}})};function Tv({sourceX:n,sourceY:e,targetX:l,targetY:o,sourceControlX:s,sourceControlY:c,targetControlX:d,targetControlY:h}){const g=n*.125+s*.375+d*.375+l*.125,m=e*.125+c*.375+h*.375+o*.125;return[g,m,Math.abs(g-n),Math.abs(m-e)]}function Wu(n,e){return n>=0?.5*n:e*25*Math.sqrt(-n)}function Ep({pos:n,x1:e,y1:l,x2:o,y2:s,c}){switch(n){case"left":return[e-Wu(e-o,c),l];case"right":return[e+Wu(o-e,c),l];case"top":return[e,l-Wu(l-s,c)];case"bottom":return[e,l+Wu(s-l,c)]}}function Av({sourceX:n,sourceY:e,sourcePosition:l="bottom",targetX:o,targetY:s,targetPosition:c="top",curvature:d=.25}){const[h,g]=Ep({pos:l,x1:n,y1:e,x2:o,y2:s,c:d}),[m,p]=Ep({pos:c,x1:o,y1:s,x2:n,y2:e,c:d}),[y,v,E,w]=Tv({sourceX:n,sourceY:e,targetX:o,targetY:s,sourceControlX:h,sourceControlY:g,targetControlX:m,targetControlY:p});return[`M${n},${e} C${h},${g} ${m},${p} ${o},${s}`,y,v,E,w]}function Ov({sourceX:n,sourceY:e,targetX:l,targetY:o}){const s=Math.abs(l-n)/2,c=l<n?l+s:l-s,d=Math.abs(o-e)/2;return[c,o<e?o+d:o-d,s,d]}function Q5({sourceNode:n,targetNode:e,selected:l=!1,zIndex:o=0,elevateOnSelect:s=!1,zIndexMode:c="basic"}){return c==="manual"?o:(s&&l?o+1e3:o)+Math.max(n.parentId||s&&n.selected?n.internals.z:0,e.parentId||s&&e.selected?e.internals.z:0)}function K5({sourceNode:n,targetNode:e,width:l,height:o,transform:s}){const c=kc(Nc(n),Nc(e));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const d={x:-s[0]/s[2],y:-s[1]/s[2],width:l/s[2],height:o/s[2]};return Cc(d,Yc(c))>0}const $5=({source:n,sourceHandle:e,target:l,targetHandle:o})=>`xy-edge__${n}${e||""}-${l}${o||""}`,I5=(n,e)=>e.some(l=>l.source===n.source&&l.target===n.target&&(l.sourceHandle===n.sourceHandle||!l.sourceHandle&&!n.sourceHandle)&&(l.targetHandle===n.targetHandle||!l.targetHandle&&!n.targetHandle)),J5=(n,e,l={})=>{var c;if(!n.source||!n.target)return(c=l.onError)==null||c.call(l,"006",_i.error006()),e;const o=l.getEdgeId||$5;let s;return xv(n)?s={...n}:s={...n,id:o(n)},I5(s,e)?e:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,e.concat(s))};function zv({sourceX:n,sourceY:e,targetX:l,targetY:o}){const[s,c,d,h]=Ov({sourceX:n,sourceY:e,targetX:l,targetY:o});return[`M ${n},${e}L ${l},${o}`,s,c,d,h]}const Np={left:{x:-1,y:0},right:{x:1,y:0},top:{x:0,y:-1},bottom:{x:0,y:1}},F5=({source:n,sourcePosition:e="bottom",target:l})=>e==="left"||e==="right"?n.x<l.x?{x:1,y:0}:{x:-1,y:0}:n.y<l.y?{x:0,y:1}:{x:0,y:-1},Cp=(n,e)=>Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2)),P5=(n,e,l)=>n.x===e.x&&e.x===l.x&&(e.y-n.y)*(l.y-e.y)>=0||n.y===e.y&&e.y===l.y&&(e.x-n.x)*(l.x-e.x)>=0;function W5({source:n,sourcePosition:e="bottom",target:l,targetPosition:o="top",center:s,offset:c,stepPosition:d}){const h=Np[e],g=Np[o],m={x:n.x+h.x*c,y:n.y+h.y*c},p={x:l.x+g.x*c,y:l.y+g.y*c},y=F5({source:m,sourcePosition:e,target:p}),v=y.x!==0?"x":"y",E=y[v];let w,b,_;const N={x:0,y:0},C={x:0,y:0},[,,M,S]=Ov({sourceX:n.x,sourceY:n.y,targetX:l.x,targetY:l.y});if(h[v]*g[v]===-1){v==="x"?(b=s.x??m.x+(p.x-m.x)*d,_=s.y??(m.y+p.y)/2):(b=s.x??(m.x+p.x)/2,_=s.y??m.y+(p.y-m.y)*d);const H=[{x:b,y:m.y},{x:b,y:p.y}],z=[{x:m.x,y:_},{x:p.x,y:_}];h[v]===E?w=v==="x"?H:z:w=v==="x"?z:H}else{const H=[{x:m.x,y:p.y}],z=[{x:p.x,y:m.y}];if(v==="x"?w=h.x===E?z:H:w=h.y===E?H:z,e===o){const I=Math.abs(n[v]-l[v]);if(I<=c){const G=Math.min(c-1,c-I);h[v]===E?N[v]=(m[v]>n[v]?-1:1)*G:C[v]=(p[v]>l[v]?-1:1)*G}}if(e!==o){const I=v==="x"?"y":"x",G=h[v]===g[I],j=m[I]>p[I],X=m[I]<p[I];(h[v]===1&&(!G&&j||G&&X)||h[v]!==1&&(!G&&X||G&&j))&&(w=v==="x"?H:z)}const Y={x:m.x+N.x,y:m.y+N.y},Z={x:p.x+C.x,y:p.y+C.y};Math.max(Math.abs(Y.x-w[0].x),Math.abs(Z.x-w[0].x))>=Math.max(Math.abs(Y.y-w[0].y),Math.abs(Z.y-w[0].y))?(b=(Y.x+Z.x)/2,_=w[0].y):(b=w[0].x,_=(Y.y+Z.y)/2)}const T={x:m.x+N.x,y:m.y+N.y},L={x:p.x+C.x,y:p.y+C.y},R=[];for(const H of[n,T,...w,L,l]){const[z,Y]=R.slice(-2);Y&&P5(z,Y,H)&&R.pop(),R.push(H)}return[R,b,_,M,S]}function eE(n,e,l,o){const s=Math.min(Cp(n,e)/2,Cp(e,l)/2,o),{x:c,y:d}=e;if(n.x===c&&c===l.x||n.y===d&&d===l.y)return`L${c} ${d}`;if(n.y===d){const g=n.x<l.x?-1:1,m=n.y<l.y?1:-1;return`L ${c+s*g},${d}Q ${c},${d} ${c},${d+s*m}`}const h=n.x<l.x?1:-1;return`L ${c},${d+s*(n.y<l.y?-1:1)}Q ${c},${d} ${c+s*h},${d}`}function Jh({sourceX:n,sourceY:e,sourcePosition:l="bottom",targetX:o,targetY:s,targetPosition:c="top",borderRadius:d=5,centerX:h,centerY:g,offset:m=20,stepPosition:p=.5}){const[y,v,E,w,b]=W5({source:{x:n,y:e},sourcePosition:l,target:{x:o,y:s},targetPosition:c,center:{x:h,y:g},offset:m,stepPosition:p});let _=`M${y[0].x} ${y[0].y}`;for(let N=1;N<y.length-1;N++)_+=eE(y[N-1],y[N],y[N+1],d);return _+=`L${y[y.length-1].x} ${y[y.length-1].y}`,[_,v,E,w,b]}function Mp(n){var e;return n&&!!(n.internals.handleBounds||(e=n.handles)!=null&&e.length)&&!!(n.measured.width||n.width||n.initialWidth)}function tE(n){var y;const{sourceNode:e,targetNode:l}=n;if(!Mp(e)||!Mp(l))return null;const o=e.internals.handleBounds,s=l.internals.handleBounds,c=Tp((o==null?void 0:o.source)??[],n.sourceHandle),d=Tp(n.connectionMode==="strict"?(s==null?void 0:s.target)??[]:((s==null?void 0:s.target)??[]).concat((s==null?void 0:s.source)??[]),n.targetHandle);if(!c||!d)return(y=n.onError)==null||y.call(n,"008",_i.error008(c?"target":"source",{id:n.id,sourceHandle:n.sourceHandle,targetHandle:n.targetHandle})),null;const h=(c==null?void 0:c.position)||"bottom",g=(d==null?void 0:d.position)||"top",m=Ia(e,c,h),p=Ia(l,d,g);return{sourceX:m.x,sourceY:m.y,targetX:p.x,targetY:p.y,sourcePosition:h,targetPosition:g}}function Ia(n,e,l="left",o=!1){const s=((e==null?void 0:e.x)??0)+n.internals.positionAbsolute.x,c=((e==null?void 0:e.y)??0)+n.internals.positionAbsolute.y,{width:d,height:h}=e??Ei(n);if(o)return{x:s+d/2,y:c+h/2};switch((e==null?void 0:e.position)??l){case"top":return{x:s+d/2,y:c};case"right":return{x:s+d,y:c+h/2};case"bottom":return{x:s+d/2,y:c+h};case"left":return{x:s,y:c+h/2}}}function Tp(n,e){return n&&(e?n.find(l=>l.id===e):n[0])||null}function Fh(n,e){return n?typeof n=="string"?n:`${e?`${e}__`:""}${Object.keys(n).sort().map(l=>`${l}=${n[l]}`).join("&")}`:""}function nE(n,{id:e,defaultColor:l,defaultMarkerStart:o,defaultMarkerEnd:s}){const c=new Set;return n.reduce((d,h)=>([h.markerStart||o,h.markerEnd||s].forEach(g=>{if(g&&typeof g=="object"){const m=Fh(g,e);c.has(m)||(d.push({id:m,color:g.color||l,...g}),c.add(m))}}),d),[]).sort((d,h)=>d.id.localeCompare(h.id))}const Rv=1e3,iE=10,lE={nodeOrigin:[0,0],nodeExtent:ir,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},Dv={...lE,checkEquality:!0};function jv(n,e){const l={...n};for(const o in e)e[o]!==void 0&&(l[o]=e[o]);return l}function Hv(n,e,l=ir){const o=Uc(n,e),s=Es(n.extent)?n.extent:l;return Ss(o,s,Ei(n))}function aE(n,e){if(!n.handles)return n.measured?e==null?void 0:e.internals.handleBounds:void 0;const l=[],o=[];for(const s of n.handles){const c={id:s.id,width:s.width??1,height:s.height??1,nodeId:n.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?l.push(c):s.type==="target"&&o.push(c)}return{source:l,target:o}}function T0(n){return n==="manual"}function Ph(n,e,l,o={}){var _,N,C;const s=jv(Dv,o),c={i:0},d=new Map(e),h=!!((_=o.defaults)!=null&&_.parentId)||n.some(M=>!!M.parentId),g=s!=null&&s.elevateNodesOnSelect&&!T0(s.zIndexMode)?Rv:0,m=new Set,p=new Map;let y=n.length>0,v=!1;const E=new Set;function w(M){if(E.has(M.id)){const S=e.get(M.id);S&&Object.assign(S,M)}else E.add(M.id),e.set(M.id,M)}e.clear(),l.clear();const b={nodeLookup:e,parentLookup:l,options:o,rootParentIndex:c,processedNodes:m,deferredChildNodes:p,updateNode:w};for(const M of n){let S=d.get(M.id);s.checkEquality&&M===(S==null?void 0:S.internals.userNode)?e.set(M.id,S):(S={...s.defaults,...M,measured:{width:(N=M.measured)==null?void 0:N.width,height:(C=M.measured)==null?void 0:C.height},internals:{positionAbsolute:Hv(M,s.nodeOrigin,s.nodeExtent),handleBounds:aE(M,S),z:Uv(M,g,s.zIndexMode),userNode:M,isParent:!1}},w(S)),(S.measured===void 0||S.measured.width===void 0||S.measured.height===void 0)&&!S.hidden&&(y=!1),h&&Bv(S,b),v||(v=M.selected??!1)}for(const M of d.keys()){const S=e.get(M);S?S.internals.isParent&&!l.has(M)&&w({...S,internals:{...S.internals,isParent:!1}}):E.add(M)}return{nodesInitialized:y,hasSelectedNodes:v,updatedNodes:E}}function Bv(n,e){const{nodeLookup:l,parentLookup:o,options:s,rootParentIndex:c,processedNodes:d,deferredChildNodes:h,updateNode:g}=e;if(n.parentId&&!d.has(n.parentId)){const p=h.get(n.parentId)??[];p.push(n),h.set(n.parentId,p);return}n.parentId&&Lv(n,l,o,s,c,g),d.add(n.id);const m=h.get(n.id);m&&(h.delete(n.id),m.forEach(p=>Bv(p,e)))}function oE(n,e,l,o){if(!n.parentId)return;const s=e.get(n.parentId);s?s.set(n.id,n):e.set(n.parentId,new Map([[n.id,n]])),l.internals.isParent||o({...l,internals:{...l.internals,isParent:!0}})}function Lv(n,e,l,o,s,c=d=>{e.set(d.id,d)}){const d=jv(Dv,o),{zIndexMode:h}=d,g=n.parentId,m=e.get(g);if(!m){console.warn(`Parent node ${g} not found.`);return}s&&!m.parentId&&m.internals.rootParentIndex===void 0&&h==="auto"&&(m.internals.rootParentIndex=++s.i,m.internals.z=m.internals.z+s.i*iE),s&&m.internals.rootParentIndex!==void 0&&(s.i=m.internals.rootParentIndex),oE(rE(n,m,{nodeLookup:e,options:d,updateNode:c}),l,m,c)}function rE(n,e,l){const{elevateNodesOnSelect:o,nodeOrigin:s,nodeExtent:c,zIndexMode:d}=l.options,{x:h,y:g,z:m}=sE(n,e,s,c,o&&!T0(d)?Rv:0,d),{positionAbsolute:p}=n.internals,y=h!==p.x||g!==p.y;if(y||m!==n.internals.z){const v={...n,internals:{...n.internals,positionAbsolute:y?{x:h,y:g}:p,z:m}};return l.updateNode(v),v}return n}function Uv(n,e,l){const o=Zi(n.zIndex)?n.zIndex:0;return T0(l)?o:o+(n.selected?e:0)}function sE(n,e,l,o,s,c){const{x:d,y:h}=e.internals.positionAbsolute,g=Ei(n),m=Uc(n,l),p=Es(n.extent)?Ss(m,n.extent,g):m;let y=Ss({x:d+p.x,y:h+p.y},o,g);n.extent==="parent"&&(y=L5(y,g,e));const v=Uv(n,s,c),E=e.internals.z??0;return{x:y.x,y:y.y,z:E>=v?E+1:v}}function A0(n,e,l,o=[0,0]){var d;const s=[],c=new Map;for(const h of n){const g=e.get(h.parentId);if(!g)continue;const m=((d=c.get(h.parentId))==null?void 0:d.expandedRect)??_s(g),p=Sv(m,h.rect);c.set(h.parentId,{expandedRect:p,parent:g})}return c.size>0&&c.forEach(({expandedRect:h,parent:g},m)=>{var M;const p=g.internals.positionAbsolute,y=Ei(g),v=g.origin??o,E=h.x<p.x?Math.round(Math.abs(p.x-h.x)):0,w=h.y<p.y?Math.round(Math.abs(p.y-h.y)):0,b=Math.max(y.width,Math.round(h.width)),_=Math.max(y.height,Math.round(h.height)),N=(b-y.width)*v[0],C=(_-y.height)*v[1];(E>0||w>0||N||C)&&(s.push(e0(m,{x:g.position.x-E+N,y:g.position.y-w+C})),(M=l.get(m))==null||M.forEach(S=>{n.some(T=>T.id===S.id)||s.push(e0(S.id,{x:S.position.x+E,y:S.position.y+w}))})),(y.width<h.width||y.height<h.height||E||w)&&s.push({id:m,type:"dimensions",setAttributes:!0,dimensions:{width:b+(E?v[0]*E-N:0),height:_+(w?v[1]*w-C:0)}})}),s}function uE(n,e,l,o,s,c,d){const h=new Set,g=_=>{e.set(_.id,_),h.add(_.id)},m=o==null?void 0:o.querySelector(".xyflow__viewport");let p=!1;if(!m)return{changes:[],updatedInternals:p,updatedNodes:h};const y=[],v=window.getComputedStyle(m),{m22:E}=new window.DOMMatrixReadOnly(v.transform),w=[],b=[];for(const _ of n.values()){const N=e.get(_.id);if(!N)continue;if(N.hidden){g({...N,internals:{...N.internals,handleBounds:void 0}}),p=!0;continue}const C=M0(_.nodeElement),M=N.measured.width!==C.width||N.measured.height!==C.height;if(C.width&&C.height&&(M||!N.internals.handleBounds||_.force)){const S=_.nodeElement.getBoundingClientRect(),T={...N,measured:C};g({...T,internals:{...N.internals,positionAbsolute:N.parentId?N.internals.positionAbsolute:Hv(T,s,c),handleBounds:{source:wp("source",_.nodeElement,S,E,N.id),target:wp("target",_.nodeElement,S,E,N.id)}}}),p=!0,M&&(y.push(VE(N.id,C)),N.expandParent&&N.parentId&&b.push(N.id))}}if(p){const _={nodeOrigin:s,nodeExtent:c,zIndexMode:d};for(const N of l.values())for(const C of N.keys()){const M=e.get(C);M&&Lv(M,e,l,_,void 0,S=>g(S))}}for(const _ of b){const N=e.get(_);w.push({id:_,parentId:N.parentId,rect:_s(N,s)})}if(w.length>0){const _=A0(w,e,l,s);y.push(..._)}return{changes:y,updatedInternals:p,updatedNodes:h}}async function cE({delta:n,panZoom:e,transform:l,translateExtent:o,width:s,height:c}){if(!e||!n.x&&!n.y)return!1;const d=await e.setViewportConstrained({x:l[0]+n.x,y:l[1]+n.y,zoom:l[2]},[[0,0],[s,c]],o);return!!d&&(d.x!==l[0]||d.y!==l[1]||d.k!==l[2])}function Ap(n,e,l,o,s,c,d){let h=s,g=o.get(h);(!g||!d.has(h))&&(g=new Map(g),d.add(h),o.set(h,g)),g.set(l,e),h=`${s}-${n}`;let m=o.get(h);if((!m||!d.has(h))&&(m=new Map(m),d.add(h),o.set(h,m)),m.set(l,e),c){h=`${s}-${n}-${c}`;let p=o.get(h);(!p||!d.has(h))&&(p=new Map(p),d.add(h),o.set(h,p)),p.set(l,e)}}function Op(n,e,l,o,s,c){const d=[o,`${o}-${n}`];s&&d.push(`${o}-${n}-${s}`);for(const h of d){let g=l.get(h);g&&(c.has(h)||(g=new Map(g),l.set(h,g),c.add(h)),g.delete(e),g.size===0&&l.delete(h))}}function Ch(n,e,l,o){const{source:s,target:c,sourceHandle:d=null,targetHandle:h=null}=e,g={edgeId:e.id,source:s,target:c,sourceHandle:d,targetHandle:h},m=`${s}-${d}--${c}-${h}`,p=`${c}-${h}--${s}-${d}`;l==="add"?(Ap("source",g,p,n,s,d,o),Ap("target",g,m,n,c,h,o)):(Op("source",p,n,s,d,o),Op("target",m,n,c,h,o))}function kv(n,e,l){const o=new Map(e),s=new Set,c=new Set,d=[];e.clear();for(const h of l){const g=o.get(h.id);if(g===h){e.set(h.id,h);continue}(!g||g.source!==h.source||g.target!==h.target||g.sourceHandle!=h.sourceHandle||g.targetHandle!=h.targetHandle)&&(g&&Ch(n,g,"remove",c),d.push(h)),e.set(h.id,h),s.add(h.id)}for(const h of o.values())e.has(h.id)||(Ch(n,h,"remove",c),s.add(h.id));for(const h of d)Ch(n,h,"add",c);return{updatedEdges:s}}function fE(n,e,l,o,s){const c=e.get(n);if(!c){console.warn(`changeParent: Node "${n}" does not exists`);return}if(l===n)return;const d=c.internals.positionAbsolute,h=c.origin??o,g=Ei(c),m={x:h[0]*g.width,y:h[1]*g.height};if(l===null){s({nodeId:n,parentId:l,x:d.x+m.x,y:d.y+m.y});return}const p=e.get(l);if(!p){console.warn(`changeParent: Parent node "${l}" does not exists`);return}const y=p.internals.positionAbsolute;s({nodeId:n,parentId:l,x:d.x+m.x-y.x,y:d.y+m.y-y.y})}function Yv(n,e){if(!n.parentId)return!1;const l=e.get(n.parentId);return l?l.selected?!0:Yv(l,e):!1}function zp(n,e,l){var s;let o=n;do{if((s=o==null?void 0:o.matches)!=null&&s.call(o,e))return!0;if(o===l)return!1;o=o==null?void 0:o.parentElement}while(o);return!1}function dE(n,e,l,o,s){const c=new Map;for(const[d,h]of n)if((s?h.id===o:h.selected||h.id===o)&&(s||!h.parentId||!Yv(h,n))&&(h.draggable||e&&typeof h.draggable>"u")){const g=n.get(d);g&&c.set(d,{id:d,position:g.position||{x:0,y:0},distance:{x:l.x-g.internals.positionAbsolute.x,y:l.y-g.internals.positionAbsolute.y},extent:g.extent,parentId:g.parentId,origin:g.origin,expandParent:g.expandParent,internals:{positionAbsolute:g.internals.positionAbsolute||{x:0,y:0}},measured:{width:g.measured.width??0,height:g.measured.height??0}})}return c}function Mh({nodeId:n,dragItems:e,nodeLookup:l,dragging:o=!0}){var d,h,g;const s=[];for(const[m,p]of e){const y=(d=l.get(m))==null?void 0:d.internals.userNode;y&&s.push({...y,position:p.position,dragging:o})}if(!n)return[s[0],s];const c=(h=l.get(n))==null?void 0:h.internals.userNode;return[c?{...c,position:((g=e.get(n))==null?void 0:g.position)||c.position,dragging:o}:s[0],s]}function hE({dragItems:n,snapGrid:e,x:l,y:o}){const s=n.values().next().value;if(!s)return null;const c={x:l-s.distance.x,y:o-s.distance.y},d=zs(c,e);return{x:d.x-c.x,y:d.y-c.y}}function gE({onNodeMouseDown:n,getStoreItems:e,onDragStart:l,onDrag:o,onDragStop:s}){let c={x:null,y:null},d=0,h=new Map,g=!1,m={x:0,y:0},p={x:0,y:0},y=null,v=!1,E=null,w=!1,b=!1,_=null;function N(S){const T=S.view??window,L=R=>{R.preventDefault(),R.stopImmediatePropagation()};T.addEventListener("click",L,{capture:!0}),setTimeout(()=>T.removeEventListener("click",L,{capture:!0}),0)}function C({noDragClassName:S,handleSelector:T,domNode:L,isSelectable:R,nodeId:H}){E=Xn(L);function z({x:G,y:j}){const{nodeLookup:X,nodeExtent:B,snapGrid:k,snapToGrid:U,nodeOrigin:Q,onNodeDrag:P,onSelectionDrag:re,onError:fe,updateNodePositions:oe}=e();c={x:G,y:j};let O=!1;const V=h.size>1,F=V&&B?Ih(Os(h)):null,K=V&&U?hE({dragItems:h,snapGrid:k,x:G,y:j}):null;for(const[J,ee]of h){if(!X.has(J))continue;let ie={x:G-ee.distance.x,y:j-ee.distance.y};U&&(ie=K?{x:Math.round(ie.x+K.x),y:Math.round(ie.y+K.y)}:zs(ie,k));let le=null;if(V&&B&&!ee.extent&&F){const{positionAbsolute:ve}=ee.internals,Se=ve.x-F.x+B[0][0],be=ve.x+ee.measured.width-F.x2+B[1][0],xe=ve.y-F.y+B[0][1],pe=ve.y+ee.measured.height-F.y2+B[1][1];le=[[Se,xe],[be,pe]]}const{position:ce,positionAbsolute:me}=bv({nodeId:J,nextPosition:ie,nodeLookup:X,nodeExtent:le||B,nodeOrigin:Q,onError:fe});O=O||ee.position.x!==ce.x||ee.position.y!==ce.y,ee.position=ce,ee.internals.positionAbsolute=me}if(b=b||O,!!O&&(oe(h,!0),_&&(o||P||!H&&re))){const[J,ee]=Mh({nodeId:H,dragItems:h,nodeLookup:X});o==null||o(_,h,J,ee),P==null||P(_,J,ee),H||re==null||re(_,ee)}}async function Y(){if(!y)return;const{transform:G,panBy:j,autoPanSpeed:X,autoPanOnNodeDrag:B}=e();if(!B){g=!1,cancelAnimationFrame(d);return}const[k,U]=N0(m,y,X);(k!==0||U!==0)&&(c.x=(c.x??0)-k/G[2],c.y=(c.y??0)-U/G[2],await j({x:k,y:U})&&z(c)),d=requestAnimationFrame(()=>{Y()})}function Z(G){var F,K;const{nodeLookup:j,multiSelectionActive:X,nodesDraggable:B,transform:k,snapGrid:U,snapToGrid:Q,selectNodesOnDrag:P,onNodeDragStart:re,onSelectionDragStart:fe,unselectNodesAndEdges:oe}=e();v=!0;const O=!!H&&!X&&!((F=j.get(H))!=null&&F.selected);(!P||!R)&&!X&&H&&((K=j.get(H))!=null&&K.selected||oe()),R&&P&&H&&(n==null||n(H));const V=ps(G.sourceEvent,{transform:k,snapGrid:U,snapToGrid:Q,containerBounds:y});if(c=V,h=dE(j,B,V,H,O),h.size>0&&(l||re||!H&&fe)){const[J,ee]=Mh({nodeId:H,dragItems:h,nodeLookup:j});l==null||l(G.sourceEvent,h,J,ee),re==null||re(G.sourceEvent,J,ee),H||fe==null||fe(G.sourceEvent,ee)}}const I=Xy().clickDistance(1/0).on("start",G=>{const{domNode:j,nodeDragThreshold:X,transform:B,snapGrid:k,snapToGrid:U}=e();y=(j==null?void 0:j.getBoundingClientRect())||null,v=!1,g=!1,w=!1,b=!1,_=G.sourceEvent,X===0&&Z(G),c=ps(G.sourceEvent,{transform:B,snapGrid:k,snapToGrid:U,containerBounds:y}),m=Si(G.sourceEvent,y),p=m}).on("drag",G=>{const{autoPanOnNodeDrag:j,transform:X,snapGrid:B,snapToGrid:k,nodeDragThreshold:U,nodeLookup:Q}=e();_=G.sourceEvent;const P=ps(_,{transform:X,snapGrid:B,snapToGrid:k,containerBounds:y});if((qc(_)&&_.type==="touchmove"&&_.touches.length>1||H&&!Q.has(H))&&(w=!0),!w){if(!g&&j&&v&&(g=!0,Y()),!v){const re=Si(G.sourceEvent,y),fe=re.x-p.x,oe=re.y-p.y;Math.hypot(fe,oe)>U&&Z(G)}(c.x!==P.xSnapped||c.y!==P.ySnapped)&&h&&v&&(m=Si(_,y),z(P))}}).on("end",G=>{if((!L.contains(G.sourceEvent.target)||b)&&N(G.sourceEvent),!v||w){w&&h.size>0&&e().updateNodePositions(h,!1);return}if(cancelAnimationFrame(d),h.size>0){const{nodeLookup:j,updateNodePositions:X,onNodeDragStop:B,onSelectionDragStop:k}=e();if(b&&(X(h,!1),b=!1),s||B||!H&&k){const[U,Q]=Mh({nodeId:H,dragItems:h,nodeLookup:j,dragging:!1});s==null||s(G.sourceEvent,h,U,Q),B==null||B(G.sourceEvent,U,Q),H||k==null||k(G.sourceEvent,Q)}}}).filter(G=>{const j=G.target;return!G.button&&(!S||!zp(j,`.${S}`,L))&&(!T||zp(j,T,L))});E.call(I)}function M(){E==null||E.on(".drag",null)}return{update:C,destroy:M}}function mE(n,e,l){const o=[],s={x:n.x-l,y:n.y-l,width:l*2,height:l*2};for(const c of e.values())Cc(s,_s(c))>0&&o.push(c);return o}const pE=250;function yE(n,e,l,o){var h,g;let s=[],c=1/0;const d=mE(n,l,e+pE);for(const m of d){const p=[...((h=m.internals.handleBounds)==null?void 0:h.source)??[],...((g=m.internals.handleBounds)==null?void 0:g.target)??[]];for(const y of p){if(o.nodeId===y.nodeId&&o.type===y.type&&o.id===y.id)continue;const{x:v,y:E}=Ia(m,y,y.position,!0),w=Math.sqrt(Math.pow(v-n.x,2)+Math.pow(E-n.y,2));w>e||(w<c?(s=[{...y,x:v,y:E}],c=w):w===c&&s.push({...y,x:v,y:E}))}}if(!s.length)return null;if(s.length>1){const m=o.type==="source"?"target":"source";return s.find(p=>p.type===m)??s[0]}return s[0]}function qv(n,e,l,o,s,c=!1){var m,p,y;const d=o.get(n);if(!d)return null;const h=s==="strict"?(m=d.internals.handleBounds)==null?void 0:m[e]:[...((p=d.internals.handleBounds)==null?void 0:p.source)??[],...((y=d.internals.handleBounds)==null?void 0:y.target)??[]],g=(l?h==null?void 0:h.find(v=>v.id===l):h==null?void 0:h[0])??null;return g&&c?{...g,...Ia(d,g,g.position,!0)}:g}function Vv(n,e){return n||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function vE(n,e){let l=null;return e?l=!0:n&&!e&&(l=!1),l}const Xv=()=>!0;function xE(n,{connectionMode:e,connectionRadius:l,handleId:o,nodeId:s,edgeUpdaterType:c,isTarget:d,domNode:h,nodeLookup:g,lib:m,autoPanOnConnect:p,flowId:y,panBy:v,cancelConnection:E,onConnectStart:w,onConnect:b,onConnectEnd:_,isValidConnection:N=Xv,onReconnectEnd:C,updateConnection:M,getTransform:S,getFromHandle:T,autoPanSpeed:L,dragThreshold:R=1,handleDomNode:H}){const z=Cv(n.target);let Y=0,Z;const{x:I,y:G}=Si(n),j=Vv(c,H),X=h==null?void 0:h.getBoundingClientRect();let B=!1;if(!X||!j)return;const k=qv(s,j,o,g,e);if(!k)return;let U=Si(n,X),Q=!1,P=null,re=!1,fe=null;function oe(){if(!p||!X)return;const[ie,le]=N0(U,X,L);v({x:ie,y:le}),Y=requestAnimationFrame(oe)}const O={...k,nodeId:s,type:j,position:k.position},V=g.get(s);let F={inProgress:!0,isValid:null,from:Ia(V,O,"left",!0),fromHandle:O,fromPosition:O.position,fromNode:V,to:U,toHandle:null,toPosition:pp[O.position],toNode:null,pointer:U};function K(){B=!0,M(F),w==null||w(n,{nodeId:s,handleId:o,handleType:j})}R===0&&K();function J(ie){if(!B){const{x:be,y:xe}=Si(ie),pe=be-I,Ee=xe-G;if(!(pe*pe+Ee*Ee>R*R))return;K()}if(!T()||!O){ee(ie);return}const le=S();U=Si(ie,X),Z=yE(ar(U,le,!1,[1,1]),l,g,O),Q||(oe(),Q=!0);const ce=Gv(ie,{handle:Z,connectionMode:e,fromNodeId:s,fromHandleId:o,fromType:d?"target":"source",isValidConnection:N,doc:z,lib:m,flowId:y,nodeLookup:g});fe=ce.handleDomNode,P=ce.connection,re=vE(!!Z,ce.isValid);const me=g.get(s),ve=me?Ia(me,O,"left",!0):F.from,Se={...F,from:ve,isValid:re,to:ce.toHandle&&re?or({x:ce.toHandle.x,y:ce.toHandle.y},le):U,toHandle:ce.toHandle,toPosition:re&&ce.toHandle?ce.toHandle.position:pp[O.position],toNode:ce.toHandle?g.get(ce.toHandle.nodeId):null,pointer:U};M(Se),F=Se}function ee(ie){if(!("touches"in ie&&ie.touches.length>0)){if(B){(Z||fe)&&P&&re&&(b==null||b(P));const{inProgress:le,...ce}=F,me={...ce,to:ar(F.to,S()),toPosition:F.toHandle?F.toPosition:null};_==null||_(ie,me),c&&(C==null||C(ie,me))}E(),cancelAnimationFrame(Y),Q=!1,re=!1,P=null,fe=null,z.removeEventListener("mousemove",J),z.removeEventListener("mouseup",ee),z.removeEventListener("touchmove",J),z.removeEventListener("touchend",ee)}}z.addEventListener("mousemove",J),z.addEventListener("mouseup",ee),z.addEventListener("touchmove",J),z.addEventListener("touchend",ee)}function Gv(n,{handle:e,connectionMode:l,fromNodeId:o,fromHandleId:s,fromType:c,doc:d,lib:h,flowId:g,isValidConnection:m=Xv,nodeLookup:p}){const y=c==="target",v=e?d.querySelector(`.${h}-flow__handle[data-id="${g}-${e==null?void 0:e.nodeId}-${e==null?void 0:e.id}-${e==null?void 0:e.type}"]`):null,{x:E,y:w}=Si(n),b=d.elementFromPoint(E,w),_=b!=null&&b.classList.contains(`${h}-flow__handle`)?b:v,N={handleDomNode:_,isValid:!1,connection:null,toHandle:null};if(_){const C=Vv(void 0,_),M=_.getAttribute("data-nodeid"),S=_.getAttribute("data-handleid"),T=_.classList.contains("connectable"),L=_.classList.contains("connectableend");if(!M||!C)return N;const R={source:y?M:o,sourceHandle:y?S:s,target:y?o:M,targetHandle:y?s:S};N.connection=R,N.isValid=T&&L&&(l==="strict"?y&&C==="source"||!y&&C==="target":M!==o||S!==s)&&m(R),N.toHandle=qv(M,C,S,p,l,!0)}return N}const Wh={onPointerDown:xE,isValid:Gv};function bE({domNode:n,panZoom:e,getTransform:l,getViewScale:o}){const s=Xn(n);function c({translateExtent:h,width:g,height:m,zoomStep:p=1,pannable:y=!0,zoomable:v=!0,inversePan:E=!1}){const w=M=>{const S=M.sourceEvent;if(!Sp(S)||!e)return;const T=l(),L=S.ctrlKey&&ws()?10:1,R=-S.deltaY*(S.deltaMode===1?.05:S.deltaMode?1:.002)*p,H=T[2]*Math.pow(2,R*L);e.scaleTo(H)};let b=[0,0];const _=M=>{const S=M.sourceEvent;bp(S)&&(S.type==="mousedown"||S.type==="touchstart")&&(b=_p(S))},N=M=>{const S=l(),T=M.sourceEvent;if(!bp(T)||Sp(T)||!e)return;const L=_p(T),R=[L[0]-b[0],L[1]-b[1]];b=L;const H=o()*Math.max(S[2],Math.log(S[2]))*(E?-1:1),z={x:S[0]-R[0]*H,y:S[1]-R[1]*H},Y=[[0,0],[g,m]];e.setViewportConstrained({x:z.x,y:z.y,zoom:S[2]},Y,h)},C=hv().on("start",_).on("zoom",y?N:null).on("zoom.wheel",v?w:null);s.call(C,{})}function d(){s.on("zoom",null)}return{update:c,destroy:d,pointer:vi}}const Vc=n=>({x:n.x,y:n.y,zoom:n.k}),Th=({x:n,y:e,zoom:l})=>Lc.translate(n,e).scale(l),ra=(n,e)=>{if(!e)return!1;const l=n.target;return l instanceof Element&&!!l.closest(`.${e}`)},SE=n=>n===!0||Array.isArray(n)&&n.includes(0),_E=(n,e)=>e===2&&Array.isArray(n)&&n.includes(2),wE=n=>((n*=2)<=1?n*n*n:(n-=2)*n*n+2)/2,Ah=(n,e=0,l=wE,o=()=>{})=>{const s=typeof e=="number"&&e>0;return s||o(!0),s?n.transition().duration(e).ease(l).on("end",()=>o(!0)).on("interrupt cancel",()=>o(!1)):n},Zv=n=>{const e=n.ctrlKey&&ws()?10:1;return-n.deltaY*(n.deltaMode===1?.05:n.deltaMode?1:.002)*e};function EE({zoomPanValues:n,noWheelClassName:e,d3Selection:l,d3Zoom:o,panOnScrollMode:s,panOnScrollSpeed:c,zoomOnPinch:d,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:m}){return p=>{if(ra(p,e))return p.ctrlKey&&p.preventDefault(),!1;p.preventDefault(),p.stopImmediatePropagation();const y=l.property("__zoom").k||1;if(p.ctrlKey&&d){const _=vi(p),N=Zv(p),C=y*Math.pow(2,N);o.scaleTo(l,C,_,p);return}const v=p.deltaMode===1?20:1;let E=s==="vertical"?0:p.deltaX*v,w=s==="horizontal"?0:p.deltaY*v;!ws()&&p.shiftKey&&s!=="vertical"&&(E=p.deltaY*v,w=0),o.translateBy(l,-(E/y)*c,-(w/y)*c,{internal:!0});const b=Vc(l.property("__zoom"));clearTimeout(n.panScrollTimeout),n.isPanScrolling?g==null||g(p,b):(n.isPanScrolling=!0,h==null||h(p,b)),n.panScrollTimeout=setTimeout(()=>{m==null||m(p,b),n.isPanScrolling=!1},150)}}function NE({noWheelClassName:n,preventScrolling:e,d3ZoomHandler:l}){return function(o,s){const c=o.type==="wheel",d=!e&&c&&!o.ctrlKey,h=ra(o,n);if(o.ctrlKey&&c&&h&&o.preventDefault(),d||h)return null;o.preventDefault(),l.call(this,o,s)}}function Qv(n,e,l){const o=n.pointerDrag;!o||o.moveStarted||(o.moveStarted=!0,l==null||l(e,n.prevViewport))}function Kv(n,e,l,o){const s=n.pointerDrag;s&&(Qv(n,e,o),s.dragging=!0,s.isTouch||l(!0))}function CE(n){return(n==null?void 0:n.type)==="mousemove"||(n==null?void 0:n.type)==="touchmove"}function ME(n,e){return"touches"in n?Array.from(n.touches).find(l=>l.identifier===e)??null:n}function TE({zoomPanValues:n,paneDragThreshold:e,onDraggingChange:l,onPanZoomStart:o}){return s=>{const c=s.sourceEvent;if(!c||c.internal)return;const d=Vc(s.transform);n.mouseButton="button"in c?c.button:0,n.isZoomingOrPanning=!0,n.prevViewport=d,n.pointerDrag=null;const h=c.type==="touchstart";if(c.type==="mousedown"||h){const g=h?c.touches[0]:null,{clientX:m,clientY:p}=g??c;n.pointerDrag={isTouch:h,touchId:(g==null?void 0:g.identifier)??null,startX:m,startY:p,startTransform:s.transform,thresholdCrossed:!1,lastMove:null,moveStarted:!1,dragging:!1},e===0&&Kv(n,c,l,o);return}o==null||o(c,d)}}function AE({zoomPanValues:n,d3Selection:e,paneDragThreshold:l,onDraggingChange:o,onTransformChange:s,onPanZoomStart:c,onPanZoom:d}){return h=>{const g=h.sourceEvent,m=n.pointerDrag;if(m){const p=CE(g)&&g!==m.lastMove;if(p&&(m.lastMove=g),p&&!m.thresholdCrossed){const y=ME(g,m.touchId),v="touches"in g&&g.touches.length>1;if(!y||v)m.thresholdCrossed=!0;else{const E=y.clientX-m.startX,w=y.clientY-m.startY;m.thresholdCrossed=E*E+w*w>l*l}}if(!m.dragging)if(!p)m.startTransform=h.transform,g!=null&&g.internal||Qv(n,g,c);else if(m.thresholdCrossed)Kv(n,g,o,c);else{e.property("__zoom",m.startTransform);return}}g!=null&&g.sync||s([h.transform.x,h.transform.y,h.transform.k]),d&&!(g!=null&&g.internal)&&(!m||m.moveStarted)&&(d==null||d(h.sourceEvent,Vc(h.transform)))}}function OE({zoomPanValues:n,panOnDrag:e,panOnScroll:l,onDraggingChange:o,onPanZoomEnd:s,onPaneContextMenu:c}){return d=>{var g;if((g=d.sourceEvent)!=null&&g.internal)return;n.isZoomingOrPanning=!1;const h=n.pointerDrag;if(n.pointerDrag=null,c&&_E(e,n.mouseButton??0)&&!(h!=null&&h.thresholdCrossed)&&d.sourceEvent&&c(d.sourceEvent),!(h&&!h.moveStarted)&&(o(!1),s)){const m=Vc(d.transform);n.prevViewport=m,clearTimeout(n.timerId),n.timerId=setTimeout(()=>{s==null||s(d.sourceEvent,m)},l?150:0)}}}function zE({panActivationKeyPressed:n,zoomActivationKeyPressed:e,zoomOnScroll:l,zoomOnPinch:o,panOnDrag:s,panOnScroll:c,zoomOnDoubleClick:d,userSelectionActive:h,noWheelClassName:g,noPanClassName:m,lib:p,connectionInProgress:y}){return v=>{const E=e||l,w=o&&v.ctrlKey,b=v.type==="wheel";if((s===!0||Array.isArray(s)&&s.includes(1))&&ms(v)&&v.button===1&&v.type==="mousedown"&&(ra(v,`${p}-flow__node`)||ra(v,`${p}-flow__edge`)||ra(v,`${p}-flow__selection`)||ra(v,`${p}-flow__nodesselection`)))return!0;if(!s&&!E&&!c&&!d&&!o||h||y&&!b||ra(v,g)&&b||ra(v,m)&&(!b||c&&b&&!e)||!o&&v.ctrlKey&&b)return!1;if(!o&&qc(v)&&v.type==="touchstart"&&v.touches.length>1)return v.preventDefault(),!1;if(!E&&!c&&!w&&b||!s&&(v.type==="mousedown"||v.type==="touchstart")||Array.isArray(s)&&ms(v)&&v.type==="mousedown"&&!s.includes(v.button))return!1;const _=ms(v)?v.button:0,N=Array.isArray(s)&&s.includes(_)||_<=1;return(!v.ctrlKey||b||n)&&N}}function RE({domNode:n,minZoom:e,maxZoom:l,translateExtent:o,viewport:s,onPanZoom:c,onPanZoomStart:d,onPanZoomEnd:h,onDraggingChange:g}){const m={isZoomingOrPanning:!1,prevViewport:{x:0,y:0,zoom:0},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1,pointerDrag:null},p=n.getBoundingClientRect();let y=[[0,0],[p.width,p.height]];const v=typeof ResizeObserver<"u"?new ResizeObserver(I=>{const G=I[0];G!=null&&G.contentRect&&(y=[[0,0],[G.contentRect.width,G.contentRect.height]])}):null;v==null||v.observe(n);const E=hv().extent(()=>y).scaleExtent([e,l]).translateExtent(o),w=Xn(n).call(E);S({x:s.x,y:s.y,zoom:lr(s.zoom,e,l)},[[0,0],[p.width,p.height]],o);const b=w.on("wheel.zoom"),_=w.on("dblclick.zoom");E.wheelDelta(Zv);async function N(I,G){return w?new Promise(j=>{E==null||E.interpolate((G==null?void 0:G.interpolate)==="linear"?gs:oc).transform(Ah(w,G==null?void 0:G.duration,G==null?void 0:G.ease,j),I)}):!1}function C({noWheelClassName:I,noPanClassName:G,onPaneContextMenu:j,userSelectionActive:X,panOnScroll:B,panOnDrag:k,panOnScrollMode:U,panOnScrollSpeed:Q,preventScrolling:P,zoomOnPinch:re,zoomOnScroll:fe,zoomOnDoubleClick:oe,panActivationKeyPressed:O=!1,zoomActivationKeyPressed:V,lib:F,onTransformChange:K,connectionInProgress:J,paneDragThreshold:ee}){X&&!m.isZoomingOrPanning&&E.on("zoom",null);const ie=B&&!V&&!X,le=Zi(ee)&&ee>0?ee:0;E.clickDistance(le);const ce=ie?EE({zoomPanValues:m,noWheelClassName:I,d3Selection:w,d3Zoom:E,panOnScrollMode:U,panOnScrollSpeed:Q,zoomOnPinch:re,onPanZoomStart:d,onPanZoom:c,onPanZoomEnd:h}):NE({noWheelClassName:I,preventScrolling:P,d3ZoomHandler:b});w.on("wheel.zoom",ce,{passive:!1});const me=TE({zoomPanValues:m,paneDragThreshold:le,onDraggingChange:g,onPanZoomStart:d});E.on("start",me);const ve=AE({zoomPanValues:m,d3Selection:w,paneDragThreshold:le,onPanZoomStart:d,onPanZoom:c,onDraggingChange:g,onTransformChange:K});E.on("zoom",ve);const Se=OE({zoomPanValues:m,panOnDrag:k,panOnScroll:B,onPaneContextMenu:j,onPanZoomEnd:h,onDraggingChange:g});E.on("end",Se);const be=zE({panActivationKeyPressed:O,zoomActivationKeyPressed:V,panOnDrag:k,zoomOnScroll:fe,panOnScroll:B,zoomOnDoubleClick:oe,zoomOnPinch:re,userSelectionActive:X,noPanClassName:G,noWheelClassName:I,lib:F,connectionInProgress:J});E.filter(be),oe?w.on("dblclick.zoom",_):w.on("dblclick.zoom",null)}function M(){E.on("zoom",null),v==null||v.disconnect()}async function S(I,G,j){const X=Th(I),B=E==null?void 0:E.constrain()(X,G,j);return B&&await N(B),B}async function T(I,G){return N(Th(I),G)}function L(I){if(w){const G=Th(I),j=w.property("__zoom");(j.k!==I.zoom||j.x!==I.x||j.y!==I.y)&&(E==null||E.transform(w,G,null,{sync:!0}))}}function R(){const I=w?dv(w.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function H(I,G){return w?new Promise(j=>{E==null||E.interpolate((G==null?void 0:G.interpolate)==="linear"?gs:oc).scaleTo(Ah(w,G==null?void 0:G.duration,G==null?void 0:G.ease,j),I)}):!1}async function z(I,G){return w?new Promise(j=>{E==null||E.interpolate((G==null?void 0:G.interpolate)==="linear"?gs:oc).scaleBy(Ah(w,G==null?void 0:G.duration,G==null?void 0:G.ease,j),I)}):!1}function Y(I){E==null||E.scaleExtent(I)}function Z(I){E==null||E.translateExtent(I)}return{update:C,destroy:M,setViewport:T,setViewportConstrained:S,getViewport:R,scaleTo:H,scaleBy:z,setScaleExtent:Y,setTranslateExtent:Z,syncViewport:L}}let Mc=(function(n){return n.Line="line",n.Handle="handle",n})({});function DE({width:n,prevWidth:e,height:l,prevHeight:o,affectsX:s,affectsY:c}){const d=n-e,h=l-o,g=[d>0?1:d<0?-1:0,h>0?1:h<0?-1:0];return d&&s&&(g[0]=g[0]*-1),h&&c&&(g[1]=g[1]*-1),g}function Rp(n){return{isHorizontal:n.includes("right")||n.includes("left"),isVertical:n.includes("bottom")||n.includes("top"),affectsX:n.includes("left"),affectsY:n.includes("top")}}function aa(n,e){return Math.max(0,e-n)}function oa(n,e){return Math.max(0,n-e)}function ec(n,e,l){return Math.max(0,e-n,n-l)}function Dp(n,e){return n?!e:e}function jE(n,e,l,o,s,c,d,h){let{affectsX:g,affectsY:m}=e;const{isHorizontal:p,isVertical:y}=e,v=p&&y,{xSnapped:E,ySnapped:w}=l,{minWidth:b,maxWidth:_,minHeight:N,maxHeight:C}=o,{x:M,y:S,width:T,height:L,aspectRatio:R}=n;let H=Math.floor(p?E-n.pointerX:0),z=Math.floor(y?w-n.pointerY:0);const Y=T+(g?-H:H),Z=L+(m?-z:z),I=-c[0]*T,G=-c[1]*L;let j=ec(Y,b,_),X=ec(Z,N,C);if(d){let U=0,Q=0;g&&H<0?U=aa(M+H+I,d[0][0]):!g&&H>0&&(U=oa(M+Y+I,d[1][0])),m&&z<0?Q=aa(S+z+G,d[0][1]):!m&&z>0&&(Q=oa(S+Z+G,d[1][1])),j=Math.max(j,U),X=Math.max(X,Q)}if(h){let U=0,Q=0;g&&H>0?U=oa(M+H,h[0][0]):!g&&H<0&&(U=aa(M+Y,h[1][0])),m&&z>0?Q=oa(S+z,h[0][1]):!m&&z<0&&(Q=aa(S+Z,h[1][1])),j=Math.max(j,U),X=Math.max(X,Q)}if(s){if(p){const U=ec(Y/R,N,C)*R;if(j=Math.max(j,U),d){const Q=!g&&!m||g&&!m&&v?oa(S+G+Y/R,d[1][1])*R:aa(S+G+(g?H:-H)/R,d[0][1])*R;j=Math.max(j,Q)}if(h){const Q=!g&&!m||g&&!m&&v?aa(S+Y/R,h[1][1])*R:oa(S+(g?H:-H)/R,h[0][1])*R;j=Math.max(j,Q)}}if(y){const U=ec(Z*R,b,_)/R;if(X=Math.max(X,U),d){const Q=!g&&!m||m&&!g&&v?oa(M+Z*R+I,d[1][0])/R:aa(M+(m?z:-z)*R+I,d[0][0])/R;X=Math.max(X,Q)}if(h){const Q=!g&&!m||m&&!g&&v?aa(M+Z*R,h[1][0])/R:oa(M+(m?z:-z)*R,h[0][0])/R;X=Math.max(X,Q)}}}z=z+(z<0?X:-X),H=H+(H<0?j:-j),s&&(v?Y>Z*R?z=(Dp(g,m)?-H:H)/R:H=(Dp(g,m)?-z:z)*R:p?(z=H/R,m=g):(H=z*R,g=m));const B=g?M+H:M,k=m?S+z:S;return{width:T+(g?-H:H),height:L+(m?-z:z),x:c[0]*H*(g?-1:1)+B,y:c[1]*z*(m?-1:1)+k}}const $v={width:0,height:0,x:0,y:0},HE={...$v,pointerX:0,pointerY:0,aspectRatio:1};function BE(n,e,l){const o=l.x+n.internals.positionAbsolute.x-e.internals.positionAbsolute.x,s=l.y+n.internals.positionAbsolute.y-e.internals.positionAbsolute.y,c=n.measured.width??0,d=n.measured.height??0;return[[o,s],[o+c,s+d]]}function LE({domNode:n,nodeId:e,getStoreItems:l,onChange:o,onEnd:s}){const c=Xn(n);let d={controlDirection:Rp("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:m,boundaries:p,keepAspectRatio:y,resizeDirection:v,onResizeStart:E,onResize:w,onResizeEnd:b,shouldResize:_}){let N={...$v},C={...HE};d={boundaries:p,resizeDirection:v,keepAspectRatio:y,controlDirection:Rp(m)};let M,S=null,T=[],L,R,H;const z=Xy().on("start",Y=>{var oe;const{nodeLookup:Z,transform:I,snapGrid:G,snapToGrid:j,nodeOrigin:X,paneDomNode:B}=l();if(M=Z.get(e),!M)return;S=(B==null?void 0:B.getBoundingClientRect())??null;const{xSnapped:k,ySnapped:U}=ps(Y.sourceEvent,{transform:I,snapGrid:G,snapToGrid:j,containerBounds:S}),Q=M.measured.width??0,P=M.measured.height??0,re=M.origin??X,fe=M.parentId?(oe=Z.get(M.parentId))==null?void 0:oe.internals.positionAbsolute:void 0;N={width:Q,height:P,x:M.internals.positionAbsolute.x-((fe==null?void 0:fe.x)??0)+re[0]*Q,y:M.internals.positionAbsolute.y-((fe==null?void 0:fe.y)??0)+re[1]*P},C={...N,pointerX:k,pointerY:U,aspectRatio:N.width/N.height},L=void 0,R=Es(M.extent)?M.extent:void 0,M.parentId&&(M.extent==="parent"||M.expandParent)&&(L=Z.get(M.parentId)),L&&M.extent==="parent"&&(R=[[0,0],[L.measured.width,L.measured.height]]),T=[],H=void 0;for(const[O,V]of Z)if(V.parentId===e&&(T.push({id:O,position:{...V.position},extent:V.extent}),V.extent==="parent"||V.expandParent)){const F=BE(V,M,N);H?H=[[Math.min(F[0][0],H[0][0]),Math.min(F[0][1],H[0][1])],[Math.max(F[1][0],H[1][0]),Math.max(F[1][1],H[1][1])]]:H=F}E==null||E(Y,{...N})}).on("drag",Y=>{const{transform:Z,snapGrid:I,snapToGrid:G,nodeOrigin:j}=l(),X=ps(Y.sourceEvent,{transform:Z,snapGrid:I,snapToGrid:G,containerBounds:S}),B=[];if(!M)return;const{x:k,y:U,width:Q,height:P}=N,re={},fe=M.origin??j,{width:oe,height:O,x:V,y:F}=jE(C,d.controlDirection,X,d.boundaries,d.keepAspectRatio,fe,R,H),K=oe!==Q,J=O!==P,ee=V!==k&&K,ie=F!==U&&J;if(!ee&&!ie&&!K&&!J)return;const le={prevValues:{...N},startX:C.x,startY:C.y,childNodes:T.map(ve=>({...ve,position:{...ve.position}}))};if((ee||ie||fe[0]===1||fe[1]===1)&&(re.x=ee?V:N.x,re.y=ie?F:N.y,N.x=re.x,N.y=re.y,T.length>0)){const ve=V-k,Se=F-U;for(const be of T)be.position={x:be.position.x-ve+fe[0]*(oe-Q),y:be.position.y-Se+fe[1]*(O-P)},B.push(be)}if((K||J)&&(re.width=K&&(!d.resizeDirection||d.resizeDirection==="horizontal")?oe:N.width,re.height=J&&(!d.resizeDirection||d.resizeDirection==="vertical")?O:N.height,N.width=re.width,N.height=re.height),L&&M.expandParent){const ve=fe[0]*(re.width??0);re.x&&re.x<ve&&(N.x=ve,C.x=C.x-(re.x-ve));const Se=fe[1]*(re.height??0);re.y&&re.y<Se&&(N.y=Se,C.y=C.y-(re.y-Se))}const ce=DE({width:N.width,prevWidth:Q,height:N.height,prevHeight:P,affectsX:d.controlDirection.affectsX,affectsY:d.controlDirection.affectsY}),me={...N,direction:ce};if((_==null?void 0:_(Y,me))===!1){N=le.prevValues,C.x=le.startX,C.y=le.startY,T.forEach((ve,Se)=>{ve.position=le.childNodes[Se].position});return}w==null||w(Y,me),o(re,B)}).on("end",Y=>{b==null||b(Y,{...N}),s==null||s({...N})});c.call(z)}function g(){c.on(".drag",null)}return{update:h,destroy:g}}function UE(n,e){return Iv(n,e,YE)}function kE(n,e){return Iv(n,e,qE)}function Iv(n,e,l){const o=[],s=e.getNewElements(),c=new Set(s.map(h=>h.id));let d;for(const h of[n,s]){d=!d;e:for(const g of h){if(!d&&!c.has(g.id))continue;const m=e.getForElement(g.id);if(!m.length){o.push(g),c.delete(g.id);continue}let p={...g};for(const y of m)switch(y.type){case"remove":c.delete(g.id);continue e;case"replace":p={...y.item};continue;default:l(p,y)}o.push(p),c.delete(g.id)}}return o}function YE(n,e){switch(e.type){case"select":n.selected=e.selected;break;case"position":typeof e.position<"u"&&(n.position=e.position),typeof e.dragging<"u"&&(n.dragging=e.dragging);break;case"dimensions":typeof e.dimensions<"u"&&(n.measured={...e.dimensions},(e.setAttributes===!0||e.setAttributes==="width")&&(n.width=e.dimensions.width),(e.setAttributes===!0||e.setAttributes==="height")&&(n.height=e.dimensions.height)),typeof e.resizing=="boolean"&&(n.resizing=e.resizing);break;case"update":Object.assign(n,e.item);break;case"data":n.data=e.replace?e.data:{...n.data,...e.data};break;default:return}}function qE(n,e){switch(e.type){case"select":n.selected=e.selected;break;case"update":Object.assign(n,e.item);break;case"data":n.data=e.replace?e.data:{...n.data,...e.data};break;default:return}}function qa(n,e){return{id:n,type:"select",selected:e}}function e0(n,e){return{id:n,type:"position",position:e}}function VE(n,e){return{id:n,type:"dimensions",dimensions:e}}function O0(n){return{id:n,type:"remove"}}function XE(n){return{id:n.id,item:n,type:"add"}}function GE(n){return{id:n.id,item:n,type:"replace"}}function Ns(n){"@babel/helpers - typeof";return Ns=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ns(n)}function ZE(n,e){if(Ns(n)!="object"||!n)return n;var l;if(typeof Symbol<"u"&&(l=n[Symbol.toPrimitive])!==void 0){var o=l.call(n,e);if(Ns(o)!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function QE(n){var e=ZE(n,"string");return Ns(e)=="symbol"?e:e+""}function Oh(n,e,l){return(e=QE(e))in n?Object.defineProperty(n,e,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[e]=l,n}let Jv;Jv=Symbol.iterator;var Fv=class{constructor(n){this.applyChanges=n,Oh(this,"changeTypes",{}),Oh(this,"changeMap",new Map),Oh(this,"addChanges",new Map)}add(n){const e=Array.isArray(n)?n:[n];for(const l of e){if(this.changeTypes[l.type]=!0,l.type==="add"){this.addChanges.set(l.id,l);continue}const o=this.changeMap.get(l.id);o?o.push(l):this.changeMap.set(l.id,[l])}}remove(n){if(n.type==="add"){this.addChanges.get(n.id)===n&&this.addChanges.delete(n.id);return}const e=this.changeMap.get(n.id);if(!e)return;const l=e.indexOf(n);if(!(l<0)){if(e.length===1){this.changeMap.delete(n.id);return}e.splice(l,1)}}getForElement(n){return this.changeMap.get(n)||[]}removeForElement(n){this.changeMap.delete(n),this.addChanges.delete(n)}clear(){this.changeTypes={},this.changeMap.clear(),this.addChanges.clear()}isEmpty(){return this.changeMap.size===0&&this.addChanges.size===0}*[Jv](){yield*this.addChanges.values();for(const n of this.changeMap.values())yield*n}getNewElements(){const n=[];for(const e of this.addChanges.values())n.push(e.item);return n}toArray(){const n=[];for(const e of this.addChanges.values())n.push(e);for(const e of this.changeMap.values())for(const l of e)n.push(l);return n}getByType(n){if(this.changeTypes[n]){if(n==="add")return Array.from(this.addChanges.values());const e=[];for(const l of this.changeMap.values())for(const o of l)o.type===n&&e.push(o);return e}return[]}applyTo(n){return this.applyChanges(n,this)}},Pv=class extends Fv{constructor(n){super(UE),n&&this.add(n)}getForNode(n){return this.getForElement(n)}removeForNode(n){this.removeForElement(n)}getNewNodes(){return this.getNewElements()}},Wv=class extends Fv{constructor(n){super(kE),n&&this.add(n)}getForEdge(n){return this.getForElement(n)}removeForEdge(n){this.removeForElement(n)}getNewEdges(){return this.getNewElements()}};function $o(n,e=new Set){const l=[];for(const[,o]of n){const s=e.has(o.id);!(o.selected===void 0&&!s)&&o.selected!==s&&l.push(qa(o.id,s))}return l}const jp=n=>{let e;const l=new Set,o=(m,p)=>{const y=typeof m=="function"?m(e):m;if(!Object.is(y,e)){const v=e;e=p??(typeof y!="object"||y===null)?y:Object.assign({},e,y),l.forEach(E=>E(e,v))}},s=()=>e,h={setState:o,getState:s,getInitialState:()=>g,subscribe:m=>(l.add(m),()=>l.delete(m))},g=e=n(o,s,h);return h},Va=(n=>n?jp(n):jp),KE=n=>n;function Fa(n,e=KE){const l=lc.useSyncExternalStore(n.subscribe,lc.useCallback(()=>e(n.getState()),[n,e]),()=>e(n.getInitialState()));return lc.useDebugValue(l),l}const Hp=n=>{const e=Va(n),l=o=>Fa(e,o);return Object.assign(l,e),l},$E=(n=>n?Hp(n):Hp),Bp=n=>Symbol.iterator in n,Lp=n=>"entries"in n,Up=(n,e)=>{const l=n instanceof Map?n:new Map(n.entries()),o=e instanceof Map?e:new Map(e.entries());if(l.size!==o.size)return!1;for(const[s,c]of l)if(!o.has(s)||!Object.is(c,o.get(s)))return!1;return!0},IE=(n,e)=>{const l=n[Symbol.iterator](),o=e[Symbol.iterator]();let s=l.next(),c=o.next();for(;!s.done&&!c.done;){if(!Object.is(s.value,c.value))return!1;s=l.next(),c=o.next()}return!!s.done&&!!c.done};function JE(n,e){return Object.is(n,e)?!0:typeof n!="object"||n===null||typeof e!="object"||e===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(e)?!1:Bp(n)&&Bp(e)?Lp(n)&&Lp(e)?Up(n,e):IE(n,e):Up({entries:()=>Object.entries(n)},{entries:()=>Object.entries(e)})}Ty();const z0=de.createContext(null),FE=z0.Provider;function PE(n,e){if(Object.is(n,e))return!0;if(typeof n!="object"||!n||typeof e!="object"||!e)return!1;if(n instanceof Map&&e instanceof Map){if(n.size!==e.size)return!1;for(let[o,s]of n)if(!e.has(o)||!Object.is(s,e.get(o)))return!1;return!0}if(n instanceof Set&&e instanceof Set){if(n.size!==e.size)return!1;for(let o of n)if(!e.has(o))return!1;return!0}let l=Object.keys(n);if(l.length!==Object.keys(e).length)return!1;for(let o of l)if(!Object.prototype.hasOwnProperty.call(e,o)||!Object.is(n[o],e[o]))return!1;return!0}function fa(n){let e=we.c(2),l=de.useRef(void 0),o;return e[0]===n?o=e[1]:(o=s=>{let c=n(s);return PE(l.current,c)?l.current:l.current=c},e[0]=n,e[1]=o),o}const cr=n=>n,WE=_i.error001("react");function Ge(n){let e=n===void 0?cr:n,{optionsStore:l}=ut();return Fa(l,e)}function ut(){let n=de.useContext(z0);if(n===null)throw Error(WE);return n}function ai(n){let e=n===void 0?cr:n;return Fa(ut().viewportStore,e)}function R0(n){let e=n===void 0?cr:n;return Fa(ut().connectionStore,e)}function fr(n){let e=n===void 0?cr:n;return Fa(ut().nodesStore,e)}function D0(n){let e=n===void 0?cr:n;return Fa(ut().edgesStore,e)}function eN(n){let e=n===void 0?cr:n;return Fa(ut().selectionStore,e)}function t0(n,e){let l=we.c(3),o=de.useRef(),s;return l[0]!==e||l[1]!==n?(s=c=>{let d=n(c);return o.current!==void 0&&e(o.current,d)?o.current:(o.current=d,d)},l[0]=e,l[1]=n,l[2]=s):s=l[2],s}const kp={display:"none"},tN={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},ex="react-flow__node-desc",tx="react-flow__edge-desc";function nN(n){let e=we.c(3),{rfId:l}=n,o=Ge(iN),s=`react-flow__aria-live-${l}`,c;return e[0]!==o||e[1]!==s?(c=D.jsx("div",{id:s,"aria-live":"assertive","aria-atomic":"true",style:tN,children:o}),e[0]=o,e[1]=s,e[2]=c):c=e[2],c}function iN(n){return n.ariaLiveMessage}function lN(n){let e=we.c(13),{rfId:l,disableKeyboardA11y:o}=n,s=Ge(aN),c=`${ex}-${l}`,d=o?s["node.a11yDescription.default"]:s["node.a11yDescription.keyboardDisabled"],h;e[0]!==c||e[1]!==d?(h=D.jsx("div",{id:c,style:kp,children:d}),e[0]=c,e[1]=d,e[2]=h):h=e[2];let g=`${tx}-${l}`,m=s["edge.a11yDescription.default"],p;e[3]!==g||e[4]!==m?(p=D.jsx("div",{id:g,style:kp,children:m}),e[3]=g,e[4]=m,e[5]=p):p=e[5];let y;e[6]!==o||e[7]!==l?(y=!o&&D.jsx(nN,{rfId:l}),e[6]=o,e[7]=l,e[8]=y):y=e[8];let v;return e[9]!==h||e[10]!==p||e[11]!==y?(v=D.jsxs(D.Fragment,{children:[h,p,y]}),e[9]=h,e[10]=p,e[11]=y,e[12]=v):v=e[12],v}function aN(n){return n.ariaLabelConfig}const Xc=de.forwardRef((n,e)=>{let l=we.c(15),o,s,c,d,h;l[0]===n?(o=l[1],s=l[2],c=l[3],d=l[4],h=l[5]):({position:h,children:o,className:s,style:d,...c}=n,l[0]=n,l[1]=o,l[2]=s,l[3]=c,l[4]=d,l[5]=h);let g=h===void 0?"top-left":h,m;if(l[6]!==s||l[7]!==g){let y=`${g}`.split("-");m=Gt(["react-flow__panel",s,...y]),l[6]=s,l[7]=g,l[8]=m}else m=l[8];let p;return l[9]!==o||l[10]!==e||l[11]!==c||l[12]!==d||l[13]!==m?(p=D.jsx("div",{className:m,style:d,ref:e,...c,children:o}),l[9]=o,l[10]=e,l[11]=c,l[12]=d,l[13]=m,l[14]=p):p=l[14],p});Xc.displayName="Panel";const Yp="https://reactflow.dev?utm_source=attribution";function oN(n){let e=we.c(4),{proOptions:l,position:o}=n,s=o===void 0?"bottom-right":o,c;if(e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0],de.useEffect(rN,c),l==null?void 0:l.hideAttribution)return null;let d;e[1]===Symbol.for("react.memo_cache_sentinel")?(d=D.jsx("a",{href:Yp,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"}),e[1]=d):d=e[1];let h;return e[2]===s?h=e[3]:(h=D.jsx(Xc,{position:s,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${Yp}`,children:d}),e[2]=s,e[3]=h),h}function rN(){}const qp=n=>{let e=[];for(let[,l]of n.nodeLookup)l.selected&&e.push(l.internals.userNode);return e},Vp=n=>{let e=[];for(let[,l]of n.edgeLookup)l.selected&&e.push(l);return e},Xp=n=>n.id;function Gp(n,e){return JE(n.map(Xp),e.map(Xp))}function sN(n){let e=we.c(12),{onSelectionChange:l}=n,{optionsStore:o,nodesStore:s,edgesStore:c}=ut(),d=fr(t0(qp,Gp)),h=D0(t0(Vp,Gp)),g;e[0]!==c||e[1]!==s||e[2]!==l||e[3]!==o?(g=()=>{let p={nodes:qp(s.getState()),edges:Vp(c.getState())};l==null||l(p),o.getState().onSelectionChangeHandlers.forEach(y=>y(p))},e[0]=c,e[1]=s,e[2]=l,e[3]=o,e[4]=g):g=e[4];let m;return e[5]!==c||e[6]!==s||e[7]!==l||e[8]!==o||e[9]!==h||e[10]!==d?(m=[d,h,l,o,s,c],e[5]=c,e[6]=s,e[7]=l,e[8]=o,e[9]=h,e[10]=d,e[11]=m):m=e[11],de.useEffect(g,m),null}const uN=n=>n.onSelectionChangeHandlers.length>0;function cN(n){let e=we.c(2),{onSelectionChange:l}=n,o=Ge(uN);if(l||o){let s;return e[0]===l?s=e[1]:(s=D.jsx(sN,{onSelectionChange:l}),e[0]=l,e[1]=s),s}return null}const nx=[0,0],fN={x:0,y:0,zoom:1},Zp=[..."nodes.edges.defaultNodes.defaultEdges.onConnect.onConnectStart.onConnectEnd.onClickConnectStart.onClickConnectEnd.nodesDraggable.autoPanOnNodeFocus.nodesConnectable.nodesFocusable.edgesFocusable.edgesReconnectable.elevateNodesOnSelect.elevateEdgesOnSelect.minZoom.maxZoom.nodeExtent.onNodesChange.onEdgesChange.elementsSelectable.connectionMode.snapGrid.snapToGrid.translateExtent.connectOnClick.defaultEdgeOptions.fitView.fitViewOptions.onNodesDelete.onEdgesDelete.onDelete.onNodeDrag.onNodeDragStart.onNodeDragStop.onSelectionDrag.onSelectionDragStart.onSelectionDragStop.onMoveStart.onMove.onMoveEnd.noPanClassName.nodeOrigin.autoPanOnConnect.autoPanOnNodeDrag.onError.connectionRadius.isValidConnection.selectNodesOnDrag.nodeDragThreshold.connectionDragThreshold.onBeforeDelete.debug.autoPanSpeed.ariaLabelConfig.zIndexMode".split("."),"rfId"],Qp={translateExtent:ir,nodeOrigin:nx,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function dN(n){let{optionsStore:e}=ut(),l=de.useRef(Qp);return de.useEffect(()=>{let{setDefaultNodesAndEdges:o,reset:s}=e.getState();return o(n.defaultNodes,n.defaultEdges),()=>{l.current=Qp,s()}},[]),de.useEffect(()=>{let{setNodes:o,setEdges:s,setMinZoom:c,setMaxZoom:d,setTranslateExtent:h,setNodeExtent:g}=e.getState();for(let m of Zp){let p=n[m];p!==l.current[m]&&n[m]!==void 0&&(m==="nodes"?o(p):m==="edges"?s(p):m==="minZoom"?c(p):m==="maxZoom"?d(p):m==="translateExtent"?h(p):m==="nodeExtent"?g(p):m==="ariaLabelConfig"?e.setState({ariaLabelConfig:V5(p)}):m==="fitView"?e.setState({fitViewQueued:p}):m==="fitViewOptions"?e.setState({fitViewOptions:p}):e.setState({[m]:p}))}l.current=n},Zp.map(o=>n[o])),null}const Kp=typeof document<"u"?document:null;function rr(n,e){let l=we.c(12),o=n===void 0?null:n,s;l[0]===e?s=l[1]:(s=e===void 0?{target:Kp,actInsideInputWithModifier:!0}:e,l[0]=e,l[1]=s);let c=s,[d,h]=de.useState(!1),g=de.useRef(!1),m;l[2]===Symbol.for("react.memo_cache_sentinel")?(m=new Set([]),l[2]=m):m=l[2];let p=de.useRef(m),y;l[3]===o?y=l[4]:(y=hN(o),l[3]=o,l[4]=y);let[v,E]=y,w;l[5]!==o||l[6]!==v||l[7]!==E||l[8]!==c?(w=()=>{let _=(c==null?void 0:c.target)??Kp,N=(c==null?void 0:c.actInsideInputWithModifier)??!0;if(o!==null){let C=T=>{var R,H;if(g.current=T.ctrlKey||T.metaKey||T.shiftKey||T.altKey,(!g.current||g.current&&!N)&&Mv(T))return!1;let L=Ip(T.code,E);if(p.current.add(T[L]),$p(v,p.current,!1)){let z=((H=(R=T.composedPath)==null?void 0:R.call(T))==null?void 0:H[0])||T.target,Y=(z==null?void 0:z.nodeName)==="BUTTON"||(z==null?void 0:z.nodeName)==="A";c.preventDefault!==!1&&(g.current||!Y)&&T.preventDefault(),h(!0)}},M=T=>{let L=Ip(T.code,E);$p(v,p.current,!0)?(h(!1),p.current.clear()):p.current.delete(T[L]),T.key==="Meta"&&p.current.clear(),g.current=!1},S=()=>{p.current.clear(),h(!1)};return _==null||_.addEventListener("keydown",C),_==null||_.addEventListener("keyup",M),window.addEventListener("blur",S),window.addEventListener("contextmenu",S),()=>{_==null||_.removeEventListener("keydown",C),_==null||_.removeEventListener("keyup",M),window.removeEventListener("blur",S),window.removeEventListener("contextmenu",S)}}},l[5]=o,l[6]=v,l[7]=E,l[8]=c,l[9]=w):w=l[9];let b;return l[10]===o?b=l[11]:(b=[o,h],l[10]=o,l[11]=b),de.useEffect(w,b),d}function hN(n){if(n!==null){let e=(Array.isArray(n)?n:[n]).filter(l=>typeof l=="string").map(l=>l.replace(/\+/g,`
61
+ `).replace(`
62
+
63
+ `,`
64
+ +`).split(`
65
+ `));return[e,e.reduce((l,o)=>l.concat(...o),[])]}return[[],[]]}function $p(n,e,l){return n.filter(o=>l||o.length===e.size).some(o=>o.every(s=>e.has(s)))}function Ip(n,e){return e.includes(n)?"code":"key"}const gN=()=>{let n=we.c(29),{optionsStore:e,viewportStore:l}=ut(),o,s,c;n[0]===e?(o=n[1],s=n[2],c=n[3]):(o=async w=>{let{panZoom:b}=e.getState();return b?b.scaleBy(1.2,w):!1},s=async w=>{let{panZoom:b}=e.getState();return b?b.scaleBy(.8333333333333334,w):!1},c=async(w,b)=>{let{panZoom:_}=e.getState();return _?_.scaleTo(w,b):!1},n[0]=e,n[1]=o,n[2]=s,n[3]=c);let d;n[4]===l?d=n[5]:(d=()=>l.getState().transform[2],n[4]=l,n[5]=d);let h;n[6]!==e||n[7]!==l?(h=async(w,b)=>{let{transform:_}=l.getState(),[N,C,M]=_,{panZoom:S}=e.getState();return S?S.setViewport({x:w.x??N,y:w.y??C,zoom:w.zoom??M},b):!1},n[6]=e,n[7]=l,n[8]=h):h=n[8];let g;n[9]===l?g=n[10]:(g=()=>{let[w,b,_]=l.getState().transform;return{x:w,y:b,zoom:_}},n[9]=l,n[10]=g);let m;n[11]===e?m=n[12]:(m=async(w,b,_)=>e.getState().setCenter(w,b,_),n[11]=e,n[12]=m);let p,y,v;n[13]!==e||n[14]!==l?(p=async(w,b)=>{let{width:_,height:N}=l.getState(),{minZoom:C,maxZoom:M,panZoom:S}=e.getState(),T=C0(w,_,N,C,M,(b==null?void 0:b.padding)??gv);return S?S.setViewport(T,b):!1},y=(w,b)=>{let _=b===void 0?{}:b,{transform:N}=l.getState(),{snapGrid:C,snapToGrid:M,domNode:S}=e.getState();if(!S)return w;let{x:T,y:L}=S.getBoundingClientRect(),R={x:w.x-T,y:w.y-L},H=_.snapGrid??C,z=_.snapToGrid??M;return ar(R,N,z,H)},v=w=>{let{transform:b}=l.getState(),{domNode:_}=e.getState();if(!_)return w;let{x:N,y:C}=_.getBoundingClientRect(),M=or(w,b);return{x:M.x+N,y:M.y+C}},n[13]=e,n[14]=l,n[15]=p,n[16]=y,n[17]=v):(p=n[15],y=n[16],v=n[17]);let E;return n[18]!==o||n[19]!==s||n[20]!==c||n[21]!==d||n[22]!==h||n[23]!==g||n[24]!==m||n[25]!==p||n[26]!==y||n[27]!==v?(E={zoomIn:o,zoomOut:s,zoomTo:c,getZoom:d,setViewport:h,getViewport:g,setCenter:m,fitBounds:p,screenToFlowPosition:y,flowToScreenPosition:v},n[18]=o,n[19]=s,n[20]=c,n[21]=d,n[22]=h,n[23]=g,n[24]=m,n[25]=p,n[26]=y,n[27]=v,n[28]=E):E=n[28],E};function Jp({items:n=[],lookup:e}){var s;let l=[],o=new Map(n.map(c=>[c.id,c]));for(let[,c]of n.entries()){let d=e.get(c.id),h=((s=d==null?void 0:d.internals)==null?void 0:s.userNode)??d;h!==void 0&&h!==c&&l.push(GE({...c})),h===void 0&&l.push(XE({...c}))}for(let[c]of e)o.get(c)===void 0&&l.push(O0(c));return l}const mN=wv();function pN(n,e,l={}){return J5(n,e,{...l,onError:l.onError??mN})}const Fp=n=>R5(n),yN=n=>xv(n);function ix(n){return de.forwardRef(n)}const j0=typeof window<"u"?de.useLayoutEffect:de.useEffect;function Pp(n){let e=we.c(7),l;e[0]===Symbol.for("react.memo_cache_sentinel")?(l=BigInt(0),e[0]=l):l=e[0];let[o,s]=de.useState(l),c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=()=>xN(()=>s(vN)),e[1]=c):c=e[1];let[d]=de.useState(c),h;e[2]!==d||e[3]!==n?(h=()=>{let m=d.get();m.length&&(n(m),d.reset())},e[2]=d,e[3]=n,e[4]=h):h=e[4];let g;return e[5]===o?g=e[6]:(g=[o],e[5]=o,e[6]=g),j0(h,g),d}function vN(n){return n+BigInt(1)}function xN(n){let e=[];return{get:()=>e,reset:()=>{e=[]},push:l=>{e.push(l),n()}}}const lx=de.createContext(null);function bN(n){let e=we.c(12),{children:l}=n,{optionsStore:o,nodesStore:s,edgesStore:c}=ut(),d;e[0]!==s||e[1]!==o?(d=E=>{let{nodes:w,nodeLookup:b}=s.getState(),_=w===void 0?[]:w,{onNodesChange:N,fitViewQueued:C,onNodesChangeMiddlewareMap:M,setNodes:S,hasDefaultNodes:T}=o.getState(),L=_;for(let H of E)L=typeof H=="function"?H(L):H;let R=Jp({items:L,lookup:b});for(let H of M.values())R=H(R);T&&S(L),R.length>0?N==null||N(new Pv(R)):C&&window.requestAnimationFrame(()=>{let{fitViewQueued:H,setNodes:z}=o.getState(),{nodes:Y}=s.getState();H&&z(Y)})},e[0]=s,e[1]=o,e[2]=d):d=e[2];let h=Pp(d),g;e[3]!==c||e[4]!==o?(g=E=>{let{edges:w,edgeLookup:b}=c.getState(),_=w===void 0?[]:w,{setEdges:N,hasDefaultEdges:C,onEdgesChange:M}=o.getState(),S=_;for(let T of E)S=typeof T=="function"?T(S):T;if(C)N(S);else if(M){let T=Jp({items:S,lookup:b});M==null||M(new Wv(T))}},e[3]=c,e[4]=o,e[5]=g):g=e[5];let m=Pp(g),p;e[6]!==m||e[7]!==h?(p={nodeQueue:h,edgeQueue:m},e[6]=m,e[7]=h,e[8]=p):p=e[8];let y=p,v;return e[9]!==l||e[10]!==y?(v=D.jsx(lx.Provider,{value:y,children:l}),e[9]=l,e[10]=y,e[11]=v):v=e[11],v}function SN(){let n=de.useContext(lx);if(!n)throw Error("useBatchContext must be used within a BatchProvider");return n}const _N=n=>!!n.panZoom;function Gc(){let n=we.c(79),e=gN(),{optionsStore:l,viewportStore:o,nodesStore:s,edgesStore:c}=ut(),d=SN(),h=Ge(_N),g;n[0]===s?g=n[1]:(g=oe=>s.getState().nodeLookup.get(oe),n[0]=s,n[1]=g);let m=g,p;n[2]===d?p=n[3]:(p=oe=>{d.nodeQueue.push(oe)},n[2]=d,n[3]=p);let y=p,v;n[4]===d?v=n[5]:(v=oe=>{d.edgeQueue.push(oe)},n[4]=d,n[5]=v);let E=v,w;n[6]!==s||n[7]!==l?(w=oe=>{var ee,ie;let{nodeLookup:O}=s.getState(),{nodeOrigin:V}=l.getState(),F=Fp(oe)?oe:O.get(oe.id),K=F.parentId?Ev(F.position,F.measured,F.parentId,O,V):F.position,J={...F,position:K,width:((ee=F.measured)==null?void 0:ee.width)??F.width,height:((ie=F.measured)==null?void 0:ie.height)??F.height};return _s(J,F.parentId?void 0:V)},n[6]=s,n[7]=l,n[8]=w):w=n[8];let b=w,_;n[9]===y?_=n[10]:(_=(oe,O,V)=>{let F=V===void 0?{replace:!1}:V;y(K=>K.map(J=>{if(J.id===oe){let ee=typeof O=="function"?O(J):O;return F.replace&&Fp(ee)?ee:{...J,...ee}}return J}))},n[9]=y,n[10]=_);let N=_,C;n[11]===E?C=n[12]:(C=(oe,O,V)=>{let F=V===void 0?{replace:!1}:V;E(K=>K.map(J=>{if(J.id===oe){let ee=typeof O=="function"?O(J):O;return F.replace&&yN(ee)?ee:{...J,...ee}}return J}))},n[11]=E,n[12]=C);let M=C,S;n[13]===s?S=n[14]:(S=()=>s.getState().nodes.map(AN),n[13]=s,n[14]=S);let T;n[15]===m?T=n[16]:(T=oe=>{var O;return(O=m(oe))==null?void 0:O.internals.userNode},n[15]=m,n[16]=T);let L,R;n[17]===c?(L=n[18],R=n[19]):(L=()=>{let{edges:oe}=c.getState();return(oe===void 0?[]:oe).map(TN)},R=oe=>c.getState().edgeLookup.get(oe),n[17]=c,n[18]=L,n[19]=R);let H,z;n[20]===d?(H=n[21],z=n[22]):(H=oe=>{let O=Array.isArray(oe)?oe:[oe];d.nodeQueue.push(V=>[...V,...O])},z=oe=>{let O=Array.isArray(oe)?oe:[oe];d.edgeQueue.push(V=>[...V,...O])},n[20]=d,n[21]=H,n[22]=z);let Y;n[23]!==c||n[24]!==s||n[25]!==o?(Y=()=>{let{nodes:oe}=s.getState(),O=oe===void 0?[]:oe,{edges:V}=c.getState(),F=V===void 0?[]:V,{transform:K}=o.getState(),[J,ee,ie]=K;return{nodes:O.map(MN),edges:F.map(CN),viewport:{x:J,y:ee,zoom:ie}}},n[23]=c,n[24]=s,n[25]=o,n[26]=Y):Y=n[26];let Z;n[27]!==c||n[28]!==s||n[29]!==l?(Z=async oe=>{let{nodes:O,edges:V}=oe,F=O===void 0?[]:O,K=V===void 0?[]:V,{nodes:J}=s.getState(),{edges:ee}=c.getState(),{onNodesDelete:ie,onEdgesDelete:le,emitNodeChanges:ce,emitEdgeChanges:me,onDelete:ve,onBeforeDelete:Se}=l.getState(),{nodes:be,edges:xe}=await B5({nodesToRemove:F,edgesToRemove:K,nodes:J,edges:ee,onBeforeDelete:Se}),pe=xe.length>0,Ee=be.length>0;if(pe){let Me=xe.map(NN);le==null||le(xe),me(Me)}if(Ee){let Me=be.map(EN);ie==null||ie(be),ce(Me)}return(Ee||pe)&&(ve==null||ve({nodes:be,edges:xe})),{deletedNodes:be,deletedEdges:xe}},n[27]=c,n[28]=s,n[29]=l,n[30]=Z):Z=n[30];let I;n[31]!==b||n[32]!==s||n[33]!==l?(I=(oe,O,V)=>{let F=O===void 0||O,K=vp(oe),J=K?oe:b(oe),ee=V!==void 0;if(!J)return[];let{nodeOrigin:ie}=l.getState();return(V||s.getState().nodes).filter(le=>{let ce=s.getState().nodeLookup.get(le.id);if(ce&&!K&&(le.id===oe.id||!ce.internals.positionAbsolute))return!1;let me=_s(ee?le:ce,ie),ve=Cc(me,J);return F&&ve>0||ve>=me.width*me.height||ve>=J.width*J.height})},n[31]=b,n[32]=s,n[33]=l,n[34]=I):I=n[34];let G;n[35]===b?G=n[36]:(G=(oe,O,V)=>{let F=V===void 0||V,K=vp(oe)?oe:b(oe);if(!K)return!1;let J=Cc(K,O);return F&&J>0||J>=O.width*O.height||J>=K.width*K.height},n[35]=b,n[36]=G);let j;n[37]===N?j=n[38]:(j=(oe,O,V)=>{let F=V===void 0?{replace:!1}:V;N(oe,K=>{let J=typeof O=="function"?O(K):O;return F.replace?{...K,data:J}:{...K,data:{...K.data,...J}}},F)},n[37]=N,n[38]=j);let X;n[39]!==s||n[40]!==l||n[41]!==N?(X=(oe,O)=>{fE(oe,s.getState().nodeLookup,O,l.getState().nodeOrigin,V=>{let{nodeId:F,parentId:K,x:J,y:ee}=V;N(F,{parentId:K??void 0,position:{x:J,y:ee}})})},n[39]=s,n[40]=l,n[41]=N,n[42]=X):X=n[42];let B;n[43]===M?B=n[44]:(B=(oe,O,V)=>{let F=V===void 0?{replace:!1}:V;M(oe,K=>{let J=typeof O=="function"?O(K):O;return F.replace?{...K,data:J}:{...K,data:{...K.data,...J}}},F)},n[43]=M,n[44]=B);let k;n[45]!==s||n[46]!==l?(k=oe=>{let{nodeLookup:O}=s.getState(),{nodeOrigin:V}=l.getState();return D5(oe,{nodeLookup:O,nodeOrigin:V})},n[45]=s,n[46]=l,n[47]=k):k=n[47];let U;n[48]===c?U=n[49]:(U=oe=>{let{type:O,handleId:V,nodeId:F}=oe;return G5(c.getState().connectionLookup,{nodeId:F,type:O,handleId:V})},n[48]=c,n[49]=U);let Q;n[50]!==d||n[51]!==l?(Q=async oe=>{let O=l.getState().fitViewResolver??q5();return l.setState({fitViewQueued:!0,fitViewOptions:oe,fitViewResolver:O}),d.nodeQueue.push(wN),O.promise},n[50]=d,n[51]=l,n[52]=Q):Q=n[52];let P;n[53]!==m||n[54]!==E||n[55]!==y||n[56]!==H||n[57]!==z||n[58]!==Y||n[59]!==Z||n[60]!==I||n[61]!==G||n[62]!==j||n[63]!==X||n[64]!==B||n[65]!==k||n[66]!==U||n[67]!==Q||n[68]!==S||n[69]!==T||n[70]!==L||n[71]!==R||n[72]!==M||n[73]!==N?(P={getNodes:S,getNode:T,getInternalNode:m,getEdges:L,getEdge:R,setNodes:y,setEdges:E,addNodes:H,addEdges:z,toObject:Y,deleteElements:Z,getIntersectingNodes:I,isNodeIntersecting:G,updateNode:N,updateNodeData:j,changeParent:X,updateEdge:M,updateEdgeData:B,getNodesBounds:k,getNodeConnections:U,fitView:Q},n[53]=m,n[54]=E,n[55]=y,n[56]=H,n[57]=z,n[58]=Y,n[59]=Z,n[60]=I,n[61]=G,n[62]=j,n[63]=X,n[64]=B,n[65]=k,n[66]=U,n[67]=Q,n[68]=S,n[69]=T,n[70]=L,n[71]=R,n[72]=M,n[73]=N,n[74]=P):P=n[74];let re=P,fe;return n[75]!==re||n[76]!==e||n[77]!==h?(fe={...re,...e,viewportInitialized:h},n[75]=re,n[76]=e,n[77]=h,n[78]=fe):fe=n[78],fe}function wN(n){return[...n]}function EN(n){return O0(n.id)}function NN(n){return O0(n.id)}function CN(n){return{...n}}function MN(n){return{...n}}function TN(n){return{...n}}function AN(n){return{...n}}const Wp=n=>n.selected,ON=typeof window<"u"?window:void 0;function zN(n){let e=we.c(15),{deleteKeyCode:l,multiSelectionKeyCode:o}=n,{optionsStore:s,nodesStore:c,edgesStore:d}=ut(),{deleteElements:h}=Gc(),g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={actInsideInputWithModifier:!1},e[0]=g):g=e[0];let m=rr(l,g),p;e[1]===Symbol.for("react.memo_cache_sentinel")?(p={target:ON},e[1]=p):p=e[1];let y=rr(o,p),v;e[2]!==h||e[3]!==m||e[4]!==d||e[5]!==c||e[6]!==s?(v=()=>{if(m){let{edges:_}=d.getState(),{nodes:N}=c.getState();h({nodes:N.filter(Wp),edges:_.filter(Wp)}),s.getState().nodesSelectionActive&&s.setState({nodesSelectionActive:!1})}},e[2]=h,e[3]=m,e[4]=d,e[5]=c,e[6]=s,e[7]=v):v=e[7];let E;e[8]===m?E=e[9]:(E=[m],e[8]=m,e[9]=E),de.useEffect(v,E);let w;e[10]!==y||e[11]!==s?(w=()=>{s.setState({multiSelectionActive:y})},e[10]=y,e[11]=s,e[12]=w):w=e[12];let b;e[13]===y?b=e[14]:(b=[y],e[13]=y,e[14]=b),de.useEffect(w,b)}function RN(n){let e=we.c(5),{optionsStore:l,viewportStore:o}=ut(),s;e[0]!==n.current||e[1]!==l||e[2]!==o?(s=()=>{let d=()=>{var g,m,p,y;if(!n.current||!(((m=(g=n.current).checkVisibility)==null?void 0:m.call(g))??!0))return!1;let h=M0(n.current);(h.height===0||h.width===0)&&((y=(p=l.getState()).onError)==null||y.call(p,"004",_i.error004())),o.setState({width:h.width||500,height:h.height||500})};if(n.current){d(),window.addEventListener("resize",d);let h=new ResizeObserver(()=>d());return h.observe(n.current),()=>{window.removeEventListener("resize",d),h.disconnect()}}},e[0]=n.current,e[1]=l,e[2]=o,e[3]=s):s=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[4]=c):c=e[4],de.useEffect(s,c)}const Zc={position:"absolute",width:"100%",height:"100%",top:0,left:0};function DN(n){let e=we.c(35),{onPaneContextMenu:l,zoomOnScroll:o,zoomOnPinch:s,panOnScroll:c,panActivationKeyPressed:d,panOnScrollSpeed:h,panOnScrollMode:g,zoomOnDoubleClick:m,panOnDrag:p,defaultViewport:y,translateExtent:v,minZoom:E,maxZoom:w,zoomActivationKeyCode:b,preventScrolling:_,children:N,noWheelClassName:C,noPanClassName:M,onViewportChange:S,isControlledViewport:T,paneDragThreshold:L}=n,R=o===void 0||o,H=s===void 0||s,z=c!==void 0&&c,Y=h===void 0?.5:h,Z=g===void 0?vv.Free:g,I=m===void 0||m,G=p===void 0||p,j=_===void 0||_,{optionsStore:X,viewportStore:B}=ut(),k=Ge(HN),U=R0(jN),Q=rr(b),P=de.useRef(null),re=de.useRef(),fe;e[0]!==y||e[1]!==w||e[2]!==E||e[3]!==v?(fe=()=>({minZoom:E,maxZoom:w,translateExtent:v,defaultViewport:y}),e[0]=y,e[1]=w,e[2]=E,e[3]=v,e[4]=fe):fe=e[4];let[oe]=de.useState(fe);RN(P);let O;e[5]!==T||e[6]!==S||e[7]!==B?(O=le=>{S==null||S({x:le[0],y:le[1],zoom:le[2]}),T||B.setState({transform:le})},e[5]=T,e[6]=S,e[7]=B,e[8]=O):O=e[8];let V=O,F,K;e[9]!==X||e[10]!==oe||e[11]!==B?(F=()=>{if(P.current){re.current=RE({domNode:P.current,minZoom:oe.minZoom,maxZoom:oe.maxZoom,translateExtent:oe.translateExtent,viewport:oe.defaultViewport,onDraggingChange:ve=>B.setState(Se=>Se.paneDragging===ve?Se:{paneDragging:ve}),onPanZoomStart:(ve,Se)=>{let{onViewportChangeStart:be,onMoveStart:xe}=X.getState();xe==null||xe(ve,Se),be==null||be(Se)},onPanZoom:(ve,Se)=>{let{onViewportChange:be,onMove:xe}=X.getState();xe==null||xe(ve,Se),be==null||be(Se)},onPanZoomEnd:(ve,Se)=>{let{onViewportChangeEnd:be,onMoveEnd:xe}=X.getState();xe==null||xe(ve,Se),be==null||be(Se)}});let{x:le,y:ce,zoom:me}=re.current.getViewport();return X.setState({panZoom:re.current,domNode:P.current.closest(".react-flow")}),B.setState({transform:[le,ce,me]}),()=>{var ve;(ve=re.current)==null||ve.destroy()}}},K=[oe,X,B],e[9]=X,e[10]=oe,e[11]=B,e[12]=F,e[13]=K):(F=e[12],K=e[13]),de.useEffect(F,K);let J,ee;e[14]!==U||e[15]!==M||e[16]!==C||e[17]!==l||e[18]!==V||e[19]!==d||e[20]!==G||e[21]!==z||e[22]!==Z||e[23]!==Y||e[24]!==L||e[25]!==j||e[26]!==k||e[27]!==Q||e[28]!==I||e[29]!==H||e[30]!==R?(J=()=>{var le;(le=re.current)==null||le.update({onPaneContextMenu:l,zoomOnScroll:R,zoomOnPinch:H,panOnScroll:z,panActivationKeyPressed:d,panOnScrollSpeed:Y,panOnScrollMode:Z,zoomOnDoubleClick:I,panOnDrag:G,zoomActivationKeyPressed:Q,preventScrolling:j,noPanClassName:M,userSelectionActive:k,noWheelClassName:C,lib:"react",onTransformChange:V,connectionInProgress:U,paneDragThreshold:L})},ee=[l,R,H,z,d,Y,Z,I,G,Q,j,M,k,C,V,U,L],e[14]=U,e[15]=M,e[16]=C,e[17]=l,e[18]=V,e[19]=d,e[20]=G,e[21]=z,e[22]=Z,e[23]=Y,e[24]=L,e[25]=j,e[26]=k,e[27]=Q,e[28]=I,e[29]=H,e[30]=R,e[31]=J,e[32]=ee):(J=e[31],ee=e[32]),de.useEffect(J,ee);let ie;return e[33]===N?ie=e[34]:(ie=D.jsx("div",{className:"react-flow__renderer",ref:P,style:Zc,children:N}),e[33]=N,e[34]=ie),ie}function jN(n){return n.connection.inProgress}function HN(n){return n.userSelectionActive}function BN(){let n=we.c(4),e=Ge(UN),l=eN(fa(LN));if(!(e&&l))return null;let o=`translate(${l.x}px, ${l.y}px)`,s;return n[0]!==o||n[1]!==l.height||n[2]!==l.width?(s=D.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:l.width,height:l.height,transform:o}}),n[0]=o,n[1]=l.height,n[2]=l.width,n[3]=s):s=n[3],s}function LN(n){return n.userSelectionRect}function UN(n){return n.userSelectionActive}const zh=(n,e,l)=>{n.target===l.current&&(e==null||e(n))};function kN(n){let e=we.c(79),{isSelecting:l,selectionKeyPressed:o,selectionMode:s,panOnDrag:c,autoPanOnSelection:d,paneDragThreshold:h,selectionOnDrag:g,onSelectionStart:m,onSelectionEnd:p,onPaneClick:y,onPaneContextMenu:v,onPaneScroll:E,onPaneMouseEnter:w,onPaneMouseMove:b,onPaneMouseLeave:_,children:N}=n,C=s===void 0?$h.Full:s,M=de.useRef(0),{optionsStore:S,viewportStore:T,connectionStore:L,nodesStore:R,edgesStore:H,selectionStore:z}=ut(),Y=Ge(QN),Z=Ge(ZN),I=Ge(GN),G=Ge(XN),j=ai(VN),X=Z&&(l||Y),B=de.useRef(null),k=de.useRef(),U;e[0]===Symbol.for("react.memo_cache_sentinel")?(U=new Set,e[0]=U):U=e[0];let Q=de.useRef(U),P;e[1]===Symbol.for("react.memo_cache_sentinel")?(P=new Set,e[1]=P):P=e[1];let re=de.useRef(P),fe=de.useRef(!1),oe=de.useRef(!1),O;e[2]===Symbol.for("react.memo_cache_sentinel")?(O={x:0,y:0},e[2]=O):O=e[2];let V=de.useRef(O),F=de.useRef(!1),K;e[3]!==L||e[4]!==y||e[5]!==S?(K=ye=>{if(oe.current||fe.current||L.getState().connection.inProgress){oe.current=!1,fe.current=!1;return}let{nodesSelectionActive:Re,onClickConnectEnd:Ae,resetSelectedElements:Fe}=S.getState(),{connectionClickStartHandle:Oe,connection:tt}=L.getState();if(Oe){let Ke=structuredClone(tt);delete Ke.inProgress,Ke.toPosition=Ke.toHandle?Ke.toHandle.position:null,Ae==null||Ae(ye.nativeEvent,Ke),S.getState().updateConnectionClickStart(null)}y==null||y(ye),Fe(),Re&&S.setState({nodesSelectionActive:!1})},e[3]=L,e[4]=y,e[5]=S,e[6]=K):K=e[6];let J=K,ee;e[7]!==v||e[8]!==c?(ee=ye=>{Array.isArray(c)&&(c!=null&&c.includes(2))?ye.preventDefault():v==null||v(ye)},e[7]=v,e[8]=c,e[9]=ee):ee=e[9];let ie=ee,le;e[10]===E?le=e[11]:(le=E?ye=>E(ye):void 0,e[10]=E,e[11]=le);let ce=le,me;e[12]===Symbol.for("react.memo_cache_sentinel")?(me=ye=>{oe.current&&(ye.stopPropagation(),oe.current=!1)},e[12]=me):me=e[12];let ve=me,Se;e[13]!==l||e[14]!==S||e[15]!==c||e[16]!==o||e[17]!==g||e[18]!==z||e[19]!==T?(Se=ye=>{var vt,Ze;if(ye.pointerType==="touch"&&c!==!1&&!o)return;let{domNode:Re}=S.getState(),{transform:Ae}=T.getState();if(k.current=Re==null?void 0:Re.getBoundingClientRect(),!k.current)return;let Fe=ye.target===B.current;if(!Fe&&ye.target.closest(".nokey")||!l||!(g&&Fe||o)||ye.button!==0||!ye.isPrimary)return;(Ze=(vt=ye.target)==null?void 0:vt.setPointerCapture)==null||Ze.call(vt,ye.pointerId),oe.current=!1;let{x:Oe,y:tt}=Si(ye.nativeEvent,k.current),Ke=ar({x:Oe,y:tt},Ae);z.setState({userSelectionRect:{width:0,height:0,startX:Ke.x,startY:Ke.y,x:Oe,y:tt}}),Fe||(ye.stopPropagation(),ye.preventDefault())},e[13]=l,e[14]=S,e[15]=c,e[16]=o,e[17]=g,e[18]=z,e[19]=T,e[20]=Se):Se=e[20];let be=Se,xe;e[21]!==H||e[22]!==R||e[23]!==S||e[24]!==C||e[25]!==z||e[26]!==T?(xe=function(ye,Re){let{userSelectionRect:Ae}=z.getState();if(!Ae)return;let{transform:Fe}=T.getState(),{nodeLookup:Oe}=R.getState(),{edgeLookup:tt,connectionLookup:Ke}=H.getState(),{emitNodeChanges:vt,emitEdgeChanges:Ze,defaultEdgeOptions:dt}=S.getState(),ht={x:Ae.startX,y:Ae.startY},{x:bt,y:Qt}=or(ht,Fe),rn={startX:ht.x,startY:ht.y,x:ye<bt?ye:bt,y:Re<Qt?Re:Qt,width:Math.abs(ye-bt),height:Math.abs(Re-Qt)},sn=Q.current,zn=re.current;Q.current=new Set(E0(Oe,rn,Fe,C===$h.Partial,!0).map(qN)),re.current=new Set;let Rn=(dt==null?void 0:dt.selectable)??!0;for(let gn of Q.current){let Dn=Ke.get(gn);if(Dn)for(let{edgeId:En}of Dn.values()){let oi=tt.get(En);oi&&(oi.selectable??Rn)&&re.current.add(En)}}xp(sn,Q.current)||vt($o(Oe,Q.current)),xp(zn,re.current)||Ze($o(tt,re.current)),z.setState({userSelectionRect:rn}),S.setState(YN)},e[21]=H,e[22]=R,e[23]=S,e[24]=C,e[25]=z,e[26]=T,e[27]=xe):xe=e[27];let pe=xe,Ee;e[28]!==d||e[29]!==G||e[30]!==pe||e[31]!==I?(Ee=()=>{if(!d||!k.current)return;let[ye,Re]=N0(V.current,k.current,G);I({x:ye,y:Re}).then(Ae=>{if(!oe.current||!Ae){M.current=requestAnimationFrame(Ee);return}let{x:Fe,y:Oe}=V.current;pe(Fe,Oe),M.current=requestAnimationFrame(Ee)})},e[28]=d,e[29]=G,e[30]=pe,e[31]=I,e[32]=Ee):Ee=e[32];let Me;e[33]===Symbol.for("react.memo_cache_sentinel")?(Me=()=>{cancelAnimationFrame(M.current),M.current=0,F.current=!1},e[33]=Me):Me=e[33];let je=Me,He,Ue;e[34]===Symbol.for("react.memo_cache_sentinel")?(He=()=>()=>je(),Ue=[],e[34]=He,e[35]=Ue):(He=e[34],Ue=e[35]),de.useEffect(He,Ue);let Le;e[36]!==Ee||e[37]!==pe||e[38]!==m||e[39]!==S||e[40]!==h||e[41]!==o||e[42]!==z||e[43]!==T?(Le=ye=>{let{userSelectionRect:Re}=z.getState(),{transform:Ae}=T.getState(),{resetSelectedElements:Fe}=S.getState();if(!k.current||!Re)return;let{x:Oe,y:tt}=Si(ye.nativeEvent,k.current);V.current={x:Oe,y:tt};let Ke=or({x:Re.startX,y:Re.startY},Ae);if(!oe.current){let vt=o?0:h;if(Math.hypot(Oe-Ke.x,tt-Ke.y)<=vt)return;Fe(),m==null||m(ye)}oe.current=!0,F.current||(Ee(),F.current=!0),pe(Oe,tt)},e[36]=Ee,e[37]=pe,e[38]=m,e[39]=S,e[40]=h,e[41]=o,e[42]=z,e[43]=T,e[44]=Le):Le=e[44];let qe=Le,at;e[45]!==L||e[46]!==X||e[47]!==J||e[48]!==p||e[49]!==S||e[50]!==z||e[51]!==Y?(at=ye=>{var Re,Ae;if(!X)ye.target===B.current&&L.getState().connection.inProgress&&(fe.current=!0);else if(ye.button===0){if((Ae=(Re=ye.target)==null?void 0:Re.releasePointerCapture)==null||Ae.call(Re,ye.pointerId),!Y&&ye.target===B.current&&z.getState().userSelectionRect&&(J==null||J(ye)),S.setState({userSelectionActive:!1}),z.setState({userSelectionRect:null}),oe.current){p==null||p(ye);let Fe=Q.current.size>0;S.getState().nodesSelectionActive!==Fe&&S.setState({nodesSelectionActive:Fe})}je()}},e[45]=L,e[46]=X,e[47]=J,e[48]=p,e[49]=S,e[50]=z,e[51]=Y,e[52]=at):at=e[52];let $e=at,ct;e[53]===Symbol.for("react.memo_cache_sentinel")?(ct=ye=>{var Re,Ae;(Ae=(Re=ye.target)==null?void 0:Re.releasePointerCapture)==null||Ae.call(Re,ye.pointerId),je()},e[53]=ct):ct=e[53];let Ve=ct,Ie;if(e[54]!==j||e[55]!==l||e[56]!==c){let ye=c===!0||Array.isArray(c)&&c.includes(0);Ie=Gt(["react-flow__pane",{draggable:ye,dragging:j,selection:l}]),e[54]=j,e[55]=l,e[56]=c,e[57]=Ie}else Ie=e[57];let Je;e[58]!==X||e[59]!==J?(Je=X?void 0:ye=>zh(ye,J,B),e[58]=X,e[59]=J,e[60]=Je):Je=e[60];let gt;e[61]===ie?gt=e[62]:(gt=ye=>zh(ye,ie,B),e[61]=ie,e[62]=gt);let et;e[63]===ce?et=e[64]:(et=ye=>zh(ye,ce,B),e[63]=ce,e[64]=et);let rt=X?void 0:w,ft=X?qe:b,pt=X?Ve:void 0,yt=X?be:void 0,mt=X?ve:void 0,Xe;e[65]===Symbol.for("react.memo_cache_sentinel")?(Xe=D.jsx(BN,{}),e[65]=Xe):Xe=e[65];let Mt;return e[66]!==N||e[67]!==_||e[68]!==$e||e[69]!==Ie||e[70]!==Je||e[71]!==gt||e[72]!==et||e[73]!==rt||e[74]!==ft||e[75]!==pt||e[76]!==yt||e[77]!==mt?(Mt=D.jsxs("div",{className:Ie,onClick:Je,onContextMenu:gt,onWheel:et,onPointerEnter:rt,onPointerMove:ft,onPointerUp:$e,onPointerCancel:pt,onPointerDownCapture:yt,onClickCapture:mt,onPointerLeave:_,ref:B,style:Zc,children:[N,Xe]}),e[66]=N,e[67]=_,e[68]=$e,e[69]=Ie,e[70]=Je,e[71]=gt,e[72]=et,e[73]=rt,e[74]=ft,e[75]=pt,e[76]=yt,e[77]=mt,e[78]=Mt):Mt=e[78],Mt}function YN(n){return n.userSelectionActive&&!n.nodesSelectionActive?n:{userSelectionActive:!0,nodesSelectionActive:!1}}function qN(n){return n.id}function VN(n){return n.paneDragging}function XN(n){return n.autoPanSpeed}function GN(n){return n.panBy}function ZN(n){return n.elementsSelectable}function QN(n){return n.userSelectionActive}function n0({id:n,optionsStore:e,nodesStore:l,unselect:o=!1,nodeRef:s}){let{addSelectedNodes:c,unselectNodesAndEdges:d,multiSelectionActive:h,onError:g,nodesSelectionActive:m}=e.getState(),{nodeLookup:p}=l.getState(),y=p.get(n);y?(m&&e.setState({nodesSelectionActive:!1}),y.selected?(o||y.selected&&h)&&(d({nodes:[y],edges:[]}),requestAnimationFrame(()=>{var v;return(v=s==null?void 0:s.current)==null?void 0:v.blur()})):c([n])):g==null||g("012",_i.error012(n))}function ax(n){let e=we.c(16),{nodeRef:l,disabled:o,noDragClassName:s,handleSelector:c,nodeId:d,isSelectable:h}=n,g=o!==void 0&&o,{optionsStore:m,viewportStore:p,nodesStore:y,edgesStore:v}=ut(),[E,w]=de.useState(!1),b=de.useRef(),_,N;e[0]!==g||e[1]!==v||e[2]!==l||e[3]!==y||e[4]!==m||e[5]!==p?(_=()=>{if(!g)return b.current=gE({getStoreItems:()=>{let{nodes:S,nodeLookup:T}=y.getState(),{edges:L}=v.getState(),{transform:R}=p.getState();return{...m.getState(),nodes:S,nodeLookup:T,edges:L,transform:R}},onNodeMouseDown:S=>{n0({id:S,optionsStore:m,nodesStore:y,nodeRef:l})},onDragStart:()=>{w(!0)},onDragStop:()=>{w(!1)}}),()=>{var S;(S=b.current)==null||S.destroy(),b.current=void 0}},N=[g,m,p,y,v,l],e[0]=g,e[1]=v,e[2]=l,e[3]=y,e[4]=m,e[5]=p,e[6]=_,e[7]=N):(_=e[6],N=e[7]),de.useEffect(_,N);let C,M;return e[8]!==g||e[9]!==c||e[10]!==h||e[11]!==s||e[12]!==d||e[13]!==l?(C=()=>{!g&&l.current&&b.current&&b.current.update({noDragClassName:s,handleSelector:c,domNode:l.current,isSelectable:h,nodeId:d})},M=[s,c,g,h,l,d],e[8]=g,e[9]=c,e[10]=h,e[11]=s,e[12]=d,e[13]=l,e[14]=C,e[15]=M):(C=e[14],M=e[15]),de.useEffect(C,M),E}const KN=n=>e=>e.selected&&(e.draggable||n&&e.draggable===void 0);function ox(){let n=we.c(3),{optionsStore:e,nodesStore:l}=ut(),o;return n[0]!==l||n[1]!==e?(o=s=>{let{nodeExtent:c,snapToGrid:d,snapGrid:h,nodesDraggable:g,onError:m,updateNodePositions:p,nodeOrigin:y}=e.getState(),{nodeLookup:v}=l.getState(),E=new Map,w=KN(g),b=d?h[0]:5,_=d?h[1]:5,N=s.direction.x*b*s.factor,C=s.direction.y*_*s.factor;for(let[,M]of v){if(!w(M))continue;let S={x:M.internals.positionAbsolute.x+N,y:M.internals.positionAbsolute.y+C};d&&(S=zs(S,h));let{position:T,positionAbsolute:L}=bv({nodeId:M.id,nextPosition:S,nodeLookup:v,nodeExtent:c,nodeOrigin:y,onError:m});M.position=T,M.internals.positionAbsolute=L,E.set(M.id,M)}p(E)},n[0]=l,n[1]=e,n[2]=o):o=n[2],o}const H0=de.createContext(null),$N=H0.Provider;H0.Consumer;const rx=()=>de.useContext(H0),sx=de.createContext(null);function IN(n){let e=we.c(3),{children:l}=n,o=Ge(fa(JN)),s;return e[0]!==l||e[1]!==o?(s=D.jsx(sx.Provider,{value:o,children:l}),e[0]=l,e[1]=o,e[2]=s):s=e[2],s}function JN(n){return{connectOnClick:n.connectOnClick,noPanClassName:n.noPanClassName,rfId:n.rfId,connectionMode:n.connectionMode}}function FN(){let n=de.useContext(sx);if(!n)throw Error("useHandleConfig must be used within a HandleConfigProvider");return n}function PN(n){let e=we.c(2),l;return e[0]===n?l=e[1]:(l=o=>{let{connection:s}=o;return s},e[0]=n,e[1]=l),R0(fa(l))}function WN(n){let e=we.c(5),{optionsStore:l,connectionStore:o}=ut(),s;e[0]!==n||e[1]!==l?(s=g=>l.getState().pubSub.subscribeToConnectionForHandle(n,g),e[0]=n,e[1]=l,e[2]=s):s=e[2];let c=s,d;e[3]===o?d=e[4]:(d=()=>o.getState(),e[3]=o,e[4]=d);let h=d;return de.useSyncExternalStore(c,h,h)}const e6={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProgress:!1,clickConnectionInProgress:!1,valid:!1},t6=(n,e,l,o,s)=>{let{connectionClickStartHandle:c,connection:d}=n,{fromHandle:h,toHandle:g,isValid:m}=d;if(!h&&!c)return e6;let p=(g==null?void 0:g.nodeId)===e&&(g==null?void 0:g.id)===l&&(g==null?void 0:g.type)===o;return{connectingFrom:(h==null?void 0:h.nodeId)===e&&(h==null?void 0:h.id)===l&&(h==null?void 0:h.type)===o,connectingTo:p,clickConnecting:(c==null?void 0:c.nodeId)===e&&(c==null?void 0:c.id)===l&&(c==null?void 0:c.type)===o,isPossibleEndHandle:s===yv.Strict?(h==null?void 0:h.type)!==o:e!==(h==null?void 0:h.nodeId)||l!==(h==null?void 0:h.id),connectionInProgress:d.inProgress,clickConnectionInProgress:!!c,valid:p&&m}};function n6(n,e){var ee,ie;let l=we.c(85),o,s,c,d,h,g,m,p,y,v,E,w,b;l[0]===n?(o=l[1],s=l[2],c=l[3],d=l[4],h=l[5],g=l[6],m=l[7],p=l[8],y=l[9],v=l[10],E=l[11],w=l[12],b=l[13]):({type:y,position:v,isValidConnection:d,isConnectable:E,isConnectableStart:w,isConnectableEnd:b,id:c,onConnect:h,children:o,className:s,onMouseDown:g,onTouchStart:m,...p}=n,l[0]=n,l[1]=o,l[2]=s,l[3]=c,l[4]=d,l[5]=h,l[6]=g,l[7]=m,l[8]=p,l[9]=y,l[10]=v,l[11]=E,l[12]=w,l[13]=b);let _=y===void 0?"source":y,N=v===void 0?Xt.Top:v,C=E===void 0||E,M=w===void 0||w,S=b===void 0||b,T=c||null,L=_==="target",{optionsStore:R,viewportStore:H,connectionStore:z,nodesStore:Y,edgesStore:Z}=ut(),{connectOnClick:I,noPanClassName:G,rfId:j,connectionMode:X}=FN(),B=rx();B||((ie=(ee=R.getState()).onError)==null||ie.call(ee,"010",_i.error010()));let k=B||"",U;l[14]!==T||l[15]!==k||l[16]!==_?(U={nodeId:k,type:_,id:T},l[14]=T,l[15]=k,l[16]=_,l[17]=U):U=l[17];let Q=WN(U),P,re,fe,oe,O,V,F;if(l[18]!==s||l[19]!==Q||l[20]!==X||l[21]!==z||l[22]!==Z||l[23]!==T||l[24]!==C||l[25]!==S||l[26]!==M||l[27]!==L||l[28]!==d||l[29]!==G||l[30]!==B||l[31]!==Y||l[32]!==h||l[33]!==g||l[34]!==m||l[35]!==R||l[36]!==N||l[37]!==j||l[38]!==_||l[39]!==H){let le=t6(Q,B,T,_,X),ce;l[47]!==Z||l[48]!==h||l[49]!==R?(ce=be=>{let{defaultEdgeOptions:xe,onConnect:pe,hasDefaultEdges:Ee}=R.getState(),Me={...xe,...be};if(Ee){let{edges:je}=Z.getState(),{setEdges:He,onError:Ue}=R.getState();He(pN(Me,je,{onError:Ue}))}pe==null||pe(Me),h==null||h(Me)},l[47]=Z,l[48]=h,l[49]=R,l[50]=ce):ce=l[50];let me=ce,ve;l[51]!==z||l[52]!==T||l[53]!==M||l[54]!==L||l[55]!==d||l[56]!==B||l[57]!==Y||l[58]!==me||l[59]!==g||l[60]!==m||l[61]!==R||l[62]!==H?(ve=be=>{if(!B)return;let xe=ms(be.nativeEvent);if(M&&(xe&&be.button===0||!xe)){let pe=R.getState();Wh.onPointerDown(be.nativeEvent,{handleDomNode:be.currentTarget,autoPanOnConnect:pe.autoPanOnConnect,connectionMode:pe.connectionMode,connectionRadius:pe.connectionRadius,domNode:pe.domNode,nodeLookup:Y.getState().nodeLookup,lib:"react",isTarget:L,handleId:T,nodeId:B,flowId:pe.rfId,panBy:pe.panBy,cancelConnection:pe.cancelConnection,onConnectStart:pe.onConnectStart,onConnectEnd:(...Ee)=>{var je,He;let Me=Ee;return(He=(je=R.getState()).onConnectEnd)==null?void 0:He.call(je,...Me)},updateConnection:pe.updateConnection,onConnect:me,isValidConnection:d||((...Ee)=>{var je,He;let Me=Ee;return((He=(je=R.getState()).isValidConnection)==null?void 0:He.call(je,...Me))??!0}),getTransform:()=>H.getState().transform,getFromHandle:()=>z.getState().connection.fromHandle,autoPanSpeed:pe.autoPanSpeed,dragThreshold:pe.connectionDragThreshold})}xe?g==null||g(be):m==null||m(be)},l[51]=z,l[52]=T,l[53]=M,l[54]=L,l[55]=d,l[56]=B,l[57]=Y,l[58]=me,l[59]=g,l[60]=m,l[61]=R,l[62]=H,l[63]=ve):ve=l[63],re=ve;let Se;l[64]!==z||l[65]!==T||l[66]!==M||l[67]!==d||l[68]!==B||l[69]!==Y||l[70]!==me||l[71]!==R||l[72]!==_?(Se=be=>{let{onClickConnectStart:xe,onClickConnectEnd:pe,updateConnectionClickStart:Ee,connectionMode:Me,isValidConnection:je,rfId:He}=R.getState(),{connectionClickStartHandle:Ue,connection:Le}=z.getState(),{nodeLookup:qe}=Y.getState();if(!B||!Ue&&!M)return;if(!Ue){xe==null||xe(be.nativeEvent,{nodeId:B,handleId:T,handleType:_}),Ee({nodeId:B,type:_,id:T});return}let at=Cv(be.target),$e=d||je,{connection:ct,isValid:Ve}=Wh.isValid(be.nativeEvent,{handle:{nodeId:B,id:T,type:_},connectionMode:Me,fromNodeId:Ue.nodeId,fromHandleId:Ue.id||null,fromType:Ue.type,isValidConnection:$e,flowId:He,doc:at,lib:"react",nodeLookup:qe});Ve&&ct&&me(ct);let Ie=structuredClone(Le);delete Ie.inProgress,Ie.toPosition=Ie.toHandle?Ie.toHandle.position:null,pe==null||pe(be,Ie),Ee(null)},l[64]=z,l[65]=T,l[66]=M,l[67]=d,l[68]=B,l[69]=Y,l[70]=me,l[71]=R,l[72]=_,l[73]=Se):Se=l[73],P=Se,V=T,F=B,fe=N,oe=`${j}-${B}-${T}-${_}`,O=Gt(["react-flow__handle",`react-flow__handle-${N}`,"nodrag",G,s,{source:!L,target:L,connectable:C,connectablestart:M,connectableend:S,clickconnecting:le.clickConnecting,connectingfrom:le.connectingFrom,connectingto:le.connectingTo,valid:le.valid,connectionindicator:C&&(!le.connectionInProgress||le.isPossibleEndHandle)&&(le.connectionInProgress||le.clickConnecting?S:M)}]),l[18]=s,l[19]=Q,l[20]=X,l[21]=z,l[22]=Z,l[23]=T,l[24]=C,l[25]=S,l[26]=M,l[27]=L,l[28]=d,l[29]=G,l[30]=B,l[31]=Y,l[32]=h,l[33]=g,l[34]=m,l[35]=R,l[36]=N,l[37]=j,l[38]=_,l[39]=H,l[40]=P,l[41]=re,l[42]=fe,l[43]=oe,l[44]=O,l[45]=V,l[46]=F}else P=l[40],re=l[41],fe=l[42],oe=l[43],O=l[44],V=l[45],F=l[46];let K=I?P:void 0,J;return l[74]!==o||l[75]!==re||l[76]!==e||l[77]!==p||l[78]!==fe||l[79]!==oe||l[80]!==O||l[81]!==K||l[82]!==V||l[83]!==F?(J=D.jsx("div",{"data-handleid":V,"data-nodeid":F,"data-handlepos":fe,"data-id":oe,className:O,onMouseDown:re,onTouchStart:re,onClick:K,ref:e,...p,children:o}),l[74]=o,l[75]=re,l[76]=e,l[77]=p,l[78]=fe,l[79]=oe,l[80]=O,l[81]=K,l[82]=V,l[83]=F,l[84]=J):J=l[84],J}const sr=de.memo(ix(n6));function i6(n){let e=we.c(6),{data:l,isConnectable:o,sourcePosition:s}=n,c=s===void 0?Xt.Bottom:s,d=l==null?void 0:l.label,h;e[0]!==o||e[1]!==c?(h=D.jsx(sr,{type:"source",position:c,isConnectable:o}),e[0]=o,e[1]=c,e[2]=h):h=e[2];let g;return e[3]!==d||e[4]!==h?(g=D.jsxs(D.Fragment,{children:[d,h]}),e[3]=d,e[4]=h,e[5]=g):g=e[5],g}function l6(n){let e=we.c(10),{data:l,isConnectable:o,targetPosition:s,sourcePosition:c}=n,d=s===void 0?Xt.Top:s,h=c===void 0?Xt.Bottom:c,g;e[0]!==o||e[1]!==d?(g=D.jsx(sr,{type:"target",position:d,isConnectable:o}),e[0]=o,e[1]=d,e[2]=g):g=e[2];let m=l==null?void 0:l.label,p;e[3]!==o||e[4]!==h?(p=D.jsx(sr,{type:"source",position:h,isConnectable:o}),e[3]=o,e[4]=h,e[5]=p):p=e[5];let y;return e[6]!==g||e[7]!==m||e[8]!==p?(y=D.jsxs(D.Fragment,{children:[g,m,p]}),e[6]=g,e[7]=m,e[8]=p,e[9]=y):y=e[9],y}function a6(){return null}function o6(n){let e=we.c(6),{data:l,isConnectable:o,targetPosition:s}=n,c=s===void 0?Xt.Top:s,d;e[0]!==o||e[1]!==c?(d=D.jsx(sr,{type:"target",position:c,isConnectable:o}),e[0]=o,e[1]=c,e[2]=d):d=e[2];let h=l==null?void 0:l.label,g;return e[3]!==d||e[4]!==h?(g=D.jsxs(D.Fragment,{children:[d,h]}),e[3]=d,e[4]=h,e[5]=g):g=e[5],g}const Tc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},ey={input:i6,default:l6,output:o6,group:a6};function r6(n){var e,l,o,s;return n.internals.handleBounds===void 0?{width:n.width??n.initialWidth??((e=n.style)==null?void 0:e.width),height:n.height??n.initialHeight??((l=n.style)==null?void 0:l.height)}:{width:n.width??((o=n.style)==null?void 0:o.width),height:n.height??((s=n.style)==null?void 0:s.height)}}const s6=n=>{let{width:e,height:l,x:o,y:s}=Os(n.nodeLookup,{filter:c=>!!c.selected});return{width:Zi(e)?e:null,height:Zi(l)?l:null,x:o,y:s}};function u6(n){let e=we.c(26),{onSelectionContextMenu:l,noPanClassName:o,disableKeyboardA11y:s}=n,{nodesStore:c}=ut(),{width:d,height:h,x:g,y:m}=fr(fa(s6)),p=Ge(f6),{transform:y}=ai(),v=`translate(${y[0]}px,${y[1]}px) scale(${y[2]}) translate(${g}px,${m}px)`,E=ox(),w=de.useRef(null),b,_;e[0]===s?(b=e[1],_=e[2]):(b=()=>{var X;s||((X=w.current)==null||X.focus({preventScroll:!0}))},_=[s],e[0]=s,e[1]=b,e[2]=_),de.useEffect(b,_);let N=!p&&d!==null&&h!==null,C=!N,M;if(e[3]===C?M=e[4]:(M={nodeRef:w,disabled:C},e[3]=C,e[4]=M),ax(M),!N)return null;let S;e[5]!==c||e[6]!==l?(S=l?X=>{let B=c.getState().nodes.filter(c6);l(X,B)}:void 0,e[5]=c,e[6]=l,e[7]=S):S=e[7];let T=S,L;e[8]===E?L=e[9]:(L=X=>{Object.prototype.hasOwnProperty.call(Tc,X.key)&&(X.preventDefault(),E({direction:Tc[X.key],factor:X.shiftKey?4:1}))},e[8]=E,e[9]=L);let R=L,H;e[10]===o?H=e[11]:(H=Gt(["react-flow__nodesselection","react-flow__container",o]),e[10]=o,e[11]=H);let z;e[12]===v?z=e[13]:(z={transform:v},e[12]=v,e[13]=z);let Y=s?void 0:-1,Z=s?void 0:R,I;e[14]!==h||e[15]!==d?(I={width:d,height:h},e[14]=h,e[15]=d,e[16]=I):I=e[16];let G;e[17]!==T||e[18]!==Z||e[19]!==I||e[20]!==Y?(G=D.jsx("div",{ref:w,className:"react-flow__nodesselection-rect",onContextMenu:T,tabIndex:Y,onKeyDown:Z,style:I}),e[17]=T,e[18]=Z,e[19]=I,e[20]=Y,e[21]=G):G=e[21];let j;return e[22]!==G||e[23]!==H||e[24]!==z?(j=D.jsx("div",{className:H,style:z,children:G}),e[22]=G,e[23]=H,e[24]=z,e[25]=j):j=e[25],j}function c6(n){return n.selected}function f6(n){return n.userSelectionActive}const ty=typeof window<"u"?window:void 0;function ux(n){let e=we.c(54),{children:l,onPaneClick:o,onPaneMouseEnter:s,onPaneMouseMove:c,onPaneMouseLeave:d,onPaneContextMenu:h,onPaneScroll:g,paneDragThreshold:m,deleteKeyCode:p,selectionKeyCode:y,selectionOnDrag:v,selectionMode:E,onSelectionStart:w,onSelectionEnd:b,multiSelectionKeyCode:_,panActivationKeyCode:N,zoomActivationKeyCode:C,elementsSelectable:M,zoomOnScroll:S,zoomOnPinch:T,panOnScroll:L,panOnScrollSpeed:R,panOnScrollMode:H,zoomOnDoubleClick:z,panOnDrag:Y,autoPanOnSelection:Z,defaultViewport:I,translateExtent:G,minZoom:j,maxZoom:X,preventScrolling:B,onSelectionContextMenu:k,noWheelClassName:U,noPanClassName:Q,disableKeyboardA11y:P,onViewportChange:re,isControlledViewport:fe}=n,oe=Ge(h6),O=Ge(d6),V;e[0]===Symbol.for("react.memo_cache_sentinel")?(V={target:ty},e[0]=V):V=e[0];let F=rr(y,V),K;e[1]===Symbol.for("react.memo_cache_sentinel")?(K={target:ty},e[1]=K):K=e[1];let J=rr(N,K),ee=J||Y,ie=J||L,le;e[2]!==ee||e[3]!==v?(le=v&&!SE(ee??!0),e[2]=ee,e[3]=v,e[4]=le):le=e[4];let ce=le,me=F||O||ce,ve;e[5]!==p||e[6]!==_?(ve={deleteKeyCode:p,multiSelectionKeyCode:_},e[5]=p,e[6]=_,e[7]=ve):ve=e[7],zN(ve);let Se=!F&&ee,be=!!me,xe;e[8]!==P||e[9]!==Q||e[10]!==oe||e[11]!==k?(xe=oe&&D.jsx(u6,{onSelectionContextMenu:k,noPanClassName:Q,disableKeyboardA11y:P}),e[8]=P,e[9]=Q,e[10]=oe,e[11]=k,e[12]=xe):xe=e[12];let pe;e[13]!==ce||e[14]!==Z||e[15]!==l||e[16]!==o||e[17]!==h||e[18]!==s||e[19]!==d||e[20]!==c||e[21]!==g||e[22]!==b||e[23]!==w||e[24]!==ee||e[25]!==m||e[26]!==F||e[27]!==E||e[28]!==be||e[29]!==xe?(pe=D.jsxs(kN,{onSelectionStart:w,onSelectionEnd:b,onPaneClick:o,onPaneMouseEnter:s,onPaneMouseMove:c,onPaneMouseLeave:d,onPaneContextMenu:h,onPaneScroll:g,panOnDrag:ee,autoPanOnSelection:Z,isSelecting:be,selectionMode:E,selectionKeyPressed:F,paneDragThreshold:m,selectionOnDrag:ce,children:[l,xe]}),e[13]=ce,e[14]=Z,e[15]=l,e[16]=o,e[17]=h,e[18]=s,e[19]=d,e[20]=c,e[21]=g,e[22]=b,e[23]=w,e[24]=ee,e[25]=m,e[26]=F,e[27]=E,e[28]=be,e[29]=xe,e[30]=pe):pe=e[30];let Ee;return e[31]!==I||e[32]!==M||e[33]!==fe||e[34]!==X||e[35]!==j||e[36]!==Q||e[37]!==U||e[38]!==h||e[39]!==re||e[40]!==J||e[41]!==ie||e[42]!==H||e[43]!==R||e[44]!==m||e[45]!==B||e[46]!==Se||e[47]!==pe||e[48]!==G||e[49]!==C||e[50]!==z||e[51]!==T||e[52]!==S?(Ee=D.jsx(DN,{onPaneContextMenu:h,elementsSelectable:M,zoomOnScroll:S,zoomOnPinch:T,panOnScroll:ie,panActivationKeyPressed:J,panOnScrollSpeed:R,panOnScrollMode:H,zoomOnDoubleClick:z,panOnDrag:Se,defaultViewport:I,translateExtent:G,minZoom:j,maxZoom:X,zoomActivationKeyCode:C,preventScrolling:B,noWheelClassName:U,noPanClassName:Q,onViewportChange:re,isControlledViewport:fe,paneDragThreshold:m,children:pe}),e[31]=I,e[32]=M,e[33]=fe,e[34]=X,e[35]=j,e[36]=Q,e[37]=U,e[38]=h,e[39]=re,e[40]=J,e[41]=ie,e[42]=H,e[43]=R,e[44]=m,e[45]=B,e[46]=Se,e[47]=pe,e[48]=G,e[49]=C,e[50]=z,e[51]=T,e[52]=S,e[53]=Ee):Ee=e[53],Ee}function d6(n){return n.userSelectionActive}function h6(n){return n.nodesSelectionActive}ux.displayName="FlowRenderer";const g6=ux,m6=(n,e)=>l=>n?E0(l.nodeLookup,{x:0,y:0,width:e.width,height:e.height},e.transform,!0).map(o=>o.id):Array.from(l.nodeLookup.keys());function p6(n){let e=we.c(5),l;e[0]===n?l=e[1]:(l=c=>n?c:void 0,e[0]=n,e[1]=l);let o=ai(l),s;return e[2]!==n||e[3]!==o?(s=m6(n,o),e[2]=n,e[3]=o,e[4]=s):s=e[4],fr(fa(s))}function y6(){let n=we.c(5),{optionsStore:e}=ut(),l;n[0]===e?l=n[1]:(l=()=>typeof ResizeObserver>"u"?null:new ResizeObserver(d=>{let h=new Map;d.forEach(g=>{let m=g.target.getAttribute("data-id");h.set(m,{id:m,nodeElement:g.target,force:!0})}),e.getState().updateNodeInternals(h)}),n[0]=e,n[1]=l);let[o]=de.useState(l),s,c;return n[2]===o?(s=n[3],c=n[4]):(s=()=>()=>{o==null||o.disconnect()},c=[o],n[2]=o,n[3]=s,n[4]=c),de.useEffect(s,c),o}function Ac(n){let e=we.c(6),{optionsStore:l,nodesStore:o}=ut(),s;e[0]!==n||e[1]!==l?(s=g=>l.getState().pubSub.subscribeToNode(n,g),e[0]=n,e[1]=l,e[2]=s):s=e[2];let c=s,d;e[3]!==n||e[4]!==o?(d=()=>o.getState().nodeLookup.get(n),e[3]=n,e[4]=o,e[5]=d):d=e[5];let h=d;return de.useSyncExternalStore(c,h,h)}function v6(n){let e=we.c(23),{node:l,nodeType:o,hasDimensions:s,resizeObserver:c}=n,{optionsStore:d}=ut(),h=de.useRef(null),g=de.useRef(null),m=de.useRef(l.sourcePosition),p=de.useRef(l.targetPosition),y=de.useRef(o),v=s&&!!l.internals.handleBounds,E;e[0]!==v||e[1]!==l.hidden||e[2]!==c?(E=()=>{!h.current||l.hidden||v&&g.current===h.current||(g.current&&(c==null||c.unobserve(g.current)),c==null||c.observe(h.current),g.current=h.current)},e[0]=v,e[1]=l.hidden,e[2]=c,e[3]=E):E=e[3];let w;e[4]!==v||e[5]!==l.hidden||e[6]!==l.measured.height||e[7]!==l.measured.width?(w=[v,l.hidden,l.measured.width,l.measured.height],e[4]=v,e[5]=l.hidden,e[6]=l.measured.height,e[7]=l.measured.width,e[8]=w):w=e[8],de.useEffect(E,w);let b;e[9]===c?b=e[10]:(b=()=>()=>{g.current&&(c==null||c.unobserve(g.current),g.current=null)},e[9]=c,e[10]=b);let _;e[11]===Symbol.for("react.memo_cache_sentinel")?(_=[],e[11]=_):_=e[11],de.useEffect(b,_);let N;e[12]!==l.id||e[13]!==l.sourcePosition||e[14]!==l.targetPosition||e[15]!==o||e[16]!==d?(N=()=>{if(h.current){let M=y.current!==o,S=m.current!==l.sourcePosition,T=p.current!==l.targetPosition;(M||S||T)&&(y.current=o,m.current=l.sourcePosition,p.current=l.targetPosition,d.getState().updateNodeInternals(new Map([[l.id,{id:l.id,nodeElement:h.current,force:!0}]])))}},e[12]=l.id,e[13]=l.sourcePosition,e[14]=l.targetPosition,e[15]=o,e[16]=d,e[17]=N):N=e[17];let C;return e[18]!==l.id||e[19]!==l.sourcePosition||e[20]!==l.targetPosition||e[21]!==o?(C=[l.id,o,l.sourcePosition,l.targetPosition],e[18]=l.id,e[19]=l.sourcePosition,e[20]=l.targetPosition,e[21]=o,e[22]=C):C=e[22],de.useEffect(N,C),h}function x6(n){let e=we.c(119),{id:l,onClick:o,onMouseEnter:s,onMouseMove:c,onMouseLeave:d,onContextMenu:h,onDoubleClick:g,nodesDraggable:m,elementsSelectable:p,nodesConnectable:y,nodesFocusable:v,resizeObserver:E,noDragClassName:w,noPanClassName:b,disableKeyboardA11y:_,rfId:N,nodeTypes:C,onError:M}=n,S=Ac(l),{internals:T}=S,L=S.type||"default",R=(C==null?void 0:C[L])||ey[L];R===void 0&&(M==null||M("003",_i.error003(L)),L="default",R=(C==null?void 0:C.default)||ey.default);let H=!!(S.draggable||m&&S.draggable===void 0),z=!!(S.selectable||p&&S.selectable===void 0),Y=!!(S.connectable||y&&S.connectable===void 0),Z=!!(S.focusable||v&&S.focusable===void 0),{optionsStore:I,viewportStore:G,nodesStore:j}=ut(),X;e[0]===S?X=e[1]:(X=Y5(S),e[0]=S,e[1]=X);let B=X,k;e[2]!==B||e[3]!==S||e[4]!==L||e[5]!==E?(k={node:S,nodeType:L,hasDimensions:B,resizeObserver:E},e[2]=B,e[3]=S,e[4]=L,e[5]=E,e[6]=k):k=e[6];let U=v6(k),Q=S.hidden||!H,P;e[7]!==l||e[8]!==z||e[9]!==w||e[10]!==S.dragHandle||e[11]!==U||e[12]!==Q?(P={nodeRef:U,disabled:Q,noDragClassName:w,handleSelector:S.dragHandle,nodeId:l,isSelectable:z},e[7]=l,e[8]=z,e[9]=w,e[10]=S.dragHandle,e[11]=U,e[12]=Q,e[13]=P):P=e[13];let re=ax(P),fe=ox();if(S.hidden)return null;let oe;e[14]===S?oe=e[15]:(oe=Ei(S),e[14]=S,e[15]=oe);let O=oe,V;e[16]===S?V=e[17]:(V=r6(S),e[16]=S,e[17]=V);let F=V,K=z||H||o||s||c||d,J;e[18]!==T.userNode||e[19]!==s?(J=s?ye=>s(ye,{...T.userNode}):void 0,e[18]=T.userNode,e[19]=s,e[20]=J):J=e[20];let ee=J,ie;e[21]!==T.userNode||e[22]!==c?(ie=c?ye=>c(ye,{...T.userNode}):void 0,e[21]=T.userNode,e[22]=c,e[23]=ie):ie=e[23];let le=ie,ce;e[24]!==T.userNode||e[25]!==d?(ce=d?ye=>d(ye,{...T.userNode}):void 0,e[24]=T.userNode,e[25]=d,e[26]=ce):ce=e[26];let me=ce,ve;e[27]!==T.userNode||e[28]!==h?(ve=h?ye=>h(ye,{...T.userNode}):void 0,e[27]=T.userNode,e[28]=h,e[29]=ve):ve=e[29];let Se=ve,be;e[30]!==T.userNode||e[31]!==g?(be=g?ye=>g(ye,{...T.userNode}):void 0,e[30]=T.userNode,e[31]=g,e[32]=be):be=e[32];let xe=be,pe;e[33]!==l||e[34]!==T.userNode||e[35]!==H||e[36]!==z||e[37]!==U||e[38]!==j||e[39]!==o||e[40]!==I?(pe=ye=>{let{selectNodesOnDrag:Re,nodeDragThreshold:Ae}=I.getState();z&&(!Re||!H||Ae>0)&&n0({id:l,optionsStore:I,nodesStore:j,nodeRef:U}),o&&o(ye,{...T.userNode})},e[33]=l,e[34]=T.userNode,e[35]=H,e[36]=z,e[37]=U,e[38]=j,e[39]=o,e[40]=I,e[41]=pe):pe=e[41];let Ee=pe,Me;e[42]!==_||e[43]!==l||e[44]!==T.positionAbsolute||e[45]!==H||e[46]!==z||e[47]!==fe||e[48]!==S.selected||e[49]!==U||e[50]!==j||e[51]!==I?(Me=ye=>{var Re;if(!(Mv(ye.nativeEvent)||_)){if(mv.includes(ye.key)&&z){let Ae=ye.key==="Escape";n0({id:l,optionsStore:I,nodesStore:j,unselect:Ae,nodeRef:U})}else if(H&&S.selected&&Object.prototype.hasOwnProperty.call(Tc,ye.key)){ye.preventDefault(),fe({direction:Tc[ye.key],factor:ye.shiftKey?4:1});let{ariaLabelConfig:Ae}=I.getState(),{nodeLookup:Fe}=j.getState(),Oe=((Re=Fe.get(l))==null?void 0:Re.internals.positionAbsolute)??T.positionAbsolute;I.setState({ariaLiveMessage:Ae["node.a11yDescription.ariaLiveMessage"]({direction:ye.key.replace("Arrow","").toLowerCase(),x:~~Oe.x,y:~~Oe.y})})}}},e[42]=_,e[43]=l,e[44]=T.positionAbsolute,e[45]=H,e[46]=z,e[47]=fe,e[48]=S.selected,e[49]=U,e[50]=j,e[51]=I,e[52]=Me):Me=e[52];let je=Me,He;e[53]!==_||e[54]!==l||e[55]!==S||e[56]!==O||e[57]!==U||e[58]!==I||e[59]!==G?(He=()=>{var tt;if(_||!((tt=U.current)!=null&&tt.matches(":focus-visible")))return;let{transform:ye,width:Re,height:Ae}=G.getState(),{autoPanOnNodeFocus:Fe,setCenter:Oe}=I.getState();Fe&&(E0(new Map([[l,S]]),{x:0,y:0,width:Re,height:Ae},ye,!0).length>0||Oe(S.position.x+O.width/2,S.position.y+O.height/2,{zoom:ye[2]}))},e[53]=_,e[54]=l,e[55]=S,e[56]=O,e[57]=U,e[58]=I,e[59]=G,e[60]=He):He=e[60];let Ue=He,Le=`react-flow__node-${L}`,qe;e[61]!==re||e[62]!==T.isParent||e[63]!==H||e[64]!==z||e[65]!==b||e[66]!==S.className||e[67]!==S.selected||e[68]!==Le?(qe=Gt(["react-flow__node",Le,{[b]:H},S.className,{selected:S.selected,selectable:z,parent:T.isParent,draggable:H,dragging:re}]),e[61]=re,e[62]=T.isParent,e[63]=H,e[64]=z,e[65]=b,e[66]=S.className,e[67]=S.selected,e[68]=Le,e[69]=qe):qe=e[69];let at=`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,$e=K?"all":"none",ct=B?"visible":"hidden",Ve;e[70]!==F||e[71]!==T.z||e[72]!==S.style||e[73]!==at||e[74]!==$e||e[75]!==ct?(Ve={zIndex:T.z,transform:at,pointerEvents:$e,visibility:ct,...S.style,...F},e[70]=F,e[71]=T.z,e[72]=S.style,e[73]=at,e[74]=$e,e[75]=ct,e[76]=Ve):Ve=e[76];let Ie=`rf__node-${l}`,Je=Z?je:void 0,gt=Z?0:void 0,et=Z?Ue:void 0,rt=S.ariaRole??(Z?"group":void 0),ft=_?void 0:`${ex}-${N}`,pt=S.selected??!1,yt=S.deletable??!0,mt;e[77]!==R||e[78]!==re||e[79]!==l||e[80]!==T.positionAbsolute.x||e[81]!==T.positionAbsolute.y||e[82]!==T.z||e[83]!==Y||e[84]!==H||e[85]!==z||e[86]!==S.data||e[87]!==S.dragHandle||e[88]!==S.parentId||e[89]!==S.sourcePosition||e[90]!==S.targetPosition||e[91]!==O||e[92]!==L||e[93]!==pt||e[94]!==yt?(mt=D.jsx(R,{id:l,data:S.data,type:L,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:pt,selectable:z,draggable:H,deletable:yt,isConnectable:Y,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:re,dragHandle:S.dragHandle,zIndex:T.z,parentId:S.parentId,...O}),e[77]=R,e[78]=re,e[79]=l,e[80]=T.positionAbsolute.x,e[81]=T.positionAbsolute.y,e[82]=T.z,e[83]=Y,e[84]=H,e[85]=z,e[86]=S.data,e[87]=S.dragHandle,e[88]=S.parentId,e[89]=S.sourcePosition,e[90]=S.targetPosition,e[91]=O,e[92]=L,e[93]=pt,e[94]=yt,e[95]=mt):mt=e[95];let Xe;e[96]!==l||e[97]!==mt?(Xe=D.jsx($N,{value:l,children:mt}),e[96]=l,e[97]=mt,e[98]=Xe):Xe=e[98];let Mt;return e[99]!==l||e[100]!==S.ariaLabel||e[101]!==S.domAttributes||e[102]!==U||e[103]!==Se||e[104]!==xe||e[105]!==ee||e[106]!==me||e[107]!==le||e[108]!==Ee||e[109]!==qe||e[110]!==Ve||e[111]!==Ie||e[112]!==Je||e[113]!==gt||e[114]!==et||e[115]!==rt||e[116]!==ft||e[117]!==Xe?(Mt=D.jsx("div",{className:qe,ref:U,style:Ve,"data-id":l,"data-testid":Ie,onMouseEnter:ee,onMouseMove:le,onMouseLeave:me,onContextMenu:Se,onClick:Ee,onDoubleClick:xe,onKeyDown:Je,tabIndex:gt,onFocus:et,role:rt,"aria-roledescription":"node","aria-describedby":ft,"aria-label":S.ariaLabel,...S.domAttributes,children:Xe}),e[99]=l,e[100]=S.ariaLabel,e[101]=S.domAttributes,e[102]=U,e[103]=Se,e[104]=xe,e[105]=ee,e[106]=me,e[107]=le,e[108]=Ee,e[109]=qe,e[110]=Ve,e[111]=Ie,e[112]=Je,e[113]=gt,e[114]=et,e[115]=rt,e[116]=ft,e[117]=Xe,e[118]=Mt):Mt=e[118],Mt}var b6=de.memo(x6);function cx(n){let e=we.c(41),l=Ge(E6),o=Ge(w6),s=Ge(_6),c=Ge(S6),d=p6(n.onlyRenderVisibleElements),h=y6(),g;if(e[0]!==s||e[1]!==d||e[2]!==l||e[3]!==o||e[4]!==c||e[5]!==n.disableKeyboardA11y||e[6]!==n.noDragClassName||e[7]!==n.noPanClassName||e[8]!==n.nodeExtent||e[9]!==n.nodeTypes||e[10]!==n.nodesDraggable||e[11]!==n.onNodeClick||e[12]!==n.onNodeContextMenu||e[13]!==n.onNodeDoubleClick||e[14]!==n.onNodeMouseEnter||e[15]!==n.onNodeMouseLeave||e[16]!==n.onNodeMouseMove||e[17]!==n.rfId||e[18]!==h){let p;e[20]!==s||e[21]!==l||e[22]!==o||e[23]!==c||e[24]!==n.disableKeyboardA11y||e[25]!==n.noDragClassName||e[26]!==n.noPanClassName||e[27]!==n.nodeExtent||e[28]!==n.nodeTypes||e[29]!==n.nodesDraggable||e[30]!==n.onNodeClick||e[31]!==n.onNodeContextMenu||e[32]!==n.onNodeDoubleClick||e[33]!==n.onNodeMouseEnter||e[34]!==n.onNodeMouseLeave||e[35]!==n.onNodeMouseMove||e[36]!==n.rfId||e[37]!==h?(p=y=>D.jsx(b6,{id:y,nodeTypes:n.nodeTypes,nodeExtent:n.nodeExtent,onClick:n.onNodeClick,onMouseEnter:n.onNodeMouseEnter,onMouseMove:n.onNodeMouseMove,onMouseLeave:n.onNodeMouseLeave,onContextMenu:n.onNodeContextMenu,onDoubleClick:n.onNodeDoubleClick,noDragClassName:n.noDragClassName,noPanClassName:n.noPanClassName,rfId:n.rfId,disableKeyboardA11y:n.disableKeyboardA11y,resizeObserver:h,nodesDraggable:n.nodesDraggable??!0,nodesConnectable:l,nodesFocusable:o,elementsSelectable:s,onError:c},y),e[20]=s,e[21]=l,e[22]=o,e[23]=c,e[24]=n.disableKeyboardA11y,e[25]=n.noDragClassName,e[26]=n.noPanClassName,e[27]=n.nodeExtent,e[28]=n.nodeTypes,e[29]=n.nodesDraggable,e[30]=n.onNodeClick,e[31]=n.onNodeContextMenu,e[32]=n.onNodeDoubleClick,e[33]=n.onNodeMouseEnter,e[34]=n.onNodeMouseLeave,e[35]=n.onNodeMouseMove,e[36]=n.rfId,e[37]=h,e[38]=p):p=e[38],g=d.map(p),e[0]=s,e[1]=d,e[2]=l,e[3]=o,e[4]=c,e[5]=n.disableKeyboardA11y,e[6]=n.noDragClassName,e[7]=n.noPanClassName,e[8]=n.nodeExtent,e[9]=n.nodeTypes,e[10]=n.nodesDraggable,e[11]=n.onNodeClick,e[12]=n.onNodeContextMenu,e[13]=n.onNodeDoubleClick,e[14]=n.onNodeMouseEnter,e[15]=n.onNodeMouseLeave,e[16]=n.onNodeMouseMove,e[17]=n.rfId,e[18]=h,e[19]=g}else g=e[19];let m;return e[39]===g?m=e[40]:(m=D.jsx("div",{className:"react-flow__nodes",style:Zc,children:g}),e[39]=g,e[40]=m),m}function S6(n){return n.onError}function _6(n){return n.elementsSelectable}function w6(n){return n.nodesFocusable}function E6(n){return n.nodesConnectable}cx.displayName="NodeRenderer";const N6=de.memo(cx);function C6(n){let e=we.c(8),l;e[0]===n?l=e[1]:(l=h=>n?h:void 0,e[0]=n,e[1]=l);let o=ai(l),s;e[2]===n?s=e[3]:(s=h=>n?h:void 0,e[2]=n,e[3]=s);let c=fr(s),d;return e[4]!==c||e[5]!==n||e[6]!==o?(d=h=>{if(!n)return h.edges.map(M6);let g=[];if(o.width&&o.height)for(let m of h.edges){let p=c.nodeLookup.get(m.source),y=c.nodeLookup.get(m.target);p&&y&&K5({sourceNode:p,targetNode:y,width:o.width,height:o.height,transform:o.transform})&&g.push(m.id)}return g},e[4]=c,e[5]=n,e[6]=o,e[7]=d):d=e[7],D0(fa(d))}function M6(n){return n.id}const T6=n=>{let e=we.c(5),{color:l,strokeWidth:o}=n,s=l===void 0?"none":l,c=o===void 0?1:o,d;e[0]===s?d=e[1]:(d=s&&{stroke:s},e[0]=s,e[1]=d);let h;if(e[2]!==c||e[3]!==d){let g={strokeWidth:c,...d};h=D.jsx("polyline",{className:"arrow",style:g,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"}),e[2]=c,e[3]=d,e[4]=h}else h=e[4];return h},A6=n=>{let e=we.c(5),{color:l,strokeWidth:o}=n,s=l===void 0?"none":l,c=o===void 0?1:o,d;e[0]===s?d=e[1]:(d=s&&{stroke:s,fill:s},e[0]=s,e[1]=d);let h;if(e[2]!==c||e[3]!==d){let g={strokeWidth:c,...d};h=D.jsx("polyline",{className:"arrowclosed",style:g,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),e[2]=c,e[3]=d,e[4]=h}else h=e[4];return h},ny={[mp.Arrow]:T6,[mp.ArrowClosed]:A6},O6=n=>{let e=we.c(11),{id:l,type:o,color:s,width:c,height:d,markerUnits:h,strokeWidth:g,orient:m,onError:p}=n,y=c===void 0?12.5:c,v=d===void 0?12.5:d,E=h===void 0?"strokeWidth":h,w=m===void 0?"auto-start-reverse":m;if(!Object.hasOwn(ny,o))return p==null||p("009",_i.error009(o)),null;let b=ny[o],_=`${y}`,N=`${v}`,C;e[0]!==b||e[1]!==s||e[2]!==g?(C=D.jsx(b,{color:s,strokeWidth:g}),e[0]=b,e[1]=s,e[2]=g,e[3]=C):C=e[3];let M;return e[4]!==l||e[5]!==E||e[6]!==w||e[7]!==_||e[8]!==N||e[9]!==C?(M=D.jsx("marker",{className:"react-flow__arrowhead",id:l,markerWidth:_,markerHeight:N,viewBox:"-10 -10 20 20",markerUnits:E,orient:w,refX:"0",refY:"0",children:C}),e[4]=l,e[5]=E,e[6]=w,e[7]=_,e[8]=N,e[9]=C,e[10]=M):M=e[10],M},fx=n=>{let e=we.c(18),{defaultColor:l,rfId:o,onError:s}=n,c=Ge(R6),{edges:d}=D0(),h,g,m,p;if(e[0]!==l||e[1]!==(c==null?void 0:c.markerEnd)||e[2]!==(c==null?void 0:c.markerStart)||e[3]!==d||e[4]!==s||e[5]!==o){p=Symbol.for("react.early_return_sentinel");e:{let E=nE(d,{id:o,defaultColor:l,defaultMarkerStart:c==null?void 0:c.markerStart,defaultMarkerEnd:c==null?void 0:c.markerEnd});if(!E.length){p=null;break e}g="react-flow__marker",m="true";let w;e[10]===s?w=e[11]:(w=b=>D.jsx(O6,{id:b.id,type:b.type,color:b.color,width:b.width,height:b.height,markerUnits:b.markerUnits,strokeWidth:b.strokeWidth,orient:b.orient,onError:s},b.id),e[10]=s,e[11]=w),h=E.map(w)}e[0]=l,e[1]=c==null?void 0:c.markerEnd,e[2]=c==null?void 0:c.markerStart,e[3]=d,e[4]=s,e[5]=o,e[6]=h,e[7]=g,e[8]=m,e[9]=p}else h=e[6],g=e[7],m=e[8],p=e[9];if(p!==Symbol.for("react.early_return_sentinel"))return p;let y;e[12]===h?y=e[13]:(y=D.jsx("defs",{children:h}),e[12]=h,e[13]=y);let v;return e[14]!==g||e[15]!==m||e[16]!==y?(v=D.jsx("svg",{className:g,"aria-hidden":m,children:y}),e[14]=g,e[15]=m,e[16]=y,e[17]=v):v=e[17],v};fx.displayName="MarkerDefinitions";var z6=de.memo(fx);function R6(n){return n.defaultEdgeOptions}function D6(n){let e=we.c(6),{optionsStore:l,edgesStore:o}=ut(),s;e[0]!==n||e[1]!==l?(s=g=>l.getState().pubSub.subscribeToEdge(n,g),e[0]=n,e[1]=l,e[2]=s):s=e[2];let c=s,d;e[3]!==o||e[4]!==n?(d=()=>o.getState().edgeLookup.get(n),e[3]=o,e[4]=n,e[5]=d):d=e[5];let h=d;return de.useSyncExternalStore(c,h,h)}const j6=[2,4];function dx(n){let e=we.c(37),l,o,s,c,d,h,g,m,p,y,v;e[0]===n?(l=e[1],o=e[2],s=e[3],c=e[4],d=e[5],h=e[6],g=e[7],m=e[8],p=e[9],y=e[10],v=e[11]):({x:y,y:v,label:s,labelStyle:d,labelShowBg:g,labelBgStyle:c,labelBgPadding:m,labelBgBorderRadius:p,children:l,className:o,...h}=n,e[0]=n,e[1]=l,e[2]=o,e[3]=s,e[4]=c,e[5]=d,e[6]=h,e[7]=g,e[8]=m,e[9]=p,e[10]=y,e[11]=v);let E=g===void 0||g,w=m===void 0?j6:m,b=p===void 0?2:p,_;e[12]===Symbol.for("react.memo_cache_sentinel")?(_={x:1,y:0,width:0,height:0},e[12]=_):_=e[12];let[N,C]=de.useState(_),M;e[13]===o?M=e[14]:(M=Gt(["react-flow__edge-textwrapper",o]),e[13]=o,e[14]=M);let S=M,T=de.useRef(null),L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=()=>{if(T.current){let j=T.current.getBBox();C({x:j.x,y:j.y,width:j.width,height:j.height})}},e[15]=L):L=e[15];let R;if(e[16]===s?R=e[17]:(R=[s],e[16]=s,e[17]=R),de.useEffect(L,R),!s)return null;let H=`translate(${y-N.width/2} ${v-N.height/2})`,z=N.width?"visible":"hidden",Y;e[18]!==N.height||e[19]!==N.width||e[20]!==b||e[21]!==w||e[22]!==c||e[23]!==E?(Y=E&&D.jsx("rect",{width:N.width+2*w[0],x:-w[0],y:-w[1],height:N.height+2*w[1],className:"react-flow__edge-textbg",style:c,rx:b,ry:b}),e[18]=N.height,e[19]=N.width,e[20]=b,e[21]=w,e[22]=c,e[23]=E,e[24]=Y):Y=e[24];let Z=N.height/2,I;e[25]!==s||e[26]!==d||e[27]!==Z?(I=D.jsx("text",{className:"react-flow__edge-text",y:Z,dy:"0.3em",ref:T,style:d,children:s}),e[25]=s,e[26]=d,e[27]=Z,e[28]=I):I=e[28];let G;return e[29]!==l||e[30]!==S||e[31]!==h||e[32]!==Y||e[33]!==I||e[34]!==H||e[35]!==z?(G=D.jsxs("g",{transform:H,className:S,visibility:z,...h,children:[Y,I,l]}),e[29]=l,e[30]=S,e[31]=h,e[32]=Y,e[33]=I,e[34]=H,e[35]=z,e[36]=G):G=e[36],G}dx.displayName="EdgeText";const H6=de.memo(dx);function Qc(n){let e=we.c(36),l,o,s,c,d,h,g,m,p,y,v,E,w,b;if(e[0]!==n){let{path:S,labelX:T,labelY:L,label:R,labelStyle:H,labelShowBg:z,labelBgStyle:Y,labelBgPadding:Z,labelBgBorderRadius:I,interactionWidth:G,...j}=n;y=S,m=T,p=L,o=R,g=H,h=z,d=Y,c=Z,s=I,l=G===void 0?20:G,v=j,E=y,w="none",b=Gt(["react-flow__edge-path",j.className]),e[0]=n,e[1]=l,e[2]=o,e[3]=s,e[4]=c,e[5]=d,e[6]=h,e[7]=g,e[8]=m,e[9]=p,e[10]=y,e[11]=v,e[12]=E,e[13]=w,e[14]=b}else l=e[1],o=e[2],s=e[3],c=e[4],d=e[5],h=e[6],g=e[7],m=e[8],p=e[9],y=e[10],v=e[11],E=e[12],w=e[13],b=e[14];let _;e[15]!==v||e[16]!==E||e[17]!==w||e[18]!==b?(_=D.jsx("path",{...v,d:E,fill:w,className:b}),e[15]=v,e[16]=E,e[17]=w,e[18]=b,e[19]=_):_=e[19];let N;e[20]!==l||e[21]!==y?(N=l?D.jsx("path",{d:y,fill:"none",strokeOpacity:0,strokeWidth:l,className:"react-flow__edge-interaction"}):null,e[20]=l,e[21]=y,e[22]=N):N=e[22];let C;e[23]!==o||e[24]!==s||e[25]!==c||e[26]!==d||e[27]!==h||e[28]!==g||e[29]!==m||e[30]!==p?(C=o&&Zi(m)&&Zi(p)?D.jsx(H6,{x:m,y:p,label:o,labelStyle:g,labelShowBg:h,labelBgStyle:d,labelBgPadding:c,labelBgBorderRadius:s}):null,e[23]=o,e[24]=s,e[25]=c,e[26]=d,e[27]=h,e[28]=g,e[29]=m,e[30]=p,e[31]=C):C=e[31];let M;return e[32]!==_||e[33]!==N||e[34]!==C?(M=D.jsxs(D.Fragment,{children:[_,N,C]}),e[32]=_,e[33]=N,e[34]=C,e[35]=M):M=e[35],M}function iy({pos:n,x1:e,y1:l,x2:o,y2:s}){return n===Xt.Left||n===Xt.Right?[.5*(e+o),l]:[e,.5*(l+s)]}function hx({sourceX:n,sourceY:e,sourcePosition:l=Xt.Bottom,targetX:o,targetY:s,targetPosition:c=Xt.Top}){let[d,h]=iy({pos:l,x1:n,y1:e,x2:o,y2:s}),[g,m]=iy({pos:c,x1:o,y1:s,x2:n,y2:e}),[p,y,v,E]=Tv({sourceX:n,sourceY:e,targetX:o,targetY:s,sourceControlX:d,sourceControlY:h,targetControlX:g,targetControlY:m});return[`M${n},${e} C${d},${h} ${g},${m} ${o},${s}`,p,y,v,E]}function gx(n){function e(l){let o=we.c(22),{id:s,sourceX:c,sourceY:d,targetX:h,targetY:g,sourcePosition:m,targetPosition:p,label:y,labelStyle:v,labelShowBg:E,labelBgStyle:w,labelBgPadding:b,labelBgBorderRadius:_,style:N,markerEnd:C,markerStart:M,interactionWidth:S}=l,T;o[0]!==m||o[1]!==c||o[2]!==d||o[3]!==p||o[4]!==h||o[5]!==g?(T=hx({sourceX:c,sourceY:d,sourcePosition:m,targetX:h,targetY:g,targetPosition:p}),o[0]=m,o[1]=c,o[2]=d,o[3]=p,o[4]=h,o[5]=g,o[6]=T):T=o[6];let[L,R,H]=T,z=n.isInternal?void 0:s,Y;return o[7]!==z||o[8]!==S||o[9]!==y||o[10]!==_||o[11]!==b||o[12]!==w||o[13]!==E||o[14]!==v||o[15]!==R||o[16]!==H||o[17]!==C||o[18]!==M||o[19]!==L||o[20]!==N?(Y=D.jsx(Qc,{id:z,path:L,labelX:R,labelY:H,label:y,labelStyle:v,labelShowBg:E,labelBgStyle:w,labelBgPadding:b,labelBgBorderRadius:_,style:N,markerEnd:C,markerStart:M,interactionWidth:S}),o[7]=z,o[8]=S,o[9]=y,o[10]=_,o[11]=b,o[12]=w,o[13]=E,o[14]=v,o[15]=R,o[16]=H,o[17]=C,o[18]=M,o[19]=L,o[20]=N,o[21]=Y):Y=o[21],Y}return e.displayName=n.isInternal?"SimpleBezierEdgeInternal":"SimpleBezierEdge",de.memo(e)}gx({isInternal:!1});const B6=gx({isInternal:!0});function mx(n){function e(l){let o=we.c(25),{id:s,sourceX:c,sourceY:d,targetX:h,targetY:g,label:m,labelStyle:p,labelShowBg:y,labelBgStyle:v,labelBgPadding:E,labelBgBorderRadius:w,style:b,sourcePosition:_,targetPosition:N,markerEnd:C,markerStart:M,pathOptions:S,interactionWidth:T}=l,L=_===void 0?Xt.Bottom:_,R=N===void 0?Xt.Top:N,H=S==null?void 0:S.borderRadius,z=S==null?void 0:S.offset,Y=S==null?void 0:S.stepPosition,Z;o[0]!==L||o[1]!==c||o[2]!==d||o[3]!==H||o[4]!==z||o[5]!==Y||o[6]!==R||o[7]!==h||o[8]!==g?(Z=Jh({sourceX:c,sourceY:d,sourcePosition:L,targetX:h,targetY:g,targetPosition:R,borderRadius:H,offset:z,stepPosition:Y}),o[0]=L,o[1]=c,o[2]=d,o[3]=H,o[4]=z,o[5]=Y,o[6]=R,o[7]=h,o[8]=g,o[9]=Z):Z=o[9];let[I,G,j]=Z,X=n.isInternal?void 0:s,B;return o[10]!==X||o[11]!==T||o[12]!==m||o[13]!==w||o[14]!==E||o[15]!==v||o[16]!==y||o[17]!==p||o[18]!==G||o[19]!==j||o[20]!==C||o[21]!==M||o[22]!==I||o[23]!==b?(B=D.jsx(Qc,{id:X,path:I,labelX:G,labelY:j,label:m,labelStyle:p,labelShowBg:y,labelBgStyle:v,labelBgPadding:E,labelBgBorderRadius:w,style:b,markerEnd:C,markerStart:M,interactionWidth:T}),o[10]=X,o[11]=T,o[12]=m,o[13]=w,o[14]=E,o[15]=v,o[16]=y,o[17]=p,o[18]=G,o[19]=j,o[20]=C,o[21]=M,o[22]=I,o[23]=b,o[24]=B):B=o[24],B}return e.displayName=n.isInternal?"SmoothStepEdgeInternal":"SmoothStepEdge",de.memo(e)}const L6=mx({isInternal:!1}),U6=mx({isInternal:!0});function px(n){function e(l){var p;let o=we.c(9),s,c;o[0]===l?(s=o[1],c=o[2]):({id:s,...c}=l,o[0]=l,o[1]=s,o[2]=c);let d=n.isInternal?void 0:s,h=(p=c.pathOptions)==null?void 0:p.offset,g;o[3]===h?g=o[4]:(g={borderRadius:0,offset:h},o[3]=h,o[4]=g);let m;return o[5]!==d||o[6]!==c||o[7]!==g?(m=D.jsx(L6,{...c,id:d,pathOptions:g}),o[5]=d,o[6]=c,o[7]=g,o[8]=m):m=o[8],m}return e.displayName=n.isInternal?"StepEdgeInternal":"StepEdge",de.memo(e)}px({isInternal:!1});const k6=px({isInternal:!0});function yx(n){function e(l){let o=we.c(20),{id:s,sourceX:c,sourceY:d,targetX:h,targetY:g,label:m,labelStyle:p,labelShowBg:y,labelBgStyle:v,labelBgPadding:E,labelBgBorderRadius:w,style:b,markerEnd:_,markerStart:N,interactionWidth:C}=l,M;o[0]!==c||o[1]!==d||o[2]!==h||o[3]!==g?(M=zv({sourceX:c,sourceY:d,targetX:h,targetY:g}),o[0]=c,o[1]=d,o[2]=h,o[3]=g,o[4]=M):M=o[4];let[S,T,L]=M,R=n.isInternal?void 0:s,H;return o[5]!==R||o[6]!==C||o[7]!==m||o[8]!==w||o[9]!==E||o[10]!==v||o[11]!==y||o[12]!==p||o[13]!==T||o[14]!==L||o[15]!==_||o[16]!==N||o[17]!==S||o[18]!==b?(H=D.jsx(Qc,{id:R,path:S,labelX:T,labelY:L,label:m,labelStyle:p,labelShowBg:y,labelBgStyle:v,labelBgPadding:E,labelBgBorderRadius:w,style:b,markerEnd:_,markerStart:N,interactionWidth:C}),o[5]=R,o[6]=C,o[7]=m,o[8]=w,o[9]=E,o[10]=v,o[11]=y,o[12]=p,o[13]=T,o[14]=L,o[15]=_,o[16]=N,o[17]=S,o[18]=b,o[19]=H):H=o[19],H}return e.displayName=n.isInternal?"StraightEdgeInternal":"StraightEdge",de.memo(e)}yx({isInternal:!1});const Y6=yx({isInternal:!0});function vx(n){function e(l){let o=we.c(23),{id:s,sourceX:c,sourceY:d,targetX:h,targetY:g,sourcePosition:m,targetPosition:p,label:y,labelStyle:v,labelShowBg:E,labelBgStyle:w,labelBgPadding:b,labelBgBorderRadius:_,style:N,markerEnd:C,markerStart:M,pathOptions:S,interactionWidth:T}=l,L=m===void 0?Xt.Bottom:m,R=p===void 0?Xt.Top:p,H=S==null?void 0:S.curvature,z;o[0]!==L||o[1]!==c||o[2]!==d||o[3]!==H||o[4]!==R||o[5]!==h||o[6]!==g?(z=Av({sourceX:c,sourceY:d,sourcePosition:L,targetX:h,targetY:g,targetPosition:R,curvature:H}),o[0]=L,o[1]=c,o[2]=d,o[3]=H,o[4]=R,o[5]=h,o[6]=g,o[7]=z):z=o[7];let[Y,Z,I]=z,G=n.isInternal?void 0:s,j;return o[8]!==G||o[9]!==T||o[10]!==y||o[11]!==_||o[12]!==b||o[13]!==w||o[14]!==E||o[15]!==v||o[16]!==Z||o[17]!==I||o[18]!==C||o[19]!==M||o[20]!==Y||o[21]!==N?(j=D.jsx(Qc,{id:G,path:Y,labelX:Z,labelY:I,label:y,labelStyle:v,labelShowBg:E,labelBgStyle:w,labelBgPadding:b,labelBgBorderRadius:_,style:N,markerEnd:C,markerStart:M,interactionWidth:T}),o[8]=G,o[9]=T,o[10]=y,o[11]=_,o[12]=b,o[13]=w,o[14]=E,o[15]=v,o[16]=Z,o[17]=I,o[18]=C,o[19]=M,o[20]=Y,o[21]=N,o[22]=j):j=o[22],j}return e.displayName=n.isInternal?"BezierEdgeInternal":"BezierEdge",de.memo(e)}vx({isInternal:!1});const ly={default:vx({isInternal:!0}),straight:Y6,step:k6,smoothstep:U6,simplebezier:B6},ay={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},q6=(n,e,l)=>l===Xt.Left?n-e:l===Xt.Right?n+e:n,V6=(n,e,l)=>l===Xt.Top?n-e:l===Xt.Bottom?n+e:n,oy="react-flow__edgeupdater";function ry(n){let e=we.c(18),{position:l,centerX:o,centerY:s,radius:c,onMouseDown:d,onMouseEnter:h,onMouseOut:g,type:m}=n,p=c===void 0?10:c,y=`${oy}-${m}`,v;e[0]===y?v=e[1]:(v=Gt([oy,y]),e[0]=y,e[1]=v);let E;e[2]!==o||e[3]!==l||e[4]!==p?(E=q6(o,p,l),e[2]=o,e[3]=l,e[4]=p,e[5]=E):E=e[5];let w;e[6]!==s||e[7]!==l||e[8]!==p?(w=V6(s,p,l),e[6]=s,e[7]=l,e[8]=p,e[9]=w):w=e[9];let b;return e[10]!==d||e[11]!==h||e[12]!==g||e[13]!==p||e[14]!==v||e[15]!==E||e[16]!==w?(b=D.jsx("circle",{onMouseDown:d,onMouseEnter:h,onMouseOut:g,className:v,cx:E,cy:w,r:p,stroke:"transparent",fill:"transparent"}),e[10]=d,e[11]=h,e[12]=g,e[13]=p,e[14]=v,e[15]=E,e[16]=w,e[17]=b):b=e[17],b}function X6(n){let e=we.c(43),{isReconnectable:l,reconnectRadius:o,edge:s,sourceX:c,sourceY:d,targetX:h,targetY:g,sourcePosition:m,targetPosition:p,onReconnect:y,onReconnectStart:v,onReconnectEnd:E,setReconnecting:w,setUpdateHover:b}=n,{optionsStore:_,viewportStore:N,connectionStore:C,nodesStore:M}=ut(),S;e[0]!==C||e[1]!==s||e[2]!==M||e[3]!==y||e[4]!==E||e[5]!==v||e[6]!==_||e[7]!==w||e[8]!==N?(S=(k,U)=>{if(k.button!==0)return;let{autoPanOnConnect:Q,domNode:P,connectionMode:re,connectionRadius:fe,onConnectStart:oe,cancelConnection:O,rfId:V,panBy:F,updateConnection:K}=_.getState(),{nodeLookup:J}=M.getState(),ee=U.type==="target";Wh.onPointerDown(k.nativeEvent,{autoPanOnConnect:Q,connectionMode:re,connectionRadius:fe,domNode:P,handleId:U.id,nodeId:U.nodeId,nodeLookup:J,isTarget:ee,edgeUpdaterType:U.type,lib:"react",flowId:V,cancelConnection:O,panBy:F,isValidConnection:(...ie)=>{var ce,me;let le=ie;return((me=(ce=_.getState()).isValidConnection)==null?void 0:me.call(ce,...le))??!0},onConnect:ie=>y==null?void 0:y(s,ie),onConnectStart:(ie,le)=>{w(!0),v==null||v(k,s,U.type),oe==null||oe(ie,le)},onConnectEnd:(...ie)=>{var ce,me;let le=ie;return(me=(ce=_.getState()).onConnectEnd)==null?void 0:me.call(ce,...le)},onReconnectEnd:(ie,le)=>{w(!1),E==null||E(ie,s,U.type,le)},updateConnection:K,getTransform:()=>N.getState().transform,getFromHandle:()=>C.getState().connection.fromHandle,dragThreshold:_.getState().connectionDragThreshold,handleDomNode:k.currentTarget})},e[0]=C,e[1]=s,e[2]=M,e[3]=y,e[4]=E,e[5]=v,e[6]=_,e[7]=w,e[8]=N,e[9]=S):S=e[9];let T=S,L;e[10]!==s.target||e[11]!==s.targetHandle||e[12]!==T?(L=k=>T(k,{nodeId:s.target,id:s.targetHandle??null,type:"target"}),e[10]=s.target,e[11]=s.targetHandle,e[12]=T,e[13]=L):L=e[13];let R=L,H;e[14]!==s.source||e[15]!==s.sourceHandle||e[16]!==T?(H=k=>T(k,{nodeId:s.source,id:s.sourceHandle??null,type:"source"}),e[14]=s.source,e[15]=s.sourceHandle,e[16]=T,e[17]=H):H=e[17];let z=H,Y;e[18]===b?Y=e[19]:(Y=()=>b(!0),e[18]=b,e[19]=Y);let Z=Y,I;e[20]===b?I=e[21]:(I=()=>b(!1),e[20]=b,e[21]=I);let G=I,j;e[22]!==l||e[23]!==Z||e[24]!==G||e[25]!==R||e[26]!==o||e[27]!==m||e[28]!==c||e[29]!==d?(j=(l===!0||l==="source")&&D.jsx(ry,{position:m,centerX:c,centerY:d,radius:o,onMouseDown:R,onMouseEnter:Z,onMouseOut:G,type:"source"}),e[22]=l,e[23]=Z,e[24]=G,e[25]=R,e[26]=o,e[27]=m,e[28]=c,e[29]=d,e[30]=j):j=e[30];let X;e[31]!==l||e[32]!==Z||e[33]!==G||e[34]!==z||e[35]!==o||e[36]!==p||e[37]!==h||e[38]!==g?(X=(l===!0||l==="target")&&D.jsx(ry,{position:p,centerX:h,centerY:g,radius:o,onMouseDown:z,onMouseEnter:Z,onMouseOut:G,type:"target"}),e[31]=l,e[32]=Z,e[33]=G,e[34]=z,e[35]=o,e[36]=p,e[37]=h,e[38]=g,e[39]=X):X=e[39];let B;return e[40]!==j||e[41]!==X?(B=D.jsxs(D.Fragment,{children:[j,X]}),e[40]=j,e[41]=X,e[42]=B):B=e[42],B}function G6(n){let e=we.c(110),{id:l,edgesFocusable:o,edgesReconnectable:s,elementsSelectable:c,onClick:d,onDoubleClick:h,onContextMenu:g,onMouseEnter:m,onMouseMove:p,onMouseLeave:y,reconnectRadius:v,onReconnect:E,onReconnectStart:w,onReconnectEnd:b,rfId:_,edgeTypes:N,noPanClassName:C,onError:M,disableKeyboardA11y:S,connectionMode:T,elevateEdgesOnSelect:L,zIndexMode:R,defaultEdgeOptions:H}=n,z=D6(l);z=H?{...H,...z}:z;let Y=z.type||"default",Z=(N==null?void 0:N[Y])||ly[Y];Z===void 0&&(M==null||M("011",_i.error011(Y)),Y="default",Z=(N==null?void 0:N.default)||ly.default);let I=!!(z.focusable||o&&z.focusable===void 0),G=E!==void 0&&(z.reconnectable||s&&z.reconnectable===void 0),j=!!(z.selectable||c&&z.selectable===void 0),X=de.useRef(null),[B,k]=de.useState(!1),[U,Q]=de.useState(!1),{optionsStore:P}=ut(),re=Ac(z.source),fe=Ac(z.target),oe=z.zIndex,O;e:{if(!re||!fe){O=ay;break e}let Oe=z.sourceHandle||null,tt=z.targetHandle||null,Ke;e[0]!==T||e[1]!==l||e[2]!==M||e[3]!==re||e[4]!==Oe||e[5]!==tt||e[6]!==fe?(Ke=tE({id:l,sourceNode:re,targetNode:fe,sourceHandle:Oe,targetHandle:tt,connectionMode:T,onError:M}),e[0]=T,e[1]=l,e[2]=M,e[3]=re,e[4]=Oe,e[5]=tt,e[6]=fe,e[7]=Ke):Ke=e[7];let vt=Ke,Ze;e[8]!==z.selected||e[9]!==z.zIndex||e[10]!==L||e[11]!==re||e[12]!==fe||e[13]!==R?(Ze=Q5({selected:z.selected,zIndex:z.zIndex,sourceNode:re,targetNode:fe,elevateOnSelect:L,zIndexMode:R}),e[8]=z.selected,e[9]=z.zIndex,e[10]=L,e[11]=re,e[12]=fe,e[13]=R,e[14]=Ze):Ze=e[14];let dt=Ze,ht=vt||ay,bt;e[15]!==ht||e[16]!==dt?(bt={...ht,zIndex:dt},e[15]=ht,e[16]=dt,e[17]=bt):bt=e[17],O=bt}let{zIndex:V,sourceX:F,sourceY:K,targetX:J,targetY:ee,sourcePosition:ie,targetPosition:le}=O,ce=V===void 0?oe:V,me;e[18]!==z.markerStart||e[19]!==_?(me=z.markerStart?`url('#${Fh(z.markerStart,_)}')`:void 0,e[18]=z.markerStart,e[19]=_,e[20]=me):me=e[20];let ve=me,Se;e[21]!==z.markerEnd||e[22]!==_?(Se=z.markerEnd?`url('#${Fh(z.markerEnd,_)}')`:void 0,e[21]=z.markerEnd,e[22]=_,e[23]=Se):Se=e[23];let be=Se;if(z.hidden||F===null||K===null||J===null||ee===null)return null;let xe;e[24]!==z||e[25]!==l||e[26]!==j||e[27]!==d||e[28]!==P?(xe=Oe=>{var dt;let{addSelectedEdges:tt,unselectNodesAndEdges:Ke,multiSelectionActive:vt,nodesSelectionActive:Ze}=P.getState();j&&(Ze&&P.setState({nodesSelectionActive:!1}),z.selected&&vt?(Ke({nodes:[],edges:[z]}),(dt=X.current)==null||dt.blur()):tt([l])),d&&d(Oe,z)},e[24]=z,e[25]=l,e[26]=j,e[27]=d,e[28]=P,e[29]=xe):xe=e[29];let pe=xe,Ee;e[30]!==z||e[31]!==h?(Ee=h?Oe=>{h(Oe,{...z})}:void 0,e[30]=z,e[31]=h,e[32]=Ee):Ee=e[32];let Me=Ee,je;e[33]!==z||e[34]!==g?(je=g?Oe=>{g(Oe,{...z})}:void 0,e[33]=z,e[34]=g,e[35]=je):je=e[35];let He=je,Ue;e[36]!==z||e[37]!==m?(Ue=m?Oe=>{m(Oe,{...z})}:void 0,e[36]=z,e[37]=m,e[38]=Ue):Ue=e[38];let Le=Ue,qe;e[39]!==z||e[40]!==p?(qe=p?Oe=>{p(Oe,{...z})}:void 0,e[39]=z,e[40]=p,e[41]=qe):qe=e[41];let at=qe,$e;e[42]!==z||e[43]!==y?($e=y?Oe=>{y(Oe,{...z})}:void 0,e[42]=z,e[43]=y,e[44]=$e):$e=e[44];let ct=$e,Ve;e[45]!==S||e[46]!==z||e[47]!==l||e[48]!==j||e[49]!==P?(Ve=Oe=>{var tt;if(!S&&mv.includes(Oe.key)&&j){let{unselectNodesAndEdges:Ke,addSelectedEdges:vt}=P.getState();Oe.key==="Escape"?((tt=X.current)==null||tt.blur(),Ke({edges:[z]})):vt([l])}},e[45]=S,e[46]=z,e[47]=l,e[48]=j,e[49]=P,e[50]=Ve):Ve=e[50];let Ie=Ve,Je;e[51]===ce?Je=e[52]:(Je={zIndex:ce},e[51]=ce,e[52]=Je);let gt=`react-flow__edge-${Y}`,et=!j&&!d,rt;e[53]!==z.animated||e[54]!==z.className||e[55]!==z.selected||e[56]!==j||e[57]!==C||e[58]!==gt||e[59]!==et||e[60]!==B?(rt=Gt(["react-flow__edge",gt,z.className,C,{selected:z.selected,animated:z.animated,inactive:et,updating:B,selectable:j}]),e[53]=z.animated,e[54]=z.className,e[55]=z.selected,e[56]=j,e[57]=C,e[58]=gt,e[59]=et,e[60]=B,e[61]=rt):rt=e[61];let ft=I?Ie:void 0,pt=I?0:void 0,yt=z.ariaRole??(I?"group":"img"),mt=`rf__edge-${l}`,Xe=z.ariaLabel===null?void 0:z.ariaLabel||`Edge from ${z.source} to ${z.target}`,Mt=I?`${tx}-${_}`:void 0,ye;e[62]!==Z||e[63]!==z||e[64]!==l||e[65]!==j||e[66]!==be||e[67]!==ve||e[68]!==U||e[69]!==ie||e[70]!==F||e[71]!==K||e[72]!==le||e[73]!==J||e[74]!==ee?(ye=!U&&D.jsx(Z,{id:l,source:z.source,target:z.target,type:z.type,selected:z.selected,animated:z.animated,selectable:j,deletable:z.deletable??!0,label:z.label,labelStyle:z.labelStyle,labelShowBg:z.labelShowBg,labelBgStyle:z.labelBgStyle,labelBgPadding:z.labelBgPadding,labelBgBorderRadius:z.labelBgBorderRadius,sourceX:F,sourceY:K,targetX:J,targetY:ee,sourcePosition:ie,targetPosition:le,data:z.data,style:z.style,sourceHandleId:z.sourceHandle,targetHandleId:z.targetHandle,markerStart:ve,markerEnd:be,pathOptions:"pathOptions"in z?z.pathOptions:void 0,interactionWidth:z.interactionWidth}),e[62]=Z,e[63]=z,e[64]=l,e[65]=j,e[66]=be,e[67]=ve,e[68]=U,e[69]=ie,e[70]=F,e[71]=K,e[72]=le,e[73]=J,e[74]=ee,e[75]=ye):ye=e[75];let Re;e[76]!==z||e[77]!==G||e[78]!==E||e[79]!==b||e[80]!==w||e[81]!==v||e[82]!==ie||e[83]!==F||e[84]!==K||e[85]!==le||e[86]!==J||e[87]!==ee?(Re=G&&D.jsx(X6,{edge:z,isReconnectable:G,reconnectRadius:v,onReconnect:E,onReconnectStart:w,onReconnectEnd:b,sourceX:F,sourceY:K,targetX:J,targetY:ee,sourcePosition:ie,targetPosition:le,setUpdateHover:k,setReconnecting:Q}),e[76]=z,e[77]=G,e[78]=E,e[79]=b,e[80]=w,e[81]=v,e[82]=ie,e[83]=F,e[84]=K,e[85]=le,e[86]=J,e[87]=ee,e[88]=Re):Re=e[88];let Ae;e[89]!==z.domAttributes||e[90]!==l||e[91]!==pe||e[92]!==He||e[93]!==Me||e[94]!==Le||e[95]!==ct||e[96]!==at||e[97]!==rt||e[98]!==ft||e[99]!==pt||e[100]!==yt||e[101]!==mt||e[102]!==Xe||e[103]!==Mt||e[104]!==ye||e[105]!==Re?(Ae=D.jsxs("g",{className:rt,onClick:pe,onDoubleClick:Me,onContextMenu:He,onMouseEnter:Le,onMouseMove:at,onMouseLeave:ct,onKeyDown:ft,tabIndex:pt,role:yt,"aria-roledescription":"edge","data-id":l,"data-testid":mt,"aria-label":Xe,"aria-describedby":Mt,ref:X,...z.domAttributes,children:[ye,Re]}),e[89]=z.domAttributes,e[90]=l,e[91]=pe,e[92]=He,e[93]=Me,e[94]=Le,e[95]=ct,e[96]=at,e[97]=rt,e[98]=ft,e[99]=pt,e[100]=yt,e[101]=mt,e[102]=Xe,e[103]=Mt,e[104]=ye,e[105]=Re,e[106]=Ae):Ae=e[106];let Fe;return e[107]!==Je||e[108]!==Ae?(Fe=D.jsx("svg",{style:Je,children:Ae}),e[107]=Je,e[108]=Ae,e[109]=Fe):Fe=e[109],Fe}var Z6=de.memo(G6);function xx(n){let e=we.c(54),{defaultMarkerColor:l,onlyRenderVisibleElements:o,rfId:s,edgeTypes:c,noPanClassName:d,onReconnect:h,onEdgeContextMenu:g,onEdgeMouseEnter:m,onEdgeMouseMove:p,onEdgeMouseLeave:y,onEdgeClick:v,reconnectRadius:E,onEdgeDoubleClick:w,onReconnectStart:b,onReconnectEnd:_,disableKeyboardA11y:N}=n,C=Ge(W6),M=Ge(P6),S=Ge(F6),T=Ge(J6),L=Ge(I6),R=Ge($6),H=Ge(K6),z=Ge(Q6),Y=C6(o),Z;e[0]!==l||e[1]!==T||e[2]!==s?(Z=D.jsx(z6,{defaultColor:l,rfId:s,onError:T}),e[0]=l,e[1]=T,e[2]=s,e[3]=Z):Z=e[3];let I;if(e[4]!==L||e[5]!==z||e[6]!==N||e[7]!==Y||e[8]!==c||e[9]!==C||e[10]!==M||e[11]!==S||e[12]!==R||e[13]!==d||e[14]!==v||e[15]!==g||e[16]!==w||e[17]!==m||e[18]!==y||e[19]!==p||e[20]!==T||e[21]!==h||e[22]!==_||e[23]!==b||e[24]!==E||e[25]!==s||e[26]!==H){let j;e[28]!==L||e[29]!==z||e[30]!==N||e[31]!==c||e[32]!==C||e[33]!==M||e[34]!==S||e[35]!==R||e[36]!==d||e[37]!==v||e[38]!==g||e[39]!==w||e[40]!==m||e[41]!==y||e[42]!==p||e[43]!==T||e[44]!==h||e[45]!==_||e[46]!==b||e[47]!==E||e[48]!==s||e[49]!==H?(j=X=>D.jsx(Z6,{id:X,edgesFocusable:C,edgesReconnectable:M,elementsSelectable:S,noPanClassName:d,onReconnect:h,onContextMenu:g,onMouseEnter:m,onMouseMove:p,onMouseLeave:y,onClick:v,reconnectRadius:E,onDoubleClick:w,onReconnectStart:b,onReconnectEnd:_,rfId:s,onError:T,edgeTypes:c,disableKeyboardA11y:N,connectionMode:L,elevateEdgesOnSelect:R,zIndexMode:H,defaultEdgeOptions:z},X),e[28]=L,e[29]=z,e[30]=N,e[31]=c,e[32]=C,e[33]=M,e[34]=S,e[35]=R,e[36]=d,e[37]=v,e[38]=g,e[39]=w,e[40]=m,e[41]=y,e[42]=p,e[43]=T,e[44]=h,e[45]=_,e[46]=b,e[47]=E,e[48]=s,e[49]=H,e[50]=j):j=e[50],I=Y.map(j),e[4]=L,e[5]=z,e[6]=N,e[7]=Y,e[8]=c,e[9]=C,e[10]=M,e[11]=S,e[12]=R,e[13]=d,e[14]=v,e[15]=g,e[16]=w,e[17]=m,e[18]=y,e[19]=p,e[20]=T,e[21]=h,e[22]=_,e[23]=b,e[24]=E,e[25]=s,e[26]=H,e[27]=I}else I=e[27];let G;return e[51]!==Z||e[52]!==I?(G=D.jsxs("div",{className:"react-flow__edges",children:[Z,I]}),e[51]=Z,e[52]=I,e[53]=G):G=e[53],G}function Q6(n){return n.defaultEdgeOptions}function K6(n){return n.zIndexMode}function $6(n){return n.elevateEdgesOnSelect}function I6(n){return n.connectionMode}function J6(n){return n.onError}function F6(n){return n.elementsSelectable}function P6(n){return n.edgesReconnectable}function W6(n){return n.edgesFocusable}xx.displayName="EdgeRenderer";const eC=de.memo(xx),sy=n=>`translate(${n[0]}px,${n[1]}px) scale(${n[2]})`;function tC(n){let e=we.c(12),{children:l}=n,{viewportStore:o}=ut(),s=de.useRef(null),c;e[0]===o?c=e[1]:(c=()=>o.getState().transform,e[0]=o,e[1]=c);let[d]=de.useState(c),h,g;e[2]===o?(h=e[3],g=e[4]):(h=()=>{let v=null,E=()=>{let w=o.getState().transform;v&&w[0]===v[0]&&w[1]===v[1]&&w[2]===v[2]||(v=w,s.current&&(s.current.style.transform=sy(w)))};return E(),o.subscribe(E)},g=[o],e[2]=o,e[3]=h,e[4]=g),j0(h,g);let m;e[5]===d?m=e[6]:(m=sy(d),e[5]=d,e[6]=m);let p;e[7]===m?p=e[8]:(p={transform:m},e[7]=m,e[8]=p);let y;return e[9]!==l||e[10]!==p?(y=D.jsx("div",{ref:s,className:"react-flow__viewport xyflow__viewport react-flow__container",style:p,children:l}),e[9]=l,e[10]=p,e[11]=y):y=e[11],y}function nC(n){let e=we.c(6),l=Gc(),o=de.useRef(!1),s;e[0]!==n||e[1]!==l?(s=()=>{!o.current&&l.viewportInitialized&&n&&(setTimeout(()=>n(l),1),o.current=!0)},e[0]=n,e[1]=l,e[2]=s):s=e[2];let c;e[3]!==n||e[4]!==l.viewportInitialized?(c=[n,l.viewportInitialized],e[3]=n,e[4]=l.viewportInitialized,e[5]=c):c=e[5],de.useEffect(s,c)}function iC(n){var d;let e=we.c(5),l=(d=Ge(lC))==null?void 0:d.syncViewport,{viewportStore:o}=ut(),s,c;return e[0]!==l||e[1]!==n||e[2]!==o?(s=()=>{n&&(l==null||l(n),o.setState({transform:[n.x,n.y,n.zoom]}))},c=[n,l,o],e[0]=l,e[1]=n,e[2]=o,e[3]=s,e[4]=c):(s=e[3],c=e[4]),de.useEffect(s,c),null}function lC(n){return n.panZoom}function aC(n){let e=we.c(15),{containerStyle:l,style:o,type:s,component:c}=n,d=Ge(sC),h=ai(rC),g=ai(oC),{connection:m}=R0(),{isValid:p,inProgress:y}=m;if(!(h&&d&&y))return null;let v;e[0]===p?v=e[1]:(v=Gt(["react-flow__connection",Nv(p)]),e[0]=p,e[1]=v);let E;e[2]!==c||e[3]!==p||e[4]!==o||e[5]!==s?(E=D.jsx(bx,{style:o,type:s,CustomComponent:c,isValid:p}),e[2]=c,e[3]=p,e[4]=o,e[5]=s,e[6]=E):E=e[6];let w;e[7]!==v||e[8]!==E?(w=D.jsx("g",{className:v,children:E}),e[7]=v,e[8]=E,e[9]=w):w=e[9];let b;return e[10]!==l||e[11]!==g||e[12]!==w||e[13]!==h?(b=D.jsx("svg",{style:l,width:h,height:g,className:"react-flow__connectionline react-flow__container",children:w}),e[10]=l,e[11]=g,e[12]=w,e[13]=h,e[14]=b):b=e[14],b}function oC(n){return n.height}function rC(n){return n.width}function sC(n){return n.nodesConnectable}const bx=n=>{let e=we.c(29),{style:l,type:o,CustomComponent:s,isValid:c}=n,d=o===void 0?Qo.Bezier:o,{inProgress:h,from:g,fromNode:m,fromHandle:p,fromPosition:y,to:v,toNode:E,toHandle:w,toPosition:b,pointer:_}=PN();if(!h)return;if(s){let M=g.x,S=g.y,T=v.x,L=v.y,R;e[0]===c?R=e[1]:(R=Nv(c),e[0]=c,e[1]=R);let H;return e[2]!==s||e[3]!==g.x||e[4]!==g.y||e[5]!==p||e[6]!==m||e[7]!==y||e[8]!==_||e[9]!==l||e[10]!==R||e[11]!==v.x||e[12]!==v.y||e[13]!==w||e[14]!==E||e[15]!==b||e[16]!==d?(H=D.jsx(s,{connectionLineType:d,connectionLineStyle:l,fromNode:m,fromHandle:p,fromX:M,fromY:S,toX:T,toY:L,fromPosition:y,toPosition:b,connectionStatus:R,toNode:E,toHandle:w,pointer:_}),e[2]=s,e[3]=g.x,e[4]=g.y,e[5]=p,e[6]=m,e[7]=y,e[8]=_,e[9]=l,e[10]=R,e[11]=v.x,e[12]=v.y,e[13]=w,e[14]=E,e[15]=b,e[16]=d,e[17]=H):H=e[17],H}let N;if(e[18]!==g.x||e[19]!==g.y||e[20]!==y||e[21]!==v.x||e[22]!==v.y||e[23]!==b||e[24]!==d){let M={sourceX:g.x,sourceY:g.y,sourcePosition:y,targetX:v.x,targetY:v.y,targetPosition:b};e:switch(d){case Qo.Bezier:[N]=Av(M);break e;case Qo.SimpleBezier:[N]=hx(M);break e;case Qo.Step:[N]=Jh({...M,borderRadius:0});break e;case Qo.SmoothStep:[N]=Jh(M);break e;default:[N]=zv(M)}e[18]=g.x,e[19]=g.y,e[20]=y,e[21]=v.x,e[22]=v.y,e[23]=b,e[24]=d,e[25]=N}else N=e[25];let C;return e[26]!==N||e[27]!==l?(C=D.jsx("path",{d:N,fill:"none",className:"react-flow__connection-path",style:l}),e[26]=N,e[27]=l,e[28]=C):C=e[28],C};bx.displayName="ConnectionLine";const uC={};function uy(n){let e=we.c(5),l=n===void 0?uC:n;de.useRef(l);let{optionsStore:o}=ut(),s;e[0]!==l||e[1]!==o?(s=()=>{},e[0]=l,e[1]=o,e[2]=s):s=e[2];let c;e[3]===l?c=e[4]:(c=[l],e[3]=l,e[4]=c),de.useEffect(s,c)}function cC(){let n=we.c(3),{optionsStore:e}=ut();de.useRef(!1);let l;n[0]===e?l=n[1]:(l=()=>{},n[0]=e,n[1]=l);let o;n[2]===Symbol.for("react.memo_cache_sentinel")?(o=[],n[2]=o):o=n[2],de.useEffect(l,o)}function Sx(n){let e=we.c(82),{nodeTypes:l,edgeTypes:o,onInit:s,onNodeClick:c,onEdgeClick:d,onNodeDoubleClick:h,onEdgeDoubleClick:g,onNodeMouseEnter:m,onNodeMouseMove:p,onNodeMouseLeave:y,onNodeContextMenu:v,onSelectionContextMenu:E,onSelectionStart:w,onSelectionEnd:b,connectionLineType:_,connectionLineStyle:N,connectionLineComponent:C,connectionLineContainerStyle:M,selectionKeyCode:S,selectionOnDrag:T,selectionMode:L,multiSelectionKeyCode:R,panActivationKeyCode:H,zoomActivationKeyCode:z,deleteKeyCode:Y,onlyRenderVisibleElements:Z,elementsSelectable:I,defaultViewport:G,translateExtent:j,minZoom:X,maxZoom:B,preventScrolling:k,defaultMarkerColor:U,zoomOnScroll:Q,zoomOnPinch:P,panOnScroll:re,panOnScrollSpeed:fe,panOnScrollMode:oe,zoomOnDoubleClick:O,panOnDrag:V,autoPanOnSelection:F,onPaneClick:K,onPaneMouseEnter:J,onPaneMouseMove:ee,onPaneMouseLeave:ie,onPaneScroll:le,onPaneContextMenu:ce,paneDragThreshold:me,onEdgeContextMenu:ve,onEdgeMouseEnter:Se,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:pe,onReconnect:Ee,onReconnectStart:Me,onReconnectEnd:je,noDragClassName:He,noWheelClassName:Ue,noPanClassName:Le,disableKeyboardA11y:qe,nodeExtent:at,rfId:$e,viewport:ct,onViewportChange:Ve,nodesDraggable:Ie}=n;uy(l),uy(o),cC(),nC(s),iC(ct);let Je=!!ct,gt;e[0]!==U||e[1]!==qe||e[2]!==o||e[3]!==Le||e[4]!==d||e[5]!==ve||e[6]!==g||e[7]!==Se||e[8]!==xe||e[9]!==be||e[10]!==Ee||e[11]!==je||e[12]!==Me||e[13]!==Z||e[14]!==pe||e[15]!==$e?(gt=D.jsx(eC,{edgeTypes:o,onEdgeClick:d,onEdgeDoubleClick:g,onReconnect:Ee,onReconnectStart:Me,onReconnectEnd:je,onlyRenderVisibleElements:Z,onEdgeContextMenu:ve,onEdgeMouseEnter:Se,onEdgeMouseMove:be,onEdgeMouseLeave:xe,reconnectRadius:pe,defaultMarkerColor:U,noPanClassName:Le,disableKeyboardA11y:qe,rfId:$e}),e[0]=U,e[1]=qe,e[2]=o,e[3]=Le,e[4]=d,e[5]=ve,e[6]=g,e[7]=Se,e[8]=xe,e[9]=be,e[10]=Ee,e[11]=je,e[12]=Me,e[13]=Z,e[14]=pe,e[15]=$e,e[16]=gt):gt=e[16];let et;e[17]!==C||e[18]!==M||e[19]!==N||e[20]!==_?(et=D.jsx(aC,{style:N,type:_,component:C,containerStyle:M}),e[17]=C,e[18]=M,e[19]=N,e[20]=_,e[21]=et):et=e[21];let rt;e[22]===Symbol.for("react.memo_cache_sentinel")?(rt=D.jsx("div",{className:"react-flow__edgelabel-renderer"}),e[22]=rt):rt=e[22];let ft;e[23]!==qe||e[24]!==He||e[25]!==Le||e[26]!==at||e[27]!==l||e[28]!==Ie||e[29]!==c||e[30]!==v||e[31]!==h||e[32]!==m||e[33]!==y||e[34]!==p||e[35]!==Z||e[36]!==$e?(ft=D.jsx(N6,{nodeTypes:l,onNodeClick:c,onNodeDoubleClick:h,onNodeMouseEnter:m,onNodeMouseMove:p,onNodeMouseLeave:y,onNodeContextMenu:v,onlyRenderVisibleElements:Z,noPanClassName:Le,noDragClassName:He,disableKeyboardA11y:qe,nodeExtent:at,rfId:$e,nodesDraggable:Ie}),e[23]=qe,e[24]=He,e[25]=Le,e[26]=at,e[27]=l,e[28]=Ie,e[29]=c,e[30]=v,e[31]=h,e[32]=m,e[33]=y,e[34]=p,e[35]=Z,e[36]=$e,e[37]=ft):ft=e[37];let pt;e[38]===Symbol.for("react.memo_cache_sentinel")?(pt=D.jsx("div",{className:"react-flow__viewport-portal"}),e[38]=pt):pt=e[38];let yt;e[39]!==gt||e[40]!==et||e[41]!==ft?(yt=D.jsxs(tC,{children:[gt,et,rt,ft,pt]}),e[39]=gt,e[40]=et,e[41]=ft,e[42]=yt):yt=e[42];let mt;return e[43]!==F||e[44]!==G||e[45]!==Y||e[46]!==qe||e[47]!==I||e[48]!==B||e[49]!==X||e[50]!==R||e[51]!==He||e[52]!==Le||e[53]!==Ue||e[54]!==K||e[55]!==ce||e[56]!==J||e[57]!==ie||e[58]!==ee||e[59]!==le||e[60]!==E||e[61]!==b||e[62]!==w||e[63]!==Ve||e[64]!==H||e[65]!==V||e[66]!==re||e[67]!==oe||e[68]!==fe||e[69]!==me||e[70]!==k||e[71]!==S||e[72]!==L||e[73]!==T||e[74]!==Je||e[75]!==yt||e[76]!==j||e[77]!==z||e[78]!==O||e[79]!==P||e[80]!==Q?(mt=D.jsx(g6,{onPaneClick:K,onPaneMouseEnter:J,onPaneMouseMove:ee,onPaneMouseLeave:ie,onPaneContextMenu:ce,onPaneScroll:le,paneDragThreshold:me,deleteKeyCode:Y,selectionKeyCode:S,selectionOnDrag:T,selectionMode:L,onSelectionStart:w,onSelectionEnd:b,multiSelectionKeyCode:R,panActivationKeyCode:H,zoomActivationKeyCode:z,elementsSelectable:I,zoomOnScroll:Q,zoomOnPinch:P,zoomOnDoubleClick:O,panOnScroll:re,panOnScrollSpeed:fe,panOnScrollMode:oe,panOnDrag:V,autoPanOnSelection:F,defaultViewport:G,translateExtent:j,minZoom:X,maxZoom:B,onSelectionContextMenu:E,preventScrolling:k,noDragClassName:He,noWheelClassName:Ue,noPanClassName:Le,disableKeyboardA11y:qe,onViewportChange:Ve,isControlledViewport:Je,children:yt}),e[43]=F,e[44]=G,e[45]=Y,e[46]=qe,e[47]=I,e[48]=B,e[49]=X,e[50]=R,e[51]=He,e[52]=Le,e[53]=Ue,e[54]=K,e[55]=ce,e[56]=J,e[57]=ie,e[58]=ee,e[59]=le,e[60]=E,e[61]=b,e[62]=w,e[63]=Ve,e[64]=H,e[65]=V,e[66]=re,e[67]=oe,e[68]=fe,e[69]=me,e[70]=k,e[71]=S,e[72]=L,e[73]=T,e[74]=Je,e[75]=yt,e[76]=j,e[77]=z,e[78]=O,e[79]=P,e[80]=Q,e[81]=mt):mt=e[81],mt}Sx.displayName="GraphView";const fC=de.memo(Sx);function Cs(n){"@babel/helpers - typeof";return Cs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cs(n)}function dC(n,e){if(Cs(n)!="object"||!n)return n;var l;if(typeof Symbol<"u"&&(l=n[Symbol.toPrimitive])!==void 0){var o=l.call(n,e);if(Cs(o)!="object")return o;throw TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}function hC(n){var e=dC(n,"string");return Cs(e)=="symbol"?e:e+""}function Rh(n,e,l){return(e=hC(e))in n?Object.defineProperty(n,e,{value:l,enumerable:!0,configurable:!0,writable:!0}):n[e]=l,n}function Zo(n){return n?`${n.nodeId}-${n.id}-${n.type}`:""}function gC(n,e){return n===e||n&&e&&n.nodeId===e.nodeId&&n.id===e.id&&n.type===e.type}var mC=class{constructor(){Rh(this,"nodeListeners",new Map),Rh(this,"edgeListeners",new Map),Rh(this,"handleListeners",new Map)}subscribeToNode(n,e){return this.subscribe(this.nodeListeners,n,e)}subscribeToNodes(n,e){let l=Array.from(new Set(n),o=>this.subscribeToNode(o,e));return()=>l.forEach(o=>o())}publishNodes(n){this.notify(this.nodeListeners,n)}subscribeToEdge(n,e){return this.subscribe(this.edgeListeners,n,e)}subscribeToEdges(n,e){let l=Array.from(new Set(n),o=>this.subscribeToEdge(o,e));return()=>l.forEach(o=>o())}publishEdges(n){this.notify(this.edgeListeners,n)}subscribeToConnectionForHandle(n,e){return this.subscribe(this.handleListeners,Zo(n),e)}publishConnectionClickStart(){this.notifyAll(this.handleListeners)}publishConnection(n,e){let l=new Set;gC(n.fromHandle,e.fromHandle)?(l.add(Zo(n.fromHandle)),l.add(Zo(n.toHandle)),l.add(Zo(e.fromHandle)),l.add(Zo(e.toHandle)),l.delete(Zo(null)),this.notify(this.handleListeners,l)):this.notifyAll(this.handleListeners)}reset(){this.notifyAll(this.nodeListeners),this.notifyAll(this.edgeListeners),this.notifyAll(this.handleListeners)}subscribe(n,e,l){let o=n.get(e);return o||(o=new Set,n.set(e,o)),o.add(l),()=>{o.delete(l),o.size===0&&n.delete(e)}}notify(n,e){for(let l of e){let o=n.get(l);if(o)for(let s of o)s()}}notifyAll(n){for(let e of n.values())for(let l of e)l()}};const pC=wv(),cy=({nodes:n,edges:e,defaultNodes:l,defaultEdges:o,width:s,height:c,fitView:d,fitViewOptions:h,minZoom:g=.5,maxZoom:m=2,nodeOrigin:p,nodeExtent:y,zIndexMode:v="basic"}={})=>{let E=new Map,w=new Map,b=new Map,_=new Map,N=o??e??[],C=l??n??[],M=p??[0,0],S=y??ir;kv(b,_,N);let{nodesInitialized:T}=Ph(C,E,w,{nodeOrigin:M,nodeExtent:S,zIndexMode:v}),L=[0,0,1];if(d&&s&&c){let R=Os(E,{filter:Z=>!(!Z.width&&!Z.initialWidth||!Z.height&&!Z.initialHeight)}),{x:H,y:z,zoom:Y}=C0(R,s,c,g,m,(h==null?void 0:h.padding)??gv);L=[H,z,Y]}return{optionsStore:{rfId:"1",onNodesChange:null,onEdgesChange:null,hasDefaultNodes:l!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:g,maxZoom:m,translateExtent:ir,nodeExtent:S,nodesSelectionActive:!1,userSelectionActive:!1,connectionMode:yv.Strict,domNode:null,noPanClassName:"nopan",nodeOrigin:M,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:d??!1,fitViewOptions:h,fitViewResolver:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:pC,isValidConnection:void 0,onSelectionChangeHandlers:[],debug:!1,ariaLabelConfig:pv,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map,pubSub:new mC,defaultEdgeOptions:void 0,onNodesDelete:void 0,onEdgesDelete:void 0,onDelete:void 0,onBeforeDelete:void 0,onViewportChangeStart:void 0,onViewportChange:void 0,onViewportChangeEnd:void 0,onNodeDragStart:void 0,onNodeDrag:void 0,onNodeDragStop:void 0,onSelectionDragStart:void 0,onSelectionDrag:void 0,onSelectionDragStop:void 0,onMoveStart:void 0,onMove:void 0,onMoveEnd:void 0,onConnect:void 0,onConnectStart:void 0,onConnectEnd:void 0,onClickConnectStart:void 0,onClickConnectEnd:void 0},viewportStore:{paneDragging:!1,width:s??0,height:c??0,transform:L},connectionStore:{connection:{...cc},connectionClickStartHandle:null},nodesStore:{nodes:C,nodesInitialized:T,nodeLookup:E,parentLookup:w},edgesStore:{edges:N,edgeLookup:_,connectionLookup:b},selectionStore:{userSelectionRect:null}}},yC=n=>{let e=cy(n),l=Va(()=>e.viewportStore),o=Va(()=>e.connectionStore),s=Va(()=>e.nodesStore),c=Va(()=>e.edgesStore),d=Va(()=>e.selectionStore),h=cc;function g(y){return h.inProgress?{...h,to:ar(h.to,y)}:h}function m(y){let{connection:v}=o.getState();h=y;let E=g(l.getState().transform);o.setState({connection:E}),p.getState().pubSub.publishConnection(v,E)}l.subscribe(({transform:y},v)=>{y!==v.transform&&h.inProgress&&o.setState({connection:g(y)})});let p=Va((y,v)=>{let E=0;async function w(){let{nodeLookup:b}=s.getState(),{panZoom:_,fitViewOptions:N,fitViewResolver:C,minZoom:M,maxZoom:S}=v(),{width:T,height:L}=l.getState();if(!_)return;let R=++E,H=await H5({nodes:b,width:T,height:L,panZoom:_,minZoom:M,maxZoom:S},N);R===E&&(C==null||C.resolve(H),v().fitViewResolver===C&&y({fitViewResolver:null}))}return{...e.optionsStore,setNodes:b=>{let{nodeLookup:_,parentLookup:N}=s.getState(),{nodeOrigin:C,nodeExtent:M,elevateNodesOnSelect:S,fitViewQueued:T,zIndexMode:L,nodesSelectionActive:R,pubSub:H}=v(),{nodesInitialized:z,hasSelectedNodes:Y,updatedNodes:Z}=Ph(b,_,N,{nodeOrigin:C,nodeExtent:M,elevateNodesOnSelect:S,checkEquality:!0,zIndexMode:L}),I=R&&Y;T&&z?(w(),y({fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:I})):R!==I&&y({nodesSelectionActive:I}),s.setState({nodes:b,nodesInitialized:z}),H.publishNodes(Z)},setEdges:b=>{let{connectionLookup:_,edgeLookup:N}=c.getState(),{updatedEdges:C}=kv(_,N,b);c.setState({edges:b}),v().pubSub.publishEdges(C)},setDefaultNodesAndEdges:(b,_)=>{if(b){let{setNodes:N}=v();N(b),y({hasDefaultNodes:!0})}if(_){let{setEdges:N}=v();N(_),y({hasDefaultEdges:!0})}},updateNodeInternals:b=>{let{emitNodeChanges:_,domNode:N,nodeOrigin:C,nodeExtent:M,fitViewQueued:S,zIndexMode:T,pubSub:L}=v(),{nodeLookup:R,parentLookup:H}=s.getState(),{changes:z,updatedInternals:Y,updatedNodes:Z}=uE(b,R,H,N,C,M,T);Y&&(S&&(w(),y({fitViewQueued:!1,fitViewOptions:void 0})),s.setState({}),L.publishNodes(Z),_(z))},updateNodePositions:(b,_=!1)=>{let N=[],C=[],{nodeLookup:M}=s.getState(),{emitNodeChanges:S,onNodesChangeMiddlewareMap:T}=v();for(let[L,R]of b){let H=M.get(L),z=!!(H!=null&&H.expandParent&&(H!=null&&H.parentId)&&(R!=null&&R.position)),Y={id:L,type:"position",position:z?{x:Math.max(0,R.position.x),y:Math.max(0,R.position.y)}:R.position,dragging:_};if(H&&h.inProgress&&h.fromNode.id===H.id){let Z=Ia(H,h.fromHandle,Xt.Left,!0);m({...h,from:Z})}z&&H.parentId&&N.push({id:L,parentId:H.parentId,rect:{...R.internals.positionAbsolute,width:R.measured.width??0,height:R.measured.height??0}}),C.push(Y)}if(N.length>0){let{parentLookup:L}=s.getState(),{nodeOrigin:R}=v(),H=A0(N,M,L,R);C.push(...H)}for(let L of T.values())C=L(C);S(C)},emitNodeChanges:b=>{if(b.length===0)return;let{debug:_,onNodesChange:N,hasDefaultNodes:C}=v(),M=new Pv(b);if(_&&console.log("React Flow: queue node changes",b),C){let{nodes:S}=s.getState(),{setNodes:T}=v();T(M.applyTo(S))}N==null||N(M)},emitEdgeChanges:b=>{if(b.length===0)return;let{debug:_,hasDefaultEdges:N,onEdgesChange:C}=v(),M=new Wv(b);if(_&&console.log("React Flow: queue edge changes",b),N){let{setEdges:S}=v(),{edges:T}=c.getState();S(M.applyTo(T))}C==null||C(M)},addSelectedNodes:b=>{let{multiSelectionActive:_,emitNodeChanges:N,emitEdgeChanges:C}=v(),{edgeLookup:M}=c.getState(),{nodeLookup:S}=s.getState();_?N(b.map(T=>qa(T,!0))):(N($o(S,new Set([...b]))),C($o(M)))},addSelectedEdges:b=>{let{multiSelectionActive:_,emitNodeChanges:N,emitEdgeChanges:C}=v(),{edgeLookup:M}=c.getState(),{nodeLookup:S}=s.getState();_?C(b.map(T=>qa(T,!0))):(C($o(M,new Set([...b]))),N($o(S,new Set)))},unselectNodesAndEdges:({nodes:b,edges:_}={})=>{let{edges:N}=c.getState(),{nodes:C}=s.getState(),{emitNodeChanges:M,emitEdgeChanges:S}=v(),T=b||C,L=_||N,R=[];for(let z of T)z.selected&&R.push(qa(z.id,!1));let H=[];for(let z of L)z.selected&&H.push(qa(z.id,!1));M(R),S(H)},setMinZoom:b=>{let{panZoom:_,maxZoom:N}=v();_==null||_.setScaleExtent([b,N]),y({minZoom:b})},setMaxZoom:b=>{let{panZoom:_,minZoom:N}=v();_==null||_.setScaleExtent([N,b]),y({maxZoom:b})},setTranslateExtent:b=>{var _;(_=v().panZoom)==null||_.setTranslateExtent(b),y({translateExtent:b})},resetSelectedElements:()=>{let{edges:b}=c.getState(),{nodes:_}=s.getState(),{emitNodeChanges:N,emitEdgeChanges:C,elementsSelectable:M}=v();if(!M)return;let S=_.reduce((L,R)=>R.selected?[...L,qa(R.id,!1)]:L,[]),T=b.reduce((L,R)=>R.selected?[...L,qa(R.id,!1)]:L,[]);N(S),C(T)},setNodeExtent:b=>{let{nodes:_,nodeLookup:N,parentLookup:C}=s.getState(),{nodeOrigin:M,elevateNodesOnSelect:S,nodeExtent:T,zIndexMode:L,pubSub:R}=v();if(b[0][0]===T[0][0]&&b[0][1]===T[0][1]&&b[1][0]===T[1][0]&&b[1][1]===T[1][1])return;let{updatedNodes:H}=Ph(_,N,C,{nodeOrigin:M,nodeExtent:b,elevateNodesOnSelect:S,checkEquality:!1,zIndexMode:L});y({nodeExtent:b}),s.setState({}),R.publishNodes(H)},panBy:b=>{let{transform:_,width:N,height:C}=l.getState(),{panZoom:M,translateExtent:S}=v();return cE({delta:b,panZoom:M,transform:_,translateExtent:S,width:N,height:C})},setCenter:async(b,_,N)=>{let{width:C,height:M}=l.getState(),{maxZoom:S,panZoom:T}=v();if(!T)return!1;let L=(N==null?void 0:N.zoom)===void 0?S:N.zoom;return T.setViewport({x:C/2-b*L,y:M/2-_*L,zoom:L},{duration:N==null?void 0:N.duration,ease:N==null?void 0:N.ease,interpolate:N==null?void 0:N.interpolate})},cancelConnection:()=>m(cc),updateConnection:b=>m(b),updateConnectionClickStart:b=>{o.setState({connectionClickStartHandle:b}),v().pubSub.publishConnectionClickStart()},reset:()=>{let b=cy();l.setState(b.viewportStore),h=cc,o.setState(b.connectionStore),s.setState(b.nodesStore),c.setState(b.edgesStore),d.setState(b.selectionStore);let{pubSub:_}=v();y({...b.optionsStore,pubSub:_}),_.reset()}}});return{optionsStore:p,viewportStore:l,connectionStore:o,nodesStore:s,edgesStore:c,selectionStore:d}};function _x(n){let e=we.c(19),{initialNodes:l,initialEdges:o,defaultNodes:s,defaultEdges:c,initialWidth:d,initialHeight:h,initialMinZoom:g,initialMaxZoom:m,initialFitViewOptions:p,fitView:y,nodeOrigin:v,nodeExtent:E,zIndexMode:w,children:b}=n,_;e[0]!==c||e[1]!==s||e[2]!==o||e[3]!==y||e[4]!==p||e[5]!==h||e[6]!==m||e[7]!==g||e[8]!==E||e[9]!==v||e[10]!==l||e[11]!==d||e[12]!==w?(_=()=>yC({nodes:l,edges:o,defaultNodes:s,defaultEdges:c,width:d,height:h,fitView:y,minZoom:g,maxZoom:m,fitViewOptions:p,nodeOrigin:v,nodeExtent:E,zIndexMode:w}),e[0]=c,e[1]=s,e[2]=o,e[3]=y,e[4]=p,e[5]=h,e[6]=m,e[7]=g,e[8]=E,e[9]=v,e[10]=l,e[11]=d,e[12]=w,e[13]=_):_=e[13];let[N]=de.useState(_),C;e[14]===b?C=e[15]:(C=D.jsx(bN,{children:D.jsx(IN,{children:b})}),e[14]=b,e[15]=C);let M;return e[16]!==N||e[17]!==C?(M=D.jsx(FE,{value:N,children:C}),e[16]=N,e[17]=C,e[18]=M):M=e[18],M}function vC(n){let e=we.c(17),{children:l,nodes:o,edges:s,defaultNodes:c,defaultEdges:d,width:h,height:g,fitView:m,fitViewOptions:p,minZoom:y,maxZoom:v,nodeOrigin:E,nodeExtent:w,zIndexMode:b}=n;if(de.useContext(z0)){let N;return e[0]===l?N=e[1]:(N=D.jsx(D.Fragment,{children:l}),e[0]=l,e[1]=N),N}let _;return e[2]!==l||e[3]!==d||e[4]!==c||e[5]!==s||e[6]!==m||e[7]!==p||e[8]!==g||e[9]!==v||e[10]!==y||e[11]!==w||e[12]!==E||e[13]!==o||e[14]!==h||e[15]!==b?(_=D.jsx(_x,{initialNodes:o,initialEdges:s,defaultNodes:c,defaultEdges:d,initialWidth:h,initialHeight:g,fitView:m,initialFitViewOptions:p,initialMinZoom:y,initialMaxZoom:v,nodeOrigin:E,nodeExtent:w,zIndexMode:b,children:l}),e[2]=l,e[3]=d,e[4]=c,e[5]=s,e[6]=m,e[7]=p,e[8]=g,e[9]=v,e[10]=y,e[11]=w,e[12]=E,e[13]=o,e[14]=h,e[15]=b,e[16]=_):_=e[16],_}const xC={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function bC(n,e){let l=we.c(294),o,s,c,d,h,g,m,p,y,v,E,w,b,_,N,C,M,S,T,L,R,H,z,Y,Z,I,G,j,X,B,k,U,Q,P,re,fe,oe,O,V,F,K,J,ee,ie,le,ce,me,ve,Se,be,xe,pe,Ee,Me,je,He,Ue,Le,qe,at,$e,ct,Ve,Ie,Je,gt,et,rt,ft,pt,yt,mt,Xe,Mt,ye,Re,Ae,Fe,Oe,tt,Ke,vt,Ze,dt,ht,bt,Qt,rn,sn,zn,Rn,gn,Dn,En,oi,da,bl,Fi,ri,ha,Sl,_l,wl,Pi,Wi,El,Nl,mn,Rt,Lt,Zn,Cl,ga,ma,Ml,si,Ni,Ci,jn,Qn,ui,Kn,Ot,Tl,Al,el,Nn;l[0]===n?(o=l[1],s=l[2],c=l[3],d=l[4],h=l[5],g=l[6],m=l[7],p=l[8],y=l[9],v=l[10],E=l[11],w=l[12],b=l[13],_=l[14],N=l[15],C=l[16],M=l[17],S=l[18],T=l[19],L=l[20],R=l[21],H=l[22],z=l[23],Y=l[24],Z=l[25],I=l[26],G=l[27],j=l[28],X=l[29],B=l[30],k=l[31],U=l[32],Q=l[33],P=l[34],re=l[35],fe=l[36],oe=l[37],O=l[38],V=l[39],F=l[40],K=l[41],J=l[42],ee=l[43],ie=l[44],le=l[45],ce=l[46],me=l[47],ve=l[48],Se=l[49],be=l[50],xe=l[51],pe=l[52],Ee=l[53],Me=l[54],je=l[55],He=l[56],Ue=l[57],Le=l[58],qe=l[59],at=l[60],$e=l[61],ct=l[62],Ve=l[63],Ie=l[64],Je=l[65],gt=l[66],et=l[67],rt=l[68],ft=l[69],pt=l[70],yt=l[71],mt=l[72],Xe=l[73],Mt=l[74],ye=l[75],Re=l[76],Ae=l[77],Fe=l[78],Oe=l[79],tt=l[80],Ke=l[81],vt=l[82],Ze=l[83],dt=l[84],ht=l[85],bt=l[86],Qt=l[87],rn=l[88],sn=l[89],zn=l[90],Rn=l[91],gn=l[92],Dn=l[93],En=l[94],oi=l[95],da=l[96],bl=l[97],Fi=l[98],ri=l[99],ha=l[100],Sl=l[101],_l=l[102],wl=l[103],Pi=l[104],Wi=l[105],El=l[106],Nl=l[107],mn=l[108],Rt=l[109],Lt=l[110],Zn=l[111],Cl=l[112],ga=l[113],ma=l[114],Ml=l[115],si=l[116],Ni=l[117],Ci=l[118],jn=l[119],Qn=l[120],ui=l[121],Kn=l[122],Ot=l[123],Tl=l[124],Al=l[125],el=l[126],Nn=l[127]):({nodes:Q,edges:R,defaultNodes:T,defaultEdges:S,className:p,nodeTypes:U,edgeTypes:L,onNodeClick:Ue,onEdgeClick:ie,onInit:Ee,onMove:Me,onMoveStart:He,onMoveEnd:je,onConnect:F,onConnectStart:J,onConnectEnd:K,onClickConnectStart:V,onClickConnectEnd:O,onNodeMouseEnter:Ve,onNodeMouseMove:Je,onNodeMouseLeave:Ie,onNodeContextMenu:Le,onNodeDoubleClick:qe,onNodeDragStart:$e,onNodeDrag:at,onNodeDragStop:ct,onNodesDelete:et,onEdgesDelete:xe,onDelete:ee,onSelectionChange:Fe,onSelectionDragStart:Ke,onSelectionDrag:tt,onSelectionDragStop:vt,onSelectionContextMenu:Oe,onSelectionStart:dt,onSelectionEnd:Ze,onBeforeDelete:oe,connectionMode:_,connectionLineType:gn,connectionLineStyle:b,connectionLineComponent:E,connectionLineContainerStyle:w,deleteKeyCode:wl,selectionKeyCode:ma,selectionOnDrag:Qn,selectionMode:ui,panActivationKeyCode:Kn,multiSelectionKeyCode:Ot,zoomActivationKeyCode:Tl,snapToGrid:zn,snapGrid:sn,onlyRenderVisibleElements:Al,selectNodesOnDrag:rn,nodesDraggable:re,autoPanOnNodeFocus:h,nodesConnectable:P,nodesFocusable:fe,nodeOrigin:Dn,edgesFocusable:H,edgesReconnectable:z,elementsSelectable:En,defaultViewport:oi,minZoom:da,maxZoom:bl,translateExtent:Fi,preventScrolling:ri,nodeExtent:k,defaultMarkerColor:ha,zoomOnScroll:Sl,zoomOnPinch:_l,panOnScroll:Pi,panOnScrollSpeed:Wi,panOnScrollMode:El,zoomOnDoubleClick:Nl,panOnDrag:mn,onPaneClick:rt,onPaneMouseEnter:pt,onPaneMouseMove:mt,onPaneMouseLeave:yt,onPaneScroll:Xe,onPaneContextMenu:ft,paneDragThreshold:Rt,children:m,onReconnect:Mt,onReconnectStart:Re,onReconnectEnd:ye,onEdgeContextMenu:le,onEdgeDoubleClick:ce,onEdgeMouseEnter:me,onEdgeMouseMove:Se,onEdgeMouseLeave:ve,reconnectRadius:Lt,onNodesChange:gt,onEdgesChange:be,noDragClassName:Zn,noWheelClassName:Cl,noPanClassName:ga,fitView:Y,fitViewOptions:Z,connectOnClick:y,attributionPosition:s,proOptions:bt,defaultEdgeOptions:M,elevateNodesOnSelect:Ml,elevateEdgesOnSelect:si,disableKeyboardA11y:Ni,autoPanOnConnect:c,autoPanOnNodeDrag:d,autoPanOnSelection:Ci,autoPanSpeed:g,connectionRadius:N,isValidConnection:X,onError:pe,style:Rn,id:j,nodeDragThreshold:B,connectionDragThreshold:v,viewport:el,onViewportChange:ht,width:Nn,height:G,forceColorMode:I,debug:C,onScroll:Ae,ariaLabelConfig:o,zIndexMode:jn,...Qt}=n,l[0]=n,l[1]=o,l[2]=s,l[3]=c,l[4]=d,l[5]=h,l[6]=g,l[7]=m,l[8]=p,l[9]=y,l[10]=v,l[11]=E,l[12]=w,l[13]=b,l[14]=_,l[15]=N,l[16]=C,l[17]=M,l[18]=S,l[19]=T,l[20]=L,l[21]=R,l[22]=H,l[23]=z,l[24]=Y,l[25]=Z,l[26]=I,l[27]=G,l[28]=j,l[29]=X,l[30]=B,l[31]=k,l[32]=U,l[33]=Q,l[34]=P,l[35]=re,l[36]=fe,l[37]=oe,l[38]=O,l[39]=V,l[40]=F,l[41]=K,l[42]=J,l[43]=ee,l[44]=ie,l[45]=le,l[46]=ce,l[47]=me,l[48]=ve,l[49]=Se,l[50]=be,l[51]=xe,l[52]=pe,l[53]=Ee,l[54]=Me,l[55]=je,l[56]=He,l[57]=Ue,l[58]=Le,l[59]=qe,l[60]=at,l[61]=$e,l[62]=ct,l[63]=Ve,l[64]=Ie,l[65]=Je,l[66]=gt,l[67]=et,l[68]=rt,l[69]=ft,l[70]=pt,l[71]=yt,l[72]=mt,l[73]=Xe,l[74]=Mt,l[75]=ye,l[76]=Re,l[77]=Ae,l[78]=Fe,l[79]=Oe,l[80]=tt,l[81]=Ke,l[82]=vt,l[83]=Ze,l[84]=dt,l[85]=ht,l[86]=bt,l[87]=Qt,l[88]=rn,l[89]=sn,l[90]=zn,l[91]=Rn,l[92]=gn,l[93]=Dn,l[94]=En,l[95]=oi,l[96]=da,l[97]=bl,l[98]=Fi,l[99]=ri,l[100]=ha,l[101]=Sl,l[102]=_l,l[103]=wl,l[104]=Pi,l[105]=Wi,l[106]=El,l[107]=Nl,l[108]=mn,l[109]=Rt,l[110]=Lt,l[111]=Zn,l[112]=Cl,l[113]=ga,l[114]=ma,l[115]=Ml,l[116]=si,l[117]=Ni,l[118]=Ci,l[119]=jn,l[120]=Qn,l[121]=ui,l[122]=Kn,l[123]=Ot,l[124]=Tl,l[125]=Al,l[126]=el,l[127]=Nn);let Mi=gn===void 0?Qo.Bezier:gn,hr=wl===void 0?"Backspace":wl,Pa=ma===void 0?"Shift":ma,Wa=Qn!==void 0&&Qn,gr=ui===void 0?$h.Full:ui,nt=Kn===void 0?"Space":Kn,eo=Ot===void 0?ws()?"Meta":"Control":Ot,Ol=Tl===void 0?ws()?"Meta":"Control":Tl,zl=Al!==void 0&&Al,un=Dn===void 0?nx:Dn,Pt=En===void 0||En,to=oi===void 0?fN:oi,ci=da===void 0?.5:da,Hn=bl===void 0?2:bl,tl=Fi===void 0?ir:Fi,mr=ri===void 0||ri,cn=ha===void 0?"#b1b1b7":ha,pa=Sl===void 0||Sl,no=_l===void 0||_l,ya=Pi!==void 0&&Pi,Ti=Wi===void 0?.5:Wi,io=El===void 0?vv.Free:El,lo=Nl===void 0||Nl,Ai=mn===void 0||mn,pr=Rt===void 0?1:Rt,ao=Lt===void 0?10:Lt,oo=Zn===void 0?"nodrag":Zn,va=Cl===void 0?"nowheel":Cl,Rl=ga===void 0?"nopan":ga,yr=Ml===void 0||Ml,Dl=si===void 0||si,Wt=Ni!==void 0&&Ni,xa=Ci===void 0||Ci,Oi=jn===void 0?"basic":jn,fn=j||"1",fi;l[128]===Ae?fi=l[129]:(fi=vr=>{vr.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ae==null||Ae(vr)},l[128]=Ae,l[129]=fi);let ro=fi,zi;l[130]===Rn?zi=l[131]:(zi={...Rn,...xC},l[130]=Rn,l[131]=zi);let nl;l[132]!==p||l[133]!==I?(nl=Gt(["react-flow",I,p]),l[132]=p,l[133]=I,l[134]=nl):nl=l[134];let $n;l[135]!==o||l[136]!==c||l[137]!==d||l[138]!==h||l[139]!==g||l[140]!==y||l[141]!==v||l[142]!==_||l[143]!==N||l[144]!==C||l[145]!==M||l[146]!==S||l[147]!==T||l[148]!==R||l[149]!==H||l[150]!==z||l[151]!==Pt||l[152]!==Dl||l[153]!==yr||l[154]!==Y||l[155]!==Z||l[156]!==X||l[157]!==Hn||l[158]!==ci||l[159]!==Rl||l[160]!==B||l[161]!==k||l[162]!==un||l[163]!==Q||l[164]!==P||l[165]!==re||l[166]!==fe||l[167]!==oe||l[168]!==O||l[169]!==V||l[170]!==F||l[171]!==K||l[172]!==J||l[173]!==ee||l[174]!==be||l[175]!==xe||l[176]!==pe||l[177]!==Me||l[178]!==je||l[179]!==He||l[180]!==at||l[181]!==$e||l[182]!==ct||l[183]!==gt||l[184]!==et||l[185]!==tt||l[186]!==Ke||l[187]!==vt||l[188]!==fn||l[189]!==rn||l[190]!==sn||l[191]!==zn||l[192]!==tl||l[193]!==Oi?($n=D.jsx(dN,{nodes:Q,edges:R,defaultNodes:T,defaultEdges:S,onConnect:F,onConnectStart:J,onConnectEnd:K,onClickConnectStart:V,onClickConnectEnd:O,nodesDraggable:re,autoPanOnNodeFocus:h,nodesConnectable:P,nodesFocusable:fe,edgesFocusable:H,edgesReconnectable:z,elementsSelectable:Pt,elevateNodesOnSelect:yr,elevateEdgesOnSelect:Dl,minZoom:ci,maxZoom:Hn,nodeExtent:k,onNodesChange:gt,onEdgesChange:be,snapToGrid:zn,snapGrid:sn,connectionMode:_,translateExtent:tl,connectOnClick:y,defaultEdgeOptions:M,fitView:Y,fitViewOptions:Z,onNodesDelete:et,onEdgesDelete:xe,onDelete:ee,onNodeDragStart:$e,onNodeDrag:at,onNodeDragStop:ct,onSelectionDrag:tt,onSelectionDragStart:Ke,onSelectionDragStop:vt,onMove:Me,onMoveStart:He,onMoveEnd:je,noPanClassName:Rl,nodeOrigin:un,rfId:fn,autoPanOnConnect:c,autoPanOnNodeDrag:d,autoPanSpeed:g,onError:pe,connectionRadius:N,isValidConnection:X,selectNodesOnDrag:rn,nodeDragThreshold:B,connectionDragThreshold:v,onBeforeDelete:oe,debug:C,ariaLabelConfig:o,zIndexMode:Oi}),l[135]=o,l[136]=c,l[137]=d,l[138]=h,l[139]=g,l[140]=y,l[141]=v,l[142]=_,l[143]=N,l[144]=C,l[145]=M,l[146]=S,l[147]=T,l[148]=R,l[149]=H,l[150]=z,l[151]=Pt,l[152]=Dl,l[153]=yr,l[154]=Y,l[155]=Z,l[156]=X,l[157]=Hn,l[158]=ci,l[159]=Rl,l[160]=B,l[161]=k,l[162]=un,l[163]=Q,l[164]=P,l[165]=re,l[166]=fe,l[167]=oe,l[168]=O,l[169]=V,l[170]=F,l[171]=K,l[172]=J,l[173]=ee,l[174]=be,l[175]=xe,l[176]=pe,l[177]=Me,l[178]=je,l[179]=He,l[180]=at,l[181]=$e,l[182]=ct,l[183]=gt,l[184]=et,l[185]=tt,l[186]=Ke,l[187]=vt,l[188]=fn,l[189]=rn,l[190]=sn,l[191]=zn,l[192]=tl,l[193]=Oi,l[194]=$n):$n=l[194];let dn;l[195]!==xa||l[196]!==E||l[197]!==w||l[198]!==b||l[199]!==Mi||l[200]!==cn||l[201]!==to||l[202]!==hr||l[203]!==Wt||l[204]!==L||l[205]!==Hn||l[206]!==ci||l[207]!==eo||l[208]!==oo||l[209]!==Rl||l[210]!==va||l[211]!==k||l[212]!==U||l[213]!==re||l[214]!==ie||l[215]!==le||l[216]!==ce||l[217]!==me||l[218]!==ve||l[219]!==Se||l[220]!==Ee||l[221]!==Ue||l[222]!==Le||l[223]!==qe||l[224]!==Ve||l[225]!==Ie||l[226]!==Je||l[227]!==rt||l[228]!==ft||l[229]!==pt||l[230]!==yt||l[231]!==mt||l[232]!==Xe||l[233]!==Mt||l[234]!==ye||l[235]!==Re||l[236]!==Oe||l[237]!==Ze||l[238]!==dt||l[239]!==ht||l[240]!==zl||l[241]!==nt||l[242]!==Ai||l[243]!==ya||l[244]!==io||l[245]!==Ti||l[246]!==pr||l[247]!==mr||l[248]!==ao||l[249]!==fn||l[250]!==Pa||l[251]!==gr||l[252]!==Wa||l[253]!==tl||l[254]!==el||l[255]!==Ol||l[256]!==lo||l[257]!==no||l[258]!==pa?(dn=D.jsx(fC,{onInit:Ee,onNodeClick:Ue,onEdgeClick:ie,onNodeMouseEnter:Ve,onNodeMouseMove:Je,onNodeMouseLeave:Ie,onNodeContextMenu:Le,onNodeDoubleClick:qe,nodeTypes:U,edgeTypes:L,connectionLineType:Mi,connectionLineStyle:b,connectionLineComponent:E,connectionLineContainerStyle:w,selectionKeyCode:Pa,selectionOnDrag:Wa,selectionMode:gr,deleteKeyCode:hr,multiSelectionKeyCode:eo,panActivationKeyCode:nt,zoomActivationKeyCode:Ol,onlyRenderVisibleElements:zl,defaultViewport:to,translateExtent:tl,minZoom:ci,maxZoom:Hn,preventScrolling:mr,zoomOnScroll:pa,zoomOnPinch:no,zoomOnDoubleClick:lo,panOnScroll:ya,panOnScrollSpeed:Ti,panOnScrollMode:io,panOnDrag:Ai,autoPanOnSelection:xa,onPaneClick:rt,onPaneMouseEnter:pt,onPaneMouseMove:mt,onPaneMouseLeave:yt,onPaneScroll:Xe,onPaneContextMenu:ft,paneDragThreshold:pr,onSelectionContextMenu:Oe,onSelectionStart:dt,onSelectionEnd:Ze,onReconnect:Mt,onReconnectStart:Re,onReconnectEnd:ye,onEdgeContextMenu:le,onEdgeDoubleClick:ce,onEdgeMouseEnter:me,onEdgeMouseMove:Se,onEdgeMouseLeave:ve,reconnectRadius:ao,defaultMarkerColor:cn,noDragClassName:oo,noWheelClassName:va,noPanClassName:Rl,rfId:fn,disableKeyboardA11y:Wt,nodeExtent:k,viewport:el,onViewportChange:ht,nodesDraggable:re}),l[195]=xa,l[196]=E,l[197]=w,l[198]=b,l[199]=Mi,l[200]=cn,l[201]=to,l[202]=hr,l[203]=Wt,l[204]=L,l[205]=Hn,l[206]=ci,l[207]=eo,l[208]=oo,l[209]=Rl,l[210]=va,l[211]=k,l[212]=U,l[213]=re,l[214]=ie,l[215]=le,l[216]=ce,l[217]=me,l[218]=ve,l[219]=Se,l[220]=Ee,l[221]=Ue,l[222]=Le,l[223]=qe,l[224]=Ve,l[225]=Ie,l[226]=Je,l[227]=rt,l[228]=ft,l[229]=pt,l[230]=yt,l[231]=mt,l[232]=Xe,l[233]=Mt,l[234]=ye,l[235]=Re,l[236]=Oe,l[237]=Ze,l[238]=dt,l[239]=ht,l[240]=zl,l[241]=nt,l[242]=Ai,l[243]=ya,l[244]=io,l[245]=Ti,l[246]=pr,l[247]=mr,l[248]=ao,l[249]=fn,l[250]=Pa,l[251]=gr,l[252]=Wa,l[253]=tl,l[254]=el,l[255]=Ol,l[256]=lo,l[257]=no,l[258]=pa,l[259]=dn):dn=l[259];let Ri;l[260]===Fe?Ri=l[261]:(Ri=D.jsx(cN,{onSelectionChange:Fe}),l[260]=Fe,l[261]=Ri);let In;l[262]!==s||l[263]!==bt?(In=D.jsx(oN,{proOptions:bt,position:s}),l[262]=s,l[263]=bt,l[264]=In):In=l[264];let pn;l[265]!==Wt||l[266]!==fn?(pn=D.jsx(lN,{rfId:fn,disableKeyboardA11y:Wt}),l[265]=Wt,l[266]=fn,l[267]=pn):pn=l[267];let Di;l[268]!==m||l[269]!==R||l[270]!==Y||l[271]!==Z||l[272]!==G||l[273]!==Hn||l[274]!==ci||l[275]!==k||l[276]!==un||l[277]!==Q||l[278]!==$n||l[279]!==dn||l[280]!==Ri||l[281]!==In||l[282]!==pn||l[283]!==Nn||l[284]!==Oi?(Di=D.jsxs(vC,{nodes:Q,edges:R,width:Nn,height:G,fitView:Y,fitViewOptions:Z,minZoom:ci,maxZoom:Hn,nodeOrigin:un,nodeExtent:k,zIndexMode:Oi,children:[$n,dn,Ri,m,In,pn]}),l[268]=m,l[269]=R,l[270]=Y,l[271]=Z,l[272]=G,l[273]=Hn,l[274]=ci,l[275]=k,l[276]=un,l[277]=Q,l[278]=$n,l[279]=dn,l[280]=Ri,l[281]=In,l[282]=pn,l[283]=Nn,l[284]=Oi,l[285]=Di):Di=l[285];let il;return l[286]!==j||l[287]!==e||l[288]!==Qt||l[289]!==zi||l[290]!==nl||l[291]!==Di||l[292]!==ro?(il=D.jsx("div",{"data-testid":"rf__wrapper",...Qt,onScroll:ro,style:zi,ref:e,className:nl,id:j,role:"application",children:Di}),l[286]=j,l[287]=e,l[288]=Qt,l[289]=zi,l[290]=nl,l[291]=Di,l[292]=ro,l[293]=il):il=l[293],il}var SC=ix(bC);function _C(n){let e=we.c(7),{dimensions:l,lineWidth:o,variant:s,className:c}=n,d=`M${l[0]/2} 0 V${l[1]} M0 ${l[1]/2} H${l[0]}`,h;e[0]!==c||e[1]!==s?(h=Gt(["react-flow__background-pattern",s,c]),e[0]=c,e[1]=s,e[2]=h):h=e[2];let g;return e[3]!==o||e[4]!==d||e[5]!==h?(g=D.jsx("path",{strokeWidth:o,d,className:h}),e[3]=o,e[4]=d,e[5]=h,e[6]=g):g=e[6],g}function wC(n){let e=we.c(5),{radius:l,className:o}=n,s;e[0]===o?s=e[1]:(s=Gt(["react-flow__background-pattern","dots",o]),e[0]=o,e[1]=s);let c;return e[2]!==l||e[3]!==s?(c=D.jsx("circle",{cx:l,cy:l,r:l,className:s}),e[2]=l,e[3]=s,e[4]=c):c=e[4],c}const EC={dots:1,lines:1,cross:6};function wx(n){let e=we.c(42),{id:l,variant:o,gap:s,size:c,lineWidth:d,offset:h,color:g,bgColor:m,style:p,className:y,patternClassName:v}=n,E=o===void 0?"dots":o,w=s===void 0?20:s,b=d===void 0?1:d,_=h===void 0?0:h,N=de.useRef(null),C=`pattern-${Ge(CC)}`,M=ai(NC),S=c||EC[E],T=E==="dots",L=E==="cross",R;e[0]===w?R=e[1]:(R=Array.isArray(w)?w:[w,w],e[0]=w,e[1]=R);let H=R,z=H[0]*M[2]||1,Y=H[1]*M[2]||1,Z;e[2]!==z||e[3]!==Y?(Z=[z,Y],e[2]=z,e[3]=Y,e[4]=Z):Z=e[4];let I=Z,G=S*M[2],j;e[5]===_?j=e[6]:(j=Array.isArray(_)?_:[_,_],e[5]=_,e[6]=j);let X=j,B;e[7]!==L||e[8]!==I||e[9]!==G?(B=L?[G,G]:I,e[7]=L,e[8]=I,e[9]=G,e[10]=B):B=e[10];let k=B,U=X[0]*M[2]+k[0]/2,Q=X[1]*M[2]+k[1]/2,P;e[11]!==U||e[12]!==Q?(P=[U,Q],e[11]=U,e[12]=Q,e[13]=P):P=e[13];let re=P,fe=`${C}${l||""}`,oe;e[14]===y?oe=e[15]:(oe=Gt(["react-flow__background",y]),e[14]=y,e[15]=oe);let O;e[16]!==m||e[17]!==g||e[18]!==p?(O={...p,...Zc,"--xy-background-color-props":m,"--xy-background-pattern-color-props":g},e[16]=m,e[17]=g,e[18]=p,e[19]=O):O=e[19];let V=O,F=M[0]%I[0],K=M[1]%I[1],J=`translate(-${re[0]},-${re[1]})`,ee;e[20]!==T||e[21]!==b||e[22]!==v||e[23]!==k||e[24]!==G||e[25]!==E?(ee=T?D.jsx(wC,{radius:G/2,className:v}):D.jsx(_C,{dimensions:k,lineWidth:b,variant:E,className:v}),e[20]=T,e[21]=b,e[22]=v,e[23]=k,e[24]=G,e[25]=E,e[26]=ee):ee=e[26];let ie;e[27]!==fe||e[28]!==I[0]||e[29]!==I[1]||e[30]!==F||e[31]!==K||e[32]!==J||e[33]!==ee?(ie=D.jsx("pattern",{id:fe,x:F,y:K,width:I[0],height:I[1],patternUnits:"userSpaceOnUse",patternTransform:J,children:ee}),e[27]=fe,e[28]=I[0],e[29]=I[1],e[30]=F,e[31]=K,e[32]=J,e[33]=ee,e[34]=ie):ie=e[34];let le=`url(#${fe})`,ce;e[35]===le?ce=e[36]:(ce=D.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:le}),e[35]=le,e[36]=ce);let me;return e[37]!==oe||e[38]!==V||e[39]!==ie||e[40]!==ce?(me=D.jsxs("svg",{className:oe,style:V,ref:N,"data-testid":"rf__background",children:[ie,ce]}),e[37]=oe,e[38]=V,e[39]=ie,e[40]=ce,e[41]=me):me=e[41],me}function NC(n){return n.transform}function CC(n){return n.rfId}wx.displayName="Background";const MC=de.memo(wx);function TC(){let n=we.c(1),e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:D.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})}),n[0]=e):e=n[0],e}function AC(){let n=we.c(1),e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:D.jsx("path",{d:"M0 0h32v4.2H0z"})}),n[0]=e):e=n[0],e}function OC(){let n=we.c(1),e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:D.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})}),n[0]=e):e=n[0],e}function zC(){let n=we.c(1),e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:D.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})}),n[0]=e):e=n[0],e}function RC(){let n=we.c(1),e;return n[0]===Symbol.for("react.memo_cache_sentinel")?(e=D.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:D.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})}),n[0]=e):e=n[0],e}function tc(n){let e=we.c(10),l,o,s;e[0]===n?(l=e[1],o=e[2],s=e[3]):({children:l,className:o,...s}=n,e[0]=n,e[1]=l,e[2]=o,e[3]=s);let c;e[4]===o?c=e[5]:(c=Gt(["react-flow__controls-button",o]),e[4]=o,e[5]=c);let d;return e[6]!==l||e[7]!==s||e[8]!==c?(d=D.jsx("button",{type:"button",className:c,...s,children:l}),e[6]=l,e[7]=s,e[8]=c,e[9]=d):d=e[9],d}function Ex(n){let e=we.c(46),{style:l,showZoom:o,showFitView:s,showInteractive:c,fitViewOptions:d,onZoomIn:h,onZoomOut:g,onFitView:m,onInteractiveChange:p,className:y,children:v,position:E,orientation:w,"aria-label":b}=n,_=o===void 0||o,N=s===void 0||s,C=c===void 0||c,M=E===void 0?"bottom-left":E,S=w===void 0?"vertical":w,{optionsStore:T}=ut(),L=Ge(UC),R=Ge(LC),H=Ge(BC),z=Ge(HC),Y=Ge(jC),Z=Ge(DC),I=L||R||H,G;e[0]===z?G=e[1]:(G=Se=>Se.transform[2]<=z,e[0]=z,e[1]=G);let j=ai(G),X;e[2]===Y?X=e[3]:(X=Se=>Se.transform[2]>=Y,e[2]=Y,e[3]=X);let B=ai(X),{zoomIn:k,zoomOut:U,fitView:Q}=Gc(),P;e[4]!==h||e[5]!==k?(P=()=>{k(),h==null||h()},e[4]=h,e[5]=k,e[6]=P):P=e[6];let re=P,fe;e[7]!==g||e[8]!==U?(fe=()=>{U(),g==null||g()},e[7]=g,e[8]=U,e[9]=fe):fe=e[9];let oe=fe,O;e[10]!==Q||e[11]!==d||e[12]!==m?(O=()=>{Q(d),m==null||m()},e[10]=Q,e[11]=d,e[12]=m,e[13]=O):O=e[13];let V=O,F;e[14]!==I||e[15]!==p||e[16]!==T?(F=()=>{T.setState({nodesDraggable:!I,nodesConnectable:!I,elementsSelectable:!I}),p==null||p(!I)},e[14]=I,e[15]=p,e[16]=T,e[17]=F):F=e[17];let K=F,J=S==="horizontal"?"horizontal":"vertical",ee;e[18]!==y||e[19]!==J?(ee=Gt(["react-flow__controls",J,y]),e[18]=y,e[19]=J,e[20]=ee):ee=e[20];let ie=b??Z["controls.ariaLabel"],le;e[21]!==Z||e[22]!==B||e[23]!==j||e[24]!==re||e[25]!==oe||e[26]!==_?(le=_&&D.jsxs(D.Fragment,{children:[D.jsx(tc,{onClick:re,className:"react-flow__controls-zoomin",title:Z["controls.zoomIn.ariaLabel"],"aria-label":Z["controls.zoomIn.ariaLabel"],disabled:B,children:D.jsx(TC,{})}),D.jsx(tc,{onClick:oe,className:"react-flow__controls-zoomout",title:Z["controls.zoomOut.ariaLabel"],"aria-label":Z["controls.zoomOut.ariaLabel"],disabled:j,children:D.jsx(AC,{})})]}),e[21]=Z,e[22]=B,e[23]=j,e[24]=re,e[25]=oe,e[26]=_,e[27]=le):le=e[27];let ce;e[28]!==Z||e[29]!==V||e[30]!==N?(ce=N&&D.jsx(tc,{className:"react-flow__controls-fitview",onClick:V,title:Z["controls.fitView.ariaLabel"],"aria-label":Z["controls.fitView.ariaLabel"],children:D.jsx(OC,{})}),e[28]=Z,e[29]=V,e[30]=N,e[31]=ce):ce=e[31];let me;e[32]!==Z||e[33]!==I||e[34]!==K||e[35]!==C?(me=C&&D.jsx(tc,{className:"react-flow__controls-interactive",onClick:K,title:Z["controls.interactive.ariaLabel"],"aria-label":Z["controls.interactive.ariaLabel"],children:D.jsx(I?RC:zC,{})}),e[32]=Z,e[33]=I,e[34]=K,e[35]=C,e[36]=me):me=e[36];let ve;return e[37]!==v||e[38]!==M||e[39]!==l||e[40]!==ee||e[41]!==ie||e[42]!==le||e[43]!==ce||e[44]!==me?(ve=D.jsxs(Xc,{className:ee,position:M,style:l,"data-testid":"rf__controls","aria-label":ie,children:[le,ce,me,v]}),e[37]=v,e[38]=M,e[39]=l,e[40]=ee,e[41]=ie,e[42]=le,e[43]=ce,e[44]=me,e[45]=ve):ve=e[45],ve}function DC(n){return n.ariaLabelConfig}function jC(n){return n.maxZoom}function HC(n){return n.minZoom}function BC(n){return n.elementsSelectable}function LC(n){return n.nodesConnectable}function UC(n){return n.nodesDraggable}Ex.displayName="Controls";const kC=de.memo(Ex);function YC(n){let e=we.c(22),{id:l,x:o,y:s,width:c,height:d,style:h,color:g,strokeColor:m,strokeWidth:p,className:y,borderRadius:v,shapeRendering:E,selected:w,onClick:b}=n,_;e[0]===h?_=e[1]:(_=h||{},e[0]=h,e[1]=_);let{background:N,backgroundColor:C}=_,M=g||N||C,S;e[2]!==y||e[3]!==w?(S=Gt(["react-flow__minimap-node",{selected:w},y]),e[2]=y,e[3]=w,e[4]=S):S=e[4];let T;e[5]!==M||e[6]!==m||e[7]!==p?(T={fill:M,stroke:m,strokeWidth:p},e[5]=M,e[6]=m,e[7]=p,e[8]=T):T=e[8];let L;e[9]!==l||e[10]!==b?(L=b?H=>b(H,l):void 0,e[9]=l,e[10]=b,e[11]=L):L=e[11];let R;return e[12]!==v||e[13]!==d||e[14]!==E||e[15]!==S||e[16]!==T||e[17]!==L||e[18]!==c||e[19]!==o||e[20]!==s?(R=D.jsx("rect",{className:S,x:o,y:s,rx:v,ry:v,width:c,height:d,style:T,shapeRendering:E,onClick:L}),e[12]=v,e[13]=d,e[14]=E,e[15]=S,e[16]=T,e[17]=L,e[18]=c,e[19]=o,e[20]=s,e[21]=R):R=e[21],R}const qC=de.memo(YC),VC=n=>n.nodes.map(e=>e.id),Dh=n=>n instanceof Function?n:()=>n;function XC(n){let e=we.c(25),{nodeStrokeColor:l,nodeColor:o,nodeClassName:s,nodeBorderRadius:c,nodeStrokeWidth:d,nodeComponent:h,onClick:g}=n,m=s===void 0?"":s,p=c===void 0?5:c,y=h===void 0?qC:h,v=fr(fa(VC)),E;e[0]===o?E=e[1]:(E=Dh(o),e[0]=o,e[1]=E);let w=E,b;e[2]===l?b=e[3]:(b=Dh(l),e[2]=l,e[3]=b);let _=b,N;e[4]===m?N=e[5]:(N=Dh(m),e[4]=m,e[5]=N);let C=N,M=typeof window>"u"||"chrome"in window&&window.chrome?"crispEdges":"geometricPrecision",S;if(e[6]!==y||e[7]!==p||e[8]!==C||e[9]!==w||e[10]!==v||e[11]!==_||e[12]!==d||e[13]!==g){let L;e[15]!==y||e[16]!==p||e[17]!==C||e[18]!==w||e[19]!==_||e[20]!==d||e[21]!==g?(L=R=>D.jsx(ZC,{id:R,nodeColorFunc:w,nodeStrokeColorFunc:_,nodeClassNameFunc:C,nodeBorderRadius:p,nodeStrokeWidth:d,NodeComponent:y,onClick:g,shapeRendering:M},R),e[15]=y,e[16]=p,e[17]=C,e[18]=w,e[19]=_,e[20]=d,e[21]=g,e[22]=L):L=e[22],S=v.map(L),e[6]=y,e[7]=p,e[8]=C,e[9]=w,e[10]=v,e[11]=_,e[12]=d,e[13]=g,e[14]=S}else S=e[14];let T;return e[23]===S?T=e[24]:(T=D.jsx(D.Fragment,{children:S}),e[23]=S,e[24]=T),T}function GC(n){let e=we.c(27),{id:l,nodeColorFunc:o,nodeStrokeColorFunc:s,nodeClassNameFunc:c,nodeBorderRadius:d,nodeStrokeWidth:h,shapeRendering:g,NodeComponent:m,onClick:p}=n,y=Ac(l);if(!y||y.hidden)return null;let v;e[0]===y?v=e[1]:(v=Ei(y),e[0]=y,e[1]=v);let{width:E,height:w}=v;if(E===0||w===0)return null;let b=y.internals.userNode,{x:_,y:N}=y.internals.positionAbsolute,C=b.style,M=!!b.selected,S;e[2]!==b||e[3]!==c?(S=c(b),e[2]=b,e[3]=c,e[4]=S):S=e[4];let T;e[5]!==b||e[6]!==o?(T=o(b),e[5]=b,e[6]=o,e[7]=T):T=e[7];let L;e[8]!==b||e[9]!==s?(L=s(b),e[8]=b,e[9]=s,e[10]=L):L=e[10];let R;return e[11]!==m||e[12]!==w||e[13]!==b.id||e[14]!==b.style||e[15]!==d||e[16]!==h||e[17]!==p||e[18]!==g||e[19]!==M||e[20]!==S||e[21]!==T||e[22]!==L||e[23]!==E||e[24]!==_||e[25]!==N?(R=D.jsx(m,{x:_,y:N,width:E,height:w,style:C,selected:M,className:S,color:T,borderRadius:d,strokeColor:L,strokeWidth:h,shapeRendering:g,onClick:p,id:b.id}),e[11]=m,e[12]=w,e[13]=b.id,e[14]=b.style,e[15]=d,e[16]=h,e[17]=p,e[18]=g,e[19]=M,e[20]=S,e[21]=T,e[22]=L,e[23]=E,e[24]=_,e[25]=N,e[26]=R):R=e[26],R}const ZC=de.memo(GC);var QC=de.memo(XC);const KC=n=>!n.hidden,$C=({transform:n,width:e,height:l})=>({transform:n,width:e,height:l}),IC=(n,e)=>{let l={x:-e.transform[0]/e.transform[2],y:-e.transform[1]/e.transform[2],width:e.width/e.transform[2],height:e.height/e.transform[2]},o=!1;for(let s of n.nodeLookup.values())if(!s.hidden){o=!0;break}return{viewBB:l,boundingRect:o?Sv(Os(n.nodeLookup,{filter:KC}),l):l,flowWidth:e.width,flowHeight:e.height}},fy=(n,e)=>n.x===e.x&&n.y===e.y&&n.width===e.width&&n.height===e.height,JC=(n,e)=>fy(n.viewBB,e.viewBB)&&fy(n.boundingRect,e.boundingRect)&&n.flowWidth===e.flowWidth&&n.flowHeight===e.flowHeight;function Nx(n){let e=we.c(64),{style:l,className:o,nodeStrokeColor:s,nodeColor:c,nodeClassName:d,nodeBorderRadius:h,nodeStrokeWidth:g,nodeComponent:m,bgColor:p,maskColor:y,maskStrokeColor:v,maskStrokeWidth:E,position:w,onClick:b,onNodeClick:_,pannable:N,zoomable:C,ariaLabel:M,inversePan:S,zoomStep:T,offsetScale:L}=n,R=d===void 0?"":d,H=h===void 0?5:h,z=w===void 0?"bottom-right":w,Y=N!==void 0&&N,Z=C!==void 0&&C,I=T===void 0?1:T,G=L===void 0?5:L,{optionsStore:j,viewportStore:X,nodesStore:B}=ut(),k=de.useRef(null),U=Ge(e8),Q=Ge(WC),P=Ge(PC),re=Ge(FC),fe=ai(fa($C)),oe;e[0]===fe?oe=e[1]:(oe=bt=>IC(bt,fe),e[0]=fe,e[1]=oe);let{viewBB:O,boundingRect:V,flowWidth:F,flowHeight:K}=fr(t0(oe,JC)),J=(l==null?void 0:l.width)??200,ee=(l==null?void 0:l.height)??150,ie=V.width/J,le=V.height/ee,ce=Math.max(ie,le),me=ce*J,ve=ce*ee,Se=G*ce,be=V.x-(me-V.width)/2-Se,xe=V.y-(ve-V.height)/2-Se,pe=me+Se*2,Ee=ve+Se*2,Me=`react-flow__minimap-desc-${U}`,je=de.useRef(),He=de.useRef(ce),Ue,Le;e[2]===ce?(Ue=e[3],Le=e[4]):(Le=()=>{He.current=ce},Ue=[ce],e[2]=ce,e[3]=Ue,e[4]=Le),j0(Le,Ue);let qe;e[5]!==j||e[6]!==X?(qe=()=>{let bt=j.getState().panZoom;if(k.current&&bt)return je.current=bE({domNode:k.current,panZoom:bt,getTransform:()=>X.getState().transform,getViewScale:()=>He.current}),()=>{var Qt;(Qt=je.current)==null||Qt.destroy()}},e[5]=j,e[6]=X,e[7]=qe):qe=e[7];let at;e[8]!==j||e[9]!==Q||e[10]!==X?(at=[Q,j,X],e[8]=j,e[9]=Q,e[10]=X,e[11]=at):at=e[11],de.useEffect(qe,at);let $e,ct;e[12]!==K||e[13]!==F||e[14]!==S||e[15]!==Y||e[16]!==P||e[17]!==I||e[18]!==Z?($e=()=>{var bt;(bt=je.current)==null||bt.update({translateExtent:P,width:F,height:K,inversePan:S,pannable:Y,zoomStep:I,zoomable:Z})},ct=[Y,Z,S,I,P,F,K],e[12]=K,e[13]=F,e[14]=S,e[15]=Y,e[16]=P,e[17]=I,e[18]=Z,e[19]=$e,e[20]=ct):($e=e[19],ct=e[20]),de.useEffect($e,ct);let Ve;e[21]===b?Ve=e[22]:(Ve=b?bt=>{var sn;let[Qt,rn]=((sn=je.current)==null?void 0:sn.pointer(bt))||[0,0];b(bt,{x:Qt,y:rn})}:void 0,e[21]=b,e[22]=Ve);let Ie=Ve,Je;e[23]!==B||e[24]!==_?(Je=(bt,Qt)=>{let rn=B.getState().nodeLookup.get(Qt);rn&&_&&_(bt,rn.internals.userNode)},e[23]=B,e[24]=_,e[25]=Je):Je=e[25];let gt=_?Je:void 0,et=M??re["minimap.ariaLabel"],rt=typeof p=="string"?p:void 0,ft=typeof y=="string"?y:void 0,pt=typeof v=="string"?v:void 0,yt=typeof E=="number"?E*ce:void 0,mt=typeof c=="string"?c:void 0,Xe=typeof s=="string"?s:void 0,Mt=typeof g=="number"?g:void 0,ye;e[26]!==l||e[27]!==rt||e[28]!==ft||e[29]!==pt||e[30]!==yt||e[31]!==mt||e[32]!==Xe||e[33]!==Mt?(ye={...l,"--xy-minimap-background-color-props":rt,"--xy-minimap-mask-background-color-props":ft,"--xy-minimap-mask-stroke-color-props":pt,"--xy-minimap-mask-stroke-width-props":yt,"--xy-minimap-node-background-color-props":mt,"--xy-minimap-node-stroke-color-props":Xe,"--xy-minimap-node-stroke-width-props":Mt},e[26]=l,e[27]=rt,e[28]=ft,e[29]=pt,e[30]=yt,e[31]=mt,e[32]=Xe,e[33]=Mt,e[34]=ye):ye=e[34];let Re=ye,Ae;e[35]===o?Ae=e[36]:(Ae=Gt(["react-flow__minimap",o]),e[35]=o,e[36]=Ae);let Fe=`${be} ${xe} ${pe} ${Ee}`,Oe;e[37]!==et||e[38]!==Me?(Oe=et&&D.jsx("title",{id:Me,children:et}),e[37]=et,e[38]=Me,e[39]=Oe):Oe=e[39];let tt=_?gt:void 0,Ke;e[40]!==H||e[41]!==R||e[42]!==c||e[43]!==m||e[44]!==s||e[45]!==g||e[46]!==tt?(Ke=D.jsx(QC,{onClick:tt,nodeColor:c,nodeStrokeColor:s,nodeBorderRadius:H,nodeClassName:R,nodeStrokeWidth:g,nodeComponent:m}),e[40]=H,e[41]=R,e[42]=c,e[43]=m,e[44]=s,e[45]=g,e[46]=tt,e[47]=Ke):Ke=e[47];let vt=`M${be-Se},${xe-Se}h${pe+Se*2}v${Ee+Se*2}h${-pe-Se*2}z
66
+ M${O.x},${O.y}h${O.width}v${O.height}h${-O.width}z`,Ze;e[48]===vt?Ze=e[49]:(Ze=D.jsx("path",{className:"react-flow__minimap-mask",d:vt,fillRule:"evenodd",pointerEvents:"none"}),e[48]=vt,e[49]=Ze);let dt;e[50]!==ee||e[51]!==J||e[52]!==Me||e[53]!==Ie||e[54]!==Fe||e[55]!==Oe||e[56]!==Ke||e[57]!==Ze?(dt=D.jsxs("svg",{width:J,height:ee,viewBox:Fe,className:"react-flow__minimap-svg",role:"img","aria-labelledby":Me,ref:k,onClick:Ie,children:[Oe,Ke,Ze]}),e[50]=ee,e[51]=J,e[52]=Me,e[53]=Ie,e[54]=Fe,e[55]=Oe,e[56]=Ke,e[57]=Ze,e[58]=dt):dt=e[58];let ht;return e[59]!==z||e[60]!==Re||e[61]!==Ae||e[62]!==dt?(ht=D.jsx(Xc,{position:z,style:Re,className:Ae,"data-testid":"rf__minimap",children:dt}),e[59]=z,e[60]=Re,e[61]=Ae,e[62]=dt,e[63]=ht):ht=e[63],ht}function FC(n){return n.ariaLabelConfig}function PC(n){return n.translateExtent}function WC(n){return n.panZoom}function e8(n){return n.rfId}Nx.displayName="MiniMap";const t8=de.memo(Nx),n8={[Mc.Line]:"right",[Mc.Handle]:"bottom-right"};function i8(n){let e=we.c(37),{nodeId:l,position:o,variant:s,className:c,style:d,children:h,color:g,minWidth:m,minHeight:p,maxWidth:y,maxHeight:v,keepAspectRatio:E,resizeDirection:w,autoScale:b,shouldResize:_,onResizeStart:N,onResize:C,onResizeEnd:M}=n,S=s===void 0?Mc.Handle:s,T=d===void 0?void 0:d,L=m===void 0?10:m,R=p===void 0?10:p,H=y===void 0?Number.MAX_VALUE:y,z=v===void 0?Number.MAX_VALUE:v,Y=E!==void 0&&E,Z=b===void 0||b,I=rx(),G=typeof l=="string"?l:I,{optionsStore:j,viewportStore:X,nodesStore:B}=ut(),k=de.useRef(null),U=S===Mc.Handle,Q;e[0]!==Z||e[1]!==U?(Q=ie=>U&&Z?`${Math.max(1/ie.transform[2],1)}`:void 0,e[0]=Z,e[1]=U,e[2]=Q):Q=e[2];let P=ai(Q),re=de.useRef(null),fe=o??n8[S],oe,O;e[3]!==fe||e[4]!==G||e[5]!==Y||e[6]!==z||e[7]!==H||e[8]!==R||e[9]!==L||e[10]!==B||e[11]!==C||e[12]!==M||e[13]!==N||e[14]!==j||e[15]!==w||e[16]!==_||e[17]!==X?(oe=()=>{if(k.current&&G)return re.current||(re.current=LE({domNode:k.current,nodeId:G,getStoreItems:()=>{let{nodeLookup:ie}=B.getState(),{transform:le}=X.getState(),{snapGrid:ce,snapToGrid:me,nodeOrigin:ve,domNode:Se}=j.getState();return{nodeLookup:ie,transform:le,snapGrid:ce,snapToGrid:me,nodeOrigin:ve,paneDomNode:Se}},onChange:(ie,le)=>{let{emitNodeChanges:ce,nodeOrigin:me}=j.getState(),{nodeLookup:ve,parentLookup:Se}=B.getState(),be=[],xe={x:ie.x,y:ie.y},pe=ve.get(G);if(pe&&pe.expandParent&&pe.parentId){let Ee=pe.origin??me,Me=ie.width??pe.measured.width??0,je=ie.height??pe.measured.height??0,He={id:pe.id,parentId:pe.parentId,rect:{width:Me,height:je,...Ev({x:ie.x??pe.position.x,y:ie.y??pe.position.y},{width:Me,height:je},pe.parentId,ve,Ee)}},Ue=A0([He],ve,Se,me);be.push(...Ue),xe.x=ie.x?Math.max(Ee[0]*Me,ie.x):void 0,xe.y=ie.y?Math.max(Ee[1]*je,ie.y):void 0}if(xe.x!==void 0&&xe.y!==void 0&&be.push(e0(G,xe)),ie.width!==void 0&&ie.height!==void 0){let Ee={id:G,type:"dimensions",resizing:!0,setAttributes:w?w==="horizontal"?"width":"height":!0,dimensions:{width:ie.width,height:ie.height}};be.push(Ee)}for(let Ee of le){let Me={...Ee,type:"position"};be.push(Me)}ce(be)},onEnd:ie=>{let{width:le,height:ce}=ie,me={id:G,type:"dimensions",resizing:!1,dimensions:{width:le,height:ce}};j.getState().emitNodeChanges([me])}})),re.current.update({controlPosition:fe,boundaries:{minWidth:L,minHeight:R,maxWidth:H,maxHeight:z},keepAspectRatio:Y,resizeDirection:w,onResizeStart:N,onResize:C,onResizeEnd:M,shouldResize:_}),()=>{var ie;(ie=re.current)==null||ie.destroy()}},O=[fe,L,R,H,z,Y,N,C,M,_,G,w,j,B,X],e[3]=fe,e[4]=G,e[5]=Y,e[6]=z,e[7]=H,e[8]=R,e[9]=L,e[10]=B,e[11]=C,e[12]=M,e[13]=N,e[14]=j,e[15]=w,e[16]=_,e[17]=X,e[18]=oe,e[19]=O):(oe=e[18],O=e[19]),de.useEffect(oe,O);let V,F;if(e[20]!==c||e[21]!==fe||e[22]!==U||e[23]!==S){let ie=fe.split("-");V=U?"backgroundColor":"borderColor",F=Gt(["react-flow__resize-control","nodrag",...ie,S,c]),e[20]=c,e[21]=fe,e[22]=U,e[23]=S,e[24]=V,e[25]=F}else V=e[24],F=e[25];let K;e[26]!==g||e[27]!==V?(K=g&&{[V]:g},e[26]=g,e[27]=V,e[28]=K):K=e[28];let J;e[29]!==P||e[30]!==T||e[31]!==K?(J={...T,scale:P,...K},e[29]=P,e[30]=T,e[31]=K,e[32]=J):J=e[32];let ee;return e[33]!==h||e[34]!==F||e[35]!==J?(ee=D.jsx("div",{className:F,ref:k,style:J,children:h}),e[33]=h,e[34]=F,e[35]=J,e[36]=ee):ee=e[36],ee}de.memo(i8);/**
67
+ * @license lucide-react v1.75.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const l8=n=>n==null?void 0:n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
72
+ * @license lucide-react v1.75.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */function a8(n,e,l=[]){if(e==null)throw new Error("[lucide]: iconNode is required when icon name is used");return{name:l8(n),size:24,node:e,...l.length>0?{aliases:l}:{}}}/**
77
+ * @license lucide-react v1.75.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const o8=n=>{let e="",l=!1;for(const o of n){if(o==="-"||o==="_"||o<=" "){l=e.length>0;continue}e.length===0?e+=o.toLowerCase():e+=l?o.toUpperCase():o,l=!1}return e};/**
82
+ * @license lucide-react v1.75.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const r8=n=>{const e=o8(n);return e.charAt(0).toUpperCase()+e.slice(1)};/**
87
+ * @license lucide-react v1.75.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const i0=(...n)=>{const e=new Set;for(const l of n)if(typeof l=="string")for(const o of l.split(/\s+/))o&&e.add(o);return[...e].join(" ")};/**
92
+ * @license lucide-react v1.75.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const Ya={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};/**
97
+ * @license lucide-react v1.75.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */function jh(n){return n!=null}function s8(n,e={}){var v,E;const l=e.attributeNames??{},o=w=>l[w]??w,s=n.size??n.width??Ya.width,c=n.size??n.height??Ya.height,d=((v=n.aliases)==null?void 0:v.filter(w=>typeof w=="string"&&w.trim()!=="").map(w=>`lucide-${w}`))??[],h=[...n.name?[`lucide-${n.name}`]:[],...d],g=((E=e.className)==null?void 0:E.split(" ").filter(Boolean))??[],m=e.includeDefaultClasses===!1?i0(...g):i0("lucide",...h,...g),p=e.absoluteStrokeWidth?Number(e.strokeWidth??Ya["stroke-width"])*Number(n.size??n.width??Ya.width)/Number(e.size??e.width??Ya.width):e.strokeWidth??Ya["stroke-width"];return["svg",{...Object.entries(Ya).reduce((w,[b,_])=>(w[o(b)]=_,w),{}),..."color"in e&&e.color&&{[o("stroke")]:e.color},..."size"in e&&jh(e.size)&&{[o("width")]:e.size,[o("height")]:e.size},..."width"in e&&jh(e.width)&&{[o("width")]:e.width},..."height"in e&&jh(e.height)&&{[o("height")]:e.height},[o("stroke-width")]:p,...m&&{[o("class")]:m},[o("viewBox")]:`0 0 ${s} ${c}`,...e.hasA11yProp===!1?{[o("aria-hidden")]:"true"}:{},..."attributes"in e&&e.attributes},n.node.map(w=>{const[b,_,N]=w,C=e.nonScalingStroke?{[o("vector-effect")]:"non-scaling-stroke",..._}:_;return N?[b,C,N]:[b,C]})]}/**
102
+ * @license lucide-react v1.75.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */function u8(n,e={}){return s8(n,{...e,attributeNames:{...e.attributeNames,class:"className","stroke-width":"strokeWidth","stroke-linecap":"strokeLinecap","stroke-linejoin":"strokeLinejoin","vector-effect":"vectorEffect"}})}/**
107
+ * @license lucide-react v1.75.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const c8=n=>{if(n==null||typeof n!="object")return!1;for(const e in n)if(Object.prototype.hasOwnProperty.call(n,e)&&(e.startsWith("aria-")||e==="role"||e==="title")&&n[e]!=null)return!0;return!1},f8=de.createContext({}),d8=()=>de.useContext(f8),h8=de.forwardRef(({color:n,size:e,width:l,height:o,strokeWidth:s,absoluteStrokeWidth:c,nonScalingStroke:d,className:h="",children:g,iconNode:m=[],icon:p={node:m,aliases:[],size:24},...y},v)=>{const{size:E=24,strokeWidth:w=2,absoluteStrokeWidth:b=!1,nonScalingStroke:_=!1,color:N="currentColor",className:C=""}=d8()??{},M=!!g||c8(y),[S,T,L=[]]=u8(p,{color:n??N,width:l??e??E,height:o??e??E,strokeWidth:s??w,absoluteStrokeWidth:c??b,nonScalingStroke:d??_,className:i0(C,h),hasA11yProp:M,attributes:y});return de.createElement(S,{ref:v,...T},[...L.map(([R,H])=>de.createElement(R,H)),...Array.isArray(g)?g:[g]])});/**
112
+ * @license lucide-react v1.75.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */function Zt(n,e=[],l=[]){const o=typeof n=="string"?a8(n,e,l):n,s=de.forwardRef(({className:c,...d},h)=>de.createElement(h8,{ref:h,icon:o,className:c,...d}));return o.name&&(s.displayName=r8(o.name)),s}/**
117
+ * @license lucide-react v1.75.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const Cx={name:"check",size:24,node:[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]};Cx.node;const g8=Zt(Cx);/**
122
+ * @license lucide-react v1.75.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const Mx={name:"image-plus",size:24,node:[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]};Mx.node;const m8=Zt(Mx);/**
127
+ * @license lucide-react v1.75.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const Tx={name:"layout-dashboard",size:24,node:[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]]};Tx.node;const p8=Zt(Tx);/**
132
+ * @license lucide-react v1.75.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const Ax={name:"link-2",size:24,node:[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]]};Ax.node;const y8=Zt(Ax);/**
137
+ * @license lucide-react v1.75.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const Ox={name:"maximize",size:24,node:[["path",{d:"M8 3H5a2 2 0 0 0-2 2v3",key:"1dcmit"}],["path",{d:"M21 8V5a2 2 0 0 0-2-2h-3",key:"1e4gt3"}],["path",{d:"M3 16v3a2 2 0 0 0 2 2h3",key:"wsl5sc"}],["path",{d:"M16 21h3a2 2 0 0 0 2-2v-3",key:"18trek"}]]};Ox.node;const v8=Zt(Ox);/**
142
+ * @license lucide-react v1.75.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const zx={name:"moon",size:24,node:[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]};zx.node;const x8=Zt(zx);/**
147
+ * @license lucide-react v1.75.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const Rx={name:"network",size:24,node:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]]};Rx.node;const dy=Zt(Rx);/**
152
+ * @license lucide-react v1.75.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const Dx={name:"palette",size:24,node:[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]]};Dx.node;const b8=Zt(Dx);/**
157
+ * @license lucide-react v1.75.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const jx={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};jx.node;const S8=Zt(jx);/**
162
+ * @license lucide-react v1.75.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const Hx={name:"plus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]};Hx.node;const _8=Zt(Hx);/**
167
+ * @license lucide-react v1.75.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const Bx={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};Bx.node;const w8=Zt(Bx);/**
172
+ * @license lucide-react v1.75.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const Lx={name:"save",size:24,node:[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]};Lx.node;const E8=Zt(Lx);/**
177
+ * @license lucide-react v1.75.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const Ux={name:"search",size:24,node:[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]]};Ux.node;const N8=Zt(Ux);/**
182
+ * @license lucide-react v1.75.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const kx={name:"search-x",size:24,node:[["path",{d:"m13.5 8.5-5 5",key:"1cs55j"}],["path",{d:"m8.5 8.5 5 5",key:"a8mexj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]};kx.node;const C8=Zt(kx);/**
187
+ * @license lucide-react v1.75.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const Yx={name:"settings-2",size:24,node:[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]};Yx.node;const M8=Zt(Yx);/**
192
+ * @license lucide-react v1.75.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const qx={name:"sun",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]};qx.node;const T8=Zt(qx);/**
197
+ * @license lucide-react v1.75.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const Vx={name:"tag",size:24,node:[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]]};Vx.node;const A8=Zt(Vx);/**
202
+ * @license lucide-react v1.75.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const Xx={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};Xx.node;const O8=Zt(Xx);/**
207
+ * @license lucide-react v1.75.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const Gx={name:"type",size:24,node:[["path",{d:"M12 4v16",key:"1654pz"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2",key:"e0r10z"}],["path",{d:"M9 20h6",key:"s66wpe"}]]};Gx.node;const z8=Zt(Gx);/**
212
+ * @license lucide-react v1.75.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const Zx={name:"x",size:24,node:[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]};Zx.node;const R8=Zt(Zx),Ii=Object.create(null);Ii.open="0";Ii.close="1";Ii.ping="2";Ii.pong="3";Ii.message="4";Ii.upgrade="5";Ii.noop="6";const fc=Object.create(null);Object.keys(Ii).forEach(n=>{fc[Ii[n]]=n});const l0={type:"error",data:"parser error"},Qx=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Kx=typeof ArrayBuffer=="function",$x=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n&&n.buffer instanceof ArrayBuffer,B0=({type:n,data:e},l,o)=>Qx&&e instanceof Blob?l?o(e):hy(e,o):Kx&&(e instanceof ArrayBuffer||$x(e))?l?o(e):hy(new Blob([e]),o):o(Ii[n]+(e||"")),hy=(n,e)=>{const l=new FileReader;return l.onload=function(){const o=l.result.split(",")[1];e("b"+(o||""))},l.readAsDataURL(n)};function gy(n){return n instanceof Uint8Array?n:n instanceof ArrayBuffer?new Uint8Array(n):new Uint8Array(n.buffer,n.byteOffset,n.byteLength)}let Hh;function D8(n,e){if(Qx&&n.data instanceof Blob)return n.data.arrayBuffer().then(gy).then(e);if(Kx&&(n.data instanceof ArrayBuffer||$x(n.data)))return e(gy(n.data));B0(n,!1,l=>{Hh||(Hh=new TextEncoder),e(Hh.encode(l))})}const my="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",hs=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let n=0;n<my.length;n++)hs[my.charCodeAt(n)]=n;const j8=n=>{let e=n.length*.75,l=n.length,o,s=0,c,d,h,g;n[n.length-1]==="="&&(e--,n[n.length-2]==="="&&e--);const m=new ArrayBuffer(e),p=new Uint8Array(m);for(o=0;o<l;o+=4)c=hs[n.charCodeAt(o)],d=hs[n.charCodeAt(o+1)],h=hs[n.charCodeAt(o+2)],g=hs[n.charCodeAt(o+3)],p[s++]=c<<2|d>>4,p[s++]=(d&15)<<4|h>>2,p[s++]=(h&3)<<6|g&63;return m},H8=typeof ArrayBuffer=="function",L0=(n,e)=>{if(typeof n!="string")return{type:"message",data:Ix(n,e)};const l=n.charAt(0);return l==="b"?{type:"message",data:B8(n.substring(1),e)}:fc[l]?n.length>1?{type:fc[l],data:n.substring(1)}:{type:fc[l]}:l0},B8=(n,e)=>{if(H8){const l=j8(n);return Ix(l,e)}else return{base64:!0,data:n}},Ix=(n,e)=>{switch(e){case"blob":return n instanceof Blob?n:new Blob([n]);case"arraybuffer":default:return n instanceof ArrayBuffer?n:n.buffer}},Jx="",L8=(n,e)=>{const l=n.length,o=new Array(l);let s=0;n.forEach((c,d)=>{B0(c,!1,h=>{o[d]=h,++s===l&&e(o.join(Jx))})})},U8=(n,e)=>{const l=n.split(Jx),o=[];for(let s=0;s<l.length;s++){const c=L0(l[s],e);if(o.push(c),c.type==="error")break}return o};function k8(){return new TransformStream({transform(n,e){D8(n,l=>{const o=l.length;let s;if(o<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,o);else if(o<65536){s=new Uint8Array(3);const c=new DataView(s.buffer);c.setUint8(0,126),c.setUint16(1,o)}else{s=new Uint8Array(9);const c=new DataView(s.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(o))}n.data&&typeof n.data!="string"&&(s[0]|=128),e.enqueue(s),e.enqueue(l)})}})}let Bh;function nc(n){return n.reduce((e,l)=>e+l.length,0)}function ic(n,e){if(n[0].length===e)return n.shift();const l=new Uint8Array(e);let o=0;for(let s=0;s<e;s++)l[s]=n[0][o++],o===n[0].length&&(n.shift(),o=0);return n.length&&o<n[0].length&&(n[0]=n[0].slice(o)),l}function Y8(n,e){Bh||(Bh=new TextDecoder);const l=[];let o=0,s=-1,c=!1;return new TransformStream({transform(d,h){for(l.push(d);;){if(o===0){if(nc(l)<1)break;const g=ic(l,1);c=(g[0]&128)===128,s=g[0]&127,s<126?o=3:s===126?o=1:o=2}else if(o===1){if(nc(l)<2)break;const g=ic(l,2);s=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(nc(l)<8)break;const g=ic(l,8),m=new DataView(g.buffer,g.byteOffset,g.length),p=m.getUint32(0);if(p>Math.pow(2,21)-1){h.enqueue(l0);break}s=p*Math.pow(2,32)+m.getUint32(4),o=3}else{if(nc(l)<s)break;const g=ic(l,s);h.enqueue(L0(c?g:Bh.decode(g),e)),o=0}if(s===0||s>n){h.enqueue(l0);break}}}})}const Fx=4;function Vt(n){if(n)return q8(n)}function q8(n){for(var e in Vt.prototype)n[e]=Vt.prototype[e];return n}Vt.prototype.on=Vt.prototype.addEventListener=function(n,e){return this._callbacks=this._callbacks||{},(this._callbacks["$"+n]=this._callbacks["$"+n]||[]).push(e),this};Vt.prototype.once=function(n,e){function l(){this.off(n,l),e.apply(this,arguments)}return l.fn=e,this.on(n,l),this};Vt.prototype.off=Vt.prototype.removeListener=Vt.prototype.removeAllListeners=Vt.prototype.removeEventListener=function(n,e){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+n];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+n],this;for(var o,s=0;s<l.length;s++)if(o=l[s],o===e||o.fn===e){l.splice(s,1);break}return l.length===0&&delete this._callbacks["$"+n],this};Vt.prototype.emit=function(n){this._callbacks=this._callbacks||{};for(var e=new Array(arguments.length-1),l=this._callbacks["$"+n],o=1;o<arguments.length;o++)e[o-1]=arguments[o];if(l){l=l.slice(0);for(var o=0,s=l.length;o<s;++o)l[o].apply(this,e)}return this};Vt.prototype.emitReserved=Vt.prototype.emit;Vt.prototype.listeners=function(n){return this._callbacks=this._callbacks||{},this._callbacks["$"+n]||[]};Vt.prototype.hasListeners=function(n){return!!this.listeners(n).length};const Kc=typeof Promise=="function"&&typeof Promise.resolve=="function"?e=>Promise.resolve().then(e):(e,l)=>l(e,0),li=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),V8="arraybuffer";function Px(n,...e){return e.reduce((l,o)=>(n.hasOwnProperty(o)&&(l[o]=n[o]),l),{})}const X8=li.setTimeout,G8=li.clearTimeout;function $c(n,e){e.useNativeTimers?(n.setTimeoutFn=X8.bind(li),n.clearTimeoutFn=G8.bind(li)):(n.setTimeoutFn=li.setTimeout.bind(li),n.clearTimeoutFn=li.clearTimeout.bind(li))}const Z8=1.33;function Q8(n){return typeof n=="string"?K8(n):Math.ceil((n.byteLength||n.size)*Z8)}function K8(n){let e=0,l=0;for(let o=0,s=n.length;o<s;o++)e=n.charCodeAt(o),e<128?l+=1:e<2048?l+=2:e<55296||e>=57344?l+=3:(o++,l+=4);return l}function Wx(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function $8(n){let e="";for(let l in n)n.hasOwnProperty(l)&&(e.length&&(e+="&"),e+=encodeURIComponent(l)+"="+encodeURIComponent(n[l]));return e}function I8(n){let e={},l=n.split("&");for(let o=0,s=l.length;o<s;o++){let c=l[o].split("=");e[decodeURIComponent(c[0])]=decodeURIComponent(c.slice(1).join("="))}return e}class J8 extends Error{constructor(e,l,o){super(e),this.description=l,this.context=o,this.type="TransportError"}}class U0 extends Vt{constructor(e){super(),this.writable=!1,$c(this,e),this.opts=e,this.query=e.query,this.socket=e.socket,this.supportsBinary=!e.forceBase64}onError(e,l,o){return super.emitReserved("error",new J8(e,l,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(e){this.readyState==="open"&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const l=L0(e,this.socket.binaryType);this.onPacket(l)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,l={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(l)}_hostname(){const e=this.opts.hostname;return e.indexOf(":")===-1?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(e){const l=$8(e);return l.length?"?"+l:""}}class F8 extends U0{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(e){this.readyState="pausing";const l=()=>{this.readyState="paused",e()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||l()})),this.writable||(o++,this.once("drain",function(){--o||l()}))}else l()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){const l=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};U8(e,this.socket.binaryType).forEach(l),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const e=()=>{this.write([{type:"close"}])};this.readyState==="open"?e():this.once("open",e)}write(e){this.writable=!1,L8(e,l=>{this.doWrite(l,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const e=this.opts.secure?"https":"http",l=this.query||{};return this.opts.timestampRequests!==!1&&(l[this.opts.timestampParam]=Wx()),!this.supportsBinary&&!l.sid&&(l.b64=1),this.createUri(e,l)}}let eb=!1;try{eb=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const P8=eb;function W8(){}class eM extends F8{constructor(e){if(super(e),typeof location<"u"){const l=location.protocol==="https:";let o=location.port;o||(o=l?"443":"80"),this.xd=typeof location<"u"&&e.hostname!==location.hostname||o!==e.port}}doWrite(e,l){const o=this.request({method:"POST",data:e});o.on("success",l),o.on("error",(s,c)=>{this.onError("xhr post error",s,c)})}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",(l,o)=>{this.onError("xhr poll error",l,o)}),this.pollXhr=e}}class $i extends Vt{constructor(e,l,o){super(),this.createRequest=e,$c(this,o),this._opts=o,this._method=o.method||"GET",this._uri=l,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var e;const l=Px(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");l.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(l);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&o.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(e=this._opts.cookieJar)===null||e===void 0||e.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var s;o.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=$i.requestsCount++,$i.requests[this._index]=this)}_onError(e){this.emitReserved("error",e,this._xhr),this._cleanup(!0)}_cleanup(e){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=W8,e)try{this._xhr.abort()}catch{}typeof document<"u"&&delete $i.requests[this._index],this._xhr=null}}_onLoad(){const e=this._xhr.responseText;e!==null&&(this.emitReserved("data",e),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}$i.requestsCount=0;$i.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",py);else if(typeof addEventListener=="function"){const n="onpagehide"in li?"pagehide":"unload";addEventListener(n,py,!1)}}function py(){for(let n in $i.requests)$i.requests.hasOwnProperty(n)&&$i.requests[n].abort()}const tM=(function(){const n=tb({xdomain:!1});return n&&n.responseType!==null})();class nM extends eM{constructor(e){super(e);const l=e&&e.forceBase64;this.supportsBinary=tM&&!l}request(e={}){return Object.assign(e,{xd:this.xd},this.opts),new $i(tb,this.uri(),e)}}function tb(n){const e=n.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!e||P8))return new XMLHttpRequest}catch{}if(!e)try{return new li[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const nb=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class iM extends U0{get name(){return"websocket"}doOpen(){const e=this.uri(),l=this.opts.protocols,o=nb?{}:Px(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(e,l,o)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let l=0;l<e.length;l++){const o=e[l],s=l===e.length-1;B0(o,this.supportsBinary,c=>{try{this.doWrite(o,c)}catch{}s&&Kc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",l=this.query||{};return this.opts.timestampRequests&&(l[this.opts.timestampParam]=Wx()),this.supportsBinary||(l.b64=1),this.createUri(e,l)}}const Lh=li.WebSocket||li.MozWebSocket;class lM extends iM{createSocket(e,l,o){return nb?new Lh(e,l,o):l?new Lh(e,l):new Lh(e)}doWrite(e,l){this.ws.send(l)}}class aM extends U0{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(e){return this.emitReserved("error",e)}this._transport.closed.then(()=>{this.onClose()}).catch(e=>{this.onError("webtransport error",e)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(e=>{const l=Y8(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=e.readable.pipeThrough(l).getReader(),s=k8();s.readable.pipeTo(e.writable),this._writer=s.writable.getWriter();const c=()=>{o.read().then(({done:h,value:g})=>{h||(this.onPacket(g),c())}).catch(h=>{})};c();const d={type:"open"};this.query.sid&&(d.data=`{"sid":"${this.query.sid}"}`),this._writer.write(d).then(()=>this.onOpen())})})}write(e){this.writable=!1;for(let l=0;l<e.length;l++){const o=e[l],s=l===e.length-1;this._writer.write(o).then(()=>{s&&Kc(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var e;(e=this._transport)===null||e===void 0||e.close()}}const oM={websocket:lM,webtransport:aM,polling:nM},rM=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,sM=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function a0(n){if(n.length>8e3)throw"URI too long";const e=n,l=n.indexOf("["),o=n.indexOf("]");l!=-1&&o!=-1&&(n=n.substring(0,l)+n.substring(l,o).replace(/:/g,";")+n.substring(o,n.length));let s=rM.exec(n||""),c={},d=14;for(;d--;)c[sM[d]]=s[d]||"";return l!=-1&&o!=-1&&(c.source=e,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=uM(c,c.path),c.queryKey=cM(c,c.query),c}function uM(n,e){const l=/\/{2,9}/g,o=e.replace(l,"/").split("/");return(e.slice(0,1)=="/"||e.length===0)&&o.splice(0,1),e.slice(-1)=="/"&&o.splice(o.length-1,1),o}function cM(n,e){const l={};return e.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,s,c){s&&(l[s]=c)}),l}const o0=typeof addEventListener=="function"&&typeof removeEventListener=="function",dc=[];o0&&addEventListener("offline",()=>{dc.forEach(n=>n())},!1);let ib=class Ko extends Vt{constructor(e,l={}){var o,s;if(super(),this.binaryType=V8,this.writeBuffer=[],this._prevBufferLen=0,this._upgrades=[],this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,e&&typeof e=="object"&&(l=e,e=null),e){const c=a0(e);l.hostname=c.host,l.secure=c.protocol==="https"||c.protocol==="wss",l.port=c.port,c.query&&(l.query=c.query)}else l.host&&(l.hostname=a0(l.host).host);if($c(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),l.transportImplementations&&l.transports)throw new Error("specifying both 'transportImplementations' and 'transports' options is not supported");l.transportImplementations||!((o=l.transports)===null||o===void 0)&&o.length&&typeof l.transports[0]=="function"?(this.transports=[],this._transportsByName=Object.create(null),((s=l.transportImplementations)!==null&&s!==void 0?s:l.transports).forEach(c=>{const d=c.prototype.name;this.transports.push(d),this._transportsByName[d]=c})):(this.transports=l.transports?[...l.transports]:["polling","websocket","webtransport"],this._transportsByName=oM),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=I8(this.opts.query)),o0&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},dc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(e){const l=Object.assign({},this.opts.query);l.EIO=Fx,l.transport=e,this.id&&(l.sid=this.id);const o=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new this._transportsByName[e](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const e=this.opts.rememberUpgrade&&Ko.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const l=this.createTransport(e);l.open(),this.setTransport(l)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",l=>this._onClose("transport close",l))}_probe(e){let l=this.createTransport(e),o=!1;Ko.priorWebsocketSuccess=!1;const s=()=>{o||(l.send([{type:"ping",data:"probe"}]),l.once("packet",y=>{if(!o)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;Ko.priorWebsocketSuccess=l.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(p(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{const v=new Error("probe error");v.transport=l.name,this.emitReserved("upgradeError",v)}}))};function c(){o||(o=!0,p(),l.close(),l=null)}const d=y=>{const v=new Error("probe error: "+y);v.transport=l.name,c(),this.emitReserved("upgradeError",v)};function h(){d("transport closed")}function g(){d("socket closed")}function m(y){l&&y.name!==l.name&&c()}const p=()=>{l.removeListener("open",s),l.removeListener("error",d),l.removeListener("close",h),this.off("close",g),this.off("upgrading",m)};l.once("open",s),l.once("error",d),l.once("close",h),this.once("close",g),this.once("upgrading",m),this._upgrades.indexOf("webtransport")!==-1&&e!=="webtransport"?this.setTimeoutFn(()=>{o||l.open()},200):l.open()}onOpen(){if(this.readyState="open",Ko.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush(),this.readyState==="open"&&this.opts.upgrade)for(let e=0;e<this._upgrades.length;e++)this._probe(this._upgrades[e])}_onPacket(e){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",e),this.emitReserved("heartbeat"),e.type){case"open":this.onHandshake(JSON.parse(e.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const l=new Error("server error");l.code=e.data,this._onError(l);break;case"message":this.emitReserved("data",e.data),this.emitReserved("message",e.data);break}}onHandshake(e){this.emitReserved("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this._upgrades=this._filterUpgrades(e.upgrades),this._pingInterval=e.pingInterval,this._pingTimeout=e.pingTimeout,this._maxPayload=e.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const e=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+e,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},e),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this._getWritablePackets();this.transport.send(e),this._prevBufferLen=e.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let o=0;o<this.writeBuffer.length;o++){const s=this.writeBuffer[o].data;if(s&&(l+=Q8(s)),o>0&&l>this._maxPayload)return this.writeBuffer.slice(0,o);l+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const e=Date.now()>this._pingTimeoutTime;return e&&(this._pingTimeoutTime=0,Kc(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),e}write(e,l,o){return this._sendPacket("message",e,l,o),this}send(e,l,o){return this._sendPacket("message",e,l,o),this}_sendPacket(e,l,o,s){if(typeof l=="function"&&(s=l,l=void 0),typeof o=="function"&&(s=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const c={type:e,data:l,options:o};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),s&&this.once("flush",s),this.flush()}close(){const e=()=>{this._onClose("forced close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),e()},o=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():e()}):this.upgrading?o():e()),this}_onError(e){if(Ko.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",e),this._onClose("transport error",e)}_onClose(e,l){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),o0&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=dc.indexOf(this._offlineEventListener);o!==-1&&dc.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",e,l),this.writeBuffer=[],this._prevBufferLen=0}}_filterUpgrades(e){const l=[];for(let o=0;o<e.length;o++)~this.transports.indexOf(e[o])&&l.push(e[o]);return l}};ib.protocol=Fx;function fM(n,e="",l){let o=n;l=l||typeof location<"u"&&location,n==null&&(n=l.protocol+"//"+l.host),typeof n=="string"&&(n.charAt(0)==="/"&&(n.charAt(1)==="/"?n=l.protocol+n:n=l.host+n),/^(https?|wss?):\/\//.test(n)||(typeof l<"u"?n=l.protocol+"//"+n:n="https://"+n),o=a0(n)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const c=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+c+":"+o.port+e,o.href=o.protocol+"://"+c+(l&&l.port===o.port?"":":"+o.port),o}const dM=typeof ArrayBuffer=="function",hM=n=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(n):n.buffer instanceof ArrayBuffer,lb=Object.prototype.toString,gM=typeof Blob=="function"||typeof Blob<"u"&&lb.call(Blob)==="[object BlobConstructor]",mM=typeof File=="function"||typeof File<"u"&&lb.call(File)==="[object FileConstructor]";function k0(n){return dM&&(n instanceof ArrayBuffer||hM(n))||gM&&n instanceof Blob||mM&&n instanceof File}function hc(n,e){if(!n||typeof n!="object")return!1;if(Array.isArray(n)){for(let l=0,o=n.length;l<o;l++)if(hc(n[l]))return!0;return!1}if(k0(n))return!0;if(n.toJSON&&typeof n.toJSON=="function"&&arguments.length===1)return hc(n.toJSON(),!0);for(const l in n)if(Object.prototype.hasOwnProperty.call(n,l)&&hc(n[l]))return!0;return!1}function pM(n){const e=[],l=n.data,o=n;return o.data=gc(l,e),o.attachments=e.length,{packet:o,buffers:e}}function gc(n,e,l){if(!n)return n;if(k0(n)){const o={_placeholder:!0,num:e.length};return e.push(n),o}else if(Array.isArray(n)){const o=new Array(n.length);for(let s=0;s<n.length;s++)o[s]=gc(n[s],e);return o}else if(typeof n=="object"&&!(n instanceof Date)){if(n.toJSON&&typeof n.toJSON=="function"&&!l)return gc(n.toJSON(),e,!0);const o={};for(const s in n)Object.prototype.hasOwnProperty.call(n,s)&&(o[s]=gc(n[s],e));return o}return n}function yM(n,e){return n.data=r0(n.data,e),delete n.attachments,n}function r0(n,e){if(!n)return n;if(n&&n._placeholder===!0){if(typeof n.num=="number"&&n.num>=0&&n.num<e.length)return e[n.num];throw new Error("illegal attachments")}else if(Array.isArray(n))for(let l=0;l<n.length;l++)n[l]=r0(n[l],e);else if(typeof n=="object")for(const l in n)Object.prototype.hasOwnProperty.call(n,l)&&(n[l]=r0(n[l],e));return n}const vM=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var ot;(function(n){n[n.CONNECT=0]="CONNECT",n[n.DISCONNECT=1]="DISCONNECT",n[n.EVENT=2]="EVENT",n[n.ACK=3]="ACK",n[n.CONNECT_ERROR=4]="CONNECT_ERROR",n[n.BINARY_EVENT=5]="BINARY_EVENT",n[n.BINARY_ACK=6]="BINARY_ACK"})(ot||(ot={}));class xM{constructor(e){this.replacer=e}encode(e){return(e.type===ot.EVENT||e.type===ot.ACK)&&hc(e)?this.encodeAsBinary({type:e.type===ot.EVENT?ot.BINARY_EVENT:ot.BINARY_ACK,nsp:e.nsp,data:e.data,id:e.id}):[this.encodeAsString(e)]}encodeAsString(e){let l=""+e.type;return(e.type===ot.BINARY_EVENT||e.type===ot.BINARY_ACK)&&(l+=e.attachments+"-"),e.nsp&&e.nsp!=="/"&&(l+=e.nsp+","),e.id!=null&&(l+=e.id),e.data!=null&&(l+=JSON.stringify(e.data,this.replacer)),l}encodeAsBinary(e){const l=pM(e),o=this.encodeAsString(l.packet),s=l.buffers;return s.unshift(o),s}}class Y0 extends Vt{constructor(e){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof e=="function"?{reviver:e}:e)}add(e){let l;if(typeof e=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");l=this.decodeString(e);const o=l.type===ot.BINARY_EVENT;o||l.type===ot.BINARY_ACK?(l.type=o?ot.EVENT:ot.ACK,this.reconstructor=new bM(l)):super.emitReserved("decoded",l)}else if(k0(e)||e.base64)if(this.reconstructor)l=this.reconstructor.takeBinaryData(e),l&&(this.reconstructor=null,super.emitReserved("decoded",l));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+e)}decodeString(e){let l=0;const o={type:Number(e.charAt(0))};if(ot[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===ot.BINARY_EVENT||o.type===ot.BINARY_ACK){const c=l+1;for(;e.charAt(++l)!=="-"&&l!=e.length;);const d=e.substring(c,l);if(d!=Number(d)||e.charAt(l)!=="-")throw new Error("Illegal attachments");const h=Number(d);if(!SM(h)||h<1)throw new Error("Illegal attachments");if(h>this.opts.maxAttachments)throw new Error("too many attachments");o.attachments=h}if(e.charAt(l+1)==="/"){const c=l+1;for(;++l&&!(e.charAt(l)===","||l===e.length););o.nsp=e.substring(c,l)}else o.nsp="/";const s=e.charAt(l+1);if(s!==""&&Number(s)==s){const c=l+1;for(;++l;){const d=e.charAt(l);if(d==null||Number(d)!=d){--l;break}if(l===e.length)break}o.id=Number(e.substring(c,l+1))}if(e.charAt(++l)){const c=this.tryParse(e.substr(l));if(Y0.isPayloadValid(o.type,c))o.data=c;else throw new Error("invalid payload")}return o}tryParse(e){try{return JSON.parse(e,this.opts.reviver)}catch{return!1}}static isPayloadValid(e,l){switch(e){case ot.CONNECT:return yy(l);case ot.DISCONNECT:return l===void 0;case ot.CONNECT_ERROR:return typeof l=="string"||yy(l);case ot.EVENT:case ot.BINARY_EVENT:return Array.isArray(l)&&(typeof l[0]=="number"||typeof l[0]=="string"&&vM.indexOf(l[0])===-1);case ot.ACK:case ot.BINARY_ACK:return Array.isArray(l)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class bM{constructor(e){this.packet=e,this.buffers=[],this.reconPack=e}takeBinaryData(e){if(this.buffers.push(e),this.buffers.length===this.reconPack.attachments){const l=yM(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const SM=Number.isInteger||function(n){return typeof n=="number"&&isFinite(n)&&Math.floor(n)===n};function yy(n){return Object.prototype.toString.call(n)==="[object Object]"}const _M=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Y0,Encoder:xM,get PacketType(){return ot}},Symbol.toStringTag,{value:"Module"}));function xi(n,e,l){return n.on(e,l),function(){n.off(e,l)}}const wM=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class ab extends Vt{constructor(e,l,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=e,this.nsp=l,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const e=this.io;this.subs=[xi(e,"open",this.onopen.bind(this)),xi(e,"packet",this.onpacket.bind(this)),xi(e,"error",this.onerror.bind(this)),xi(e,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...e){return e.unshift("message"),this.emit.apply(this,e),this}emit(e,...l){var o,s,c;if(wM.hasOwnProperty(e))throw new Error('"'+e.toString()+'" is a reserved event name');if(l.unshift(e),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(l),this;const d={type:ot.EVENT,data:l};if(d.options={},d.options.compress=this.flags.compress!==!1,typeof l[l.length-1]=="function"){const p=this.ids++,y=l.pop();this._registerAckCallback(p,y),d.id=p}const h=(s=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||s===void 0?void 0:s.writable,g=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(g?(this.notifyOutgoingListeners(d),this.packet(d)):this.sendBuffer.push(d)),this.flags={},this}_registerAckCallback(e,l){var o;const s=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(s===void 0){this.acks[e]=l;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[e];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===e&&this.sendBuffer.splice(h,1);l.call(this,new Error("operation has timed out"))},s),d=(...h)=>{this.io.clearTimeoutFn(c),l.apply(this,h)};d.withError=!0,this.acks[e]=d}emitWithAck(e,...l){return new Promise((o,s)=>{const c=(d,h)=>d?s(d):o(h);c.withError=!0,l.push(c),this.emit(e,...l)})}_addToQueue(e){let l;typeof e[e.length-1]=="function"&&(l=e.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push((s,...c)=>(this._queue[0],s!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),l&&l(s)):(this._queue.shift(),l&&l(null,...c)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||this._queue.length===0)return;const l=this._queue[0];l.pending&&!e||(l.pending=!0,l.tryCount++,this.flags=l.flags,this.emit.apply(this,l.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){typeof this.auth=="function"?this.auth(e=>{this._sendConnectPacket(e)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:ot.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,l){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,l),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(e=>{if(!this.sendBuffer.some(o=>String(o.id)===e)){const o=this.acks[e];delete this.acks[e],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case ot.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case ot.EVENT:case ot.BINARY_EVENT:this.onevent(e);break;case ot.ACK:case ot.BINARY_ACK:this.onack(e);break;case ot.DISCONNECT:this.ondisconnect();break;case ot.CONNECT_ERROR:this.destroy();const o=new Error(e.data.message);o.data=e.data.data,this.emitReserved("connect_error",o);break}}onevent(e){const l=e.data||[];e.id!=null&&l.push(this.ack(e.id)),this.connected?this.emitEvent(l):this.receiveBuffer.push(Object.freeze(l))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const l=this._anyListeners.slice();for(const o of l)o.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&typeof e[e.length-1]=="string"&&(this._lastOffset=e[e.length-1])}ack(e){const l=this;let o=!1;return function(...s){o||(o=!0,l.packet({type:ot.ACK,id:e,data:s}))}}onack(e){const l=this.acks[e.id];typeof l=="function"&&(delete this.acks[e.id],l.withError&&e.data.unshift(null),l.apply(this,e.data))}onconnect(e,l){this.id=e,this.recovered=l&&this._pid===l,this._pid=l,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(e=>this.emitEvent(e)),this.receiveBuffer=[],this.sendBuffer.forEach(e=>{this.notifyOutgoingListeners(e),this.packet(e)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(e=>e()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:ot.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const l=this._anyListeners;for(let o=0;o<l.length;o++)if(e===l[o])return l.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(e),this}prependAnyOutgoing(e){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(e),this}offAnyOutgoing(e){if(!this._anyOutgoingListeners)return this;if(e){const l=this._anyOutgoingListeners;for(let o=0;o<l.length;o++)if(e===l[o])return l.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(e){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const l=this._anyOutgoingListeners.slice();for(const o of l)o.apply(this,e.data)}}}function dr(n){n=n||{},this.ms=n.min||100,this.max=n.max||1e4,this.factor=n.factor||2,this.jitter=n.jitter>0&&n.jitter<=1?n.jitter:0,this.attempts=0}dr.prototype.duration=function(){var n=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var e=Math.random(),l=Math.floor(e*this.jitter*n);n=(Math.floor(e*10)&1)==0?n-l:n+l}return Math.min(n,this.max)|0};dr.prototype.reset=function(){this.attempts=0};dr.prototype.setMin=function(n){this.ms=n};dr.prototype.setMax=function(n){this.max=n};dr.prototype.setJitter=function(n){this.jitter=n};class s0 extends Vt{constructor(e,l){var o;super(),this.nsps={},this.subs=[],e&&typeof e=="object"&&(l=e,e=void 0),l=l||{},l.path=l.path||"/socket.io",this.opts=l,$c(this,l),this.reconnection(l.reconnection!==!1),this.reconnectionAttempts(l.reconnectionAttempts||1/0),this.reconnectionDelay(l.reconnectionDelay||1e3),this.reconnectionDelayMax(l.reconnectionDelayMax||5e3),this.randomizationFactor((o=l.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new dr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(l.timeout==null?2e4:l.timeout),this._readyState="closed",this.uri=e;const s=l.parser||_M;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=l.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,e||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(e){return e===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var l;return e===void 0?this._reconnectionDelay:(this._reconnectionDelay=e,(l=this.backoff)===null||l===void 0||l.setMin(e),this)}randomizationFactor(e){var l;return e===void 0?this._randomizationFactor:(this._randomizationFactor=e,(l=this.backoff)===null||l===void 0||l.setJitter(e),this)}reconnectionDelayMax(e){var l;return e===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,(l=this.backoff)===null||l===void 0||l.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new ib(this.uri,this.opts);const l=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const s=xi(l,"open",function(){o.onopen(),e&&e()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),e?e(h):this.maybeReconnectOnOpen()},d=xi(l,"error",c);if(this._timeout!==!1){const h=this._timeout,g=this.setTimeoutFn(()=>{s(),c(new Error("timeout")),l.close()},h);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(s),this.subs.push(d),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(xi(e,"ping",this.onping.bind(this)),xi(e,"data",this.ondata.bind(this)),xi(e,"error",this.onerror.bind(this)),xi(e,"close",this.onclose.bind(this)),xi(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(l){this.onclose("parse error",l)}}ondecoded(e){Kc(()=>{this.emitReserved("packet",e)},this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,l){let o=this.nsps[e];return o?this._autoConnect&&!o.active&&o.connect():(o=new ab(this,e,l),this.nsps[e]=o),o}_destroy(e){const l=Object.keys(this.nsps);for(const o of l)if(this.nsps[o].active)return;this._close()}_packet(e){const l=this.encoder.encode(e);for(let o=0;o<l.length;o++)this.engine.write(l[o],e.options)}cleanup(){this.subs.forEach(e=>e()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(e,l){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,l),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const l=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),!e.skipReconnect&&e.open(s=>{s?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",s)):e.onreconnect()}))},l);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const us={};function mc(n,e){typeof n=="object"&&(e=n,n=void 0),e=e||{};const l=fM(n,e.path||"/socket.io"),o=l.source,s=l.id,c=l.path,d=us[s]&&c in us[s].nsps,h=e.forceNew||e["force new connection"]||e.multiplex===!1||d;let g;return h?g=new s0(o,e):(us[s]||(us[s]=new s0(o,e)),g=us[s]),l.query&&!e.query&&(e.query=l.queryKey),g.socket(l.path,e)}Object.assign(mc,{Manager:s0,Socket:ab,io:mc,connect:mc});function EM(n){const e=+this._x.call(null,n),l=+this._y.call(null,n);return ob(this.cover(e,l),e,l,n)}function ob(n,e,l,o){if(isNaN(e)||isNaN(l))return n;var s,c=n._root,d={data:o},h=n._x0,g=n._y0,m=n._x1,p=n._y1,y,v,E,w,b,_,N,C;if(!c)return n._root=d,n;for(;c.length;)if((b=e>=(y=(h+m)/2))?h=y:m=y,(_=l>=(v=(g+p)/2))?g=v:p=v,s=c,!(c=c[N=_<<1|b]))return s[N]=d,n;if(E=+n._x.call(null,c.data),w=+n._y.call(null,c.data),e===E&&l===w)return d.next=c,s?s[N]=d:n._root=d,n;do s=s?s[N]=new Array(4):n._root=new Array(4),(b=e>=(y=(h+m)/2))?h=y:m=y,(_=l>=(v=(g+p)/2))?g=v:p=v;while((N=_<<1|b)===(C=(w>=v)<<1|E>=y));return s[C]=c,s[N]=d,n}function NM(n){Array.isArray(n)||(n=Array.from(n));const e=n.length,l=new Float64Array(e),o=new Float64Array(e);let s=1/0,c=s,d=-s,h=d;for(let g=0,m,p,y;g<e;++g){if(isNaN(p=+this._x.call(null,m=n[g]))||isNaN(y=+this._y.call(null,m))){l[g]=NaN;continue}l[g]=p,o[g]=y,p<s&&(s=p),p>d&&(d=p),y<c&&(c=y),y>h&&(h=y)}if(s>d||c>h)return this;this.cover(s,c).cover(d,h);for(let g=0;g<e;++g)ob(this,l[g],o[g],n[g]);return this}function CM(n,e){if(isNaN(n=+n)||isNaN(e=+e))return this;var l=this._x0,o=this._y0,s=this._x1,c=this._y1;if(isNaN(l))s=(l=Math.floor(n))+1,c=(o=Math.floor(e))+1;else{for(var d=s-l||1,h=this._root,g,m;l>n||n>=s||o>e||e>=c;)switch(m=(e<o)<<1|n<l,g=new Array(4),g[m]=h,h=g,d*=2,m){case 0:s=l+d,c=o+d;break;case 1:l=s-d,c=o+d;break;case 2:s=l+d,o=c-d;break;case 3:l=s-d,o=c-d;break}this._root&&this._root.length&&(this._root=h)}return this._x0=l,this._y0=o,this._x1=s,this._y1=c,this}function MM(){var n=[];return this.visit(function(e){if(!e.length)do n.push(e.data);while(e=e.next)}),n}function TM(n){return arguments.length?this.cover(+n[0][0],+n[0][1]).cover(+n[1][0],+n[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]}function Sn(n,e,l,o,s){this.node=n,this.x0=e,this.y0=l,this.x1=o,this.y1=s}function AM(n,e,l){var o,s=this._x0,c=this._y0,d,h,g,m,p=this._x1,y=this._y1,v=[],E=this._root,w,b;for(E&&v.push(new Sn(E,s,c,p,y)),l==null?l=1/0:(s=n-l,c=e-l,p=n+l,y=e+l,l*=l);w=v.pop();)if(!(!(E=w.node)||(d=w.x0)>p||(h=w.y0)>y||(g=w.x1)<s||(m=w.y1)<c))if(E.length){var _=(d+g)/2,N=(h+m)/2;v.push(new Sn(E[3],_,N,g,m),new Sn(E[2],d,N,_,m),new Sn(E[1],_,h,g,N),new Sn(E[0],d,h,_,N)),(b=(e>=N)<<1|n>=_)&&(w=v[v.length-1],v[v.length-1]=v[v.length-1-b],v[v.length-1-b]=w)}else{var C=n-+this._x.call(null,E.data),M=e-+this._y.call(null,E.data),S=C*C+M*M;if(S<l){var T=Math.sqrt(l=S);s=n-T,c=e-T,p=n+T,y=e+T,o=E.data}}return o}function OM(n){if(isNaN(p=+this._x.call(null,n))||isNaN(y=+this._y.call(null,n)))return this;var e,l=this._root,o,s,c,d=this._x0,h=this._y0,g=this._x1,m=this._y1,p,y,v,E,w,b,_,N;if(!l)return this;if(l.length)for(;;){if((w=p>=(v=(d+g)/2))?d=v:g=v,(b=y>=(E=(h+m)/2))?h=E:m=E,e=l,!(l=l[_=b<<1|w]))return this;if(!l.length)break;(e[_+1&3]||e[_+2&3]||e[_+3&3])&&(o=e,N=_)}for(;l.data!==n;)if(s=l,!(l=l.next))return this;return(c=l.next)&&delete l.next,s?(c?s.next=c:delete s.next,this):e?(c?e[_]=c:delete e[_],(l=e[0]||e[1]||e[2]||e[3])&&l===(e[3]||e[2]||e[1]||e[0])&&!l.length&&(o?o[N]=l:this._root=l),this):(this._root=c,this)}function zM(n){for(var e=0,l=n.length;e<l;++e)this.remove(n[e]);return this}function RM(){return this._root}function DM(){var n=0;return this.visit(function(e){if(!e.length)do++n;while(e=e.next)}),n}function jM(n){var e=[],l,o=this._root,s,c,d,h,g;for(o&&e.push(new Sn(o,this._x0,this._y0,this._x1,this._y1));l=e.pop();)if(!n(o=l.node,c=l.x0,d=l.y0,h=l.x1,g=l.y1)&&o.length){var m=(c+h)/2,p=(d+g)/2;(s=o[3])&&e.push(new Sn(s,m,p,h,g)),(s=o[2])&&e.push(new Sn(s,c,p,m,g)),(s=o[1])&&e.push(new Sn(s,m,d,h,p)),(s=o[0])&&e.push(new Sn(s,c,d,m,p))}return this}function HM(n){var e=[],l=[],o;for(this._root&&e.push(new Sn(this._root,this._x0,this._y0,this._x1,this._y1));o=e.pop();){var s=o.node;if(s.length){var c,d=o.x0,h=o.y0,g=o.x1,m=o.y1,p=(d+g)/2,y=(h+m)/2;(c=s[0])&&e.push(new Sn(c,d,h,p,y)),(c=s[1])&&e.push(new Sn(c,p,h,g,y)),(c=s[2])&&e.push(new Sn(c,d,y,p,m)),(c=s[3])&&e.push(new Sn(c,p,y,g,m))}l.push(o)}for(;o=l.pop();)n(o.node,o.x0,o.y0,o.x1,o.y1);return this}function BM(n){return n[0]}function LM(n){return arguments.length?(this._x=n,this):this._x}function UM(n){return n[1]}function kM(n){return arguments.length?(this._y=n,this):this._y}function q0(n,e,l){var o=new V0(e??BM,l??UM,NaN,NaN,NaN,NaN);return n==null?o:o.addAll(n)}function V0(n,e,l,o,s,c){this._x=n,this._y=e,this._x0=l,this._y0=o,this._x1=s,this._y1=c,this._root=void 0}function vy(n){for(var e={data:n.data},l=e;n=n.next;)l=l.next={data:n.data};return e}var wn=q0.prototype=V0.prototype;wn.copy=function(){var n=new V0(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,l,o;if(!e)return n;if(!e.length)return n._root=vy(e),n;for(l=[{source:e,target:n._root=new Array(4)}];e=l.pop();)for(var s=0;s<4;++s)(o=e.source[s])&&(o.length?l.push({source:o,target:e.target[s]=new Array(4)}):e.target[s]=vy(o));return n};wn.add=EM;wn.addAll=NM;wn.cover=CM;wn.data=MM;wn.extent=TM;wn.find=AM;wn.remove=OM;wn.removeAll=zM;wn.root=RM;wn.size=DM;wn.visit=jM;wn.visitAfter=HM;wn.x=LM;wn.y=kM;function YM(n,e){var l,o=1;n==null&&(n=0),e==null&&(e=0);function s(){var c,d=l.length,h,g=0,m=0;for(c=0;c<d;++c)h=l[c],g+=h.x,m+=h.y;for(g=(g/d-n)*o,m=(m/d-e)*o,c=0;c<d;++c)h=l[c],h.x-=g,h.y-=m}return s.initialize=function(c){l=c},s.x=function(c){return arguments.length?(n=+c,s):n},s.y=function(c){return arguments.length?(e=+c,s):e},s.strength=function(c){return arguments.length?(o=+c,s):o},s}function _n(n){return function(){return n}}function ua(n){return(n()-.5)*1e-6}function qM(n){return n.x+n.vx}function VM(n){return n.y+n.vy}function XM(n){var e,l,o,s=1,c=1;typeof n!="function"&&(n=_n(n==null?1:+n));function d(){for(var m,p=e.length,y,v,E,w,b,_,N=0;N<c;++N)for(y=q0(e,qM,VM).visitAfter(h),m=0;m<p;++m)v=e[m],b=l[v.index],_=b*b,E=v.x+v.vx,w=v.y+v.vy,y.visit(C);function C(M,S,T,L,R){var H=M.data,z=M.r,Y=b+z;if(H){if(H.index>v.index){var Z=E-H.x-H.vx,I=w-H.y-H.vy,G=Z*Z+I*I;G<Y*Y&&(Z===0&&(Z=ua(o),G+=Z*Z),I===0&&(I=ua(o),G+=I*I),G=(Y-(G=Math.sqrt(G)))/G*s,v.vx+=(Z*=G)*(Y=(z*=z)/(_+z)),v.vy+=(I*=G)*Y,H.vx-=Z*(Y=1-Y),H.vy-=I*Y)}return}return S>E+Y||L<E-Y||T>w+Y||R<w-Y}}function h(m){if(m.data)return m.r=l[m.data.index];for(var p=m.r=0;p<4;++p)m[p]&&m[p].r>m.r&&(m.r=m[p].r)}function g(){if(e){var m,p=e.length,y;for(l=new Array(p),m=0;m<p;++m)y=e[m],l[y.index]=+n(y,m,e)}}return d.initialize=function(m,p){e=m,o=p,g()},d.iterations=function(m){return arguments.length?(c=+m,d):c},d.strength=function(m){return arguments.length?(s=+m,d):s},d.radius=function(m){return arguments.length?(n=typeof m=="function"?m:_n(+m),g(),d):n},d}function GM(n){return n.index}function xy(n,e){var l=n.get(e);if(!l)throw new Error("node not found: "+e);return l}function ZM(n){var e=GM,l=y,o,s=_n(30),c,d,h,g,m,p=1;n==null&&(n=[]);function y(_){return 1/Math.min(h[_.source.index],h[_.target.index])}function v(_){for(var N=0,C=n.length;N<p;++N)for(var M=0,S,T,L,R,H,z,Y;M<C;++M)S=n[M],T=S.source,L=S.target,R=L.x+L.vx-T.x-T.vx||ua(m),H=L.y+L.vy-T.y-T.vy||ua(m),z=Math.sqrt(R*R+H*H),z=(z-c[M])/z*_*o[M],R*=z,H*=z,L.vx-=R*(Y=g[M]),L.vy-=H*Y,T.vx+=R*(Y=1-Y),T.vy+=H*Y}function E(){if(d){var _,N=d.length,C=n.length,M=new Map(d.map((T,L)=>[e(T,L,d),T])),S;for(_=0,h=new Array(N);_<C;++_)S=n[_],S.index=_,typeof S.source!="object"&&(S.source=xy(M,S.source)),typeof S.target!="object"&&(S.target=xy(M,S.target)),h[S.source.index]=(h[S.source.index]||0)+1,h[S.target.index]=(h[S.target.index]||0)+1;for(_=0,g=new Array(C);_<C;++_)S=n[_],g[_]=h[S.source.index]/(h[S.source.index]+h[S.target.index]);o=new Array(C),w(),c=new Array(C),b()}}function w(){if(d)for(var _=0,N=n.length;_<N;++_)o[_]=+l(n[_],_,n)}function b(){if(d)for(var _=0,N=n.length;_<N;++_)c[_]=+s(n[_],_,n)}return v.initialize=function(_,N){d=_,m=N,E()},v.links=function(_){return arguments.length?(n=_,E(),v):n},v.id=function(_){return arguments.length?(e=_,v):e},v.iterations=function(_){return arguments.length?(p=+_,v):p},v.strength=function(_){return arguments.length?(l=typeof _=="function"?_:_n(+_),w(),v):l},v.distance=function(_){return arguments.length?(s=typeof _=="function"?_:_n(+_),b(),v):s},v}const QM=1664525,KM=1013904223,by=4294967296;function $M(){let n=1;return()=>(n=(QM*n+KM)%by)/by}function IM(n){return n.x}function JM(n){return n.y}var FM=10,PM=Math.PI*(3-Math.sqrt(5));function WM(n){var e,l=1,o=.001,s=1-Math.pow(o,1/300),c=0,d=.6,h=new Map,g=p0(y),m=Ms("tick","end"),p=$M();n==null&&(n=[]);function y(){v(),m.call("tick",e),l<o&&(g.stop(),m.call("end",e))}function v(b){var _,N=n.length,C;b===void 0&&(b=1);for(var M=0;M<b;++M)for(l+=(c-l)*s,h.forEach(function(S){S(l)}),_=0;_<N;++_)C=n[_],C.fx==null?C.x+=C.vx*=d:(C.x=C.fx,C.vx=0),C.fy==null?C.y+=C.vy*=d:(C.y=C.fy,C.vy=0);return e}function E(){for(var b=0,_=n.length,N;b<_;++b){if(N=n[b],N.index=b,N.fx!=null&&(N.x=N.fx),N.fy!=null&&(N.y=N.fy),isNaN(N.x)||isNaN(N.y)){var C=FM*Math.sqrt(.5+b),M=b*PM;N.x=C*Math.cos(M),N.y=C*Math.sin(M)}(isNaN(N.vx)||isNaN(N.vy))&&(N.vx=N.vy=0)}}function w(b){return b.initialize&&b.initialize(n,p),b}return E(),e={tick:v,restart:function(){return g.restart(y),e},stop:function(){return g.stop(),e},nodes:function(b){return arguments.length?(n=b,E(),h.forEach(w),e):n},alpha:function(b){return arguments.length?(l=+b,e):l},alphaMin:function(b){return arguments.length?(o=+b,e):o},alphaDecay:function(b){return arguments.length?(s=+b,e):+s},alphaTarget:function(b){return arguments.length?(c=+b,e):c},velocityDecay:function(b){return arguments.length?(d=1-b,e):1-d},randomSource:function(b){return arguments.length?(p=b,h.forEach(w),e):p},force:function(b,_){return arguments.length>1?(_==null?h.delete(b):h.set(b,w(_)),e):h.get(b)},find:function(b,_,N){var C=0,M=n.length,S,T,L,R,H;for(N==null?N=1/0:N*=N,C=0;C<M;++C)R=n[C],S=b-R.x,T=_-R.y,L=S*S+T*T,L<N&&(H=R,N=L);return H},on:function(b,_){return arguments.length>1?(m.on(b,_),e):m.on(b)}}}function e7(){var n,e,l,o,s=_n(-30),c,d=1,h=1/0,g=.81;function m(E){var w,b=n.length,_=q0(n,IM,JM).visitAfter(y);for(o=E,w=0;w<b;++w)e=n[w],_.visit(v)}function p(){if(n){var E,w=n.length,b;for(c=new Array(w),E=0;E<w;++E)b=n[E],c[b.index]=+s(b,E,n)}}function y(E){var w=0,b,_,N=0,C,M,S;if(E.length){for(C=M=S=0;S<4;++S)(b=E[S])&&(_=Math.abs(b.value))&&(w+=b.value,N+=_,C+=_*b.x,M+=_*b.y);E.x=C/N,E.y=M/N}else{b=E,b.x=b.data.x,b.y=b.data.y;do w+=c[b.data.index];while(b=b.next)}E.value=w}function v(E,w,b,_){if(!E.value)return!0;var N=E.x-e.x,C=E.y-e.y,M=_-w,S=N*N+C*C;if(M*M/g<S)return S<h&&(N===0&&(N=ua(l),S+=N*N),C===0&&(C=ua(l),S+=C*C),S<d&&(S=Math.sqrt(d*S)),e.vx+=N*E.value*o/S,e.vy+=C*E.value*o/S),!0;if(E.length||S>=h)return;(E.data!==e||E.next)&&(N===0&&(N=ua(l),S+=N*N),C===0&&(C=ua(l),S+=C*C),S<d&&(S=Math.sqrt(d*S)));do E.data!==e&&(M=c[E.data.index]*o/S,e.vx+=N*M,e.vy+=C*M);while(E=E.next)}return m.initialize=function(E,w){n=E,l=w,p()},m.strength=function(E){return arguments.length?(s=typeof E=="function"?E:_n(+E),p(),m):s},m.distanceMin=function(E){return arguments.length?(d=E*E,m):Math.sqrt(d)},m.distanceMax=function(E){return arguments.length?(h=E*E,m):Math.sqrt(h)},m.theta=function(E){return arguments.length?(g=E*E,m):Math.sqrt(g)},m}function t7(n){var e=_n(.1),l,o,s;typeof n!="function"&&(n=_n(n==null?0:+n));function c(h){for(var g=0,m=l.length,p;g<m;++g)p=l[g],p.vx+=(s[g]-p.x)*o[g]*h}function d(){if(l){var h,g=l.length;for(o=new Array(g),s=new Array(g),h=0;h<g;++h)o[h]=isNaN(s[h]=+n(l[h],h,l))?0:+e(l[h],h,l)}}return c.initialize=function(h){l=h,d()},c.strength=function(h){return arguments.length?(e=typeof h=="function"?h:_n(+h),d(),c):e},c.x=function(h){return arguments.length?(n=typeof h=="function"?h:_n(+h),d(),c):n},c}function n7(n){var e=_n(.1),l,o,s;typeof n!="function"&&(n=_n(n==null?0:+n));function c(h){for(var g=0,m=l.length,p;g<m;++g)p=l[g],p.vy+=(s[g]-p.y)*o[g]*h}function d(){if(l){var h,g=l.length;for(o=new Array(g),s=new Array(g),h=0;h<g;++h)o[h]=isNaN(s[h]=+n(l[h],h,l))?0:+e(l[h],h,l)}}return c.initialize=function(h){l=h,d()},c.strength=function(h){return arguments.length?(e=typeof h=="function"?h:_n(+h),d(),c):e},c.y=function(h){return arguments.length?(n=typeof h=="function"?h:_n(+h),d(),c):n},c}const pc=mc({autoConnect:!1}),Sy=["FACT","DECISION","RULE","CORRECTION","INFERENCE","skill","note"],u0=340;function Uh(n){const e=Sy.indexOf(n);if(e<0)return{x:0,y:0};const l=e/Sy.length*Math.PI*2-Math.PI/2;return{x:Math.cos(l)*u0,y:Math.sin(l)*u0}}function _y(n,e,l){var g;if(!n.length)return n;const o=new Map;for(const m of e)o.set(m.source,(o.get(m.source)||0)+1),o.set(m.target,(o.get(m.target)||0)+1);const s=u0+260,c=n.filter(m=>!(o.get(m.id)>0));c.forEach((m,p)=>{const y=p/Math.max(1,c.length)*Math.PI*2;m.x=Math.cos(y)*s,m.y=Math.sin(y)*s});for(const m of n){if(o.get(m.id)>0){const p=Uh((g=m.data)==null?void 0:g.type);m.x=p.x+(Math.random()-.5)*160,m.y=p.y+(Math.random()-.5)*160}m.position||(m.position={x:m.x,y:m.y})}const d={repel:-90,linkDistance:70,centerStrength:.3,...l};WM(n).force("link",ZM(e.map(m=>({...m}))).id(m=>m.id).distance(d.linkDistance).strength(.35)).force("charge",e7().strength(d.repel)).force("center",YM(0,0).strength(d.centerStrength*.15)).force("clusterX",t7(m=>{var p;return o.get(m.id)>0?Uh((p=m.data)==null?void 0:p.type).x:m.x}).strength(.12)).force("clusterY",n7(m=>{var p;return o.get(m.id)>0?Uh((p=m.data)==null?void 0:p.type).y:m.y}).strength(.12)).force("collide",XM().radius(m=>l7(m,o)+14)).stop().tick(300);for(const m of n)m.position={x:m.x,y:m.y};return n}function i7(n,e,l){const o=new Map;for(const d of n)o.has(d.source)||o.set(d.source,[]),o.has(d.target)||o.set(d.target,[]),o.get(d.source).push(d.target),o.get(d.target).push(d.source);const s=new Set([e]);let c=[e];for(let d=0;d<l;d++){const h=[];for(const g of c)for(const m of o.get(g)||[])s.has(m)||(s.add(m),h.push(m));c=h}return s}function l7(n,e){const l=(e==null?void 0:e.get(n.id))||0;return 5+Math.min(9,l*1.4)}function sa(n,e){const l=new Map,o=new Map;for(const s of e)l.set(s.source,(l.get(s.source)||0)+1),l.set(s.target,(l.get(s.target)||0)+1),o.has(s.source)||o.set(s.source,new Set),o.has(s.target)||o.set(s.target,new Set),o.get(s.source).add(s.target),o.get(s.target).add(s.source);return{degree:l,adjacency:o}}function rb(n){const e=/conf\s+([0-9.]+)/.exec(n||"");return e?parseFloat(e[1]):null}function Oc(n){return n?typeof n.toArray=="function"?n.toArray():typeof n[Symbol.iterator]=="function"?[...n]:Array.isArray(n)?n:[]:[]}function a7(n,e){let l=e;for(const o of Oc(n))o.type==="position"&&o.position?l=l.map(s=>s.id===o.id?{...s,position:o.position}:s):o.type==="remove"?l=l.filter(s=>s.id!==o.id):o.type==="select"?l=l.map(s=>s.id===o.id?{...s,selected:o.selected}:s):o.type==="add"&&o.node&&(l=[...l,o.node]);return l}function o7(n,e){let l=e;for(const o of Oc(n))o.type==="remove"?l=l.filter(s=>s.id!==o.id):o.type==="select"?l=l.map(s=>s.id===o.id?{...s,selected:o.selected}:s):o.type==="add"&&o.edge&&(l=[...l,o.edge]);return l}const wy={FACT:"--fact",DECISION:"--decision",RULE:"--rule",CORRECTION:"--correction",INFERENCE:"--inference",skill:"--skill",note:"--note"},Ey=new Map;function Ja(n,e,l){if(!wy[n])return l||"#9b7bff";let s=Ey.get(e);if(!s&&typeof document<"u"){const c=getComputedStyle(document.documentElement);s={};for(const[d,h]of Object.entries(wy))s[d]=c.getPropertyValue(h).trim();Ey.set(e,s)}return(s==null?void 0:s[n])||l||"#9b7bff"}const ze=$E((n,e)=>({nodes:[],edges:[],indexes:{degree:new Map,adjacency:new Map},loading:!0,selectedId:null,hoverId:null,searchQuery:"",typeFilter:[],theme:"dark",localRootId:null,localDepth:2,showOrphans:!1,forces:{repel:-90,linkDistance:70,centerStrength:.3},rf:null,setNodes:l=>n({nodes:l,indexes:sa(l,e().edges)}),setEdges:l=>n({edges:l,indexes:sa(e().nodes,l)}),setSelectedId:l=>n({selectedId:l}),setHoverId:l=>n({hoverId:l}),setSearchQuery:l=>n({searchQuery:l}),toggleType:l=>n(o=>({typeFilter:o.typeFilter.includes(l)?o.typeFilter.filter(s=>s!==l):[...o.typeFilter,l]})),clearFilters:()=>n({typeFilter:[],searchQuery:""}),toggleTheme:()=>{const l=e().theme==="dark"?"light":"dark";document.documentElement.dataset.theme=l,n({theme:l})},setRf:l=>n({rf:l}),setLocalRoot:l=>n({localRootId:l,selectedId:l}),setLocalDepth:l=>n({localDepth:l}),exitLocal:()=>n({localRootId:null}),toggleOrphans:()=>n(l=>({showOrphans:!l.showOrphans})),setForces:l=>n(o=>({forces:{...o.forces,...l}})),view:"graph",setView:l=>n({view:l}),saveRecord:async(l,o)=>{const s=await fetch("/api/record",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:l,...o})}),c=await s.json();if(!s.ok)throw new Error(c.error||"save failed");return c},attachImage:async(l,o)=>{const s=await new Promise((h,g)=>{const m=new FileReader;m.onload=()=>h(m.result),m.onerror=()=>g(new Error("could not read file")),m.readAsDataURL(o)}),c=await fetch("/api/image",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({dataUrl:s})}),d=await c.json();if(!c.ok)throw new Error(d.error||"upload failed");return n({nodes:e().nodes.map(h=>h.id===l?{...h,data:{...h.data,image:d.url}}:h)}),e().persist(),d.url},removeImage:l=>{n({nodes:e().nodes.map(o=>{if(o.id!==l)return o;const s={...o.data};return delete s.image,{...o,data:s}})}),e().persist()},fitView:()=>{var l;return(l=e().rf)==null?void 0:l.fitView({padding:.2,duration:400})},relayout:()=>{const{nodes:l,edges:o,forces:s}=e();n({nodes:_y(l.map(c=>({...c})),o,s)}),setTimeout(()=>e().fitView(),50)},onNodesChange:l=>{const o=Oc(l),s=a7(o,e().nodes),c=o.some(d=>d.type==="remove"||d.type==="add");n(c?{nodes:s,indexes:sa(s,e().edges)}:{nodes:s}),o.some(d=>d.type==="remove")&&e().persist()},onEdgesChange:l=>{const o=Oc(l),s=o7(o,e().edges),c=o.some(d=>d.type==="remove"||d.type==="add");n(c?{edges:s,indexes:sa(e().nodes,s)}:{edges:s}),o.some(d=>d.type==="remove")&&e().persist()},onConnect:l=>{const o=[...e().edges,{...l,id:`e-${Date.now()}`}];n({edges:o,indexes:sa(e().nodes,o)}),e().persist()},onNodeDragStop:()=>e().persist(),loadGraph:async()=>{n({loading:!0});try{const o=await(await fetch("/api/graph")).json(),s=o.nodes||[],c=s.filter(p=>!p.position||!p.position.x&&!p.position.y),d=c.length?_y(c,o.edges||[]):[],h=new Map(d.map(p=>[p.id,p])),g=s.map(p=>h.get(p.id)||p),m=o.edges||[];n({nodes:g,edges:m,indexes:sa(g,m),loading:!1})}catch{n({loading:!1})}pc.connect()},persist:async()=>{const{nodes:l,edges:o}=e(),s=l.map(h=>({...h,selected:void 0,dragging:void 0})),c=o.map(h=>({...h,selected:void 0})),d={nodes:s,edges:c};pc.connected?pc.emit("graph:update",d):await fetch("/api/graph",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(d)})}}));pc.on("graph:updated",n=>{const e=n.nodes||[],l=n.edges||[];ze.setState({nodes:e,edges:l,indexes:sa(e,l)})});const r7=new EventSource("/events");r7.addEventListener("graph:updated",n=>{const e=JSON.parse(n.data),l=e.nodes||[],o=e.edges||[];ze.setState({nodes:l,edges:o,indexes:sa(l,o)})});const Ny=["FACT","DECISION","RULE","CORRECTION","INFERENCE","skill"];function s7(){const n=ze(p=>p.showOrphans),e=ze(p=>p.toggleOrphans),l=ze(p=>p.forces),o=ze(p=>p.setForces),s=ze(p=>p.relayout),c=ze(p=>p.localRootId),d=ze(p=>p.localDepth),h=ze(p=>p.setLocalDepth),m=ze(p=>p.nodes).find(p=>p.id===c);return D.jsxs("div",{role:"dialog","aria-label":"Graph settings",className:"absolute top-16 right-4 w-72 glass-strong glass-blur rounded-2xl z-20 p-3 pointer-events-auto space-y-4",children:[D.jsxs("div",{className:"flex items-center justify-between",children:[D.jsx("span",{className:"text-[12px] font-semibold text-[var(--text-muted)]",children:"Graph settings"}),D.jsx("button",{onClick:s,className:"text-[11px] px-2 py-0.5 rounded border border-[var(--border)] hover:border-[var(--accent)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",children:"Apply forces"})]}),D.jsxs("section",{className:"space-y-1.5","aria-label":"Forces",children:[D.jsx("div",{className:"text-[10px] uppercase tracking-wide text-[var(--text-muted)]",children:"Forces"}),[["Repel force","repel",-600,-20,10],["Link distance","linkDistance",30,300,1],["Center force","centerStrength",0,1,.05]].map(([p,y,v,E,w])=>D.jsxs("label",{className:"flex items-center gap-2 text-[12px]",children:[D.jsx("span",{className:"w-24 text-[var(--text-muted)]",children:p}),D.jsx("input",{type:"range",min:v,max:E,step:w,value:l[y],onChange:b=>o({[y]:Number(b.target.value)}),"aria-label":p,className:"flex-1 accent-[var(--accent)]"}),D.jsx("span",{className:"w-10 text-right font-mono text-[11px] text-[var(--text-muted)]",children:l[y]})]},y))]}),D.jsxs("section",{className:"space-y-1.5","aria-label":"Filters",children:[D.jsx("div",{className:"text-[10px] uppercase tracking-wide text-[var(--text-muted)]",children:"Filters"}),D.jsxs("label",{className:"flex items-center gap-2 text-[12px] cursor-pointer",children:[D.jsx("input",{type:"checkbox",checked:n,onChange:e,className:"accent-[var(--accent)]"}),"Show orphans",D.jsx("span",{className:"text-[10px] text-[var(--text-muted)]",children:"(nodes without links)"})]})]}),c&&D.jsxs("section",{className:"space-y-1","aria-label":"Local graph",children:[D.jsx("div",{className:"text-[10px] uppercase tracking-wide text-[var(--text-muted)]",children:"Local graph"}),D.jsxs("div",{className:"text-[11px] text-[var(--text-muted)] truncate",title:m==null?void 0:m.data.label,children:["Root: ",(m==null?void 0:m.data.label)||c]}),D.jsxs("label",{className:"flex items-center gap-2 text-[12px]",children:[D.jsx("span",{className:"w-14 text-[var(--text-muted)]",children:"Depth"}),D.jsx("input",{type:"range",min:1,max:5,step:1,value:d,onChange:p=>h(Number(p.target.value)),"aria-label":"Local graph depth",className:"flex-1 accent-[var(--accent)]"}),D.jsx("span",{className:"w-4 text-right font-mono text-[11px] text-[var(--text-muted)]",children:d})]}),D.jsx("button",{onClick:exitLocal,className:"text-[11px] px-2 py-1 rounded border border-[var(--border)] hover:border-[var(--accent)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",children:"Back to global graph"})]})]})}function Cy(){const{nodes:n,edges:e,persist:l,setNodes:o,searchQuery:s,setSearchQuery:c}=ze(),d=ze(C=>C.typeFilter),h=ze(C=>C.toggleType),g=ze(C=>C.theme),m=ze(C=>C.toggleTheme),p=ze(C=>C.relayout),y=ze(C=>C.fitView),v=ze(C=>C.view),E=ze(C=>C.setView),[w,b]=de.useState(!1),_=de.useMemo(()=>{const C=new Map;for(const T of n){const L=T.data.type||"note";C.set(L,(C.get(L)||0)+1)}const M=Ny.filter(T=>C.has(T)).map(T=>[T,C.get(T)]),S=[...C.entries()].filter(([T])=>!Ny.includes(T));return[...M,...S]},[n]),N=()=>{const C=`n-${Date.now()}`;o([...n,{id:C,type:"graphNode",position:{x:200+Math.random()*200,y:200+Math.random()*200},data:{label:"New node",type:"note",color:"#7c3aed"}}]),setTimeout(l,0)};return D.jsxs("div",{className:"absolute top-4 left-4 right-4 flex items-center gap-2 z-10 pointer-events-none flex-wrap",children:[D.jsxs("div",{className:"flex items-center gap-1.5 glass glass-blur rounded-xl px-2.5 py-1.5 pointer-events-auto",children:[D.jsx(dy,{size:15,className:"text-[var(--accent)]"}),D.jsx("span",{className:"text-[13px] font-semibold",children:"honcho-pi"}),D.jsxs("span",{className:"text-[11px] text-[var(--text-muted)] ml-1 font-meta",children:[n.length," nodes · ",e.length," edges"]})]}),D.jsxs("div",{className:"flex items-center gap-1.5 glass glass-blur rounded-xl px-2 py-1.5 pointer-events-auto",children:[D.jsx(N8,{size:14,className:"text-[var(--text-muted)]"}),D.jsx("input",{"data-testid":"search-input",value:s,onChange:C=>c(C.target.value),placeholder:"filter nodes...","aria-label":"Filter nodes by label",className:"bg-transparent outline-none text-[12px] w-44 placeholder:text-[var(--text-muted)] focus-visible:ring-1 focus-visible:ring-[var(--accent)] rounded"})]}),D.jsx("div",{className:"flex items-center gap-1 glass glass-blur rounded-xl px-1.5 py-1.5 pointer-events-auto",role:"group","aria-label":"Filter by record type",children:_.map(([C,M])=>{var L;const S=!d.length||d.includes(C),T=Ja(C,g,(L=n.find(R=>R.data.type===C))==null?void 0:L.data.color);return D.jsxs("button",{"data-testid":`filter-${C}`,onClick:()=>h(C),"aria-pressed":d.includes(C),"aria-label":`Filter ${C}, ${M} nodes`,className:"flex items-center gap-1 text-[10px] px-1.5 py-0.5 rounded-full border transition-opacity focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",style:{borderColor:S?T:"var(--border)",color:S?T:"var(--text-muted)",opacity:S?1:void 0},title:`${C}: ${M} nodes`,children:[D.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:T}}),C," ",D.jsx("span",{className:"text-[var(--text-muted)]",children:M})]},C)})}),D.jsx("div",{className:"flex-1"}),D.jsxs("div",{className:"flex items-center gap-1 glass glass-blur rounded-xl p-1 pointer-events-auto",children:[D.jsx("button",{"data-testid":"toggle-dashboard",onClick:()=>E(v==="dashboard"?"graph":"dashboard"),"aria-label":v==="dashboard"?"Back to graph":"Open dashboard","aria-pressed":v==="dashboard",className:`p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] ${v==="dashboard"?"text-[var(--accent)]":""}`,title:v==="dashboard"?"Back to graph":"Dashboard: store health",children:v==="dashboard"?D.jsx(dy,{size:16}):D.jsx(p8,{size:16})}),D.jsx("button",{"data-testid":"add-node",onClick:N,"aria-label":"Add node",className:"p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Add node",children:D.jsx(_8,{size:16})}),D.jsx("button",{onClick:p,"aria-label":"Re-run force layout",className:"p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Re-run force layout",children:D.jsx(w8,{size:16})}),D.jsx("button",{onClick:y,"aria-label":"Zoom to fit",className:"p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Zoom to fit",children:D.jsx(v8,{size:16})}),D.jsx("button",{onClick:l,"aria-label":"Save graph",className:"p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Save",children:D.jsx(E8,{size:16})}),D.jsx("button",{onClick:m,"aria-label":`Switch to ${g==="dark"?"light":"dark"} theme`,className:"p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Toggle theme",children:g==="dark"?D.jsx(T8,{size:16}):D.jsx(x8,{size:16})}),D.jsx("button",{onClick:()=>b(!w),"aria-label":"Graph settings","aria-expanded":w,className:`p-1.5 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] ${w?"text-[var(--accent)]":""}`,title:"Graph settings",children:D.jsx(M8,{size:16})})]}),w&&D.jsx(s7,{})]})}const u7=["#7c3aed","#06b6d4","#10b981","#f59e0b","#ef4444","#ec4899","#6366f1"];function c7(){var B;const{nodes:n,edges:e,selectedId:l,setNodes:o,setSelectedId:s,persist:c,theme:d}=ze(),h=n.find(k=>k.id===l),g=de.useRef(null),m=!!h,p=ze(k=>k.saveRecord),y=ze(k=>k.attachImage),v=ze(k=>k.removeImage),E=de.useRef(null),[w,b]=de.useState(null),[_,N]=de.useState(!1),[C,M]=de.useState(""),[S,T]=de.useState(""),[L,R]=de.useState(""),H=!!l&&l.startsWith("mem-");de.useEffect(()=>{if(b(null),N(!1),R(""),!H)return;let k=!0;return fetch(`/api/record/${l.slice(4)}`).then(U=>U.ok?U.json():null).then(U=>{k&&b(U)}).catch(()=>{}),()=>{k=!1}},[l,H]);const z=()=>{M((w==null?void 0:w.content)||(h==null?void 0:h.data.label)||""),T((w==null?void 0:w.evidence)||""),N(!0),R("")},Y=async()=>{if(C.length>2e4){R(`save failed: content exceeds 20000 chars (${C.length})`);return}try{const k=await p(l.slice(4),{content:C,evidence:S});b(k),N(!1),R("saved to store (correction logged)")}catch(k){R(`save failed: ${k.message}`)}},Z=async k=>{var Q;const U=(Q=k.target.files)==null?void 0:Q[0];if(k.target.value="",!(!U||!h))try{R("uploading image..."),await y(h.id,U),R("image attached")}catch(P){R(`image failed: ${P.message}`)}};de.useEffect(()=>{var k;m&&((k=g.current)==null||k.focus())},[l]),de.useEffect(()=>{if(!m)return;const k=U=>{U.key==="Escape"&&s(null)};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[m,s]);const I=de.useMemo(()=>{if(!h)return[];const k=new Set;for(const U of e)U.source===h.id&&k.add(U.target),U.target===h.id&&k.add(U.source);return n.filter(U=>k.has(U.id)).map(U=>({id:U.id,label:U.data.label,color:Ja(U.data.type,d,U.data.color)}))},[e,n,h,d]);if(!h)return null;const G=rb(h.data.meta),j=Ja(h.data.type,d,h.data.color),X=k=>{o(n.map(U=>U.id===h.id?{...U,data:{...U.data,...k}}:U)),c()};return D.jsxs("div",{role:"dialog","aria-label":`Record details: ${h.data.label||h.id}`,className:"absolute top-16 right-4 w-80 max-h-[calc(100%-5rem)] glass-strong glass-blur rounded-2xl z-20 overflow-hidden flex flex-col",children:[D.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-[var(--border)] shrink-0",children:[D.jsx("span",{className:"text-[12px] font-semibold text-[var(--text-muted)]",children:"Record details"}),D.jsx("button",{ref:g,onClick:()=>s(null),"aria-label":"Close details",className:"p-1 rounded hover:bg-[var(--surface-2)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",children:D.jsx(R8,{size:14})})]}),D.jsxs("div",{className:"p-3 space-y-3 overflow-y-auto",children:[D.jsxs("div",{className:"flex items-center gap-2",children:[D.jsx("span",{className:"text-[10px] font-semibold px-1.5 py-0.5 rounded",style:{background:`${j}22`,color:j},children:h.data.type||"page"}),G!==null&&D.jsxs("span",{className:"text-[10px] text-[var(--text-muted)]",children:["confidence ",G.toFixed(2)]}),((B=h.data.meta)==null?void 0:B.includes("verified"))&&D.jsx("span",{className:"text-[10px] text-emerald-400",style:d==="light"?{color:"#047857"}:void 0,children:"verified"})]}),h.data.image&&D.jsxs("div",{className:"relative",children:[D.jsx("img",{src:h.data.image,alt:h.data.label||"attached image",className:"w-full rounded border border-[var(--border)] max-h-48 object-cover"}),D.jsx("button",{onClick:()=>v(h.id),"aria-label":"Remove image",className:"absolute top-1 right-1 p-1 rounded bg-[var(--surface)] border border-[var(--border)] hover:border-[var(--accent)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",children:D.jsx(O8,{size:12})})]}),D.jsxs("div",{children:[D.jsxs("div",{className:"flex items-center justify-between mb-1",children:[D.jsx("span",{className:"text-[10px] uppercase tracking-wide text-[var(--text-muted)]",children:"Content"}),D.jsxs("span",{className:"flex items-center gap-1",children:[H&&!_&&D.jsx("button",{"data-testid":"edit-record",onClick:z,"aria-label":"Edit record content",className:"p-1 rounded hover:bg-[var(--surface-2)] text-[var(--text-muted)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Edit content (writes to the memory store)",children:D.jsx(S8,{size:12})}),_&&D.jsx("button",{"data-testid":"save-record",onClick:Y,"aria-label":"Save record content",className:"p-1 rounded hover:bg-[var(--surface-2)] text-[var(--fact)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Save to store",children:D.jsx(g8,{size:12})}),D.jsx("button",{"data-testid":"attach-image",onClick:()=>{var k;return(k=E.current)==null?void 0:k.click()},"aria-label":"Attach image",className:"p-1 rounded hover:bg-[var(--surface-2)] text-[var(--text-muted)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:"Attach image to this node",children:D.jsx(m8,{size:12})}),D.jsx("input",{ref:E,type:"file",accept:"image/png,image/jpeg,image/webp,image/gif",className:"hidden",onChange:Z,"aria-hidden":"true",tabIndex:-1})]})]}),_?D.jsxs(D.Fragment,{children:[D.jsx("textarea",{"data-testid":"record-editor",value:C,onChange:k=>M(k.target.value),rows:8,maxLength:2e4,className:"w-full text-[12px] leading-relaxed bg-[var(--surface-2)] border border-[var(--accent)] rounded p-2 whitespace-pre-wrap font-mono outline-none resize-y"}),D.jsx("input",{"data-testid":"evidence-input",value:S,onChange:k=>T(k.target.value),placeholder:"evidence: why this edit is right (required unless verified)",className:"w-full mt-1 bg-[var(--surface-2)] border border-[var(--border)] rounded px-2 py-1.5 text-[11px] outline-none focus:border-[var(--accent)]"}),D.jsxs("div",{className:"text-[10px] mt-1 text-[var(--text-muted)]",children:[C.length,"/20000 · a content change is logged as a correction and needs evidence or verified status"]})]}):D.jsx("div",{className:"text-[12px] leading-relaxed bg-[var(--surface-2)] border border-[var(--border)] rounded p-2 max-h-40 overflow-y-auto whitespace-pre-wrap font-mono",children:(w==null?void 0:w.content)||h.data.label||"(no content)"}),L&&D.jsx("div",{role:"status",className:"text-[10px] mt-1 text-[var(--text-muted)]",children:L})]}),(w==null?void 0:w.evidence)&&D.jsxs("div",{children:[D.jsx("div",{className:"text-[10px] uppercase tracking-wide text-[var(--text-muted)] mb-1",children:"Evidence"}),D.jsx("div",{className:"text-[11px] text-[var(--text-muted)] whitespace-pre-wrap",children:w.evidence})]}),h.data.meta&&D.jsxs("div",{children:[D.jsx("div",{className:"text-[10px] uppercase tracking-wide text-[var(--text-muted)] mb-1",children:"Provenance"}),D.jsx("div",{className:"text-[11px] text-[var(--text-muted)]",children:h.data.meta})]}),I.length>0&&D.jsxs("div",{children:[D.jsxs("div",{className:"flex items-center gap-1 text-[10px] uppercase tracking-wide text-[var(--text-muted)] mb-1",children:[D.jsx(y8,{size:10})," Connected (",I.length,")"]}),D.jsx("div",{className:"flex flex-wrap gap-1",children:I.slice(0,8).map(k=>D.jsx("button",{onClick:()=>s(k.id),className:"text-[10px] px-1.5 py-0.5 rounded border border-[var(--border)] hover:border-[var(--accent)] truncate max-w-[140px] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",style:{color:k.color},title:k.label,children:k.label},k.id))})]}),D.jsxs("div",{children:[D.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-[var(--text-muted)] mb-1",children:[D.jsx(z8,{size:12})," Graph label"]}),D.jsx("input",{"data-testid":"label-input",value:h.data.label||"",onChange:k=>X({label:k.target.value,customLabel:!0}),className:"w-full bg-[var(--surface-2)] border border-[var(--border)] rounded px-2 py-1.5 text-[13px] outline-none focus:border-[var(--accent)] focus-visible:ring-1 focus-visible:ring-[var(--accent)]"})]}),!H&&D.jsxs(D.Fragment,{children:[D.jsxs("div",{children:[D.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-[var(--text-muted)] mb-1",children:[D.jsx(A8,{size:12})," Meta"]}),D.jsx("input",{"data-testid":"meta-input",value:h.data.meta||"",onChange:k=>X({meta:k.target.value}),placeholder:"optional note",className:"w-full bg-[var(--surface-2)] border border-[var(--border)] rounded px-2 py-1.5 text-[13px] outline-none focus:border-[var(--accent)] focus-visible:ring-1 focus-visible:ring-[var(--accent)]"})]}),D.jsxs("div",{children:[D.jsxs("label",{className:"flex items-center gap-1.5 text-[11px] text-[var(--text-muted)] mb-1",children:[D.jsx(b8,{size:12})," Color"]}),D.jsx("div",{className:"flex gap-1.5",children:u7.map(k=>D.jsx("button",{onClick:()=>X({color:k}),"aria-label":`Set color ${k}`,"aria-pressed":h.data.color===k,className:`w-6 h-6 rounded-full border-2 focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] ${h.data.color===k?"border-white":"border-transparent"}`,style:{background:k}},k))})]})]}),D.jsx("div",{className:"text-[10px] text-[var(--text-muted)] font-mono truncate",title:h.id,children:h.id})]})]})}function f7(){const n=rr(["Delete","Backspace"]),e=Gc(),{nodes:l,edges:o,setNodes:s,setEdges:c,persist:d}=ze();return de.useEffect(()=>{if(!n)return;const h=l.filter(p=>p.selected).map(p=>p.id),g=o.filter(p=>p.selected).map(p=>p.id),m=new Set(h);o.forEach(p=>{(m.has(p.source)||m.has(p.target))&&g.push(p.id)}),!(!h.length&&!g.length)&&(s(l.filter(p=>!m.has(p.id))),c(o.filter(p=>!g.includes(p.id))),d())},[n,l,o,s,c,d]),de.useEffect(()=>{const h=g=>{if(!e)return;const m=g.target;if(m&&(m.tagName==="INPUT"||m.tagName==="TEXTAREA"))return;const p=g.shiftKey?120:40;switch(g.key){case"ArrowLeft":e.setViewport(y=>({...y,x:y.x+p}));break;case"ArrowRight":e.setViewport(y=>({...y,x:y.x-p}));break;case"ArrowUp":e.setViewport(y=>({...y,y:y.y+p}));break;case"ArrowDown":e.setViewport(y=>({...y,y:y.y-p}));break;case"+":case"=":e.zoomIn({duration:150});break;case"-":e.zoomOut({duration:150});break;default:return}g.preventDefault()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[e]),null}function d7({id:n,data:e,selected:l}){const o=ze(z=>z.hoverId),s=ze(z=>z.selectedId),c=ze(z=>z.setHoverId),d=ze(z=>z.searchQuery),h=ze(z=>z.typeFilter),g=ze(z=>z.theme),m=ze(z=>z.setSelectedId),p=ze(z=>z.indexes.degree.get(n)||0),y=o||s,v=ze(z=>{var Y;return!!y&&(((Y=z.indexes.adjacency.get(y))==null?void 0:Y.has(n))||!1)}),E=ai(z=>z.transform[2]>.75),w=!!y&&n!==y&&!v,b=5+Math.min(9,p*1.4),_=rb(e.meta),N=d.toLowerCase(),C=!N||(e.label||"").toLowerCase().includes(N),M=!h.length||h.includes(e.type),S=!C||!M,T=_!==null?.45+.55*_:1,L=w?.15:S?.18:T,R=Ja(e.type,g,e.color),H=l||o===n;return D.jsxs("button",{type:"button",className:"group relative flex items-center justify-center transition-opacity rounded-full focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--bg)]",style:{opacity:L},"aria-label":`${e.type||"node"}: ${e.label||n}${_!==null?`, confidence ${_.toFixed(2)}`:""}`,"aria-pressed":l,onClick:()=>m(n),onMouseEnter:()=>c(n),onMouseLeave:()=>c(null),onFocus:()=>c(n),onBlur:()=>c(null),children:[D.jsx(sr,{type:"target",position:Xt.Top,className:"!w-px !h-px !border-0 !opacity-0"}),e.image?D.jsx("img",{src:e.image,alt:"",draggable:!1,className:`rounded-full object-cover transition-all ${l?"ring-2 ring-offset-2 ring-offset-[var(--bg)]":""}`,style:{width:Math.max(28,b*2.4),height:Math.max(28,b*2.4),border:`2px solid ${R}`,boxShadow:H?`0 0 10px 1px color-mix(in srgb, ${R} 70%, transparent)`:"none",...l?{"--tw-ring-color":R}:{}}}):D.jsx("div",{className:`rounded-full transition-all ${l?"ring-2 ring-offset-2 ring-offset-[var(--bg)]":""}`,style:{width:b*2,height:b*2,background:R,boxShadow:H?`0 0 10px 1px color-mix(in srgb, ${R} 70%, transparent)`:`0 0 6px 0 color-mix(in srgb, ${R} 35%, transparent)`,...l?{"--tw-ring-color":R}:{}}}),(E&&p>=4||y===n||v||l||N&&C)&&D.jsx("div",{className:"node-label absolute left-full ml-2 whitespace-nowrap text-[11px] pointer-events-none select-none max-w-[140px] truncate",style:{color:"var(--text)",opacity:y&&!w?1:.8},title:e.label,children:D.jsx(g7,{text:e.label,query:C?d:""})}),D.jsx(sr,{type:"source",position:Xt.Bottom,className:"!w-px !h-px !border-0 !opacity-0"})]})}const h7=de.memo(d7);function g7({text:n,query:e}){if(!e)return n;const l=n.toLowerCase().indexOf(e.toLowerCase());return l<0?n:D.jsxs(D.Fragment,{children:[n.slice(0,l),D.jsx("mark",{children:n.slice(l,l+e.length)}),n.slice(l+e.length)]})}function cs({label:n,value:e,max:l,color:o}){return D.jsxs("div",{className:"flex items-center gap-2 text-[12px]",children:[D.jsx("span",{className:"w-24 shrink-0 text-[var(--text-muted)] truncate",children:n}),D.jsx("div",{className:"flex-1 h-3 rounded-sm bg-[var(--surface-2)] overflow-hidden",children:D.jsx("div",{className:"h-full rounded-sm",style:{width:`${l?e/l*100:0}%`,background:o}})}),D.jsx("span",{className:"w-10 text-right font-meta text-[11px]",children:e})]})}function m7(){const n=ze(b=>b.theme),e=ze(b=>b.setView),l=ze(b=>b.setSelectedId),o=ze(b=>b.nodes),[s,c]=de.useState(null),[d,h]=de.useState("");if(de.useEffect(()=>{let b=!0;return fetch("/api/stats").then(_=>{if(!_.ok)throw new Error(`stats ${_.status}`);return _.json()}).then(_=>{b&&c(_)}).catch(_=>{b&&h(_.message)}),()=>{b=!1}},[]),d)return D.jsxs("div",{className:"h-full flex flex-col items-center justify-center gap-2 text-[13px] text-[var(--text-muted)]",children:[D.jsxs("p",{children:["Stats unavailable: ",d,"."]}),D.jsxs("p",{children:["Start the store server: ",D.jsx("code",{className:"font-meta",children:"bash bin/overview.sh --port 4174"})]})]});if(!s)return D.jsx("div",{className:"h-full flex items-center justify-center text-[13px] text-[var(--text-muted)]",children:"loading store stats..."});const g=Object.entries(s.store).filter(([b,_])=>typeof _=="number"&&_>0&&b===b.toUpperCase()&&b!=="total").sort((b,_)=>_[1]-b[1]),m=Math.max(...g.map(([,b])=>b),1),p=Math.max(...s.activity.map(b=>b.count),1),y=s.confidence,v=y.low+y.mid+y.high||1,E=s.graph,w=b=>{o.some(_=>_.id===b)&&(l(b),e("graph"))};return D.jsxs("div",{className:"relative h-full overflow-y-auto px-6 py-5 pt-16",children:[D.jsx("div",{"aria-hidden":"true",className:"fixed inset-0 pointer-events-none",style:{background:"radial-gradient(900px 600px at 75% 15%, color-mix(in srgb, var(--glow-a) 60%, transparent), transparent 72%),radial-gradient(1000px 700px at 15% 90%, color-mix(in srgb, var(--glow-b) 55%, transparent), transparent 72%)"}}),D.jsxs("div",{className:"relative max-w-4xl mx-auto space-y-6",children:[D.jsxs("div",{className:"glass rounded-2xl px-5 py-3 flex flex-wrap gap-x-8 gap-y-2 font-meta text-[12px] text-[var(--text-muted)]",children:[D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:s.store.total})," records"]}),D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:s.store.verified})," verified"]}),D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:s.auto_captured})," auto-captured"]}),D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:E.nodes})," nodes"]}),D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:E.edges})," threads"]}),D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:E.orphans})," unlinked"]}),D.jsxs("span",{children:[D.jsx("b",{className:"text-[var(--text)] text-[16px]",children:s.store.reinforcements})," reinforcements"]})]}),D.jsxs("div",{className:"grid md:grid-cols-2 gap-6",children:[D.jsxs("section",{"aria-label":"Records by type",className:"glass rounded-2xl p-4 space-y-1.5",children:[D.jsx("h2",{className:"text-[11px] uppercase tracking-wide text-[var(--text-muted)] mb-2",children:"Records by type"}),g.map(([b,_])=>D.jsx(cs,{label:b,value:_,max:m,color:Ja(b,n)},b))]}),D.jsxs("section",{"aria-label":"Confidence distribution",className:"glass rounded-2xl p-4 space-y-1.5",children:[D.jsx("h2",{className:"text-[11px] uppercase tracking-wide text-[var(--text-muted)] mb-2",children:"Confidence"}),D.jsx(cs,{label:"< 0.40 (cold)",value:y.low,max:v,color:"var(--correction)"}),D.jsx(cs,{label:"0.40 - 0.69",value:y.mid,max:v,color:"var(--inference)"}),D.jsx(cs,{label:">= 0.70 (hot)",value:y.high,max:v,color:"var(--fact)"}),D.jsx("p",{className:"text-[11px] text-[var(--text-muted)] pt-1",children:"Cold records decay toward forgetting; hot ones survive. A store dominated by cold rows needs reinforcement, not more capture."})]}),D.jsxs("section",{"aria-label":"Capture activity",className:"glass rounded-2xl p-4 space-y-1.5",children:[D.jsx("h2",{className:"text-[11px] uppercase tracking-wide text-[var(--text-muted)] mb-2",children:"New records per day (last 14 active days)"}),s.activity.map(b=>D.jsx(cs,{label:b.day.slice(5),value:b.count,max:p,color:"var(--accent)"},b.day))]}),D.jsxs("section",{"aria-label":"Most connected nodes",className:"glass rounded-2xl p-4",children:[D.jsx("h2",{className:"text-[11px] uppercase tracking-wide text-[var(--text-muted)] mb-2",children:"Most connected"}),D.jsx("div",{className:"space-y-1",children:E.top_connected.map(b=>D.jsxs("button",{onClick:()=>w(b.id),className:"w-full flex items-center gap-2 text-[12px] px-2 py-1 rounded hover:bg-[var(--surface-2)] text-left focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",title:`Open ${b.label} in the graph`,children:[D.jsx("span",{className:"w-2 h-2 rounded-full shrink-0",style:{background:Ja(b.type,n)}}),D.jsx("span",{className:"flex-1 truncate",children:b.label}),D.jsx("span",{className:"font-meta text-[11px] text-[var(--text-muted)]",children:b.degree})]},b.id))})]})]})]})]})}const p7={graphNode:h7};function y7(){const{edges:n,loading:e,onEdgesChange:l,onConnect:o,loadGraph:s,selectedId:c,setSelectedId:d,theme:h}=ze(),g=ze(Y=>Y.nodes),m=ze(Y=>Y.typeFilter),p=ze(Y=>Y.searchQuery),y=ze(Y=>Y.setRf),v=ze(Y=>Y.setLocalRoot),E=ze(Y=>Y.view),w=ze(Y=>Y.clearFilters);de.useEffect(()=>{s()},[s]);const b=p.toLowerCase(),_=ze(Y=>Y.localRootId),N=ze(Y=>Y.localDepth),C=ze(Y=>Y.showOrphans),M=de.useMemo(()=>_?i7(n,_,N):null,[n,_,N]),S=ze(Y=>Y.indexes.degree),T=de.useMemo(()=>{let Y=g;return M&&(Y=Y.filter(Z=>M.has(Z.id))),C||(Y=Y.filter(Z=>(S.get(Z.id)||0)>0)),(m.length||b)&&(Y=Y.filter(Z=>{const I=!m.length||m.includes(Z.data.type),G=!b||(Z.data.label||"").toLowerCase().includes(b);return I&&G})),Y},[g,M,C,S,m,b]),L=de.useMemo(()=>new Set(T.map(Y=>Y.id)),[T]),R=de.useMemo(()=>n.filter(Y=>L.has(Y.source)&&L.has(Y.target)),[n,L]),H=ze(Y=>Y.hoverId)||c,z=de.useMemo(()=>R.map(Y=>{const Z=!!H&&(Y.source===H||Y.target===H);return{...Y,label:void 0,labelStyle:void 0,labelBgStyle:void 0,animated:!1,style:{stroke:Z?"var(--accent)":"var(--edge)",strokeWidth:Z?1.4:1,vectorEffect:"non-scaling-stroke",opacity:H?Z?.95:.05:.55,filter:Z?"drop-shadow(0 0 3px var(--accent))":void 0}}}),[R,H]);return e?D.jsx("div",{className:"flex items-center justify-center h-full text-[var(--text-muted)]",children:"loading graph..."}):E==="dashboard"?D.jsxs("div",{className:"relative h-full w-full",children:[D.jsx(m7,{}),D.jsx(Cy,{})]}):D.jsxs("div",{className:"relative h-full w-full",children:[D.jsxs(SC,{nodes:T,edges:z,nodeTypes:p7,onNodesChange:ze.getState().onNodesChange,onEdgesChange:l,onConnect:o,onNodeClick:(Y,Z)=>d(Z.id),onNodeDoubleClick:(Y,Z)=>v(Z.id),onPaneClick:()=>d(null),onNodeMouseEnter:(Y,Z)=>ze.getState().setHoverId(Z.id),onNodeMouseLeave:()=>ze.getState().setHoverId(null),onInit:y,fitView:!0,minZoom:.05,maxZoom:2,onlyRenderVisibleElements:!0,edgesFocusable:!1,nodesDraggable:!0,children:[D.jsx(MC,{color:"transparent"}),D.jsx(kC,{position:"bottom-right",showInteractive:!1}),D.jsx(t8,{position:"bottom-left",pannable:!0,zoomable:!0,nodeColor:Y=>{var Z,I;return Ja((Z=Y.data)==null?void 0:Z.type,h,(I=Y.data)==null?void 0:I.color)},nodeBorderRadius:6,maskColor:"var(--mask)",style:{width:160,height:110,background:"var(--glass)"}})]}),T.length===0&&D.jsxs("div",{role:"status",className:"absolute inset-0 flex flex-col items-center justify-center gap-2 pointer-events-none z-10",children:[D.jsx(C8,{size:28,className:"text-[var(--text-muted)]"}),D.jsxs("p",{className:"text-[13px] text-[var(--text-muted)]",children:["No nodes match ",p?`"${p}"`:"the current filters","."]}),D.jsx("button",{onClick:w,className:"pointer-events-auto text-[12px] px-3 py-1.5 rounded border border-[var(--border)] hover:border-[var(--accent)] focus:outline-none focus-visible:ring-2 focus-visible:ring-[var(--accent)]",children:"Clear filters"})]}),D.jsx(Cy,{}),D.jsx(c7,{}),D.jsx(f7,{})]})}QS.createRoot(document.getElementById("root")).render(D.jsx(lc.StrictMode,{children:D.jsx(_x,{children:D.jsx(y7,{})})}));