modscape 0.6.0 → 0.7.0
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.
- package/README.ja.md +4 -5
- package/README.md +4 -5
- package/package.json +1 -1
- package/src/export.js +27 -12
- package/src/index.js +1 -1
- package/src/templates/rules.md +3 -4
- package/visualizer/package.json +1 -1
- package/visualizer-dist/assets/index-5OYvnvnP.css +1 -0
- package/visualizer-dist/assets/index-CrpPTvCJ.js +40 -0
- package/visualizer-dist/index.html +2 -2
- package/visualizer-dist/assets/index-C6Er76jG.js +0 -40
- package/visualizer-dist/assets/index-SHP9gOPV.css +0 -1
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
function TS(t,i){for(var a=0;a<i.length;a++){const r=i[a];if(typeof r!="string"&&!Array.isArray(r)){for(const u in r)if(u!=="default"&&!(u in t)){const f=Object.getOwnPropertyDescriptor(r,u);f&&Object.defineProperty(t,u,f.get?f:{enumerable:!0,get:()=>r[u]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))r(u);new MutationObserver(u=>{for(const f of u)if(f.type==="childList")for(const s of f.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function a(u){const f={};return u.integrity&&(f.integrity=u.integrity),u.referrerPolicy&&(f.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?f.credentials="include":u.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function r(u){if(u.ep)return;u.ep=!0;const f=a(u);fetch(u.href,f)}})();function yy(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Nf={exports:{}},To={};var Um;function MS(){if(Um)return To;Um=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function a(r,u,f){var s=null;if(f!==void 0&&(s=""+f),u.key!==void 0&&(s=""+u.key),"key"in u){f={};for(var h in u)h!=="key"&&(f[h]=u[h])}else f=u;return u=f.ref,{$$typeof:t,type:r,key:s,ref:u!==void 0?u:null,props:f}}return To.Fragment=i,To.jsx=a,To.jsxs=a,To}var Bm;function zS(){return Bm||(Bm=1,Nf.exports=MS()),Nf.exports}var S=zS(),Cf={exports:{}},we={};var Ym;function DS(){if(Ym)return we;Ym=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),s=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function w(_){return _===null||typeof _!="object"?null:(_=x&&_[x]||_["@@iterator"],typeof _=="function"?_:null)}var M={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},N=Object.assign,T={};function z(_,H,Q){this.props=_,this.context=H,this.refs=T,this.updater=Q||M}z.prototype.isReactComponent={},z.prototype.setState=function(_,H){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,H,"setState")},z.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function j(){}j.prototype=z.prototype;function B(_,H,Q){this.props=_,this.context=H,this.refs=T,this.updater=Q||M}var k=B.prototype=new j;k.constructor=B,N(k,z.prototype),k.isPureReactComponent=!0;var K=Array.isArray;function I(){}var ee={H:null,A:null,T:null,S:null},V=Object.prototype.hasOwnProperty;function X(_,H,Q){var W=Q.ref;return{$$typeof:t,type:_,key:H,ref:W!==void 0?W:null,props:Q}}function le(_,H){return X(_.type,H,_.props)}function oe(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function re(_){var H={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(Q){return H[Q]})}var ae=/\/+/g;function C(_,H){return typeof _=="object"&&_!==null&&_.key!=null?re(""+_.key):H.toString(36)}function $(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(I,I):(_.status="pending",_.then(function(H){_.status==="pending"&&(_.status="fulfilled",_.value=H)},function(H){_.status==="pending"&&(_.status="rejected",_.reason=H)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function A(_,H,Q,W,ue){var ce=typeof _;(ce==="undefined"||ce==="boolean")&&(_=null);var fe=!1;if(_===null)fe=!0;else switch(ce){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(_.$$typeof){case t:case i:fe=!0;break;case g:return fe=_._init,A(fe(_._payload),H,Q,W,ue)}}if(fe)return ue=ue(_),fe=W===""?"."+C(_,0):W,K(ue)?(Q="",fe!=null&&(Q=fe.replace(ae,"$&/")+"/"),A(ue,H,Q,"",function(Ae){return Ae})):ue!=null&&(oe(ue)&&(ue=le(ue,Q+(ue.key==null||_&&_.key===ue.key?"":(""+ue.key).replace(ae,"$&/")+"/")+fe)),H.push(ue)),1;fe=0;var be=W===""?".":W+":";if(K(_))for(var de=0;de<_.length;de++)W=_[de],ce=be+C(W,de),fe+=A(W,H,Q,ce,ue);else if(de=w(_),typeof de=="function")for(_=de.call(_),de=0;!(W=_.next()).done;)W=W.value,ce=be+C(W,de++),fe+=A(W,H,Q,ce,ue);else if(ce==="object"){if(typeof _.then=="function")return A($(_),H,Q,W,ue);throw H=String(_),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return fe}function U(_,H,Q){if(_==null)return _;var W=[],ue=0;return A(_,W,"","",function(ce){return H.call(Q,ce,ue++)}),W}function q(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(Q){(_._status===0||_._status===-1)&&(_._status=1,_._result=Q)},function(Q){(_._status===0||_._status===-1)&&(_._status=2,_._result=Q)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var E=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},O={map:U,forEach:function(_,H,Q){U(_,function(){H.apply(this,arguments)},Q)},count:function(_){var H=0;return U(_,function(){H++}),H},toArray:function(_){return U(_,function(H){return H})||[]},only:function(_){if(!oe(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return we.Activity=v,we.Children=O,we.Component=z,we.Fragment=a,we.Profiler=u,we.PureComponent=B,we.StrictMode=r,we.Suspense=p,we.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ee,we.__COMPILER_RUNTIME={__proto__:null,c:function(_){return ee.H.useMemoCache(_)}},we.cache=function(_){return function(){return _.apply(null,arguments)}},we.cacheSignal=function(){return null},we.cloneElement=function(_,H,Q){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var W=N({},_.props),ue=_.key;if(H!=null)for(ce in H.key!==void 0&&(ue=""+H.key),H)!V.call(H,ce)||ce==="key"||ce==="__self"||ce==="__source"||ce==="ref"&&H.ref===void 0||(W[ce]=H[ce]);var ce=arguments.length-2;if(ce===1)W.children=Q;else if(1<ce){for(var fe=Array(ce),be=0;be<ce;be++)fe[be]=arguments[be+2];W.children=fe}return X(_.type,ue,W)},we.createContext=function(_){return _={$$typeof:s,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:f,_context:_},_},we.createElement=function(_,H,Q){var W,ue={},ce=null;if(H!=null)for(W in H.key!==void 0&&(ce=""+H.key),H)V.call(H,W)&&W!=="key"&&W!=="__self"&&W!=="__source"&&(ue[W]=H[W]);var fe=arguments.length-2;if(fe===1)ue.children=Q;else if(1<fe){for(var be=Array(fe),de=0;de<fe;de++)be[de]=arguments[de+2];ue.children=be}if(_&&_.defaultProps)for(W in fe=_.defaultProps,fe)ue[W]===void 0&&(ue[W]=fe[W]);return X(_,ce,ue)},we.createRef=function(){return{current:null}},we.forwardRef=function(_){return{$$typeof:h,render:_}},we.isValidElement=oe,we.lazy=function(_){return{$$typeof:g,_payload:{_status:-1,_result:_},_init:q}},we.memo=function(_,H){return{$$typeof:m,type:_,compare:H===void 0?null:H}},we.startTransition=function(_){var H=ee.T,Q={};ee.T=Q;try{var W=_(),ue=ee.S;ue!==null&&ue(Q,W),typeof W=="object"&&W!==null&&typeof W.then=="function"&&W.then(I,E)}catch(ce){E(ce)}finally{H!==null&&Q.types!==null&&(H.types=Q.types),ee.T=H}},we.unstable_useCacheRefresh=function(){return ee.H.useCacheRefresh()},we.use=function(_){return ee.H.use(_)},we.useActionState=function(_,H,Q){return ee.H.useActionState(_,H,Q)},we.useCallback=function(_,H){return ee.H.useCallback(_,H)},we.useContext=function(_){return ee.H.useContext(_)},we.useDebugValue=function(){},we.useDeferredValue=function(_,H){return ee.H.useDeferredValue(_,H)},we.useEffect=function(_,H){return ee.H.useEffect(_,H)},we.useEffectEvent=function(_){return ee.H.useEffectEvent(_)},we.useId=function(){return ee.H.useId()},we.useImperativeHandle=function(_,H,Q){return ee.H.useImperativeHandle(_,H,Q)},we.useInsertionEffect=function(_,H){return ee.H.useInsertionEffect(_,H)},we.useLayoutEffect=function(_,H){return ee.H.useLayoutEffect(_,H)},we.useMemo=function(_,H){return ee.H.useMemo(_,H)},we.useOptimistic=function(_,H){return ee.H.useOptimistic(_,H)},we.useReducer=function(_,H,Q){return ee.H.useReducer(_,H,Q)},we.useRef=function(_){return ee.H.useRef(_)},we.useState=function(_){return ee.H.useState(_)},we.useSyncExternalStore=function(_,H,Q){return ee.H.useSyncExternalStore(_,H,Q)},we.useTransition=function(){return ee.H.useTransition()},we.version="19.2.4",we}var Vm;function Jo(){return Vm||(Vm=1,Cf.exports=DS()),Cf.exports}var D=Jo();const P=yy(D),vy=TS({__proto__:null,default:P},[D]);var Tf={exports:{}},Mo={},Mf={exports:{}},zf={};var qm;function OS(){return qm||(qm=1,(function(t){function i(A,U){var q=A.length;A.push(U);e:for(;0<q;){var E=q-1>>>1,O=A[E];if(0<u(O,U))A[E]=U,A[q]=O,q=E;else break e}}function a(A){return A.length===0?null:A[0]}function r(A){if(A.length===0)return null;var U=A[0],q=A.pop();if(q!==U){A[0]=q;e:for(var E=0,O=A.length,_=O>>>1;E<_;){var H=2*(E+1)-1,Q=A[H],W=H+1,ue=A[W];if(0>u(Q,q))W<O&&0>u(ue,Q)?(A[E]=ue,A[W]=q,E=W):(A[E]=Q,A[H]=q,E=H);else if(W<O&&0>u(ue,q))A[E]=ue,A[W]=q,E=W;else break e}}return U}function u(A,U){var q=A.sortIndex-U.sortIndex;return q!==0?q:A.id-U.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;t.unstable_now=function(){return f.now()}}else{var s=Date,h=s.now();t.unstable_now=function(){return s.now()-h}}var p=[],m=[],g=1,v=null,x=3,w=!1,M=!1,N=!1,T=!1,z=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate<"u"?setImmediate:null;function k(A){for(var U=a(m);U!==null;){if(U.callback===null)r(m);else if(U.startTime<=A)r(m),U.sortIndex=U.expirationTime,i(p,U);else break;U=a(m)}}function K(A){if(N=!1,k(A),!M)if(a(p)!==null)M=!0,I||(I=!0,re());else{var U=a(m);U!==null&&$(K,U.startTime-A)}}var I=!1,ee=-1,V=5,X=-1;function le(){return T?!0:!(t.unstable_now()-X<V)}function oe(){if(T=!1,I){var A=t.unstable_now();X=A;var U=!0;try{e:{M=!1,N&&(N=!1,j(ee),ee=-1),w=!0;var q=x;try{t:{for(k(A),v=a(p);v!==null&&!(v.expirationTime>A&&le());){var E=v.callback;if(typeof E=="function"){v.callback=null,x=v.priorityLevel;var O=E(v.expirationTime<=A);if(A=t.unstable_now(),typeof O=="function"){v.callback=O,k(A),U=!0;break t}v===a(p)&&r(p),k(A)}else r(p);v=a(p)}if(v!==null)U=!0;else{var _=a(m);_!==null&&$(K,_.startTime-A),U=!1}}break e}finally{v=null,x=q,w=!1}U=void 0}}finally{U?re():I=!1}}}var re;if(typeof B=="function")re=function(){B(oe)};else if(typeof MessageChannel<"u"){var ae=new MessageChannel,C=ae.port2;ae.port1.onmessage=oe,re=function(){C.postMessage(null)}}else re=function(){z(oe,0)};function $(A,U){ee=z(function(){A(t.unstable_now())},U)}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(A){A.callback=null},t.unstable_forceFrameRate=function(A){0>A||125<A?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):V=0<A?Math.floor(1e3/A):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(A){switch(x){case 1:case 2:case 3:var U=3;break;default:U=x}var q=x;x=U;try{return A()}finally{x=q}},t.unstable_requestPaint=function(){T=!0},t.unstable_runWithPriority=function(A,U){switch(A){case 1:case 2:case 3:case 4:case 5:break;default:A=3}var q=x;x=A;try{return U()}finally{x=q}},t.unstable_scheduleCallback=function(A,U,q){var E=t.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?E+q:E):q=E,A){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=q+O,A={id:g++,callback:U,priorityLevel:A,startTime:q,expirationTime:O,sortIndex:-1},q>E?(A.sortIndex=q,i(m,A),a(p)===null&&A===a(m)&&(N?(j(ee),ee=-1):N=!0,$(K,q-E))):(A.sortIndex=O,i(p,A),M||w||(M=!0,I||(I=!0,re()))),A},t.unstable_shouldYield=le,t.unstable_wrapCallback=function(A){var U=x;return function(){var q=x;x=U;try{return A.apply(this,arguments)}finally{x=q}}}})(zf)),zf}var Gm;function RS(){return Gm||(Gm=1,Mf.exports=OS()),Mf.exports}var Df={exports:{}},Ot={};var Xm;function jS(){if(Xm)return Ot;Xm=1;var t=Jo();function i(p){var m="https://react.dev/errors/"+p;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)m+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+p+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var r={d:{f:a,r:function(){throw Error(i(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},u=Symbol.for("react.portal");function f(p,m,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:p,containerInfo:m,implementation:g}}var s=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function h(p,m){if(p==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Ot.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Ot.createPortal=function(p,m){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return f(p,m,null,g)},Ot.flushSync=function(p){var m=s.T,g=r.p;try{if(s.T=null,r.p=2,p)return p()}finally{s.T=m,r.p=g,r.d.f()}},Ot.preconnect=function(p,m){typeof p=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,r.d.C(p,m))},Ot.prefetchDNS=function(p){typeof p=="string"&&r.d.D(p)},Ot.preinit=function(p,m){if(typeof p=="string"&&m&&typeof m.as=="string"){var g=m.as,v=h(g,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,w=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;g==="style"?r.d.S(p,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:w}):g==="script"&&r.d.X(p,{crossOrigin:v,integrity:x,fetchPriority:w,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Ot.preinitModule=function(p,m){if(typeof p=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var g=h(m.as,m.crossOrigin);r.d.M(p,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&r.d.M(p)},Ot.preload=function(p,m){if(typeof p=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var g=m.as,v=h(g,m.crossOrigin);r.d.L(p,g,{crossOrigin:v,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})}},Ot.preloadModule=function(p,m){if(typeof p=="string")if(m){var g=h(m.as,m.crossOrigin);r.d.m(p,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else r.d.m(p)},Ot.requestFormReset=function(p){r.d.r(p)},Ot.unstable_batchedUpdates=function(p,m){return p(m)},Ot.useFormState=function(p,m,g){return s.H.useFormState(p,m,g)},Ot.useFormStatus=function(){return s.H.useHostTransitionStatus()},Ot.version="19.2.4",Ot}var Zm;function xy(){if(Zm)return Df.exports;Zm=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(i){console.error(i)}}return t(),Df.exports=jS(),Df.exports}var $m;function HS(){if($m)return Mo;$m=1;var t=RS(),i=Jo(),a=xy();function r(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function s(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function h(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(f(e)!==e)throw Error(r(188))}function m(e){var n=e.alternate;if(!n){if(n=f(e),n===null)throw Error(r(188));return n!==e?null:e}for(var l=e,o=n;;){var c=l.return;if(c===null)break;var d=c.alternate;if(d===null){if(o=c.return,o!==null){l=o;continue}break}if(c.child===d.child){for(d=c.child;d;){if(d===l)return p(c),e;if(d===o)return p(c),n;d=d.sibling}throw Error(r(188))}if(l.return!==o.return)l=c,o=d;else{for(var y=!1,b=c.child;b;){if(b===l){y=!0,l=c,o=d;break}if(b===o){y=!0,o=c,l=d;break}b=b.sibling}if(!y){for(b=d.child;b;){if(b===l){y=!0,l=d,o=c;break}if(b===o){y=!0,o=d,l=c;break}b=b.sibling}if(!y)throw Error(r(189))}}if(l.alternate!==o)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?e:n}function g(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=g(e),n!==null)return n;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),M=Symbol.for("react.portal"),N=Symbol.for("react.fragment"),T=Symbol.for("react.strict_mode"),z=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),B=Symbol.for("react.context"),k=Symbol.for("react.forward_ref"),K=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),ee=Symbol.for("react.memo"),V=Symbol.for("react.lazy"),X=Symbol.for("react.activity"),le=Symbol.for("react.memo_cache_sentinel"),oe=Symbol.iterator;function re(e){return e===null||typeof e!="object"?null:(e=oe&&e[oe]||e["@@iterator"],typeof e=="function"?e:null)}var ae=Symbol.for("react.client.reference");function C(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case N:return"Fragment";case z:return"Profiler";case T:return"StrictMode";case K:return"Suspense";case I:return"SuspenseList";case X:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case M:return"Portal";case B:return e.displayName||"Context";case j:return(e._context.displayName||"Context")+".Consumer";case k:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ee:return n=e.displayName||null,n!==null?n:C(e.type)||"Memo";case V:n=e._payload,e=e._init;try{return C(e(n))}catch{}}return null}var $=Array.isArray,A=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},E=[],O=-1;function _(e){return{current:e}}function H(e){0>O||(e.current=E[O],E[O]=null,O--)}function Q(e,n){O++,E[O]=e.current,e.current=n}var W=_(null),ue=_(null),ce=_(null),fe=_(null);function be(e,n){switch(Q(ce,n),Q(ue,e),Q(W,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?rm(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=rm(n),e=um(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(W),Q(W,e)}function de(){H(W),H(ue),H(ce)}function Ae(e){e.memoizedState!==null&&Q(fe,e);var n=W.current,l=um(n,e.type);n!==l&&(Q(ue,e),Q(W,l))}function He(e){ue.current===e&&(H(W),H(ue)),fe.current===e&&(H(fe),_o._currentValue=q)}var Qe,et;function Be(e){if(Qe===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);Qe=n&&n[1]||"",et=-1<l.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Qe+e+et}var je=!1;function pt(e,n){if(!e||je)return"";je=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var o={DetermineComponentFrameRoot:function(){try{if(n){var ie=function(){throw Error()};if(Object.defineProperty(ie.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(ie,[])}catch(J){var F=J}Reflect.construct(e,[],ie)}else{try{ie.call()}catch(J){F=J}e.call(ie.prototype)}}else{try{throw Error()}catch(J){F=J}(ie=e())&&typeof ie.catch=="function"&&ie.catch(function(){})}}catch(J){if(J&&F&&typeof J.stack=="string")return[J.stack,F.stack]}return[null,null]}};o.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var c=Object.getOwnPropertyDescriptor(o.DetermineComponentFrameRoot,"name");c&&c.configurable&&Object.defineProperty(o.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=o.DetermineComponentFrameRoot(),y=d[0],b=d[1];if(y&&b){var R=y.split(`
|
|
4
|
-
`),Z=b.split(`
|
|
5
|
-
`);for(c=o=0;o<R.length&&!R[o].includes("DetermineComponentFrameRoot");)o++;for(;c<Z.length&&!Z[c].includes("DetermineComponentFrameRoot");)c++;if(o===R.length||c===Z.length)for(o=R.length-1,c=Z.length-1;1<=o&&0<=c&&R[o]!==Z[c];)c--;for(;1<=o&&0<=c;o--,c--)if(R[o]!==Z[c]){if(o!==1||c!==1)do if(o--,c--,0>c||R[o]!==Z[c]){var te=`
|
|
6
|
-
`+R[o].replace(" at new "," at ");return e.displayName&&te.includes("<anonymous>")&&(te=te.replace("<anonymous>",e.displayName)),te}while(1<=o&&0<=c);break}}}finally{je=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Be(l):""}function ke(e,n){switch(e.tag){case 26:case 27:case 5:return Be(e.type);case 16:return Be("Lazy");case 13:return e.child!==n&&n!==null?Be("Suspense Fallback"):Be("Suspense");case 19:return Be("SuspenseList");case 0:case 15:return pt(e.type,!1);case 11:return pt(e.type.render,!1);case 1:return pt(e.type,!0);case 31:return Be("Activity");default:return""}}function se(e){try{var n="",l=null;do n+=ke(e,l),l=e,e=e.return;while(e);return n}catch(o){return`
|
|
7
|
-
Error generating stack: `+o.message+`
|
|
8
|
-
`+o.stack}}var Re=Object.prototype.hasOwnProperty,Tt=t.unstable_scheduleCallback,Yt=t.unstable_cancelCallback,Ft=t.unstable_shouldYield,Jt=t.unstable_requestPaint,Fe=t.unstable_now,Mt=t.unstable_getCurrentPriorityLevel,zt=t.unstable_ImmediatePriority,Ht=t.unstable_UserBlockingPriority,Dt=t.unstable_NormalPriority,un=t.unstable_LowPriority,ml=t.unstable_IdlePriority,bt=t.log,cn=t.unstable_setDisableYieldValue,Wt=null,it=null;function kt(e){if(typeof bt=="function"&&cn(e),it&&typeof it.setStrictMode=="function")try{it.setStrictMode(Wt,e)}catch{}}var Je=Math.clz32?Math.clz32:Ra,Yn=Math.log,Oa=Math.LN2;function Ra(e){return e>>>=0,e===0?32:31-(Yn(e)/Oa|0)|0}var zn=256,gl=262144,ni=4194304;function Lt(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 Ri(e,n,l){var o=e.pendingLanes;if(o===0)return 0;var c=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var b=o&134217727;return b!==0?(o=b&~d,o!==0?c=Lt(o):(y&=b,y!==0?c=Lt(y):l||(l=b&~e,l!==0&&(c=Lt(l))))):(b=o&~d,b!==0?c=Lt(b):y!==0?c=Lt(y):l||(l=o&~e,l!==0&&(c=Lt(l)))),c===0?0:n!==0&&n!==c&&(n&d)===0&&(d=c&-c,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:c}function li(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function hc(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 tr(){var e=ni;return ni<<=1,(ni&62914560)===0&&(ni=4194304),e}function ja(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function ii(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pc(e,n,l,o,c,d){var y=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var b=e.entanglements,R=e.expirationTimes,Z=e.hiddenUpdates;for(l=y&~l;0<l;){var te=31-Je(l),ie=1<<te;b[te]=0,R[te]=-1;var F=Z[te];if(F!==null)for(Z[te]=null,te=0;te<F.length;te++){var J=F[te];J!==null&&(J.lane&=-536870913)}l&=~ie}o!==0&&nr(e,o,0),d!==0&&c===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~n))}function nr(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var o=31-Je(n);e.entangledLanes|=n,e.entanglements[o]=e.entanglements[o]|1073741824|l&261930}function lr(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var o=31-Je(l),c=1<<o;c&n|e[o]&n&&(e[o]|=n),l&=~c}}function ir(e,n){var l=n&-n;return l=(l&42)!==0?1:Ha(l),(l&(e.suspendedLanes|n))!==0?0:l}function Ha(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 ka(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function ar(){var e=U.p;return e!==0?e:(e=window.event,e===void 0?32:Dm(e.type))}function or(e,n){var l=U.p;try{return U.p=e,n()}finally{U.p=l}}var Dn=Math.random().toString(36).slice(2),mt="__reactFiber$"+Dn,wt="__reactProps$"+Dn,yl="__reactContainer$"+Dn,La="__reactEvents$"+Dn,mc="__reactListeners$"+Dn,gc="__reactHandles$"+Dn,rr="__reactResources$"+Dn,ai="__reactMarker$"+Dn;function Ua(e){delete e[mt],delete e[wt],delete e[La],delete e[mc],delete e[gc]}function vl(e){var n=e[mt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[yl]||l[mt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=mm(e);e!==null;){if(l=e[mt])return l;e=mm(e)}return n}e=l,l=e.parentNode}return null}function Vn(e){if(e=e[mt]||e[yl]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function oi(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(r(33))}function xl(e){var n=e[rr];return n||(n=e[rr]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function rt(e){e[ai]=!0}var ur=new Set,cr={};function qn(e,n){Gn(e,n),Gn(e+"Capture",n)}function Gn(e,n){for(cr[e]=n,e=0;e<n.length;e++)ur.add(n[e])}var yc=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]*$"),sr={},fr={};function Ba(e){return Re.call(fr,e)?!0:Re.call(sr,e)?!1:yc.test(e)?fr[e]=!0:(sr[e]=!0,!1)}function dr(e,n,l){if(Ba(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){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,""+l)}}function hr(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function Xn(e,n,l,o){if(o===null)e.removeAttribute(l);else{switch(typeof o){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+o)}}function sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Pd(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function S1(e,n,l){var o=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,d=o.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return c.call(this)},set:function(y){l=""+y,d.call(this,y)}}),Object.defineProperty(e,n,{enumerable:o.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function vc(e){if(!e._valueTracker){var n=Pd(e)?"checked":"value";e._valueTracker=S1(e,n,""+e[n])}}function eh(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),o="";return e&&(o=Pd(e)?e.checked?"true":"false":e.value),e=o,e!==l?(n.setValue(e),!0):!1}function pr(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 w1=/[\n"\\]/g;function fn(e){return e.replace(w1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function xc(e,n,l,o,c,d,y,b){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),n!=null?y==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+sn(n)):e.value!==""+sn(n)&&(e.value=""+sn(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?bc(e,y,sn(n)):l!=null?bc(e,y,sn(l)):o!=null&&e.removeAttribute("value"),c==null&&d!=null&&(e.defaultChecked=!!d),c!=null&&(e.checked=c&&typeof c!="function"&&typeof c!="symbol"),b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.name=""+sn(b):e.removeAttribute("name")}function th(e,n,l,o,c,d,y,b){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){vc(e);return}l=l!=null?""+sn(l):"",n=n!=null?""+sn(n):l,b||n===e.value||(e.value=n),e.defaultValue=n}o=o??c,o=typeof o!="function"&&typeof o!="symbol"&&!!o,e.checked=b?e.checked:!!o,e.defaultChecked=!!o,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),vc(e)}function bc(e,n,l){n==="number"&&pr(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function ji(e,n,l,o){if(e=e.options,n){n={};for(var c=0;c<l.length;c++)n["$"+l[c]]=!0;for(l=0;l<e.length;l++)c=n.hasOwnProperty("$"+e[l].value),e[l].selected!==c&&(e[l].selected=c),c&&o&&(e[l].defaultSelected=!0)}else{for(l=""+sn(l),n=null,c=0;c<e.length;c++){if(e[c].value===l){e[c].selected=!0,o&&(e[c].defaultSelected=!0);return}n!==null||e[c].disabled||(n=e[c])}n!==null&&(n.selected=!0)}}function nh(e,n,l){if(n!=null&&(n=""+sn(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+sn(l):""}function lh(e,n,l,o){if(n==null){if(o!=null){if(l!=null)throw Error(r(92));if($(o)){if(1<o.length)throw Error(r(93));o=o[0]}l=o}l==null&&(l=""),n=l}l=sn(n),e.defaultValue=l,o=e.textContent,o===l&&o!==""&&o!==null&&(e.value=o),vc(e)}function Hi(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var E1=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 ih(e,n,l){var o=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?o?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":o?e.setProperty(n,l):typeof l!="number"||l===0||E1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function ah(e,n,l){if(n!=null&&typeof n!="object")throw Error(r(62));if(e=e.style,l!=null){for(var o in l)!l.hasOwnProperty(o)||n!=null&&n.hasOwnProperty(o)||(o.indexOf("--")===0?e.setProperty(o,""):o==="float"?e.cssFloat="":e[o]="");for(var c in n)o=n[c],n.hasOwnProperty(c)&&l[c]!==o&&ih(e,c,o)}else for(var d in n)n.hasOwnProperty(d)&&ih(e,d,n[d])}function Sc(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 _1=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"]]),A1=/^[\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 mr(e){return A1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}var wc=null;function Ec(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ki=null,Li=null;function oh(e){var n=Vn(e);if(n&&(e=n.stateNode)){var l=e[wt]||null;e:switch(e=n.stateNode,n.type){case"input":if(xc(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+fn(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var o=l[n];if(o!==e&&o.form===e.form){var c=o[wt]||null;if(!c)throw Error(r(90));xc(o,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name)}}for(n=0;n<l.length;n++)o=l[n],o.form===e.form&&eh(o)}break e;case"textarea":nh(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&ji(e,!!l.multiple,n,!1)}}}var _c=!1;function rh(e,n,l){if(_c)return e(n,l);_c=!0;try{var o=e(n);return o}finally{if(_c=!1,(ki!==null||Li!==null)&&(nu(),ki&&(n=ki,e=Li,Li=ki=null,oh(n),e)))for(n=0;n<e.length;n++)oh(e[n])}}function Ya(e,n){var l=e.stateNode;if(l===null)return null;var o=l[wt]||null;if(o===null)return null;l=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(l&&typeof l!="function")throw Error(r(231,n,typeof l));return l}var $n=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ac=!1;if($n)try{var Va={};Object.defineProperty(Va,"passive",{get:function(){Ac=!0}}),window.addEventListener("test",Va,Va),window.removeEventListener("test",Va,Va)}catch{Ac=!1}var bl=null,Nc=null,gr=null;function uh(){if(gr)return gr;var e,n=Nc,l=n.length,o,c="value"in bl?bl.value:bl.textContent,d=c.length;for(e=0;e<l&&n[e]===c[e];e++);var y=l-e;for(o=1;o<=y&&n[l-o]===c[d-o];o++);return gr=c.slice(e,1<o?1-o:void 0)}function yr(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 vr(){return!0}function ch(){return!1}function Vt(e){function n(l,o,c,d,y){this._reactName=l,this._targetInst=c,this.type=o,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var b in e)e.hasOwnProperty(b)&&(l=e[b],this[b]=l?l(d):d[b]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?vr:ch,this.isPropagationStopped=ch,this}return v(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vr)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vr)},persist:function(){},isPersistent:vr}),n}var ri={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},xr=Vt(ri),qa=v({},ri,{view:0,detail:0}),N1=Vt(qa),Cc,Tc,Ga,br=v({},qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:zc,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!==Ga&&(Ga&&e.type==="mousemove"?(Cc=e.screenX-Ga.screenX,Tc=e.screenY-Ga.screenY):Tc=Cc=0,Ga=e),Cc)},movementY:function(e){return"movementY"in e?e.movementY:Tc}}),sh=Vt(br),C1=v({},br,{dataTransfer:0}),T1=Vt(C1),M1=v({},qa,{relatedTarget:0}),Mc=Vt(M1),z1=v({},ri,{animationName:0,elapsedTime:0,pseudoElement:0}),D1=Vt(z1),O1=v({},ri,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),R1=Vt(O1),j1=v({},ri,{data:0}),fh=Vt(j1),H1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},k1={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"},L1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function U1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=L1[e])?!!n[e]:!1}function zc(){return U1}var B1=v({},qa,{key:function(e){if(e.key){var n=H1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?k1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:zc,charCode:function(e){return e.type==="keypress"?yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Y1=Vt(B1),V1=v({},br,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dh=Vt(V1),q1=v({},qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:zc}),G1=Vt(q1),X1=v({},ri,{propertyName:0,elapsedTime:0,pseudoElement:0}),Z1=Vt(X1),$1=v({},br,{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}),Q1=Vt($1),K1=v({},ri,{newState:0,oldState:0}),I1=Vt(K1),F1=[9,13,27,32],Dc=$n&&"CompositionEvent"in window,Xa=null;$n&&"documentMode"in document&&(Xa=document.documentMode);var J1=$n&&"TextEvent"in window&&!Xa,hh=$n&&(!Dc||Xa&&8<Xa&&11>=Xa),ph=" ",mh=!1;function gh(e,n){switch(e){case"keyup":return F1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function yh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Ui=!1;function W1(e,n){switch(e){case"compositionend":return yh(n);case"keypress":return n.which!==32?null:(mh=!0,ph);case"textInput":return e=n.data,e===ph&&mh?null:e;default:return null}}function P1(e,n){if(Ui)return e==="compositionend"||!Dc&&gh(e,n)?(e=uh(),gr=Nc=bl=null,Ui=!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 hh&&n.locale!=="ko"?null:n.data;default:return null}}var eb={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function vh(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!eb[e.type]:n==="textarea"}function xh(e,n,l,o){ki?Li?Li.push(o):Li=[o]:ki=o,n=cu(n,"onChange"),0<n.length&&(l=new xr("onChange","change",null,l,o),e.push({event:l,listeners:n}))}var Za=null,$a=null;function tb(e){tm(e,0)}function Sr(e){var n=oi(e);if(eh(n))return e}function bh(e,n){if(e==="change")return n}var Sh=!1;if($n){var Oc;if($n){var Rc="oninput"in document;if(!Rc){var wh=document.createElement("div");wh.setAttribute("oninput","return;"),Rc=typeof wh.oninput=="function"}Oc=Rc}else Oc=!1;Sh=Oc&&(!document.documentMode||9<document.documentMode)}function Eh(){Za&&(Za.detachEvent("onpropertychange",_h),$a=Za=null)}function _h(e){if(e.propertyName==="value"&&Sr($a)){var n=[];xh(n,$a,e,Ec(e)),rh(tb,n)}}function nb(e,n,l){e==="focusin"?(Eh(),Za=n,$a=l,Za.attachEvent("onpropertychange",_h)):e==="focusout"&&Eh()}function lb(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Sr($a)}function ib(e,n){if(e==="click")return Sr(n)}function ab(e,n){if(e==="input"||e==="change")return Sr(n)}function ob(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Pt=typeof Object.is=="function"?Object.is:ob;function Qa(e,n){if(Pt(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),o=Object.keys(n);if(l.length!==o.length)return!1;for(o=0;o<l.length;o++){var c=l[o];if(!Re.call(n,c)||!Pt(e[c],n[c]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Nh(e,n){var l=Ah(e);e=0;for(var o;l;){if(l.nodeType===3){if(o=e+l.textContent.length,e<=n&&o>=n)return{node:l,offset:n-e};e=o}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Ah(l)}}function Ch(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ch(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Th(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=pr(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=pr(e.document)}return n}function jc(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 rb=$n&&"documentMode"in document&&11>=document.documentMode,Bi=null,Hc=null,Ka=null,kc=!1;function Mh(e,n,l){var o=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;kc||Bi==null||Bi!==pr(o)||(o=Bi,"selectionStart"in o&&jc(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}),Ka&&Qa(Ka,o)||(Ka=o,o=cu(Hc,"onSelect"),0<o.length&&(n=new xr("onSelect","select",null,n,l),e.push({event:n,listeners:o}),n.target=Bi)))}function ui(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var Yi={animationend:ui("Animation","AnimationEnd"),animationiteration:ui("Animation","AnimationIteration"),animationstart:ui("Animation","AnimationStart"),transitionrun:ui("Transition","TransitionRun"),transitionstart:ui("Transition","TransitionStart"),transitioncancel:ui("Transition","TransitionCancel"),transitionend:ui("Transition","TransitionEnd")},Lc={},zh={};$n&&(zh=document.createElement("div").style,"AnimationEvent"in window||(delete Yi.animationend.animation,delete Yi.animationiteration.animation,delete Yi.animationstart.animation),"TransitionEvent"in window||delete Yi.transitionend.transition);function ci(e){if(Lc[e])return Lc[e];if(!Yi[e])return e;var n=Yi[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in zh)return Lc[e]=n[l];return e}var Dh=ci("animationend"),Oh=ci("animationiteration"),Rh=ci("animationstart"),ub=ci("transitionrun"),cb=ci("transitionstart"),sb=ci("transitioncancel"),jh=ci("transitionend"),Hh=new Map,Uc="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(" ");Uc.push("scrollEnd");function En(e,n){Hh.set(e,n),qn(n,[e])}var wr=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)},dn=[],Vi=0,Bc=0;function Er(){for(var e=Vi,n=Bc=Vi=0;n<e;){var l=dn[n];dn[n++]=null;var o=dn[n];dn[n++]=null;var c=dn[n];dn[n++]=null;var d=dn[n];if(dn[n++]=null,o!==null&&c!==null){var y=o.pending;y===null?c.next=c:(c.next=y.next,y.next=c),o.pending=c}d!==0&&kh(l,c,d)}}function _r(e,n,l,o){dn[Vi++]=e,dn[Vi++]=n,dn[Vi++]=l,dn[Vi++]=o,Bc|=o,e.lanes|=o,e=e.alternate,e!==null&&(e.lanes|=o)}function Yc(e,n,l,o){return _r(e,n,l,o),Ar(e)}function si(e,n){return _r(e,null,null,n),Ar(e)}function kh(e,n,l){e.lanes|=l;var o=e.alternate;o!==null&&(o.lanes|=l);for(var c=!1,d=e.return;d!==null;)d.childLanes|=l,o=d.alternate,o!==null&&(o.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(c=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,c&&n!==null&&(c=31-Je(l),e=d.hiddenUpdates,o=e[c],o===null?e[c]=[n]:o.push(n),n.lane=l|536870912),d):null}function Ar(e){if(50<yo)throw yo=0,Is=null,Error(r(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var qi={};function fb(e,n,l,o){this.tag=e,this.key=l,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 en(e,n,l,o){return new fb(e,n,l,o)}function Vc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qn(e,n){var l=e.alternate;return l===null?(l=en(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Lh(e,n){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function Nr(e,n,l,o,c,d){var y=0;if(o=e,typeof e=="function")Vc(e)&&(y=1);else if(typeof e=="string")y=gS(e,l,W.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case X:return e=en(31,l,n,c),e.elementType=X,e.lanes=d,e;case N:return fi(l.children,c,d,n);case T:y=8,c|=24;break;case z:return e=en(12,l,n,c|2),e.elementType=z,e.lanes=d,e;case K:return e=en(13,l,n,c),e.elementType=K,e.lanes=d,e;case I:return e=en(19,l,n,c),e.elementType=I,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case B:y=10;break e;case j:y=9;break e;case k:y=11;break e;case ee:y=14;break e;case V:y=16,o=null;break e}y=29,l=Error(r(130,e===null?"null":typeof e,"")),o=null}return n=en(y,l,n,c),n.elementType=e,n.type=o,n.lanes=d,n}function fi(e,n,l,o){return e=en(7,e,o,n),e.lanes=l,e}function qc(e,n,l){return e=en(6,e,null,n),e.lanes=l,e}function Uh(e){var n=en(18,null,null,0);return n.stateNode=e,n}function Gc(e,n,l){return n=en(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Bh=new WeakMap;function hn(e,n){if(typeof e=="object"&&e!==null){var l=Bh.get(e);return l!==void 0?l:(n={value:e,source:n,stack:se(n)},Bh.set(e,n),n)}return{value:e,source:n,stack:se(n)}}var Gi=[],Xi=0,Cr=null,Ia=0,pn=[],mn=0,Sl=null,On=1,Rn="";function Kn(e,n){Gi[Xi++]=Ia,Gi[Xi++]=Cr,Cr=e,Ia=n}function Yh(e,n,l){pn[mn++]=On,pn[mn++]=Rn,pn[mn++]=Sl,Sl=e;var o=On;e=Rn;var c=32-Je(o)-1;o&=~(1<<c),l+=1;var d=32-Je(n)+c;if(30<d){var y=c-c%5;d=(o&(1<<y)-1).toString(32),o>>=y,c-=y,On=1<<32-Je(n)+c|l<<c|o,Rn=d+e}else On=1<<d|l<<c|o,Rn=e}function Xc(e){e.return!==null&&(Kn(e,1),Yh(e,1,0))}function Zc(e){for(;e===Cr;)Cr=Gi[--Xi],Gi[Xi]=null,Ia=Gi[--Xi],Gi[Xi]=null;for(;e===Sl;)Sl=pn[--mn],pn[mn]=null,Rn=pn[--mn],pn[mn]=null,On=pn[--mn],pn[mn]=null}function Vh(e,n){pn[mn++]=On,pn[mn++]=Rn,pn[mn++]=Sl,On=n.id,Rn=n.overflow,Sl=e}var Et=null,Ke=null,Oe=!1,wl=null,gn=!1,$c=Error(r(519));function El(e){var n=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fa(hn(n,e)),$c}function qh(e){var n=e.stateNode,l=e.type,o=e.memoizedProps;switch(n[mt]=e,n[wt]=o,l){case"dialog":Me("cancel",n),Me("close",n);break;case"iframe":case"object":case"embed":Me("load",n);break;case"video":case"audio":for(l=0;l<xo.length;l++)Me(xo[l],n);break;case"source":Me("error",n);break;case"img":case"image":case"link":Me("error",n),Me("load",n);break;case"details":Me("toggle",n);break;case"input":Me("invalid",n),th(n,o.value,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name,!0);break;case"select":Me("invalid",n);break;case"textarea":Me("invalid",n),lh(n,o.value,o.defaultValue,o.children)}l=o.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||o.suppressHydrationWarning===!0||am(n.textContent,l)?(o.popover!=null&&(Me("beforetoggle",n),Me("toggle",n)),o.onScroll!=null&&Me("scroll",n),o.onScrollEnd!=null&&Me("scrollend",n),o.onClick!=null&&(n.onclick=Zn),n=!0):n=!1,n||El(e,!0)}function Gh(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:gn=!1;return;case 27:case 3:gn=!0;return;default:Et=Et.return}}function Zi(e){if(e!==Et)return!1;if(!Oe)return Gh(e),Oe=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||ff(e.type,e.memoizedProps)),l=!l),l&&Ke&&El(e),Gh(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ke=pm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));Ke=pm(e)}else n===27?(n=Ke,Ll(e.type)?(e=gf,gf=null,Ke=e):Ke=n):Ke=Et?vn(e.stateNode.nextSibling):null;return!0}function di(){Ke=Et=null,Oe=!1}function Qc(){var e=wl;return e!==null&&(Zt===null?Zt=e:Zt.push.apply(Zt,e),wl=null),e}function Fa(e){wl===null?wl=[e]:wl.push(e)}var Kc=_(null),hi=null,In=null;function _l(e,n,l){Q(Kc,n._currentValue),n._currentValue=l}function Fn(e){e._currentValue=Kc.current,H(Kc)}function Ic(e,n,l){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===l)break;e=e.return}}function Fc(e,n,l,o){var c=e.child;for(c!==null&&(c.return=e);c!==null;){var d=c.dependencies;if(d!==null){var y=c.child;d=d.firstContext;e:for(;d!==null;){var b=d;d=c;for(var R=0;R<n.length;R++)if(b.context===n[R]){d.lanes|=l,b=d.alternate,b!==null&&(b.lanes|=l),Ic(d.return,l,e),o||(y=null);break e}d=b.next}}else if(c.tag===18){if(y=c.return,y===null)throw Error(r(341));y.lanes|=l,d=y.alternate,d!==null&&(d.lanes|=l),Ic(y,l,e),y=null}else y=c.child;if(y!==null)y.return=c;else for(y=c;y!==null;){if(y===e){y=null;break}if(c=y.sibling,c!==null){c.return=y.return,y=c;break}y=y.return}c=y}}function $i(e,n,l,o){e=null;for(var c=n,d=!1;c!==null;){if(!d){if((c.flags&524288)!==0)d=!0;else if((c.flags&262144)!==0)break}if(c.tag===10){var y=c.alternate;if(y===null)throw Error(r(387));if(y=y.memoizedProps,y!==null){var b=c.type;Pt(c.pendingProps.value,y.value)||(e!==null?e.push(b):e=[b])}}else if(c===fe.current){if(y=c.alternate,y===null)throw Error(r(387));y.memoizedState.memoizedState!==c.memoizedState.memoizedState&&(e!==null?e.push(_o):e=[_o])}c=c.return}e!==null&&Fc(n,e,l,o),n.flags|=262144}function Tr(e){for(e=e.firstContext;e!==null;){if(!Pt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function pi(e){hi=e,In=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Xh(hi,e)}function Mr(e,n){return hi===null&&pi(e),Xh(e,n)}function Xh(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},In===null){if(e===null)throw Error(r(308));In=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else In=In.next=n;return l}var db=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,o){e.push(o)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},hb=t.unstable_scheduleCallback,pb=t.unstable_NormalPriority,ut={$$typeof:B,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Jc(){return{controller:new db,data:new Map,refCount:0}}function Ja(e){e.refCount--,e.refCount===0&&hb(pb,function(){e.controller.abort()})}var Wa=null,Wc=0,Qi=0,Ki=null;function mb(e,n){if(Wa===null){var l=Wa=[];Wc=0,Qi=tf(),Ki={status:"pending",value:void 0,then:function(o){l.push(o)}}}return Wc++,n.then(Zh,Zh),n}function Zh(){if(--Wc===0&&Wa!==null){Ki!==null&&(Ki.status="fulfilled");var e=Wa;Wa=null,Qi=0,Ki=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function gb(e,n){var l=[],o={status:"pending",value:null,reason:null,then:function(c){l.push(c)}};return e.then(function(){o.status="fulfilled",o.value=n;for(var c=0;c<l.length;c++)(0,l[c])(n)},function(c){for(o.status="rejected",o.reason=c,c=0;c<l.length;c++)(0,l[c])(void 0)}),o}var $h=A.S;A.S=function(e,n){M0=Fe(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&mb(e,n),$h!==null&&$h(e,n)};var mi=_(null);function Pc(){var e=mi.current;return e!==null?e:$e.pooledCache}function zr(e,n){n===null?Q(mi,mi.current):Q(mi,n.pool)}function Qh(){var e=Pc();return e===null?null:{parent:ut._currentValue,pool:e}}var Ii=Error(r(460)),es=Error(r(474)),Dr=Error(r(542)),Or={then:function(){}};function Kh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Ih(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Zn,Zn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Jh(e),e;default:if(typeof n.status=="string")n.then(Zn,Zn);else{if(e=$e,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=n,e.status="pending",e.then(function(o){if(n.status==="pending"){var c=n;c.status="fulfilled",c.value=o}},function(o){if(n.status==="pending"){var c=n;c.status="rejected",c.reason=o}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Jh(e),e}throw yi=n,Ii}}function gi(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(yi=l,Ii):l}}var yi=null;function Fh(){if(yi===null)throw Error(r(459));var e=yi;return yi=null,e}function Jh(e){if(e===Ii||e===Dr)throw Error(r(483))}var Fi=null,Pa=0;function Rr(e){var n=Pa;return Pa+=1,Fi===null&&(Fi=[]),Ih(Fi,e,n)}function eo(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function jr(e,n){throw n.$$typeof===x?Error(r(525)):(e=Object.prototype.toString.call(n),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Wh(e){function n(Y,L){if(e){var G=Y.deletions;G===null?(Y.deletions=[L],Y.flags|=16):G.push(L)}}function l(Y,L){if(!e)return null;for(;L!==null;)n(Y,L),L=L.sibling;return null}function o(Y){for(var L=new Map;Y!==null;)Y.key!==null?L.set(Y.key,Y):L.set(Y.index,Y),Y=Y.sibling;return L}function c(Y,L){return Y=Qn(Y,L),Y.index=0,Y.sibling=null,Y}function d(Y,L,G){return Y.index=G,e?(G=Y.alternate,G!==null?(G=G.index,G<L?(Y.flags|=67108866,L):G):(Y.flags|=67108866,L)):(Y.flags|=1048576,L)}function y(Y){return e&&Y.alternate===null&&(Y.flags|=67108866),Y}function b(Y,L,G,ne){return L===null||L.tag!==6?(L=qc(G,Y.mode,ne),L.return=Y,L):(L=c(L,G),L.return=Y,L)}function R(Y,L,G,ne){var xe=G.type;return xe===N?te(Y,L,G.props.children,ne,G.key):L!==null&&(L.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===V&&gi(xe)===L.type)?(L=c(L,G.props),eo(L,G),L.return=Y,L):(L=Nr(G.type,G.key,G.props,null,Y.mode,ne),eo(L,G),L.return=Y,L)}function Z(Y,L,G,ne){return L===null||L.tag!==4||L.stateNode.containerInfo!==G.containerInfo||L.stateNode.implementation!==G.implementation?(L=Gc(G,Y.mode,ne),L.return=Y,L):(L=c(L,G.children||[]),L.return=Y,L)}function te(Y,L,G,ne,xe){return L===null||L.tag!==7?(L=fi(G,Y.mode,ne,xe),L.return=Y,L):(L=c(L,G),L.return=Y,L)}function ie(Y,L,G){if(typeof L=="string"&&L!==""||typeof L=="number"||typeof L=="bigint")return L=qc(""+L,Y.mode,G),L.return=Y,L;if(typeof L=="object"&&L!==null){switch(L.$$typeof){case w:return G=Nr(L.type,L.key,L.props,null,Y.mode,G),eo(G,L),G.return=Y,G;case M:return L=Gc(L,Y.mode,G),L.return=Y,L;case V:return L=gi(L),ie(Y,L,G)}if($(L)||re(L))return L=fi(L,Y.mode,G,null),L.return=Y,L;if(typeof L.then=="function")return ie(Y,Rr(L),G);if(L.$$typeof===B)return ie(Y,Mr(Y,L),G);jr(Y,L)}return null}function F(Y,L,G,ne){var xe=L!==null?L.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return xe!==null?null:b(Y,L,""+G,ne);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return G.key===xe?R(Y,L,G,ne):null;case M:return G.key===xe?Z(Y,L,G,ne):null;case V:return G=gi(G),F(Y,L,G,ne)}if($(G)||re(G))return xe!==null?null:te(Y,L,G,ne,null);if(typeof G.then=="function")return F(Y,L,Rr(G),ne);if(G.$$typeof===B)return F(Y,L,Mr(Y,G),ne);jr(Y,G)}return null}function J(Y,L,G,ne,xe){if(typeof ne=="string"&&ne!==""||typeof ne=="number"||typeof ne=="bigint")return Y=Y.get(G)||null,b(L,Y,""+ne,xe);if(typeof ne=="object"&&ne!==null){switch(ne.$$typeof){case w:return Y=Y.get(ne.key===null?G:ne.key)||null,R(L,Y,ne,xe);case M:return Y=Y.get(ne.key===null?G:ne.key)||null,Z(L,Y,ne,xe);case V:return ne=gi(ne),J(Y,L,G,ne,xe)}if($(ne)||re(ne))return Y=Y.get(G)||null,te(L,Y,ne,xe,null);if(typeof ne.then=="function")return J(Y,L,G,Rr(ne),xe);if(ne.$$typeof===B)return J(Y,L,G,Mr(L,ne),xe);jr(L,ne)}return null}function he(Y,L,G,ne){for(var xe=null,Le=null,ge=L,_e=L=0,De=null;ge!==null&&_e<G.length;_e++){ge.index>_e?(De=ge,ge=null):De=ge.sibling;var Ue=F(Y,ge,G[_e],ne);if(Ue===null){ge===null&&(ge=De);break}e&&ge&&Ue.alternate===null&&n(Y,ge),L=d(Ue,L,_e),Le===null?xe=Ue:Le.sibling=Ue,Le=Ue,ge=De}if(_e===G.length)return l(Y,ge),Oe&&Kn(Y,_e),xe;if(ge===null){for(;_e<G.length;_e++)ge=ie(Y,G[_e],ne),ge!==null&&(L=d(ge,L,_e),Le===null?xe=ge:Le.sibling=ge,Le=ge);return Oe&&Kn(Y,_e),xe}for(ge=o(ge);_e<G.length;_e++)De=J(ge,Y,_e,G[_e],ne),De!==null&&(e&&De.alternate!==null&&ge.delete(De.key===null?_e:De.key),L=d(De,L,_e),Le===null?xe=De:Le.sibling=De,Le=De);return e&&ge.forEach(function(ql){return n(Y,ql)}),Oe&&Kn(Y,_e),xe}function Se(Y,L,G,ne){if(G==null)throw Error(r(151));for(var xe=null,Le=null,ge=L,_e=L=0,De=null,Ue=G.next();ge!==null&&!Ue.done;_e++,Ue=G.next()){ge.index>_e?(De=ge,ge=null):De=ge.sibling;var ql=F(Y,ge,Ue.value,ne);if(ql===null){ge===null&&(ge=De);break}e&&ge&&ql.alternate===null&&n(Y,ge),L=d(ql,L,_e),Le===null?xe=ql:Le.sibling=ql,Le=ql,ge=De}if(Ue.done)return l(Y,ge),Oe&&Kn(Y,_e),xe;if(ge===null){for(;!Ue.done;_e++,Ue=G.next())Ue=ie(Y,Ue.value,ne),Ue!==null&&(L=d(Ue,L,_e),Le===null?xe=Ue:Le.sibling=Ue,Le=Ue);return Oe&&Kn(Y,_e),xe}for(ge=o(ge);!Ue.done;_e++,Ue=G.next())Ue=J(ge,Y,_e,Ue.value,ne),Ue!==null&&(e&&Ue.alternate!==null&&ge.delete(Ue.key===null?_e:Ue.key),L=d(Ue,L,_e),Le===null?xe=Ue:Le.sibling=Ue,Le=Ue);return e&&ge.forEach(function(CS){return n(Y,CS)}),Oe&&Kn(Y,_e),xe}function Ze(Y,L,G,ne){if(typeof G=="object"&&G!==null&&G.type===N&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case w:e:{for(var xe=G.key;L!==null;){if(L.key===xe){if(xe=G.type,xe===N){if(L.tag===7){l(Y,L.sibling),ne=c(L,G.props.children),ne.return=Y,Y=ne;break e}}else if(L.elementType===xe||typeof xe=="object"&&xe!==null&&xe.$$typeof===V&&gi(xe)===L.type){l(Y,L.sibling),ne=c(L,G.props),eo(ne,G),ne.return=Y,Y=ne;break e}l(Y,L);break}else n(Y,L);L=L.sibling}G.type===N?(ne=fi(G.props.children,Y.mode,ne,G.key),ne.return=Y,Y=ne):(ne=Nr(G.type,G.key,G.props,null,Y.mode,ne),eo(ne,G),ne.return=Y,Y=ne)}return y(Y);case M:e:{for(xe=G.key;L!==null;){if(L.key===xe)if(L.tag===4&&L.stateNode.containerInfo===G.containerInfo&&L.stateNode.implementation===G.implementation){l(Y,L.sibling),ne=c(L,G.children||[]),ne.return=Y,Y=ne;break e}else{l(Y,L);break}else n(Y,L);L=L.sibling}ne=Gc(G,Y.mode,ne),ne.return=Y,Y=ne}return y(Y);case V:return G=gi(G),Ze(Y,L,G,ne)}if($(G))return he(Y,L,G,ne);if(re(G)){if(xe=re(G),typeof xe!="function")throw Error(r(150));return G=xe.call(G),Se(Y,L,G,ne)}if(typeof G.then=="function")return Ze(Y,L,Rr(G),ne);if(G.$$typeof===B)return Ze(Y,L,Mr(Y,G),ne);jr(Y,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,L!==null&&L.tag===6?(l(Y,L.sibling),ne=c(L,G),ne.return=Y,Y=ne):(l(Y,L),ne=qc(G,Y.mode,ne),ne.return=Y,Y=ne),y(Y)):l(Y,L)}return function(Y,L,G,ne){try{Pa=0;var xe=Ze(Y,L,G,ne);return Fi=null,xe}catch(ge){if(ge===Ii||ge===Dr)throw ge;var Le=en(29,ge,null,Y.mode);return Le.lanes=ne,Le.return=Y,Le}}}var vi=Wh(!0),Ph=Wh(!1),Al=!1;function ts(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ns(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 Nl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Cl(e,n,l){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Ye&2)!==0){var c=o.pending;return c===null?n.next=n:(n.next=c.next,c.next=n),o.pending=n,n=Ar(e),kh(e,null,l),n}return _r(e,o,n,l),Ar(e)}function to(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,lr(e,l)}}function ls(e,n){var l=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,l===o)){var c=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?c=d=y:d=d.next=y,l=l.next}while(l!==null);d===null?c=d=n:d=d.next=n}else c=d=n;l={baseState:o.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:o.shared,callbacks:o.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var is=!1;function no(){if(is){var e=Ki;if(e!==null)throw e}}function lo(e,n,l,o){is=!1;var c=e.updateQueue;Al=!1;var d=c.firstBaseUpdate,y=c.lastBaseUpdate,b=c.shared.pending;if(b!==null){c.shared.pending=null;var R=b,Z=R.next;R.next=null,y===null?d=Z:y.next=Z,y=R;var te=e.alternate;te!==null&&(te=te.updateQueue,b=te.lastBaseUpdate,b!==y&&(b===null?te.firstBaseUpdate=Z:b.next=Z,te.lastBaseUpdate=R))}if(d!==null){var ie=c.baseState;y=0,te=Z=R=null,b=d;do{var F=b.lane&-536870913,J=F!==b.lane;if(J?(ze&F)===F:(o&F)===F){F!==0&&F===Qi&&(is=!0),te!==null&&(te=te.next={lane:0,tag:b.tag,payload:b.payload,callback:null,next:null});e:{var he=e,Se=b;F=n;var Ze=l;switch(Se.tag){case 1:if(he=Se.payload,typeof he=="function"){ie=he.call(Ze,ie,F);break e}ie=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Se.payload,F=typeof he=="function"?he.call(Ze,ie,F):he,F==null)break e;ie=v({},ie,F);break e;case 2:Al=!0}}F=b.callback,F!==null&&(e.flags|=64,J&&(e.flags|=8192),J=c.callbacks,J===null?c.callbacks=[F]:J.push(F))}else J={lane:F,tag:b.tag,payload:b.payload,callback:b.callback,next:null},te===null?(Z=te=J,R=ie):te=te.next=J,y|=F;if(b=b.next,b===null){if(b=c.shared.pending,b===null)break;J=b,b=J.next,J.next=null,c.lastBaseUpdate=J,c.shared.pending=null}}while(!0);te===null&&(R=ie),c.baseState=R,c.firstBaseUpdate=Z,c.lastBaseUpdate=te,d===null&&(c.shared.lanes=0),Ol|=y,e.lanes=y,e.memoizedState=ie}}function ep(e,n){if(typeof e!="function")throw Error(r(191,e));e.call(n)}function tp(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)ep(l[e],n)}var Ji=_(null),Hr=_(0);function np(e,n){e=al,Q(Hr,e),Q(Ji,n),al=e|n.baseLanes}function as(){Q(Hr,al),Q(Ji,Ji.current)}function os(){al=Hr.current,H(Ji),H(Hr)}var tn=_(null),yn=null;function Tl(e){var n=e.alternate;Q(at,at.current&1),Q(tn,e),yn===null&&(n===null||Ji.current!==null||n.memoizedState!==null)&&(yn=e)}function rs(e){Q(at,at.current),Q(tn,e),yn===null&&(yn=e)}function lp(e){e.tag===22?(Q(at,at.current),Q(tn,e),yn===null&&(yn=e)):Ml()}function Ml(){Q(at,at.current),Q(tn,tn.current)}function nn(e){H(tn),yn===e&&(yn=null),H(at)}var at=_(0);function kr(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||pf(l)||mf(l)))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 Jn=0,Ee=null,Ge=null,ct=null,Lr=!1,Wi=!1,xi=!1,Ur=0,io=0,Pi=null,yb=0;function tt(){throw Error(r(321))}function us(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Pt(e[l],n[l]))return!1;return!0}function cs(e,n,l,o,c,d){return Jn=d,Ee=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,A.H=e===null||e.memoizedState===null?Yp:_s,xi=!1,d=l(o,c),xi=!1,Wi&&(d=ap(n,l,o,c)),ip(e),d}function ip(e){A.H=ro;var n=Ge!==null&&Ge.next!==null;if(Jn=0,ct=Ge=Ee=null,Lr=!1,io=0,Pi=null,n)throw Error(r(300));e===null||st||(e=e.dependencies,e!==null&&Tr(e)&&(st=!0))}function ap(e,n,l,o){Ee=e;var c=0;do{if(Wi&&(Pi=null),io=0,Wi=!1,25<=c)throw Error(r(301));if(c+=1,ct=Ge=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}A.H=Vp,d=n(l,o)}while(Wi);return d}function vb(){var e=A.H,n=e.useState()[0];return n=typeof n.then=="function"?ao(n):n,e=e.useState()[0],(Ge!==null?Ge.memoizedState:null)!==e&&(Ee.flags|=1024),n}function ss(){var e=Ur!==0;return Ur=0,e}function fs(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function ds(e){if(Lr){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Lr=!1}Jn=0,ct=Ge=Ee=null,Wi=!1,io=Ur=0,Pi=null}function Ut(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?Ee.memoizedState=ct=e:ct=ct.next=e,ct}function ot(){if(Ge===null){var e=Ee.alternate;e=e!==null?e.memoizedState:null}else e=Ge.next;var n=ct===null?Ee.memoizedState:ct.next;if(n!==null)ct=n,Ge=e;else{if(e===null)throw Ee.alternate===null?Error(r(467)):Error(r(310));Ge=e,e={memoizedState:Ge.memoizedState,baseState:Ge.baseState,baseQueue:Ge.baseQueue,queue:Ge.queue,next:null},ct===null?Ee.memoizedState=ct=e:ct=ct.next=e}return ct}function Br(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ao(e){var n=io;return io+=1,Pi===null&&(Pi=[]),e=Ih(Pi,e,n),n=Ee,(ct===null?n.memoizedState:ct.next)===null&&(n=n.alternate,A.H=n===null||n.memoizedState===null?Yp:_s),e}function Yr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return ao(e);if(e.$$typeof===B)return _t(e)}throw Error(r(438,String(e)))}function hs(e){var n=null,l=Ee.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var o=Ee.alternate;o!==null&&(o=o.updateQueue,o!==null&&(o=o.memoCache,o!=null&&(n={data:o.data.map(function(c){return c.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Br(),Ee.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),o=0;o<e;o++)l[o]=le;return n.index++,l}function Wn(e,n){return typeof n=="function"?n(e):n}function Vr(e){var n=ot();return ps(n,Ge,e)}function ps(e,n,l){var o=e.queue;if(o===null)throw Error(r(311));o.lastRenderedReducer=l;var c=e.baseQueue,d=o.pending;if(d!==null){if(c!==null){var y=c.next;c.next=d.next,d.next=y}n.baseQueue=c=d,o.pending=null}if(d=e.baseState,c===null)e.memoizedState=d;else{n=c.next;var b=y=null,R=null,Z=n,te=!1;do{var ie=Z.lane&-536870913;if(ie!==Z.lane?(ze&ie)===ie:(Jn&ie)===ie){var F=Z.revertLane;if(F===0)R!==null&&(R=R.next={lane:0,revertLane:0,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),ie===Qi&&(te=!0);else if((Jn&F)===F){Z=Z.next,F===Qi&&(te=!0);continue}else ie={lane:0,revertLane:Z.revertLane,gesture:null,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},R===null?(b=R=ie,y=d):R=R.next=ie,Ee.lanes|=F,Ol|=F;ie=Z.action,xi&&l(d,ie),d=Z.hasEagerState?Z.eagerState:l(d,ie)}else F={lane:ie,revertLane:Z.revertLane,gesture:Z.gesture,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null},R===null?(b=R=F,y=d):R=R.next=F,Ee.lanes|=ie,Ol|=ie;Z=Z.next}while(Z!==null&&Z!==n);if(R===null?y=d:R.next=b,!Pt(d,e.memoizedState)&&(st=!0,te&&(l=Ki,l!==null)))throw l;e.memoizedState=d,e.baseState=y,e.baseQueue=R,o.lastRenderedState=d}return c===null&&(o.lanes=0),[e.memoizedState,o.dispatch]}function ms(e){var n=ot(),l=n.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=e;var o=l.dispatch,c=l.pending,d=n.memoizedState;if(c!==null){l.pending=null;var y=c=c.next;do d=e(d,y.action),y=y.next;while(y!==c);Pt(d,n.memoizedState)||(st=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,o]}function op(e,n,l){var o=Ee,c=ot(),d=Oe;if(d){if(l===void 0)throw Error(r(407));l=l()}else l=n();var y=!Pt((Ge||c).memoizedState,l);if(y&&(c.memoizedState=l,st=!0),c=c.queue,vs(cp.bind(null,o,c,e),[e]),c.getSnapshot!==n||y||ct!==null&&ct.memoizedState.tag&1){if(o.flags|=2048,ea(9,{destroy:void 0},up.bind(null,o,c,l,n),null),$e===null)throw Error(r(349));d||(Jn&127)!==0||rp(o,n,l)}return l}function rp(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ee.updateQueue,n===null?(n=Br(),Ee.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function up(e,n,l,o){n.value=l,n.getSnapshot=o,sp(n)&&fp(e)}function cp(e,n,l){return l(function(){sp(n)&&fp(e)})}function sp(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Pt(e,l)}catch{return!0}}function fp(e){var n=si(e,2);n!==null&&$t(n,e,2)}function gs(e){var n=Ut();if(typeof e=="function"){var l=e;if(e=l(),xi){kt(!0);try{l()}finally{kt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:e},n}function dp(e,n,l,o){return e.baseState=l,ps(e,Ge,typeof o=="function"?o:Wn)}function xb(e,n,l,o,c){if(Xr(e))throw Error(r(485));if(e=n.action,e!==null){var d={payload:c,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};A.T!==null?l(!0):d.isTransition=!1,o(d),l=n.pending,l===null?(d.next=n.pending=d,hp(n,d)):(d.next=l.next,n.pending=l.next=d)}}function hp(e,n){var l=n.action,o=n.payload,c=e.state;if(n.isTransition){var d=A.T,y={};A.T=y;try{var b=l(c,o),R=A.S;R!==null&&R(y,b),pp(e,n,b)}catch(Z){ys(e,n,Z)}finally{d!==null&&y.types!==null&&(d.types=y.types),A.T=d}}else try{d=l(c,o),pp(e,n,d)}catch(Z){ys(e,n,Z)}}function pp(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(o){mp(e,n,o)},function(o){return ys(e,n,o)}):mp(e,n,l)}function mp(e,n,l){n.status="fulfilled",n.value=l,gp(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,hp(e,l)))}function ys(e,n,l){var o=e.pending;if(e.pending=null,o!==null){o=o.next;do n.status="rejected",n.reason=l,gp(n),n=n.next;while(n!==o)}e.action=null}function gp(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function yp(e,n){return n}function vp(e,n){if(Oe){var l=$e.formState;if(l!==null){e:{var o=Ee;if(Oe){if(Ke){t:{for(var c=Ke,d=gn;c.nodeType!==8;){if(!d){c=null;break t}if(c=vn(c.nextSibling),c===null){c=null;break t}}d=c.data,c=d==="F!"||d==="F"?c:null}if(c){Ke=vn(c.nextSibling),o=c.data==="F!";break e}}El(o)}o=!1}o&&(n=l[0])}}return l=Ut(),l.memoizedState=l.baseState=n,o={pending:null,lanes:0,dispatch:null,lastRenderedReducer:yp,lastRenderedState:n},l.queue=o,l=Lp.bind(null,Ee,o),o.dispatch=l,o=gs(!1),d=Es.bind(null,Ee,!1,o.queue),o=Ut(),c={state:n,dispatch:null,action:e,pending:null},o.queue=c,l=xb.bind(null,Ee,c,d,l),c.dispatch=l,o.memoizedState=e,[n,l,!1]}function xp(e){var n=ot();return bp(n,Ge,e)}function bp(e,n,l){if(n=ps(e,n,yp)[0],e=Vr(Wn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var o=ao(n)}catch(y){throw y===Ii?Dr:y}else o=n;n=ot();var c=n.queue,d=c.dispatch;return l!==n.memoizedState&&(Ee.flags|=2048,ea(9,{destroy:void 0},bb.bind(null,c,l),null)),[o,d,e]}function bb(e,n){e.action=n}function Sp(e){var n=ot(),l=Ge;if(l!==null)return bp(n,l,e);ot(),n=n.memoizedState,l=ot();var o=l.queue.dispatch;return l.memoizedState=e,[n,o,!1]}function ea(e,n,l,o){return e={tag:e,create:l,deps:o,inst:n,next:null},n=Ee.updateQueue,n===null&&(n=Br(),Ee.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(o=l.next,l.next=e,e.next=o,n.lastEffect=e),e}function wp(){return ot().memoizedState}function qr(e,n,l,o){var c=Ut();Ee.flags|=e,c.memoizedState=ea(1|n,{destroy:void 0},l,o===void 0?null:o)}function Gr(e,n,l,o){var c=ot();o=o===void 0?null:o;var d=c.memoizedState.inst;Ge!==null&&o!==null&&us(o,Ge.memoizedState.deps)?c.memoizedState=ea(n,d,l,o):(Ee.flags|=e,c.memoizedState=ea(1|n,d,l,o))}function Ep(e,n){qr(8390656,8,e,n)}function vs(e,n){Gr(2048,8,e,n)}function Sb(e){Ee.flags|=4;var n=Ee.updateQueue;if(n===null)n=Br(),Ee.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function _p(e){var n=ot().memoizedState;return Sb({ref:n,nextImpl:e}),function(){if((Ye&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}function Ap(e,n){return Gr(4,2,e,n)}function Np(e,n){return Gr(4,4,e,n)}function Cp(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Tp(e,n,l){l=l!=null?l.concat([e]):null,Gr(4,4,Cp.bind(null,n,e),l)}function xs(){}function Mp(e,n){var l=ot();n=n===void 0?null:n;var o=l.memoizedState;return n!==null&&us(n,o[1])?o[0]:(l.memoizedState=[e,n],e)}function zp(e,n){var l=ot();n=n===void 0?null:n;var o=l.memoizedState;if(n!==null&&us(n,o[1]))return o[0];if(o=e(),xi){kt(!0);try{e()}finally{kt(!1)}}return l.memoizedState=[o,n],o}function bs(e,n,l){return l===void 0||(Jn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=D0(),Ee.lanes|=e,Ol|=e,l)}function Dp(e,n,l,o){return Pt(l,n)?l:Ji.current!==null?(e=bs(e,l,o),Pt(e,n)||(st=!0),e):(Jn&42)===0||(Jn&1073741824)!==0&&(ze&261930)===0?(st=!0,e.memoizedState=l):(e=D0(),Ee.lanes|=e,Ol|=e,n)}function Op(e,n,l,o,c){var d=U.p;U.p=d!==0&&8>d?d:8;var y=A.T,b={};A.T=b,Es(e,!1,n,l);try{var R=c(),Z=A.S;if(Z!==null&&Z(b,R),R!==null&&typeof R=="object"&&typeof R.then=="function"){var te=gb(R,o);oo(e,n,te,on(e))}else oo(e,n,o,on(e))}catch(ie){oo(e,n,{then:function(){},status:"rejected",reason:ie},on())}finally{U.p=d,y!==null&&b.types!==null&&(y.types=b.types),A.T=y}}function wb(){}function Ss(e,n,l,o){if(e.tag!==5)throw Error(r(476));var c=Rp(e).queue;Op(e,c,n,q,l===null?wb:function(){return jp(e),l(o)})}function Rp(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:q},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Wn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function jp(e){var n=Rp(e);n.next===null&&(n=e.alternate.memoizedState),oo(e,n.next.queue,{},on())}function ws(){return _t(_o)}function Hp(){return ot().memoizedState}function kp(){return ot().memoizedState}function Eb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=on();e=Nl(l);var o=Cl(n,e,l);o!==null&&($t(o,n,l),to(o,n,l)),n={cache:Jc()},e.payload=n;return}n=n.return}}function _b(e,n,l){var o=on();l={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xr(e)?Up(n,l):(l=Yc(e,n,l,o),l!==null&&($t(l,e,o),Bp(l,n,o)))}function Lp(e,n,l){var o=on();oo(e,n,l,o)}function oo(e,n,l,o){var c={lane:o,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Xr(e))Up(n,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var y=n.lastRenderedState,b=d(y,l);if(c.hasEagerState=!0,c.eagerState=b,Pt(b,y))return _r(e,n,c,0),$e===null&&Er(),!1}catch{}if(l=Yc(e,n,c,o),l!==null)return $t(l,e,o),Bp(l,n,o),!0}return!1}function Es(e,n,l,o){if(o={lane:2,revertLane:tf(),gesture:null,action:o,hasEagerState:!1,eagerState:null,next:null},Xr(e)){if(n)throw Error(r(479))}else n=Yc(e,l,o,2),n!==null&&$t(n,e,2)}function Xr(e){var n=e.alternate;return e===Ee||n!==null&&n===Ee}function Up(e,n){Wi=Lr=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Bp(e,n,l){if((l&4194048)!==0){var o=n.lanes;o&=e.pendingLanes,l|=o,n.lanes=l,lr(e,l)}}var ro={readContext:_t,use:Yr,useCallback:tt,useContext:tt,useEffect:tt,useImperativeHandle:tt,useLayoutEffect:tt,useInsertionEffect:tt,useMemo:tt,useReducer:tt,useRef:tt,useState:tt,useDebugValue:tt,useDeferredValue:tt,useTransition:tt,useSyncExternalStore:tt,useId:tt,useHostTransitionStatus:tt,useFormState:tt,useActionState:tt,useOptimistic:tt,useMemoCache:tt,useCacheRefresh:tt};ro.useEffectEvent=tt;var Yp={readContext:_t,use:Yr,useCallback:function(e,n){return Ut().memoizedState=[e,n===void 0?null:n],e},useContext:_t,useEffect:Ep,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,qr(4194308,4,Cp.bind(null,n,e),l)},useLayoutEffect:function(e,n){return qr(4194308,4,e,n)},useInsertionEffect:function(e,n){qr(4,2,e,n)},useMemo:function(e,n){var l=Ut();n=n===void 0?null:n;var o=e();if(xi){kt(!0);try{e()}finally{kt(!1)}}return l.memoizedState=[o,n],o},useReducer:function(e,n,l){var o=Ut();if(l!==void 0){var c=l(n);if(xi){kt(!0);try{l(n)}finally{kt(!1)}}}else c=n;return o.memoizedState=o.baseState=c,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:c},o.queue=e,e=e.dispatch=_b.bind(null,Ee,e),[o.memoizedState,e]},useRef:function(e){var n=Ut();return e={current:e},n.memoizedState=e},useState:function(e){e=gs(e);var n=e.queue,l=Lp.bind(null,Ee,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:xs,useDeferredValue:function(e,n){var l=Ut();return bs(l,e,n)},useTransition:function(){var e=gs(!1);return e=Op.bind(null,Ee,e.queue,!0,!1),Ut().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var o=Ee,c=Ut();if(Oe){if(l===void 0)throw Error(r(407));l=l()}else{if(l=n(),$e===null)throw Error(r(349));(ze&127)!==0||rp(o,n,l)}c.memoizedState=l;var d={value:l,getSnapshot:n};return c.queue=d,Ep(cp.bind(null,o,d,e),[e]),o.flags|=2048,ea(9,{destroy:void 0},up.bind(null,o,d,l,n),null),l},useId:function(){var e=Ut(),n=$e.identifierPrefix;if(Oe){var l=Rn,o=On;l=(o&~(1<<32-Je(o)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ur++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=yb++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:ws,useFormState:vp,useActionState:vp,useOptimistic:function(e){var n=Ut();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=Es.bind(null,Ee,!0,l),l.dispatch=n,[e,n]},useMemoCache:hs,useCacheRefresh:function(){return Ut().memoizedState=Eb.bind(null,Ee)},useEffectEvent:function(e){var n=Ut(),l={impl:e};return n.memoizedState=l,function(){if((Ye&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},_s={readContext:_t,use:Yr,useCallback:Mp,useContext:_t,useEffect:vs,useImperativeHandle:Tp,useInsertionEffect:Ap,useLayoutEffect:Np,useMemo:zp,useReducer:Vr,useRef:wp,useState:function(){return Vr(Wn)},useDebugValue:xs,useDeferredValue:function(e,n){var l=ot();return Dp(l,Ge.memoizedState,e,n)},useTransition:function(){var e=Vr(Wn)[0],n=ot().memoizedState;return[typeof e=="boolean"?e:ao(e),n]},useSyncExternalStore:op,useId:Hp,useHostTransitionStatus:ws,useFormState:xp,useActionState:xp,useOptimistic:function(e,n){var l=ot();return dp(l,Ge,e,n)},useMemoCache:hs,useCacheRefresh:kp};_s.useEffectEvent=_p;var Vp={readContext:_t,use:Yr,useCallback:Mp,useContext:_t,useEffect:vs,useImperativeHandle:Tp,useInsertionEffect:Ap,useLayoutEffect:Np,useMemo:zp,useReducer:ms,useRef:wp,useState:function(){return ms(Wn)},useDebugValue:xs,useDeferredValue:function(e,n){var l=ot();return Ge===null?bs(l,e,n):Dp(l,Ge.memoizedState,e,n)},useTransition:function(){var e=ms(Wn)[0],n=ot().memoizedState;return[typeof e=="boolean"?e:ao(e),n]},useSyncExternalStore:op,useId:Hp,useHostTransitionStatus:ws,useFormState:Sp,useActionState:Sp,useOptimistic:function(e,n){var l=ot();return Ge!==null?dp(l,Ge,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:hs,useCacheRefresh:kp};Vp.useEffectEvent=_p;function As(e,n,l,o){n=e.memoizedState,l=l(o,n),l=l==null?n:v({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var Ns={enqueueSetState:function(e,n,l){e=e._reactInternals;var o=on(),c=Nl(o);c.payload=n,l!=null&&(c.callback=l),n=Cl(e,c,o),n!==null&&($t(n,e,o),to(n,e,o))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var o=on(),c=Nl(o);c.tag=1,c.payload=n,l!=null&&(c.callback=l),n=Cl(e,c,o),n!==null&&($t(n,e,o),to(n,e,o))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=on(),o=Nl(l);o.tag=2,n!=null&&(o.callback=n),n=Cl(e,o,l),n!==null&&($t(n,e,l),to(n,e,l))}};function qp(e,n,l,o,c,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,d,y):n.prototype&&n.prototype.isPureReactComponent?!Qa(l,o)||!Qa(c,d):!0}function Gp(e,n,l,o){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,o),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,o),n.state!==e&&Ns.enqueueReplaceState(n,n.state,null)}function bi(e,n){var l=n;if("ref"in n){l={};for(var o in n)o!=="ref"&&(l[o]=n[o])}if(e=e.defaultProps){l===n&&(l=v({},l));for(var c in e)l[c]===void 0&&(l[c]=e[c])}return l}function Xp(e){wr(e)}function Zp(e){console.error(e)}function $p(e){wr(e)}function Zr(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(o){setTimeout(function(){throw o})}}function Qp(e,n,l){try{var o=e.onCaughtError;o(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(c){setTimeout(function(){throw c})}}function Cs(e,n,l){return l=Nl(l),l.tag=3,l.payload={element:null},l.callback=function(){Zr(e,n)},l}function Kp(e){return e=Nl(e),e.tag=3,e}function Ip(e,n,l,o){var c=l.type.getDerivedStateFromError;if(typeof c=="function"){var d=o.value;e.payload=function(){return c(d)},e.callback=function(){Qp(n,l,o)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Qp(n,l,o),typeof c!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})})}function Ab(e,n,l,o,c){if(l.flags|=32768,o!==null&&typeof o=="object"&&typeof o.then=="function"){if(n=l.alternate,n!==null&&$i(n,l,c,!0),l=tn.current,l!==null){switch(l.tag){case 31:case 13:return yn===null?lu():l.alternate===null&&nt===0&&(nt=3),l.flags&=-257,l.flags|=65536,l.lanes=c,o===Or?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([o]):n.add(o),Ws(e,o,c)),!1;case 22:return l.flags|=65536,o===Or?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([o])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([o]):l.add(o)),Ws(e,o,c)),!1}throw Error(r(435,l.tag))}return Ws(e,o,c),lu(),!1}if(Oe)return n=tn.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=c,o!==$c&&(e=Error(r(422),{cause:o}),Fa(hn(e,l)))):(o!==$c&&(n=Error(r(423),{cause:o}),Fa(hn(n,l))),e=e.current.alternate,e.flags|=65536,c&=-c,e.lanes|=c,o=hn(o,l),c=Cs(e.stateNode,o,c),ls(e,c),nt!==4&&(nt=2)),!1;var d=Error(r(520),{cause:o});if(d=hn(d,l),go===null?go=[d]:go.push(d),nt!==4&&(nt=2),n===null)return!0;o=hn(o,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=c&-c,l.lanes|=e,e=Cs(l.stateNode,o,e),ls(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Rl===null||!Rl.has(d))))return l.flags|=65536,c&=-c,l.lanes|=c,c=Kp(c),Ip(c,e,l,o),ls(l,c),!1}l=l.return}while(l!==null);return!1}var Ts=Error(r(461)),st=!1;function At(e,n,l,o){n.child=e===null?Ph(n,null,l,o):vi(n,e.child,l,o)}function Fp(e,n,l,o,c){l=l.render;var d=n.ref;if("ref"in o){var y={};for(var b in o)b!=="ref"&&(y[b]=o[b])}else y=o;return pi(n),o=cs(e,n,l,y,d,c),b=ss(),e!==null&&!st?(fs(e,n,c),Pn(e,n,c)):(Oe&&b&&Xc(n),n.flags|=1,At(e,n,o,c),n.child)}function Jp(e,n,l,o,c){if(e===null){var d=l.type;return typeof d=="function"&&!Vc(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,Wp(e,n,d,o,c)):(e=Nr(l.type,null,o,n,n.mode,c),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!ks(e,c)){var y=d.memoizedProps;if(l=l.compare,l=l!==null?l:Qa,l(y,o)&&e.ref===n.ref)return Pn(e,n,c)}return n.flags|=1,e=Qn(d,o),e.ref=n.ref,e.return=n,n.child=e}function Wp(e,n,l,o,c){if(e!==null){var d=e.memoizedProps;if(Qa(d,o)&&e.ref===n.ref)if(st=!1,n.pendingProps=o=d,ks(e,c))(e.flags&131072)!==0&&(st=!0);else return n.lanes=e.lanes,Pn(e,n,c)}return Ms(e,n,l,o,c)}function Pp(e,n,l,o){var c=o.children,d=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(d=d!==null?d.baseLanes|l:l,e!==null){for(o=n.child=e.child,c=0;o!==null;)c=c|o.lanes|o.childLanes,o=o.sibling;o=c&~d}else o=0,n.child=null;return e0(e,n,d,l,o)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&zr(n,d!==null?d.cachePool:null),d!==null?np(n,d):as(),lp(n);else return o=n.lanes=536870912,e0(e,n,d!==null?d.baseLanes|l:l,l,o)}else d!==null?(zr(n,d.cachePool),np(n,d),Ml(),n.memoizedState=null):(e!==null&&zr(n,null),as(),Ml());return At(e,n,c,l),n.child}function uo(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function e0(e,n,l,o,c){var d=Pc();return d=d===null?null:{parent:ut._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&zr(n,null),as(),lp(n),e!==null&&$i(e,n,o,!0),n.childLanes=c,null}function $r(e,n){return n=Kr({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function t0(e,n,l){return vi(n,e.child,null,l),e=$r(n,n.pendingProps),e.flags|=2,nn(n),n.memoizedState=null,e}function Nb(e,n,l){var o=n.pendingProps,c=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Oe){if(o.mode==="hidden")return e=$r(n,o),n.lanes=536870912,uo(null,e);if(rs(n),(e=Ke)?(e=hm(e,gn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:On,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},l=Uh(e),l.return=n,n.child=l,Et=n,Ke=null)):e=null,e===null)throw El(n);return n.lanes=536870912,null}return $r(n,o)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(rs(n),c)if(n.flags&256)n.flags&=-257,n=t0(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(r(558));else if(st||$i(e,n,l,!1),c=(l&e.childLanes)!==0,st||c){if(o=$e,o!==null&&(y=ir(o,l),y!==0&&y!==d.retryLane))throw d.retryLane=y,si(e,y),$t(o,e,y),Ts;lu(),n=t0(e,n,l)}else e=d.treeContext,Ke=vn(y.nextSibling),Et=n,Oe=!0,wl=null,gn=!1,e!==null&&Vh(n,e),n=$r(n,o),n.flags|=4096;return n}return e=Qn(e.child,{mode:o.mode,children:o.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Qr(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function Ms(e,n,l,o,c){return pi(n),l=cs(e,n,l,o,void 0,c),o=ss(),e!==null&&!st?(fs(e,n,c),Pn(e,n,c)):(Oe&&o&&Xc(n),n.flags|=1,At(e,n,l,c),n.child)}function n0(e,n,l,o,c,d){return pi(n),n.updateQueue=null,l=ap(n,o,l,c),ip(e),o=ss(),e!==null&&!st?(fs(e,n,d),Pn(e,n,d)):(Oe&&o&&Xc(n),n.flags|=1,At(e,n,l,d),n.child)}function l0(e,n,l,o,c){if(pi(n),n.stateNode===null){var d=qi,y=l.contextType;typeof y=="object"&&y!==null&&(d=_t(y)),d=new l(o,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=Ns,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=o,d.state=n.memoizedState,d.refs={},ts(n),y=l.contextType,d.context=typeof y=="object"&&y!==null?_t(y):qi,d.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(As(n,l,y,o),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&Ns.enqueueReplaceState(d,d.state,null),lo(n,o,d,c),no(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!0}else if(e===null){d=n.stateNode;var b=n.memoizedProps,R=bi(l,b);d.props=R;var Z=d.context,te=l.contextType;y=qi,typeof te=="object"&&te!==null&&(y=_t(te));var ie=l.getDerivedStateFromProps;te=typeof ie=="function"||typeof d.getSnapshotBeforeUpdate=="function",b=n.pendingProps!==b,te||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(b||Z!==y)&&Gp(n,d,o,y),Al=!1;var F=n.memoizedState;d.state=F,lo(n,o,d,c),no(),Z=n.memoizedState,b||F!==Z||Al?(typeof ie=="function"&&(As(n,l,ie,o),Z=n.memoizedState),(R=Al||qp(n,l,R,o,F,Z,y))?(te||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=o,n.memoizedState=Z),d.props=o,d.state=Z,d.context=y,o=R):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),o=!1)}else{d=n.stateNode,ns(e,n),y=n.memoizedProps,te=bi(l,y),d.props=te,ie=n.pendingProps,F=d.context,Z=l.contextType,R=qi,typeof Z=="object"&&Z!==null&&(R=_t(Z)),b=l.getDerivedStateFromProps,(Z=typeof b=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==ie||F!==R)&&Gp(n,d,o,R),Al=!1,F=n.memoizedState,d.state=F,lo(n,o,d,c),no();var J=n.memoizedState;y!==ie||F!==J||Al||e!==null&&e.dependencies!==null&&Tr(e.dependencies)?(typeof b=="function"&&(As(n,l,b,o),J=n.memoizedState),(te=Al||qp(n,l,te,o,F,J,R)||e!==null&&e.dependencies!==null&&Tr(e.dependencies))?(Z||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(o,J,R),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(o,J,R)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=1024),n.memoizedProps=o,n.memoizedState=J),d.props=o,d.state=J,d.context=R,o=te):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&F===e.memoizedState||(n.flags|=1024),o=!1)}return d=o,Qr(e,n),o=(n.flags&128)!==0,d||o?(d=n.stateNode,l=o&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&o?(n.child=vi(n,e.child,null,c),n.child=vi(n,null,l,c)):At(e,n,l,c),n.memoizedState=d.state,e=n.child):e=Pn(e,n,c),e}function i0(e,n,l,o){return di(),n.flags|=256,At(e,n,l,o),n.child}var zs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ds(e){return{baseLanes:e,cachePool:Qh()}}function Os(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=an),e}function a0(e,n,l){var o=n.pendingProps,c=!1,d=(n.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(at.current&2)!==0),y&&(c=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(Oe){if(c?Tl(n):Ml(),(e=Ke)?(e=hm(e,gn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:On,overflow:Rn}:null,retryLane:536870912,hydrationErrors:null},l=Uh(e),l.return=n,n.child=l,Et=n,Ke=null)):e=null,e===null)throw El(n);return mf(e)?n.lanes=32:n.lanes=536870912,null}var b=o.children;return o=o.fallback,c?(Ml(),c=n.mode,b=Kr({mode:"hidden",children:b},c),o=fi(o,c,l,null),b.return=n,o.return=n,b.sibling=o,n.child=b,o=n.child,o.memoizedState=Ds(l),o.childLanes=Os(e,y,l),n.memoizedState=zs,uo(null,o)):(Tl(n),Rs(n,b))}var R=e.memoizedState;if(R!==null&&(b=R.dehydrated,b!==null)){if(d)n.flags&256?(Tl(n),n.flags&=-257,n=js(e,n,l)):n.memoizedState!==null?(Ml(),n.child=e.child,n.flags|=128,n=null):(Ml(),b=o.fallback,c=n.mode,o=Kr({mode:"visible",children:o.children},c),b=fi(b,c,l,null),b.flags|=2,o.return=n,b.return=n,o.sibling=b,n.child=o,vi(n,e.child,null,l),o=n.child,o.memoizedState=Ds(l),o.childLanes=Os(e,y,l),n.memoizedState=zs,n=uo(null,o));else if(Tl(n),mf(b)){if(y=b.nextSibling&&b.nextSibling.dataset,y)var Z=y.dgst;y=Z,o=Error(r(419)),o.stack="",o.digest=y,Fa({value:o,source:null,stack:null}),n=js(e,n,l)}else if(st||$i(e,n,l,!1),y=(l&e.childLanes)!==0,st||y){if(y=$e,y!==null&&(o=ir(y,l),o!==0&&o!==R.retryLane))throw R.retryLane=o,si(e,o),$t(y,e,o),Ts;pf(b)||lu(),n=js(e,n,l)}else pf(b)?(n.flags|=192,n.child=e.child,n=null):(e=R.treeContext,Ke=vn(b.nextSibling),Et=n,Oe=!0,wl=null,gn=!1,e!==null&&Vh(n,e),n=Rs(n,o.children),n.flags|=4096);return n}return c?(Ml(),b=o.fallback,c=n.mode,R=e.child,Z=R.sibling,o=Qn(R,{mode:"hidden",children:o.children}),o.subtreeFlags=R.subtreeFlags&65011712,Z!==null?b=Qn(Z,b):(b=fi(b,c,l,null),b.flags|=2),b.return=n,o.return=n,o.sibling=b,n.child=o,uo(null,o),o=n.child,b=e.child.memoizedState,b===null?b=Ds(l):(c=b.cachePool,c!==null?(R=ut._currentValue,c=c.parent!==R?{parent:R,pool:R}:c):c=Qh(),b={baseLanes:b.baseLanes|l,cachePool:c}),o.memoizedState=b,o.childLanes=Os(e,y,l),n.memoizedState=zs,uo(e.child,o)):(Tl(n),l=e.child,e=l.sibling,l=Qn(l,{mode:"visible",children:o.children}),l.return=n,l.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=l,n.memoizedState=null,l)}function Rs(e,n){return n=Kr({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Kr(e,n){return e=en(22,e,null,n),e.lanes=0,e}function js(e,n,l){return vi(n,e.child,null,l),e=Rs(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function o0(e,n,l){e.lanes|=n;var o=e.alternate;o!==null&&(o.lanes|=n),Ic(e.return,n,l)}function Hs(e,n,l,o,c,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:o,tail:l,tailMode:c,treeForkCount:d}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=o,y.tail=l,y.tailMode=c,y.treeForkCount=d)}function r0(e,n,l){var o=n.pendingProps,c=o.revealOrder,d=o.tail;o=o.children;var y=at.current,b=(y&2)!==0;if(b?(y=y&1|2,n.flags|=128):y&=1,Q(at,y),At(e,n,o,l),o=Oe?Ia:0,!b&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&o0(e,l,n);else if(e.tag===19)o0(e,l,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(c){case"forwards":for(l=n.child,c=null;l!==null;)e=l.alternate,e!==null&&kr(e)===null&&(c=l),l=l.sibling;l=c,l===null?(c=n.child,n.child=null):(c=l.sibling,l.sibling=null),Hs(n,!1,c,l,d,o);break;case"backwards":case"unstable_legacy-backwards":for(l=null,c=n.child,n.child=null;c!==null;){if(e=c.alternate,e!==null&&kr(e)===null){n.child=c;break}e=c.sibling,c.sibling=l,l=c,c=e}Hs(n,!0,l,null,d,o);break;case"together":Hs(n,!1,null,null,void 0,o);break;default:n.memoizedState=null}return n.child}function Pn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),Ol|=n.lanes,(l&n.childLanes)===0)if(e!==null){if($i(e,n,l,!1),(l&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,l=Qn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Qn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function ks(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Tr(e)))}function Cb(e,n,l){switch(n.tag){case 3:be(n,n.stateNode.containerInfo),_l(n,ut,e.memoizedState.cache),di();break;case 27:case 5:Ae(n);break;case 4:be(n,n.stateNode.containerInfo);break;case 10:_l(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,rs(n),null;break;case 13:var o=n.memoizedState;if(o!==null)return o.dehydrated!==null?(Tl(n),n.flags|=128,null):(l&n.child.childLanes)!==0?a0(e,n,l):(Tl(n),e=Pn(e,n,l),e!==null?e.sibling:null);Tl(n);break;case 19:var c=(e.flags&128)!==0;if(o=(l&n.childLanes)!==0,o||($i(e,n,l,!1),o=(l&n.childLanes)!==0),c){if(o)return r0(e,n,l);n.flags|=128}if(c=n.memoizedState,c!==null&&(c.rendering=null,c.tail=null,c.lastEffect=null),Q(at,at.current),o)break;return null;case 22:return n.lanes=0,Pp(e,n,l,n.pendingProps);case 24:_l(n,ut,e.memoizedState.cache)}return Pn(e,n,l)}function u0(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)st=!0;else{if(!ks(e,l)&&(n.flags&128)===0)return st=!1,Cb(e,n,l);st=(e.flags&131072)!==0}else st=!1,Oe&&(n.flags&1048576)!==0&&Yh(n,Ia,n.index);switch(n.lanes=0,n.tag){case 16:e:{var o=n.pendingProps;if(e=gi(n.elementType),n.type=e,typeof e=="function")Vc(e)?(o=bi(e,o),n.tag=1,n=l0(null,n,e,o,l)):(n.tag=0,n=Ms(null,n,e,o,l));else{if(e!=null){var c=e.$$typeof;if(c===k){n.tag=11,n=Fp(null,n,e,o,l);break e}else if(c===ee){n.tag=14,n=Jp(null,n,e,o,l);break e}}throw n=C(e)||e,Error(r(306,n,""))}}return n;case 0:return Ms(e,n,n.type,n.pendingProps,l);case 1:return o=n.type,c=bi(o,n.pendingProps),l0(e,n,o,c,l);case 3:e:{if(be(n,n.stateNode.containerInfo),e===null)throw Error(r(387));o=n.pendingProps;var d=n.memoizedState;c=d.element,ns(e,n),lo(n,o,null,l);var y=n.memoizedState;if(o=y.cache,_l(n,ut,o),o!==d.cache&&Fc(n,[ut],l,!0),no(),o=y.element,d.isDehydrated)if(d={element:o,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=i0(e,n,o,l);break e}else if(o!==c){c=hn(Error(r(424)),n),Fa(c),n=i0(e,n,o,l);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ke=vn(e.firstChild),Et=n,Oe=!0,wl=null,gn=!0,l=Ph(n,null,o,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(di(),o===c){n=Pn(e,n,l);break e}At(e,n,o,l)}n=n.child}return n;case 26:return Qr(e,n),e===null?(l=xm(n.type,null,n.pendingProps,null))?n.memoizedState=l:Oe||(l=n.type,e=n.pendingProps,o=su(ce.current).createElement(l),o[mt]=n,o[wt]=e,Nt(o,l,e),rt(o),n.stateNode=o):n.memoizedState=xm(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return Ae(n),e===null&&Oe&&(o=n.stateNode=gm(n.type,n.pendingProps,ce.current),Et=n,gn=!0,c=Ke,Ll(n.type)?(gf=c,Ke=vn(o.firstChild)):Ke=c),At(e,n,n.pendingProps.children,l),Qr(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Oe&&((c=o=Ke)&&(o=lS(o,n.type,n.pendingProps,gn),o!==null?(n.stateNode=o,Et=n,Ke=vn(o.firstChild),gn=!1,c=!0):c=!1),c||El(n)),Ae(n),c=n.type,d=n.pendingProps,y=e!==null?e.memoizedProps:null,o=d.children,ff(c,d)?o=null:y!==null&&ff(c,y)&&(n.flags|=32),n.memoizedState!==null&&(c=cs(e,n,vb,null,null,l),_o._currentValue=c),Qr(e,n),At(e,n,o,l),n.child;case 6:return e===null&&Oe&&((e=l=Ke)&&(l=iS(l,n.pendingProps,gn),l!==null?(n.stateNode=l,Et=n,Ke=null,e=!0):e=!1),e||El(n)),null;case 13:return a0(e,n,l);case 4:return be(n,n.stateNode.containerInfo),o=n.pendingProps,e===null?n.child=vi(n,null,o,l):At(e,n,o,l),n.child;case 11:return Fp(e,n,n.type,n.pendingProps,l);case 7:return At(e,n,n.pendingProps,l),n.child;case 8:return At(e,n,n.pendingProps.children,l),n.child;case 12:return At(e,n,n.pendingProps.children,l),n.child;case 10:return o=n.pendingProps,_l(n,n.type,o.value),At(e,n,o.children,l),n.child;case 9:return c=n.type._context,o=n.pendingProps.children,pi(n),c=_t(c),o=o(c),n.flags|=1,At(e,n,o,l),n.child;case 14:return Jp(e,n,n.type,n.pendingProps,l);case 15:return Wp(e,n,n.type,n.pendingProps,l);case 19:return r0(e,n,l);case 31:return Nb(e,n,l);case 22:return Pp(e,n,l,n.pendingProps);case 24:return pi(n),o=_t(ut),e===null?(c=Pc(),c===null&&(c=$e,d=Jc(),c.pooledCache=d,d.refCount++,d!==null&&(c.pooledCacheLanes|=l),c=d),n.memoizedState={parent:o,cache:c},ts(n),_l(n,ut,c)):((e.lanes&l)!==0&&(ns(e,n),lo(n,null,null,l),no()),c=e.memoizedState,d=n.memoizedState,c.parent!==o?(c={parent:o,cache:o},n.memoizedState=c,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=c),_l(n,ut,o)):(o=d.cache,_l(n,ut,o),o!==c.cache&&Fc(n,[ut],l,!0))),At(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(r(156,n.tag))}function el(e){e.flags|=4}function Ls(e,n,l,o,c){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(c&335544128)===c)if(e.stateNode.complete)e.flags|=8192;else if(H0())e.flags|=8192;else throw yi=Or,es}else e.flags&=-16777217}function c0(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!_m(n))if(H0())e.flags|=8192;else throw yi=Or,es}function Ir(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?tr():536870912,e.lanes|=n,ia|=n)}function co(e,n){if(!Oe)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var o=null;l!==null;)l.alternate!==null&&(o=l),l=l.sibling;o===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function Ie(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,o=0;if(n)for(var c=e.child;c!==null;)l|=c.lanes|c.childLanes,o|=c.subtreeFlags&65011712,o|=c.flags&65011712,c.return=e,c=c.sibling;else for(c=e.child;c!==null;)l|=c.lanes|c.childLanes,o|=c.subtreeFlags,o|=c.flags,c.return=e,c=c.sibling;return e.subtreeFlags|=o,e.childLanes=l,n}function Tb(e,n,l){var o=n.pendingProps;switch(Zc(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ie(n),null;case 1:return Ie(n),null;case 3:return l=n.stateNode,o=null,e!==null&&(o=e.memoizedState.cache),n.memoizedState.cache!==o&&(n.flags|=2048),Fn(ut),de(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Zi(n)?el(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,Qc())),Ie(n),null;case 26:var c=n.type,d=n.memoizedState;return e===null?(el(n),d!==null?(Ie(n),c0(n,d)):(Ie(n),Ls(n,c,null,o,l))):d?d!==e.memoizedState?(el(n),Ie(n),c0(n,d)):(Ie(n),n.flags&=-16777217):(e=e.memoizedProps,e!==o&&el(n),Ie(n),Ls(n,c,e,o,l)),null;case 27:if(He(n),l=ce.current,c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&el(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ie(n),null}e=W.current,Zi(n)?qh(n):(e=gm(c,o,l),n.stateNode=e,el(n))}return Ie(n),null;case 5:if(He(n),c=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==o&&el(n);else{if(!o){if(n.stateNode===null)throw Error(r(166));return Ie(n),null}if(d=W.current,Zi(n))qh(n);else{var y=su(ce.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;default:switch(c){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",c);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",c);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof o.is=="string"?y.createElement("select",{is:o.is}):y.createElement("select"),o.multiple?d.multiple=!0:o.size&&(d.size=o.size);break;default:d=typeof o.is=="string"?y.createElement(c,{is:o.is}):y.createElement(c)}}d[mt]=n,d[wt]=o;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=d;e:switch(Nt(d,c,o),c){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}o&&el(n)}}return Ie(n),Ls(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==o&&el(n);else{if(typeof o!="string"&&n.stateNode===null)throw Error(r(166));if(e=ce.current,Zi(n)){if(e=n.stateNode,l=n.memoizedProps,o=null,c=Et,c!==null)switch(c.tag){case 27:case 5:o=c.memoizedProps}e[mt]=n,e=!!(e.nodeValue===l||o!==null&&o.suppressHydrationWarning===!0||am(e.nodeValue,l)),e||El(n,!0)}else e=su(e).createTextNode(o),e[mt]=n,n.stateNode=e}return Ie(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(o=Zi(n),l!==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[mt]=n}else di(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),e=!1}else l=Qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(nn(n),n):(nn(n),null);if((n.flags&128)!==0)throw Error(r(558))}return Ie(n),null;case 13:if(o=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(c=Zi(n),o!==null&&o.dehydrated!==null){if(e===null){if(!c)throw Error(r(318));if(c=n.memoizedState,c=c!==null?c.dehydrated:null,!c)throw Error(r(317));c[mt]=n}else di(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;Ie(n),c=!1}else c=Qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=c),c=!0;if(!c)return n.flags&256?(nn(n),n):(nn(n),null)}return nn(n),(n.flags&128)!==0?(n.lanes=l,n):(l=o!==null,e=e!==null&&e.memoizedState!==null,l&&(o=n.child,c=null,o.alternate!==null&&o.alternate.memoizedState!==null&&o.alternate.memoizedState.cachePool!==null&&(c=o.alternate.memoizedState.cachePool.pool),d=null,o.memoizedState!==null&&o.memoizedState.cachePool!==null&&(d=o.memoizedState.cachePool.pool),d!==c&&(o.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Ir(n,n.updateQueue),Ie(n),null);case 4:return de(),e===null&&of(n.stateNode.containerInfo),Ie(n),null;case 10:return Fn(n.type),Ie(n),null;case 19:if(H(at),o=n.memoizedState,o===null)return Ie(n),null;if(c=(n.flags&128)!==0,d=o.rendering,d===null)if(c)co(o,!1);else{if(nt!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=kr(e),d!==null){for(n.flags|=128,co(o,!1),e=d.updateQueue,n.updateQueue=e,Ir(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Lh(l,e),l=l.sibling;return Q(at,at.current&1|2),Oe&&Kn(n,o.treeForkCount),n.child}e=e.sibling}o.tail!==null&&Fe()>eu&&(n.flags|=128,c=!0,co(o,!1),n.lanes=4194304)}else{if(!c)if(e=kr(d),e!==null){if(n.flags|=128,c=!0,e=e.updateQueue,n.updateQueue=e,Ir(n,e),co(o,!0),o.tail===null&&o.tailMode==="hidden"&&!d.alternate&&!Oe)return Ie(n),null}else 2*Fe()-o.renderingStartTime>eu&&l!==536870912&&(n.flags|=128,c=!0,co(o,!1),n.lanes=4194304);o.isBackwards?(d.sibling=n.child,n.child=d):(e=o.last,e!==null?e.sibling=d:n.child=d,o.last=d)}return o.tail!==null?(e=o.tail,o.rendering=e,o.tail=e.sibling,o.renderingStartTime=Fe(),e.sibling=null,l=at.current,Q(at,c?l&1|2:l&1),Oe&&Kn(n,o.treeForkCount),e):(Ie(n),null);case 22:case 23:return nn(n),os(),o=n.memoizedState!==null,e!==null?e.memoizedState!==null!==o&&(n.flags|=8192):o&&(n.flags|=8192),o?(l&536870912)!==0&&(n.flags&128)===0&&(Ie(n),n.subtreeFlags&6&&(n.flags|=8192)):Ie(n),l=n.updateQueue,l!==null&&Ir(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),o=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(o=n.memoizedState.cachePool.pool),o!==l&&(n.flags|=2048),e!==null&&H(mi),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Fn(ut),Ie(n),null;case 25:return null;case 30:return null}throw Error(r(156,n.tag))}function Mb(e,n){switch(Zc(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Fn(ut),de(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return He(n),null;case 31:if(n.memoizedState!==null){if(nn(n),n.alternate===null)throw Error(r(340));di()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(nn(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(r(340));di()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(at),null;case 4:return de(),null;case 10:return Fn(n.type),null;case 22:case 23:return nn(n),os(),e!==null&&H(mi),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Fn(ut),null;case 25:return null;default:return null}}function s0(e,n){switch(Zc(n),n.tag){case 3:Fn(ut),de();break;case 26:case 27:case 5:He(n);break;case 4:de();break;case 31:n.memoizedState!==null&&nn(n);break;case 13:nn(n);break;case 19:H(at);break;case 10:Fn(n.type);break;case 22:case 23:nn(n),os(),e!==null&&H(mi);break;case 24:Fn(ut)}}function so(e,n){try{var l=n.updateQueue,o=l!==null?l.lastEffect:null;if(o!==null){var c=o.next;l=c;do{if((l.tag&e)===e){o=void 0;var d=l.create,y=l.inst;o=d(),y.destroy=o}l=l.next}while(l!==c)}}catch(b){qe(n,n.return,b)}}function zl(e,n,l){try{var o=n.updateQueue,c=o!==null?o.lastEffect:null;if(c!==null){var d=c.next;o=d;do{if((o.tag&e)===e){var y=o.inst,b=y.destroy;if(b!==void 0){y.destroy=void 0,c=n;var R=l,Z=b;try{Z()}catch(te){qe(c,R,te)}}}o=o.next}while(o!==d)}}catch(te){qe(n,n.return,te)}}function f0(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{tp(n,l)}catch(o){qe(e,e.return,o)}}}function d0(e,n,l){l.props=bi(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(o){qe(e,n,o)}}function fo(e,n){try{var l=e.ref;if(l!==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 l=="function"?e.refCleanup=l(o):l.current=o}}catch(c){qe(e,n,c)}}function jn(e,n){var l=e.ref,o=e.refCleanup;if(l!==null)if(typeof o=="function")try{o()}catch(c){qe(e,n,c)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(c){qe(e,n,c)}else l.current=null}function h0(e){var n=e.type,l=e.memoizedProps,o=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&o.focus();break e;case"img":l.src?o.src=l.src:l.srcSet&&(o.srcset=l.srcSet)}}catch(c){qe(e,e.return,c)}}function Us(e,n,l){try{var o=e.stateNode;Jb(o,e.type,l,n),o[wt]=n}catch(c){qe(e,e.return,c)}}function p0(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ll(e.type)||e.tag===4}function Bs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||p0(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&&Ll(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 Ys(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Zn));else if(o!==4&&(o===27&&Ll(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(Ys(e,n,l),e=e.sibling;e!==null;)Ys(e,n,l),e=e.sibling}function Fr(e,n,l){var o=e.tag;if(o===5||o===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(o!==4&&(o===27&&Ll(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Fr(e,n,l),e=e.sibling;e!==null;)Fr(e,n,l),e=e.sibling}function m0(e){var n=e.stateNode,l=e.memoizedProps;try{for(var o=e.type,c=n.attributes;c.length;)n.removeAttributeNode(c[0]);Nt(n,o,l),n[mt]=e,n[wt]=l}catch(d){qe(e,e.return,d)}}var tl=!1,ft=!1,Vs=!1,g0=typeof WeakSet=="function"?WeakSet:Set,St=null;function zb(e,n){if(e=e.containerInfo,cf=yu,e=Th(e),jc(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var o=l.getSelection&&l.getSelection();if(o&&o.rangeCount!==0){l=o.anchorNode;var c=o.anchorOffset,d=o.focusNode;o=o.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var y=0,b=-1,R=-1,Z=0,te=0,ie=e,F=null;t:for(;;){for(var J;ie!==l||c!==0&&ie.nodeType!==3||(b=y+c),ie!==d||o!==0&&ie.nodeType!==3||(R=y+o),ie.nodeType===3&&(y+=ie.nodeValue.length),(J=ie.firstChild)!==null;)F=ie,ie=J;for(;;){if(ie===e)break t;if(F===l&&++Z===c&&(b=y),F===d&&++te===o&&(R=y),(J=ie.nextSibling)!==null)break;ie=F,F=ie.parentNode}ie=J}l=b===-1||R===-1?null:{start:b,end:R}}else l=null}l=l||{start:0,end:0}}else l=null;for(sf={focusedElem:e,selectionRange:l},yu=!1,St=n;St!==null;)if(n=St,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,St=e;else for(;St!==null;){switch(n=St,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)c=e[l],c.ref.impl=c.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,c=d.memoizedProps,d=d.memoizedState,o=l.stateNode;try{var he=bi(l.type,c);e=o.getSnapshotBeforeUpdate(he,d),o.__reactInternalSnapshotBeforeUpdate=e}catch(Se){qe(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)hf(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":hf(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,St=e;break}St=n.return}}function y0(e,n,l){var o=l.flags;switch(l.tag){case 0:case 11:case 15:ll(e,l),o&4&&so(5,l);break;case 1:if(ll(e,l),o&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(y){qe(l,l.return,y)}else{var c=bi(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(c,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){qe(l,l.return,y)}}o&64&&f0(l),o&512&&fo(l,l.return);break;case 3:if(ll(e,l),o&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{tp(e,n)}catch(y){qe(l,l.return,y)}}break;case 27:n===null&&o&4&&m0(l);case 26:case 5:ll(e,l),n===null&&o&4&&h0(l),o&512&&fo(l,l.return);break;case 12:ll(e,l);break;case 31:ll(e,l),o&4&&b0(e,l);break;case 13:ll(e,l),o&4&&S0(e,l),o&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Bb.bind(null,l),aS(e,l))));break;case 22:if(o=l.memoizedState!==null||tl,!o){n=n!==null&&n.memoizedState!==null||ft,c=tl;var d=ft;tl=o,(ft=n)&&!d?il(e,l,(l.subtreeFlags&8772)!==0):ll(e,l),tl=c,ft=d}break;case 30:break;default:ll(e,l)}}function v0(e){var n=e.alternate;n!==null&&(e.alternate=null,v0(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Ua(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 We=null,qt=!1;function nl(e,n,l){for(l=l.child;l!==null;)x0(e,n,l),l=l.sibling}function x0(e,n,l){if(it&&typeof it.onCommitFiberUnmount=="function")try{it.onCommitFiberUnmount(Wt,l)}catch{}switch(l.tag){case 26:ft||jn(l,n),nl(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:ft||jn(l,n);var o=We,c=qt;Ll(l.type)&&(We=l.stateNode,qt=!1),nl(e,n,l),So(l.stateNode),We=o,qt=c;break;case 5:ft||jn(l,n);case 6:if(o=We,c=qt,We=null,nl(e,n,l),We=o,qt=c,We!==null)if(qt)try{(We.nodeType===9?We.body:We.nodeName==="HTML"?We.ownerDocument.body:We).removeChild(l.stateNode)}catch(d){qe(l,n,d)}else try{We.removeChild(l.stateNode)}catch(d){qe(l,n,d)}break;case 18:We!==null&&(qt?(e=We,fm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),da(e)):fm(We,l.stateNode));break;case 4:o=We,c=qt,We=l.stateNode.containerInfo,qt=!0,nl(e,n,l),We=o,qt=c;break;case 0:case 11:case 14:case 15:zl(2,l,n),ft||zl(4,l,n),nl(e,n,l);break;case 1:ft||(jn(l,n),o=l.stateNode,typeof o.componentWillUnmount=="function"&&d0(l,n,o)),nl(e,n,l);break;case 21:nl(e,n,l);break;case 22:ft=(o=ft)||l.memoizedState!==null,nl(e,n,l),ft=o;break;default:nl(e,n,l)}}function b0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{da(e)}catch(l){qe(n,n.return,l)}}}function S0(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{da(e)}catch(l){qe(n,n.return,l)}}function Db(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new g0),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new g0),n;default:throw Error(r(435,e.tag))}}function Jr(e,n){var l=Db(e);n.forEach(function(o){if(!l.has(o)){l.add(o);var c=Yb.bind(null,e,o);o.then(c,c)}})}function Gt(e,n){var l=n.deletions;if(l!==null)for(var o=0;o<l.length;o++){var c=l[o],d=e,y=n,b=y;e:for(;b!==null;){switch(b.tag){case 27:if(Ll(b.type)){We=b.stateNode,qt=!1;break e}break;case 5:We=b.stateNode,qt=!1;break e;case 3:case 4:We=b.stateNode.containerInfo,qt=!0;break e}b=b.return}if(We===null)throw Error(r(160));x0(d,y,c),We=null,qt=!1,d=c.alternate,d!==null&&(d.return=null),c.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)w0(n,e),n=n.sibling}var _n=null;function w0(e,n){var l=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Gt(n,e),Xt(e),o&4&&(zl(3,e,e.return),so(3,e),zl(5,e,e.return));break;case 1:Gt(n,e),Xt(e),o&512&&(ft||l===null||jn(l,l.return)),o&64&&tl&&(e=e.updateQueue,e!==null&&(o=e.callbacks,o!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?o:l.concat(o))));break;case 26:var c=_n;if(Gt(n,e),Xt(e),o&512&&(ft||l===null||jn(l,l.return)),o&4){var d=l!==null?l.memoizedState:null;if(o=e.memoizedState,l===null)if(o===null)if(e.stateNode===null){e:{o=e.type,l=e.memoizedProps,c=c.ownerDocument||c;t:switch(o){case"title":d=c.getElementsByTagName("title")[0],(!d||d[ai]||d[mt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=c.createElement(o),c.head.insertBefore(d,c.querySelector("head > title"))),Nt(d,o,l),d[mt]=e,rt(d),o=d;break e;case"link":var y=wm("link","href",c).get(o+(l.href||""));if(y){for(var b=0;b<y.length;b++)if(d=y[b],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(b,1);break t}}d=c.createElement(o),Nt(d,o,l),c.head.appendChild(d);break;case"meta":if(y=wm("meta","content",c).get(o+(l.content||""))){for(b=0;b<y.length;b++)if(d=y[b],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(b,1);break t}}d=c.createElement(o),Nt(d,o,l),c.head.appendChild(d);break;default:throw Error(r(468,o))}d[mt]=e,rt(d),o=d}e.stateNode=o}else Em(c,e.type,e.stateNode);else e.stateNode=Sm(c,o,e.memoizedProps);else d!==o?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,o===null?Em(c,e.type,e.stateNode):Sm(c,o,e.memoizedProps)):o===null&&e.stateNode!==null&&Us(e,e.memoizedProps,l.memoizedProps)}break;case 27:Gt(n,e),Xt(e),o&512&&(ft||l===null||jn(l,l.return)),l!==null&&o&4&&Us(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Gt(n,e),Xt(e),o&512&&(ft||l===null||jn(l,l.return)),e.flags&32){c=e.stateNode;try{Hi(c,"")}catch(he){qe(e,e.return,he)}}o&4&&e.stateNode!=null&&(c=e.memoizedProps,Us(e,c,l!==null?l.memoizedProps:c)),o&1024&&(Vs=!0);break;case 6:if(Gt(n,e),Xt(e),o&4){if(e.stateNode===null)throw Error(r(162));o=e.memoizedProps,l=e.stateNode;try{l.nodeValue=o}catch(he){qe(e,e.return,he)}}break;case 3:if(hu=null,c=_n,_n=fu(n.containerInfo),Gt(n,e),_n=c,Xt(e),o&4&&l!==null&&l.memoizedState.isDehydrated)try{da(n.containerInfo)}catch(he){qe(e,e.return,he)}Vs&&(Vs=!1,E0(e));break;case 4:o=_n,_n=fu(e.stateNode.containerInfo),Gt(n,e),Xt(e),_n=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,Jr(e,o)));break;case 13:Gt(n,e),Xt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Pr=Fe()),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Jr(e,o)));break;case 22:c=e.memoizedState!==null;var R=l!==null&&l.memoizedState!==null,Z=tl,te=ft;if(tl=Z||c,ft=te||R,Gt(n,e),ft=te,tl=Z,Xt(e),o&8192)e:for(n=e.stateNode,n._visibility=c?n._visibility&-2:n._visibility|1,c&&(l===null||R||tl||ft||Si(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){R=l=n;try{if(d=R.stateNode,c)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{b=R.stateNode;var ie=R.memoizedProps.style,F=ie!=null&&ie.hasOwnProperty("display")?ie.display:null;b.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(he){qe(R,R.return,he)}}}else if(n.tag===6){if(l===null){R=n;try{R.stateNode.nodeValue=c?"":R.memoizedProps}catch(he){qe(R,R.return,he)}}}else if(n.tag===18){if(l===null){R=n;try{var J=R.stateNode;c?dm(J,!0):dm(R.stateNode,!1)}catch(he){qe(R,R.return,he)}}}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;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}o&4&&(o=e.updateQueue,o!==null&&(l=o.retryQueue,l!==null&&(o.retryQueue=null,Jr(e,l))));break;case 19:Gt(n,e),Xt(e),o&4&&(o=e.updateQueue,o!==null&&(e.updateQueue=null,Jr(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 l,o=e.return;o!==null;){if(p0(o)){l=o;break}o=o.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var c=l.stateNode,d=Bs(e);Fr(e,d,c);break;case 5:var y=l.stateNode;l.flags&32&&(Hi(y,""),l.flags&=-33);var b=Bs(e);Fr(e,b,y);break;case 3:case 4:var R=l.stateNode.containerInfo,Z=Bs(e);Ys(e,Z,R);break;default:throw Error(r(161))}}catch(te){qe(e,e.return,te)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function E0(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;E0(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function ll(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)y0(e,n.alternate,n),n=n.sibling}function Si(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:zl(4,n,n.return),Si(n);break;case 1:jn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&d0(n,n.return,l),Si(n);break;case 27:So(n.stateNode);case 26:case 5:jn(n,n.return),Si(n);break;case 22:n.memoizedState===null&&Si(n);break;case 30:Si(n);break;default:Si(n)}e=e.sibling}}function il(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var o=n.alternate,c=e,d=n,y=d.flags;switch(d.tag){case 0:case 11:case 15:il(c,d,l),so(4,d);break;case 1:if(il(c,d,l),o=d,c=o.stateNode,typeof c.componentDidMount=="function")try{c.componentDidMount()}catch(Z){qe(o,o.return,Z)}if(o=d,c=o.updateQueue,c!==null){var b=o.stateNode;try{var R=c.shared.hiddenCallbacks;if(R!==null)for(c.shared.hiddenCallbacks=null,c=0;c<R.length;c++)ep(R[c],b)}catch(Z){qe(o,o.return,Z)}}l&&y&64&&f0(d),fo(d,d.return);break;case 27:m0(d);case 26:case 5:il(c,d,l),l&&o===null&&y&4&&h0(d),fo(d,d.return);break;case 12:il(c,d,l);break;case 31:il(c,d,l),l&&y&4&&b0(c,d);break;case 13:il(c,d,l),l&&y&4&&S0(c,d);break;case 22:d.memoizedState===null&&il(c,d,l),fo(d,d.return);break;case 30:break;default:il(c,d,l)}n=n.sibling}}function qs(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&Ja(l))}function Gs(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ja(e))}function An(e,n,l,o){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)_0(e,n,l,o),n=n.sibling}function _0(e,n,l,o){var c=n.flags;switch(n.tag){case 0:case 11:case 15:An(e,n,l,o),c&2048&&so(9,n);break;case 1:An(e,n,l,o);break;case 3:An(e,n,l,o),c&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&Ja(e)));break;case 12:if(c&2048){An(e,n,l,o),e=n.stateNode;try{var d=n.memoizedProps,y=d.id,b=d.onPostCommit;typeof b=="function"&&b(y,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(R){qe(n,n.return,R)}}else An(e,n,l,o);break;case 31:An(e,n,l,o);break;case 13:An(e,n,l,o);break;case 23:break;case 22:d=n.stateNode,y=n.alternate,n.memoizedState!==null?d._visibility&2?An(e,n,l,o):ho(e,n):d._visibility&2?An(e,n,l,o):(d._visibility|=2,ta(e,n,l,o,(n.subtreeFlags&10256)!==0||!1)),c&2048&&qs(y,n);break;case 24:An(e,n,l,o),c&2048&&Gs(n.alternate,n);break;default:An(e,n,l,o)}}function ta(e,n,l,o,c){for(c=c&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,y=n,b=l,R=o,Z=y.flags;switch(y.tag){case 0:case 11:case 15:ta(d,y,b,R,c),so(8,y);break;case 23:break;case 22:var te=y.stateNode;y.memoizedState!==null?te._visibility&2?ta(d,y,b,R,c):ho(d,y):(te._visibility|=2,ta(d,y,b,R,c)),c&&Z&2048&&qs(y.alternate,y);break;case 24:ta(d,y,b,R,c),c&&Z&2048&&Gs(y.alternate,y);break;default:ta(d,y,b,R,c)}n=n.sibling}}function ho(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,o=n,c=o.flags;switch(o.tag){case 22:ho(l,o),c&2048&&qs(o.alternate,o);break;case 24:ho(l,o),c&2048&&Gs(o.alternate,o);break;default:ho(l,o)}n=n.sibling}}var po=8192;function na(e,n,l){if(e.subtreeFlags&po)for(e=e.child;e!==null;)A0(e,n,l),e=e.sibling}function A0(e,n,l){switch(e.tag){case 26:na(e,n,l),e.flags&po&&e.memoizedState!==null&&yS(l,_n,e.memoizedState,e.memoizedProps);break;case 5:na(e,n,l);break;case 3:case 4:var o=_n;_n=fu(e.stateNode.containerInfo),na(e,n,l),_n=o;break;case 22:e.memoizedState===null&&(o=e.alternate,o!==null&&o.memoizedState!==null?(o=po,po=16777216,na(e,n,l),po=o):na(e,n,l));break;default:na(e,n,l)}}function N0(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 mo(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];St=o,T0(o,e)}N0(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)C0(e),e=e.sibling}function C0(e){switch(e.tag){case 0:case 11:case 15:mo(e),e.flags&2048&&zl(9,e,e.return);break;case 3:mo(e);break;case 12:mo(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Wr(e)):mo(e);break;default:mo(e)}}function Wr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var o=n[l];St=o,T0(o,e)}N0(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:zl(8,n,n.return),Wr(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Wr(n));break;default:Wr(n)}e=e.sibling}}function T0(e,n){for(;St!==null;){var l=St;switch(l.tag){case 0:case 11:case 15:zl(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var o=l.memoizedState.cachePool.pool;o!=null&&o.refCount++}break;case 24:Ja(l.memoizedState.cache)}if(o=l.child,o!==null)o.return=l,St=o;else e:for(l=e;St!==null;){o=St;var c=o.sibling,d=o.return;if(v0(o),o===l){St=null;break e}if(c!==null){c.return=d,St=c;break e}St=d}}}var Ob={getCacheForType:function(e){var n=_t(ut),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return _t(ut).controller.signal}},Rb=typeof WeakMap=="function"?WeakMap:Map,Ye=0,$e=null,Te=null,ze=0,Ve=0,ln=null,Dl=!1,la=!1,Xs=!1,al=0,nt=0,Ol=0,wi=0,Zs=0,an=0,ia=0,go=null,Zt=null,$s=!1,Pr=0,M0=0,eu=1/0,tu=null,Rl=null,gt=0,jl=null,aa=null,ol=0,Qs=0,Ks=null,z0=null,yo=0,Is=null;function on(){return(Ye&2)!==0&&ze!==0?ze&-ze:A.T!==null?tf():ar()}function D0(){if(an===0)if((ze&536870912)===0||Oe){var e=gl;gl<<=1,(gl&3932160)===0&&(gl=262144),an=e}else an=536870912;return e=tn.current,e!==null&&(e.flags|=32),an}function $t(e,n,l){(e===$e&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)&&(oa(e,0),Hl(e,ze,an,!1)),ii(e,l),((Ye&2)===0||e!==$e)&&(e===$e&&((Ye&2)===0&&(wi|=l),nt===4&&Hl(e,ze,an,!1)),Hn(e))}function O0(e,n,l){if((Ye&6)!==0)throw Error(r(327));var o=!l&&(n&127)===0&&(n&e.expiredLanes)===0||li(e,n),c=o?kb(e,n):Js(e,n,!0),d=o;do{if(c===0){la&&!o&&Hl(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!jb(l)){c=Js(e,n,!1),d=!1;continue}if(c===2){if(d=n,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var b=e;c=go;var R=b.current.memoizedState.isDehydrated;if(R&&(oa(b,y).flags|=256),y=Js(b,y,!1),y!==2){if(Xs&&!R){b.errorRecoveryDisabledLanes|=d,wi|=d,c=4;break e}d=Zt,Zt=c,d!==null&&(Zt===null?Zt=d:Zt.push.apply(Zt,d))}c=y}if(d=!1,c!==2)continue}}if(c===1){oa(e,0),Hl(e,n,0,!0);break}e:{switch(o=e,d=c,d){case 0:case 1:throw Error(r(345));case 4:if((n&4194048)!==n)break;case 6:Hl(o,n,an,!Dl);break e;case 2:Zt=null;break;case 3:case 5:break;default:throw Error(r(329))}if((n&62914560)===n&&(c=Pr+300-Fe(),10<c)){if(Hl(o,n,an,!Dl),Ri(o,0,!0)!==0)break e;ol=n,o.timeoutHandle=cm(R0.bind(null,o,l,Zt,tu,$s,n,an,wi,ia,Dl,d,"Throttled",-0,0),c);break e}R0(o,l,Zt,tu,$s,n,an,wi,ia,Dl,d,null,-0,0)}}break}while(!0);Hn(e)}function R0(e,n,l,o,c,d,y,b,R,Z,te,ie,F,J){if(e.timeoutHandle=-1,ie=n.subtreeFlags,ie&8192||(ie&16785408)===16785408){ie={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},A0(n,d,ie);var he=(d&62914560)===d?Pr-Fe():(d&4194048)===d?M0-Fe():0;if(he=vS(ie,he),he!==null){ol=d,e.cancelPendingCommit=he(V0.bind(null,e,n,d,l,o,c,y,b,R,te,ie,null,F,J)),Hl(e,d,y,!Z);return}}V0(e,n,d,l,o,c,y,b,R)}function jb(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var o=0;o<l.length;o++){var c=l[o],d=c.getSnapshot;c=c.value;try{if(!Pt(d(),c))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;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 Hl(e,n,l,o){n&=~Zs,n&=~wi,e.suspendedLanes|=n,e.pingedLanes&=~n,o&&(e.warmLanes|=n),o=e.expirationTimes;for(var c=n;0<c;){var d=31-Je(c),y=1<<d;o[d]=-1,c&=~y}l!==0&&nr(e,l,n)}function nu(){return(Ye&6)===0?(vo(0),!1):!0}function Fs(){if(Te!==null){if(Ve===0)var e=Te.return;else e=Te,In=hi=null,ds(e),Fi=null,Pa=0,e=Te;for(;e!==null;)s0(e.alternate,e),e=e.return;Te=null}}function oa(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,eS(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),ol=0,Fs(),$e=e,Te=l=Qn(e.current,null),ze=n,Ve=0,ln=null,Dl=!1,la=li(e,n),Xs=!1,ia=an=Zs=wi=Ol=nt=0,Zt=go=null,$s=!1,(n&8)!==0&&(n|=n&32);var o=e.entangledLanes;if(o!==0)for(e=e.entanglements,o&=n;0<o;){var c=31-Je(o),d=1<<c;n|=e[c],o&=~d}return al=n,Er(),l}function j0(e,n){Ee=null,A.H=ro,n===Ii||n===Dr?(n=Fh(),Ve=3):n===es?(n=Fh(),Ve=4):Ve=n===Ts?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,ln=n,Te===null&&(nt=1,Zr(e,hn(n,e.current)))}function H0(){var e=tn.current;return e===null?!0:(ze&4194048)===ze?yn===null:(ze&62914560)===ze||(ze&536870912)!==0?e===yn:!1}function k0(){var e=A.H;return A.H=ro,e===null?ro:e}function L0(){var e=A.A;return A.A=Ob,e}function lu(){nt=4,Dl||(ze&4194048)!==ze&&tn.current!==null||(la=!0),(Ol&134217727)===0&&(wi&134217727)===0||$e===null||Hl($e,ze,an,!1)}function Js(e,n,l){var o=Ye;Ye|=2;var c=k0(),d=L0();($e!==e||ze!==n)&&(tu=null,oa(e,n)),n=!1;var y=nt;e:do try{if(Ve!==0&&Te!==null){var b=Te,R=ln;switch(Ve){case 8:Fs(),y=6;break e;case 3:case 2:case 9:case 6:tn.current===null&&(n=!0);var Z=Ve;if(Ve=0,ln=null,ra(e,b,R,Z),l&&la){y=0;break e}break;default:Z=Ve,Ve=0,ln=null,ra(e,b,R,Z)}}Hb(),y=nt;break}catch(te){j0(e,te)}while(!0);return n&&e.shellSuspendCounter++,In=hi=null,Ye=o,A.H=c,A.A=d,Te===null&&($e=null,ze=0,Er()),y}function Hb(){for(;Te!==null;)U0(Te)}function kb(e,n){var l=Ye;Ye|=2;var o=k0(),c=L0();$e!==e||ze!==n?(tu=null,eu=Fe()+500,oa(e,n)):la=li(e,n);e:do try{if(Ve!==0&&Te!==null){n=Te;var d=ln;t:switch(Ve){case 1:Ve=0,ln=null,ra(e,n,d,1);break;case 2:case 9:if(Kh(d)){Ve=0,ln=null,B0(n);break}n=function(){Ve!==2&&Ve!==9||$e!==e||(Ve=7),Hn(e)},d.then(n,n);break e;case 3:Ve=7;break e;case 4:Ve=5;break e;case 7:Kh(d)?(Ve=0,ln=null,B0(n)):(Ve=0,ln=null,ra(e,n,d,7));break;case 5:var y=null;switch(Te.tag){case 26:y=Te.memoizedState;case 5:case 27:var b=Te;if(y?_m(y):b.stateNode.complete){Ve=0,ln=null;var R=b.sibling;if(R!==null)Te=R;else{var Z=b.return;Z!==null?(Te=Z,iu(Z)):Te=null}break t}}Ve=0,ln=null,ra(e,n,d,5);break;case 6:Ve=0,ln=null,ra(e,n,d,6);break;case 8:Fs(),nt=6;break e;default:throw Error(r(462))}}Lb();break}catch(te){j0(e,te)}while(!0);return In=hi=null,A.H=o,A.A=c,Ye=l,Te!==null?0:($e=null,ze=0,Er(),nt)}function Lb(){for(;Te!==null&&!Ft();)U0(Te)}function U0(e){var n=u0(e.alternate,e,al);e.memoizedProps=e.pendingProps,n===null?iu(e):Te=n}function B0(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=n0(l,n,n.pendingProps,n.type,void 0,ze);break;case 11:n=n0(l,n,n.pendingProps,n.type.render,n.ref,ze);break;case 5:ds(n);default:s0(l,n),n=Te=Lh(n,al),n=u0(l,n,al)}e.memoizedProps=e.pendingProps,n===null?iu(e):Te=n}function ra(e,n,l,o){In=hi=null,ds(n),Fi=null,Pa=0;var c=n.return;try{if(Ab(e,c,n,l,ze)){nt=1,Zr(e,hn(l,e.current)),Te=null;return}}catch(d){if(c!==null)throw Te=c,d;nt=1,Zr(e,hn(l,e.current)),Te=null;return}n.flags&32768?(Oe||o===1?e=!0:la||(ze&536870912)!==0?e=!1:(Dl=e=!0,(o===2||o===9||o===3||o===6)&&(o=tn.current,o!==null&&o.tag===13&&(o.flags|=16384))),Y0(n,e)):iu(n)}function iu(e){var n=e;do{if((n.flags&32768)!==0){Y0(n,Dl);return}e=n.return;var l=Tb(n.alternate,n,al);if(l!==null){Te=l;return}if(n=n.sibling,n!==null){Te=n;return}Te=n=e}while(n!==null);nt===0&&(nt=5)}function Y0(e,n){do{var l=Mb(e.alternate,e);if(l!==null){l.flags&=32767,Te=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){Te=e;return}Te=e=l}while(e!==null);nt=6,Te=null}function V0(e,n,l,o,c,d,y,b,R){e.cancelPendingCommit=null;do au();while(gt!==0);if((Ye&6)!==0)throw Error(r(327));if(n!==null){if(n===e.current)throw Error(r(177));if(d=n.lanes|n.childLanes,d|=Bc,pc(e,l,d,y,b,R),e===$e&&(Te=$e=null,ze=0),aa=n,jl=e,ol=l,Qs=d,Ks=c,z0=o,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vb(Dt,function(){return $0(),null})):(e.callbackNode=null,e.callbackPriority=0),o=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||o){o=A.T,A.T=null,c=U.p,U.p=2,y=Ye,Ye|=4;try{zb(e,n,l)}finally{Ye=y,U.p=c,A.T=o}}gt=1,q0(),G0(),X0()}}function q0(){if(gt===1){gt=0;var e=jl,n=aa,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=A.T,A.T=null;var o=U.p;U.p=2;var c=Ye;Ye|=4;try{w0(n,e);var d=sf,y=Th(e.containerInfo),b=d.focusedElem,R=d.selectionRange;if(y!==b&&b&&b.ownerDocument&&Ch(b.ownerDocument.documentElement,b)){if(R!==null&&jc(b)){var Z=R.start,te=R.end;if(te===void 0&&(te=Z),"selectionStart"in b)b.selectionStart=Z,b.selectionEnd=Math.min(te,b.value.length);else{var ie=b.ownerDocument||document,F=ie&&ie.defaultView||window;if(F.getSelection){var J=F.getSelection(),he=b.textContent.length,Se=Math.min(R.start,he),Ze=R.end===void 0?Se:Math.min(R.end,he);!J.extend&&Se>Ze&&(y=Ze,Ze=Se,Se=y);var Y=Nh(b,Se),L=Nh(b,Ze);if(Y&&L&&(J.rangeCount!==1||J.anchorNode!==Y.node||J.anchorOffset!==Y.offset||J.focusNode!==L.node||J.focusOffset!==L.offset)){var G=ie.createRange();G.setStart(Y.node,Y.offset),J.removeAllRanges(),Se>Ze?(J.addRange(G),J.extend(L.node,L.offset)):(G.setEnd(L.node,L.offset),J.addRange(G))}}}}for(ie=[],J=b;J=J.parentNode;)J.nodeType===1&&ie.push({element:J,left:J.scrollLeft,top:J.scrollTop});for(typeof b.focus=="function"&&b.focus(),b=0;b<ie.length;b++){var ne=ie[b];ne.element.scrollLeft=ne.left,ne.element.scrollTop=ne.top}}yu=!!cf,sf=cf=null}finally{Ye=c,U.p=o,A.T=l}}e.current=n,gt=2}}function G0(){if(gt===2){gt=0;var e=jl,n=aa,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=A.T,A.T=null;var o=U.p;U.p=2;var c=Ye;Ye|=4;try{y0(e,n.alternate,n)}finally{Ye=c,U.p=o,A.T=l}}gt=3}}function X0(){if(gt===4||gt===3){gt=0,Jt();var e=jl,n=aa,l=ol,o=z0;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?gt=5:(gt=0,aa=jl=null,Z0(e,e.pendingLanes));var c=e.pendingLanes;if(c===0&&(Rl=null),ka(l),n=n.stateNode,it&&typeof it.onCommitFiberRoot=="function")try{it.onCommitFiberRoot(Wt,n,void 0,(n.current.flags&128)===128)}catch{}if(o!==null){n=A.T,c=U.p,U.p=2,A.T=null;try{for(var d=e.onRecoverableError,y=0;y<o.length;y++){var b=o[y];d(b.value,{componentStack:b.stack})}}finally{A.T=n,U.p=c}}(ol&3)!==0&&au(),Hn(e),c=e.pendingLanes,(l&261930)!==0&&(c&42)!==0?e===Is?yo++:(yo=0,Is=e):yo=0,vo(0)}}function Z0(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,Ja(n)))}function au(){return q0(),G0(),X0(),$0()}function $0(){if(gt!==5)return!1;var e=jl,n=Qs;Qs=0;var l=ka(ol),o=A.T,c=U.p;try{U.p=32>l?32:l,A.T=null,l=Ks,Ks=null;var d=jl,y=ol;if(gt=0,aa=jl=null,ol=0,(Ye&6)!==0)throw Error(r(331));var b=Ye;if(Ye|=4,C0(d.current),_0(d,d.current,y,l),Ye=b,vo(0,!1),it&&typeof it.onPostCommitFiberRoot=="function")try{it.onPostCommitFiberRoot(Wt,d)}catch{}return!0}finally{U.p=c,A.T=o,Z0(e,n)}}function Q0(e,n,l){n=hn(l,n),n=Cs(e.stateNode,n,2),e=Cl(e,n,2),e!==null&&(ii(e,2),Hn(e))}function qe(e,n,l){if(e.tag===3)Q0(e,e,l);else for(;n!==null;){if(n.tag===3){Q0(n,e,l);break}else if(n.tag===1){var o=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(Rl===null||!Rl.has(o))){e=hn(l,e),l=Kp(2),o=Cl(n,l,2),o!==null&&(Ip(l,o,n,e),ii(o,2),Hn(o));break}}n=n.return}}function Ws(e,n,l){var o=e.pingCache;if(o===null){o=e.pingCache=new Rb;var c=new Set;o.set(n,c)}else c=o.get(n),c===void 0&&(c=new Set,o.set(n,c));c.has(l)||(Xs=!0,c.add(l),e=Ub.bind(null,e,n,l),n.then(e,e))}function Ub(e,n,l){var o=e.pingCache;o!==null&&o.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,$e===e&&(ze&l)===l&&(nt===4||nt===3&&(ze&62914560)===ze&&300>Fe()-Pr?(Ye&2)===0&&oa(e,0):Zs|=l,ia===ze&&(ia=0)),Hn(e)}function K0(e,n){n===0&&(n=tr()),e=si(e,n),e!==null&&(ii(e,n),Hn(e))}function Bb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),K0(e,l)}function Yb(e,n){var l=0;switch(e.tag){case 31:case 13:var o=e.stateNode,c=e.memoizedState;c!==null&&(l=c.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),K0(e,l)}function Vb(e,n){return Tt(e,n)}var ou=null,ua=null,Ps=!1,ru=!1,ef=!1,kl=0;function Hn(e){e!==ua&&e.next===null&&(ua===null?ou=ua=e:ua=ua.next=e),ru=!0,Ps||(Ps=!0,Gb())}function vo(e,n){if(!ef&&ru){ef=!0;do for(var l=!1,o=ou;o!==null;){if(e!==0){var c=o.pendingLanes;if(c===0)var d=0;else{var y=o.suspendedLanes,b=o.pingedLanes;d=(1<<31-Je(42|e)+1)-1,d&=c&~(y&~b),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,W0(o,d))}else d=ze,d=Ri(o,o===$e?d:0,o.cancelPendingCommit!==null||o.timeoutHandle!==-1),(d&3)===0||li(o,d)||(l=!0,W0(o,d));o=o.next}while(l);ef=!1}}function qb(){I0()}function I0(){ru=Ps=!1;var e=0;kl!==0&&Pb()&&(e=kl);for(var n=Fe(),l=null,o=ou;o!==null;){var c=o.next,d=F0(o,n);d===0?(o.next=null,l===null?ou=c:l.next=c,c===null&&(ua=l)):(l=o,(e!==0||(d&3)!==0)&&(ru=!0)),o=c}gt!==0&>!==5||vo(e),kl!==0&&(kl=0)}function F0(e,n){for(var l=e.suspendedLanes,o=e.pingedLanes,c=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Je(d),b=1<<y,R=c[y];R===-1?((b&l)===0||(b&o)!==0)&&(c[y]=hc(b,n)):R<=n&&(e.expiredLanes|=b),d&=~b}if(n=$e,l=ze,l=Ri(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o=e.callbackNode,l===0||e===n&&(Ve===2||Ve===9)||e.cancelPendingCommit!==null)return o!==null&&o!==null&&Yt(o),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||li(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(o!==null&&Yt(o),ka(l)){case 2:case 8:l=Ht;break;case 32:l=Dt;break;case 268435456:l=ml;break;default:l=Dt}return o=J0.bind(null,e),l=Tt(l,o),e.callbackPriority=n,e.callbackNode=l,n}return o!==null&&o!==null&&Yt(o),e.callbackPriority=2,e.callbackNode=null,2}function J0(e,n){if(gt!==0&>!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(au()&&e.callbackNode!==l)return null;var o=ze;return o=Ri(e,e===$e?o:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),o===0?null:(O0(e,o,n),F0(e,Fe()),e.callbackNode!=null&&e.callbackNode===l?J0.bind(null,e):null)}function W0(e,n){if(au())return null;O0(e,n,!0)}function Gb(){tS(function(){(Ye&6)!==0?Tt(zt,qb):I0()})}function tf(){if(kl===0){var e=Qi;e===0&&(e=zn,zn<<=1,(zn&261888)===0&&(zn=256)),kl=e}return kl}function P0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:mr(""+e)}function em(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Xb(e,n,l,o,c){if(n==="submit"&&l&&l.stateNode===c){var d=P0((c[wt]||null).action),y=o.submitter;y&&(n=(n=y[wt]||null)?P0(n.formAction):y.getAttribute("formAction"),n!==null&&(d=n,y=null));var b=new xr("action","action",null,o,c);e.push({event:b,listeners:[{instance:null,listener:function(){if(o.defaultPrevented){if(kl!==0){var R=y?em(c,y):new FormData(c);Ss(l,{pending:!0,data:R,method:c.method,action:d},null,R)}}else typeof d=="function"&&(b.preventDefault(),R=y?em(c,y):new FormData(c),Ss(l,{pending:!0,data:R,method:c.method,action:d},d,R))},currentTarget:c}]})}}for(var nf=0;nf<Uc.length;nf++){var lf=Uc[nf],Zb=lf.toLowerCase(),$b=lf[0].toUpperCase()+lf.slice(1);En(Zb,"on"+$b)}En(Dh,"onAnimationEnd"),En(Oh,"onAnimationIteration"),En(Rh,"onAnimationStart"),En("dblclick","onDoubleClick"),En("focusin","onFocus"),En("focusout","onBlur"),En(ub,"onTransitionRun"),En(cb,"onTransitionStart"),En(sb,"onTransitionCancel"),En(jh,"onTransitionEnd"),Gn("onMouseEnter",["mouseout","mouseover"]),Gn("onMouseLeave",["mouseout","mouseover"]),Gn("onPointerEnter",["pointerout","pointerover"]),Gn("onPointerLeave",["pointerout","pointerover"]),qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xo="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(" "),Qb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xo));function tm(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var o=e[l],c=o.event;o=o.listeners;e:{var d=void 0;if(n)for(var y=o.length-1;0<=y;y--){var b=o[y],R=b.instance,Z=b.currentTarget;if(b=b.listener,R!==d&&c.isPropagationStopped())break e;d=b,c.currentTarget=Z;try{d(c)}catch(te){wr(te)}c.currentTarget=null,d=R}else for(y=0;y<o.length;y++){if(b=o[y],R=b.instance,Z=b.currentTarget,b=b.listener,R!==d&&c.isPropagationStopped())break e;d=b,c.currentTarget=Z;try{d(c)}catch(te){wr(te)}c.currentTarget=null,d=R}}}}function Me(e,n){var l=n[La];l===void 0&&(l=n[La]=new Set);var o=e+"__bubble";l.has(o)||(nm(n,e,2,!1),l.add(o))}function af(e,n,l){var o=0;n&&(o|=4),nm(l,e,o,n)}var uu="_reactListening"+Math.random().toString(36).slice(2);function of(e){if(!e[uu]){e[uu]=!0,ur.forEach(function(l){l!=="selectionchange"&&(Qb.has(l)||af(l,!1,e),af(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[uu]||(n[uu]=!0,af("selectionchange",!1,n))}}function nm(e,n,l,o){switch(Dm(n)){case 2:var c=SS;break;case 8:c=wS;break;default:c=Sf}l=c.bind(null,n,l,e),c=void 0,!Ac||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(c=!0),o?c!==void 0?e.addEventListener(n,l,{capture:!0,passive:c}):e.addEventListener(n,l,!0):c!==void 0?e.addEventListener(n,l,{passive:c}):e.addEventListener(n,l,!1)}function rf(e,n,l,o,c){var d=o;if((n&1)===0&&(n&2)===0&&o!==null)e:for(;;){if(o===null)return;var y=o.tag;if(y===3||y===4){var b=o.stateNode.containerInfo;if(b===c)break;if(y===4)for(y=o.return;y!==null;){var R=y.tag;if((R===3||R===4)&&y.stateNode.containerInfo===c)return;y=y.return}for(;b!==null;){if(y=vl(b),y===null)return;if(R=y.tag,R===5||R===6||R===26||R===27){o=d=y;continue e}b=b.parentNode}}o=o.return}rh(function(){var Z=d,te=Ec(l),ie=[];e:{var F=Hh.get(e);if(F!==void 0){var J=xr,he=e;switch(e){case"keypress":if(yr(l)===0)break e;case"keydown":case"keyup":J=Y1;break;case"focusin":he="focus",J=Mc;break;case"focusout":he="blur",J=Mc;break;case"beforeblur":case"afterblur":J=Mc;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":J=sh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":J=T1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":J=G1;break;case Dh:case Oh:case Rh:J=D1;break;case jh:J=Z1;break;case"scroll":case"scrollend":J=N1;break;case"wheel":J=Q1;break;case"copy":case"cut":case"paste":J=R1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":J=dh;break;case"toggle":case"beforetoggle":J=I1}var Se=(n&4)!==0,Ze=!Se&&(e==="scroll"||e==="scrollend"),Y=Se?F!==null?F+"Capture":null:F;Se=[];for(var L=Z,G;L!==null;){var ne=L;if(G=ne.stateNode,ne=ne.tag,ne!==5&&ne!==26&&ne!==27||G===null||Y===null||(ne=Ya(L,Y),ne!=null&&Se.push(bo(L,ne,G))),Ze)break;L=L.return}0<Se.length&&(F=new J(F,he,null,l,te),ie.push({event:F,listeners:Se}))}}if((n&7)===0){e:{if(F=e==="mouseover"||e==="pointerover",J=e==="mouseout"||e==="pointerout",F&&l!==wc&&(he=l.relatedTarget||l.fromElement)&&(vl(he)||he[yl]))break e;if((J||F)&&(F=te.window===te?te:(F=te.ownerDocument)?F.defaultView||F.parentWindow:window,J?(he=l.relatedTarget||l.toElement,J=Z,he=he?vl(he):null,he!==null&&(Ze=f(he),Se=he.tag,he!==Ze||Se!==5&&Se!==27&&Se!==6)&&(he=null)):(J=null,he=Z),J!==he)){if(Se=sh,ne="onMouseLeave",Y="onMouseEnter",L="mouse",(e==="pointerout"||e==="pointerover")&&(Se=dh,ne="onPointerLeave",Y="onPointerEnter",L="pointer"),Ze=J==null?F:oi(J),G=he==null?F:oi(he),F=new Se(ne,L+"leave",J,l,te),F.target=Ze,F.relatedTarget=G,ne=null,vl(te)===Z&&(Se=new Se(Y,L+"enter",he,l,te),Se.target=G,Se.relatedTarget=Ze,ne=Se),Ze=ne,J&&he)t:{for(Se=Kb,Y=J,L=he,G=0,ne=Y;ne;ne=Se(ne))G++;ne=0;for(var xe=L;xe;xe=Se(xe))ne++;for(;0<G-ne;)Y=Se(Y),G--;for(;0<ne-G;)L=Se(L),ne--;for(;G--;){if(Y===L||L!==null&&Y===L.alternate){Se=Y;break t}Y=Se(Y),L=Se(L)}Se=null}else Se=null;J!==null&&lm(ie,F,J,Se,!1),he!==null&&Ze!==null&&lm(ie,Ze,he,Se,!0)}}e:{if(F=Z?oi(Z):window,J=F.nodeName&&F.nodeName.toLowerCase(),J==="select"||J==="input"&&F.type==="file")var Le=bh;else if(vh(F))if(Sh)Le=ab;else{Le=lb;var ge=nb}else J=F.nodeName,!J||J.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?Z&&Sc(Z.elementType)&&(Le=bh):Le=ib;if(Le&&(Le=Le(e,Z))){xh(ie,Le,l,te);break e}ge&&ge(e,F,Z),e==="focusout"&&Z&&F.type==="number"&&Z.memoizedProps.value!=null&&bc(F,"number",F.value)}switch(ge=Z?oi(Z):window,e){case"focusin":(vh(ge)||ge.contentEditable==="true")&&(Bi=ge,Hc=Z,Ka=null);break;case"focusout":Ka=Hc=Bi=null;break;case"mousedown":kc=!0;break;case"contextmenu":case"mouseup":case"dragend":kc=!1,Mh(ie,l,te);break;case"selectionchange":if(rb)break;case"keydown":case"keyup":Mh(ie,l,te)}var _e;if(Dc)e:{switch(e){case"compositionstart":var De="onCompositionStart";break e;case"compositionend":De="onCompositionEnd";break e;case"compositionupdate":De="onCompositionUpdate";break e}De=void 0}else Ui?gh(e,l)&&(De="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(De="onCompositionStart");De&&(hh&&l.locale!=="ko"&&(Ui||De!=="onCompositionStart"?De==="onCompositionEnd"&&Ui&&(_e=uh()):(bl=te,Nc="value"in bl?bl.value:bl.textContent,Ui=!0)),ge=cu(Z,De),0<ge.length&&(De=new fh(De,e,null,l,te),ie.push({event:De,listeners:ge}),_e?De.data=_e:(_e=yh(l),_e!==null&&(De.data=_e)))),(_e=J1?W1(e,l):P1(e,l))&&(De=cu(Z,"onBeforeInput"),0<De.length&&(ge=new fh("onBeforeInput","beforeinput",null,l,te),ie.push({event:ge,listeners:De}),ge.data=_e)),Xb(ie,e,Z,l,te)}tm(ie,n)})}function bo(e,n,l){return{instance:e,listener:n,currentTarget:l}}function cu(e,n){for(var l=n+"Capture",o=[];e!==null;){var c=e,d=c.stateNode;if(c=c.tag,c!==5&&c!==26&&c!==27||d===null||(c=Ya(e,l),c!=null&&o.unshift(bo(e,c,d)),c=Ya(e,n),c!=null&&o.push(bo(e,c,d))),e.tag===3)return o;e=e.return}return[]}function Kb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lm(e,n,l,o,c){for(var d=n._reactName,y=[];l!==null&&l!==o;){var b=l,R=b.alternate,Z=b.stateNode;if(b=b.tag,R!==null&&R===o)break;b!==5&&b!==26&&b!==27||Z===null||(R=Z,c?(Z=Ya(l,d),Z!=null&&y.unshift(bo(l,Z,R))):c||(Z=Ya(l,d),Z!=null&&y.push(bo(l,Z,R)))),l=l.return}y.length!==0&&e.push({event:n,listeners:y})}var Ib=/\r\n?/g,Fb=/\u0000|\uFFFD/g;function im(e){return(typeof e=="string"?e:""+e).replace(Ib,`
|
|
9
|
-
`).replace(Fb,"")}function am(e,n){return n=im(n),im(e)===n}function Xe(e,n,l,o,c,d){switch(l){case"children":typeof o=="string"?n==="body"||n==="textarea"&&o===""||Hi(e,o):(typeof o=="number"||typeof o=="bigint")&&n!=="body"&&Hi(e,""+o);break;case"className":hr(e,"class",o);break;case"tabIndex":hr(e,"tabindex",o);break;case"dir":case"role":case"viewBox":case"width":case"height":hr(e,l,o);break;case"style":ah(e,o,d);break;case"data":if(n!=="object"){hr(e,"data",o);break}case"src":case"href":if(o===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(o==null||typeof o=="function"||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=mr(""+o),e.setAttribute(l,o);break;case"action":case"formAction":if(typeof o=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(n!=="input"&&Xe(e,n,"name",c.name,c,null),Xe(e,n,"formEncType",c.formEncType,c,null),Xe(e,n,"formMethod",c.formMethod,c,null),Xe(e,n,"formTarget",c.formTarget,c,null)):(Xe(e,n,"encType",c.encType,c,null),Xe(e,n,"method",c.method,c,null),Xe(e,n,"target",c.target,c,null)));if(o==null||typeof o=="symbol"||typeof o=="boolean"){e.removeAttribute(l);break}o=mr(""+o),e.setAttribute(l,o);break;case"onClick":o!=null&&(e.onclick=Zn);break;case"onScroll":o!=null&&Me("scroll",e);break;case"onScrollEnd":o!=null&&Me("scrollend",e);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(l=o.__html,l!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=l}}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}l=mr(""+o),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);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(l,""+o):e.removeAttribute(l);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(l,""):e.removeAttribute(l);break;case"capture":case"download":o===!0?e.setAttribute(l,""):o!==!1&&o!=null&&typeof o!="function"&&typeof o!="symbol"?e.setAttribute(l,o):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":o!=null&&typeof o!="function"&&typeof o!="symbol"&&!isNaN(o)&&1<=o?e.setAttribute(l,o):e.removeAttribute(l);break;case"rowSpan":case"start":o==null||typeof o=="function"||typeof o=="symbol"||isNaN(o)?e.removeAttribute(l):e.setAttribute(l,o);break;case"popover":Me("beforetoggle",e),Me("toggle",e),dr(e,"popover",o);break;case"xlinkActuate":Xn(e,"http://www.w3.org/1999/xlink","xlink:actuate",o);break;case"xlinkArcrole":Xn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",o);break;case"xlinkRole":Xn(e,"http://www.w3.org/1999/xlink","xlink:role",o);break;case"xlinkShow":Xn(e,"http://www.w3.org/1999/xlink","xlink:show",o);break;case"xlinkTitle":Xn(e,"http://www.w3.org/1999/xlink","xlink:title",o);break;case"xlinkType":Xn(e,"http://www.w3.org/1999/xlink","xlink:type",o);break;case"xmlBase":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:base",o);break;case"xmlLang":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",o);break;case"xmlSpace":Xn(e,"http://www.w3.org/XML/1998/namespace","xml:space",o);break;case"is":dr(e,"is",o);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=_1.get(l)||l,dr(e,l,o))}}function uf(e,n,l,o,c,d){switch(l){case"style":ah(e,o,d);break;case"dangerouslySetInnerHTML":if(o!=null){if(typeof o!="object"||!("__html"in o))throw Error(r(61));if(l=o.__html,l!=null){if(c.children!=null)throw Error(r(60));e.innerHTML=l}}break;case"children":typeof o=="string"?Hi(e,o):(typeof o=="number"||typeof o=="bigint")&&Hi(e,""+o);break;case"onScroll":o!=null&&Me("scroll",e);break;case"onScrollEnd":o!=null&&Me("scrollend",e);break;case"onClick":o!=null&&(e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(c=l.endsWith("Capture"),n=l.slice(2,c?l.length-7:void 0),d=e[wt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,c),typeof o=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,o,c);break e}l in e?e[l]=o:o===!0?e.setAttribute(l,""):dr(e,l,o)}}}function Nt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Me("error",e),Me("load",e);var o=!1,c=!1,d;for(d in l)if(l.hasOwnProperty(d)){var y=l[d];if(y!=null)switch(d){case"src":o=!0;break;case"srcSet":c=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,d,y,l,null)}}c&&Xe(e,n,"srcSet",l.srcSet,l,null),o&&Xe(e,n,"src",l.src,l,null);return;case"input":Me("invalid",e);var b=d=y=c=null,R=null,Z=null;for(o in l)if(l.hasOwnProperty(o)){var te=l[o];if(te!=null)switch(o){case"name":c=te;break;case"type":y=te;break;case"checked":R=te;break;case"defaultChecked":Z=te;break;case"value":d=te;break;case"defaultValue":b=te;break;case"children":case"dangerouslySetInnerHTML":if(te!=null)throw Error(r(137,n));break;default:Xe(e,n,o,te,l,null)}}th(e,d,b,R,Z,y,c,!1);return;case"select":Me("invalid",e),o=y=d=null;for(c in l)if(l.hasOwnProperty(c)&&(b=l[c],b!=null))switch(c){case"value":d=b;break;case"defaultValue":y=b;break;case"multiple":o=b;default:Xe(e,n,c,b,l,null)}n=d,l=y,e.multiple=!!o,n!=null?ji(e,!!o,n,!1):l!=null&&ji(e,!!o,l,!0);return;case"textarea":Me("invalid",e),d=c=o=null;for(y in l)if(l.hasOwnProperty(y)&&(b=l[y],b!=null))switch(y){case"value":o=b;break;case"defaultValue":c=b;break;case"children":d=b;break;case"dangerouslySetInnerHTML":if(b!=null)throw Error(r(91));break;default:Xe(e,n,y,b,l,null)}lh(e,o,c,d);return;case"option":for(R in l)l.hasOwnProperty(R)&&(o=l[R],o!=null)&&(R==="selected"?e.selected=o&&typeof o!="function"&&typeof o!="symbol":Xe(e,n,R,o,l,null));return;case"dialog":Me("beforetoggle",e),Me("toggle",e),Me("cancel",e),Me("close",e);break;case"iframe":case"object":Me("load",e);break;case"video":case"audio":for(o=0;o<xo.length;o++)Me(xo[o],e);break;case"image":Me("error",e),Me("load",e);break;case"details":Me("toggle",e);break;case"embed":case"source":case"link":Me("error",e),Me("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(Z in l)if(l.hasOwnProperty(Z)&&(o=l[Z],o!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,n));default:Xe(e,n,Z,o,l,null)}return;default:if(Sc(n)){for(te in l)l.hasOwnProperty(te)&&(o=l[te],o!==void 0&&uf(e,n,te,o,l,void 0));return}}for(b in l)l.hasOwnProperty(b)&&(o=l[b],o!=null&&Xe(e,n,b,o,l,null))}function Jb(e,n,l,o){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var c=null,d=null,y=null,b=null,R=null,Z=null,te=null;for(J in l){var ie=l[J];if(l.hasOwnProperty(J)&&ie!=null)switch(J){case"checked":break;case"value":break;case"defaultValue":R=ie;default:o.hasOwnProperty(J)||Xe(e,n,J,null,o,ie)}}for(var F in o){var J=o[F];if(ie=l[F],o.hasOwnProperty(F)&&(J!=null||ie!=null))switch(F){case"type":d=J;break;case"name":c=J;break;case"checked":Z=J;break;case"defaultChecked":te=J;break;case"value":y=J;break;case"defaultValue":b=J;break;case"children":case"dangerouslySetInnerHTML":if(J!=null)throw Error(r(137,n));break;default:J!==ie&&Xe(e,n,F,J,o,ie)}}xc(e,y,b,R,Z,te,d,c);return;case"select":J=y=b=F=null;for(d in l)if(R=l[d],l.hasOwnProperty(d)&&R!=null)switch(d){case"value":break;case"multiple":J=R;default:o.hasOwnProperty(d)||Xe(e,n,d,null,o,R)}for(c in o)if(d=o[c],R=l[c],o.hasOwnProperty(c)&&(d!=null||R!=null))switch(c){case"value":F=d;break;case"defaultValue":b=d;break;case"multiple":y=d;default:d!==R&&Xe(e,n,c,d,o,R)}n=b,l=y,o=J,F!=null?ji(e,!!l,F,!1):!!o!=!!l&&(n!=null?ji(e,!!l,n,!0):ji(e,!!l,l?[]:"",!1));return;case"textarea":J=F=null;for(b in l)if(c=l[b],l.hasOwnProperty(b)&&c!=null&&!o.hasOwnProperty(b))switch(b){case"value":break;case"children":break;default:Xe(e,n,b,null,o,c)}for(y in o)if(c=o[y],d=l[y],o.hasOwnProperty(y)&&(c!=null||d!=null))switch(y){case"value":F=c;break;case"defaultValue":J=c;break;case"children":break;case"dangerouslySetInnerHTML":if(c!=null)throw Error(r(91));break;default:c!==d&&Xe(e,n,y,c,o,d)}nh(e,F,J);return;case"option":for(var he in l)F=l[he],l.hasOwnProperty(he)&&F!=null&&!o.hasOwnProperty(he)&&(he==="selected"?e.selected=!1:Xe(e,n,he,null,o,F));for(R in o)F=o[R],J=l[R],o.hasOwnProperty(R)&&F!==J&&(F!=null||J!=null)&&(R==="selected"?e.selected=F&&typeof F!="function"&&typeof F!="symbol":Xe(e,n,R,F,o,J));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 Se in l)F=l[Se],l.hasOwnProperty(Se)&&F!=null&&!o.hasOwnProperty(Se)&&Xe(e,n,Se,null,o,F);for(Z in o)if(F=o[Z],J=l[Z],o.hasOwnProperty(Z)&&F!==J&&(F!=null||J!=null))switch(Z){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(r(137,n));break;default:Xe(e,n,Z,F,o,J)}return;default:if(Sc(n)){for(var Ze in l)F=l[Ze],l.hasOwnProperty(Ze)&&F!==void 0&&!o.hasOwnProperty(Ze)&&uf(e,n,Ze,void 0,o,F);for(te in o)F=o[te],J=l[te],!o.hasOwnProperty(te)||F===J||F===void 0&&J===void 0||uf(e,n,te,F,o,J);return}}for(var Y in l)F=l[Y],l.hasOwnProperty(Y)&&F!=null&&!o.hasOwnProperty(Y)&&Xe(e,n,Y,null,o,F);for(ie in o)F=o[ie],J=l[ie],!o.hasOwnProperty(ie)||F===J||F==null&&J==null||Xe(e,n,ie,F,o,J)}function om(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Wb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),o=0;o<l.length;o++){var c=l[o],d=c.transferSize,y=c.initiatorType,b=c.duration;if(d&&b&&om(y)){for(y=0,b=c.responseEnd,o+=1;o<l.length;o++){var R=l[o],Z=R.startTime;if(Z>b)break;var te=R.transferSize,ie=R.initiatorType;te&&om(ie)&&(R=R.responseEnd,y+=te*(R<b?1:(b-Z)/(R-Z)))}if(--o,n+=8*(d+y)/(c.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 cf=null,sf=null;function su(e){return e.nodeType===9?e:e.ownerDocument}function rm(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 um(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 ff(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 df=null;function Pb(){var e=window.event;return e&&e.type==="popstate"?e===df?!1:(df=e,!0):(df=null,!1)}var cm=typeof setTimeout=="function"?setTimeout:void 0,eS=typeof clearTimeout=="function"?clearTimeout:void 0,sm=typeof Promise=="function"?Promise:void 0,tS=typeof queueMicrotask=="function"?queueMicrotask:typeof sm<"u"?function(e){return sm.resolve(null).then(e).catch(nS)}:cm;function nS(e){setTimeout(function(){throw e})}function Ll(e){return e==="head"}function fm(e,n){var l=n,o=0;do{var c=l.nextSibling;if(e.removeChild(l),c&&c.nodeType===8)if(l=c.data,l==="/$"||l==="/&"){if(o===0){e.removeChild(c),da(n);return}o--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")o++;else if(l==="html")So(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,So(l);for(var d=l.firstChild;d;){var y=d.nextSibling,b=d.nodeName;d[ai]||b==="SCRIPT"||b==="STYLE"||b==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=y}}else l==="body"&&So(e.ownerDocument.body);l=c}while(l);da(n)}function dm(e,n){var l=e;e=0;do{var o=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),o&&o.nodeType===8)if(l=o.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=o}while(l)}function hf(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":hf(l),Ua(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function lS(e,n,l,o){for(;e.nodeType===1;){var c=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!o&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(o){if(!e[ai])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==c.rel||e.getAttribute("href")!==(c.href==null||c.href===""?null:c.href)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin)||e.getAttribute("title")!==(c.title==null?null:c.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(c.src==null?null:c.src)||e.getAttribute("type")!==(c.type==null?null:c.type)||e.getAttribute("crossorigin")!==(c.crossOrigin==null?null:c.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=c.name==null?null:""+c.name;if(c.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=vn(e.nextSibling),e===null)break}return null}function iS(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=vn(e.nextSibling),e===null))return null;return e}function hm(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=vn(e.nextSibling),e===null))return null;return e}function pf(e){return e.data==="$?"||e.data==="$~"}function mf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function aS(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var o=function(){n(),l.removeEventListener("DOMContentLoaded",o)};l.addEventListener("DOMContentLoaded",o),e._reactRetry=o}}function vn(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 gf=null;function pm(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return vn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function mm(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function gm(e,n,l){switch(n=su(l),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 So(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Ua(e)}var xn=new Map,ym=new Set;function fu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var rl=U.d;U.d={f:oS,r:rS,D:uS,C:cS,L:sS,m:fS,X:hS,S:dS,M:pS};function oS(){var e=rl.f(),n=nu();return e||n}function rS(e){var n=Vn(e);n!==null&&n.tag===5&&n.type==="form"?jp(n):rl.r(e)}var ca=typeof document>"u"?null:document;function vm(e,n,l){var o=ca;if(o&&typeof n=="string"&&n){var c=fn(n);c='link[rel="'+e+'"][href="'+c+'"]',typeof l=="string"&&(c+='[crossorigin="'+l+'"]'),ym.has(c)||(ym.add(c),e={rel:e,crossOrigin:l,href:n},o.querySelector(c)===null&&(n=o.createElement("link"),Nt(n,"link",e),rt(n),o.head.appendChild(n)))}}function uS(e){rl.D(e),vm("dns-prefetch",e,null)}function cS(e,n){rl.C(e,n),vm("preconnect",e,n)}function sS(e,n,l){rl.L(e,n,l);var o=ca;if(o&&e&&n){var c='link[rel="preload"][as="'+fn(n)+'"]';n==="image"&&l&&l.imageSrcSet?(c+='[imagesrcset="'+fn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(c+='[imagesizes="'+fn(l.imageSizes)+'"]')):c+='[href="'+fn(e)+'"]';var d=c;switch(n){case"style":d=sa(e);break;case"script":d=fa(e)}xn.has(d)||(e=v({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),xn.set(d,e),o.querySelector(c)!==null||n==="style"&&o.querySelector(wo(d))||n==="script"&&o.querySelector(Eo(d))||(n=o.createElement("link"),Nt(n,"link",e),rt(n),o.head.appendChild(n)))}}function fS(e,n){rl.m(e,n);var l=ca;if(l&&e){var o=n&&typeof n.as=="string"?n.as:"script",c='link[rel="modulepreload"][as="'+fn(o)+'"][href="'+fn(e)+'"]',d=c;switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=fa(e)}if(!xn.has(d)&&(e=v({rel:"modulepreload",href:e},n),xn.set(d,e),l.querySelector(c)===null)){switch(o){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Eo(d)))return}o=l.createElement("link"),Nt(o,"link",e),rt(o),l.head.appendChild(o)}}}function dS(e,n,l){rl.S(e,n,l);var o=ca;if(o&&e){var c=xl(o).hoistableStyles,d=sa(e);n=n||"default";var y=c.get(d);if(!y){var b={loading:0,preload:null};if(y=o.querySelector(wo(d)))b.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":n},l),(l=xn.get(d))&&yf(e,l);var R=y=o.createElement("link");rt(R),Nt(R,"link",e),R._p=new Promise(function(Z,te){R.onload=Z,R.onerror=te}),R.addEventListener("load",function(){b.loading|=1}),R.addEventListener("error",function(){b.loading|=2}),b.loading|=4,du(y,n,o)}y={type:"stylesheet",instance:y,count:1,state:b},c.set(d,y)}}}function hS(e,n){rl.X(e,n);var l=ca;if(l&&e){var o=xl(l).hoistableScripts,c=fa(e),d=o.get(c);d||(d=l.querySelector(Eo(c)),d||(e=v({src:e,async:!0},n),(n=xn.get(c))&&vf(e,n),d=l.createElement("script"),rt(d),Nt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function pS(e,n){rl.M(e,n);var l=ca;if(l&&e){var o=xl(l).hoistableScripts,c=fa(e),d=o.get(c);d||(d=l.querySelector(Eo(c)),d||(e=v({src:e,async:!0,type:"module"},n),(n=xn.get(c))&&vf(e,n),d=l.createElement("script"),rt(d),Nt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},o.set(c,d))}}function xm(e,n,l,o){var c=(c=ce.current)?fu(c):null;if(!c)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=sa(l.href),l=xl(c).hoistableStyles,o=l.get(n),o||(o={type:"style",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=sa(l.href);var d=xl(c).hoistableStyles,y=d.get(e);if(y||(c=c.ownerDocument||c,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=c.querySelector(wo(e)))&&!d._p&&(y.instance=d,y.state.loading=5),xn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},xn.set(e,l),d||mS(c,e,l,y.state))),n&&o===null)throw Error(r(528,""));return y}if(n&&o!==null)throw Error(r(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=fa(l),l=xl(c).hoistableScripts,o=l.get(n),o||(o={type:"script",instance:null,count:0,state:null},l.set(n,o)),o):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function sa(e){return'href="'+fn(e)+'"'}function wo(e){return'link[rel="stylesheet"]['+e+"]"}function bm(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function mS(e,n,l,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}),Nt(n,"link",l),rt(n),e.head.appendChild(n))}function fa(e){return'[src="'+fn(e)+'"]'}function Eo(e){return"script[async]"+e}function Sm(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var o=e.querySelector('style[data-href~="'+fn(l.href)+'"]');if(o)return n.instance=o,rt(o),o;var c=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return o=(e.ownerDocument||e).createElement("style"),rt(o),Nt(o,"style",c),du(o,l.precedence,e),n.instance=o;case"stylesheet":c=sa(l.href);var d=e.querySelector(wo(c));if(d)return n.state.loading|=4,n.instance=d,rt(d),d;o=bm(l),(c=xn.get(c))&&yf(o,c),d=(e.ownerDocument||e).createElement("link"),rt(d);var y=d;return y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),Nt(d,"link",o),n.state.loading|=4,du(d,l.precedence,e),n.instance=d;case"script":return d=fa(l.src),(c=e.querySelector(Eo(d)))?(n.instance=c,rt(c),c):(o=l,(c=xn.get(d))&&(o=v({},l),vf(o,c)),e=e.ownerDocument||e,c=e.createElement("script"),rt(c),Nt(c,"link",o),e.head.appendChild(c),n.instance=c);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,du(o,l.precedence,e));return n.instance}function du(e,n,l){for(var o=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),c=o.length?o[o.length-1]:null,d=c,y=0;y<o.length;y++){var b=o[y];if(b.dataset.precedence===n)d=b;else if(d!==c)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function yf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function vf(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var hu=null;function wm(e,n,l){if(hu===null){var o=new Map,c=hu=new Map;c.set(l,o)}else c=hu,o=c.get(l),o||(o=new Map,c.set(l,o));if(o.has(e))return o;for(o.set(e,null),l=l.getElementsByTagName(e),c=0;c<l.length;c++){var d=l[c];if(!(d[ai]||d[mt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(n)||"";y=e+y;var b=o.get(y);b?b.push(d):o.set(y,[d])}}return o}function Em(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function gS(e,n,l){if(l===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 _m(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function yS(e,n,l,o){if(l.type==="stylesheet"&&(typeof o.media!="string"||matchMedia(o.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var c=sa(o.href),d=n.querySelector(wo(c));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=pu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,rt(d);return}d=n.ownerDocument||n,o=bm(o),(c=xn.get(c))&&yf(o,c),d=d.createElement("link"),rt(d);var y=d;y._p=new Promise(function(b,R){y.onload=b,y.onerror=R}),Nt(d,"link",o),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=pu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var xf=0;function vS(e,n){return e.stylesheets&&e.count===0&&gu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var o=setTimeout(function(){if(e.stylesheets&&gu(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&xf===0&&(xf=62500*Wb());var c=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&gu(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>xf?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(o),clearTimeout(c)}}:null}function pu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)gu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var mu=null;function gu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,mu=new Map,n.forEach(xS,e),mu=null,pu.call(e))}function xS(e,n){if(!(n.state.loading&4)){var l=mu.get(e);if(l)var o=l.get(null);else{l=new Map,mu.set(e,l);for(var c=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<c.length;d++){var y=c[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),o=y)}o&&l.set(null,o)}c=n.instance,y=c.getAttribute("data-precedence"),d=l.get(y)||o,d===o&&l.set(null,c),l.set(y,c),this.count++,o=pu.bind(this),c.addEventListener("load",o),c.addEventListener("error",o),d?d.parentNode.insertBefore(c,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(c,e.firstChild)),n.state.loading|=4}}var _o={$$typeof:B,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function bS(e,n,l,o,c,d,y,b,R){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=ja(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ja(0),this.hiddenUpdates=ja(null),this.identifierPrefix=o,this.onUncaughtError=c,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=R,this.incompleteTransitions=new Map}function Am(e,n,l,o,c,d,y,b,R,Z,te,ie){return e=new bS(e,n,l,y,R,Z,te,ie,b),n=1,d===!0&&(n|=24),d=en(3,null,null,n),e.current=d,d.stateNode=e,n=Jc(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:o,isDehydrated:l,cache:n},ts(d),e}function Nm(e){return e?(e=qi,e):qi}function Cm(e,n,l,o,c,d){c=Nm(c),o.context===null?o.context=c:o.pendingContext=c,o=Nl(n),o.payload={element:l},d=d===void 0?null:d,d!==null&&(o.callback=d),l=Cl(e,o,n),l!==null&&($t(l,e,n),to(l,e,n))}function Tm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function bf(e,n){Tm(e,n),(e=e.alternate)&&Tm(e,n)}function Mm(e){if(e.tag===13||e.tag===31){var n=si(e,67108864);n!==null&&$t(n,e,67108864),bf(e,67108864)}}function zm(e){if(e.tag===13||e.tag===31){var n=on();n=Ha(n);var l=si(e,n);l!==null&&$t(l,e,n),bf(e,n)}}var yu=!0;function SS(e,n,l,o){var c=A.T;A.T=null;var d=U.p;try{U.p=2,Sf(e,n,l,o)}finally{U.p=d,A.T=c}}function wS(e,n,l,o){var c=A.T;A.T=null;var d=U.p;try{U.p=8,Sf(e,n,l,o)}finally{U.p=d,A.T=c}}function Sf(e,n,l,o){if(yu){var c=wf(o);if(c===null)rf(e,n,o,vu,l),Om(e,o);else if(_S(c,e,n,l,o))o.stopPropagation();else if(Om(e,o),n&4&&-1<ES.indexOf(e)){for(;c!==null;){var d=Vn(c);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Lt(d.pendingLanes);if(y!==0){var b=d;for(b.pendingLanes|=2,b.entangledLanes|=2;y;){var R=1<<31-Je(y);b.entanglements[1]|=R,y&=~R}Hn(d),(Ye&6)===0&&(eu=Fe()+500,vo(0))}}break;case 31:case 13:b=si(d,2),b!==null&&$t(b,d,2),nu(),bf(d,2)}if(d=wf(o),d===null&&rf(e,n,o,vu,l),d===c)break;c=d}c!==null&&o.stopPropagation()}else rf(e,n,o,null,l)}}function wf(e){return e=Ec(e),Ef(e)}var vu=null;function Ef(e){if(vu=null,e=vl(e),e!==null){var n=f(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=s(n),e!==null)return e;e=null}else if(l===31){if(e=h(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return vu=e,null}function Dm(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(Mt()){case zt:return 2;case Ht:return 8;case Dt:case un:return 32;case ml:return 268435456;default:return 32}default:return 32}}var _f=!1,Ul=null,Bl=null,Yl=null,Ao=new Map,No=new Map,Vl=[],ES="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 Om(e,n){switch(e){case"focusin":case"focusout":Ul=null;break;case"dragenter":case"dragleave":Bl=null;break;case"mouseover":case"mouseout":Yl=null;break;case"pointerover":case"pointerout":Ao.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":No.delete(n.pointerId)}}function Co(e,n,l,o,c,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:o,nativeEvent:d,targetContainers:[c]},n!==null&&(n=Vn(n),n!==null&&Mm(n)),e):(e.eventSystemFlags|=o,n=e.targetContainers,c!==null&&n.indexOf(c)===-1&&n.push(c),e)}function _S(e,n,l,o,c){switch(n){case"focusin":return Ul=Co(Ul,e,n,l,o,c),!0;case"dragenter":return Bl=Co(Bl,e,n,l,o,c),!0;case"mouseover":return Yl=Co(Yl,e,n,l,o,c),!0;case"pointerover":var d=c.pointerId;return Ao.set(d,Co(Ao.get(d)||null,e,n,l,o,c)),!0;case"gotpointercapture":return d=c.pointerId,No.set(d,Co(No.get(d)||null,e,n,l,o,c)),!0}return!1}function Rm(e){var n=vl(e.target);if(n!==null){var l=f(n);if(l!==null){if(n=l.tag,n===13){if(n=s(l),n!==null){e.blockedOn=n,or(e.priority,function(){zm(l)});return}}else if(n===31){if(n=h(l),n!==null){e.blockedOn=n,or(e.priority,function(){zm(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function xu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=wf(e.nativeEvent);if(l===null){l=e.nativeEvent;var o=new l.constructor(l.type,l);wc=o,l.target.dispatchEvent(o),wc=null}else return n=Vn(l),n!==null&&Mm(n),e.blockedOn=l,!1;n.shift()}return!0}function jm(e,n,l){xu(e)&&l.delete(n)}function AS(){_f=!1,Ul!==null&&xu(Ul)&&(Ul=null),Bl!==null&&xu(Bl)&&(Bl=null),Yl!==null&&xu(Yl)&&(Yl=null),Ao.forEach(jm),No.forEach(jm)}function bu(e,n){e.blockedOn===n&&(e.blockedOn=null,_f||(_f=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,AS)))}var Su=null;function Hm(e){Su!==e&&(Su=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Su===e&&(Su=null);for(var n=0;n<e.length;n+=3){var l=e[n],o=e[n+1],c=e[n+2];if(typeof o!="function"){if(Ef(o||l)===null)continue;break}var d=Vn(l);d!==null&&(e.splice(n,3),n-=3,Ss(d,{pending:!0,data:c,method:l.method,action:o},o,c))}}))}function da(e){function n(R){return bu(R,e)}Ul!==null&&bu(Ul,e),Bl!==null&&bu(Bl,e),Yl!==null&&bu(Yl,e),Ao.forEach(n),No.forEach(n);for(var l=0;l<Vl.length;l++){var o=Vl[l];o.blockedOn===e&&(o.blockedOn=null)}for(;0<Vl.length&&(l=Vl[0],l.blockedOn===null);)Rm(l),l.blockedOn===null&&Vl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(o=0;o<l.length;o+=3){var c=l[o],d=l[o+1],y=c[wt]||null;if(typeof d=="function")y||Hm(l);else if(y){var b=null;if(d&&d.hasAttribute("formAction")){if(c=d,y=d[wt]||null)b=y.formAction;else if(Ef(c)!==null)continue}else b=y.action;typeof b=="function"?l[o+1]=b:(l.splice(o,3),o-=3),Hm(l)}}}function km(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return c=y})},focusReset:"manual",scroll:"manual"})}function n(){c!==null&&(c(),c=null),o||setTimeout(l,20)}function l(){if(!o&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var o=!1,c=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){o=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),c!==null&&(c(),c=null)}}}function Af(e){this._internalRoot=e}wu.prototype.render=Af.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(r(409));var l=n.current,o=on();Cm(l,o,e,n,null,null)},wu.prototype.unmount=Af.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Cm(e.current,2,null,e,null,null),nu(),n[yl]=null}};function wu(e){this._internalRoot=e}wu.prototype.unstable_scheduleHydration=function(e){if(e){var n=ar();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Vl.length&&n!==0&&n<Vl[l].priority;l++);Vl.splice(l,0,e),l===0&&Rm(e)}};var Lm=i.version;if(Lm!=="19.2.4")throw Error(r(527,Lm,"19.2.4"));U.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?g(e):null,e=e===null?null:e.stateNode,e};var NS={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:A,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Eu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Eu.isDisabled&&Eu.supportsFiber)try{Wt=Eu.inject(NS),it=Eu}catch{}}return Mo.createRoot=function(e,n){if(!u(e))throw Error(r(299));var l=!1,o="",c=Xp,d=Zp,y=$p;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(c=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=Am(e,1,!1,null,null,l,o,null,c,d,y,km),e[yl]=n.current,of(e),new Af(n)},Mo.hydrateRoot=function(e,n,l){if(!u(e))throw Error(r(299));var o=!1,c="",d=Xp,y=Zp,b=$p,R=null;return l!=null&&(l.unstable_strictMode===!0&&(o=!0),l.identifierPrefix!==void 0&&(c=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(b=l.onRecoverableError),l.formState!==void 0&&(R=l.formState)),n=Am(e,1,!0,n,l??null,o,c,R,d,y,b,km),n.context=Nm(null),l=n.current,o=on(),o=Ha(o),c=Nl(o),c.callback=null,Cl(l,c,o),l=o,n.current.lanes=l,ii(n,l),Hn(n),e[yl]=n.current,of(e),new wu(n)},Mo.version="19.2.4",Mo}var Qm;function kS(){if(Qm)return Tf.exports;Qm=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(i){console.error(i)}}return t(),Tf.exports=HS(),Tf.exports}var LS=kS();function Rt(t){if(typeof t=="string"||typeof t=="number")return""+t;let i="";if(Array.isArray(t))for(let a=0,r;a<t.length;a++)(r=Rt(t[a]))!==""&&(i+=(i&&" ")+r);else for(let a in t)t[a]&&(i+=(i&&" ")+a);return i}var Of={exports:{}},Rf={},jf={exports:{}},Hf={};var Km;function US(){if(Km)return Hf;Km=1;var t=Jo();function i(v,x){return v===x&&(v!==0||1/v===1/x)||v!==v&&x!==x}var a=typeof Object.is=="function"?Object.is:i,r=t.useState,u=t.useEffect,f=t.useLayoutEffect,s=t.useDebugValue;function h(v,x){var w=x(),M=r({inst:{value:w,getSnapshot:x}}),N=M[0].inst,T=M[1];return f(function(){N.value=w,N.getSnapshot=x,p(N)&&T({inst:N})},[v,w,x]),u(function(){return p(N)&&T({inst:N}),v(function(){p(N)&&T({inst:N})})},[v]),s(w),w}function p(v){var x=v.getSnapshot;v=v.value;try{var w=x();return!a(v,w)}catch{return!0}}function m(v,x){return x()}var g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?m:h;return Hf.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:g,Hf}var Im;function BS(){return Im||(Im=1,jf.exports=US()),jf.exports}var Fm;function YS(){if(Fm)return Rf;Fm=1;var t=Jo(),i=BS();function a(m,g){return m===g&&(m!==0||1/m===1/g)||m!==m&&g!==g}var r=typeof Object.is=="function"?Object.is:a,u=i.useSyncExternalStore,f=t.useRef,s=t.useEffect,h=t.useMemo,p=t.useDebugValue;return Rf.useSyncExternalStoreWithSelector=function(m,g,v,x,w){var M=f(null);if(M.current===null){var N={hasValue:!1,value:null};M.current=N}else N=M.current;M=h(function(){function z(I){if(!j){if(j=!0,B=I,I=x(I),w!==void 0&&N.hasValue){var ee=N.value;if(w(ee,I))return k=ee}return k=I}if(ee=k,r(B,I))return ee;var V=x(I);return w!==void 0&&w(ee,V)?(B=I,ee):(B=I,k=V)}var j=!1,B,k,K=v===void 0?null:v;return[function(){return z(g())},K===null?void 0:function(){return z(K())}]},[g,v,x,w]);var T=u(m,M[0],M[1]);return s(function(){N.hasValue=!0,N.value=T},[T]),p(T),T},Rf}var Jm;function VS(){return Jm||(Jm=1,Of.exports=YS()),Of.exports}var qS=VS();const GS=yy(qS),XS={},Wm=t=>{let i;const a=new Set,r=(g,v)=>{const x=typeof g=="function"?g(i):g;if(!Object.is(x,i)){const w=i;i=v??(typeof x!="object"||x===null)?x:Object.assign({},i,x),a.forEach(M=>M(i,w))}},u=()=>i,p={setState:r,getState:u,getInitialState:()=>m,subscribe:g=>(a.add(g),()=>a.delete(g)),destroy:()=>{(XS?"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."),a.clear()}},m=i=t(r,u,p);return p},ZS=t=>t?Wm(t):Wm,{useDebugValue:$S}=P,{useSyncExternalStoreWithSelector:QS}=GS,KS=t=>t;function by(t,i=KS,a){const r=QS(t.subscribe,t.getState,t.getServerState||t.getInitialState,i,a);return $S(r),r}const Pm=(t,i)=>{const a=ZS(t),r=(u,f=i)=>by(a,u,f);return Object.assign(r,a),r},IS=(t,i)=>t?Pm(t,i):Pm;function It(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,u]of t)if(!Object.is(u,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}var FS={value:()=>{}};function ic(){for(var t=0,i=arguments.length,a={},r;t<i;++t){if(!(r=arguments[t]+"")||r in a||/[\s.]/.test(r))throw new Error("illegal type: "+r);a[r]=[]}return new ku(a)}function ku(t){this._=t}function JS(t,i){return t.trim().split(/^|\s+/).map(function(a){var r="",u=a.indexOf(".");if(u>=0&&(r=a.slice(u+1),a=a.slice(0,u)),a&&!i.hasOwnProperty(a))throw new Error("unknown type: "+a);return{type:a,name:r}})}ku.prototype=ic.prototype={constructor:ku,on:function(t,i){var a=this._,r=JS(t+"",a),u,f=-1,s=r.length;if(arguments.length<2){for(;++f<s;)if((u=(t=r[f]).type)&&(u=WS(a[u],t.name)))return u;return}if(i!=null&&typeof i!="function")throw new Error("invalid callback: "+i);for(;++f<s;)if(u=(t=r[f]).type)a[u]=eg(a[u],t.name,i);else if(i==null)for(u in a)a[u]=eg(a[u],t.name,null);return this},copy:function(){var t={},i=this._;for(var a in i)t[a]=i[a].slice();return new ku(t)},call:function(t,i){if((u=arguments.length-2)>0)for(var a=new Array(u),r=0,u,f;r<u;++r)a[r]=arguments[r+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(f=this._[t],r=0,u=f.length;r<u;++r)f[r].value.apply(i,a)},apply:function(t,i,a){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],u=0,f=r.length;u<f;++u)r[u].value.apply(i,a)}};function WS(t,i){for(var a=0,r=t.length,u;a<r;++a)if((u=t[a]).name===i)return u.value}function eg(t,i,a){for(var r=0,u=t.length;r<u;++r)if(t[r].name===i){t[r]=FS,t=t.slice(0,r).concat(t.slice(r+1));break}return a!=null&&t.push({name:i,value:a}),t}var Ff="http://www.w3.org/1999/xhtml";const tg={svg:"http://www.w3.org/2000/svg",xhtml:Ff,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ac(t){var i=t+="",a=i.indexOf(":");return a>=0&&(i=t.slice(0,a))!=="xmlns"&&(t=t.slice(a+1)),tg.hasOwnProperty(i)?{space:tg[i],local:t}:t}function PS(t){return function(){var i=this.ownerDocument,a=this.namespaceURI;return a===Ff&&i.documentElement.namespaceURI===Ff?i.createElement(t):i.createElementNS(a,t)}}function e2(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Sy(t){var i=ac(t);return(i.local?e2:PS)(i)}function t2(){}function Ed(t){return t==null?t2:function(){return this.querySelector(t)}}function n2(t){typeof t!="function"&&(t=Ed(t));for(var i=this._groups,a=i.length,r=new Array(a),u=0;u<a;++u)for(var f=i[u],s=f.length,h=r[u]=new Array(s),p,m,g=0;g<s;++g)(p=f[g])&&(m=t.call(p,p.__data__,g,f))&&("__data__"in p&&(m.__data__=p.__data__),h[g]=m);return new rn(r,this._parents)}function l2(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function i2(){return[]}function wy(t){return t==null?i2:function(){return this.querySelectorAll(t)}}function a2(t){return function(){return l2(t.apply(this,arguments))}}function o2(t){typeof t=="function"?t=a2(t):t=wy(t);for(var i=this._groups,a=i.length,r=[],u=[],f=0;f<a;++f)for(var s=i[f],h=s.length,p,m=0;m<h;++m)(p=s[m])&&(r.push(t.call(p,p.__data__,m,s)),u.push(p));return new rn(r,u)}function Ey(t){return function(){return this.matches(t)}}function _y(t){return function(i){return i.matches(t)}}var r2=Array.prototype.find;function u2(t){return function(){return r2.call(this.children,t)}}function c2(){return this.firstElementChild}function s2(t){return this.select(t==null?c2:u2(typeof t=="function"?t:_y(t)))}var f2=Array.prototype.filter;function d2(){return Array.from(this.children)}function h2(t){return function(){return f2.call(this.children,t)}}function p2(t){return this.selectAll(t==null?d2:h2(typeof t=="function"?t:_y(t)))}function m2(t){typeof t!="function"&&(t=Ey(t));for(var i=this._groups,a=i.length,r=new Array(a),u=0;u<a;++u)for(var f=i[u],s=f.length,h=r[u]=[],p,m=0;m<s;++m)(p=f[m])&&t.call(p,p.__data__,m,f)&&h.push(p);return new rn(r,this._parents)}function Ay(t){return new Array(t.length)}function g2(){return new rn(this._enter||this._groups.map(Ay),this._parents)}function Yu(t,i){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=i}Yu.prototype={constructor:Yu,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,i){return this._parent.insertBefore(t,i)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function y2(t){return function(){return t}}function v2(t,i,a,r,u,f){for(var s=0,h,p=i.length,m=f.length;s<m;++s)(h=i[s])?(h.__data__=f[s],r[s]=h):a[s]=new Yu(t,f[s]);for(;s<p;++s)(h=i[s])&&(u[s]=h)}function x2(t,i,a,r,u,f,s){var h,p,m=new Map,g=i.length,v=f.length,x=new Array(g),w;for(h=0;h<g;++h)(p=i[h])&&(x[h]=w=s.call(p,p.__data__,h,i)+"",m.has(w)?u[h]=p:m.set(w,p));for(h=0;h<v;++h)w=s.call(t,f[h],h,f)+"",(p=m.get(w))?(r[h]=p,p.__data__=f[h],m.delete(w)):a[h]=new Yu(t,f[h]);for(h=0;h<g;++h)(p=i[h])&&m.get(x[h])===p&&(u[h]=p)}function b2(t){return t.__data__}function S2(t,i){if(!arguments.length)return Array.from(this,b2);var a=i?x2:v2,r=this._parents,u=this._groups;typeof t!="function"&&(t=y2(t));for(var f=u.length,s=new Array(f),h=new Array(f),p=new Array(f),m=0;m<f;++m){var g=r[m],v=u[m],x=v.length,w=w2(t.call(g,g&&g.__data__,m,r)),M=w.length,N=h[m]=new Array(M),T=s[m]=new Array(M),z=p[m]=new Array(x);a(g,v,N,T,z,w,i);for(var j=0,B=0,k,K;j<M;++j)if(k=N[j]){for(j>=B&&(B=j+1);!(K=T[B])&&++B<M;);k._next=K||null}}return s=new rn(s,r),s._enter=h,s._exit=p,s}function w2(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function E2(){return new rn(this._exit||this._groups.map(Ay),this._parents)}function _2(t,i,a){var r=this.enter(),u=this,f=this.exit();return typeof t=="function"?(r=t(r),r&&(r=r.selection())):r=r.append(t+""),i!=null&&(u=i(u),u&&(u=u.selection())),a==null?f.remove():a(f),r&&u?r.merge(u).order():u}function A2(t){for(var i=t.selection?t.selection():t,a=this._groups,r=i._groups,u=a.length,f=r.length,s=Math.min(u,f),h=new Array(u),p=0;p<s;++p)for(var m=a[p],g=r[p],v=m.length,x=h[p]=new Array(v),w,M=0;M<v;++M)(w=m[M]||g[M])&&(x[M]=w);for(;p<u;++p)h[p]=a[p];return new rn(h,this._parents)}function N2(){for(var t=this._groups,i=-1,a=t.length;++i<a;)for(var r=t[i],u=r.length-1,f=r[u],s;--u>=0;)(s=r[u])&&(f&&s.compareDocumentPosition(f)^4&&f.parentNode.insertBefore(s,f),f=s);return this}function C2(t){t||(t=T2);function i(v,x){return v&&x?t(v.__data__,x.__data__):!v-!x}for(var a=this._groups,r=a.length,u=new Array(r),f=0;f<r;++f){for(var s=a[f],h=s.length,p=u[f]=new Array(h),m,g=0;g<h;++g)(m=s[g])&&(p[g]=m);p.sort(i)}return new rn(u,this._parents).order()}function T2(t,i){return t<i?-1:t>i?1:t>=i?0:NaN}function M2(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function z2(){return Array.from(this)}function D2(){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var r=t[i],u=0,f=r.length;u<f;++u){var s=r[u];if(s)return s}return null}function O2(){let t=0;for(const i of this)++t;return t}function R2(){return!this.node()}function j2(t){for(var i=this._groups,a=0,r=i.length;a<r;++a)for(var u=i[a],f=0,s=u.length,h;f<s;++f)(h=u[f])&&t.call(h,h.__data__,f,u);return this}function H2(t){return function(){this.removeAttribute(t)}}function k2(t){return function(){this.removeAttributeNS(t.space,t.local)}}function L2(t,i){return function(){this.setAttribute(t,i)}}function U2(t,i){return function(){this.setAttributeNS(t.space,t.local,i)}}function B2(t,i){return function(){var a=i.apply(this,arguments);a==null?this.removeAttribute(t):this.setAttribute(t,a)}}function Y2(t,i){return function(){var a=i.apply(this,arguments);a==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,a)}}function V2(t,i){var a=ac(t);if(arguments.length<2){var r=this.node();return a.local?r.getAttributeNS(a.space,a.local):r.getAttribute(a)}return this.each((i==null?a.local?k2:H2:typeof i=="function"?a.local?Y2:B2:a.local?U2:L2)(a,i))}function Ny(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function q2(t){return function(){this.style.removeProperty(t)}}function G2(t,i,a){return function(){this.style.setProperty(t,i,a)}}function X2(t,i,a){return function(){var r=i.apply(this,arguments);r==null?this.style.removeProperty(t):this.style.setProperty(t,r,a)}}function Z2(t,i,a){return arguments.length>1?this.each((i==null?q2:typeof i=="function"?X2:G2)(t,i,a??"")):Ca(this.node(),t)}function Ca(t,i){return t.style.getPropertyValue(i)||Ny(t).getComputedStyle(t,null).getPropertyValue(i)}function $2(t){return function(){delete this[t]}}function Q2(t,i){return function(){this[t]=i}}function K2(t,i){return function(){var a=i.apply(this,arguments);a==null?delete this[t]:this[t]=a}}function I2(t,i){return arguments.length>1?this.each((i==null?$2:typeof i=="function"?K2:Q2)(t,i)):this.node()[t]}function Cy(t){return t.trim().split(/^|\s+/)}function _d(t){return t.classList||new Ty(t)}function Ty(t){this._node=t,this._names=Cy(t.getAttribute("class")||"")}Ty.prototype={add:function(t){var i=this._names.indexOf(t);i<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var i=this._names.indexOf(t);i>=0&&(this._names.splice(i,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function My(t,i){for(var a=_d(t),r=-1,u=i.length;++r<u;)a.add(i[r])}function zy(t,i){for(var a=_d(t),r=-1,u=i.length;++r<u;)a.remove(i[r])}function F2(t){return function(){My(this,t)}}function J2(t){return function(){zy(this,t)}}function W2(t,i){return function(){(i.apply(this,arguments)?My:zy)(this,t)}}function P2(t,i){var a=Cy(t+"");if(arguments.length<2){for(var r=_d(this.node()),u=-1,f=a.length;++u<f;)if(!r.contains(a[u]))return!1;return!0}return this.each((typeof i=="function"?W2:i?F2:J2)(a,i))}function ew(){this.textContent=""}function tw(t){return function(){this.textContent=t}}function nw(t){return function(){var i=t.apply(this,arguments);this.textContent=i??""}}function lw(t){return arguments.length?this.each(t==null?ew:(typeof t=="function"?nw:tw)(t)):this.node().textContent}function iw(){this.innerHTML=""}function aw(t){return function(){this.innerHTML=t}}function ow(t){return function(){var i=t.apply(this,arguments);this.innerHTML=i??""}}function rw(t){return arguments.length?this.each(t==null?iw:(typeof t=="function"?ow:aw)(t)):this.node().innerHTML}function uw(){this.nextSibling&&this.parentNode.appendChild(this)}function cw(){return this.each(uw)}function sw(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function fw(){return this.each(sw)}function dw(t){var i=typeof t=="function"?t:Sy(t);return this.select(function(){return this.appendChild(i.apply(this,arguments))})}function hw(){return null}function pw(t,i){var a=typeof t=="function"?t:Sy(t),r=i==null?hw:typeof i=="function"?i:Ed(i);return this.select(function(){return this.insertBefore(a.apply(this,arguments),r.apply(this,arguments)||null)})}function mw(){var t=this.parentNode;t&&t.removeChild(this)}function gw(){return this.each(mw)}function yw(){var t=this.cloneNode(!1),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function vw(){var t=this.cloneNode(!0),i=this.parentNode;return i?i.insertBefore(t,this.nextSibling):t}function xw(t){return this.select(t?vw:yw)}function bw(t){return arguments.length?this.property("__data__",t):this.node().__data__}function Sw(t){return function(i){t.call(this,i,this.__data__)}}function ww(t){return t.trim().split(/^|\s+/).map(function(i){var a="",r=i.indexOf(".");return r>=0&&(a=i.slice(r+1),i=i.slice(0,r)),{type:i,name:a}})}function Ew(t){return function(){var i=this.__on;if(i){for(var a=0,r=-1,u=i.length,f;a<u;++a)f=i[a],(!t.type||f.type===t.type)&&f.name===t.name?this.removeEventListener(f.type,f.listener,f.options):i[++r]=f;++r?i.length=r:delete this.__on}}}function _w(t,i,a){return function(){var r=this.__on,u,f=Sw(i);if(r){for(var s=0,h=r.length;s<h;++s)if((u=r[s]).type===t.type&&u.name===t.name){this.removeEventListener(u.type,u.listener,u.options),this.addEventListener(u.type,u.listener=f,u.options=a),u.value=i;return}}this.addEventListener(t.type,f,a),u={type:t.type,name:t.name,value:i,listener:f,options:a},r?r.push(u):this.__on=[u]}}function Aw(t,i,a){var r=ww(t+""),u,f=r.length,s;if(arguments.length<2){var h=this.node().__on;if(h){for(var p=0,m=h.length,g;p<m;++p)for(u=0,g=h[p];u<f;++u)if((s=r[u]).type===g.type&&s.name===g.name)return g.value}return}for(h=i?_w:Ew,u=0;u<f;++u)this.each(h(r[u],i,a));return this}function Dy(t,i,a){var r=Ny(t),u=r.CustomEvent;typeof u=="function"?u=new u(i,a):(u=r.document.createEvent("Event"),a?(u.initEvent(i,a.bubbles,a.cancelable),u.detail=a.detail):u.initEvent(i,!1,!1)),t.dispatchEvent(u)}function Nw(t,i){return function(){return Dy(this,t,i)}}function Cw(t,i){return function(){return Dy(this,t,i.apply(this,arguments))}}function Tw(t,i){return this.each((typeof i=="function"?Cw:Nw)(t,i))}function*Mw(){for(var t=this._groups,i=0,a=t.length;i<a;++i)for(var r=t[i],u=0,f=r.length,s;u<f;++u)(s=r[u])&&(yield s)}var Oy=[null];function rn(t,i){this._groups=t,this._parents=i}function Wo(){return new rn([[document.documentElement]],Oy)}function zw(){return this}rn.prototype=Wo.prototype={constructor:rn,select:n2,selectAll:o2,selectChild:s2,selectChildren:p2,filter:m2,data:S2,enter:g2,exit:E2,join:_2,merge:A2,selection:zw,order:N2,sort:C2,call:M2,nodes:z2,node:D2,size:O2,empty:R2,each:j2,attr:V2,style:Z2,property:I2,classed:P2,text:lw,html:rw,raise:cw,lower:fw,append:dw,insert:pw,remove:gw,clone:xw,datum:bw,on:Aw,dispatch:Tw,[Symbol.iterator]:Mw};function bn(t){return typeof t=="string"?new rn([[document.querySelector(t)]],[document.documentElement]):new rn([[t]],Oy)}function Dw(t){let i;for(;i=t.sourceEvent;)t=i;return t}function kn(t,i){if(t=Dw(t),i===void 0&&(i=t.currentTarget),i){var a=i.ownerSVGElement||i;if(a.createSVGPoint){var r=a.createSVGPoint();return r.x=t.clientX,r.y=t.clientY,r=r.matrixTransform(i.getScreenCTM().inverse()),[r.x,r.y]}if(i.getBoundingClientRect){var u=i.getBoundingClientRect();return[t.clientX-u.left-i.clientLeft,t.clientY-u.top-i.clientTop]}}return[t.pageX,t.pageY]}const Ow={passive:!1},Yo={capture:!0,passive:!1};function kf(t){t.stopImmediatePropagation()}function wa(t){t.preventDefault(),t.stopImmediatePropagation()}function Ry(t){var i=t.document.documentElement,a=bn(t).on("dragstart.drag",wa,Yo);"onselectstart"in i?a.on("selectstart.drag",wa,Yo):(i.__noselect=i.style.MozUserSelect,i.style.MozUserSelect="none")}function jy(t,i){var a=t.document.documentElement,r=bn(t).on("dragstart.drag",null);i&&(r.on("click.drag",wa,Yo),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in a?r.on("selectstart.drag",null):(a.style.MozUserSelect=a.__noselect,delete a.__noselect)}const _u=t=>()=>t;function Jf(t,{sourceEvent:i,subject:a,target:r,identifier:u,active:f,x:s,y:h,dx:p,dy:m,dispatch:g}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},subject:{value:a,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},identifier:{value:u,enumerable:!0,configurable:!0},active:{value:f,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:h,enumerable:!0,configurable:!0},dx:{value:p,enumerable:!0,configurable:!0},dy:{value:m,enumerable:!0,configurable:!0},_:{value:g}})}Jf.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function Rw(t){return!t.ctrlKey&&!t.button}function jw(){return this.parentNode}function Hw(t,i){return i??{x:t.x,y:t.y}}function kw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hy(){var t=Rw,i=jw,a=Hw,r=kw,u={},f=ic("start","drag","end"),s=0,h,p,m,g,v=0;function x(k){k.on("mousedown.drag",w).filter(r).on("touchstart.drag",T).on("touchmove.drag",z,Ow).on("touchend.drag touchcancel.drag",j).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function w(k,K){if(!(g||!t.call(this,k,K))){var I=B(this,i.call(this,k,K),k,K,"mouse");I&&(bn(k.view).on("mousemove.drag",M,Yo).on("mouseup.drag",N,Yo),Ry(k.view),kf(k),m=!1,h=k.clientX,p=k.clientY,I("start",k))}}function M(k){if(wa(k),!m){var K=k.clientX-h,I=k.clientY-p;m=K*K+I*I>v}u.mouse("drag",k)}function N(k){bn(k.view).on("mousemove.drag mouseup.drag",null),jy(k.view,m),wa(k),u.mouse("end",k)}function T(k,K){if(t.call(this,k,K)){var I=k.changedTouches,ee=i.call(this,k,K),V=I.length,X,le;for(X=0;X<V;++X)(le=B(this,ee,k,K,I[X].identifier,I[X]))&&(kf(k),le("start",k,I[X]))}}function z(k){var K=k.changedTouches,I=K.length,ee,V;for(ee=0;ee<I;++ee)(V=u[K[ee].identifier])&&(wa(k),V("drag",k,K[ee]))}function j(k){var K=k.changedTouches,I=K.length,ee,V;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),ee=0;ee<I;++ee)(V=u[K[ee].identifier])&&(kf(k),V("end",k,K[ee]))}function B(k,K,I,ee,V,X){var le=f.copy(),oe=kn(X||I,K),re,ae,C;if((C=a.call(k,new Jf("beforestart",{sourceEvent:I,target:x,identifier:V,active:s,x:oe[0],y:oe[1],dx:0,dy:0,dispatch:le}),ee))!=null)return re=C.x-oe[0]||0,ae=C.y-oe[1]||0,function $(A,U,q){var E=oe,O;switch(A){case"start":u[V]=$,O=s++;break;case"end":delete u[V],--s;case"drag":oe=kn(q||U,K),O=s;break}le.call(A,k,new Jf(A,{sourceEvent:U,subject:C,target:x,identifier:V,active:O,x:oe[0]+re,y:oe[1]+ae,dx:oe[0]-E[0],dy:oe[1]-E[1],dispatch:le}),ee)}}return x.filter=function(k){return arguments.length?(t=typeof k=="function"?k:_u(!!k),x):t},x.container=function(k){return arguments.length?(i=typeof k=="function"?k:_u(k),x):i},x.subject=function(k){return arguments.length?(a=typeof k=="function"?k:_u(k),x):a},x.touchable=function(k){return arguments.length?(r=typeof k=="function"?k:_u(!!k),x):r},x.on=function(){var k=f.on.apply(f,arguments);return k===f?x:k},x.clickDistance=function(k){return arguments.length?(v=(k=+k)*k,x):Math.sqrt(v)},x}function Ad(t,i,a){t.prototype=i.prototype=a,a.constructor=t}function ky(t,i){var a=Object.create(t.prototype);for(var r in i)a[r]=i[r];return a}function Po(){}var Vo=.7,Vu=1/Vo,Ea="\\s*([+-]?\\d+)\\s*",qo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ln="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Lw=/^#([0-9a-f]{3,8})$/,Uw=new RegExp(`^rgb\\(${Ea},${Ea},${Ea}\\)$`),Bw=new RegExp(`^rgb\\(${Ln},${Ln},${Ln}\\)$`),Yw=new RegExp(`^rgba\\(${Ea},${Ea},${Ea},${qo}\\)$`),Vw=new RegExp(`^rgba\\(${Ln},${Ln},${Ln},${qo}\\)$`),qw=new RegExp(`^hsl\\(${qo},${Ln},${Ln}\\)$`),Gw=new RegExp(`^hsla\\(${qo},${Ln},${Ln},${qo}\\)$`),ng={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};Ad(Po,Go,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:lg,formatHex:lg,formatHex8:Xw,formatHsl:Zw,formatRgb:ig,toString:ig});function lg(){return this.rgb().formatHex()}function Xw(){return this.rgb().formatHex8()}function Zw(){return Ly(this).formatHsl()}function ig(){return this.rgb().formatRgb()}function Go(t){var i,a;return t=(t+"").trim().toLowerCase(),(i=Lw.exec(t))?(a=i[1].length,i=parseInt(i[1],16),a===6?ag(i):a===3?new Qt(i>>8&15|i>>4&240,i>>4&15|i&240,(i&15)<<4|i&15,1):a===8?Au(i>>24&255,i>>16&255,i>>8&255,(i&255)/255):a===4?Au(i>>12&15|i>>8&240,i>>8&15|i>>4&240,i>>4&15|i&240,((i&15)<<4|i&15)/255):null):(i=Uw.exec(t))?new Qt(i[1],i[2],i[3],1):(i=Bw.exec(t))?new Qt(i[1]*255/100,i[2]*255/100,i[3]*255/100,1):(i=Yw.exec(t))?Au(i[1],i[2],i[3],i[4]):(i=Vw.exec(t))?Au(i[1]*255/100,i[2]*255/100,i[3]*255/100,i[4]):(i=qw.exec(t))?ug(i[1],i[2]/100,i[3]/100,1):(i=Gw.exec(t))?ug(i[1],i[2]/100,i[3]/100,i[4]):ng.hasOwnProperty(t)?ag(ng[t]):t==="transparent"?new Qt(NaN,NaN,NaN,0):null}function ag(t){return new Qt(t>>16&255,t>>8&255,t&255,1)}function Au(t,i,a,r){return r<=0&&(t=i=a=NaN),new Qt(t,i,a,r)}function $w(t){return t instanceof Po||(t=Go(t)),t?(t=t.rgb(),new Qt(t.r,t.g,t.b,t.opacity)):new Qt}function Wf(t,i,a,r){return arguments.length===1?$w(t):new Qt(t,i,a,r??1)}function Qt(t,i,a,r){this.r=+t,this.g=+i,this.b=+a,this.opacity=+r}Ad(Qt,Wf,ky(Po,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new Qt(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?Vo:Math.pow(Vo,t),new Qt(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Qt(Ti(this.r),Ti(this.g),Ti(this.b),qu(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:og,formatHex:og,formatHex8:Qw,formatRgb:rg,toString:rg}));function og(){return`#${Ni(this.r)}${Ni(this.g)}${Ni(this.b)}`}function Qw(){return`#${Ni(this.r)}${Ni(this.g)}${Ni(this.b)}${Ni((isNaN(this.opacity)?1:this.opacity)*255)}`}function rg(){const t=qu(this.opacity);return`${t===1?"rgb(":"rgba("}${Ti(this.r)}, ${Ti(this.g)}, ${Ti(this.b)}${t===1?")":`, ${t})`}`}function qu(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Ti(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Ni(t){return t=Ti(t),(t<16?"0":"")+t.toString(16)}function ug(t,i,a,r){return r<=0?t=i=a=NaN:a<=0||a>=1?t=i=NaN:i<=0&&(t=NaN),new Cn(t,i,a,r)}function Ly(t){if(t instanceof Cn)return new Cn(t.h,t.s,t.l,t.opacity);if(t instanceof Po||(t=Go(t)),!t)return new Cn;if(t instanceof Cn)return t;t=t.rgb();var i=t.r/255,a=t.g/255,r=t.b/255,u=Math.min(i,a,r),f=Math.max(i,a,r),s=NaN,h=f-u,p=(f+u)/2;return h?(i===f?s=(a-r)/h+(a<r)*6:a===f?s=(r-i)/h+2:s=(i-a)/h+4,h/=p<.5?f+u:2-f-u,s*=60):h=p>0&&p<1?0:s,new Cn(s,h,p,t.opacity)}function Kw(t,i,a,r){return arguments.length===1?Ly(t):new Cn(t,i,a,r??1)}function Cn(t,i,a,r){this.h=+t,this.s=+i,this.l=+a,this.opacity=+r}Ad(Cn,Kw,ky(Po,{brighter(t){return t=t==null?Vu:Math.pow(Vu,t),new Cn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?Vo:Math.pow(Vo,t),new Cn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,i=isNaN(t)||isNaN(this.s)?0:this.s,a=this.l,r=a+(a<.5?a:1-a)*i,u=2*a-r;return new Qt(Lf(t>=240?t-240:t+120,u,r),Lf(t,u,r),Lf(t<120?t+240:t-120,u,r),this.opacity)},clamp(){return new Cn(cg(this.h),Nu(this.s),Nu(this.l),qu(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=qu(this.opacity);return`${t===1?"hsl(":"hsla("}${cg(this.h)}, ${Nu(this.s)*100}%, ${Nu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function cg(t){return t=(t||0)%360,t<0?t+360:t}function Nu(t){return Math.max(0,Math.min(1,t||0))}function Lf(t,i,a){return(t<60?i+(a-i)*t/60:t<180?a:t<240?i+(a-i)*(240-t)/60:i)*255}const Uy=t=>()=>t;function Iw(t,i){return function(a){return t+a*i}}function Fw(t,i,a){return t=Math.pow(t,a),i=Math.pow(i,a)-t,a=1/a,function(r){return Math.pow(t+r*i,a)}}function Jw(t){return(t=+t)==1?By:function(i,a){return a-i?Fw(i,a,t):Uy(isNaN(i)?a:i)}}function By(t,i){var a=i-t;return a?Iw(t,a):Uy(isNaN(t)?i:t)}const sg=(function t(i){var a=Jw(i);function r(u,f){var s=a((u=Wf(u)).r,(f=Wf(f)).r),h=a(u.g,f.g),p=a(u.b,f.b),m=By(u.opacity,f.opacity);return function(g){return u.r=s(g),u.g=h(g),u.b=p(g),u.opacity=m(g),u+""}}return r.gamma=t,r})(1);function $l(t,i){return t=+t,i=+i,function(a){return t*(1-a)+i*a}}var Pf=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Uf=new RegExp(Pf.source,"g");function Ww(t){return function(){return t}}function Pw(t){return function(i){return t(i)+""}}function eE(t,i){var a=Pf.lastIndex=Uf.lastIndex=0,r,u,f,s=-1,h=[],p=[];for(t=t+"",i=i+"";(r=Pf.exec(t))&&(u=Uf.exec(i));)(f=u.index)>a&&(f=i.slice(a,f),h[s]?h[s]+=f:h[++s]=f),(r=r[0])===(u=u[0])?h[s]?h[s]+=u:h[++s]=u:(h[++s]=null,p.push({i:s,x:$l(r,u)})),a=Uf.lastIndex;return a<i.length&&(f=i.slice(a),h[s]?h[s]+=f:h[++s]=f),h.length<2?p[0]?Pw(p[0].x):Ww(i):(i=p.length,function(m){for(var g=0,v;g<i;++g)h[(v=p[g]).i]=v.x(m);return h.join("")})}var fg=180/Math.PI,ed={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Yy(t,i,a,r,u,f){var s,h,p;return(s=Math.sqrt(t*t+i*i))&&(t/=s,i/=s),(p=t*a+i*r)&&(a-=t*p,r-=i*p),(h=Math.sqrt(a*a+r*r))&&(a/=h,r/=h,p/=h),t*r<i*a&&(t=-t,i=-i,p=-p,s=-s),{translateX:u,translateY:f,rotate:Math.atan2(i,t)*fg,skewX:Math.atan(p)*fg,scaleX:s,scaleY:h}}var Cu;function tE(t){const i=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return i.isIdentity?ed:Yy(i.a,i.b,i.c,i.d,i.e,i.f)}function nE(t){return t==null||(Cu||(Cu=document.createElementNS("http://www.w3.org/2000/svg","g")),Cu.setAttribute("transform",t),!(t=Cu.transform.baseVal.consolidate()))?ed:(t=t.matrix,Yy(t.a,t.b,t.c,t.d,t.e,t.f))}function Vy(t,i,a,r){function u(m){return m.length?m.pop()+" ":""}function f(m,g,v,x,w,M){if(m!==v||g!==x){var N=w.push("translate(",null,i,null,a);M.push({i:N-4,x:$l(m,v)},{i:N-2,x:$l(g,x)})}else(v||x)&&w.push("translate("+v+i+x+a)}function s(m,g,v,x){m!==g?(m-g>180?g+=360:g-m>180&&(m+=360),x.push({i:v.push(u(v)+"rotate(",null,r)-2,x:$l(m,g)})):g&&v.push(u(v)+"rotate("+g+r)}function h(m,g,v,x){m!==g?x.push({i:v.push(u(v)+"skewX(",null,r)-2,x:$l(m,g)}):g&&v.push(u(v)+"skewX("+g+r)}function p(m,g,v,x,w,M){if(m!==v||g!==x){var N=w.push(u(w)+"scale(",null,",",null,")");M.push({i:N-4,x:$l(m,v)},{i:N-2,x:$l(g,x)})}else(v!==1||x!==1)&&w.push(u(w)+"scale("+v+","+x+")")}return function(m,g){var v=[],x=[];return m=t(m),g=t(g),f(m.translateX,m.translateY,g.translateX,g.translateY,v,x),s(m.rotate,g.rotate,v,x),h(m.skewX,g.skewX,v,x),p(m.scaleX,m.scaleY,g.scaleX,g.scaleY,v,x),m=g=null,function(w){for(var M=-1,N=x.length,T;++M<N;)v[(T=x[M]).i]=T.x(w);return v.join("")}}}var lE=Vy(tE,"px, ","px)","deg)"),iE=Vy(nE,", ",")",")"),aE=1e-12;function dg(t){return((t=Math.exp(t))+1/t)/2}function oE(t){return((t=Math.exp(t))-1/t)/2}function rE(t){return((t=Math.exp(2*t))-1)/(t+1)}const uE=(function t(i,a,r){function u(f,s){var h=f[0],p=f[1],m=f[2],g=s[0],v=s[1],x=s[2],w=g-h,M=v-p,N=w*w+M*M,T,z;if(N<aE)z=Math.log(x/m)/i,T=function(ee){return[h+ee*w,p+ee*M,m*Math.exp(i*ee*z)]};else{var j=Math.sqrt(N),B=(x*x-m*m+r*N)/(2*m*a*j),k=(x*x-m*m-r*N)/(2*x*a*j),K=Math.log(Math.sqrt(B*B+1)-B),I=Math.log(Math.sqrt(k*k+1)-k);z=(I-K)/i,T=function(ee){var V=ee*z,X=dg(K),le=m/(a*j)*(X*rE(i*V+K)-oE(K));return[h+le*w,p+le*M,m*X/dg(i*V+K)]}}return T.duration=z*1e3*i/Math.SQRT2,T}return u.rho=function(f){var s=Math.max(.001,+f),h=s*s,p=h*h;return t(s,h,p)},u})(Math.SQRT2,2,4);var Ta=0,ko=0,zo=0,qy=1e3,Gu,Lo,Xu=0,zi=0,oc=0,Xo=typeof performance=="object"&&performance.now?performance:Date,Gy=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Nd(){return zi||(Gy(cE),zi=Xo.now()+oc)}function cE(){zi=0}function Zu(){this._call=this._time=this._next=null}Zu.prototype=Xy.prototype={constructor:Zu,restart:function(t,i,a){if(typeof t!="function")throw new TypeError("callback is not a function");a=(a==null?Nd():+a)+(i==null?0:+i),!this._next&&Lo!==this&&(Lo?Lo._next=this:Gu=this,Lo=this),this._call=t,this._time=a,td()},stop:function(){this._call&&(this._call=null,this._time=1/0,td())}};function Xy(t,i,a){var r=new Zu;return r.restart(t,i,a),r}function sE(){Nd(),++Ta;for(var t=Gu,i;t;)(i=zi-t._time)>=0&&t._call.call(void 0,i),t=t._next;--Ta}function hg(){zi=(Xu=Xo.now())+oc,Ta=ko=0;try{sE()}finally{Ta=0,dE(),zi=0}}function fE(){var t=Xo.now(),i=t-Xu;i>qy&&(oc-=i,Xu=t)}function dE(){for(var t,i=Gu,a,r=1/0;i;)i._call?(r>i._time&&(r=i._time),t=i,i=i._next):(a=i._next,i._next=null,i=t?t._next=a:Gu=a);Lo=t,td(r)}function td(t){if(!Ta){ko&&(ko=clearTimeout(ko));var i=t-zi;i>24?(t<1/0&&(ko=setTimeout(hg,t-Xo.now()-oc)),zo&&(zo=clearInterval(zo))):(zo||(Xu=Xo.now(),zo=setInterval(fE,qy)),Ta=1,Gy(hg))}}function pg(t,i,a){var r=new Zu;return i=i==null?0:+i,r.restart(u=>{r.stop(),t(u+i)},i,a),r}var hE=ic("start","end","cancel","interrupt"),pE=[],Zy=0,mg=1,nd=2,Lu=3,gg=4,ld=5,Uu=6;function rc(t,i,a,r,u,f){var s=t.__transition;if(!s)t.__transition={};else if(a in s)return;mE(t,a,{name:i,index:r,group:u,on:hE,tween:pE,time:f.time,delay:f.delay,duration:f.duration,ease:f.ease,timer:null,state:Zy})}function Cd(t,i){var a=Mn(t,i);if(a.state>Zy)throw new Error("too late; already scheduled");return a}function Bn(t,i){var a=Mn(t,i);if(a.state>Lu)throw new Error("too late; already running");return a}function Mn(t,i){var a=t.__transition;if(!a||!(a=a[i]))throw new Error("transition not found");return a}function mE(t,i,a){var r=t.__transition,u;r[i]=a,a.timer=Xy(f,0,a.time);function f(m){a.state=mg,a.timer.restart(s,a.delay,a.time),a.delay<=m&&s(m-a.delay)}function s(m){var g,v,x,w;if(a.state!==mg)return p();for(g in r)if(w=r[g],w.name===a.name){if(w.state===Lu)return pg(s);w.state===gg?(w.state=Uu,w.timer.stop(),w.on.call("interrupt",t,t.__data__,w.index,w.group),delete r[g]):+g<i&&(w.state=Uu,w.timer.stop(),w.on.call("cancel",t,t.__data__,w.index,w.group),delete r[g])}if(pg(function(){a.state===Lu&&(a.state=gg,a.timer.restart(h,a.delay,a.time),h(m))}),a.state=nd,a.on.call("start",t,t.__data__,a.index,a.group),a.state===nd){for(a.state=Lu,u=new Array(x=a.tween.length),g=0,v=-1;g<x;++g)(w=a.tween[g].value.call(t,t.__data__,a.index,a.group))&&(u[++v]=w);u.length=v+1}}function h(m){for(var g=m<a.duration?a.ease.call(null,m/a.duration):(a.timer.restart(p),a.state=ld,1),v=-1,x=u.length;++v<x;)u[v].call(t,g);a.state===ld&&(a.on.call("end",t,t.__data__,a.index,a.group),p())}function p(){a.state=Uu,a.timer.stop(),delete r[i];for(var m in r)return;delete t.__transition}}function Bu(t,i){var a=t.__transition,r,u,f=!0,s;if(a){i=i==null?null:i+"";for(s in a){if((r=a[s]).name!==i){f=!1;continue}u=r.state>nd&&r.state<ld,r.state=Uu,r.timer.stop(),r.on.call(u?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete a[s]}f&&delete t.__transition}}function gE(t){return this.each(function(){Bu(this,t)})}function yE(t,i){var a,r;return function(){var u=Bn(this,t),f=u.tween;if(f!==a){r=a=f;for(var s=0,h=r.length;s<h;++s)if(r[s].name===i){r=r.slice(),r.splice(s,1);break}}u.tween=r}}function vE(t,i,a){var r,u;if(typeof a!="function")throw new Error;return function(){var f=Bn(this,t),s=f.tween;if(s!==r){u=(r=s).slice();for(var h={name:i,value:a},p=0,m=u.length;p<m;++p)if(u[p].name===i){u[p]=h;break}p===m&&u.push(h)}f.tween=u}}function xE(t,i){var a=this._id;if(t+="",arguments.length<2){for(var r=Mn(this.node(),a).tween,u=0,f=r.length,s;u<f;++u)if((s=r[u]).name===t)return s.value;return null}return this.each((i==null?yE:vE)(a,t,i))}function Td(t,i,a){var r=t._id;return t.each(function(){var u=Bn(this,r);(u.value||(u.value={}))[i]=a.apply(this,arguments)}),function(u){return Mn(u,r).value[i]}}function $y(t,i){var a;return(typeof i=="number"?$l:i instanceof Go?sg:(a=Go(i))?(i=a,sg):eE)(t,i)}function bE(t){return function(){this.removeAttribute(t)}}function SE(t){return function(){this.removeAttributeNS(t.space,t.local)}}function wE(t,i,a){var r,u=a+"",f;return function(){var s=this.getAttribute(t);return s===u?null:s===r?f:f=i(r=s,a)}}function EE(t,i,a){var r,u=a+"",f;return function(){var s=this.getAttributeNS(t.space,t.local);return s===u?null:s===r?f:f=i(r=s,a)}}function _E(t,i,a){var r,u,f;return function(){var s,h=a(this),p;return h==null?void this.removeAttribute(t):(s=this.getAttribute(t),p=h+"",s===p?null:s===r&&p===u?f:(u=p,f=i(r=s,h)))}}function AE(t,i,a){var r,u,f;return function(){var s,h=a(this),p;return h==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),p=h+"",s===p?null:s===r&&p===u?f:(u=p,f=i(r=s,h)))}}function NE(t,i){var a=ac(t),r=a==="transform"?iE:$y;return this.attrTween(t,typeof i=="function"?(a.local?AE:_E)(a,r,Td(this,"attr."+t,i)):i==null?(a.local?SE:bE)(a):(a.local?EE:wE)(a,r,i))}function CE(t,i){return function(a){this.setAttribute(t,i.call(this,a))}}function TE(t,i){return function(a){this.setAttributeNS(t.space,t.local,i.call(this,a))}}function ME(t,i){var a,r;function u(){var f=i.apply(this,arguments);return f!==r&&(a=(r=f)&&TE(t,f)),a}return u._value=i,u}function zE(t,i){var a,r;function u(){var f=i.apply(this,arguments);return f!==r&&(a=(r=f)&&CE(t,f)),a}return u._value=i,u}function DE(t,i){var a="attr."+t;if(arguments.length<2)return(a=this.tween(a))&&a._value;if(i==null)return this.tween(a,null);if(typeof i!="function")throw new Error;var r=ac(t);return this.tween(a,(r.local?ME:zE)(r,i))}function OE(t,i){return function(){Cd(this,t).delay=+i.apply(this,arguments)}}function RE(t,i){return i=+i,function(){Cd(this,t).delay=i}}function jE(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?OE:RE)(i,t)):Mn(this.node(),i).delay}function HE(t,i){return function(){Bn(this,t).duration=+i.apply(this,arguments)}}function kE(t,i){return i=+i,function(){Bn(this,t).duration=i}}function LE(t){var i=this._id;return arguments.length?this.each((typeof t=="function"?HE:kE)(i,t)):Mn(this.node(),i).duration}function UE(t,i){if(typeof i!="function")throw new Error;return function(){Bn(this,t).ease=i}}function BE(t){var i=this._id;return arguments.length?this.each(UE(i,t)):Mn(this.node(),i).ease}function YE(t,i){return function(){var a=i.apply(this,arguments);if(typeof a!="function")throw new Error;Bn(this,t).ease=a}}function VE(t){if(typeof t!="function")throw new Error;return this.each(YE(this._id,t))}function qE(t){typeof t!="function"&&(t=Ey(t));for(var i=this._groups,a=i.length,r=new Array(a),u=0;u<a;++u)for(var f=i[u],s=f.length,h=r[u]=[],p,m=0;m<s;++m)(p=f[m])&&t.call(p,p.__data__,m,f)&&h.push(p);return new dl(r,this._parents,this._name,this._id)}function GE(t){if(t._id!==this._id)throw new Error;for(var i=this._groups,a=t._groups,r=i.length,u=a.length,f=Math.min(r,u),s=new Array(r),h=0;h<f;++h)for(var p=i[h],m=a[h],g=p.length,v=s[h]=new Array(g),x,w=0;w<g;++w)(x=p[w]||m[w])&&(v[w]=x);for(;h<r;++h)s[h]=i[h];return new dl(s,this._parents,this._name,this._id)}function XE(t){return(t+"").trim().split(/^|\s+/).every(function(i){var a=i.indexOf(".");return a>=0&&(i=i.slice(0,a)),!i||i==="start"})}function ZE(t,i,a){var r,u,f=XE(i)?Cd:Bn;return function(){var s=f(this,t),h=s.on;h!==r&&(u=(r=h).copy()).on(i,a),s.on=u}}function $E(t,i){var a=this._id;return arguments.length<2?Mn(this.node(),a).on.on(t):this.each(ZE(a,t,i))}function QE(t){return function(){var i=this.parentNode;for(var a in this.__transition)if(+a!==t)return;i&&i.removeChild(this)}}function KE(){return this.on("end.remove",QE(this._id))}function IE(t){var i=this._name,a=this._id;typeof t!="function"&&(t=Ed(t));for(var r=this._groups,u=r.length,f=new Array(u),s=0;s<u;++s)for(var h=r[s],p=h.length,m=f[s]=new Array(p),g,v,x=0;x<p;++x)(g=h[x])&&(v=t.call(g,g.__data__,x,h))&&("__data__"in g&&(v.__data__=g.__data__),m[x]=v,rc(m[x],i,a,x,m,Mn(g,a)));return new dl(f,this._parents,i,a)}function FE(t){var i=this._name,a=this._id;typeof t!="function"&&(t=wy(t));for(var r=this._groups,u=r.length,f=[],s=[],h=0;h<u;++h)for(var p=r[h],m=p.length,g,v=0;v<m;++v)if(g=p[v]){for(var x=t.call(g,g.__data__,v,p),w,M=Mn(g,a),N=0,T=x.length;N<T;++N)(w=x[N])&&rc(w,i,a,N,x,M);f.push(x),s.push(g)}return new dl(f,s,i,a)}var JE=Wo.prototype.constructor;function WE(){return new JE(this._groups,this._parents)}function PE(t,i){var a,r,u;return function(){var f=Ca(this,t),s=(this.style.removeProperty(t),Ca(this,t));return f===s?null:f===a&&s===r?u:u=i(a=f,r=s)}}function Qy(t){return function(){this.style.removeProperty(t)}}function e_(t,i,a){var r,u=a+"",f;return function(){var s=Ca(this,t);return s===u?null:s===r?f:f=i(r=s,a)}}function t_(t,i,a){var r,u,f;return function(){var s=Ca(this,t),h=a(this),p=h+"";return h==null&&(p=h=(this.style.removeProperty(t),Ca(this,t))),s===p?null:s===r&&p===u?f:(u=p,f=i(r=s,h))}}function n_(t,i){var a,r,u,f="style."+i,s="end."+f,h;return function(){var p=Bn(this,t),m=p.on,g=p.value[f]==null?h||(h=Qy(i)):void 0;(m!==a||u!==g)&&(r=(a=m).copy()).on(s,u=g),p.on=r}}function l_(t,i,a){var r=(t+="")=="transform"?lE:$y;return i==null?this.styleTween(t,PE(t,r)).on("end.style."+t,Qy(t)):typeof i=="function"?this.styleTween(t,t_(t,r,Td(this,"style."+t,i))).each(n_(this._id,t)):this.styleTween(t,e_(t,r,i),a).on("end.style."+t,null)}function i_(t,i,a){return function(r){this.style.setProperty(t,i.call(this,r),a)}}function a_(t,i,a){var r,u;function f(){var s=i.apply(this,arguments);return s!==u&&(r=(u=s)&&i_(t,s,a)),r}return f._value=i,f}function o_(t,i,a){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(i==null)return this.tween(r,null);if(typeof i!="function")throw new Error;return this.tween(r,a_(t,i,a??""))}function r_(t){return function(){this.textContent=t}}function u_(t){return function(){var i=t(this);this.textContent=i??""}}function c_(t){return this.tween("text",typeof t=="function"?u_(Td(this,"text",t)):r_(t==null?"":t+""))}function s_(t){return function(i){this.textContent=t.call(this,i)}}function f_(t){var i,a;function r(){var u=t.apply(this,arguments);return u!==a&&(i=(a=u)&&s_(u)),i}return r._value=t,r}function d_(t){var i="text";if(arguments.length<1)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,f_(t))}function h_(){for(var t=this._name,i=this._id,a=Ky(),r=this._groups,u=r.length,f=0;f<u;++f)for(var s=r[f],h=s.length,p,m=0;m<h;++m)if(p=s[m]){var g=Mn(p,i);rc(p,t,a,m,s,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new dl(r,this._parents,t,a)}function p_(){var t,i,a=this,r=a._id,u=a.size();return new Promise(function(f,s){var h={value:s},p={value:function(){--u===0&&f()}};a.each(function(){var m=Bn(this,r),g=m.on;g!==t&&(i=(t=g).copy(),i._.cancel.push(h),i._.interrupt.push(h),i._.end.push(p)),m.on=i}),u===0&&f()})}var m_=0;function dl(t,i,a,r){this._groups=t,this._parents=i,this._name=a,this._id=r}function Ky(){return++m_}var ul=Wo.prototype;dl.prototype={constructor:dl,select:IE,selectAll:FE,selectChild:ul.selectChild,selectChildren:ul.selectChildren,filter:qE,merge:GE,selection:WE,transition:h_,call:ul.call,nodes:ul.nodes,node:ul.node,size:ul.size,empty:ul.empty,each:ul.each,on:$E,attr:NE,attrTween:DE,style:l_,styleTween:o_,text:c_,textTween:d_,remove:KE,tween:xE,delay:jE,duration:LE,ease:BE,easeVarying:VE,end:p_,[Symbol.iterator]:ul[Symbol.iterator]};function g_(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var y_={time:null,delay:0,duration:250,ease:g_};function v_(t,i){for(var a;!(a=t.__transition)||!(a=a[i]);)if(!(t=t.parentNode))throw new Error(`transition ${i} not found`);return a}function x_(t){var i,a;t instanceof dl?(i=t._id,t=t._name):(i=Ky(),(a=y_).time=Nd(),t=t==null?null:t+"");for(var r=this._groups,u=r.length,f=0;f<u;++f)for(var s=r[f],h=s.length,p,m=0;m<h;++m)(p=s[m])&&rc(p,t,i,m,s,a||v_(p,i));return new dl(r,this._parents,t,i)}Wo.prototype.interrupt=gE;Wo.prototype.transition=x_;const Tu=t=>()=>t;function b_(t,{sourceEvent:i,target:a,transform:r,dispatch:u}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:i,enumerable:!0,configurable:!0},target:{value:a,enumerable:!0,configurable:!0},transform:{value:r,enumerable:!0,configurable:!0},_:{value:u}})}function sl(t,i,a){this.k=t,this.x=i,this.y=a}sl.prototype={constructor:sl,scale:function(t){return t===1?this:new sl(this.k*t,this.x,this.y)},translate:function(t,i){return t===0&i===0?this:new sl(this.k,this.x+this.k*t,this.y+this.k*i)},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 Fl=new sl(1,0,0);sl.prototype;function Bf(t){t.stopImmediatePropagation()}function Do(t){t.preventDefault(),t.stopImmediatePropagation()}function S_(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function w_(){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 yg(){return this.__zoom||Fl}function E_(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function __(){return navigator.maxTouchPoints||"ontouchstart"in this}function A_(t,i,a){var r=t.invertX(i[0][0])-a[0][0],u=t.invertX(i[1][0])-a[1][0],f=t.invertY(i[0][1])-a[0][1],s=t.invertY(i[1][1])-a[1][1];return t.translate(u>r?(r+u)/2:Math.min(0,r)||Math.max(0,u),s>f?(f+s)/2:Math.min(0,f)||Math.max(0,s))}function N_(){var t=S_,i=w_,a=A_,r=E_,u=__,f=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],h=250,p=uE,m=ic("start","zoom","end"),g,v,x,w=500,M=150,N=0,T=10;function z(C){C.property("__zoom",yg).on("wheel.zoom",V,{passive:!1}).on("mousedown.zoom",X).on("dblclick.zoom",le).filter(u).on("touchstart.zoom",oe).on("touchmove.zoom",re).on("touchend.zoom touchcancel.zoom",ae).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}z.transform=function(C,$,A,U){var q=C.selection?C.selection():C;q.property("__zoom",yg),C!==q?K(C,$,A,U):q.interrupt().each(function(){I(this,arguments).event(U).start().zoom(null,typeof $=="function"?$.apply(this,arguments):$).end()})},z.scaleBy=function(C,$,A,U){z.scaleTo(C,function(){var q=this.__zoom.k,E=typeof $=="function"?$.apply(this,arguments):$;return q*E},A,U)},z.scaleTo=function(C,$,A,U){z.transform(C,function(){var q=i.apply(this,arguments),E=this.__zoom,O=A==null?k(q):typeof A=="function"?A.apply(this,arguments):A,_=E.invert(O),H=typeof $=="function"?$.apply(this,arguments):$;return a(B(j(E,H),O,_),q,s)},A,U)},z.translateBy=function(C,$,A,U){z.transform(C,function(){return a(this.__zoom.translate(typeof $=="function"?$.apply(this,arguments):$,typeof A=="function"?A.apply(this,arguments):A),i.apply(this,arguments),s)},null,U)},z.translateTo=function(C,$,A,U,q){z.transform(C,function(){var E=i.apply(this,arguments),O=this.__zoom,_=U==null?k(E):typeof U=="function"?U.apply(this,arguments):U;return a(Fl.translate(_[0],_[1]).scale(O.k).translate(typeof $=="function"?-$.apply(this,arguments):-$,typeof A=="function"?-A.apply(this,arguments):-A),E,s)},U,q)};function j(C,$){return $=Math.max(f[0],Math.min(f[1],$)),$===C.k?C:new sl($,C.x,C.y)}function B(C,$,A){var U=$[0]-A[0]*C.k,q=$[1]-A[1]*C.k;return U===C.x&&q===C.y?C:new sl(C.k,U,q)}function k(C){return[(+C[0][0]+ +C[1][0])/2,(+C[0][1]+ +C[1][1])/2]}function K(C,$,A,U){C.on("start.zoom",function(){I(this,arguments).event(U).start()}).on("interrupt.zoom end.zoom",function(){I(this,arguments).event(U).end()}).tween("zoom",function(){var q=this,E=arguments,O=I(q,E).event(U),_=i.apply(q,E),H=A==null?k(_):typeof A=="function"?A.apply(q,E):A,Q=Math.max(_[1][0]-_[0][0],_[1][1]-_[0][1]),W=q.__zoom,ue=typeof $=="function"?$.apply(q,E):$,ce=p(W.invert(H).concat(Q/W.k),ue.invert(H).concat(Q/ue.k));return function(fe){if(fe===1)fe=ue;else{var be=ce(fe),de=Q/be[2];fe=new sl(de,H[0]-be[0]*de,H[1]-be[1]*de)}O.zoom(null,fe)}})}function I(C,$,A){return!A&&C.__zooming||new ee(C,$)}function ee(C,$){this.that=C,this.args=$,this.active=0,this.sourceEvent=null,this.extent=i.apply(C,$),this.taps=0}ee.prototype={event:function(C){return C&&(this.sourceEvent=C),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(C,$){return this.mouse&&C!=="mouse"&&(this.mouse[1]=$.invert(this.mouse[0])),this.touch0&&C!=="touch"&&(this.touch0[1]=$.invert(this.touch0[0])),this.touch1&&C!=="touch"&&(this.touch1[1]=$.invert(this.touch1[0])),this.that.__zoom=$,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(C){var $=bn(this.that).datum();m.call(C,this.that,new b_(C,{sourceEvent:this.sourceEvent,target:z,transform:this.that.__zoom,dispatch:m}),$)}};function V(C,...$){if(!t.apply(this,arguments))return;var A=I(this,$).event(C),U=this.__zoom,q=Math.max(f[0],Math.min(f[1],U.k*Math.pow(2,r.apply(this,arguments)))),E=kn(C);if(A.wheel)(A.mouse[0][0]!==E[0]||A.mouse[0][1]!==E[1])&&(A.mouse[1]=U.invert(A.mouse[0]=E)),clearTimeout(A.wheel);else{if(U.k===q)return;A.mouse=[E,U.invert(E)],Bu(this),A.start()}Do(C),A.wheel=setTimeout(O,M),A.zoom("mouse",a(B(j(U,q),A.mouse[0],A.mouse[1]),A.extent,s));function O(){A.wheel=null,A.end()}}function X(C,...$){if(x||!t.apply(this,arguments))return;var A=C.currentTarget,U=I(this,$,!0).event(C),q=bn(C.view).on("mousemove.zoom",H,!0).on("mouseup.zoom",Q,!0),E=kn(C,A),O=C.clientX,_=C.clientY;Ry(C.view),Bf(C),U.mouse=[E,this.__zoom.invert(E)],Bu(this),U.start();function H(W){if(Do(W),!U.moved){var ue=W.clientX-O,ce=W.clientY-_;U.moved=ue*ue+ce*ce>N}U.event(W).zoom("mouse",a(B(U.that.__zoom,U.mouse[0]=kn(W,A),U.mouse[1]),U.extent,s))}function Q(W){q.on("mousemove.zoom mouseup.zoom",null),jy(W.view,U.moved),Do(W),U.event(W).end()}}function le(C,...$){if(t.apply(this,arguments)){var A=this.__zoom,U=kn(C.changedTouches?C.changedTouches[0]:C,this),q=A.invert(U),E=A.k*(C.shiftKey?.5:2),O=a(B(j(A,E),U,q),i.apply(this,$),s);Do(C),h>0?bn(this).transition().duration(h).call(K,O,U,C):bn(this).call(z.transform,O,U,C)}}function oe(C,...$){if(t.apply(this,arguments)){var A=C.touches,U=A.length,q=I(this,$,C.changedTouches.length===U).event(C),E,O,_,H;for(Bf(C),O=0;O<U;++O)_=A[O],H=kn(_,this),H=[H,this.__zoom.invert(H),_.identifier],q.touch0?!q.touch1&&q.touch0[2]!==H[2]&&(q.touch1=H,q.taps=0):(q.touch0=H,E=!0,q.taps=1+!!g);g&&(g=clearTimeout(g)),E&&(q.taps<2&&(v=H[0],g=setTimeout(function(){g=null},w)),Bu(this),q.start())}}function re(C,...$){if(this.__zooming){var A=I(this,$).event(C),U=C.changedTouches,q=U.length,E,O,_,H;for(Do(C),E=0;E<q;++E)O=U[E],_=kn(O,this),A.touch0&&A.touch0[2]===O.identifier?A.touch0[0]=_:A.touch1&&A.touch1[2]===O.identifier&&(A.touch1[0]=_);if(O=A.that.__zoom,A.touch1){var Q=A.touch0[0],W=A.touch0[1],ue=A.touch1[0],ce=A.touch1[1],fe=(fe=ue[0]-Q[0])*fe+(fe=ue[1]-Q[1])*fe,be=(be=ce[0]-W[0])*be+(be=ce[1]-W[1])*be;O=j(O,Math.sqrt(fe/be)),_=[(Q[0]+ue[0])/2,(Q[1]+ue[1])/2],H=[(W[0]+ce[0])/2,(W[1]+ce[1])/2]}else if(A.touch0)_=A.touch0[0],H=A.touch0[1];else return;A.zoom("touch",a(B(O,_,H),A.extent,s))}}function ae(C,...$){if(this.__zooming){var A=I(this,$).event(C),U=C.changedTouches,q=U.length,E,O;for(Bf(C),x&&clearTimeout(x),x=setTimeout(function(){x=null},w),E=0;E<q;++E)O=U[E],A.touch0&&A.touch0[2]===O.identifier?delete A.touch0:A.touch1&&A.touch1[2]===O.identifier&&delete A.touch1;if(A.touch1&&!A.touch0&&(A.touch0=A.touch1,delete A.touch1),A.touch0)A.touch0[1]=this.__zoom.invert(A.touch0[0]);else if(A.end(),A.taps===2&&(O=kn(O,this),Math.hypot(v[0]-O[0],v[1]-O[1])<T)){var _=bn(this).on("dblclick.zoom");_&&_.apply(this,arguments)}}}return z.wheelDelta=function(C){return arguments.length?(r=typeof C=="function"?C:Tu(+C),z):r},z.filter=function(C){return arguments.length?(t=typeof C=="function"?C:Tu(!!C),z):t},z.touchable=function(C){return arguments.length?(u=typeof C=="function"?C:Tu(!!C),z):u},z.extent=function(C){return arguments.length?(i=typeof C=="function"?C:Tu([[+C[0][0],+C[0][1]],[+C[1][0],+C[1][1]]]),z):i},z.scaleExtent=function(C){return arguments.length?(f[0]=+C[0],f[1]=+C[1],z):[f[0],f[1]]},z.translateExtent=function(C){return arguments.length?(s[0][0]=+C[0][0],s[1][0]=+C[1][0],s[0][1]=+C[0][1],s[1][1]=+C[1][1],z):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},z.constrain=function(C){return arguments.length?(a=C,z):a},z.duration=function(C){return arguments.length?(h=+C,z):h},z.interpolate=function(C){return arguments.length?(p=C,z):p},z.on=function(){var C=m.on.apply(m,arguments);return C===m?z:C},z.clickDistance=function(C){return arguments.length?(N=(C=+C)*C,z):Math.sqrt(N)},z.tapDistance=function(C){return arguments.length?(T=+C,z):T},z}var C_=xy();const uc=D.createContext(null),T_=uc.Provider,hl={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,i)=>`Couldn't create edge for ${t?"target":"source"} handle id: "${t?i.targetHandle:i.sourceHandle}", edge id: ${i.id}.`,error010:()=>"Handle: No node id found. Make sure to only use a Handle inside a custom Node.",error011:t=>`Edge type "${t}" not found. Using fallback type "default".`,error012:t=>`Node with id "${t}" does not exist, it may have been removed. This can happen when a node is deleted before the "onNodeClick" handler is called.`},Iy=hl.error001();function Pe(t,i){const a=D.useContext(uc);if(a===null)throw new Error(Iy);return by(a,t,i)}const xt=()=>{const t=D.useContext(uc);if(t===null)throw new Error(Iy);return D.useMemo(()=>({getState:t.getState,setState:t.setState,subscribe:t.subscribe,destroy:t.destroy}),[t])},M_=t=>t.userSelectionActive?"none":"all";function Fy({position:t,children:i,className:a,style:r,...u}){const f=Pe(M_),s=`${t}`.split("-");return P.createElement("div",{className:Rt(["react-flow__panel",a,...s]),style:{...r,pointerEvents:f},...u},i)}function z_({proOptions:t,position:i="bottom-right"}){return t?.hideAttribution?null:P.createElement(Fy,{position:i,className:"react-flow__attribution","data-message":"Please only hide this attribution when you are subscribed to React Flow Pro: https://reactflow.dev/pro"},P.createElement("a",{href:"https://reactflow.dev",target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution"},"React Flow"))}const D_=({x:t,y:i,label:a,labelStyle:r={},labelShowBg:u=!0,labelBgStyle:f={},labelBgPadding:s=[2,4],labelBgBorderRadius:h=2,children:p,className:m,...g})=>{const v=D.useRef(null),[x,w]=D.useState({x:0,y:0,width:0,height:0}),M=Rt(["react-flow__edge-textwrapper",m]);return D.useEffect(()=>{if(v.current){const N=v.current.getBBox();w({x:N.x,y:N.y,width:N.width,height:N.height})}},[a]),typeof a>"u"||!a?null:P.createElement("g",{transform:`translate(${t-x.width/2} ${i-x.height/2})`,className:M,visibility:x.width?"visible":"hidden",...g},u&&P.createElement("rect",{width:x.width+2*s[0],x:-s[0],y:-s[1],height:x.height+2*s[1],className:"react-flow__edge-textbg",style:f,rx:h,ry:h}),P.createElement("text",{className:"react-flow__edge-text",y:x.height/2,dy:"0.3em",ref:v,style:r},a),p)};var O_=D.memo(D_);const Md=t=>({width:t.offsetWidth,height:t.offsetHeight}),Pl=(t,i=0,a=1)=>Math.min(Math.max(t,i),a),zd=(t={x:0,y:0},i)=>({x:Pl(t.x,i[0][0],i[1][0]),y:Pl(t.y,i[0][1],i[1][1])}),vg=(t,i,a)=>t<i?Pl(Math.abs(t-i),1,50)/50:t>a?-Pl(Math.abs(t-a),1,50)/50:0,Jy=(t,i)=>{const a=vg(t.x,35,i.width-35)*20,r=vg(t.y,35,i.height-35)*20;return[a,r]},Wy=t=>t.getRootNode?.()||window?.document,R_=(t,i)=>({x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x2,i.x2),y2:Math.max(t.y2,i.y2)}),Dd=({x:t,y:i,width:a,height:r})=>({x:t,y:i,x2:t+a,y2:i+r}),j_=({x:t,y:i,x2:a,y2:r})=>({x:t,y:i,width:a-t,height:r-i}),xg=t=>({...t.positionAbsolute||{x:0,y:0},width:t.width||0,height:t.height||0}),id=(t,i)=>{const a=Math.max(0,Math.min(t.x+t.width,i.x+i.width)-Math.max(t.x,i.x)),r=Math.max(0,Math.min(t.y+t.height,i.y+i.height)-Math.max(t.y,i.y));return Math.ceil(a*r)},H_=t=>Sn(t.width)&&Sn(t.height)&&Sn(t.x)&&Sn(t.y),Sn=t=>!isNaN(t)&&isFinite(t),lt=Symbol.for("internals"),Py=["Enter"," ","Escape"],k_=(t,i)=>{},L_=t=>"nativeEvent"in t;function ad(t){const a=(L_(t)?t.nativeEvent:t).composedPath?.()?.[0]||t.target;return["INPUT","SELECT","TEXTAREA"].includes(a?.nodeName)||a?.hasAttribute("contenteditable")||!!a?.closest(".nokey")}const ev=t=>"clientX"in t,Jl=(t,i)=>{const a=ev(t),r=a?t.clientX:t.touches?.[0].clientX,u=a?t.clientY:t.touches?.[0].clientY;return{x:r-(i?.left??0),y:u-(i?.top??0)}},$u=()=>typeof navigator<"u"&&navigator?.userAgent?.indexOf("Mac")>=0,za=({id:t,path:i,labelX:a,labelY:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:x,interactionWidth:w=20})=>P.createElement(P.Fragment,null,P.createElement("path",{id:t,style:g,d:i,fill:"none",className:"react-flow__edge-path",markerEnd:v,markerStart:x}),w&&P.createElement("path",{d:i,fill:"none",strokeOpacity:0,strokeWidth:w,className:"react-flow__edge-interaction"}),u&&Sn(a)&&Sn(r)?P.createElement(O_,{x:a,y:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m}):null);za.displayName="BaseEdge";function Oo(t,i,a){return a===void 0?a:r=>{const u=i().edges.find(f=>f.id===t);u&&a(r,{...u})}}function tv({sourceX:t,sourceY:i,targetX:a,targetY:r}){const u=Math.abs(a-t)/2,f=a<t?a+u:a-u,s=Math.abs(r-i)/2,h=r<i?r+s:r-s;return[f,h,u,s]}function nv({sourceX:t,sourceY:i,targetX:a,targetY:r,sourceControlX:u,sourceControlY:f,targetControlX:s,targetControlY:h}){const p=t*.125+u*.375+s*.375+a*.125,m=i*.125+f*.375+h*.375+r*.125,g=Math.abs(p-t),v=Math.abs(m-i);return[p,m,g,v]}var Di;(function(t){t.Strict="strict",t.Loose="loose"})(Di||(Di={}));var Ci;(function(t){t.Free="free",t.Vertical="vertical",t.Horizontal="horizontal"})(Ci||(Ci={}));var Zo;(function(t){t.Partial="partial",t.Full="full"})(Zo||(Zo={}));var Kl;(function(t){t.Bezier="default",t.Straight="straight",t.Step="step",t.SmoothStep="smoothstep",t.SimpleBezier="simplebezier"})(Kl||(Kl={}));var Qu;(function(t){t.Arrow="arrow",t.ArrowClosed="arrowclosed"})(Qu||(Qu={}));var ye;(function(t){t.Left="left",t.Top="top",t.Right="right",t.Bottom="bottom"})(ye||(ye={}));function bg({pos:t,x1:i,y1:a,x2:r,y2:u}){return t===ye.Left||t===ye.Right?[.5*(i+r),a]:[i,.5*(a+u)]}function lv({sourceX:t,sourceY:i,sourcePosition:a=ye.Bottom,targetX:r,targetY:u,targetPosition:f=ye.Top}){const[s,h]=bg({pos:a,x1:t,y1:i,x2:r,y2:u}),[p,m]=bg({pos:f,x1:r,y1:u,x2:t,y2:i}),[g,v,x,w]=nv({sourceX:t,sourceY:i,targetX:r,targetY:u,sourceControlX:s,sourceControlY:h,targetControlX:p,targetControlY:m});return[`M${t},${i} C${s},${h} ${p},${m} ${r},${u}`,g,v,x,w]}const Od=D.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,sourcePosition:u=ye.Bottom,targetPosition:f=ye.Top,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:M,interactionWidth:N})=>{const[T,z,j]=lv({sourceX:t,sourceY:i,sourcePosition:u,targetX:a,targetY:r,targetPosition:f});return P.createElement(za,{path:T,labelX:z,labelY:j,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:M,interactionWidth:N})});Od.displayName="SimpleBezierEdge";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}},U_=({source:t,sourcePosition:i=ye.Bottom,target:a})=>i===ye.Left||i===ye.Right?t.x<a.x?{x:1,y:0}:{x:-1,y:0}:t.y<a.y?{x:0,y:1}:{x:0,y:-1},wg=(t,i)=>Math.sqrt(Math.pow(i.x-t.x,2)+Math.pow(i.y-t.y,2));function B_({source:t,sourcePosition:i=ye.Bottom,target:a,targetPosition:r=ye.Top,center:u,offset:f}){const s=Sg[i],h=Sg[r],p={x:t.x+s.x*f,y:t.y+s.y*f},m={x:a.x+h.x*f,y:a.y+h.y*f},g=U_({source:p,sourcePosition:i,target:m}),v=g.x!==0?"x":"y",x=g[v];let w=[],M,N;const T={x:0,y:0},z={x:0,y:0},[j,B,k,K]=tv({sourceX:t.x,sourceY:t.y,targetX:a.x,targetY:a.y});if(s[v]*h[v]===-1){M=u.x??j,N=u.y??B;const ee=[{x:M,y:p.y},{x:M,y:m.y}],V=[{x:p.x,y:N},{x:m.x,y:N}];s[v]===x?w=v==="x"?ee:V:w=v==="x"?V:ee}else{const ee=[{x:p.x,y:m.y}],V=[{x:m.x,y:p.y}];if(v==="x"?w=s.x===x?V:ee:w=s.y===x?ee:V,i===r){const ae=Math.abs(t[v]-a[v]);if(ae<=f){const C=Math.min(f-1,f-ae);s[v]===x?T[v]=(p[v]>t[v]?-1:1)*C:z[v]=(m[v]>a[v]?-1:1)*C}}if(i!==r){const ae=v==="x"?"y":"x",C=s[v]===h[ae],$=p[ae]>m[ae],A=p[ae]<m[ae];(s[v]===1&&(!C&&$||C&&A)||s[v]!==1&&(!C&&A||C&&$))&&(w=v==="x"?ee:V)}const X={x:p.x+T.x,y:p.y+T.y},le={x:m.x+z.x,y:m.y+z.y},oe=Math.max(Math.abs(X.x-w[0].x),Math.abs(le.x-w[0].x)),re=Math.max(Math.abs(X.y-w[0].y),Math.abs(le.y-w[0].y));oe>=re?(M=(X.x+le.x)/2,N=w[0].y):(M=w[0].x,N=(X.y+le.y)/2)}return[[t,{x:p.x+T.x,y:p.y+T.y},...w,{x:m.x+z.x,y:m.y+z.y},a],M,N,k,K]}function Y_(t,i,a,r){const u=Math.min(wg(t,i)/2,wg(i,a)/2,r),{x:f,y:s}=i;if(t.x===f&&f===a.x||t.y===s&&s===a.y)return`L${f} ${s}`;if(t.y===s){const m=t.x<a.x?-1:1,g=t.y<a.y?1:-1;return`L ${f+u*m},${s}Q ${f},${s} ${f},${s+u*g}`}const h=t.x<a.x?1:-1,p=t.y<a.y?-1:1;return`L ${f},${s+u*p}Q ${f},${s} ${f+u*h},${s}`}function Ku({sourceX:t,sourceY:i,sourcePosition:a=ye.Bottom,targetX:r,targetY:u,targetPosition:f=ye.Top,borderRadius:s=5,centerX:h,centerY:p,offset:m=20}){const[g,v,x,w,M]=B_({source:{x:t,y:i},sourcePosition:a,target:{x:r,y:u},targetPosition:f,center:{x:h,y:p},offset:m});return[g.reduce((T,z,j)=>{let B="";return j>0&&j<g.length-1?B=Y_(g[j-1],z,g[j+1],s):B=`${j===0?"M":"L"}${z.x} ${z.y}`,T+=B,T},""),v,x,w,M]}const cc=D.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,sourcePosition:v=ye.Bottom,targetPosition:x=ye.Top,markerEnd:w,markerStart:M,pathOptions:N,interactionWidth:T})=>{const[z,j,B]=Ku({sourceX:t,sourceY:i,sourcePosition:v,targetX:a,targetY:r,targetPosition:x,borderRadius:N?.borderRadius,offset:N?.offset});return P.createElement(za,{path:z,labelX:j,labelY:B,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:w,markerStart:M,interactionWidth:T})});cc.displayName="SmoothStepEdge";const Rd=D.memo(t=>P.createElement(cc,{...t,pathOptions:D.useMemo(()=>({borderRadius:0,offset:t.pathOptions?.offset}),[t.pathOptions?.offset])}));Rd.displayName="StepEdge";function V_({sourceX:t,sourceY:i,targetX:a,targetY:r}){const[u,f,s,h]=tv({sourceX:t,sourceY:i,targetX:a,targetY:r});return[`M ${t},${i}L ${a},${r}`,u,f,s,h]}const jd=D.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:x,interactionWidth:w})=>{const[M,N,T]=V_({sourceX:t,sourceY:i,targetX:a,targetY:r});return P.createElement(za,{path:M,labelX:N,labelY:T,label:u,labelStyle:f,labelShowBg:s,labelBgStyle:h,labelBgPadding:p,labelBgBorderRadius:m,style:g,markerEnd:v,markerStart:x,interactionWidth:w})});jd.displayName="StraightEdge";function Mu(t,i){return t>=0?.5*t:i*25*Math.sqrt(-t)}function Eg({pos:t,x1:i,y1:a,x2:r,y2:u,c:f}){switch(t){case ye.Left:return[i-Mu(i-r,f),a];case ye.Right:return[i+Mu(r-i,f),a];case ye.Top:return[i,a-Mu(a-u,f)];case ye.Bottom:return[i,a+Mu(u-a,f)]}}function iv({sourceX:t,sourceY:i,sourcePosition:a=ye.Bottom,targetX:r,targetY:u,targetPosition:f=ye.Top,curvature:s=.25}){const[h,p]=Eg({pos:a,x1:t,y1:i,x2:r,y2:u,c:s}),[m,g]=Eg({pos:f,x1:r,y1:u,x2:t,y2:i,c:s}),[v,x,w,M]=nv({sourceX:t,sourceY:i,targetX:r,targetY:u,sourceControlX:h,sourceControlY:p,targetControlX:m,targetControlY:g});return[`M${t},${i} C${h},${p} ${m},${g} ${r},${u}`,v,x,w,M]}const Iu=D.memo(({sourceX:t,sourceY:i,targetX:a,targetY:r,sourcePosition:u=ye.Bottom,targetPosition:f=ye.Top,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:M,pathOptions:N,interactionWidth:T})=>{const[z,j,B]=iv({sourceX:t,sourceY:i,sourcePosition:u,targetX:a,targetY:r,targetPosition:f,curvature:N?.curvature});return P.createElement(za,{path:z,labelX:j,labelY:B,label:s,labelStyle:h,labelShowBg:p,labelBgStyle:m,labelBgPadding:g,labelBgBorderRadius:v,style:x,markerEnd:w,markerStart:M,interactionWidth:T})});Iu.displayName="BezierEdge";const Hd=D.createContext(null),q_=Hd.Provider;Hd.Consumer;const av=()=>D.useContext(Hd),G_=t=>"id"in t&&"source"in t&&"target"in t,X_=({source:t,sourceHandle:i,target:a,targetHandle:r})=>`reactflow__edge-${t}${i||""}-${a}${r||""}`,od=(t,i)=>typeof t>"u"?"":typeof t=="string"?t:`${i?`${i}__`:""}${Object.keys(t).sort().map(r=>`${r}=${t[r]}`).join("&")}`,Z_=(t,i)=>i.some(a=>a.source===t.source&&a.target===t.target&&(a.sourceHandle===t.sourceHandle||!a.sourceHandle&&!t.sourceHandle)&&(a.targetHandle===t.targetHandle||!a.targetHandle&&!t.targetHandle)),$_=(t,i)=>{if(!t.source||!t.target)return i;let a;return G_(t)?a={...t}:a={...t,id:X_(t)},Z_(a,i)?i:i.concat(a)},rd=({x:t,y:i},[a,r,u],f,[s,h])=>{const p={x:(t-a)/u,y:(i-r)/u};return f?{x:s*Math.round(p.x/s),y:h*Math.round(p.y/h)}:p},ov=({x:t,y:i},[a,r,u])=>({x:t*u+a,y:i*u+r}),_a=(t,i=[0,0])=>{if(!t)return{x:0,y:0,positionAbsolute:{x:0,y:0}};const a=(t.width??0)*i[0],r=(t.height??0)*i[1],u={x:t.position.x-a,y:t.position.y-r};return{...u,positionAbsolute:t.positionAbsolute?{x:t.positionAbsolute.x-a,y:t.positionAbsolute.y-r}:u}},kd=(t,i=[0,0])=>{if(t.length===0)return{x:0,y:0,width:0,height:0};const a=t.reduce((r,u)=>{const{x:f,y:s}=_a(u,i).positionAbsolute;return R_(r,Dd({x:f,y:s,width:u.width||0,height:u.height||0}))},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return j_(a)},rv=(t,i,[a,r,u]=[0,0,1],f=!1,s=!1,h=[0,0])=>{const p={x:(i.x-a)/u,y:(i.y-r)/u,width:i.width/u,height:i.height/u},m=[];return t.forEach(g=>{const{width:v,height:x,selectable:w=!0,hidden:M=!1}=g;if(s&&!w||M)return!1;const{positionAbsolute:N}=_a(g,h),T={x:N.x,y:N.y,width:v||0,height:x||0},z=id(p,T),j=typeof v>"u"||typeof x>"u"||v===null||x===null,B=f&&z>0,k=(v||0)*(x||0);(j||B||z>=k||g.dragging)&&m.push(g)}),m},uv=(t,i)=>{const a=t.map(r=>r.id);return i.filter(r=>a.includes(r.source)||a.includes(r.target))},cv=(t,i,a,r,u,f=.1)=>{const s=i/(t.width*(1+f)),h=a/(t.height*(1+f)),p=Math.min(s,h),m=Pl(p,r,u),g=t.x+t.width/2,v=t.y+t.height/2,x=i/2-g*m,w=a/2-v*m;return{x,y:w,zoom:m}},_i=(t,i=0)=>t.transition().duration(i);function _g(t,i,a,r){return(i[a]||[]).reduce((u,f)=>(`${t.id}-${f.id}-${a}`!==r&&u.push({id:f.id||null,type:a,nodeId:t.id,x:(t.positionAbsolute?.x??0)+f.x+f.width/2,y:(t.positionAbsolute?.y??0)+f.y+f.height/2}),u),[])}function Q_(t,i,a,r,u,f){const{x:s,y:h}=Jl(t),m=i.elementsFromPoint(s,h).find(M=>M.classList.contains("react-flow__handle"));if(m){const M=m.getAttribute("data-nodeid");if(M){const N=Ld(void 0,m),T=m.getAttribute("data-handleid"),z=f({nodeId:M,id:T,type:N});if(z){const j=u.find(B=>B.nodeId===M&&B.type===N&&B.id===T);return{handle:{id:T,type:N,nodeId:M,x:j?.x||a.x,y:j?.y||a.y},validHandleResult:z}}}}let g=[],v=1/0;if(u.forEach(M=>{const N=Math.sqrt((M.x-a.x)**2+(M.y-a.y)**2);if(N<=r){const T=f(M);N<=v&&(N<v?g=[{handle:M,validHandleResult:T}]:N===v&&g.push({handle:M,validHandleResult:T}),v=N)}}),!g.length)return{handle:null,validHandleResult:sv()};if(g.length===1)return g[0];const x=g.some(({validHandleResult:M})=>M.isValid),w=g.some(({handle:M})=>M.type==="target");return g.find(({handle:M,validHandleResult:N})=>w?M.type==="target":x?N.isValid:!0)||g[0]}const K_={source:null,target:null,sourceHandle:null,targetHandle:null},sv=()=>({handleDomNode:null,isValid:!1,connection:K_,endHandle:null});function fv(t,i,a,r,u,f,s){const h=u==="target",p=s.querySelector(`.react-flow__handle[data-id="${t?.nodeId}-${t?.id}-${t?.type}"]`),m={...sv(),handleDomNode:p};if(p){const g=Ld(void 0,p),v=p.getAttribute("data-nodeid"),x=p.getAttribute("data-handleid"),w=p.classList.contains("connectable"),M=p.classList.contains("connectableend"),N={source:h?v:a,sourceHandle:h?x:r,target:h?a:v,targetHandle:h?r:x};m.connection=N,w&&M&&(i===Di.Strict?h&&g==="source"||!h&&g==="target":v!==a||x!==r)&&(m.endHandle={nodeId:v,handleId:x,type:g},m.isValid=f(N))}return m}function I_({nodes:t,nodeId:i,handleId:a,handleType:r}){return t.reduce((u,f)=>{if(f[lt]){const{handleBounds:s}=f[lt];let h=[],p=[];s&&(h=_g(f,s,"source",`${i}-${a}-${r}`),p=_g(f,s,"target",`${i}-${a}-${r}`)),u.push(...h,...p)}return u},[])}function Ld(t,i){return t||(i?.classList.contains("target")?"target":i?.classList.contains("source")?"source":null)}function Yf(t){t?.classList.remove("valid","connecting","react-flow__handle-valid","react-flow__handle-connecting")}function F_(t,i){let a=null;return i?a="valid":t&&!i&&(a="invalid"),a}function dv({event:t,handleId:i,nodeId:a,onConnect:r,isTarget:u,getState:f,setState:s,isValidConnection:h,edgeUpdaterType:p,onReconnectEnd:m}){const g=Wy(t.target),{connectionMode:v,domNode:x,autoPanOnConnect:w,connectionRadius:M,onConnectStart:N,panBy:T,getNodes:z,cancelConnection:j}=f();let B=0,k;const{x:K,y:I}=Jl(t),ee=g?.elementFromPoint(K,I),V=Ld(p,ee),X=x?.getBoundingClientRect();if(!X||!V)return;let le,oe=Jl(t,X),re=!1,ae=null,C=!1,$=null;const A=I_({nodes:z(),nodeId:a,handleId:i,handleType:V}),U=()=>{if(!w)return;const[O,_]=Jy(oe,X);T({x:O,y:_}),B=requestAnimationFrame(U)};s({connectionPosition:oe,connectionStatus:null,connectionNodeId:a,connectionHandleId:i,connectionHandleType:V,connectionStartHandle:{nodeId:a,handleId:i,type:V},connectionEndHandle:null}),N?.(t,{nodeId:a,handleId:i,handleType:V});function q(O){const{transform:_}=f();oe=Jl(O,X);const{handle:H,validHandleResult:Q}=Q_(O,g,rd(oe,_,!1,[1,1]),M,A,W=>fv(W,v,a,i,u?"target":"source",h,g));if(k=H,re||(U(),re=!0),$=Q.handleDomNode,ae=Q.connection,C=Q.isValid,s({connectionPosition:k&&C?ov({x:k.x,y:k.y},_):oe,connectionStatus:F_(!!k,C),connectionEndHandle:Q.endHandle}),!k&&!C&&!$)return Yf(le);ae.source!==ae.target&&$&&(Yf(le),le=$,$.classList.add("connecting","react-flow__handle-connecting"),$.classList.toggle("valid",C),$.classList.toggle("react-flow__handle-valid",C))}function E(O){(k||$)&&ae&&C&&r?.(ae),f().onConnectEnd?.(O),p&&m?.(O),Yf(le),j(),cancelAnimationFrame(B),re=!1,C=!1,ae=null,$=null,g.removeEventListener("mousemove",q),g.removeEventListener("mouseup",E),g.removeEventListener("touchmove",q),g.removeEventListener("touchend",E)}g.addEventListener("mousemove",q),g.addEventListener("mouseup",E),g.addEventListener("touchmove",q),g.addEventListener("touchend",E)}const Ag=()=>!0,J_=t=>({connectionStartHandle:t.connectionStartHandle,connectOnClick:t.connectOnClick,noPanClassName:t.noPanClassName}),W_=(t,i,a)=>r=>{const{connectionStartHandle:u,connectionEndHandle:f,connectionClickStartHandle:s}=r;return{connecting:u?.nodeId===t&&u?.handleId===i&&u?.type===a||f?.nodeId===t&&f?.handleId===i&&f?.type===a,clickConnecting:s?.nodeId===t&&s?.handleId===i&&s?.type===a}},hv=D.forwardRef(({type:t="source",position:i=ye.Top,isValidConnection:a,isConnectable:r=!0,isConnectableStart:u=!0,isConnectableEnd:f=!0,id:s,onConnect:h,children:p,className:m,onMouseDown:g,onTouchStart:v,...x},w)=>{const M=s||null,N=t==="target",T=xt(),z=av(),{connectOnClick:j,noPanClassName:B}=Pe(J_,It),{connecting:k,clickConnecting:K}=Pe(W_(z,M,t),It);z||T.getState().onError?.("010",hl.error010());const I=X=>{const{defaultEdgeOptions:le,onConnect:oe,hasDefaultEdges:re}=T.getState(),ae={...le,...X};if(re){const{edges:C,setEdges:$}=T.getState();$($_(ae,C))}oe?.(ae),h?.(ae)},ee=X=>{if(!z)return;const le=ev(X);u&&(le&&X.button===0||!le)&&dv({event:X,handleId:M,nodeId:z,onConnect:I,isTarget:N,getState:T.getState,setState:T.setState,isValidConnection:a||T.getState().isValidConnection||Ag}),le?g?.(X):v?.(X)},V=X=>{const{onClickConnectStart:le,onClickConnectEnd:oe,connectionClickStartHandle:re,connectionMode:ae,isValidConnection:C}=T.getState();if(!z||!re&&!u)return;if(!re){le?.(X,{nodeId:z,handleId:M,handleType:t}),T.setState({connectionClickStartHandle:{nodeId:z,type:t,handleId:M}});return}const $=Wy(X.target),A=a||C||Ag,{connection:U,isValid:q}=fv({nodeId:z,id:M,type:t},ae,re.nodeId,re.handleId||null,re.type,A,$);q&&I(U),oe?.(X),T.setState({connectionClickStartHandle:null})};return P.createElement("div",{"data-handleid":M,"data-nodeid":z,"data-handlepos":i,"data-id":`${z}-${M}-${t}`,className:Rt(["react-flow__handle",`react-flow__handle-${i}`,"nodrag",B,m,{source:!N,target:N,connectable:r,connectablestart:u,connectableend:f,connecting:K,connectionindicator:r&&(u&&!k||f&&k)}]),onMouseDown:ee,onTouchStart:ee,onClick:j?V:void 0,ref:w,...x},p)});hv.displayName="Handle";var Il=D.memo(hv);const pv=({data:t,isConnectable:i,targetPosition:a=ye.Top,sourcePosition:r=ye.Bottom})=>P.createElement(P.Fragment,null,P.createElement(Il,{type:"target",position:a,isConnectable:i}),t?.label,P.createElement(Il,{type:"source",position:r,isConnectable:i}));pv.displayName="DefaultNode";var ud=D.memo(pv);const mv=({data:t,isConnectable:i,sourcePosition:a=ye.Bottom})=>P.createElement(P.Fragment,null,t?.label,P.createElement(Il,{type:"source",position:a,isConnectable:i}));mv.displayName="InputNode";var gv=D.memo(mv);const yv=({data:t,isConnectable:i,targetPosition:a=ye.Top})=>P.createElement(P.Fragment,null,P.createElement(Il,{type:"target",position:a,isConnectable:i}),t?.label);yv.displayName="OutputNode";var vv=D.memo(yv);const Ud=()=>null;Ud.displayName="GroupNode";const P_=t=>({selectedNodes:t.getNodes().filter(i=>i.selected),selectedEdges:t.edges.filter(i=>i.selected).map(i=>({...i}))}),zu=t=>t.id;function eA(t,i){return It(t.selectedNodes.map(zu),i.selectedNodes.map(zu))&&It(t.selectedEdges.map(zu),i.selectedEdges.map(zu))}const xv=D.memo(({onSelectionChange:t})=>{const i=xt(),{selectedNodes:a,selectedEdges:r}=Pe(P_,eA);return D.useEffect(()=>{const u={nodes:a,edges:r};t?.(u),i.getState().onSelectionChange.forEach(f=>f(u))},[a,r,t]),null});xv.displayName="SelectionListener";const tA=t=>!!t.onSelectionChange;function nA({onSelectionChange:t}){const i=Pe(tA);return t||i?P.createElement(xv,{onSelectionChange:t}):null}const lA=t=>({setNodes:t.setNodes,setEdges:t.setEdges,setDefaultNodesAndEdges:t.setDefaultNodesAndEdges,setMinZoom:t.setMinZoom,setMaxZoom:t.setMaxZoom,setTranslateExtent:t.setTranslateExtent,setNodeExtent:t.setNodeExtent,reset:t.reset});function ha(t,i){D.useEffect(()=>{typeof t<"u"&&i(t)},[t])}function Ce(t,i,a){D.useEffect(()=>{typeof i<"u"&&a({[t]:i})},[i])}const iA=({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,onConnect:u,onConnectStart:f,onConnectEnd:s,onClickConnectStart:h,onClickConnectEnd:p,nodesDraggable:m,nodesConnectable:g,nodesFocusable:v,edgesFocusable:x,edgesUpdatable:w,elevateNodesOnSelect:M,minZoom:N,maxZoom:T,nodeExtent:z,onNodesChange:j,onEdgesChange:B,elementsSelectable:k,connectionMode:K,snapGrid:I,snapToGrid:ee,translateExtent:V,connectOnClick:X,defaultEdgeOptions:le,fitView:oe,fitViewOptions:re,onNodesDelete:ae,onEdgesDelete:C,onNodeDrag:$,onNodeDragStart:A,onNodeDragStop:U,onSelectionDrag:q,onSelectionDragStart:E,onSelectionDragStop:O,noPanClassName:_,nodeOrigin:H,rfId:Q,autoPanOnConnect:W,autoPanOnNodeDrag:ue,onError:ce,connectionRadius:fe,isValidConnection:be,nodeDragThreshold:de})=>{const{setNodes:Ae,setEdges:He,setDefaultNodesAndEdges:Qe,setMinZoom:et,setMaxZoom:Be,setTranslateExtent:je,setNodeExtent:pt,reset:ke}=Pe(lA,It),se=xt();return D.useEffect(()=>{const Re=r?.map(Tt=>({...Tt,...le}));return Qe(a,Re),()=>{ke()}},[]),Ce("defaultEdgeOptions",le,se.setState),Ce("connectionMode",K,se.setState),Ce("onConnect",u,se.setState),Ce("onConnectStart",f,se.setState),Ce("onConnectEnd",s,se.setState),Ce("onClickConnectStart",h,se.setState),Ce("onClickConnectEnd",p,se.setState),Ce("nodesDraggable",m,se.setState),Ce("nodesConnectable",g,se.setState),Ce("nodesFocusable",v,se.setState),Ce("edgesFocusable",x,se.setState),Ce("edgesUpdatable",w,se.setState),Ce("elementsSelectable",k,se.setState),Ce("elevateNodesOnSelect",M,se.setState),Ce("snapToGrid",ee,se.setState),Ce("snapGrid",I,se.setState),Ce("onNodesChange",j,se.setState),Ce("onEdgesChange",B,se.setState),Ce("connectOnClick",X,se.setState),Ce("fitViewOnInit",oe,se.setState),Ce("fitViewOnInitOptions",re,se.setState),Ce("onNodesDelete",ae,se.setState),Ce("onEdgesDelete",C,se.setState),Ce("onNodeDrag",$,se.setState),Ce("onNodeDragStart",A,se.setState),Ce("onNodeDragStop",U,se.setState),Ce("onSelectionDrag",q,se.setState),Ce("onSelectionDragStart",E,se.setState),Ce("onSelectionDragStop",O,se.setState),Ce("noPanClassName",_,se.setState),Ce("nodeOrigin",H,se.setState),Ce("rfId",Q,se.setState),Ce("autoPanOnConnect",W,se.setState),Ce("autoPanOnNodeDrag",ue,se.setState),Ce("onError",ce,se.setState),Ce("connectionRadius",fe,se.setState),Ce("isValidConnection",be,se.setState),Ce("nodeDragThreshold",de,se.setState),ha(t,Ae),ha(i,He),ha(N,et),ha(T,Be),ha(V,je),ha(z,pt),null},Ng={display:"none"},aA={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},bv="react-flow__node-desc",Sv="react-flow__edge-desc",oA="react-flow__aria-live",rA=t=>t.ariaLiveMessage;function uA({rfId:t}){const i=Pe(rA);return P.createElement("div",{id:`${oA}-${t}`,"aria-live":"assertive","aria-atomic":"true",style:aA},i)}function cA({rfId:t,disableKeyboardA11y:i}){return P.createElement(P.Fragment,null,P.createElement("div",{id:`${bv}-${t}`,style:Ng},"Press enter or space to select a node.",!i&&"You can then use the arrow keys to move the node around."," Press delete to remove it and escape to cancel."," "),P.createElement("div",{id:`${Sv}-${t}`,style:Ng},"Press enter or space to select an edge. You can then press delete to remove it or escape to cancel."),!i&&P.createElement(uA,{rfId:t}))}var $o=(t=null,i={actInsideInputWithModifier:!0})=>{const[a,r]=D.useState(!1),u=D.useRef(!1),f=D.useRef(new Set([])),[s,h]=D.useMemo(()=>{if(t!==null){const m=(Array.isArray(t)?t:[t]).filter(v=>typeof v=="string").map(v=>v.split("+")),g=m.reduce((v,x)=>v.concat(...x),[]);return[m,g]}return[[],[]]},[t]);return D.useEffect(()=>{const p=typeof document<"u"?document:null,m=i?.target||p;if(t!==null){const g=w=>{if(u.current=w.ctrlKey||w.metaKey||w.shiftKey,(!u.current||u.current&&!i.actInsideInputWithModifier)&&ad(w))return!1;const N=Tg(w.code,h);f.current.add(w[N]),Cg(s,f.current,!1)&&(w.preventDefault(),r(!0))},v=w=>{if((!u.current||u.current&&!i.actInsideInputWithModifier)&&ad(w))return!1;const N=Tg(w.code,h);Cg(s,f.current,!0)?(r(!1),f.current.clear()):f.current.delete(w[N]),w.key==="Meta"&&f.current.clear(),u.current=!1},x=()=>{f.current.clear(),r(!1)};return m?.addEventListener("keydown",g),m?.addEventListener("keyup",v),window.addEventListener("blur",x),()=>{m?.removeEventListener("keydown",g),m?.removeEventListener("keyup",v),window.removeEventListener("blur",x)}}},[t,r]),a};function Cg(t,i,a){return t.filter(r=>a||r.length===i.size).some(r=>r.every(u=>i.has(u)))}function Tg(t,i){return i.includes(t)?"code":"key"}function wv(t,i,a,r){const u=t.parentNode||t.parentId;if(!u)return a;const f=i.get(u),s=_a(f,r);return wv(f,i,{x:(a.x??0)+s.x,y:(a.y??0)+s.y,z:(f[lt]?.z??0)>(a.z??0)?f[lt]?.z??0:a.z??0},r)}function Ev(t,i,a){t.forEach(r=>{const u=r.parentNode||r.parentId;if(u&&!t.has(u))throw new Error(`Parent node ${u} not found`);if(u||a?.[r.id]){const{x:f,y:s,z:h}=wv(r,t,{...r.position,z:r[lt]?.z??0},i);r.positionAbsolute={x:f,y:s},r[lt].z=h,a?.[r.id]&&(r[lt].isParent=!0)}})}function Vf(t,i,a,r){const u=new Map,f={},s=r?1e3:0;return t.forEach(h=>{const p=(Sn(h.zIndex)?h.zIndex:0)+(h.selected?s:0),m=i.get(h.id),g={...h,positionAbsolute:{x:h.position.x,y:h.position.y}},v=h.parentNode||h.parentId;v&&(f[v]=!0);const x=m?.type&&m?.type!==h.type;Object.defineProperty(g,lt,{enumerable:!1,value:{handleBounds:x?void 0:m?.[lt]?.handleBounds,z:p}}),u.set(h.id,g)}),Ev(u,a,f),u}function _v(t,i={}){const{getNodes:a,width:r,height:u,minZoom:f,maxZoom:s,d3Zoom:h,d3Selection:p,fitViewOnInitDone:m,fitViewOnInit:g,nodeOrigin:v}=t(),x=i.initial&&!m&&g;if(h&&p&&(x||!i.initial)){const M=a().filter(T=>{const z=i.includeHiddenNodes?T.width&&T.height:!T.hidden;return i.nodes?.length?z&&i.nodes.some(j=>j.id===T.id):z}),N=M.every(T=>T.width&&T.height);if(M.length>0&&N){const T=kd(M,v),{x:z,y:j,zoom:B}=cv(T,r,u,i.minZoom??f,i.maxZoom??s,i.padding??.1),k=Fl.translate(z,j).scale(B);return typeof i.duration=="number"&&i.duration>0?h.transform(_i(p,i.duration),k):h.transform(p,k),!0}}return!1}function sA(t,i){return t.forEach(a=>{const r=i.get(a.id);r&&i.set(r.id,{...r,[lt]:r[lt],selected:a.selected})}),new Map(i)}function fA(t,i){return i.map(a=>{const r=t.find(u=>u.id===a.id);return r&&(a.selected=r.selected),a})}function Du({changedNodes:t,changedEdges:i,get:a,set:r}){const{nodeInternals:u,edges:f,onNodesChange:s,onEdgesChange:h,hasDefaultNodes:p,hasDefaultEdges:m}=a();t?.length&&(p&&r({nodeInternals:sA(t,u)}),s?.(t)),i?.length&&(m&&r({edges:fA(i,f)}),h?.(i))}const pa=()=>{},dA={zoomIn:pa,zoomOut:pa,zoomTo:pa,getZoom:()=>1,setViewport:pa,getViewport:()=>({x:0,y:0,zoom:1}),fitView:()=>!1,setCenter:pa,fitBounds:pa,project:t=>t,screenToFlowPosition:t=>t,flowToScreenPosition:t=>t,viewportInitialized:!1},hA=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection}),pA=()=>{const t=xt(),{d3Zoom:i,d3Selection:a}=Pe(hA,It);return D.useMemo(()=>a&&i?{zoomIn:u=>i.scaleBy(_i(a,u?.duration),1.2),zoomOut:u=>i.scaleBy(_i(a,u?.duration),1/1.2),zoomTo:(u,f)=>i.scaleTo(_i(a,f?.duration),u),getZoom:()=>t.getState().transform[2],setViewport:(u,f)=>{const[s,h,p]=t.getState().transform,m=Fl.translate(u.x??s,u.y??h).scale(u.zoom??p);i.transform(_i(a,f?.duration),m)},getViewport:()=>{const[u,f,s]=t.getState().transform;return{x:u,y:f,zoom:s}},fitView:u=>_v(t.getState,u),setCenter:(u,f,s)=>{const{width:h,height:p,maxZoom:m}=t.getState(),g=typeof s?.zoom<"u"?s.zoom:m,v=h/2-u*g,x=p/2-f*g,w=Fl.translate(v,x).scale(g);i.transform(_i(a,s?.duration),w)},fitBounds:(u,f)=>{const{width:s,height:h,minZoom:p,maxZoom:m}=t.getState(),{x:g,y:v,zoom:x}=cv(u,s,h,p,m,f?.padding??.1),w=Fl.translate(g,v).scale(x);i.transform(_i(a,f?.duration),w)},project:u=>{const{transform:f,snapToGrid:s,snapGrid:h}=t.getState();return console.warn("[DEPRECATED] `project` is deprecated. Instead use `screenToFlowPosition`. There is no need to subtract the react flow bounds anymore! https://reactflow.dev/api-reference/types/react-flow-instance#screen-to-flow-position"),rd(u,f,s,h)},screenToFlowPosition:u=>{const{transform:f,snapToGrid:s,snapGrid:h,domNode:p}=t.getState();if(!p)return u;const{x:m,y:g}=p.getBoundingClientRect(),v={x:u.x-m,y:u.y-g};return rd(v,f,s,h)},flowToScreenPosition:u=>{const{transform:f,domNode:s}=t.getState();if(!s)return u;const{x:h,y:p}=s.getBoundingClientRect(),m=ov(u,f);return{x:m.x+h,y:m.y+p}},viewportInitialized:!0}:dA,[i,a])};function sc(){const t=pA(),i=xt(),a=D.useCallback(()=>i.getState().getNodes().map(N=>({...N})),[]),r=D.useCallback(N=>i.getState().nodeInternals.get(N),[]),u=D.useCallback(()=>{const{edges:N=[]}=i.getState();return N.map(T=>({...T}))},[]),f=D.useCallback(N=>{const{edges:T=[]}=i.getState();return T.find(z=>z.id===N)},[]),s=D.useCallback(N=>{const{getNodes:T,setNodes:z,hasDefaultNodes:j,onNodesChange:B}=i.getState(),k=T(),K=typeof N=="function"?N(k):N;if(j)z(K);else if(B){const I=K.length===0?k.map(ee=>({type:"remove",id:ee.id})):K.map(ee=>({item:ee,type:"reset"}));B(I)}},[]),h=D.useCallback(N=>{const{edges:T=[],setEdges:z,hasDefaultEdges:j,onEdgesChange:B}=i.getState(),k=typeof N=="function"?N(T):N;if(j)z(k);else if(B){const K=k.length===0?T.map(I=>({type:"remove",id:I.id})):k.map(I=>({item:I,type:"reset"}));B(K)}},[]),p=D.useCallback(N=>{const T=Array.isArray(N)?N:[N],{getNodes:z,setNodes:j,hasDefaultNodes:B,onNodesChange:k}=i.getState();if(B){const I=[...z(),...T];j(I)}else if(k){const K=T.map(I=>({item:I,type:"add"}));k(K)}},[]),m=D.useCallback(N=>{const T=Array.isArray(N)?N:[N],{edges:z=[],setEdges:j,hasDefaultEdges:B,onEdgesChange:k}=i.getState();if(B)j([...z,...T]);else if(k){const K=T.map(I=>({item:I,type:"add"}));k(K)}},[]),g=D.useCallback(()=>{const{getNodes:N,edges:T=[],transform:z}=i.getState(),[j,B,k]=z;return{nodes:N().map(K=>({...K})),edges:T.map(K=>({...K})),viewport:{x:j,y:B,zoom:k}}},[]),v=D.useCallback(({nodes:N,edges:T})=>{const{nodeInternals:z,getNodes:j,edges:B,hasDefaultNodes:k,hasDefaultEdges:K,onNodesDelete:I,onEdgesDelete:ee,onNodesChange:V,onEdgesChange:X}=i.getState(),le=(N||[]).map($=>$.id),oe=(T||[]).map($=>$.id),re=j().reduce(($,A)=>{const U=A.parentNode||A.parentId,q=!le.includes(A.id)&&U&&$.find(O=>O.id===U);return(typeof A.deletable!="boolean"||A.deletable)&&(le.includes(A.id)||q)&&$.push(A),$},[]),ae=B.filter($=>typeof $.deletable=="boolean"?$.deletable:!0),C=ae.filter($=>oe.includes($.id));if(re||C){const $=uv(re,ae),A=[...C,...$],U=A.reduce((q,E)=>(q.includes(E.id)||q.push(E.id),q),[]);if((K||k)&&(K&&i.setState({edges:B.filter(q=>!U.includes(q.id))}),k&&(re.forEach(q=>{z.delete(q.id)}),i.setState({nodeInternals:new Map(z)}))),U.length>0&&(ee?.(A),X&&X(U.map(q=>({id:q,type:"remove"})))),re.length>0&&(I?.(re),V)){const q=re.map(E=>({id:E.id,type:"remove"}));V(q)}}},[]),x=D.useCallback(N=>{const T=H_(N),z=T?null:i.getState().nodeInternals.get(N.id);return!T&&!z?[null,null,T]:[T?N:xg(z),z,T]},[]),w=D.useCallback((N,T=!0,z)=>{const[j,B,k]=x(N);return j?(z||i.getState().getNodes()).filter(K=>{if(!k&&(K.id===B.id||!K.positionAbsolute))return!1;const I=xg(K),ee=id(I,j);return T&&ee>0||ee>=j.width*j.height}):[]},[]),M=D.useCallback((N,T,z=!0)=>{const[j]=x(N);if(!j)return!1;const B=id(j,T);return z&&B>0||B>=j.width*j.height},[]);return D.useMemo(()=>({...t,getNodes:a,getNode:r,getEdges:u,getEdge:f,setNodes:s,setEdges:h,addNodes:p,addEdges:m,toObject:g,deleteElements:v,getIntersectingNodes:w,isNodeIntersecting:M}),[t,a,r,u,f,s,h,p,m,g,v,w,M])}const mA={actInsideInputWithModifier:!1};var gA=({deleteKeyCode:t,multiSelectionKeyCode:i})=>{const a=xt(),{deleteElements:r}=sc(),u=$o(t,mA),f=$o(i);D.useEffect(()=>{if(u){const{edges:s,getNodes:h}=a.getState(),p=h().filter(g=>g.selected),m=s.filter(g=>g.selected);r({nodes:p,edges:m}),a.setState({nodesSelectionActive:!1})}},[u]),D.useEffect(()=>{a.setState({multiSelectionActive:f})},[f])};function yA(t){const i=xt();D.useEffect(()=>{let a;const r=()=>{if(!t.current)return;const u=Md(t.current);(u.height===0||u.width===0)&&i.getState().onError?.("004",hl.error004()),i.setState({width:u.width||500,height:u.height||500})};return r(),window.addEventListener("resize",r),t.current&&(a=new ResizeObserver(()=>r()),a.observe(t.current)),()=>{window.removeEventListener("resize",r),a&&t.current&&a.unobserve(t.current)}},[])}const Bd={position:"absolute",width:"100%",height:"100%",top:0,left:0},vA=(t,i)=>t.x!==i.x||t.y!==i.y||t.zoom!==i.k,Ou=t=>({x:t.x,y:t.y,zoom:t.k}),ma=(t,i)=>t.target.closest(`.${i}`),Mg=(t,i)=>i===2&&Array.isArray(t)&&t.includes(2),zg=t=>{const i=t.ctrlKey&&$u()?10:1;return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*i},xA=t=>({d3Zoom:t.d3Zoom,d3Selection:t.d3Selection,d3ZoomHandler:t.d3ZoomHandler,userSelectionActive:t.userSelectionActive}),bA=({onMove:t,onMoveStart:i,onMoveEnd:a,onPaneContextMenu:r,zoomOnScroll:u=!0,zoomOnPinch:f=!0,panOnScroll:s=!1,panOnScrollSpeed:h=.5,panOnScrollMode:p=Ci.Free,zoomOnDoubleClick:m=!0,elementsSelectable:g,panOnDrag:v=!0,defaultViewport:x,translateExtent:w,minZoom:M,maxZoom:N,zoomActivationKeyCode:T,preventScrolling:z=!0,children:j,noWheelClassName:B,noPanClassName:k})=>{const K=D.useRef(),I=xt(),ee=D.useRef(!1),V=D.useRef(!1),X=D.useRef(null),le=D.useRef({x:0,y:0,zoom:0}),{d3Zoom:oe,d3Selection:re,d3ZoomHandler:ae,userSelectionActive:C}=Pe(xA,It),$=$o(T),A=D.useRef(0),U=D.useRef(!1),q=D.useRef();return yA(X),D.useEffect(()=>{if(X.current){const E=X.current.getBoundingClientRect(),O=N_().scaleExtent([M,N]).translateExtent(w),_=bn(X.current).call(O),H=Fl.translate(x.x,x.y).scale(Pl(x.zoom,M,N)),Q=[[0,0],[E.width,E.height]],W=O.constrain()(H,Q,w);O.transform(_,W),O.wheelDelta(zg),I.setState({d3Zoom:O,d3Selection:_,d3ZoomHandler:_.on("wheel.zoom"),transform:[W.x,W.y,W.k],domNode:X.current.closest(".react-flow")})}},[]),D.useEffect(()=>{re&&oe&&(s&&!$&&!C?re.on("wheel.zoom",E=>{if(ma(E,B))return!1;E.preventDefault(),E.stopImmediatePropagation();const O=re.property("__zoom").k||1;if(E.ctrlKey&&f){const be=kn(E),de=zg(E),Ae=O*Math.pow(2,de);oe.scaleTo(re,Ae,be,E);return}const _=E.deltaMode===1?20:1;let H=p===Ci.Vertical?0:E.deltaX*_,Q=p===Ci.Horizontal?0:E.deltaY*_;!$u()&&E.shiftKey&&p!==Ci.Vertical&&(H=E.deltaY*_,Q=0),oe.translateBy(re,-(H/O)*h,-(Q/O)*h,{internal:!0});const W=Ou(re.property("__zoom")),{onViewportChangeStart:ue,onViewportChange:ce,onViewportChangeEnd:fe}=I.getState();clearTimeout(q.current),U.current||(U.current=!0,i?.(E,W),ue?.(W)),U.current&&(t?.(E,W),ce?.(W),q.current=setTimeout(()=>{a?.(E,W),fe?.(W),U.current=!1},150))},{passive:!1}):typeof ae<"u"&&re.on("wheel.zoom",function(E,O){if(!z&&E.type==="wheel"&&!E.ctrlKey||ma(E,B))return null;E.preventDefault(),ae.call(this,E,O)},{passive:!1}))},[C,s,p,re,oe,ae,$,f,z,B,i,t,a]),D.useEffect(()=>{oe&&oe.on("start",E=>{if(!E.sourceEvent||E.sourceEvent.internal)return null;A.current=E.sourceEvent?.button;const{onViewportChangeStart:O}=I.getState(),_=Ou(E.transform);ee.current=!0,le.current=_,E.sourceEvent?.type==="mousedown"&&I.setState({paneDragging:!0}),O?.(_),i?.(E.sourceEvent,_)})},[oe,i]),D.useEffect(()=>{oe&&(C&&!ee.current?oe.on("zoom",null):C||oe.on("zoom",E=>{const{onViewportChange:O}=I.getState();if(I.setState({transform:[E.transform.x,E.transform.y,E.transform.k]}),V.current=!!(r&&Mg(v,A.current??0)),(t||O)&&!E.sourceEvent?.internal){const _=Ou(E.transform);O?.(_),t?.(E.sourceEvent,_)}}))},[C,oe,t,v,r]),D.useEffect(()=>{oe&&oe.on("end",E=>{if(!E.sourceEvent||E.sourceEvent.internal)return null;const{onViewportChangeEnd:O}=I.getState();if(ee.current=!1,I.setState({paneDragging:!1}),r&&Mg(v,A.current??0)&&!V.current&&r(E.sourceEvent),V.current=!1,(a||O)&&vA(le.current,E.transform)){const _=Ou(E.transform);le.current=_,clearTimeout(K.current),K.current=setTimeout(()=>{O?.(_),a?.(E.sourceEvent,_)},s?150:0)}})},[oe,s,v,a,r]),D.useEffect(()=>{oe&&oe.filter(E=>{const O=$||u,_=f&&E.ctrlKey;if((v===!0||Array.isArray(v)&&v.includes(1))&&E.button===1&&E.type==="mousedown"&&(ma(E,"react-flow__node")||ma(E,"react-flow__edge")))return!0;if(!v&&!O&&!s&&!m&&!f||C||!m&&E.type==="dblclick"||ma(E,B)&&E.type==="wheel"||ma(E,k)&&(E.type!=="wheel"||s&&E.type==="wheel"&&!$)||!f&&E.ctrlKey&&E.type==="wheel"||!O&&!s&&!_&&E.type==="wheel"||!v&&(E.type==="mousedown"||E.type==="touchstart")||Array.isArray(v)&&!v.includes(E.button)&&E.type==="mousedown")return!1;const H=Array.isArray(v)&&v.includes(E.button)||!E.button||E.button<=1;return(!E.ctrlKey||E.type==="wheel")&&H})},[C,oe,u,f,s,m,v,g,$]),P.createElement("div",{className:"react-flow__renderer",ref:X,style:Bd},j)},SA=t=>({userSelectionActive:t.userSelectionActive,userSelectionRect:t.userSelectionRect});function wA(){const{userSelectionActive:t,userSelectionRect:i}=Pe(SA,It);return t&&i?P.createElement("div",{className:"react-flow__selection react-flow__container",style:{width:i.width,height:i.height,transform:`translate(${i.x}px, ${i.y}px)`}}):null}function Dg(t,i){const a=i.parentNode||i.parentId,r=t.find(u=>u.id===a);if(r){const u=i.position.x+i.width-r.width,f=i.position.y+i.height-r.height;if(u>0||f>0||i.position.x<0||i.position.y<0){if(r.style={...r.style},r.style.width=r.style.width??r.width,r.style.height=r.style.height??r.height,u>0&&(r.style.width+=u),f>0&&(r.style.height+=f),i.position.x<0){const s=Math.abs(i.position.x);r.position.x=r.position.x-s,r.style.width+=s,i.position.x=0}if(i.position.y<0){const s=Math.abs(i.position.y);r.position.y=r.position.y-s,r.style.height+=s,i.position.y=0}r.width=r.style.width,r.height=r.style.height}}}function Av(t,i){if(t.some(r=>r.type==="reset"))return t.filter(r=>r.type==="reset").map(r=>r.item);const a=t.filter(r=>r.type==="add").map(r=>r.item);return i.reduce((r,u)=>{const f=t.filter(h=>h.id===u.id);if(f.length===0)return r.push(u),r;const s={...u};for(const h of f)if(h)switch(h.type){case"select":{s.selected=h.selected;break}case"position":{typeof h.position<"u"&&(s.position=h.position),typeof h.positionAbsolute<"u"&&(s.positionAbsolute=h.positionAbsolute),typeof h.dragging<"u"&&(s.dragging=h.dragging),s.expandParent&&Dg(r,s);break}case"dimensions":{typeof h.dimensions<"u"&&(s.width=h.dimensions.width,s.height=h.dimensions.height),typeof h.updateStyle<"u"&&(s.style={...s.style||{},...h.dimensions}),typeof h.resizing=="boolean"&&(s.resizing=h.resizing),s.expandParent&&Dg(r,s);break}case"remove":return r}return r.push(s),r},a)}function Nv(t,i){return Av(t,i)}function EA(t,i){return Av(t,i)}const Ql=(t,i)=>({id:t,type:"select",selected:i});function xa(t,i){return t.reduce((a,r)=>{const u=i.includes(r.id);return!r.selected&&u?(r.selected=!0,a.push(Ql(r.id,!0))):r.selected&&!u&&(r.selected=!1,a.push(Ql(r.id,!1))),a},[])}const qf=(t,i)=>a=>{a.target===i.current&&t?.(a)},_A=t=>({userSelectionActive:t.userSelectionActive,elementsSelectable:t.elementsSelectable,dragging:t.paneDragging}),Cv=D.memo(({isSelecting:t,selectionMode:i=Zo.Full,panOnDrag:a,onSelectionStart:r,onSelectionEnd:u,onPaneClick:f,onPaneContextMenu:s,onPaneScroll:h,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:g,children:v})=>{const x=D.useRef(null),w=xt(),M=D.useRef(0),N=D.useRef(0),T=D.useRef(),{userSelectionActive:z,elementsSelectable:j,dragging:B}=Pe(_A,It),k=()=>{w.setState({userSelectionActive:!1,userSelectionRect:null}),M.current=0,N.current=0},K=ae=>{f?.(ae),w.getState().resetSelectedElements(),w.setState({nodesSelectionActive:!1})},I=ae=>{if(Array.isArray(a)&&a?.includes(2)){ae.preventDefault();return}s?.(ae)},ee=h?ae=>h(ae):void 0,V=ae=>{const{resetSelectedElements:C,domNode:$}=w.getState();if(T.current=$?.getBoundingClientRect(),!j||!t||ae.button!==0||ae.target!==x.current||!T.current)return;const{x:A,y:U}=Jl(ae,T.current);C(),w.setState({userSelectionRect:{width:0,height:0,startX:A,startY:U,x:A,y:U}}),r?.(ae)},X=ae=>{const{userSelectionRect:C,nodeInternals:$,edges:A,transform:U,onNodesChange:q,onEdgesChange:E,nodeOrigin:O,getNodes:_}=w.getState();if(!t||!T.current||!C)return;w.setState({userSelectionActive:!0,nodesSelectionActive:!1});const H=Jl(ae,T.current),Q=C.startX??0,W=C.startY??0,ue={...C,x:H.x<Q?H.x:Q,y:H.y<W?H.y:W,width:Math.abs(H.x-Q),height:Math.abs(H.y-W)},ce=_(),fe=rv($,ue,U,i===Zo.Partial,!0,O),be=uv(fe,A).map(Ae=>Ae.id),de=fe.map(Ae=>Ae.id);if(M.current!==de.length){M.current=de.length;const Ae=xa(ce,de);Ae.length&&q?.(Ae)}if(N.current!==be.length){N.current=be.length;const Ae=xa(A,be);Ae.length&&E?.(Ae)}w.setState({userSelectionRect:ue})},le=ae=>{if(ae.button!==0)return;const{userSelectionRect:C}=w.getState();!z&&C&&ae.target===x.current&&K?.(ae),w.setState({nodesSelectionActive:M.current>0}),k(),u?.(ae)},oe=ae=>{z&&(w.setState({nodesSelectionActive:M.current>0}),u?.(ae)),k()},re=j&&(t||z);return P.createElement("div",{className:Rt(["react-flow__pane",{dragging:B,selection:t}]),onClick:re?void 0:qf(K,x),onContextMenu:qf(I,x),onWheel:qf(ee,x),onMouseEnter:re?void 0:p,onMouseDown:re?V:void 0,onMouseMove:re?X:m,onMouseUp:re?le:void 0,onMouseLeave:re?oe:g,ref:x,style:Bd},v,P.createElement(wA,null))});Cv.displayName="Pane";function Tv(t,i){const a=t.parentNode||t.parentId;if(!a)return!1;const r=i.get(a);return r?r.selected?!0:Tv(r,i):!1}function Og(t,i,a){let r=t;do{if(r?.matches(i))return!0;if(r===a.current)return!1;r=r.parentElement}while(r);return!1}function AA(t,i,a,r){return Array.from(t.values()).filter(u=>(u.selected||u.id===r)&&(!u.parentNode||u.parentId||!Tv(u,t))&&(u.draggable||i&&typeof u.draggable>"u")).map(u=>({id:u.id,position:u.position||{x:0,y:0},positionAbsolute:u.positionAbsolute||{x:0,y:0},distance:{x:a.x-(u.positionAbsolute?.x??0),y:a.y-(u.positionAbsolute?.y??0)},delta:{x:0,y:0},extent:u.extent,parentNode:u.parentNode||u.parentId,parentId:u.parentNode||u.parentId,width:u.width,height:u.height,expandParent:u.expandParent}))}function NA(t,i){return!i||i==="parent"?i:[i[0],[i[1][0]-(t.width||0),i[1][1]-(t.height||0)]]}function Mv(t,i,a,r,u=[0,0],f){const s=NA(t,t.extent||r);let h=s;const p=t.parentNode||t.parentId;if(t.extent==="parent"&&!t.expandParent)if(p&&t.width&&t.height){const v=a.get(p),{x,y:w}=_a(v,u).positionAbsolute;h=v&&Sn(x)&&Sn(w)&&Sn(v.width)&&Sn(v.height)?[[x+t.width*u[0],w+t.height*u[1]],[x+v.width-t.width+t.width*u[0],w+v.height-t.height+t.height*u[1]]]:h}else f?.("005",hl.error005()),h=s;else if(t.extent&&p&&t.extent!=="parent"){const v=a.get(p),{x,y:w}=_a(v,u).positionAbsolute;h=[[t.extent[0][0]+x,t.extent[0][1]+w],[t.extent[1][0]+x,t.extent[1][1]+w]]}let m={x:0,y:0};if(p){const v=a.get(p);m=_a(v,u).positionAbsolute}const g=h&&h!=="parent"?zd(i,h):i;return{position:{x:g.x-m.x,y:g.y-m.y},positionAbsolute:g}}function Gf({nodeId:t,dragItems:i,nodeInternals:a}){const r=i.map(u=>({...a.get(u.id),position:u.position,positionAbsolute:u.positionAbsolute}));return[t?r.find(u=>u.id===t):r[0],r]}const Rg=(t,i,a,r)=>{const u=i.querySelectorAll(t);if(!u||!u.length)return null;const f=Array.from(u),s=i.getBoundingClientRect(),h={x:s.width*r[0],y:s.height*r[1]};return f.map(p=>{const m=p.getBoundingClientRect();return{id:p.getAttribute("data-handleid"),position:p.getAttribute("data-handlepos"),x:(m.left-s.left-h.x)/a,y:(m.top-s.top-h.y)/a,...Md(p)}})};function Ro(t,i,a){return a===void 0?a:r=>{const u=i().nodeInternals.get(t);u&&a(r,{...u})}}function cd({id:t,store:i,unselect:a=!1,nodeRef:r}){const{addSelectedNodes:u,unselectNodesAndEdges:f,multiSelectionActive:s,nodeInternals:h,onError:p}=i.getState(),m=h.get(t);if(!m){p?.("012",hl.error012(t));return}i.setState({nodesSelectionActive:!1}),m.selected?(a||m.selected&&s)&&(f({nodes:[m],edges:[]}),requestAnimationFrame(()=>r?.current?.blur())):u([t])}function zv(){const t=xt();return D.useCallback(({sourceEvent:a})=>{const{transform:r,snapGrid:u,snapToGrid:f}=t.getState(),s=a.touches?a.touches[0].clientX:a.clientX,h=a.touches?a.touches[0].clientY:a.clientY,p={x:(s-r[0])/r[2],y:(h-r[1])/r[2]};return{xSnapped:f?u[0]*Math.round(p.x/u[0]):p.x,ySnapped:f?u[1]*Math.round(p.y/u[1]):p.y,...p}},[])}function Xf(t){return(i,a,r)=>t?.(i,r)}function Dv({nodeRef:t,disabled:i=!1,noDragClassName:a,handleSelector:r,nodeId:u,isSelectable:f,selectNodesOnDrag:s}){const h=xt(),[p,m]=D.useState(!1),g=D.useRef([]),v=D.useRef({x:null,y:null}),x=D.useRef(0),w=D.useRef(null),M=D.useRef({x:0,y:0}),N=D.useRef(null),T=D.useRef(!1),z=D.useRef(!1),j=D.useRef(!1),B=zv();return D.useEffect(()=>{if(t?.current){const k=bn(t.current),K=({x:V,y:X})=>{const{nodeInternals:le,onNodeDrag:oe,onSelectionDrag:re,updateNodePositions:ae,nodeExtent:C,snapGrid:$,snapToGrid:A,nodeOrigin:U,onError:q}=h.getState();v.current={x:V,y:X};let E=!1,O={x:0,y:0,x2:0,y2:0};if(g.current.length>1&&C){const H=kd(g.current,U);O=Dd(H)}if(g.current=g.current.map(H=>{const Q={x:V-H.distance.x,y:X-H.distance.y};A&&(Q.x=$[0]*Math.round(Q.x/$[0]),Q.y=$[1]*Math.round(Q.y/$[1]));const W=[[C[0][0],C[0][1]],[C[1][0],C[1][1]]];g.current.length>1&&C&&!H.extent&&(W[0][0]=H.positionAbsolute.x-O.x+C[0][0],W[1][0]=H.positionAbsolute.x+(H.width??0)-O.x2+C[1][0],W[0][1]=H.positionAbsolute.y-O.y+C[0][1],W[1][1]=H.positionAbsolute.y+(H.height??0)-O.y2+C[1][1]);const ue=Mv(H,Q,le,W,U,q);return E=E||H.position.x!==ue.position.x||H.position.y!==ue.position.y,H.position=ue.position,H.positionAbsolute=ue.positionAbsolute,H}),!E)return;ae(g.current,!0,!0),m(!0);const _=u?oe:Xf(re);if(_&&N.current){const[H,Q]=Gf({nodeId:u,dragItems:g.current,nodeInternals:le});_(N.current,H,Q)}},I=()=>{if(!w.current)return;const[V,X]=Jy(M.current,w.current);if(V!==0||X!==0){const{transform:le,panBy:oe}=h.getState();v.current.x=(v.current.x??0)-V/le[2],v.current.y=(v.current.y??0)-X/le[2],oe({x:V,y:X})&&K(v.current)}x.current=requestAnimationFrame(I)},ee=V=>{const{nodeInternals:X,multiSelectionActive:le,nodesDraggable:oe,unselectNodesAndEdges:re,onNodeDragStart:ae,onSelectionDragStart:C}=h.getState();z.current=!0;const $=u?ae:Xf(C);(!s||!f)&&!le&&u&&(X.get(u)?.selected||re()),u&&f&&s&&cd({id:u,store:h,nodeRef:t});const A=B(V);if(v.current=A,g.current=AA(X,oe,A,u),$&&g.current){const[U,q]=Gf({nodeId:u,dragItems:g.current,nodeInternals:X});$(V.sourceEvent,U,q)}};if(i)k.on(".drag",null);else{const V=Hy().on("start",X=>{const{domNode:le,nodeDragThreshold:oe}=h.getState();oe===0&&ee(X),j.current=!1;const re=B(X);v.current=re,w.current=le?.getBoundingClientRect()||null,M.current=Jl(X.sourceEvent,w.current)}).on("drag",X=>{const le=B(X),{autoPanOnNodeDrag:oe,nodeDragThreshold:re}=h.getState();if(X.sourceEvent.type==="touchmove"&&X.sourceEvent.touches.length>1&&(j.current=!0),!j.current){if(!T.current&&z.current&&oe&&(T.current=!0,I()),!z.current){const ae=le.xSnapped-(v?.current?.x??0),C=le.ySnapped-(v?.current?.y??0);Math.sqrt(ae*ae+C*C)>re&&ee(X)}(v.current.x!==le.xSnapped||v.current.y!==le.ySnapped)&&g.current&&z.current&&(N.current=X.sourceEvent,M.current=Jl(X.sourceEvent,w.current),K(le))}}).on("end",X=>{if(!(!z.current||j.current)&&(m(!1),T.current=!1,z.current=!1,cancelAnimationFrame(x.current),g.current)){const{updateNodePositions:le,nodeInternals:oe,onNodeDragStop:re,onSelectionDragStop:ae}=h.getState(),C=u?re:Xf(ae);if(le(g.current,!1,!1),C){const[$,A]=Gf({nodeId:u,dragItems:g.current,nodeInternals:oe});C(X.sourceEvent,$,A)}}}).filter(X=>{const le=X.target;return!X.button&&(!a||!Og(le,`.${a}`,t))&&(!r||Og(le,r,t))});return k.call(V),()=>{k.on(".drag",null)}}}},[t,i,a,r,f,h,u,s,B]),p}function Ov(){const t=xt();return D.useCallback(a=>{const{nodeInternals:r,nodeExtent:u,updateNodePositions:f,getNodes:s,snapToGrid:h,snapGrid:p,onError:m,nodesDraggable:g}=t.getState(),v=s().filter(j=>j.selected&&(j.draggable||g&&typeof j.draggable>"u")),x=h?p[0]:5,w=h?p[1]:5,M=a.isShiftPressed?4:1,N=a.x*x*M,T=a.y*w*M,z=v.map(j=>{if(j.positionAbsolute){const B={x:j.positionAbsolute.x+N,y:j.positionAbsolute.y+T};h&&(B.x=p[0]*Math.round(B.x/p[0]),B.y=p[1]*Math.round(B.y/p[1]));const{positionAbsolute:k,position:K}=Mv(j,B,r,u,void 0,m);j.position=K,j.positionAbsolute=k}return j});f(z,!0,!1)},[])}const Aa={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}};var jo=t=>{const i=({id:a,type:r,data:u,xPos:f,yPos:s,xPosOrigin:h,yPosOrigin:p,selected:m,onClick:g,onMouseEnter:v,onMouseMove:x,onMouseLeave:w,onContextMenu:M,onDoubleClick:N,style:T,className:z,isDraggable:j,isSelectable:B,isConnectable:k,isFocusable:K,selectNodesOnDrag:I,sourcePosition:ee,targetPosition:V,hidden:X,resizeObserver:le,dragHandle:oe,zIndex:re,isParent:ae,noDragClassName:C,noPanClassName:$,initialized:A,disableKeyboardA11y:U,ariaLabel:q,rfId:E,hasHandleBounds:O})=>{const _=xt(),H=D.useRef(null),Q=D.useRef(null),W=D.useRef(ee),ue=D.useRef(V),ce=D.useRef(r),fe=B||j||g||v||x||w,be=Ov(),de=Ro(a,_.getState,v),Ae=Ro(a,_.getState,x),He=Ro(a,_.getState,w),Qe=Ro(a,_.getState,M),et=Ro(a,_.getState,N),Be=ke=>{const{nodeDragThreshold:se}=_.getState();if(B&&(!I||!j||se>0)&&cd({id:a,store:_,nodeRef:H}),g){const Re=_.getState().nodeInternals.get(a);Re&&g(ke,{...Re})}},je=ke=>{if(!ad(ke)&&!U)if(Py.includes(ke.key)&&B){const se=ke.key==="Escape";cd({id:a,store:_,unselect:se,nodeRef:H})}else j&&m&&Object.prototype.hasOwnProperty.call(Aa,ke.key)&&(_.setState({ariaLiveMessage:`Moved selected node ${ke.key.replace("Arrow","").toLowerCase()}. New position, x: ${~~f}, y: ${~~s}`}),be({x:Aa[ke.key].x,y:Aa[ke.key].y,isShiftPressed:ke.shiftKey}))};D.useEffect(()=>()=>{Q.current&&(le?.unobserve(Q.current),Q.current=null)},[]),D.useEffect(()=>{if(H.current&&!X){const ke=H.current;(!A||!O||Q.current!==ke)&&(Q.current&&le?.unobserve(Q.current),le?.observe(ke),Q.current=ke)}},[X,A,O]),D.useEffect(()=>{const ke=ce.current!==r,se=W.current!==ee,Re=ue.current!==V;H.current&&(ke||se||Re)&&(ke&&(ce.current=r),se&&(W.current=ee),Re&&(ue.current=V),_.getState().updateNodeDimensions([{id:a,nodeElement:H.current,forceUpdate:!0}]))},[a,r,ee,V]);const pt=Dv({nodeRef:H,disabled:X||!j,noDragClassName:C,handleSelector:oe,nodeId:a,isSelectable:B,selectNodesOnDrag:I});return X?null:P.createElement("div",{className:Rt(["react-flow__node",`react-flow__node-${r}`,{[$]:j},z,{selected:m,selectable:B,parent:ae,dragging:pt}]),ref:H,style:{zIndex:re,transform:`translate(${h}px,${p}px)`,pointerEvents:fe?"all":"none",visibility:A?"visible":"hidden",...T},"data-id":a,"data-testid":`rf__node-${a}`,onMouseEnter:de,onMouseMove:Ae,onMouseLeave:He,onContextMenu:Qe,onClick:Be,onDoubleClick:et,onKeyDown:K?je:void 0,tabIndex:K?0:void 0,role:K?"button":void 0,"aria-describedby":U?void 0:`${bv}-${E}`,"aria-label":q},P.createElement(q_,{value:a},P.createElement(t,{id:a,data:u,type:r,xPos:f,yPos:s,selected:m,isConnectable:k,sourcePosition:ee,targetPosition:V,dragging:pt,dragHandle:oe,zIndex:re})))};return i.displayName="NodeWrapper",D.memo(i)};const CA=t=>{const i=t.getNodes().filter(a=>a.selected);return{...kd(i,t.nodeOrigin),transformString:`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`,userSelectionActive:t.userSelectionActive}};function TA({onSelectionContextMenu:t,noPanClassName:i,disableKeyboardA11y:a}){const r=xt(),{width:u,height:f,x:s,y:h,transformString:p,userSelectionActive:m}=Pe(CA,It),g=Ov(),v=D.useRef(null);if(D.useEffect(()=>{a||v.current?.focus({preventScroll:!0})},[a]),Dv({nodeRef:v}),m||!u||!f)return null;const x=t?M=>{const N=r.getState().getNodes().filter(T=>T.selected);t(M,N)}:void 0,w=M=>{Object.prototype.hasOwnProperty.call(Aa,M.key)&&g({x:Aa[M.key].x,y:Aa[M.key].y,isShiftPressed:M.shiftKey})};return P.createElement("div",{className:Rt(["react-flow__nodesselection","react-flow__container",i]),style:{transform:p}},P.createElement("div",{ref:v,className:"react-flow__nodesselection-rect",onContextMenu:x,tabIndex:a?void 0:-1,onKeyDown:a?void 0:w,style:{width:u,height:f,top:h,left:s}}))}var MA=D.memo(TA);const zA=t=>t.nodesSelectionActive,Rv=({children:t,onPaneClick:i,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:s,deleteKeyCode:h,onMove:p,onMoveStart:m,onMoveEnd:g,selectionKeyCode:v,selectionOnDrag:x,selectionMode:w,onSelectionStart:M,onSelectionEnd:N,multiSelectionKeyCode:T,panActivationKeyCode:z,zoomActivationKeyCode:j,elementsSelectable:B,zoomOnScroll:k,zoomOnPinch:K,panOnScroll:I,panOnScrollSpeed:ee,panOnScrollMode:V,zoomOnDoubleClick:X,panOnDrag:le,defaultViewport:oe,translateExtent:re,minZoom:ae,maxZoom:C,preventScrolling:$,onSelectionContextMenu:A,noWheelClassName:U,noPanClassName:q,disableKeyboardA11y:E})=>{const O=Pe(zA),_=$o(v),H=$o(z),Q=H||le,W=H||I,ue=_||x&&Q!==!0;return gA({deleteKeyCode:h,multiSelectionKeyCode:T}),P.createElement(bA,{onMove:p,onMoveStart:m,onMoveEnd:g,onPaneContextMenu:f,elementsSelectable:B,zoomOnScroll:k,zoomOnPinch:K,panOnScroll:W,panOnScrollSpeed:ee,panOnScrollMode:V,zoomOnDoubleClick:X,panOnDrag:!_&&Q,defaultViewport:oe,translateExtent:re,minZoom:ae,maxZoom:C,zoomActivationKeyCode:j,preventScrolling:$,noWheelClassName:U,noPanClassName:q},P.createElement(Cv,{onSelectionStart:M,onSelectionEnd:N,onPaneClick:i,onPaneMouseEnter:a,onPaneMouseMove:r,onPaneMouseLeave:u,onPaneContextMenu:f,onPaneScroll:s,panOnDrag:Q,isSelecting:!!ue,selectionMode:w},t,O&&P.createElement(MA,{onSelectionContextMenu:A,noPanClassName:q,disableKeyboardA11y:E})))};Rv.displayName="FlowRenderer";var DA=D.memo(Rv);function OA(t){return Pe(D.useCallback(a=>t?rv(a.nodeInternals,{x:0,y:0,width:a.width,height:a.height},a.transform,!0):a.getNodes(),[t]))}function RA(t){const i={input:jo(t.input||gv),default:jo(t.default||ud),output:jo(t.output||vv),group:jo(t.group||Ud)},a={},r=Object.keys(t).filter(u=>!["input","default","output","group"].includes(u)).reduce((u,f)=>(u[f]=jo(t[f]||ud),u),a);return{...i,...r}}const jA=({x:t,y:i,width:a,height:r,origin:u})=>!a||!r?{x:t,y:i}:u[0]<0||u[1]<0||u[0]>1||u[1]>1?{x:t,y:i}:{x:t-a*u[0],y:i-r*u[1]},HA=t=>({nodesDraggable:t.nodesDraggable,nodesConnectable:t.nodesConnectable,nodesFocusable:t.nodesFocusable,elementsSelectable:t.elementsSelectable,updateNodeDimensions:t.updateNodeDimensions,onError:t.onError}),jv=t=>{const{nodesDraggable:i,nodesConnectable:a,nodesFocusable:r,elementsSelectable:u,updateNodeDimensions:f,onError:s}=Pe(HA,It),h=OA(t.onlyRenderVisibleElements),p=D.useRef(),m=D.useMemo(()=>{if(typeof ResizeObserver>"u")return null;const g=new ResizeObserver(v=>{const x=v.map(w=>({id:w.target.getAttribute("data-id"),nodeElement:w.target,forceUpdate:!0}));f(x)});return p.current=g,g},[]);return D.useEffect(()=>()=>{p?.current?.disconnect()},[]),P.createElement("div",{className:"react-flow__nodes",style:Bd},h.map(g=>{let v=g.type||"default";t.nodeTypes[v]||(s?.("003",hl.error003(v)),v="default");const x=t.nodeTypes[v]||t.nodeTypes.default,w=!!(g.draggable||i&&typeof g.draggable>"u"),M=!!(g.selectable||u&&typeof g.selectable>"u"),N=!!(g.connectable||a&&typeof g.connectable>"u"),T=!!(g.focusable||r&&typeof g.focusable>"u"),z=t.nodeExtent?zd(g.positionAbsolute,t.nodeExtent):g.positionAbsolute,j=z?.x??0,B=z?.y??0,k=jA({x:j,y:B,width:g.width??0,height:g.height??0,origin:t.nodeOrigin});return P.createElement(x,{key:g.id,id:g.id,className:g.className,style:g.style,type:v,data:g.data,sourcePosition:g.sourcePosition||ye.Bottom,targetPosition:g.targetPosition||ye.Top,hidden:g.hidden,xPos:j,yPos:B,xPosOrigin:k.x,yPosOrigin:k.y,selectNodesOnDrag:t.selectNodesOnDrag,onClick:t.onNodeClick,onMouseEnter:t.onNodeMouseEnter,onMouseMove:t.onNodeMouseMove,onMouseLeave:t.onNodeMouseLeave,onContextMenu:t.onNodeContextMenu,onDoubleClick:t.onNodeDoubleClick,selected:!!g.selected,isDraggable:w,isSelectable:M,isConnectable:N,isFocusable:T,resizeObserver:m,dragHandle:g.dragHandle,zIndex:g[lt]?.z??0,isParent:!!g[lt]?.isParent,noDragClassName:t.noDragClassName,noPanClassName:t.noPanClassName,initialized:!!g.width&&!!g.height,rfId:t.rfId,disableKeyboardA11y:t.disableKeyboardA11y,ariaLabel:g.ariaLabel,hasHandleBounds:!!g[lt]?.handleBounds})}))};jv.displayName="NodeRenderer";var kA=D.memo(jv);const LA=(t,i,a)=>a===ye.Left?t-i:a===ye.Right?t+i:t,UA=(t,i,a)=>a===ye.Top?t-i:a===ye.Bottom?t+i:t,jg="react-flow__edgeupdater",Hg=({position:t,centerX:i,centerY:a,radius:r=10,onMouseDown:u,onMouseEnter:f,onMouseOut:s,type:h})=>P.createElement("circle",{onMouseDown:u,onMouseEnter:f,onMouseOut:s,className:Rt([jg,`${jg}-${h}`]),cx:LA(i,r,t),cy:UA(a,r,t),r,stroke:"transparent",fill:"transparent"}),BA=()=>!0;var ga=t=>{const i=({id:a,className:r,type:u,data:f,onClick:s,onEdgeDoubleClick:h,selected:p,animated:m,label:g,labelStyle:v,labelShowBg:x,labelBgStyle:w,labelBgPadding:M,labelBgBorderRadius:N,style:T,source:z,target:j,sourceX:B,sourceY:k,targetX:K,targetY:I,sourcePosition:ee,targetPosition:V,elementsSelectable:X,hidden:le,sourceHandleId:oe,targetHandleId:re,onContextMenu:ae,onMouseEnter:C,onMouseMove:$,onMouseLeave:A,reconnectRadius:U,onReconnect:q,onReconnectStart:E,onReconnectEnd:O,markerEnd:_,markerStart:H,rfId:Q,ariaLabel:W,isFocusable:ue,isReconnectable:ce,pathOptions:fe,interactionWidth:be,disableKeyboardA11y:de})=>{const Ae=D.useRef(null),[He,Qe]=D.useState(!1),[et,Be]=D.useState(!1),je=xt(),pt=D.useMemo(()=>`url('#${od(H,Q)}')`,[H,Q]),ke=D.useMemo(()=>`url('#${od(_,Q)}')`,[_,Q]);if(le)return null;const se=bt=>{const{edges:cn,addSelectedEdges:Wt,unselectNodesAndEdges:it,multiSelectionActive:kt}=je.getState(),Je=cn.find(Yn=>Yn.id===a);Je&&(X&&(je.setState({nodesSelectionActive:!1}),Je.selected&&kt?(it({nodes:[],edges:[Je]}),Ae.current?.blur()):Wt([a])),s&&s(bt,Je))},Re=Oo(a,je.getState,h),Tt=Oo(a,je.getState,ae),Yt=Oo(a,je.getState,C),Ft=Oo(a,je.getState,$),Jt=Oo(a,je.getState,A),Fe=(bt,cn)=>{if(bt.button!==0)return;const{edges:Wt,isValidConnection:it}=je.getState(),kt=cn?j:z,Je=(cn?re:oe)||null,Yn=cn?"target":"source",Oa=it||BA,Ra=cn,zn=Wt.find(Lt=>Lt.id===a);Be(!0),E?.(bt,zn,Yn);const gl=Lt=>{Be(!1),O?.(Lt,zn,Yn)};dv({event:bt,handleId:Je,nodeId:kt,onConnect:Lt=>q?.(zn,Lt),isTarget:Ra,getState:je.getState,setState:je.setState,isValidConnection:Oa,edgeUpdaterType:Yn,onReconnectEnd:gl})},Mt=bt=>Fe(bt,!0),zt=bt=>Fe(bt,!1),Ht=()=>Qe(!0),Dt=()=>Qe(!1),un=!X&&!s,ml=bt=>{if(!de&&Py.includes(bt.key)&&X){const{unselectNodesAndEdges:cn,addSelectedEdges:Wt,edges:it}=je.getState();bt.key==="Escape"?(Ae.current?.blur(),cn({edges:[it.find(Je=>Je.id===a)]})):Wt([a])}};return P.createElement("g",{className:Rt(["react-flow__edge",`react-flow__edge-${u}`,r,{selected:p,animated:m,inactive:un,updating:He}]),onClick:se,onDoubleClick:Re,onContextMenu:Tt,onMouseEnter:Yt,onMouseMove:Ft,onMouseLeave:Jt,onKeyDown:ue?ml:void 0,tabIndex:ue?0:void 0,role:ue?"button":"img","data-testid":`rf__edge-${a}`,"aria-label":W===null?void 0:W||`Edge from ${z} to ${j}`,"aria-describedby":ue?`${Sv}-${Q}`:void 0,ref:Ae},!et&&P.createElement(t,{id:a,source:z,target:j,selected:p,animated:m,label:g,labelStyle:v,labelShowBg:x,labelBgStyle:w,labelBgPadding:M,labelBgBorderRadius:N,data:f,style:T,sourceX:B,sourceY:k,targetX:K,targetY:I,sourcePosition:ee,targetPosition:V,sourceHandleId:oe,targetHandleId:re,markerStart:pt,markerEnd:ke,pathOptions:fe,interactionWidth:be}),ce&&P.createElement(P.Fragment,null,(ce==="source"||ce===!0)&&P.createElement(Hg,{position:ee,centerX:B,centerY:k,radius:U,onMouseDown:Mt,onMouseEnter:Ht,onMouseOut:Dt,type:"source"}),(ce==="target"||ce===!0)&&P.createElement(Hg,{position:V,centerX:K,centerY:I,radius:U,onMouseDown:zt,onMouseEnter:Ht,onMouseOut:Dt,type:"target"})))};return i.displayName="EdgeWrapper",D.memo(i)};function YA(t){const i={default:ga(t.default||Iu),straight:ga(t.bezier||jd),step:ga(t.step||Rd),smoothstep:ga(t.step||cc),simplebezier:ga(t.simplebezier||Od)},a={},r=Object.keys(t).filter(u=>!["default","bezier"].includes(u)).reduce((u,f)=>(u[f]=ga(t[f]||Iu),u),a);return{...i,...r}}function kg(t,i,a=null){const r=(a?.x||0)+i.x,u=(a?.y||0)+i.y,f=a?.width||i.width,s=a?.height||i.height;switch(t){case ye.Top:return{x:r+f/2,y:u};case ye.Right:return{x:r+f,y:u+s/2};case ye.Bottom:return{x:r+f/2,y:u+s};case ye.Left:return{x:r,y:u+s/2}}}function Lg(t,i){return t?t.length===1||!i?t[0]:i&&t.find(a=>a.id===i)||null:null}const VA=(t,i,a,r,u,f)=>{const s=kg(a,t,i),h=kg(f,r,u);return{sourceX:s.x,sourceY:s.y,targetX:h.x,targetY:h.y}};function qA({sourcePos:t,targetPos:i,sourceWidth:a,sourceHeight:r,targetWidth:u,targetHeight:f,width:s,height:h,transform:p}){const m={x:Math.min(t.x,i.x),y:Math.min(t.y,i.y),x2:Math.max(t.x+a,i.x+u),y2:Math.max(t.y+r,i.y+f)};m.x===m.x2&&(m.x2+=1),m.y===m.y2&&(m.y2+=1);const g=Dd({x:(0-p[0])/p[2],y:(0-p[1])/p[2],width:s/p[2],height:h/p[2]}),v=Math.max(0,Math.min(g.x2,m.x2)-Math.max(g.x,m.x)),x=Math.max(0,Math.min(g.y2,m.y2)-Math.max(g.y,m.y));return Math.ceil(v*x)>0}function Ug(t){const i=t?.[lt]?.handleBounds||null,a=i&&t?.width&&t?.height&&typeof t?.positionAbsolute?.x<"u"&&typeof t?.positionAbsolute?.y<"u";return[{x:t?.positionAbsolute?.x||0,y:t?.positionAbsolute?.y||0,width:t?.width||0,height:t?.height||0},i,!!a]}const GA=[{level:0,isMaxLevel:!0,edges:[]}];function XA(t,i,a=!1){let r=-1;const u=t.reduce((s,h)=>{const p=Sn(h.zIndex);let m=p?h.zIndex:0;if(a){const g=i.get(h.target),v=i.get(h.source),x=h.selected||g?.selected||v?.selected,w=Math.max(v?.[lt]?.z||0,g?.[lt]?.z||0,1e3);m=(p?h.zIndex:0)+(x?w:0)}return s[m]?s[m].push(h):s[m]=[h],r=m>r?m:r,s},{}),f=Object.entries(u).map(([s,h])=>{const p=+s;return{edges:h,level:p,isMaxLevel:p===r}});return f.length===0?GA:f}function ZA(t,i,a){const r=Pe(D.useCallback(u=>t?u.edges.filter(f=>{const s=i.get(f.source),h=i.get(f.target);return s?.width&&s?.height&&h?.width&&h?.height&&qA({sourcePos:s.positionAbsolute||{x:0,y:0},targetPos:h.positionAbsolute||{x:0,y:0},sourceWidth:s.width,sourceHeight:s.height,targetWidth:h.width,targetHeight:h.height,width:u.width,height:u.height,transform:u.transform})}):u.edges,[t,i]));return XA(r,i,a)}const $A=({color:t="none",strokeWidth:i=1})=>P.createElement("polyline",{style:{stroke:t,strokeWidth:i},strokeLinecap:"round",strokeLinejoin:"round",fill:"none",points:"-5,-4 0,0 -5,4"}),QA=({color:t="none",strokeWidth:i=1})=>P.createElement("polyline",{style:{stroke:t,fill:t,strokeWidth:i},strokeLinecap:"round",strokeLinejoin:"round",points:"-5,-4 0,0 -5,4 -5,-4"}),Bg={[Qu.Arrow]:$A,[Qu.ArrowClosed]:QA};function KA(t){const i=xt();return D.useMemo(()=>Object.prototype.hasOwnProperty.call(Bg,t)?Bg[t]:(i.getState().onError?.("009",hl.error009(t)),null),[t])}const IA=({id:t,type:i,color:a,width:r=12.5,height:u=12.5,markerUnits:f="strokeWidth",strokeWidth:s,orient:h="auto-start-reverse"})=>{const p=KA(i);return p?P.createElement("marker",{className:"react-flow__arrowhead",id:t,markerWidth:`${r}`,markerHeight:`${u}`,viewBox:"-10 -10 20 20",markerUnits:f,orient:h,refX:"0",refY:"0"},P.createElement(p,{color:a,strokeWidth:s})):null},FA=({defaultColor:t,rfId:i})=>a=>{const r=[];return a.edges.reduce((u,f)=>([f.markerStart,f.markerEnd].forEach(s=>{if(s&&typeof s=="object"){const h=od(s,i);r.includes(h)||(u.push({id:h,color:s.color||t,...s}),r.push(h))}}),u),[]).sort((u,f)=>u.id.localeCompare(f.id))},Hv=({defaultColor:t,rfId:i})=>{const a=Pe(D.useCallback(FA({defaultColor:t,rfId:i}),[t,i]),(r,u)=>!(r.length!==u.length||r.some((f,s)=>f.id!==u[s].id)));return P.createElement("defs",null,a.map(r=>P.createElement(IA,{id:r.id,key:r.id,type:r.type,color:r.color,width:r.width,height:r.height,markerUnits:r.markerUnits,strokeWidth:r.strokeWidth,orient:r.orient})))};Hv.displayName="MarkerDefinitions";var JA=D.memo(Hv);const WA=t=>({nodesConnectable:t.nodesConnectable,edgesFocusable:t.edgesFocusable,edgesUpdatable:t.edgesUpdatable,elementsSelectable:t.elementsSelectable,width:t.width,height:t.height,connectionMode:t.connectionMode,nodeInternals:t.nodeInternals,onError:t.onError}),kv=({defaultMarkerColor:t,onlyRenderVisibleElements:i,elevateEdgesOnSelect:a,rfId:r,edgeTypes:u,noPanClassName:f,onEdgeContextMenu:s,onEdgeMouseEnter:h,onEdgeMouseMove:p,onEdgeMouseLeave:m,onEdgeClick:g,onEdgeDoubleClick:v,onReconnect:x,onReconnectStart:w,onReconnectEnd:M,reconnectRadius:N,children:T,disableKeyboardA11y:z})=>{const{edgesFocusable:j,edgesUpdatable:B,elementsSelectable:k,width:K,height:I,connectionMode:ee,nodeInternals:V,onError:X}=Pe(WA,It),le=ZA(i,V,a);return K?P.createElement(P.Fragment,null,le.map(({level:oe,edges:re,isMaxLevel:ae})=>P.createElement("svg",{key:oe,style:{zIndex:oe},width:K,height:I,className:"react-flow__edges react-flow__container"},ae&&P.createElement(JA,{defaultColor:t,rfId:r}),P.createElement("g",null,re.map(C=>{const[$,A,U]=Ug(V.get(C.source)),[q,E,O]=Ug(V.get(C.target));if(!U||!O)return null;let _=C.type||"default";u[_]||(X?.("011",hl.error011(_)),_="default");const H=u[_]||u.default,Q=ee===Di.Strict?E.target:(E.target??[]).concat(E.source??[]),W=Lg(A.source,C.sourceHandle),ue=Lg(Q,C.targetHandle),ce=W?.position||ye.Bottom,fe=ue?.position||ye.Top,be=!!(C.focusable||j&&typeof C.focusable>"u"),de=C.reconnectable||C.updatable,Ae=typeof x<"u"&&(de||B&&typeof de>"u");if(!W||!ue)return X?.("008",hl.error008(W,C)),null;const{sourceX:He,sourceY:Qe,targetX:et,targetY:Be}=VA($,W,ce,q,ue,fe);return P.createElement(H,{key:C.id,id:C.id,className:Rt([C.className,f]),type:_,data:C.data,selected:!!C.selected,animated:!!C.animated,hidden:!!C.hidden,label:C.label,labelStyle:C.labelStyle,labelShowBg:C.labelShowBg,labelBgStyle:C.labelBgStyle,labelBgPadding:C.labelBgPadding,labelBgBorderRadius:C.labelBgBorderRadius,style:C.style,source:C.source,target:C.target,sourceHandleId:C.sourceHandle,targetHandleId:C.targetHandle,markerEnd:C.markerEnd,markerStart:C.markerStart,sourceX:He,sourceY:Qe,targetX:et,targetY:Be,sourcePosition:ce,targetPosition:fe,elementsSelectable:k,onContextMenu:s,onMouseEnter:h,onMouseMove:p,onMouseLeave:m,onClick:g,onEdgeDoubleClick:v,onReconnect:x,onReconnectStart:w,onReconnectEnd:M,reconnectRadius:N,rfId:r,ariaLabel:C.ariaLabel,isFocusable:be,isReconnectable:Ae,pathOptions:"pathOptions"in C?C.pathOptions:void 0,interactionWidth:C.interactionWidth,disableKeyboardA11y:z})})))),T):null};kv.displayName="EdgeRenderer";var PA=D.memo(kv);const e3=t=>`translate(${t.transform[0]}px,${t.transform[1]}px) scale(${t.transform[2]})`;function t3({children:t}){const i=Pe(e3);return P.createElement("div",{className:"react-flow__viewport react-flow__container",style:{transform:i}},t)}function n3(t){const i=sc(),a=D.useRef(!1);D.useEffect(()=>{!a.current&&i.viewportInitialized&&t&&(setTimeout(()=>t(i),1),a.current=!0)},[t,i.viewportInitialized])}const l3={[ye.Left]:ye.Right,[ye.Right]:ye.Left,[ye.Top]:ye.Bottom,[ye.Bottom]:ye.Top},Lv=({nodeId:t,handleType:i,style:a,type:r=Kl.Bezier,CustomComponent:u,connectionStatus:f})=>{const{fromNode:s,handleId:h,toX:p,toY:m,connectionMode:g}=Pe(D.useCallback(I=>({fromNode:I.nodeInternals.get(t),handleId:I.connectionHandleId,toX:(I.connectionPosition.x-I.transform[0])/I.transform[2],toY:(I.connectionPosition.y-I.transform[1])/I.transform[2],connectionMode:I.connectionMode}),[t]),It),v=s?.[lt]?.handleBounds;let x=v?.[i];if(g===Di.Loose&&(x=x||v?.[i==="source"?"target":"source"]),!s||!x)return null;const w=h?x.find(I=>I.id===h):x[0],M=w?w.x+w.width/2:(s.width??0)/2,N=w?w.y+w.height/2:s.height??0,T=(s.positionAbsolute?.x??0)+M,z=(s.positionAbsolute?.y??0)+N,j=w?.position,B=j?l3[j]:null;if(!j||!B)return null;if(u)return P.createElement(u,{connectionLineType:r,connectionLineStyle:a,fromNode:s,fromHandle:w,fromX:T,fromY:z,toX:p,toY:m,fromPosition:j,toPosition:B,connectionStatus:f});let k="";const K={sourceX:T,sourceY:z,sourcePosition:j,targetX:p,targetY:m,targetPosition:B};return r===Kl.Bezier?[k]=iv(K):r===Kl.Step?[k]=Ku({...K,borderRadius:0}):r===Kl.SmoothStep?[k]=Ku(K):r===Kl.SimpleBezier?[k]=lv(K):k=`M${T},${z} ${p},${m}`,P.createElement("path",{d:k,fill:"none",className:"react-flow__connection-path",style:a})};Lv.displayName="ConnectionLine";const i3=t=>({nodeId:t.connectionNodeId,handleType:t.connectionHandleType,nodesConnectable:t.nodesConnectable,connectionStatus:t.connectionStatus,width:t.width,height:t.height});function a3({containerStyle:t,style:i,type:a,component:r}){const{nodeId:u,handleType:f,nodesConnectable:s,width:h,height:p,connectionStatus:m}=Pe(i3,It);return!(u&&f&&h&&s)?null:P.createElement("svg",{style:t,width:h,height:p,className:"react-flow__edges react-flow__connectionline react-flow__container"},P.createElement("g",{className:Rt(["react-flow__connection",m])},P.createElement(Lv,{nodeId:u,handleType:f,style:i,type:a,CustomComponent:r,connectionStatus:m})))}function Yg(t,i){return D.useRef(null),xt(),D.useMemo(()=>i(t),[t])}const Uv=({nodeTypes:t,edgeTypes:i,onMove:a,onMoveStart:r,onMoveEnd:u,onInit:f,onNodeClick:s,onEdgeClick:h,onNodeDoubleClick:p,onEdgeDoubleClick:m,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:w,onSelectionContextMenu:M,onSelectionStart:N,onSelectionEnd:T,connectionLineType:z,connectionLineStyle:j,connectionLineComponent:B,connectionLineContainerStyle:k,selectionKeyCode:K,selectionOnDrag:I,selectionMode:ee,multiSelectionKeyCode:V,panActivationKeyCode:X,zoomActivationKeyCode:le,deleteKeyCode:oe,onlyRenderVisibleElements:re,elementsSelectable:ae,selectNodesOnDrag:C,defaultViewport:$,translateExtent:A,minZoom:U,maxZoom:q,preventScrolling:E,defaultMarkerColor:O,zoomOnScroll:_,zoomOnPinch:H,panOnScroll:Q,panOnScrollSpeed:W,panOnScrollMode:ue,zoomOnDoubleClick:ce,panOnDrag:fe,onPaneClick:be,onPaneMouseEnter:de,onPaneMouseMove:Ae,onPaneMouseLeave:He,onPaneScroll:Qe,onPaneContextMenu:et,onEdgeContextMenu:Be,onEdgeMouseEnter:je,onEdgeMouseMove:pt,onEdgeMouseLeave:ke,onReconnect:se,onReconnectStart:Re,onReconnectEnd:Tt,reconnectRadius:Yt,noDragClassName:Ft,noWheelClassName:Jt,noPanClassName:Fe,elevateEdgesOnSelect:Mt,disableKeyboardA11y:zt,nodeOrigin:Ht,nodeExtent:Dt,rfId:un})=>{const ml=Yg(t,RA),bt=Yg(i,YA);return n3(f),P.createElement(DA,{onPaneClick:be,onPaneMouseEnter:de,onPaneMouseMove:Ae,onPaneMouseLeave:He,onPaneContextMenu:et,onPaneScroll:Qe,deleteKeyCode:oe,selectionKeyCode:K,selectionOnDrag:I,selectionMode:ee,onSelectionStart:N,onSelectionEnd:T,multiSelectionKeyCode:V,panActivationKeyCode:X,zoomActivationKeyCode:le,elementsSelectable:ae,onMove:a,onMoveStart:r,onMoveEnd:u,zoomOnScroll:_,zoomOnPinch:H,zoomOnDoubleClick:ce,panOnScroll:Q,panOnScrollSpeed:W,panOnScrollMode:ue,panOnDrag:fe,defaultViewport:$,translateExtent:A,minZoom:U,maxZoom:q,onSelectionContextMenu:M,preventScrolling:E,noDragClassName:Ft,noWheelClassName:Jt,noPanClassName:Fe,disableKeyboardA11y:zt},P.createElement(t3,null,P.createElement(PA,{edgeTypes:bt,onEdgeClick:h,onEdgeDoubleClick:m,onlyRenderVisibleElements:re,onEdgeContextMenu:Be,onEdgeMouseEnter:je,onEdgeMouseMove:pt,onEdgeMouseLeave:ke,onReconnect:se,onReconnectStart:Re,onReconnectEnd:Tt,reconnectRadius:Yt,defaultMarkerColor:O,noPanClassName:Fe,elevateEdgesOnSelect:!!Mt,disableKeyboardA11y:zt,rfId:un},P.createElement(a3,{style:j,type:z,component:B,containerStyle:k})),P.createElement("div",{className:"react-flow__edgelabel-renderer"}),P.createElement(kA,{nodeTypes:ml,onNodeClick:s,onNodeDoubleClick:p,onNodeMouseEnter:g,onNodeMouseMove:v,onNodeMouseLeave:x,onNodeContextMenu:w,selectNodesOnDrag:C,onlyRenderVisibleElements:re,noPanClassName:Fe,noDragClassName:Ft,disableKeyboardA11y:zt,nodeOrigin:Ht,nodeExtent:Dt,rfId:un})))};Uv.displayName="GraphView";var o3=D.memo(Uv);const sd=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],Gl={rfId:"1",width:0,height:0,transform:[0,0,1],nodeInternals:new Map,edges:[],onNodesChange:null,onEdgesChange:null,hasDefaultNodes:!1,hasDefaultEdges:!1,d3Zoom:null,d3Selection:null,d3ZoomHandler:void 0,minZoom:.5,maxZoom:2,translateExtent:sd,nodeExtent:sd,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionNodeId:null,connectionHandleId:null,connectionHandleType:"source",connectionPosition:{x:0,y:0},connectionStatus:null,connectionMode:Di.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:[0,0],nodeDragThreshold:0,snapGrid:[15,15],snapToGrid:!1,nodesDraggable:!0,nodesConnectable:!0,nodesFocusable:!0,edgesFocusable:!0,edgesUpdatable:!0,elementsSelectable:!0,elevateNodesOnSelect:!0,fitViewOnInit:!1,fitViewOnInitDone:!1,fitViewOnInitOptions:void 0,onSelectionChange:[],multiSelectionActive:!1,connectionStartHandle:null,connectionEndHandle:null,connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,connectionRadius:20,onError:k_,isValidConnection:void 0},r3=()=>IS((t,i)=>({...Gl,setNodes:a=>{const{nodeInternals:r,nodeOrigin:u,elevateNodesOnSelect:f}=i();t({nodeInternals:Vf(a,r,u,f)})},getNodes:()=>Array.from(i().nodeInternals.values()),setEdges:a=>{const{defaultEdgeOptions:r={}}=i();t({edges:a.map(u=>({...r,...u}))})},setDefaultNodesAndEdges:(a,r)=>{const u=typeof a<"u",f=typeof r<"u",s=u?Vf(a,new Map,i().nodeOrigin,i().elevateNodesOnSelect):new Map;t({nodeInternals:s,edges:f?r:[],hasDefaultNodes:u,hasDefaultEdges:f})},updateNodeDimensions:a=>{const{onNodesChange:r,nodeInternals:u,fitViewOnInit:f,fitViewOnInitDone:s,fitViewOnInitOptions:h,domNode:p,nodeOrigin:m}=i(),g=p?.querySelector(".react-flow__viewport");if(!g)return;const v=window.getComputedStyle(g),{m22:x}=new window.DOMMatrixReadOnly(v.transform),w=a.reduce((N,T)=>{const z=u.get(T.id);if(z?.hidden)u.set(z.id,{...z,[lt]:{...z[lt],handleBounds:void 0}});else if(z){const j=Md(T.nodeElement);j.width&&j.height&&(z.width!==j.width||z.height!==j.height||T.forceUpdate)&&(u.set(z.id,{...z,[lt]:{...z[lt],handleBounds:{source:Rg(".source",T.nodeElement,x,m),target:Rg(".target",T.nodeElement,x,m)}},...j}),N.push({id:z.id,type:"dimensions",dimensions:j}))}return N},[]);Ev(u,m);const M=s||f&&!s&&_v(i,{initial:!0,...h});t({nodeInternals:new Map(u),fitViewOnInitDone:M}),w?.length>0&&r?.(w)},updateNodePositions:(a,r=!0,u=!1)=>{const{triggerNodeChanges:f}=i(),s=a.map(h=>{const p={id:h.id,type:"position",dragging:u};return r&&(p.positionAbsolute=h.positionAbsolute,p.position=h.position),p});f(s)},triggerNodeChanges:a=>{const{onNodesChange:r,nodeInternals:u,hasDefaultNodes:f,nodeOrigin:s,getNodes:h,elevateNodesOnSelect:p}=i();if(a?.length){if(f){const m=Nv(a,h()),g=Vf(m,u,s,p);t({nodeInternals:g})}r?.(a)}},addSelectedNodes:a=>{const{multiSelectionActive:r,edges:u,getNodes:f}=i();let s,h=null;r?s=a.map(p=>Ql(p,!0)):(s=xa(f(),a),h=xa(u,[])),Du({changedNodes:s,changedEdges:h,get:i,set:t})},addSelectedEdges:a=>{const{multiSelectionActive:r,edges:u,getNodes:f}=i();let s,h=null;r?s=a.map(p=>Ql(p,!0)):(s=xa(u,a),h=xa(f(),[])),Du({changedNodes:h,changedEdges:s,get:i,set:t})},unselectNodesAndEdges:({nodes:a,edges:r}={})=>{const{edges:u,getNodes:f}=i(),s=a||f(),h=r||u,p=s.map(g=>(g.selected=!1,Ql(g.id,!1))),m=h.map(g=>Ql(g.id,!1));Du({changedNodes:p,changedEdges:m,get:i,set:t})},setMinZoom:a=>{const{d3Zoom:r,maxZoom:u}=i();r?.scaleExtent([a,u]),t({minZoom:a})},setMaxZoom:a=>{const{d3Zoom:r,minZoom:u}=i();r?.scaleExtent([u,a]),t({maxZoom:a})},setTranslateExtent:a=>{i().d3Zoom?.translateExtent(a),t({translateExtent:a})},resetSelectedElements:()=>{const{edges:a,getNodes:r}=i(),f=r().filter(h=>h.selected).map(h=>Ql(h.id,!1)),s=a.filter(h=>h.selected).map(h=>Ql(h.id,!1));Du({changedNodes:f,changedEdges:s,get:i,set:t})},setNodeExtent:a=>{const{nodeInternals:r}=i();r.forEach(u=>{u.positionAbsolute=zd(u.position,a)}),t({nodeExtent:a,nodeInternals:new Map(r)})},panBy:a=>{const{transform:r,width:u,height:f,d3Zoom:s,d3Selection:h,translateExtent:p}=i();if(!s||!h||!a.x&&!a.y)return!1;const m=Fl.translate(r[0]+a.x,r[1]+a.y).scale(r[2]),g=[[0,0],[u,f]],v=s?.constrain()(m,g,p);return s.transform(h,v),r[0]!==v.x||r[1]!==v.y||r[2]!==v.k},cancelConnection:()=>t({connectionNodeId:Gl.connectionNodeId,connectionHandleId:Gl.connectionHandleId,connectionHandleType:Gl.connectionHandleType,connectionStatus:Gl.connectionStatus,connectionStartHandle:Gl.connectionStartHandle,connectionEndHandle:Gl.connectionEndHandle}),reset:()=>t({...Gl})}),Object.is),Yd=({children:t})=>{const i=D.useRef(null);return i.current||(i.current=r3()),P.createElement(T_,{value:i.current},t)};Yd.displayName="ReactFlowProvider";const Bv=({children:t})=>D.useContext(uc)?P.createElement(P.Fragment,null,t):P.createElement(Yd,null,t);Bv.displayName="ReactFlowWrapper";const u3={input:gv,default:ud,output:vv,group:Ud},c3={default:Iu,straight:jd,step:Rd,smoothstep:cc,simplebezier:Od},s3=[0,0],f3=[15,15],d3={x:0,y:0,zoom:1},h3={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0},Yv=D.forwardRef(({nodes:t,edges:i,defaultNodes:a,defaultEdges:r,className:u,nodeTypes:f=u3,edgeTypes:s=c3,onNodeClick:h,onEdgeClick:p,onInit:m,onMove:g,onMoveStart:v,onMoveEnd:x,onConnect:w,onConnectStart:M,onConnectEnd:N,onClickConnectStart:T,onClickConnectEnd:z,onNodeMouseEnter:j,onNodeMouseMove:B,onNodeMouseLeave:k,onNodeContextMenu:K,onNodeDoubleClick:I,onNodeDragStart:ee,onNodeDrag:V,onNodeDragStop:X,onNodesDelete:le,onEdgesDelete:oe,onSelectionChange:re,onSelectionDragStart:ae,onSelectionDrag:C,onSelectionDragStop:$,onSelectionContextMenu:A,onSelectionStart:U,onSelectionEnd:q,connectionMode:E=Di.Strict,connectionLineType:O=Kl.Bezier,connectionLineStyle:_,connectionLineComponent:H,connectionLineContainerStyle:Q,deleteKeyCode:W="Backspace",selectionKeyCode:ue="Shift",selectionOnDrag:ce=!1,selectionMode:fe=Zo.Full,panActivationKeyCode:be="Space",multiSelectionKeyCode:de=$u()?"Meta":"Control",zoomActivationKeyCode:Ae=$u()?"Meta":"Control",snapToGrid:He=!1,snapGrid:Qe=f3,onlyRenderVisibleElements:et=!1,selectNodesOnDrag:Be=!0,nodesDraggable:je,nodesConnectable:pt,nodesFocusable:ke,nodeOrigin:se=s3,edgesFocusable:Re,edgesUpdatable:Tt,elementsSelectable:Yt,defaultViewport:Ft=d3,minZoom:Jt=.5,maxZoom:Fe=2,translateExtent:Mt=sd,preventScrolling:zt=!0,nodeExtent:Ht,defaultMarkerColor:Dt="#b1b1b7",zoomOnScroll:un=!0,zoomOnPinch:ml=!0,panOnScroll:bt=!1,panOnScrollSpeed:cn=.5,panOnScrollMode:Wt=Ci.Free,zoomOnDoubleClick:it=!0,panOnDrag:kt=!0,onPaneClick:Je,onPaneMouseEnter:Yn,onPaneMouseMove:Oa,onPaneMouseLeave:Ra,onPaneScroll:zn,onPaneContextMenu:gl,children:ni,onEdgeContextMenu:Lt,onEdgeDoubleClick:Ri,onEdgeMouseEnter:li,onEdgeMouseMove:hc,onEdgeMouseLeave:tr,onEdgeUpdate:ja,onEdgeUpdateStart:ii,onEdgeUpdateEnd:pc,onReconnect:nr,onReconnectStart:lr,onReconnectEnd:ir,reconnectRadius:Ha=10,edgeUpdaterRadius:ka=10,onNodesChange:ar,onEdgesChange:or,noDragClassName:Dn="nodrag",noWheelClassName:mt="nowheel",noPanClassName:wt="nopan",fitView:yl=!1,fitViewOptions:La,connectOnClick:mc=!0,attributionPosition:gc,proOptions:rr,defaultEdgeOptions:ai,elevateNodesOnSelect:Ua=!0,elevateEdgesOnSelect:vl=!1,disableKeyboardA11y:Vn=!1,autoPanOnConnect:oi=!0,autoPanOnNodeDrag:xl=!0,connectionRadius:rt=20,isValidConnection:ur,onError:cr,style:qn,id:Gn,nodeDragThreshold:yc,...sr},fr)=>{const Ba=Gn||"1";return P.createElement("div",{...sr,style:{...qn,...h3},ref:fr,className:Rt(["react-flow",u]),"data-testid":"rf__wrapper",id:Gn},P.createElement(Bv,null,P.createElement(o3,{onInit:m,onMove:g,onMoveStart:v,onMoveEnd:x,onNodeClick:h,onEdgeClick:p,onNodeMouseEnter:j,onNodeMouseMove:B,onNodeMouseLeave:k,onNodeContextMenu:K,onNodeDoubleClick:I,nodeTypes:f,edgeTypes:s,connectionLineType:O,connectionLineStyle:_,connectionLineComponent:H,connectionLineContainerStyle:Q,selectionKeyCode:ue,selectionOnDrag:ce,selectionMode:fe,deleteKeyCode:W,multiSelectionKeyCode:de,panActivationKeyCode:be,zoomActivationKeyCode:Ae,onlyRenderVisibleElements:et,selectNodesOnDrag:Be,defaultViewport:Ft,translateExtent:Mt,minZoom:Jt,maxZoom:Fe,preventScrolling:zt,zoomOnScroll:un,zoomOnPinch:ml,zoomOnDoubleClick:it,panOnScroll:bt,panOnScrollSpeed:cn,panOnScrollMode:Wt,panOnDrag:kt,onPaneClick:Je,onPaneMouseEnter:Yn,onPaneMouseMove:Oa,onPaneMouseLeave:Ra,onPaneScroll:zn,onPaneContextMenu:gl,onSelectionContextMenu:A,onSelectionStart:U,onSelectionEnd:q,onEdgeContextMenu:Lt,onEdgeDoubleClick:Ri,onEdgeMouseEnter:li,onEdgeMouseMove:hc,onEdgeMouseLeave:tr,onReconnect:nr??ja,onReconnectStart:lr??ii,onReconnectEnd:ir??pc,reconnectRadius:Ha??ka,defaultMarkerColor:Dt,noDragClassName:Dn,noWheelClassName:mt,noPanClassName:wt,elevateEdgesOnSelect:vl,rfId:Ba,disableKeyboardA11y:Vn,nodeOrigin:se,nodeExtent:Ht}),P.createElement(iA,{nodes:t,edges:i,defaultNodes:a,defaultEdges:r,onConnect:w,onConnectStart:M,onConnectEnd:N,onClickConnectStart:T,onClickConnectEnd:z,nodesDraggable:je,nodesConnectable:pt,nodesFocusable:ke,edgesFocusable:Re,edgesUpdatable:Tt,elementsSelectable:Yt,elevateNodesOnSelect:Ua,minZoom:Jt,maxZoom:Fe,nodeExtent:Ht,onNodesChange:ar,onEdgesChange:or,snapToGrid:He,snapGrid:Qe,connectionMode:E,translateExtent:Mt,connectOnClick:mc,defaultEdgeOptions:ai,fitView:yl,fitViewOptions:La,onNodesDelete:le,onEdgesDelete:oe,onNodeDragStart:ee,onNodeDrag:V,onNodeDragStop:X,onSelectionDrag:C,onSelectionDragStart:ae,onSelectionDragStop:$,noPanClassName:wt,nodeOrigin:se,rfId:Ba,autoPanOnConnect:oi,autoPanOnNodeDrag:xl,onError:cr,connectionRadius:rt,isValidConnection:ur,nodeDragThreshold:yc}),P.createElement(nA,{onSelectionChange:re}),ni,P.createElement(z_,{proOptions:rr,position:gc}),P.createElement(cA,{rfId:Ba,disableKeyboardA11y:Vn})))});Yv.displayName="ReactFlow";const p3=t=>t.domNode?.querySelector(".react-flow__edgelabel-renderer");function m3({children:t}){const i=Pe(p3);return i?C_.createPortal(t,i):null}function Vv(t){return i=>{const[a,r]=D.useState(i),u=D.useCallback(f=>r(s=>t(f,s)),[]);return[a,r,u]}}const g3=Vv(Nv),y3=Vv(EA);function v3(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,u]of t)if(!Object.is(u,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}function x3(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32"},P.createElement("path",{d:"M32 18.133H18.133V32h-4.266V18.133H0v-4.266h13.867V0h4.266v13.867H32z"}))}function b3(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5"},P.createElement("path",{d:"M0 0h32v4.2H0z"}))}function S3(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 30"},P.createElement("path",{d:"M3.692 4.63c0-.53.4-.938.939-.938h5.215V0H4.708C2.13 0 0 2.054 0 4.63v5.216h3.692V4.631zM27.354 0h-5.2v3.692h5.17c.53 0 .984.4.984.939v5.215H32V4.631A4.624 4.624 0 0027.354 0zm.954 24.83c0 .532-.4.94-.939.94h-5.215v3.768h5.215c2.577 0 4.631-2.13 4.631-4.707v-5.139h-3.692v5.139zm-23.677.94c-.531 0-.939-.4-.939-.94v-5.138H0v5.139c0 2.577 2.13 4.707 4.708 4.707h5.138V25.77H4.631z"}))}function w3(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},P.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0 8 0 4.571 3.429 4.571 7.619v3.048H3.048A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047zm4.724-13.866H7.467V7.619c0-2.59 2.133-4.724 4.723-4.724 2.591 0 4.724 2.133 4.724 4.724v3.048z"}))}function E3(){return P.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 25 32"},P.createElement("path",{d:"M21.333 10.667H19.81V7.619C19.81 3.429 16.38 0 12.19 0c-4.114 1.828-1.37 2.133.305 2.438 1.676.305 4.42 2.59 4.42 5.181v3.048H3.047A3.056 3.056 0 000 13.714v15.238A3.056 3.056 0 003.048 32h18.285a3.056 3.056 0 003.048-3.048V13.714a3.056 3.056 0 00-3.048-3.047zM12.19 24.533a3.056 3.056 0 01-3.047-3.047 3.056 3.056 0 013.047-3.048 3.056 3.056 0 013.048 3.048 3.056 3.056 0 01-3.048 3.047z"}))}const Uo=({children:t,className:i,...a})=>P.createElement("button",{type:"button",className:Rt(["react-flow__controls-button",i]),...a},t);Uo.displayName="ControlButton";const _3=t=>({isInteractive:t.nodesDraggable||t.nodesConnectable||t.elementsSelectable,minZoomReached:t.transform[2]<=t.minZoom,maxZoomReached:t.transform[2]>=t.maxZoom}),qv=({style:t,showZoom:i=!0,showFitView:a=!0,showInteractive:r=!0,fitViewOptions:u,onZoomIn:f,onZoomOut:s,onFitView:h,onInteractiveChange:p,className:m,children:g,position:v="bottom-left"})=>{const x=xt(),[w,M]=D.useState(!1),{isInteractive:N,minZoomReached:T,maxZoomReached:z}=Pe(_3,v3),{zoomIn:j,zoomOut:B,fitView:k}=sc();if(D.useEffect(()=>{M(!0)},[]),!w)return null;const K=()=>{j(),f?.()},I=()=>{B(),s?.()},ee=()=>{k(u),h?.()},V=()=>{x.setState({nodesDraggable:!N,nodesConnectable:!N,elementsSelectable:!N}),p?.(!N)};return P.createElement(Fy,{className:Rt(["react-flow__controls",m]),position:v,style:t,"data-testid":"rf__controls"},i&&P.createElement(P.Fragment,null,P.createElement(Uo,{onClick:K,className:"react-flow__controls-zoomin",title:"zoom in","aria-label":"zoom in",disabled:z},P.createElement(x3,null)),P.createElement(Uo,{onClick:I,className:"react-flow__controls-zoomout",title:"zoom out","aria-label":"zoom out",disabled:T},P.createElement(b3,null))),a&&P.createElement(Uo,{className:"react-flow__controls-fitview",onClick:ee,title:"fit view","aria-label":"fit view"},P.createElement(S3,null)),r&&P.createElement(Uo,{className:"react-flow__controls-interactive",onClick:V,title:"toggle interactivity","aria-label":"toggle interactivity"},N?P.createElement(E3,null):P.createElement(w3,null)),g)};qv.displayName="Controls";var A3=D.memo(qv);function N3(t,i){if(Object.is(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;if(t instanceof Map&&i instanceof Map){if(t.size!==i.size)return!1;for(const[r,u]of t)if(!Object.is(u,i.get(r)))return!1;return!0}if(t instanceof Set&&i instanceof Set){if(t.size!==i.size)return!1;for(const r of t)if(!i.has(r))return!1;return!0}const a=Object.keys(t);if(a.length!==Object.keys(i).length)return!1;for(const r of a)if(!Object.prototype.hasOwnProperty.call(i,r)||!Object.is(t[r],i[r]))return!1;return!0}var Tn;(function(t){t.Lines="lines",t.Dots="dots",t.Cross="cross"})(Tn||(Tn={}));function C3({color:t,dimensions:i,lineWidth:a}){return P.createElement("path",{stroke:t,strokeWidth:a,d:`M${i[0]/2} 0 V${i[1]} M0 ${i[1]/2} H${i[0]}`})}function T3({color:t,radius:i}){return P.createElement("circle",{cx:i,cy:i,r:i,fill:t})}const M3={[Tn.Dots]:"#91919a",[Tn.Lines]:"#eee",[Tn.Cross]:"#e2e2e2"},z3={[Tn.Dots]:1,[Tn.Lines]:1,[Tn.Cross]:6},D3=t=>({transform:t.transform,patternId:`pattern-${t.rfId}`});function Gv({id:t,variant:i=Tn.Dots,gap:a=20,size:r,lineWidth:u=1,offset:f=2,color:s,style:h,className:p}){const m=D.useRef(null),{transform:g,patternId:v}=Pe(D3,N3),x=s||M3[i],w=r||z3[i],M=i===Tn.Dots,N=i===Tn.Cross,T=Array.isArray(a)?a:[a,a],z=[T[0]*g[2]||1,T[1]*g[2]||1],j=w*g[2],B=N?[j,j]:z,k=M?[j/f,j/f]:[B[0]/f,B[1]/f];return P.createElement("svg",{className:Rt(["react-flow__background",p]),style:{...h,position:"absolute",width:"100%",height:"100%",top:0,left:0},ref:m,"data-testid":"rf__background"},P.createElement("pattern",{id:v+t,x:g[0]%z[0],y:g[1]%z[1],width:z[0],height:z[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${k[0]},-${k[1]})`},M?P.createElement(T3,{color:x,radius:j/f}):P.createElement(C3,{dimensions:B,color:x,lineWidth:u})),P.createElement("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${v+t})`}))}Gv.displayName="Background";var O3=D.memo(Gv),Na;(function(t){t.Line="line",t.Handle="handle"})(Na||(Na={}));function R3({width:t,prevWidth:i,height:a,prevHeight:r,invertX:u,invertY:f}){const s=t-i,h=a-r,p=[s>0?1:s<0?-1:0,h>0?1:h<0?-1:0];return s&&u&&(p[0]=p[0]*-1),h&&f&&(p[1]=p[1]*-1),p}const Xv={width:0,height:0,x:0,y:0},j3={...Xv,pointerX:0,pointerY:0,aspectRatio:1};function H3({nodeId:t,position:i,variant:a=Na.Handle,className:r,style:u={},children:f,color:s,minWidth:h=10,minHeight:p=10,maxWidth:m=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:v=!1,shouldResize:x,onResizeStart:w,onResize:M,onResizeEnd:N}){const T=av(),z=typeof t=="string"?t:T,j=xt(),B=D.useRef(null),k=D.useRef(j3),K=D.useRef(Xv),I=zv(),ee=a===Na.Line?"right":"bottom-right",V=i??ee;D.useEffect(()=>{if(!B.current||!z)return;const re=bn(B.current),ae=V.includes("right")||V.includes("left"),C=V.includes("bottom")||V.includes("top"),$=V.includes("left"),A=V.includes("top"),U=Hy().on("start",q=>{const E=j.getState().nodeInternals.get(z),{xSnapped:O,ySnapped:_}=I(q);K.current={width:E?.width??0,height:E?.height??0,x:E?.position.x??0,y:E?.position.y??0},k.current={...K.current,pointerX:O,pointerY:_,aspectRatio:K.current.width/K.current.height},w?.(q,{...K.current})}).on("drag",q=>{const{nodeInternals:E,triggerNodeChanges:O}=j.getState(),{xSnapped:_,ySnapped:H}=I(q),Q=E.get(z);if(Q){const W=[],{pointerX:ue,pointerY:ce,width:fe,height:be,x:de,y:Ae,aspectRatio:He}=k.current,{x:Qe,y:et,width:Be,height:je}=K.current,pt=Math.floor(ae?_-ue:0),ke=Math.floor(C?H-ce:0);let se=Pl(fe+($?-pt:pt),h,m),Re=Pl(be+(A?-ke:ke),p,g);if(v){const Mt=se/Re,zt=ae&&C,Ht=ae&&!C,Dt=C&&!ae;se=Mt<=He&&zt||Dt?Re*He:se,Re=Mt>He&&zt||Ht?se/He:Re,se>=m?(se=m,Re=m/He):se<=h&&(se=h,Re=h/He),Re>=g?(Re=g,se=g*He):Re<=p&&(Re=p,se=p*He)}const Tt=se!==Be,Yt=Re!==je;if($||A){const Mt=$?de-(se-fe):de,zt=A?Ae-(Re-be):Ae,Ht=Mt!==Qe&&Tt,Dt=zt!==et&&Yt;if(Ht||Dt){const un={id:Q.id,type:"position",position:{x:Ht?Mt:Qe,y:Dt?zt:et}};W.push(un),K.current.x=un.position.x,K.current.y=un.position.y}}if(Tt||Yt){const Mt={id:z,type:"dimensions",updateStyle:!0,resizing:!0,dimensions:{width:se,height:Re}};W.push(Mt),K.current.width=se,K.current.height=Re}if(W.length===0)return;const Ft=R3({width:K.current.width,prevWidth:Be,height:K.current.height,prevHeight:je,invertX:$,invertY:A}),Jt={...K.current,direction:Ft};if(x?.(q,Jt)===!1)return;M?.(q,Jt),O(W)}}).on("end",q=>{const E={id:z,type:"dimensions",resizing:!1};N?.(q,{...K.current}),j.getState().triggerNodeChanges([E])});return re.call(U),()=>{re.on(".drag",null)}},[z,V,h,p,m,g,v,I,w,M,N]);const X=V.split("-"),le=a===Na.Line?"borderColor":"backgroundColor",oe=s?{...u,[le]:s}:u;return P.createElement("div",{className:Rt(["react-flow__resize-control","nodrag",...X,a,r]),ref:B,style:oe},f)}var Vg=D.memo(H3);const k3=["top-left","top-right","bottom-left","bottom-right"],L3=["top","right","bottom","left"];function Zv({nodeId:t,isVisible:i=!0,handleClassName:a,handleStyle:r,lineClassName:u,lineStyle:f,color:s,minWidth:h=10,minHeight:p=10,maxWidth:m=Number.MAX_VALUE,maxHeight:g=Number.MAX_VALUE,keepAspectRatio:v=!1,shouldResize:x,onResizeStart:w,onResize:M,onResizeEnd:N}){return i?P.createElement(P.Fragment,null,L3.map(T=>P.createElement(Vg,{key:T,className:u,style:f,nodeId:t,position:T,variant:Na.Line,color:s,minWidth:h,minHeight:p,maxWidth:m,maxHeight:g,onResizeStart:w,keepAspectRatio:v,shouldResize:x,onResize:M,onResizeEnd:N})),k3.map(T=>P.createElement(Vg,{key:T,className:a,style:r,nodeId:t,position:T,color:s,minWidth:h,minHeight:p,maxWidth:m,maxHeight:g,onResizeStart:w,keepAspectRatio:v,shouldResize:x,onResize:M,onResizeEnd:N}))):null}const qg=t=>{let i;const a=new Set,r=(m,g)=>{const v=typeof m=="function"?m(i):m;if(!Object.is(v,i)){const x=i;i=g??(typeof v!="object"||v===null)?v:Object.assign({},i,v),a.forEach(w=>w(i,x))}},u=()=>i,h={setState:r,getState:u,getInitialState:()=>p,subscribe:m=>(a.add(m),()=>a.delete(m))},p=i=t(r,u,h);return h},U3=(t=>t?qg(t):qg),B3=t=>t;function Y3(t,i=B3){const a=P.useSyncExternalStore(t.subscribe,P.useCallback(()=>i(t.getState()),[t,i]),P.useCallback(()=>i(t.getInitialState()),[t,i]));return P.useDebugValue(a),a}const Gg=t=>{const i=U3(t),a=r=>Y3(i,r);return Object.assign(a,i),a},V3=(t=>t?Gg(t):Gg);function $v(t){return typeof t>"u"||t===null}function q3(t){return typeof t=="object"&&t!==null}function G3(t){return Array.isArray(t)?t:$v(t)?[]:[t]}function X3(t,i){var a,r,u,f;if(i)for(f=Object.keys(i),a=0,r=f.length;a<r;a+=1)u=f[a],t[u]=i[u];return t}function Z3(t,i){var a="",r;for(r=0;r<i;r+=1)a+=t;return a}function $3(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var Q3=$v,K3=q3,I3=G3,F3=Z3,J3=$3,W3=X3,vt={isNothing:Q3,isObject:K3,toArray:I3,repeat:F3,isNegativeZero:J3,extend:W3};function Qv(t,i){var a="",r=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(a+='in "'+t.mark.name+'" '),a+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!i&&t.mark.snippet&&(a+=`
|
|
10
|
-
|
|
11
|
-
`+t.mark.snippet),r+" "+a):r}function Qo(t,i){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=i,this.message=Qv(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Qo.prototype=Object.create(Error.prototype);Qo.prototype.constructor=Qo;Qo.prototype.toString=function(i){return this.name+": "+Qv(this,i)};var Bt=Qo;function Zf(t,i,a,r,u){var f="",s="",h=Math.floor(u/2)-1;return r-i>h&&(f=" ... ",i=r-h+f.length),a-r>h&&(s=" ...",a=r+h-s.length),{str:f+t.slice(i,a).replace(/\t/g,"→")+s,pos:r-i+f.length}}function $f(t,i){return vt.repeat(" ",i-t.length)+t}function P3(t,i){if(i=Object.create(i||null),!t.buffer)return null;i.maxLength||(i.maxLength=79),typeof i.indent!="number"&&(i.indent=1),typeof i.linesBefore!="number"&&(i.linesBefore=3),typeof i.linesAfter!="number"&&(i.linesAfter=2);for(var a=/\r?\n|\r|\0/g,r=[0],u=[],f,s=-1;f=a.exec(t.buffer);)u.push(f.index),r.push(f.index+f[0].length),t.position<=f.index&&s<0&&(s=r.length-2);s<0&&(s=r.length-1);var h="",p,m,g=Math.min(t.line+i.linesAfter,u.length).toString().length,v=i.maxLength-(i.indent+g+3);for(p=1;p<=i.linesBefore&&!(s-p<0);p++)m=Zf(t.buffer,r[s-p],u[s-p],t.position-(r[s]-r[s-p]),v),h=vt.repeat(" ",i.indent)+$f((t.line-p+1).toString(),g)+" | "+m.str+`
|
|
12
|
-
`+h;for(m=Zf(t.buffer,r[s],u[s],t.position,v),h+=vt.repeat(" ",i.indent)+$f((t.line+1).toString(),g)+" | "+m.str+`
|
|
13
|
-
`,h+=vt.repeat("-",i.indent+g+3+m.pos)+`^
|
|
14
|
-
`,p=1;p<=i.linesAfter&&!(s+p>=u.length);p++)m=Zf(t.buffer,r[s+p],u[s+p],t.position-(r[s]-r[s+p]),v),h+=vt.repeat(" ",i.indent)+$f((t.line+p+1).toString(),g)+" | "+m.str+`
|
|
15
|
-
`;return h.replace(/\n$/,"")}var eN=P3,tN=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],nN=["scalar","sequence","mapping"];function lN(t){var i={};return t!==null&&Object.keys(t).forEach(function(a){t[a].forEach(function(r){i[String(r)]=a})}),i}function iN(t,i){if(i=i||{},Object.keys(i).forEach(function(a){if(tN.indexOf(a)===-1)throw new Bt('Unknown option "'+a+'" is met in definition of "'+t+'" YAML type.')}),this.options=i,this.tag=t,this.kind=i.kind||null,this.resolve=i.resolve||function(){return!0},this.construct=i.construct||function(a){return a},this.instanceOf=i.instanceOf||null,this.predicate=i.predicate||null,this.represent=i.represent||null,this.representName=i.representName||null,this.defaultStyle=i.defaultStyle||null,this.multi=i.multi||!1,this.styleAliases=lN(i.styleAliases||null),nN.indexOf(this.kind)===-1)throw new Bt('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Ct=iN;function Xg(t,i){var a=[];return t[i].forEach(function(r){var u=a.length;a.forEach(function(f,s){f.tag===r.tag&&f.kind===r.kind&&f.multi===r.multi&&(u=s)}),a[u]=r}),a}function aN(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},i,a;function r(u){u.multi?(t.multi[u.kind].push(u),t.multi.fallback.push(u)):t[u.kind][u.tag]=t.fallback[u.tag]=u}for(i=0,a=arguments.length;i<a;i+=1)arguments[i].forEach(r);return t}function fd(t){return this.extend(t)}fd.prototype.extend=function(i){var a=[],r=[];if(i instanceof Ct)r.push(i);else if(Array.isArray(i))r=r.concat(i);else if(i&&(Array.isArray(i.implicit)||Array.isArray(i.explicit)))i.implicit&&(a=a.concat(i.implicit)),i.explicit&&(r=r.concat(i.explicit));else throw new Bt("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");a.forEach(function(f){if(!(f instanceof Ct))throw new Bt("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(f.loadKind&&f.loadKind!=="scalar")throw new Bt("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(f.multi)throw new Bt("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(f){if(!(f instanceof Ct))throw new Bt("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var u=Object.create(fd.prototype);return u.implicit=(this.implicit||[]).concat(a),u.explicit=(this.explicit||[]).concat(r),u.compiledImplicit=Xg(u,"implicit"),u.compiledExplicit=Xg(u,"explicit"),u.compiledTypeMap=aN(u.compiledImplicit,u.compiledExplicit),u};var Kv=fd,Iv=new Ct("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),Fv=new Ct("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),Jv=new Ct("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Wv=new Kv({explicit:[Iv,Fv,Jv]});function oN(t){if(t===null)return!0;var i=t.length;return i===1&&t==="~"||i===4&&(t==="null"||t==="Null"||t==="NULL")}function rN(){return null}function uN(t){return t===null}var Pv=new Ct("tag:yaml.org,2002:null",{kind:"scalar",resolve:oN,construct:rN,predicate:uN,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function cN(t){if(t===null)return!1;var i=t.length;return i===4&&(t==="true"||t==="True"||t==="TRUE")||i===5&&(t==="false"||t==="False"||t==="FALSE")}function sN(t){return t==="true"||t==="True"||t==="TRUE"}function fN(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var ex=new Ct("tag:yaml.org,2002:bool",{kind:"scalar",resolve:cN,construct:sN,predicate:fN,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function dN(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function hN(t){return 48<=t&&t<=55}function pN(t){return 48<=t&&t<=57}function mN(t){if(t===null)return!1;var i=t.length,a=0,r=!1,u;if(!i)return!1;if(u=t[a],(u==="-"||u==="+")&&(u=t[++a]),u==="0"){if(a+1===i)return!0;if(u=t[++a],u==="b"){for(a++;a<i;a++)if(u=t[a],u!=="_"){if(u!=="0"&&u!=="1")return!1;r=!0}return r&&u!=="_"}if(u==="x"){for(a++;a<i;a++)if(u=t[a],u!=="_"){if(!dN(t.charCodeAt(a)))return!1;r=!0}return r&&u!=="_"}if(u==="o"){for(a++;a<i;a++)if(u=t[a],u!=="_"){if(!hN(t.charCodeAt(a)))return!1;r=!0}return r&&u!=="_"}}if(u==="_")return!1;for(;a<i;a++)if(u=t[a],u!=="_"){if(!pN(t.charCodeAt(a)))return!1;r=!0}return!(!r||u==="_")}function gN(t){var i=t,a=1,r;if(i.indexOf("_")!==-1&&(i=i.replace(/_/g,"")),r=i[0],(r==="-"||r==="+")&&(r==="-"&&(a=-1),i=i.slice(1),r=i[0]),i==="0")return 0;if(r==="0"){if(i[1]==="b")return a*parseInt(i.slice(2),2);if(i[1]==="x")return a*parseInt(i.slice(2),16);if(i[1]==="o")return a*parseInt(i.slice(2),8)}return a*parseInt(i,10)}function yN(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!vt.isNegativeZero(t)}var tx=new Ct("tag:yaml.org,2002:int",{kind:"scalar",resolve:mN,construct:gN,predicate:yN,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),vN=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xN(t){return!(t===null||!vN.test(t)||t[t.length-1]==="_")}function bN(t){var i,a;return i=t.replace(/_/g,"").toLowerCase(),a=i[0]==="-"?-1:1,"+-".indexOf(i[0])>=0&&(i=i.slice(1)),i===".inf"?a===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:i===".nan"?NaN:a*parseFloat(i,10)}var SN=/^[-+]?[0-9]+e/;function wN(t,i){var a;if(isNaN(t))switch(i){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(i){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(i){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(vt.isNegativeZero(t))return"-0.0";return a=t.toString(10),SN.test(a)?a.replace("e",".e"):a}function EN(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||vt.isNegativeZero(t))}var nx=new Ct("tag:yaml.org,2002:float",{kind:"scalar",resolve:xN,construct:bN,predicate:EN,represent:wN,defaultStyle:"lowercase"}),lx=Wv.extend({implicit:[Pv,ex,tx,nx]}),ix=lx,ax=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),ox=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function _N(t){return t===null?!1:ax.exec(t)!==null||ox.exec(t)!==null}function AN(t){var i,a,r,u,f,s,h,p=0,m=null,g,v,x;if(i=ax.exec(t),i===null&&(i=ox.exec(t)),i===null)throw new Error("Date resolve error");if(a=+i[1],r=+i[2]-1,u=+i[3],!i[4])return new Date(Date.UTC(a,r,u));if(f=+i[4],s=+i[5],h=+i[6],i[7]){for(p=i[7].slice(0,3);p.length<3;)p+="0";p=+p}return i[9]&&(g=+i[10],v=+(i[11]||0),m=(g*60+v)*6e4,i[9]==="-"&&(m=-m)),x=new Date(Date.UTC(a,r,u,f,s,h,p)),m&&x.setTime(x.getTime()-m),x}function NN(t){return t.toISOString()}var rx=new Ct("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_N,construct:AN,instanceOf:Date,represent:NN});function CN(t){return t==="<<"||t===null}var ux=new Ct("tag:yaml.org,2002:merge",{kind:"scalar",resolve:CN}),Vd=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
16
|
-
\r`;function TN(t){if(t===null)return!1;var i,a,r=0,u=t.length,f=Vd;for(a=0;a<u;a++)if(i=f.indexOf(t.charAt(a)),!(i>64)){if(i<0)return!1;r+=6}return r%8===0}function MN(t){var i,a,r=t.replace(/[\r\n=]/g,""),u=r.length,f=Vd,s=0,h=[];for(i=0;i<u;i++)i%4===0&&i&&(h.push(s>>16&255),h.push(s>>8&255),h.push(s&255)),s=s<<6|f.indexOf(r.charAt(i));return a=u%4*6,a===0?(h.push(s>>16&255),h.push(s>>8&255),h.push(s&255)):a===18?(h.push(s>>10&255),h.push(s>>2&255)):a===12&&h.push(s>>4&255),new Uint8Array(h)}function zN(t){var i="",a=0,r,u,f=t.length,s=Vd;for(r=0;r<f;r++)r%3===0&&r&&(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[a&63]),a=(a<<8)+t[r];return u=f%3,u===0?(i+=s[a>>18&63],i+=s[a>>12&63],i+=s[a>>6&63],i+=s[a&63]):u===2?(i+=s[a>>10&63],i+=s[a>>4&63],i+=s[a<<2&63],i+=s[64]):u===1&&(i+=s[a>>2&63],i+=s[a<<4&63],i+=s[64],i+=s[64]),i}function DN(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var cx=new Ct("tag:yaml.org,2002:binary",{kind:"scalar",resolve:TN,construct:MN,predicate:DN,represent:zN}),ON=Object.prototype.hasOwnProperty,RN=Object.prototype.toString;function jN(t){if(t===null)return!0;var i=[],a,r,u,f,s,h=t;for(a=0,r=h.length;a<r;a+=1){if(u=h[a],s=!1,RN.call(u)!=="[object Object]")return!1;for(f in u)if(ON.call(u,f))if(!s)s=!0;else return!1;if(!s)return!1;if(i.indexOf(f)===-1)i.push(f);else return!1}return!0}function HN(t){return t!==null?t:[]}var sx=new Ct("tag:yaml.org,2002:omap",{kind:"sequence",resolve:jN,construct:HN}),kN=Object.prototype.toString;function LN(t){if(t===null)return!0;var i,a,r,u,f,s=t;for(f=new Array(s.length),i=0,a=s.length;i<a;i+=1){if(r=s[i],kN.call(r)!=="[object Object]"||(u=Object.keys(r),u.length!==1))return!1;f[i]=[u[0],r[u[0]]]}return!0}function UN(t){if(t===null)return[];var i,a,r,u,f,s=t;for(f=new Array(s.length),i=0,a=s.length;i<a;i+=1)r=s[i],u=Object.keys(r),f[i]=[u[0],r[u[0]]];return f}var fx=new Ct("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:LN,construct:UN}),BN=Object.prototype.hasOwnProperty;function YN(t){if(t===null)return!0;var i,a=t;for(i in a)if(BN.call(a,i)&&a[i]!==null)return!1;return!0}function VN(t){return t!==null?t:{}}var dx=new Ct("tag:yaml.org,2002:set",{kind:"mapping",resolve:YN,construct:VN}),qd=ix.extend({implicit:[rx,ux],explicit:[cx,sx,fx,dx]}),ei=Object.prototype.hasOwnProperty,Fu=1,hx=2,px=3,Ju=4,Qf=1,qN=2,Zg=3,GN=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,XN=/[\x85\u2028\u2029]/,ZN=/[,\[\]\{\}]/,mx=/^(?:!|!!|![a-z\-]+!)$/i,gx=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function $g(t){return Object.prototype.toString.call(t)}function Un(t){return t===10||t===13}function Mi(t){return t===9||t===32}function Kt(t){return t===9||t===32||t===10||t===13}function ba(t){return t===44||t===91||t===93||t===123||t===125}function $N(t){var i;return 48<=t&&t<=57?t-48:(i=t|32,97<=i&&i<=102?i-97+10:-1)}function QN(t){return t===120?2:t===117?4:t===85?8:0}function KN(t){return 48<=t&&t<=57?t-48:-1}function Qg(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
17
|
-
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function IN(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}function yx(t,i,a){i==="__proto__"?Object.defineProperty(t,i,{configurable:!0,enumerable:!0,writable:!0,value:a}):t[i]=a}var vx=new Array(256),xx=new Array(256);for(var ya=0;ya<256;ya++)vx[ya]=Qg(ya)?1:0,xx[ya]=Qg(ya);function FN(t,i){this.input=t,this.filename=i.filename||null,this.schema=i.schema||qd,this.onWarning=i.onWarning||null,this.legacy=i.legacy||!1,this.json=i.json||!1,this.listener=i.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function bx(t,i){var a={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return a.snippet=eN(a),new Bt(i,a)}function ve(t,i){throw bx(t,i)}function Wu(t,i){t.onWarning&&t.onWarning.call(null,bx(t,i))}var Kg={YAML:function(i,a,r){var u,f,s;i.version!==null&&ve(i,"duplication of %YAML directive"),r.length!==1&&ve(i,"YAML directive accepts exactly one argument"),u=/^([0-9]+)\.([0-9]+)$/.exec(r[0]),u===null&&ve(i,"ill-formed argument of the YAML directive"),f=parseInt(u[1],10),s=parseInt(u[2],10),f!==1&&ve(i,"unacceptable YAML version of the document"),i.version=r[0],i.checkLineBreaks=s<2,s!==1&&s!==2&&Wu(i,"unsupported YAML version of the document")},TAG:function(i,a,r){var u,f;r.length!==2&&ve(i,"TAG directive accepts exactly two arguments"),u=r[0],f=r[1],mx.test(u)||ve(i,"ill-formed tag handle (first argument) of the TAG directive"),ei.call(i.tagMap,u)&&ve(i,'there is a previously declared suffix for "'+u+'" tag handle'),gx.test(f)||ve(i,"ill-formed tag prefix (second argument) of the TAG directive");try{f=decodeURIComponent(f)}catch{ve(i,"tag prefix is malformed: "+f)}i.tagMap[u]=f}};function Wl(t,i,a,r){var u,f,s,h;if(i<a){if(h=t.input.slice(i,a),r)for(u=0,f=h.length;u<f;u+=1)s=h.charCodeAt(u),s===9||32<=s&&s<=1114111||ve(t,"expected valid JSON character");else GN.test(h)&&ve(t,"the stream contains non-printable characters");t.result+=h}}function Ig(t,i,a,r){var u,f,s,h;for(vt.isObject(a)||ve(t,"cannot merge mappings; the provided source object is unacceptable"),u=Object.keys(a),s=0,h=u.length;s<h;s+=1)f=u[s],ei.call(i,f)||(yx(i,f,a[f]),r[f]=!0)}function Sa(t,i,a,r,u,f,s,h,p){var m,g;if(Array.isArray(u))for(u=Array.prototype.slice.call(u),m=0,g=u.length;m<g;m+=1)Array.isArray(u[m])&&ve(t,"nested arrays are not supported inside keys"),typeof u=="object"&&$g(u[m])==="[object Object]"&&(u[m]="[object Object]");if(typeof u=="object"&&$g(u)==="[object Object]"&&(u="[object Object]"),u=String(u),i===null&&(i={}),r==="tag:yaml.org,2002:merge")if(Array.isArray(f))for(m=0,g=f.length;m<g;m+=1)Ig(t,i,f[m],a);else Ig(t,i,f,a);else!t.json&&!ei.call(a,u)&&ei.call(i,u)&&(t.line=s||t.line,t.lineStart=h||t.lineStart,t.position=p||t.position,ve(t,"duplicated mapping key")),yx(i,u,f),delete a[u];return i}function Gd(t){var i;i=t.input.charCodeAt(t.position),i===10?t.position++:i===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):ve(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function dt(t,i,a){for(var r=0,u=t.input.charCodeAt(t.position);u!==0;){for(;Mi(u);)u===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),u=t.input.charCodeAt(++t.position);if(i&&u===35)do u=t.input.charCodeAt(++t.position);while(u!==10&&u!==13&&u!==0);if(Un(u))for(Gd(t),u=t.input.charCodeAt(t.position),r++,t.lineIndent=0;u===32;)t.lineIndent++,u=t.input.charCodeAt(++t.position);else break}return a!==-1&&r!==0&&t.lineIndent<a&&Wu(t,"deficient indentation"),r}function fc(t){var i=t.position,a;return a=t.input.charCodeAt(i),!!((a===45||a===46)&&a===t.input.charCodeAt(i+1)&&a===t.input.charCodeAt(i+2)&&(i+=3,a=t.input.charCodeAt(i),a===0||Kt(a)))}function Xd(t,i){i===1?t.result+=" ":i>1&&(t.result+=vt.repeat(`
|
|
18
|
-
`,i-1))}function JN(t,i,a){var r,u,f,s,h,p,m,g,v=t.kind,x=t.result,w;if(w=t.input.charCodeAt(t.position),Kt(w)||ba(w)||w===35||w===38||w===42||w===33||w===124||w===62||w===39||w===34||w===37||w===64||w===96||(w===63||w===45)&&(u=t.input.charCodeAt(t.position+1),Kt(u)||a&&ba(u)))return!1;for(t.kind="scalar",t.result="",f=s=t.position,h=!1;w!==0;){if(w===58){if(u=t.input.charCodeAt(t.position+1),Kt(u)||a&&ba(u))break}else if(w===35){if(r=t.input.charCodeAt(t.position-1),Kt(r))break}else{if(t.position===t.lineStart&&fc(t)||a&&ba(w))break;if(Un(w))if(p=t.line,m=t.lineStart,g=t.lineIndent,dt(t,!1,-1),t.lineIndent>=i){h=!0,w=t.input.charCodeAt(t.position);continue}else{t.position=s,t.line=p,t.lineStart=m,t.lineIndent=g;break}}h&&(Wl(t,f,s,!1),Xd(t,t.line-p),f=s=t.position,h=!1),Mi(w)||(s=t.position+1),w=t.input.charCodeAt(++t.position)}return Wl(t,f,s,!1),t.result?!0:(t.kind=v,t.result=x,!1)}function WN(t,i){var a,r,u;if(a=t.input.charCodeAt(t.position),a!==39)return!1;for(t.kind="scalar",t.result="",t.position++,r=u=t.position;(a=t.input.charCodeAt(t.position))!==0;)if(a===39)if(Wl(t,r,t.position,!0),a=t.input.charCodeAt(++t.position),a===39)r=t.position,t.position++,u=t.position;else return!0;else Un(a)?(Wl(t,r,u,!0),Xd(t,dt(t,!1,i)),r=u=t.position):t.position===t.lineStart&&fc(t)?ve(t,"unexpected end of the document within a single quoted scalar"):(t.position++,u=t.position);ve(t,"unexpected end of the stream within a single quoted scalar")}function PN(t,i){var a,r,u,f,s,h;if(h=t.input.charCodeAt(t.position),h!==34)return!1;for(t.kind="scalar",t.result="",t.position++,a=r=t.position;(h=t.input.charCodeAt(t.position))!==0;){if(h===34)return Wl(t,a,t.position,!0),t.position++,!0;if(h===92){if(Wl(t,a,t.position,!0),h=t.input.charCodeAt(++t.position),Un(h))dt(t,!1,i);else if(h<256&&vx[h])t.result+=xx[h],t.position++;else if((s=QN(h))>0){for(u=s,f=0;u>0;u--)h=t.input.charCodeAt(++t.position),(s=$N(h))>=0?f=(f<<4)+s:ve(t,"expected hexadecimal character");t.result+=IN(f),t.position++}else ve(t,"unknown escape sequence");a=r=t.position}else Un(h)?(Wl(t,a,r,!0),Xd(t,dt(t,!1,i)),a=r=t.position):t.position===t.lineStart&&fc(t)?ve(t,"unexpected end of the document within a double quoted scalar"):(t.position++,r=t.position)}ve(t,"unexpected end of the stream within a double quoted scalar")}function eC(t,i){var a=!0,r,u,f,s=t.tag,h,p=t.anchor,m,g,v,x,w,M=Object.create(null),N,T,z,j;if(j=t.input.charCodeAt(t.position),j===91)g=93,w=!1,h=[];else if(j===123)g=125,w=!0,h={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=h),j=t.input.charCodeAt(++t.position);j!==0;){if(dt(t,!0,i),j=t.input.charCodeAt(t.position),j===g)return t.position++,t.tag=s,t.anchor=p,t.kind=w?"mapping":"sequence",t.result=h,!0;a?j===44&&ve(t,"expected the node content, but found ','"):ve(t,"missed comma between flow collection entries"),T=N=z=null,v=x=!1,j===63&&(m=t.input.charCodeAt(t.position+1),Kt(m)&&(v=x=!0,t.position++,dt(t,!0,i))),r=t.line,u=t.lineStart,f=t.position,Ma(t,i,Fu,!1,!0),T=t.tag,N=t.result,dt(t,!0,i),j=t.input.charCodeAt(t.position),(x||t.line===r)&&j===58&&(v=!0,j=t.input.charCodeAt(++t.position),dt(t,!0,i),Ma(t,i,Fu,!1,!0),z=t.result),w?Sa(t,h,M,T,N,z,r,u,f):v?h.push(Sa(t,null,M,T,N,z,r,u,f)):h.push(N),dt(t,!0,i),j=t.input.charCodeAt(t.position),j===44?(a=!0,j=t.input.charCodeAt(++t.position)):a=!1}ve(t,"unexpected end of the stream within a flow collection")}function tC(t,i){var a,r,u=Qf,f=!1,s=!1,h=i,p=0,m=!1,g,v;if(v=t.input.charCodeAt(t.position),v===124)r=!1;else if(v===62)r=!0;else return!1;for(t.kind="scalar",t.result="";v!==0;)if(v=t.input.charCodeAt(++t.position),v===43||v===45)Qf===u?u=v===43?Zg:qN:ve(t,"repeat of a chomping mode identifier");else if((g=KN(v))>=0)g===0?ve(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?ve(t,"repeat of an indentation width identifier"):(h=i+g-1,s=!0);else break;if(Mi(v)){do v=t.input.charCodeAt(++t.position);while(Mi(v));if(v===35)do v=t.input.charCodeAt(++t.position);while(!Un(v)&&v!==0)}for(;v!==0;){for(Gd(t),t.lineIndent=0,v=t.input.charCodeAt(t.position);(!s||t.lineIndent<h)&&v===32;)t.lineIndent++,v=t.input.charCodeAt(++t.position);if(!s&&t.lineIndent>h&&(h=t.lineIndent),Un(v)){p++;continue}if(t.lineIndent<h){u===Zg?t.result+=vt.repeat(`
|
|
19
|
-
`,f?1+p:p):u===Qf&&f&&(t.result+=`
|
|
20
|
-
`);break}for(r?Mi(v)?(m=!0,t.result+=vt.repeat(`
|
|
21
|
-
`,f?1+p:p)):m?(m=!1,t.result+=vt.repeat(`
|
|
22
|
-
`,p+1)):p===0?f&&(t.result+=" "):t.result+=vt.repeat(`
|
|
23
|
-
`,p):t.result+=vt.repeat(`
|
|
24
|
-
`,f?1+p:p),f=!0,s=!0,p=0,a=t.position;!Un(v)&&v!==0;)v=t.input.charCodeAt(++t.position);Wl(t,a,t.position,!1)}return!0}function Fg(t,i){var a,r=t.tag,u=t.anchor,f=[],s,h=!1,p;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),p=t.input.charCodeAt(t.position);p!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ve(t,"tab characters must not be used in indentation")),!(p!==45||(s=t.input.charCodeAt(t.position+1),!Kt(s))));){if(h=!0,t.position++,dt(t,!0,-1)&&t.lineIndent<=i){f.push(null),p=t.input.charCodeAt(t.position);continue}if(a=t.line,Ma(t,i,px,!1,!0),f.push(t.result),dt(t,!0,-1),p=t.input.charCodeAt(t.position),(t.line===a||t.lineIndent>i)&&p!==0)ve(t,"bad indentation of a sequence entry");else if(t.lineIndent<i)break}return h?(t.tag=r,t.anchor=u,t.kind="sequence",t.result=f,!0):!1}function nC(t,i,a){var r,u,f,s,h,p,m=t.tag,g=t.anchor,v={},x=Object.create(null),w=null,M=null,N=null,T=!1,z=!1,j;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=v),j=t.input.charCodeAt(t.position);j!==0;){if(!T&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,ve(t,"tab characters must not be used in indentation")),r=t.input.charCodeAt(t.position+1),f=t.line,(j===63||j===58)&&Kt(r))j===63?(T&&(Sa(t,v,x,w,M,null,s,h,p),w=M=N=null),z=!0,T=!0,u=!0):T?(T=!1,u=!0):ve(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,j=r;else{if(s=t.line,h=t.lineStart,p=t.position,!Ma(t,a,hx,!1,!0))break;if(t.line===f){for(j=t.input.charCodeAt(t.position);Mi(j);)j=t.input.charCodeAt(++t.position);if(j===58)j=t.input.charCodeAt(++t.position),Kt(j)||ve(t,"a whitespace character is expected after the key-value separator within a block mapping"),T&&(Sa(t,v,x,w,M,null,s,h,p),w=M=N=null),z=!0,T=!1,u=!1,w=t.tag,M=t.result;else if(z)ve(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=m,t.anchor=g,!0}else if(z)ve(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=m,t.anchor=g,!0}if((t.line===f||t.lineIndent>i)&&(T&&(s=t.line,h=t.lineStart,p=t.position),Ma(t,i,Ju,!0,u)&&(T?M=t.result:N=t.result),T||(Sa(t,v,x,w,M,N,s,h,p),w=M=N=null),dt(t,!0,-1),j=t.input.charCodeAt(t.position)),(t.line===f||t.lineIndent>i)&&j!==0)ve(t,"bad indentation of a mapping entry");else if(t.lineIndent<i)break}return T&&Sa(t,v,x,w,M,null,s,h,p),z&&(t.tag=m,t.anchor=g,t.kind="mapping",t.result=v),z}function lC(t){var i,a=!1,r=!1,u,f,s;if(s=t.input.charCodeAt(t.position),s!==33)return!1;if(t.tag!==null&&ve(t,"duplication of a tag property"),s=t.input.charCodeAt(++t.position),s===60?(a=!0,s=t.input.charCodeAt(++t.position)):s===33?(r=!0,u="!!",s=t.input.charCodeAt(++t.position)):u="!",i=t.position,a){do s=t.input.charCodeAt(++t.position);while(s!==0&&s!==62);t.position<t.length?(f=t.input.slice(i,t.position),s=t.input.charCodeAt(++t.position)):ve(t,"unexpected end of the stream within a verbatim tag")}else{for(;s!==0&&!Kt(s);)s===33&&(r?ve(t,"tag suffix cannot contain exclamation marks"):(u=t.input.slice(i-1,t.position+1),mx.test(u)||ve(t,"named tag handle cannot contain such characters"),r=!0,i=t.position+1)),s=t.input.charCodeAt(++t.position);f=t.input.slice(i,t.position),ZN.test(f)&&ve(t,"tag suffix cannot contain flow indicator characters")}f&&!gx.test(f)&&ve(t,"tag name cannot contain such characters: "+f);try{f=decodeURIComponent(f)}catch{ve(t,"tag name is malformed: "+f)}return a?t.tag=f:ei.call(t.tagMap,u)?t.tag=t.tagMap[u]+f:u==="!"?t.tag="!"+f:u==="!!"?t.tag="tag:yaml.org,2002:"+f:ve(t,'undeclared tag handle "'+u+'"'),!0}function iC(t){var i,a;if(a=t.input.charCodeAt(t.position),a!==38)return!1;for(t.anchor!==null&&ve(t,"duplication of an anchor property"),a=t.input.charCodeAt(++t.position),i=t.position;a!==0&&!Kt(a)&&!ba(a);)a=t.input.charCodeAt(++t.position);return t.position===i&&ve(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(i,t.position),!0}function aC(t){var i,a,r;if(r=t.input.charCodeAt(t.position),r!==42)return!1;for(r=t.input.charCodeAt(++t.position),i=t.position;r!==0&&!Kt(r)&&!ba(r);)r=t.input.charCodeAt(++t.position);return t.position===i&&ve(t,"name of an alias node must contain at least one character"),a=t.input.slice(i,t.position),ei.call(t.anchorMap,a)||ve(t,'unidentified alias "'+a+'"'),t.result=t.anchorMap[a],dt(t,!0,-1),!0}function Ma(t,i,a,r,u){var f,s,h,p=1,m=!1,g=!1,v,x,w,M,N,T;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,f=s=h=Ju===a||px===a,r&&dt(t,!0,-1)&&(m=!0,t.lineIndent>i?p=1:t.lineIndent===i?p=0:t.lineIndent<i&&(p=-1)),p===1)for(;lC(t)||iC(t);)dt(t,!0,-1)?(m=!0,h=f,t.lineIndent>i?p=1:t.lineIndent===i?p=0:t.lineIndent<i&&(p=-1)):h=!1;if(h&&(h=m||u),(p===1||Ju===a)&&(Fu===a||hx===a?N=i:N=i+1,T=t.position-t.lineStart,p===1?h&&(Fg(t,T)||nC(t,T,N))||eC(t,N)?g=!0:(s&&tC(t,N)||WN(t,N)||PN(t,N)?g=!0:aC(t)?(g=!0,(t.tag!==null||t.anchor!==null)&&ve(t,"alias node should not have any properties")):JN(t,N,Fu===a)&&(g=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):p===0&&(g=h&&Fg(t,T))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&ve(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),v=0,x=t.implicitTypes.length;v<x;v+=1)if(M=t.implicitTypes[v],M.resolve(t.result)){t.result=M.construct(t.result),t.tag=M.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(ei.call(t.typeMap[t.kind||"fallback"],t.tag))M=t.typeMap[t.kind||"fallback"][t.tag];else for(M=null,w=t.typeMap.multi[t.kind||"fallback"],v=0,x=w.length;v<x;v+=1)if(t.tag.slice(0,w[v].tag.length)===w[v].tag){M=w[v];break}M||ve(t,"unknown tag !<"+t.tag+">"),t.result!==null&&M.kind!==t.kind&&ve(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+M.kind+'", not "'+t.kind+'"'),M.resolve(t.result,t.tag)?(t.result=M.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):ve(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||g}function oC(t){var i=t.position,a,r,u,f=!1,s;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(s=t.input.charCodeAt(t.position))!==0&&(dt(t,!0,-1),s=t.input.charCodeAt(t.position),!(t.lineIndent>0||s!==37));){for(f=!0,s=t.input.charCodeAt(++t.position),a=t.position;s!==0&&!Kt(s);)s=t.input.charCodeAt(++t.position);for(r=t.input.slice(a,t.position),u=[],r.length<1&&ve(t,"directive name must not be less than one character in length");s!==0;){for(;Mi(s);)s=t.input.charCodeAt(++t.position);if(s===35){do s=t.input.charCodeAt(++t.position);while(s!==0&&!Un(s));break}if(Un(s))break;for(a=t.position;s!==0&&!Kt(s);)s=t.input.charCodeAt(++t.position);u.push(t.input.slice(a,t.position))}s!==0&&Gd(t),ei.call(Kg,r)?Kg[r](t,r,u):Wu(t,'unknown document directive "'+r+'"')}if(dt(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,dt(t,!0,-1)):f&&ve(t,"directives end mark is expected"),Ma(t,t.lineIndent-1,Ju,!1,!0),dt(t,!0,-1),t.checkLineBreaks&&XN.test(t.input.slice(i,t.position))&&Wu(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&fc(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,dt(t,!0,-1));return}if(t.position<t.length-1)ve(t,"end of the stream or a document separator is expected");else return}function Sx(t,i){t=String(t),i=i||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
25
|
-
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var a=new FN(t,i),r=t.indexOf("\0");for(r!==-1&&(a.position=r,ve(a,"null byte is not allowed in input")),a.input+="\0";a.input.charCodeAt(a.position)===32;)a.lineIndent+=1,a.position+=1;for(;a.position<a.length-1;)oC(a);return a.documents}function rC(t,i,a){i!==null&&typeof i=="object"&&typeof a>"u"&&(a=i,i=null);var r=Sx(t,a);if(typeof i!="function")return r;for(var u=0,f=r.length;u<f;u+=1)i(r[u])}function uC(t,i){var a=Sx(t,i);if(a.length!==0){if(a.length===1)return a[0];throw new Bt("expected a single document in the stream, but found more")}}var cC=rC,sC=uC,wx={loadAll:cC,load:sC},Ex=Object.prototype.toString,_x=Object.prototype.hasOwnProperty,Zd=65279,fC=9,Ko=10,dC=13,hC=32,pC=33,mC=34,dd=35,gC=37,yC=38,vC=39,xC=42,Ax=44,bC=45,Pu=58,SC=61,wC=62,EC=63,_C=64,Nx=91,Cx=93,AC=96,Tx=123,NC=124,Mx=125,jt={};jt[0]="\\0";jt[7]="\\a";jt[8]="\\b";jt[9]="\\t";jt[10]="\\n";jt[11]="\\v";jt[12]="\\f";jt[13]="\\r";jt[27]="\\e";jt[34]='\\"';jt[92]="\\\\";jt[133]="\\N";jt[160]="\\_";jt[8232]="\\L";jt[8233]="\\P";var CC=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],TC=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function MC(t,i){var a,r,u,f,s,h,p;if(i===null)return{};for(a={},r=Object.keys(i),u=0,f=r.length;u<f;u+=1)s=r[u],h=String(i[s]),s.slice(0,2)==="!!"&&(s="tag:yaml.org,2002:"+s.slice(2)),p=t.compiledTypeMap.fallback[s],p&&_x.call(p.styleAliases,h)&&(h=p.styleAliases[h]),a[s]=h;return a}function zC(t){var i,a,r;if(i=t.toString(16).toUpperCase(),t<=255)a="x",r=2;else if(t<=65535)a="u",r=4;else if(t<=4294967295)a="U",r=8;else throw new Bt("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+a+vt.repeat("0",r-i.length)+i}var DC=1,Io=2;function OC(t){this.schema=t.schema||qd,this.indent=Math.max(1,t.indent||2),this.noArrayIndent=t.noArrayIndent||!1,this.skipInvalid=t.skipInvalid||!1,this.flowLevel=vt.isNothing(t.flowLevel)?-1:t.flowLevel,this.styleMap=MC(this.schema,t.styles||null),this.sortKeys=t.sortKeys||!1,this.lineWidth=t.lineWidth||80,this.noRefs=t.noRefs||!1,this.noCompatMode=t.noCompatMode||!1,this.condenseFlow=t.condenseFlow||!1,this.quotingType=t.quotingType==='"'?Io:DC,this.forceQuotes=t.forceQuotes||!1,this.replacer=typeof t.replacer=="function"?t.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function Jg(t,i){for(var a=vt.repeat(" ",i),r=0,u=-1,f="",s,h=t.length;r<h;)u=t.indexOf(`
|
|
26
|
-
`,r),u===-1?(s=t.slice(r),r=h):(s=t.slice(r,u+1),r=u+1),s.length&&s!==`
|
|
27
|
-
`&&(f+=a),f+=s;return f}function hd(t,i){return`
|
|
28
|
-
`+vt.repeat(" ",t.indent*i)}function RC(t,i){var a,r,u;for(a=0,r=t.implicitTypes.length;a<r;a+=1)if(u=t.implicitTypes[a],u.resolve(i))return!0;return!1}function ec(t){return t===hC||t===fC}function Fo(t){return 32<=t&&t<=126||161<=t&&t<=55295&&t!==8232&&t!==8233||57344<=t&&t<=65533&&t!==Zd||65536<=t&&t<=1114111}function Wg(t){return Fo(t)&&t!==Zd&&t!==dC&&t!==Ko}function Pg(t,i,a){var r=Wg(t),u=r&&!ec(t);return(a?r:r&&t!==Ax&&t!==Nx&&t!==Cx&&t!==Tx&&t!==Mx)&&t!==dd&&!(i===Pu&&!u)||Wg(i)&&!ec(i)&&t===dd||i===Pu&&u}function jC(t){return Fo(t)&&t!==Zd&&!ec(t)&&t!==bC&&t!==EC&&t!==Pu&&t!==Ax&&t!==Nx&&t!==Cx&&t!==Tx&&t!==Mx&&t!==dd&&t!==yC&&t!==xC&&t!==pC&&t!==NC&&t!==SC&&t!==wC&&t!==vC&&t!==mC&&t!==gC&&t!==_C&&t!==AC}function HC(t){return!ec(t)&&t!==Pu}function Bo(t,i){var a=t.charCodeAt(i),r;return a>=55296&&a<=56319&&i+1<t.length&&(r=t.charCodeAt(i+1),r>=56320&&r<=57343)?(a-55296)*1024+r-56320+65536:a}function zx(t){var i=/^\n* /;return i.test(t)}var Dx=1,pd=2,Ox=3,Rx=4,va=5;function kC(t,i,a,r,u,f,s,h){var p,m=0,g=null,v=!1,x=!1,w=r!==-1,M=-1,N=jC(Bo(t,0))&&HC(Bo(t,t.length-1));if(i||s)for(p=0;p<t.length;m>=65536?p+=2:p++){if(m=Bo(t,p),!Fo(m))return va;N=N&&Pg(m,g,h),g=m}else{for(p=0;p<t.length;m>=65536?p+=2:p++){if(m=Bo(t,p),m===Ko)v=!0,w&&(x=x||p-M-1>r&&t[M+1]!==" ",M=p);else if(!Fo(m))return va;N=N&&Pg(m,g,h),g=m}x=x||w&&p-M-1>r&&t[M+1]!==" "}return!v&&!x?N&&!s&&!u(t)?Dx:f===Io?va:pd:a>9&&zx(t)?va:s?f===Io?va:pd:x?Rx:Ox}function LC(t,i,a,r,u){t.dump=(function(){if(i.length===0)return t.quotingType===Io?'""':"''";if(!t.noCompatMode&&(CC.indexOf(i)!==-1||TC.test(i)))return t.quotingType===Io?'"'+i+'"':"'"+i+"'";var f=t.indent*Math.max(1,a),s=t.lineWidth===-1?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-f),h=r||t.flowLevel>-1&&a>=t.flowLevel;function p(m){return RC(t,m)}switch(kC(i,h,t.indent,s,p,t.quotingType,t.forceQuotes&&!r,u)){case Dx:return i;case pd:return"'"+i.replace(/'/g,"''")+"'";case Ox:return"|"+ey(i,t.indent)+ty(Jg(i,f));case Rx:return">"+ey(i,t.indent)+ty(Jg(UC(i,s),f));case va:return'"'+BC(i)+'"';default:throw new Bt("impossible error: invalid scalar style")}})()}function ey(t,i){var a=zx(t)?String(i):"",r=t[t.length-1]===`
|
|
29
|
-
`,u=r&&(t[t.length-2]===`
|
|
30
|
-
`||t===`
|
|
31
|
-
`),f=u?"+":r?"":"-";return a+f+`
|
|
32
|
-
`}function ty(t){return t[t.length-1]===`
|
|
33
|
-
`?t.slice(0,-1):t}function UC(t,i){for(var a=/(\n+)([^\n]*)/g,r=(function(){var m=t.indexOf(`
|
|
34
|
-
`);return m=m!==-1?m:t.length,a.lastIndex=m,ny(t.slice(0,m),i)})(),u=t[0]===`
|
|
35
|
-
`||t[0]===" ",f,s;s=a.exec(t);){var h=s[1],p=s[2];f=p[0]===" ",r+=h+(!u&&!f&&p!==""?`
|
|
36
|
-
`:"")+ny(p,i),u=f}return r}function ny(t,i){if(t===""||t[0]===" ")return t;for(var a=/ [^ ]/g,r,u=0,f,s=0,h=0,p="";r=a.exec(t);)h=r.index,h-u>i&&(f=s>u?s:h,p+=`
|
|
37
|
-
`+t.slice(u,f),u=f+1),s=h;return p+=`
|
|
38
|
-
`,t.length-u>i&&s>u?p+=t.slice(u,s)+`
|
|
39
|
-
`+t.slice(s+1):p+=t.slice(u),p.slice(1)}function BC(t){for(var i="",a=0,r,u=0;u<t.length;a>=65536?u+=2:u++)a=Bo(t,u),r=jt[a],!r&&Fo(a)?(i+=t[u],a>=65536&&(i+=t[u+1])):i+=r||zC(a);return i}function YC(t,i,a){var r="",u=t.tag,f,s,h;for(f=0,s=a.length;f<s;f+=1)h=a[f],t.replacer&&(h=t.replacer.call(a,String(f),h)),(pl(t,i,h,!1,!1)||typeof h>"u"&&pl(t,i,null,!1,!1))&&(r!==""&&(r+=","+(t.condenseFlow?"":" ")),r+=t.dump);t.tag=u,t.dump="["+r+"]"}function ly(t,i,a,r){var u="",f=t.tag,s,h,p;for(s=0,h=a.length;s<h;s+=1)p=a[s],t.replacer&&(p=t.replacer.call(a,String(s),p)),(pl(t,i+1,p,!0,!0,!1,!0)||typeof p>"u"&&pl(t,i+1,null,!0,!0,!1,!0))&&((!r||u!=="")&&(u+=hd(t,i)),t.dump&&Ko===t.dump.charCodeAt(0)?u+="-":u+="- ",u+=t.dump);t.tag=f,t.dump=u||"[]"}function VC(t,i,a){var r="",u=t.tag,f=Object.keys(a),s,h,p,m,g;for(s=0,h=f.length;s<h;s+=1)g="",r!==""&&(g+=", "),t.condenseFlow&&(g+='"'),p=f[s],m=a[p],t.replacer&&(m=t.replacer.call(a,p,m)),pl(t,i,p,!1,!1)&&(t.dump.length>1024&&(g+="? "),g+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),pl(t,i,m,!1,!1)&&(g+=t.dump,r+=g));t.tag=u,t.dump="{"+r+"}"}function qC(t,i,a,r){var u="",f=t.tag,s=Object.keys(a),h,p,m,g,v,x;if(t.sortKeys===!0)s.sort();else if(typeof t.sortKeys=="function")s.sort(t.sortKeys);else if(t.sortKeys)throw new Bt("sortKeys must be a boolean or a function");for(h=0,p=s.length;h<p;h+=1)x="",(!r||u!=="")&&(x+=hd(t,i)),m=s[h],g=a[m],t.replacer&&(g=t.replacer.call(a,m,g)),pl(t,i+1,m,!0,!0,!0)&&(v=t.tag!==null&&t.tag!=="?"||t.dump&&t.dump.length>1024,v&&(t.dump&&Ko===t.dump.charCodeAt(0)?x+="?":x+="? "),x+=t.dump,v&&(x+=hd(t,i)),pl(t,i+1,g,!0,v)&&(t.dump&&Ko===t.dump.charCodeAt(0)?x+=":":x+=": ",x+=t.dump,u+=x));t.tag=f,t.dump=u||"{}"}function iy(t,i,a){var r,u,f,s,h,p;for(u=a?t.explicitTypes:t.implicitTypes,f=0,s=u.length;f<s;f+=1)if(h=u[f],(h.instanceOf||h.predicate)&&(!h.instanceOf||typeof i=="object"&&i instanceof h.instanceOf)&&(!h.predicate||h.predicate(i))){if(a?h.multi&&h.representName?t.tag=h.representName(i):t.tag=h.tag:t.tag="?",h.represent){if(p=t.styleMap[h.tag]||h.defaultStyle,Ex.call(h.represent)==="[object Function]")r=h.represent(i,p);else if(_x.call(h.represent,p))r=h.represent[p](i,p);else throw new Bt("!<"+h.tag+'> tag resolver accepts not "'+p+'" style');t.dump=r}return!0}return!1}function pl(t,i,a,r,u,f,s){t.tag=null,t.dump=a,iy(t,a,!1)||iy(t,a,!0);var h=Ex.call(t.dump),p=r,m;r&&(r=t.flowLevel<0||t.flowLevel>i);var g=h==="[object Object]"||h==="[object Array]",v,x;if(g&&(v=t.duplicates.indexOf(a),x=v!==-1),(t.tag!==null&&t.tag!=="?"||x||t.indent!==2&&i>0)&&(u=!1),x&&t.usedDuplicates[v])t.dump="*ref_"+v;else{if(g&&x&&!t.usedDuplicates[v]&&(t.usedDuplicates[v]=!0),h==="[object Object]")r&&Object.keys(t.dump).length!==0?(qC(t,i,t.dump,u),x&&(t.dump="&ref_"+v+t.dump)):(VC(t,i,t.dump),x&&(t.dump="&ref_"+v+" "+t.dump));else if(h==="[object Array]")r&&t.dump.length!==0?(t.noArrayIndent&&!s&&i>0?ly(t,i-1,t.dump,u):ly(t,i,t.dump,u),x&&(t.dump="&ref_"+v+t.dump)):(YC(t,i,t.dump),x&&(t.dump="&ref_"+v+" "+t.dump));else if(h==="[object String]")t.tag!=="?"&&LC(t,t.dump,i,f,p);else{if(h==="[object Undefined]")return!1;if(t.skipInvalid)return!1;throw new Bt("unacceptable kind of an object to dump "+h)}t.tag!==null&&t.tag!=="?"&&(m=encodeURI(t.tag[0]==="!"?t.tag.slice(1):t.tag).replace(/!/g,"%21"),t.tag[0]==="!"?m="!"+m:m.slice(0,18)==="tag:yaml.org,2002:"?m="!!"+m.slice(18):m="!<"+m+">",t.dump=m+" "+t.dump)}return!0}function GC(t,i){var a=[],r=[],u,f;for(md(t,a,r),u=0,f=r.length;u<f;u+=1)i.duplicates.push(a[r[u]]);i.usedDuplicates=new Array(f)}function md(t,i,a){var r,u,f;if(t!==null&&typeof t=="object")if(u=i.indexOf(t),u!==-1)a.indexOf(u)===-1&&a.push(u);else if(i.push(t),Array.isArray(t))for(u=0,f=t.length;u<f;u+=1)md(t[u],i,a);else for(r=Object.keys(t),u=0,f=r.length;u<f;u+=1)md(t[r[u]],i,a)}function XC(t,i){i=i||{};var a=new OC(i);a.noRefs||GC(t,a);var r=t;return a.replacer&&(r=a.replacer.call({"":r},"",r)),pl(a,0,r,!0,!0)?a.dump+`
|
|
40
|
-
`:""}var ZC=XC,$C={dump:ZC};function $d(t,i){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+i+" instead, which is now safe by default.")}}var QC=Ct,KC=Kv,IC=Wv,FC=lx,JC=ix,WC=qd,PC=wx.load,eT=wx.loadAll,tT=$C.dump,nT=Bt,lT={binary:cx,float:nx,map:Jv,null:Pv,pairs:fx,set:dx,timestamp:rx,bool:ex,int:tx,merge:ux,omap:sx,seq:Fv,str:Iv},iT=$d("safeLoad","load"),aT=$d("safeLoadAll","loadAll"),oT=$d("safeDump","dump"),jx={Type:QC,Schema:KC,FAILSAFE_SCHEMA:IC,JSON_SCHEMA:FC,CORE_SCHEMA:JC,DEFAULT_SCHEMA:WC,load:PC,loadAll:eT,dump:tT,YAMLException:nT,types:lT,safeLoad:iT,safeLoadAll:aT,safeDump:oT};function Nn(t){if(!t||typeof t!="object")throw new Error("Invalid YAML: Root must be an object");const i={tables:Array.isArray(t.tables)?t.tables:[],relationships:Array.isArray(t.relationships)?t.relationships:[],domains:Array.isArray(t.domains)?t.domains:[],layout:t.layout||{}};return i.tables=i.tables.map(a=>({...a,id:a.id||"unknown",name:a.name||a.id||"Unnamed Table",appearance:a.appearance||void 0,columns:Array.isArray(a.columns)?a.columns:[]})),i}function rT(t){try{const i=jx.load(t);return Nn(i)}catch(i){throw new Error(`YAML Parsing Error: ${i.message}`)}}const wn=V3((t,i)=>({schema:null,selectedTableId:null,selectedEdgeId:null,hoveredColumnId:null,error:null,isCliMode:typeof window<"u"&&window.MODSCAPE_CLI_MODE===!0,yamlInput:"",setYamlInput:a=>t({yamlInput:a}),syncToYamlInput:()=>{const{schema:a}=i();if(a){const r=jx.dump(a,{indent:2,lineWidth:-1,noRefs:!0});t({yamlInput:r})}},availableFiles:[],currentModelSlug:null,isSidebarOpen:!0,activeTab:"editor",focusNodeId:null,setSchema:a=>{try{const r=Nn(a);t({schema:r,error:null}),i().syncToYamlInput()}catch(r){t({error:r.message})}},setSelectedTableId:a=>t({selectedTableId:a}),setSelectedEdgeId:a=>t({selectedEdgeId:a}),setHoveredColumnId:a=>t({hoveredColumnId:a}),setIsCliMode:a=>t({isCliMode:a}),setIsSidebarOpen:a=>t({isSidebarOpen:a}),setActiveTab:a=>t({activeTab:a}),setFocusNodeId:a=>t({focusNodeId:a}),fetchAvailableFiles:async()=>{const a=window.__MODSCAPE_DATA__;if(a&&a.models){const r=a.models.map(u=>({slug:u.slug,name:u.name,path:""}));t({availableFiles:r});return}try{const u=await(await fetch("/api/files")).json();t({availableFiles:u})}catch(r){console.error("Failed to fetch files:",r)}},setCurrentModel:async a=>{const r=window.__MODSCAPE_DATA__;if(r&&r.models){const u=r.models.find(f=>f.slug===a);if(u){t({currentModelSlug:a,schema:Nn(u.schema),selectedTableId:null,error:null}),i().syncToYamlInput();const f=new URLSearchParams(window.location.search);f.set("model",a);const s=window.location.pathname+"?"+f.toString();window.history.pushState(null,"",s)}return}try{const u=`/api/model?model=${a}`,s=await(await fetch(u)).json();t({currentModelSlug:a,schema:Nn(s),selectedTableId:null,error:null}),i().syncToYamlInput();const h=new URLSearchParams(window.location.search);h.set("model",a);const p=window.location.pathname+"?"+h.toString();window.history.pushState(null,"",p)}catch(u){console.error("Failed to fetch model:",u)}},parseAndSetSchema:a=>{try{const r=rT(a);t({schema:r,error:null})}catch(r){t({error:r.message})}},updateNodePosition:(a,r,u,f)=>{const s=i().schema;if(!s)return;let h=s.domains||[];f!==void 0&&(h=h.map(g=>({...g,tables:g.tables.filter(v=>v!==a)})),f&&(h=h.map(g=>g.id===f?{...g,tables:Array.from(new Set([...g.tables,a]))}:g)));const p=s.layout?.[a]||{x:0,y:0},m={...s.layout||{},[a]:{...p,x:Math.round(r),y:Math.round(u)}};t({schema:{...s,domains:h,layout:m}}),i().syncToYamlInput()},updateNodeDimensions:(a,r,u)=>{const f=i().schema;if(!f)return;const s=f.layout?.[a]||{x:0,y:0},h={...f.layout||{},[a]:{...s,width:Math.round(r),height:Math.round(u)}};t({schema:{...f,layout:h}}),i().syncToYamlInput()},saveLayout:async()=>{const{schema:a,currentModelSlug:r}=i();if(!(!a||!a.layout))try{const u=r?`/api/layout?model=${r}`:"/api/layout";await fetch(u,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a.layout)})}catch(u){console.error("Failed to save layout:",u)}},addTable:(a,r)=>{const u=i().schema||{tables:[],relationships:[],domains:[],layout:{}},f=`new_table_${Date.now()}`,s={id:f,name:"NEW_TABLE",appearance:{type:"fact"},columns:[{id:"id",logical:{name:"ID",type:"Integer",isPrimaryKey:!0}}]},h={...u,tables:[...u.tables||[],s],layout:{...u.layout||{},[f]:{x:Math.round(a),y:Math.round(r)}}};t({schema:Nn(h),error:null}),i().syncToYamlInput()},addDomain:(a,r)=>{const u=i().schema||{tables:[],relationships:[],domains:[],layout:{}},f=`new_domain_${Date.now()}`,s={id:f,name:"NEW_DOMAIN",description:"Domain purpose",tables:[],color:"rgba(59, 130, 246, 0.05)"},h={...u,domains:[...u.domains||[],s],layout:{...u.layout||{},[f]:{x:Math.round(a),y:Math.round(r),width:600,height:400}}};t({schema:Nn(h),error:null}),i().syncToYamlInput()},addRelationship:(a,r,u,f)=>{const s=i().schema;if(!s)return;const h=u&&u.replace(`${a}-`,"").replace("-source","")||void 0,p=f&&f.replace(`${r}-`,"").replace("-target","")||void 0;if((s.relationships||[]).some(x=>x.from.table===a&&x.from.column===h&&x.to.table===r&&x.to.column===p))return;const g={from:{table:a,column:h},to:{table:r,column:p},type:"one-to-many"},v={...s,relationships:[...s.relationships||[],g]};t({schema:Nn(v)}),i().syncToYamlInput()},updateRelationship:(a,r)=>{const{schema:u}=i();if(!u||!u.relationships)return;const f=u.relationships.map((s,h)=>h===a?{...s,...r}:s);t({schema:{...u,relationships:f}}),i().syncToYamlInput()},removeEdge:(a,r)=>{const{schema:u}=i();if(!u)return;const f=(u.relationships||[]).filter(h=>!(h.from.table===a&&h.to.table===r||h.from.table===r&&h.to.table===a)),s={...u,relationships:f};t({schema:Nn(s)}),i().syncToYamlInput()},removeNode:a=>{const{schema:r}=i();if(!r)return;const u=r.tables.filter(m=>m.id!==a),f=(r.domains||[]).filter(m=>m.id!==a).map(m=>({...m,tables:m.tables.filter(g=>g!==a)})),s=(r.relationships||[]).filter(m=>m.from.table!==a&&m.to.table!==a),h={...r.layout||{}};delete h[a];const p={...r,tables:u,domains:f,relationships:s,layout:h};t({schema:Nn(p),selectedTableId:null}),i().syncToYamlInput()},updateTable:(a,r)=>{const{schema:u}=i();if(!u)return;const f=u.tables.map(h=>h.id===a?{...h,...r}:h),s={...u,tables:f};t({schema:Nn(s)}),i().syncToYamlInput()},updateDomain:(a,r)=>{const{schema:u}=i();if(!u||!u.domains)return;const f=u.domains.map(h=>h.id===a?{...h,...r}:h),s={...u,domains:f};t({schema:Nn(s)}),i().syncToYamlInput()},getSelectedTable:()=>{const{schema:a,selectedTableId:r}=i();return!a||!r?null:a.tables.find(u=>u.id===r)||null},getSelectedDomain:()=>{const{schema:a,selectedTableId:r}=i();return!a||!r||!a.domains?null:a.domains.find(u=>u.id===r)||null},getSelectedRelationship:()=>{const{schema:a,selectedEdgeId:r}=i();if(!a||!a.relationships||!r||!r.startsWith("e-"))return null;const u=parseInt(r.split("-")[1]),f=a.relationships[u];return f?{relationship:f,index:u}:null}}));const Hx=(...t)=>t.filter((i,a,r)=>!!i&&i.trim()!==""&&r.indexOf(i)===a).join(" ").trim();const uT=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const cT=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,a,r)=>r?r.toUpperCase():a.toLowerCase());const ay=t=>{const i=cT(t);return i.charAt(0).toUpperCase()+i.slice(1)};var sT={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const fT=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1};const dT=D.forwardRef(({color:t="currentColor",size:i=24,strokeWidth:a=2,absoluteStrokeWidth:r,className:u="",children:f,iconNode:s,...h},p)=>D.createElement("svg",{ref:p,...sT,width:i,height:i,stroke:t,strokeWidth:r?Number(a)*24/Number(i):a,className:Hx("lucide",u),...!f&&!fT(h)&&{"aria-hidden":"true"},...h},[...s.map(([m,g])=>D.createElement(m,g)),...Array.isArray(f)?f:[f]]));const ht=(t,i)=>{const a=D.forwardRef(({className:r,...u},f)=>D.createElement(dT,{ref:f,iconNode:i,className:Hx(`lucide-${uT(ay(t))}`,`lucide-${t}`,r),...u}));return a.displayName=ay(t),a};const hT=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],oy=ht("arrow-up-right",hT);const pT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mT=ht("chevron-down",pT);const gT=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],yT=ht("chevron-left",gT);const vT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],xT=ht("chevron-right",vT);const bT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],ry=ht("circle-alert",bT);const ST=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],gd=ht("database",ST);const wT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ET=ht("grid-3x3",wT);const _T=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],AT=ht("hash",_T);const NT=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],yd=ht("layers",NT);const CT=[["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"M3 10a2 2 0 0 0 2 2h3",key:"1npucw"}],["path",{d:"M3 5v12a2 2 0 0 0 2 2h3",key:"x1gjn2"}]],TT=ht("list-tree",CT);const MT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M9 21V9",key:"1oto5p"}]],zT=ht("panels-top-left",MT);const DT=[["path",{d:"M13 21h8",key:"1jsn5i"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],OT=ht("pen-line",DT);const RT=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],jT=ht("play",RT);const HT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],vd=ht("plus",HT);const kT=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],LT=ht("save",kT);const UT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],BT=ht("search",UT);const YT=[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]],VT=ht("table",YT);const qT=[["path",{d:"M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z",key:"vktsd0"}],["circle",{cx:"7.5",cy:"7.5",r:".5",fill:"currentColor",key:"kqv944"}]],GT=ht("tag",qT);const XT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],uy=ht("trash-2",XT);const ZT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Ai=ht("x",ZT),$T={fact:{color:"#f87171",icon:"📊",label:"FACT"},dimension:{color:"#60a5fa",icon:"🏷️",label:"DIM"},hub:{color:"#fbbf24",icon:"🌐",label:"HUB"},link:{color:"#34d399",icon:"🔗",label:"LINK"},satellite:{color:"#a78bfa",icon:"🛰️",label:"SAT"}},QT=({id:t,data:i,selected:a})=>{const{table:r}=i,{updateNodeDimensions:u,saveLayout:f,hoveredColumnId:s,removeNode:h,selectedTableId:p,setSelectedTableId:m}=wn(),g=a||p===t,v=r.columns&&r.columns.length>0,x=r.appearance?.type?$T[r.appearance.type]:null,w=r.appearance?.color||x?.color||"#334155",M=r.appearance?.icon||x?.icon||"",N=x?.label||"",T=(j,B)=>{u(t,B.width,B.height),f()},z=j=>{j.stopPropagation(),m(t)};return S.jsxs("div",{onClick:z,style:{width:"100%",height:"100%",minWidth:"220px",position:"relative",cursor:"default"},children:[S.jsx(Zv,{color:"#3b82f6",isVisible:g,minWidth:220,minHeight:40,onResizeEnd:T,handleStyle:{width:12,height:12,borderRadius:"50%",backgroundColor:"#3b82f6",border:"2px solid #ffffff",zIndex:100}}),g&&S.jsx("button",{onClick:j=>{j.preventDefault(),j.stopPropagation(),h(t)},style:{position:"absolute",top:"-15px",right:"-15px",width:"28px",height:"28px",backgroundColor:"#ef4444",color:"white",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #ffffff",cursor:"pointer",zIndex:1001,boxShadow:"0 4px 6px rgba(0,0,0,0.3)",transition:"transform 0.1s ease"},onMouseDown:j=>j.stopPropagation(),title:"Delete Table",children:S.jsx(Ai,{size:16})}),S.jsx(Il,{type:"target",position:ye.Top,id:`${t}-target`,style:{background:"#94a3b8",width:"8px",height:"8px",zIndex:10}}),S.jsxs("div",{style:{width:"100%",height:"100%",backgroundColor:"#1e293b",borderLeft:`2px solid ${g?"#3b82f6":"#334155"}`,borderRight:`2px solid ${g?"#3b82f6":"#334155"}`,borderBottom:`2px solid ${g?"#3b82f6":"#334155"}`,borderTop:`4px solid ${w}`,borderRadius:"8px",overflow:"hidden",color:"#f1f5f9",boxShadow:g?"0 0 0 4px rgba(59, 130, 246, 0.2)":"0 4px 6px -1px rgba(0, 0, 0, 0.1)",fontFamily:"sans-serif",display:"flex",flexDirection:"column"},children:[S.jsxs("div",{className:"table-drag-handle",style:{padding:"12px",backgroundColor:"rgba(15, 23, 42, 0.8)",borderBottom:v?"1px solid #334155":"none",flexShrink:0,cursor:"grab"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px",minWidth:0},children:[M&&S.jsx("span",{style:{fontSize:"14px",flexShrink:0},children:M}),S.jsx("div",{style:{fontSize:"14px",fontWeight:"bold",color:"#ffffff",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.name})]}),N&&S.jsx("div",{style:{fontSize:"9px",fontWeight:800,padding:"2px 6px",borderRadius:"4px",backgroundColor:`${w}20`,color:w,border:`1px solid ${w}40`,flexShrink:0,marginLeft:"8px"},children:N})]}),S.jsx("div",{style:{fontSize:"10px",color:"#94a3b8",textTransform:"uppercase",marginTop:"2px",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:r.id})]}),v&&S.jsx("div",{className:"nodrag",style:{padding:"0",overflowY:"auto",flex:1,cursor:"default"},children:S.jsx("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"11px"},children:S.jsx("tbody",{children:r.columns.map(j=>S.jsxs("tr",{className:"column-row",style:{borderBottom:"1px solid #334155",backgroundColor:s===j.id?"rgba(30, 58, 138, 0.6)":"transparent",position:"relative"},children:[S.jsxs("td",{style:{padding:"6px 12px",fontWeight:500,color:"#e2e8f0",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"350px",position:"relative"},children:[S.jsx(Il,{type:"target",position:ye.Left,id:`${t}-${j.id}-target`,className:"column-handle",style:{left:"-4px",opacity:0}}),S.jsxs("div",{style:{display:"flex",alignItems:"center"},children:[j.logical?.isPrimaryKey&&S.jsx("span",{style:{color:"#eab308",marginRight:"4px"},children:"🔑"}),j.logical?.isForeignKey&&S.jsx("span",{style:{marginRight:"4px"},children:"🔩"}),j.logical?.isPartitionKey&&S.jsx("span",{style:{marginRight:"4px"},children:"📂"}),S.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis"},children:j.logical?.name||j.id})]})]}),S.jsxs("td",{style:{padding:"6px 12px",textAlign:"right",fontStyle:"italic",color:"#94a3b8",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",maxWidth:"150px",position:"relative"},children:[j.logical?.type||"Unknown",S.jsx(Il,{type:"source",position:ye.Right,id:`${t}-${j.id}-source`,className:"column-handle",style:{right:"-4px",opacity:0}})]})]},j.id))})})})]}),S.jsx(Il,{type:"source",position:ye.Bottom,id:`${t}-source`,style:{background:"#94a3b8",width:"8px",height:"8px",zIndex:10}})]})},KT=D.memo(QT),IT=({id:t,data:i,selected:a})=>{const{updateNodeDimensions:r,saveLayout:u,removeNode:f,selectedTableId:s,setSelectedTableId:h}=wn(),p=a||s===t,m=i.color||"#1e293b",v=m.startsWith("rgba")||m.startsWith("hsla")||m.startsWith("#")&&m.length>7?1:.5,x=(M,N)=>{r(t,N.width,N.height),u()},w=M=>{M.stopPropagation(),h(t)};return S.jsxs("div",{onClick:w,style:{width:"100%",height:"100%",border:`2px dashed ${p?"#3b82f6":"#334155"}`,borderRadius:"12px",padding:"10px",position:"relative",color:"#94a3b8",pointerEvents:"all",cursor:"default"},children:[S.jsx(Zv,{color:"#3b82f6",isVisible:p,minWidth:200,minHeight:150,onResizeEnd:x,handleStyle:{width:14,height:14,borderRadius:"50%",backgroundColor:"#3b82f6",border:"2px solid #ffffff",zIndex:100}}),p&&S.jsx("button",{onClick:M=>{M.preventDefault(),M.stopPropagation(),f(t)},style:{position:"absolute",top:"-15px",right:"-15px",width:"28px",height:"28px",backgroundColor:"#ef4444",color:"white",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"2px solid #ffffff",cursor:"pointer",zIndex:1001,boxShadow:"0 4px 6px rgba(0,0,0,0.3)"},onMouseDown:M=>M.stopPropagation(),title:"Delete Domain",children:S.jsx(Ai,{size:16})}),S.jsx("div",{className:"nodrag",style:{position:"absolute",inset:0,backgroundColor:m,opacity:v,borderRadius:"10px",zIndex:-1,cursor:"default"}}),S.jsx("div",{className:"domain-drag-handle",style:{position:"absolute",top:"-25px",left:"0",fontSize:"14px",fontWeight:"bold",color:"#f1f5f9",whiteSpace:"nowrap",pointerEvents:"all",cursor:"grab",padding:"2px 8px",backgroundColor:"rgba(30, 41, 59, 0.8)",borderRadius:"4px 4px 0 0"},children:i.label})]})},FT=D.memo(IT),JT={fact:{color:"#f87171",icon:"📊",label:"FACT"},dimension:{color:"#60a5fa",icon:"🏷️",label:"DIM"},hub:{color:"#fbbf24",icon:"🌐",label:"HUB"},link:{color:"#34d399",icon:"🔗",label:"LINK"},satellite:{color:"#a78bfa",icon:"🛰️",label:"SAT"}},WT=()=>{const{selectedTableId:t,selectedEdgeId:i,getSelectedTable:a,getSelectedDomain:r,getSelectedRelationship:u,setSelectedTableId:f,setSelectedEdgeId:s,updateTable:h,updateDomain:p,updateRelationship:m}=wn(),g=a(),v=r(),x=u(),[w,M]=D.useState("conceptual"),[N,T]=D.useState("");if(!t&&!i||!g&&!v&&!x)return null;if(x){const{relationship:E,index:O}=x;return S.jsxs("div",{className:"bg-slate-900 border-t border-slate-800 shadow-2xl z-50 flex flex-col text-slate-100",style:{height:"35vh",maxHeight:"400px",minHeight:"200px",backgroundColor:"#0f172a",borderTop:"2px solid #3b82f6",display:"flex",flexDirection:"column",color:"#f1f5f9",boxShadow:"0 -10px 25px -5px rgba(0, 0, 0, 0.4)",fontFamily:"sans-serif"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#020617"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[S.jsx(gd,{size:18,style:{color:"#3b82f6"}}),S.jsxs("div",{style:{flex:1},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[S.jsx("span",{style:{fontSize:"14px",fontWeight:"bold"},children:"Relationship"}),S.jsx("span",{style:{fontSize:"9px",fontWeight:800,padding:"1px 5px",borderRadius:"3px",backgroundColor:"rgba(59, 130, 246, 0.1)",color:"#60a5fa",border:"1px solid rgba(59, 130, 246, 0.2)",textTransform:"uppercase"},children:"EDGE"})]}),S.jsxs("p",{style:{fontSize:"11px",color:"#94a3b8",textTransform:"uppercase",margin:0},children:[E.from.table,E.from.column?`.${E.from.column}`:""," → ",E.to.table,E.to.column?`.${E.to.column}`:""]})]})]}),S.jsx("button",{onClick:()=>s(null),style:{padding:"6px",backgroundColor:"transparent",border:"none",color:"#94a3b8",cursor:"pointer"},children:S.jsx(Ai,{size:18})})]}),S.jsx("div",{style:{flex:1,overflowY:"auto",padding:"20px"},children:S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"24px"},children:[S.jsxs("div",{className:"grid grid-cols-2 gap-8",children:[S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Relationship Type"}),S.jsxs("select",{value:E.type||"one-to-many",onChange:_=>m(O,{type:_.target.value}),className:"w-full bg-slate-800 border border-slate-700 text-slate-200 text-sm p-2.5 rounded focus:ring-1 focus:ring-blue-500 outline-none",children:[S.jsx("option",{value:"one-to-one",children:"One-to-One"}),S.jsx("option",{value:"one-to-many",children:"One-to-Many"}),S.jsx("option",{value:"many-to-many",children:"Many-to-Many"})]})]}),S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Cardinality (Metadata)"}),S.jsxs("div",{style:{color:"#94a3b8",fontSize:"12px"},children:["Mapping established from ",S.jsx("strong",{children:E.from.table})," to ",S.jsx("strong",{children:E.to.table}),"."]})]})]}),S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Source/Target Details"}),S.jsxs("div",{className:"flex gap-4 items-center bg-slate-800/50 p-3 rounded border border-slate-800",children:[S.jsxs("div",{className:"flex-1",children:[S.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"From Table"}),S.jsx("div",{className:"text-sm font-bold text-blue-400",children:E.from.table}),S.jsxs("div",{className:"text-[10px] text-slate-500",children:["Column: ",E.from.column||"(Table level)"]})]}),S.jsx("div",{className:"text-slate-600",children:"→"}),S.jsxs("div",{className:"flex-1",children:[S.jsx("div",{className:"text-[10px] text-slate-500 uppercase",children:"To Table"}),S.jsx("div",{className:"text-sm font-bold text-blue-400",children:E.to.table}),S.jsxs("div",{className:"text-[10px] text-slate-500",children:["Column: ",E.to.column||"(Table level)"]})]})]})]})]})})]})}if(v)return S.jsxs("div",{className:"bg-slate-900 border-t border-slate-800 shadow-2xl z-50 flex flex-col text-slate-100",style:{height:"35vh",maxHeight:"400px",minHeight:"200px",backgroundColor:"#0f172a",borderTop:`2px solid ${v.color||"#3b82f6"}`,display:"flex",flexDirection:"column",color:"#f1f5f9",boxShadow:"0 -10px 25px -5px rgba(0, 0, 0, 0.4)",fontFamily:"sans-serif"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#020617"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[S.jsx(yd,{size:18,style:{color:v.color||"#3b82f6"}}),S.jsxs("div",{style:{flex:1},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[S.jsx("input",{value:v.name,onChange:E=>p(v.id,{name:E.target.value}),style:{fontSize:"16px",fontWeight:"bold",color:"#ffffff",backgroundColor:"transparent",border:"none",borderBottom:"1px solid transparent",padding:"2px 0",outline:"none",width:"fit-content",minWidth:"200px"},onFocus:E=>E.target.style.borderBottom="1px solid #3b82f6",onBlur:E=>E.target.style.borderBottom="1px solid transparent"}),S.jsx("span",{style:{fontSize:"9px",fontWeight:800,padding:"1px 5px",borderRadius:"3px",backgroundColor:"rgba(59, 130, 246, 0.1)",color:"#60a5fa",border:"1px solid rgba(59, 130, 246, 0.2)",textTransform:"uppercase"},children:"DOMAIN"})]}),S.jsx("p",{style:{fontSize:"11px",color:"#94a3b8",textTransform:"uppercase",margin:0},children:v.id})]})]}),S.jsx("button",{onClick:()=>f(null),style:{padding:"6px",backgroundColor:"transparent",border:"none",color:"#94a3b8",cursor:"pointer"},children:S.jsx(Ai,{size:18})})]}),S.jsx("div",{style:{flex:1,overflowY:"auto",padding:"20px"},children:S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Domain Description"}),S.jsx("textarea",{value:v.description||"",onChange:E=>p(v.id,{description:E.target.value}),placeholder:"What is the purpose of this domain?",style:{width:"100%",minHeight:"80px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"6px",padding:"12px",color:"#e2e8f0",fontSize:"13px",lineHeight:"1.6",resize:"none",outline:"none"}})]}),S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Domain Theme Color"}),S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px"},children:[S.jsx("input",{type:"color",value:v.color?.startsWith("rgba")?"#3b82f6":v.color||"#3b82f6",onChange:E=>p(v.id,{color:E.target.value}),style:{width:"40px",height:"40px",padding:0,border:"none",borderRadius:"4px",cursor:"pointer",backgroundColor:"transparent"}}),S.jsx("input",{value:v.color||"",onChange:E=>p(v.id,{color:E.target.value}),placeholder:"e.g. #3b82f6 or rgba(...)",className:"bg-slate-800 border border-slate-700 text-slate-300 font-mono text-sm p-2 rounded focus:ring-1 focus:ring-blue-500 outline-none flex-1"})]})]})]})})]});const z=[{id:"conceptual",label:"Conceptual",icon:S.jsx(GT,{size:14})},{id:"logical",label:"Logical",icon:S.jsx(yd,{size:14})},{id:"physical",label:"Physical",icon:S.jsx(gd,{size:14})},{id:"sample",label:"Sample Data",icon:S.jsx(VT,{size:14})}],j=g.appearance?.type?JT[g.appearance.type]:null,B=g.appearance?.color||j?.color||"#334155",k=g.appearance?.icon||j?.icon||"",K=j?.label||"",I=E=>{h(g.id,E)},ee=()=>{const E={id:`col_${Date.now()}`,logical:{name:"New Column",type:"String",description:""},physical:{name:"",type:"VARCHAR(255)",constraints:[]}};I({columns:[...g.columns||[],E]})},V=E=>{const O=g.columns?.filter(_=>_.id!==E)||[];I({columns:O})},X=(E,O)=>{const _=g.columns?.map(H=>H.id===E?{...H,logical:{name:H.logical?.name||H.id,type:H.logical?.type||"String",...H.logical,...O}}:H)||[];I({columns:_})},le=(E,O)=>{const _=g.columns?.map(H=>H.id===E?{...H,physical:{...H.physical,...O}}:H)||[];I({columns:_})},oe=E=>{if(E.key==="Enter"&&N.trim()){const O=g.conceptual?.tags||[];O.includes(N.trim())||I({conceptual:{...g.conceptual,tags:[...O,N.trim()]}}),T("")}},re=E=>{const O=g.conceptual?.tags||[];I({conceptual:{...g.conceptual,tags:O.filter(_=>_!==E)}})},ae=E=>{const O=g.sampleData||{columns:[],rows:[]};I({sampleData:{...O,...E}})},C=()=>{const E=g.sampleData||{columns:[],rows:[]},O=new Array(E.columns.length).fill("");ae({rows:[...E.rows,O]})},$=E=>{const _=(g.sampleData||{rows:[]}).rows.filter((H,Q)=>Q!==E);ae({rows:_})},A=(E,O,_)=>{const Q=[...(g.sampleData||{rows:[]}).rows];Q[E]=[...Q[E]],Q[E][O]=_,ae({rows:Q})},U=E=>{const O=g.sampleData||{columns:[],rows:[]};if(O.columns.includes(E))return;const _=[...O.columns,E],H=O.rows.map(Q=>[...Q,""]);ae({columns:_,rows:H})},q=E=>{const O=g.sampleData||{columns:[],rows:[]},_=O.columns.indexOf(E);if(_===-1)return;const H=O.columns.filter(W=>W!==E),Q=O.rows.map(W=>W.filter((ue,ce)=>ce!==_));ae({columns:H,rows:Q})};return S.jsxs("div",{className:"bg-slate-900 border-t border-slate-800 shadow-2xl z-50 flex flex-col text-slate-100",style:{height:"45vh",maxHeight:"600px",minHeight:"300px",backgroundColor:"#0f172a",borderTop:`2px solid ${B}`,display:"flex",flexDirection:"column",color:"#f1f5f9",boxShadow:"0 -10px 25px -5px rgba(0, 0, 0, 0.4)",fontFamily:"sans-serif"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#020617"},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"12px",flex:1},children:[k&&S.jsx("span",{style:{fontSize:"18px"},children:k}),S.jsxs("div",{style:{flex:1},children:[S.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[S.jsx("input",{value:g.name,onChange:E=>I({name:E.target.value}),title:"Logical Table Name",style:{fontSize:"16px",fontWeight:"bold",color:"#ffffff",backgroundColor:"transparent",border:"none",borderBottom:"1px solid transparent",padding:"2px 0",outline:"none",width:"fit-content",minWidth:"200px"},onFocus:E=>E.target.style.borderBottom="1px solid #3b82f6",onBlur:E=>E.target.style.borderBottom="1px solid transparent"}),K&&S.jsx("span",{style:{fontSize:"9px",fontWeight:800,padding:"1px 5px",borderRadius:"3px",backgroundColor:`${B}20`,color:B,border:`1px solid ${B}40`,textTransform:"uppercase"},children:K})]}),S.jsx("p",{style:{fontSize:"11px",color:"#94a3b8",textTransform:"uppercase",margin:0},children:g.id})]})]}),S.jsx("button",{onClick:E=>{E.stopPropagation(),f(null)},style:{padding:"6px",backgroundColor:"transparent",border:"none",color:"#94a3b8",cursor:"pointer",borderRadius:"50%"},children:S.jsx(Ai,{size:18})})]}),S.jsx("div",{style:{display:"flex",gap:"24px",padding:"0 20px",borderBottom:"1px solid #1e293b",backgroundColor:"#0f172a"},children:z.map(E=>S.jsxs("button",{onClick:()=>M(E.id),style:{padding:"12px 0",backgroundColor:"transparent",border:"none",borderBottom:w===E.id?"2px solid #3b82f6":"2px solid transparent",color:w===E.id?"#60a5fa":"#94a3b8",fontSize:"13px",fontWeight:500,cursor:"pointer",display:"flex",alignItems:"center",gap:"6px",transition:"all 0.2s"},children:[E.icon," ",E.label]},E.id))}),S.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"15px 20px"},children:[w==="conceptual"&&S.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"20px"},children:[S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Description"}),S.jsx("textarea",{value:g.conceptual?.description||"",onChange:E=>I({conceptual:{...g.conceptual,description:E.target.value}}),placeholder:"Enter business description...",style:{width:"100%",minHeight:"100px",backgroundColor:"#1e293b",border:"1px solid #334155",borderRadius:"6px",padding:"12px",color:"#e2e8f0",fontSize:"13px",lineHeight:"1.6",resize:"none",outline:"none"}})]}),S.jsxs("section",{children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",marginBottom:"8px",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Tags"}),S.jsxs("div",{style:{display:"flex",flexWrap:"wrap",gap:"8px",alignItems:"center"},children:[g.conceptual?.tags?.map(E=>S.jsxs("span",{className:"flex items-center gap-2 px-3 py-1 bg-blue-500/10 text-blue-400 border border-blue-500/20 rounded-full text-xs",children:[E,S.jsx("button",{onClick:()=>re(E),className:"hover:text-red-400",children:S.jsx(Ai,{size:12})})]},E)),S.jsx("div",{style:{position:"relative"},children:S.jsx("input",{type:"text",value:N,onChange:E=>T(E.target.value),onKeyDown:oe,placeholder:"+ New Tag",style:{backgroundColor:"transparent",border:"1px dashed #334155",borderRadius:"16px",padding:"4px 12px",fontSize:"11px",color:"#e2e8f0",outline:"none",width:"100px"}})})]})]})]}),w==="logical"&&S.jsxs("div",{children:[S.jsxs("div",{className:"flex justify-between items-center mb-4",children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Logical Model"}),S.jsxs("button",{onClick:ee,className:"flex items-center gap-2 px-3 py-1.5 bg-blue-600 hover:bg-blue-700 text-white rounded text-xs transition-colors",children:[S.jsx(vd,{size:14})," Add Column"]})]}),S.jsx("div",{style:{border:"1px solid #1e293b",borderRadius:"8px",overflow:"hidden"},children:S.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"12px"},children:[S.jsx("thead",{style:{backgroundColor:"#020617",borderBottom:"1px solid #1e293b",textAlign:"left"},children:S.jsxs("tr",{children:[S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"30%"},children:"Logical Name"}),S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"20%"},children:"Type"}),S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"40%"},children:"Description"}),S.jsx("th",{style:{padding:"10px 16px",width:"50px"}})]})}),S.jsx("tbody",{children:(g.columns||[]).map(E=>S.jsxs("tr",{style:{borderBottom:"1px solid #1e293b",backgroundColor:"#0f172a"},children:[S.jsx("td",{style:{padding:"6px 16px"},children:S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("button",{onClick:()=>X(E.id,{isPrimaryKey:!E.logical?.isPrimaryKey}),className:`transition-opacity ${E.logical?.isPrimaryKey?"opacity-100":"opacity-20 hover:opacity-50"}`,children:"🔑"}),S.jsx("input",{value:E.logical?.name||E.id,onChange:O=>X(E.id,{name:O.target.value}),className:"bg-transparent border-none text-slate-100 w-full outline-none p-1 focus:bg-slate-800 rounded"})]})}),S.jsx("td",{style:{padding:"6px 16px"},children:S.jsx("input",{value:E.logical?.type||"",onChange:O=>X(E.id,{type:O.target.value}),placeholder:"Type...",className:"bg-transparent border-none text-slate-400 font-mono text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),S.jsx("td",{style:{padding:"6px 16px"},children:S.jsx("input",{value:E.logical?.description||"",onChange:O=>X(E.id,{description:O.target.value}),placeholder:"Description...",className:"bg-transparent border-none text-slate-500 text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),S.jsx("td",{style:{padding:"6px 16px",textAlign:"right"},children:S.jsx("button",{onClick:()=>V(E.id),className:"text-red-500/50 hover:text-red-500 p-1 transition-colors",children:S.jsx(uy,{size:14})})})]},E.id))})]})})]}),w==="physical"&&S.jsx("div",{children:S.jsxs("div",{className:"flex flex-col gap-4",children:[S.jsx("div",{className:"flex justify-between items-center",children:S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Physical Mappings"})}),S.jsx("div",{style:{border:"1px solid #1e293b",borderRadius:"8px",overflow:"hidden"},children:S.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",fontSize:"12px"},children:[S.jsx("thead",{style:{backgroundColor:"#020617",borderBottom:"1px solid #1e293b",textAlign:"left"},children:S.jsxs("tr",{children:[S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"25%"},children:"Logical Column"}),S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"30%"},children:"DB Column Name"}),S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"20%"},children:"DB Type"}),S.jsx("th",{style:{padding:"10px 16px",color:"#64748b",width:"25%"},children:"Constraints"})]})}),S.jsx("tbody",{children:(g.columns||[]).map(E=>S.jsxs("tr",{style:{borderBottom:"1px solid #1e293b",backgroundColor:"#0f172a"},children:[S.jsx("td",{style:{padding:"6px 16px",color:"#94a3b8",borderRight:"1px solid #1e293b"},children:S.jsx("div",{className:"text-[11px] font-medium truncate",title:E.logical?.name||E.id,children:E.logical?.name||E.id})}),S.jsx("td",{style:{padding:"6px 16px"},children:S.jsx("input",{value:E.physical?.name||"",onChange:O=>le(E.id,{name:O.target.value}),placeholder:E.logical?.name.toLowerCase().replace(/ /g,"_"),className:"bg-transparent border-none text-blue-400 font-mono text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),S.jsx("td",{style:{padding:"6px 16px"},children:S.jsx("input",{value:E.physical?.type||"",onChange:O=>le(E.id,{type:O.target.value}),placeholder:E.logical?.type.toUpperCase(),className:"bg-transparent border-none text-slate-400 font-mono text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})}),S.jsx("td",{style:{padding:"6px 16px"},children:S.jsx("input",{value:E.physical?.constraints?.join(", ")||"",onChange:O=>le(E.id,{constraints:O.target.value.split(",").map(_=>_.trim()).filter(Boolean)}),placeholder:"e.g. NOT NULL",className:"bg-transparent border-none text-slate-500 text-[11px] w-full outline-none p-1 focus:bg-slate-800 rounded"})})]},E.id))})]})})]})}),w==="sample"&&S.jsxs("div",{className:"flex flex-col h-full",children:[S.jsxs("div",{className:"flex justify-between items-center mb-4",children:[S.jsx("h3",{style:{fontSize:"11px",fontWeight:700,color:"#475569",textTransform:"uppercase",letterSpacing:"0.1em"},children:"Sample Data Editor"}),S.jsxs("div",{className:"flex gap-2",children:[S.jsxs("select",{className:"bg-slate-800 border border-slate-700 text-xs rounded px-2 outline-none focus:ring-1 focus:ring-blue-500",onChange:E=>{E.target.value&&U(E.target.value),E.target.value=""},value:"",children:[S.jsx("option",{value:"",children:"+ Add Column"}),(g.columns||[]).filter(E=>!g.sampleData?.columns.includes(E.id)).map(E=>S.jsx("option",{value:E.id,children:E.logical?.name||E.id},E.id))]}),S.jsxs("button",{onClick:C,className:"flex items-center gap-2 px-3 py-1 bg-emerald-600 hover:bg-emerald-700 text-white rounded text-xs transition-colors",children:[S.jsx(vd,{size:14})," Add Row"]})]})]}),!g.sampleData||g.sampleData.columns.length===0?S.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-8 bg-slate-900/50 rounded-lg border border-dashed border-slate-700",children:[S.jsx("p",{className:"text-sm text-slate-500 italic mb-4",children:"No sample data structure defined."}),S.jsx("button",{onClick:()=>I({sampleData:{columns:(g.columns||[]).slice(0,3).map(E=>E.id),rows:[["Sample 1","Sample 2","Sample 3"]]}}),className:"text-blue-500 hover:underline text-xs",children:"Auto-generate from first 3 columns"})]}):S.jsx("div",{className:"flex-1 overflow-auto border border-slate-800 rounded-lg",children:S.jsxs("table",{className:"w-full border-collapse text-xs",children:[S.jsx("thead",{className:"sticky top-0 bg-slate-950 z-10 border-bottom border-slate-800",children:S.jsxs("tr",{children:[g.sampleData.columns.map(E=>{const O=g.columns?.find(_=>_.id===E);return S.jsx("th",{className:"p-3 text-left border-r border-slate-800 min-w-[140px]",children:S.jsxs("div",{className:"flex justify-between items-start",children:[S.jsxs("div",{className:"flex flex-col gap-0.5",children:[S.jsx("span",{className:"font-bold text-slate-200",children:O?.logical?.name||E}),S.jsx("span",{className:"text-[10px] text-blue-400 font-mono italic",children:O?.physical?.name||O?.logical?.name?.toLowerCase().replace(/ /g,"_")||E})]}),S.jsx("button",{onClick:()=>q(E),className:"text-slate-600 hover:text-red-400 p-0.5",children:S.jsx(Ai,{size:10})})]})},E)}),S.jsx("th",{className:"w-10 bg-slate-950"})]})}),S.jsx("tbody",{children:g.sampleData.rows.map((E,O)=>S.jsxs("tr",{className:"border-b border-slate-800 hover:bg-slate-800/30",children:[E.map((_,H)=>S.jsx("td",{className:"p-0 border-r border-slate-800",children:S.jsx("input",{value:String(_),onChange:Q=>A(O,H,Q.target.value),className:"w-full bg-transparent border-none p-3 outline-none focus:bg-slate-800 text-slate-300 font-mono"})},H)),S.jsx("td",{className:"p-2 text-center",children:S.jsx("button",{onClick:()=>$(O),className:"text-slate-600 hover:text-red-400",children:S.jsx(uy,{size:12})})})]},O))})]})})]})]})]})};function fl(t,i,{checkForDefaultPrevented:a=!0}={}){return function(u){if(t?.(u),a===!1||!u.defaultPrevented)return i?.(u)}}function Qd(t,i=[]){let a=[];function r(f,s){const h=D.createContext(s),p=a.length;a=[...a,s];const m=v=>{const{scope:x,children:w,...M}=v,N=x?.[t]?.[p]||h,T=D.useMemo(()=>M,Object.values(M));return S.jsx(N.Provider,{value:T,children:w})};m.displayName=f+"Provider";function g(v,x){const w=x?.[t]?.[p]||h,M=D.useContext(w);if(M)return M;if(s!==void 0)return s;throw new Error(`\`${v}\` must be used within \`${f}\``)}return[m,g]}const u=()=>{const f=a.map(s=>D.createContext(s));return function(h){const p=h?.[t]||f;return D.useMemo(()=>({[`__scope${t}`]:{...h,[t]:p}}),[h,p])}};return u.scopeName=t,[r,PT(u,...i)]}function PT(...t){const i=t[0];if(t.length===1)return i;const a=()=>{const r=t.map(u=>({useScope:u(),scopeName:u.scopeName}));return function(f){const s=r.reduce((h,{useScope:p,scopeName:m})=>{const v=p(f)[`__scope${m}`];return{...h,...v}},{});return D.useMemo(()=>({[`__scope${i.scopeName}`]:s}),[s])}};return a.scopeName=i.scopeName,a}function cy(t,i){if(typeof t=="function")return t(i);t!=null&&(t.current=i)}function Kd(...t){return i=>{let a=!1;const r=t.map(u=>{const f=cy(u,i);return!a&&typeof f=="function"&&(a=!0),f});if(a)return()=>{for(let u=0;u<r.length;u++){const f=r[u];typeof f=="function"?f():cy(t[u],null)}}}}function tc(...t){return D.useCallback(Kd(...t),t)}function sy(t){const i=eM(t),a=D.forwardRef((r,u)=>{const{children:f,...s}=r,h=D.Children.toArray(f),p=h.find(nM);if(p){const m=p.props.children,g=h.map(v=>v===p?D.Children.count(m)>1?D.Children.only(null):D.isValidElement(m)?m.props.children:null:v);return S.jsx(i,{...s,ref:u,children:D.isValidElement(m)?D.cloneElement(m,void 0,g):null})}return S.jsx(i,{...s,ref:u,children:f})});return a.displayName=`${t}.Slot`,a}function eM(t){const i=D.forwardRef((a,r)=>{const{children:u,...f}=a;if(D.isValidElement(u)){const s=iM(u),h=lM(f,u.props);return u.type!==D.Fragment&&(h.ref=r?Kd(r,s):s),D.cloneElement(u,h)}return D.Children.count(u)>1?D.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var tM=Symbol("radix.slottable");function nM(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===tM}function lM(t,i){const a={...i};for(const r in i){const u=t[r],f=i[r];/^on[A-Z]/.test(r)?u&&f?a[r]=(...h)=>{const p=f(...h);return u(...h),p}:u&&(a[r]=u):r==="style"?a[r]={...u,...f}:r==="className"&&(a[r]=[u,f].filter(Boolean).join(" "))}return{...t,...a}}function iM(t){let i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}function aM(t){const i=t+"CollectionProvider",[a,r]=Qd(i),[u,f]=a(i,{collectionRef:{current:null},itemMap:new Map}),s=N=>{const{scope:T,children:z}=N,j=P.useRef(null),B=P.useRef(new Map).current;return S.jsx(u,{scope:T,itemMap:B,collectionRef:j,children:z})};s.displayName=i;const h=t+"CollectionSlot",p=sy(h),m=P.forwardRef((N,T)=>{const{scope:z,children:j}=N,B=f(h,z),k=tc(T,B.collectionRef);return S.jsx(p,{ref:k,children:j})});m.displayName=h;const g=t+"CollectionItemSlot",v="data-radix-collection-item",x=sy(g),w=P.forwardRef((N,T)=>{const{scope:z,children:j,...B}=N,k=P.useRef(null),K=tc(T,k),I=f(g,z);return P.useEffect(()=>(I.itemMap.set(k,{ref:k,...B}),()=>{I.itemMap.delete(k)})),S.jsx(x,{[v]:"",ref:K,children:j})});w.displayName=g;function M(N){const T=f(t+"CollectionConsumer",N);return P.useCallback(()=>{const j=T.collectionRef.current;if(!j)return[];const B=Array.from(j.querySelectorAll(`[${v}]`));return Array.from(T.itemMap.values()).sort((I,ee)=>B.indexOf(I.ref.current)-B.indexOf(ee.ref.current))},[T.collectionRef,T.itemMap])}return[{Provider:s,Slot:m,ItemSlot:w},M,r]}var nc=globalThis?.document?D.useLayoutEffect:()=>{},oM=vy[" useId ".trim().toString()]||(()=>{}),rM=0;function kx(t){const[i,a]=D.useState(oM());return nc(()=>{a(r=>r??String(rM++))},[t]),i?`radix-${i}`:""}function uM(t){const i=cM(t),a=D.forwardRef((r,u)=>{const{children:f,...s}=r,h=D.Children.toArray(f),p=h.find(fM);if(p){const m=p.props.children,g=h.map(v=>v===p?D.Children.count(m)>1?D.Children.only(null):D.isValidElement(m)?m.props.children:null:v);return S.jsx(i,{...s,ref:u,children:D.isValidElement(m)?D.cloneElement(m,void 0,g):null})}return S.jsx(i,{...s,ref:u,children:f})});return a.displayName=`${t}.Slot`,a}function cM(t){const i=D.forwardRef((a,r)=>{const{children:u,...f}=a;if(D.isValidElement(u)){const s=hM(u),h=dM(f,u.props);return u.type!==D.Fragment&&(h.ref=r?Kd(r,s):s),D.cloneElement(u,h)}return D.Children.count(u)>1?D.Children.only(null):null});return i.displayName=`${t}.SlotClone`,i}var sM=Symbol("radix.slottable");function fM(t){return D.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===sM}function dM(t,i){const a={...i};for(const r in i){const u=t[r],f=i[r];/^on[A-Z]/.test(r)?u&&f?a[r]=(...h)=>{const p=f(...h);return u(...h),p}:u&&(a[r]=u):r==="style"?a[r]={...u,...f}:r==="className"&&(a[r]=[u,f].filter(Boolean).join(" "))}return{...t,...a}}function hM(t){let i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var pM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Da=pM.reduce((t,i)=>{const a=uM(`Primitive.${i}`),r=D.forwardRef((u,f)=>{const{asChild:s,...h}=u,p=s?a:i;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),S.jsx(p,{...h,ref:f})});return r.displayName=`Primitive.${i}`,{...t,[i]:r}},{});function mM(t){const i=D.useRef(t);return D.useEffect(()=>{i.current=t}),D.useMemo(()=>(...a)=>i.current?.(...a),[])}var gM=vy[" useInsertionEffect ".trim().toString()]||nc;function Lx({prop:t,defaultProp:i,onChange:a=()=>{},caller:r}){const[u,f,s]=yM({defaultProp:i,onChange:a}),h=t!==void 0,p=h?t:u;{const g=D.useRef(t!==void 0);D.useEffect(()=>{const v=g.current;v!==h&&console.warn(`${r} is changing from ${v?"controlled":"uncontrolled"} to ${h?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=h},[h,r])}const m=D.useCallback(g=>{if(h){const v=vM(g)?g(t):g;v!==t&&s.current?.(v)}else f(g)},[h,t,f,s]);return[p,m]}function yM({defaultProp:t,onChange:i}){const[a,r]=D.useState(t),u=D.useRef(a),f=D.useRef(i);return gM(()=>{f.current=i},[i]),D.useEffect(()=>{u.current!==a&&(f.current?.(a),u.current=a)},[a,u]),[a,r,f]}function vM(t){return typeof t=="function"}var xM=D.createContext(void 0);function Ux(t){const i=D.useContext(xM);return t||i||"ltr"}var Kf="rovingFocusGroup.onEntryFocus",bM={bubbles:!1,cancelable:!0},er="RovingFocusGroup",[xd,Bx,SM]=aM(er),[wM,Yx]=Qd(er,[SM]),[EM,_M]=wM(er),Vx=D.forwardRef((t,i)=>S.jsx(xd.Provider,{scope:t.__scopeRovingFocusGroup,children:S.jsx(xd.Slot,{scope:t.__scopeRovingFocusGroup,children:S.jsx(AM,{...t,ref:i})})}));Vx.displayName=er;var AM=D.forwardRef((t,i)=>{const{__scopeRovingFocusGroup:a,orientation:r,loop:u=!1,dir:f,currentTabStopId:s,defaultCurrentTabStopId:h,onCurrentTabStopIdChange:p,onEntryFocus:m,preventScrollOnEntryFocus:g=!1,...v}=t,x=D.useRef(null),w=tc(i,x),M=Ux(f),[N,T]=Lx({prop:s,defaultProp:h??null,onChange:p,caller:er}),[z,j]=D.useState(!1),B=mM(m),k=Bx(a),K=D.useRef(!1),[I,ee]=D.useState(0);return D.useEffect(()=>{const V=x.current;if(V)return V.addEventListener(Kf,B),()=>V.removeEventListener(Kf,B)},[B]),S.jsx(EM,{scope:a,orientation:r,dir:M,loop:u,currentTabStopId:N,onItemFocus:D.useCallback(V=>T(V),[T]),onItemShiftTab:D.useCallback(()=>j(!0),[]),onFocusableItemAdd:D.useCallback(()=>ee(V=>V+1),[]),onFocusableItemRemove:D.useCallback(()=>ee(V=>V-1),[]),children:S.jsx(Da.div,{tabIndex:z||I===0?-1:0,"data-orientation":r,...v,ref:w,style:{outline:"none",...t.style},onMouseDown:fl(t.onMouseDown,()=>{K.current=!0}),onFocus:fl(t.onFocus,V=>{const X=!K.current;if(V.target===V.currentTarget&&X&&!z){const le=new CustomEvent(Kf,bM);if(V.currentTarget.dispatchEvent(le),!le.defaultPrevented){const oe=k().filter(A=>A.focusable),re=oe.find(A=>A.active),ae=oe.find(A=>A.id===N),$=[re,ae,...oe].filter(Boolean).map(A=>A.ref.current);Xx($,g)}}K.current=!1}),onBlur:fl(t.onBlur,()=>j(!1))})})}),qx="RovingFocusGroupItem",Gx=D.forwardRef((t,i)=>{const{__scopeRovingFocusGroup:a,focusable:r=!0,active:u=!1,tabStopId:f,children:s,...h}=t,p=kx(),m=f||p,g=_M(qx,a),v=g.currentTabStopId===m,x=Bx(a),{onFocusableItemAdd:w,onFocusableItemRemove:M,currentTabStopId:N}=g;return D.useEffect(()=>{if(r)return w(),()=>M()},[r,w,M]),S.jsx(xd.ItemSlot,{scope:a,id:m,focusable:r,active:u,children:S.jsx(Da.span,{tabIndex:v?0:-1,"data-orientation":g.orientation,...h,ref:i,onMouseDown:fl(t.onMouseDown,T=>{r?g.onItemFocus(m):T.preventDefault()}),onFocus:fl(t.onFocus,()=>g.onItemFocus(m)),onKeyDown:fl(t.onKeyDown,T=>{if(T.key==="Tab"&&T.shiftKey){g.onItemShiftTab();return}if(T.target!==T.currentTarget)return;const z=TM(T,g.orientation,g.dir);if(z!==void 0){if(T.metaKey||T.ctrlKey||T.altKey||T.shiftKey)return;T.preventDefault();let B=x().filter(k=>k.focusable).map(k=>k.ref.current);if(z==="last")B.reverse();else if(z==="prev"||z==="next"){z==="prev"&&B.reverse();const k=B.indexOf(T.currentTarget);B=g.loop?MM(B,k+1):B.slice(k+1)}setTimeout(()=>Xx(B))}}),children:typeof s=="function"?s({isCurrentTabStop:v,hasTabStop:N!=null}):s})})});Gx.displayName=qx;var NM={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function CM(t,i){return i!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function TM(t,i,a){const r=CM(t.key,a);if(!(i==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(i==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return NM[r]}function Xx(t,i=!1){const a=document.activeElement;for(const r of t)if(r===a||(r.focus({preventScroll:i}),document.activeElement!==a))return}function MM(t,i){return t.map((a,r)=>t[(i+r)%t.length])}var zM=Vx,DM=Gx;function OM(t,i){return D.useReducer((a,r)=>i[a][r]??a,t)}var Zx=t=>{const{present:i,children:a}=t,r=RM(i),u=typeof a=="function"?a({present:r.isPresent}):D.Children.only(a),f=tc(r.ref,jM(u));return typeof a=="function"||r.isPresent?D.cloneElement(u,{ref:f}):null};Zx.displayName="Presence";function RM(t){const[i,a]=D.useState(),r=D.useRef(null),u=D.useRef(t),f=D.useRef("none"),s=t?"mounted":"unmounted",[h,p]=OM(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return D.useEffect(()=>{const m=Ru(r.current);f.current=h==="mounted"?m:"none"},[h]),nc(()=>{const m=r.current,g=u.current;if(g!==t){const x=f.current,w=Ru(m);t?p("MOUNT"):w==="none"||m?.display==="none"?p("UNMOUNT"):p(g&&x!==w?"ANIMATION_OUT":"UNMOUNT"),u.current=t}},[t,p]),nc(()=>{if(i){let m;const g=i.ownerDocument.defaultView??window,v=w=>{const N=Ru(r.current).includes(CSS.escape(w.animationName));if(w.target===i&&N&&(p("ANIMATION_END"),!u.current)){const T=i.style.animationFillMode;i.style.animationFillMode="forwards",m=g.setTimeout(()=>{i.style.animationFillMode==="forwards"&&(i.style.animationFillMode=T)})}},x=w=>{w.target===i&&(f.current=Ru(r.current))};return i.addEventListener("animationstart",x),i.addEventListener("animationcancel",v),i.addEventListener("animationend",v),()=>{g.clearTimeout(m),i.removeEventListener("animationstart",x),i.removeEventListener("animationcancel",v),i.removeEventListener("animationend",v)}}else p("ANIMATION_END")},[i,p]),{isPresent:["mounted","unmountSuspended"].includes(h),ref:D.useCallback(m=>{r.current=m?getComputedStyle(m):null,a(m)},[])}}function Ru(t){return t?.animationName||"none"}function jM(t){let i=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning;return a?t.ref:(i=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=i&&"isReactWarning"in i&&i.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var dc="Tabs",[HM]=Qd(dc,[Yx]),$x=Yx(),[kM,Id]=HM(dc),Qx=D.forwardRef((t,i)=>{const{__scopeTabs:a,value:r,onValueChange:u,defaultValue:f,orientation:s="horizontal",dir:h,activationMode:p="automatic",...m}=t,g=Ux(h),[v,x]=Lx({prop:r,onChange:u,defaultProp:f??"",caller:dc});return S.jsx(kM,{scope:a,baseId:kx(),value:v,onValueChange:x,orientation:s,dir:g,activationMode:p,children:S.jsx(Da.div,{dir:g,"data-orientation":s,...m,ref:i})})});Qx.displayName=dc;var Kx="TabsList",Ix=D.forwardRef((t,i)=>{const{__scopeTabs:a,loop:r=!0,...u}=t,f=Id(Kx,a),s=$x(a);return S.jsx(zM,{asChild:!0,...s,orientation:f.orientation,dir:f.dir,loop:r,children:S.jsx(Da.div,{role:"tablist","aria-orientation":f.orientation,...u,ref:i})})});Ix.displayName=Kx;var Fx="TabsTrigger",Jx=D.forwardRef((t,i)=>{const{__scopeTabs:a,value:r,disabled:u=!1,...f}=t,s=Id(Fx,a),h=$x(a),p=e1(s.baseId,r),m=t1(s.baseId,r),g=r===s.value;return S.jsx(DM,{asChild:!0,...h,focusable:!u,active:g,children:S.jsx(Da.button,{type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":u?"":void 0,disabled:u,id:p,...f,ref:i,onMouseDown:fl(t.onMouseDown,v=>{!u&&v.button===0&&v.ctrlKey===!1?s.onValueChange(r):v.preventDefault()}),onKeyDown:fl(t.onKeyDown,v=>{[" ","Enter"].includes(v.key)&&s.onValueChange(r)}),onFocus:fl(t.onFocus,()=>{const v=s.activationMode!=="manual";!g&&!u&&v&&s.onValueChange(r)})})})});Jx.displayName=Fx;var Wx="TabsContent",Px=D.forwardRef((t,i)=>{const{__scopeTabs:a,value:r,forceMount:u,children:f,...s}=t,h=Id(Wx,a),p=e1(h.baseId,r),m=t1(h.baseId,r),g=r===h.value,v=D.useRef(g);return D.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),S.jsx(Zx,{present:u||g,children:({present:x})=>S.jsx(Da.div,{"data-state":g?"active":"inactive","data-orientation":h.orientation,role:"tabpanel","aria-labelledby":p,hidden:!x,id:m,tabIndex:0,...s,ref:i,style:{...t.style,animationDuration:v.current?"0s":void 0},children:x&&f})})});Px.displayName=Wx;function e1(t,i){return`${t}-trigger-${i}`}function t1(t,i){return`${t}-content-${i}`}var LM=Qx,n1=Ix,l1=Jx,i1=Px;function a1(t){var i,a,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var u=t.length;for(i=0;i<u;i++)t[i]&&(a=a1(t[i]))&&(r&&(r+=" "),r+=a)}else for(a in t)t[a]&&(r&&(r+=" "),r+=a);return r}function UM(){for(var t,i,a=0,r="",u=arguments.length;a<u;a++)(t=arguments[a])&&(i=a1(t))&&(r&&(r+=" "),r+=i);return r}const BM=(t,i)=>{const a=new Array(t.length+i.length);for(let r=0;r<t.length;r++)a[r]=t[r];for(let r=0;r<i.length;r++)a[t.length+r]=i[r];return a},YM=(t,i)=>({classGroupId:t,validator:i}),o1=(t=new Map,i=null,a)=>({nextPart:t,validators:i,classGroupId:a}),lc="-",fy=[],VM="arbitrary..",qM=t=>{const i=XM(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:r}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return GM(s);const h=s.split(lc),p=h[0]===""&&h.length>1?1:0;return r1(h,p,i)},getConflictingClassGroupIds:(s,h)=>{if(h){const p=r[s],m=a[s];return p?m?BM(m,p):p:m||fy}return a[s]||fy}}},r1=(t,i,a)=>{if(t.length-i===0)return a.classGroupId;const u=t[i],f=a.nextPart.get(u);if(f){const m=r1(t,i+1,f);if(m)return m}const s=a.validators;if(s===null)return;const h=i===0?t.join(lc):t.slice(i).join(lc),p=s.length;for(let m=0;m<p;m++){const g=s[m];if(g.validator(h))return g.classGroupId}},GM=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const i=t.slice(1,-1),a=i.indexOf(":"),r=i.slice(0,a);return r?VM+r:void 0})(),XM=t=>{const{theme:i,classGroups:a}=t;return ZM(a,i)},ZM=(t,i)=>{const a=o1();for(const r in t){const u=t[r];Fd(u,a,r,i)}return a},Fd=(t,i,a,r)=>{const u=t.length;for(let f=0;f<u;f++){const s=t[f];$M(s,i,a,r)}},$M=(t,i,a,r)=>{if(typeof t=="string"){QM(t,i,a);return}if(typeof t=="function"){KM(t,i,a,r);return}IM(t,i,a,r)},QM=(t,i,a)=>{const r=t===""?i:u1(i,t);r.classGroupId=a},KM=(t,i,a,r)=>{if(FM(t)){Fd(t(r),i,a,r);return}i.validators===null&&(i.validators=[]),i.validators.push(YM(a,t))},IM=(t,i,a,r)=>{const u=Object.entries(t),f=u.length;for(let s=0;s<f;s++){const[h,p]=u[s];Fd(p,u1(i,h),a,r)}},u1=(t,i)=>{let a=t;const r=i.split(lc),u=r.length;for(let f=0;f<u;f++){const s=r[f];let h=a.nextPart.get(s);h||(h=o1(),a.nextPart.set(s,h)),a=h}return a},FM=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,JM=t=>{if(t<1)return{get:()=>{},set:()=>{}};let i=0,a=Object.create(null),r=Object.create(null);const u=(f,s)=>{a[f]=s,i++,i>t&&(i=0,r=a,a=Object.create(null))};return{get(f){let s=a[f];if(s!==void 0)return s;if((s=r[f])!==void 0)return u(f,s),s},set(f,s){f in a?a[f]=s:u(f,s)}}},bd="!",dy=":",WM=[],hy=(t,i,a,r,u)=>({modifiers:t,hasImportantModifier:i,baseClassName:a,maybePostfixModifierPosition:r,isExternal:u}),PM=t=>{const{prefix:i,experimentalParseClassName:a}=t;let r=u=>{const f=[];let s=0,h=0,p=0,m;const g=u.length;for(let N=0;N<g;N++){const T=u[N];if(s===0&&h===0){if(T===dy){f.push(u.slice(p,N)),p=N+1;continue}if(T==="/"){m=N;continue}}T==="["?s++:T==="]"?s--:T==="("?h++:T===")"&&h--}const v=f.length===0?u:u.slice(p);let x=v,w=!1;v.endsWith(bd)?(x=v.slice(0,-1),w=!0):v.startsWith(bd)&&(x=v.slice(1),w=!0);const M=m&&m>p?m-p:void 0;return hy(f,w,x,M)};if(i){const u=i+dy,f=r;r=s=>s.startsWith(u)?f(s.slice(u.length)):hy(WM,!1,s,void 0,!0)}if(a){const u=r;r=f=>a({className:f,parseClassName:u})}return r},e4=t=>{const i=new Map;return t.orderSensitiveModifiers.forEach((a,r)=>{i.set(a,1e6+r)}),a=>{const r=[];let u=[];for(let f=0;f<a.length;f++){const s=a[f],h=s[0]==="[",p=i.has(s);h||p?(u.length>0&&(u.sort(),r.push(...u),u=[]),r.push(s)):u.push(s)}return u.length>0&&(u.sort(),r.push(...u)),r}},t4=t=>({cache:JM(t.cacheSize),parseClassName:PM(t),sortModifiers:e4(t),...qM(t)}),n4=/\s+/,l4=(t,i)=>{const{parseClassName:a,getClassGroupId:r,getConflictingClassGroupIds:u,sortModifiers:f}=i,s=[],h=t.trim().split(n4);let p="";for(let m=h.length-1;m>=0;m-=1){const g=h[m],{isExternal:v,modifiers:x,hasImportantModifier:w,baseClassName:M,maybePostfixModifierPosition:N}=a(g);if(v){p=g+(p.length>0?" "+p:p);continue}let T=!!N,z=r(T?M.substring(0,N):M);if(!z){if(!T){p=g+(p.length>0?" "+p:p);continue}if(z=r(M),!z){p=g+(p.length>0?" "+p:p);continue}T=!1}const j=x.length===0?"":x.length===1?x[0]:f(x).join(":"),B=w?j+bd:j,k=B+z;if(s.indexOf(k)>-1)continue;s.push(k);const K=u(z,T);for(let I=0;I<K.length;++I){const ee=K[I];s.push(B+ee)}p=g+(p.length>0?" "+p:p)}return p},i4=(...t)=>{let i=0,a,r,u="";for(;i<t.length;)(a=t[i++])&&(r=c1(a))&&(u&&(u+=" "),u+=r);return u},c1=t=>{if(typeof t=="string")return t;let i,a="";for(let r=0;r<t.length;r++)t[r]&&(i=c1(t[r]))&&(a&&(a+=" "),a+=i);return a},a4=(t,...i)=>{let a,r,u,f;const s=p=>{const m=i.reduce((g,v)=>v(g),t());return a=t4(m),r=a.cache.get,u=a.cache.set,f=h,h(p)},h=p=>{const m=r(p);if(m)return m;const g=l4(p,a);return u(p,g),g};return f=s,(...p)=>f(i4(...p))},o4=[],yt=t=>{const i=a=>a[t]||o4;return i.isThemeGetter=!0,i},s1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,f1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,r4=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,u4=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,c4=/\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$/,s4=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,f4=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,d4=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Xl=t=>r4.test(t),Ne=t=>!!t&&!Number.isNaN(Number(t)),Zl=t=>!!t&&Number.isInteger(Number(t)),If=t=>t.endsWith("%")&&Ne(t.slice(0,-1)),cl=t=>u4.test(t),d1=()=>!0,h4=t=>c4.test(t)&&!s4.test(t),Jd=()=>!1,p4=t=>f4.test(t),m4=t=>d4.test(t),g4=t=>!pe(t)&&!me(t),y4=t=>ti(t,m1,Jd),pe=t=>s1.test(t),Ei=t=>ti(t,g1,h4),py=t=>ti(t,A4,Ne),v4=t=>ti(t,v1,d1),x4=t=>ti(t,y1,Jd),my=t=>ti(t,h1,Jd),b4=t=>ti(t,p1,m4),ju=t=>ti(t,x1,p4),me=t=>f1.test(t),Ho=t=>Oi(t,g1),S4=t=>Oi(t,y1),gy=t=>Oi(t,h1),w4=t=>Oi(t,m1),E4=t=>Oi(t,p1),Hu=t=>Oi(t,x1,!0),_4=t=>Oi(t,v1,!0),ti=(t,i,a)=>{const r=s1.exec(t);return r?r[1]?i(r[1]):a(r[2]):!1},Oi=(t,i,a=!1)=>{const r=f1.exec(t);return r?r[1]?i(r[1]):a:!1},h1=t=>t==="position"||t==="percentage",p1=t=>t==="image"||t==="url",m1=t=>t==="length"||t==="size"||t==="bg-size",g1=t=>t==="length",A4=t=>t==="number",y1=t=>t==="family-name",v1=t=>t==="number"||t==="weight",x1=t=>t==="shadow",N4=()=>{const t=yt("color"),i=yt("font"),a=yt("text"),r=yt("font-weight"),u=yt("tracking"),f=yt("leading"),s=yt("breakpoint"),h=yt("container"),p=yt("spacing"),m=yt("radius"),g=yt("shadow"),v=yt("inset-shadow"),x=yt("text-shadow"),w=yt("drop-shadow"),M=yt("blur"),N=yt("perspective"),T=yt("aspect"),z=yt("ease"),j=yt("animate"),B=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],K=()=>[...k(),me,pe],I=()=>["auto","hidden","clip","visible","scroll"],ee=()=>["auto","contain","none"],V=()=>[me,pe,p],X=()=>[Xl,"full","auto",...V()],le=()=>[Zl,"none","subgrid",me,pe],oe=()=>["auto",{span:["full",Zl,me,pe]},Zl,me,pe],re=()=>[Zl,"auto",me,pe],ae=()=>["auto","min","max","fr",me,pe],C=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],$=()=>["start","end","center","stretch","center-safe","end-safe"],A=()=>["auto",...V()],U=()=>[Xl,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...V()],q=()=>[Xl,"screen","full","dvw","lvw","svw","min","max","fit",...V()],E=()=>[Xl,"screen","full","lh","dvh","lvh","svh","min","max","fit",...V()],O=()=>[t,me,pe],_=()=>[...k(),gy,my,{position:[me,pe]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],Q=()=>["auto","cover","contain",w4,y4,{size:[me,pe]}],W=()=>[If,Ho,Ei],ue=()=>["","none","full",m,me,pe],ce=()=>["",Ne,Ho,Ei],fe=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Ne,If,gy,my],Ae=()=>["","none",M,me,pe],He=()=>["none",Ne,me,pe],Qe=()=>["none",Ne,me,pe],et=()=>[Ne,me,pe],Be=()=>[Xl,"full",...V()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[cl],breakpoint:[cl],color:[d1],container:[cl],"drop-shadow":[cl],ease:["in","out","in-out"],font:[g4],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[cl],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[cl],shadow:[cl],spacing:["px",Ne],text:[cl],"text-shadow":[cl],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Xl,pe,me,T]}],container:["container"],columns:[{columns:[Ne,pe,me,h]}],"break-after":[{"break-after":B()}],"break-before":[{"break-before":B()}],"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:K()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:ee()}],"overscroll-x":[{"overscroll-x":ee()}],"overscroll-y":[{"overscroll-y":ee()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:X()}],"inset-x":[{"inset-x":X()}],"inset-y":[{"inset-y":X()}],start:[{"inset-s":X(),start:X()}],end:[{"inset-e":X(),end:X()}],"inset-bs":[{"inset-bs":X()}],"inset-be":[{"inset-be":X()}],top:[{top:X()}],right:[{right:X()}],bottom:[{bottom:X()}],left:[{left:X()}],visibility:["visible","invisible","collapse"],z:[{z:[Zl,"auto",me,pe]}],basis:[{basis:[Xl,"full","auto",h,...V()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Ne,Xl,"auto","initial","none",pe]}],grow:[{grow:["",Ne,me,pe]}],shrink:[{shrink:["",Ne,me,pe]}],order:[{order:[Zl,"first","last","none",me,pe]}],"grid-cols":[{"grid-cols":le()}],"col-start-end":[{col:oe()}],"col-start":[{"col-start":re()}],"col-end":[{"col-end":re()}],"grid-rows":[{"grid-rows":le()}],"row-start-end":[{row:oe()}],"row-start":[{"row-start":re()}],"row-end":[{"row-end":re()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ae()}],"auto-rows":[{"auto-rows":ae()}],gap:[{gap:V()}],"gap-x":[{"gap-x":V()}],"gap-y":[{"gap-y":V()}],"justify-content":[{justify:[...C(),"normal"]}],"justify-items":[{"justify-items":[...$(),"normal"]}],"justify-self":[{"justify-self":["auto",...$()]}],"align-content":[{content:["normal",...C()]}],"align-items":[{items:[...$(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...$(),{baseline:["","last"]}]}],"place-content":[{"place-content":C()}],"place-items":[{"place-items":[...$(),"baseline"]}],"place-self":[{"place-self":["auto",...$()]}],p:[{p:V()}],px:[{px:V()}],py:[{py:V()}],ps:[{ps:V()}],pe:[{pe:V()}],pbs:[{pbs:V()}],pbe:[{pbe:V()}],pt:[{pt:V()}],pr:[{pr:V()}],pb:[{pb:V()}],pl:[{pl:V()}],m:[{m:A()}],mx:[{mx:A()}],my:[{my:A()}],ms:[{ms:A()}],me:[{me:A()}],mbs:[{mbs:A()}],mbe:[{mbe:A()}],mt:[{mt:A()}],mr:[{mr:A()}],mb:[{mb:A()}],ml:[{ml:A()}],"space-x":[{"space-x":V()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":V()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...E()]}],"min-block-size":[{"min-block":["auto",...E()]}],"max-block-size":[{"max-block":["none",...E()]}],w:[{w:[h,"screen",...U()]}],"min-w":[{"min-w":[h,"screen","none",...U()]}],"max-w":[{"max-w":[h,"screen","none","prose",{screen:[s]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",a,Ho,Ei]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,_4,v4]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",If,pe]}],"font-family":[{font:[S4,x4,i]}],"font-features":[{"font-features":[pe]}],"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:[u,me,pe]}],"line-clamp":[{"line-clamp":[Ne,"none",me,py]}],leading:[{leading:[f,...V()]}],"list-image":[{"list-image":["none",me,pe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",me,pe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:O()}],"text-color":[{text:O()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...fe(),"wavy"]}],"text-decoration-thickness":[{decoration:[Ne,"from-font","auto",me,Ei]}],"text-decoration-color":[{decoration:O()}],"underline-offset":[{"underline-offset":[Ne,"auto",me,pe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",me,pe]}],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",me,pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:Q()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Zl,me,pe],radial:["",me,pe],conic:[Zl,me,pe]},E4,b4]}],"bg-color":[{bg:O()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:O()}],"gradient-via":[{via:O()}],"gradient-to":[{to:O()}],rounded:[{rounded:ue()}],"rounded-s":[{"rounded-s":ue()}],"rounded-e":[{"rounded-e":ue()}],"rounded-t":[{"rounded-t":ue()}],"rounded-r":[{"rounded-r":ue()}],"rounded-b":[{"rounded-b":ue()}],"rounded-l":[{"rounded-l":ue()}],"rounded-ss":[{"rounded-ss":ue()}],"rounded-se":[{"rounded-se":ue()}],"rounded-ee":[{"rounded-ee":ue()}],"rounded-es":[{"rounded-es":ue()}],"rounded-tl":[{"rounded-tl":ue()}],"rounded-tr":[{"rounded-tr":ue()}],"rounded-br":[{"rounded-br":ue()}],"rounded-bl":[{"rounded-bl":ue()}],"border-w":[{border:ce()}],"border-w-x":[{"border-x":ce()}],"border-w-y":[{"border-y":ce()}],"border-w-s":[{"border-s":ce()}],"border-w-e":[{"border-e":ce()}],"border-w-bs":[{"border-bs":ce()}],"border-w-be":[{"border-be":ce()}],"border-w-t":[{"border-t":ce()}],"border-w-r":[{"border-r":ce()}],"border-w-b":[{"border-b":ce()}],"border-w-l":[{"border-l":ce()}],"divide-x":[{"divide-x":ce()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ce()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...fe(),"hidden","none"]}],"divide-style":[{divide:[...fe(),"hidden","none"]}],"border-color":[{border:O()}],"border-color-x":[{"border-x":O()}],"border-color-y":[{"border-y":O()}],"border-color-s":[{"border-s":O()}],"border-color-e":[{"border-e":O()}],"border-color-bs":[{"border-bs":O()}],"border-color-be":[{"border-be":O()}],"border-color-t":[{"border-t":O()}],"border-color-r":[{"border-r":O()}],"border-color-b":[{"border-b":O()}],"border-color-l":[{"border-l":O()}],"divide-color":[{divide:O()}],"outline-style":[{outline:[...fe(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Ne,me,pe]}],"outline-w":[{outline:["",Ne,Ho,Ei]}],"outline-color":[{outline:O()}],shadow:[{shadow:["","none",g,Hu,ju]}],"shadow-color":[{shadow:O()}],"inset-shadow":[{"inset-shadow":["none",v,Hu,ju]}],"inset-shadow-color":[{"inset-shadow":O()}],"ring-w":[{ring:ce()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:O()}],"ring-offset-w":[{"ring-offset":[Ne,Ei]}],"ring-offset-color":[{"ring-offset":O()}],"inset-ring-w":[{"inset-ring":ce()}],"inset-ring-color":[{"inset-ring":O()}],"text-shadow":[{"text-shadow":["none",x,Hu,ju]}],"text-shadow-color":[{"text-shadow":O()}],opacity:[{opacity:[Ne,me,pe]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"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":[Ne]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":O()}],"mask-image-linear-to-color":[{"mask-linear-to":O()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":O()}],"mask-image-t-to-color":[{"mask-t-to":O()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":O()}],"mask-image-r-to-color":[{"mask-r-to":O()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":O()}],"mask-image-b-to-color":[{"mask-b-to":O()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":O()}],"mask-image-l-to-color":[{"mask-l-to":O()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":O()}],"mask-image-x-to-color":[{"mask-x-to":O()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":O()}],"mask-image-y-to-color":[{"mask-y-to":O()}],"mask-image-radial":[{"mask-radial":[me,pe]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":O()}],"mask-image-radial-to-color":[{"mask-radial-to":O()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[Ne]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":O()}],"mask-image-conic-to-color":[{"mask-conic-to":O()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:_()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:Q()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",me,pe]}],filter:[{filter:["","none",me,pe]}],blur:[{blur:Ae()}],brightness:[{brightness:[Ne,me,pe]}],contrast:[{contrast:[Ne,me,pe]}],"drop-shadow":[{"drop-shadow":["","none",w,Hu,ju]}],"drop-shadow-color":[{"drop-shadow":O()}],grayscale:[{grayscale:["",Ne,me,pe]}],"hue-rotate":[{"hue-rotate":[Ne,me,pe]}],invert:[{invert:["",Ne,me,pe]}],saturate:[{saturate:[Ne,me,pe]}],sepia:[{sepia:["",Ne,me,pe]}],"backdrop-filter":[{"backdrop-filter":["","none",me,pe]}],"backdrop-blur":[{"backdrop-blur":Ae()}],"backdrop-brightness":[{"backdrop-brightness":[Ne,me,pe]}],"backdrop-contrast":[{"backdrop-contrast":[Ne,me,pe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Ne,me,pe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Ne,me,pe]}],"backdrop-invert":[{"backdrop-invert":["",Ne,me,pe]}],"backdrop-opacity":[{"backdrop-opacity":[Ne,me,pe]}],"backdrop-saturate":[{"backdrop-saturate":[Ne,me,pe]}],"backdrop-sepia":[{"backdrop-sepia":["",Ne,me,pe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":V()}],"border-spacing-x":[{"border-spacing-x":V()}],"border-spacing-y":[{"border-spacing-y":V()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",me,pe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Ne,"initial",me,pe]}],ease:[{ease:["linear","initial",z,me,pe]}],delay:[{delay:[Ne,me,pe]}],animate:[{animate:["none",j,me,pe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[N,me,pe]}],"perspective-origin":[{"perspective-origin":K()}],rotate:[{rotate:He()}],"rotate-x":[{"rotate-x":He()}],"rotate-y":[{"rotate-y":He()}],"rotate-z":[{"rotate-z":He()}],scale:[{scale:Qe()}],"scale-x":[{"scale-x":Qe()}],"scale-y":[{"scale-y":Qe()}],"scale-z":[{"scale-z":Qe()}],"scale-3d":["scale-3d"],skew:[{skew:et()}],"skew-x":[{"skew-x":et()}],"skew-y":[{"skew-y":et()}],transform:[{transform:[me,pe,"","none","gpu","cpu"]}],"transform-origin":[{origin:K()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Be()}],"translate-x":[{"translate-x":Be()}],"translate-y":[{"translate-y":Be()}],"translate-z":[{"translate-z":Be()}],"translate-none":["translate-none"],accent:[{accent:O()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:O()}],"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",me,pe]}],"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":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mbs":[{"scroll-mbs":V()}],"scroll-mbe":[{"scroll-mbe":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pbs":[{"scroll-pbs":V()}],"scroll-pbe":[{"scroll-pbe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",me,pe]}],fill:[{fill:["none",...O()]}],"stroke-w":[{stroke:[Ne,Ho,Ei,py]}],stroke:[{stroke:["none",...O()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-bs","border-w-be","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-bs","border-color-be","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-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]}},C4=a4(N4);function Wd(...t){return C4(UM(t))}const T4=LM,b1=D.forwardRef(({className:t,...i},a)=>S.jsx(n1,{ref:a,className:Wd("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",t),...i}));b1.displayName=n1.displayName;const Sd=D.forwardRef(({className:t,...i},a)=>S.jsx(l1,{ref:a,className:Wd("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",t),...i}));Sd.displayName=l1.displayName;const wd=D.forwardRef(({className:t,...i},a)=>S.jsx(i1,{ref:a,className:Wd("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",t),...i}));wd.displayName=i1.displayName;const M4=()=>{const{error:t,isCliMode:i,currentModelSlug:a,yamlInput:r,setYamlInput:u,parseAndSetSchema:f}=wn(),s=async()=>{if(f(r),i)try{const h=a?`/api/save-yaml?model=${a}`:"/api/save-yaml";await fetch(h,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({yaml:r})})}catch(h){console.error("Failed to save YAML to file:",h)}};return S.jsxs("div",{className:"flex-1 flex flex-col gap-3 overflow-hidden p-4 pt-2 h-full",children:[!i&&S.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-blue-500/10 border border-blue-500/30 rounded-md shrink-0",children:[S.jsx(ry,{size:14,className:"text-blue-400"}),S.jsx("span",{className:"text-[11px] text-blue-300 font-medium",children:"Sandbox Mode (Temporary)"})]}),S.jsxs("div",{className:"relative flex-1 flex flex-col min-h-0",children:[S.jsx("textarea",{className:"flex-1 w-full p-4 bg-slate-800/50 text-slate-100 border border-slate-700 rounded-md font-mono text-sm focus:outline-none focus:ring-1 focus:ring-blue-500/50 transition-all resize-none shadow-inner",placeholder:"tables: ...",value:r,onChange:h=>u(h.target.value)}),t&&S.jsxs("div",{className:"mt-2 p-3 bg-red-500/10 border border-red-500/30 rounded-md text-red-400 text-xs flex gap-2 items-start shrink-0",children:[S.jsx(ry,{size:14,className:"shrink-0 mt-0.5"}),S.jsx("span",{children:t})]})]}),S.jsxs("div",{className:"flex justify-between items-center pt-1 shrink-0",children:[S.jsx("div",{className:"text-[10px] text-slate-500 italic",children:i?"Saves to local file":"Changes reset on reload"}),S.jsxs("button",{onClick:s,className:`flex items-center gap-2 px-4 py-2 rounded-md font-medium text-sm transition-all shadow-lg shrink-0 ${i?"bg-blue-600 hover:bg-blue-700 text-white":"bg-emerald-600 hover:bg-emerald-700 text-white"}`,children:[i?S.jsx(LT,{size:16}):S.jsx(jT,{size:16}),i?"Save & Update":"Apply Changes"]})]})]})},z4=()=>{const{schema:t,setSelectedTableId:i,setFocusNodeId:a}=wn(),[r,u]=D.useState("");if(!t)return null;const f=t.tables.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())||p.id.toLowerCase().includes(r.toLowerCase())),s=t.domains?.filter(p=>p.name.toLowerCase().includes(r.toLowerCase())||p.id.toLowerCase().includes(r.toLowerCase()))||[],h=p=>{i(p),a(p)};return S.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-4 pt-2",children:[S.jsxs("div",{className:"relative mb-4 shrink-0",children:[S.jsx(BT,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-500"}),S.jsx("input",{type:"text",value:r,onChange:p=>u(p.target.value),placeholder:"Search entities...",className:"w-full pl-9 pr-4 py-2 bg-slate-800 border border-slate-700 rounded-md text-sm text-slate-100 focus:outline-none focus:ring-1 focus:ring-blue-500/50 transition-all shadow-sm"})]}),S.jsxs("div",{className:"flex-1 space-y-6 overflow-auto pr-1",children:[s.length>0&&S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[S.jsx(yd,{size:12,className:"text-slate-500"}),S.jsx("h3",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-500",children:"Domains"})]}),S.jsx("div",{className:"space-y-1",children:s.map(p=>S.jsxs("button",{onClick:()=>h(p.id),className:"w-full flex items-center justify-between group p-2 text-sm rounded border border-transparent hover:bg-slate-800/50 hover:border-slate-700/50 text-slate-300 transition-all text-left",children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("div",{className:"w-1.5 h-1.5 rounded-full",style:{backgroundColor:p.color||"#3b82f6"}}),S.jsx("span",{className:"font-medium group-hover:text-blue-400",children:p.name})]}),S.jsx(oy,{size:12,className:"opacity-0 group-hover:opacity-100 text-slate-500 transition-opacity"})]},p.id))})]}),S.jsxs("section",{children:[S.jsxs("div",{className:"flex items-center gap-2 mb-2 px-1",children:[S.jsx(AT,{size:12,className:"text-slate-500"}),S.jsx("h3",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-500",children:"Tables"})]}),S.jsx("div",{className:"space-y-1",children:f.map(p=>S.jsxs("button",{onClick:()=>h(p.id),className:"w-full flex items-center justify-between group p-2 text-sm rounded border border-transparent hover:bg-slate-800/50 hover:border-slate-700/50 text-slate-300 transition-all text-left",children:[S.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[S.jsx("span",{className:"truncate font-medium group-hover:text-blue-400",children:p.name}),S.jsxs("span",{className:"text-[10px] text-slate-500 shrink-0",children:["(",p.columns?.length||0,")"]})]}),S.jsx(oy,{size:12,className:"opacity-0 group-hover:opacity-100 text-slate-500 transition-opacity"})]},p.id))})]}),f.length===0&&s.length===0&&S.jsx("div",{className:"text-center py-10",children:S.jsxs("p",{className:"text-sm text-slate-500 italic",children:['No entities found for "',r,'"']})})]})]})},D4=()=>{const{isSidebarOpen:t,setIsSidebarOpen:i}=wn();return S.jsx("button",{onClick:()=>i(!t),className:"absolute -right-3.5 top-1/2 -translate-y-1/2 z-[60] flex h-7 w-7 items-center justify-center rounded-full border border-slate-700 bg-slate-900 text-slate-400 hover:text-white hover:bg-slate-800 transition-all shadow-xl","aria-label":t?"Collapse sidebar":"Expand sidebar",children:t?S.jsx(yT,{size:16}):S.jsx(xT,{size:16})})},O4=()=>{const{availableFiles:t,currentModelSlug:i,setCurrentModel:a,isSidebarOpen:r}=wn();if(!r||t.length<=1)return null;const u=i||t[0]?.slug;return S.jsxs("div",{className:"px-4 mb-4",children:[S.jsx("div",{className:"text-[10px] font-bold uppercase tracking-wider text-slate-500 mb-1.5 px-1",children:"Current Model"}),S.jsxs("div",{className:"relative group",children:[S.jsx("select",{value:u,onChange:f=>a(f.target.value),className:"w-full pl-9 pr-8 py-2 bg-slate-800 border border-slate-700 rounded-md text-sm text-slate-100 appearance-none focus:outline-none focus:ring-1 focus:ring-blue-500/50 transition-all shadow-sm cursor-pointer hover:bg-slate-750",children:t.map(f=>S.jsx("option",{value:f.slug,children:f.name},f.slug))}),S.jsx(gd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-blue-400 pointer-events-none"}),S.jsx(mT,{size:14,className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-500 pointer-events-none group-hover:text-slate-300"})]})]})},R4=""+new URL("../favicon.svg",import.meta.url).href,j4=()=>{const{isSidebarOpen:t,activeTab:i,setActiveTab:a,isCliMode:r}=wn();return S.jsxs("div",{className:`relative h-full flex flex-col border-r border-slate-800 bg-slate-900 transition-all duration-300 ease-in-out shadow-2xl z-50 ${t?"w-[400px]":"w-[50px]"}`,children:[S.jsx(D4,{}),S.jsxs("div",{className:`p-4 border-b border-slate-800 flex items-center justify-between ${!t&&"hidden"}`,children:[S.jsxs("div",{className:"flex items-center gap-2",children:[S.jsx("img",{src:R4,alt:"Modscape Logo",className:"w-5 h-5 rounded-md"}),S.jsx("h1",{className:"text-base font-bold text-white tracking-tight",children:"Modscape"})]}),r&&S.jsx("span",{className:"px-1.5 py-0.5 bg-emerald-500/10 border border-emerald-500/30 text-emerald-400 text-[10px] font-bold rounded uppercase",children:"Live"})]}),S.jsx("div",{className:"mt-4",children:t&&S.jsx(O4,{})}),S.jsxs(T4,{value:i,onValueChange:u=>a(u),className:`flex-1 flex flex-col overflow-hidden ${!t&&"items-center py-4"}`,children:[S.jsx("div",{className:`px-4 pt-4 ${!t&&"px-0"}`,children:S.jsxs(b1,{className:`w-full bg-slate-800/50 p-1 border border-slate-700/50 ${!t&&"flex-col h-auto w-10 gap-2 p-0 bg-transparent border-none"}`,children:[S.jsxs(Sd,{value:"editor",className:`flex-1 gap-2 ${!t&&"w-9 h-9 p-0 rounded-md bg-slate-800/50 hover:bg-slate-800 text-slate-400 data-[state=active]:bg-blue-600 data-[state=active]:text-white shadow-sm transition-all"}`,title:"Editor",children:[S.jsx(OT,{size:14}),t&&S.jsx("span",{children:"Editor"})]}),S.jsxs(Sd,{value:"entities",className:`flex-1 gap-2 ${!t&&"w-9 h-9 p-0 rounded-md bg-slate-800/50 hover:bg-slate-800 text-slate-400 data-[state=active]:bg-blue-600 data-[state=active]:text-white shadow-sm transition-all"}`,title:"Entities",children:[S.jsx(TT,{size:14}),t&&S.jsx("span",{children:"Entities"})]})]})}),t&&S.jsxs("div",{className:"flex-1 flex flex-col min-h-0 overflow-hidden",children:[S.jsx(wd,{value:"editor",className:"flex-1 flex flex-col min-h-0 mt-0 data-[state=inactive]:hidden",children:S.jsx(M4,{})}),S.jsx(wd,{value:"entities",className:"flex-1 flex flex-col min-h-0 mt-0 data-[state=inactive]:hidden",children:S.jsx(z4,{})})]})]}),t&&S.jsx("div",{className:"p-3 border-t border-slate-800 bg-slate-950/20",children:S.jsx("p",{className:"text-[10px] text-slate-500 text-center font-medium",children:"Modscape v0.6.0"})})]})},H4=()=>{const{addTable:t,addDomain:i}=wn();return S.jsxs("div",{className:"absolute top-4 right-4 flex gap-2 z-10",children:[S.jsxs("div",{className:"flex bg-slate-900/80 backdrop-blur-md border border-slate-700 rounded-lg shadow-2xl p-1 overflow-hidden",children:[S.jsxs("button",{onClick:()=>i(100,100),className:"flex items-center gap-2 px-3 py-1.5 text-xs font-semibold text-slate-300 hover:text-white hover:bg-slate-800 rounded-md transition-all group",title:"Add new Domain",children:[S.jsx(zT,{size:14,className:"text-blue-400 group-hover:scale-110 transition-transform"}),S.jsx("span",{children:"Domain"})]}),S.jsx("div",{className:"w-[1px] bg-slate-700 mx-1 my-1"}),S.jsxs("button",{onClick:()=>t(200,200),className:"flex items-center gap-2 px-3 py-1.5 text-xs font-semibold text-slate-300 hover:text-white hover:bg-slate-800 rounded-md transition-all group",title:"Add new Table",children:[S.jsx(ET,{size:14,className:"text-emerald-400 group-hover:scale-110 transition-transform"}),S.jsx("span",{children:"Table"})]})]}),S.jsx("div",{className:"bg-blue-600 rounded-lg p-2 shadow-lg flex items-center justify-center",children:S.jsx(vd,{size:18,className:"text-white"})})]})};function k4({sourceX:t,sourceY:i,targetX:a,targetY:r,sourcePosition:u,targetPosition:f,style:s={},markerEnd:h,source:p,target:m,label:g,data:v}){const[x,w,M]=Ku({sourceX:t,sourceY:i,sourcePosition:u,targetX:a,targetY:r,targetPosition:f}),N=wn(K=>K.removeEdge),T=v?.isDirectlySelected,z=v?.isConnectedToSelectedTable,j=T||z,B=v?.label||g,k=K=>{K.stopPropagation(),N(p,m)};return S.jsxs(S.Fragment,{children:[S.jsx(za,{path:x,markerEnd:h,style:s}),j&&S.jsx(m3,{children:S.jsxs("div",{style:{position:"absolute",transform:`translate(-50%, -50%) translate(${w}px,${M}px)`,fontSize:12,pointerEvents:"all",display:"flex",flexDirection:"column",alignItems:"center",gap:"4px",zIndex:1e3},className:"nodrag nopan",children:[B&&S.jsx("div",{className:"bg-slate-800 px-2 py-1 rounded-md text-[10px] font-bold text-emerald-400 border border-emerald-500/30 shadow-lg shadow-black/50 whitespace-nowrap mb-1",children:B}),T&&S.jsx("button",{className:"w-[28px] h-[28px] bg-[#ef4444] text-white rounded-full flex items-center justify-center border-2 border-white shadow-[0_4px_6px_rgba(0,0,0,0.3)] transition-transform active:scale-95 cursor-pointer",onClick:k,onMouseDown:K=>K.stopPropagation(),title:"Delete relationship",children:S.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[S.jsx("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),S.jsx("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})})]})})]})}const L4={table:KT,domain:FT},U4={button:k4},B4={stroke:"#4ade80",strokeWidth:3},Y4={stroke:"#334155",strokeWidth:1};function V4(){const{schema:t,setSelectedTableId:i,selectedTableId:a,selectedEdgeId:r,setSelectedEdgeId:u,updateNodePosition:f,saveLayout:s,isCliMode:h,focusNodeId:p,setFocusNodeId:m,addRelationship:g,removeNode:v}=wn(),[x,w,M]=g3([]),[N,T,z]=y3([]),{setCenter:j,getNode:B}=sc();D.useEffect(()=>{if(p){const X=B(p);if(X){const le=X.position.x+(X.width||0)/2,oe=X.position.y+(X.height||0)/2;j(le,oe,{zoom:1.2,duration:800})}m(null)}},[p,B,j,m]),D.useEffect(()=>{if(!t)return;const X=[],le=320,oe=250,re=60,ae=3;t.domains&&t.domains.forEach((E,O)=>{const _=E.tables.length,H=Math.ceil(_/ae),Q=Math.min(_,ae),W=Math.max(2,Q)*le+re,ue=Math.max(1.5,H)*oe+re,ce=t.layout?.[E.id],fe=Math.floor(O/2),be=O%2,de=ce?.x??be*1600,Ae=ce?.y??fe*1200,He=ce?.width??W,Qe=ce?.height??ue;X.push({id:E.id,type:"domain",position:{x:de,y:Ae},style:{width:He,height:Qe},dragHandle:".domain-drag-handle",data:{label:E.name,color:E.color}}),E.tables.forEach((et,Be)=>{const je=t.tables.find(Jt=>Jt.id===et);if(!je)return;const pt=Math.floor(Be/ae),ke=Be%ae,se=t.layout?.[je.id],Re=se?.x??ke*le+re/2,Tt=se?.y??pt*oe+re/2,Yt=je.columns&&je.columns.length>10?350:void 0,Ft=se?.height??Yt;X.push({id:je.id,type:"table",position:{x:Re,y:Tt},style:{...se?.width?{width:se.width}:{},...Ft?{height:Ft}:{}},dragHandle:".table-drag-handle",data:{table:je},parentNode:E.id,extent:"parent"})})});const C=new Set(t.domains?.flatMap(A=>A.tables)||[]);t.tables.filter(A=>!C.has(A.id)).forEach((A,U)=>{const q=t.layout?.[A.id],E=q?.x??U*300,O=q?.y??100,_=A.columns&&A.columns.length>10?350:void 0,H=q?.height??_;X.push({id:A.id,type:"table",position:{x:E,y:O},style:{...q?.width?{width:q.width}:{},...H?{height:H}:{}},dragHandle:".table-drag-handle",data:{table:A}})}),w(X)},[t,w]);const k=D.useMemo(()=>!t||!t.relationships?[]:t.relationships.map((X,le)=>{const oe=`e-${le}`,re=a===X.from.table||a===X.to.table,ae=r===oe,C=re||ae;return{id:oe,source:X.from.table,target:X.to.table,type:"button",data:{isConnectedToSelectedTable:re,isDirectlySelected:ae,label:X.type},selected:ae,animated:C,style:C?B4:Y4,zIndex:C?10:1}}),[t,a,r]);D.useEffect(()=>{T(k)},[k,T]);const K=D.useCallback(X=>{X.source&&X.target&&g(X.source,X.target,X.sourceHandle,X.targetHandle)},[g]),I=D.useCallback(X=>{X.forEach(le=>v(le.id)),s()},[v,s]),ee=D.useCallback(({nodes:X,edges:le})=>{X.length>0?(i(X[0].id),u(null)):le.length>0?(u(le[0].id),i(null)):(i(null),u(null))},[i,u]),V=D.useCallback((X,le)=>{if(!h)return;let oe=le.parentNode;if(le.type==="table"){const re=le.position.x+(le.width||0)/2,ae=le.position.y+(le.height||0)/2,$=x.filter(A=>A.type==="domain"&&A.id!==le.id).find(A=>{const U=A.position.x,q=A.position.y,E=A.width||600,O=A.height||400;return re>=U&&re<=U+E&&ae>=q&&ae<=q+O});oe=$?$.id:void 0}f(le.id,le.position.x,le.position.y,oe),s()},[h,f,s,x]);return S.jsxs("div",{className:"flex-1 relative h-full",children:[S.jsx(H4,{}),S.jsxs(Yv,{nodes:x,edges:N,onNodesChange:M,onEdgesChange:z,onNodesDelete:I,onNodeDragStop:V,onConnect:K,onSelectionChange:ee,nodeTypes:L4,edgeTypes:U4,fitView:!0,children:[S.jsx(O3,{color:"#334155",gap:20}),S.jsx(A3,{})]})]})}function q4(){const{isCliMode:t,fetchAvailableFiles:i,setCurrentModel:a,setSchema:r}=wn(),u=!!window.__MODSCAPE_DATA__;return D.useEffect(()=>{if(t){i().then(()=>{const s=new URLSearchParams(window.location.search).get("model");s?a(s):fetch("/api/model").then(h=>h.json()).then(h=>r(h))});return}if(u){const f=window.__MODSCAPE_DATA__;f&&f.isMultiFile&&f.models?i().then(()=>{const h=new URLSearchParams(window.location.search).get("model");h?a(h):(r(f.models[0].schema),a(f.models[0].slug))}):f&&f.schema?r(f.schema):r(f)}},[t,u,i,a,r]),S.jsx(Yd,{children:S.jsxs("div",{className:"flex h-screen w-screen overflow-hidden bg-slate-950 text-slate-100 font-sans",children:[S.jsx(j4,{}),S.jsxs("div",{className:"flex-1 flex flex-col h-full overflow-hidden relative",children:[S.jsx(V4,{}),S.jsx(WT,{})]})]})})}LS.createRoot(document.getElementById("root")).render(S.jsx(D.StrictMode,{children:S.jsx(q4,{})}));
|