function sf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var y0={exports:{}},os={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var P1=Symbol.for("react.transitional.element"),tS=Symbol.for("react.fragment");function g0(t,e,n){var l=null;if(n!==void 0&&(l=""+n),e.key!==void 0&&(l=""+e.key),"key"in e){n={};for(var a in e)a!=="key"&&(n[a]=e[a])}else n=e;return e=n.ref,{$$typeof:P1,type:t,key:l,ref:e!==void 0?e:null,props:n}}os.Fragment=tS;os.jsx=g0;os.jsxs=g0;y0.exports=os;var O=y0.exports,p0={exports:{}},rs={},v0={exports:{}},S0={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */(function(t){function e(E,M){var U=E.length;E.push(M);t:for(;0<U;){var A=U-1>>>1,j=E[A];if(0<a(j,M))E[A]=M,E[U]=j,U=A;else break t}}function n(E){return E.length===0?null:E[0]}function l(E){if(E.length===0)return null;var M=E[0],U=E.pop();if(U!==M){E[0]=U;t:for(var A=0,j=E.length,Y=j>>>1;A<Y;){var X=2*(A+1)-1,Q=E[X],Z=X+1,K=E[Z];if(0>a(Q,U))Z<j&&0>a(K,Q)?(E[A]=K,E[Z]=U,A=Z):(E[A]=Q,E[X]=U,A=X);else if(Z<j&&0>a(K,U))E[A]=K,E[Z]=U,A=Z;else break t}}return M}function a(E,M){var U=E.sortIndex-M.sortIndex;return U!==0?U:E.id-M.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var i=performance;t.unstable_now=function(){return i.now()}}else{var u=Date,c=u.now();t.unstable_now=function(){return u.now()-c}}var s=[],o=[],r=1,f=null,d=3,h=!1,g=!1,p=!1,b=!1,m=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,v=typeof setImmediate<"u"?setImmediate:null;function S(E){for(var M=n(o);M!==null;){if(M.callback===null)l(o);else if(M.startTime<=E)l(o),M.sortIndex=M.expirationTime,e(s,M);else break;M=n(o)}}function _(E){if(p=!1,S(E),!g)if(n(s)!==null)g=!0,N||(N=!0,G());else{var M=n(o);M!==null&&C(_,M.startTime-E)}}var N=!1,w=-1,H=5,z=-1;function L(){return b?!0:!(t.unstable_now()-z<H)}function R(){if(b=!1,N){var E=t.unstable_now();z=E;var M=!0;try{t:{g=!1,p&&(p=!1,y(w),w=-1),h=!0;var U=d;try{e:{for(S(E),f=n(s);f!==null&&!(f.expirationTime>E&&L());){var A=f.callback;if(typeof A=="function"){f.callback=null,d=f.priorityLevel;var j=A(f.expirationTime<=E);if(E=t.unstable_now(),typeof j=="function"){f.callback=j,S(E),M=!0;break e}f===n(s)&&l(s),S(E)}else l(s);f=n(s)}if(f!==null)M=!0;else{var Y=n(o);Y!==null&&C(_,Y.startTime-E),M=!1}}break t}finally{f=null,d=U,h=!1}M=void 0}}finally{M?G():N=!1}}}var G;if(typeof v=="function")G=function(){v(R)};else if(typeof MessageChannel<"u"){var V=new MessageChannel,x=V.port2;V.port1.onmessage=R,G=function(){x.postMessage(null)}}else G=function(){m(R,0)};function C(E,M){w=m(function(){E(t.unstable_now())},M)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(E){E.callback=null},t.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<E?Math.floor(1e3/E):5},t.unstable_getCurrentPriorityLevel=function(){return d},t.unstable_next=function(E){switch(d){case 1:case 2:case 3:var M=3;break;default:M=d}var U=d;d=M;try{return E()}finally{d=U}},t.unstable_requestPaint=function(){b=!0},t.unstable_runWithPriority=function(E,M){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var U=d;d=E;try{return M()}finally{d=U}},t.unstable_scheduleCallback=function(E,M,U){var A=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?A+U:A):U=A,E){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=U+j,E={id:r++,callback:M,priorityLevel:E,startTime:U,expirationTime:j,sortIndex:-1},U>A?(E.sortIndex=U,e(o,E),n(s)===null&&E===n(o)&&(p?(y(w),w=-1):p=!0,C(_,U-A))):(E.sortIndex=j,e(s,E),g||h||(g=!0,N||(N=!0,G()))),E},t.unstable_shouldYield=L,t.unstable_wrapCallback=function(E){var M=d;return function(){var U=d;d=M;try{return E.apply(this,arguments)}finally{d=U}}}})(S0);v0.exports=S0;var eS=v0.exports,b0={exports:{}},F={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var of=Symbol.for("react.transitional.element"),nS=Symbol.for("react.portal"),lS=Symbol.for("react.fragment"),aS=Symbol.for("react.strict_mode"),iS=Symbol.for("react.profiler"),uS=Symbol.for("react.consumer"),cS=Symbol.for("react.context"),sS=Symbol.for("react.forward_ref"),oS=Symbol.for("react.suspense"),rS=Symbol.for("react.memo"),x0=Symbol.for("react.lazy"),fS=Symbol.for("react.activity"),Hd=Symbol.iterator;function dS(t){return t===null||typeof t!="object"?null:(t=Hd&&t[Hd]||t["@@iterator"],typeof t=="function"?t:null)}var E0={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_0=Object.assign,w0={};function Ka(t,e,n){this.props=t,this.context=e,this.refs=w0,this.updater=n||E0}Ka.prototype.isReactComponent={};Ka.prototype.setState=function(t,e){if(typeof t!="object"&&typeof t!="function"&&t!=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,t,e,"setState")};Ka.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")};function A0(){}A0.prototype=Ka.prototype;function rf(t,e,n){this.props=t,this.context=e,this.refs=w0,this.updater=n||E0}var ff=rf.prototype=new A0;ff.constructor=rf;_0(ff,Ka.prototype);ff.isPureReactComponent=!0;var Bd=Array.isArray;function $o(){}var xt={H:null,A:null,T:null,S:null},T0=Object.prototype.hasOwnProperty;function df(t,e,n){var l=n.ref;return{$$typeof:of,type:t,key:e,ref:l!==void 0?l:null,props:n}}function hS(t,e){return df(t.type,e,t.props)}function hf(t){return typeof t=="object"&&t!==null&&t.$$typeof===of}function mS(t){var e={"=":"=0",":":"=2"};return"$"+t.replace(/[=:]/g,function(n){return e[n]})}var jd=/\/+/g;function $s(t,e){return typeof t=="object"&&t!==null&&t.key!=null?mS(""+t.key):e.toString(36)}function yS(t){switch(t.status){case"fulfilled":return t.value;case"rejected":throw t.reason;default:switch(typeof t.status=="string"?t.then($o,$o):(t.status="pending",t.then(function(e){t.status==="pending"&&(t.status="fulfilled",t.value=e)},function(e){t.status==="pending"&&(t.status="rejected",t.reason=e)})),t.status){case"fulfilled":return t.value;case"rejected":throw t.reason}}throw t}function ia(t,e,n,l,a){var i=typeof t;(i==="undefined"||i==="boolean")&&(t=null);var u=!1;if(t===null)u=!0;else switch(i){case"bigint":case"string":case"number":u=!0;break;case"object":switch(t.$$typeof){case of:case nS:u=!0;break;case x0:return u=t._init,ia(u(t._payload),e,n,l,a)}}if(u)return a=a(t),u=l===""?"."+$s(t,0):l,Bd(a)?(n="",u!=null&&(n=u.replace(jd,"$&/")+"/"),ia(a,e,n,"",function(o){return o})):a!=null&&(hf(a)&&(a=hS(a,n+(a.key==null||t&&t.key===a.key?"":(""+a.key).replace(jd,"$&/")+"/")+u)),e.push(a)),1;u=0;var c=l===""?".":l+":";if(Bd(t))for(var s=0;s<t.length;s++)l=t[s],i=c+$s(l,s),u+=ia(l,e,n,i,a);else if(s=dS(t),typeof s=="function")for(t=s.call(t),s=0;!(l=t.next()).done;)l=l.value,i=c+$s(l,s++),u+=ia(l,e,n,i,a);else if(i==="object"){if(typeof t.then=="function")return ia(yS(t),e,n,l,a);throw e=String(t),Error("Objects are not valid as a React child (found: "+(e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)+"). If you meant to render a collection of children, use an array instead.")}return u}function Mu(t,e,n){if(t==null)return t;var l=[],a=0;return ia(t,l,"","",function(i){return e.call(n,i,a++)}),l}function gS(t){if(t._status===-1){var e=t._result;e=e(),e.then(function(n){(t._status===0||t._status===-1)&&(t._status=1,t._result=n)},function(n){(t._status===0||t._status===-1)&&(t._status=2,t._result=n)}),t._status===-1&&(t._status=0,t._result=e)}if(t._status===1)return t._result.default;throw t._result}var Ld=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=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(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},pS={map:Mu,forEach:function(t,e,n){Mu(t,function(){e.apply(this,arguments)},n)},count:function(t){var e=0;return Mu(t,function(){e++}),e},toArray:function(t){return Mu(t,function(e){return e})||[]},only:function(t){if(!hf(t))throw Error("React.Children.only expected to receive a single React element child.");return t}};F.Activity=fS;F.Children=pS;F.Component=Ka;F.Fragment=lS;F.Profiler=iS;F.PureComponent=rf;F.StrictMode=aS;F.Suspense=oS;F.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=xt;F.__COMPILER_RUNTIME={__proto__:null,c:function(t){return xt.H.useMemoCache(t)}};F.cache=function(t){return function(){return t.apply(null,arguments)}};F.cacheSignal=function(){return null};F.cloneElement=function(t,e,n){if(t==null)throw Error("The argument must be a React element, but you passed "+t+".");var l=_0({},t.props),a=t.key;if(e!=null)for(i in e.key!==void 0&&(a=""+e.key),e)!T0.call(e,i)||i==="key"||i==="__self"||i==="__source"||i==="ref"&&e.ref===void 0||(l[i]=e[i]);var i=arguments.length-2;if(i===1)l.children=n;else if(1<i){for(var u=Array(i),c=0;c<i;c++)u[c]=arguments[c+2];l.children=u}return df(t.type,a,l)};F.createContext=function(t){return t={$$typeof:cS,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null},t.Provider=t,t.Consumer={$$typeof:uS,_context:t},t};F.createElement=function(t,e,n){var l,a={},i=null;if(e!=null)for(l in e.key!==void 0&&(i=""+e.key),e)T0.call(e,l)&&l!=="key"&&l!=="__self"&&l!=="__source"&&(a[l]=e[l]);var u=arguments.length-2;if(u===1)a.children=n;else if(1<u){for(var c=Array(u),s=0;s<u;s++)c[s]=arguments[s+2];a.children=c}if(t&&t.defaultProps)for(l in u=t.defaultProps,u)a[l]===void 0&&(a[l]=u[l]);return df(t,i,a)};F.createRef=function(){return{current:null}};F.forwardRef=function(t){return{$$typeof:sS,render:t}};F.isValidElement=hf;F.lazy=function(t){return{$$typeof:x0,_payload:{_status:-1,_result:t},_init:gS}};F.memo=function(t,e){return{$$typeof:rS,type:t,compare:e===void 0?null:e}};F.startTransition=function(t){var e=xt.T,n={};xt.T=n;try{var l=t(),a=xt.S;a!==null&&a(n,l),typeof l=="object"&&l!==null&&typeof l.then=="function"&&l.then($o,Ld)}catch(i){Ld(i)}finally{e!==null&&n.types!==null&&(e.types=n.types),xt.T=e}};F.unstable_useCacheRefresh=function(){return xt.H.useCacheRefresh()};F.use=function(t){return xt.H.use(t)};F.useActionState=function(t,e,n){return xt.H.useActionState(t,e,n)};F.useCallback=function(t,e){return xt.H.useCallback(t,e)};F.useContext=function(t){return xt.H.useContext(t)};F.useDebugValue=function(){};F.useDeferredValue=function(t,e){return xt.H.useDeferredValue(t,e)};F.useEffect=function(t,e){return xt.H.useEffect(t,e)};F.useEffectEvent=function(t){return xt.H.useEffectEvent(t)};F.useId=function(){return xt.H.useId()};F.useImperativeHandle=function(t,e,n){return xt.H.useImperativeHandle(t,e,n)};F.useInsertionEffect=function(t,e){return xt.H.useInsertionEffect(t,e)};F.useLayoutEffect=function(t,e){return xt.H.useLayoutEffect(t,e)};F.useMemo=function(t,e){return xt.H.useMemo(t,e)};F.useOptimistic=function(t,e){return xt.H.useOptimistic(t,e)};F.useReducer=function(t,e,n){return xt.H.useReducer(t,e,n)};F.useRef=function(t){return xt.H.useRef(t)};F.useState=function(t){return xt.H.useState(t)};F.useSyncExternalStore=function(t,e,n){return xt.H.useSyncExternalStore(t,e,n)};F.useTransition=function(){return xt.H.useTransition()};F.version="19.2.3";b0.exports=F;var T=b0.exports;const B=sf(T);var N0={exports:{}},ae={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var vS=T;function z0(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Dn(){}var le={d:{f:Dn,r:function(){throw Error(z0(522))},D:Dn,C:Dn,L:Dn,m:Dn,X:Dn,S:Dn,M:Dn},p:0,findDOMNode:null},SS=Symbol.for("react.portal");function bS(t,e,n){var l=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:SS,key:l==null?null:""+l,children:t,containerInfo:e,implementation:n}}var zi=vS.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function fs(t,e){if(t==="font")return"";if(typeof e=="string")return e==="use-credentials"?e:""}ae.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=le;ae.createPortal=function(t,e){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)throw Error(z0(299));return bS(t,e,null,n)};ae.flushSync=function(t){var e=zi.T,n=le.p;try{if(zi.T=null,le.p=2,t)return t()}finally{zi.T=e,le.p=n,le.d.f()}};ae.preconnect=function(t,e){typeof t=="string"&&(e?(e=e.crossOrigin,e=typeof e=="string"?e==="use-credentials"?e:"":void 0):e=null,le.d.C(t,e))};ae.prefetchDNS=function(t){typeof t=="string"&&le.d.D(t)};ae.preinit=function(t,e){if(typeof t=="string"&&e&&typeof e.as=="string"){var n=e.as,l=fs(n,e.crossOrigin),a=typeof e.integrity=="string"?e.integrity:void 0,i=typeof e.fetchPriority=="string"?e.fetchPriority:void 0;n==="style"?le.d.S(t,typeof e.precedence=="string"?e.precedence:void 0,{crossOrigin:l,integrity:a,fetchPriority:i}):n==="script"&&le.d.X(t,{crossOrigin:l,integrity:a,fetchPriority:i,nonce:typeof e.nonce=="string"?e.nonce:void 0})}};ae.preinitModule=function(t,e){if(typeof t=="string")if(typeof e=="object"&&e!==null){if(e.as==null||e.as==="script"){var n=fs(e.as,e.crossOrigin);le.d.M(t,{crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0})}}else e==null&&le.d.M(t)};ae.preload=function(t,e){if(typeof t=="string"&&typeof e=="object"&&e!==null&&typeof e.as=="string"){var n=e.as,l=fs(n,e.crossOrigin);le.d.L(t,n,{crossOrigin:l,integrity:typeof e.integrity=="string"?e.integrity:void 0,nonce:typeof e.nonce=="string"?e.nonce:void 0,type:typeof e.type=="string"?e.type:void 0,fetchPriority:typeof e.fetchPriority=="string"?e.fetchPriority:void 0,referrerPolicy:typeof e.referrerPolicy=="string"?e.referrerPolicy:void 0,imageSrcSet:typeof e.imageSrcSet=="string"?e.imageSrcSet:void 0,imageSizes:typeof e.imageSizes=="string"?e.imageSizes:void 0,media:typeof e.media=="string"?e.media:void 0})}};ae.preloadModule=function(t,e){if(typeof t=="string")if(e){var n=fs(e.as,e.crossOrigin);le.d.m(t,{as:typeof e.as=="string"&&e.as!=="script"?e.as:void 0,crossOrigin:n,integrity:typeof e.integrity=="string"?e.integrity:void 0})}else le.d.m(t)};ae.requestFormReset=function(t){le.d.r(t)};ae.unstable_batchedUpdates=function(t,e){return t(e)};ae.useFormState=function(t,e,n){return zi.H.useFormState(t,e,n)};ae.useFormStatus=function(){return zi.H.useHostTransitionStatus()};ae.version="19.2.3";function M0(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(M0)}catch(t){console.error(t)}}M0(),N0.exports=ae;var xS=N0.exports;/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var jt=eS,O0=T,ES=xS;function q(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)e+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function C0(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function ru(t){var e=t,n=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,e.flags&4098&&(n=e.return),t=e.return;while(t)}return e.tag===3?n:null}function R0(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function D0(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function qd(t){if(ru(t)!==t)throw Error(q(188))}function _S(t){var e=t.alternate;if(!e){if(e=ru(t),e===null)throw Error(q(188));return e!==t?null:t}for(var n=t,l=e;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return qd(a),t;if(i===l)return qd(a),e;i=i.sibling}throw Error(q(188))}if(n.return!==l.return)n=a,l=i;else{for(var u=!1,c=a.child;c;){if(c===n){u=!0,n=a,l=i;break}if(c===l){u=!0,l=a,n=i;break}c=c.sibling}if(!u){for(c=i.child;c;){if(c===n){u=!0,n=i,l=a;break}if(c===l){u=!0,l=i,n=a;break}c=c.sibling}if(!u)throw Error(q(189))}}if(n.alternate!==l)throw Error(q(190))}if(n.tag!==3)throw Error(q(188));return n.stateNode.current===n?t:e}function U0(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=U0(t),e!==null)return e;t=t.sibling}return null}var Et=Object.assign,wS=Symbol.for("react.element"),Ou=Symbol.for("react.transitional.element"),bi=Symbol.for("react.portal"),sa=Symbol.for("react.fragment"),H0=Symbol.for("react.strict_mode"),Qo=Symbol.for("react.profiler"),B0=Symbol.for("react.consumer"),pn=Symbol.for("react.context"),mf=Symbol.for("react.forward_ref"),Ko=Symbol.for("react.suspense"),Jo=Symbol.for("react.suspense_list"),yf=Symbol.for("react.memo"),Hn=Symbol.for("react.lazy"),ko=Symbol.for("react.activity"),AS=Symbol.for("react.memo_cache_sentinel"),Yd=Symbol.iterator;function ci(t){return t===null||typeof t!="object"?null:(t=Yd&&t[Yd]||t["@@iterator"],typeof t=="function"?t:null)}var TS=Symbol.for("react.client.reference");function Fo(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===TS?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case sa:return"Fragment";case Qo:return"Profiler";case H0:return"StrictMode";case Ko:return"Suspense";case Jo:return"SuspenseList";case ko:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case bi:return"Portal";case pn:return t.displayName||"Context";case B0:return(t._context.displayName||"Context")+".Consumer";case mf:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case yf:return e=t.displayName||null,e!==null?e:Fo(t.type)||"Memo";case Hn:e=t._payload,t=t._init;try{return Fo(t(e))}catch{}}return null}var xi=Array.isArray,k=O0.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ot=ES.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Tl={pending:!1,data:null,method:null,action:null},Wo=[],oa=-1;function en(t){return{current:t}}function Vt(t){0>oa||(t.current=Wo[oa],Wo[oa]=null,oa--)}function pt(t,e){oa++,Wo[oa]=t.current,t.current=e}var Pe=en(null),Xi=en(null),kn=en(null),_c=en(null);function wc(t,e){switch(pt(kn,e),pt(Xi,t),pt(Pe,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Qh(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Qh(e),t=np(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}Vt(Pe),pt(Pe,t)}function Ca(){Vt(Pe),Vt(Xi),Vt(kn)}function Io(t){t.memoizedState!==null&&pt(_c,t);var e=Pe.current,n=np(e,t.type);e!==n&&(pt(Xi,t),pt(Pe,n))}function Ac(t){Xi.current===t&&(Vt(Pe),Vt(Xi)),_c.current===t&&(Vt(_c),Pi._currentValue=Tl)}var Qs,Vd;function vl(t){if(Qs===void 0)try{throw Error()}catch(n){var e=n.stack.trim().match(/\n( *(at )?)/);Qs=e&&e[1]||"",Vd=-1<n.stack.indexOf(`
    at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
`+Qs+t+Vd}var Ks=!1;function Js(t,e){if(!t||Ks)return"";Ks=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(e){var f=function(){throw Error()};if(Object.defineProperty(f.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(f,[])}catch(h){var d=h}Reflect.construct(t,[],f)}else{try{f.call()}catch(h){d=h}t.call(f.prototype)}}else{try{throw Error()}catch(h){d=h}(f=t())&&typeof f.catch=="function"&&f.catch(function(){})}}catch(h){if(h&&d&&typeof h.stack=="string")return[h.stack,d.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),u=i[0],c=i[1];if(u&&c){var s=u.split(`
`),o=c.split(`
`);for(a=l=0;l<s.length&&!s[l].includes("DetermineComponentFrameRoot");)l++;for(;a<o.length&&!o[a].includes("DetermineComponentFrameRoot");)a++;if(l===s.length||a===o.length)for(l=s.length-1,a=o.length-1;1<=l&&0<=a&&s[l]!==o[a];)a--;for(;1<=l&&0<=a;l--,a--)if(s[l]!==o[a]){if(l!==1||a!==1)do if(l--,a--,0>a||s[l]!==o[a]){var r=`
`+s[l].replace(" at new "," at ");return t.displayName&&r.includes("<anonymous>")&&(r=r.replace("<anonymous>",t.displayName)),r}while(1<=l&&0<=a);break}}}finally{Ks=!1,Error.prepareStackTrace=n}return(n=t?t.displayName||t.name:"")?vl(n):""}function NS(t,e){switch(t.tag){case 26:case 27:case 5:return vl(t.type);case 16:return vl("Lazy");case 13:return t.child!==e&&e!==null?vl("Suspense Fallback"):vl("Suspense");case 19:return vl("SuspenseList");case 0:case 15:return Js(t.type,!1);case 11:return Js(t.type.render,!1);case 1:return Js(t.type,!0);case 31:return vl("Activity");default:return""}}function Xd(t){try{var e="",n=null;do e+=NS(t,n),n=t,t=t.return;while(t);return e}catch(l){return`
Error generating stack: `+l.message+`
`+l.stack}}var Po=Object.prototype.hasOwnProperty,gf=jt.unstable_scheduleCallback,ks=jt.unstable_cancelCallback,zS=jt.unstable_shouldYield,MS=jt.unstable_requestPaint,be=jt.unstable_now,OS=jt.unstable_getCurrentPriorityLevel,j0=jt.unstable_ImmediatePriority,L0=jt.unstable_UserBlockingPriority,Tc=jt.unstable_NormalPriority,CS=jt.unstable_LowPriority,q0=jt.unstable_IdlePriority,RS=jt.log,DS=jt.unstable_setDisableYieldValue,fu=null,xe=null;function Zn(t){if(typeof RS=="function"&&DS(t),xe&&typeof xe.setStrictMode=="function")try{xe.setStrictMode(fu,t)}catch{}}var Ee=Math.clz32?Math.clz32:BS,US=Math.log,HS=Math.LN2;function BS(t){return t>>>=0,t===0?32:31-(US(t)/HS|0)|0}var Cu=256,Ru=262144,Du=4194304;function Sl(t){var e=t&42;if(e!==0)return e;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&261888;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 ds(t,e,n){var l=t.pendingLanes;if(l===0)return 0;var a=0,i=t.suspendedLanes,u=t.pingedLanes;t=t.warmLanes;var c=l&134217727;return c!==0?(l=c&~i,l!==0?a=Sl(l):(u&=c,u!==0?a=Sl(u):n||(n=c&~t,n!==0&&(a=Sl(n))))):(c=l&~i,c!==0?a=Sl(c):u!==0?a=Sl(u):n||(n=l&~t,n!==0&&(a=Sl(n)))),a===0?0:e!==0&&e!==a&&!(e&i)&&(i=a&-a,n=e&-e,i>=n||i===32&&(n&4194048)!==0)?e:a}function du(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function jS(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+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 e+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 Y0(){var t=Du;return Du<<=1,!(Du&62914560)&&(Du=4194304),t}function Fs(t){for(var e=[],n=0;31>n;n++)e.push(t);return e}function hu(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function LS(t,e,n,l,a,i){var u=t.pendingLanes;t.pendingLanes=n,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=n,t.entangledLanes&=n,t.errorRecoveryDisabledLanes&=n,t.shellSuspendCounter=0;var c=t.entanglements,s=t.expirationTimes,o=t.hiddenUpdates;for(n=u&~n;0<n;){var r=31-Ee(n),f=1<<r;c[r]=0,s[r]=-1;var d=o[r];if(d!==null)for(o[r]=null,r=0;r<d.length;r++){var h=d[r];h!==null&&(h.lane&=-536870913)}n&=~f}l!==0&&V0(t,l,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(u&~e))}function V0(t,e,n){t.pendingLanes|=e,t.suspendedLanes&=~e;var l=31-Ee(e);t.entangledLanes|=e,t.entanglements[l]=t.entanglements[l]|1073741824|n&261930}function X0(t,e){var n=t.entangledLanes|=e;for(t=t.entanglements;n;){var l=31-Ee(n),a=1<<l;a&e|t[l]&e&&(t[l]|=e),n&=~a}}function G0(t,e){var n=e&-e;return n=n&42?1:pf(n),n&(t.suspendedLanes|e)?0:n}function pf(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 vf(t){return t&=-t,2<t?8<t?t&134217727?32:268435456:8:2}function Z0(){var t=ot.p;return t!==0?t:(t=window.event,t===void 0?32:hp(t.type))}function Gd(t,e){var n=ot.p;try{return ot.p=t,e()}finally{ot.p=n}}var ol=Math.random().toString(36).slice(2),Qt="__reactFiber$"+ol,he="__reactProps$"+ol,Ja="__reactContainer$"+ol,tr="__reactEvents$"+ol,qS="__reactListeners$"+ol,YS="__reactHandles$"+ol,Zd="__reactResources$"+ol,mu="__reactMarker$"+ol;function Sf(t){delete t[Qt],delete t[he],delete t[tr],delete t[qS],delete t[YS]}function ra(t){var e=t[Qt];if(e)return e;for(var n=t.parentNode;n;){if(e=n[Ja]||n[Qt]){if(n=e.alternate,e.child!==null||n!==null&&n.child!==null)for(t=Wh(t);t!==null;){if(n=t[Qt])return n;t=Wh(t)}return e}t=n,n=t.parentNode}return null}function ka(t){if(t=t[Qt]||t[Ja]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function Ei(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(q(33))}function xa(t){var e=t[Zd];return e||(e=t[Zd]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function Yt(t){t[mu]=!0}var $0=new Set,Q0={};function Gl(t,e){Ra(t,e),Ra(t+"Capture",e)}function Ra(t,e){for(Q0[t]=e,t=0;t<e.length;t++)$0.add(e[t])}var VS=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]*$"),$d={},Qd={};function XS(t){return Po.call(Qd,t)?!0:Po.call($d,t)?!1:VS.test(t)?Qd[t]=!0:($d[t]=!0,!1)}function ec(t,e,n){if(XS(e))if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var l=e.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+n)}}function Uu(t,e,n){if(n===null)t.removeAttribute(e);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+n)}}function on(t,e,n,l){if(l===null)t.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(n);return}t.setAttributeNS(e,n,""+l)}}function ze(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function K0(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function GS(t,e,n){var l=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(u){n=""+u,i.call(this,u)}}),Object.defineProperty(t,e,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(u){n=""+u},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function er(t){if(!t._valueTracker){var e=K0(t)?"checked":"value";t._valueTracker=GS(t,e,""+t[e])}}function J0(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var n=e.getValue(),l="";return t&&(l=K0(t)?t.checked?"true":"false":t.value),t=l,t!==n?(e.setValue(t),!0):!1}function Nc(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}}var ZS=/[\n"\\]/g;function Ce(t){return t.replace(ZS,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function nr(t,e,n,l,a,i,u,c){t.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?t.type=u:t.removeAttribute("type"),e!=null?u==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+ze(e)):t.value!==""+ze(e)&&(t.value=""+ze(e)):u!=="submit"&&u!=="reset"||t.removeAttribute("value"),e!=null?lr(t,u,ze(e)):n!=null?lr(t,u,ze(n)):l!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?t.name=""+ze(c):t.removeAttribute("name")}function k0(t,e,n,l,a,i,u,c){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){er(t);return}n=n!=null?""+ze(n):"",e=e!=null?""+ze(e):n,c||e===t.value||(t.value=e),t.defaultValue=e}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,t.checked=c?t.checked:!!l,t.defaultChecked=!!l,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.name=u),er(t)}function lr(t,e,n){e==="number"&&Nc(t.ownerDocument)===t||t.defaultValue===""+n||(t.defaultValue=""+n)}function Ea(t,e,n,l){if(t=t.options,e){e={};for(var a=0;a<n.length;a++)e["$"+n[a]]=!0;for(n=0;n<t.length;n++)a=e.hasOwnProperty("$"+t[n].value),t[n].selected!==a&&(t[n].selected=a),a&&l&&(t[n].defaultSelected=!0)}else{for(n=""+ze(n),e=null,a=0;a<t.length;a++){if(t[a].value===n){t[a].selected=!0,l&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function F0(t,e,n){if(e!=null&&(e=""+ze(e),e!==t.value&&(t.value=e),n==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=n!=null?""+ze(n):""}function W0(t,e,n,l){if(e==null){if(l!=null){if(n!=null)throw Error(q(92));if(xi(l)){if(1<l.length)throw Error(q(93));l=l[0]}n=l}n==null&&(n=""),e=n}n=ze(e),t.defaultValue=n,l=t.textContent,l===n&&l!==""&&l!==null&&(t.value=l),er(t)}function Da(t,e){if(e){var n=t.firstChild;if(n&&n===t.lastChild&&n.nodeType===3){n.nodeValue=e;return}}t.textContent=e}var $S=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 Kd(t,e,n){var l=e.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":l?t.setProperty(e,n):typeof n!="number"||n===0||$S.has(e)?e==="float"?t.cssFloat=n:t[e]=(""+n).trim():t[e]=n+"px"}function I0(t,e,n){if(e!=null&&typeof e!="object")throw Error(q(62));if(t=t.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||e!=null&&e.hasOwnProperty(l)||(l.indexOf("--")===0?t.setProperty(l,""):l==="float"?t.cssFloat="":t[l]="");for(var a in e)l=e[a],e.hasOwnProperty(a)&&n[a]!==l&&Kd(t,a,l)}else for(var i in e)e.hasOwnProperty(i)&&Kd(t,i,e[i])}function bf(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 QS=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"],["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"]]),KS=/^[\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 nc(t){return KS.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function vn(){}var ar=null;function xf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var fa=null,_a=null;function Jd(t){var e=ka(t);if(e&&(t=e.stateNode)){var n=t[he]||null;t:switch(t=e.stateNode,e.type){case"input":if(nr(t,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),e=n.name,n.type==="radio"&&e!=null){for(n=t;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Ce(""+e)+'"][type="radio"]'),e=0;e<n.length;e++){var l=n[e];if(l!==t&&l.form===t.form){var a=l[he]||null;if(!a)throw Error(q(90));nr(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<n.length;e++)l=n[e],l.form===t.form&&J0(l)}break t;case"textarea":F0(t,n.value,n.defaultValue);break t;case"select":e=n.value,e!=null&&Ea(t,!!n.multiple,e,!1)}}}var Ws=!1;function P0(t,e,n){if(Ws)return t(e,n);Ws=!0;try{var l=t(e);return l}finally{if(Ws=!1,(fa!==null||_a!==null)&&(ws(),fa&&(e=fa,t=_a,_a=fa=null,Jd(e),t)))for(e=0;e<t.length;e++)Jd(t[e])}}function Gi(t,e){var n=t.stateNode;if(n===null)return null;var l=n[he]||null;if(l===null)return null;n=l[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(t=t.type,l=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!l;break t;default:t=!1}if(t)return null;if(n&&typeof n!="function")throw Error(q(231,e,typeof n));return n}var An=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ir=!1;if(An)try{var si={};Object.defineProperty(si,"passive",{get:function(){ir=!0}}),window.addEventListener("test",si,si),window.removeEventListener("test",si,si)}catch{ir=!1}var $n=null,Ef=null,lc=null;function ty(){if(lc)return lc;var t,e=Ef,n=e.length,l,a="value"in $n?$n.value:$n.textContent,i=a.length;for(t=0;t<n&&e[t]===a[t];t++);var u=n-t;for(l=1;l<=u&&e[n-l]===a[i-l];l++);return lc=a.slice(t,1<l?1-l:void 0)}function ac(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Hu(){return!0}function kd(){return!1}function me(t){function e(n,l,a,i,u){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var c in t)t.hasOwnProperty(c)&&(n=t[c],this[c]=n?n(i):i[c]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Hu:kd,this.isPropagationStopped=kd,this}return Et(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Hu)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Hu)},persist:function(){},isPersistent:Hu}),e}var Zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},hs=me(Zl),yu=Et({},Zl,{view:0,detail:0}),JS=me(yu),Is,Ps,oi,ms=Et({},yu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_f,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!==oi&&(oi&&t.type==="mousemove"?(Is=t.screenX-oi.screenX,Ps=t.screenY-oi.screenY):Ps=Is=0,oi=t),Is)},movementY:function(t){return"movementY"in t?t.movementY:Ps}}),Fd=me(ms),kS=Et({},ms,{dataTransfer:0}),FS=me(kS),WS=Et({},yu,{relatedTarget:0}),to=me(WS),IS=Et({},Zl,{animationName:0,elapsedTime:0,pseudoElement:0}),PS=me(IS),tb=Et({},Zl,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),eb=me(tb),nb=Et({},Zl,{data:0}),Wd=me(nb),lb={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},ab={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"},ib={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ub(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=ib[t])?!!e[t]:!1}function _f(){return ub}var cb=Et({},yu,{key:function(t){if(t.key){var e=lb[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=ac(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?ab[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_f,charCode:function(t){return t.type==="keypress"?ac(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ac(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),sb=me(cb),ob=Et({},ms,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Id=me(ob),rb=Et({},yu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_f}),fb=me(rb),db=Et({},Zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),hb=me(db),mb=Et({},ms,{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}),yb=me(mb),gb=Et({},Zl,{newState:0,oldState:0}),pb=me(gb),vb=[9,13,27,32],wf=An&&"CompositionEvent"in window,Mi=null;An&&"documentMode"in document&&(Mi=document.documentMode);var Sb=An&&"TextEvent"in window&&!Mi,ey=An&&(!wf||Mi&&8<Mi&&11>=Mi),Pd=" ",th=!1;function ny(t,e){switch(t){case"keyup":return vb.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ly(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var da=!1;function bb(t,e){switch(t){case"compositionend":return ly(e);case"keypress":return e.which!==32?null:(th=!0,Pd);case"textInput":return t=e.data,t===Pd&&th?null:t;default:return null}}function xb(t,e){if(da)return t==="compositionend"||!wf&&ny(t,e)?(t=ty(),lc=Ef=$n=null,da=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ey&&e.locale!=="ko"?null:e.data;default:return null}}var Eb={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 eh(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!Eb[t.type]:e==="textarea"}function ay(t,e,n,l){fa?_a?_a.push(l):_a=[l]:fa=l,e=$c(e,"onChange"),0<e.length&&(n=new hs("onChange","change",null,n,l),t.push({event:n,listeners:e}))}var Oi=null,Zi=null;function _b(t){Pg(t,0)}function ys(t){var e=Ei(t);if(J0(e))return t}function nh(t,e){if(t==="change")return e}var iy=!1;if(An){var eo;if(An){var no="oninput"in document;if(!no){var lh=document.createElement("div");lh.setAttribute("oninput","return;"),no=typeof lh.oninput=="function"}eo=no}else eo=!1;iy=eo&&(!document.documentMode||9<document.documentMode)}function ah(){Oi&&(Oi.detachEvent("onpropertychange",uy),Zi=Oi=null)}function uy(t){if(t.propertyName==="value"&&ys(Zi)){var e=[];ay(e,Zi,t,xf(t)),P0(_b,e)}}function wb(t,e,n){t==="focusin"?(ah(),Oi=e,Zi=n,Oi.attachEvent("onpropertychange",uy)):t==="focusout"&&ah()}function Ab(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return ys(Zi)}function Tb(t,e){if(t==="click")return ys(e)}function Nb(t,e){if(t==="input"||t==="change")return ys(e)}function zb(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var we=typeof Object.is=="function"?Object.is:zb;function $i(t,e){if(we(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var n=Object.keys(t),l=Object.keys(e);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Po.call(e,a)||!we(t[a],e[a]))return!1}return!0}function ih(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function uh(t,e){var n=ih(t);t=0;for(var l;n;){if(n.nodeType===3){if(l=t+n.textContent.length,t<=e&&l>=e)return{node:n,offset:e-t};t=l}t:{for(;n;){if(n.nextSibling){n=n.nextSibling;break t}n=n.parentNode}n=void 0}n=ih(n)}}function cy(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?cy(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function sy(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Nc(t.document);e instanceof t.HTMLIFrameElement;){try{var n=typeof e.contentWindow.location.href=="string"}catch{n=!1}if(n)t=e.contentWindow;else break;e=Nc(t.document)}return e}function Af(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var Mb=An&&"documentMode"in document&&11>=document.documentMode,ha=null,ur=null,Ci=null,cr=!1;function ch(t,e,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;cr||ha==null||ha!==Nc(l)||(l=ha,"selectionStart"in l&&Af(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Ci&&$i(Ci,l)||(Ci=l,l=$c(ur,"onSelect"),0<l.length&&(e=new hs("onSelect","select",null,e,n),t.push({event:e,listeners:l}),e.target=ha)))}function pl(t,e){var n={};return n[t.toLowerCase()]=e.toLowerCase(),n["Webkit"+t]="webkit"+e,n["Moz"+t]="moz"+e,n}var ma={animationend:pl("Animation","AnimationEnd"),animationiteration:pl("Animation","AnimationIteration"),animationstart:pl("Animation","AnimationStart"),transitionrun:pl("Transition","TransitionRun"),transitionstart:pl("Transition","TransitionStart"),transitioncancel:pl("Transition","TransitionCancel"),transitionend:pl("Transition","TransitionEnd")},lo={},oy={};An&&(oy=document.createElement("div").style,"AnimationEvent"in window||(delete ma.animationend.animation,delete ma.animationiteration.animation,delete ma.animationstart.animation),"TransitionEvent"in window||delete ma.transitionend.transition);function $l(t){if(lo[t])return lo[t];if(!ma[t])return t;var e=ma[t],n;for(n in e)if(e.hasOwnProperty(n)&&n in oy)return lo[t]=e[n];return t}var ry=$l("animationend"),fy=$l("animationiteration"),dy=$l("animationstart"),Ob=$l("transitionrun"),Cb=$l("transitionstart"),Rb=$l("transitioncancel"),hy=$l("transitionend"),my=new Map,sr="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error 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(" ");sr.push("scrollEnd");function $e(t,e){my.set(t,e),Gl(e,[t])}var zc=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=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(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Ne=[],ya=0,Tf=0;function gs(){for(var t=ya,e=Tf=ya=0;e<t;){var n=Ne[e];Ne[e++]=null;var l=Ne[e];Ne[e++]=null;var a=Ne[e];Ne[e++]=null;var i=Ne[e];if(Ne[e++]=null,l!==null&&a!==null){var u=l.pending;u===null?a.next=a:(a.next=u.next,u.next=a),l.pending=a}i!==0&&yy(n,a,i)}}function ps(t,e,n,l){Ne[ya++]=t,Ne[ya++]=e,Ne[ya++]=n,Ne[ya++]=l,Tf|=l,t.lanes|=l,t=t.alternate,t!==null&&(t.lanes|=l)}function Nf(t,e,n,l){return ps(t,e,n,l),Mc(t)}function Ql(t,e){return ps(t,null,null,e),Mc(t)}function yy(t,e,n){t.lanes|=n;var l=t.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=t.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-Ee(n),t=i.hiddenUpdates,l=t[a],l===null?t[a]=[e]:l.push(e),e.lane=n|536870912),i):null}function Mc(t){if(50<Yi)throw Yi=0,Mr=null,Error(q(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var ga={};function Db(t,e,n,l){this.tag=t,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ve(t,e,n,l){return new Db(t,e,n,l)}function zf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function xn(t,e){var n=t.alternate;return n===null?(n=ve(t.tag,e,t.key,t.mode),n.elementType=t.elementType,n.type=t.type,n.stateNode=t.stateNode,n.alternate=t,t.alternate=n):(n.pendingProps=e,n.type=t.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=t.flags&65011712,n.childLanes=t.childLanes,n.lanes=t.lanes,n.child=t.child,n.memoizedProps=t.memoizedProps,n.memoizedState=t.memoizedState,n.updateQueue=t.updateQueue,e=t.dependencies,n.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},n.sibling=t.sibling,n.index=t.index,n.ref=t.ref,n.refCleanup=t.refCleanup,n}function gy(t,e){t.flags&=65011714;var n=t.alternate;return n===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,t.type=n.type,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function ic(t,e,n,l,a,i){var u=0;if(l=t,typeof t=="function")zf(t)&&(u=1);else if(typeof t=="string")u=Lx(t,n,Pe.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case ko:return t=ve(31,n,e,a),t.elementType=ko,t.lanes=i,t;case sa:return Nl(n.children,a,i,e);case H0:u=8,a|=24;break;case Qo:return t=ve(12,n,e,a|2),t.elementType=Qo,t.lanes=i,t;case Ko:return t=ve(13,n,e,a),t.elementType=Ko,t.lanes=i,t;case Jo:return t=ve(19,n,e,a),t.elementType=Jo,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case pn:u=10;break t;case B0:u=9;break t;case mf:u=11;break t;case yf:u=14;break t;case Hn:u=16,l=null;break t}u=29,n=Error(q(130,t===null?"null":typeof t,"")),l=null}return e=ve(u,n,e,a),e.elementType=t,e.type=l,e.lanes=i,e}function Nl(t,e,n,l){return t=ve(7,t,l,e),t.lanes=n,t}function ao(t,e,n){return t=ve(6,t,null,e),t.lanes=n,t}function py(t){var e=ve(18,null,null,0);return e.stateNode=t,e}function io(t,e,n){return e=ve(4,t.children!==null?t.children:[],t.key,e),e.lanes=n,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var sh=new WeakMap;function Re(t,e){if(typeof t=="object"&&t!==null){var n=sh.get(t);return n!==void 0?n:(e={value:t,source:e,stack:Xd(e)},sh.set(t,e),e)}return{value:t,source:e,stack:Xd(e)}}var pa=[],va=0,Oc=null,Qi=0,Me=[],Oe=0,il=null,Fe=1,We="";function yn(t,e){pa[va++]=Qi,pa[va++]=Oc,Oc=t,Qi=e}function vy(t,e,n){Me[Oe++]=Fe,Me[Oe++]=We,Me[Oe++]=il,il=t;var l=Fe;t=We;var a=32-Ee(l)-1;l&=~(1<<a),n+=1;var i=32-Ee(e)+a;if(30<i){var u=a-a%5;i=(l&(1<<u)-1).toString(32),l>>=u,a-=u,Fe=1<<32-Ee(e)+a|n<<a|l,We=i+t}else Fe=1<<i|n<<a|l,We=t}function Mf(t){t.return!==null&&(yn(t,1),vy(t,1,0))}function Of(t){for(;t===Oc;)Oc=pa[--va],pa[va]=null,Qi=pa[--va],pa[va]=null;for(;t===il;)il=Me[--Oe],Me[Oe]=null,We=Me[--Oe],Me[Oe]=null,Fe=Me[--Oe],Me[Oe]=null}function Sy(t,e){Me[Oe++]=Fe,Me[Oe++]=We,Me[Oe++]=il,Fe=e.id,We=e.overflow,il=t}var Kt=null,bt=null,it=!1,Fn=null,De=!1,or=Error(q(519));function ul(t){var e=Error(q(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ki(Re(e,t)),or}function oh(t){var e=t.stateNode,n=t.type,l=t.memoizedProps;switch(e[Qt]=t,e[he]=l,n){case"dialog":et("cancel",e),et("close",e);break;case"iframe":case"object":case"embed":et("load",e);break;case"video":case"audio":for(n=0;n<Wi.length;n++)et(Wi[n],e);break;case"source":et("error",e);break;case"img":case"image":case"link":et("error",e),et("load",e);break;case"details":et("toggle",e);break;case"input":et("invalid",e),k0(e,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":et("invalid",e);break;case"textarea":et("invalid",e),W0(e,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||e.textContent===""+n||l.suppressHydrationWarning===!0||ep(e.textContent,n)?(l.popover!=null&&(et("beforetoggle",e),et("toggle",e)),l.onScroll!=null&&et("scroll",e),l.onScrollEnd!=null&&et("scrollend",e),l.onClick!=null&&(e.onclick=vn),e=!0):e=!1,e||ul(t,!0)}function rh(t){for(Kt=t.return;Kt;)switch(Kt.tag){case 5:case 31:case 13:De=!1;return;case 27:case 3:De=!0;return;default:Kt=Kt.return}}function Pl(t){if(t!==Kt)return!1;if(!it)return rh(t),it=!0,!1;var e=t.tag,n;if((n=e!==3&&e!==27)&&((n=e===5)&&(n=t.type,n=!(n!=="form"&&n!=="button")||Ur(t.type,t.memoizedProps)),n=!n),n&&bt&&ul(t),rh(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(q(317));bt=Fh(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(q(317));bt=Fh(t)}else e===27?(e=bt,rl(t.type)?(t=Lr,Lr=null,bt=t):bt=e):bt=Kt?je(t.stateNode.nextSibling):null;return!0}function Ul(){bt=Kt=null,it=!1}function uo(){var t=Fn;return t!==null&&(se===null?se=t:se.push.apply(se,t),Fn=null),t}function Ki(t){Fn===null?Fn=[t]:Fn.push(t)}var rr=en(null),Kl=null,Sn=null;function qn(t,e,n){pt(rr,e._currentValue),e._currentValue=n}function En(t){t._currentValue=rr.current,Vt(rr)}function fr(t,e,n){for(;t!==null;){var l=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,l!==null&&(l.childLanes|=e)):l!==null&&(l.childLanes&e)!==e&&(l.childLanes|=e),t===n)break;t=t.return}}function dr(t,e,n,l){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var i=a.dependencies;if(i!==null){var u=a.child;i=i.firstContext;t:for(;i!==null;){var c=i;i=a;for(var s=0;s<e.length;s++)if(c.context===e[s]){i.lanes|=n,c=i.alternate,c!==null&&(c.lanes|=n),fr(i.return,n,t),l||(u=null);break t}i=c.next}}else if(a.tag===18){if(u=a.return,u===null)throw Error(q(341));u.lanes|=n,i=u.alternate,i!==null&&(i.lanes|=n),fr(u,n,t),u=null}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}}function Fa(t,e,n,l){t=null;for(var a=e,i=!1;a!==null;){if(!i){if(a.flags&524288)i=!0;else if(a.flags&262144)break}if(a.tag===10){var u=a.alternate;if(u===null)throw Error(q(387));if(u=u.memoizedProps,u!==null){var c=a.type;we(a.pendingProps.value,u.value)||(t!==null?t.push(c):t=[c])}}else if(a===_c.current){if(u=a.alternate,u===null)throw Error(q(387));u.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(Pi):t=[Pi])}a=a.return}t!==null&&dr(e,t,n,l),e.flags|=262144}function Cc(t){for(t=t.firstContext;t!==null;){if(!we(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Hl(t){Kl=t,Sn=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Jt(t){return by(Kl,t)}function Bu(t,e){return Kl===null&&Hl(t),by(t,e)}function by(t,e){var n=e._currentValue;if(e={context:e,memoizedValue:n,next:null},Sn===null){if(t===null)throw Error(q(308));Sn=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Sn=Sn.next=e;return n}var Ub=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(n,l){t.push(l)}};this.abort=function(){e.aborted=!0,t.forEach(function(n){return n()})}},Hb=jt.unstable_scheduleCallback,Bb=jt.unstable_NormalPriority,Dt={$$typeof:pn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cf(){return{controller:new Ub,data:new Map,refCount:0}}function gu(t){t.refCount--,t.refCount===0&&Hb(Bb,function(){t.controller.abort()})}var Ri=null,hr=0,Ua=0,wa=null;function jb(t,e){if(Ri===null){var n=Ri=[];hr=0,Ua=nd(),wa={status:"pending",value:void 0,then:function(l){n.push(l)}}}return hr++,e.then(fh,fh),e}function fh(){if(--hr===0&&Ri!==null){wa!==null&&(wa.status="fulfilled");var t=Ri;Ri=null,Ua=0,wa=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function Lb(t,e){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return t.then(function(){l.status="fulfilled",l.value=e;for(var a=0;a<n.length;a++)(0,n[a])(e)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var dh=k.S;k.S=function(t,e){Ug=be(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&jb(t,e),dh!==null&&dh(t,e)};var zl=en(null);function Rf(){var t=zl.current;return t!==null?t:gt.pooledCache}function uc(t,e){e===null?pt(zl,zl.current):pt(zl,e.pool)}function xy(){var t=Rf();return t===null?null:{parent:Dt._currentValue,pool:t}}var Wa=Error(q(460)),Df=Error(q(474)),vs=Error(q(542)),Rc={then:function(){}};function hh(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Ey(t,e,n){switch(n=t[n],n===void 0?t.push(e):n!==e&&(e.then(vn,vn),e=n),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,yh(t),t;default:if(typeof e.status=="string")e.then(vn,vn);else{if(t=gt,t!==null&&100<t.shellSuspendCounter)throw Error(q(482));t=e,t.status="pending",t.then(function(l){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=l}},function(l){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=l}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,yh(t),t}throw Ml=e,Wa}}function bl(t){try{var e=t._init;return e(t._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Ml=n,Wa):n}}var Ml=null;function mh(){if(Ml===null)throw Error(q(459));var t=Ml;return Ml=null,t}function yh(t){if(t===Wa||t===vs)throw Error(q(483))}var Aa=null,Ji=0;function ju(t){var e=Ji;return Ji+=1,Aa===null&&(Aa=[]),Ey(Aa,t,e)}function ri(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function Lu(t,e){throw e.$$typeof===wS?Error(q(525)):(t=Object.prototype.toString.call(e),Error(q(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function _y(t){function e(m,y){if(t){var v=m.deletions;v===null?(m.deletions=[y],m.flags|=16):v.push(y)}}function n(m,y){if(!t)return null;for(;y!==null;)e(m,y),y=y.sibling;return null}function l(m){for(var y=new Map;m!==null;)m.key!==null?y.set(m.key,m):y.set(m.index,m),m=m.sibling;return y}function a(m,y){return m=xn(m,y),m.index=0,m.sibling=null,m}function i(m,y,v){return m.index=v,t?(v=m.alternate,v!==null?(v=v.index,v<y?(m.flags|=67108866,y):v):(m.flags|=67108866,y)):(m.flags|=1048576,y)}function u(m){return t&&m.alternate===null&&(m.flags|=67108866),m}function c(m,y,v,S){return y===null||y.tag!==6?(y=ao(v,m.mode,S),y.return=m,y):(y=a(y,v),y.return=m,y)}function s(m,y,v,S){var _=v.type;return _===sa?r(m,y,v.props.children,S,v.key):y!==null&&(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&bl(_)===y.type)?(y=a(y,v.props),ri(y,v),y.return=m,y):(y=ic(v.type,v.key,v.props,null,m.mode,S),ri(y,v),y.return=m,y)}function o(m,y,v,S){return y===null||y.tag!==4||y.stateNode.containerInfo!==v.containerInfo||y.stateNode.implementation!==v.implementation?(y=io(v,m.mode,S),y.return=m,y):(y=a(y,v.children||[]),y.return=m,y)}function r(m,y,v,S,_){return y===null||y.tag!==7?(y=Nl(v,m.mode,S,_),y.return=m,y):(y=a(y,v),y.return=m,y)}function f(m,y,v){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return y=ao(""+y,m.mode,v),y.return=m,y;if(typeof y=="object"&&y!==null){switch(y.$$typeof){case Ou:return v=ic(y.type,y.key,y.props,null,m.mode,v),ri(v,y),v.return=m,v;case bi:return y=io(y,m.mode,v),y.return=m,y;case Hn:return y=bl(y),f(m,y,v)}if(xi(y)||ci(y))return y=Nl(y,m.mode,v,null),y.return=m,y;if(typeof y.then=="function")return f(m,ju(y),v);if(y.$$typeof===pn)return f(m,Bu(m,y),v);Lu(m,y)}return null}function d(m,y,v,S){var _=y!==null?y.key:null;if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return _!==null?null:c(m,y,""+v,S);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case Ou:return v.key===_?s(m,y,v,S):null;case bi:return v.key===_?o(m,y,v,S):null;case Hn:return v=bl(v),d(m,y,v,S)}if(xi(v)||ci(v))return _!==null?null:r(m,y,v,S,null);if(typeof v.then=="function")return d(m,y,ju(v),S);if(v.$$typeof===pn)return d(m,y,Bu(m,v),S);Lu(m,v)}return null}function h(m,y,v,S,_){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return m=m.get(v)||null,c(y,m,""+S,_);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Ou:return m=m.get(S.key===null?v:S.key)||null,s(y,m,S,_);case bi:return m=m.get(S.key===null?v:S.key)||null,o(y,m,S,_);case Hn:return S=bl(S),h(m,y,v,S,_)}if(xi(S)||ci(S))return m=m.get(v)||null,r(y,m,S,_,null);if(typeof S.then=="function")return h(m,y,v,ju(S),_);if(S.$$typeof===pn)return h(m,y,v,Bu(y,S),_);Lu(y,S)}return null}function g(m,y,v,S){for(var _=null,N=null,w=y,H=y=0,z=null;w!==null&&H<v.length;H++){w.index>H?(z=w,w=null):z=w.sibling;var L=d(m,w,v[H],S);if(L===null){w===null&&(w=z);break}t&&w&&L.alternate===null&&e(m,w),y=i(L,y,H),N===null?_=L:N.sibling=L,N=L,w=z}if(H===v.length)return n(m,w),it&&yn(m,H),_;if(w===null){for(;H<v.length;H++)w=f(m,v[H],S),w!==null&&(y=i(w,y,H),N===null?_=w:N.sibling=w,N=w);return it&&yn(m,H),_}for(w=l(w);H<v.length;H++)z=h(w,m,H,v[H],S),z!==null&&(t&&z.alternate!==null&&w.delete(z.key===null?H:z.key),y=i(z,y,H),N===null?_=z:N.sibling=z,N=z);return t&&w.forEach(function(R){return e(m,R)}),it&&yn(m,H),_}function p(m,y,v,S){if(v==null)throw Error(q(151));for(var _=null,N=null,w=y,H=y=0,z=null,L=v.next();w!==null&&!L.done;H++,L=v.next()){w.index>H?(z=w,w=null):z=w.sibling;var R=d(m,w,L.value,S);if(R===null){w===null&&(w=z);break}t&&w&&R.alternate===null&&e(m,w),y=i(R,y,H),N===null?_=R:N.sibling=R,N=R,w=z}if(L.done)return n(m,w),it&&yn(m,H),_;if(w===null){for(;!L.done;H++,L=v.next())L=f(m,L.value,S),L!==null&&(y=i(L,y,H),N===null?_=L:N.sibling=L,N=L);return it&&yn(m,H),_}for(w=l(w);!L.done;H++,L=v.next())L=h(w,m,H,L.value,S),L!==null&&(t&&L.alternate!==null&&w.delete(L.key===null?H:L.key),y=i(L,y,H),N===null?_=L:N.sibling=L,N=L);return t&&w.forEach(function(G){return e(m,G)}),it&&yn(m,H),_}function b(m,y,v,S){if(typeof v=="object"&&v!==null&&v.type===sa&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case Ou:t:{for(var _=v.key;y!==null;){if(y.key===_){if(_=v.type,_===sa){if(y.tag===7){n(m,y.sibling),S=a(y,v.props.children),S.return=m,m=S;break t}}else if(y.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Hn&&bl(_)===y.type){n(m,y.sibling),S=a(y,v.props),ri(S,v),S.return=m,m=S;break t}n(m,y);break}else e(m,y);y=y.sibling}v.type===sa?(S=Nl(v.props.children,m.mode,S,v.key),S.return=m,m=S):(S=ic(v.type,v.key,v.props,null,m.mode,S),ri(S,v),S.return=m,m=S)}return u(m);case bi:t:{for(_=v.key;y!==null;){if(y.key===_)if(y.tag===4&&y.stateNode.containerInfo===v.containerInfo&&y.stateNode.implementation===v.implementation){n(m,y.sibling),S=a(y,v.children||[]),S.return=m,m=S;break t}else{n(m,y);break}else e(m,y);y=y.sibling}S=io(v,m.mode,S),S.return=m,m=S}return u(m);case Hn:return v=bl(v),b(m,y,v,S)}if(xi(v))return g(m,y,v,S);if(ci(v)){if(_=ci(v),typeof _!="function")throw Error(q(150));return v=_.call(v),p(m,y,v,S)}if(typeof v.then=="function")return b(m,y,ju(v),S);if(v.$$typeof===pn)return b(m,y,Bu(m,v),S);Lu(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint"?(v=""+v,y!==null&&y.tag===6?(n(m,y.sibling),S=a(y,v),S.return=m,m=S):(n(m,y),S=ao(v,m.mode,S),S.return=m,m=S),u(m)):n(m,y)}return function(m,y,v,S){try{Ji=0;var _=b(m,y,v,S);return Aa=null,_}catch(w){if(w===Wa||w===vs)throw w;var N=ve(29,w,null,m.mode);return N.lanes=S,N.return=m,N}finally{}}}var Bl=_y(!0),wy=_y(!1),Bn=!1;function Uf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function mr(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Wn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function In(t,e,n){var l=t.updateQueue;if(l===null)return null;if(l=l.shared,st&2){var a=l.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),l.pending=e,e=Mc(t),yy(t,null,n),e}return ps(t,l,e,n),Mc(t)}function Di(t,e,n){if(e=e.updateQueue,e!==null&&(e=e.shared,(n&4194048)!==0)){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,X0(t,n)}}function co(t,e){var n=t.updateQueue,l=t.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var u={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=u:i=i.next=u,n=n.next}while(n!==null);i===null?a=i=e:i=i.next=e}else a=i=e;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},t.updateQueue=n;return}t=n.lastBaseUpdate,t===null?n.firstBaseUpdate=e:t.next=e,n.lastBaseUpdate=e}var yr=!1;function Ui(){if(yr){var t=wa;if(t!==null)throw t}}function Hi(t,e,n,l){yr=!1;var a=t.updateQueue;Bn=!1;var i=a.firstBaseUpdate,u=a.lastBaseUpdate,c=a.shared.pending;if(c!==null){a.shared.pending=null;var s=c,o=s.next;s.next=null,u===null?i=o:u.next=o,u=s;var r=t.alternate;r!==null&&(r=r.updateQueue,c=r.lastBaseUpdate,c!==u&&(c===null?r.firstBaseUpdate=o:c.next=o,r.lastBaseUpdate=s))}if(i!==null){var f=a.baseState;u=0,r=o=s=null,c=i;do{var d=c.lane&-536870913,h=d!==c.lane;if(h?(lt&d)===d:(l&d)===d){d!==0&&d===Ua&&(yr=!0),r!==null&&(r=r.next={lane:0,tag:c.tag,payload:c.payload,callback:null,next:null});t:{var g=t,p=c;d=e;var b=n;switch(p.tag){case 1:if(g=p.payload,typeof g=="function"){f=g.call(b,f,d);break t}f=g;break t;case 3:g.flags=g.flags&-65537|128;case 0:if(g=p.payload,d=typeof g=="function"?g.call(b,f,d):g,d==null)break t;f=Et({},f,d);break t;case 2:Bn=!0}}d=c.callback,d!==null&&(t.flags|=64,h&&(t.flags|=8192),h=a.callbacks,h===null?a.callbacks=[d]:h.push(d))}else h={lane:d,tag:c.tag,payload:c.payload,callback:c.callback,next:null},r===null?(o=r=h,s=f):r=r.next=h,u|=d;if(c=c.next,c===null){if(c=a.shared.pending,c===null)break;h=c,c=h.next,h.next=null,a.lastBaseUpdate=h,a.shared.pending=null}}while(!0);r===null&&(s=f),a.baseState=s,a.firstBaseUpdate=o,a.lastBaseUpdate=r,i===null&&(a.shared.lanes=0),sl|=u,t.lanes=u,t.memoizedState=f}}function Ay(t,e){if(typeof t!="function")throw Error(q(191,t));t.call(e)}function Ty(t,e){var n=t.callbacks;if(n!==null)for(t.callbacks=null,t=0;t<n.length;t++)Ay(n[t],e)}var Ha=en(null),Dc=en(0);function gh(t,e){t=Mn,pt(Dc,t),pt(Ha,e),Mn=t|e.baseLanes}function gr(){pt(Dc,Mn),pt(Ha,Ha.current)}function Hf(){Mn=Dc.current,Vt(Ha),Vt(Dc)}var Ae=en(null),Be=null;function Yn(t){var e=t.alternate;pt(Mt,Mt.current&1),pt(Ae,t),Be===null&&(e===null||Ha.current!==null||e.memoizedState!==null)&&(Be=t)}function pr(t){pt(Mt,Mt.current),pt(Ae,t),Be===null&&(Be=t)}function Ny(t){t.tag===22?(pt(Mt,Mt.current),pt(Ae,t),Be===null&&(Be=t)):Vn()}function Vn(){pt(Mt,Mt.current),pt(Ae,Ae.current)}function pe(t){Vt(Ae),Be===t&&(Be=null),Vt(Mt)}var Mt=en(0);function Uc(t){for(var e=t;e!==null;){if(e.tag===13){var n=e.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Br(n)||jr(n)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Tn=0,I=null,yt=null,Ct=null,Hc=!1,Ta=!1,jl=!1,Bc=0,ki=0,Na=null,qb=0;function At(){throw Error(q(321))}function Bf(t,e){if(e===null)return!1;for(var n=0;n<e.length&&n<t.length;n++)if(!we(t[n],e[n]))return!1;return!0}function jf(t,e,n,l,a,i){return Tn=i,I=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,k.H=t===null||t.memoizedState===null?ag:Jf,jl=!1,i=n(l,a),jl=!1,Ta&&(i=My(e,n,l,a)),zy(t),i}function zy(t){k.H=Fi;var e=yt!==null&&yt.next!==null;if(Tn=0,Ct=yt=I=null,Hc=!1,ki=0,Na=null,e)throw Error(q(300));t===null||Ut||(t=t.dependencies,t!==null&&Cc(t)&&(Ut=!0))}function My(t,e,n,l){I=t;var a=0;do{if(Ta&&(Na=null),ki=0,Ta=!1,25<=a)throw Error(q(301));if(a+=1,Ct=yt=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}k.H=ig,i=e(n,l)}while(Ta);return i}function Yb(){var t=k.H,e=t.useState()[0];return e=typeof e.then=="function"?pu(e):e,t=t.useState()[0],(yt!==null?yt.memoizedState:null)!==t&&(I.flags|=1024),e}function Lf(){var t=Bc!==0;return Bc=0,t}function qf(t,e,n){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~n}function Yf(t){if(Hc){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}Hc=!1}Tn=0,Ct=yt=I=null,Ta=!1,ki=Bc=0,Na=null}function ne(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ct===null?I.memoizedState=Ct=t:Ct=Ct.next=t,Ct}function Ot(){if(yt===null){var t=I.alternate;t=t!==null?t.memoizedState:null}else t=yt.next;var e=Ct===null?I.memoizedState:Ct.next;if(e!==null)Ct=e,yt=t;else{if(t===null)throw I.alternate===null?Error(q(467)):Error(q(310));yt=t,t={memoizedState:yt.memoizedState,baseState:yt.baseState,baseQueue:yt.baseQueue,queue:yt.queue,next:null},Ct===null?I.memoizedState=Ct=t:Ct=Ct.next=t}return Ct}function Ss(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function pu(t){var e=ki;return ki+=1,Na===null&&(Na=[]),t=Ey(Na,t,e),e=I,(Ct===null?e.memoizedState:Ct.next)===null&&(e=e.alternate,k.H=e===null||e.memoizedState===null?ag:Jf),t}function bs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return pu(t);if(t.$$typeof===pn)return Jt(t)}throw Error(q(438,String(t)))}function Vf(t){var e=null,n=I.updateQueue;if(n!==null&&(e=n.memoCache),e==null){var l=I.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(e={data:l.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),n===null&&(n=Ss(),I.updateQueue=n),n.memoCache=e,n=e.data[e.index],n===void 0)for(n=e.data[e.index]=Array(t),l=0;l<t;l++)n[l]=AS;return e.index++,n}function Nn(t,e){return typeof e=="function"?e(t):e}function cc(t){var e=Ot();return Xf(e,yt,t)}function Xf(t,e,n){var l=t.queue;if(l===null)throw Error(q(311));l.lastRenderedReducer=n;var a=t.baseQueue,i=l.pending;if(i!==null){if(a!==null){var u=a.next;a.next=i.next,i.next=u}e.baseQueue=a=i,l.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var c=u=null,s=null,o=e,r=!1;do{var f=o.lane&-536870913;if(f!==o.lane?(lt&f)===f:(Tn&f)===f){var d=o.revertLane;if(d===0)s!==null&&(s=s.next={lane:0,revertLane:0,gesture:null,action:o.action,hasEagerState:o.hasEagerState,eagerState:o.eagerState,next:null}),f===Ua&&(r=!0);else if((Tn&d)===d){o=o.next,d===Ua&&(r=!0);continue}else f={lane:0,revertLane:o.revertLane,gesture:null,action:o.action,hasEagerState:o.hasEagerState,eagerState:o.eagerState,next:null},s===null?(c=s=f,u=i):s=s.next=f,I.lanes|=d,sl|=d;f=o.action,jl&&n(i,f),i=o.hasEagerState?o.eagerState:n(i,f)}else d={lane:f,revertLane:o.revertLane,gesture:o.gesture,action:o.action,hasEagerState:o.hasEagerState,eagerState:o.eagerState,next:null},s===null?(c=s=d,u=i):s=s.next=d,I.lanes|=f,sl|=f;o=o.next}while(o!==null&&o!==e);if(s===null?u=i:s.next=c,!we(i,t.memoizedState)&&(Ut=!0,r&&(n=wa,n!==null)))throw n;t.memoizedState=i,t.baseState=u,t.baseQueue=s,l.lastRenderedState=i}return a===null&&(l.lanes=0),[t.memoizedState,l.dispatch]}function so(t){var e=Ot(),n=e.queue;if(n===null)throw Error(q(311));n.lastRenderedReducer=t;var l=n.dispatch,a=n.pending,i=e.memoizedState;if(a!==null){n.pending=null;var u=a=a.next;do i=t(i,u.action),u=u.next;while(u!==a);we(i,e.memoizedState)||(Ut=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),n.lastRenderedState=i}return[i,l]}function Oy(t,e,n){var l=I,a=Ot(),i=it;if(i){if(n===void 0)throw Error(q(407));n=n()}else n=e();var u=!we((yt||a).memoizedState,n);if(u&&(a.memoizedState=n,Ut=!0),a=a.queue,Gf(Dy.bind(null,l,a,t),[t]),a.getSnapshot!==e||u||Ct!==null&&Ct.memoizedState.tag&1){if(l.flags|=2048,Ba(9,{destroy:void 0},Ry.bind(null,l,a,n,e),null),gt===null)throw Error(q(349));i||Tn&127||Cy(l,e,n)}return n}function Cy(t,e,n){t.flags|=16384,t={getSnapshot:e,value:n},e=I.updateQueue,e===null?(e=Ss(),I.updateQueue=e,e.stores=[t]):(n=e.stores,n===null?e.stores=[t]:n.push(t))}function Ry(t,e,n,l){e.value=n,e.getSnapshot=l,Uy(e)&&Hy(t)}function Dy(t,e,n){return n(function(){Uy(e)&&Hy(t)})}function Uy(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!we(t,n)}catch{return!0}}function Hy(t){var e=Ql(t,2);e!==null&&re(e,t,2)}function vr(t){var e=ne();if(typeof t=="function"){var n=t;if(t=n(),jl){Zn(!0);try{n()}finally{Zn(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:t},e}function By(t,e,n,l){return t.baseState=n,Xf(t,yt,typeof l=="function"?l:Nn)}function Vb(t,e,n,l,a){if(Es(t))throw Error(q(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};k.T!==null?n(!0):i.isTransition=!1,l(i),n=e.pending,n===null?(i.next=e.pending=i,jy(e,i)):(i.next=n.next,e.pending=n.next=i)}}function jy(t,e){var n=e.action,l=e.payload,a=t.state;if(e.isTransition){var i=k.T,u={};k.T=u;try{var c=n(a,l),s=k.S;s!==null&&s(u,c),ph(t,e,c)}catch(o){Sr(t,e,o)}finally{i!==null&&u.types!==null&&(i.types=u.types),k.T=i}}else try{i=n(a,l),ph(t,e,i)}catch(o){Sr(t,e,o)}}function ph(t,e,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){vh(t,e,l)},function(l){return Sr(t,e,l)}):vh(t,e,n)}function vh(t,e,n){e.status="fulfilled",e.value=n,Ly(e),t.state=n,e=t.pending,e!==null&&(n=e.next,n===e?t.pending=null:(n=n.next,e.next=n,jy(t,n)))}function Sr(t,e,n){var l=t.pending;if(t.pending=null,l!==null){l=l.next;do e.status="rejected",e.reason=n,Ly(e),e=e.next;while(e!==l)}t.action=null}function Ly(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function qy(t,e){return e}function Sh(t,e){if(it){var n=gt.formState;if(n!==null){t:{var l=I;if(it){if(bt){e:{for(var a=bt,i=De;a.nodeType!==8;){if(!i){a=null;break e}if(a=je(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){bt=je(a.nextSibling),l=a.data==="F!";break t}}ul(l)}l=!1}l&&(e=n[0])}}return n=ne(),n.memoizedState=n.baseState=e,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qy,lastRenderedState:e},n.queue=l,n=eg.bind(null,I,l),l.dispatch=n,l=vr(!1),i=Kf.bind(null,I,!1,l.queue),l=ne(),a={state:e,dispatch:null,action:t,pending:null},l.queue=a,n=Vb.bind(null,I,a,i,n),a.dispatch=n,l.memoizedState=t,[e,n,!1]}function bh(t){var e=Ot();return Yy(e,yt,t)}function Yy(t,e,n){if(e=Xf(t,e,qy)[0],t=cc(Nn)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var l=pu(e)}catch(u){throw u===Wa?vs:u}else l=e;e=Ot();var a=e.queue,i=a.dispatch;return n!==e.memoizedState&&(I.flags|=2048,Ba(9,{destroy:void 0},Xb.bind(null,a,n),null)),[l,i,t]}function Xb(t,e){t.action=e}function xh(t){var e=Ot(),n=yt;if(n!==null)return Yy(e,n,t);Ot(),e=e.memoizedState,n=Ot();var l=n.queue.dispatch;return n.memoizedState=t,[e,l,!1]}function Ba(t,e,n,l){return t={tag:t,create:n,deps:l,inst:e,next:null},e=I.updateQueue,e===null&&(e=Ss(),I.updateQueue=e),n=e.lastEffect,n===null?e.lastEffect=t.next=t:(l=n.next,n.next=t,t.next=l,e.lastEffect=t),t}function Vy(){return Ot().memoizedState}function sc(t,e,n,l){var a=ne();I.flags|=t,a.memoizedState=Ba(1|e,{destroy:void 0},n,l===void 0?null:l)}function xs(t,e,n,l){var a=Ot();l=l===void 0?null:l;var i=a.memoizedState.inst;yt!==null&&l!==null&&Bf(l,yt.memoizedState.deps)?a.memoizedState=Ba(e,i,n,l):(I.flags|=t,a.memoizedState=Ba(1|e,i,n,l))}function Eh(t,e){sc(8390656,8,t,e)}function Gf(t,e){xs(2048,8,t,e)}function Gb(t){I.flags|=4;var e=I.updateQueue;if(e===null)e=Ss(),I.updateQueue=e,e.events=[t];else{var n=e.events;n===null?e.events=[t]:n.push(t)}}function Xy(t){var e=Ot().memoizedState;return Gb({ref:e,nextImpl:t}),function(){if(st&2)throw Error(q(440));return e.impl.apply(void 0,arguments)}}function Gy(t,e){return xs(4,2,t,e)}function Zy(t,e){return xs(4,4,t,e)}function $y(t,e){if(typeof e=="function"){t=t();var n=e(t);return function(){typeof n=="function"?n():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function Qy(t,e,n){n=n!=null?n.concat([t]):null,xs(4,4,$y.bind(null,e,t),n)}function Zf(){}function Ky(t,e){var n=Ot();e=e===void 0?null:e;var l=n.memoizedState;return e!==null&&Bf(e,l[1])?l[0]:(n.memoizedState=[t,e],t)}function Jy(t,e){var n=Ot();e=e===void 0?null:e;var l=n.memoizedState;if(e!==null&&Bf(e,l[1]))return l[0];if(l=t(),jl){Zn(!0);try{t()}finally{Zn(!1)}}return n.memoizedState=[l,e],l}function $f(t,e,n){return n===void 0||Tn&1073741824&&!(lt&261930)?t.memoizedState=e:(t.memoizedState=n,t=Bg(),I.lanes|=t,sl|=t,n)}function ky(t,e,n,l){return we(n,e)?n:Ha.current!==null?(t=$f(t,n,l),we(t,e)||(Ut=!0),t):!(Tn&42)||Tn&1073741824&&!(lt&261930)?(Ut=!0,t.memoizedState=n):(t=Bg(),I.lanes|=t,sl|=t,e)}function Fy(t,e,n,l,a){var i=ot.p;ot.p=i!==0&&8>i?i:8;var u=k.T,c={};k.T=c,Kf(t,!1,e,n);try{var s=a(),o=k.S;if(o!==null&&o(c,s),s!==null&&typeof s=="object"&&typeof s.then=="function"){var r=Lb(s,l);Bi(t,e,r,_e(t))}else Bi(t,e,l,_e(t))}catch(f){Bi(t,e,{then:function(){},status:"rejected",reason:f},_e())}finally{ot.p=i,u!==null&&c.types!==null&&(u.types=c.types),k.T=u}}function Zb(){}function br(t,e,n,l){if(t.tag!==5)throw Error(q(476));var a=Wy(t).queue;Fy(t,a,e,Tl,n===null?Zb:function(){return Iy(t),n(l)})}function Wy(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:Tl,baseState:Tl,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:Tl},next:null};var n={};return e.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:n},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function Iy(t){var e=Wy(t);e.next===null&&(e=t.alternate.memoizedState),Bi(t,e.next.queue,{},_e())}function Qf(){return Jt(Pi)}function Py(){return Ot().memoizedState}function tg(){return Ot().memoizedState}function $b(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var n=_e();t=Wn(n);var l=In(e,t,n);l!==null&&(re(l,e,n),Di(l,e,n)),e={cache:Cf()},t.payload=e;return}e=e.return}}function Qb(t,e,n){var l=_e();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Es(t)?ng(e,n):(n=Nf(t,e,n,l),n!==null&&(re(n,t,l),lg(n,e,l)))}function eg(t,e,n){var l=_e();Bi(t,e,n,l)}function Bi(t,e,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Es(t))ng(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var u=e.lastRenderedState,c=i(u,n);if(a.hasEagerState=!0,a.eagerState=c,we(c,u))return ps(t,e,a,0),gt===null&&gs(),!1}catch{}finally{}if(n=Nf(t,e,a,l),n!==null)return re(n,t,l),lg(n,e,l),!0}return!1}function Kf(t,e,n,l){if(l={lane:2,revertLane:nd(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Es(t)){if(e)throw Error(q(479))}else e=Nf(t,n,l,2),e!==null&&re(e,t,2)}function Es(t){var e=t.alternate;return t===I||e!==null&&e===I}function ng(t,e){Ta=Hc=!0;var n=t.pending;n===null?e.next=e:(e.next=n.next,n.next=e),t.pending=e}function lg(t,e,n){if(n&4194048){var l=e.lanes;l&=t.pendingLanes,n|=l,e.lanes=n,X0(t,n)}}var Fi={readContext:Jt,use:bs,useCallback:At,useContext:At,useEffect:At,useImperativeHandle:At,useLayoutEffect:At,useInsertionEffect:At,useMemo:At,useReducer:At,useRef:At,useState:At,useDebugValue:At,useDeferredValue:At,useTransition:At,useSyncExternalStore:At,useId:At,useHostTransitionStatus:At,useFormState:At,useActionState:At,useOptimistic:At,useMemoCache:At,useCacheRefresh:At};Fi.useEffectEvent=At;var ag={readContext:Jt,use:bs,useCallback:function(t,e){return ne().memoizedState=[t,e===void 0?null:e],t},useContext:Jt,useEffect:Eh,useImperativeHandle:function(t,e,n){n=n!=null?n.concat([t]):null,sc(4194308,4,$y.bind(null,e,t),n)},useLayoutEffect:function(t,e){return sc(4194308,4,t,e)},useInsertionEffect:function(t,e){sc(4,2,t,e)},useMemo:function(t,e){var n=ne();e=e===void 0?null:e;var l=t();if(jl){Zn(!0);try{t()}finally{Zn(!1)}}return n.memoizedState=[l,e],l},useReducer:function(t,e,n){var l=ne();if(n!==void 0){var a=n(e);if(jl){Zn(!0);try{n(e)}finally{Zn(!1)}}}else a=e;return l.memoizedState=l.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},l.queue=t,t=t.dispatch=Qb.bind(null,I,t),[l.memoizedState,t]},useRef:function(t){var e=ne();return t={current:t},e.memoizedState=t},useState:function(t){t=vr(t);var e=t.queue,n=eg.bind(null,I,e);return e.dispatch=n,[t.memoizedState,n]},useDebugValue:Zf,useDeferredValue:function(t,e){var n=ne();return $f(n,t,e)},useTransition:function(){var t=vr(!1);return t=Fy.bind(null,I,t.queue,!0,!1),ne().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,n){var l=I,a=ne();if(it){if(n===void 0)throw Error(q(407));n=n()}else{if(n=e(),gt===null)throw Error(q(349));lt&127||Cy(l,e,n)}a.memoizedState=n;var i={value:n,getSnapshot:e};return a.queue=i,Eh(Dy.bind(null,l,i,t),[t]),l.flags|=2048,Ba(9,{destroy:void 0},Ry.bind(null,l,i,n,e),null),n},useId:function(){var t=ne(),e=gt.identifierPrefix;if(it){var n=We,l=Fe;n=(l&~(1<<32-Ee(l)-1)).toString(32)+n,e="_"+e+"R_"+n,n=Bc++,0<n&&(e+="H"+n.toString(32)),e+="_"}else n=qb++,e="_"+e+"r_"+n.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:Qf,useFormState:Sh,useActionState:Sh,useOptimistic:function(t){var e=ne();e.memoizedState=e.baseState=t;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=n,e=Kf.bind(null,I,!0,n),n.dispatch=e,[t,e]},useMemoCache:Vf,useCacheRefresh:function(){return ne().memoizedState=$b.bind(null,I)},useEffectEvent:function(t){var e=ne(),n={impl:t};return e.memoizedState=n,function(){if(st&2)throw Error(q(440));return n.impl.apply(void 0,arguments)}}},Jf={readContext:Jt,use:bs,useCallback:Ky,useContext:Jt,useEffect:Gf,useImperativeHandle:Qy,useInsertionEffect:Gy,useLayoutEffect:Zy,useMemo:Jy,useReducer:cc,useRef:Vy,useState:function(){return cc(Nn)},useDebugValue:Zf,useDeferredValue:function(t,e){var n=Ot();return ky(n,yt.memoizedState,t,e)},useTransition:function(){var t=cc(Nn)[0],e=Ot().memoizedState;return[typeof t=="boolean"?t:pu(t),e]},useSyncExternalStore:Oy,useId:Py,useHostTransitionStatus:Qf,useFormState:bh,useActionState:bh,useOptimistic:function(t,e){var n=Ot();return By(n,yt,t,e)},useMemoCache:Vf,useCacheRefresh:tg};Jf.useEffectEvent=Xy;var ig={readContext:Jt,use:bs,useCallback:Ky,useContext:Jt,useEffect:Gf,useImperativeHandle:Qy,useInsertionEffect:Gy,useLayoutEffect:Zy,useMemo:Jy,useReducer:so,useRef:Vy,useState:function(){return so(Nn)},useDebugValue:Zf,useDeferredValue:function(t,e){var n=Ot();return yt===null?$f(n,t,e):ky(n,yt.memoizedState,t,e)},useTransition:function(){var t=so(Nn)[0],e=Ot().memoizedState;return[typeof t=="boolean"?t:pu(t),e]},useSyncExternalStore:Oy,useId:Py,useHostTransitionStatus:Qf,useFormState:xh,useActionState:xh,useOptimistic:function(t,e){var n=Ot();return yt!==null?By(n,yt,t,e):(n.baseState=t,[t,n.queue.dispatch])},useMemoCache:Vf,useCacheRefresh:tg};ig.useEffectEvent=Xy;function oo(t,e,n,l){e=t.memoizedState,n=n(l,e),n=n==null?e:Et({},e,n),t.memoizedState=n,t.lanes===0&&(t.updateQueue.baseState=n)}var xr={enqueueSetState:function(t,e,n){t=t._reactInternals;var l=_e(),a=Wn(l);a.payload=e,n!=null&&(a.callback=n),e=In(t,a,l),e!==null&&(re(e,t,l),Di(e,t,l))},enqueueReplaceState:function(t,e,n){t=t._reactInternals;var l=_e(),a=Wn(l);a.tag=1,a.payload=e,n!=null&&(a.callback=n),e=In(t,a,l),e!==null&&(re(e,t,l),Di(e,t,l))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var n=_e(),l=Wn(n);l.tag=2,e!=null&&(l.callback=e),e=In(t,l,n),e!==null&&(re(e,t,n),Di(e,t,n))}};function _h(t,e,n,l,a,i,u){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(l,i,u):e.prototype&&e.prototype.isPureReactComponent?!$i(n,l)||!$i(a,i):!0}function wh(t,e,n,l){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(n,l),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(n,l),e.state!==t&&xr.enqueueReplaceState(e,e.state,null)}function Ll(t,e){var n=e;if("ref"in e){n={};for(var l in e)l!=="ref"&&(n[l]=e[l])}if(t=t.defaultProps){n===e&&(n=Et({},n));for(var a in t)n[a]===void 0&&(n[a]=t[a])}return n}function ug(t){zc(t)}function cg(t){console.error(t)}function sg(t){zc(t)}function jc(t,e){try{var n=t.onUncaughtError;n(e.value,{componentStack:e.stack})}catch(l){setTimeout(function(){throw l})}}function Ah(t,e,n){try{var l=t.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Er(t,e,n){return n=Wn(n),n.tag=3,n.payload={element:null},n.callback=function(){jc(t,e)},n}function og(t){return t=Wn(t),t.tag=3,t}function rg(t,e,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;t.payload=function(){return a(i)},t.callback=function(){Ah(e,n,l)}}var u=n.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(t.callback=function(){Ah(e,n,l),typeof a!="function"&&(Pn===null?Pn=new Set([this]):Pn.add(this));var c=l.stack;this.componentDidCatch(l.value,{componentStack:c!==null?c:""})})}function Kb(t,e,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(e=n.alternate,e!==null&&Fa(e,n,a,!0),n=Ae.current,n!==null){switch(n.tag){case 31:case 13:return Be===null?Xc():n.alternate===null&&Tt===0&&(Tt=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Rc?n.flags|=16384:(e=n.updateQueue,e===null?n.updateQueue=new Set([l]):e.add(l),xo(t,l,a)),!1;case 22:return n.flags|=65536,l===Rc?n.flags|=16384:(e=n.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=e):(n=e.retryQueue,n===null?e.retryQueue=new Set([l]):n.add(l)),xo(t,l,a)),!1}throw Error(q(435,n.tag))}return xo(t,l,a),Xc(),!1}if(it)return e=Ae.current,e!==null?(!(e.flags&65536)&&(e.flags|=256),e.flags|=65536,e.lanes=a,l!==or&&(t=Error(q(422),{cause:l}),Ki(Re(t,n)))):(l!==or&&(e=Error(q(423),{cause:l}),Ki(Re(e,n))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,l=Re(l,n),a=Er(t.stateNode,l,a),co(t,a),Tt!==4&&(Tt=2)),!1;var i=Error(q(520),{cause:l});if(i=Re(i,n),qi===null?qi=[i]:qi.push(i),Tt!==4&&(Tt=2),e===null)return!0;l=Re(l,n),n=e;do{switch(n.tag){case 3:return n.flags|=65536,t=a&-a,n.lanes|=t,t=Er(n.stateNode,l,t),co(n,t),!1;case 1:if(e=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Pn===null||!Pn.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=og(a),rg(a,t,n,l),co(n,a),!1}n=n.return}while(n!==null);return!1}var kf=Error(q(461)),Ut=!1;function $t(t,e,n,l){e.child=t===null?wy(e,null,n,l):Bl(e,t.child,n,l)}function Th(t,e,n,l,a){n=n.render;var i=e.ref;if("ref"in l){var u={};for(var c in l)c!=="ref"&&(u[c]=l[c])}else u=l;return Hl(e),l=jf(t,e,n,u,i,a),c=Lf(),t!==null&&!Ut?(qf(t,e,a),zn(t,e,a)):(it&&c&&Mf(e),e.flags|=1,$t(t,e,l,a),e.child)}function Nh(t,e,n,l,a){if(t===null){var i=n.type;return typeof i=="function"&&!zf(i)&&i.defaultProps===void 0&&n.compare===null?(e.tag=15,e.type=i,fg(t,e,i,l,a)):(t=ic(n.type,null,l,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!Ff(t,a)){var u=i.memoizedProps;if(n=n.compare,n=n!==null?n:$i,n(u,l)&&t.ref===e.ref)return zn(t,e,a)}return e.flags|=1,t=xn(i,l),t.ref=e.ref,t.return=e,e.child=t}function fg(t,e,n,l,a){if(t!==null){var i=t.memoizedProps;if($i(i,l)&&t.ref===e.ref)if(Ut=!1,e.pendingProps=l=i,Ff(t,a))t.flags&131072&&(Ut=!0);else return e.lanes=t.lanes,zn(t,e,a)}return _r(t,e,n,l,a)}function dg(t,e,n,l){var a=l.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if(e.flags&128){if(i=i!==null?i.baseLanes|n:n,t!==null){for(l=e.child=t.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,e.child=null;return zh(t,e,i,n,l)}if(n&536870912)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&uc(e,i!==null?i.cachePool:null),i!==null?gh(e,i):gr(),Ny(e);else return l=e.lanes=536870912,zh(t,e,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(uc(e,i.cachePool),gh(e,i),Vn(),e.memoizedState=null):(t!==null&&uc(e,null),gr(),Vn());return $t(t,e,a,n),e.child}function _i(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function zh(t,e,n,l,a){var i=Rf();return i=i===null?null:{parent:Dt._currentValue,pool:i},e.memoizedState={baseLanes:n,cachePool:i},t!==null&&uc(e,null),gr(),Ny(e),t!==null&&Fa(t,e,l,!0),e.childLanes=a,null}function oc(t,e){return e=Lc({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Mh(t,e,n){return Bl(e,t.child,null,n),t=oc(e,e.pendingProps),t.flags|=2,pe(e),e.memoizedState=null,t}function Jb(t,e,n){var l=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(it){if(l.mode==="hidden")return t=oc(e,l),e.lanes=536870912,_i(null,t);if(pr(e),(t=bt)?(t=ap(t,De),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:il!==null?{id:Fe,overflow:We}:null,retryLane:536870912,hydrationErrors:null},n=py(t),n.return=e,e.child=n,Kt=e,bt=null)):t=null,t===null)throw ul(e);return e.lanes=536870912,null}return oc(e,l)}var i=t.memoizedState;if(i!==null){var u=i.dehydrated;if(pr(e),a)if(e.flags&256)e.flags&=-257,e=Mh(t,e,n);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(q(558));else if(Ut||Fa(t,e,n,!1),a=(n&t.childLanes)!==0,Ut||a){if(l=gt,l!==null&&(u=G0(l,n),u!==0&&u!==i.retryLane))throw i.retryLane=u,Ql(t,u),re(l,t,u),kf;Xc(),e=Mh(t,e,n)}else t=i.treeContext,bt=je(u.nextSibling),Kt=e,it=!0,Fn=null,De=!1,t!==null&&Sy(e,t),e=oc(e,l),e.flags|=4096;return e}return t=xn(t.child,{mode:l.mode,children:l.children}),t.ref=e.ref,e.child=t,t.return=e,t}function rc(t,e){var n=e.ref;if(n===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(q(284));(t===null||t.ref!==n)&&(e.flags|=4194816)}}function _r(t,e,n,l,a){return Hl(e),n=jf(t,e,n,l,void 0,a),l=Lf(),t!==null&&!Ut?(qf(t,e,a),zn(t,e,a)):(it&&l&&Mf(e),e.flags|=1,$t(t,e,n,a),e.child)}function Oh(t,e,n,l,a,i){return Hl(e),e.updateQueue=null,n=My(e,l,n,a),zy(t),l=Lf(),t!==null&&!Ut?(qf(t,e,i),zn(t,e,i)):(it&&l&&Mf(e),e.flags|=1,$t(t,e,n,i),e.child)}function Ch(t,e,n,l,a){if(Hl(e),e.stateNode===null){var i=ga,u=n.contextType;typeof u=="object"&&u!==null&&(i=Jt(u)),i=new n(l,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=xr,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=l,i.state=e.memoizedState,i.refs={},Uf(e),u=n.contextType,i.context=typeof u=="object"&&u!==null?Jt(u):ga,i.state=e.memoizedState,u=n.getDerivedStateFromProps,typeof u=="function"&&(oo(e,n,u,l),i.state=e.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&xr.enqueueReplaceState(i,i.state,null),Hi(e,l,i,a),Ui(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),l=!0}else if(t===null){i=e.stateNode;var c=e.memoizedProps,s=Ll(n,c);i.props=s;var o=i.context,r=n.contextType;u=ga,typeof r=="object"&&r!==null&&(u=Jt(r));var f=n.getDerivedStateFromProps;r=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function",c=e.pendingProps!==c,r||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c||o!==u)&&wh(e,i,l,u),Bn=!1;var d=e.memoizedState;i.state=d,Hi(e,l,i,a),Ui(),o=e.memoizedState,c||d!==o||Bn?(typeof f=="function"&&(oo(e,n,f,l),o=e.memoizedState),(s=Bn||_h(e,n,s,l,d,o,u))?(r||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=l,e.memoizedState=o),i.props=l,i.state=o,i.context=u,l=s):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),l=!1)}else{i=e.stateNode,mr(t,e),u=e.memoizedProps,r=Ll(n,u),i.props=r,f=e.pendingProps,d=i.context,o=n.contextType,s=ga,typeof o=="object"&&o!==null&&(s=Jt(o)),c=n.getDerivedStateFromProps,(o=typeof c=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==f||d!==s)&&wh(e,i,l,s),Bn=!1,d=e.memoizedState,i.state=d,Hi(e,l,i,a),Ui();var h=e.memoizedState;u!==f||d!==h||Bn||t!==null&&t.dependencies!==null&&Cc(t.dependencies)?(typeof c=="function"&&(oo(e,n,c,l),h=e.memoizedState),(r=Bn||_h(e,n,r,l,d,h,s)||t!==null&&t.dependencies!==null&&Cc(t.dependencies))?(o||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,h,s),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,h,s)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),e.memoizedProps=l,e.memoizedState=h),i.props=l,i.state=h,i.context=s,l=r):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&d===t.memoizedState||(e.flags|=1024),l=!1)}return i=l,rc(t,e),l=(e.flags&128)!==0,i||l?(i=e.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&l?(e.child=Bl(e,t.child,null,a),e.child=Bl(e,null,n,a)):$t(t,e,n,a),e.memoizedState=i.state,t=e.child):t=zn(t,e,a),t}function Rh(t,e,n,l){return Ul(),e.flags|=256,$t(t,e,n,l),e.child}var ro={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function fo(t){return{baseLanes:t,cachePool:xy()}}function ho(t,e,n){return t=t!==null?t.childLanes&~n:0,e&&(t|=Se),t}function hg(t,e,n){var l=e.pendingProps,a=!1,i=(e.flags&128)!==0,u;if((u=i)||(u=t!==null&&t.memoizedState===null?!1:(Mt.current&2)!==0),u&&(a=!0,e.flags&=-129),u=(e.flags&32)!==0,e.flags&=-33,t===null){if(it){if(a?Yn(e):Vn(),(t=bt)?(t=ap(t,De),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:il!==null?{id:Fe,overflow:We}:null,retryLane:536870912,hydrationErrors:null},n=py(t),n.return=e,e.child=n,Kt=e,bt=null)):t=null,t===null)throw ul(e);return jr(t)?e.lanes=32:e.lanes=536870912,null}var c=l.children;return l=l.fallback,a?(Vn(),a=e.mode,c=Lc({mode:"hidden",children:c},a),l=Nl(l,a,n,null),c.return=e,l.return=e,c.sibling=l,e.child=c,l=e.child,l.memoizedState=fo(n),l.childLanes=ho(t,u,n),e.memoizedState=ro,_i(null,l)):(Yn(e),wr(e,c))}var s=t.memoizedState;if(s!==null&&(c=s.dehydrated,c!==null)){if(i)e.flags&256?(Yn(e),e.flags&=-257,e=mo(t,e,n)):e.memoizedState!==null?(Vn(),e.child=t.child,e.flags|=128,e=null):(Vn(),c=l.fallback,a=e.mode,l=Lc({mode:"visible",children:l.children},a),c=Nl(c,a,n,null),c.flags|=2,l.return=e,c.return=e,l.sibling=c,e.child=l,Bl(e,t.child,null,n),l=e.child,l.memoizedState=fo(n),l.childLanes=ho(t,u,n),e.memoizedState=ro,e=_i(null,l));else if(Yn(e),jr(c)){if(u=c.nextSibling&&c.nextSibling.dataset,u)var o=u.dgst;u=o,l=Error(q(419)),l.stack="",l.digest=u,Ki({value:l,source:null,stack:null}),e=mo(t,e,n)}else if(Ut||Fa(t,e,n,!1),u=(n&t.childLanes)!==0,Ut||u){if(u=gt,u!==null&&(l=G0(u,n),l!==0&&l!==s.retryLane))throw s.retryLane=l,Ql(t,l),re(u,t,l),kf;Br(c)||Xc(),e=mo(t,e,n)}else Br(c)?(e.flags|=192,e.child=t.child,e=null):(t=s.treeContext,bt=je(c.nextSibling),Kt=e,it=!0,Fn=null,De=!1,t!==null&&Sy(e,t),e=wr(e,l.children),e.flags|=4096);return e}return a?(Vn(),c=l.fallback,a=e.mode,s=t.child,o=s.sibling,l=xn(s,{mode:"hidden",children:l.children}),l.subtreeFlags=s.subtreeFlags&65011712,o!==null?c=xn(o,c):(c=Nl(c,a,n,null),c.flags|=2),c.return=e,l.return=e,l.sibling=c,e.child=l,_i(null,l),l=e.child,c=t.child.memoizedState,c===null?c=fo(n):(a=c.cachePool,a!==null?(s=Dt._currentValue,a=a.parent!==s?{parent:s,pool:s}:a):a=xy(),c={baseLanes:c.baseLanes|n,cachePool:a}),l.memoizedState=c,l.childLanes=ho(t,u,n),e.memoizedState=ro,_i(t.child,l)):(Yn(e),n=t.child,t=n.sibling,n=xn(n,{mode:"visible",children:l.children}),n.return=e,n.sibling=null,t!==null&&(u=e.deletions,u===null?(e.deletions=[t],e.flags|=16):u.push(t)),e.child=n,e.memoizedState=null,n)}function wr(t,e){return e=Lc({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Lc(t,e){return t=ve(22,t,null,e),t.lanes=0,t}function mo(t,e,n){return Bl(e,t.child,null,n),t=wr(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Dh(t,e,n){t.lanes|=e;var l=t.alternate;l!==null&&(l.lanes|=e),fr(t.return,e,n)}function yo(t,e,n,l,a,i){var u=t.memoizedState;u===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(u.isBackwards=e,u.rendering=null,u.renderingStartTime=0,u.last=l,u.tail=n,u.tailMode=a,u.treeForkCount=i)}function mg(t,e,n){var l=e.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var u=Mt.current,c=(u&2)!==0;if(c?(u=u&1|2,e.flags|=128):u&=1,pt(Mt,u),$t(t,e,l,n),l=it?Qi:0,!c&&t!==null&&t.flags&128)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Dh(t,n,e);else if(t.tag===19)Dh(t,n,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":for(n=e.child,a=null;n!==null;)t=n.alternate,t!==null&&Uc(t)===null&&(a=n),n=n.sibling;n=a,n===null?(a=e.child,e.child=null):(a=n.sibling,n.sibling=null),yo(e,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&Uc(t)===null){e.child=a;break}t=a.sibling,a.sibling=n,n=a,a=t}yo(e,!0,n,null,i,l);break;case"together":yo(e,!1,null,null,void 0,l);break;default:e.memoizedState=null}return e.child}function zn(t,e,n){if(t!==null&&(e.dependencies=t.dependencies),sl|=e.lanes,!(n&e.childLanes))if(t!==null){if(Fa(t,e,n,!1),(n&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(q(153));if(e.child!==null){for(t=e.child,n=xn(t,t.pendingProps),e.child=n,n.return=e;t.sibling!==null;)t=t.sibling,n=n.sibling=xn(t,t.pendingProps),n.return=e;n.sibling=null}return e.child}function Ff(t,e){return t.lanes&e?!0:(t=t.dependencies,!!(t!==null&&Cc(t)))}function kb(t,e,n){switch(e.tag){case 3:wc(e,e.stateNode.containerInfo),qn(e,Dt,t.memoizedState.cache),Ul();break;case 27:case 5:Io(e);break;case 4:wc(e,e.stateNode.containerInfo);break;case 10:qn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,pr(e),null;break;case 13:var l=e.memoizedState;if(l!==null)return l.dehydrated!==null?(Yn(e),e.flags|=128,null):n&e.child.childLanes?hg(t,e,n):(Yn(e),t=zn(t,e,n),t!==null?t.sibling:null);Yn(e);break;case 19:var a=(t.flags&128)!==0;if(l=(n&e.childLanes)!==0,l||(Fa(t,e,n,!1),l=(n&e.childLanes)!==0),a){if(l)return mg(t,e,n);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),pt(Mt,Mt.current),l)break;return null;case 22:return e.lanes=0,dg(t,e,n,e.pendingProps);case 24:qn(e,Dt,t.memoizedState.cache)}return zn(t,e,n)}function yg(t,e,n){if(t!==null)if(t.memoizedProps!==e.pendingProps)Ut=!0;else{if(!Ff(t,n)&&!(e.flags&128))return Ut=!1,kb(t,e,n);Ut=!!(t.flags&131072)}else Ut=!1,it&&e.flags&1048576&&vy(e,Qi,e.index);switch(e.lanes=0,e.tag){case 16:t:{var l=e.pendingProps;if(t=bl(e.elementType),e.type=t,typeof t=="function")zf(t)?(l=Ll(t,l),e.tag=1,e=Ch(null,e,t,l,n)):(e.tag=0,e=_r(null,e,t,l,n));else{if(t!=null){var a=t.$$typeof;if(a===mf){e.tag=11,e=Th(null,e,t,l,n);break t}else if(a===yf){e.tag=14,e=Nh(null,e,t,l,n);break t}}throw e=Fo(t)||t,Error(q(306,e,""))}}return e;case 0:return _r(t,e,e.type,e.pendingProps,n);case 1:return l=e.type,a=Ll(l,e.pendingProps),Ch(t,e,l,a,n);case 3:t:{if(wc(e,e.stateNode.containerInfo),t===null)throw Error(q(387));l=e.pendingProps;var i=e.memoizedState;a=i.element,mr(t,e),Hi(e,l,null,n);var u=e.memoizedState;if(l=u.cache,qn(e,Dt,l),l!==i.cache&&dr(e,[Dt],n,!0),Ui(),l=u.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:u.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=Rh(t,e,l,n);break t}else if(l!==a){a=Re(Error(q(424)),e),Ki(a),e=Rh(t,e,l,n);break t}else{switch(t=e.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(bt=je(t.firstChild),Kt=e,it=!0,Fn=null,De=!0,n=wy(e,null,l,n),e.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ul(),l===a){e=zn(t,e,n);break t}$t(t,e,l,n)}e=e.child}return e;case 26:return rc(t,e),t===null?(n=Ph(e.type,null,e.pendingProps,null))?e.memoizedState=n:it||(n=e.type,t=e.pendingProps,l=Qc(kn.current).createElement(n),l[Qt]=e,l[he]=t,kt(l,n,t),Yt(l),e.stateNode=l):e.memoizedState=Ph(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Io(e),t===null&&it&&(l=e.stateNode=ip(e.type,e.pendingProps,kn.current),Kt=e,De=!0,a=bt,rl(e.type)?(Lr=a,bt=je(l.firstChild)):bt=a),$t(t,e,e.pendingProps.children,n),rc(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&it&&((a=l=bt)&&(l=Ax(l,e.type,e.pendingProps,De),l!==null?(e.stateNode=l,Kt=e,bt=je(l.firstChild),De=!1,a=!0):a=!1),a||ul(e)),Io(e),a=e.type,i=e.pendingProps,u=t!==null?t.memoizedProps:null,l=i.children,Ur(a,i)?l=null:u!==null&&Ur(a,u)&&(e.flags|=32),e.memoizedState!==null&&(a=jf(t,e,Yb,null,null,n),Pi._currentValue=a),rc(t,e),$t(t,e,l,n),e.child;case 6:return t===null&&it&&((t=n=bt)&&(n=Tx(n,e.pendingProps,De),n!==null?(e.stateNode=n,Kt=e,bt=null,t=!0):t=!1),t||ul(e)),null;case 13:return hg(t,e,n);case 4:return wc(e,e.stateNode.containerInfo),l=e.pendingProps,t===null?e.child=Bl(e,null,l,n):$t(t,e,l,n),e.child;case 11:return Th(t,e,e.type,e.pendingProps,n);case 7:return $t(t,e,e.pendingProps,n),e.child;case 8:return $t(t,e,e.pendingProps.children,n),e.child;case 12:return $t(t,e,e.pendingProps.children,n),e.child;case 10:return l=e.pendingProps,qn(e,e.type,l.value),$t(t,e,l.children,n),e.child;case 9:return a=e.type._context,l=e.pendingProps.children,Hl(e),a=Jt(a),l=l(a),e.flags|=1,$t(t,e,l,n),e.child;case 14:return Nh(t,e,e.type,e.pendingProps,n);case 15:return fg(t,e,e.type,e.pendingProps,n);case 19:return mg(t,e,n);case 31:return Jb(t,e,n);case 22:return dg(t,e,n,e.pendingProps);case 24:return Hl(e),l=Jt(Dt),t===null?(a=Rf(),a===null&&(a=gt,i=Cf(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),e.memoizedState={parent:l,cache:a},Uf(e),qn(e,Dt,a)):(t.lanes&n&&(mr(t,e),Hi(e,null,null,n),Ui()),a=t.memoizedState,i=e.memoizedState,a.parent!==l?(a={parent:l,cache:l},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),qn(e,Dt,l)):(l=i.cache,qn(e,Dt,l),l!==a.cache&&dr(e,[Dt],n,!0))),$t(t,e,e.pendingProps.children,n),e.child;case 29:throw e.pendingProps}throw Error(q(156,e.tag))}function rn(t){t.flags|=4}function go(t,e,n,l,a){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(qg())t.flags|=8192;else throw Ml=Rc,Df}else t.flags&=-16777217}function Uh(t,e){if(e.type!=="stylesheet"||e.state.loading&4)t.flags&=-16777217;else if(t.flags|=16777216,!sp(e))if(qg())t.flags|=8192;else throw Ml=Rc,Df}function qu(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?Y0():536870912,t.lanes|=e,ja|=e)}function fi(t,e){if(!it)switch(t.tailMode){case"hidden":e=t.tail;for(var n=null;e!==null;)e.alternate!==null&&(n=e),e=e.sibling;n===null?t.tail=null:n.sibling=null;break;case"collapsed":n=t.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:l.sibling=null}}function St(t){var e=t.alternate!==null&&t.alternate.child===t.child,n=0,l=0;if(e)for(var a=t.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=l,t.childLanes=n,e}function Fb(t,e,n){var l=e.pendingProps;switch(Of(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return St(e),null;case 1:return St(e),null;case 3:return n=e.stateNode,l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),En(Dt),Ca(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(t===null||t.child===null)&&(Pl(e)?rn(e):t===null||t.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,uo())),St(e),null;case 26:var a=e.type,i=e.memoizedState;return t===null?(rn(e),i!==null?(St(e),Uh(e,i)):(St(e),go(e,a,null,l,n))):i?i!==t.memoizedState?(rn(e),St(e),Uh(e,i)):(St(e),e.flags&=-16777217):(t=t.memoizedProps,t!==l&&rn(e),St(e),go(e,a,t,l,n)),null;case 27:if(Ac(e),n=kn.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&rn(e);else{if(!l){if(e.stateNode===null)throw Error(q(166));return St(e),null}t=Pe.current,Pl(e)?oh(e):(t=ip(a,l,n),e.stateNode=t,rn(e))}return St(e),null;case 5:if(Ac(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==l&&rn(e);else{if(!l){if(e.stateNode===null)throw Error(q(166));return St(e),null}if(i=Pe.current,Pl(e))oh(e);else{var u=Qc(kn.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?u.createElement("select",{is:l.is}):u.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?u.createElement(a,{is:l.is}):u.createElement(a)}}i[Qt]=e,i[he]=l;t:for(u=e.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break t;for(;u.sibling===null;){if(u.return===null||u.return===e)break t;u=u.return}u.sibling.return=u.return,u=u.sibling}e.stateNode=i;t:switch(kt(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break t;case"img":l=!0;break t;default:l=!1}l&&rn(e)}}return St(e),go(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,n),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==l&&rn(e);else{if(typeof l!="string"&&e.stateNode===null)throw Error(q(166));if(t=kn.current,Pl(e)){if(t=e.stateNode,n=e.memoizedProps,l=null,a=Kt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}t[Qt]=e,t=!!(t.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||ep(t.nodeValue,n)),t||ul(e,!0)}else t=Qc(t).createTextNode(l),t[Qt]=e,e.stateNode=t}return St(e),null;case 31:if(n=e.memoizedState,t===null||t.memoizedState!==null){if(l=Pl(e),n!==null){if(t===null){if(!l)throw Error(q(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(q(557));t[Qt]=e}else Ul(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;St(e),t=!1}else n=uo(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=n),t=!0;if(!t)return e.flags&256?(pe(e),e):(pe(e),null);if(e.flags&128)throw Error(q(558))}return St(e),null;case 13:if(l=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=Pl(e),l!==null&&l.dehydrated!==null){if(t===null){if(!a)throw Error(q(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(q(317));a[Qt]=e}else Ul(),!(e.flags&128)&&(e.memoizedState=null),e.flags|=4;St(e),a=!1}else a=uo(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(pe(e),e):(pe(e),null)}return pe(e),e.flags&128?(e.lanes=n,e):(n=l!==null,t=t!==null&&t.memoizedState!==null,n&&(l=e.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==t&&n&&(e.child.flags|=8192),qu(e,e.updateQueue),St(e),null);case 4:return Ca(),t===null&&ld(e.stateNode.containerInfo),St(e),null;case 10:return En(e.type),St(e),null;case 19:if(Vt(Mt),l=e.memoizedState,l===null)return St(e),null;if(a=(e.flags&128)!==0,i=l.rendering,i===null)if(a)fi(l,!1);else{if(Tt!==0||t!==null&&t.flags&128)for(t=e.child;t!==null;){if(i=Uc(t),i!==null){for(e.flags|=128,fi(l,!1),t=i.updateQueue,e.updateQueue=t,qu(e,t),e.subtreeFlags=0,t=n,n=e.child;n!==null;)gy(n,t),n=n.sibling;return pt(Mt,Mt.current&1|2),it&&yn(e,l.treeForkCount),e.child}t=t.sibling}l.tail!==null&&be()>Yc&&(e.flags|=128,a=!0,fi(l,!1),e.lanes=4194304)}else{if(!a)if(t=Uc(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,qu(e,t),fi(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!it)return St(e),null}else 2*be()-l.renderingStartTime>Yc&&n!==536870912&&(e.flags|=128,a=!0,fi(l,!1),e.lanes=4194304);l.isBackwards?(i.sibling=e.child,e.child=i):(t=l.last,t!==null?t.sibling=i:e.child=i,l.last=i)}return l.tail!==null?(t=l.tail,l.rendering=t,l.tail=t.sibling,l.renderingStartTime=be(),t.sibling=null,n=Mt.current,pt(Mt,a?n&1|2:n&1),it&&yn(e,l.treeForkCount),t):(St(e),null);case 22:case 23:return pe(e),Hf(),l=e.memoizedState!==null,t!==null?t.memoizedState!==null!==l&&(e.flags|=8192):l&&(e.flags|=8192),l?n&536870912&&!(e.flags&128)&&(St(e),e.subtreeFlags&6&&(e.flags|=8192)):St(e),n=e.updateQueue,n!==null&&qu(e,n.retryQueue),n=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),l=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),l!==n&&(e.flags|=2048),t!==null&&Vt(zl),null;case 24:return n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),En(Dt),St(e),null;case 25:return null;case 30:return null}throw Error(q(156,e.tag))}function Wb(t,e){switch(Of(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return En(Dt),Ca(),t=e.flags,t&65536&&!(t&128)?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ac(e),null;case 31:if(e.memoizedState!==null){if(pe(e),e.alternate===null)throw Error(q(340));Ul()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(pe(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(q(340));Ul()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return Vt(Mt),null;case 4:return Ca(),null;case 10:return En(e.type),null;case 22:case 23:return pe(e),Hf(),t!==null&&Vt(zl),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return En(Dt),null;case 25:return null;default:return null}}function gg(t,e){switch(Of(e),e.tag){case 3:En(Dt),Ca();break;case 26:case 27:case 5:Ac(e);break;case 4:Ca();break;case 31:e.memoizedState!==null&&pe(e);break;case 13:pe(e);break;case 19:Vt(Mt);break;case 10:En(e.type);break;case 22:case 23:pe(e),Hf(),t!==null&&Vt(zl);break;case 24:En(Dt)}}function vu(t,e){try{var n=e.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&t)===t){l=void 0;var i=n.create,u=n.inst;l=i(),u.destroy=l}n=n.next}while(n!==a)}}catch(c){dt(e,e.return,c)}}function cl(t,e,n){try{var l=e.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&t)===t){var u=l.inst,c=u.destroy;if(c!==void 0){u.destroy=void 0,a=e;var s=n,o=c;try{o()}catch(r){dt(a,s,r)}}}l=l.next}while(l!==i)}}catch(r){dt(e,e.return,r)}}function pg(t){var e=t.updateQueue;if(e!==null){var n=t.stateNode;try{Ty(e,n)}catch(l){dt(t,t.return,l)}}}function vg(t,e,n){n.props=Ll(t.type,t.memoizedProps),n.state=t.memoizedState;try{n.componentWillUnmount()}catch(l){dt(t,e,l)}}function ji(t,e){try{var n=t.ref;if(n!==null){switch(t.tag){case 26:case 27:case 5:var l=t.stateNode;break;case 30:l=t.stateNode;break;default:l=t.stateNode}typeof n=="function"?t.refCleanup=n(l):n.current=l}}catch(a){dt(t,e,a)}}function Ie(t,e){var n=t.ref,l=t.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){dt(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){dt(t,e,a)}else n.current=null}function Sg(t){var e=t.type,n=t.memoizedProps,l=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break t;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){dt(t,t.return,a)}}function po(t,e,n){try{var l=t.stateNode;Sx(l,t.type,n,e),l[he]=e}catch(a){dt(t,t.return,a)}}function bg(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&rl(t.type)||t.tag===4}function vo(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||bg(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&&rl(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ar(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(t,e):(e=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,e.appendChild(t),n=n._reactRootContainer,n!=null||e.onclick!==null||(e.onclick=vn));else if(l!==4&&(l===27&&rl(t.type)&&(n=t.stateNode,e=null),t=t.child,t!==null))for(Ar(t,e,n),t=t.sibling;t!==null;)Ar(t,e,n),t=t.sibling}function qc(t,e,n){var l=t.tag;if(l===5||l===6)t=t.stateNode,e?n.insertBefore(t,e):n.appendChild(t);else if(l!==4&&(l===27&&rl(t.type)&&(n=t.stateNode),t=t.child,t!==null))for(qc(t,e,n),t=t.sibling;t!==null;)qc(t,e,n),t=t.sibling}function xg(t){var e=t.stateNode,n=t.memoizedProps;try{for(var l=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);kt(e,l,n),e[Qt]=t,e[he]=n}catch(i){dt(t,t.return,i)}}var gn=!1,Rt=!1,So=!1,Hh=typeof WeakSet=="function"?WeakSet:Set,qt=null;function Ib(t,e){if(t=t.containerInfo,Rr=Fc,t=sy(t),Af(t)){if("selectionStart"in t)var n={start:t.selectionStart,end:t.selectionEnd};else t:{n=(n=t.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break t}var u=0,c=-1,s=-1,o=0,r=0,f=t,d=null;e:for(;;){for(var h;f!==n||a!==0&&f.nodeType!==3||(c=u+a),f!==i||l!==0&&f.nodeType!==3||(s=u+l),f.nodeType===3&&(u+=f.nodeValue.length),(h=f.firstChild)!==null;)d=f,f=h;for(;;){if(f===t)break e;if(d===n&&++o===a&&(c=u),d===i&&++r===l&&(s=u),(h=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=h}n=c===-1||s===-1?null:{start:c,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(Dr={focusedElem:t,selectionRange:n},Fc=!1,qt=e;qt!==null;)if(e=qt,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,qt=t;else for(;qt!==null;){switch(e=qt,i=e.alternate,t=e.flags,e.tag){case 0:if(t&4&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(n=0;n<t.length;n++)a=t[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if(t&1024&&i!==null){t=void 0,n=e,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var g=Ll(n.type,a);t=l.getSnapshotBeforeUpdate(g,i),l.__reactInternalSnapshotBeforeUpdate=t}catch(p){dt(n,n.return,p)}}break;case 3:if(t&1024){if(t=e.stateNode.containerInfo,n=t.nodeType,n===9)Hr(t);else if(n===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Hr(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(t&1024)throw Error(q(163))}if(t=e.sibling,t!==null){t.return=e.return,qt=t;break}qt=e.return}}function Eg(t,e,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:dn(t,n),l&4&&vu(5,n);break;case 1:if(dn(t,n),l&4)if(t=n.stateNode,e===null)try{t.componentDidMount()}catch(u){dt(n,n.return,u)}else{var a=Ll(n.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(u){dt(n,n.return,u)}}l&64&&pg(n),l&512&&ji(n,n.return);break;case 3:if(dn(t,n),l&64&&(t=n.updateQueue,t!==null)){if(e=null,n.child!==null)switch(n.child.tag){case 27:case 5:e=n.child.stateNode;break;case 1:e=n.child.stateNode}try{Ty(t,e)}catch(u){dt(n,n.return,u)}}break;case 27:e===null&&l&4&&xg(n);case 26:case 5:dn(t,n),e===null&&l&4&&Sg(n),l&512&&ji(n,n.return);break;case 12:dn(t,n);break;case 31:dn(t,n),l&4&&Ag(t,n);break;case 13:dn(t,n),l&4&&Tg(t,n),l&64&&(t=n.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(n=cx.bind(null,n),Nx(t,n))));break;case 22:if(l=n.memoizedState!==null||gn,!l){e=e!==null&&e.memoizedState!==null||Rt,a=gn;var i=Rt;gn=l,(Rt=e)&&!i?mn(t,n,(n.subtreeFlags&8772)!==0):dn(t,n),gn=a,Rt=i}break;case 30:break;default:dn(t,n)}}function _g(t){var e=t.alternate;e!==null&&(t.alternate=null,_g(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Sf(e)),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 wt=null,ce=!1;function fn(t,e,n){for(n=n.child;n!==null;)wg(t,e,n),n=n.sibling}function wg(t,e,n){if(xe&&typeof xe.onCommitFiberUnmount=="function")try{xe.onCommitFiberUnmount(fu,n)}catch{}switch(n.tag){case 26:Rt||Ie(n,e),fn(t,e,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Rt||Ie(n,e);var l=wt,a=ce;rl(n.type)&&(wt=n.stateNode,ce=!1),fn(t,e,n),Vi(n.stateNode),wt=l,ce=a;break;case 5:Rt||Ie(n,e);case 6:if(l=wt,a=ce,wt=null,fn(t,e,n),wt=l,ce=a,wt!==null)if(ce)try{(wt.nodeType===9?wt.body:wt.nodeName==="HTML"?wt.ownerDocument.body:wt).removeChild(n.stateNode)}catch(i){dt(n,e,i)}else try{wt.removeChild(n.stateNode)}catch(i){dt(n,e,i)}break;case 18:wt!==null&&(ce?(t=wt,Jh(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,n.stateNode),Va(t)):Jh(wt,n.stateNode));break;case 4:l=wt,a=ce,wt=n.stateNode.containerInfo,ce=!0,fn(t,e,n),wt=l,ce=a;break;case 0:case 11:case 14:case 15:cl(2,n,e),Rt||cl(4,n,e),fn(t,e,n);break;case 1:Rt||(Ie(n,e),l=n.stateNode,typeof l.componentWillUnmount=="function"&&vg(n,e,l)),fn(t,e,n);break;case 21:fn(t,e,n);break;case 22:Rt=(l=Rt)||n.memoizedState!==null,fn(t,e,n),Rt=l;break;default:fn(t,e,n)}}function Ag(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Va(t)}catch(n){dt(e,e.return,n)}}}function Tg(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Va(t)}catch(n){dt(e,e.return,n)}}function Pb(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Hh),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Hh),e;default:throw Error(q(435,t.tag))}}function Yu(t,e){var n=Pb(t);e.forEach(function(l){if(!n.has(l)){n.add(l);var a=sx.bind(null,t,l);l.then(a,a)}})}function ie(t,e){var n=e.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=t,u=e,c=u;t:for(;c!==null;){switch(c.tag){case 27:if(rl(c.type)){wt=c.stateNode,ce=!1;break t}break;case 5:wt=c.stateNode,ce=!1;break t;case 3:case 4:wt=c.stateNode.containerInfo,ce=!0;break t}c=c.return}if(wt===null)throw Error(q(160));wg(i,u,a),wt=null,ce=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Ng(e,t),e=e.sibling}var Ve=null;function Ng(t,e){var n=t.alternate,l=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:ie(e,t),ue(t),l&4&&(cl(3,t,t.return),vu(3,t),cl(5,t,t.return));break;case 1:ie(e,t),ue(t),l&512&&(Rt||n===null||Ie(n,n.return)),l&64&&gn&&(t=t.updateQueue,t!==null&&(l=t.callbacks,l!==null&&(n=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Ve;if(ie(e,t),ue(t),l&512&&(Rt||n===null||Ie(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=t.memoizedState,n===null)if(l===null)if(t.stateNode===null){t:{l=t.type,n=t.memoizedProps,a=a.ownerDocument||a;e:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[mu]||i[Qt]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),kt(i,l,n),i[Qt]=t,Yt(i),l=i;break t;case"link":var u=em("link","href",a).get(l+(n.href||""));if(u){for(var c=0;c<u.length;c++)if(i=u[c],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){u.splice(c,1);break e}}i=a.createElement(l),kt(i,l,n),a.head.appendChild(i);break;case"meta":if(u=em("meta","content",a).get(l+(n.content||""))){for(c=0;c<u.length;c++)if(i=u[c],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){u.splice(c,1);break e}}i=a.createElement(l),kt(i,l,n),a.head.appendChild(i);break;default:throw Error(q(468,l))}i[Qt]=t,Yt(i),l=i}t.stateNode=l}else nm(a,t.type,t.stateNode);else t.stateNode=tm(a,l,t.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?nm(a,t.type,t.stateNode):tm(a,l,t.memoizedProps)):l===null&&t.stateNode!==null&&po(t,t.memoizedProps,n.memoizedProps)}break;case 27:ie(e,t),ue(t),l&512&&(Rt||n===null||Ie(n,n.return)),n!==null&&l&4&&po(t,t.memoizedProps,n.memoizedProps);break;case 5:if(ie(e,t),ue(t),l&512&&(Rt||n===null||Ie(n,n.return)),t.flags&32){a=t.stateNode;try{Da(a,"")}catch(g){dt(t,t.return,g)}}l&4&&t.stateNode!=null&&(a=t.memoizedProps,po(t,a,n!==null?n.memoizedProps:a)),l&1024&&(So=!0);break;case 6:if(ie(e,t),ue(t),l&4){if(t.stateNode===null)throw Error(q(162));l=t.memoizedProps,n=t.stateNode;try{n.nodeValue=l}catch(g){dt(t,t.return,g)}}break;case 3:if(hc=null,a=Ve,Ve=Kc(e.containerInfo),ie(e,t),Ve=a,ue(t),l&4&&n!==null&&n.memoizedState.isDehydrated)try{Va(e.containerInfo)}catch(g){dt(t,t.return,g)}So&&(So=!1,zg(t));break;case 4:l=Ve,Ve=Kc(t.stateNode.containerInfo),ie(e,t),ue(t),Ve=l;break;case 12:ie(e,t),ue(t);break;case 31:ie(e,t),ue(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Yu(t,l)));break;case 13:ie(e,t),ue(t),t.child.flags&8192&&t.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(_s=be()),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Yu(t,l)));break;case 22:a=t.memoizedState!==null;var s=n!==null&&n.memoizedState!==null,o=gn,r=Rt;if(gn=o||a,Rt=r||s,ie(e,t),Rt=r,gn=o,ue(t),l&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(n===null||s||gn||Rt||xl(t)),n=null,e=t;;){if(e.tag===5||e.tag===26){if(n===null){s=n=e;try{if(i=s.stateNode,a)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{c=s.stateNode;var f=s.memoizedProps.style,d=f!=null&&f.hasOwnProperty("display")?f.display:null;c.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(g){dt(s,s.return,g)}}}else if(e.tag===6){if(n===null){s=e;try{s.stateNode.nodeValue=a?"":s.memoizedProps}catch(g){dt(s,s.return,g)}}}else if(e.tag===18){if(n===null){s=e;try{var h=s.stateNode;a?kh(h,!0):kh(s.stateNode,!1)}catch(g){dt(s,s.return,g)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;n===e&&(n=null),e=e.return}n===e&&(n=null),e.sibling.return=e.return,e=e.sibling}l&4&&(l=t.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,Yu(t,n))));break;case 19:ie(e,t),ue(t),l&4&&(l=t.updateQueue,l!==null&&(t.updateQueue=null,Yu(t,l)));break;case 30:break;case 21:break;default:ie(e,t),ue(t)}}function ue(t){var e=t.flags;if(e&2){try{for(var n,l=t.return;l!==null;){if(bg(l)){n=l;break}l=l.return}if(n==null)throw Error(q(160));switch(n.tag){case 27:var a=n.stateNode,i=vo(t);qc(t,i,a);break;case 5:var u=n.stateNode;n.flags&32&&(Da(u,""),n.flags&=-33);var c=vo(t);qc(t,c,u);break;case 3:case 4:var s=n.stateNode.containerInfo,o=vo(t);Ar(t,o,s);break;default:throw Error(q(161))}}catch(r){dt(t,t.return,r)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function zg(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;zg(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function dn(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Eg(t,e.alternate,e),e=e.sibling}function xl(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:cl(4,e,e.return),xl(e);break;case 1:Ie(e,e.return);var n=e.stateNode;typeof n.componentWillUnmount=="function"&&vg(e,e.return,n),xl(e);break;case 27:Vi(e.stateNode);case 26:case 5:Ie(e,e.return),xl(e);break;case 22:e.memoizedState===null&&xl(e);break;case 30:xl(e);break;default:xl(e)}t=t.sibling}}function mn(t,e,n){for(n=n&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var l=e.alternate,a=t,i=e,u=i.flags;switch(i.tag){case 0:case 11:case 15:mn(a,i,n),vu(4,i);break;case 1:if(mn(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(o){dt(l,l.return,o)}if(l=i,a=l.updateQueue,a!==null){var c=l.stateNode;try{var s=a.shared.hiddenCallbacks;if(s!==null)for(a.shared.hiddenCallbacks=null,a=0;a<s.length;a++)Ay(s[a],c)}catch(o){dt(l,l.return,o)}}n&&u&64&&pg(i),ji(i,i.return);break;case 27:xg(i);case 26:case 5:mn(a,i,n),n&&l===null&&u&4&&Sg(i),ji(i,i.return);break;case 12:mn(a,i,n);break;case 31:mn(a,i,n),n&&u&4&&Ag(a,i);break;case 13:mn(a,i,n),n&&u&4&&Tg(a,i);break;case 22:i.memoizedState===null&&mn(a,i,n),ji(i,i.return);break;case 30:break;default:mn(a,i,n)}e=e.sibling}}function Wf(t,e){var n=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==n&&(t!=null&&t.refCount++,n!=null&&gu(n))}function If(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&gu(t))}function Ye(t,e,n,l){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Mg(t,e,n,l),e=e.sibling}function Mg(t,e,n,l){var a=e.flags;switch(e.tag){case 0:case 11:case 15:Ye(t,e,n,l),a&2048&&vu(9,e);break;case 1:Ye(t,e,n,l);break;case 3:Ye(t,e,n,l),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&gu(t)));break;case 12:if(a&2048){Ye(t,e,n,l),t=e.stateNode;try{var i=e.memoizedProps,u=i.id,c=i.onPostCommit;typeof c=="function"&&c(u,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(s){dt(e,e.return,s)}}else Ye(t,e,n,l);break;case 31:Ye(t,e,n,l);break;case 13:Ye(t,e,n,l);break;case 23:break;case 22:i=e.stateNode,u=e.alternate,e.memoizedState!==null?i._visibility&2?Ye(t,e,n,l):Li(t,e):i._visibility&2?Ye(t,e,n,l):(i._visibility|=2,ua(t,e,n,l,(e.subtreeFlags&10256)!==0||!1)),a&2048&&Wf(u,e);break;case 24:Ye(t,e,n,l),a&2048&&If(e.alternate,e);break;default:Ye(t,e,n,l)}}function ua(t,e,n,l,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,u=e,c=n,s=l,o=u.flags;switch(u.tag){case 0:case 11:case 15:ua(i,u,c,s,a),vu(8,u);break;case 23:break;case 22:var r=u.stateNode;u.memoizedState!==null?r._visibility&2?ua(i,u,c,s,a):Li(i,u):(r._visibility|=2,ua(i,u,c,s,a)),a&&o&2048&&Wf(u.alternate,u);break;case 24:ua(i,u,c,s,a),a&&o&2048&&If(u.alternate,u);break;default:ua(i,u,c,s,a)}e=e.sibling}}function Li(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var n=t,l=e,a=l.flags;switch(l.tag){case 22:Li(n,l),a&2048&&Wf(l.alternate,l);break;case 24:Li(n,l),a&2048&&If(l.alternate,l);break;default:Li(n,l)}e=e.sibling}}var wi=8192;function ta(t,e,n){if(t.subtreeFlags&wi)for(t=t.child;t!==null;)Og(t,e,n),t=t.sibling}function Og(t,e,n){switch(t.tag){case 26:ta(t,e,n),t.flags&wi&&t.memoizedState!==null&&qx(n,Ve,t.memoizedState,t.memoizedProps);break;case 5:ta(t,e,n);break;case 3:case 4:var l=Ve;Ve=Kc(t.stateNode.containerInfo),ta(t,e,n),Ve=l;break;case 22:t.memoizedState===null&&(l=t.alternate,l!==null&&l.memoizedState!==null?(l=wi,wi=16777216,ta(t,e,n),wi=l):ta(t,e,n));break;default:ta(t,e,n)}}function Cg(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function di(t){var e=t.deletions;if(t.flags&16){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];qt=l,Dg(l,t)}Cg(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Rg(t),t=t.sibling}function Rg(t){switch(t.tag){case 0:case 11:case 15:di(t),t.flags&2048&&cl(9,t,t.return);break;case 3:di(t);break;case 12:di(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,fc(t)):di(t);break;default:di(t)}}function fc(t){var e=t.deletions;if(t.flags&16){if(e!==null)for(var n=0;n<e.length;n++){var l=e[n];qt=l,Dg(l,t)}Cg(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:cl(8,e,e.return),fc(e);break;case 22:n=e.stateNode,n._visibility&2&&(n._visibility&=-3,fc(e));break;default:fc(e)}t=t.sibling}}function Dg(t,e){for(;qt!==null;){var n=qt;switch(n.tag){case 0:case 11:case 15:cl(8,n,e);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:gu(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,qt=l;else t:for(n=t;qt!==null;){l=qt;var a=l.sibling,i=l.return;if(_g(l),l===n){qt=null;break t}if(a!==null){a.return=i,qt=a;break t}qt=i}}}var tx={getCacheForType:function(t){var e=Jt(Dt),n=e.data.get(t);return n===void 0&&(n=t(),e.data.set(t,n)),n},cacheSignal:function(){return Jt(Dt).controller.signal}},ex=typeof WeakMap=="function"?WeakMap:Map,st=0,gt=null,nt=null,lt=0,ft=0,ge=null,Qn=!1,Ia=!1,Pf=!1,Mn=0,Tt=0,sl=0,Ol=0,td=0,Se=0,ja=0,qi=null,se=null,Tr=!1,_s=0,Ug=0,Yc=1/0,Vc=null,Pn=null,Bt=0,tl=null,La=null,_n=0,Nr=0,zr=null,Hg=null,Yi=0,Mr=null;function _e(){return st&2&&lt!==0?lt&-lt:k.T!==null?nd():Z0()}function Bg(){if(Se===0)if(!(lt&536870912)||it){var t=Ru;Ru<<=1,!(Ru&3932160)&&(Ru=262144),Se=t}else Se=536870912;return t=Ae.current,t!==null&&(t.flags|=32),Se}function re(t,e,n){(t===gt&&(ft===2||ft===9)||t.cancelPendingCommit!==null)&&(qa(t,0),Kn(t,lt,Se,!1)),hu(t,n),(!(st&2)||t!==gt)&&(t===gt&&(!(st&2)&&(Ol|=n),Tt===4&&Kn(t,lt,Se,!1)),nn(t))}function jg(t,e,n){if(st&6)throw Error(q(327));var l=!n&&(e&127)===0&&(e&t.expiredLanes)===0||du(t,e),a=l?ax(t,e):bo(t,e,!0),i=l;do{if(a===0){Ia&&!l&&Kn(t,e,0,!1);break}else{if(n=t.current.alternate,i&&!nx(n)){a=bo(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var u=0;else u=t.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){e=u;t:{var c=t;a=qi;var s=c.current.memoizedState.isDehydrated;if(s&&(qa(c,u).flags|=256),u=bo(c,u,!1),u!==2){if(Pf&&!s){c.errorRecoveryDisabledLanes|=i,Ol|=i,a=4;break t}i=se,se=a,i!==null&&(se===null?se=i:se.push.apply(se,i))}a=u}if(i=!1,a!==2)continue}}if(a===1){qa(t,0),Kn(t,e,0,!0);break}t:{switch(l=t,i=a,i){case 0:case 1:throw Error(q(345));case 4:if((e&4194048)!==e)break;case 6:Kn(l,e,Se,!Qn);break t;case 2:se=null;break;case 3:case 5:break;default:throw Error(q(329))}if((e&62914560)===e&&(a=_s+300-be(),10<a)){if(Kn(l,e,Se,!Qn),ds(l,0,!0)!==0)break t;_n=e,l.timeoutHandle=lp(Bh.bind(null,l,n,se,Vc,Tr,e,Se,Ol,ja,Qn,i,"Throttled",-0,0),a);break t}Bh(l,n,se,Vc,Tr,e,Se,Ol,ja,Qn,i,null,-0,0)}}break}while(!0);nn(t)}function Bh(t,e,n,l,a,i,u,c,s,o,r,f,d,h){if(t.timeoutHandle=-1,f=e.subtreeFlags,f&8192||(f&16785408)===16785408){f={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:vn},Og(e,i,f);var g=(i&62914560)===i?_s-be():(i&4194048)===i?Ug-be():0;if(g=Yx(f,g),g!==null){_n=i,t.cancelPendingCommit=g(Lh.bind(null,t,e,i,n,l,a,u,c,s,r,f,null,d,h)),Kn(t,i,u,!o);return}}Lh(t,e,i,n,l,a,u,c,s)}function nx(t){for(var e=t;;){var n=e.tag;if((n===0||n===11||n===15)&&e.flags&16384&&(n=e.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!we(i(),a))return!1}catch{return!1}}if(n=e.child,e.subtreeFlags&16384&&n!==null)n.return=e,e=n;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Kn(t,e,n,l){e&=~td,e&=~Ol,t.suspendedLanes|=e,t.pingedLanes&=~e,l&&(t.warmLanes|=e),l=t.expirationTimes;for(var a=e;0<a;){var i=31-Ee(a),u=1<<i;l[i]=-1,a&=~u}n!==0&&V0(t,n,e)}function ws(){return st&6?!0:(Su(0),!1)}function ed(){if(nt!==null){if(ft===0)var t=nt.return;else t=nt,Sn=Kl=null,Yf(t),Aa=null,Ji=0,t=nt;for(;t!==null;)gg(t.alternate,t),t=t.return;nt=null}}function qa(t,e){var n=t.timeoutHandle;n!==-1&&(t.timeoutHandle=-1,Ex(n)),n=t.cancelPendingCommit,n!==null&&(t.cancelPendingCommit=null,n()),_n=0,ed(),gt=t,nt=n=xn(t.current,null),lt=e,ft=0,ge=null,Qn=!1,Ia=du(t,e),Pf=!1,ja=Se=td=Ol=sl=Tt=0,se=qi=null,Tr=!1,e&8&&(e|=e&32);var l=t.entangledLanes;if(l!==0)for(t=t.entanglements,l&=e;0<l;){var a=31-Ee(l),i=1<<a;e|=t[a],l&=~i}return Mn=e,gs(),n}function Lg(t,e){I=null,k.H=Fi,e===Wa||e===vs?(e=mh(),ft=3):e===Df?(e=mh(),ft=4):ft=e===kf?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,ge=e,nt===null&&(Tt=1,jc(t,Re(e,t.current)))}function qg(){var t=Ae.current;return t===null?!0:(lt&4194048)===lt?Be===null:(lt&62914560)===lt||lt&536870912?t===Be:!1}function Yg(){var t=k.H;return k.H=Fi,t===null?Fi:t}function Vg(){var t=k.A;return k.A=tx,t}function Xc(){Tt=4,Qn||(lt&4194048)!==lt&&Ae.current!==null||(Ia=!0),!(sl&134217727)&&!(Ol&134217727)||gt===null||Kn(gt,lt,Se,!1)}function bo(t,e,n){var l=st;st|=2;var a=Yg(),i=Vg();(gt!==t||lt!==e)&&(Vc=null,qa(t,e)),e=!1;var u=Tt;t:do try{if(ft!==0&&nt!==null){var c=nt,s=ge;switch(ft){case 8:ed(),u=6;break t;case 3:case 2:case 9:case 6:Ae.current===null&&(e=!0);var o=ft;if(ft=0,ge=null,Sa(t,c,s,o),n&&Ia){u=0;break t}break;default:o=ft,ft=0,ge=null,Sa(t,c,s,o)}}lx(),u=Tt;break}catch(r){Lg(t,r)}while(!0);return e&&t.shellSuspendCounter++,Sn=Kl=null,st=l,k.H=a,k.A=i,nt===null&&(gt=null,lt=0,gs()),u}function lx(){for(;nt!==null;)Xg(nt)}function ax(t,e){var n=st;st|=2;var l=Yg(),a=Vg();gt!==t||lt!==e?(Vc=null,Yc=be()+500,qa(t,e)):Ia=du(t,e);t:do try{if(ft!==0&&nt!==null){e=nt;var i=ge;e:switch(ft){case 1:ft=0,ge=null,Sa(t,e,i,1);break;case 2:case 9:if(hh(i)){ft=0,ge=null,jh(e);break}e=function(){ft!==2&&ft!==9||gt!==t||(ft=7),nn(t)},i.then(e,e);break t;case 3:ft=7;break t;case 4:ft=5;break t;case 7:hh(i)?(ft=0,ge=null,jh(e)):(ft=0,ge=null,Sa(t,e,i,7));break;case 5:var u=null;switch(nt.tag){case 26:u=nt.memoizedState;case 5:case 27:var c=nt;if(u?sp(u):c.stateNode.complete){ft=0,ge=null;var s=c.sibling;if(s!==null)nt=s;else{var o=c.return;o!==null?(nt=o,As(o)):nt=null}break e}}ft=0,ge=null,Sa(t,e,i,5);break;case 6:ft=0,ge=null,Sa(t,e,i,6);break;case 8:ed(),Tt=6;break t;default:throw Error(q(462))}}ix();break}catch(r){Lg(t,r)}while(!0);return Sn=Kl=null,k.H=l,k.A=a,st=n,nt!==null?0:(gt=null,lt=0,gs(),Tt)}function ix(){for(;nt!==null&&!zS();)Xg(nt)}function Xg(t){var e=yg(t.alternate,t,Mn);t.memoizedProps=t.pendingProps,e===null?As(t):nt=e}function jh(t){var e=t,n=e.alternate;switch(e.tag){case 15:case 0:e=Oh(n,e,e.pendingProps,e.type,void 0,lt);break;case 11:e=Oh(n,e,e.pendingProps,e.type.render,e.ref,lt);break;case 5:Yf(e);default:gg(n,e),e=nt=gy(e,Mn),e=yg(n,e,Mn)}t.memoizedProps=t.pendingProps,e===null?As(t):nt=e}function Sa(t,e,n,l){Sn=Kl=null,Yf(e),Aa=null,Ji=0;var a=e.return;try{if(Kb(t,a,e,n,lt)){Tt=1,jc(t,Re(n,t.current)),nt=null;return}}catch(i){if(a!==null)throw nt=a,i;Tt=1,jc(t,Re(n,t.current)),nt=null;return}e.flags&32768?(it||l===1?t=!0:Ia||lt&536870912?t=!1:(Qn=t=!0,(l===2||l===9||l===3||l===6)&&(l=Ae.current,l!==null&&l.tag===13&&(l.flags|=16384))),Gg(e,t)):As(e)}function As(t){var e=t;do{if(e.flags&32768){Gg(e,Qn);return}t=e.return;var n=Fb(e.alternate,e,Mn);if(n!==null){nt=n;return}if(e=e.sibling,e!==null){nt=e;return}nt=e=t}while(e!==null);Tt===0&&(Tt=5)}function Gg(t,e){do{var n=Wb(t.alternate,t);if(n!==null){n.flags&=32767,nt=n;return}if(n=t.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!e&&(t=t.sibling,t!==null)){nt=t;return}nt=t=n}while(t!==null);Tt=6,nt=null}function Lh(t,e,n,l,a,i,u,c,s){t.cancelPendingCommit=null;do Ts();while(Bt!==0);if(st&6)throw Error(q(327));if(e!==null){if(e===t.current)throw Error(q(177));if(i=e.lanes|e.childLanes,i|=Tf,LS(t,n,i,u,c,s),t===gt&&(nt=gt=null,lt=0),La=e,tl=t,_n=n,Nr=i,zr=a,Hg=l,e.subtreeFlags&10256||e.flags&10256?(t.callbackNode=null,t.callbackPriority=0,ox(Tc,function(){return Jg(),null})):(t.callbackNode=null,t.callbackPriority=0),l=(e.flags&13878)!==0,e.subtreeFlags&13878||l){l=k.T,k.T=null,a=ot.p,ot.p=2,u=st,st|=4;try{Ib(t,e,n)}finally{st=u,ot.p=a,k.T=l}}Bt=1,Zg(),$g(),Qg()}}function Zg(){if(Bt===1){Bt=0;var t=tl,e=La,n=(e.flags&13878)!==0;if(e.subtreeFlags&13878||n){n=k.T,k.T=null;var l=ot.p;ot.p=2;var a=st;st|=4;try{Ng(e,t);var i=Dr,u=sy(t.containerInfo),c=i.focusedElem,s=i.selectionRange;if(u!==c&&c&&c.ownerDocument&&cy(c.ownerDocument.documentElement,c)){if(s!==null&&Af(c)){var o=s.start,r=s.end;if(r===void 0&&(r=o),"selectionStart"in c)c.selectionStart=o,c.selectionEnd=Math.min(r,c.value.length);else{var f=c.ownerDocument||document,d=f&&f.defaultView||window;if(d.getSelection){var h=d.getSelection(),g=c.textContent.length,p=Math.min(s.start,g),b=s.end===void 0?p:Math.min(s.end,g);!h.extend&&p>b&&(u=b,b=p,p=u);var m=uh(c,p),y=uh(c,b);if(m&&y&&(h.rangeCount!==1||h.anchorNode!==m.node||h.anchorOffset!==m.offset||h.focusNode!==y.node||h.focusOffset!==y.offset)){var v=f.createRange();v.setStart(m.node,m.offset),h.removeAllRanges(),p>b?(h.addRange(v),h.extend(y.node,y.offset)):(v.setEnd(y.node,y.offset),h.addRange(v))}}}}for(f=[],h=c;h=h.parentNode;)h.nodeType===1&&f.push({element:h,left:h.scrollLeft,top:h.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<f.length;c++){var S=f[c];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}Fc=!!Rr,Dr=Rr=null}finally{st=a,ot.p=l,k.T=n}}t.current=e,Bt=2}}function $g(){if(Bt===2){Bt=0;var t=tl,e=La,n=(e.flags&8772)!==0;if(e.subtreeFlags&8772||n){n=k.T,k.T=null;var l=ot.p;ot.p=2;var a=st;st|=4;try{Eg(t,e.alternate,e)}finally{st=a,ot.p=l,k.T=n}}Bt=3}}function Qg(){if(Bt===4||Bt===3){Bt=0,MS();var t=tl,e=La,n=_n,l=Hg;e.subtreeFlags&10256||e.flags&10256?Bt=5:(Bt=0,La=tl=null,Kg(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(Pn=null),vf(n),e=e.stateNode,xe&&typeof xe.onCommitFiberRoot=="function")try{xe.onCommitFiberRoot(fu,e,void 0,(e.current.flags&128)===128)}catch{}if(l!==null){e=k.T,a=ot.p,ot.p=2,k.T=null;try{for(var i=t.onRecoverableError,u=0;u<l.length;u++){var c=l[u];i(c.value,{componentStack:c.stack})}}finally{k.T=e,ot.p=a}}_n&3&&Ts(),nn(t),a=t.pendingLanes,n&261930&&a&42?t===Mr?Yi++:(Yi=0,Mr=t):Yi=0,Su(0)}}function Kg(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,gu(e)))}function Ts(){return Zg(),$g(),Qg(),Jg()}function Jg(){if(Bt!==5)return!1;var t=tl,e=Nr;Nr=0;var n=vf(_n),l=k.T,a=ot.p;try{ot.p=32>n?32:n,k.T=null,n=zr,zr=null;var i=tl,u=_n;if(Bt=0,La=tl=null,_n=0,st&6)throw Error(q(331));var c=st;if(st|=4,Rg(i.current),Mg(i,i.current,u,n),st=c,Su(0,!1),xe&&typeof xe.onPostCommitFiberRoot=="function")try{xe.onPostCommitFiberRoot(fu,i)}catch{}return!0}finally{ot.p=a,k.T=l,Kg(t,e)}}function qh(t,e,n){e=Re(n,e),e=Er(t.stateNode,e,2),t=In(t,e,2),t!==null&&(hu(t,2),nn(t))}function dt(t,e,n){if(t.tag===3)qh(t,t,n);else for(;e!==null;){if(e.tag===3){qh(e,t,n);break}else if(e.tag===1){var l=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Pn===null||!Pn.has(l))){t=Re(n,t),n=og(2),l=In(e,n,2),l!==null&&(rg(n,l,e,t),hu(l,2),nn(l));break}}e=e.return}}function xo(t,e,n){var l=t.pingCache;if(l===null){l=t.pingCache=new ex;var a=new Set;l.set(e,a)}else a=l.get(e),a===void 0&&(a=new Set,l.set(e,a));a.has(n)||(Pf=!0,a.add(n),t=ux.bind(null,t,e,n),e.then(t,t))}function ux(t,e,n){var l=t.pingCache;l!==null&&l.delete(e),t.pingedLanes|=t.suspendedLanes&n,t.warmLanes&=~n,gt===t&&(lt&n)===n&&(Tt===4||Tt===3&&(lt&62914560)===lt&&300>be()-_s?!(st&2)&&qa(t,0):td|=n,ja===lt&&(ja=0)),nn(t)}function kg(t,e){e===0&&(e=Y0()),t=Ql(t,e),t!==null&&(hu(t,e),nn(t))}function cx(t){var e=t.memoizedState,n=0;e!==null&&(n=e.retryLane),kg(t,n)}function sx(t,e){var n=0;switch(t.tag){case 31:case 13:var l=t.stateNode,a=t.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=t.stateNode;break;case 22:l=t.stateNode._retryCache;break;default:throw Error(q(314))}l!==null&&l.delete(e),kg(t,n)}function ox(t,e){return gf(t,e)}var Gc=null,ca=null,Or=!1,Zc=!1,Eo=!1,Jn=0;function nn(t){t!==ca&&t.next===null&&(ca===null?Gc=ca=t:ca=ca.next=t),Zc=!0,Or||(Or=!0,fx())}function Su(t,e){if(!Eo&&Zc){Eo=!0;do for(var n=!1,l=Gc;l!==null;){if(t!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var u=l.suspendedLanes,c=l.pingedLanes;i=(1<<31-Ee(42|t)+1)-1,i&=a&~(u&~c),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Yh(l,i))}else i=lt,i=ds(l,l===gt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),!(i&3)||du(l,i)||(n=!0,Yh(l,i));l=l.next}while(n);Eo=!1}}function rx(){Fg()}function Fg(){Zc=Or=!1;var t=0;Jn!==0&&xx()&&(t=Jn);for(var e=be(),n=null,l=Gc;l!==null;){var a=l.next,i=Wg(l,e);i===0?(l.next=null,n===null?Gc=a:n.next=a,a===null&&(ca=n)):(n=l,(t!==0||i&3)&&(Zc=!0)),l=a}Bt!==0&&Bt!==5||Su(t),Jn!==0&&(Jn=0)}function Wg(t,e){for(var n=t.suspendedLanes,l=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var u=31-Ee(i),c=1<<u,s=a[u];s===-1?(!(c&n)||c&l)&&(a[u]=jS(c,e)):s<=e&&(t.expiredLanes|=c),i&=~c}if(e=gt,n=lt,n=ds(t,t===e?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l=t.callbackNode,n===0||t===e&&(ft===2||ft===9)||t.cancelPendingCommit!==null)return l!==null&&l!==null&&ks(l),t.callbackNode=null,t.callbackPriority=0;if(!(n&3)||du(t,n)){if(e=n&-n,e===t.callbackPriority)return e;switch(l!==null&&ks(l),vf(n)){case 2:case 8:n=L0;break;case 32:n=Tc;break;case 268435456:n=q0;break;default:n=Tc}return l=Ig.bind(null,t),n=gf(n,l),t.callbackPriority=e,t.callbackNode=n,e}return l!==null&&l!==null&&ks(l),t.callbackPriority=2,t.callbackNode=null,2}function Ig(t,e){if(Bt!==0&&Bt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var n=t.callbackNode;if(Ts()&&t.callbackNode!==n)return null;var l=lt;return l=ds(t,t===gt?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),l===0?null:(jg(t,l,e),Wg(t,be()),t.callbackNode!=null&&t.callbackNode===n?Ig.bind(null,t):null)}function Yh(t,e){if(Ts())return null;jg(t,e,!0)}function fx(){_x(function(){st&6?gf(j0,rx):Fg()})}function nd(){if(Jn===0){var t=Ua;t===0&&(t=Cu,Cu<<=1,!(Cu&261888)&&(Cu=256)),Jn=t}return Jn}function Vh(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:nc(""+t)}function Xh(t,e){var n=e.ownerDocument.createElement("input");return n.name=e.name,n.value=e.value,t.id&&n.setAttribute("form",t.id),e.parentNode.insertBefore(n,e),t=new FormData(t),n.parentNode.removeChild(n),t}function dx(t,e,n,l,a){if(e==="submit"&&n&&n.stateNode===a){var i=Vh((a[he]||null).action),u=l.submitter;u&&(e=(e=u[he]||null)?Vh(e.formAction):u.getAttribute("formAction"),e!==null&&(i=e,u=null));var c=new hs("action","action",null,l,a);t.push({event:c,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(Jn!==0){var s=u?Xh(a,u):new FormData(a);br(n,{pending:!0,data:s,method:a.method,action:i},null,s)}}else typeof i=="function"&&(c.preventDefault(),s=u?Xh(a,u):new FormData(a),br(n,{pending:!0,data:s,method:a.method,action:i},i,s))},currentTarget:a}]})}}for(var _o=0;_o<sr.length;_o++){var wo=sr[_o],hx=wo.toLowerCase(),mx=wo[0].toUpperCase()+wo.slice(1);$e(hx,"on"+mx)}$e(ry,"onAnimationEnd");$e(fy,"onAnimationIteration");$e(dy,"onAnimationStart");$e("dblclick","onDoubleClick");$e("focusin","onFocus");$e("focusout","onBlur");$e(Ob,"onTransitionRun");$e(Cb,"onTransitionStart");$e(Rb,"onTransitionCancel");$e(hy,"onTransitionEnd");Ra("onMouseEnter",["mouseout","mouseover"]);Ra("onMouseLeave",["mouseout","mouseover"]);Ra("onPointerEnter",["pointerout","pointerover"]);Ra("onPointerLeave",["pointerout","pointerover"]);Gl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Gl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Gl("onBeforeInput",["compositionend","keypress","textInput","paste"]);Gl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Gl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Gl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Wi="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(" "),yx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Wi));function Pg(t,e){e=(e&4)!==0;for(var n=0;n<t.length;n++){var l=t[n],a=l.event;l=l.listeners;t:{var i=void 0;if(e)for(var u=l.length-1;0<=u;u--){var c=l[u],s=c.instance,o=c.currentTarget;if(c=c.listener,s!==i&&a.isPropagationStopped())break t;i=c,a.currentTarget=o;try{i(a)}catch(r){zc(r)}a.currentTarget=null,i=s}else for(u=0;u<l.length;u++){if(c=l[u],s=c.instance,o=c.currentTarget,c=c.listener,s!==i&&a.isPropagationStopped())break t;i=c,a.currentTarget=o;try{i(a)}catch(r){zc(r)}a.currentTarget=null,i=s}}}}function et(t,e){var n=e[tr];n===void 0&&(n=e[tr]=new Set);var l=t+"__bubble";n.has(l)||(tp(e,t,2,!1),n.add(l))}function Ao(t,e,n){var l=0;e&&(l|=4),tp(n,t,l,e)}var Vu="_reactListening"+Math.random().toString(36).slice(2);function ld(t){if(!t[Vu]){t[Vu]=!0,$0.forEach(function(n){n!=="selectionchange"&&(yx.has(n)||Ao(n,!1,t),Ao(n,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Vu]||(e[Vu]=!0,Ao("selectionchange",!1,e))}}function tp(t,e,n,l){switch(hp(e)){case 2:var a=Gx;break;case 8:a=Zx;break;default:a=cd}n=a.bind(null,e,n,t),a=void 0,!ir||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),l?a!==void 0?t.addEventListener(e,n,{capture:!0,passive:a}):t.addEventListener(e,n,!0):a!==void 0?t.addEventListener(e,n,{passive:a}):t.addEventListener(e,n,!1)}function To(t,e,n,l,a){var i=l;if(!(e&1)&&!(e&2)&&l!==null)t:for(;;){if(l===null)return;var u=l.tag;if(u===3||u===4){var c=l.stateNode.containerInfo;if(c===a)break;if(u===4)for(u=l.return;u!==null;){var s=u.tag;if((s===3||s===4)&&u.stateNode.containerInfo===a)return;u=u.return}for(;c!==null;){if(u=ra(c),u===null)return;if(s=u.tag,s===5||s===6||s===26||s===27){l=i=u;continue t}c=c.parentNode}}l=l.return}P0(function(){var o=i,r=xf(n),f=[];t:{var d=my.get(t);if(d!==void 0){var h=hs,g=t;switch(t){case"keypress":if(ac(n)===0)break t;case"keydown":case"keyup":h=sb;break;case"focusin":g="focus",h=to;break;case"focusout":g="blur",h=to;break;case"beforeblur":case"afterblur":h=to;break;case"click":if(n.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":h=Fd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":h=FS;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":h=fb;break;case ry:case fy:case dy:h=PS;break;case hy:h=hb;break;case"scroll":case"scrollend":h=JS;break;case"wheel":h=yb;break;case"copy":case"cut":case"paste":h=eb;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":h=Id;break;case"toggle":case"beforetoggle":h=pb}var p=(e&4)!==0,b=!p&&(t==="scroll"||t==="scrollend"),m=p?d!==null?d+"Capture":null:d;p=[];for(var y=o,v;y!==null;){var S=y;if(v=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||v===null||m===null||(S=Gi(y,m),S!=null&&p.push(Ii(y,S,v))),b)break;y=y.return}0<p.length&&(d=new h(d,g,null,n,r),f.push({event:d,listeners:p}))}}if(!(e&7)){t:{if(d=t==="mouseover"||t==="pointerover",h=t==="mouseout"||t==="pointerout",d&&n!==ar&&(g=n.relatedTarget||n.fromElement)&&(ra(g)||g[Ja]))break t;if((h||d)&&(d=r.window===r?r:(d=r.ownerDocument)?d.defaultView||d.parentWindow:window,h?(g=n.relatedTarget||n.toElement,h=o,g=g?ra(g):null,g!==null&&(b=ru(g),p=g.tag,g!==b||p!==5&&p!==27&&p!==6)&&(g=null)):(h=null,g=o),h!==g)){if(p=Fd,S="onMouseLeave",m="onMouseEnter",y="mouse",(t==="pointerout"||t==="pointerover")&&(p=Id,S="onPointerLeave",m="onPointerEnter",y="pointer"),b=h==null?d:Ei(h),v=g==null?d:Ei(g),d=new p(S,y+"leave",h,n,r),d.target=b,d.relatedTarget=v,S=null,ra(r)===o&&(p=new p(m,y+"enter",g,n,r),p.target=v,p.relatedTarget=b,S=p),b=S,h&&g)e:{for(p=gx,m=h,y=g,v=0,S=m;S;S=p(S))v++;S=0;for(var _=y;_;_=p(_))S++;for(;0<v-S;)m=p(m),v--;for(;0<S-v;)y=p(y),S--;for(;v--;){if(m===y||y!==null&&m===y.alternate){p=m;break e}m=p(m),y=p(y)}p=null}else p=null;h!==null&&Gh(f,d,h,p,!1),g!==null&&b!==null&&Gh(f,b,g,p,!0)}}t:{if(d=o?Ei(o):window,h=d.nodeName&&d.nodeName.toLowerCase(),h==="select"||h==="input"&&d.type==="file")var N=nh;else if(eh(d))if(iy)N=Nb;else{N=Ab;var w=wb}else h=d.nodeName,!h||h.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?o&&bf(o.elementType)&&(N=nh):N=Tb;if(N&&(N=N(t,o))){ay(f,N,n,r);break t}w&&w(t,d,o),t==="focusout"&&o&&d.type==="number"&&o.memoizedProps.value!=null&&lr(d,"number",d.value)}switch(w=o?Ei(o):window,t){case"focusin":(eh(w)||w.contentEditable==="true")&&(ha=w,ur=o,Ci=null);break;case"focusout":Ci=ur=ha=null;break;case"mousedown":cr=!0;break;case"contextmenu":case"mouseup":case"dragend":cr=!1,ch(f,n,r);break;case"selectionchange":if(Mb)break;case"keydown":case"keyup":ch(f,n,r)}var H;if(wf)t:{switch(t){case"compositionstart":var z="onCompositionStart";break t;case"compositionend":z="onCompositionEnd";break t;case"compositionupdate":z="onCompositionUpdate";break t}z=void 0}else da?ny(t,n)&&(z="onCompositionEnd"):t==="keydown"&&n.keyCode===229&&(z="onCompositionStart");z&&(ey&&n.locale!=="ko"&&(da||z!=="onCompositionStart"?z==="onCompositionEnd"&&da&&(H=ty()):($n=r,Ef="value"in $n?$n.value:$n.textContent,da=!0)),w=$c(o,z),0<w.length&&(z=new Wd(z,t,null,n,r),f.push({event:z,listeners:w}),H?z.data=H:(H=ly(n),H!==null&&(z.data=H)))),(H=Sb?bb(t,n):xb(t,n))&&(z=$c(o,"onBeforeInput"),0<z.length&&(w=new Wd("onBeforeInput","beforeinput",null,n,r),f.push({event:w,listeners:z}),w.data=H)),dx(f,t,o,n,r)}Pg(f,e)})}function Ii(t,e,n){return{instance:t,listener:e,currentTarget:n}}function $c(t,e){for(var n=e+"Capture",l=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Gi(t,n),a!=null&&l.unshift(Ii(t,a,i)),a=Gi(t,e),a!=null&&l.push(Ii(t,a,i))),t.tag===3)return l;t=t.return}return[]}function gx(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function Gh(t,e,n,l,a){for(var i=e._reactName,u=[];n!==null&&n!==l;){var c=n,s=c.alternate,o=c.stateNode;if(c=c.tag,s!==null&&s===l)break;c!==5&&c!==26&&c!==27||o===null||(s=o,a?(o=Gi(n,i),o!=null&&u.unshift(Ii(n,o,s))):a||(o=Gi(n,i),o!=null&&u.push(Ii(n,o,s)))),n=n.return}u.length!==0&&t.push({event:e,listeners:u})}var px=/\r\n?/g,vx=/\u0000|\uFFFD/g;function Zh(t){return(typeof t=="string"?t:""+t).replace(px,`
`).replace(vx,"")}function ep(t,e){return e=Zh(e),Zh(t)===e}function mt(t,e,n,l,a,i){switch(n){case"children":typeof l=="string"?e==="body"||e==="textarea"&&l===""||Da(t,l):(typeof l=="number"||typeof l=="bigint")&&e!=="body"&&Da(t,""+l);break;case"className":Uu(t,"class",l);break;case"tabIndex":Uu(t,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Uu(t,n,l);break;case"style":I0(t,l,i);break;case"data":if(e!=="object"){Uu(t,"data",l);break}case"src":case"href":if(l===""&&(e!=="a"||n!=="href")){t.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=nc(""+l),t.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){t.setAttribute(n,"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 i=="function"&&(n==="formAction"?(e!=="input"&&mt(t,e,"name",a.name,a,null),mt(t,e,"formEncType",a.formEncType,a,null),mt(t,e,"formMethod",a.formMethod,a,null),mt(t,e,"formTarget",a.formTarget,a,null)):(mt(t,e,"encType",a.encType,a,null),mt(t,e,"method",a.method,a,null),mt(t,e,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){t.removeAttribute(n);break}l=nc(""+l),t.setAttribute(n,l);break;case"onClick":l!=null&&(t.onclick=vn);break;case"onScroll":l!=null&&et("scroll",t);break;case"onScrollEnd":l!=null&&et("scrollend",t);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(q(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(q(60));t.innerHTML=n}}break;case"multiple":t.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":t.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){t.removeAttribute("xlink:href");break}n=nc(""+l),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,""+l):t.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":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":l&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,""):t.removeAttribute(n);break;case"capture":case"download":l===!0?t.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?t.setAttribute(n,l):t.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?t.setAttribute(n,l):t.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?t.removeAttribute(n):t.setAttribute(n,l);break;case"popover":et("beforetoggle",t),et("toggle",t),ec(t,"popover",l);break;case"xlinkActuate":on(t,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":on(t,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":on(t,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":on(t,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":on(t,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":on(t,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":on(t,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":on(t,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":on(t,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":ec(t,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=QS.get(n)||n,ec(t,n,l))}}function Cr(t,e,n,l,a,i){switch(n){case"style":I0(t,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(q(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(q(60));t.innerHTML=n}}break;case"children":typeof l=="string"?Da(t,l):(typeof l=="number"||typeof l=="bigint")&&Da(t,""+l);break;case"onScroll":l!=null&&et("scroll",t);break;case"onScrollEnd":l!=null&&et("scrollend",t);break;case"onClick":l!=null&&(t.onclick=vn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Q0.hasOwnProperty(n))t:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),e=n.slice(2,a?n.length-7:void 0),i=t[he]||null,i=i!=null?i[n]:null,typeof i=="function"&&t.removeEventListener(e,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in t?t[n]=null:t.hasAttribute(n)&&t.removeAttribute(n)),t.addEventListener(e,l,a);break t}n in t?t[n]=l:l===!0?t.setAttribute(n,""):ec(t,n,l)}}}function kt(t,e,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":et("error",t),et("load",t);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var u=n[i];if(u!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(q(137,e));default:mt(t,e,i,u,n,null)}}a&&mt(t,e,"srcSet",n.srcSet,n,null),l&&mt(t,e,"src",n.src,n,null);return;case"input":et("invalid",t);var c=i=u=a=null,s=null,o=null;for(l in n)if(n.hasOwnProperty(l)){var r=n[l];if(r!=null)switch(l){case"name":a=r;break;case"type":u=r;break;case"checked":s=r;break;case"defaultChecked":o=r;break;case"value":i=r;break;case"defaultValue":c=r;break;case"children":case"dangerouslySetInnerHTML":if(r!=null)throw Error(q(137,e));break;default:mt(t,e,l,r,n,null)}}k0(t,i,c,s,o,u,a,!1);return;case"select":et("invalid",t),l=u=i=null;for(a in n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case"value":i=c;break;case"defaultValue":u=c;break;case"multiple":l=c;default:mt(t,e,a,c,n,null)}e=i,n=u,t.multiple=!!l,e!=null?Ea(t,!!l,e,!1):n!=null&&Ea(t,!!l,n,!0);return;case"textarea":et("invalid",t),i=a=l=null;for(u in n)if(n.hasOwnProperty(u)&&(c=n[u],c!=null))switch(u){case"value":l=c;break;case"defaultValue":a=c;break;case"children":i=c;break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(q(91));break;default:mt(t,e,u,c,n,null)}W0(t,l,a,i);return;case"option":for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"selected":t.selected=l&&typeof l!="function"&&typeof l!="symbol";break;default:mt(t,e,s,l,n,null)}return;case"dialog":et("beforetoggle",t),et("toggle",t),et("cancel",t),et("close",t);break;case"iframe":case"object":et("load",t);break;case"video":case"audio":for(l=0;l<Wi.length;l++)et(Wi[l],t);break;case"image":et("error",t),et("load",t);break;case"details":et("toggle",t);break;case"embed":case"source":case"link":et("error",t),et("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(o in n)if(n.hasOwnProperty(o)&&(l=n[o],l!=null))switch(o){case"children":case"dangerouslySetInnerHTML":throw Error(q(137,e));default:mt(t,e,o,l,n,null)}return;default:if(bf(e)){for(r in n)n.hasOwnProperty(r)&&(l=n[r],l!==void 0&&Cr(t,e,r,l,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(l=n[c],l!=null&&mt(t,e,c,l,n,null))}function Sx(t,e,n,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,u=null,c=null,s=null,o=null,r=null;for(h in n){var f=n[h];if(n.hasOwnProperty(h)&&f!=null)switch(h){case"checked":break;case"value":break;case"defaultValue":s=f;default:l.hasOwnProperty(h)||mt(t,e,h,null,l,f)}}for(var d in l){var h=l[d];if(f=n[d],l.hasOwnProperty(d)&&(h!=null||f!=null))switch(d){case"type":i=h;break;case"name":a=h;break;case"checked":o=h;break;case"defaultChecked":r=h;break;case"value":u=h;break;case"defaultValue":c=h;break;case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(q(137,e));break;default:h!==f&&mt(t,e,d,h,l,f)}}nr(t,u,c,s,o,r,i,a);return;case"select":h=u=c=d=null;for(i in n)if(s=n[i],n.hasOwnProperty(i)&&s!=null)switch(i){case"value":break;case"multiple":h=s;default:l.hasOwnProperty(i)||mt(t,e,i,null,l,s)}for(a in l)if(i=l[a],s=n[a],l.hasOwnProperty(a)&&(i!=null||s!=null))switch(a){case"value":d=i;break;case"defaultValue":c=i;break;case"multiple":u=i;default:i!==s&&mt(t,e,a,i,l,s)}e=c,n=u,l=h,d!=null?Ea(t,!!n,d,!1):!!l!=!!n&&(e!=null?Ea(t,!!n,e,!0):Ea(t,!!n,n?[]:"",!1));return;case"textarea":h=d=null;for(c in n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!l.hasOwnProperty(c))switch(c){case"value":break;case"children":break;default:mt(t,e,c,null,l,a)}for(u in l)if(a=l[u],i=n[u],l.hasOwnProperty(u)&&(a!=null||i!=null))switch(u){case"value":d=a;break;case"defaultValue":h=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(q(91));break;default:a!==i&&mt(t,e,u,a,l,i)}F0(t,d,h);return;case"option":for(var g in n)if(d=n[g],n.hasOwnProperty(g)&&d!=null&&!l.hasOwnProperty(g))switch(g){case"selected":t.selected=!1;break;default:mt(t,e,g,null,l,d)}for(s in l)if(d=l[s],h=n[s],l.hasOwnProperty(s)&&d!==h&&(d!=null||h!=null))switch(s){case"selected":t.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:mt(t,e,s,d,l,h)}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 p in n)d=n[p],n.hasOwnProperty(p)&&d!=null&&!l.hasOwnProperty(p)&&mt(t,e,p,null,l,d);for(o in l)if(d=l[o],h=n[o],l.hasOwnProperty(o)&&d!==h&&(d!=null||h!=null))switch(o){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(q(137,e));break;default:mt(t,e,o,d,l,h)}return;default:if(bf(e)){for(var b in n)d=n[b],n.hasOwnProperty(b)&&d!==void 0&&!l.hasOwnProperty(b)&&Cr(t,e,b,void 0,l,d);for(r in l)d=l[r],h=n[r],!l.hasOwnProperty(r)||d===h||d===void 0&&h===void 0||Cr(t,e,r,d,l,h);return}}for(var m in n)d=n[m],n.hasOwnProperty(m)&&d!=null&&!l.hasOwnProperty(m)&&mt(t,e,m,null,l,d);for(f in l)d=l[f],h=n[f],!l.hasOwnProperty(f)||d===h||d==null&&h==null||mt(t,e,f,d,l,h)}function $h(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function bx(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,u=a.initiatorType,c=a.duration;if(i&&c&&$h(u)){for(u=0,c=a.responseEnd,l+=1;l<n.length;l++){var s=n[l],o=s.startTime;if(o>c)break;var r=s.transferSize,f=s.initiatorType;r&&$h(f)&&(s=s.responseEnd,u+=r*(s<c?1:(c-o)/(s-o)))}if(--l,e+=8*(i+u)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Rr=null,Dr=null;function Qc(t){return t.nodeType===9?t:t.ownerDocument}function Qh(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 np(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Ur(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var No=null;function xx(){var t=window.event;return t&&t.type==="popstate"?t===No?!1:(No=t,!0):(No=null,!1)}var lp=typeof setTimeout=="function"?setTimeout:void 0,Ex=typeof clearTimeout=="function"?clearTimeout:void 0,Kh=typeof Promise=="function"?Promise:void 0,_x=typeof queueMicrotask=="function"?queueMicrotask:typeof Kh<"u"?function(t){return Kh.resolve(null).then(t).catch(wx)}:lp;function wx(t){setTimeout(function(){throw t})}function rl(t){return t==="head"}function Jh(t,e){var n=e,l=0;do{var a=n.nextSibling;if(t.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){t.removeChild(a),Va(e);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")Vi(t.ownerDocument.documentElement);else if(n==="head"){n=t.ownerDocument.head,Vi(n);for(var i=n.firstChild;i;){var u=i.nextSibling,c=i.nodeName;i[mu]||c==="SCRIPT"||c==="STYLE"||c==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=u}}else n==="body"&&Vi(t.ownerDocument.body);n=a}while(n);Va(e)}function kh(t,e){var n=t;t=0;do{var l=n.nextSibling;if(n.nodeType===1?e?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(e?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(t===0)break;t--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||t++;n=l}while(n)}function Hr(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var n=e;switch(e=e.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Hr(n),Sf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}t.removeChild(n)}}function Ax(t,e,n,l){for(;t.nodeType===1;){var a=n;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!l&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(l){if(!t[mu])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=je(t.nextSibling),t===null)break}return null}function Tx(t,e,n){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!n||(t=je(t.nextSibling),t===null))return null;return t}function ap(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=je(t.nextSibling),t===null))return null;return t}function Br(t){return t.data==="$?"||t.data==="$~"}function jr(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Nx(t,e){var n=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||n.readyState!=="loading")e();else{var l=function(){e(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),t._reactRetry=l}}function je(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var Lr=null;function Fh(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="/$"||n==="/&"){if(e===0)return je(t.nextSibling);e--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||e++}t=t.nextSibling}return null}function Wh(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var n=t.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(e===0)return t;e--}else n!=="/$"&&n!=="/&"||e++}t=t.previousSibling}return null}function ip(t,e,n){switch(e=Qc(n),t){case"html":if(t=e.documentElement,!t)throw Error(q(452));return t;case"head":if(t=e.head,!t)throw Error(q(453));return t;case"body":if(t=e.body,!t)throw Error(q(454));return t;default:throw Error(q(451))}}function Vi(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Sf(t)}var Le=new Map,Ih=new Set;function Kc(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Rn=ot.d;ot.d={f:zx,r:Mx,D:Ox,C:Cx,L:Rx,m:Dx,X:Hx,S:Ux,M:Bx};function zx(){var t=Rn.f(),e=ws();return t||e}function Mx(t){var e=ka(t);e!==null&&e.tag===5&&e.type==="form"?Iy(e):Rn.r(t)}var Pa=typeof document>"u"?null:document;function up(t,e,n){var l=Pa;if(l&&typeof e=="string"&&e){var a=Ce(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),Ih.has(a)||(Ih.add(a),t={rel:t,crossOrigin:n,href:e},l.querySelector(a)===null&&(e=l.createElement("link"),kt(e,"link",t),Yt(e),l.head.appendChild(e)))}}function Ox(t){Rn.D(t),up("dns-prefetch",t,null)}function Cx(t,e){Rn.C(t,e),up("preconnect",t,e)}function Rx(t,e,n){Rn.L(t,e,n);var l=Pa;if(l&&t&&e){var a='link[rel="preload"][as="'+Ce(e)+'"]';e==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+Ce(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+Ce(n.imageSizes)+'"]')):a+='[href="'+Ce(t)+'"]';var i=a;switch(e){case"style":i=Ya(t);break;case"script":i=ti(t)}Le.has(i)||(t=Et({rel:"preload",href:e==="image"&&n&&n.imageSrcSet?void 0:t,as:e},n),Le.set(i,t),l.querySelector(a)!==null||e==="style"&&l.querySelector(bu(i))||e==="script"&&l.querySelector(xu(i))||(e=l.createElement("link"),kt(e,"link",t),Yt(e),l.head.appendChild(e)))}}function Dx(t,e){Rn.m(t,e);var n=Pa;if(n&&t){var l=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+Ce(l)+'"][href="'+Ce(t)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ti(t)}if(!Le.has(i)&&(t=Et({rel:"modulepreload",href:t},e),Le.set(i,t),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(xu(i)))return}l=n.createElement("link"),kt(l,"link",t),Yt(l),n.head.appendChild(l)}}}function Ux(t,e,n){Rn.S(t,e,n);var l=Pa;if(l&&t){var a=xa(l).hoistableStyles,i=Ya(t);e=e||"default";var u=a.get(i);if(!u){var c={loading:0,preload:null};if(u=l.querySelector(bu(i)))c.loading=5;else{t=Et({rel:"stylesheet",href:t,"data-precedence":e},n),(n=Le.get(i))&&ad(t,n);var s=u=l.createElement("link");Yt(s),kt(s,"link",t),s._p=new Promise(function(o,r){s.onload=o,s.onerror=r}),s.addEventListener("load",function(){c.loading|=1}),s.addEventListener("error",function(){c.loading|=2}),c.loading|=4,dc(u,e,l)}u={type:"stylesheet",instance:u,count:1,state:c},a.set(i,u)}}}function Hx(t,e){Rn.X(t,e);var n=Pa;if(n&&t){var l=xa(n).hoistableScripts,a=ti(t),i=l.get(a);i||(i=n.querySelector(xu(a)),i||(t=Et({src:t,async:!0},e),(e=Le.get(a))&&id(t,e),i=n.createElement("script"),Yt(i),kt(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Bx(t,e){Rn.M(t,e);var n=Pa;if(n&&t){var l=xa(n).hoistableScripts,a=ti(t),i=l.get(a);i||(i=n.querySelector(xu(a)),i||(t=Et({src:t,async:!0,type:"module"},e),(e=Le.get(a))&&id(t,e),i=n.createElement("script"),Yt(i),kt(i,"link",t),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function Ph(t,e,n,l){var a=(a=kn.current)?Kc(a):null;if(!a)throw Error(q(446));switch(t){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(e=Ya(n.href),n=xa(a).hoistableStyles,l=n.get(e),l||(l={type:"style",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){t=Ya(n.href);var i=xa(a).hoistableStyles,u=i.get(t);if(u||(a=a.ownerDocument||a,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,u),(i=a.querySelector(bu(t)))&&!i._p&&(u.instance=i,u.state.loading=5),Le.has(t)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},Le.set(t,n),i||jx(a,t,n,u.state))),e&&l===null)throw Error(q(528,""));return u}if(e&&l!==null)throw Error(q(529,""));return null;case"script":return e=n.async,n=n.src,typeof n=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=ti(n),n=xa(a).hoistableScripts,l=n.get(e),l||(l={type:"script",instance:null,count:0,state:null},n.set(e,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(q(444,t))}}function Ya(t){return'href="'+Ce(t)+'"'}function bu(t){return'link[rel="stylesheet"]['+t+"]"}function cp(t){return Et({},t,{"data-precedence":t.precedence,precedence:null})}function jx(t,e,n,l){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?l.loading=1:(e=t.createElement("link"),l.preload=e,e.addEventListener("load",function(){return l.loading|=1}),e.addEventListener("error",function(){return l.loading|=2}),kt(e,"link",n),Yt(e),t.head.appendChild(e))}function ti(t){return'[src="'+Ce(t)+'"]'}function xu(t){return"script[async]"+t}function tm(t,e,n){if(e.count++,e.instance===null)switch(e.type){case"style":var l=t.querySelector('style[data-href~="'+Ce(n.href)+'"]');if(l)return e.instance=l,Yt(l),l;var a=Et({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(t.ownerDocument||t).createElement("style"),Yt(l),kt(l,"style",a),dc(l,n.precedence,t),e.instance=l;case"stylesheet":a=Ya(n.href);var i=t.querySelector(bu(a));if(i)return e.state.loading|=4,e.instance=i,Yt(i),i;l=cp(n),(a=Le.get(a))&&ad(l,a),i=(t.ownerDocument||t).createElement("link"),Yt(i);var u=i;return u._p=new Promise(function(c,s){u.onload=c,u.onerror=s}),kt(i,"link",l),e.state.loading|=4,dc(i,n.precedence,t),e.instance=i;case"script":return i=ti(n.src),(a=t.querySelector(xu(i)))?(e.instance=a,Yt(a),a):(l=n,(a=Le.get(i))&&(l=Et({},n),id(l,a)),t=t.ownerDocument||t,a=t.createElement("script"),Yt(a),kt(a,"link",l),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(q(443,e.type))}else e.type==="stylesheet"&&!(e.state.loading&4)&&(l=e.instance,e.state.loading|=4,dc(l,n.precedence,t));return e.instance}function dc(t,e,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,u=0;u<l.length;u++){var c=l[u];if(c.dataset.precedence===e)i=c;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=n.nodeType===9?n.head:n,e.insertBefore(t,e.firstChild))}function ad(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function id(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var hc=null;function em(t,e,n){if(hc===null){var l=new Map,a=hc=new Map;a.set(n,l)}else a=hc,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(t))return l;for(l.set(t,null),n=n.getElementsByTagName(t),a=0;a<n.length;a++){var i=n[a];if(!(i[mu]||i[Qt]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(e)||"";u=t+u;var c=l.get(u);c?c.push(i):l.set(u,[i])}}return l}function nm(t,e,n){t=t.ownerDocument||t,t.head.insertBefore(n,e==="title"?t.querySelector("head > title"):null)}function Lx(t,e,n){if(n===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;switch(e.rel){case"stylesheet":return t=e.disabled,typeof e.precedence=="string"&&t==null;default:return!0}case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function sp(t){return!(t.type==="stylesheet"&&!(t.state.loading&3))}function qx(t,e,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&!(n.state.loading&4)){if(n.instance===null){var a=Ya(l.href),i=e.querySelector(bu(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Jc.bind(t),e.then(t,t)),n.state.loading|=4,n.instance=i,Yt(i);return}i=e.ownerDocument||e,l=cp(l),(a=Le.get(a))&&ad(l,a),i=i.createElement("link"),Yt(i);var u=i;u._p=new Promise(function(c,s){u.onload=c,u.onerror=s}),kt(i,"link",l),n.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(n,e),(e=n.state.preload)&&!(n.state.loading&3)&&(t.count++,n=Jc.bind(t),e.addEventListener("load",n),e.addEventListener("error",n))}}var zo=0;function Yx(t,e){return t.stylesheets&&t.count===0&&mc(t,t.stylesheets),0<t.count||0<t.imgCount?function(n){var l=setTimeout(function(){if(t.stylesheets&&mc(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&zo===0&&(zo=62500*bx());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&mc(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>zo?50:800)+e);return t.unsuspend=n,function(){t.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function Jc(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mc(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var kc=null;function mc(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,kc=new Map,e.forEach(Vx,t),kc=null,Jc.call(t))}function Vx(t,e){if(!(e.state.loading&4)){var n=kc.get(t);if(n)var l=n.get(null);else{n=new Map,kc.set(t,n);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var u=a[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(n.set(u.dataset.precedence,u),l=u)}l&&n.set(null,l)}a=e.instance,u=a.getAttribute("data-precedence"),i=n.get(u)||l,i===l&&n.set(null,a),n.set(u,a),this.count++,l=Jc.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var Pi={$$typeof:pn,Provider:null,Consumer:null,_currentValue:Tl,_currentValue2:Tl,_threadCount:0};function Xx(t,e,n,l,a,i,u,c,s){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=Fs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fs(0),this.hiddenUpdates=Fs(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function op(t,e,n,l,a,i,u,c,s,o,r,f){return t=new Xx(t,e,n,u,s,o,r,f,c),e=1,i===!0&&(e|=24),i=ve(3,null,null,e),t.current=i,i.stateNode=t,e=Cf(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:e},Uf(i),t}function rp(t){return t?(t=ga,t):ga}function fp(t,e,n,l,a,i){a=rp(a),l.context===null?l.context=a:l.pendingContext=a,l=Wn(e),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=In(t,l,e),n!==null&&(re(n,t,e),Di(n,t,e))}function lm(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var n=t.retryLane;t.retryLane=n!==0&&n<e?n:e}}function ud(t,e){lm(t,e),(t=t.alternate)&&lm(t,e)}function dp(t){if(t.tag===13||t.tag===31){var e=Ql(t,67108864);e!==null&&re(e,t,67108864),ud(t,67108864)}}function am(t){if(t.tag===13||t.tag===31){var e=_e();e=pf(e);var n=Ql(t,e);n!==null&&re(n,t,e),ud(t,e)}}var Fc=!0;function Gx(t,e,n,l){var a=k.T;k.T=null;var i=ot.p;try{ot.p=2,cd(t,e,n,l)}finally{ot.p=i,k.T=a}}function Zx(t,e,n,l){var a=k.T;k.T=null;var i=ot.p;try{ot.p=8,cd(t,e,n,l)}finally{ot.p=i,k.T=a}}function cd(t,e,n,l){if(Fc){var a=qr(l);if(a===null)To(t,e,l,Wc,n),im(t,l);else if(Qx(a,t,e,n,l))l.stopPropagation();else if(im(t,l),e&4&&-1<$x.indexOf(t)){for(;a!==null;){var i=ka(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=Sl(i.pendingLanes);if(u!==0){var c=i;for(c.pendingLanes|=2,c.entangledLanes|=2;u;){var s=1<<31-Ee(u);c.entanglements[1]|=s,u&=~s}nn(i),!(st&6)&&(Yc=be()+500,Su(0))}}break;case 31:case 13:c=Ql(i,2),c!==null&&re(c,i,2),ws(),ud(i,2)}if(i=qr(l),i===null&&To(t,e,l,Wc,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else To(t,e,l,null,n)}}function qr(t){return t=xf(t),sd(t)}var Wc=null;function sd(t){if(Wc=null,t=ra(t),t!==null){var e=ru(t);if(e===null)t=null;else{var n=e.tag;if(n===13){if(t=R0(e),t!==null)return t;t=null}else if(n===31){if(t=D0(e),t!==null)return t;t=null}else if(n===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Wc=t,null}function hp(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"resize":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"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"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(OS()){case j0:return 2;case L0:return 8;case Tc:case CS:return 32;case q0:return 268435456;default:return 32}default:return 32}}var Yr=!1,el=null,nl=null,ll=null,tu=new Map,eu=new Map,Xn=[],$x="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 im(t,e){switch(t){case"focusin":case"focusout":el=null;break;case"dragenter":case"dragleave":nl=null;break;case"mouseover":case"mouseout":ll=null;break;case"pointerover":case"pointerout":tu.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":eu.delete(e.pointerId)}}function hi(t,e,n,l,a,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},e!==null&&(e=ka(e),e!==null&&dp(e)),t):(t.eventSystemFlags|=l,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function Qx(t,e,n,l,a){switch(e){case"focusin":return el=hi(el,t,e,n,l,a),!0;case"dragenter":return nl=hi(nl,t,e,n,l,a),!0;case"mouseover":return ll=hi(ll,t,e,n,l,a),!0;case"pointerover":var i=a.pointerId;return tu.set(i,hi(tu.get(i)||null,t,e,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,eu.set(i,hi(eu.get(i)||null,t,e,n,l,a)),!0}return!1}function mp(t){var e=ra(t.target);if(e!==null){var n=ru(e);if(n!==null){if(e=n.tag,e===13){if(e=R0(n),e!==null){t.blockedOn=e,Gd(t.priority,function(){am(n)});return}}else if(e===31){if(e=D0(n),e!==null){t.blockedOn=e,Gd(t.priority,function(){am(n)});return}}else if(e===3&&n.stateNode.current.memoizedState.isDehydrated){t.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}t.blockedOn=null}function yc(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var n=qr(t.nativeEvent);if(n===null){n=t.nativeEvent;var l=new n.constructor(n.type,n);ar=l,n.target.dispatchEvent(l),ar=null}else return e=ka(n),e!==null&&dp(e),t.blockedOn=n,!1;e.shift()}return!0}function um(t,e,n){yc(t)&&n.delete(e)}function Kx(){Yr=!1,el!==null&&yc(el)&&(el=null),nl!==null&&yc(nl)&&(nl=null),ll!==null&&yc(ll)&&(ll=null),tu.forEach(um),eu.forEach(um)}function Xu(t,e){t.blockedOn===e&&(t.blockedOn=null,Yr||(Yr=!0,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,Kx)))}var Gu=null;function cm(t){Gu!==t&&(Gu=t,jt.unstable_scheduleCallback(jt.unstable_NormalPriority,function(){Gu===t&&(Gu=null);for(var e=0;e<t.length;e+=3){var n=t[e],l=t[e+1],a=t[e+2];if(typeof l!="function"){if(sd(l||n)===null)continue;break}var i=ka(n);i!==null&&(t.splice(e,3),e-=3,br(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function Va(t){function e(s){return Xu(s,t)}el!==null&&Xu(el,t),nl!==null&&Xu(nl,t),ll!==null&&Xu(ll,t),tu.forEach(e),eu.forEach(e);for(var n=0;n<Xn.length;n++){var l=Xn[n];l.blockedOn===t&&(l.blockedOn=null)}for(;0<Xn.length&&(n=Xn[0],n.blockedOn===null);)mp(n),n.blockedOn===null&&Xn.shift();if(n=(t.ownerDocument||t).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],u=a[he]||null;if(typeof i=="function")u||cm(n);else if(u){var c=null;if(i&&i.hasAttribute("formAction")){if(a=i,u=i[he]||null)c=u.formAction;else if(sd(a)!==null)continue}else c=u.action;typeof c=="function"?n[l+1]=c:(n.splice(l,3),l-=3),cm(n)}}}function yp(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return a=u})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function od(t){this._internalRoot=t}Ns.prototype.render=od.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(q(409));var n=e.current,l=_e();fp(n,l,t,e,null,null)};Ns.prototype.unmount=od.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;fp(t.current,2,null,t,null,null),ws(),e[Ja]=null}};function Ns(t){this._internalRoot=t}Ns.prototype.unstable_scheduleHydration=function(t){if(t){var e=Z0();t={blockedOn:null,target:t,priority:e};for(var n=0;n<Xn.length&&e!==0&&e<Xn[n].priority;n++);Xn.splice(n,0,t),n===0&&mp(t)}};var sm=O0.version;if(sm!=="19.2.3")throw Error(q(527,sm,"19.2.3"));ot.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(q(188)):(t=Object.keys(t).join(","),Error(q(268,t)));return t=_S(e),t=t!==null?U0(t):null,t=t===null?null:t.stateNode,t};var Jx={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:k,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zu.isDisabled&&Zu.supportsFiber)try{fu=Zu.inject(Jx),xe=Zu}catch{}}rs.createRoot=function(t,e){if(!C0(t))throw Error(q(299));var n=!1,l="",a=ug,i=cg,u=sg;return e!=null&&(e.unstable_strictMode===!0&&(n=!0),e.identifierPrefix!==void 0&&(l=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(u=e.onRecoverableError)),e=op(t,1,!1,null,null,n,l,null,a,i,u,yp),t[Ja]=e.current,ld(t),new od(e)};rs.hydrateRoot=function(t,e,n){if(!C0(t))throw Error(q(299));var l=!1,a="",i=ug,u=cg,c=sg,s=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(u=n.onCaughtError),n.onRecoverableError!==void 0&&(c=n.onRecoverableError),n.formState!==void 0&&(s=n.formState)),e=op(t,1,!0,e,n??null,l,a,s,i,u,c,yp),e.context=rp(null),n=e.current,l=_e(),l=pf(l),a=Wn(l),a.callback=null,In(n,a,l),n=l,e.current.lanes=n,hu(e,n),nn(e),t[Ja]=e.current,ld(t),new Ns(e)};rs.version="19.2.3";function gp(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(gp)}catch(t){console.error(t)}}gp(),p0.exports=rs;var kx=p0.exports;const Fx=sf(kx),Zt=[];for(let t=0;t<256;++t)Zt.push((t+256).toString(16).slice(1));function Wx(t,e=0){return(Zt[t[e+0]]+Zt[t[e+1]]+Zt[t[e+2]]+Zt[t[e+3]]+"-"+Zt[t[e+4]]+Zt[t[e+5]]+"-"+Zt[t[e+6]]+Zt[t[e+7]]+"-"+Zt[t[e+8]]+Zt[t[e+9]]+"-"+Zt[t[e+10]]+Zt[t[e+11]]+Zt[t[e+12]]+Zt[t[e+13]]+Zt[t[e+14]]+Zt[t[e+15]]).toLowerCase()}let Mo;const Ix=new Uint8Array(16);function Px(){if(!Mo){if(typeof crypto>"u"||!crypto.getRandomValues)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");Mo=crypto.getRandomValues.bind(crypto)}return Mo(Ix)}const tE=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),om={randomUUID:tE};function eE(t,e,n){var a;t=t||{};const l=t.random??((a=t.rng)==null?void 0:a.call(t))??Px();if(l.length<16)throw new Error("Random bytes length must be >= 16");return l[6]=l[6]&15|64,l[8]=l[8]&63|128,Wx(l)}function Ic(t,e,n){return om.randomUUID&&!t?om.randomUUID():eE(t)}function Ft(t){if(typeof t=="string"||typeof t=="number")return""+t;let e="";if(Array.isArray(t))for(let n=0,l;n<t.length;n++)(l=Ft(t[n]))!==""&&(e+=(e&&" ")+l);else for(let n in t)t[n]&&(e+=(e&&" ")+n);return e}var pp={exports:{}},vp={},Sp={exports:{}},bp={};/**
 * @license React
 * use-sync-external-store-shim.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Xa=T;function nE(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var lE=typeof Object.is=="function"?Object.is:nE,aE=Xa.useState,iE=Xa.useEffect,uE=Xa.useLayoutEffect,cE=Xa.useDebugValue;function sE(t,e){var n=e(),l=aE({inst:{value:n,getSnapshot:e}}),a=l[0].inst,i=l[1];return uE(function(){a.value=n,a.getSnapshot=e,Oo(a)&&i({inst:a})},[t,n,e]),iE(function(){return Oo(a)&&i({inst:a}),t(function(){Oo(a)&&i({inst:a})})},[t]),cE(n),n}function Oo(t){var e=t.getSnapshot;t=t.value;try{var n=e();return!lE(t,n)}catch{return!0}}function oE(t,e){return e()}var rE=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?oE:sE;bp.useSyncExternalStore=Xa.useSyncExternalStore!==void 0?Xa.useSyncExternalStore:rE;Sp.exports=bp;var fE=Sp.exports;/**
 * @license React
 * use-sync-external-store-shim/with-selector.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var zs=T,dE=fE;function hE(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var mE=typeof Object.is=="function"?Object.is:hE,yE=dE.useSyncExternalStore,gE=zs.useRef,pE=zs.useEffect,vE=zs.useMemo,SE=zs.useDebugValue;vp.useSyncExternalStoreWithSelector=function(t,e,n,l,a){var i=gE(null);if(i.current===null){var u={hasValue:!1,value:null};i.current=u}else u=i.current;i=vE(function(){function s(h){if(!o){if(o=!0,r=h,h=l(h),a!==void 0&&u.hasValue){var g=u.value;if(a(g,h))return f=g}return f=h}if(g=f,mE(r,h))return g;var p=l(h);return a!==void 0&&a(g,p)?(r=h,g):(r=h,f=p)}var o=!1,r,f,d=n===void 0?null:n;return[function(){return s(e())},d===null?void 0:function(){return s(d())}]},[e,n,l,a]);var c=yE(t,i[0],i[1]);return pE(function(){u.hasValue=!0,u.value=c},[c]),SE(c),c};pp.exports=vp;var bE=pp.exports;const xE=sf(bE),EE={},rm=t=>{let e;const n=new Set,l=(r,f)=>{const d=typeof r=="function"?r(e):r;if(!Object.is(d,e)){const h=e;e=f??(typeof d!="object"||d===null)?d:Object.assign({},e,d),n.forEach(g=>g(e,h))}},a=()=>e,s={setState:l,getState:a,getInitialState:()=>o,subscribe:r=>(n.add(r),()=>n.delete(r)),destroy:()=>{(EE?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},o=e=t(l,a,s);return s},_E=t=>t?rm(t):rm,{useDebugValue:wE}=B,{useSyncExternalStoreWithSelector:AE}=xE,TE=t=>t;function xp(t,e=TE,n){const l=AE(t.subscribe,t.getState,t.getServerState||t.getInitialState,e,n);return wE(l),l}const fm=(t,e)=>{const n=_E(t),l=(a,i=e)=>xp(n,a,i);return Object.assign(l,n),l},NE=(t,e)=>t?fm(t,e):fm;function Xt(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[l,a]of t)if(!Object.is(a,e.get(l)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const l of t)if(!e.has(l))return!1;return!0}const n=Object.keys(t);if(n.length!==Object.keys(e).length)return!1;for(const l of n)if(!Object.prototype.hasOwnProperty.call(e,l)||!Object.is(t[l],e[l]))return!1;return!0}var zE={value:()=>{}};function Ms(){for(var t=0,e=arguments.length,n={},l;t<e;++t){if(!(l=arguments[t]+"")||l in n||/[\s.]/.test(l))throw new Error("illegal type: "+l);n[l]=[]}return new gc(n)}function gc(t){this._=t}function ME(t,e){return t.trim().split(/^|\s+/).map(function(n){var l="",a=n.indexOf(".");if(a>=0&&(l=n.slice(a+1),n=n.slice(0,a)),n&&!e.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:l}})}gc.prototype=Ms.prototype={constructor:gc,on:function(t,e){var n=this._,l=ME(t+"",n),a,i=-1,u=l.length;if(arguments.length<2){for(;++i<u;)if((a=(t=l[i]).type)&&(a=OE(n[a],t.name)))return a;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++i<u;)if(a=(t=l[i]).type)n[a]=dm(n[a],t.name,e);else if(e==null)for(a in n)n[a]=dm(n[a],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new gc(t)},call:function(t,e){if((a=arguments.length-2)>0)for(var n=new Array(a),l=0,a,i;l<a;++l)n[l]=arguments[l+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(i=this._[t],l=0,a=i.length;l<a;++l)i[l].value.apply(e,n)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var l=this._[t],a=0,i=l.length;a<i;++a)l[a].value.apply(e,n)}};function OE(t,e){for(var n=0,l=t.length,a;n<l;++n)if((a=t[n]).name===e)return a.value}function dm(t,e,n){for(var l=0,a=t.length;l<a;++l)if(t[l].name===e){t[l]=zE,t=t.slice(0,l).concat(t.slice(l+1));break}return n!=null&&t.push({name:e,value:n}),t}var Vr="http://www.w3.org/1999/xhtml";const hm={svg:"http://www.w3.org/2000/svg",xhtml:Vr,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Os(t){var e=t+="",n=e.indexOf(":");return n>=0&&(e=t.slice(0,n))!=="xmlns"&&(t=t.slice(n+1)),hm.hasOwnProperty(e)?{space:hm[e],local:t}:t}function CE(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===Vr&&e.documentElement.namespaceURI===Vr?e.createElement(t):e.createElementNS(n,t)}}function RE(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Ep(t){var e=Os(t);return(e.local?RE:CE)(e)}function DE(){}function rd(t){return t==null?DE:function(){return this.querySelector(t)}}function UE(t){typeof t!="function"&&(t=rd(t));for(var e=this._groups,n=e.length,l=new Array(n),a=0;a<n;++a)for(var i=e[a],u=i.length,c=l[a]=new Array(u),s,o,r=0;r<u;++r)(s=i[r])&&(o=t.call(s,s.__data__,r,i))&&("__data__"in s&&(o.__data__=s.__data__),c[r]=o);return new Te(l,this._parents)}function HE(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function BE(){return[]}function _p(t){return t==null?BE:function(){return this.querySelectorAll(t)}}function jE(t){return function(){return HE(t.apply(this,arguments))}}function LE(t){typeof t=="function"?t=jE(t):t=_p(t);for(var e=this._groups,n=e.length,l=[],a=[],i=0;i<n;++i)for(var u=e[i],c=u.length,s,o=0;o<c;++o)(s=u[o])&&(l.push(t.call(s,s.__data__,o,u)),a.push(s));return new Te(l,a)}function wp(t){return function(){return this.matches(t)}}function Ap(t){return function(e){return e.matches(t)}}var qE=Array.prototype.find;function YE(t){return function(){return qE.call(this.children,t)}}function VE(){return this.firstElementChild}function XE(t){return this.select(t==null?VE:YE(typeof t=="function"?t:Ap(t)))}var GE=Array.prototype.filter;function ZE(){return Array.from(this.children)}function $E(t){return function(){return GE.call(this.children,t)}}function QE(t){return this.selectAll(t==null?ZE:$E(typeof t=="function"?t:Ap(t)))}function KE(t){typeof t!="function"&&(t=wp(t));for(var e=this._groups,n=e.length,l=new Array(n),a=0;a<n;++a)for(var i=e[a],u=i.length,c=l[a]=[],s,o=0;o<u;++o)(s=i[o])&&t.call(s,s.__data__,o,i)&&c.push(s);return new Te(l,this._parents)}function Tp(t){return new Array(t.length)}function JE(){return new Te(this._enter||this._groups.map(Tp),this._parents)}function Pc(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Pc.prototype={constructor:Pc,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function kE(t){return function(){return t}}function FE(t,e,n,l,a,i){for(var u=0,c,s=e.length,o=i.length;u<o;++u)(c=e[u])?(c.__data__=i[u],l[u]=c):n[u]=new Pc(t,i[u]);for(;u<s;++u)(c=e[u])&&(a[u]=c)}function WE(t,e,n,l,a,i,u){var c,s,o=new Map,r=e.length,f=i.length,d=new Array(r),h;for(c=0;c<r;++c)(s=e[c])&&(d[c]=h=u.call(s,s.__data__,c,e)+"",o.has(h)?a[c]=s:o.set(h,s));for(c=0;c<f;++c)h=u.call(t,i[c],c,i)+"",(s=o.get(h))?(l[c]=s,s.__data__=i[c],o.delete(h)):n[c]=new Pc(t,i[c]);for(c=0;c<r;++c)(s=e[c])&&o.get(d[c])===s&&(a[c]=s)}function IE(t){return t.__data__}function PE(t,e){if(!arguments.length)return Array.from(this,IE);var n=e?WE:FE,l=this._parents,a=this._groups;typeof t!="function"&&(t=kE(t));for(var i=a.length,u=new Array(i),c=new Array(i),s=new Array(i),o=0;o<i;++o){var r=l[o],f=a[o],d=f.length,h=t2(t.call(r,r&&r.__data__,o,l)),g=h.length,p=c[o]=new Array(g),b=u[o]=new Array(g),m=s[o]=new Array(d);n(r,f,p,b,m,h,e);for(var y=0,v=0,S,_;y<g;++y)if(S=p[y]){for(y>=v&&(v=y+1);!(_=b[v])&&++v<g;);S._next=_||null}}return u=new Te(u,l),u._enter=c,u._exit=s,u}function t2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function e2(){return new Te(this._exit||this._groups.map(Tp),this._parents)}function n2(t,e,n){var l=this.enter(),a=this,i=this.exit();return typeof t=="function"?(l=t(l),l&&(l=l.selection())):l=l.append(t+""),e!=null&&(a=e(a),a&&(a=a.selection())),n==null?i.remove():n(i),l&&a?l.merge(a).order():a}function l2(t){for(var e=t.selection?t.selection():t,n=this._groups,l=e._groups,a=n.length,i=l.length,u=Math.min(a,i),c=new Array(a),s=0;s<u;++s)for(var o=n[s],r=l[s],f=o.length,d=c[s]=new Array(f),h,g=0;g<f;++g)(h=o[g]||r[g])&&(d[g]=h);for(;s<a;++s)c[s]=n[s];return new Te(c,this._parents)}function a2(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var l=t[e],a=l.length-1,i=l[a],u;--a>=0;)(u=l[a])&&(i&&u.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(u,i),i=u);return this}function i2(t){t||(t=u2);function e(f,d){return f&&d?t(f.__data__,d.__data__):!f-!d}for(var n=this._groups,l=n.length,a=new Array(l),i=0;i<l;++i){for(var u=n[i],c=u.length,s=a[i]=new Array(c),o,r=0;r<c;++r)(o=u[r])&&(s[r]=o);s.sort(e)}return new Te(a,this._parents).order()}function u2(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function c2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function s2(){return Array.from(this)}function o2(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var l=t[e],a=0,i=l.length;a<i;++a){var u=l[a];if(u)return u}return null}function r2(){let t=0;for(const e of this)++t;return t}function f2(){return!this.node()}function d2(t){for(var e=this._groups,n=0,l=e.length;n<l;++n)for(var a=e[n],i=0,u=a.length,c;i<u;++i)(c=a[i])&&t.call(c,c.__data__,i,a);return this}function h2(t){return function(){this.removeAttribute(t)}}function m2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function y2(t,e){return function(){this.setAttribute(t,e)}}function g2(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function p2(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttribute(t):this.setAttribute(t,n)}}function v2(t,e){return function(){var n=e.apply(this,arguments);n==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}function S2(t,e){var n=Os(t);if(arguments.length<2){var l=this.node();return n.local?l.getAttributeNS(n.space,n.local):l.getAttribute(n)}return this.each((e==null?n.local?m2:h2:typeof e=="function"?n.local?v2:p2:n.local?g2:y2)(n,e))}function Np(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function b2(t){return function(){this.style.removeProperty(t)}}function x2(t,e,n){return function(){this.style.setProperty(t,e,n)}}function E2(t,e,n){return function(){var l=e.apply(this,arguments);l==null?this.style.removeProperty(t):this.style.setProperty(t,l,n)}}function _2(t,e,n){return arguments.length>1?this.each((e==null?b2:typeof e=="function"?E2:x2)(t,e,n??"")):Ga(this.node(),t)}function Ga(t,e){return t.style.getPropertyValue(e)||Np(t).getComputedStyle(t,null).getPropertyValue(e)}function w2(t){return function(){delete this[t]}}function A2(t,e){return function(){this[t]=e}}function T2(t,e){return function(){var n=e.apply(this,arguments);n==null?delete this[t]:this[t]=n}}function N2(t,e){return arguments.length>1?this.each((e==null?w2:typeof e=="function"?T2:A2)(t,e)):this.node()[t]}function zp(t){return t.trim().split(/^|\s+/)}function fd(t){return t.classList||new Mp(t)}function Mp(t){this._node=t,this._names=zp(t.getAttribute("class")||"")}Mp.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Op(t,e){for(var n=fd(t),l=-1,a=e.length;++l<a;)n.add(e[l])}function Cp(t,e){for(var n=fd(t),l=-1,a=e.length;++l<a;)n.remove(e[l])}function z2(t){return function(){Op(this,t)}}function M2(t){return function(){Cp(this,t)}}function O2(t,e){return function(){(e.apply(this,arguments)?Op:Cp)(this,t)}}function C2(t,e){var n=zp(t+"");if(arguments.length<2){for(var l=fd(this.node()),a=-1,i=n.length;++a<i;)if(!l.contains(n[a]))return!1;return!0}return this.each((typeof e=="function"?O2:e?z2:M2)(n,e))}function R2(){this.textContent=""}function D2(t){return function(){this.textContent=t}}function U2(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function H2(t){return arguments.length?this.each(t==null?R2:(typeof t=="function"?U2:D2)(t)):this.node().textContent}function B2(){this.innerHTML=""}function j2(t){return function(){this.innerHTML=t}}function L2(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function q2(t){return arguments.length?this.each(t==null?B2:(typeof t=="function"?L2:j2)(t)):this.node().innerHTML}function Y2(){this.nextSibling&&this.parentNode.appendChild(this)}function V2(){return this.each(Y2)}function X2(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function G2(){return this.each(X2)}function Z2(t){var e=typeof t=="function"?t:Ep(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function $2(){return null}function Q2(t,e){var n=typeof t=="function"?t:Ep(t),l=e==null?$2:typeof e=="function"?e:rd(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),l.apply(this,arguments)||null)})}function K2(){var t=this.parentNode;t&&t.removeChild(this)}function J2(){return this.each(K2)}function k2(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function F2(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function W2(t){return this.select(t?F2:k2)}function I2(t){return arguments.length?this.property("__data__",t):this.node().__data__}function P2(t){return function(e){t.call(this,e,this.__data__)}}function t_(t){return t.trim().split(/^|\s+/).map(function(e){var n="",l=e.indexOf(".");return l>=0&&(n=e.slice(l+1),e=e.slice(0,l)),{type:e,name:n}})}function e_(t){return function(){var e=this.__on;if(e){for(var n=0,l=-1,a=e.length,i;n<a;++n)i=e[n],(!t.type||i.type===t.type)&&i.name===t.name?this.removeEventListener(i.type,i.listener,i.options):e[++l]=i;++l?e.length=l:delete this.__on}}}function n_(t,e,n){return function(){var l=this.__on,a,i=P2(e);if(l){for(var u=0,c=l.length;u<c;++u)if((a=l[u]).type===t.type&&a.name===t.name){this.removeEventListener(a.type,a.listener,a.options),this.addEventListener(a.type,a.listener=i,a.options=n),a.value=e;return}}this.addEventListener(t.type,i,n),a={type:t.type,name:t.name,value:e,listener:i,options:n},l?l.push(a):this.__on=[a]}}function l_(t,e,n){var l=t_(t+""),a,i=l.length,u;if(arguments.length<2){var c=this.node().__on;if(c){for(var s=0,o=c.length,r;s<o;++s)for(a=0,r=c[s];a<i;++a)if((u=l[a]).type===r.type&&u.name===r.name)return r.value}return}for(c=e?n_:e_,a=0;a<i;++a)this.each(c(l[a],e,n));return this}function Rp(t,e,n){var l=Np(t),a=l.CustomEvent;typeof a=="function"?a=new a(e,n):(a=l.document.createEvent("Event"),n?(a.initEvent(e,n.bubbles,n.cancelable),a.detail=n.detail):a.initEvent(e,!1,!1)),t.dispatchEvent(a)}function a_(t,e){return function(){return Rp(this,t,e)}}function i_(t,e){return function(){return Rp(this,t,e.apply(this,arguments))}}function u_(t,e){return this.each((typeof e=="function"?i_:a_)(t,e))}function*c_(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var l=t[e],a=0,i=l.length,u;a<i;++a)(u=l[a])&&(yield u)}var Dp=[null];function Te(t,e){this._groups=t,this._parents=e}function Eu(){return new Te([[document.documentElement]],Dp)}function s_(){return this}Te.prototype=Eu.prototype={constructor:Te,select:UE,selectAll:LE,selectChild:XE,selectChildren:QE,filter:KE,data:PE,enter:JE,exit:e2,join:n2,merge:l2,selection:s_,order:a2,sort:i2,call:c2,nodes:s2,node:o2,size:r2,empty:f2,each:d2,attr:S2,style:_2,property:N2,classed:C2,text:H2,html:q2,raise:V2,lower:G2,append:Z2,insert:Q2,remove:J2,clone:W2,datum:I2,on:l_,dispatch:u_,[Symbol.iterator]:c_};function Ue(t){return typeof t=="string"?new Te([[document.querySelector(t)]],[document.documentElement]):new Te([[t]],Dp)}function o_(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Xe(t,e){if(t=o_(t),e===void 0&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var l=n.createSVGPoint();return l.x=t.clientX,l.y=t.clientY,l=l.matrixTransform(e.getScreenCTM().inverse()),[l.x,l.y]}if(e.getBoundingClientRect){var a=e.getBoundingClientRect();return[t.clientX-a.left-e.clientLeft,t.clientY-a.top-e.clientTop]}}return[t.pageX,t.pageY]}const r_={passive:!1},nu={capture:!0,passive:!1};function Co(t){t.stopImmediatePropagation()}function za(t){t.preventDefault(),t.stopImmediatePropagation()}function Up(t){var e=t.document.documentElement,n=Ue(t).on("dragstart.drag",za,nu);"onselectstart"in e?n.on("selectstart.drag",za,nu):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Hp(t,e){var n=t.document.documentElement,l=Ue(t).on("dragstart.drag",null);e&&(l.on("click.drag",za,nu),setTimeout(function(){l.on("click.drag",null)},0)),"onselectstart"in n?l.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const $u=t=>()=>t;function Xr(t,{sourceEvent:e,subject:n,target:l,identifier:a,active:i,x:u,y:c,dx:s,dy:o,dispatch:r}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},identifier:{value:a,enumerable:!0,configurable:!0},active:{value:i,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:s,enumerable:!0,configurable:!0},dy:{value:o,enumerable:!0,configurable:!0},_:{value:r}})}Xr.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function f_(t){return!t.ctrlKey&&!t.button}function d_(){return this.parentNode}function h_(t,e){return e??{x:t.x,y:t.y}}function m_(){return navigator.maxTouchPoints||"ontouchstart"in this}function y_(){var t=f_,e=d_,n=h_,l=m_,a={},i=Ms("start","drag","end"),u=0,c,s,o,r,f=0;function d(S){S.on("mousedown.drag",h).filter(l).on("touchstart.drag",b).on("touchmove.drag",m,r_).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(S,_){if(!(r||!t.call(this,S,_))){var N=v(this,e.call(this,S,_),S,_,"mouse");N&&(Ue(S.view).on("mousemove.drag",g,nu).on("mouseup.drag",p,nu),Up(S.view),Co(S),o=!1,c=S.clientX,s=S.clientY,N("start",S))}}function g(S){if(za(S),!o){var _=S.clientX-c,N=S.clientY-s;o=_*_+N*N>f}a.mouse("drag",S)}function p(S){Ue(S.view).on("mousemove.drag mouseup.drag",null),Hp(S.view,o),za(S),a.mouse("end",S)}function b(S,_){if(t.call(this,S,_)){var N=S.changedTouches,w=e.call(this,S,_),H=N.length,z,L;for(z=0;z<H;++z)(L=v(this,w,S,_,N[z].identifier,N[z]))&&(Co(S),L("start",S,N[z]))}}function m(S){var _=S.changedTouches,N=_.length,w,H;for(w=0;w<N;++w)(H=a[_[w].identifier])&&(za(S),H("drag",S,_[w]))}function y(S){var _=S.changedTouches,N=_.length,w,H;for(r&&clearTimeout(r),r=setTimeout(function(){r=null},500),w=0;w<N;++w)(H=a[_[w].identifier])&&(Co(S),H("end",S,_[w]))}function v(S,_,N,w,H,z){var L=i.copy(),R=Xe(z||N,_),G,V,x;if((x=n.call(S,new Xr("beforestart",{sourceEvent:N,target:d,identifier:H,active:u,x:R[0],y:R[1],dx:0,dy:0,dispatch:L}),w))!=null)return G=x.x-R[0]||0,V=x.y-R[1]||0,function C(E,M,U){var A=R,j;switch(E){case"start":a[H]=C,j=u++;break;case"end":delete a[H],--u;case"drag":R=Xe(U||M,_),j=u;break}L.call(E,S,new Xr(E,{sourceEvent:M,subject:x,target:d,identifier:H,active:j,x:R[0]+G,y:R[1]+V,dx:R[0]-A[0],dy:R[1]-A[1],dispatch:L}),w)}}return d.filter=function(S){return arguments.length?(t=typeof S=="function"?S:$u(!!S),d):t},d.container=function(S){return arguments.length?(e=typeof S=="function"?S:$u(S),d):e},d.subject=function(S){return arguments.length?(n=typeof S=="function"?S:$u(S),d):n},d.touchable=function(S){return arguments.length?(l=typeof S=="function"?S:$u(!!S),d):l},d.on=function(){var S=i.on.apply(i,arguments);return S===i?d:S},d.clickDistance=function(S){return arguments.length?(f=(S=+S)*S,d):Math.sqrt(f)},d}function dd(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function Bp(t,e){var n=Object.create(t.prototype);for(var l in e)n[l]=e[l];return n}function _u(){}var lu=.7,ts=1/lu,Ma="\\s*([+-]?\\d+)\\s*",au="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",tn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",g_=/^#([0-9a-f]{3,8})$/,p_=new RegExp(`^rgb\\(${Ma},${Ma},${Ma}\\)$`),v_=new RegExp(`^rgb\\(${tn},${tn},${tn}\\)$`),S_=new RegExp(`^rgba\\(${Ma},${Ma},${Ma},${au}\\)$`),b_=new RegExp(`^rgba\\(${tn},${tn},${tn},${au}\\)$`),x_=new RegExp(`^hsl\\(${au},${tn},${tn}\\)$`),E_=new RegExp(`^hsla\\(${au},${tn},${tn},${au}\\)$`),mm={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};dd(_u,iu,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:ym,formatHex:ym,formatHex8:__,formatHsl:w_,formatRgb:gm,toString:gm});function ym(){return this.rgb().formatHex()}function __(){return this.rgb().formatHex8()}function w_(){return jp(this).formatHsl()}function gm(){return this.rgb().formatRgb()}function iu(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=g_.exec(t))?(n=e[1].length,e=parseInt(e[1],16),n===6?pm(e):n===3?new oe(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):n===8?Qu(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):n===4?Qu(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=p_.exec(t))?new oe(e[1],e[2],e[3],1):(e=v_.exec(t))?new oe(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=S_.exec(t))?Qu(e[1],e[2],e[3],e[4]):(e=b_.exec(t))?Qu(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=x_.exec(t))?bm(e[1],e[2]/100,e[3]/100,1):(e=E_.exec(t))?bm(e[1],e[2]/100,e[3]/100,e[4]):mm.hasOwnProperty(t)?pm(mm[t]):t==="transparent"?new oe(NaN,NaN,NaN,0):null}function pm(t){return new oe(t>>16&255,t>>8&255,t&255,1)}function Qu(t,e,n,l){return l<=0&&(t=e=n=NaN),new oe(t,e,n,l)}function A_(t){return t instanceof _u||(t=iu(t)),t?(t=t.rgb(),new oe(t.r,t.g,t.b,t.opacity)):new oe}function Gr(t,e,n,l){return arguments.length===1?A_(t):new oe(t,e,n,l??1)}function oe(t,e,n,l){this.r=+t,this.g=+e,this.b=+n,this.opacity=+l}dd(oe,Gr,Bp(_u,{brighter(t){return t=t==null?ts:Math.pow(ts,t),new oe(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?lu:Math.pow(lu,t),new oe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new oe(Cl(this.r),Cl(this.g),Cl(this.b),es(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:vm,formatHex:vm,formatHex8:T_,formatRgb:Sm,toString:Sm}));function vm(){return`#${_l(this.r)}${_l(this.g)}${_l(this.b)}`}function T_(){return`#${_l(this.r)}${_l(this.g)}${_l(this.b)}${_l((isNaN(this.opacity)?1:this.opacity)*255)}`}function Sm(){const t=es(this.opacity);return`${t===1?"rgb(":"rgba("}${Cl(this.r)}, ${Cl(this.g)}, ${Cl(this.b)}${t===1?")":`, ${t})`}`}function es(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Cl(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function _l(t){return t=Cl(t),(t<16?"0":"")+t.toString(16)}function bm(t,e,n,l){return l<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new Ge(t,e,n,l)}function jp(t){if(t instanceof Ge)return new Ge(t.h,t.s,t.l,t.opacity);if(t instanceof _u||(t=iu(t)),!t)return new Ge;if(t instanceof Ge)return t;t=t.rgb();var e=t.r/255,n=t.g/255,l=t.b/255,a=Math.min(e,n,l),i=Math.max(e,n,l),u=NaN,c=i-a,s=(i+a)/2;return c?(e===i?u=(n-l)/c+(n<l)*6:n===i?u=(l-e)/c+2:u=(e-n)/c+4,c/=s<.5?i+a:2-i-a,u*=60):c=s>0&&s<1?0:u,new Ge(u,c,s,t.opacity)}function N_(t,e,n,l){return arguments.length===1?jp(t):new Ge(t,e,n,l??1)}function Ge(t,e,n,l){this.h=+t,this.s=+e,this.l=+n,this.opacity=+l}dd(Ge,N_,Bp(_u,{brighter(t){return t=t==null?ts:Math.pow(ts,t),new Ge(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?lu:Math.pow(lu,t),new Ge(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,l=n+(n<.5?n:1-n)*e,a=2*n-l;return new oe(Ro(t>=240?t-240:t+120,a,l),Ro(t,a,l),Ro(t<120?t+240:t-120,a,l),this.opacity)},clamp(){return new Ge(xm(this.h),Ku(this.s),Ku(this.l),es(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 t=es(this.opacity);return`${t===1?"hsl(":"hsla("}${xm(this.h)}, ${Ku(this.s)*100}%, ${Ku(this.l)*100}%${t===1?")":`, ${t})`}`}}));function xm(t){return t=(t||0)%360,t<0?t+360:t}function Ku(t){return Math.max(0,Math.min(1,t||0))}function Ro(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}const Lp=t=>()=>t;function z_(t,e){return function(n){return t+n*e}}function M_(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(l){return Math.pow(t+l*e,n)}}function O_(t){return(t=+t)==1?qp:function(e,n){return n-e?M_(e,n,t):Lp(isNaN(e)?n:e)}}function qp(t,e){var n=e-t;return n?z_(t,n):Lp(isNaN(t)?e:t)}const Em=function t(e){var n=O_(e);function l(a,i){var u=n((a=Gr(a)).r,(i=Gr(i)).r),c=n(a.g,i.g),s=n(a.b,i.b),o=qp(a.opacity,i.opacity);return function(r){return a.r=u(r),a.g=c(r),a.b=s(r),a.opacity=o(r),a+""}}return l.gamma=t,l}(1);function jn(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}}var Zr=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Do=new RegExp(Zr.source,"g");function C_(t){return function(){return t}}function R_(t){return function(e){return t(e)+""}}function D_(t,e){var n=Zr.lastIndex=Do.lastIndex=0,l,a,i,u=-1,c=[],s=[];for(t=t+"",e=e+"";(l=Zr.exec(t))&&(a=Do.exec(e));)(i=a.index)>n&&(i=e.slice(n,i),c[u]?c[u]+=i:c[++u]=i),(l=l[0])===(a=a[0])?c[u]?c[u]+=a:c[++u]=a:(c[++u]=null,s.push({i:u,x:jn(l,a)})),n=Do.lastIndex;return n<e.length&&(i=e.slice(n),c[u]?c[u]+=i:c[++u]=i),c.length<2?s[0]?R_(s[0].x):C_(e):(e=s.length,function(o){for(var r=0,f;r<e;++r)c[(f=s[r]).i]=f.x(o);return c.join("")})}var _m=180/Math.PI,$r={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yp(t,e,n,l,a,i){var u,c,s;return(u=Math.sqrt(t*t+e*e))&&(t/=u,e/=u),(s=t*n+e*l)&&(n-=t*s,l-=e*s),(c=Math.sqrt(n*n+l*l))&&(n/=c,l/=c,s/=c),t*l<e*n&&(t=-t,e=-e,s=-s,u=-u),{translateX:a,translateY:i,rotate:Math.atan2(e,t)*_m,skewX:Math.atan(s)*_m,scaleX:u,scaleY:c}}var Ju;function U_(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?$r:Yp(e.a,e.b,e.c,e.d,e.e,e.f)}function H_(t){return t==null||(Ju||(Ju=document.createElementNS("http://www.w3.org/2000/svg","g")),Ju.setAttribute("transform",t),!(t=Ju.transform.baseVal.consolidate()))?$r:(t=t.matrix,Yp(t.a,t.b,t.c,t.d,t.e,t.f))}function Vp(t,e,n,l){function a(o){return o.length?o.pop()+" ":""}function i(o,r,f,d,h,g){if(o!==f||r!==d){var p=h.push("translate(",null,e,null,n);g.push({i:p-4,x:jn(o,f)},{i:p-2,x:jn(r,d)})}else(f||d)&&h.push("translate("+f+e+d+n)}function u(o,r,f,d){o!==r?(o-r>180?r+=360:r-o>180&&(o+=360),d.push({i:f.push(a(f)+"rotate(",null,l)-2,x:jn(o,r)})):r&&f.push(a(f)+"rotate("+r+l)}function c(o,r,f,d){o!==r?d.push({i:f.push(a(f)+"skewX(",null,l)-2,x:jn(o,r)}):r&&f.push(a(f)+"skewX("+r+l)}function s(o,r,f,d,h,g){if(o!==f||r!==d){var p=h.push(a(h)+"scale(",null,",",null,")");g.push({i:p-4,x:jn(o,f)},{i:p-2,x:jn(r,d)})}else(f!==1||d!==1)&&h.push(a(h)+"scale("+f+","+d+")")}return function(o,r){var f=[],d=[];return o=t(o),r=t(r),i(o.translateX,o.translateY,r.translateX,r.translateY,f,d),u(o.rotate,r.rotate,f,d),c(o.skewX,r.skewX,f,d),s(o.scaleX,o.scaleY,r.scaleX,r.scaleY,f,d),o=r=null,function(h){for(var g=-1,p=d.length,b;++g<p;)f[(b=d[g]).i]=b.x(h);return f.join("")}}}var B_=Vp(U_,"px, ","px)","deg)"),j_=Vp(H_,", ",")",")"),L_=1e-12;function wm(t){return((t=Math.exp(t))+1/t)/2}function q_(t){return((t=Math.exp(t))-1/t)/2}function Y_(t){return((t=Math.exp(2*t))-1)/(t+1)}const V_=function t(e,n,l){function a(i,u){var c=i[0],s=i[1],o=i[2],r=u[0],f=u[1],d=u[2],h=r-c,g=f-s,p=h*h+g*g,b,m;if(p<L_)m=Math.log(d/o)/e,b=function(w){return[c+w*h,s+w*g,o*Math.exp(e*w*m)]};else{var y=Math.sqrt(p),v=(d*d-o*o+l*p)/(2*o*n*y),S=(d*d-o*o-l*p)/(2*d*n*y),_=Math.log(Math.sqrt(v*v+1)-v),N=Math.log(Math.sqrt(S*S+1)-S);m=(N-_)/e,b=function(w){var H=w*m,z=wm(_),L=o/(n*y)*(z*Y_(e*H+_)-q_(_));return[c+L*h,s+L*g,o*z/wm(e*H+_)]}}return b.duration=m*1e3*e/Math.SQRT2,b}return a.rho=function(i){var u=Math.max(.001,+i),c=u*u,s=c*c;return t(u,c,s)},a}(Math.SQRT2,2,4);var Za=0,Ai=0,mi=0,Xp=1e3,ns,Ti,ls=0,ql=0,Cs=0,uu=typeof performance=="object"&&performance.now?performance:Date,Gp=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function hd(){return ql||(Gp(X_),ql=uu.now()+Cs)}function X_(){ql=0}function as(){this._call=this._time=this._next=null}as.prototype=Zp.prototype={constructor:as,restart:function(t,e,n){if(typeof t!="function")throw new TypeError("callback is not a function");n=(n==null?hd():+n)+(e==null?0:+e),!this._next&&Ti!==this&&(Ti?Ti._next=this:ns=this,Ti=this),this._call=t,this._time=n,Qr()},stop:function(){this._call&&(this._call=null,this._time=1/0,Qr())}};function Zp(t,e,n){var l=new as;return l.restart(t,e,n),l}function G_(){hd(),++Za;for(var t=ns,e;t;)(e=ql-t._time)>=0&&t._call.call(void 0,e),t=t._next;--Za}function Am(){ql=(ls=uu.now())+Cs,Za=Ai=0;try{G_()}finally{Za=0,$_(),ql=0}}function Z_(){var t=uu.now(),e=t-ls;e>Xp&&(Cs-=e,ls=t)}function $_(){for(var t,e=ns,n,l=1/0;e;)e._call?(l>e._time&&(l=e._time),t=e,e=e._next):(n=e._next,e._next=null,e=t?t._next=n:ns=n);Ti=t,Qr(l)}function Qr(t){if(!Za){Ai&&(Ai=clearTimeout(Ai));var e=t-ql;e>24?(t<1/0&&(Ai=setTimeout(Am,t-uu.now()-Cs)),mi&&(mi=clearInterval(mi))):(mi||(ls=uu.now(),mi=setInterval(Z_,Xp)),Za=1,Gp(Am))}}function Tm(t,e,n){var l=new as;return e=e==null?0:+e,l.restart(a=>{l.stop(),t(a+e)},e,n),l}var Q_=Ms("start","end","cancel","interrupt"),K_=[],$p=0,Nm=1,Kr=2,pc=3,zm=4,Jr=5,vc=6;function Rs(t,e,n,l,a,i){var u=t.__transition;if(!u)t.__transition={};else if(n in u)return;J_(t,n,{name:e,index:l,group:a,on:Q_,tween:K_,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:$p})}function md(t,e){var n=Qe(t,e);if(n.state>$p)throw new Error("too late; already scheduled");return n}function ln(t,e){var n=Qe(t,e);if(n.state>pc)throw new Error("too late; already running");return n}function Qe(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}function J_(t,e,n){var l=t.__transition,a;l[e]=n,n.timer=Zp(i,0,n.time);function i(o){n.state=Nm,n.timer.restart(u,n.delay,n.time),n.delay<=o&&u(o-n.delay)}function u(o){var r,f,d,h;if(n.state!==Nm)return s();for(r in l)if(h=l[r],h.name===n.name){if(h.state===pc)return Tm(u);h.state===zm?(h.state=vc,h.timer.stop(),h.on.call("interrupt",t,t.__data__,h.index,h.group),delete l[r]):+r<e&&(h.state=vc,h.timer.stop(),h.on.call("cancel",t,t.__data__,h.index,h.group),delete l[r])}if(Tm(function(){n.state===pc&&(n.state=zm,n.timer.restart(c,n.delay,n.time),c(o))}),n.state=Kr,n.on.call("start",t,t.__data__,n.index,n.group),n.state===Kr){for(n.state=pc,a=new Array(d=n.tween.length),r=0,f=-1;r<d;++r)(h=n.tween[r].value.call(t,t.__data__,n.index,n.group))&&(a[++f]=h);a.length=f+1}}function c(o){for(var r=o<n.duration?n.ease.call(null,o/n.duration):(n.timer.restart(s),n.state=Jr,1),f=-1,d=a.length;++f<d;)a[f].call(t,r);n.state===Jr&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){n.state=vc,n.timer.stop(),delete l[e];for(var o in l)return;delete t.__transition}}function Sc(t,e){var n=t.__transition,l,a,i=!0,u;if(n){e=e==null?null:e+"";for(u in n){if((l=n[u]).name!==e){i=!1;continue}a=l.state>Kr&&l.state<Jr,l.state=vc,l.timer.stop(),l.on.call(a?"interrupt":"cancel",t,t.__data__,l.index,l.group),delete n[u]}i&&delete t.__transition}}function k_(t){return this.each(function(){Sc(this,t)})}function F_(t,e){var n,l;return function(){var a=ln(this,t),i=a.tween;if(i!==n){l=n=i;for(var u=0,c=l.length;u<c;++u)if(l[u].name===e){l=l.slice(),l.splice(u,1);break}}a.tween=l}}function W_(t,e,n){var l,a;if(typeof n!="function")throw new Error;return function(){var i=ln(this,t),u=i.tween;if(u!==l){a=(l=u).slice();for(var c={name:e,value:n},s=0,o=a.length;s<o;++s)if(a[s].name===e){a[s]=c;break}s===o&&a.push(c)}i.tween=a}}function I_(t,e){var n=this._id;if(t+="",arguments.length<2){for(var l=Qe(this.node(),n).tween,a=0,i=l.length,u;a<i;++a)if((u=l[a]).name===t)return u.value;return null}return this.each((e==null?F_:W_)(n,t,e))}function yd(t,e,n){var l=t._id;return t.each(function(){var a=ln(this,l);(a.value||(a.value={}))[e]=n.apply(this,arguments)}),function(a){return Qe(a,l).value[e]}}function Qp(t,e){var n;return(typeof e=="number"?jn:e instanceof iu?Em:(n=iu(e))?(e=n,Em):D_)(t,e)}function P_(t){return function(){this.removeAttribute(t)}}function tw(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ew(t,e,n){var l,a=n+"",i;return function(){var u=this.getAttribute(t);return u===a?null:u===l?i:i=e(l=u,n)}}function nw(t,e,n){var l,a=n+"",i;return function(){var u=this.getAttributeNS(t.space,t.local);return u===a?null:u===l?i:i=e(l=u,n)}}function lw(t,e,n){var l,a,i;return function(){var u,c=n(this),s;return c==null?void this.removeAttribute(t):(u=this.getAttribute(t),s=c+"",u===s?null:u===l&&s===a?i:(a=s,i=e(l=u,c)))}}function aw(t,e,n){var l,a,i;return function(){var u,c=n(this),s;return c==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),s=c+"",u===s?null:u===l&&s===a?i:(a=s,i=e(l=u,c)))}}function iw(t,e){var n=Os(t),l=n==="transform"?j_:Qp;return this.attrTween(t,typeof e=="function"?(n.local?aw:lw)(n,l,yd(this,"attr."+t,e)):e==null?(n.local?tw:P_)(n):(n.local?nw:ew)(n,l,e))}function uw(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function cw(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function sw(t,e){var n,l;function a(){var i=e.apply(this,arguments);return i!==l&&(n=(l=i)&&cw(t,i)),n}return a._value=e,a}function ow(t,e){var n,l;function a(){var i=e.apply(this,arguments);return i!==l&&(n=(l=i)&&uw(t,i)),n}return a._value=e,a}function rw(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;var l=Os(t);return this.tween(n,(l.local?sw:ow)(l,e))}function fw(t,e){return function(){md(this,t).delay=+e.apply(this,arguments)}}function dw(t,e){return e=+e,function(){md(this,t).delay=e}}function hw(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?fw:dw)(e,t)):Qe(this.node(),e).delay}function mw(t,e){return function(){ln(this,t).duration=+e.apply(this,arguments)}}function yw(t,e){return e=+e,function(){ln(this,t).duration=e}}function gw(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?mw:yw)(e,t)):Qe(this.node(),e).duration}function pw(t,e){if(typeof e!="function")throw new Error;return function(){ln(this,t).ease=e}}function vw(t){var e=this._id;return arguments.length?this.each(pw(e,t)):Qe(this.node(),e).ease}function Sw(t,e){return function(){var n=e.apply(this,arguments);if(typeof n!="function")throw new Error;ln(this,t).ease=n}}function bw(t){if(typeof t!="function")throw new Error;return this.each(Sw(this._id,t))}function xw(t){typeof t!="function"&&(t=wp(t));for(var e=this._groups,n=e.length,l=new Array(n),a=0;a<n;++a)for(var i=e[a],u=i.length,c=l[a]=[],s,o=0;o<u;++o)(s=i[o])&&t.call(s,s.__data__,o,i)&&c.push(s);return new On(l,this._parents,this._name,this._id)}function Ew(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,l=e.length,a=n.length,i=Math.min(l,a),u=new Array(l),c=0;c<i;++c)for(var s=e[c],o=n[c],r=s.length,f=u[c]=new Array(r),d,h=0;h<r;++h)(d=s[h]||o[h])&&(f[h]=d);for(;c<l;++c)u[c]=e[c];return new On(u,this._parents,this._name,this._id)}function _w(t){return(t+"").trim().split(/^|\s+/).every(function(e){var n=e.indexOf(".");return n>=0&&(e=e.slice(0,n)),!e||e==="start"})}function ww(t,e,n){var l,a,i=_w(e)?md:ln;return function(){var u=i(this,t),c=u.on;c!==l&&(a=(l=c).copy()).on(e,n),u.on=a}}function Aw(t,e){var n=this._id;return arguments.length<2?Qe(this.node(),n).on.on(t):this.each(ww(n,t,e))}function Tw(t){return function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}}function Nw(){return this.on("end.remove",Tw(this._id))}function zw(t){var e=this._name,n=this._id;typeof t!="function"&&(t=rd(t));for(var l=this._groups,a=l.length,i=new Array(a),u=0;u<a;++u)for(var c=l[u],s=c.length,o=i[u]=new Array(s),r,f,d=0;d<s;++d)(r=c[d])&&(f=t.call(r,r.__data__,d,c))&&("__data__"in r&&(f.__data__=r.__data__),o[d]=f,Rs(o[d],e,n,d,o,Qe(r,n)));return new On(i,this._parents,e,n)}function Mw(t){var e=this._name,n=this._id;typeof t!="function"&&(t=_p(t));for(var l=this._groups,a=l.length,i=[],u=[],c=0;c<a;++c)for(var s=l[c],o=s.length,r,f=0;f<o;++f)if(r=s[f]){for(var d=t.call(r,r.__data__,f,s),h,g=Qe(r,n),p=0,b=d.length;p<b;++p)(h=d[p])&&Rs(h,e,n,p,d,g);i.push(d),u.push(r)}return new On(i,u,e,n)}var Ow=Eu.prototype.constructor;function Cw(){return new Ow(this._groups,this._parents)}function Rw(t,e){var n,l,a;return function(){var i=Ga(this,t),u=(this.style.removeProperty(t),Ga(this,t));return i===u?null:i===n&&u===l?a:a=e(n=i,l=u)}}function Kp(t){return function(){this.style.removeProperty(t)}}function Dw(t,e,n){var l,a=n+"",i;return function(){var u=Ga(this,t);return u===a?null:u===l?i:i=e(l=u,n)}}function Uw(t,e,n){var l,a,i;return function(){var u=Ga(this,t),c=n(this),s=c+"";return c==null&&(s=c=(this.style.removeProperty(t),Ga(this,t))),u===s?null:u===l&&s===a?i:(a=s,i=e(l=u,c))}}function Hw(t,e){var n,l,a,i="style."+e,u="end."+i,c;return function(){var s=ln(this,t),o=s.on,r=s.value[i]==null?c||(c=Kp(e)):void 0;(o!==n||a!==r)&&(l=(n=o).copy()).on(u,a=r),s.on=l}}function Bw(t,e,n){var l=(t+="")=="transform"?B_:Qp;return e==null?this.styleTween(t,Rw(t,l)).on("end.style."+t,Kp(t)):typeof e=="function"?this.styleTween(t,Uw(t,l,yd(this,"style."+t,e))).each(Hw(this._id,t)):this.styleTween(t,Dw(t,l,e),n).on("end.style."+t,null)}function jw(t,e,n){return function(l){this.style.setProperty(t,e.call(this,l),n)}}function Lw(t,e,n){var l,a;function i(){var u=e.apply(this,arguments);return u!==a&&(l=(a=u)&&jw(t,u,n)),l}return i._value=e,i}function qw(t,e,n){var l="style."+(t+="");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;return this.tween(l,Lw(t,e,n??""))}function Yw(t){return function(){this.textContent=t}}function Vw(t){return function(){var e=t(this);this.textContent=e??""}}function Xw(t){return this.tween("text",typeof t=="function"?Vw(yd(this,"text",t)):Yw(t==null?"":t+""))}function Gw(t){return function(e){this.textContent=t.call(this,e)}}function Zw(t){var e,n;function l(){var a=t.apply(this,arguments);return a!==n&&(e=(n=a)&&Gw(a)),e}return l._value=t,l}function $w(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Zw(t))}function Qw(){for(var t=this._name,e=this._id,n=Jp(),l=this._groups,a=l.length,i=0;i<a;++i)for(var u=l[i],c=u.length,s,o=0;o<c;++o)if(s=u[o]){var r=Qe(s,e);Rs(s,t,n,o,u,{time:r.time+r.delay+r.duration,delay:0,duration:r.duration,ease:r.ease})}return new On(l,this._parents,t,n)}function Kw(){var t,e,n=this,l=n._id,a=n.size();return new Promise(function(i,u){var c={value:u},s={value:function(){--a===0&&i()}};n.each(function(){var o=ln(this,l),r=o.on;r!==t&&(e=(t=r).copy(),e._.cancel.push(c),e._.interrupt.push(c),e._.end.push(s)),o.on=e}),a===0&&i()})}var Jw=0;function On(t,e,n,l){this._groups=t,this._parents=e,this._name=n,this._id=l}function Jp(){return++Jw}var hn=Eu.prototype;On.prototype={constructor:On,select:zw,selectAll:Mw,selectChild:hn.selectChild,selectChildren:hn.selectChildren,filter:xw,merge:Ew,selection:Cw,transition:Qw,call:hn.call,nodes:hn.nodes,node:hn.node,size:hn.size,empty:hn.empty,each:hn.each,on:Aw,attr:iw,attrTween:rw,style:Bw,styleTween:qw,text:Xw,textTween:$w,remove:Nw,tween:I_,delay:hw,duration:gw,ease:vw,easeVarying:bw,end:Kw,[Symbol.iterator]:hn[Symbol.iterator]};function kw(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Fw={time:null,delay:0,duration:250,ease:kw};function Ww(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return n}function Iw(t){var e,n;t instanceof On?(e=t._id,t=t._name):(e=Jp(),(n=Fw).time=hd(),t=t==null?null:t+"");for(var l=this._groups,a=l.length,i=0;i<a;++i)for(var u=l[i],c=u.length,s,o=0;o<c;++o)(s=u[o])&&Rs(s,t,e,o,u,n||Ww(s,e));return new On(l,this._parents,t,e)}Eu.prototype.interrupt=k_;Eu.prototype.transition=Iw;const ku=t=>()=>t;function Pw(t,{sourceEvent:e,target:n,transform:l,dispatch:a}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},transform:{value:l,enumerable:!0,configurable:!0},_:{value:a}})}function bn(t,e,n){this.k=t,this.x=e,this.y=n}bn.prototype={constructor:bn,scale:function(t){return t===1?this:new bn(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new bn(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var wn=new bn(1,0,0);bn.prototype;function Uo(t){t.stopImmediatePropagation()}function yi(t){t.preventDefault(),t.stopImmediatePropagation()}function t3(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function e3(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]):[[0,0],[t.clientWidth,t.clientHeight]]}function Mm(){return this.__zoom||wn}function n3(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function l3(){return navigator.maxTouchPoints||"ontouchstart"in this}function a3(t,e,n){var l=t.invertX(e[0][0])-n[0][0],a=t.invertX(e[1][0])-n[1][0],i=t.invertY(e[0][1])-n[0][1],u=t.invertY(e[1][1])-n[1][1];return t.translate(a>l?(l+a)/2:Math.min(0,l)||Math.max(0,a),u>i?(i+u)/2:Math.min(0,i)||Math.max(0,u))}function kp(){var t=t3,e=e3,n=a3,l=n3,a=l3,i=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],c=250,s=V_,o=Ms("start","zoom","end"),r,f,d,h=500,g=150,p=0,b=10;function m(x){x.property("__zoom",Mm).on("wheel.zoom",H,{passive:!1}).on("mousedown.zoom",z).on("dblclick.zoom",L).filter(a).on("touchstart.zoom",R).on("touchmove.zoom",G).on("touchend.zoom touchcancel.zoom",V).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(x,C,E,M){var U=x.selection?x.selection():x;U.property("__zoom",Mm),x!==U?_(x,C,E,M):U.interrupt().each(function(){N(this,arguments).event(M).start().zoom(null,typeof C=="function"?C.apply(this,arguments):C).end()})},m.scaleBy=function(x,C,E,M){m.scaleTo(x,function(){var U=this.__zoom.k,A=typeof C=="function"?C.apply(this,arguments):C;return U*A},E,M)},m.scaleTo=function(x,C,E,M){m.transform(x,function(){var U=e.apply(this,arguments),A=this.__zoom,j=E==null?S(U):typeof E=="function"?E.apply(this,arguments):E,Y=A.invert(j),X=typeof C=="function"?C.apply(this,arguments):C;return n(v(y(A,X),j,Y),U,u)},E,M)},m.translateBy=function(x,C,E,M){m.transform(x,function(){return n(this.__zoom.translate(typeof C=="function"?C.apply(this,arguments):C,typeof E=="function"?E.apply(this,arguments):E),e.apply(this,arguments),u)},null,M)},m.translateTo=function(x,C,E,M,U){m.transform(x,function(){var A=e.apply(this,arguments),j=this.__zoom,Y=M==null?S(A):typeof M=="function"?M.apply(this,arguments):M;return n(wn.translate(Y[0],Y[1]).scale(j.k).translate(typeof C=="function"?-C.apply(this,arguments):-C,typeof E=="function"?-E.apply(this,arguments):-E),A,u)},M,U)};function y(x,C){return C=Math.max(i[0],Math.min(i[1],C)),C===x.k?x:new bn(C,x.x,x.y)}function v(x,C,E){var M=C[0]-E[0]*x.k,U=C[1]-E[1]*x.k;return M===x.x&&U===x.y?x:new bn(x.k,M,U)}function S(x){return[(+x[0][0]+ +x[1][0])/2,(+x[0][1]+ +x[1][1])/2]}function _(x,C,E,M){x.on("start.zoom",function(){N(this,arguments).event(M).start()}).on("interrupt.zoom end.zoom",function(){N(this,arguments).event(M).end()}).tween("zoom",function(){var U=this,A=arguments,j=N(U,A).event(M),Y=e.apply(U,A),X=E==null?S(Y):typeof E=="function"?E.apply(U,A):E,Q=Math.max(Y[1][0]-Y[0][0],Y[1][1]-Y[0][1]),Z=U.__zoom,K=typeof C=="function"?C.apply(U,A):C,P=s(Z.invert(X).concat(Q/Z.k),K.invert(X).concat(Q/K.k));return function(at){if(at===1)at=K;else{var rt=P(at),ct=Q/rt[2];at=new bn(ct,X[0]-rt[0]*ct,X[1]-rt[1]*ct)}j.zoom(null,at)}})}function N(x,C,E){return!E&&x.__zooming||new w(x,C)}function w(x,C){this.that=x,this.args=C,this.active=0,this.sourceEvent=null,this.extent=e.apply(x,C),this.taps=0}w.prototype={event:function(x){return x&&(this.sourceEvent=x),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(x,C){return this.mouse&&x!=="mouse"&&(this.mouse[1]=C.invert(this.mouse[0])),this.touch0&&x!=="touch"&&(this.touch0[1]=C.invert(this.touch0[0])),this.touch1&&x!=="touch"&&(this.touch1[1]=C.invert(this.touch1[0])),this.that.__zoom=C,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(x){var C=Ue(this.that).datum();o.call(x,this.that,new Pw(x,{sourceEvent:this.sourceEvent,target:m,transform:this.that.__zoom,dispatch:o}),C)}};function H(x,...C){if(!t.apply(this,arguments))return;var E=N(this,C).event(x),M=this.__zoom,U=Math.max(i[0],Math.min(i[1],M.k*Math.pow(2,l.apply(this,arguments)))),A=Xe(x);if(E.wheel)(E.mouse[0][0]!==A[0]||E.mouse[0][1]!==A[1])&&(E.mouse[1]=M.invert(E.mouse[0]=A)),clearTimeout(E.wheel);else{if(M.k===U)return;E.mouse=[A,M.invert(A)],Sc(this),E.start()}yi(x),E.wheel=setTimeout(j,g),E.zoom("mouse",n(v(y(M,U),E.mouse[0],E.mouse[1]),E.extent,u));function j(){E.wheel=null,E.end()}}function z(x,...C){if(d||!t.apply(this,arguments))return;var E=x.currentTarget,M=N(this,C,!0).event(x),U=Ue(x.view).on("mousemove.zoom",X,!0).on("mouseup.zoom",Q,!0),A=Xe(x,E),j=x.clientX,Y=x.clientY;Up(x.view),Uo(x),M.mouse=[A,this.__zoom.invert(A)],Sc(this),M.start();function X(Z){if(yi(Z),!M.moved){var K=Z.clientX-j,P=Z.clientY-Y;M.moved=K*K+P*P>p}M.event(Z).zoom("mouse",n(v(M.that.__zoom,M.mouse[0]=Xe(Z,E),M.mouse[1]),M.extent,u))}function Q(Z){U.on("mousemove.zoom mouseup.zoom",null),Hp(Z.view,M.moved),yi(Z),M.event(Z).end()}}function L(x,...C){if(t.apply(this,arguments)){var E=this.__zoom,M=Xe(x.changedTouches?x.changedTouches[0]:x,this),U=E.invert(M),A=E.k*(x.shiftKey?.5:2),j=n(v(y(E,A),M,U),e.apply(this,C),u);yi(x),c>0?Ue(this).transition().duration(c).call(_,j,M,x):Ue(this).call(m.transform,j,M,x)}}function R(x,...C){if(t.apply(this,arguments)){var E=x.touches,M=E.length,U=N(this,C,x.changedTouches.length===M).event(x),A,j,Y,X;for(Uo(x),j=0;j<M;++j)Y=E[j],X=Xe(Y,this),X=[X,this.__zoom.invert(X),Y.identifier],U.touch0?!U.touch1&&U.touch0[2]!==X[2]&&(U.touch1=X,U.taps=0):(U.touch0=X,A=!0,U.taps=1+!!r);r&&(r=clearTimeout(r)),A&&(U.taps<2&&(f=X[0],r=setTimeout(function(){r=null},h)),Sc(this),U.start())}}function G(x,...C){if(this.__zooming){var E=N(this,C).event(x),M=x.changedTouches,U=M.length,A,j,Y,X;for(yi(x),A=0;A<U;++A)j=M[A],Y=Xe(j,this),E.touch0&&E.touch0[2]===j.identifier?E.touch0[0]=Y:E.touch1&&E.touch1[2]===j.identifier&&(E.touch1[0]=Y);if(j=E.that.__zoom,E.touch1){var Q=E.touch0[0],Z=E.touch0[1],K=E.touch1[0],P=E.touch1[1],at=(at=K[0]-Q[0])*at+(at=K[1]-Q[1])*at,rt=(rt=P[0]-Z[0])*rt+(rt=P[1]-Z[1])*rt;j=y(j,Math.sqrt(at/rt)),Y=[(Q[0]+K[0])/2,(Q[1]+K[1])/2],X=[(Z[0]+P[0])/2,(Z[1]+P[1])/2]}else if(E.touch0)Y=E.touch0[0],X=E.touch0[1];else return;E.zoom("touch",n(v(j,Y,X),E.extent,u))}}function V(x,...C){if(this.__zooming){var E=N(this,C).event(x),M=x.changedTouches,U=M.length,A,j;for(Uo(x),d&&clearTimeout(d),d=setTimeout(function(){d=null},h),A=0;A<U;++A)j=M[A],E.touch0&&E.touch0[2]===j.identifier?delete E.touch0:E.touch1&&E.touch1[2]===j.identifier&&delete E.touch1;if(E.touch1&&!E.touch0&&(E.touch0=E.touch1,delete E.touch1),E.touch0)E.touch0[1]=this.__zoom.invert(E.touch0[0]);else if(E.end(),E.taps===2&&(j=Xe(j,this),Math.hypot(f[0]-j[0],f[1]-j[1])<b)){var Y=Ue(this).on("dblclick.zoom");Y&&Y.apply(this,arguments)}}}return m.wheelDelta=function(x){return arguments.length?(l=typeof x=="function"?x:ku(+x),m):l},m.filter=function(x){return arguments.length?(t=typeof x=="function"?x:ku(!!x),m):t},m.touchable=function(x){return arguments.length?(a=typeof x=="function"?x:ku(!!x),m):a},m.extent=function(x){return arguments.length?(e=typeof x=="function"?x:ku([[+x[0][0],+x[0][1]],[+x[1][0],+x[1][1]]]),m):e},m.scaleExtent=function(x){return arguments.length?(i[0]=+x[0],i[1]=+x[1],m):[i[0],i[1]]},m.translateExtent=function(x){return arguments.length?(u[0][0]=+x[0][0],u[1][0]=+x[1][0],u[0][1]=+x[0][1],u[1][1]=+x[1][1],m):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},m.constrain=function(x){return arguments.length?(n=x,m):n},m.duration=function(x){return arguments.length?(c=+x,m):c},m.interpolate=function(x){return arguments.length?(s=x,m):s},m.on=function(){var x=o.on.apply(o,arguments);return x===o?m:x},m.clickDistance=function(x){return arguments.length?(p=(x=+x)*x,m):Math.sqrt(p)},m.tapDistance=function(x){return arguments.length?(b=+x,m):b},m}const Ds=T.createContext(null),i3=Ds.Provider,Cn={error001:()=>"[React Flow]: Seems like you have not used zustand provider as an ancestor. Help: https://reactflow.dev/error#001",error002:()=>"It looks like you've created a new nodeTypes or edgeTypes object. If this wasn't on purpose please define the nodeTypes/edgeTypes outside of the component or memoize them.",error003:t=>`Node type "${t}" not found. Using fallback type "default".`,error004:()=>"The React Flow parent container needs a width and a height to render the graph.",error005:()=>"Only child nodes can use a parent extent.",error006:()=>"Can't create edge. An edge needs a source and a target.",error007:t=>`The old edge with id=${t} does not exist.`,error009:t=>`Marker type "${t}" doesn't exist.`,error008:(t,e)=>`Couldn't create edge for ${t?"target":"source"} handle id: "${t?e.targetHandle:e.sourceHandle}", edge id: ${e.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Fp=Cn.error001();function vt(t,e){const n=T.useContext(Ds);if(n===null)throw new Error(Fp);return xp(n,t,e)}const Lt=()=>{const t=T.useContext(Ds);if(t===null)throw new Error(Fp);return T.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe,destroy:t.destroy}),[t])},u3=t=>t.userSelectionActive?"none":"all";function gd({position:t,children:e,className:n,style:l,...a}){const i=vt(u3),u=`${t}`.split("-");return B.createElement("div",{className:Ft(["react-flow__panel",n,...u]),style:{...l,pointerEvents:i},...a},e)}function c3({proOptions:t,position:e="bottom-right"}){return t!=null&&t.hideAttribution?null:B.createElement(gd,{position:e,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},B.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const s3=({x:t,y:e,label:n,labelStyle:l={},labelShowBg:a=!0,labelBgStyle:i={},labelBgPadding:u=[2,4],labelBgBorderRadius:c=2,children:s,className:o,...r})=>{const f=T.useRef(null),[d,h]=T.useState({x:0,y:0,width:0,height:0}),g=Ft(["react-flow__edge-textwrapper",o]);return T.useEffect(()=>{if(f.current){const p=f.current.getBBox();h({x:p.x,y:p.y,width:p.width,height:p.height})}},[n]),typeof n>"u"||!n?null:B.createElement("g",{transform:`translate(${t-d.width/2} ${e-d.height/2})`,className:g,visibility:d.width?"visible":"hidden",...r},a&&B.createElement("rect",{width:d.width+2*u[0],x:-u[0],y:-u[1],height:d.height+2*u[1],className:"react-flow__edge-textbg",style:i,rx:c,ry:c}),B.createElement("text",{className:"react-flow__edge-text",y:d.height/2,dy:"0.3em",ref:f,style:l},n),s)};var o3=T.memo(s3);const pd=t=>({width:t.offsetWidth,height:t.offsetHeight}),$a=(t,e=0,n=1)=>Math.min(Math.max(t,e),n),vd=(t={x:0,y:0},e)=>({x:$a(t.x,e[0][0],e[1][0]),y:$a(t.y,e[0][1],e[1][1])}),Om=(t,e,n)=>t<e?$a(Math.abs(t-e),1,50)/50:t>n?-$a(Math.abs(t-n),1,50)/50:0,Wp=(t,e)=>{const n=Om(t.x,35,e.width-35)*20,l=Om(t.y,35,e.height-35)*20;return[n,l]},Ip=t=>{var e;return((e=t.getRootNode)==null?void 0:e.call(t))||(window==null?void 0:window.document)},Pp=(t,e)=>({x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x2,e.x2),y2:Math.max(t.y2,e.y2)}),cu=({x:t,y:e,width:n,height:l})=>({x:t,y:e,x2:t+n,y2:e+l}),tv=({x:t,y:e,x2:n,y2:l})=>({x:t,y:e,width:n-t,height:l-e}),Cm=t=>({...t.positionAbsolute||{x:0,y:0},width:t.width||0,height:t.height||0}),r3=(t,e)=>tv(Pp(cu(t),cu(e))),kr=(t,e)=>{const n=Math.max(0,Math.min(t.x+t.width,e.x+e.width)-Math.max(t.x,e.x)),l=Math.max(0,Math.min(t.y+t.height,e.y+e.height)-Math.max(t.y,e.y));return Math.ceil(n*l)},f3=t=>He(t.width)&&He(t.height)&&He(t.x)&&He(t.y),He=t=>!isNaN(t)&&isFinite(t),Nt=Symbol.for("internals"),ev=["Enter"," ","Escape"],d3=(t,e)=>{},h3=t=>"nativeEvent"in t;function Fr(t){var a,i;const e=h3(t)?t.nativeEvent:t,n=((i=(a=e.composedPath)==null?void 0:a.call(e))==null?void 0:i[0])||t.target;return["INPUT","SELECT","TEXTAREA"].includes(n==null?void 0:n.nodeName)||(n==null?void 0:n.hasAttribute("contenteditable"))||!!(n!=null&&n.closest(".nokey"))}const nv=t=>"clientX"in t,al=(t,e)=>{var i,u;const n=nv(t),l=n?t.clientX:(i=t.touches)==null?void 0:i[0].clientX,a=n?t.clientY:(u=t.touches)==null?void 0:u[0].clientY;return{x:l-((e==null?void 0:e.left)??0),y:a-((e==null?void 0:e.top)??0)}},is=()=>{var t;return typeof navigator<"u"&&((t=navigator==null?void 0:navigator.userAgent)==null?void 0:t.indexOf("Mac"))>=0},wu=({id:t,path:e,labelX:n,labelY:l,label:a,labelStyle:i,labelShowBg:u,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:o,style:r,markerEnd:f,markerStart:d,interactionWidth:h=20})=>B.createElement(B.Fragment,null,B.createElement("path",{id:t,style:r,d:e,fill:"none",className:"react-flow__edge-path",markerEnd:f,markerStart:d}),h&&B.createElement("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:h,className:"react-flow__edge-interaction"}),a&&He(n)&&He(l)?B.createElement(o3,{x:n,y:l,label:a,labelStyle:i,labelShowBg:u,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:o}):null);wu.displayName="BaseEdge";function gi(t,e,n){return n===void 0?n:l=>{const a=e().edges.find(i=>i.id===t);a&&n(l,{...a})}}function lv({sourceX:t,sourceY:e,targetX:n,targetY:l}){const a=Math.abs(n-t)/2,i=n<t?n+a:n-a,u=Math.abs(l-e)/2,c=l<e?l+u:l-u;return[i,c,a,u]}function av({sourceX:t,sourceY:e,targetX:n,targetY:l,sourceControlX:a,sourceControlY:i,targetControlX:u,targetControlY:c}){const s=t*.125+a*.375+u*.375+n*.125,o=e*.125+i*.375+c*.375+l*.125,r=Math.abs(s-t),f=Math.abs(o-e);return[s,o,r,f]}var Yl;(function(t){t.Strict="strict",t.Loose="loose"})(Yl||(Yl={}));var wl;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(wl||(wl={}));var su;(function(t){t.Partial="partial",t.Full="full"})(su||(su={}));var Gn;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Gn||(Gn={}));var us;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(us||(us={}));var $;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})($||($={}));function Rm({pos:t,x1:e,y1:n,x2:l,y2:a}){return t===$.Left||t===$.Right?[.5*(e+l),n]:[e,.5*(n+a)]}function iv({sourceX:t,sourceY:e,sourcePosition:n=$.Bottom,targetX:l,targetY:a,targetPosition:i=$.Top}){const[u,c]=Rm({pos:n,x1:t,y1:e,x2:l,y2:a}),[s,o]=Rm({pos:i,x1:l,y1:a,x2:t,y2:e}),[r,f,d,h]=av({sourceX:t,sourceY:e,targetX:l,targetY:a,sourceControlX:u,sourceControlY:c,targetControlX:s,targetControlY:o});return[`M${t},${e} C${u},${c} ${s},${o} ${l},${a}`,r,f,d,h]}const Sd=T.memo(({sourceX:t,sourceY:e,targetX:n,targetY:l,sourcePosition:a=$.Bottom,targetPosition:i=$.Top,label:u,labelStyle:c,labelShowBg:s,labelBgStyle:o,labelBgPadding:r,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:g,interactionWidth:p})=>{const[b,m,y]=iv({sourceX:t,sourceY:e,sourcePosition:a,targetX:n,targetY:l,targetPosition:i});return B.createElement(wu,{path:b,labelX:m,labelY:y,label:u,labelStyle:c,labelShowBg:s,labelBgStyle:o,labelBgPadding:r,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:g,interactionWidth:p})});Sd.displayName="SimpleBezierEdge";const Dm={[$.Left]:{x:-1,y:0},[$.Right]:{x:1,y:0},[$.Top]:{x:0,y:-1},[$.Bottom]:{x:0,y:1}},m3=({source:t,sourcePosition:e=$.Bottom,target:n})=>e===$.Left||e===$.Right?t.x<n.x?{x:1,y:0}:{x:-1,y:0}:t.y<n.y?{x:0,y:1}:{x:0,y:-1},Um=(t,e)=>Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2));function y3({source:t,sourcePosition:e=$.Bottom,target:n,targetPosition:l=$.Top,center:a,offset:i}){const u=Dm[e],c=Dm[l],s={x:t.x+u.x*i,y:t.y+u.y*i},o={x:n.x+c.x*i,y:n.y+c.y*i},r=m3({source:s,sourcePosition:e,target:o}),f=r.x!==0?"x":"y",d=r[f];let h=[],g,p;const b={x:0,y:0},m={x:0,y:0},[y,v,S,_]=lv({sourceX:t.x,sourceY:t.y,targetX:n.x,targetY:n.y});if(u[f]*c[f]===-1){g=a.x??y,p=a.y??v;const w=[{x:g,y:s.y},{x:g,y:o.y}],H=[{x:s.x,y:p},{x:o.x,y:p}];u[f]===d?h=f==="x"?w:H:h=f==="x"?H:w}else{const w=[{x:s.x,y:o.y}],H=[{x:o.x,y:s.y}];if(f==="x"?h=u.x===d?H:w:h=u.y===d?w:H,e===l){const V=Math.abs(t[f]-n[f]);if(V<=i){const x=Math.min(i-1,i-V);u[f]===d?b[f]=(s[f]>t[f]?-1:1)*x:m[f]=(o[f]>n[f]?-1:1)*x}}if(e!==l){const V=f==="x"?"y":"x",x=u[f]===c[V],C=s[V]>o[V],E=s[V]<o[V];(u[f]===1&&(!x&&C||x&&E)||u[f]!==1&&(!x&&E||x&&C))&&(h=f==="x"?w:H)}const z={x:s.x+b.x,y:s.y+b.y},L={x:o.x+m.x,y:o.y+m.y},R=Math.max(Math.abs(z.x-h[0].x),Math.abs(L.x-h[0].x)),G=Math.max(Math.abs(z.y-h[0].y),Math.abs(L.y-h[0].y));R>=G?(g=(z.x+L.x)/2,p=h[0].y):(g=h[0].x,p=(z.y+L.y)/2)}return[[t,{x:s.x+b.x,y:s.y+b.y},...h,{x:o.x+m.x,y:o.y+m.y},n],g,p,S,_]}function g3(t,e,n,l){const a=Math.min(Um(t,e)/2,Um(e,n)/2,l),{x:i,y:u}=e;if(t.x===i&&i===n.x||t.y===u&&u===n.y)return`L${i} ${u}`;if(t.y===u){const o=t.x<n.x?-1:1,r=t.y<n.y?1:-1;return`L ${i+a*o},${u}Q ${i},${u} ${i},${u+a*r}`}const c=t.x<n.x?1:-1,s=t.y<n.y?-1:1;return`L ${i},${u+a*s}Q ${i},${u} ${i+a*c},${u}`}function Wr({sourceX:t,sourceY:e,sourcePosition:n=$.Bottom,targetX:l,targetY:a,targetPosition:i=$.Top,borderRadius:u=5,centerX:c,centerY:s,offset:o=20}){const[r,f,d,h,g]=y3({source:{x:t,y:e},sourcePosition:n,target:{x:l,y:a},targetPosition:i,center:{x:c,y:s},offset:o});return[r.reduce((b,m,y)=>{let v="";return y>0&&y<r.length-1?v=g3(r[y-1],m,r[y+1],u):v=`${y===0?"M":"L"}${m.x} ${m.y}`,b+=v,b},""),f,d,h,g]}const Us=T.memo(({sourceX:t,sourceY:e,targetX:n,targetY:l,label:a,labelStyle:i,labelShowBg:u,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:o,style:r,sourcePosition:f=$.Bottom,targetPosition:d=$.Top,markerEnd:h,markerStart:g,pathOptions:p,interactionWidth:b})=>{const[m,y,v]=Wr({sourceX:t,sourceY:e,sourcePosition:f,targetX:n,targetY:l,targetPosition:d,borderRadius:p==null?void 0:p.borderRadius,offset:p==null?void 0:p.offset});return B.createElement(wu,{path:m,labelX:y,labelY:v,label:a,labelStyle:i,labelShowBg:u,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:o,style:r,markerEnd:h,markerStart:g,interactionWidth:b})});Us.displayName="SmoothStepEdge";const bd=T.memo(t=>{var e;return B.createElement(Us,{...t,pathOptions:T.useMemo(()=>{var n;return{borderRadius:0,offset:(n=t.pathOptions)==null?void 0:n.offset}},[(e=t.pathOptions)==null?void 0:e.offset])})});bd.displayName="StepEdge";function p3({sourceX:t,sourceY:e,targetX:n,targetY:l}){const[a,i,u,c]=lv({sourceX:t,sourceY:e,targetX:n,targetY:l});return[`M ${t},${e}L ${n},${l}`,a,i,u,c]}const xd=T.memo(({sourceX:t,sourceY:e,targetX:n,targetY:l,label:a,labelStyle:i,labelShowBg:u,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:o,style:r,markerEnd:f,markerStart:d,interactionWidth:h})=>{const[g,p,b]=p3({sourceX:t,sourceY:e,targetX:n,targetY:l});return B.createElement(wu,{path:g,labelX:p,labelY:b,label:a,labelStyle:i,labelShowBg:u,labelBgStyle:c,labelBgPadding:s,labelBgBorderRadius:o,style:r,markerEnd:f,markerStart:d,interactionWidth:h})});xd.displayName="StraightEdge";function Fu(t,e){return t>=0?.5*t:e*25*Math.sqrt(-t)}function Hm({pos:t,x1:e,y1:n,x2:l,y2:a,c:i}){switch(t){case $.Left:return[e-Fu(e-l,i),n];case $.Right:return[e+Fu(l-e,i),n];case $.Top:return[e,n-Fu(n-a,i)];case $.Bottom:return[e,n+Fu(a-n,i)]}}function uv({sourceX:t,sourceY:e,sourcePosition:n=$.Bottom,targetX:l,targetY:a,targetPosition:i=$.Top,curvature:u=.25}){const[c,s]=Hm({pos:n,x1:t,y1:e,x2:l,y2:a,c:u}),[o,r]=Hm({pos:i,x1:l,y1:a,x2:t,y2:e,c:u}),[f,d,h,g]=av({sourceX:t,sourceY:e,targetX:l,targetY:a,sourceControlX:c,sourceControlY:s,targetControlX:o,targetControlY:r});return[`M${t},${e} C${c},${s} ${o},${r} ${l},${a}`,f,d,h,g]}const cs=T.memo(({sourceX:t,sourceY:e,targetX:n,targetY:l,sourcePosition:a=$.Bottom,targetPosition:i=$.Top,label:u,labelStyle:c,labelShowBg:s,labelBgStyle:o,labelBgPadding:r,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:g,pathOptions:p,interactionWidth:b})=>{const[m,y,v]=uv({sourceX:t,sourceY:e,sourcePosition:a,targetX:n,targetY:l,targetPosition:i,curvature:p==null?void 0:p.curvature});return B.createElement(wu,{path:m,labelX:y,labelY:v,label:u,labelStyle:c,labelShowBg:s,labelBgStyle:o,labelBgPadding:r,labelBgBorderRadius:f,style:d,markerEnd:h,markerStart:g,interactionWidth:b})});cs.displayName="BezierEdge";const Ed=T.createContext(null),v3=Ed.Provider;Ed.Consumer;const S3=()=>T.useContext(Ed),b3=t=>"id"in t&&"source"in t&&"target"in t,x3=({source:t,sourceHandle:e,target:n,targetHandle:l})=>`reactflow__edge-${t}${e||""}-${n}${l||""}`,Ir=(t,e)=>typeof t>"u"?"":typeof t=="string"?t:`${e?`${e}__`:""}${Object.keys(t).sort().map(l=>`${l}=${t[l]}`).join("&")}`,E3=(t,e)=>e.some(n=>n.source===t.source&&n.target===t.target&&(n.sourceHandle===t.sourceHandle||!n.sourceHandle&&!t.sourceHandle)&&(n.targetHandle===t.targetHandle||!n.targetHandle&&!t.targetHandle)),cv=(t,e)=>{if(!t.source||!t.target)return e;let n;return b3(t)?n={...t}:n={...t,id:x3(t)},E3(n,e)?e:e.concat(n)},Pr=({x:t,y:e},[n,l,a],i,[u,c])=>{const s={x:(t-n)/a,y:(e-l)/a};return i?{x:u*Math.round(s.x/u),y:c*Math.round(s.y/c)}:s},sv=({x:t,y:e},[n,l,a])=>({x:t*a+n,y:e*a+l}),Rl=(t,e=[0,0])=>{if(!t)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const n=(t.width??0)*e[0],l=(t.height??0)*e[1],a={x:t.position.x-n,y:t.position.y-l};return{...a,positionAbsolute:t.positionAbsolute?{x:t.positionAbsolute.x-n,y:t.positionAbsolute.y-l}:a}},Hs=(t,e=[0,0])=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const n=t.reduce((l,a)=>{const{x:i,y:u}=Rl(a,e).positionAbsolute;return Pp(l,cu({x:i,y:u,width:a.width||0,height:a.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return tv(n)},ov=(t,e,[n,l,a]=[0,0,1],i=!1,u=!1,c=[0,0])=>{const s={x:(e.x-n)/a,y:(e.y-l)/a,width:e.width/a,height:e.height/a},o=[];return t.forEach(r=>{const{width:f,height:d,selectable:h=!0,hidden:g=!1}=r;if(u&&!h||g)return!1;const{positionAbsolute:p}=Rl(r,c),b={x:p.x,y:p.y,width:f||0,height:d||0},m=kr(s,b),y=typeof f>"u"||typeof d>"u"||f===null||d===null,v=i&&m>0,S=(f||0)*(d||0);(y||v||m>=S||r.dragging)&&o.push(r)}),o},rv=(t,e)=>{const n=t.map(l=>l.id);return e.filter(l=>n.includes(l.source)||n.includes(l.target))},fv=(t,e,n,l,a,i=.1)=>{const u=e/(t.width*(1+i)),c=n/(t.height*(1+i)),s=Math.min(u,c),o=$a(s,l,a),r=t.x+t.width/2,f=t.y+t.height/2,d=e/2-r*o,h=n/2-f*o;return{x:d,y:h,zoom:o}},El=(t,e=0)=>t.transition().duration(e);function Bm(t,e,n,l){return(e[n]||[]).reduce((a,i)=>{var u,c;return`${t.id}-${i.id}-${n}`!==l&&a.push({id:i.id||null,type:n,nodeId:t.id,x:(((u=t.positionAbsolute)==null?void 0:u.x)??0)+i.x+i.width/2,y:(((c=t.positionAbsolute)==null?void 0:c.y)??0)+i.y+i.height/2}),a},[])}function _3(t,e,n,l,a,i){const{x:u,y:c}=al(t),o=e.elementsFromPoint(u,c).find(g=>g.classList.contains("react-flow__handle"));if(o){const g=o.getAttribute("data-nodeid");if(g){const p=_d(void 0,o),b=o.getAttribute("data-handleid"),m=i({nodeId:g,id:b,type:p});if(m){const y=a.find(v=>v.nodeId===g&&v.type===p&&v.id===b);return{handle:{id:b,type:p,nodeId:g,x:(y==null?void 0:y.x)||n.x,y:(y==null?void 0:y.y)||n.y},validHandleResult:m}}}}let r=[],f=1/0;if(a.forEach(g=>{const p=Math.sqrt((g.x-n.x)**2+(g.y-n.y)**2);if(p<=l){const b=i(g);p<=f&&(p<f?r=[{handle:g,validHandleResult:b}]:p===f&&r.push({handle:g,validHandleResult:b}),f=p)}}),!r.length)return{handle:null,validHandleResult:dv()};if(r.length===1)return r[0];const d=r.some(({validHandleResult:g})=>g.isValid),h=r.some(({handle:g})=>g.type==="target");return r.find(({handle:g,validHandleResult:p})=>h?g.type==="target":d?p.isValid:!0)||r[0]}const w3={source:null,target:null,sourceHandle:null,targetHandle:null},dv=()=>({handleDomNode:null,isValid:!1,connection:w3,endHandle:null});function hv(t,e,n,l,a,i,u){const c=a==="target",s=u.querySelector(`.react-flow__handle[data-id="${t==null?void 0:t.nodeId}-${t==null?void 0:t.id}-${t==null?void 0:t.type}"]`),o={...dv(),handleDomNode:s};if(s){const r=_d(void 0,s),f=s.getAttribute("data-nodeid"),d=s.getAttribute("data-handleid"),h=s.classList.contains("connectable"),g=s.classList.contains("connectableend"),p={source:c?f:n,sourceHandle:c?d:l,target:c?n:f,targetHandle:c?l:d};o.connection=p,h&&g&&(e===Yl.Strict?c&&r==="source"||!c&&r==="target":f!==n||d!==l)&&(o.endHandle={nodeId:f,handleId:d,type:r},o.isValid=i(p))}return o}function A3({nodes:t,nodeId:e,handleId:n,handleType:l}){return t.reduce((a,i)=>{if(i[Nt]){const{handleBounds:u}=i[Nt];let c=[],s=[];u&&(c=Bm(i,u,"source",`${e}-${n}-${l}`),s=Bm(i,u,"target",`${e}-${n}-${l}`)),a.push(...c,...s)}return a},[])}function _d(t,e){return t||(e!=null&&e.classList.contains("target")?"target":e!=null&&e.classList.contains("source")?"source":null)}function Ho(t){t==null||t.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function T3(t,e){let n=null;return e?n="valid":t&&!e&&(n="invalid"),n}function mv({event:t,handleId:e,nodeId:n,onConnect:l,isTarget:a,getState:i,setState:u,isValidConnection:c,edgeUpdaterType:s,onReconnectEnd:o}){const r=Ip(t.target),{connectionMode:f,domNode:d,autoPanOnConnect:h,connectionRadius:g,onConnectStart:p,panBy:b,getNodes:m,cancelConnection:y}=i();let v=0,S;const{x:_,y:N}=al(t),w=r==null?void 0:r.elementFromPoint(_,N),H=_d(s,w),z=d==null?void 0:d.getBoundingClientRect();if(!z||!H)return;let L,R=al(t,z),G=!1,V=null,x=!1,C=null;const E=A3({nodes:m(),nodeId:n,handleId:e,handleType:H}),M=()=>{if(!h)return;const[j,Y]=Wp(R,z);b({x:j,y:Y}),v=requestAnimationFrame(M)};u({connectionPosition:R,connectionStatus:null,connectionNodeId:n,connectionHandleId:e,connectionHandleType:H,connectionStartHandle:{nodeId:n,handleId:e,type:H},connectionEndHandle:null}),p==null||p(t,{nodeId:n,handleId:e,handleType:H});function U(j){const{transform:Y}=i();R=al(j,z);const{handle:X,validHandleResult:Q}=_3(j,r,Pr(R,Y,!1,[1,1]),g,E,Z=>hv(Z,f,n,e,a?"target":"source",c,r));if(S=X,G||(M(),G=!0),C=Q.handleDomNode,V=Q.connection,x=Q.isValid,u({connectionPosition:S&&x?sv({x:S.x,y:S.y},Y):R,connectionStatus:T3(!!S,x),connectionEndHandle:Q.endHandle}),!S&&!x&&!C)return Ho(L);V.source!==V.target&&C&&(Ho(L),L=C,C.classList.add("connecting","react-flow__handle-connecting"),C.classList.toggle("valid",x),C.classList.toggle("react-flow__handle-valid",x))}function A(j){var Y,X;(S||C)&&V&&x&&(l==null||l(V)),(X=(Y=i()).onConnectEnd)==null||X.call(Y,j),s&&(o==null||o(j)),Ho(L),y(),cancelAnimationFrame(v),G=!1,x=!1,V=null,C=null,r.removeEventListener("mousemove",U),r.removeEventListener("mouseup",A),r.removeEventListener("touchmove",U),r.removeEventListener("touchend",A)}r.addEventListener("mousemove",U),r.addEventListener("mouseup",A),r.addEventListener("touchmove",U),r.addEventListener("touchend",A)}const jm=()=>!0,N3=t=>({connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName}),z3=(t,e,n)=>l=>{const{connectionStartHandle:a,connectionEndHandle:i,connectionClickStartHandle:u}=l;return{connecting:(a==null?void 0:a.nodeId)===t&&(a==null?void 0:a.handleId)===e&&(a==null?void 0:a.type)===n||(i==null?void 0:i.nodeId)===t&&(i==null?void 0:i.handleId)===e&&(i==null?void 0:i.type)===n,clickConnecting:(u==null?void 0:u.nodeId)===t&&(u==null?void 0:u.handleId)===e&&(u==null?void 0:u.type)===n}},yv=T.forwardRef(({type:t="source",position:e=$.Top,isValidConnection:n,isConnectable:l=!0,isConnectableStart:a=!0,isConnectableEnd:i=!0,id:u,onConnect:c,children:s,className:o,onMouseDown:r,onTouchStart:f,...d},h)=>{var z,L;const g=u||null,p=t==="target",b=Lt(),m=S3(),{connectOnClick:y,noPanClassName:v}=vt(N3,Xt),{connecting:S,clickConnecting:_}=vt(z3(m,g,t),Xt);m||(L=(z=b.getState()).onError)==null||L.call(z,"010",Cn.error010());const N=R=>{const{defaultEdgeOptions:G,onConnect:V,hasDefaultEdges:x}=b.getState(),C={...G,...R};if(x){const{edges:E,setEdges:M}=b.getState();M(cv(C,E))}V==null||V(C),c==null||c(C)},w=R=>{if(!m)return;const G=nv(R);a&&(G&&R.button===0||!G)&&mv({event:R,handleId:g,nodeId:m,onConnect:N,isTarget:p,getState:b.getState,setState:b.setState,isValidConnection:n||b.getState().isValidConnection||jm}),G?r==null||r(R):f==null||f(R)},H=R=>{const{onClickConnectStart:G,onClickConnectEnd:V,connectionClickStartHandle:x,connectionMode:C,isValidConnection:E}=b.getState();if(!m||!x&&!a)return;if(!x){G==null||G(R,{nodeId:m,handleId:g,handleType:t}),b.setState({connectionClickStartHandle:{nodeId:m,type:t,handleId:g}});return}const M=Ip(R.target),U=n||E||jm,{connection:A,isValid:j}=hv({nodeId:m,id:g,type:t},C,x.nodeId,x.handleId||null,x.type,U,M);j&&N(A),V==null||V(R),b.setState({connectionClickStartHandle:null})};return B.createElement("div",{"data-handleid":g,"data-nodeid":m,"data-handlepos":e,"data-id":`${m}-${g}-${t}`,className:Ft(["react-flow__handle",`react-flow__handle-${e}`,"nodrag",v,o,{source:!p,target:p,connectable:l,connectablestart:a,connectableend:i,connecting:_,connectionindicator:l&&(a&&!S||i&&S)}]),onMouseDown:w,onTouchStart:w,onClick:y?H:void 0,ref:h,...d},s)});yv.displayName="Handle";var Vl=T.memo(yv);const gv=({data:t,isConnectable:e,targetPosition:n=$.Top,sourcePosition:l=$.Bottom})=>B.createElement(B.Fragment,null,B.createElement(Vl,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label,B.createElement(Vl,{type:"source",position:l,isConnectable:e}));gv.displayName="DefaultNode";var tf=T.memo(gv);const pv=({data:t,isConnectable:e,sourcePosition:n=$.Bottom})=>B.createElement(B.Fragment,null,t==null?void 0:t.label,B.createElement(Vl,{type:"source",position:n,isConnectable:e}));pv.displayName="InputNode";var vv=T.memo(pv);const Sv=({data:t,isConnectable:e,targetPosition:n=$.Top})=>B.createElement(B.Fragment,null,B.createElement(Vl,{type:"target",position:n,isConnectable:e}),t==null?void 0:t.label);Sv.displayName="OutputNode";var bv=T.memo(Sv);const wd=()=>null;wd.displayName="GroupNode";const M3=t=>({selectedNodes:t.getNodes().filter(e=>e.selected),selectedEdges:t.edges.filter(e=>e.selected).map(e=>({...e}))}),Wu=t=>t.id;function O3(t,e){return Xt(t.selectedNodes.map(Wu),e.selectedNodes.map(Wu))&&Xt(t.selectedEdges.map(Wu),e.selectedEdges.map(Wu))}const xv=T.memo(({onSelectionChange:t})=>{const e=Lt(),{selectedNodes:n,selectedEdges:l}=vt(M3,O3);return T.useEffect(()=>{const a={nodes:n,edges:l};t==null||t(a),e.getState().onSelectionChange.forEach(i=>i(a))},[n,l,t]),null});xv.displayName="SelectionListener";const C3=t=>!!t.onSelectionChange;function R3({onSelectionChange:t}){const e=vt(C3);return t||e?B.createElement(xv,{onSelectionChange:t}):null}const D3=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset});function ea(t,e){T.useEffect(()=>{typeof t<"u"&&e(t)},[t])}function tt(t,e,n){T.useEffect(()=>{typeof e<"u"&&n({[t]:e})},[e])}const U3=({nodes:t,edges:e,defaultNodes:n,defaultEdges:l,onConnect:a,onConnectStart:i,onConnectEnd:u,onClickConnectStart:c,onClickConnectEnd:s,nodesDraggable:o,nodesConnectable:r,nodesFocusable:f,edgesFocusable:d,edgesUpdatable:h,elevateNodesOnSelect:g,minZoom:p,maxZoom:b,nodeExtent:m,onNodesChange:y,onEdgesChange:v,elementsSelectable:S,connectionMode:_,snapGrid:N,snapToGrid:w,translateExtent:H,connectOnClick:z,defaultEdgeOptions:L,fitView:R,fitViewOptions:G,onNodesDelete:V,onEdgesDelete:x,onNodeDrag:C,onNodeDragStart:E,onNodeDragStop:M,onSelectionDrag:U,onSelectionDragStart:A,onSelectionDragStop:j,noPanClassName:Y,nodeOrigin:X,rfId:Q,autoPanOnConnect:Z,autoPanOnNodeDrag:K,onError:P,connectionRadius:at,isValidConnection:rt,nodeDragThreshold:ct})=>{const{setNodes:ut,setEdges:Gt,setDefaultNodesAndEdges:Ht,setMinZoom:te,setMaxZoom:Wt,setTranslateExtent:zt,setNodeExtent:ye,reset:ht}=vt(D3,Xt),J=Lt();return T.useEffect(()=>{const ee=l==null?void 0:l.map(un=>({...un,...L}));return Ht(n,ee),()=>{ht()}},[]),tt("defaultEdgeOptions",L,J.setState),tt("connectionMode",_,J.setState),tt("onConnect",a,J.setState),tt("onConnectStart",i,J.setState),tt("onConnectEnd",u,J.setState),tt("onClickConnectStart",c,J.setState),tt("onClickConnectEnd",s,J.setState),tt("nodesDraggable",o,J.setState),tt("nodesConnectable",r,J.setState),tt("nodesFocusable",f,J.setState),tt("edgesFocusable",d,J.setState),tt("edgesUpdatable",h,J.setState),tt("elementsSelectable",S,J.setState),tt("elevateNodesOnSelect",g,J.setState),tt("snapToGrid",w,J.setState),tt("snapGrid",N,J.setState),tt("onNodesChange",y,J.setState),tt("onEdgesChange",v,J.setState),tt("connectOnClick",z,J.setState),tt("fitViewOnInit",R,J.setState),tt("fitViewOnInitOptions",G,J.setState),tt("onNodesDelete",V,J.setState),tt("onEdgesDelete",x,J.setState),tt("onNodeDrag",C,J.setState),tt("onNodeDragStart",E,J.setState),tt("onNodeDragStop",M,J.setState),tt("onSelectionDrag",U,J.setState),tt("onSelectionDragStart",A,J.setState),tt("onSelectionDragStop",j,J.setState),tt("noPanClassName",Y,J.setState),tt("nodeOrigin",X,J.setState),tt("rfId",Q,J.setState),tt("autoPanOnConnect",Z,J.setState),tt("autoPanOnNodeDrag",K,J.setState),tt("onError",P,J.setState),tt("connectionRadius",at,J.setState),tt("isValidConnection",rt,J.setState),tt("nodeDragThreshold",ct,J.setState),ea(t,ut),ea(e,Gt),ea(p,te),ea(b,Wt),ea(H,zt),ea(m,ye),null},Lm={display:"none"},H3={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Ev="react-flow__node-desc",_v="react-flow__edge-desc",B3="react-flow__aria-live",j3=t=>t.ariaLiveMessage;function L3({rfId:t}){const e=vt(j3);return B.createElement("div",{id:`${B3}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:H3},e)}function q3({rfId:t,disableKeyboardA11y:e}){return B.createElement(B.Fragment,null,B.createElement("div",{id:`${Ev}-${t}`,style:Lm},"Press enter or space to select a node.",!e&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),B.createElement("div",{id:`${_v}-${t}`,style:Lm},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!e&&B.createElement(L3,{rfId:t}))}var ou=(t=null,e={actInsideInputWithModifier:!0})=>{const[n,l]=T.useState(!1),a=T.useRef(!1),i=T.useRef(new Set([])),[u,c]=T.useMemo(()=>{if(t!==null){const o=(Array.isArray(t)?t:[t]).filter(f=>typeof f=="string").map(f=>f.split("+")),r=o.reduce((f,d)=>f.concat(...d),[]);return[o,r]}return[[],[]]},[t]);return T.useEffect(()=>{const s=typeof document<"u"?document:null,o=(e==null?void 0:e.target)||s;if(t!==null){const r=h=>{if(a.current=h.ctrlKey||h.metaKey||h.shiftKey,(!a.current||a.current&&!e.actInsideInputWithModifier)&&Fr(h))return!1;const p=Ym(h.code,c);i.current.add(h[p]),qm(u,i.current,!1)&&(h.preventDefault(),l(!0))},f=h=>{if((!a.current||a.current&&!e.actInsideInputWithModifier)&&Fr(h))return!1;const p=Ym(h.code,c);qm(u,i.current,!0)?(l(!1),i.current.clear()):i.current.delete(h[p]),h.key==="Meta"&&i.current.clear(),a.current=!1},d=()=>{i.current.clear(),l(!1)};return o==null||o.addEventListener("keydown",r),o==null||o.addEventListener("keyup",f),window.addEventListener("blur",d),()=>{o==null||o.removeEventListener("keydown",r),o==null||o.removeEventListener("keyup",f),window.removeEventListener("blur",d)}}},[t,l]),n};function qm(t,e,n){return t.filter(l=>n||l.length===e.size).some(l=>l.every(a=>e.has(a)))}function Ym(t,e){return e.includes(t)?"code":"key"}function wv(t,e,n,l){var c,s;const a=t.parentNode||t.parentId;if(!a)return n;const i=e.get(a),u=Rl(i,l);return wv(i,e,{x:(n.x??0)+u.x,y:(n.y??0)+u.y,z:(((c=i[Nt])==null?void 0:c.z)??0)>(n.z??0)?((s=i[Nt])==null?void 0:s.z)??0:n.z??0},l)}function Av(t,e,n){t.forEach(l=>{var i;const a=l.parentNode||l.parentId;if(a&&!t.has(a))throw new Error(`Parent node ${a} not found`);if(a||n!=null&&n[l.id]){const{x:u,y:c,z:s}=wv(l,t,{...l.position,z:((i=l[Nt])==null?void 0:i.z)??0},e);l.positionAbsolute={x:u,y:c},l[Nt].z=s,n!=null&&n[l.id]&&(l[Nt].isParent=!0)}})}function Bo(t,e,n,l){const a=new Map,i={},u=l?1e3:0;return t.forEach(c=>{var h;const s=(He(c.zIndex)?c.zIndex:0)+(c.selected?u:0),o=e.get(c.id),r={...c,positionAbsolute:{x:c.position.x,y:c.position.y}},f=c.parentNode||c.parentId;f&&(i[f]=!0);const d=(o==null?void 0:o.type)&&(o==null?void 0:o.type)!==c.type;Object.defineProperty(r,Nt,{enumerable:!1,value:{handleBounds:d||(h=o==null?void 0:o[Nt])==null?void 0:h.handleBounds,z:s}}),a.set(c.id,r)}),Av(a,n,i),a}function Tv(t,e={}){const{getNodes:n,width:l,height:a,minZoom:i,maxZoom:u,d3Zoom:c,d3Selection:s,fitViewOnInitDone:o,fitViewOnInit:r,nodeOrigin:f}=t(),d=e.initial&&!o&&r;if(c&&s&&(d||!e.initial)){const g=n().filter(b=>{var y;const m=e.includeHiddenNodes?b.width&&b.height:!b.hidden;return(y=e.nodes)!=null&&y.length?m&&e.nodes.some(v=>v.id===b.id):m}),p=g.every(b=>b.width&&b.height);if(g.length>0&&p){const b=Hs(g,f),{x:m,y,zoom:v}=fv(b,l,a,e.minZoom??i,e.maxZoom??u,e.padding??.1),S=wn.translate(m,y).scale(v);return typeof e.duration=="number"&&e.duration>0?c.transform(El(s,e.duration),S):c.transform(s,S),!0}}return!1}function Y3(t,e){return t.forEach(n=>{const l=e.get(n.id);l&&e.set(l.id,{...l,[Nt]:l[Nt],selected:n.selected})}),new Map(e)}function V3(t,e){return e.map(n=>{const l=t.find(a=>a.id===n.id);return l&&(n.selected=l.selected),n})}function Iu({changedNodes:t,changedEdges:e,get:n,set:l}){const{nodeInternals:a,edges:i,onNodesChange:u,onEdgesChange:c,hasDefaultNodes:s,hasDefaultEdges:o}=n();t!=null&&t.length&&(s&&l({nodeInternals:Y3(t,a)}),u==null||u(t)),e!=null&&e.length&&(o&&l({edges:V3(e,i)}),c==null||c(e))}const na=()=>{},X3={zoomIn:na,zoomOut:na,zoomTo:na,getZoom:()=>1,setViewport:na,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:na,fitBounds:na,project:t=>t,screenToFlowPosition:t=>t,flowToScreenPosition:t=>t,viewportInitialized:!1},G3=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}),Z3=()=>{const t=Lt(),{d3Zoom:e,d3Selection:n}=vt(G3,Xt);return T.useMemo(()=>n&&e?{zoomIn:a=>e.scaleBy(El(n,a==null?void 0:a.duration),1.2),zoomOut:a=>e.scaleBy(El(n,a==null?void 0:a.duration),1/1.2),zoomTo:(a,i)=>e.scaleTo(El(n,i==null?void 0:i.duration),a),getZoom:()=>t.getState().transform[2],setViewport:(a,i)=>{const[u,c,s]=t.getState().transform,o=wn.translate(a.x??u,a.y??c).scale(a.zoom??s);e.transform(El(n,i==null?void 0:i.duration),o)},getViewport:()=>{const[a,i,u]=t.getState().transform;return{x:a,y:i,zoom:u}},fitView:a=>Tv(t.getState,a),setCenter:(a,i,u)=>{const{width:c,height:s,maxZoom:o}=t.getState(),r=typeof(u==null?void 0:u.zoom)<"u"?u.zoom:o,f=c/2-a*r,d=s/2-i*r,h=wn.translate(f,d).scale(r);e.transform(El(n,u==null?void 0:u.duration),h)},fitBounds:(a,i)=>{const{width:u,height:c,minZoom:s,maxZoom:o}=t.getState(),{x:r,y:f,zoom:d}=fv(a,u,c,s,o,(i==null?void 0:i.padding)??.1),h=wn.translate(r,f).scale(d);e.transform(El(n,i==null?void 0:i.duration),h)},project:a=>{const{transform:i,snapToGrid:u,snapGrid:c}=t.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),Pr(a,i,u,c)},screenToFlowPosition:a=>{const{transform:i,snapToGrid:u,snapGrid:c,domNode:s}=t.getState();if(!s)return a;const{x:o,y:r}=s.getBoundingClientRect(),f={x:a.x-o,y:a.y-r};return Pr(f,i,u,c)},flowToScreenPosition:a=>{const{transform:i,domNode:u}=t.getState();if(!u)return a;const{x:c,y:s}=u.getBoundingClientRect(),o=sv(a,i);return{x:o.x+c,y:o.y+s}},viewportInitialized:!0}:X3,[e,n])};function Ad(){const t=Z3(),e=Lt(),n=T.useCallback(()=>e.getState().getNodes().map(p=>({...p})),[]),l=T.useCallback(p=>e.getState().nodeInternals.get(p),[]),a=T.useCallback(()=>{const{edges:p=[]}=e.getState();return p.map(b=>({...b}))},[]),i=T.useCallback(p=>{const{edges:b=[]}=e.getState();return b.find(m=>m.id===p)},[]),u=T.useCallback(p=>{const{getNodes:b,setNodes:m,hasDefaultNodes:y,onNodesChange:v}=e.getState(),S=b(),_=typeof p=="function"?p(S):p;if(y)m(_);else if(v){const N=_.length===0?S.map(w=>({type:"remove",id:w.id})):_.map(w=>({item:w,type:"reset"}));v(N)}},[]),c=T.useCallback(p=>{const{edges:b=[],setEdges:m,hasDefaultEdges:y,onEdgesChange:v}=e.getState(),S=typeof p=="function"?p(b):p;if(y)m(S);else if(v){const _=S.length===0?b.map(N=>({type:"remove",id:N.id})):S.map(N=>({item:N,type:"reset"}));v(_)}},[]),s=T.useCallback(p=>{const b=Array.isArray(p)?p:[p],{getNodes:m,setNodes:y,hasDefaultNodes:v,onNodesChange:S}=e.getState();if(v){const N=[...m(),...b];y(N)}else if(S){const _=b.map(N=>({item:N,type:"add"}));S(_)}},[]),o=T.useCallback(p=>{const b=Array.isArray(p)?p:[p],{edges:m=[],setEdges:y,hasDefaultEdges:v,onEdgesChange:S}=e.getState();if(v)y([...m,...b]);else if(S){const _=b.map(N=>({item:N,type:"add"}));S(_)}},[]),r=T.useCallback(()=>{const{getNodes:p,edges:b=[],transform:m}=e.getState(),[y,v,S]=m;return{nodes:p().map(_=>({..._})),edges:b.map(_=>({..._})),viewport:{x:y,y:v,zoom:S}}},[]),f=T.useCallback(({nodes:p,edges:b})=>{const{nodeInternals:m,getNodes:y,edges:v,hasDefaultNodes:S,hasDefaultEdges:_,onNodesDelete:N,onEdgesDelete:w,onNodesChange:H,onEdgesChange:z}=e.getState(),L=(p||[]).map(C=>C.id),R=(b||[]).map(C=>C.id),G=y().reduce((C,E)=>{const M=E.parentNode||E.parentId,U=!L.includes(E.id)&&M&&C.find(j=>j.id===M);return(typeof E.deletable=="boolean"?E.deletable:!0)&&(L.includes(E.id)||U)&&C.push(E),C},[]),V=v.filter(C=>typeof C.deletable=="boolean"?C.deletable:!0),x=V.filter(C=>R.includes(C.id));if(G||x){const C=rv(G,V),E=[...x,...C],M=E.reduce((U,A)=>(U.includes(A.id)||U.push(A.id),U),[]);if((_||S)&&(_&&e.setState({edges:v.filter(U=>!M.includes(U.id))}),S&&(G.forEach(U=>{m.delete(U.id)}),e.setState({nodeInternals:new Map(m)}))),M.length>0&&(w==null||w(E),z&&z(M.map(U=>({id:U,type:"remove"})))),G.length>0&&(N==null||N(G),H)){const U=G.map(A=>({id:A.id,type:"remove"}));H(U)}}},[]),d=T.useCallback(p=>{const b=f3(p),m=b?null:e.getState().nodeInternals.get(p.id);return!b&&!m?[null,null,b]:[b?p:Cm(m),m,b]},[]),h=T.useCallback((p,b=!0,m)=>{const[y,v,S]=d(p);return y?(m||e.getState().getNodes()).filter(_=>{if(!S&&(_.id===v.id||!_.positionAbsolute))return!1;const N=Cm(_),w=kr(N,y);return b&&w>0||w>=y.width*y.height}):[]},[]),g=T.useCallback((p,b,m=!0)=>{const[y]=d(p);if(!y)return!1;const v=kr(y,b);return m&&v>0||v>=y.width*y.height},[]);return T.useMemo(()=>({...t,getNodes:n,getNode:l,getEdges:a,getEdge:i,setNodes:u,setEdges:c,addNodes:s,addEdges:o,toObject:r,deleteElements:f,getIntersectingNodes:h,isNodeIntersecting:g}),[t,n,l,a,i,u,c,s,o,r,f,h,g])}const $3={actInsideInputWithModifier:!1};var Q3=({deleteKeyCode:t,multiSelectionKeyCode:e})=>{const n=Lt(),{deleteElements:l}=Ad(),a=ou(t,$3),i=ou(e);T.useEffect(()=>{if(a){const{edges:u,getNodes:c}=n.getState(),s=c().filter(r=>r.selected),o=u.filter(r=>r.selected);l({nodes:s,edges:o}),n.setState({nodesSelectionActive:!1})}},[a]),T.useEffect(()=>{n.setState({multiSelectionActive:i})},[i])};function K3(t){const e=Lt();T.useEffect(()=>{let n;const l=()=>{var i,u;if(!t.current)return;const a=pd(t.current);(a.height===0||a.width===0)&&((u=(i=e.getState()).onError)==null||u.call(i,"004",Cn.error004())),e.setState({width:a.width||500,height:a.height||500})};return l(),window.addEventListener("resize",l),t.current&&(n=new ResizeObserver(()=>l()),n.observe(t.current)),()=>{window.removeEventListener("resize",l),n&&t.current&&n.unobserve(t.current)}},[])}const Td={position:"absolute",width:"100%",height:"100%",top:0,left:0},J3=(t,e)=>t.x!==e.x||t.y!==e.y||t.zoom!==e.k,Pu=t=>({x:t.x,y:t.y,zoom:t.k}),la=(t,e)=>t.target.closest(`.${e}`),Vm=(t,e)=>e===2&&Array.isArray(t)&&t.includes(2),Xm=t=>{const e=t.ctrlKey&&is()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*e},k3=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler,userSelectionActive:t.userSelectionActive}),F3=({onMove:t,onMoveStart:e,onMoveEnd:n,onPaneContextMenu:l,zoomOnScroll:a=!0,zoomOnPinch:i=!0,panOnScroll:u=!1,panOnScrollSpeed:c=.5,panOnScrollMode:s=wl.Free,zoomOnDoubleClick:o=!0,elementsSelectable:r,panOnDrag:f=!0,defaultViewport:d,translateExtent:h,minZoom:g,maxZoom:p,zoomActivationKeyCode:b,preventScrolling:m=!0,children:y,noWheelClassName:v,noPanClassName:S})=>{const _=T.useRef(),N=Lt(),w=T.useRef(!1),H=T.useRef(!1),z=T.useRef(null),L=T.useRef({x:0,y:0,zoom:0}),{d3Zoom:R,d3Selection:G,d3ZoomHandler:V,userSelectionActive:x}=vt(k3,Xt),C=ou(b),E=T.useRef(0),M=T.useRef(!1),U=T.useRef();return K3(z),T.useEffect(()=>{if(z.current){const A=z.current.getBoundingClientRect(),j=kp().scaleExtent([g,p]).translateExtent(h),Y=Ue(z.current).call(j),X=wn.translate(d.x,d.y).scale($a(d.zoom,g,p)),Q=[[0,0],[A.width,A.height]],Z=j.constrain()(X,Q,h);j.transform(Y,Z),j.wheelDelta(Xm),N.setState({d3Zoom:j,d3Selection:Y,d3ZoomHandler:Y.on("wheel.zoom"),transform:[Z.x,Z.y,Z.k],domNode:z.current.closest(".react-flow")})}},[]),T.useEffect(()=>{G&&R&&(u&&!C&&!x?G.on("wheel.zoom",A=>{if(la(A,v))return!1;A.preventDefault(),A.stopImmediatePropagation();const j=G.property("__zoom").k||1;if(A.ctrlKey&&i){const rt=Xe(A),ct=Xm(A),ut=j*Math.pow(2,ct);R.scaleTo(G,ut,rt,A);return}const Y=A.deltaMode===1?20:1;let X=s===wl.Vertical?0:A.deltaX*Y,Q=s===wl.Horizontal?0:A.deltaY*Y;!is()&&A.shiftKey&&s!==wl.Vertical&&(X=A.deltaY*Y,Q=0),R.translateBy(G,-(X/j)*c,-(Q/j)*c,{internal:!0});const Z=Pu(G.property("__zoom")),{onViewportChangeStart:K,onViewportChange:P,onViewportChangeEnd:at}=N.getState();clearTimeout(U.current),M.current||(M.current=!0,e==null||e(A,Z),K==null||K(Z)),M.current&&(t==null||t(A,Z),P==null||P(Z),U.current=setTimeout(()=>{n==null||n(A,Z),at==null||at(Z),M.current=!1},150))},{passive:!1}):typeof V<"u"&&G.on("wheel.zoom",function(A,j){if(!m&&A.type==="wheel"&&!A.ctrlKey||la(A,v))return null;A.preventDefault(),V.call(this,A,j)},{passive:!1}))},[x,u,s,G,R,V,C,i,m,v,e,t,n]),T.useEffect(()=>{R&&R.on("start",A=>{var X,Q;if(!A.sourceEvent||A.sourceEvent.internal)return null;E.current=(X=A.sourceEvent)==null?void 0:X.button;const{onViewportChangeStart:j}=N.getState(),Y=Pu(A.transform);w.current=!0,L.current=Y,((Q=A.sourceEvent)==null?void 0:Q.type)==="mousedown"&&N.setState({paneDragging:!0}),j==null||j(Y),e==null||e(A.sourceEvent,Y)})},[R,e]),T.useEffect(()=>{R&&(x&&!w.current?R.on("zoom",null):x||R.on("zoom",A=>{var Y;const{onViewportChange:j}=N.getState();if(N.setState({transform:[A.transform.x,A.transform.y,A.transform.k]}),H.current=!!(l&&Vm(f,E.current??0)),(t||j)&&!((Y=A.sourceEvent)!=null&&Y.internal)){const X=Pu(A.transform);j==null||j(X),t==null||t(A.sourceEvent,X)}}))},[x,R,t,f,l]),T.useEffect(()=>{R&&R.on("end",A=>{if(!A.sourceEvent||A.sourceEvent.internal)return null;const{onViewportChangeEnd:j}=N.getState();if(w.current=!1,N.setState({paneDragging:!1}),l&&Vm(f,E.current??0)&&!H.current&&l(A.sourceEvent),H.current=!1,(n||j)&&J3(L.current,A.transform)){const Y=Pu(A.transform);L.current=Y,clearTimeout(_.current),_.current=setTimeout(()=>{j==null||j(Y),n==null||n(A.sourceEvent,Y)},u?150:0)}})},[R,u,f,n,l]),T.useEffect(()=>{R&&R.filter(A=>{const j=C||a,Y=i&&A.ctrlKey;if((f===!0||Array.isArray(f)&&f.includes(1))&&A.button===1&&A.type==="mousedown"&&(la(A,"react-flow__node")||la(A,"react-flow__edge")))return!0;if(!f&&!j&&!u&&!o&&!i||x||!o&&A.type==="dblclick"||la(A,v)&&A.type==="wheel"||la(A,S)&&(A.type!=="wheel"||u&&A.type==="wheel"&&!C)||!i&&A.ctrlKey&&A.type==="wheel"||!j&&!u&&!Y&&A.type==="wheel"||!f&&(A.type==="mousedown"||A.type==="touchstart")||Array.isArray(f)&&!f.includes(A.button)&&A.type==="mousedown")return!1;const X=Array.isArray(f)&&f.includes(A.button)||!A.button||A.button<=1;return(!A.ctrlKey||A.type==="wheel")&&X})},[x,R,a,i,u,o,f,r,C]),B.createElement("div",{className:"react-flow__renderer",ref:z,style:Td},y)},W3=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function I3(){const{userSelectionActive:t,userSelectionRect:e}=vt(W3,Xt);return t&&e?B.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:e.width,height:e.height,transform:`translate(${e.x}px, ${e.y}px)`}}):null}function Gm(t,e){const n=e.parentNode||e.parentId,l=t.find(a=>a.id===n);if(l){const a=e.position.x+e.width-l.width,i=e.position.y+e.height-l.height;if(a>0||i>0||e.position.x<0||e.position.y<0){if(l.style={...l.style},l.style.width=l.style.width??l.width,l.style.height=l.style.height??l.height,a>0&&(l.style.width+=a),i>0&&(l.style.height+=i),e.position.x<0){const u=Math.abs(e.position.x);l.position.x=l.position.x-u,l.style.width+=u,e.position.x=0}if(e.position.y<0){const u=Math.abs(e.position.y);l.position.y=l.position.y-u,l.style.height+=u,e.position.y=0}l.width=l.style.width,l.height=l.style.height}}}function Nv(t,e){if(t.some(l=>l.type==="reset"))return t.filter(l=>l.type==="reset").map(l=>l.item);const n=t.filter(l=>l.type==="add").map(l=>l.item);return e.reduce((l,a)=>{const i=t.filter(c=>c.id===a.id);if(i.length===0)return l.push(a),l;const u={...a};for(const c of i)if(c)switch(c.type){case"select":{u.selected=c.selected;break}case"position":{typeof c.position<"u"&&(u.position=c.position),typeof c.positionAbsolute<"u"&&(u.positionAbsolute=c.positionAbsolute),typeof c.dragging<"u"&&(u.dragging=c.dragging),u.expandParent&&Gm(l,u);break}case"dimensions":{typeof c.dimensions<"u"&&(u.width=c.dimensions.width,u.height=c.dimensions.height),typeof c.updateStyle<"u"&&(u.style={...u.style||{},...c.dimensions}),typeof c.resizing=="boolean"&&(u.resizing=c.resizing),u.expandParent&&Gm(l,u);break}case"remove":return l}return l.push(u),l},n)}function zv(t,e){return Nv(t,e)}function P3(t,e){return Nv(t,e)}const Ln=(t,e)=>({id:t,type:"select",selected:e});function ba(t,e){return t.reduce((n,l)=>{const a=e.includes(l.id);return!l.selected&&a?(l.selected=!0,n.push(Ln(l.id,!0))):l.selected&&!a&&(l.selected=!1,n.push(Ln(l.id,!1))),n},[])}const jo=(t,e)=>n=>{n.target===e.current&&(t==null||t(n))},tA=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging}),Mv=T.memo(({isSelecting:t,selectionMode:e=su.Full,panOnDrag:n,onSelectionStart:l,onSelectionEnd:a,onPaneClick:i,onPaneContextMenu:u,onPaneScroll:c,onPaneMouseEnter:s,onPaneMouseMove:o,onPaneMouseLeave:r,children:f})=>{const d=T.useRef(null),h=Lt(),g=T.useRef(0),p=T.useRef(0),b=T.useRef(),{userSelectionActive:m,elementsSelectable:y,dragging:v}=vt(tA,Xt),S=()=>{h.setState({userSelectionActive:!1,userSelectionRect:null}),g.current=0,p.current=0},_=V=>{i==null||i(V),h.getState().resetSelectedElements(),h.setState({nodesSelectionActive:!1})},N=V=>{if(Array.isArray(n)&&(n!=null&&n.includes(2))){V.preventDefault();return}u==null||u(V)},w=c?V=>c(V):void 0,H=V=>{const{resetSelectedElements:x,domNode:C}=h.getState();if(b.current=C==null?void 0:C.getBoundingClientRect(),!y||!t||V.button!==0||V.target!==d.current||!b.current)return;const{x:E,y:M}=al(V,b.current);x(),h.setState({userSelectionRect:{width:0,height:0,startX:E,startY:M,x:E,y:M}}),l==null||l(V)},z=V=>{const{userSelectionRect:x,nodeInternals:C,edges:E,transform:M,onNodesChange:U,onEdgesChange:A,nodeOrigin:j,getNodes:Y}=h.getState();if(!t||!b.current||!x)return;h.setState({userSelectionActive:!0,nodesSelectionActive:!1});const X=al(V,b.current),Q=x.startX??0,Z=x.startY??0,K={...x,x:X.x<Q?X.x:Q,y:X.y<Z?X.y:Z,width:Math.abs(X.x-Q),height:Math.abs(X.y-Z)},P=Y(),at=ov(C,K,M,e===su.Partial,!0,j),rt=rv(at,E).map(ut=>ut.id),ct=at.map(ut=>ut.id);if(g.current!==ct.length){g.current=ct.length;const ut=ba(P,ct);ut.length&&(U==null||U(ut))}if(p.current!==rt.length){p.current=rt.length;const ut=ba(E,rt);ut.length&&(A==null||A(ut))}h.setState({userSelectionRect:K})},L=V=>{if(V.button!==0)return;const{userSelectionRect:x}=h.getState();!m&&x&&V.target===d.current&&(_==null||_(V)),h.setState({nodesSelectionActive:g.current>0}),S(),a==null||a(V)},R=V=>{m&&(h.setState({nodesSelectionActive:g.current>0}),a==null||a(V)),S()},G=y&&(t||m);return B.createElement("div",{className:Ft(["react-flow__pane",{dragging:v,selection:t}]),onClick:G?void 0:jo(_,d),onContextMenu:jo(N,d),onWheel:jo(w,d),onMouseEnter:G?void 0:s,onMouseDown:G?H:void 0,onMouseMove:G?z:o,onMouseUp:G?L:void 0,onMouseLeave:G?R:r,ref:d,style:Td},f,B.createElement(I3,null))});Mv.displayName="Pane";function Ov(t,e){const n=t.parentNode||t.parentId;if(!n)return!1;const l=e.get(n);return l?l.selected?!0:Ov(l,e):!1}function Zm(t,e,n){let l=t;do{if(l!=null&&l.matches(e))return!0;if(l===n.current)return!1;l=l.parentElement}while(l);return!1}function eA(t,e,n,l){return Array.from(t.values()).filter(a=>(a.selected||a.id===l)&&(!a.parentNode||a.parentId||!Ov(a,t))&&(a.draggable||e&&typeof a.draggable>"u")).map(a=>{var i,u;return{id:a.id,position:a.position||{x:0,y:0},positionAbsolute:a.positionAbsolute||{x:0,y:0},distance:{x:n.x-(((i=a.positionAbsolute)==null?void 0:i.x)??0),y:n.y-(((u=a.positionAbsolute)==null?void 0:u.y)??0)},delta:{x:0,y:0},extent:a.extent,parentNode:a.parentNode||a.parentId,parentId:a.parentNode||a.parentId,width:a.width,height:a.height,expandParent:a.expandParent}})}function nA(t,e){return!e||e==="parent"?e:[e[0],[e[1][0]-(t.width||0),e[1][1]-(t.height||0)]]}function Cv(t,e,n,l,a=[0,0],i){const u=nA(t,t.extent||l);let c=u;const s=t.parentNode||t.parentId;if(t.extent==="parent"&&!t.expandParent)if(s&&t.width&&t.height){const f=n.get(s),{x:d,y:h}=Rl(f,a).positionAbsolute;c=f&&He(d)&&He(h)&&He(f.width)&&He(f.height)?[[d+t.width*a[0],h+t.height*a[1]],[d+f.width-t.width+t.width*a[0],h+f.height-t.height+t.height*a[1]]]:c}else i==null||i("005",Cn.error005()),c=u;else if(t.extent&&s&&t.extent!=="parent"){const f=n.get(s),{x:d,y:h}=Rl(f,a).positionAbsolute;c=[[t.extent[0][0]+d,t.extent[0][1]+h],[t.extent[1][0]+d,t.extent[1][1]+h]]}let o={x:0,y:0};if(s){const f=n.get(s);o=Rl(f,a).positionAbsolute}const r=c&&c!=="parent"?vd(e,c):e;return{position:{x:r.x-o.x,y:r.y-o.y},positionAbsolute:r}}function Lo({nodeId:t,dragItems:e,nodeInternals:n}){const l=e.map(a=>({...n.get(a.id),position:a.position,positionAbsolute:a.positionAbsolute}));return[t?l.find(a=>a.id===t):l[0],l]}const $m=(t,e,n,l)=>{const a=e.querySelectorAll(t);if(!a||!a.length)return null;const i=Array.from(a),u=e.getBoundingClientRect(),c={x:u.width*l[0],y:u.height*l[1]};return i.map(s=>{const o=s.getBoundingClientRect();return{id:s.getAttribute("data-handleid"),position:s.getAttribute("data-handlepos"),x:(o.left-u.left-c.x)/n,y:(o.top-u.top-c.y)/n,...pd(s)}})};function pi(t,e,n){return n===void 0?n:l=>{const a=e().nodeInternals.get(t);a&&n(l,{...a})}}function ef({id:t,store:e,unselect:n=!1,nodeRef:l}){const{addSelectedNodes:a,unselectNodesAndEdges:i,multiSelectionActive:u,nodeInternals:c,onError:s}=e.getState(),o=c.get(t);if(!o){s==null||s("012",Cn.error012(t));return}e.setState({nodesSelectionActive:!1}),o.selected?(n||o.selected&&u)&&(i({nodes:[o],edges:[]}),requestAnimationFrame(()=>{var r;return(r=l==null?void 0:l.current)==null?void 0:r.blur()})):a([t])}function lA(){const t=Lt();return T.useCallback(({sourceEvent:n})=>{const{transform:l,snapGrid:a,snapToGrid:i}=t.getState(),u=n.touches?n.touches[0].clientX:n.clientX,c=n.touches?n.touches[0].clientY:n.clientY,s={x:(u-l[0])/l[2],y:(c-l[1])/l[2]};return{xSnapped:i?a[0]*Math.round(s.x/a[0]):s.x,ySnapped:i?a[1]*Math.round(s.y/a[1]):s.y,...s}},[])}function qo(t){return(e,n,l)=>t==null?void 0:t(e,l)}function Rv({nodeRef:t,disabled:e=!1,noDragClassName:n,handleSelector:l,nodeId:a,isSelectable:i,selectNodesOnDrag:u}){const c=Lt(),[s,o]=T.useState(!1),r=T.useRef([]),f=T.useRef({x:null,y:null}),d=T.useRef(0),h=T.useRef(null),g=T.useRef({x:0,y:0}),p=T.useRef(null),b=T.useRef(!1),m=T.useRef(!1),y=T.useRef(!1),v=lA();return T.useEffect(()=>{if(t!=null&&t.current){const S=Ue(t.current),_=({x:H,y:z})=>{const{nodeInternals:L,onNodeDrag:R,onSelectionDrag:G,updateNodePositions:V,nodeExtent:x,snapGrid:C,snapToGrid:E,nodeOrigin:M,onError:U}=c.getState();f.current={x:H,y:z};let A=!1,j={x:0,y:0,x2:0,y2:0};if(r.current.length>1&&x){const X=Hs(r.current,M);j=cu(X)}if(r.current=r.current.map(X=>{const Q={x:H-X.distance.x,y:z-X.distance.y};E&&(Q.x=C[0]*Math.round(Q.x/C[0]),Q.y=C[1]*Math.round(Q.y/C[1]));const Z=[[x[0][0],x[0][1]],[x[1][0],x[1][1]]];r.current.length>1&&x&&!X.extent&&(Z[0][0]=X.positionAbsolute.x-j.x+x[0][0],Z[1][0]=X.positionAbsolute.x+(X.width??0)-j.x2+x[1][0],Z[0][1]=X.positionAbsolute.y-j.y+x[0][1],Z[1][1]=X.positionAbsolute.y+(X.height??0)-j.y2+x[1][1]);const K=Cv(X,Q,L,Z,M,U);return A=A||X.position.x!==K.position.x||X.position.y!==K.position.y,X.position=K.position,X.positionAbsolute=K.positionAbsolute,X}),!A)return;V(r.current,!0,!0),o(!0);const Y=a?R:qo(G);if(Y&&p.current){const[X,Q]=Lo({nodeId:a,dragItems:r.current,nodeInternals:L});Y(p.current,X,Q)}},N=()=>{if(!h.current)return;const[H,z]=Wp(g.current,h.current);if(H!==0||z!==0){const{transform:L,panBy:R}=c.getState();f.current.x=(f.current.x??0)-H/L[2],f.current.y=(f.current.y??0)-z/L[2],R({x:H,y:z})&&_(f.current)}d.current=requestAnimationFrame(N)},w=H=>{var M;const{nodeInternals:z,multiSelectionActive:L,nodesDraggable:R,unselectNodesAndEdges:G,onNodeDragStart:V,onSelectionDragStart:x}=c.getState();m.current=!0;const C=a?V:qo(x);(!u||!i)&&!L&&a&&((M=z.get(a))!=null&&M.selected||G()),a&&i&&u&&ef({id:a,store:c,nodeRef:t});const E=v(H);if(f.current=E,r.current=eA(z,R,E,a),C&&r.current){const[U,A]=Lo({nodeId:a,dragItems:r.current,nodeInternals:z});C(H.sourceEvent,U,A)}};if(e)S.on(".drag",null);else{const H=y_().on("start",z=>{const{domNode:L,nodeDragThreshold:R}=c.getState();R===0&&w(z),y.current=!1;const G=v(z);f.current=G,h.current=(L==null?void 0:L.getBoundingClientRect())||null,g.current=al(z.sourceEvent,h.current)}).on("drag",z=>{var V,x;const L=v(z),{autoPanOnNodeDrag:R,nodeDragThreshold:G}=c.getState();if(z.sourceEvent.type==="touchmove"&&z.sourceEvent.touches.length>1&&(y.current=!0),!y.current){if(!b.current&&m.current&&R&&(b.current=!0,N()),!m.current){const C=L.xSnapped-(((V=f==null?void 0:f.current)==null?void 0:V.x)??0),E=L.ySnapped-(((x=f==null?void 0:f.current)==null?void 0:x.y)??0);Math.sqrt(C*C+E*E)>G&&w(z)}(f.current.x!==L.xSnapped||f.current.y!==L.ySnapped)&&r.current&&m.current&&(p.current=z.sourceEvent,g.current=al(z.sourceEvent,h.current),_(L))}}).on("end",z=>{if(!(!m.current||y.current)&&(o(!1),b.current=!1,m.current=!1,cancelAnimationFrame(d.current),r.current)){const{updateNodePositions:L,nodeInternals:R,onNodeDragStop:G,onSelectionDragStop:V}=c.getState(),x=a?G:qo(V);if(L(r.current,!1,!1),x){const[C,E]=Lo({nodeId:a,dragItems:r.current,nodeInternals:R});x(z.sourceEvent,C,E)}}}).filter(z=>{const L=z.target;return!z.button&&(!n||!Zm(L,`.${n}`,t))&&(!l||Zm(L,l,t))});return S.call(H),()=>{S.on(".drag",null)}}}},[t,e,n,l,i,c,a,u,v]),s}function Dv(){const t=Lt();return T.useCallback(n=>{const{nodeInternals:l,nodeExtent:a,updateNodePositions:i,getNodes:u,snapToGrid:c,snapGrid:s,onError:o,nodesDraggable:r}=t.getState(),f=u().filter(y=>y.selected&&(y.draggable||r&&typeof y.draggable>"u")),d=c?s[0]:5,h=c?s[1]:5,g=n.isShiftPressed?4:1,p=n.x*d*g,b=n.y*h*g,m=f.map(y=>{if(y.positionAbsolute){const v={x:y.positionAbsolute.x+p,y:y.positionAbsolute.y+b};c&&(v.x=s[0]*Math.round(v.x/s[0]),v.y=s[1]*Math.round(v.y/s[1]));const{positionAbsolute:S,position:_}=Cv(y,v,l,a,void 0,o);y.position=_,y.positionAbsolute=S}return y});i(m,!0,!1)},[])}const Oa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var vi=t=>{const e=({id:n,type:l,data:a,xPos:i,yPos:u,xPosOrigin:c,yPosOrigin:s,selected:o,onClick:r,onMouseEnter:f,onMouseMove:d,onMouseLeave:h,onContextMenu:g,onDoubleClick:p,style:b,className:m,isDraggable:y,isSelectable:v,isConnectable:S,isFocusable:_,selectNodesOnDrag:N,sourcePosition:w,targetPosition:H,hidden:z,resizeObserver:L,dragHandle:R,zIndex:G,isParent:V,noDragClassName:x,noPanClassName:C,initialized:E,disableKeyboardA11y:M,ariaLabel:U,rfId:A,hasHandleBounds:j})=>{const Y=Lt(),X=T.useRef(null),Q=T.useRef(null),Z=T.useRef(w),K=T.useRef(H),P=T.useRef(l),at=v||y||r||f||d||h,rt=Dv(),ct=pi(n,Y.getState,f),ut=pi(n,Y.getState,d),Gt=pi(n,Y.getState,h),Ht=pi(n,Y.getState,g),te=pi(n,Y.getState,p),Wt=ht=>{const{nodeDragThreshold:J}=Y.getState();if(v&&(!N||!y||J>0)&&ef({id:n,store:Y,nodeRef:X}),r){const ee=Y.getState().nodeInternals.get(n);ee&&r(ht,{...ee})}},zt=ht=>{if(!Fr(ht)&&!M)if(ev.includes(ht.key)&&v){const J=ht.key==="Escape";ef({id:n,store:Y,unselect:J,nodeRef:X})}else y&&o&&Object.prototype.hasOwnProperty.call(Oa,ht.key)&&(Y.setState({ariaLiveMessage:`Moved selected node ${ht.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~i}, y: ${~~u}`}),rt({x:Oa[ht.key].x,y:Oa[ht.key].y,isShiftPressed:ht.shiftKey}))};T.useEffect(()=>()=>{Q.current&&(L==null||L.unobserve(Q.current),Q.current=null)},[]),T.useEffect(()=>{if(X.current&&!z){const ht=X.current;(!E||!j||Q.current!==ht)&&(Q.current&&(L==null||L.unobserve(Q.current)),L==null||L.observe(ht),Q.current=ht)}},[z,E,j]),T.useEffect(()=>{const ht=P.current!==l,J=Z.current!==w,ee=K.current!==H;X.current&&(ht||J||ee)&&(ht&&(P.current=l),J&&(Z.current=w),ee&&(K.current=H),Y.getState().updateNodeDimensions([{id:n,nodeElement:X.current,forceUpdate:!0}]))},[n,l,w,H]);const ye=Rv({nodeRef:X,disabled:z||!y,noDragClassName:x,handleSelector:R,nodeId:n,isSelectable:v,selectNodesOnDrag:N});return z?null:B.createElement("div",{className:Ft(["react-flow__node",`react-flow__node-${l}`,{[C]:y},m,{selected:o,selectable:v,parent:V,dragging:ye}]),ref:X,style:{zIndex:G,transform:`translate(${c}px,${s}px)`,pointerEvents:at?"all":"none",visibility:E?"visible":"hidden",...b},"data-id":n,"data-testid":`rf__node-${n}`,onMouseEnter:ct,onMouseMove:ut,onMouseLeave:Gt,onContextMenu:Ht,onClick:Wt,onDoubleClick:te,onKeyDown:_?zt:void 0,tabIndex:_?0:void 0,role:_?"button":void 0,"aria-describedby":M?void 0:`${Ev}-${A}`,"aria-label":U},B.createElement(v3,{value:n},B.createElement(t,{id:n,data:a,type:l,xPos:i,yPos:u,selected:o,isConnectable:S,sourcePosition:w,targetPosition:H,dragging:ye,dragHandle:R,zIndex:G})))};return e.displayName="NodeWrapper",T.memo(e)};const aA=t=>{const e=t.getNodes().filter(n=>n.selected);return{...Hs(e,t.nodeOrigin),transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`,userSelectionActive:t.userSelectionActive}};function iA({onSelectionContextMenu:t,noPanClassName:e,disableKeyboardA11y:n}){const l=Lt(),{width:a,height:i,x:u,y:c,transformString:s,userSelectionActive:o}=vt(aA,Xt),r=Dv(),f=T.useRef(null);if(T.useEffect(()=>{var g;n||(g=f.current)==null||g.focus({preventScroll:!0})},[n]),Rv({nodeRef:f}),o||!a||!i)return null;const d=t?g=>{const p=l.getState().getNodes().filter(b=>b.selected);t(g,p)}:void 0,h=g=>{Object.prototype.hasOwnProperty.call(Oa,g.key)&&r({x:Oa[g.key].x,y:Oa[g.key].y,isShiftPressed:g.shiftKey})};return B.createElement("div",{className:Ft(["react-flow__nodesselection","react-flow__container",e]),style:{transform:s}},B.createElement("div",{ref:f,className:"react-flow__nodesselection-rect",onContextMenu:d,tabIndex:n?void 0:-1,onKeyDown:n?void 0:h,style:{width:a,height:i,top:c,left:u}}))}var uA=T.memo(iA);const cA=t=>t.nodesSelectionActive,Uv=({children:t,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:l,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:u,deleteKeyCode:c,onMove:s,onMoveStart:o,onMoveEnd:r,selectionKeyCode:f,selectionOnDrag:d,selectionMode:h,onSelectionStart:g,onSelectionEnd:p,multiSelectionKeyCode:b,panActivationKeyCode:m,zoomActivationKeyCode:y,elementsSelectable:v,zoomOnScroll:S,zoomOnPinch:_,panOnScroll:N,panOnScrollSpeed:w,panOnScrollMode:H,zoomOnDoubleClick:z,panOnDrag:L,defaultViewport:R,translateExtent:G,minZoom:V,maxZoom:x,preventScrolling:C,onSelectionContextMenu:E,noWheelClassName:M,noPanClassName:U,disableKeyboardA11y:A})=>{const j=vt(cA),Y=ou(f),X=ou(m),Q=X||L,Z=X||N,K=Y||d&&Q!==!0;return Q3({deleteKeyCode:c,multiSelectionKeyCode:b}),B.createElement(F3,{onMove:s,onMoveStart:o,onMoveEnd:r,onPaneContextMenu:i,elementsSelectable:v,zoomOnScroll:S,zoomOnPinch:_,panOnScroll:Z,panOnScrollSpeed:w,panOnScrollMode:H,zoomOnDoubleClick:z,panOnDrag:!Y&&Q,defaultViewport:R,translateExtent:G,minZoom:V,maxZoom:x,zoomActivationKeyCode:y,preventScrolling:C,noWheelClassName:M,noPanClassName:U},B.createElement(Mv,{onSelectionStart:g,onSelectionEnd:p,onPaneClick:e,onPaneMouseEnter:n,onPaneMouseMove:l,onPaneMouseLeave:a,onPaneContextMenu:i,onPaneScroll:u,panOnDrag:Q,isSelecting:!!K,selectionMode:h},t,j&&B.createElement(uA,{onSelectionContextMenu:E,noPanClassName:U,disableKeyboardA11y:A})))};Uv.displayName="FlowRenderer";var sA=T.memo(Uv);function oA(t){return vt(T.useCallback(n=>t?ov(n.nodeInternals,{x:0,y:0,width:n.width,height:n.height},n.transform,!0):n.getNodes(),[t]))}function rA(t){const e={input:vi(t.input||vv),default:vi(t.default||tf),output:vi(t.output||bv),group:vi(t.group||wd)},n={},l=Object.keys(t).filter(a=>!["input","default","output","group"].includes(a)).reduce((a,i)=>(a[i]=vi(t[i]||tf),a),n);return{...e,...l}}const fA=({x:t,y:e,width:n,height:l,origin:a})=>!n||!l?{x:t,y:e}:a[0]<0||a[1]<0||a[0]>1||a[1]>1?{x:t,y:e}:{x:t-n*a[0],y:e-l*a[1]},dA=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions,onError:t.onError}),Hv=t=>{const{nodesDraggable:e,nodesConnectable:n,nodesFocusable:l,elementsSelectable:a,updateNodeDimensions:i,onError:u}=vt(dA,Xt),c=oA(t.onlyRenderVisibleElements),s=T.useRef(),o=T.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const r=new ResizeObserver(f=>{const d=f.map(h=>({id:h.target.getAttribute("data-id"),nodeElement:h.target,forceUpdate:!0}));i(d)});return s.current=r,r},[]);return T.useEffect(()=>()=>{var r;(r=s==null?void 0:s.current)==null||r.disconnect()},[]),B.createElement("div",{className:"react-flow__nodes",style:Td},c.map(r=>{var _,N,w;let f=r.type||"default";t.nodeTypes[f]||(u==null||u("003",Cn.error003(f)),f="default");const d=t.nodeTypes[f]||t.nodeTypes.default,h=!!(r.draggable||e&&typeof r.draggable>"u"),g=!!(r.selectable||a&&typeof r.selectable>"u"),p=!!(r.connectable||n&&typeof r.connectable>"u"),b=!!(r.focusable||l&&typeof r.focusable>"u"),m=t.nodeExtent?vd(r.positionAbsolute,t.nodeExtent):r.positionAbsolute,y=(m==null?void 0:m.x)??0,v=(m==null?void 0:m.y)??0,S=fA({x:y,y:v,width:r.width??0,height:r.height??0,origin:t.nodeOrigin});return B.createElement(d,{key:r.id,id:r.id,className:r.className,style:r.style,type:f,data:r.data,sourcePosition:r.sourcePosition||$.Bottom,targetPosition:r.targetPosition||$.Top,hidden:r.hidden,xPos:y,yPos:v,xPosOrigin:S.x,yPosOrigin:S.y,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!r.selected,isDraggable:h,isSelectable:g,isConnectable:p,isFocusable:b,resizeObserver:o,dragHandle:r.dragHandle,zIndex:((_=r[Nt])==null?void 0:_.z)??0,isParent:!!((N=r[Nt])!=null&&N.isParent),noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!r.width&&!!r.height,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,ariaLabel:r.ariaLabel,hasHandleBounds:!!((w=r[Nt])!=null&&w.handleBounds)})}))};Hv.displayName="NodeRenderer";var hA=T.memo(Hv);const mA=(t,e,n)=>n===$.Left?t-e:n===$.Right?t+e:t,yA=(t,e,n)=>n===$.Top?t-e:n===$.Bottom?t+e:t,Qm="react-flow__edgeupdater",Km=({position:t,centerX:e,centerY:n,radius:l=10,onMouseDown:a,onMouseEnter:i,onMouseOut:u,type:c})=>B.createElement("circle",{onMouseDown:a,onMouseEnter:i,onMouseOut:u,className:Ft([Qm,`${Qm}-${c}`]),cx:mA(e,l,t),cy:yA(n,l,t),r:l,stroke:"transparent",fill:"transparent"}),gA=()=>!0;var aa=t=>{const e=({id:n,className:l,type:a,data:i,onClick:u,onEdgeDoubleClick:c,selected:s,animated:o,label:r,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:p,style:b,source:m,target:y,sourceX:v,sourceY:S,targetX:_,targetY:N,sourcePosition:w,targetPosition:H,elementsSelectable:z,hidden:L,sourceHandleId:R,targetHandleId:G,onContextMenu:V,onMouseEnter:x,onMouseMove:C,onMouseLeave:E,reconnectRadius:M,onReconnect:U,onReconnectStart:A,onReconnectEnd:j,markerEnd:Y,markerStart:X,rfId:Q,ariaLabel:Z,isFocusable:K,isReconnectable:P,pathOptions:at,interactionWidth:rt,disableKeyboardA11y:ct})=>{const ut=T.useRef(null),[Gt,Ht]=T.useState(!1),[te,Wt]=T.useState(!1),zt=Lt(),ye=T.useMemo(()=>`url('#${Ir(X,Q)}')`,[X,Q]),ht=T.useMemo(()=>`url('#${Ir(Y,Q)}')`,[Y,Q]);if(L)return null;const J=It=>{var Je;const{edges:qe,addSelectedEdges:hl,unselectNodesAndEdges:ml,multiSelectionActive:yl}=zt.getState(),sn=qe.find(ii=>ii.id===n);sn&&(z&&(zt.setState({nodesSelectionActive:!1}),sn.selected&&yl?(ml({nodes:[],edges:[sn]}),(Je=ut.current)==null||Je.blur()):hl([n])),u&&u(It,sn))},ee=gi(n,zt.getState,c),un=gi(n,zt.getState,V),li=gi(n,zt.getState,x),Jl=gi(n,zt.getState,C),kl=gi(n,zt.getState,E),cn=(It,qe)=>{if(It.button!==0)return;const{edges:hl,isValidConnection:ml}=zt.getState(),yl=qe?y:m,sn=(qe?G:R)||null,Je=qe?"target":"source",ii=ml||gA,Xs=qe,ui=hl.find(gl=>gl.id===n);Wt(!0),A==null||A(It,ui,Je);const Gs=gl=>{Wt(!1),j==null||j(gl,ui,Je)};mv({event:It,handleId:sn,nodeId:yl,onConnect:gl=>U==null?void 0:U(ui,gl),isTarget:Xs,getState:zt.getState,setState:zt.setState,isValidConnection:ii,edgeUpdaterType:Je,onReconnectEnd:Gs})},Fl=It=>cn(It,!0),fl=It=>cn(It,!1),dl=()=>Ht(!0),Wl=()=>Ht(!1),Il=!z&&!u,ai=It=>{var qe;if(!ct&&ev.includes(It.key)&&z){const{unselectNodesAndEdges:hl,addSelectedEdges:ml,edges:yl}=zt.getState();It.key==="Escape"?((qe=ut.current)==null||qe.blur(),hl({edges:[yl.find(Je=>Je.id===n)]})):ml([n])}};return B.createElement("g",{className:Ft(["react-flow__edge",`react-flow__edge-${a}`,l,{selected:s,animated:o,inactive:Il,updating:Gt}]),onClick:J,onDoubleClick:ee,onContextMenu:un,onMouseEnter:li,onMouseMove:Jl,onMouseLeave:kl,onKeyDown:K?ai:void 0,tabIndex:K?0:void 0,role:K?"button":"img","data-testid":`rf__edge-${n}`,"aria-label":Z===null?void 0:Z||`Edge from ${m} to ${y}`,"aria-describedby":K?`${_v}-${Q}`:void 0,ref:ut},!te&&B.createElement(t,{id:n,source:m,target:y,selected:s,animated:o,label:r,labelStyle:f,labelShowBg:d,labelBgStyle:h,labelBgPadding:g,labelBgBorderRadius:p,data:i,style:b,sourceX:v,sourceY:S,targetX:_,targetY:N,sourcePosition:w,targetPosition:H,sourceHandleId:R,targetHandleId:G,markerStart:ye,markerEnd:ht,pathOptions:at,interactionWidth:rt}),P&&B.createElement(B.Fragment,null,(P==="source"||P===!0)&&B.createElement(Km,{position:w,centerX:v,centerY:S,radius:M,onMouseDown:Fl,onMouseEnter:dl,onMouseOut:Wl,type:"source"}),(P==="target"||P===!0)&&B.createElement(Km,{position:H,centerX:_,centerY:N,radius:M,onMouseDown:fl,onMouseEnter:dl,onMouseOut:Wl,type:"target"})))};return e.displayName="EdgeWrapper",T.memo(e)};function pA(t){const e={default:aa(t.default||cs),straight:aa(t.bezier||xd),step:aa(t.step||bd),smoothstep:aa(t.step||Us),simplebezier:aa(t.simplebezier||Sd)},n={},l=Object.keys(t).filter(a=>!["default","bezier"].includes(a)).reduce((a,i)=>(a[i]=aa(t[i]||cs),a),n);return{...e,...l}}function Jm(t,e,n=null){const l=((n==null?void 0:n.x)||0)+e.x,a=((n==null?void 0:n.y)||0)+e.y,i=(n==null?void 0:n.width)||e.width,u=(n==null?void 0:n.height)||e.height;switch(t){case $.Top:return{x:l+i/2,y:a};case $.Right:return{x:l+i,y:a+u/2};case $.Bottom:return{x:l+i/2,y:a+u};case $.Left:return{x:l,y:a+u/2}}}function km(t,e){return t?t.length===1||!e?t[0]:e&&t.find(n=>n.id===e)||null:null}const vA=(t,e,n,l,a,i)=>{const u=Jm(n,t,e),c=Jm(i,l,a);return{sourceX:u.x,sourceY:u.y,targetX:c.x,targetY:c.y}};function SA({sourcePos:t,targetPos:e,sourceWidth:n,sourceHeight:l,targetWidth:a,targetHeight:i,width:u,height:c,transform:s}){const o={x:Math.min(t.x,e.x),y:Math.min(t.y,e.y),x2:Math.max(t.x+n,e.x+a),y2:Math.max(t.y+l,e.y+i)};o.x===o.x2&&(o.x2+=1),o.y===o.y2&&(o.y2+=1);const r=cu({x:(0-s[0])/s[2],y:(0-s[1])/s[2],width:u/s[2],height:c/s[2]}),f=Math.max(0,Math.min(r.x2,o.x2)-Math.max(r.x,o.x)),d=Math.max(0,Math.min(r.y2,o.y2)-Math.max(r.y,o.y));return Math.ceil(f*d)>0}function Fm(t){var l,a,i,u,c;const e=((l=t==null?void 0:t[Nt])==null?void 0:l.handleBounds)||null,n=e&&(t==null?void 0:t.width)&&(t==null?void 0:t.height)&&typeof((a=t==null?void 0:t.positionAbsolute)==null?void 0:a.x)<"u"&&typeof((i=t==null?void 0:t.positionAbsolute)==null?void 0:i.y)<"u";return[{x:((u=t==null?void 0:t.positionAbsolute)==null?void 0:u.x)||0,y:((c=t==null?void 0:t.positionAbsolute)==null?void 0:c.y)||0,width:(t==null?void 0:t.width)||0,height:(t==null?void 0:t.height)||0},e,!!n]}const bA=[{level:0,isMaxLevel:!0,edges:[]}];function xA(t,e,n=!1){let l=-1;const a=t.reduce((u,c)=>{var r,f;const s=He(c.zIndex);let o=s?c.zIndex:0;if(n){const d=e.get(c.target),h=e.get(c.source),g=c.selected||(d==null?void 0:d.selected)||(h==null?void 0:h.selected),p=Math.max(((r=h==null?void 0:h[Nt])==null?void 0:r.z)||0,((f=d==null?void 0:d[Nt])==null?void 0:f.z)||0,1e3);o=(s?c.zIndex:0)+(g?p:0)}return u[o]?u[o].push(c):u[o]=[c],l=o>l?o:l,u},{}),i=Object.entries(a).map(([u,c])=>{const s=+u;return{edges:c,level:s,isMaxLevel:s===l}});return i.length===0?bA:i}function EA(t,e,n){const l=vt(T.useCallback(a=>t?a.edges.filter(i=>{const u=e.get(i.source),c=e.get(i.target);return(u==null?void 0:u.width)&&(u==null?void 0:u.height)&&(c==null?void 0:c.width)&&(c==null?void 0:c.height)&&SA({sourcePos:u.positionAbsolute||{x:0,y:0},targetPos:c.positionAbsolute||{x:0,y:0},sourceWidth:u.width,sourceHeight:u.height,targetWidth:c.width,targetHeight:c.height,width:a.width,height:a.height,transform:a.transform})}):a.edges,[t,e]));return xA(l,e,n)}const _A=({color:t="none",strokeWidth:e=1})=>B.createElement("polyline",{style:{stroke:t,strokeWidth:e},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),wA=({color:t="none",strokeWidth:e=1})=>B.createElement("polyline",{style:{stroke:t,fill:t,strokeWidth:e},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Wm={[us.Arrow]:_A,[us.ArrowClosed]:wA};function AA(t){const e=Lt();return T.useMemo(()=>{var a,i;return Object.prototype.hasOwnProperty.call(Wm,t)?Wm[t]:((i=(a=e.getState()).onError)==null||i.call(a,"009",Cn.error009(t)),null)},[t])}const TA=({id:t,type:e,color:n,width:l=12.5,height:a=12.5,markerUnits:i="strokeWidth",strokeWidth:u,orient:c="auto-start-reverse"})=>{const s=AA(e);return s?B.createElement("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${l}`,markerHeight:`${a}`,viewBox:"-10 -10 20 20",markerUnits:i,orient:c,refX:"0",refY:"0"},B.createElement(s,{color:n,strokeWidth:u})):null},NA=({defaultColor:t,rfId:e})=>n=>{const l=[];return n.edges.reduce((a,i)=>([i.markerStart,i.markerEnd].forEach(u=>{if(u&&typeof u=="object"){const c=Ir(u,e);l.includes(c)||(a.push({id:c,color:u.color||t,...u}),l.push(c))}}),a),[]).sort((a,i)=>a.id.localeCompare(i.id))},Bv=({defaultColor:t,rfId:e})=>{const n=vt(T.useCallback(NA({defaultColor:t,rfId:e}),[t,e]),(l,a)=>!(l.length!==a.length||l.some((i,u)=>i.id!==a[u].id)));return B.createElement("defs",null,n.map(l=>B.createElement(TA,{id:l.id,key:l.id,type:l.type,color:l.color,width:l.width,height:l.height,markerUnits:l.markerUnits,strokeWidth:l.strokeWidth,orient:l.orient})))};Bv.displayName="MarkerDefinitions";var zA=T.memo(Bv);const MA=t=>({nodesConnectable:t.nodesConnectable,edgesFocusable:t.edgesFocusable,edgesUpdatable:t.edgesUpdatable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals,onError:t.onError}),jv=({defaultMarkerColor:t,onlyRenderVisibleElements:e,elevateEdgesOnSelect:n,rfId:l,edgeTypes:a,noPanClassName:i,onEdgeContextMenu:u,onEdgeMouseEnter:c,onEdgeMouseMove:s,onEdgeMouseLeave:o,onEdgeClick:r,onEdgeDoubleClick:f,onReconnect:d,onReconnectStart:h,onReconnectEnd:g,reconnectRadius:p,children:b,disableKeyboardA11y:m})=>{const{edgesFocusable:y,edgesUpdatable:v,elementsSelectable:S,width:_,height:N,connectionMode:w,nodeInternals:H,onError:z}=vt(MA,Xt),L=EA(e,H,n);return _?B.createElement(B.Fragment,null,L.map(({level:R,edges:G,isMaxLevel:V})=>B.createElement("svg",{key:R,style:{zIndex:R},width:_,height:N,className:"react-flow__edges react-flow__container"},V&&B.createElement(zA,{defaultColor:t,rfId:l}),B.createElement("g",null,G.map(x=>{const[C,E,M]=Fm(H.get(x.source)),[U,A,j]=Fm(H.get(x.target));if(!M||!j)return null;let Y=x.type||"default";a[Y]||(z==null||z("011",Cn.error011(Y)),Y="default");const X=a[Y]||a.default,Q=w===Yl.Strict?A.target:(A.target??[]).concat(A.source??[]),Z=km(E.source,x.sourceHandle),K=km(Q,x.targetHandle),P=(Z==null?void 0:Z.position)||$.Bottom,at=(K==null?void 0:K.position)||$.Top,rt=!!(x.focusable||y&&typeof x.focusable>"u"),ct=x.reconnectable||x.updatable,ut=typeof d<"u"&&(ct||v&&typeof ct>"u");if(!Z||!K)return z==null||z("008",Cn.error008(Z,x)),null;const{sourceX:Gt,sourceY:Ht,targetX:te,targetY:Wt}=vA(C,Z,P,U,K,at);return B.createElement(X,{key:x.id,id:x.id,className:Ft([x.className,i]),type:Y,data:x.data,selected:!!x.selected,animated:!!x.animated,hidden:!!x.hidden,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,style:x.style,source:x.source,target:x.target,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerEnd:x.markerEnd,markerStart:x.markerStart,sourceX:Gt,sourceY:Ht,targetX:te,targetY:Wt,sourcePosition:P,targetPosition:at,elementsSelectable:S,onContextMenu:u,onMouseEnter:c,onMouseMove:s,onMouseLeave:o,onClick:r,onEdgeDoubleClick:f,onReconnect:d,onReconnectStart:h,onReconnectEnd:g,reconnectRadius:p,rfId:l,ariaLabel:x.ariaLabel,isFocusable:rt,isReconnectable:ut,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth,disableKeyboardA11y:m})})))),b):null};jv.displayName="EdgeRenderer";var OA=T.memo(jv);const CA=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function RA({children:t}){const e=vt(CA);return B.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:e}},t)}function DA(t){const e=Ad(),n=T.useRef(!1);T.useEffect(()=>{!n.current&&e.viewportInitialized&&t&&(setTimeout(()=>t(e),1),n.current=!0)},[t,e.viewportInitialized])}const UA={[$.Left]:$.Right,[$.Right]:$.Left,[$.Top]:$.Bottom,[$.Bottom]:$.Top},Lv=({nodeId:t,handleType:e,style:n,type:l=Gn.Bezier,CustomComponent:a,connectionStatus:i})=>{var N,w,H;const{fromNode:u,handleId:c,toX:s,toY:o,connectionMode:r}=vt(T.useCallback(z=>({fromNode:z.nodeInternals.get(t),handleId:z.connectionHandleId,toX:(z.connectionPosition.x-z.transform[0])/z.transform[2],toY:(z.connectionPosition.y-z.transform[1])/z.transform[2],connectionMode:z.connectionMode}),[t]),Xt),f=(N=u==null?void 0:u[Nt])==null?void 0:N.handleBounds;let d=f==null?void 0:f[e];if(r===Yl.Loose&&(d=d||(f==null?void 0:f[e==="source"?"target":"source"])),!u||!d)return null;const h=c?d.find(z=>z.id===c):d[0],g=h?h.x+h.width/2:(u.width??0)/2,p=h?h.y+h.height/2:u.height??0,b=(((w=u.positionAbsolute)==null?void 0:w.x)??0)+g,m=(((H=u.positionAbsolute)==null?void 0:H.y)??0)+p,y=h==null?void 0:h.position,v=y?UA[y]:null;if(!y||!v)return null;if(a)return B.createElement(a,{connectionLineType:l,connectionLineStyle:n,fromNode:u,fromHandle:h,fromX:b,fromY:m,toX:s,toY:o,fromPosition:y,toPosition:v,connectionStatus:i});let S="";const _={sourceX:b,sourceY:m,sourcePosition:y,targetX:s,targetY:o,targetPosition:v};return l===Gn.Bezier?[S]=uv(_):l===Gn.Step?[S]=Wr({..._,borderRadius:0}):l===Gn.SmoothStep?[S]=Wr(_):l===Gn.SimpleBezier?[S]=iv(_):S=`M${b},${m} ${s},${o}`,B.createElement("path",{d:S,fill:"none",className:"react-flow__connection-path",style:n})};Lv.displayName="ConnectionLine";const HA=t=>({nodeId:t.connectionNodeId,handleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,connectionStatus:t.connectionStatus,width:t.width,height:t.height});function BA({containerStyle:t,style:e,type:n,component:l}){const{nodeId:a,handleType:i,nodesConnectable:u,width:c,height:s,connectionStatus:o}=vt(HA,Xt);return!(a&&i&&c&&u)?null:B.createElement("svg",{style:t,width:c,height:s,className:"react-flow__edges react-flow__connectionline react-flow__container"},B.createElement("g",{className:Ft(["react-flow__connection",o])},B.createElement(Lv,{nodeId:a,handleType:i,style:e,type:n,CustomComponent:l,connectionStatus:o})))}function Im(t,e){return T.useRef(null),Lt(),T.useMemo(()=>e(t),[t])}const qv=({nodeTypes:t,edgeTypes:e,onMove:n,onMoveStart:l,onMoveEnd:a,onInit:i,onNodeClick:u,onEdgeClick:c,onNodeDoubleClick:s,onEdgeDoubleClick:o,onNodeMouseEnter:r,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:h,onSelectionContextMenu:g,onSelectionStart:p,onSelectionEnd:b,connectionLineType:m,connectionLineStyle:y,connectionLineComponent:v,connectionLineContainerStyle:S,selectionKeyCode:_,selectionOnDrag:N,selectionMode:w,multiSelectionKeyCode:H,panActivationKeyCode:z,zoomActivationKeyCode:L,deleteKeyCode:R,onlyRenderVisibleElements:G,elementsSelectable:V,selectNodesOnDrag:x,defaultViewport:C,translateExtent:E,minZoom:M,maxZoom:U,preventScrolling:A,defaultMarkerColor:j,zoomOnScroll:Y,zoomOnPinch:X,panOnScroll:Q,panOnScrollSpeed:Z,panOnScrollMode:K,zoomOnDoubleClick:P,panOnDrag:at,onPaneClick:rt,onPaneMouseEnter:ct,onPaneMouseMove:ut,onPaneMouseLeave:Gt,onPaneScroll:Ht,onPaneContextMenu:te,onEdgeContextMenu:Wt,onEdgeMouseEnter:zt,onEdgeMouseMove:ye,onEdgeMouseLeave:ht,onReconnect:J,onReconnectStart:ee,onReconnectEnd:un,reconnectRadius:li,noDragClassName:Jl,noWheelClassName:kl,noPanClassName:cn,elevateEdgesOnSelect:Fl,disableKeyboardA11y:fl,nodeOrigin:dl,nodeExtent:Wl,rfId:Il})=>{const ai=Im(t,rA),It=Im(e,pA);return DA(i),B.createElement(sA,{onPaneClick:rt,onPaneMouseEnter:ct,onPaneMouseMove:ut,onPaneMouseLeave:Gt,onPaneContextMenu:te,onPaneScroll:Ht,deleteKeyCode:R,selectionKeyCode:_,selectionOnDrag:N,selectionMode:w,onSelectionStart:p,onSelectionEnd:b,multiSelectionKeyCode:H,panActivationKeyCode:z,zoomActivationKeyCode:L,elementsSelectable:V,onMove:n,onMoveStart:l,onMoveEnd:a,zoomOnScroll:Y,zoomOnPinch:X,zoomOnDoubleClick:P,panOnScroll:Q,panOnScrollSpeed:Z,panOnScrollMode:K,panOnDrag:at,defaultViewport:C,translateExtent:E,minZoom:M,maxZoom:U,onSelectionContextMenu:g,preventScrolling:A,noDragClassName:Jl,noWheelClassName:kl,noPanClassName:cn,disableKeyboardA11y:fl},B.createElement(RA,null,B.createElement(OA,{edgeTypes:It,onEdgeClick:c,onEdgeDoubleClick:o,onlyRenderVisibleElements:G,onEdgeContextMenu:Wt,onEdgeMouseEnter:zt,onEdgeMouseMove:ye,onEdgeMouseLeave:ht,onReconnect:J,onReconnectStart:ee,onReconnectEnd:un,reconnectRadius:li,defaultMarkerColor:j,noPanClassName:cn,elevateEdgesOnSelect:!!Fl,disableKeyboardA11y:fl,rfId:Il},B.createElement(BA,{style:y,type:m,component:v,containerStyle:S})),B.createElement("div",{className:"react-flow__edgelabel-renderer"}),B.createElement(hA,{nodeTypes:ai,onNodeClick:u,onNodeDoubleClick:s,onNodeMouseEnter:r,onNodeMouseMove:f,onNodeMouseLeave:d,onNodeContextMenu:h,selectNodesOnDrag:x,onlyRenderVisibleElements:G,noPanClassName:cn,noDragClassName:Jl,disableKeyboardA11y:fl,nodeOrigin:dl,nodeExtent:Wl,rfId:Il})))};qv.displayName="GraphView";var jA=T.memo(qv);const nf=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Un={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:nf,nodeExtent:nf,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Yl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:d3,isValidConnection:void 0},LA=()=>NE((t,e)=>({...Un,setNodes:n=>{const{nodeInternals:l,nodeOrigin:a,elevateNodesOnSelect:i}=e();t({nodeInternals:Bo(n,l,a,i)})},getNodes:()=>Array.from(e().nodeInternals.values()),setEdges:n=>{const{defaultEdgeOptions:l={}}=e();t({edges:n.map(a=>({...l,...a}))})},setDefaultNodesAndEdges:(n,l)=>{const a=typeof n<"u",i=typeof l<"u",u=a?Bo(n,new Map,e().nodeOrigin,e().elevateNodesOnSelect):new Map;t({nodeInternals:u,edges:i?l:[],hasDefaultNodes:a,hasDefaultEdges:i})},updateNodeDimensions:n=>{const{onNodesChange:l,nodeInternals:a,fitViewOnInit:i,fitViewOnInitDone:u,fitViewOnInitOptions:c,domNode:s,nodeOrigin:o}=e(),r=s==null?void 0:s.querySelector(".react-flow__viewport");if(!r)return;const f=window.getComputedStyle(r),{m22:d}=new window.DOMMatrixReadOnly(f.transform),h=n.reduce((p,b)=>{const m=a.get(b.id);if(m!=null&&m.hidden)a.set(m.id,{...m,[Nt]:{...m[Nt],handleBounds:void 0}});else if(m){const y=pd(b.nodeElement);!!(y.width&&y.height&&(m.width!==y.width||m.height!==y.height||b.forceUpdate))&&(a.set(m.id,{...m,[Nt]:{...m[Nt],handleBounds:{source:$m(".source",b.nodeElement,d,o),target:$m(".target",b.nodeElement,d,o)}},...y}),p.push({id:m.id,type:"dimensions",dimensions:y}))}return p},[]);Av(a,o);const g=u||i&&!u&&Tv(e,{initial:!0,...c});t({nodeInternals:new Map(a),fitViewOnInitDone:g}),(h==null?void 0:h.length)>0&&(l==null||l(h))},updateNodePositions:(n,l=!0,a=!1)=>{const{triggerNodeChanges:i}=e(),u=n.map(c=>{const s={id:c.id,type:"position",dragging:a};return l&&(s.positionAbsolute=c.positionAbsolute,s.position=c.position),s});i(u)},triggerNodeChanges:n=>{const{onNodesChange:l,nodeInternals:a,hasDefaultNodes:i,nodeOrigin:u,getNodes:c,elevateNodesOnSelect:s}=e();if(n!=null&&n.length){if(i){const o=zv(n,c()),r=Bo(o,a,u,s);t({nodeInternals:r})}l==null||l(n)}},addSelectedNodes:n=>{const{multiSelectionActive:l,edges:a,getNodes:i}=e();let u,c=null;l?u=n.map(s=>Ln(s,!0)):(u=ba(i(),n),c=ba(a,[])),Iu({changedNodes:u,changedEdges:c,get:e,set:t})},addSelectedEdges:n=>{const{multiSelectionActive:l,edges:a,getNodes:i}=e();let u,c=null;l?u=n.map(s=>Ln(s,!0)):(u=ba(a,n),c=ba(i(),[])),Iu({changedNodes:c,changedEdges:u,get:e,set:t})},unselectNodesAndEdges:({nodes:n,edges:l}={})=>{const{edges:a,getNodes:i}=e(),u=n||i(),c=l||a,s=u.map(r=>(r.selected=!1,Ln(r.id,!1))),o=c.map(r=>Ln(r.id,!1));Iu({changedNodes:s,changedEdges:o,get:e,set:t})},setMinZoom:n=>{const{d3Zoom:l,maxZoom:a}=e();l==null||l.scaleExtent([n,a]),t({minZoom:n})},setMaxZoom:n=>{const{d3Zoom:l,minZoom:a}=e();l==null||l.scaleExtent([a,n]),t({maxZoom:n})},setTranslateExtent:n=>{var l;(l=e().d3Zoom)==null||l.translateExtent(n),t({translateExtent:n})},resetSelectedElements:()=>{const{edges:n,getNodes:l}=e(),i=l().filter(c=>c.selected).map(c=>Ln(c.id,!1)),u=n.filter(c=>c.selected).map(c=>Ln(c.id,!1));Iu({changedNodes:i,changedEdges:u,get:e,set:t})},setNodeExtent:n=>{const{nodeInternals:l}=e();l.forEach(a=>{a.positionAbsolute=vd(a.position,n)}),t({nodeExtent:n,nodeInternals:new Map(l)})},panBy:n=>{const{transform:l,width:a,height:i,d3Zoom:u,d3Selection:c,translateExtent:s}=e();if(!u||!c||!n.x&&!n.y)return!1;const o=wn.translate(l[0]+n.x,l[1]+n.y).scale(l[2]),r=[[0,0],[a,i]],f=u==null?void 0:u.constrain()(o,r,s);return u.transform(c,f),l[0]!==f.x||l[1]!==f.y||l[2]!==f.k},cancelConnection:()=>t({connectionNodeId:Un.connectionNodeId,connectionHandleId:Un.connectionHandleId,connectionHandleType:Un.connectionHandleType,connectionStatus:Un.connectionStatus,connectionStartHandle:Un.connectionStartHandle,connectionEndHandle:Un.connectionEndHandle}),reset:()=>t({...Un})}),Object.is),Yv=({children:t})=>{const e=T.useRef(null);return e.current||(e.current=LA()),B.createElement(i3,{value:e.current},t)};Yv.displayName="ReactFlowProvider";const Vv=({children:t})=>T.useContext(Ds)?B.createElement(B.Fragment,null,t):B.createElement(Yv,null,t);Vv.displayName="ReactFlowWrapper";const qA={input:vv,default:tf,output:bv,group:wd},YA={default:cs,straight:xd,step:bd,smoothstep:Us,simplebezier:Sd},VA=[0,0],XA=[15,15],GA={x:0,y:0,zoom:1},ZA={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Xv=T.forwardRef(({nodes:t,edges:e,defaultNodes:n,defaultEdges:l,className:a,nodeTypes:i=qA,edgeTypes:u=YA,onNodeClick:c,onEdgeClick:s,onInit:o,onMove:r,onMoveStart:f,onMoveEnd:d,onConnect:h,onConnectStart:g,onConnectEnd:p,onClickConnectStart:b,onClickConnectEnd:m,onNodeMouseEnter:y,onNodeMouseMove:v,onNodeMouseLeave:S,onNodeContextMenu:_,onNodeDoubleClick:N,onNodeDragStart:w,onNodeDrag:H,onNodeDragStop:z,onNodesDelete:L,onEdgesDelete:R,onSelectionChange:G,onSelectionDragStart:V,onSelectionDrag:x,onSelectionDragStop:C,onSelectionContextMenu:E,onSelectionStart:M,onSelectionEnd:U,connectionMode:A=Yl.Strict,connectionLineType:j=Gn.Bezier,connectionLineStyle:Y,connectionLineComponent:X,connectionLineContainerStyle:Q,deleteKeyCode:Z="Backspace",selectionKeyCode:K="Shift",selectionOnDrag:P=!1,selectionMode:at=su.Full,panActivationKeyCode:rt="Space",multiSelectionKeyCode:ct=is()?"Meta":"Control",zoomActivationKeyCode:ut=is()?"Meta":"Control",snapToGrid:Gt=!1,snapGrid:Ht=XA,onlyRenderVisibleElements:te=!1,selectNodesOnDrag:Wt=!0,nodesDraggable:zt,nodesConnectable:ye,nodesFocusable:ht,nodeOrigin:J=VA,edgesFocusable:ee,edgesUpdatable:un,elementsSelectable:li,defaultViewport:Jl=GA,minZoom:kl=.5,maxZoom:cn=2,translateExtent:Fl=nf,preventScrolling:fl=!0,nodeExtent:dl,defaultMarkerColor:Wl="#b1b1b7",zoomOnScroll:Il=!0,zoomOnPinch:ai=!0,panOnScroll:It=!1,panOnScrollSpeed:qe=.5,panOnScrollMode:hl=wl.Free,zoomOnDoubleClick:ml=!0,panOnDrag:yl=!0,onPaneClick:sn,onPaneMouseEnter:Je,onPaneMouseMove:ii,onPaneMouseLeave:Xs,onPaneScroll:ui,onPaneContextMenu:Gs,children:Cd,onEdgeContextMenu:gl,onEdgeDoubleClick:b1,onEdgeMouseEnter:x1,onEdgeMouseMove:E1,onEdgeMouseLeave:_1,onEdgeUpdate:w1,onEdgeUpdateStart:A1,onEdgeUpdateEnd:T1,onReconnect:N1,onReconnectStart:z1,onReconnectEnd:M1,reconnectRadius:O1=10,edgeUpdaterRadius:C1=10,onNodesChange:R1,onEdgesChange:D1,noDragClassName:U1="nodrag",noWheelClassName:H1="nowheel",noPanClassName:Rd="nopan",fitView:B1=!1,fitViewOptions:j1,connectOnClick:L1=!0,attributionPosition:q1,proOptions:Y1,defaultEdgeOptions:V1,elevateNodesOnSelect:X1=!0,elevateEdgesOnSelect:G1=!1,disableKeyboardA11y:Dd=!1,autoPanOnConnect:Z1=!0,autoPanOnNodeDrag:$1=!0,connectionRadius:Q1=20,isValidConnection:K1,onError:J1,style:k1,id:Ud,nodeDragThreshold:F1,...W1},I1)=>{const Zs=Ud||"1";return B.createElement("div",{...W1,style:{...k1,...ZA},ref:I1,className:Ft(["react-flow",a]),"data-testid":"rf__wrapper",id:Ud},B.createElement(Vv,null,B.createElement(jA,{onInit:o,onMove:r,onMoveStart:f,onMoveEnd:d,onNodeClick:c,onEdgeClick:s,onNodeMouseEnter:y,onNodeMouseMove:v,onNodeMouseLeave:S,onNodeContextMenu:_,onNodeDoubleClick:N,nodeTypes:i,edgeTypes:u,connectionLineType:j,connectionLineStyle:Y,connectionLineComponent:X,connectionLineContainerStyle:Q,selectionKeyCode:K,selectionOnDrag:P,selectionMode:at,deleteKeyCode:Z,multiSelectionKeyCode:ct,panActivationKeyCode:rt,zoomActivationKeyCode:ut,onlyRenderVisibleElements:te,selectNodesOnDrag:Wt,defaultViewport:Jl,translateExtent:Fl,minZoom:kl,maxZoom:cn,preventScrolling:fl,zoomOnScroll:Il,zoomOnPinch:ai,zoomOnDoubleClick:ml,panOnScroll:It,panOnScrollSpeed:qe,panOnScrollMode:hl,panOnDrag:yl,onPaneClick:sn,onPaneMouseEnter:Je,onPaneMouseMove:ii,onPaneMouseLeave:Xs,onPaneScroll:ui,onPaneContextMenu:Gs,onSelectionContextMenu:E,onSelectionStart:M,onSelectionEnd:U,onEdgeContextMenu:gl,onEdgeDoubleClick:b1,onEdgeMouseEnter:x1,onEdgeMouseMove:E1,onEdgeMouseLeave:_1,onReconnect:N1??w1,onReconnectStart:z1??A1,onReconnectEnd:M1??T1,reconnectRadius:O1??C1,defaultMarkerColor:Wl,noDragClassName:U1,noWheelClassName:H1,noPanClassName:Rd,elevateEdgesOnSelect:G1,rfId:Zs,disableKeyboardA11y:Dd,nodeOrigin:J,nodeExtent:dl}),B.createElement(U3,{nodes:t,edges:e,defaultNodes:n,defaultEdges:l,onConnect:h,onConnectStart:g,onConnectEnd:p,onClickConnectStart:b,onClickConnectEnd:m,nodesDraggable:zt,nodesConnectable:ye,nodesFocusable:ht,edgesFocusable:ee,edgesUpdatable:un,elementsSelectable:li,elevateNodesOnSelect:X1,minZoom:kl,maxZoom:cn,nodeExtent:dl,onNodesChange:R1,onEdgesChange:D1,snapToGrid:Gt,snapGrid:Ht,connectionMode:A,translateExtent:Fl,connectOnClick:L1,defaultEdgeOptions:V1,fitView:B1,fitViewOptions:j1,onNodesDelete:L,onEdgesDelete:R,onNodeDragStart:w,onNodeDrag:H,onNodeDragStop:z,onSelectionDrag:x,onSelectionDragStart:V,onSelectionDragStop:C,noPanClassName:Rd,nodeOrigin:J,rfId:Zs,autoPanOnConnect:Z1,autoPanOnNodeDrag:$1,onError:J1,connectionRadius:Q1,isValidConnection:K1,nodeDragThreshold:F1}),B.createElement(R3,{onSelectionChange:G}),Cd,B.createElement(c3,{proOptions:Y1,position:q1}),B.createElement(q3,{rfId:Zs,disableKeyboardA11y:Dd})))});Xv.displayName="ReactFlow";function Gv(t){return e=>{const[n,l]=T.useState(e),a=T.useCallback(i=>l(u=>t(i,u)),[]);return[n,l,a]}}const $A=Gv(zv),QA=Gv(P3),Zv=({id:t,x:e,y:n,width:l,height:a,style:i,color:u,strokeColor:c,strokeWidth:s,className:o,borderRadius:r,shapeRendering:f,onClick:d,selected:h})=>{const{background:g,backgroundColor:p}=i||{},b=u||g||p;return B.createElement("rect",{className:Ft(["react-flow__minimap-node",{selected:h},o]),x:e,y:n,rx:r,ry:r,width:l,height:a,fill:b,stroke:c,strokeWidth:s,shapeRendering:f,onClick:d?m=>d(m,t):void 0})};Zv.displayName="MiniMapNode";var KA=T.memo(Zv);const JA=t=>t.nodeOrigin,kA=t=>t.getNodes().filter(e=>!e.hidden&&e.width&&e.height),Yo=t=>t instanceof Function?t:()=>t;function FA({nodeStrokeColor:t="transparent",nodeColor:e="#e2e2e2",nodeClassName:n="",nodeBorderRadius:l=5,nodeStrokeWidth:a=2,nodeComponent:i=KA,onClick:u}){const c=vt(kA,Xt),s=vt(JA),o=Yo(e),r=Yo(t),f=Yo(n),d=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return B.createElement(B.Fragment,null,c.map(h=>{const{x:g,y:p}=Rl(h,s).positionAbsolute;return B.createElement(i,{key:h.id,x:g,y:p,width:h.width,height:h.height,style:h.style,selected:h.selected,className:f(h),color:o(h),borderRadius:l,strokeColor:r(h),strokeWidth:a,shapeRendering:d,onClick:u,id:h.id})}))}var WA=T.memo(FA);const IA=200,PA=150,tT=t=>{const e=t.getNodes(),n={x:-t.transform[0]/t.transform[2],y:-t.transform[1]/t.transform[2],width:t.width/t.transform[2],height:t.height/t.transform[2]};return{viewBB:n,boundingRect:e.length>0?r3(Hs(e,t.nodeOrigin),n):n,rfId:t.rfId}},eT="react-flow__minimap-desc";function $v({style:t,className:e,nodeStrokeColor:n="transparent",nodeColor:l="#e2e2e2",nodeClassName:a="",nodeBorderRadius:i=5,nodeStrokeWidth:u=2,nodeComponent:c,maskColor:s="rgb(240, 240, 240, 0.6)",maskStrokeColor:o="none",maskStrokeWidth:r=1,position:f="bottom-right",onClick:d,onNodeClick:h,pannable:g=!1,zoomable:p=!1,ariaLabel:b="React Flow mini map",inversePan:m=!1,zoomStep:y=10,offsetScale:v=5}){const S=Lt(),_=T.useRef(null),{boundingRect:N,viewBB:w,rfId:H}=vt(tT,Xt),z=(t==null?void 0:t.width)??IA,L=(t==null?void 0:t.height)??PA,R=N.width/z,G=N.height/L,V=Math.max(R,G),x=V*z,C=V*L,E=v*V,M=N.x-(x-N.width)/2-E,U=N.y-(C-N.height)/2-E,A=x+E*2,j=C+E*2,Y=`${eT}-${H}`,X=T.useRef(0);X.current=V,T.useEffect(()=>{if(_.current){const K=Ue(_.current),P=ct=>{const{transform:ut,d3Selection:Gt,d3Zoom:Ht}=S.getState();if(ct.sourceEvent.type!=="wheel"||!Gt||!Ht)return;const te=-ct.sourceEvent.deltaY*(ct.sourceEvent.deltaMode===1?.05:ct.sourceEvent.deltaMode?1:.002)*y,Wt=ut[2]*Math.pow(2,te);Ht.scaleTo(Gt,Wt)},at=ct=>{const{transform:ut,d3Selection:Gt,d3Zoom:Ht,translateExtent:te,width:Wt,height:zt}=S.getState();if(ct.sourceEvent.type!=="mousemove"||!Gt||!Ht)return;const ye=X.current*Math.max(1,ut[2])*(m?-1:1),ht={x:ut[0]-ct.sourceEvent.movementX*ye,y:ut[1]-ct.sourceEvent.movementY*ye},J=[[0,0],[Wt,zt]],ee=wn.translate(ht.x,ht.y).scale(ut[2]),un=Ht.constrain()(ee,J,te);Ht.transform(Gt,un)},rt=kp().on("zoom",g?at:null).on("zoom.wheel",p?P:null);return K.call(rt),()=>{K.on("zoom",null)}}},[g,p,m,y]);const Q=d?K=>{const P=Xe(K);d(K,{x:P[0],y:P[1]})}:void 0,Z=h?(K,P)=>{const at=S.getState().nodeInternals.get(P);h(K,at)}:void 0;return B.createElement(gd,{position:f,style:t,className:Ft(["react-flow__minimap",e]),"data-testid":"rf__minimap"},B.createElement("svg",{width:z,height:L,viewBox:`${M} ${U} ${A} ${j}`,role:"img","aria-labelledby":Y,ref:_,onClick:Q},b&&B.createElement("title",{id:Y},b),B.createElement(WA,{onClick:Z,nodeColor:l,nodeStrokeColor:n,nodeBorderRadius:i,nodeClassName:a,nodeStrokeWidth:u,nodeComponent:c}),B.createElement("path",{className:"react-flow__minimap-mask",d:`M${M-E},${U-E}h${A+E*2}v${j+E*2}h${-A-E*2}z
        M${w.x},${w.y}h${w.width}v${w.height}h${-w.width}z`,fill:s,fillRule:"evenodd",stroke:o,strokeWidth:r,pointerEvents:"none"})))}$v.displayName="MiniMap";var nT=T.memo($v);function lT(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},B.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function aT(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},B.createElement("path",{d:"M0 0h32v4.2H0z"}))}function iT(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},B.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function uT(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},B.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function cT(){return B.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},B.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const Ni=({children:t,className:e,...n})=>B.createElement("button",{type:"button",className:Ft(["react-flow__controls-button",e]),...n},t);Ni.displayName="ControlButton";const sT=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),Qv=({style:t,showZoom:e=!0,showFitView:n=!0,showInteractive:l=!0,fitViewOptions:a,onZoomIn:i,onZoomOut:u,onFitView:c,onInteractiveChange:s,className:o,children:r,position:f="bottom-left"})=>{const d=Lt(),[h,g]=T.useState(!1),{isInteractive:p,minZoomReached:b,maxZoomReached:m}=vt(sT,Xt),{zoomIn:y,zoomOut:v,fitView:S}=Ad();if(T.useEffect(()=>{g(!0)},[]),!h)return null;const _=()=>{y(),i==null||i()},N=()=>{v(),u==null||u()},w=()=>{S(a),c==null||c()},H=()=>{d.setState({nodesDraggable:!p,nodesConnectable:!p,elementsSelectable:!p}),s==null||s(!p)};return B.createElement(gd,{className:Ft(["react-flow__controls",o]),position:f,style:t,"data-testid":"rf__controls"},e&&B.createElement(B.Fragment,null,B.createElement(Ni,{onClick:_,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:m},B.createElement(lT,null)),B.createElement(Ni,{onClick:N,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:b},B.createElement(aT,null))),n&&B.createElement(Ni,{className:"react-flow__controls-fitview",onClick:w,title:"fit view","aria-label":"fit view"},B.createElement(iT,null)),l&&B.createElement(Ni,{className:"react-flow__controls-interactive",onClick:H,title:"toggle interactivity","aria-label":"toggle interactivity"},p?B.createElement(cT,null):B.createElement(uT,null)),r)};Qv.displayName="Controls";var oT=T.memo(Qv),Ze;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Ze||(Ze={}));function rT({color:t,dimensions:e,lineWidth:n}){return B.createElement("path",{stroke:t,strokeWidth:n,d:`M${e[0]/2} 0 V${e[1]} M0 ${e[1]/2} H${e[0]}`})}function fT({color:t,radius:e}){return B.createElement("circle",{cx:e,cy:e,r:e,fill:t})}const dT={[Ze.Dots]:"#91919a",[Ze.Lines]:"#eee",[Ze.Cross]:"#e2e2e2"},hT={[Ze.Dots]:1,[Ze.Lines]:1,[Ze.Cross]:6},mT=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Kv({id:t,variant:e=Ze.Dots,gap:n=20,size:l,lineWidth:a=1,offset:i=2,color:u,style:c,className:s}){const o=T.useRef(null),{transform:r,patternId:f}=vt(mT,Xt),d=u||dT[e],h=l||hT[e],g=e===Ze.Dots,p=e===Ze.Cross,b=Array.isArray(n)?n:[n,n],m=[b[0]*r[2]||1,b[1]*r[2]||1],y=h*r[2],v=p?[y,y]:m,S=g?[y/i,y/i]:[v[0]/i,v[1]/i];return B.createElement("svg",{className:Ft(["react-flow__background",s]),style:{...c,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:o,"data-testid":"rf__background"},B.createElement("pattern",{id:f+t,x:r[0]%m[0],y:r[1]%m[1],width:m[0],height:m[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${S[0]},-${S[1]})`},g?B.createElement(fT,{color:d,radius:y/i}):B.createElement(rT,{dimensions:v,color:d,lineWidth:a})),B.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${f+t})`}))}Kv.displayName="Background";var yT=T.memo(Kv);function an({id:t,title:e,content:n,handles:l,setNodes:a}){const i=()=>a(c=>c.filter(s=>s.id!==t)),u=()=>{a(c=>{var h,g;const s=c.find(p=>p.id===t);if(!s)return c;const o=Ic(),r=Ic(),f=JSON.parse(JSON.stringify(s.data||{}));f.nodeId=r,"image"in f&&(f.image=null),"fileName"in f&&(f.fileName=null),"video"in f&&(f.video=null),"audio"in f&&(f.audio=null);const d={id:o,type:s.type,position:{x:(((h=s.position)==null?void 0:h.x)||0)+150,y:(((g=s.position)==null?void 0:g.y)||0)+150},data:f};return[...c,d]})};return O.jsxs("div",{className:"relative shadow-md bg-white text-dark rounded-md node-card",children:[O.jsxs("div",{className:"d-flex align-items-center justify-content-between gap-3",children:[e||O.jsx("strong",{children:"Node"}),O.jsxs("div",{children:[O.jsx("button",{onClick:u,className:"me-1",title:"Duplicate Node",children:O.jsx("i",{className:"las la-copy text--info"})}),O.jsx("button",{onClick:i,title:"Delete Node",children:O.jsx("i",{className:"las la-trash text--danger"})})]})]}),O.jsx("div",{className:"mt-2",children:n}),l==null?void 0:l.map((c,s)=>O.jsx(Vl,{type:c.type,position:c.position,style:{width:"8px",height:"8px"}},s))]})}function gT({id:t,data:e,setNodes:n}){const l=e.handles||[{type:"target",position:Position.Left}];return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[" ",O.jsx("i",{className:"las la-envelope"})," Text Message"]}),content:O.jsx("textarea",{value:e.message||"",onChange:a=>n(i=>i.map(u=>u.id===t?{...u,data:{...u.data,message:a.target.value}}:u)),className:"form-control form--control w-full",cols:20,rows:3,placeholder:"Type your message here..."}),handles:l})}function Jv(t,e){return function(){return t.apply(e,arguments)}}const{toString:pT}=Object.prototype,{getPrototypeOf:Nd}=Object,{iterator:Bs,toStringTag:kv}=Symbol,js=(t=>e=>{const n=pT.call(e);return t[n]||(t[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Ke=t=>(t=t.toLowerCase(),e=>js(e)===t),Ls=t=>e=>typeof e===t,{isArray:ei}=Array,Qa=Ls("undefined");function Au(t){return t!==null&&!Qa(t)&&t.constructor!==null&&!Qa(t.constructor)&&fe(t.constructor.isBuffer)&&t.constructor.isBuffer(t)}const Fv=Ke("ArrayBuffer");function vT(t){let e;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?e=ArrayBuffer.isView(t):e=t&&t.buffer&&Fv(t.buffer),e}const ST=Ls("string"),fe=Ls("function"),Wv=Ls("number"),Tu=t=>t!==null&&typeof t=="object",bT=t=>t===!0||t===!1,bc=t=>{if(js(t)!=="object")return!1;const e=Nd(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(kv in t)&&!(Bs in t)},xT=t=>{if(!Tu(t)||Au(t))return!1;try{return Object.keys(t).length===0&&Object.getPrototypeOf(t)===Object.prototype}catch{return!1}},ET=Ke("Date"),_T=Ke("File"),wT=Ke("Blob"),AT=Ke("FileList"),TT=t=>Tu(t)&&fe(t.pipe),NT=t=>{let e;return t&&(typeof FormData=="function"&&t instanceof FormData||fe(t.append)&&((e=js(t))==="formdata"||e==="object"&&fe(t.toString)&&t.toString()==="[object FormData]"))},zT=Ke("URLSearchParams"),[MT,OT,CT,RT]=["ReadableStream","Request","Response","Headers"].map(Ke),DT=t=>t.trim?t.trim():t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Nu(t,e,{allOwnKeys:n=!1}={}){if(t===null||typeof t>"u")return;let l,a;if(typeof t!="object"&&(t=[t]),ei(t))for(l=0,a=t.length;l<a;l++)e.call(null,t[l],l,t);else{if(Au(t))return;const i=n?Object.getOwnPropertyNames(t):Object.keys(t),u=i.length;let c;for(l=0;l<u;l++)c=i[l],e.call(null,t[c],c,t)}}function Iv(t,e){if(Au(t))return null;e=e.toLowerCase();const n=Object.keys(t);let l=n.length,a;for(;l-- >0;)if(a=n[l],e===a.toLowerCase())return a;return null}const Al=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Pv=t=>!Qa(t)&&t!==Al;function lf(){const{caseless:t,skipUndefined:e}=Pv(this)&&this||{},n={},l=(a,i)=>{const u=t&&Iv(n,i)||i;bc(n[u])&&bc(a)?n[u]=lf(n[u],a):bc(a)?n[u]=lf({},a):ei(a)?n[u]=a.slice():(!e||!Qa(a))&&(n[u]=a)};for(let a=0,i=arguments.length;a<i;a++)arguments[a]&&Nu(arguments[a],l);return n}const UT=(t,e,n,{allOwnKeys:l}={})=>(Nu(e,(a,i)=>{n&&fe(a)?t[i]=Jv(a,n):t[i]=a},{allOwnKeys:l}),t),HT=t=>(t.charCodeAt(0)===65279&&(t=t.slice(1)),t),BT=(t,e,n,l)=>{t.prototype=Object.create(e.prototype,l),t.prototype.constructor=t,Object.defineProperty(t,"super",{value:e.prototype}),n&&Object.assign(t.prototype,n)},jT=(t,e,n,l)=>{let a,i,u;const c={};if(e=e||{},t==null)return e;do{for(a=Object.getOwnPropertyNames(t),i=a.length;i-- >0;)u=a[i],(!l||l(u,t,e))&&!c[u]&&(e[u]=t[u],c[u]=!0);t=n!==!1&&Nd(t)}while(t&&(!n||n(t,e))&&t!==Object.prototype);return e},LT=(t,e,n)=>{t=String(t),(n===void 0||n>t.length)&&(n=t.length),n-=e.length;const l=t.indexOf(e,n);return l!==-1&&l===n},qT=t=>{if(!t)return null;if(ei(t))return t;let e=t.length;if(!Wv(e))return null;const n=new Array(e);for(;e-- >0;)n[e]=t[e];return n},YT=(t=>e=>t&&e instanceof t)(typeof Uint8Array<"u"&&Nd(Uint8Array)),VT=(t,e)=>{const l=(t&&t[Bs]).call(t);let a;for(;(a=l.next())&&!a.done;){const i=a.value;e.call(t,i[0],i[1])}},XT=(t,e)=>{let n;const l=[];for(;(n=t.exec(e))!==null;)l.push(n);return l},GT=Ke("HTMLFormElement"),ZT=t=>t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,l,a){return l.toUpperCase()+a}),Pm=(({hasOwnProperty:t})=>(e,n)=>t.call(e,n))(Object.prototype),$T=Ke("RegExp"),t1=(t,e)=>{const n=Object.getOwnPropertyDescriptors(t),l={};Nu(n,(a,i)=>{let u;(u=e(a,i,t))!==!1&&(l[i]=u||a)}),Object.defineProperties(t,l)},QT=t=>{t1(t,(e,n)=>{if(fe(t)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const l=t[n];if(fe(l)){if(e.enumerable=!1,"writable"in e){e.writable=!1;return}e.set||(e.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},KT=(t,e)=>{const n={},l=a=>{a.forEach(i=>{n[i]=!0})};return ei(t)?l(t):l(String(t).split(e)),n},JT=()=>{},kT=(t,e)=>t!=null&&Number.isFinite(t=+t)?t:e;function FT(t){return!!(t&&fe(t.append)&&t[kv]==="FormData"&&t[Bs])}const WT=t=>{const e=new Array(10),n=(l,a)=>{if(Tu(l)){if(e.indexOf(l)>=0)return;if(Au(l))return l;if(!("toJSON"in l)){e[a]=l;const i=ei(l)?[]:{};return Nu(l,(u,c)=>{const s=n(u,a+1);!Qa(s)&&(i[c]=s)}),e[a]=void 0,i}}return l};return n(t,0)},IT=Ke("AsyncFunction"),PT=t=>t&&(Tu(t)||fe(t))&&fe(t.then)&&fe(t.catch),e1=((t,e)=>t?setImmediate:e?((n,l)=>(Al.addEventListener("message",({source:a,data:i})=>{a===Al&&i===n&&l.length&&l.shift()()},!1),a=>{l.push(a),Al.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fe(Al.postMessage)),tN=typeof queueMicrotask<"u"?queueMicrotask.bind(Al):typeof process<"u"&&process.nextTick||e1,eN=t=>t!=null&&fe(t[Bs]),D={isArray:ei,isArrayBuffer:Fv,isBuffer:Au,isFormData:NT,isArrayBufferView:vT,isString:ST,isNumber:Wv,isBoolean:bT,isObject:Tu,isPlainObject:bc,isEmptyObject:xT,isReadableStream:MT,isRequest:OT,isResponse:CT,isHeaders:RT,isUndefined:Qa,isDate:ET,isFile:_T,isBlob:wT,isRegExp:$T,isFunction:fe,isStream:TT,isURLSearchParams:zT,isTypedArray:YT,isFileList:AT,forEach:Nu,merge:lf,extend:UT,trim:DT,stripBOM:HT,inherits:BT,toFlatObject:jT,kindOf:js,kindOfTest:Ke,endsWith:LT,toArray:qT,forEachEntry:VT,matchAll:XT,isHTMLForm:GT,hasOwnProperty:Pm,hasOwnProp:Pm,reduceDescriptors:t1,freezeMethods:QT,toObjectSet:KT,toCamelCase:ZT,noop:JT,toFiniteNumber:kT,findKey:Iv,global:Al,isContextDefined:Pv,isSpecCompliantForm:FT,toJSONObject:WT,isAsyncFn:IT,isThenable:PT,setImmediate:e1,asap:tN,isIterable:eN};function W(t,e,n,l,a){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=t,this.name="AxiosError",e&&(this.code=e),n&&(this.config=n),l&&(this.request=l),a&&(this.response=a,this.status=a.status?a.status:null)}D.inherits(W,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:D.toJSONObject(this.config),code:this.code,status:this.status}}});const n1=W.prototype,l1={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(t=>{l1[t]={value:t}});Object.defineProperties(W,l1);Object.defineProperty(n1,"isAxiosError",{value:!0});W.from=(t,e,n,l,a,i)=>{const u=Object.create(n1);D.toFlatObject(t,u,function(r){return r!==Error.prototype},o=>o!=="isAxiosError");const c=t&&t.message?t.message:"Error",s=e==null&&t?t.code:e;return W.call(u,c,s,n,l,a),t&&u.cause==null&&Object.defineProperty(u,"cause",{value:t,configurable:!0}),u.name=t&&t.name||"Error",i&&Object.assign(u,i),u};const nN=null;function af(t){return D.isPlainObject(t)||D.isArray(t)}function a1(t){return D.endsWith(t,"[]")?t.slice(0,-2):t}function t0(t,e,n){return t?t.concat(e).map(function(a,i){return a=a1(a),!n&&i?"["+a+"]":a}).join(n?".":""):e}function lN(t){return D.isArray(t)&&!t.some(af)}const aN=D.toFlatObject(D,{},null,function(e){return/^is[A-Z]/.test(e)});function qs(t,e,n){if(!D.isObject(t))throw new TypeError("target must be an object");e=e||new FormData,n=D.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(p,b){return!D.isUndefined(b[p])});const l=n.metaTokens,a=n.visitor||r,i=n.dots,u=n.indexes,s=(n.Blob||typeof Blob<"u"&&Blob)&&D.isSpecCompliantForm(e);if(!D.isFunction(a))throw new TypeError("visitor must be a function");function o(g){if(g===null)return"";if(D.isDate(g))return g.toISOString();if(D.isBoolean(g))return g.toString();if(!s&&D.isBlob(g))throw new W("Blob is not supported. Use a Buffer instead.");return D.isArrayBuffer(g)||D.isTypedArray(g)?s&&typeof Blob=="function"?new Blob([g]):Buffer.from(g):g}function r(g,p,b){let m=g;if(g&&!b&&typeof g=="object"){if(D.endsWith(p,"{}"))p=l?p:p.slice(0,-2),g=JSON.stringify(g);else if(D.isArray(g)&&lN(g)||(D.isFileList(g)||D.endsWith(p,"[]"))&&(m=D.toArray(g)))return p=a1(p),m.forEach(function(v,S){!(D.isUndefined(v)||v===null)&&e.append(u===!0?t0([p],S,i):u===null?p:p+"[]",o(v))}),!1}return af(g)?!0:(e.append(t0(b,p,i),o(g)),!1)}const f=[],d=Object.assign(aN,{defaultVisitor:r,convertValue:o,isVisitable:af});function h(g,p){if(!D.isUndefined(g)){if(f.indexOf(g)!==-1)throw Error("Circular reference detected in "+p.join("."));f.push(g),D.forEach(g,function(m,y){(!(D.isUndefined(m)||m===null)&&a.call(e,m,D.isString(y)?y.trim():y,p,d))===!0&&h(m,p?p.concat(y):[y])}),f.pop()}}if(!D.isObject(t))throw new TypeError("data must be an object");return h(t),e}function e0(t){const e={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(t).replace(/[!'()~]|%20|%00/g,function(l){return e[l]})}function zd(t,e){this._pairs=[],t&&qs(t,this,e)}const i1=zd.prototype;i1.append=function(e,n){this._pairs.push([e,n])};i1.toString=function(e){const n=e?function(l){return e.call(this,l,e0)}:e0;return this._pairs.map(function(a){return n(a[0])+"="+n(a[1])},"").join("&")};function iN(t){return encodeURIComponent(t).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function u1(t,e,n){if(!e)return t;const l=n&&n.encode||iN;D.isFunction(n)&&(n={serialize:n});const a=n&&n.serialize;let i;if(a?i=a(e,n):i=D.isURLSearchParams(e)?e.toString():new zd(e,n).toString(l),i){const u=t.indexOf("#");u!==-1&&(t=t.slice(0,u)),t+=(t.indexOf("?")===-1?"?":"&")+i}return t}class n0{constructor(){this.handlers=[]}use(e,n,l){return this.handlers.push({fulfilled:e,rejected:n,synchronous:l?l.synchronous:!1,runWhen:l?l.runWhen:null}),this.handlers.length-1}eject(e){this.handlers[e]&&(this.handlers[e]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(e){D.forEach(this.handlers,function(l){l!==null&&e(l)})}}const c1={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},uN=typeof URLSearchParams<"u"?URLSearchParams:zd,cN=typeof FormData<"u"?FormData:null,sN=typeof Blob<"u"?Blob:null,oN={isBrowser:!0,classes:{URLSearchParams:uN,FormData:cN,Blob:sN},protocols:["http","https","file","blob","url","data"]},Md=typeof window<"u"&&typeof document<"u",uf=typeof navigator=="object"&&navigator||void 0,rN=Md&&(!uf||["ReactNative","NativeScript","NS"].indexOf(uf.product)<0),fN=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",dN=Md&&window.location.href||"http://localhost",hN=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Md,hasStandardBrowserEnv:rN,hasStandardBrowserWebWorkerEnv:fN,navigator:uf,origin:dN},Symbol.toStringTag,{value:"Module"})),Pt={...hN,...oN};function mN(t,e){return qs(t,new Pt.classes.URLSearchParams,{visitor:function(n,l,a,i){return Pt.isNode&&D.isBuffer(n)?(this.append(l,n.toString("base64")),!1):i.defaultVisitor.apply(this,arguments)},...e})}function yN(t){return D.matchAll(/\w+|\[(\w*)]/g,t).map(e=>e[0]==="[]"?"":e[1]||e[0])}function gN(t){const e={},n=Object.keys(t);let l;const a=n.length;let i;for(l=0;l<a;l++)i=n[l],e[i]=t[i];return e}function s1(t){function e(n,l,a,i){let u=n[i++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),s=i>=n.length;return u=!u&&D.isArray(a)?a.length:u,s?(D.hasOwnProp(a,u)?a[u]=[a[u],l]:a[u]=l,!c):((!a[u]||!D.isObject(a[u]))&&(a[u]=[]),e(n,l,a[u],i)&&D.isArray(a[u])&&(a[u]=gN(a[u])),!c)}if(D.isFormData(t)&&D.isFunction(t.entries)){const n={};return D.forEachEntry(t,(l,a)=>{e(yN(l),a,n,0)}),n}return null}function pN(t,e,n){if(D.isString(t))try{return(e||JSON.parse)(t),D.trim(t)}catch(l){if(l.name!=="SyntaxError")throw l}return(n||JSON.stringify)(t)}const zu={transitional:c1,adapter:["xhr","http","fetch"],transformRequest:[function(e,n){const l=n.getContentType()||"",a=l.indexOf("application/json")>-1,i=D.isObject(e);if(i&&D.isHTMLForm(e)&&(e=new FormData(e)),D.isFormData(e))return a?JSON.stringify(s1(e)):e;if(D.isArrayBuffer(e)||D.isBuffer(e)||D.isStream(e)||D.isFile(e)||D.isBlob(e)||D.isReadableStream(e))return e;if(D.isArrayBufferView(e))return e.buffer;if(D.isURLSearchParams(e))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),e.toString();let c;if(i){if(l.indexOf("application/x-www-form-urlencoded")>-1)return mN(e,this.formSerializer).toString();if((c=D.isFileList(e))||l.indexOf("multipart/form-data")>-1){const s=this.env&&this.env.FormData;return qs(c?{"files[]":e}:e,s&&new s,this.formSerializer)}}return i||a?(n.setContentType("application/json",!1),pN(e)):e}],transformResponse:[function(e){const n=this.transitional||zu.transitional,l=n&&n.forcedJSONParsing,a=this.responseType==="json";if(D.isResponse(e)||D.isReadableStream(e))return e;if(e&&D.isString(e)&&(l&&!this.responseType||a)){const u=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(e,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?W.from(c,W.ERR_BAD_RESPONSE,this,null,this.response):c}}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Pt.classes.FormData,Blob:Pt.classes.Blob},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};D.forEach(["delete","get","head","post","put","patch"],t=>{zu.headers[t]={}});const vN=D.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),SN=t=>{const e={};let n,l,a;return t&&t.split(`
`).forEach(function(u){a=u.indexOf(":"),n=u.substring(0,a).trim().toLowerCase(),l=u.substring(a+1).trim(),!(!n||e[n]&&vN[n])&&(n==="set-cookie"?e[n]?e[n].push(l):e[n]=[l]:e[n]=e[n]?e[n]+", "+l:l)}),e},l0=Symbol("internals");function Si(t){return t&&String(t).trim().toLowerCase()}function xc(t){return t===!1||t==null?t:D.isArray(t)?t.map(xc):String(t)}function bN(t){const e=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let l;for(;l=n.exec(t);)e[l[1]]=l[2];return e}const xN=t=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());function Vo(t,e,n,l,a){if(D.isFunction(l))return l.call(this,e,n);if(a&&(e=n),!!D.isString(e)){if(D.isString(l))return e.indexOf(l)!==-1;if(D.isRegExp(l))return l.test(e)}}function EN(t){return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(e,n,l)=>n.toUpperCase()+l)}function _N(t,e){const n=D.toCamelCase(" "+e);["get","set","has"].forEach(l=>{Object.defineProperty(t,l+n,{value:function(a,i,u){return this[l].call(this,e,a,i,u)},configurable:!0})})}let de=class{constructor(e){e&&this.set(e)}set(e,n,l){const a=this;function i(c,s,o){const r=Si(s);if(!r)throw new Error("header name must be a non-empty string");const f=D.findKey(a,r);(!f||a[f]===void 0||o===!0||o===void 0&&a[f]!==!1)&&(a[f||s]=xc(c))}const u=(c,s)=>D.forEach(c,(o,r)=>i(o,r,s));if(D.isPlainObject(e)||e instanceof this.constructor)u(e,n);else if(D.isString(e)&&(e=e.trim())&&!xN(e))u(SN(e),n);else if(D.isObject(e)&&D.isIterable(e)){let c={},s,o;for(const r of e){if(!D.isArray(r))throw TypeError("Object iterator must return a key-value pair");c[o=r[0]]=(s=c[o])?D.isArray(s)?[...s,r[1]]:[s,r[1]]:r[1]}u(c,n)}else e!=null&&i(n,e,l);return this}get(e,n){if(e=Si(e),e){const l=D.findKey(this,e);if(l){const a=this[l];if(!n)return a;if(n===!0)return bN(a);if(D.isFunction(n))return n.call(this,a,l);if(D.isRegExp(n))return n.exec(a);throw new TypeError("parser must be boolean|regexp|function")}}}has(e,n){if(e=Si(e),e){const l=D.findKey(this,e);return!!(l&&this[l]!==void 0&&(!n||Vo(this,this[l],l,n)))}return!1}delete(e,n){const l=this;let a=!1;function i(u){if(u=Si(u),u){const c=D.findKey(l,u);c&&(!n||Vo(l,l[c],c,n))&&(delete l[c],a=!0)}}return D.isArray(e)?e.forEach(i):i(e),a}clear(e){const n=Object.keys(this);let l=n.length,a=!1;for(;l--;){const i=n[l];(!e||Vo(this,this[i],i,e,!0))&&(delete this[i],a=!0)}return a}normalize(e){const n=this,l={};return D.forEach(this,(a,i)=>{const u=D.findKey(l,i);if(u){n[u]=xc(a),delete n[i];return}const c=e?EN(i):String(i).trim();c!==i&&delete n[i],n[c]=xc(a),l[c]=!0}),this}concat(...e){return this.constructor.concat(this,...e)}toJSON(e){const n=Object.create(null);return D.forEach(this,(l,a)=>{l!=null&&l!==!1&&(n[a]=e&&D.isArray(l)?l.join(", "):l)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([e,n])=>e+": "+n).join(`
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(e){return e instanceof this?e:new this(e)}static concat(e,...n){const l=new this(e);return n.forEach(a=>l.set(a)),l}static accessor(e){const l=(this[l0]=this[l0]={accessors:{}}).accessors,a=this.prototype;function i(u){const c=Si(u);l[c]||(_N(a,u),l[c]=!0)}return D.isArray(e)?e.forEach(i):i(e),this}};de.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);D.reduceDescriptors(de.prototype,({value:t},e)=>{let n=e[0].toUpperCase()+e.slice(1);return{get:()=>t,set(l){this[n]=l}}});D.freezeMethods(de);function Xo(t,e){const n=this||zu,l=e||n,a=de.from(l.headers);let i=l.data;return D.forEach(t,function(c){i=c.call(n,i,a.normalize(),e?e.status:void 0)}),a.normalize(),i}function o1(t){return!!(t&&t.__CANCEL__)}function ni(t,e,n){W.call(this,t??"canceled",W.ERR_CANCELED,e,n),this.name="CanceledError"}D.inherits(ni,W,{__CANCEL__:!0});function r1(t,e,n){const l=n.config.validateStatus;!n.status||!l||l(n.status)?t(n):e(new W("Request failed with status code "+n.status,[W.ERR_BAD_REQUEST,W.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function wN(t){const e=/^([-+\w]{1,25})(:?\/\/|:)/.exec(t);return e&&e[1]||""}function AN(t,e){t=t||10;const n=new Array(t),l=new Array(t);let a=0,i=0,u;return e=e!==void 0?e:1e3,function(s){const o=Date.now(),r=l[i];u||(u=o),n[a]=s,l[a]=o;let f=i,d=0;for(;f!==a;)d+=n[f++],f=f%t;if(a=(a+1)%t,a===i&&(i=(i+1)%t),o-u<e)return;const h=r&&o-r;return h?Math.round(d*1e3/h):void 0}}function TN(t,e){let n=0,l=1e3/e,a,i;const u=(o,r=Date.now())=>{n=r,a=null,i&&(clearTimeout(i),i=null),t(...o)};return[(...o)=>{const r=Date.now(),f=r-n;f>=l?u(o,r):(a=o,i||(i=setTimeout(()=>{i=null,u(a)},l-f)))},()=>a&&u(a)]}const ss=(t,e,n=3)=>{let l=0;const a=AN(50,250);return TN(i=>{const u=i.loaded,c=i.lengthComputable?i.total:void 0,s=u-l,o=a(s),r=u<=c;l=u;const f={loaded:u,total:c,progress:c?u/c:void 0,bytes:s,rate:o||void 0,estimated:o&&c&&r?(c-u)/o:void 0,event:i,lengthComputable:c!=null,[e?"download":"upload"]:!0};t(f)},n)},a0=(t,e)=>{const n=t!=null;return[l=>e[0]({lengthComputable:n,total:t,loaded:l}),e[1]]},i0=t=>(...e)=>D.asap(()=>t(...e)),NN=Pt.hasStandardBrowserEnv?((t,e)=>n=>(n=new URL(n,Pt.origin),t.protocol===n.protocol&&t.host===n.host&&(e||t.port===n.port)))(new URL(Pt.origin),Pt.navigator&&/(msie|trident)/i.test(Pt.navigator.userAgent)):()=>!0,zN=Pt.hasStandardBrowserEnv?{write(t,e,n,l,a,i,u){if(typeof document>"u")return;const c=[`${t}=${encodeURIComponent(e)}`];D.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),D.isString(l)&&c.push(`path=${l}`),D.isString(a)&&c.push(`domain=${a}`),i===!0&&c.push("secure"),D.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(t){if(typeof document>"u")return null;const e=document.cookie.match(new RegExp("(?:^|; )"+t+"=([^;]*)"));return e?decodeURIComponent(e[1]):null},remove(t){this.write(t,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function MN(t){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(t)}function ON(t,e){return e?t.replace(/\/?\/$/,"")+"/"+e.replace(/^\/+/,""):t}function f1(t,e,n){let l=!MN(e);return t&&(l||n==!1)?ON(t,e):e}const u0=t=>t instanceof de?{...t}:t;function Xl(t,e){e=e||{};const n={};function l(o,r,f,d){return D.isPlainObject(o)&&D.isPlainObject(r)?D.merge.call({caseless:d},o,r):D.isPlainObject(r)?D.merge({},r):D.isArray(r)?r.slice():r}function a(o,r,f,d){if(D.isUndefined(r)){if(!D.isUndefined(o))return l(void 0,o,f,d)}else return l(o,r,f,d)}function i(o,r){if(!D.isUndefined(r))return l(void 0,r)}function u(o,r){if(D.isUndefined(r)){if(!D.isUndefined(o))return l(void 0,o)}else return l(void 0,r)}function c(o,r,f){if(f in e)return l(o,r);if(f in t)return l(void 0,o)}const s={url:i,method:i,data:i,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(o,r,f)=>a(u0(o),u0(r),f,!0)};return D.forEach(Object.keys({...t,...e}),function(r){const f=s[r]||a,d=f(t[r],e[r],r);D.isUndefined(d)&&f!==c||(n[r]=d)}),n}const d1=t=>{const e=Xl({},t);let{data:n,withXSRFToken:l,xsrfHeaderName:a,xsrfCookieName:i,headers:u,auth:c}=e;if(e.headers=u=de.from(u),e.url=u1(f1(e.baseURL,e.url,e.allowAbsoluteUrls),t.params,t.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),D.isFormData(n)){if(Pt.hasStandardBrowserEnv||Pt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(D.isFunction(n.getHeaders)){const s=n.getHeaders(),o=["content-type","content-length"];Object.entries(s).forEach(([r,f])=>{o.includes(r.toLowerCase())&&u.set(r,f)})}}if(Pt.hasStandardBrowserEnv&&(l&&D.isFunction(l)&&(l=l(e)),l||l!==!1&&NN(e.url))){const s=a&&i&&zN.read(i);s&&u.set(a,s)}return e},CN=typeof XMLHttpRequest<"u",RN=CN&&function(t){return new Promise(function(n,l){const a=d1(t);let i=a.data;const u=de.from(a.headers).normalize();let{responseType:c,onUploadProgress:s,onDownloadProgress:o}=a,r,f,d,h,g;function p(){h&&h(),g&&g(),a.cancelToken&&a.cancelToken.unsubscribe(r),a.signal&&a.signal.removeEventListener("abort",r)}let b=new XMLHttpRequest;b.open(a.method.toUpperCase(),a.url,!0),b.timeout=a.timeout;function m(){if(!b)return;const v=de.from("getAllResponseHeaders"in b&&b.getAllResponseHeaders()),_={data:!c||c==="text"||c==="json"?b.responseText:b.response,status:b.status,statusText:b.statusText,headers:v,config:t,request:b};r1(function(w){n(w),p()},function(w){l(w),p()},_),b=null}"onloadend"in b?b.onloadend=m:b.onreadystatechange=function(){!b||b.readyState!==4||b.status===0&&!(b.responseURL&&b.responseURL.indexOf("file:")===0)||setTimeout(m)},b.onabort=function(){b&&(l(new W("Request aborted",W.ECONNABORTED,t,b)),b=null)},b.onerror=function(S){const _=S&&S.message?S.message:"Network Error",N=new W(_,W.ERR_NETWORK,t,b);N.event=S||null,l(N),b=null},b.ontimeout=function(){let S=a.timeout?"timeout of "+a.timeout+"ms exceeded":"timeout exceeded";const _=a.transitional||c1;a.timeoutErrorMessage&&(S=a.timeoutErrorMessage),l(new W(S,_.clarifyTimeoutError?W.ETIMEDOUT:W.ECONNABORTED,t,b)),b=null},i===void 0&&u.setContentType(null),"setRequestHeader"in b&&D.forEach(u.toJSON(),function(S,_){b.setRequestHeader(_,S)}),D.isUndefined(a.withCredentials)||(b.withCredentials=!!a.withCredentials),c&&c!=="json"&&(b.responseType=a.responseType),o&&([d,g]=ss(o,!0),b.addEventListener("progress",d)),s&&b.upload&&([f,h]=ss(s),b.upload.addEventListener("progress",f),b.upload.addEventListener("loadend",h)),(a.cancelToken||a.signal)&&(r=v=>{b&&(l(!v||v.type?new ni(null,t,b):v),b.abort(),b=null)},a.cancelToken&&a.cancelToken.subscribe(r),a.signal&&(a.signal.aborted?r():a.signal.addEventListener("abort",r)));const y=wN(a.url);if(y&&Pt.protocols.indexOf(y)===-1){l(new W("Unsupported protocol "+y+":",W.ERR_BAD_REQUEST,t));return}b.send(i||null)})},DN=(t,e)=>{const{length:n}=t=t?t.filter(Boolean):[];if(e||n){let l=new AbortController,a;const i=function(o){if(!a){a=!0,c();const r=o instanceof Error?o:this.reason;l.abort(r instanceof W?r:new ni(r instanceof Error?r.message:r))}};let u=e&&setTimeout(()=>{u=null,i(new W(`timeout ${e} of ms exceeded`,W.ETIMEDOUT))},e);const c=()=>{t&&(u&&clearTimeout(u),u=null,t.forEach(o=>{o.unsubscribe?o.unsubscribe(i):o.removeEventListener("abort",i)}),t=null)};t.forEach(o=>o.addEventListener("abort",i));const{signal:s}=l;return s.unsubscribe=()=>D.asap(c),s}},UN=function*(t,e){let n=t.byteLength;if(n<e){yield t;return}let l=0,a;for(;l<n;)a=l+e,yield t.slice(l,a),l=a},HN=async function*(t,e){for await(const n of BN(t))yield*UN(n,e)},BN=async function*(t){if(t[Symbol.asyncIterator]){yield*t;return}const e=t.getReader();try{for(;;){const{done:n,value:l}=await e.read();if(n)break;yield l}}finally{await e.cancel()}},c0=(t,e,n,l)=>{const a=HN(t,e);let i=0,u,c=s=>{u||(u=!0,l&&l(s))};return new ReadableStream({async pull(s){try{const{done:o,value:r}=await a.next();if(o){c(),s.close();return}let f=r.byteLength;if(n){let d=i+=f;n(d)}s.enqueue(new Uint8Array(r))}catch(o){throw c(o),o}},cancel(s){return c(s),a.return()}},{highWaterMark:2})},s0=64*1024,{isFunction:tc}=D,jN=(({Request:t,Response:e})=>({Request:t,Response:e}))(D.global),{ReadableStream:o0,TextEncoder:r0}=D.global,f0=(t,...e)=>{try{return!!t(...e)}catch{return!1}},LN=t=>{t=D.merge.call({skipUndefined:!0},jN,t);const{fetch:e,Request:n,Response:l}=t,a=e?tc(e):typeof fetch=="function",i=tc(n),u=tc(l);if(!a)return!1;const c=a&&tc(o0),s=a&&(typeof r0=="function"?(g=>p=>g.encode(p))(new r0):async g=>new Uint8Array(await new n(g).arrayBuffer())),o=i&&c&&f0(()=>{let g=!1;const p=new n(Pt.origin,{body:new o0,method:"POST",get duplex(){return g=!0,"half"}}).headers.has("Content-Type");return g&&!p}),r=u&&c&&f0(()=>D.isReadableStream(new l("").body)),f={stream:r&&(g=>g.body)};a&&["text","arrayBuffer","blob","formData","stream"].forEach(g=>{!f[g]&&(f[g]=(p,b)=>{let m=p&&p[g];if(m)return m.call(p);throw new W(`Response type '${g}' is not supported`,W.ERR_NOT_SUPPORT,b)})});const d=async g=>{if(g==null)return 0;if(D.isBlob(g))return g.size;if(D.isSpecCompliantForm(g))return(await new n(Pt.origin,{method:"POST",body:g}).arrayBuffer()).byteLength;if(D.isArrayBufferView(g)||D.isArrayBuffer(g))return g.byteLength;if(D.isURLSearchParams(g)&&(g=g+""),D.isString(g))return(await s(g)).byteLength},h=async(g,p)=>{const b=D.toFiniteNumber(g.getContentLength());return b??d(p)};return async g=>{let{url:p,method:b,data:m,signal:y,cancelToken:v,timeout:S,onDownloadProgress:_,onUploadProgress:N,responseType:w,headers:H,withCredentials:z="same-origin",fetchOptions:L}=d1(g),R=e||fetch;w=w?(w+"").toLowerCase():"text";let G=DN([y,v&&v.toAbortSignal()],S),V=null;const x=G&&G.unsubscribe&&(()=>{G.unsubscribe()});let C;try{if(N&&o&&b!=="get"&&b!=="head"&&(C=await h(H,m))!==0){let Y=new n(p,{method:"POST",body:m,duplex:"half"}),X;if(D.isFormData(m)&&(X=Y.headers.get("content-type"))&&H.setContentType(X),Y.body){const[Q,Z]=a0(C,ss(i0(N)));m=c0(Y.body,s0,Q,Z)}}D.isString(z)||(z=z?"include":"omit");const E=i&&"credentials"in n.prototype,M={...L,signal:G,method:b.toUpperCase(),headers:H.normalize().toJSON(),body:m,duplex:"half",credentials:E?z:void 0};V=i&&new n(p,M);let U=await(i?R(V,L):R(p,M));const A=r&&(w==="stream"||w==="response");if(r&&(_||A&&x)){const Y={};["status","statusText","headers"].forEach(K=>{Y[K]=U[K]});const X=D.toFiniteNumber(U.headers.get("content-length")),[Q,Z]=_&&a0(X,ss(i0(_),!0))||[];U=new l(c0(U.body,s0,Q,()=>{Z&&Z(),x&&x()}),Y)}w=w||"text";let j=await f[D.findKey(f,w)||"text"](U,g);return!A&&x&&x(),await new Promise((Y,X)=>{r1(Y,X,{data:j,headers:de.from(U.headers),status:U.status,statusText:U.statusText,config:g,request:V})})}catch(E){throw x&&x(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new W("Network Error",W.ERR_NETWORK,g,V),{cause:E.cause||E}):W.from(E,E&&E.code,g,V)}}},qN=new Map,h1=t=>{let e=t&&t.env||{};const{fetch:n,Request:l,Response:a}=e,i=[l,a,n];let u=i.length,c=u,s,o,r=qN;for(;c--;)s=i[c],o=r.get(s),o===void 0&&r.set(s,o=c?new Map:LN(e)),r=o;return o};h1();const Od={http:nN,xhr:RN,fetch:{get:h1}};D.forEach(Od,(t,e)=>{if(t){try{Object.defineProperty(t,"name",{value:e})}catch{}Object.defineProperty(t,"adapterName",{value:e})}});const d0=t=>`- ${t}`,YN=t=>D.isFunction(t)||t===null||t===!1;function VN(t,e){t=D.isArray(t)?t:[t];const{length:n}=t;let l,a;const i={};for(let u=0;u<n;u++){l=t[u];let c;if(a=l,!YN(l)&&(a=Od[(c=String(l)).toLowerCase()],a===void 0))throw new W(`Unknown adapter '${c}'`);if(a&&(D.isFunction(a)||(a=a.get(e))))break;i[c||"#"+u]=a}if(!a){const u=Object.entries(i).map(([s,o])=>`adapter ${s} `+(o===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
`+u.map(d0).join(`
`):" "+d0(u[0]):"as no adapter specified";throw new W("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return a}const m1={getAdapter:VN,adapters:Od};function Go(t){if(t.cancelToken&&t.cancelToken.throwIfRequested(),t.signal&&t.signal.aborted)throw new ni(null,t)}function h0(t){return Go(t),t.headers=de.from(t.headers),t.data=Xo.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),m1.getAdapter(t.adapter||zu.adapter,t)(t).then(function(l){return Go(t),l.data=Xo.call(t,t.transformResponse,l),l.headers=de.from(l.headers),l},function(l){return o1(l)||(Go(t),l&&l.response&&(l.response.data=Xo.call(t,t.transformResponse,l.response),l.response.headers=de.from(l.response.headers))),Promise.reject(l)})}const y1="1.13.2",Ys={};["object","boolean","number","function","string","symbol"].forEach((t,e)=>{Ys[t]=function(l){return typeof l===t||"a"+(e<1?"n ":" ")+t}});const m0={};Ys.transitional=function(e,n,l){function a(i,u){return"[Axios v"+y1+"] Transitional option '"+i+"'"+u+(l?". "+l:"")}return(i,u,c)=>{if(e===!1)throw new W(a(u," has been removed"+(n?" in "+n:"")),W.ERR_DEPRECATED);return n&&!m0[u]&&(m0[u]=!0,console.warn(a(u," has been deprecated since v"+n+" and will be removed in the near future"))),e?e(i,u,c):!0}};Ys.spelling=function(e){return(n,l)=>(console.warn(`${l} is likely a misspelling of ${e}`),!0)};function XN(t,e,n){if(typeof t!="object")throw new W("options must be an object",W.ERR_BAD_OPTION_VALUE);const l=Object.keys(t);let a=l.length;for(;a-- >0;){const i=l[a],u=e[i];if(u){const c=t[i],s=c===void 0||u(c,i,t);if(s!==!0)throw new W("option "+i+" must be "+s,W.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new W("Unknown option "+i,W.ERR_BAD_OPTION)}}const Ec={assertOptions:XN,validators:Ys},ke=Ec.validators;let Dl=class{constructor(e){this.defaults=e||{},this.interceptors={request:new n0,response:new n0}}async request(e,n){try{return await this._request(e,n)}catch(l){if(l instanceof Error){let a={};Error.captureStackTrace?Error.captureStackTrace(a):a=new Error;const i=a.stack?a.stack.replace(/^.+\n/,""):"";try{l.stack?i&&!String(l.stack).endsWith(i.replace(/^.+\n.+\n/,""))&&(l.stack+=`
`+i):l.stack=i}catch{}}throw l}}_request(e,n){typeof e=="string"?(n=n||{},n.url=e):n=e||{},n=Xl(this.defaults,n);const{transitional:l,paramsSerializer:a,headers:i}=n;l!==void 0&&Ec.assertOptions(l,{silentJSONParsing:ke.transitional(ke.boolean),forcedJSONParsing:ke.transitional(ke.boolean),clarifyTimeoutError:ke.transitional(ke.boolean)},!1),a!=null&&(D.isFunction(a)?n.paramsSerializer={serialize:a}:Ec.assertOptions(a,{encode:ke.function,serialize:ke.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Ec.assertOptions(n,{baseUrl:ke.spelling("baseURL"),withXsrfToken:ke.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=i&&D.merge(i.common,i[n.method]);i&&D.forEach(["delete","get","head","post","put","patch","common"],g=>{delete i[g]}),n.headers=de.concat(u,i);const c=[];let s=!0;this.interceptors.request.forEach(function(p){typeof p.runWhen=="function"&&p.runWhen(n)===!1||(s=s&&p.synchronous,c.unshift(p.fulfilled,p.rejected))});const o=[];this.interceptors.response.forEach(function(p){o.push(p.fulfilled,p.rejected)});let r,f=0,d;if(!s){const g=[h0.bind(this),void 0];for(g.unshift(...c),g.push(...o),d=g.length,r=Promise.resolve(n);f<d;)r=r.then(g[f++],g[f++]);return r}d=c.length;let h=n;for(;f<d;){const g=c[f++],p=c[f++];try{h=g(h)}catch(b){p.call(this,b);break}}try{r=h0.call(this,h)}catch(g){return Promise.reject(g)}for(f=0,d=o.length;f<d;)r=r.then(o[f++],o[f++]);return r}getUri(e){e=Xl(this.defaults,e);const n=f1(e.baseURL,e.url,e.allowAbsoluteUrls);return u1(n,e.params,e.paramsSerializer)}};D.forEach(["delete","get","head","options"],function(e){Dl.prototype[e]=function(n,l){return this.request(Xl(l||{},{method:e,url:n,data:(l||{}).data}))}});D.forEach(["post","put","patch"],function(e){function n(l){return function(i,u,c){return this.request(Xl(c||{},{method:e,headers:l?{"Content-Type":"multipart/form-data"}:{},url:i,data:u}))}}Dl.prototype[e]=n(),Dl.prototype[e+"Form"]=n(!0)});let GN=class g1{constructor(e){if(typeof e!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(i){n=i});const l=this;this.promise.then(a=>{if(!l._listeners)return;let i=l._listeners.length;for(;i-- >0;)l._listeners[i](a);l._listeners=null}),this.promise.then=a=>{let i;const u=new Promise(c=>{l.subscribe(c),i=c}).then(a);return u.cancel=function(){l.unsubscribe(i)},u},e(function(i,u,c){l.reason||(l.reason=new ni(i,u,c),n(l.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]}unsubscribe(e){if(!this._listeners)return;const n=this._listeners.indexOf(e);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const e=new AbortController,n=l=>{e.abort(l)};return this.subscribe(n),e.signal.unsubscribe=()=>this.unsubscribe(n),e.signal}static source(){let e;return{token:new g1(function(a){e=a}),cancel:e}}};function ZN(t){return function(n){return t.apply(null,n)}}function $N(t){return D.isObject(t)&&t.isAxiosError===!0}const cf={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(cf).forEach(([t,e])=>{cf[e]=t});function p1(t){const e=new Dl(t),n=Jv(Dl.prototype.request,e);return D.extend(n,Dl.prototype,e,{allOwnKeys:!0}),D.extend(n,e,null,{allOwnKeys:!0}),n.create=function(a){return p1(Xl(t,a))},n}const _t=p1(zu);_t.Axios=Dl;_t.CanceledError=ni;_t.CancelToken=GN;_t.isCancel=o1;_t.VERSION=y1;_t.toFormData=qs;_t.AxiosError=W;_t.Cancel=_t.CanceledError;_t.all=function(e){return Promise.all(e)};_t.spread=ZN;_t.isAxiosError=$N;_t.mergeConfig=Xl;_t.AxiosHeaders=de;_t.formToJSON=t=>s1(D.isHTMLForm(t)?new FormData(t):t);_t.getAdapter=m1.getAdapter;_t.HttpStatusCode=cf;_t.default=_t;const{Axios:s4,AxiosError:o4,CanceledError:r4,isCancel:f4,CancelToken:d4,VERSION:h4,all:m4,Cancel:y4,isAxiosError:g4,spread:p4,toFormData:v4,AxiosHeaders:S4,HttpStatusCode:b4,formToJSON:x4,getAdapter:E4,mergeConfig:_4}=_t,QN=document.querySelector("meta[name=APP-DOMAIN]").getAttribute("content");async function Vs(t,e,n){const l=new FormData;l.append("node_id",t),l.append("file",e),l.append("type",n);try{const a=await _t.post(`${QN}/user/flow-builder/upload-media`,l,{headers:{"Content-Type":"multipart/form-data"}});if(a.data.status==="error")throw new Error(a.data.message);return a.data.data.mediaPath}catch(a){throw new Error(a.message)}}function KN({id:t,data:e,setNodes:n}){const l=e.handles||[{type:"target",position:$.Left},{type:"source",position:$.Right}],[a,i]=T.useState(e.image||null),[u,c]=T.useState(!1),s=async o=>{const r=o.target.files[0];if(r){c(!0);try{const f=await Vs(t,r,"image"),d=URL.createObjectURL(r);i(d),n(h=>h.map(g=>g.id===t?{...g,data:{...g.data,image:f,fileName:r.name}}:g))}catch(f){notify("error",f.message)}c(!1)}};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-image"})," Send Image"]}),content:O.jsxs("div",{className:"image-node",children:[a?O.jsx("img",{src:a,alt:"Preview"}):O.jsx("span",{style:{color:"#999"},children:u?"Uploading...":"No Image Selected"}),O.jsx("input",{type:"file",accept:"image/*",onChange:s,className:"form-control form--control mt-2",style:{opacity:0,position:"absolute",top:0,left:0,width:"100%",height:"100%",cursor:"pointer"}})]}),handles:l})}function JN({id:t,data:e,setNodes:n}){const l=e.handles||[{type:"target",position:$.Left},{type:"source",position:$.Right}],[a,i]=T.useState(e.video||null),[u,c]=T.useState(!1),s=async o=>{const r=o.target.files[0];if(r){c(!0);try{const f=await Vs(t,r,"video"),d=URL.createObjectURL(r);i(d),n(h=>h.map(g=>g.id===t?{...g,data:{...g.data,video:f,fileName:r.name}}:g))}catch(f){notify("error",f.message)}finally{o.target.value=null}c(!1)}};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-video"})," Send Video"]}),content:O.jsxs("div",{className:"video-node",children:[O.jsx("div",{children:a?O.jsx("video",{src:a,controls:!0}):O.jsx("span",{style:{color:"#999"},children:u?"Uploading...":"No video selected"})}),O.jsx("input",{type:"file",accept:"video/*",onChange:s,className:"form-control form--control mt-2"})]}),handles:l})}function kN({id:t,data:e,setNodes:n}){const l=e.handles||[{type:"target",position:$.Left},{type:"source",position:$.Right}],[a,i]=T.useState(e.documentName||"No document selected"),[u,c]=T.useState(!1),s=async o=>{const r=o.target.files[0];if(r){c(!0);try{const f=await Vs(t,r,"document");i(r.name),n(d=>d.map(h=>h.id===t?{...h,data:{...h.data,document:f,documentName:r.name}}:h))}catch(f){notify("error",f.message)}c(!1)}};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-file-alt"})," Send Document"]}),content:O.jsxs("div",{className:"document-node",children:[O.jsx("div",{children:u?"Uploading...":a}),O.jsx("input",{type:"file",accept:".pdf,.doc,.docx,.xls,.xlsx,.txt",onChange:s,className:"form-control form--control w-full"})]}),handles:l})}function FN({id:t,data:e,setNodes:n}){const l=e.handles||[{type:"target",position:$.Left},{type:"source",position:$.Right}],[a,i]=T.useState(e.audio||{name:"No audio selected",url:null}),[u,c]=T.useState(!1),s=async o=>{const r=o.target.files[0];if(r){c(!0);try{const f=await Vs(t,r,"audio"),d=URL.createObjectURL(r);i({name:r.name,url:d}),n(h=>h.map(g=>g.id===t?{...g,data:{...g.data,audio:{name:r.name,url:f}}}:g))}catch(f){notify("error",f.message)}c(!1)}};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-microphone"})," Send Audio"]}),content:O.jsxs("div",{className:"audio-node",children:[O.jsx("div",{children:a.url?O.jsx("audio",{controls:!0,src:a.url}):O.jsx("span",{style:{color:"#999"},children:u?"Uploading...":"No audio selected"})}),O.jsx("input",{type:"file",accept:"audio/*",onChange:s,className:"form-control form--control w-full"})]}),handles:l})}function WN({id:t,data:e,setNodes:n}){const l=e.handles||[{type:"target",position:$.Left},{type:"source",position:$.Right}],[a,i]=T.useState({latitude:e.latitude||"",longitude:e.longitude||""}),u=(c,s)=>{i(o=>({...o,[c]:s})),n(o=>o.map(r=>r.id===t?{...r,data:{...r.data,[c]:s}}:r))};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[" ",O.jsx("i",{className:"las la-map-marker-alt"})," Send Location"]}),content:O.jsxs("div",{className:"text-sm text-gray-700 space-y-2",children:[O.jsx("input",{type:"text",placeholder:"Latitude",className:"form-control form--control mb-2",value:a.latitude,onChange:c=>u("latitude",c.target.value)}),O.jsx("input",{type:"text",placeholder:"Longitude",className:"form-control form--control",value:a.longitude,onChange:c=>u("longitude",c.target.value)})]}),handles:l})}function IN({id:t,data:e,setNodes:n}){var r;const l=[{type:"target",position:$.Left}],a=document.querySelector("meta[name=APP-DOMAIN]").getAttribute("content"),[i,u]=T.useState([]),[c,s]=T.useState(((r=e.selectedList)==null?void 0:r.id)||"");T.useEffect(()=>{_t.get(`${a}/user/interactive-list/get-list`).then(f=>{const d=f.data.data.lists||[];if(u(d),d.length===0||c)return;const h=d[0];s(h.id.toString()),n(g=>g.map(p=>p.id===t?{...p,data:{...p.data,selectedList:h}}:p))}).catch(f=>console.error("Failed to fetch lists:",f))},[]);const o=f=>{const d=f.target.value;s(d);const h=i.find(g=>g.id.toString()===d);n(g=>g.map(p=>p.id===t?{...p,data:{...p.data,selectedList:h}}:p))};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-list"})," Interactive List"]}),handles:l,content:O.jsx("div",{className:"list-node",children:i.length>0?O.jsx("select",{className:"form-select form--control mb-3",value:c,onChange:o,children:i.map(f=>O.jsx("option",{value:f.id,children:f.name||`List #${f.id}`},f.id))}):O.jsx("span",{className:"no-data",children:"No data found"})})})}function PN({isOpen:t,onClose:e}){const n=t?"show":"",l=[{type:"textMessage",icon:"las la-envelope",label:"Text Message",description:"Send a simple text message to the user."},{type:"sendImage",icon:"las la-image",label:"Send Image",description:"Send an image message to the user."},{type:"sendVideo",icon:"las la-video",label:"Video Message",description:"Send a video file as a message."},{type:"sendDocument",icon:"las la-file-alt",label:"Document Message",description:"Send a document or file to the user."},{type:"sendAudio",icon:"las la-microphone",label:"Audio Message",description:"Send an audio clip or voice message."},{type:"sendList",icon:"las la-list",label:"List Message",description:"Send a structured list message with options."},{type:"sendCtaUrl",icon:"las la-link",label:"URL Message",description:"Send a call-to-action message containing a URL."},{type:"sendTemplate",icon:"las la-envelope-open-text",label:"Message Template",description:"Send a message template to the user."},{type:"sendLocation",icon:"las la-map-marker-alt",label:"Location Message",description:"Share a location pin with the user."},{type:"sendButton",icon:"las la-stream",label:"Button Message",description:"Make conditional choices with a interactive buttons."}];return O.jsxs("div",{className:`flow_sidebar ${n}`,children:[O.jsx("button",{onClick:e,className:"flow_sidebar_close_btn",children:O.jsx("i",{className:"las la-times"})}),O.jsxs("div",{style:{padding:"16px"},children:[O.jsxs("div",{className:"pb-2 border-bottom",children:[O.jsx("h5",{className:"m-0 p-0",children:"Add Node"}),O.jsx("span",{className:"text-muted fs-14",children:"Drag and drop to add node"})]}),l.map(a=>O.jsxs("div",{className:"flow_sidebar_button",draggable:!0,onDragStart:i=>{i.dataTransfer.setData("application/reactFlow",a.type),i.dataTransfer.effectAllowed="move"},children:[O.jsx("div",{className:"icon",children:O.jsx("i",{className:a.icon})}),O.jsxs("div",{className:"content",children:[O.jsx("span",{className:"content-title",children:a.label}),O.jsx("p",{className:"description",children:a.description})]})]},a.type))]})]})}function t4({id:t,data:e,setNodes:n}){T.useEffect(()=>{n(i=>i.map(u=>u.id===t?{...u,data:{...u.data,nodeId:u.data.nodeId||Ic(),trigger:u.data.trigger||"new_message",keyword:u.data.keyword||"",handles:u.data.handles||[{type:"source",position:$.Right}]}}:u))},[t,n]);const l=i=>{const u=i.target.value;n(c=>c.map(s=>s.id===t?{...s,data:{...s.data,trigger:u,keyword:u==="keyword_match"&&s.data.keyword||""}}:s))},a=i=>{const u=i.target.value;n(c=>c.map(s=>s.id===t?{...s,data:{...s.data,keyword:u}}:s))};return O.jsxs("div",{className:"shadow-md bg-white text-dark rounded-md node-card",children:[O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-bolt text-warning"})," Trigger"]}),O.jsx("div",{className:"mt-2 text-sm",children:O.jsxs("select",{value:e.trigger,onChange:l,className:"form-select form--control",children:[O.jsx("option",{value:"new_message",children:"New message"}),O.jsx("option",{value:"keyword_match",children:"Keyword matches"})]})}),e.trigger==="keyword_match"&&O.jsx("div",{className:"mt-2",children:O.jsx("input",{type:"text",value:e.keyword,onChange:a,className:"form-control form--control",placeholder:"Enter keyword..."})}),O.jsx(Vl,{type:"source",position:$.Right,style:{width:"8px",height:"8px"}})]})}function e4({id:t,data:e,setNodes:n}){var r;const l=e.handles||[{type:"target",position:$.Left}],a=document.querySelector("meta[name=APP-DOMAIN]").getAttribute("content"),[i,u]=T.useState([]),[c,s]=T.useState(((r=e.selectedCta)==null?void 0:r.id)||"");T.useEffect(()=>{_t.get(`${a}/user/cta-url/get-list`).then(f=>{const d=f.data.data.ctaUrls||[];if(u(d),d.length==0||c)return;const h=d[0];s(h.id.toString()),n(g=>g.map(p=>p.id==t?{...p,data:{...p.data,selectedCta:h}}:p))}).catch(f=>{console.error("Failed to fetch CTA URLs:",f)})},[]);const o=f=>{const d=f.target.value;s(d);const h=i.find(g=>g.id.toString()===d);n(g=>g.map(p=>p.id===t?{...p,data:{...p.data,selectedCta:h}}:p))};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-link"})," CTA URL"]}),content:O.jsx("div",{children:i.length>0?O.jsx("select",{className:"form-select form--control",value:c,onChange:o,children:i.map(f=>O.jsx("option",{value:f.id,children:f.name},f.id))}):O.jsx("span",{className:"no-data",children:"No data found"})}),handles:l})}function n4({id:t,data:e,setNodes:n}){const l=[{type:"target",position:$.Left}],[a,i]=T.useState(e.body||""),[u,c]=T.useState(e.buttons&&e.buttons.length>0?e.buttons:[{text:"Button_1",target_node_id:null},{text:"Button_2",target_node_id:null}]),[s,o]=T.useState(e.footer||"");T.useEffect(()=>{n(p=>p.map(b=>b.id===t?{...b,data:{...b.data,body:a,buttons:u,footer:s}}:b))},[a,u,s,t,n]);const r=()=>{u.length>=3||c([...u,{text:`Button_${u.length+1}`,target_node_id:null}])},f=p=>{c(u.filter((b,m)=>m!==p))},d=(p,b)=>{if(b.length>20){notify("error","The button label cannot exceed 20 characters.");return}const m=[...u];m[p].text=b,c(m)},h=p=>{if(a.length>1024){notify("error","The button body cannot exceed 1024 characters.");return}i(p)},g=p=>{if(s.length>60){notify("error","The footer text cannot exceed 60 characters.");return}o(p)};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las las la-stream"})," Button Message"]}),content:O.jsxs("div",{style:{minWidth:"280px"},children:[O.jsx("textarea",{className:"form-control form--control mb-2",rows:2,placeholder:"Enter message body...",value:a,maxLength:1024,onChange:p=>h(p.target.value)}),O.jsx("input",{type:"text",className:"form-control form--control mb-3",placeholder:"Enter footer text...",value:s,maxLength:60,onChange:p=>g(p.target.value)}),O.jsxs("div",{className:"text-sm text-gray-700",children:[O.jsx("label",{className:"d-block mb-1",children:"Buttons (max 3)"}),u.map((p,b)=>O.jsxs("div",{className:"d-flex gap-2 mb-2",style:{position:"relative"},children:[O.jsx("input",{type:"text",className:"form-control form--control",placeholder:`Button ${b+1}`,value:p.text,maxLength:20,onChange:m=>d(b,m.target.value)}),O.jsx("button",{className:"btn btn--danger btn--sm",onClick:()=>f(b),children:O.jsx("i",{className:"las la-trash"})}),O.jsx(Vl,{type:"source",id:`button-${b}`,position:$.Right,style:{top:"50%",transform:"translateY(-50%)",right:"-22px",width:"10px",height:"10px"}})]},b)),u.length<3&&O.jsxs("button",{className:"btn btn--primary btn--sm w-100",onClick:r,children:[O.jsx("i",{className:"las la-plus me-1"}),"Add Button"]})]})]}),handles:l})}function l4({id:t,data:e,setNodes:n}){var m;const l=e.handles||[{type:"target",position:$.Left}],a=document.querySelector("meta[name=APP-DOMAIN]").getAttribute("content"),[i,u]=T.useState([]),[c,s]=T.useState(((m=e.selectedTemplate)==null?void 0:m.id)||""),[o,r]=T.useState(e.headerVars||{}),[f,d]=T.useState(e.bodyVars||{});T.useEffect(()=>{const v=new URLSearchParams(window.location.search).get("account");_t.get(`${a}/user/template/get-list?account_id=${v||0}`).then(S=>{const _=S.data.data.templates||[];if(u(_),_.length==0||c)return;const N=_[0];s(N.id.toString()),n(w=>w.map(H=>H.id==t?{...H,data:{...H.data,selectedTemplate:N}}:H))}).catch(S=>{console.error("Failed to fetch templates:",S)})},[]);function h(y){if(!y)return[];const v=y.match(/\{\{\d+\}\}/g);return v?[...new Set(v)]:[]}const g=y=>{var R;const v=y.target.value;s(v);const S=i.find(G=>G.id.toString()==v),_=((R=S==null?void 0:S.header)==null?void 0:R.text)||"",N=(S==null?void 0:S.body)||"",w=h(_),H=h(N),z={};w.forEach(G=>z[G]="");const L={};H.forEach(G=>L[G]=""),r(z),d(L),n(G=>G.map(V=>V.id===t?{...V,data:{...V.data,selectedTemplate:S,headerVars:z,bodyVars:L}}:V))},p=(y,v)=>{r(S=>{const _={...S,[y]:v};return n(N=>N.map(w=>w.id===t?{...w,data:{...w.data,headerVars:_}}:w)),_})},b=(y,v)=>{d(S=>{const _={...S,[y]:v};return n(N=>N.map(w=>w.id===t?{...w,data:{...w.data,bodyVars:_}}:w)),_})};return O.jsx(an,{id:t,setNodes:n,title:O.jsxs("h6",{className:"mb-0",children:[O.jsx("i",{className:"las la-link"})," Send Template"]}),content:O.jsx("div",{children:i.length>0?O.jsxs(O.Fragment,{children:[O.jsx("select",{className:"form-select form--control mb-2",value:c,onChange:g,children:i.map(y=>O.jsx("option",{value:y.id,children:y.name},y.id))}),Object.keys(o).length>0&&O.jsxs("div",{className:"mb-2",children:[O.jsx("h6",{className:"m-0 variable-title",children:"Header Variables"}),Object.keys(o).map(y=>O.jsx("input",{className:"form-control form--control my-1",placeholder:`Value for ${y}`,value:o[y],onChange:v=>p(y,v.target.value)},y))]}),Object.keys(f).length>0&&O.jsxs("div",{children:[O.jsx("h6",{className:"m-0 variable-title",children:"Body Variables"}),Object.keys(f).map(y=>O.jsx("input",{className:"form-control form--control my-1",placeholder:`Value for ${y}`,value:f[y],onChange:v=>b(y,v.target.value)},y))]})]}):O.jsx("span",{className:"no-data",children:"No data found"})}),handles:l})}const a4=window.innerHeight/2-340;var v1="new_message",S1="";try{v1=document.getElementById("flow-builder").dataset.trigger,S1=document.getElementById("flow-builder").dataset.keyword}catch{}const Zo=[{id:"1",type:"triggerNode",position:{x:-700,y:a4},data:{nodeId:"1",trigger:v1,keyword:S1,handles:[{type:"source",position:$.Right}]}}];function i4(){const t=document.getElementById("flow-builder");let e=[],n=[],l="",a=!1,i=null;try{e=JSON.parse(t.dataset.nodes||"[]"),n=JSON.parse(t.dataset.edges||"[]"),l=t.dataset.name||"",i=t.dataset.id||null,e.length&&(a=!0)}catch(R){console.error("Failed to parse existing flow data:",R)}const[u]=T.useState(a),[c]=T.useState(i);e.length&&n.length&&Zo.push(...e);const[s,o,r]=$A(Zo),[f,d,h]=QA(n),[g,p]=T.useState(!1),[b,m]=T.useState(!1),[y,v]=T.useState(l),S=T.useMemo(()=>({triggerNode:R=>O.jsx(t4,{...R,setNodes:o}),textMessage:R=>O.jsx(gT,{...R,setNodes:o}),sendImage:R=>O.jsx(KN,{...R,setNodes:o}),sendVideo:R=>O.jsx(JN,{...R,setNodes:o}),sendDocument:R=>O.jsx(kN,{...R,setNodes:o}),sendAudio:R=>O.jsx(FN,{...R,setNodes:o}),sendLocation:R=>O.jsx(WN,{...R,setNodes:o}),sendCtaUrl:R=>O.jsx(e4,{...R,setNodes:o}),sendList:R=>O.jsx(IN,{...R,setNodes:o}),sendTemplate:R=>O.jsx(l4,{...R,setNodes:o}),sendButton:R=>O.jsx(n4,{...R,setNodes:o})}),[o]),_=T.useCallback(R=>{R.preventDefault(),R.dataTransfer.dropEffect="move"},[]),N=T.useCallback(R=>{R.preventDefault();const G=R.dataTransfer.getData("application/reactflow");if(!G)return;const V=R.currentTarget.getBoundingClientRect(),x={x:R.clientX+window.scrollX-V.right,y:R.clientY+window.scrollY-V.top},E={id:Ic(),type:G,position:x,data:{message:"",handles:[{type:"target",position:$.Left},{type:"source",position:$.Right}]}};o(M=>M.concat(E))},[o]),w=T.useCallback(R=>d(G=>cv({...R,animated:!0},G)),[d]),H=document.querySelector("meta[name=APP-DOMAIN]").getAttribute("content"),z=()=>{m(!0)},L=()=>{if(!y.trim())return notify("error","Please enter a flow name.");const R={nodes:s,edges:f},V=new URLSearchParams(window.location.search).get("account");let x=`${H}/user/flow-builder/store?account_id=${V||0}`;u&&c&&(x=`${H}/user/flow-builder/update/${c}?account_id=${V||0}`),_t.post(x,{data:JSON.stringify(R),name:y}).then(C=>{if(C.data.status=="error")return notify("error",C.data.message);notify("success",C.data.message),m(!1),o(Zo),d([]),setTimeout(()=>{window.location.reload()},500)}).catch(C=>{notify("error",C.message)})};return O.jsxs("div",{style:{display:"flex",height:"85vh",width:"100%"},children:[O.jsxs("div",{style:{flexGrow:1,position:"relative"},children:[O.jsxs(Xv,{nodes:s,edges:f,onNodesChange:r,onEdgesChange:h,onConnect:w,nodeTypes:S,onDragOver:_,onDrop:N,fitView:!0,children:[O.jsx(nT,{}),O.jsx(oT,{}),O.jsx(yT,{})]}),O.jsxs("div",{className:`flow_top_button_wrapper ${g?"sidebar_open":""}`,children:[O.jsx("button",{onClick:z,className:"top_btn","data-bs-toggle":"tooltip","data-bs-placement":"left","data-bs-title":u?"Update Flow":"Save Flow",children:O.jsx("i",{className:"las la-save"})}),O.jsx("button",{onClick:()=>p(!0),className:"top_btn","data-bs-toggle":"tooltip","data-bs-placement":"left","data-bs-title":"Add node as a step",children:O.jsx("i",{className:"las la-plus"})})]})]}),O.jsx(PN,{isOpen:g,onClose:()=>p(!1)}),O.jsx("div",{className:`flow_modal ${b?"show":""}`,children:O.jsxs("div",{children:[O.jsx("h5",{children:"Enter Flow Name"}),O.jsx("div",{className:"form-group",children:O.jsx("input",{type:"text",value:y,onChange:R=>v(R.target.value),placeholder:"Flow Name",autoFocus:!0,className:"form-control form--control"})}),O.jsxs("div",{className:"d-flex gap-2 justify-content-end",children:[O.jsxs("button",{onClick:()=>m(!1),className:"btn btn--dark",children:[O.jsx("i",{className:"las la-times me-2"}),"Cancel"]}),O.jsxs("button",{onClick:L,className:"btn btn--base",children:[O.jsx("i",{className:"lab la-telegram me-2"}),"Save"]})]})]})})]})}document.getElementById("flow-builder")&&Fx.createRoot(document.getElementById("flow-builder")).render(O.jsx(i4,{}));
