infrahub-schema-visualizer 0.0.1

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,17 @@
1
+ var PO=Object.defineProperty;var WO=(Vn,gn,Tn)=>gn in Vn?PO(Vn,gn,{enumerable:!0,configurable:!0,writable:!0,value:Tn}):Vn[gn]=Tn;var et=(Vn,gn,Tn)=>WO(Vn,typeof gn!="symbol"?gn+"":gn,Tn);(function(){"use strict";function Vn(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var gn={exports:{}},Tn={};var $h;function W1(){if($h)return Tn;$h=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function l(r,s,c){var u=null;if(c!==void 0&&(u=""+c),s.key!==void 0&&(u=""+s.key),"key"in s){c={};for(var d in s)d!=="key"&&(c[d]=s[d])}else c=s;return s=c.ref,{$$typeof:t,type:r,key:u,ref:s!==void 0?s:null,props:c}}return Tn.Fragment=a,Tn.jsx=l,Tn.jsxs=l,Tn}var Kh;function ew(){return Kh||(Kh=1,gn.exports=W1()),gn.exports}var _=ew(),Tu={exports:{}},jl={},Au={exports:{}},zu={};var Fh;function tw(){return Fh||(Fh=1,(function(t){function a(j,G){var U=j.length;j.push(G);e:for(;0<U;){var P=U-1>>>1,re=j[P];if(0<s(re,G))j[P]=G,j[U]=re,U=P;else break e}}function l(j){return j.length===0?null:j[0]}function r(j){if(j.length===0)return null;var G=j[0],U=j.pop();if(U!==G){j[0]=U;e:for(var P=0,re=j.length,k=re>>>1;P<k;){var Q=2*(P+1)-1,L=j[Q],Y=Q+1,F=j[Y];if(0>s(L,U))Y<re&&0>s(F,L)?(j[P]=F,j[Y]=U,P=Y):(j[P]=L,j[Q]=U,P=Q);else if(Y<re&&0>s(F,U))j[P]=F,j[Y]=U,P=Y;else break e}}return G}function s(j,G){var U=j.sortIndex-G.sortIndex;return U!==0?U:j.id-G.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 u=Date,d=u.now();t.unstable_now=function(){return u.now()-d}}var h=[],m=[],p=1,y=null,v=3,x=!1,w=!1,N=!1,S=!1,M=typeof setTimeout=="function"?setTimeout:null,z=typeof clearTimeout=="function"?clearTimeout:null,E=typeof setImmediate<"u"?setImmediate:null;function T(j){for(var G=l(m);G!==null;){if(G.callback===null)r(m);else if(G.startTime<=j)r(m),G.sortIndex=G.expirationTime,a(h,G);else break;G=l(m)}}function q(j){if(N=!1,T(j),!w)if(l(h)!==null)w=!0,R||(R=!0,V());else{var G=l(m);G!==null&&I(q,G.startTime-j)}}var R=!1,O=-1,C=5,D=-1;function Z(){return S?!0:!(t.unstable_now()-D<C)}function B(){if(S=!1,R){var j=t.unstable_now();D=j;var G=!0;try{e:{w=!1,N&&(N=!1,z(O),O=-1),x=!0;var U=v;try{t:{for(T(j),y=l(h);y!==null&&!(y.expirationTime>j&&Z());){var P=y.callback;if(typeof P=="function"){y.callback=null,v=y.priorityLevel;var re=P(y.expirationTime<=j);if(j=t.unstable_now(),typeof re=="function"){y.callback=re,T(j),G=!0;break t}y===l(h)&&r(h),T(j)}else r(h);y=l(h)}if(y!==null)G=!0;else{var k=l(m);k!==null&&I(q,k.startTime-j),G=!1}}break e}finally{y=null,v=U,x=!1}G=void 0}}finally{G?V():R=!1}}}var V;if(typeof E=="function")V=function(){E(B)};else if(typeof MessageChannel<"u"){var W=new MessageChannel,H=W.port2;W.port1.onmessage=B,V=function(){H.postMessage(null)}}else V=function(){M(B,0)};function I(j,G){O=M(function(){j(t.unstable_now())},G)}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(j){j.callback=null},t.unstable_forceFrameRate=function(j){0>j||125<j?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<j?Math.floor(1e3/j):5},t.unstable_getCurrentPriorityLevel=function(){return v},t.unstable_next=function(j){switch(v){case 1:case 2:case 3:var G=3;break;default:G=v}var U=v;v=G;try{return j()}finally{v=U}},t.unstable_requestPaint=function(){S=!0},t.unstable_runWithPriority=function(j,G){switch(j){case 1:case 2:case 3:case 4:case 5:break;default:j=3}var U=v;v=j;try{return G()}finally{v=U}},t.unstable_scheduleCallback=function(j,G,U){var P=t.unstable_now();switch(typeof U=="object"&&U!==null?(U=U.delay,U=typeof U=="number"&&0<U?P+U:P):U=P,j){case 1:var re=-1;break;case 2:re=250;break;case 5:re=1073741823;break;case 4:re=1e4;break;default:re=5e3}return re=U+re,j={id:p++,callback:G,priorityLevel:j,startTime:U,expirationTime:re,sortIndex:-1},U>P?(j.sortIndex=U,a(m,j),l(h)===null&&j===l(m)&&(N?(z(O),O=-1):N=!0,I(q,U-P))):(j.sortIndex=re,a(h,j),w||x||(w=!0,R||(R=!0,V()))),j},t.unstable_shouldYield=Z,t.unstable_wrapCallback=function(j){var G=v;return function(){var U=v;v=G;try{return j.apply(this,arguments)}finally{v=U}}}})(zu)),zu}var Jh;function nw(){return Jh||(Jh=1,Au.exports=tw()),Au.exports}var Ou={exports:{}},Te={};var Ph;function iw(){if(Ph)return Te;Ph=1;var t=Symbol.for("react.transitional.element"),a=Symbol.for("react.portal"),l=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),y=Symbol.for("react.activity"),v=Symbol.iterator;function x(k){return k===null||typeof k!="object"?null:(k=v&&k[v]||k["@@iterator"],typeof k=="function"?k:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,S={};function M(k,Q,L){this.props=k,this.context=Q,this.refs=S,this.updater=L||w}M.prototype.isReactComponent={},M.prototype.setState=function(k,Q){if(typeof k!="object"&&typeof k!="function"&&k!=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,k,Q,"setState")},M.prototype.forceUpdate=function(k){this.updater.enqueueForceUpdate(this,k,"forceUpdate")};function z(){}z.prototype=M.prototype;function E(k,Q,L){this.props=k,this.context=Q,this.refs=S,this.updater=L||w}var T=E.prototype=new z;T.constructor=E,N(T,M.prototype),T.isPureReactComponent=!0;var q=Array.isArray;function R(){}var O={H:null,A:null,T:null,S:null},C=Object.prototype.hasOwnProperty;function D(k,Q,L){var Y=L.ref;return{$$typeof:t,type:k,key:Q,ref:Y!==void 0?Y:null,props:L}}function Z(k,Q){return D(k.type,Q,k.props)}function B(k){return typeof k=="object"&&k!==null&&k.$$typeof===t}function V(k){var Q={"=":"=0",":":"=2"};return"$"+k.replace(/[=:]/g,function(L){return Q[L]})}var W=/\/+/g;function H(k,Q){return typeof k=="object"&&k!==null&&k.key!=null?V(""+k.key):Q.toString(36)}function I(k){switch(k.status){case"fulfilled":return k.value;case"rejected":throw k.reason;default:switch(typeof k.status=="string"?k.then(R,R):(k.status="pending",k.then(function(Q){k.status==="pending"&&(k.status="fulfilled",k.value=Q)},function(Q){k.status==="pending"&&(k.status="rejected",k.reason=Q)})),k.status){case"fulfilled":return k.value;case"rejected":throw k.reason}}throw k}function j(k,Q,L,Y,F){var ne=typeof k;(ne==="undefined"||ne==="boolean")&&(k=null);var ae=!1;if(k===null)ae=!0;else switch(ne){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(k.$$typeof){case t:case a:ae=!0;break;case p:return ae=k._init,j(ae(k._payload),Q,L,Y,F)}}if(ae)return F=F(k),ae=Y===""?"."+H(k,0):Y,q(F)?(L="",ae!=null&&(L=ae.replace(W,"$&/")+"/"),j(F,Q,L,"",function(pe){return pe})):F!=null&&(B(F)&&(F=Z(F,L+(F.key==null||k&&k.key===F.key?"":(""+F.key).replace(W,"$&/")+"/")+ae)),Q.push(F)),1;ae=0;var oe=Y===""?".":Y+":";if(q(k))for(var fe=0;fe<k.length;fe++)Y=k[fe],ne=oe+H(Y,fe),ae+=j(Y,Q,L,ne,F);else if(fe=x(k),typeof fe=="function")for(k=fe.call(k),fe=0;!(Y=k.next()).done;)Y=Y.value,ne=oe+H(Y,fe++),ae+=j(Y,Q,L,ne,F);else if(ne==="object"){if(typeof k.then=="function")return j(I(k),Q,L,Y,F);throw Q=String(k),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(k).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return ae}function G(k,Q,L){if(k==null)return k;var Y=[],F=0;return j(k,Y,"","",function(ne){return Q.call(L,ne,F++)}),Y}function U(k){if(k._status===-1){var Q=k._result;Q=Q(),Q.then(function(L){(k._status===0||k._status===-1)&&(k._status=1,k._result=L)},function(L){(k._status===0||k._status===-1)&&(k._status=2,k._result=L)}),k._status===-1&&(k._status=0,k._result=Q)}if(k._status===1)return k._result.default;throw k._result}var P=typeof reportError=="function"?reportError:function(k){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof k=="object"&&k!==null&&typeof k.message=="string"?String(k.message):String(k),error:k});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",k);return}console.error(k)},re={map:G,forEach:function(k,Q,L){G(k,function(){Q.apply(this,arguments)},L)},count:function(k){var Q=0;return G(k,function(){Q++}),Q},toArray:function(k){return G(k,function(Q){return Q})||[]},only:function(k){if(!B(k))throw Error("React.Children.only expected to receive a single React element child.");return k}};return Te.Activity=y,Te.Children=re,Te.Component=M,Te.Fragment=l,Te.Profiler=s,Te.PureComponent=E,Te.StrictMode=r,Te.Suspense=h,Te.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,Te.__COMPILER_RUNTIME={__proto__:null,c:function(k){return O.H.useMemoCache(k)}},Te.cache=function(k){return function(){return k.apply(null,arguments)}},Te.cacheSignal=function(){return null},Te.cloneElement=function(k,Q,L){if(k==null)throw Error("The argument must be a React element, but you passed "+k+".");var Y=N({},k.props),F=k.key;if(Q!=null)for(ne in Q.key!==void 0&&(F=""+Q.key),Q)!C.call(Q,ne)||ne==="key"||ne==="__self"||ne==="__source"||ne==="ref"&&Q.ref===void 0||(Y[ne]=Q[ne]);var ne=arguments.length-2;if(ne===1)Y.children=L;else if(1<ne){for(var ae=Array(ne),oe=0;oe<ne;oe++)ae[oe]=arguments[oe+2];Y.children=ae}return D(k.type,F,Y)},Te.createContext=function(k){return k={$$typeof:u,_currentValue:k,_currentValue2:k,_threadCount:0,Provider:null,Consumer:null},k.Provider=k,k.Consumer={$$typeof:c,_context:k},k},Te.createElement=function(k,Q,L){var Y,F={},ne=null;if(Q!=null)for(Y in Q.key!==void 0&&(ne=""+Q.key),Q)C.call(Q,Y)&&Y!=="key"&&Y!=="__self"&&Y!=="__source"&&(F[Y]=Q[Y]);var ae=arguments.length-2;if(ae===1)F.children=L;else if(1<ae){for(var oe=Array(ae),fe=0;fe<ae;fe++)oe[fe]=arguments[fe+2];F.children=oe}if(k&&k.defaultProps)for(Y in ae=k.defaultProps,ae)F[Y]===void 0&&(F[Y]=ae[Y]);return D(k,ne,F)},Te.createRef=function(){return{current:null}},Te.forwardRef=function(k){return{$$typeof:d,render:k}},Te.isValidElement=B,Te.lazy=function(k){return{$$typeof:p,_payload:{_status:-1,_result:k},_init:U}},Te.memo=function(k,Q){return{$$typeof:m,type:k,compare:Q===void 0?null:Q}},Te.startTransition=function(k){var Q=O.T,L={};O.T=L;try{var Y=k(),F=O.S;F!==null&&F(L,Y),typeof Y=="object"&&Y!==null&&typeof Y.then=="function"&&Y.then(R,P)}catch(ne){P(ne)}finally{Q!==null&&L.types!==null&&(Q.types=L.types),O.T=Q}},Te.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},Te.use=function(k){return O.H.use(k)},Te.useActionState=function(k,Q,L){return O.H.useActionState(k,Q,L)},Te.useCallback=function(k,Q){return O.H.useCallback(k,Q)},Te.useContext=function(k){return O.H.useContext(k)},Te.useDebugValue=function(){},Te.useDeferredValue=function(k,Q){return O.H.useDeferredValue(k,Q)},Te.useEffect=function(k,Q){return O.H.useEffect(k,Q)},Te.useEffectEvent=function(k){return O.H.useEffectEvent(k)},Te.useId=function(){return O.H.useId()},Te.useImperativeHandle=function(k,Q,L){return O.H.useImperativeHandle(k,Q,L)},Te.useInsertionEffect=function(k,Q){return O.H.useInsertionEffect(k,Q)},Te.useLayoutEffect=function(k,Q){return O.H.useLayoutEffect(k,Q)},Te.useMemo=function(k,Q){return O.H.useMemo(k,Q)},Te.useOptimistic=function(k,Q){return O.H.useOptimistic(k,Q)},Te.useReducer=function(k,Q,L){return O.H.useReducer(k,Q,L)},Te.useRef=function(k){return O.H.useRef(k)},Te.useState=function(k){return O.H.useState(k)},Te.useSyncExternalStore=function(k,Q,L){return O.H.useSyncExternalStore(k,Q,L)},Te.useTransition=function(){return O.H.useTransition()},Te.version="19.2.3",Te}var Wh;function Rl(){return Wh||(Wh=1,Ou.exports=iw()),Ou.exports}var ju={exports:{}},jt={};var em;function aw(){if(em)return jt;em=1;var t=Rl();function a(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)m+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function l(){}var r={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(h,m,p){var y=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:y==null?null:""+y,children:h,containerInfo:m,implementation:p}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return jt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,jt.createPortal=function(h,m){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(a(299));return c(h,m,null,p)},jt.flushSync=function(h){var m=u.T,p=r.p;try{if(u.T=null,r.p=2,h)return h()}finally{u.T=m,r.p=p,r.d.f()}},jt.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(h,m))},jt.prefetchDNS=function(h){typeof h=="string"&&r.d.D(h)},jt.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var p=m.as,y=d(p,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;p==="style"?r.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:y,integrity:v,fetchPriority:x}):p==="script"&&r.d.X(h,{crossOrigin:y,integrity:v,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},jt.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var p=d(m.as,m.crossOrigin);r.d.M(h,{crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(h)},jt.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var p=m.as,y=d(p,m.crossOrigin);r.d.L(h,p,{crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},jt.preloadModule=function(h,m){if(typeof h=="string")if(m){var p=d(m.as,m.crossOrigin);r.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:p,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(h)},jt.requestFormReset=function(h){r.d.r(h)},jt.unstable_batchedUpdates=function(h,m){return h(m)},jt.useFormState=function(h,m,p){return u.H.useFormState(h,m,p)},jt.useFormStatus=function(){return u.H.useHostTransitionStatus()},jt.version="19.2.3",jt}var tm;function nm(){if(tm)return ju.exports;tm=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(),ju.exports=aw(),ju.exports}var im;function lw(){if(im)return jl;im=1;var t=nw(),a=Rl(),l=nm();function r(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 u(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 d(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 h(e){if(c(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(r(188));return n!==e?null:e}for(var i=e,o=n;;){var f=i.return;if(f===null)break;var g=f.alternate;if(g===null){if(o=f.return,o!==null){i=o;continue}break}if(f.child===g.child){for(g=f.child;g;){if(g===i)return h(f),e;if(g===o)return h(f),n;g=g.sibling}throw Error(r(188))}if(i.return!==o.return)i=f,o=g;else{for(var b=!1,A=f.child;A;){if(A===i){b=!0,i=f,o=g;break}if(A===o){b=!0,o=f,i=g;break}A=A.sibling}if(!b){for(A=g.child;A;){if(A===i){b=!0,i=g,o=f;break}if(A===o){b=!0,o=g,i=f;break}A=A.sibling}if(!b)throw Error(r(189))}}if(i.alternate!==o)throw Error(r(190))}if(i.tag!==3)throw Error(r(188));return i.stateNode.current===i?e:n}function p(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=p(e),n!==null)return n;e=e.sibling}return null}var y=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),w=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),M=Symbol.for("react.profiler"),z=Symbol.for("react.consumer"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),q=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),C=Symbol.for("react.lazy"),D=Symbol.for("react.activity"),Z=Symbol.for("react.memo_cache_sentinel"),B=Symbol.iterator;function V(e){return e===null||typeof e!="object"?null:(e=B&&e[B]||e["@@iterator"],typeof e=="function"?e:null)}var W=Symbol.for("react.client.reference");function H(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===W?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case M:return"Profiler";case S:return"StrictMode";case q:return"Suspense";case R:return"SuspenseList";case D:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case w:return"Portal";case E:return e.displayName||"Context";case z:return(e._context.displayName||"Context")+".Consumer";case T: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 C:n=e._payload,e=e._init;try{return H(e(n))}catch{}}return null}var I=Array.isArray,j=a.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G=l.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U={pending:!1,data:null,method:null,action:null},P=[],re=-1;function k(e){return{current:e}}function Q(e){0>re||(e.current=P[re],P[re]=null,re--)}function L(e,n){re++,P[re]=e.current,e.current=n}var Y=k(null),F=k(null),ne=k(null),ae=k(null);function oe(e,n){switch(L(ne,n),L(F,e),L(Y,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?S1(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=S1(n),e=E1(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Q(Y),L(Y,e)}function fe(){Q(Y),Q(F),Q(ne)}function pe(e){e.memoizedState!==null&&L(ae,e);var n=Y.current,i=E1(n,e.type);n!==i&&(L(F,e),L(Y,i))}function Ee(e){F.current===e&&(Q(Y),Q(F)),ae.current===e&&(Q(ae),no._currentValue=U)}var ge,me;function Me(e){if(ge===void 0)try{throw Error()}catch(i){var n=i.stack.trim().match(/\n( *(at )?)/);ge=n&&n[1]||"",me=-1<i.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+ge+e+me}var He=!1;function Ge(e,n){if(!e||He)return"";He=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ce=function(){throw Error()};if(Object.defineProperty(ce.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ce,[])}catch(le){var ie=le}Reflect.construct(e,[],ce)}else{try{ce.call()}catch(le){ie=le}e.call(ce.prototype)}}else{try{throw Error()}catch(le){ie=le}(ce=e())&&typeof ce.catch=="function"&&ce.catch(function(){})}}catch(le){if(le&&ie&&typeof le.stack=="string")return[le.stack,ie.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var f=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");f&&f.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var g=o.DetermineComponentFrameRoot(),b=g[0],A=g[1];if(b&&A){var X=b.split(`
4
+ `),te=A.split(`
5
+ `);for(f=o=0;o<X.length&&!X[o].includes("DetermineComponentFrameRoot");)o++;for(;f<te.length&&!te[f].includes("DetermineComponentFrameRoot");)f++;if(o===X.length||f===te.length)for(o=X.length-1,f=te.length-1;1<=o&&0<=f&&X[o]!==te[f];)f--;for(;1<=o&&0<=f;o--,f--)if(X[o]!==te[f]){if(o!==1||f!==1)do if(o--,f--,0>f||X[o]!==te[f]){var se=`
6
+ `+X[o].replace(" at new "," at ");return e.displayName&&se.includes("<anonymous>")&&(se=se.replace("<anonymous>",e.displayName)),se}while(1<=o&&0<=f);break}}}finally{He=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?Me(i):""}function dt(e,n){switch(e.tag){case 26:case 27:case 5:return Me(e.type);case 16:return Me("Lazy");case 13:return e.child!==n&&n!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return Ge(e.type,!1);case 11:return Ge(e.type.render,!1);case 1:return Ge(e.type,!0);case 31:return Me("Activity");default:return""}}function Bt(e){try{var n="",i=null;do n+=dt(e,i),i=e,e=e.return;while(e);return n}catch(o){return`
7
+ Error generating stack: `+o.message+`
8
+ `+o.stack}}var Dt=Object.prototype.hasOwnProperty,Ft=t.unstable_scheduleCallback,Sn=t.unstable_cancelCallback,Rn=t.unstable_shouldYield,Kn=t.unstable_requestPaint,xt=t.unstable_now,Ni=t.unstable_getCurrentPriorityLevel,En=t.unstable_ImmediatePriority,Dn=t.unstable_UserBlockingPriority,kn=t.unstable_NormalPriority,fr=t.unstable_LowPriority,Ci=t.unstable_IdlePriority,dr=t.log,hr=t.unstable_setDisableYieldValue,Fn=null,Ct=null;function rn(e){if(typeof dr=="function"&&hr(e),Ct&&typeof Ct.setStrictMode=="function")try{Ct.setStrictMode(Fn,e)}catch{}}var Mt=Math.clz32?Math.clz32:Se,de=Math.log,he=Math.LN2;function Se(e){return e>>>=0,e===0?32:31-(de(e)/he|0)|0}var Ne=256,ze=262144,Qe=4194304;function Ve(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 ht(e,n,i){var o=e.pendingLanes;if(o===0)return 0;var f=0,g=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var A=o&134217727;return A!==0?(o=A&~g,o!==0?f=Ve(o):(b&=A,b!==0?f=Ve(b):i||(i=A&~e,i!==0&&(f=Ve(i))))):(A=o&~g,A!==0?f=Ve(A):b!==0?f=Ve(b):i||(i=o&~e,i!==0&&(f=Ve(i)))),f===0?0:n!==0&&n!==f&&(n&g)===0&&(g=f&-f,i=n&-n,g>=i||g===32&&(i&4194048)!==0)?n:f}function Jt(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function wt(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 Ka(){var e=Qe;return Qe<<=1,(Qe&62914560)===0&&(Qe=4194304),e}function Jn(e){for(var n=[],i=0;31>i;i++)n.push(e);return n}function fa(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Bf(e,n,i,o,f,g){var b=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 A=e.entanglements,X=e.expirationTimes,te=e.hiddenUpdates;for(i=b&~i;0<i;){var se=31-Mt(i),ce=1<<se;A[se]=0,X[se]=-1;var ie=te[se];if(ie!==null)for(te[se]=null,se=0;se<ie.length;se++){var le=ie[se];le!==null&&(le.lane&=-536870913)}i&=~ce}o!==0&&rs(e,o,0),g!==0&&f===0&&e.tag!==0&&(e.suspendedLanes|=g&~(b&~n))}function rs(e,n,i){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Mt(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|i&261930}function os(e,n){var i=e.entangledLanes|=n;for(e=e.entanglements;i;){var o=31-Mt(i),f=1<<o;f&n|e[o]&n&&(e[o]|=n),i&=~f}}function ss(e,n){var i=n&-n;return i=(i&42)!==0?1:mr(i),(i&(e.suspendedLanes|n))!==0?0:i}function mr(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 gr(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function us(){var e=G.p;return e!==0?e:(e=window.event,e===void 0?32:Q1(e.type))}function cs(e,n){var i=G.p;try{return G.p=e,n()}finally{G.p=i}}var Hn=Math.random().toString(36).slice(2),St="__reactFiber$"+Hn,Rt="__reactProps$"+Hn,Pn="__reactContainer$"+Hn,Fa="__reactEvents$"+Hn,fs="__reactListeners$"+Hn,qf="__reactHandles$"+Hn,ds="__reactResources$"+Hn,da="__reactMarker$"+Hn;function pr(e){delete e[St],delete e[Rt],delete e[Fa],delete e[fs],delete e[qf]}function Mi(e){var n=e[St];if(n)return n;for(var i=e.parentNode;i;){if(n=i[Pn]||i[St]){if(i=n.alternate,n.child!==null||i!==null&&i.child!==null)for(e=z1(e);e!==null;){if(i=e[St])return i;e=z1(e)}return n}e=i,i=e.parentNode}return null}function Ti(e){if(e=e[St]||e[Pn]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function Ai(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function zi(e){var n=e[ds];return n||(n=e[ds]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function mt(e){e[da]=!0}var hs=new Set,ms={};function Wn(e,n){Oi(e,n),Oi(e+"Capture",n)}function Oi(e,n){for(ms[e]=n,e=0;e<n.length;e++)hs.add(n[e])}var Uf=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]*$"),yr={},gs={};function Vf(e){return Dt.call(gs,e)?!0:Dt.call(yr,e)?!1:Uf.test(e)?gs[e]=!0:(yr[e]=!0,!1)}function Ja(e,n,i){if(Vf(n))if(i===null)e.removeAttribute(n);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var o=n.toLowerCase().slice(0,5);if(o!=="data-"&&o!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+i)}}function Pa(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 _n(e,n,i,o){if(o===null)e.removeAttribute(i);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(n,i,""+o)}}function qt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ps(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Yf(e,n,i){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var f=o.get,g=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return f.call(this)},set:function(b){i=""+b,g.call(this,b)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return i},setValue:function(b){i=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Wa(e){if(!e._valueTracker){var n=ps(e)?"checked":"value";e._valueTracker=Yf(e,n,""+e[n])}}function ys(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var i=n.getValue(),o="";return e&&(o=ps(e)?e.checked?"true":"false":e.value),e=o,e!==i?(n.setValue(e),!0):!1}function ha(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 Gf=/[\n"\\]/g;function Ut(e){return e.replace(Gf,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function ma(e,n,i,o,f,g,b,A){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+qt(n)):e.value!==""+qt(n)&&(e.value=""+qt(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?vr(e,b,qt(n)):i!=null?vr(e,b,qt(i)):o!=null&&e.removeAttribute("value"),f==null&&g!=null&&(e.defaultChecked=!!g),f!=null&&(e.checked=f&&typeof f!="function"&&typeof f!="symbol"),A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"?e.name=""+qt(A):e.removeAttribute("name")}function vs(e,n,i,o,f,g,b,A){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(e.type=g),n!=null||i!=null){if(!(g!=="submit"&&g!=="reset"||n!=null)){Wa(e);return}i=i!=null?""+qt(i):"",n=n!=null?""+qt(n):i,A||n===e.value||(e.value=n),e.defaultValue=n}o=o??f,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=A?e.checked:!!o,e.defaultChecked=!!o,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Wa(e)}function vr(e,n,i){n==="number"&&ha(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function ei(e,n,i,o){if(e=e.options,n){n={};for(var f=0;f<i.length;f++)n["$"+i[f]]=!0;for(i=0;i<e.length;i++)f=n.hasOwnProperty("$"+e[i].value),e[i].selected!==f&&(e[i].selected=f),f&&o&&(e[i].defaultSelected=!0)}else{for(i=""+qt(i),n=null,f=0;f<e.length;f++){if(e[f].value===i){e[f].selected=!0,o&&(e[f].defaultSelected=!0);return}n!==null||e[f].disabled||(n=e[f])}n!==null&&(n.selected=!0)}}function yv(e,n,i){if(n!=null&&(n=""+qt(n),n!==e.value&&(e.value=n),i==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=i!=null?""+qt(i):""}function vv(e,n,i,o){if(n==null){if(o!=null){if(i!=null)throw Error(r(92));if(I(o)){if(1<o.length)throw Error(r(93));o=o[0]}i=o}i==null&&(i=""),n=i}i=qt(n),e.defaultValue=i,o=e.textContent,o===i&&o!==""&&o!==null&&(e.value=o),Wa(e)}function el(e,n){if(n){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=n;return}}e.textContent=n}var I3=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 bv(e,n,i){var o=n.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,i):typeof i!="number"||i===0||I3.has(n)?n==="float"?e.cssFloat=i:e[n]=(""+i).trim():e[n]=i+"px"}function xv(e,n,i){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,i!=null){for(var o in i)!i.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var f in n)o=n[f],n.hasOwnProperty(f)&&i[f]!==o&&bv(e,f,o)}else for(var g in n)n.hasOwnProperty(g)&&bv(e,g,n[g])}function Xf(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 $3=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"]]),K3=/^[\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 bs(e){return K3.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function ti(){}var Zf=null;function Qf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tl=null,nl=null;function wv(e){var n=Ti(e);if(n&&(e=n.stateNode)){var i=e[Rt]||null;e:switch(e=n.stateNode,n.type){case"input":if(ma(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="'+Ut(""+n)+'"][type="radio"]'),n=0;n<i.length;n++){var o=i[n];if(o!==e&&o.form===e.form){var f=o[Rt]||null;if(!f)throw Error(r(90));ma(o,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name)}}for(n=0;n<i.length;n++)o=i[n],o.form===e.form&&ys(o)}break e;case"textarea":yv(e,i.value,i.defaultValue);break e;case"select":n=i.value,n!=null&&ei(e,!!i.multiple,n,!1)}}}var If=!1;function Sv(e,n,i){if(If)return e(n,i);If=!0;try{var o=e(n);return o}finally{if(If=!1,(tl!==null||nl!==null)&&(ru(),tl&&(n=tl,e=nl,nl=tl=null,wv(n),e)))for(n=0;n<e.length;n++)wv(e[n])}}function br(e,n){var i=e.stateNode;if(i===null)return null;var o=i[Rt]||null;if(o===null)return null;i=o[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":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(r(231,n,typeof i));return i}var ni=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),$f=!1;if(ni)try{var xr={};Object.defineProperty(xr,"passive",{get:function(){$f=!0}}),window.addEventListener("test",xr,xr),window.removeEventListener("test",xr,xr)}catch{$f=!1}var ji=null,Kf=null,xs=null;function Ev(){if(xs)return xs;var e,n=Kf,i=n.length,o,f="value"in ji?ji.value:ji.textContent,g=f.length;for(e=0;e<i&&n[e]===f[e];e++);var b=i-e;for(o=1;o<=b&&n[i-o]===f[g-o];o++);return xs=f.slice(e,1<o?1-o:void 0)}function ws(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 Ss(){return!0}function _v(){return!1}function Vt(e){function n(i,o,f,g,b){this._reactName=i,this._targetInst=f,this.type=o,this.nativeEvent=g,this.target=b,this.currentTarget=null;for(var A in e)e.hasOwnProperty(A)&&(i=e[A],this[A]=i?i(g):g[A]);return this.isDefaultPrevented=(g.defaultPrevented!=null?g.defaultPrevented:g.returnValue===!1)?Ss:_v,this.isPropagationStopped=_v,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=Ss)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Ss)},persist:function(){},isPersistent:Ss}),n}var ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Es=Vt(ga),wr=y({},ga,{view:0,detail:0}),F3=Vt(wr),Ff,Jf,Sr,_s=y({},wr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Wf,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!==Sr&&(Sr&&e.type==="mousemove"?(Ff=e.screenX-Sr.screenX,Jf=e.screenY-Sr.screenY):Jf=Ff=0,Sr=e),Ff)},movementY:function(e){return"movementY"in e?e.movementY:Jf}}),Nv=Vt(_s),J3=y({},_s,{dataTransfer:0}),P3=Vt(J3),W3=y({},wr,{relatedTarget:0}),Pf=Vt(W3),ez=y({},ga,{animationName:0,elapsedTime:0,pseudoElement:0}),tz=Vt(ez),nz=y({},ga,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),iz=Vt(nz),az=y({},ga,{data:0}),Cv=Vt(az),lz={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rz={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"},oz={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sz(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=oz[e])?!!n[e]:!1}function Wf(){return sz}var uz=y({},wr,{key:function(e){if(e.key){var n=lz[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ws(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?rz[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Wf,charCode:function(e){return e.type==="keypress"?ws(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ws(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),cz=Vt(uz),fz=y({},_s,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mv=Vt(fz),dz=y({},wr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Wf}),hz=Vt(dz),mz=y({},ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),gz=Vt(mz),pz=y({},_s,{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}),yz=Vt(pz),vz=y({},ga,{newState:0,oldState:0}),bz=Vt(vz),xz=[9,13,27,32],ed=ni&&"CompositionEvent"in window,Er=null;ni&&"documentMode"in document&&(Er=document.documentMode);var wz=ni&&"TextEvent"in window&&!Er,Tv=ni&&(!ed||Er&&8<Er&&11>=Er),Av=" ",zv=!1;function Ov(e,n){switch(e){case"keyup":return xz.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function jv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var il=!1;function Sz(e,n){switch(e){case"compositionend":return jv(n);case"keypress":return n.which!==32?null:(zv=!0,Av);case"textInput":return e=n.data,e===Av&&zv?null:e;default:return null}}function Ez(e,n){if(il)return e==="compositionend"||!ed&&Ov(e,n)?(e=Ev(),xs=Kf=ji=null,il=!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 Tv&&n.locale!=="ko"?null:n.data;default:return null}}var _z={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 Rv(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!_z[e.type]:n==="textarea"}function Dv(e,n,i,o){tl?nl?nl.push(o):nl=[o]:tl=o,n=hu(n,"onChange"),0<n.length&&(i=new Es("onChange","change",null,i,o),e.push({event:i,listeners:n}))}var _r=null,Nr=null;function Nz(e){p1(e,0)}function Ns(e){var n=Ai(e);if(ys(n))return e}function kv(e,n){if(e==="change")return n}var Hv=!1;if(ni){var td;if(ni){var nd="oninput"in document;if(!nd){var Lv=document.createElement("div");Lv.setAttribute("oninput","return;"),nd=typeof Lv.oninput=="function"}td=nd}else td=!1;Hv=td&&(!document.documentMode||9<document.documentMode)}function Bv(){_r&&(_r.detachEvent("onpropertychange",qv),Nr=_r=null)}function qv(e){if(e.propertyName==="value"&&Ns(Nr)){var n=[];Dv(n,Nr,e,Qf(e)),Sv(Nz,n)}}function Cz(e,n,i){e==="focusin"?(Bv(),_r=n,Nr=i,_r.attachEvent("onpropertychange",qv)):e==="focusout"&&Bv()}function Mz(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ns(Nr)}function Tz(e,n){if(e==="click")return Ns(n)}function Az(e,n){if(e==="input"||e==="change")return Ns(n)}function zz(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:zz;function Cr(e,n){if(Pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var i=Object.keys(e),o=Object.keys(n);if(i.length!==o.length)return!1;for(o=0;o<i.length;o++){var f=i[o];if(!Dt.call(n,f)||!Pt(e[f],n[f]))return!1}return!0}function Uv(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Vv(e,n){var i=Uv(e);e=0;for(var o;i;){if(i.nodeType===3){if(o=e+i.textContent.length,e<=n&&o>=n)return{node:i,offset:n-e};e=o}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=Uv(i)}}function Yv(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Yv(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Gv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ha(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=ha(e.document)}return n}function id(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 Oz=ni&&"documentMode"in document&&11>=document.documentMode,al=null,ad=null,Mr=null,ld=!1;function Xv(e,n,i){var o=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;ld||al==null||al!==ha(o)||(o=al,"selectionStart"in o&&id(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),Mr&&Cr(Mr,o)||(Mr=o,o=hu(ad,"onSelect"),0<o.length&&(n=new Es("onSelect","select",null,n,i),e.push({event:n,listeners:o}),n.target=al)))}function pa(e,n){var i={};return i[e.toLowerCase()]=n.toLowerCase(),i["Webkit"+e]="webkit"+n,i["Moz"+e]="moz"+n,i}var ll={animationend:pa("Animation","AnimationEnd"),animationiteration:pa("Animation","AnimationIteration"),animationstart:pa("Animation","AnimationStart"),transitionrun:pa("Transition","TransitionRun"),transitionstart:pa("Transition","TransitionStart"),transitioncancel:pa("Transition","TransitionCancel"),transitionend:pa("Transition","TransitionEnd")},rd={},Zv={};ni&&(Zv=document.createElement("div").style,"AnimationEvent"in window||(delete ll.animationend.animation,delete ll.animationiteration.animation,delete ll.animationstart.animation),"TransitionEvent"in window||delete ll.transitionend.transition);function ya(e){if(rd[e])return rd[e];if(!ll[e])return e;var n=ll[e],i;for(i in n)if(n.hasOwnProperty(i)&&i in Zv)return rd[e]=n[i];return e}var Qv=ya("animationend"),Iv=ya("animationiteration"),$v=ya("animationstart"),jz=ya("transitionrun"),Rz=ya("transitionstart"),Dz=ya("transitioncancel"),Kv=ya("transitionend"),Fv=new Map,od="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(" ");od.push("scrollEnd");function Nn(e,n){Fv.set(e,n),Wn(n,[e])}var Cs=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)},on=[],rl=0,sd=0;function Ms(){for(var e=rl,n=sd=rl=0;n<e;){var i=on[n];on[n++]=null;var o=on[n];on[n++]=null;var f=on[n];on[n++]=null;var g=on[n];if(on[n++]=null,o!==null&&f!==null){var b=o.pending;b===null?f.next=f:(f.next=b.next,b.next=f),o.pending=f}g!==0&&Jv(i,f,g)}}function Ts(e,n,i,o){on[rl++]=e,on[rl++]=n,on[rl++]=i,on[rl++]=o,sd|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function ud(e,n,i,o){return Ts(e,n,i,o),As(e)}function va(e,n){return Ts(e,null,null,n),As(e)}function Jv(e,n,i){e.lanes|=i;var o=e.alternate;o!==null&&(o.lanes|=i);for(var f=!1,g=e.return;g!==null;)g.childLanes|=i,o=g.alternate,o!==null&&(o.childLanes|=i),g.tag===22&&(e=g.stateNode,e===null||e._visibility&1||(f=!0)),e=g,g=g.return;return e.tag===3?(g=e.stateNode,f&&n!==null&&(f=31-Mt(i),e=g.hiddenUpdates,o=e[f],o===null?e[f]=[n]:o.push(n),n.lane=i|536870912),g):null}function As(e){if(50<Kr)throw Kr=0,vh=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ol={};function kz(e,n,i,o){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=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Wt(e,n,i,o){return new kz(e,n,i,o)}function cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ii(e,n){var i=e.alternate;return i===null?(i=Wt(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 Pv(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 zs(e,n,i,o,f,g){var b=0;if(o=e,typeof e=="function")cd(e)&&(b=1);else if(typeof e=="string")b=UO(e,i,Y.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case D:return e=Wt(31,i,n,f),e.elementType=D,e.lanes=g,e;case N:return ba(i.children,f,g,n);case S:b=8,f|=24;break;case M:return e=Wt(12,i,n,f|2),e.elementType=M,e.lanes=g,e;case q:return e=Wt(13,i,n,f),e.elementType=q,e.lanes=g,e;case R:return e=Wt(19,i,n,f),e.elementType=R,e.lanes=g,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case E:b=10;break e;case z:b=9;break e;case T:b=11;break e;case O:b=14;break e;case C:b=16,o=null;break e}b=29,i=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=Wt(b,i,n,f),n.elementType=e,n.type=o,n.lanes=g,n}function ba(e,n,i,o){return e=Wt(7,e,o,n),e.lanes=i,e}function fd(e,n,i){return e=Wt(6,e,null,n),e.lanes=i,e}function Wv(e){var n=Wt(18,null,null,0);return n.stateNode=e,n}function dd(e,n,i){return n=Wt(4,e.children!==null?e.children:[],e.key,n),n.lanes=i,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var eb=new WeakMap;function sn(e,n){if(typeof e=="object"&&e!==null){var i=eb.get(e);return i!==void 0?i:(n={value:e,source:n,stack:Bt(n)},eb.set(e,n),n)}return{value:e,source:n,stack:Bt(n)}}var sl=[],ul=0,Os=null,Tr=0,un=[],cn=0,Ri=null,Ln=1,Bn="";function ai(e,n){sl[ul++]=Tr,sl[ul++]=Os,Os=e,Tr=n}function tb(e,n,i){un[cn++]=Ln,un[cn++]=Bn,un[cn++]=Ri,Ri=e;var o=Ln;e=Bn;var f=32-Mt(o)-1;o&=~(1<<f),i+=1;var g=32-Mt(n)+f;if(30<g){var b=f-f%5;g=(o&(1<<b)-1).toString(32),o>>=b,f-=b,Ln=1<<32-Mt(n)+f|i<<f|o,Bn=g+e}else Ln=1<<g|i<<f|o,Bn=e}function hd(e){e.return!==null&&(ai(e,1),tb(e,1,0))}function md(e){for(;e===Os;)Os=sl[--ul],sl[ul]=null,Tr=sl[--ul],sl[ul]=null;for(;e===Ri;)Ri=un[--cn],un[cn]=null,Bn=un[--cn],un[cn]=null,Ln=un[--cn],un[cn]=null}function nb(e,n){un[cn++]=Ln,un[cn++]=Bn,un[cn++]=Ri,Ln=n.id,Bn=n.overflow,Ri=e}var Tt=null,nt=null,Ye=!1,Di=null,fn=!1,gd=Error(r(519));function ki(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ar(sn(n,e)),gd}function ib(e){var n=e.stateNode,i=e.type,o=e.memoizedProps;switch(n[St]=e,n[Rt]=o,i){case"dialog":De("cancel",n),De("close",n);break;case"iframe":case"object":case"embed":De("load",n);break;case"video":case"audio":for(i=0;i<Jr.length;i++)De(Jr[i],n);break;case"source":De("error",n);break;case"img":case"image":case"link":De("error",n),De("load",n);break;case"details":De("toggle",n);break;case"input":De("invalid",n),vs(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":De("invalid",n);break;case"textarea":De("invalid",n),vv(n,o.value,o.defaultValue,o.children)}i=o.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||n.textContent===""+i||o.suppressHydrationWarning===!0||x1(n.textContent,i)?(o.popover!=null&&(De("beforetoggle",n),De("toggle",n)),o.onScroll!=null&&De("scroll",n),o.onScrollEnd!=null&&De("scrollend",n),o.onClick!=null&&(n.onclick=ti),n=!0):n=!1,n||ki(e,!0)}function ab(e){for(Tt=e.return;Tt;)switch(Tt.tag){case 5:case 31:case 13:fn=!1;return;case 27:case 3:fn=!0;return;default:Tt=Tt.return}}function cl(e){if(e!==Tt)return!1;if(!Ye)return ab(e),Ye=!0,!1;var n=e.tag,i;if((i=n!==3&&n!==27)&&((i=n===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Rh(e.type,e.memoizedProps)),i=!i),i&&nt&&ki(e),ab(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));nt=A1(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));nt=A1(e)}else n===27?(n=nt,Ki(e.type)?(e=Bh,Bh=null,nt=e):nt=n):nt=Tt?hn(e.stateNode.nextSibling):null;return!0}function xa(){nt=Tt=null,Ye=!1}function pd(){var e=Di;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),Di=null),e}function Ar(e){Di===null?Di=[e]:Di.push(e)}var yd=k(null),wa=null,li=null;function Hi(e,n,i){L(yd,n._currentValue),n._currentValue=i}function ri(e){e._currentValue=yd.current,Q(yd)}function vd(e,n,i){for(;e!==null;){var o=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,o!==null&&(o.childLanes|=n)):o!==null&&(o.childLanes&n)!==n&&(o.childLanes|=n),e===i)break;e=e.return}}function bd(e,n,i,o){var f=e.child;for(f!==null&&(f.return=e);f!==null;){var g=f.dependencies;if(g!==null){var b=f.child;g=g.firstContext;e:for(;g!==null;){var A=g;g=f;for(var X=0;X<n.length;X++)if(A.context===n[X]){g.lanes|=i,A=g.alternate,A!==null&&(A.lanes|=i),vd(g.return,i,e),o||(b=null);break e}g=A.next}}else if(f.tag===18){if(b=f.return,b===null)throw Error(r(341));b.lanes|=i,g=b.alternate,g!==null&&(g.lanes|=i),vd(b,i,e),b=null}else b=f.child;if(b!==null)b.return=f;else for(b=f;b!==null;){if(b===e){b=null;break}if(f=b.sibling,f!==null){f.return=b.return,b=f;break}b=b.return}f=b}}function fl(e,n,i,o){e=null;for(var f=n,g=!1;f!==null;){if(!g){if((f.flags&524288)!==0)g=!0;else if((f.flags&262144)!==0)break}if(f.tag===10){var b=f.alternate;if(b===null)throw Error(r(387));if(b=b.memoizedProps,b!==null){var A=f.type;Pt(f.pendingProps.value,b.value)||(e!==null?e.push(A):e=[A])}}else if(f===ae.current){if(b=f.alternate,b===null)throw Error(r(387));b.memoizedState.memoizedState!==f.memoizedState.memoizedState&&(e!==null?e.push(no):e=[no])}f=f.return}e!==null&&bd(n,e,i,o),n.flags|=262144}function js(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Sa(e){wa=e,li=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function At(e){return lb(wa,e)}function Rs(e,n){return wa===null&&Sa(e),lb(e,n)}function lb(e,n){var i=n._currentValue;if(n={context:n,memoizedValue:i,next:null},li===null){if(e===null)throw Error(r(308));li=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else li=li.next=n;return i}var Hz=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(i,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(i){return i()})}},Lz=t.unstable_scheduleCallback,Bz=t.unstable_NormalPriority,gt={$$typeof:E,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function xd(){return{controller:new Hz,data:new Map,refCount:0}}function zr(e){e.refCount--,e.refCount===0&&Lz(Bz,function(){e.controller.abort()})}var Or=null,wd=0,dl=0,hl=null;function qz(e,n){if(Or===null){var i=Or=[];wd=0,dl=_h(),hl={status:"pending",value:void 0,then:function(o){i.push(o)}}}return wd++,n.then(rb,rb),n}function rb(){if(--wd===0&&Or!==null){hl!==null&&(hl.status="fulfilled");var e=Or;Or=null,dl=0,hl=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function Uz(e,n){var i=[],o={status:"pending",value:null,reason:null,then:function(f){i.push(f)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var f=0;f<i.length;f++)(0,i[f])(n)},function(f){for(o.status="rejected",o.reason=f,f=0;f<i.length;f++)(0,i[f])(void 0)}),o}var ob=j.S;j.S=function(e,n){Xx=xt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&qz(e,n),ob!==null&&ob(e,n)};var Ea=k(null);function Sd(){var e=Ea.current;return e!==null?e:We.pooledCache}function Ds(e,n){n===null?L(Ea,Ea.current):L(Ea,n.pool)}function sb(){var e=Sd();return e===null?null:{parent:gt._currentValue,pool:e}}var ml=Error(r(460)),Ed=Error(r(474)),ks=Error(r(542)),Hs={then:function(){}};function ub(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cb(e,n,i){switch(i=e[i],i===void 0?e.push(n):i!==n&&(n.then(ti,ti),n=i),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,db(e),e;default:if(typeof n.status=="string")n.then(ti,ti);else{if(e=We,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var f=n;f.status="fulfilled",f.value=o}},function(o){if(n.status==="pending"){var f=n;f.status="rejected",f.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,db(e),e}throw Na=n,ml}}function _a(e){try{var n=e._init;return n(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Na=i,ml):i}}var Na=null;function fb(){if(Na===null)throw Error(r(459));var e=Na;return Na=null,e}function db(e){if(e===ml||e===ks)throw Error(r(483))}var gl=null,jr=0;function Ls(e){var n=jr;return jr+=1,gl===null&&(gl=[]),cb(gl,e,n)}function Rr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Bs(e,n){throw n.$$typeof===v?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function hb(e){function n(J,$){if(e){var ee=J.deletions;ee===null?(J.deletions=[$],J.flags|=16):ee.push($)}}function i(J,$){if(!e)return null;for(;$!==null;)n(J,$),$=$.sibling;return null}function o(J){for(var $=new Map;J!==null;)J.key!==null?$.set(J.key,J):$.set(J.index,J),J=J.sibling;return $}function f(J,$){return J=ii(J,$),J.index=0,J.sibling=null,J}function g(J,$,ee){return J.index=ee,e?(ee=J.alternate,ee!==null?(ee=ee.index,ee<$?(J.flags|=67108866,$):ee):(J.flags|=67108866,$)):(J.flags|=1048576,$)}function b(J){return e&&J.alternate===null&&(J.flags|=67108866),J}function A(J,$,ee,ue){return $===null||$.tag!==6?($=fd(ee,J.mode,ue),$.return=J,$):($=f($,ee),$.return=J,$)}function X(J,$,ee,ue){var _e=ee.type;return _e===N?se(J,$,ee.props.children,ue,ee.key):$!==null&&($.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===C&&_a(_e)===$.type)?($=f($,ee.props),Rr($,ee),$.return=J,$):($=zs(ee.type,ee.key,ee.props,null,J.mode,ue),Rr($,ee),$.return=J,$)}function te(J,$,ee,ue){return $===null||$.tag!==4||$.stateNode.containerInfo!==ee.containerInfo||$.stateNode.implementation!==ee.implementation?($=dd(ee,J.mode,ue),$.return=J,$):($=f($,ee.children||[]),$.return=J,$)}function se(J,$,ee,ue,_e){return $===null||$.tag!==7?($=ba(ee,J.mode,ue,_e),$.return=J,$):($=f($,ee),$.return=J,$)}function ce(J,$,ee){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=fd(""+$,J.mode,ee),$.return=J,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case x:return ee=zs($.type,$.key,$.props,null,J.mode,ee),Rr(ee,$),ee.return=J,ee;case w:return $=dd($,J.mode,ee),$.return=J,$;case C:return $=_a($),ce(J,$,ee)}if(I($)||V($))return $=ba($,J.mode,ee,null),$.return=J,$;if(typeof $.then=="function")return ce(J,Ls($),ee);if($.$$typeof===E)return ce(J,Rs(J,$),ee);Bs(J,$)}return null}function ie(J,$,ee,ue){var _e=$!==null?$.key:null;if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return _e!==null?null:A(J,$,""+ee,ue);if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case x:return ee.key===_e?X(J,$,ee,ue):null;case w:return ee.key===_e?te(J,$,ee,ue):null;case C:return ee=_a(ee),ie(J,$,ee,ue)}if(I(ee)||V(ee))return _e!==null?null:se(J,$,ee,ue,null);if(typeof ee.then=="function")return ie(J,$,Ls(ee),ue);if(ee.$$typeof===E)return ie(J,$,Rs(J,ee),ue);Bs(J,ee)}return null}function le(J,$,ee,ue,_e){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return J=J.get(ee)||null,A($,J,""+ue,_e);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case x:return J=J.get(ue.key===null?ee:ue.key)||null,X($,J,ue,_e);case w:return J=J.get(ue.key===null?ee:ue.key)||null,te($,J,ue,_e);case C:return ue=_a(ue),le(J,$,ee,ue,_e)}if(I(ue)||V(ue))return J=J.get(ee)||null,se($,J,ue,_e,null);if(typeof ue.then=="function")return le(J,$,ee,Ls(ue),_e);if(ue.$$typeof===E)return le(J,$,ee,Rs($,ue),_e);Bs($,ue)}return null}function ve(J,$,ee,ue){for(var _e=null,Xe=null,we=$,Oe=$=0,Be=null;we!==null&&Oe<ee.length;Oe++){we.index>Oe?(Be=we,we=null):Be=we.sibling;var Ze=ie(J,we,ee[Oe],ue);if(Ze===null){we===null&&(we=Be);break}e&&we&&Ze.alternate===null&&n(J,we),$=g(Ze,$,Oe),Xe===null?_e=Ze:Xe.sibling=Ze,Xe=Ze,we=Be}if(Oe===ee.length)return i(J,we),Ye&&ai(J,Oe),_e;if(we===null){for(;Oe<ee.length;Oe++)we=ce(J,ee[Oe],ue),we!==null&&($=g(we,$,Oe),Xe===null?_e=we:Xe.sibling=we,Xe=we);return Ye&&ai(J,Oe),_e}for(we=o(we);Oe<ee.length;Oe++)Be=le(we,J,Oe,ee[Oe],ue),Be!==null&&(e&&Be.alternate!==null&&we.delete(Be.key===null?Oe:Be.key),$=g(Be,$,Oe),Xe===null?_e=Be:Xe.sibling=Be,Xe=Be);return e&&we.forEach(function(ea){return n(J,ea)}),Ye&&ai(J,Oe),_e}function Ce(J,$,ee,ue){if(ee==null)throw Error(r(151));for(var _e=null,Xe=null,we=$,Oe=$=0,Be=null,Ze=ee.next();we!==null&&!Ze.done;Oe++,Ze=ee.next()){we.index>Oe?(Be=we,we=null):Be=we.sibling;var ea=ie(J,we,Ze.value,ue);if(ea===null){we===null&&(we=Be);break}e&&we&&ea.alternate===null&&n(J,we),$=g(ea,$,Oe),Xe===null?_e=ea:Xe.sibling=ea,Xe=ea,we=Be}if(Ze.done)return i(J,we),Ye&&ai(J,Oe),_e;if(we===null){for(;!Ze.done;Oe++,Ze=ee.next())Ze=ce(J,Ze.value,ue),Ze!==null&&($=g(Ze,$,Oe),Xe===null?_e=Ze:Xe.sibling=Ze,Xe=Ze);return Ye&&ai(J,Oe),_e}for(we=o(we);!Ze.done;Oe++,Ze=ee.next())Ze=le(we,J,Oe,Ze.value,ue),Ze!==null&&(e&&Ze.alternate!==null&&we.delete(Ze.key===null?Oe:Ze.key),$=g(Ze,$,Oe),Xe===null?_e=Ze:Xe.sibling=Ze,Xe=Ze);return e&&we.forEach(function(JO){return n(J,JO)}),Ye&&ai(J,Oe),_e}function Pe(J,$,ee,ue){if(typeof ee=="object"&&ee!==null&&ee.type===N&&ee.key===null&&(ee=ee.props.children),typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case x:e:{for(var _e=ee.key;$!==null;){if($.key===_e){if(_e=ee.type,_e===N){if($.tag===7){i(J,$.sibling),ue=f($,ee.props.children),ue.return=J,J=ue;break e}}else if($.elementType===_e||typeof _e=="object"&&_e!==null&&_e.$$typeof===C&&_a(_e)===$.type){i(J,$.sibling),ue=f($,ee.props),Rr(ue,ee),ue.return=J,J=ue;break e}i(J,$);break}else n(J,$);$=$.sibling}ee.type===N?(ue=ba(ee.props.children,J.mode,ue,ee.key),ue.return=J,J=ue):(ue=zs(ee.type,ee.key,ee.props,null,J.mode,ue),Rr(ue,ee),ue.return=J,J=ue)}return b(J);case w:e:{for(_e=ee.key;$!==null;){if($.key===_e)if($.tag===4&&$.stateNode.containerInfo===ee.containerInfo&&$.stateNode.implementation===ee.implementation){i(J,$.sibling),ue=f($,ee.children||[]),ue.return=J,J=ue;break e}else{i(J,$);break}else n(J,$);$=$.sibling}ue=dd(ee,J.mode,ue),ue.return=J,J=ue}return b(J);case C:return ee=_a(ee),Pe(J,$,ee,ue)}if(I(ee))return ve(J,$,ee,ue);if(V(ee)){if(_e=V(ee),typeof _e!="function")throw Error(r(150));return ee=_e.call(ee),Ce(J,$,ee,ue)}if(typeof ee.then=="function")return Pe(J,$,Ls(ee),ue);if(ee.$$typeof===E)return Pe(J,$,Rs(J,ee),ue);Bs(J,ee)}return typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint"?(ee=""+ee,$!==null&&$.tag===6?(i(J,$.sibling),ue=f($,ee),ue.return=J,J=ue):(i(J,$),ue=fd(ee,J.mode,ue),ue.return=J,J=ue),b(J)):i(J,$)}return function(J,$,ee,ue){try{jr=0;var _e=Pe(J,$,ee,ue);return gl=null,_e}catch(we){if(we===ml||we===ks)throw we;var Xe=Wt(29,we,null,J.mode);return Xe.lanes=ue,Xe.return=J,Xe}}}var Ca=hb(!0),mb=hb(!1),Li=!1;function _d(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Nd(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 Bi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function qi(e,n,i){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ie&2)!==0){var f=o.pending;return f===null?n.next=n:(n.next=f.next,f.next=n),o.pending=n,n=As(e),Jv(e,null,i),n}return Ts(e,o,n,i),As(e)}function Dr(e,n,i){if(n=n.updateQueue,n!==null&&(n=n.shared,(i&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,os(e,i)}}function Cd(e,n){var i=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,i===o)){var f=null,g=null;if(i=i.firstBaseUpdate,i!==null){do{var b={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};g===null?f=g=b:g=g.next=b,i=i.next}while(i!==null);g===null?f=g=n:g=g.next=n}else f=g=n;i={baseState:o.baseState,firstBaseUpdate:f,lastBaseUpdate:g,shared:o.shared,callbacks:o.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=n:e.next=n,i.lastBaseUpdate=n}var Md=!1;function kr(){if(Md){var e=hl;if(e!==null)throw e}}function Hr(e,n,i,o){Md=!1;var f=e.updateQueue;Li=!1;var g=f.firstBaseUpdate,b=f.lastBaseUpdate,A=f.shared.pending;if(A!==null){f.shared.pending=null;var X=A,te=X.next;X.next=null,b===null?g=te:b.next=te,b=X;var se=e.alternate;se!==null&&(se=se.updateQueue,A=se.lastBaseUpdate,A!==b&&(A===null?se.firstBaseUpdate=te:A.next=te,se.lastBaseUpdate=X))}if(g!==null){var ce=f.baseState;b=0,se=te=X=null,A=g;do{var ie=A.lane&-536870913,le=ie!==A.lane;if(le?(Le&ie)===ie:(o&ie)===ie){ie!==0&&ie===dl&&(Md=!0),se!==null&&(se=se.next={lane:0,tag:A.tag,payload:A.payload,callback:null,next:null});e:{var ve=e,Ce=A;ie=n;var Pe=i;switch(Ce.tag){case 1:if(ve=Ce.payload,typeof ve=="function"){ce=ve.call(Pe,ce,ie);break e}ce=ve;break e;case 3:ve.flags=ve.flags&-65537|128;case 0:if(ve=Ce.payload,ie=typeof ve=="function"?ve.call(Pe,ce,ie):ve,ie==null)break e;ce=y({},ce,ie);break e;case 2:Li=!0}}ie=A.callback,ie!==null&&(e.flags|=64,le&&(e.flags|=8192),le=f.callbacks,le===null?f.callbacks=[ie]:le.push(ie))}else le={lane:ie,tag:A.tag,payload:A.payload,callback:A.callback,next:null},se===null?(te=se=le,X=ce):se=se.next=le,b|=ie;if(A=A.next,A===null){if(A=f.shared.pending,A===null)break;le=A,A=le.next,le.next=null,f.lastBaseUpdate=le,f.shared.pending=null}}while(!0);se===null&&(X=ce),f.baseState=X,f.firstBaseUpdate=te,f.lastBaseUpdate=se,g===null&&(f.shared.lanes=0),Xi|=b,e.lanes=b,e.memoizedState=ce}}function gb(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function pb(e,n){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)gb(i[e],n)}var pl=k(null),qs=k(0);function yb(e,n){e=gi,L(qs,e),L(pl,n),gi=e|n.baseLanes}function Td(){L(qs,gi),L(pl,pl.current)}function Ad(){gi=qs.current,Q(pl),Q(qs)}var en=k(null),dn=null;function Ui(e){var n=e.alternate;L(st,st.current&1),L(en,e),dn===null&&(n===null||pl.current!==null||n.memoizedState!==null)&&(dn=e)}function zd(e){L(st,st.current),L(en,e),dn===null&&(dn=e)}function vb(e){e.tag===22?(L(st,st.current),L(en,e),dn===null&&(dn=e)):Vi()}function Vi(){L(st,st.current),L(en,en.current)}function tn(e){Q(en),dn===e&&(dn=null),Q(st)}var st=k(0);function Us(e){for(var n=e;n!==null;){if(n.tag===13){var i=n.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Hh(i)||Lh(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 oi=0,Ae=null,Fe=null,pt=null,Vs=!1,yl=!1,Ma=!1,Ys=0,Lr=0,vl=null,Vz=0;function rt(){throw Error(r(321))}function Od(e,n){if(n===null)return!1;for(var i=0;i<n.length&&i<e.length;i++)if(!Pt(e[i],n[i]))return!1;return!0}function jd(e,n,i,o,f,g){return oi=g,Ae=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,j.H=e===null||e.memoizedState===null?tx:Id,Ma=!1,g=i(o,f),Ma=!1,yl&&(g=xb(n,i,o,f)),bb(e),g}function bb(e){j.H=Ur;var n=Fe!==null&&Fe.next!==null;if(oi=0,pt=Fe=Ae=null,Vs=!1,Lr=0,vl=null,n)throw Error(r(300));e===null||yt||(e=e.dependencies,e!==null&&js(e)&&(yt=!0))}function xb(e,n,i,o){Ae=e;var f=0;do{if(yl&&(vl=null),Lr=0,yl=!1,25<=f)throw Error(r(301));if(f+=1,pt=Fe=null,e.updateQueue!=null){var g=e.updateQueue;g.lastEffect=null,g.events=null,g.stores=null,g.memoCache!=null&&(g.memoCache.index=0)}j.H=nx,g=n(i,o)}while(yl);return g}function Yz(){var e=j.H,n=e.useState()[0];return n=typeof n.then=="function"?Br(n):n,e=e.useState()[0],(Fe!==null?Fe.memoizedState:null)!==e&&(Ae.flags|=1024),n}function Rd(){var e=Ys!==0;return Ys=0,e}function Dd(e,n,i){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~i}function kd(e){if(Vs){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Vs=!1}oi=0,pt=Fe=Ae=null,yl=!1,Lr=Ys=0,vl=null}function kt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ae.memoizedState=pt=e:pt=pt.next=e,pt}function ut(){if(Fe===null){var e=Ae.alternate;e=e!==null?e.memoizedState:null}else e=Fe.next;var n=pt===null?Ae.memoizedState:pt.next;if(n!==null)pt=n,Fe=e;else{if(e===null)throw Ae.alternate===null?Error(r(467)):Error(r(310));Fe=e,e={memoizedState:Fe.memoizedState,baseState:Fe.baseState,baseQueue:Fe.baseQueue,queue:Fe.queue,next:null},pt===null?Ae.memoizedState=pt=e:pt=pt.next=e}return pt}function Gs(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Br(e){var n=Lr;return Lr+=1,vl===null&&(vl=[]),e=cb(vl,e,n),n=Ae,(pt===null?n.memoizedState:pt.next)===null&&(n=n.alternate,j.H=n===null||n.memoizedState===null?tx:Id),e}function Xs(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Br(e);if(e.$$typeof===E)return At(e)}throw Error(r(438,String(e)))}function Hd(e){var n=null,i=Ae.updateQueue;if(i!==null&&(n=i.memoCache),n==null){var o=Ae.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(f){return f.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),i===null&&(i=Gs(),Ae.updateQueue=i),i.memoCache=n,i=n.data[n.index],i===void 0)for(i=n.data[n.index]=Array(e),o=0;o<e;o++)i[o]=Z;return n.index++,i}function si(e,n){return typeof n=="function"?n(e):n}function Zs(e){var n=ut();return Ld(n,Fe,e)}function Ld(e,n,i){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=i;var f=e.baseQueue,g=o.pending;if(g!==null){if(f!==null){var b=f.next;f.next=g.next,g.next=b}n.baseQueue=f=g,o.pending=null}if(g=e.baseState,f===null)e.memoizedState=g;else{n=f.next;var A=b=null,X=null,te=n,se=!1;do{var ce=te.lane&-536870913;if(ce!==te.lane?(Le&ce)===ce:(oi&ce)===ce){var ie=te.revertLane;if(ie===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),ce===dl&&(se=!0);else if((oi&ie)===ie){te=te.next,ie===dl&&(se=!0);continue}else ce={lane:0,revertLane:te.revertLane,gesture:null,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},X===null?(A=X=ce,b=g):X=X.next=ce,Ae.lanes|=ie,Xi|=ie;ce=te.action,Ma&&i(g,ce),g=te.hasEagerState?te.eagerState:i(g,ce)}else ie={lane:ce,revertLane:te.revertLane,gesture:te.gesture,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null},X===null?(A=X=ie,b=g):X=X.next=ie,Ae.lanes|=ce,Xi|=ce;te=te.next}while(te!==null&&te!==n);if(X===null?b=g:X.next=A,!Pt(g,e.memoizedState)&&(yt=!0,se&&(i=hl,i!==null)))throw i;e.memoizedState=g,e.baseState=b,e.baseQueue=X,o.lastRenderedState=g}return f===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function Bd(e){var n=ut(),i=n.queue;if(i===null)throw Error(r(311));i.lastRenderedReducer=e;var o=i.dispatch,f=i.pending,g=n.memoizedState;if(f!==null){i.pending=null;var b=f=f.next;do g=e(g,b.action),b=b.next;while(b!==f);Pt(g,n.memoizedState)||(yt=!0),n.memoizedState=g,n.baseQueue===null&&(n.baseState=g),i.lastRenderedState=g}return[g,o]}function wb(e,n,i){var o=Ae,f=ut(),g=Ye;if(g){if(i===void 0)throw Error(r(407));i=i()}else i=n();var b=!Pt((Fe||f).memoizedState,i);if(b&&(f.memoizedState=i,yt=!0),f=f.queue,Vd(_b.bind(null,o,f,e),[e]),f.getSnapshot!==n||b||pt!==null&&pt.memoizedState.tag&1){if(o.flags|=2048,bl(9,{destroy:void 0},Eb.bind(null,o,f,i,n),null),We===null)throw Error(r(349));g||(oi&127)!==0||Sb(o,n,i)}return i}function Sb(e,n,i){e.flags|=16384,e={getSnapshot:n,value:i},n=Ae.updateQueue,n===null?(n=Gs(),Ae.updateQueue=n,n.stores=[e]):(i=n.stores,i===null?n.stores=[e]:i.push(e))}function Eb(e,n,i,o){n.value=i,n.getSnapshot=o,Nb(n)&&Cb(e)}function _b(e,n,i){return i(function(){Nb(n)&&Cb(e)})}function Nb(e){var n=e.getSnapshot;e=e.value;try{var i=n();return!Pt(e,i)}catch{return!0}}function Cb(e){var n=va(e,2);n!==null&&Qt(n,e,2)}function qd(e){var n=kt();if(typeof e=="function"){var i=e;if(e=i(),Ma){rn(!0);try{i()}finally{rn(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:e},n}function Mb(e,n,i,o){return e.baseState=i,Ld(e,Fe,typeof o=="function"?o:si)}function Gz(e,n,i,o,f){if($s(e))throw Error(r(485));if(e=n.action,e!==null){var g={payload:f,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){g.listeners.push(b)}};j.T!==null?i(!0):g.isTransition=!1,o(g),i=n.pending,i===null?(g.next=n.pending=g,Tb(n,g)):(g.next=i.next,n.pending=i.next=g)}}function Tb(e,n){var i=n.action,o=n.payload,f=e.state;if(n.isTransition){var g=j.T,b={};j.T=b;try{var A=i(f,o),X=j.S;X!==null&&X(b,A),Ab(e,n,A)}catch(te){Ud(e,n,te)}finally{g!==null&&b.types!==null&&(g.types=b.types),j.T=g}}else try{g=i(f,o),Ab(e,n,g)}catch(te){Ud(e,n,te)}}function Ab(e,n,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(o){zb(e,n,o)},function(o){return Ud(e,n,o)}):zb(e,n,i)}function zb(e,n,i){n.status="fulfilled",n.value=i,Ob(n),e.state=i,n=e.pending,n!==null&&(i=n.next,i===n?e.pending=null:(i=i.next,n.next=i,Tb(e,i)))}function Ud(e,n,i){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=i,Ob(n),n=n.next;while(n!==o)}e.action=null}function Ob(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function jb(e,n){return n}function Rb(e,n){if(Ye){var i=We.formState;if(i!==null){e:{var o=Ae;if(Ye){if(nt){t:{for(var f=nt,g=fn;f.nodeType!==8;){if(!g){f=null;break t}if(f=hn(f.nextSibling),f===null){f=null;break t}}g=f.data,f=g==="F!"||g==="F"?f:null}if(f){nt=hn(f.nextSibling),o=f.data==="F!";break e}}ki(o)}o=!1}o&&(n=i[0])}}return i=kt(),i.memoizedState=i.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jb,lastRenderedState:n},i.queue=o,i=Pb.bind(null,Ae,o),o.dispatch=i,o=qd(!1),g=Qd.bind(null,Ae,!1,o.queue),o=kt(),f={state:n,dispatch:null,action:e,pending:null},o.queue=f,i=Gz.bind(null,Ae,f,g,i),f.dispatch=i,o.memoizedState=e,[n,i,!1]}function Db(e){var n=ut();return kb(n,Fe,e)}function kb(e,n,i){if(n=Ld(e,n,jb)[0],e=Zs(si)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=Br(n)}catch(b){throw b===ml?ks:b}else o=n;n=ut();var f=n.queue,g=f.dispatch;return i!==n.memoizedState&&(Ae.flags|=2048,bl(9,{destroy:void 0},Xz.bind(null,f,i),null)),[o,g,e]}function Xz(e,n){e.action=n}function Hb(e){var n=ut(),i=Fe;if(i!==null)return kb(n,i,e);ut(),n=n.memoizedState,i=ut();var o=i.queue.dispatch;return i.memoizedState=e,[n,o,!1]}function bl(e,n,i,o){return e={tag:e,create:i,deps:o,inst:n,next:null},n=Ae.updateQueue,n===null&&(n=Gs(),Ae.updateQueue=n),i=n.lastEffect,i===null?n.lastEffect=e.next=e:(o=i.next,i.next=e,e.next=o,n.lastEffect=e),e}function Lb(){return ut().memoizedState}function Qs(e,n,i,o){var f=kt();Ae.flags|=e,f.memoizedState=bl(1|n,{destroy:void 0},i,o===void 0?null:o)}function Is(e,n,i,o){var f=ut();o=o===void 0?null:o;var g=f.memoizedState.inst;Fe!==null&&o!==null&&Od(o,Fe.memoizedState.deps)?f.memoizedState=bl(n,g,i,o):(Ae.flags|=e,f.memoizedState=bl(1|n,g,i,o))}function Bb(e,n){Qs(8390656,8,e,n)}function Vd(e,n){Is(2048,8,e,n)}function Zz(e){Ae.flags|=4;var n=Ae.updateQueue;if(n===null)n=Gs(),Ae.updateQueue=n,n.events=[e];else{var i=n.events;i===null?n.events=[e]:i.push(e)}}function qb(e){var n=ut().memoizedState;return Zz({ref:n,nextImpl:e}),function(){if((Ie&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Ub(e,n){return Is(4,2,e,n)}function Vb(e,n){return Is(4,4,e,n)}function Yb(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 Gb(e,n,i){i=i!=null?i.concat([e]):null,Is(4,4,Yb.bind(null,n,e),i)}function Yd(){}function Xb(e,n){var i=ut();n=n===void 0?null:n;var o=i.memoizedState;return n!==null&&Od(n,o[1])?o[0]:(i.memoizedState=[e,n],e)}function Zb(e,n){var i=ut();n=n===void 0?null:n;var o=i.memoizedState;if(n!==null&&Od(n,o[1]))return o[0];if(o=e(),Ma){rn(!0);try{e()}finally{rn(!1)}}return i.memoizedState=[o,n],o}function Gd(e,n,i){return i===void 0||(oi&1073741824)!==0&&(Le&261930)===0?e.memoizedState=n:(e.memoizedState=i,e=Qx(),Ae.lanes|=e,Xi|=e,i)}function Qb(e,n,i,o){return Pt(i,n)?i:pl.current!==null?(e=Gd(e,i,o),Pt(e,n)||(yt=!0),e):(oi&42)===0||(oi&1073741824)!==0&&(Le&261930)===0?(yt=!0,e.memoizedState=i):(e=Qx(),Ae.lanes|=e,Xi|=e,n)}function Ib(e,n,i,o,f){var g=G.p;G.p=g!==0&&8>g?g:8;var b=j.T,A={};j.T=A,Qd(e,!1,n,i);try{var X=f(),te=j.S;if(te!==null&&te(A,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var se=Uz(X,o);qr(e,n,se,ln(e))}else qr(e,n,o,ln(e))}catch(ce){qr(e,n,{then:function(){},status:"rejected",reason:ce},ln())}finally{G.p=g,b!==null&&A.types!==null&&(b.types=A.types),j.T=b}}function Qz(){}function Xd(e,n,i,o){if(e.tag!==5)throw Error(r(476));var f=$b(e).queue;Ib(e,f,n,U,i===null?Qz:function(){return Kb(e),i(o)})}function $b(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:U,baseState:U,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:U},next:null};var i={};return n.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:si,lastRenderedState:i},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Kb(e){var n=$b(e);n.next===null&&(n=e.alternate.memoizedState),qr(e,n.next.queue,{},ln())}function Zd(){return At(no)}function Fb(){return ut().memoizedState}function Jb(){return ut().memoizedState}function Iz(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var i=ln();e=Bi(i);var o=qi(n,e,i);o!==null&&(Qt(o,n,i),Dr(o,n,i)),n={cache:xd()},e.payload=n;return}n=n.return}}function $z(e,n,i){var o=ln();i={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},$s(e)?Wb(n,i):(i=ud(e,n,i,o),i!==null&&(Qt(i,e,o),ex(i,n,o)))}function Pb(e,n,i){var o=ln();qr(e,n,i,o)}function qr(e,n,i,o){var f={lane:o,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if($s(e))Wb(n,f);else{var g=e.alternate;if(e.lanes===0&&(g===null||g.lanes===0)&&(g=n.lastRenderedReducer,g!==null))try{var b=n.lastRenderedState,A=g(b,i);if(f.hasEagerState=!0,f.eagerState=A,Pt(A,b))return Ts(e,n,f,0),We===null&&Ms(),!1}catch{}if(i=ud(e,n,f,o),i!==null)return Qt(i,e,o),ex(i,n,o),!0}return!1}function Qd(e,n,i,o){if(o={lane:2,revertLane:_h(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},$s(e)){if(n)throw Error(r(479))}else n=ud(e,i,o,2),n!==null&&Qt(n,e,2)}function $s(e){var n=e.alternate;return e===Ae||n!==null&&n===Ae}function Wb(e,n){yl=Vs=!0;var i=e.pending;i===null?n.next=n:(n.next=i.next,i.next=n),e.pending=n}function ex(e,n,i){if((i&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,i|=o,n.lanes=i,os(e,i)}}var Ur={readContext:At,use:Xs,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt};Ur.useEffectEvent=rt;var tx={readContext:At,use:Xs,useCallback:function(e,n){return kt().memoizedState=[e,n===void 0?null:n],e},useContext:At,useEffect:Bb,useImperativeHandle:function(e,n,i){i=i!=null?i.concat([e]):null,Qs(4194308,4,Yb.bind(null,n,e),i)},useLayoutEffect:function(e,n){return Qs(4194308,4,e,n)},useInsertionEffect:function(e,n){Qs(4,2,e,n)},useMemo:function(e,n){var i=kt();n=n===void 0?null:n;var o=e();if(Ma){rn(!0);try{e()}finally{rn(!1)}}return i.memoizedState=[o,n],o},useReducer:function(e,n,i){var o=kt();if(i!==void 0){var f=i(n);if(Ma){rn(!0);try{i(n)}finally{rn(!1)}}}else f=n;return o.memoizedState=o.baseState=f,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:f},o.queue=e,e=e.dispatch=$z.bind(null,Ae,e),[o.memoizedState,e]},useRef:function(e){var n=kt();return e={current:e},n.memoizedState=e},useState:function(e){e=qd(e);var n=e.queue,i=Pb.bind(null,Ae,n);return n.dispatch=i,[e.memoizedState,i]},useDebugValue:Yd,useDeferredValue:function(e,n){var i=kt();return Gd(i,e,n)},useTransition:function(){var e=qd(!1);return e=Ib.bind(null,Ae,e.queue,!0,!1),kt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,i){var o=Ae,f=kt();if(Ye){if(i===void 0)throw Error(r(407));i=i()}else{if(i=n(),We===null)throw Error(r(349));(Le&127)!==0||Sb(o,n,i)}f.memoizedState=i;var g={value:i,getSnapshot:n};return f.queue=g,Bb(_b.bind(null,o,g,e),[e]),o.flags|=2048,bl(9,{destroy:void 0},Eb.bind(null,o,g,i,n),null),i},useId:function(){var e=kt(),n=We.identifierPrefix;if(Ye){var i=Bn,o=Ln;i=(o&~(1<<32-Mt(o)-1)).toString(32)+i,n="_"+n+"R_"+i,i=Ys++,0<i&&(n+="H"+i.toString(32)),n+="_"}else i=Vz++,n="_"+n+"r_"+i.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Zd,useFormState:Rb,useActionState:Rb,useOptimistic:function(e){var n=kt();n.memoizedState=n.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=i,n=Qd.bind(null,Ae,!0,i),i.dispatch=n,[e,n]},useMemoCache:Hd,useCacheRefresh:function(){return kt().memoizedState=Iz.bind(null,Ae)},useEffectEvent:function(e){var n=kt(),i={impl:e};return n.memoizedState=i,function(){if((Ie&2)!==0)throw Error(r(440));return i.impl.apply(void 0,arguments)}}},Id={readContext:At,use:Xs,useCallback:Xb,useContext:At,useEffect:Vd,useImperativeHandle:Gb,useInsertionEffect:Ub,useLayoutEffect:Vb,useMemo:Zb,useReducer:Zs,useRef:Lb,useState:function(){return Zs(si)},useDebugValue:Yd,useDeferredValue:function(e,n){var i=ut();return Qb(i,Fe.memoizedState,e,n)},useTransition:function(){var e=Zs(si)[0],n=ut().memoizedState;return[typeof e=="boolean"?e:Br(e),n]},useSyncExternalStore:wb,useId:Fb,useHostTransitionStatus:Zd,useFormState:Db,useActionState:Db,useOptimistic:function(e,n){var i=ut();return Mb(i,Fe,e,n)},useMemoCache:Hd,useCacheRefresh:Jb};Id.useEffectEvent=qb;var nx={readContext:At,use:Xs,useCallback:Xb,useContext:At,useEffect:Vd,useImperativeHandle:Gb,useInsertionEffect:Ub,useLayoutEffect:Vb,useMemo:Zb,useReducer:Bd,useRef:Lb,useState:function(){return Bd(si)},useDebugValue:Yd,useDeferredValue:function(e,n){var i=ut();return Fe===null?Gd(i,e,n):Qb(i,Fe.memoizedState,e,n)},useTransition:function(){var e=Bd(si)[0],n=ut().memoizedState;return[typeof e=="boolean"?e:Br(e),n]},useSyncExternalStore:wb,useId:Fb,useHostTransitionStatus:Zd,useFormState:Hb,useActionState:Hb,useOptimistic:function(e,n){var i=ut();return Fe!==null?Mb(i,Fe,e,n):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Hd,useCacheRefresh:Jb};nx.useEffectEvent=qb;function $d(e,n,i,o){n=e.memoizedState,i=i(o,n),i=i==null?n:y({},n,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var Kd={enqueueSetState:function(e,n,i){e=e._reactInternals;var o=ln(),f=Bi(o);f.payload=n,i!=null&&(f.callback=i),n=qi(e,f,o),n!==null&&(Qt(n,e,o),Dr(n,e,o))},enqueueReplaceState:function(e,n,i){e=e._reactInternals;var o=ln(),f=Bi(o);f.tag=1,f.payload=n,i!=null&&(f.callback=i),n=qi(e,f,o),n!==null&&(Qt(n,e,o),Dr(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var i=ln(),o=Bi(i);o.tag=2,n!=null&&(o.callback=n),n=qi(e,o,i),n!==null&&(Qt(n,e,i),Dr(n,e,i))}};function ix(e,n,i,o,f,g,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,g,b):n.prototype&&n.prototype.isPureReactComponent?!Cr(i,o)||!Cr(f,g):!0}function ax(e,n,i,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(i,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(i,o),n.state!==e&&Kd.enqueueReplaceState(n,n.state,null)}function Ta(e,n){var i=n;if("ref"in n){i={};for(var o in n)o!=="ref"&&(i[o]=n[o])}if(e=e.defaultProps){i===n&&(i=y({},i));for(var f in e)i[f]===void 0&&(i[f]=e[f])}return i}function lx(e){Cs(e)}function rx(e){console.error(e)}function ox(e){Cs(e)}function Ks(e,n){try{var i=e.onUncaughtError;i(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function sx(e,n,i){try{var o=e.onCaughtError;o(i.value,{componentStack:i.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(f){setTimeout(function(){throw f})}}function Fd(e,n,i){return i=Bi(i),i.tag=3,i.payload={element:null},i.callback=function(){Ks(e,n)},i}function ux(e){return e=Bi(e),e.tag=3,e}function cx(e,n,i,o){var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=o.value;e.payload=function(){return f(g)},e.callback=function(){sx(n,i,o)}}var b=i.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){sx(n,i,o),typeof f!="function"&&(Zi===null?Zi=new Set([this]):Zi.add(this));var A=o.stack;this.componentDidCatch(o.value,{componentStack:A!==null?A:""})})}function Kz(e,n,i,o,f){if(i.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=i.alternate,n!==null&&fl(n,i,f,!0),i=en.current,i!==null){switch(i.tag){case 31:case 13:return dn===null?ou():i.alternate===null&&ot===0&&(ot=3),i.flags&=-257,i.flags|=65536,i.lanes=f,o===Hs?i.flags|=16384:(n=i.updateQueue,n===null?i.updateQueue=new Set([o]):n.add(o),wh(e,o,f)),!1;case 22:return i.flags|=65536,o===Hs?i.flags|=16384:(n=i.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},i.updateQueue=n):(i=n.retryQueue,i===null?n.retryQueue=new Set([o]):i.add(o)),wh(e,o,f)),!1}throw Error(r(435,i.tag))}return wh(e,o,f),ou(),!1}if(Ye)return n=en.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=f,o!==gd&&(e=Error(r(422),{cause:o}),Ar(sn(e,i)))):(o!==gd&&(n=Error(r(423),{cause:o}),Ar(sn(n,i))),e=e.current.alternate,e.flags|=65536,f&=-f,e.lanes|=f,o=sn(o,i),f=Fd(e.stateNode,o,f),Cd(e,f),ot!==4&&(ot=2)),!1;var g=Error(r(520),{cause:o});if(g=sn(g,i),$r===null?$r=[g]:$r.push(g),ot!==4&&(ot=2),n===null)return!0;o=sn(o,i),i=n;do{switch(i.tag){case 3:return i.flags|=65536,e=f&-f,i.lanes|=e,e=Fd(i.stateNode,o,e),Cd(i,e),!1;case 1:if(n=i.type,g=i.stateNode,(i.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||g!==null&&typeof g.componentDidCatch=="function"&&(Zi===null||!Zi.has(g))))return i.flags|=65536,f&=-f,i.lanes|=f,f=ux(f),cx(f,e,i,o),Cd(i,f),!1}i=i.return}while(i!==null);return!1}var Jd=Error(r(461)),yt=!1;function zt(e,n,i,o){n.child=e===null?mb(n,null,i,o):Ca(n,e.child,i,o)}function fx(e,n,i,o,f){i=i.render;var g=n.ref;if("ref"in o){var b={};for(var A in o)A!=="ref"&&(b[A]=o[A])}else b=o;return Sa(n),o=jd(e,n,i,b,g,f),A=Rd(),e!==null&&!yt?(Dd(e,n,f),ui(e,n,f)):(Ye&&A&&hd(n),n.flags|=1,zt(e,n,o,f),n.child)}function dx(e,n,i,o,f){if(e===null){var g=i.type;return typeof g=="function"&&!cd(g)&&g.defaultProps===void 0&&i.compare===null?(n.tag=15,n.type=g,hx(e,n,g,o,f)):(e=zs(i.type,null,o,n,n.mode,f),e.ref=n.ref,e.return=n,n.child=e)}if(g=e.child,!lh(e,f)){var b=g.memoizedProps;if(i=i.compare,i=i!==null?i:Cr,i(b,o)&&e.ref===n.ref)return ui(e,n,f)}return n.flags|=1,e=ii(g,o),e.ref=n.ref,e.return=n,n.child=e}function hx(e,n,i,o,f){if(e!==null){var g=e.memoizedProps;if(Cr(g,o)&&e.ref===n.ref)if(yt=!1,n.pendingProps=o=g,lh(e,f))(e.flags&131072)!==0&&(yt=!0);else return n.lanes=e.lanes,ui(e,n,f)}return Pd(e,n,i,o,f)}function mx(e,n,i,o){var f=o.children,g=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),o.mode==="hidden"){if((n.flags&128)!==0){if(g=g!==null?g.baseLanes|i:i,e!==null){for(o=n.child=e.child,f=0;o!==null;)f=f|o.lanes|o.childLanes,o=o.sibling;o=f&~g}else o=0,n.child=null;return gx(e,n,g,i,o)}if((i&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ds(n,g!==null?g.cachePool:null),g!==null?yb(n,g):Td(),vb(n);else return o=n.lanes=536870912,gx(e,n,g!==null?g.baseLanes|i:i,i,o)}else g!==null?(Ds(n,g.cachePool),yb(n,g),Vi(),n.memoizedState=null):(e!==null&&Ds(n,null),Td(),Vi());return zt(e,n,f,i),n.child}function Vr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function gx(e,n,i,o,f){var g=Sd();return g=g===null?null:{parent:gt._currentValue,pool:g},n.memoizedState={baseLanes:i,cachePool:g},e!==null&&Ds(n,null),Td(),vb(n),e!==null&&fl(e,n,o,!0),n.childLanes=f,null}function Fs(e,n){return n=Ps({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function px(e,n,i){return Ca(n,e.child,null,i),e=Fs(n,n.pendingProps),e.flags|=2,tn(n),n.memoizedState=null,e}function Fz(e,n,i){var o=n.pendingProps,f=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ye){if(o.mode==="hidden")return e=Fs(n,o),n.lanes=536870912,Vr(null,e);if(zd(n),(e=nt)?(e=T1(e,fn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},i=Wv(e),i.return=n,n.child=i,Tt=n,nt=null)):e=null,e===null)throw ki(n);return n.lanes=536870912,null}return Fs(n,o)}var g=e.memoizedState;if(g!==null){var b=g.dehydrated;if(zd(n),f)if(n.flags&256)n.flags&=-257,n=px(e,n,i);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(yt||fl(e,n,i,!1),f=(i&e.childLanes)!==0,yt||f){if(o=We,o!==null&&(b=ss(o,i),b!==0&&b!==g.retryLane))throw g.retryLane=b,va(e,b),Qt(o,e,b),Jd;ou(),n=px(e,n,i)}else e=g.treeContext,nt=hn(b.nextSibling),Tt=n,Ye=!0,Di=null,fn=!1,e!==null&&nb(n,e),n=Fs(n,o),n.flags|=4096;return n}return e=ii(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Js(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(r(284));(e===null||e.ref!==i)&&(n.flags|=4194816)}}function Pd(e,n,i,o,f){return Sa(n),i=jd(e,n,i,o,void 0,f),o=Rd(),e!==null&&!yt?(Dd(e,n,f),ui(e,n,f)):(Ye&&o&&hd(n),n.flags|=1,zt(e,n,i,f),n.child)}function yx(e,n,i,o,f,g){return Sa(n),n.updateQueue=null,i=xb(n,o,i,f),bb(e),o=Rd(),e!==null&&!yt?(Dd(e,n,g),ui(e,n,g)):(Ye&&o&&hd(n),n.flags|=1,zt(e,n,i,g),n.child)}function vx(e,n,i,o,f){if(Sa(n),n.stateNode===null){var g=ol,b=i.contextType;typeof b=="object"&&b!==null&&(g=At(b)),g=new i(o,g),n.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,g.updater=Kd,n.stateNode=g,g._reactInternals=n,g=n.stateNode,g.props=o,g.state=n.memoizedState,g.refs={},_d(n),b=i.contextType,g.context=typeof b=="object"&&b!==null?At(b):ol,g.state=n.memoizedState,b=i.getDerivedStateFromProps,typeof b=="function"&&($d(n,i,b,o),g.state=n.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(b=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),b!==g.state&&Kd.enqueueReplaceState(g,g.state,null),Hr(n,o,g,f),kr(),g.state=n.memoizedState),typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){g=n.stateNode;var A=n.memoizedProps,X=Ta(i,A);g.props=X;var te=g.context,se=i.contextType;b=ol,typeof se=="object"&&se!==null&&(b=At(se));var ce=i.getDerivedStateFromProps;se=typeof ce=="function"||typeof g.getSnapshotBeforeUpdate=="function",A=n.pendingProps!==A,se||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(A||te!==b)&&ax(n,g,o,b),Li=!1;var ie=n.memoizedState;g.state=ie,Hr(n,o,g,f),kr(),te=n.memoizedState,A||ie!==te||Li?(typeof ce=="function"&&($d(n,i,ce,o),te=n.memoizedState),(X=Li||ix(n,i,X,o,ie,te,b))?(se||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount()),typeof g.componentDidMount=="function"&&(n.flags|=4194308)):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=te),g.props=o,g.state=te,g.context=b,o=X):(typeof g.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{g=n.stateNode,Nd(e,n),b=n.memoizedProps,se=Ta(i,b),g.props=se,ce=n.pendingProps,ie=g.context,te=i.contextType,X=ol,typeof te=="object"&&te!==null&&(X=At(te)),A=i.getDerivedStateFromProps,(te=typeof A=="function"||typeof g.getSnapshotBeforeUpdate=="function")||typeof g.UNSAFE_componentWillReceiveProps!="function"&&typeof g.componentWillReceiveProps!="function"||(b!==ce||ie!==X)&&ax(n,g,o,X),Li=!1,ie=n.memoizedState,g.state=ie,Hr(n,o,g,f),kr();var le=n.memoizedState;b!==ce||ie!==le||Li||e!==null&&e.dependencies!==null&&js(e.dependencies)?(typeof A=="function"&&($d(n,i,A,o),le=n.memoizedState),(se=Li||ix(n,i,se,o,ie,le,X)||e!==null&&e.dependencies!==null&&js(e.dependencies))?(te||typeof g.UNSAFE_componentWillUpdate!="function"&&typeof g.componentWillUpdate!="function"||(typeof g.componentWillUpdate=="function"&&g.componentWillUpdate(o,le,X),typeof g.UNSAFE_componentWillUpdate=="function"&&g.UNSAFE_componentWillUpdate(o,le,X)),typeof g.componentDidUpdate=="function"&&(n.flags|=4),typeof g.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof g.componentDidUpdate!="function"||b===e.memoizedProps&&ie===e.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&ie===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=le),g.props=o,g.state=le,g.context=X,o=se):(typeof g.componentDidUpdate!="function"||b===e.memoizedProps&&ie===e.memoizedState||(n.flags|=4),typeof g.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&ie===e.memoizedState||(n.flags|=1024),o=!1)}return g=o,Js(e,n),o=(n.flags&128)!==0,g||o?(g=n.stateNode,i=o&&typeof i.getDerivedStateFromError!="function"?null:g.render(),n.flags|=1,e!==null&&o?(n.child=Ca(n,e.child,null,f),n.child=Ca(n,null,i,f)):zt(e,n,i,f),n.memoizedState=g.state,e=n.child):e=ui(e,n,f),e}function bx(e,n,i,o){return xa(),n.flags|=256,zt(e,n,i,o),n.child}var Wd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function eh(e){return{baseLanes:e,cachePool:sb()}}function th(e,n,i){return e=e!==null?e.childLanes&~i:0,n&&(e|=an),e}function xx(e,n,i){var o=n.pendingProps,f=!1,g=(n.flags&128)!==0,b;if((b=g)||(b=e!==null&&e.memoizedState===null?!1:(st.current&2)!==0),b&&(f=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ye){if(f?Ui(n):Vi(),(e=nt)?(e=T1(e,fn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Ri!==null?{id:Ln,overflow:Bn}:null,retryLane:536870912,hydrationErrors:null},i=Wv(e),i.return=n,n.child=i,Tt=n,nt=null)):e=null,e===null)throw ki(n);return Lh(e)?n.lanes=32:n.lanes=536870912,null}var A=o.children;return o=o.fallback,f?(Vi(),f=n.mode,A=Ps({mode:"hidden",children:A},f),o=ba(o,f,i,null),A.return=n,o.return=n,A.sibling=o,n.child=A,o=n.child,o.memoizedState=eh(i),o.childLanes=th(e,b,i),n.memoizedState=Wd,Vr(null,o)):(Ui(n),nh(n,A))}var X=e.memoizedState;if(X!==null&&(A=X.dehydrated,A!==null)){if(g)n.flags&256?(Ui(n),n.flags&=-257,n=ih(e,n,i)):n.memoizedState!==null?(Vi(),n.child=e.child,n.flags|=128,n=null):(Vi(),A=o.fallback,f=n.mode,o=Ps({mode:"visible",children:o.children},f),A=ba(A,f,i,null),A.flags|=2,o.return=n,A.return=n,o.sibling=A,n.child=o,Ca(n,e.child,null,i),o=n.child,o.memoizedState=eh(i),o.childLanes=th(e,b,i),n.memoizedState=Wd,n=Vr(null,o));else if(Ui(n),Lh(A)){if(b=A.nextSibling&&A.nextSibling.dataset,b)var te=b.dgst;b=te,o=Error(r(419)),o.stack="",o.digest=b,Ar({value:o,source:null,stack:null}),n=ih(e,n,i)}else if(yt||fl(e,n,i,!1),b=(i&e.childLanes)!==0,yt||b){if(b=We,b!==null&&(o=ss(b,i),o!==0&&o!==X.retryLane))throw X.retryLane=o,va(e,o),Qt(b,e,o),Jd;Hh(A)||ou(),n=ih(e,n,i)}else Hh(A)?(n.flags|=192,n.child=e.child,n=null):(e=X.treeContext,nt=hn(A.nextSibling),Tt=n,Ye=!0,Di=null,fn=!1,e!==null&&nb(n,e),n=nh(n,o.children),n.flags|=4096);return n}return f?(Vi(),A=o.fallback,f=n.mode,X=e.child,te=X.sibling,o=ii(X,{mode:"hidden",children:o.children}),o.subtreeFlags=X.subtreeFlags&65011712,te!==null?A=ii(te,A):(A=ba(A,f,i,null),A.flags|=2),A.return=n,o.return=n,o.sibling=A,n.child=o,Vr(null,o),o=n.child,A=e.child.memoizedState,A===null?A=eh(i):(f=A.cachePool,f!==null?(X=gt._currentValue,f=f.parent!==X?{parent:X,pool:X}:f):f=sb(),A={baseLanes:A.baseLanes|i,cachePool:f}),o.memoizedState=A,o.childLanes=th(e,b,i),n.memoizedState=Wd,Vr(e.child,o)):(Ui(n),i=e.child,e=i.sibling,i=ii(i,{mode:"visible",children:o.children}),i.return=n,i.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=i,n.memoizedState=null,i)}function nh(e,n){return n=Ps({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Ps(e,n){return e=Wt(22,e,null,n),e.lanes=0,e}function ih(e,n,i){return Ca(n,e.child,null,i),e=nh(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function wx(e,n,i){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),vd(e.return,n,i)}function ah(e,n,i,o,f,g){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:i,tailMode:f,treeForkCount:g}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=o,b.tail=i,b.tailMode=f,b.treeForkCount=g)}function Sx(e,n,i){var o=n.pendingProps,f=o.revealOrder,g=o.tail;o=o.children;var b=st.current,A=(b&2)!==0;if(A?(b=b&1|2,n.flags|=128):b&=1,L(st,b),zt(e,n,o,i),o=Ye?Tr:0,!A&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&wx(e,i,n);else if(e.tag===19)wx(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(f){case"forwards":for(i=n.child,f=null;i!==null;)e=i.alternate,e!==null&&Us(e)===null&&(f=i),i=i.sibling;i=f,i===null?(f=n.child,n.child=null):(f=i.sibling,i.sibling=null),ah(n,!1,f,i,g,o);break;case"backwards":case"unstable_legacy-backwards":for(i=null,f=n.child,n.child=null;f!==null;){if(e=f.alternate,e!==null&&Us(e)===null){n.child=f;break}e=f.sibling,f.sibling=i,i=f,f=e}ah(n,!0,i,null,g,o);break;case"together":ah(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function ui(e,n,i){if(e!==null&&(n.dependencies=e.dependencies),Xi|=n.lanes,(i&n.childLanes)===0)if(e!==null){if(fl(e,n,i,!1),(i&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(r(153));if(n.child!==null){for(e=n.child,i=ii(e,e.pendingProps),n.child=i,i.return=n;e.sibling!==null;)e=e.sibling,i=i.sibling=ii(e,e.pendingProps),i.return=n;i.sibling=null}return n.child}function lh(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&js(e)))}function Jz(e,n,i){switch(n.tag){case 3:oe(n,n.stateNode.containerInfo),Hi(n,gt,e.memoizedState.cache),xa();break;case 27:case 5:pe(n);break;case 4:oe(n,n.stateNode.containerInfo);break;case 10:Hi(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,zd(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Ui(n),n.flags|=128,null):(i&n.child.childLanes)!==0?xx(e,n,i):(Ui(n),e=ui(e,n,i),e!==null?e.sibling:null);Ui(n);break;case 19:var f=(e.flags&128)!==0;if(o=(i&n.childLanes)!==0,o||(fl(e,n,i,!1),o=(i&n.childLanes)!==0),f){if(o)return Sx(e,n,i);n.flags|=128}if(f=n.memoizedState,f!==null&&(f.rendering=null,f.tail=null,f.lastEffect=null),L(st,st.current),o)break;return null;case 22:return n.lanes=0,mx(e,n,i,n.pendingProps);case 24:Hi(n,gt,e.memoizedState.cache)}return ui(e,n,i)}function Ex(e,n,i){if(e!==null)if(e.memoizedProps!==n.pendingProps)yt=!0;else{if(!lh(e,i)&&(n.flags&128)===0)return yt=!1,Jz(e,n,i);yt=(e.flags&131072)!==0}else yt=!1,Ye&&(n.flags&1048576)!==0&&tb(n,Tr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=_a(n.elementType),n.type=e,typeof e=="function")cd(e)?(o=Ta(e,o),n.tag=1,n=vx(null,n,e,o,i)):(n.tag=0,n=Pd(null,n,e,o,i));else{if(e!=null){var f=e.$$typeof;if(f===T){n.tag=11,n=fx(null,n,e,o,i);break e}else if(f===O){n.tag=14,n=dx(null,n,e,o,i);break e}}throw n=H(e)||e,Error(r(306,n,""))}}return n;case 0:return Pd(e,n,n.type,n.pendingProps,i);case 1:return o=n.type,f=Ta(o,n.pendingProps),vx(e,n,o,f,i);case 3:e:{if(oe(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var g=n.memoizedState;f=g.element,Nd(e,n),Hr(n,o,null,i);var b=n.memoizedState;if(o=b.cache,Hi(n,gt,o),o!==g.cache&&bd(n,[gt],i,!0),kr(),o=b.element,g.isDehydrated)if(g={element:o,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=g,n.memoizedState=g,n.flags&256){n=bx(e,n,o,i);break e}else if(o!==f){f=sn(Error(r(424)),n),Ar(f),n=bx(e,n,o,i);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,nt=hn(e.firstChild),Tt=n,Ye=!0,Di=null,fn=!0,i=mb(n,null,o,i),n.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling;else{if(xa(),o===f){n=ui(e,n,i);break e}zt(e,n,o,i)}n=n.child}return n;case 26:return Js(e,n),e===null?(i=D1(n.type,null,n.pendingProps,null))?n.memoizedState=i:Ye||(i=n.type,e=n.pendingProps,o=mu(ne.current).createElement(i),o[St]=n,o[Rt]=e,Ot(o,i,e),mt(o),n.stateNode=o):n.memoizedState=D1(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return pe(n),e===null&&Ye&&(o=n.stateNode=O1(n.type,n.pendingProps,ne.current),Tt=n,fn=!0,f=nt,Ki(n.type)?(Bh=f,nt=hn(o.firstChild)):nt=f),zt(e,n,n.pendingProps.children,i),Js(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ye&&((f=o=nt)&&(o=MO(o,n.type,n.pendingProps,fn),o!==null?(n.stateNode=o,Tt=n,nt=hn(o.firstChild),fn=!1,f=!0):f=!1),f||ki(n)),pe(n),f=n.type,g=n.pendingProps,b=e!==null?e.memoizedProps:null,o=g.children,Rh(f,g)?o=null:b!==null&&Rh(f,b)&&(n.flags|=32),n.memoizedState!==null&&(f=jd(e,n,Yz,null,null,i),no._currentValue=f),Js(e,n),zt(e,n,o,i),n.child;case 6:return e===null&&Ye&&((e=i=nt)&&(i=TO(i,n.pendingProps,fn),i!==null?(n.stateNode=i,Tt=n,nt=null,e=!0):e=!1),e||ki(n)),null;case 13:return xx(e,n,i);case 4:return oe(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=Ca(n,null,o,i):zt(e,n,o,i),n.child;case 11:return fx(e,n,n.type,n.pendingProps,i);case 7:return zt(e,n,n.pendingProps,i),n.child;case 8:return zt(e,n,n.pendingProps.children,i),n.child;case 12:return zt(e,n,n.pendingProps.children,i),n.child;case 10:return o=n.pendingProps,Hi(n,n.type,o.value),zt(e,n,o.children,i),n.child;case 9:return f=n.type._context,o=n.pendingProps.children,Sa(n),f=At(f),o=o(f),n.flags|=1,zt(e,n,o,i),n.child;case 14:return dx(e,n,n.type,n.pendingProps,i);case 15:return hx(e,n,n.type,n.pendingProps,i);case 19:return Sx(e,n,i);case 31:return Fz(e,n,i);case 22:return mx(e,n,i,n.pendingProps);case 24:return Sa(n),o=At(gt),e===null?(f=Sd(),f===null&&(f=We,g=xd(),f.pooledCache=g,g.refCount++,g!==null&&(f.pooledCacheLanes|=i),f=g),n.memoizedState={parent:o,cache:f},_d(n),Hi(n,gt,f)):((e.lanes&i)!==0&&(Nd(e,n),Hr(n,null,null,i),kr()),f=e.memoizedState,g=n.memoizedState,f.parent!==o?(f={parent:o,cache:o},n.memoizedState=f,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=f),Hi(n,gt,o)):(o=g.cache,Hi(n,gt,o),o!==f.cache&&bd(n,[gt],i,!0))),zt(e,n,n.pendingProps.children,i),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function ci(e){e.flags|=4}function rh(e,n,i,o,f){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(f&335544128)===f)if(e.stateNode.complete)e.flags|=8192;else if(Fx())e.flags|=8192;else throw Na=Hs,Ed}else e.flags&=-16777217}function _x(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!q1(n))if(Fx())e.flags|=8192;else throw Na=Hs,Ed}function Ws(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?Ka():536870912,e.lanes|=n,El|=n)}function Yr(e,n){if(!Ye)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 o=null;i!==null;)i.alternate!==null&&(o=i),i=i.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function it(e){var n=e.alternate!==null&&e.alternate.child===e.child,i=0,o=0;if(n)for(var f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags&65011712,o|=f.flags&65011712,f.return=e,f=f.sibling;else for(f=e.child;f!==null;)i|=f.lanes|f.childLanes,o|=f.subtreeFlags,o|=f.flags,f.return=e,f=f.sibling;return e.subtreeFlags|=o,e.childLanes=i,n}function Pz(e,n,i){var o=n.pendingProps;switch(md(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(n),null;case 1:return it(n),null;case 3:return i=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),ri(gt),fe(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(cl(n)?ci(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,pd())),it(n),null;case 26:var f=n.type,g=n.memoizedState;return e===null?(ci(n),g!==null?(it(n),_x(n,g)):(it(n),rh(n,f,null,o,i))):g?g!==e.memoizedState?(ci(n),it(n),_x(n,g)):(it(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&ci(n),it(n),rh(n,f,e,o,i)),null;case 27:if(Ee(n),i=ne.current,f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ci(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return it(n),null}e=Y.current,cl(n)?ib(n):(e=O1(f,o,i),n.stateNode=e,ci(n))}return it(n),null;case 5:if(Ee(n),f=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&ci(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return it(n),null}if(g=Y.current,cl(n))ib(n);else{var b=mu(ne.current);switch(g){case 1:g=b.createElementNS("http://www.w3.org/2000/svg",f);break;case 2:g=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;default:switch(f){case"svg":g=b.createElementNS("http://www.w3.org/2000/svg",f);break;case"math":g=b.createElementNS("http://www.w3.org/1998/Math/MathML",f);break;case"script":g=b.createElement("div"),g.innerHTML="<script><\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof o.is=="string"?b.createElement("select",{is:o.is}):b.createElement("select"),o.multiple?g.multiple=!0:o.size&&(g.size=o.size);break;default:g=typeof o.is=="string"?b.createElement(f,{is:o.is}):b.createElement(f)}}g[St]=n,g[Rt]=o;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)g.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=g;e:switch(Ot(g,f,o),f){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&ci(n)}}return it(n),rh(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,i),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&ci(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=ne.current,cl(n)){if(e=n.stateNode,i=n.memoizedProps,o=null,f=Tt,f!==null)switch(f.tag){case 27:case 5:o=f.memoizedProps}e[St]=n,e=!!(e.nodeValue===i||o!==null&&o.suppressHydrationWarning===!0||x1(e.nodeValue,i)),e||ki(n,!0)}else e=mu(e).createTextNode(o),e[St]=n,n.stateNode=e}return it(n),null;case 31:if(i=n.memoizedState,e===null||e.memoizedState!==null){if(o=cl(n),i!==null){if(e===null){if(!o)throw Error(r(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[St]=n}else xa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;it(n),e=!1}else i=pd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return n.flags&256?(tn(n),n):(tn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return it(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(f=cl(n),o!==null&&o.dehydrated!==null){if(e===null){if(!f)throw Error(r(318));if(f=n.memoizedState,f=f!==null?f.dehydrated:null,!f)throw Error(r(317));f[St]=n}else xa(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;it(n),f=!1}else f=pd(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=f),f=!0;if(!f)return n.flags&256?(tn(n),n):(tn(n),null)}return tn(n),(n.flags&128)!==0?(n.lanes=i,n):(i=o!==null,e=e!==null&&e.memoizedState!==null,i&&(o=n.child,f=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(f=o.alternate.memoizedState.cachePool.pool),g=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(g=o.memoizedState.cachePool.pool),g!==f&&(o.flags|=2048)),i!==e&&i&&(n.child.flags|=8192),Ws(n,n.updateQueue),it(n),null);case 4:return fe(),e===null&&Th(n.stateNode.containerInfo),it(n),null;case 10:return ri(n.type),it(n),null;case 19:if(Q(st),o=n.memoizedState,o===null)return it(n),null;if(f=(n.flags&128)!==0,g=o.rendering,g===null)if(f)Yr(o,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(g=Us(e),g!==null){for(n.flags|=128,Yr(o,!1),e=g.updateQueue,n.updateQueue=e,Ws(n,e),n.subtreeFlags=0,e=i,i=n.child;i!==null;)Pv(i,e),i=i.sibling;return L(st,st.current&1|2),Ye&&ai(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&xt()>au&&(n.flags|=128,f=!0,Yr(o,!1),n.lanes=4194304)}else{if(!f)if(e=Us(g),e!==null){if(n.flags|=128,f=!0,e=e.updateQueue,n.updateQueue=e,Ws(n,e),Yr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!g.alternate&&!Ye)return it(n),null}else 2*xt()-o.renderingStartTime>au&&i!==536870912&&(n.flags|=128,f=!0,Yr(o,!1),n.lanes=4194304);o.isBackwards?(g.sibling=n.child,n.child=g):(e=o.last,e!==null?e.sibling=g:n.child=g,o.last=g)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=xt(),e.sibling=null,i=st.current,L(st,f?i&1|2:i&1),Ye&&ai(n,o.treeForkCount),e):(it(n),null);case 22:case 23:return tn(n),Ad(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(i&536870912)!==0&&(n.flags&128)===0&&(it(n),n.subtreeFlags&6&&(n.flags|=8192)):it(n),i=n.updateQueue,i!==null&&Ws(n,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==i&&(n.flags|=2048),e!==null&&Q(Ea),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),n.memoizedState.cache!==i&&(n.flags|=2048),ri(gt),it(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Wz(e,n){switch(md(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return ri(gt),fe(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ee(n),null;case 31:if(n.memoizedState!==null){if(tn(n),n.alternate===null)throw Error(r(340));xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(tn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));xa()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return Q(st),null;case 4:return fe(),null;case 10:return ri(n.type),null;case 22:case 23:return tn(n),Ad(),e!==null&&Q(Ea),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return ri(gt),null;case 25:return null;default:return null}}function Nx(e,n){switch(md(n),n.tag){case 3:ri(gt),fe();break;case 26:case 27:case 5:Ee(n);break;case 4:fe();break;case 31:n.memoizedState!==null&&tn(n);break;case 13:tn(n);break;case 19:Q(st);break;case 10:ri(n.type);break;case 22:case 23:tn(n),Ad(),e!==null&&Q(Ea);break;case 24:ri(gt)}}function Gr(e,n){try{var i=n.updateQueue,o=i!==null?i.lastEffect:null;if(o!==null){var f=o.next;i=f;do{if((i.tag&e)===e){o=void 0;var g=i.create,b=i.inst;o=g(),b.destroy=o}i=i.next}while(i!==f)}}catch(A){Ke(n,n.return,A)}}function Yi(e,n,i){try{var o=n.updateQueue,f=o!==null?o.lastEffect:null;if(f!==null){var g=f.next;o=g;do{if((o.tag&e)===e){var b=o.inst,A=b.destroy;if(A!==void 0){b.destroy=void 0,f=n;var X=i,te=A;try{te()}catch(se){Ke(f,X,se)}}}o=o.next}while(o!==g)}}catch(se){Ke(n,n.return,se)}}function Cx(e){var n=e.updateQueue;if(n!==null){var i=e.stateNode;try{pb(n,i)}catch(o){Ke(e,e.return,o)}}}function Mx(e,n,i){i.props=Ta(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(o){Ke(e,n,o)}}function Xr(e,n){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var o=e.stateNode;break;case 30:o=e.stateNode;break;default:o=e.stateNode}typeof i=="function"?e.refCleanup=i(o):i.current=o}}catch(f){Ke(e,n,f)}}function qn(e,n){var i=e.ref,o=e.refCleanup;if(i!==null)if(typeof o=="function")try{o()}catch(f){Ke(e,n,f)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(f){Ke(e,n,f)}else i.current=null}function Tx(e){var n=e.type,i=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":i.autoFocus&&o.focus();break e;case"img":i.src?o.src=i.src:i.srcSet&&(o.srcset=i.srcSet)}}catch(f){Ke(e,e.return,f)}}function oh(e,n,i){try{var o=e.stateNode;wO(o,e.type,i,n),o[Rt]=n}catch(f){Ke(e,e.return,f)}}function Ax(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ki(e.type)||e.tag===4}function sh(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ax(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&&Ki(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 uh(e,n,i){var o=e.tag;if(o===5||o===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=ti));else if(o!==4&&(o===27&&Ki(e.type)&&(i=e.stateNode,n=null),e=e.child,e!==null))for(uh(e,n,i),e=e.sibling;e!==null;)uh(e,n,i),e=e.sibling}function eu(e,n,i){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?i.insertBefore(e,n):i.appendChild(e);else if(o!==4&&(o===27&&Ki(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(eu(e,n,i),e=e.sibling;e!==null;)eu(e,n,i),e=e.sibling}function zx(e){var n=e.stateNode,i=e.memoizedProps;try{for(var o=e.type,f=n.attributes;f.length;)n.removeAttributeNode(f[0]);Ot(n,o,i),n[St]=e,n[Rt]=i}catch(g){Ke(e,e.return,g)}}var fi=!1,vt=!1,ch=!1,Ox=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function eO(e,n){if(e=e.containerInfo,Oh=wu,e=Gv(e),id(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var o=i.getSelection&&i.getSelection();if(o&&o.rangeCount!==0){i=o.anchorNode;var f=o.anchorOffset,g=o.focusNode;o=o.focusOffset;try{i.nodeType,g.nodeType}catch{i=null;break e}var b=0,A=-1,X=-1,te=0,se=0,ce=e,ie=null;t:for(;;){for(var le;ce!==i||f!==0&&ce.nodeType!==3||(A=b+f),ce!==g||o!==0&&ce.nodeType!==3||(X=b+o),ce.nodeType===3&&(b+=ce.nodeValue.length),(le=ce.firstChild)!==null;)ie=ce,ce=le;for(;;){if(ce===e)break t;if(ie===i&&++te===f&&(A=b),ie===g&&++se===o&&(X=b),(le=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=le}i=A===-1||X===-1?null:{start:A,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(jh={focusedElem:e,selectionRange:i},wu=!1,Nt=n;Nt!==null;)if(n=Nt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,Nt=e;else for(;Nt!==null;){switch(n=Nt,g=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++)f=e[i],f.ref.impl=f.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&g!==null){e=void 0,i=n,f=g.memoizedProps,g=g.memoizedState,o=i.stateNode;try{var ve=Ta(i.type,f);e=o.getSnapshotBeforeUpdate(ve,g),o.__reactInternalSnapshotBeforeUpdate=e}catch(Ce){Ke(i,i.return,Ce)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,i=e.nodeType,i===9)kh(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":kh(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(r(163))}if(e=n.sibling,e!==null){e.return=n.return,Nt=e;break}Nt=n.return}}function jx(e,n,i){var o=i.flags;switch(i.tag){case 0:case 11:case 15:hi(e,i),o&4&&Gr(5,i);break;case 1:if(hi(e,i),o&4)if(e=i.stateNode,n===null)try{e.componentDidMount()}catch(b){Ke(i,i.return,b)}else{var f=Ta(i.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(f,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Ke(i,i.return,b)}}o&64&&Cx(i),o&512&&Xr(i,i.return);break;case 3:if(hi(e,i),o&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{pb(e,n)}catch(b){Ke(i,i.return,b)}}break;case 27:n===null&&o&4&&zx(i);case 26:case 5:hi(e,i),n===null&&o&4&&Tx(i),o&512&&Xr(i,i.return);break;case 12:hi(e,i);break;case 31:hi(e,i),o&4&&kx(e,i);break;case 13:hi(e,i),o&4&&Hx(e,i),o&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=uO.bind(null,i),AO(e,i))));break;case 22:if(o=i.memoizedState!==null||fi,!o){n=n!==null&&n.memoizedState!==null||vt,f=fi;var g=vt;fi=o,(vt=n)&&!g?mi(e,i,(i.subtreeFlags&8772)!==0):hi(e,i),fi=f,vt=g}break;case 30:break;default:hi(e,i)}}function Rx(e){var n=e.alternate;n!==null&&(e.alternate=null,Rx(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&pr(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 lt=null,Yt=!1;function di(e,n,i){for(i=i.child;i!==null;)Dx(e,n,i),i=i.sibling}function Dx(e,n,i){if(Ct&&typeof Ct.onCommitFiberUnmount=="function")try{Ct.onCommitFiberUnmount(Fn,i)}catch{}switch(i.tag){case 26:vt||qn(i,n),di(e,n,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:vt||qn(i,n);var o=lt,f=Yt;Ki(i.type)&&(lt=i.stateNode,Yt=!1),di(e,n,i),Wr(i.stateNode),lt=o,Yt=f;break;case 5:vt||qn(i,n);case 6:if(o=lt,f=Yt,lt=null,di(e,n,i),lt=o,Yt=f,lt!==null)if(Yt)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(i.stateNode)}catch(g){Ke(i,n,g)}else try{lt.removeChild(i.stateNode)}catch(g){Ke(i,n,g)}break;case 18:lt!==null&&(Yt?(e=lt,C1(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),Ol(e)):C1(lt,i.stateNode));break;case 4:o=lt,f=Yt,lt=i.stateNode.containerInfo,Yt=!0,di(e,n,i),lt=o,Yt=f;break;case 0:case 11:case 14:case 15:Yi(2,i,n),vt||Yi(4,i,n),di(e,n,i);break;case 1:vt||(qn(i,n),o=i.stateNode,typeof o.componentWillUnmount=="function"&&Mx(i,n,o)),di(e,n,i);break;case 21:di(e,n,i);break;case 22:vt=(o=vt)||i.memoizedState!==null,di(e,n,i),vt=o;break;default:di(e,n,i)}}function kx(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ol(e)}catch(i){Ke(n,n.return,i)}}}function Hx(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ol(e)}catch(i){Ke(n,n.return,i)}}function tO(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new Ox),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new Ox),n;default:throw Error(r(435,e.tag))}}function tu(e,n){var i=tO(e);n.forEach(function(o){if(!i.has(o)){i.add(o);var f=cO.bind(null,e,o);o.then(f,f)}})}function Gt(e,n){var i=n.deletions;if(i!==null)for(var o=0;o<i.length;o++){var f=i[o],g=e,b=n,A=b;e:for(;A!==null;){switch(A.tag){case 27:if(Ki(A.type)){lt=A.stateNode,Yt=!1;break e}break;case 5:lt=A.stateNode,Yt=!1;break e;case 3:case 4:lt=A.stateNode.containerInfo,Yt=!0;break e}A=A.return}if(lt===null)throw Error(r(160));Dx(g,b,f),lt=null,Yt=!1,g=f.alternate,g!==null&&(g.return=null),f.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)Lx(n,e),n=n.sibling}var Cn=null;function Lx(e,n){var i=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(n,e),Xt(e),o&4&&(Yi(3,e,e.return),Gr(3,e),Yi(5,e,e.return));break;case 1:Gt(n,e),Xt(e),o&512&&(vt||i===null||qn(i,i.return)),o&64&&fi&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?o:i.concat(o))));break;case 26:var f=Cn;if(Gt(n,e),Xt(e),o&512&&(vt||i===null||qn(i,i.return)),o&4){var g=i!==null?i.memoizedState:null;if(o=e.memoizedState,i===null)if(o===null)if(e.stateNode===null){e:{o=e.type,i=e.memoizedProps,f=f.ownerDocument||f;t:switch(o){case"title":g=f.getElementsByTagName("title")[0],(!g||g[da]||g[St]||g.namespaceURI==="http://www.w3.org/2000/svg"||g.hasAttribute("itemprop"))&&(g=f.createElement(o),f.head.insertBefore(g,f.querySelector("head > title"))),Ot(g,o,i),g[St]=e,mt(g),o=g;break e;case"link":var b=L1("link","href",f).get(o+(i.href||""));if(b){for(var A=0;A<b.length;A++)if(g=b[A],g.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&g.getAttribute("rel")===(i.rel==null?null:i.rel)&&g.getAttribute("title")===(i.title==null?null:i.title)&&g.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){b.splice(A,1);break t}}g=f.createElement(o),Ot(g,o,i),f.head.appendChild(g);break;case"meta":if(b=L1("meta","content",f).get(o+(i.content||""))){for(A=0;A<b.length;A++)if(g=b[A],g.getAttribute("content")===(i.content==null?null:""+i.content)&&g.getAttribute("name")===(i.name==null?null:i.name)&&g.getAttribute("property")===(i.property==null?null:i.property)&&g.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&g.getAttribute("charset")===(i.charSet==null?null:i.charSet)){b.splice(A,1);break t}}g=f.createElement(o),Ot(g,o,i),f.head.appendChild(g);break;default:throw Error(r(468,o))}g[St]=e,mt(g),o=g}e.stateNode=o}else B1(f,e.type,e.stateNode);else e.stateNode=H1(f,o,e.memoizedProps);else g!==o?(g===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):g.count--,o===null?B1(f,e.type,e.stateNode):H1(f,o,e.memoizedProps)):o===null&&e.stateNode!==null&&oh(e,e.memoizedProps,i.memoizedProps)}break;case 27:Gt(n,e),Xt(e),o&512&&(vt||i===null||qn(i,i.return)),i!==null&&o&4&&oh(e,e.memoizedProps,i.memoizedProps);break;case 5:if(Gt(n,e),Xt(e),o&512&&(vt||i===null||qn(i,i.return)),e.flags&32){f=e.stateNode;try{el(f,"")}catch(ve){Ke(e,e.return,ve)}}o&4&&e.stateNode!=null&&(f=e.memoizedProps,oh(e,f,i!==null?i.memoizedProps:f)),o&1024&&(ch=!0);break;case 6:if(Gt(n,e),Xt(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,i=e.stateNode;try{i.nodeValue=o}catch(ve){Ke(e,e.return,ve)}}break;case 3:if(yu=null,f=Cn,Cn=gu(n.containerInfo),Gt(n,e),Cn=f,Xt(e),o&4&&i!==null&&i.memoizedState.isDehydrated)try{Ol(n.containerInfo)}catch(ve){Ke(e,e.return,ve)}ch&&(ch=!1,Bx(e));break;case 4:o=Cn,Cn=gu(e.stateNode.containerInfo),Gt(n,e),Xt(e),Cn=o;break;case 12:Gt(n,e),Xt(e);break;case 31:Gt(n,e),Xt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tu(e,o)));break;case 13:Gt(n,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&(iu=xt()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tu(e,o)));break;case 22:f=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,te=fi,se=vt;if(fi=te||f,vt=se||X,Gt(n,e),vt=se,fi=te,Xt(e),o&8192)e:for(n=e.stateNode,n._visibility=f?n._visibility&-2:n._visibility|1,f&&(i===null||X||fi||vt||Aa(e)),i=null,n=e;;){if(n.tag===5||n.tag===26){if(i===null){X=i=n;try{if(g=X.stateNode,f)b=g.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{A=X.stateNode;var ce=X.memoizedProps.style,ie=ce!=null&&ce.hasOwnProperty("display")?ce.display:null;A.style.display=ie==null||typeof ie=="boolean"?"":(""+ie).trim()}}catch(ve){Ke(X,X.return,ve)}}}else if(n.tag===6){if(i===null){X=n;try{X.stateNode.nodeValue=f?"":X.memoizedProps}catch(ve){Ke(X,X.return,ve)}}}else if(n.tag===18){if(i===null){X=n;try{var le=X.stateNode;f?M1(le,!0):M1(X.stateNode,!1)}catch(ve){Ke(X,X.return,ve)}}}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}o&4&&(o=e.updateQueue,o!==null&&(i=o.retryQueue,i!==null&&(o.retryQueue=null,tu(e,i))));break;case 19:Gt(n,e),Xt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,tu(e,o)));break;case 30:break;case 21:break;default:Gt(n,e),Xt(e)}}function Xt(e){var n=e.flags;if(n&2){try{for(var i,o=e.return;o!==null;){if(Ax(o)){i=o;break}o=o.return}if(i==null)throw Error(r(160));switch(i.tag){case 27:var f=i.stateNode,g=sh(e);eu(e,g,f);break;case 5:var b=i.stateNode;i.flags&32&&(el(b,""),i.flags&=-33);var A=sh(e);eu(e,A,b);break;case 3:case 4:var X=i.stateNode.containerInfo,te=sh(e);uh(e,te,X);break;default:throw Error(r(161))}}catch(se){Ke(e,e.return,se)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function Bx(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;Bx(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function hi(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)jx(e,n.alternate,n),n=n.sibling}function Aa(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:Yi(4,n,n.return),Aa(n);break;case 1:qn(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount=="function"&&Mx(n,n.return,i),Aa(n);break;case 27:Wr(n.stateNode);case 26:case 5:qn(n,n.return),Aa(n);break;case 22:n.memoizedState===null&&Aa(n);break;case 30:Aa(n);break;default:Aa(n)}e=e.sibling}}function mi(e,n,i){for(i=i&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,f=e,g=n,b=g.flags;switch(g.tag){case 0:case 11:case 15:mi(f,g,i),Gr(4,g);break;case 1:if(mi(f,g,i),o=g,f=o.stateNode,typeof f.componentDidMount=="function")try{f.componentDidMount()}catch(te){Ke(o,o.return,te)}if(o=g,f=o.updateQueue,f!==null){var A=o.stateNode;try{var X=f.shared.hiddenCallbacks;if(X!==null)for(f.shared.hiddenCallbacks=null,f=0;f<X.length;f++)gb(X[f],A)}catch(te){Ke(o,o.return,te)}}i&&b&64&&Cx(g),Xr(g,g.return);break;case 27:zx(g);case 26:case 5:mi(f,g,i),i&&o===null&&b&4&&Tx(g),Xr(g,g.return);break;case 12:mi(f,g,i);break;case 31:mi(f,g,i),i&&b&4&&kx(f,g);break;case 13:mi(f,g,i),i&&b&4&&Hx(f,g);break;case 22:g.memoizedState===null&&mi(f,g,i),Xr(g,g.return);break;case 30:break;default:mi(f,g,i)}n=n.sibling}}function fh(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&&zr(i))}function dh(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&zr(e))}function Mn(e,n,i,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)qx(e,n,i,o),n=n.sibling}function qx(e,n,i,o){var f=n.flags;switch(n.tag){case 0:case 11:case 15:Mn(e,n,i,o),f&2048&&Gr(9,n);break;case 1:Mn(e,n,i,o);break;case 3:Mn(e,n,i,o),f&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&zr(e)));break;case 12:if(f&2048){Mn(e,n,i,o),e=n.stateNode;try{var g=n.memoizedProps,b=g.id,A=g.onPostCommit;typeof A=="function"&&A(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){Ke(n,n.return,X)}}else Mn(e,n,i,o);break;case 31:Mn(e,n,i,o);break;case 13:Mn(e,n,i,o);break;case 23:break;case 22:g=n.stateNode,b=n.alternate,n.memoizedState!==null?g._visibility&2?Mn(e,n,i,o):Zr(e,n):g._visibility&2?Mn(e,n,i,o):(g._visibility|=2,xl(e,n,i,o,(n.subtreeFlags&10256)!==0||!1)),f&2048&&fh(b,n);break;case 24:Mn(e,n,i,o),f&2048&&dh(n.alternate,n);break;default:Mn(e,n,i,o)}}function xl(e,n,i,o,f){for(f=f&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var g=e,b=n,A=i,X=o,te=b.flags;switch(b.tag){case 0:case 11:case 15:xl(g,b,A,X,f),Gr(8,b);break;case 23:break;case 22:var se=b.stateNode;b.memoizedState!==null?se._visibility&2?xl(g,b,A,X,f):Zr(g,b):(se._visibility|=2,xl(g,b,A,X,f)),f&&te&2048&&fh(b.alternate,b);break;case 24:xl(g,b,A,X,f),f&&te&2048&&dh(b.alternate,b);break;default:xl(g,b,A,X,f)}n=n.sibling}}function Zr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var i=e,o=n,f=o.flags;switch(o.tag){case 22:Zr(i,o),f&2048&&fh(o.alternate,o);break;case 24:Zr(i,o),f&2048&&dh(o.alternate,o);break;default:Zr(i,o)}n=n.sibling}}var Qr=8192;function wl(e,n,i){if(e.subtreeFlags&Qr)for(e=e.child;e!==null;)Ux(e,n,i),e=e.sibling}function Ux(e,n,i){switch(e.tag){case 26:wl(e,n,i),e.flags&Qr&&e.memoizedState!==null&&VO(i,Cn,e.memoizedState,e.memoizedProps);break;case 5:wl(e,n,i);break;case 3:case 4:var o=Cn;Cn=gu(e.stateNode.containerInfo),wl(e,n,i),Cn=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=Qr,Qr=16777216,wl(e,n,i),Qr=o):wl(e,n,i));break;default:wl(e,n,i)}}function Vx(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 Ir(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Nt=o,Gx(o,e)}Vx(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yx(e),e=e.sibling}function Yx(e){switch(e.tag){case 0:case 11:case 15:Ir(e),e.flags&2048&&Yi(9,e,e.return);break;case 3:Ir(e);break;case 12:Ir(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,nu(e)):Ir(e);break;default:Ir(e)}}function nu(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var i=0;i<n.length;i++){var o=n[i];Nt=o,Gx(o,e)}Vx(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:Yi(8,n,n.return),nu(n);break;case 22:i=n.stateNode,i._visibility&2&&(i._visibility&=-3,nu(n));break;default:nu(n)}e=e.sibling}}function Gx(e,n){for(;Nt!==null;){var i=Nt;switch(i.tag){case 0:case 11:case 15:Yi(8,i,n);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var o=i.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:zr(i.memoizedState.cache)}if(o=i.child,o!==null)o.return=i,Nt=o;else e:for(i=e;Nt!==null;){o=Nt;var f=o.sibling,g=o.return;if(Rx(o),o===i){Nt=null;break e}if(f!==null){f.return=g,Nt=f;break e}Nt=g}}}var nO={getCacheForType:function(e){var n=At(gt),i=n.data.get(e);return i===void 0&&(i=e(),n.data.set(e,i)),i},cacheSignal:function(){return At(gt).controller.signal}},iO=typeof WeakMap=="function"?WeakMap:Map,Ie=0,We=null,Re=null,Le=0,$e=0,nn=null,Gi=!1,Sl=!1,hh=!1,gi=0,ot=0,Xi=0,za=0,mh=0,an=0,El=0,$r=null,Zt=null,gh=!1,iu=0,Xx=0,au=1/0,lu=null,Zi=null,Et=0,Qi=null,_l=null,pi=0,ph=0,yh=null,Zx=null,Kr=0,vh=null;function ln(){return(Ie&2)!==0&&Le!==0?Le&-Le:j.T!==null?_h():us()}function Qx(){if(an===0)if((Le&536870912)===0||Ye){var e=ze;ze<<=1,(ze&3932160)===0&&(ze=262144),an=e}else an=536870912;return e=en.current,e!==null&&(e.flags|=32),an}function Qt(e,n,i){(e===We&&($e===2||$e===9)||e.cancelPendingCommit!==null)&&(Nl(e,0),Ii(e,Le,an,!1)),fa(e,i),((Ie&2)===0||e!==We)&&(e===We&&((Ie&2)===0&&(za|=i),ot===4&&Ii(e,Le,an,!1)),Un(e))}function Ix(e,n,i){if((Ie&6)!==0)throw Error(r(327));var o=!i&&(n&127)===0&&(n&e.expiredLanes)===0||Jt(e,n),f=o?rO(e,n):xh(e,n,!0),g=o;do{if(f===0){Sl&&!o&&Ii(e,n,0,!1);break}else{if(i=e.current.alternate,g&&!aO(i)){f=xh(e,n,!1),g=!1;continue}if(f===2){if(g=n,e.errorRecoveryDisabledLanes&g)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var A=e;f=$r;var X=A.current.memoizedState.isDehydrated;if(X&&(Nl(A,b).flags|=256),b=xh(A,b,!1),b!==2){if(hh&&!X){A.errorRecoveryDisabledLanes|=g,za|=g,f=4;break e}g=Zt,Zt=f,g!==null&&(Zt===null?Zt=g:Zt.push.apply(Zt,g))}f=b}if(g=!1,f!==2)continue}}if(f===1){Nl(e,0),Ii(e,n,0,!0);break}e:{switch(o=e,g=f,g){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Ii(o,n,an,!Gi);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(f=iu+300-xt(),10<f)){if(Ii(o,n,an,!Gi),ht(o,0,!0)!==0)break e;pi=n,o.timeoutHandle=_1($x.bind(null,o,i,Zt,lu,gh,n,an,za,El,Gi,g,"Throttled",-0,0),f);break e}$x(o,i,Zt,lu,gh,n,an,za,El,Gi,g,null,-0,0)}}break}while(!0);Un(e)}function $x(e,n,i,o,f,g,b,A,X,te,se,ce,ie,le){if(e.timeoutHandle=-1,ce=n.subtreeFlags,ce&8192||(ce&16785408)===16785408){ce={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ti},Ux(n,g,ce);var ve=(g&62914560)===g?iu-xt():(g&4194048)===g?Xx-xt():0;if(ve=YO(ce,ve),ve!==null){pi=g,e.cancelPendingCommit=ve(n1.bind(null,e,n,g,i,o,f,b,A,X,se,ce,null,ie,le)),Ii(e,g,b,!te);return}}n1(e,n,g,i,o,f,b,A,X)}function aO(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 o=0;o<i.length;o++){var f=i[o],g=f.getSnapshot;f=f.value;try{if(!Pt(g(),f))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 Ii(e,n,i,o){n&=~mh,n&=~za,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var f=n;0<f;){var g=31-Mt(f),b=1<<g;o[g]=-1,f&=~b}i!==0&&rs(e,i,n)}function ru(){return(Ie&6)===0?(Fr(0),!1):!0}function bh(){if(Re!==null){if($e===0)var e=Re.return;else e=Re,li=wa=null,kd(e),gl=null,jr=0,e=Re;for(;e!==null;)Nx(e.alternate,e),e=e.return;Re=null}}function Nl(e,n){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,_O(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),pi=0,bh(),We=e,Re=i=ii(e.current,null),Le=n,$e=0,nn=null,Gi=!1,Sl=Jt(e,n),hh=!1,El=an=mh=za=Xi=ot=0,Zt=$r=null,gh=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var f=31-Mt(o),g=1<<f;n|=e[f],o&=~g}return gi=n,Ms(),i}function Kx(e,n){Ae=null,j.H=Ur,n===ml||n===ks?(n=fb(),$e=3):n===Ed?(n=fb(),$e=4):$e=n===Jd?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,nn=n,Re===null&&(ot=1,Ks(e,sn(n,e.current)))}function Fx(){var e=en.current;return e===null?!0:(Le&4194048)===Le?dn===null:(Le&62914560)===Le||(Le&536870912)!==0?e===dn:!1}function Jx(){var e=j.H;return j.H=Ur,e===null?Ur:e}function Px(){var e=j.A;return j.A=nO,e}function ou(){ot=4,Gi||(Le&4194048)!==Le&&en.current!==null||(Sl=!0),(Xi&134217727)===0&&(za&134217727)===0||We===null||Ii(We,Le,an,!1)}function xh(e,n,i){var o=Ie;Ie|=2;var f=Jx(),g=Px();(We!==e||Le!==n)&&(lu=null,Nl(e,n)),n=!1;var b=ot;e:do try{if($e!==0&&Re!==null){var A=Re,X=nn;switch($e){case 8:bh(),b=6;break e;case 3:case 2:case 9:case 6:en.current===null&&(n=!0);var te=$e;if($e=0,nn=null,Cl(e,A,X,te),i&&Sl){b=0;break e}break;default:te=$e,$e=0,nn=null,Cl(e,A,X,te)}}lO(),b=ot;break}catch(se){Kx(e,se)}while(!0);return n&&e.shellSuspendCounter++,li=wa=null,Ie=o,j.H=f,j.A=g,Re===null&&(We=null,Le=0,Ms()),b}function lO(){for(;Re!==null;)Wx(Re)}function rO(e,n){var i=Ie;Ie|=2;var o=Jx(),f=Px();We!==e||Le!==n?(lu=null,au=xt()+500,Nl(e,n)):Sl=Jt(e,n);e:do try{if($e!==0&&Re!==null){n=Re;var g=nn;t:switch($e){case 1:$e=0,nn=null,Cl(e,n,g,1);break;case 2:case 9:if(ub(g)){$e=0,nn=null,e1(n);break}n=function(){$e!==2&&$e!==9||We!==e||($e=7),Un(e)},g.then(n,n);break e;case 3:$e=7;break e;case 4:$e=5;break e;case 7:ub(g)?($e=0,nn=null,e1(n)):($e=0,nn=null,Cl(e,n,g,7));break;case 5:var b=null;switch(Re.tag){case 26:b=Re.memoizedState;case 5:case 27:var A=Re;if(b?q1(b):A.stateNode.complete){$e=0,nn=null;var X=A.sibling;if(X!==null)Re=X;else{var te=A.return;te!==null?(Re=te,su(te)):Re=null}break t}}$e=0,nn=null,Cl(e,n,g,5);break;case 6:$e=0,nn=null,Cl(e,n,g,6);break;case 8:bh(),ot=6;break e;default:throw Error(r(462))}}oO();break}catch(se){Kx(e,se)}while(!0);return li=wa=null,j.H=o,j.A=f,Ie=i,Re!==null?0:(We=null,Le=0,Ms(),ot)}function oO(){for(;Re!==null&&!Rn();)Wx(Re)}function Wx(e){var n=Ex(e.alternate,e,gi);e.memoizedProps=e.pendingProps,n===null?su(e):Re=n}function e1(e){var n=e,i=n.alternate;switch(n.tag){case 15:case 0:n=yx(i,n,n.pendingProps,n.type,void 0,Le);break;case 11:n=yx(i,n,n.pendingProps,n.type.render,n.ref,Le);break;case 5:kd(n);default:Nx(i,n),n=Re=Pv(n,gi),n=Ex(i,n,gi)}e.memoizedProps=e.pendingProps,n===null?su(e):Re=n}function Cl(e,n,i,o){li=wa=null,kd(n),gl=null,jr=0;var f=n.return;try{if(Kz(e,f,n,i,Le)){ot=1,Ks(e,sn(i,e.current)),Re=null;return}}catch(g){if(f!==null)throw Re=f,g;ot=1,Ks(e,sn(i,e.current)),Re=null;return}n.flags&32768?(Ye||o===1?e=!0:Sl||(Le&536870912)!==0?e=!1:(Gi=e=!0,(o===2||o===9||o===3||o===6)&&(o=en.current,o!==null&&o.tag===13&&(o.flags|=16384))),t1(n,e)):su(n)}function su(e){var n=e;do{if((n.flags&32768)!==0){t1(n,Gi);return}e=n.return;var i=Pz(n.alternate,n,gi);if(i!==null){Re=i;return}if(n=n.sibling,n!==null){Re=n;return}Re=n=e}while(n!==null);ot===0&&(ot=5)}function t1(e,n){do{var i=Wz(e.alternate,e);if(i!==null){i.flags&=32767,Re=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!n&&(e=e.sibling,e!==null)){Re=e;return}Re=e=i}while(e!==null);ot=6,Re=null}function n1(e,n,i,o,f,g,b,A,X){e.cancelPendingCommit=null;do uu();while(Et!==0);if((Ie&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(g=n.lanes|n.childLanes,g|=sd,Bf(e,i,g,b,A,X),e===We&&(Re=We=null,Le=0),_l=n,Qi=e,pi=i,ph=g,yh=f,Zx=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,fO(kn,function(){return o1(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=j.T,j.T=null,f=G.p,G.p=2,b=Ie,Ie|=4;try{eO(e,n,i)}finally{Ie=b,G.p=f,j.T=o}}Et=1,i1(),a1(),l1()}}function i1(){if(Et===1){Et=0;var e=Qi,n=_l,i=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||i){i=j.T,j.T=null;var o=G.p;G.p=2;var f=Ie;Ie|=4;try{Lx(n,e);var g=jh,b=Gv(e.containerInfo),A=g.focusedElem,X=g.selectionRange;if(b!==A&&A&&A.ownerDocument&&Yv(A.ownerDocument.documentElement,A)){if(X!==null&&id(A)){var te=X.start,se=X.end;if(se===void 0&&(se=te),"selectionStart"in A)A.selectionStart=te,A.selectionEnd=Math.min(se,A.value.length);else{var ce=A.ownerDocument||document,ie=ce&&ce.defaultView||window;if(ie.getSelection){var le=ie.getSelection(),ve=A.textContent.length,Ce=Math.min(X.start,ve),Pe=X.end===void 0?Ce:Math.min(X.end,ve);!le.extend&&Ce>Pe&&(b=Pe,Pe=Ce,Ce=b);var J=Vv(A,Ce),$=Vv(A,Pe);if(J&&$&&(le.rangeCount!==1||le.anchorNode!==J.node||le.anchorOffset!==J.offset||le.focusNode!==$.node||le.focusOffset!==$.offset)){var ee=ce.createRange();ee.setStart(J.node,J.offset),le.removeAllRanges(),Ce>Pe?(le.addRange(ee),le.extend($.node,$.offset)):(ee.setEnd($.node,$.offset),le.addRange(ee))}}}}for(ce=[],le=A;le=le.parentNode;)le.nodeType===1&&ce.push({element:le,left:le.scrollLeft,top:le.scrollTop});for(typeof A.focus=="function"&&A.focus(),A=0;A<ce.length;A++){var ue=ce[A];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}wu=!!Oh,jh=Oh=null}finally{Ie=f,G.p=o,j.T=i}}e.current=n,Et=2}}function a1(){if(Et===2){Et=0;var e=Qi,n=_l,i=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||i){i=j.T,j.T=null;var o=G.p;G.p=2;var f=Ie;Ie|=4;try{jx(e,n.alternate,n)}finally{Ie=f,G.p=o,j.T=i}}Et=3}}function l1(){if(Et===4||Et===3){Et=0,Kn();var e=Qi,n=_l,i=pi,o=Zx;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?Et=5:(Et=0,_l=Qi=null,r1(e,e.pendingLanes));var f=e.pendingLanes;if(f===0&&(Zi=null),gr(i),n=n.stateNode,Ct&&typeof Ct.onCommitFiberRoot=="function")try{Ct.onCommitFiberRoot(Fn,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=j.T,f=G.p,G.p=2,j.T=null;try{for(var g=e.onRecoverableError,b=0;b<o.length;b++){var A=o[b];g(A.value,{componentStack:A.stack})}}finally{j.T=n,G.p=f}}(pi&3)!==0&&uu(),Un(e),f=e.pendingLanes,(i&261930)!==0&&(f&42)!==0?e===vh?Kr++:(Kr=0,vh=e):Kr=0,Fr(0)}}function r1(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,zr(n)))}function uu(){return i1(),a1(),l1(),o1()}function o1(){if(Et!==5)return!1;var e=Qi,n=ph;ph=0;var i=gr(pi),o=j.T,f=G.p;try{G.p=32>i?32:i,j.T=null,i=yh,yh=null;var g=Qi,b=pi;if(Et=0,_l=Qi=null,pi=0,(Ie&6)!==0)throw Error(r(331));var A=Ie;if(Ie|=4,Yx(g.current),qx(g,g.current,b,i),Ie=A,Fr(0,!1),Ct&&typeof Ct.onPostCommitFiberRoot=="function")try{Ct.onPostCommitFiberRoot(Fn,g)}catch{}return!0}finally{G.p=f,j.T=o,r1(e,n)}}function s1(e,n,i){n=sn(i,n),n=Fd(e.stateNode,n,2),e=qi(e,n,2),e!==null&&(fa(e,2),Un(e))}function Ke(e,n,i){if(e.tag===3)s1(e,e,i);else for(;n!==null;){if(n.tag===3){s1(n,e,i);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Zi===null||!Zi.has(o))){e=sn(i,e),i=ux(2),o=qi(n,i,2),o!==null&&(cx(i,o,n,e),fa(o,2),Un(o));break}}n=n.return}}function wh(e,n,i){var o=e.pingCache;if(o===null){o=e.pingCache=new iO;var f=new Set;o.set(n,f)}else f=o.get(n),f===void 0&&(f=new Set,o.set(n,f));f.has(i)||(hh=!0,f.add(i),e=sO.bind(null,e,n,i),n.then(e,e))}function sO(e,n,i){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,We===e&&(Le&i)===i&&(ot===4||ot===3&&(Le&62914560)===Le&&300>xt()-iu?(Ie&2)===0&&Nl(e,0):mh|=i,El===Le&&(El=0)),Un(e)}function u1(e,n){n===0&&(n=Ka()),e=va(e,n),e!==null&&(fa(e,n),Un(e))}function uO(e){var n=e.memoizedState,i=0;n!==null&&(i=n.retryLane),u1(e,i)}function cO(e,n){var i=0;switch(e.tag){case 31:case 13:var o=e.stateNode,f=e.memoizedState;f!==null&&(i=f.retryLane);break;case 19:o=e.stateNode;break;case 22:o=e.stateNode._retryCache;break;default:throw Error(r(314))}o!==null&&o.delete(n),u1(e,i)}function fO(e,n){return Ft(e,n)}var cu=null,Ml=null,Sh=!1,fu=!1,Eh=!1,$i=0;function Un(e){e!==Ml&&e.next===null&&(Ml===null?cu=Ml=e:Ml=Ml.next=e),fu=!0,Sh||(Sh=!0,hO())}function Fr(e,n){if(!Eh&&fu){Eh=!0;do for(var i=!1,o=cu;o!==null;){if(e!==0){var f=o.pendingLanes;if(f===0)var g=0;else{var b=o.suspendedLanes,A=o.pingedLanes;g=(1<<31-Mt(42|e)+1)-1,g&=f&~(b&~A),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(i=!0,h1(o,g))}else g=Le,g=ht(o,o===We?g:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(g&3)===0||Jt(o,g)||(i=!0,h1(o,g));o=o.next}while(i);Eh=!1}}function dO(){c1()}function c1(){fu=Sh=!1;var e=0;$i!==0&&EO()&&(e=$i);for(var n=xt(),i=null,o=cu;o!==null;){var f=o.next,g=f1(o,n);g===0?(o.next=null,i===null?cu=f:i.next=f,f===null&&(Ml=i)):(i=o,(e!==0||(g&3)!==0)&&(fu=!0)),o=f}Et!==0&&Et!==5||Fr(e),$i!==0&&($i=0)}function f1(e,n){for(var i=e.suspendedLanes,o=e.pingedLanes,f=e.expirationTimes,g=e.pendingLanes&-62914561;0<g;){var b=31-Mt(g),A=1<<b,X=f[b];X===-1?((A&i)===0||(A&o)!==0)&&(f[b]=wt(A,n)):X<=n&&(e.expiredLanes|=A),g&=~A}if(n=We,i=Le,i=ht(e,e===n?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,i===0||e===n&&($e===2||$e===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Sn(o),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Jt(e,i)){if(n=i&-i,n===e.callbackPriority)return n;switch(o!==null&&Sn(o),gr(i)){case 2:case 8:i=Dn;break;case 32:i=kn;break;case 268435456:i=Ci;break;default:i=kn}return o=d1.bind(null,e),i=Ft(i,o),e.callbackPriority=n,e.callbackNode=i,n}return o!==null&&o!==null&&Sn(o),e.callbackPriority=2,e.callbackNode=null,2}function d1(e,n){if(Et!==0&&Et!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(uu()&&e.callbackNode!==i)return null;var o=Le;return o=ht(e,e===We?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(Ix(e,o,n),f1(e,xt()),e.callbackNode!=null&&e.callbackNode===i?d1.bind(null,e):null)}function h1(e,n){if(uu())return null;Ix(e,n,!0)}function hO(){NO(function(){(Ie&6)!==0?Ft(En,dO):c1()})}function _h(){if($i===0){var e=dl;e===0&&(e=Ne,Ne<<=1,(Ne&261888)===0&&(Ne=256)),$i=e}return $i}function m1(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:bs(""+e)}function g1(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 mO(e,n,i,o,f){if(n==="submit"&&i&&i.stateNode===f){var g=m1((f[Rt]||null).action),b=o.submitter;b&&(n=(n=b[Rt]||null)?m1(n.formAction):b.getAttribute("formAction"),n!==null&&(g=n,b=null));var A=new Es("action","action",null,o,f);e.push({event:A,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if($i!==0){var X=b?g1(f,b):new FormData(f);Xd(i,{pending:!0,data:X,method:f.method,action:g},null,X)}}else typeof g=="function"&&(A.preventDefault(),X=b?g1(f,b):new FormData(f),Xd(i,{pending:!0,data:X,method:f.method,action:g},g,X))},currentTarget:f}]})}}for(var Nh=0;Nh<od.length;Nh++){var Ch=od[Nh],gO=Ch.toLowerCase(),pO=Ch[0].toUpperCase()+Ch.slice(1);Nn(gO,"on"+pO)}Nn(Qv,"onAnimationEnd"),Nn(Iv,"onAnimationIteration"),Nn($v,"onAnimationStart"),Nn("dblclick","onDoubleClick"),Nn("focusin","onFocus"),Nn("focusout","onBlur"),Nn(jz,"onTransitionRun"),Nn(Rz,"onTransitionStart"),Nn(Dz,"onTransitionCancel"),Nn(Kv,"onTransitionEnd"),Oi("onMouseEnter",["mouseout","mouseover"]),Oi("onMouseLeave",["mouseout","mouseover"]),Oi("onPointerEnter",["pointerout","pointerover"]),Oi("onPointerLeave",["pointerout","pointerover"]),Wn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Wn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Wn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Wn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Wn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Wn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Jr="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(" "),yO=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Jr));function p1(e,n){n=(n&4)!==0;for(var i=0;i<e.length;i++){var o=e[i],f=o.event;o=o.listeners;e:{var g=void 0;if(n)for(var b=o.length-1;0<=b;b--){var A=o[b],X=A.instance,te=A.currentTarget;if(A=A.listener,X!==g&&f.isPropagationStopped())break e;g=A,f.currentTarget=te;try{g(f)}catch(se){Cs(se)}f.currentTarget=null,g=X}else for(b=0;b<o.length;b++){if(A=o[b],X=A.instance,te=A.currentTarget,A=A.listener,X!==g&&f.isPropagationStopped())break e;g=A,f.currentTarget=te;try{g(f)}catch(se){Cs(se)}f.currentTarget=null,g=X}}}}function De(e,n){var i=n[Fa];i===void 0&&(i=n[Fa]=new Set);var o=e+"__bubble";i.has(o)||(y1(n,e,2,!1),i.add(o))}function Mh(e,n,i){var o=0;n&&(o|=4),y1(i,e,o,n)}var du="_reactListening"+Math.random().toString(36).slice(2);function Th(e){if(!e[du]){e[du]=!0,hs.forEach(function(i){i!=="selectionchange"&&(yO.has(i)||Mh(i,!1,e),Mh(i,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[du]||(n[du]=!0,Mh("selectionchange",!1,n))}}function y1(e,n,i,o){switch(Q1(n)){case 2:var f=ZO;break;case 8:f=QO;break;default:f=Gh}i=f.bind(null,n,i,e),f=void 0,!$f||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(f=!0),o?f!==void 0?e.addEventListener(n,i,{capture:!0,passive:f}):e.addEventListener(n,i,!0):f!==void 0?e.addEventListener(n,i,{passive:f}):e.addEventListener(n,i,!1)}function Ah(e,n,i,o,f){var g=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var b=o.tag;if(b===3||b===4){var A=o.stateNode.containerInfo;if(A===f)break;if(b===4)for(b=o.return;b!==null;){var X=b.tag;if((X===3||X===4)&&b.stateNode.containerInfo===f)return;b=b.return}for(;A!==null;){if(b=Mi(A),b===null)return;if(X=b.tag,X===5||X===6||X===26||X===27){o=g=b;continue e}A=A.parentNode}}o=o.return}Sv(function(){var te=g,se=Qf(i),ce=[];e:{var ie=Fv.get(e);if(ie!==void 0){var le=Es,ve=e;switch(e){case"keypress":if(ws(i)===0)break e;case"keydown":case"keyup":le=cz;break;case"focusin":ve="focus",le=Pf;break;case"focusout":ve="blur",le=Pf;break;case"beforeblur":case"afterblur":le=Pf;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":le=Nv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":le=P3;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":le=hz;break;case Qv:case Iv:case $v:le=tz;break;case Kv:le=gz;break;case"scroll":case"scrollend":le=F3;break;case"wheel":le=yz;break;case"copy":case"cut":case"paste":le=iz;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":le=Mv;break;case"toggle":case"beforetoggle":le=bz}var Ce=(n&4)!==0,Pe=!Ce&&(e==="scroll"||e==="scrollend"),J=Ce?ie!==null?ie+"Capture":null:ie;Ce=[];for(var $=te,ee;$!==null;){var ue=$;if(ee=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||ee===null||J===null||(ue=br($,J),ue!=null&&Ce.push(Pr($,ue,ee))),Pe)break;$=$.return}0<Ce.length&&(ie=new le(ie,ve,null,i,se),ce.push({event:ie,listeners:Ce}))}}if((n&7)===0){e:{if(ie=e==="mouseover"||e==="pointerover",le=e==="mouseout"||e==="pointerout",ie&&i!==Zf&&(ve=i.relatedTarget||i.fromElement)&&(Mi(ve)||ve[Pn]))break e;if((le||ie)&&(ie=se.window===se?se:(ie=se.ownerDocument)?ie.defaultView||ie.parentWindow:window,le?(ve=i.relatedTarget||i.toElement,le=te,ve=ve?Mi(ve):null,ve!==null&&(Pe=c(ve),Ce=ve.tag,ve!==Pe||Ce!==5&&Ce!==27&&Ce!==6)&&(ve=null)):(le=null,ve=te),le!==ve)){if(Ce=Nv,ue="onMouseLeave",J="onMouseEnter",$="mouse",(e==="pointerout"||e==="pointerover")&&(Ce=Mv,ue="onPointerLeave",J="onPointerEnter",$="pointer"),Pe=le==null?ie:Ai(le),ee=ve==null?ie:Ai(ve),ie=new Ce(ue,$+"leave",le,i,se),ie.target=Pe,ie.relatedTarget=ee,ue=null,Mi(se)===te&&(Ce=new Ce(J,$+"enter",ve,i,se),Ce.target=ee,Ce.relatedTarget=Pe,ue=Ce),Pe=ue,le&&ve)t:{for(Ce=vO,J=le,$=ve,ee=0,ue=J;ue;ue=Ce(ue))ee++;ue=0;for(var _e=$;_e;_e=Ce(_e))ue++;for(;0<ee-ue;)J=Ce(J),ee--;for(;0<ue-ee;)$=Ce($),ue--;for(;ee--;){if(J===$||$!==null&&J===$.alternate){Ce=J;break t}J=Ce(J),$=Ce($)}Ce=null}else Ce=null;le!==null&&v1(ce,ie,le,Ce,!1),ve!==null&&Pe!==null&&v1(ce,Pe,ve,Ce,!0)}}e:{if(ie=te?Ai(te):window,le=ie.nodeName&&ie.nodeName.toLowerCase(),le==="select"||le==="input"&&ie.type==="file")var Xe=kv;else if(Rv(ie))if(Hv)Xe=Az;else{Xe=Mz;var we=Cz}else le=ie.nodeName,!le||le.toLowerCase()!=="input"||ie.type!=="checkbox"&&ie.type!=="radio"?te&&Xf(te.elementType)&&(Xe=kv):Xe=Tz;if(Xe&&(Xe=Xe(e,te))){Dv(ce,Xe,i,se);break e}we&&we(e,ie,te),e==="focusout"&&te&&ie.type==="number"&&te.memoizedProps.value!=null&&vr(ie,"number",ie.value)}switch(we=te?Ai(te):window,e){case"focusin":(Rv(we)||we.contentEditable==="true")&&(al=we,ad=te,Mr=null);break;case"focusout":Mr=ad=al=null;break;case"mousedown":ld=!0;break;case"contextmenu":case"mouseup":case"dragend":ld=!1,Xv(ce,i,se);break;case"selectionchange":if(Oz)break;case"keydown":case"keyup":Xv(ce,i,se)}var Oe;if(ed)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else il?Ov(e,i)&&(Be="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Be="onCompositionStart");Be&&(Tv&&i.locale!=="ko"&&(il||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&il&&(Oe=Ev()):(ji=se,Kf="value"in ji?ji.value:ji.textContent,il=!0)),we=hu(te,Be),0<we.length&&(Be=new Cv(Be,e,null,i,se),ce.push({event:Be,listeners:we}),Oe?Be.data=Oe:(Oe=jv(i),Oe!==null&&(Be.data=Oe)))),(Oe=wz?Sz(e,i):Ez(e,i))&&(Be=hu(te,"onBeforeInput"),0<Be.length&&(we=new Cv("onBeforeInput","beforeinput",null,i,se),ce.push({event:we,listeners:Be}),we.data=Oe)),mO(ce,e,te,i,se)}p1(ce,n)})}function Pr(e,n,i){return{instance:e,listener:n,currentTarget:i}}function hu(e,n){for(var i=n+"Capture",o=[];e!==null;){var f=e,g=f.stateNode;if(f=f.tag,f!==5&&f!==26&&f!==27||g===null||(f=br(e,i),f!=null&&o.unshift(Pr(e,f,g)),f=br(e,n),f!=null&&o.push(Pr(e,f,g))),e.tag===3)return o;e=e.return}return[]}function vO(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function v1(e,n,i,o,f){for(var g=n._reactName,b=[];i!==null&&i!==o;){var A=i,X=A.alternate,te=A.stateNode;if(A=A.tag,X!==null&&X===o)break;A!==5&&A!==26&&A!==27||te===null||(X=te,f?(te=br(i,g),te!=null&&b.unshift(Pr(i,te,X))):f||(te=br(i,g),te!=null&&b.push(Pr(i,te,X)))),i=i.return}b.length!==0&&e.push({event:n,listeners:b})}var bO=/\r\n?/g,xO=/\u0000|\uFFFD/g;function b1(e){return(typeof e=="string"?e:""+e).replace(bO,`
9
+ `).replace(xO,"")}function x1(e,n){return n=b1(n),b1(e)===n}function Je(e,n,i,o,f,g){switch(i){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||el(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&el(e,""+o);break;case"className":Pa(e,"class",o);break;case"tabIndex":Pa(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":Pa(e,i,o);break;case"style":xv(e,o,g);break;case"data":if(n!=="object"){Pa(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||i!=="href")){e.removeAttribute(i);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=bs(""+o),e.setAttribute(i,o);break;case"action":case"formAction":if(typeof o=="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 g=="function"&&(i==="formAction"?(n!=="input"&&Je(e,n,"name",f.name,f,null),Je(e,n,"formEncType",f.formEncType,f,null),Je(e,n,"formMethod",f.formMethod,f,null),Je(e,n,"formTarget",f.formTarget,f,null)):(Je(e,n,"encType",f.encType,f,null),Je(e,n,"method",f.method,f,null),Je(e,n,"target",f.target,f,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(i);break}o=bs(""+o),e.setAttribute(i,o);break;case"onClick":o!=null&&(e.onclick=ti);break;case"onScroll":o!=null&&De("scroll",e);break;case"onScrollEnd":o!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"multiple":e.multiple=o&&typeof o!="function"&&typeof o!="symbol";break;case"muted":e.muted=o&&typeof o!="function"&&typeof o!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(o==null||typeof o=="function"||typeof o=="boolean"||typeof o=="symbol"){e.removeAttribute("xlink:href");break}i=bs(""+o),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":o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""+o):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":o&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":o===!0?e.setAttribute(i,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(i,o):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(i,o):e.removeAttribute(i);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(i):e.setAttribute(i,o);break;case"popover":De("beforetoggle",e),De("toggle",e),Ja(e,"popover",o);break;case"xlinkActuate":_n(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":_n(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":_n(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":_n(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":_n(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":_n(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":_n(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":_n(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":_n(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":Ja(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=$3.get(i)||i,Ja(e,i,o))}}function zh(e,n,i,o,f,g){switch(i){case"style":xv(e,o,g);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(i=o.__html,i!=null){if(f.children!=null)throw Error(r(60));e.innerHTML=i}}break;case"children":typeof o=="string"?el(e,o):(typeof o=="number"||typeof o=="bigint")&&el(e,""+o);break;case"onScroll":o!=null&&De("scroll",e);break;case"onScrollEnd":o!=null&&De("scrollend",e);break;case"onClick":o!=null&&(e.onclick=ti);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ms.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(f=i.endsWith("Capture"),n=i.slice(2,f?i.length-7:void 0),g=e[Rt]||null,g=g!=null?g[i]:null,typeof g=="function"&&e.removeEventListener(n,g,f),typeof o=="function")){typeof g!="function"&&g!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(n,o,f);break e}i in e?e[i]=o:o===!0?e.setAttribute(i,""):Ja(e,i,o)}}}function Ot(e,n,i){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var o=!1,f=!1,g;for(g in i)if(i.hasOwnProperty(g)){var b=i[g];if(b!=null)switch(g){case"src":o=!0;break;case"srcSet":f=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Je(e,n,g,b,i,null)}}f&&Je(e,n,"srcSet",i.srcSet,i,null),o&&Je(e,n,"src",i.src,i,null);return;case"input":De("invalid",e);var A=g=b=f=null,X=null,te=null;for(o in i)if(i.hasOwnProperty(o)){var se=i[o];if(se!=null)switch(o){case"name":f=se;break;case"type":b=se;break;case"checked":X=se;break;case"defaultChecked":te=se;break;case"value":g=se;break;case"defaultValue":A=se;break;case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(r(137,n));break;default:Je(e,n,o,se,i,null)}}vs(e,g,A,X,te,b,f,!1);return;case"select":De("invalid",e),o=b=g=null;for(f in i)if(i.hasOwnProperty(f)&&(A=i[f],A!=null))switch(f){case"value":g=A;break;case"defaultValue":b=A;break;case"multiple":o=A;default:Je(e,n,f,A,i,null)}n=g,i=b,e.multiple=!!o,n!=null?ei(e,!!o,n,!1):i!=null&&ei(e,!!o,i,!0);return;case"textarea":De("invalid",e),g=f=o=null;for(b in i)if(i.hasOwnProperty(b)&&(A=i[b],A!=null))switch(b){case"value":o=A;break;case"defaultValue":f=A;break;case"children":g=A;break;case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(91));break;default:Je(e,n,b,A,i,null)}vv(e,o,f,g);return;case"option":for(X in i)i.hasOwnProperty(X)&&(o=i[X],o!=null)&&(X==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Je(e,n,X,o,i,null));return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(o=0;o<Jr.length;o++)De(Jr[o],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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(te in i)if(i.hasOwnProperty(te)&&(o=i[te],o!=null))switch(te){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Je(e,n,te,o,i,null)}return;default:if(Xf(n)){for(se in i)i.hasOwnProperty(se)&&(o=i[se],o!==void 0&&zh(e,n,se,o,i,void 0));return}}for(A in i)i.hasOwnProperty(A)&&(o=i[A],o!=null&&Je(e,n,A,o,i,null))}function wO(e,n,i,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var f=null,g=null,b=null,A=null,X=null,te=null,se=null;for(le in i){var ce=i[le];if(i.hasOwnProperty(le)&&ce!=null)switch(le){case"checked":break;case"value":break;case"defaultValue":X=ce;default:o.hasOwnProperty(le)||Je(e,n,le,null,o,ce)}}for(var ie in o){var le=o[ie];if(ce=i[ie],o.hasOwnProperty(ie)&&(le!=null||ce!=null))switch(ie){case"type":g=le;break;case"name":f=le;break;case"checked":te=le;break;case"defaultChecked":se=le;break;case"value":b=le;break;case"defaultValue":A=le;break;case"children":case"dangerouslySetInnerHTML":if(le!=null)throw Error(r(137,n));break;default:le!==ce&&Je(e,n,ie,le,o,ce)}}ma(e,b,A,X,te,se,g,f);return;case"select":le=b=A=ie=null;for(g in i)if(X=i[g],i.hasOwnProperty(g)&&X!=null)switch(g){case"value":break;case"multiple":le=X;default:o.hasOwnProperty(g)||Je(e,n,g,null,o,X)}for(f in o)if(g=o[f],X=i[f],o.hasOwnProperty(f)&&(g!=null||X!=null))switch(f){case"value":ie=g;break;case"defaultValue":A=g;break;case"multiple":b=g;default:g!==X&&Je(e,n,f,g,o,X)}n=A,i=b,o=le,ie!=null?ei(e,!!i,ie,!1):!!o!=!!i&&(n!=null?ei(e,!!i,n,!0):ei(e,!!i,i?[]:"",!1));return;case"textarea":le=ie=null;for(A in i)if(f=i[A],i.hasOwnProperty(A)&&f!=null&&!o.hasOwnProperty(A))switch(A){case"value":break;case"children":break;default:Je(e,n,A,null,o,f)}for(b in o)if(f=o[b],g=i[b],o.hasOwnProperty(b)&&(f!=null||g!=null))switch(b){case"value":ie=f;break;case"defaultValue":le=f;break;case"children":break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:f!==g&&Je(e,n,b,f,o,g)}yv(e,ie,le);return;case"option":for(var ve in i)ie=i[ve],i.hasOwnProperty(ve)&&ie!=null&&!o.hasOwnProperty(ve)&&(ve==="selected"?e.selected=!1:Je(e,n,ve,null,o,ie));for(X in o)ie=o[X],le=i[X],o.hasOwnProperty(X)&&ie!==le&&(ie!=null||le!=null)&&(X==="selected"?e.selected=ie&&typeof ie!="function"&&typeof ie!="symbol":Je(e,n,X,ie,o,le));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Ce in i)ie=i[Ce],i.hasOwnProperty(Ce)&&ie!=null&&!o.hasOwnProperty(Ce)&&Je(e,n,Ce,null,o,ie);for(te in o)if(ie=o[te],le=i[te],o.hasOwnProperty(te)&&ie!==le&&(ie!=null||le!=null))switch(te){case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(r(137,n));break;default:Je(e,n,te,ie,o,le)}return;default:if(Xf(n)){for(var Pe in i)ie=i[Pe],i.hasOwnProperty(Pe)&&ie!==void 0&&!o.hasOwnProperty(Pe)&&zh(e,n,Pe,void 0,o,ie);for(se in o)ie=o[se],le=i[se],!o.hasOwnProperty(se)||ie===le||ie===void 0&&le===void 0||zh(e,n,se,ie,o,le);return}}for(var J in i)ie=i[J],i.hasOwnProperty(J)&&ie!=null&&!o.hasOwnProperty(J)&&Je(e,n,J,null,o,ie);for(ce in o)ie=o[ce],le=i[ce],!o.hasOwnProperty(ce)||ie===le||ie==null&&le==null||Je(e,n,ce,ie,o,le)}function w1(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function SO(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,i=performance.getEntriesByType("resource"),o=0;o<i.length;o++){var f=i[o],g=f.transferSize,b=f.initiatorType,A=f.duration;if(g&&A&&w1(b)){for(b=0,A=f.responseEnd,o+=1;o<i.length;o++){var X=i[o],te=X.startTime;if(te>A)break;var se=X.transferSize,ce=X.initiatorType;se&&w1(ce)&&(X=X.responseEnd,b+=se*(X<A?1:(A-te)/(X-te)))}if(--o,n+=8*(g+b)/(f.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 Oh=null,jh=null;function mu(e){return e.nodeType===9?e:e.ownerDocument}function S1(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 E1(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 Rh(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 Dh=null;function EO(){var e=window.event;return e&&e.type==="popstate"?e===Dh?!1:(Dh=e,!0):(Dh=null,!1)}var _1=typeof setTimeout=="function"?setTimeout:void 0,_O=typeof clearTimeout=="function"?clearTimeout:void 0,N1=typeof Promise=="function"?Promise:void 0,NO=typeof queueMicrotask=="function"?queueMicrotask:typeof N1<"u"?function(e){return N1.resolve(null).then(e).catch(CO)}:_1;function CO(e){setTimeout(function(){throw e})}function Ki(e){return e==="head"}function C1(e,n){var i=n,o=0;do{var f=i.nextSibling;if(e.removeChild(i),f&&f.nodeType===8)if(i=f.data,i==="/$"||i==="/&"){if(o===0){e.removeChild(f),Ol(n);return}o--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")o++;else if(i==="html")Wr(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Wr(i);for(var g=i.firstChild;g;){var b=g.nextSibling,A=g.nodeName;g[da]||A==="SCRIPT"||A==="STYLE"||A==="LINK"&&g.rel.toLowerCase()==="stylesheet"||i.removeChild(g),g=b}}else i==="body"&&Wr(e.ownerDocument.body);i=f}while(i);Ol(n)}function M1(e,n){var i=e;e=0;do{var o=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||""),o&&o.nodeType===8)if(i=o.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=o}while(i)}function kh(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":kh(i),pr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function MO(e,n,i,o){for(;e.nodeType===1;){var f=i;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[da])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(g=e.getAttribute("rel"),g==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(g!==f.rel||e.getAttribute("href")!==(f.href==null||f.href===""?null:f.href)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin)||e.getAttribute("title")!==(f.title==null?null:f.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(g=e.getAttribute("src"),(g!==(f.src==null?null:f.src)||e.getAttribute("type")!==(f.type==null?null:f.type)||e.getAttribute("crossorigin")!==(f.crossOrigin==null?null:f.crossOrigin))&&g&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var g=f.name==null?null:""+f.name;if(f.type==="hidden"&&e.getAttribute("name")===g)return e}else return e;if(e=hn(e.nextSibling),e===null)break}return null}function TO(e,n,i){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=hn(e.nextSibling),e===null))return null;return e}function T1(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=hn(e.nextSibling),e===null))return null;return e}function Hh(e){return e.data==="$?"||e.data==="$~"}function Lh(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function AO(e,n){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||i.readyState!=="loading")n();else{var o=function(){n(),i.removeEventListener("DOMContentLoaded",o)};i.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function hn(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 Bh=null;function A1(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(n===0)return hn(e.nextSibling);n--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||n++}e=e.nextSibling}return null}function z1(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 O1(e,n,i){switch(n=mu(i),e){case"html":if(e=n.documentElement,!e)throw Error(r(452));return e;case"head":if(e=n.head,!e)throw Error(r(453));return e;case"body":if(e=n.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function Wr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);pr(e)}var mn=new Map,j1=new Set;function gu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var yi=G.d;G.d={f:zO,r:OO,D:jO,C:RO,L:DO,m:kO,X:LO,S:HO,M:BO};function zO(){var e=yi.f(),n=ru();return e||n}function OO(e){var n=Ti(e);n!==null&&n.tag===5&&n.type==="form"?Kb(n):yi.r(e)}var Tl=typeof document>"u"?null:document;function R1(e,n,i){var o=Tl;if(o&&typeof n=="string"&&n){var f=Ut(n);f='link[rel="'+e+'"][href="'+f+'"]',typeof i=="string"&&(f+='[crossorigin="'+i+'"]'),j1.has(f)||(j1.add(f),e={rel:e,crossOrigin:i,href:n},o.querySelector(f)===null&&(n=o.createElement("link"),Ot(n,"link",e),mt(n),o.head.appendChild(n)))}}function jO(e){yi.D(e),R1("dns-prefetch",e,null)}function RO(e,n){yi.C(e,n),R1("preconnect",e,n)}function DO(e,n,i){yi.L(e,n,i);var o=Tl;if(o&&e&&n){var f='link[rel="preload"][as="'+Ut(n)+'"]';n==="image"&&i&&i.imageSrcSet?(f+='[imagesrcset="'+Ut(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(f+='[imagesizes="'+Ut(i.imageSizes)+'"]')):f+='[href="'+Ut(e)+'"]';var g=f;switch(n){case"style":g=Al(e);break;case"script":g=zl(e)}mn.has(g)||(e=y({rel:"preload",href:n==="image"&&i&&i.imageSrcSet?void 0:e,as:n},i),mn.set(g,e),o.querySelector(f)!==null||n==="style"&&o.querySelector(eo(g))||n==="script"&&o.querySelector(to(g))||(n=o.createElement("link"),Ot(n,"link",e),mt(n),o.head.appendChild(n)))}}function kO(e,n){yi.m(e,n);var i=Tl;if(i&&e){var o=n&&typeof n.as=="string"?n.as:"script",f='link[rel="modulepreload"][as="'+Ut(o)+'"][href="'+Ut(e)+'"]',g=f;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=zl(e)}if(!mn.has(g)&&(e=y({rel:"modulepreload",href:e},n),mn.set(g,e),i.querySelector(f)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(to(g)))return}o=i.createElement("link"),Ot(o,"link",e),mt(o),i.head.appendChild(o)}}}function HO(e,n,i){yi.S(e,n,i);var o=Tl;if(o&&e){var f=zi(o).hoistableStyles,g=Al(e);n=n||"default";var b=f.get(g);if(!b){var A={loading:0,preload:null};if(b=o.querySelector(eo(g)))A.loading=5;else{e=y({rel:"stylesheet",href:e,"data-precedence":n},i),(i=mn.get(g))&&qh(e,i);var X=b=o.createElement("link");mt(X),Ot(X,"link",e),X._p=new Promise(function(te,se){X.onload=te,X.onerror=se}),X.addEventListener("load",function(){A.loading|=1}),X.addEventListener("error",function(){A.loading|=2}),A.loading|=4,pu(b,n,o)}b={type:"stylesheet",instance:b,count:1,state:A},f.set(g,b)}}}function LO(e,n){yi.X(e,n);var i=Tl;if(i&&e){var o=zi(i).hoistableScripts,f=zl(e),g=o.get(f);g||(g=i.querySelector(to(f)),g||(e=y({src:e,async:!0},n),(n=mn.get(f))&&Uh(e,n),g=i.createElement("script"),mt(g),Ot(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(f,g))}}function BO(e,n){yi.M(e,n);var i=Tl;if(i&&e){var o=zi(i).hoistableScripts,f=zl(e),g=o.get(f);g||(g=i.querySelector(to(f)),g||(e=y({src:e,async:!0,type:"module"},n),(n=mn.get(f))&&Uh(e,n),g=i.createElement("script"),mt(g),Ot(g,"link",e),i.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},o.set(f,g))}}function D1(e,n,i,o){var f=(f=ne.current)?gu(f):null;if(!f)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(n=Al(i.href),i=zi(f).hoistableStyles,o=i.get(n),o||(o={type:"style",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Al(i.href);var g=zi(f).hoistableStyles,b=g.get(e);if(b||(f=f.ownerDocument||f,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(e,b),(g=f.querySelector(eo(e)))&&!g._p&&(b.instance=g,b.state.loading=5),mn.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},mn.set(e,i),g||qO(f,e,i,b.state))),n&&o===null)throw Error(r(528,""));return b}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=i.async,i=i.src,typeof i=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=zl(i),i=zi(f).hoistableScripts,o=i.get(n),o||(o={type:"script",instance:null,count:0,state:null},i.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function Al(e){return'href="'+Ut(e)+'"'}function eo(e){return'link[rel="stylesheet"]['+e+"]"}function k1(e){return y({},e,{"data-precedence":e.precedence,precedence:null})}function qO(e,n,i,o){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?o.loading=1:(n=e.createElement("link"),o.preload=n,n.addEventListener("load",function(){return o.loading|=1}),n.addEventListener("error",function(){return o.loading|=2}),Ot(n,"link",i),mt(n),e.head.appendChild(n))}function zl(e){return'[src="'+Ut(e)+'"]'}function to(e){return"script[async]"+e}function H1(e,n,i){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+Ut(i.href)+'"]');if(o)return n.instance=o,mt(o),o;var f=y({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),mt(o),Ot(o,"style",f),pu(o,i.precedence,e),n.instance=o;case"stylesheet":f=Al(i.href);var g=e.querySelector(eo(f));if(g)return n.state.loading|=4,n.instance=g,mt(g),g;o=k1(i),(f=mn.get(f))&&qh(o,f),g=(e.ownerDocument||e).createElement("link"),mt(g);var b=g;return b._p=new Promise(function(A,X){b.onload=A,b.onerror=X}),Ot(g,"link",o),n.state.loading|=4,pu(g,i.precedence,e),n.instance=g;case"script":return g=zl(i.src),(f=e.querySelector(to(g)))?(n.instance=f,mt(f),f):(o=i,(f=mn.get(g))&&(o=y({},i),Uh(o,f)),e=e.ownerDocument||e,f=e.createElement("script"),mt(f),Ot(f,"link",o),e.head.appendChild(f),n.instance=f);case"void":return null;default:throw Error(r(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(o=n.instance,n.state.loading|=4,pu(o,i.precedence,e));return n.instance}function pu(e,n,i){for(var o=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),f=o.length?o[o.length-1]:null,g=f,b=0;b<o.length;b++){var A=o[b];if(A.dataset.precedence===n)g=A;else if(g!==f)break}g?g.parentNode.insertBefore(e,g.nextSibling):(n=i.nodeType===9?i.head:i,n.insertBefore(e,n.firstChild))}function qh(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Uh(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var yu=null;function L1(e,n,i){if(yu===null){var o=new Map,f=yu=new Map;f.set(i,o)}else f=yu,o=f.get(i),o||(o=new Map,f.set(i,o));if(o.has(e))return o;for(o.set(e,null),i=i.getElementsByTagName(e),f=0;f<i.length;f++){var g=i[f];if(!(g[da]||g[St]||e==="link"&&g.getAttribute("rel")==="stylesheet")&&g.namespaceURI!=="http://www.w3.org/2000/svg"){var b=g.getAttribute(n)||"";b=e+b;var A=o.get(b);A?A.push(g):o.set(b,[g])}}return o}function B1(e,n,i){e=e.ownerDocument||e,e.head.insertBefore(i,n==="title"?e.querySelector("head > title"):null)}function UO(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 q1(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function VO(e,n,i,o){if(i.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var f=Al(o.href),g=n.querySelector(eo(f));if(g){n=g._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=vu.bind(e),n.then(e,e)),i.state.loading|=4,i.instance=g,mt(g);return}g=n.ownerDocument||n,o=k1(o),(f=mn.get(f))&&qh(o,f),g=g.createElement("link"),mt(g);var b=g;b._p=new Promise(function(A,X){b.onload=A,b.onerror=X}),Ot(g,"link",o),i.instance=g}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,n),(n=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=vu.bind(e),n.addEventListener("load",i),n.addEventListener("error",i))}}var Vh=0;function YO(e,n){return e.stylesheets&&e.count===0&&xu(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var o=setTimeout(function(){if(e.stylesheets&&xu(e,e.stylesheets),e.unsuspend){var g=e.unsuspend;e.unsuspend=null,g()}},6e4+n);0<e.imgBytes&&Vh===0&&(Vh=62500*SO());var f=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&xu(e,e.stylesheets),e.unsuspend)){var g=e.unsuspend;e.unsuspend=null,g()}},(e.imgBytes>Vh?50:800)+n);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(f)}}:null}function vu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)xu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var bu=null;function xu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,bu=new Map,n.forEach(GO,e),bu=null,vu.call(e))}function GO(e,n){if(!(n.state.loading&4)){var i=bu.get(e);if(i)var o=i.get(null);else{i=new Map,bu.set(e,i);for(var f=e.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g<f.length;g++){var b=f[g];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(i.set(b.dataset.precedence,b),o=b)}o&&i.set(null,o)}f=n.instance,b=f.getAttribute("data-precedence"),g=i.get(b)||o,g===o&&i.set(null,f),i.set(b,f),this.count++,o=vu.bind(this),f.addEventListener("load",o),f.addEventListener("error",o),g?g.parentNode.insertBefore(f,g.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(f,e.firstChild)),n.state.loading|=4}}var no={$$typeof:E,Provider:null,Consumer:null,_currentValue:U,_currentValue2:U,_threadCount:0};function XO(e,n,i,o,f,g,b,A,X){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=Jn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Jn(0),this.hiddenUpdates=Jn(null),this.identifierPrefix=o,this.onUncaughtError=f,this.onCaughtError=g,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function U1(e,n,i,o,f,g,b,A,X,te,se,ce){return e=new XO(e,n,i,b,X,te,se,ce,A),n=1,g===!0&&(n|=24),g=Wt(3,null,null,n),e.current=g,g.stateNode=e,n=xd(),n.refCount++,e.pooledCache=n,n.refCount++,g.memoizedState={element:o,isDehydrated:i,cache:n},_d(g),e}function V1(e){return e?(e=ol,e):ol}function Y1(e,n,i,o,f,g){f=V1(f),o.context===null?o.context=f:o.pendingContext=f,o=Bi(n),o.payload={element:i},g=g===void 0?null:g,g!==null&&(o.callback=g),i=qi(e,o,n),i!==null&&(Qt(i,e,n),Dr(i,e,n))}function G1(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<n?i:n}}function Yh(e,n){G1(e,n),(e=e.alternate)&&G1(e,n)}function X1(e){if(e.tag===13||e.tag===31){var n=va(e,67108864);n!==null&&Qt(n,e,67108864),Yh(e,67108864)}}function Z1(e){if(e.tag===13||e.tag===31){var n=ln();n=mr(n);var i=va(e,n);i!==null&&Qt(i,e,n),Yh(e,n)}}var wu=!0;function ZO(e,n,i,o){var f=j.T;j.T=null;var g=G.p;try{G.p=2,Gh(e,n,i,o)}finally{G.p=g,j.T=f}}function QO(e,n,i,o){var f=j.T;j.T=null;var g=G.p;try{G.p=8,Gh(e,n,i,o)}finally{G.p=g,j.T=f}}function Gh(e,n,i,o){if(wu){var f=Xh(o);if(f===null)Ah(e,n,o,Su,i),I1(e,o);else if($O(f,e,n,i,o))o.stopPropagation();else if(I1(e,o),n&4&&-1<IO.indexOf(e)){for(;f!==null;){var g=Ti(f);if(g!==null)switch(g.tag){case 3:if(g=g.stateNode,g.current.memoizedState.isDehydrated){var b=Ve(g.pendingLanes);if(b!==0){var A=g;for(A.pendingLanes|=2,A.entangledLanes|=2;b;){var X=1<<31-Mt(b);A.entanglements[1]|=X,b&=~X}Un(g),(Ie&6)===0&&(au=xt()+500,Fr(0))}}break;case 31:case 13:A=va(g,2),A!==null&&Qt(A,g,2),ru(),Yh(g,2)}if(g=Xh(o),g===null&&Ah(e,n,o,Su,i),g===f)break;f=g}f!==null&&o.stopPropagation()}else Ah(e,n,o,null,i)}}function Xh(e){return e=Qf(e),Zh(e)}var Su=null;function Zh(e){if(Su=null,e=Mi(e),e!==null){var n=c(e);if(n===null)e=null;else{var i=n.tag;if(i===13){if(e=u(n),e!==null)return e;e=null}else if(i===31){if(e=d(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 Su=e,null}function Q1(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(Ni()){case En:return 2;case Dn:return 8;case kn:case fr:return 32;case Ci:return 268435456;default:return 32}default:return 32}}var Qh=!1,Fi=null,Ji=null,Pi=null,io=new Map,ao=new Map,Wi=[],IO="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 I1(e,n){switch(e){case"focusin":case"focusout":Fi=null;break;case"dragenter":case"dragleave":Ji=null;break;case"mouseover":case"mouseout":Pi=null;break;case"pointerover":case"pointerout":io.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":ao.delete(n.pointerId)}}function lo(e,n,i,o,f,g){return e===null||e.nativeEvent!==g?(e={blockedOn:n,domEventName:i,eventSystemFlags:o,nativeEvent:g,targetContainers:[f]},n!==null&&(n=Ti(n),n!==null&&X1(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,f!==null&&n.indexOf(f)===-1&&n.push(f),e)}function $O(e,n,i,o,f){switch(n){case"focusin":return Fi=lo(Fi,e,n,i,o,f),!0;case"dragenter":return Ji=lo(Ji,e,n,i,o,f),!0;case"mouseover":return Pi=lo(Pi,e,n,i,o,f),!0;case"pointerover":var g=f.pointerId;return io.set(g,lo(io.get(g)||null,e,n,i,o,f)),!0;case"gotpointercapture":return g=f.pointerId,ao.set(g,lo(ao.get(g)||null,e,n,i,o,f)),!0}return!1}function $1(e){var n=Mi(e.target);if(n!==null){var i=c(n);if(i!==null){if(n=i.tag,n===13){if(n=u(i),n!==null){e.blockedOn=n,cs(e.priority,function(){Z1(i)});return}}else if(n===31){if(n=d(i),n!==null){e.blockedOn=n,cs(e.priority,function(){Z1(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 Eu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var i=Xh(e.nativeEvent);if(i===null){i=e.nativeEvent;var o=new i.constructor(i.type,i);Zf=o,i.target.dispatchEvent(o),Zf=null}else return n=Ti(i),n!==null&&X1(n),e.blockedOn=i,!1;n.shift()}return!0}function K1(e,n,i){Eu(e)&&i.delete(n)}function KO(){Qh=!1,Fi!==null&&Eu(Fi)&&(Fi=null),Ji!==null&&Eu(Ji)&&(Ji=null),Pi!==null&&Eu(Pi)&&(Pi=null),io.forEach(K1),ao.forEach(K1)}function _u(e,n){e.blockedOn===n&&(e.blockedOn=null,Qh||(Qh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,KO)))}var Nu=null;function F1(e){Nu!==e&&(Nu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Nu===e&&(Nu=null);for(var n=0;n<e.length;n+=3){var i=e[n],o=e[n+1],f=e[n+2];if(typeof o!="function"){if(Zh(o||i)===null)continue;break}var g=Ti(i);g!==null&&(e.splice(n,3),n-=3,Xd(g,{pending:!0,data:f,method:i.method,action:o},o,f))}}))}function Ol(e){function n(X){return _u(X,e)}Fi!==null&&_u(Fi,e),Ji!==null&&_u(Ji,e),Pi!==null&&_u(Pi,e),io.forEach(n),ao.forEach(n);for(var i=0;i<Wi.length;i++){var o=Wi[i];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Wi.length&&(i=Wi[0],i.blockedOn===null);)$1(i),i.blockedOn===null&&Wi.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(o=0;o<i.length;o+=3){var f=i[o],g=i[o+1],b=f[Rt]||null;if(typeof g=="function")b||F1(i);else if(b){var A=null;if(g&&g.hasAttribute("formAction")){if(f=g,b=g[Rt]||null)A=b.formAction;else if(Zh(f)!==null)continue}else A=b.action;typeof A=="function"?i[o+1]=A:(i.splice(o,3),o-=3),F1(i)}}}function J1(){function e(g){g.canIntercept&&g.info==="react-transition"&&g.intercept({handler:function(){return new Promise(function(b){return f=b})},focusReset:"manual",scroll:"manual"})}function n(){f!==null&&(f(),f=null),o||setTimeout(i,20)}function i(){if(!o&&!navigation.transition){var g=navigation.currentEntry;g&&g.url!=null&&navigation.navigate(g.url,{state:g.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,f=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(i,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),f!==null&&(f(),f=null)}}}function Ih(e){this._internalRoot=e}Cu.prototype.render=Ih.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var i=n.current,o=ln();Y1(i,o,e,n,null,null)},Cu.prototype.unmount=Ih.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Y1(e.current,2,null,e,null,null),ru(),n[Pn]=null}};function Cu(e){this._internalRoot=e}Cu.prototype.unstable_scheduleHydration=function(e){if(e){var n=us();e={blockedOn:null,target:e,priority:n};for(var i=0;i<Wi.length&&n!==0&&n<Wi[i].priority;i++);Wi.splice(i,0,e),i===0&&$1(e)}};var P1=a.version;if(P1!=="19.2.3")throw Error(r(527,P1,"19.2.3"));G.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=m(n),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var FO={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:j,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Mu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Mu.isDisabled&&Mu.supportsFiber)try{Fn=Mu.inject(FO),Ct=Mu}catch{}}return jl.createRoot=function(e,n){if(!s(e))throw Error(r(299));var i=!1,o="",f=lx,g=rx,b=ox;return n!=null&&(n.unstable_strictMode===!0&&(i=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(f=n.onUncaughtError),n.onCaughtError!==void 0&&(g=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=U1(e,1,!1,null,null,i,o,null,f,g,b,J1),e[Pn]=n.current,Th(e),new Ih(n)},jl.hydrateRoot=function(e,n,i){if(!s(e))throw Error(r(299));var o=!1,f="",g=lx,b=rx,A=ox,X=null;return i!=null&&(i.unstable_strictMode===!0&&(o=!0),i.identifierPrefix!==void 0&&(f=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(b=i.onCaughtError),i.onRecoverableError!==void 0&&(A=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),n=U1(e,1,!0,n,i??null,o,f,X,g,b,A,J1),n.context=V1(null),i=n.current,o=ln(),o=mr(o),f=Bi(o),f.callback=null,qi(i,f,o),i=o,n.current.lanes=i,fa(n,i),Un(n),e[Pn]=n.current,Th(e),new Cu(n)},jl.version="19.2.3",jl}var am;function rw(){if(am)return Tu.exports;am=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(),Tu.exports=lw(),Tu.exports}var ow=rw(),K=Rl();const Ru=Vn(K);function ct(t){if(typeof t=="string"||typeof t=="number")return""+t;let a="";if(Array.isArray(t))for(let l=0,r;l<t.length;l++)(r=ct(t[l]))!==""&&(a+=(a&&" ")+r);else for(let l in t)t[l]&&(a+=(a&&" ")+l);return a}var sw={value:()=>{}};function ro(){for(var t=0,a=arguments.length,l={},r;t<a;++t){if(!(r=arguments[t]+"")||r in l||/[\s.]/.test(r))throw new Error("illegal type: "+r);l[r]=[]}return new oo(l)}function oo(t){this._=t}function uw(t,a){return t.trim().split(/^|\s+/).map(function(l){var r="",s=l.indexOf(".");if(s>=0&&(r=l.slice(s+1),l=l.slice(0,s)),l&&!a.hasOwnProperty(l))throw new Error("unknown type: "+l);return{type:l,name:r}})}oo.prototype=ro.prototype={constructor:oo,on:function(t,a){var l=this._,r=uw(t+"",l),s,c=-1,u=r.length;if(arguments.length<2){for(;++c<u;)if((s=(t=r[c]).type)&&(s=cw(l[s],t.name)))return s;return}if(a!=null&&typeof a!="function")throw new Error("invalid callback: "+a);for(;++c<u;)if(s=(t=r[c]).type)l[s]=lm(l[s],t.name,a);else if(a==null)for(s in l)l[s]=lm(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 oo(t)},call:function(t,a){if((s=arguments.length-2)>0)for(var l=new Array(s),r=0,s,c;r<s;++r)l[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(c=this._[t],r=0,s=c.length;r<s;++r)c[r].value.apply(a,l)},apply:function(t,a,l){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],s=0,c=r.length;s<c;++s)r[s].value.apply(a,l)}};function cw(t,a){for(var l=0,r=t.length,s;l<r;++l)if((s=t[l]).name===a)return s.value}function lm(t,a,l){for(var r=0,s=t.length;r<s;++r)if(t[r].name===a){t[r]=sw,t=t.slice(0,r).concat(t.slice(r+1));break}return l!=null&&t.push({name:a,value:l}),t}var Du="http://www.w3.org/1999/xhtml";const rm={svg:"http://www.w3.org/2000/svg",xhtml:Du,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function so(t){var a=t+="",l=a.indexOf(":");return l>=0&&(a=t.slice(0,l))!=="xmlns"&&(t=t.slice(l+1)),rm.hasOwnProperty(a)?{space:rm[a],local:t}:t}function fw(t){return function(){var a=this.ownerDocument,l=this.namespaceURI;return l===Du&&a.documentElement.namespaceURI===Du?a.createElement(t):a.createElementNS(l,t)}}function dw(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function om(t){var a=so(t);return(a.local?dw:fw)(a)}function hw(){}function ku(t){return t==null?hw:function(){return this.querySelector(t)}}function mw(t){typeof t!="function"&&(t=ku(t));for(var a=this._groups,l=a.length,r=new Array(l),s=0;s<l;++s)for(var c=a[s],u=c.length,d=r[s]=new Array(u),h,m,p=0;p<u;++p)(h=c[p])&&(m=t.call(h,h.__data__,p,c))&&("__data__"in h&&(m.__data__=h.__data__),d[p]=m);return new It(r,this._parents)}function gw(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function pw(){return[]}function sm(t){return t==null?pw:function(){return this.querySelectorAll(t)}}function yw(t){return function(){return gw(t.apply(this,arguments))}}function vw(t){typeof t=="function"?t=yw(t):t=sm(t);for(var a=this._groups,l=a.length,r=[],s=[],c=0;c<l;++c)for(var u=a[c],d=u.length,h,m=0;m<d;++m)(h=u[m])&&(r.push(t.call(h,h.__data__,m,u)),s.push(h));return new It(r,s)}function um(t){return function(){return this.matches(t)}}function cm(t){return function(a){return a.matches(t)}}var bw=Array.prototype.find;function xw(t){return function(){return bw.call(this.children,t)}}function ww(){return this.firstElementChild}function Sw(t){return this.select(t==null?ww:xw(typeof t=="function"?t:cm(t)))}var Ew=Array.prototype.filter;function _w(){return Array.from(this.children)}function Nw(t){return function(){return Ew.call(this.children,t)}}function Cw(t){return this.selectAll(t==null?_w:Nw(typeof t=="function"?t:cm(t)))}function Mw(t){typeof t!="function"&&(t=um(t));for(var a=this._groups,l=a.length,r=new Array(l),s=0;s<l;++s)for(var c=a[s],u=c.length,d=r[s]=[],h,m=0;m<u;++m)(h=c[m])&&t.call(h,h.__data__,m,c)&&d.push(h);return new It(r,this._parents)}function fm(t){return new Array(t.length)}function Tw(){return new It(this._enter||this._groups.map(fm),this._parents)}function uo(t,a){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=a}uo.prototype={constructor:uo,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 Aw(t){return function(){return t}}function zw(t,a,l,r,s,c){for(var u=0,d,h=a.length,m=c.length;u<m;++u)(d=a[u])?(d.__data__=c[u],r[u]=d):l[u]=new uo(t,c[u]);for(;u<h;++u)(d=a[u])&&(s[u]=d)}function Ow(t,a,l,r,s,c,u){var d,h,m=new Map,p=a.length,y=c.length,v=new Array(p),x;for(d=0;d<p;++d)(h=a[d])&&(v[d]=x=u.call(h,h.__data__,d,a)+"",m.has(x)?s[d]=h:m.set(x,h));for(d=0;d<y;++d)x=u.call(t,c[d],d,c)+"",(h=m.get(x))?(r[d]=h,h.__data__=c[d],m.delete(x)):l[d]=new uo(t,c[d]);for(d=0;d<p;++d)(h=a[d])&&m.get(v[d])===h&&(s[d]=h)}function jw(t){return t.__data__}function Rw(t,a){if(!arguments.length)return Array.from(this,jw);var l=a?Ow:zw,r=this._parents,s=this._groups;typeof t!="function"&&(t=Aw(t));for(var c=s.length,u=new Array(c),d=new Array(c),h=new Array(c),m=0;m<c;++m){var p=r[m],y=s[m],v=y.length,x=Dw(t.call(p,p&&p.__data__,m,r)),w=x.length,N=d[m]=new Array(w),S=u[m]=new Array(w),M=h[m]=new Array(v);l(p,y,N,S,M,x,a);for(var z=0,E=0,T,q;z<w;++z)if(T=N[z]){for(z>=E&&(E=z+1);!(q=S[E])&&++E<w;);T._next=q||null}}return u=new It(u,r),u._enter=d,u._exit=h,u}function Dw(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function kw(){return new It(this._exit||this._groups.map(fm),this._parents)}function Hw(t,a,l){var r=this.enter(),s=this,c=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),a!=null&&(s=a(s),s&&(s=s.selection())),l==null?c.remove():l(c),r&&s?r.merge(s).order():s}function Lw(t){for(var a=t.selection?t.selection():t,l=this._groups,r=a._groups,s=l.length,c=r.length,u=Math.min(s,c),d=new Array(s),h=0;h<u;++h)for(var m=l[h],p=r[h],y=m.length,v=d[h]=new Array(y),x,w=0;w<y;++w)(x=m[w]||p[w])&&(v[w]=x);for(;h<s;++h)d[h]=l[h];return new It(d,this._parents)}function Bw(){for(var t=this._groups,a=-1,l=t.length;++a<l;)for(var r=t[a],s=r.length-1,c=r[s],u;--s>=0;)(u=r[s])&&(c&&u.compareDocumentPosition(c)^4&&c.parentNode.insertBefore(u,c),c=u);return this}function qw(t){t||(t=Uw);function a(y,v){return y&&v?t(y.__data__,v.__data__):!y-!v}for(var l=this._groups,r=l.length,s=new Array(r),c=0;c<r;++c){for(var u=l[c],d=u.length,h=s[c]=new Array(d),m,p=0;p<d;++p)(m=u[p])&&(h[p]=m);h.sort(a)}return new It(s,this._parents).order()}function Uw(t,a){return t<a?-1:t>a?1:t>=a?0:NaN}function Vw(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function Yw(){return Array.from(this)}function Gw(){for(var t=this._groups,a=0,l=t.length;a<l;++a)for(var r=t[a],s=0,c=r.length;s<c;++s){var u=r[s];if(u)return u}return null}function Xw(){let t=0;for(const a of this)++t;return t}function Zw(){return!this.node()}function Qw(t){for(var a=this._groups,l=0,r=a.length;l<r;++l)for(var s=a[l],c=0,u=s.length,d;c<u;++c)(d=s[c])&&t.call(d,d.__data__,c,s);return this}function Iw(t){return function(){this.removeAttribute(t)}}function $w(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Kw(t,a){return function(){this.setAttribute(t,a)}}function Fw(t,a){return function(){this.setAttributeNS(t.space,t.local,a)}}function Jw(t,a){return function(){var l=a.apply(this,arguments);l==null?this.removeAttribute(t):this.setAttribute(t,l)}}function Pw(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 Ww(t,a){var l=so(t);if(arguments.length<2){var r=this.node();return l.local?r.getAttributeNS(l.space,l.local):r.getAttribute(l)}return this.each((a==null?l.local?$w:Iw:typeof a=="function"?l.local?Pw:Jw:l.local?Fw:Kw)(l,a))}function dm(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function eS(t){return function(){this.style.removeProperty(t)}}function tS(t,a,l){return function(){this.style.setProperty(t,a,l)}}function nS(t,a,l){return function(){var r=a.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,l)}}function iS(t,a,l){return arguments.length>1?this.each((a==null?eS:typeof a=="function"?nS:tS)(t,a,l??"")):Oa(this.node(),t)}function Oa(t,a){return t.style.getPropertyValue(a)||dm(t).getComputedStyle(t,null).getPropertyValue(a)}function aS(t){return function(){delete this[t]}}function lS(t,a){return function(){this[t]=a}}function rS(t,a){return function(){var l=a.apply(this,arguments);l==null?delete this[t]:this[t]=l}}function oS(t,a){return arguments.length>1?this.each((a==null?aS:typeof a=="function"?rS:lS)(t,a)):this.node()[t]}function hm(t){return t.trim().split(/^|\s+/)}function Hu(t){return t.classList||new mm(t)}function mm(t){this._node=t,this._names=hm(t.getAttribute("class")||"")}mm.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 gm(t,a){for(var l=Hu(t),r=-1,s=a.length;++r<s;)l.add(a[r])}function pm(t,a){for(var l=Hu(t),r=-1,s=a.length;++r<s;)l.remove(a[r])}function sS(t){return function(){gm(this,t)}}function uS(t){return function(){pm(this,t)}}function cS(t,a){return function(){(a.apply(this,arguments)?gm:pm)(this,t)}}function fS(t,a){var l=hm(t+"");if(arguments.length<2){for(var r=Hu(this.node()),s=-1,c=l.length;++s<c;)if(!r.contains(l[s]))return!1;return!0}return this.each((typeof a=="function"?cS:a?sS:uS)(l,a))}function dS(){this.textContent=""}function hS(t){return function(){this.textContent=t}}function mS(t){return function(){var a=t.apply(this,arguments);this.textContent=a??""}}function gS(t){return arguments.length?this.each(t==null?dS:(typeof t=="function"?mS:hS)(t)):this.node().textContent}function pS(){this.innerHTML=""}function yS(t){return function(){this.innerHTML=t}}function vS(t){return function(){var a=t.apply(this,arguments);this.innerHTML=a??""}}function bS(t){return arguments.length?this.each(t==null?pS:(typeof t=="function"?vS:yS)(t)):this.node().innerHTML}function xS(){this.nextSibling&&this.parentNode.appendChild(this)}function wS(){return this.each(xS)}function SS(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function ES(){return this.each(SS)}function _S(t){var a=typeof t=="function"?t:om(t);return this.select(function(){return this.appendChild(a.apply(this,arguments))})}function NS(){return null}function CS(t,a){var l=typeof t=="function"?t:om(t),r=a==null?NS:typeof a=="function"?a:ku(a);return this.select(function(){return this.insertBefore(l.apply(this,arguments),r.apply(this,arguments)||null)})}function MS(){var t=this.parentNode;t&&t.removeChild(this)}function TS(){return this.each(MS)}function AS(){var t=this.cloneNode(!1),a=this.parentNode;return a?a.insertBefore(t,this.nextSibling):t}function zS(){var t=this.cloneNode(!0),a=this.parentNode;return a?a.insertBefore(t,this.nextSibling):t}function OS(t){return this.select(t?zS:AS)}function jS(t){return arguments.length?this.property("__data__",t):this.node().__data__}function RS(t){return function(a){t.call(this,a,this.__data__)}}function DS(t){return t.trim().split(/^|\s+/).map(function(a){var l="",r=a.indexOf(".");return r>=0&&(l=a.slice(r+1),a=a.slice(0,r)),{type:a,name:l}})}function kS(t){return function(){var a=this.__on;if(a){for(var l=0,r=-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[++r]=c;++r?a.length=r:delete this.__on}}}function HS(t,a,l){return function(){var r=this.__on,s,c=RS(a);if(r){for(var u=0,d=r.length;u<d;++u)if((s=r[u]).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},r?r.push(s):this.__on=[s]}}function LS(t,a,l){var r=DS(t+""),s,c=r.length,u;if(arguments.length<2){var d=this.node().__on;if(d){for(var h=0,m=d.length,p;h<m;++h)for(s=0,p=d[h];s<c;++s)if((u=r[s]).type===p.type&&u.name===p.name)return p.value}return}for(d=a?HS:kS,s=0;s<c;++s)this.each(d(r[s],a,l));return this}function ym(t,a,l){var r=dm(t),s=r.CustomEvent;typeof s=="function"?s=new s(a,l):(s=r.document.createEvent("Event"),l?(s.initEvent(a,l.bubbles,l.cancelable),s.detail=l.detail):s.initEvent(a,!1,!1)),t.dispatchEvent(s)}function BS(t,a){return function(){return ym(this,t,a)}}function qS(t,a){return function(){return ym(this,t,a.apply(this,arguments))}}function US(t,a){return this.each((typeof a=="function"?qS:BS)(t,a))}function*VS(){for(var t=this._groups,a=0,l=t.length;a<l;++a)for(var r=t[a],s=0,c=r.length,u;s<c;++s)(u=r[s])&&(yield u)}var vm=[null];function It(t,a){this._groups=t,this._parents=a}function Dl(){return new It([[document.documentElement]],vm)}function YS(){return this}It.prototype=Dl.prototype={constructor:It,select:mw,selectAll:vw,selectChild:Sw,selectChildren:Cw,filter:Mw,data:Rw,enter:Tw,exit:kw,join:Hw,merge:Lw,selection:YS,order:Bw,sort:qw,call:Vw,nodes:Yw,node:Gw,size:Xw,empty:Zw,each:Qw,attr:Ww,style:iS,property:oS,classed:fS,text:gS,html:bS,raise:wS,lower:ES,append:_S,insert:CS,remove:TS,clone:OS,datum:jS,on:LS,dispatch:US,[Symbol.iterator]:VS};function $t(t){return typeof t=="string"?new It([[document.querySelector(t)]],[document.documentElement]):new It([[t]],vm)}function GS(t){let a;for(;a=t.sourceEvent;)t=a;return t}function pn(t,a){if(t=GS(t),a===void 0&&(a=t.currentTarget),a){var l=a.ownerSVGElement||a;if(l.createSVGPoint){var r=l.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(a.getScreenCTM().inverse()),[r.x,r.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 XS={passive:!1},kl={capture:!0,passive:!1};function Lu(t){t.stopImmediatePropagation()}function ja(t){t.preventDefault(),t.stopImmediatePropagation()}function bm(t){var a=t.document.documentElement,l=$t(t).on("dragstart.drag",ja,kl);"onselectstart"in a?l.on("selectstart.drag",ja,kl):(a.__noselect=a.style.MozUserSelect,a.style.MozUserSelect="none")}function xm(t,a){var l=t.document.documentElement,r=$t(t).on("dragstart.drag",null);a&&(r.on("click.drag",ja,kl),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in l?r.on("selectstart.drag",null):(l.style.MozUserSelect=l.__noselect,delete l.__noselect)}const co=t=>()=>t;function Bu(t,{sourceEvent:a,subject:l,target:r,identifier:s,active:c,x:u,y:d,dx:h,dy:m,dispatch:p}){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:r,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:c,enumerable:!0,configurable:!0},x:{value:u,enumerable:!0,configurable:!0},y:{value:d,enumerable:!0,configurable:!0},dx:{value:h,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:p}})}Bu.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function ZS(t){return!t.ctrlKey&&!t.button}function QS(){return this.parentNode}function IS(t,a){return a??{x:t.x,y:t.y}}function $S(){return navigator.maxTouchPoints||"ontouchstart"in this}function wm(){var t=ZS,a=QS,l=IS,r=$S,s={},c=ro("start","drag","end"),u=0,d,h,m,p,y=0;function v(T){T.on("mousedown.drag",x).filter(r).on("touchstart.drag",S).on("touchmove.drag",M,XS).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function x(T,q){if(!(p||!t.call(this,T,q))){var R=E(this,a.call(this,T,q),T,q,"mouse");R&&($t(T.view).on("mousemove.drag",w,kl).on("mouseup.drag",N,kl),bm(T.view),Lu(T),m=!1,d=T.clientX,h=T.clientY,R("start",T))}}function w(T){if(ja(T),!m){var q=T.clientX-d,R=T.clientY-h;m=q*q+R*R>y}s.mouse("drag",T)}function N(T){$t(T.view).on("mousemove.drag mouseup.drag",null),xm(T.view,m),ja(T),s.mouse("end",T)}function S(T,q){if(t.call(this,T,q)){var R=T.changedTouches,O=a.call(this,T,q),C=R.length,D,Z;for(D=0;D<C;++D)(Z=E(this,O,T,q,R[D].identifier,R[D]))&&(Lu(T),Z("start",T,R[D]))}}function M(T){var q=T.changedTouches,R=q.length,O,C;for(O=0;O<R;++O)(C=s[q[O].identifier])&&(ja(T),C("drag",T,q[O]))}function z(T){var q=T.changedTouches,R=q.length,O,C;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),O=0;O<R;++O)(C=s[q[O].identifier])&&(Lu(T),C("end",T,q[O]))}function E(T,q,R,O,C,D){var Z=c.copy(),B=pn(D||R,q),V,W,H;if((H=l.call(T,new Bu("beforestart",{sourceEvent:R,target:v,identifier:C,active:u,x:B[0],y:B[1],dx:0,dy:0,dispatch:Z}),O))!=null)return V=H.x-B[0]||0,W=H.y-B[1]||0,function I(j,G,U){var P=B,re;switch(j){case"start":s[C]=I,re=u++;break;case"end":delete s[C],--u;case"drag":B=pn(U||G,q),re=u;break}Z.call(j,T,new Bu(j,{sourceEvent:G,subject:H,target:v,identifier:C,active:re,x:B[0]+V,y:B[1]+W,dx:B[0]-P[0],dy:B[1]-P[1],dispatch:Z}),O)}}return v.filter=function(T){return arguments.length?(t=typeof T=="function"?T:co(!!T),v):t},v.container=function(T){return arguments.length?(a=typeof T=="function"?T:co(T),v):a},v.subject=function(T){return arguments.length?(l=typeof T=="function"?T:co(T),v):l},v.touchable=function(T){return arguments.length?(r=typeof T=="function"?T:co(!!T),v):r},v.on=function(){var T=c.on.apply(c,arguments);return T===c?v:T},v.clickDistance=function(T){return arguments.length?(y=(T=+T)*T,v):Math.sqrt(y)},v}function qu(t,a,l){t.prototype=a.prototype=l,l.constructor=t}function Sm(t,a){var l=Object.create(t.prototype);for(var r in a)l[r]=a[r];return l}function Hl(){}var Ll=.7,fo=1/Ll,Ra="\\s*([+-]?\\d+)\\s*",Bl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",An="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KS=/^#([0-9a-f]{3,8})$/,FS=new RegExp(`^rgb\\(${Ra},${Ra},${Ra}\\)$`),JS=new RegExp(`^rgb\\(${An},${An},${An}\\)$`),PS=new RegExp(`^rgba\\(${Ra},${Ra},${Ra},${Bl}\\)$`),WS=new RegExp(`^rgba\\(${An},${An},${An},${Bl}\\)$`),eE=new RegExp(`^hsl\\(${Bl},${An},${An}\\)$`),tE=new RegExp(`^hsla\\(${Bl},${An},${An},${Bl}\\)$`),Em={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};qu(Hl,ta,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:_m,formatHex:_m,formatHex8:nE,formatHsl:iE,formatRgb:Nm,toString:Nm});function _m(){return this.rgb().formatHex()}function nE(){return this.rgb().formatHex8()}function iE(){return zm(this).formatHsl()}function Nm(){return this.rgb().formatRgb()}function ta(t){var a,l;return t=(t+"").trim().toLowerCase(),(a=KS.exec(t))?(l=a[1].length,a=parseInt(a[1],16),l===6?Cm(a):l===3?new Ht(a>>8&15|a>>4&240,a>>4&15|a&240,(a&15)<<4|a&15,1):l===8?ho(a>>24&255,a>>16&255,a>>8&255,(a&255)/255):l===4?ho(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=FS.exec(t))?new Ht(a[1],a[2],a[3],1):(a=JS.exec(t))?new Ht(a[1]*255/100,a[2]*255/100,a[3]*255/100,1):(a=PS.exec(t))?ho(a[1],a[2],a[3],a[4]):(a=WS.exec(t))?ho(a[1]*255/100,a[2]*255/100,a[3]*255/100,a[4]):(a=eE.exec(t))?Am(a[1],a[2]/100,a[3]/100,1):(a=tE.exec(t))?Am(a[1],a[2]/100,a[3]/100,a[4]):Em.hasOwnProperty(t)?Cm(Em[t]):t==="transparent"?new Ht(NaN,NaN,NaN,0):null}function Cm(t){return new Ht(t>>16&255,t>>8&255,t&255,1)}function ho(t,a,l,r){return r<=0&&(t=a=l=NaN),new Ht(t,a,l,r)}function aE(t){return t instanceof Hl||(t=ta(t)),t?(t=t.rgb(),new Ht(t.r,t.g,t.b,t.opacity)):new Ht}function Uu(t,a,l,r){return arguments.length===1?aE(t):new Ht(t,a,l,r??1)}function Ht(t,a,l,r){this.r=+t,this.g=+a,this.b=+l,this.opacity=+r}qu(Ht,Uu,Sm(Hl,{brighter(t){return t=t==null?fo:Math.pow(fo,t),new Ht(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Ll:Math.pow(Ll,t),new Ht(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Ht(na(this.r),na(this.g),na(this.b),mo(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:Mm,formatHex:Mm,formatHex8:lE,formatRgb:Tm,toString:Tm}));function Mm(){return`#${ia(this.r)}${ia(this.g)}${ia(this.b)}`}function lE(){return`#${ia(this.r)}${ia(this.g)}${ia(this.b)}${ia((isNaN(this.opacity)?1:this.opacity)*255)}`}function Tm(){const t=mo(this.opacity);return`${t===1?"rgb(":"rgba("}${na(this.r)}, ${na(this.g)}, ${na(this.b)}${t===1?")":`, ${t})`}`}function mo(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function na(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ia(t){return t=na(t),(t<16?"0":"")+t.toString(16)}function Am(t,a,l,r){return r<=0?t=a=l=NaN:l<=0||l>=1?t=a=NaN:a<=0&&(t=NaN),new yn(t,a,l,r)}function zm(t){if(t instanceof yn)return new yn(t.h,t.s,t.l,t.opacity);if(t instanceof Hl||(t=ta(t)),!t)return new yn;if(t instanceof yn)return t;t=t.rgb();var a=t.r/255,l=t.g/255,r=t.b/255,s=Math.min(a,l,r),c=Math.max(a,l,r),u=NaN,d=c-s,h=(c+s)/2;return d?(a===c?u=(l-r)/d+(l<r)*6:l===c?u=(r-a)/d+2:u=(a-l)/d+4,d/=h<.5?c+s:2-c-s,u*=60):d=h>0&&h<1?0:u,new yn(u,d,h,t.opacity)}function rE(t,a,l,r){return arguments.length===1?zm(t):new yn(t,a,l,r??1)}function yn(t,a,l,r){this.h=+t,this.s=+a,this.l=+l,this.opacity=+r}qu(yn,rE,Sm(Hl,{brighter(t){return t=t==null?fo:Math.pow(fo,t),new yn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Ll:Math.pow(Ll,t),new yn(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,r=l+(l<.5?l:1-l)*a,s=2*l-r;return new Ht(Vu(t>=240?t-240:t+120,s,r),Vu(t,s,r),Vu(t<120?t+240:t-120,s,r),this.opacity)},clamp(){return new yn(Om(this.h),go(this.s),go(this.l),mo(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=mo(this.opacity);return`${t===1?"hsl(":"hsla("}${Om(this.h)}, ${go(this.s)*100}%, ${go(this.l)*100}%${t===1?")":`, ${t})`}`}}));function Om(t){return t=(t||0)%360,t<0?t+360:t}function go(t){return Math.max(0,Math.min(1,t||0))}function Vu(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 Yu=t=>()=>t;function oE(t,a){return function(l){return t+l*a}}function sE(t,a,l){return t=Math.pow(t,l),a=Math.pow(a,l)-t,l=1/l,function(r){return Math.pow(t+r*a,l)}}function uE(t){return(t=+t)==1?jm:function(a,l){return l-a?sE(a,l,t):Yu(isNaN(a)?l:a)}}function jm(t,a){var l=a-t;return l?oE(t,l):Yu(isNaN(t)?a:t)}const po=(function t(a){var l=uE(a);function r(s,c){var u=l((s=Uu(s)).r,(c=Uu(c)).r),d=l(s.g,c.g),h=l(s.b,c.b),m=jm(s.opacity,c.opacity);return function(p){return s.r=u(p),s.g=d(p),s.b=h(p),s.opacity=m(p),s+""}}return r.gamma=t,r})(1);function cE(t,a){a||(a=[]);var l=t?Math.min(a.length,t.length):0,r=a.slice(),s;return function(c){for(s=0;s<l;++s)r[s]=t[s]*(1-c)+a[s]*c;return r}}function fE(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function dE(t,a){var l=a?a.length:0,r=t?Math.min(l,t.length):0,s=new Array(r),c=new Array(l),u;for(u=0;u<r;++u)s[u]=ql(t[u],a[u]);for(;u<l;++u)c[u]=a[u];return function(d){for(u=0;u<r;++u)c[u]=s[u](d);return c}}function hE(t,a){var l=new Date;return t=+t,a=+a,function(r){return l.setTime(t*(1-r)+a*r),l}}function zn(t,a){return t=+t,a=+a,function(l){return t*(1-l)+a*l}}function mE(t,a){var l={},r={},s;(t===null||typeof t!="object")&&(t={}),(a===null||typeof a!="object")&&(a={});for(s in a)s in t?l[s]=ql(t[s],a[s]):r[s]=a[s];return function(c){for(s in l)r[s]=l[s](c);return r}}var Gu=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xu=new RegExp(Gu.source,"g");function gE(t){return function(){return t}}function pE(t){return function(a){return t(a)+""}}function Rm(t,a){var l=Gu.lastIndex=Xu.lastIndex=0,r,s,c,u=-1,d=[],h=[];for(t=t+"",a=a+"";(r=Gu.exec(t))&&(s=Xu.exec(a));)(c=s.index)>l&&(c=a.slice(l,c),d[u]?d[u]+=c:d[++u]=c),(r=r[0])===(s=s[0])?d[u]?d[u]+=s:d[++u]=s:(d[++u]=null,h.push({i:u,x:zn(r,s)})),l=Xu.lastIndex;return l<a.length&&(c=a.slice(l),d[u]?d[u]+=c:d[++u]=c),d.length<2?h[0]?pE(h[0].x):gE(a):(a=h.length,function(m){for(var p=0,y;p<a;++p)d[(y=h[p]).i]=y.x(m);return d.join("")})}function ql(t,a){var l=typeof a,r;return a==null||l==="boolean"?Yu(a):(l==="number"?zn:l==="string"?(r=ta(a))?(a=r,po):Rm:a instanceof ta?po:a instanceof Date?hE:fE(a)?cE:Array.isArray(a)?dE:typeof a.valueOf!="function"&&typeof a.toString!="function"||isNaN(a)?mE:zn)(t,a)}var Dm=180/Math.PI,Zu={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function km(t,a,l,r,s,c){var u,d,h;return(u=Math.sqrt(t*t+a*a))&&(t/=u,a/=u),(h=t*l+a*r)&&(l-=t*h,r-=a*h),(d=Math.sqrt(l*l+r*r))&&(l/=d,r/=d,h/=d),t*r<a*l&&(t=-t,a=-a,h=-h,u=-u),{translateX:s,translateY:c,rotate:Math.atan2(a,t)*Dm,skewX:Math.atan(h)*Dm,scaleX:u,scaleY:d}}var yo;function yE(t){const a=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return a.isIdentity?Zu:km(a.a,a.b,a.c,a.d,a.e,a.f)}function vE(t){return t==null||(yo||(yo=document.createElementNS("http://www.w3.org/2000/svg","g")),yo.setAttribute("transform",t),!(t=yo.transform.baseVal.consolidate()))?Zu:(t=t.matrix,km(t.a,t.b,t.c,t.d,t.e,t.f))}function Hm(t,a,l,r){function s(m){return m.length?m.pop()+" ":""}function c(m,p,y,v,x,w){if(m!==y||p!==v){var N=x.push("translate(",null,a,null,l);w.push({i:N-4,x:zn(m,y)},{i:N-2,x:zn(p,v)})}else(y||v)&&x.push("translate("+y+a+v+l)}function u(m,p,y,v){m!==p?(m-p>180?p+=360:p-m>180&&(m+=360),v.push({i:y.push(s(y)+"rotate(",null,r)-2,x:zn(m,p)})):p&&y.push(s(y)+"rotate("+p+r)}function d(m,p,y,v){m!==p?v.push({i:y.push(s(y)+"skewX(",null,r)-2,x:zn(m,p)}):p&&y.push(s(y)+"skewX("+p+r)}function h(m,p,y,v,x,w){if(m!==y||p!==v){var N=x.push(s(x)+"scale(",null,",",null,")");w.push({i:N-4,x:zn(m,y)},{i:N-2,x:zn(p,v)})}else(y!==1||v!==1)&&x.push(s(x)+"scale("+y+","+v+")")}return function(m,p){var y=[],v=[];return m=t(m),p=t(p),c(m.translateX,m.translateY,p.translateX,p.translateY,y,v),u(m.rotate,p.rotate,y,v),d(m.skewX,p.skewX,y,v),h(m.scaleX,m.scaleY,p.scaleX,p.scaleY,y,v),m=p=null,function(x){for(var w=-1,N=v.length,S;++w<N;)y[(S=v[w]).i]=S.x(x);return y.join("")}}}var bE=Hm(yE,"px, ","px)","deg)"),xE=Hm(vE,", ",")",")"),wE=1e-12;function Lm(t){return((t=Math.exp(t))+1/t)/2}function SE(t){return((t=Math.exp(t))-1/t)/2}function EE(t){return((t=Math.exp(2*t))-1)/(t+1)}const vo=(function t(a,l,r){function s(c,u){var d=c[0],h=c[1],m=c[2],p=u[0],y=u[1],v=u[2],x=p-d,w=y-h,N=x*x+w*w,S,M;if(N<wE)M=Math.log(v/m)/a,S=function(O){return[d+O*x,h+O*w,m*Math.exp(a*O*M)]};else{var z=Math.sqrt(N),E=(v*v-m*m+r*N)/(2*m*l*z),T=(v*v-m*m-r*N)/(2*v*l*z),q=Math.log(Math.sqrt(E*E+1)-E),R=Math.log(Math.sqrt(T*T+1)-T);M=(R-q)/a,S=function(O){var C=O*M,D=Lm(q),Z=m/(l*z)*(D*EE(a*C+q)-SE(q));return[d+Z*x,h+Z*w,m*D/Lm(a*C+q)]}}return S.duration=M*1e3*a/Math.SQRT2,S}return s.rho=function(c){var u=Math.max(.001,+c),d=u*u,h=d*d;return t(u,d,h)},s})(Math.SQRT2,2,4);var Da=0,Ul=0,Vl=0,Bm=1e3,bo,Yl,xo=0,aa=0,wo=0,Gl=typeof performance=="object"&&performance.now?performance:Date,qm=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Qu(){return aa||(qm(_E),aa=Gl.now()+wo)}function _E(){aa=0}function So(){this._call=this._time=this._next=null}So.prototype=Um.prototype={constructor:So,restart:function(t,a,l){if(typeof t!="function")throw new TypeError("callback is not a function");l=(l==null?Qu():+l)+(a==null?0:+a),!this._next&&Yl!==this&&(Yl?Yl._next=this:bo=this,Yl=this),this._call=t,this._time=l,Iu()},stop:function(){this._call&&(this._call=null,this._time=1/0,Iu())}};function Um(t,a,l){var r=new So;return r.restart(t,a,l),r}function NE(){Qu(),++Da;for(var t=bo,a;t;)(a=aa-t._time)>=0&&t._call.call(void 0,a),t=t._next;--Da}function Vm(){aa=(xo=Gl.now())+wo,Da=Ul=0;try{NE()}finally{Da=0,ME(),aa=0}}function CE(){var t=Gl.now(),a=t-xo;a>Bm&&(wo-=a,xo=t)}function ME(){for(var t,a=bo,l,r=1/0;a;)a._call?(r>a._time&&(r=a._time),t=a,a=a._next):(l=a._next,a._next=null,a=t?t._next=l:bo=l);Yl=t,Iu(r)}function Iu(t){if(!Da){Ul&&(Ul=clearTimeout(Ul));var a=t-aa;a>24?(t<1/0&&(Ul=setTimeout(Vm,t-Gl.now()-wo)),Vl&&(Vl=clearInterval(Vl))):(Vl||(xo=Gl.now(),Vl=setInterval(CE,Bm)),Da=1,qm(Vm))}}function Ym(t,a,l){var r=new So;return a=a==null?0:+a,r.restart(s=>{r.stop(),t(s+a)},a,l),r}var TE=ro("start","end","cancel","interrupt"),AE=[],Gm=0,Xm=1,$u=2,Eo=3,Zm=4,Ku=5,_o=6;function No(t,a,l,r,s,c){var u=t.__transition;if(!u)t.__transition={};else if(l in u)return;zE(t,l,{name:a,index:r,group:s,on:TE,tween:AE,time:c.time,delay:c.delay,duration:c.duration,ease:c.ease,timer:null,state:Gm})}function Fu(t,a){var l=vn(t,a);if(l.state>Gm)throw new Error("too late; already scheduled");return l}function On(t,a){var l=vn(t,a);if(l.state>Eo)throw new Error("too late; already running");return l}function vn(t,a){var l=t.__transition;if(!l||!(l=l[a]))throw new Error("transition not found");return l}function zE(t,a,l){var r=t.__transition,s;r[a]=l,l.timer=Um(c,0,l.time);function c(m){l.state=Xm,l.timer.restart(u,l.delay,l.time),l.delay<=m&&u(m-l.delay)}function u(m){var p,y,v,x;if(l.state!==Xm)return h();for(p in r)if(x=r[p],x.name===l.name){if(x.state===Eo)return Ym(u);x.state===Zm?(x.state=_o,x.timer.stop(),x.on.call("interrupt",t,t.__data__,x.index,x.group),delete r[p]):+p<a&&(x.state=_o,x.timer.stop(),x.on.call("cancel",t,t.__data__,x.index,x.group),delete r[p])}if(Ym(function(){l.state===Eo&&(l.state=Zm,l.timer.restart(d,l.delay,l.time),d(m))}),l.state=$u,l.on.call("start",t,t.__data__,l.index,l.group),l.state===$u){for(l.state=Eo,s=new Array(v=l.tween.length),p=0,y=-1;p<v;++p)(x=l.tween[p].value.call(t,t.__data__,l.index,l.group))&&(s[++y]=x);s.length=y+1}}function d(m){for(var p=m<l.duration?l.ease.call(null,m/l.duration):(l.timer.restart(h),l.state=Ku,1),y=-1,v=s.length;++y<v;)s[y].call(t,p);l.state===Ku&&(l.on.call("end",t,t.__data__,l.index,l.group),h())}function h(){l.state=_o,l.timer.stop(),delete r[a];for(var m in r)return;delete t.__transition}}function Co(t,a){var l=t.__transition,r,s,c=!0,u;if(l){a=a==null?null:a+"";for(u in l){if((r=l[u]).name!==a){c=!1;continue}s=r.state>$u&&r.state<Ku,r.state=_o,r.timer.stop(),r.on.call(s?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete l[u]}c&&delete t.__transition}}function OE(t){return this.each(function(){Co(this,t)})}function jE(t,a){var l,r;return function(){var s=On(this,t),c=s.tween;if(c!==l){r=l=c;for(var u=0,d=r.length;u<d;++u)if(r[u].name===a){r=r.slice(),r.splice(u,1);break}}s.tween=r}}function RE(t,a,l){var r,s;if(typeof l!="function")throw new Error;return function(){var c=On(this,t),u=c.tween;if(u!==r){s=(r=u).slice();for(var d={name:a,value:l},h=0,m=s.length;h<m;++h)if(s[h].name===a){s[h]=d;break}h===m&&s.push(d)}c.tween=s}}function DE(t,a){var l=this._id;if(t+="",arguments.length<2){for(var r=vn(this.node(),l).tween,s=0,c=r.length,u;s<c;++s)if((u=r[s]).name===t)return u.value;return null}return this.each((a==null?jE:RE)(l,t,a))}function Ju(t,a,l){var r=t._id;return t.each(function(){var s=On(this,r);(s.value||(s.value={}))[a]=l.apply(this,arguments)}),function(s){return vn(s,r).value[a]}}function Qm(t,a){var l;return(typeof a=="number"?zn:a instanceof ta?po:(l=ta(a))?(a=l,po):Rm)(t,a)}function kE(t){return function(){this.removeAttribute(t)}}function HE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function LE(t,a,l){var r,s=l+"",c;return function(){var u=this.getAttribute(t);return u===s?null:u===r?c:c=a(r=u,l)}}function BE(t,a,l){var r,s=l+"",c;return function(){var u=this.getAttributeNS(t.space,t.local);return u===s?null:u===r?c:c=a(r=u,l)}}function qE(t,a,l){var r,s,c;return function(){var u,d=l(this),h;return d==null?void this.removeAttribute(t):(u=this.getAttribute(t),h=d+"",u===h?null:u===r&&h===s?c:(s=h,c=a(r=u,d)))}}function UE(t,a,l){var r,s,c;return function(){var u,d=l(this),h;return d==null?void this.removeAttributeNS(t.space,t.local):(u=this.getAttributeNS(t.space,t.local),h=d+"",u===h?null:u===r&&h===s?c:(s=h,c=a(r=u,d)))}}function VE(t,a){var l=so(t),r=l==="transform"?xE:Qm;return this.attrTween(t,typeof a=="function"?(l.local?UE:qE)(l,r,Ju(this,"attr."+t,a)):a==null?(l.local?HE:kE)(l):(l.local?BE:LE)(l,r,a))}function YE(t,a){return function(l){this.setAttribute(t,a.call(this,l))}}function GE(t,a){return function(l){this.setAttributeNS(t.space,t.local,a.call(this,l))}}function XE(t,a){var l,r;function s(){var c=a.apply(this,arguments);return c!==r&&(l=(r=c)&&GE(t,c)),l}return s._value=a,s}function ZE(t,a){var l,r;function s(){var c=a.apply(this,arguments);return c!==r&&(l=(r=c)&&YE(t,c)),l}return s._value=a,s}function QE(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 r=so(t);return this.tween(l,(r.local?XE:ZE)(r,a))}function IE(t,a){return function(){Fu(this,t).delay=+a.apply(this,arguments)}}function $E(t,a){return a=+a,function(){Fu(this,t).delay=a}}function KE(t){var a=this._id;return arguments.length?this.each((typeof t=="function"?IE:$E)(a,t)):vn(this.node(),a).delay}function FE(t,a){return function(){On(this,t).duration=+a.apply(this,arguments)}}function JE(t,a){return a=+a,function(){On(this,t).duration=a}}function PE(t){var a=this._id;return arguments.length?this.each((typeof t=="function"?FE:JE)(a,t)):vn(this.node(),a).duration}function WE(t,a){if(typeof a!="function")throw new Error;return function(){On(this,t).ease=a}}function e_(t){var a=this._id;return arguments.length?this.each(WE(a,t)):vn(this.node(),a).ease}function t_(t,a){return function(){var l=a.apply(this,arguments);if(typeof l!="function")throw new Error;On(this,t).ease=l}}function n_(t){if(typeof t!="function")throw new Error;return this.each(t_(this._id,t))}function i_(t){typeof t!="function"&&(t=um(t));for(var a=this._groups,l=a.length,r=new Array(l),s=0;s<l;++s)for(var c=a[s],u=c.length,d=r[s]=[],h,m=0;m<u;++m)(h=c[m])&&t.call(h,h.__data__,m,c)&&d.push(h);return new Yn(r,this._parents,this._name,this._id)}function a_(t){if(t._id!==this._id)throw new Error;for(var a=this._groups,l=t._groups,r=a.length,s=l.length,c=Math.min(r,s),u=new Array(r),d=0;d<c;++d)for(var h=a[d],m=l[d],p=h.length,y=u[d]=new Array(p),v,x=0;x<p;++x)(v=h[x]||m[x])&&(y[x]=v);for(;d<r;++d)u[d]=a[d];return new Yn(u,this._parents,this._name,this._id)}function l_(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 r_(t,a,l){var r,s,c=l_(a)?Fu:On;return function(){var u=c(this,t),d=u.on;d!==r&&(s=(r=d).copy()).on(a,l),u.on=s}}function o_(t,a){var l=this._id;return arguments.length<2?vn(this.node(),l).on.on(t):this.each(r_(l,t,a))}function s_(t){return function(){var a=this.parentNode;for(var l in this.__transition)if(+l!==t)return;a&&a.removeChild(this)}}function u_(){return this.on("end.remove",s_(this._id))}function c_(t){var a=this._name,l=this._id;typeof t!="function"&&(t=ku(t));for(var r=this._groups,s=r.length,c=new Array(s),u=0;u<s;++u)for(var d=r[u],h=d.length,m=c[u]=new Array(h),p,y,v=0;v<h;++v)(p=d[v])&&(y=t.call(p,p.__data__,v,d))&&("__data__"in p&&(y.__data__=p.__data__),m[v]=y,No(m[v],a,l,v,m,vn(p,l)));return new Yn(c,this._parents,a,l)}function f_(t){var a=this._name,l=this._id;typeof t!="function"&&(t=sm(t));for(var r=this._groups,s=r.length,c=[],u=[],d=0;d<s;++d)for(var h=r[d],m=h.length,p,y=0;y<m;++y)if(p=h[y]){for(var v=t.call(p,p.__data__,y,h),x,w=vn(p,l),N=0,S=v.length;N<S;++N)(x=v[N])&&No(x,a,l,N,v,w);c.push(v),u.push(p)}return new Yn(c,u,a,l)}var d_=Dl.prototype.constructor;function h_(){return new d_(this._groups,this._parents)}function m_(t,a){var l,r,s;return function(){var c=Oa(this,t),u=(this.style.removeProperty(t),Oa(this,t));return c===u?null:c===l&&u===r?s:s=a(l=c,r=u)}}function Im(t){return function(){this.style.removeProperty(t)}}function g_(t,a,l){var r,s=l+"",c;return function(){var u=Oa(this,t);return u===s?null:u===r?c:c=a(r=u,l)}}function p_(t,a,l){var r,s,c;return function(){var u=Oa(this,t),d=l(this),h=d+"";return d==null&&(h=d=(this.style.removeProperty(t),Oa(this,t))),u===h?null:u===r&&h===s?c:(s=h,c=a(r=u,d))}}function y_(t,a){var l,r,s,c="style."+a,u="end."+c,d;return function(){var h=On(this,t),m=h.on,p=h.value[c]==null?d||(d=Im(a)):void 0;(m!==l||s!==p)&&(r=(l=m).copy()).on(u,s=p),h.on=r}}function v_(t,a,l){var r=(t+="")=="transform"?bE:Qm;return a==null?this.styleTween(t,m_(t,r)).on("end.style."+t,Im(t)):typeof a=="function"?this.styleTween(t,p_(t,r,Ju(this,"style."+t,a))).each(y_(this._id,t)):this.styleTween(t,g_(t,r,a),l).on("end.style."+t,null)}function b_(t,a,l){return function(r){this.style.setProperty(t,a.call(this,r),l)}}function x_(t,a,l){var r,s;function c(){var u=a.apply(this,arguments);return u!==s&&(r=(s=u)&&b_(t,u,l)),r}return c._value=a,c}function w_(t,a,l){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(a==null)return this.tween(r,null);if(typeof a!="function")throw new Error;return this.tween(r,x_(t,a,l??""))}function S_(t){return function(){this.textContent=t}}function E_(t){return function(){var a=t(this);this.textContent=a??""}}function __(t){return this.tween("text",typeof t=="function"?E_(Ju(this,"text",t)):S_(t==null?"":t+""))}function N_(t){return function(a){this.textContent=t.call(this,a)}}function C_(t){var a,l;function r(){var s=t.apply(this,arguments);return s!==l&&(a=(l=s)&&N_(s)),a}return r._value=t,r}function M_(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,C_(t))}function T_(){for(var t=this._name,a=this._id,l=$m(),r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],d=u.length,h,m=0;m<d;++m)if(h=u[m]){var p=vn(h,a);No(h,t,l,m,u,{time:p.time+p.delay+p.duration,delay:0,duration:p.duration,ease:p.ease})}return new Yn(r,this._parents,t,l)}function A_(){var t,a,l=this,r=l._id,s=l.size();return new Promise(function(c,u){var d={value:u},h={value:function(){--s===0&&c()}};l.each(function(){var m=On(this,r),p=m.on;p!==t&&(a=(t=p).copy(),a._.cancel.push(d),a._.interrupt.push(d),a._.end.push(h)),m.on=a}),s===0&&c()})}var z_=0;function Yn(t,a,l,r){this._groups=t,this._parents=a,this._name=l,this._id=r}function $m(){return++z_}var Gn=Dl.prototype;Yn.prototype={constructor:Yn,select:c_,selectAll:f_,selectChild:Gn.selectChild,selectChildren:Gn.selectChildren,filter:i_,merge:a_,selection:h_,transition:T_,call:Gn.call,nodes:Gn.nodes,node:Gn.node,size:Gn.size,empty:Gn.empty,each:Gn.each,on:o_,attr:VE,attrTween:QE,style:v_,styleTween:w_,text:__,textTween:M_,remove:u_,tween:DE,delay:KE,duration:PE,ease:e_,easeVarying:n_,end:A_,[Symbol.iterator]:Gn[Symbol.iterator]};function O_(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var j_={time:null,delay:0,duration:250,ease:O_};function R_(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 D_(t){var a,l;t instanceof Yn?(a=t._id,t=t._name):(a=$m(),(l=j_).time=Qu(),t=t==null?null:t+"");for(var r=this._groups,s=r.length,c=0;c<s;++c)for(var u=r[c],d=u.length,h,m=0;m<d;++m)(h=u[m])&&No(h,t,a,m,u,l||R_(h,a));return new Yn(r,this._parents,t,a)}Dl.prototype.interrupt=OE,Dl.prototype.transition=D_;const Mo=t=>()=>t;function k_(t,{sourceEvent:a,target:l,transform:r,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:r,enumerable:!0,configurable:!0},_:{value:s}})}function Xn(t,a,l){this.k=t,this.x=a,this.y=l}Xn.prototype={constructor:Xn,scale:function(t){return t===1?this:new Xn(this.k*t,this.x,this.y)},translate:function(t,a){return t===0&a===0?this:new Xn(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 To=new Xn(1,0,0);Km.prototype=Xn.prototype;function Km(t){for(;!t.__zoom;)if(!(t=t.parentNode))return To;return t.__zoom}function Pu(t){t.stopImmediatePropagation()}function Xl(t){t.preventDefault(),t.stopImmediatePropagation()}function H_(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function L_(){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 Fm(){return this.__zoom||To}function B_(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function q_(){return navigator.maxTouchPoints||"ontouchstart"in this}function U_(t,a,l){var r=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],u=t.invertY(a[1][1])-l[1][1];return t.translate(s>r?(r+s)/2:Math.min(0,r)||Math.max(0,s),u>c?(c+u)/2:Math.min(0,c)||Math.max(0,u))}function Jm(){var t=H_,a=L_,l=U_,r=B_,s=q_,c=[0,1/0],u=[[-1/0,-1/0],[1/0,1/0]],d=250,h=vo,m=ro("start","zoom","end"),p,y,v,x=500,w=150,N=0,S=10;function M(H){H.property("__zoom",Fm).on("wheel.zoom",C,{passive:!1}).on("mousedown.zoom",D).on("dblclick.zoom",Z).filter(s).on("touchstart.zoom",B).on("touchmove.zoom",V).on("touchend.zoom touchcancel.zoom",W).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}M.transform=function(H,I,j,G){var U=H.selection?H.selection():H;U.property("__zoom",Fm),H!==U?q(H,I,j,G):U.interrupt().each(function(){R(this,arguments).event(G).start().zoom(null,typeof I=="function"?I.apply(this,arguments):I).end()})},M.scaleBy=function(H,I,j,G){M.scaleTo(H,function(){var U=this.__zoom.k,P=typeof I=="function"?I.apply(this,arguments):I;return U*P},j,G)},M.scaleTo=function(H,I,j,G){M.transform(H,function(){var U=a.apply(this,arguments),P=this.__zoom,re=j==null?T(U):typeof j=="function"?j.apply(this,arguments):j,k=P.invert(re),Q=typeof I=="function"?I.apply(this,arguments):I;return l(E(z(P,Q),re,k),U,u)},j,G)},M.translateBy=function(H,I,j,G){M.transform(H,function(){return l(this.__zoom.translate(typeof I=="function"?I.apply(this,arguments):I,typeof j=="function"?j.apply(this,arguments):j),a.apply(this,arguments),u)},null,G)},M.translateTo=function(H,I,j,G,U){M.transform(H,function(){var P=a.apply(this,arguments),re=this.__zoom,k=G==null?T(P):typeof G=="function"?G.apply(this,arguments):G;return l(To.translate(k[0],k[1]).scale(re.k).translate(typeof I=="function"?-I.apply(this,arguments):-I,typeof j=="function"?-j.apply(this,arguments):-j),P,u)},G,U)};function z(H,I){return I=Math.max(c[0],Math.min(c[1],I)),I===H.k?H:new Xn(I,H.x,H.y)}function E(H,I,j){var G=I[0]-j[0]*H.k,U=I[1]-j[1]*H.k;return G===H.x&&U===H.y?H:new Xn(H.k,G,U)}function T(H){return[(+H[0][0]+ +H[1][0])/2,(+H[0][1]+ +H[1][1])/2]}function q(H,I,j,G){H.on("start.zoom",function(){R(this,arguments).event(G).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(G).end()}).tween("zoom",function(){var U=this,P=arguments,re=R(U,P).event(G),k=a.apply(U,P),Q=j==null?T(k):typeof j=="function"?j.apply(U,P):j,L=Math.max(k[1][0]-k[0][0],k[1][1]-k[0][1]),Y=U.__zoom,F=typeof I=="function"?I.apply(U,P):I,ne=h(Y.invert(Q).concat(L/Y.k),F.invert(Q).concat(L/F.k));return function(ae){if(ae===1)ae=F;else{var oe=ne(ae),fe=L/oe[2];ae=new Xn(fe,Q[0]-oe[0]*fe,Q[1]-oe[1]*fe)}re.zoom(null,ae)}})}function R(H,I,j){return!j&&H.__zooming||new O(H,I)}function O(H,I){this.that=H,this.args=I,this.active=0,this.sourceEvent=null,this.extent=a.apply(H,I),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,I){return this.mouse&&H!=="mouse"&&(this.mouse[1]=I.invert(this.mouse[0])),this.touch0&&H!=="touch"&&(this.touch0[1]=I.invert(this.touch0[0])),this.touch1&&H!=="touch"&&(this.touch1[1]=I.invert(this.touch1[0])),this.that.__zoom=I,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(H){var I=$t(this.that).datum();m.call(H,this.that,new k_(H,{sourceEvent:this.sourceEvent,target:M,transform:this.that.__zoom,dispatch:m}),I)}};function C(H,...I){if(!t.apply(this,arguments))return;var j=R(this,I).event(H),G=this.__zoom,U=Math.max(c[0],Math.min(c[1],G.k*Math.pow(2,r.apply(this,arguments)))),P=pn(H);if(j.wheel)(j.mouse[0][0]!==P[0]||j.mouse[0][1]!==P[1])&&(j.mouse[1]=G.invert(j.mouse[0]=P)),clearTimeout(j.wheel);else{if(G.k===U)return;j.mouse=[P,G.invert(P)],Co(this),j.start()}Xl(H),j.wheel=setTimeout(re,w),j.zoom("mouse",l(E(z(G,U),j.mouse[0],j.mouse[1]),j.extent,u));function re(){j.wheel=null,j.end()}}function D(H,...I){if(v||!t.apply(this,arguments))return;var j=H.currentTarget,G=R(this,I,!0).event(H),U=$t(H.view).on("mousemove.zoom",Q,!0).on("mouseup.zoom",L,!0),P=pn(H,j),re=H.clientX,k=H.clientY;bm(H.view),Pu(H),G.mouse=[P,this.__zoom.invert(P)],Co(this),G.start();function Q(Y){if(Xl(Y),!G.moved){var F=Y.clientX-re,ne=Y.clientY-k;G.moved=F*F+ne*ne>N}G.event(Y).zoom("mouse",l(E(G.that.__zoom,G.mouse[0]=pn(Y,j),G.mouse[1]),G.extent,u))}function L(Y){U.on("mousemove.zoom mouseup.zoom",null),xm(Y.view,G.moved),Xl(Y),G.event(Y).end()}}function Z(H,...I){if(t.apply(this,arguments)){var j=this.__zoom,G=pn(H.changedTouches?H.changedTouches[0]:H,this),U=j.invert(G),P=j.k*(H.shiftKey?.5:2),re=l(E(z(j,P),G,U),a.apply(this,I),u);Xl(H),d>0?$t(this).transition().duration(d).call(q,re,G,H):$t(this).call(M.transform,re,G,H)}}function B(H,...I){if(t.apply(this,arguments)){var j=H.touches,G=j.length,U=R(this,I,H.changedTouches.length===G).event(H),P,re,k,Q;for(Pu(H),re=0;re<G;++re)k=j[re],Q=pn(k,this),Q=[Q,this.__zoom.invert(Q),k.identifier],U.touch0?!U.touch1&&U.touch0[2]!==Q[2]&&(U.touch1=Q,U.taps=0):(U.touch0=Q,P=!0,U.taps=1+!!p);p&&(p=clearTimeout(p)),P&&(U.taps<2&&(y=Q[0],p=setTimeout(function(){p=null},x)),Co(this),U.start())}}function V(H,...I){if(this.__zooming){var j=R(this,I).event(H),G=H.changedTouches,U=G.length,P,re,k,Q;for(Xl(H),P=0;P<U;++P)re=G[P],k=pn(re,this),j.touch0&&j.touch0[2]===re.identifier?j.touch0[0]=k:j.touch1&&j.touch1[2]===re.identifier&&(j.touch1[0]=k);if(re=j.that.__zoom,j.touch1){var L=j.touch0[0],Y=j.touch0[1],F=j.touch1[0],ne=j.touch1[1],ae=(ae=F[0]-L[0])*ae+(ae=F[1]-L[1])*ae,oe=(oe=ne[0]-Y[0])*oe+(oe=ne[1]-Y[1])*oe;re=z(re,Math.sqrt(ae/oe)),k=[(L[0]+F[0])/2,(L[1]+F[1])/2],Q=[(Y[0]+ne[0])/2,(Y[1]+ne[1])/2]}else if(j.touch0)k=j.touch0[0],Q=j.touch0[1];else return;j.zoom("touch",l(E(re,k,Q),j.extent,u))}}function W(H,...I){if(this.__zooming){var j=R(this,I).event(H),G=H.changedTouches,U=G.length,P,re;for(Pu(H),v&&clearTimeout(v),v=setTimeout(function(){v=null},x),P=0;P<U;++P)re=G[P],j.touch0&&j.touch0[2]===re.identifier?delete j.touch0:j.touch1&&j.touch1[2]===re.identifier&&delete j.touch1;if(j.touch1&&!j.touch0&&(j.touch0=j.touch1,delete j.touch1),j.touch0)j.touch0[1]=this.__zoom.invert(j.touch0[0]);else if(j.end(),j.taps===2&&(re=pn(re,this),Math.hypot(y[0]-re[0],y[1]-re[1])<S)){var k=$t(this).on("dblclick.zoom");k&&k.apply(this,arguments)}}}return M.wheelDelta=function(H){return arguments.length?(r=typeof H=="function"?H:Mo(+H),M):r},M.filter=function(H){return arguments.length?(t=typeof H=="function"?H:Mo(!!H),M):t},M.touchable=function(H){return arguments.length?(s=typeof H=="function"?H:Mo(!!H),M):s},M.extent=function(H){return arguments.length?(a=typeof H=="function"?H:Mo([[+H[0][0],+H[0][1]],[+H[1][0],+H[1][1]]]),M):a},M.scaleExtent=function(H){return arguments.length?(c[0]=+H[0],c[1]=+H[1],M):[c[0],c[1]]},M.translateExtent=function(H){return arguments.length?(u[0][0]=+H[0][0],u[1][0]=+H[1][0],u[0][1]=+H[0][1],u[1][1]=+H[1][1],M):[[u[0][0],u[0][1]],[u[1][0],u[1][1]]]},M.constrain=function(H){return arguments.length?(l=H,M):l},M.duration=function(H){return arguments.length?(d=+H,M):d},M.interpolate=function(H){return arguments.length?(h=H,M):h},M.on=function(){var H=m.on.apply(m,arguments);return H===m?M:H},M.clickDistance=function(H){return arguments.length?(N=(H=+H)*H,M):Math.sqrt(N)},M.tapDistance=function(H){return arguments.length?(S=+H,M):S},M}const jn={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:r})=>`Couldn't create edge for ${t} handle id: "${t==="source"?l:r}", 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."},Zl=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Pm=["Enter"," ","Escape"],Wm={"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 la;(function(t){t.Strict="strict",t.Loose="loose"})(la||(la={}));var ra;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(ra||(ra={}));var ka;(function(t){t.Partial="partial",t.Full="full"})(ka||(ka={}));const eg={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var vi;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(vi||(vi={}));var Ao;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Ao||(Ao={}));var ye;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(ye||(ye={}));const tg={[ye.Left]:ye.Right,[ye.Right]:ye.Left,[ye.Top]:ye.Bottom,[ye.Bottom]:ye.Top};function ng(t){return t===null?null:t?"valid":"invalid"}const ig=t=>"id"in t&&"source"in t&&"target"in t,V_=t=>"id"in t&&"position"in t&&!("source"in t)&&!("target"in t),Wu=t=>"id"in t&&"internals"in t&&!("source"in t)&&!("target"in t),Ql=(t,a=[0,0])=>{const{width:l,height:r}=Zn(t),s=t.origin??a,c=l*s[0],u=r*s[1];return{x:t.position.x-c,y:t.position.y-u}},ag=(t,a={nodeOrigin:[0,0]})=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const l=t.reduce((r,s)=>{const c=typeof s=="string";let u=!a.nodeLookup&&!c?s:void 0;a.nodeLookup&&(u=c?a.nodeLookup.get(s):Wu(s)?s:a.nodeLookup.get(s.id));const d=u?jo(u,a.nodeOrigin):{x:0,y:0,x2:0,y2:0};return zo(r,d)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return Oo(l)},Il=(t,a={})=>{let l={x:1/0,y:1/0,x2:-1/0,y2:-1/0},r=!1;return t.forEach(s=>{(a.filter===void 0||a.filter(s))&&(l=zo(l,jo(s)),r=!0)}),r?Oo(l):{x:0,y:0,width:0,height:0}},ec=(t,a,[l,r,s]=[0,0,1],c=!1,u=!1)=>{const d={...Fl(a,[l,r,s]),width:a.width/s,height:a.height/s},h=[];for(const m of t.values()){const{measured:p,selectable:y=!0,hidden:v=!1}=m;if(u&&!y||v)continue;const x=p.width??m.width??m.initialWidth??null,w=p.height??m.height??m.initialHeight??null,N=$l(d,La(m)),S=(x??0)*(w??0),M=c&&N>0;(!m.internals.handleBounds||M||N>=S||m.dragging)&&h.push(m)}return h},Y_=(t,a)=>{const l=new Set;return t.forEach(r=>{l.add(r.id)}),a.filter(r=>l.has(r.source)||l.has(r.target))};function G_(t,a){const l=new Map,r=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)&&(!r||r.has(s.id))&&l.set(s.id,s)}),l}async function X_({nodes:t,width:a,height:l,panZoom:r,minZoom:s,maxZoom:c},u){if(t.size===0)return Promise.resolve(!0);const d=G_(t,u),h=Il(d),m=Do(h,a,l,u?.minZoom??s,u?.maxZoom??c,u?.padding??.1);return await r.setViewport(m,{duration:u?.duration,ease:u?.ease,interpolate:u?.interpolate}),Promise.resolve(!0)}function lg({nodeId:t,nextPosition:a,nodeLookup:l,nodeOrigin:r=[0,0],nodeExtent:s,onError:c}){const u=l.get(t),d=u.parentId?l.get(u.parentId):void 0,{x:h,y:m}=d?d.internals.positionAbsolute:{x:0,y:0},p=u.origin??r;let y=u.extent||s;if(u.extent==="parent"&&!u.expandParent)if(!d)c?.("005",jn.error005());else{const x=d.measured.width,w=d.measured.height;x&&w&&(y=[[h,m],[h+x,m+w]])}else d&&qa(u.extent)&&(y=[[u.extent[0][0]+h,u.extent[0][1]+m],[u.extent[1][0]+h,u.extent[1][1]+m]]);const v=qa(y)?oa(a,y,u.measured):a;return(u.measured.width===void 0||u.measured.height===void 0)&&c?.("015",jn.error015()),{position:{x:v.x-h+(u.measured.width??0)*p[0],y:v.y-m+(u.measured.height??0)*p[1]},positionAbsolute:v}}async function Z_({nodesToRemove:t=[],edgesToRemove:a=[],nodes:l,edges:r,onBeforeDelete:s}){const c=new Set(t.map(v=>v.id)),u=[];for(const v of l){if(v.deletable===!1)continue;const x=c.has(v.id),w=!x&&v.parentId&&u.find(N=>N.id===v.parentId);(x||w)&&u.push(v)}const d=new Set(a.map(v=>v.id)),h=r.filter(v=>v.deletable!==!1),p=Y_(u,h);for(const v of h)d.has(v.id)&&!p.find(w=>w.id===v.id)&&p.push(v);if(!s)return{edges:p,nodes:u};const y=await s({nodes:u,edges:p});return typeof y=="boolean"?y?{edges:p,nodes:u}:{edges:[],nodes:[]}:y}const Ha=(t,a=0,l=1)=>Math.min(Math.max(t,a),l),oa=(t={x:0,y:0},a,l)=>({x:Ha(t.x,a[0][0],a[1][0]-(l?.width??0)),y:Ha(t.y,a[0][1],a[1][1]-(l?.height??0))});function rg(t,a,l){const{width:r,height:s}=Zn(l),{x:c,y:u}=l.internals.positionAbsolute;return oa(t,[[c,u],[c+r,u+s]],a)}const og=(t,a,l)=>t<a?Ha(Math.abs(t-a),1,a)/a:t>l?-Ha(Math.abs(t-l),1,a)/a:0,sg=(t,a,l=15,r=40)=>{const s=og(t.x,r,a.width-r)*l,c=og(t.y,r,a.height-r)*l;return[s,c]},zo=(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)}),tc=({x:t,y:a,width:l,height:r})=>({x:t,y:a,x2:t+l,y2:a+r}),Oo=({x:t,y:a,x2:l,y2:r})=>({x:t,y:a,width:l-t,height:r-a}),La=(t,a=[0,0])=>{const{x:l,y:r}=Wu(t)?t.internals.positionAbsolute:Ql(t,a);return{x:l,y:r,width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}},jo=(t,a=[0,0])=>{const{x:l,y:r}=Wu(t)?t.internals.positionAbsolute:Ql(t,a);return{x:l,y:r,x2:l+(t.measured?.width??t.width??t.initialWidth??0),y2:r+(t.measured?.height??t.height??t.initialHeight??0)}},ug=(t,a)=>Oo(zo(tc(t),tc(a))),$l=(t,a)=>{const l=Math.max(0,Math.min(t.x+t.width,a.x+a.width)-Math.max(t.x,a.x)),r=Math.max(0,Math.min(t.y+t.height,a.y+a.height)-Math.max(t.y,a.y));return Math.ceil(l*r)},cg=t=>bn(t.width)&&bn(t.height)&&bn(t.x)&&bn(t.y),bn=t=>!isNaN(t)&&isFinite(t),Q_=(t,a)=>{},Kl=(t,a=[1,1])=>({x:a[0]*Math.round(t.x/a[0]),y:a[1]*Math.round(t.y/a[1])}),Fl=({x:t,y:a},[l,r,s],c=!1,u=[1,1])=>{const d={x:(t-l)/s,y:(a-r)/s};return c?Kl(d,u):d},Ro=({x:t,y:a},[l,r,s])=>({x:t*s+l,y:a*s+r});function Ba(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 I_(t,a,l){if(typeof t=="string"||typeof t=="number"){const r=Ba(t,l),s=Ba(t,a);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof t=="object"){const r=Ba(t.top??t.y??0,l),s=Ba(t.bottom??t.y??0,l),c=Ba(t.left??t.x??0,a),u=Ba(t.right??t.x??0,a);return{top:r,right:u,bottom:s,left:c,x:c+u,y:r+s}}return{top:0,right:0,bottom:0,left:0,x:0,y:0}}function $_(t,a,l,r,s,c){const{x:u,y:d}=Ro(t,[a,l,r]),{x:h,y:m}=Ro({x:t.x+t.width,y:t.y+t.height},[a,l,r]),p=s-h,y=c-m;return{left:Math.floor(u),top:Math.floor(d),right:Math.floor(p),bottom:Math.floor(y)}}const Do=(t,a,l,r,s,c)=>{const u=I_(c,a,l),d=(a-u.x)/t.width,h=(l-u.y)/t.height,m=Math.min(d,h),p=Ha(m,r,s),y=t.x+t.width/2,v=t.y+t.height/2,x=a/2-y*p,w=l/2-v*p,N=$_(t,x,w,p,a,l),S={left:Math.min(N.left-u.left,0),top:Math.min(N.top-u.top,0),right:Math.min(N.right-u.right,0),bottom:Math.min(N.bottom-u.bottom,0)};return{x:x-S.left+S.right,y:w-S.top+S.bottom,zoom:p}},Jl=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0;function qa(t){return t!=null&&t!=="parent"}function Zn(t){return{width:t.measured?.width??t.width??t.initialWidth??0,height:t.measured?.height??t.height??t.initialHeight??0}}function fg(t){return(t.measured?.width??t.width??t.initialWidth)!==void 0&&(t.measured?.height??t.height??t.initialHeight)!==void 0}function dg(t,a={width:0,height:0},l,r,s){const c={...t},u=r.get(l);if(u){const d=u.origin||s;c.x+=u.internals.positionAbsolute.x-(a.width??0)*d[0],c.y+=u.internals.positionAbsolute.y-(a.height??0)*d[1]}return c}function hg(t,a){if(t.size!==a.size)return!1;for(const l of t)if(!a.has(l))return!1;return!0}function K_(){let t,a;return{promise:new Promise((r,s)=>{t=r,a=s}),resolve:t,reject:a}}function F_(t){return{...Wm,...t||{}}}function Pl(t,{snapGrid:a=[0,0],snapToGrid:l=!1,transform:r,containerBounds:s}){const{x:c,y:u}=xn(t),d=Fl({x:c-(s?.left??0),y:u-(s?.top??0)},r),{x:h,y:m}=l?Kl(d,a):d;return{xSnapped:h,ySnapped:m,...d}}const nc=t=>({width:t.offsetWidth,height:t.offsetHeight}),mg=t=>t?.getRootNode?.()||window?.document,J_=["INPUT","SELECT","TEXTAREA"];function gg(t){const a=t.composedPath?.()?.[0]||t.target;return a?.nodeType!==1?!1:J_.includes(a.nodeName)||a.hasAttribute("contenteditable")||!!a.closest(".nokey")}const pg=t=>"clientX"in t,xn=(t,a)=>{const l=pg(t),r=l?t.clientX:t.touches?.[0].clientX,s=l?t.clientY:t.touches?.[0].clientY;return{x:r-(a?.left??0),y:s-(a?.top??0)}},yg=(t,a,l,r,s)=>{const c=a.querySelectorAll(`.${t}`);return!c||!c.length?null:Array.from(c).map(u=>{const d=u.getBoundingClientRect();return{id:u.getAttribute("data-handleid"),type:t,nodeId:s,position:u.getAttribute("data-handlepos"),x:(d.left-l.left)/r,y:(d.top-l.top)/r,...nc(u)}})};function vg({sourceX:t,sourceY:a,targetX:l,targetY:r,sourceControlX:s,sourceControlY:c,targetControlX:u,targetControlY:d}){const h=t*.125+s*.375+u*.375+l*.125,m=a*.125+c*.375+d*.375+r*.125,p=Math.abs(h-t),y=Math.abs(m-a);return[h,m,p,y]}function ko(t,a){return t>=0?.5*t:a*25*Math.sqrt(-t)}function bg({pos:t,x1:a,y1:l,x2:r,y2:s,c}){switch(t){case ye.Left:return[a-ko(a-r,c),l];case ye.Right:return[a+ko(r-a,c),l];case ye.Top:return[a,l-ko(l-s,c)];case ye.Bottom:return[a,l+ko(s-l,c)]}}function ic({sourceX:t,sourceY:a,sourcePosition:l=ye.Bottom,targetX:r,targetY:s,targetPosition:c=ye.Top,curvature:u=.25}){const[d,h]=bg({pos:l,x1:t,y1:a,x2:r,y2:s,c:u}),[m,p]=bg({pos:c,x1:r,y1:s,x2:t,y2:a,c:u}),[y,v,x,w]=vg({sourceX:t,sourceY:a,targetX:r,targetY:s,sourceControlX:d,sourceControlY:h,targetControlX:m,targetControlY:p});return[`M${t},${a} C${d},${h} ${m},${p} ${r},${s}`,y,v,x,w]}function xg({sourceX:t,sourceY:a,targetX:l,targetY:r}){const s=Math.abs(l-t)/2,c=l<t?l+s:l-s,u=Math.abs(r-a)/2,d=r<a?r+u:r-u;return[c,d,s,u]}function P_({sourceNode:t,targetNode:a,selected:l=!1,zIndex:r=0,elevateOnSelect:s=!1,zIndexMode:c="basic"}){if(c==="manual")return r;const u=s&&l?r+1e3:r,d=Math.max(t.parentId||s&&t.selected?t.internals.z:0,a.parentId||s&&a.selected?a.internals.z:0);return u+d}function W_({sourceNode:t,targetNode:a,width:l,height:r,transform:s}){const c=zo(jo(t),jo(a));c.x===c.x2&&(c.x2+=1),c.y===c.y2&&(c.y2+=1);const u={x:-s[0]/s[2],y:-s[1]/s[2],width:l/s[2],height:r/s[2]};return $l(u,Oo(c))>0}const e2=({source:t,sourceHandle:a,target:l,targetHandle:r})=>`xy-edge__${t}${a||""}-${l}${r||""}`,t2=(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)),n2=(t,a,l={})=>{if(!t.source||!t.target)return a;const r=l.getEdgeId||e2;let s;return ig(t)?s={...t}:s={...t,id:r(t)},t2(s,a)?a:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,a.concat(s))};function wg({sourceX:t,sourceY:a,targetX:l,targetY:r}){const[s,c,u,d]=xg({sourceX:t,sourceY:a,targetX:l,targetY:r});return[`M ${t},${a}L ${l},${r}`,s,c,u,d]}const Sg={[ye.Left]:{x:-1,y:0},[ye.Right]:{x:1,y:0},[ye.Top]:{x:0,y:-1},[ye.Bottom]:{x:0,y:1}},i2=({source:t,sourcePosition:a=ye.Bottom,target:l})=>a===ye.Left||a===ye.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},Eg=(t,a)=>Math.sqrt(Math.pow(a.x-t.x,2)+Math.pow(a.y-t.y,2));function a2({source:t,sourcePosition:a=ye.Bottom,target:l,targetPosition:r=ye.Top,center:s,offset:c,stepPosition:u}){const d=Sg[a],h=Sg[r],m={x:t.x+d.x*c,y:t.y+d.y*c},p={x:l.x+h.x*c,y:l.y+h.y*c},y=i2({source:m,sourcePosition:a,target:p}),v=y.x!==0?"x":"y",x=y[v];let w=[],N,S;const M={x:0,y:0},z={x:0,y:0},[,,E,T]=xg({sourceX:t.x,sourceY:t.y,targetX:l.x,targetY:l.y});if(d[v]*h[v]===-1){v==="x"?(N=s.x??m.x+(p.x-m.x)*u,S=s.y??(m.y+p.y)/2):(N=s.x??(m.x+p.x)/2,S=s.y??m.y+(p.y-m.y)*u);const R=[{x:N,y:m.y},{x:N,y:p.y}],O=[{x:m.x,y:S},{x:p.x,y:S}];d[v]===x?w=v==="x"?R:O:w=v==="x"?O:R}else{const R=[{x:m.x,y:p.y}],O=[{x:p.x,y:m.y}];if(v==="x"?w=d.x===x?O:R:w=d.y===x?R:O,a===r){const V=Math.abs(t[v]-l[v]);if(V<=c){const W=Math.min(c-1,c-V);d[v]===x?M[v]=(m[v]>t[v]?-1:1)*W:z[v]=(p[v]>l[v]?-1:1)*W}}if(a!==r){const V=v==="x"?"y":"x",W=d[v]===h[V],H=m[V]>p[V],I=m[V]<p[V];(d[v]===1&&(!W&&H||W&&I)||d[v]!==1&&(!W&&I||W&&H))&&(w=v==="x"?R:O)}const C={x:m.x+M.x,y:m.y+M.y},D={x:p.x+z.x,y:p.y+z.y},Z=Math.max(Math.abs(C.x-w[0].x),Math.abs(D.x-w[0].x)),B=Math.max(Math.abs(C.y-w[0].y),Math.abs(D.y-w[0].y));Z>=B?(N=(C.x+D.x)/2,S=w[0].y):(N=w[0].x,S=(C.y+D.y)/2)}return[[t,{x:m.x+M.x,y:m.y+M.y},...w,{x:p.x+z.x,y:p.y+z.y},l],N,S,E,T]}function l2(t,a,l,r){const s=Math.min(Eg(t,a)/2,Eg(a,l)/2,r),{x:c,y:u}=a;if(t.x===c&&c===l.x||t.y===u&&u===l.y)return`L${c} ${u}`;if(t.y===u){const m=t.x<l.x?-1:1,p=t.y<l.y?1:-1;return`L ${c+s*m},${u}Q ${c},${u} ${c},${u+s*p}`}const d=t.x<l.x?1:-1,h=t.y<l.y?-1:1;return`L ${c},${u+s*h}Q ${c},${u} ${c+s*d},${u}`}function Ho({sourceX:t,sourceY:a,sourcePosition:l=ye.Bottom,targetX:r,targetY:s,targetPosition:c=ye.Top,borderRadius:u=5,centerX:d,centerY:h,offset:m=20,stepPosition:p=.5}){const[y,v,x,w,N]=a2({source:{x:t,y:a},sourcePosition:l,target:{x:r,y:s},targetPosition:c,center:{x:d,y:h},offset:m,stepPosition:p});return[y.reduce((M,z,E)=>{let T="";return E>0&&E<y.length-1?T=l2(y[E-1],z,y[E+1],u):T=`${E===0?"M":"L"}${z.x} ${z.y}`,M+=T,M},""),v,x,w,N]}function _g(t){return t&&!!(t.internals.handleBounds||t.handles?.length)&&!!(t.measured.width||t.width||t.initialWidth)}function r2(t){const{sourceNode:a,targetNode:l}=t;if(!_g(a)||!_g(l))return null;const r=a.internals.handleBounds||Ng(a.handles),s=l.internals.handleBounds||Ng(l.handles),c=Cg(r?.source??[],t.sourceHandle),u=Cg(t.connectionMode===la.Strict?s?.target??[]:(s?.target??[]).concat(s?.source??[]),t.targetHandle);if(!c||!u)return t.onError?.("008",jn.error008(c?"target":"source",{id:t.id,sourceHandle:t.sourceHandle,targetHandle:t.targetHandle})),null;const d=c?.position||ye.Bottom,h=u?.position||ye.Top,m=sa(a,c,d),p=sa(l,u,h);return{sourceX:m.x,sourceY:m.y,targetX:p.x,targetY:p.y,sourcePosition:d,targetPosition:h}}function Ng(t){if(!t)return null;const a=[],l=[];for(const r of t)r.width=r.width??1,r.height=r.height??1,r.type==="source"?a.push(r):r.type==="target"&&l.push(r);return{source:a,target:l}}function sa(t,a,l=ye.Left,r=!1){const s=(a?.x??0)+t.internals.positionAbsolute.x,c=(a?.y??0)+t.internals.positionAbsolute.y,{width:u,height:d}=a??Zn(t);if(r)return{x:s+u/2,y:c+d/2};switch(a?.position??l){case ye.Top:return{x:s+u/2,y:c};case ye.Right:return{x:s+u,y:c+d/2};case ye.Bottom:return{x:s+u/2,y:c+d};case ye.Left:return{x:s,y:c+d/2}}}function Cg(t,a){return t&&(a?t.find(l=>l.id===a):t[0])||null}function ac(t,a){return t?typeof t=="string"?t:`${a?`${a}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`:""}function o2(t,{id:a,defaultColor:l,defaultMarkerStart:r,defaultMarkerEnd:s}){const c=new Set;return t.reduce((u,d)=>([d.markerStart||r,d.markerEnd||s].forEach(h=>{if(h&&typeof h=="object"){const m=ac(h,a);c.has(m)||(u.push({id:m,color:h.color||l,...h}),c.add(m))}}),u),[]).sort((u,d)=>u.id.localeCompare(d.id))}const Mg=1e3,s2=10,lc={nodeOrigin:[0,0],nodeExtent:Zl,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},u2={...lc,checkEquality:!0};function rc(t,a){const l={...t};for(const r in a)a[r]!==void 0&&(l[r]=a[r]);return l}function c2(t,a,l){const r=rc(lc,l);for(const s of t.values())if(s.parentId)uc(s,t,a,r);else{const c=Ql(s,r.nodeOrigin),u=qa(s.extent)?s.extent:r.nodeExtent,d=oa(c,u,Zn(s));s.internals.positionAbsolute=d}}function f2(t,a){if(!t.handles)return t.measured?a?.internals.handleBounds:void 0;const l=[],r=[];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"&&r.push(c)}return{source:l,target:r}}function oc(t){return t==="manual"}function sc(t,a,l,r={}){const s=rc(u2,r),c={i:0},u=new Map(a),d=s?.elevateNodesOnSelect&&!oc(s.zIndexMode)?Mg:0;let h=t.length>0;a.clear(),l.clear();for(const m of t){let p=u.get(m.id);if(s.checkEquality&&m===p?.internals.userNode)a.set(m.id,p);else{const y=Ql(m,s.nodeOrigin),v=qa(m.extent)?m.extent:s.nodeExtent,x=oa(y,v,Zn(m));p={...s.defaults,...m,measured:{width:m.measured?.width,height:m.measured?.height},internals:{positionAbsolute:x,handleBounds:f2(m,p),z:Tg(m,d,s.zIndexMode),userNode:m}},a.set(m.id,p)}(p.measured===void 0||p.measured.width===void 0||p.measured.height===void 0)&&!p.hidden&&(h=!1),m.parentId&&uc(p,a,l,r,c)}return h}function d2(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 uc(t,a,l,r,s){const{elevateNodesOnSelect:c,nodeOrigin:u,nodeExtent:d,zIndexMode:h}=rc(lc,r),m=t.parentId,p=a.get(m);if(!p){console.warn(`Parent node ${m} not found. Please make sure that parent nodes are in front of their child nodes in the nodes array.`);return}d2(t,l),s&&!p.parentId&&p.internals.rootParentIndex===void 0&&h==="auto"&&(p.internals.rootParentIndex=++s.i,p.internals.z=p.internals.z+s.i*s2),s&&p.internals.rootParentIndex!==void 0&&(s.i=p.internals.rootParentIndex);const y=c&&!oc(h)?Mg:0,{x:v,y:x,z:w}=h2(t,p,u,d,y,h),{positionAbsolute:N}=t.internals,S=v!==N.x||x!==N.y;(S||w!==t.internals.z)&&a.set(t.id,{...t,internals:{...t.internals,positionAbsolute:S?{x:v,y:x}:N,z:w}})}function Tg(t,a,l){const r=bn(t.zIndex)?t.zIndex:0;return oc(l)?r:r+(t.selected?a:0)}function h2(t,a,l,r,s,c){const{x:u,y:d}=a.internals.positionAbsolute,h=Zn(t),m=Ql(t,l),p=qa(t.extent)?oa(m,t.extent,h):m;let y=oa({x:u+p.x,y:d+p.y},r,h);t.extent==="parent"&&(y=rg(y,h,a));const v=Tg(t,s,c),x=a.internals.z??0;return{x:y.x,y:y.y,z:x>=v?x+1:v}}function cc(t,a,l,r=[0,0]){const s=[],c=new Map;for(const u of t){const d=a.get(u.parentId);if(!d)continue;const h=c.get(u.parentId)?.expandedRect??La(d),m=ug(h,u.rect);c.set(u.parentId,{expandedRect:m,parent:d})}return c.size>0&&c.forEach(({expandedRect:u,parent:d},h)=>{const m=d.internals.positionAbsolute,p=Zn(d),y=d.origin??r,v=u.x<m.x?Math.round(Math.abs(m.x-u.x)):0,x=u.y<m.y?Math.round(Math.abs(m.y-u.y)):0,w=Math.max(p.width,Math.round(u.width)),N=Math.max(p.height,Math.round(u.height)),S=(w-p.width)*y[0],M=(N-p.height)*y[1];(v>0||x>0||S||M)&&(s.push({id:h,type:"position",position:{x:d.position.x-v+S,y:d.position.y-x+M}}),l.get(h)?.forEach(z=>{t.some(E=>E.id===z.id)||s.push({id:z.id,type:"position",position:{x:z.position.x+v,y:z.position.y+x}})})),(p.width<u.width||p.height<u.height||v||x)&&s.push({id:h,type:"dimensions",setAttributes:!0,dimensions:{width:w+(v?y[0]*v-S:0),height:N+(x?y[1]*x-M:0)}})}),s}function m2(t,a,l,r,s,c,u){const d=r?.querySelector(".xyflow__viewport");let h=!1;if(!d)return{changes:[],updatedInternals:h};const m=[],p=window.getComputedStyle(d),{m22:y}=new window.DOMMatrixReadOnly(p.transform),v=[];for(const x of t.values()){const w=a.get(x.id);if(!w)continue;if(w.hidden){a.set(w.id,{...w,internals:{...w.internals,handleBounds:void 0}}),h=!0;continue}const N=nc(x.nodeElement),S=w.measured.width!==N.width||w.measured.height!==N.height;if(!!(N.width&&N.height&&(S||!w.internals.handleBounds||x.force))){const z=x.nodeElement.getBoundingClientRect(),E=qa(w.extent)?w.extent:c;let{positionAbsolute:T}=w.internals;w.parentId&&w.extent==="parent"?T=rg(T,N,a.get(w.parentId)):E&&(T=oa(T,E,N));const q={...w,measured:N,internals:{...w.internals,positionAbsolute:T,handleBounds:{source:yg("source",x.nodeElement,z,y,w.id),target:yg("target",x.nodeElement,z,y,w.id)}}};a.set(w.id,q),w.parentId&&uc(q,a,l,{nodeOrigin:s,zIndexMode:u}),h=!0,S&&(m.push({id:w.id,type:"dimensions",dimensions:N}),w.expandParent&&w.parentId&&v.push({id:w.id,parentId:w.parentId,rect:La(q,s)}))}}if(v.length>0){const x=cc(v,a,l,s);m.push(...x)}return{changes:m,updatedInternals:h}}async function g2({delta:t,panZoom:a,transform:l,translateExtent:r,width:s,height:c}){if(!a||!t.x&&!t.y)return Promise.resolve(!1);const u=await a.setViewportConstrained({x:l[0]+t.x,y:l[1]+t.y,zoom:l[2]},[[0,0],[s,c]],r),d=!!u&&(u.x!==l[0]||u.y!==l[1]||u.k!==l[2]);return Promise.resolve(d)}function Ag(t,a,l,r,s,c){let u=s;const d=r.get(u)||new Map;r.set(u,d.set(l,a)),u=`${s}-${t}`;const h=r.get(u)||new Map;if(r.set(u,h.set(l,a)),c){u=`${s}-${t}-${c}`;const m=r.get(u)||new Map;r.set(u,m.set(l,a))}}function zg(t,a,l){t.clear(),a.clear();for(const r of l){const{source:s,target:c,sourceHandle:u=null,targetHandle:d=null}=r,h={edgeId:r.id,source:s,target:c,sourceHandle:u,targetHandle:d},m=`${s}-${u}--${c}-${d}`,p=`${c}-${d}--${s}-${u}`;Ag("source",h,p,t,s,u),Ag("target",h,m,t,c,d),a.set(r.id,r)}}function Og(t,a){if(!t.parentId)return!1;const l=a.get(t.parentId);return l?l.selected?!0:Og(l,a):!1}function jg(t,a,l){let r=t;do{if(r?.matches?.(a))return!0;if(r===l)return!1;r=r?.parentElement}while(r);return!1}function p2(t,a,l,r){const s=new Map;for(const[c,u]of t)if((u.selected||u.id===r)&&(!u.parentId||!Og(u,t))&&(u.draggable||a&&typeof u.draggable>"u")){const d=t.get(c);d&&s.set(c,{id:c,position:d.position||{x:0,y:0},distance:{x:l.x-d.internals.positionAbsolute.x,y:l.y-d.internals.positionAbsolute.y},extent:d.extent,parentId:d.parentId,origin:d.origin,expandParent:d.expandParent,internals:{positionAbsolute:d.internals.positionAbsolute||{x:0,y:0}},measured:{width:d.measured.width??0,height:d.measured.height??0}})}return s}function fc({nodeId:t,dragItems:a,nodeLookup:l,dragging:r=!0}){const s=[];for(const[u,d]of a){const h=l.get(u)?.internals.userNode;h&&s.push({...h,position:d.position,dragging:r})}if(!t)return[s[0],s];const c=l.get(t)?.internals.userNode;return[c?{...c,position:a.get(t)?.position||c.position,dragging:r}:s[0],s]}function y2({dragItems:t,snapGrid:a,x:l,y:r}){const s=t.values().next().value;if(!s)return null;const c={x:l-s.distance.x,y:r-s.distance.y},u=Kl(c,a);return{x:u.x-c.x,y:u.y-c.y}}function v2({onNodeMouseDown:t,getStoreItems:a,onDragStart:l,onDrag:r,onDragStop:s}){let c={x:null,y:null},u=0,d=new Map,h=!1,m={x:0,y:0},p=null,y=!1,v=null,x=!1,w=!1,N=null;function S({noDragClassName:z,handleSelector:E,domNode:T,isSelectable:q,nodeId:R,nodeClickDistance:O=0}){v=$t(T);function C({x:V,y:W}){const{nodeLookup:H,nodeExtent:I,snapGrid:j,snapToGrid:G,nodeOrigin:U,onNodeDrag:P,onSelectionDrag:re,onError:k,updateNodePositions:Q}=a();c={x:V,y:W};let L=!1;const Y=d.size>1,F=Y&&I?tc(Il(d)):null,ne=Y&&G?y2({dragItems:d,snapGrid:j,x:V,y:W}):null;for(const[ae,oe]of d){if(!H.has(ae))continue;let fe={x:V-oe.distance.x,y:W-oe.distance.y};G&&(fe=ne?{x:Math.round(fe.x+ne.x),y:Math.round(fe.y+ne.y)}:Kl(fe,j));let pe=null;if(Y&&I&&!oe.extent&&F){const{positionAbsolute:me}=oe.internals,Me=me.x-F.x+I[0][0],He=me.x+oe.measured.width-F.x2+I[1][0],Ge=me.y-F.y+I[0][1],dt=me.y+oe.measured.height-F.y2+I[1][1];pe=[[Me,Ge],[He,dt]]}const{position:Ee,positionAbsolute:ge}=lg({nodeId:ae,nextPosition:fe,nodeLookup:H,nodeExtent:pe||I,nodeOrigin:U,onError:k});L=L||oe.position.x!==Ee.x||oe.position.y!==Ee.y,oe.position=Ee,oe.internals.positionAbsolute=ge}if(w=w||L,!!L&&(Q(d,!0),N&&(r||P||!R&&re))){const[ae,oe]=fc({nodeId:R,dragItems:d,nodeLookup:H});r?.(N,d,ae,oe),P?.(N,ae,oe),R||re?.(N,oe)}}async function D(){if(!p)return;const{transform:V,panBy:W,autoPanSpeed:H,autoPanOnNodeDrag:I}=a();if(!I){h=!1,cancelAnimationFrame(u);return}const[j,G]=sg(m,p,H);(j!==0||G!==0)&&(c.x=(c.x??0)-j/V[2],c.y=(c.y??0)-G/V[2],await W({x:j,y:G})&&C(c)),u=requestAnimationFrame(D)}function Z(V){const{nodeLookup:W,multiSelectionActive:H,nodesDraggable:I,transform:j,snapGrid:G,snapToGrid:U,selectNodesOnDrag:P,onNodeDragStart:re,onSelectionDragStart:k,unselectNodesAndEdges:Q}=a();y=!0,(!P||!q)&&!H&&R&&(W.get(R)?.selected||Q()),q&&P&&R&&t?.(R);const L=Pl(V.sourceEvent,{transform:j,snapGrid:G,snapToGrid:U,containerBounds:p});if(c=L,d=p2(W,I,L,R),d.size>0&&(l||re||!R&&k)){const[Y,F]=fc({nodeId:R,dragItems:d,nodeLookup:W});l?.(V.sourceEvent,d,Y,F),re?.(V.sourceEvent,Y,F),R||k?.(V.sourceEvent,F)}}const B=wm().clickDistance(O).on("start",V=>{const{domNode:W,nodeDragThreshold:H,transform:I,snapGrid:j,snapToGrid:G}=a();p=W?.getBoundingClientRect()||null,x=!1,w=!1,N=V.sourceEvent,H===0&&Z(V),c=Pl(V.sourceEvent,{transform:I,snapGrid:j,snapToGrid:G,containerBounds:p}),m=xn(V.sourceEvent,p)}).on("drag",V=>{const{autoPanOnNodeDrag:W,transform:H,snapGrid:I,snapToGrid:j,nodeDragThreshold:G,nodeLookup:U}=a(),P=Pl(V.sourceEvent,{transform:H,snapGrid:I,snapToGrid:j,containerBounds:p});if(N=V.sourceEvent,(V.sourceEvent.type==="touchmove"&&V.sourceEvent.touches.length>1||R&&!U.has(R))&&(x=!0),!x){if(!h&&W&&y&&(h=!0,D()),!y){const re=xn(V.sourceEvent,p),k=re.x-m.x,Q=re.y-m.y;Math.sqrt(k*k+Q*Q)>G&&Z(V)}(c.x!==P.xSnapped||c.y!==P.ySnapped)&&d&&y&&(m=xn(V.sourceEvent,p),C(P))}}).on("end",V=>{if(!(!y||x)&&(h=!1,y=!1,cancelAnimationFrame(u),d.size>0)){const{nodeLookup:W,updateNodePositions:H,onNodeDragStop:I,onSelectionDragStop:j}=a();if(w&&(H(d,!1),w=!1),s||I||!R&&j){const[G,U]=fc({nodeId:R,dragItems:d,nodeLookup:W,dragging:!1});s?.(V.sourceEvent,d,G,U),I?.(V.sourceEvent,G,U),R||j?.(V.sourceEvent,U)}}}).filter(V=>{const W=V.target;return!V.button&&(!z||!jg(W,`.${z}`,T))&&(!E||jg(W,E,T))});v.call(B)}function M(){v?.on(".drag",null)}return{update:S,destroy:M}}function b2(t,a,l){const r=[],s={x:t.x-l,y:t.y-l,width:l*2,height:l*2};for(const c of a.values())$l(s,La(c))>0&&r.push(c);return r}const x2=250;function w2(t,a,l,r){let s=[],c=1/0;const u=b2(t,l,a+x2);for(const d of u){const h=[...d.internals.handleBounds?.source??[],...d.internals.handleBounds?.target??[]];for(const m of h){if(r.nodeId===m.nodeId&&r.type===m.type&&r.id===m.id)continue;const{x:p,y}=sa(d,m,m.position,!0),v=Math.sqrt(Math.pow(p-t.x,2)+Math.pow(y-t.y,2));v>a||(v<c?(s=[{...m,x:p,y}],c=v):v===c&&s.push({...m,x:p,y}))}}if(!s.length)return null;if(s.length>1){const d=r.type==="source"?"target":"source";return s.find(h=>h.type===d)??s[0]}return s[0]}function Rg(t,a,l,r,s,c=!1){const u=r.get(t);if(!u)return null;const d=s==="strict"?u.internals.handleBounds?.[a]:[...u.internals.handleBounds?.source??[],...u.internals.handleBounds?.target??[]],h=(l?d?.find(m=>m.id===l):d?.[0])??null;return h&&c?{...h,...sa(u,h,h.position,!0)}:h}function Dg(t,a){return t||(a?.classList.contains("target")?"target":a?.classList.contains("source")?"source":null)}function S2(t,a){let l=null;return a?l=!0:t&&!a&&(l=!1),l}const kg=()=>!0;function E2(t,{connectionMode:a,connectionRadius:l,handleId:r,nodeId:s,edgeUpdaterType:c,isTarget:u,domNode:d,nodeLookup:h,lib:m,autoPanOnConnect:p,flowId:y,panBy:v,cancelConnection:x,onConnectStart:w,onConnect:N,onConnectEnd:S,isValidConnection:M=kg,onReconnectEnd:z,updateConnection:E,getTransform:T,getFromHandle:q,autoPanSpeed:R,dragThreshold:O=1,handleDomNode:C}){const D=mg(t.target);let Z=0,B;const{x:V,y:W}=xn(t),H=Dg(c,C),I=d?.getBoundingClientRect();let j=!1;if(!I||!H)return;const G=Rg(s,H,r,h,a);if(!G)return;let U=xn(t,I),P=!1,re=null,k=!1,Q=null;function L(){if(!p||!I)return;const[Ee,ge]=sg(U,I,R);v({x:Ee,y:ge}),Z=requestAnimationFrame(L)}const Y={...G,nodeId:s,type:H,position:G.position},F=h.get(s);let ae={inProgress:!0,isValid:null,from:sa(F,Y,ye.Left,!0),fromHandle:Y,fromPosition:Y.position,fromNode:F,to:U,toHandle:null,toPosition:tg[Y.position],toNode:null,pointer:U};function oe(){j=!0,E(ae),w?.(t,{nodeId:s,handleId:r,handleType:H})}O===0&&oe();function fe(Ee){if(!j){const{x:dt,y:Bt}=xn(Ee),Dt=dt-V,Ft=Bt-W;if(!(Dt*Dt+Ft*Ft>O*O))return;oe()}if(!q()||!Y){pe(Ee);return}const ge=T();U=xn(Ee,I),B=w2(Fl(U,ge,!1,[1,1]),l,h,Y),P||(L(),P=!0);const me=Hg(Ee,{handle:B,connectionMode:a,fromNodeId:s,fromHandleId:r,fromType:u?"target":"source",isValidConnection:M,doc:D,lib:m,flowId:y,nodeLookup:h});Q=me.handleDomNode,re=me.connection,k=S2(!!B,me.isValid);const Me=h.get(s),He=Me?sa(Me,Y,ye.Left,!0):ae.from,Ge={...ae,from:He,isValid:k,to:me.toHandle&&k?Ro({x:me.toHandle.x,y:me.toHandle.y},ge):U,toHandle:me.toHandle,toPosition:k&&me.toHandle?me.toHandle.position:tg[Y.position],toNode:me.toHandle?h.get(me.toHandle.nodeId):null,pointer:U};E(Ge),ae=Ge}function pe(Ee){if(!("touches"in Ee&&Ee.touches.length>0)){if(j){(B||Q)&&re&&k&&N?.(re);const{inProgress:ge,...me}=ae,Me={...me,toPosition:ae.toHandle?ae.toPosition:null};S?.(Ee,Me),c&&z?.(Ee,Me)}x(),cancelAnimationFrame(Z),P=!1,k=!1,re=null,Q=null,D.removeEventListener("mousemove",fe),D.removeEventListener("mouseup",pe),D.removeEventListener("touchmove",fe),D.removeEventListener("touchend",pe)}}D.addEventListener("mousemove",fe),D.addEventListener("mouseup",pe),D.addEventListener("touchmove",fe),D.addEventListener("touchend",pe)}function Hg(t,{handle:a,connectionMode:l,fromNodeId:r,fromHandleId:s,fromType:c,doc:u,lib:d,flowId:h,isValidConnection:m=kg,nodeLookup:p}){const y=c==="target",v=a?u.querySelector(`.${d}-flow__handle[data-id="${h}-${a?.nodeId}-${a?.id}-${a?.type}"]`):null,{x,y:w}=xn(t),N=u.elementFromPoint(x,w),S=N?.classList.contains(`${d}-flow__handle`)?N:v,M={handleDomNode:S,isValid:!1,connection:null,toHandle:null};if(S){const z=Dg(void 0,S),E=S.getAttribute("data-nodeid"),T=S.getAttribute("data-handleid"),q=S.classList.contains("connectable"),R=S.classList.contains("connectableend");if(!E||!z)return M;const O={source:y?E:r,sourceHandle:y?T:s,target:y?r:E,targetHandle:y?s:T};M.connection=O;const D=q&&R&&(l===la.Strict?y&&z==="source"||!y&&z==="target":E!==r||T!==s);M.isValid=D&&m(O),M.toHandle=Rg(E,z,T,p,l,!0)}return M}const dc={onPointerDown:E2,isValid:Hg};function _2({domNode:t,panZoom:a,getTransform:l,getViewScale:r}){const s=$t(t);function c({translateExtent:d,width:h,height:m,zoomStep:p=1,pannable:y=!0,zoomable:v=!0,inversePan:x=!1}){const w=E=>{if(E.sourceEvent.type!=="wheel"||!a)return;const T=l(),q=E.sourceEvent.ctrlKey&&Jl()?10:1,R=-E.sourceEvent.deltaY*(E.sourceEvent.deltaMode===1?.05:E.sourceEvent.deltaMode?1:.002)*p,O=T[2]*Math.pow(2,R*q);a.scaleTo(O)};let N=[0,0];const S=E=>{(E.sourceEvent.type==="mousedown"||E.sourceEvent.type==="touchstart")&&(N=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY])},M=E=>{const T=l();if(E.sourceEvent.type!=="mousemove"&&E.sourceEvent.type!=="touchmove"||!a)return;const q=[E.sourceEvent.clientX??E.sourceEvent.touches[0].clientX,E.sourceEvent.clientY??E.sourceEvent.touches[0].clientY],R=[q[0]-N[0],q[1]-N[1]];N=q;const O=r()*Math.max(T[2],Math.log(T[2]))*(x?-1:1),C={x:T[0]-R[0]*O,y:T[1]-R[1]*O},D=[[0,0],[h,m]];a.setViewportConstrained({x:C.x,y:C.y,zoom:T[2]},D,d)},z=Jm().on("start",S).on("zoom",y?M:null).on("zoom.wheel",v?w:null);s.call(z,{})}function u(){s.on("zoom",null)}return{update:c,destroy:u,pointer:pn}}const Lo=t=>({x:t.x,y:t.y,zoom:t.k}),hc=({x:t,y:a,zoom:l})=>To.translate(t,a).scale(l),Ua=(t,a)=>t.target.closest(`.${a}`),Lg=(t,a)=>a===2&&Array.isArray(t)&&t.includes(2),N2=t=>((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2,mc=(t,a=0,l=N2,r=()=>{})=>{const s=typeof a=="number"&&a>0;return s||r(),s?t.transition().duration(a).ease(l).on("end",r):t},Bg=t=>{const a=t.ctrlKey&&Jl()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*a};function C2({zoomPanValues:t,noWheelClassName:a,d3Selection:l,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:c,zoomOnPinch:u,onPanZoomStart:d,onPanZoom:h,onPanZoomEnd:m}){return p=>{if(Ua(p,a))return p.ctrlKey&&p.preventDefault(),!1;p.preventDefault(),p.stopImmediatePropagation();const y=l.property("__zoom").k||1;if(p.ctrlKey&&u){const S=pn(p),M=Bg(p),z=y*Math.pow(2,M);r.scaleTo(l,z,S,p);return}const v=p.deltaMode===1?20:1;let x=s===ra.Vertical?0:p.deltaX*v,w=s===ra.Horizontal?0:p.deltaY*v;!Jl()&&p.shiftKey&&s!==ra.Vertical&&(x=p.deltaY*v,w=0),r.translateBy(l,-(x/y)*c,-(w/y)*c,{internal:!0});const N=Lo(l.property("__zoom"));clearTimeout(t.panScrollTimeout),t.isPanScrolling?(h?.(p,N),t.panScrollTimeout=setTimeout(()=>{m?.(p,N),t.isPanScrolling=!1},150)):(t.isPanScrolling=!0,d?.(p,N))}}function M2({noWheelClassName:t,preventScrolling:a,d3ZoomHandler:l}){return function(r,s){const c=r.type==="wheel",u=!a&&c&&!r.ctrlKey,d=Ua(r,t);if(r.ctrlKey&&c&&d&&r.preventDefault(),u||d)return null;r.preventDefault(),l.call(this,r,s)}}function T2({zoomPanValues:t,onDraggingChange:a,onPanZoomStart:l}){return r=>{if(r.sourceEvent?.internal)return;const s=Lo(r.transform);t.mouseButton=r.sourceEvent?.button||0,t.isZoomingOrPanning=!0,t.prevViewport=s,r.sourceEvent?.type==="mousedown"&&a(!0),l&&l?.(r.sourceEvent,s)}}function A2({zoomPanValues:t,panOnDrag:a,onPaneContextMenu:l,onTransformChange:r,onPanZoom:s}){return c=>{t.usedRightMouseButton=!!(l&&Lg(a,t.mouseButton??0)),c.sourceEvent?.sync||r([c.transform.x,c.transform.y,c.transform.k]),s&&!c.sourceEvent?.internal&&s?.(c.sourceEvent,Lo(c.transform))}}function z2({zoomPanValues:t,panOnDrag:a,panOnScroll:l,onDraggingChange:r,onPanZoomEnd:s,onPaneContextMenu:c}){return u=>{if(!u.sourceEvent?.internal&&(t.isZoomingOrPanning=!1,c&&Lg(a,t.mouseButton??0)&&!t.usedRightMouseButton&&u.sourceEvent&&c(u.sourceEvent),t.usedRightMouseButton=!1,r(!1),s)){const d=Lo(u.transform);t.prevViewport=d,clearTimeout(t.timerId),t.timerId=setTimeout(()=>{s?.(u.sourceEvent,d)},l?150:0)}}}function O2({zoomActivationKeyPressed:t,zoomOnScroll:a,zoomOnPinch:l,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:c,userSelectionActive:u,noWheelClassName:d,noPanClassName:h,lib:m,connectionInProgress:p}){return y=>{const v=t||a,x=l&&y.ctrlKey,w=y.type==="wheel";if(y.button===1&&y.type==="mousedown"&&(Ua(y,`${m}-flow__node`)||Ua(y,`${m}-flow__edge`)))return!0;if(!r&&!v&&!s&&!c&&!l||u||p&&!w||Ua(y,d)&&w||Ua(y,h)&&(!w||s&&w&&!t)||!l&&y.ctrlKey&&w)return!1;if(!l&&y.type==="touchstart"&&y.touches?.length>1)return y.preventDefault(),!1;if(!v&&!s&&!x&&w||!r&&(y.type==="mousedown"||y.type==="touchstart")||Array.isArray(r)&&!r.includes(y.button)&&y.type==="mousedown")return!1;const N=Array.isArray(r)&&r.includes(y.button)||!y.button||y.button<=1;return(!y.ctrlKey||w)&&N}}function j2({domNode:t,minZoom:a,maxZoom:l,translateExtent:r,viewport:s,onPanZoom:c,onPanZoomStart:u,onPanZoomEnd:d,onDraggingChange:h}){const m={isZoomingOrPanning:!1,usedRightMouseButton:!1,prevViewport:{},mouseButton:0,timerId:void 0,panScrollTimeout:void 0,isPanScrolling:!1},p=t.getBoundingClientRect(),y=Jm().scaleExtent([a,l]).translateExtent(r),v=$t(t).call(y);z({x:s.x,y:s.y,zoom:Ha(s.zoom,a,l)},[[0,0],[p.width,p.height]],r);const x=v.on("wheel.zoom"),w=v.on("dblclick.zoom");y.wheelDelta(Bg);function N(B,V){return v?new Promise(W=>{y?.interpolate(V?.interpolate==="linear"?ql:vo).transform(mc(v,V?.duration,V?.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function S({noWheelClassName:B,noPanClassName:V,onPaneContextMenu:W,userSelectionActive:H,panOnScroll:I,panOnDrag:j,panOnScrollMode:G,panOnScrollSpeed:U,preventScrolling:P,zoomOnPinch:re,zoomOnScroll:k,zoomOnDoubleClick:Q,zoomActivationKeyPressed:L,lib:Y,onTransformChange:F,connectionInProgress:ne,paneClickDistance:ae,selectionOnDrag:oe}){H&&!m.isZoomingOrPanning&&M();const fe=I&&!L&&!H;y.clickDistance(oe?1/0:!bn(ae)||ae<0?0:ae);const pe=fe?C2({zoomPanValues:m,noWheelClassName:B,d3Selection:v,d3Zoom:y,panOnScrollMode:G,panOnScrollSpeed:U,zoomOnPinch:re,onPanZoomStart:u,onPanZoom:c,onPanZoomEnd:d}):M2({noWheelClassName:B,preventScrolling:P,d3ZoomHandler:x});if(v.on("wheel.zoom",pe,{passive:!1}),!H){const ge=T2({zoomPanValues:m,onDraggingChange:h,onPanZoomStart:u});y.on("start",ge);const me=A2({zoomPanValues:m,panOnDrag:j,onPaneContextMenu:!!W,onPanZoom:c,onTransformChange:F});y.on("zoom",me);const Me=z2({zoomPanValues:m,panOnDrag:j,panOnScroll:I,onPaneContextMenu:W,onPanZoomEnd:d,onDraggingChange:h});y.on("end",Me)}const Ee=O2({zoomActivationKeyPressed:L,panOnDrag:j,zoomOnScroll:k,panOnScroll:I,zoomOnDoubleClick:Q,zoomOnPinch:re,userSelectionActive:H,noPanClassName:V,noWheelClassName:B,lib:Y,connectionInProgress:ne});y.filter(Ee),Q?v.on("dblclick.zoom",w):v.on("dblclick.zoom",null)}function M(){y.on("zoom",null)}async function z(B,V,W){const H=hc(B),I=y?.constrain()(H,V,W);return I&&await N(I),new Promise(j=>j(I))}async function E(B,V){const W=hc(B);return await N(W,V),new Promise(H=>H(W))}function T(B){if(v){const V=hc(B),W=v.property("__zoom");(W.k!==B.zoom||W.x!==B.x||W.y!==B.y)&&y?.transform(v,V,null,{sync:!0})}}function q(){const B=v?Km(v.node()):{x:0,y:0,k:1};return{x:B.x,y:B.y,zoom:B.k}}function R(B,V){return v?new Promise(W=>{y?.interpolate(V?.interpolate==="linear"?ql:vo).scaleTo(mc(v,V?.duration,V?.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function O(B,V){return v?new Promise(W=>{y?.interpolate(V?.interpolate==="linear"?ql:vo).scaleBy(mc(v,V?.duration,V?.ease,()=>W(!0)),B)}):Promise.resolve(!1)}function C(B){y?.scaleExtent(B)}function D(B){y?.translateExtent(B)}function Z(B){const V=!bn(B)||B<0?0:B;y?.clickDistance(V)}return{update:S,destroy:M,setViewport:E,setViewportConstrained:z,getViewport:q,scaleTo:R,scaleBy:O,setScaleExtent:C,setTranslateExtent:D,syncViewport:T,setClickDistance:Z}}var Va;(function(t){t.Line="line",t.Handle="handle"})(Va||(Va={}));function R2({width:t,prevWidth:a,height:l,prevHeight:r,affectsX:s,affectsY:c}){const u=t-a,d=l-r,h=[u>0?1:u<0?-1:0,d>0?1:d<0?-1:0];return u&&s&&(h[0]=h[0]*-1),d&&c&&(h[1]=h[1]*-1),h}function qg(t){const a=t.includes("right")||t.includes("left"),l=t.includes("bottom")||t.includes("top"),r=t.includes("left"),s=t.includes("top");return{isHorizontal:a,isVertical:l,affectsX:r,affectsY:s}}function bi(t,a){return Math.max(0,a-t)}function xi(t,a){return Math.max(0,t-a)}function Bo(t,a,l){return Math.max(0,a-t,t-l)}function Ug(t,a){return t?!a:a}function D2(t,a,l,r,s,c,u,d){let{affectsX:h,affectsY:m}=a;const{isHorizontal:p,isVertical:y}=a,v=p&&y,{xSnapped:x,ySnapped:w}=l,{minWidth:N,maxWidth:S,minHeight:M,maxHeight:z}=r,{x:E,y:T,width:q,height:R,aspectRatio:O}=t;let C=Math.floor(p?x-t.pointerX:0),D=Math.floor(y?w-t.pointerY:0);const Z=q+(h?-C:C),B=R+(m?-D:D),V=-c[0]*q,W=-c[1]*R;let H=Bo(Z,N,S),I=Bo(B,M,z);if(u){let U=0,P=0;h&&C<0?U=bi(E+C+V,u[0][0]):!h&&C>0&&(U=xi(E+Z+V,u[1][0])),m&&D<0?P=bi(T+D+W,u[0][1]):!m&&D>0&&(P=xi(T+B+W,u[1][1])),H=Math.max(H,U),I=Math.max(I,P)}if(d){let U=0,P=0;h&&C>0?U=xi(E+C,d[0][0]):!h&&C<0&&(U=bi(E+Z,d[1][0])),m&&D>0?P=xi(T+D,d[0][1]):!m&&D<0&&(P=bi(T+B,d[1][1])),H=Math.max(H,U),I=Math.max(I,P)}if(s){if(p){const U=Bo(Z/O,M,z)*O;if(H=Math.max(H,U),u){let P=0;!h&&!m||h&&!m&&v?P=xi(T+W+Z/O,u[1][1])*O:P=bi(T+W+(h?C:-C)/O,u[0][1])*O,H=Math.max(H,P)}if(d){let P=0;!h&&!m||h&&!m&&v?P=bi(T+Z/O,d[1][1])*O:P=xi(T+(h?C:-C)/O,d[0][1])*O,H=Math.max(H,P)}}if(y){const U=Bo(B*O,N,S)/O;if(I=Math.max(I,U),u){let P=0;!h&&!m||m&&!h&&v?P=xi(E+B*O+V,u[1][0])/O:P=bi(E+(m?D:-D)*O+V,u[0][0])/O,I=Math.max(I,P)}if(d){let P=0;!h&&!m||m&&!h&&v?P=bi(E+B*O,d[1][0])/O:P=xi(E+(m?D:-D)*O,d[0][0])/O,I=Math.max(I,P)}}}D=D+(D<0?I:-I),C=C+(C<0?H:-H),s&&(v?Z>B*O?D=(Ug(h,m)?-C:C)/O:C=(Ug(h,m)?-D:D)*O:p?(D=C/O,m=h):(C=D*O,h=m));const j=h?E+C:E,G=m?T+D:T;return{width:q+(h?-C:C),height:R+(m?-D:D),x:c[0]*C*(h?-1:1)+j,y:c[1]*D*(m?-1:1)+G}}const Vg={width:0,height:0,x:0,y:0},k2={...Vg,pointerX:0,pointerY:0,aspectRatio:1};function H2(t){return[[0,0],[t.measured.width,t.measured.height]]}function L2(t,a,l){const r=a.position.x+t.position.x,s=a.position.y+t.position.y,c=t.measured.width??0,u=t.measured.height??0,d=l[0]*c,h=l[1]*u;return[[r-d,s-h],[r+c-d,s+u-h]]}function B2({domNode:t,nodeId:a,getStoreItems:l,onChange:r,onEnd:s}){const c=$t(t);let u={controlDirection:qg("bottom-right"),boundaries:{minWidth:0,minHeight:0,maxWidth:Number.MAX_VALUE,maxHeight:Number.MAX_VALUE},resizeDirection:void 0,keepAspectRatio:!1};function d({controlPosition:m,boundaries:p,keepAspectRatio:y,resizeDirection:v,onResizeStart:x,onResize:w,onResizeEnd:N,shouldResize:S}){let M={...Vg},z={...k2};u={boundaries:p,resizeDirection:v,keepAspectRatio:y,controlDirection:qg(m)};let E,T=null,q=[],R,O,C,D=!1;const Z=wm().on("start",B=>{const{nodeLookup:V,transform:W,snapGrid:H,snapToGrid:I,nodeOrigin:j,paneDomNode:G}=l();if(E=V.get(a),!E)return;T=G?.getBoundingClientRect()??null;const{xSnapped:U,ySnapped:P}=Pl(B.sourceEvent,{transform:W,snapGrid:H,snapToGrid:I,containerBounds:T});M={width:E.measured.width??0,height:E.measured.height??0,x:E.position.x??0,y:E.position.y??0},z={...M,pointerX:U,pointerY:P,aspectRatio:M.width/M.height},R=void 0,E.parentId&&(E.extent==="parent"||E.expandParent)&&(R=V.get(E.parentId),O=R&&E.extent==="parent"?H2(R):void 0),q=[],C=void 0;for(const[re,k]of V)if(k.parentId===a&&(q.push({id:re,position:{...k.position},extent:k.extent}),k.extent==="parent"||k.expandParent)){const Q=L2(k,E,k.origin??j);C?C=[[Math.min(Q[0][0],C[0][0]),Math.min(Q[0][1],C[0][1])],[Math.max(Q[1][0],C[1][0]),Math.max(Q[1][1],C[1][1])]]:C=Q}x?.(B,{...M})}).on("drag",B=>{const{transform:V,snapGrid:W,snapToGrid:H,nodeOrigin:I}=l(),j=Pl(B.sourceEvent,{transform:V,snapGrid:W,snapToGrid:H,containerBounds:T}),G=[];if(!E)return;const{x:U,y:P,width:re,height:k}=M,Q={},L=E.origin??I,{width:Y,height:F,x:ne,y:ae}=D2(z,u.controlDirection,j,u.boundaries,u.keepAspectRatio,L,O,C),oe=Y!==re,fe=F!==k,pe=ne!==U&&oe,Ee=ae!==P&&fe;if(!pe&&!Ee&&!oe&&!fe)return;if((pe||Ee||L[0]===1||L[1]===1)&&(Q.x=pe?ne:M.x,Q.y=Ee?ae:M.y,M.x=Q.x,M.y=Q.y,q.length>0)){const He=ne-U,Ge=ae-P;for(const dt of q)dt.position={x:dt.position.x-He+L[0]*(Y-re),y:dt.position.y-Ge+L[1]*(F-k)},G.push(dt)}if((oe||fe)&&(Q.width=oe&&(!u.resizeDirection||u.resizeDirection==="horizontal")?Y:M.width,Q.height=fe&&(!u.resizeDirection||u.resizeDirection==="vertical")?F:M.height,M.width=Q.width,M.height=Q.height),R&&E.expandParent){const He=L[0]*(Q.width??0);Q.x&&Q.x<He&&(M.x=He,z.x=z.x-(Q.x-He));const Ge=L[1]*(Q.height??0);Q.y&&Q.y<Ge&&(M.y=Ge,z.y=z.y-(Q.y-Ge))}const ge=R2({width:M.width,prevWidth:re,height:M.height,prevHeight:k,affectsX:u.controlDirection.affectsX,affectsY:u.controlDirection.affectsY}),me={...M,direction:ge};S?.(B,me)!==!1&&(D=!0,w?.(B,me),r(Q,G))}).on("end",B=>{D&&(N?.(B,{...M}),s?.({...M}),D=!1)});c.call(Z)}function h(){c.on(".drag",null)}return{update:d,destroy:h}}var gc={exports:{}},pc={},yc={exports:{}},vc={};var Yg;function q2(){if(Yg)return vc;Yg=1;var t=Rl();function a(y,v){return y===v&&(y!==0||1/y===1/v)||y!==y&&v!==v}var l=typeof Object.is=="function"?Object.is:a,r=t.useState,s=t.useEffect,c=t.useLayoutEffect,u=t.useDebugValue;function d(y,v){var x=v(),w=r({inst:{value:x,getSnapshot:v}}),N=w[0].inst,S=w[1];return c(function(){N.value=x,N.getSnapshot=v,h(N)&&S({inst:N})},[y,x,v]),s(function(){return h(N)&&S({inst:N}),y(function(){h(N)&&S({inst:N})})},[y]),u(x),x}function h(y){var v=y.getSnapshot;y=y.value;try{var x=v();return!l(y,x)}catch{return!0}}function m(y,v){return v()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:d;return vc.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,vc}var Gg;function U2(){return Gg||(Gg=1,yc.exports=q2()),yc.exports}var Xg;function V2(){if(Xg)return pc;Xg=1;var t=Rl(),a=U2();function l(m,p){return m===p&&(m!==0||1/m===1/p)||m!==m&&p!==p}var r=typeof Object.is=="function"?Object.is:l,s=a.useSyncExternalStore,c=t.useRef,u=t.useEffect,d=t.useMemo,h=t.useDebugValue;return pc.useSyncExternalStoreWithSelector=function(m,p,y,v,x){var w=c(null);if(w.current===null){var N={hasValue:!1,value:null};w.current=N}else N=w.current;w=d(function(){function M(R){if(!z){if(z=!0,E=R,R=v(R),x!==void 0&&N.hasValue){var O=N.value;if(x(O,R))return T=O}return T=R}if(O=T,r(E,R))return O;var C=v(R);return x!==void 0&&x(O,C)?(E=R,O):(E=R,T=C)}var z=!1,E,T,q=y===void 0?null:y;return[function(){return M(p())},q===null?void 0:function(){return M(q())}]},[p,y,v,x]);var S=s(m,w[0],w[1]);return u(function(){N.hasValue=!0,N.value=S},[S]),h(S),S},pc}var Zg;function Y2(){return Zg||(Zg=1,gc.exports=V2()),gc.exports}var G2=Y2();const X2=Vn(G2),Z2={},Qg=t=>{let a;const l=new Set,r=(p,y)=>{const v=typeof p=="function"?p(a):p;if(!Object.is(v,a)){const x=a;a=y??(typeof v!="object"||v===null)?v:Object.assign({},a,v),l.forEach(w=>w(a,x))}},s=()=>a,h={setState:r,getState:s,getInitialState:()=>m,subscribe:p=>(l.add(p),()=>l.delete(p)),destroy:()=>{(Z2?"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()}},m=a=t(r,s,h);return h},Q2=t=>t?Qg(t):Qg,{useDebugValue:I2}=Ru,{useSyncExternalStoreWithSelector:$2}=X2,K2=t=>t;function Ig(t,a=K2,l){const r=$2(t.subscribe,t.getState,t.getServerState||t.getInitialState,a,l);return I2(r),r}const $g=(t,a)=>{const l=Q2(t),r=(s,c=a)=>Ig(l,s,c);return Object.assign(r,l),r},F2=(t,a)=>t?$g(t,a):$g;function tt(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[r,s]of t)if(!Object.is(s,a.get(r)))return!1;return!0}if(t instanceof Set&&a instanceof Set){if(t.size!==a.size)return!1;for(const r of t)if(!a.has(r))return!1;return!0}const l=Object.keys(t);if(l.length!==Object.keys(a).length)return!1;for(const r of l)if(!Object.prototype.hasOwnProperty.call(a,r)||!Object.is(t[r],a[r]))return!1;return!0}nm();const qo=K.createContext(null),J2=qo.Provider,Kg=jn.error001();function qe(t,a){const l=K.useContext(qo);if(l===null)throw new Error(Kg);return Ig(l,t,a)}function at(){const t=K.useContext(qo);if(t===null)throw new Error(Kg);return K.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe}),[t])}const Fg={display:"none"},P2={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},Jg="react-flow__node-desc",Pg="react-flow__edge-desc",W2="react-flow__aria-live",eN=t=>t.ariaLiveMessage,tN=t=>t.ariaLabelConfig;function nN({rfId:t}){const a=qe(eN);return _.jsx("div",{id:`${W2}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:P2,children:a})}function iN({rfId:t,disableKeyboardA11y:a}){const l=qe(tN);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${Jg}-${t}`,style:Fg,children:a?l["node.a11yDescription.default"]:l["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${Pg}-${t}`,style:Fg,children:l["edge.a11yDescription.default"]}),!a&&_.jsx(nN,{rfId:t})]})}const wi=K.forwardRef(({position:t="top-left",children:a,className:l,style:r,...s},c)=>{const u=`${t}`.split("-");return _.jsx("div",{className:ct(["react-flow__panel",l,...u]),style:r,ref:c,...s,children:a})});wi.displayName="Panel";function aN({proOptions:t,position:a="bottom-right"}){return t?.hideAttribution?null:_.jsx(wi,{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:_.jsx("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const lN=t=>{const a=[],l=[];for(const[,r]of t.nodeLookup)r.selected&&a.push(r.internals.userNode);for(const[,r]of t.edgeLookup)r.selected&&l.push(r);return{selectedNodes:a,selectedEdges:l}},Uo=t=>t.id;function rN(t,a){return tt(t.selectedNodes.map(Uo),a.selectedNodes.map(Uo))&&tt(t.selectedEdges.map(Uo),a.selectedEdges.map(Uo))}function oN({onSelectionChange:t}){const a=at(),{selectedNodes:l,selectedEdges:r}=qe(lN,rN);return K.useEffect(()=>{const s={nodes:l,edges:r};t?.(s),a.getState().onSelectionChangeHandlers.forEach(c=>c(s))},[l,r,t]),null}const sN=t=>!!t.onSelectionChangeHandlers;function uN({onSelectionChange:t}){const a=qe(sN);return t||a?_.jsx(oN,{onSelectionChange:t}):null}const Wg=[0,0],cN={x:0,y:0,zoom:1},ep=[...["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"],"rfId"],fN=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}),tp={translateExtent:Zl,nodeOrigin:Wg,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function dN(t){const{setNodes:a,setEdges:l,setMinZoom:r,setMaxZoom:s,setTranslateExtent:c,setNodeExtent:u,reset:d,setDefaultNodesAndEdges:h}=qe(fN,tt),m=at();K.useEffect(()=>(h(t.defaultNodes,t.defaultEdges),()=>{p.current=tp,d()}),[]);const p=K.useRef(tp);return K.useEffect(()=>{for(const y of ep){const v=t[y],x=p.current[y];v!==x&&(typeof t[y]>"u"||(y==="nodes"?a(v):y==="edges"?l(v):y==="minZoom"?r(v):y==="maxZoom"?s(v):y==="translateExtent"?c(v):y==="nodeExtent"?u(v):y==="ariaLabelConfig"?m.setState({ariaLabelConfig:F_(v)}):y==="fitView"?m.setState({fitViewQueued:v}):y==="fitViewOptions"?m.setState({fitViewOptions:v}):m.setState({[y]:v})))}p.current=t},ep.map(y=>t[y])),null}function np(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function hN(t){const[a,l]=K.useState(t==="system"?null:t);return K.useEffect(()=>{if(t!=="system"){l(t);return}const r=np(),s=()=>l(r?.matches?"dark":"light");return s(),r?.addEventListener("change",s),()=>{r?.removeEventListener("change",s)}},[t]),a!==null?a:np()?.matches?"dark":"light"}const ip=typeof document<"u"?document:null;function Wl(t=null,a={target:ip,actInsideInputWithModifier:!0}){const[l,r]=K.useState(!1),s=K.useRef(!1),c=K.useRef(new Set([])),[u,d]=K.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(y=>typeof y=="string").map(y=>y.replace("+",`
10
+ `).replace(`
11
+
12
+ `,`
13
+ +`).split(`
14
+ `)),p=m.reduce((y,v)=>y.concat(...v),[]);return[m,p]}return[[],[]]},[t]);return K.useEffect(()=>{const h=a?.target??ip,m=a?.actInsideInputWithModifier??!0;if(t!==null){const p=x=>{if(s.current=x.ctrlKey||x.metaKey||x.shiftKey||x.altKey,(!s.current||s.current&&!m)&&gg(x))return!1;const N=lp(x.code,d);if(c.current.add(x[N]),ap(u,c.current,!1)){const S=x.composedPath?.()?.[0]||x.target,M=S?.nodeName==="BUTTON"||S?.nodeName==="A";a.preventDefault!==!1&&(s.current||!M)&&x.preventDefault(),r(!0)}},y=x=>{const w=lp(x.code,d);ap(u,c.current,!0)?(r(!1),c.current.clear()):c.current.delete(x[w]),x.key==="Meta"&&c.current.clear(),s.current=!1},v=()=>{c.current.clear(),r(!1)};return h?.addEventListener("keydown",p),h?.addEventListener("keyup",y),window.addEventListener("blur",v),window.addEventListener("contextmenu",v),()=>{h?.removeEventListener("keydown",p),h?.removeEventListener("keyup",y),window.removeEventListener("blur",v),window.removeEventListener("contextmenu",v)}}},[t,r]),l}function ap(t,a,l){return t.filter(r=>l||r.length===a.size).some(r=>r.every(s=>a.has(s)))}function lp(t,a){return a.includes(t)?"code":"key"}const mN=()=>{const t=at();return K.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:r}=t.getState();return r?r.scaleTo(a,{duration:l?.duration}):Promise.resolve(!1)},getZoom:()=>t.getState().transform[2],setViewport:async(a,l)=>{const{transform:[r,s,c],panZoom:u}=t.getState();return u?(await u.setViewport({x:a.x??r,y:a.y??s,zoom:a.zoom??c},l),Promise.resolve(!0)):Promise.resolve(!1)},getViewport:()=>{const[a,l,r]=t.getState().transform;return{x:a,y:l,zoom:r}},setCenter:async(a,l,r)=>t.getState().setCenter(a,l,r),fitBounds:async(a,l)=>{const{width:r,height:s,minZoom:c,maxZoom:u,panZoom:d}=t.getState(),h=Do(a,r,s,c,u,l?.padding??.1);return d?(await d.setViewport(h,{duration:l?.duration,ease:l?.ease,interpolate:l?.interpolate}),Promise.resolve(!0)):Promise.resolve(!1)},screenToFlowPosition:(a,l={})=>{const{transform:r,snapGrid:s,snapToGrid:c,domNode:u}=t.getState();if(!u)return a;const{x:d,y:h}=u.getBoundingClientRect(),m={x:a.x-d,y:a.y-h},p=l.snapGrid??s,y=l.snapToGrid??c;return Fl(m,r,y,p)},flowToScreenPosition:a=>{const{transform:l,domNode:r}=t.getState();if(!r)return a;const{x:s,y:c}=r.getBoundingClientRect(),u=Ro(a,l);return{x:u.x+s,y:u.y+c}}}),[])};function rp(t,a){const l=[],r=new Map,s=[];for(const c of t)if(c.type==="add"){s.push(c);continue}else if(c.type==="remove"||c.type==="replace")r.set(c.id,[c]);else{const u=r.get(c.id);u?u.push(c):r.set(c.id,[c])}for(const c of a){const u=r.get(c.id);if(!u){l.push(c);continue}if(u[0].type==="remove")continue;if(u[0].type==="replace"){l.push({...u[0].item});continue}const d={...c};for(const h of u)gN(h,d);l.push(d)}return s.length&&s.forEach(c=>{c.index!==void 0?l.splice(c.index,0,{...c.item}):l.push({...c.item})}),l}function gN(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 op(t,a){return rp(t,a)}function sp(t,a){return rp(t,a)}function ua(t,a){return{id:t,type:"select",selected:a}}function Ya(t,a=new Set,l=!1){const r=[];for(const[s,c]of t){const u=a.has(s);!(c.selected===void 0&&!u)&&c.selected!==u&&(l&&(c.selected=u),r.push(ua(c.id,u)))}return r}function up({items:t=[],lookup:a}){const l=[],r=new Map(t.map(s=>[s.id,s]));for(const[s,c]of t.entries()){const u=a.get(c.id),d=u?.internals?.userNode??u;d!==void 0&&d!==c&&l.push({id:c.id,item:c,type:"replace"}),d===void 0&&l.push({item:c,type:"add",index:s})}for(const[s]of a)r.get(s)===void 0&&l.push({id:s,type:"remove"});return l}function cp(t){return{id:t.id,type:"remove"}}const fp=t=>V_(t),pN=t=>ig(t);function dp(t){return K.forwardRef(t)}const yN=typeof window<"u"?K.useLayoutEffect:K.useEffect;function hp(t){const[a,l]=K.useState(BigInt(0)),[r]=K.useState(()=>vN(()=>l(s=>s+BigInt(1))));return yN(()=>{const s=r.get();s.length&&(t(s),r.reset())},[a]),r}function vN(t){let a=[];return{get:()=>a,reset:()=>{a=[]},push:l=>{a.push(l),t()}}}const mp=K.createContext(null);function bN({children:t}){const a=at(),l=K.useCallback(d=>{const{nodes:h=[],setNodes:m,hasDefaultNodes:p,onNodesChange:y,nodeLookup:v,fitViewQueued:x,onNodesChangeMiddlewareMap:w}=a.getState();let N=h;for(const M of d)N=typeof M=="function"?M(N):M;let S=up({items:N,lookup:v});for(const M of w.values())S=M(S);p&&m(N),S.length>0?y?.(S):x&&window.requestAnimationFrame(()=>{const{fitViewQueued:M,nodes:z,setNodes:E}=a.getState();M&&E(z)})},[]),r=hp(l),s=K.useCallback(d=>{const{edges:h=[],setEdges:m,hasDefaultEdges:p,onEdgesChange:y,edgeLookup:v}=a.getState();let x=h;for(const w of d)x=typeof w=="function"?w(x):w;p?m(x):y&&y(up({items:x,lookup:v}))},[]),c=hp(s),u=K.useMemo(()=>({nodeQueue:r,edgeQueue:c}),[]);return _.jsx(mp.Provider,{value:u,children:t})}function xN(){const t=K.useContext(mp);if(!t)throw new Error("useBatchContext must be used within a BatchProvider");return t}const wN=t=>!!t.panZoom;function er(){const t=mN(),a=at(),l=xN(),r=qe(wN),s=K.useMemo(()=>{const c=y=>a.getState().nodeLookup.get(y),u=y=>{l.nodeQueue.push(y)},d=y=>{l.edgeQueue.push(y)},h=y=>{const{nodeLookup:v,nodeOrigin:x}=a.getState(),w=fp(y)?y:v.get(y.id),N=w.parentId?dg(w.position,w.measured,w.parentId,v,x):w.position,S={...w,position:N,width:w.measured?.width??w.width,height:w.measured?.height??w.height};return La(S)},m=(y,v,x={replace:!1})=>{u(w=>w.map(N=>{if(N.id===y){const S=typeof v=="function"?v(N):v;return x.replace&&fp(S)?S:{...N,...S}}return N}))},p=(y,v,x={replace:!1})=>{d(w=>w.map(N=>{if(N.id===y){const S=typeof v=="function"?v(N):v;return x.replace&&pN(S)?S:{...N,...S}}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(v=>({...v}))},getEdge:y=>a.getState().edgeLookup.get(y),setNodes:u,setEdges:d,addNodes:y=>{const v=Array.isArray(y)?y:[y];l.nodeQueue.push(x=>[...x,...v])},addEdges:y=>{const v=Array.isArray(y)?y:[y];l.edgeQueue.push(x=>[...x,...v])},toObject:()=>{const{nodes:y=[],edges:v=[],transform:x}=a.getState(),[w,N,S]=x;return{nodes:y.map(M=>({...M})),edges:v.map(M=>({...M})),viewport:{x:w,y:N,zoom:S}}},deleteElements:async({nodes:y=[],edges:v=[]})=>{const{nodes:x,edges:w,onNodesDelete:N,onEdgesDelete:S,triggerNodeChanges:M,triggerEdgeChanges:z,onDelete:E,onBeforeDelete:T}=a.getState(),{nodes:q,edges:R}=await Z_({nodesToRemove:y,edgesToRemove:v,nodes:x,edges:w,onBeforeDelete:T}),O=R.length>0,C=q.length>0;if(O){const D=R.map(cp);S?.(R),z(D)}if(C){const D=q.map(cp);N?.(q),M(D)}return(C||O)&&E?.({nodes:q,edges:R}),{deletedNodes:q,deletedEdges:R}},getIntersectingNodes:(y,v=!0,x)=>{const w=cg(y),N=w?y:h(y),S=x!==void 0;return N?(x||a.getState().nodes).filter(M=>{const z=a.getState().nodeLookup.get(M.id);if(z&&!w&&(M.id===y.id||!z.internals.positionAbsolute))return!1;const E=La(S?M:z),T=$l(E,N);return v&&T>0||T>=E.width*E.height||T>=N.width*N.height}):[]},isNodeIntersecting:(y,v,x=!0)=>{const N=cg(y)?y:h(y);if(!N)return!1;const S=$l(N,v);return x&&S>0||S>=v.width*v.height||S>=N.width*N.height},updateNode:m,updateNodeData:(y,v,x={replace:!1})=>{m(y,w=>{const N=typeof v=="function"?v(w):v;return x.replace?{...w,data:N}:{...w,data:{...w.data,...N}}},x)},updateEdge:p,updateEdgeData:(y,v,x={replace:!1})=>{p(y,w=>{const N=typeof v=="function"?v(w):v;return x.replace?{...w,data:N}:{...w,data:{...w.data,...N}}},x)},getNodesBounds:y=>{const{nodeLookup:v,nodeOrigin:x}=a.getState();return ag(y,{nodeLookup:v,nodeOrigin:x})},getHandleConnections:({type:y,id:v,nodeId:x})=>Array.from(a.getState().connectionLookup.get(`${x}-${y}${v?`-${v}`:""}`)?.values()??[]),getNodeConnections:({type:y,handleId:v,nodeId:x})=>Array.from(a.getState().connectionLookup.get(`${x}${y?v?`-${y}-${v}`:`-${y}`:""}`)?.values()??[]),fitView:async y=>{const v=a.getState().fitViewResolver??K_();return a.setState({fitViewQueued:!0,fitViewOptions:y,fitViewResolver:v}),l.nodeQueue.push(x=>[...x]),v.promise}}},[]);return K.useMemo(()=>({...s,...t,viewportInitialized:r}),[r])}const gp=t=>t.selected,SN=typeof window<"u"?window:void 0;function EN({deleteKeyCode:t,multiSelectionKeyCode:a}){const l=at(),{deleteElements:r}=er(),s=Wl(t,{actInsideInputWithModifier:!1}),c=Wl(a,{target:SN});K.useEffect(()=>{if(s){const{edges:u,nodes:d}=l.getState();r({nodes:d.filter(gp),edges:u.filter(gp)}),l.setState({nodesSelectionActive:!1})}},[s]),K.useEffect(()=>{l.setState({multiSelectionActive:c})},[c])}function _N(t){const a=at();K.useEffect(()=>{const l=()=>{if(!t.current||!(t.current.checkVisibility?.()??!0))return!1;const r=nc(t.current);(r.height===0||r.width===0)&&a.getState().onError?.("004",jn.error004()),a.setState({width:r.width||500,height:r.height||500})};if(t.current){l(),window.addEventListener("resize",l);const r=new ResizeObserver(()=>l());return r.observe(t.current),()=>{window.removeEventListener("resize",l),r&&t.current&&r.unobserve(t.current)}}},[])}const Vo={position:"absolute",width:"100%",height:"100%",top:0,left:0},NN=t=>({userSelectionActive:t.userSelectionActive,lib:t.lib,connectionInProgress:t.connection.inProgress});function CN({onPaneContextMenu:t,zoomOnScroll:a=!0,zoomOnPinch:l=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:c=ra.Free,zoomOnDoubleClick:u=!0,panOnDrag:d=!0,defaultViewport:h,translateExtent:m,minZoom:p,maxZoom:y,zoomActivationKeyCode:v,preventScrolling:x=!0,children:w,noWheelClassName:N,noPanClassName:S,onViewportChange:M,isControlledViewport:z,paneClickDistance:E,selectionOnDrag:T}){const q=at(),R=K.useRef(null),{userSelectionActive:O,lib:C,connectionInProgress:D}=qe(NN,tt),Z=Wl(v),B=K.useRef();_N(R);const V=K.useCallback(W=>{M?.({x:W[0],y:W[1],zoom:W[2]}),z||q.setState({transform:W})},[M,z]);return K.useEffect(()=>{if(R.current){B.current=j2({domNode:R.current,minZoom:p,maxZoom:y,translateExtent:m,viewport:h,onDraggingChange:j=>q.setState({paneDragging:j}),onPanZoomStart:(j,G)=>{const{onViewportChangeStart:U,onMoveStart:P}=q.getState();P?.(j,G),U?.(G)},onPanZoom:(j,G)=>{const{onViewportChange:U,onMove:P}=q.getState();P?.(j,G),U?.(G)},onPanZoomEnd:(j,G)=>{const{onViewportChangeEnd:U,onMoveEnd:P}=q.getState();P?.(j,G),U?.(G)}});const{x:W,y:H,zoom:I}=B.current.getViewport();return q.setState({panZoom:B.current,transform:[W,H,I],domNode:R.current.closest(".react-flow")}),()=>{B.current?.destroy()}}},[]),K.useEffect(()=>{B.current?.update({onPaneContextMenu:t,zoomOnScroll:a,zoomOnPinch:l,panOnScroll:r,panOnScrollSpeed:s,panOnScrollMode:c,zoomOnDoubleClick:u,panOnDrag:d,zoomActivationKeyPressed:Z,preventScrolling:x,noPanClassName:S,userSelectionActive:O,noWheelClassName:N,lib:C,onTransformChange:V,connectionInProgress:D,selectionOnDrag:T,paneClickDistance:E})},[t,a,l,r,s,c,u,d,Z,x,S,O,N,C,V,D,T,E]),_.jsx("div",{className:"react-flow__renderer",ref:R,style:Vo,children:w})}const MN=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function TN(){const{userSelectionActive:t,userSelectionRect:a}=qe(MN,tt);return t&&a?_.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 bc=(t,a)=>l=>{l.target===a.current&&t?.(l)},AN=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,connectionInProgress:t.connection.inProgress,dragging:t.paneDragging});function zN({isSelecting:t,selectionKeyPressed:a,selectionMode:l=ka.Full,panOnDrag:r,paneClickDistance:s,selectionOnDrag:c,onSelectionStart:u,onSelectionEnd:d,onPaneClick:h,onPaneContextMenu:m,onPaneScroll:p,onPaneMouseEnter:y,onPaneMouseMove:v,onPaneMouseLeave:x,children:w}){const N=at(),{userSelectionActive:S,elementsSelectable:M,dragging:z,connectionInProgress:E}=qe(AN,tt),T=M&&(t||S),q=K.useRef(null),R=K.useRef(),O=K.useRef(new Set),C=K.useRef(new Set),D=K.useRef(!1),Z=U=>{if(D.current||E){D.current=!1;return}h?.(U),N.getState().resetSelectedElements(),N.setState({nodesSelectionActive:!1})},B=U=>{if(Array.isArray(r)&&r?.includes(2)){U.preventDefault();return}m?.(U)},V=p?U=>p(U):void 0,W=U=>{D.current&&(U.stopPropagation(),D.current=!1)},H=U=>{const{domNode:P}=N.getState();if(R.current=P?.getBoundingClientRect(),!R.current)return;const re=U.target===q.current;if(!re&&!!U.target.closest(".nokey")||!t||!(c&&re||a)||U.button!==0||!U.isPrimary)return;U.target?.setPointerCapture?.(U.pointerId),D.current=!1;const{x:L,y:Y}=xn(U.nativeEvent,R.current);N.setState({userSelectionRect:{width:0,height:0,startX:L,startY:Y,x:L,y:Y}}),re||(U.stopPropagation(),U.preventDefault())},I=U=>{const{userSelectionRect:P,transform:re,nodeLookup:k,edgeLookup:Q,connectionLookup:L,triggerNodeChanges:Y,triggerEdgeChanges:F,defaultEdgeOptions:ne,resetSelectedElements:ae}=N.getState();if(!R.current||!P)return;const{x:oe,y:fe}=xn(U.nativeEvent,R.current),{startX:pe,startY:Ee}=P;if(!D.current){const Ge=a?0:s;if(Math.hypot(oe-pe,fe-Ee)<=Ge)return;ae(),u?.(U)}D.current=!0;const ge={startX:pe,startY:Ee,x:oe<pe?oe:pe,y:fe<Ee?fe:Ee,width:Math.abs(oe-pe),height:Math.abs(fe-Ee)},me=O.current,Me=C.current;O.current=new Set(ec(k,ge,re,l===ka.Partial,!0).map(Ge=>Ge.id)),C.current=new Set;const He=ne?.selectable??!0;for(const Ge of O.current){const dt=L.get(Ge);if(dt)for(const{edgeId:Bt}of dt.values()){const Dt=Q.get(Bt);Dt&&(Dt.selectable??He)&&C.current.add(Bt)}}if(!hg(me,O.current)){const Ge=Ya(k,O.current,!0);Y(Ge)}if(!hg(Me,C.current)){const Ge=Ya(Q,C.current);F(Ge)}N.setState({userSelectionRect:ge,userSelectionActive:!0,nodesSelectionActive:!1})},j=U=>{U.button===0&&(U.target?.releasePointerCapture?.(U.pointerId),!S&&U.target===q.current&&N.getState().userSelectionRect&&Z?.(U),N.setState({userSelectionActive:!1,userSelectionRect:null}),D.current&&(d?.(U),N.setState({nodesSelectionActive:O.current.size>0})))},G=r===!0||Array.isArray(r)&&r.includes(0);return _.jsxs("div",{className:ct(["react-flow__pane",{draggable:G,dragging:z,selection:t}]),onClick:T?void 0:bc(Z,q),onContextMenu:bc(B,q),onWheel:bc(V,q),onPointerEnter:T?void 0:y,onPointerMove:T?I:v,onPointerUp:T?j:void 0,onPointerDownCapture:T?H:void 0,onClickCapture:T?W:void 0,onPointerLeave:x,ref:q,style:Vo,children:[w,_.jsx(TN,{})]})}function xc({id:t,store:a,unselect:l=!1,nodeRef:r}){const{addSelectedNodes:s,unselectNodesAndEdges:c,multiSelectionActive:u,nodeLookup:d,onError:h}=a.getState(),m=d.get(t);if(!m){h?.("012",jn.error012(t));return}a.setState({nodesSelectionActive:!1}),m.selected?(l||m.selected&&u)&&(c({nodes:[m],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):s([t])}function pp({nodeRef:t,disabled:a=!1,noDragClassName:l,handleSelector:r,nodeId:s,isSelectable:c,nodeClickDistance:u}){const d=at(),[h,m]=K.useState(!1),p=K.useRef();return K.useEffect(()=>{p.current=v2({getStoreItems:()=>d.getState(),onNodeMouseDown:y=>{xc({id:y,store:d,nodeRef:t})},onDragStart:()=>{m(!0)},onDragStop:()=>{m(!1)}})},[]),K.useEffect(()=>{if(a)p.current?.destroy();else if(t.current)return p.current?.update({noDragClassName:l,handleSelector:r,domNode:t.current,isSelectable:c,nodeId:s,nodeClickDistance:u}),()=>{p.current?.destroy()}},[l,r,a,c,t,s]),h}const ON=t=>a=>a.selected&&(a.draggable||t&&typeof a.draggable>"u");function yp(){const t=at();return K.useCallback(l=>{const{nodeExtent:r,snapToGrid:s,snapGrid:c,nodesDraggable:u,onError:d,updateNodePositions:h,nodeLookup:m,nodeOrigin:p}=t.getState(),y=new Map,v=ON(u),x=s?c[0]:5,w=s?c[1]:5,N=l.direction.x*x*l.factor,S=l.direction.y*w*l.factor;for(const[,M]of m){if(!v(M))continue;let z={x:M.internals.positionAbsolute.x+N,y:M.internals.positionAbsolute.y+S};s&&(z=Kl(z,c));const{position:E,positionAbsolute:T}=lg({nodeId:M.id,nextPosition:z,nodeLookup:m,nodeExtent:r,nodeOrigin:p,onError:d});M.position=E,M.internals.positionAbsolute=T,y.set(M.id,M)}h(y)},[])}const wc=K.createContext(null),jN=wc.Provider;wc.Consumer;const vp=()=>K.useContext(wc),RN=t=>({connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName,rfId:t.rfId}),DN=(t,a,l)=>r=>{const{connectionClickStartHandle:s,connectionMode:c,connection:u}=r,{fromHandle:d,toHandle:h,isValid:m}=u,p=h?.nodeId===t&&h?.id===a&&h?.type===l;return{connectingFrom:d?.nodeId===t&&d?.id===a&&d?.type===l,connectingTo:p,clickConnecting:s?.nodeId===t&&s?.id===a&&s?.type===l,isPossibleEndHandle:c===la.Strict?d?.type!==l:t!==d?.nodeId||a!==d?.id,connectionInProcess:!!d,clickConnectionInProcess:!!s,valid:p&&m}};function kN({type:t="source",position:a=ye.Top,isValidConnection:l,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:c=!0,id:u,onConnect:d,children:h,className:m,onMouseDown:p,onTouchStart:y,...v},x){const w=u||null,N=t==="target",S=at(),M=vp(),{connectOnClick:z,noPanClassName:E,rfId:T}=qe(RN,tt),{connectingFrom:q,connectingTo:R,clickConnecting:O,isPossibleEndHandle:C,connectionInProcess:D,clickConnectionInProcess:Z,valid:B}=qe(DN(M,w,t),tt);M||S.getState().onError?.("010",jn.error010());const V=I=>{const{defaultEdgeOptions:j,onConnect:G,hasDefaultEdges:U}=S.getState(),P={...j,...I};if(U){const{edges:re,setEdges:k}=S.getState();k(n2(P,re))}G?.(P),d?.(P)},W=I=>{if(!M)return;const j=pg(I.nativeEvent);if(s&&(j&&I.button===0||!j)){const G=S.getState();dc.onPointerDown(I.nativeEvent,{handleDomNode:I.currentTarget,autoPanOnConnect:G.autoPanOnConnect,connectionMode:G.connectionMode,connectionRadius:G.connectionRadius,domNode:G.domNode,nodeLookup:G.nodeLookup,lib:G.lib,isTarget:N,handleId:w,nodeId:M,flowId:G.rfId,panBy:G.panBy,cancelConnection:G.cancelConnection,onConnectStart:G.onConnectStart,onConnectEnd:G.onConnectEnd,updateConnection:G.updateConnection,onConnect:V,isValidConnection:l||G.isValidConnection,getTransform:()=>S.getState().transform,getFromHandle:()=>S.getState().connection.fromHandle,autoPanSpeed:G.autoPanSpeed,dragThreshold:G.connectionDragThreshold})}j?p?.(I):y?.(I)},H=I=>{const{onClickConnectStart:j,onClickConnectEnd:G,connectionClickStartHandle:U,connectionMode:P,isValidConnection:re,lib:k,rfId:Q,nodeLookup:L,connection:Y}=S.getState();if(!M||!U&&!s)return;if(!U){j?.(I.nativeEvent,{nodeId:M,handleId:w,handleType:t}),S.setState({connectionClickStartHandle:{nodeId:M,type:t,id:w}});return}const F=mg(I.target),ne=l||re,{connection:ae,isValid:oe}=dc.isValid(I.nativeEvent,{handle:{nodeId:M,id:w,type:t},connectionMode:P,fromNodeId:U.nodeId,fromHandleId:U.id||null,fromType:U.type,isValidConnection:ne,flowId:Q,doc:F,lib:k,nodeLookup:L});oe&&ae&&V(ae);const fe=structuredClone(Y);delete fe.inProgress,fe.toPosition=fe.toHandle?fe.toHandle.position:null,G?.(I,fe),S.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":w,"data-nodeid":M,"data-handlepos":a,"data-id":`${T}-${M}-${w}-${t}`,className:ct(["react-flow__handle",`react-flow__handle-${a}`,"nodrag",E,m,{source:!N,target:N,connectable:r,connectablestart:s,connectableend:c,clickconnecting:O,connectingfrom:q,connectingto:R,valid:B,connectionindicator:r&&(!D||C)&&(D||Z?c:s)}]),onMouseDown:W,onTouchStart:W,onClick:z?H:void 0,ref:x,...v,children:h})}const Ga=K.memo(dp(kN));function HN({data:t,isConnectable:a,sourcePosition:l=ye.Bottom}){return _.jsxs(_.Fragment,{children:[t?.label,_.jsx(Ga,{type:"source",position:l,isConnectable:a})]})}function LN({data:t,isConnectable:a,targetPosition:l=ye.Top,sourcePosition:r=ye.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(Ga,{type:"target",position:l,isConnectable:a}),t?.label,_.jsx(Ga,{type:"source",position:r,isConnectable:a})]})}function BN(){return null}function qN({data:t,isConnectable:a,targetPosition:l=ye.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(Ga,{type:"target",position:l,isConnectable:a}),t?.label]})}const Yo={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},bp={input:HN,default:LN,output:qN,group:BN};function UN(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 VN=t=>{const{width:a,height:l,x:r,y:s}=Il(t.nodeLookup,{filter:c=>!!c.selected});return{width:bn(a)?a:null,height:bn(l)?l:null,userSelectionActive:t.userSelectionActive,transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]}) translate(${r}px,${s}px)`}};function YN({onSelectionContextMenu:t,noPanClassName:a,disableKeyboardA11y:l}){const r=at(),{width:s,height:c,transformString:u,userSelectionActive:d}=qe(VN,tt),h=yp(),m=K.useRef(null);if(K.useEffect(()=>{l||m.current?.focus({preventScroll:!0})},[l]),pp({nodeRef:m}),d||!s||!c)return null;const p=t?v=>{const x=r.getState().nodes.filter(w=>w.selected);t(v,x)}:void 0,y=v=>{Object.prototype.hasOwnProperty.call(Yo,v.key)&&(v.preventDefault(),h({direction:Yo[v.key],factor:v.shiftKey?4:1}))};return _.jsx("div",{className:ct(["react-flow__nodesselection","react-flow__container",a]),style:{transform:u},children:_.jsx("div",{ref:m,className:"react-flow__nodesselection-rect",onContextMenu:p,tabIndex:l?void 0:-1,onKeyDown:l?void 0:y,style:{width:s,height:c}})})}const xp=typeof window<"u"?window:void 0,GN=t=>({nodesSelectionActive:t.nodesSelectionActive,userSelectionActive:t.userSelectionActive});function wp({children:t,onPaneClick:a,onPaneMouseEnter:l,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,paneClickDistance:d,deleteKeyCode:h,selectionKeyCode:m,selectionOnDrag:p,selectionMode:y,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:w,panActivationKeyCode:N,zoomActivationKeyCode:S,elementsSelectable:M,zoomOnScroll:z,zoomOnPinch:E,panOnScroll:T,panOnScrollSpeed:q,panOnScrollMode:R,zoomOnDoubleClick:O,panOnDrag:C,defaultViewport:D,translateExtent:Z,minZoom:B,maxZoom:V,preventScrolling:W,onSelectionContextMenu:H,noWheelClassName:I,noPanClassName:j,disableKeyboardA11y:G,onViewportChange:U,isControlledViewport:P}){const{nodesSelectionActive:re,userSelectionActive:k}=qe(GN,tt),Q=Wl(m,{target:xp}),L=Wl(N,{target:xp}),Y=L||C,F=L||T,ne=p&&Y!==!0,ae=Q||k||ne;return EN({deleteKeyCode:h,multiSelectionKeyCode:w}),_.jsx(CN,{onPaneContextMenu:c,elementsSelectable:M,zoomOnScroll:z,zoomOnPinch:E,panOnScroll:F,panOnScrollSpeed:q,panOnScrollMode:R,zoomOnDoubleClick:O,panOnDrag:!Q&&Y,defaultViewport:D,translateExtent:Z,minZoom:B,maxZoom:V,zoomActivationKeyCode:S,preventScrolling:W,noWheelClassName:I,noPanClassName:j,onViewportChange:U,isControlledViewport:P,paneClickDistance:d,selectionOnDrag:ne,children:_.jsxs(zN,{onSelectionStart:v,onSelectionEnd:x,onPaneClick:a,onPaneMouseEnter:l,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:c,onPaneScroll:u,panOnDrag:Y,isSelecting:!!ae,selectionMode:y,selectionKeyPressed:Q,paneClickDistance:d,selectionOnDrag:ne,children:[t,re&&_.jsx(YN,{onSelectionContextMenu:H,noPanClassName:j,disableKeyboardA11y:G})]})})}wp.displayName="FlowRenderer";const XN=K.memo(wp),ZN=t=>a=>t?ec(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 QN(t){return qe(K.useCallback(ZN(t),[t]),tt)}const IN=t=>t.updateNodeInternals;function $N(){const t=qe(IN),[a]=K.useState(()=>typeof ResizeObserver>"u"?null:new ResizeObserver(l=>{const r=new Map;l.forEach(s=>{const c=s.target.getAttribute("data-id");r.set(c,{id:c,nodeElement:s.target,force:!0})}),t(r)}));return K.useEffect(()=>()=>{a?.disconnect()},[a]),a}function KN({node:t,nodeType:a,hasDimensions:l,resizeObserver:r}){const s=at(),c=K.useRef(null),u=K.useRef(null),d=K.useRef(t.sourcePosition),h=K.useRef(t.targetPosition),m=K.useRef(a),p=l&&!!t.internals.handleBounds;return K.useEffect(()=>{c.current&&!t.hidden&&(!p||u.current!==c.current)&&(u.current&&r?.unobserve(u.current),r?.observe(c.current),u.current=c.current)},[p,t.hidden]),K.useEffect(()=>()=>{u.current&&(r?.unobserve(u.current),u.current=null)},[]),K.useEffect(()=>{if(c.current){const y=m.current!==a,v=d.current!==t.sourcePosition,x=h.current!==t.targetPosition;(y||v||x)&&(m.current=a,d.current=t.sourcePosition,h.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 FN({id:t,onClick:a,onMouseEnter:l,onMouseMove:r,onMouseLeave:s,onContextMenu:c,onDoubleClick:u,nodesDraggable:d,elementsSelectable:h,nodesConnectable:m,nodesFocusable:p,resizeObserver:y,noDragClassName:v,noPanClassName:x,disableKeyboardA11y:w,rfId:N,nodeTypes:S,nodeClickDistance:M,onError:z}){const{node:E,internals:T,isParent:q}=qe(oe=>{const fe=oe.nodeLookup.get(t),pe=oe.parentLookup.has(t);return{node:fe,internals:fe.internals,isParent:pe}},tt);let R=E.type||"default",O=S?.[R]||bp[R];O===void 0&&(z?.("003",jn.error003(R)),R="default",O=S?.default||bp.default);const C=!!(E.draggable||d&&typeof E.draggable>"u"),D=!!(E.selectable||h&&typeof E.selectable>"u"),Z=!!(E.connectable||m&&typeof E.connectable>"u"),B=!!(E.focusable||p&&typeof E.focusable>"u"),V=at(),W=fg(E),H=KN({node:E,nodeType:R,hasDimensions:W,resizeObserver:y}),I=pp({nodeRef:H,disabled:E.hidden||!C,noDragClassName:v,handleSelector:E.dragHandle,nodeId:t,isSelectable:D,nodeClickDistance:M}),j=yp();if(E.hidden)return null;const G=Zn(E),U=UN(E),P=D||C||a||l||r||s,re=l?oe=>l(oe,{...T.userNode}):void 0,k=r?oe=>r(oe,{...T.userNode}):void 0,Q=s?oe=>s(oe,{...T.userNode}):void 0,L=c?oe=>c(oe,{...T.userNode}):void 0,Y=u?oe=>u(oe,{...T.userNode}):void 0,F=oe=>{const{selectNodesOnDrag:fe,nodeDragThreshold:pe}=V.getState();D&&(!fe||!C||pe>0)&&xc({id:t,store:V,nodeRef:H}),a&&a(oe,{...T.userNode})},ne=oe=>{if(!(gg(oe.nativeEvent)||w)){if(Pm.includes(oe.key)&&D){const fe=oe.key==="Escape";xc({id:t,store:V,unselect:fe,nodeRef:H})}else if(C&&E.selected&&Object.prototype.hasOwnProperty.call(Yo,oe.key)){oe.preventDefault();const{ariaLabelConfig:fe}=V.getState();V.setState({ariaLiveMessage:fe["node.a11yDescription.ariaLiveMessage"]({direction:oe.key.replace("Arrow","").toLowerCase(),x:~~T.positionAbsolute.x,y:~~T.positionAbsolute.y})}),j({direction:Yo[oe.key],factor:oe.shiftKey?4:1})}}},ae=()=>{if(w||!H.current?.matches(":focus-visible"))return;const{transform:oe,width:fe,height:pe,autoPanOnNodeFocus:Ee,setCenter:ge}=V.getState();if(!Ee)return;ec(new Map([[t,E]]),{x:0,y:0,width:fe,height:pe},oe,!0).length>0||ge(E.position.x+G.width/2,E.position.y+G.height/2,{zoom:oe[2]})};return _.jsx("div",{className:ct(["react-flow__node",`react-flow__node-${R}`,{[x]:C},E.className,{selected:E.selected,selectable:D,parent:q,draggable:C,dragging:I}]),ref:H,style:{zIndex:T.z,transform:`translate(${T.positionAbsolute.x}px,${T.positionAbsolute.y}px)`,pointerEvents:P?"all":"none",visibility:W?"visible":"hidden",...E.style,...U},"data-id":t,"data-testid":`rf__node-${t}`,onMouseEnter:re,onMouseMove:k,onMouseLeave:Q,onContextMenu:L,onClick:F,onDoubleClick:Y,onKeyDown:B?ne:void 0,tabIndex:B?0:void 0,onFocus:B?ae:void 0,role:E.ariaRole??(B?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${Jg}-${N}`,"aria-label":E.ariaLabel,...E.domAttributes,children:_.jsx(jN,{value:t,children:_.jsx(O,{id:t,data:E.data,type:R,positionAbsoluteX:T.positionAbsolute.x,positionAbsoluteY:T.positionAbsolute.y,selected:E.selected??!1,selectable:D,draggable:C,deletable:E.deletable??!0,isConnectable:Z,sourcePosition:E.sourcePosition,targetPosition:E.targetPosition,dragging:I,dragHandle:E.dragHandle,zIndex:T.z,parentId:E.parentId,...G})})})}var JN=K.memo(FN);const PN=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,onError:t.onError});function Sp(t){const{nodesDraggable:a,nodesConnectable:l,nodesFocusable:r,elementsSelectable:s,onError:c}=qe(PN,tt),u=QN(t.onlyRenderVisibleElements),d=$N();return _.jsx("div",{className:"react-flow__nodes",style:Vo,children:u.map(h=>_.jsx(JN,{id:h,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:d,nodesDraggable:a,nodesConnectable:l,nodesFocusable:r,elementsSelectable:s,nodeClickDistance:t.nodeClickDistance,onError:c},h))})}Sp.displayName="NodeRenderer";const WN=K.memo(Sp);function eC(t){return qe(K.useCallback(l=>{if(!t)return l.edges.map(s=>s.id);const r=[];if(l.width&&l.height)for(const s of l.edges){const c=l.nodeLookup.get(s.source),u=l.nodeLookup.get(s.target);c&&u&&W_({sourceNode:c,targetNode:u,width:l.width,height:l.height,transform:l.transform})&&r.push(s.id)}return r},[t]),tt)}const tC=({color:t="none",strokeWidth:a=1})=>{const l={strokeWidth:a,...t&&{stroke:t}};return _.jsx("polyline",{className:"arrow",style:l,strokeLinecap:"round",fill:"none",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4"})},nC=({color:t="none",strokeWidth:a=1})=>{const l={strokeWidth:a,...t&&{stroke:t,fill:t}};return _.jsx("polyline",{className:"arrowclosed",style:l,strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"})},Ep={[Ao.Arrow]:tC,[Ao.ArrowClosed]:nC};function iC(t){const a=at();return K.useMemo(()=>Object.prototype.hasOwnProperty.call(Ep,t)?Ep[t]:(a.getState().onError?.("009",jn.error009(t)),null),[t])}const aC=({id:t,type:a,color:l,width:r=12.5,height:s=12.5,markerUnits:c="strokeWidth",strokeWidth:u,orient:d="auto-start-reverse"})=>{const h=iC(a);return h?_.jsx("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${s}`,viewBox:"-10 -10 20 20",markerUnits:c,orient:d,refX:"0",refY:"0",children:_.jsx(h,{color:l,strokeWidth:u})}):null},_p=({defaultColor:t,rfId:a})=>{const l=qe(c=>c.edges),r=qe(c=>c.defaultEdgeOptions),s=K.useMemo(()=>o2(l,{id:a,defaultColor:t,defaultMarkerStart:r?.markerStart,defaultMarkerEnd:r?.markerEnd}),[l,r,a,t]);return s.length?_.jsx("svg",{className:"react-flow__marker","aria-hidden":"true",children:_.jsx("defs",{children:s.map(c=>_.jsx(aC,{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};_p.displayName="MarkerDefinitions";var lC=K.memo(_p);function Np({x:t,y:a,label:l,labelStyle:r,labelShowBg:s=!0,labelBgStyle:c,labelBgPadding:u=[2,4],labelBgBorderRadius:d=2,children:h,className:m,...p}){const[y,v]=K.useState({x:1,y:0,width:0,height:0}),x=ct(["react-flow__edge-textwrapper",m]),w=K.useRef(null);return K.useEffect(()=>{if(w.current){const N=w.current.getBBox();v({x:N.x,y:N.y,width:N.width,height:N.height})}},[l]),l?_.jsxs("g",{transform:`translate(${t-y.width/2} ${a-y.height/2})`,className:x,visibility:y.width?"visible":"hidden",...p,children:[s&&_.jsx("rect",{width:y.width+2*u[0],x:-u[0],y:-u[1],height:y.height+2*u[1],className:"react-flow__edge-textbg",style:c,rx:d,ry:d}),_.jsx("text",{className:"react-flow__edge-text",y:y.height/2,dy:"0.3em",ref:w,style:r,children:l}),h]}):null}Np.displayName="EdgeText";const rC=K.memo(Np);function tr({path:t,labelX:a,labelY:l,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h,interactionWidth:m=20,...p}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...p,d:t,fill:"none",className:ct(["react-flow__edge-path",p.className])}),m?_.jsx("path",{d:t,fill:"none",strokeOpacity:0,strokeWidth:m,className:"react-flow__edge-interaction"}):null,r&&bn(a)&&bn(l)?_.jsx(rC,{x:a,y:l,label:r,labelStyle:s,labelShowBg:c,labelBgStyle:u,labelBgPadding:d,labelBgBorderRadius:h}):null]})}function Cp({pos:t,x1:a,y1:l,x2:r,y2:s}){return t===ye.Left||t===ye.Right?[.5*(a+r),l]:[a,.5*(l+s)]}function Mp({sourceX:t,sourceY:a,sourcePosition:l=ye.Bottom,targetX:r,targetY:s,targetPosition:c=ye.Top}){const[u,d]=Cp({pos:l,x1:t,y1:a,x2:r,y2:s}),[h,m]=Cp({pos:c,x1:r,y1:s,x2:t,y2:a}),[p,y,v,x]=vg({sourceX:t,sourceY:a,targetX:r,targetY:s,sourceControlX:u,sourceControlY:d,targetControlX:h,targetControlY:m});return[`M${t},${a} C${u},${d} ${h},${m} ${r},${s}`,p,y,v,x]}function Tp(t){return K.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,sourcePosition:u,targetPosition:d,label:h,labelStyle:m,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:S,interactionWidth:M})=>{const[z,E,T]=Mp({sourceX:l,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:d}),q=t.isInternal?void 0:a;return _.jsx(tr,{id:q,path:z,labelX:E,labelY:T,label:h,labelStyle:m,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:S,interactionWidth:M})})}const oC=Tp({isInternal:!1}),Ap=Tp({isInternal:!0});oC.displayName="SimpleBezierEdge",Ap.displayName="SimpleBezierEdgeInternal";function zp(t){return K.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:p,labelBgBorderRadius:y,style:v,sourcePosition:x=ye.Bottom,targetPosition:w=ye.Top,markerEnd:N,markerStart:S,pathOptions:M,interactionWidth:z})=>{const[E,T,q]=Ho({sourceX:l,sourceY:r,sourcePosition:x,targetX:s,targetY:c,targetPosition:w,borderRadius:M?.borderRadius,offset:M?.offset,stepPosition:M?.stepPosition}),R=t.isInternal?void 0:a;return _.jsx(tr,{id:R,path:E,labelX:T,labelY:q,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:p,labelBgBorderRadius:y,style:v,markerEnd:N,markerStart:S,interactionWidth:z})})}const Op=zp({isInternal:!1}),jp=zp({isInternal:!0});Op.displayName="SmoothStepEdge",jp.displayName="SmoothStepEdgeInternal";function Rp(t){return K.memo(({id:a,...l})=>{const r=t.isInternal?void 0:a;return _.jsx(Op,{...l,id:r,pathOptions:K.useMemo(()=>({borderRadius:0,offset:l.pathOptions?.offset}),[l.pathOptions?.offset])})})}const sC=Rp({isInternal:!1}),Dp=Rp({isInternal:!0});sC.displayName="StepEdge",Dp.displayName="StepEdgeInternal";function kp(t){return K.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:p,labelBgBorderRadius:y,style:v,markerEnd:x,markerStart:w,interactionWidth:N})=>{const[S,M,z]=wg({sourceX:l,sourceY:r,targetX:s,targetY:c}),E=t.isInternal?void 0:a;return _.jsx(tr,{id:E,path:S,labelX:M,labelY:z,label:u,labelStyle:d,labelShowBg:h,labelBgStyle:m,labelBgPadding:p,labelBgBorderRadius:y,style:v,markerEnd:x,markerStart:w,interactionWidth:N})})}const uC=kp({isInternal:!1}),Hp=kp({isInternal:!0});uC.displayName="StraightEdge",Hp.displayName="StraightEdgeInternal";function Lp(t){return K.memo(({id:a,sourceX:l,sourceY:r,targetX:s,targetY:c,sourcePosition:u=ye.Bottom,targetPosition:d=ye.Top,label:h,labelStyle:m,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:S,pathOptions:M,interactionWidth:z})=>{const[E,T,q]=ic({sourceX:l,sourceY:r,sourcePosition:u,targetX:s,targetY:c,targetPosition:d,curvature:M?.curvature}),R=t.isInternal?void 0:a;return _.jsx(tr,{id:R,path:E,labelX:T,labelY:q,label:h,labelStyle:m,labelShowBg:p,labelBgStyle:y,labelBgPadding:v,labelBgBorderRadius:x,style:w,markerEnd:N,markerStart:S,interactionWidth:z})})}const cC=Lp({isInternal:!1}),Bp=Lp({isInternal:!0});cC.displayName="BezierEdge",Bp.displayName="BezierEdgeInternal";const qp={default:Bp,straight:Hp,step:Dp,smoothstep:jp,simplebezier:Ap},Up={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null},fC=(t,a,l)=>l===ye.Left?t-a:l===ye.Right?t+a:t,dC=(t,a,l)=>l===ye.Top?t-a:l===ye.Bottom?t+a:t,Vp="react-flow__edgeupdater";function Yp({position:t,centerX:a,centerY:l,radius:r=10,onMouseDown:s,onMouseEnter:c,onMouseOut:u,type:d}){return _.jsx("circle",{onMouseDown:s,onMouseEnter:c,onMouseOut:u,className:ct([Vp,`${Vp}-${d}`]),cx:fC(a,r,t),cy:dC(l,r,t),r,stroke:"transparent",fill:"transparent"})}function hC({isReconnectable:t,reconnectRadius:a,edge:l,sourceX:r,sourceY:s,targetX:c,targetY:u,sourcePosition:d,targetPosition:h,onReconnect:m,onReconnectStart:p,onReconnectEnd:y,setReconnecting:v,setUpdateHover:x}){const w=at(),N=(T,q)=>{if(T.button!==0)return;const{autoPanOnConnect:R,domNode:O,isValidConnection:C,connectionMode:D,connectionRadius:Z,lib:B,onConnectStart:V,onConnectEnd:W,cancelConnection:H,nodeLookup:I,rfId:j,panBy:G,updateConnection:U}=w.getState(),P=q.type==="target",re=(L,Y)=>{v(!1),y?.(L,l,q.type,Y)},k=L=>m?.(l,L),Q=(L,Y)=>{v(!0),p?.(T,l,q.type),V?.(L,Y)};dc.onPointerDown(T.nativeEvent,{autoPanOnConnect:R,connectionMode:D,connectionRadius:Z,domNode:O,handleId:q.id,nodeId:q.nodeId,nodeLookup:I,isTarget:P,edgeUpdaterType:q.type,lib:B,flowId:j,cancelConnection:H,panBy:G,isValidConnection:C,onConnect:k,onConnectStart:Q,onConnectEnd:W,onReconnectEnd:re,updateConnection:U,getTransform:()=>w.getState().transform,getFromHandle:()=>w.getState().connection.fromHandle,dragThreshold:w.getState().connectionDragThreshold,handleDomNode:T.currentTarget})},S=T=>N(T,{nodeId:l.target,id:l.targetHandle??null,type:"target"}),M=T=>N(T,{nodeId:l.source,id:l.sourceHandle??null,type:"source"}),z=()=>x(!0),E=()=>x(!1);return _.jsxs(_.Fragment,{children:[(t===!0||t==="source")&&_.jsx(Yp,{position:d,centerX:r,centerY:s,radius:a,onMouseDown:S,onMouseEnter:z,onMouseOut:E,type:"source"}),(t===!0||t==="target")&&_.jsx(Yp,{position:h,centerX:c,centerY:u,radius:a,onMouseDown:M,onMouseEnter:z,onMouseOut:E,type:"target"})]})}function mC({id:t,edgesFocusable:a,edgesReconnectable:l,elementsSelectable:r,onClick:s,onDoubleClick:c,onContextMenu:u,onMouseEnter:d,onMouseMove:h,onMouseLeave:m,reconnectRadius:p,onReconnect:y,onReconnectStart:v,onReconnectEnd:x,rfId:w,edgeTypes:N,noPanClassName:S,onError:M,disableKeyboardA11y:z}){let E=qe(ge=>ge.edgeLookup.get(t));const T=qe(ge=>ge.defaultEdgeOptions);E=T?{...T,...E}:E;let q=E.type||"default",R=N?.[q]||qp[q];R===void 0&&(M?.("011",jn.error011(q)),q="default",R=N?.default||qp.default);const O=!!(E.focusable||a&&typeof E.focusable>"u"),C=typeof y<"u"&&(E.reconnectable||l&&typeof E.reconnectable>"u"),D=!!(E.selectable||r&&typeof E.selectable>"u"),Z=K.useRef(null),[B,V]=K.useState(!1),[W,H]=K.useState(!1),I=at(),{zIndex:j,sourceX:G,sourceY:U,targetX:P,targetY:re,sourcePosition:k,targetPosition:Q}=qe(K.useCallback(ge=>{const me=ge.nodeLookup.get(E.source),Me=ge.nodeLookup.get(E.target);if(!me||!Me)return{zIndex:E.zIndex,...Up};const He=r2({id:t,sourceNode:me,targetNode:Me,sourceHandle:E.sourceHandle||null,targetHandle:E.targetHandle||null,connectionMode:ge.connectionMode,onError:M});return{zIndex:P_({selected:E.selected,zIndex:E.zIndex,sourceNode:me,targetNode:Me,elevateOnSelect:ge.elevateEdgesOnSelect,zIndexMode:ge.zIndexMode}),...He||Up}},[E.source,E.target,E.sourceHandle,E.targetHandle,E.selected,E.zIndex]),tt),L=K.useMemo(()=>E.markerStart?`url('#${ac(E.markerStart,w)}')`:void 0,[E.markerStart,w]),Y=K.useMemo(()=>E.markerEnd?`url('#${ac(E.markerEnd,w)}')`:void 0,[E.markerEnd,w]);if(E.hidden||G===null||U===null||P===null||re===null)return null;const F=ge=>{const{addSelectedEdges:me,unselectNodesAndEdges:Me,multiSelectionActive:He}=I.getState();D&&(I.setState({nodesSelectionActive:!1}),E.selected&&He?(Me({nodes:[],edges:[E]}),Z.current?.blur()):me([t])),s&&s(ge,E)},ne=c?ge=>{c(ge,{...E})}:void 0,ae=u?ge=>{u(ge,{...E})}:void 0,oe=d?ge=>{d(ge,{...E})}:void 0,fe=h?ge=>{h(ge,{...E})}:void 0,pe=m?ge=>{m(ge,{...E})}:void 0,Ee=ge=>{if(!z&&Pm.includes(ge.key)&&D){const{unselectNodesAndEdges:me,addSelectedEdges:Me}=I.getState();ge.key==="Escape"?(Z.current?.blur(),me({edges:[E]})):Me([t])}};return _.jsx("svg",{style:{zIndex:j},children:_.jsxs("g",{className:ct(["react-flow__edge",`react-flow__edge-${q}`,E.className,S,{selected:E.selected,animated:E.animated,inactive:!D&&!s,updating:B,selectable:D}]),onClick:F,onDoubleClick:ne,onContextMenu:ae,onMouseEnter:oe,onMouseMove:fe,onMouseLeave:pe,onKeyDown:O?Ee:void 0,tabIndex:O?0:void 0,role:E.ariaRole??(O?"group":"img"),"aria-roledescription":"edge","data-id":t,"data-testid":`rf__edge-${t}`,"aria-label":E.ariaLabel===null?void 0:E.ariaLabel||`Edge from ${E.source} to ${E.target}`,"aria-describedby":O?`${Pg}-${w}`:void 0,ref:Z,...E.domAttributes,children:[!W&&_.jsx(R,{id:t,source:E.source,target:E.target,type:E.type,selected:E.selected,animated:E.animated,selectable:D,deletable:E.deletable??!0,label:E.label,labelStyle:E.labelStyle,labelShowBg:E.labelShowBg,labelBgStyle:E.labelBgStyle,labelBgPadding:E.labelBgPadding,labelBgBorderRadius:E.labelBgBorderRadius,sourceX:G,sourceY:U,targetX:P,targetY:re,sourcePosition:k,targetPosition:Q,data:E.data,style:E.style,sourceHandleId:E.sourceHandle,targetHandleId:E.targetHandle,markerStart:L,markerEnd:Y,pathOptions:"pathOptions"in E?E.pathOptions:void 0,interactionWidth:E.interactionWidth}),C&&_.jsx(hC,{edge:E,isReconnectable:C,reconnectRadius:p,onReconnect:y,onReconnectStart:v,onReconnectEnd:x,sourceX:G,sourceY:U,targetX:P,targetY:re,sourcePosition:k,targetPosition:Q,setUpdateHover:V,setReconnecting:H})]})})}var gC=K.memo(mC);const pC=t=>({edgesFocusable:t.edgesFocusable,edgesReconnectable:t.edgesReconnectable,elementsSelectable:t.elementsSelectable,connectionMode:t.connectionMode,onError:t.onError});function Gp({defaultMarkerColor:t,onlyRenderVisibleElements:a,rfId:l,edgeTypes:r,noPanClassName:s,onReconnect:c,onEdgeContextMenu:u,onEdgeMouseEnter:d,onEdgeMouseMove:h,onEdgeMouseLeave:m,onEdgeClick:p,reconnectRadius:y,onEdgeDoubleClick:v,onReconnectStart:x,onReconnectEnd:w,disableKeyboardA11y:N}){const{edgesFocusable:S,edgesReconnectable:M,elementsSelectable:z,onError:E}=qe(pC,tt),T=eC(a);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(lC,{defaultColor:t,rfId:l}),T.map(q=>_.jsx(gC,{id:q,edgesFocusable:S,edgesReconnectable:M,elementsSelectable:z,noPanClassName:s,onReconnect:c,onContextMenu:u,onMouseEnter:d,onMouseMove:h,onMouseLeave:m,onClick:p,reconnectRadius:y,onDoubleClick:v,onReconnectStart:x,onReconnectEnd:w,rfId:l,onError:E,edgeTypes:r,disableKeyboardA11y:N},q))]})}Gp.displayName="EdgeRenderer";const yC=K.memo(Gp),vC=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function bC({children:t}){const a=qe(vC);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:a},children:t})}function xC(t){const a=er(),l=K.useRef(!1);K.useEffect(()=>{!l.current&&a.viewportInitialized&&t&&(setTimeout(()=>t(a),1),l.current=!0)},[t,a.viewportInitialized])}const wC=t=>t.panZoom?.syncViewport;function SC(t){const a=qe(wC),l=at();return K.useEffect(()=>{t&&(a?.(t),l.setState({transform:[t.x,t.y,t.zoom]}))},[t,a]),null}function EC(t){return t.connection.inProgress?{...t.connection,to:Fl(t.connection.to,t.transform)}:{...t.connection}}function _C(t){return EC}function NC(t){const a=_C();return qe(a,tt)}const CC=t=>({nodesConnectable:t.nodesConnectable,isValid:t.connection.isValid,inProgress:t.connection.inProgress,width:t.width,height:t.height});function MC({containerStyle:t,style:a,type:l,component:r}){const{nodesConnectable:s,width:c,height:u,isValid:d,inProgress:h}=qe(CC,tt);return!(c&&s&&h)?null:_.jsx("svg",{style:t,width:c,height:u,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:ct(["react-flow__connection",ng(d)]),children:_.jsx(Xp,{style:a,type:l,CustomComponent:r,isValid:d})})})}const Xp=({style:t,type:a=vi.Bezier,CustomComponent:l,isValid:r})=>{const{inProgress:s,from:c,fromNode:u,fromHandle:d,fromPosition:h,to:m,toNode:p,toHandle:y,toPosition:v,pointer:x}=NC();if(!s)return;if(l)return _.jsx(l,{connectionLineType:a,connectionLineStyle:t,fromNode:u,fromHandle:d,fromX:c.x,fromY:c.y,toX:m.x,toY:m.y,fromPosition:h,toPosition:v,connectionStatus:ng(r),toNode:p,toHandle:y,pointer:x});let w="";const N={sourceX:c.x,sourceY:c.y,sourcePosition:h,targetX:m.x,targetY:m.y,targetPosition:v};switch(a){case vi.Bezier:[w]=ic(N);break;case vi.SimpleBezier:[w]=Mp(N);break;case vi.Step:[w]=Ho({...N,borderRadius:0});break;case vi.SmoothStep:[w]=Ho(N);break;default:[w]=wg(N)}return _.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:t})};Xp.displayName="ConnectionLine";const TC={};function Zp(t=TC){K.useRef(t),at(),K.useEffect(()=>{},[t])}function AC(){at(),K.useRef(!1),K.useEffect(()=>{},[])}function Qp({nodeTypes:t,edgeTypes:a,onInit:l,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:c,onEdgeDoubleClick:u,onNodeMouseEnter:d,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:p,onSelectionContextMenu:y,onSelectionStart:v,onSelectionEnd:x,connectionLineType:w,connectionLineStyle:N,connectionLineComponent:S,connectionLineContainerStyle:M,selectionKeyCode:z,selectionOnDrag:E,selectionMode:T,multiSelectionKeyCode:q,panActivationKeyCode:R,zoomActivationKeyCode:O,deleteKeyCode:C,onlyRenderVisibleElements:D,elementsSelectable:Z,defaultViewport:B,translateExtent:V,minZoom:W,maxZoom:H,preventScrolling:I,defaultMarkerColor:j,zoomOnScroll:G,zoomOnPinch:U,panOnScroll:P,panOnScrollSpeed:re,panOnScrollMode:k,zoomOnDoubleClick:Q,panOnDrag:L,onPaneClick:Y,onPaneMouseEnter:F,onPaneMouseMove:ne,onPaneMouseLeave:ae,onPaneScroll:oe,onPaneContextMenu:fe,paneClickDistance:pe,nodeClickDistance:Ee,onEdgeContextMenu:ge,onEdgeMouseEnter:me,onEdgeMouseMove:Me,onEdgeMouseLeave:He,reconnectRadius:Ge,onReconnect:dt,onReconnectStart:Bt,onReconnectEnd:Dt,noDragClassName:Ft,noWheelClassName:Sn,noPanClassName:Rn,disableKeyboardA11y:Kn,nodeExtent:xt,rfId:Ni,viewport:En,onViewportChange:Dn}){return Zp(t),Zp(a),AC(),xC(l),SC(En),_.jsx(XN,{onPaneClick:Y,onPaneMouseEnter:F,onPaneMouseMove:ne,onPaneMouseLeave:ae,onPaneContextMenu:fe,onPaneScroll:oe,paneClickDistance:pe,deleteKeyCode:C,selectionKeyCode:z,selectionOnDrag:E,selectionMode:T,onSelectionStart:v,onSelectionEnd:x,multiSelectionKeyCode:q,panActivationKeyCode:R,zoomActivationKeyCode:O,elementsSelectable:Z,zoomOnScroll:G,zoomOnPinch:U,zoomOnDoubleClick:Q,panOnScroll:P,panOnScrollSpeed:re,panOnScrollMode:k,panOnDrag:L,defaultViewport:B,translateExtent:V,minZoom:W,maxZoom:H,onSelectionContextMenu:y,preventScrolling:I,noDragClassName:Ft,noWheelClassName:Sn,noPanClassName:Rn,disableKeyboardA11y:Kn,onViewportChange:Dn,isControlledViewport:!!En,children:_.jsxs(bC,{children:[_.jsx(yC,{edgeTypes:a,onEdgeClick:s,onEdgeDoubleClick:u,onReconnect:dt,onReconnectStart:Bt,onReconnectEnd:Dt,onlyRenderVisibleElements:D,onEdgeContextMenu:ge,onEdgeMouseEnter:me,onEdgeMouseMove:Me,onEdgeMouseLeave:He,reconnectRadius:Ge,defaultMarkerColor:j,noPanClassName:Rn,disableKeyboardA11y:Kn,rfId:Ni}),_.jsx(MC,{style:N,type:w,component:S,containerStyle:M}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(WN,{nodeTypes:t,onNodeClick:r,onNodeDoubleClick:c,onNodeMouseEnter:d,onNodeMouseMove:h,onNodeMouseLeave:m,onNodeContextMenu:p,nodeClickDistance:Ee,onlyRenderVisibleElements:D,noPanClassName:Rn,noDragClassName:Ft,disableKeyboardA11y:Kn,nodeExtent:xt,rfId:Ni}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}Qp.displayName="GraphView";const zC=K.memo(Qp),Ip=({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:d,minZoom:h=.5,maxZoom:m=2,nodeOrigin:p,nodeExtent:y,zIndexMode:v="basic"}={})=>{const x=new Map,w=new Map,N=new Map,S=new Map,M=r??a??[],z=l??t??[],E=p??[0,0],T=y??Zl;zg(N,S,M);const q=sc(z,x,w,{nodeOrigin:E,nodeExtent:T,zIndexMode:v});let R=[0,0,1];if(u&&s&&c){const O=Il(x,{filter:B=>!!((B.width||B.initialWidth)&&(B.height||B.initialHeight))}),{x:C,y:D,zoom:Z}=Do(O,s,c,h,m,d?.padding??.1);R=[C,D,Z]}return{rfId:"1",width:s??0,height:c??0,transform:R,nodes:z,nodesInitialized:q,nodeLookup:x,parentLookup:w,edges:M,edgeLookup:S,connectionLookup:N,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:l!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:h,maxZoom:m,translateExtent:Zl,nodeExtent:T,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:la.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:E,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:u??!1,fitViewOptions:d,fitViewResolver:null,connection:{...eg},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:Q_,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:Wm,zIndexMode:v,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},OC=({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:u,fitViewOptions:d,minZoom:h,maxZoom:m,nodeOrigin:p,nodeExtent:y,zIndexMode:v})=>F2((x,w)=>{async function N(){const{nodeLookup:S,panZoom:M,fitViewOptions:z,fitViewResolver:E,width:T,height:q,minZoom:R,maxZoom:O}=w();M&&(await X_({nodes:S,width:T,height:q,panZoom:M,minZoom:R,maxZoom:O},z),E?.resolve(!0),x({fitViewResolver:null}))}return{...Ip({nodes:t,edges:a,width:s,height:c,fitView:u,fitViewOptions:d,minZoom:h,maxZoom:m,nodeOrigin:p,nodeExtent:y,defaultNodes:l,defaultEdges:r,zIndexMode:v}),setNodes:S=>{const{nodeLookup:M,parentLookup:z,nodeOrigin:E,elevateNodesOnSelect:T,fitViewQueued:q,zIndexMode:R}=w(),O=sc(S,M,z,{nodeOrigin:E,nodeExtent:y,elevateNodesOnSelect:T,checkEquality:!0,zIndexMode:R});q&&O?(N(),x({nodes:S,nodesInitialized:O,fitViewQueued:!1,fitViewOptions:void 0})):x({nodes:S,nodesInitialized:O})},setEdges:S=>{const{connectionLookup:M,edgeLookup:z}=w();zg(M,z,S),x({edges:S})},setDefaultNodesAndEdges:(S,M)=>{if(S){const{setNodes:z}=w();z(S),x({hasDefaultNodes:!0})}if(M){const{setEdges:z}=w();z(M),x({hasDefaultEdges:!0})}},updateNodeInternals:S=>{const{triggerNodeChanges:M,nodeLookup:z,parentLookup:E,domNode:T,nodeOrigin:q,nodeExtent:R,debug:O,fitViewQueued:C,zIndexMode:D}=w(),{changes:Z,updatedInternals:B}=m2(S,z,E,T,q,R,D);B&&(c2(z,E,{nodeOrigin:q,nodeExtent:R,zIndexMode:D}),C?(N(),x({fitViewQueued:!1,fitViewOptions:void 0})):x({}),Z?.length>0&&(O&&console.log("React Flow: trigger node changes",Z),M?.(Z)))},updateNodePositions:(S,M=!1)=>{const z=[];let E=[];const{nodeLookup:T,triggerNodeChanges:q,connection:R,updateConnection:O,onNodesChangeMiddlewareMap:C}=w();for(const[D,Z]of S){const B=T.get(D),V=!!(B?.expandParent&&B?.parentId&&Z?.position),W={id:D,type:"position",position:V?{x:Math.max(0,Z.position.x),y:Math.max(0,Z.position.y)}:Z.position,dragging:M};if(B&&R.inProgress&&R.fromNode.id===B.id){const H=sa(B,R.fromHandle,ye.Left,!0);O({...R,from:H})}V&&B.parentId&&z.push({id:D,parentId:B.parentId,rect:{...Z.internals.positionAbsolute,width:Z.measured.width??0,height:Z.measured.height??0}}),E.push(W)}if(z.length>0){const{parentLookup:D,nodeOrigin:Z}=w(),B=cc(z,T,D,Z);E.push(...B)}for(const D of C.values())E=D(E);q(E)},triggerNodeChanges:S=>{const{onNodesChange:M,setNodes:z,nodes:E,hasDefaultNodes:T,debug:q}=w();if(S?.length){if(T){const R=op(S,E);z(R)}q&&console.log("React Flow: trigger node changes",S),M?.(S)}},triggerEdgeChanges:S=>{const{onEdgesChange:M,setEdges:z,edges:E,hasDefaultEdges:T,debug:q}=w();if(S?.length){if(T){const R=sp(S,E);z(R)}q&&console.log("React Flow: trigger edge changes",S),M?.(S)}},addSelectedNodes:S=>{const{multiSelectionActive:M,edgeLookup:z,nodeLookup:E,triggerNodeChanges:T,triggerEdgeChanges:q}=w();if(M){const R=S.map(O=>ua(O,!0));T(R);return}T(Ya(E,new Set([...S]),!0)),q(Ya(z))},addSelectedEdges:S=>{const{multiSelectionActive:M,edgeLookup:z,nodeLookup:E,triggerNodeChanges:T,triggerEdgeChanges:q}=w();if(M){const R=S.map(O=>ua(O,!0));q(R);return}q(Ya(z,new Set([...S]))),T(Ya(E,new Set,!0))},unselectNodesAndEdges:({nodes:S,edges:M}={})=>{const{edges:z,nodes:E,nodeLookup:T,triggerNodeChanges:q,triggerEdgeChanges:R}=w(),O=S||E,C=M||z,D=O.map(B=>{const V=T.get(B.id);return V&&(V.selected=!1),ua(B.id,!1)}),Z=C.map(B=>ua(B.id,!1));q(D),R(Z)},setMinZoom:S=>{const{panZoom:M,maxZoom:z}=w();M?.setScaleExtent([S,z]),x({minZoom:S})},setMaxZoom:S=>{const{panZoom:M,minZoom:z}=w();M?.setScaleExtent([z,S]),x({maxZoom:S})},setTranslateExtent:S=>{w().panZoom?.setTranslateExtent(S),x({translateExtent:S})},resetSelectedElements:()=>{const{edges:S,nodes:M,triggerNodeChanges:z,triggerEdgeChanges:E,elementsSelectable:T}=w();if(!T)return;const q=M.reduce((O,C)=>C.selected?[...O,ua(C.id,!1)]:O,[]),R=S.reduce((O,C)=>C.selected?[...O,ua(C.id,!1)]:O,[]);z(q),E(R)},setNodeExtent:S=>{const{nodes:M,nodeLookup:z,parentLookup:E,nodeOrigin:T,elevateNodesOnSelect:q,nodeExtent:R,zIndexMode:O}=w();S[0][0]===R[0][0]&&S[0][1]===R[0][1]&&S[1][0]===R[1][0]&&S[1][1]===R[1][1]||(sc(M,z,E,{nodeOrigin:T,nodeExtent:S,elevateNodesOnSelect:q,checkEquality:!1,zIndexMode:O}),x({nodeExtent:S}))},panBy:S=>{const{transform:M,width:z,height:E,panZoom:T,translateExtent:q}=w();return g2({delta:S,panZoom:T,transform:M,translateExtent:q,width:z,height:E})},setCenter:async(S,M,z)=>{const{width:E,height:T,maxZoom:q,panZoom:R}=w();if(!R)return Promise.resolve(!1);const O=typeof z?.zoom<"u"?z.zoom:q;return await R.setViewport({x:E/2-S*O,y:T/2-M*O,zoom:O},{duration:z?.duration,ease:z?.ease,interpolate:z?.interpolate}),Promise.resolve(!0)},cancelConnection:()=>{x({connection:{...eg}})},updateConnection:S=>{x({connection:S})},reset:()=>x({...Ip()})}},Object.is);function $p({initialNodes:t,initialEdges:a,defaultNodes:l,defaultEdges:r,initialWidth:s,initialHeight:c,initialMinZoom:u,initialMaxZoom:d,initialFitViewOptions:h,fitView:m,nodeOrigin:p,nodeExtent:y,zIndexMode:v,children:x}){const[w]=K.useState(()=>OC({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,width:s,height:c,fitView:m,minZoom:u,maxZoom:d,fitViewOptions:h,nodeOrigin:p,nodeExtent:y,zIndexMode:v}));return _.jsx(J2,{value:w,children:_.jsx(bN,{children:x})})}function jC({children:t,nodes:a,edges:l,defaultNodes:r,defaultEdges:s,width:c,height:u,fitView:d,fitViewOptions:h,minZoom:m,maxZoom:p,nodeOrigin:y,nodeExtent:v,zIndexMode:x}){return K.useContext(qo)?_.jsx(_.Fragment,{children:t}):_.jsx($p,{initialNodes:a,initialEdges:l,defaultNodes:r,defaultEdges:s,initialWidth:c,initialHeight:u,fitView:d,initialFitViewOptions:h,initialMinZoom:m,initialMaxZoom:p,nodeOrigin:y,nodeExtent:v,zIndexMode:x,children:t})}const RC={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function DC({nodes:t,edges:a,defaultNodes:l,defaultEdges:r,className:s,nodeTypes:c,edgeTypes:u,onNodeClick:d,onEdgeClick:h,onInit:m,onMove:p,onMoveStart:y,onMoveEnd:v,onConnect:x,onConnectStart:w,onConnectEnd:N,onClickConnectStart:S,onClickConnectEnd:M,onNodeMouseEnter:z,onNodeMouseMove:E,onNodeMouseLeave:T,onNodeContextMenu:q,onNodeDoubleClick:R,onNodeDragStart:O,onNodeDrag:C,onNodeDragStop:D,onNodesDelete:Z,onEdgesDelete:B,onDelete:V,onSelectionChange:W,onSelectionDragStart:H,onSelectionDrag:I,onSelectionDragStop:j,onSelectionContextMenu:G,onSelectionStart:U,onSelectionEnd:P,onBeforeDelete:re,connectionMode:k,connectionLineType:Q=vi.Bezier,connectionLineStyle:L,connectionLineComponent:Y,connectionLineContainerStyle:F,deleteKeyCode:ne="Backspace",selectionKeyCode:ae="Shift",selectionOnDrag:oe=!1,selectionMode:fe=ka.Full,panActivationKeyCode:pe="Space",multiSelectionKeyCode:Ee=Jl()?"Meta":"Control",zoomActivationKeyCode:ge=Jl()?"Meta":"Control",snapToGrid:me,snapGrid:Me,onlyRenderVisibleElements:He=!1,selectNodesOnDrag:Ge,nodesDraggable:dt,autoPanOnNodeFocus:Bt,nodesConnectable:Dt,nodesFocusable:Ft,nodeOrigin:Sn=Wg,edgesFocusable:Rn,edgesReconnectable:Kn,elementsSelectable:xt=!0,defaultViewport:Ni=cN,minZoom:En=.5,maxZoom:Dn=2,translateExtent:kn=Zl,preventScrolling:fr=!0,nodeExtent:Ci,defaultMarkerColor:dr="#b1b1b7",zoomOnScroll:hr=!0,zoomOnPinch:Fn=!0,panOnScroll:Ct=!1,panOnScrollSpeed:rn=.5,panOnScrollMode:Mt=ra.Free,zoomOnDoubleClick:de=!0,panOnDrag:he=!0,onPaneClick:Se,onPaneMouseEnter:Ne,onPaneMouseMove:ze,onPaneMouseLeave:Qe,onPaneScroll:Ve,onPaneContextMenu:ht,paneClickDistance:Jt=1,nodeClickDistance:wt=0,children:Ka,onReconnect:Jn,onReconnectStart:fa,onReconnectEnd:Bf,onEdgeContextMenu:rs,onEdgeDoubleClick:os,onEdgeMouseEnter:ss,onEdgeMouseMove:mr,onEdgeMouseLeave:gr,reconnectRadius:us=10,onNodesChange:cs,onEdgesChange:Hn,noDragClassName:St="nodrag",noWheelClassName:Rt="nowheel",noPanClassName:Pn="nopan",fitView:Fa,fitViewOptions:fs,connectOnClick:qf,attributionPosition:ds,proOptions:da,defaultEdgeOptions:pr,elevateNodesOnSelect:Mi=!0,elevateEdgesOnSelect:Ti=!1,disableKeyboardA11y:Ai=!1,autoPanOnConnect:zi,autoPanOnNodeDrag:mt,autoPanSpeed:hs,connectionRadius:ms,isValidConnection:Wn,onError:Oi,style:Uf,id:yr,nodeDragThreshold:gs,connectionDragThreshold:Vf,viewport:Ja,onViewportChange:Pa,width:_n,height:qt,colorMode:ps="light",debug:Yf,onScroll:Wa,ariaLabelConfig:ys,zIndexMode:ha="basic",...Gf},Ut){const ma=yr||"1",vs=hN(ps),vr=K.useCallback(ei=>{ei.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),Wa?.(ei)},[Wa]);return _.jsx("div",{"data-testid":"rf__wrapper",...Gf,onScroll:vr,style:{...Uf,...RC},ref:Ut,className:ct(["react-flow",s,vs]),id:yr,role:"application",children:_.jsxs(jC,{nodes:t,edges:a,width:_n,height:qt,fitView:Fa,fitViewOptions:fs,minZoom:En,maxZoom:Dn,nodeOrigin:Sn,nodeExtent:Ci,zIndexMode:ha,children:[_.jsx(zC,{onInit:m,onNodeClick:d,onEdgeClick:h,onNodeMouseEnter:z,onNodeMouseMove:E,onNodeMouseLeave:T,onNodeContextMenu:q,onNodeDoubleClick:R,nodeTypes:c,edgeTypes:u,connectionLineType:Q,connectionLineStyle:L,connectionLineComponent:Y,connectionLineContainerStyle:F,selectionKeyCode:ae,selectionOnDrag:oe,selectionMode:fe,deleteKeyCode:ne,multiSelectionKeyCode:Ee,panActivationKeyCode:pe,zoomActivationKeyCode:ge,onlyRenderVisibleElements:He,defaultViewport:Ni,translateExtent:kn,minZoom:En,maxZoom:Dn,preventScrolling:fr,zoomOnScroll:hr,zoomOnPinch:Fn,zoomOnDoubleClick:de,panOnScroll:Ct,panOnScrollSpeed:rn,panOnScrollMode:Mt,panOnDrag:he,onPaneClick:Se,onPaneMouseEnter:Ne,onPaneMouseMove:ze,onPaneMouseLeave:Qe,onPaneScroll:Ve,onPaneContextMenu:ht,paneClickDistance:Jt,nodeClickDistance:wt,onSelectionContextMenu:G,onSelectionStart:U,onSelectionEnd:P,onReconnect:Jn,onReconnectStart:fa,onReconnectEnd:Bf,onEdgeContextMenu:rs,onEdgeDoubleClick:os,onEdgeMouseEnter:ss,onEdgeMouseMove:mr,onEdgeMouseLeave:gr,reconnectRadius:us,defaultMarkerColor:dr,noDragClassName:St,noWheelClassName:Rt,noPanClassName:Pn,rfId:ma,disableKeyboardA11y:Ai,nodeExtent:Ci,viewport:Ja,onViewportChange:Pa}),_.jsx(dN,{nodes:t,edges:a,defaultNodes:l,defaultEdges:r,onConnect:x,onConnectStart:w,onConnectEnd:N,onClickConnectStart:S,onClickConnectEnd:M,nodesDraggable:dt,autoPanOnNodeFocus:Bt,nodesConnectable:Dt,nodesFocusable:Ft,edgesFocusable:Rn,edgesReconnectable:Kn,elementsSelectable:xt,elevateNodesOnSelect:Mi,elevateEdgesOnSelect:Ti,minZoom:En,maxZoom:Dn,nodeExtent:Ci,onNodesChange:cs,onEdgesChange:Hn,snapToGrid:me,snapGrid:Me,connectionMode:k,translateExtent:kn,connectOnClick:qf,defaultEdgeOptions:pr,fitView:Fa,fitViewOptions:fs,onNodesDelete:Z,onEdgesDelete:B,onDelete:V,onNodeDragStart:O,onNodeDrag:C,onNodeDragStop:D,onSelectionDrag:I,onSelectionDragStart:H,onSelectionDragStop:j,onMove:p,onMoveStart:y,onMoveEnd:v,noPanClassName:Pn,nodeOrigin:Sn,rfId:ma,autoPanOnConnect:zi,autoPanOnNodeDrag:mt,autoPanSpeed:hs,onError:Oi,connectionRadius:ms,isValidConnection:Wn,selectNodesOnDrag:Ge,nodeDragThreshold:gs,connectionDragThreshold:Vf,onBeforeDelete:re,debug:Yf,ariaLabelConfig:ys,zIndexMode:ha}),_.jsx(uN,{onSelectionChange:W}),Ka,_.jsx(aN,{proOptions:da,position:ds}),_.jsx(iN,{rfId:ma,disableKeyboardA11y:Ai})]})})}var kC=dp(DC);function HC(t){const[a,l]=K.useState(t),r=K.useCallback(s=>l(c=>op(s,c)),[]);return[a,l,r]}function LC(t){const[a,l]=K.useState(t),r=K.useCallback(s=>l(c=>sp(s,c)),[]);return[a,l,r]}function Kp(t){return qe(K.useCallback(l=>l.nodeLookup.get(t),[t]),tt)}function BC({dimensions:t,lineWidth:a,variant:l,className:r}){return _.jsx("path",{strokeWidth:a,d:`M${t[0]/2} 0 V${t[1]} M0 ${t[1]/2} H${t[0]}`,className:ct(["react-flow__background-pattern",l,r])})}function qC({radius:t,className:a}){return _.jsx("circle",{cx:t,cy:t,r:t,className:ct(["react-flow__background-pattern","dots",a])})}var Qn;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Qn||(Qn={}));const UC={[Qn.Dots]:1,[Qn.Lines]:1,[Qn.Cross]:6},VC=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Fp({id:t,variant:a=Qn.Dots,gap:l=20,size:r,lineWidth:s=1,offset:c=0,color:u,bgColor:d,style:h,className:m,patternClassName:p}){const y=K.useRef(null),{transform:v,patternId:x}=qe(VC,tt),w=r||UC[a],N=a===Qn.Dots,S=a===Qn.Cross,M=Array.isArray(l)?l:[l,l],z=[M[0]*v[2]||1,M[1]*v[2]||1],E=w*v[2],T=Array.isArray(c)?c:[c,c],q=S?[E,E]:z,R=[T[0]*v[2]||1+q[0]/2,T[1]*v[2]||1+q[1]/2],O=`${x}${t||""}`;return _.jsxs("svg",{className:ct(["react-flow__background",m]),style:{...h,...Vo,"--xy-background-color-props":d,"--xy-background-pattern-color-props":u},ref:y,"data-testid":"rf__background",children:[_.jsx("pattern",{id:O,x:v[0]%z[0],y:v[1]%z[1],width:z[0],height:z[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${R[0]},-${R[1]})`,children:N?_.jsx(qC,{radius:E/2,className:p}):_.jsx(BC,{dimensions:q,lineWidth:s,variant:a,className:p})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${O})`})]})}Fp.displayName="Background";const YC=K.memo(Fp);function GC(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",children:_.jsx("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"})})}function XC(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function ZC(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30",children:_.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 QC(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.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 IC(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32",children:_.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 Go({children:t,className:a,...l}){return _.jsx("button",{type:"button",className:ct(["react-flow__controls-button",a]),...l,children:t})}const $C=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom,ariaLabelConfig:t.ariaLabelConfig});function Jp({style:t,showZoom:a=!0,showFitView:l=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:c,onZoomOut:u,onFitView:d,onInteractiveChange:h,className:m,children:p,position:y="bottom-left",orientation:v="vertical","aria-label":x}){const w=at(),{isInteractive:N,minZoomReached:S,maxZoomReached:M,ariaLabelConfig:z}=qe($C,tt),{zoomIn:E,zoomOut:T,fitView:q}=er(),R=()=>{E(),c?.()},O=()=>{T(),u?.()},C=()=>{q(s),d?.()},D=()=>{w.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),h?.(!N)},Z=v==="horizontal"?"horizontal":"vertical";return _.jsxs(wi,{className:ct(["react-flow__controls",Z,m]),position:y,style:t,"data-testid":"rf__controls","aria-label":x??z["controls.ariaLabel"],children:[a&&_.jsxs(_.Fragment,{children:[_.jsx(Go,{onClick:R,className:"react-flow__controls-zoomin",title:z["controls.zoomIn.ariaLabel"],"aria-label":z["controls.zoomIn.ariaLabel"],disabled:M,children:_.jsx(GC,{})}),_.jsx(Go,{onClick:O,className:"react-flow__controls-zoomout",title:z["controls.zoomOut.ariaLabel"],"aria-label":z["controls.zoomOut.ariaLabel"],disabled:S,children:_.jsx(XC,{})})]}),l&&_.jsx(Go,{className:"react-flow__controls-fitview",onClick:C,title:z["controls.fitView.ariaLabel"],"aria-label":z["controls.fitView.ariaLabel"],children:_.jsx(ZC,{})}),r&&_.jsx(Go,{className:"react-flow__controls-interactive",onClick:D,title:z["controls.interactive.ariaLabel"],"aria-label":z["controls.interactive.ariaLabel"],children:N?_.jsx(IC,{}):_.jsx(QC,{})}),p]})}Jp.displayName="Controls",K.memo(Jp);function KC({id:t,x:a,y:l,width:r,height:s,style:c,color:u,strokeColor:d,strokeWidth:h,className:m,borderRadius:p,shapeRendering:y,selected:v,onClick:x}){const{background:w,backgroundColor:N}=c||{},S=u||w||N;return _.jsx("rect",{className:ct(["react-flow__minimap-node",{selected:v},m]),x:a,y:l,rx:p,ry:p,width:r,height:s,style:{fill:S,stroke:d,strokeWidth:h},shapeRendering:y,onClick:x?M=>x(M,t):void 0})}const FC=K.memo(KC),JC=t=>t.nodes.map(a=>a.id),Sc=t=>t instanceof Function?t:()=>t;function PC({nodeStrokeColor:t,nodeColor:a,nodeClassName:l="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:c=FC,onClick:u}){const d=qe(JC,tt),h=Sc(a),m=Sc(t),p=Sc(l),y=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:d.map(v=>_.jsx(eM,{id:v,nodeColorFunc:h,nodeStrokeColorFunc:m,nodeClassNameFunc:p,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:c,onClick:u,shapeRendering:y},v))})}function WC({id:t,nodeColorFunc:a,nodeStrokeColorFunc:l,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:c,shapeRendering:u,NodeComponent:d,onClick:h}){const{node:m,x:p,y,width:v,height:x}=qe(w=>{const{internals:N}=w.nodeLookup.get(t),S=N.userNode,{x:M,y:z}=N.positionAbsolute,{width:E,height:T}=Zn(S);return{node:S,x:M,y:z,width:E,height:T}},tt);return!m||m.hidden||!fg(m)?null:_.jsx(d,{x:p,y,width:v,height:x,style:m.style,selected:!!m.selected,className:r(m),color:a(m),borderRadius:s,strokeColor:l(m),strokeWidth:c,shapeRendering:u,onClick:h,id:m.id})}const eM=K.memo(WC);var tM=K.memo(PC);const nM=200,iM=150,aM=t=>!t.hidden,lM=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?ug(Il(t.nodeLookup,{filter:aM}),a):a,rfId:t.rfId,panZoom:t.panZoom,translateExtent:t.translateExtent,flowWidth:t.width,flowHeight:t.height,ariaLabelConfig:t.ariaLabelConfig}},rM="react-flow__minimap-desc";function Pp({style:t,className:a,nodeStrokeColor:l,nodeColor:r,nodeClassName:s="",nodeBorderRadius:c=5,nodeStrokeWidth:u,nodeComponent:d,bgColor:h,maskColor:m,maskStrokeColor:p,maskStrokeWidth:y,position:v="bottom-right",onClick:x,onNodeClick:w,pannable:N=!1,zoomable:S=!1,ariaLabel:M,inversePan:z,zoomStep:E=1,offsetScale:T=5}){const q=at(),R=K.useRef(null),{boundingRect:O,viewBB:C,rfId:D,panZoom:Z,translateExtent:B,flowWidth:V,flowHeight:W,ariaLabelConfig:H}=qe(lM,tt),I=t?.width??nM,j=t?.height??iM,G=O.width/I,U=O.height/j,P=Math.max(G,U),re=P*I,k=P*j,Q=T*P,L=O.x-(re-O.width)/2-Q,Y=O.y-(k-O.height)/2-Q,F=re+Q*2,ne=k+Q*2,ae=`${rM}-${D}`,oe=K.useRef(0),fe=K.useRef();oe.current=P,K.useEffect(()=>{if(R.current&&Z)return fe.current=_2({domNode:R.current,panZoom:Z,getTransform:()=>q.getState().transform,getViewScale:()=>oe.current}),()=>{fe.current?.destroy()}},[Z]),K.useEffect(()=>{fe.current?.update({translateExtent:B,width:V,height:W,inversePan:z,pannable:N,zoomStep:E,zoomable:S})},[N,S,z,E,B,V,W]);const pe=x?me=>{const[Me,He]=fe.current?.pointer(me)||[0,0];x(me,{x:Me,y:He})}:void 0,Ee=w?K.useCallback((me,Me)=>{const He=q.getState().nodeLookup.get(Me).internals.userNode;w(me,He)},[]):void 0,ge=M??H["minimap.ariaLabel"];return _.jsx(wi,{position:v,style:{...t,"--xy-minimap-background-color-props":typeof h=="string"?h:void 0,"--xy-minimap-mask-background-color-props":typeof m=="string"?m:void 0,"--xy-minimap-mask-stroke-color-props":typeof p=="string"?p:void 0,"--xy-minimap-mask-stroke-width-props":typeof y=="number"?y*P:void 0,"--xy-minimap-node-background-color-props":typeof r=="string"?r:void 0,"--xy-minimap-node-stroke-color-props":typeof l=="string"?l:void 0,"--xy-minimap-node-stroke-width-props":typeof u=="number"?u:void 0},className:ct(["react-flow__minimap",a]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:I,height:j,viewBox:`${L} ${Y} ${F} ${ne}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":ae,ref:R,onClick:pe,children:[ge&&_.jsx("title",{id:ae,children:ge}),_.jsx(tM,{onClick:Ee,nodeColor:r,nodeStrokeColor:l,nodeBorderRadius:c,nodeClassName:s,nodeStrokeWidth:u,nodeComponent:d}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${L-Q},${Y-Q}h${F+Q*2}v${ne+Q*2}h${-F-Q*2}z
15
+ M${C.x},${C.y}h${C.width}v${C.height}h${-C.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}Pp.displayName="MiniMap",K.memo(Pp);const oM=t=>a=>t?`${Math.max(1/a.transform[2],1)}`:void 0,sM={[Va.Line]:"right",[Va.Handle]:"bottom-right"};function uM({nodeId:t,position:a,variant:l=Va.Handle,className:r,style:s=void 0,children:c,color:u,minWidth:d=10,minHeight:h=10,maxWidth:m=Number.MAX_VALUE,maxHeight:p=Number.MAX_VALUE,keepAspectRatio:y=!1,resizeDirection:v,autoScale:x=!0,shouldResize:w,onResizeStart:N,onResize:S,onResizeEnd:M}){const z=vp(),E=typeof t=="string"?t:z,T=at(),q=K.useRef(null),R=l===Va.Handle,O=qe(K.useCallback(oM(R&&x),[R,x]),tt),C=K.useRef(null),D=a??sM[l];K.useEffect(()=>{if(!(!q.current||!E))return C.current||(C.current=B2({domNode:q.current,nodeId:E,getStoreItems:()=>{const{nodeLookup:B,transform:V,snapGrid:W,snapToGrid:H,nodeOrigin:I,domNode:j}=T.getState();return{nodeLookup:B,transform:V,snapGrid:W,snapToGrid:H,nodeOrigin:I,paneDomNode:j}},onChange:(B,V)=>{const{triggerNodeChanges:W,nodeLookup:H,parentLookup:I,nodeOrigin:j}=T.getState(),G=[],U={x:B.x,y:B.y},P=H.get(E);if(P&&P.expandParent&&P.parentId){const re=P.origin??j,k=B.width??P.measured.width??0,Q=B.height??P.measured.height??0,L={id:P.id,parentId:P.parentId,rect:{width:k,height:Q,...dg({x:B.x??P.position.x,y:B.y??P.position.y},{width:k,height:Q},P.parentId,H,re)}},Y=cc([L],H,I,j);G.push(...Y),U.x=B.x?Math.max(re[0]*k,B.x):void 0,U.y=B.y?Math.max(re[1]*Q,B.y):void 0}if(U.x!==void 0&&U.y!==void 0){const re={id:E,type:"position",position:{...U}};G.push(re)}if(B.width!==void 0&&B.height!==void 0){const k={id:E,type:"dimensions",resizing:!0,setAttributes:v?v==="horizontal"?"width":"height":!0,dimensions:{width:B.width,height:B.height}};G.push(k)}for(const re of V){const k={...re,type:"position"};G.push(k)}W(G)},onEnd:({width:B,height:V})=>{const W={id:E,type:"dimensions",resizing:!1,dimensions:{width:B,height:V}};T.getState().triggerNodeChanges([W])}})),C.current.update({controlPosition:D,boundaries:{minWidth:d,minHeight:h,maxWidth:m,maxHeight:p},keepAspectRatio:y,resizeDirection:v,onResizeStart:N,onResize:S,onResizeEnd:M,shouldResize:w}),()=>{C.current?.destroy()}},[D,d,h,m,p,y,N,S,M,w]);const Z=D.split("-");return _.jsx("div",{className:ct(["react-flow__resize-control","nodrag",...Z,l,r]),ref:q,style:{...s,scale:O,...u&&{[R?"backgroundColor":"borderColor"]:u}},children:c})}K.memo(uM);function cM(t,a){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;const l=document.implementation.createHTMLDocument(),r=l.createElement("base"),s=l.createElement("a");return l.head.appendChild(r),l.body.appendChild(s),a&&(r.href=a),s.href=t,s.href}const fM=(()=>{let t=0;const a=()=>`0000${(Math.random()*36**4<<0).toString(36)}`.slice(-4);return()=>(t+=1,`u${a()}${t}`)})();function Si(t){const a=[];for(let l=0,r=t.length;l<r;l++)a.push(t[l]);return a}let Xa=null;function Wp(t={}){return Xa||(t.includeStyleProperties?(Xa=t.includeStyleProperties,Xa):(Xa=Si(window.getComputedStyle(document.documentElement)),Xa))}function Xo(t,a){const r=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(a);return r?parseFloat(r.replace("px","")):0}function dM(t){const a=Xo(t,"border-left-width"),l=Xo(t,"border-right-width");return t.clientWidth+a+l}function hM(t){const a=Xo(t,"border-top-width"),l=Xo(t,"border-bottom-width");return t.clientHeight+a+l}function e0(t,a={}){const l=a.width||dM(t),r=a.height||hM(t);return{width:l,height:r}}function mM(){let t,a;try{a=process}catch{}const l=a&&a.env?a.env.devicePixelRatio:null;return l&&(t=parseInt(l,10),Number.isNaN(t)&&(t=1)),t||window.devicePixelRatio||1}const Kt=16384;function gM(t){(t.width>Kt||t.height>Kt)&&(t.width>Kt&&t.height>Kt?t.width>t.height?(t.height*=Kt/t.width,t.width=Kt):(t.width*=Kt/t.height,t.height=Kt):t.width>Kt?(t.height*=Kt/t.width,t.width=Kt):(t.width*=Kt/t.height,t.height=Kt))}function Zo(t){return new Promise((a,l)=>{const r=new Image;r.onload=()=>{r.decode().then(()=>{requestAnimationFrame(()=>a(r))})},r.onerror=l,r.crossOrigin="anonymous",r.decoding="async",r.src=t})}async function pM(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(a=>`data:image/svg+xml;charset=utf-8,${a}`)}async function yM(t,a,l){const r="http://www.w3.org/2000/svg",s=document.createElementNS(r,"svg"),c=document.createElementNS(r,"foreignObject");return s.setAttribute("width",`${a}`),s.setAttribute("height",`${l}`),s.setAttribute("viewBox",`0 0 ${a} ${l}`),c.setAttribute("width","100%"),c.setAttribute("height","100%"),c.setAttribute("x","0"),c.setAttribute("y","0"),c.setAttribute("externalResourcesRequired","true"),s.appendChild(c),c.appendChild(t),pM(s)}const Lt=(t,a)=>{if(t instanceof a)return!0;const l=Object.getPrototypeOf(t);return l===null?!1:l.constructor.name===a.name||Lt(l,a)};function vM(t){const a=t.getPropertyValue("content");return`${t.cssText} content: '${a.replace(/'|"/g,"")}';`}function bM(t,a){return Wp(a).map(l=>{const r=t.getPropertyValue(l),s=t.getPropertyPriority(l);return`${l}: ${r}${s?" !important":""};`}).join(" ")}function xM(t,a,l,r){const s=`.${t}:${a}`,c=l.cssText?vM(l):bM(l,r);return document.createTextNode(`${s}{${c}}`)}function t0(t,a,l,r){const s=window.getComputedStyle(t,l),c=s.getPropertyValue("content");if(c===""||c==="none")return;const u=fM();try{a.className=`${a.className} ${u}`}catch{return}const d=document.createElement("style");d.appendChild(xM(u,l,s,r)),a.appendChild(d)}function wM(t,a,l){t0(t,a,":before",l),t0(t,a,":after",l)}const n0="application/font-woff",i0="image/jpeg",SM={woff:n0,woff2:n0,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:i0,jpeg:i0,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function EM(t){const a=/\.([^./]*?)$/g.exec(t);return a?a[1]:""}function Ec(t){const a=EM(t).toLowerCase();return SM[a]||""}function _M(t){return t.split(/,/)[1]}function _c(t){return t.search(/^(data:)/)!==-1}function NM(t,a){return`data:${a};base64,${t}`}async function a0(t,a,l){const r=await fetch(t,a);if(r.status===404)throw new Error(`Resource "${r.url}" not found`);const s=await r.blob();return new Promise((c,u)=>{const d=new FileReader;d.onerror=u,d.onloadend=()=>{try{c(l({res:r,result:d.result}))}catch(h){u(h)}},d.readAsDataURL(s)})}const Nc={};function CM(t,a,l){let r=t.replace(/\?.*/,"");return l&&(r=t),/ttf|otf|eot|woff2?/i.test(r)&&(r=r.replace(/.*\//,"")),a?`[${a}]${r}`:r}async function Cc(t,a,l){const r=CM(t,a,l.includeQueryParams);if(Nc[r]!=null)return Nc[r];l.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());let s;try{const c=await a0(t,l.fetchRequestInit,({res:u,result:d})=>(a||(a=u.headers.get("Content-Type")||""),_M(d)));s=NM(c,a)}catch(c){s=l.imagePlaceholder||"";let u=`Failed to fetch resource: ${t}`;c&&(u=typeof c=="string"?c:c.message),u&&console.warn(u)}return Nc[r]=s,s}async function MM(t){const a=t.toDataURL();return a==="data:,"?t.cloneNode(!1):Zo(a)}async function TM(t,a){if(t.currentSrc){const c=document.createElement("canvas"),u=c.getContext("2d");c.width=t.clientWidth,c.height=t.clientHeight,u?.drawImage(t,0,0,c.width,c.height);const d=c.toDataURL();return Zo(d)}const l=t.poster,r=Ec(l),s=await Cc(l,r,a);return Zo(s)}async function AM(t,a){var l;try{if(!((l=t?.contentDocument)===null||l===void 0)&&l.body)return await Qo(t.contentDocument.body,a,!0)}catch{}return t.cloneNode(!1)}async function zM(t,a){return Lt(t,HTMLCanvasElement)?MM(t):Lt(t,HTMLVideoElement)?TM(t,a):Lt(t,HTMLIFrameElement)?AM(t,a):t.cloneNode(l0(t))}const OM=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SLOT",l0=t=>t.tagName!=null&&t.tagName.toUpperCase()==="SVG";async function jM(t,a,l){var r,s;if(l0(a))return a;let c=[];return OM(t)&&t.assignedNodes?c=Si(t.assignedNodes()):Lt(t,HTMLIFrameElement)&&(!((r=t.contentDocument)===null||r===void 0)&&r.body)?c=Si(t.contentDocument.body.childNodes):c=Si(((s=t.shadowRoot)!==null&&s!==void 0?s:t).childNodes),c.length===0||Lt(t,HTMLVideoElement)||await c.reduce((u,d)=>u.then(()=>Qo(d,l)).then(h=>{h&&a.appendChild(h)}),Promise.resolve()),a}function RM(t,a,l){const r=a.style;if(!r)return;const s=window.getComputedStyle(t);s.cssText?(r.cssText=s.cssText,r.transformOrigin=s.transformOrigin):Wp(l).forEach(c=>{let u=s.getPropertyValue(c);c==="font-size"&&u.endsWith("px")&&(u=`${Math.floor(parseFloat(u.substring(0,u.length-2)))-.1}px`),Lt(t,HTMLIFrameElement)&&c==="display"&&u==="inline"&&(u="block"),c==="d"&&a.getAttribute("d")&&(u=`path(${a.getAttribute("d")})`),r.setProperty(c,u,s.getPropertyPriority(c))})}function DM(t,a){Lt(t,HTMLTextAreaElement)&&(a.innerHTML=t.value),Lt(t,HTMLInputElement)&&a.setAttribute("value",t.value)}function kM(t,a){if(Lt(t,HTMLSelectElement)){const r=Array.from(a.children).find(s=>t.value===s.getAttribute("value"));r&&r.setAttribute("selected","")}}function HM(t,a,l){return Lt(a,Element)&&(RM(t,a,l),wM(t,a,l),DM(t,a),kM(t,a)),a}async function LM(t,a){const l=t.querySelectorAll?t.querySelectorAll("use"):[];if(l.length===0)return t;const r={};for(let c=0;c<l.length;c++){const d=l[c].getAttribute("xlink:href");if(d){const h=t.querySelector(d),m=document.querySelector(d);!h&&m&&!r[d]&&(r[d]=await Qo(m,a,!0))}}const s=Object.values(r);if(s.length){const c="http://www.w3.org/1999/xhtml",u=document.createElementNS(c,"svg");u.setAttribute("xmlns",c),u.style.position="absolute",u.style.width="0",u.style.height="0",u.style.overflow="hidden",u.style.display="none";const d=document.createElementNS(c,"defs");u.appendChild(d);for(let h=0;h<s.length;h++)d.appendChild(s[h]);t.appendChild(u)}return t}async function Qo(t,a,l){return!l&&a.filter&&!a.filter(t)?null:Promise.resolve(t).then(r=>zM(r,a)).then(r=>jM(t,r,a)).then(r=>HM(t,r,a)).then(r=>LM(r,a))}const r0=/url\((['"]?)([^'"]+?)\1\)/g,BM=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,qM=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;function UM(t){const a=t.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1");return new RegExp(`(url\\(['"]?)(${a})(['"]?\\))`,"g")}function VM(t){const a=[];return t.replace(r0,(l,r,s)=>(a.push(s),l)),a.filter(l=>!_c(l))}async function YM(t,a,l,r,s){try{const c=l?cM(a,l):a,u=Ec(a);let d;return s||(d=await Cc(c,u,r)),t.replace(UM(a),`$1${d}$3`)}catch{}return t}function GM(t,{preferredFontFormat:a}){return a?t.replace(qM,l=>{for(;;){const[r,,s]=BM.exec(l)||[];if(!s)return"";if(s===a)return`src: ${r};`}}):t}function o0(t){return t.search(r0)!==-1}async function s0(t,a,l){if(!o0(t))return t;const r=GM(t,l);return VM(r).reduce((c,u)=>c.then(d=>YM(d,u,a,l)),Promise.resolve(r))}async function Za(t,a,l){var r;const s=(r=a.style)===null||r===void 0?void 0:r.getPropertyValue(t);if(s){const c=await s0(s,null,l);return a.style.setProperty(t,c,a.style.getPropertyPriority(t)),!0}return!1}async function XM(t,a){await Za("background",t,a)||await Za("background-image",t,a),await Za("mask",t,a)||await Za("-webkit-mask",t,a)||await Za("mask-image",t,a)||await Za("-webkit-mask-image",t,a)}async function ZM(t,a){const l=Lt(t,HTMLImageElement);if(!(l&&!_c(t.src))&&!(Lt(t,SVGImageElement)&&!_c(t.href.baseVal)))return;const r=l?t.src:t.href.baseVal,s=await Cc(r,Ec(r),a);await new Promise((c,u)=>{t.onload=c,t.onerror=a.onImageErrorHandler?(...h)=>{try{c(a.onImageErrorHandler(...h))}catch(m){u(m)}}:u;const d=t;d.decode&&(d.decode=c),d.loading==="lazy"&&(d.loading="eager"),l?(t.srcset="",t.src=s):t.href.baseVal=s})}async function QM(t,a){const r=Si(t.childNodes).map(s=>u0(s,a));await Promise.all(r).then(()=>t)}async function u0(t,a){Lt(t,Element)&&(await XM(t,a),await ZM(t,a),await QM(t,a))}function IM(t,a){const{style:l}=t;a.backgroundColor&&(l.backgroundColor=a.backgroundColor),a.width&&(l.width=`${a.width}px`),a.height&&(l.height=`${a.height}px`);const r=a.style;return r!=null&&Object.keys(r).forEach(s=>{l[s]=r[s]}),t}const c0={};async function f0(t){let a=c0[t];if(a!=null)return a;const r=await(await fetch(t)).text();return a={url:t,cssText:r},c0[t]=a,a}async function d0(t,a){let l=t.cssText;const r=/url\(["']?([^"')]+)["']?\)/g,c=(l.match(/url\([^)]+\)/g)||[]).map(async u=>{let d=u.replace(r,"$1");return d.startsWith("https://")||(d=new URL(d,t.url).href),a0(d,a.fetchRequestInit,({result:h})=>(l=l.replace(u,`url(${h})`),[u,h]))});return Promise.all(c).then(()=>l)}function h0(t){if(t==null)return[];const a=[],l=/(\/\*[\s\S]*?\*\/)/gi;let r=t.replace(l,"");const s=new RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){const h=s.exec(r);if(h===null)break;a.push(h[0])}r=r.replace(s,"");const c=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,u="((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})",d=new RegExp(u,"gi");for(;;){let h=c.exec(r);if(h===null){if(h=d.exec(r),h===null)break;c.lastIndex=d.lastIndex}else d.lastIndex=c.lastIndex;a.push(h[0])}return a}async function $M(t,a){const l=[],r=[];return t.forEach(s=>{if("cssRules"in s)try{Si(s.cssRules||[]).forEach((c,u)=>{if(c.type===CSSRule.IMPORT_RULE){let d=u+1;const h=c.href,m=f0(h).then(p=>d0(p,a)).then(p=>h0(p).forEach(y=>{try{s.insertRule(y,y.startsWith("@import")?d+=1:s.cssRules.length)}catch(v){console.error("Error inserting rule from remote css",{rule:y,error:v})}})).catch(p=>{console.error("Error loading remote css",p.toString())});r.push(m)}})}catch(c){const u=t.find(d=>d.href==null)||document.styleSheets[0];s.href!=null&&r.push(f0(s.href).then(d=>d0(d,a)).then(d=>h0(d).forEach(h=>{u.insertRule(h,u.cssRules.length)})).catch(d=>{console.error("Error loading remote stylesheet",d)})),console.error("Error inlining remote css file",c)}}),Promise.all(r).then(()=>(t.forEach(s=>{if("cssRules"in s)try{Si(s.cssRules||[]).forEach(c=>{l.push(c)})}catch(c){console.error(`Error while reading CSS rules from ${s.href}`,c)}}),l))}function KM(t){return t.filter(a=>a.type===CSSRule.FONT_FACE_RULE).filter(a=>o0(a.style.getPropertyValue("src")))}async function FM(t,a){if(t.ownerDocument==null)throw new Error("Provided element is not within a Document");const l=Si(t.ownerDocument.styleSheets),r=await $M(l,a);return KM(r)}function m0(t){return t.trim().replace(/["']/g,"")}function JM(t){const a=new Set;function l(r){(r.style.fontFamily||getComputedStyle(r).fontFamily).split(",").forEach(c=>{a.add(m0(c))}),Array.from(r.children).forEach(c=>{c instanceof HTMLElement&&l(c)})}return l(t),a}async function PM(t,a){const l=await FM(t,a),r=JM(t);return(await Promise.all(l.filter(c=>r.has(m0(c.style.fontFamily))).map(c=>{const u=c.parentStyleSheet?c.parentStyleSheet.href:null;return s0(c.cssText,u,a)}))).join(`
16
+ `)}async function WM(t,a){const l=a.fontEmbedCSS!=null?a.fontEmbedCSS:a.skipFonts?null:await PM(t,a);if(l){const r=document.createElement("style"),s=document.createTextNode(l);r.appendChild(s),t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r)}}async function g0(t,a={}){const{width:l,height:r}=e0(t,a),s=await Qo(t,a,!0);return await WM(s,a),await u0(s,a),IM(s,a),await yM(s,l,r)}async function eT(t,a={}){const{width:l,height:r}=e0(t,a),s=await g0(t,a),c=await Zo(s),u=document.createElement("canvas"),d=u.getContext("2d"),h=a.pixelRatio||mM(),m=a.canvasWidth||l,p=a.canvasHeight||r;return u.width=m*h,u.height=p*h,a.skipAutoScale||gM(u),u.style.width=`${m}`,u.style.height=`${p}`,a.backgroundColor&&(d.fillStyle=a.backgroundColor,d.fillRect(0,0,u.width,u.height)),d.drawImage(c,0,0,u.width,u.height),u}async function tT(t,a={}){return(await eT(t,a)).toDataURL()}function p0(t){var a,l,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var s=t.length;for(a=0;a<s;a++)t[a]&&(l=p0(t[a]))&&(r&&(r+=" "),r+=l)}else for(l in t)t[l]&&(r&&(r+=" "),r+=l);return r}function nT(){for(var t,a,l=0,r="",s=arguments.length;l<s;l++)(t=arguments[l])&&(a=p0(t))&&(r&&(r+=" "),r+=a);return r}const iT=(t,a)=>{const l=new Array(t.length+a.length);for(let r=0;r<t.length;r++)l[r]=t[r];for(let r=0;r<a.length;r++)l[t.length+r]=a[r];return l},aT=(t,a)=>({classGroupId:t,validator:a}),y0=(t=new Map,a=null,l)=>({nextPart:t,validators:a,classGroupId:l}),Io="-",v0=[],lT="arbitrary..",rT=t=>{const a=sT(t),{conflictingClassGroups:l,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:u=>{if(u.startsWith("[")&&u.endsWith("]"))return oT(u);const d=u.split(Io),h=d[0]===""&&d.length>1?1:0;return b0(d,h,a)},getConflictingClassGroupIds:(u,d)=>{if(d){const h=r[u],m=l[u];return h?m?iT(m,h):h:m||v0}return l[u]||v0}}},b0=(t,a,l)=>{if(t.length-a===0)return l.classGroupId;const s=t[a],c=l.nextPart.get(s);if(c){const m=b0(t,a+1,c);if(m)return m}const u=l.validators;if(u===null)return;const d=a===0?t.join(Io):t.slice(a).join(Io),h=u.length;for(let m=0;m<h;m++){const p=u[m];if(p.validator(d))return p.classGroupId}},oT=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const a=t.slice(1,-1),l=a.indexOf(":"),r=a.slice(0,l);return r?lT+r:void 0})(),sT=t=>{const{theme:a,classGroups:l}=t;return uT(l,a)},uT=(t,a)=>{const l=y0();for(const r in t){const s=t[r];Mc(s,l,r,a)}return l},Mc=(t,a,l,r)=>{const s=t.length;for(let c=0;c<s;c++){const u=t[c];cT(u,a,l,r)}},cT=(t,a,l,r)=>{if(typeof t=="string"){fT(t,a,l);return}if(typeof t=="function"){dT(t,a,l,r);return}hT(t,a,l,r)},fT=(t,a,l)=>{const r=t===""?a:x0(a,t);r.classGroupId=l},dT=(t,a,l,r)=>{if(mT(t)){Mc(t(r),a,l,r);return}a.validators===null&&(a.validators=[]),a.validators.push(aT(l,t))},hT=(t,a,l,r)=>{const s=Object.entries(t),c=s.length;for(let u=0;u<c;u++){const[d,h]=s[u];Mc(h,x0(a,d),l,r)}},x0=(t,a)=>{let l=t;const r=a.split(Io),s=r.length;for(let c=0;c<s;c++){const u=r[c];let d=l.nextPart.get(u);d||(d=y0(),l.nextPart.set(u,d)),l=d}return l},mT=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,gT=t=>{if(t<1)return{get:()=>{},set:()=>{}};let a=0,l=Object.create(null),r=Object.create(null);const s=(c,u)=>{l[c]=u,a++,a>t&&(a=0,r=l,l=Object.create(null))};return{get(c){let u=l[c];if(u!==void 0)return u;if((u=r[c])!==void 0)return s(c,u),u},set(c,u){c in l?l[c]=u:s(c,u)}}},Tc="!",w0=":",pT=[],S0=(t,a,l,r,s)=>({modifiers:t,hasImportantModifier:a,baseClassName:l,maybePostfixModifierPosition:r,isExternal:s}),yT=t=>{const{prefix:a,experimentalParseClassName:l}=t;let r=s=>{const c=[];let u=0,d=0,h=0,m;const p=s.length;for(let N=0;N<p;N++){const S=s[N];if(u===0&&d===0){if(S===w0){c.push(s.slice(h,N)),h=N+1;continue}if(S==="/"){m=N;continue}}S==="["?u++:S==="]"?u--:S==="("?d++:S===")"&&d--}const y=c.length===0?s:s.slice(h);let v=y,x=!1;y.endsWith(Tc)?(v=y.slice(0,-1),x=!0):y.startsWith(Tc)&&(v=y.slice(1),x=!0);const w=m&&m>h?m-h:void 0;return S0(c,x,v,w)};if(a){const s=a+w0,c=r;r=u=>u.startsWith(s)?c(u.slice(s.length)):S0(pT,!1,u,void 0,!0)}if(l){const s=r;r=c=>l({className:c,parseClassName:s})}return r},vT=t=>{const a=new Map;return t.orderSensitiveModifiers.forEach((l,r)=>{a.set(l,1e6+r)}),l=>{const r=[];let s=[];for(let c=0;c<l.length;c++){const u=l[c],d=u[0]==="[",h=a.has(u);d||h?(s.length>0&&(s.sort(),r.push(...s),s=[]),r.push(u)):s.push(u)}return s.length>0&&(s.sort(),r.push(...s)),r}},bT=t=>({cache:gT(t.cacheSize),parseClassName:yT(t),sortModifiers:vT(t),...rT(t)}),xT=/\s+/,wT=(t,a)=>{const{parseClassName:l,getClassGroupId:r,getConflictingClassGroupIds:s,sortModifiers:c}=a,u=[],d=t.trim().split(xT);let h="";for(let m=d.length-1;m>=0;m-=1){const p=d[m],{isExternal:y,modifiers:v,hasImportantModifier:x,baseClassName:w,maybePostfixModifierPosition:N}=l(p);if(y){h=p+(h.length>0?" "+h:h);continue}let S=!!N,M=r(S?w.substring(0,N):w);if(!M){if(!S){h=p+(h.length>0?" "+h:h);continue}if(M=r(w),!M){h=p+(h.length>0?" "+h:h);continue}S=!1}const z=v.length===0?"":v.length===1?v[0]:c(v).join(":"),E=x?z+Tc:z,T=E+M;if(u.indexOf(T)>-1)continue;u.push(T);const q=s(M,S);for(let R=0;R<q.length;++R){const O=q[R];u.push(E+O)}h=p+(h.length>0?" "+h:h)}return h},ST=(...t)=>{let a=0,l,r,s="";for(;a<t.length;)(l=t[a++])&&(r=E0(l))&&(s&&(s+=" "),s+=r);return s},E0=t=>{if(typeof t=="string")return t;let a,l="";for(let r=0;r<t.length;r++)t[r]&&(a=E0(t[r]))&&(l&&(l+=" "),l+=a);return l},ET=(t,...a)=>{let l,r,s,c;const u=h=>{const m=a.reduce((p,y)=>y(p),t());return l=bT(m),r=l.cache.get,s=l.cache.set,c=d,d(h)},d=h=>{const m=r(h);if(m)return m;const p=wT(h,l);return s(h,p),p};return c=u,(...h)=>c(ST(...h))},_T=[],bt=t=>{const a=l=>l[t]||_T;return a.isThemeGetter=!0,a},_0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,N0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,NT=/^\d+\/\d+$/,CT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,MT=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,TT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,AT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Qa=t=>NT.test(t),je=t=>!!t&&!Number.isNaN(Number(t)),Ei=t=>!!t&&Number.isInteger(Number(t)),Ac=t=>t.endsWith("%")&&je(t.slice(0,-1)),In=t=>CT.test(t),OT=()=>!0,jT=t=>MT.test(t)&&!TT.test(t),C0=()=>!1,RT=t=>AT.test(t),DT=t=>zT.test(t),kT=t=>!be(t)&&!xe(t),HT=t=>Ia(t,O0,C0),be=t=>_0.test(t),ca=t=>Ia(t,j0,jT),zc=t=>Ia(t,VT,je),M0=t=>Ia(t,A0,C0),LT=t=>Ia(t,z0,DT),$o=t=>Ia(t,R0,RT),xe=t=>N0.test(t),nr=t=>$a(t,j0),BT=t=>$a(t,YT),T0=t=>$a(t,A0),qT=t=>$a(t,O0),UT=t=>$a(t,z0),Ko=t=>$a(t,R0,!0),Ia=(t,a,l)=>{const r=_0.exec(t);return r?r[1]?a(r[1]):l(r[2]):!1},$a=(t,a,l=!1)=>{const r=N0.exec(t);return r?r[1]?a(r[1]):l:!1},A0=t=>t==="position"||t==="percentage",z0=t=>t==="image"||t==="url",O0=t=>t==="length"||t==="size"||t==="bg-size",j0=t=>t==="length",VT=t=>t==="number",YT=t=>t==="family-name",R0=t=>t==="shadow",GT=ET(()=>{const t=bt("color"),a=bt("font"),l=bt("text"),r=bt("font-weight"),s=bt("tracking"),c=bt("leading"),u=bt("breakpoint"),d=bt("container"),h=bt("spacing"),m=bt("radius"),p=bt("shadow"),y=bt("inset-shadow"),v=bt("text-shadow"),x=bt("drop-shadow"),w=bt("blur"),N=bt("perspective"),S=bt("aspect"),M=bt("ease"),z=bt("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...T(),xe,be],R=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],C=()=>[xe,be,h],D=()=>[Qa,"full","auto",...C()],Z=()=>[Ei,"none","subgrid",xe,be],B=()=>["auto",{span:["full",Ei,xe,be]},Ei,xe,be],V=()=>[Ei,"auto",xe,be],W=()=>["auto","min","max","fr",xe,be],H=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],I=()=>["start","end","center","stretch","center-safe","end-safe"],j=()=>["auto",...C()],G=()=>[Qa,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],U=()=>[t,xe,be],P=()=>[...T(),T0,M0,{position:[xe,be]}],re=()=>["no-repeat",{repeat:["","x","y","space","round"]}],k=()=>["auto","cover","contain",qT,HT,{size:[xe,be]}],Q=()=>[Ac,nr,ca],L=()=>["","none","full",m,xe,be],Y=()=>["",je,nr,ca],F=()=>["solid","dashed","dotted","double"],ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ae=()=>[je,Ac,T0,M0],oe=()=>["","none",w,xe,be],fe=()=>["none",je,xe,be],pe=()=>["none",je,xe,be],Ee=()=>[je,xe,be],ge=()=>[Qa,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[In],breakpoint:[In],color:[OT],container:[In],"drop-shadow":[In],ease:["in","out","in-out"],font:[kT],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[In],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[In],shadow:[In],spacing:["px",je],text:[In],"text-shadow":[In],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Qa,be,xe,S]}],container:["container"],columns:[{columns:[je,be,xe,d]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:q()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:D()}],"inset-x":[{"inset-x":D()}],"inset-y":[{"inset-y":D()}],start:[{start:D()}],end:[{end:D()}],top:[{top:D()}],right:[{right:D()}],bottom:[{bottom:D()}],left:[{left:D()}],visibility:["visible","invisible","collapse"],z:[{z:[Ei,"auto",xe,be]}],basis:[{basis:[Qa,"full","auto",d,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[je,Qa,"auto","initial","none",be]}],grow:[{grow:["",je,xe,be]}],shrink:[{shrink:["",je,xe,be]}],order:[{order:[Ei,"first","last","none",xe,be]}],"grid-cols":[{"grid-cols":Z()}],"col-start-end":[{col:B()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":Z()}],"row-start-end":[{row:B()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":W()}],"auto-rows":[{"auto-rows":W()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...H(),"normal"]}],"justify-items":[{"justify-items":[...I(),"normal"]}],"justify-self":[{"justify-self":["auto",...I()]}],"align-content":[{content:["normal",...H()]}],"align-items":[{items:[...I(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...I(),{baseline:["","last"]}]}],"place-content":[{"place-content":H()}],"place-items":[{"place-items":[...I(),"baseline"]}],"place-self":[{"place-self":["auto",...I()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:j()}],mx:[{mx:j()}],my:[{my:j()}],ms:[{ms:j()}],me:[{me:j()}],mt:[{mt:j()}],mr:[{mr:j()}],mb:[{mb:j()}],ml:[{ml:j()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:G()}],w:[{w:[d,"screen",...G()]}],"min-w":[{"min-w":[d,"screen","none",...G()]}],"max-w":[{"max-w":[d,"screen","none","prose",{screen:[u]},...G()]}],h:[{h:["screen","lh",...G()]}],"min-h":[{"min-h":["screen","lh","none",...G()]}],"max-h":[{"max-h":["screen","lh",...G()]}],"font-size":[{text:["base",l,nr,ca]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,xe,zc]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Ac,be]}],"font-family":[{font:[BT,be,a]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[s,xe,be]}],"line-clamp":[{"line-clamp":[je,"none",xe,zc]}],leading:[{leading:[c,...C()]}],"list-image":[{"list-image":["none",xe,be]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xe,be]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:U()}],"text-color":[{text:U()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...F(),"wavy"]}],"text-decoration-thickness":[{decoration:[je,"from-font","auto",xe,ca]}],"text-decoration-color":[{decoration:U()}],"underline-offset":[{"underline-offset":[je,"auto",xe,be]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xe,be]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",xe,be]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:re()}],"bg-size":[{bg:k()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ei,xe,be],radial:["",xe,be],conic:[Ei,xe,be]},UT,LT]}],"bg-color":[{bg:U()}],"gradient-from-pos":[{from:Q()}],"gradient-via-pos":[{via:Q()}],"gradient-to-pos":[{to:Q()}],"gradient-from":[{from:U()}],"gradient-via":[{via:U()}],"gradient-to":[{to:U()}],rounded:[{rounded:L()}],"rounded-s":[{"rounded-s":L()}],"rounded-e":[{"rounded-e":L()}],"rounded-t":[{"rounded-t":L()}],"rounded-r":[{"rounded-r":L()}],"rounded-b":[{"rounded-b":L()}],"rounded-l":[{"rounded-l":L()}],"rounded-ss":[{"rounded-ss":L()}],"rounded-se":[{"rounded-se":L()}],"rounded-ee":[{"rounded-ee":L()}],"rounded-es":[{"rounded-es":L()}],"rounded-tl":[{"rounded-tl":L()}],"rounded-tr":[{"rounded-tr":L()}],"rounded-br":[{"rounded-br":L()}],"rounded-bl":[{"rounded-bl":L()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...F(),"hidden","none"]}],"divide-style":[{divide:[...F(),"hidden","none"]}],"border-color":[{border:U()}],"border-color-x":[{"border-x":U()}],"border-color-y":[{"border-y":U()}],"border-color-s":[{"border-s":U()}],"border-color-e":[{"border-e":U()}],"border-color-t":[{"border-t":U()}],"border-color-r":[{"border-r":U()}],"border-color-b":[{"border-b":U()}],"border-color-l":[{"border-l":U()}],"divide-color":[{divide:U()}],"outline-style":[{outline:[...F(),"none","hidden"]}],"outline-offset":[{"outline-offset":[je,xe,be]}],"outline-w":[{outline:["",je,nr,ca]}],"outline-color":[{outline:U()}],shadow:[{shadow:["","none",p,Ko,$o]}],"shadow-color":[{shadow:U()}],"inset-shadow":[{"inset-shadow":["none",y,Ko,$o]}],"inset-shadow-color":[{"inset-shadow":U()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:U()}],"ring-offset-w":[{"ring-offset":[je,ca]}],"ring-offset-color":[{"ring-offset":U()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":U()}],"text-shadow":[{"text-shadow":["none",v,Ko,$o]}],"text-shadow-color":[{"text-shadow":U()}],opacity:[{opacity:[je,xe,be]}],"mix-blend":[{"mix-blend":[...ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":ne()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[je]}],"mask-image-linear-from-pos":[{"mask-linear-from":ae()}],"mask-image-linear-to-pos":[{"mask-linear-to":ae()}],"mask-image-linear-from-color":[{"mask-linear-from":U()}],"mask-image-linear-to-color":[{"mask-linear-to":U()}],"mask-image-t-from-pos":[{"mask-t-from":ae()}],"mask-image-t-to-pos":[{"mask-t-to":ae()}],"mask-image-t-from-color":[{"mask-t-from":U()}],"mask-image-t-to-color":[{"mask-t-to":U()}],"mask-image-r-from-pos":[{"mask-r-from":ae()}],"mask-image-r-to-pos":[{"mask-r-to":ae()}],"mask-image-r-from-color":[{"mask-r-from":U()}],"mask-image-r-to-color":[{"mask-r-to":U()}],"mask-image-b-from-pos":[{"mask-b-from":ae()}],"mask-image-b-to-pos":[{"mask-b-to":ae()}],"mask-image-b-from-color":[{"mask-b-from":U()}],"mask-image-b-to-color":[{"mask-b-to":U()}],"mask-image-l-from-pos":[{"mask-l-from":ae()}],"mask-image-l-to-pos":[{"mask-l-to":ae()}],"mask-image-l-from-color":[{"mask-l-from":U()}],"mask-image-l-to-color":[{"mask-l-to":U()}],"mask-image-x-from-pos":[{"mask-x-from":ae()}],"mask-image-x-to-pos":[{"mask-x-to":ae()}],"mask-image-x-from-color":[{"mask-x-from":U()}],"mask-image-x-to-color":[{"mask-x-to":U()}],"mask-image-y-from-pos":[{"mask-y-from":ae()}],"mask-image-y-to-pos":[{"mask-y-to":ae()}],"mask-image-y-from-color":[{"mask-y-from":U()}],"mask-image-y-to-color":[{"mask-y-to":U()}],"mask-image-radial":[{"mask-radial":[xe,be]}],"mask-image-radial-from-pos":[{"mask-radial-from":ae()}],"mask-image-radial-to-pos":[{"mask-radial-to":ae()}],"mask-image-radial-from-color":[{"mask-radial-from":U()}],"mask-image-radial-to-color":[{"mask-radial-to":U()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[je]}],"mask-image-conic-from-pos":[{"mask-conic-from":ae()}],"mask-image-conic-to-pos":[{"mask-conic-to":ae()}],"mask-image-conic-from-color":[{"mask-conic-from":U()}],"mask-image-conic-to-color":[{"mask-conic-to":U()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:re()}],"mask-size":[{mask:k()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xe,be]}],filter:[{filter:["","none",xe,be]}],blur:[{blur:oe()}],brightness:[{brightness:[je,xe,be]}],contrast:[{contrast:[je,xe,be]}],"drop-shadow":[{"drop-shadow":["","none",x,Ko,$o]}],"drop-shadow-color":[{"drop-shadow":U()}],grayscale:[{grayscale:["",je,xe,be]}],"hue-rotate":[{"hue-rotate":[je,xe,be]}],invert:[{invert:["",je,xe,be]}],saturate:[{saturate:[je,xe,be]}],sepia:[{sepia:["",je,xe,be]}],"backdrop-filter":[{"backdrop-filter":["","none",xe,be]}],"backdrop-blur":[{"backdrop-blur":oe()}],"backdrop-brightness":[{"backdrop-brightness":[je,xe,be]}],"backdrop-contrast":[{"backdrop-contrast":[je,xe,be]}],"backdrop-grayscale":[{"backdrop-grayscale":["",je,xe,be]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[je,xe,be]}],"backdrop-invert":[{"backdrop-invert":["",je,xe,be]}],"backdrop-opacity":[{"backdrop-opacity":[je,xe,be]}],"backdrop-saturate":[{"backdrop-saturate":[je,xe,be]}],"backdrop-sepia":[{"backdrop-sepia":["",je,xe,be]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xe,be]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[je,"initial",xe,be]}],ease:[{ease:["linear","initial",M,xe,be]}],delay:[{delay:[je,xe,be]}],animate:[{animate:["none",z,xe,be]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,xe,be]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:fe()}],"rotate-x":[{"rotate-x":fe()}],"rotate-y":[{"rotate-y":fe()}],"rotate-z":[{"rotate-z":fe()}],scale:[{scale:pe()}],"scale-x":[{"scale-x":pe()}],"scale-y":[{"scale-y":pe()}],"scale-z":[{"scale-z":pe()}],"scale-3d":["scale-3d"],skew:[{skew:Ee()}],"skew-x":[{"skew-x":Ee()}],"skew-y":[{"skew-y":Ee()}],transform:[{transform:[xe,be,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ge()}],"translate-x":[{"translate-x":ge()}],"translate-y":[{"translate-y":ge()}],"translate-z":[{"translate-z":ge()}],"translate-none":["translate-none"],accent:[{accent:U()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:U()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",xe,be]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",xe,be]}],fill:[{fill:["none",...U()]}],"stroke-w":[{stroke:[je,nr,ca,zc]}],stroke:[{stroke:["none",...U()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function _t(...t){return GT(nT(t))}var Oc,D0;function jc(){if(D0)return Oc;D0=1;var t="\0",a="\0",l="";class r{constructor(p){et(this,"_isDirected",!0);et(this,"_isMultigraph",!1);et(this,"_isCompound",!1);et(this,"_label");et(this,"_defaultNodeLabelFn",()=>{});et(this,"_defaultEdgeLabelFn",()=>{});et(this,"_nodes",{});et(this,"_in",{});et(this,"_preds",{});et(this,"_out",{});et(this,"_sucs",{});et(this,"_edgeObjs",{});et(this,"_edgeLabels",{});et(this,"_nodeCount",0);et(this,"_edgeCount",0);et(this,"_parent");et(this,"_children");p&&(this._isDirected=Object.hasOwn(p,"directed")?p.directed:!0,this._isMultigraph=Object.hasOwn(p,"multigraph")?p.multigraph:!1,this._isCompound=Object.hasOwn(p,"compound")?p.compound:!1),this._isCompound&&(this._parent={},this._children={},this._children[a]={})}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(p){return this._label=p,this}graph(){return this._label}setDefaultNodeLabel(p){return this._defaultNodeLabelFn=p,typeof p!="function"&&(this._defaultNodeLabelFn=()=>p),this}nodeCount(){return this._nodeCount}nodes(){return Object.keys(this._nodes)}sources(){var p=this;return this.nodes().filter(y=>Object.keys(p._in[y]).length===0)}sinks(){var p=this;return this.nodes().filter(y=>Object.keys(p._out[y]).length===0)}setNodes(p,y){var v=arguments,x=this;return p.forEach(function(w){v.length>1?x.setNode(w,y):x.setNode(w)}),this}setNode(p,y){return Object.hasOwn(this._nodes,p)?(arguments.length>1&&(this._nodes[p]=y),this):(this._nodes[p]=arguments.length>1?y:this._defaultNodeLabelFn(p),this._isCompound&&(this._parent[p]=a,this._children[p]={},this._children[a][p]=!0),this._in[p]={},this._preds[p]={},this._out[p]={},this._sucs[p]={},++this._nodeCount,this)}node(p){return this._nodes[p]}hasNode(p){return Object.hasOwn(this._nodes,p)}removeNode(p){var y=this;if(Object.hasOwn(this._nodes,p)){var v=x=>y.removeEdge(y._edgeObjs[x]);delete this._nodes[p],this._isCompound&&(this._removeFromParentsChildList(p),delete this._parent[p],this.children(p).forEach(function(x){y.setParent(x)}),delete this._children[p]),Object.keys(this._in[p]).forEach(v),delete this._in[p],delete this._preds[p],Object.keys(this._out[p]).forEach(v),delete this._out[p],delete this._sucs[p],--this._nodeCount}return this}setParent(p,y){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(y===void 0)y=a;else{y+="";for(var v=y;v!==void 0;v=this.parent(v))if(v===p)throw new Error("Setting "+y+" as parent of "+p+" would create a cycle");this.setNode(y)}return this.setNode(p),this._removeFromParentsChildList(p),this._parent[p]=y,this._children[y][p]=!0,this}_removeFromParentsChildList(p){delete this._children[this._parent[p]][p]}parent(p){if(this._isCompound){var y=this._parent[p];if(y!==a)return y}}children(p=a){if(this._isCompound){var y=this._children[p];if(y)return Object.keys(y)}else{if(p===a)return this.nodes();if(this.hasNode(p))return[]}}predecessors(p){var y=this._preds[p];if(y)return Object.keys(y)}successors(p){var y=this._sucs[p];if(y)return Object.keys(y)}neighbors(p){var y=this.predecessors(p);if(y){const x=new Set(y);for(var v of this.successors(p))x.add(v);return Array.from(x.values())}}isLeaf(p){var y;return this.isDirected()?y=this.successors(p):y=this.neighbors(p),y.length===0}filterNodes(p){var y=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});y.setGraph(this.graph());var v=this;Object.entries(this._nodes).forEach(function([N,S]){p(N)&&y.setNode(N,S)}),Object.values(this._edgeObjs).forEach(function(N){y.hasNode(N.v)&&y.hasNode(N.w)&&y.setEdge(N,v.edge(N))});var x={};function w(N){var S=v.parent(N);return S===void 0||y.hasNode(S)?(x[N]=S,S):S in x?x[S]:w(S)}return this._isCompound&&y.nodes().forEach(N=>y.setParent(N,w(N))),y}setDefaultEdgeLabel(p){return this._defaultEdgeLabelFn=p,typeof p!="function"&&(this._defaultEdgeLabelFn=()=>p),this}edgeCount(){return this._edgeCount}edges(){return Object.values(this._edgeObjs)}setPath(p,y){var v=this,x=arguments;return p.reduce(function(w,N){return x.length>1?v.setEdge(w,N,y):v.setEdge(w,N),N}),this}setEdge(){var p,y,v,x,w=!1,N=arguments[0];typeof N=="object"&&N!==null&&"v"in N?(p=N.v,y=N.w,v=N.name,arguments.length===2&&(x=arguments[1],w=!0)):(p=N,y=arguments[1],v=arguments[3],arguments.length>2&&(x=arguments[2],w=!0)),p=""+p,y=""+y,v!==void 0&&(v=""+v);var S=u(this._isDirected,p,y,v);if(Object.hasOwn(this._edgeLabels,S))return w&&(this._edgeLabels[S]=x),this;if(v!==void 0&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(p),this.setNode(y),this._edgeLabels[S]=w?x:this._defaultEdgeLabelFn(p,y,v);var M=d(this._isDirected,p,y,v);return p=M.v,y=M.w,Object.freeze(M),this._edgeObjs[S]=M,s(this._preds[y],p),s(this._sucs[p],y),this._in[y][S]=M,this._out[p][S]=M,this._edgeCount++,this}edge(p,y,v){var x=arguments.length===1?h(this._isDirected,arguments[0]):u(this._isDirected,p,y,v);return this._edgeLabels[x]}edgeAsObj(){const p=this.edge(...arguments);return typeof p!="object"?{label:p}:p}hasEdge(p,y,v){var x=arguments.length===1?h(this._isDirected,arguments[0]):u(this._isDirected,p,y,v);return Object.hasOwn(this._edgeLabels,x)}removeEdge(p,y,v){var x=arguments.length===1?h(this._isDirected,arguments[0]):u(this._isDirected,p,y,v),w=this._edgeObjs[x];return w&&(p=w.v,y=w.w,delete this._edgeLabels[x],delete this._edgeObjs[x],c(this._preds[y],p),c(this._sucs[p],y),delete this._in[y][x],delete this._out[p][x],this._edgeCount--),this}inEdges(p,y){var v=this._in[p];if(v){var x=Object.values(v);return y?x.filter(w=>w.v===y):x}}outEdges(p,y){var v=this._out[p];if(v){var x=Object.values(v);return y?x.filter(w=>w.w===y):x}}nodeEdges(p,y){var v=this.inEdges(p,y);if(v)return v.concat(this.outEdges(p,y))}}function s(m,p){m[p]?m[p]++:m[p]=1}function c(m,p){--m[p]||delete m[p]}function u(m,p,y,v){var x=""+p,w=""+y;if(!m&&x>w){var N=x;x=w,w=N}return x+l+w+l+(v===void 0?t:v)}function d(m,p,y,v){var x=""+p,w=""+y;if(!m&&x>w){var N=x;x=w,w=N}var S={v:x,w};return v&&(S.name=v),S}function h(m,p){return u(m,p.v,p.w,p.name)}return Oc=r,Oc}var Rc,k0;function XT(){return k0||(k0=1,Rc="2.2.4"),Rc}var Dc,H0;function ZT(){return H0||(H0=1,Dc={Graph:jc(),version:XT()}),Dc}var kc,L0;function QT(){if(L0)return kc;L0=1;var t=jc();kc={write:a,read:s};function a(c){var u={options:{directed:c.isDirected(),multigraph:c.isMultigraph(),compound:c.isCompound()},nodes:l(c),edges:r(c)};return c.graph()!==void 0&&(u.value=structuredClone(c.graph())),u}function l(c){return c.nodes().map(function(u){var d=c.node(u),h=c.parent(u),m={v:u};return d!==void 0&&(m.value=d),h!==void 0&&(m.parent=h),m})}function r(c){return c.edges().map(function(u){var d=c.edge(u),h={v:u.v,w:u.w};return u.name!==void 0&&(h.name=u.name),d!==void 0&&(h.value=d),h})}function s(c){var u=new t(c.options).setGraph(c.value);return c.nodes.forEach(function(d){u.setNode(d.v,d.value),d.parent&&u.setParent(d.v,d.parent)}),c.edges.forEach(function(d){u.setEdge({v:d.v,w:d.w,name:d.name},d.value)}),u}return kc}var Hc,B0;function IT(){if(B0)return Hc;B0=1,Hc=t;function t(a){var l={},r=[],s;function c(u){Object.hasOwn(l,u)||(l[u]=!0,s.push(u),a.successors(u).forEach(c),a.predecessors(u).forEach(c))}return a.nodes().forEach(function(u){s=[],c(u),s.length&&r.push(s)}),r}return Hc}var Lc,q0;function U0(){if(q0)return Lc;q0=1;class t{constructor(){et(this,"_arr",[]);et(this,"_keyIndices",{})}size(){return this._arr.length}keys(){return this._arr.map(function(l){return l.key})}has(l){return Object.hasOwn(this._keyIndices,l)}priority(l){var r=this._keyIndices[l];if(r!==void 0)return this._arr[r].priority}min(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key}add(l,r){var s=this._keyIndices;if(l=String(l),!Object.hasOwn(s,l)){var c=this._arr,u=c.length;return s[l]=u,c.push({key:l,priority:r}),this._decrease(u),!0}return!1}removeMin(){this._swap(0,this._arr.length-1);var l=this._arr.pop();return delete this._keyIndices[l.key],this._heapify(0),l.key}decrease(l,r){var s=this._keyIndices[l];if(r>this._arr[s].priority)throw new Error("New priority is greater than current priority. Key: "+l+" Old: "+this._arr[s].priority+" New: "+r);this._arr[s].priority=r,this._decrease(s)}_heapify(l){var r=this._arr,s=2*l,c=s+1,u=l;s<r.length&&(u=r[s].priority<r[u].priority?s:u,c<r.length&&(u=r[c].priority<r[u].priority?c:u),u!==l&&(this._swap(l,u),this._heapify(u)))}_decrease(l){for(var r=this._arr,s=r[l].priority,c;l!==0&&(c=l>>1,!(r[c].priority<s));)this._swap(l,c),l=c}_swap(l,r){var s=this._arr,c=this._keyIndices,u=s[l],d=s[r];s[l]=d,s[r]=u,c[d.key]=l,c[u.key]=r}}return Lc=t,Lc}var Bc,V0;function Y0(){if(V0)return Bc;V0=1;var t=U0();Bc=l;var a=()=>1;function l(s,c,u,d){return r(s,String(c),u||a,d||function(h){return s.outEdges(h)})}function r(s,c,u,d){var h={},m=new t,p,y,v=function(x){var w=x.v!==p?x.v:x.w,N=h[w],S=u(x),M=y.distance+S;if(S<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+x+" Weight: "+S);M<N.distance&&(N.distance=M,N.predecessor=p,m.decrease(w,M))};for(s.nodes().forEach(function(x){var w=x===c?0:Number.POSITIVE_INFINITY;h[x]={distance:w},m.add(x,w)});m.size()>0&&(p=m.removeMin(),y=h[p],y.distance!==Number.POSITIVE_INFINITY);)d(p).forEach(v);return h}return Bc}var qc,G0;function $T(){if(G0)return qc;G0=1;var t=Y0();qc=a;function a(l,r,s){return l.nodes().reduce(function(c,u){return c[u]=t(l,u,r,s),c},{})}return qc}var Uc,X0;function Z0(){if(X0)return Uc;X0=1,Uc=t;function t(a){var l=0,r=[],s={},c=[];function u(d){var h=s[d]={onStack:!0,lowlink:l,index:l++};if(r.push(d),a.successors(d).forEach(function(y){Object.hasOwn(s,y)?s[y].onStack&&(h.lowlink=Math.min(h.lowlink,s[y].index)):(u(y),h.lowlink=Math.min(h.lowlink,s[y].lowlink))}),h.lowlink===h.index){var m=[],p;do p=r.pop(),s[p].onStack=!1,m.push(p);while(d!==p);c.push(m)}}return a.nodes().forEach(function(d){Object.hasOwn(s,d)||u(d)}),c}return Uc}var Vc,Q0;function KT(){if(Q0)return Vc;Q0=1;var t=Z0();Vc=a;function a(l){return t(l).filter(function(r){return r.length>1||r.length===1&&l.hasEdge(r[0],r[0])})}return Vc}var Yc,I0;function FT(){if(I0)return Yc;I0=1,Yc=a;var t=()=>1;function a(r,s,c){return l(r,s||t,c||function(u){return r.outEdges(u)})}function l(r,s,c){var u={},d=r.nodes();return d.forEach(function(h){u[h]={},u[h][h]={distance:0},d.forEach(function(m){h!==m&&(u[h][m]={distance:Number.POSITIVE_INFINITY})}),c(h).forEach(function(m){var p=m.v===h?m.w:m.v,y=s(m);u[h][p]={distance:y,predecessor:h}})}),d.forEach(function(h){var m=u[h];d.forEach(function(p){var y=u[p];d.forEach(function(v){var x=y[h],w=m[v],N=y[v],S=x.distance+w.distance;S<N.distance&&(N.distance=S,N.predecessor=w.predecessor)})})}),u}return Yc}var Gc,$0;function K0(){if($0)return Gc;$0=1;function t(l){var r={},s={},c=[];function u(d){if(Object.hasOwn(s,d))throw new a;Object.hasOwn(r,d)||(s[d]=!0,r[d]=!0,l.predecessors(d).forEach(u),delete s[d],c.push(d))}if(l.sinks().forEach(u),Object.keys(r).length!==l.nodeCount())throw new a;return c}class a extends Error{constructor(){super(...arguments)}}return Gc=t,t.CycleException=a,Gc}var Xc,F0;function JT(){if(F0)return Xc;F0=1;var t=K0();Xc=a;function a(l){try{t(l)}catch(r){if(r instanceof t.CycleException)return!1;throw r}return!0}return Xc}var Zc,J0;function P0(){if(J0)return Zc;J0=1,Zc=t;function t(s,c,u){Array.isArray(c)||(c=[c]);var d=s.isDirected()?y=>s.successors(y):y=>s.neighbors(y),h=u==="post"?a:l,m=[],p={};return c.forEach(y=>{if(!s.hasNode(y))throw new Error("Graph does not have node: "+y);h(y,d,p,m)}),m}function a(s,c,u,d){for(var h=[[s,!1]];h.length>0;){var m=h.pop();m[1]?d.push(m[0]):Object.hasOwn(u,m[0])||(u[m[0]]=!0,h.push([m[0],!0]),r(c(m[0]),p=>h.push([p,!1])))}}function l(s,c,u,d){for(var h=[s];h.length>0;){var m=h.pop();Object.hasOwn(u,m)||(u[m]=!0,d.push(m),r(c(m),p=>h.push(p)))}}function r(s,c){for(var u=s.length;u--;)c(s[u],u,s);return s}return Zc}var Qc,W0;function PT(){if(W0)return Qc;W0=1;var t=P0();Qc=a;function a(l,r){return t(l,r,"post")}return Qc}var Ic,ey;function WT(){if(ey)return Ic;ey=1;var t=P0();Ic=a;function a(l,r){return t(l,r,"pre")}return Ic}var $c,ty;function eA(){if(ty)return $c;ty=1;var t=jc(),a=U0();$c=l;function l(r,s){var c=new t,u={},d=new a,h;function m(y){var v=y.v===h?y.w:y.v,x=d.priority(v);if(x!==void 0){var w=s(y);w<x&&(u[v]=h,d.decrease(v,w))}}if(r.nodeCount()===0)return c;r.nodes().forEach(function(y){d.add(y,Number.POSITIVE_INFINITY),c.setNode(y)}),d.decrease(r.nodes()[0],0);for(var p=!1;d.size()>0;){if(h=d.removeMin(),Object.hasOwn(u,h))c.setEdge(h,u[h]);else{if(p)throw new Error("Input graph is not connected: "+r);p=!0}r.nodeEdges(h).forEach(m)}return c}return $c}var Kc,ny;function tA(){return ny||(ny=1,Kc={components:IT(),dijkstra:Y0(),dijkstraAll:$T(),findCycles:KT(),floydWarshall:FT(),isAcyclic:JT(),postorder:PT(),preorder:WT(),prim:eA(),tarjan:Z0(),topsort:K0()}),Kc}var Fc,iy;function wn(){if(iy)return Fc;iy=1;var t=ZT();return Fc={Graph:t.Graph,json:QT(),alg:tA(),version:t.version},Fc}var Jc,ay;function nA(){if(ay)return Jc;ay=1;class t{constructor(){let s={};s._next=s._prev=s,this._sentinel=s}dequeue(){let s=this._sentinel,c=s._prev;if(c!==s)return a(c),c}enqueue(s){let c=this._sentinel;s._prev&&s._next&&a(s),s._next=c._next,c._next._prev=s,c._next=s,s._prev=c}toString(){let s=[],c=this._sentinel,u=c._prev;for(;u!==c;)s.push(JSON.stringify(u,l)),u=u._prev;return"["+s.join(", ")+"]"}}function a(r){r._prev._next=r._next,r._next._prev=r._prev,delete r._next,delete r._prev}function l(r,s){if(r!=="_next"&&r!=="_prev")return s}return Jc=t,Jc}var Pc,ly;function iA(){if(ly)return Pc;ly=1;let t=wn().Graph,a=nA();Pc=r;let l=()=>1;function r(m,p){if(m.nodeCount()<=1)return[];let y=u(m,p||l);return s(y.graph,y.buckets,y.zeroIdx).flatMap(x=>m.outEdges(x.v,x.w))}function s(m,p,y){let v=[],x=p[p.length-1],w=p[0],N;for(;m.nodeCount();){for(;N=w.dequeue();)c(m,p,y,N);for(;N=x.dequeue();)c(m,p,y,N);if(m.nodeCount()){for(let S=p.length-2;S>0;--S)if(N=p[S].dequeue(),N){v=v.concat(c(m,p,y,N,!0));break}}}return v}function c(m,p,y,v,x){let w=x?[]:void 0;return m.inEdges(v.v).forEach(N=>{let S=m.edge(N),M=m.node(N.v);x&&w.push({v:N.v,w:N.w}),M.out-=S,d(p,y,M)}),m.outEdges(v.v).forEach(N=>{let S=m.edge(N),M=N.w,z=m.node(M);z.in-=S,d(p,y,z)}),m.removeNode(v.v),w}function u(m,p){let y=new t,v=0,x=0;m.nodes().forEach(S=>{y.setNode(S,{v:S,in:0,out:0})}),m.edges().forEach(S=>{let M=y.edge(S.v,S.w)||0,z=p(S),E=M+z;y.setEdge(S.v,S.w,E),x=Math.max(x,y.node(S.v).out+=z),v=Math.max(v,y.node(S.w).in+=z)});let w=h(x+v+3).map(()=>new a),N=v+1;return y.nodes().forEach(S=>{d(w,N,y.node(S))}),{graph:y,buckets:w,zeroIdx:N}}function d(m,p,y){y.out?y.in?m[y.out-y.in+p].enqueue(y):m[m.length-1].enqueue(y):m[0].enqueue(y)}function h(m){const p=[];for(let y=0;y<m;y++)p.push(y);return p}return Pc}var Wc,ry;function ft(){if(ry)return Wc;ry=1;let t=wn().Graph;Wc={addBorderNode:p,addDummyNode:a,applyWithChunking:x,asNonCompoundGraph:r,buildLayerMatrix:d,intersectRect:u,mapValues:R,maxRank:w,normalizeRanks:h,notime:M,partition:N,pick:q,predecessorWeights:c,range:T,removeEmptyRanks:m,simplify:l,successorWeights:s,time:S,uniqueId:E,zipObject:O};function a(C,D,Z,B){for(var V=B;C.hasNode(V);)V=E(B);return Z.dummy=D,C.setNode(V,Z),V}function l(C){let D=new t().setGraph(C.graph());return C.nodes().forEach(Z=>D.setNode(Z,C.node(Z))),C.edges().forEach(Z=>{let B=D.edge(Z.v,Z.w)||{weight:0,minlen:1},V=C.edge(Z);D.setEdge(Z.v,Z.w,{weight:B.weight+V.weight,minlen:Math.max(B.minlen,V.minlen)})}),D}function r(C){let D=new t({multigraph:C.isMultigraph()}).setGraph(C.graph());return C.nodes().forEach(Z=>{C.children(Z).length||D.setNode(Z,C.node(Z))}),C.edges().forEach(Z=>{D.setEdge(Z,C.edge(Z))}),D}function s(C){let D=C.nodes().map(Z=>{let B={};return C.outEdges(Z).forEach(V=>{B[V.w]=(B[V.w]||0)+C.edge(V).weight}),B});return O(C.nodes(),D)}function c(C){let D=C.nodes().map(Z=>{let B={};return C.inEdges(Z).forEach(V=>{B[V.v]=(B[V.v]||0)+C.edge(V).weight}),B});return O(C.nodes(),D)}function u(C,D){let Z=C.x,B=C.y,V=D.x-Z,W=D.y-B,H=C.width/2,I=C.height/2;if(!V&&!W)throw new Error("Not possible to find intersection inside of the rectangle");let j,G;return Math.abs(W)*H>Math.abs(V)*I?(W<0&&(I=-I),j=I*V/W,G=I):(V<0&&(H=-H),j=H,G=H*W/V),{x:Z+j,y:B+G}}function d(C){let D=T(w(C)+1).map(()=>[]);return C.nodes().forEach(Z=>{let B=C.node(Z),V=B.rank;V!==void 0&&(D[V][B.order]=Z)}),D}function h(C){let D=C.nodes().map(B=>{let V=C.node(B).rank;return V===void 0?Number.MAX_VALUE:V}),Z=x(Math.min,D);C.nodes().forEach(B=>{let V=C.node(B);Object.hasOwn(V,"rank")&&(V.rank-=Z)})}function m(C){let D=C.nodes().map(H=>C.node(H).rank),Z=x(Math.min,D),B=[];C.nodes().forEach(H=>{let I=C.node(H).rank-Z;B[I]||(B[I]=[]),B[I].push(H)});let V=0,W=C.graph().nodeRankFactor;Array.from(B).forEach((H,I)=>{H===void 0&&I%W!==0?--V:H!==void 0&&V&&H.forEach(j=>C.node(j).rank+=V)})}function p(C,D,Z,B){let V={width:0,height:0};return arguments.length>=4&&(V.rank=Z,V.order=B),a(C,"border",V,D)}function y(C,D=v){const Z=[];for(let B=0;B<C.length;B+=D){const V=C.slice(B,B+D);Z.push(V)}return Z}const v=65535;function x(C,D){if(D.length>v){const Z=y(D);return C.apply(null,Z.map(B=>C.apply(null,B)))}else return C.apply(null,D)}function w(C){const Z=C.nodes().map(B=>{let V=C.node(B).rank;return V===void 0?Number.MIN_VALUE:V});return x(Math.max,Z)}function N(C,D){let Z={lhs:[],rhs:[]};return C.forEach(B=>{D(B)?Z.lhs.push(B):Z.rhs.push(B)}),Z}function S(C,D){let Z=Date.now();try{return D()}finally{console.log(C+" time: "+(Date.now()-Z)+"ms")}}function M(C,D){return D()}let z=0;function E(C){var D=++z;return C+(""+D)}function T(C,D,Z=1){D==null&&(D=C,C=0);let B=W=>W<D;Z<0&&(B=W=>D<W);const V=[];for(let W=C;B(W);W+=Z)V.push(W);return V}function q(C,D){const Z={};for(const B of D)C[B]!==void 0&&(Z[B]=C[B]);return Z}function R(C,D){let Z=D;return typeof D=="string"&&(Z=B=>B[D]),Object.entries(C).reduce((B,[V,W])=>(B[V]=Z(W,V),B),{})}function O(C,D){return C.reduce((Z,B,V)=>(Z[B]=D[V],Z),{})}return Wc}var ef,oy;function aA(){if(oy)return ef;oy=1;let t=iA(),a=ft().uniqueId;ef={run:l,undo:s};function l(c){(c.graph().acyclicer==="greedy"?t(c,d(c)):r(c)).forEach(h=>{let m=c.edge(h);c.removeEdge(h),m.forwardName=h.name,m.reversed=!0,c.setEdge(h.w,h.v,m,a("rev"))});function d(h){return m=>h.edge(m).weight}}function r(c){let u=[],d={},h={};function m(p){Object.hasOwn(h,p)||(h[p]=!0,d[p]=!0,c.outEdges(p).forEach(y=>{Object.hasOwn(d,y.w)?u.push(y):m(y.w)}),delete d[p])}return c.nodes().forEach(m),u}function s(c){c.edges().forEach(u=>{let d=c.edge(u);if(d.reversed){c.removeEdge(u);let h=d.forwardName;delete d.reversed,delete d.forwardName,c.setEdge(u.w,u.v,d,h)}})}return ef}var tf,sy;function lA(){if(sy)return tf;sy=1;let t=ft();tf={run:a,undo:r};function a(s){s.graph().dummyChains=[],s.edges().forEach(c=>l(s,c))}function l(s,c){let u=c.v,d=s.node(u).rank,h=c.w,m=s.node(h).rank,p=c.name,y=s.edge(c),v=y.labelRank;if(m===d+1)return;s.removeEdge(c);let x,w,N;for(N=0,++d;d<m;++N,++d)y.points=[],w={width:0,height:0,edgeLabel:y,edgeObj:c,rank:d},x=t.addDummyNode(s,"edge",w,"_d"),d===v&&(w.width=y.width,w.height=y.height,w.dummy="edge-label",w.labelpos=y.labelpos),s.setEdge(u,x,{weight:y.weight},p),N===0&&s.graph().dummyChains.push(x),u=x;s.setEdge(u,h,{weight:y.weight},p)}function r(s){s.graph().dummyChains.forEach(c=>{let u=s.node(c),d=u.edgeLabel,h;for(s.setEdge(u.edgeObj,d);u.dummy;)h=s.successors(c)[0],s.removeNode(c),d.points.push({x:u.x,y:u.y}),u.dummy==="edge-label"&&(d.x=u.x,d.y=u.y,d.width=u.width,d.height=u.height),c=h,u=s.node(c)})}return tf}var nf,uy;function Fo(){if(uy)return nf;uy=1;const{applyWithChunking:t}=ft();nf={longestPath:a,slack:l};function a(r){var s={};function c(u){var d=r.node(u);if(Object.hasOwn(s,u))return d.rank;s[u]=!0;let h=r.outEdges(u).map(p=>p==null?Number.POSITIVE_INFINITY:c(p.w)-r.edge(p).minlen);var m=t(Math.min,h);return m===Number.POSITIVE_INFINITY&&(m=0),d.rank=m}r.sources().forEach(c)}function l(r,s){return r.node(s.w).rank-r.node(s.v).rank-r.edge(s).minlen}return nf}var af,cy;function fy(){if(cy)return af;cy=1;var t=wn().Graph,a=Fo().slack;af=l;function l(u){var d=new t({directed:!1}),h=u.nodes()[0],m=u.nodeCount();d.setNode(h,{});for(var p,y;r(d,u)<m;)p=s(d,u),y=d.hasNode(p.v)?a(u,p):-a(u,p),c(d,u,y);return d}function r(u,d){function h(m){d.nodeEdges(m).forEach(p=>{var y=p.v,v=m===y?p.w:y;!u.hasNode(v)&&!a(d,p)&&(u.setNode(v,{}),u.setEdge(m,v,{}),h(v))})}return u.nodes().forEach(h),u.nodeCount()}function s(u,d){return d.edges().reduce((m,p)=>{let y=Number.POSITIVE_INFINITY;return u.hasNode(p.v)!==u.hasNode(p.w)&&(y=a(d,p)),y<m[0]?[y,p]:m},[Number.POSITIVE_INFINITY,null])[1]}function c(u,d,h){u.nodes().forEach(m=>d.node(m).rank+=h)}return af}var lf,dy;function rA(){if(dy)return lf;dy=1;var t=fy(),a=Fo().slack,l=Fo().longestPath,r=wn().alg.preorder,s=wn().alg.postorder,c=ft().simplify;lf=u,u.initLowLimValues=p,u.initCutValues=d,u.calcCutValue=m,u.leaveEdge=v,u.enterEdge=x,u.exchangeEdges=w;function u(z){z=c(z),l(z);var E=t(z);p(E),d(E,z);for(var T,q;T=v(E);)q=x(E,z,T),w(E,z,T,q)}function d(z,E){var T=s(z,z.nodes());T=T.slice(0,T.length-1),T.forEach(q=>h(z,E,q))}function h(z,E,T){var q=z.node(T),R=q.parent;z.edge(T,R).cutvalue=m(z,E,T)}function m(z,E,T){var q=z.node(T),R=q.parent,O=!0,C=E.edge(T,R),D=0;return C||(O=!1,C=E.edge(R,T)),D=C.weight,E.nodeEdges(T).forEach(Z=>{var B=Z.v===T,V=B?Z.w:Z.v;if(V!==R){var W=B===O,H=E.edge(Z).weight;if(D+=W?H:-H,S(z,T,V)){var I=z.edge(T,V).cutvalue;D+=W?-I:I}}}),D}function p(z,E){arguments.length<2&&(E=z.nodes()[0]),y(z,{},1,E)}function y(z,E,T,q,R){var O=T,C=z.node(q);return E[q]=!0,z.neighbors(q).forEach(D=>{Object.hasOwn(E,D)||(T=y(z,E,T,D,q))}),C.low=O,C.lim=T++,R?C.parent=R:delete C.parent,T}function v(z){return z.edges().find(E=>z.edge(E).cutvalue<0)}function x(z,E,T){var q=T.v,R=T.w;E.hasEdge(q,R)||(q=T.w,R=T.v);var O=z.node(q),C=z.node(R),D=O,Z=!1;O.lim>C.lim&&(D=C,Z=!0);var B=E.edges().filter(V=>Z===M(z,z.node(V.v),D)&&Z!==M(z,z.node(V.w),D));return B.reduce((V,W)=>a(E,W)<a(E,V)?W:V)}function w(z,E,T,q){var R=T.v,O=T.w;z.removeEdge(R,O),z.setEdge(q.v,q.w,{}),p(z),d(z,E),N(z,E)}function N(z,E){var T=z.nodes().find(R=>!E.node(R).parent),q=r(z,T);q=q.slice(1),q.forEach(R=>{var O=z.node(R).parent,C=E.edge(R,O),D=!1;C||(C=E.edge(O,R),D=!0),E.node(R).rank=E.node(O).rank+(D?C.minlen:-C.minlen)})}function S(z,E,T){return z.hasEdge(E,T)}function M(z,E,T){return T.low<=E.lim&&E.lim<=T.lim}return lf}var rf,hy;function oA(){if(hy)return rf;hy=1;var t=Fo(),a=t.longestPath,l=fy(),r=rA();rf=s;function s(h){var m=h.graph().ranker;if(m instanceof Function)return m(h);switch(h.graph().ranker){case"network-simplex":d(h);break;case"tight-tree":u(h);break;case"longest-path":c(h);break;case"none":break;default:d(h)}}var c=a;function u(h){a(h),l(h)}function d(h){r(h)}return rf}var of,my;function sA(){if(my)return of;my=1,of=t;function t(r){let s=l(r);r.graph().dummyChains.forEach(c=>{let u=r.node(c),d=u.edgeObj,h=a(r,s,d.v,d.w),m=h.path,p=h.lca,y=0,v=m[y],x=!0;for(;c!==d.w;){if(u=r.node(c),x){for(;(v=m[y])!==p&&r.node(v).maxRank<u.rank;)y++;v===p&&(x=!1)}if(!x){for(;y<m.length-1&&r.node(v=m[y+1]).minRank<=u.rank;)y++;v=m[y]}r.setParent(c,v),c=r.successors(c)[0]}})}function a(r,s,c,u){let d=[],h=[],m=Math.min(s[c].low,s[u].low),p=Math.max(s[c].lim,s[u].lim),y,v;y=c;do y=r.parent(y),d.push(y);while(y&&(s[y].low>m||p>s[y].lim));for(v=y,y=u;(y=r.parent(y))!==v;)h.push(y);return{path:d.concat(h.reverse()),lca:v}}function l(r){let s={},c=0;function u(d){let h=c;r.children(d).forEach(u),s[d]={low:h,lim:c++}}return r.children().forEach(u),s}return of}var sf,gy;function uA(){if(gy)return sf;gy=1;let t=ft();sf={run:a,cleanup:c};function a(u){let d=t.addDummyNode(u,"root",{},"_root"),h=r(u),m=Object.values(h),p=t.applyWithChunking(Math.max,m)-1,y=2*p+1;u.graph().nestingRoot=d,u.edges().forEach(x=>u.edge(x).minlen*=y);let v=s(u)+1;u.children().forEach(x=>l(u,d,y,v,p,h,x)),u.graph().nodeRankFactor=y}function l(u,d,h,m,p,y,v){let x=u.children(v);if(!x.length){v!==d&&u.setEdge(d,v,{weight:0,minlen:h});return}let w=t.addBorderNode(u,"_bt"),N=t.addBorderNode(u,"_bb"),S=u.node(v);u.setParent(w,v),S.borderTop=w,u.setParent(N,v),S.borderBottom=N,x.forEach(M=>{l(u,d,h,m,p,y,M);let z=u.node(M),E=z.borderTop?z.borderTop:M,T=z.borderBottom?z.borderBottom:M,q=z.borderTop?m:2*m,R=E!==T?1:p-y[v]+1;u.setEdge(w,E,{weight:q,minlen:R,nestingEdge:!0}),u.setEdge(T,N,{weight:q,minlen:R,nestingEdge:!0})}),u.parent(v)||u.setEdge(d,w,{weight:0,minlen:p+y[v]})}function r(u){var d={};function h(m,p){var y=u.children(m);y&&y.length&&y.forEach(v=>h(v,p+1)),d[m]=p}return u.children().forEach(m=>h(m,1)),d}function s(u){return u.edges().reduce((d,h)=>d+u.edge(h).weight,0)}function c(u){var d=u.graph();u.removeNode(d.nestingRoot),delete d.nestingRoot,u.edges().forEach(h=>{var m=u.edge(h);m.nestingEdge&&u.removeEdge(h)})}return sf}var uf,py;function cA(){if(py)return uf;py=1;let t=ft();uf=a;function a(r){function s(c){let u=r.children(c),d=r.node(c);if(u.length&&u.forEach(s),Object.hasOwn(d,"minRank")){d.borderLeft=[],d.borderRight=[];for(let h=d.minRank,m=d.maxRank+1;h<m;++h)l(r,"borderLeft","_bl",c,d,h),l(r,"borderRight","_br",c,d,h)}}r.children().forEach(s)}function l(r,s,c,u,d,h){let m={width:0,height:0,rank:h,borderType:s},p=d[s][h-1],y=t.addDummyNode(r,"border",m,c);d[s][h]=y,r.setParent(y,u),p&&r.setEdge(p,y,{weight:1})}return uf}var cf,yy;function fA(){if(yy)return cf;yy=1,cf={adjust:t,undo:a};function t(h){let m=h.graph().rankdir.toLowerCase();(m==="lr"||m==="rl")&&l(h)}function a(h){let m=h.graph().rankdir.toLowerCase();(m==="bt"||m==="rl")&&s(h),(m==="lr"||m==="rl")&&(u(h),l(h))}function l(h){h.nodes().forEach(m=>r(h.node(m))),h.edges().forEach(m=>r(h.edge(m)))}function r(h){let m=h.width;h.width=h.height,h.height=m}function s(h){h.nodes().forEach(m=>c(h.node(m))),h.edges().forEach(m=>{let p=h.edge(m);p.points.forEach(c),Object.hasOwn(p,"y")&&c(p)})}function c(h){h.y=-h.y}function u(h){h.nodes().forEach(m=>d(h.node(m))),h.edges().forEach(m=>{let p=h.edge(m);p.points.forEach(d),Object.hasOwn(p,"x")&&d(p)})}function d(h){let m=h.x;h.x=h.y,h.y=m}return cf}var ff,vy;function dA(){if(vy)return ff;vy=1;let t=ft();ff=a;function a(l){let r={},s=l.nodes().filter(p=>!l.children(p).length),c=s.map(p=>l.node(p).rank),u=t.applyWithChunking(Math.max,c),d=t.range(u+1).map(()=>[]);function h(p){if(r[p])return;r[p]=!0;let y=l.node(p);d[y.rank].push(p),l.successors(p).forEach(h)}return s.sort((p,y)=>l.node(p).rank-l.node(y).rank).forEach(h),d}return ff}var df,by;function hA(){if(by)return df;by=1;let t=ft().zipObject;df=a;function a(r,s){let c=0;for(let u=1;u<s.length;++u)c+=l(r,s[u-1],s[u]);return c}function l(r,s,c){let u=t(c,c.map((v,x)=>x)),d=s.flatMap(v=>r.outEdges(v).map(x=>({pos:u[x.w],weight:r.edge(x).weight})).sort((x,w)=>x.pos-w.pos)),h=1;for(;h<c.length;)h<<=1;let m=2*h-1;h-=1;let p=new Array(m).fill(0),y=0;return d.forEach(v=>{let x=v.pos+h;p[x]+=v.weight;let w=0;for(;x>0;)x%2&&(w+=p[x+1]),x=x-1>>1,p[x]+=v.weight;y+=v.weight*w}),y}return df}var hf,xy;function mA(){if(xy)return hf;xy=1,hf=t;function t(a,l=[]){return l.map(r=>{let s=a.inEdges(r);if(s.length){let c=s.reduce((u,d)=>{let h=a.edge(d),m=a.node(d.v);return{sum:u.sum+h.weight*m.order,weight:u.weight+h.weight}},{sum:0,weight:0});return{v:r,barycenter:c.sum/c.weight,weight:c.weight}}else return{v:r}})}return hf}var mf,wy;function gA(){if(wy)return mf;wy=1;let t=ft();mf=a;function a(s,c){let u={};s.forEach((h,m)=>{let p=u[h.v]={indegree:0,in:[],out:[],vs:[h.v],i:m};h.barycenter!==void 0&&(p.barycenter=h.barycenter,p.weight=h.weight)}),c.edges().forEach(h=>{let m=u[h.v],p=u[h.w];m!==void 0&&p!==void 0&&(p.indegree++,m.out.push(u[h.w]))});let d=Object.values(u).filter(h=>!h.indegree);return l(d)}function l(s){let c=[];function u(h){return m=>{m.merged||(m.barycenter===void 0||h.barycenter===void 0||m.barycenter>=h.barycenter)&&r(h,m)}}function d(h){return m=>{m.in.push(h),--m.indegree===0&&s.push(m)}}for(;s.length;){let h=s.pop();c.push(h),h.in.reverse().forEach(u(h)),h.out.forEach(d(h))}return c.filter(h=>!h.merged).map(h=>t.pick(h,["vs","i","barycenter","weight"]))}function r(s,c){let u=0,d=0;s.weight&&(u+=s.barycenter*s.weight,d+=s.weight),c.weight&&(u+=c.barycenter*c.weight,d+=c.weight),s.vs=c.vs.concat(s.vs),s.barycenter=u/d,s.weight=d,s.i=Math.min(c.i,s.i),c.merged=!0}return mf}var gf,Sy;function pA(){if(Sy)return gf;Sy=1;let t=ft();gf=a;function a(s,c){let u=t.partition(s,w=>Object.hasOwn(w,"barycenter")),d=u.lhs,h=u.rhs.sort((w,N)=>N.i-w.i),m=[],p=0,y=0,v=0;d.sort(r(!!c)),v=l(m,h,v),d.forEach(w=>{v+=w.vs.length,m.push(w.vs),p+=w.barycenter*w.weight,y+=w.weight,v=l(m,h,v)});let x={vs:m.flat(!0)};return y&&(x.barycenter=p/y,x.weight=y),x}function l(s,c,u){let d;for(;c.length&&(d=c[c.length-1]).i<=u;)c.pop(),s.push(d.vs),u++;return u}function r(s){return(c,u)=>c.barycenter<u.barycenter?-1:c.barycenter>u.barycenter?1:s?u.i-c.i:c.i-u.i}return gf}var pf,Ey;function yA(){if(Ey)return pf;Ey=1;let t=mA(),a=gA(),l=pA();pf=r;function r(u,d,h,m){let p=u.children(d),y=u.node(d),v=y?y.borderLeft:void 0,x=y?y.borderRight:void 0,w={};v&&(p=p.filter(z=>z!==v&&z!==x));let N=t(u,p);N.forEach(z=>{if(u.children(z.v).length){let E=r(u,z.v,h,m);w[z.v]=E,Object.hasOwn(E,"barycenter")&&c(z,E)}});let S=a(N,h);s(S,w);let M=l(S,m);if(v&&(M.vs=[v,M.vs,x].flat(!0),u.predecessors(v).length)){let z=u.node(u.predecessors(v)[0]),E=u.node(u.predecessors(x)[0]);Object.hasOwn(M,"barycenter")||(M.barycenter=0,M.weight=0),M.barycenter=(M.barycenter*M.weight+z.order+E.order)/(M.weight+2),M.weight+=2}return M}function s(u,d){u.forEach(h=>{h.vs=h.vs.flatMap(m=>d[m]?d[m].vs:m)})}function c(u,d){u.barycenter!==void 0?(u.barycenter=(u.barycenter*u.weight+d.barycenter*d.weight)/(u.weight+d.weight),u.weight+=d.weight):(u.barycenter=d.barycenter,u.weight=d.weight)}return pf}var yf,_y;function vA(){if(_y)return yf;_y=1;let t=wn().Graph,a=ft();yf=l;function l(s,c,u,d){d||(d=s.nodes());let h=r(s),m=new t({compound:!0}).setGraph({root:h}).setDefaultNodeLabel(p=>s.node(p));return d.forEach(p=>{let y=s.node(p),v=s.parent(p);(y.rank===c||y.minRank<=c&&c<=y.maxRank)&&(m.setNode(p),m.setParent(p,v||h),s[u](p).forEach(x=>{let w=x.v===p?x.w:x.v,N=m.edge(w,p),S=N!==void 0?N.weight:0;m.setEdge(w,p,{weight:s.edge(x).weight+S})}),Object.hasOwn(y,"minRank")&&m.setNode(p,{borderLeft:y.borderLeft[c],borderRight:y.borderRight[c]}))}),m}function r(s){for(var c;s.hasNode(c=a.uniqueId("_root")););return c}return yf}var vf,Ny;function bA(){if(Ny)return vf;Ny=1,vf=t;function t(a,l,r){let s={},c;r.forEach(u=>{let d=a.parent(u),h,m;for(;d;){if(h=a.parent(d),h?(m=s[h],s[h]=d):(m=c,c=d),m&&m!==d){l.setEdge(m,d);return}d=h}})}return vf}var bf,Cy;function xA(){if(Cy)return bf;Cy=1;let t=dA(),a=hA(),l=yA(),r=vA(),s=bA(),c=wn().Graph,u=ft();bf=d;function d(y,v){if(v&&typeof v.customOrder=="function"){v.customOrder(y,d);return}let x=u.maxRank(y),w=h(y,u.range(1,x+1),"inEdges"),N=h(y,u.range(x-1,-1,-1),"outEdges"),S=t(y);if(p(y,S),v&&v.disableOptimalOrderHeuristic)return;let M=Number.POSITIVE_INFINITY,z;for(let E=0,T=0;T<4;++E,++T){m(E%2?w:N,E%4>=2),S=u.buildLayerMatrix(y);let q=a(y,S);q<M&&(T=0,z=Object.assign({},S),M=q)}p(y,z)}function h(y,v,x){const w=new Map,N=(S,M)=>{w.has(S)||w.set(S,[]),w.get(S).push(M)};for(const S of y.nodes()){const M=y.node(S);if(typeof M.rank=="number"&&N(M.rank,S),typeof M.minRank=="number"&&typeof M.maxRank=="number")for(let z=M.minRank;z<=M.maxRank;z++)z!==M.rank&&N(z,S)}return v.map(function(S){return r(y,S,x,w.get(S)||[])})}function m(y,v){let x=new c;y.forEach(function(w){let N=w.graph().root,S=l(w,N,x,v);S.vs.forEach((M,z)=>w.node(M).order=z),s(w,x,S.vs)})}function p(y,v){Object.values(v).forEach(x=>x.forEach((w,N)=>y.node(w).order=N))}return bf}var xf,My;function wA(){if(My)return xf;My=1;let t=wn().Graph,a=ft();xf={positionX:x,findType1Conflicts:l,findType2Conflicts:r,addConflict:c,hasConflict:u,verticalAlignment:d,horizontalCompaction:h,alignCoordinates:y,findSmallestWidthAlignment:p,balance:v};function l(S,M){let z={};function E(T,q){let R=0,O=0,C=T.length,D=q[q.length-1];return q.forEach((Z,B)=>{let V=s(S,Z),W=V?S.node(V).order:C;(V||Z===D)&&(q.slice(O,B+1).forEach(H=>{S.predecessors(H).forEach(I=>{let j=S.node(I),G=j.order;(G<R||W<G)&&!(j.dummy&&S.node(H).dummy)&&c(z,I,H)})}),O=B+1,R=W)}),q}return M.length&&M.reduce(E),z}function r(S,M){let z={};function E(q,R,O,C,D){let Z;a.range(R,O).forEach(B=>{Z=q[B],S.node(Z).dummy&&S.predecessors(Z).forEach(V=>{let W=S.node(V);W.dummy&&(W.order<C||W.order>D)&&c(z,V,Z)})})}function T(q,R){let O=-1,C,D=0;return R.forEach((Z,B)=>{if(S.node(Z).dummy==="border"){let V=S.predecessors(Z);V.length&&(C=S.node(V[0]).order,E(R,D,B,O,C),D=B,O=C)}E(R,D,R.length,C,q.length)}),R}return M.length&&M.reduce(T),z}function s(S,M){if(S.node(M).dummy)return S.predecessors(M).find(z=>S.node(z).dummy)}function c(S,M,z){if(M>z){let T=M;M=z,z=T}let E=S[M];E||(S[M]=E={}),E[z]=!0}function u(S,M,z){if(M>z){let E=M;M=z,z=E}return!!S[M]&&Object.hasOwn(S[M],z)}function d(S,M,z,E){let T={},q={},R={};return M.forEach(O=>{O.forEach((C,D)=>{T[C]=C,q[C]=C,R[C]=D})}),M.forEach(O=>{let C=-1;O.forEach(D=>{let Z=E(D);if(Z.length){Z=Z.sort((V,W)=>R[V]-R[W]);let B=(Z.length-1)/2;for(let V=Math.floor(B),W=Math.ceil(B);V<=W;++V){let H=Z[V];q[D]===D&&C<R[H]&&!u(z,D,H)&&(q[H]=D,q[D]=T[D]=T[H],C=R[H])}}})}),{root:T,align:q}}function h(S,M,z,E,T){let q={},R=m(S,M,z,T),O=T?"borderLeft":"borderRight";function C(B,V){let W=R.nodes(),H=W.pop(),I={};for(;H;)I[H]?B(H):(I[H]=!0,W.push(H),W=W.concat(V(H))),H=W.pop()}function D(B){q[B]=R.inEdges(B).reduce((V,W)=>Math.max(V,q[W.v]+R.edge(W)),0)}function Z(B){let V=R.outEdges(B).reduce((H,I)=>Math.min(H,q[I.w]-R.edge(I)),Number.POSITIVE_INFINITY),W=S.node(B);V!==Number.POSITIVE_INFINITY&&W.borderType!==O&&(q[B]=Math.max(q[B],V))}return C(D,R.predecessors.bind(R)),C(Z,R.successors.bind(R)),Object.keys(E).forEach(B=>q[B]=q[z[B]]),q}function m(S,M,z,E){let T=new t,q=S.graph(),R=w(q.nodesep,q.edgesep,E);return M.forEach(O=>{let C;O.forEach(D=>{let Z=z[D];if(T.setNode(Z),C){var B=z[C],V=T.edge(B,Z);T.setEdge(B,Z,Math.max(R(S,D,C),V||0))}C=D})}),T}function p(S,M){return Object.values(M).reduce((z,E)=>{let T=Number.NEGATIVE_INFINITY,q=Number.POSITIVE_INFINITY;Object.entries(E).forEach(([O,C])=>{let D=N(S,O)/2;T=Math.max(C+D,T),q=Math.min(C-D,q)});const R=T-q;return R<z[0]&&(z=[R,E]),z},[Number.POSITIVE_INFINITY,null])[1]}function y(S,M){let z=Object.values(M),E=a.applyWithChunking(Math.min,z),T=a.applyWithChunking(Math.max,z);["u","d"].forEach(q=>{["l","r"].forEach(R=>{let O=q+R,C=S[O];if(C===M)return;let D=Object.values(C),Z=E-a.applyWithChunking(Math.min,D);R!=="l"&&(Z=T-a.applyWithChunking(Math.max,D)),Z&&(S[O]=a.mapValues(C,B=>B+Z))})})}function v(S,M){return a.mapValues(S.ul,(z,E)=>{if(M)return S[M.toLowerCase()][E];{let T=Object.values(S).map(q=>q[E]).sort((q,R)=>q-R);return(T[1]+T[2])/2}})}function x(S){let M=a.buildLayerMatrix(S),z=Object.assign(l(S,M),r(S,M)),E={},T;["u","d"].forEach(R=>{T=R==="u"?M:Object.values(M).reverse(),["l","r"].forEach(O=>{O==="r"&&(T=T.map(B=>Object.values(B).reverse()));let C=(R==="u"?S.predecessors:S.successors).bind(S),D=d(S,T,z,C),Z=h(S,T,D.root,D.align,O==="r");O==="r"&&(Z=a.mapValues(Z,B=>-B)),E[R+O]=Z})});let q=p(S,E);return y(E,q),v(E,S.graph().align)}function w(S,M,z){return(E,T,q)=>{let R=E.node(T),O=E.node(q),C=0,D;if(C+=R.width/2,Object.hasOwn(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":D=-R.width/2;break;case"r":D=R.width/2;break}if(D&&(C+=z?D:-D),D=0,C+=(R.dummy?M:S)/2,C+=(O.dummy?M:S)/2,C+=O.width/2,Object.hasOwn(O,"labelpos"))switch(O.labelpos.toLowerCase()){case"l":D=O.width/2;break;case"r":D=-O.width/2;break}return D&&(C+=z?D:-D),D=0,C}}function N(S,M){return S.node(M).width}return xf}var wf,Ty;function SA(){if(Ty)return wf;Ty=1;let t=ft(),a=wA().positionX;wf=l;function l(s){s=t.asNonCompoundGraph(s),r(s),Object.entries(a(s)).forEach(([c,u])=>s.node(c).x=u)}function r(s){let c=t.buildLayerMatrix(s),u=s.graph().ranksep,d=0;c.forEach(h=>{const m=h.reduce((p,y)=>{const v=s.node(y).height;return p>v?p:v},0);h.forEach(p=>s.node(p).y=d+m/2),d+=m+u})}return wf}var Sf,Ay;function EA(){if(Ay)return Sf;Ay=1;let t=aA(),a=lA(),l=oA(),r=ft().normalizeRanks,s=sA(),c=ft().removeEmptyRanks,u=uA(),d=cA(),h=fA(),m=xA(),p=SA(),y=ft(),v=wn().Graph;Sf=x;function x(L,Y){let F=Y&&Y.debugTiming?y.time:y.notime;F("layout",()=>{let ne=F(" buildLayoutGraph",()=>C(L));F(" runLayout",()=>w(ne,F,Y)),F(" updateInputGraph",()=>N(L,ne))})}function w(L,Y,F){Y(" makeSpaceForEdgeLabels",()=>D(L)),Y(" removeSelfEdges",()=>U(L)),Y(" acyclic",()=>t.run(L)),Y(" nestingGraph.run",()=>u.run(L)),Y(" rank",()=>l(y.asNonCompoundGraph(L))),Y(" injectEdgeLabelProxies",()=>Z(L)),Y(" removeEmptyRanks",()=>c(L)),Y(" nestingGraph.cleanup",()=>u.cleanup(L)),Y(" normalizeRanks",()=>r(L)),Y(" assignRankMinMax",()=>B(L)),Y(" removeEdgeLabelProxies",()=>V(L)),Y(" normalize.run",()=>a.run(L)),Y(" parentDummyChains",()=>s(L)),Y(" addBorderSegments",()=>d(L)),Y(" order",()=>m(L,F)),Y(" insertSelfEdges",()=>P(L)),Y(" adjustCoordinateSystem",()=>h.adjust(L)),Y(" position",()=>p(L)),Y(" positionSelfEdges",()=>re(L)),Y(" removeBorderNodes",()=>G(L)),Y(" normalize.undo",()=>a.undo(L)),Y(" fixupEdgeLabelCoords",()=>I(L)),Y(" undoCoordinateSystem",()=>h.undo(L)),Y(" translateGraph",()=>W(L)),Y(" assignNodeIntersects",()=>H(L)),Y(" reversePoints",()=>j(L)),Y(" acyclic.undo",()=>t.undo(L))}function N(L,Y){L.nodes().forEach(F=>{let ne=L.node(F),ae=Y.node(F);ne&&(ne.x=ae.x,ne.y=ae.y,ne.rank=ae.rank,Y.children(F).length&&(ne.width=ae.width,ne.height=ae.height))}),L.edges().forEach(F=>{let ne=L.edge(F),ae=Y.edge(F);ne.points=ae.points,Object.hasOwn(ae,"x")&&(ne.x=ae.x,ne.y=ae.y)}),L.graph().width=Y.graph().width,L.graph().height=Y.graph().height}let S=["nodesep","edgesep","ranksep","marginx","marginy"],M={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},z=["acyclicer","ranker","rankdir","align"],E=["width","height","rank"],T={width:0,height:0},q=["minlen","weight","width","height","labeloffset"],R={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},O=["labelpos"];function C(L){let Y=new v({multigraph:!0,compound:!0}),F=Q(L.graph());return Y.setGraph(Object.assign({},M,k(F,S),y.pick(F,z))),L.nodes().forEach(ne=>{let ae=Q(L.node(ne));const oe=k(ae,E);Object.keys(T).forEach(fe=>{oe[fe]===void 0&&(oe[fe]=T[fe])}),Y.setNode(ne,oe),Y.setParent(ne,L.parent(ne))}),L.edges().forEach(ne=>{let ae=Q(L.edge(ne));Y.setEdge(ne,Object.assign({},R,k(ae,q),y.pick(ae,O)))}),Y}function D(L){let Y=L.graph();Y.ranksep/=2,L.edges().forEach(F=>{let ne=L.edge(F);ne.minlen*=2,ne.labelpos.toLowerCase()!=="c"&&(Y.rankdir==="TB"||Y.rankdir==="BT"?ne.width+=ne.labeloffset:ne.height+=ne.labeloffset)})}function Z(L){L.edges().forEach(Y=>{let F=L.edge(Y);if(F.width&&F.height){let ne=L.node(Y.v),oe={rank:(L.node(Y.w).rank-ne.rank)/2+ne.rank,e:Y};y.addDummyNode(L,"edge-proxy",oe,"_ep")}})}function B(L){let Y=0;L.nodes().forEach(F=>{let ne=L.node(F);ne.borderTop&&(ne.minRank=L.node(ne.borderTop).rank,ne.maxRank=L.node(ne.borderBottom).rank,Y=Math.max(Y,ne.maxRank))}),L.graph().maxRank=Y}function V(L){L.nodes().forEach(Y=>{let F=L.node(Y);F.dummy==="edge-proxy"&&(L.edge(F.e).labelRank=F.rank,L.removeNode(Y))})}function W(L){let Y=Number.POSITIVE_INFINITY,F=0,ne=Number.POSITIVE_INFINITY,ae=0,oe=L.graph(),fe=oe.marginx||0,pe=oe.marginy||0;function Ee(ge){let me=ge.x,Me=ge.y,He=ge.width,Ge=ge.height;Y=Math.min(Y,me-He/2),F=Math.max(F,me+He/2),ne=Math.min(ne,Me-Ge/2),ae=Math.max(ae,Me+Ge/2)}L.nodes().forEach(ge=>Ee(L.node(ge))),L.edges().forEach(ge=>{let me=L.edge(ge);Object.hasOwn(me,"x")&&Ee(me)}),Y-=fe,ne-=pe,L.nodes().forEach(ge=>{let me=L.node(ge);me.x-=Y,me.y-=ne}),L.edges().forEach(ge=>{let me=L.edge(ge);me.points.forEach(Me=>{Me.x-=Y,Me.y-=ne}),Object.hasOwn(me,"x")&&(me.x-=Y),Object.hasOwn(me,"y")&&(me.y-=ne)}),oe.width=F-Y+fe,oe.height=ae-ne+pe}function H(L){L.edges().forEach(Y=>{let F=L.edge(Y),ne=L.node(Y.v),ae=L.node(Y.w),oe,fe;F.points?(oe=F.points[0],fe=F.points[F.points.length-1]):(F.points=[],oe=ae,fe=ne),F.points.unshift(y.intersectRect(ne,oe)),F.points.push(y.intersectRect(ae,fe))})}function I(L){L.edges().forEach(Y=>{let F=L.edge(Y);if(Object.hasOwn(F,"x"))switch((F.labelpos==="l"||F.labelpos==="r")&&(F.width-=F.labeloffset),F.labelpos){case"l":F.x-=F.width/2+F.labeloffset;break;case"r":F.x+=F.width/2+F.labeloffset;break}})}function j(L){L.edges().forEach(Y=>{let F=L.edge(Y);F.reversed&&F.points.reverse()})}function G(L){L.nodes().forEach(Y=>{if(L.children(Y).length){let F=L.node(Y),ne=L.node(F.borderTop),ae=L.node(F.borderBottom),oe=L.node(F.borderLeft[F.borderLeft.length-1]),fe=L.node(F.borderRight[F.borderRight.length-1]);F.width=Math.abs(fe.x-oe.x),F.height=Math.abs(ae.y-ne.y),F.x=oe.x+F.width/2,F.y=ne.y+F.height/2}}),L.nodes().forEach(Y=>{L.node(Y).dummy==="border"&&L.removeNode(Y)})}function U(L){L.edges().forEach(Y=>{if(Y.v===Y.w){var F=L.node(Y.v);F.selfEdges||(F.selfEdges=[]),F.selfEdges.push({e:Y,label:L.edge(Y)}),L.removeEdge(Y)}})}function P(L){var Y=y.buildLayerMatrix(L);Y.forEach(F=>{var ne=0;F.forEach((ae,oe)=>{var fe=L.node(ae);fe.order=oe+ne,(fe.selfEdges||[]).forEach(pe=>{y.addDummyNode(L,"selfedge",{width:pe.label.width,height:pe.label.height,rank:fe.rank,order:oe+ ++ne,e:pe.e,label:pe.label},"_se")}),delete fe.selfEdges})})}function re(L){L.nodes().forEach(Y=>{var F=L.node(Y);if(F.dummy==="selfedge"){var ne=L.node(F.e.v),ae=ne.x+ne.width/2,oe=ne.y,fe=F.x-ae,pe=ne.height/2;L.setEdge(F.e,F.label),L.removeNode(Y),F.label.points=[{x:ae+2*fe/3,y:oe-pe},{x:ae+5*fe/6,y:oe-pe},{x:ae+fe,y:oe},{x:ae+5*fe/6,y:oe+pe},{x:ae+2*fe/3,y:oe+pe}],F.label.x=F.x,F.label.y=F.y}})}function k(L,Y){return y.mapValues(y.pick(L,Y),Number)}function Q(L){var Y={};return L&&Object.entries(L).forEach(([F,ne])=>{typeof F=="string"&&(F=F.toLowerCase()),Y[F]=ne}),Y}return Sf}var Ef,zy;function _A(){if(zy)return Ef;zy=1;let t=ft(),a=wn().Graph;Ef={debugOrdering:l};function l(r){let s=t.buildLayerMatrix(r),c=new a({compound:!0,multigraph:!0}).setGraph({});return r.nodes().forEach(u=>{c.setNode(u,{label:u}),c.setParent(u,"layer"+r.node(u).rank)}),r.edges().forEach(u=>c.setEdge(u.v,u.w,{},u.name)),s.forEach((u,d)=>{let h="layer"+d;c.setNode(h,{rank:"same"}),u.reduce((m,p)=>(c.setEdge(m,p,{style:"invis"}),p))}),c}return Ef}var _f,Oy;function NA(){return Oy||(Oy=1,_f="1.1.8"),_f}var Nf,jy;function CA(){return jy||(jy=1,Nf={graphlib:wn(),layout:EA(),debug:_A(),util:{time:ft().time,notime:ft().notime},version:NA()}),Nf}var MA=CA();const Ry=Vn(MA);function Dy(t,a,l={}){const{direction:r="LR",nodeWidth:s=300,nodeHeight:c=200,rankSep:u=100,nodeSep:d=50}=l,h=new Ry.graphlib.Graph().setDefaultEdgeLabel(()=>({}));h.setGraph({rankdir:r,ranksep:u,nodesep:d});for(const p of t){const y=p.measured?.width??s,v=p.measured?.height??c;h.setNode(p.id,{width:y,height:v})}for(const p of a)h.setEdge(p.source,p.target);return Ry.layout(h),{nodes:t.map(p=>{const y=h.node(p.id),v=p.measured?.width??s,x=p.measured?.height??c;return{...p,position:{x:y.x-v/2,y:y.y-x/2}}}),edges:a}}const ir="schema-visualizer-state",ky=1;function TA(){try{const t=localStorage.getItem(ir);if(!t)return null;const a=JSON.parse(t);return a.version!==ky?(localStorage.removeItem(ir),null):a}catch{return localStorage.removeItem(ir),null}}function AA(t){try{const a={...t,version:ky};localStorage.setItem(ir,JSON.stringify(a))}catch{}}function zA(){try{localStorage.removeItem(ir)}catch{}}function ke(t){return t.kind??`${t.namespace}${t.name}`}function OA(t,a,l,r={}){const{nodeSpacing:s=400,rowSize:c=4,profiles:u=[],templates:d=[]}=r,h=[],m=[],p=new Map;for(const O of a){const C=ke(O);p.set(C,O)}const y=t.filter(O=>{const C=ke(O);return!l.has(C)}),v=u.filter(O=>{const C=ke(O);return!l.has(C)}),x=d.filter(O=>{const C=ke(O);return!l.has(C)}),w=new Set;for(const O of y)w.add(ke(O));for(const O of v)w.add(ke(O));for(const O of x)w.add(ke(O));const N=new Map;for(const O of y){const C=new Set;for(const D of O.relationships??[])C.add(D.name);N.set(ke(O),C)}for(const O of v){const C=new Set;for(const D of O.relationships??[])C.add(D.name);N.set(ke(O),C)}for(const O of x){const C=new Set;for(const D of O.relationships??[])C.add(D.name);N.set(ke(O),C)}const S=new Map;for(const O of y)for(const C of O.inherit_from??[])p.has(C)&&(S.has(C)||S.set(C,[]),S.get(C)?.push(ke(O)));for(const O of x)for(const C of O.inherit_from??[])p.has(C)&&(S.has(C)||S.set(C,[]),S.get(C)?.push(ke(O)));const M=(O,C,D)=>{for(const Z of O.relationships??[])if(w.has(Z.peer)){const B=N.get(Z.peer);let V=null;if(B){const H=[...y,...v,...x].find(I=>ke(I)===Z.peer);if(H){const I=(H.relationships??[]).find(j=>j.peer===C);I&&(V=I.name)}}m.push({id:`${C}-${Z.name}-${Z.peer}`,source:C,target:Z.peer,type:"floating",animated:Z.cardinality==="many",data:{sourceRelName:Z.name,targetRelName:V,sourceCardinality:"one",targetCardinality:Z.cardinality},style:{stroke:Z.inherited?"#9ca3af":z(D),strokeWidth:2}})}else if(p.has(Z.peer)){const B=S.get(Z.peer)??[];for(const V of B){let W=null;const I=[...y,...v,...x].find(j=>ke(j)===V);if(I){const j=(I.relationships??[]).find(G=>G.peer===C);j&&(W=j.name)}m.push({id:`${C}-${Z.name}-${V}`,source:C,target:V,type:"floating",animated:Z.cardinality==="many",data:{sourceRelName:Z.name,targetRelName:W,sourceCardinality:"one",targetCardinality:Z.cardinality},style:{stroke:"#10b981",strokeWidth:2,strokeDasharray:"5,5"}})}}},z=O=>{switch(O){case"profile":return"#ec4899";case"template":return"#f59e0b";default:return"#6366f1"}},E=O=>!("inherit_from"in O)||!O.inherit_from||O.inherit_from.length===0?[]:O.inherit_from.filter(C=>p.has(C)),T=new Map;for(const O of y)T.has(O.namespace)||T.set(O.namespace,[]),T.get(O.namespace)?.push({schema:O,type:"node"});for(const O of v)T.has(O.namespace)||T.set(O.namespace,[]),T.get(O.namespace)?.push({schema:O,type:"profile"});for(const O of x)T.has(O.namespace)||T.set(O.namespace,[]),T.get(O.namespace)?.push({schema:O,type:"template"});let q=0;const R=150;for(const[,O]of T){O.forEach((D,Z)=>{const{schema:B,type:V}=D,W=ke(B),H=V==="node"||V==="template"?E(B):[],I=Z%c,j=Math.floor(Z/c),G={id:W,type:"schemaNode",position:{x:I*s,y:q+j*s},data:{kind:W,label:B.label??B.name,namespace:B.namespace,description:B.description,icon:B.icon,attributes:(B.attributes??[]).map(U=>({name:U.name,kind:U.kind,label:U.label,optional:U.optional,inherited:U.inherited})),relationships:(B.relationships??[]).map(U=>({name:U.name,peer:U.peer,cardinality:U.cardinality,label:U.label,inherited:U.inherited})),inheritFrom:H,schemaType:V}};h.push(G),M(B,W,V)});const C=Math.ceil(O.length/c);q+=C*s+R}return{nodes:h,edges:m}}const Hy=Object.freeze({left:0,top:0,width:16,height:16}),Jo=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),ar=Object.freeze({...Hy,...Jo}),Cf=Object.freeze({...ar,body:"",hidden:!1}),jA=Object.freeze({width:null,height:null}),Ly=Object.freeze({...jA,...Jo});function RA(t,a=0){const l=t.replace(/^-?[0-9.]*/,"");function r(s){for(;s<0;)s+=4;return s%4}if(l===""){const s=parseInt(t);return isNaN(s)?0:r(s)}else if(l!==t){let s=0;switch(l){case"%":s=25;break;case"deg":s=90}if(s){let c=parseFloat(t.slice(0,t.length-l.length));return isNaN(c)?0:(c=c/s,c%1===0?r(c):0)}}return a}const DA=/[\s,]+/;function kA(t,a){a.split(DA).forEach(l=>{switch(l.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0;break}})}const By={...Ly,preserveAspectRatio:""};function qy(t){const a={...By},l=(r,s)=>t.getAttribute(r)||s;return a.width=l("width",null),a.height=l("height",null),a.rotate=RA(l("rotate","")),kA(a,l("flip","")),a.preserveAspectRatio=l("preserveAspectRatio",l("preserveaspectratio","")),a}function HA(t,a){for(const l in By)if(t[l]!==a[l])return!0;return!1}const Uy=/^[a-z0-9]+(-[a-z0-9]+)*$/,lr=(t,a,l,r="")=>{const s=t.split(":");if(t.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;r=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const d=s.pop(),h=s.pop(),m={provider:s.length>0?s[0]:r,prefix:h,name:d};return a&&!Po(m)?null:m}const c=s[0],u=c.split("-");if(u.length>1){const d={provider:r,prefix:u.shift(),name:u.join("-")};return a&&!Po(d)?null:d}if(l&&r===""){const d={provider:r,prefix:"",name:c};return a&&!Po(d,l)?null:d}return null},Po=(t,a)=>t?!!((a&&t.prefix===""||t.prefix)&&t.name):!1;function LA(t,a){const l={};!t.hFlip!=!a.hFlip&&(l.hFlip=!0),!t.vFlip!=!a.vFlip&&(l.vFlip=!0);const r=((t.rotate||0)+(a.rotate||0))%4;return r&&(l.rotate=r),l}function Vy(t,a){const l=LA(t,a);for(const r in Cf)r in Jo?r in t&&!(r in l)&&(l[r]=Jo[r]):r in a?l[r]=a[r]:r in t&&(l[r]=t[r]);return l}function BA(t,a){const l=t.icons,r=t.aliases||Object.create(null),s=Object.create(null);function c(u){if(l[u])return s[u]=[];if(!(u in s)){s[u]=null;const d=r[u]&&r[u].parent,h=d&&c(d);h&&(s[u]=[d].concat(h))}return s[u]}return Object.keys(l).concat(Object.keys(r)).forEach(c),s}function qA(t,a,l){const r=t.icons,s=t.aliases||Object.create(null);let c={};function u(d){c=Vy(r[d]||s[d],c)}return u(a),l.forEach(u),Vy(t,c)}function Yy(t,a){const l=[];if(typeof t!="object"||typeof t.icons!="object")return l;t.not_found instanceof Array&&t.not_found.forEach(s=>{a(s,null),l.push(s)});const r=BA(t);for(const s in r){const c=r[s];c&&(a(s,qA(t,s,c)),l.push(s))}return l}const UA={provider:"",aliases:{},not_found:{},...Hy};function Mf(t,a){for(const l in a)if(l in t&&typeof t[l]!=typeof a[l])return!1;return!0}function Gy(t){if(typeof t!="object"||t===null)return null;const a=t;if(typeof a.prefix!="string"||!t.icons||typeof t.icons!="object"||!Mf(t,UA))return null;const l=a.icons;for(const s in l){const c=l[s];if(!s||typeof c.body!="string"||!Mf(c,Cf))return null}const r=a.aliases||Object.create(null);for(const s in r){const c=r[s],u=c.parent;if(!s||typeof u!="string"||!l[u]&&!r[u]||!Mf(c,Cf))return null}return a}const Wo=Object.create(null);function VA(t,a){return{provider:t,prefix:a,icons:Object.create(null),missing:new Set}}function $n(t,a){const l=Wo[t]||(Wo[t]=Object.create(null));return l[a]||(l[a]=VA(t,a))}function Xy(t,a){return Gy(a)?Yy(a,(l,r)=>{r?t.icons[l]=r:t.missing.add(l)}):[]}function YA(t,a,l){try{if(typeof l.body=="string")return t.icons[a]={...l},!0}catch{}return!1}function GA(t,a){let l=[];return(typeof t=="string"?[t]:Object.keys(Wo)).forEach(s=>{(typeof s=="string"&&typeof a=="string"?[a]:Object.keys(Wo[s]||{})).forEach(u=>{const d=$n(s,u);l=l.concat(Object.keys(d.icons).map(h=>(s!==""?"@"+s+":":"")+u+":"+h))})}),l}let rr=!1;function Zy(t){return typeof t=="boolean"&&(rr=t),rr}function or(t){const a=typeof t=="string"?lr(t,!0,rr):t;if(a){const l=$n(a.provider,a.prefix),r=a.name;return l.icons[r]||(l.missing.has(r)?null:void 0)}}function Qy(t,a){const l=lr(t,!0,rr);if(!l)return!1;const r=$n(l.provider,l.prefix);return a?YA(r,l.name,a):(r.missing.add(l.name),!0)}function Iy(t,a){if(typeof t!="object")return!1;if(typeof a!="string"&&(a=t.provider||""),rr&&!a&&!t.prefix){let s=!1;return Gy(t)&&(t.prefix="",Yy(t,(c,u)=>{Qy(c,u)&&(s=!0)})),s}const l=t.prefix;if(!Po({prefix:l,name:"a"}))return!1;const r=$n(a,l);return!!Xy(r,t)}function $y(t){return!!or(t)}function XA(t){const a=or(t);return a&&{...ar,...a}}function ZA(t){const a={loaded:[],missing:[],pending:[]},l=Object.create(null);t.sort((s,c)=>s.provider!==c.provider?s.provider.localeCompare(c.provider):s.prefix!==c.prefix?s.prefix.localeCompare(c.prefix):s.name.localeCompare(c.name));let r={provider:"",prefix:"",name:""};return t.forEach(s=>{if(r.name===s.name&&r.prefix===s.prefix&&r.provider===s.provider)return;r=s;const c=s.provider,u=s.prefix,d=s.name,h=l[c]||(l[c]=Object.create(null)),m=h[u]||(h[u]=$n(c,u));let p;d in m.icons?p=a.loaded:u===""||m.missing.has(d)?p=a.missing:p=a.pending;const y={provider:c,prefix:u,name:d};p.push(y)}),a}function Ky(t,a){t.forEach(l=>{const r=l.loaderCallbacks;r&&(l.loaderCallbacks=r.filter(s=>s.id!==a))})}function QA(t){t.pendingCallbacksFlag||(t.pendingCallbacksFlag=!0,setTimeout(()=>{t.pendingCallbacksFlag=!1;const a=t.loaderCallbacks?t.loaderCallbacks.slice(0):[];if(!a.length)return;let l=!1;const r=t.provider,s=t.prefix;a.forEach(c=>{const u=c.icons,d=u.pending.length;u.pending=u.pending.filter(h=>{if(h.prefix!==s)return!0;const m=h.name;if(t.icons[m])u.loaded.push({provider:r,prefix:s,name:m});else if(t.missing.has(m))u.missing.push({provider:r,prefix:s,name:m});else return l=!0,!0;return!1}),u.pending.length!==d&&(l||Ky([t],c.id),c.callback(u.loaded.slice(0),u.missing.slice(0),u.pending.slice(0),c.abort))})}))}let IA=0;function $A(t,a,l){const r=IA++,s=Ky.bind(null,l,r);if(!a.pending.length)return s;const c={id:r,icons:a,callback:t,abort:s};return l.forEach(u=>{(u.loaderCallbacks||(u.loaderCallbacks=[])).push(c)}),s}const Tf=Object.create(null);function Fy(t,a){Tf[t]=a}function Af(t){return Tf[t]||Tf[""]}function KA(t,a=!0,l=!1){const r=[];return t.forEach(s=>{const c=typeof s=="string"?lr(s,a,l):s;c&&r.push(c)}),r}var FA={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function JA(t,a,l,r){const s=t.resources.length,c=t.random?Math.floor(Math.random()*s):t.index;let u;if(t.random){let R=t.resources.slice(0);for(u=[];R.length>1;){const O=Math.floor(Math.random()*R.length);u.push(R[O]),R=R.slice(0,O).concat(R.slice(O+1))}u=u.concat(R)}else u=t.resources.slice(c).concat(t.resources.slice(0,c));const d=Date.now();let h="pending",m=0,p,y=null,v=[],x=[];typeof r=="function"&&x.push(r);function w(){y&&(clearTimeout(y),y=null)}function N(){h==="pending"&&(h="aborted"),w(),v.forEach(R=>{R.status==="pending"&&(R.status="aborted")}),v=[]}function S(R,O){O&&(x=[]),typeof R=="function"&&x.push(R)}function M(){return{startTime:d,payload:a,status:h,queriesSent:m,queriesPending:v.length,subscribe:S,abort:N}}function z(){h="failed",x.forEach(R=>{R(void 0,p)})}function E(){v.forEach(R=>{R.status==="pending"&&(R.status="aborted")}),v=[]}function T(R,O,C){const D=O!=="success";switch(v=v.filter(Z=>Z!==R),h){case"pending":break;case"failed":if(D||!t.dataAfterTimeout)return;break;default:return}if(O==="abort"){p=C,z();return}if(D){p=C,v.length||(u.length?q():z());return}if(w(),E(),!t.random){const Z=t.resources.indexOf(R.resource);Z!==-1&&Z!==t.index&&(t.index=Z)}h="completed",x.forEach(Z=>{Z(C)})}function q(){if(h!=="pending")return;w();const R=u.shift();if(R===void 0){if(v.length){y=setTimeout(()=>{w(),h==="pending"&&(E(),z())},t.timeout);return}z();return}const O={status:"pending",resource:R,callback:(C,D)=>{T(O,C,D)}};v.push(O),m++,y=setTimeout(q,t.rotate),l(R,a,O.callback)}return setTimeout(q),M}function Jy(t){const a={...FA,...t};let l=[];function r(){l=l.filter(d=>d().status==="pending")}function s(d,h,m){const p=JA(a,d,h,(y,v)=>{r(),m&&m(y,v)});return l.push(p),p}function c(d){return l.find(h=>d(h))||null}return{query:s,find:c,setIndex:d=>{a.index=d},getIndex:()=>a.index,cleanup:r}}function zf(t){let a;if(typeof t.resources=="string")a=[t.resources];else if(a=t.resources,!(a instanceof Array)||!a.length)return null;return{resources:a,path:t.path||"/",maxURL:t.maxURL||500,rotate:t.rotate||750,timeout:t.timeout||5e3,random:t.random===!0,index:t.index||0,dataAfterTimeout:t.dataAfterTimeout!==!1}}const es=Object.create(null),sr=["https://api.simplesvg.com","https://api.unisvg.com"],ts=[];for(;sr.length>0;)sr.length===1||Math.random()>.5?ts.push(sr.shift()):ts.push(sr.pop());es[""]=zf({resources:["https://api.iconify.design"].concat(ts)});function Py(t,a){const l=zf(a);return l===null?!1:(es[t]=l,!0)}function ns(t){return es[t]}function PA(){return Object.keys(es)}function Wy(){}const Of=Object.create(null);function WA(t){if(!Of[t]){const a=ns(t);if(!a)return;const l=Jy(a),r={config:a,redundancy:l};Of[t]=r}return Of[t]}function ev(t,a,l){let r,s;if(typeof t=="string"){const c=Af(t);if(!c)return l(void 0,424),Wy;s=c.send;const u=WA(t);u&&(r=u.redundancy)}else{const c=zf(t);if(c){r=Jy(c);const u=t.resources?t.resources[0]:"",d=Af(u);d&&(s=d.send)}}return!r||!s?(l(void 0,424),Wy):r.query(a,s,l)().abort}function tv(){}function e3(t){t.iconsLoaderFlag||(t.iconsLoaderFlag=!0,setTimeout(()=>{t.iconsLoaderFlag=!1,QA(t)}))}function t3(t){const a=[],l=[];return t.forEach(r=>{(r.match(Uy)?a:l).push(r)}),{valid:a,invalid:l}}function ur(t,a,l){function r(){const s=t.pendingIcons;a.forEach(c=>{s&&s.delete(c),t.icons[c]||t.missing.add(c)})}if(l&&typeof l=="object")try{if(!Xy(t,l).length){r();return}}catch(s){console.error(s)}r(),e3(t)}function nv(t,a){t instanceof Promise?t.then(l=>{a(l)}).catch(()=>{a(null)}):a(t)}function n3(t,a){t.iconsToLoad?t.iconsToLoad=t.iconsToLoad.concat(a).sort():t.iconsToLoad=a,t.iconsQueueFlag||(t.iconsQueueFlag=!0,setTimeout(()=>{t.iconsQueueFlag=!1;const{provider:l,prefix:r}=t,s=t.iconsToLoad;if(delete t.iconsToLoad,!s||!s.length)return;const c=t.loadIcon;if(t.loadIcons&&(s.length>1||!c)){nv(t.loadIcons(s,r,l),p=>{ur(t,s,p)});return}if(c){s.forEach(p=>{const y=c(p,r,l);nv(y,v=>{const x=v?{prefix:r,icons:{[p]:v}}:null;ur(t,[p],x)})});return}const{valid:u,invalid:d}=t3(s);if(d.length&&ur(t,d,null),!u.length)return;const h=r.match(Uy)?Af(l):null;if(!h){ur(t,u,null);return}h.prepare(l,r,u).forEach(p=>{ev(l,p,y=>{ur(t,p.icons,y)})})}))}const jf=(t,a)=>{const l=KA(t,!0,Zy()),r=ZA(l);if(!r.pending.length){let h=!0;return a&&setTimeout(()=>{h&&a(r.loaded,r.missing,r.pending,tv)}),()=>{h=!1}}const s=Object.create(null),c=[];let u,d;return r.pending.forEach(h=>{const{provider:m,prefix:p}=h;if(p===d&&m===u)return;u=m,d=p,c.push($n(m,p));const y=s[m]||(s[m]=Object.create(null));y[p]||(y[p]=[])}),r.pending.forEach(h=>{const{provider:m,prefix:p,name:y}=h,v=$n(m,p),x=v.pendingIcons||(v.pendingIcons=new Set);x.has(y)||(x.add(y),s[m][p].push(y))}),c.forEach(h=>{const m=s[h.provider][h.prefix];m.length&&n3(h,m)}),a?$A(a,r,c):tv},i3=t=>new Promise((a,l)=>{const r=typeof t=="string"?lr(t,!0):t;if(!r){l(t);return}jf([r||t],s=>{if(s.length&&r){const c=or(r);if(c){a({...ar,...c});return}}l(t)})});function iv(t){try{const a=typeof t=="string"?JSON.parse(t):t;if(typeof a.body=="string")return{...a}}catch{}}function a3(t,a){if(typeof t=="object")return{data:iv(t),value:t};if(typeof t!="string")return{value:t};if(t.includes("{")){const c=iv(t);if(c)return{data:c,value:t}}const l=lr(t,!0,!0);if(!l)return{value:t};const r=or(l);if(r!==void 0||!l.prefix)return{value:t,name:l,data:r};const s=jf([l],()=>a(t,l,or(l)));return{value:t,name:l,loading:s}}let av=!1;try{av=navigator.vendor.indexOf("Apple")===0}catch{}function l3(t,a){switch(a){case"svg":case"bg":case"mask":return a}return a!=="style"&&(av||t.indexOf("<a")===-1)?"svg":t.indexOf("currentColor")===-1?"bg":"mask"}const r3=/(-?[0-9.]*[0-9]+[0-9.]*)/g,o3=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Rf(t,a,l){if(a===1)return t;if(l=l||100,typeof t=="number")return Math.ceil(t*a*l)/l;if(typeof t!="string")return t;const r=t.split(r3);if(r===null||!r.length)return t;const s=[];let c=r.shift(),u=o3.test(c);for(;;){if(u){const d=parseFloat(c);isNaN(d)?s.push(c):s.push(Math.ceil(d*a*l)/l)}else s.push(c);if(c=r.shift(),c===void 0)return s.join("");u=!u}}function s3(t,a="defs"){let l="";const r=t.indexOf("<"+a);for(;r>=0;){const s=t.indexOf(">",r),c=t.indexOf("</"+a);if(s===-1||c===-1)break;const u=t.indexOf(">",c);if(u===-1)break;l+=t.slice(s+1,c).trim(),t=t.slice(0,r).trim()+t.slice(u+1)}return{defs:l,content:t}}function u3(t,a){return t?"<defs>"+t+"</defs>"+a:a}function c3(t,a,l){const r=s3(t);return u3(r.defs,a+r.content+l)}const f3=t=>t==="unset"||t==="undefined"||t==="none";function lv(t,a){const l={...ar,...t},r={...Ly,...a},s={left:l.left,top:l.top,width:l.width,height:l.height};let c=l.body;[l,r].forEach(N=>{const S=[],M=N.hFlip,z=N.vFlip;let E=N.rotate;M?z?E+=2:(S.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),S.push("scale(-1 1)"),s.top=s.left=0):z&&(S.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),S.push("scale(1 -1)"),s.top=s.left=0);let T;switch(E<0&&(E-=Math.floor(E/4)*4),E=E%4,E){case 1:T=s.height/2+s.top,S.unshift("rotate(90 "+T.toString()+" "+T.toString()+")");break;case 2:S.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:T=s.width/2+s.left,S.unshift("rotate(-90 "+T.toString()+" "+T.toString()+")");break}E%2===1&&(s.left!==s.top&&(T=s.left,s.left=s.top,s.top=T),s.width!==s.height&&(T=s.width,s.width=s.height,s.height=T)),S.length&&(c=c3(c,'<g transform="'+S.join(" ")+'">',"</g>"))});const u=r.width,d=r.height,h=s.width,m=s.height;let p,y;u===null?(y=d===null?"1em":d==="auto"?m:d,p=Rf(y,h/m)):(p=u==="auto"?h:u,y=d===null?Rf(p,m/h):d==="auto"?m:d);const v={},x=(N,S)=>{f3(S)||(v[N]=S.toString())};x("width",p),x("height",y);const w=[s.left,s.top,h,m];return v.viewBox=w.join(" "),{attributes:v,viewBox:w,body:c}}function Df(t,a){let l=t.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const r in a)l+=" "+r+'="'+a[r]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+l+">"+t+"</svg>"}function d3(t){return t.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function h3(t){return"data:image/svg+xml,"+d3(t)}function rv(t){return'url("'+h3(t)+'")'}let is=(()=>{let t;try{if(t=fetch,typeof t=="function")return t}catch{}})();function m3(t){is=t}function g3(){return is}function p3(t,a){const l=ns(t);if(!l)return 0;let r;if(!l.maxURL)r=0;else{let s=0;l.resources.forEach(u=>{s=Math.max(s,u.length)});const c=a+".json?icons=";r=l.maxURL-s-l.path.length-c.length}return r}function y3(t){return t===404}const v3=(t,a,l)=>{const r=[],s=p3(t,a),c="icons";let u={type:c,provider:t,prefix:a,icons:[]},d=0;return l.forEach((h,m)=>{d+=h.length+1,d>=s&&m>0&&(r.push(u),u={type:c,provider:t,prefix:a,icons:[]},d=h.length),u.icons.push(h)}),r.push(u),r};function b3(t){if(typeof t=="string"){const a=ns(t);if(a)return a.path}return"/"}const x3={prepare:v3,send:(t,a,l)=>{if(!is){l("abort",424);return}let r=b3(a.provider);switch(a.type){case"icons":{const c=a.prefix,d=a.icons.join(","),h=new URLSearchParams({icons:d});r+=c+".json?"+h.toString();break}case"custom":{const c=a.uri;r+=c.slice(0,1)==="/"?c.slice(1):c;break}default:l("abort",400);return}let s=503;is(t+r).then(c=>{const u=c.status;if(u!==200){setTimeout(()=>{l(y3(u)?"abort":"next",u)});return}return s=501,c.json()}).then(c=>{if(typeof c!="object"||c===null){setTimeout(()=>{c===404?l("abort",c):l("next",s)});return}setTimeout(()=>{l("success",c)})}).catch(()=>{l("next",s)})}};function w3(t,a,l){$n(l||"",a).loadIcons=t}function S3(t,a,l){$n(l||"",a).loadIcon=t}const kf="data-style";let ov="";function E3(t){ov=t}function sv(t,a){let l=Array.from(t.childNodes).find(r=>r.hasAttribute&&r.hasAttribute(kf));l||(l=document.createElement("style"),l.setAttribute(kf,kf),t.appendChild(l)),l.textContent=":host{display:inline-block;vertical-align:"+(a?"-0.125em":"0")+"}span,svg{display:block;margin:auto}"+ov}function uv(){Fy("",x3),Zy(!0);let t;try{t=window}catch{}if(t){if(t.IconifyPreload!==void 0){const l=t.IconifyPreload,r="Invalid IconifyPreload syntax.";typeof l=="object"&&l!==null&&(l instanceof Array?l:[l]).forEach(s=>{try{(typeof s!="object"||s===null||s instanceof Array||typeof s.icons!="object"||typeof s.prefix!="string"||!Iy(s))&&console.error(r)}catch{console.error(r)}})}if(t.IconifyProviders!==void 0){const l=t.IconifyProviders;if(typeof l=="object"&&l!==null)for(const r in l){const s="IconifyProviders["+r+"] is invalid.";try{const c=l[r];if(typeof c!="object"||!c||c.resources===void 0)continue;Py(r,c)||console.error(s)}catch{console.error(s)}}}}return{enableCache:l=>{},disableCache:l=>{},iconLoaded:$y,iconExists:$y,getIcon:XA,listIcons:GA,addIcon:Qy,addCollection:Iy,calculateSize:Rf,buildIcon:lv,iconToHTML:Df,svgToURL:rv,loadIcons:jf,loadIcon:i3,addAPIProvider:Py,setCustomIconLoader:S3,setCustomIconsLoader:w3,appendCustomStyle:E3,_api:{getAPIConfig:ns,setAPIModule:Fy,sendAPIQuery:ev,setFetch:m3,getFetch:g3,listAPIProviders:PA}}}const Hf={"background-color":"currentColor"},cv={"background-color":"transparent"},fv={image:"var(--svg)",repeat:"no-repeat",size:"100% 100%"},dv={"-webkit-mask":Hf,mask:Hf,background:cv};for(const t in dv){const a=dv[t];for(const l in fv)a[t+"-"+l]=fv[l]}function hv(t){return t?t+(t.match(/^[-0-9.]+$/)?"px":""):"inherit"}function _3(t,a,l){const r=document.createElement("span");let s=t.body;s.indexOf("<a")!==-1&&(s+="<!-- "+Date.now()+" -->");const c=t.attributes,u=Df(s,{...c,width:a.width+"",height:a.height+""}),d=rv(u),h=r.style,m={"--svg":d,width:hv(c.width),height:hv(c.height),...l?Hf:cv};for(const p in m)h.setProperty(p,m[p]);return r}let cr;function N3(){try{cr=window.trustedTypes.createPolicy("iconify",{createHTML:t=>t})}catch{cr=null}}function C3(t){return cr===void 0&&N3(),cr?cr.createHTML(t):t}function M3(t){const a=document.createElement("span"),l=t.attributes;let r="";l.width||(r="width: inherit;"),l.height||(r+="height: inherit;"),r&&(l.style=r);const s=Df(t.body,l);return a.innerHTML=C3(s),a.firstChild}function Lf(t){return Array.from(t.childNodes).find(a=>{const l=a.tagName&&a.tagName.toUpperCase();return l==="SPAN"||l==="SVG"})}function mv(t,a){const l=a.icon.data,r=a.customisations,s=lv(l,r);r.preserveAspectRatio&&(s.attributes.preserveAspectRatio=r.preserveAspectRatio);const c=a.renderedMode;let u;c==="svg"?u=M3(s):u=_3(s,{...ar,...l},c==="mask");const d=Lf(t);d?u.tagName==="SPAN"&&d.tagName===u.tagName?d.setAttribute("style",u.getAttribute("style")):t.replaceChild(u,d):t.appendChild(u)}function gv(t,a,l){const r=l&&(l.rendered?l:l.lastRender);return{rendered:!1,inline:a,icon:t,lastRender:r}}function T3(t="iconify-icon"){let a,l;try{a=window.customElements,l=window.HTMLElement}catch{return}if(!a||!l)return;const r=a.get(t);if(r)return r;const s=["icon","mode","inline","noobserver","width","height","rotate","flip"],c=class extends l{constructor(){super();et(this,"_shadowRoot");et(this,"_initialised",!1);et(this,"_state");et(this,"_checkQueued",!1);et(this,"_connected",!1);et(this,"_observer",null);et(this,"_visible",!0);const h=this._shadowRoot=this.attachShadow({mode:"open"}),m=this.hasAttribute("inline");sv(h,m),this._state=gv({value:""},m),this._queueCheck()}connectedCallback(){this._connected=!0,this.startObserver()}disconnectedCallback(){this._connected=!1,this.stopObserver()}static get observedAttributes(){return s.slice(0)}attributeChangedCallback(h){switch(h){case"inline":{const m=this.hasAttribute("inline"),p=this._state;m!==p.inline&&(p.inline=m,sv(this._shadowRoot,m));break}case"noobserver":{this.hasAttribute("noobserver")?this.startObserver():this.stopObserver();break}default:this._queueCheck()}}get icon(){const h=this.getAttribute("icon");if(h&&h.slice(0,1)==="{")try{return JSON.parse(h)}catch{}return h}set icon(h){typeof h=="object"&&(h=JSON.stringify(h)),this.setAttribute("icon",h)}get inline(){return this.hasAttribute("inline")}set inline(h){h?this.setAttribute("inline","true"):this.removeAttribute("inline")}get observer(){return this.hasAttribute("observer")}set observer(h){h?this.setAttribute("observer","true"):this.removeAttribute("observer")}restartAnimation(){const h=this._state;if(h.rendered){const m=this._shadowRoot;if(h.renderedMode==="svg")try{m.lastChild.setCurrentTime(0);return}catch{}mv(m,h)}}get status(){const h=this._state;return h.rendered?"rendered":h.icon.data===null?"failed":"loading"}_queueCheck(){this._checkQueued||(this._checkQueued=!0,setTimeout(()=>{this._check()}))}_check(){if(!this._checkQueued)return;this._checkQueued=!1;const h=this._state,m=this.getAttribute("icon");if(m!==h.icon.value){this._iconChanged(m);return}if(!h.rendered||!this._visible)return;const p=this.getAttribute("mode"),y=qy(this);(h.attrMode!==p||HA(h.customisations,y)||!Lf(this._shadowRoot))&&this._renderIcon(h.icon,y,p)}_iconChanged(h){const m=a3(h,(p,y,v)=>{const x=this._state;if(x.rendered||this.getAttribute("icon")!==p)return;const w={value:p,name:y,data:v};w.data?this._gotIconData(w):x.icon=w});m.data?this._gotIconData(m):this._state=gv(m,this._state.inline,this._state)}_forceRender(){if(!this._visible){const h=Lf(this._shadowRoot);h&&this._shadowRoot.removeChild(h);return}this._queueCheck()}_gotIconData(h){this._checkQueued=!1,this._renderIcon(h,qy(this),this.getAttribute("mode"))}_renderIcon(h,m,p){const y=l3(h.data.body,p),v=this._state.inline;mv(this._shadowRoot,this._state={rendered:!0,icon:h,inline:v,customisations:m,attrMode:p,renderedMode:y})}startObserver(){if(!this._observer&&!this.hasAttribute("noobserver"))try{this._observer=new IntersectionObserver(h=>{const m=h.some(p=>p.isIntersecting);m!==this._visible&&(this._visible=m,this._forceRender())}),this._observer.observe(this)}catch{if(this._observer){try{this._observer.disconnect()}catch{}this._observer=null}}}stopObserver(){this._observer&&(this._observer.disconnect(),this._observer=null,this._visible=!0,this._connected&&this._forceRender())}};s.forEach(d=>{d in c.prototype||Object.defineProperty(c.prototype,d,{get:function(){return this.getAttribute(d)},set:function(h){h!==null?this.setAttribute(d,h):this.removeAttribute(d)}})});const u=uv();for(const d in u)c[d]=c.prototype[d]=u[d];return a.define(t,c),c}const A3=T3()||uv(),{enableCache:a5,disableCache:l5,iconLoaded:r5,iconExists:o5,getIcon:s5,listIcons:u5,addIcon:c5,addCollection:f5,calculateSize:d5,buildIcon:h5,iconToHTML:m5,svgToURL:g5,loadIcons:p5,loadIcon:y5,setCustomIconLoader:v5,setCustomIconsLoader:b5,addAPIProvider:x5,_api:w5}=A3;var Ue=Ru.forwardRef((t,a)=>{const l={...t,ref:a};return typeof t.icon=="object"&&(l.icon=JSON.stringify(t.icon)),t.inline||delete l.inline,t.className&&(l.class=t.className),Ru.createElement("iconify-icon",l)});function z3({onFilterClick:t,isFilterOpen:a,edgeStyle:l,onEdgeStyleChange:r,onLayout:s,onExport:c,onReset:u,showReset:d=!1}){const{zoomIn:h,zoomOut:m,fitView:p}=er(),[y,v]=K.useState(!1),x=K.useRef(null),w=K.useCallback(N=>{c(N),v(!1)},[c]);return K.useEffect(()=>{const N=S=>{x.current&&!x.current.contains(S.target)&&v(!1)};if(y)return document.addEventListener("mousedown",N),()=>{document.removeEventListener("mousedown",N)}},[y]),_.jsxs(wi,{position:"bottom-center",className:"mb-4 flex items-center gap-2 rounded-lg bg-white px-3 py-2 shadow-lg",children:[_.jsx("button",{type:"button",onClick:()=>m(),className:"flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 text-gray-600",title:"Zoom out",children:_.jsx(Ue,{icon:"mdi:minus",className:"text-lg"})}),_.jsx("button",{type:"button",onClick:()=>p({padding:.2}),className:"flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 text-gray-600",title:"Fit to screen",children:_.jsx(Ue,{icon:"mdi:fit-to-screen",className:"text-lg"})}),_.jsx("button",{type:"button",onClick:()=>h(),className:"flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 text-gray-600",title:"Zoom in",children:_.jsx(Ue,{icon:"mdi:plus",className:"text-lg"})}),_.jsx("div",{className:"mx-2 h-6 w-px bg-gray-200"}),_.jsxs("button",{type:"button",onClick:()=>r(l==="bezier"?"smoothstep":"bezier"),className:"flex h-8 items-center justify-center gap-1.5 rounded px-2 hover:bg-gray-100 text-gray-600",title:`Switch to ${l==="bezier"?"step":"smooth"} edges`,children:[_.jsx(Ue,{icon:l==="bezier"?"mdi:vector-curve":"mdi:vector-polyline",className:"text-lg"}),_.jsx("span",{className:"text-xs",children:l==="bezier"?"Smooth":"Step"})]}),_.jsx("div",{className:"mx-2 h-6 w-px bg-gray-200"}),_.jsx("button",{type:"button",onClick:()=>s("LR"),className:"flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 text-gray-600",title:"Auto-layout horizontal",children:_.jsx(Ue,{icon:"mdi:arrow-right",className:"text-lg"})}),_.jsx("button",{type:"button",onClick:()=>s("TB"),className:"flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 text-gray-600",title:"Auto-layout vertical",children:_.jsx(Ue,{icon:"mdi:arrow-down",className:"text-lg"})}),_.jsx("div",{className:"mx-2 h-6 w-px bg-gray-200"}),_.jsx("button",{type:"button",onClick:t,className:_t("flex h-8 w-8 items-center justify-center rounded",a?"bg-indigo-500 text-white hover:bg-indigo-600":"hover:bg-gray-100 text-gray-600"),title:"Filter nodes",children:_.jsx(Ue,{icon:"mdi:filter-variant",className:"text-lg"})}),d&&u&&_.jsx("button",{type:"button",onClick:u,className:"flex h-8 w-8 items-center justify-center rounded hover:bg-gray-100 text-gray-600",title:"Reset to default view",children:_.jsx(Ue,{icon:"mdi:refresh",className:"text-lg"})}),_.jsx("div",{className:"mx-2 h-6 w-px bg-gray-200"}),_.jsxs("div",{className:"relative",ref:x,children:[_.jsx("button",{type:"button",onClick:()=>v(!y),className:_t("flex h-8 w-8 items-center justify-center rounded",y?"bg-indigo-500 text-white hover:bg-indigo-600":"hover:bg-gray-100 text-gray-600"),title:"Export diagram",children:_.jsx(Ue,{icon:"mdi:download",className:"text-lg"})}),y&&_.jsxs("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-2 min-w-[120px] rounded-lg bg-white py-1 shadow-lg border border-gray-200",children:[_.jsxs("button",{type:"button",onClick:()=>w("png"),className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:image-outline",className:"text-lg text-gray-500"}),"PNG"]}),_.jsxs("button",{type:"button",onClick:()=>w("svg"),className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:file-code-outline",className:"text-lg text-gray-500"}),"SVG"]})]})]})]})}function O3({edge:t,x:a,y:l,onClose:r,onHighlight:s}){const c=K.useRef(null),[u,d]=K.useState(!1);K.useEffect(()=>{const p=v=>{c.current&&!c.current.contains(v.target)&&r()},y=v=>{v.key==="Escape"&&r()};return document.addEventListener("mousedown",p),document.addEventListener("keydown",y),()=>{document.removeEventListener("mousedown",p),document.removeEventListener("keydown",y)}},[r]);const h=K.useCallback(()=>{s(t.id),r()},[t.id,s,r]),m=K.useCallback(async()=>{const p=[`Relationship: ${t.sourceRelName}`,`From: ${t.source}`,`To: ${t.target}`,`Cardinality: ${t.cardinality}`,t.targetRelName?`Reverse: ${t.targetRelName}`:null].filter(Boolean).join(`
17
+ `);try{if(navigator.clipboard?.writeText)await navigator.clipboard.writeText(p);else{const y=document.createElement("textarea");y.value=p,y.style.position="fixed",y.style.left="-9999px",document.body.appendChild(y),y.select(),document.execCommand("copy"),document.body.removeChild(y)}d(!0),setTimeout(()=>{d(!1),r()},1e3)}catch(y){console.error("Failed to copy:",y),r()}},[t,r]);return _.jsxs("div",{ref:c,className:"fixed z-50 min-w-[220px] rounded-lg bg-white py-1 shadow-lg border border-gray-200",style:{left:a,top:l},children:[_.jsxs("div",{className:"px-3 py-2 border-b border-gray-100",children:[_.jsx("div",{className:"text-xs font-medium text-gray-700 truncate",children:t.sourceRelName}),_.jsxs("div",{className:"text-[10px] text-gray-400 mt-0.5",children:[t.source," → ",t.target]})]}),_.jsxs("button",{type:"button",onClick:h,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:spotlight-beam",className:"text-lg text-gray-500"}),"Highlight relationship"]}),_.jsx("div",{className:"my-1 border-t border-gray-100"}),_.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:u?"mdi:check":"mdi:content-copy",className:`text-lg ${u?"text-green-500":"text-gray-500"}`}),u?"Copied!":"Copy relationship info"]})]})}const j3=t=>{switch(t){case"profile":return"bg-pink-100 text-pink-700";case"template":return"bg-amber-100 text-amber-700";default:return"bg-indigo-100 text-indigo-700"}};function R3({namespaceSchemas:t,hiddenNodes:a,onToggleNamespace:l,onToggleNode:r,onFocusNode:s,onClose:c,onHoverNode:u}){const[d,h]=K.useState(new Set),[m,p]=K.useState(""),y=N=>{h(S=>{const M=new Set(S);return M.has(N)?M.delete(N):M.add(N),M})},v=Array.from(t.keys()).sort(),x=K.useMemo(()=>{if(!m.trim())return v;const N=m.toLowerCase().trim();return v.filter(S=>S.toLowerCase().includes(N)?!0:(t.get(S)??[]).some(z=>z.schema.name.toLowerCase().includes(N)||(z.schema.label?.toLowerCase().includes(N)??!1)||(z.schema.kind?.toLowerCase().includes(N)??!1)||z.type.toLowerCase().includes(N)))},[v,t,m]),w=K.useCallback(N=>{const S=t.get(N)??[];if(!m.trim())return S;const M=m.toLowerCase().trim();return N.toLowerCase().includes(M)?S:S.filter(z=>z.schema.name.toLowerCase().includes(M)||(z.schema.label?.toLowerCase().includes(M)??!1)||(z.schema.kind?.toLowerCase().includes(M)??!1)||z.type.toLowerCase().includes(M))},[t,m]);return _.jsxs("div",{className:"flex h-full w-80 flex-col border-gray-200 border-l bg-white",children:[_.jsxs("div",{className:"flex items-center justify-between border-gray-200 border-b px-4 py-3",children:[_.jsx("h3",{className:"font-semibold text-gray-700",children:"Filter Schemas"}),_.jsx("button",{type:"button",onClick:c,className:"p-1 rounded hover:bg-gray-100 text-gray-500",children:_.jsx(Ue,{icon:"mdi:close",className:"text-lg"})})]}),_.jsx("div",{className:"border-gray-200 border-b px-3 py-2",children:_.jsxs("div",{className:"relative",children:[_.jsx(Ue,{icon:"mdi:magnify",className:"-translate-y-1/2 absolute top-1/2 left-2.5 text-gray-400 text-lg"}),_.jsx("input",{type:"text",placeholder:"Search schemas...",value:m,onChange:N=>p(N.target.value),className:"w-full rounded-md border border-gray-200 py-1.5 pr-8 pl-9 text-sm placeholder:text-gray-400 focus:border-indigo-500 focus:outline-none focus:ring-1 focus:ring-indigo-500"}),m&&_.jsx("button",{type:"button",onClick:()=>p(""),className:"-translate-y-1/2 absolute top-1/2 right-2 text-gray-400 hover:text-gray-600",children:_.jsx(Ue,{icon:"mdi:close-circle",className:"text-lg"})})]})}),_.jsxs("div",{className:"flex-1 overflow-y-auto p-2",children:[x.length===0&&m&&_.jsxs("div",{className:"px-4 py-8 text-center text-gray-400 text-sm",children:['No schemas found matching "',m,'"']}),x.map(N=>{const S=t.get(N)??[],M=w(N),z=d.has(N)||m.trim()!=="",E=S.filter(R=>!a.has(ke(R.schema))).length,T=E===0,q=E===S.length;return _.jsxs("div",{className:"mb-1",children:[_.jsxs("div",{className:_t("flex items-center gap-2 rounded px-2 py-1.5 hover:bg-gray-100",T?"opacity-50":""),children:[_.jsx("button",{type:"button",onClick:()=>y(N),className:"flex h-5 w-5 items-center justify-center text-gray-500",children:_.jsx(Ue,{icon:z?"mdi:chevron-down":"mdi:chevron-right",className:"text-lg"})}),_.jsx("button",{type:"button",onClick:()=>l(N),className:"flex h-5 w-5 items-center justify-center",children:_.jsx(Ue,{icon:T?"mdi:checkbox-blank-outline":q?"mdi:checkbox-marked":"mdi:minus-box",className:_t("text-lg",T?"text-gray-400":"text-indigo-600")})}),_.jsx("span",{className:"flex-1 font-medium text-gray-700 text-sm",children:N}),_.jsxs("span",{className:"px-1.5 py-0.5 rounded bg-gray-100 text-gray-500 text-xs",children:[E,"/",S.length]})]}),z&&_.jsx("div",{className:"ml-6 space-y-0.5 py-1",children:M.map(R=>{const O=ke(R.schema),C=a.has(O);return _.jsxs("div",{role:"group",className:_t("flex w-full items-center gap-2 rounded px-2 py-1 hover:bg-gray-100",C?"opacity-50":""),onMouseEnter:()=>!C&&u?.(O),onMouseLeave:()=>u?.(null),children:[_.jsx("button",{type:"button",onClick:()=>r(O),className:"flex h-5 w-5 shrink-0 items-center justify-center",children:_.jsx(Ue,{icon:C?"mdi:checkbox-blank-outline":"mdi:checkbox-marked",className:_t("text-lg",C?"text-gray-400":"text-indigo-600")})}),R.schema.icon&&_.jsx(Ue,{icon:R.schema.icon,className:"shrink-0 text-gray-500 text-sm"}),_.jsx("span",{className:"min-w-0 flex-1 truncate text-left text-gray-600 text-sm",children:R.schema.label??R.schema.name}),R.type!=="node"&&_.jsx("span",{className:_t("px-1 py-0.5 rounded text-[9px] uppercase font-medium",j3(R.type)),children:R.type}),!C&&_.jsx("button",{type:"button",onClick:()=>s(O),className:"flex h-5 w-5 shrink-0 items-center justify-center text-gray-400 hover:text-indigo-600",title:"Focus on schema",children:_.jsx(Ue,{icon:"mdi:target",className:"text-sm"})})]},O)})})]},N)})]})]})}function as(t,a){const l=t.internals.handleBounds?.source?.find(c=>c.id===a),r=t.internals.handleBounds?.target?.find(c=>c.id===a),s=l??r;return s?{x:t.internals.positionAbsolute.x+s.x+s.width/2,y:t.internals.positionAbsolute.y+s.y+s.height/2,position:s.position}:null}function D3(t,a,l,r){const s=as(t,`rel-${l}-left`),c=as(t,`rel-${l}-right`);let u=null,d=null;if(r&&(u=as(a,`rel-${r}-left`),d=as(a,`rel-${r}-right`)),!u||!d){const y=a.measured?.width??280,v=a.internals.positionAbsolute.y+20;u={x:a.internals.positionAbsolute.x,y:v,position:ye.Left},d={x:a.internals.positionAbsolute.x+y,y:v,position:ye.Right}}if(!s||!c){const y=t.measured?.width??280,v=t.measured?.height??200,x=t.internals.positionAbsolute.y+v/2,w=t.internals.positionAbsolute.x,S=a.internals.positionAbsolute.x>w;return{sx:S?w+y:w,sy:x,tx:S?u.x:d.x,ty:S?u.y:d.y,sourcePos:S?ye.Right:ye.Left,targetPos:S?ye.Left:ye.Right}}const h=[{source:s,target:d,sourcePos:ye.Left,targetPos:ye.Right},{source:s,target:u,sourcePos:ye.Left,targetPos:ye.Left},{source:c,target:u,sourcePos:ye.Right,targetPos:ye.Left},{source:c,target:d,sourcePos:ye.Right,targetPos:ye.Right}];let m=h[0],p=Number.POSITIVE_INFINITY;for(const y of h){const v=y.target.x-y.source.x,x=y.target.y-y.source.y,w=Math.sqrt(v*v+x*x);w<p&&(p=w,m=y)}return{sx:m.source.x,sy:m.source.y,tx:m.target.x,ty:m.target.y,sourcePos:m.sourcePos,targetPos:m.targetPos}}function k3({id:t,source:a,target:l,style:r,animated:s,data:c}){const u=Kp(a),d=Kp(l);if(!u||!d||a===l)return null;const h=c,m=h?.sourceRelName??"",p=h?.targetRelName??null,y=h?.edgeStyle??"bezier",{sx:v,sy:x,tx:w,ty:N,sourcePos:S,targetPos:M}=D3(u,d,m,p),z={sourceX:v,sourceY:x,sourcePosition:S,targetX:w,targetY:N,targetPosition:M},[E]=y==="smoothstep"?Ho(z):ic(z);return _.jsx(tr,{id:t,path:E,style:r,className:s?"react-flow__edge-path animated":"react-flow__edge-path"})}function H3(){const[t,a]=K.useState(!1);return _.jsxs(_.Fragment,{children:[_.jsx(wi,{position:"top-right",className:"mr-2 mt-2",children:_.jsx("button",{type:"button",onClick:()=>a(!t),className:"flex h-8 w-8 items-center justify-center rounded-full bg-white shadow-md hover:bg-gray-50 text-gray-600 hover:text-gray-800 transition-colors",title:"Show legend",children:_.jsx(Ue,{icon:"mdi:help-circle-outline",className:"text-xl"})})}),t&&_.jsx(wi,{position:"top-right",className:"mr-2 mt-12",children:_.jsxs("div",{className:"bg-white rounded-lg shadow-lg border border-gray-200 p-4 min-w-[280px] max-w-[320px]",children:[_.jsxs("div",{className:"flex items-center justify-between mb-3",children:[_.jsx("h3",{className:"font-semibold text-sm text-gray-700",children:"Legend"}),_.jsx("button",{type:"button",onClick:()=>a(!1),className:"text-gray-400 hover:text-gray-600",children:_.jsx(Ue,{icon:"mdi:close",className:"text-lg"})})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("h4",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Schema Types"}),_.jsxs("div",{className:"space-y-2",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-r from-indigo-500 to-indigo-600"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Node"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-r from-pink-500 to-pink-600"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Profile"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-r from-amber-500 to-amber-600"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Template"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-4 h-4 rounded bg-gradient-to-r from-emerald-500 to-emerald-600"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Generic"})]})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("h4",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Edge Colors"}),_.jsxs("div",{className:"space-y-2",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5 bg-indigo-500"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Node relationship"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5 bg-pink-500"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Profile relationship"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5 bg-amber-500"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Template relationship"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5 bg-gray-400"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Inherited relationship"})]})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("h4",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Line Styles"}),_.jsxs("div",{className:"space-y-2",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5 bg-indigo-500"}),_.jsx("span",{className:"text-xs text-gray-600",children:"Solid - One cardinality"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5 relative overflow-hidden",style:{background:"#6366f1"},children:_.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"repeating-linear-gradient(90deg, transparent, transparent 2px, #6366f1 2px, #6366f1 6px)",animation:"dash-move 0.5s linear infinite"}})}),_.jsx("span",{className:"text-xs text-gray-600",children:"Animated - Many cardinality"})]}),_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("div",{className:"w-8 h-0.5",style:{backgroundImage:"repeating-linear-gradient(90deg, #10b981, #10b981 3px, transparent 3px, transparent 6px)"}}),_.jsx("span",{className:"text-xs text-gray-600",children:"Dashed green - Via generic"})]})]})]}),_.jsxs("div",{className:"mb-4",children:[_.jsx("h4",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Special Markers"}),_.jsx("div",{className:"space-y-2",children:_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("span",{className:"text-orange-500 flex items-center gap-0.5",children:_.jsx(Ue,{icon:"mdi:reload",className:"text-sm"})}),_.jsx("span",{className:"text-xs text-gray-600",children:"Self-referencing relationship"})]})})]}),_.jsxs("div",{className:"border-t border-gray-100 pt-3",children:[_.jsx("h4",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide mb-2",children:"Tips"}),_.jsxs("ul",{className:"text-xs text-gray-600 space-y-1",children:[_.jsxs("li",{className:"flex items-start gap-1",children:[_.jsx(Ue,{icon:"mdi:circle-small",className:"text-gray-400 shrink-0 mt-0.5"}),_.jsx("span",{children:"Hover over a node to highlight connections"})]}),_.jsxs("li",{className:"flex items-start gap-1",children:[_.jsx(Ue,{icon:"mdi:circle-small",className:"text-gray-400 shrink-0 mt-0.5"}),_.jsx("span",{children:"Right-click a node for more options"})]}),_.jsxs("li",{className:"flex items-start gap-1",children:[_.jsx(Ue,{icon:"mdi:circle-small",className:"text-gray-400 shrink-0 mt-0.5"}),_.jsx("span",{children:"Drag to select multiple nodes"})]})]})]})]})})]})}function L3({nodeId:t,x:a,y:l,onClose:r,onSelectConnected:s,onSelectNode:c,onShowPeers:u,onHideNode:d}){const h=K.useRef(null);K.useEffect(()=>{const x=N=>{h.current&&!h.current.contains(N.target)&&r()},w=N=>{N.key==="Escape"&&r()};return document.addEventListener("mousedown",x),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",x),document.removeEventListener("keydown",w)}},[r]);const m=K.useCallback(()=>{s(t),r()},[t,s,r]),p=K.useCallback(()=>{c(t),r()},[t,c,r]),y=K.useCallback(()=>{u(t),r()},[t,u,r]),v=K.useCallback(()=>{d(t),r()},[t,d,r]);return _.jsxs("div",{ref:h,className:"fixed z-50 min-w-[200px] rounded-lg bg-white py-1 shadow-lg border border-gray-200",style:{left:a,top:l},children:[_.jsxs("button",{type:"button",onClick:p,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:select",className:"text-lg text-gray-500"}),"Select this node"]}),_.jsxs("button",{type:"button",onClick:m,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:select-group",className:"text-lg text-gray-500"}),"Select connected nodes"]}),_.jsx("div",{className:"my-1 border-t border-gray-100"}),_.jsxs("button",{type:"button",onClick:y,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:eye-outline",className:"text-lg text-gray-500"}),"Show first-level peers"]}),_.jsxs("button",{type:"button",onClick:v,className:"flex w-full items-center gap-2 px-3 py-2 text-sm text-gray-700 hover:bg-gray-100",children:[_.jsx(Ue,{icon:"mdi:eye-off-outline",className:"text-lg text-gray-500"}),"Hide this node"]}),_.jsx("div",{className:"my-1 border-t border-gray-100"}),_.jsx("div",{className:"px-3 py-1.5 text-xs text-gray-400",children:"Drag selected nodes to organize"})]})}function ls({label:t,value:a}){return a?_.jsxs("div",{className:"flex justify-between gap-2",children:[_.jsx("span",{className:"text-gray-500",children:t}),_.jsx("span",{className:"text-right font-medium text-gray-700",children:a})]}):null}function _i({children:t,variant:a="gray"}){const l={gray:"bg-gray-100 text-gray-600",blue:"bg-blue-100 text-blue-700",yellow:"bg-yellow-100 text-yellow-700",red:"bg-red-100 text-red-700"};return _.jsx("span",{className:_t("px-1.5 py-0.5 rounded text-xs",l[a]),children:t})}function B3({schema:t,onClose:a}){return t?_.jsxs("div",{className:"flex h-full w-96 flex-col border-gray-200 border-l bg-white",children:[_.jsxs("div",{className:"flex items-center justify-between border-gray-200 border-b px-4 py-3",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[t.icon&&_.jsx(Ue,{icon:t.icon,className:"text-indigo-600 text-xl"}),_.jsxs("div",{children:[_.jsx("h3",{className:"font-semibold text-gray-700",children:t.label??t.name}),_.jsx("p",{className:"text-gray-500 text-xs",children:t.kind})]})]}),_.jsx("button",{type:"button",onClick:a,className:"p-1 rounded hover:bg-gray-100 text-gray-500",children:_.jsx(Ue,{icon:"mdi:close",className:"text-lg"})})]}),_.jsxs("div",{className:"flex-1 overflow-y-auto",children:[_.jsxs("div",{className:"border-gray-100 border-b p-4",children:[_.jsx("h4",{className:"mb-2 font-semibold text-gray-600 text-xs uppercase tracking-wide",children:"Properties"}),_.jsxs("div",{className:"space-y-2 text-sm",children:[_.jsx(ls,{label:"Namespace",value:t.namespace}),_.jsx(ls,{label:"Name",value:t.name}),_.jsx(ls,{label:"Kind",value:t.kind}),t.description&&_.jsx(ls,{label:"Description",value:t.description}),t.inherit_from&&t.inherit_from.length>0&&_.jsxs("div",{className:"flex justify-between",children:[_.jsx("span",{className:"text-gray-500",children:"Inherit from"}),_.jsx("div",{className:"flex flex-wrap justify-end gap-1",children:t.inherit_from.map(l=>_.jsx(_i,{variant:"blue",children:l},l))})]})]})]}),_.jsxs("div",{className:"border-gray-100 border-b p-4",children:[_.jsxs("h4",{className:"mb-2 font-semibold text-gray-600 text-xs uppercase tracking-wide",children:["Attributes (",t.attributes?.length??0,")"]}),t.attributes&&t.attributes.length>0?_.jsx("div",{className:"space-y-2",children:t.attributes.map(l=>_.jsxs("div",{className:_t("rounded border p-2 text-sm",l.inherited?"border-gray-100 bg-gray-50":"border-gray-200"),children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsxs("span",{className:"font-medium text-gray-700",children:[l.label??l.name,l.optional&&_.jsx("span",{className:"ml-1 text-gray-400",children:"?"})]}),_.jsx(_i,{variant:"gray",children:l.kind})]}),l.description&&_.jsx("p",{className:"mt-1 text-gray-500 text-xs",children:l.description}),_.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[l.inherited&&_.jsx(_i,{variant:"yellow",children:"inherited"}),l.unique&&_.jsx(_i,{variant:"red",children:"unique"}),l.read_only&&_.jsx(_i,{variant:"blue",children:"read-only"})]})]},l.name))}):_.jsx("p",{className:"text-gray-400 text-sm",children:"No attributes"})]}),_.jsxs("div",{className:"p-4",children:[_.jsxs("h4",{className:"mb-2 font-semibold text-gray-600 text-xs uppercase tracking-wide",children:["Relationships (",t.relationships?.length??0,")"]}),t.relationships&&t.relationships.length>0?_.jsx("div",{className:"space-y-2",children:t.relationships.map(l=>_.jsxs("div",{className:_t("rounded border p-2 text-sm",l.inherited?"border-gray-100 bg-gray-50":"border-gray-200"),children:[_.jsxs("div",{className:"flex items-center justify-between",children:[_.jsx("span",{className:"font-medium text-gray-700",children:l.label??l.name}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsx(_i,{variant:l.cardinality==="many"?"blue":"gray",children:l.cardinality}),_.jsxs("span",{className:"text-gray-500 text-xs",children:["→ ",l.peer]})]})]}),l.description&&_.jsx("p",{className:"mt-1 text-gray-500 text-xs",children:l.description}),_.jsxs("div",{className:"mt-1 flex flex-wrap gap-1",children:[l.inherited&&_.jsx(_i,{variant:"yellow",children:"inherited"}),l.optional&&_.jsx(_i,{variant:"gray",children:"optional"})]})]},l.name))}):_.jsx("p",{className:"text-gray-400 text-sm",children:"No relationships"})]})]})]}):null}const q3=t=>{switch(t){case"profile":return"from-pink-500 to-pink-600";case"template":return"from-amber-500 to-amber-600";case"generic":return"from-emerald-500 to-emerald-600";default:return"from-indigo-500 to-indigo-600"}},U3=(t,a)=>{if(a)switch(t){case"profile":return"border-pink-500";case"template":return"border-amber-500";case"generic":return"border-emerald-500";default:return"border-indigo-500"}return"border-gray-200"},V3=t=>{switch(t){case"profile":return"Profile";case"template":return"Template";case"generic":return"Generic";default:return null}},Y3={schemaNode:K.memo(function({data:a,selected:l}){const r=a,s=r.inheritFrom&&r.inheritFrom.length>0,c=r.schemaType??"node",u=V3(c);return _.jsxs("div",{className:_t("bg-white rounded-lg shadow-lg border-2 min-w-[280px] max-w-[320px]","transition-all duration-200",U3(c,l??!1),l&&"shadow-xl","hover:shadow-xl"),children:[_.jsxs("div",{className:_t("bg-gradient-to-r text-white px-4 py-3 rounded-t-md",q3(c)),children:[_.jsxs("div",{className:"flex items-center gap-2",children:[r.icon&&_.jsx(Ue,{icon:r.icon,className:"text-2xl opacity-90"}),_.jsxs("div",{className:"flex-1 min-w-0",children:[_.jsxs("div",{className:"flex items-center gap-2",children:[_.jsx("h3",{className:"font-semibold text-sm truncate",children:r.label}),u&&_.jsx("span",{className:"px-1.5 py-0.5 text-[10px] bg-white/20 rounded",children:u})]}),_.jsx("p",{className:"text-xs opacity-70 truncate",children:r.kind})]})]}),s&&_.jsx("div",{className:"mt-2 flex flex-wrap gap-1",children:r.inheritFrom?.map(d=>_.jsxs("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-xs bg-indigo-400/30 text-indigo-100",children:["↑ ",d]},d))})]}),r.attributes.length>0&&_.jsxs("div",{className:"border-b border-gray-100",children:[_.jsx("div",{className:"px-3 py-2 bg-gray-50 border-b border-gray-100",children:_.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:["Attributes (",r.attributes.length,")"]})}),_.jsx("div",{className:"max-h-[150px] overflow-y-auto",children:r.attributes.map(d=>_.jsxs("div",{className:_t("px-3 py-1.5 flex items-center justify-between text-xs border-b border-gray-50 last:border-0",d.inherited?"bg-gray-50/50":""),children:[_.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[_.jsxs("span",{className:_t("font-medium truncate",d.inherited?"text-gray-400":"text-gray-700"),children:[d.name,d.optional&&_.jsx("span",{className:"text-gray-400 ml-0.5",children:"?"})]}),d.inherited&&_.jsx("span",{className:"text-[10px] text-gray-400",children:"(inherited)"})]}),_.jsx("span",{className:"text-gray-400 text-[10px] uppercase ml-2 shrink-0",children:d.kind})]},d.name))})]}),r.relationships.length>0&&_.jsxs("div",{children:[_.jsx("div",{className:"px-3 py-2 bg-gray-50 border-b border-gray-100",children:_.jsxs("h4",{className:"text-xs font-semibold text-gray-500 uppercase tracking-wide",children:["Relationships (",r.relationships.length,")"]})}),_.jsx("div",{children:r.relationships.map(d=>_.jsxs("div",{className:_t("px-3 py-1.5 flex items-center justify-between text-xs border-b border-gray-50 last:border-0 relative group/rel",d.inherited?"bg-gray-50/50":""),children:[_.jsx(Ga,{type:"source",position:ye.Left,id:`rel-${d.name}-left`,style:{left:-2,width:4,height:4,background:"transparent",border:"none"}}),_.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[_.jsx("span",{className:_t("font-medium truncate",d.inherited?"text-gray-400":"text-gray-700"),children:d.name}),d.inherited&&_.jsx("span",{className:"text-[10px] text-gray-400",children:"(inherited)"})]}),_.jsxs("div",{className:"flex items-center gap-1 ml-2 shrink-0",children:[_.jsx("span",{className:_t("px-1.5 py-0.5 rounded text-[10px]",d.cardinality==="many"?"bg-purple-100 text-purple-700":"bg-blue-100 text-blue-700"),children:d.cardinality}),d.peer===r.kind?_.jsxs("span",{className:"text-[10px] text-orange-500 flex items-center gap-0.5",title:"Self-referencing relationship",children:[_.jsx(Ue,{icon:"mdi:reload",className:"text-sm"}),"self"]}):_.jsxs("span",{className:"text-gray-400 text-[10px] truncate max-w-[80px]",children:["→ ",d.peer]})]}),_.jsx(Ga,{type:"source",position:ye.Right,id:`rel-${d.name}-right`,style:{right:-2,width:4,height:4,background:"transparent",border:"none"}})]},d.name))})]}),r.attributes.length===0&&r.relationships.length===0&&_.jsx("div",{className:"px-4 py-6 text-center text-gray-400 text-sm",children:"No attributes or relationships"})]})})},G3={floating:k3};function pv(t){const a=new Set,l=["Core","Builtin"];for(const r of t.nodes)l.includes(r.namespace)&&a.add(ke(r));for(const r of t.profiles??[])a.add(ke(r));for(const r of t.templates??[])a.add(ke(r));return a}function X3({data:t,className:a,showBackground:l=!0,rowSize:r=4,nodeSpacing:s=400,onNodeClick:c,defaultFilterOpen:u=!1,showNodeDetails:d=!0,showToolbar:h=!0,showStats:m=!0}){const{setCenter:p,getNode:y,fitView:v}=er(),[x,w]=K.useState(u),[N,S]=K.useState(null),[M,z]=K.useState(null),[E,T]=K.useState(null),[q,R]=K.useState(null),[O,C]=K.useState(null),[D,Z]=K.useState(null),B=K.useMemo(()=>TA(),[]),[V,W]=K.useState(()=>B?.edgeStyle??"smoothstep"),[H,I]=K.useState(()=>B?.hiddenNodes?new Set(B.hiddenNodes):pv(t)),[j,G]=K.useState(()=>B!==null),U=K.useMemo(()=>{if(!B?.nodePositions)return null;const de=new Map;for(const he of B.nodePositions)de.set(he.id,{x:he.x,y:he.y});return de},[B]),P=K.useRef(!1),re=K.useRef(!1),k=K.useRef(new Map),Q=K.useCallback(()=>{const de=pv(t);I(de),W("smoothstep"),zA(),G(!1),P.current=!1,re.current=!1,k.current.clear(),setTimeout(()=>{v({padding:.2})},100)},[t,v]),L=K.useMemo(()=>{const de=new Map;for(const he of t.nodes)de.has(he.namespace)||de.set(he.namespace,[]),de.get(he.namespace)?.push({schema:he,type:"node"});for(const he of t.profiles??[])de.has(he.namespace)||de.set(he.namespace,[]),de.get(he.namespace)?.push({schema:he,type:"profile"});for(const he of t.templates??[])de.has(he.namespace)||de.set(he.namespace,[]),de.get(he.namespace)?.push({schema:he,type:"template"});return de},[t.nodes,t.profiles,t.templates]),Y=K.useMemo(()=>{let de=0;return de+=t.nodes.filter(he=>!H.has(ke(he))).length,de+=(t.profiles??[]).filter(he=>!H.has(ke(he))).length,de+=(t.templates??[]).filter(he=>!H.has(ke(he))).length,de},[t.nodes,t.profiles,t.templates,H]),F=K.useMemo(()=>t.nodes.length+(t.profiles?.length??0)+(t.templates?.length??0),[t.nodes.length,t.profiles?.length,t.templates?.length]),ne=K.useMemo(()=>OA(t.nodes,t.generics,H,{nodeSpacing:s,rowSize:r,profiles:t.profiles,templates:t.templates}),[t.nodes,t.generics,t.profiles,t.templates,H,s,r]),[ae,oe,fe]=HC([]),[pe,Ee,ge]=LC([]);K.useEffect(()=>{for(const de of ae)k.current.set(de.id,{...de.position})},[ae]),K.useEffect(()=>{const de=new Map;if(U&&!P.current){for(const[Ne,ze]of U)de.set(Ne,ze);P.current=!0}for(const[Ne,ze]of k.current)de.set(Ne,ze);const he=ne.nodes.filter(Ne=>!de.has(Ne.id));let Se;if(!re.current||he.length>0&&he.length===ne.nodes.length){const{nodes:Ne,edges:ze}=Dy(ne.nodes,ne.edges,{direction:"TB"});Se=Ne.map(Ve=>{const ht=de.get(Ve.id);return ht?{...Ve,position:ht}:Ve}),re.current=!0;const Qe=ze.map(Ve=>({...Ve,data:{...Ve.data,edgeStyle:V}}));Ee(Qe)}else if(he.length>0){const Ne=Math.max(...Array.from(de.values()).map(Qe=>Qe.y),0)+400;Se=ne.nodes.map(Qe=>{const Ve=de.get(Qe.id);if(Ve)return{...Qe,position:Ve};const ht=he.indexOf(Qe),Jt=ht%4,wt=Math.floor(ht/4);return{...Qe,position:{x:Jt*400,y:Ne+wt*400}}});const ze=ne.edges.map(Qe=>({...Qe,data:{...Qe.data,edgeStyle:V}}));Ee(ze)}else{Se=ne.nodes.map(ze=>{const Qe=de.get(ze.id);return{...ze,position:Qe??ze.position}});const Ne=ne.edges.map(ze=>({...ze,data:{...ze.data,edgeStyle:V}}));Ee(Ne)}oe(Se)},[ne,V,oe,Ee,U]),K.useEffect(()=>{ae.length!==0&&(AA({hiddenNodes:Array.from(H),edgeStyle:V,nodePositions:ae.map(de=>({id:de.id,x:de.position.x,y:de.position.y}))}),G(!0))},[H,V,ae]);const me=M??E,Me=K.useMemo(()=>{if(!me)return null;const de=new Set([me]);for(const he of pe)he.source===me&&de.add(he.target),he.target===me&&de.add(he.source);return de},[me,pe]),He=K.useMemo(()=>{if(!D)return null;const de=pe.find(he=>he.id===D);return de?new Set([de.source,de.target]):null},[D,pe]),Ge=K.useMemo(()=>!Me&&!E&&!He?ae:ae.map(de=>{const he=E===de.id,Se=Me?.has(de.id)??!0,Ne=He?.has(de.id)??!0,ze=Me&&!Se||He&&!Ne;return{...de,style:{...de.style,opacity:ze?.25:1,transition:"opacity 0.2s ease-in-out, box-shadow 0.2s ease-in-out",boxShadow:he?"0 0 0 3px #6366f1, 0 0 20px rgba(99, 102, 241, 0.4)":void 0,borderRadius:he?"8px":void 0}}}),[ae,Me,E,He]),dt=K.useMemo(()=>!me&&!D?pe:pe.map(de=>{const he=me&&(de.source===me||de.target===me),Se=D===de.id,Ne=me&&!he||D&&!Se;return{...de,style:{...de.style,opacity:Ne?.15:1,strokeWidth:Se?3:de.style?.strokeWidth??2,transition:"opacity 0.2s ease-in-out, stroke-width 0.2s ease-in-out"}}}),[pe,me,D]),Bt=K.useMemo(()=>{if(!N)return null;const de=t.nodes.find(Ne=>ke(Ne)===N);if(de)return de;const he=(t.profiles??[]).find(Ne=>ke(Ne)===N);if(he)return he;const Se=(t.templates??[]).find(Ne=>ke(Ne)===N);return Se||null},[t.nodes,t.profiles,t.templates,N]),Dt=K.useCallback((de,he)=>{z(he.id)},[]),Ft=K.useCallback(()=>{z(null)},[]),Sn=K.useCallback((de,he)=>{de.preventDefault(),R({nodeId:he.id,x:de.clientX,y:de.clientY})},[]),Rn=K.useCallback(()=>{R(null),C(null),Z(null)},[]),Kn=K.useCallback((de,he)=>{de.preventDefault();const Se=he.data,Ne=he.animated?"many":"one";C({edge:{id:he.id,source:he.source,target:he.target,sourceRelName:Se?.sourceRelName??"",targetRelName:Se?.targetRelName??null,cardinality:Ne},x:de.clientX,y:de.clientY})},[]),xt=K.useCallback(()=>{C(null)},[]),Ni=K.useCallback(de=>{Z(de)},[]),En=K.useCallback(de=>{const he=new Set([de]);for(const Se of pe)Se.source===de&&he.add(Se.target),Se.target===de&&he.add(Se.source);oe(Se=>Se.map(Ne=>({...Ne,selected:he.has(Ne.id)})))},[pe,oe]),Dn=K.useCallback(de=>{oe(he=>he.map(Se=>({...Se,selected:Se.id===de})))},[oe]),kn=K.useCallback(de=>{const he=new Set,Se=Ve=>{for(const ht of Ve.relationships??[])if(he.add(ht.peer),t.generics.find(wt=>ke(wt)===ht.peer)){for(const wt of t.nodes)wt.inherit_from?.includes(ht.peer)&&he.add(ke(wt));for(const wt of t.templates??[])wt.inherit_from?.includes(ht.peer)&&he.add(ke(wt))}},Ne=t.nodes.find(Ve=>ke(Ve)===de);Ne&&Se(Ne);const ze=(t.profiles??[]).find(Ve=>ke(Ve)===de);ze&&Se(ze);const Qe=(t.templates??[]).find(Ve=>ke(Ve)===de);return Qe&&Se(Qe),he},[t.nodes,t.profiles,t.templates,t.generics]),fr=K.useCallback(de=>{const he=kn(de);I(Se=>{const Ne=new Set(Se);for(const ze of he)Ne.delete(ze);return Ne})},[kn]),Ci=K.useCallback(de=>{I(he=>{const Se=new Set(he);return Se.add(de),Se}),S(he=>he===de?null:he)},[]),dr=K.useCallback((de,he)=>{S(he.id);let Se=t.nodes.find(Ne=>ke(Ne)===he.id);Se||(Se=(t.profiles??[]).find(Ne=>ke(Ne)===he.id)),Se||(Se=(t.templates??[]).find(Ne=>ke(Ne)===he.id)),Se&&c&&c(he.id,Se)},[t.nodes,t.profiles,t.templates,c]),hr=K.useCallback(de=>{const Se=(L.get(de)??[]).map(ze=>ke(ze.schema)),Ne=Se.filter(ze=>!H.has(ze)).length;I(ze=>{const Qe=new Set(ze);if(Ne>0)for(const Ve of Se)Qe.add(Ve);else for(const Ve of Se)Qe.delete(Ve);return Qe})},[L,H]),Fn=K.useCallback(de=>{I(he=>{const Se=new Set(he);return Se.has(de)?Se.delete(de):Se.add(de),Se})},[]),Ct=K.useCallback(de=>{const he=y(de);he&&p(he.position.x+150,he.position.y+100,{zoom:.8,duration:500})},[y,p]),rn=K.useCallback(de=>{const{nodes:he,edges:Se}=Dy(ae,pe,{direction:de}),Ne=Se.map(ze=>({...ze,data:{...ze.data,edgeStyle:V}}));oe(he),Ee(Ne),window.requestAnimationFrame(()=>{v({padding:.2})})},[ae,pe,V,oe,Ee,v]),Mt=K.useCallback(de=>{const he=document.querySelector(".react-flow__viewport");if(!he)return;const Se=ag(ae),Ne=50,ze=Se.width+Ne*2,Qe=Se.height+Ne*2,Ve=Do(Se,ze,Qe,.5,2,0),ht={backgroundColor:"#f8fafc",width:ze,height:Qe,style:{width:`${ze}px`,height:`${Qe}px`,transform:`translate(${Ve.x}px, ${Ve.y}px) scale(${Ve.zoom})`}},Jt=(wt,Ka)=>{const Jn=document.createElement("a");Jn.download=`schema-graph.${Ka}`,Jn.href=wt,Jn.click()};de==="png"?tT(he,ht).then(wt=>{Jt(wt,"png")}):g0(he,ht).then(wt=>{Jt(wt,"svg")})},[ae]);return _.jsxs("div",{className:_t("w-full h-full min-h-[500px] flex",a),children:[_.jsx("div",{className:"relative flex-1",children:_.jsxs(kC,{nodes:Ge,edges:dt,onNodesChange:fe,onEdgesChange:ge,onNodeClick:dr,onNodeContextMenu:Sn,onNodeMouseEnter:Dt,onNodeMouseLeave:Ft,onEdgeContextMenu:Kn,onPaneClick:Rn,nodeTypes:Y3,edgeTypes:G3,connectionMode:la.Loose,fitView:!0,fitViewOptions:{padding:.2},minZoom:.1,maxZoom:1.5,defaultViewport:{x:0,y:0,zoom:.5},proOptions:{hideAttribution:!0},selectionOnDrag:!0,selectionMode:ka.Partial,children:[l&&_.jsx(YC,{variant:Qn.Dots,gap:20,size:1}),m&&_.jsx(wi,{position:"top-left",className:"rounded-lg bg-white p-3 shadow-md",children:_.jsxs("div",{className:"text-sm",children:[_.jsx("div",{className:"mb-2 font-semibold text-gray-700",children:"Schema Overview"}),_.jsxs("div",{className:"space-y-1 text-gray-600",children:[_.jsxs("div",{className:"flex justify-between gap-4",children:[_.jsx("span",{children:"Visible:"}),_.jsx("span",{className:"font-medium",children:Y})]}),_.jsxs("div",{className:"flex justify-between gap-4",children:[_.jsx("span",{children:"Total:"}),_.jsx("span",{className:"font-medium",children:F})]}),_.jsxs("div",{className:"flex justify-between gap-4",children:[_.jsx("span",{children:"Nodes:"}),_.jsx("span",{className:"font-medium",children:t.nodes.length})]}),(t.profiles?.length??0)>0&&_.jsxs("div",{className:"flex justify-between gap-4",children:[_.jsx("span",{children:"Profiles:"}),_.jsx("span",{className:"font-medium",children:t.profiles?.length})]}),(t.templates?.length??0)>0&&_.jsxs("div",{className:"flex justify-between gap-4",children:[_.jsx("span",{children:"Templates:"}),_.jsx("span",{className:"font-medium",children:t.templates?.length})]}),_.jsxs("div",{className:"flex justify-between gap-4",children:[_.jsx("span",{children:"Generics:"}),_.jsx("span",{className:"font-medium",children:t.generics.length})]})]})]})}),_.jsx(H3,{}),h&&_.jsx(z3,{onFilterClick:()=>w(!x),isFilterOpen:x,edgeStyle:V,onEdgeStyleChange:W,onLayout:rn,onExport:Mt,onReset:Q,showReset:j})]})}),x&&_.jsx(R3,{namespaceSchemas:L,hiddenNodes:H,onToggleNamespace:hr,onToggleNode:Fn,onFocusNode:Ct,onClose:()=>w(!1),onHoverNode:T}),d&&Bt&&!x&&_.jsx(B3,{schema:Bt,onClose:()=>S(null)}),q&&_.jsx(L3,{nodeId:q.nodeId,x:q.x,y:q.y,onClose:Rn,onSelectConnected:En,onSelectNode:Dn,onShowPeers:fr,onHideNode:Ci}),O&&_.jsx(O3,{edge:O.edge,x:O.x,y:O.y,onClose:xt,onHighlight:Ni})]})}function Z3(t){return _.jsx($p,{children:_.jsx(X3,{...t})})}function Q3(){if(!window.__vscodeApi&&window.acquireVsCodeApi)try{window.__vscodeApi=window.acquireVsCodeApi()}catch{}return window.__vscodeApi}window.renderSchemaVisualizer=(t,a,l)=>{t.innerHTML="";const r=document.createElement("div");r.className="schema-visualizer-root",r.style.width="100%",r.style.height="100%",t.appendChild(r);const s=ow.createRoot(r),c=Q3(),u=(d,h)=>{l?.onNodeClick?.(d,h),c?.postMessage({type:"nodeClick",nodeId:d,schema:h})};s.render(_.jsx(Z3,{data:a,onNodeClick:u,showBackground:!0,showNodeDetails:!0,showToolbar:!0,showStats:!0}))}})();