makecc 0.2.19 → 0.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,41 @@
1
+ (function(){const a=document.createElement("link").relList;if(a&&a.supports&&a.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))o(s);new MutationObserver(s=>{for(const c of s)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&o(f)}).observe(document,{childList:!0,subtree:!0});function l(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function o(s){if(s.ep)return;s.ep=!0;const c=l(s);fetch(s.href,c)}})();function Xy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Gf={exports:{}},mo={};var cg;function Rw(){if(cg)return mo;cg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(o,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var h in s)h!=="key"&&(c[h]=s[h])}else c=s;return s=c.ref,{$$typeof:t,type:o,key:f,ref:s!==void 0?s:null,props:c}}return mo.Fragment=a,mo.jsx=l,mo.jsxs=l,mo}var ug;function zw(){return ug||(ug=1,Gf.exports=Rw()),Gf.exports}var m=zw(),Zf={exports:{}},ve={};var fg;function Ow(){if(fg)return ve;fg=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),x=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),b=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=b&&R[b]||R["@@iterator"],typeof R=="function"?R:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function k(R,U,W){this.props=R,this.context=U,this.refs=T,this.updater=W||E}k.prototype.isReactComponent={},k.prototype.setState=function(R,U){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,U,"setState")},k.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function A(){}A.prototype=k.prototype;function S(R,U,W){this.props=R,this.context=U,this.refs=T,this.updater=W||E}var C=S.prototype=new A;C.constructor=S,N(C,k.prototype),C.isPureReactComponent=!0;var D=Array.isArray;function z(){}var O={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function G(R,U,W){var te=W.ref;return{$$typeof:t,type:R,key:U,ref:te!==void 0?te:null,props:W}}function ee(R,U){return G(R.type,U,R.props)}function Y(R){return typeof R=="object"&&R!==null&&R.$$typeof===t}function Z(R){var U={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(W){return U[W]})}var ie=/\/+/g;function H(R,U){return typeof R=="object"&&R!==null&&R.key!=null?Z(""+R.key):U.toString(36)}function Q(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(z,z):(R.status="pending",R.then(function(U){R.status==="pending"&&(R.status="fulfilled",R.value=U)},function(U){R.status==="pending"&&(R.status="rejected",R.reason=U)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function M(R,U,W,te,se){var ue=typeof R;(ue==="undefined"||ue==="boolean")&&(R=null);var ce=!1;if(R===null)ce=!0;else switch(ue){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(R.$$typeof){case t:case a:ce=!0;break;case x:return ce=R._init,M(ce(R._payload),U,W,te,se)}}if(ce)return se=se(R),ce=te===""?"."+H(R,0):te,D(se)?(W="",ce!=null&&(W=ce.replace(ie,"$&/")+"/"),M(se,U,W,"",function(Ee){return Ee})):se!=null&&(Y(se)&&(se=ee(se,W+(se.key==null||R&&R.key===se.key?"":(""+se.key).replace(ie,"$&/")+"/")+ce)),U.push(se)),1;ce=0;var re=te===""?".":te+":";if(D(R))for(var fe=0;fe<R.length;fe++)te=R[fe],ue=re+H(te,fe),ce+=M(te,U,W,ue,se);else if(fe=w(R),typeof fe=="function")for(R=fe.call(R),fe=0;!(te=R.next()).done;)te=te.value,ue=re+H(te,fe++),ce+=M(te,U,W,ue,se);else if(ue==="object"){if(typeof R.then=="function")return M(Q(R),U,W,te,se);throw U=String(R),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return ce}function B(R,U,W){if(R==null)return R;var te=[],se=0;return M(R,te,"","",function(ue){return U.call(W,ue,se++)}),te}function V(R){if(R._status===-1){var U=R._result;U=U(),U.then(function(W){(R._status===0||R._status===-1)&&(R._status=1,R._result=W)},function(W){(R._status===0||R._status===-1)&&(R._status=2,R._result=W)}),R._status===-1&&(R._status=0,R._result=U)}if(R._status===1)return R._result.default;throw R._result}var K=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},ne={map:B,forEach:function(R,U,W){B(R,function(){U.apply(this,arguments)},W)},count:function(R){var U=0;return B(R,function(){U++}),U},toArray:function(R){return B(R,function(U){return U})||[]},only:function(R){if(!Y(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return ve.Activity=y,ve.Children=ne,ve.Component=k,ve.Fragment=l,ve.Profiler=s,ve.PureComponent=S,ve.StrictMode=o,ve.Suspense=g,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,ve.__COMPILER_RUNTIME={__proto__:null,c:function(R){return O.H.useMemoCache(R)}},ve.cache=function(R){return function(){return R.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(R,U,W){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var te=N({},R.props),se=R.key;if(U!=null)for(ue in U.key!==void 0&&(se=""+U.key),U)!$.call(U,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&U.ref===void 0||(te[ue]=U[ue]);var ue=arguments.length-2;if(ue===1)te.children=W;else if(1<ue){for(var ce=Array(ue),re=0;re<ue;re++)ce[re]=arguments[re+2];te.children=ce}return G(R.type,se,te)},ve.createContext=function(R){return R={$$typeof:f,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:c,_context:R},R},ve.createElement=function(R,U,W){var te,se={},ue=null;if(U!=null)for(te in U.key!==void 0&&(ue=""+U.key),U)$.call(U,te)&&te!=="key"&&te!=="__self"&&te!=="__source"&&(se[te]=U[te]);var ce=arguments.length-2;if(ce===1)se.children=W;else if(1<ce){for(var re=Array(ce),fe=0;fe<ce;fe++)re[fe]=arguments[fe+2];se.children=re}if(R&&R.defaultProps)for(te in ce=R.defaultProps,ce)se[te]===void 0&&(se[te]=ce[te]);return G(R,ue,se)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(R){return{$$typeof:h,render:R}},ve.isValidElement=Y,ve.lazy=function(R){return{$$typeof:x,_payload:{_status:-1,_result:R},_init:V}},ve.memo=function(R,U){return{$$typeof:p,type:R,compare:U===void 0?null:U}},ve.startTransition=function(R){var U=O.T,W={};O.T=W;try{var te=R(),se=O.S;se!==null&&se(W,te),typeof te=="object"&&te!==null&&typeof te.then=="function"&&te.then(z,K)}catch(ue){K(ue)}finally{U!==null&&W.types!==null&&(U.types=W.types),O.T=U}},ve.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},ve.use=function(R){return O.H.use(R)},ve.useActionState=function(R,U,W){return O.H.useActionState(R,U,W)},ve.useCallback=function(R,U){return O.H.useCallback(R,U)},ve.useContext=function(R){return O.H.useContext(R)},ve.useDebugValue=function(){},ve.useDeferredValue=function(R,U){return O.H.useDeferredValue(R,U)},ve.useEffect=function(R,U){return O.H.useEffect(R,U)},ve.useEffectEvent=function(R){return O.H.useEffectEvent(R)},ve.useId=function(){return O.H.useId()},ve.useImperativeHandle=function(R,U,W){return O.H.useImperativeHandle(R,U,W)},ve.useInsertionEffect=function(R,U){return O.H.useInsertionEffect(R,U)},ve.useLayoutEffect=function(R,U){return O.H.useLayoutEffect(R,U)},ve.useMemo=function(R,U){return O.H.useMemo(R,U)},ve.useOptimistic=function(R,U){return O.H.useOptimistic(R,U)},ve.useReducer=function(R,U,W){return O.H.useReducer(R,U,W)},ve.useRef=function(R){return O.H.useRef(R)},ve.useState=function(R){return O.H.useState(R)},ve.useSyncExternalStore=function(R,U,W){return O.H.useSyncExternalStore(R,U,W)},ve.useTransition=function(){return O.H.useTransition()},ve.version="19.2.3",ve}var dg;function Bo(){return dg||(dg=1,Zf.exports=Ow()),Zf.exports}var j=Bo();const wo=Xy(j);var Qf={exports:{}},go={},Kf={exports:{}},If={};var hg;function Dw(){return hg||(hg=1,(function(t){function a(M,B){var V=M.length;M.push(B);e:for(;0<V;){var K=V-1>>>1,ne=M[K];if(0<s(ne,B))M[K]=B,M[V]=ne,V=K;else break e}}function l(M){return M.length===0?null:M[0]}function o(M){if(M.length===0)return null;var B=M[0],V=M.pop();if(V!==B){M[0]=V;e:for(var K=0,ne=M.length,R=ne>>>1;K<R;){var U=2*(K+1)-1,W=M[U],te=U+1,se=M[te];if(0>s(W,V))te<ne&&0>s(se,W)?(M[K]=se,M[te]=V,K=te):(M[K]=W,M[U]=V,K=U);else if(te<ne&&0>s(se,V))M[K]=se,M[te]=V,K=te;else break e}}return B}function s(M,B){var V=M.sortIndex-B.sortIndex;return V!==0?V:M.id-B.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,h=f.now();t.unstable_now=function(){return f.now()-h}}var g=[],p=[],x=1,y=null,b=3,w=!1,E=!1,N=!1,T=!1,k=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function C(M){for(var B=l(p);B!==null;){if(B.callback===null)o(p);else if(B.startTime<=M)o(p),B.sortIndex=B.expirationTime,a(g,B);else break;B=l(p)}}function D(M){if(N=!1,C(M),!E)if(l(g)!==null)E=!0,z||(z=!0,Z());else{var B=l(p);B!==null&&Q(D,B.startTime-M)}}var z=!1,O=-1,$=5,G=-1;function ee(){return T?!0:!(t.unstable_now()-G<$)}function Y(){if(T=!1,z){var M=t.unstable_now();G=M;var B=!0;try{e:{E=!1,N&&(N=!1,A(O),O=-1),w=!0;var V=b;try{t:{for(C(M),y=l(g);y!==null&&!(y.expirationTime>M&&ee());){var K=y.callback;if(typeof K=="function"){y.callback=null,b=y.priorityLevel;var ne=K(y.expirationTime<=M);if(M=t.unstable_now(),typeof ne=="function"){y.callback=ne,C(M),B=!0;break t}y===l(g)&&o(g),C(M)}else o(g);y=l(g)}if(y!==null)B=!0;else{var R=l(p);R!==null&&Q(D,R.startTime-M),B=!1}}break e}finally{y=null,b=V,w=!1}B=void 0}}finally{B?Z():z=!1}}}var Z;if(typeof S=="function")Z=function(){S(Y)};else if(typeof MessageChannel<"u"){var ie=new MessageChannel,H=ie.port2;ie.port1.onmessage=Y,Z=function(){H.postMessage(null)}}else Z=function(){k(Y,0)};function Q(M,B){O=k(function(){M(t.unstable_now())},B)}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(M){M.callback=null},t.unstable_forceFrameRate=function(M){0>M||125<M?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<M?Math.floor(1e3/M):5},t.unstable_getCurrentPriorityLevel=function(){return b},t.unstable_next=function(M){switch(b){case 1:case 2:case 3:var B=3;break;default:B=b}var V=b;b=B;try{return M()}finally{b=V}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(M,B){switch(M){case 1:case 2:case 3:case 4:case 5:break;default:M=3}var V=b;b=M;try{return B()}finally{b=V}},t.unstable_scheduleCallback=function(M,B,V){var K=t.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?K+V:K):V=K,M){case 1:var ne=-1;break;case 2:ne=250;break;case 5:ne=1073741823;break;case 4:ne=1e4;break;default:ne=5e3}return ne=V+ne,M={id:x++,callback:B,priorityLevel:M,startTime:V,expirationTime:ne,sortIndex:-1},V>K?(M.sortIndex=V,a(p,M),l(g)===null&&M===l(p)&&(N?(A(O),O=-1):N=!0,Q(D,V-K))):(M.sortIndex=ne,a(g,M),E||w||(E=!0,z||(z=!0,Z()))),M},t.unstable_shouldYield=ee,t.unstable_wrapCallback=function(M){var B=b;return function(){var V=b;b=B;try{return M.apply(this,arguments)}finally{b=V}}}})(If)),If}var pg;function Hw(){return pg||(pg=1,Kf.exports=Dw()),Kf.exports}var Ff={exports:{}},xt={};var mg;function Lw(){if(mg)return xt;mg=1;var t=Bo();function a(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var x=2;x<arguments.length;x++)p+="&args[]="+encodeURIComponent(arguments[x])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var o={d:{f:l,r:function(){throw Error(a(522))},D:l,C:l,L:l,m:l,X:l,S:l,M:l},p:0,findDOMNode:null},s=Symbol.for("react.portal");function c(g,p,x){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:g,containerInfo:p,implementation:x}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,xt.createPortal=function(g,p){var x=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(a(299));return c(g,p,null,x)},xt.flushSync=function(g){var p=f.T,x=o.p;try{if(f.T=null,o.p=2,g)return g()}finally{f.T=p,o.p=x,o.d.f()}},xt.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,o.d.C(g,p))},xt.prefetchDNS=function(g){typeof g=="string"&&o.d.D(g)},xt.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var x=p.as,y=h(x,p.crossOrigin),b=typeof p.integrity=="string"?p.integrity:void 0,w=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;x==="style"?o.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:y,integrity:b,fetchPriority:w}):x==="script"&&o.d.X(g,{crossOrigin:y,integrity:b,fetchPriority:w,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},xt.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var x=h(p.as,p.crossOrigin);o.d.M(g,{crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&o.d.M(g)},xt.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var x=p.as,y=h(x,p.crossOrigin);o.d.L(g,x,{crossOrigin:y,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},xt.preloadModule=function(g,p){if(typeof g=="string")if(p){var x=h(p.as,p.crossOrigin);o.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:x,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else o.d.m(g)},xt.requestFormReset=function(g){o.d.r(g)},xt.unstable_batchedUpdates=function(g,p){return g(p)},xt.useFormState=function(g,p,x){return f.H.useFormState(g,p,x)},xt.useFormStatus=function(){return f.H.useHostTransitionStatus()},xt.version="19.2.3",xt}var gg;function Gy(){if(gg)return Ff.exports;gg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Ff.exports=Lw(),Ff.exports}var yg;function Bw(){if(yg)return go;yg=1;var t=Hw(),a=Bo(),l=Gy();function o(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)n+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,i=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(i=n.return),e=n.return;while(e)}return n.tag===3?i:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(o(188))}function p(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(o(188));return n!==e?null:e}for(var i=e,r=n;;){var u=i.return;if(u===null)break;var d=u.alternate;if(d===null){if(r=u.return,r!==null){i=r;continue}break}if(u.child===d.child){for(d=u.child;d;){if(d===i)return g(u),e;if(d===r)return g(u),n;d=d.sibling}throw Error(o(188))}if(i.return!==r.return)i=u,r=d;else{for(var v=!1,_=u.child;_;){if(_===i){v=!0,i=u,r=d;break}if(_===r){v=!0,r=u,i=d;break}_=_.sibling}if(!v){for(_=d.child;_;){if(_===i){v=!0,i=d,r=u;break}if(_===r){v=!0,r=d,i=u;break}_=_.sibling}if(!v)throw Error(o(189))}}if(i.alternate!==r)throw Error(o(190))}if(i.tag!==3)throw Error(o(188));return i.stateNode.current===i?e:n}function x(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=x(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),S=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),D=Symbol.for("react.suspense"),z=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),G=Symbol.for("react.activity"),ee=Symbol.for("react.memo_cache_sentinel"),Y=Symbol.iterator;function Z(e){return e===null||typeof e!="object"?null:(e=Y&&e[Y]||e["@@iterator"],typeof e=="function"?e:null)}var ie=Symbol.for("react.client.reference");function H(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ie?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case k:return"Profiler";case T:return"StrictMode";case D:return"Suspense";case z:return"SuspenseList";case G:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case E:return"Portal";case S:return e.displayName||"Context";case A:return(e._context.displayName||"Context")+".Consumer";case C:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case O:return n=e.displayName||null,n!==null?n:H(e.type)||"Memo";case $:n=e._payload,e=e._init;try{return H(e(n))}catch{}}return null}var Q=Array.isArray,M=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,V={pending:!1,data:null,method:null,action:null},K=[],ne=-1;function R(e){return{current:e}}function U(e){0>ne||(e.current=K[ne],K[ne]=null,ne--)}function W(e,n){ne++,K[ne]=e.current,e.current=n}var te=R(null),se=R(null),ue=R(null),ce=R(null);function re(e,n){switch(W(ue,n),W(se,e),W(te,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?R0(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=R0(n),e=z0(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(te),W(te,e)}function fe(){U(te),U(se),U(ue)}function Ee(e){e.memoizedState!==null&&W(ce,e);var n=te.current,i=z0(n,e.type);n!==i&&(W(se,e),W(te,i))}function we(e){se.current===e&&(U(te),U(se)),ce.current===e&&(U(ce),uo._currentValue=V)}var ge,xe;function Te(e){if(ge===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ge=n&&n[1]||"",xe=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ge+e+xe}var Ue=!1;function He(e,n){if(!e||Ue)return"";Ue=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(n){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(P){var J=P}Reflect.construct(e,[],oe)}else{try{oe.call()}catch(P){J=P}e.call(oe.prototype)}}else{try{throw Error()}catch(P){J=P}(oe=e())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(P){if(P&&J&&typeof P.stack=="string")return[P.stack,J.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=r.DetermineComponentFrameRoot(),v=d[0],_=d[1];if(v&&_){var L=v.split(`
4
+ `),F=_.split(`
5
+ `);for(u=r=0;r<L.length&&!L[r].includes("DetermineComponentFrameRoot");)r++;for(;u<F.length&&!F[u].includes("DetermineComponentFrameRoot");)u++;if(r===L.length||u===F.length)for(r=L.length-1,u=F.length-1;1<=r&&0<=u&&L[r]!==F[u];)u--;for(;1<=r&&0<=u;r--,u--)if(L[r]!==F[u]){if(r!==1||u!==1)do if(r--,u--,0>u||L[r]!==F[u]){var ae=`
6
+ `+L[r].replace(" at new "," at ");return e.displayName&&ae.includes("<anonymous>")&&(ae=ae.replace("<anonymous>",e.displayName)),ae}while(1<=r&&0<=u);break}}}finally{Ue=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Te(i):""}function ut(e,n){switch(e.tag){case 26:case 27:case 5:return Te(e.type);case 16:return Te("Lazy");case 13:return e.child!==n&&n!==null?Te("Suspense Fallback"):Te("Suspense");case 19:return Te("SuspenseList");case 0:case 15:return He(e.type,!1);case 11:return He(e.type.render,!1);case 1:return He(e.type,!0);case 31:return Te("Activity");default:return""}}function Pt(e){try{var n="",i=null;do n+=ut(e,i),i=e,e=e.return;while(e);return n}catch(r){return`
7
+ Error generating stack: `+r.message+`
8
+ `+r.stack}}var Mt=Object.prototype.hasOwnProperty,Wt=t.unstable_scheduleCallback,Nn=t.unstable_cancelCallback,Da=t.unstable_shouldYield,Ha=t.unstable_requestPaint,dt=t.unstable_now,mi=t.unstable_getCurrentPriorityLevel,_n=t.unstable_ImmediatePriority,ta=t.unstable_UserBlockingPriority,La=t.unstable_NormalPriority,Tc=t.unstable_LowPriority,gi=t.unstable_IdlePriority,kc=t.log,jc=t.unstable_setDisableYieldValue,Ba=null,vt=null;function fn(e){if(typeof kc=="function"&&jc(e),vt&&typeof vt.setStrictMode=="function")try{vt.setStrictMode(Ba,e)}catch{}}var bt=Math.clz32?Math.clz32:Rc,Ac=Math.log,Mc=Math.LN2;function Rc(e){return e>>>=0,e===0?32:31-(Ac(e)/Mc|0)|0}var yi=256,xi=262144,vi=4194304;function Cn(e){var n=e&42;if(n!==0)return n;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function bi(e,n,i){var r=e.pendingLanes;if(r===0)return 0;var u=0,d=e.suspendedLanes,v=e.pingedLanes;e=e.warmLanes;var _=r&134217727;return _!==0?(r=_&~d,r!==0?u=Cn(r):(v&=_,v!==0?u=Cn(v):i||(i=_&~e,i!==0&&(u=Cn(i))))):(_=r&~d,_!==0?u=Cn(_):v!==0?u=Cn(v):i||(i=r&~e,i!==0&&(u=Cn(i)))),u===0?0:n!==0&&n!==u&&(n&d)===0&&(d=u&-u,i=n&-n,d>=i||d===32&&(i&4194048)!==0)?n:u}function Ua(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function zc(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 Po(){var e=vi;return vi<<=1,(vi&62914560)===0&&(vi=4194304),e}function wl(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function qa(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Oc(e,n,i,r,u,d){var v=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var _=e.entanglements,L=e.expirationTimes,F=e.hiddenUpdates;for(i=v&~i;0<i;){var ae=31-bt(i),oe=1<<ae;_[ae]=0,L[ae]=-1;var J=F[ae];if(J!==null)for(F[ae]=null,ae=0;ae<J.length;ae++){var P=J[ae];P!==null&&(P.lane&=-536870913)}i&=~oe}r!==0&&Wo(e,r,0),d!==0&&u===0&&e.tag!==0&&(e.suspendedLanes|=d&~(v&~n))}function Wo(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var r=31-bt(n);e.entangledLanes|=n,e.entanglements[r]=e.entanglements[r]|1073741824|i&261930}function er(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var r=31-bt(i),u=1<<r;u&n|e[r]&n&&(e[r]|=n),i&=~u}}function tr(e,n){var i=n&-n;return i=(i&42)!==0?1:Sl(i),(i&(e.suspendedLanes|n))!==0?0:i}function Sl(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function El(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function nr(){var e=B.p;return e!==0?e:(e=window.event,e===void 0?32:ng(e.type))}function ar(e,n){var i=B.p;try{return B.p=e,n()}finally{B.p=i}}var dn=Math.random().toString(36).slice(2),rt="__reactFiber$"+dn,yt="__reactProps$"+dn,Tn="__reactContainer$"+dn,wi="__reactEvents$"+dn,ir="__reactListeners$"+dn,Dc="__reactHandles$"+dn,lr="__reactResources$"+dn,Va="__reactMarker$"+dn;function Nl(e){delete e[rt],delete e[yt],delete e[wi],delete e[ir],delete e[Dc]}function na(e){var n=e[rt];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Tn]||i[rt]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=q0(e);e!==null;){if(i=e[rt])return i;e=q0(e)}return n}e=i,i=e.parentNode}return null}function aa(e){if(e=e[rt]||e[Tn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function ia(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(o(33))}function la(e){var n=e[lr];return n||(n=e[lr]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function et(e){e[Va]=!0}var or=new Set,rr={};function kn(e,n){oa(e,n),oa(e+"Capture",n)}function oa(e,n){for(rr[e]=n,e=0;e<n.length;e++)or.add(n[e])}var Hc=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]*$"),_l={},sr={};function Lc(e){return Mt.call(sr,e)?!0:Mt.call(_l,e)?!1:Hc.test(e)?sr[e]=!0:(_l[e]=!0,!1)}function Si(e,n,i){if(Lc(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var r=n.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function Ei(e,n,i){if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+i)}}function en(e,n,i,r){if(r===null)e.removeAttribute(i);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+r)}}function St(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function cr(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Bc(e,n,i){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var u=r.get,d=r.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return u.call(this)},set:function(v){i=""+v,d.call(this,v)}}),Object.defineProperty(e,n,{enumerable:r.enumerable}),{getValue:function(){return i},setValue:function(v){i=""+v},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Ni(e){if(!e._valueTracker){var n=cr(e)?"checked":"value";e._valueTracker=Bc(e,n,""+e[n])}}function ur(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),r="";return e&&(r=cr(e)?e.checked?"true":"false":e.value),e=r,e!==i?(n.setValue(e),!0):!1}function $a(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Uc=/[\n"\\]/g;function Et(e){return e.replace(Uc,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ya(e,n,i,r,u,d,v,_){e.name="",v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"?e.type=v:e.removeAttribute("type"),n!=null?v==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+St(n)):e.value!==""+St(n)&&(e.value=""+St(n)):v!=="submit"&&v!=="reset"||e.removeAttribute("value"),n!=null?Cl(e,v,St(n)):i!=null?Cl(e,v,St(i)):r!=null&&e.removeAttribute("value"),u==null&&d!=null&&(e.defaultChecked=!!d),u!=null&&(e.checked=u&&typeof u!="function"&&typeof u!="symbol"),_!=null&&typeof _!="function"&&typeof _!="symbol"&&typeof _!="boolean"?e.name=""+St(_):e.removeAttribute("name")}function fr(e,n,i,r,u,d,v,_){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||i!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Ni(e);return}i=i!=null?""+St(i):"",n=n!=null?""+St(n):i,_||n===e.value||(e.value=n),e.defaultValue=n}r=r??u,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=_?e.checked:!!r,e.defaultChecked=!!r,v!=null&&typeof v!="function"&&typeof v!="symbol"&&typeof v!="boolean"&&(e.name=v),Ni(e)}function Cl(e,n,i){n==="number"&&$a(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function jn(e,n,i,r){if(e=e.options,n){n={};for(var u=0;u<i.length;u++)n["$"+i[u]]=!0;for(i=0;i<e.length;i++)u=n.hasOwnProperty("$"+e[i].value),e[i].selected!==u&&(e[i].selected=u),u&&r&&(e[i].defaultSelected=!0)}else{for(i=""+St(i),n=null,u=0;u<e.length;u++){if(e[u].value===i){e[u].selected=!0,r&&(e[u].defaultSelected=!0);return}n!==null||e[u].disabled||(n=e[u])}n!==null&&(n.selected=!0)}}function Th(e,n,i){if(n!=null&&(n=""+St(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+St(i):""}function kh(e,n,i,r){if(n==null){if(r!=null){if(i!=null)throw Error(o(92));if(Q(r)){if(1<r.length)throw Error(o(93));r=r[0]}i=r}i==null&&(i=""),n=i}i=St(n),e.defaultValue=i,r=e.textContent,r===i&&r!==""&&r!==null&&(e.value=r),Ni(e)}function _i(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var T1=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 jh(e,n,i){var r=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?r?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":r?e.setProperty(n,i):typeof i!="number"||i===0||T1.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function Ah(e,n,i){if(n!=null&&typeof n!="object")throw Error(o(62));if(e=e.style,i!=null){for(var r in i)!i.hasOwnProperty(r)||n!=null&&n.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var u in n)r=n[u],n.hasOwnProperty(u)&&i[u]!==r&&jh(e,u,r)}else for(var d in n)n.hasOwnProperty(d)&&jh(e,d,n[d])}function qc(e){if(e.indexOf("-")===-1)return!1;switch(e){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 k1=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"]]),j1=/^[\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 dr(e){return j1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function An(){}var Vc=null;function $c(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ci=null,Ti=null;function Mh(e){var n=aa(e);if(n&&(e=n.stateNode)){var i=e[yt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ya(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),n=i.name,i.type==="radio"&&n!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+Et(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var r=i[n];if(r!==e&&r.form===e.form){var u=r[yt]||null;if(!u)throw Error(o(90));Ya(r,u.value,u.defaultValue,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name)}}for(n=0;n<i.length;n++)r=i[n],r.form===e.form&&ur(r)}break e;case"textarea":Th(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&jn(e,!!i.multiple,n,!1)}}}var Yc=!1;function Rh(e,n,i){if(Yc)return e(n,i);Yc=!0;try{var r=e(n);return r}finally{if(Yc=!1,(Ci!==null||Ti!==null)&&(Wr(),Ci&&(n=Ci,e=Ti,Ti=Ci=null,Mh(n),e)))for(n=0;n<e.length;n++)Mh(e[n])}}function Tl(e,n){var i=e.stateNode;if(i===null)return null;var r=i[yt]||null;if(r===null)return null;i=r[n];e:switch(n){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(o(231,n,typeof i));return i}var Mn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Xc=!1;if(Mn)try{var kl={};Object.defineProperty(kl,"passive",{get:function(){Xc=!0}}),window.addEventListener("test",kl,kl),window.removeEventListener("test",kl,kl)}catch{Xc=!1}var ra=null,Gc=null,hr=null;function zh(){if(hr)return hr;var e,n=Gc,i=n.length,r,u="value"in ra?ra.value:ra.textContent,d=u.length;for(e=0;e<i&&n[e]===u[e];e++);var v=i-e;for(r=1;r<=v&&n[i-r]===u[d-r];r++);return hr=u.slice(e,1<r?1-r:void 0)}function pr(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function mr(){return!0}function Oh(){return!1}function Nt(e){function n(i,r,u,d,v){this._reactName=i,this._targetInst=u,this.type=r,this.nativeEvent=d,this.target=v,this.currentTarget=null;for(var _ in e)e.hasOwnProperty(_)&&(i=e[_],this[_]=i?i(d):d[_]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?mr:Oh,this.isPropagationStopped=Oh,this}return y(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=mr)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=mr)},persist:function(){},isPersistent:mr}),n}var Xa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},gr=Nt(Xa),jl=y({},Xa,{view:0,detail:0}),A1=Nt(jl),Zc,Qc,Al,yr=y({},jl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ic,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Al&&(Al&&e.type==="mousemove"?(Zc=e.screenX-Al.screenX,Qc=e.screenY-Al.screenY):Qc=Zc=0,Al=e),Zc)},movementY:function(e){return"movementY"in e?e.movementY:Qc}}),Dh=Nt(yr),M1=y({},yr,{dataTransfer:0}),R1=Nt(M1),z1=y({},jl,{relatedTarget:0}),Kc=Nt(z1),O1=y({},Xa,{animationName:0,elapsedTime:0,pseudoElement:0}),D1=Nt(O1),H1=y({},Xa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),L1=Nt(H1),B1=y({},Xa,{data:0}),Hh=Nt(B1),U1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},q1={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"},V1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function $1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=V1[e])?!!n[e]:!1}function Ic(){return $1}var Y1=y({},jl,{key:function(e){if(e.key){var n=U1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=pr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?q1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ic,charCode:function(e){return e.type==="keypress"?pr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),X1=Nt(Y1),G1=y({},yr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Lh=Nt(G1),Z1=y({},jl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ic}),Q1=Nt(Z1),K1=y({},Xa,{propertyName:0,elapsedTime:0,pseudoElement:0}),I1=Nt(K1),F1=y({},yr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),J1=Nt(F1),P1=y({},Xa,{newState:0,oldState:0}),W1=Nt(P1),eb=[9,13,27,32],Fc=Mn&&"CompositionEvent"in window,Ml=null;Mn&&"documentMode"in document&&(Ml=document.documentMode);var tb=Mn&&"TextEvent"in window&&!Ml,Bh=Mn&&(!Fc||Ml&&8<Ml&&11>=Ml),Uh=" ",qh=!1;function Vh(e,n){switch(e){case"keyup":return eb.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $h(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ki=!1;function nb(e,n){switch(e){case"compositionend":return $h(n);case"keypress":return n.which!==32?null:(qh=!0,Uh);case"textInput":return e=n.data,e===Uh&&qh?null:e;default:return null}}function ab(e,n){if(ki)return e==="compositionend"||!Fc&&Vh(e,n)?(e=zh(),hr=Gc=ra=null,ki=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return Bh&&n.locale!=="ko"?null:n.data;default:return null}}var ib={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 Yh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!ib[e.type]:n==="textarea"}function Xh(e,n,i,r){Ci?Ti?Ti.push(r):Ti=[r]:Ci=r,n=os(n,"onChange"),0<n.length&&(i=new gr("onChange","change",null,i,r),e.push({event:i,listeners:n}))}var Rl=null,zl=null;function lb(e){C0(e,0)}function xr(e){var n=ia(e);if(ur(n))return e}function Gh(e,n){if(e==="change")return n}var Zh=!1;if(Mn){var Jc;if(Mn){var Pc="oninput"in document;if(!Pc){var Qh=document.createElement("div");Qh.setAttribute("oninput","return;"),Pc=typeof Qh.oninput=="function"}Jc=Pc}else Jc=!1;Zh=Jc&&(!document.documentMode||9<document.documentMode)}function Kh(){Rl&&(Rl.detachEvent("onpropertychange",Ih),zl=Rl=null)}function Ih(e){if(e.propertyName==="value"&&xr(zl)){var n=[];Xh(n,zl,e,$c(e)),Rh(lb,n)}}function ob(e,n,i){e==="focusin"?(Kh(),Rl=n,zl=i,Rl.attachEvent("onpropertychange",Ih)):e==="focusout"&&Kh()}function rb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xr(zl)}function sb(e,n){if(e==="click")return xr(n)}function cb(e,n){if(e==="input"||e==="change")return xr(n)}function ub(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Rt=typeof Object.is=="function"?Object.is:ub;function Ol(e,n){if(Rt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),r=Object.keys(n);if(i.length!==r.length)return!1;for(r=0;r<i.length;r++){var u=i[r];if(!Mt.call(n,u)||!Rt(e[u],n[u]))return!1}return!0}function Fh(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Jh(e,n){var i=Fh(e);e=0;for(var r;i;){if(i.nodeType===3){if(r=e+i.textContent.length,e<=n&&r>=n)return{node:i,offset:n-e};e=r}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Fh(i)}}function Ph(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ph(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Wh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=$a(e.document);n instanceof e.HTMLIFrameElement;){try{var i=typeof n.contentWindow.location.href=="string"}catch{i=!1}if(i)e=n.contentWindow;else break;n=$a(e.document)}return n}function Wc(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var fb=Mn&&"documentMode"in document&&11>=document.documentMode,ji=null,eu=null,Dl=null,tu=!1;function ep(e,n,i){var r=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;tu||ji==null||ji!==$a(r)||(r=ji,"selectionStart"in r&&Wc(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Dl&&Ol(Dl,r)||(Dl=r,r=os(eu,"onSelect"),0<r.length&&(n=new gr("onSelect","select",null,n,i),e.push({event:n,listeners:r}),n.target=ji)))}function Ga(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var Ai={animationend:Ga("Animation","AnimationEnd"),animationiteration:Ga("Animation","AnimationIteration"),animationstart:Ga("Animation","AnimationStart"),transitionrun:Ga("Transition","TransitionRun"),transitionstart:Ga("Transition","TransitionStart"),transitioncancel:Ga("Transition","TransitionCancel"),transitionend:Ga("Transition","TransitionEnd")},nu={},tp={};Mn&&(tp=document.createElement("div").style,"AnimationEvent"in window||(delete Ai.animationend.animation,delete Ai.animationiteration.animation,delete Ai.animationstart.animation),"TransitionEvent"in window||delete Ai.transitionend.transition);function Za(e){if(nu[e])return nu[e];if(!Ai[e])return e;var n=Ai[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in tp)return nu[e]=n[i];return e}var np=Za("animationend"),ap=Za("animationiteration"),ip=Za("animationstart"),db=Za("transitionrun"),hb=Za("transitionstart"),pb=Za("transitioncancel"),lp=Za("transitionend"),op=new Map,au="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(" ");au.push("scrollEnd");function tn(e,n){op.set(e,n),kn(n,[e])}var vr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Vt=[],Mi=0,iu=0;function br(){for(var e=Mi,n=iu=Mi=0;n<e;){var i=Vt[n];Vt[n++]=null;var r=Vt[n];Vt[n++]=null;var u=Vt[n];Vt[n++]=null;var d=Vt[n];if(Vt[n++]=null,r!==null&&u!==null){var v=r.pending;v===null?u.next=u:(u.next=v.next,v.next=u),r.pending=u}d!==0&&rp(i,u,d)}}function wr(e,n,i,r){Vt[Mi++]=e,Vt[Mi++]=n,Vt[Mi++]=i,Vt[Mi++]=r,iu|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function lu(e,n,i,r){return wr(e,n,i,r),Sr(e)}function Qa(e,n){return wr(e,null,null,n),Sr(e)}function rp(e,n,i){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i);for(var u=!1,d=e.return;d!==null;)d.childLanes|=i,r=d.alternate,r!==null&&(r.childLanes|=i),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(u=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,u&&n!==null&&(u=31-bt(i),e=d.hiddenUpdates,r=e[u],r===null?e[u]=[n]:r.push(n),n.lane=i|536870912),d):null}function Sr(e){if(50<ao)throw ao=0,mf=null,Error(o(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Ri={};function mb(e,n,i,r){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function zt(e,n,i,r){return new mb(e,n,i,r)}function ou(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Rn(e,n){var i=e.alternate;return i===null?(i=zt(e.tag,n,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=n,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,n=e.dependencies,i.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function sp(e,n){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,n=i.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Er(e,n,i,r,u,d){var v=0;if(r=e,typeof e=="function")ou(e)&&(v=1);else if(typeof e=="string")v=bw(e,i,te.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case G:return e=zt(31,i,n,u),e.elementType=G,e.lanes=d,e;case N:return Ka(i.children,u,d,n);case T:v=8,u|=24;break;case k:return e=zt(12,i,n,u|2),e.elementType=k,e.lanes=d,e;case D:return e=zt(13,i,n,u),e.elementType=D,e.lanes=d,e;case z:return e=zt(19,i,n,u),e.elementType=z,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case S:v=10;break e;case A:v=9;break e;case C:v=11;break e;case O:v=14;break e;case $:v=16,r=null;break e}v=29,i=Error(o(130,e===null?"null":typeof e,"")),r=null}return n=zt(v,i,n,u),n.elementType=e,n.type=r,n.lanes=d,n}function Ka(e,n,i,r){return e=zt(7,e,r,n),e.lanes=i,e}function ru(e,n,i){return e=zt(6,e,null,n),e.lanes=i,e}function cp(e){var n=zt(18,null,null,0);return n.stateNode=e,n}function su(e,n,i){return n=zt(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var up=new WeakMap;function $t(e,n){if(typeof e=="object"&&e!==null){var i=up.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Pt(n)},up.set(e,n),n)}return{value:e,source:n,stack:Pt(n)}}var zi=[],Oi=0,Nr=null,Hl=0,Yt=[],Xt=0,sa=null,hn=1,pn="";function zn(e,n){zi[Oi++]=Hl,zi[Oi++]=Nr,Nr=e,Hl=n}function fp(e,n,i){Yt[Xt++]=hn,Yt[Xt++]=pn,Yt[Xt++]=sa,sa=e;var r=hn;e=pn;var u=32-bt(r)-1;r&=~(1<<u),i+=1;var d=32-bt(n)+u;if(30<d){var v=u-u%5;d=(r&(1<<v)-1).toString(32),r>>=v,u-=v,hn=1<<32-bt(n)+u|i<<u|r,pn=d+e}else hn=1<<d|i<<u|r,pn=e}function cu(e){e.return!==null&&(zn(e,1),fp(e,1,0))}function uu(e){for(;e===Nr;)Nr=zi[--Oi],zi[Oi]=null,Hl=zi[--Oi],zi[Oi]=null;for(;e===sa;)sa=Yt[--Xt],Yt[Xt]=null,pn=Yt[--Xt],Yt[Xt]=null,hn=Yt[--Xt],Yt[Xt]=null}function dp(e,n){Yt[Xt++]=hn,Yt[Xt++]=pn,Yt[Xt++]=sa,hn=n.id,pn=n.overflow,sa=e}var ht=null,Xe=null,Ae=!1,ca=null,Gt=!1,fu=Error(o(519));function ua(e){var n=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ll($t(n,e)),fu}function hp(e){var n=e.stateNode,i=e.type,r=e.memoizedProps;switch(n[rt]=e,n[yt]=r,i){case"dialog":Ce("cancel",n),Ce("close",n);break;case"iframe":case"object":case"embed":Ce("load",n);break;case"video":case"audio":for(i=0;i<lo.length;i++)Ce(lo[i],n);break;case"source":Ce("error",n);break;case"img":case"image":case"link":Ce("error",n),Ce("load",n);break;case"details":Ce("toggle",n);break;case"input":Ce("invalid",n),fr(n,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ce("invalid",n);break;case"textarea":Ce("invalid",n),kh(n,r.value,r.defaultValue,r.children)}i=r.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||r.suppressHydrationWarning===!0||A0(n.textContent,i)?(r.popover!=null&&(Ce("beforetoggle",n),Ce("toggle",n)),r.onScroll!=null&&Ce("scroll",n),r.onScrollEnd!=null&&Ce("scrollend",n),r.onClick!=null&&(n.onclick=An),n=!0):n=!1,n||ua(e,!0)}function pp(e){for(ht=e.return;ht;)switch(ht.tag){case 5:case 31:case 13:Gt=!1;return;case 27:case 3:Gt=!0;return;default:ht=ht.return}}function Di(e){if(e!==ht)return!1;if(!Ae)return pp(e),Ae=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Af(e.type,e.memoizedProps)),i=!i),i&&Xe&&ua(e),pp(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Xe=U0(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));Xe=U0(e)}else n===27?(n=Xe,Na(e.type)?(e=Df,Df=null,Xe=e):Xe=n):Xe=ht?Qt(e.stateNode.nextSibling):null;return!0}function Ia(){Xe=ht=null,Ae=!1}function du(){var e=ca;return e!==null&&(kt===null?kt=e:kt.push.apply(kt,e),ca=null),e}function Ll(e){ca===null?ca=[e]:ca.push(e)}var hu=R(null),Fa=null,On=null;function fa(e,n,i){W(hu,n._currentValue),n._currentValue=i}function Dn(e){e._currentValue=hu.current,U(hu)}function pu(e,n,i){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===i)break;e=e.return}}function mu(e,n,i,r){var u=e.child;for(u!==null&&(u.return=e);u!==null;){var d=u.dependencies;if(d!==null){var v=u.child;d=d.firstContext;e:for(;d!==null;){var _=d;d=u;for(var L=0;L<n.length;L++)if(_.context===n[L]){d.lanes|=i,_=d.alternate,_!==null&&(_.lanes|=i),pu(d.return,i,e),r||(v=null);break e}d=_.next}}else if(u.tag===18){if(v=u.return,v===null)throw Error(o(341));v.lanes|=i,d=v.alternate,d!==null&&(d.lanes|=i),pu(v,i,e),v=null}else v=u.child;if(v!==null)v.return=u;else for(v=u;v!==null;){if(v===e){v=null;break}if(u=v.sibling,u!==null){u.return=v.return,v=u;break}v=v.return}u=v}}function Hi(e,n,i,r){e=null;for(var u=n,d=!1;u!==null;){if(!d){if((u.flags&524288)!==0)d=!0;else if((u.flags&262144)!==0)break}if(u.tag===10){var v=u.alternate;if(v===null)throw Error(o(387));if(v=v.memoizedProps,v!==null){var _=u.type;Rt(u.pendingProps.value,v.value)||(e!==null?e.push(_):e=[_])}}else if(u===ce.current){if(v=u.alternate,v===null)throw Error(o(387));v.memoizedState.memoizedState!==u.memoizedState.memoizedState&&(e!==null?e.push(uo):e=[uo])}u=u.return}e!==null&&mu(n,e,i,r),n.flags|=262144}function _r(e){for(e=e.firstContext;e!==null;){if(!Rt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ja(e){Fa=e,On=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function pt(e){return mp(Fa,e)}function Cr(e,n){return Fa===null&&Ja(e),mp(e,n)}function mp(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},On===null){if(e===null)throw Error(o(308));On=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else On=On.next=n;return i}var gb=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,r){e.push(r)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},yb=t.unstable_scheduleCallback,xb=t.unstable_NormalPriority,tt={$$typeof:S,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function gu(){return{controller:new gb,data:new Map,refCount:0}}function Bl(e){e.refCount--,e.refCount===0&&yb(xb,function(){e.controller.abort()})}var Ul=null,yu=0,Li=0,Bi=null;function vb(e,n){if(Ul===null){var i=Ul=[];yu=0,Li=wf(),Bi={status:"pending",value:void 0,then:function(r){i.push(r)}}}return yu++,n.then(gp,gp),n}function gp(){if(--yu===0&&Ul!==null){Bi!==null&&(Bi.status="fulfilled");var e=Ul;Ul=null,Li=0,Bi=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function bb(e,n){var i=[],r={status:"pending",value:null,reason:null,then:function(u){i.push(u)}};return e.then(function(){r.status="fulfilled",r.value=n;for(var u=0;u<i.length;u++)(0,i[u])(n)},function(u){for(r.status="rejected",r.reason=u,u=0;u<i.length;u++)(0,i[u])(void 0)}),r}var yp=M.S;M.S=function(e,n){e0=dt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&vb(e,n),yp!==null&&yp(e,n)};var Pa=R(null);function xu(){var e=Pa.current;return e!==null?e:Ye.pooledCache}function Tr(e,n){n===null?W(Pa,Pa.current):W(Pa,n.pool)}function xp(){var e=xu();return e===null?null:{parent:tt._currentValue,pool:e}}var Ui=Error(o(460)),vu=Error(o(474)),kr=Error(o(542)),jr={then:function(){}};function vp(e){return e=e.status,e==="fulfilled"||e==="rejected"}function bp(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(An,An),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Sp(e),e;default:if(typeof n.status=="string")n.then(An,An);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=n,e.status="pending",e.then(function(r){if(n.status==="pending"){var u=n;u.status="fulfilled",u.value=r}},function(r){if(n.status==="pending"){var u=n;u.status="rejected",u.reason=r}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Sp(e),e}throw ei=n,Ui}}function Wa(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(ei=i,Ui):i}}var ei=null;function wp(){if(ei===null)throw Error(o(459));var e=ei;return ei=null,e}function Sp(e){if(e===Ui||e===kr)throw Error(o(483))}var qi=null,ql=0;function Ar(e){var n=ql;return ql+=1,qi===null&&(qi=[]),bp(qi,e,n)}function Vl(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Mr(e,n){throw n.$$typeof===b?Error(o(525)):(e=Object.prototype.toString.call(n),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Ep(e){function n(X,q){if(e){var I=X.deletions;I===null?(X.deletions=[q],X.flags|=16):I.push(q)}}function i(X,q){if(!e)return null;for(;q!==null;)n(X,q),q=q.sibling;return null}function r(X){for(var q=new Map;X!==null;)X.key!==null?q.set(X.key,X):q.set(X.index,X),X=X.sibling;return q}function u(X,q){return X=Rn(X,q),X.index=0,X.sibling=null,X}function d(X,q,I){return X.index=I,e?(I=X.alternate,I!==null?(I=I.index,I<q?(X.flags|=67108866,q):I):(X.flags|=67108866,q)):(X.flags|=1048576,q)}function v(X){return e&&X.alternate===null&&(X.flags|=67108866),X}function _(X,q,I,le){return q===null||q.tag!==6?(q=ru(I,X.mode,le),q.return=X,q):(q=u(q,I),q.return=X,q)}function L(X,q,I,le){var me=I.type;return me===N?ae(X,q,I.props.children,le,I.key):q!==null&&(q.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===$&&Wa(me)===q.type)?(q=u(q,I.props),Vl(q,I),q.return=X,q):(q=Er(I.type,I.key,I.props,null,X.mode,le),Vl(q,I),q.return=X,q)}function F(X,q,I,le){return q===null||q.tag!==4||q.stateNode.containerInfo!==I.containerInfo||q.stateNode.implementation!==I.implementation?(q=su(I,X.mode,le),q.return=X,q):(q=u(q,I.children||[]),q.return=X,q)}function ae(X,q,I,le,me){return q===null||q.tag!==7?(q=Ka(I,X.mode,le,me),q.return=X,q):(q=u(q,I),q.return=X,q)}function oe(X,q,I){if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return q=ru(""+q,X.mode,I),q.return=X,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case w:return I=Er(q.type,q.key,q.props,null,X.mode,I),Vl(I,q),I.return=X,I;case E:return q=su(q,X.mode,I),q.return=X,q;case $:return q=Wa(q),oe(X,q,I)}if(Q(q)||Z(q))return q=Ka(q,X.mode,I,null),q.return=X,q;if(typeof q.then=="function")return oe(X,Ar(q),I);if(q.$$typeof===S)return oe(X,Cr(X,q),I);Mr(X,q)}return null}function J(X,q,I,le){var me=q!==null?q.key:null;if(typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint")return me!==null?null:_(X,q,""+I,le);if(typeof I=="object"&&I!==null){switch(I.$$typeof){case w:return I.key===me?L(X,q,I,le):null;case E:return I.key===me?F(X,q,I,le):null;case $:return I=Wa(I),J(X,q,I,le)}if(Q(I)||Z(I))return me!==null?null:ae(X,q,I,le,null);if(typeof I.then=="function")return J(X,q,Ar(I),le);if(I.$$typeof===S)return J(X,q,Cr(X,I),le);Mr(X,I)}return null}function P(X,q,I,le,me){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return X=X.get(I)||null,_(q,X,""+le,me);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case w:return X=X.get(le.key===null?I:le.key)||null,L(q,X,le,me);case E:return X=X.get(le.key===null?I:le.key)||null,F(q,X,le,me);case $:return le=Wa(le),P(X,q,I,le,me)}if(Q(le)||Z(le))return X=X.get(I)||null,ae(q,X,le,me,null);if(typeof le.then=="function")return P(X,q,I,Ar(le),me);if(le.$$typeof===S)return P(X,q,I,Cr(q,le),me);Mr(q,le)}return null}function de(X,q,I,le){for(var me=null,ze=null,he=q,Ne=q=0,je=null;he!==null&&Ne<I.length;Ne++){he.index>Ne?(je=he,he=null):je=he.sibling;var Oe=J(X,he,I[Ne],le);if(Oe===null){he===null&&(he=je);break}e&&he&&Oe.alternate===null&&n(X,he),q=d(Oe,q,Ne),ze===null?me=Oe:ze.sibling=Oe,ze=Oe,he=je}if(Ne===I.length)return i(X,he),Ae&&zn(X,Ne),me;if(he===null){for(;Ne<I.length;Ne++)he=oe(X,I[Ne],le),he!==null&&(q=d(he,q,Ne),ze===null?me=he:ze.sibling=he,ze=he);return Ae&&zn(X,Ne),me}for(he=r(he);Ne<I.length;Ne++)je=P(he,X,Ne,I[Ne],le),je!==null&&(e&&je.alternate!==null&&he.delete(je.key===null?Ne:je.key),q=d(je,q,Ne),ze===null?me=je:ze.sibling=je,ze=je);return e&&he.forEach(function(ja){return n(X,ja)}),Ae&&zn(X,Ne),me}function ye(X,q,I,le){if(I==null)throw Error(o(151));for(var me=null,ze=null,he=q,Ne=q=0,je=null,Oe=I.next();he!==null&&!Oe.done;Ne++,Oe=I.next()){he.index>Ne?(je=he,he=null):je=he.sibling;var ja=J(X,he,Oe.value,le);if(ja===null){he===null&&(he=je);break}e&&he&&ja.alternate===null&&n(X,he),q=d(ja,q,Ne),ze===null?me=ja:ze.sibling=ja,ze=ja,he=je}if(Oe.done)return i(X,he),Ae&&zn(X,Ne),me;if(he===null){for(;!Oe.done;Ne++,Oe=I.next())Oe=oe(X,Oe.value,le),Oe!==null&&(q=d(Oe,q,Ne),ze===null?me=Oe:ze.sibling=Oe,ze=Oe);return Ae&&zn(X,Ne),me}for(he=r(he);!Oe.done;Ne++,Oe=I.next())Oe=P(he,X,Ne,Oe.value,le),Oe!==null&&(e&&Oe.alternate!==null&&he.delete(Oe.key===null?Ne:Oe.key),q=d(Oe,q,Ne),ze===null?me=Oe:ze.sibling=Oe,ze=Oe);return e&&he.forEach(function(Mw){return n(X,Mw)}),Ae&&zn(X,Ne),me}function $e(X,q,I,le){if(typeof I=="object"&&I!==null&&I.type===N&&I.key===null&&(I=I.props.children),typeof I=="object"&&I!==null){switch(I.$$typeof){case w:e:{for(var me=I.key;q!==null;){if(q.key===me){if(me=I.type,me===N){if(q.tag===7){i(X,q.sibling),le=u(q,I.props.children),le.return=X,X=le;break e}}else if(q.elementType===me||typeof me=="object"&&me!==null&&me.$$typeof===$&&Wa(me)===q.type){i(X,q.sibling),le=u(q,I.props),Vl(le,I),le.return=X,X=le;break e}i(X,q);break}else n(X,q);q=q.sibling}I.type===N?(le=Ka(I.props.children,X.mode,le,I.key),le.return=X,X=le):(le=Er(I.type,I.key,I.props,null,X.mode,le),Vl(le,I),le.return=X,X=le)}return v(X);case E:e:{for(me=I.key;q!==null;){if(q.key===me)if(q.tag===4&&q.stateNode.containerInfo===I.containerInfo&&q.stateNode.implementation===I.implementation){i(X,q.sibling),le=u(q,I.children||[]),le.return=X,X=le;break e}else{i(X,q);break}else n(X,q);q=q.sibling}le=su(I,X.mode,le),le.return=X,X=le}return v(X);case $:return I=Wa(I),$e(X,q,I,le)}if(Q(I))return de(X,q,I,le);if(Z(I)){if(me=Z(I),typeof me!="function")throw Error(o(150));return I=me.call(I),ye(X,q,I,le)}if(typeof I.then=="function")return $e(X,q,Ar(I),le);if(I.$$typeof===S)return $e(X,q,Cr(X,I),le);Mr(X,I)}return typeof I=="string"&&I!==""||typeof I=="number"||typeof I=="bigint"?(I=""+I,q!==null&&q.tag===6?(i(X,q.sibling),le=u(q,I),le.return=X,X=le):(i(X,q),le=ru(I,X.mode,le),le.return=X,X=le),v(X)):i(X,q)}return function(X,q,I,le){try{ql=0;var me=$e(X,q,I,le);return qi=null,me}catch(he){if(he===Ui||he===kr)throw he;var ze=zt(29,he,null,X.mode);return ze.lanes=le,ze.return=X,ze}}}var ti=Ep(!0),Np=Ep(!1),da=!1;function bu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wu(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ha(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function pa(e,n,i){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(De&2)!==0){var u=r.pending;return u===null?n.next=n:(n.next=u.next,u.next=n),r.pending=n,n=Sr(e),rp(e,null,i),n}return wr(e,r,n,i),Sr(e)}function $l(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var r=n.lanes;r&=e.pendingLanes,i|=r,n.lanes=i,er(e,i)}}function Su(e,n){var i=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,i===r)){var u=null,d=null;if(i=i.firstBaseUpdate,i!==null){do{var v={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};d===null?u=d=v:d=d.next=v,i=i.next}while(i!==null);d===null?u=d=n:d=d.next=n}else u=d=n;i={baseState:r.baseState,firstBaseUpdate:u,lastBaseUpdate:d,shared:r.shared,callbacks:r.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Eu=!1;function Yl(){if(Eu){var e=Bi;if(e!==null)throw e}}function Xl(e,n,i,r){Eu=!1;var u=e.updateQueue;da=!1;var d=u.firstBaseUpdate,v=u.lastBaseUpdate,_=u.shared.pending;if(_!==null){u.shared.pending=null;var L=_,F=L.next;L.next=null,v===null?d=F:v.next=F,v=L;var ae=e.alternate;ae!==null&&(ae=ae.updateQueue,_=ae.lastBaseUpdate,_!==v&&(_===null?ae.firstBaseUpdate=F:_.next=F,ae.lastBaseUpdate=L))}if(d!==null){var oe=u.baseState;v=0,ae=F=L=null,_=d;do{var J=_.lane&-536870913,P=J!==_.lane;if(P?(ke&J)===J:(r&J)===J){J!==0&&J===Li&&(Eu=!0),ae!==null&&(ae=ae.next={lane:0,tag:_.tag,payload:_.payload,callback:null,next:null});e:{var de=e,ye=_;J=n;var $e=i;switch(ye.tag){case 1:if(de=ye.payload,typeof de=="function"){oe=de.call($e,oe,J);break e}oe=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=ye.payload,J=typeof de=="function"?de.call($e,oe,J):de,J==null)break e;oe=y({},oe,J);break e;case 2:da=!0}}J=_.callback,J!==null&&(e.flags|=64,P&&(e.flags|=8192),P=u.callbacks,P===null?u.callbacks=[J]:P.push(J))}else P={lane:J,tag:_.tag,payload:_.payload,callback:_.callback,next:null},ae===null?(F=ae=P,L=oe):ae=ae.next=P,v|=J;if(_=_.next,_===null){if(_=u.shared.pending,_===null)break;P=_,_=P.next,P.next=null,u.lastBaseUpdate=P,u.shared.pending=null}}while(!0);ae===null&&(L=oe),u.baseState=L,u.firstBaseUpdate=F,u.lastBaseUpdate=ae,d===null&&(u.shared.lanes=0),va|=v,e.lanes=v,e.memoizedState=oe}}function _p(e,n){if(typeof e!="function")throw Error(o(191,e));e.call(n)}function Cp(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)_p(i[e],n)}var Vi=R(null),Rr=R(0);function Tp(e,n){e=Xn,W(Rr,e),W(Vi,n),Xn=e|n.baseLanes}function Nu(){W(Rr,Xn),W(Vi,Vi.current)}function _u(){Xn=Rr.current,U(Vi),U(Rr)}var Ot=R(null),Zt=null;function ma(e){var n=e.alternate;W(Pe,Pe.current&1),W(Ot,e),Zt===null&&(n===null||Vi.current!==null||n.memoizedState!==null)&&(Zt=e)}function Cu(e){W(Pe,Pe.current),W(Ot,e),Zt===null&&(Zt=e)}function kp(e){e.tag===22?(W(Pe,Pe.current),W(Ot,e),Zt===null&&(Zt=e)):ga()}function ga(){W(Pe,Pe.current),W(Ot,Ot.current)}function Dt(e){U(Ot),Zt===e&&(Zt=null),U(Pe)}var Pe=R(0);function zr(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||zf(i)||Of(i)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Hn=0,Se=null,qe=null,nt=null,Or=!1,$i=!1,ni=!1,Dr=0,Gl=0,Yi=null,wb=0;function Fe(){throw Error(o(321))}function Tu(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!Rt(e[i],n[i]))return!1;return!0}function ku(e,n,i,r,u,d){return Hn=d,Se=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,M.H=e===null||e.memoizedState===null?fm:Yu,ni=!1,d=i(r,u),ni=!1,$i&&(d=Ap(n,i,r,u)),jp(e),d}function jp(e){M.H=Kl;var n=qe!==null&&qe.next!==null;if(Hn=0,nt=qe=Se=null,Or=!1,Gl=0,Yi=null,n)throw Error(o(300));e===null||at||(e=e.dependencies,e!==null&&_r(e)&&(at=!0))}function Ap(e,n,i,r){Se=e;var u=0;do{if($i&&(Yi=null),Gl=0,$i=!1,25<=u)throw Error(o(301));if(u+=1,nt=qe=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}M.H=dm,d=n(i,r)}while($i);return d}function Sb(){var e=M.H,n=e.useState()[0];return n=typeof n.then=="function"?Zl(n):n,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(Se.flags|=1024),n}function ju(){var e=Dr!==0;return Dr=0,e}function Au(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function Mu(e){if(Or){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Or=!1}Hn=0,nt=qe=Se=null,$i=!1,Gl=Dr=0,Yi=null}function wt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return nt===null?Se.memoizedState=nt=e:nt=nt.next=e,nt}function We(){if(qe===null){var e=Se.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var n=nt===null?Se.memoizedState:nt.next;if(n!==null)nt=n,qe=e;else{if(e===null)throw Se.alternate===null?Error(o(467)):Error(o(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},nt===null?Se.memoizedState=nt=e:nt=nt.next=e}return nt}function Hr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Zl(e){var n=Gl;return Gl+=1,Yi===null&&(Yi=[]),e=bp(Yi,e,n),n=Se,(nt===null?n.memoizedState:nt.next)===null&&(n=n.alternate,M.H=n===null||n.memoizedState===null?fm:Yu),e}function Lr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Zl(e);if(e.$$typeof===S)return pt(e)}throw Error(o(438,String(e)))}function Ru(e){var n=null,i=Se.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var r=Se.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(n={data:r.data.map(function(u){return u.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Hr(),Se.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),r=0;r<e;r++)i[r]=ee;return n.index++,i}function Ln(e,n){return typeof n=="function"?n(e):n}function Br(e){var n=We();return zu(n,qe,e)}function zu(e,n,i){var r=e.queue;if(r===null)throw Error(o(311));r.lastRenderedReducer=i;var u=e.baseQueue,d=r.pending;if(d!==null){if(u!==null){var v=u.next;u.next=d.next,d.next=v}n.baseQueue=u=d,r.pending=null}if(d=e.baseState,u===null)e.memoizedState=d;else{n=u.next;var _=v=null,L=null,F=n,ae=!1;do{var oe=F.lane&-536870913;if(oe!==F.lane?(ke&oe)===oe:(Hn&oe)===oe){var J=F.revertLane;if(J===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null}),oe===Li&&(ae=!0);else if((Hn&J)===J){F=F.next,J===Li&&(ae=!0);continue}else oe={lane:0,revertLane:F.revertLane,gesture:null,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},L===null?(_=L=oe,v=d):L=L.next=oe,Se.lanes|=J,va|=J;oe=F.action,ni&&i(d,oe),d=F.hasEagerState?F.eagerState:i(d,oe)}else J={lane:oe,revertLane:F.revertLane,gesture:F.gesture,action:F.action,hasEagerState:F.hasEagerState,eagerState:F.eagerState,next:null},L===null?(_=L=J,v=d):L=L.next=J,Se.lanes|=oe,va|=oe;F=F.next}while(F!==null&&F!==n);if(L===null?v=d:L.next=_,!Rt(d,e.memoizedState)&&(at=!0,ae&&(i=Bi,i!==null)))throw i;e.memoizedState=d,e.baseState=v,e.baseQueue=L,r.lastRenderedState=d}return u===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function Ou(e){var n=We(),i=n.queue;if(i===null)throw Error(o(311));i.lastRenderedReducer=e;var r=i.dispatch,u=i.pending,d=n.memoizedState;if(u!==null){i.pending=null;var v=u=u.next;do d=e(d,v.action),v=v.next;while(v!==u);Rt(d,n.memoizedState)||(at=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),i.lastRenderedState=d}return[d,r]}function Mp(e,n,i){var r=Se,u=We(),d=Ae;if(d){if(i===void 0)throw Error(o(407));i=i()}else i=n();var v=!Rt((qe||u).memoizedState,i);if(v&&(u.memoizedState=i,at=!0),u=u.queue,Lu(Op.bind(null,r,u,e),[e]),u.getSnapshot!==n||v||nt!==null&&nt.memoizedState.tag&1){if(r.flags|=2048,Xi(9,{destroy:void 0},zp.bind(null,r,u,i,n),null),Ye===null)throw Error(o(349));d||(Hn&127)!==0||Rp(r,n,i)}return i}function Rp(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Se.updateQueue,n===null?(n=Hr(),Se.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function zp(e,n,i,r){n.value=i,n.getSnapshot=r,Dp(n)&&Hp(e)}function Op(e,n,i){return i(function(){Dp(n)&&Hp(e)})}function Dp(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Rt(e,i)}catch{return!0}}function Hp(e){var n=Qa(e,2);n!==null&&jt(n,e,2)}function Du(e){var n=wt();if(typeof e=="function"){var i=e;if(e=i(),ni){fn(!0);try{i()}finally{fn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:e},n}function Lp(e,n,i,r){return e.baseState=i,zu(e,qe,typeof r=="function"?r:Ln)}function Eb(e,n,i,r,u){if(Vr(e))throw Error(o(485));if(e=n.action,e!==null){var d={payload:u,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(v){d.listeners.push(v)}};M.T!==null?i(!0):d.isTransition=!1,r(d),i=n.pending,i===null?(d.next=n.pending=d,Bp(n,d)):(d.next=i.next,n.pending=i.next=d)}}function Bp(e,n){var i=n.action,r=n.payload,u=e.state;if(n.isTransition){var d=M.T,v={};M.T=v;try{var _=i(u,r),L=M.S;L!==null&&L(v,_),Up(e,n,_)}catch(F){Hu(e,n,F)}finally{d!==null&&v.types!==null&&(d.types=v.types),M.T=d}}else try{d=i(u,r),Up(e,n,d)}catch(F){Hu(e,n,F)}}function Up(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(r){qp(e,n,r)},function(r){return Hu(e,n,r)}):qp(e,n,i)}function qp(e,n,i){n.status="fulfilled",n.value=i,Vp(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,Bp(e,i)))}function Hu(e,n,i){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do n.status="rejected",n.reason=i,Vp(n),n=n.next;while(n!==r)}e.action=null}function Vp(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function $p(e,n){return n}function Yp(e,n){if(Ae){var i=Ye.formState;if(i!==null){e:{var r=Se;if(Ae){if(Xe){t:{for(var u=Xe,d=Gt;u.nodeType!==8;){if(!d){u=null;break t}if(u=Qt(u.nextSibling),u===null){u=null;break t}}d=u.data,u=d==="F!"||d==="F"?u:null}if(u){Xe=Qt(u.nextSibling),r=u.data==="F!";break e}}ua(r)}r=!1}r&&(n=i[0])}}return i=wt(),i.memoizedState=i.baseState=n,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$p,lastRenderedState:n},i.queue=r,i=sm.bind(null,Se,r),r.dispatch=i,r=Du(!1),d=$u.bind(null,Se,!1,r.queue),r=wt(),u={state:n,dispatch:null,action:e,pending:null},r.queue=u,i=Eb.bind(null,Se,u,d,i),u.dispatch=i,r.memoizedState=e,[n,i,!1]}function Xp(e){var n=We();return Gp(n,qe,e)}function Gp(e,n,i){if(n=zu(e,n,$p)[0],e=Br(Ln)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var r=Zl(n)}catch(v){throw v===Ui?kr:v}else r=n;n=We();var u=n.queue,d=u.dispatch;return i!==n.memoizedState&&(Se.flags|=2048,Xi(9,{destroy:void 0},Nb.bind(null,u,i),null)),[r,d,e]}function Nb(e,n){e.action=n}function Zp(e){var n=We(),i=qe;if(i!==null)return Gp(n,i,e);We(),n=n.memoizedState,i=We();var r=i.queue.dispatch;return i.memoizedState=e,[n,r,!1]}function Xi(e,n,i,r){return e={tag:e,create:i,deps:r,inst:n,next:null},n=Se.updateQueue,n===null&&(n=Hr(),Se.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(r=i.next,i.next=e,e.next=r,n.lastEffect=e),e}function Qp(){return We().memoizedState}function Ur(e,n,i,r){var u=wt();Se.flags|=e,u.memoizedState=Xi(1|n,{destroy:void 0},i,r===void 0?null:r)}function qr(e,n,i,r){var u=We();r=r===void 0?null:r;var d=u.memoizedState.inst;qe!==null&&r!==null&&Tu(r,qe.memoizedState.deps)?u.memoizedState=Xi(n,d,i,r):(Se.flags|=e,u.memoizedState=Xi(1|n,d,i,r))}function Kp(e,n){Ur(8390656,8,e,n)}function Lu(e,n){qr(2048,8,e,n)}function _b(e){Se.flags|=4;var n=Se.updateQueue;if(n===null)n=Hr(),Se.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function Ip(e){var n=We().memoizedState;return _b({ref:n,nextImpl:e}),function(){if((De&2)!==0)throw Error(o(440));return n.impl.apply(void 0,arguments)}}function Fp(e,n){return qr(4,2,e,n)}function Jp(e,n){return qr(4,4,e,n)}function Pp(e,n){if(typeof n=="function"){e=e();var i=n(e);return function(){typeof i=="function"?i():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Wp(e,n,i){i=i!=null?i.concat([e]):null,qr(4,4,Pp.bind(null,n,e),i)}function Bu(){}function em(e,n){var i=We();n=n===void 0?null:n;var r=i.memoizedState;return n!==null&&Tu(n,r[1])?r[0]:(i.memoizedState=[e,n],e)}function tm(e,n){var i=We();n=n===void 0?null:n;var r=i.memoizedState;if(n!==null&&Tu(n,r[1]))return r[0];if(r=e(),ni){fn(!0);try{e()}finally{fn(!1)}}return i.memoizedState=[r,n],r}function Uu(e,n,i){return i===void 0||(Hn&1073741824)!==0&&(ke&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=n0(),Se.lanes|=e,va|=e,i)}function nm(e,n,i,r){return Rt(i,n)?i:Vi.current!==null?(e=Uu(e,i,r),Rt(e,n)||(at=!0),e):(Hn&42)===0||(Hn&1073741824)!==0&&(ke&261930)===0?(at=!0,e.memoizedState=i):(e=n0(),Se.lanes|=e,va|=e,n)}function am(e,n,i,r,u){var d=B.p;B.p=d!==0&&8>d?d:8;var v=M.T,_={};M.T=_,$u(e,!1,n,i);try{var L=u(),F=M.S;if(F!==null&&F(_,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ae=bb(L,r);Ql(e,n,ae,Bt(e))}else Ql(e,n,r,Bt(e))}catch(oe){Ql(e,n,{then:function(){},status:"rejected",reason:oe},Bt())}finally{B.p=d,v!==null&&_.types!==null&&(v.types=_.types),M.T=v}}function Cb(){}function qu(e,n,i,r){if(e.tag!==5)throw Error(o(476));var u=im(e).queue;am(e,u,n,V,i===null?Cb:function(){return lm(e),i(r)})}function im(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:V},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ln,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function lm(e){var n=im(e);n.next===null&&(n=e.alternate.memoizedState),Ql(e,n.next.queue,{},Bt())}function Vu(){return pt(uo)}function om(){return We().memoizedState}function rm(){return We().memoizedState}function Tb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=Bt();e=ha(i);var r=pa(n,e,i);r!==null&&(jt(r,n,i),$l(r,n,i)),n={cache:gu()},e.payload=n;return}n=n.return}}function kb(e,n,i){var r=Bt();i={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},Vr(e)?cm(n,i):(i=lu(e,n,i,r),i!==null&&(jt(i,e,r),um(i,n,r)))}function sm(e,n,i){var r=Bt();Ql(e,n,i,r)}function Ql(e,n,i,r){var u={lane:r,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(Vr(e))cm(n,u);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var v=n.lastRenderedState,_=d(v,i);if(u.hasEagerState=!0,u.eagerState=_,Rt(_,v))return wr(e,n,u,0),Ye===null&&br(),!1}catch{}if(i=lu(e,n,u,r),i!==null)return jt(i,e,r),um(i,n,r),!0}return!1}function $u(e,n,i,r){if(r={lane:2,revertLane:wf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Vr(e)){if(n)throw Error(o(479))}else n=lu(e,i,r,2),n!==null&&jt(n,e,2)}function Vr(e){var n=e.alternate;return e===Se||n!==null&&n===Se}function cm(e,n){$i=Or=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function um(e,n,i){if((i&4194048)!==0){var r=n.lanes;r&=e.pendingLanes,i|=r,n.lanes=i,er(e,i)}}var Kl={readContext:pt,use:Lr,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Kl.useEffectEvent=Fe;var fm={readContext:pt,use:Lr,useCallback:function(e,n){return wt().memoizedState=[e,n===void 0?null:n],e},useContext:pt,useEffect:Kp,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Ur(4194308,4,Pp.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Ur(4194308,4,e,n)},useInsertionEffect:function(e,n){Ur(4,2,e,n)},useMemo:function(e,n){var i=wt();n=n===void 0?null:n;var r=e();if(ni){fn(!0);try{e()}finally{fn(!1)}}return i.memoizedState=[r,n],r},useReducer:function(e,n,i){var r=wt();if(i!==void 0){var u=i(n);if(ni){fn(!0);try{i(n)}finally{fn(!1)}}}else u=n;return r.memoizedState=r.baseState=u,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:u},r.queue=e,e=e.dispatch=kb.bind(null,Se,e),[r.memoizedState,e]},useRef:function(e){var n=wt();return e={current:e},n.memoizedState=e},useState:function(e){e=Du(e);var n=e.queue,i=sm.bind(null,Se,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:Bu,useDeferredValue:function(e,n){var i=wt();return Uu(i,e,n)},useTransition:function(){var e=Du(!1);return e=am.bind(null,Se,e.queue,!0,!1),wt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var r=Se,u=wt();if(Ae){if(i===void 0)throw Error(o(407));i=i()}else{if(i=n(),Ye===null)throw Error(o(349));(ke&127)!==0||Rp(r,n,i)}u.memoizedState=i;var d={value:i,getSnapshot:n};return u.queue=d,Kp(Op.bind(null,r,d,e),[e]),r.flags|=2048,Xi(9,{destroy:void 0},zp.bind(null,r,d,i,n),null),i},useId:function(){var e=wt(),n=Ye.identifierPrefix;if(Ae){var i=pn,r=hn;i=(r&~(1<<32-bt(r)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Dr++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=wb++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Vu,useFormState:Yp,useActionState:Yp,useOptimistic:function(e){var n=wt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=$u.bind(null,Se,!0,i),i.dispatch=n,[e,n]},useMemoCache:Ru,useCacheRefresh:function(){return wt().memoizedState=Tb.bind(null,Se)},useEffectEvent:function(e){var n=wt(),i={impl:e};return n.memoizedState=i,function(){if((De&2)!==0)throw Error(o(440));return i.impl.apply(void 0,arguments)}}},Yu={readContext:pt,use:Lr,useCallback:em,useContext:pt,useEffect:Lu,useImperativeHandle:Wp,useInsertionEffect:Fp,useLayoutEffect:Jp,useMemo:tm,useReducer:Br,useRef:Qp,useState:function(){return Br(Ln)},useDebugValue:Bu,useDeferredValue:function(e,n){var i=We();return nm(i,qe.memoizedState,e,n)},useTransition:function(){var e=Br(Ln)[0],n=We().memoizedState;return[typeof e=="boolean"?e:Zl(e),n]},useSyncExternalStore:Mp,useId:om,useHostTransitionStatus:Vu,useFormState:Xp,useActionState:Xp,useOptimistic:function(e,n){var i=We();return Lp(i,qe,e,n)},useMemoCache:Ru,useCacheRefresh:rm};Yu.useEffectEvent=Ip;var dm={readContext:pt,use:Lr,useCallback:em,useContext:pt,useEffect:Lu,useImperativeHandle:Wp,useInsertionEffect:Fp,useLayoutEffect:Jp,useMemo:tm,useReducer:Ou,useRef:Qp,useState:function(){return Ou(Ln)},useDebugValue:Bu,useDeferredValue:function(e,n){var i=We();return qe===null?Uu(i,e,n):nm(i,qe.memoizedState,e,n)},useTransition:function(){var e=Ou(Ln)[0],n=We().memoizedState;return[typeof e=="boolean"?e:Zl(e),n]},useSyncExternalStore:Mp,useId:om,useHostTransitionStatus:Vu,useFormState:Zp,useActionState:Zp,useOptimistic:function(e,n){var i=We();return qe!==null?Lp(i,qe,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ru,useCacheRefresh:rm};dm.useEffectEvent=Ip;function Xu(e,n,i,r){n=e.memoizedState,i=i(r,n),i=i==null?n:y({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Gu={enqueueSetState:function(e,n,i){e=e._reactInternals;var r=Bt(),u=ha(r);u.payload=n,i!=null&&(u.callback=i),n=pa(e,u,r),n!==null&&(jt(n,e,r),$l(n,e,r))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var r=Bt(),u=ha(r);u.tag=1,u.payload=n,i!=null&&(u.callback=i),n=pa(e,u,r),n!==null&&(jt(n,e,r),$l(n,e,r))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=Bt(),r=ha(i);r.tag=2,n!=null&&(r.callback=n),n=pa(e,r,i),n!==null&&(jt(n,e,i),$l(n,e,i))}};function hm(e,n,i,r,u,d,v){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,d,v):n.prototype&&n.prototype.isPureReactComponent?!Ol(i,r)||!Ol(u,d):!0}function pm(e,n,i,r){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,r),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,r),n.state!==e&&Gu.enqueueReplaceState(n,n.state,null)}function ai(e,n){var i=n;if("ref"in n){i={};for(var r in n)r!=="ref"&&(i[r]=n[r])}if(e=e.defaultProps){i===n&&(i=y({},i));for(var u in e)i[u]===void 0&&(i[u]=e[u])}return i}function mm(e){vr(e)}function gm(e){console.error(e)}function ym(e){vr(e)}function $r(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(r){setTimeout(function(){throw r})}}function xm(e,n,i){try{var r=e.onCaughtError;r(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(u){setTimeout(function(){throw u})}}function Zu(e,n,i){return i=ha(i),i.tag=3,i.payload={element:null},i.callback=function(){$r(e,n)},i}function vm(e){return e=ha(e),e.tag=3,e}function bm(e,n,i,r){var u=i.type.getDerivedStateFromError;if(typeof u=="function"){var d=r.value;e.payload=function(){return u(d)},e.callback=function(){xm(n,i,r)}}var v=i.stateNode;v!==null&&typeof v.componentDidCatch=="function"&&(e.callback=function(){xm(n,i,r),typeof u!="function"&&(ba===null?ba=new Set([this]):ba.add(this));var _=r.stack;this.componentDidCatch(r.value,{componentStack:_!==null?_:""})})}function jb(e,n,i,r,u){if(i.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(n=i.alternate,n!==null&&Hi(n,i,u,!0),i=Ot.current,i!==null){switch(i.tag){case 31:case 13:return Zt===null?es():i.alternate===null&&Je===0&&(Je=3),i.flags&=-257,i.flags|=65536,i.lanes=u,r===jr?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([r]):n.add(r),xf(e,r,u)),!1;case 22:return i.flags|=65536,r===jr?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([r])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([r]):i.add(r)),xf(e,r,u)),!1}throw Error(o(435,i.tag))}return xf(e,r,u),es(),!1}if(Ae)return n=Ot.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=u,r!==fu&&(e=Error(o(422),{cause:r}),Ll($t(e,i)))):(r!==fu&&(n=Error(o(423),{cause:r}),Ll($t(n,i))),e=e.current.alternate,e.flags|=65536,u&=-u,e.lanes|=u,r=$t(r,i),u=Zu(e.stateNode,r,u),Su(e,u),Je!==4&&(Je=2)),!1;var d=Error(o(520),{cause:r});if(d=$t(d,i),no===null?no=[d]:no.push(d),Je!==4&&(Je=2),n===null)return!0;r=$t(r,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=u&-u,i.lanes|=e,e=Zu(i.stateNode,r,e),Su(i,e),!1;case 1:if(n=i.type,d=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(ba===null||!ba.has(d))))return i.flags|=65536,u&=-u,i.lanes|=u,u=vm(u),bm(u,e,i,r),Su(i,u),!1}i=i.return}while(i!==null);return!1}var Qu=Error(o(461)),at=!1;function mt(e,n,i,r){n.child=e===null?Np(n,null,i,r):ti(n,e.child,i,r)}function wm(e,n,i,r,u){i=i.render;var d=n.ref;if("ref"in r){var v={};for(var _ in r)_!=="ref"&&(v[_]=r[_])}else v=r;return Ja(n),r=ku(e,n,i,v,d,u),_=ju(),e!==null&&!at?(Au(e,n,u),Bn(e,n,u)):(Ae&&_&&cu(n),n.flags|=1,mt(e,n,r,u),n.child)}function Sm(e,n,i,r,u){if(e===null){var d=i.type;return typeof d=="function"&&!ou(d)&&d.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=d,Em(e,n,d,r,u)):(e=Er(i.type,null,r,n,n.mode,u),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!tf(e,u)){var v=d.memoizedProps;if(i=i.compare,i=i!==null?i:Ol,i(v,r)&&e.ref===n.ref)return Bn(e,n,u)}return n.flags|=1,e=Rn(d,r),e.ref=n.ref,e.return=n,n.child=e}function Em(e,n,i,r,u){if(e!==null){var d=e.memoizedProps;if(Ol(d,r)&&e.ref===n.ref)if(at=!1,n.pendingProps=r=d,tf(e,u))(e.flags&131072)!==0&&(at=!0);else return n.lanes=e.lanes,Bn(e,n,u)}return Ku(e,n,i,r,u)}function Nm(e,n,i,r){var u=r.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|i:i,e!==null){for(r=n.child=e.child,u=0;r!==null;)u=u|r.lanes|r.childLanes,r=r.sibling;r=u&~d}else r=0,n.child=null;return _m(e,n,d,i,r)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Tr(n,d!==null?d.cachePool:null),d!==null?Tp(n,d):Nu(),kp(n);else return r=n.lanes=536870912,_m(e,n,d!==null?d.baseLanes|i:i,i,r)}else d!==null?(Tr(n,d.cachePool),Tp(n,d),ga(),n.memoizedState=null):(e!==null&&Tr(n,null),Nu(),ga());return mt(e,n,u,i),n.child}function Il(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function _m(e,n,i,r,u){var d=xu();return d=d===null?null:{parent:tt._currentValue,pool:d},n.memoizedState={baseLanes:i,cachePool:d},e!==null&&Tr(n,null),Nu(),kp(n),e!==null&&Hi(e,n,r,!0),n.childLanes=u,null}function Yr(e,n){return n=Gr({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Cm(e,n,i){return ti(n,e.child,null,i),e=Yr(n,n.pendingProps),e.flags|=2,Dt(n),n.memoizedState=null,e}function Ab(e,n,i){var r=n.pendingProps,u=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ae){if(r.mode==="hidden")return e=Yr(n,r),n.lanes=536870912,Il(null,e);if(Cu(n),(e=Xe)?(e=B0(e,Gt),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:sa!==null?{id:hn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},i=cp(e),i.return=n,n.child=i,ht=n,Xe=null)):e=null,e===null)throw ua(n);return n.lanes=536870912,null}return Yr(n,r)}var d=e.memoizedState;if(d!==null){var v=d.dehydrated;if(Cu(n),u)if(n.flags&256)n.flags&=-257,n=Cm(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(o(558));else if(at||Hi(e,n,i,!1),u=(i&e.childLanes)!==0,at||u){if(r=Ye,r!==null&&(v=tr(r,i),v!==0&&v!==d.retryLane))throw d.retryLane=v,Qa(e,v),jt(r,e,v),Qu;es(),n=Cm(e,n,i)}else e=d.treeContext,Xe=Qt(v.nextSibling),ht=n,Ae=!0,ca=null,Gt=!1,e!==null&&dp(n,e),n=Yr(n,r),n.flags|=4096;return n}return e=Rn(e.child,{mode:r.mode,children:r.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Xr(e,n){var i=n.ref;if(i===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(o(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function Ku(e,n,i,r,u){return Ja(n),i=ku(e,n,i,r,void 0,u),r=ju(),e!==null&&!at?(Au(e,n,u),Bn(e,n,u)):(Ae&&r&&cu(n),n.flags|=1,mt(e,n,i,u),n.child)}function Tm(e,n,i,r,u,d){return Ja(n),n.updateQueue=null,i=Ap(n,r,i,u),jp(e),r=ju(),e!==null&&!at?(Au(e,n,d),Bn(e,n,d)):(Ae&&r&&cu(n),n.flags|=1,mt(e,n,i,d),n.child)}function km(e,n,i,r,u){if(Ja(n),n.stateNode===null){var d=Ri,v=i.contextType;typeof v=="object"&&v!==null&&(d=pt(v)),d=new i(r,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Gu,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=r,d.state=n.memoizedState,d.refs={},bu(n),v=i.contextType,d.context=typeof v=="object"&&v!==null?pt(v):Ri,d.state=n.memoizedState,v=i.getDerivedStateFromProps,typeof v=="function"&&(Xu(n,i,v,r),d.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(v=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),v!==d.state&&Gu.enqueueReplaceState(d,d.state,null),Xl(n,r,d,u),Yl(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),r=!0}else if(e===null){d=n.stateNode;var _=n.memoizedProps,L=ai(i,_);d.props=L;var F=d.context,ae=i.contextType;v=Ri,typeof ae=="object"&&ae!==null&&(v=pt(ae));var oe=i.getDerivedStateFromProps;ae=typeof oe=="function"||typeof d.getSnapshotBeforeUpdate=="function",_=n.pendingProps!==_,ae||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(_||F!==v)&&pm(n,d,r,v),da=!1;var J=n.memoizedState;d.state=J,Xl(n,r,d,u),Yl(),F=n.memoizedState,_||J!==F||da?(typeof oe=="function"&&(Xu(n,i,oe,r),F=n.memoizedState),(L=da||hm(n,i,L,r,J,F,v))?(ae||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=F),d.props=r,d.state=F,d.context=v,r=L):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{d=n.stateNode,wu(e,n),v=n.memoizedProps,ae=ai(i,v),d.props=ae,oe=n.pendingProps,J=d.context,F=i.contextType,L=Ri,typeof F=="object"&&F!==null&&(L=pt(F)),_=i.getDerivedStateFromProps,(F=typeof _=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(v!==oe||J!==L)&&pm(n,d,r,L),da=!1,J=n.memoizedState,d.state=J,Xl(n,r,d,u),Yl();var P=n.memoizedState;v!==oe||J!==P||da||e!==null&&e.dependencies!==null&&_r(e.dependencies)?(typeof _=="function"&&(Xu(n,i,_,r),P=n.memoizedState),(ae=da||hm(n,i,ae,r,J,P,L)||e!==null&&e.dependencies!==null&&_r(e.dependencies))?(F||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(r,P,L),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(r,P,L)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=P),d.props=r,d.state=P,d.context=L,r=ae):(typeof d.componentDidUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||v===e.memoizedProps&&J===e.memoizedState||(n.flags|=1024),r=!1)}return d=r,Xr(e,n),r=(n.flags&128)!==0,d||r?(d=n.stateNode,i=r&&typeof i.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&r?(n.child=ti(n,e.child,null,u),n.child=ti(n,null,i,u)):mt(e,n,i,u),n.memoizedState=d.state,e=n.child):e=Bn(e,n,u),e}function jm(e,n,i,r){return Ia(),n.flags|=256,mt(e,n,i,r),n.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fu(e){return{baseLanes:e,cachePool:xp()}}function Ju(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=Lt),e}function Am(e,n,i){var r=n.pendingProps,u=!1,d=(n.flags&128)!==0,v;if((v=d)||(v=e!==null&&e.memoizedState===null?!1:(Pe.current&2)!==0),v&&(u=!0,n.flags&=-129),v=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ae){if(u?ma(n):ga(),(e=Xe)?(e=B0(e,Gt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:sa!==null?{id:hn,overflow:pn}:null,retryLane:536870912,hydrationErrors:null},i=cp(e),i.return=n,n.child=i,ht=n,Xe=null)):e=null,e===null)throw ua(n);return Of(e)?n.lanes=32:n.lanes=536870912,null}var _=r.children;return r=r.fallback,u?(ga(),u=n.mode,_=Gr({mode:"hidden",children:_},u),r=Ka(r,u,i,null),_.return=n,r.return=n,_.sibling=r,n.child=_,r=n.child,r.memoizedState=Fu(i),r.childLanes=Ju(e,v,i),n.memoizedState=Iu,Il(null,r)):(ma(n),Pu(n,_))}var L=e.memoizedState;if(L!==null&&(_=L.dehydrated,_!==null)){if(d)n.flags&256?(ma(n),n.flags&=-257,n=Wu(e,n,i)):n.memoizedState!==null?(ga(),n.child=e.child,n.flags|=128,n=null):(ga(),_=r.fallback,u=n.mode,r=Gr({mode:"visible",children:r.children},u),_=Ka(_,u,i,null),_.flags|=2,r.return=n,_.return=n,r.sibling=_,n.child=r,ti(n,e.child,null,i),r=n.child,r.memoizedState=Fu(i),r.childLanes=Ju(e,v,i),n.memoizedState=Iu,n=Il(null,r));else if(ma(n),Of(_)){if(v=_.nextSibling&&_.nextSibling.dataset,v)var F=v.dgst;v=F,r=Error(o(419)),r.stack="",r.digest=v,Ll({value:r,source:null,stack:null}),n=Wu(e,n,i)}else if(at||Hi(e,n,i,!1),v=(i&e.childLanes)!==0,at||v){if(v=Ye,v!==null&&(r=tr(v,i),r!==0&&r!==L.retryLane))throw L.retryLane=r,Qa(e,r),jt(v,e,r),Qu;zf(_)||es(),n=Wu(e,n,i)}else zf(_)?(n.flags|=192,n.child=e.child,n=null):(e=L.treeContext,Xe=Qt(_.nextSibling),ht=n,Ae=!0,ca=null,Gt=!1,e!==null&&dp(n,e),n=Pu(n,r.children),n.flags|=4096);return n}return u?(ga(),_=r.fallback,u=n.mode,L=e.child,F=L.sibling,r=Rn(L,{mode:"hidden",children:r.children}),r.subtreeFlags=L.subtreeFlags&65011712,F!==null?_=Rn(F,_):(_=Ka(_,u,i,null),_.flags|=2),_.return=n,r.return=n,r.sibling=_,n.child=r,Il(null,r),r=n.child,_=e.child.memoizedState,_===null?_=Fu(i):(u=_.cachePool,u!==null?(L=tt._currentValue,u=u.parent!==L?{parent:L,pool:L}:u):u=xp(),_={baseLanes:_.baseLanes|i,cachePool:u}),r.memoizedState=_,r.childLanes=Ju(e,v,i),n.memoizedState=Iu,Il(e.child,r)):(ma(n),i=e.child,e=i.sibling,i=Rn(i,{mode:"visible",children:r.children}),i.return=n,i.sibling=null,e!==null&&(v=n.deletions,v===null?(n.deletions=[e],n.flags|=16):v.push(e)),n.child=i,n.memoizedState=null,i)}function Pu(e,n){return n=Gr({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Gr(e,n){return e=zt(22,e,null,n),e.lanes=0,e}function Wu(e,n,i){return ti(n,e.child,null,i),e=Pu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function Mm(e,n,i){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n),pu(e.return,n,i)}function ef(e,n,i,r,u,d){var v=e.memoizedState;v===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:i,tailMode:u,treeForkCount:d}:(v.isBackwards=n,v.rendering=null,v.renderingStartTime=0,v.last=r,v.tail=i,v.tailMode=u,v.treeForkCount=d)}function Rm(e,n,i){var r=n.pendingProps,u=r.revealOrder,d=r.tail;r=r.children;var v=Pe.current,_=(v&2)!==0;if(_?(v=v&1|2,n.flags|=128):v&=1,W(Pe,v),mt(e,n,r,i),r=Ae?Hl:0,!_&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Mm(e,i,n);else if(e.tag===19)Mm(e,i,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(u){case"forwards":for(i=n.child,u=null;i!==null;)e=i.alternate,e!==null&&zr(e)===null&&(u=i),i=i.sibling;i=u,i===null?(u=n.child,n.child=null):(u=i.sibling,i.sibling=null),ef(n,!1,u,i,d,r);break;case"backwards":case"unstable_legacy-backwards":for(i=null,u=n.child,n.child=null;u!==null;){if(e=u.alternate,e!==null&&zr(e)===null){n.child=u;break}e=u.sibling,u.sibling=i,i=u,u=e}ef(n,!0,i,null,d,r);break;case"together":ef(n,!1,null,null,void 0,r);break;default:n.memoizedState=null}return n.child}function Bn(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),va|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(Hi(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(o(153));if(n.child!==null){for(e=n.child,i=Rn(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=Rn(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function tf(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&_r(e)))}function Mb(e,n,i){switch(n.tag){case 3:re(n,n.stateNode.containerInfo),fa(n,tt,e.memoizedState.cache),Ia();break;case 27:case 5:Ee(n);break;case 4:re(n,n.stateNode.containerInfo);break;case 10:fa(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Cu(n),null;break;case 13:var r=n.memoizedState;if(r!==null)return r.dehydrated!==null?(ma(n),n.flags|=128,null):(i&n.child.childLanes)!==0?Am(e,n,i):(ma(n),e=Bn(e,n,i),e!==null?e.sibling:null);ma(n);break;case 19:var u=(e.flags&128)!==0;if(r=(i&n.childLanes)!==0,r||(Hi(e,n,i,!1),r=(i&n.childLanes)!==0),u){if(r)return Rm(e,n,i);n.flags|=128}if(u=n.memoizedState,u!==null&&(u.rendering=null,u.tail=null,u.lastEffect=null),W(Pe,Pe.current),r)break;return null;case 22:return n.lanes=0,Nm(e,n,i,n.pendingProps);case 24:fa(n,tt,e.memoizedState.cache)}return Bn(e,n,i)}function zm(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)at=!0;else{if(!tf(e,i)&&(n.flags&128)===0)return at=!1,Mb(e,n,i);at=(e.flags&131072)!==0}else at=!1,Ae&&(n.flags&1048576)!==0&&fp(n,Hl,n.index);switch(n.lanes=0,n.tag){case 16:e:{var r=n.pendingProps;if(e=Wa(n.elementType),n.type=e,typeof e=="function")ou(e)?(r=ai(e,r),n.tag=1,n=km(null,n,e,r,i)):(n.tag=0,n=Ku(null,n,e,r,i));else{if(e!=null){var u=e.$$typeof;if(u===C){n.tag=11,n=wm(null,n,e,r,i);break e}else if(u===O){n.tag=14,n=Sm(null,n,e,r,i);break e}}throw n=H(e)||e,Error(o(306,n,""))}}return n;case 0:return Ku(e,n,n.type,n.pendingProps,i);case 1:return r=n.type,u=ai(r,n.pendingProps),km(e,n,r,u,i);case 3:e:{if(re(n,n.stateNode.containerInfo),e===null)throw Error(o(387));r=n.pendingProps;var d=n.memoizedState;u=d.element,wu(e,n),Xl(n,r,null,i);var v=n.memoizedState;if(r=v.cache,fa(n,tt,r),r!==d.cache&&mu(n,[tt],i,!0),Yl(),r=v.element,d.isDehydrated)if(d={element:r,isDehydrated:!1,cache:v.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=jm(e,n,r,i);break e}else if(r!==u){u=$t(Error(o(424)),n),Ll(u),n=jm(e,n,r,i);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Xe=Qt(e.firstChild),ht=n,Ae=!0,ca=null,Gt=!0,i=Np(n,null,r,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(Ia(),r===u){n=Bn(e,n,i);break e}mt(e,n,r,i)}n=n.child}return n;case 26:return Xr(e,n),e===null?(i=X0(n.type,null,n.pendingProps,null))?n.memoizedState=i:Ae||(i=n.type,e=n.pendingProps,r=rs(ue.current).createElement(i),r[rt]=n,r[yt]=e,gt(r,i,e),et(r),n.stateNode=r):n.memoizedState=X0(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ee(n),e===null&&Ae&&(r=n.stateNode=V0(n.type,n.pendingProps,ue.current),ht=n,Gt=!0,u=Xe,Na(n.type)?(Df=u,Xe=Qt(r.firstChild)):Xe=u),mt(e,n,n.pendingProps.children,i),Xr(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ae&&((u=r=Xe)&&(r=rw(r,n.type,n.pendingProps,Gt),r!==null?(n.stateNode=r,ht=n,Xe=Qt(r.firstChild),Gt=!1,u=!0):u=!1),u||ua(n)),Ee(n),u=n.type,d=n.pendingProps,v=e!==null?e.memoizedProps:null,r=d.children,Af(u,d)?r=null:v!==null&&Af(u,v)&&(n.flags|=32),n.memoizedState!==null&&(u=ku(e,n,Sb,null,null,i),uo._currentValue=u),Xr(e,n),mt(e,n,r,i),n.child;case 6:return e===null&&Ae&&((e=i=Xe)&&(i=sw(i,n.pendingProps,Gt),i!==null?(n.stateNode=i,ht=n,Xe=null,e=!0):e=!1),e||ua(n)),null;case 13:return Am(e,n,i);case 4:return re(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=ti(n,null,r,i):mt(e,n,r,i),n.child;case 11:return wm(e,n,n.type,n.pendingProps,i);case 7:return mt(e,n,n.pendingProps,i),n.child;case 8:return mt(e,n,n.pendingProps.children,i),n.child;case 12:return mt(e,n,n.pendingProps.children,i),n.child;case 10:return r=n.pendingProps,fa(n,n.type,r.value),mt(e,n,r.children,i),n.child;case 9:return u=n.type._context,r=n.pendingProps.children,Ja(n),u=pt(u),r=r(u),n.flags|=1,mt(e,n,r,i),n.child;case 14:return Sm(e,n,n.type,n.pendingProps,i);case 15:return Em(e,n,n.type,n.pendingProps,i);case 19:return Rm(e,n,i);case 31:return Ab(e,n,i);case 22:return Nm(e,n,i,n.pendingProps);case 24:return Ja(n),r=pt(tt),e===null?(u=xu(),u===null&&(u=Ye,d=gu(),u.pooledCache=d,d.refCount++,d!==null&&(u.pooledCacheLanes|=i),u=d),n.memoizedState={parent:r,cache:u},bu(n),fa(n,tt,u)):((e.lanes&i)!==0&&(wu(e,n),Xl(n,null,null,i),Yl()),u=e.memoizedState,d=n.memoizedState,u.parent!==r?(u={parent:r,cache:r},n.memoizedState=u,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=u),fa(n,tt,r)):(r=d.cache,fa(n,tt,r),r!==u.cache&&mu(n,[tt],i,!0))),mt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(o(156,n.tag))}function Un(e){e.flags|=4}function nf(e,n,i,r,u){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(u&335544128)===u)if(e.stateNode.complete)e.flags|=8192;else if(o0())e.flags|=8192;else throw ei=jr,vu}else e.flags&=-16777217}function Om(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!I0(n))if(o0())e.flags|=8192;else throw ei=jr,vu}function Zr(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Po():536870912,e.lanes|=n,Ki|=n)}function Fl(e,n){if(!Ae)switch(e.tailMode){case"hidden":n=e.tail;for(var i=null;n!==null;)n.alternate!==null&&(i=n),n=n.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var r=null;i!==null;)i.alternate!==null&&(r=i),i=i.sibling;r===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ge(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,r=0;if(n)for(var u=e.child;u!==null;)i|=u.lanes|u.childLanes,r|=u.subtreeFlags&65011712,r|=u.flags&65011712,u.return=e,u=u.sibling;else for(u=e.child;u!==null;)i|=u.lanes|u.childLanes,r|=u.subtreeFlags,r|=u.flags,u.return=e,u=u.sibling;return e.subtreeFlags|=r,e.childLanes=i,n}function Rb(e,n,i){var r=n.pendingProps;switch(uu(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ge(n),null;case 1:return Ge(n),null;case 3:return i=n.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),n.memoizedState.cache!==r&&(n.flags|=2048),Dn(tt),fe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(Di(n)?Un(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,du())),Ge(n),null;case 26:var u=n.type,d=n.memoizedState;return e===null?(Un(n),d!==null?(Ge(n),Om(n,d)):(Ge(n),nf(n,u,null,r,i))):d?d!==e.memoizedState?(Un(n),Ge(n),Om(n,d)):(Ge(n),n.flags&=-16777217):(e=e.memoizedProps,e!==r&&Un(n),Ge(n),nf(n,u,e,r,i)),null;case 27:if(we(n),i=ue.current,u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==r&&Un(n);else{if(!r){if(n.stateNode===null)throw Error(o(166));return Ge(n),null}e=te.current,Di(n)?hp(n):(e=V0(u,r,i),n.stateNode=e,Un(n))}return Ge(n),null;case 5:if(we(n),u=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==r&&Un(n);else{if(!r){if(n.stateNode===null)throw Error(o(166));return Ge(n),null}if(d=te.current,Di(n))hp(n);else{var v=rs(ue.current);switch(d){case 1:d=v.createElementNS("http://www.w3.org/2000/svg",u);break;case 2:d=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;default:switch(u){case"svg":d=v.createElementNS("http://www.w3.org/2000/svg",u);break;case"math":d=v.createElementNS("http://www.w3.org/1998/Math/MathML",u);break;case"script":d=v.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof r.is=="string"?v.createElement("select",{is:r.is}):v.createElement("select"),r.multiple?d.multiple=!0:r.size&&(d.size=r.size);break;default:d=typeof r.is=="string"?v.createElement(u,{is:r.is}):v.createElement(u)}}d[rt]=n,d[yt]=r;e:for(v=n.child;v!==null;){if(v.tag===5||v.tag===6)d.appendChild(v.stateNode);else if(v.tag!==4&&v.tag!==27&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===n)break e;for(;v.sibling===null;){if(v.return===null||v.return===n)break e;v=v.return}v.sibling.return=v.return,v=v.sibling}n.stateNode=d;e:switch(gt(d,u,r),u){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Un(n)}}return Ge(n),nf(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==r&&Un(n);else{if(typeof r!="string"&&n.stateNode===null)throw Error(o(166));if(e=ue.current,Di(n)){if(e=n.stateNode,i=n.memoizedProps,r=null,u=ht,u!==null)switch(u.tag){case 27:case 5:r=u.memoizedProps}e[rt]=n,e=!!(e.nodeValue===i||r!==null&&r.suppressHydrationWarning===!0||A0(e.nodeValue,i)),e||ua(n,!0)}else e=rs(e).createTextNode(r),e[rt]=n,n.stateNode=e}return Ge(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(r=Di(n),i!==null){if(e===null){if(!r)throw Error(o(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[rt]=n}else Ia(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ge(n),e=!1}else i=du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(Dt(n),n):(Dt(n),null);if((n.flags&128)!==0)throw Error(o(558))}return Ge(n),null;case 13:if(r=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(u=Di(n),r!==null&&r.dehydrated!==null){if(e===null){if(!u)throw Error(o(318));if(u=n.memoizedState,u=u!==null?u.dehydrated:null,!u)throw Error(o(317));u[rt]=n}else Ia(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ge(n),u=!1}else u=du(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=u),u=!0;if(!u)return n.flags&256?(Dt(n),n):(Dt(n),null)}return Dt(n),(n.flags&128)!==0?(n.lanes=i,n):(i=r!==null,e=e!==null&&e.memoizedState!==null,i&&(r=n.child,u=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(u=r.alternate.memoizedState.cachePool.pool),d=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(d=r.memoizedState.cachePool.pool),d!==u&&(r.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Zr(n,n.updateQueue),Ge(n),null);case 4:return fe(),e===null&&_f(n.stateNode.containerInfo),Ge(n),null;case 10:return Dn(n.type),Ge(n),null;case 19:if(U(Pe),r=n.memoizedState,r===null)return Ge(n),null;if(u=(n.flags&128)!==0,d=r.rendering,d===null)if(u)Fl(r,!1);else{if(Je!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=zr(e),d!==null){for(n.flags|=128,Fl(r,!1),e=d.updateQueue,n.updateQueue=e,Zr(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)sp(i,e),i=i.sibling;return W(Pe,Pe.current&1|2),Ae&&zn(n,r.treeForkCount),n.child}e=e.sibling}r.tail!==null&&dt()>Jr&&(n.flags|=128,u=!0,Fl(r,!1),n.lanes=4194304)}else{if(!u)if(e=zr(d),e!==null){if(n.flags|=128,u=!0,e=e.updateQueue,n.updateQueue=e,Zr(n,e),Fl(r,!0),r.tail===null&&r.tailMode==="hidden"&&!d.alternate&&!Ae)return Ge(n),null}else 2*dt()-r.renderingStartTime>Jr&&i!==536870912&&(n.flags|=128,u=!0,Fl(r,!1),n.lanes=4194304);r.isBackwards?(d.sibling=n.child,n.child=d):(e=r.last,e!==null?e.sibling=d:n.child=d,r.last=d)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=dt(),e.sibling=null,i=Pe.current,W(Pe,u?i&1|2:i&1),Ae&&zn(n,r.treeForkCount),e):(Ge(n),null);case 22:case 23:return Dt(n),_u(),r=n.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(n.flags|=8192):r&&(n.flags|=8192),r?(i&536870912)!==0&&(n.flags&128)===0&&(Ge(n),n.subtreeFlags&6&&(n.flags|=8192)):Ge(n),i=n.updateQueue,i!==null&&Zr(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),r=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(r=n.memoizedState.cachePool.pool),r!==i&&(n.flags|=2048),e!==null&&U(Pa),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),Dn(tt),Ge(n),null;case 25:return null;case 30:return null}throw Error(o(156,n.tag))}function zb(e,n){switch(uu(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Dn(tt),fe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return we(n),null;case 31:if(n.memoizedState!==null){if(Dt(n),n.alternate===null)throw Error(o(340));Ia()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Dt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(o(340));Ia()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return U(Pe),null;case 4:return fe(),null;case 10:return Dn(n.type),null;case 22:case 23:return Dt(n),_u(),e!==null&&U(Pa),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Dn(tt),null;case 25:return null;default:return null}}function Dm(e,n){switch(uu(n),n.tag){case 3:Dn(tt),fe();break;case 26:case 27:case 5:we(n);break;case 4:fe();break;case 31:n.memoizedState!==null&&Dt(n);break;case 13:Dt(n);break;case 19:U(Pe);break;case 10:Dn(n.type);break;case 22:case 23:Dt(n),_u(),e!==null&&U(Pa);break;case 24:Dn(tt)}}function Jl(e,n){try{var i=n.updateQueue,r=i!==null?i.lastEffect:null;if(r!==null){var u=r.next;i=u;do{if((i.tag&e)===e){r=void 0;var d=i.create,v=i.inst;r=d(),v.destroy=r}i=i.next}while(i!==u)}}catch(_){Be(n,n.return,_)}}function ya(e,n,i){try{var r=n.updateQueue,u=r!==null?r.lastEffect:null;if(u!==null){var d=u.next;r=d;do{if((r.tag&e)===e){var v=r.inst,_=v.destroy;if(_!==void 0){v.destroy=void 0,u=n;var L=i,F=_;try{F()}catch(ae){Be(u,L,ae)}}}r=r.next}while(r!==d)}}catch(ae){Be(n,n.return,ae)}}function Hm(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{Cp(n,i)}catch(r){Be(e,e.return,r)}}}function Lm(e,n,i){i.props=ai(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(r){Be(e,n,r)}}function Pl(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof i=="function"?e.refCleanup=i(r):i.current=r}}catch(u){Be(e,n,u)}}function mn(e,n){var i=e.ref,r=e.refCleanup;if(i!==null)if(typeof r=="function")try{r()}catch(u){Be(e,n,u)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(u){Be(e,n,u)}else i.current=null}function Bm(e){var n=e.type,i=e.memoizedProps,r=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&r.focus();break e;case"img":i.src?r.src=i.src:i.srcSet&&(r.srcset=i.srcSet)}}catch(u){Be(e,e.return,u)}}function af(e,n,i){try{var r=e.stateNode;tw(r,e.type,i,n),r[yt]=n}catch(u){Be(e,e.return,u)}}function Um(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Na(e.type)||e.tag===4}function lf(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Um(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Na(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function of(e,n,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,n):(n=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,n.appendChild(e),i=i._reactRootContainer,i!=null||n.onclick!==null||(n.onclick=An));else if(r!==4&&(r===27&&Na(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(of(e,n,i),e=e.sibling;e!==null;)of(e,n,i),e=e.sibling}function Qr(e,n,i){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(r!==4&&(r===27&&Na(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Qr(e,n,i),e=e.sibling;e!==null;)Qr(e,n,i),e=e.sibling}function qm(e){var n=e.stateNode,i=e.memoizedProps;try{for(var r=e.type,u=n.attributes;u.length;)n.removeAttributeNode(u[0]);gt(n,r,i),n[rt]=e,n[yt]=i}catch(d){Be(e,e.return,d)}}var qn=!1,it=!1,rf=!1,Vm=typeof WeakSet=="function"?WeakSet:Set,ft=null;function Ob(e,n){if(e=e.containerInfo,kf=ps,e=Wh(e),Wc(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var r=i.getSelection&&i.getSelection();if(r&&r.rangeCount!==0){i=r.anchorNode;var u=r.anchorOffset,d=r.focusNode;r=r.focusOffset;try{i.nodeType,d.nodeType}catch{i=null;break e}var v=0,_=-1,L=-1,F=0,ae=0,oe=e,J=null;t:for(;;){for(var P;oe!==i||u!==0&&oe.nodeType!==3||(_=v+u),oe!==d||r!==0&&oe.nodeType!==3||(L=v+r),oe.nodeType===3&&(v+=oe.nodeValue.length),(P=oe.firstChild)!==null;)J=oe,oe=P;for(;;){if(oe===e)break t;if(J===i&&++F===u&&(_=v),J===d&&++ae===r&&(L=v),(P=oe.nextSibling)!==null)break;oe=J,J=oe.parentNode}oe=P}i=_===-1||L===-1?null:{start:_,end:L}}else i=null}i=i||{start:0,end:0}}else i=null;for(jf={focusedElem:e,selectionRange:i},ps=!1,ft=n;ft!==null;)if(n=ft,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,ft=e;else for(;ft!==null;){switch(n=ft,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)u=e[i],u.ref.impl=u.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,i=n,u=d.memoizedProps,d=d.memoizedState,r=i.stateNode;try{var de=ai(i.type,u);e=r.getSnapshotBeforeUpdate(de,d),r.__reactInternalSnapshotBeforeUpdate=e}catch(ye){Be(i,i.return,ye)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)Rf(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Rf(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=n.sibling,e!==null){e.return=n.return,ft=e;break}ft=n.return}}function $m(e,n,i){var r=i.flags;switch(i.tag){case 0:case 11:case 15:$n(e,i),r&4&&Jl(5,i);break;case 1:if($n(e,i),r&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(v){Be(i,i.return,v)}else{var u=ai(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(u,n,e.__reactInternalSnapshotBeforeUpdate)}catch(v){Be(i,i.return,v)}}r&64&&Hm(i),r&512&&Pl(i,i.return);break;case 3:if($n(e,i),r&64&&(e=i.updateQueue,e!==null)){if(n=null,i.child!==null)switch(i.child.tag){case 27:case 5:n=i.child.stateNode;break;case 1:n=i.child.stateNode}try{Cp(e,n)}catch(v){Be(i,i.return,v)}}break;case 27:n===null&&r&4&&qm(i);case 26:case 5:$n(e,i),n===null&&r&4&&Bm(i),r&512&&Pl(i,i.return);break;case 12:$n(e,i);break;case 31:$n(e,i),r&4&&Gm(e,i);break;case 13:$n(e,i),r&4&&Zm(e,i),r&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Yb.bind(null,i),cw(e,i))));break;case 22:if(r=i.memoizedState!==null||qn,!r){n=n!==null&&n.memoizedState!==null||it,u=qn;var d=it;qn=r,(it=n)&&!d?Yn(e,i,(i.subtreeFlags&8772)!==0):$n(e,i),qn=u,it=d}break;case 30:break;default:$n(e,i)}}function Ym(e){var n=e.alternate;n!==null&&(e.alternate=null,Ym(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Nl(n)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ze=null,_t=!1;function Vn(e,n,i){for(i=i.child;i!==null;)Xm(e,n,i),i=i.sibling}function Xm(e,n,i){if(vt&&typeof vt.onCommitFiberUnmount=="function")try{vt.onCommitFiberUnmount(Ba,i)}catch{}switch(i.tag){case 26:it||mn(i,n),Vn(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:it||mn(i,n);var r=Ze,u=_t;Na(i.type)&&(Ze=i.stateNode,_t=!1),Vn(e,n,i),ro(i.stateNode),Ze=r,_t=u;break;case 5:it||mn(i,n);case 6:if(r=Ze,u=_t,Ze=null,Vn(e,n,i),Ze=r,_t=u,Ze!==null)if(_t)try{(Ze.nodeType===9?Ze.body:Ze.nodeName==="HTML"?Ze.ownerDocument.body:Ze).removeChild(i.stateNode)}catch(d){Be(i,n,d)}else try{Ze.removeChild(i.stateNode)}catch(d){Be(i,n,d)}break;case 18:Ze!==null&&(_t?(e=Ze,H0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),nl(e)):H0(Ze,i.stateNode));break;case 4:r=Ze,u=_t,Ze=i.stateNode.containerInfo,_t=!0,Vn(e,n,i),Ze=r,_t=u;break;case 0:case 11:case 14:case 15:ya(2,i,n),it||ya(4,i,n),Vn(e,n,i);break;case 1:it||(mn(i,n),r=i.stateNode,typeof r.componentWillUnmount=="function"&&Lm(i,n,r)),Vn(e,n,i);break;case 21:Vn(e,n,i);break;case 22:it=(r=it)||i.memoizedState!==null,Vn(e,n,i),it=r;break;default:Vn(e,n,i)}}function Gm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{nl(e)}catch(i){Be(n,n.return,i)}}}function Zm(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{nl(e)}catch(i){Be(n,n.return,i)}}function Db(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Vm),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Vm),n;default:throw Error(o(435,e.tag))}}function Kr(e,n){var i=Db(e);n.forEach(function(r){if(!i.has(r)){i.add(r);var u=Xb.bind(null,e,r);r.then(u,u)}})}function Ct(e,n){var i=n.deletions;if(i!==null)for(var r=0;r<i.length;r++){var u=i[r],d=e,v=n,_=v;e:for(;_!==null;){switch(_.tag){case 27:if(Na(_.type)){Ze=_.stateNode,_t=!1;break e}break;case 5:Ze=_.stateNode,_t=!1;break e;case 3:case 4:Ze=_.stateNode.containerInfo,_t=!0;break e}_=_.return}if(Ze===null)throw Error(o(160));Xm(d,v,u),Ze=null,_t=!1,d=u.alternate,d!==null&&(d.return=null),u.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Qm(n,e),n=n.sibling}var nn=null;function Qm(e,n){var i=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Ct(n,e),Tt(e),r&4&&(ya(3,e,e.return),Jl(3,e),ya(5,e,e.return));break;case 1:Ct(n,e),Tt(e),r&512&&(it||i===null||mn(i,i.return)),r&64&&qn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?r:i.concat(r))));break;case 26:var u=nn;if(Ct(n,e),Tt(e),r&512&&(it||i===null||mn(i,i.return)),r&4){var d=i!==null?i.memoizedState:null;if(r=e.memoizedState,i===null)if(r===null)if(e.stateNode===null){e:{r=e.type,i=e.memoizedProps,u=u.ownerDocument||u;t:switch(r){case"title":d=u.getElementsByTagName("title")[0],(!d||d[Va]||d[rt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=u.createElement(r),u.head.insertBefore(d,u.querySelector("head > title"))),gt(d,r,i),d[rt]=e,et(d),r=d;break e;case"link":var v=Q0("link","href",u).get(r+(i.href||""));if(v){for(var _=0;_<v.length;_++)if(d=v[_],d.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&d.getAttribute("rel")===(i.rel==null?null:i.rel)&&d.getAttribute("title")===(i.title==null?null:i.title)&&d.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){v.splice(_,1);break t}}d=u.createElement(r),gt(d,r,i),u.head.appendChild(d);break;case"meta":if(v=Q0("meta","content",u).get(r+(i.content||""))){for(_=0;_<v.length;_++)if(d=v[_],d.getAttribute("content")===(i.content==null?null:""+i.content)&&d.getAttribute("name")===(i.name==null?null:i.name)&&d.getAttribute("property")===(i.property==null?null:i.property)&&d.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&d.getAttribute("charset")===(i.charSet==null?null:i.charSet)){v.splice(_,1);break t}}d=u.createElement(r),gt(d,r,i),u.head.appendChild(d);break;default:throw Error(o(468,r))}d[rt]=e,et(d),r=d}e.stateNode=r}else K0(u,e.type,e.stateNode);else e.stateNode=Z0(u,r,e.memoizedProps);else d!==r?(d===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):d.count--,r===null?K0(u,e.type,e.stateNode):Z0(u,r,e.memoizedProps)):r===null&&e.stateNode!==null&&af(e,e.memoizedProps,i.memoizedProps)}break;case 27:Ct(n,e),Tt(e),r&512&&(it||i===null||mn(i,i.return)),i!==null&&r&4&&af(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Ct(n,e),Tt(e),r&512&&(it||i===null||mn(i,i.return)),e.flags&32){u=e.stateNode;try{_i(u,"")}catch(de){Be(e,e.return,de)}}r&4&&e.stateNode!=null&&(u=e.memoizedProps,af(e,u,i!==null?i.memoizedProps:u)),r&1024&&(rf=!0);break;case 6:if(Ct(n,e),Tt(e),r&4){if(e.stateNode===null)throw Error(o(162));r=e.memoizedProps,i=e.stateNode;try{i.nodeValue=r}catch(de){Be(e,e.return,de)}}break;case 3:if(us=null,u=nn,nn=ss(n.containerInfo),Ct(n,e),nn=u,Tt(e),r&4&&i!==null&&i.memoizedState.isDehydrated)try{nl(n.containerInfo)}catch(de){Be(e,e.return,de)}rf&&(rf=!1,Km(e));break;case 4:r=nn,nn=ss(e.stateNode.containerInfo),Ct(n,e),Tt(e),nn=r;break;case 12:Ct(n,e),Tt(e);break;case 31:Ct(n,e),Tt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Kr(e,r)));break;case 13:Ct(n,e),Tt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(Fr=dt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Kr(e,r)));break;case 22:u=e.memoizedState!==null;var L=i!==null&&i.memoizedState!==null,F=qn,ae=it;if(qn=F||u,it=ae||L,Ct(n,e),it=ae,qn=F,Tt(e),r&8192)e:for(n=e.stateNode,n._visibility=u?n._visibility&-2:n._visibility|1,u&&(i===null||L||qn||it||ii(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){L=i=n;try{if(d=L.stateNode,u)v=d.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none";else{_=L.stateNode;var oe=L.memoizedProps.style,J=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;_.style.display=J==null||typeof J=="boolean"?"":(""+J).trim()}}catch(de){Be(L,L.return,de)}}}else if(n.tag===6){if(i===null){L=n;try{L.stateNode.nodeValue=u?"":L.memoizedProps}catch(de){Be(L,L.return,de)}}}else if(n.tag===18){if(i===null){L=n;try{var P=L.stateNode;u?L0(P,!0):L0(L.stateNode,!1)}catch(de){Be(L,L.return,de)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;i===n&&(i=null),n=n.return}i===n&&(i=null),n.sibling.return=n.return,n=n.sibling}r&4&&(r=e.updateQueue,r!==null&&(i=r.retryQueue,i!==null&&(r.retryQueue=null,Kr(e,i))));break;case 19:Ct(n,e),Tt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Kr(e,r)));break;case 30:break;case 21:break;default:Ct(n,e),Tt(e)}}function Tt(e){var n=e.flags;if(n&2){try{for(var i,r=e.return;r!==null;){if(Um(r)){i=r;break}r=r.return}if(i==null)throw Error(o(160));switch(i.tag){case 27:var u=i.stateNode,d=lf(e);Qr(e,d,u);break;case 5:var v=i.stateNode;i.flags&32&&(_i(v,""),i.flags&=-33);var _=lf(e);Qr(e,_,v);break;case 3:case 4:var L=i.stateNode.containerInfo,F=lf(e);of(e,F,L);break;default:throw Error(o(161))}}catch(ae){Be(e,e.return,ae)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Km(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Km(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function $n(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)$m(e,n.alternate,n),n=n.sibling}function ii(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:ya(4,n,n.return),ii(n);break;case 1:mn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Lm(n,n.return,i),ii(n);break;case 27:ro(n.stateNode);case 26:case 5:mn(n,n.return),ii(n);break;case 22:n.memoizedState===null&&ii(n);break;case 30:ii(n);break;default:ii(n)}e=e.sibling}}function Yn(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var r=n.alternate,u=e,d=n,v=d.flags;switch(d.tag){case 0:case 11:case 15:Yn(u,d,i),Jl(4,d);break;case 1:if(Yn(u,d,i),r=d,u=r.stateNode,typeof u.componentDidMount=="function")try{u.componentDidMount()}catch(F){Be(r,r.return,F)}if(r=d,u=r.updateQueue,u!==null){var _=r.stateNode;try{var L=u.shared.hiddenCallbacks;if(L!==null)for(u.shared.hiddenCallbacks=null,u=0;u<L.length;u++)_p(L[u],_)}catch(F){Be(r,r.return,F)}}i&&v&64&&Hm(d),Pl(d,d.return);break;case 27:qm(d);case 26:case 5:Yn(u,d,i),i&&r===null&&v&4&&Bm(d),Pl(d,d.return);break;case 12:Yn(u,d,i);break;case 31:Yn(u,d,i),i&&v&4&&Gm(u,d);break;case 13:Yn(u,d,i),i&&v&4&&Zm(u,d);break;case 22:d.memoizedState===null&&Yn(u,d,i),Pl(d,d.return);break;case 30:break;default:Yn(u,d,i)}n=n.sibling}}function sf(e,n){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&Bl(i))}function cf(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Bl(e))}function an(e,n,i,r){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Im(e,n,i,r),n=n.sibling}function Im(e,n,i,r){var u=n.flags;switch(n.tag){case 0:case 11:case 15:an(e,n,i,r),u&2048&&Jl(9,n);break;case 1:an(e,n,i,r);break;case 3:an(e,n,i,r),u&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Bl(e)));break;case 12:if(u&2048){an(e,n,i,r),e=n.stateNode;try{var d=n.memoizedProps,v=d.id,_=d.onPostCommit;typeof _=="function"&&_(v,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(L){Be(n,n.return,L)}}else an(e,n,i,r);break;case 31:an(e,n,i,r);break;case 13:an(e,n,i,r);break;case 23:break;case 22:d=n.stateNode,v=n.alternate,n.memoizedState!==null?d._visibility&2?an(e,n,i,r):Wl(e,n):d._visibility&2?an(e,n,i,r):(d._visibility|=2,Gi(e,n,i,r,(n.subtreeFlags&10256)!==0||!1)),u&2048&&sf(v,n);break;case 24:an(e,n,i,r),u&2048&&cf(n.alternate,n);break;default:an(e,n,i,r)}}function Gi(e,n,i,r,u){for(u=u&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,v=n,_=i,L=r,F=v.flags;switch(v.tag){case 0:case 11:case 15:Gi(d,v,_,L,u),Jl(8,v);break;case 23:break;case 22:var ae=v.stateNode;v.memoizedState!==null?ae._visibility&2?Gi(d,v,_,L,u):Wl(d,v):(ae._visibility|=2,Gi(d,v,_,L,u)),u&&F&2048&&sf(v.alternate,v);break;case 24:Gi(d,v,_,L,u),u&&F&2048&&cf(v.alternate,v);break;default:Gi(d,v,_,L,u)}n=n.sibling}}function Wl(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,r=n,u=r.flags;switch(r.tag){case 22:Wl(i,r),u&2048&&sf(r.alternate,r);break;case 24:Wl(i,r),u&2048&&cf(r.alternate,r);break;default:Wl(i,r)}n=n.sibling}}var eo=8192;function Zi(e,n,i){if(e.subtreeFlags&eo)for(e=e.child;e!==null;)Fm(e,n,i),e=e.sibling}function Fm(e,n,i){switch(e.tag){case 26:Zi(e,n,i),e.flags&eo&&e.memoizedState!==null&&ww(i,nn,e.memoizedState,e.memoizedProps);break;case 5:Zi(e,n,i);break;case 3:case 4:var r=nn;nn=ss(e.stateNode.containerInfo),Zi(e,n,i),nn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=eo,eo=16777216,Zi(e,n,i),eo=r):Zi(e,n,i));break;default:Zi(e,n,i)}}function Jm(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function to(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];ft=r,Wm(r,e)}Jm(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Pm(e),e=e.sibling}function Pm(e){switch(e.tag){case 0:case 11:case 15:to(e),e.flags&2048&&ya(9,e,e.return);break;case 3:to(e);break;case 12:to(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Ir(e)):to(e);break;default:to(e)}}function Ir(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var r=n[i];ft=r,Wm(r,e)}Jm(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:ya(8,n,n.return),Ir(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,Ir(n));break;default:Ir(n)}e=e.sibling}}function Wm(e,n){for(;ft!==null;){var i=ft;switch(i.tag){case 0:case 11:case 15:ya(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var r=i.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Bl(i.memoizedState.cache)}if(r=i.child,r!==null)r.return=i,ft=r;else e:for(i=e;ft!==null;){r=ft;var u=r.sibling,d=r.return;if(Ym(r),r===i){ft=null;break e}if(u!==null){u.return=d,ft=u;break e}ft=d}}}var Hb={getCacheForType:function(e){var n=pt(tt),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return pt(tt).controller.signal}},Lb=typeof WeakMap=="function"?WeakMap:Map,De=0,Ye=null,_e=null,ke=0,Le=0,Ht=null,xa=!1,Qi=!1,uf=!1,Xn=0,Je=0,va=0,li=0,ff=0,Lt=0,Ki=0,no=null,kt=null,df=!1,Fr=0,e0=0,Jr=1/0,Pr=null,ba=null,st=0,wa=null,Ii=null,Gn=0,hf=0,pf=null,t0=null,ao=0,mf=null;function Bt(){return(De&2)!==0&&ke!==0?ke&-ke:M.T!==null?wf():nr()}function n0(){if(Lt===0)if((ke&536870912)===0||Ae){var e=xi;xi<<=1,(xi&3932160)===0&&(xi=262144),Lt=e}else Lt=536870912;return e=Ot.current,e!==null&&(e.flags|=32),Lt}function jt(e,n,i){(e===Ye&&(Le===2||Le===9)||e.cancelPendingCommit!==null)&&(Fi(e,0),Sa(e,ke,Lt,!1)),qa(e,i),((De&2)===0||e!==Ye)&&(e===Ye&&((De&2)===0&&(li|=i),Je===4&&Sa(e,ke,Lt,!1)),gn(e))}function a0(e,n,i){if((De&6)!==0)throw Error(o(327));var r=!i&&(n&127)===0&&(n&e.expiredLanes)===0||Ua(e,n),u=r?qb(e,n):yf(e,n,!0),d=r;do{if(u===0){Qi&&!r&&Sa(e,n,0,!1);break}else{if(i=e.current.alternate,d&&!Bb(i)){u=yf(e,n,!1),d=!1;continue}if(u===2){if(d=n,e.errorRecoveryDisabledLanes&d)var v=0;else v=e.pendingLanes&-536870913,v=v!==0?v:v&536870912?536870912:0;if(v!==0){n=v;e:{var _=e;u=no;var L=_.current.memoizedState.isDehydrated;if(L&&(Fi(_,v).flags|=256),v=yf(_,v,!1),v!==2){if(uf&&!L){_.errorRecoveryDisabledLanes|=d,li|=d,u=4;break e}d=kt,kt=u,d!==null&&(kt===null?kt=d:kt.push.apply(kt,d))}u=v}if(d=!1,u!==2)continue}}if(u===1){Fi(e,0),Sa(e,n,0,!0);break}e:{switch(r=e,d=u,d){case 0:case 1:throw Error(o(345));case 4:if((n&4194048)!==n)break;case 6:Sa(r,n,Lt,!xa);break e;case 2:kt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((n&62914560)===n&&(u=Fr+300-dt(),10<u)){if(Sa(r,n,Lt,!xa),bi(r,0,!0)!==0)break e;Gn=n,r.timeoutHandle=O0(i0.bind(null,r,i,kt,Pr,df,n,Lt,li,Ki,xa,d,"Throttled",-0,0),u);break e}i0(r,i,kt,Pr,df,n,Lt,li,Ki,xa,d,null,-0,0)}}break}while(!0);gn(e)}function i0(e,n,i,r,u,d,v,_,L,F,ae,oe,J,P){if(e.timeoutHandle=-1,oe=n.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:An},Fm(n,d,oe);var de=(d&62914560)===d?Fr-dt():(d&4194048)===d?e0-dt():0;if(de=Sw(oe,de),de!==null){Gn=d,e.cancelPendingCommit=de(d0.bind(null,e,n,d,i,r,u,v,_,L,ae,oe,null,J,P)),Sa(e,d,v,!F);return}}d0(e,n,d,i,r,u,v,_,L)}function Bb(e){for(var n=e;;){var i=n.tag;if((i===0||i===11||i===15)&&n.flags&16384&&(i=n.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var r=0;r<i.length;r++){var u=i[r],d=u.getSnapshot;u=u.value;try{if(!Rt(d(),u))return!1}catch{return!1}}if(i=n.child,n.subtreeFlags&16384&&i!==null)i.return=n,n=i;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function Sa(e,n,i,r){n&=~ff,n&=~li,e.suspendedLanes|=n,e.pingedLanes&=~n,r&&(e.warmLanes|=n),r=e.expirationTimes;for(var u=n;0<u;){var d=31-bt(u),v=1<<d;r[d]=-1,u&=~v}i!==0&&Wo(e,i,n)}function Wr(){return(De&6)===0?(io(0),!1):!0}function gf(){if(_e!==null){if(Le===0)var e=_e.return;else e=_e,On=Fa=null,Mu(e),qi=null,ql=0,e=_e;for(;e!==null;)Dm(e.alternate,e),e=e.return;_e=null}}function Fi(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,iw(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Gn=0,gf(),Ye=e,_e=i=Rn(e.current,null),ke=n,Le=0,Ht=null,xa=!1,Qi=Ua(e,n),uf=!1,Ki=Lt=ff=li=va=Je=0,kt=no=null,df=!1,(n&8)!==0&&(n|=n&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=n;0<r;){var u=31-bt(r),d=1<<u;n|=e[u],r&=~d}return Xn=n,br(),i}function l0(e,n){Se=null,M.H=Kl,n===Ui||n===kr?(n=wp(),Le=3):n===vu?(n=wp(),Le=4):Le=n===Qu?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Ht=n,_e===null&&(Je=1,$r(e,$t(n,e.current)))}function o0(){var e=Ot.current;return e===null?!0:(ke&4194048)===ke?Zt===null:(ke&62914560)===ke||(ke&536870912)!==0?e===Zt:!1}function r0(){var e=M.H;return M.H=Kl,e===null?Kl:e}function s0(){var e=M.A;return M.A=Hb,e}function es(){Je=4,xa||(ke&4194048)!==ke&&Ot.current!==null||(Qi=!0),(va&134217727)===0&&(li&134217727)===0||Ye===null||Sa(Ye,ke,Lt,!1)}function yf(e,n,i){var r=De;De|=2;var u=r0(),d=s0();(Ye!==e||ke!==n)&&(Pr=null,Fi(e,n)),n=!1;var v=Je;e:do try{if(Le!==0&&_e!==null){var _=_e,L=Ht;switch(Le){case 8:gf(),v=6;break e;case 3:case 2:case 9:case 6:Ot.current===null&&(n=!0);var F=Le;if(Le=0,Ht=null,Ji(e,_,L,F),i&&Qi){v=0;break e}break;default:F=Le,Le=0,Ht=null,Ji(e,_,L,F)}}Ub(),v=Je;break}catch(ae){l0(e,ae)}while(!0);return n&&e.shellSuspendCounter++,On=Fa=null,De=r,M.H=u,M.A=d,_e===null&&(Ye=null,ke=0,br()),v}function Ub(){for(;_e!==null;)c0(_e)}function qb(e,n){var i=De;De|=2;var r=r0(),u=s0();Ye!==e||ke!==n?(Pr=null,Jr=dt()+500,Fi(e,n)):Qi=Ua(e,n);e:do try{if(Le!==0&&_e!==null){n=_e;var d=Ht;t:switch(Le){case 1:Le=0,Ht=null,Ji(e,n,d,1);break;case 2:case 9:if(vp(d)){Le=0,Ht=null,u0(n);break}n=function(){Le!==2&&Le!==9||Ye!==e||(Le=7),gn(e)},d.then(n,n);break e;case 3:Le=7;break e;case 4:Le=5;break e;case 7:vp(d)?(Le=0,Ht=null,u0(n)):(Le=0,Ht=null,Ji(e,n,d,7));break;case 5:var v=null;switch(_e.tag){case 26:v=_e.memoizedState;case 5:case 27:var _=_e;if(v?I0(v):_.stateNode.complete){Le=0,Ht=null;var L=_.sibling;if(L!==null)_e=L;else{var F=_.return;F!==null?(_e=F,ts(F)):_e=null}break t}}Le=0,Ht=null,Ji(e,n,d,5);break;case 6:Le=0,Ht=null,Ji(e,n,d,6);break;case 8:gf(),Je=6;break e;default:throw Error(o(462))}}Vb();break}catch(ae){l0(e,ae)}while(!0);return On=Fa=null,M.H=r,M.A=u,De=i,_e!==null?0:(Ye=null,ke=0,br(),Je)}function Vb(){for(;_e!==null&&!Da();)c0(_e)}function c0(e){var n=zm(e.alternate,e,Xn);e.memoizedProps=e.pendingProps,n===null?ts(e):_e=n}function u0(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=Tm(i,n,n.pendingProps,n.type,void 0,ke);break;case 11:n=Tm(i,n,n.pendingProps,n.type.render,n.ref,ke);break;case 5:Mu(n);default:Dm(i,n),n=_e=sp(n,Xn),n=zm(i,n,Xn)}e.memoizedProps=e.pendingProps,n===null?ts(e):_e=n}function Ji(e,n,i,r){On=Fa=null,Mu(n),qi=null,ql=0;var u=n.return;try{if(jb(e,u,n,i,ke)){Je=1,$r(e,$t(i,e.current)),_e=null;return}}catch(d){if(u!==null)throw _e=u,d;Je=1,$r(e,$t(i,e.current)),_e=null;return}n.flags&32768?(Ae||r===1?e=!0:Qi||(ke&536870912)!==0?e=!1:(xa=e=!0,(r===2||r===9||r===3||r===6)&&(r=Ot.current,r!==null&&r.tag===13&&(r.flags|=16384))),f0(n,e)):ts(n)}function ts(e){var n=e;do{if((n.flags&32768)!==0){f0(n,xa);return}e=n.return;var i=Rb(n.alternate,n,Xn);if(i!==null){_e=i;return}if(n=n.sibling,n!==null){_e=n;return}_e=n=e}while(n!==null);Je===0&&(Je=5)}function f0(e,n){do{var i=zb(e.alternate,e);if(i!==null){i.flags&=32767,_e=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){_e=e;return}_e=e=i}while(e!==null);Je=6,_e=null}function d0(e,n,i,r,u,d,v,_,L){e.cancelPendingCommit=null;do ns();while(st!==0);if((De&6)!==0)throw Error(o(327));if(n!==null){if(n===e.current)throw Error(o(177));if(d=n.lanes|n.childLanes,d|=iu,Oc(e,i,d,v,_,L),e===Ye&&(_e=Ye=null,ke=0),Ii=n,wa=e,Gn=i,hf=d,pf=u,t0=r,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Gb(La,function(){return y0(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||r){r=M.T,M.T=null,u=B.p,B.p=2,v=De,De|=4;try{Ob(e,n,i)}finally{De=v,B.p=u,M.T=r}}st=1,h0(),p0(),m0()}}function h0(){if(st===1){st=0;var e=wa,n=Ii,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=M.T,M.T=null;var r=B.p;B.p=2;var u=De;De|=4;try{Qm(n,e);var d=jf,v=Wh(e.containerInfo),_=d.focusedElem,L=d.selectionRange;if(v!==_&&_&&_.ownerDocument&&Ph(_.ownerDocument.documentElement,_)){if(L!==null&&Wc(_)){var F=L.start,ae=L.end;if(ae===void 0&&(ae=F),"selectionStart"in _)_.selectionStart=F,_.selectionEnd=Math.min(ae,_.value.length);else{var oe=_.ownerDocument||document,J=oe&&oe.defaultView||window;if(J.getSelection){var P=J.getSelection(),de=_.textContent.length,ye=Math.min(L.start,de),$e=L.end===void 0?ye:Math.min(L.end,de);!P.extend&&ye>$e&&(v=$e,$e=ye,ye=v);var X=Jh(_,ye),q=Jh(_,$e);if(X&&q&&(P.rangeCount!==1||P.anchorNode!==X.node||P.anchorOffset!==X.offset||P.focusNode!==q.node||P.focusOffset!==q.offset)){var I=oe.createRange();I.setStart(X.node,X.offset),P.removeAllRanges(),ye>$e?(P.addRange(I),P.extend(q.node,q.offset)):(I.setEnd(q.node,q.offset),P.addRange(I))}}}}for(oe=[],P=_;P=P.parentNode;)P.nodeType===1&&oe.push({element:P,left:P.scrollLeft,top:P.scrollTop});for(typeof _.focus=="function"&&_.focus(),_=0;_<oe.length;_++){var le=oe[_];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}ps=!!kf,jf=kf=null}finally{De=u,B.p=r,M.T=i}}e.current=n,st=2}}function p0(){if(st===2){st=0;var e=wa,n=Ii,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=M.T,M.T=null;var r=B.p;B.p=2;var u=De;De|=4;try{$m(e,n.alternate,n)}finally{De=u,B.p=r,M.T=i}}st=3}}function m0(){if(st===4||st===3){st=0,Ha();var e=wa,n=Ii,i=Gn,r=t0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?st=5:(st=0,Ii=wa=null,g0(e,e.pendingLanes));var u=e.pendingLanes;if(u===0&&(ba=null),El(i),n=n.stateNode,vt&&typeof vt.onCommitFiberRoot=="function")try{vt.onCommitFiberRoot(Ba,n,void 0,(n.current.flags&128)===128)}catch{}if(r!==null){n=M.T,u=B.p,B.p=2,M.T=null;try{for(var d=e.onRecoverableError,v=0;v<r.length;v++){var _=r[v];d(_.value,{componentStack:_.stack})}}finally{M.T=n,B.p=u}}(Gn&3)!==0&&ns(),gn(e),u=e.pendingLanes,(i&261930)!==0&&(u&42)!==0?e===mf?ao++:(ao=0,mf=e):ao=0,io(0)}}function g0(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Bl(n)))}function ns(){return h0(),p0(),m0(),y0()}function y0(){if(st!==5)return!1;var e=wa,n=hf;hf=0;var i=El(Gn),r=M.T,u=B.p;try{B.p=32>i?32:i,M.T=null,i=pf,pf=null;var d=wa,v=Gn;if(st=0,Ii=wa=null,Gn=0,(De&6)!==0)throw Error(o(331));var _=De;if(De|=4,Pm(d.current),Im(d,d.current,v,i),De=_,io(0,!1),vt&&typeof vt.onPostCommitFiberRoot=="function")try{vt.onPostCommitFiberRoot(Ba,d)}catch{}return!0}finally{B.p=u,M.T=r,g0(e,n)}}function x0(e,n,i){n=$t(i,n),n=Zu(e.stateNode,n,2),e=pa(e,n,2),e!==null&&(qa(e,2),gn(e))}function Be(e,n,i){if(e.tag===3)x0(e,e,i);else for(;n!==null;){if(n.tag===3){x0(n,e,i);break}else if(n.tag===1){var r=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ba===null||!ba.has(r))){e=$t(i,e),i=vm(2),r=pa(n,i,2),r!==null&&(bm(i,r,n,e),qa(r,2),gn(r));break}}n=n.return}}function xf(e,n,i){var r=e.pingCache;if(r===null){r=e.pingCache=new Lb;var u=new Set;r.set(n,u)}else u=r.get(n),u===void 0&&(u=new Set,r.set(n,u));u.has(i)||(uf=!0,u.add(i),e=$b.bind(null,e,n,i),n.then(e,e))}function $b(e,n,i){var r=e.pingCache;r!==null&&r.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,Ye===e&&(ke&i)===i&&(Je===4||Je===3&&(ke&62914560)===ke&&300>dt()-Fr?(De&2)===0&&Fi(e,0):ff|=i,Ki===ke&&(Ki=0)),gn(e)}function v0(e,n){n===0&&(n=Po()),e=Qa(e,n),e!==null&&(qa(e,n),gn(e))}function Yb(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),v0(e,i)}function Xb(e,n){var i=0;switch(e.tag){case 31:case 13:var r=e.stateNode,u=e.memoizedState;u!==null&&(i=u.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(o(314))}r!==null&&r.delete(n),v0(e,i)}function Gb(e,n){return Wt(e,n)}var as=null,Pi=null,vf=!1,is=!1,bf=!1,Ea=0;function gn(e){e!==Pi&&e.next===null&&(Pi===null?as=Pi=e:Pi=Pi.next=e),is=!0,vf||(vf=!0,Qb())}function io(e,n){if(!bf&&is){bf=!0;do for(var i=!1,r=as;r!==null;){if(e!==0){var u=r.pendingLanes;if(u===0)var d=0;else{var v=r.suspendedLanes,_=r.pingedLanes;d=(1<<31-bt(42|e)+1)-1,d&=u&~(v&~_),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(i=!0,E0(r,d))}else d=ke,d=bi(r,r===Ye?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(d&3)===0||Ua(r,d)||(i=!0,E0(r,d));r=r.next}while(i);bf=!1}}function Zb(){b0()}function b0(){is=vf=!1;var e=0;Ea!==0&&aw()&&(e=Ea);for(var n=dt(),i=null,r=as;r!==null;){var u=r.next,d=w0(r,n);d===0?(r.next=null,i===null?as=u:i.next=u,u===null&&(Pi=i)):(i=r,(e!==0||(d&3)!==0)&&(is=!0)),r=u}st!==0&&st!==5||io(e),Ea!==0&&(Ea=0)}function w0(e,n){for(var i=e.suspendedLanes,r=e.pingedLanes,u=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var v=31-bt(d),_=1<<v,L=u[v];L===-1?((_&i)===0||(_&r)!==0)&&(u[v]=zc(_,n)):L<=n&&(e.expiredLanes|=_),d&=~_}if(n=Ye,i=ke,i=bi(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,i===0||e===n&&(Le===2||Le===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Nn(r),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Ua(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(r!==null&&Nn(r),El(i)){case 2:case 8:i=ta;break;case 32:i=La;break;case 268435456:i=gi;break;default:i=La}return r=S0.bind(null,e),i=Wt(i,r),e.callbackPriority=n,e.callbackNode=i,n}return r!==null&&r!==null&&Nn(r),e.callbackPriority=2,e.callbackNode=null,2}function S0(e,n){if(st!==0&&st!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(ns()&&e.callbackNode!==i)return null;var r=ke;return r=bi(e,e===Ye?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(a0(e,r,n),w0(e,dt()),e.callbackNode!=null&&e.callbackNode===i?S0.bind(null,e):null)}function E0(e,n){if(ns())return null;a0(e,n,!0)}function Qb(){lw(function(){(De&6)!==0?Wt(_n,Zb):b0()})}function wf(){if(Ea===0){var e=Li;e===0&&(e=yi,yi<<=1,(yi&261888)===0&&(yi=256)),Ea=e}return Ea}function N0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:dr(""+e)}function _0(e,n){var i=n.ownerDocument.createElement("input");return i.name=n.name,i.value=n.value,e.id&&i.setAttribute("form",e.id),n.parentNode.insertBefore(i,n),e=new FormData(e),i.parentNode.removeChild(i),e}function Kb(e,n,i,r,u){if(n==="submit"&&i&&i.stateNode===u){var d=N0((u[yt]||null).action),v=r.submitter;v&&(n=(n=v[yt]||null)?N0(n.formAction):v.getAttribute("formAction"),n!==null&&(d=n,v=null));var _=new gr("action","action",null,r,u);e.push({event:_,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Ea!==0){var L=v?_0(u,v):new FormData(u);qu(i,{pending:!0,data:L,method:u.method,action:d},null,L)}}else typeof d=="function"&&(_.preventDefault(),L=v?_0(u,v):new FormData(u),qu(i,{pending:!0,data:L,method:u.method,action:d},d,L))},currentTarget:u}]})}}for(var Sf=0;Sf<au.length;Sf++){var Ef=au[Sf],Ib=Ef.toLowerCase(),Fb=Ef[0].toUpperCase()+Ef.slice(1);tn(Ib,"on"+Fb)}tn(np,"onAnimationEnd"),tn(ap,"onAnimationIteration"),tn(ip,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(db,"onTransitionRun"),tn(hb,"onTransitionStart"),tn(pb,"onTransitionCancel"),tn(lp,"onTransitionEnd"),oa("onMouseEnter",["mouseout","mouseover"]),oa("onMouseLeave",["mouseout","mouseover"]),oa("onPointerEnter",["pointerout","pointerover"]),oa("onPointerLeave",["pointerout","pointerover"]),kn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),kn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),kn("onBeforeInput",["compositionend","keypress","textInput","paste"]),kn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),kn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var lo="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(" "),Jb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(lo));function C0(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var r=e[i],u=r.event;r=r.listeners;e:{var d=void 0;if(n)for(var v=r.length-1;0<=v;v--){var _=r[v],L=_.instance,F=_.currentTarget;if(_=_.listener,L!==d&&u.isPropagationStopped())break e;d=_,u.currentTarget=F;try{d(u)}catch(ae){vr(ae)}u.currentTarget=null,d=L}else for(v=0;v<r.length;v++){if(_=r[v],L=_.instance,F=_.currentTarget,_=_.listener,L!==d&&u.isPropagationStopped())break e;d=_,u.currentTarget=F;try{d(u)}catch(ae){vr(ae)}u.currentTarget=null,d=L}}}}function Ce(e,n){var i=n[wi];i===void 0&&(i=n[wi]=new Set);var r=e+"__bubble";i.has(r)||(T0(n,e,2,!1),i.add(r))}function Nf(e,n,i){var r=0;n&&(r|=4),T0(i,e,r,n)}var ls="_reactListening"+Math.random().toString(36).slice(2);function _f(e){if(!e[ls]){e[ls]=!0,or.forEach(function(i){i!=="selectionchange"&&(Jb.has(i)||Nf(i,!1,e),Nf(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ls]||(n[ls]=!0,Nf("selectionchange",!1,n))}}function T0(e,n,i,r){switch(ng(n)){case 2:var u=_w;break;case 8:u=Cw;break;default:u=qf}i=u.bind(null,n,i,e),u=void 0,!Xc||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(u=!0),r?u!==void 0?e.addEventListener(n,i,{capture:!0,passive:u}):e.addEventListener(n,i,!0):u!==void 0?e.addEventListener(n,i,{passive:u}):e.addEventListener(n,i,!1)}function Cf(e,n,i,r,u){var d=r;if((n&1)===0&&(n&2)===0&&r!==null)e:for(;;){if(r===null)return;var v=r.tag;if(v===3||v===4){var _=r.stateNode.containerInfo;if(_===u)break;if(v===4)for(v=r.return;v!==null;){var L=v.tag;if((L===3||L===4)&&v.stateNode.containerInfo===u)return;v=v.return}for(;_!==null;){if(v=na(_),v===null)return;if(L=v.tag,L===5||L===6||L===26||L===27){r=d=v;continue e}_=_.parentNode}}r=r.return}Rh(function(){var F=d,ae=$c(i),oe=[];e:{var J=op.get(e);if(J!==void 0){var P=gr,de=e;switch(e){case"keypress":if(pr(i)===0)break e;case"keydown":case"keyup":P=X1;break;case"focusin":de="focus",P=Kc;break;case"focusout":de="blur",P=Kc;break;case"beforeblur":case"afterblur":P=Kc;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":P=Dh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":P=R1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":P=Q1;break;case np:case ap:case ip:P=D1;break;case lp:P=I1;break;case"scroll":case"scrollend":P=A1;break;case"wheel":P=J1;break;case"copy":case"cut":case"paste":P=L1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":P=Lh;break;case"toggle":case"beforetoggle":P=W1}var ye=(n&4)!==0,$e=!ye&&(e==="scroll"||e==="scrollend"),X=ye?J!==null?J+"Capture":null:J;ye=[];for(var q=F,I;q!==null;){var le=q;if(I=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||I===null||X===null||(le=Tl(q,X),le!=null&&ye.push(oo(q,le,I))),$e)break;q=q.return}0<ye.length&&(J=new P(J,de,null,i,ae),oe.push({event:J,listeners:ye}))}}if((n&7)===0){e:{if(J=e==="mouseover"||e==="pointerover",P=e==="mouseout"||e==="pointerout",J&&i!==Vc&&(de=i.relatedTarget||i.fromElement)&&(na(de)||de[Tn]))break e;if((P||J)&&(J=ae.window===ae?ae:(J=ae.ownerDocument)?J.defaultView||J.parentWindow:window,P?(de=i.relatedTarget||i.toElement,P=F,de=de?na(de):null,de!==null&&($e=c(de),ye=de.tag,de!==$e||ye!==5&&ye!==27&&ye!==6)&&(de=null)):(P=null,de=F),P!==de)){if(ye=Dh,le="onMouseLeave",X="onMouseEnter",q="mouse",(e==="pointerout"||e==="pointerover")&&(ye=Lh,le="onPointerLeave",X="onPointerEnter",q="pointer"),$e=P==null?J:ia(P),I=de==null?J:ia(de),J=new ye(le,q+"leave",P,i,ae),J.target=$e,J.relatedTarget=I,le=null,na(ae)===F&&(ye=new ye(X,q+"enter",de,i,ae),ye.target=I,ye.relatedTarget=$e,le=ye),$e=le,P&&de)t:{for(ye=Pb,X=P,q=de,I=0,le=X;le;le=ye(le))I++;le=0;for(var me=q;me;me=ye(me))le++;for(;0<I-le;)X=ye(X),I--;for(;0<le-I;)q=ye(q),le--;for(;I--;){if(X===q||q!==null&&X===q.alternate){ye=X;break t}X=ye(X),q=ye(q)}ye=null}else ye=null;P!==null&&k0(oe,J,P,ye,!1),de!==null&&$e!==null&&k0(oe,$e,de,ye,!0)}}e:{if(J=F?ia(F):window,P=J.nodeName&&J.nodeName.toLowerCase(),P==="select"||P==="input"&&J.type==="file")var ze=Gh;else if(Yh(J))if(Zh)ze=cb;else{ze=rb;var he=ob}else P=J.nodeName,!P||P.toLowerCase()!=="input"||J.type!=="checkbox"&&J.type!=="radio"?F&&qc(F.elementType)&&(ze=Gh):ze=sb;if(ze&&(ze=ze(e,F))){Xh(oe,ze,i,ae);break e}he&&he(e,J,F),e==="focusout"&&F&&J.type==="number"&&F.memoizedProps.value!=null&&Cl(J,"number",J.value)}switch(he=F?ia(F):window,e){case"focusin":(Yh(he)||he.contentEditable==="true")&&(ji=he,eu=F,Dl=null);break;case"focusout":Dl=eu=ji=null;break;case"mousedown":tu=!0;break;case"contextmenu":case"mouseup":case"dragend":tu=!1,ep(oe,i,ae);break;case"selectionchange":if(fb)break;case"keydown":case"keyup":ep(oe,i,ae)}var Ne;if(Fc)e:{switch(e){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else ki?Vh(e,i)&&(je="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(je="onCompositionStart");je&&(Bh&&i.locale!=="ko"&&(ki||je!=="onCompositionStart"?je==="onCompositionEnd"&&ki&&(Ne=zh()):(ra=ae,Gc="value"in ra?ra.value:ra.textContent,ki=!0)),he=os(F,je),0<he.length&&(je=new Hh(je,e,null,i,ae),oe.push({event:je,listeners:he}),Ne?je.data=Ne:(Ne=$h(i),Ne!==null&&(je.data=Ne)))),(Ne=tb?nb(e,i):ab(e,i))&&(je=os(F,"onBeforeInput"),0<je.length&&(he=new Hh("onBeforeInput","beforeinput",null,i,ae),oe.push({event:he,listeners:je}),he.data=Ne)),Kb(oe,e,F,i,ae)}C0(oe,n)})}function oo(e,n,i){return{instance:e,listener:n,currentTarget:i}}function os(e,n){for(var i=n+"Capture",r=[];e!==null;){var u=e,d=u.stateNode;if(u=u.tag,u!==5&&u!==26&&u!==27||d===null||(u=Tl(e,i),u!=null&&r.unshift(oo(e,u,d)),u=Tl(e,n),u!=null&&r.push(oo(e,u,d))),e.tag===3)return r;e=e.return}return[]}function Pb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function k0(e,n,i,r,u){for(var d=n._reactName,v=[];i!==null&&i!==r;){var _=i,L=_.alternate,F=_.stateNode;if(_=_.tag,L!==null&&L===r)break;_!==5&&_!==26&&_!==27||F===null||(L=F,u?(F=Tl(i,d),F!=null&&v.unshift(oo(i,F,L))):u||(F=Tl(i,d),F!=null&&v.push(oo(i,F,L)))),i=i.return}v.length!==0&&e.push({event:n,listeners:v})}var Wb=/\r\n?/g,ew=/\u0000|\uFFFD/g;function j0(e){return(typeof e=="string"?e:""+e).replace(Wb,`
9
+ `).replace(ew,"")}function A0(e,n){return n=j0(n),j0(e)===n}function Ve(e,n,i,r,u,d){switch(i){case"children":typeof r=="string"?n==="body"||n==="textarea"&&r===""||_i(e,r):(typeof r=="number"||typeof r=="bigint")&&n!=="body"&&_i(e,""+r);break;case"className":Ei(e,"class",r);break;case"tabIndex":Ei(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Ei(e,i,r);break;case"style":Ah(e,r,d);break;case"data":if(n!=="object"){Ei(e,"data",r);break}case"src":case"href":if(r===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=dr(""+r),e.setAttribute(i,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(i,"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 d=="function"&&(i==="formAction"?(n!=="input"&&Ve(e,n,"name",u.name,u,null),Ve(e,n,"formEncType",u.formEncType,u,null),Ve(e,n,"formMethod",u.formMethod,u,null),Ve(e,n,"formTarget",u.formTarget,u,null)):(Ve(e,n,"encType",u.encType,u,null),Ve(e,n,"method",u.method,u,null),Ve(e,n,"target",u.target,u,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(i);break}r=dr(""+r),e.setAttribute(i,r);break;case"onClick":r!=null&&(e.onclick=An);break;case"onScroll":r!=null&&Ce("scroll",e);break;case"onScrollEnd":r!=null&&Ce("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}i=dr(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""+r):e.removeAttribute(i);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":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":r===!0?e.setAttribute(i,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(i,r):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(i,r):e.removeAttribute(i);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(i):e.setAttribute(i,r);break;case"popover":Ce("beforetoggle",e),Ce("toggle",e),Si(e,"popover",r);break;case"xlinkActuate":en(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":en(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":en(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":en(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":en(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":en(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":en(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":en(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":en(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Si(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=k1.get(i)||i,Si(e,i,r))}}function Tf(e,n,i,r,u,d){switch(i){case"style":Ah(e,r,d);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(o(61));if(i=r.__html,i!=null){if(u.children!=null)throw Error(o(60));e.innerHTML=i}}break;case"children":typeof r=="string"?_i(e,r):(typeof r=="number"||typeof r=="bigint")&&_i(e,""+r);break;case"onScroll":r!=null&&Ce("scroll",e);break;case"onScrollEnd":r!=null&&Ce("scrollend",e);break;case"onClick":r!=null&&(e.onclick=An);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!rr.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(u=i.endsWith("Capture"),n=i.slice(2,u?i.length-7:void 0),d=e[yt]||null,d=d!=null?d[i]:null,typeof d=="function"&&e.removeEventListener(n,d,u),typeof r=="function")){typeof d!="function"&&d!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,r,u);break e}i in e?e[i]=r:r===!0?e.setAttribute(i,""):Si(e,i,r)}}}function gt(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ce("error",e),Ce("load",e);var r=!1,u=!1,d;for(d in i)if(i.hasOwnProperty(d)){var v=i[d];if(v!=null)switch(d){case"src":r=!0;break;case"srcSet":u=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:Ve(e,n,d,v,i,null)}}u&&Ve(e,n,"srcSet",i.srcSet,i,null),r&&Ve(e,n,"src",i.src,i,null);return;case"input":Ce("invalid",e);var _=d=v=u=null,L=null,F=null;for(r in i)if(i.hasOwnProperty(r)){var ae=i[r];if(ae!=null)switch(r){case"name":u=ae;break;case"type":v=ae;break;case"checked":L=ae;break;case"defaultChecked":F=ae;break;case"value":d=ae;break;case"defaultValue":_=ae;break;case"children":case"dangerouslySetInnerHTML":if(ae!=null)throw Error(o(137,n));break;default:Ve(e,n,r,ae,i,null)}}fr(e,d,_,L,F,v,u,!1);return;case"select":Ce("invalid",e),r=v=d=null;for(u in i)if(i.hasOwnProperty(u)&&(_=i[u],_!=null))switch(u){case"value":d=_;break;case"defaultValue":v=_;break;case"multiple":r=_;default:Ve(e,n,u,_,i,null)}n=d,i=v,e.multiple=!!r,n!=null?jn(e,!!r,n,!1):i!=null&&jn(e,!!r,i,!0);return;case"textarea":Ce("invalid",e),d=u=r=null;for(v in i)if(i.hasOwnProperty(v)&&(_=i[v],_!=null))switch(v){case"value":r=_;break;case"defaultValue":u=_;break;case"children":d=_;break;case"dangerouslySetInnerHTML":if(_!=null)throw Error(o(91));break;default:Ve(e,n,v,_,i,null)}kh(e,r,u,d);return;case"option":for(L in i)i.hasOwnProperty(L)&&(r=i[L],r!=null)&&(L==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":Ve(e,n,L,r,i,null));return;case"dialog":Ce("beforetoggle",e),Ce("toggle",e),Ce("cancel",e),Ce("close",e);break;case"iframe":case"object":Ce("load",e);break;case"video":case"audio":for(r=0;r<lo.length;r++)Ce(lo[r],e);break;case"image":Ce("error",e),Ce("load",e);break;case"details":Ce("toggle",e);break;case"embed":case"source":case"link":Ce("error",e),Ce("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(F in i)if(i.hasOwnProperty(F)&&(r=i[F],r!=null))switch(F){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,n));default:Ve(e,n,F,r,i,null)}return;default:if(qc(n)){for(ae in i)i.hasOwnProperty(ae)&&(r=i[ae],r!==void 0&&Tf(e,n,ae,r,i,void 0));return}}for(_ in i)i.hasOwnProperty(_)&&(r=i[_],r!=null&&Ve(e,n,_,r,i,null))}function tw(e,n,i,r){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var u=null,d=null,v=null,_=null,L=null,F=null,ae=null;for(P in i){var oe=i[P];if(i.hasOwnProperty(P)&&oe!=null)switch(P){case"checked":break;case"value":break;case"defaultValue":L=oe;default:r.hasOwnProperty(P)||Ve(e,n,P,null,r,oe)}}for(var J in r){var P=r[J];if(oe=i[J],r.hasOwnProperty(J)&&(P!=null||oe!=null))switch(J){case"type":d=P;break;case"name":u=P;break;case"checked":F=P;break;case"defaultChecked":ae=P;break;case"value":v=P;break;case"defaultValue":_=P;break;case"children":case"dangerouslySetInnerHTML":if(P!=null)throw Error(o(137,n));break;default:P!==oe&&Ve(e,n,J,P,r,oe)}}Ya(e,v,_,L,F,ae,d,u);return;case"select":P=v=_=J=null;for(d in i)if(L=i[d],i.hasOwnProperty(d)&&L!=null)switch(d){case"value":break;case"multiple":P=L;default:r.hasOwnProperty(d)||Ve(e,n,d,null,r,L)}for(u in r)if(d=r[u],L=i[u],r.hasOwnProperty(u)&&(d!=null||L!=null))switch(u){case"value":J=d;break;case"defaultValue":_=d;break;case"multiple":v=d;default:d!==L&&Ve(e,n,u,d,r,L)}n=_,i=v,r=P,J!=null?jn(e,!!i,J,!1):!!r!=!!i&&(n!=null?jn(e,!!i,n,!0):jn(e,!!i,i?[]:"",!1));return;case"textarea":P=J=null;for(_ in i)if(u=i[_],i.hasOwnProperty(_)&&u!=null&&!r.hasOwnProperty(_))switch(_){case"value":break;case"children":break;default:Ve(e,n,_,null,r,u)}for(v in r)if(u=r[v],d=i[v],r.hasOwnProperty(v)&&(u!=null||d!=null))switch(v){case"value":J=u;break;case"defaultValue":P=u;break;case"children":break;case"dangerouslySetInnerHTML":if(u!=null)throw Error(o(91));break;default:u!==d&&Ve(e,n,v,u,r,d)}Th(e,J,P);return;case"option":for(var de in i)J=i[de],i.hasOwnProperty(de)&&J!=null&&!r.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Ve(e,n,de,null,r,J));for(L in r)J=r[L],P=i[L],r.hasOwnProperty(L)&&J!==P&&(J!=null||P!=null)&&(L==="selected"?e.selected=J&&typeof J!="function"&&typeof J!="symbol":Ve(e,n,L,J,r,P));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 ye in i)J=i[ye],i.hasOwnProperty(ye)&&J!=null&&!r.hasOwnProperty(ye)&&Ve(e,n,ye,null,r,J);for(F in r)if(J=r[F],P=i[F],r.hasOwnProperty(F)&&J!==P&&(J!=null||P!=null))switch(F){case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(o(137,n));break;default:Ve(e,n,F,J,r,P)}return;default:if(qc(n)){for(var $e in i)J=i[$e],i.hasOwnProperty($e)&&J!==void 0&&!r.hasOwnProperty($e)&&Tf(e,n,$e,void 0,r,J);for(ae in r)J=r[ae],P=i[ae],!r.hasOwnProperty(ae)||J===P||J===void 0&&P===void 0||Tf(e,n,ae,J,r,P);return}}for(var X in i)J=i[X],i.hasOwnProperty(X)&&J!=null&&!r.hasOwnProperty(X)&&Ve(e,n,X,null,r,J);for(oe in r)J=r[oe],P=i[oe],!r.hasOwnProperty(oe)||J===P||J==null&&P==null||Ve(e,n,oe,J,r,P)}function M0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nw(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),r=0;r<i.length;r++){var u=i[r],d=u.transferSize,v=u.initiatorType,_=u.duration;if(d&&_&&M0(v)){for(v=0,_=u.responseEnd,r+=1;r<i.length;r++){var L=i[r],F=L.startTime;if(F>_)break;var ae=L.transferSize,oe=L.initiatorType;ae&&M0(oe)&&(L=L.responseEnd,v+=ae*(L<_?1:(_-F)/(L-F)))}if(--r,n+=8*(d+v)/(u.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var kf=null,jf=null;function rs(e){return e.nodeType===9?e:e.ownerDocument}function R0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function z0(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Af(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Mf=null;function aw(){var e=window.event;return e&&e.type==="popstate"?e===Mf?!1:(Mf=e,!0):(Mf=null,!1)}var O0=typeof setTimeout=="function"?setTimeout:void 0,iw=typeof clearTimeout=="function"?clearTimeout:void 0,D0=typeof Promise=="function"?Promise:void 0,lw=typeof queueMicrotask=="function"?queueMicrotask:typeof D0<"u"?function(e){return D0.resolve(null).then(e).catch(ow)}:O0;function ow(e){setTimeout(function(){throw e})}function Na(e){return e==="head"}function H0(e,n){var i=n,r=0;do{var u=i.nextSibling;if(e.removeChild(i),u&&u.nodeType===8)if(i=u.data,i==="/$"||i==="/&"){if(r===0){e.removeChild(u),nl(n);return}r--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")r++;else if(i==="html")ro(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,ro(i);for(var d=i.firstChild;d;){var v=d.nextSibling,_=d.nodeName;d[Va]||_==="SCRIPT"||_==="STYLE"||_==="LINK"&&d.rel.toLowerCase()==="stylesheet"||i.removeChild(d),d=v}}else i==="body"&&ro(e.ownerDocument.body);i=u}while(i);nl(n)}function L0(e,n){var i=e;e=0;do{var r=i.nextSibling;if(i.nodeType===1?n?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(n?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),r&&r.nodeType===8)if(i=r.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=r}while(i)}function Rf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var i=n;switch(n=n.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":Rf(i),Nl(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function rw(e,n,i,r){for(;e.nodeType===1;){var u=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Va])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==u.rel||e.getAttribute("href")!==(u.href==null||u.href===""?null:u.href)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin)||e.getAttribute("title")!==(u.title==null?null:u.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(u.src==null?null:u.src)||e.getAttribute("type")!==(u.type==null?null:u.type)||e.getAttribute("crossorigin")!==(u.crossOrigin==null?null:u.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=u.name==null?null:""+u.name;if(u.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=Qt(e.nextSibling),e===null)break}return null}function sw(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Qt(e.nextSibling),e===null))return null;return e}function B0(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Qt(e.nextSibling),e===null))return null;return e}function zf(e){return e.data==="$?"||e.data==="$~"}function Of(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function cw(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var r=function(){n(),i.removeEventListener("DOMContentLoaded",r)};i.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function Qt(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Df=null;function U0(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return Qt(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function q0(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(n===0)return e;n--}else i!=="/$"&&i!=="/&"||n++}e=e.previousSibling}return null}function V0(e,n,i){switch(n=rs(i),e){case"html":if(e=n.documentElement,!e)throw Error(o(452));return e;case"head":if(e=n.head,!e)throw Error(o(453));return e;case"body":if(e=n.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function ro(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Nl(e)}var Kt=new Map,$0=new Set;function ss(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Zn=B.d;B.d={f:uw,r:fw,D:dw,C:hw,L:pw,m:mw,X:yw,S:gw,M:xw};function uw(){var e=Zn.f(),n=Wr();return e||n}function fw(e){var n=aa(e);n!==null&&n.tag===5&&n.type==="form"?lm(n):Zn.r(e)}var Wi=typeof document>"u"?null:document;function Y0(e,n,i){var r=Wi;if(r&&typeof n=="string"&&n){var u=Et(n);u='link[rel="'+e+'"][href="'+u+'"]',typeof i=="string"&&(u+='[crossorigin="'+i+'"]'),$0.has(u)||($0.add(u),e={rel:e,crossOrigin:i,href:n},r.querySelector(u)===null&&(n=r.createElement("link"),gt(n,"link",e),et(n),r.head.appendChild(n)))}}function dw(e){Zn.D(e),Y0("dns-prefetch",e,null)}function hw(e,n){Zn.C(e,n),Y0("preconnect",e,n)}function pw(e,n,i){Zn.L(e,n,i);var r=Wi;if(r&&e&&n){var u='link[rel="preload"][as="'+Et(n)+'"]';n==="image"&&i&&i.imageSrcSet?(u+='[imagesrcset="'+Et(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(u+='[imagesizes="'+Et(i.imageSizes)+'"]')):u+='[href="'+Et(e)+'"]';var d=u;switch(n){case"style":d=el(e);break;case"script":d=tl(e)}Kt.has(d)||(e=y({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),Kt.set(d,e),r.querySelector(u)!==null||n==="style"&&r.querySelector(so(d))||n==="script"&&r.querySelector(co(d))||(n=r.createElement("link"),gt(n,"link",e),et(n),r.head.appendChild(n)))}}function mw(e,n){Zn.m(e,n);var i=Wi;if(i&&e){var r=n&&typeof n.as=="string"?n.as:"script",u='link[rel="modulepreload"][as="'+Et(r)+'"][href="'+Et(e)+'"]',d=u;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=tl(e)}if(!Kt.has(d)&&(e=y({rel:"modulepreload",href:e},n),Kt.set(d,e),i.querySelector(u)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(co(d)))return}r=i.createElement("link"),gt(r,"link",e),et(r),i.head.appendChild(r)}}}function gw(e,n,i){Zn.S(e,n,i);var r=Wi;if(r&&e){var u=la(r).hoistableStyles,d=el(e);n=n||"default";var v=u.get(d);if(!v){var _={loading:0,preload:null};if(v=r.querySelector(so(d)))_.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},i),(i=Kt.get(d))&&Hf(e,i);var L=v=r.createElement("link");et(L),gt(L,"link",e),L._p=new Promise(function(F,ae){L.onload=F,L.onerror=ae}),L.addEventListener("load",function(){_.loading|=1}),L.addEventListener("error",function(){_.loading|=2}),_.loading|=4,cs(v,n,r)}v={type:"stylesheet",instance:v,count:1,state:_},u.set(d,v)}}}function yw(e,n){Zn.X(e,n);var i=Wi;if(i&&e){var r=la(i).hoistableScripts,u=tl(e),d=r.get(u);d||(d=i.querySelector(co(u)),d||(e=y({src:e,async:!0},n),(n=Kt.get(u))&&Lf(e,n),d=i.createElement("script"),et(d),gt(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(u,d))}}function xw(e,n){Zn.M(e,n);var i=Wi;if(i&&e){var r=la(i).hoistableScripts,u=tl(e),d=r.get(u);d||(d=i.querySelector(co(u)),d||(e=y({src:e,async:!0,type:"module"},n),(n=Kt.get(u))&&Lf(e,n),d=i.createElement("script"),et(d),gt(d,"link",e),i.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},r.set(u,d))}}function X0(e,n,i,r){var u=(u=ue.current)?ss(u):null;if(!u)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=el(i.href),i=la(u).hoistableStyles,r=i.get(n),r||(r={type:"style",instance:null,count:0,state:null},i.set(n,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=el(i.href);var d=la(u).hoistableStyles,v=d.get(e);if(v||(u=u.ownerDocument||u,v={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,v),(d=u.querySelector(so(e)))&&!d._p&&(v.instance=d,v.state.loading=5),Kt.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},Kt.set(e,i),d||vw(u,e,i,v.state))),n&&r===null)throw Error(o(528,""));return v}if(n&&r!==null)throw Error(o(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=tl(i),i=la(u).hoistableScripts,r=i.get(n),r||(r={type:"script",instance:null,count:0,state:null},i.set(n,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function el(e){return'href="'+Et(e)+'"'}function so(e){return'link[rel="stylesheet"]['+e+"]"}function G0(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function vw(e,n,i,r){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?r.loading=1:(n=e.createElement("link"),r.preload=n,n.addEventListener("load",function(){return r.loading|=1}),n.addEventListener("error",function(){return r.loading|=2}),gt(n,"link",i),et(n),e.head.appendChild(n))}function tl(e){return'[src="'+Et(e)+'"]'}function co(e){return"script[async]"+e}function Z0(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var r=e.querySelector('style[data-href~="'+Et(i.href)+'"]');if(r)return n.instance=r,et(r),r;var u=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),et(r),gt(r,"style",u),cs(r,i.precedence,e),n.instance=r;case"stylesheet":u=el(i.href);var d=e.querySelector(so(u));if(d)return n.state.loading|=4,n.instance=d,et(d),d;r=G0(i),(u=Kt.get(u))&&Hf(r,u),d=(e.ownerDocument||e).createElement("link"),et(d);var v=d;return v._p=new Promise(function(_,L){v.onload=_,v.onerror=L}),gt(d,"link",r),n.state.loading|=4,cs(d,i.precedence,e),n.instance=d;case"script":return d=tl(i.src),(u=e.querySelector(co(d)))?(n.instance=u,et(u),u):(r=i,(u=Kt.get(d))&&(r=y({},i),Lf(r,u)),e=e.ownerDocument||e,u=e.createElement("script"),et(u),gt(u,"link",r),e.head.appendChild(u),n.instance=u);case"void":return null;default:throw Error(o(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(r=n.instance,n.state.loading|=4,cs(r,i.precedence,e));return n.instance}function cs(e,n,i){for(var r=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),u=r.length?r[r.length-1]:null,d=u,v=0;v<r.length;v++){var _=r[v];if(_.dataset.precedence===n)d=_;else if(d!==u)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function Hf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Lf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var us=null;function Q0(e,n,i){if(us===null){var r=new Map,u=us=new Map;u.set(i,r)}else u=us,r=u.get(i),r||(r=new Map,u.set(i,r));if(r.has(e))return r;for(r.set(e,null),i=i.getElementsByTagName(e),u=0;u<i.length;u++){var d=i[u];if(!(d[Va]||d[rt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var v=d.getAttribute(n)||"";v=e+v;var _=r.get(v);_?_.push(d):r.set(v,[d])}}return r}function K0(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function bw(e,n,i){if(i===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function I0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function ww(e,n,i,r){if(i.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var u=el(r.href),d=n.querySelector(so(u));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=fs.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=d,et(d);return}d=n.ownerDocument||n,r=G0(r),(u=Kt.get(u))&&Hf(r,u),d=d.createElement("link"),et(d);var v=d;v._p=new Promise(function(_,L){v.onload=_,v.onerror=L}),gt(d,"link",r),i.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=fs.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var Bf=0;function Sw(e,n){return e.stylesheets&&e.count===0&&hs(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var r=setTimeout(function(){if(e.stylesheets&&hs(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Bf===0&&(Bf=62500*nw());var u=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hs(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Bf?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(u)}}:null}function fs(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hs(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ds=null;function hs(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ds=new Map,n.forEach(Ew,e),ds=null,fs.call(e))}function Ew(e,n){if(!(n.state.loading&4)){var i=ds.get(e);if(i)var r=i.get(null);else{i=new Map,ds.set(e,i);for(var u=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<u.length;d++){var v=u[d];(v.nodeName==="LINK"||v.getAttribute("media")!=="not all")&&(i.set(v.dataset.precedence,v),r=v)}r&&i.set(null,r)}u=n.instance,v=u.getAttribute("data-precedence"),d=i.get(v)||r,d===r&&i.set(null,u),i.set(v,u),this.count++,r=fs.bind(this),u.addEventListener("load",r),u.addEventListener("error",r),d?d.parentNode.insertBefore(u,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(u,e.firstChild)),n.state.loading|=4}}var uo={$$typeof:S,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Nw(e,n,i,r,u,d,v,_,L){this.tag=1,this.containerInfo=e,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=wl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wl(0),this.hiddenUpdates=wl(null),this.identifierPrefix=r,this.onUncaughtError=u,this.onCaughtError=d,this.onRecoverableError=v,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function F0(e,n,i,r,u,d,v,_,L,F,ae,oe){return e=new Nw(e,n,i,v,L,F,ae,oe,_),n=1,d===!0&&(n|=24),d=zt(3,null,null,n),e.current=d,d.stateNode=e,n=gu(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:r,isDehydrated:i,cache:n},bu(d),e}function J0(e){return e?(e=Ri,e):Ri}function P0(e,n,i,r,u,d){u=J0(u),r.context===null?r.context=u:r.pendingContext=u,r=ha(n),r.payload={element:i},d=d===void 0?null:d,d!==null&&(r.callback=d),i=pa(e,r,n),i!==null&&(jt(i,e,n),$l(i,e,n))}function W0(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function Uf(e,n){W0(e,n),(e=e.alternate)&&W0(e,n)}function eg(e){if(e.tag===13||e.tag===31){var n=Qa(e,67108864);n!==null&&jt(n,e,67108864),Uf(e,67108864)}}function tg(e){if(e.tag===13||e.tag===31){var n=Bt();n=Sl(n);var i=Qa(e,n);i!==null&&jt(i,e,n),Uf(e,n)}}var ps=!0;function _w(e,n,i,r){var u=M.T;M.T=null;var d=B.p;try{B.p=2,qf(e,n,i,r)}finally{B.p=d,M.T=u}}function Cw(e,n,i,r){var u=M.T;M.T=null;var d=B.p;try{B.p=8,qf(e,n,i,r)}finally{B.p=d,M.T=u}}function qf(e,n,i,r){if(ps){var u=Vf(r);if(u===null)Cf(e,n,r,ms,i),ag(e,r);else if(kw(u,e,n,i,r))r.stopPropagation();else if(ag(e,r),n&4&&-1<Tw.indexOf(e)){for(;u!==null;){var d=aa(u);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var v=Cn(d.pendingLanes);if(v!==0){var _=d;for(_.pendingLanes|=2,_.entangledLanes|=2;v;){var L=1<<31-bt(v);_.entanglements[1]|=L,v&=~L}gn(d),(De&6)===0&&(Jr=dt()+500,io(0))}}break;case 31:case 13:_=Qa(d,2),_!==null&&jt(_,d,2),Wr(),Uf(d,2)}if(d=Vf(r),d===null&&Cf(e,n,r,ms,i),d===u)break;u=d}u!==null&&r.stopPropagation()}else Cf(e,n,r,null,i)}}function Vf(e){return e=$c(e),$f(e)}var ms=null;function $f(e){if(ms=null,e=na(e),e!==null){var n=c(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=f(n),e!==null)return e;e=null}else if(i===31){if(e=h(n),e!==null)return e;e=null}else if(i===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return ms=e,null}function ng(e){switch(e){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(mi()){case _n:return 2;case ta:return 8;case La:case Tc:return 32;case gi:return 268435456;default:return 32}default:return 32}}var Yf=!1,_a=null,Ca=null,Ta=null,fo=new Map,ho=new Map,ka=[],Tw="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 ag(e,n){switch(e){case"focusin":case"focusout":_a=null;break;case"dragenter":case"dragleave":Ca=null;break;case"mouseover":case"mouseout":Ta=null;break;case"pointerover":case"pointerout":fo.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ho.delete(n.pointerId)}}function po(e,n,i,r,u,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:i,eventSystemFlags:r,nativeEvent:d,targetContainers:[u]},n!==null&&(n=aa(n),n!==null&&eg(n)),e):(e.eventSystemFlags|=r,n=e.targetContainers,u!==null&&n.indexOf(u)===-1&&n.push(u),e)}function kw(e,n,i,r,u){switch(n){case"focusin":return _a=po(_a,e,n,i,r,u),!0;case"dragenter":return Ca=po(Ca,e,n,i,r,u),!0;case"mouseover":return Ta=po(Ta,e,n,i,r,u),!0;case"pointerover":var d=u.pointerId;return fo.set(d,po(fo.get(d)||null,e,n,i,r,u)),!0;case"gotpointercapture":return d=u.pointerId,ho.set(d,po(ho.get(d)||null,e,n,i,r,u)),!0}return!1}function ig(e){var n=na(e.target);if(n!==null){var i=c(n);if(i!==null){if(n=i.tag,n===13){if(n=f(i),n!==null){e.blockedOn=n,ar(e.priority,function(){tg(i)});return}}else if(n===31){if(n=h(i),n!==null){e.blockedOn=n,ar(e.priority,function(){tg(i)});return}}else if(n===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function gs(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=Vf(e.nativeEvent);if(i===null){i=e.nativeEvent;var r=new i.constructor(i.type,i);Vc=r,i.target.dispatchEvent(r),Vc=null}else return n=aa(i),n!==null&&eg(n),e.blockedOn=i,!1;n.shift()}return!0}function lg(e,n,i){gs(e)&&i.delete(n)}function jw(){Yf=!1,_a!==null&&gs(_a)&&(_a=null),Ca!==null&&gs(Ca)&&(Ca=null),Ta!==null&&gs(Ta)&&(Ta=null),fo.forEach(lg),ho.forEach(lg)}function ys(e,n){e.blockedOn===n&&(e.blockedOn=null,Yf||(Yf=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,jw)))}var xs=null;function og(e){xs!==e&&(xs=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){xs===e&&(xs=null);for(var n=0;n<e.length;n+=3){var i=e[n],r=e[n+1],u=e[n+2];if(typeof r!="function"){if($f(r||i)===null)continue;break}var d=aa(i);d!==null&&(e.splice(n,3),n-=3,qu(d,{pending:!0,data:u,method:i.method,action:r},r,u))}}))}function nl(e){function n(L){return ys(L,e)}_a!==null&&ys(_a,e),Ca!==null&&ys(Ca,e),Ta!==null&&ys(Ta,e),fo.forEach(n),ho.forEach(n);for(var i=0;i<ka.length;i++){var r=ka[i];r.blockedOn===e&&(r.blockedOn=null)}for(;0<ka.length&&(i=ka[0],i.blockedOn===null);)ig(i),i.blockedOn===null&&ka.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(r=0;r<i.length;r+=3){var u=i[r],d=i[r+1],v=u[yt]||null;if(typeof d=="function")v||og(i);else if(v){var _=null;if(d&&d.hasAttribute("formAction")){if(u=d,v=d[yt]||null)_=v.formAction;else if($f(u)!==null)continue}else _=v.action;typeof _=="function"?i[r+1]=_:(i.splice(r,3),r-=3),og(i)}}}function rg(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(v){return u=v})},focusReset:"manual",scroll:"manual"})}function n(){u!==null&&(u(),u=null),r||setTimeout(i,20)}function i(){if(!r&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,u=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),u!==null&&(u(),u=null)}}}function Xf(e){this._internalRoot=e}vs.prototype.render=Xf.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(o(409));var i=n.current,r=Bt();P0(i,r,e,n,null,null)},vs.prototype.unmount=Xf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;P0(e.current,2,null,e,null,null),Wr(),n[Tn]=null}};function vs(e){this._internalRoot=e}vs.prototype.unstable_scheduleHydration=function(e){if(e){var n=nr();e={blockedOn:null,target:e,priority:n};for(var i=0;i<ka.length&&n!==0&&n<ka[i].priority;i++);ka.splice(i,0,e),i===0&&ig(e)}};var sg=a.version;if(sg!=="19.2.3")throw Error(o(527,sg,"19.2.3"));B.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=p(n),e=e!==null?x(e):null,e=e===null?null:e.stateNode,e};var Aw={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:M,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bs=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bs.isDisabled&&bs.supportsFiber)try{Ba=bs.inject(Aw),vt=bs}catch{}}return go.createRoot=function(e,n){if(!s(e))throw Error(o(299));var i=!1,r="",u=mm,d=gm,v=ym;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(u=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(v=n.onRecoverableError)),n=F0(e,1,!1,null,null,i,r,null,u,d,v,rg),e[Tn]=n.current,_f(e),new Xf(n)},go.hydrateRoot=function(e,n,i){if(!s(e))throw Error(o(299));var r=!1,u="",d=mm,v=gm,_=ym,L=null;return i!=null&&(i.unstable_strictMode===!0&&(r=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(v=i.onCaughtError),i.onRecoverableError!==void 0&&(_=i.onRecoverableError),i.formState!==void 0&&(L=i.formState)),n=F0(e,1,!0,n,i??null,r,u,L,d,v,_,rg),n.context=J0(null),i=n.current,r=Bt(),r=Sl(r),u=ha(r),u.callback=null,pa(i,u,r),i=r,n.current.lanes=i,qa(n,i),gn(n),e[Tn]=n.current,_f(e),new vs(n)},go.version="19.2.3",go}var xg;function Uw(){if(xg)return Qf.exports;xg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(a){console.error(a)}}return t(),Qf.exports=Bw(),Qf.exports}var qw=Uw();var vg="popstate";function Vw(t={}){function a(o,s){let{pathname:c,search:f,hash:h}=o.location;return gd("",{pathname:c,search:f,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default")}function l(o,s){return typeof s=="string"?s:To(s)}return Yw(a,l,null,t)}function Ie(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function bn(t,a){if(!t){typeof console<"u"&&console.warn(a);try{throw new Error(a)}catch{}}}function $w(){return Math.random().toString(36).substring(2,10)}function bg(t,a){return{usr:t.state,key:t.key,idx:a}}function gd(t,a,l=null,o){return{pathname:typeof t=="string"?t:t.pathname,search:"",hash:"",...typeof a=="string"?yl(a):a,state:l,key:a&&a.key||o||$w()}}function To({pathname:t="/",search:a="",hash:l=""}){return a&&a!=="?"&&(t+=a.charAt(0)==="?"?a:"?"+a),l&&l!=="#"&&(t+=l.charAt(0)==="#"?l:"#"+l),t}function yl(t){let a={};if(t){let l=t.indexOf("#");l>=0&&(a.hash=t.substring(l),t=t.substring(0,l));let o=t.indexOf("?");o>=0&&(a.search=t.substring(o),t=t.substring(0,o)),t&&(a.pathname=t)}return a}function Yw(t,a,l,o={}){let{window:s=document.defaultView,v5Compat:c=!1}=o,f=s.history,h="POP",g=null,p=x();p==null&&(p=0,f.replaceState({...f.state,idx:p},""));function x(){return(f.state||{idx:null}).idx}function y(){h="POP";let T=x(),k=T==null?null:T-p;p=T,g&&g({action:h,location:N.location,delta:k})}function b(T,k){h="PUSH";let A=gd(N.location,T,k);p=x()+1;let S=bg(A,p),C=N.createHref(A);try{f.pushState(S,"",C)}catch(D){if(D instanceof DOMException&&D.name==="DataCloneError")throw D;s.location.assign(C)}c&&g&&g({action:h,location:N.location,delta:1})}function w(T,k){h="REPLACE";let A=gd(N.location,T,k);p=x();let S=bg(A,p),C=N.createHref(A);f.replaceState(S,"",C),c&&g&&g({action:h,location:N.location,delta:0})}function E(T){return Xw(T)}let N={get action(){return h},get location(){return t(s,f)},listen(T){if(g)throw new Error("A history only accepts one active listener");return s.addEventListener(vg,y),g=T,()=>{s.removeEventListener(vg,y),g=null}},createHref(T){return a(s,T)},createURL:E,encodeLocation(T){let k=E(T);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:b,replace:w,go(T){return f.go(T)}};return N}function Xw(t,a=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),Ie(l,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:To(t);return o=o.replace(/ $/,"%20"),!a&&o.startsWith("//")&&(o=l+o),new URL(o,l)}function Zy(t,a,l="/"){return Gw(t,a,l,!1)}function Gw(t,a,l,o){let s=typeof a=="string"?yl(a):a,c=Jn(s.pathname||"/",l);if(c==null)return null;let f=Qy(t);Zw(f);let h=null;for(let g=0;h==null&&g<f.length;++g){let p=a2(c);h=t2(f[g],p,o)}return h}function Qy(t,a=[],l=[],o="",s=!1){let c=(f,h,g=s,p)=>{let x={relativePath:p===void 0?f.path||"":p,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(x.relativePath.startsWith("/")){if(!x.relativePath.startsWith(o)&&g)return;Ie(x.relativePath.startsWith(o),`Absolute route path "${x.relativePath}" nested under path "${o}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),x.relativePath=x.relativePath.slice(o.length)}let y=In([o,x.relativePath]),b=l.concat(x);f.children&&f.children.length>0&&(Ie(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Qy(f.children,a,b,y,g)),!(f.path==null&&!f.index)&&a.push({path:y,score:Ww(y,f.index),routesMeta:b})};return t.forEach((f,h)=>{if(f.path===""||!f.path?.includes("?"))c(f,h);else for(let g of Ky(f.path))c(f,h,!0,g)}),a}function Ky(t){let a=t.split("/");if(a.length===0)return[];let[l,...o]=a,s=l.endsWith("?"),c=l.replace(/\?$/,"");if(o.length===0)return s?[c,""]:[c];let f=Ky(o.join("/")),h=[];return h.push(...f.map(g=>g===""?c:[c,g].join("/"))),s&&h.push(...f),h.map(g=>t.startsWith("/")&&g===""?"/":g)}function Zw(t){t.sort((a,l)=>a.score!==l.score?l.score-a.score:e2(a.routesMeta.map(o=>o.childrenIndex),l.routesMeta.map(o=>o.childrenIndex)))}var Qw=/^:[\w-]+$/,Kw=3,Iw=2,Fw=1,Jw=10,Pw=-2,wg=t=>t==="*";function Ww(t,a){let l=t.split("/"),o=l.length;return l.some(wg)&&(o+=Pw),a&&(o+=Iw),l.filter(s=>!wg(s)).reduce((s,c)=>s+(Qw.test(c)?Kw:c===""?Fw:Jw),o)}function e2(t,a){return t.length===a.length&&t.slice(0,-1).every((o,s)=>o===a[s])?t[t.length-1]-a[a.length-1]:0}function t2(t,a,l=!1){let{routesMeta:o}=t,s={},c="/",f=[];for(let h=0;h<o.length;++h){let g=o[h],p=h===o.length-1,x=c==="/"?a:a.slice(c.length)||"/",y=Gs({path:g.relativePath,caseSensitive:g.caseSensitive,end:p},x),b=g.route;if(!y&&p&&l&&!o[o.length-1].route.index&&(y=Gs({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},x)),!y)return null;Object.assign(s,y.params),f.push({params:s,pathname:In([c,y.pathname]),pathnameBase:r2(In([c,y.pathnameBase])),route:b}),y.pathnameBase!=="/"&&(c=In([c,y.pathnameBase]))}return f}function Gs(t,a){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[l,o]=n2(t.path,t.caseSensitive,t.end),s=a.match(l);if(!s)return null;let c=s[0],f=c.replace(/(.)\/+$/,"$1"),h=s.slice(1);return{params:o.reduce((p,{paramName:x,isOptional:y},b)=>{if(x==="*"){let E=h[b]||"";f=c.slice(0,c.length-E.length).replace(/(.)\/+$/,"$1")}const w=h[b];return y&&!w?p[x]=void 0:p[x]=(w||"").replace(/%2F/g,"/"),p},{}),pathname:c,pathnameBase:f,pattern:t}}function n2(t,a=!1,l=!0){bn(t==="*"||!t.endsWith("*")||t.endsWith("/*"),`Route path "${t}" will be treated as if it were "${t.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${t.replace(/\*$/,"/*")}".`);let o=[],s="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,g)=>(o.push({paramName:h,isOptional:g!=null}),g?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return t.endsWith("*")?(o.push({paramName:"*"}),s+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?s+="\\/*$":t!==""&&t!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,a?void 0:"i"),o]}function a2(t){try{return t.split("/").map(a=>decodeURIComponent(a).replace(/\//g,"%2F")).join("/")}catch(a){return bn(!1,`The URL path "${t}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${a}).`),t}}function Jn(t,a){if(a==="/")return t;if(!t.toLowerCase().startsWith(a.toLowerCase()))return null;let l=a.endsWith("/")?a.length-1:a.length,o=t.charAt(l);return o&&o!=="/"?null:t.slice(l)||"/"}var i2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function l2(t,a="/"){let{pathname:l,search:o="",hash:s=""}=typeof t=="string"?yl(t):t,c;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?c=Sg(l.substring(1),"/"):c=Sg(l,a)):c=a,{pathname:c,search:s2(o),hash:c2(s)}}function Sg(t,a){let l=a.replace(/\/+$/,"").split("/");return t.split("/").forEach(s=>{s===".."?l.length>1&&l.pop():s!=="."&&l.push(s)}),l.length>1?l.join("/"):"/"}function Jf(t,a,l,o){return`Cannot include a '${t}' character in a manually specified \`to.${a}\` field [${JSON.stringify(o)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function o2(t){return t.filter((a,l)=>l===0||a.route.path&&a.route.path.length>0)}function Iy(t){let a=o2(t);return a.map((l,o)=>o===a.length-1?l.pathname:l.pathnameBase)}function Fy(t,a,l,o=!1){let s;typeof t=="string"?s=yl(t):(s={...t},Ie(!s.pathname||!s.pathname.includes("?"),Jf("?","pathname","search",s)),Ie(!s.pathname||!s.pathname.includes("#"),Jf("#","pathname","hash",s)),Ie(!s.search||!s.search.includes("#"),Jf("#","search","hash",s)));let c=t===""||s.pathname==="",f=c?"/":s.pathname,h;if(f==null)h=l;else{let y=a.length-1;if(!o&&f.startsWith("..")){let b=f.split("/");for(;b[0]==="..";)b.shift(),y-=1;s.pathname=b.join("/")}h=y>=0?a[y]:"/"}let g=l2(s,h),p=f&&f!=="/"&&f.endsWith("/"),x=(c||f===".")&&l.endsWith("/");return!g.pathname.endsWith("/")&&(p||x)&&(g.pathname+="/"),g}var In=t=>t.join("/").replace(/\/\/+/g,"/"),r2=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),s2=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,c2=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t,u2=class{constructor(t,a,l,o=!1){this.status=t,this.statusText=a||"",this.internal=o,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function f2(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}function d2(t){return t.map(a=>a.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Jy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Py(t,a){let l=t;if(typeof l!="string"||!i2.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let o=l,s=!1;if(Jy)try{let c=new URL(window.location.href),f=l.startsWith("//")?new URL(c.protocol+l):new URL(l),h=Jn(f.pathname,a);f.origin===c.origin&&h!=null?l=h+f.search+f.hash:s=!0}catch{bn(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:o,isExternal:s,to:l}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Wy=["POST","PUT","PATCH","DELETE"];new Set(Wy);var h2=["GET",...Wy];new Set(h2);var xl=j.createContext(null);xl.displayName="DataRouter";var sc=j.createContext(null);sc.displayName="DataRouterState";var p2=j.createContext(!1),ex=j.createContext({isTransitioning:!1});ex.displayName="ViewTransition";var m2=j.createContext(new Map);m2.displayName="Fetchers";var g2=j.createContext(null);g2.displayName="Await";var Jt=j.createContext(null);Jt.displayName="Navigation";var Uo=j.createContext(null);Uo.displayName="Location";var Wn=j.createContext({outlet:null,matches:[],isDataRoute:!1});Wn.displayName="Route";var Yd=j.createContext(null);Yd.displayName="RouteError";var tx="REACT_ROUTER_ERROR",y2="REDIRECT",x2="ROUTE_ERROR_RESPONSE";function v2(t){if(t.startsWith(`${tx}:${y2}:{`))try{let a=JSON.parse(t.slice(28));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string"&&typeof a.location=="string"&&typeof a.reloadDocument=="boolean"&&typeof a.replace=="boolean")return a}catch{}}function b2(t){if(t.startsWith(`${tx}:${x2}:{`))try{let a=JSON.parse(t.slice(40));if(typeof a=="object"&&a&&typeof a.status=="number"&&typeof a.statusText=="string")return new u2(a.status,a.statusText,a.data)}catch{}}function w2(t,{relative:a}={}){Ie(qo(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:o}=j.useContext(Jt),{hash:s,pathname:c,search:f}=Vo(t,{relative:a}),h=c;return l!=="/"&&(h=c==="/"?l:In([l,c])),o.createHref({pathname:h,search:f,hash:s})}function qo(){return j.useContext(Uo)!=null}function pi(){return Ie(qo(),"useLocation() may be used only in the context of a <Router> component."),j.useContext(Uo).location}var nx="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function ax(t){j.useContext(Jt).static||j.useLayoutEffect(t)}function Xd(){let{isDataRoute:t}=j.useContext(Wn);return t?O2():S2()}function S2(){Ie(qo(),"useNavigate() may be used only in the context of a <Router> component.");let t=j.useContext(xl),{basename:a,navigator:l}=j.useContext(Jt),{matches:o}=j.useContext(Wn),{pathname:s}=pi(),c=JSON.stringify(Iy(o)),f=j.useRef(!1);return ax(()=>{f.current=!0}),j.useCallback((g,p={})=>{if(bn(f.current,nx),!f.current)return;if(typeof g=="number"){l.go(g);return}let x=Fy(g,JSON.parse(c),s,p.relative==="path");t==null&&a!=="/"&&(x.pathname=x.pathname==="/"?a:In([a,x.pathname])),(p.replace?l.replace:l.push)(x,p.state,p)},[a,l,c,s,t])}j.createContext(null);function Vo(t,{relative:a}={}){let{matches:l}=j.useContext(Wn),{pathname:o}=pi(),s=JSON.stringify(Iy(l));return j.useMemo(()=>Fy(t,JSON.parse(s),o,a==="path"),[t,s,o,a])}function E2(t,a){return ix(t,a)}function ix(t,a,l,o,s){Ie(qo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=j.useContext(Jt),{matches:f}=j.useContext(Wn),h=f[f.length-1],g=h?h.params:{},p=h?h.pathname:"/",x=h?h.pathnameBase:"/",y=h&&h.route;{let A=y&&y.path||"";ox(p,!y||A.endsWith("*")||A.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${p}" (under <Route path="${A}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
10
+
11
+ Please change the parent <Route path="${A}"> to <Route path="${A==="/"?"*":`${A}/*`}">.`)}let b=pi(),w;if(a){let A=typeof a=="string"?yl(a):a;Ie(x==="/"||A.pathname?.startsWith(x),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${x}" but pathname "${A.pathname}" was given in the \`location\` prop.`),w=A}else w=b;let E=w.pathname||"/",N=E;if(x!=="/"){let A=x.replace(/^\//,"").split("/");N="/"+E.replace(/^\//,"").split("/").slice(A.length).join("/")}let T=Zy(t,{pathname:N});bn(y||T!=null,`No routes matched location "${w.pathname}${w.search}${w.hash}" `),bn(T==null||T[T.length-1].route.element!==void 0||T[T.length-1].route.Component!==void 0||T[T.length-1].route.lazy!==void 0,`Matched leaf route at location "${w.pathname}${w.search}${w.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let k=k2(T&&T.map(A=>Object.assign({},A,{params:Object.assign({},g,A.params),pathname:In([x,c.encodeLocation?c.encodeLocation(A.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathname]),pathnameBase:A.pathnameBase==="/"?x:In([x,c.encodeLocation?c.encodeLocation(A.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:A.pathnameBase])})),f,l,o,s);return a&&k?j.createElement(Uo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...w},navigationType:"POP"}},k):k}function N2(){let t=z2(),a=f2(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:JSON.stringify(t),l=t instanceof Error?t.stack:null,o="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:o},c={padding:"2px 4px",backgroundColor:o},f=null;return console.error("Error handled by React Router default ErrorBoundary:",t),f=j.createElement(j.Fragment,null,j.createElement("p",null,"💿 Hey developer 👋"),j.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",j.createElement("code",{style:c},"ErrorBoundary")," or"," ",j.createElement("code",{style:c},"errorElement")," prop on your route.")),j.createElement(j.Fragment,null,j.createElement("h2",null,"Unexpected Application Error!"),j.createElement("h3",{style:{fontStyle:"italic"}},a),l?j.createElement("pre",{style:s},l):null,f)}var _2=j.createElement(N2,null),lx=class extends j.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,a){return a.location!==t.location||a.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:a.error,location:a.location,revalidation:t.revalidation||a.revalidation}}componentDidCatch(t,a){this.props.onError?this.props.onError(t,a):console.error("React Router caught the following error during render",t)}render(){let t=this.state.error;if(this.context&&typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){const l=b2(t.digest);l&&(t=l)}let a=t!==void 0?j.createElement(Wn.Provider,{value:this.props.routeContext},j.createElement(Yd.Provider,{value:t,children:this.props.component})):this.props.children;return this.context?j.createElement(C2,{error:t},a):a}};lx.contextType=p2;var Pf=new WeakMap;function C2({children:t,error:a}){let{basename:l}=j.useContext(Jt);if(typeof a=="object"&&a&&"digest"in a&&typeof a.digest=="string"){let o=v2(a.digest);if(o){let s=Pf.get(a);if(s)throw s;let c=Py(o.location,l);if(Jy&&!Pf.get(a))if(c.isExternal||o.reloadDocument)window.location.href=c.absoluteURL||c.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(c.to,{replace:o.replace}));throw Pf.set(a,f),f}return j.createElement("meta",{httpEquiv:"refresh",content:`0;url=${c.absoluteURL||c.to}`})}}return t}function T2({routeContext:t,match:a,children:l}){let o=j.useContext(xl);return o&&o.static&&o.staticContext&&(a.route.errorElement||a.route.ErrorBoundary)&&(o.staticContext._deepestRenderedBoundaryId=a.route.id),j.createElement(Wn.Provider,{value:t},l)}function k2(t,a=[],l=null,o=null,s=null){if(t==null){if(!l)return null;if(l.errors)t=l.matches;else if(a.length===0&&!l.initialized&&l.matches.length>0)t=l.matches;else return null}let c=t,f=l?.errors;if(f!=null){let x=c.findIndex(y=>y.route.id&&f?.[y.route.id]!==void 0);Ie(x>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),c=c.slice(0,Math.min(c.length,x+1))}let h=!1,g=-1;if(l)for(let x=0;x<c.length;x++){let y=c[x];if((y.route.HydrateFallback||y.route.hydrateFallbackElement)&&(g=x),y.route.id){let{loaderData:b,errors:w}=l,E=y.route.loader&&!b.hasOwnProperty(y.route.id)&&(!w||w[y.route.id]===void 0);if(y.route.lazy||E){h=!0,g>=0?c=c.slice(0,g+1):c=[c[0]];break}}}let p=l&&o?(x,y)=>{o(x,{location:l.location,params:l.matches?.[0]?.params??{},unstable_pattern:d2(l.matches),errorInfo:y})}:void 0;return c.reduceRight((x,y,b)=>{let w,E=!1,N=null,T=null;l&&(w=f&&y.route.id?f[y.route.id]:void 0,N=y.route.errorElement||_2,h&&(g<0&&b===0?(ox("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,T=null):g===b&&(E=!0,T=y.route.hydrateFallbackElement||null)));let k=a.concat(c.slice(0,b+1)),A=()=>{let S;return w?S=N:E?S=T:y.route.Component?S=j.createElement(y.route.Component,null):y.route.element?S=y.route.element:S=x,j.createElement(T2,{match:y,routeContext:{outlet:x,matches:k,isDataRoute:l!=null},children:S})};return l&&(y.route.ErrorBoundary||y.route.errorElement||b===0)?j.createElement(lx,{location:l.location,revalidation:l.revalidation,component:N,error:w,children:A(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:p}):A()},null)}function Gd(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function j2(t){let a=j.useContext(xl);return Ie(a,Gd(t)),a}function A2(t){let a=j.useContext(sc);return Ie(a,Gd(t)),a}function M2(t){let a=j.useContext(Wn);return Ie(a,Gd(t)),a}function Zd(t){let a=M2(t),l=a.matches[a.matches.length-1];return Ie(l.route.id,`${t} can only be used on routes that contain a unique "id"`),l.route.id}function R2(){return Zd("useRouteId")}function z2(){let t=j.useContext(Yd),a=A2("useRouteError"),l=Zd("useRouteError");return t!==void 0?t:a.errors?.[l]}function O2(){let{router:t}=j2("useNavigate"),a=Zd("useNavigate"),l=j.useRef(!1);return ax(()=>{l.current=!0}),j.useCallback(async(s,c={})=>{bn(l.current,nx),l.current&&(typeof s=="number"?await t.navigate(s):await t.navigate(s,{fromRouteId:a,...c}))},[t,a])}var Eg={};function ox(t,a,l){!a&&!Eg[t]&&(Eg[t]=!0,bn(!1,l))}j.memo(D2);function D2({routes:t,future:a,state:l,onError:o}){return ix(t,void 0,l,o,a)}function yd(t){Ie(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function H2({basename:t="/",children:a=null,location:l,navigationType:o="POP",navigator:s,static:c=!1,unstable_useTransitions:f}){Ie(!qo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let h=t.replace(/^\/*/,"/"),g=j.useMemo(()=>({basename:h,navigator:s,static:c,unstable_useTransitions:f,future:{}}),[h,s,c,f]);typeof l=="string"&&(l=yl(l));let{pathname:p="/",search:x="",hash:y="",state:b=null,key:w="default"}=l,E=j.useMemo(()=>{let N=Jn(p,h);return N==null?null:{location:{pathname:N,search:x,hash:y,state:b,key:w},navigationType:o}},[h,p,x,y,b,w,o]);return bn(E!=null,`<Router basename="${h}"> is not able to match the URL "${p}${x}${y}" because it does not start with the basename, so the <Router> won't render anything.`),E==null?null:j.createElement(Jt.Provider,{value:g},j.createElement(Uo.Provider,{children:a,value:E}))}function L2({children:t,location:a}){return E2(xd(t),a)}function xd(t,a=[]){let l=[];return j.Children.forEach(t,(o,s)=>{if(!j.isValidElement(o))return;let c=[...a,s];if(o.type===j.Fragment){l.push.apply(l,xd(o.props.children,c));return}Ie(o.type===yd,`[${typeof o.type=="string"?o.type:o.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ie(!o.props.index||!o.props.children,"An index route cannot have child routes.");let f={id:o.props.id||c.join("-"),caseSensitive:o.props.caseSensitive,element:o.props.element,Component:o.props.Component,index:o.props.index,path:o.props.path,middleware:o.props.middleware,loader:o.props.loader,action:o.props.action,hydrateFallbackElement:o.props.hydrateFallbackElement,HydrateFallback:o.props.HydrateFallback,errorElement:o.props.errorElement,ErrorBoundary:o.props.ErrorBoundary,hasErrorBoundary:o.props.hasErrorBoundary===!0||o.props.ErrorBoundary!=null||o.props.errorElement!=null,shouldRevalidate:o.props.shouldRevalidate,handle:o.props.handle,lazy:o.props.lazy};o.props.children&&(f.children=xd(o.props.children,c)),l.push(f)}),l}var zs="get",Os="application/x-www-form-urlencoded";function cc(t){return typeof HTMLElement<"u"&&t instanceof HTMLElement}function B2(t){return cc(t)&&t.tagName.toLowerCase()==="button"}function U2(t){return cc(t)&&t.tagName.toLowerCase()==="form"}function q2(t){return cc(t)&&t.tagName.toLowerCase()==="input"}function V2(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function $2(t,a){return t.button===0&&(!a||a==="_self")&&!V2(t)}var ws=null;function Y2(){if(ws===null)try{new FormData(document.createElement("form"),0),ws=!1}catch{ws=!0}return ws}var X2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Wf(t){return t!=null&&!X2.has(t)?(bn(!1,`"${t}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Os}"`),null):t}function G2(t,a){let l,o,s,c,f;if(U2(t)){let h=t.getAttribute("action");o=h?Jn(h,a):null,l=t.getAttribute("method")||zs,s=Wf(t.getAttribute("enctype"))||Os,c=new FormData(t)}else if(B2(t)||q2(t)&&(t.type==="submit"||t.type==="image")){let h=t.form;if(h==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=t.getAttribute("formaction")||h.getAttribute("action");if(o=g?Jn(g,a):null,l=t.getAttribute("formmethod")||h.getAttribute("method")||zs,s=Wf(t.getAttribute("formenctype"))||Wf(h.getAttribute("enctype"))||Os,c=new FormData(h,t),!Y2()){let{name:p,type:x,value:y}=t;if(x==="image"){let b=p?`${p}.`:"";c.append(`${b}x`,"0"),c.append(`${b}y`,"0")}else p&&c.append(p,y)}}else{if(cc(t))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=zs,o=null,s=Os,f=t}return c&&s==="text/plain"&&(f=c,c=void 0),{action:o,method:l.toLowerCase(),encType:s,formData:c,body:f}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Qd(t,a){if(t===!1||t===null||typeof t>"u")throw new Error(a)}function Z2(t,a,l,o){let s=typeof t=="string"?new URL(t,typeof window>"u"?"server://singlefetch/":window.location.origin):t;return l?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${o}`:s.pathname=`${s.pathname}.${o}`:s.pathname==="/"?s.pathname=`_root.${o}`:a&&Jn(s.pathname,a)==="/"?s.pathname=`${a.replace(/\/$/,"")}/_root.${o}`:s.pathname=`${s.pathname.replace(/\/$/,"")}.${o}`,s}async function Q2(t,a){if(t.id in a)return a[t.id];try{let l=await import(t.module);return a[t.id]=l,l}catch(l){return console.error(`Error loading route module \`${t.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function K2(t){return t==null?!1:t.href==null?t.rel==="preload"&&typeof t.imageSrcSet=="string"&&typeof t.imageSizes=="string":typeof t.rel=="string"&&typeof t.href=="string"}async function I2(t,a,l){let o=await Promise.all(t.map(async s=>{let c=a.routes[s.route.id];if(c){let f=await Q2(c,l);return f.links?f.links():[]}return[]}));return W2(o.flat(1).filter(K2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Ng(t,a,l,o,s,c){let f=(g,p)=>l[p]?g.route.id!==l[p].route.id:!0,h=(g,p)=>l[p].pathname!==g.pathname||l[p].route.path?.endsWith("*")&&l[p].params["*"]!==g.params["*"];return c==="assets"?a.filter((g,p)=>f(g,p)||h(g,p)):c==="data"?a.filter((g,p)=>{let x=o.routes[g.route.id];if(!x||!x.hasLoader)return!1;if(f(g,p)||h(g,p))return!0;if(g.route.shouldRevalidate){let y=g.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(t,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof y=="boolean")return y}return!0}):[]}function F2(t,a,{includeHydrateFallback:l}={}){return J2(t.map(o=>{let s=a.routes[o.route.id];if(!s)return[];let c=[s.module];return s.clientActionModule&&(c=c.concat(s.clientActionModule)),s.clientLoaderModule&&(c=c.concat(s.clientLoaderModule)),l&&s.hydrateFallbackModule&&(c=c.concat(s.hydrateFallbackModule)),s.imports&&(c=c.concat(s.imports)),c}).flat(1))}function J2(t){return[...new Set(t)]}function P2(t){let a={},l=Object.keys(t).sort();for(let o of l)a[o]=t[o];return a}function W2(t,a){let l=new Set;return new Set(a),t.reduce((o,s)=>{let c=JSON.stringify(P2(s));return l.has(c)||(l.add(c),o.push({key:c,link:s})),o},[])}function rx(){let t=j.useContext(xl);return Qd(t,"You must render this element inside a <DataRouterContext.Provider> element"),t}function eS(){let t=j.useContext(sc);return Qd(t,"You must render this element inside a <DataRouterStateContext.Provider> element"),t}var Kd=j.createContext(void 0);Kd.displayName="FrameworkContext";function sx(){let t=j.useContext(Kd);return Qd(t,"You must render this element inside a <HydratedRouter> element"),t}function tS(t,a){let l=j.useContext(Kd),[o,s]=j.useState(!1),[c,f]=j.useState(!1),{onFocus:h,onBlur:g,onMouseEnter:p,onMouseLeave:x,onTouchStart:y}=a,b=j.useRef(null);j.useEffect(()=>{if(t==="render"&&f(!0),t==="viewport"){let N=k=>{k.forEach(A=>{f(A.isIntersecting)})},T=new IntersectionObserver(N,{threshold:.5});return b.current&&T.observe(b.current),()=>{T.disconnect()}}},[t]),j.useEffect(()=>{if(o){let N=setTimeout(()=>{f(!0)},100);return()=>{clearTimeout(N)}}},[o]);let w=()=>{s(!0)},E=()=>{s(!1),f(!1)};return l?t!=="intent"?[c,b,{}]:[c,b,{onFocus:yo(h,w),onBlur:yo(g,E),onMouseEnter:yo(p,w),onMouseLeave:yo(x,E),onTouchStart:yo(y,w)}]:[!1,b,{}]}function yo(t,a){return l=>{t&&t(l),l.defaultPrevented||a(l)}}function nS({page:t,...a}){let{router:l}=rx(),o=j.useMemo(()=>Zy(l.routes,t,l.basename),[l.routes,t,l.basename]);return o?j.createElement(iS,{page:t,matches:o,...a}):null}function aS(t){let{manifest:a,routeModules:l}=sx(),[o,s]=j.useState([]);return j.useEffect(()=>{let c=!1;return I2(t,a,l).then(f=>{c||s(f)}),()=>{c=!0}},[t,a,l]),o}function iS({page:t,matches:a,...l}){let o=pi(),{future:s,manifest:c,routeModules:f}=sx(),{basename:h}=rx(),{loaderData:g,matches:p}=eS(),x=j.useMemo(()=>Ng(t,a,p,c,o,"data"),[t,a,p,c,o]),y=j.useMemo(()=>Ng(t,a,p,c,o,"assets"),[t,a,p,c,o]),b=j.useMemo(()=>{if(t===o.pathname+o.search+o.hash)return[];let N=new Set,T=!1;if(a.forEach(A=>{let S=c.routes[A.route.id];!S||!S.hasLoader||(!x.some(C=>C.route.id===A.route.id)&&A.route.id in g&&f[A.route.id]?.shouldRevalidate||S.hasClientLoader?T=!0:N.add(A.route.id))}),N.size===0)return[];let k=Z2(t,h,s.unstable_trailingSlashAwareDataRequests,"data");return T&&N.size>0&&k.searchParams.set("_routes",a.filter(A=>N.has(A.route.id)).map(A=>A.route.id).join(",")),[k.pathname+k.search]},[h,s.unstable_trailingSlashAwareDataRequests,g,o,c,x,a,t,f]),w=j.useMemo(()=>F2(y,c),[y,c]),E=aS(y);return j.createElement(j.Fragment,null,b.map(N=>j.createElement("link",{key:N,rel:"prefetch",as:"fetch",href:N,...l})),w.map(N=>j.createElement("link",{key:N,rel:"modulepreload",href:N,...l})),E.map(({key:N,link:T})=>j.createElement("link",{key:N,nonce:l.nonce,...T,crossOrigin:T.crossOrigin??l.crossOrigin})))}function lS(...t){return a=>{t.forEach(l=>{typeof l=="function"?l(a):l!=null&&(l.current=a)})}}var oS=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{oS&&(window.__reactRouterVersion="7.13.0")}catch{}function rS({basename:t,children:a,unstable_useTransitions:l,window:o}){let s=j.useRef();s.current==null&&(s.current=Vw({window:o,v5Compat:!0}));let c=s.current,[f,h]=j.useState({action:c.action,location:c.location}),g=j.useCallback(p=>{l===!1?h(p):j.startTransition(()=>h(p))},[l]);return j.useLayoutEffect(()=>c.listen(g),[c,g]),j.createElement(H2,{basename:t,children:a,location:f.location,navigationType:f.action,navigator:c,unstable_useTransitions:l})}var cx=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ux=j.forwardRef(function({onClick:a,discover:l="render",prefetch:o="none",relative:s,reloadDocument:c,replace:f,state:h,target:g,to:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b,...w},E){let{basename:N,unstable_useTransitions:T}=j.useContext(Jt),k=typeof p=="string"&&cx.test(p),A=Py(p,N);p=A.to;let S=w2(p,{relative:s}),[C,D,z]=tS(o,w),O=fS(p,{replace:f,state:h,target:g,preventScrollReset:x,relative:s,viewTransition:y,unstable_defaultShouldRevalidate:b,unstable_useTransitions:T});function $(ee){a&&a(ee),ee.defaultPrevented||O(ee)}let G=j.createElement("a",{...w,...z,href:A.absoluteURL||S,onClick:A.isExternal||c?a:$,ref:lS(E,D),target:g,"data-discover":!k&&l==="render"?"true":void 0});return C&&!k?j.createElement(j.Fragment,null,G,j.createElement(nS,{page:S})):G});ux.displayName="Link";var sS=j.forwardRef(function({"aria-current":a="page",caseSensitive:l=!1,className:o="",end:s=!1,style:c,to:f,viewTransition:h,children:g,...p},x){let y=Vo(f,{relative:p.relative}),b=pi(),w=j.useContext(sc),{navigator:E,basename:N}=j.useContext(Jt),T=w!=null&&gS(y)&&h===!0,k=E.encodeLocation?E.encodeLocation(y).pathname:y.pathname,A=b.pathname,S=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(A=A.toLowerCase(),S=S?S.toLowerCase():null,k=k.toLowerCase()),S&&N&&(S=Jn(S,N)||S);const C=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let D=A===k||!s&&A.startsWith(k)&&A.charAt(C)==="/",z=S!=null&&(S===k||!s&&S.startsWith(k)&&S.charAt(k.length)==="/"),O={isActive:D,isPending:z,isTransitioning:T},$=D?a:void 0,G;typeof o=="function"?G=o(O):G=[o,D?"active":null,z?"pending":null,T?"transitioning":null].filter(Boolean).join(" ");let ee=typeof c=="function"?c(O):c;return j.createElement(ux,{...p,"aria-current":$,className:G,ref:x,style:ee,to:f,viewTransition:h},typeof g=="function"?g(O):g)});sS.displayName="NavLink";var cS=j.forwardRef(({discover:t="render",fetcherKey:a,navigate:l,reloadDocument:o,replace:s,state:c,method:f=zs,action:h,onSubmit:g,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b,...w},E)=>{let{unstable_useTransitions:N}=j.useContext(Jt),T=pS(),k=mS(h,{relative:p}),A=f.toLowerCase()==="get"?"get":"post",S=typeof h=="string"&&cx.test(h),C=D=>{if(g&&g(D),D.defaultPrevented)return;D.preventDefault();let z=D.nativeEvent.submitter,O=z?.getAttribute("formmethod")||f,$=()=>T(z||D.currentTarget,{fetcherKey:a,method:O,navigate:l,replace:s,state:c,relative:p,preventScrollReset:x,viewTransition:y,unstable_defaultShouldRevalidate:b});N&&l!==!1?j.startTransition(()=>$()):$()};return j.createElement("form",{ref:E,method:A,action:k,onSubmit:o?g:C,...w,"data-discover":!S&&t==="render"?"true":void 0})});cS.displayName="Form";function uS(t){return`${t} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function fx(t){let a=j.useContext(xl);return Ie(a,uS(t)),a}function fS(t,{target:a,replace:l,state:o,preventScrollReset:s,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:g}={}){let p=Xd(),x=pi(),y=Vo(t,{relative:c});return j.useCallback(b=>{if($2(b,a)){b.preventDefault();let w=l!==void 0?l:To(x)===To(y),E=()=>p(t,{replace:w,state:o,preventScrollReset:s,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});g?j.startTransition(()=>E()):E()}},[x,p,y,l,o,a,t,s,c,f,h,g])}var dS=0,hS=()=>`__${String(++dS)}__`;function pS(){let{router:t}=fx("useSubmit"),{basename:a}=j.useContext(Jt),l=R2(),o=t.fetch,s=t.navigate;return j.useCallback(async(c,f={})=>{let{action:h,method:g,encType:p,formData:x,body:y}=G2(c,a);if(f.navigate===!1){let b=f.fetcherKey||hS();await o(b,l,f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:y,formMethod:f.method||g,formEncType:f.encType||p,flushSync:f.flushSync})}else await s(f.action||h,{unstable_defaultShouldRevalidate:f.unstable_defaultShouldRevalidate,preventScrollReset:f.preventScrollReset,formData:x,body:y,formMethod:f.method||g,formEncType:f.encType||p,replace:f.replace,state:f.state,fromRouteId:l,flushSync:f.flushSync,viewTransition:f.viewTransition})},[o,s,a,l])}function mS(t,{relative:a}={}){let{basename:l}=j.useContext(Jt),o=j.useContext(Wn);Ie(o,"useFormAction must be used inside a RouteContext");let[s]=o.matches.slice(-1),c={...Vo(t||".",{relative:a})},f=pi();if(t==null){c.search=f.search;let h=new URLSearchParams(c.search),g=h.getAll("index");if(g.some(x=>x==="")){h.delete("index"),g.filter(y=>y).forEach(y=>h.append("index",y));let x=h.toString();c.search=x?`?${x}`:""}}return(!t||t===".")&&s.route.index&&(c.search=c.search?c.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(c.pathname=c.pathname==="/"?l:In([l,c.pathname])),To(c)}function gS(t,{relative:a}={}){let l=j.useContext(ex);Ie(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:o}=fx("useViewTransitionState"),s=Vo(t,{relative:a});if(!l.isTransitioning)return!1;let c=Jn(l.currentLocation.pathname,o)||l.currentLocation.pathname,f=Jn(l.nextLocation.pathname,o)||l.nextLocation.pathname;return Gs(s.pathname,f)!=null||Gs(s.pathname,c)!=null}Gy();const dx=(...t)=>t.filter((a,l,o)=>!!a&&a.trim()!==""&&o.indexOf(a)===l).join(" ").trim();const yS=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const xS=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(a,l,o)=>o?o.toUpperCase():l.toLowerCase());const _g=t=>{const a=xS(t);return a.charAt(0).toUpperCase()+a.slice(1)};var vS={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const bS=t=>{for(const a in t)if(a.startsWith("aria-")||a==="role"||a==="title")return!0;return!1};const wS=j.forwardRef(({color:t="currentColor",size:a=24,strokeWidth:l=2,absoluteStrokeWidth:o,className:s="",children:c,iconNode:f,...h},g)=>j.createElement("svg",{ref:g,...vS,width:a,height:a,stroke:t,strokeWidth:o?Number(l)*24/Number(a):l,className:dx("lucide",s),...!c&&!bS(h)&&{"aria-hidden":"true"},...h},[...f.map(([p,x])=>j.createElement(p,x)),...Array.isArray(c)?c:[c]]));const be=(t,a)=>{const l=j.forwardRef(({className:o,...s},c)=>j.createElement(wS,{ref:c,iconNode:a,className:dx(`lucide-${yS(_g(t))}`,`lucide-${t}`,o),...s}));return l.displayName=_g(t),l};const SS=[["path",{d:"M12 6v16",key:"nqf5sj"}],["path",{d:"m19 13 2-1a9 9 0 0 1-18 0l2 1",key:"y7qv08"}],["path",{d:"M9 11h6",key:"1fldmi"}],["circle",{cx:"12",cy:"4",r:"2",key:"muu5ef"}]],Id=be("anchor",SS);const ES=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],NS=be("bot",ES);const _S=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]],uc=be("chart-column",_S);const CS=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],TS=be("check",CS);const kS=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Fd=be("chevron-down",kS);const jS=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],hx=be("chevron-right",jS);const AS=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Jd=be("chevron-up",AS);const MS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],vd=be("circle-alert",MS);const RS=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Pd=be("circle-check-big",RS);const zS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],OS=be("circle-check",zS);const DS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],px=be("circle-x",DS);const HS=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],LS=be("cpu",HS);const BS=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],Zs=be("download",BS);const US=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],qS=be("ellipsis-vertical",US);const VS=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],$S=be("eye-off",VS);const YS=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],XS=be("eye",YS);const GS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],ZS=be("file-code",GS);const QS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],bd=be("file-text",QS);const KS=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],IS=be("file",KS);const FS=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],Qs=be("folder-open",FS);const JS=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],mx=be("folder",JS);const PS=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],WS=be("globe",PS);const eE=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],gx=be("house",eE);const tE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],nE=be("image",tE);const aE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],iE=be("info",aE);const lE=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4",key:"g0fldk"}],["path",{d:"m21 2-9.6 9.6",key:"1j0ho8"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5",key:"yqb3hr"}]],oE=be("key",lE);const rE=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],sE=be("link-2",rE);const cE=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ks=be("loader-circle",cE);const uE=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],Wd=be("message-square",uE);const fE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Is=be("play",fE);const dE=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Cg=be("plus",dE);const hE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],yx=be("refresh-cw",hE);const pE=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],mE=be("save",pE);const gE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],yE=be("search",gE);const xE=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],vE=be("send",xE);const bE=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],wE=be("server",bE);const SE=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],EE=be("settings-2",SE);const NE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],eh=be("settings",NE);const _E=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],$o=be("sparkles",_E);const CE=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],xx=be("terminal",CE);const TE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Fs=be("trash-2",TE);const kE=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jE=be("triangle-alert",kE);const AE=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],th=be("x",AE);const ME=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],Yo=be("zap",ME),Tg=t=>{let a;const l=new Set,o=(p,x)=>{const y=typeof p=="function"?p(a):p;if(!Object.is(y,a)){const b=a;a=x??(typeof y!="object"||y===null)?y:Object.assign({},a,y),l.forEach(w=>w(a,b))}},s=()=>a,h={setState:o,getState:s,getInitialState:()=>g,subscribe:p=>(l.add(p),()=>l.delete(p))},g=a=t(o,s,h);return h},RE=(t=>t?Tg(t):Tg),zE=t=>t;function OE(t,a=zE){const l=wo.useSyncExternalStore(t.subscribe,wo.useCallback(()=>a(t.getState()),[t,a]),wo.useCallback(()=>a(t.getInitialState()),[t,a]));return wo.useDebugValue(l),l}const kg=t=>{const a=RE(t),l=o=>OE(a,o);return Object.assign(l,a),l},Xo=(t=>t?kg(t):kg),nh=Xo((t,a)=>({projects:[],galleryItems:[],isLoading:!1,error:null,currentProject:null,currentPath:"",parentPath:null,fileItems:[],isLoadingFiles:!1,makeccHome:"",homeScrollPosition:0,setProjects:l=>t({projects:l}),setGalleryItems:l=>t({galleryItems:l}),setLoading:l=>t({isLoading:l}),setError:l=>t({error:l}),setCurrentProject:l=>t({currentProject:l}),fetchProjects:async()=>{t({isLoading:!0,error:null});try{const l=await fetch("/api/projects");if(!l.ok)throw new Error("Failed to fetch projects");const o=await l.json();t({projects:o.projects,galleryItems:o.gallery||[]})}catch(l){const o=l instanceof Error?l.message:"Unknown error";t({error:o})}finally{t({isLoading:!1})}},createProject:async(l,o)=>{t({isLoading:!0,error:null});try{const s=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:l,description:o})});if(!s.ok)throw new Error("Failed to create project");const c=await s.json();return t(f=>({projects:[c,...f.projects]})),c}catch(s){const c=s instanceof Error?s.message:"Unknown error";return t({error:c}),null}finally{t({isLoading:!1})}},deleteProject:async l=>{try{if(!(await fetch(`/api/projects/${l}`,{method:"DELETE"})).ok)throw new Error("Failed to delete project");return t(s=>({projects:s.projects.filter(c=>c.id!==l)})),!0}catch(o){const s=o instanceof Error?o.message:"Unknown error";return t({error:s}),!1}},fetchMakeccHome:async()=>{try{const l=await fetch("/api/makecc-home");if(!l.ok)throw new Error("Failed to fetch makecc home");const o=await l.json();t({makeccHome:o.path,currentPath:o.path})}catch(l){console.error("Failed to fetch makecc home:",l)}},fetchFiles:async l=>{const{makeccHome:o,currentPath:s}=a(),c=l||s||o;if(c){t({isLoadingFiles:!0});try{const f=await fetch(`/api/files?path=${encodeURIComponent(c)}`);if(!f.ok)throw new Error("Failed to fetch files");const h=await f.json();t({currentPath:h.currentPath,parentPath:h.parentPath,fileItems:h.items})}catch(f){console.error("Failed to fetch files:",f),t({fileItems:[]})}finally{t({isLoadingFiles:!1})}}},navigateToPath:async l=>{t({isLoadingFiles:!0});try{const o=await fetch(`/api/files?path=${encodeURIComponent(l)}`);if(!o.ok)throw new Error("Failed to fetch files");const s=await o.json();t({currentPath:s.currentPath,parentPath:s.parentPath,fileItems:s.items})}catch(o){console.error("Failed to navigate to path:",o),t({fileItems:[]})}finally{t({isLoadingFiles:!1})}},setHomeScrollPosition:l=>t({homeScrollPosition:l})})),DE="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let sl=(t=21)=>{let a="",l=crypto.getRandomValues(new Uint8Array(t|=0));for(;t--;)a+=DE[l[t]&63];return a};const fc=Xo((t,a)=>({isRunning:!1,currentNodeId:null,completedNodes:new Set,failedNodes:new Set,results:new Map,startTime:null,endTime:null,workflowResults:[],outputDir:null,logs:[],startExecution:()=>{t({isRunning:!0,currentNodeId:null,completedNodes:new Set,failedNodes:new Set,results:new Map,startTime:Date.now(),endTime:null,workflowResults:[],outputDir:null}),a().addLog("info","Workflow execution started")},stopExecution:()=>{t({isRunning:!1,currentNodeId:null,endTime:Date.now()}),a().addLog("info","Workflow execution stopped")},setCurrentNode:l=>{t({currentNodeId:l}),l&&a().addLog("info","Processing node",l)},markNodeCompleted:(l,o)=>{t(s=>{const c=new Set(s.completedNodes);c.add(l);const f=new Map(s.results);return o!==void 0&&f.set(l,o),{completedNodes:c,results:f}}),a().addLog("success","Node completed",l)},markNodeFailed:(l,o)=>{t(s=>{const c=new Set(s.failedNodes);return c.add(l),{failedNodes:c}}),a().addLog("error",o||"Node failed",l)},setWorkflowResults:(l,o)=>{t({workflowResults:l,outputDir:o||null}),l.forEach(s=>{s.result&&t(c=>{const f=new Map(c.results);return f.set(s.nodeId,s.result),{results:f}})})},resetExecution:()=>{t({isRunning:!1,currentNodeId:null,completedNodes:new Set,failedNodes:new Set,results:new Map,startTime:null,endTime:null,workflowResults:[],outputDir:null})},addLog:(l,o,s,c)=>{const f={id:sl(),timestamp:Date.now(),level:l,message:o,nodeId:s,details:c};t(h=>({logs:[...h.logs,f]}))},clearLogs:()=>t({logs:[]})})),jg=["from-purple-600 to-blue-600","from-pink-600 to-rose-600","from-emerald-600 to-teal-600","from-amber-600 to-orange-600","from-indigo-600 to-violet-600","from-cyan-600 to-blue-600"];function HE(t){const a=t.split("").reduce((l,o)=>l+o.charCodeAt(0),0);return jg[a%jg.length]}function LE({project:t,onClick:a}){const l=HE(t.name);return m.jsxs("div",{onClick:a,className:"group relative w-72 h-56 rounded-2xl overflow-hidden cursor-pointer transition-all duration-300 hover:scale-[1.02] hover:shadow-xl hover:shadow-black/20",children:[m.jsx("div",{className:`absolute inset-0 bg-gradient-to-br ${l}`}),m.jsx("div",{className:"absolute top-4 right-4 w-24 h-24 rounded-2xl bg-white/10 backdrop-blur-sm transform rotate-12"}),m.jsx("div",{className:"absolute top-3 left-3 px-2 py-1 bg-black/60 backdrop-blur-sm rounded-md text-xs text-white/90 opacity-0 group-hover:opacity-100 transition-opacity",children:"클릭하여 열기"}),m.jsx("button",{onClick:o=>{o.stopPropagation()},className:"absolute top-3 right-3 p-1 rounded-full opacity-0 group-hover:opacity-100 hover:bg-white/20 transition-all z-10",children:m.jsx(qS,{className:"w-5 h-5 text-white"})}),m.jsxs("div",{className:"absolute bottom-0 left-0 right-0 p-5 bg-gradient-to-t from-black/60 to-transparent",children:[m.jsx("h3",{className:"text-xl font-bold text-white mb-1",children:t.name}),m.jsx("p",{className:"text-sm text-white/80 line-clamp-2 mb-3",children:t.description}),m.jsxs("div",{className:"flex items-center gap-4 text-white/70 text-xs",children:[m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(Yo,{className:"w-3.5 h-3.5"}),m.jsxs("span",{children:[t.skillCount," skills"]})]}),m.jsxs("div",{className:"flex items-center gap-1",children:[m.jsx(LS,{className:"w-3.5 h-3.5"}),m.jsxs("span",{children:[t.agentCount," agents"]})]})]})]})]})}function BE({item:t,onClick:a}){return m.jsxs("div",{onClick:a,className:"group relative w-56 h-56 rounded-2xl overflow-hidden cursor-pointer transition-all duration-300 hover:scale-[1.02] hover:shadow-lg hover:shadow-black/20",children:[t.thumbnail?m.jsx("img",{src:t.thumbnail,alt:t.name,className:"w-full h-full object-cover"}):m.jsx("div",{className:"w-full h-full bg-gradient-to-br from-gray-700 to-gray-800"}),m.jsxs("div",{className:"absolute inset-0 bg-black/60 opacity-0 group-hover:opacity-100 transition-opacity flex flex-col justify-end p-4",children:[m.jsx("h4",{className:"text-white font-semibold text-sm mb-1",children:t.name}),m.jsx("p",{className:"text-white/70 text-xs line-clamp-2 mb-2",children:t.description}),m.jsxs("div",{className:"flex items-center gap-2 text-white/60 text-xs",children:[m.jsx(Zs,{className:"w-3 h-3"}),m.jsx("span",{children:t.downloads})]})]})]})}function UE({isOpen:t,onClose:a,onCreate:l}){const[o,s]=j.useState(""),[c,f]=j.useState("");if(!t)return null;const h=g=>{g.preventDefault(),o.trim()&&(l(o.trim(),c.trim()),s(""),f(""),a())};return m.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[m.jsx("div",{className:"absolute inset-0 bg-black/60 backdrop-blur-sm",onClick:a}),m.jsxs("div",{className:"relative w-full max-w-md bg-surface border border-border rounded-2xl shadow-2xl",children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"p-2 bg-accent/20 rounded-lg",children:m.jsx(mx,{className:"w-5 h-5 text-accent"})}),m.jsx("h2",{className:"text-lg font-semibold text-white",children:"New Project"})]}),m.jsx("button",{onClick:a,className:"p-1 hover:bg-surface-hover rounded-lg transition-colors",children:m.jsx(th,{className:"w-5 h-5 text-gray-400"})})]}),m.jsxs("form",{onSubmit:h,className:"p-6 space-y-4",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Project Name"}),m.jsx("input",{type:"text",value:o,onChange:g=>s(g.target.value),placeholder:"my-awesome-project",className:"w-full px-4 py-3 bg-canvas border border-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent",autoFocus:!0})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-2",children:"Description"}),m.jsx("textarea",{value:c,onChange:g=>f(g.target.value),placeholder:"What will this project do?",rows:3,className:"w-full px-4 py-3 bg-canvas border border-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent resize-none"})]}),m.jsxs("div",{className:"flex justify-end gap-3 pt-4",children:[m.jsx("button",{type:"button",onClick:a,className:"px-4 py-2 text-gray-400 hover:text-white transition-colors",children:"Cancel"}),m.jsx("button",{type:"submit",disabled:!o.trim(),className:"px-6 py-2 bg-accent hover:bg-accent-hover disabled:opacity-50 disabled:cursor-not-allowed rounded-lg font-medium text-white transition-colors",children:"Create"})]})]})]})]})}function qE(t,a){let l;try{l=t()}catch{return}return{getItem:s=>{var c;const f=g=>g===null?null:JSON.parse(g,void 0),h=(c=l.getItem(s))!=null?c:null;return h instanceof Promise?h.then(f):f(h)},setItem:(s,c)=>l.setItem(s,JSON.stringify(c,void 0)),removeItem:s=>l.removeItem(s)}}const wd=t=>a=>{try{const l=t(a);return l instanceof Promise?l:{then(o){return wd(o)(l)},catch(o){return this}}}catch(l){return{then(o){return this},catch(o){return wd(o)(l)}}}},VE=(t,a)=>(l,o,s)=>{let c={storage:qE(()=>localStorage),partialize:T=>T,version:0,merge:(T,k)=>({...k,...T}),...a},f=!1,h=0;const g=new Set,p=new Set;let x=c.storage;if(!x)return t((...T)=>{console.warn(`[zustand persist middleware] Unable to update item '${c.name}', the given storage is currently unavailable.`),l(...T)},o,s);const y=()=>{const T=c.partialize({...o()});return x.setItem(c.name,{state:T,version:c.version})},b=s.setState;s.setState=(T,k)=>(b(T,k),y());const w=t((...T)=>(l(...T),y()),o,s);s.getInitialState=()=>w;let E;const N=()=>{var T,k;if(!x)return;const A=++h;f=!1,g.forEach(C=>{var D;return C((D=o())!=null?D:w)});const S=((k=c.onRehydrateStorage)==null?void 0:k.call(c,(T=o())!=null?T:w))||void 0;return wd(x.getItem.bind(x))(c.name).then(C=>{if(C)if(typeof C.version=="number"&&C.version!==c.version){if(c.migrate){const D=c.migrate(C.state,C.version);return D instanceof Promise?D.then(z=>[!0,z]):[!0,D]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,C.state];return[!1,void 0]}).then(C=>{var D;if(A!==h)return;const[z,O]=C;if(E=c.merge(O,(D=o())!=null?D:w),l(E,!0),z)return y()}).then(()=>{A===h&&(S?.(E,void 0),E=o(),f=!0,p.forEach(C=>C(E)))}).catch(C=>{A===h&&S?.(void 0,C)})};return s.persist={setOptions:T=>{c={...c,...T},T.storage&&(x=T.storage)},clearStorage:()=>{x?.removeItem(c.name)},getOptions:()=>c,rehydrate:()=>N(),hasHydrated:()=>f,onHydrate:T=>(g.add(T),()=>{g.delete(T)}),onFinishHydration:T=>(p.add(T),()=>{p.delete(T)})},c.skipHydration||N(),E||w},vx=VE,ah=Xo()(vx(t=>({apiMode:"proxy",apiKey:"",proxyUrl:"https://makecc-proxy.vercel.app",setApiMode:a=>t({apiMode:a}),setApiKey:a=>t({apiKey:a}),setProxyUrl:a=>t({proxyUrl:a})}),{name:"makecc-settings"}));function bx({isOpen:t,onClose:a}){const{apiMode:l,apiKey:o,proxyUrl:s,setApiMode:c,setApiKey:f,setProxyUrl:h}=ah(),[g,p]=j.useState(l),[x,y]=j.useState(o),[b,w]=j.useState(s),[E,N]=j.useState(!1);if(j.useEffect(()=>{t&&(p(l),y(o),w(s))},[t,l,o,s]),!t)return null;const T=async()=>{if(c(g),f(x),h(b),g==="direct"&&x)try{(await fetch("/api/settings/api-key",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({apiKey:x})})).ok||console.error("Failed to save API key to .env")}catch(k){console.error("Failed to save API key:",k)}a()};return m.jsx("div",{className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",children:m.jsxs("div",{className:"bg-surface border border-border rounded-xl w-full max-w-md mx-4 shadow-2xl",children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[m.jsx("h2",{className:"text-lg font-semibold text-white",children:"설정"}),m.jsx("button",{onClick:a,className:"p-1 hover:bg-surface-hover rounded-lg transition-colors",children:m.jsx(th,{className:"w-5 h-5 text-gray-400"})})]}),m.jsxs("div",{className:"p-6 space-y-6",children:[m.jsxs("div",{className:"space-y-3",children:[m.jsx("label",{className:"text-sm font-medium text-gray-300",children:"API 모드"}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("label",{className:`
12
+ flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition-colors
13
+ ${g==="proxy"?"border-accent bg-accent/10":"border-border hover:border-gray-600"}
14
+ `,children:[m.jsx("input",{type:"radio",name:"apiMode",value:"proxy",checked:g==="proxy",onChange:()=>p("proxy"),className:"sr-only"}),m.jsx(wE,{className:`w-5 h-5 ${g==="proxy"?"text-accent":"text-gray-400"}`}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:`font-medium ${g==="proxy"?"text-white":"text-gray-300"}`,children:"프록시 서버"}),m.jsx("div",{className:"text-sm text-gray-500",children:"프록시 서버의 API 키를 사용합니다"})]}),g==="proxy"&&m.jsx("div",{className:"w-2 h-2 bg-accent rounded-full"})]}),m.jsxs("label",{className:`
15
+ flex items-center gap-3 p-3 rounded-lg border cursor-pointer transition-colors
16
+ ${g==="direct"?"border-accent bg-accent/10":"border-border hover:border-gray-600"}
17
+ `,children:[m.jsx("input",{type:"radio",name:"apiMode",value:"direct",checked:g==="direct",onChange:()=>p("direct"),className:"sr-only"}),m.jsx(oE,{className:`w-5 h-5 ${g==="direct"?"text-accent":"text-gray-400"}`}),m.jsxs("div",{className:"flex-1",children:[m.jsx("div",{className:`font-medium ${g==="direct"?"text-white":"text-gray-300"}`,children:"직접 입력"}),m.jsx("div",{className:"text-sm text-gray-500",children:"나만의 API 키를 사용합니다"})]}),g==="direct"&&m.jsx("div",{className:"w-2 h-2 bg-accent rounded-full"})]})]})]}),g==="proxy"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"text-sm font-medium text-gray-300",children:"프록시 서버 URL"}),m.jsx("input",{type:"text",value:b,onChange:k=>w(k.target.value),placeholder:"https://your-proxy-server.com",className:"w-full px-4 py-2.5 bg-surface-hover border border-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent"}),m.jsx("p",{className:"text-xs text-gray-500",children:"서버에서 API 키를 관리하는 프록시 서버 주소"})]}),g==="direct"&&m.jsxs("div",{className:"space-y-2",children:[m.jsx("label",{className:"text-sm font-medium text-gray-300",children:"Anthropic API 키"}),m.jsxs("div",{className:"relative",children:[m.jsx("input",{type:E?"text":"password",value:x,onChange:k=>y(k.target.value),placeholder:"sk-ant-...",className:"w-full px-4 py-2.5 pr-10 bg-surface-hover border border-border rounded-lg text-white placeholder-gray-500 focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent"}),m.jsx("button",{type:"button",onClick:()=>N(!E),className:"absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 hover:text-gray-300",children:E?m.jsx($S,{className:"w-4 h-4"}):m.jsx(XS,{className:"w-4 h-4"})})]}),m.jsx("p",{className:"text-xs text-gray-500",children:"API 키는 브라우저에 안전하게 저장됩니다"})]})]}),m.jsxs("div",{className:"flex justify-end gap-3 px-6 py-4 border-t border-border",children:[m.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-400 hover:text-white transition-colors",children:"취소"}),m.jsx("button",{onClick:T,className:"px-4 py-2 text-sm font-medium bg-accent hover:bg-accent-hover text-white rounded-lg transition-colors",children:"저장"})]})]})})}const Oa=Xo()(vx(t=>({nodes:[],edges:[],selectedNodeId:null,workflowId:sl(),workflowName:"Untitled Workflow",isDraft:!0,addNode:a=>t(l=>({nodes:[...l.nodes,a]})),updateNode:(a,l)=>t(o=>({nodes:o.nodes.map(s=>s.id===a?{...s,data:{...s.data,...l}}:s)})),updateNodeStatus:(a,l,o)=>t(s=>({nodes:s.nodes.map(c=>c.id===a?{...c,data:{...c.data,status:l,progress:o??c.data.progress}}:c)})),removeNode:a=>t(l=>({nodes:l.nodes.filter(o=>o.id!==a),edges:l.edges.filter(o=>o.source!==a&&o.target!==a),selectedNodeId:l.selectedNodeId===a?null:l.selectedNodeId})),setSelectedNode:a=>t({selectedNodeId:a}),addEdge:a=>t(l=>({edges:[...l.edges,a]})),removeEdge:a=>t(l=>({edges:l.edges.filter(o=>o.id!==a)})),setWorkflowName:a=>t({workflowName:a}),loadWorkflow:a=>t({nodes:a.nodes,edges:a.edges,workflowName:a.name||"Imported Workflow",selectedNodeId:null}),mergeExistingConfig:a=>t(l=>{const o=new Set(a.map(p=>p.id)),s=["skill-","agent-","command-","hook-"],c=p=>s.some(x=>p.startsWith(x)),f=l.nodes.filter(p=>c(p.id)?o.has(p.id):!0),h=new Set(f.map(p=>p.id)),g=a.filter(p=>!h.has(p.id));return{nodes:[...f,...g]}}),clearWorkflow:()=>t({nodes:[],edges:[],selectedNodeId:null}),newWorkflow:()=>t({nodes:[],edges:[],selectedNodeId:null,workflowId:sl(),workflowName:"Untitled Workflow",isDraft:!0}),setNodes:a=>t({nodes:a}),setEdges:a=>t({edges:a})}),{name:"workflow-storage",partialize:t=>({nodes:t.nodes,edges:t.edges,workflowId:t.workflowId,workflowName:t.workflowName})})),$E=t=>t.nodes.find(a=>a.id===t.selectedNodeId);function YE({item:t,onClick:a,depth:l=0}){const o=t.type==="folder";return m.jsxs("button",{onClick:a,className:"w-full flex items-center gap-2 px-2 py-1.5 hover:bg-surface-hover rounded-md transition-colors text-left group",style:{paddingLeft:`${l*12+8}px`},children:[o?m.jsxs(m.Fragment,{children:[m.jsx(hx,{className:"w-3 h-3 text-gray-500 group-hover:text-gray-400 flex-shrink-0"}),m.jsx(mx,{className:"w-4 h-4 text-amber-500 flex-shrink-0"})]}):m.jsxs(m.Fragment,{children:[m.jsx("span",{className:"w-3"})," ",m.jsx(IS,{className:"w-4 h-4 text-gray-400 flex-shrink-0"})]}),m.jsx("span",{className:"text-sm text-gray-300 truncate group-hover:text-white",children:t.name})]})}function XE({className:t=""}){const{currentPath:a,parentPath:l,fileItems:o,isLoadingFiles:s,makeccHome:c,fetchFiles:f,fetchMakeccHome:h,navigateToPath:g}=nh();j.useEffect(()=>{(async()=>await h())()},[h]),j.useEffect(()=>{c&&o.length===0&&!s&&f(a||c)},[c]);const p=a?a.replace(/^\/Users\/[^/]+/,"~"):"~/makecc",x=E=>{E.type==="folder"&&g(E.path)},y=()=>{l&&g(l)},b=()=>{c&&g(c)},w=()=>{f(a)};return m.jsxs("div",{className:`flex flex-col bg-surface ${t}`,children:[m.jsxs("div",{className:"flex items-center justify-between px-3 py-2 border-b border-border",children:[m.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[m.jsx(Qs,{className:"w-4 h-4 text-amber-500 flex-shrink-0"}),m.jsx("span",{className:"text-xs font-mono text-gray-400 truncate",title:a,children:p})]}),m.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[m.jsx("button",{onClick:b,className:"p-1 hover:bg-surface-hover rounded transition-colors",title:"Go to makecc home",children:m.jsx(gx,{className:"w-3.5 h-3.5 text-gray-500 hover:text-gray-300"})}),m.jsx("button",{onClick:y,disabled:!l,className:"p-1 hover:bg-surface-hover rounded transition-colors disabled:opacity-30",title:"Go up",children:m.jsx(Jd,{className:"w-3.5 h-3.5 text-gray-500 hover:text-gray-300"})}),m.jsx("button",{onClick:w,className:"p-1 hover:bg-surface-hover rounded transition-colors",title:"Refresh",children:m.jsx(yx,{className:`w-3.5 h-3.5 text-gray-500 hover:text-gray-300 ${s?"animate-spin":""}`})})]})]}),m.jsx("div",{className:"flex-1 overflow-y-auto py-1",children:s?m.jsx("div",{className:"flex items-center justify-center py-8",children:m.jsx("div",{className:"w-5 h-5 border-2 border-amber-500 border-t-transparent rounded-full animate-spin"})}):o.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-gray-500",children:[m.jsx(Qs,{className:"w-8 h-8 mb-2 opacity-50"}),m.jsx("span",{className:"text-xs",children:"Empty folder"})]}):m.jsx("div",{className:"space-y-0.5 px-1",children:o.map(E=>m.jsx(YE,{item:E,onClick:()=>x(E)},E.path))})})]})}function ko(t){const a={id:t.id,type:t.type,label:t.data.label,description:t.data.description};switch(t.type){case"skill":return{...a,skillId:t.data.skillId,skillPath:t.data.skillPath};case"agent":return{...a,tools:t.data.tools,model:t.data.model,skills:t.data.skills,systemPrompt:t.data.systemPrompt};case"hook":return{...a,hookEvent:t.data.hookEvent,hookMatcher:t.data.hookMatcher,hookCommand:t.data.hookCommand};default:return a}}async function wx(t){if(t.type==="input"||t.type==="output")return!0;try{const a=await fetch("/api/sync/node",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({node:ko(t)})});return a.ok?!0:(console.error("Failed to sync node:",await a.text()),!1)}catch(a){return console.error("Failed to sync node:",a),!1}}async function Sx(t,a){if(t.type==="input"||t.type==="output")return!0;try{const l=await fetch("/api/sync/node",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({node:ko(t),nodes:a.map(ko)})});return l.ok?!0:(console.error("Failed to delete node:",await l.text()),!1)}catch(l){return console.error("Failed to delete node:",l),!1}}async function Ag(t,a){const l=a.find(s=>s.id===t.source),o=a.find(s=>s.id===t.target);if(!l||!o||(l.type==="input"||l.type==="output")&&(o.type==="input"||o.type==="output"))return!0;try{const s=await fetch("/api/sync/edge",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({edge:{source:t.source,target:t.target,sourceType:l.type,targetType:o.type},nodes:a.map(ko)})});return s.ok?!0:(console.error("Failed to sync edge:",await s.text()),!1)}catch(s){return console.error("Failed to sync edge:",s),!1}}async function GE(t,a){const l=a.find(s=>s.id===t.source),o=a.find(s=>s.id===t.target);if(!l||!o)return!0;try{const s=await fetch("/api/sync/edge",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({edge:{source:t.source,target:t.target,sourceType:l.type,targetType:o.type},nodes:a.map(ko)})});return s.ok?!0:(console.error("Failed to remove edge:",await s.text()),!1)}catch(s){return console.error("Failed to remove edge:",s),!1}}const ZE=["Read","Write","Edit","Bash","Glob","Grep","WebSearch","WebFetch","Task","TodoWrite"],QE=[{id:"image-gen-nanobanana",name:"Image Generator",description:"Google Gemini API를 사용한 AI 이미지 생성",keywords:["이미지","image","그림","사진","picture","illustration","graphic"]},{id:"ppt-generator",name:"PPT Generator",description:"한국어에 최적화된 미니멀 프레젠테이션 생성",keywords:["ppt","발표","presentation","slides","powerpoint","슬라이드"]},{id:"video-gen-veo3",name:"Video Generator",description:"Google Veo3 API를 사용한 AI 영상 생성",keywords:["영상","video","동영상","animation","애니메이션"]},{id:"pdf",name:"PDF",description:"PDF 텍스트 추출, 생성, 병합/분할, 폼 처리",keywords:["pdf","문서","document"]},{id:"docx",name:"Word Document",description:"Word 문서 생성, 편집, 변경 추적, 주석",keywords:["워드","docx","word","한글","문서"]},{id:"xlsx",name:"Excel",description:"스프레드시트 생성, 편집, 수식, 데이터 분석",keywords:["엑셀","xlsx","excel","스프레드시트","spreadsheet","표"]},{id:"pptx",name:"PowerPoint",description:"PPT 생성, 편집, 레이아웃, 스피커 노트",keywords:["pptx","powerpoint","presentation"]},{id:"git-commit-push",name:"Git Commit/Push",description:"Git 변경사항 분석, 커밋 메시지 작성, 푸시/PR 생성",keywords:["git","commit","push","pr","pull request","커밋","푸시"]}],KE=[{id:"sonnet",name:"Claude 4 Sonnet",description:"Fast, cost-efficient"},{id:"opus",name:"Claude 4.5 Opus",description:"Best for complex tasks"},{id:"haiku",name:"Claude 3.5 Haiku",description:"Fastest, for simple tasks"}];function IE(t){switch(t){case"input":return m.jsx(Wd,{className:"w-5 h-5 text-yellow-400"});case"agent":return m.jsx($o,{className:"w-5 h-5 text-purple-400"});case"skill":return m.jsx(Yo,{className:"w-5 h-5 text-cyan-400"});case"hook":return m.jsx(Id,{className:"w-5 h-5 text-pink-400"});case"output":return m.jsx(uc,{className:"w-5 h-5 text-emerald-400"});default:return null}}function FE(t){switch(t){case"input":return"User Input";case"agent":return"Agent";case"skill":return"Skill";case"hook":return"Hook";case"output":return"Output";default:return"Node"}}function JE({node:t}){const{updateNode:a,removeNode:l,nodes:o}=Oa(),[s,c]=j.useState(!1),f=j.useRef(null),h=j.useCallback(w=>{f.current&&clearTimeout(f.current),f.current=setTimeout(()=>{wx(w).catch(E=>{console.error("Failed to sync node to filesystem:",E)})},500)},[]);if(j.useEffect(()=>(t&&t.type!=="input"&&t.type!=="output"&&h(t),()=>{f.current&&clearTimeout(f.current)}),[t,h]),!t)return m.jsxs("div",{className:"flex flex-col items-center justify-center h-full text-gray-500 p-8",children:[m.jsx(EE,{className:"w-12 h-12 mb-4 opacity-50"}),m.jsx("p",{className:"text-center",children:"Select a node to configure its settings"})]});const g=()=>{t.type!=="input"&&t.type!=="output"?c(!0):l(t.id)},p=()=>{Sx(t,o).catch(w=>{console.error("Failed to delete node from filesystem:",w)}),l(t.id),c(!1)},x=()=>{c(!1)},y=w=>{a(t.id,{label:w})},b=w=>{a(t.id,{description:w})};return m.jsxs("div",{className:"flex flex-col h-full",children:[m.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border bg-surface-hover/50",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("div",{className:"p-2 rounded-lg bg-surface",children:IE(t.type)}),m.jsxs("div",{children:[m.jsx("h3",{className:"text-base font-semibold text-white",children:t.data.label}),m.jsx("p",{className:"text-xs text-gray-500",children:FE(t.type)})]})]}),m.jsx("button",{onClick:g,className:"p-2 text-red-400 hover:text-red-300 hover:bg-red-500/10 rounded-lg transition-colors",title:"Delete node",children:m.jsx(Fs,{className:"w-4 h-4"})})]}),m.jsxs("div",{className:"flex-1 overflow-y-auto p-4 space-y-5",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Name"}),m.jsx("input",{type:"text",value:t.data.label,onChange:w=>y(w.target.value),className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all"})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:t.type==="agent"?"Prompt":"Description"}),m.jsx("textarea",{value:t.data.description||"",onChange:w=>b(w.target.value),rows:4,placeholder:t.type==="agent"?"Enter instructions for this agent...":"Describe what this step does...",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent focus:border-transparent transition-all resize-none"})]}),t.type==="input"&&m.jsx(PE,{data:t.data,onUpdate:w=>a(t.id,w)}),t.type==="agent"&&m.jsx(WE,{data:t.data,onUpdate:w=>a(t.id,w)}),t.type==="skill"&&m.jsx(eN,{data:t.data,onUpdate:w=>a(t.id,w)}),t.type==="hook"&&m.jsx(tN,{data:t.data,onUpdate:w=>a(t.id,w)}),t.type==="output"&&m.jsx(nN,{onUpdate:w=>a(t.id,w)})]}),s&&m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:m.jsxs("div",{className:"bg-zinc-800 rounded-lg p-6 max-w-md w-full mx-4 border border-zinc-700 shadow-xl",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[m.jsx("div",{className:"w-10 h-10 rounded-full bg-red-500/20 flex items-center justify-center",children:m.jsx(Fs,{className:"w-5 h-5 text-red-400"})}),m.jsx("h3",{className:"text-lg font-semibold text-white",children:"노드 삭제 확인"})]}),m.jsxs("p",{className:"text-zinc-300 mb-4",children:[m.jsx("span",{className:"font-medium text-white",children:t.data.label})," 노드를 삭제하시겠습니까?",m.jsx("br",{}),m.jsx("span",{className:"text-red-400 text-sm",children:"이 작업은 파일을 삭제하며 되돌릴 수 없습니다."})]}),m.jsxs("div",{className:"flex gap-3 justify-end",children:[m.jsx("button",{onClick:x,className:"px-4 py-2 rounded-md bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors",children:"취소"}),m.jsx("button",{onClick:p,className:"px-4 py-2 rounded-md bg-red-600 text-white hover:bg-red-500 transition-colors",children:"삭제"})]})]})})]})}function PE({data:t,onUpdate:a}){return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Input Type"}),m.jsx("div",{className:"grid grid-cols-3 gap-2",children:["text","file","select"].map(l=>m.jsx("button",{onClick:()=>a({inputType:l}),className:`px-3 py-2 text-sm rounded-lg border transition-colors ${t.inputType===l?"bg-accent/20 border-accent text-white":"bg-surface border-border text-gray-400 hover:border-gray-500"}`,children:l.charAt(0).toUpperCase()+l.slice(1)},l))})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Default Value"}),m.jsx("textarea",{value:t.value||"",onChange:l=>a({value:l.target.value}),rows:3,placeholder:"Enter default value...",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent resize-none"})]})]})}function WE({data:t,onUpdate:a}){return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Model"}),m.jsx("div",{className:"space-y-2",children:KE.map(l=>m.jsxs("button",{onClick:()=>a({model:l.id}),className:`w-full flex items-center gap-3 p-3 rounded-lg border transition-colors ${t.model===l.id?"bg-accent/20 border-accent":"bg-surface-hover border-border hover:border-gray-500"}`,children:[m.jsx($o,{className:"w-5 h-5 text-purple-400"}),m.jsxs("div",{className:"text-left",children:[m.jsx("div",{className:"font-medium text-white",children:l.name}),m.jsx("div",{className:"text-xs text-gray-500",children:l.description})]})]},l.id))})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Allowed Tools"}),m.jsx("div",{className:"grid grid-cols-2 gap-2",children:ZE.map(l=>m.jsxs("label",{className:"flex items-center gap-2 p-2 bg-surface-hover rounded-lg cursor-pointer hover:bg-border transition-colors",children:[m.jsx("input",{type:"checkbox",checked:t.tools?.includes(l)??!1,onChange:o=>{const s=o.target.checked?[...t.tools||[],l]:(t.tools||[]).filter(c=>c!==l);a({tools:s})},className:"rounded border-gray-600 bg-surface text-accent focus:ring-accent"}),m.jsx("span",{className:"text-sm text-gray-300",children:l})]},l))})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"System Prompt"}),m.jsx("textarea",{value:t.systemPrompt||"",onChange:l=>a({systemPrompt:l.target.value}),rows:4,placeholder:"Enter custom instructions for this agent...",className:"w-full px-3 py-2 bg-surface-hover border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent resize-none"})]})]})}function eN({data:t,onUpdate:a}){const[l,o]=j.useState([]),[s,c]=j.useState(!1),[f,h]=j.useState(null),[g,p]=j.useState(""),[x,y]=j.useState(!1),[b,w]=j.useState(null);j.useEffect(()=>{t.skillType==="generated"&&t.skillPath&&(c(!0),fetch(`/api/skill/files?path=${encodeURIComponent(t.skillPath)}`).then(N=>N.json()).then(N=>{o(N.files||[]),N.files?.length>0&&h(N.files[0].name)}).catch(N=>{console.error("Failed to load skill files:",N)}).finally(()=>c(!1)))},[t.skillPath,t.skillType]);const E=async()=>{if(t.skillPath){y(!0),w(null);try{const N=g.trim()?g.trim().split(/\s+/):[],k=await(await fetch("/api/skill/test",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({skillPath:t.skillPath,args:N})})).json();w(k)}catch(N){w({success:!1,error:N instanceof Error?N.message:"Unknown error"})}finally{y(!1)}}};return t.skillType==="generated"&&t.skillPath?m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Skill Path"}),m.jsx("div",{className:"px-3 py-2 bg-surface border border-border rounded-lg text-gray-400 text-sm font-mono break-all",children:t.skillPath})]}),m.jsxs("div",{children:[m.jsxs("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:[m.jsx(ZS,{className:"w-4 h-4 inline mr-1"}),"Files Preview"]}),s?m.jsxs("div",{className:"flex items-center justify-center py-8 text-gray-500",children:[m.jsx(Ks,{className:"w-5 h-5 animate-spin mr-2"}),"파일 로딩 중..."]}):l.length===0?m.jsx("div",{className:"text-center py-4 text-gray-500 text-sm",children:"파일을 찾을 수 없습니다"}):m.jsx("div",{className:"space-y-2",children:l.map(N=>m.jsxs("div",{className:"border border-border rounded-lg overflow-hidden",children:[m.jsxs("button",{onClick:()=>h(f===N.name?null:N.name),className:"w-full flex items-center justify-between px-3 py-2 bg-surface-hover hover:bg-border transition-colors",children:[m.jsx("span",{className:"text-sm text-white font-medium",children:N.name}),f===N.name?m.jsx(Fd,{className:"w-4 h-4 text-gray-400"}):m.jsx(hx,{className:"w-4 h-4 text-gray-400"})]}),f===N.name&&m.jsx("pre",{className:"p-3 bg-[#0d1117] text-xs text-gray-300 overflow-x-auto max-h-64 overflow-y-auto font-mono",children:N.content})]},N.name))})]}),m.jsxs("div",{children:[m.jsxs("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:[m.jsx(Is,{className:"w-4 h-4 inline mr-1"}),"Test Skill"]}),m.jsxs("div",{className:"space-y-3",children:[m.jsx("div",{children:m.jsx("input",{type:"text",value:g,onChange:N=>p(N.target.value),placeholder:"Arguments (optional, space-separated)",className:"w-full px-3 py-2 bg-surface border border-border rounded-lg text-white text-sm focus:outline-none focus:ring-2 focus:ring-accent"})}),m.jsx("button",{onClick:E,disabled:x,className:`w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-lg font-medium transition-colors ${x?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-cyan-600 hover:bg-cyan-700 text-white"}`,children:x?m.jsxs(m.Fragment,{children:[m.jsx(Ks,{className:"w-4 h-4 animate-spin"}),"실행 중..."]}):m.jsxs(m.Fragment,{children:[m.jsx(Is,{className:"w-4 h-4"}),"테스트 실행"]})}),b&&m.jsxs("div",{className:`p-3 rounded-lg border ${b.success?"bg-green-500/10 border-green-500/30":"bg-red-500/10 border-red-500/30"}`,children:[m.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[b.success?m.jsx(Pd,{className:"w-4 h-4 text-green-400"}):m.jsx(px,{className:"w-4 h-4 text-red-400"}),m.jsxs("span",{className:`text-sm font-medium ${b.success?"text-green-400":"text-red-400"}`,children:[b.success?"성공":"실패",b.exitCode!==void 0&&` (exit code: ${b.exitCode})`]})]}),b.stdout&&m.jsxs("div",{className:"mb-2",children:[m.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Output:"}),m.jsx("pre",{className:"p-2 bg-black/30 rounded text-xs text-gray-300 overflow-x-auto max-h-32 overflow-y-auto font-mono whitespace-pre-wrap",children:b.stdout})]}),b.stderr&&m.jsxs("div",{children:[m.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Error:"}),m.jsx("pre",{className:"p-2 bg-black/30 rounded text-xs text-red-400 overflow-x-auto max-h-32 overflow-y-auto font-mono whitespace-pre-wrap",children:b.stderr})]}),b.error&&m.jsx("div",{className:"text-sm text-red-400",children:b.error})]})]})]})]}):m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Skill Type"}),m.jsx("div",{className:"grid grid-cols-2 gap-2 mb-4",children:["official","custom"].map(N=>m.jsx("button",{onClick:()=>a({skillType:N}),className:`px-3 py-2 text-sm rounded-lg border transition-colors ${t.skillType===N?"bg-accent/20 border-accent text-white":"bg-surface border-border text-gray-400 hover:border-gray-500"}`,children:N.charAt(0).toUpperCase()+N.slice(1)},N))})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Select Skill"}),m.jsx("div",{className:"space-y-2",children:QE.map(N=>m.jsxs("button",{onClick:()=>a({skillId:N.id,description:N.description}),className:`w-full flex items-center gap-3 p-3 rounded-lg border transition-colors text-left ${t.skillId===N.id?"bg-accent/20 border-accent":"bg-surface border-border hover:border-gray-500"}`,children:[m.jsx(Yo,{className:"w-5 h-5 text-cyan-400"}),m.jsxs("div",{children:[m.jsx("div",{className:"font-medium text-white",children:N.name}),m.jsx("div",{className:"text-xs text-gray-500",children:N.description})]})]},N.id))})]})]})}function tN({data:t,onUpdate:a}){const l=["PreToolUse","PostToolUse","Notification","Stop"];return m.jsxs(m.Fragment,{children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Hook Event"}),m.jsx("div",{className:"grid grid-cols-2 gap-2",children:l.map(o=>m.jsx("button",{onClick:()=>a({hookEvent:o}),className:`px-3 py-2 text-sm rounded-lg border transition-colors ${t.hookEvent===o?"bg-accent/20 border-accent text-white":"bg-surface border-border text-gray-400 hover:border-gray-500"}`,children:o},o))})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Tool Matcher (optional)"}),m.jsx("input",{type:"text",value:t.hookMatcher||"",onChange:o=>a({hookMatcher:o.target.value}),placeholder:"e.g., Bash, Write, Edit",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent"}),m.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Filter by tool name pattern"})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Hook Command"}),m.jsx("input",{type:"text",value:t.hookCommand||"",onChange:o=>a({hookCommand:o.target.value}),placeholder:"e.g., npm run lint",className:"w-full px-3 py-2.5 bg-surface border border-border rounded-lg text-white focus:outline-none focus:ring-2 focus:ring-accent"}),m.jsx("p",{className:"mt-1 text-xs text-gray-500",children:"Shell command to execute"})]})]})}function nN({onUpdate:t}){const a=[{id:"auto",name:"Auto Format",description:"Automatically format output"},{id:"markdown",name:"Markdown",description:"Plain markdown text"},{id:"document",name:"Document",description:"Formatted document output"}];return m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-400 mb-2",children:"Output Format"}),m.jsx("div",{className:"space-y-2",children:a.map(l=>m.jsxs("button",{onClick:()=>t({layoutType:l.id}),className:"w-full flex items-center gap-3 p-3 rounded-lg border bg-surface-hover border-border hover:border-gray-500 transition-colors text-left",children:[m.jsx(uc,{className:"w-5 h-5 text-emerald-400"}),m.jsxs("div",{children:[m.jsx("div",{className:"font-medium text-white",children:l.name}),m.jsx("div",{className:"text-xs text-gray-500",children:l.description})]})]},l.id))})]})}function Ex({showProperties:t=!0}){const a=Oa($E),[l,o]=j.useState(!1);return m.jsxs("div",{className:"flex flex-col h-full",children:[m.jsxs("div",{className:`flex flex-col transition-all ${t?l?"h-10":"flex-1 min-h-[200px]":"flex-1"} ${t?"border-b border-border":""}`,children:[m.jsxs("button",{onClick:()=>o(!l),className:"flex items-center justify-between px-3 py-2 hover:bg-surface-hover transition-colors flex-shrink-0",disabled:!t,children:[m.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Explorer"}),t&&(l?m.jsx(Fd,{className:"w-4 h-4 text-gray-500"}):m.jsx(Jd,{className:"w-4 h-4 text-gray-500"}))]}),(!t||!l)&&m.jsx(XE,{className:"flex-1 min-h-0"})]}),t&&m.jsxs("div",{className:`flex flex-col transition-all ${l?"flex-1":"h-[45%]"}`,children:[m.jsx("div",{className:"flex items-center px-3 py-2 border-b border-border flex-shrink-0",children:m.jsx("span",{className:"text-xs font-medium text-gray-400 uppercase tracking-wider",children:"Properties"})}),m.jsx("div",{className:"flex-1 overflow-y-auto min-h-0",children:m.jsx(JE,{node:a})})]})]})}function Nx(t){var a,l,o="";if(typeof t=="string"||typeof t=="number")o+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(a=0;a<s;a++)t[a]&&(l=Nx(t[a]))&&(o&&(o+=" "),o+=l)}else for(l in t)t[l]&&(o&&(o+=" "),o+=l);return o}function It(){for(var t,a,l=0,o="",s=arguments.length;l<s;l++)(t=arguments[l])&&(a=Nx(t))&&(o&&(o+=" "),o+=a);return o}function aN(t){return new Date(t).toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function iN({level:t}){switch(t){case"success":return m.jsx(Pd,{className:"w-3.5 h-3.5 text-green-400"});case"error":return m.jsx(px,{className:"w-3.5 h-3.5 text-red-400"});case"warning":return m.jsx(jE,{className:"w-3.5 h-3.5 text-yellow-400"});default:return m.jsx(iE,{className:"w-3.5 h-3.5 text-blue-400"})}}function _x({className:t=""}){const{logs:a,clearLogs:l,isRunning:o}=fc(),[s,c]=j.useState(!0),f=j.useRef(null);return j.useEffect(()=>{f.current&&s&&(f.current.scrollTop=f.current.scrollHeight)},[a,s]),m.jsxs("div",{className:`border-t border-border bg-surface flex-shrink-0 ${t}`,children:[m.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b border-border",children:[m.jsxs("button",{onClick:()=>c(!s),className:"flex items-center gap-2 hover:text-white transition-colors",children:[m.jsx(xx,{className:"w-4 h-4 text-amber-500"}),m.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Console"}),o&&m.jsxs("span",{className:"flex items-center gap-1 px-1.5 py-0.5 text-xs bg-blue-500/20 text-blue-400 rounded",children:[m.jsx("span",{className:"w-1.5 h-1.5 bg-blue-400 rounded-full animate-pulse"}),"Running"]}),a.length>0&&m.jsx("span",{className:"px-1.5 py-0.5 text-xs bg-gray-700 text-gray-400 rounded",children:a.length}),s?m.jsx(Fd,{className:"w-4 h-4 text-gray-500"}):m.jsx(Jd,{className:"w-4 h-4 text-gray-500"})]}),a.length>0&&m.jsx("button",{onClick:l,className:"p-1 hover:bg-surface-hover rounded transition-colors",title:"Clear logs",children:m.jsx(Fs,{className:"w-4 h-4 text-gray-500 hover:text-gray-300"})})]}),s&&m.jsx("div",{ref:f,className:"h-32 overflow-y-auto font-mono text-xs p-2 space-y-0.5",children:a.length===0?m.jsx("div",{className:"text-gray-600 py-4 text-center",children:"No logs yet. Run workflow to see output."}):a.map(h=>m.jsxs("div",{className:It("flex items-start gap-2 px-2 py-1 rounded",h.level==="error"&&"bg-red-500/10",h.level==="warning"&&"bg-yellow-500/10",h.level==="success"&&"bg-green-500/10"),children:[m.jsxs("span",{className:"text-gray-600 flex-shrink-0",children:["[",aN(h.timestamp),"]"]}),m.jsx(iN,{level:h.level}),m.jsx("span",{className:It("break-all",h.level==="error"&&"text-red-400",h.level==="warning"&&"text-yellow-400",h.level==="success"&&"text-green-400",h.level==="info"&&"text-gray-300"),children:h.message}),h.nodeId&&m.jsxs("span",{className:"text-purple-400 flex-shrink-0",children:["[",h.nodeId.slice(0,8),"]"]})]},h.id))})]})}const dc=Xo(t=>({activeTab:"preview",isCollapsed:!1,width:400,setActiveTab:a=>t({activeTab:a}),toggleCollapsed:()=>t(a=>({isCollapsed:!a.isCollapsed})),setWidth:a=>t({width:Math.max(300,Math.min(600,a))}),openStepPanel:()=>t({activeTab:"step",isCollapsed:!1}),openConsolePanel:()=>t({activeTab:"console",isCollapsed:!1})}));function lN(){const t=Xd(),a=j.useRef(null),{projects:l,galleryItems:o,isLoading:s,fetchProjects:c,createProject:f,setCurrentProject:h,navigateToPath:g,homeScrollPosition:p,setHomeScrollPosition:x}=nh(),{addLog:y}=fc(),{isCollapsed:b,width:w}=dc(),[E,N]=j.useState(!1),[T,k]=j.useState(!1),[A,S]=j.useState("");j.useEffect(()=>{c()},[c]),j.useEffect(()=>{a.current&&p>0&&(a.current.scrollTop=p)},[p]);const C=j.useCallback(()=>{a.current&&x(a.current.scrollTop)},[x]);j.useEffect(()=>{l.length>0&&y("info",`Loaded ${l.length} project(s)`)},[l.length,y]);const D=$=>{h($),$.path&&g($.path),y("info",`Opening project: ${$.name}`),t(`/project/${encodeURIComponent($.name)}`)},z=async($,G)=>{const ee=await f($,G);ee&&D(ee)},O=o.filter($=>$.name.toLowerCase().includes(A.toLowerCase())||$.description.toLowerCase().includes(A.toLowerCase()));return m.jsxs("div",{className:"h-screen flex flex-col bg-canvas overflow-hidden",children:[m.jsxs("header",{className:"flex items-center justify-between px-6 py-4 border-b border-border bg-surface flex-shrink-0",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("div",{className:"w-8 h-8 rounded-lg bg-gradient-to-br from-amber-500 to-orange-600 flex items-center justify-center",children:m.jsx("span",{className:"text-white font-bold text-sm",children:"M"})}),m.jsx("span",{className:"text-lg font-semibold text-white",children:"makecc"}),m.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-gray-700 text-gray-300 rounded-full",children:"beta"})]}),m.jsx("div",{className:"flex items-center gap-2",children:m.jsx("button",{onClick:()=>k(!0),className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",title:"Settings",children:m.jsx(eh,{className:"w-5 h-5 text-gray-400"})})})]}),m.jsxs("main",{className:"flex-1 flex overflow-hidden",children:[m.jsxs("div",{ref:a,onScroll:C,className:"flex-1 overflow-y-auto px-6 py-8",children:[m.jsx("div",{className:"text-center mb-10",children:m.jsxs("h1",{className:"text-3xl md:text-4xl font-bold text-white mb-3",children:["Build, edit and share AI skills",m.jsx("br",{}),m.jsx("span",{className:"text-gray-400",children:"using natural language"})]})}),m.jsxs("section",{className:"mb-12 max-w-4xl mx-auto",children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsx("h2",{className:"text-xl font-semibold text-white",children:"Your projects"}),m.jsxs("button",{onClick:()=>N(!0),className:"flex items-center gap-2 px-4 py-2 border border-border hover:bg-surface-hover rounded-lg transition-colors",children:[m.jsx(Cg,{className:"w-4 h-4 text-gray-400"}),m.jsx("span",{className:"text-sm font-medium text-white",children:"Create New"})]})]}),s?m.jsx("div",{className:"flex items-center justify-center py-16",children:m.jsx("div",{className:"w-8 h-8 border-2 border-accent border-t-transparent rounded-full animate-spin"})}):l.length===0?m.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[m.jsx("div",{className:"w-16 h-16 mb-4 rounded-2xl bg-gray-800 flex items-center justify-center",children:m.jsx(Cg,{className:"w-8 h-8 text-gray-600"})}),m.jsx("h3",{className:"text-lg font-medium text-white mb-2",children:"No projects yet"}),m.jsx("p",{className:"text-gray-400 mb-4",children:"Create your first project to get started"}),m.jsx("button",{onClick:()=>N(!0),className:"px-6 py-2 bg-accent hover:bg-accent-hover rounded-lg font-medium text-white transition-colors",children:"Create Project"})]}):m.jsx("div",{className:"flex flex-wrap gap-6",children:l.map($=>m.jsx(LE,{project:$,onClick:()=>D($)},$.id))})]}),m.jsxs("section",{className:"max-w-4xl mx-auto pb-8",children:[m.jsxs("div",{className:"flex items-center justify-between mb-6",children:[m.jsx("h2",{className:"text-xl font-semibold text-white",children:"Gallery"}),m.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-surface border border-border rounded-lg",children:[m.jsx(yE,{className:"w-4 h-4 text-gray-500"}),m.jsx("input",{type:"text",value:A,onChange:$=>S($.target.value),placeholder:"Search",className:"bg-transparent border-none outline-none text-sm text-white placeholder-gray-500 w-40"})]})]}),O.length===0?m.jsx("div",{className:"text-center py-12 text-gray-500",children:A?"No templates found":"Gallery templates coming soon"}):m.jsx("div",{className:"flex flex-wrap gap-4",children:O.map($=>m.jsx(BE,{item:$,onClick:()=>{console.log("Clone gallery item:",$.id)}},$.id))})]})]}),!b&&m.jsx("div",{className:"border-l border-border bg-surface flex-shrink-0",style:{width:`${w}px`},children:m.jsx(Ex,{showProperties:!1})})]}),m.jsx(_x,{}),m.jsx(UE,{isOpen:E,onClose:()=>N(!1),onCreate:z}),m.jsx(bx,{isOpen:T,onClose:()=>k(!1)})]})}function ot(t){if(typeof t=="string"||typeof t=="number")return""+t;let a="";if(Array.isArray(t))for(let l=0,o;l<t.length;l++)(o=ot(t[l]))!==""&&(a+=(a&&" ")+o);else for(let l in t)t[l]&&(a+=(a&&" ")+l);return a}var oN={value:()=>{}};function hc(){for(var t=0,a=arguments.length,l={},o;t<a;++t){if(!(o=arguments[t]+"")||o in l||/[\s.]/.test(o))throw new Error("illegal type: "+o);l[o]=[]}return new Ds(l)}function Ds(t){this._=t}function rN(t,a){return t.trim().split(/^|\s+/).map(function(l){var o="",s=l.indexOf(".");if(s>=0&&(o=l.slice(s+1),l=l.slice(0,s)),l&&!a.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:o}})}Ds.prototype=hc.prototype={constructor:Ds,on:function(t,a){var l=this._,o=rN(t+"",l),s,c=-1,f=o.length;if(arguments.length<2){for(;++c<f;)if((s=(t=o[c]).type)&&(s=sN(l[s],t.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++c<f;)if(s=(t=o[c]).type)l[s]=Mg(l[s],t.name,a);else if(a==null)for(s in l)l[s]=Mg(l[s],t.name,null);return this},copy:function(){var t={},a=this._;for(var l in a)t[l]=a[l].slice();return new Ds(t)},call:function(t,a){if((s=arguments.length-2)>0)for(var l=new Array(s),o=0,s,c;o<s;++o)l[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],o=0,s=c.length;o<s;++o)c[o].value.apply(a,l)},apply:function(t,a,l){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var o=this._[t],s=0,c=o.length;s<c;++s)o[s].value.apply(a,l)}};function sN(t,a){for(var l=0,o=t.length,s;l<o;++l)if((s=t[l]).name===a)return s.value}function Mg(t,a,l){for(var o=0,s=t.length;o<s;++o)if(t[o].name===a){t[o]=oN,t=t.slice(0,o).concat(t.slice(o+1));break}return l!=null&&t.push({name:a,value:l}),t}var Sd="http://www.w3.org/1999/xhtml";const Rg={svg:"http://www.w3.org/2000/svg",xhtml:Sd,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function pc(t){var a=t+="",l=a.indexOf(":");return l>=0&&(a=t.slice(0,l))!=="xmlns"&&(t=t.slice(l+1)),Rg.hasOwnProperty(a)?{space:Rg[a],local:t}:t}function cN(t){return function(){var a=this.ownerDocument,l=this.namespaceURI;return l===Sd&&a.documentElement.namespaceURI===Sd?a.createElement(t):a.createElementNS(l,t)}}function uN(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Cx(t){var a=pc(t);return(a.local?uN:cN)(a)}function fN(){}function ih(t){return t==null?fN:function(){return this.querySelector(t)}}function dN(t){typeof t!="function"&&(t=ih(t));for(var a=this._groups,l=a.length,o=new Array(l),s=0;s<l;++s)for(var c=a[s],f=c.length,h=o[s]=new Array(f),g,p,x=0;x<f;++x)(g=c[x])&&(p=t.call(g,g.__data__,x,c))&&("__data__"in g&&(p.__data__=g.__data__),h[x]=p);return new qt(o,this._parents)}function hN(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function pN(){return[]}function Tx(t){return t==null?pN:function(){return this.querySelectorAll(t)}}function mN(t){return function(){return hN(t.apply(this,arguments))}}function gN(t){typeof t=="function"?t=mN(t):t=Tx(t);for(var a=this._groups,l=a.length,o=[],s=[],c=0;c<l;++c)for(var f=a[c],h=f.length,g,p=0;p<h;++p)(g=f[p])&&(o.push(t.call(g,g.__data__,p,f)),s.push(g));return new qt(o,s)}function kx(t){return function(){return this.matches(t)}}function jx(t){return function(a){return a.matches(t)}}var yN=Array.prototype.find;function xN(t){return function(){return yN.call(this.children,t)}}function vN(){return this.firstElementChild}function bN(t){return this.select(t==null?vN:xN(typeof t=="function"?t:jx(t)))}var wN=Array.prototype.filter;function SN(){return Array.from(this.children)}function EN(t){return function(){return wN.call(this.children,t)}}function NN(t){return this.selectAll(t==null?SN:EN(typeof t=="function"?t:jx(t)))}function _N(t){typeof t!="function"&&(t=kx(t));for(var a=this._groups,l=a.length,o=new Array(l),s=0;s<l;++s)for(var c=a[s],f=c.length,h=o[s]=[],g,p=0;p<f;++p)(g=c[p])&&t.call(g,g.__data__,p,c)&&h.push(g);return new qt(o,this._parents)}function Ax(t){return new Array(t.length)}function CN(){return new qt(this._enter||this._groups.map(Ax),this._parents)}function Js(t,a){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=a}Js.prototype={constructor:Js,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,a){return this._parent.insertBefore(t,a)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function TN(t){return function(){return t}}function kN(t,a,l,o,s,c){for(var f=0,h,g=a.length,p=c.length;f<p;++f)(h=a[f])?(h.__data__=c[f],o[f]=h):l[f]=new Js(t,c[f]);for(;f<g;++f)(h=a[f])&&(s[f]=h)}function jN(t,a,l,o,s,c,f){var h,g,p=new Map,x=a.length,y=c.length,b=new Array(x),w;for(h=0;h<x;++h)(g=a[h])&&(b[h]=w=f.call(g,g.__data__,h,a)+"",p.has(w)?s[h]=g:p.set(w,g));for(h=0;h<y;++h)w=f.call(t,c[h],h,c)+"",(g=p.get(w))?(o[h]=g,g.__data__=c[h],p.delete(w)):l[h]=new Js(t,c[h]);for(h=0;h<x;++h)(g=a[h])&&p.get(b[h])===g&&(s[h]=g)}function AN(t){return t.__data__}function MN(t,a){if(!arguments.length)return Array.from(this,AN);var l=a?jN:kN,o=this._parents,s=this._groups;typeof t!="function"&&(t=TN(t));for(var c=s.length,f=new Array(c),h=new Array(c),g=new Array(c),p=0;p<c;++p){var x=o[p],y=s[p],b=y.length,w=RN(t.call(x,x&&x.__data__,p,o)),E=w.length,N=h[p]=new Array(E),T=f[p]=new Array(E),k=g[p]=new Array(b);l(x,y,N,T,k,w,a);for(var A=0,S=0,C,D;A<E;++A)if(C=N[A]){for(A>=S&&(S=A+1);!(D=T[S])&&++S<E;);C._next=D||null}}return f=new qt(f,o),f._enter=h,f._exit=g,f}function RN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function zN(){return new qt(this._exit||this._groups.map(Ax),this._parents)}function ON(t,a,l){var o=this.enter(),s=this,c=this.exit();return typeof t=="function"?(o=t(o),o&&(o=o.selection())):o=o.append(t+""),a!=null&&(s=a(s),s&&(s=s.selection())),l==null?c.remove():l(c),o&&s?o.merge(s).order():s}function DN(t){for(var a=t.selection?t.selection():t,l=this._groups,o=a._groups,s=l.length,c=o.length,f=Math.min(s,c),h=new Array(s),g=0;g<f;++g)for(var p=l[g],x=o[g],y=p.length,b=h[g]=new Array(y),w,E=0;E<y;++E)(w=p[E]||x[E])&&(b[E]=w);for(;g<s;++g)h[g]=l[g];return new qt(h,this._parents)}function HN(){for(var t=this._groups,a=-1,l=t.length;++a<l;)for(var o=t[a],s=o.length-1,c=o[s],f;--s>=0;)(f=o[s])&&(c&&f.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(f,c),c=f);return this}function LN(t){t||(t=BN);function a(y,b){return y&&b?t(y.__data__,b.__data__):!y-!b}for(var l=this._groups,o=l.length,s=new Array(o),c=0;c<o;++c){for(var f=l[c],h=f.length,g=s[c]=new Array(h),p,x=0;x<h;++x)(p=f[x])&&(g[x]=p);g.sort(a)}return new qt(s,this._parents).order()}function BN(t,a){return t<a?-1:t>a?1:t>=a?0:NaN}function UN(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function qN(){return Array.from(this)}function VN(){for(var t=this._groups,a=0,l=t.length;a<l;++a)for(var o=t[a],s=0,c=o.length;s<c;++s){var f=o[s];if(f)return f}return null}function $N(){let t=0;for(const a of this)++t;return t}function YN(){return!this.node()}function XN(t){for(var a=this._groups,l=0,o=a.length;l<o;++l)for(var s=a[l],c=0,f=s.length,h;c<f;++c)(h=s[c])&&t.call(h,h.__data__,c,s);return this}function GN(t){return function(){this.removeAttribute(t)}}function ZN(t){return function(){this.removeAttributeNS(t.space,t.local)}}function QN(t,a){return function(){this.setAttribute(t,a)}}function KN(t,a){return function(){this.setAttributeNS(t.space,t.local,a)}}function IN(t,a){return function(){var l=a.apply(this,arguments);l==null?this.removeAttribute(t):this.setAttribute(t,l)}}function FN(t,a){return function(){var l=a.apply(this,arguments);l==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,l)}}function JN(t,a){var l=pc(t);if(arguments.length<2){var o=this.node();return l.local?o.getAttributeNS(l.space,l.local):o.getAttribute(l)}return this.each((a==null?l.local?ZN:GN:typeof a=="function"?l.local?FN:IN:l.local?KN:QN)(l,a))}function Mx(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function PN(t){return function(){this.style.removeProperty(t)}}function WN(t,a,l){return function(){this.style.setProperty(t,a,l)}}function e_(t,a,l){return function(){var o=a.apply(this,arguments);o==null?this.style.removeProperty(t):this.style.setProperty(t,o,l)}}function t_(t,a,l){return arguments.length>1?this.each((a==null?PN:typeof a=="function"?e_:WN)(t,a,l??"")):cl(this.node(),t)}function cl(t,a){return t.style.getPropertyValue(a)||Mx(t).getComputedStyle(t,null).getPropertyValue(a)}function n_(t){return function(){delete this[t]}}function a_(t,a){return function(){this[t]=a}}function i_(t,a){return function(){var l=a.apply(this,arguments);l==null?delete this[t]:this[t]=l}}function l_(t,a){return arguments.length>1?this.each((a==null?n_:typeof a=="function"?i_:a_)(t,a)):this.node()[t]}function Rx(t){return t.trim().split(/^|\s+/)}function lh(t){return t.classList||new zx(t)}function zx(t){this._node=t,this._names=Rx(t.getAttribute("class")||"")}zx.prototype={add:function(t){var a=this._names.indexOf(t);a<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var a=this._names.indexOf(t);a>=0&&(this._names.splice(a,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Ox(t,a){for(var l=lh(t),o=-1,s=a.length;++o<s;)l.add(a[o])}function Dx(t,a){for(var l=lh(t),o=-1,s=a.length;++o<s;)l.remove(a[o])}function o_(t){return function(){Ox(this,t)}}function r_(t){return function(){Dx(this,t)}}function s_(t,a){return function(){(a.apply(this,arguments)?Ox:Dx)(this,t)}}function c_(t,a){var l=Rx(t+"");if(arguments.length<2){for(var o=lh(this.node()),s=-1,c=l.length;++s<c;)if(!o.contains(l[s]))return!1;return!0}return this.each((typeof a=="function"?s_:a?o_:r_)(l,a))}function u_(){this.textContent=""}function f_(t){return function(){this.textContent=t}}function d_(t){return function(){var a=t.apply(this,arguments);this.textContent=a??""}}function h_(t){return arguments.length?this.each(t==null?u_:(typeof t=="function"?d_:f_)(t)):this.node().textContent}function p_(){this.innerHTML=""}function m_(t){return function(){this.innerHTML=t}}function g_(t){return function(){var a=t.apply(this,arguments);this.innerHTML=a??""}}function y_(t){return arguments.length?this.each(t==null?p_:(typeof t=="function"?g_:m_)(t)):this.node().innerHTML}function x_(){this.nextSibling&&this.parentNode.appendChild(this)}function v_(){return this.each(x_)}function b_(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function w_(){return this.each(b_)}function S_(t){var a=typeof t=="function"?t:Cx(t);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function E_(){return null}function N_(t,a){var l=typeof t=="function"?t:Cx(t),o=a==null?E_:typeof a=="function"?a:ih(a);return this.select(function(){return this.insertBefore(l.apply(this,arguments),o.apply(this,arguments)||null)})}function __(){var t=this.parentNode;t&&t.removeChild(this)}function C_(){return this.each(__)}function T_(){var t=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(t,this.nextSibling):t}function k_(){var t=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(t,this.nextSibling):t}function j_(t){return this.select(t?k_:T_)}function A_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function M_(t){return function(a){t.call(this,a,this.__data__)}}function R_(t){return t.trim().split(/^|\s+/).map(function(a){var l="",o=a.indexOf(".");return o>=0&&(l=a.slice(o+1),a=a.slice(0,o)),{type:a,name:l}})}function z_(t){return function(){var a=this.__on;if(a){for(var l=0,o=-1,s=a.length,c;l<s;++l)c=a[l],(!t.type||c.type===t.type)&&c.name===t.name?this.removeEventListener(c.type,c.listener,c.options):a[++o]=c;++o?a.length=o:delete this.__on}}}function O_(t,a,l){return function(){var o=this.__on,s,c=M_(a);if(o){for(var f=0,h=o.length;f<h;++f)if((s=o[f]).type===t.type&&s.name===t.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=c,s.options=l),s.value=a;return}}this.addEventListener(t.type,c,l),s={type:t.type,name:t.name,value:a,listener:c,options:l},o?o.push(s):this.__on=[s]}}function D_(t,a,l){var o=R_(t+""),s,c=o.length,f;if(arguments.length<2){var h=this.node().__on;if(h){for(var g=0,p=h.length,x;g<p;++g)for(s=0,x=h[g];s<c;++s)if((f=o[s]).type===x.type&&f.name===x.name)return x.value}return}for(h=a?O_:z_,s=0;s<c;++s)this.each(h(o[s],a,l));return this}function Hx(t,a,l){var o=Mx(t),s=o.CustomEvent;typeof s=="function"?s=new s(a,l):(s=o.document.createEvent("Event"),l?(s.initEvent(a,l.bubbles,l.cancelable),s.detail=l.detail):s.initEvent(a,!1,!1)),t.dispatchEvent(s)}function H_(t,a){return function(){return Hx(this,t,a)}}function L_(t,a){return function(){return Hx(this,t,a.apply(this,arguments))}}function B_(t,a){return this.each((typeof a=="function"?L_:H_)(t,a))}function*U_(){for(var t=this._groups,a=0,l=t.length;a<l;++a)for(var o=t[a],s=0,c=o.length,f;s<c;++s)(f=o[s])&&(yield f)}var Lx=[null];function qt(t,a){this._groups=t,this._parents=a}function Go(){return new qt([[document.documentElement]],Lx)}function q_(){return this}qt.prototype=Go.prototype={constructor:qt,select:dN,selectAll:gN,selectChild:bN,selectChildren:NN,filter:_N,data:MN,enter:CN,exit:zN,join:ON,merge:DN,selection:q_,order:HN,sort:LN,call:UN,nodes:qN,node:VN,size:$N,empty:YN,each:XN,attr:JN,style:t_,property:l_,classed:c_,text:h_,html:y_,raise:v_,lower:w_,append:S_,insert:N_,remove:C_,clone:j_,datum:A_,on:D_,dispatch:B_,[Symbol.iterator]:U_};function Ut(t){return typeof t=="string"?new qt([[document.querySelector(t)]],[document.documentElement]):new qt([[t]],Lx)}function V_(t){let a;for(;a=t.sourceEvent;)t=a;return t}function ln(t,a){if(t=V_(t),a===void 0&&(a=t.currentTarget),a){var l=a.ownerSVGElement||a;if(l.createSVGPoint){var o=l.createSVGPoint();return o.x=t.clientX,o.y=t.clientY,o=o.matrixTransform(a.getScreenCTM().inverse()),[o.x,o.y]}if(a.getBoundingClientRect){var s=a.getBoundingClientRect();return[t.clientX-s.left-a.clientLeft,t.clientY-s.top-a.clientTop]}}return[t.pageX,t.pageY]}const $_={passive:!1},jo={capture:!0,passive:!1};function ed(t){t.stopImmediatePropagation()}function ol(t){t.preventDefault(),t.stopImmediatePropagation()}function Bx(t){var a=t.document.documentElement,l=Ut(t).on("dragstart.drag",ol,jo);"onselectstart"in a?l.on("selectstart.drag",ol,jo):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function Ux(t,a){var l=t.document.documentElement,o=Ut(t).on("dragstart.drag",null);a&&(o.on("click.drag",ol,jo),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in l?o.on("selectstart.drag",null):(l.style.MozUserSelect=l.__noselect,delete l.__noselect)}const Ss=t=>()=>t;function Ed(t,{sourceEvent:a,subject:l,target:o,identifier:s,active:c,x:f,y:h,dx:g,dy:p,dispatch:x}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},subject:{value:l,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:f,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:p,enumerable:!0,configurable:!0},_:{value:x}})}Ed.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Y_(t){return!t.ctrlKey&&!t.button}function X_(){return this.parentNode}function G_(t,a){return a??{x:t.x,y:t.y}}function Z_(){return navigator.maxTouchPoints||"ontouchstart"in this}function qx(){var t=Y_,a=X_,l=G_,o=Z_,s={},c=hc("start","drag","end"),f=0,h,g,p,x,y=0;function b(C){C.on("mousedown.drag",w).filter(o).on("touchstart.drag",T).on("touchmove.drag",k,$_).on("touchend.drag touchcancel.drag",A).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(C,D){if(!(x||!t.call(this,C,D))){var z=S(this,a.call(this,C,D),C,D,"mouse");z&&(Ut(C.view).on("mousemove.drag",E,jo).on("mouseup.drag",N,jo),Bx(C.view),ed(C),p=!1,h=C.clientX,g=C.clientY,z("start",C))}}function E(C){if(ol(C),!p){var D=C.clientX-h,z=C.clientY-g;p=D*D+z*z>y}s.mouse("drag",C)}function N(C){Ut(C.view).on("mousemove.drag mouseup.drag",null),Ux(C.view,p),ol(C),s.mouse("end",C)}function T(C,D){if(t.call(this,C,D)){var z=C.changedTouches,O=a.call(this,C,D),$=z.length,G,ee;for(G=0;G<$;++G)(ee=S(this,O,C,D,z[G].identifier,z[G]))&&(ed(C),ee("start",C,z[G]))}}function k(C){var D=C.changedTouches,z=D.length,O,$;for(O=0;O<z;++O)($=s[D[O].identifier])&&(ol(C),$("drag",C,D[O]))}function A(C){var D=C.changedTouches,z=D.length,O,$;for(x&&clearTimeout(x),x=setTimeout(function(){x=null},500),O=0;O<z;++O)($=s[D[O].identifier])&&(ed(C),$("end",C,D[O]))}function S(C,D,z,O,$,G){var ee=c.copy(),Y=ln(G||z,D),Z,ie,H;if((H=l.call(C,new Ed("beforestart",{sourceEvent:z,target:b,identifier:$,active:f,x:Y[0],y:Y[1],dx:0,dy:0,dispatch:ee}),O))!=null)return Z=H.x-Y[0]||0,ie=H.y-Y[1]||0,function Q(M,B,V){var K=Y,ne;switch(M){case"start":s[$]=Q,ne=f++;break;case"end":delete s[$],--f;case"drag":Y=ln(V||B,D),ne=f;break}ee.call(M,C,new Ed(M,{sourceEvent:B,subject:H,target:b,identifier:$,active:ne,x:Y[0]+Z,y:Y[1]+ie,dx:Y[0]-K[0],dy:Y[1]-K[1],dispatch:ee}),O)}}return b.filter=function(C){return arguments.length?(t=typeof C=="function"?C:Ss(!!C),b):t},b.container=function(C){return arguments.length?(a=typeof C=="function"?C:Ss(C),b):a},b.subject=function(C){return arguments.length?(l=typeof C=="function"?C:Ss(C),b):l},b.touchable=function(C){return arguments.length?(o=typeof C=="function"?C:Ss(!!C),b):o},b.on=function(){var C=c.on.apply(c,arguments);return C===c?b:C},b.clickDistance=function(C){return arguments.length?(y=(C=+C)*C,b):Math.sqrt(y)},b}function oh(t,a,l){t.prototype=a.prototype=l,l.constructor=t}function Vx(t,a){var l=Object.create(t.prototype);for(var o in a)l[o]=a[o];return l}function Zo(){}var Ao=.7,Ps=1/Ao,rl="\\s*([+-]?\\d+)\\s*",Mo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",xn="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Q_=/^#([0-9a-f]{3,8})$/,K_=new RegExp(`^rgb\\(${rl},${rl},${rl}\\)$`),I_=new RegExp(`^rgb\\(${xn},${xn},${xn}\\)$`),F_=new RegExp(`^rgba\\(${rl},${rl},${rl},${Mo}\\)$`),J_=new RegExp(`^rgba\\(${xn},${xn},${xn},${Mo}\\)$`),P_=new RegExp(`^hsl\\(${Mo},${xn},${xn}\\)$`),W_=new RegExp(`^hsla\\(${Mo},${xn},${xn},${Mo}\\)$`),zg={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};oh(Zo,ui,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Og,formatHex:Og,formatHex8:e3,formatHsl:t3,formatRgb:Dg,toString:Dg});function Og(){return this.rgb().formatHex()}function e3(){return this.rgb().formatHex8()}function t3(){return $x(this).formatHsl()}function Dg(){return this.rgb().formatRgb()}function ui(t){var a,l;return t=(t+"").trim().toLowerCase(),(a=Q_.exec(t))?(l=a[1].length,a=parseInt(a[1],16),l===6?Hg(a):l===3?new At(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):l===8?Es(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):l===4?Es(a>>12&15|a>>8&240,a>>8&15|a>>4&240,a>>4&15|a&240,((a&15)<<4|a&15)/255):null):(a=K_.exec(t))?new At(a[1],a[2],a[3],1):(a=I_.exec(t))?new At(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=F_.exec(t))?Es(a[1],a[2],a[3],a[4]):(a=J_.exec(t))?Es(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=P_.exec(t))?Ug(a[1],a[2]/100,a[3]/100,1):(a=W_.exec(t))?Ug(a[1],a[2]/100,a[3]/100,a[4]):zg.hasOwnProperty(t)?Hg(zg[t]):t==="transparent"?new At(NaN,NaN,NaN,0):null}function Hg(t){return new At(t>>16&255,t>>8&255,t&255,1)}function Es(t,a,l,o){return o<=0&&(t=a=l=NaN),new At(t,a,l,o)}function n3(t){return t instanceof Zo||(t=ui(t)),t?(t=t.rgb(),new At(t.r,t.g,t.b,t.opacity)):new At}function Nd(t,a,l,o){return arguments.length===1?n3(t):new At(t,a,l,o??1)}function At(t,a,l,o){this.r=+t,this.g=+a,this.b=+l,this.opacity=+o}oh(At,Nd,Vx(Zo,{brighter(t){return t=t==null?Ps:Math.pow(Ps,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ao:Math.pow(Ao,t),new At(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new At(si(this.r),si(this.g),si(this.b),Ws(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:Lg,formatHex:Lg,formatHex8:a3,formatRgb:Bg,toString:Bg}));function Lg(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}`}function a3(){return`#${ri(this.r)}${ri(this.g)}${ri(this.b)}${ri((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bg(){const t=Ws(this.opacity);return`${t===1?"rgb(":"rgba("}${si(this.r)}, ${si(this.g)}, ${si(this.b)}${t===1?")":`, ${t})`}`}function Ws(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function si(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ri(t){return t=si(t),(t<16?"0":"")+t.toString(16)}function Ug(t,a,l,o){return o<=0?t=a=l=NaN:l<=0||l>=1?t=a=NaN:a<=0&&(t=NaN),new rn(t,a,l,o)}function $x(t){if(t instanceof rn)return new rn(t.h,t.s,t.l,t.opacity);if(t instanceof Zo||(t=ui(t)),!t)return new rn;if(t instanceof rn)return t;t=t.rgb();var a=t.r/255,l=t.g/255,o=t.b/255,s=Math.min(a,l,o),c=Math.max(a,l,o),f=NaN,h=c-s,g=(c+s)/2;return h?(a===c?f=(l-o)/h+(l<o)*6:l===c?f=(o-a)/h+2:f=(a-l)/h+4,h/=g<.5?c+s:2-c-s,f*=60):h=g>0&&g<1?0:f,new rn(f,h,g,t.opacity)}function i3(t,a,l,o){return arguments.length===1?$x(t):new rn(t,a,l,o??1)}function rn(t,a,l,o){this.h=+t,this.s=+a,this.l=+l,this.opacity=+o}oh(rn,i3,Vx(Zo,{brighter(t){return t=t==null?Ps:Math.pow(Ps,t),new rn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ao:Math.pow(Ao,t),new rn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,a=isNaN(t)||isNaN(this.s)?0:this.s,l=this.l,o=l+(l<.5?l:1-l)*a,s=2*l-o;return new At(td(t>=240?t-240:t+120,s,o),td(t,s,o),td(t<120?t+240:t-120,s,o),this.opacity)},clamp(){return new rn(qg(this.h),Ns(this.s),Ns(this.l),Ws(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=Ws(this.opacity);return`${t===1?"hsl(":"hsla("}${qg(this.h)}, ${Ns(this.s)*100}%, ${Ns(this.l)*100}%${t===1?")":`, ${t})`}`}}));function qg(t){return t=(t||0)%360,t<0?t+360:t}function Ns(t){return Math.max(0,Math.min(1,t||0))}function td(t,a,l){return(t<60?a+(l-a)*t/60:t<180?l:t<240?a+(l-a)*(240-t)/60:a)*255}const rh=t=>()=>t;function l3(t,a){return function(l){return t+l*a}}function o3(t,a,l){return t=Math.pow(t,l),a=Math.pow(a,l)-t,l=1/l,function(o){return Math.pow(t+o*a,l)}}function r3(t){return(t=+t)==1?Yx:function(a,l){return l-a?o3(a,l,t):rh(isNaN(a)?l:a)}}function Yx(t,a){var l=a-t;return l?l3(t,l):rh(isNaN(t)?a:t)}const ec=(function t(a){var l=r3(a);function o(s,c){var f=l((s=Nd(s)).r,(c=Nd(c)).r),h=l(s.g,c.g),g=l(s.b,c.b),p=Yx(s.opacity,c.opacity);return function(x){return s.r=f(x),s.g=h(x),s.b=g(x),s.opacity=p(x),s+""}}return o.gamma=t,o})(1);function s3(t,a){a||(a=[]);var l=t?Math.min(a.length,t.length):0,o=a.slice(),s;return function(c){for(s=0;s<l;++s)o[s]=t[s]*(1-c)+a[s]*c;return o}}function c3(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function u3(t,a){var l=a?a.length:0,o=t?Math.min(l,t.length):0,s=new Array(o),c=new Array(l),f;for(f=0;f<o;++f)s[f]=_o(t[f],a[f]);for(;f<l;++f)c[f]=a[f];return function(h){for(f=0;f<o;++f)c[f]=s[f](h);return c}}function f3(t,a){var l=new Date;return t=+t,a=+a,function(o){return l.setTime(t*(1-o)+a*o),l}}function yn(t,a){return t=+t,a=+a,function(l){return t*(1-l)+a*l}}function d3(t,a){var l={},o={},s;(t===null||typeof t!="object")&&(t={}),(a===null||typeof a!="object")&&(a={});for(s in a)s in t?l[s]=_o(t[s],a[s]):o[s]=a[s];return function(c){for(s in l)o[s]=l[s](c);return o}}var _d=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,nd=new RegExp(_d.source,"g");function h3(t){return function(){return t}}function p3(t){return function(a){return t(a)+""}}function Xx(t,a){var l=_d.lastIndex=nd.lastIndex=0,o,s,c,f=-1,h=[],g=[];for(t=t+"",a=a+"";(o=_d.exec(t))&&(s=nd.exec(a));)(c=s.index)>l&&(c=a.slice(l,c),h[f]?h[f]+=c:h[++f]=c),(o=o[0])===(s=s[0])?h[f]?h[f]+=s:h[++f]=s:(h[++f]=null,g.push({i:f,x:yn(o,s)})),l=nd.lastIndex;return l<a.length&&(c=a.slice(l),h[f]?h[f]+=c:h[++f]=c),h.length<2?g[0]?p3(g[0].x):h3(a):(a=g.length,function(p){for(var x=0,y;x<a;++x)h[(y=g[x]).i]=y.x(p);return h.join("")})}function _o(t,a){var l=typeof a,o;return a==null||l==="boolean"?rh(a):(l==="number"?yn:l==="string"?(o=ui(a))?(a=o,ec):Xx:a instanceof ui?ec:a instanceof Date?f3:c3(a)?s3:Array.isArray(a)?u3:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?d3:yn)(t,a)}var Vg=180/Math.PI,Cd={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gx(t,a,l,o,s,c){var f,h,g;return(f=Math.sqrt(t*t+a*a))&&(t/=f,a/=f),(g=t*l+a*o)&&(l-=t*g,o-=a*g),(h=Math.sqrt(l*l+o*o))&&(l/=h,o/=h,g/=h),t*o<a*l&&(t=-t,a=-a,g=-g,f=-f),{translateX:s,translateY:c,rotate:Math.atan2(a,t)*Vg,skewX:Math.atan(g)*Vg,scaleX:f,scaleY:h}}var _s;function m3(t){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return a.isIdentity?Cd:Gx(a.a,a.b,a.c,a.d,a.e,a.f)}function g3(t){return t==null||(_s||(_s=document.createElementNS("http://www.w3.org/2000/svg","g")),_s.setAttribute("transform",t),!(t=_s.transform.baseVal.consolidate()))?Cd:(t=t.matrix,Gx(t.a,t.b,t.c,t.d,t.e,t.f))}function Zx(t,a,l,o){function s(p){return p.length?p.pop()+" ":""}function c(p,x,y,b,w,E){if(p!==y||x!==b){var N=w.push("translate(",null,a,null,l);E.push({i:N-4,x:yn(p,y)},{i:N-2,x:yn(x,b)})}else(y||b)&&w.push("translate("+y+a+b+l)}function f(p,x,y,b){p!==x?(p-x>180?x+=360:x-p>180&&(p+=360),b.push({i:y.push(s(y)+"rotate(",null,o)-2,x:yn(p,x)})):x&&y.push(s(y)+"rotate("+x+o)}function h(p,x,y,b){p!==x?b.push({i:y.push(s(y)+"skewX(",null,o)-2,x:yn(p,x)}):x&&y.push(s(y)+"skewX("+x+o)}function g(p,x,y,b,w,E){if(p!==y||x!==b){var N=w.push(s(w)+"scale(",null,",",null,")");E.push({i:N-4,x:yn(p,y)},{i:N-2,x:yn(x,b)})}else(y!==1||b!==1)&&w.push(s(w)+"scale("+y+","+b+")")}return function(p,x){var y=[],b=[];return p=t(p),x=t(x),c(p.translateX,p.translateY,x.translateX,x.translateY,y,b),f(p.rotate,x.rotate,y,b),h(p.skewX,x.skewX,y,b),g(p.scaleX,p.scaleY,x.scaleX,x.scaleY,y,b),p=x=null,function(w){for(var E=-1,N=b.length,T;++E<N;)y[(T=b[E]).i]=T.x(w);return y.join("")}}}var y3=Zx(m3,"px, ","px)","deg)"),x3=Zx(g3,", ",")",")"),v3=1e-12;function $g(t){return((t=Math.exp(t))+1/t)/2}function b3(t){return((t=Math.exp(t))-1/t)/2}function w3(t){return((t=Math.exp(2*t))-1)/(t+1)}const Hs=(function t(a,l,o){function s(c,f){var h=c[0],g=c[1],p=c[2],x=f[0],y=f[1],b=f[2],w=x-h,E=y-g,N=w*w+E*E,T,k;if(N<v3)k=Math.log(b/p)/a,T=function(O){return[h+O*w,g+O*E,p*Math.exp(a*O*k)]};else{var A=Math.sqrt(N),S=(b*b-p*p+o*N)/(2*p*l*A),C=(b*b-p*p-o*N)/(2*b*l*A),D=Math.log(Math.sqrt(S*S+1)-S),z=Math.log(Math.sqrt(C*C+1)-C);k=(z-D)/a,T=function(O){var $=O*k,G=$g(D),ee=p/(l*A)*(G*w3(a*$+D)-b3(D));return[h+ee*w,g+ee*E,p*G/$g(a*$+D)]}}return T.duration=k*1e3*a/Math.SQRT2,T}return s.rho=function(c){var f=Math.max(.001,+c),h=f*f,g=h*h;return t(f,h,g)},s})(Math.SQRT2,2,4);var ul=0,So=0,xo=0,Qx=1e3,tc,Eo,nc=0,fi=0,mc=0,Ro=typeof performance=="object"&&performance.now?performance:Date,Kx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function sh(){return fi||(Kx(S3),fi=Ro.now()+mc)}function S3(){fi=0}function ac(){this._call=this._time=this._next=null}ac.prototype=Ix.prototype={constructor:ac,restart:function(t,a,l){if(typeof t!="function")throw new TypeError("callback is not a function");l=(l==null?sh():+l)+(a==null?0:+a),!this._next&&Eo!==this&&(Eo?Eo._next=this:tc=this,Eo=this),this._call=t,this._time=l,Td()},stop:function(){this._call&&(this._call=null,this._time=1/0,Td())}};function Ix(t,a,l){var o=new ac;return o.restart(t,a,l),o}function E3(){sh(),++ul;for(var t=tc,a;t;)(a=fi-t._time)>=0&&t._call.call(void 0,a),t=t._next;--ul}function Yg(){fi=(nc=Ro.now())+mc,ul=So=0;try{E3()}finally{ul=0,_3(),fi=0}}function N3(){var t=Ro.now(),a=t-nc;a>Qx&&(mc-=a,nc=t)}function _3(){for(var t,a=tc,l,o=1/0;a;)a._call?(o>a._time&&(o=a._time),t=a,a=a._next):(l=a._next,a._next=null,a=t?t._next=l:tc=l);Eo=t,Td(o)}function Td(t){if(!ul){So&&(So=clearTimeout(So));var a=t-fi;a>24?(t<1/0&&(So=setTimeout(Yg,t-Ro.now()-mc)),xo&&(xo=clearInterval(xo))):(xo||(nc=Ro.now(),xo=setInterval(N3,Qx)),ul=1,Kx(Yg))}}function Xg(t,a,l){var o=new ac;return a=a==null?0:+a,o.restart(s=>{o.stop(),t(s+a)},a,l),o}var C3=hc("start","end","cancel","interrupt"),T3=[],Fx=0,Gg=1,kd=2,Ls=3,Zg=4,jd=5,Bs=6;function gc(t,a,l,o,s,c){var f=t.__transition;if(!f)t.__transition={};else if(l in f)return;k3(t,l,{name:a,index:o,group:s,on:C3,tween:T3,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:Fx})}function ch(t,a){var l=un(t,a);if(l.state>Fx)throw new Error("too late; already scheduled");return l}function En(t,a){var l=un(t,a);if(l.state>Ls)throw new Error("too late; already running");return l}function un(t,a){var l=t.__transition;if(!l||!(l=l[a]))throw new Error("transition not found");return l}function k3(t,a,l){var o=t.__transition,s;o[a]=l,l.timer=Ix(c,0,l.time);function c(p){l.state=Gg,l.timer.restart(f,l.delay,l.time),l.delay<=p&&f(p-l.delay)}function f(p){var x,y,b,w;if(l.state!==Gg)return g();for(x in o)if(w=o[x],w.name===l.name){if(w.state===Ls)return Xg(f);w.state===Zg?(w.state=Bs,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete o[x]):+x<a&&(w.state=Bs,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete o[x])}if(Xg(function(){l.state===Ls&&(l.state=Zg,l.timer.restart(h,l.delay,l.time),h(p))}),l.state=kd,l.on.call("start",t,t.__data__,l.index,l.group),l.state===kd){for(l.state=Ls,s=new Array(b=l.tween.length),x=0,y=-1;x<b;++x)(w=l.tween[x].value.call(t,t.__data__,l.index,l.group))&&(s[++y]=w);s.length=y+1}}function h(p){for(var x=p<l.duration?l.ease.call(null,p/l.duration):(l.timer.restart(g),l.state=jd,1),y=-1,b=s.length;++y<b;)s[y].call(t,x);l.state===jd&&(l.on.call("end",t,t.__data__,l.index,l.group),g())}function g(){l.state=Bs,l.timer.stop(),delete o[a];for(var p in o)return;delete t.__transition}}function Us(t,a){var l=t.__transition,o,s,c=!0,f;if(l){a=a==null?null:a+"";for(f in l){if((o=l[f]).name!==a){c=!1;continue}s=o.state>kd&&o.state<jd,o.state=Bs,o.timer.stop(),o.on.call(s?"interrupt":"cancel",t,t.__data__,o.index,o.group),delete l[f]}c&&delete t.__transition}}function j3(t){return this.each(function(){Us(this,t)})}function A3(t,a){var l,o;return function(){var s=En(this,t),c=s.tween;if(c!==l){o=l=c;for(var f=0,h=o.length;f<h;++f)if(o[f].name===a){o=o.slice(),o.splice(f,1);break}}s.tween=o}}function M3(t,a,l){var o,s;if(typeof l!="function")throw new Error;return function(){var c=En(this,t),f=c.tween;if(f!==o){s=(o=f).slice();for(var h={name:a,value:l},g=0,p=s.length;g<p;++g)if(s[g].name===a){s[g]=h;break}g===p&&s.push(h)}c.tween=s}}function R3(t,a){var l=this._id;if(t+="",arguments.length<2){for(var o=un(this.node(),l).tween,s=0,c=o.length,f;s<c;++s)if((f=o[s]).name===t)return f.value;return null}return this.each((a==null?A3:M3)(l,t,a))}function uh(t,a,l){var o=t._id;return t.each(function(){var s=En(this,o);(s.value||(s.value={}))[a]=l.apply(this,arguments)}),function(s){return un(s,o).value[a]}}function Jx(t,a){var l;return(typeof a=="number"?yn:a instanceof ui?ec:(l=ui(a))?(a=l,ec):Xx)(t,a)}function z3(t){return function(){this.removeAttribute(t)}}function O3(t){return function(){this.removeAttributeNS(t.space,t.local)}}function D3(t,a,l){var o,s=l+"",c;return function(){var f=this.getAttribute(t);return f===s?null:f===o?c:c=a(o=f,l)}}function H3(t,a,l){var o,s=l+"",c;return function(){var f=this.getAttributeNS(t.space,t.local);return f===s?null:f===o?c:c=a(o=f,l)}}function L3(t,a,l){var o,s,c;return function(){var f,h=l(this),g;return h==null?void this.removeAttribute(t):(f=this.getAttribute(t),g=h+"",f===g?null:f===o&&g===s?c:(s=g,c=a(o=f,h)))}}function B3(t,a,l){var o,s,c;return function(){var f,h=l(this),g;return h==null?void this.removeAttributeNS(t.space,t.local):(f=this.getAttributeNS(t.space,t.local),g=h+"",f===g?null:f===o&&g===s?c:(s=g,c=a(o=f,h)))}}function U3(t,a){var l=pc(t),o=l==="transform"?x3:Jx;return this.attrTween(t,typeof a=="function"?(l.local?B3:L3)(l,o,uh(this,"attr."+t,a)):a==null?(l.local?O3:z3)(l):(l.local?H3:D3)(l,o,a))}function q3(t,a){return function(l){this.setAttribute(t,a.call(this,l))}}function V3(t,a){return function(l){this.setAttributeNS(t.space,t.local,a.call(this,l))}}function $3(t,a){var l,o;function s(){var c=a.apply(this,arguments);return c!==o&&(l=(o=c)&&V3(t,c)),l}return s._value=a,s}function Y3(t,a){var l,o;function s(){var c=a.apply(this,arguments);return c!==o&&(l=(o=c)&&q3(t,c)),l}return s._value=a,s}function X3(t,a){var l="attr."+t;if(arguments.length<2)return(l=this.tween(l))&&l._value;if(a==null)return this.tween(l,null);if(typeof a!="function")throw new Error;var o=pc(t);return this.tween(l,(o.local?$3:Y3)(o,a))}function G3(t,a){return function(){ch(this,t).delay=+a.apply(this,arguments)}}function Z3(t,a){return a=+a,function(){ch(this,t).delay=a}}function Q3(t){var a=this._id;return arguments.length?this.each((typeof t=="function"?G3:Z3)(a,t)):un(this.node(),a).delay}function K3(t,a){return function(){En(this,t).duration=+a.apply(this,arguments)}}function I3(t,a){return a=+a,function(){En(this,t).duration=a}}function F3(t){var a=this._id;return arguments.length?this.each((typeof t=="function"?K3:I3)(a,t)):un(this.node(),a).duration}function J3(t,a){if(typeof a!="function")throw new Error;return function(){En(this,t).ease=a}}function P3(t){var a=this._id;return arguments.length?this.each(J3(a,t)):un(this.node(),a).ease}function W3(t,a){return function(){var l=a.apply(this,arguments);if(typeof l!="function")throw new Error;En(this,t).ease=l}}function eC(t){if(typeof t!="function")throw new Error;return this.each(W3(this._id,t))}function tC(t){typeof t!="function"&&(t=kx(t));for(var a=this._groups,l=a.length,o=new Array(l),s=0;s<l;++s)for(var c=a[s],f=c.length,h=o[s]=[],g,p=0;p<f;++p)(g=c[p])&&t.call(g,g.__data__,p,c)&&h.push(g);return new Pn(o,this._parents,this._name,this._id)}function nC(t){if(t._id!==this._id)throw new Error;for(var a=this._groups,l=t._groups,o=a.length,s=l.length,c=Math.min(o,s),f=new Array(o),h=0;h<c;++h)for(var g=a[h],p=l[h],x=g.length,y=f[h]=new Array(x),b,w=0;w<x;++w)(b=g[w]||p[w])&&(y[w]=b);for(;h<o;++h)f[h]=a[h];return new Pn(f,this._parents,this._name,this._id)}function aC(t){return(t+"").trim().split(/^|\s+/).every(function(a){var l=a.indexOf(".");return l>=0&&(a=a.slice(0,l)),!a||a==="start"})}function iC(t,a,l){var o,s,c=aC(a)?ch:En;return function(){var f=c(this,t),h=f.on;h!==o&&(s=(o=h).copy()).on(a,l),f.on=s}}function lC(t,a){var l=this._id;return arguments.length<2?un(this.node(),l).on.on(t):this.each(iC(l,t,a))}function oC(t){return function(){var a=this.parentNode;for(var l in this.__transition)if(+l!==t)return;a&&a.removeChild(this)}}function rC(){return this.on("end.remove",oC(this._id))}function sC(t){var a=this._name,l=this._id;typeof t!="function"&&(t=ih(t));for(var o=this._groups,s=o.length,c=new Array(s),f=0;f<s;++f)for(var h=o[f],g=h.length,p=c[f]=new Array(g),x,y,b=0;b<g;++b)(x=h[b])&&(y=t.call(x,x.__data__,b,h))&&("__data__"in x&&(y.__data__=x.__data__),p[b]=y,gc(p[b],a,l,b,p,un(x,l)));return new Pn(c,this._parents,a,l)}function cC(t){var a=this._name,l=this._id;typeof t!="function"&&(t=Tx(t));for(var o=this._groups,s=o.length,c=[],f=[],h=0;h<s;++h)for(var g=o[h],p=g.length,x,y=0;y<p;++y)if(x=g[y]){for(var b=t.call(x,x.__data__,y,g),w,E=un(x,l),N=0,T=b.length;N<T;++N)(w=b[N])&&gc(w,a,l,N,b,E);c.push(b),f.push(x)}return new Pn(c,f,a,l)}var uC=Go.prototype.constructor;function fC(){return new uC(this._groups,this._parents)}function dC(t,a){var l,o,s;return function(){var c=cl(this,t),f=(this.style.removeProperty(t),cl(this,t));return c===f?null:c===l&&f===o?s:s=a(l=c,o=f)}}function Px(t){return function(){this.style.removeProperty(t)}}function hC(t,a,l){var o,s=l+"",c;return function(){var f=cl(this,t);return f===s?null:f===o?c:c=a(o=f,l)}}function pC(t,a,l){var o,s,c;return function(){var f=cl(this,t),h=l(this),g=h+"";return h==null&&(g=h=(this.style.removeProperty(t),cl(this,t))),f===g?null:f===o&&g===s?c:(s=g,c=a(o=f,h))}}function mC(t,a){var l,o,s,c="style."+a,f="end."+c,h;return function(){var g=En(this,t),p=g.on,x=g.value[c]==null?h||(h=Px(a)):void 0;(p!==l||s!==x)&&(o=(l=p).copy()).on(f,s=x),g.on=o}}function gC(t,a,l){var o=(t+="")=="transform"?y3:Jx;return a==null?this.styleTween(t,dC(t,o)).on("end.style."+t,Px(t)):typeof a=="function"?this.styleTween(t,pC(t,o,uh(this,"style."+t,a))).each(mC(this._id,t)):this.styleTween(t,hC(t,o,a),l).on("end.style."+t,null)}function yC(t,a,l){return function(o){this.style.setProperty(t,a.call(this,o),l)}}function xC(t,a,l){var o,s;function c(){var f=a.apply(this,arguments);return f!==s&&(o=(s=f)&&yC(t,f,l)),o}return c._value=a,c}function vC(t,a,l){var o="style."+(t+="");if(arguments.length<2)return(o=this.tween(o))&&o._value;if(a==null)return this.tween(o,null);if(typeof a!="function")throw new Error;return this.tween(o,xC(t,a,l??""))}function bC(t){return function(){this.textContent=t}}function wC(t){return function(){var a=t(this);this.textContent=a??""}}function SC(t){return this.tween("text",typeof t=="function"?wC(uh(this,"text",t)):bC(t==null?"":t+""))}function EC(t){return function(a){this.textContent=t.call(this,a)}}function NC(t){var a,l;function o(){var s=t.apply(this,arguments);return s!==l&&(a=(l=s)&&EC(s)),a}return o._value=t,o}function _C(t){var a="text";if(arguments.length<1)return(a=this.tween(a))&&a._value;if(t==null)return this.tween(a,null);if(typeof t!="function")throw new Error;return this.tween(a,NC(t))}function CC(){for(var t=this._name,a=this._id,l=Wx(),o=this._groups,s=o.length,c=0;c<s;++c)for(var f=o[c],h=f.length,g,p=0;p<h;++p)if(g=f[p]){var x=un(g,a);gc(g,t,l,p,f,{time:x.time+x.delay+x.duration,delay:0,duration:x.duration,ease:x.ease})}return new Pn(o,this._parents,t,l)}function TC(){var t,a,l=this,o=l._id,s=l.size();return new Promise(function(c,f){var h={value:f},g={value:function(){--s===0&&c()}};l.each(function(){var p=En(this,o),x=p.on;x!==t&&(a=(t=x).copy(),a._.cancel.push(h),a._.interrupt.push(h),a._.end.push(g)),p.on=a}),s===0&&c()})}var kC=0;function Pn(t,a,l,o){this._groups=t,this._parents=a,this._name=l,this._id=o}function Wx(){return++kC}var Qn=Go.prototype;Pn.prototype={constructor:Pn,select:sC,selectAll:cC,selectChild:Qn.selectChild,selectChildren:Qn.selectChildren,filter:tC,merge:nC,selection:fC,transition:CC,call:Qn.call,nodes:Qn.nodes,node:Qn.node,size:Qn.size,empty:Qn.empty,each:Qn.each,on:lC,attr:U3,attrTween:X3,style:gC,styleTween:vC,text:SC,textTween:_C,remove:rC,tween:R3,delay:Q3,duration:F3,ease:P3,easeVarying:eC,end:TC,[Symbol.iterator]:Qn[Symbol.iterator]};function jC(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var AC={time:null,delay:0,duration:250,ease:jC};function MC(t,a){for(var l;!(l=t.__transition)||!(l=l[a]);)if(!(t=t.parentNode))throw new Error(`transition ${a} not found`);return l}function RC(t){var a,l;t instanceof Pn?(a=t._id,t=t._name):(a=Wx(),(l=AC).time=sh(),t=t==null?null:t+"");for(var o=this._groups,s=o.length,c=0;c<s;++c)for(var f=o[c],h=f.length,g,p=0;p<h;++p)(g=f[p])&&gc(g,t,a,p,f,l||MC(g,a));return new Pn(o,this._parents,t,a)}Go.prototype.interrupt=j3;Go.prototype.transition=RC;const Cs=t=>()=>t;function zC(t,{sourceEvent:a,target:l,transform:o,dispatch:s}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:a,enumerable:!0,configurable:!0},target:{value:l,enumerable:!0,configurable:!0},transform:{value:o,enumerable:!0,configurable:!0},_:{value:s}})}function Kn(t,a,l){this.k=t,this.x=a,this.y=l}Kn.prototype={constructor:Kn,scale:function(t){return t===1?this:new Kn(this.k*t,this.x,this.y)},translate:function(t,a){return t===0&a===0?this:new Kn(this.k,this.x+this.k*t,this.y+this.k*a)},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 yc=new Kn(1,0,0);ev.prototype=Kn.prototype;function ev(t){for(;!t.__zoom;)if(!(t=t.parentNode))return yc;return t.__zoom}function ad(t){t.stopImmediatePropagation()}function vo(t){t.preventDefault(),t.stopImmediatePropagation()}function OC(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function DC(){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 Qg(){return this.__zoom||yc}function HC(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function LC(){return navigator.maxTouchPoints||"ontouchstart"in this}function BC(t,a,l){var o=t.invertX(a[0][0])-l[0][0],s=t.invertX(a[1][0])-l[1][0],c=t.invertY(a[0][1])-l[0][1],f=t.invertY(a[1][1])-l[1][1];return t.translate(s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s),f>c?(c+f)/2:Math.min(0,c)||Math.max(0,f))}function tv(){var t=OC,a=DC,l=BC,o=HC,s=LC,c=[0,1/0],f=[[-1/0,-1/0],[1/0,1/0]],h=250,g=Hs,p=hc("start","zoom","end"),x,y,b,w=500,E=150,N=0,T=10;function k(H){H.property("__zoom",Qg).on("wheel.zoom",$,{passive:!1}).on("mousedown.zoom",G).on("dblclick.zoom",ee).filter(s).on("touchstart.zoom",Y).on("touchmove.zoom",Z).on("touchend.zoom touchcancel.zoom",ie).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}k.transform=function(H,Q,M,B){var V=H.selection?H.selection():H;V.property("__zoom",Qg),H!==V?D(H,Q,M,B):V.interrupt().each(function(){z(this,arguments).event(B).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},k.scaleBy=function(H,Q,M,B){k.scaleTo(H,function(){var V=this.__zoom.k,K=typeof Q=="function"?Q.apply(this,arguments):Q;return V*K},M,B)},k.scaleTo=function(H,Q,M,B){k.transform(H,function(){var V=a.apply(this,arguments),K=this.__zoom,ne=M==null?C(V):typeof M=="function"?M.apply(this,arguments):M,R=K.invert(ne),U=typeof Q=="function"?Q.apply(this,arguments):Q;return l(S(A(K,U),ne,R),V,f)},M,B)},k.translateBy=function(H,Q,M,B){k.transform(H,function(){return l(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof M=="function"?M.apply(this,arguments):M),a.apply(this,arguments),f)},null,B)},k.translateTo=function(H,Q,M,B,V){k.transform(H,function(){var K=a.apply(this,arguments),ne=this.__zoom,R=B==null?C(K):typeof B=="function"?B.apply(this,arguments):B;return l(yc.translate(R[0],R[1]).scale(ne.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof M=="function"?-M.apply(this,arguments):-M),K,f)},B,V)};function A(H,Q){return Q=Math.max(c[0],Math.min(c[1],Q)),Q===H.k?H:new Kn(Q,H.x,H.y)}function S(H,Q,M){var B=Q[0]-M[0]*H.k,V=Q[1]-M[1]*H.k;return B===H.x&&V===H.y?H:new Kn(H.k,B,V)}function C(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function D(H,Q,M,B){H.on("start.zoom",function(){z(this,arguments).event(B).start()}).on("interrupt.zoom end.zoom",function(){z(this,arguments).event(B).end()}).tween("zoom",function(){var V=this,K=arguments,ne=z(V,K).event(B),R=a.apply(V,K),U=M==null?C(R):typeof M=="function"?M.apply(V,K):M,W=Math.max(R[1][0]-R[0][0],R[1][1]-R[0][1]),te=V.__zoom,se=typeof Q=="function"?Q.apply(V,K):Q,ue=g(te.invert(U).concat(W/te.k),se.invert(U).concat(W/se.k));return function(ce){if(ce===1)ce=se;else{var re=ue(ce),fe=W/re[2];ce=new Kn(fe,U[0]-re[0]*fe,U[1]-re[1]*fe)}ne.zoom(null,ce)}})}function z(H,Q,M){return!M&&H.__zooming||new O(H,Q)}function O(H,Q){this.that=H,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=a.apply(H,Q),this.taps=0}O.prototype={event:function(H){return H&&(this.sourceEvent=H),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(H,Q){return this.mouse&&H!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=Q.invert(this.touch1[0])),this.that.__zoom=Q,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var Q=Ut(this.that).datum();p.call(H,this.that,new zC(H,{sourceEvent:this.sourceEvent,target:k,transform:this.that.__zoom,dispatch:p}),Q)}};function $(H,...Q){if(!t.apply(this,arguments))return;var M=z(this,Q).event(H),B=this.__zoom,V=Math.max(c[0],Math.min(c[1],B.k*Math.pow(2,o.apply(this,arguments)))),K=ln(H);if(M.wheel)(M.mouse[0][0]!==K[0]||M.mouse[0][1]!==K[1])&&(M.mouse[1]=B.invert(M.mouse[0]=K)),clearTimeout(M.wheel);else{if(B.k===V)return;M.mouse=[K,B.invert(K)],Us(this),M.start()}vo(H),M.wheel=setTimeout(ne,E),M.zoom("mouse",l(S(A(B,V),M.mouse[0],M.mouse[1]),M.extent,f));function ne(){M.wheel=null,M.end()}}function G(H,...Q){if(b||!t.apply(this,arguments))return;var M=H.currentTarget,B=z(this,Q,!0).event(H),V=Ut(H.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",W,!0),K=ln(H,M),ne=H.clientX,R=H.clientY;Bx(H.view),ad(H),B.mouse=[K,this.__zoom.invert(K)],Us(this),B.start();function U(te){if(vo(te),!B.moved){var se=te.clientX-ne,ue=te.clientY-R;B.moved=se*se+ue*ue>N}B.event(te).zoom("mouse",l(S(B.that.__zoom,B.mouse[0]=ln(te,M),B.mouse[1]),B.extent,f))}function W(te){V.on("mousemove.zoom mouseup.zoom",null),Ux(te.view,B.moved),vo(te),B.event(te).end()}}function ee(H,...Q){if(t.apply(this,arguments)){var M=this.__zoom,B=ln(H.changedTouches?H.changedTouches[0]:H,this),V=M.invert(B),K=M.k*(H.shiftKey?.5:2),ne=l(S(A(M,K),B,V),a.apply(this,Q),f);vo(H),h>0?Ut(this).transition().duration(h).call(D,ne,B,H):Ut(this).call(k.transform,ne,B,H)}}function Y(H,...Q){if(t.apply(this,arguments)){var M=H.touches,B=M.length,V=z(this,Q,H.changedTouches.length===B).event(H),K,ne,R,U;for(ad(H),ne=0;ne<B;++ne)R=M[ne],U=ln(R,this),U=[U,this.__zoom.invert(U),R.identifier],V.touch0?!V.touch1&&V.touch0[2]!==U[2]&&(V.touch1=U,V.taps=0):(V.touch0=U,K=!0,V.taps=1+!!x);x&&(x=clearTimeout(x)),K&&(V.taps<2&&(y=U[0],x=setTimeout(function(){x=null},w)),Us(this),V.start())}}function Z(H,...Q){if(this.__zooming){var M=z(this,Q).event(H),B=H.changedTouches,V=B.length,K,ne,R,U;for(vo(H),K=0;K<V;++K)ne=B[K],R=ln(ne,this),M.touch0&&M.touch0[2]===ne.identifier?M.touch0[0]=R:M.touch1&&M.touch1[2]===ne.identifier&&(M.touch1[0]=R);if(ne=M.that.__zoom,M.touch1){var W=M.touch0[0],te=M.touch0[1],se=M.touch1[0],ue=M.touch1[1],ce=(ce=se[0]-W[0])*ce+(ce=se[1]-W[1])*ce,re=(re=ue[0]-te[0])*re+(re=ue[1]-te[1])*re;ne=A(ne,Math.sqrt(ce/re)),R=[(W[0]+se[0])/2,(W[1]+se[1])/2],U=[(te[0]+ue[0])/2,(te[1]+ue[1])/2]}else if(M.touch0)R=M.touch0[0],U=M.touch0[1];else return;M.zoom("touch",l(S(ne,R,U),M.extent,f))}}function ie(H,...Q){if(this.__zooming){var M=z(this,Q).event(H),B=H.changedTouches,V=B.length,K,ne;for(ad(H),b&&clearTimeout(b),b=setTimeout(function(){b=null},w),K=0;K<V;++K)ne=B[K],M.touch0&&M.touch0[2]===ne.identifier?delete M.touch0:M.touch1&&M.touch1[2]===ne.identifier&&delete M.touch1;if(M.touch1&&!M.touch0&&(M.touch0=M.touch1,delete M.touch1),M.touch0)M.touch0[1]=this.__zoom.invert(M.touch0[0]);else if(M.end(),M.taps===2&&(ne=ln(ne,this),Math.hypot(y[0]-ne[0],y[1]-ne[1])<T)){var R=Ut(this).on("dblclick.zoom");R&&R.apply(this,arguments)}}}return k.wheelDelta=function(H){return arguments.length?(o=typeof H=="function"?H:Cs(+H),k):o},k.filter=function(H){return arguments.length?(t=typeof H=="function"?H:Cs(!!H),k):t},k.touchable=function(H){return arguments.length?(s=typeof H=="function"?H:Cs(!!H),k):s},k.extent=function(H){return arguments.length?(a=typeof H=="function"?H:Cs([[+H[0][0],+H[0][1]],[+H[1][0],+H[1][1]]]),k):a},k.scaleExtent=function(H){return arguments.length?(c[0]=+H[0],c[1]=+H[1],k):[c[0],c[1]]},k.translateExtent=function(H){return arguments.length?(f[0][0]=+H[0][0],f[1][0]=+H[1][0],f[0][1]=+H[0][1],f[1][1]=+H[1][1],k):[[f[0][0],f[0][1]],[f[1][0],f[1][1]]]},k.constrain=function(H){return arguments.length?(l=H,k):l},k.duration=function(H){return arguments.length?(h=+H,k):h},k.interpolate=function(H){return arguments.length?(g=H,k):g},k.on=function(){var H=p.on.apply(p,arguments);return H===p?k:H},k.clickDistance=function(H){return arguments.length?(N=(H=+H)*H,k):Math.sqrt(N)},k.tapDistance=function(H){return arguments.length?(T=+H,k):T},k}const wn={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,{id:a,sourceHandle:l,targetHandle:o})=>`Couldn't create edge for ${t} handle id: "${t==="source"?l:o}", edge id: ${a}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`,error013:(t="react")=>`It seems that you haven't loaded the styles. Please import '@xyflow/${t}/dist/style.css' or base.css to make sure everything is working properly.`,error014:()=>"useNodeConnections: No node ID found. Call useNodeConnections inside a custom Node or provide a node ID.",error015:()=>"It seems that you are trying to drag a node that is not initialized. Please use onNodesChange as explained in the docs."},zo=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],nv=["Enter"," ","Escape"],av={"node.a11yDescription.default":"Press enter or space to select a node. Press delete to remove it and escape to cancel.","node.a11yDescription.keyboardDisabled":"Press enter or space to select a node. You can then use the arrow keys to move the node around. Press delete to remove it and escape to cancel.","node.a11yDescription.ariaLiveMessage":({direction:t,x:a,y:l})=>`Moved selected node ${t}. New position, x: ${a}, y: ${l}`,"edge.a11yDescription.default":"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel.","controls.ariaLabel":"Control Panel","controls.zoomIn.ariaLabel":"Zoom In","controls.zoomOut.ariaLabel":"Zoom Out","controls.fitView.ariaLabel":"Fit View","controls.interactive.ariaLabel":"Toggle Interactivity","minimap.ariaLabel":"Mini Map","handle.ariaLabel":"Handle"};var fl;(function(t){t.Strict="strict",t.Loose="loose"})(fl||(fl={}));var ci;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(ci||(ci={}));var Oo;(function(t){t.Partial="partial",t.Full="full"})(Oo||(Oo={}));const iv={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var Ra;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Ra||(Ra={}));var ic;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(ic||(ic={}));var pe;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(pe||(pe={}));const Kg={[pe.Left]:pe.Right,[pe.Right]:pe.Left,[pe.Top]:pe.Bottom,[pe.Bottom]:pe.Top};function lv(t){return t===null?null:t?"valid":"invalid"}const ov=t=>"id"in t&&"source"in t&&"target"in t,UC=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),fh=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Qo=(t,a=[0,0])=>{const{width:l,height:o}=ea(t),s=t.origin??a,c=l*s[0],f=o*s[1];return{x:t.position.x-c,y:t.position.y-f}},qC=(t,a={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const l=t.reduce((o,s)=>{const c=typeof s=="string";let f=!a.nodeLookup&&!c?s:void 0;a.nodeLookup&&(f=c?a.nodeLookup.get(s):fh(s)?s:a.nodeLookup.get(s.id));const h=f?lc(f,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return xc(o,h)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return vc(l)},Ko=(t,a={})=>{let l={x:1/0,y:1/0,x2:-1/0,y2:-1/0},o=!1;return t.forEach(s=>{(a.filter===void 0||a.filter(s))&&(l=xc(l,lc(s)),o=!0)}),o?vc(l):{x:0,y:0,width:0,height:0}},dh=(t,a,[l,o,s]=[0,0,1],c=!1,f=!1)=>{const h={...Fo(a,[l,o,s]),width:a.width/s,height:a.height/s},g=[];for(const p of t.values()){const{measured:x,selectable:y=!0,hidden:b=!1}=p;if(f&&!y||b)continue;const w=x.width??p.width??p.initialWidth??null,E=x.height??p.height??p.initialHeight??null,N=Do(h,hl(p)),T=(w??0)*(E??0),k=c&&N>0;(!p.internals.handleBounds||k||N>=T||p.dragging)&&g.push(p)}return g},VC=(t,a)=>{const l=new Set;return t.forEach(o=>{l.add(o.id)}),a.filter(o=>l.has(o.source)||l.has(o.target))};function $C(t,a){const l=new Map,o=a?.nodes?new Set(a.nodes.map(s=>s.id)):null;return t.forEach(s=>{s.measured.width&&s.measured.height&&(a?.includeHiddenNodes||!s.hidden)&&(!o||o.has(s.id))&&l.set(s.id,s)}),l}async function YC({nodes:t,width:a,height:l,panZoom:o,minZoom:s,maxZoom:c},f){if(t.size===0)return Promise.resolve(!0);const h=$C(t,f),g=Ko(h),p=hh(g,a,l,f?.minZoom??s,f?.maxZoom??c,f?.padding??.1);return await o.setViewport(p,{duration:f?.duration,ease:f?.ease,interpolate:f?.interpolate}),Promise.resolve(!0)}function rv({nodeId:t,nextPosition:a,nodeLookup:l,nodeOrigin:o=[0,0],nodeExtent:s,onError:c}){const f=l.get(t),h=f.parentId?l.get(f.parentId):void 0,{x:g,y:p}=h?h.internals.positionAbsolute:{x:0,y:0},x=f.origin??o;let y=f.extent||s;if(f.extent==="parent"&&!f.expandParent)if(!h)c?.("005",wn.error005());else{const w=h.measured.width,E=h.measured.height;w&&E&&(y=[[g,p],[g+w,p+E]])}else h&&pl(f.extent)&&(y=[[f.extent[0][0]+g,f.extent[0][1]+p],[f.extent[1][0]+g,f.extent[1][1]+p]]);const b=pl(y)?di(a,y,f.measured):a;return(f.measured.width===void 0||f.measured.height===void 0)&&c?.("015",wn.error015()),{position:{x:b.x-g+(f.measured.width??0)*x[0],y:b.y-p+(f.measured.height??0)*x[1]},positionAbsolute:b}}async function XC({nodesToRemove:t=[],edgesToRemove:a=[],nodes:l,edges:o,onBeforeDelete:s}){const c=new Set(t.map(b=>b.id)),f=[];for(const b of l){if(b.deletable===!1)continue;const w=c.has(b.id),E=!w&&b.parentId&&f.find(N=>N.id===b.parentId);(w||E)&&f.push(b)}const h=new Set(a.map(b=>b.id)),g=o.filter(b=>b.deletable!==!1),x=VC(f,g);for(const b of g)h.has(b.id)&&!x.find(E=>E.id===b.id)&&x.push(b);if(!s)return{edges:x,nodes:f};const y=await s({nodes:f,edges:x});return typeof y=="boolean"?y?{edges:x,nodes:f}:{edges:[],nodes:[]}:y}const dl=(t,a=0,l=1)=>Math.min(Math.max(t,a),l),di=(t={x:0,y:0},a,l)=>({x:dl(t.x,a[0][0],a[1][0]-(l?.width??0)),y:dl(t.y,a[0][1],a[1][1]-(l?.height??0))});function sv(t,a,l){const{width:o,height:s}=ea(l),{x:c,y:f}=l.internals.positionAbsolute;return di(t,[[c,f],[c+o,f+s]],a)}const Ig=(t,a,l)=>t<a?dl(Math.abs(t-a),1,a)/a:t>l?-dl(Math.abs(t-l),1,a)/a:0,cv=(t,a,l=15,o=40)=>{const s=Ig(t.x,o,a.width-o)*l,c=Ig(t.y,o,a.height-o)*l;return[s,c]},xc=(t,a)=>({x:Math.min(t.x,a.x),y:Math.min(t.y,a.y),x2:Math.max(t.x2,a.x2),y2:Math.max(t.y2,a.y2)}),Ad=({x:t,y:a,width:l,height:o})=>({x:t,y:a,x2:t+l,y2:a+o}),vc=({x:t,y:a,x2:l,y2:o})=>({x:t,y:a,width:l-t,height:o-a}),hl=(t,a=[0,0])=>{const{x:l,y:o}=fh(t)?t.internals.positionAbsolute:Qo(t,a);return{x:l,y:o,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},lc=(t,a=[0,0])=>{const{x:l,y:o}=fh(t)?t.internals.positionAbsolute:Qo(t,a);return{x:l,y:o,x2:l+(t.measured?.width??t.width??t.initialWidth??0),y2:o+(t.measured?.height??t.height??t.initialHeight??0)}},uv=(t,a)=>vc(xc(Ad(t),Ad(a))),Do=(t,a)=>{const l=Math.max(0,Math.min(t.x+t.width,a.x+a.width)-Math.max(t.x,a.x)),o=Math.max(0,Math.min(t.y+t.height,a.y+a.height)-Math.max(t.y,a.y));return Math.ceil(l*o)},Fg=t=>sn(t.width)&&sn(t.height)&&sn(t.x)&&sn(t.y),sn=t=>!isNaN(t)&&isFinite(t),GC=(t,a)=>{},Io=(t,a=[1,1])=>({x:a[0]*Math.round(t.x/a[0]),y:a[1]*Math.round(t.y/a[1])}),Fo=({x:t,y:a},[l,o,s],c=!1,f=[1,1])=>{const h={x:(t-l)/s,y:(a-o)/s};return c?Io(h,f):h},oc=({x:t,y:a},[l,o,s])=>({x:t*s+l,y:a*s+o});function al(t,a){if(typeof t=="number")return Math.floor((a-a/(1+t))*.5);if(typeof t=="string"&&t.endsWith("px")){const l=parseFloat(t);if(!Number.isNaN(l))return Math.floor(l)}if(typeof t=="string"&&t.endsWith("%")){const l=parseFloat(t);if(!Number.isNaN(l))return Math.floor(a*l*.01)}return console.error(`[React Flow] The padding value "${t}" is invalid. Please provide a number or a string with a valid unit (px or %).`),0}function ZC(t,a,l){if(typeof t=="string"||typeof t=="number"){const o=al(t,l),s=al(t,a);return{top:o,right:s,bottom:o,left:s,x:s*2,y:o*2}}if(typeof t=="object"){const o=al(t.top??t.y??0,l),s=al(t.bottom??t.y??0,l),c=al(t.left??t.x??0,a),f=al(t.right??t.x??0,a);return{top:o,right:f,bottom:s,left:c,x:c+f,y:o+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function QC(t,a,l,o,s,c){const{x:f,y:h}=oc(t,[a,l,o]),{x:g,y:p}=oc({x:t.x+t.width,y:t.y+t.height},[a,l,o]),x=s-g,y=c-p;return{left:Math.floor(f),top:Math.floor(h),right:Math.floor(x),bottom:Math.floor(y)}}const hh=(t,a,l,o,s,c)=>{const f=ZC(c,a,l),h=(a-f.x)/t.width,g=(l-f.y)/t.height,p=Math.min(h,g),x=dl(p,o,s),y=t.x+t.width/2,b=t.y+t.height/2,w=a/2-y*x,E=l/2-b*x,N=QC(t,w,E,x,a,l),T={left:Math.min(N.left-f.left,0),top:Math.min(N.top-f.top,0),right:Math.min(N.right-f.right,0),bottom:Math.min(N.bottom-f.bottom,0)};return{x:w-T.left+T.right,y:E-T.top+T.bottom,zoom:x}},Ho=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function pl(t){return t!=null&&t!=="parent"}function ea(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function fv(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function dv(t,a={width:0,height:0},l,o,s){const c={...t},f=o.get(l);if(f){const h=f.origin||s;c.x+=f.internals.positionAbsolute.x-(a.width??0)*h[0],c.y+=f.internals.positionAbsolute.y-(a.height??0)*h[1]}return c}function Jg(t,a){if(t.size!==a.size)return!1;for(const l of t)if(!a.has(l))return!1;return!0}function KC(){let t,a;return{promise:new Promise((o,s)=>{t=o,a=s}),resolve:t,reject:a}}function IC(t){return{...av,...t||{}}}function Co(t,{snapGrid:a=[0,0],snapToGrid:l=!1,transform:o,containerBounds:s}){const{x:c,y:f}=cn(t),h=Fo({x:c-(s?.left??0),y:f-(s?.top??0)},o),{x:g,y:p}=l?Io(h,a):h;return{xSnapped:g,ySnapped:p,...h}}const ph=t=>({width:t.offsetWidth,height:t.offsetHeight}),hv=t=>t?.getRootNode?.()||window?.document,FC=["INPUT","SELECT","TEXTAREA"];function pv(t){const a=t.composedPath?.()?.[0]||t.target;return a?.nodeType!==1?!1:FC.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const mv=t=>"clientX"in t,cn=(t,a)=>{const l=mv(t),o=l?t.clientX:t.touches?.[0].clientX,s=l?t.clientY:t.touches?.[0].clientY;return{x:o-(a?.left??0),y:s-(a?.top??0)}},Pg=(t,a,l,o,s)=>{const c=a.querySelectorAll(`.${t}`);return!c||!c.length?null:Array.from(c).map(f=>{const h=f.getBoundingClientRect();return{id:f.getAttribute("data-handleid"),type:t,nodeId:s,position:f.getAttribute("data-handlepos"),x:(h.left-l.left)/o,y:(h.top-l.top)/o,...ph(f)}})};function gv({sourceX:t,sourceY:a,targetX:l,targetY:o,sourceControlX:s,sourceControlY:c,targetControlX:f,targetControlY:h}){const g=t*.125+s*.375+f*.375+l*.125,p=a*.125+c*.375+h*.375+o*.125,x=Math.abs(g-t),y=Math.abs(p-a);return[g,p,x,y]}function Ts(t,a){return t>=0?.5*t:a*25*Math.sqrt(-t)}function Wg({pos:t,x1:a,y1:l,x2:o,y2:s,c}){switch(t){case pe.Left:return[a-Ts(a-o,c),l];case pe.Right:return[a+Ts(o-a,c),l];case pe.Top:return[a,l-Ts(l-s,c)];case pe.Bottom:return[a,l+Ts(s-l,c)]}}function yv({sourceX:t,sourceY:a,sourcePosition:l=pe.Bottom,targetX:o,targetY:s,targetPosition:c=pe.Top,curvature:f=.25}){const[h,g]=Wg({pos:l,x1:t,y1:a,x2:o,y2:s,c:f}),[p,x]=Wg({pos:c,x1:o,y1:s,x2:t,y2:a,c:f}),[y,b,w,E]=gv({sourceX:t,sourceY:a,targetX:o,targetY:s,sourceControlX:h,sourceControlY:g,targetControlX:p,targetControlY:x});return[`M${t},${a} C${h},${g} ${p},${x} ${o},${s}`,y,b,w,E]}function xv({sourceX:t,sourceY:a,targetX:l,targetY:o}){const s=Math.abs(l-t)/2,c=l<t?l+s:l-s,f=Math.abs(o-a)/2,h=o<a?o+f:o-f;return[c,h,s,f]}function JC({sourceNode:t,targetNode:a,selected:l=!1,zIndex:o=0,elevateOnSelect:s=!1,zIndexMode:c="basic"}){if(c==="manual")return o;const f=s&&l?o+1e3:o,h=Math.max(t.parentId||s&&t.selected?t.internals.z:0,a.parentId||s&&a.selected?a.internals.z:0);return f+h}function PC({sourceNode:t,targetNode:a,width:l,height:o,transform:s}){const c=xc(lc(t),lc(a));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const f={x:-s[0]/s[2],y:-s[1]/s[2],width:l/s[2],height:o/s[2]};return Do(f,vc(c))>0}const WC=({source:t,sourceHandle:a,target:l,targetHandle:o})=>`xy-edge__${t}${a||""}-${l}${o||""}`,e4=(t,a)=>a.some(l=>l.source===t.source&&l.target===t.target&&(l.sourceHandle===t.sourceHandle||!l.sourceHandle&&!t.sourceHandle)&&(l.targetHandle===t.targetHandle||!l.targetHandle&&!t.targetHandle)),Md=(t,a,l={})=>{if(!t.source||!t.target)return a;const o=l.getEdgeId||WC;let s;return ov(t)?s={...t}:s={...t,id:o(t)},e4(s,a)?a:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,a.concat(s))};function vv({sourceX:t,sourceY:a,targetX:l,targetY:o}){const[s,c,f,h]=xv({sourceX:t,sourceY:a,targetX:l,targetY:o});return[`M ${t},${a}L ${l},${o}`,s,c,f,h]}const ey={[pe.Left]:{x:-1,y:0},[pe.Right]:{x:1,y:0},[pe.Top]:{x:0,y:-1},[pe.Bottom]:{x:0,y:1}},t4=({source:t,sourcePosition:a=pe.Bottom,target:l})=>a===pe.Left||a===pe.Right?t.x<l.x?{x:1,y:0}:{x:-1,y:0}:t.y<l.y?{x:0,y:1}:{x:0,y:-1},ty=(t,a)=>Math.sqrt(Math.pow(a.x-t.x,2)+Math.pow(a.y-t.y,2));function n4({source:t,sourcePosition:a=pe.Bottom,target:l,targetPosition:o=pe.Top,center:s,offset:c,stepPosition:f}){const h=ey[a],g=ey[o],p={x:t.x+h.x*c,y:t.y+h.y*c},x={x:l.x+g.x*c,y:l.y+g.y*c},y=t4({source:p,sourcePosition:a,target:x}),b=y.x!==0?"x":"y",w=y[b];let E=[],N,T;const k={x:0,y:0},A={x:0,y:0},[,,S,C]=xv({sourceX:t.x,sourceY:t.y,targetX:l.x,targetY:l.y});if(h[b]*g[b]===-1){b==="x"?(N=s.x??p.x+(x.x-p.x)*f,T=s.y??(p.y+x.y)/2):(N=s.x??(p.x+x.x)/2,T=s.y??p.y+(x.y-p.y)*f);const z=[{x:N,y:p.y},{x:N,y:x.y}],O=[{x:p.x,y:T},{x:x.x,y:T}];h[b]===w?E=b==="x"?z:O:E=b==="x"?O:z}else{const z=[{x:p.x,y:x.y}],O=[{x:x.x,y:p.y}];if(b==="x"?E=h.x===w?O:z:E=h.y===w?z:O,a===o){const Z=Math.abs(t[b]-l[b]);if(Z<=c){const ie=Math.min(c-1,c-Z);h[b]===w?k[b]=(p[b]>t[b]?-1:1)*ie:A[b]=(x[b]>l[b]?-1:1)*ie}}if(a!==o){const Z=b==="x"?"y":"x",ie=h[b]===g[Z],H=p[Z]>x[Z],Q=p[Z]<x[Z];(h[b]===1&&(!ie&&H||ie&&Q)||h[b]!==1&&(!ie&&Q||ie&&H))&&(E=b==="x"?z:O)}const $={x:p.x+k.x,y:p.y+k.y},G={x:x.x+A.x,y:x.y+A.y},ee=Math.max(Math.abs($.x-E[0].x),Math.abs(G.x-E[0].x)),Y=Math.max(Math.abs($.y-E[0].y),Math.abs(G.y-E[0].y));ee>=Y?(N=($.x+G.x)/2,T=E[0].y):(N=E[0].x,T=($.y+G.y)/2)}return[[t,{x:p.x+k.x,y:p.y+k.y},...E,{x:x.x+A.x,y:x.y+A.y},l],N,T,S,C]}function a4(t,a,l,o){const s=Math.min(ty(t,a)/2,ty(a,l)/2,o),{x:c,y:f}=a;if(t.x===c&&c===l.x||t.y===f&&f===l.y)return`L${c} ${f}`;if(t.y===f){const p=t.x<l.x?-1:1,x=t.y<l.y?1:-1;return`L ${c+s*p},${f}Q ${c},${f} ${c},${f+s*x}`}const h=t.x<l.x?1:-1,g=t.y<l.y?-1:1;return`L ${c},${f+s*g}Q ${c},${f} ${c+s*h},${f}`}function Rd({sourceX:t,sourceY:a,sourcePosition:l=pe.Bottom,targetX:o,targetY:s,targetPosition:c=pe.Top,borderRadius:f=5,centerX:h,centerY:g,offset:p=20,stepPosition:x=.5}){const[y,b,w,E,N]=n4({source:{x:t,y:a},sourcePosition:l,target:{x:o,y:s},targetPosition:c,center:{x:h,y:g},offset:p,stepPosition:x});return[y.reduce((k,A,S)=>{let C="";return S>0&&S<y.length-1?C=a4(y[S-1],A,y[S+1],f):C=`${S===0?"M":"L"}${A.x} ${A.y}`,k+=C,k},""),b,w,E,N]}function ny(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function i4(t){const{sourceNode:a,targetNode:l}=t;if(!ny(a)||!ny(l))return null;const o=a.internals.handleBounds||ay(a.handles),s=l.internals.handleBounds||ay(l.handles),c=iy(o?.source??[],t.sourceHandle),f=iy(t.connectionMode===fl.Strict?s?.target??[]:(s?.target??[]).concat(s?.source??[]),t.targetHandle);if(!c||!f)return t.onError?.("008",wn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const h=c?.position||pe.Bottom,g=f?.position||pe.Top,p=hi(a,c,h),x=hi(l,f,g);return{sourceX:p.x,sourceY:p.y,targetX:x.x,targetY:x.y,sourcePosition:h,targetPosition:g}}function ay(t){if(!t)return null;const a=[],l=[];for(const o of t)o.width=o.width??1,o.height=o.height??1,o.type==="source"?a.push(o):o.type==="target"&&l.push(o);return{source:a,target:l}}function hi(t,a,l=pe.Left,o=!1){const s=(a?.x??0)+t.internals.positionAbsolute.x,c=(a?.y??0)+t.internals.positionAbsolute.y,{width:f,height:h}=a??ea(t);if(o)return{x:s+f/2,y:c+h/2};switch(a?.position??l){case pe.Top:return{x:s+f/2,y:c};case pe.Right:return{x:s+f,y:c+h/2};case pe.Bottom:return{x:s+f/2,y:c+h};case pe.Left:return{x:s,y:c+h/2}}}function iy(t,a){return t&&(a?t.find(l=>l.id===a):t[0])||null}function zd(t,a){return t?typeof t=="string"?t:`${a?`${a}__`:""}${Object.keys(t).sort().map(o=>`${o}=${t[o]}`).join("&")}`:""}function l4(t,{id:a,defaultColor:l,defaultMarkerStart:o,defaultMarkerEnd:s}){const c=new Set;return t.reduce((f,h)=>([h.markerStart||o,h.markerEnd||s].forEach(g=>{if(g&&typeof g=="object"){const p=zd(g,a);c.has(p)||(f.push({id:p,color:g.color||l,...g}),c.add(p))}}),f),[]).sort((f,h)=>f.id.localeCompare(h.id))}const bv=1e3,o4=10,mh={nodeOrigin:[0,0],nodeExtent:zo,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},r4={...mh,checkEquality:!0};function gh(t,a){const l={...t};for(const o in a)a[o]!==void 0&&(l[o]=a[o]);return l}function s4(t,a,l){const o=gh(mh,l);for(const s of t.values())if(s.parentId)xh(s,t,a,o);else{const c=Qo(s,o.nodeOrigin),f=pl(s.extent)?s.extent:o.nodeExtent,h=di(c,f,ea(s));s.internals.positionAbsolute=h}}function c4(t,a){if(!t.handles)return t.measured?a?.internals.handleBounds:void 0;const l=[],o=[];for(const s of t.handles){const c={id:s.id,width:s.width??1,height:s.height??1,nodeId:t.id,x:s.x,y:s.y,position:s.position,type:s.type};s.type==="source"?l.push(c):s.type==="target"&&o.push(c)}return{source:l,target:o}}function yh(t){return t==="manual"}function Od(t,a,l,o={}){const s=gh(r4,o),c={i:0},f=new Map(a),h=s?.elevateNodesOnSelect&&!yh(s.zIndexMode)?bv:0;let g=t.length>0;a.clear(),l.clear();for(const p of t){let x=f.get(p.id);if(s.checkEquality&&p===x?.internals.userNode)a.set(p.id,x);else{const y=Qo(p,s.nodeOrigin),b=pl(p.extent)?p.extent:s.nodeExtent,w=di(y,b,ea(p));x={...s.defaults,...p,measured:{width:p.measured?.width,height:p.measured?.height},internals:{positionAbsolute:w,handleBounds:c4(p,x),z:wv(p,h,s.zIndexMode),userNode:p}},a.set(p.id,x)}(x.measured===void 0||x.measured.width===void 0||x.measured.height===void 0)&&!x.hidden&&(g=!1),p.parentId&&xh(x,a,l,o,c)}return g}function u4(t,a){if(!t.parentId)return;const l=a.get(t.parentId);l?l.set(t.id,t):a.set(t.parentId,new Map([[t.id,t]]))}function xh(t,a,l,o,s){const{elevateNodesOnSelect:c,nodeOrigin:f,nodeExtent:h,zIndexMode:g}=gh(mh,o),p=t.parentId,x=a.get(p);if(!x){console.warn(`Parent node ${p} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}u4(t,l),s&&!x.parentId&&x.internals.rootParentIndex===void 0&&g==="auto"&&(x.internals.rootParentIndex=++s.i,x.internals.z=x.internals.z+s.i*o4),s&&x.internals.rootParentIndex!==void 0&&(s.i=x.internals.rootParentIndex);const y=c&&!yh(g)?bv:0,{x:b,y:w,z:E}=f4(t,x,f,h,y,g),{positionAbsolute:N}=t.internals,T=b!==N.x||w!==N.y;(T||E!==t.internals.z)&&a.set(t.id,{...t,internals:{...t.internals,positionAbsolute:T?{x:b,y:w}:N,z:E}})}function wv(t,a,l){const o=sn(t.zIndex)?t.zIndex:0;return yh(l)?o:o+(t.selected?a:0)}function f4(t,a,l,o,s,c){const{x:f,y:h}=a.internals.positionAbsolute,g=ea(t),p=Qo(t,l),x=pl(t.extent)?di(p,t.extent,g):p;let y=di({x:f+x.x,y:h+x.y},o,g);t.extent==="parent"&&(y=sv(y,g,a));const b=wv(t,s,c),w=a.internals.z??0;return{x:y.x,y:y.y,z:w>=b?w+1:b}}function vh(t,a,l,o=[0,0]){const s=[],c=new Map;for(const f of t){const h=a.get(f.parentId);if(!h)continue;const g=c.get(f.parentId)?.expandedRect??hl(h),p=uv(g,f.rect);c.set(f.parentId,{expandedRect:p,parent:h})}return c.size>0&&c.forEach(({expandedRect:f,parent:h},g)=>{const p=h.internals.positionAbsolute,x=ea(h),y=h.origin??o,b=f.x<p.x?Math.round(Math.abs(p.x-f.x)):0,w=f.y<p.y?Math.round(Math.abs(p.y-f.y)):0,E=Math.max(x.width,Math.round(f.width)),N=Math.max(x.height,Math.round(f.height)),T=(E-x.width)*y[0],k=(N-x.height)*y[1];(b>0||w>0||T||k)&&(s.push({id:g,type:"position",position:{x:h.position.x-b+T,y:h.position.y-w+k}}),l.get(g)?.forEach(A=>{t.some(S=>S.id===A.id)||s.push({id:A.id,type:"position",position:{x:A.position.x+b,y:A.position.y+w}})})),(x.width<f.width||x.height<f.height||b||w)&&s.push({id:g,type:"dimensions",setAttributes:!0,dimensions:{width:E+(b?y[0]*b-T:0),height:N+(w?y[1]*w-k:0)}})}),s}function d4(t,a,l,o,s,c,f){const h=o?.querySelector(".xyflow__viewport");let g=!1;if(!h)return{changes:[],updatedInternals:g};const p=[],x=window.getComputedStyle(h),{m22:y}=new window.DOMMatrixReadOnly(x.transform),b=[];for(const w of t.values()){const E=a.get(w.id);if(!E)continue;if(E.hidden){a.set(E.id,{...E,internals:{...E.internals,handleBounds:void 0}}),g=!0;continue}const N=ph(w.nodeElement),T=E.measured.width!==N.width||E.measured.height!==N.height;if(!!(N.width&&N.height&&(T||!E.internals.handleBounds||w.force))){const A=w.nodeElement.getBoundingClientRect(),S=pl(E.extent)?E.extent:c;let{positionAbsolute:C}=E.internals;E.parentId&&E.extent==="parent"?C=sv(C,N,a.get(E.parentId)):S&&(C=di(C,S,N));const D={...E,measured:N,internals:{...E.internals,positionAbsolute:C,handleBounds:{source:Pg("source",w.nodeElement,A,y,E.id),target:Pg("target",w.nodeElement,A,y,E.id)}}};a.set(E.id,D),E.parentId&&xh(D,a,l,{nodeOrigin:s,zIndexMode:f}),g=!0,T&&(p.push({id:E.id,type:"dimensions",dimensions:N}),E.expandParent&&E.parentId&&b.push({id:E.id,parentId:E.parentId,rect:hl(D,s)}))}}if(b.length>0){const w=vh(b,a,l,s);p.push(...w)}return{changes:p,updatedInternals:g}}async function h4({delta:t,panZoom:a,transform:l,translateExtent:o,width:s,height:c}){if(!a||!t.x&&!t.y)return Promise.resolve(!1);const f=await a.setViewportConstrained({x:l[0]+t.x,y:l[1]+t.y,zoom:l[2]},[[0,0],[s,c]],o),h=!!f&&(f.x!==l[0]||f.y!==l[1]||f.k!==l[2]);return Promise.resolve(h)}function ly(t,a,l,o,s,c){let f=s;const h=o.get(f)||new Map;o.set(f,h.set(l,a)),f=`${s}-${t}`;const g=o.get(f)||new Map;if(o.set(f,g.set(l,a)),c){f=`${s}-${t}-${c}`;const p=o.get(f)||new Map;o.set(f,p.set(l,a))}}function Sv(t,a,l){t.clear(),a.clear();for(const o of l){const{source:s,target:c,sourceHandle:f=null,targetHandle:h=null}=o,g={edgeId:o.id,source:s,target:c,sourceHandle:f,targetHandle:h},p=`${s}-${f}--${c}-${h}`,x=`${c}-${h}--${s}-${f}`;ly("source",g,x,t,s,f),ly("target",g,p,t,c,h),a.set(o.id,o)}}function Ev(t,a){if(!t.parentId)return!1;const l=a.get(t.parentId);return l?l.selected?!0:Ev(l,a):!1}function oy(t,a,l){let o=t;do{if(o?.matches?.(a))return!0;if(o===l)return!1;o=o?.parentElement}while(o);return!1}function p4(t,a,l,o){const s=new Map;for(const[c,f]of t)if((f.selected||f.id===o)&&(!f.parentId||!Ev(f,t))&&(f.draggable||a&&typeof f.draggable>"u")){const h=t.get(c);h&&s.set(c,{id:c,position:h.position||{x:0,y:0},distance:{x:l.x-h.internals.positionAbsolute.x,y:l.y-h.internals.positionAbsolute.y},extent:h.extent,parentId:h.parentId,origin:h.origin,expandParent:h.expandParent,internals:{positionAbsolute:h.internals.positionAbsolute||{x:0,y:0}},measured:{width:h.measured.width??0,height:h.measured.height??0}})}return s}function id({nodeId:t,dragItems:a,nodeLookup:l,dragging:o=!0}){const s=[];for(const[f,h]of a){const g=l.get(f)?.internals.userNode;g&&s.push({...g,position:h.position,dragging:o})}if(!t)return[s[0],s];const c=l.get(t)?.internals.userNode;return[c?{...c,position:a.get(t)?.position||c.position,dragging:o}:s[0],s]}function m4({dragItems:t,snapGrid:a,x:l,y:o}){const s=t.values().next().value;if(!s)return null;const c={x:l-s.distance.x,y:o-s.distance.y},f=Io(c,a);return{x:f.x-c.x,y:f.y-c.y}}function g4({onNodeMouseDown:t,getStoreItems:a,onDragStart:l,onDrag:o,onDragStop:s}){let c={x:null,y:null},f=0,h=new Map,g=!1,p={x:0,y:0},x=null,y=!1,b=null,w=!1,E=!1,N=null;function T({noDragClassName:A,handleSelector:S,domNode:C,isSelectable:D,nodeId:z,nodeClickDistance:O=0}){b=Ut(C);function $({x:Z,y:ie}){const{nodeLookup:H,nodeExtent:Q,snapGrid:M,snapToGrid:B,nodeOrigin:V,onNodeDrag:K,onSelectionDrag:ne,onError:R,updateNodePositions:U}=a();c={x:Z,y:ie};let W=!1;const te=h.size>1,se=te&&Q?Ad(Ko(h)):null,ue=te&&B?m4({dragItems:h,snapGrid:M,x:Z,y:ie}):null;for(const[ce,re]of h){if(!H.has(ce))continue;let fe={x:Z-re.distance.x,y:ie-re.distance.y};B&&(fe=ue?{x:Math.round(fe.x+ue.x),y:Math.round(fe.y+ue.y)}:Io(fe,M));let Ee=null;if(te&&Q&&!re.extent&&se){const{positionAbsolute:xe}=re.internals,Te=xe.x-se.x+Q[0][0],Ue=xe.x+re.measured.width-se.x2+Q[1][0],He=xe.y-se.y+Q[0][1],ut=xe.y+re.measured.height-se.y2+Q[1][1];Ee=[[Te,He],[Ue,ut]]}const{position:we,positionAbsolute:ge}=rv({nodeId:ce,nextPosition:fe,nodeLookup:H,nodeExtent:Ee||Q,nodeOrigin:V,onError:R});W=W||re.position.x!==we.x||re.position.y!==we.y,re.position=we,re.internals.positionAbsolute=ge}if(E=E||W,!!W&&(U(h,!0),N&&(o||K||!z&&ne))){const[ce,re]=id({nodeId:z,dragItems:h,nodeLookup:H});o?.(N,h,ce,re),K?.(N,ce,re),z||ne?.(N,re)}}async function G(){if(!x)return;const{transform:Z,panBy:ie,autoPanSpeed:H,autoPanOnNodeDrag:Q}=a();if(!Q){g=!1,cancelAnimationFrame(f);return}const[M,B]=cv(p,x,H);(M!==0||B!==0)&&(c.x=(c.x??0)-M/Z[2],c.y=(c.y??0)-B/Z[2],await ie({x:M,y:B})&&$(c)),f=requestAnimationFrame(G)}function ee(Z){const{nodeLookup:ie,multiSelectionActive:H,nodesDraggable:Q,transform:M,snapGrid:B,snapToGrid:V,selectNodesOnDrag:K,onNodeDragStart:ne,onSelectionDragStart:R,unselectNodesAndEdges:U}=a();y=!0,(!K||!D)&&!H&&z&&(ie.get(z)?.selected||U()),D&&K&&z&&t?.(z);const W=Co(Z.sourceEvent,{transform:M,snapGrid:B,snapToGrid:V,containerBounds:x});if(c=W,h=p4(ie,Q,W,z),h.size>0&&(l||ne||!z&&R)){const[te,se]=id({nodeId:z,dragItems:h,nodeLookup:ie});l?.(Z.sourceEvent,h,te,se),ne?.(Z.sourceEvent,te,se),z||R?.(Z.sourceEvent,se)}}const Y=qx().clickDistance(O).on("start",Z=>{const{domNode:ie,nodeDragThreshold:H,transform:Q,snapGrid:M,snapToGrid:B}=a();x=ie?.getBoundingClientRect()||null,w=!1,E=!1,N=Z.sourceEvent,H===0&&ee(Z),c=Co(Z.sourceEvent,{transform:Q,snapGrid:M,snapToGrid:B,containerBounds:x}),p=cn(Z.sourceEvent,x)}).on("drag",Z=>{const{autoPanOnNodeDrag:ie,transform:H,snapGrid:Q,snapToGrid:M,nodeDragThreshold:B,nodeLookup:V}=a(),K=Co(Z.sourceEvent,{transform:H,snapGrid:Q,snapToGrid:M,containerBounds:x});if(N=Z.sourceEvent,(Z.sourceEvent.type==="touchmove"&&Z.sourceEvent.touches.length>1||z&&!V.has(z))&&(w=!0),!w){if(!g&&ie&&y&&(g=!0,G()),!y){const ne=cn(Z.sourceEvent,x),R=ne.x-p.x,U=ne.y-p.y;Math.sqrt(R*R+U*U)>B&&ee(Z)}(c.x!==K.xSnapped||c.y!==K.ySnapped)&&h&&y&&(p=cn(Z.sourceEvent,x),$(K))}}).on("end",Z=>{if(!(!y||w)&&(g=!1,y=!1,cancelAnimationFrame(f),h.size>0)){const{nodeLookup:ie,updateNodePositions:H,onNodeDragStop:Q,onSelectionDragStop:M}=a();if(E&&(H(h,!1),E=!1),s||Q||!z&&M){const[B,V]=id({nodeId:z,dragItems:h,nodeLookup:ie,dragging:!1});s?.(Z.sourceEvent,h,B,V),Q?.(Z.sourceEvent,B,V),z||M?.(Z.sourceEvent,V)}}}).filter(Z=>{const ie=Z.target;return!Z.button&&(!A||!oy(ie,`.${A}`,C))&&(!S||oy(ie,S,C))});b.call(Y)}function k(){b?.on(".drag",null)}return{update:T,destroy:k}}function y4(t,a,l){const o=[],s={x:t.x-l,y:t.y-l,width:l*2,height:l*2};for(const c of a.values())Do(s,hl(c))>0&&o.push(c);return o}const x4=250;function v4(t,a,l,o){let s=[],c=1/0;const f=y4(t,l,a+x4);for(const h of f){const g=[...h.internals.handleBounds?.source??[],...h.internals.handleBounds?.target??[]];for(const p of g){if(o.nodeId===p.nodeId&&o.type===p.type&&o.id===p.id)continue;const{x,y}=hi(h,p,p.position,!0),b=Math.sqrt(Math.pow(x-t.x,2)+Math.pow(y-t.y,2));b>a||(b<c?(s=[{...p,x,y}],c=b):b===c&&s.push({...p,x,y}))}}if(!s.length)return null;if(s.length>1){const h=o.type==="source"?"target":"source";return s.find(g=>g.type===h)??s[0]}return s[0]}function Nv(t,a,l,o,s,c=!1){const f=o.get(t);if(!f)return null;const h=s==="strict"?f.internals.handleBounds?.[a]:[...f.internals.handleBounds?.source??[],...f.internals.handleBounds?.target??[]],g=(l?h?.find(p=>p.id===l):h?.[0])??null;return g&&c?{...g,...hi(f,g,g.position,!0)}:g}function _v(t,a){return t||(a?.classList.contains("target")?"target":a?.classList.contains("source")?"source":null)}function b4(t,a){let l=null;return a?l=!0:t&&!a&&(l=!1),l}const Cv=()=>!0;function w4(t,{connectionMode:a,connectionRadius:l,handleId:o,nodeId:s,edgeUpdaterType:c,isTarget:f,domNode:h,nodeLookup:g,lib:p,autoPanOnConnect:x,flowId:y,panBy:b,cancelConnection:w,onConnectStart:E,onConnect:N,onConnectEnd:T,isValidConnection:k=Cv,onReconnectEnd:A,updateConnection:S,getTransform:C,getFromHandle:D,autoPanSpeed:z,dragThreshold:O=1,handleDomNode:$}){const G=hv(t.target);let ee=0,Y;const{x:Z,y:ie}=cn(t),H=_v(c,$),Q=h?.getBoundingClientRect();let M=!1;if(!Q||!H)return;const B=Nv(s,H,o,g,a);if(!B)return;let V=cn(t,Q),K=!1,ne=null,R=!1,U=null;function W(){if(!x||!Q)return;const[we,ge]=cv(V,Q,z);b({x:we,y:ge}),ee=requestAnimationFrame(W)}const te={...B,nodeId:s,type:H,position:B.position},se=g.get(s);let ce={inProgress:!0,isValid:null,from:hi(se,te,pe.Left,!0),fromHandle:te,fromPosition:te.position,fromNode:se,to:V,toHandle:null,toPosition:Kg[te.position],toNode:null,pointer:V};function re(){M=!0,S(ce),E?.(t,{nodeId:s,handleId:o,handleType:H})}O===0&&re();function fe(we){if(!M){const{x:ut,y:Pt}=cn(we),Mt=ut-Z,Wt=Pt-ie;if(!(Mt*Mt+Wt*Wt>O*O))return;re()}if(!D()||!te){Ee(we);return}const ge=C();V=cn(we,Q),Y=v4(Fo(V,ge,!1,[1,1]),l,g,te),K||(W(),K=!0);const xe=Tv(we,{handle:Y,connectionMode:a,fromNodeId:s,fromHandleId:o,fromType:f?"target":"source",isValidConnection:k,doc:G,lib:p,flowId:y,nodeLookup:g});U=xe.handleDomNode,ne=xe.connection,R=b4(!!Y,xe.isValid);const Te=g.get(s),Ue=Te?hi(Te,te,pe.Left,!0):ce.from,He={...ce,from:Ue,isValid:R,to:xe.toHandle&&R?oc({x:xe.toHandle.x,y:xe.toHandle.y},ge):V,toHandle:xe.toHandle,toPosition:R&&xe.toHandle?xe.toHandle.position:Kg[te.position],toNode:xe.toHandle?g.get(xe.toHandle.nodeId):null,pointer:V};S(He),ce=He}function Ee(we){if(!("touches"in we&&we.touches.length>0)){if(M){(Y||U)&&ne&&R&&N?.(ne);const{inProgress:ge,...xe}=ce,Te={...xe,toPosition:ce.toHandle?ce.toPosition:null};T?.(we,Te),c&&A?.(we,Te)}w(),cancelAnimationFrame(ee),K=!1,R=!1,ne=null,U=null,G.removeEventListener("mousemove",fe),G.removeEventListener("mouseup",Ee),G.removeEventListener("touchmove",fe),G.removeEventListener("touchend",Ee)}}G.addEventListener("mousemove",fe),G.addEventListener("mouseup",Ee),G.addEventListener("touchmove",fe),G.addEventListener("touchend",Ee)}function Tv(t,{handle:a,connectionMode:l,fromNodeId:o,fromHandleId:s,fromType:c,doc:f,lib:h,flowId:g,isValidConnection:p=Cv,nodeLookup:x}){const y=c==="target",b=a?f.querySelector(`.${h}-flow__handle[data-id="${g}-${a?.nodeId}-${a?.id}-${a?.type}"]`):null,{x:w,y:E}=cn(t),N=f.elementFromPoint(w,E),T=N?.classList.contains(`${h}-flow__handle`)?N:b,k={handleDomNode:T,isValid:!1,connection:null,toHandle:null};if(T){const A=_v(void 0,T),S=T.getAttribute("data-nodeid"),C=T.getAttribute("data-handleid"),D=T.classList.contains("connectable"),z=T.classList.contains("connectableend");if(!S||!A)return k;const O={source:y?S:o,sourceHandle:y?C:s,target:y?o:S,targetHandle:y?s:C};k.connection=O;const G=D&&z&&(l===fl.Strict?y&&A==="source"||!y&&A==="target":S!==o||C!==s);k.isValid=G&&p(O),k.toHandle=Nv(S,A,C,x,l,!0)}return k}const Dd={onPointerDown:w4,isValid:Tv};function S4({domNode:t,panZoom:a,getTransform:l,getViewScale:o}){const s=Ut(t);function c({translateExtent:h,width:g,height:p,zoomStep:x=1,pannable:y=!0,zoomable:b=!0,inversePan:w=!1}){const E=S=>{if(S.sourceEvent.type!=="wheel"||!a)return;const C=l(),D=S.sourceEvent.ctrlKey&&Ho()?10:1,z=-S.sourceEvent.deltaY*(S.sourceEvent.deltaMode===1?.05:S.sourceEvent.deltaMode?1:.002)*x,O=C[2]*Math.pow(2,z*D);a.scaleTo(O)};let N=[0,0];const T=S=>{(S.sourceEvent.type==="mousedown"||S.sourceEvent.type==="touchstart")&&(N=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY])},k=S=>{const C=l();if(S.sourceEvent.type!=="mousemove"&&S.sourceEvent.type!=="touchmove"||!a)return;const D=[S.sourceEvent.clientX??S.sourceEvent.touches[0].clientX,S.sourceEvent.clientY??S.sourceEvent.touches[0].clientY],z=[D[0]-N[0],D[1]-N[1]];N=D;const O=o()*Math.max(C[2],Math.log(C[2]))*(w?-1:1),$={x:C[0]-z[0]*O,y:C[1]-z[1]*O},G=[[0,0],[g,p]];a.setViewportConstrained({x:$.x,y:$.y,zoom:C[2]},G,h)},A=tv().on("start",T).on("zoom",y?k:null).on("zoom.wheel",b?E:null);s.call(A,{})}function f(){s.on("zoom",null)}return{update:c,destroy:f,pointer:ln}}const bc=t=>({x:t.x,y:t.y,zoom:t.k}),ld=({x:t,y:a,zoom:l})=>yc.translate(t,a).scale(l),il=(t,a)=>t.target.closest(`.${a}`),kv=(t,a)=>a===2&&Array.isArray(t)&&t.includes(2),E4=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,od=(t,a=0,l=E4,o=()=>{})=>{const s=typeof a=="number"&&a>0;return s||o(),s?t.transition().duration(a).ease(l).on("end",o):t},jv=t=>{const a=t.ctrlKey&&Ho()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*a};function N4({zoomPanValues:t,noWheelClassName:a,d3Selection:l,d3Zoom:o,panOnScrollMode:s,panOnScrollSpeed:c,zoomOnPinch:f,onPanZoomStart:h,onPanZoom:g,onPanZoomEnd:p}){return x=>{if(il(x,a))return x.ctrlKey&&x.preventDefault(),!1;x.preventDefault(),x.stopImmediatePropagation();const y=l.property("__zoom").k||1;if(x.ctrlKey&&f){const T=ln(x),k=jv(x),A=y*Math.pow(2,k);o.scaleTo(l,A,T,x);return}const b=x.deltaMode===1?20:1;let w=s===ci.Vertical?0:x.deltaX*b,E=s===ci.Horizontal?0:x.deltaY*b;!Ho()&&x.shiftKey&&s!==ci.Vertical&&(w=x.deltaY*b,E=0),o.translateBy(l,-(w/y)*c,-(E/y)*c,{internal:!0});const N=bc(l.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(g?.(x,N),t.panScrollTimeout=setTimeout(()=>{p?.(x,N),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,h?.(x,N))}}function _4({noWheelClassName:t,preventScrolling:a,d3ZoomHandler:l}){return function(o,s){const c=o.type==="wheel",f=!a&&c&&!o.ctrlKey,h=il(o,t);if(o.ctrlKey&&c&&h&&o.preventDefault(),f||h)return null;o.preventDefault(),l.call(this,o,s)}}function C4({zoomPanValues:t,onDraggingChange:a,onPanZoomStart:l}){return o=>{if(o.sourceEvent?.internal)return;const s=bc(o.transform);t.mouseButton=o.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=s,o.sourceEvent?.type==="mousedown"&&a(!0),l&&l?.(o.sourceEvent,s)}}function T4({zoomPanValues:t,panOnDrag:a,onPaneContextMenu:l,onTransformChange:o,onPanZoom:s}){return c=>{t.usedRightMouseButton=!!(l&&kv(a,t.mouseButton??0)),c.sourceEvent?.sync||o([c.transform.x,c.transform.y,c.transform.k]),s&&!c.sourceEvent?.internal&&s?.(c.sourceEvent,bc(c.transform))}}function k4({zoomPanValues:t,panOnDrag:a,panOnScroll:l,onDraggingChange:o,onPanZoomEnd:s,onPaneContextMenu:c}){return f=>{if(!f.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,c&&kv(a,t.mouseButton??0)&&!t.usedRightMouseButton&&f.sourceEvent&&c(f.sourceEvent),t.usedRightMouseButton=!1,o(!1),s)){const h=bc(f.transform);t.prevViewport=h,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s?.(f.sourceEvent,h)},l?150:0)}}}function j4({zoomActivationKeyPressed:t,zoomOnScroll:a,zoomOnPinch:l,panOnDrag:o,panOnScroll:s,zoomOnDoubleClick:c,userSelectionActive:f,noWheelClassName:h,noPanClassName:g,lib:p,connectionInProgress:x}){return y=>{const b=t||a,w=l&&y.ctrlKey,E=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(il(y,`${p}-flow__node`)||il(y,`${p}-flow__edge`)))return!0;if(!o&&!b&&!s&&!c&&!l||f||x&&!E||il(y,h)&&E||il(y,g)&&(!E||s&&E&&!t)||!l&&y.ctrlKey&&E)return!1;if(!l&&y.type==="touchstart"&&y.touches?.length>1)return y.preventDefault(),!1;if(!b&&!s&&!w&&E||!o&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(o)&&!o.includes(y.button)&&y.type==="mousedown")return!1;const N=Array.isArray(o)&&o.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||E)&&N}}function A4({domNode:t,minZoom:a,maxZoom:l,translateExtent:o,viewport:s,onPanZoom:c,onPanZoomStart:f,onPanZoomEnd:h,onDraggingChange:g}){const p={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},x=t.getBoundingClientRect(),y=tv().scaleExtent([a,l]).translateExtent(o),b=Ut(t).call(y);A({x:s.x,y:s.y,zoom:dl(s.zoom,a,l)},[[0,0],[x.width,x.height]],o);const w=b.on("wheel.zoom"),E=b.on("dblclick.zoom");y.wheelDelta(jv);function N(Y,Z){return b?new Promise(ie=>{y?.interpolate(Z?.interpolate==="linear"?_o:Hs).transform(od(b,Z?.duration,Z?.ease,()=>ie(!0)),Y)}):Promise.resolve(!1)}function T({noWheelClassName:Y,noPanClassName:Z,onPaneContextMenu:ie,userSelectionActive:H,panOnScroll:Q,panOnDrag:M,panOnScrollMode:B,panOnScrollSpeed:V,preventScrolling:K,zoomOnPinch:ne,zoomOnScroll:R,zoomOnDoubleClick:U,zoomActivationKeyPressed:W,lib:te,onTransformChange:se,connectionInProgress:ue,paneClickDistance:ce,selectionOnDrag:re}){H&&!p.isZoomingOrPanning&&k();const fe=Q&&!W&&!H;y.clickDistance(re?1/0:!sn(ce)||ce<0?0:ce);const Ee=fe?N4({zoomPanValues:p,noWheelClassName:Y,d3Selection:b,d3Zoom:y,panOnScrollMode:B,panOnScrollSpeed:V,zoomOnPinch:ne,onPanZoomStart:f,onPanZoom:c,onPanZoomEnd:h}):_4({noWheelClassName:Y,preventScrolling:K,d3ZoomHandler:w});if(b.on("wheel.zoom",Ee,{passive:!1}),!H){const ge=C4({zoomPanValues:p,onDraggingChange:g,onPanZoomStart:f});y.on("start",ge);const xe=T4({zoomPanValues:p,panOnDrag:M,onPaneContextMenu:!!ie,onPanZoom:c,onTransformChange:se});y.on("zoom",xe);const Te=k4({zoomPanValues:p,panOnDrag:M,panOnScroll:Q,onPaneContextMenu:ie,onPanZoomEnd:h,onDraggingChange:g});y.on("end",Te)}const we=j4({zoomActivationKeyPressed:W,panOnDrag:M,zoomOnScroll:R,panOnScroll:Q,zoomOnDoubleClick:U,zoomOnPinch:ne,userSelectionActive:H,noPanClassName:Z,noWheelClassName:Y,lib:te,connectionInProgress:ue});y.filter(we),U?b.on("dblclick.zoom",E):b.on("dblclick.zoom",null)}function k(){y.on("zoom",null)}async function A(Y,Z,ie){const H=ld(Y),Q=y?.constrain()(H,Z,ie);return Q&&await N(Q),new Promise(M=>M(Q))}async function S(Y,Z){const ie=ld(Y);return await N(ie,Z),new Promise(H=>H(ie))}function C(Y){if(b){const Z=ld(Y),ie=b.property("__zoom");(ie.k!==Y.zoom||ie.x!==Y.x||ie.y!==Y.y)&&y?.transform(b,Z,null,{sync:!0})}}function D(){const Y=b?ev(b.node()):{x:0,y:0,k:1};return{x:Y.x,y:Y.y,zoom:Y.k}}function z(Y,Z){return b?new Promise(ie=>{y?.interpolate(Z?.interpolate==="linear"?_o:Hs).scaleTo(od(b,Z?.duration,Z?.ease,()=>ie(!0)),Y)}):Promise.resolve(!1)}function O(Y,Z){return b?new Promise(ie=>{y?.interpolate(Z?.interpolate==="linear"?_o:Hs).scaleBy(od(b,Z?.duration,Z?.ease,()=>ie(!0)),Y)}):Promise.resolve(!1)}function $(Y){y?.scaleExtent(Y)}function G(Y){y?.translateExtent(Y)}function ee(Y){const Z=!sn(Y)||Y<0?0:Y;y?.clickDistance(Z)}return{update:T,destroy:k,setViewport:S,setViewportConstrained:A,getViewport:D,scaleTo:z,scaleBy:O,setScaleExtent:$,setTranslateExtent:G,syncViewport:C,setClickDistance:ee}}var ml;(function(t){t.Line="line",t.Handle="handle"})(ml||(ml={}));function M4({width:t,prevWidth:a,height:l,prevHeight:o,affectsX:s,affectsY:c}){const f=t-a,h=l-o,g=[f>0?1:f<0?-1:0,h>0?1:h<0?-1:0];return f&&s&&(g[0]=g[0]*-1),h&&c&&(g[1]=g[1]*-1),g}function ry(t){const a=t.includes("right")||t.includes("left"),l=t.includes("bottom")||t.includes("top"),o=t.includes("left"),s=t.includes("top");return{isHorizontal:a,isVertical:l,affectsX:o,affectsY:s}}function Aa(t,a){return Math.max(0,a-t)}function Ma(t,a){return Math.max(0,t-a)}function ks(t,a,l){return Math.max(0,a-t,t-l)}function sy(t,a){return t?!a:a}function R4(t,a,l,o,s,c,f,h){let{affectsX:g,affectsY:p}=a;const{isHorizontal:x,isVertical:y}=a,b=x&&y,{xSnapped:w,ySnapped:E}=l,{minWidth:N,maxWidth:T,minHeight:k,maxHeight:A}=o,{x:S,y:C,width:D,height:z,aspectRatio:O}=t;let $=Math.floor(x?w-t.pointerX:0),G=Math.floor(y?E-t.pointerY:0);const ee=D+(g?-$:$),Y=z+(p?-G:G),Z=-c[0]*D,ie=-c[1]*z;let H=ks(ee,N,T),Q=ks(Y,k,A);if(f){let V=0,K=0;g&&$<0?V=Aa(S+$+Z,f[0][0]):!g&&$>0&&(V=Ma(S+ee+Z,f[1][0])),p&&G<0?K=Aa(C+G+ie,f[0][1]):!p&&G>0&&(K=Ma(C+Y+ie,f[1][1])),H=Math.max(H,V),Q=Math.max(Q,K)}if(h){let V=0,K=0;g&&$>0?V=Ma(S+$,h[0][0]):!g&&$<0&&(V=Aa(S+ee,h[1][0])),p&&G>0?K=Ma(C+G,h[0][1]):!p&&G<0&&(K=Aa(C+Y,h[1][1])),H=Math.max(H,V),Q=Math.max(Q,K)}if(s){if(x){const V=ks(ee/O,k,A)*O;if(H=Math.max(H,V),f){let K=0;!g&&!p||g&&!p&&b?K=Ma(C+ie+ee/O,f[1][1])*O:K=Aa(C+ie+(g?$:-$)/O,f[0][1])*O,H=Math.max(H,K)}if(h){let K=0;!g&&!p||g&&!p&&b?K=Aa(C+ee/O,h[1][1])*O:K=Ma(C+(g?$:-$)/O,h[0][1])*O,H=Math.max(H,K)}}if(y){const V=ks(Y*O,N,T)/O;if(Q=Math.max(Q,V),f){let K=0;!g&&!p||p&&!g&&b?K=Ma(S+Y*O+Z,f[1][0])/O:K=Aa(S+(p?G:-G)*O+Z,f[0][0])/O,Q=Math.max(Q,K)}if(h){let K=0;!g&&!p||p&&!g&&b?K=Aa(S+Y*O,h[1][0])/O:K=Ma(S+(p?G:-G)*O,h[0][0])/O,Q=Math.max(Q,K)}}}G=G+(G<0?Q:-Q),$=$+($<0?H:-H),s&&(b?ee>Y*O?G=(sy(g,p)?-$:$)/O:$=(sy(g,p)?-G:G)*O:x?(G=$/O,p=g):($=G*O,g=p));const M=g?S+$:S,B=p?C+G:C;return{width:D+(g?-$:$),height:z+(p?-G:G),x:c[0]*$*(g?-1:1)+M,y:c[1]*G*(p?-1:1)+B}}const Av={width:0,height:0,x:0,y:0},z4={...Av,pointerX:0,pointerY:0,aspectRatio:1};function O4(t){return[[0,0],[t.measured.width,t.measured.height]]}function D4(t,a,l){const o=a.position.x+t.position.x,s=a.position.y+t.position.y,c=t.measured.width??0,f=t.measured.height??0,h=l[0]*c,g=l[1]*f;return[[o-h,s-g],[o+c-h,s+f-g]]}function H4({domNode:t,nodeId:a,getStoreItems:l,onChange:o,onEnd:s}){const c=Ut(t);let f={controlDirection:ry("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function h({controlPosition:p,boundaries:x,keepAspectRatio:y,resizeDirection:b,onResizeStart:w,onResize:E,onResizeEnd:N,shouldResize:T}){let k={...Av},A={...z4};f={boundaries:x,resizeDirection:b,keepAspectRatio:y,controlDirection:ry(p)};let S,C=null,D=[],z,O,$,G=!1;const ee=qx().on("start",Y=>{const{nodeLookup:Z,transform:ie,snapGrid:H,snapToGrid:Q,nodeOrigin:M,paneDomNode:B}=l();if(S=Z.get(a),!S)return;C=B?.getBoundingClientRect()??null;const{xSnapped:V,ySnapped:K}=Co(Y.sourceEvent,{transform:ie,snapGrid:H,snapToGrid:Q,containerBounds:C});k={width:S.measured.width??0,height:S.measured.height??0,x:S.position.x??0,y:S.position.y??0},A={...k,pointerX:V,pointerY:K,aspectRatio:k.width/k.height},z=void 0,S.parentId&&(S.extent==="parent"||S.expandParent)&&(z=Z.get(S.parentId),O=z&&S.extent==="parent"?O4(z):void 0),D=[],$=void 0;for(const[ne,R]of Z)if(R.parentId===a&&(D.push({id:ne,position:{...R.position},extent:R.extent}),R.extent==="parent"||R.expandParent)){const U=D4(R,S,R.origin??M);$?$=[[Math.min(U[0][0],$[0][0]),Math.min(U[0][1],$[0][1])],[Math.max(U[1][0],$[1][0]),Math.max(U[1][1],$[1][1])]]:$=U}w?.(Y,{...k})}).on("drag",Y=>{const{transform:Z,snapGrid:ie,snapToGrid:H,nodeOrigin:Q}=l(),M=Co(Y.sourceEvent,{transform:Z,snapGrid:ie,snapToGrid:H,containerBounds:C}),B=[];if(!S)return;const{x:V,y:K,width:ne,height:R}=k,U={},W=S.origin??Q,{width:te,height:se,x:ue,y:ce}=R4(A,f.controlDirection,M,f.boundaries,f.keepAspectRatio,W,O,$),re=te!==ne,fe=se!==R,Ee=ue!==V&&re,we=ce!==K&&fe;if(!Ee&&!we&&!re&&!fe)return;if((Ee||we||W[0]===1||W[1]===1)&&(U.x=Ee?ue:k.x,U.y=we?ce:k.y,k.x=U.x,k.y=U.y,D.length>0)){const Ue=ue-V,He=ce-K;for(const ut of D)ut.position={x:ut.position.x-Ue+W[0]*(te-ne),y:ut.position.y-He+W[1]*(se-R)},B.push(ut)}if((re||fe)&&(U.width=re&&(!f.resizeDirection||f.resizeDirection==="horizontal")?te:k.width,U.height=fe&&(!f.resizeDirection||f.resizeDirection==="vertical")?se:k.height,k.width=U.width,k.height=U.height),z&&S.expandParent){const Ue=W[0]*(U.width??0);U.x&&U.x<Ue&&(k.x=Ue,A.x=A.x-(U.x-Ue));const He=W[1]*(U.height??0);U.y&&U.y<He&&(k.y=He,A.y=A.y-(U.y-He))}const ge=M4({width:k.width,prevWidth:ne,height:k.height,prevHeight:R,affectsX:f.controlDirection.affectsX,affectsY:f.controlDirection.affectsY}),xe={...k,direction:ge};T?.(Y,xe)!==!1&&(G=!0,E?.(Y,xe),o(U,B))}).on("end",Y=>{G&&(N?.(Y,{...k}),s?.({...k}),G=!1)});c.call(ee)}function g(){c.on(".drag",null)}return{update:h,destroy:g}}var rd={exports:{}},sd={},cd={exports:{}},ud={};var cy;function L4(){if(cy)return ud;cy=1;var t=Bo();function a(y,b){return y===b&&(y!==0||1/y===1/b)||y!==y&&b!==b}var l=typeof Object.is=="function"?Object.is:a,o=t.useState,s=t.useEffect,c=t.useLayoutEffect,f=t.useDebugValue;function h(y,b){var w=b(),E=o({inst:{value:w,getSnapshot:b}}),N=E[0].inst,T=E[1];return c(function(){N.value=w,N.getSnapshot=b,g(N)&&T({inst:N})},[y,w,b]),s(function(){return g(N)&&T({inst:N}),y(function(){g(N)&&T({inst:N})})},[y]),f(w),w}function g(y){var b=y.getSnapshot;y=y.value;try{var w=b();return!l(y,w)}catch{return!0}}function p(y,b){return b()}var x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:h;return ud.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:x,ud}var uy;function B4(){return uy||(uy=1,cd.exports=L4()),cd.exports}var fy;function U4(){if(fy)return sd;fy=1;var t=Bo(),a=B4();function l(p,x){return p===x&&(p!==0||1/p===1/x)||p!==p&&x!==x}var o=typeof Object.is=="function"?Object.is:l,s=a.useSyncExternalStore,c=t.useRef,f=t.useEffect,h=t.useMemo,g=t.useDebugValue;return sd.useSyncExternalStoreWithSelector=function(p,x,y,b,w){var E=c(null);if(E.current===null){var N={hasValue:!1,value:null};E.current=N}else N=E.current;E=h(function(){function k(z){if(!A){if(A=!0,S=z,z=b(z),w!==void 0&&N.hasValue){var O=N.value;if(w(O,z))return C=O}return C=z}if(O=C,o(S,z))return O;var $=b(z);return w!==void 0&&w(O,$)?(S=z,O):(S=z,C=$)}var A=!1,S,C,D=y===void 0?null:y;return[function(){return k(x())},D===null?void 0:function(){return k(D())}]},[x,y,b,w]);var T=s(p,E[0],E[1]);return f(function(){N.hasValue=!0,N.value=T},[T]),g(T),T},sd}var dy;function q4(){return dy||(dy=1,rd.exports=U4()),rd.exports}var V4=q4();const $4=Xy(V4),Y4={},hy=t=>{let a;const l=new Set,o=(x,y)=>{const b=typeof x=="function"?x(a):x;if(!Object.is(b,a)){const w=a;a=y??(typeof b!="object"||b===null)?b:Object.assign({},a,b),l.forEach(E=>E(a,w))}},s=()=>a,g={setState:o,getState:s,getInitialState:()=>p,subscribe:x=>(l.add(x),()=>l.delete(x)),destroy:()=>{(Y4?"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."),l.clear()}},p=a=t(o,s,g);return g},X4=t=>t?hy(t):hy,{useDebugValue:G4}=wo,{useSyncExternalStoreWithSelector:Z4}=$4,Q4=t=>t;function Mv(t,a=Q4,l){const o=Z4(t.subscribe,t.getState,t.getServerState||t.getInitialState,a,l);return G4(o),o}const py=(t,a)=>{const l=X4(t),o=(s,c=a)=>Mv(l,s,c);return Object.assign(o,l),o},K4=(t,a)=>t?py(t,a):py;function Qe(t,a){if(Object.is(t,a))return!0;if(typeof t!="object"||t===null||typeof a!="object"||a===null)return!1;if(t instanceof Map&&a instanceof Map){if(t.size!==a.size)return!1;for(const[o,s]of t)if(!Object.is(s,a.get(o)))return!1;return!0}if(t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(const o of t)if(!a.has(o))return!1;return!0}const l=Object.keys(t);if(l.length!==Object.keys(a).length)return!1;for(const o of l)if(!Object.prototype.hasOwnProperty.call(a,o)||!Object.is(t[o],a[o]))return!1;return!0}const wc=j.createContext(null),I4=wc.Provider,Rv=wn.error001();function Re(t,a){const l=j.useContext(wc);if(l===null)throw new Error(Rv);return Mv(l,t,a)}function Ke(){const t=j.useContext(wc);if(t===null)throw new Error(Rv);return j.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const my={display:"none"},F4={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},zv="react-flow__node-desc",Ov="react-flow__edge-desc",J4="react-flow__aria-live",P4=t=>t.ariaLiveMessage,W4=t=>t.ariaLabelConfig;function e5({rfId:t}){const a=Re(P4);return m.jsx("div",{id:`${J4}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:F4,children:a})}function t5({rfId:t,disableKeyboardA11y:a}){const l=Re(W4);return m.jsxs(m.Fragment,{children:[m.jsx("div",{id:`${zv}-${t}`,style:my,children:a?l["node.a11yDescription.default"]:l["node.a11yDescription.keyboardDisabled"]}),m.jsx("div",{id:`${Ov}-${t}`,style:my,children:l["edge.a11yDescription.default"]}),!a&&m.jsx(e5,{rfId:t})]})}const Sc=j.forwardRef(({position:t="top-left",children:a,className:l,style:o,...s},c)=>{const f=`${t}`.split("-");return m.jsx("div",{className:ot(["react-flow__panel",l,...f]),style:o,ref:c,...s,children:a})});Sc.displayName="Panel";function n5({proOptions:t,position:a="bottom-right"}){return t?.hideAttribution?null:m.jsx(Sc,{position:a,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://pro.reactflow.dev",children:m.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const a5=t=>{const a=[],l=[];for(const[,o]of t.nodeLookup)o.selected&&a.push(o.internals.userNode);for(const[,o]of t.edgeLookup)o.selected&&l.push(o);return{selectedNodes:a,selectedEdges:l}},js=t=>t.id;function i5(t,a){return Qe(t.selectedNodes.map(js),a.selectedNodes.map(js))&&Qe(t.selectedEdges.map(js),a.selectedEdges.map(js))}function l5({onSelectionChange:t}){const a=Ke(),{selectedNodes:l,selectedEdges:o}=Re(a5,i5);return j.useEffect(()=>{const s={nodes:l,edges:o};t?.(s),a.getState().onSelectionChangeHandlers.forEach(c=>c(s))},[l,o,t]),null}const o5=t=>!!t.onSelectionChangeHandlers;function r5({onSelectionChange:t}){const a=Re(o5);return t||a?m.jsx(l5,{onSelectionChange:t}):null}const Dv=[0,0],s5={x:0,y:0,zoom:1},c5=["nodes","edges","defaultNodes","defaultEdges","onConnect","onConnectStart","onConnectEnd","onClickConnectStart","onClickConnectEnd","nodesDraggable","autoPanOnNodeFocus","nodesConnectable","nodesFocusable","edgesFocusable","edgesReconnectable","elevateNodesOnSelect","elevateEdgesOnSelect","minZoom","maxZoom","nodeExtent","onNodesChange","onEdgesChange","elementsSelectable","connectionMode","snapGrid","snapToGrid","translateExtent","connectOnClick","defaultEdgeOptions","fitView","fitViewOptions","onNodesDelete","onEdgesDelete","onDelete","onNodeDrag","onNodeDragStart","onNodeDragStop","onSelectionDrag","onSelectionDragStart","onSelectionDragStop","onMoveStart","onMove","onMoveEnd","noPanClassName","nodeOrigin","autoPanOnConnect","autoPanOnNodeDrag","onError","connectionRadius","isValidConnection","selectNodesOnDrag","nodeDragThreshold","connectionDragThreshold","onBeforeDelete","debug","autoPanSpeed","ariaLabelConfig","zIndexMode"],gy=[...c5,"rfId"],u5=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges}),yy={translateExtent:zo,nodeOrigin:Dv,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function f5(t){const{setNodes:a,setEdges:l,setMinZoom:o,setMaxZoom:s,setTranslateExtent:c,setNodeExtent:f,reset:h,setDefaultNodesAndEdges:g}=Re(u5,Qe),p=Ke();j.useEffect(()=>(g(t.defaultNodes,t.defaultEdges),()=>{x.current=yy,h()}),[]);const x=j.useRef(yy);return j.useEffect(()=>{for(const y of gy){const b=t[y],w=x.current[y];b!==w&&(typeof t[y]>"u"||(y==="nodes"?a(b):y==="edges"?l(b):y==="minZoom"?o(b):y==="maxZoom"?s(b):y==="translateExtent"?c(b):y==="nodeExtent"?f(b):y==="ariaLabelConfig"?p.setState({ariaLabelConfig:IC(b)}):y==="fitView"?p.setState({fitViewQueued:b}):y==="fitViewOptions"?p.setState({fitViewOptions:b}):p.setState({[y]:b})))}x.current=t},gy.map(y=>t[y])),null}function xy(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function d5(t){const[a,l]=j.useState(t==="system"?null:t);return j.useEffect(()=>{if(t!=="system"){l(t);return}const o=xy(),s=()=>l(o?.matches?"dark":"light");return s(),o?.addEventListener("change",s),()=>{o?.removeEventListener("change",s)}},[t]),a!==null?a:xy()?.matches?"dark":"light"}const vy=typeof document<"u"?document:null;function Lo(t=null,a={target:vy,actInsideInputWithModifier:!0}){const[l,o]=j.useState(!1),s=j.useRef(!1),c=j.useRef(new Set([])),[f,h]=j.useMemo(()=>{if(t!==null){const p=(Array.isArray(t)?t:[t]).filter(y=>typeof y=="string").map(y=>y.replace("+",`
18
+ `).replace(`
19
+
20
+ `,`
21
+ +`).split(`
22
+ `)),x=p.reduce((y,b)=>y.concat(...b),[]);return[p,x]}return[[],[]]},[t]);return j.useEffect(()=>{const g=a?.target??vy,p=a?.actInsideInputWithModifier??!0;if(t!==null){const x=w=>{if(s.current=w.ctrlKey||w.metaKey||w.shiftKey||w.altKey,(!s.current||s.current&&!p)&&pv(w))return!1;const N=wy(w.code,h);if(c.current.add(w[N]),by(f,c.current,!1)){const T=w.composedPath?.()?.[0]||w.target,k=T?.nodeName==="BUTTON"||T?.nodeName==="A";a.preventDefault!==!1&&(s.current||!k)&&w.preventDefault(),o(!0)}},y=w=>{const E=wy(w.code,h);by(f,c.current,!0)?(o(!1),c.current.clear()):c.current.delete(w[E]),w.key==="Meta"&&c.current.clear(),s.current=!1},b=()=>{c.current.clear(),o(!1)};return g?.addEventListener("keydown",x),g?.addEventListener("keyup",y),window.addEventListener("blur",b),window.addEventListener("contextmenu",b),()=>{g?.removeEventListener("keydown",x),g?.removeEventListener("keyup",y),window.removeEventListener("blur",b),window.removeEventListener("contextmenu",b)}}},[t,o]),l}function by(t,a,l){return t.filter(o=>l||o.length===a.size).some(o=>o.every(s=>a.has(s)))}function wy(t,a){return a.includes(t)?"code":"key"}const h5=()=>{const t=Ke();return j.useMemo(()=>({zoomIn:a=>{const{panZoom:l}=t.getState();return l?l.scaleBy(1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomOut:a=>{const{panZoom:l}=t.getState();return l?l.scaleBy(1/1.2,{duration:a?.duration}):Promise.resolve(!1)},zoomTo:(a,l)=>{const{panZoom:o}=t.getState();return o?o.scaleTo(a,{duration:l?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(a,l)=>{const{transform:[o,s,c],panZoom:f}=t.getState();return f?(await f.setViewport({x:a.x??o,y:a.y??s,zoom:a.zoom??c},l),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,l,o]=t.getState().transform;return{x:a,y:l,zoom:o}},setCenter:async(a,l,o)=>t.getState().setCenter(a,l,o),fitBounds:async(a,l)=>{const{width:o,height:s,minZoom:c,maxZoom:f,panZoom:h}=t.getState(),g=hh(a,o,s,c,f,l?.padding??.1);return h?(await h.setViewport(g,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,l={})=>{const{transform:o,snapGrid:s,snapToGrid:c,domNode:f}=t.getState();if(!f)return a;const{x:h,y:g}=f.getBoundingClientRect(),p={x:a.x-h,y:a.y-g},x=l.snapGrid??s,y=l.snapToGrid??c;return Fo(p,o,y,x)},flowToScreenPosition:a=>{const{transform:l,domNode:o}=t.getState();if(!o)return a;const{x:s,y:c}=o.getBoundingClientRect(),f=oc(a,l);return{x:f.x+s,y:f.y+c}}}),[])};function Hv(t,a){const l=[],o=new Map,s=[];for(const c of t)if(c.type==="add"){s.push(c);continue}else if(c.type==="remove"||c.type==="replace")o.set(c.id,[c]);else{const f=o.get(c.id);f?f.push(c):o.set(c.id,[c])}for(const c of a){const f=o.get(c.id);if(!f){l.push(c);continue}if(f[0].type==="remove")continue;if(f[0].type==="replace"){l.push({...f[0].item});continue}const h={...c};for(const g of f)p5(g,h);l.push(h)}return s.length&&s.forEach(c=>{c.index!==void 0?l.splice(c.index,0,{...c.item}):l.push({...c.item})}),l}function p5(t,a){switch(t.type){case"select":{a.selected=t.selected;break}case"position":{typeof t.position<"u"&&(a.position=t.position),typeof t.dragging<"u"&&(a.dragging=t.dragging);break}case"dimensions":{typeof t.dimensions<"u"&&(a.measured={...t.dimensions},t.setAttributes&&((t.setAttributes===!0||t.setAttributes==="width")&&(a.width=t.dimensions.width),(t.setAttributes===!0||t.setAttributes==="height")&&(a.height=t.dimensions.height))),typeof t.resizing=="boolean"&&(a.resizing=t.resizing);break}}}function qs(t,a){return Hv(t,a)}function Lv(t,a){return Hv(t,a)}function oi(t,a){return{id:t,type:"select",selected:a}}function ll(t,a=new Set,l=!1){const o=[];for(const[s,c]of t){const f=a.has(s);!(c.selected===void 0&&!f)&&c.selected!==f&&(l&&(c.selected=f),o.push(oi(c.id,f)))}return o}function Sy({items:t=[],lookup:a}){const l=[],o=new Map(t.map(s=>[s.id,s]));for(const[s,c]of t.entries()){const f=a.get(c.id),h=f?.internals?.userNode??f;h!==void 0&&h!==c&&l.push({id:c.id,item:c,type:"replace"}),h===void 0&&l.push({item:c,type:"add",index:s})}for(const[s]of a)o.get(s)===void 0&&l.push({id:s,type:"remove"});return l}function Ey(t){return{id:t.id,type:"remove"}}const Ny=t=>UC(t),m5=t=>ov(t);function Bv(t){return j.forwardRef(t)}const g5=typeof window<"u"?j.useLayoutEffect:j.useEffect;function _y(t){const[a,l]=j.useState(BigInt(0)),[o]=j.useState(()=>y5(()=>l(s=>s+BigInt(1))));return g5(()=>{const s=o.get();s.length&&(t(s),o.reset())},[a]),o}function y5(t){let a=[];return{get:()=>a,reset:()=>{a=[]},push:l=>{a.push(l),t()}}}const Uv=j.createContext(null);function x5({children:t}){const a=Ke(),l=j.useCallback(h=>{const{nodes:g=[],setNodes:p,hasDefaultNodes:x,onNodesChange:y,nodeLookup:b,fitViewQueued:w,onNodesChangeMiddlewareMap:E}=a.getState();let N=g;for(const k of h)N=typeof k=="function"?k(N):k;let T=Sy({items:N,lookup:b});for(const k of E.values())T=k(T);x&&p(N),T.length>0?y?.(T):w&&window.requestAnimationFrame(()=>{const{fitViewQueued:k,nodes:A,setNodes:S}=a.getState();k&&S(A)})},[]),o=_y(l),s=j.useCallback(h=>{const{edges:g=[],setEdges:p,hasDefaultEdges:x,onEdgesChange:y,edgeLookup:b}=a.getState();let w=g;for(const E of h)w=typeof E=="function"?E(w):E;x?p(w):y&&y(Sy({items:w,lookup:b}))},[]),c=_y(s),f=j.useMemo(()=>({nodeQueue:o,edgeQueue:c}),[]);return m.jsx(Uv.Provider,{value:f,children:t})}function v5(){const t=j.useContext(Uv);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const b5=t=>!!t.panZoom;function bh(){const t=h5(),a=Ke(),l=v5(),o=Re(b5),s=j.useMemo(()=>{const c=y=>a.getState().nodeLookup.get(y),f=y=>{l.nodeQueue.push(y)},h=y=>{l.edgeQueue.push(y)},g=y=>{const{nodeLookup:b,nodeOrigin:w}=a.getState(),E=Ny(y)?y:b.get(y.id),N=E.parentId?dv(E.position,E.measured,E.parentId,b,w):E.position,T={...E,position:N,width:E.measured?.width??E.width,height:E.measured?.height??E.height};return hl(T)},p=(y,b,w={replace:!1})=>{f(E=>E.map(N=>{if(N.id===y){const T=typeof b=="function"?b(N):b;return w.replace&&Ny(T)?T:{...N,...T}}return N}))},x=(y,b,w={replace:!1})=>{h(E=>E.map(N=>{if(N.id===y){const T=typeof b=="function"?b(N):b;return w.replace&&m5(T)?T:{...N,...T}}return N}))};return{getNodes:()=>a.getState().nodes.map(y=>({...y})),getNode:y=>c(y)?.internals.userNode,getInternalNode:c,getEdges:()=>{const{edges:y=[]}=a.getState();return y.map(b=>({...b}))},getEdge:y=>a.getState().edgeLookup.get(y),setNodes:f,setEdges:h,addNodes:y=>{const b=Array.isArray(y)?y:[y];l.nodeQueue.push(w=>[...w,...b])},addEdges:y=>{const b=Array.isArray(y)?y:[y];l.edgeQueue.push(w=>[...w,...b])},toObject:()=>{const{nodes:y=[],edges:b=[],transform:w}=a.getState(),[E,N,T]=w;return{nodes:y.map(k=>({...k})),edges:b.map(k=>({...k})),viewport:{x:E,y:N,zoom:T}}},deleteElements:async({nodes:y=[],edges:b=[]})=>{const{nodes:w,edges:E,onNodesDelete:N,onEdgesDelete:T,triggerNodeChanges:k,triggerEdgeChanges:A,onDelete:S,onBeforeDelete:C}=a.getState(),{nodes:D,edges:z}=await XC({nodesToRemove:y,edgesToRemove:b,nodes:w,edges:E,onBeforeDelete:C}),O=z.length>0,$=D.length>0;if(O){const G=z.map(Ey);T?.(z),A(G)}if($){const G=D.map(Ey);N?.(D),k(G)}return($||O)&&S?.({nodes:D,edges:z}),{deletedNodes:D,deletedEdges:z}},getIntersectingNodes:(y,b=!0,w)=>{const E=Fg(y),N=E?y:g(y),T=w!==void 0;return N?(w||a.getState().nodes).filter(k=>{const A=a.getState().nodeLookup.get(k.id);if(A&&!E&&(k.id===y.id||!A.internals.positionAbsolute))return!1;const S=hl(T?k:A),C=Do(S,N);return b&&C>0||C>=S.width*S.height||C>=N.width*N.height}):[]},isNodeIntersecting:(y,b,w=!0)=>{const N=Fg(y)?y:g(y);if(!N)return!1;const T=Do(N,b);return w&&T>0||T>=b.width*b.height||T>=N.width*N.height},updateNode:p,updateNodeData:(y,b,w={replace:!1})=>{p(y,E=>{const N=typeof b=="function"?b(E):b;return w.replace?{...E,data:N}:{...E,data:{...E.data,...N}}},w)},updateEdge:x,updateEdgeData:(y,b,w={replace:!1})=>{x(y,E=>{const N=typeof b=="function"?b(E):b;return w.replace?{...E,data:N}:{...E,data:{...E.data,...N}}},w)},getNodesBounds:y=>{const{nodeLookup:b,nodeOrigin:w}=a.getState();return qC(y,{nodeLookup:b,nodeOrigin:w})},getHandleConnections:({type:y,id:b,nodeId:w})=>Array.from(a.getState().connectionLookup.get(`${w}-${y}${b?`-${b}`:""}`)?.values()??[]),getNodeConnections:({type:y,handleId:b,nodeId:w})=>Array.from(a.getState().connectionLookup.get(`${w}${y?b?`-${y}-${b}`:`-${y}`:""}`)?.values()??[]),fitView:async y=>{const b=a.getState().fitViewResolver??KC();return a.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:b}),l.nodeQueue.push(w=>[...w]),b.promise}}},[]);return j.useMemo(()=>({...s,...t,viewportInitialized:o}),[o])}const Cy=t=>t.selected,w5=typeof window<"u"?window:void 0;function S5({deleteKeyCode:t,multiSelectionKeyCode:a}){const l=Ke(),{deleteElements:o}=bh(),s=Lo(t,{actInsideInputWithModifier:!1}),c=Lo(a,{target:w5});j.useEffect(()=>{if(s){const{edges:f,nodes:h}=l.getState();o({nodes:h.filter(Cy),edges:f.filter(Cy)}),l.setState({nodesSelectionActive:!1})}},[s]),j.useEffect(()=>{l.setState({multiSelectionActive:c})},[c])}function E5(t){const a=Ke();j.useEffect(()=>{const l=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const o=ph(t.current);(o.height===0||o.width===0)&&a.getState().onError?.("004",wn.error004()),a.setState({width:o.width||500,height:o.height||500})};if(t.current){l(),window.addEventListener("resize",l);const o=new ResizeObserver(()=>l());return o.observe(t.current),()=>{window.removeEventListener("resize",l),o&&t.current&&o.unobserve(t.current)}}},[])}const Ec={position:"absolute",width:"100%",height:"100%",top:0,left:0},N5=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function _5({onPaneContextMenu:t,zoomOnScroll:a=!0,zoomOnPinch:l=!0,panOnScroll:o=!1,panOnScrollSpeed:s=.5,panOnScrollMode:c=ci.Free,zoomOnDoubleClick:f=!0,panOnDrag:h=!0,defaultViewport:g,translateExtent:p,minZoom:x,maxZoom:y,zoomActivationKeyCode:b,preventScrolling:w=!0,children:E,noWheelClassName:N,noPanClassName:T,onViewportChange:k,isControlledViewport:A,paneClickDistance:S,selectionOnDrag:C}){const D=Ke(),z=j.useRef(null),{userSelectionActive:O,lib:$,connectionInProgress:G}=Re(N5,Qe),ee=Lo(b),Y=j.useRef();E5(z);const Z=j.useCallback(ie=>{k?.({x:ie[0],y:ie[1],zoom:ie[2]}),A||D.setState({transform:ie})},[k,A]);return j.useEffect(()=>{if(z.current){Y.current=A4({domNode:z.current,minZoom:x,maxZoom:y,translateExtent:p,viewport:g,onDraggingChange:M=>D.setState({paneDragging:M}),onPanZoomStart:(M,B)=>{const{onViewportChangeStart:V,onMoveStart:K}=D.getState();K?.(M,B),V?.(B)},onPanZoom:(M,B)=>{const{onViewportChange:V,onMove:K}=D.getState();K?.(M,B),V?.(B)},onPanZoomEnd:(M,B)=>{const{onViewportChangeEnd:V,onMoveEnd:K}=D.getState();K?.(M,B),V?.(B)}});const{x:ie,y:H,zoom:Q}=Y.current.getViewport();return D.setState({panZoom:Y.current,transform:[ie,H,Q],domNode:z.current.closest(".react-flow")}),()=>{Y.current?.destroy()}}},[]),j.useEffect(()=>{Y.current?.update({onPaneContextMenu:t,zoomOnScroll:a,zoomOnPinch:l,panOnScroll:o,panOnScrollSpeed:s,panOnScrollMode:c,zoomOnDoubleClick:f,panOnDrag:h,zoomActivationKeyPressed:ee,preventScrolling:w,noPanClassName:T,userSelectionActive:O,noWheelClassName:N,lib:$,onTransformChange:Z,connectionInProgress:G,selectionOnDrag:C,paneClickDistance:S})},[t,a,l,o,s,c,f,h,ee,w,T,O,N,$,Z,G,C,S]),m.jsx("div",{className:"react-flow__renderer",ref:z,style:Ec,children:E})}const C5=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function T5(){const{userSelectionActive:t,userSelectionRect:a}=Re(C5,Qe);return t&&a?m.jsx("div",{className:"react-flow__selection react-flow__container",style:{width:a.width,height:a.height,transform:`translate(${a.x}px, ${a.y}px)`}}):null}const fd=(t,a)=>l=>{l.target===a.current&&t?.(l)},k5=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function j5({isSelecting:t,selectionKeyPressed:a,selectionMode:l=Oo.Full,panOnDrag:o,paneClickDistance:s,selectionOnDrag:c,onSelectionStart:f,onSelectionEnd:h,onPaneClick:g,onPaneContextMenu:p,onPaneScroll:x,onPaneMouseEnter:y,onPaneMouseMove:b,onPaneMouseLeave:w,children:E}){const N=Ke(),{userSelectionActive:T,elementsSelectable:k,dragging:A,connectionInProgress:S}=Re(k5,Qe),C=k&&(t||T),D=j.useRef(null),z=j.useRef(),O=j.useRef(new Set),$=j.useRef(new Set),G=j.useRef(!1),ee=V=>{if(G.current||S){G.current=!1;return}g?.(V),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},Y=V=>{if(Array.isArray(o)&&o?.includes(2)){V.preventDefault();return}p?.(V)},Z=x?V=>x(V):void 0,ie=V=>{G.current&&(V.stopPropagation(),G.current=!1)},H=V=>{const{domNode:K}=N.getState();if(z.current=K?.getBoundingClientRect(),!z.current)return;const ne=V.target===D.current;if(!ne&&!!V.target.closest(".nokey")||!t||!(c&&ne||a)||V.button!==0||!V.isPrimary)return;V.target?.setPointerCapture?.(V.pointerId),G.current=!1;const{x:W,y:te}=cn(V.nativeEvent,z.current);N.setState({userSelectionRect:{width:0,height:0,startX:W,startY:te,x:W,y:te}}),ne||(V.stopPropagation(),V.preventDefault())},Q=V=>{const{userSelectionRect:K,transform:ne,nodeLookup:R,edgeLookup:U,connectionLookup:W,triggerNodeChanges:te,triggerEdgeChanges:se,defaultEdgeOptions:ue,resetSelectedElements:ce}=N.getState();if(!z.current||!K)return;const{x:re,y:fe}=cn(V.nativeEvent,z.current),{startX:Ee,startY:we}=K;if(!G.current){const He=a?0:s;if(Math.hypot(re-Ee,fe-we)<=He)return;ce(),f?.(V)}G.current=!0;const ge={startX:Ee,startY:we,x:re<Ee?re:Ee,y:fe<we?fe:we,width:Math.abs(re-Ee),height:Math.abs(fe-we)},xe=O.current,Te=$.current;O.current=new Set(dh(R,ge,ne,l===Oo.Partial,!0).map(He=>He.id)),$.current=new Set;const Ue=ue?.selectable??!0;for(const He of O.current){const ut=W.get(He);if(ut)for(const{edgeId:Pt}of ut.values()){const Mt=U.get(Pt);Mt&&(Mt.selectable??Ue)&&$.current.add(Pt)}}if(!Jg(xe,O.current)){const He=ll(R,O.current,!0);te(He)}if(!Jg(Te,$.current)){const He=ll(U,$.current);se(He)}N.setState({userSelectionRect:ge,userSelectionActive:!0,nodesSelectionActive:!1})},M=V=>{V.button===0&&(V.target?.releasePointerCapture?.(V.pointerId),!T&&V.target===D.current&&N.getState().userSelectionRect&&ee?.(V),N.setState({userSelectionActive:!1,userSelectionRect:null}),G.current&&(h?.(V),N.setState({nodesSelectionActive:O.current.size>0})))},B=o===!0||Array.isArray(o)&&o.includes(0);return m.jsxs("div",{className:ot(["react-flow__pane",{draggable:B,dragging:A,selection:t}]),onClick:C?void 0:fd(ee,D),onContextMenu:fd(Y,D),onWheel:fd(Z,D),onPointerEnter:C?void 0:y,onPointerMove:C?Q:b,onPointerUp:C?M:void 0,onPointerDownCapture:C?H:void 0,onClickCapture:C?ie:void 0,onPointerLeave:w,ref:D,style:Ec,children:[E,m.jsx(T5,{})]})}function Hd({id:t,store:a,unselect:l=!1,nodeRef:o}){const{addSelectedNodes:s,unselectNodesAndEdges:c,multiSelectionActive:f,nodeLookup:h,onError:g}=a.getState(),p=h.get(t);if(!p){g?.("012",wn.error012(t));return}a.setState({nodesSelectionActive:!1}),p.selected?(l||p.selected&&f)&&(c({nodes:[p],edges:[]}),requestAnimationFrame(()=>o?.current?.blur())):s([t])}function qv({nodeRef:t,disabled:a=!1,noDragClassName:l,handleSelector:o,nodeId:s,isSelectable:c,nodeClickDistance:f}){const h=Ke(),[g,p]=j.useState(!1),x=j.useRef();return j.useEffect(()=>{x.current=g4({getStoreItems:()=>h.getState(),onNodeMouseDown:y=>{Hd({id:y,store:h,nodeRef:t})},onDragStart:()=>{p(!0)},onDragStop:()=>{p(!1)}})},[]),j.useEffect(()=>{if(a)x.current?.destroy();else if(t.current)return x.current?.update({noDragClassName:l,handleSelector:o,domNode:t.current,isSelectable:c,nodeId:s,nodeClickDistance:f}),()=>{x.current?.destroy()}},[l,o,a,c,t,s]),g}const A5=t=>a=>a.selected&&(a.draggable||t&&typeof a.draggable>"u");function Vv(){const t=Ke();return j.useCallback(l=>{const{nodeExtent:o,snapToGrid:s,snapGrid:c,nodesDraggable:f,onError:h,updateNodePositions:g,nodeLookup:p,nodeOrigin:x}=t.getState(),y=new Map,b=A5(f),w=s?c[0]:5,E=s?c[1]:5,N=l.direction.x*w*l.factor,T=l.direction.y*E*l.factor;for(const[,k]of p){if(!b(k))continue;let A={x:k.internals.positionAbsolute.x+N,y:k.internals.positionAbsolute.y+T};s&&(A=Io(A,c));const{position:S,positionAbsolute:C}=rv({nodeId:k.id,nextPosition:A,nodeLookup:p,nodeExtent:o,nodeOrigin:x,onError:h});k.position=S,k.internals.positionAbsolute=C,y.set(k.id,k)}g(y)},[])}const wh=j.createContext(null),M5=wh.Provider;wh.Consumer;const $v=()=>j.useContext(wh),R5=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),z5=(t,a,l)=>o=>{const{connectionClickStartHandle:s,connectionMode:c,connection:f}=o,{fromHandle:h,toHandle:g,isValid:p}=f,x=g?.nodeId===t&&g?.id===a&&g?.type===l;return{connectingFrom:h?.nodeId===t&&h?.id===a&&h?.type===l,connectingTo:x,clickConnecting:s?.nodeId===t&&s?.id===a&&s?.type===l,isPossibleEndHandle:c===fl.Strict?h?.type!==l:t!==h?.nodeId||a!==h?.id,connectionInProcess:!!h,clickConnectionInProcess:!!s,valid:x&&p}};function O5({type:t="source",position:a=pe.Top,isValidConnection:l,isConnectable:o=!0,isConnectableStart:s=!0,isConnectableEnd:c=!0,id:f,onConnect:h,children:g,className:p,onMouseDown:x,onTouchStart:y,...b},w){const E=f||null,N=t==="target",T=Ke(),k=$v(),{connectOnClick:A,noPanClassName:S,rfId:C}=Re(R5,Qe),{connectingFrom:D,connectingTo:z,clickConnecting:O,isPossibleEndHandle:$,connectionInProcess:G,clickConnectionInProcess:ee,valid:Y}=Re(z5(k,E,t),Qe);k||T.getState().onError?.("010",wn.error010());const Z=Q=>{const{defaultEdgeOptions:M,onConnect:B,hasDefaultEdges:V}=T.getState(),K={...M,...Q};if(V){const{edges:ne,setEdges:R}=T.getState();R(Md(K,ne))}B?.(K),h?.(K)},ie=Q=>{if(!k)return;const M=mv(Q.nativeEvent);if(s&&(M&&Q.button===0||!M)){const B=T.getState();Dd.onPointerDown(Q.nativeEvent,{handleDomNode:Q.currentTarget,autoPanOnConnect:B.autoPanOnConnect,connectionMode:B.connectionMode,connectionRadius:B.connectionRadius,domNode:B.domNode,nodeLookup:B.nodeLookup,lib:B.lib,isTarget:N,handleId:E,nodeId:k,flowId:B.rfId,panBy:B.panBy,cancelConnection:B.cancelConnection,onConnectStart:B.onConnectStart,onConnectEnd:B.onConnectEnd,updateConnection:B.updateConnection,onConnect:Z,isValidConnection:l||B.isValidConnection,getTransform:()=>T.getState().transform,getFromHandle:()=>T.getState().connection.fromHandle,autoPanSpeed:B.autoPanSpeed,dragThreshold:B.connectionDragThreshold})}M?x?.(Q):y?.(Q)},H=Q=>{const{onClickConnectStart:M,onClickConnectEnd:B,connectionClickStartHandle:V,connectionMode:K,isValidConnection:ne,lib:R,rfId:U,nodeLookup:W,connection:te}=T.getState();if(!k||!V&&!s)return;if(!V){M?.(Q.nativeEvent,{nodeId:k,handleId:E,handleType:t}),T.setState({connectionClickStartHandle:{nodeId:k,type:t,id:E}});return}const se=hv(Q.target),ue=l||ne,{connection:ce,isValid:re}=Dd.isValid(Q.nativeEvent,{handle:{nodeId:k,id:E,type:t},connectionMode:K,fromNodeId:V.nodeId,fromHandleId:V.id||null,fromType:V.type,isValidConnection:ue,flowId:U,doc:se,lib:R,nodeLookup:W});re&&ce&&Z(ce);const fe=structuredClone(te);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,B?.(Q,fe),T.setState({connectionClickStartHandle:null})};return m.jsx("div",{"data-handleid":E,"data-nodeid":k,"data-handlepos":a,"data-id":`${C}-${k}-${E}-${t}`,className:ot(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",S,p,{source:!N,target:N,connectable:o,connectablestart:s,connectableend:c,clickconnecting:O,connectingfrom:D,connectingto:z,valid:Y,connectionindicator:o&&(!G||$)&&(G||ee?c:s)}]),onMouseDown:ie,onTouchStart:ie,onClick:A?H:void 0,ref:w,...b,children:g})}const gl=j.memo(Bv(O5));function D5({data:t,isConnectable:a,sourcePosition:l=pe.Bottom}){return m.jsxs(m.Fragment,{children:[t?.label,m.jsx(gl,{type:"source",position:l,isConnectable:a})]})}function H5({data:t,isConnectable:a,targetPosition:l=pe.Top,sourcePosition:o=pe.Bottom}){return m.jsxs(m.Fragment,{children:[m.jsx(gl,{type:"target",position:l,isConnectable:a}),t?.label,m.jsx(gl,{type:"source",position:o,isConnectable:a})]})}function L5(){return null}function B5({data:t,isConnectable:a,targetPosition:l=pe.Top}){return m.jsxs(m.Fragment,{children:[m.jsx(gl,{type:"target",position:l,isConnectable:a}),t?.label]})}const rc={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},Ty={input:D5,default:H5,output:B5,group:L5};function U5(t){return t.internals.handleBounds===void 0?{width:t.width??t.initialWidth??t.style?.width,height:t.height??t.initialHeight??t.style?.height}:{width:t.width??t.style?.width,height:t.height??t.style?.height}}const q5=t=>{const{width:a,height:l,x:o,y:s}=Ko(t.nodeLookup,{filter:c=>!!c.selected});return{width:sn(a)?a:null,height:sn(l)?l:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${o}px,${s}px)`}};function V5({onSelectionContextMenu:t,noPanClassName:a,disableKeyboardA11y:l}){const o=Ke(),{width:s,height:c,transformString:f,userSelectionActive:h}=Re(q5,Qe),g=Vv(),p=j.useRef(null);if(j.useEffect(()=>{l||p.current?.focus({preventScroll:!0})},[l]),qv({nodeRef:p}),h||!s||!c)return null;const x=t?b=>{const w=o.getState().nodes.filter(E=>E.selected);t(b,w)}:void 0,y=b=>{Object.prototype.hasOwnProperty.call(rc,b.key)&&(b.preventDefault(),g({direction:rc[b.key],factor:b.shiftKey?4:1}))};return m.jsx("div",{className:ot(["react-flow__nodesselection","react-flow__container",a]),style:{transform:f},children:m.jsx("div",{ref:p,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:l?void 0:-1,onKeyDown:l?void 0:y,style:{width:s,height:c}})})}const ky=typeof window<"u"?window:void 0,$5=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function Yv({children:t,onPaneClick:a,onPaneMouseEnter:l,onPaneMouseMove:o,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:f,paneClickDistance:h,deleteKeyCode:g,selectionKeyCode:p,selectionOnDrag:x,selectionMode:y,onSelectionStart:b,onSelectionEnd:w,multiSelectionKeyCode:E,panActivationKeyCode:N,zoomActivationKeyCode:T,elementsSelectable:k,zoomOnScroll:A,zoomOnPinch:S,panOnScroll:C,panOnScrollSpeed:D,panOnScrollMode:z,zoomOnDoubleClick:O,panOnDrag:$,defaultViewport:G,translateExtent:ee,minZoom:Y,maxZoom:Z,preventScrolling:ie,onSelectionContextMenu:H,noWheelClassName:Q,noPanClassName:M,disableKeyboardA11y:B,onViewportChange:V,isControlledViewport:K}){const{nodesSelectionActive:ne,userSelectionActive:R}=Re($5,Qe),U=Lo(p,{target:ky}),W=Lo(N,{target:ky}),te=W||$,se=W||C,ue=x&&te!==!0,ce=U||R||ue;return S5({deleteKeyCode:g,multiSelectionKeyCode:E}),m.jsx(_5,{onPaneContextMenu:c,elementsSelectable:k,zoomOnScroll:A,zoomOnPinch:S,panOnScroll:se,panOnScrollSpeed:D,panOnScrollMode:z,zoomOnDoubleClick:O,panOnDrag:!U&&te,defaultViewport:G,translateExtent:ee,minZoom:Y,maxZoom:Z,zoomActivationKeyCode:T,preventScrolling:ie,noWheelClassName:Q,noPanClassName:M,onViewportChange:V,isControlledViewport:K,paneClickDistance:h,selectionOnDrag:ue,children:m.jsxs(j5,{onSelectionStart:b,onSelectionEnd:w,onPaneClick:a,onPaneMouseEnter:l,onPaneMouseMove:o,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:f,panOnDrag:te,isSelecting:!!ce,selectionMode:y,selectionKeyPressed:U,paneClickDistance:h,selectionOnDrag:ue,children:[t,ne&&m.jsx(V5,{onSelectionContextMenu:H,noPanClassName:M,disableKeyboardA11y:B})]})})}Yv.displayName="FlowRenderer";const Y5=j.memo(Yv),X5=t=>a=>t?dh(a.nodeLookup,{x:0,y:0,width:a.width,height:a.height},a.transform,!0).map(l=>l.id):Array.from(a.nodeLookup.keys());function G5(t){return Re(j.useCallback(X5(t),[t]),Qe)}const Z5=t=>t.updateNodeInternals;function Q5(){const t=Re(Z5),[a]=j.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(l=>{const o=new Map;l.forEach(s=>{const c=s.target.getAttribute("data-id");o.set(c,{id:c,nodeElement:s.target,force:!0})}),t(o)}));return j.useEffect(()=>()=>{a?.disconnect()},[a]),a}function K5({node:t,nodeType:a,hasDimensions:l,resizeObserver:o}){const s=Ke(),c=j.useRef(null),f=j.useRef(null),h=j.useRef(t.sourcePosition),g=j.useRef(t.targetPosition),p=j.useRef(a),x=l&&!!t.internals.handleBounds;return j.useEffect(()=>{c.current&&!t.hidden&&(!x||f.current!==c.current)&&(f.current&&o?.unobserve(f.current),o?.observe(c.current),f.current=c.current)},[x,t.hidden]),j.useEffect(()=>()=>{f.current&&(o?.unobserve(f.current),f.current=null)},[]),j.useEffect(()=>{if(c.current){const y=p.current!==a,b=h.current!==t.sourcePosition,w=g.current!==t.targetPosition;(y||b||w)&&(p.current=a,h.current=t.sourcePosition,g.current=t.targetPosition,s.getState().updateNodeInternals(new Map([[t.id,{id:t.id,nodeElement:c.current,force:!0}]])))}},[t.id,a,t.sourcePosition,t.targetPosition]),c}function I5({id:t,onClick:a,onMouseEnter:l,onMouseMove:o,onMouseLeave:s,onContextMenu:c,onDoubleClick:f,nodesDraggable:h,elementsSelectable:g,nodesConnectable:p,nodesFocusable:x,resizeObserver:y,noDragClassName:b,noPanClassName:w,disableKeyboardA11y:E,rfId:N,nodeTypes:T,nodeClickDistance:k,onError:A}){const{node:S,internals:C,isParent:D}=Re(re=>{const fe=re.nodeLookup.get(t),Ee=re.parentLookup.has(t);return{node:fe,internals:fe.internals,isParent:Ee}},Qe);let z=S.type||"default",O=T?.[z]||Ty[z];O===void 0&&(A?.("003",wn.error003(z)),z="default",O=T?.default||Ty.default);const $=!!(S.draggable||h&&typeof S.draggable>"u"),G=!!(S.selectable||g&&typeof S.selectable>"u"),ee=!!(S.connectable||p&&typeof S.connectable>"u"),Y=!!(S.focusable||x&&typeof S.focusable>"u"),Z=Ke(),ie=fv(S),H=K5({node:S,nodeType:z,hasDimensions:ie,resizeObserver:y}),Q=qv({nodeRef:H,disabled:S.hidden||!$,noDragClassName:b,handleSelector:S.dragHandle,nodeId:t,isSelectable:G,nodeClickDistance:k}),M=Vv();if(S.hidden)return null;const B=ea(S),V=U5(S),K=G||$||a||l||o||s,ne=l?re=>l(re,{...C.userNode}):void 0,R=o?re=>o(re,{...C.userNode}):void 0,U=s?re=>s(re,{...C.userNode}):void 0,W=c?re=>c(re,{...C.userNode}):void 0,te=f?re=>f(re,{...C.userNode}):void 0,se=re=>{const{selectNodesOnDrag:fe,nodeDragThreshold:Ee}=Z.getState();G&&(!fe||!$||Ee>0)&&Hd({id:t,store:Z,nodeRef:H}),a&&a(re,{...C.userNode})},ue=re=>{if(!(pv(re.nativeEvent)||E)){if(nv.includes(re.key)&&G){const fe=re.key==="Escape";Hd({id:t,store:Z,unselect:fe,nodeRef:H})}else if($&&S.selected&&Object.prototype.hasOwnProperty.call(rc,re.key)){re.preventDefault();const{ariaLabelConfig:fe}=Z.getState();Z.setState({ariaLiveMessage:fe["node.a11yDescription.ariaLiveMessage"]({direction:re.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),M({direction:rc[re.key],factor:re.shiftKey?4:1})}}},ce=()=>{if(E||!H.current?.matches(":focus-visible"))return;const{transform:re,width:fe,height:Ee,autoPanOnNodeFocus:we,setCenter:ge}=Z.getState();if(!we)return;dh(new Map([[t,S]]),{x:0,y:0,width:fe,height:Ee},re,!0).length>0||ge(S.position.x+B.width/2,S.position.y+B.height/2,{zoom:re[2]})};return m.jsx("div",{className:ot(["react-flow__node",`react-flow__node-${z}`,{[w]:$},S.className,{selected:S.selected,selectable:G,parent:D,draggable:$,dragging:Q}]),ref:H,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:K?"all":"none",visibility:ie?"visible":"hidden",...S.style,...V},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:ne,onMouseMove:R,onMouseLeave:U,onContextMenu:W,onClick:se,onDoubleClick:te,onKeyDown:Y?ue:void 0,tabIndex:Y?0:void 0,onFocus:Y?ce:void 0,role:S.ariaRole??(Y?"group":void 0),"aria-roledescription":"node","aria-describedby":E?void 0:`${zv}-${N}`,"aria-label":S.ariaLabel,...S.domAttributes,children:m.jsx(M5,{value:t,children:m.jsx(O,{id:t,data:S.data,type:z,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:S.selected??!1,selectable:G,draggable:$,deletable:S.deletable??!0,isConnectable:ee,sourcePosition:S.sourcePosition,targetPosition:S.targetPosition,dragging:Q,dragHandle:S.dragHandle,zIndex:C.z,parentId:S.parentId,...B})})})}var F5=j.memo(I5);const J5=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function Xv(t){const{nodesDraggable:a,nodesConnectable:l,nodesFocusable:o,elementsSelectable:s,onError:c}=Re(J5,Qe),f=G5(t.onlyRenderVisibleElements),h=Q5();return m.jsx("div",{className:"react-flow__nodes",style:Ec,children:f.map(g=>m.jsx(F5,{id:g,nodeTypes:t.nodeTypes,nodeExtent:t.nodeExtent,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,resizeObserver:h,nodesDraggable:a,nodesConnectable:l,nodesFocusable:o,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:c},g))})}Xv.displayName="NodeRenderer";const P5=j.memo(Xv);function W5(t){return Re(j.useCallback(l=>{if(!t)return l.edges.map(s=>s.id);const o=[];if(l.width&&l.height)for(const s of l.edges){const c=l.nodeLookup.get(s.source),f=l.nodeLookup.get(s.target);c&&f&&PC({sourceNode:c,targetNode:f,width:l.width,height:l.height,transform:l.transform})&&o.push(s.id)}return o},[t]),Qe)}const eT=({color:t="none",strokeWidth:a=1})=>{const l={strokeWidth:a,...t&&{stroke:t}};return m.jsx("polyline",{className:"arrow",style:l,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},tT=({color:t="none",strokeWidth:a=1})=>{const l={strokeWidth:a,...t&&{stroke:t,fill:t}};return m.jsx("polyline",{className:"arrowclosed",style:l,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},jy={[ic.Arrow]:eT,[ic.ArrowClosed]:tT};function nT(t){const a=Ke();return j.useMemo(()=>Object.prototype.hasOwnProperty.call(jy,t)?jy[t]:(a.getState().onError?.("009",wn.error009(t)),null),[t])}const aT=({id:t,type:a,color:l,width:o=12.5,height:s=12.5,markerUnits:c="strokeWidth",strokeWidth:f,orient:h="auto-start-reverse"})=>{const g=nT(a);return g?m.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${o}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:h,refX:"0",refY:"0",children:m.jsx(g,{color:l,strokeWidth:f})}):null},Gv=({defaultColor:t,rfId:a})=>{const l=Re(c=>c.edges),o=Re(c=>c.defaultEdgeOptions),s=j.useMemo(()=>l4(l,{id:a,defaultColor:t,defaultMarkerStart:o?.markerStart,defaultMarkerEnd:o?.markerEnd}),[l,o,a,t]);return s.length?m.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:m.jsx("defs",{children:s.map(c=>m.jsx(aT,{id:c.id,type:c.type,color:c.color,width:c.width,height:c.height,markerUnits:c.markerUnits,strokeWidth:c.strokeWidth,orient:c.orient},c.id))})}):null};Gv.displayName="MarkerDefinitions";var iT=j.memo(Gv);function Zv({x:t,y:a,label:l,labelStyle:o,labelShowBg:s=!0,labelBgStyle:c,labelBgPadding:f=[2,4],labelBgBorderRadius:h=2,children:g,className:p,...x}){const[y,b]=j.useState({x:1,y:0,width:0,height:0}),w=ot(["react-flow__edge-textwrapper",p]),E=j.useRef(null);return j.useEffect(()=>{if(E.current){const N=E.current.getBBox();b({x:N.x,y:N.y,width:N.width,height:N.height})}},[l]),l?m.jsxs("g",{transform:`translate(${t-y.width/2} ${a-y.height/2})`,className:w,visibility:y.width?"visible":"hidden",...x,children:[s&&m.jsx("rect",{width:y.width+2*f[0],x:-f[0],y:-f[1],height:y.height+2*f[1],className:"react-flow__edge-textbg",style:c,rx:h,ry:h}),m.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:E,style:o,children:l}),g]}):null}Zv.displayName="EdgeText";const lT=j.memo(Zv);function Nc({path:t,labelX:a,labelY:l,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:g,interactionWidth:p=20,...x}){return m.jsxs(m.Fragment,{children:[m.jsx("path",{...x,d:t,fill:"none",className:ot(["react-flow__edge-path",x.className])}),p?m.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:p,className:"react-flow__edge-interaction"}):null,o&&sn(a)&&sn(l)?m.jsx(lT,{x:a,y:l,label:o,labelStyle:s,labelShowBg:c,labelBgStyle:f,labelBgPadding:h,labelBgBorderRadius:g}):null]})}function Ay({pos:t,x1:a,y1:l,x2:o,y2:s}){return t===pe.Left||t===pe.Right?[.5*(a+o),l]:[a,.5*(l+s)]}function Qv({sourceX:t,sourceY:a,sourcePosition:l=pe.Bottom,targetX:o,targetY:s,targetPosition:c=pe.Top}){const[f,h]=Ay({pos:l,x1:t,y1:a,x2:o,y2:s}),[g,p]=Ay({pos:c,x1:o,y1:s,x2:t,y2:a}),[x,y,b,w]=gv({sourceX:t,sourceY:a,targetX:o,targetY:s,sourceControlX:f,sourceControlY:h,targetControlX:g,targetControlY:p});return[`M${t},${a} C${f},${h} ${g},${p} ${o},${s}`,x,y,b,w]}function Kv(t){return j.memo(({id:a,sourceX:l,sourceY:o,targetX:s,targetY:c,sourcePosition:f,targetPosition:h,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:b,labelBgBorderRadius:w,style:E,markerEnd:N,markerStart:T,interactionWidth:k})=>{const[A,S,C]=Qv({sourceX:l,sourceY:o,sourcePosition:f,targetX:s,targetY:c,targetPosition:h}),D=t.isInternal?void 0:a;return m.jsx(Nc,{id:D,path:A,labelX:S,labelY:C,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:b,labelBgBorderRadius:w,style:E,markerEnd:N,markerStart:T,interactionWidth:k})})}const oT=Kv({isInternal:!1}),Iv=Kv({isInternal:!0});oT.displayName="SimpleBezierEdge";Iv.displayName="SimpleBezierEdgeInternal";function Fv(t){return j.memo(({id:a,sourceX:l,sourceY:o,targetX:s,targetY:c,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:b,sourcePosition:w=pe.Bottom,targetPosition:E=pe.Top,markerEnd:N,markerStart:T,pathOptions:k,interactionWidth:A})=>{const[S,C,D]=Rd({sourceX:l,sourceY:o,sourcePosition:w,targetX:s,targetY:c,targetPosition:E,borderRadius:k?.borderRadius,offset:k?.offset,stepPosition:k?.stepPosition}),z=t.isInternal?void 0:a;return m.jsx(Nc,{id:z,path:S,labelX:C,labelY:D,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:b,markerEnd:N,markerStart:T,interactionWidth:A})})}const Jv=Fv({isInternal:!1}),Pv=Fv({isInternal:!0});Jv.displayName="SmoothStepEdge";Pv.displayName="SmoothStepEdgeInternal";function Wv(t){return j.memo(({id:a,...l})=>{const o=t.isInternal?void 0:a;return m.jsx(Jv,{...l,id:o,pathOptions:j.useMemo(()=>({borderRadius:0,offset:l.pathOptions?.offset}),[l.pathOptions?.offset])})})}const rT=Wv({isInternal:!1}),e1=Wv({isInternal:!0});rT.displayName="StepEdge";e1.displayName="StepEdgeInternal";function t1(t){return j.memo(({id:a,sourceX:l,sourceY:o,targetX:s,targetY:c,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:b,markerEnd:w,markerStart:E,interactionWidth:N})=>{const[T,k,A]=vv({sourceX:l,sourceY:o,targetX:s,targetY:c}),S=t.isInternal?void 0:a;return m.jsx(Nc,{id:S,path:T,labelX:k,labelY:A,label:f,labelStyle:h,labelShowBg:g,labelBgStyle:p,labelBgPadding:x,labelBgBorderRadius:y,style:b,markerEnd:w,markerStart:E,interactionWidth:N})})}const sT=t1({isInternal:!1}),n1=t1({isInternal:!0});sT.displayName="StraightEdge";n1.displayName="StraightEdgeInternal";function a1(t){return j.memo(({id:a,sourceX:l,sourceY:o,targetX:s,targetY:c,sourcePosition:f=pe.Bottom,targetPosition:h=pe.Top,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:b,labelBgBorderRadius:w,style:E,markerEnd:N,markerStart:T,pathOptions:k,interactionWidth:A})=>{const[S,C,D]=yv({sourceX:l,sourceY:o,sourcePosition:f,targetX:s,targetY:c,targetPosition:h,curvature:k?.curvature}),z=t.isInternal?void 0:a;return m.jsx(Nc,{id:z,path:S,labelX:C,labelY:D,label:g,labelStyle:p,labelShowBg:x,labelBgStyle:y,labelBgPadding:b,labelBgBorderRadius:w,style:E,markerEnd:N,markerStart:T,interactionWidth:A})})}const cT=a1({isInternal:!1}),i1=a1({isInternal:!0});cT.displayName="BezierEdge";i1.displayName="BezierEdgeInternal";const My={default:i1,straight:n1,step:e1,smoothstep:Pv,simplebezier:Iv},Ry={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},uT=(t,a,l)=>l===pe.Left?t-a:l===pe.Right?t+a:t,fT=(t,a,l)=>l===pe.Top?t-a:l===pe.Bottom?t+a:t,zy="react-flow__edgeupdater";function Oy({position:t,centerX:a,centerY:l,radius:o=10,onMouseDown:s,onMouseEnter:c,onMouseOut:f,type:h}){return m.jsx("circle",{onMouseDown:s,onMouseEnter:c,onMouseOut:f,className:ot([zy,`${zy}-${h}`]),cx:uT(a,o,t),cy:fT(l,o,t),r:o,stroke:"transparent",fill:"transparent"})}function dT({isReconnectable:t,reconnectRadius:a,edge:l,sourceX:o,sourceY:s,targetX:c,targetY:f,sourcePosition:h,targetPosition:g,onReconnect:p,onReconnectStart:x,onReconnectEnd:y,setReconnecting:b,setUpdateHover:w}){const E=Ke(),N=(C,D)=>{if(C.button!==0)return;const{autoPanOnConnect:z,domNode:O,isValidConnection:$,connectionMode:G,connectionRadius:ee,lib:Y,onConnectStart:Z,onConnectEnd:ie,cancelConnection:H,nodeLookup:Q,rfId:M,panBy:B,updateConnection:V}=E.getState(),K=D.type==="target",ne=(W,te)=>{b(!1),y?.(W,l,D.type,te)},R=W=>p?.(l,W),U=(W,te)=>{b(!0),x?.(C,l,D.type),Z?.(W,te)};Dd.onPointerDown(C.nativeEvent,{autoPanOnConnect:z,connectionMode:G,connectionRadius:ee,domNode:O,handleId:D.id,nodeId:D.nodeId,nodeLookup:Q,isTarget:K,edgeUpdaterType:D.type,lib:Y,flowId:M,cancelConnection:H,panBy:B,isValidConnection:$,onConnect:R,onConnectStart:U,onConnectEnd:ie,onReconnectEnd:ne,updateConnection:V,getTransform:()=>E.getState().transform,getFromHandle:()=>E.getState().connection.fromHandle,dragThreshold:E.getState().connectionDragThreshold,handleDomNode:C.currentTarget})},T=C=>N(C,{nodeId:l.target,id:l.targetHandle??null,type:"target"}),k=C=>N(C,{nodeId:l.source,id:l.sourceHandle??null,type:"source"}),A=()=>w(!0),S=()=>w(!1);return m.jsxs(m.Fragment,{children:[(t===!0||t==="source")&&m.jsx(Oy,{position:h,centerX:o,centerY:s,radius:a,onMouseDown:T,onMouseEnter:A,onMouseOut:S,type:"source"}),(t===!0||t==="target")&&m.jsx(Oy,{position:g,centerX:c,centerY:f,radius:a,onMouseDown:k,onMouseEnter:A,onMouseOut:S,type:"target"})]})}function hT({id:t,edgesFocusable:a,edgesReconnectable:l,elementsSelectable:o,onClick:s,onDoubleClick:c,onContextMenu:f,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,reconnectRadius:x,onReconnect:y,onReconnectStart:b,onReconnectEnd:w,rfId:E,edgeTypes:N,noPanClassName:T,onError:k,disableKeyboardA11y:A}){let S=Re(ge=>ge.edgeLookup.get(t));const C=Re(ge=>ge.defaultEdgeOptions);S=C?{...C,...S}:S;let D=S.type||"default",z=N?.[D]||My[D];z===void 0&&(k?.("011",wn.error011(D)),D="default",z=N?.default||My.default);const O=!!(S.focusable||a&&typeof S.focusable>"u"),$=typeof y<"u"&&(S.reconnectable||l&&typeof S.reconnectable>"u"),G=!!(S.selectable||o&&typeof S.selectable>"u"),ee=j.useRef(null),[Y,Z]=j.useState(!1),[ie,H]=j.useState(!1),Q=Ke(),{zIndex:M,sourceX:B,sourceY:V,targetX:K,targetY:ne,sourcePosition:R,targetPosition:U}=Re(j.useCallback(ge=>{const xe=ge.nodeLookup.get(S.source),Te=ge.nodeLookup.get(S.target);if(!xe||!Te)return{zIndex:S.zIndex,...Ry};const Ue=i4({id:t,sourceNode:xe,targetNode:Te,sourceHandle:S.sourceHandle||null,targetHandle:S.targetHandle||null,connectionMode:ge.connectionMode,onError:k});return{zIndex:JC({selected:S.selected,zIndex:S.zIndex,sourceNode:xe,targetNode:Te,elevateOnSelect:ge.elevateEdgesOnSelect,zIndexMode:ge.zIndexMode}),...Ue||Ry}},[S.source,S.target,S.sourceHandle,S.targetHandle,S.selected,S.zIndex]),Qe),W=j.useMemo(()=>S.markerStart?`url('#${zd(S.markerStart,E)}')`:void 0,[S.markerStart,E]),te=j.useMemo(()=>S.markerEnd?`url('#${zd(S.markerEnd,E)}')`:void 0,[S.markerEnd,E]);if(S.hidden||B===null||V===null||K===null||ne===null)return null;const se=ge=>{const{addSelectedEdges:xe,unselectNodesAndEdges:Te,multiSelectionActive:Ue}=Q.getState();G&&(Q.setState({nodesSelectionActive:!1}),S.selected&&Ue?(Te({nodes:[],edges:[S]}),ee.current?.blur()):xe([t])),s&&s(ge,S)},ue=c?ge=>{c(ge,{...S})}:void 0,ce=f?ge=>{f(ge,{...S})}:void 0,re=h?ge=>{h(ge,{...S})}:void 0,fe=g?ge=>{g(ge,{...S})}:void 0,Ee=p?ge=>{p(ge,{...S})}:void 0,we=ge=>{if(!A&&nv.includes(ge.key)&&G){const{unselectNodesAndEdges:xe,addSelectedEdges:Te}=Q.getState();ge.key==="Escape"?(ee.current?.blur(),xe({edges:[S]})):Te([t])}};return m.jsx("svg",{style:{zIndex:M},children:m.jsxs("g",{className:ot(["react-flow__edge",`react-flow__edge-${D}`,S.className,T,{selected:S.selected,animated:S.animated,inactive:!G&&!s,updating:Y,selectable:G}]),onClick:se,onDoubleClick:ue,onContextMenu:ce,onMouseEnter:re,onMouseMove:fe,onMouseLeave:Ee,onKeyDown:O?we:void 0,tabIndex:O?0:void 0,role:S.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":S.ariaLabel===null?void 0:S.ariaLabel||`Edge from ${S.source} to ${S.target}`,"aria-describedby":O?`${Ov}-${E}`:void 0,ref:ee,...S.domAttributes,children:[!ie&&m.jsx(z,{id:t,source:S.source,target:S.target,type:S.type,selected:S.selected,animated:S.animated,selectable:G,deletable:S.deletable??!0,label:S.label,labelStyle:S.labelStyle,labelShowBg:S.labelShowBg,labelBgStyle:S.labelBgStyle,labelBgPadding:S.labelBgPadding,labelBgBorderRadius:S.labelBgBorderRadius,sourceX:B,sourceY:V,targetX:K,targetY:ne,sourcePosition:R,targetPosition:U,data:S.data,style:S.style,sourceHandleId:S.sourceHandle,targetHandleId:S.targetHandle,markerStart:W,markerEnd:te,pathOptions:"pathOptions"in S?S.pathOptions:void 0,interactionWidth:S.interactionWidth}),$&&m.jsx(dT,{edge:S,isReconnectable:$,reconnectRadius:x,onReconnect:y,onReconnectStart:b,onReconnectEnd:w,sourceX:B,sourceY:V,targetX:K,targetY:ne,sourcePosition:R,targetPosition:U,setUpdateHover:Z,setReconnecting:H})]})})}var pT=j.memo(hT);const mT=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function l1({defaultMarkerColor:t,onlyRenderVisibleElements:a,rfId:l,edgeTypes:o,noPanClassName:s,onReconnect:c,onEdgeContextMenu:f,onEdgeMouseEnter:h,onEdgeMouseMove:g,onEdgeMouseLeave:p,onEdgeClick:x,reconnectRadius:y,onEdgeDoubleClick:b,onReconnectStart:w,onReconnectEnd:E,disableKeyboardA11y:N}){const{edgesFocusable:T,edgesReconnectable:k,elementsSelectable:A,onError:S}=Re(mT,Qe),C=W5(a);return m.jsxs("div",{className:"react-flow__edges",children:[m.jsx(iT,{defaultColor:t,rfId:l}),C.map(D=>m.jsx(pT,{id:D,edgesFocusable:T,edgesReconnectable:k,elementsSelectable:A,noPanClassName:s,onReconnect:c,onContextMenu:f,onMouseEnter:h,onMouseMove:g,onMouseLeave:p,onClick:x,reconnectRadius:y,onDoubleClick:b,onReconnectStart:w,onReconnectEnd:E,rfId:l,onError:S,edgeTypes:o,disableKeyboardA11y:N},D))]})}l1.displayName="EdgeRenderer";const gT=j.memo(l1),yT=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function xT({children:t}){const a=Re(yT);return m.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:t})}function vT(t){const a=bh(),l=j.useRef(!1);j.useEffect(()=>{!l.current&&a.viewportInitialized&&t&&(setTimeout(()=>t(a),1),l.current=!0)},[t,a.viewportInitialized])}const bT=t=>t.panZoom?.syncViewport;function wT(t){const a=Re(bT),l=Ke();return j.useEffect(()=>{t&&(a?.(t),l.setState({transform:[t.x,t.y,t.zoom]}))},[t,a]),null}function ST(t){return t.connection.inProgress?{...t.connection,to:Fo(t.connection.to,t.transform)}:{...t.connection}}function ET(t){return ST}function NT(t){const a=ET();return Re(a,Qe)}const _T=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function CT({containerStyle:t,style:a,type:l,component:o}){const{nodesConnectable:s,width:c,height:f,isValid:h,inProgress:g}=Re(_T,Qe);return!(c&&s&&g)?null:m.jsx("svg",{style:t,width:c,height:f,className:"react-flow__connectionline react-flow__container",children:m.jsx("g",{className:ot(["react-flow__connection",lv(h)]),children:m.jsx(o1,{style:a,type:l,CustomComponent:o,isValid:h})})})}const o1=({style:t,type:a=Ra.Bezier,CustomComponent:l,isValid:o})=>{const{inProgress:s,from:c,fromNode:f,fromHandle:h,fromPosition:g,to:p,toNode:x,toHandle:y,toPosition:b,pointer:w}=NT();if(!s)return;if(l)return m.jsx(l,{connectionLineType:a,connectionLineStyle:t,fromNode:f,fromHandle:h,fromX:c.x,fromY:c.y,toX:p.x,toY:p.y,fromPosition:g,toPosition:b,connectionStatus:lv(o),toNode:x,toHandle:y,pointer:w});let E="";const N={sourceX:c.x,sourceY:c.y,sourcePosition:g,targetX:p.x,targetY:p.y,targetPosition:b};switch(a){case Ra.Bezier:[E]=yv(N);break;case Ra.SimpleBezier:[E]=Qv(N);break;case Ra.Step:[E]=Rd({...N,borderRadius:0});break;case Ra.SmoothStep:[E]=Rd(N);break;default:[E]=vv(N)}return m.jsx("path",{d:E,fill:"none",className:"react-flow__connection-path",style:t})};o1.displayName="ConnectionLine";const TT={};function Dy(t=TT){j.useRef(t),Ke(),j.useEffect(()=>{},[t])}function kT(){Ke(),j.useRef(!1),j.useEffect(()=>{},[])}function r1({nodeTypes:t,edgeTypes:a,onInit:l,onNodeClick:o,onEdgeClick:s,onNodeDoubleClick:c,onEdgeDoubleClick:f,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:x,onSelectionContextMenu:y,onSelectionStart:b,onSelectionEnd:w,connectionLineType:E,connectionLineStyle:N,connectionLineComponent:T,connectionLineContainerStyle:k,selectionKeyCode:A,selectionOnDrag:S,selectionMode:C,multiSelectionKeyCode:D,panActivationKeyCode:z,zoomActivationKeyCode:O,deleteKeyCode:$,onlyRenderVisibleElements:G,elementsSelectable:ee,defaultViewport:Y,translateExtent:Z,minZoom:ie,maxZoom:H,preventScrolling:Q,defaultMarkerColor:M,zoomOnScroll:B,zoomOnPinch:V,panOnScroll:K,panOnScrollSpeed:ne,panOnScrollMode:R,zoomOnDoubleClick:U,panOnDrag:W,onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:ue,onPaneMouseLeave:ce,onPaneScroll:re,onPaneContextMenu:fe,paneClickDistance:Ee,nodeClickDistance:we,onEdgeContextMenu:ge,onEdgeMouseEnter:xe,onEdgeMouseMove:Te,onEdgeMouseLeave:Ue,reconnectRadius:He,onReconnect:ut,onReconnectStart:Pt,onReconnectEnd:Mt,noDragClassName:Wt,noWheelClassName:Nn,noPanClassName:Da,disableKeyboardA11y:Ha,nodeExtent:dt,rfId:mi,viewport:_n,onViewportChange:ta}){return Dy(t),Dy(a),kT(),vT(l),wT(_n),m.jsx(Y5,{onPaneClick:te,onPaneMouseEnter:se,onPaneMouseMove:ue,onPaneMouseLeave:ce,onPaneContextMenu:fe,onPaneScroll:re,paneClickDistance:Ee,deleteKeyCode:$,selectionKeyCode:A,selectionOnDrag:S,selectionMode:C,onSelectionStart:b,onSelectionEnd:w,multiSelectionKeyCode:D,panActivationKeyCode:z,zoomActivationKeyCode:O,elementsSelectable:ee,zoomOnScroll:B,zoomOnPinch:V,zoomOnDoubleClick:U,panOnScroll:K,panOnScrollSpeed:ne,panOnScrollMode:R,panOnDrag:W,defaultViewport:Y,translateExtent:Z,minZoom:ie,maxZoom:H,onSelectionContextMenu:y,preventScrolling:Q,noDragClassName:Wt,noWheelClassName:Nn,noPanClassName:Da,disableKeyboardA11y:Ha,onViewportChange:ta,isControlledViewport:!!_n,children:m.jsxs(xT,{children:[m.jsx(gT,{edgeTypes:a,onEdgeClick:s,onEdgeDoubleClick:f,onReconnect:ut,onReconnectStart:Pt,onReconnectEnd:Mt,onlyRenderVisibleElements:G,onEdgeContextMenu:ge,onEdgeMouseEnter:xe,onEdgeMouseMove:Te,onEdgeMouseLeave:Ue,reconnectRadius:He,defaultMarkerColor:M,noPanClassName:Da,disableKeyboardA11y:Ha,rfId:mi}),m.jsx(CT,{style:N,type:E,component:T,containerStyle:k}),m.jsx("div",{className:"react-flow__edgelabel-renderer"}),m.jsx(P5,{nodeTypes:t,onNodeClick:o,onNodeDoubleClick:c,onNodeMouseEnter:h,onNodeMouseMove:g,onNodeMouseLeave:p,onNodeContextMenu:x,nodeClickDistance:we,onlyRenderVisibleElements:G,noPanClassName:Da,noDragClassName:Wt,disableKeyboardA11y:Ha,nodeExtent:dt,rfId:mi}),m.jsx("div",{className:"react-flow__viewport-portal"})]})})}r1.displayName="GraphView";const jT=j.memo(r1),Hy=({nodes:t,edges:a,defaultNodes:l,defaultEdges:o,width:s,height:c,fitView:f,fitViewOptions:h,minZoom:g=.5,maxZoom:p=2,nodeOrigin:x,nodeExtent:y,zIndexMode:b="basic"}={})=>{const w=new Map,E=new Map,N=new Map,T=new Map,k=o??a??[],A=l??t??[],S=x??[0,0],C=y??zo;Sv(N,T,k);const D=Od(A,w,E,{nodeOrigin:S,nodeExtent:C,zIndexMode:b});let z=[0,0,1];if(f&&s&&c){const O=Ko(w,{filter:Y=>!!((Y.width||Y.initialWidth)&&(Y.height||Y.initialHeight))}),{x:$,y:G,zoom:ee}=hh(O,s,c,g,p,h?.padding??.1);z=[$,G,ee]}return{rfId:"1",width:s??0,height:c??0,transform:z,nodes:A,nodesInitialized:D,nodeLookup:w,parentLookup:E,edges:k,edgeLookup:T,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:l!==void 0,hasDefaultEdges:o!==void 0,panZoom:null,minZoom:g,maxZoom:p,translateExtent:zo,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:fl.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:S,nodeDragThreshold:1,connectionDragThreshold:1,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesReconnectable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,elevateEdgesOnSelect:!0,selectNodesOnDrag:!0,multiSelectionActive:!1,fitViewQueued:f??!1,fitViewOptions:h,fitViewResolver:null,connection:{...iv},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:GC,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:av,zIndexMode:b,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},AT=({nodes:t,edges:a,defaultNodes:l,defaultEdges:o,width:s,height:c,fitView:f,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:x,nodeExtent:y,zIndexMode:b})=>K4((w,E)=>{async function N(){const{nodeLookup:T,panZoom:k,fitViewOptions:A,fitViewResolver:S,width:C,height:D,minZoom:z,maxZoom:O}=E();k&&(await YC({nodes:T,width:C,height:D,panZoom:k,minZoom:z,maxZoom:O},A),S?.resolve(!0),w({fitViewResolver:null}))}return{...Hy({nodes:t,edges:a,width:s,height:c,fitView:f,fitViewOptions:h,minZoom:g,maxZoom:p,nodeOrigin:x,nodeExtent:y,defaultNodes:l,defaultEdges:o,zIndexMode:b}),setNodes:T=>{const{nodeLookup:k,parentLookup:A,nodeOrigin:S,elevateNodesOnSelect:C,fitViewQueued:D,zIndexMode:z}=E(),O=Od(T,k,A,{nodeOrigin:S,nodeExtent:y,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:z});D&&O?(N(),w({nodes:T,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0})):w({nodes:T,nodesInitialized:O})},setEdges:T=>{const{connectionLookup:k,edgeLookup:A}=E();Sv(k,A,T),w({edges:T})},setDefaultNodesAndEdges:(T,k)=>{if(T){const{setNodes:A}=E();A(T),w({hasDefaultNodes:!0})}if(k){const{setEdges:A}=E();A(k),w({hasDefaultEdges:!0})}},updateNodeInternals:T=>{const{triggerNodeChanges:k,nodeLookup:A,parentLookup:S,domNode:C,nodeOrigin:D,nodeExtent:z,debug:O,fitViewQueued:$,zIndexMode:G}=E(),{changes:ee,updatedInternals:Y}=d4(T,A,S,C,D,z,G);Y&&(s4(A,S,{nodeOrigin:D,nodeExtent:z,zIndexMode:G}),$?(N(),w({fitViewQueued:!1,fitViewOptions:void 0})):w({}),ee?.length>0&&(O&&console.log("React Flow: trigger node changes",ee),k?.(ee)))},updateNodePositions:(T,k=!1)=>{const A=[];let S=[];const{nodeLookup:C,triggerNodeChanges:D,connection:z,updateConnection:O,onNodesChangeMiddlewareMap:$}=E();for(const[G,ee]of T){const Y=C.get(G),Z=!!(Y?.expandParent&&Y?.parentId&&ee?.position),ie={id:G,type:"position",position:Z?{x:Math.max(0,ee.position.x),y:Math.max(0,ee.position.y)}:ee.position,dragging:k};if(Y&&z.inProgress&&z.fromNode.id===Y.id){const H=hi(Y,z.fromHandle,pe.Left,!0);O({...z,from:H})}Z&&Y.parentId&&A.push({id:G,parentId:Y.parentId,rect:{...ee.internals.positionAbsolute,width:ee.measured.width??0,height:ee.measured.height??0}}),S.push(ie)}if(A.length>0){const{parentLookup:G,nodeOrigin:ee}=E(),Y=vh(A,C,G,ee);S.push(...Y)}for(const G of $.values())S=G(S);D(S)},triggerNodeChanges:T=>{const{onNodesChange:k,setNodes:A,nodes:S,hasDefaultNodes:C,debug:D}=E();if(T?.length){if(C){const z=qs(T,S);A(z)}D&&console.log("React Flow: trigger node changes",T),k?.(T)}},triggerEdgeChanges:T=>{const{onEdgesChange:k,setEdges:A,edges:S,hasDefaultEdges:C,debug:D}=E();if(T?.length){if(C){const z=Lv(T,S);A(z)}D&&console.log("React Flow: trigger edge changes",T),k?.(T)}},addSelectedNodes:T=>{const{multiSelectionActive:k,edgeLookup:A,nodeLookup:S,triggerNodeChanges:C,triggerEdgeChanges:D}=E();if(k){const z=T.map(O=>oi(O,!0));C(z);return}C(ll(S,new Set([...T]),!0)),D(ll(A))},addSelectedEdges:T=>{const{multiSelectionActive:k,edgeLookup:A,nodeLookup:S,triggerNodeChanges:C,triggerEdgeChanges:D}=E();if(k){const z=T.map(O=>oi(O,!0));D(z);return}D(ll(A,new Set([...T]))),C(ll(S,new Set,!0))},unselectNodesAndEdges:({nodes:T,edges:k}={})=>{const{edges:A,nodes:S,nodeLookup:C,triggerNodeChanges:D,triggerEdgeChanges:z}=E(),O=T||S,$=k||A,G=O.map(Y=>{const Z=C.get(Y.id);return Z&&(Z.selected=!1),oi(Y.id,!1)}),ee=$.map(Y=>oi(Y.id,!1));D(G),z(ee)},setMinZoom:T=>{const{panZoom:k,maxZoom:A}=E();k?.setScaleExtent([T,A]),w({minZoom:T})},setMaxZoom:T=>{const{panZoom:k,minZoom:A}=E();k?.setScaleExtent([A,T]),w({maxZoom:T})},setTranslateExtent:T=>{E().panZoom?.setTranslateExtent(T),w({translateExtent:T})},resetSelectedElements:()=>{const{edges:T,nodes:k,triggerNodeChanges:A,triggerEdgeChanges:S,elementsSelectable:C}=E();if(!C)return;const D=k.reduce((O,$)=>$.selected?[...O,oi($.id,!1)]:O,[]),z=T.reduce((O,$)=>$.selected?[...O,oi($.id,!1)]:O,[]);A(D),S(z)},setNodeExtent:T=>{const{nodes:k,nodeLookup:A,parentLookup:S,nodeOrigin:C,elevateNodesOnSelect:D,nodeExtent:z,zIndexMode:O}=E();T[0][0]===z[0][0]&&T[0][1]===z[0][1]&&T[1][0]===z[1][0]&&T[1][1]===z[1][1]||(Od(k,A,S,{nodeOrigin:C,nodeExtent:T,elevateNodesOnSelect:D,checkEquality:!1,zIndexMode:O}),w({nodeExtent:T}))},panBy:T=>{const{transform:k,width:A,height:S,panZoom:C,translateExtent:D}=E();return h4({delta:T,panZoom:C,transform:k,translateExtent:D,width:A,height:S})},setCenter:async(T,k,A)=>{const{width:S,height:C,maxZoom:D,panZoom:z}=E();if(!z)return Promise.resolve(!1);const O=typeof A?.zoom<"u"?A.zoom:D;return await z.setViewport({x:S/2-T*O,y:C/2-k*O,zoom:O},{duration:A?.duration,ease:A?.ease,interpolate:A?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{w({connection:{...iv}})},updateConnection:T=>{w({connection:T})},reset:()=>w({...Hy()})}},Object.is);function s1({initialNodes:t,initialEdges:a,defaultNodes:l,defaultEdges:o,initialWidth:s,initialHeight:c,initialMinZoom:f,initialMaxZoom:h,initialFitViewOptions:g,fitView:p,nodeOrigin:x,nodeExtent:y,zIndexMode:b,children:w}){const[E]=j.useState(()=>AT({nodes:t,edges:a,defaultNodes:l,defaultEdges:o,width:s,height:c,fitView:p,minZoom:f,maxZoom:h,fitViewOptions:g,nodeOrigin:x,nodeExtent:y,zIndexMode:b}));return m.jsx(I4,{value:E,children:m.jsx(x5,{children:w})})}function MT({children:t,nodes:a,edges:l,defaultNodes:o,defaultEdges:s,width:c,height:f,fitView:h,fitViewOptions:g,minZoom:p,maxZoom:x,nodeOrigin:y,nodeExtent:b,zIndexMode:w}){return j.useContext(wc)?m.jsx(m.Fragment,{children:t}):m.jsx(s1,{initialNodes:a,initialEdges:l,defaultNodes:o,defaultEdges:s,initialWidth:c,initialHeight:f,fitView:h,initialFitViewOptions:g,initialMinZoom:p,initialMaxZoom:x,nodeOrigin:y,nodeExtent:b,zIndexMode:w,children:t})}const RT={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function zT({nodes:t,edges:a,defaultNodes:l,defaultEdges:o,className:s,nodeTypes:c,edgeTypes:f,onNodeClick:h,onEdgeClick:g,onInit:p,onMove:x,onMoveStart:y,onMoveEnd:b,onConnect:w,onConnectStart:E,onConnectEnd:N,onClickConnectStart:T,onClickConnectEnd:k,onNodeMouseEnter:A,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:z,onNodeDragStart:O,onNodeDrag:$,onNodeDragStop:G,onNodesDelete:ee,onEdgesDelete:Y,onDelete:Z,onSelectionChange:ie,onSelectionDragStart:H,onSelectionDrag:Q,onSelectionDragStop:M,onSelectionContextMenu:B,onSelectionStart:V,onSelectionEnd:K,onBeforeDelete:ne,connectionMode:R,connectionLineType:U=Ra.Bezier,connectionLineStyle:W,connectionLineComponent:te,connectionLineContainerStyle:se,deleteKeyCode:ue="Backspace",selectionKeyCode:ce="Shift",selectionOnDrag:re=!1,selectionMode:fe=Oo.Full,panActivationKeyCode:Ee="Space",multiSelectionKeyCode:we=Ho()?"Meta":"Control",zoomActivationKeyCode:ge=Ho()?"Meta":"Control",snapToGrid:xe,snapGrid:Te,onlyRenderVisibleElements:Ue=!1,selectNodesOnDrag:He,nodesDraggable:ut,autoPanOnNodeFocus:Pt,nodesConnectable:Mt,nodesFocusable:Wt,nodeOrigin:Nn=Dv,edgesFocusable:Da,edgesReconnectable:Ha,elementsSelectable:dt=!0,defaultViewport:mi=s5,minZoom:_n=.5,maxZoom:ta=2,translateExtent:La=zo,preventScrolling:Tc=!0,nodeExtent:gi,defaultMarkerColor:kc="#b1b1b7",zoomOnScroll:jc=!0,zoomOnPinch:Ba=!0,panOnScroll:vt=!1,panOnScrollSpeed:fn=.5,panOnScrollMode:bt=ci.Free,zoomOnDoubleClick:Ac=!0,panOnDrag:Mc=!0,onPaneClick:Rc,onPaneMouseEnter:yi,onPaneMouseMove:xi,onPaneMouseLeave:vi,onPaneScroll:Cn,onPaneContextMenu:bi,paneClickDistance:Ua=1,nodeClickDistance:zc=0,children:Po,onReconnect:wl,onReconnectStart:qa,onReconnectEnd:Oc,onEdgeContextMenu:Wo,onEdgeDoubleClick:er,onEdgeMouseEnter:tr,onEdgeMouseMove:Sl,onEdgeMouseLeave:El,reconnectRadius:nr=10,onNodesChange:ar,onEdgesChange:dn,noDragClassName:rt="nodrag",noWheelClassName:yt="nowheel",noPanClassName:Tn="nopan",fitView:wi,fitViewOptions:ir,connectOnClick:Dc,attributionPosition:lr,proOptions:Va,defaultEdgeOptions:Nl,elevateNodesOnSelect:na=!0,elevateEdgesOnSelect:aa=!1,disableKeyboardA11y:ia=!1,autoPanOnConnect:la,autoPanOnNodeDrag:et,autoPanSpeed:or,connectionRadius:rr,isValidConnection:kn,onError:oa,style:Hc,id:_l,nodeDragThreshold:sr,connectionDragThreshold:Lc,viewport:Si,onViewportChange:Ei,width:en,height:St,colorMode:cr="light",debug:Bc,onScroll:Ni,ariaLabelConfig:ur,zIndexMode:$a="basic",...Uc},Et){const Ya=_l||"1",fr=d5(cr),Cl=j.useCallback(jn=>{jn.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Ni?.(jn)},[Ni]);return m.jsx("div",{"data-testid":"rf__wrapper",...Uc,onScroll:Cl,style:{...Hc,...RT},ref:Et,className:ot(["react-flow",s,fr]),id:_l,role:"application",children:m.jsxs(MT,{nodes:t,edges:a,width:en,height:St,fitView:wi,fitViewOptions:ir,minZoom:_n,maxZoom:ta,nodeOrigin:Nn,nodeExtent:gi,zIndexMode:$a,children:[m.jsx(jT,{onInit:p,onNodeClick:h,onEdgeClick:g,onNodeMouseEnter:A,onNodeMouseMove:S,onNodeMouseLeave:C,onNodeContextMenu:D,onNodeDoubleClick:z,nodeTypes:c,edgeTypes:f,connectionLineType:U,connectionLineStyle:W,connectionLineComponent:te,connectionLineContainerStyle:se,selectionKeyCode:ce,selectionOnDrag:re,selectionMode:fe,deleteKeyCode:ue,multiSelectionKeyCode:we,panActivationKeyCode:Ee,zoomActivationKeyCode:ge,onlyRenderVisibleElements:Ue,defaultViewport:mi,translateExtent:La,minZoom:_n,maxZoom:ta,preventScrolling:Tc,zoomOnScroll:jc,zoomOnPinch:Ba,zoomOnDoubleClick:Ac,panOnScroll:vt,panOnScrollSpeed:fn,panOnScrollMode:bt,panOnDrag:Mc,onPaneClick:Rc,onPaneMouseEnter:yi,onPaneMouseMove:xi,onPaneMouseLeave:vi,onPaneScroll:Cn,onPaneContextMenu:bi,paneClickDistance:Ua,nodeClickDistance:zc,onSelectionContextMenu:B,onSelectionStart:V,onSelectionEnd:K,onReconnect:wl,onReconnectStart:qa,onReconnectEnd:Oc,onEdgeContextMenu:Wo,onEdgeDoubleClick:er,onEdgeMouseEnter:tr,onEdgeMouseMove:Sl,onEdgeMouseLeave:El,reconnectRadius:nr,defaultMarkerColor:kc,noDragClassName:rt,noWheelClassName:yt,noPanClassName:Tn,rfId:Ya,disableKeyboardA11y:ia,nodeExtent:gi,viewport:Si,onViewportChange:Ei}),m.jsx(f5,{nodes:t,edges:a,defaultNodes:l,defaultEdges:o,onConnect:w,onConnectStart:E,onConnectEnd:N,onClickConnectStart:T,onClickConnectEnd:k,nodesDraggable:ut,autoPanOnNodeFocus:Pt,nodesConnectable:Mt,nodesFocusable:Wt,edgesFocusable:Da,edgesReconnectable:Ha,elementsSelectable:dt,elevateNodesOnSelect:na,elevateEdgesOnSelect:aa,minZoom:_n,maxZoom:ta,nodeExtent:gi,onNodesChange:ar,onEdgesChange:dn,snapToGrid:xe,snapGrid:Te,connectionMode:R,translateExtent:La,connectOnClick:Dc,defaultEdgeOptions:Nl,fitView:wi,fitViewOptions:ir,onNodesDelete:ee,onEdgesDelete:Y,onDelete:Z,onNodeDragStart:O,onNodeDrag:$,onNodeDragStop:G,onSelectionDrag:Q,onSelectionDragStart:H,onSelectionDragStop:M,onMove:x,onMoveStart:y,onMoveEnd:b,noPanClassName:Tn,nodeOrigin:Nn,rfId:Ya,autoPanOnConnect:la,autoPanOnNodeDrag:et,autoPanSpeed:or,onError:oa,connectionRadius:rr,isValidConnection:kn,selectNodesOnDrag:He,nodeDragThreshold:sr,connectionDragThreshold:Lc,onBeforeDelete:ne,debug:Bc,ariaLabelConfig:ur,zIndexMode:$a}),m.jsx(r5,{onSelectionChange:ie}),Po,m.jsx(n5,{proOptions:Va,position:lr}),m.jsx(t5,{rfId:Ya,disableKeyboardA11y:ia})]})})}var OT=Bv(zT);function DT({dimensions:t,lineWidth:a,variant:l,className:o}){return m.jsx("path",{strokeWidth:a,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:ot(["react-flow__background-pattern",l,o])})}function HT({radius:t,className:a}){return m.jsx("circle",{cx:t,cy:t,r:t,className:ot(["react-flow__background-pattern","dots",a])})}var Fn;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Fn||(Fn={}));const LT={[Fn.Dots]:1,[Fn.Lines]:1,[Fn.Cross]:6},BT=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function c1({id:t,variant:a=Fn.Dots,gap:l=20,size:o,lineWidth:s=1,offset:c=0,color:f,bgColor:h,style:g,className:p,patternClassName:x}){const y=j.useRef(null),{transform:b,patternId:w}=Re(BT,Qe),E=o||LT[a],N=a===Fn.Dots,T=a===Fn.Cross,k=Array.isArray(l)?l:[l,l],A=[k[0]*b[2]||1,k[1]*b[2]||1],S=E*b[2],C=Array.isArray(c)?c:[c,c],D=T?[S,S]:A,z=[C[0]*b[2]||1+D[0]/2,C[1]*b[2]||1+D[1]/2],O=`${w}${t||""}`;return m.jsxs("svg",{className:ot(["react-flow__background",p]),style:{...g,...Ec,"--xy-background-color-props":h,"--xy-background-pattern-color-props":f},ref:y,"data-testid":"rf__background",children:[m.jsx("pattern",{id:O,x:b[0]%A[0],y:b[1]%A[1],width:A[0],height:A[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${z[0]},-${z[1]})`,children:N?m.jsx(HT,{radius:S/2,className:x}):m.jsx(DT,{dimensions:D,lineWidth:s,variant:a,className:x})}),m.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}c1.displayName="Background";const UT=j.memo(c1);function qT(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:m.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function VT(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:m.jsx("path",{d:"M0 0h32v4.2H0z"})})}function $T(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:m.jsx("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"})})}function YT(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"})})}function XT(){return m.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:m.jsx("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"})})}function As({children:t,className:a,...l}){return m.jsx("button",{type:"button",className:ot(["react-flow__controls-button",a]),...l,children:t})}const GT=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function u1({style:t,showZoom:a=!0,showFitView:l=!0,showInteractive:o=!0,fitViewOptions:s,onZoomIn:c,onZoomOut:f,onFitView:h,onInteractiveChange:g,className:p,children:x,position:y="bottom-left",orientation:b="vertical","aria-label":w}){const E=Ke(),{isInteractive:N,minZoomReached:T,maxZoomReached:k,ariaLabelConfig:A}=Re(GT,Qe),{zoomIn:S,zoomOut:C,fitView:D}=bh(),z=()=>{S(),c?.()},O=()=>{C(),f?.()},$=()=>{D(s),h?.()},G=()=>{E.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),g?.(!N)},ee=b==="horizontal"?"horizontal":"vertical";return m.jsxs(Sc,{className:ot(["react-flow__controls",ee,p]),position:y,style:t,"data-testid":"rf__controls","aria-label":w??A["controls.ariaLabel"],children:[a&&m.jsxs(m.Fragment,{children:[m.jsx(As,{onClick:z,className:"react-flow__controls-zoomin",title:A["controls.zoomIn.ariaLabel"],"aria-label":A["controls.zoomIn.ariaLabel"],disabled:k,children:m.jsx(qT,{})}),m.jsx(As,{onClick:O,className:"react-flow__controls-zoomout",title:A["controls.zoomOut.ariaLabel"],"aria-label":A["controls.zoomOut.ariaLabel"],disabled:T,children:m.jsx(VT,{})})]}),l&&m.jsx(As,{className:"react-flow__controls-fitview",onClick:$,title:A["controls.fitView.ariaLabel"],"aria-label":A["controls.fitView.ariaLabel"],children:m.jsx($T,{})}),o&&m.jsx(As,{className:"react-flow__controls-interactive",onClick:G,title:A["controls.interactive.ariaLabel"],"aria-label":A["controls.interactive.ariaLabel"],children:N?m.jsx(XT,{}):m.jsx(YT,{})}),x]})}u1.displayName="Controls";const ZT=j.memo(u1);function QT({id:t,x:a,y:l,width:o,height:s,style:c,color:f,strokeColor:h,strokeWidth:g,className:p,borderRadius:x,shapeRendering:y,selected:b,onClick:w}){const{background:E,backgroundColor:N}=c||{},T=f||E||N;return m.jsx("rect",{className:ot(["react-flow__minimap-node",{selected:b},p]),x:a,y:l,rx:x,ry:x,width:o,height:s,style:{fill:T,stroke:h,strokeWidth:g},shapeRendering:y,onClick:w?k=>w(k,t):void 0})}const KT=j.memo(QT),IT=t=>t.nodes.map(a=>a.id),dd=t=>t instanceof Function?t:()=>t;function FT({nodeStrokeColor:t,nodeColor:a,nodeClassName:l="",nodeBorderRadius:o=5,nodeStrokeWidth:s,nodeComponent:c=KT,onClick:f}){const h=Re(IT,Qe),g=dd(a),p=dd(t),x=dd(l),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return m.jsx(m.Fragment,{children:h.map(b=>m.jsx(PT,{id:b,nodeColorFunc:g,nodeStrokeColorFunc:p,nodeClassNameFunc:x,nodeBorderRadius:o,nodeStrokeWidth:s,NodeComponent:c,onClick:f,shapeRendering:y},b))})}function JT({id:t,nodeColorFunc:a,nodeStrokeColorFunc:l,nodeClassNameFunc:o,nodeBorderRadius:s,nodeStrokeWidth:c,shapeRendering:f,NodeComponent:h,onClick:g}){const{node:p,x,y,width:b,height:w}=Re(E=>{const{internals:N}=E.nodeLookup.get(t),T=N.userNode,{x:k,y:A}=N.positionAbsolute,{width:S,height:C}=ea(T);return{node:T,x:k,y:A,width:S,height:C}},Qe);return!p||p.hidden||!fv(p)?null:m.jsx(h,{x,y,width:b,height:w,style:p.style,selected:!!p.selected,className:o(p),color:a(p),borderRadius:s,strokeColor:l(p),strokeWidth:c,shapeRendering:f,onClick:g,id:p.id})}const PT=j.memo(JT);var WT=j.memo(FT);const ek=200,tk=150,nk=t=>!t.hidden,ak=t=>{const a={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:a,boundingRect:t.nodeLookup.size>0?uv(Ko(t.nodeLookup,{filter:nk}),a):a,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},ik="react-flow__minimap-desc";function f1({style:t,className:a,nodeStrokeColor:l,nodeColor:o,nodeClassName:s="",nodeBorderRadius:c=5,nodeStrokeWidth:f,nodeComponent:h,bgColor:g,maskColor:p,maskStrokeColor:x,maskStrokeWidth:y,position:b="bottom-right",onClick:w,onNodeClick:E,pannable:N=!1,zoomable:T=!1,ariaLabel:k,inversePan:A,zoomStep:S=1,offsetScale:C=5}){const D=Ke(),z=j.useRef(null),{boundingRect:O,viewBB:$,rfId:G,panZoom:ee,translateExtent:Y,flowWidth:Z,flowHeight:ie,ariaLabelConfig:H}=Re(ak,Qe),Q=t?.width??ek,M=t?.height??tk,B=O.width/Q,V=O.height/M,K=Math.max(B,V),ne=K*Q,R=K*M,U=C*K,W=O.x-(ne-O.width)/2-U,te=O.y-(R-O.height)/2-U,se=ne+U*2,ue=R+U*2,ce=`${ik}-${G}`,re=j.useRef(0),fe=j.useRef();re.current=K,j.useEffect(()=>{if(z.current&&ee)return fe.current=S4({domNode:z.current,panZoom:ee,getTransform:()=>D.getState().transform,getViewScale:()=>re.current}),()=>{fe.current?.destroy()}},[ee]),j.useEffect(()=>{fe.current?.update({translateExtent:Y,width:Z,height:ie,inversePan:A,pannable:N,zoomStep:S,zoomable:T})},[N,T,A,S,Y,Z,ie]);const Ee=w?xe=>{const[Te,Ue]=fe.current?.pointer(xe)||[0,0];w(xe,{x:Te,y:Ue})}:void 0,we=E?j.useCallback((xe,Te)=>{const Ue=D.getState().nodeLookup.get(Te).internals.userNode;E(xe,Ue)},[]):void 0,ge=k??H["minimap.ariaLabel"];return m.jsx(Sc,{position:b,style:{...t,"--xy-minimap-background-color-props":typeof g=="string"?g:void 0,"--xy-minimap-mask-background-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-color-props":typeof x=="string"?x:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*K:void 0,"--xy-minimap-node-background-color-props":typeof o=="string"?o:void 0,"--xy-minimap-node-stroke-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-width-props":typeof f=="number"?f:void 0},className:ot(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:m.jsxs("svg",{width:Q,height:M,viewBox:`${W} ${te} ${se} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ce,ref:z,onClick:Ee,children:[ge&&m.jsx("title",{id:ce,children:ge}),m.jsx(WT,{onClick:we,nodeColor:o,nodeStrokeColor:l,nodeBorderRadius:c,nodeClassName:s,nodeStrokeWidth:f,nodeComponent:h}),m.jsx("path",{className:"react-flow__minimap-mask",d:`M${W-U},${te-U}h${se+U*2}v${ue+U*2}h${-se-U*2}z
23
+ M${$.x},${$.y}h${$.width}v${$.height}h${-$.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}f1.displayName="MiniMap";const lk=j.memo(f1),ok=t=>a=>t?`${Math.max(1/a.transform[2],1)}`:void 0,rk={[ml.Line]:"right",[ml.Handle]:"bottom-right"};function sk({nodeId:t,position:a,variant:l=ml.Handle,className:o,style:s=void 0,children:c,color:f,minWidth:h=10,minHeight:g=10,maxWidth:p=Number.MAX_VALUE,maxHeight:x=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:b,autoScale:w=!0,shouldResize:E,onResizeStart:N,onResize:T,onResizeEnd:k}){const A=$v(),S=typeof t=="string"?t:A,C=Ke(),D=j.useRef(null),z=l===ml.Handle,O=Re(j.useCallback(ok(z&&w),[z,w]),Qe),$=j.useRef(null),G=a??rk[l];j.useEffect(()=>{if(!(!D.current||!S))return $.current||($.current=H4({domNode:D.current,nodeId:S,getStoreItems:()=>{const{nodeLookup:Y,transform:Z,snapGrid:ie,snapToGrid:H,nodeOrigin:Q,domNode:M}=C.getState();return{nodeLookup:Y,transform:Z,snapGrid:ie,snapToGrid:H,nodeOrigin:Q,paneDomNode:M}},onChange:(Y,Z)=>{const{triggerNodeChanges:ie,nodeLookup:H,parentLookup:Q,nodeOrigin:M}=C.getState(),B=[],V={x:Y.x,y:Y.y},K=H.get(S);if(K&&K.expandParent&&K.parentId){const ne=K.origin??M,R=Y.width??K.measured.width??0,U=Y.height??K.measured.height??0,W={id:K.id,parentId:K.parentId,rect:{width:R,height:U,...dv({x:Y.x??K.position.x,y:Y.y??K.position.y},{width:R,height:U},K.parentId,H,ne)}},te=vh([W],H,Q,M);B.push(...te),V.x=Y.x?Math.max(ne[0]*R,Y.x):void 0,V.y=Y.y?Math.max(ne[1]*U,Y.y):void 0}if(V.x!==void 0&&V.y!==void 0){const ne={id:S,type:"position",position:{...V}};B.push(ne)}if(Y.width!==void 0&&Y.height!==void 0){const R={id:S,type:"dimensions",resizing:!0,setAttributes:b?b==="horizontal"?"width":"height":!0,dimensions:{width:Y.width,height:Y.height}};B.push(R)}for(const ne of Z){const R={...ne,type:"position"};B.push(R)}ie(B)},onEnd:({width:Y,height:Z})=>{const ie={id:S,type:"dimensions",resizing:!1,dimensions:{width:Y,height:Z}};C.getState().triggerNodeChanges([ie])}})),$.current.update({controlPosition:G,boundaries:{minWidth:h,minHeight:g,maxWidth:p,maxHeight:x},keepAspectRatio:y,resizeDirection:b,onResizeStart:N,onResize:T,onResizeEnd:k,shouldResize:E}),()=>{$.current?.destroy()}},[G,h,g,p,x,y,N,T,k,E]);const ee=G.split("-");return m.jsx("div",{className:ot(["react-flow__resize-control","nodrag",...ee,l,o]),ref:D,style:{...s,scale:O,...f&&{[z?"backgroundColor":"borderColor"]:f}},children:c})}j.memo(sk);const Sn=Object.create(null);Sn.open="0";Sn.close="1";Sn.ping="2";Sn.pong="3";Sn.message="4";Sn.upgrade="5";Sn.noop="6";const Vs=Object.create(null);Object.keys(Sn).forEach(t=>{Vs[Sn[t]]=t});const Ld={type:"error",data:"parser error"},d1=typeof Blob=="function"||typeof Blob<"u"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",h1=typeof ArrayBuffer=="function",p1=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t&&t.buffer instanceof ArrayBuffer,Sh=({type:t,data:a},l,o)=>d1&&a instanceof Blob?l?o(a):Ly(a,o):h1&&(a instanceof ArrayBuffer||p1(a))?l?o(a):Ly(new Blob([a]),o):o(Sn[t]+(a||"")),Ly=(t,a)=>{const l=new FileReader;return l.onload=function(){const o=l.result.split(",")[1];a("b"+(o||""))},l.readAsDataURL(t)};function By(t){return t instanceof Uint8Array?t:t instanceof ArrayBuffer?new Uint8Array(t):new Uint8Array(t.buffer,t.byteOffset,t.byteLength)}let hd;function ck(t,a){if(d1&&t.data instanceof Blob)return t.data.arrayBuffer().then(By).then(a);if(h1&&(t.data instanceof ArrayBuffer||p1(t.data)))return a(By(t.data));Sh(t,!1,l=>{hd||(hd=new TextEncoder),a(hd.encode(l))})}const Uy="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",No=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(let t=0;t<Uy.length;t++)No[Uy.charCodeAt(t)]=t;const uk=t=>{let a=t.length*.75,l=t.length,o,s=0,c,f,h,g;t[t.length-1]==="="&&(a--,t[t.length-2]==="="&&a--);const p=new ArrayBuffer(a),x=new Uint8Array(p);for(o=0;o<l;o+=4)c=No[t.charCodeAt(o)],f=No[t.charCodeAt(o+1)],h=No[t.charCodeAt(o+2)],g=No[t.charCodeAt(o+3)],x[s++]=c<<2|f>>4,x[s++]=(f&15)<<4|h>>2,x[s++]=(h&3)<<6|g&63;return p},fk=typeof ArrayBuffer=="function",Eh=(t,a)=>{if(typeof t!="string")return{type:"message",data:m1(t,a)};const l=t.charAt(0);return l==="b"?{type:"message",data:dk(t.substring(1),a)}:Vs[l]?t.length>1?{type:Vs[l],data:t.substring(1)}:{type:Vs[l]}:Ld},dk=(t,a)=>{if(fk){const l=uk(t);return m1(l,a)}else return{base64:!0,data:t}},m1=(t,a)=>a==="blob"?t instanceof Blob?t:new Blob([t]):t instanceof ArrayBuffer?t:t.buffer,g1="",hk=(t,a)=>{const l=t.length,o=new Array(l);let s=0;t.forEach((c,f)=>{Sh(c,!1,h=>{o[f]=h,++s===l&&a(o.join(g1))})})},pk=(t,a)=>{const l=t.split(g1),o=[];for(let s=0;s<l.length;s++){const c=Eh(l[s],a);if(o.push(c),c.type==="error")break}return o};function mk(){return new TransformStream({transform(t,a){ck(t,l=>{const o=l.length;let s;if(o<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,o);else if(o<65536){s=new Uint8Array(3);const c=new DataView(s.buffer);c.setUint8(0,126),c.setUint16(1,o)}else{s=new Uint8Array(9);const c=new DataView(s.buffer);c.setUint8(0,127),c.setBigUint64(1,BigInt(o))}t.data&&typeof t.data!="string"&&(s[0]|=128),a.enqueue(s),a.enqueue(l)})}})}let pd;function Ms(t){return t.reduce((a,l)=>a+l.length,0)}function Rs(t,a){if(t[0].length===a)return t.shift();const l=new Uint8Array(a);let o=0;for(let s=0;s<a;s++)l[s]=t[0][o++],o===t[0].length&&(t.shift(),o=0);return t.length&&o<t[0].length&&(t[0]=t[0].slice(o)),l}function gk(t,a){pd||(pd=new TextDecoder);const l=[];let o=0,s=-1,c=!1;return new TransformStream({transform(f,h){for(l.push(f);;){if(o===0){if(Ms(l)<1)break;const g=Rs(l,1);c=(g[0]&128)===128,s=g[0]&127,s<126?o=3:s===126?o=1:o=2}else if(o===1){if(Ms(l)<2)break;const g=Rs(l,2);s=new DataView(g.buffer,g.byteOffset,g.length).getUint16(0),o=3}else if(o===2){if(Ms(l)<8)break;const g=Rs(l,8),p=new DataView(g.buffer,g.byteOffset,g.length),x=p.getUint32(0);if(x>Math.pow(2,21)-1){h.enqueue(Ld);break}s=x*Math.pow(2,32)+p.getUint32(4),o=3}else{if(Ms(l)<s)break;const g=Rs(l,s);h.enqueue(Eh(c?g:pd.decode(g),a)),o=0}if(s===0||s>t){h.enqueue(Ld);break}}}})}const y1=4;function lt(t){if(t)return yk(t)}function yk(t){for(var a in lt.prototype)t[a]=lt.prototype[a];return t}lt.prototype.on=lt.prototype.addEventListener=function(t,a){return this._callbacks=this._callbacks||{},(this._callbacks["$"+t]=this._callbacks["$"+t]||[]).push(a),this};lt.prototype.once=function(t,a){function l(){this.off(t,l),a.apply(this,arguments)}return l.fn=a,this.on(t,l),this};lt.prototype.off=lt.prototype.removeListener=lt.prototype.removeAllListeners=lt.prototype.removeEventListener=function(t,a){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var l=this._callbacks["$"+t];if(!l)return this;if(arguments.length==1)return delete this._callbacks["$"+t],this;for(var o,s=0;s<l.length;s++)if(o=l[s],o===a||o.fn===a){l.splice(s,1);break}return l.length===0&&delete this._callbacks["$"+t],this};lt.prototype.emit=function(t){this._callbacks=this._callbacks||{};for(var a=new Array(arguments.length-1),l=this._callbacks["$"+t],o=1;o<arguments.length;o++)a[o-1]=arguments[o];if(l){l=l.slice(0);for(var o=0,s=l.length;o<s;++o)l[o].apply(this,a)}return this};lt.prototype.emitReserved=lt.prototype.emit;lt.prototype.listeners=function(t){return this._callbacks=this._callbacks||{},this._callbacks["$"+t]||[]};lt.prototype.hasListeners=function(t){return!!this.listeners(t).length};const _c=typeof Promise=="function"&&typeof Promise.resolve=="function"?a=>Promise.resolve().then(a):(a,l)=>l(a,0),Ft=typeof self<"u"?self:typeof window<"u"?window:Function("return this")(),xk="arraybuffer";function x1(t,...a){return a.reduce((l,o)=>(t.hasOwnProperty(o)&&(l[o]=t[o]),l),{})}const vk=Ft.setTimeout,bk=Ft.clearTimeout;function Cc(t,a){a.useNativeTimers?(t.setTimeoutFn=vk.bind(Ft),t.clearTimeoutFn=bk.bind(Ft)):(t.setTimeoutFn=Ft.setTimeout.bind(Ft),t.clearTimeoutFn=Ft.clearTimeout.bind(Ft))}const wk=1.33;function Sk(t){return typeof t=="string"?Ek(t):Math.ceil((t.byteLength||t.size)*wk)}function Ek(t){let a=0,l=0;for(let o=0,s=t.length;o<s;o++)a=t.charCodeAt(o),a<128?l+=1:a<2048?l+=2:a<55296||a>=57344?l+=3:(o++,l+=4);return l}function v1(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Nk(t){let a="";for(let l in t)t.hasOwnProperty(l)&&(a.length&&(a+="&"),a+=encodeURIComponent(l)+"="+encodeURIComponent(t[l]));return a}function _k(t){let a={},l=t.split("&");for(let o=0,s=l.length;o<s;o++){let c=l[o].split("=");a[decodeURIComponent(c[0])]=decodeURIComponent(c[1])}return a}class Ck extends Error{constructor(a,l,o){super(a),this.description=l,this.context=o,this.type="TransportError"}}class Nh extends lt{constructor(a){super(),this.writable=!1,Cc(this,a),this.opts=a,this.query=a.query,this.socket=a.socket,this.supportsBinary=!a.forceBase64}onError(a,l,o){return super.emitReserved("error",new Ck(a,l,o)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(a){this.readyState==="open"&&this.write(a)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(a){const l=Eh(a,this.socket.binaryType);this.onPacket(l)}onPacket(a){super.emitReserved("packet",a)}onClose(a){this.readyState="closed",super.emitReserved("close",a)}pause(a){}createUri(a,l={}){return a+"://"+this._hostname()+this._port()+this.opts.path+this._query(l)}_hostname(){const a=this.opts.hostname;return a.indexOf(":")===-1?a:"["+a+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(a){const l=Nk(a);return l.length?"?"+l:""}}class Tk extends Nh{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(a){this.readyState="pausing";const l=()=>{this.readyState="paused",a()};if(this._polling||!this.writable){let o=0;this._polling&&(o++,this.once("pollComplete",function(){--o||l()})),this.writable||(o++,this.once("drain",function(){--o||l()}))}else l()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(a){const l=o=>{if(this.readyState==="opening"&&o.type==="open"&&this.onOpen(),o.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(o)};pk(a,this.socket.binaryType).forEach(l),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const a=()=>{this.write([{type:"close"}])};this.readyState==="open"?a():this.once("open",a)}write(a){this.writable=!1,hk(a,l=>{this.doWrite(l,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const a=this.opts.secure?"https":"http",l=this.query||{};return this.opts.timestampRequests!==!1&&(l[this.opts.timestampParam]=v1()),!this.supportsBinary&&!l.sid&&(l.b64=1),this.createUri(a,l)}}let b1=!1;try{b1=typeof XMLHttpRequest<"u"&&"withCredentials"in new XMLHttpRequest}catch{}const kk=b1;function jk(){}class Ak extends Tk{constructor(a){if(super(a),typeof location<"u"){const l=location.protocol==="https:";let o=location.port;o||(o=l?"443":"80"),this.xd=typeof location<"u"&&a.hostname!==location.hostname||o!==a.port}}doWrite(a,l){const o=this.request({method:"POST",data:a});o.on("success",l),o.on("error",(s,c)=>{this.onError("xhr post error",s,c)})}doPoll(){const a=this.request();a.on("data",this.onData.bind(this)),a.on("error",(l,o)=>{this.onError("xhr poll error",l,o)}),this.pollXhr=a}}class vn extends lt{constructor(a,l,o){super(),this.createRequest=a,Cc(this,o),this._opts=o,this._method=o.method||"GET",this._uri=l,this._data=o.data!==void 0?o.data:null,this._create()}_create(){var a;const l=x1(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");l.xdomain=!!this._opts.xd;const o=this._xhr=this.createRequest(l);try{o.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){o.setDisableHeaderCheck&&o.setDisableHeaderCheck(!0);for(let s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&o.setRequestHeader(s,this._opts.extraHeaders[s])}}catch{}if(this._method==="POST")try{o.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch{}try{o.setRequestHeader("Accept","*/*")}catch{}(a=this._opts.cookieJar)===null||a===void 0||a.addCookies(o),"withCredentials"in o&&(o.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(o.timeout=this._opts.requestTimeout),o.onreadystatechange=()=>{var s;o.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.parseCookies(o.getResponseHeader("set-cookie"))),o.readyState===4&&(o.status===200||o.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof o.status=="number"?o.status:0)},0))},o.send(this._data)}catch(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document<"u"&&(this._index=vn.requestsCount++,vn.requests[this._index]=this)}_onError(a){this.emitReserved("error",a,this._xhr),this._cleanup(!0)}_cleanup(a){if(!(typeof this._xhr>"u"||this._xhr===null)){if(this._xhr.onreadystatechange=jk,a)try{this._xhr.abort()}catch{}typeof document<"u"&&delete vn.requests[this._index],this._xhr=null}}_onLoad(){const a=this._xhr.responseText;a!==null&&(this.emitReserved("data",a),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}vn.requestsCount=0;vn.requests={};if(typeof document<"u"){if(typeof attachEvent=="function")attachEvent("onunload",qy);else if(typeof addEventListener=="function"){const t="onpagehide"in Ft?"pagehide":"unload";addEventListener(t,qy,!1)}}function qy(){for(let t in vn.requests)vn.requests.hasOwnProperty(t)&&vn.requests[t].abort()}const Mk=(function(){const t=w1({xdomain:!1});return t&&t.responseType!==null})();class Rk extends Ak{constructor(a){super(a);const l=a&&a.forceBase64;this.supportsBinary=Mk&&!l}request(a={}){return Object.assign(a,{xd:this.xd},this.opts),new vn(w1,this.uri(),a)}}function w1(t){const a=t.xdomain;try{if(typeof XMLHttpRequest<"u"&&(!a||kk))return new XMLHttpRequest}catch{}if(!a)try{return new Ft[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch{}}const S1=typeof navigator<"u"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class zk extends Nh{get name(){return"websocket"}doOpen(){const a=this.uri(),l=this.opts.protocols,o=S1?{}:x1(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(o.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(a,l,o)}catch(s){return this.emitReserved("error",s)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=a=>this.onClose({description:"websocket connection closed",context:a}),this.ws.onmessage=a=>this.onData(a.data),this.ws.onerror=a=>this.onError("websocket error",a)}write(a){this.writable=!1;for(let l=0;l<a.length;l++){const o=a[l],s=l===a.length-1;Sh(o,this.supportsBinary,c=>{try{this.doWrite(o,c)}catch{}s&&_c(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws<"u"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const a=this.opts.secure?"wss":"ws",l=this.query||{};return this.opts.timestampRequests&&(l[this.opts.timestampParam]=v1()),this.supportsBinary||(l.b64=1),this.createUri(a,l)}}const md=Ft.WebSocket||Ft.MozWebSocket;class Ok extends zk{createSocket(a,l,o){return S1?new md(a,l,o):l?new md(a,l):new md(a)}doWrite(a,l){this.ws.send(l)}}class Dk extends Nh{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(a){return this.emitReserved("error",a)}this._transport.closed.then(()=>{this.onClose()}).catch(a=>{this.onError("webtransport error",a)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(a=>{const l=gk(Number.MAX_SAFE_INTEGER,this.socket.binaryType),o=a.readable.pipeThrough(l).getReader(),s=mk();s.readable.pipeTo(a.writable),this._writer=s.writable.getWriter();const c=()=>{o.read().then(({done:h,value:g})=>{h||(this.onPacket(g),c())}).catch(h=>{})};c();const f={type:"open"};this.query.sid&&(f.data=`{"sid":"${this.query.sid}"}`),this._writer.write(f).then(()=>this.onOpen())})})}write(a){this.writable=!1;for(let l=0;l<a.length;l++){const o=a[l],s=l===a.length-1;this._writer.write(o).then(()=>{s&&_c(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var a;(a=this._transport)===null||a===void 0||a.close()}}const Hk={websocket:Ok,webtransport:Dk,polling:Rk},Lk=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Bk=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bd(t){if(t.length>8e3)throw"URI too long";const a=t,l=t.indexOf("["),o=t.indexOf("]");l!=-1&&o!=-1&&(t=t.substring(0,l)+t.substring(l,o).replace(/:/g,";")+t.substring(o,t.length));let s=Lk.exec(t||""),c={},f=14;for(;f--;)c[Bk[f]]=s[f]||"";return l!=-1&&o!=-1&&(c.source=a,c.host=c.host.substring(1,c.host.length-1).replace(/;/g,":"),c.authority=c.authority.replace("[","").replace("]","").replace(/;/g,":"),c.ipv6uri=!0),c.pathNames=Uk(c,c.path),c.queryKey=qk(c,c.query),c}function Uk(t,a){const l=/\/{2,9}/g,o=a.replace(l,"/").split("/");return(a.slice(0,1)=="/"||a.length===0)&&o.splice(0,1),a.slice(-1)=="/"&&o.splice(o.length-1,1),o}function qk(t,a){const l={};return a.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(o,s,c){s&&(l[s]=c)}),l}const Ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",$s=[];Ud&&addEventListener("offline",()=>{$s.forEach(t=>t())},!1);class za extends lt{constructor(a,l){if(super(),this.binaryType=xk,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,a&&typeof a=="object"&&(l=a,a=null),a){const o=Bd(a);l.hostname=o.host,l.secure=o.protocol==="https"||o.protocol==="wss",l.port=o.port,o.query&&(l.query=o.query)}else l.host&&(l.hostname=Bd(l.host).host);Cc(this,l),this.secure=l.secure!=null?l.secure:typeof location<"u"&&location.protocol==="https:",l.hostname&&!l.port&&(l.port=this.secure?"443":"80"),this.hostname=l.hostname||(typeof location<"u"?location.hostname:"localhost"),this.port=l.port||(typeof location<"u"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},l.transports.forEach(o=>{const s=o.prototype.name;this.transports.push(s),this._transportsByName[s]=o}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},l),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=_k(this.opts.query)),Ud&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},$s.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(a){const l=Object.assign({},this.opts.query);l.EIO=y1,l.transport=a,this.id&&(l.sid=this.id);const o=Object.assign({},this.opts,{query:l,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[a]);return new this._transportsByName[a](o)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const a=this.opts.rememberUpgrade&&za.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const l=this.createTransport(a);l.open(),this.setTransport(l)}setTransport(a){this.transport&&this.transport.removeAllListeners(),this.transport=a,a.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",l=>this._onClose("transport close",l))}onOpen(){this.readyState="open",za.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(a){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",a),this.emitReserved("heartbeat"),a.type){case"open":this.onHandshake(JSON.parse(a.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const l=new Error("server error");l.code=a.data,this._onError(l);break;case"message":this.emitReserved("data",a.data),this.emitReserved("message",a.data);break}}onHandshake(a){this.emitReserved("handshake",a),this.id=a.sid,this.transport.query.sid=a.sid,this._pingInterval=a.pingInterval,this._pingTimeout=a.pingTimeout,this._maxPayload=a.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const a=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+a,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},a),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const a=this._getWritablePackets();this.transport.send(a),this._prevBufferLen=a.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let l=1;for(let o=0;o<this.writeBuffer.length;o++){const s=this.writeBuffer[o].data;if(s&&(l+=Sk(s)),o>0&&l>this._maxPayload)return this.writeBuffer.slice(0,o);l+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const a=Date.now()>this._pingTimeoutTime;return a&&(this._pingTimeoutTime=0,_c(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),a}write(a,l,o){return this._sendPacket("message",a,l,o),this}send(a,l,o){return this._sendPacket("message",a,l,o),this}_sendPacket(a,l,o,s){if(typeof l=="function"&&(s=l,l=void 0),typeof o=="function"&&(s=o,o=null),this.readyState==="closing"||this.readyState==="closed")return;o=o||{},o.compress=o.compress!==!1;const c={type:a,data:l,options:o};this.emitReserved("packetCreate",c),this.writeBuffer.push(c),s&&this.once("flush",s),this.flush()}close(){const a=()=>{this._onClose("forced close"),this.transport.close()},l=()=>{this.off("upgrade",l),this.off("upgradeError",l),a()},o=()=>{this.once("upgrade",l),this.once("upgradeError",l)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?o():a()}):this.upgrading?o():a()),this}_onError(a){if(za.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",a),this._onClose("transport error",a)}_onClose(a,l){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const o=$s.indexOf(this._offlineEventListener);o!==-1&&$s.splice(o,1)}this.readyState="closed",this.id=null,this.emitReserved("close",a,l),this.writeBuffer=[],this._prevBufferLen=0}}}za.protocol=y1;class Vk extends za{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let a=0;a<this._upgrades.length;a++)this._probe(this._upgrades[a])}_probe(a){let l=this.createTransport(a),o=!1;za.priorWebsocketSuccess=!1;const s=()=>{o||(l.send([{type:"ping",data:"probe"}]),l.once("packet",y=>{if(!o)if(y.type==="pong"&&y.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",l),!l)return;za.priorWebsocketSuccess=l.name==="websocket",this.transport.pause(()=>{o||this.readyState!=="closed"&&(x(),this.setTransport(l),l.send([{type:"upgrade"}]),this.emitReserved("upgrade",l),l=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=l.name,this.emitReserved("upgradeError",b)}}))};function c(){o||(o=!0,x(),l.close(),l=null)}const f=y=>{const b=new Error("probe error: "+y);b.transport=l.name,c(),this.emitReserved("upgradeError",b)};function h(){f("transport closed")}function g(){f("socket closed")}function p(y){l&&y.name!==l.name&&c()}const x=()=>{l.removeListener("open",s),l.removeListener("error",f),l.removeListener("close",h),this.off("close",g),this.off("upgrading",p)};l.once("open",s),l.once("error",f),l.once("close",h),this.once("close",g),this.once("upgrading",p),this._upgrades.indexOf("webtransport")!==-1&&a!=="webtransport"?this.setTimeoutFn(()=>{o||l.open()},200):l.open()}onHandshake(a){this._upgrades=this._filterUpgrades(a.upgrades),super.onHandshake(a)}_filterUpgrades(a){const l=[];for(let o=0;o<a.length;o++)~this.transports.indexOf(a[o])&&l.push(a[o]);return l}}let $k=class extends Vk{constructor(a,l={}){const o=typeof a=="object"?a:l;(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(s=>Hk[s]).filter(s=>!!s)),super(a,o)}};function Yk(t,a="",l){let o=t;l=l||typeof location<"u"&&location,t==null&&(t=l.protocol+"//"+l.host),typeof t=="string"&&(t.charAt(0)==="/"&&(t.charAt(1)==="/"?t=l.protocol+t:t=l.host+t),/^(https?|wss?):\/\//.test(t)||(typeof l<"u"?t=l.protocol+"//"+t:t="https://"+t),o=Bd(t)),o.port||(/^(http|ws)$/.test(o.protocol)?o.port="80":/^(http|ws)s$/.test(o.protocol)&&(o.port="443")),o.path=o.path||"/";const c=o.host.indexOf(":")!==-1?"["+o.host+"]":o.host;return o.id=o.protocol+"://"+c+":"+o.port+a,o.href=o.protocol+"://"+c+(l&&l.port===o.port?"":":"+o.port),o}const Xk=typeof ArrayBuffer=="function",Gk=t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer,E1=Object.prototype.toString,Zk=typeof Blob=="function"||typeof Blob<"u"&&E1.call(Blob)==="[object BlobConstructor]",Qk=typeof File=="function"||typeof File<"u"&&E1.call(File)==="[object FileConstructor]";function _h(t){return Xk&&(t instanceof ArrayBuffer||Gk(t))||Zk&&t instanceof Blob||Qk&&t instanceof File}function Ys(t,a){if(!t||typeof t!="object")return!1;if(Array.isArray(t)){for(let l=0,o=t.length;l<o;l++)if(Ys(t[l]))return!0;return!1}if(_h(t))return!0;if(t.toJSON&&typeof t.toJSON=="function"&&arguments.length===1)return Ys(t.toJSON(),!0);for(const l in t)if(Object.prototype.hasOwnProperty.call(t,l)&&Ys(t[l]))return!0;return!1}function Kk(t){const a=[],l=t.data,o=t;return o.data=qd(l,a),o.attachments=a.length,{packet:o,buffers:a}}function qd(t,a){if(!t)return t;if(_h(t)){const l={_placeholder:!0,num:a.length};return a.push(t),l}else if(Array.isArray(t)){const l=new Array(t.length);for(let o=0;o<t.length;o++)l[o]=qd(t[o],a);return l}else if(typeof t=="object"&&!(t instanceof Date)){const l={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(l[o]=qd(t[o],a));return l}return t}function Ik(t,a){return t.data=Vd(t.data,a),delete t.attachments,t}function Vd(t,a){if(!t)return t;if(t&&t._placeholder===!0){if(typeof t.num=="number"&&t.num>=0&&t.num<a.length)return a[t.num];throw new Error("illegal attachments")}else if(Array.isArray(t))for(let l=0;l<t.length;l++)t[l]=Vd(t[l],a);else if(typeof t=="object")for(const l in t)Object.prototype.hasOwnProperty.call(t,l)&&(t[l]=Vd(t[l],a));return t}const Fk=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Me;(function(t){t[t.CONNECT=0]="CONNECT",t[t.DISCONNECT=1]="DISCONNECT",t[t.EVENT=2]="EVENT",t[t.ACK=3]="ACK",t[t.CONNECT_ERROR=4]="CONNECT_ERROR",t[t.BINARY_EVENT=5]="BINARY_EVENT",t[t.BINARY_ACK=6]="BINARY_ACK"})(Me||(Me={}));class Jk{constructor(a){this.replacer=a}encode(a){return(a.type===Me.EVENT||a.type===Me.ACK)&&Ys(a)?this.encodeAsBinary({type:a.type===Me.EVENT?Me.BINARY_EVENT:Me.BINARY_ACK,nsp:a.nsp,data:a.data,id:a.id}):[this.encodeAsString(a)]}encodeAsString(a){let l=""+a.type;return(a.type===Me.BINARY_EVENT||a.type===Me.BINARY_ACK)&&(l+=a.attachments+"-"),a.nsp&&a.nsp!=="/"&&(l+=a.nsp+","),a.id!=null&&(l+=a.id),a.data!=null&&(l+=JSON.stringify(a.data,this.replacer)),l}encodeAsBinary(a){const l=Kk(a),o=this.encodeAsString(l.packet),s=l.buffers;return s.unshift(o),s}}class Ch extends lt{constructor(a){super(),this.reviver=a}add(a){let l;if(typeof a=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");l=this.decodeString(a);const o=l.type===Me.BINARY_EVENT;o||l.type===Me.BINARY_ACK?(l.type=o?Me.EVENT:Me.ACK,this.reconstructor=new Pk(l),l.attachments===0&&super.emitReserved("decoded",l)):super.emitReserved("decoded",l)}else if(_h(a)||a.base64)if(this.reconstructor)l=this.reconstructor.takeBinaryData(a),l&&(this.reconstructor=null,super.emitReserved("decoded",l));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+a)}decodeString(a){let l=0;const o={type:Number(a.charAt(0))};if(Me[o.type]===void 0)throw new Error("unknown packet type "+o.type);if(o.type===Me.BINARY_EVENT||o.type===Me.BINARY_ACK){const c=l+1;for(;a.charAt(++l)!=="-"&&l!=a.length;);const f=a.substring(c,l);if(f!=Number(f)||a.charAt(l)!=="-")throw new Error("Illegal attachments");o.attachments=Number(f)}if(a.charAt(l+1)==="/"){const c=l+1;for(;++l&&!(a.charAt(l)===","||l===a.length););o.nsp=a.substring(c,l)}else o.nsp="/";const s=a.charAt(l+1);if(s!==""&&Number(s)==s){const c=l+1;for(;++l;){const f=a.charAt(l);if(f==null||Number(f)!=f){--l;break}if(l===a.length)break}o.id=Number(a.substring(c,l+1))}if(a.charAt(++l)){const c=this.tryParse(a.substr(l));if(Ch.isPayloadValid(o.type,c))o.data=c;else throw new Error("invalid payload")}return o}tryParse(a){try{return JSON.parse(a,this.reviver)}catch{return!1}}static isPayloadValid(a,l){switch(a){case Me.CONNECT:return Vy(l);case Me.DISCONNECT:return l===void 0;case Me.CONNECT_ERROR:return typeof l=="string"||Vy(l);case Me.EVENT:case Me.BINARY_EVENT:return Array.isArray(l)&&(typeof l[0]=="number"||typeof l[0]=="string"&&Fk.indexOf(l[0])===-1);case Me.ACK:case Me.BINARY_ACK:return Array.isArray(l)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Pk{constructor(a){this.packet=a,this.buffers=[],this.reconPack=a}takeBinaryData(a){if(this.buffers.push(a),this.buffers.length===this.reconPack.attachments){const l=Ik(this.reconPack,this.buffers);return this.finishedReconstruction(),l}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}function Vy(t){return Object.prototype.toString.call(t)==="[object Object]"}const Wk=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ch,Encoder:Jk,get PacketType(){return Me}},Symbol.toStringTag,{value:"Module"}));function on(t,a,l){return t.on(a,l),function(){t.off(a,l)}}const ej=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class N1 extends lt{constructor(a,l,o){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=a,this.nsp=l,o&&o.auth&&(this.auth=o.auth),this._opts=Object.assign({},o),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const a=this.io;this.subs=[on(a,"open",this.onopen.bind(this)),on(a,"packet",this.onpacket.bind(this)),on(a,"error",this.onerror.bind(this)),on(a,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...a){return a.unshift("message"),this.emit.apply(this,a),this}emit(a,...l){var o,s,c;if(ej.hasOwnProperty(a))throw new Error('"'+a.toString()+'" is a reserved event name');if(l.unshift(a),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(l),this;const f={type:Me.EVENT,data:l};if(f.options={},f.options.compress=this.flags.compress!==!1,typeof l[l.length-1]=="function"){const x=this.ids++,y=l.pop();this._registerAckCallback(x,y),f.id=x}const h=(s=(o=this.io.engine)===null||o===void 0?void 0:o.transport)===null||s===void 0?void 0:s.writable,g=this.connected&&!(!((c=this.io.engine)===null||c===void 0)&&c._hasPingExpired());return this.flags.volatile&&!h||(g?(this.notifyOutgoingListeners(f),this.packet(f)):this.sendBuffer.push(f)),this.flags={},this}_registerAckCallback(a,l){var o;const s=(o=this.flags.timeout)!==null&&o!==void 0?o:this._opts.ackTimeout;if(s===void 0){this.acks[a]=l;return}const c=this.io.setTimeoutFn(()=>{delete this.acks[a];for(let h=0;h<this.sendBuffer.length;h++)this.sendBuffer[h].id===a&&this.sendBuffer.splice(h,1);l.call(this,new Error("operation has timed out"))},s),f=(...h)=>{this.io.clearTimeoutFn(c),l.apply(this,h)};f.withError=!0,this.acks[a]=f}emitWithAck(a,...l){return new Promise((o,s)=>{const c=(f,h)=>f?s(f):o(h);c.withError=!0,l.push(c),this.emit(a,...l)})}_addToQueue(a){let l;typeof a[a.length-1]=="function"&&(l=a.pop());const o={id:this._queueSeq++,tryCount:0,pending:!1,args:a,flags:Object.assign({fromQueue:!0},this.flags)};a.push((s,...c)=>(this._queue[0],s!==null?o.tryCount>this._opts.retries&&(this._queue.shift(),l&&l(s)):(this._queue.shift(),l&&l(null,...c)),o.pending=!1,this._drainQueue())),this._queue.push(o),this._drainQueue()}_drainQueue(a=!1){if(!this.connected||this._queue.length===0)return;const l=this._queue[0];l.pending&&!a||(l.pending=!0,l.tryCount++,this.flags=l.flags,this.emit.apply(this,l.args))}packet(a){a.nsp=this.nsp,this.io._packet(a)}onopen(){typeof this.auth=="function"?this.auth(a=>{this._sendConnectPacket(a)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(a){this.packet({type:Me.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},a):a})}onerror(a){this.connected||this.emitReserved("connect_error",a)}onclose(a,l){this.connected=!1,delete this.id,this.emitReserved("disconnect",a,l),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(a=>{if(!this.sendBuffer.some(o=>String(o.id)===a)){const o=this.acks[a];delete this.acks[a],o.withError&&o.call(this,new Error("socket has been disconnected"))}})}onpacket(a){if(a.nsp===this.nsp)switch(a.type){case Me.CONNECT:a.data&&a.data.sid?this.onconnect(a.data.sid,a.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Me.EVENT:case Me.BINARY_EVENT:this.onevent(a);break;case Me.ACK:case Me.BINARY_ACK:this.onack(a);break;case Me.DISCONNECT:this.ondisconnect();break;case Me.CONNECT_ERROR:this.destroy();const o=new Error(a.data.message);o.data=a.data.data,this.emitReserved("connect_error",o);break}}onevent(a){const l=a.data||[];a.id!=null&&l.push(this.ack(a.id)),this.connected?this.emitEvent(l):this.receiveBuffer.push(Object.freeze(l))}emitEvent(a){if(this._anyListeners&&this._anyListeners.length){const l=this._anyListeners.slice();for(const o of l)o.apply(this,a)}super.emit.apply(this,a),this._pid&&a.length&&typeof a[a.length-1]=="string"&&(this._lastOffset=a[a.length-1])}ack(a){const l=this;let o=!1;return function(...s){o||(o=!0,l.packet({type:Me.ACK,id:a,data:s}))}}onack(a){const l=this.acks[a.id];typeof l=="function"&&(delete this.acks[a.id],l.withError&&a.data.unshift(null),l.apply(this,a.data))}onconnect(a,l){this.id=a,this.recovered=l&&this._pid===l,this._pid=l,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(a=>this.emitEvent(a)),this.receiveBuffer=[],this.sendBuffer.forEach(a=>{this.notifyOutgoingListeners(a),this.packet(a)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(a=>a()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Me.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(a){return this.flags.compress=a,this}get volatile(){return this.flags.volatile=!0,this}timeout(a){return this.flags.timeout=a,this}onAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(a),this}prependAny(a){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(a),this}offAny(a){if(!this._anyListeners)return this;if(a){const l=this._anyListeners;for(let o=0;o<l.length;o++)if(a===l[o])return l.splice(o,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(a),this}prependAnyOutgoing(a){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(a),this}offAnyOutgoing(a){if(!this._anyOutgoingListeners)return this;if(a){const l=this._anyOutgoingListeners;for(let o=0;o<l.length;o++)if(a===l[o])return l.splice(o,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(a){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const l=this._anyOutgoingListeners.slice();for(const o of l)o.apply(this,a.data)}}}function vl(t){t=t||{},this.ms=t.min||100,this.max=t.max||1e4,this.factor=t.factor||2,this.jitter=t.jitter>0&&t.jitter<=1?t.jitter:0,this.attempts=0}vl.prototype.duration=function(){var t=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var a=Math.random(),l=Math.floor(a*this.jitter*t);t=(Math.floor(a*10)&1)==0?t-l:t+l}return Math.min(t,this.max)|0};vl.prototype.reset=function(){this.attempts=0};vl.prototype.setMin=function(t){this.ms=t};vl.prototype.setMax=function(t){this.max=t};vl.prototype.setJitter=function(t){this.jitter=t};class $d extends lt{constructor(a,l){var o;super(),this.nsps={},this.subs=[],a&&typeof a=="object"&&(l=a,a=void 0),l=l||{},l.path=l.path||"/socket.io",this.opts=l,Cc(this,l),this.reconnection(l.reconnection!==!1),this.reconnectionAttempts(l.reconnectionAttempts||1/0),this.reconnectionDelay(l.reconnectionDelay||1e3),this.reconnectionDelayMax(l.reconnectionDelayMax||5e3),this.randomizationFactor((o=l.randomizationFactor)!==null&&o!==void 0?o:.5),this.backoff=new vl({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(l.timeout==null?2e4:l.timeout),this._readyState="closed",this.uri=a;const s=l.parser||Wk;this.encoder=new s.Encoder,this.decoder=new s.Decoder,this._autoConnect=l.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(a){return arguments.length?(this._reconnection=!!a,a||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(a){return a===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=a,this)}reconnectionDelay(a){var l;return a===void 0?this._reconnectionDelay:(this._reconnectionDelay=a,(l=this.backoff)===null||l===void 0||l.setMin(a),this)}randomizationFactor(a){var l;return a===void 0?this._randomizationFactor:(this._randomizationFactor=a,(l=this.backoff)===null||l===void 0||l.setJitter(a),this)}reconnectionDelayMax(a){var l;return a===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=a,(l=this.backoff)===null||l===void 0||l.setMax(a),this)}timeout(a){return arguments.length?(this._timeout=a,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(a){if(~this._readyState.indexOf("open"))return this;this.engine=new $k(this.uri,this.opts);const l=this.engine,o=this;this._readyState="opening",this.skipReconnect=!1;const s=on(l,"open",function(){o.onopen(),a&&a()}),c=h=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",h),a?a(h):this.maybeReconnectOnOpen()},f=on(l,"error",c);if(this._timeout!==!1){const h=this._timeout,g=this.setTimeoutFn(()=>{s(),c(new Error("timeout")),l.close()},h);this.opts.autoUnref&&g.unref(),this.subs.push(()=>{this.clearTimeoutFn(g)})}return this.subs.push(s),this.subs.push(f),this}connect(a){return this.open(a)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const a=this.engine;this.subs.push(on(a,"ping",this.onping.bind(this)),on(a,"data",this.ondata.bind(this)),on(a,"error",this.onerror.bind(this)),on(a,"close",this.onclose.bind(this)),on(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(a){try{this.decoder.add(a)}catch(l){this.onclose("parse error",l)}}ondecoded(a){_c(()=>{this.emitReserved("packet",a)},this.setTimeoutFn)}onerror(a){this.emitReserved("error",a)}socket(a,l){let o=this.nsps[a];return o?this._autoConnect&&!o.active&&o.connect():(o=new N1(this,a,l),this.nsps[a]=o),o}_destroy(a){const l=Object.keys(this.nsps);for(const o of l)if(this.nsps[o].active)return;this._close()}_packet(a){const l=this.encoder.encode(a);for(let o=0;o<l.length;o++)this.engine.write(l[o],a.options)}cleanup(){this.subs.forEach(a=>a()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(a,l){var o;this.cleanup(),(o=this.engine)===null||o===void 0||o.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",a,l),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const a=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const l=this.backoff.duration();this._reconnecting=!0;const o=this.setTimeoutFn(()=>{a.skipReconnect||(this.emitReserved("reconnect_attempt",a.backoff.attempts),!a.skipReconnect&&a.open(s=>{s?(a._reconnecting=!1,a.reconnect(),this.emitReserved("reconnect_error",s)):a.onreconnect()}))},l);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}}onreconnect(){const a=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",a)}}const bo={};function Xs(t,a){typeof t=="object"&&(a=t,t=void 0),a=a||{};const l=Yk(t,a.path||"/socket.io"),o=l.source,s=l.id,c=l.path,f=bo[s]&&c in bo[s].nsps,h=a.forceNew||a["force new connection"]||a.multiplex===!1||f;let g;return h?g=new $d(o,a):(bo[s]||(bo[s]=new $d(o,a)),g=bo[s]),l.query&&!a.query&&(a.query=l.queryKey),g.socket(l.path,a)}Object.assign(Xs,{Manager:$d,Socket:N1,io:Xs,connect:Xs});const $y=window.location.origin;class tj{socket;constructor(){this.socket=Xs($y,{autoConnect:!0,reconnection:!0,reconnectionAttempts:5,reconnectionDelay:1e3}),this.socket.on("connect",()=>{console.log("[Socket] Connected to server:",$y)}),this.socket.on("disconnect",()=>{console.log("Disconnected from server")}),this.socket.on("connect_error",a=>{console.error("Socket connection error:",a.message)})}on(a,l){this.socket.on(a,l)}off(a,l){l?this.socket.off(a,l):this.socket.off(a)}emit(a,l){this.socket.connected||console.warn("Socket not connected, queuing emit:",a),this.socket.emit(a,l)}executeWorkflow(a){this.emit("execute:workflow",a)}cancelExecution(){this.emit("execute:cancel")}generateSkill(a){console.log("[Socket] Generating skill:",a.prompt.slice(0,50),"connected:",this.socket.connected),this.emit("generate:skill",a)}isConnected(){return this.socket.connected}disconnect(){this.socket.disconnect()}connect(){this.socket.connected||this.socket.connect()}}const ct=new tj;function nj(){const{nodes:t,edges:a,workflowName:l,updateNodeStatus:o}=Oa(),{isRunning:s,startExecution:c,stopExecution:f,setCurrentNode:h,markNodeCompleted:g,markNodeFailed:p,setWorkflowResults:x,addLog:y,clearLogs:b}=fc(),[w,E]=j.useState(null),N=j.useRef(null);j.useEffect(()=>{const k=z=>{const{nodeId:O,status:$,progress:G,result:ee,error:Y}=z;$==="running"?(o(O,"running",G||0),h(O)):$==="completed"?(o(O,"completed",100),g(O,ee)):$==="error"&&(o(O,"error",0),p(O,Y||"Unknown error"))},A=z=>{const O=z.type==="warn"?"warning":z.type==="debug"?"info":z.type;y(O,z.message,z.nodeId)},S=z=>{z.results&&x(z.results),z.outputDir&&E(z.outputDir),f(),y("success","워크플로우 실행 완료!")},C=z=>{f(),y("error",`실행 오류: ${z.error}`)},D=()=>{f(),y("warning","워크플로우 실행이 취소되었습니다.")};return ct.on("node:update",k),ct.on("console:log",A),ct.on("workflow:completed",S),ct.on("workflow:error",C),ct.on("workflow:cancelled",D),()=>{ct.off("node:update",k),ct.off("console:log",A),ct.off("workflow:completed",S),ct.off("workflow:error",C),ct.off("workflow:cancelled",D)}},[y,g,p,h,x,f,o]);const T=j.useCallback(()=>{if(t.length===0){y("warning","No nodes to execute");return}b(),c(),E(null);const k=`workflow-${Date.now()}`;N.current=k,y("info",`워크플로우 "${l}" 실행 시작 (Claude CLI)...`);const A={};t.forEach(S=>{if(S.type==="input"){const C=S.data,D=C.value||C.defaultValue||C.placeholder||"";D&&(A[S.id]=D)}}),ct.executeWorkflow({workflowId:k,workflowName:l,nodes:t.map(S=>({id:S.id,type:S.type||"unknown",data:S.data})),edges:a.map(S=>({id:S.id,source:S.source,target:S.target})),inputs:A})},[t,a,l,y,b,c]);return{isRunning:s,execute:T,savedOutputDir:w}}function aj(t,a,l,o="local"){const s=o==="global"?"~/.claude":".claude",c=ij(a,s),f=lj(a,s),h=oj(t,a,l,s),g=rj(a);return{skills:c,commands:h,agents:f,mcpSettings:g}}function ij(t,a){return t.filter(o=>o.type==="skill").filter(o=>o.data.skillType==="custom").map(o=>{const s=o.data,c=bl(s.skillId||s.label),f=`${a}/skills/${c}/SKILL.md`,h=sj(s);return{name:c,path:f,content:h}})}function lj(t,a){return t.filter(o=>o.type==="agent").map(o=>{const s=o.data,c=bl(s.label),f=`${a}/agents/${c}.md`,h=cj(s);return{name:c,path:f,content:h}})}function oj(t,a,l,o){if(a.length===0)return[];const s=bl(t),c=`${o}/commands/${s}.md`,f=uj(t,a,l);return[{name:s,path:c,content:f}]}function rj(t){return t.filter(l=>l.type==="hook").length===0,null}function sj(t){if(t.skillContent)return t.skillContent;const a=bl(t.skillId||t.label),l=t.description||t.label,o=["---",`name: ${a}`,`description: ${l}`,"---","",`# ${t.label}`,""];return t.mdContent?o.push(t.mdContent):o.push(`Execute the ${t.label} skill.`),o.join(`
24
+ `)}function cj(t){const a=bl(t.label),l=t.description||t.label,o=t.tools.length>0?t.tools.join(", "):"Read, Write, Edit",s=t.model||"sonnet",c=["---",`name: ${a}`,`description: ${l}`,`tools: ${o}`,`model: ${s}`,"---",""];return t.systemPrompt?c.push(t.systemPrompt):t.mdContent?c.push(t.mdContent):(c.push(`# ${t.label}`),c.push(""),c.push(`This agent performs the ${t.role} role.`)),c.join(`
25
+ `)}function uj(t,a,l){const o=a.filter(x=>x.type==="input"),s=a.filter(x=>x.type==="output"),c=o.map(x=>`<${bl(x.data.label)}>`).join(" "),h=["---",`description: ${`Workflow: ${t}`}`];c&&h.push(`argument-hint: ${c}`),h.push("---"),h.push(""),h.push(`# ${t}`),h.push(""),o.length>0&&(h.push("## Inputs"),h.push(""),o.forEach(x=>{const y=x.data;h.push(`- **${y.label}**: ${y.description||y.placeholder||"User input"}`)}),h.push("")),h.push("## Workflow Steps"),h.push("");const g=fj(a,l);let p=1;return g.forEach(x=>{if(x.type!=="input"){if(h.push(`${p}. **${x.data.label}**`),x.data.description&&h.push(` ${x.data.description}`),x.type==="agent"){const y=x.data;y.systemPrompt&&h.push(` - Prompt: ${y.systemPrompt.substring(0,100)}${y.systemPrompt.length>100?"...":""}`),y.tools.length>0&&h.push(` - Tools: ${y.tools.join(", ")}`)}if(x.type==="skill"){const y=x.data;y.skillId&&h.push(` - Invoke skill: ${y.skillId}`)}if(x.type==="hook"){const y=x.data;h.push(` - Hook: ${y.hookEvent} (${y.hookMatcher||"*"})`)}h.push(""),p++}}),s.length>0&&(h.push("## Outputs"),h.push(""),s.forEach(x=>{const y=x.data;h.push(`- **${y.label}**: ${y.outputType} format`)})),h.join(`
26
+ `)}function bl(t){return t.toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function fj(t,a){const l=new Map(t.map(h=>[h.id,h])),o=new Map,s=new Map;t.forEach(h=>{o.set(h.id,0),s.set(h.id,[])}),a.forEach(h=>{s.get(h.source)?.push(h.target),o.set(h.target,(o.get(h.target)||0)+1)});const c=[];o.forEach((h,g)=>{h===0&&c.push(g)});const f=[];for(;c.length>0;){const h=c.shift(),g=l.get(h);g&&f.push(g),s.get(h)?.forEach(p=>{const x=(o.get(p)||0)-1;o.set(p,x),x===0&&c.push(p)})}return f}async function _1(t){try{const a=t?`/api/load/claude-config?path=${encodeURIComponent(t)}`:"/api/load/claude-config",l=await fetch(a);if(!l.ok)throw new Error(`Failed to load config: ${l.statusText}`);const o=await l.json();return dj(o)}catch(a){return console.error("Failed to load Claude config:",a),[]}}function dj(t){const a=[];let l=0;const o=280,s=150;for(const c of t.skills)a.push({id:c.id,type:"skill",position:{x:100+l,y:s},data:{label:c.label,description:c.description,status:"idle",skillType:"custom",skillId:c.skillId,skillPath:c.skillPath}}),l+=o;for(const c of t.agents)a.push({id:c.id,type:"agent",position:{x:100+l,y:s},data:{label:c.label,description:c.description,role:"custom",tools:c.tools,model:c.model,skills:c.skills,systemPrompt:c.systemPrompt,status:"idle",usedInputs:[]}}),l+=o;for(const c of t.hooks)a.push({id:c.id,type:"hook",position:{x:100+l,y:s},data:{label:c.label,description:c.description,hookEvent:c.hookEvent,hookMatcher:c.hookMatcher,hookCommand:c.hookCommand,status:"idle",usedInputs:[]}}),l+=o;return a}const C1="http://localhost:3001/api";async function hj(t,a){const l=await fetch(`${C1}/save/workflow`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:t,options:a})});if(!l.ok){const o=await l.json().catch(()=>({}));throw new Error(o.message||"Failed to save workflow")}return l.json()}async function pj(){const t=await fetch(`${C1}/project-path`);if(!t.ok)throw new Error("Failed to get project path");return(await t.json()).path}async function mj(t,a){const l=[];return a.includeSkills&&t.skills.forEach(o=>{l.push({path:o.path,content:o.content,type:"skill"})}),a.includeCommands&&t.commands.forEach(o=>{l.push({path:o.path,content:o.content,type:"command"})}),a.includeAgents&&t.agents.forEach(o=>{l.push({path:o.path,content:o.content,type:"agent"})}),a.includeMcpSettings&&t.mcpSettings&&l.push({path:a.location==="global"?"~/.claude/settings.local.json":".claude/settings.local.json",content:JSON.stringify(t.mcpSettings,null,2),type:"mcp"}),{files:l}}function gj({isOpen:t,onClose:a,config:l}){const[o,s]=j.useState("local"),[c,f]=j.useState(!0),[h,g]=j.useState(!0),[p,x]=j.useState(!0),[y,b]=j.useState(!0),[w,E]=j.useState(""),[N,T]=j.useState([]),[k,A]=j.useState(null),[S,C]=j.useState(!1),[D,z]=j.useState(null),[O,$]=j.useState(null);j.useEffect(()=>{t&&pj().then(E).catch(()=>E("."))},[t]),j.useEffect(()=>{if(!t)return;mj(l,{location:o,includeSkills:c,includeCommands:h,includeAgents:p,includeMcpSettings:y}).then(({files:ie})=>{T(ie),ie.length>0&&!k&&A(ie[0])})},[t,l,o,c,h,p,y]);const G=async()=>{C(!0),$(null),z(null);const Z={location:o,includeSkills:c,includeCommands:h,includeAgents:p,includeMcpSettings:y};try{const ie=await hj(l,Z);z(ie),ie.success&&setTimeout(()=>a(),2e3)}catch(ie){$(ie instanceof Error?ie.message:"Failed to save")}finally{C(!1)}},ee=Z=>{switch(Z){case"skill":return m.jsx(bd,{className:"w-4 h-4 text-node-skill"});case"agent":return m.jsx(NS,{className:"w-4 h-4 text-node-generate"});case"command":return m.jsx(xx,{className:"w-4 h-4 text-accent"});case"mcp":return m.jsx(eh,{className:"w-4 h-4 text-node-mcp"});default:return m.jsx(bd,{className:"w-4 h-4 text-gray-400"})}},Y=l.skills.length>0||l.commands.length>0||l.agents.length>0||l.mcpSettings;return t?m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm",children:m.jsxs("div",{className:"bg-surface border border-border rounded-xl shadow-2xl w-[900px] max-h-[80vh] flex flex-col",children:[m.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-border",children:[m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx(Zs,{className:"w-5 h-5 text-accent"}),m.jsx("h2",{className:"text-lg font-semibold text-white",children:"Export to Claude Code"})]}),m.jsx("button",{onClick:a,className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",children:m.jsx(th,{className:"w-5 h-5 text-gray-400"})})]}),m.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[m.jsxs("div",{className:"w-64 border-r border-border p-4 space-y-6 overflow-y-auto",children:[m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Save Location"}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("button",{onClick:()=>s("local"),className:It("w-full flex items-center gap-3 px-3 py-2 rounded-lg border transition-colors text-left",o==="local"?"border-accent bg-accent/10 text-white":"border-border hover:border-gray-500 text-gray-400"),children:[m.jsx(Qs,{className:"w-4 h-4"}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-medium",children:"Local"}),m.jsx("div",{className:"text-xs text-gray-500",children:".claude/"})]})]}),m.jsxs("button",{onClick:()=>s("global"),className:It("w-full flex items-center gap-3 px-3 py-2 rounded-lg border transition-colors text-left",o==="global"?"border-accent bg-accent/10 text-white":"border-border hover:border-gray-500 text-gray-400"),children:[m.jsx(Qs,{className:"w-4 h-4"}),m.jsxs("div",{children:[m.jsx("div",{className:"text-sm font-medium",children:"Global"}),m.jsx("div",{className:"text-xs text-gray-500",children:"~/.claude/"})]})]})]})]}),m.jsxs("div",{children:[m.jsx("label",{className:"block text-sm font-medium text-gray-300 mb-3",children:"Include Files"}),m.jsxs("div",{className:"space-y-2",children:[m.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:c,onChange:Z=>f(Z.target.checked),disabled:l.skills.length===0,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),m.jsxs("span",{className:It("text-sm",l.skills.length===0?"text-gray-600":"text-gray-300"),children:["Skills (",l.skills.length,")"]})]}),m.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:h,onChange:Z=>g(Z.target.checked),disabled:l.commands.length===0,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),m.jsxs("span",{className:It("text-sm",l.commands.length===0?"text-gray-600":"text-gray-300"),children:["Commands (",l.commands.length,")"]})]}),m.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:p,onChange:Z=>x(Z.target.checked),disabled:l.agents.length===0,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),m.jsxs("span",{className:It("text-sm",l.agents.length===0?"text-gray-600":"text-gray-300"),children:["Agents (",l.agents.length,")"]})]}),m.jsxs("label",{className:"flex items-center gap-3 cursor-pointer",children:[m.jsx("input",{type:"checkbox",checked:y,onChange:Z=>b(Z.target.checked),disabled:!l.mcpSettings,className:"w-4 h-4 rounded border-border bg-surface text-accent focus:ring-accent"}),m.jsx("span",{className:It("text-sm",l.mcpSettings?"text-gray-300":"text-gray-600"),children:"MCP Settings"})]})]})]}),m.jsxs("div",{className:"pt-4 border-t border-border",children:[m.jsx("div",{className:"text-xs text-gray-500 mb-1",children:"Project Path"}),m.jsx("div",{className:"text-xs text-gray-400 font-mono truncate",title:w,children:w||"Loading..."})]})]}),m.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[m.jsxs("div",{className:"flex items-center gap-2 px-4 py-3 border-b border-border overflow-x-auto",children:[N.map((Z,ie)=>m.jsxs("button",{onClick:()=>A(Z),className:It("flex items-center gap-2 px-3 py-1.5 rounded-lg text-sm whitespace-nowrap transition-colors",k===Z?"bg-surface-hover text-white":"text-gray-400 hover:text-white hover:bg-surface-hover/50"),children:[ee(Z.type),m.jsx("span",{children:Z.path.split("/").pop()})]},ie)),N.length===0&&m.jsx("span",{className:"text-sm text-gray-500",children:"No files to export"})]}),m.jsx("div",{className:"flex-1 overflow-auto p-4",children:k?m.jsxs("div",{className:"space-y-2",children:[m.jsx("div",{className:"text-xs text-gray-500 font-mono",children:k.path}),m.jsx("pre",{className:"text-sm text-gray-300 font-mono bg-canvas p-4 rounded-lg overflow-auto max-h-[400px]",children:k.content})]}):m.jsx("div",{className:"flex items-center justify-center h-full text-gray-500",children:"Select a file to preview"})})]})]}),m.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-t border-border",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[D&&D.success&&m.jsxs("div",{className:"flex items-center gap-2 text-status-completed text-sm",children:[m.jsx(TS,{className:"w-4 h-4"}),m.jsx("span",{children:"Saved successfully!"})]}),D&&!D.success&&m.jsxs("div",{className:"flex items-center gap-2 text-status-error text-sm",children:[m.jsx(vd,{className:"w-4 h-4"}),m.jsx("span",{children:"Some files failed to save"})]}),O&&m.jsxs("div",{className:"flex items-center gap-2 text-status-error text-sm",children:[m.jsx(vd,{className:"w-4 h-4"}),m.jsx("span",{children:O})]})]}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("button",{onClick:a,className:"px-4 py-2 text-sm font-medium text-gray-400 hover:text-white transition-colors",children:"Cancel"}),m.jsxs("button",{onClick:G,disabled:S||N.length===0||!Y,className:It("flex items-center gap-2 px-4 py-2 rounded-lg text-sm font-medium transition-colors",S||N.length===0||!Y?"bg-gray-600 text-gray-400 cursor-not-allowed":"bg-accent hover:bg-accent-hover text-white"),children:[m.jsx(Zs,{className:"w-4 h-4"}),S?"Saving...":"Export"]})]})]})]})}):null}function yj(){const t=Xd(),{workflowName:a,setWorkflowName:l,isDraft:o,nodes:s,edges:c,clearWorkflow:f,mergeExistingConfig:h}=Oa(),{isRunning:g,execute:p}=nj(),[x,y]=j.useState(!1),[b,w]=j.useState(!1),[E,N]=j.useState(null),[T,k]=j.useState(!1),A=j.useCallback(async()=>{k(!0);try{const O=await _1();O.length>0&&h(O)}catch(O){console.error("Failed to reload config:",O)}finally{k(!1)}},[h]),S=()=>{const O=aj(a,s,c,"local");N(O),y(!0)},C=()=>{y(!1),N(null)},D=()=>{g||p()},z=()=>{s.length!==0&&window.confirm("모든 워크플로우를 삭제하시겠습니까?")&&f()};return m.jsxs("header",{className:"flex items-center justify-between px-4 py-3 bg-surface border-b border-border",children:[m.jsxs("div",{className:"flex items-center gap-4",children:[m.jsx("button",{onClick:()=>t("/"),className:"p-2 hover:bg-surface-hover rounded-lg transition-colors group",title:"Back to Home",children:m.jsx(gx,{className:"w-5 h-5 text-gray-400 group-hover:text-white transition-colors"})}),m.jsxs("div",{className:"flex items-center gap-3",children:[m.jsx("input",{type:"text",value:a,onChange:O=>l(O.target.value),className:"bg-transparent border-none text-lg font-semibold text-white focus:outline-none focus:ring-2 focus:ring-accent rounded px-2 py-1"}),o&&m.jsx("span",{className:"px-2 py-0.5 text-xs font-medium bg-yellow-500/20 text-yellow-400 rounded",children:"Draft"})]})]}),m.jsx("div",{className:"text-sm font-medium text-gray-400",children:"Visual Workflow Builder"}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx("span",{className:"text-sm text-gray-500",children:"Saved"}),m.jsxs("button",{onClick:D,disabled:g,className:`
27
+ flex items-center gap-2 px-4 py-2 rounded-lg font-medium transition-colors
28
+ ${g?"bg-gray-500 cursor-not-allowed text-white":"bg-accent hover:bg-accent-hover text-white"}
29
+ `,children:[m.jsx(Is,{className:"w-4 h-4"}),g?"Running...":"Run"]}),m.jsxs("button",{onClick:S,className:"flex items-center gap-2 px-3 py-2 bg-surface-hover hover:bg-border rounded-lg transition-colors",children:[m.jsx(Zs,{className:"w-4 h-4 text-gray-400"}),m.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Export"})]}),m.jsxs("button",{onClick:A,disabled:T,className:`
30
+ flex items-center gap-2 px-3 py-2 rounded-lg transition-colors
31
+ ${T?"bg-surface-hover cursor-not-allowed opacity-50":"bg-surface-hover hover:bg-blue-500/20 hover:text-blue-400"}
32
+ `,title:".claude/ 폴더에서 다시 로드",children:[m.jsx(yx,{className:`w-4 h-4 text-gray-400 ${T?"animate-spin":""}`}),m.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Reload"})]}),m.jsxs("button",{onClick:z,disabled:s.length===0,className:`
33
+ flex items-center gap-2 px-3 py-2 rounded-lg transition-colors
34
+ ${s.length===0?"bg-surface-hover cursor-not-allowed opacity-50":"bg-surface-hover hover:bg-red-500/20 hover:text-red-400"}
35
+ `,title:"모든 노드 삭제",children:[m.jsx(Fs,{className:"w-4 h-4 text-gray-400"}),m.jsx("span",{className:"text-sm font-medium text-gray-300",children:"Clear"})]}),m.jsx("button",{className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",children:m.jsx(mE,{className:"w-5 h-5 text-gray-400"})}),m.jsx("button",{onClick:()=>w(!0),className:"p-2 hover:bg-surface-hover rounded-lg transition-colors",title:"설정",children:m.jsx(eh,{className:"w-5 h-5 text-gray-400"})})]}),E&&m.jsx(gj,{isOpen:x,onClose:C,config:E}),m.jsx(bx,{isOpen:b,onClose:()=>w(!1)})]})}const xj=[{type:"input",label:"User Input",icon:m.jsx(Wd,{className:"w-4 h-4"}),color:"text-yellow-400",hoverColor:"hover:bg-yellow-500/10"},{type:"agent",label:"Agent",icon:m.jsx($o,{className:"w-4 h-4"}),color:"text-purple-400",hoverColor:"hover:bg-purple-500/10"},{type:"skill",label:"Skill",icon:m.jsx(Yo,{className:"w-4 h-4"}),color:"text-cyan-400",hoverColor:"hover:bg-cyan-500/10"},{type:"hook",label:"Hook",icon:m.jsx(Id,{className:"w-4 h-4"}),color:"text-pink-400",hoverColor:"hover:bg-pink-500/10"},{type:"output",label:"Output",icon:m.jsx(uc,{className:"w-4 h-4"}),color:"text-emerald-400",hoverColor:"hover:bg-emerald-500/10"}];function vj(t){const a=sl(),l={x:100+Math.random()*200,y:100+Math.random()*200};switch(t){case"input":return{id:a,type:"input",position:l,data:{label:"User Input",description:"Enter your input here...",inputType:"text",status:"idle",placeholder:"Enter your prompt..."}};case"agent":return{id:a,type:"agent",position:l,data:{label:"Agent",description:"Conduct in-depth research...",role:"researcher",tools:["WebSearch","WebFetch","Read"],status:"idle",usedInputs:[]}};case"skill":return{id:a,type:"skill",position:l,data:{label:"Skill",description:"Apply a specialized skill...",skillType:"official",status:"idle",usedInputs:[]}};case"hook":return{id:a,type:"hook",position:l,data:{label:"Hook",description:"Configure tool lifecycle hook...",hookEvent:"PreToolUse",status:"idle",usedInputs:[]}};case"output":return{id:a,type:"output",position:l,data:{label:"Output",description:"Select to edit in editor",outputType:"auto",status:"idle",usedInputs:[]}}}}function bj(){const t=Oa(l=>l.addNode),a=l=>{const o=vj(l);t(o),wx(o).catch(s=>{console.error("Failed to sync node to filesystem:",s)})};return m.jsx("div",{className:"flex items-center justify-center gap-2 py-3 bg-canvas border-b border-border",children:xj.map(l=>m.jsxs("button",{onClick:()=>a(l.type),className:`
36
+ flex items-center gap-2 px-4 py-2 rounded-lg
37
+ bg-surface border border-border
38
+ ${l.hoverColor}
39
+ transition-all duration-200
40
+ hover:border-gray-500
41
+ `,children:[m.jsx("span",{className:l.color,children:l.icon}),m.jsx("span",{className:"text-sm font-medium text-gray-300",children:l.label})]},l.type))})}function wj({status:t}){switch(t){case"running":return m.jsx(Ks,{className:"w-4 h-4 animate-spin text-blue-400"});case"completed":return m.jsx(OS,{className:"w-4 h-4 text-green-400"});case"error":return m.jsx(vd,{className:"w-4 h-4 text-red-400"});default:return m.jsx(Is,{className:"w-4 h-4"})}}function Sj({data:t,selected:a,children:l,headerIcon:o,headerColor:s="bg-gray-700",showSourceHandle:c=!0,showTargetHandle:f=!0}){const h=()=>{switch(t.status){case"running":return"border-indigo-500 animate-pulse-border";case"completed":return"border-green-500";case"error":return"border-red-500";default:return""}};return m.jsxs("div",{className:It("workflow-node",a&&"ring-2 ring-accent ring-offset-2 ring-offset-canvas",h()),children:[m.jsxs("div",{className:It("node-header flex items-center justify-between",s),children:[m.jsxs("div",{className:"flex items-center gap-2",children:[o,m.jsx("span",{className:"font-semibold text-sm text-white",children:t.label})]}),m.jsx("div",{className:"flex items-center gap-1",children:m.jsx(wj,{status:t.status})})]}),m.jsxs("div",{className:"node-content",children:[t.description&&m.jsx("p",{className:"text-sm text-gray-400 mb-3",children:t.description}),l,t.usedInputs&&t.usedInputs.length>0&&m.jsxs("div",{className:"mt-3 pt-3 border-t border-gray-700/50",children:[m.jsx("p",{className:"text-xs text-gray-500 mb-2",children:"Used in this step"}),m.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.usedInputs.map(g=>m.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs bg-gray-700/50 border border-gray-600 text-gray-300",children:[m.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-amber-400"}),g]},g))})]})]}),f&&m.jsx(gl,{type:"target",position:pe.Left}),c&&m.jsx(gl,{type:"source",position:pe.Right})]})}const Jo=j.memo(Sj);function Ej({data:t,selected:a}){return m.jsx(Jo,{data:t,selected:a,headerIcon:m.jsx(Wd,{className:"w-4 h-4 text-amber-100"}),headerColor:"bg-gradient-to-br from-amber-500 to-orange-600",showTargetHandle:!1,showSourceHandle:!0,children:m.jsxs("div",{className:"text-gray-300",children:[t.inputType==="text"&&m.jsx("div",{className:"text-sm text-gray-400",children:t.value||t.placeholder||"Enter your input..."}),t.inputType==="file"&&m.jsx("div",{className:"text-sm text-gray-400",children:"Drop files here or click to upload"}),t.inputType==="select"&&t.options&&m.jsx("select",{className:"w-full px-2 py-1 text-sm bg-gray-700 border border-gray-600 rounded text-gray-300",children:t.options.map(l=>m.jsx("option",{value:l,children:l},l))})]})})}const Nj=j.memo(Ej);function _j({data:t,selected:a}){return m.jsx(Jo,{data:t,selected:a,headerIcon:m.jsx($o,{className:"w-4 h-4 text-violet-100"}),headerColor:"bg-gradient-to-br from-violet-500 to-purple-700",showTargetHandle:!0,showSourceHandle:!0,children:m.jsxs("div",{className:"space-y-2",children:[t.tools&&t.tools.length>0&&m.jsxs("div",{className:"flex flex-wrap gap-1",children:[t.tools.slice(0,3).map(l=>m.jsx("span",{className:"px-2 py-0.5 text-xs bg-purple-900/50 text-purple-300 rounded",children:l},l)),t.tools.length>3&&m.jsxs("span",{className:"px-2 py-0.5 text-xs bg-purple-900/50 text-purple-300 rounded",children:["+",t.tools.length-3]})]}),t.model&&m.jsxs("div",{className:"text-xs text-gray-500",children:["Model: ",t.model]})]})})}const Cj=j.memo(_j);function Tj({data:t,selected:a}){return m.jsx(Jo,{data:t,selected:a,headerIcon:m.jsx(Yo,{className:"w-4 h-4 text-cyan-100"}),headerColor:"bg-gradient-to-br from-cyan-500 to-cyan-700",showTargetHandle:!0,showSourceHandle:!0,children:m.jsxs("div",{className:"space-y-2",children:[t.skillType==="official"&&t.skillId&&m.jsx("span",{className:"inline-block px-2 py-0.5 text-xs bg-cyan-900/50 text-cyan-300 rounded",children:t.skillId}),t.skillCategory&&m.jsxs("div",{className:"text-xs text-gray-500",children:["Category: ",t.skillCategory]})]})})}const kj=j.memo(Tj);function jj({data:t,selected:a}){return m.jsx(Jo,{data:t,selected:a,headerIcon:m.jsx(Id,{className:"w-4 h-4 text-pink-100"}),headerColor:"bg-gradient-to-br from-pink-500 to-rose-700",showTargetHandle:!0,showSourceHandle:!0,children:m.jsxs("div",{className:"space-y-2",children:[t.hookEvent&&m.jsx("span",{className:"inline-block px-2 py-0.5 text-xs bg-pink-900/50 text-pink-300 rounded",children:t.hookEvent}),t.hookMatcher&&m.jsx("div",{className:"text-xs text-gray-500 truncate",children:t.hookMatcher})]})})}const Aj=j.memo(jj);function Mj(t){switch(t){case"markdown":case"document":return m.jsx(bd,{className:"w-4 h-4 text-emerald-100"});case"image":return m.jsx(nE,{className:"w-4 h-4 text-emerald-100"});case"webpage":return m.jsx(WS,{className:"w-4 h-4 text-emerald-100"});case"link":return m.jsx(sE,{className:"w-4 h-4 text-emerald-100"});default:return m.jsx(uc,{className:"w-4 h-4 text-emerald-100"})}}function Rj({data:t,selected:a}){return m.jsx(Jo,{data:t,selected:a,headerIcon:Mj(t.outputType),headerColor:"bg-gradient-to-br from-emerald-500 to-green-700",showTargetHandle:!0,showSourceHandle:!1,children:m.jsxs("div",{className:"space-y-2",children:[t.layoutType&&m.jsx("span",{className:"inline-block px-2 py-0.5 text-xs bg-emerald-900/50 text-emerald-300 rounded",children:t.layoutType}),t.result&&m.jsxs("div",{className:"text-xs text-gray-400 truncate max-w-[200px]",children:[t.result.substring(0,50),"..."]})]})})}const zj=j.memo(Rj);function Yy(t,a){const{source:l,target:o}=t;if(l===o)return!1;const s=a.find(f=>f.id===l),c=a.find(f=>f.id===o);return!s||!c?!1:s.type==="output"?(console.warn("Output nodes cannot have outgoing connections"),!1):c.type==="input"?(console.warn("Input nodes cannot have incoming connections"),!1):!0}const Oj={input:Nj,agent:Cj,skill:kj,hook:Aj,output:zj};function Dj(){const{nodes:t,edges:a,setNodes:l,setEdges:o,addEdge:s,setSelectedNode:c}=Oa(),f=dc(C=>C.openStepPanel),[h,g]=j.useState(!1),p=j.useRef([]);j.useEffect(()=>{const C=z=>{z.key==="Shift"&&g(!0)},D=z=>{z.key==="Shift"&&(g(!1),p.current=[])};return window.addEventListener("keydown",C),window.addEventListener("keyup",D),()=>{window.removeEventListener("keydown",C),window.removeEventListener("keyup",D)}},[]);const x=j.useCallback(({nodes:C})=>{if(!h){p.current=[];return}const D=C.map(z=>z.id);if(D.length===2){const[z,O]=D;if(!a.some(G=>G.source===z&&G.target===O||G.source===O&&G.target===z)){const G=t.find(Y=>Y.id===z),ee=t.find(Y=>Y.id===O);if(G&&ee){let Y=z,Z=O;(G.position?.x??0)>(ee.position?.x??0)&&(Y=O,Z=z);const ie={source:Y,target:Z,sourceHandle:null,targetHandle:null};if(Yy(ie,t)){const H={id:`e-${Y}-${Z}`,source:Y,target:Z,animated:!0};o(Md({...ie,animated:!0},a)),s(H),Ag(H,t).catch(Q=>{console.error("Failed to sync edge to filesystem:",Q)})}}}}p.current=D},[h,t,a,o,s]),[y,b]=j.useState(null),w=j.useCallback(C=>{const D=C.filter(O=>O.type==="remove"),z=C.filter(O=>O.type!=="remove");if(z.length>0&&l(qs(z,t)),D.length>0){const O=D.map($=>t.find(G=>G.id===$.id)).filter($=>$!==void 0&&$.type!=="input"&&$.type!=="output");O.length>0?b({changes:D,nodesToDelete:O}):l(qs(D,t))}},[t,l]),E=j.useCallback(()=>{if(!y)return;const{changes:C,nodesToDelete:D}=y;for(const z of D)Sx(z,t).catch(O=>{console.error("Failed to delete node from filesystem:",O)});l(qs(C,t)),b(null)},[y,t,l]),N=j.useCallback(()=>{b(null)},[]),T=j.useCallback(C=>{for(const D of C)if(D.type==="remove"){const z=a.find(O=>O.id===D.id);z&&GE(z,t).catch(O=>{console.error("Failed to remove edge from filesystem:",O)})}o(Lv(C,a))},[a,t,o]),k=j.useCallback(C=>{if(!Yy(C,t))return;const D={id:`e-${C.source}-${C.target}`,source:C.source,target:C.target,animated:!0};o(Md({...C,animated:!0},a)),s(D),Ag(D,t).catch(z=>{console.error("Failed to sync edge to filesystem:",z)})},[t,a,o,s]),A=j.useCallback((C,D)=>{c(D.id),f()},[c,f]),S=j.useCallback(()=>{c(null)},[c]);return m.jsxs(m.Fragment,{children:[m.jsxs(OT,{nodes:t,edges:a,onNodesChange:w,onEdgesChange:T,onConnect:k,onSelectionChange:x,onNodeClick:A,onPaneClick:S,nodeTypes:Oj,defaultViewport:{x:100,y:100,zoom:.7},defaultEdgeOptions:{animated:!0,style:{strokeDasharray:"5 5"}},connectionLineStyle:{strokeDasharray:"5 5"},snapToGrid:!0,snapGrid:[15,15],connectionRadius:40,connectOnClick:!0,selectionOnDrag:!1,multiSelectionKeyCode:"Shift",children:[m.jsx(UT,{variant:Fn.Dots,gap:20,size:1,color:"#333333"}),m.jsx(ZT,{}),m.jsx(lk,{nodeColor:C=>{switch(C.type){case"input":return"#fef3c7";case"agent":return"#4f46e5";case"skill":return"#06b6d4";case"hook":return"#ec4899";case"output":return"#10b981";default:return"#6b7280"}},maskColor:"rgba(0, 0, 0, 0.8)"})]}),y&&m.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50",children:m.jsxs("div",{className:"bg-zinc-800 rounded-lg p-6 max-w-md w-full mx-4 border border-zinc-700 shadow-xl",children:[m.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[m.jsx("div",{className:"w-10 h-10 rounded-full bg-red-500/20 flex items-center justify-center",children:m.jsx("svg",{className:"w-5 h-5 text-red-400",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:m.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})})}),m.jsx("h3",{className:"text-lg font-semibold text-white",children:"노드 삭제 확인"})]}),m.jsxs("p",{className:"text-zinc-300 mb-4",children:["다음 노드를 삭제하시겠습니까? 이 작업은 ",m.jsx("span",{className:"text-red-400 font-medium",children:"파일을 삭제"}),"하며 되돌릴 수 없습니다."]}),m.jsx("ul",{className:"bg-zinc-900 rounded-md p-3 mb-6 space-y-2",children:y.nodesToDelete.map(C=>m.jsxs("li",{className:"flex items-center gap-2 text-sm",children:[m.jsx("span",{className:`px-2 py-0.5 rounded text-xs font-medium ${C.type==="skill"?"bg-cyan-500/20 text-cyan-300":C.type==="agent"?"bg-indigo-500/20 text-indigo-300":C.type==="hook"?"bg-pink-500/20 text-pink-300":"bg-zinc-500/20 text-zinc-300"}`,children:C.type}),m.jsx("span",{className:"text-white",children:C.data.label})]},C.id))}),m.jsxs("div",{className:"flex gap-3 justify-end",children:[m.jsx("button",{onClick:N,className:"px-4 py-2 rounded-md bg-zinc-700 text-zinc-300 hover:bg-zinc-600 transition-colors",children:"취소"}),m.jsx("button",{onClick:E,className:"px-4 py-2 rounded-md bg-red-600 text-white hover:bg-red-500 transition-colors",children:"삭제"})]})]})})]})}async function Hj(t){let a;const{apiMode:l,apiKey:o,proxyUrl:s}=ah.getState(),c={"Content-Type":"application/json","X-API-Mode":l};l==="direct"&&o?c["X-API-Key"]=o:l==="proxy"&&s&&(c["X-Proxy-URL"]=s);try{a=await fetch("/api/generate/workflow",{method:"POST",headers:c,body:JSON.stringify({prompt:t})})}catch{throw new Error("서버에 연결할 수 없습니다. 서버가 실행 중인지 확인하세요.")}if(!a.ok){let g=`서버 오류 (${a.status})`;try{g=(await a.json()).message||g}catch{}throw new Error(g)}let f;try{f=await a.json()}catch{throw new Error("서버 응답을 파싱할 수 없습니다.")}return{workflow:Bj(f),workflowName:f.workflowName}}function Lj(t,a){if(t.length===0)return t;const l=300,o=180,s=100,c=100,f=new Map,h=new Map;t.forEach(A=>{f.set(A.id,[]),h.set(A.id,[])}),a.forEach(A=>{const S=f.get(A.target)||[];S.push(A.source),f.set(A.target,S);const C=h.get(A.source)||[];C.push(A.target),h.set(A.source,C)});const g=t.filter(A=>(f.get(A.id)||[]).length===0),p=new Map,x=[];for(g.forEach(A=>{p.set(A.id,0),x.push({id:A.id,depth:0})}),g.length===0&&t.length>0&&(p.set(t[0].id,0),x.push({id:t[0].id,depth:0}));x.length>0;){const A=x.shift();(h.get(A.id)||[]).forEach(C=>{const D=p.get(C),z=A.depth+1;(D===void 0||z>D)&&(p.set(C,z),x.push({id:C,depth:z}))})}const y=new Map,b=new Set,w=[...t].sort((A,S)=>{const C=p.get(A.id)??0;return(p.get(S.id)??0)-C});function E(A){if(y.has(A))return y.get(A);const S=h.get(A)||[];if(S.length===0)return y.set(A,1),1;let C=0;S.forEach(z=>{C+=E(z)});const D=Math.max(1,C);return y.set(A,D),D}w.forEach(A=>{E(A.id)});const N=new Map;function T(A,S,C,D){if(b.has(A))return;b.add(A);const z=y.get(A)||1,O=D-C,$=C+O/2,G=s+S*l;N.set(A,{x:G,y:$});const ee=h.get(A)||[];if(ee.length>0){let Y=C;ee.forEach(Z=>{const H=(y.get(Z)||1)/z*O;T(Z,S+1,Y,Y+H),Y+=H})}}let k=c;return g.forEach(A=>{const C=(y.get(A.id)||1)*o;b.clear(),T(A.id,0,k,k+C),k+=C}),t.forEach(A=>{N.has(A.id)||(N.set(A.id,{x:s,y:k}),k+=o)}),t.map(A=>{const S=N.get(A.id)||A.position;return{...A,position:S}})}function Bj(t){const a=[],l=new Map,o={x:0,y:0};t.nodes.forEach((f,h)=>{const g=sl();l.set(h,g);const p={label:f.label,description:f.description,status:"idle",usedInputs:[]};switch(f.type){case"input":a.push({id:g,type:"input",position:{...o},data:{...p,inputType:f.config.inputType||"text",placeholder:f.config.placeholder||f.description,value:f.config.defaultValue||"",defaultValue:f.config.defaultValue||""}});break;case"agent":a.push({id:g,type:"agent",position:{...o},data:{...p,role:f.config.role||"custom",tools:f.config.tools||["Read","Write"],model:f.config.model||"sonnet",systemPrompt:f.config.systemPrompt}});break;case"skill":a.push({id:g,type:"skill",position:{...o},data:{...p,skillType:f.config.skillType||"official",skillId:f.config.skillId,skillContent:f.config.skillContent}});break;case"hook":a.push({id:g,type:"hook",position:{...o},data:{...p,hookEvent:f.config.hookEvent||"PreToolUse",hookMatcher:f.config.hookMatcher,hookCommand:f.config.hookCommand}});break;case"output":a.push({id:g,type:"output",position:{...o},data:{...p,outputType:f.config.outputType||"auto"}});break}}),t.edges.forEach(f=>{const h=l.get(f.to),g=l.get(f.from);if(h&&g){const p=a.find(x=>x.id===h);p&&p.data.usedInputs&&p.data.usedInputs.push(g)}});const s=t.edges.map(f=>{const h=l.get(f.from),g=l.get(f.to);return!h||!g?null:{id:`e-${h}-${g}`,source:h,target:g,animated:!0}}).filter(f=>f!==null);return{nodes:Lj(a,s),edges:s}}function Uj(t){const a=t.toLowerCase();if(a.includes("스킬")||a.includes("skill"))return!0;const l=[/만들어\s*(줘|주세요|줘요)/,/작성해\s*(줘|주세요|줘요)/,/생성해\s*(줘|주세요|줘요)/];for(const o of l)if(o.test(t))return!0;return!1}function qj(){const[t,a]=j.useState(""),[l,o]=j.useState(!1),[s,c]=j.useState(null),[f,h]=j.useState(null),[g,p]=j.useState("workflow"),{loadWorkflow:x,addNode:y,setSelectedNode:b,nodes:w}=Oa(),{openConsolePanel:E,openStepPanel:N}=dc(),{addLog:T,clearLogs:k}=fc(),{apiMode:A,apiKey:S,proxyUrl:C}=ah(),D=j.useCallback(ee=>{console.log("[PromptBar] Skill progress:",ee.step,ee.message);const Y=ee.step==="error"?"error":ee.step==="completed"?"success":"info";T(Y,ee.message,void 0,ee.detail)},[T]),z=j.useCallback(ee=>{o(!1),h(`스킬 "${ee.skill.skillName}"이 ${ee.savedPath}에 저장되었습니다!`),a(""),setTimeout(()=>h(null),5e3);const Y=sl(),Z=w.length,ie={id:Y,type:"skill",position:{x:100+Z%3*300,y:100+Math.floor(Z/3)*200},data:{label:ee.skill.skillName,description:ee.skill.description,status:"idle",skillType:"generated",skillId:ee.skill.skillId,skillPath:ee.savedPath}};y(ie),b(Y),N()},[w,y,b,N]),O=j.useCallback(ee=>{o(!1),c(ee.error)},[]);j.useEffect(()=>(ct.on("skill:progress",D),ct.on("skill:completed",z),ct.on("skill:error",O),()=>{ct.off("skill:progress",D),ct.off("skill:completed",z),ct.off("skill:error",O)}),[D,z,O]);const $=async()=>{if(!t.trim()||l)return;o(!0),c(null),h(null);const ee=Uj(t);p(ee?"skill":"workflow");try{if(ee)k(),E(),ct.isConnected()||T("warning","⚠️ 서버 연결 대기 중...",void 0,"잠시 후 자동으로 연결됩니다"),ct.generateSkill({prompt:t,apiMode:A,apiKey:A==="direct"?S:void 0,proxyUrl:A==="proxy"?C:void 0});else{const{workflow:Y,workflowName:Z}=await Hj(t);x({nodes:Y.nodes,edges:Y.edges,name:Z}),a(""),o(!1)}}catch(Y){console.error("Generation failed:",Y);const Z=Y instanceof Error?Y.message:"생성에 실패했습니다.";c(Z),o(!1)}},G=ee=>{ee.key==="Enter"&&!ee.shiftKey&&(ee.preventDefault(),$())};return m.jsxs("div",{className:"bg-surface border border-border rounded-2xl px-5 py-3 shadow-2xl flex items-center gap-3",children:[m.jsx($o,{className:"w-5 h-5 text-accent flex-shrink-0"}),m.jsx("input",{type:"text",value:t,onChange:ee=>a(ee.target.value),onKeyDown:G,placeholder:"Describe your workflow... (e.g., 'Create an HTML page with images')",className:"flex-1 bg-transparent border-none outline-none text-white placeholder-gray-500 text-sm",disabled:l}),m.jsx("button",{onClick:$,disabled:!t.trim()||l,className:`p-2 rounded-full transition-all duration-200 ${t.trim()&&!l?"bg-accent text-white hover:bg-accent-hover hover:scale-105":"bg-surface-hover text-gray-500"}`,title:"Generate Workflow",children:l?m.jsx(Ks,{className:"w-5 h-5 animate-spin"}):m.jsx(vE,{className:"w-5 h-5"})}),m.jsx("div",{className:"absolute -bottom-6 left-1/2 -translate-x-1/2 text-xs whitespace-nowrap",children:s?m.jsx("span",{className:"text-red-400",children:s}):f?m.jsxs("span",{className:"text-green-400 flex items-center gap-1",children:[m.jsx(Pd,{className:"w-3 h-3"}),f]}):l?m.jsxs("span",{className:"text-accent",children:["AI가 ",g==="skill"?"스킬":"워크플로우","을 생성하고 있습니다..."]}):m.jsx("span",{className:"text-gray-600",children:'"스킬 만들어줘" 또는 워크플로우 설명을 입력하세요'})})]})}function Vj(){const{isCollapsed:t,width:a}=dc(),{mergeExistingConfig:l,clearWorkflow:o}=Oa(),{currentProject:s,navigateToPath:c}=nh(),f=j.useRef(!1),h=j.useRef(null);return j.useEffect(()=>{s?.path&&c(s.path)},[s?.path,c]),j.useEffect(()=>{!s?.path||(h.current!==s.path&&(o(),h.current=s.path,f.current=!1),f.current)||(f.current=!0,_1(s.path).then(p=>{p.length>0&&(console.log(`Loaded ${p.length} nodes from ${s.path}/.claude/`),l(p))}).catch(p=>{console.error("Failed to load initial config:",p)}))},[s?.path,l,o]),m.jsx(s1,{children:m.jsxs("div",{className:"flex flex-col h-screen bg-canvas overflow-hidden",children:[m.jsx(yj,{}),m.jsxs("div",{className:"flex flex-1 overflow-hidden",children:[m.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[m.jsx(bj,{}),m.jsxs("div",{className:"flex-1 relative min-h-0",children:[m.jsx(Dj,{}),m.jsx("div",{className:"absolute bottom-6 left-1/2 -translate-x-1/2 w-full max-w-2xl px-4",children:m.jsx(qj,{})})]})]}),!t&&m.jsx("div",{className:"border-l border-border bg-surface flex-shrink-0",style:{width:`${a}px`},children:m.jsx(Ex,{})})]}),m.jsx(_x,{})]})})}function $j(){return m.jsx(rS,{children:m.jsxs(L2,{children:[m.jsx(yd,{path:"/",element:m.jsx(lN,{})}),m.jsx(yd,{path:"/project/:projectName",element:m.jsx(Vj,{})})]})})}qw.createRoot(document.getElementById("root")).render(m.jsx(j.StrictMode,{children:m.jsx($j,{})}));