leglas 0.4.0 → 0.5.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.md +27 -9
- package/dist/args.d.ts +2 -0
- package/dist/bin.js +797 -147
- package/dist/index.d.ts +1 -1
- package/dist/index.js +796 -147
- package/dist/shell/assets/index-B7_ncDLZ.js +14 -0
- package/dist/shell/assets/index-f2TzxtQm.css +1 -0
- package/dist/shell/index.html +2 -2
- package/package.json +3 -3
- package/dist/shell/assets/index-BQHDjn0q.css +0 -1
- package/dist/shell/assets/index-T-uR7kT7.js +0 -14
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
(function(){const s=document.createElement("link").relList;if(s&&s.supports&&s.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))r(d);new MutationObserver(d=>{for(const y of d)if(y.type==="childList")for(const S of y.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&r(S)}).observe(document,{childList:!0,subtree:!0});function h(d){const y={};return d.integrity&&(y.integrity=d.integrity),d.referrerPolicy&&(y.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?y.credentials="include":d.crossOrigin==="anonymous"?y.credentials="omit":y.credentials="same-origin",y}function r(d){if(d.ep)return;d.ep=!0;const y=h(d);fetch(d.href,y)}})();var mo={exports:{}},Bi={};var d0;function am(){if(d0)return Bi;d0=1;var c=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function h(r,d,y){var S=null;if(y!==void 0&&(S=""+y),d.key!==void 0&&(S=""+d.key),"key"in d){y={};for(var j in d)j!=="key"&&(y[j]=d[j])}else y=d;return d=y.ref,{$$typeof:c,type:r,key:S,ref:d!==void 0?d:null,props:y}}return Bi.Fragment=s,Bi.jsx=h,Bi.jsxs=h,Bi}var h0;function im(){return h0||(h0=1,mo.exports=am()),mo.exports}var o=im(),go={exports:{}},xt={};var m0;function um(){if(m0)return xt;m0=1;var c=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),y=Symbol.for("react.consumer"),S=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),M=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),J=Symbol.iterator;function Q(p){return p===null||typeof p!="object"?null:(p=J&&p[J]||p["@@iterator"],typeof p=="function"?p:null)}var X={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},G=Object.assign,dt={};function ot(p,T,Z){this.props=p,this.context=T,this.refs=dt,this.updater=Z||X}ot.prototype.isReactComponent={},ot.prototype.setState=function(p,T){if(typeof p!="object"&&typeof p!="function"&&p!=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,p,T,"setState")},ot.prototype.forceUpdate=function(p){this.updater.enqueueForceUpdate(this,p,"forceUpdate")};function g(){}g.prototype=ot.prototype;function et(p,T,Z){this.props=p,this.context=T,this.refs=dt,this.updater=Z||X}var ut=et.prototype=new g;ut.constructor=et,G(ut,ot.prototype),ut.isPureReactComponent=!0;var I=Array.isArray;function nt(){}var F={H:null,A:null,T:null,S:null},ct=Object.prototype.hasOwnProperty;function ht(p,T,Z){var V=Z.ref;return{$$typeof:c,type:p,key:T,ref:V!==void 0?V:null,props:Z}}function rt(p,T){return ht(p.type,T,p.props)}function yt(p){return typeof p=="object"&&p!==null&&p.$$typeof===c}function St(p){var T={"=":"=0",":":"=2"};return"$"+p.replace(/[=:]/g,function(Z){return T[Z]})}var wt=/\/+/g;function Nt(p,T){return typeof p=="object"&&p!==null&&p.key!=null?St(""+p.key):T.toString(36)}function Bt(p){switch(p.status){case"fulfilled":return p.value;case"rejected":throw p.reason;default:switch(typeof p.status=="string"?p.then(nt,nt):(p.status="pending",p.then(function(T){p.status==="pending"&&(p.status="fulfilled",p.value=T)},function(T){p.status==="pending"&&(p.status="rejected",p.reason=T)})),p.status){case"fulfilled":return p.value;case"rejected":throw p.reason}}throw p}function D(p,T,Z,V,W){var P=typeof p;(P==="undefined"||P==="boolean")&&(p=null);var st=!1;if(p===null)st=!0;else switch(P){case"bigint":case"string":case"number":st=!0;break;case"object":switch(p.$$typeof){case c:case s:st=!0;break;case q:return st=p._init,D(st(p._payload),T,Z,V,W)}}if(st)return W=W(p),st=V===""?"."+Nt(p,0):V,I(W)?(Z="",st!=null&&(Z=st.replace(wt,"$&/")+"/"),D(W,T,Z,"",function(Wt){return Wt})):W!=null&&(yt(W)&&(W=rt(W,Z+(W.key==null||p&&p.key===W.key?"":(""+W.key).replace(wt,"$&/")+"/")+st)),T.push(W)),1;st=0;var Ot=V===""?".":V+":";if(I(p))for(var Dt=0;Dt<p.length;Dt++)V=p[Dt],P=Ot+Nt(V,Dt),st+=D(V,T,Z,P,W);else if(Dt=Q(p),typeof Dt=="function")for(p=Dt.call(p),Dt=0;!(V=p.next()).done;)V=V.value,P=Ot+Nt(V,Dt++),st+=D(V,T,Z,P,W);else if(P==="object"){if(typeof p.then=="function")return D(Bt(p),T,Z,V,W);throw T=String(p),Error("Objects are not valid as a React child (found: "+(T==="[object Object]"?"object with keys {"+Object.keys(p).join(", ")+"}":T)+"). If you meant to render a collection of children, use an array instead.")}return st}function Y(p,T,Z){if(p==null)return p;var V=[],W=0;return D(p,V,"","",function(P){return T.call(Z,P,W++)}),V}function N(p){if(p._status===-1){var T=p._result;T=T(),T.then(function(Z){(p._status===0||p._status===-1)&&(p._status=1,p._result=Z)},function(Z){(p._status===0||p._status===-1)&&(p._status=2,p._result=Z)}),p._status===-1&&(p._status=0,p._result=T)}if(p._status===1)return p._result.default;throw p._result}var U=typeof reportError=="function"?reportError:function(p){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var T=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof p=="object"&&p!==null&&typeof p.message=="string"?String(p.message):String(p),error:p});if(!window.dispatchEvent(T))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",p);return}console.error(p)},K={map:Y,forEach:function(p,T,Z){Y(p,function(){T.apply(this,arguments)},Z)},count:function(p){var T=0;return Y(p,function(){T++}),T},toArray:function(p){return Y(p,function(T){return T})||[]},only:function(p){if(!yt(p))throw Error("React.Children.only expected to receive a single React element child.");return p}};return xt.Activity=H,xt.Children=K,xt.Component=ot,xt.Fragment=h,xt.Profiler=d,xt.PureComponent=et,xt.StrictMode=r,xt.Suspense=M,xt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,xt.__COMPILER_RUNTIME={__proto__:null,c:function(p){return F.H.useMemoCache(p)}},xt.cache=function(p){return function(){return p.apply(null,arguments)}},xt.cacheSignal=function(){return null},xt.cloneElement=function(p,T,Z){if(p==null)throw Error("The argument must be a React element, but you passed "+p+".");var V=G({},p.props),W=p.key;if(T!=null)for(P in T.key!==void 0&&(W=""+T.key),T)!ct.call(T,P)||P==="key"||P==="__self"||P==="__source"||P==="ref"&&T.ref===void 0||(V[P]=T[P]);var P=arguments.length-2;if(P===1)V.children=Z;else if(1<P){for(var st=Array(P),Ot=0;Ot<P;Ot++)st[Ot]=arguments[Ot+2];V.children=st}return ht(p.type,W,V)},xt.createContext=function(p){return p={$$typeof:S,_currentValue:p,_currentValue2:p,_threadCount:0,Provider:null,Consumer:null},p.Provider=p,p.Consumer={$$typeof:y,_context:p},p},xt.createElement=function(p,T,Z){var V,W={},P=null;if(T!=null)for(V in T.key!==void 0&&(P=""+T.key),T)ct.call(T,V)&&V!=="key"&&V!=="__self"&&V!=="__source"&&(W[V]=T[V]);var st=arguments.length-2;if(st===1)W.children=Z;else if(1<st){for(var Ot=Array(st),Dt=0;Dt<st;Dt++)Ot[Dt]=arguments[Dt+2];W.children=Ot}if(p&&p.defaultProps)for(V in st=p.defaultProps,st)W[V]===void 0&&(W[V]=st[V]);return ht(p,P,W)},xt.createRef=function(){return{current:null}},xt.forwardRef=function(p){return{$$typeof:j,render:p}},xt.isValidElement=yt,xt.lazy=function(p){return{$$typeof:q,_payload:{_status:-1,_result:p},_init:N}},xt.memo=function(p,T){return{$$typeof:x,type:p,compare:T===void 0?null:T}},xt.startTransition=function(p){var T=F.T,Z={};F.T=Z;try{var V=p(),W=F.S;W!==null&&W(Z,V),typeof V=="object"&&V!==null&&typeof V.then=="function"&&V.then(nt,U)}catch(P){U(P)}finally{T!==null&&Z.types!==null&&(T.types=Z.types),F.T=T}},xt.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},xt.use=function(p){return F.H.use(p)},xt.useActionState=function(p,T,Z){return F.H.useActionState(p,T,Z)},xt.useCallback=function(p,T){return F.H.useCallback(p,T)},xt.useContext=function(p){return F.H.useContext(p)},xt.useDebugValue=function(){},xt.useDeferredValue=function(p,T){return F.H.useDeferredValue(p,T)},xt.useEffect=function(p,T){return F.H.useEffect(p,T)},xt.useEffectEvent=function(p){return F.H.useEffectEvent(p)},xt.useId=function(){return F.H.useId()},xt.useImperativeHandle=function(p,T,Z){return F.H.useImperativeHandle(p,T,Z)},xt.useInsertionEffect=function(p,T){return F.H.useInsertionEffect(p,T)},xt.useLayoutEffect=function(p,T){return F.H.useLayoutEffect(p,T)},xt.useMemo=function(p,T){return F.H.useMemo(p,T)},xt.useOptimistic=function(p,T){return F.H.useOptimistic(p,T)},xt.useReducer=function(p,T,Z){return F.H.useReducer(p,T,Z)},xt.useRef=function(p){return F.H.useRef(p)},xt.useState=function(p){return F.H.useState(p)},xt.useSyncExternalStore=function(p,T,Z){return F.H.useSyncExternalStore(p,T,Z)},xt.useTransition=function(){return F.H.useTransition()},xt.version="19.2.8",xt}var g0;function Oo(){return g0||(g0=1,go.exports=um()),go.exports}var z=Oo(),po={exports:{}},Li={},yo={exports:{}},vo={};var p0;function cm(){return p0||(p0=1,(function(c){function s(D,Y){var N=D.length;D.push(Y);t:for(;0<N;){var U=N-1>>>1,K=D[U];if(0<d(K,Y))D[U]=Y,D[N]=K,N=U;else break t}}function h(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Y=D[0],N=D.pop();if(N!==Y){D[0]=N;t:for(var U=0,K=D.length,p=K>>>1;U<p;){var T=2*(U+1)-1,Z=D[T],V=T+1,W=D[V];if(0>d(Z,N))V<K&&0>d(W,Z)?(D[U]=W,D[V]=N,U=V):(D[U]=Z,D[T]=N,U=T);else if(V<K&&0>d(W,N))D[U]=W,D[V]=N,U=V;else break t}}return Y}function d(D,Y){var N=D.sortIndex-Y.sortIndex;return N!==0?N:D.id-Y.id}if(c.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var y=performance;c.unstable_now=function(){return y.now()}}else{var S=Date,j=S.now();c.unstable_now=function(){return S.now()-j}}var M=[],x=[],q=1,H=null,J=3,Q=!1,X=!1,G=!1,dt=!1,ot=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,et=typeof setImmediate<"u"?setImmediate:null;function ut(D){for(var Y=h(x);Y!==null;){if(Y.callback===null)r(x);else if(Y.startTime<=D)r(x),Y.sortIndex=Y.expirationTime,s(M,Y);else break;Y=h(x)}}function I(D){if(G=!1,ut(D),!X)if(h(M)!==null)X=!0,nt||(nt=!0,St());else{var Y=h(x);Y!==null&&Bt(I,Y.startTime-D)}}var nt=!1,F=-1,ct=5,ht=-1;function rt(){return dt?!0:!(c.unstable_now()-ht<ct)}function yt(){if(dt=!1,nt){var D=c.unstable_now();ht=D;var Y=!0;try{t:{X=!1,G&&(G=!1,g(F),F=-1),Q=!0;var N=J;try{e:{for(ut(D),H=h(M);H!==null&&!(H.expirationTime>D&&rt());){var U=H.callback;if(typeof U=="function"){H.callback=null,J=H.priorityLevel;var K=U(H.expirationTime<=D);if(D=c.unstable_now(),typeof K=="function"){H.callback=K,ut(D),Y=!0;break e}H===h(M)&&r(M),ut(D)}else r(M);H=h(M)}if(H!==null)Y=!0;else{var p=h(x);p!==null&&Bt(I,p.startTime-D),Y=!1}}break t}finally{H=null,J=N,Q=!1}Y=void 0}}finally{Y?St():nt=!1}}}var St;if(typeof et=="function")St=function(){et(yt)};else if(typeof MessageChannel<"u"){var wt=new MessageChannel,Nt=wt.port2;wt.port1.onmessage=yt,St=function(){Nt.postMessage(null)}}else St=function(){ot(yt,0)};function Bt(D,Y){F=ot(function(){D(c.unstable_now())},Y)}c.unstable_IdlePriority=5,c.unstable_ImmediatePriority=1,c.unstable_LowPriority=4,c.unstable_NormalPriority=3,c.unstable_Profiling=null,c.unstable_UserBlockingPriority=2,c.unstable_cancelCallback=function(D){D.callback=null},c.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ct=0<D?Math.floor(1e3/D):5},c.unstable_getCurrentPriorityLevel=function(){return J},c.unstable_next=function(D){switch(J){case 1:case 2:case 3:var Y=3;break;default:Y=J}var N=J;J=Y;try{return D()}finally{J=N}},c.unstable_requestPaint=function(){dt=!0},c.unstable_runWithPriority=function(D,Y){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var N=J;J=D;try{return Y()}finally{J=N}},c.unstable_scheduleCallback=function(D,Y,N){var U=c.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?U+N:U):N=U,D){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=N+K,D={id:q++,callback:Y,priorityLevel:D,startTime:N,expirationTime:K,sortIndex:-1},N>U?(D.sortIndex=N,s(x,D),h(M)===null&&D===h(x)&&(G?(g(F),F=-1):G=!0,Bt(I,N-U))):(D.sortIndex=K,s(M,D),X||Q||(X=!0,nt||(nt=!0,St()))),D},c.unstable_shouldYield=rt,c.unstable_wrapCallback=function(D){var Y=J;return function(){var N=J;J=Y;try{return D.apply(this,arguments)}finally{J=N}}}})(vo)),vo}var y0;function sm(){return y0||(y0=1,yo.exports=cm()),yo.exports}var bo={exports:{}},Te={};var v0;function om(){if(v0)return Te;v0=1;var c=Oo();function s(M){var x="https://react.dev/errors/"+M;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var q=2;q<arguments.length;q++)x+="&args[]="+encodeURIComponent(arguments[q])}return"Minified React error #"+M+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(){}var r={d:{f:h,r:function(){throw Error(s(522))},D:h,C:h,L:h,m:h,X:h,S:h,M:h},p:0,findDOMNode:null},d=Symbol.for("react.portal");function y(M,x,q){var H=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:H==null?null:""+H,children:M,containerInfo:x,implementation:q}}var S=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function j(M,x){if(M==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Te.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Te.createPortal=function(M,x){var q=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!x||x.nodeType!==1&&x.nodeType!==9&&x.nodeType!==11)throw Error(s(299));return y(M,x,null,q)},Te.flushSync=function(M){var x=S.T,q=r.p;try{if(S.T=null,r.p=2,M)return M()}finally{S.T=x,r.p=q,r.d.f()}},Te.preconnect=function(M,x){typeof M=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(M,x))},Te.prefetchDNS=function(M){typeof M=="string"&&r.d.D(M)},Te.preinit=function(M,x){if(typeof M=="string"&&x&&typeof x.as=="string"){var q=x.as,H=j(q,x.crossOrigin),J=typeof x.integrity=="string"?x.integrity:void 0,Q=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;q==="style"?r.d.S(M,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:H,integrity:J,fetchPriority:Q}):q==="script"&&r.d.X(M,{crossOrigin:H,integrity:J,fetchPriority:Q,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Te.preinitModule=function(M,x){if(typeof M=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var q=j(x.as,x.crossOrigin);r.d.M(M,{crossOrigin:q,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(M)},Te.preload=function(M,x){if(typeof M=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var q=x.as,H=j(q,x.crossOrigin);r.d.L(M,q,{crossOrigin:H,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0,type:typeof x.type=="string"?x.type:void 0,fetchPriority:typeof x.fetchPriority=="string"?x.fetchPriority:void 0,referrerPolicy:typeof x.referrerPolicy=="string"?x.referrerPolicy:void 0,imageSrcSet:typeof x.imageSrcSet=="string"?x.imageSrcSet:void 0,imageSizes:typeof x.imageSizes=="string"?x.imageSizes:void 0,media:typeof x.media=="string"?x.media:void 0})}},Te.preloadModule=function(M,x){if(typeof M=="string")if(x){var q=j(x.as,x.crossOrigin);r.d.m(M,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:q,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(M)},Te.requestFormReset=function(M){r.d.r(M)},Te.unstable_batchedUpdates=function(M,x){return M(x)},Te.useFormState=function(M,x,q){return S.H.useFormState(M,x,q)},Te.useFormStatus=function(){return S.H.useHostTransitionStatus()},Te.version="19.2.8",Te}var b0;function rm(){if(b0)return bo.exports;b0=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),bo.exports=om(),bo.exports}var x0;function fm(){if(x0)return Li;x0=1;var c=sm(),s=Oo(),h=rm();function r(t){var e="https://react.dev/errors/"+t;if(1<arguments.length){e+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)e+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+t+"; visit "+e+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function y(t){var e=t,l=t;if(t.alternate)for(;e.return;)e=e.return;else{t=e;do e=t,(e.flags&4098)!==0&&(l=e.return),t=e.return;while(t)}return e.tag===3?l:null}function S(t){if(t.tag===13){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function j(t){if(t.tag===31){var e=t.memoizedState;if(e===null&&(t=t.alternate,t!==null&&(e=t.memoizedState)),e!==null)return e.dehydrated}return null}function M(t){if(y(t)!==t)throw Error(r(188))}function x(t){var e=t.alternate;if(!e){if(e=y(t),e===null)throw Error(r(188));return e!==t?null:t}for(var l=t,n=e;;){var a=l.return;if(a===null)break;var i=a.alternate;if(i===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===l)return M(a),t;if(i===n)return M(a),e;i=i.sibling}throw Error(r(188))}if(l.return!==n.return)l=a,n=i;else{for(var u=!1,f=a.child;f;){if(f===l){u=!0,l=a,n=i;break}if(f===n){u=!0,n=a,l=i;break}f=f.sibling}if(!u){for(f=i.child;f;){if(f===l){u=!0,l=i,n=a;break}if(f===n){u=!0,n=i,l=a;break}f=f.sibling}if(!u)throw Error(r(189))}}if(l.alternate!==n)throw Error(r(190))}if(l.tag!==3)throw Error(r(188));return l.stateNode.current===l?t:e}function q(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t;for(t=t.child;t!==null;){if(e=q(t),e!==null)return e;t=t.sibling}return null}var H=Object.assign,J=Symbol.for("react.element"),Q=Symbol.for("react.transitional.element"),X=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),dt=Symbol.for("react.strict_mode"),ot=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),et=Symbol.for("react.context"),ut=Symbol.for("react.forward_ref"),I=Symbol.for("react.suspense"),nt=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),ct=Symbol.for("react.lazy"),ht=Symbol.for("react.activity"),rt=Symbol.for("react.memo_cache_sentinel"),yt=Symbol.iterator;function St(t){return t===null||typeof t!="object"?null:(t=yt&&t[yt]||t["@@iterator"],typeof t=="function"?t:null)}var wt=Symbol.for("react.client.reference");function Nt(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===wt?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case G:return"Fragment";case ot:return"Profiler";case dt:return"StrictMode";case I:return"Suspense";case nt:return"SuspenseList";case ht:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case X:return"Portal";case et:return t.displayName||"Context";case g:return(t._context.displayName||"Context")+".Consumer";case ut:var e=t.render;return t=t.displayName,t||(t=e.displayName||e.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case F:return e=t.displayName||null,e!==null?e:Nt(t.type)||"Memo";case ct:e=t._payload,t=t._init;try{return Nt(t(e))}catch{}}return null}var Bt=Array.isArray,D=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Y=h.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,N={pending:!1,data:null,method:null,action:null},U=[],K=-1;function p(t){return{current:t}}function T(t){0>K||(t.current=U[K],U[K]=null,K--)}function Z(t,e){K++,U[K]=t.current,t.current=e}var V=p(null),W=p(null),P=p(null),st=p(null);function Ot(t,e){switch(Z(P,e),Z(W,t),Z(V,null),e.nodeType){case 9:case 11:t=(t=e.documentElement)&&(t=t.namespaceURI)?Ud(t):0;break;default:if(t=e.tagName,e=e.namespaceURI)e=Ud(e),t=Hd(e,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}T(V),Z(V,t)}function Dt(){T(V),T(W),T(P)}function Wt(t){t.memoizedState!==null&&Z(st,t);var e=V.current,l=Hd(e,t.type);e!==l&&(Z(W,t),Z(V,l))}function Ml(t){W.current===t&&(T(V),T(W)),st.current===t&&(T(st),_i._currentValue=N)}var cn,sn;function ze(t){if(cn===void 0)try{throw Error()}catch(l){var e=l.stack.trim().match(/\n( *(at )?)/);cn=e&&e[1]||"",sn=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+cn+t+sn}var Cl=!1;function wl(t,e){if(!t||Cl)return"";Cl=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={DetermineComponentFrameRoot:function(){try{if(e){var L=function(){throw Error()};if(Object.defineProperty(L.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(L,[])}catch(O){var A=O}Reflect.construct(t,[],L)}else{try{L.call()}catch(O){A=O}t.call(L.prototype)}}else{try{throw Error()}catch(O){A=O}(L=t())&&typeof L.catch=="function"&&L.catch(function(){})}}catch(O){if(O&&A&&typeof O.stack=="string")return[O.stack,A.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=n.DetermineComponentFrameRoot(),u=i[0],f=i[1];if(u&&f){var v=u.split(`
|
|
4
|
+
`),w=f.split(`
|
|
5
|
+
`);for(a=n=0;n<v.length&&!v[n].includes("DetermineComponentFrameRoot");)n++;for(;a<w.length&&!w[a].includes("DetermineComponentFrameRoot");)a++;if(n===v.length||a===w.length)for(n=v.length-1,a=w.length-1;1<=n&&0<=a&&v[n]!==w[a];)a--;for(;1<=n&&0<=a;n--,a--)if(v[n]!==w[a]){if(n!==1||a!==1)do if(n--,a--,0>a||v[n]!==w[a]){var R=`
|
|
6
|
+
`+v[n].replace(" at new "," at ");return t.displayName&&R.includes("<anonymous>")&&(R=R.replace("<anonymous>",t.displayName)),R}while(1<=n&&0<=a);break}}}finally{Cl=!1,Error.prepareStackTrace=l}return(l=t?t.displayName||t.name:"")?ze(l):""}function oe(t,e){switch(t.tag){case 26:case 27:case 5:return ze(t.type);case 16:return ze("Lazy");case 13:return t.child!==e&&e!==null?ze("Suspense Fallback"):ze("Suspense");case 19:return ze("SuspenseList");case 0:case 15:return wl(t.type,!1);case 11:return wl(t.type.render,!1);case 1:return wl(t.type,!0);case 31:return ze("Activity");default:return""}}function gl(t){try{var e="",l=null;do e+=oe(t,l),l=t,t=t.return;while(t);return e}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var Hl=Object.prototype.hasOwnProperty,el=c.unstable_scheduleCallback,Oe=c.unstable_cancelCallback,on=c.unstable_shouldYield,rn=c.unstable_requestPaint,Ee=c.unstable_now,ll=c.unstable_getCurrentPriorityLevel,qn=c.unstable_ImmediatePriority,Bl=c.unstable_UserBlockingPriority,Ze=c.unstable_NormalPriority,ra=c.unstable_LowPriority,fn=c.unstable_IdlePriority,Ll=c.log,kn=c.unstable_setDisableYieldValue,jl=null,xe=null;function Ve(t){if(typeof Ll=="function"&&kn(t),xe&&typeof xe.setStrictMode=="function")try{xe.setStrictMode(jl,t)}catch{}}var $t=Math.clz32?Math.clz32:fa,ql=Math.log,_e=Math.LN2;function fa(t){return t>>>=0,t===0?32:31-(ql(t)/_e|0)|0}var _=256,tt=262144,Et=4194304;function mt(t){var e=t&42;if(e!==0)return e;switch(t&-t){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function bt(t,e,l){var n=t.pendingLanes;if(n===0)return 0;var a=0,i=t.suspendedLanes,u=t.pingedLanes;t=t.warmLanes;var f=n&134217727;return f!==0?(n=f&~i,n!==0?a=mt(n):(u&=f,u!==0?a=mt(u):l||(l=f&~t,l!==0&&(a=mt(l))))):(f=n&~i,f!==0?a=mt(f):u!==0?a=mt(u):l||(l=n&~t,l!==0&&(a=mt(l)))),a===0?0:e!==0&&e!==a&&(e&i)===0&&(i=a&-a,l=e&-e,i>=l||i===32&&(l&4194048)!==0)?e:a}function It(t,e){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&e)===0}function Pt(t,e){switch(t){case 1:case 2:case 4:case 8:case 64:return e+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ie(){var t=Et;return Et<<=1,(Et&62914560)===0&&(Et=4194304),t}function nl(t){for(var e=[],l=0;31>l;l++)e.push(t);return e}function kl(t,e){t.pendingLanes|=e,e!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Al(t,e,l,n,a,i){var u=t.pendingLanes;t.pendingLanes=l,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=l,t.entangledLanes&=l,t.errorRecoveryDisabledLanes&=l,t.shellSuspendCounter=0;var f=t.entanglements,v=t.expirationTimes,w=t.hiddenUpdates;for(l=u&~l;0<l;){var R=31-$t(l),L=1<<R;f[R]=0,v[R]=-1;var A=w[R];if(A!==null)for(w[R]=null,R=0;R<A.length;R++){var O=A[R];O!==null&&(O.lane&=-536870913)}l&=~L}n!==0&&Yi(t,n,0),i!==0&&a===0&&t.tag!==0&&(t.suspendedLanes|=i&~(u&~e))}function Yi(t,e,l){t.pendingLanes|=e,t.suspendedLanes&=~e;var n=31-$t(e);t.entangledLanes|=e,t.entanglements[n]=t.entanglements[n]|1073741824|l&261930}function Gi(t,e){var l=t.entangledLanes|=e;for(t=t.entanglements;l;){var n=31-$t(l),a=1<<n;a&e|t[n]&e&&(t[n]|=e),l&=~a}}function Be(t,e){var l=e&-e;return l=(l&42)!==0?1:da(l),(l&(t.suspendedLanes|e))!==0?0:l}function da(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function pl(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Xi(){var t=Y.p;return t!==0?t:(t=window.event,t===void 0?32:i0(t.type))}function Yn(t,e){var l=Y.p;try{return Y.p=t,e()}finally{Y.p=l}}var Nl=Math.random().toString(36).slice(2),ye="__reactFiber$"+Nl,De="__reactProps$"+Nl,Le="__reactContainer$"+Nl,Gn="__reactEvents$"+Nl,Dl="__reactListeners$"+Nl,sc="__reactHandles$"+Nl,Qi="__reactResources$"+Nl,dn="__reactMarker$"+Nl;function Za(t){delete t[ye],delete t[De],delete t[Gn],delete t[Dl],delete t[sc]}function Ke(t){var e=t[ye];if(e)return e;for(var l=t.parentNode;l;){if(e=l[Le]||l[ye]){if(l=e.alternate,e.child!==null||l!==null&&l.child!==null)for(t=Xd(t);t!==null;){if(l=t[ye])return l;t=Xd(t)}return e}t=l,l=t.parentNode}return null}function Yt(t){if(t=t[ye]||t[Le]){var e=t.tag;if(e===5||e===6||e===13||e===31||e===26||e===27||e===3)return t}return null}function ve(t){var e=t.tag;if(e===5||e===26||e===27||e===6)return t.stateNode;throw Error(r(33))}function Tl(t){var e=t[Qi];return e||(e=t[Qi]={hoistableStyles:new Map,hoistableScripts:new Map}),e}function re(t){t[dn]=!0}var vt=new Set,Zi={};function zl(t,e){yl(t,e),yl(t+"Capture",e)}function yl(t,e){for(Zi[t]=e,t=0;t<e.length;t++)vt.add(e[t])}var oc=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]*$"),Va={},ha={};function rc(t){return Hl.call(ha,t)?!0:Hl.call(Va,t)?!1:oc.test(t)?ha[t]=!0:(Va[t]=!0,!1)}function ma(t,e,l){if(rc(e))if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":t.removeAttribute(e);return;case"boolean":var n=e.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){t.removeAttribute(e);return}}t.setAttribute(e,""+l)}}function Xn(t,e,l){if(l===null)t.removeAttribute(e);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(e);return}t.setAttribute(e,""+l)}}function vl(t,e,l,n){if(n===null)t.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(l);return}t.setAttributeNS(e,l,""+n)}}function Re(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ga(t){var e=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function Ka(t,e,l){var n=Object.getOwnPropertyDescriptor(t.constructor.prototype,e);if(!t.hasOwnProperty(e)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,i=n.set;return Object.defineProperty(t,e,{configurable:!0,get:function(){return a.call(this)},set:function(u){l=""+u,i.call(this,u)}}),Object.defineProperty(t,e,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(u){l=""+u},stopTracking:function(){t._valueTracker=null,delete t[e]}}}}function Yl(t){if(!t._valueTracker){var e=ga(t)?"checked":"value";t._valueTracker=Ka(t,e,""+t[e])}}function Gl(t){if(!t)return!1;var e=t._valueTracker;if(!e)return!0;var l=e.getValue(),n="";return t&&(n=ga(t)?t.checked?"true":"false":t.value),t=n,t!==l?(e.setValue(t),!0):!1}function Qn(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var fc=/[\n"\\]/g;function ue(t){return t.replace(fc,function(e){return"\\"+e.charCodeAt(0).toString(16)+" "})}function Ja(t,e,l,n,a,i,u,f){t.name="",u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"?t.type=u:t.removeAttribute("type"),e!=null?u==="number"?(e===0&&t.value===""||t.value!=e)&&(t.value=""+Re(e)):t.value!==""+Re(e)&&(t.value=""+Re(e)):u!=="submit"&&u!=="reset"||t.removeAttribute("value"),e!=null?$a(t,u,Re(e)):l!=null?$a(t,u,Re(l)):n!=null&&t.removeAttribute("value"),a==null&&i!=null&&(t.defaultChecked=!!i),a!=null&&(t.checked=a&&typeof a!="function"&&typeof a!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?t.name=""+Re(f):t.removeAttribute("name")}function Vi(t,e,l,n,a,i,u,f){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(t.type=i),e!=null||l!=null){if(!(i!=="submit"&&i!=="reset"||e!=null)){Yl(t);return}l=l!=null?""+Re(l):"",e=e!=null?""+Re(e):l,f||e===t.value||(t.value=e),t.defaultValue=e}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,t.checked=f?t.checked:!!n,t.defaultChecked=!!n,u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(t.name=u),Yl(t)}function $a(t,e,l){e==="number"&&Qn(t.ownerDocument)===t||t.defaultValue===""+l||(t.defaultValue=""+l)}function hn(t,e,l,n){if(t=t.options,e){e={};for(var a=0;a<l.length;a++)e["$"+l[a]]=!0;for(l=0;l<t.length;l++)a=e.hasOwnProperty("$"+t[l].value),t[l].selected!==a&&(t[l].selected=a),a&&n&&(t[l].defaultSelected=!0)}else{for(l=""+Re(l),e=null,a=0;a<t.length;a++){if(t[a].value===l){t[a].selected=!0,n&&(t[a].defaultSelected=!0);return}e!==null||t[a].disabled||(e=t[a])}e!==null&&(e.selected=!0)}}function Ki(t,e,l){if(e!=null&&(e=""+Re(e),e!==t.value&&(t.value=e),l==null)){t.defaultValue!==e&&(t.defaultValue=e);return}t.defaultValue=l!=null?""+Re(l):""}function Fa(t,e,l,n){if(e==null){if(n!=null){if(l!=null)throw Error(r(92));if(Bt(n)){if(1<n.length)throw Error(r(93));n=n[0]}l=n}l==null&&(l=""),e=l}l=Re(e),t.defaultValue=l,n=t.textContent,n===l&&n!==""&&n!==null&&(t.value=n),Yl(t)}function mn(t,e){if(e){var l=t.firstChild;if(l&&l===t.lastChild&&l.nodeType===3){l.nodeValue=e;return}}t.textContent=e}var dc=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 Ji(t,e,l){var n=e.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?t.setProperty(e,""):e==="float"?t.cssFloat="":t[e]="":n?t.setProperty(e,l):typeof l!="number"||l===0||dc.has(e)?e==="float"?t.cssFloat=l:t[e]=(""+l).trim():t[e]=l+"px"}function $i(t,e,l){if(e!=null&&typeof e!="object")throw Error(r(62));if(t=t.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||e!=null&&e.hasOwnProperty(n)||(n.indexOf("--")===0?t.setProperty(n,""):n==="float"?t.cssFloat="":t[n]="");for(var a in e)n=e[a],e.hasOwnProperty(a)&&l[a]!==n&&Ji(t,a,n)}else for(var i in e)e.hasOwnProperty(i)&&Ji(t,i,e[i])}function m(t){if(t.indexOf("-")===-1)return!1;switch(t){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var k=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"]]),$=/^[\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 lt(t){return $.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function at(){}var jt=null;function At(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var Ht=null,Qt=null;function fe(t){var e=Yt(t);if(e&&(t=e.stateNode)){var l=t[De]||null;t:switch(t=e.stateNode,e.type){case"input":if(Ja(t,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),e=l.name,l.type==="radio"&&e!=null){for(l=t;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+ue(""+e)+'"][type="radio"]'),e=0;e<l.length;e++){var n=l[e];if(n!==t&&n.form===t.form){var a=n[De]||null;if(!a)throw Error(r(90));Ja(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(e=0;e<l.length;e++)n=l[e],n.form===t.form&&Gl(n)}break t;case"textarea":Ki(t,l.value,l.defaultValue);break t;case"select":e=l.value,e!=null&&hn(t,!!l.multiple,e,!1)}}}var de=!1;function Ue(t,e,l){if(de)return t(e,l);de=!0;try{var n=t(e);return n}finally{if(de=!1,(Ht!==null||Qt!==null)&&(Hu(),Ht&&(e=Ht,t=Qt,Qt=Ht=null,fe(e),t)))for(e=0;e<t.length;e++)fe(t[e])}}function Zt(t,e){var l=t.stateNode;if(l===null)return null;var n=l[De]||null;if(n===null)return null;l=n[e];t:switch(e){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(n=!n.disabled)||(t=t.type,n=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!n;break t;default:t=!1}if(t)return null;if(l&&typeof l!="function")throw Error(r(231,e,typeof l));return l}var bl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),hc=!1;if(bl)try{var Wa={};Object.defineProperty(Wa,"passive",{get:function(){hc=!0}}),window.addEventListener("test",Wa,Wa),window.removeEventListener("test",Wa,Wa)}catch{hc=!1}var gn=null,mc=null,Fi=null;function Uo(){if(Fi)return Fi;var t,e=mc,l=e.length,n,a="value"in gn?gn.value:gn.textContent,i=a.length;for(t=0;t<l&&e[t]===a[t];t++);var u=l-t;for(n=1;n<=u&&e[l-n]===a[i-n];n++);return Fi=a.slice(t,1<n?1-n:void 0)}function Wi(t){var e=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&e===13&&(t=13)):t=e,t===10&&(t=13),32<=t||t===13?t:0}function Ii(){return!0}function Ho(){return!1}function qe(t){function e(l,n,a,i,u){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=i,this.target=u,this.currentTarget=null;for(var f in t)t.hasOwnProperty(f)&&(l=t[f],this[f]=l?l(i):i[f]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Ii:Ho,this.isPropagationStopped=Ho,this}return H(e.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Ii)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Ii)},persist:function(){},isPersistent:Ii}),e}var Zn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Pi=qe(Zn),Ia=H({},Zn,{view:0,detail:0}),l1=qe(Ia),gc,pc,Pa,tu=H({},Ia,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:vc,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Pa&&(Pa&&t.type==="mousemove"?(gc=t.screenX-Pa.screenX,pc=t.screenY-Pa.screenY):pc=gc=0,Pa=t),gc)},movementY:function(t){return"movementY"in t?t.movementY:pc}}),Bo=qe(tu),n1=H({},tu,{dataTransfer:0}),a1=qe(n1),i1=H({},Ia,{relatedTarget:0}),yc=qe(i1),u1=H({},Zn,{animationName:0,elapsedTime:0,pseudoElement:0}),c1=qe(u1),s1=H({},Zn,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),o1=qe(s1),r1=H({},Zn,{data:0}),Lo=qe(r1),f1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},d1={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"},h1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function m1(t){var e=this.nativeEvent;return e.getModifierState?e.getModifierState(t):(t=h1[t])?!!e[t]:!1}function vc(){return m1}var g1=H({},Ia,{key:function(t){if(t.key){var e=f1[t.key]||t.key;if(e!=="Unidentified")return e}return t.type==="keypress"?(t=Wi(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?d1[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:vc,charCode:function(t){return t.type==="keypress"?Wi(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?Wi(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),p1=qe(g1),y1=H({},tu,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qo=qe(y1),v1=H({},Ia,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:vc}),b1=qe(v1),x1=H({},Zn,{propertyName:0,elapsedTime:0,pseudoElement:0}),S1=qe(x1),E1=H({},tu,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),M1=qe(E1),C1=H({},Zn,{newState:0,oldState:0}),w1=qe(C1),j1=[9,13,27,32],bc=bl&&"CompositionEvent"in window,ti=null;bl&&"documentMode"in document&&(ti=document.documentMode);var A1=bl&&"TextEvent"in window&&!ti,ko=bl&&(!bc||ti&&8<ti&&11>=ti),Yo=" ",Go=!1;function Xo(t,e){switch(t){case"keyup":return j1.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qo(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var pa=!1;function N1(t,e){switch(t){case"compositionend":return Qo(e);case"keypress":return e.which!==32?null:(Go=!0,Yo);case"textInput":return t=e.data,t===Yo&&Go?null:t;default:return null}}function D1(t,e){if(pa)return t==="compositionend"||!bc&&Xo(t,e)?(t=Uo(),Fi=mc=gn=null,pa=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1<e.char.length)return e.char;if(e.which)return String.fromCharCode(e.which)}return null;case"compositionend":return ko&&e.locale!=="ko"?null:e.data;default:return null}}var T1={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 Zo(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e==="input"?!!T1[t.type]:e==="textarea"}function Vo(t,e,l,n){Ht?Qt?Qt.push(n):Qt=[n]:Ht=n,e=Xu(e,"onChange"),0<e.length&&(l=new Pi("onChange","change",null,l,n),t.push({event:l,listeners:e}))}var ei=null,li=null;function z1(t){Dd(t,0)}function eu(t){var e=ve(t);if(Gl(e))return t}function Ko(t,e){if(t==="change")return e}var Jo=!1;if(bl){var xc;if(bl){var Sc="oninput"in document;if(!Sc){var $o=document.createElement("div");$o.setAttribute("oninput","return;"),Sc=typeof $o.oninput=="function"}xc=Sc}else xc=!1;Jo=xc&&(!document.documentMode||9<document.documentMode)}function Fo(){ei&&(ei.detachEvent("onpropertychange",Wo),li=ei=null)}function Wo(t){if(t.propertyName==="value"&&eu(li)){var e=[];Vo(e,li,t,At(t)),Ue(z1,e)}}function O1(t,e,l){t==="focusin"?(Fo(),ei=e,li=l,ei.attachEvent("onpropertychange",Wo)):t==="focusout"&&Fo()}function _1(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return eu(li)}function R1(t,e){if(t==="click")return eu(e)}function U1(t,e){if(t==="input"||t==="change")return eu(e)}function H1(t,e){return t===e&&(t!==0||1/t===1/e)||t!==t&&e!==e}var Je=typeof Object.is=="function"?Object.is:H1;function ni(t,e){if(Je(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;var l=Object.keys(t),n=Object.keys(e);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!Hl.call(e,a)||!Je(t[a],e[a]))return!1}return!0}function Io(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Po(t,e){var l=Io(t);t=0;for(var n;l;){if(l.nodeType===3){if(n=t+l.textContent.length,t<=e&&n>=e)return{node:l,offset:e-t};t=n}t:{for(;l;){if(l.nextSibling){l=l.nextSibling;break t}l=l.parentNode}l=void 0}l=Io(l)}}function tr(t,e){return t&&e?t===e?!0:t&&t.nodeType===3?!1:e&&e.nodeType===3?tr(t,e.parentNode):"contains"in t?t.contains(e):t.compareDocumentPosition?!!(t.compareDocumentPosition(e)&16):!1:!1}function er(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var e=Qn(t.document);e instanceof t.HTMLIFrameElement;){try{var l=typeof e.contentWindow.location.href=="string"}catch{l=!1}if(l)t=e.contentWindow;else break;e=Qn(t.document)}return e}function Ec(t){var e=t&&t.nodeName&&t.nodeName.toLowerCase();return e&&(e==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||e==="textarea"||t.contentEditable==="true")}var B1=bl&&"documentMode"in document&&11>=document.documentMode,ya=null,Mc=null,ai=null,Cc=!1;function lr(t,e,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Cc||ya==null||ya!==Qn(n)||(n=ya,"selectionStart"in n&&Ec(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),ai&&ni(ai,n)||(ai=n,n=Xu(Mc,"onSelect"),0<n.length&&(e=new Pi("onSelect","select",null,e,l),t.push({event:e,listeners:n}),e.target=ya)))}function Vn(t,e){var l={};return l[t.toLowerCase()]=e.toLowerCase(),l["Webkit"+t]="webkit"+e,l["Moz"+t]="moz"+e,l}var va={animationend:Vn("Animation","AnimationEnd"),animationiteration:Vn("Animation","AnimationIteration"),animationstart:Vn("Animation","AnimationStart"),transitionrun:Vn("Transition","TransitionRun"),transitionstart:Vn("Transition","TransitionStart"),transitioncancel:Vn("Transition","TransitionCancel"),transitionend:Vn("Transition","TransitionEnd")},wc={},nr={};bl&&(nr=document.createElement("div").style,"AnimationEvent"in window||(delete va.animationend.animation,delete va.animationiteration.animation,delete va.animationstart.animation),"TransitionEvent"in window||delete va.transitionend.transition);function Kn(t){if(wc[t])return wc[t];if(!va[t])return t;var e=va[t],l;for(l in e)if(e.hasOwnProperty(l)&&l in nr)return wc[t]=e[l];return t}var ar=Kn("animationend"),ir=Kn("animationiteration"),ur=Kn("animationstart"),L1=Kn("transitionrun"),q1=Kn("transitionstart"),k1=Kn("transitioncancel"),cr=Kn("transitionend"),sr=new Map,jc="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(" ");jc.push("scrollEnd");function xl(t,e){sr.set(t,e),zl(e,[t])}var lu=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var e=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(e))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},al=[],ba=0,Ac=0;function nu(){for(var t=ba,e=Ac=ba=0;e<t;){var l=al[e];al[e++]=null;var n=al[e];al[e++]=null;var a=al[e];al[e++]=null;var i=al[e];if(al[e++]=null,n!==null&&a!==null){var u=n.pending;u===null?a.next=a:(a.next=u.next,u.next=a),n.pending=a}i!==0&&or(l,a,i)}}function au(t,e,l,n){al[ba++]=t,al[ba++]=e,al[ba++]=l,al[ba++]=n,Ac|=n,t.lanes|=n,t=t.alternate,t!==null&&(t.lanes|=n)}function Nc(t,e,l,n){return au(t,e,l,n),iu(t)}function Jn(t,e){return au(t,null,null,e),iu(t)}function or(t,e,l){t.lanes|=l;var n=t.alternate;n!==null&&(n.lanes|=l);for(var a=!1,i=t.return;i!==null;)i.childLanes|=l,n=i.alternate,n!==null&&(n.childLanes|=l),i.tag===22&&(t=i.stateNode,t===null||t._visibility&1||(a=!0)),t=i,i=i.return;return t.tag===3?(i=t.stateNode,a&&e!==null&&(a=31-$t(l),t=i.hiddenUpdates,n=t[a],n===null?t[a]=[e]:n.push(e),e.lane=l|536870912),i):null}function iu(t){if(50<ji)throw ji=0,Bs=null,Error(r(185));for(var e=t.return;e!==null;)t=e,e=t.return;return t.tag===3?t.stateNode:null}var xa={};function Y1(t,e,l,n){this.tag=t,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=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $e(t,e,l,n){return new Y1(t,e,l,n)}function Dc(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Xl(t,e){var l=t.alternate;return l===null?(l=$e(t.tag,e,t.key,t.mode),l.elementType=t.elementType,l.type=t.type,l.stateNode=t.stateNode,l.alternate=t,t.alternate=l):(l.pendingProps=e,l.type=t.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=t.flags&65011712,l.childLanes=t.childLanes,l.lanes=t.lanes,l.child=t.child,l.memoizedProps=t.memoizedProps,l.memoizedState=t.memoizedState,l.updateQueue=t.updateQueue,e=t.dependencies,l.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},l.sibling=t.sibling,l.index=t.index,l.ref=t.ref,l.refCleanup=t.refCleanup,l}function rr(t,e){t.flags&=65011714;var l=t.alternate;return l===null?(t.childLanes=0,t.lanes=e,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=l.childLanes,t.lanes=l.lanes,t.child=l.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=l.memoizedProps,t.memoizedState=l.memoizedState,t.updateQueue=l.updateQueue,t.type=l.type,e=l.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),t}function uu(t,e,l,n,a,i){var u=0;if(n=t,typeof t=="function")Dc(t)&&(u=1);else if(typeof t=="string")u=Vh(t,l,V.current)?26:t==="html"||t==="head"||t==="body"?27:5;else t:switch(t){case ht:return t=$e(31,l,e,a),t.elementType=ht,t.lanes=i,t;case G:return $n(l.children,a,i,e);case dt:u=8,a|=24;break;case ot:return t=$e(12,l,e,a|2),t.elementType=ot,t.lanes=i,t;case I:return t=$e(13,l,e,a),t.elementType=I,t.lanes=i,t;case nt:return t=$e(19,l,e,a),t.elementType=nt,t.lanes=i,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case et:u=10;break t;case g:u=9;break t;case ut:u=11;break t;case F:u=14;break t;case ct:u=16,n=null;break t}u=29,l=Error(r(130,t===null?"null":typeof t,"")),n=null}return e=$e(u,l,e,a),e.elementType=t,e.type=n,e.lanes=i,e}function $n(t,e,l,n){return t=$e(7,t,n,e),t.lanes=l,t}function Tc(t,e,l){return t=$e(6,t,null,e),t.lanes=l,t}function fr(t){var e=$e(18,null,null,0);return e.stateNode=t,e}function zc(t,e,l){return e=$e(4,t.children!==null?t.children:[],t.key,e),e.lanes=l,e.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},e}var dr=new WeakMap;function il(t,e){if(typeof t=="object"&&t!==null){var l=dr.get(t);return l!==void 0?l:(e={value:t,source:e,stack:gl(e)},dr.set(t,e),e)}return{value:t,source:e,stack:gl(e)}}var Sa=[],Ea=0,cu=null,ii=0,ul=[],cl=0,pn=null,Ol=1,_l="";function Ql(t,e){Sa[Ea++]=ii,Sa[Ea++]=cu,cu=t,ii=e}function hr(t,e,l){ul[cl++]=Ol,ul[cl++]=_l,ul[cl++]=pn,pn=t;var n=Ol;t=_l;var a=32-$t(n)-1;n&=~(1<<a),l+=1;var i=32-$t(e)+a;if(30<i){var u=a-a%5;i=(n&(1<<u)-1).toString(32),n>>=u,a-=u,Ol=1<<32-$t(e)+a|l<<a|n,_l=i+t}else Ol=1<<i|l<<a|n,_l=t}function Oc(t){t.return!==null&&(Ql(t,1),hr(t,1,0))}function _c(t){for(;t===cu;)cu=Sa[--Ea],Sa[Ea]=null,ii=Sa[--Ea],Sa[Ea]=null;for(;t===pn;)pn=ul[--cl],ul[cl]=null,_l=ul[--cl],ul[cl]=null,Ol=ul[--cl],ul[cl]=null}function mr(t,e){ul[cl++]=Ol,ul[cl++]=_l,ul[cl++]=pn,Ol=e.id,_l=e.overflow,pn=t}var Me=null,te=null,Ut=!1,yn=null,sl=!1,Rc=Error(r(519));function vn(t){var e=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ui(il(e,t)),Rc}function gr(t){var e=t.stateNode,l=t.type,n=t.memoizedProps;switch(e[ye]=t,e[De]=n,l){case"dialog":zt("cancel",e),zt("close",e);break;case"iframe":case"object":case"embed":zt("load",e);break;case"video":case"audio":for(l=0;l<Ni.length;l++)zt(Ni[l],e);break;case"source":zt("error",e);break;case"img":case"image":case"link":zt("error",e),zt("load",e);break;case"details":zt("toggle",e);break;case"input":zt("invalid",e),Vi(e,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":zt("invalid",e);break;case"textarea":zt("invalid",e),Fa(e,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||e.textContent===""+l||n.suppressHydrationWarning===!0||_d(e.textContent,l)?(n.popover!=null&&(zt("beforetoggle",e),zt("toggle",e)),n.onScroll!=null&&zt("scroll",e),n.onScrollEnd!=null&&zt("scrollend",e),n.onClick!=null&&(e.onclick=at),e=!0):e=!1,e||vn(t,!0)}function pr(t){for(Me=t.return;Me;)switch(Me.tag){case 5:case 31:case 13:sl=!1;return;case 27:case 3:sl=!0;return;default:Me=Me.return}}function Ma(t){if(t!==Me)return!1;if(!Ut)return pr(t),Ut=!0,!1;var e=t.tag,l;if((l=e!==3&&e!==27)&&((l=e===5)&&(l=t.type,l=!(l!=="form"&&l!=="button")||Is(t.type,t.memoizedProps)),l=!l),l&&te&&vn(t),pr(t),e===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));te=Gd(t)}else if(e===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(317));te=Gd(t)}else e===27?(e=te,On(t.type)?(t=no,no=null,te=t):te=e):te=Me?rl(t.stateNode.nextSibling):null;return!0}function Fn(){te=Me=null,Ut=!1}function Uc(){var t=yn;return t!==null&&(Xe===null?Xe=t:Xe.push.apply(Xe,t),yn=null),t}function ui(t){yn===null?yn=[t]:yn.push(t)}var Hc=p(null),Wn=null,Zl=null;function bn(t,e,l){Z(Hc,e._currentValue),e._currentValue=l}function Vl(t){t._currentValue=Hc.current,T(Hc)}function Bc(t,e,l){for(;t!==null;){var n=t.alternate;if((t.childLanes&e)!==e?(t.childLanes|=e,n!==null&&(n.childLanes|=e)):n!==null&&(n.childLanes&e)!==e&&(n.childLanes|=e),t===l)break;t=t.return}}function Lc(t,e,l,n){var a=t.child;for(a!==null&&(a.return=t);a!==null;){var i=a.dependencies;if(i!==null){var u=a.child;i=i.firstContext;t:for(;i!==null;){var f=i;i=a;for(var v=0;v<e.length;v++)if(f.context===e[v]){i.lanes|=l,f=i.alternate,f!==null&&(f.lanes|=l),Bc(i.return,l,t),n||(u=null);break t}i=f.next}}else if(a.tag===18){if(u=a.return,u===null)throw Error(r(341));u.lanes|=l,i=u.alternate,i!==null&&(i.lanes|=l),Bc(u,l,t),u=null}else u=a.child;if(u!==null)u.return=a;else for(u=a;u!==null;){if(u===t){u=null;break}if(a=u.sibling,a!==null){a.return=u.return,u=a;break}u=u.return}a=u}}function Ca(t,e,l,n){t=null;for(var a=e,i=!1;a!==null;){if(!i){if((a.flags&524288)!==0)i=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var u=a.alternate;if(u===null)throw Error(r(387));if(u=u.memoizedProps,u!==null){var f=a.type;Je(a.pendingProps.value,u.value)||(t!==null?t.push(f):t=[f])}}else if(a===st.current){if(u=a.alternate,u===null)throw Error(r(387));u.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(t!==null?t.push(_i):t=[_i])}a=a.return}t!==null&&Lc(e,t,l,n),e.flags|=262144}function su(t){for(t=t.firstContext;t!==null;){if(!Je(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function In(t){Wn=t,Zl=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function Ce(t){return yr(Wn,t)}function ou(t,e){return Wn===null&&In(t),yr(t,e)}function yr(t,e){var l=e._currentValue;if(e={context:e,memoizedValue:l,next:null},Zl===null){if(t===null)throw Error(r(308));Zl=e,t.dependencies={lanes:0,firstContext:e},t.flags|=524288}else Zl=Zl.next=e;return l}var G1=typeof AbortController<"u"?AbortController:function(){var t=[],e=this.signal={aborted:!1,addEventListener:function(l,n){t.push(n)}};this.abort=function(){e.aborted=!0,t.forEach(function(l){return l()})}},X1=c.unstable_scheduleCallback,Q1=c.unstable_NormalPriority,he={$$typeof:et,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function qc(){return{controller:new G1,data:new Map,refCount:0}}function ci(t){t.refCount--,t.refCount===0&&X1(Q1,function(){t.controller.abort()})}var si=null,kc=0,wa=0,ja=null;function Z1(t,e){if(si===null){var l=si=[];kc=0,wa=Xs(),ja={status:"pending",value:void 0,then:function(n){l.push(n)}}}return kc++,e.then(vr,vr),e}function vr(){if(--kc===0&&si!==null){ja!==null&&(ja.status="fulfilled");var t=si;si=null,wa=0,ja=null;for(var e=0;e<t.length;e++)(0,t[e])()}}function V1(t,e){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return t.then(function(){n.status="fulfilled",n.value=e;for(var a=0;a<l.length;a++)(0,l[a])(e)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var br=D.S;D.S=function(t,e){nd=Ee(),typeof e=="object"&&e!==null&&typeof e.then=="function"&&Z1(t,e),br!==null&&br(t,e)};var Pn=p(null);function Yc(){var t=Pn.current;return t!==null?t:Ft.pooledCache}function ru(t,e){e===null?Z(Pn,Pn.current):Z(Pn,e.pool)}function xr(){var t=Yc();return t===null?null:{parent:he._currentValue,pool:t}}var Aa=Error(r(460)),Gc=Error(r(474)),fu=Error(r(542)),du={then:function(){}};function Sr(t){return t=t.status,t==="fulfilled"||t==="rejected"}function Er(t,e,l){switch(l=t[l],l===void 0?t.push(e):l!==e&&(e.then(at,at),e=l),e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Cr(t),t;default:if(typeof e.status=="string")e.then(at,at);else{if(t=Ft,t!==null&&100<t.shellSuspendCounter)throw Error(r(482));t=e,t.status="pending",t.then(function(n){if(e.status==="pending"){var a=e;a.status="fulfilled",a.value=n}},function(n){if(e.status==="pending"){var a=e;a.status="rejected",a.reason=n}})}switch(e.status){case"fulfilled":return e.value;case"rejected":throw t=e.reason,Cr(t),t}throw ea=e,Aa}}function ta(t){try{var e=t._init;return e(t._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ea=l,Aa):l}}var ea=null;function Mr(){if(ea===null)throw Error(r(459));var t=ea;return ea=null,t}function Cr(t){if(t===Aa||t===fu)throw Error(r(483))}var Na=null,oi=0;function hu(t){var e=oi;return oi+=1,Na===null&&(Na=[]),Er(Na,t,e)}function ri(t,e){e=e.props.ref,t.ref=e!==void 0?e:null}function mu(t,e){throw e.$$typeof===J?Error(r(525)):(t=Object.prototype.toString.call(e),Error(r(31,t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)))}function wr(t){function e(E,b){if(t){var C=E.deletions;C===null?(E.deletions=[b],E.flags|=16):C.push(b)}}function l(E,b){if(!t)return null;for(;b!==null;)e(E,b),b=b.sibling;return null}function n(E){for(var b=new Map;E!==null;)E.key!==null?b.set(E.key,E):b.set(E.index,E),E=E.sibling;return b}function a(E,b){return E=Xl(E,b),E.index=0,E.sibling=null,E}function i(E,b,C){return E.index=C,t?(C=E.alternate,C!==null?(C=C.index,C<b?(E.flags|=67108866,b):C):(E.flags|=67108866,b)):(E.flags|=1048576,b)}function u(E){return t&&E.alternate===null&&(E.flags|=67108866),E}function f(E,b,C,B){return b===null||b.tag!==6?(b=Tc(C,E.mode,B),b.return=E,b):(b=a(b,C),b.return=E,b)}function v(E,b,C,B){var gt=C.type;return gt===G?R(E,b,C.props.children,B,C.key):b!==null&&(b.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===ct&&ta(gt)===b.type)?(b=a(b,C.props),ri(b,C),b.return=E,b):(b=uu(C.type,C.key,C.props,null,E.mode,B),ri(b,C),b.return=E,b)}function w(E,b,C,B){return b===null||b.tag!==4||b.stateNode.containerInfo!==C.containerInfo||b.stateNode.implementation!==C.implementation?(b=zc(C,E.mode,B),b.return=E,b):(b=a(b,C.children||[]),b.return=E,b)}function R(E,b,C,B,gt){return b===null||b.tag!==7?(b=$n(C,E.mode,B,gt),b.return=E,b):(b=a(b,C),b.return=E,b)}function L(E,b,C){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=Tc(""+b,E.mode,C),b.return=E,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case Q:return C=uu(b.type,b.key,b.props,null,E.mode,C),ri(C,b),C.return=E,C;case X:return b=zc(b,E.mode,C),b.return=E,b;case ct:return b=ta(b),L(E,b,C)}if(Bt(b)||St(b))return b=$n(b,E.mode,C,null),b.return=E,b;if(typeof b.then=="function")return L(E,hu(b),C);if(b.$$typeof===et)return L(E,ou(E,b),C);mu(E,b)}return null}function A(E,b,C,B){var gt=b!==null?b.key:null;if(typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint")return gt!==null?null:f(E,b,""+C,B);if(typeof C=="object"&&C!==null){switch(C.$$typeof){case Q:return C.key===gt?v(E,b,C,B):null;case X:return C.key===gt?w(E,b,C,B):null;case ct:return C=ta(C),A(E,b,C,B)}if(Bt(C)||St(C))return gt!==null?null:R(E,b,C,B,null);if(typeof C.then=="function")return A(E,b,hu(C),B);if(C.$$typeof===et)return A(E,b,ou(E,C),B);mu(E,C)}return null}function O(E,b,C,B,gt){if(typeof B=="string"&&B!==""||typeof B=="number"||typeof B=="bigint")return E=E.get(C)||null,f(b,E,""+B,gt);if(typeof B=="object"&&B!==null){switch(B.$$typeof){case Q:return E=E.get(B.key===null?C:B.key)||null,v(b,E,B,gt);case X:return E=E.get(B.key===null?C:B.key)||null,w(b,E,B,gt);case ct:return B=ta(B),O(E,b,C,B,gt)}if(Bt(B)||St(B))return E=E.get(C)||null,R(b,E,B,gt,null);if(typeof B.then=="function")return O(E,b,C,hu(B),gt);if(B.$$typeof===et)return O(E,b,C,ou(b,B),gt);mu(b,B)}return null}function it(E,b,C,B){for(var gt=null,Lt=null,ft=b,Ct=b=0,Rt=null;ft!==null&&Ct<C.length;Ct++){ft.index>Ct?(Rt=ft,ft=null):Rt=ft.sibling;var qt=A(E,ft,C[Ct],B);if(qt===null){ft===null&&(ft=Rt);break}t&&ft&&qt.alternate===null&&e(E,ft),b=i(qt,b,Ct),Lt===null?gt=qt:Lt.sibling=qt,Lt=qt,ft=Rt}if(Ct===C.length)return l(E,ft),Ut&&Ql(E,Ct),gt;if(ft===null){for(;Ct<C.length;Ct++)ft=L(E,C[Ct],B),ft!==null&&(b=i(ft,b,Ct),Lt===null?gt=ft:Lt.sibling=ft,Lt=ft);return Ut&&Ql(E,Ct),gt}for(ft=n(ft);Ct<C.length;Ct++)Rt=O(ft,E,Ct,C[Ct],B),Rt!==null&&(t&&Rt.alternate!==null&&ft.delete(Rt.key===null?Ct:Rt.key),b=i(Rt,b,Ct),Lt===null?gt=Rt:Lt.sibling=Rt,Lt=Rt);return t&&ft.forEach(function(Bn){return e(E,Bn)}),Ut&&Ql(E,Ct),gt}function pt(E,b,C,B){if(C==null)throw Error(r(151));for(var gt=null,Lt=null,ft=b,Ct=b=0,Rt=null,qt=C.next();ft!==null&&!qt.done;Ct++,qt=C.next()){ft.index>Ct?(Rt=ft,ft=null):Rt=ft.sibling;var Bn=A(E,ft,qt.value,B);if(Bn===null){ft===null&&(ft=Rt);break}t&&ft&&Bn.alternate===null&&e(E,ft),b=i(Bn,b,Ct),Lt===null?gt=Bn:Lt.sibling=Bn,Lt=Bn,ft=Rt}if(qt.done)return l(E,ft),Ut&&Ql(E,Ct),gt;if(ft===null){for(;!qt.done;Ct++,qt=C.next())qt=L(E,qt.value,B),qt!==null&&(b=i(qt,b,Ct),Lt===null?gt=qt:Lt.sibling=qt,Lt=qt);return Ut&&Ql(E,Ct),gt}for(ft=n(ft);!qt.done;Ct++,qt=C.next())qt=O(ft,E,Ct,qt.value,B),qt!==null&&(t&&qt.alternate!==null&&ft.delete(qt.key===null?Ct:qt.key),b=i(qt,b,Ct),Lt===null?gt=qt:Lt.sibling=qt,Lt=qt);return t&&ft.forEach(function(nm){return e(E,nm)}),Ut&&Ql(E,Ct),gt}function Jt(E,b,C,B){if(typeof C=="object"&&C!==null&&C.type===G&&C.key===null&&(C=C.props.children),typeof C=="object"&&C!==null){switch(C.$$typeof){case Q:t:{for(var gt=C.key;b!==null;){if(b.key===gt){if(gt=C.type,gt===G){if(b.tag===7){l(E,b.sibling),B=a(b,C.props.children),B.return=E,E=B;break t}}else if(b.elementType===gt||typeof gt=="object"&>!==null&>.$$typeof===ct&&ta(gt)===b.type){l(E,b.sibling),B=a(b,C.props),ri(B,C),B.return=E,E=B;break t}l(E,b);break}else e(E,b);b=b.sibling}C.type===G?(B=$n(C.props.children,E.mode,B,C.key),B.return=E,E=B):(B=uu(C.type,C.key,C.props,null,E.mode,B),ri(B,C),B.return=E,E=B)}return u(E);case X:t:{for(gt=C.key;b!==null;){if(b.key===gt)if(b.tag===4&&b.stateNode.containerInfo===C.containerInfo&&b.stateNode.implementation===C.implementation){l(E,b.sibling),B=a(b,C.children||[]),B.return=E,E=B;break t}else{l(E,b);break}else e(E,b);b=b.sibling}B=zc(C,E.mode,B),B.return=E,E=B}return u(E);case ct:return C=ta(C),Jt(E,b,C,B)}if(Bt(C))return it(E,b,C,B);if(St(C)){if(gt=St(C),typeof gt!="function")throw Error(r(150));return C=gt.call(C),pt(E,b,C,B)}if(typeof C.then=="function")return Jt(E,b,hu(C),B);if(C.$$typeof===et)return Jt(E,b,ou(E,C),B);mu(E,C)}return typeof C=="string"&&C!==""||typeof C=="number"||typeof C=="bigint"?(C=""+C,b!==null&&b.tag===6?(l(E,b.sibling),B=a(b,C),B.return=E,E=B):(l(E,b),B=Tc(C,E.mode,B),B.return=E,E=B),u(E)):l(E,b)}return function(E,b,C,B){try{oi=0;var gt=Jt(E,b,C,B);return Na=null,gt}catch(ft){if(ft===Aa||ft===fu)throw ft;var Lt=$e(29,ft,null,E.mode);return Lt.lanes=B,Lt.return=E,Lt}}}var la=wr(!0),jr=wr(!1),xn=!1;function Xc(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Qc(t,e){t=t.updateQueue,e.updateQueue===t&&(e.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function Sn(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function En(t,e,l){var n=t.updateQueue;if(n===null)return null;if(n=n.shared,(kt&2)!==0){var a=n.pending;return a===null?e.next=e:(e.next=a.next,a.next=e),n.pending=e,e=iu(t),or(t,null,l),e}return au(t,n,e,l),iu(t)}function fi(t,e,l){if(e=e.updateQueue,e!==null&&(e=e.shared,(l&4194048)!==0)){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Gi(t,l)}}function Zc(t,e){var l=t.updateQueue,n=t.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,i=null;if(l=l.firstBaseUpdate,l!==null){do{var u={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};i===null?a=i=u:i=i.next=u,l=l.next}while(l!==null);i===null?a=i=e:i=i.next=e}else a=i=e;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:n.shared,callbacks:n.callbacks},t.updateQueue=l;return}t=l.lastBaseUpdate,t===null?l.firstBaseUpdate=e:t.next=e,l.lastBaseUpdate=e}var Vc=!1;function di(){if(Vc){var t=ja;if(t!==null)throw t}}function hi(t,e,l,n){Vc=!1;var a=t.updateQueue;xn=!1;var i=a.firstBaseUpdate,u=a.lastBaseUpdate,f=a.shared.pending;if(f!==null){a.shared.pending=null;var v=f,w=v.next;v.next=null,u===null?i=w:u.next=w,u=v;var R=t.alternate;R!==null&&(R=R.updateQueue,f=R.lastBaseUpdate,f!==u&&(f===null?R.firstBaseUpdate=w:f.next=w,R.lastBaseUpdate=v))}if(i!==null){var L=a.baseState;u=0,R=w=v=null,f=i;do{var A=f.lane&-536870913,O=A!==f.lane;if(O?(_t&A)===A:(n&A)===A){A!==0&&A===wa&&(Vc=!0),R!==null&&(R=R.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});t:{var it=t,pt=f;A=e;var Jt=l;switch(pt.tag){case 1:if(it=pt.payload,typeof it=="function"){L=it.call(Jt,L,A);break t}L=it;break t;case 3:it.flags=it.flags&-65537|128;case 0:if(it=pt.payload,A=typeof it=="function"?it.call(Jt,L,A):it,A==null)break t;L=H({},L,A);break t;case 2:xn=!0}}A=f.callback,A!==null&&(t.flags|=64,O&&(t.flags|=8192),O=a.callbacks,O===null?a.callbacks=[A]:O.push(A))}else O={lane:A,tag:f.tag,payload:f.payload,callback:f.callback,next:null},R===null?(w=R=O,v=L):R=R.next=O,u|=A;if(f=f.next,f===null){if(f=a.shared.pending,f===null)break;O=f,f=O.next,O.next=null,a.lastBaseUpdate=O,a.shared.pending=null}}while(!0);R===null&&(v=L),a.baseState=v,a.firstBaseUpdate=w,a.lastBaseUpdate=R,i===null&&(a.shared.lanes=0),An|=u,t.lanes=u,t.memoizedState=L}}function Ar(t,e){if(typeof t!="function")throw Error(r(191,t));t.call(e)}function Nr(t,e){var l=t.callbacks;if(l!==null)for(t.callbacks=null,t=0;t<l.length;t++)Ar(l[t],e)}var Da=p(null),gu=p(0);function Dr(t,e){t=en,Z(gu,t),Z(Da,e),en=t|e.baseLanes}function Kc(){Z(gu,en),Z(Da,Da.current)}function Jc(){en=gu.current,T(Da),T(gu)}var Fe=p(null),ol=null;function Mn(t){var e=t.alternate;Z(ce,ce.current&1),Z(Fe,t),ol===null&&(e===null||Da.current!==null||e.memoizedState!==null)&&(ol=t)}function $c(t){Z(ce,ce.current),Z(Fe,t),ol===null&&(ol=t)}function Tr(t){t.tag===22?(Z(ce,ce.current),Z(Fe,t),ol===null&&(ol=t)):Cn()}function Cn(){Z(ce,ce.current),Z(Fe,Fe.current)}function We(t){T(Fe),ol===t&&(ol=null),T(ce)}var ce=p(0);function pu(t){for(var e=t;e!==null;){if(e.tag===13){var l=e.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||eo(l)||lo(l)))return e}else if(e.tag===19&&(e.memoizedProps.revealOrder==="forwards"||e.memoizedProps.revealOrder==="backwards"||e.memoizedProps.revealOrder==="unstable_legacy-backwards"||e.memoizedProps.revealOrder==="together")){if((e.flags&128)!==0)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var Kl=0,Mt=null,Vt=null,me=null,yu=!1,Ta=!1,na=!1,vu=0,mi=0,za=null,K1=0;function ne(){throw Error(r(321))}function Fc(t,e){if(e===null)return!1;for(var l=0;l<e.length&&l<t.length;l++)if(!Je(t[l],e[l]))return!1;return!0}function Wc(t,e,l,n,a,i){return Kl=i,Mt=e,e.memoizedState=null,e.updateQueue=null,e.lanes=0,D.H=t===null||t.memoizedState===null?mf:ds,na=!1,i=l(n,a),na=!1,Ta&&(i=Or(e,l,n,a)),zr(t),i}function zr(t){D.H=yi;var e=Vt!==null&&Vt.next!==null;if(Kl=0,me=Vt=Mt=null,yu=!1,mi=0,za=null,e)throw Error(r(300));t===null||ge||(t=t.dependencies,t!==null&&su(t)&&(ge=!0))}function Or(t,e,l,n){Mt=t;var a=0;do{if(Ta&&(za=null),mi=0,Ta=!1,25<=a)throw Error(r(301));if(a+=1,me=Vt=null,t.updateQueue!=null){var i=t.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=gf,i=e(l,n)}while(Ta);return i}function J1(){var t=D.H,e=t.useState()[0];return e=typeof e.then=="function"?gi(e):e,t=t.useState()[0],(Vt!==null?Vt.memoizedState:null)!==t&&(Mt.flags|=1024),e}function Ic(){var t=vu!==0;return vu=0,t}function Pc(t,e,l){e.updateQueue=t.updateQueue,e.flags&=-2053,t.lanes&=~l}function ts(t){if(yu){for(t=t.memoizedState;t!==null;){var e=t.queue;e!==null&&(e.pending=null),t=t.next}yu=!1}Kl=0,me=Vt=Mt=null,Ta=!1,mi=vu=0,za=null}function He(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return me===null?Mt.memoizedState=me=t:me=me.next=t,me}function se(){if(Vt===null){var t=Mt.alternate;t=t!==null?t.memoizedState:null}else t=Vt.next;var e=me===null?Mt.memoizedState:me.next;if(e!==null)me=e,Vt=t;else{if(t===null)throw Mt.alternate===null?Error(r(467)):Error(r(310));Vt=t,t={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},me===null?Mt.memoizedState=me=t:me=me.next=t}return me}function bu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function gi(t){var e=mi;return mi+=1,za===null&&(za=[]),t=Er(za,t,e),e=Mt,(me===null?e.memoizedState:me.next)===null&&(e=e.alternate,D.H=e===null||e.memoizedState===null?mf:ds),t}function xu(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return gi(t);if(t.$$typeof===et)return Ce(t)}throw Error(r(438,String(t)))}function es(t){var e=null,l=Mt.updateQueue;if(l!==null&&(e=l.memoCache),e==null){var n=Mt.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(e={data:n.data.map(function(a){return a.slice()}),index:0})))}if(e==null&&(e={data:[],index:0}),l===null&&(l=bu(),Mt.updateQueue=l),l.memoCache=e,l=e.data[e.index],l===void 0)for(l=e.data[e.index]=Array(t),n=0;n<t;n++)l[n]=rt;return e.index++,l}function Jl(t,e){return typeof e=="function"?e(t):e}function Su(t){var e=se();return ls(e,Vt,t)}function ls(t,e,l){var n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=l;var a=t.baseQueue,i=n.pending;if(i!==null){if(a!==null){var u=a.next;a.next=i.next,i.next=u}e.baseQueue=a=i,n.pending=null}if(i=t.baseState,a===null)t.memoizedState=i;else{e=a.next;var f=u=null,v=null,w=e,R=!1;do{var L=w.lane&-536870913;if(L!==w.lane?(_t&L)===L:(Kl&L)===L){var A=w.revertLane;if(A===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null}),L===wa&&(R=!0);else if((Kl&A)===A){w=w.next,A===wa&&(R=!0);continue}else L={lane:0,revertLane:w.revertLane,gesture:null,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},v===null?(f=v=L,u=i):v=v.next=L,Mt.lanes|=A,An|=A;L=w.action,na&&l(i,L),i=w.hasEagerState?w.eagerState:l(i,L)}else A={lane:L,revertLane:w.revertLane,gesture:w.gesture,action:w.action,hasEagerState:w.hasEagerState,eagerState:w.eagerState,next:null},v===null?(f=v=A,u=i):v=v.next=A,Mt.lanes|=L,An|=L;w=w.next}while(w!==null&&w!==e);if(v===null?u=i:v.next=f,!Je(i,t.memoizedState)&&(ge=!0,R&&(l=ja,l!==null)))throw l;t.memoizedState=i,t.baseState=u,t.baseQueue=v,n.lastRenderedState=i}return a===null&&(n.lanes=0),[t.memoizedState,n.dispatch]}function ns(t){var e=se(),l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=t;var n=l.dispatch,a=l.pending,i=e.memoizedState;if(a!==null){l.pending=null;var u=a=a.next;do i=t(i,u.action),u=u.next;while(u!==a);Je(i,e.memoizedState)||(ge=!0),e.memoizedState=i,e.baseQueue===null&&(e.baseState=i),l.lastRenderedState=i}return[i,n]}function _r(t,e,l){var n=Mt,a=se(),i=Ut;if(i){if(l===void 0)throw Error(r(407));l=l()}else l=e();var u=!Je((Vt||a).memoizedState,l);if(u&&(a.memoizedState=l,ge=!0),a=a.queue,us(Hr.bind(null,n,a,t),[t]),a.getSnapshot!==e||u||me!==null&&me.memoizedState.tag&1){if(n.flags|=2048,Oa(9,{destroy:void 0},Ur.bind(null,n,a,l,e),null),Ft===null)throw Error(r(349));i||(Kl&127)!==0||Rr(n,e,l)}return l}function Rr(t,e,l){t.flags|=16384,t={getSnapshot:e,value:l},e=Mt.updateQueue,e===null?(e=bu(),Mt.updateQueue=e,e.stores=[t]):(l=e.stores,l===null?e.stores=[t]:l.push(t))}function Ur(t,e,l,n){e.value=l,e.getSnapshot=n,Br(e)&&Lr(t)}function Hr(t,e,l){return l(function(){Br(e)&&Lr(t)})}function Br(t){var e=t.getSnapshot;t=t.value;try{var l=e();return!Je(t,l)}catch{return!0}}function Lr(t){var e=Jn(t,2);e!==null&&Qe(e,t,2)}function as(t){var e=He();if(typeof t=="function"){var l=t;if(t=l(),na){Ve(!0);try{l()}finally{Ve(!1)}}}return e.memoizedState=e.baseState=t,e.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:t},e}function qr(t,e,l,n){return t.baseState=l,ls(t,Vt,typeof n=="function"?n:Jl)}function $1(t,e,l,n,a){if(Cu(t))throw Error(r(485));if(t=e.action,t!==null){var i={payload:a,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(u){i.listeners.push(u)}};D.T!==null?l(!0):i.isTransition=!1,n(i),l=e.pending,l===null?(i.next=e.pending=i,kr(e,i)):(i.next=l.next,e.pending=l.next=i)}}function kr(t,e){var l=e.action,n=e.payload,a=t.state;if(e.isTransition){var i=D.T,u={};D.T=u;try{var f=l(a,n),v=D.S;v!==null&&v(u,f),Yr(t,e,f)}catch(w){is(t,e,w)}finally{i!==null&&u.types!==null&&(i.types=u.types),D.T=i}}else try{i=l(a,n),Yr(t,e,i)}catch(w){is(t,e,w)}}function Yr(t,e,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){Gr(t,e,n)},function(n){return is(t,e,n)}):Gr(t,e,l)}function Gr(t,e,l){e.status="fulfilled",e.value=l,Xr(e),t.state=l,e=t.pending,e!==null&&(l=e.next,l===e?t.pending=null:(l=l.next,e.next=l,kr(t,l)))}function is(t,e,l){var n=t.pending;if(t.pending=null,n!==null){n=n.next;do e.status="rejected",e.reason=l,Xr(e),e=e.next;while(e!==n)}t.action=null}function Xr(t){t=t.listeners;for(var e=0;e<t.length;e++)(0,t[e])()}function Qr(t,e){return e}function Zr(t,e){if(Ut){var l=Ft.formState;if(l!==null){t:{var n=Mt;if(Ut){if(te){e:{for(var a=te,i=sl;a.nodeType!==8;){if(!i){a=null;break e}if(a=rl(a.nextSibling),a===null){a=null;break e}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){te=rl(a.nextSibling),n=a.data==="F!";break t}}vn(n)}n=!1}n&&(e=l[0])}}return l=He(),l.memoizedState=l.baseState=e,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Qr,lastRenderedState:e},l.queue=n,l=ff.bind(null,Mt,n),n.dispatch=l,n=as(!1),i=fs.bind(null,Mt,!1,n.queue),n=He(),a={state:e,dispatch:null,action:t,pending:null},n.queue=a,l=$1.bind(null,Mt,a,i,l),a.dispatch=l,n.memoizedState=t,[e,l,!1]}function Vr(t){var e=se();return Kr(e,Vt,t)}function Kr(t,e,l){if(e=ls(t,e,Qr)[0],t=Su(Jl)[0],typeof e=="object"&&e!==null&&typeof e.then=="function")try{var n=gi(e)}catch(u){throw u===Aa?fu:u}else n=e;e=se();var a=e.queue,i=a.dispatch;return l!==e.memoizedState&&(Mt.flags|=2048,Oa(9,{destroy:void 0},F1.bind(null,a,l),null)),[n,i,t]}function F1(t,e){t.action=e}function Jr(t){var e=se(),l=Vt;if(l!==null)return Kr(e,l,t);se(),e=e.memoizedState,l=se();var n=l.queue.dispatch;return l.memoizedState=t,[e,n,!1]}function Oa(t,e,l,n){return t={tag:t,create:l,deps:n,inst:e,next:null},e=Mt.updateQueue,e===null&&(e=bu(),Mt.updateQueue=e),l=e.lastEffect,l===null?e.lastEffect=t.next=t:(n=l.next,l.next=t,t.next=n,e.lastEffect=t),t}function $r(){return se().memoizedState}function Eu(t,e,l,n){var a=He();Mt.flags|=t,a.memoizedState=Oa(1|e,{destroy:void 0},l,n===void 0?null:n)}function Mu(t,e,l,n){var a=se();n=n===void 0?null:n;var i=a.memoizedState.inst;Vt!==null&&n!==null&&Fc(n,Vt.memoizedState.deps)?a.memoizedState=Oa(e,i,l,n):(Mt.flags|=t,a.memoizedState=Oa(1|e,i,l,n))}function Fr(t,e){Eu(8390656,8,t,e)}function us(t,e){Mu(2048,8,t,e)}function W1(t){Mt.flags|=4;var e=Mt.updateQueue;if(e===null)e=bu(),Mt.updateQueue=e,e.events=[t];else{var l=e.events;l===null?e.events=[t]:l.push(t)}}function Wr(t){var e=se().memoizedState;return W1({ref:e,nextImpl:t}),function(){if((kt&2)!==0)throw Error(r(440));return e.impl.apply(void 0,arguments)}}function Ir(t,e){return Mu(4,2,t,e)}function Pr(t,e){return Mu(4,4,t,e)}function tf(t,e){if(typeof e=="function"){t=t();var l=e(t);return function(){typeof l=="function"?l():e(null)}}if(e!=null)return t=t(),e.current=t,function(){e.current=null}}function ef(t,e,l){l=l!=null?l.concat([t]):null,Mu(4,4,tf.bind(null,e,t),l)}function cs(){}function lf(t,e){var l=se();e=e===void 0?null:e;var n=l.memoizedState;return e!==null&&Fc(e,n[1])?n[0]:(l.memoizedState=[t,e],t)}function nf(t,e){var l=se();e=e===void 0?null:e;var n=l.memoizedState;if(e!==null&&Fc(e,n[1]))return n[0];if(n=t(),na){Ve(!0);try{t()}finally{Ve(!1)}}return l.memoizedState=[n,e],n}function ss(t,e,l){return l===void 0||(Kl&1073741824)!==0&&(_t&261930)===0?t.memoizedState=e:(t.memoizedState=l,t=id(),Mt.lanes|=t,An|=t,l)}function af(t,e,l,n){return Je(l,e)?l:Da.current!==null?(t=ss(t,l,n),Je(t,e)||(ge=!0),t):(Kl&42)===0||(Kl&1073741824)!==0&&(_t&261930)===0?(ge=!0,t.memoizedState=l):(t=id(),Mt.lanes|=t,An|=t,e)}function uf(t,e,l,n,a){var i=Y.p;Y.p=i!==0&&8>i?i:8;var u=D.T,f={};D.T=f,fs(t,!1,e,l);try{var v=a(),w=D.S;if(w!==null&&w(f,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){var R=V1(v,n);pi(t,e,R,tl(t))}else pi(t,e,n,tl(t))}catch(L){pi(t,e,{then:function(){},status:"rejected",reason:L},tl())}finally{Y.p=i,u!==null&&f.types!==null&&(u.types=f.types),D.T=u}}function I1(){}function os(t,e,l,n){if(t.tag!==5)throw Error(r(476));var a=cf(t).queue;uf(t,a,e,N,l===null?I1:function(){return sf(t),l(n)})}function cf(t){var e=t.memoizedState;if(e!==null)return e;e={memoizedState:N,baseState:N,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:N},next:null};var l={};return e.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Jl,lastRenderedState:l},next:null},t.memoizedState=e,t=t.alternate,t!==null&&(t.memoizedState=e),e}function sf(t){var e=cf(t);e.next===null&&(e=t.alternate.memoizedState),pi(t,e.next.queue,{},tl())}function rs(){return Ce(_i)}function of(){return se().memoizedState}function rf(){return se().memoizedState}function P1(t){for(var e=t.return;e!==null;){switch(e.tag){case 24:case 3:var l=tl();t=Sn(l);var n=En(e,t,l);n!==null&&(Qe(n,e,l),fi(n,e,l)),e={cache:qc()},t.payload=e;return}e=e.return}}function th(t,e,l){var n=tl();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Cu(t)?df(e,l):(l=Nc(t,e,l,n),l!==null&&(Qe(l,t,n),hf(l,e,n)))}function ff(t,e,l){var n=tl();pi(t,e,l,n)}function pi(t,e,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Cu(t))df(e,a);else{var i=t.alternate;if(t.lanes===0&&(i===null||i.lanes===0)&&(i=e.lastRenderedReducer,i!==null))try{var u=e.lastRenderedState,f=i(u,l);if(a.hasEagerState=!0,a.eagerState=f,Je(f,u))return au(t,e,a,0),Ft===null&&nu(),!1}catch{}if(l=Nc(t,e,a,n),l!==null)return Qe(l,t,n),hf(l,e,n),!0}return!1}function fs(t,e,l,n){if(n={lane:2,revertLane:Xs(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Cu(t)){if(e)throw Error(r(479))}else e=Nc(t,l,n,2),e!==null&&Qe(e,t,2)}function Cu(t){var e=t.alternate;return t===Mt||e!==null&&e===Mt}function df(t,e){Ta=yu=!0;var l=t.pending;l===null?e.next=e:(e.next=l.next,l.next=e),t.pending=e}function hf(t,e,l){if((l&4194048)!==0){var n=e.lanes;n&=t.pendingLanes,l|=n,e.lanes=l,Gi(t,l)}}var yi={readContext:Ce,use:xu,useCallback:ne,useContext:ne,useEffect:ne,useImperativeHandle:ne,useLayoutEffect:ne,useInsertionEffect:ne,useMemo:ne,useReducer:ne,useRef:ne,useState:ne,useDebugValue:ne,useDeferredValue:ne,useTransition:ne,useSyncExternalStore:ne,useId:ne,useHostTransitionStatus:ne,useFormState:ne,useActionState:ne,useOptimistic:ne,useMemoCache:ne,useCacheRefresh:ne};yi.useEffectEvent=ne;var mf={readContext:Ce,use:xu,useCallback:function(t,e){return He().memoizedState=[t,e===void 0?null:e],t},useContext:Ce,useEffect:Fr,useImperativeHandle:function(t,e,l){l=l!=null?l.concat([t]):null,Eu(4194308,4,tf.bind(null,e,t),l)},useLayoutEffect:function(t,e){return Eu(4194308,4,t,e)},useInsertionEffect:function(t,e){Eu(4,2,t,e)},useMemo:function(t,e){var l=He();e=e===void 0?null:e;var n=t();if(na){Ve(!0);try{t()}finally{Ve(!1)}}return l.memoizedState=[n,e],n},useReducer:function(t,e,l){var n=He();if(l!==void 0){var a=l(e);if(na){Ve(!0);try{l(e)}finally{Ve(!1)}}}else a=e;return n.memoizedState=n.baseState=a,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:a},n.queue=t,t=t.dispatch=th.bind(null,Mt,t),[n.memoizedState,t]},useRef:function(t){var e=He();return t={current:t},e.memoizedState=t},useState:function(t){t=as(t);var e=t.queue,l=ff.bind(null,Mt,e);return e.dispatch=l,[t.memoizedState,l]},useDebugValue:cs,useDeferredValue:function(t,e){var l=He();return ss(l,t,e)},useTransition:function(){var t=as(!1);return t=uf.bind(null,Mt,t.queue,!0,!1),He().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,e,l){var n=Mt,a=He();if(Ut){if(l===void 0)throw Error(r(407));l=l()}else{if(l=e(),Ft===null)throw Error(r(349));(_t&127)!==0||Rr(n,e,l)}a.memoizedState=l;var i={value:l,getSnapshot:e};return a.queue=i,Fr(Hr.bind(null,n,i,t),[t]),n.flags|=2048,Oa(9,{destroy:void 0},Ur.bind(null,n,i,l,e),null),l},useId:function(){var t=He(),e=Ft.identifierPrefix;if(Ut){var l=_l,n=Ol;l=(n&~(1<<32-$t(n)-1)).toString(32)+l,e="_"+e+"R_"+l,l=vu++,0<l&&(e+="H"+l.toString(32)),e+="_"}else l=K1++,e="_"+e+"r_"+l.toString(32)+"_";return t.memoizedState=e},useHostTransitionStatus:rs,useFormState:Zr,useActionState:Zr,useOptimistic:function(t){var e=He();e.memoizedState=e.baseState=t;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return e.queue=l,e=fs.bind(null,Mt,!0,l),l.dispatch=e,[t,e]},useMemoCache:es,useCacheRefresh:function(){return He().memoizedState=P1.bind(null,Mt)},useEffectEvent:function(t){var e=He(),l={impl:t};return e.memoizedState=l,function(){if((kt&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}},ds={readContext:Ce,use:xu,useCallback:lf,useContext:Ce,useEffect:us,useImperativeHandle:ef,useInsertionEffect:Ir,useLayoutEffect:Pr,useMemo:nf,useReducer:Su,useRef:$r,useState:function(){return Su(Jl)},useDebugValue:cs,useDeferredValue:function(t,e){var l=se();return af(l,Vt.memoizedState,t,e)},useTransition:function(){var t=Su(Jl)[0],e=se().memoizedState;return[typeof t=="boolean"?t:gi(t),e]},useSyncExternalStore:_r,useId:of,useHostTransitionStatus:rs,useFormState:Vr,useActionState:Vr,useOptimistic:function(t,e){var l=se();return qr(l,Vt,t,e)},useMemoCache:es,useCacheRefresh:rf};ds.useEffectEvent=Wr;var gf={readContext:Ce,use:xu,useCallback:lf,useContext:Ce,useEffect:us,useImperativeHandle:ef,useInsertionEffect:Ir,useLayoutEffect:Pr,useMemo:nf,useReducer:ns,useRef:$r,useState:function(){return ns(Jl)},useDebugValue:cs,useDeferredValue:function(t,e){var l=se();return Vt===null?ss(l,t,e):af(l,Vt.memoizedState,t,e)},useTransition:function(){var t=ns(Jl)[0],e=se().memoizedState;return[typeof t=="boolean"?t:gi(t),e]},useSyncExternalStore:_r,useId:of,useHostTransitionStatus:rs,useFormState:Jr,useActionState:Jr,useOptimistic:function(t,e){var l=se();return Vt!==null?qr(l,Vt,t,e):(l.baseState=t,[t,l.queue.dispatch])},useMemoCache:es,useCacheRefresh:rf};gf.useEffectEvent=Wr;function hs(t,e,l,n){e=t.memoizedState,l=l(n,e),l=l==null?e:H({},e,l),t.memoizedState=l,t.lanes===0&&(t.updateQueue.baseState=l)}var ms={enqueueSetState:function(t,e,l){t=t._reactInternals;var n=tl(),a=Sn(n);a.payload=e,l!=null&&(a.callback=l),e=En(t,a,n),e!==null&&(Qe(e,t,n),fi(e,t,n))},enqueueReplaceState:function(t,e,l){t=t._reactInternals;var n=tl(),a=Sn(n);a.tag=1,a.payload=e,l!=null&&(a.callback=l),e=En(t,a,n),e!==null&&(Qe(e,t,n),fi(e,t,n))},enqueueForceUpdate:function(t,e){t=t._reactInternals;var l=tl(),n=Sn(l);n.tag=2,e!=null&&(n.callback=e),e=En(t,n,l),e!==null&&(Qe(e,t,l),fi(e,t,l))}};function pf(t,e,l,n,a,i,u){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(n,i,u):e.prototype&&e.prototype.isPureReactComponent?!ni(l,n)||!ni(a,i):!0}function yf(t,e,l,n){t=e.state,typeof e.componentWillReceiveProps=="function"&&e.componentWillReceiveProps(l,n),typeof e.UNSAFE_componentWillReceiveProps=="function"&&e.UNSAFE_componentWillReceiveProps(l,n),e.state!==t&&ms.enqueueReplaceState(e,e.state,null)}function aa(t,e){var l=e;if("ref"in e){l={};for(var n in e)n!=="ref"&&(l[n]=e[n])}if(t=t.defaultProps){l===e&&(l=H({},l));for(var a in t)l[a]===void 0&&(l[a]=t[a])}return l}function vf(t){lu(t)}function bf(t){console.error(t)}function xf(t){lu(t)}function wu(t,e){try{var l=t.onUncaughtError;l(e.value,{componentStack:e.stack})}catch(n){setTimeout(function(){throw n})}}function Sf(t,e,l){try{var n=t.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:e.tag===1?e.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function gs(t,e,l){return l=Sn(l),l.tag=3,l.payload={element:null},l.callback=function(){wu(t,e)},l}function Ef(t){return t=Sn(t),t.tag=3,t}function Mf(t,e,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var i=n.value;t.payload=function(){return a(i)},t.callback=function(){Sf(e,l,n)}}var u=l.stateNode;u!==null&&typeof u.componentDidCatch=="function"&&(t.callback=function(){Sf(e,l,n),typeof a!="function"&&(Nn===null?Nn=new Set([this]):Nn.add(this));var f=n.stack;this.componentDidCatch(n.value,{componentStack:f!==null?f:""})})}function eh(t,e,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(e=l.alternate,e!==null&&Ca(e,l,a,!0),l=Fe.current,l!==null){switch(l.tag){case 31:case 13:return ol===null?Bu():l.alternate===null&&ae===0&&(ae=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===du?l.flags|=16384:(e=l.updateQueue,e===null?l.updateQueue=new Set([n]):e.add(n),ks(t,n,a)),!1;case 22:return l.flags|=65536,n===du?l.flags|=16384:(e=l.updateQueue,e===null?(e={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=e):(l=e.retryQueue,l===null?e.retryQueue=new Set([n]):l.add(n)),ks(t,n,a)),!1}throw Error(r(435,l.tag))}return ks(t,n,a),Bu(),!1}if(Ut)return e=Fe.current,e!==null?((e.flags&65536)===0&&(e.flags|=256),e.flags|=65536,e.lanes=a,n!==Rc&&(t=Error(r(422),{cause:n}),ui(il(t,l)))):(n!==Rc&&(e=Error(r(423),{cause:n}),ui(il(e,l))),t=t.current.alternate,t.flags|=65536,a&=-a,t.lanes|=a,n=il(n,l),a=gs(t.stateNode,n,a),Zc(t,a),ae!==4&&(ae=2)),!1;var i=Error(r(520),{cause:n});if(i=il(i,l),wi===null?wi=[i]:wi.push(i),ae!==4&&(ae=2),e===null)return!0;n=il(n,l),l=e;do{switch(l.tag){case 3:return l.flags|=65536,t=a&-a,l.lanes|=t,t=gs(l.stateNode,n,t),Zc(l,t),!1;case 1:if(e=l.type,i=l.stateNode,(l.flags&128)===0&&(typeof e.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Nn===null||!Nn.has(i))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Ef(a),Mf(a,t,l,n),Zc(l,a),!1}l=l.return}while(l!==null);return!1}var ps=Error(r(461)),ge=!1;function we(t,e,l,n){e.child=t===null?jr(e,null,l,n):la(e,t.child,l,n)}function Cf(t,e,l,n,a){l=l.render;var i=e.ref;if("ref"in n){var u={};for(var f in n)f!=="ref"&&(u[f]=n[f])}else u=n;return In(e),n=Wc(t,e,l,u,i,a),f=Ic(),t!==null&&!ge?(Pc(t,e,a),$l(t,e,a)):(Ut&&f&&Oc(e),e.flags|=1,we(t,e,n,a),e.child)}function wf(t,e,l,n,a){if(t===null){var i=l.type;return typeof i=="function"&&!Dc(i)&&i.defaultProps===void 0&&l.compare===null?(e.tag=15,e.type=i,jf(t,e,i,n,a)):(t=uu(l.type,null,n,e,e.mode,a),t.ref=e.ref,t.return=e,e.child=t)}if(i=t.child,!Cs(t,a)){var u=i.memoizedProps;if(l=l.compare,l=l!==null?l:ni,l(u,n)&&t.ref===e.ref)return $l(t,e,a)}return e.flags|=1,t=Xl(i,n),t.ref=e.ref,t.return=e,e.child=t}function jf(t,e,l,n,a){if(t!==null){var i=t.memoizedProps;if(ni(i,n)&&t.ref===e.ref)if(ge=!1,e.pendingProps=n=i,Cs(t,a))(t.flags&131072)!==0&&(ge=!0);else return e.lanes=t.lanes,$l(t,e,a)}return ys(t,e,l,n,a)}function Af(t,e,l,n){var a=n.children,i=t!==null?t.memoizedState:null;if(t===null&&e.stateNode===null&&(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((e.flags&128)!==0){if(i=i!==null?i.baseLanes|l:l,t!==null){for(n=e.child=t.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~i}else n=0,e.child=null;return Nf(t,e,i,l,n)}if((l&536870912)!==0)e.memoizedState={baseLanes:0,cachePool:null},t!==null&&ru(e,i!==null?i.cachePool:null),i!==null?Dr(e,i):Kc(),Tr(e);else return n=e.lanes=536870912,Nf(t,e,i!==null?i.baseLanes|l:l,l,n)}else i!==null?(ru(e,i.cachePool),Dr(e,i),Cn(),e.memoizedState=null):(t!==null&&ru(e,null),Kc(),Cn());return we(t,e,a,l),e.child}function vi(t,e){return t!==null&&t.tag===22||e.stateNode!==null||(e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),e.sibling}function Nf(t,e,l,n,a){var i=Yc();return i=i===null?null:{parent:he._currentValue,pool:i},e.memoizedState={baseLanes:l,cachePool:i},t!==null&&ru(e,null),Kc(),Tr(e),t!==null&&Ca(t,e,n,!0),e.childLanes=a,null}function ju(t,e){return e=Nu({mode:e.mode,children:e.children},t.mode),e.ref=t.ref,t.child=e,e.return=t,e}function Df(t,e,l){return la(e,t.child,null,l),t=ju(e,e.pendingProps),t.flags|=2,We(e),e.memoizedState=null,t}function lh(t,e,l){var n=e.pendingProps,a=(e.flags&128)!==0;if(e.flags&=-129,t===null){if(Ut){if(n.mode==="hidden")return t=ju(e,n),e.lanes=536870912,vi(null,t);if($c(e),(t=te)?(t=Yd(t,sl),t=t!==null&&t.data==="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:pn!==null?{id:Ol,overflow:_l}:null,retryLane:536870912,hydrationErrors:null},l=fr(t),l.return=e,e.child=l,Me=e,te=null)):t=null,t===null)throw vn(e);return e.lanes=536870912,null}return ju(e,n)}var i=t.memoizedState;if(i!==null){var u=i.dehydrated;if($c(e),a)if(e.flags&256)e.flags&=-257,e=Df(t,e,l);else if(e.memoizedState!==null)e.child=t.child,e.flags|=128,e=null;else throw Error(r(558));else if(ge||Ca(t,e,l,!1),a=(l&t.childLanes)!==0,ge||a){if(n=Ft,n!==null&&(u=Be(n,l),u!==0&&u!==i.retryLane))throw i.retryLane=u,Jn(t,u),Qe(n,t,u),ps;Bu(),e=Df(t,e,l)}else t=i.treeContext,te=rl(u.nextSibling),Me=e,Ut=!0,yn=null,sl=!1,t!==null&&mr(e,t),e=ju(e,n),e.flags|=4096;return e}return t=Xl(t.child,{mode:n.mode,children:n.children}),t.ref=e.ref,e.child=t,t.return=e,t}function Au(t,e){var l=e.ref;if(l===null)t!==null&&t.ref!==null&&(e.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(r(284));(t===null||t.ref!==l)&&(e.flags|=4194816)}}function ys(t,e,l,n,a){return In(e),l=Wc(t,e,l,n,void 0,a),n=Ic(),t!==null&&!ge?(Pc(t,e,a),$l(t,e,a)):(Ut&&n&&Oc(e),e.flags|=1,we(t,e,l,a),e.child)}function Tf(t,e,l,n,a,i){return In(e),e.updateQueue=null,l=Or(e,n,l,a),zr(t),n=Ic(),t!==null&&!ge?(Pc(t,e,i),$l(t,e,i)):(Ut&&n&&Oc(e),e.flags|=1,we(t,e,l,i),e.child)}function zf(t,e,l,n,a){if(In(e),e.stateNode===null){var i=xa,u=l.contextType;typeof u=="object"&&u!==null&&(i=Ce(u)),i=new l(n,i),e.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=ms,e.stateNode=i,i._reactInternals=e,i=e.stateNode,i.props=n,i.state=e.memoizedState,i.refs={},Xc(e),u=l.contextType,i.context=typeof u=="object"&&u!==null?Ce(u):xa,i.state=e.memoizedState,u=l.getDerivedStateFromProps,typeof u=="function"&&(hs(e,l,u,n),i.state=e.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(u=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),u!==i.state&&ms.enqueueReplaceState(i,i.state,null),hi(e,n,i,a),di(),i.state=e.memoizedState),typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!0}else if(t===null){i=e.stateNode;var f=e.memoizedProps,v=aa(l,f);i.props=v;var w=i.context,R=l.contextType;u=xa,typeof R=="object"&&R!==null&&(u=Ce(R));var L=l.getDerivedStateFromProps;R=typeof L=="function"||typeof i.getSnapshotBeforeUpdate=="function",f=e.pendingProps!==f,R||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(f||w!==u)&&yf(e,i,n,u),xn=!1;var A=e.memoizedState;i.state=A,hi(e,n,i,a),di(),w=e.memoizedState,f||A!==w||xn?(typeof L=="function"&&(hs(e,l,L,n),w=e.memoizedState),(v=xn||pf(e,l,v,n,A,w,u))?(R||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(e.flags|=4194308)):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=n,e.memoizedState=w),i.props=n,i.state=w,i.context=u,n=v):(typeof i.componentDidMount=="function"&&(e.flags|=4194308),n=!1)}else{i=e.stateNode,Qc(t,e),u=e.memoizedProps,R=aa(l,u),i.props=R,L=e.pendingProps,A=i.context,w=l.contextType,v=xa,typeof w=="object"&&w!==null&&(v=Ce(w)),f=l.getDerivedStateFromProps,(w=typeof f=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(u!==L||A!==v)&&yf(e,i,n,v),xn=!1,A=e.memoizedState,i.state=A,hi(e,n,i,a),di();var O=e.memoizedState;u!==L||A!==O||xn||t!==null&&t.dependencies!==null&&su(t.dependencies)?(typeof f=="function"&&(hs(e,l,f,n),O=e.memoizedState),(R=xn||pf(e,l,R,n,A,O,v)||t!==null&&t.dependencies!==null&&su(t.dependencies))?(w||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(n,O,v),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(n,O,v)),typeof i.componentDidUpdate=="function"&&(e.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&A===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&A===t.memoizedState||(e.flags|=1024),e.memoizedProps=n,e.memoizedState=O),i.props=n,i.state=O,i.context=v,n=R):(typeof i.componentDidUpdate!="function"||u===t.memoizedProps&&A===t.memoizedState||(e.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||u===t.memoizedProps&&A===t.memoizedState||(e.flags|=1024),n=!1)}return i=n,Au(t,e),n=(e.flags&128)!==0,i||n?(i=e.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:i.render(),e.flags|=1,t!==null&&n?(e.child=la(e,t.child,null,a),e.child=la(e,null,l,a)):we(t,e,l,a),e.memoizedState=i.state,t=e.child):t=$l(t,e,a),t}function Of(t,e,l,n){return Fn(),e.flags|=256,we(t,e,l,n),e.child}var vs={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function bs(t){return{baseLanes:t,cachePool:xr()}}function xs(t,e,l){return t=t!==null?t.childLanes&~l:0,e&&(t|=Pe),t}function _f(t,e,l){var n=e.pendingProps,a=!1,i=(e.flags&128)!==0,u;if((u=i)||(u=t!==null&&t.memoizedState===null?!1:(ce.current&2)!==0),u&&(a=!0,e.flags&=-129),u=(e.flags&32)!==0,e.flags&=-33,t===null){if(Ut){if(a?Mn(e):Cn(),(t=te)?(t=Yd(t,sl),t=t!==null&&t.data!=="&"?t:null,t!==null&&(e.memoizedState={dehydrated:t,treeContext:pn!==null?{id:Ol,overflow:_l}:null,retryLane:536870912,hydrationErrors:null},l=fr(t),l.return=e,e.child=l,Me=e,te=null)):t=null,t===null)throw vn(e);return lo(t)?e.lanes=32:e.lanes=536870912,null}var f=n.children;return n=n.fallback,a?(Cn(),a=e.mode,f=Nu({mode:"hidden",children:f},a),n=$n(n,a,l,null),f.return=e,n.return=e,f.sibling=n,e.child=f,n=e.child,n.memoizedState=bs(l),n.childLanes=xs(t,u,l),e.memoizedState=vs,vi(null,n)):(Mn(e),Ss(e,f))}var v=t.memoizedState;if(v!==null&&(f=v.dehydrated,f!==null)){if(i)e.flags&256?(Mn(e),e.flags&=-257,e=Es(t,e,l)):e.memoizedState!==null?(Cn(),e.child=t.child,e.flags|=128,e=null):(Cn(),f=n.fallback,a=e.mode,n=Nu({mode:"visible",children:n.children},a),f=$n(f,a,l,null),f.flags|=2,n.return=e,f.return=e,n.sibling=f,e.child=n,la(e,t.child,null,l),n=e.child,n.memoizedState=bs(l),n.childLanes=xs(t,u,l),e.memoizedState=vs,e=vi(null,n));else if(Mn(e),lo(f)){if(u=f.nextSibling&&f.nextSibling.dataset,u)var w=u.dgst;u=w,n=Error(r(419)),n.stack="",n.digest=u,ui({value:n,source:null,stack:null}),e=Es(t,e,l)}else if(ge||Ca(t,e,l,!1),u=(l&t.childLanes)!==0,ge||u){if(u=Ft,u!==null&&(n=Be(u,l),n!==0&&n!==v.retryLane))throw v.retryLane=n,Jn(t,n),Qe(u,t,n),ps;eo(f)||Bu(),e=Es(t,e,l)}else eo(f)?(e.flags|=192,e.child=t.child,e=null):(t=v.treeContext,te=rl(f.nextSibling),Me=e,Ut=!0,yn=null,sl=!1,t!==null&&mr(e,t),e=Ss(e,n.children),e.flags|=4096);return e}return a?(Cn(),f=n.fallback,a=e.mode,v=t.child,w=v.sibling,n=Xl(v,{mode:"hidden",children:n.children}),n.subtreeFlags=v.subtreeFlags&65011712,w!==null?f=Xl(w,f):(f=$n(f,a,l,null),f.flags|=2),f.return=e,n.return=e,n.sibling=f,e.child=n,vi(null,n),n=e.child,f=t.child.memoizedState,f===null?f=bs(l):(a=f.cachePool,a!==null?(v=he._currentValue,a=a.parent!==v?{parent:v,pool:v}:a):a=xr(),f={baseLanes:f.baseLanes|l,cachePool:a}),n.memoizedState=f,n.childLanes=xs(t,u,l),e.memoizedState=vs,vi(t.child,n)):(Mn(e),l=t.child,t=l.sibling,l=Xl(l,{mode:"visible",children:n.children}),l.return=e,l.sibling=null,t!==null&&(u=e.deletions,u===null?(e.deletions=[t],e.flags|=16):u.push(t)),e.child=l,e.memoizedState=null,l)}function Ss(t,e){return e=Nu({mode:"visible",children:e},t.mode),e.return=t,t.child=e}function Nu(t,e){return t=$e(22,t,null,e),t.lanes=0,t}function Es(t,e,l){return la(e,t.child,null,l),t=Ss(e,e.pendingProps.children),t.flags|=2,e.memoizedState=null,t}function Rf(t,e,l){t.lanes|=e;var n=t.alternate;n!==null&&(n.lanes|=e),Bc(t.return,e,l)}function Ms(t,e,l,n,a,i){var u=t.memoizedState;u===null?t.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:i}:(u.isBackwards=e,u.rendering=null,u.renderingStartTime=0,u.last=n,u.tail=l,u.tailMode=a,u.treeForkCount=i)}function Uf(t,e,l){var n=e.pendingProps,a=n.revealOrder,i=n.tail;n=n.children;var u=ce.current,f=(u&2)!==0;if(f?(u=u&1|2,e.flags|=128):u&=1,Z(ce,u),we(t,e,n,l),n=Ut?ii:0,!f&&t!==null&&(t.flags&128)!==0)t:for(t=e.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&Rf(t,l,e);else if(t.tag===19)Rf(t,l,e);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break t;for(;t.sibling===null;){if(t.return===null||t.return===e)break t;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(a){case"forwards":for(l=e.child,a=null;l!==null;)t=l.alternate,t!==null&&pu(t)===null&&(a=l),l=l.sibling;l=a,l===null?(a=e.child,e.child=null):(a=l.sibling,l.sibling=null),Ms(e,!1,a,l,i,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=e.child,e.child=null;a!==null;){if(t=a.alternate,t!==null&&pu(t)===null){e.child=a;break}t=a.sibling,a.sibling=l,l=a,a=t}Ms(e,!0,l,null,i,n);break;case"together":Ms(e,!1,null,null,void 0,n);break;default:e.memoizedState=null}return e.child}function $l(t,e,l){if(t!==null&&(e.dependencies=t.dependencies),An|=e.lanes,(l&e.childLanes)===0)if(t!==null){if(Ca(t,e,l,!1),(l&e.childLanes)===0)return null}else return null;if(t!==null&&e.child!==t.child)throw Error(r(153));if(e.child!==null){for(t=e.child,l=Xl(t,t.pendingProps),e.child=l,l.return=e;t.sibling!==null;)t=t.sibling,l=l.sibling=Xl(t,t.pendingProps),l.return=e;l.sibling=null}return e.child}function Cs(t,e){return(t.lanes&e)!==0?!0:(t=t.dependencies,!!(t!==null&&su(t)))}function nh(t,e,l){switch(e.tag){case 3:Ot(e,e.stateNode.containerInfo),bn(e,he,t.memoizedState.cache),Fn();break;case 27:case 5:Wt(e);break;case 4:Ot(e,e.stateNode.containerInfo);break;case 10:bn(e,e.type,e.memoizedProps.value);break;case 31:if(e.memoizedState!==null)return e.flags|=128,$c(e),null;break;case 13:var n=e.memoizedState;if(n!==null)return n.dehydrated!==null?(Mn(e),e.flags|=128,null):(l&e.child.childLanes)!==0?_f(t,e,l):(Mn(e),t=$l(t,e,l),t!==null?t.sibling:null);Mn(e);break;case 19:var a=(t.flags&128)!==0;if(n=(l&e.childLanes)!==0,n||(Ca(t,e,l,!1),n=(l&e.childLanes)!==0),a){if(n)return Uf(t,e,l);e.flags|=128}if(a=e.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),Z(ce,ce.current),n)break;return null;case 22:return e.lanes=0,Af(t,e,l,e.pendingProps);case 24:bn(e,he,t.memoizedState.cache)}return $l(t,e,l)}function Hf(t,e,l){if(t!==null)if(t.memoizedProps!==e.pendingProps)ge=!0;else{if(!Cs(t,l)&&(e.flags&128)===0)return ge=!1,nh(t,e,l);ge=(t.flags&131072)!==0}else ge=!1,Ut&&(e.flags&1048576)!==0&&hr(e,ii,e.index);switch(e.lanes=0,e.tag){case 16:t:{var n=e.pendingProps;if(t=ta(e.elementType),e.type=t,typeof t=="function")Dc(t)?(n=aa(t,n),e.tag=1,e=zf(null,e,t,n,l)):(e.tag=0,e=ys(null,e,t,n,l));else{if(t!=null){var a=t.$$typeof;if(a===ut){e.tag=11,e=Cf(null,e,t,n,l);break t}else if(a===F){e.tag=14,e=wf(null,e,t,n,l);break t}}throw e=Nt(t)||t,Error(r(306,e,""))}}return e;case 0:return ys(t,e,e.type,e.pendingProps,l);case 1:return n=e.type,a=aa(n,e.pendingProps),zf(t,e,n,a,l);case 3:t:{if(Ot(e,e.stateNode.containerInfo),t===null)throw Error(r(387));n=e.pendingProps;var i=e.memoizedState;a=i.element,Qc(t,e),hi(e,n,null,l);var u=e.memoizedState;if(n=u.cache,bn(e,he,n),n!==i.cache&&Lc(e,[he],l,!0),di(),n=u.element,i.isDehydrated)if(i={element:n,isDehydrated:!1,cache:u.cache},e.updateQueue.baseState=i,e.memoizedState=i,e.flags&256){e=Of(t,e,n,l);break t}else if(n!==a){a=il(Error(r(424)),e),ui(a),e=Of(t,e,n,l);break t}else for(t=e.stateNode.containerInfo,t.nodeType===9?t=t.body:t=t.nodeName==="HTML"?t.ownerDocument.body:t,te=rl(t.firstChild),Me=e,Ut=!0,yn=null,sl=!0,l=jr(e,null,n,l),e.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Fn(),n===a){e=$l(t,e,l);break t}we(t,e,n,l)}e=e.child}return e;case 26:return Au(t,e),t===null?(l=Kd(e.type,null,e.pendingProps,null))?e.memoizedState=l:Ut||(l=e.type,t=e.pendingProps,n=Qu(P.current).createElement(l),n[ye]=e,n[De]=t,je(n,l,t),re(n),e.stateNode=n):e.memoizedState=Kd(e.type,t.memoizedProps,e.pendingProps,t.memoizedState),null;case 27:return Wt(e),t===null&&Ut&&(n=e.stateNode=Qd(e.type,e.pendingProps,P.current),Me=e,sl=!0,a=te,On(e.type)?(no=a,te=rl(n.firstChild)):te=a),we(t,e,e.pendingProps.children,l),Au(t,e),t===null&&(e.flags|=4194304),e.child;case 5:return t===null&&Ut&&((a=n=te)&&(n=_h(n,e.type,e.pendingProps,sl),n!==null?(e.stateNode=n,Me=e,te=rl(n.firstChild),sl=!1,a=!0):a=!1),a||vn(e)),Wt(e),a=e.type,i=e.pendingProps,u=t!==null?t.memoizedProps:null,n=i.children,Is(a,i)?n=null:u!==null&&Is(a,u)&&(e.flags|=32),e.memoizedState!==null&&(a=Wc(t,e,J1,null,null,l),_i._currentValue=a),Au(t,e),we(t,e,n,l),e.child;case 6:return t===null&&Ut&&((t=l=te)&&(l=Rh(l,e.pendingProps,sl),l!==null?(e.stateNode=l,Me=e,te=null,t=!0):t=!1),t||vn(e)),null;case 13:return _f(t,e,l);case 4:return Ot(e,e.stateNode.containerInfo),n=e.pendingProps,t===null?e.child=la(e,null,n,l):we(t,e,n,l),e.child;case 11:return Cf(t,e,e.type,e.pendingProps,l);case 7:return we(t,e,e.pendingProps,l),e.child;case 8:return we(t,e,e.pendingProps.children,l),e.child;case 12:return we(t,e,e.pendingProps.children,l),e.child;case 10:return n=e.pendingProps,bn(e,e.type,n.value),we(t,e,n.children,l),e.child;case 9:return a=e.type._context,n=e.pendingProps.children,In(e),a=Ce(a),n=n(a),e.flags|=1,we(t,e,n,l),e.child;case 14:return wf(t,e,e.type,e.pendingProps,l);case 15:return jf(t,e,e.type,e.pendingProps,l);case 19:return Uf(t,e,l);case 31:return lh(t,e,l);case 22:return Af(t,e,l,e.pendingProps);case 24:return In(e),n=Ce(he),t===null?(a=Yc(),a===null&&(a=Ft,i=qc(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=l),a=i),e.memoizedState={parent:n,cache:a},Xc(e),bn(e,he,a)):((t.lanes&l)!==0&&(Qc(t,e),hi(e,null,null,l),di()),a=t.memoizedState,i=e.memoizedState,a.parent!==n?(a={parent:n,cache:n},e.memoizedState=a,e.lanes===0&&(e.memoizedState=e.updateQueue.baseState=a),bn(e,he,n)):(n=i.cache,bn(e,he,n),n!==a.cache&&Lc(e,[he],l,!0))),we(t,e,e.pendingProps.children,l),e.child;case 29:throw e.pendingProps}throw Error(r(156,e.tag))}function Fl(t){t.flags|=4}function ws(t,e,l,n,a){if((e=(t.mode&32)!==0)&&(e=!1),e){if(t.flags|=16777216,(a&335544128)===a)if(t.stateNode.complete)t.flags|=8192;else if(od())t.flags|=8192;else throw ea=du,Gc}else t.flags&=-16777217}function Bf(t,e){if(e.type!=="stylesheet"||(e.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Id(e))if(od())t.flags|=8192;else throw ea=du,Gc}function Du(t,e){e!==null&&(t.flags|=4),t.flags&16384&&(e=t.tag!==22?ie():536870912,t.lanes|=e,Ha|=e)}function bi(t,e){if(!Ut)switch(t.tailMode){case"hidden":e=t.tail;for(var l=null;e!==null;)e.alternate!==null&&(l=e),e=e.sibling;l===null?t.tail=null:l.sibling=null;break;case"collapsed":l=t.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?e||t.tail===null?t.tail=null:t.tail.sibling=null:n.sibling=null}}function ee(t){var e=t.alternate!==null&&t.alternate.child===t.child,l=0,n=0;if(e)for(var a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=t,a=a.sibling;else for(a=t.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=t,a=a.sibling;return t.subtreeFlags|=n,t.childLanes=l,e}function ah(t,e,l){var n=e.pendingProps;switch(_c(e),e.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ee(e),null;case 1:return ee(e),null;case 3:return l=e.stateNode,n=null,t!==null&&(n=t.memoizedState.cache),e.memoizedState.cache!==n&&(e.flags|=2048),Vl(he),Dt(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(t===null||t.child===null)&&(Ma(e)?Fl(e):t===null||t.memoizedState.isDehydrated&&(e.flags&256)===0||(e.flags|=1024,Uc())),ee(e),null;case 26:var a=e.type,i=e.memoizedState;return t===null?(Fl(e),i!==null?(ee(e),Bf(e,i)):(ee(e),ws(e,a,null,n,l))):i?i!==t.memoizedState?(Fl(e),ee(e),Bf(e,i)):(ee(e),e.flags&=-16777217):(t=t.memoizedProps,t!==n&&Fl(e),ee(e),ws(e,a,t,n,l)),null;case 27:if(Ml(e),l=P.current,a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Fl(e);else{if(!n){if(e.stateNode===null)throw Error(r(166));return ee(e),null}t=V.current,Ma(e)?gr(e):(t=Qd(a,n,l),e.stateNode=t,Fl(e))}return ee(e),null;case 5:if(Ml(e),a=e.type,t!==null&&e.stateNode!=null)t.memoizedProps!==n&&Fl(e);else{if(!n){if(e.stateNode===null)throw Error(r(166));return ee(e),null}if(i=V.current,Ma(e))gr(e);else{var u=Qu(P.current);switch(i){case 1:i=u.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=u.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=u.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=u.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof n.is=="string"?u.createElement("select",{is:n.is}):u.createElement("select"),n.multiple?i.multiple=!0:n.size&&(i.size=n.size);break;default:i=typeof n.is=="string"?u.createElement(a,{is:n.is}):u.createElement(a)}}i[ye]=e,i[De]=n;t:for(u=e.child;u!==null;){if(u.tag===5||u.tag===6)i.appendChild(u.stateNode);else if(u.tag!==4&&u.tag!==27&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===e)break t;for(;u.sibling===null;){if(u.return===null||u.return===e)break t;u=u.return}u.sibling.return=u.return,u=u.sibling}e.stateNode=i;t:switch(je(i,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break t;case"img":n=!0;break t;default:n=!1}n&&Fl(e)}}return ee(e),ws(e,e.type,t===null?null:t.memoizedProps,e.pendingProps,l),null;case 6:if(t&&e.stateNode!=null)t.memoizedProps!==n&&Fl(e);else{if(typeof n!="string"&&e.stateNode===null)throw Error(r(166));if(t=P.current,Ma(e)){if(t=e.stateNode,l=e.memoizedProps,n=null,a=Me,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}t[ye]=e,t=!!(t.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||_d(t.nodeValue,l)),t||vn(e,!0)}else t=Qu(t).createTextNode(n),t[ye]=e,e.stateNode=t}return ee(e),null;case 31:if(l=e.memoizedState,t===null||t.memoizedState!==null){if(n=Ma(e),l!==null){if(t===null){if(!n)throw Error(r(318));if(t=e.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(r(557));t[ye]=e}else Fn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ee(e),t=!1}else l=Uc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=l),t=!0;if(!t)return e.flags&256?(We(e),e):(We(e),null);if((e.flags&128)!==0)throw Error(r(558))}return ee(e),null;case 13:if(n=e.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(a=Ma(e),n!==null&&n.dehydrated!==null){if(t===null){if(!a)throw Error(r(318));if(a=e.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[ye]=e}else Fn(),(e.flags&128)===0&&(e.memoizedState=null),e.flags|=4;ee(e),a=!1}else a=Uc(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),a=!0;if(!a)return e.flags&256?(We(e),e):(We(e),null)}return We(e),(e.flags&128)!==0?(e.lanes=l,e):(l=n!==null,t=t!==null&&t.memoizedState!==null,l&&(n=e.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),i=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(i=n.memoizedState.cachePool.pool),i!==a&&(n.flags|=2048)),l!==t&&l&&(e.child.flags|=8192),Du(e,e.updateQueue),ee(e),null);case 4:return Dt(),t===null&&Ks(e.stateNode.containerInfo),ee(e),null;case 10:return Vl(e.type),ee(e),null;case 19:if(T(ce),n=e.memoizedState,n===null)return ee(e),null;if(a=(e.flags&128)!==0,i=n.rendering,i===null)if(a)bi(n,!1);else{if(ae!==0||t!==null&&(t.flags&128)!==0)for(t=e.child;t!==null;){if(i=pu(t),i!==null){for(e.flags|=128,bi(n,!1),t=i.updateQueue,e.updateQueue=t,Du(e,t),e.subtreeFlags=0,t=l,l=e.child;l!==null;)rr(l,t),l=l.sibling;return Z(ce,ce.current&1|2),Ut&&Ql(e,n.treeForkCount),e.child}t=t.sibling}n.tail!==null&&Ee()>Ru&&(e.flags|=128,a=!0,bi(n,!1),e.lanes=4194304)}else{if(!a)if(t=pu(i),t!==null){if(e.flags|=128,a=!0,t=t.updateQueue,e.updateQueue=t,Du(e,t),bi(n,!0),n.tail===null&&n.tailMode==="hidden"&&!i.alternate&&!Ut)return ee(e),null}else 2*Ee()-n.renderingStartTime>Ru&&l!==536870912&&(e.flags|=128,a=!0,bi(n,!1),e.lanes=4194304);n.isBackwards?(i.sibling=e.child,e.child=i):(t=n.last,t!==null?t.sibling=i:e.child=i,n.last=i)}return n.tail!==null?(t=n.tail,n.rendering=t,n.tail=t.sibling,n.renderingStartTime=Ee(),t.sibling=null,l=ce.current,Z(ce,a?l&1|2:l&1),Ut&&Ql(e,n.treeForkCount),t):(ee(e),null);case 22:case 23:return We(e),Jc(),n=e.memoizedState!==null,t!==null?t.memoizedState!==null!==n&&(e.flags|=8192):n&&(e.flags|=8192),n?(l&536870912)!==0&&(e.flags&128)===0&&(ee(e),e.subtreeFlags&6&&(e.flags|=8192)):ee(e),l=e.updateQueue,l!==null&&Du(e,l.retryQueue),l=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),n=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),n!==l&&(e.flags|=2048),t!==null&&T(Pn),null;case 24:return l=null,t!==null&&(l=t.memoizedState.cache),e.memoizedState.cache!==l&&(e.flags|=2048),Vl(he),ee(e),null;case 25:return null;case 30:return null}throw Error(r(156,e.tag))}function ih(t,e){switch(_c(e),e.tag){case 1:return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 3:return Vl(he),Dt(),t=e.flags,(t&65536)!==0&&(t&128)===0?(e.flags=t&-65537|128,e):null;case 26:case 27:case 5:return Ml(e),null;case 31:if(e.memoizedState!==null){if(We(e),e.alternate===null)throw Error(r(340));Fn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 13:if(We(e),t=e.memoizedState,t!==null&&t.dehydrated!==null){if(e.alternate===null)throw Error(r(340));Fn()}return t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 19:return T(ce),null;case 4:return Dt(),null;case 10:return Vl(e.type),null;case 22:case 23:return We(e),Jc(),t!==null&&T(Pn),t=e.flags,t&65536?(e.flags=t&-65537|128,e):null;case 24:return Vl(he),null;case 25:return null;default:return null}}function Lf(t,e){switch(_c(e),e.tag){case 3:Vl(he),Dt();break;case 26:case 27:case 5:Ml(e);break;case 4:Dt();break;case 31:e.memoizedState!==null&&We(e);break;case 13:We(e);break;case 19:T(ce);break;case 10:Vl(e.type);break;case 22:case 23:We(e),Jc(),t!==null&&T(Pn);break;case 24:Vl(he)}}function xi(t,e){try{var l=e.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&t)===t){n=void 0;var i=l.create,u=l.inst;n=i(),u.destroy=n}l=l.next}while(l!==a)}}catch(f){Xt(e,e.return,f)}}function wn(t,e,l){try{var n=e.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&t)===t){var u=n.inst,f=u.destroy;if(f!==void 0){u.destroy=void 0,a=e;var v=l,w=f;try{w()}catch(R){Xt(a,v,R)}}}n=n.next}while(n!==i)}}catch(R){Xt(e,e.return,R)}}function qf(t){var e=t.updateQueue;if(e!==null){var l=t.stateNode;try{Nr(e,l)}catch(n){Xt(t,t.return,n)}}}function kf(t,e,l){l.props=aa(t.type,t.memoizedProps),l.state=t.memoizedState;try{l.componentWillUnmount()}catch(n){Xt(t,e,n)}}function Si(t,e){try{var l=t.ref;if(l!==null){switch(t.tag){case 26:case 27:case 5:var n=t.stateNode;break;case 30:n=t.stateNode;break;default:n=t.stateNode}typeof l=="function"?t.refCleanup=l(n):l.current=n}}catch(a){Xt(t,e,a)}}function Rl(t,e){var l=t.ref,n=t.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Xt(t,e,a)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){Xt(t,e,a)}else l.current=null}function Yf(t){var e=t.type,l=t.memoizedProps,n=t.stateNode;try{t:switch(e){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break t;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){Xt(t,t.return,a)}}function js(t,e,l){try{var n=t.stateNode;Ah(n,t.type,l,e),n[De]=e}catch(a){Xt(t,t.return,a)}}function Gf(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&On(t.type)||t.tag===4}function As(t){t:for(;;){for(;t.sibling===null;){if(t.return===null||Gf(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&On(t.type)||t.flags&2||t.child===null||t.tag===4)continue t;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function Ns(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(t,e):(e=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,e.appendChild(t),l=l._reactRootContainer,l!=null||e.onclick!==null||(e.onclick=at));else if(n!==4&&(n===27&&On(t.type)&&(l=t.stateNode,e=null),t=t.child,t!==null))for(Ns(t,e,l),t=t.sibling;t!==null;)Ns(t,e,l),t=t.sibling}function Tu(t,e,l){var n=t.tag;if(n===5||n===6)t=t.stateNode,e?l.insertBefore(t,e):l.appendChild(t);else if(n!==4&&(n===27&&On(t.type)&&(l=t.stateNode),t=t.child,t!==null))for(Tu(t,e,l),t=t.sibling;t!==null;)Tu(t,e,l),t=t.sibling}function Xf(t){var e=t.stateNode,l=t.memoizedProps;try{for(var n=t.type,a=e.attributes;a.length;)e.removeAttributeNode(a[0]);je(e,n,l),e[ye]=t,e[De]=l}catch(i){Xt(t,t.return,i)}}var Wl=!1,pe=!1,Ds=!1,Qf=typeof WeakSet=="function"?WeakSet:Set,Se=null;function uh(t,e){if(t=t.containerInfo,Fs=Wu,t=er(t),Ec(t)){if("selectionStart"in t)var l={start:t.selectionStart,end:t.selectionEnd};else t:{l=(l=t.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,i=n.focusNode;n=n.focusOffset;try{l.nodeType,i.nodeType}catch{l=null;break t}var u=0,f=-1,v=-1,w=0,R=0,L=t,A=null;e:for(;;){for(var O;L!==l||a!==0&&L.nodeType!==3||(f=u+a),L!==i||n!==0&&L.nodeType!==3||(v=u+n),L.nodeType===3&&(u+=L.nodeValue.length),(O=L.firstChild)!==null;)A=L,L=O;for(;;){if(L===t)break e;if(A===l&&++w===a&&(f=u),A===i&&++R===n&&(v=u),(O=L.nextSibling)!==null)break;L=A,A=L.parentNode}L=O}l=f===-1||v===-1?null:{start:f,end:v}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ws={focusedElem:t,selectionRange:l},Wu=!1,Se=e;Se!==null;)if(e=Se,t=e.child,(e.subtreeFlags&1028)!==0&&t!==null)t.return=e,Se=t;else for(;Se!==null;){switch(e=Se,i=e.alternate,t=e.flags,e.tag){case 0:if((t&4)!==0&&(t=e.updateQueue,t=t!==null?t.events:null,t!==null))for(l=0;l<t.length;l++)a=t[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&i!==null){t=void 0,l=e,a=i.memoizedProps,i=i.memoizedState,n=l.stateNode;try{var it=aa(l.type,a);t=n.getSnapshotBeforeUpdate(it,i),n.__reactInternalSnapshotBeforeUpdate=t}catch(pt){Xt(l,l.return,pt)}}break;case 3:if((t&1024)!==0){if(t=e.stateNode.containerInfo,l=t.nodeType,l===9)to(t);else if(l===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":to(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(r(163))}if(t=e.sibling,t!==null){t.return=e.return,Se=t;break}Se=e.return}}function Zf(t,e,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:Pl(t,l),n&4&&xi(5,l);break;case 1:if(Pl(t,l),n&4)if(t=l.stateNode,e===null)try{t.componentDidMount()}catch(u){Xt(l,l.return,u)}else{var a=aa(l.type,e.memoizedProps);e=e.memoizedState;try{t.componentDidUpdate(a,e,t.__reactInternalSnapshotBeforeUpdate)}catch(u){Xt(l,l.return,u)}}n&64&&qf(l),n&512&&Si(l,l.return);break;case 3:if(Pl(t,l),n&64&&(t=l.updateQueue,t!==null)){if(e=null,l.child!==null)switch(l.child.tag){case 27:case 5:e=l.child.stateNode;break;case 1:e=l.child.stateNode}try{Nr(t,e)}catch(u){Xt(l,l.return,u)}}break;case 27:e===null&&n&4&&Xf(l);case 26:case 5:Pl(t,l),e===null&&n&4&&Yf(l),n&512&&Si(l,l.return);break;case 12:Pl(t,l);break;case 31:Pl(t,l),n&4&&Jf(t,l);break;case 13:Pl(t,l),n&4&&$f(t,l),n&64&&(t=l.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(l=gh.bind(null,l),Uh(t,l))));break;case 22:if(n=l.memoizedState!==null||Wl,!n){e=e!==null&&e.memoizedState!==null||pe,a=Wl;var i=pe;Wl=n,(pe=e)&&!i?tn(t,l,(l.subtreeFlags&8772)!==0):Pl(t,l),Wl=a,pe=i}break;case 30:break;default:Pl(t,l)}}function Vf(t){var e=t.alternate;e!==null&&(t.alternate=null,Vf(e)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(e=t.stateNode,e!==null&&Za(e)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var le=null,ke=!1;function Il(t,e,l){for(l=l.child;l!==null;)Kf(t,e,l),l=l.sibling}function Kf(t,e,l){if(xe&&typeof xe.onCommitFiberUnmount=="function")try{xe.onCommitFiberUnmount(jl,l)}catch{}switch(l.tag){case 26:pe||Rl(l,e),Il(t,e,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:pe||Rl(l,e);var n=le,a=ke;On(l.type)&&(le=l.stateNode,ke=!1),Il(t,e,l),Ti(l.stateNode),le=n,ke=a;break;case 5:pe||Rl(l,e);case 6:if(n=le,a=ke,le=null,Il(t,e,l),le=n,ke=a,le!==null)if(ke)try{(le.nodeType===9?le.body:le.nodeName==="HTML"?le.ownerDocument.body:le).removeChild(l.stateNode)}catch(i){Xt(l,e,i)}else try{le.removeChild(l.stateNode)}catch(i){Xt(l,e,i)}break;case 18:le!==null&&(ke?(t=le,qd(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,l.stateNode),Qa(t)):qd(le,l.stateNode));break;case 4:n=le,a=ke,le=l.stateNode.containerInfo,ke=!0,Il(t,e,l),le=n,ke=a;break;case 0:case 11:case 14:case 15:wn(2,l,e),pe||wn(4,l,e),Il(t,e,l);break;case 1:pe||(Rl(l,e),n=l.stateNode,typeof n.componentWillUnmount=="function"&&kf(l,e,n)),Il(t,e,l);break;case 21:Il(t,e,l);break;case 22:pe=(n=pe)||l.memoizedState!==null,Il(t,e,l),pe=n;break;default:Il(t,e,l)}}function Jf(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{Qa(t)}catch(l){Xt(e,e.return,l)}}}function $f(t,e){if(e.memoizedState===null&&(t=e.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{Qa(t)}catch(l){Xt(e,e.return,l)}}function ch(t){switch(t.tag){case 31:case 13:case 19:var e=t.stateNode;return e===null&&(e=t.stateNode=new Qf),e;case 22:return t=t.stateNode,e=t._retryCache,e===null&&(e=t._retryCache=new Qf),e;default:throw Error(r(435,t.tag))}}function zu(t,e){var l=ch(t);e.forEach(function(n){if(!l.has(n)){l.add(n);var a=ph.bind(null,t,n);n.then(a,a)}})}function Ye(t,e){var l=e.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],i=t,u=e,f=u;t:for(;f!==null;){switch(f.tag){case 27:if(On(f.type)){le=f.stateNode,ke=!1;break t}break;case 5:le=f.stateNode,ke=!1;break t;case 3:case 4:le=f.stateNode.containerInfo,ke=!0;break t}f=f.return}if(le===null)throw Error(r(160));Kf(i,u,a),le=null,ke=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(e.subtreeFlags&13886)for(e=e.child;e!==null;)Ff(e,t),e=e.sibling}var Sl=null;function Ff(t,e){var l=t.alternate,n=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:Ye(e,t),Ge(t),n&4&&(wn(3,t,t.return),xi(3,t),wn(5,t,t.return));break;case 1:Ye(e,t),Ge(t),n&512&&(pe||l===null||Rl(l,l.return)),n&64&&Wl&&(t=t.updateQueue,t!==null&&(n=t.callbacks,n!==null&&(l=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=Sl;if(Ye(e,t),Ge(t),n&512&&(pe||l===null||Rl(l,l.return)),n&4){var i=l!==null?l.memoizedState:null;if(n=t.memoizedState,l===null)if(n===null)if(t.stateNode===null){t:{n=t.type,l=t.memoizedProps,a=a.ownerDocument||a;e:switch(n){case"title":i=a.getElementsByTagName("title")[0],(!i||i[dn]||i[ye]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(n),a.head.insertBefore(i,a.querySelector("head > title"))),je(i,n,l),i[ye]=t,re(i),n=i;break t;case"link":var u=Fd("link","href",a).get(n+(l.href||""));if(u){for(var f=0;f<u.length;f++)if(i=u[f],i.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&i.getAttribute("rel")===(l.rel==null?null:l.rel)&&i.getAttribute("title")===(l.title==null?null:l.title)&&i.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){u.splice(f,1);break e}}i=a.createElement(n),je(i,n,l),a.head.appendChild(i);break;case"meta":if(u=Fd("meta","content",a).get(n+(l.content||""))){for(f=0;f<u.length;f++)if(i=u[f],i.getAttribute("content")===(l.content==null?null:""+l.content)&&i.getAttribute("name")===(l.name==null?null:l.name)&&i.getAttribute("property")===(l.property==null?null:l.property)&&i.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&i.getAttribute("charset")===(l.charSet==null?null:l.charSet)){u.splice(f,1);break e}}i=a.createElement(n),je(i,n,l),a.head.appendChild(i);break;default:throw Error(r(468,n))}i[ye]=t,re(i),n=i}t.stateNode=n}else Wd(a,t.type,t.stateNode);else t.stateNode=$d(a,n,t.memoizedProps);else i!==n?(i===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):i.count--,n===null?Wd(a,t.type,t.stateNode):$d(a,n,t.memoizedProps)):n===null&&t.stateNode!==null&&js(t,t.memoizedProps,l.memoizedProps)}break;case 27:Ye(e,t),Ge(t),n&512&&(pe||l===null||Rl(l,l.return)),l!==null&&n&4&&js(t,t.memoizedProps,l.memoizedProps);break;case 5:if(Ye(e,t),Ge(t),n&512&&(pe||l===null||Rl(l,l.return)),t.flags&32){a=t.stateNode;try{mn(a,"")}catch(it){Xt(t,t.return,it)}}n&4&&t.stateNode!=null&&(a=t.memoizedProps,js(t,a,l!==null?l.memoizedProps:a)),n&1024&&(Ds=!0);break;case 6:if(Ye(e,t),Ge(t),n&4){if(t.stateNode===null)throw Error(r(162));n=t.memoizedProps,l=t.stateNode;try{l.nodeValue=n}catch(it){Xt(t,t.return,it)}}break;case 3:if(Ku=null,a=Sl,Sl=Zu(e.containerInfo),Ye(e,t),Sl=a,Ge(t),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Qa(e.containerInfo)}catch(it){Xt(t,t.return,it)}Ds&&(Ds=!1,Wf(t));break;case 4:n=Sl,Sl=Zu(t.stateNode.containerInfo),Ye(e,t),Ge(t),Sl=n;break;case 12:Ye(e,t),Ge(t);break;case 31:Ye(e,t),Ge(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,zu(t,n)));break;case 13:Ye(e,t),Ge(t),t.child.flags&8192&&t.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(_u=Ee()),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,zu(t,n)));break;case 22:a=t.memoizedState!==null;var v=l!==null&&l.memoizedState!==null,w=Wl,R=pe;if(Wl=w||a,pe=R||v,Ye(e,t),pe=R,Wl=w,Ge(t),n&8192)t:for(e=t.stateNode,e._visibility=a?e._visibility&-2:e._visibility|1,a&&(l===null||v||Wl||pe||ia(t)),l=null,e=t;;){if(e.tag===5||e.tag===26){if(l===null){v=l=e;try{if(i=v.stateNode,a)u=i.style,typeof u.setProperty=="function"?u.setProperty("display","none","important"):u.display="none";else{f=v.stateNode;var L=v.memoizedProps.style,A=L!=null&&L.hasOwnProperty("display")?L.display:null;f.style.display=A==null||typeof A=="boolean"?"":(""+A).trim()}}catch(it){Xt(v,v.return,it)}}}else if(e.tag===6){if(l===null){v=e;try{v.stateNode.nodeValue=a?"":v.memoizedProps}catch(it){Xt(v,v.return,it)}}}else if(e.tag===18){if(l===null){v=e;try{var O=v.stateNode;a?kd(O,!0):kd(v.stateNode,!1)}catch(it){Xt(v,v.return,it)}}}else if((e.tag!==22&&e.tag!==23||e.memoizedState===null||e===t)&&e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break t;for(;e.sibling===null;){if(e.return===null||e.return===t)break t;l===e&&(l=null),e=e.return}l===e&&(l=null),e.sibling.return=e.return,e=e.sibling}n&4&&(n=t.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,zu(t,l))));break;case 19:Ye(e,t),Ge(t),n&4&&(n=t.updateQueue,n!==null&&(t.updateQueue=null,zu(t,n)));break;case 30:break;case 21:break;default:Ye(e,t),Ge(t)}}function Ge(t){var e=t.flags;if(e&2){try{for(var l,n=t.return;n!==null;){if(Gf(n)){l=n;break}n=n.return}if(l==null)throw Error(r(160));switch(l.tag){case 27:var a=l.stateNode,i=As(t);Tu(t,i,a);break;case 5:var u=l.stateNode;l.flags&32&&(mn(u,""),l.flags&=-33);var f=As(t);Tu(t,f,u);break;case 3:case 4:var v=l.stateNode.containerInfo,w=As(t);Ns(t,w,v);break;default:throw Error(r(161))}}catch(R){Xt(t,t.return,R)}t.flags&=-3}e&4096&&(t.flags&=-4097)}function Wf(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var e=t;Wf(e),e.tag===5&&e.flags&1024&&e.stateNode.reset(),t=t.sibling}}function Pl(t,e){if(e.subtreeFlags&8772)for(e=e.child;e!==null;)Zf(t,e.alternate,e),e=e.sibling}function ia(t){for(t=t.child;t!==null;){var e=t;switch(e.tag){case 0:case 11:case 14:case 15:wn(4,e,e.return),ia(e);break;case 1:Rl(e,e.return);var l=e.stateNode;typeof l.componentWillUnmount=="function"&&kf(e,e.return,l),ia(e);break;case 27:Ti(e.stateNode);case 26:case 5:Rl(e,e.return),ia(e);break;case 22:e.memoizedState===null&&ia(e);break;case 30:ia(e);break;default:ia(e)}t=t.sibling}}function tn(t,e,l){for(l=l&&(e.subtreeFlags&8772)!==0,e=e.child;e!==null;){var n=e.alternate,a=t,i=e,u=i.flags;switch(i.tag){case 0:case 11:case 15:tn(a,i,l),xi(4,i);break;case 1:if(tn(a,i,l),n=i,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(w){Xt(n,n.return,w)}if(n=i,a=n.updateQueue,a!==null){var f=n.stateNode;try{var v=a.shared.hiddenCallbacks;if(v!==null)for(a.shared.hiddenCallbacks=null,a=0;a<v.length;a++)Ar(v[a],f)}catch(w){Xt(n,n.return,w)}}l&&u&64&&qf(i),Si(i,i.return);break;case 27:Xf(i);case 26:case 5:tn(a,i,l),l&&n===null&&u&4&&Yf(i),Si(i,i.return);break;case 12:tn(a,i,l);break;case 31:tn(a,i,l),l&&u&4&&Jf(a,i);break;case 13:tn(a,i,l),l&&u&4&&$f(a,i);break;case 22:i.memoizedState===null&&tn(a,i,l),Si(i,i.return);break;case 30:break;default:tn(a,i,l)}e=e.sibling}}function Ts(t,e){var l=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),t=null,e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(t=e.memoizedState.cachePool.pool),t!==l&&(t!=null&&t.refCount++,l!=null&&ci(l))}function zs(t,e){t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ci(t))}function El(t,e,l,n){if(e.subtreeFlags&10256)for(e=e.child;e!==null;)If(t,e,l,n),e=e.sibling}function If(t,e,l,n){var a=e.flags;switch(e.tag){case 0:case 11:case 15:El(t,e,l,n),a&2048&&xi(9,e);break;case 1:El(t,e,l,n);break;case 3:El(t,e,l,n),a&2048&&(t=null,e.alternate!==null&&(t=e.alternate.memoizedState.cache),e=e.memoizedState.cache,e!==t&&(e.refCount++,t!=null&&ci(t)));break;case 12:if(a&2048){El(t,e,l,n),t=e.stateNode;try{var i=e.memoizedProps,u=i.id,f=i.onPostCommit;typeof f=="function"&&f(u,e.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(v){Xt(e,e.return,v)}}else El(t,e,l,n);break;case 31:El(t,e,l,n);break;case 13:El(t,e,l,n);break;case 23:break;case 22:i=e.stateNode,u=e.alternate,e.memoizedState!==null?i._visibility&2?El(t,e,l,n):Ei(t,e):i._visibility&2?El(t,e,l,n):(i._visibility|=2,_a(t,e,l,n,(e.subtreeFlags&10256)!==0||!1)),a&2048&&Ts(u,e);break;case 24:El(t,e,l,n),a&2048&&zs(e.alternate,e);break;default:El(t,e,l,n)}}function _a(t,e,l,n,a){for(a=a&&((e.subtreeFlags&10256)!==0||!1),e=e.child;e!==null;){var i=t,u=e,f=l,v=n,w=u.flags;switch(u.tag){case 0:case 11:case 15:_a(i,u,f,v,a),xi(8,u);break;case 23:break;case 22:var R=u.stateNode;u.memoizedState!==null?R._visibility&2?_a(i,u,f,v,a):Ei(i,u):(R._visibility|=2,_a(i,u,f,v,a)),a&&w&2048&&Ts(u.alternate,u);break;case 24:_a(i,u,f,v,a),a&&w&2048&&zs(u.alternate,u);break;default:_a(i,u,f,v,a)}e=e.sibling}}function Ei(t,e){if(e.subtreeFlags&10256)for(e=e.child;e!==null;){var l=t,n=e,a=n.flags;switch(n.tag){case 22:Ei(l,n),a&2048&&Ts(n.alternate,n);break;case 24:Ei(l,n),a&2048&&zs(n.alternate,n);break;default:Ei(l,n)}e=e.sibling}}var Mi=8192;function Ra(t,e,l){if(t.subtreeFlags&Mi)for(t=t.child;t!==null;)Pf(t,e,l),t=t.sibling}function Pf(t,e,l){switch(t.tag){case 26:Ra(t,e,l),t.flags&Mi&&t.memoizedState!==null&&Kh(l,Sl,t.memoizedState,t.memoizedProps);break;case 5:Ra(t,e,l);break;case 3:case 4:var n=Sl;Sl=Zu(t.stateNode.containerInfo),Ra(t,e,l),Sl=n;break;case 22:t.memoizedState===null&&(n=t.alternate,n!==null&&n.memoizedState!==null?(n=Mi,Mi=16777216,Ra(t,e,l),Mi=n):Ra(t,e,l));break;default:Ra(t,e,l)}}function td(t){var e=t.alternate;if(e!==null&&(t=e.child,t!==null)){e.child=null;do e=t.sibling,t.sibling=null,t=e;while(t!==null)}}function Ci(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Se=n,ld(n,t)}td(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ed(t),t=t.sibling}function ed(t){switch(t.tag){case 0:case 11:case 15:Ci(t),t.flags&2048&&wn(9,t,t.return);break;case 3:Ci(t);break;case 12:Ci(t);break;case 22:var e=t.stateNode;t.memoizedState!==null&&e._visibility&2&&(t.return===null||t.return.tag!==13)?(e._visibility&=-3,Ou(t)):Ci(t);break;default:Ci(t)}}function Ou(t){var e=t.deletions;if((t.flags&16)!==0){if(e!==null)for(var l=0;l<e.length;l++){var n=e[l];Se=n,ld(n,t)}td(t)}for(t=t.child;t!==null;){switch(e=t,e.tag){case 0:case 11:case 15:wn(8,e,e.return),Ou(e);break;case 22:l=e.stateNode,l._visibility&2&&(l._visibility&=-3,Ou(e));break;default:Ou(e)}t=t.sibling}}function ld(t,e){for(;Se!==null;){var l=Se;switch(l.tag){case 0:case 11:case 15:wn(8,l,e);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:ci(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Se=n;else t:for(l=t;Se!==null;){n=Se;var a=n.sibling,i=n.return;if(Vf(n),n===l){Se=null;break t}if(a!==null){a.return=i,Se=a;break t}Se=i}}}var sh={getCacheForType:function(t){var e=Ce(he),l=e.data.get(t);return l===void 0&&(l=t(),e.data.set(t,l)),l},cacheSignal:function(){return Ce(he).controller.signal}},oh=typeof WeakMap=="function"?WeakMap:Map,kt=0,Ft=null,Tt=null,_t=0,Gt=0,Ie=null,jn=!1,Ua=!1,Os=!1,en=0,ae=0,An=0,ua=0,_s=0,Pe=0,Ha=0,wi=null,Xe=null,Rs=!1,_u=0,nd=0,Ru=1/0,Uu=null,Nn=null,be=0,Dn=null,Ba=null,ln=0,Us=0,Hs=null,ad=null,ji=0,Bs=null;function tl(){return(kt&2)!==0&&_t!==0?_t&-_t:D.T!==null?Xs():Xi()}function id(){if(Pe===0)if((_t&536870912)===0||Ut){var t=tt;tt<<=1,(tt&3932160)===0&&(tt=262144),Pe=t}else Pe=536870912;return t=Fe.current,t!==null&&(t.flags|=32),Pe}function Qe(t,e,l){(t===Ft&&(Gt===2||Gt===9)||t.cancelPendingCommit!==null)&&(La(t,0),Tn(t,_t,Pe,!1)),kl(t,l),((kt&2)===0||t!==Ft)&&(t===Ft&&((kt&2)===0&&(ua|=l),ae===4&&Tn(t,_t,Pe,!1)),Ul(t))}function ud(t,e,l){if((kt&6)!==0)throw Error(r(327));var n=!l&&(e&127)===0&&(e&t.expiredLanes)===0||It(t,e),a=n?dh(t,e):qs(t,e,!0),i=n;do{if(a===0){Ua&&!n&&Tn(t,e,0,!1);break}else{if(l=t.current.alternate,i&&!rh(l)){a=qs(t,e,!1),i=!1;continue}if(a===2){if(i=e,t.errorRecoveryDisabledLanes&i)var u=0;else u=t.pendingLanes&-536870913,u=u!==0?u:u&536870912?536870912:0;if(u!==0){e=u;t:{var f=t;a=wi;var v=f.current.memoizedState.isDehydrated;if(v&&(La(f,u).flags|=256),u=qs(f,u,!1),u!==2){if(Os&&!v){f.errorRecoveryDisabledLanes|=i,ua|=i,a=4;break t}i=Xe,Xe=a,i!==null&&(Xe===null?Xe=i:Xe.push.apply(Xe,i))}a=u}if(i=!1,a!==2)continue}}if(a===1){La(t,0),Tn(t,e,0,!0);break}t:{switch(n=t,i=a,i){case 0:case 1:throw Error(r(345));case 4:if((e&4194048)!==e)break;case 6:Tn(n,e,Pe,!jn);break t;case 2:Xe=null;break;case 3:case 5:break;default:throw Error(r(329))}if((e&62914560)===e&&(a=_u+300-Ee(),10<a)){if(Tn(n,e,Pe,!jn),bt(n,0,!0)!==0)break t;ln=e,n.timeoutHandle=Bd(cd.bind(null,n,l,Xe,Uu,Rs,e,Pe,ua,Ha,jn,i,"Throttled",-0,0),a);break t}cd(n,l,Xe,Uu,Rs,e,Pe,ua,Ha,jn,i,null,-0,0)}}break}while(!0);Ul(t)}function cd(t,e,l,n,a,i,u,f,v,w,R,L,A,O){if(t.timeoutHandle=-1,L=e.subtreeFlags,L&8192||(L&16785408)===16785408){L={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:at},Pf(e,i,L);var it=(i&62914560)===i?_u-Ee():(i&4194048)===i?nd-Ee():0;if(it=Jh(L,it),it!==null){ln=i,t.cancelPendingCommit=it(gd.bind(null,t,e,i,l,n,a,u,f,v,R,L,null,A,O)),Tn(t,i,u,!w);return}}gd(t,e,i,l,n,a,u,f,v)}function rh(t){for(var e=t;;){var l=e.tag;if((l===0||l===11||l===15)&&e.flags&16384&&(l=e.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],i=a.getSnapshot;a=a.value;try{if(!Je(i(),a))return!1}catch{return!1}}if(l=e.child,e.subtreeFlags&16384&&l!==null)l.return=e,e=l;else{if(e===t)break;for(;e.sibling===null;){if(e.return===null||e.return===t)return!0;e=e.return}e.sibling.return=e.return,e=e.sibling}}return!0}function Tn(t,e,l,n){e&=~_s,e&=~ua,t.suspendedLanes|=e,t.pingedLanes&=~e,n&&(t.warmLanes|=e),n=t.expirationTimes;for(var a=e;0<a;){var i=31-$t(a),u=1<<i;n[i]=-1,a&=~u}l!==0&&Yi(t,l,e)}function Hu(){return(kt&6)===0?(Ai(0),!1):!0}function Ls(){if(Tt!==null){if(Gt===0)var t=Tt.return;else t=Tt,Zl=Wn=null,ts(t),Na=null,oi=0,t=Tt;for(;t!==null;)Lf(t.alternate,t),t=t.return;Tt=null}}function La(t,e){var l=t.timeoutHandle;l!==-1&&(t.timeoutHandle=-1,Th(l)),l=t.cancelPendingCommit,l!==null&&(t.cancelPendingCommit=null,l()),ln=0,Ls(),Ft=t,Tt=l=Xl(t.current,null),_t=e,Gt=0,Ie=null,jn=!1,Ua=It(t,e),Os=!1,Ha=Pe=_s=ua=An=ae=0,Xe=wi=null,Rs=!1,(e&8)!==0&&(e|=e&32);var n=t.entangledLanes;if(n!==0)for(t=t.entanglements,n&=e;0<n;){var a=31-$t(n),i=1<<a;e|=t[a],n&=~i}return en=e,nu(),l}function sd(t,e){Mt=null,D.H=yi,e===Aa||e===fu?(e=Mr(),Gt=3):e===Gc?(e=Mr(),Gt=4):Gt=e===ps?8:e!==null&&typeof e=="object"&&typeof e.then=="function"?6:1,Ie=e,Tt===null&&(ae=1,wu(t,il(e,t.current)))}function od(){var t=Fe.current;return t===null?!0:(_t&4194048)===_t?ol===null:(_t&62914560)===_t||(_t&536870912)!==0?t===ol:!1}function rd(){var t=D.H;return D.H=yi,t===null?yi:t}function fd(){var t=D.A;return D.A=sh,t}function Bu(){ae=4,jn||(_t&4194048)!==_t&&Fe.current!==null||(Ua=!0),(An&134217727)===0&&(ua&134217727)===0||Ft===null||Tn(Ft,_t,Pe,!1)}function qs(t,e,l){var n=kt;kt|=2;var a=rd(),i=fd();(Ft!==t||_t!==e)&&(Uu=null,La(t,e)),e=!1;var u=ae;t:do try{if(Gt!==0&&Tt!==null){var f=Tt,v=Ie;switch(Gt){case 8:Ls(),u=6;break t;case 3:case 2:case 9:case 6:Fe.current===null&&(e=!0);var w=Gt;if(Gt=0,Ie=null,qa(t,f,v,w),l&&Ua){u=0;break t}break;default:w=Gt,Gt=0,Ie=null,qa(t,f,v,w)}}fh(),u=ae;break}catch(R){sd(t,R)}while(!0);return e&&t.shellSuspendCounter++,Zl=Wn=null,kt=n,D.H=a,D.A=i,Tt===null&&(Ft=null,_t=0,nu()),u}function fh(){for(;Tt!==null;)dd(Tt)}function dh(t,e){var l=kt;kt|=2;var n=rd(),a=fd();Ft!==t||_t!==e?(Uu=null,Ru=Ee()+500,La(t,e)):Ua=It(t,e);t:do try{if(Gt!==0&&Tt!==null){e=Tt;var i=Ie;e:switch(Gt){case 1:Gt=0,Ie=null,qa(t,e,i,1);break;case 2:case 9:if(Sr(i)){Gt=0,Ie=null,hd(e);break}e=function(){Gt!==2&&Gt!==9||Ft!==t||(Gt=7),Ul(t)},i.then(e,e);break t;case 3:Gt=7;break t;case 4:Gt=5;break t;case 7:Sr(i)?(Gt=0,Ie=null,hd(e)):(Gt=0,Ie=null,qa(t,e,i,7));break;case 5:var u=null;switch(Tt.tag){case 26:u=Tt.memoizedState;case 5:case 27:var f=Tt;if(u?Id(u):f.stateNode.complete){Gt=0,Ie=null;var v=f.sibling;if(v!==null)Tt=v;else{var w=f.return;w!==null?(Tt=w,Lu(w)):Tt=null}break e}}Gt=0,Ie=null,qa(t,e,i,5);break;case 6:Gt=0,Ie=null,qa(t,e,i,6);break;case 8:Ls(),ae=6;break t;default:throw Error(r(462))}}hh();break}catch(R){sd(t,R)}while(!0);return Zl=Wn=null,D.H=n,D.A=a,kt=l,Tt!==null?0:(Ft=null,_t=0,nu(),ae)}function hh(){for(;Tt!==null&&!on();)dd(Tt)}function dd(t){var e=Hf(t.alternate,t,en);t.memoizedProps=t.pendingProps,e===null?Lu(t):Tt=e}function hd(t){var e=t,l=e.alternate;switch(e.tag){case 15:case 0:e=Tf(l,e,e.pendingProps,e.type,void 0,_t);break;case 11:e=Tf(l,e,e.pendingProps,e.type.render,e.ref,_t);break;case 5:ts(e);default:Lf(l,e),e=Tt=rr(e,en),e=Hf(l,e,en)}t.memoizedProps=t.pendingProps,e===null?Lu(t):Tt=e}function qa(t,e,l,n){Zl=Wn=null,ts(e),Na=null,oi=0;var a=e.return;try{if(eh(t,a,e,l,_t)){ae=1,wu(t,il(l,t.current)),Tt=null;return}}catch(i){if(a!==null)throw Tt=a,i;ae=1,wu(t,il(l,t.current)),Tt=null;return}e.flags&32768?(Ut||n===1?t=!0:Ua||(_t&536870912)!==0?t=!1:(jn=t=!0,(n===2||n===9||n===3||n===6)&&(n=Fe.current,n!==null&&n.tag===13&&(n.flags|=16384))),md(e,t)):Lu(e)}function Lu(t){var e=t;do{if((e.flags&32768)!==0){md(e,jn);return}t=e.return;var l=ah(e.alternate,e,en);if(l!==null){Tt=l;return}if(e=e.sibling,e!==null){Tt=e;return}Tt=e=t}while(e!==null);ae===0&&(ae=5)}function md(t,e){do{var l=ih(t.alternate,t);if(l!==null){l.flags&=32767,Tt=l;return}if(l=t.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!e&&(t=t.sibling,t!==null)){Tt=t;return}Tt=t=l}while(t!==null);ae=6,Tt=null}function gd(t,e,l,n,a,i,u,f,v){t.cancelPendingCommit=null;do qu();while(be!==0);if((kt&6)!==0)throw Error(r(327));if(e!==null){if(e===t.current)throw Error(r(177));if(i=e.lanes|e.childLanes,i|=Ac,Al(t,l,i,u,f,v),t===Ft&&(Tt=Ft=null,_t=0),Ba=e,Dn=t,ln=l,Us=i,Hs=a,ad=n,(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,yh(Ze,function(){return xd(),null})):(t.callbackNode=null,t.callbackPriority=0),n=(e.flags&13878)!==0,(e.subtreeFlags&13878)!==0||n){n=D.T,D.T=null,a=Y.p,Y.p=2,u=kt,kt|=4;try{uh(t,e,l)}finally{kt=u,Y.p=a,D.T=n}}be=1,pd(),yd(),vd()}}function pd(){if(be===1){be=0;var t=Dn,e=Ba,l=(e.flags&13878)!==0;if((e.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var n=Y.p;Y.p=2;var a=kt;kt|=4;try{Ff(e,t);var i=Ws,u=er(t.containerInfo),f=i.focusedElem,v=i.selectionRange;if(u!==f&&f&&f.ownerDocument&&tr(f.ownerDocument.documentElement,f)){if(v!==null&&Ec(f)){var w=v.start,R=v.end;if(R===void 0&&(R=w),"selectionStart"in f)f.selectionStart=w,f.selectionEnd=Math.min(R,f.value.length);else{var L=f.ownerDocument||document,A=L&&L.defaultView||window;if(A.getSelection){var O=A.getSelection(),it=f.textContent.length,pt=Math.min(v.start,it),Jt=v.end===void 0?pt:Math.min(v.end,it);!O.extend&&pt>Jt&&(u=Jt,Jt=pt,pt=u);var E=Po(f,pt),b=Po(f,Jt);if(E&&b&&(O.rangeCount!==1||O.anchorNode!==E.node||O.anchorOffset!==E.offset||O.focusNode!==b.node||O.focusOffset!==b.offset)){var C=L.createRange();C.setStart(E.node,E.offset),O.removeAllRanges(),pt>Jt?(O.addRange(C),O.extend(b.node,b.offset)):(C.setEnd(b.node,b.offset),O.addRange(C))}}}}for(L=[],O=f;O=O.parentNode;)O.nodeType===1&&L.push({element:O,left:O.scrollLeft,top:O.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<L.length;f++){var B=L[f];B.element.scrollLeft=B.left,B.element.scrollTop=B.top}}Wu=!!Fs,Ws=Fs=null}finally{kt=a,Y.p=n,D.T=l}}t.current=e,be=2}}function yd(){if(be===2){be=0;var t=Dn,e=Ba,l=(e.flags&8772)!==0;if((e.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var n=Y.p;Y.p=2;var a=kt;kt|=4;try{Zf(t,e.alternate,e)}finally{kt=a,Y.p=n,D.T=l}}be=3}}function vd(){if(be===4||be===3){be=0,rn();var t=Dn,e=Ba,l=ln,n=ad;(e.subtreeFlags&10256)!==0||(e.flags&10256)!==0?be=5:(be=0,Ba=Dn=null,bd(t,t.pendingLanes));var a=t.pendingLanes;if(a===0&&(Nn=null),pl(l),e=e.stateNode,xe&&typeof xe.onCommitFiberRoot=="function")try{xe.onCommitFiberRoot(jl,e,void 0,(e.current.flags&128)===128)}catch{}if(n!==null){e=D.T,a=Y.p,Y.p=2,D.T=null;try{for(var i=t.onRecoverableError,u=0;u<n.length;u++){var f=n[u];i(f.value,{componentStack:f.stack})}}finally{D.T=e,Y.p=a}}(ln&3)!==0&&qu(),Ul(t),a=t.pendingLanes,(l&261930)!==0&&(a&42)!==0?t===Bs?ji++:(ji=0,Bs=t):ji=0,Ai(0)}}function bd(t,e){(t.pooledCacheLanes&=e)===0&&(e=t.pooledCache,e!=null&&(t.pooledCache=null,ci(e)))}function qu(){return pd(),yd(),vd(),xd()}function xd(){if(be!==5)return!1;var t=Dn,e=Us;Us=0;var l=pl(ln),n=D.T,a=Y.p;try{Y.p=32>l?32:l,D.T=null,l=Hs,Hs=null;var i=Dn,u=ln;if(be=0,Ba=Dn=null,ln=0,(kt&6)!==0)throw Error(r(331));var f=kt;if(kt|=4,ed(i.current),If(i,i.current,u,l),kt=f,Ai(0,!1),xe&&typeof xe.onPostCommitFiberRoot=="function")try{xe.onPostCommitFiberRoot(jl,i)}catch{}return!0}finally{Y.p=a,D.T=n,bd(t,e)}}function Sd(t,e,l){e=il(l,e),e=gs(t.stateNode,e,2),t=En(t,e,2),t!==null&&(kl(t,2),Ul(t))}function Xt(t,e,l){if(t.tag===3)Sd(t,t,l);else for(;e!==null;){if(e.tag===3){Sd(e,t,l);break}else if(e.tag===1){var n=e.stateNode;if(typeof e.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Nn===null||!Nn.has(n))){t=il(l,t),l=Ef(2),n=En(e,l,2),n!==null&&(Mf(l,n,e,t),kl(n,2),Ul(n));break}}e=e.return}}function ks(t,e,l){var n=t.pingCache;if(n===null){n=t.pingCache=new oh;var a=new Set;n.set(e,a)}else a=n.get(e),a===void 0&&(a=new Set,n.set(e,a));a.has(l)||(Os=!0,a.add(l),t=mh.bind(null,t,e,l),e.then(t,t))}function mh(t,e,l){var n=t.pingCache;n!==null&&n.delete(e),t.pingedLanes|=t.suspendedLanes&l,t.warmLanes&=~l,Ft===t&&(_t&l)===l&&(ae===4||ae===3&&(_t&62914560)===_t&&300>Ee()-_u?(kt&2)===0&&La(t,0):_s|=l,Ha===_t&&(Ha=0)),Ul(t)}function Ed(t,e){e===0&&(e=ie()),t=Jn(t,e),t!==null&&(kl(t,e),Ul(t))}function gh(t){var e=t.memoizedState,l=0;e!==null&&(l=e.retryLane),Ed(t,l)}function ph(t,e){var l=0;switch(t.tag){case 31:case 13:var n=t.stateNode,a=t.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=t.stateNode;break;case 22:n=t.stateNode._retryCache;break;default:throw Error(r(314))}n!==null&&n.delete(e),Ed(t,l)}function yh(t,e){return el(t,e)}var ku=null,ka=null,Ys=!1,Yu=!1,Gs=!1,zn=0;function Ul(t){t!==ka&&t.next===null&&(ka===null?ku=ka=t:ka=ka.next=t),Yu=!0,Ys||(Ys=!0,bh())}function Ai(t,e){if(!Gs&&Yu){Gs=!0;do for(var l=!1,n=ku;n!==null;){if(t!==0){var a=n.pendingLanes;if(a===0)var i=0;else{var u=n.suspendedLanes,f=n.pingedLanes;i=(1<<31-$t(42|t)+1)-1,i&=a&~(u&~f),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(l=!0,jd(n,i))}else i=_t,i=bt(n,n===Ft?i:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(i&3)===0||It(n,i)||(l=!0,jd(n,i));n=n.next}while(l);Gs=!1}}function vh(){Md()}function Md(){Yu=Ys=!1;var t=0;zn!==0&&Dh()&&(t=zn);for(var e=Ee(),l=null,n=ku;n!==null;){var a=n.next,i=Cd(n,e);i===0?(n.next=null,l===null?ku=a:l.next=a,a===null&&(ka=l)):(l=n,(t!==0||(i&3)!==0)&&(Yu=!0)),n=a}be!==0&&be!==5||Ai(t),zn!==0&&(zn=0)}function Cd(t,e){for(var l=t.suspendedLanes,n=t.pingedLanes,a=t.expirationTimes,i=t.pendingLanes&-62914561;0<i;){var u=31-$t(i),f=1<<u,v=a[u];v===-1?((f&l)===0||(f&n)!==0)&&(a[u]=Pt(f,e)):v<=e&&(t.expiredLanes|=f),i&=~f}if(e=Ft,l=_t,l=bt(t,t===e?l:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n=t.callbackNode,l===0||t===e&&(Gt===2||Gt===9)||t.cancelPendingCommit!==null)return n!==null&&n!==null&&Oe(n),t.callbackNode=null,t.callbackPriority=0;if((l&3)===0||It(t,l)){if(e=l&-l,e===t.callbackPriority)return e;switch(n!==null&&Oe(n),pl(l)){case 2:case 8:l=Bl;break;case 32:l=Ze;break;case 268435456:l=fn;break;default:l=Ze}return n=wd.bind(null,t),l=el(l,n),t.callbackPriority=e,t.callbackNode=l,e}return n!==null&&n!==null&&Oe(n),t.callbackPriority=2,t.callbackNode=null,2}function wd(t,e){if(be!==0&&be!==5)return t.callbackNode=null,t.callbackPriority=0,null;var l=t.callbackNode;if(qu()&&t.callbackNode!==l)return null;var n=_t;return n=bt(t,t===Ft?n:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),n===0?null:(ud(t,n,e),Cd(t,Ee()),t.callbackNode!=null&&t.callbackNode===l?wd.bind(null,t):null)}function jd(t,e){if(qu())return null;ud(t,e,!0)}function bh(){zh(function(){(kt&6)!==0?el(qn,vh):Md()})}function Xs(){if(zn===0){var t=wa;t===0&&(t=_,_<<=1,(_&261888)===0&&(_=256)),zn=t}return zn}function Ad(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:lt(""+t)}function Nd(t,e){var l=e.ownerDocument.createElement("input");return l.name=e.name,l.value=e.value,t.id&&l.setAttribute("form",t.id),e.parentNode.insertBefore(l,e),t=new FormData(t),l.parentNode.removeChild(l),t}function xh(t,e,l,n,a){if(e==="submit"&&l&&l.stateNode===a){var i=Ad((a[De]||null).action),u=n.submitter;u&&(e=(e=u[De]||null)?Ad(e.formAction):u.getAttribute("formAction"),e!==null&&(i=e,u=null));var f=new Pi("action","action",null,n,a);t.push({event:f,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(zn!==0){var v=u?Nd(a,u):new FormData(a);os(l,{pending:!0,data:v,method:a.method,action:i},null,v)}}else typeof i=="function"&&(f.preventDefault(),v=u?Nd(a,u):new FormData(a),os(l,{pending:!0,data:v,method:a.method,action:i},i,v))},currentTarget:a}]})}}for(var Qs=0;Qs<jc.length;Qs++){var Zs=jc[Qs],Sh=Zs.toLowerCase(),Eh=Zs[0].toUpperCase()+Zs.slice(1);xl(Sh,"on"+Eh)}xl(ar,"onAnimationEnd"),xl(ir,"onAnimationIteration"),xl(ur,"onAnimationStart"),xl("dblclick","onDoubleClick"),xl("focusin","onFocus"),xl("focusout","onBlur"),xl(L1,"onTransitionRun"),xl(q1,"onTransitionStart"),xl(k1,"onTransitionCancel"),xl(cr,"onTransitionEnd"),yl("onMouseEnter",["mouseout","mouseover"]),yl("onMouseLeave",["mouseout","mouseover"]),yl("onPointerEnter",["pointerout","pointerover"]),yl("onPointerLeave",["pointerout","pointerover"]),zl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),zl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),zl("onBeforeInput",["compositionend","keypress","textInput","paste"]),zl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),zl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ni="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(" "),Mh=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ni));function Dd(t,e){e=(e&4)!==0;for(var l=0;l<t.length;l++){var n=t[l],a=n.event;n=n.listeners;t:{var i=void 0;if(e)for(var u=n.length-1;0<=u;u--){var f=n[u],v=f.instance,w=f.currentTarget;if(f=f.listener,v!==i&&a.isPropagationStopped())break t;i=f,a.currentTarget=w;try{i(a)}catch(R){lu(R)}a.currentTarget=null,i=v}else for(u=0;u<n.length;u++){if(f=n[u],v=f.instance,w=f.currentTarget,f=f.listener,v!==i&&a.isPropagationStopped())break t;i=f,a.currentTarget=w;try{i(a)}catch(R){lu(R)}a.currentTarget=null,i=v}}}}function zt(t,e){var l=e[Gn];l===void 0&&(l=e[Gn]=new Set);var n=t+"__bubble";l.has(n)||(Td(e,t,2,!1),l.add(n))}function Vs(t,e,l){var n=0;e&&(n|=4),Td(l,t,n,e)}var Gu="_reactListening"+Math.random().toString(36).slice(2);function Ks(t){if(!t[Gu]){t[Gu]=!0,vt.forEach(function(l){l!=="selectionchange"&&(Mh.has(l)||Vs(l,!1,t),Vs(l,!0,t))});var e=t.nodeType===9?t:t.ownerDocument;e===null||e[Gu]||(e[Gu]=!0,Vs("selectionchange",!1,e))}}function Td(t,e,l,n){switch(i0(e)){case 2:var a=Wh;break;case 8:a=Ih;break;default:a=so}l=a.bind(null,e,l,t),a=void 0,!hc||e!=="touchstart"&&e!=="touchmove"&&e!=="wheel"||(a=!0),n?a!==void 0?t.addEventListener(e,l,{capture:!0,passive:a}):t.addEventListener(e,l,!0):a!==void 0?t.addEventListener(e,l,{passive:a}):t.addEventListener(e,l,!1)}function Js(t,e,l,n,a){var i=n;if((e&1)===0&&(e&2)===0&&n!==null)t:for(;;){if(n===null)return;var u=n.tag;if(u===3||u===4){var f=n.stateNode.containerInfo;if(f===a)break;if(u===4)for(u=n.return;u!==null;){var v=u.tag;if((v===3||v===4)&&u.stateNode.containerInfo===a)return;u=u.return}for(;f!==null;){if(u=Ke(f),u===null)return;if(v=u.tag,v===5||v===6||v===26||v===27){n=i=u;continue t}f=f.parentNode}}n=n.return}Ue(function(){var w=i,R=At(l),L=[];t:{var A=sr.get(t);if(A!==void 0){var O=Pi,it=t;switch(t){case"keypress":if(Wi(l)===0)break t;case"keydown":case"keyup":O=p1;break;case"focusin":it="focus",O=yc;break;case"focusout":it="blur",O=yc;break;case"beforeblur":case"afterblur":O=yc;break;case"click":if(l.button===2)break t;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":O=Bo;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":O=a1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":O=b1;break;case ar:case ir:case ur:O=c1;break;case cr:O=S1;break;case"scroll":case"scrollend":O=l1;break;case"wheel":O=M1;break;case"copy":case"cut":case"paste":O=o1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":O=qo;break;case"toggle":case"beforetoggle":O=w1}var pt=(e&4)!==0,Jt=!pt&&(t==="scroll"||t==="scrollend"),E=pt?A!==null?A+"Capture":null:A;pt=[];for(var b=w,C;b!==null;){var B=b;if(C=B.stateNode,B=B.tag,B!==5&&B!==26&&B!==27||C===null||E===null||(B=Zt(b,E),B!=null&&pt.push(Di(b,B,C))),Jt)break;b=b.return}0<pt.length&&(A=new O(A,it,null,l,R),L.push({event:A,listeners:pt}))}}if((e&7)===0){t:{if(A=t==="mouseover"||t==="pointerover",O=t==="mouseout"||t==="pointerout",A&&l!==jt&&(it=l.relatedTarget||l.fromElement)&&(Ke(it)||it[Le]))break t;if((O||A)&&(A=R.window===R?R:(A=R.ownerDocument)?A.defaultView||A.parentWindow:window,O?(it=l.relatedTarget||l.toElement,O=w,it=it?Ke(it):null,it!==null&&(Jt=y(it),pt=it.tag,it!==Jt||pt!==5&&pt!==27&&pt!==6)&&(it=null)):(O=null,it=w),O!==it)){if(pt=Bo,B="onMouseLeave",E="onMouseEnter",b="mouse",(t==="pointerout"||t==="pointerover")&&(pt=qo,B="onPointerLeave",E="onPointerEnter",b="pointer"),Jt=O==null?A:ve(O),C=it==null?A:ve(it),A=new pt(B,b+"leave",O,l,R),A.target=Jt,A.relatedTarget=C,B=null,Ke(R)===w&&(pt=new pt(E,b+"enter",it,l,R),pt.target=C,pt.relatedTarget=Jt,B=pt),Jt=B,O&&it)e:{for(pt=Ch,E=O,b=it,C=0,B=E;B;B=pt(B))C++;B=0;for(var gt=b;gt;gt=pt(gt))B++;for(;0<C-B;)E=pt(E),C--;for(;0<B-C;)b=pt(b),B--;for(;C--;){if(E===b||b!==null&&E===b.alternate){pt=E;break e}E=pt(E),b=pt(b)}pt=null}else pt=null;O!==null&&zd(L,A,O,pt,!1),it!==null&&Jt!==null&&zd(L,Jt,it,pt,!0)}}t:{if(A=w?ve(w):window,O=A.nodeName&&A.nodeName.toLowerCase(),O==="select"||O==="input"&&A.type==="file")var Lt=Ko;else if(Zo(A))if(Jo)Lt=U1;else{Lt=_1;var ft=O1}else O=A.nodeName,!O||O.toLowerCase()!=="input"||A.type!=="checkbox"&&A.type!=="radio"?w&&m(w.elementType)&&(Lt=Ko):Lt=R1;if(Lt&&(Lt=Lt(t,w))){Vo(L,Lt,l,R);break t}ft&&ft(t,A,w),t==="focusout"&&w&&A.type==="number"&&w.memoizedProps.value!=null&&$a(A,"number",A.value)}switch(ft=w?ve(w):window,t){case"focusin":(Zo(ft)||ft.contentEditable==="true")&&(ya=ft,Mc=w,ai=null);break;case"focusout":ai=Mc=ya=null;break;case"mousedown":Cc=!0;break;case"contextmenu":case"mouseup":case"dragend":Cc=!1,lr(L,l,R);break;case"selectionchange":if(B1)break;case"keydown":case"keyup":lr(L,l,R)}var Ct;if(bc)t:{switch(t){case"compositionstart":var Rt="onCompositionStart";break t;case"compositionend":Rt="onCompositionEnd";break t;case"compositionupdate":Rt="onCompositionUpdate";break t}Rt=void 0}else pa?Xo(t,l)&&(Rt="onCompositionEnd"):t==="keydown"&&l.keyCode===229&&(Rt="onCompositionStart");Rt&&(ko&&l.locale!=="ko"&&(pa||Rt!=="onCompositionStart"?Rt==="onCompositionEnd"&&pa&&(Ct=Uo()):(gn=R,mc="value"in gn?gn.value:gn.textContent,pa=!0)),ft=Xu(w,Rt),0<ft.length&&(Rt=new Lo(Rt,t,null,l,R),L.push({event:Rt,listeners:ft}),Ct?Rt.data=Ct:(Ct=Qo(l),Ct!==null&&(Rt.data=Ct)))),(Ct=A1?N1(t,l):D1(t,l))&&(Rt=Xu(w,"onBeforeInput"),0<Rt.length&&(ft=new Lo("onBeforeInput","beforeinput",null,l,R),L.push({event:ft,listeners:Rt}),ft.data=Ct)),xh(L,t,w,l,R)}Dd(L,e)})}function Di(t,e,l){return{instance:t,listener:e,currentTarget:l}}function Xu(t,e){for(var l=e+"Capture",n=[];t!==null;){var a=t,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=Zt(t,l),a!=null&&n.unshift(Di(t,a,i)),a=Zt(t,e),a!=null&&n.push(Di(t,a,i))),t.tag===3)return n;t=t.return}return[]}function Ch(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function zd(t,e,l,n,a){for(var i=e._reactName,u=[];l!==null&&l!==n;){var f=l,v=f.alternate,w=f.stateNode;if(f=f.tag,v!==null&&v===n)break;f!==5&&f!==26&&f!==27||w===null||(v=w,a?(w=Zt(l,i),w!=null&&u.unshift(Di(l,w,v))):a||(w=Zt(l,i),w!=null&&u.push(Di(l,w,v)))),l=l.return}u.length!==0&&t.push({event:e,listeners:u})}var wh=/\r\n?/g,jh=/\u0000|\uFFFD/g;function Od(t){return(typeof t=="string"?t:""+t).replace(wh,`
|
|
9
|
+
`).replace(jh,"")}function _d(t,e){return e=Od(e),Od(t)===e}function Kt(t,e,l,n,a,i){switch(l){case"children":typeof n=="string"?e==="body"||e==="textarea"&&n===""||mn(t,n):(typeof n=="number"||typeof n=="bigint")&&e!=="body"&&mn(t,""+n);break;case"className":Xn(t,"class",n);break;case"tabIndex":Xn(t,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":Xn(t,l,n);break;case"style":$i(t,n,i);break;case"data":if(e!=="object"){Xn(t,"data",n);break}case"src":case"href":if(n===""&&(e!=="a"||l!=="href")){t.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=lt(""+n),t.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){t.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 i=="function"&&(l==="formAction"?(e!=="input"&&Kt(t,e,"name",a.name,a,null),Kt(t,e,"formEncType",a.formEncType,a,null),Kt(t,e,"formMethod",a.formMethod,a,null),Kt(t,e,"formTarget",a.formTarget,a,null)):(Kt(t,e,"encType",a.encType,a,null),Kt(t,e,"method",a.method,a,null),Kt(t,e,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){t.removeAttribute(l);break}n=lt(""+n),t.setAttribute(l,n);break;case"onClick":n!=null&&(t.onclick=at);break;case"onScroll":n!=null&&zt("scroll",t);break;case"onScrollEnd":n!=null&&zt("scrollend",t);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"multiple":t.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":t.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){t.removeAttribute("xlink:href");break}l=lt(""+n),t.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":n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""+n):t.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":n&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,""):t.removeAttribute(l);break;case"capture":case"download":n===!0?t.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?t.setAttribute(l,n):t.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?t.setAttribute(l,n):t.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?t.removeAttribute(l):t.setAttribute(l,n);break;case"popover":zt("beforetoggle",t),zt("toggle",t),ma(t,"popover",n);break;case"xlinkActuate":vl(t,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":vl(t,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":vl(t,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":vl(t,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":vl(t,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":vl(t,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":vl(t,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":vl(t,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":vl(t,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ma(t,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=k.get(l)||l,ma(t,l,n))}}function $s(t,e,l,n,a,i){switch(l){case"style":$i(t,n,i);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(r(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(r(60));t.innerHTML=l}}break;case"children":typeof n=="string"?mn(t,n):(typeof n=="number"||typeof n=="bigint")&&mn(t,""+n);break;case"onScroll":n!=null&&zt("scroll",t);break;case"onScrollEnd":n!=null&&zt("scrollend",t);break;case"onClick":n!=null&&(t.onclick=at);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Zi.hasOwnProperty(l))t:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),e=l.slice(2,a?l.length-7:void 0),i=t[De]||null,i=i!=null?i[l]:null,typeof i=="function"&&t.removeEventListener(e,i,a),typeof n=="function")){typeof i!="function"&&i!==null&&(l in t?t[l]=null:t.hasAttribute(l)&&t.removeAttribute(l)),t.addEventListener(e,n,a);break t}l in t?t[l]=n:n===!0?t.setAttribute(l,""):ma(t,l,n)}}}function je(t,e,l){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":zt("error",t),zt("load",t);var n=!1,a=!1,i;for(i in l)if(l.hasOwnProperty(i)){var u=l[i];if(u!=null)switch(i){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Kt(t,e,i,u,l,null)}}a&&Kt(t,e,"srcSet",l.srcSet,l,null),n&&Kt(t,e,"src",l.src,l,null);return;case"input":zt("invalid",t);var f=i=u=a=null,v=null,w=null;for(n in l)if(l.hasOwnProperty(n)){var R=l[n];if(R!=null)switch(n){case"name":a=R;break;case"type":u=R;break;case"checked":v=R;break;case"defaultChecked":w=R;break;case"value":i=R;break;case"defaultValue":f=R;break;case"children":case"dangerouslySetInnerHTML":if(R!=null)throw Error(r(137,e));break;default:Kt(t,e,n,R,l,null)}}Vi(t,i,f,v,w,u,a,!1);return;case"select":zt("invalid",t),n=u=i=null;for(a in l)if(l.hasOwnProperty(a)&&(f=l[a],f!=null))switch(a){case"value":i=f;break;case"defaultValue":u=f;break;case"multiple":n=f;default:Kt(t,e,a,f,l,null)}e=i,l=u,t.multiple=!!n,e!=null?hn(t,!!n,e,!1):l!=null&&hn(t,!!n,l,!0);return;case"textarea":zt("invalid",t),i=a=n=null;for(u in l)if(l.hasOwnProperty(u)&&(f=l[u],f!=null))switch(u){case"value":n=f;break;case"defaultValue":a=f;break;case"children":i=f;break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(r(91));break;default:Kt(t,e,u,f,l,null)}Fa(t,n,a,i);return;case"option":for(v in l)l.hasOwnProperty(v)&&(n=l[v],n!=null)&&(v==="selected"?t.selected=n&&typeof n!="function"&&typeof n!="symbol":Kt(t,e,v,n,l,null));return;case"dialog":zt("beforetoggle",t),zt("toggle",t),zt("cancel",t),zt("close",t);break;case"iframe":case"object":zt("load",t);break;case"video":case"audio":for(n=0;n<Ni.length;n++)zt(Ni[n],t);break;case"image":zt("error",t),zt("load",t);break;case"details":zt("toggle",t);break;case"embed":case"source":case"link":zt("error",t),zt("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(w in l)if(l.hasOwnProperty(w)&&(n=l[w],n!=null))switch(w){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,e));default:Kt(t,e,w,n,l,null)}return;default:if(m(e)){for(R in l)l.hasOwnProperty(R)&&(n=l[R],n!==void 0&&$s(t,e,R,n,l,void 0));return}}for(f in l)l.hasOwnProperty(f)&&(n=l[f],n!=null&&Kt(t,e,f,n,l,null))}function Ah(t,e,l,n){switch(e){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,u=null,f=null,v=null,w=null,R=null;for(O in l){var L=l[O];if(l.hasOwnProperty(O)&&L!=null)switch(O){case"checked":break;case"value":break;case"defaultValue":v=L;default:n.hasOwnProperty(O)||Kt(t,e,O,null,n,L)}}for(var A in n){var O=n[A];if(L=l[A],n.hasOwnProperty(A)&&(O!=null||L!=null))switch(A){case"type":i=O;break;case"name":a=O;break;case"checked":w=O;break;case"defaultChecked":R=O;break;case"value":u=O;break;case"defaultValue":f=O;break;case"children":case"dangerouslySetInnerHTML":if(O!=null)throw Error(r(137,e));break;default:O!==L&&Kt(t,e,A,O,n,L)}}Ja(t,u,f,v,w,R,i,a);return;case"select":O=u=f=A=null;for(i in l)if(v=l[i],l.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":O=v;default:n.hasOwnProperty(i)||Kt(t,e,i,null,n,v)}for(a in n)if(i=n[a],v=l[a],n.hasOwnProperty(a)&&(i!=null||v!=null))switch(a){case"value":A=i;break;case"defaultValue":f=i;break;case"multiple":u=i;default:i!==v&&Kt(t,e,a,i,n,v)}e=f,l=u,n=O,A!=null?hn(t,!!l,A,!1):!!n!=!!l&&(e!=null?hn(t,!!l,e,!0):hn(t,!!l,l?[]:"",!1));return;case"textarea":O=A=null;for(f in l)if(a=l[f],l.hasOwnProperty(f)&&a!=null&&!n.hasOwnProperty(f))switch(f){case"value":break;case"children":break;default:Kt(t,e,f,null,n,a)}for(u in n)if(a=n[u],i=l[u],n.hasOwnProperty(u)&&(a!=null||i!=null))switch(u){case"value":A=a;break;case"defaultValue":O=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==i&&Kt(t,e,u,a,n,i)}Ki(t,A,O);return;case"option":for(var it in l)A=l[it],l.hasOwnProperty(it)&&A!=null&&!n.hasOwnProperty(it)&&(it==="selected"?t.selected=!1:Kt(t,e,it,null,n,A));for(v in n)A=n[v],O=l[v],n.hasOwnProperty(v)&&A!==O&&(A!=null||O!=null)&&(v==="selected"?t.selected=A&&typeof A!="function"&&typeof A!="symbol":Kt(t,e,v,A,n,O));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 pt in l)A=l[pt],l.hasOwnProperty(pt)&&A!=null&&!n.hasOwnProperty(pt)&&Kt(t,e,pt,null,n,A);for(w in n)if(A=n[w],O=l[w],n.hasOwnProperty(w)&&A!==O&&(A!=null||O!=null))switch(w){case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(r(137,e));break;default:Kt(t,e,w,A,n,O)}return;default:if(m(e)){for(var Jt in l)A=l[Jt],l.hasOwnProperty(Jt)&&A!==void 0&&!n.hasOwnProperty(Jt)&&$s(t,e,Jt,void 0,n,A);for(R in n)A=n[R],O=l[R],!n.hasOwnProperty(R)||A===O||A===void 0&&O===void 0||$s(t,e,R,A,n,O);return}}for(var E in l)A=l[E],l.hasOwnProperty(E)&&A!=null&&!n.hasOwnProperty(E)&&Kt(t,e,E,null,n,A);for(L in n)A=n[L],O=l[L],!n.hasOwnProperty(L)||A===O||A==null&&O==null||Kt(t,e,L,A,n,O)}function Rd(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Nh(){if(typeof performance.getEntriesByType=="function"){for(var t=0,e=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],i=a.transferSize,u=a.initiatorType,f=a.duration;if(i&&f&&Rd(u)){for(u=0,f=a.responseEnd,n+=1;n<l.length;n++){var v=l[n],w=v.startTime;if(w>f)break;var R=v.transferSize,L=v.initiatorType;R&&Rd(L)&&(v=v.responseEnd,u+=R*(v<f?1:(f-w)/(v-w)))}if(--n,e+=8*(i+u)/(a.duration/1e3),t++,10<t)break}}if(0<t)return e/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Fs=null,Ws=null;function Qu(t){return t.nodeType===9?t:t.ownerDocument}function Ud(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Hd(t,e){if(t===0)switch(e){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&e==="foreignObject"?0:t}function Is(t,e){return t==="textarea"||t==="noscript"||typeof e.children=="string"||typeof e.children=="number"||typeof e.children=="bigint"||typeof e.dangerouslySetInnerHTML=="object"&&e.dangerouslySetInnerHTML!==null&&e.dangerouslySetInnerHTML.__html!=null}var Ps=null;function Dh(){var t=window.event;return t&&t.type==="popstate"?t===Ps?!1:(Ps=t,!0):(Ps=null,!1)}var Bd=typeof setTimeout=="function"?setTimeout:void 0,Th=typeof clearTimeout=="function"?clearTimeout:void 0,Ld=typeof Promise=="function"?Promise:void 0,zh=typeof queueMicrotask=="function"?queueMicrotask:typeof Ld<"u"?function(t){return Ld.resolve(null).then(t).catch(Oh)}:Bd;function Oh(t){setTimeout(function(){throw t})}function On(t){return t==="head"}function qd(t,e){var l=e,n=0;do{var a=l.nextSibling;if(t.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){t.removeChild(a),Qa(e);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Ti(t.ownerDocument.documentElement);else if(l==="head"){l=t.ownerDocument.head,Ti(l);for(var i=l.firstChild;i;){var u=i.nextSibling,f=i.nodeName;i[dn]||f==="SCRIPT"||f==="STYLE"||f==="LINK"&&i.rel.toLowerCase()==="stylesheet"||l.removeChild(i),i=u}}else l==="body"&&Ti(t.ownerDocument.body);l=a}while(l);Qa(e)}function kd(t,e){var l=t;t=0;do{var n=l.nextSibling;if(l.nodeType===1?e?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(e?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(t===0)break;t--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||t++;l=n}while(l)}function to(t){var e=t.firstChild;for(e&&e.nodeType===10&&(e=e.nextSibling);e;){var l=e;switch(e=e.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":to(l),Za(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}t.removeChild(l)}}function _h(t,e,l,n){for(;t.nodeType===1;){var a=l;if(t.nodeName.toLowerCase()!==e.toLowerCase()){if(!n&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(n){if(!t[dn])switch(e){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(i=t.getAttribute("rel"),i==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(i!==a.rel||t.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||t.getAttribute("title")!==(a.title==null?null:a.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(i=t.getAttribute("src"),(i!==(a.src==null?null:a.src)||t.getAttribute("type")!==(a.type==null?null:a.type)||t.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(e==="input"&&t.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&t.getAttribute("name")===i)return t}else return t;if(t=rl(t.nextSibling),t===null)break}return null}function Rh(t,e,l){if(e==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!l||(t=rl(t.nextSibling),t===null))return null;return t}function Yd(t,e){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!e||(t=rl(t.nextSibling),t===null))return null;return t}function eo(t){return t.data==="$?"||t.data==="$~"}function lo(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Uh(t,e){var l=t.ownerDocument;if(t.data==="$~")t._reactRetry=e;else if(t.data!=="$?"||l.readyState!=="loading")e();else{var n=function(){e(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),t._reactRetry=n}}function rl(t){for(;t!=null;t=t.nextSibling){var e=t.nodeType;if(e===1||e===3)break;if(e===8){if(e=t.data,e==="$"||e==="$!"||e==="$?"||e==="$~"||e==="&"||e==="F!"||e==="F")break;if(e==="/$"||e==="/&")return null}}return t}var no=null;function Gd(t){t=t.nextSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="/$"||l==="/&"){if(e===0)return rl(t.nextSibling);e--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||e++}t=t.nextSibling}return null}function Xd(t){t=t.previousSibling;for(var e=0;t;){if(t.nodeType===8){var l=t.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(e===0)return t;e--}else l!=="/$"&&l!=="/&"||e++}t=t.previousSibling}return null}function Qd(t,e,l){switch(e=Qu(l),t){case"html":if(t=e.documentElement,!t)throw Error(r(452));return t;case"head":if(t=e.head,!t)throw Error(r(453));return t;case"body":if(t=e.body,!t)throw Error(r(454));return t;default:throw Error(r(451))}}function Ti(t){for(var e=t.attributes;e.length;)t.removeAttributeNode(e[0]);Za(t)}var fl=new Map,Zd=new Set;function Zu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var nn=Y.d;Y.d={f:Hh,r:Bh,D:Lh,C:qh,L:kh,m:Yh,X:Xh,S:Gh,M:Qh};function Hh(){var t=nn.f(),e=Hu();return t||e}function Bh(t){var e=Yt(t);e!==null&&e.tag===5&&e.type==="form"?sf(e):nn.r(t)}var Ya=typeof document>"u"?null:document;function Vd(t,e,l){var n=Ya;if(n&&typeof e=="string"&&e){var a=ue(e);a='link[rel="'+t+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),Zd.has(a)||(Zd.add(a),t={rel:t,crossOrigin:l,href:e},n.querySelector(a)===null&&(e=n.createElement("link"),je(e,"link",t),re(e),n.head.appendChild(e)))}}function Lh(t){nn.D(t),Vd("dns-prefetch",t,null)}function qh(t,e){nn.C(t,e),Vd("preconnect",t,e)}function kh(t,e,l){nn.L(t,e,l);var n=Ya;if(n&&t&&e){var a='link[rel="preload"][as="'+ue(e)+'"]';e==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+ue(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+ue(l.imageSizes)+'"]')):a+='[href="'+ue(t)+'"]';var i=a;switch(e){case"style":i=Ga(t);break;case"script":i=Xa(t)}fl.has(i)||(t=H({rel:"preload",href:e==="image"&&l&&l.imageSrcSet?void 0:t,as:e},l),fl.set(i,t),n.querySelector(a)!==null||e==="style"&&n.querySelector(zi(i))||e==="script"&&n.querySelector(Oi(i))||(e=n.createElement("link"),je(e,"link",t),re(e),n.head.appendChild(e)))}}function Yh(t,e){nn.m(t,e);var l=Ya;if(l&&t){var n=e&&typeof e.as=="string"?e.as:"script",a='link[rel="modulepreload"][as="'+ue(n)+'"][href="'+ue(t)+'"]',i=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=Xa(t)}if(!fl.has(i)&&(t=H({rel:"modulepreload",href:t},e),fl.set(i,t),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Oi(i)))return}n=l.createElement("link"),je(n,"link",t),re(n),l.head.appendChild(n)}}}function Gh(t,e,l){nn.S(t,e,l);var n=Ya;if(n&&t){var a=Tl(n).hoistableStyles,i=Ga(t);e=e||"default";var u=a.get(i);if(!u){var f={loading:0,preload:null};if(u=n.querySelector(zi(i)))f.loading=5;else{t=H({rel:"stylesheet",href:t,"data-precedence":e},l),(l=fl.get(i))&&ao(t,l);var v=u=n.createElement("link");re(v),je(v,"link",t),v._p=new Promise(function(w,R){v.onload=w,v.onerror=R}),v.addEventListener("load",function(){f.loading|=1}),v.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Vu(u,e,n)}u={type:"stylesheet",instance:u,count:1,state:f},a.set(i,u)}}}function Xh(t,e){nn.X(t,e);var l=Ya;if(l&&t){var n=Tl(l).hoistableScripts,a=Xa(t),i=n.get(a);i||(i=l.querySelector(Oi(a)),i||(t=H({src:t,async:!0},e),(e=fl.get(a))&&io(t,e),i=l.createElement("script"),re(i),je(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function Qh(t,e){nn.M(t,e);var l=Ya;if(l&&t){var n=Tl(l).hoistableScripts,a=Xa(t),i=n.get(a);i||(i=l.querySelector(Oi(a)),i||(t=H({src:t,async:!0,type:"module"},e),(e=fl.get(a))&&io(t,e),i=l.createElement("script"),re(i),je(i,"link",t),l.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},n.set(a,i))}}function Kd(t,e,l,n){var a=(a=P.current)?Zu(a):null;if(!a)throw Error(r(446));switch(t){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(e=Ga(l.href),l=Tl(a).hoistableStyles,n=l.get(e),n||(n={type:"style",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){t=Ga(l.href);var i=Tl(a).hoistableStyles,u=i.get(t);if(u||(a=a.ownerDocument||a,u={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(t,u),(i=a.querySelector(zi(t)))&&!i._p&&(u.instance=i,u.state.loading=5),fl.has(t)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},fl.set(t,l),i||Zh(a,t,l,u.state))),e&&n===null)throw Error(r(528,""));return u}if(e&&n!==null)throw Error(r(529,""));return null;case"script":return e=l.async,l=l.src,typeof l=="string"&&e&&typeof e!="function"&&typeof e!="symbol"?(e=Xa(l),l=Tl(a).hoistableScripts,n=l.get(e),n||(n={type:"script",instance:null,count:0,state:null},l.set(e,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,t))}}function Ga(t){return'href="'+ue(t)+'"'}function zi(t){return'link[rel="stylesheet"]['+t+"]"}function Jd(t){return H({},t,{"data-precedence":t.precedence,precedence:null})}function Zh(t,e,l,n){t.querySelector('link[rel="preload"][as="style"]['+e+"]")?n.loading=1:(e=t.createElement("link"),n.preload=e,e.addEventListener("load",function(){return n.loading|=1}),e.addEventListener("error",function(){return n.loading|=2}),je(e,"link",l),re(e),t.head.appendChild(e))}function Xa(t){return'[src="'+ue(t)+'"]'}function Oi(t){return"script[async]"+t}function $d(t,e,l){if(e.count++,e.instance===null)switch(e.type){case"style":var n=t.querySelector('style[data-href~="'+ue(l.href)+'"]');if(n)return e.instance=n,re(n),n;var a=H({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(t.ownerDocument||t).createElement("style"),re(n),je(n,"style",a),Vu(n,l.precedence,t),e.instance=n;case"stylesheet":a=Ga(l.href);var i=t.querySelector(zi(a));if(i)return e.state.loading|=4,e.instance=i,re(i),i;n=Jd(l),(a=fl.get(a))&&ao(n,a),i=(t.ownerDocument||t).createElement("link"),re(i);var u=i;return u._p=new Promise(function(f,v){u.onload=f,u.onerror=v}),je(i,"link",n),e.state.loading|=4,Vu(i,l.precedence,t),e.instance=i;case"script":return i=Xa(l.src),(a=t.querySelector(Oi(i)))?(e.instance=a,re(a),a):(n=l,(a=fl.get(i))&&(n=H({},l),io(n,a)),t=t.ownerDocument||t,a=t.createElement("script"),re(a),je(a,"link",n),t.head.appendChild(a),e.instance=a);case"void":return null;default:throw Error(r(443,e.type))}else e.type==="stylesheet"&&(e.state.loading&4)===0&&(n=e.instance,e.state.loading|=4,Vu(n,l.precedence,t));return e.instance}function Vu(t,e,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,i=a,u=0;u<n.length;u++){var f=n[u];if(f.dataset.precedence===e)i=f;else if(i!==a)break}i?i.parentNode.insertBefore(t,i.nextSibling):(e=l.nodeType===9?l.head:l,e.insertBefore(t,e.firstChild))}function ao(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.title==null&&(t.title=e.title)}function io(t,e){t.crossOrigin==null&&(t.crossOrigin=e.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=e.referrerPolicy),t.integrity==null&&(t.integrity=e.integrity)}var Ku=null;function Fd(t,e,l){if(Ku===null){var n=new Map,a=Ku=new Map;a.set(l,n)}else a=Ku,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(t))return n;for(n.set(t,null),l=l.getElementsByTagName(t),a=0;a<l.length;a++){var i=l[a];if(!(i[dn]||i[ye]||t==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var u=i.getAttribute(e)||"";u=t+u;var f=n.get(u);f?f.push(i):n.set(u,[i])}}return n}function Wd(t,e,l){t=t.ownerDocument||t,t.head.insertBefore(l,e==="title"?t.querySelector("head > title"):null)}function Vh(t,e,l){if(l===1||e.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof e.precedence!="string"||typeof e.href!="string"||e.href==="")break;return!0;case"link":if(typeof e.rel!="string"||typeof e.href!="string"||e.href===""||e.onLoad||e.onError)break;return e.rel==="stylesheet"?(t=e.disabled,typeof e.precedence=="string"&&t==null):!0;case"script":if(e.async&&typeof e.async!="function"&&typeof e.async!="symbol"&&!e.onLoad&&!e.onError&&e.src&&typeof e.src=="string")return!0}return!1}function Id(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function Kh(t,e,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Ga(n.href),i=e.querySelector(zi(a));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(t.count++,t=Ju.bind(t),e.then(t,t)),l.state.loading|=4,l.instance=i,re(i);return}i=e.ownerDocument||e,n=Jd(n),(a=fl.get(a))&&ao(n,a),i=i.createElement("link"),re(i);var u=i;u._p=new Promise(function(f,v){u.onload=f,u.onerror=v}),je(i,"link",n),l.instance=i}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(l,e),(e=l.state.preload)&&(l.state.loading&3)===0&&(t.count++,l=Ju.bind(t),e.addEventListener("load",l),e.addEventListener("error",l))}}var uo=0;function Jh(t,e){return t.stylesheets&&t.count===0&&Fu(t,t.stylesheets),0<t.count||0<t.imgCount?function(l){var n=setTimeout(function(){if(t.stylesheets&&Fu(t,t.stylesheets),t.unsuspend){var i=t.unsuspend;t.unsuspend=null,i()}},6e4+e);0<t.imgBytes&&uo===0&&(uo=62500*Nh());var a=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&Fu(t,t.stylesheets),t.unsuspend)){var i=t.unsuspend;t.unsuspend=null,i()}},(t.imgBytes>uo?50:800)+e);return t.unsuspend=l,function(){t.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function Ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Fu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var $u=null;function Fu(t,e){t.stylesheets=null,t.unsuspend!==null&&(t.count++,$u=new Map,e.forEach($h,t),$u=null,Ju.call(t))}function $h(t,e){if(!(e.state.loading&4)){var l=$u.get(t);if(l)var n=l.get(null);else{l=new Map,$u.set(t,l);for(var a=t.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var u=a[i];(u.nodeName==="LINK"||u.getAttribute("media")!=="not all")&&(l.set(u.dataset.precedence,u),n=u)}n&&l.set(null,n)}a=e.instance,u=a.getAttribute("data-precedence"),i=l.get(u)||n,i===n&&l.set(null,a),l.set(u,a),this.count++,n=Ju.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),i?i.parentNode.insertBefore(a,i.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(a,t.firstChild)),e.state.loading|=4}}var _i={$$typeof:et,Provider:null,Consumer:null,_currentValue:N,_currentValue2:N,_threadCount:0};function Fh(t,e,l,n,a,i,u,f,v){this.tag=1,this.containerInfo=t,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=nl(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=nl(0),this.hiddenUpdates=nl(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=u,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,this.incompleteTransitions=new Map}function Pd(t,e,l,n,a,i,u,f,v,w,R,L){return t=new Fh(t,e,l,u,v,w,R,L,f),e=1,i===!0&&(e|=24),i=$e(3,null,null,e),t.current=i,i.stateNode=t,e=qc(),e.refCount++,t.pooledCache=e,e.refCount++,i.memoizedState={element:n,isDehydrated:l,cache:e},Xc(i),t}function t0(t){return t?(t=xa,t):xa}function e0(t,e,l,n,a,i){a=t0(a),n.context===null?n.context=a:n.pendingContext=a,n=Sn(e),n.payload={element:l},i=i===void 0?null:i,i!==null&&(n.callback=i),l=En(t,n,e),l!==null&&(Qe(l,t,e),fi(l,t,e))}function l0(t,e){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var l=t.retryLane;t.retryLane=l!==0&&l<e?l:e}}function co(t,e){l0(t,e),(t=t.alternate)&&l0(t,e)}function n0(t){if(t.tag===13||t.tag===31){var e=Jn(t,67108864);e!==null&&Qe(e,t,67108864),co(t,67108864)}}function a0(t){if(t.tag===13||t.tag===31){var e=tl();e=da(e);var l=Jn(t,e);l!==null&&Qe(l,t,e),co(t,e)}}var Wu=!0;function Wh(t,e,l,n){var a=D.T;D.T=null;var i=Y.p;try{Y.p=2,so(t,e,l,n)}finally{Y.p=i,D.T=a}}function Ih(t,e,l,n){var a=D.T;D.T=null;var i=Y.p;try{Y.p=8,so(t,e,l,n)}finally{Y.p=i,D.T=a}}function so(t,e,l,n){if(Wu){var a=oo(n);if(a===null)Js(t,e,n,Iu,l),u0(t,n);else if(tm(a,t,e,l,n))n.stopPropagation();else if(u0(t,n),e&4&&-1<Ph.indexOf(t)){for(;a!==null;){var i=Yt(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var u=mt(i.pendingLanes);if(u!==0){var f=i;for(f.pendingLanes|=2,f.entangledLanes|=2;u;){var v=1<<31-$t(u);f.entanglements[1]|=v,u&=~v}Ul(i),(kt&6)===0&&(Ru=Ee()+500,Ai(0))}}break;case 31:case 13:f=Jn(i,2),f!==null&&Qe(f,i,2),Hu(),co(i,2)}if(i=oo(n),i===null&&Js(t,e,n,Iu,l),i===a)break;a=i}a!==null&&n.stopPropagation()}else Js(t,e,n,null,l)}}function oo(t){return t=At(t),ro(t)}var Iu=null;function ro(t){if(Iu=null,t=Ke(t),t!==null){var e=y(t);if(e===null)t=null;else{var l=e.tag;if(l===13){if(t=S(e),t!==null)return t;t=null}else if(l===31){if(t=j(e),t!==null)return t;t=null}else if(l===3){if(e.stateNode.current.memoizedState.isDehydrated)return e.tag===3?e.stateNode.containerInfo:null;t=null}else e!==t&&(t=null)}}return Iu=t,null}function i0(t){switch(t){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ll()){case qn:return 2;case Bl:return 8;case Ze:case ra:return 32;case fn:return 268435456;default:return 32}default:return 32}}var fo=!1,_n=null,Rn=null,Un=null,Ri=new Map,Ui=new Map,Hn=[],Ph="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 u0(t,e){switch(t){case"focusin":case"focusout":_n=null;break;case"dragenter":case"dragleave":Rn=null;break;case"mouseover":case"mouseout":Un=null;break;case"pointerover":case"pointerout":Ri.delete(e.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ui.delete(e.pointerId)}}function Hi(t,e,l,n,a,i){return t===null||t.nativeEvent!==i?(t={blockedOn:e,domEventName:l,eventSystemFlags:n,nativeEvent:i,targetContainers:[a]},e!==null&&(e=Yt(e),e!==null&&n0(e)),t):(t.eventSystemFlags|=n,e=t.targetContainers,a!==null&&e.indexOf(a)===-1&&e.push(a),t)}function tm(t,e,l,n,a){switch(e){case"focusin":return _n=Hi(_n,t,e,l,n,a),!0;case"dragenter":return Rn=Hi(Rn,t,e,l,n,a),!0;case"mouseover":return Un=Hi(Un,t,e,l,n,a),!0;case"pointerover":var i=a.pointerId;return Ri.set(i,Hi(Ri.get(i)||null,t,e,l,n,a)),!0;case"gotpointercapture":return i=a.pointerId,Ui.set(i,Hi(Ui.get(i)||null,t,e,l,n,a)),!0}return!1}function c0(t){var e=Ke(t.target);if(e!==null){var l=y(e);if(l!==null){if(e=l.tag,e===13){if(e=S(l),e!==null){t.blockedOn=e,Yn(t.priority,function(){a0(l)});return}}else if(e===31){if(e=j(l),e!==null){t.blockedOn=e,Yn(t.priority,function(){a0(l)});return}}else if(e===3&&l.stateNode.current.memoizedState.isDehydrated){t.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}t.blockedOn=null}function Pu(t){if(t.blockedOn!==null)return!1;for(var e=t.targetContainers;0<e.length;){var l=oo(t.nativeEvent);if(l===null){l=t.nativeEvent;var n=new l.constructor(l.type,l);jt=n,l.target.dispatchEvent(n),jt=null}else return e=Yt(l),e!==null&&n0(e),t.blockedOn=l,!1;e.shift()}return!0}function s0(t,e,l){Pu(t)&&l.delete(e)}function em(){fo=!1,_n!==null&&Pu(_n)&&(_n=null),Rn!==null&&Pu(Rn)&&(Rn=null),Un!==null&&Pu(Un)&&(Un=null),Ri.forEach(s0),Ui.forEach(s0)}function tc(t,e){t.blockedOn===e&&(t.blockedOn=null,fo||(fo=!0,c.unstable_scheduleCallback(c.unstable_NormalPriority,em)))}var ec=null;function o0(t){ec!==t&&(ec=t,c.unstable_scheduleCallback(c.unstable_NormalPriority,function(){ec===t&&(ec=null);for(var e=0;e<t.length;e+=3){var l=t[e],n=t[e+1],a=t[e+2];if(typeof n!="function"){if(ro(n||l)===null)continue;break}var i=Yt(l);i!==null&&(t.splice(e,3),e-=3,os(i,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Qa(t){function e(v){return tc(v,t)}_n!==null&&tc(_n,t),Rn!==null&&tc(Rn,t),Un!==null&&tc(Un,t),Ri.forEach(e),Ui.forEach(e);for(var l=0;l<Hn.length;l++){var n=Hn[l];n.blockedOn===t&&(n.blockedOn=null)}for(;0<Hn.length&&(l=Hn[0],l.blockedOn===null);)c0(l),l.blockedOn===null&&Hn.shift();if(l=(t.ownerDocument||t).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],i=l[n+1],u=a[De]||null;if(typeof i=="function")u||o0(l);else if(u){var f=null;if(i&&i.hasAttribute("formAction")){if(a=i,u=i[De]||null)f=u.formAction;else if(ro(a)!==null)continue}else f=u.action;typeof f=="function"?l[n+1]=f:(l.splice(n,3),n-=3),o0(l)}}}function r0(){function t(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(u){return a=u})},focusReset:"manual",scroll:"manual"})}function e(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",e),navigation.addEventListener("navigateerror",e),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",e),navigation.removeEventListener("navigateerror",e),a!==null&&(a(),a=null)}}}function ho(t){this._internalRoot=t}lc.prototype.render=ho.prototype.render=function(t){var e=this._internalRoot;if(e===null)throw Error(r(409));var l=e.current,n=tl();e0(l,n,t,e,null,null)},lc.prototype.unmount=ho.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var e=t.containerInfo;e0(t.current,2,null,t,null,null),Hu(),e[Le]=null}};function lc(t){this._internalRoot=t}lc.prototype.unstable_scheduleHydration=function(t){if(t){var e=Xi();t={blockedOn:null,target:t,priority:e};for(var l=0;l<Hn.length&&e!==0&&e<Hn[l].priority;l++);Hn.splice(l,0,t),l===0&&c0(t)}};var f0=s.version;if(f0!=="19.2.8")throw Error(r(527,f0,"19.2.8"));Y.findDOMNode=function(t){var e=t._reactInternals;if(e===void 0)throw typeof t.render=="function"?Error(r(188)):(t=Object.keys(t).join(","),Error(r(268,t)));return t=x(e),t=t!==null?q(t):null,t=t===null?null:t.stateNode,t};var lm={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var nc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!nc.isDisabled&&nc.supportsFiber)try{jl=nc.inject(lm),xe=nc}catch{}}return Li.createRoot=function(t,e){if(!d(t))throw Error(r(299));var l=!1,n="",a=vf,i=bf,u=xf;return e!=null&&(e.unstable_strictMode===!0&&(l=!0),e.identifierPrefix!==void 0&&(n=e.identifierPrefix),e.onUncaughtError!==void 0&&(a=e.onUncaughtError),e.onCaughtError!==void 0&&(i=e.onCaughtError),e.onRecoverableError!==void 0&&(u=e.onRecoverableError)),e=Pd(t,1,!1,null,null,l,n,null,a,i,u,r0),t[Le]=e.current,Ks(t),new ho(e)},Li.hydrateRoot=function(t,e,l){if(!d(t))throw Error(r(299));var n=!1,a="",i=vf,u=bf,f=xf,v=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(i=l.onUncaughtError),l.onCaughtError!==void 0&&(u=l.onCaughtError),l.onRecoverableError!==void 0&&(f=l.onRecoverableError),l.formState!==void 0&&(v=l.formState)),e=Pd(t,1,!0,e,l??null,n,a,v,i,u,f,r0),e.context=t0(null),l=e.current,n=tl(),n=da(n),a=Sn(n),a.callback=null,En(l,a,n),l=n,e.current.lanes=l,kl(e,l),Ul(e),t[Le]=e.current,Ks(t),new lc(e)},Li.version="19.2.8",Li}var S0;function dm(){if(S0)return po.exports;S0=1;function c(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(c)}catch(s){console.error(s)}}return c(),po.exports=fm(),po.exports}var hm=dm();function xo(c,s,h){return c+(s-c)*h}function k0(c){return c-Math.floor(c)}function So(c,s){const h=Math.floor(c),r=Math.floor(s);let d=c-h,y=s-r;d=d*d*(3-2*d),y=y*y*(3-2*y);const S=ml(h,r),j=ml(h+1,r),M=ml(h,r+1),x=ml(h+1,r+1);return S+(j-S)*d+(M-S)*y+(S-j-M+x)*d*y}function ml(c,s){const h=Math.sin(c*12.9898+s*78.233)*43758.5453;return h-Math.floor(h)}function _o(c,s){const h=Math.PI*(3-Math.sqrt(5)),r=1-2*(c+.5)/s,d=Math.sqrt(1-r*r),y=c*h;return[d*Math.cos(y),r,d*Math.sin(y)]}function mm(c,s){return Math.atan2(Math.sin(c-s),Math.cos(c-s))}function sa(c,s,h,r,d){const y=Math.sin(s),S=Math.cos(s),j=Math.sin(c),M=Math.cos(c);return(x,q,H)=>{const J=x*M+H*j,Q=-x*j+H*M,X=q*S-Q*y,G=q*y+Q*S;return[h+J*d,r-X*d,G]}}function Ln(c,s,h,r=.3){s.sort((d,y)=>d.z-y.z);for(const d of s){const y=d.a??1;if(y<.02)continue;const S=Math.min(1,Math.max(0,d.white)),j=Math.round((h?1-S:S)*255);c.fillStyle=`rgba(${j},${j},${j},${y})`,c.beginPath(),c.arc(d.x,d.y,Math.max(r,d.r),0,Math.PI*2),c.fill()}}function gm(c,s,h){for(const r of s){const d=r.a??1;if(d<.02)continue;const y=Math.min(1,Math.max(0,r.white)),S=Math.round((h?1-y:y)*255);c.strokeStyle=`rgba(${S},${S},${S},${d})`,c.lineWidth=r.w,c.beginPath(),c.moveTo(r.x1,r.y1),c.lineTo(r.x2,r.y2),c.stroke()}}function oa(c,s){return(c/300)**s}const pm=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.76,M=sa(h*.4,.3,y,S,1),x=oa(s,d.rsPow??.6),q=[],H=d.ghostN??150;for(let X=0;X<H;X++){const G=_o(X,H),[dt,ot,g]=M(G[0]*j,G[1]*j,G[2]*j),et=(g/j+1)/2;q.push({x:dt,y:ot,z:g,r:.8*x,white:.78,a:.1+.22*et})}const J=d.strandN??52,Q=d.turns??3;for(let X=0;X<3;X++){const G=X/3*2*Math.PI;for(let dt=0;dt<J;dt++){const ot=(k0(dt/J+h*.045)*2-1)*.96,g=Math.sqrt(Math.max(0,1-ot*ot)),et=Math.min(1,(1-Math.abs(ot))/.1),ut=ot*Math.PI*Q+G,I=1+.075*Math.sin(ot*Math.PI*Q*2+G*2+h*.8),nt=g*j*I,[F,ct,ht]=M(Math.cos(ut)*nt,ot*j*I,Math.sin(ut)*nt),rt=(ht/j+1)/2;q.push({x:F,y:ct,z:ht,r:((d.rBase??1.2)+(d.rDepth??1.8)*rt)*x,white:.55-.45*rt,a:et*(.45+.55*rt)})}}Ln(c,q,r,d.rMin)};function ym(c,s,h,r){const d=2*s*h+r,y=c%d,S=new Array(s).fill(0);let j=-1;if(y<2*s*h){const M=Math.floor(y/h),x=(y-M*h)/h,q=1-(1-Math.min(1,x/.7))**3;if(M<s){for(let H=0;H<M;H++)S[H]=1;S[M]=q,j=M}else{const H=2*s-1-M;for(let J=0;J<H;J++)S[J]=1;S[H]=1-q,j=H}}return{amount:S,active:j}}function vm(c,s,h){let[r,d,y]=c,S=!1;for(let j=0;j<s.length;j++){if(h.amount[j]<=0)continue;const M=s[j],x=M.axis===0?r:M.axis===1?d:y;if(x<M.lo||x>=M.hi)continue;j===h.active&&(S=!0);const q=M.ang*h.amount[j],H=Math.cos(q),J=Math.sin(q);if(M.axis===0){const Q=d*H-y*J;y=d*J+y*H,d=Q}else if(M.axis===1){const Q=r*H+y*J;y=-r*J+y*H,r=Q}else{const Q=r*H-d*J;d=r*J+d*H,r=Q}}return[r,d,y,S]}function bm(c){const s=[];for(let h=0;h<c;h++){const r=Math.min(2,Math.floor(ml(h,2.3)*3)),d=-1+.5*Math.min(3,Math.floor(ml(h,5.9)*4)),y=ml(h,7.7)<.5?1:-1;s.push({axis:r,lo:d,hi:d+.5,ang:y*Math.PI/2})}return s}const xm=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.82,M=.4+.06*Math.sin(h*.35),x=sa(h*.5,M,y,S,j),q=h*(.5+(1.7-.5)*(d.scanMul??1)),H=oa(s,d.rsPow??.6),J=d.dimBase??1,Q=[],X=d.latRings??17,G=d.lonDensity??44;for(let dt=0;dt<=X;dt++){const ot=-Math.PI/2+dt/X*Math.PI,g=Math.cos(ot),et=Math.sin(ot),ut=Math.max(1,Math.round(Math.abs(g)*G));for(let I=0;I<ut;I++){const nt=I/ut*2*Math.PI,[F,ct,ht]=x(g*Math.cos(nt),et,g*Math.sin(nt)),rt=(ht+1)/2,yt=mm(nt+h*.5,q),St=Math.exp(-(yt*yt)/.18)*Math.max(0,ht);Q.push({x:F,y:ct,z:ht,r:((d.rBase??.6)+(d.rDepth??1.7)*rt+(d.rBoost??1)*St)*H,white:(d.inkFar??.62)-(d.inkSpan??.54)*rt,a:J+(1-J)*Math.min(1,St)})}}Ln(c,Q,r,d.rMin)},Sm=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.82,M=sa(h*.55,.35+.1*Math.sin(h*.9),y,S,j),x=oa(s,d.rsPow??.6),q=d.moveCount??14,H=bm(q),J=ym(h,q,.42,1.2),Q=[],X=d.latRings??15,G=d.lonDensity??40;for(let dt=0;dt<=X;dt++){const ot=-Math.PI/2+dt/X*Math.PI,g=Math.cos(ot),et=Math.sin(ot),ut=Math.max(1,Math.round(Math.abs(g)*G));for(let I=0;I<ut;I++){const nt=I/ut*2*Math.PI,[F,ct,ht,rt]=vm([g*Math.cos(nt),et,g*Math.sin(nt)],H,J),[yt,St,wt]=M(F,ct,ht),Nt=(wt+1)/2;Q.push({x:yt,y:St,z:wt,r:((d.rBase??.6)+(d.rDepth??1.7)*Nt+(rt?d.rActive??.3:0))*x,white:(d.inkFar??.62)-(d.inkSpan??.54)*Nt-(rt?.14:0)})}}Ln(c,Q,r,d.rMin)},Em=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.874,M=sa(h*.18,.38,y,S,1),x=oa(s,d.rsPow??.6),q=[],H=d.rings??15,J=d.lonDensity??40;for(let Q=0;Q<=H;Q++){const X=-Math.PI/2+Q/H*Math.PI,G=Math.cos(X),dt=Math.sin(X),ot=.62*Math.sin(h*2.1-Q*.52)+.38*Math.sin(h*1.27+Q*.83),g=j*(.88+.105*ot),et=Math.max(1,Math.round(Math.abs(G)*J));for(let ut=0;ut<et;ut++){const I=ut/et*2*Math.PI,[nt,F,ct]=M(G*Math.cos(I)*g,dt*g,G*Math.sin(I)*g),ht=(ct/j+1)/2,rt=Math.max(0,ot);q.push({x:nt,y:F,z:ct,r:((d.rBase??.6)+(d.rDepth??1.7)*ht)*(1+.4*rt)*x,white:.66-.56*ht-.1*rt})}}Ln(c,q,r,d.rMin)};function Mm(c){return c*c*(3-2*c)}function Y0(c){const s=c.length,h=[];let r=0;for(let d=0;d<s;d++){const y=c[d],S=c[(d+1)%s],j=Math.hypot(S[0]-y[0],S[1]-y[1]);h.push(j),r+=j}return d=>{let y=d*r,S=0;for(;y>h[S]&&S<s-1;)y-=h[S],S++;const j=c[S],M=c[(S+1)%s],x=h[S]?Math.min(1,y/h[S]):0;return[j[0]+(M[0]-j[0])*x,j[1]+(M[1]-j[1])*x]}}const Cm=c=>{const s=-Math.PI/2+c*2*Math.PI;return[Math.cos(s)*.24,Math.sin(s)*.24]},wm=Y0([[0,-.26],[.24,.16],[-.24,.16]]),jm=Y0([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]]),Eo=[Cm,wm,jm];function Am(c){return Math.max(6,Math.round(34*c))}const To=1.4,G0=.9,Mo=To+G0,Nm=(c,s,h,r,d)=>{const y=Eo.length,S=h%(Mo*y),j=Math.floor(S/Mo),M=S-j*Mo,x=M>To?Mm((M-To)/G0):0,q=d.spread??1,H=Eo[j],J=Eo[(j+1)%y],Q=160,X=[];for(let ct=0;ct<Q;ct++){const ht=ct/Q,rt=H(ht),yt=J(ht);X.push([(rt[0]+(yt[0]-rt[0])*x)*q,(rt[1]+(yt[1]-rt[1])*x)*q])}const G=[];let dt=0;for(let ct=0;ct<Q;ct++){const ht=X[ct],rt=X[(ct+1)%Q],yt=Math.hypot(rt[0]-ht[0],rt[1]-ht[1]);G.push(yt),dt+=yt}const ot=Am(d.iconD??1),g=(d.rDot??.021)*1.35*q,et=1+.02*Math.sin(M*3.1),ut=[],I=s/2;let nt=0,F=0;for(let ct=0;ct<ot;ct++){const ht=ct/ot*dt;for(;F+G[nt]<ht&&nt<Q-1;)F+=G[nt],nt++;const rt=X[nt],yt=X[(nt+1)%Q],St=G[nt]?Math.min(1,(ht-F)/G[nt]):0,wt=(rt[0]+(yt[0]-rt[0])*St)*et,Nt=(rt[1]+(yt[1]-rt[1])*St)*et;ut.push({x:I+wt*s,y:I+Nt*s,z:0,r:Math.max(.35,g*s),white:.1})}Ln(c,ut,r,d.rMin)},Dm=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.82,M=sa(h*.12,.3,y,S,1),x=oa(s,d.rsPow??.6),q=[],H=d.orbitN??12,J=d.ghostN??40,Q=d.particles??3;for(let X=0;X<H;X++){const G=ml(X,1.7),dt=ml(X,5.2),ot=ml(X,8.9),g=j*(.45+.52*G),et=G*2*Math.PI,ut=Math.acos(2*dt-1),I=Math.sin(ut)*Math.cos(et),nt=Math.cos(ut),F=Math.sin(ut)*Math.sin(et);let ct=-nt,ht=I;const rt=0,yt=Math.max(1e-6,Math.sqrt(ct*ct+ht*ht));ct/=yt,ht/=yt;const St=nt*rt-F*ht,wt=F*ct-I*rt,Nt=I*ht-nt*ct,Bt=(.25+.55*ot)*(ot>.5?1:-1);for(let D=0;D<J;D++){const Y=D/J*2*Math.PI,[N,U,K]=M((ct*Math.cos(Y)+St*Math.sin(Y))*g,(ht*Math.cos(Y)+wt*Math.sin(Y))*g,(rt*Math.cos(Y)+Nt*Math.sin(Y))*g),p=(K/g+1)/2;q.push({x:N,y:U,z:K,r:(d.ghostR??.9)*x,white:.72,a:(d.ghostA??.5)*(.4+.6*p)})}for(let D=0;D<Q;D++){const Y=h*Bt+D/Q*2*Math.PI+dt*6,[N,U,K]=M((ct*Math.cos(Y)+St*Math.sin(Y))*g,(ht*Math.cos(Y)+wt*Math.sin(Y))*g,(rt*Math.cos(Y)+Nt*Math.sin(Y))*g),p=(K/g+1)/2;q.push({x:N,y:U,z:K,r:((d.partR??1.2)+(d.partRDepth??1.6)*p)*x,white:.3-.22*p})}}Ln(c,q,r,d.rMin)},E0=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.78,M=d.spin??1,x=.3,q=sa(h*.1*M,x,y,S,1),H=oa(s,d.rsPow??.6),J=[],Q=d.ghostN??150;for(let Nt=0;Nt<Q;Nt++){const Bt=_o(Nt,Q),[D,Y,N]=q(Bt[0]*j,Bt[1]*j,Bt[2]*j),U=(N/j+1)/2;J.push({x:D,y:Y,z:N,r:.8*H,white:.78,a:.1+.22*U})}const X=h*.24*M,G=d.faceOn?-x:.55+.3*Math.sin(h*.18)*M,dt=Math.cos(X),ot=0,g=Math.sin(X),et=-g*Math.sin(G),ut=Math.cos(G),I=dt*Math.sin(G),nt=ot*I-g*ut,F=g*et-dt*I,ct=dt*ut-ot*et,ht=.23*(d.wobMul??1),rt=d.faceOn?j/(1+.85*ht):j,yt=d.lanes??5,St=d.segs??88,wt=Math.max(1,Math.round(yt*(d.bandMul??1)));for(let Nt=0;Nt<wt;Nt++){const Bt=(Nt-(wt-1)/2)*.075,D=Math.abs(Nt-(wt-1)/2)/Math.max(1,(wt-1)/2);for(let Y=0;Y<St;Y++){const N=Y/St*2*Math.PI,U=(.16*Math.sin(N*3-h*1.7+Nt*.22)+.07*Math.sin(N*5+h*1.1))*(d.wobMul??1),K=d.faceOn?1+U:1,p=d.faceOn?Bt:Bt+U,T=dt*Math.cos(N)+et*Math.sin(N)+nt*p,Z=ot*Math.cos(N)+ut*Math.sin(N)+F*p,V=g*Math.cos(N)+I*Math.sin(N)+ct*p,W=Math.sqrt(T*T+Z*Z+V*V),P=rt*K,[st,Ot,Dt]=q(T/W*P,Z/W*P,V/W*P),Wt=(Dt/j+1)/2;J.push({x:st,y:Ot,z:Dt,r:((d.rBase??1.1)+(d.rDepth??1.7)*Wt)*(1-.25*D)*H,white:.52-.44*Wt+.18*D,a:.4+.6*Wt})}}Ln(c,J,r,d.rMin)},Tm=(c,s,h,r,d)=>{const y=s/2,S=s/2,j=s/2*.8*(d.spread??1),M=sa(h*.12,.32,y,S,j),x=oa(s,d.rsPow??.6),q=d.nodeN??30,H=d.thr??.72,J=d.nodeR??1.4,Q=d.nodeRDepth??1.8,X=[];for(let g=0;g<q;g++){const et=_o(g,q),ut=et[0]+.3*(So(g*.31+9,h*.24)-.5)*2,I=et[1]+.3*(So(g*.53+27,h*.21)-.5)*2,nt=et[2]+.3*(So(g*.77+55,h*.27)-.5)*2,F=Math.sqrt(ut*ut+I*I+nt*nt);X.push([ut/F,I/F,nt/F])}const G=[],dt=[];for(let g=0;g<q;g++)for(let et=g+1;et<q;et++){const ut=X[g][0]-X[et][0],I=X[g][1]-X[et][1],nt=X[g][2]-X[et][2],F=Math.sqrt(ut*ut+I*I+nt*nt);if(F>=H)continue;const[ct,ht,rt]=M(X[g][0],X[g][1],X[g][2]),[yt,St,wt]=M(X[et][0],X[et][1],X[et][2]),Nt=((rt+wt)/2+1)/2;G.push({x1:ct,y1:ht,x2:yt,y2:St,white:.42,a:(1-F/H)*(.3+.55*Nt),w:Math.max(.6,(d.lineW??.8)*x)})}for(let g=0;g<q;g++){const[et,ut,I]=M(X[g][0],X[g][1],X[g][2]),nt=(I+1)/2,F=1+.25*Math.sin(h*1.4+g*2.7);dt.push({x:et,y:ut,z:I,r:(J+Q*nt)*F*x,white:.55-.45*nt})}const ot=d.signals??5;for(let g=0;g<ot;g++){const et=Math.floor(h*.55+g*7.31),ut=Math.floor(ml(et,g*3.1+1.7)*q),I=Math.floor(ml(et,g*5.7+4.2)*q);if(ut===I)continue;const nt=k0(h*.55+g*7.31),F=xo(X[ut][0],X[I][0],nt),ct=xo(X[ut][1],X[I][1],nt),ht=xo(X[ut][2],X[I][2],nt),rt=Math.max(1e-6,Math.sqrt(F*F+ct*ct+ht*ht)),[yt,St,wt]=M(F/rt,ct/rt,ht/rt),Nt=(wt+1)/2;dt.push({x:yt,y:St,z:wt,r:(J*1.5+Q*Nt)*x,white:.05,a:.5+.5*Nt})}gm(c,G,r),Ln(c,dt,r,d.rMin)},zm={orbits:Dm,globe:xm,rubik:Sm,wave:Em,web:Tm,braid:pm,ribbon:E0,ring:E0,morph:Nm},Om=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],_m=["orbitN","ghostN","nodeN","strandN","signals"],Rm=["iconD"],Um=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","nodeR","nodeRDepth"];function Hm(c,s){const h={...c},r=new Set,d=Math.sqrt(s);for(const[y,S]of Om){const j=h[y],M=h[S];j!=null&&M!=null&&!r.has(y)&&!r.has(S)&&(h[y]=Math.max(2,Math.round(j*d)),h[S]=Math.max(2,Math.round(M*d)),r.add(y),r.add(S))}for(const y of _m){const S=h[y];S!=null&&S!==0&&!r.has(y)&&(h[y]=Math.max(1,Math.round(S*s)))}for(const y of Rm){const S=h[y];S!=null&&(h[y]=Math.max(.02,S*s))}return h}function Bm(c,s){const h={...c};for(const r of Um){const d=h[r];d!=null&&(h[r]=d*s)}return h.rSizeMul=(h.rSizeMul??1)*s,h}const Lm={globe:{latRings:17,lonDensity:44,rBase:.6,rDepth:1.7,rBoost:1,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},orbits:{orbitN:12,ghostN:40,ghostR:.9,ghostA:.5,particles:3,partR:1.2,partRDepth:1.6,rsPow:.6,rMin:.3},rubik:{latRings:15,lonDensity:40,moveCount:14,rBase:.6,rDepth:1.7,rActive:.3,inkFar:.62,inkSpan:.54,rsPow:.6,rMin:.3},wave:{rings:15,lonDensity:40,rBase:.6,rDepth:1.7,rsPow:.6,rMin:.3},web:{nodeN:30,thr:.72,signals:5,nodeR:1.4,nodeRDepth:1.8,lineW:.8,rsPow:.6,rMin:.3},braid:{strandN:52,turns:3,ghostN:150,rBase:1.2,rDepth:1.8,rsPow:.6,rMin:.3},ribbon:{lanes:5,segs:88,ghostN:150,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},ring:{lanes:5,segs:88,ghostN:0,faceOn:1,rBase:1.1,rDepth:1.7,rsPow:.6,rMin:.3},morph:{rDot:.021,iconD:1,rMin:.25}},qm={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},km={orbits:{64:{speed:1.885,count:1,size:1},20:{speed:3.9,count:.238,size:2.4}},globe:{64:{speed:2.015,count:.42,size:1.15,extra:{scanMul:4.08,dimBase:.45}},20:{speed:2.665,count:.105,size:1.75,extra:{scanMul:4.335,dimBase:.45}}},rubik:{64:{speed:1.82,count:.35,size:1.05},20:{speed:1.95,count:.088,size:1.9}},wave:{64:{speed:4.388,count:.341,size:1},20:{speed:3.998,count:.105,size:1.6}},web:{64:{speed:3.315,count:1.35,size:.95},20:{speed:6.63,count:.25,size:1.52}},braid:{64:{speed:1.625,count:.5,size:1},20:{speed:2.75,count:.1125,size:1.36}},ribbon:{64:{speed:2.34,count:.25,size:.85,extra:{spin:0,bandMul:3.9,wobMul:1}},20:{speed:3.12,count:.051,size:1.073,extra:{spin:0,bandMul:4.94,wobMul:1}}},ring:{64:{speed:3.24,count:.25,size:.956,extra:{spin:0,bandMul:3.627,wobMul:.368}},20:{speed:3.78,count:.028,size:1.622,extra:{spin:0,bandMul:3.968,wobMul:.565}}},morph:{64:{speed:2.405,count:.702,size:.395,extra:{spread:1.45}},20:{speed:2.08,count:.53,size:1.011,extra:{spread:1.45}}}},M0=new Map;function Ym(c,s){const h=`${c}-${s}`,r=M0.get(h);if(r)return r;const d=qm[c],y=km[d][s];let S={...Lm[d]};y.count!==1&&(S=Hm(S,y.count)),y.size!==1&&(S=Bm(S,y.size)),y.extra&&(S={...S,...y.extra});const j={mode:d,speed:y.speed,opts:S};return M0.set(h,j),j}function Gm(c){let s=c;for(;s;){const h=s.getAttribute("data-theme");if(h==="dark")return!0;if(h==="light")return!1;if(s.classList.contains("dark"))return!0;if(s.classList.contains("light"))return!1;s=s.parentElement}return null}function Xm(){return typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches}function Qm(c,s){const[h,r]=z.useState(!0);return z.useEffect(()=>{if(c==="dark"){r(!0);return}if(c==="light"){r(!1);return}const d=()=>{const M=Gm(s.current);r(M??Xm())};d();const y=typeof matchMedia<"u"?matchMedia("(prefers-color-scheme: dark)"):null,S=()=>d();y?.addEventListener("change",S);let j=null;return typeof MutationObserver<"u"&&s.current&&(j=new MutationObserver(d),j.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0})),()=>{y?.removeEventListener("change",S),j?.disconnect()}},[c,s]),h}function Zm(){const[c,s]=z.useState(!1);return z.useEffect(()=>{if(typeof matchMedia>"u")return;const h=matchMedia("(prefers-reduced-motion: reduce)");s(h.matches);const r=d=>s(d.matches);return h.addEventListener("change",r),()=>h.removeEventListener("change",r)},[]),c}const Vm={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function X0({state:c="working",size:s=64,theme:h="auto",speed:r=1,paused:d=!1,style:y,"aria-label":S,...j}){const M=z.useRef(null),x=Qm(h,M),q=Zm();return z.useEffect(()=>{const H=M.current;if(!H)return;const J=Math.min(2,typeof devicePixelRatio<"u"&&devicePixelRatio||1);H.width=Math.round(s*J),H.height=Math.round(s*J);const Q=H.getContext("2d");if(!Q)return;const{mode:X,speed:G,opts:dt}=Ym(c,s),ot=zm[X],g=G*r,et=St=>{Q.setTransform(J,0,0,J,0,0),Q.clearRect(0,0,s,s),ot(Q,s,St,x,dt)};if(q){et(.6);return}let ut=0,I=!1;const nt=()=>{et(performance.now()/1e3*g),I&&(ut=requestAnimationFrame(nt))},F=()=>{I||d||(I=!0,ut=requestAnimationFrame(nt))},ct=()=>{I=!1,cancelAnimationFrame(ut)};et(performance.now()/1e3*g);let ht=!0;const rt=typeof IntersectionObserver<"u"?new IntersectionObserver(([St])=>{ht=St.isIntersecting,ht&&document.visibilityState!=="hidden"?F():ct()}):null;rt?.observe(H);const yt=()=>{document.visibilityState==="hidden"?ct():ht&&F()};return document.addEventListener("visibilitychange",yt),rt||F(),()=>{ct(),rt?.disconnect(),document.removeEventListener("visibilitychange",yt)}},[c,s,x,r,d,q]),o.jsx("canvas",{ref:M,role:"img","aria-label":S??Vm[c],style:{width:s,height:s,display:"block",...y},...j})}const Co=["searching","solving","composing","breathing","shaping"];function Km(c){const s=Math.floor(c*Co.length);return Co[Math.min(Co.length-1,Math.max(0,s))]}const Q0=Km(Math.random()),ca="ease-[cubic-bezier(0.32,0.72,0,1)]",Z0=274,V0=395,K0=368,J0=[{label:"Full",width:null},{label:"1440",width:1440},{label:"834",width:834},{label:"390",width:390}],an={agentPickerDismissed:!1,collapsed:!1,collapsedFamilies:[],deleted:[],corner:"bottom-right",font:"satoshi",hidden:[],order:[],renames:{},scaleSplit:!0,showDevOverlays:!0,showWidget:!0,viewport:null,width:K0};function Jm(c){return`leglas:${c}`}function $m(c,s){const h=s.map(r=>r.title);try{if(!c)return{...an,order:h};const r=JSON.parse(c),d={...an,...r},y=(Array.isArray(d.deleted)?d.deleted:[]).filter(x=>h.includes(x)),S=h.filter(x=>!y.includes(x)),j=(Array.isArray(d.order)?d.order:[]).filter(x=>S.includes(x)),M=["bottom-left","bottom-right","top-left","top-right"];return{agentPickerDismissed:typeof r.agentPickerDismissed=="boolean"?r.agentPickerDismissed:an.agentPickerDismissed,collapsed:!!d.collapsed,collapsedFamilies:(Array.isArray(d.collapsedFamilies)?d.collapsedFamilies:[]).filter(x=>S.includes(x)),corner:M.includes(d.corner)?d.corner:an.corner,deleted:y,font:typeof d.font=="string"?d.font:an.font,hidden:(Array.isArray(d.hidden)?d.hidden:[]).filter(x=>S.includes(x)),order:[...j,...S.filter(x=>!j.includes(x))],renames:Object.fromEntries(Object.entries(d.renames??{}).filter(([x])=>S.includes(x))),scaleSplit:typeof r.scaleSplit=="boolean"?r.scaleSplit:an.scaleSplit,showDevOverlays:typeof r.showDevOverlays=="boolean"?r.showDevOverlays:an.showDevOverlays,showWidget:typeof r.showWidget=="boolean"?r.showWidget:an.showWidget,viewport:J0.some(x=>x.width===d.viewport)?d.viewport:null,width:Number.isFinite(d.width)?Math.round(Math.min(V0,Math.max(Z0,d.width))):K0}}catch{return{...an,order:h}}}function Fm(c,s){const h=new Set(s),r=Object.fromEntries(Object.entries(c.renames).filter(([d])=>!h.has(d)));return{...c,collapsedFamilies:c.collapsedFamilies.filter(d=>!h.has(d)),deleted:[...new Set([...c.deleted,...s])],hidden:c.hidden.filter(d=>!h.has(d)),order:c.order.filter(d=>!h.has(d)),renames:r}}function Wm(c,s){if(c.length===0)return[...s];const h=new Set(s),r=c.filter(y=>h.has(y)),d=new Set(r);return[...r,...s.filter(y=>!d.has(y))]}function Im(c,s,h,r){const d=s.map(x=>x.title),y=(c.order.length?c.order:d).filter(x=>x!==h),j=y.filter(x=>!c.hidden.includes(x))[r],M=j===void 0?y.length:y.indexOf(j);return y.splice(M,0,h),y}const $0=8,Pm=8;function t2(c,s,h=$0){return c.left<h?h-c.left:c.right>s-h?Math.max(h-c.left,s-h-c.right):0}function e2(c,s,h,r=$0){if(c.top>=r)return!1;const d=c.bottom-c.top;return s.bottom+r+d<=h-r}function l2(c,s,h,r){const d=c.at==="right"?c.x:c.x-s.width/2,y=c.at==="top"?c.y-s.height:c.at==="bottom"?c.y:c.y-s.height/2,S={bottom:y+s.height,left:d,right:d+s.width,top:y};if(c.at==="top"&&e2(S,h,r.height))return{at:"bottom",shift:c.shift,y:h.bottom+Pm};const j=t2(S,r.width);return j===c.shift?null:{at:c.at,shift:j,y:c.y}}function ic({size:c=18}){return o.jsxs("svg",{"aria-hidden":!0,height:c,strokeLinejoin:"round",strokeWidth:22,viewBox:"160 370 1050 1320",width:Math.round(c*(1050/1320)),children:[o.jsxs("defs",{children:[o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-up",x1:"791.957",x2:"210",y1:"723.095",y2:"1010",children:[o.jsx("stop",{offset:"0",stopColor:"#7C38E8"}),o.jsx("stop",{offset:"0.68",stopColor:"#CDB6F1"}),o.jsx("stop",{offset:"1",stopColor:"#E9E0FA"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-down",x1:"789.954",x2:"210",y1:"1330.46",y2:"1035",children:[o.jsx("stop",{offset:"0",stopColor:"#3EC2A8"}),o.jsx("stop",{offset:"0.68",stopColor:"#9EDAE8"}),o.jsx("stop",{offset:"1",stopColor:"#E1F2F6"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-shaft",x1:"884.016",x2:"182",y1:"1023.26",y2:"1023.26",children:[o.jsx("stop",{offset:"0",stopColor:"#7E97DD"}),o.jsx("stop",{offset:"0.48",stopColor:"#5F7FD8"}),o.jsx("stop",{offset:"0.71",stopColor:"#9AABE2"}),o.jsx("stop",{offset:"1",stopColor:"#E2E8F6"})]}),o.jsxs("linearGradient",{gradientUnits:"userSpaceOnUse",id:"lm-head",x1:"1192",x2:"874.81",y1:"1021.57",y2:"1024.91",children:[o.jsx("stop",{offset:"0",stopColor:"#E8ECF7"}),o.jsx("stop",{offset:"1",stopColor:"#92A7E0"})]})]}),o.jsx("path",{d:"M 671.122 381.199 C 708.12 378.001 733.579 414.981 702.643 437.984 C 705.64 430.245 708.163 423.315 705.553 415.028 C 700.981 400.516 684.107 396.94 671.252 401.81 C 662.713 405.098 655.849 411.671 652.193 420.059 C 645.933 434.059 649.404 447.111 654.599 460.446 C 665.665 467.718 660.114 472.463 666.664 480.695 C 694.852 516.12 737.817 543.026 774.246 568.848 C 841.225 616.324 905.267 670.31 939.022 747.101 C 953.651 782.815 964.144 815.411 953.49 854.107 C 944.702 886.028 889.413 910.644 901.624 945.63 C 905.247 956.01 926.305 965.294 936.684 957.439 C 947.74 949.072 949.919 942.473 953.06 929.336 C 967.974 962.891 939.504 987.655 907.14 982.376 C 893.109 980.134 880.552 972.384 872.258 960.847 C 839.018 914.253 888.968 876.15 898.307 834.712 C 902.782 814.853 894.952 783.534 888.142 764.672 C 860.48 688.068 798.139 632.327 735.838 583.312 C 700.284 555.045 669.551 529.466 642.632 492.392 C 627.896 510.927 608.893 531.804 593.068 550.006 L 506.523 649.582 L 278.039 912.109 C 245.455 949.199 213.059 986.454 180.851 1023.87 C 231.765 1079.46 283.65 1142.04 333.374 1199.45 L 642.829 1555.74 C 666.446 1520.75 700.163 1494.07 732.424 1467.5 C 795.117 1417.7 858.256 1363.37 887.261 1286.25 C 898.113 1256.93 906.911 1217.89 889.705 1189.06 C 873.478 1161.87 852.143 1132.56 865.539 1099.12 C 871.003 1085.24 881.904 1074.2 895.712 1068.56 C 930.406 1054.52 970.704 1079.86 953.232 1118.88 C 950.548 1106.58 948.459 1099.64 937.837 1091.37 C 926.133 1082.27 907.942 1089.57 901.99 1101.66 C 890.169 1127.27 924.549 1151.85 939.219 1169.81 C 966.471 1203.18 959.658 1245.71 945.71 1284.44 C 914.285 1371.69 840.069 1433.7 765.809 1484.61 C 733.647 1506.66 698.091 1531.58 672.306 1561.08 C 665.933 1568.59 659.014 1581.87 653.634 1590.29 C 648.506 1598.32 647.787 1615.38 650.833 1624.56 C 653.881 1633.77 660.579 1641.32 669.359 1645.45 C 681.85 1651.27 699.281 1649.12 705.041 1634.65 C 708.705 1625.45 705.419 1617.29 701.581 1608.8 L 702.848 1609.85 C 737.88 1638.68 697.51 1681.47 657.106 1662.8 C 643.389 1656.45 632.826 1644.83 627.824 1630.56 C 619.064 1605.85 626.824 1585.32 637.489 1563.26 C 610.659 1534.07 581.755 1498.91 555.456 1468.66 L 383.745 1271.03 L 242.504 1108.25 C 219.223 1081.36 191.596 1051.06 169.707 1023.52 C 181.894 1007.58 201.352 986.522 215.082 970.737 L 301.342 871.646 L 539.659 597.67 C 572.041 560.265 605.914 522.417 637.6 484.482 C 616.356 444.192 617.849 392.637 671.122 381.199 z",fill:"#E8ECF7",stroke:"#E8ECF7"}),o.jsx("path",{d:"M 791.002 712.436 C 791.99 712.378 791.355 712.338 792.831 712.983 C 791.837 718.407 719.488 841.546 710.03 858.509 C 707.23 840.677 702.304 817.013 698.274 799.446 C 555 895 360 995 182 1023 C 355 963 525 870 674.863 761.103 C 659.702 748.905 644.649 736.575 629.704 724.113 C 681.16 722.084 738.984 715.793 791.002 712.436 z",fill:"url(#lm-up)",stroke:"url(#lm-up)"}),o.jsx("path",{d:"M 182 1023 C 360 1051 555 1151 698.326 1248.65 C 702.16 1232.41 707.425 1206.32 709.871 1189.79 C 737.246 1238.39 766.184 1286.55 793.713 1335.16 C 739.167 1331.05 684.598 1327.24 630.009 1323.75 C 644.462 1311.53 659.652 1298.21 674.331 1286.42 C 525 1176 355 1083 182 1023 z",fill:"url(#lm-down)",stroke:"url(#lm-down)"}),o.jsx("path",{d:"M 182 1023.5 L 884.044 1002.33 L 881.311 1004.34 C 882.15 1018.85 886.981 1021.89 881.356 1038.74 C 878.766 1040.79 876.225 1042.9 873.734 1045.08 z",fill:"url(#lm-shaft)",stroke:"url(#lm-shaft)"}),o.jsx("path",{d:"M 1005.63 925.199 L 1121.78 984.34 C 1142.45 994.767 1179.5 1012.52 1198.4 1023.72 L 1070.98 1089.03 C 1051.67 1098.95 1023.69 1114.54 1004.93 1122.53 C 1013.61 1097.65 1022.5 1072.85 1031.59 1048.12 L 873.734 1045.08 C 876.225 1042.9 878.766 1040.79 881.356 1038.74 C 886.981 1021.89 882.15 1018.85 881.311 1004.34 L 884.044 1002.33 L 1030.81 999.036 C 1023.04 976.689 1012.03 947.529 1005.63 925.199 z",fill:"url(#lm-head)",stroke:"url(#lm-head)"})]})}function n2({height:c=16}){return o.jsxs("svg",{"aria-label":"Leglas",fill:"#E8ECF7",height:c,role:"img",viewBox:"1256 928 642 222",width:Math.round(c*(642/222)),children:[o.jsx("path",{d:"M 1532.93 979.19 C 1552.43 978.051 1561.54 979.865 1574.88 995.12 L 1575.07 981.036 L 1598.92 981.151 L 1598.96 1052.38 C 1598.98 1086.98 1603.87 1127.82 1557.89 1134.37 C 1533.59 1137.83 1517.6 1134.59 1498.35 1119.87 L 1504.96 1108.54 L 1508.69 1102.35 C 1525.04 1114.93 1548.42 1124.68 1566.62 1107.48 C 1575.66 1098.94 1575.05 1084.76 1574.99 1073.16 C 1568.8 1080.06 1562.18 1085.4 1553.24 1088.34 C 1542.19 1091.88 1530.17 1090.79 1519.94 1085.31 C 1486.94 1067.75 1484.12 1009.92 1513.66 987.847 C 1520.32 982.873 1525.18 981.186 1532.93 979.19 z M 1541.52 1000.13 C 1555.85 998.918 1566.45 1003.26 1574.9 1015.05 C 1575.09 1027.93 1574.91 1041.22 1574.89 1054.14 C 1567.52 1063.25 1562.65 1066.25 1551.25 1068.92 C 1511.01 1069.99 1505.34 1012.62 1541.52 1000.13 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1416.95 979.231 C 1461.09 974.139 1477.7 1004.91 1478.08 1043.29 L 1395.13 1043.56 C 1404.31 1072.49 1429.03 1082.58 1454.48 1064.74 C 1457.34 1062.33 1456.68 1062.04 1459.58 1062.05 C 1464.01 1065.22 1467.95 1071.97 1471.41 1076.59 C 1414.1 1122.22 1344.57 1064.4 1381 1001.64 C 1388.32 989.03 1403.12 982.109 1416.95 979.231 z M 1419.64 998.169 C 1442.21 996.072 1449.85 1006.61 1455.14 1026.51 C 1448.55 1026.96 1438.16 1026.58 1431.31 1026.54 C 1419.15 1026.65 1406.99 1026.63 1394.83 1026.48 C 1398.74 1009.86 1403.7 1003.36 1419.64 998.169 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1713.27 979.252 C 1728.04 977.573 1745.26 979.123 1756.3 989.97 C 1768.26 1001.72 1767.44 1017.49 1767.31 1032.81 C 1767.15 1051.82 1767.12 1070.77 1767.06 1089.74 L 1757.36 1089.93 C 1733.55 1090.35 1748.04 1086.51 1742.3 1080.97 C 1727.07 1089.66 1714.5 1096.6 1695.79 1090.38 C 1685.07 1086.81 1679.16 1079.18 1674.51 1069.31 C 1663.26 1025.76 1710.42 1008.22 1743.06 1033.45 C 1743.17 1029.64 1743.75 1021.08 1742.89 1017.76 C 1734.81 986.781 1704.35 998.377 1687.37 1012 C 1684.28 1006.47 1681.22 1000.93 1678.2 995.358 C 1689.81 985.727 1698.69 981.852 1713.27 979.252 z M 1714.53 1038.21 C 1726.37 1037.77 1733.38 1039.57 1742.94 1046.21 C 1743.21 1052.09 1743.05 1058.97 1743.05 1064.94 C 1736.15 1071.44 1733.92 1072.52 1724.6 1074.96 C 1709.1 1075.75 1690.77 1070.07 1698.16 1048.49 C 1700.08 1042.9 1708.94 1039.56 1714.53 1038.21 z",fillRule:"evenodd"}),o.jsx("path",{d:"M 1823.29 979.174 C 1843.68 977.649 1857.91 980.343 1873.82 993.561 L 1864.19 1010.31 C 1854.9 1002.37 1842.52 996.264 1830.29 997.499 C 1810.54 999.496 1804.87 1016.41 1827.99 1021.78 C 1853.42 1027.68 1886.98 1035.62 1875.05 1070.07 C 1869.31 1086.64 1852.8 1091.05 1837.21 1092.35 C 1816.02 1092.18 1803.14 1089.58 1786.76 1075.52 L 1797.03 1058.98 C 1810.81 1068.5 1823.36 1075.69 1840.97 1072.95 C 1848.65 1071.76 1856.31 1065.31 1853.69 1057.02 C 1850.58 1049.89 1837.32 1046.22 1830.02 1044.91 C 1802.77 1040.01 1777.57 1024.93 1796.42 994.719 C 1802.7 984.652 1812.04 981.686 1823.29 979.174 z"}),o.jsx("path",{d:"M 1266.98 939.821 L 1293.02 939.95 L 1293.03 1066.58 L 1358.72 1066.65 L 1358.8 1089.73 L 1266.88 1089.69 L 1266.98 939.821 z"}),o.jsx("path",{d:"M 1627.11 939.241 L 1650.97 939.358 L 1650.98 1089.81 L 1627.17 1089.88 C 1626.5 1040.3 1626.89 988.911 1627.11 939.241 z"})]})}const dl={copy:"M216,28H88A12,12,0,0,0,76,40V76H40A12,12,0,0,0,28,88V216a12,12,0,0,0,12,12H168a12,12,0,0,0,12-12V180h36a12,12,0,0,0,12-12V40A12,12,0,0,0,216,28ZM156,204H52V100H156Zm48-48H180V88a12,12,0,0,0-12-12H100V52H204Z",pencil:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z",link:"M87.5,151.52l64-64a12,12,0,0,1,17,17l-64,64a12,12,0,0,1-17-17Zm131-114a60.08,60.08,0,0,0-84.87,0L103.51,67.61a12,12,0,0,0,17,17l30.07-30.06a36,36,0,0,1,50.93,50.92L171.4,135.52a12,12,0,1,0,17,17l30.08-30.06A60.09,60.09,0,0,0,218.45,37.55ZM135.52,171.4l-30.07,30.08a36,36,0,0,1-50.92-50.93l30.06-30.07a12,12,0,0,0-17-17L37.55,133.58a60,60,0,0,0,84.88,84.87l30.06-30.07a12,12,0,0,0-17-17Z",search:"M229.66,218.34l-50.07-50.06a88.11,88.11,0,1,0-11.31,11.31l50.06,50.07a8,8,0,0,0,11.32-11.32ZM40,112a72,72,0,1,1,72,72A72.08,72.08,0,0,1,40,112Z",split:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60h72V196H44ZM212,196H140V60h72Z",sidebar:"M216,36H40A20,20,0,0,0,20,56V200a20,20,0,0,0,20,20H216a20,20,0,0,0,20-20V56A20,20,0,0,0,216,36ZM44,60H76V196H44ZM212,196H100V60H212Z",trash:"M216,48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM188,204H68V72H188ZM76,20A12,12,0,0,1,88,8h80a12,12,0,0,1,0,24H88A12,12,0,0,1,76,20Z"},qi="flex h-6 w-6 items-center justify-center rounded text-[#D1D5DB] hover:bg-[#2E2E2E] hover:text-white";function wo({on:c}){return o.jsx("span",{"aria-hidden":"true",className:`relative h-3.5 w-6 shrink-0 rounded-full transition-colors duration-150 motion-reduce:transition-none ${c?"bg-[#E6E8EC]":"bg-[#17181B]"}`,children:o.jsx("span",{className:`absolute left-0.5 top-0.5 size-2.5 rounded-full transition-transform duration-150 motion-reduce:transition-none ${c?"translate-x-2.5 bg-[#17181B]":"bg-[#84848C]"}`})})}function hl({d:c,size:s=13}){return o.jsx("svg",{"aria-hidden":!0,fill:"currentColor",height:s,viewBox:"0 0 256 256",width:s,children:o.jsx("path",{d:c})})}let C0=0;function Ae({children:c,label:s,side:h="top",wide:r=!1}){const d=z.useRef(null),y=z.useRef(null),S=z.useRef(null),j=z.useRef(null),[M,x]=z.useState(null);z.useLayoutEffect(()=>{const Q=y.current,X=d.current?.firstElementChild;if(!M||M.out||!Q||!X)return;const G=l2(M,{height:Q.offsetHeight,width:Q.offsetWidth},X.getBoundingClientRect(),{height:window.innerHeight,width:window.innerWidth});G&&x(dt=>dt&&{...dt,...G})},[s,M?.at,M?.out,M?.shift,M?.x,M?.y]),z.useEffect(()=>()=>{S.current&&clearTimeout(S.current),j.current&&clearTimeout(j.current)},[]);const q=()=>{const Q=d.current?.firstElementChild;if(!Q)return;const X=Q.getBoundingClientRect();j.current&&clearTimeout(j.current),x(h==="top"?{at:"top",out:!1,shift:0,x:X.left+X.width/2,y:X.top-8}:{at:"right",out:!1,shift:0,x:X.right+8,y:X.top+X.height/2})},H=()=>{S.current&&clearTimeout(S.current),S.current=setTimeout(q,Date.now()<C0?0:300)},J=()=>{S.current&&clearTimeout(S.current),C0=Date.now()+300,x(Q=>Q&&!Q.out?{...Q,out:!0}:Q),j.current&&clearTimeout(j.current),j.current=setTimeout(()=>x(null),120)};return o.jsxs("span",{className:"contents",onBlur:J,onFocus:Q=>{Q.target.matches(":focus-visible")&&q()},onPointerDown:J,onPointerEnter:H,onPointerLeave:J,ref:d,children:[c,M&&o.jsx("span",{"aria-hidden":!0,className:"pointer-events-none fixed z-[60]",style:{left:M.x+M.shift,top:M.y},children:o.jsx("span",{className:`block ${{bottom:"-translate-x-1/2",right:"-translate-y-1/2",top:"-translate-x-1/2 -translate-y-full"}[M.at]}`,children:o.jsx("span",{className:`leglas-tip block rounded-lg border border-white/10 bg-[#171717] px-2 py-1 text-xs font-medium text-white shadow-lg ${r?"w-64 whitespace-normal":"whitespace-nowrap"} ${M.out?`leglas-tip-out-${M.at}`:`leglas-tip-in-${M.at}`}`,ref:y,children:s})})})]})}function a2({error:c,initial:s,label:h,onCancel:r,onCommit:d}){const y=z.useRef(!1);return z.useEffect(()=>{c&&(y.current=!1)}),o.jsx("form",{className:"leglas-rename min-w-0 flex-1",onSubmit:S=>{S.preventDefault();const j=new FormData(S.currentTarget).get("name");y.current=!0,d(typeof j=="string"?j.trim():"","submit")},children:o.jsx("input",{"aria-describedby":c?"leglas-rename-error":void 0,"aria-invalid":c?!0:void 0,"aria-label":h,autoFocus:!0,className:`-mx-1 block w-[calc(100%+0.5rem)] rounded-[4px] bg-transparent px-1 py-0 text-sm font-medium leading-5 text-white outline-none ring-1 ${c?"ring-amber-400/60":"ring-[#D1D5DB]/45 focus:ring-[#D1D5DB]/70"}`,defaultValue:s,name:"name",onBlur:S=>{y.current||d(S.currentTarget.value.trim(),"blur")},onKeyDown:S=>{S.key==="Escape"&&(y.current=!0,r())},type:"text"})})}const i2={danger:"bg-amber-300",info:"bg-[#9CA3AF]",success:"bg-emerald-300"},u2=140;function c2({onDismiss:c,toast:s}){const[h,r]=z.useState(!1),[d,y]=z.useState(!1),[S,j]=z.useState(!1),M=z.useRef(s.ttl),x=z.useRef(null),q=()=>{x.current||(r(!0),x.current=setTimeout(c,u2))},H=d||S;return z.useEffect(()=>{if(h||H||M.current===null)return;const J=Date.now(),Q=setTimeout(q,M.current);return()=>{clearTimeout(Q),M.current!==null&&(M.current=Math.max(0,M.current-(Date.now()-J)))}},[h,H]),z.useEffect(()=>()=>{x.current&&clearTimeout(x.current)},[]),o.jsxs("li",{className:`pointer-events-auto flex items-start gap-2.5 rounded-lg border border-white/10 bg-[#2E2E2E] px-3 py-2.5 shadow-xl shadow-black/40 ${h?"leglas-toast-out":"leglas-toast-in"}`,onBlur:()=>j(!1),onFocus:()=>j(!0),onPointerEnter:()=>y(!0),onPointerLeave:()=>y(!1),children:[o.jsx("span",{"aria-hidden":!0,className:`mt-[5px] size-1.5 shrink-0 rounded-full ${i2[s.tone]}`}),o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsx("span",{className:"block text-xs leading-snug text-[#E8E8EA]",children:s.message}),s.detail?o.jsx("span",{className:"mt-1 block cursor-text select-text break-all text-[10px] leading-snug text-[#9CA3AF]","data-selectable":"",style:{fontFamily:"var(--font-mono)"},children:s.detail}):null]}),s.action?o.jsx("button",{className:"shrink-0 rounded px-1 py-0.5 text-[11px] font-medium text-white underline decoration-white/30 underline-offset-2 transition-colors hover:decoration-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#D1D5DB]/60",onClick:()=>{s.action?.run(),q()},type:"button",children:s.action.label}):null,o.jsx("button",{"aria-label":"Dismiss",className:"-mr-1 flex size-5 shrink-0 items-center justify-center rounded text-[#84848C] transition-colors hover:bg-white/[0.06] hover:text-white focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-[#D1D5DB]/60",onClick:q,type:"button",children:o.jsx("svg",{className:"size-2.5",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 10 10",children:o.jsx("path",{d:"M2.5 2.5 7.5 7.5M7.5 2.5 2.5 7.5",strokeLinecap:"round"})})})]})}function s2({bottom:c,left:s,onDismiss:h,toasts:r,width:d}){return o.jsx("ol",{"aria-live":"polite",className:`pointer-events-none fixed z-40 flex flex-col gap-2 transition-[bottom,left,width] duration-200 ${ca} motion-reduce:transition-none`,style:{bottom:c,left:s,width:d},children:r.map(y=>o.jsx(c2,{onDismiss:()=>h(y.id),toast:y},y.id))})}function o2({loaded:c}){return o.jsxs("div",{"aria-hidden":!0,className:`absolute inset-0 overflow-hidden bg-white transition-opacity duration-700 ${ca} ${c?"pointer-events-none opacity-0":"opacity-100"}`,children:[o.jsxs("div",{children:[o.jsx("div",{className:"mx-auto mt-6 h-12 w-[400px] max-w-[80%] rounded-full bg-neutral-200/80"}),o.jsxs("div",{className:"mx-auto mt-24 grid w-full max-w-5xl grid-cols-[1.05fr_0.95fr] items-start gap-16 px-12 max-[900px]:grid-cols-1",children:[o.jsxs("div",{children:[o.jsx("div",{className:"h-14 w-4/5 rounded-lg bg-neutral-200"}),o.jsx("div",{className:"mt-3 h-14 w-3/5 rounded-lg bg-neutral-200"}),o.jsx("div",{className:"mt-8 h-4 w-full max-w-[420px] rounded bg-neutral-200/80"}),o.jsx("div",{className:"mt-2 h-4 w-4/5 max-w-[360px] rounded bg-neutral-200/80"}),o.jsx("div",{className:"mt-10 h-12 w-44 rounded-full bg-neutral-200"})]}),o.jsx("div",{className:"h-[420px] w-60 justify-self-center rounded-[2.5rem] bg-neutral-200 max-[900px]:hidden"})]})]}),o.jsx("div",{className:"pointer-events-none absolute inset-0 overflow-hidden motion-reduce:hidden",children:o.jsx("div",{className:"absolute inset-0 -translate-x-full animate-[leglas-skeleton-sweep_1.6s_ease-in-out_infinite]",style:{background:"linear-gradient(100deg, transparent 32%, rgba(255,255,255,0.55) 50%, transparent 68%)"}})}),o.jsxs("span",{className:"absolute bottom-4 right-5 flex items-center gap-2",children:[o.jsx(X0,{"aria-label":"",size:20,state:Q0,theme:"light"}),o.jsx("span",{className:"leglas-shimmer-text text-xs font-medium",children:"Loading preview…"})]})]})}function r2({onReload:c,reason:s}){return o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-white p-6 text-center",role:"alert",children:[o.jsxs("div",{className:"max-w-xs",children:[o.jsx("p",{className:"text-sm font-medium text-neutral-800",children:"Preview didn’t load"}),o.jsx("p",{className:"mt-1 text-xs leading-snug text-neutral-500",children:s})]}),o.jsx("button",{className:"rounded-md bg-neutral-900 px-3 py-1.5 text-xs font-medium text-white transition-colors hover:bg-neutral-700",onClick:c,type:"button",children:"Reload"})]})}function jo({id:c,size:s=14}){const h=z.useId();return c==="claude"?o.jsx("svg",{"aria-hidden":"true",fill:"#D97757",height:s,viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"m4.7144 15.9555 4.7174-2.6471.079-.2307-.079-.1275h-.2307l-.7893-.0486-2.6956-.0729-2.3375-.0971-2.2646-.1214-.5707-.1215-.5343-.7042.0546-.3522.4797-.3218.686.0608 1.5179.1032 2.2767.1578 1.6514.0972 2.4468.255h.3886l.0546-.1579-.1336-.0971-.1032-.0972L6.973 9.8356l-2.55-1.6879-1.3356-.9714-.7225-.4918-.3643-.4614-.1578-1.0078.6557-.7225.8803.0607.2246.0607.8925.686 1.9064 1.4754 2.4893 1.8336.3643.3035.1457-.1032.0182-.0728-.164-.2733-1.3539-2.4467-1.445-2.4893-.6435-1.032-.17-.6194c-.0607-.255-.1032-.4674-.1032-.7285L6.287.1335 6.6997 0l.9957.1336.419.3642.6192 1.4147 1.0018 2.2282 1.5543 3.0296.4553.8985.2429.8318.091.255h.1579v-.1457l.1275-1.706.2368-2.0947.2307-2.6957.0789-.7589.3764-.9107.7468-.4918.5828.2793.4797.686-.0668.4433-.2853 1.8517-.5586 2.9021-.3643 1.9429h.2125l.2429-.2429.9835-1.3053 1.6514-2.0643.7286-.8196.85-.9046.5464-.4311h1.0321l.759 1.1293-.34 1.1657-1.0625 1.3478-.8804 1.1414-1.2628 1.7-.7893 1.36.0729.1093.1882-.0183 2.8535-.607 1.5421-.2794 1.8396-.3157.8318.3886.091.3946-.3278.8075-1.967.4857-2.3072.4614-3.4364.8136-.0425.0304.0486.0607 1.5482.1457.6618.0364h1.621l3.0175.2247.7892.522.4736.6376-.079.4857-1.2142.6193-1.6393-.3886-3.825-.9107-1.3113-.3279h-.1822v.1093l1.0929 1.0686 2.0035 1.8092 2.5075 2.3314.1275.5768-.3218.4554-.34-.0486-2.2039-1.6575-.85-.7468-1.9246-1.621h-.1275v.17l.4432.6496 2.3436 3.5214.1214 1.0807-.17.3521-.6071.2125-.6679-.1214-1.3721-1.9246L14.38 17.959l-1.1414-1.9428-.1397.079-.674 7.2552-.3156.3703-.7286.2793-.6071-.4614-.3218-.7468.3218-1.4753.3886-1.9246.3157-1.53.2853-1.9004.17-.6314-.0121-.0425-.1397.0182-1.4328 1.9672-2.1796 2.9446-1.7243 1.8456-.4128.164-.7164-.3704.0667-.6618.4008-.5889 2.386-3.0357 1.4389-1.882.929-1.0868-.0062-.1579h-.0546l-6.3385 4.1164-1.1293.1457-.4857-.4554.0608-.7467.2307-.2429 1.9064-1.3114Z"})}):c==="cursor"?o.jsx("svg",{"aria-hidden":"true",fill:"currentColor",height:s,viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"M11.503.131 1.891 5.678a.84.84 0 0 0-.42.726v11.188c0 .3.162.575.42.724l9.609 5.55a1 1 0 0 0 .998 0l9.61-5.55a.84.84 0 0 0 .42-.724V6.404a.84.84 0 0 0-.42-.726L12.497.131a1.01 1.01 0 0 0-.996 0M2.657 6.338h18.55c.263 0 .43.287.297.515L12.23 22.918c-.062.107-.229.064-.229-.06V12.335a.59.59 0 0 0-.295-.51l-9.11-5.257c-.109-.063-.064-.23.061-.23"})}):c==="codex"?o.jsxs("svg",{"aria-hidden":"true",height:s,viewBox:"0 0 24 24",width:s,children:[o.jsx("defs",{children:o.jsxs("linearGradient",{id:h,x1:"0",x2:"0",y1:"0",y2:"1",children:[o.jsx("stop",{offset:"0",stopColor:"#9B96F2"}),o.jsx("stop",{offset:"0.55",stopColor:"#5E6CF6"}),o.jsx("stop",{offset:"1",stopColor:"#3B32EF"})]})}),o.jsx("path",{d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457z",fill:`url(#${h})`}),o.jsx("path",{d:"M7.282 8.307a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zM12.728 14.547a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z",fill:"#F4F4FE"})]}):c==="custom"?o.jsx("svg",{"aria-hidden":"true",fill:"none",height:s,stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2",viewBox:"0 0 24 24",width:s,children:o.jsx("path",{d:"m5 6 6 6-6 6M13 18h6"})}):null}function f2(c){const s=document.createElement("textarea");s.value=c,s.setAttribute("readonly",""),s.style.cssText="position:fixed;top:-1000px;opacity:0",document.body.append(s),s.select();try{return document.execCommand("copy")}finally{s.remove()}}function d2(){return{clipboard:typeof navigator>"u"?void 0:navigator.clipboard,legacy:typeof document>"u"?void 0:f2}}async function zo(c,s=d2()){if(s.clipboard)try{return await s.clipboard.writeText(c),"copied"}catch{}try{if(s.legacy?.(c))return"copied"}catch{}return"blocked"}const h2=9;function m2(c){if((c.metaKey||c.ctrlKey)&&!c.altKey&&!c.shiftKey&&c.key.toLowerCase()==="k")return{kind:"search"};if(c.typing||c.metaKey||c.ctrlKey||c.altKey)return null;const{key:s}=c;if(s==="?")return{kind:"help"};if(s==="ArrowDown")return{kind:"move",delta:1};if(s==="ArrowUp")return{kind:"move",delta:-1};const h=s.length===1?s.toLowerCase():"";return h==="a"?{kind:"note"}:h==="c"?{kind:"split"}:h==="b"?{kind:"rail"}:h==="r"?{kind:"request"}:h==="t"?{kind:"tools"}:s.length===1&&s>="1"&&s<=String(h2)?{kind:"jump",index:Number(s)-1}:null}function F0(c){return c?"⌘Cmd+K":"Ctrl+K"}function g2(c){return[{keys:["↑","↓"],label:"Move between directions"},{keys:["1","9"],join:"to",label:"Jump straight to a direction"},{keys:["C"],label:"Compare against the direction you were last on"},{keys:["R"],label:"Ask for a change to this direction"},{keys:["A"],label:"Annotate the design: point at what is wrong"},{keys:[F0(c)],label:"Search"},{keys:["B"],label:"Collapse or open the rail"},{keys:["T"],label:"Open or close the Leglas dev tool menu"},{keys:["?"],label:"This list"},{keys:["Esc"],label:"Clear the search, or close what is open"}]}function w0(c){return c.file===void 0&&c.branch===void 0&&c.url.startsWith("/")}const p2={reachable:!0,wasDown:!1};function y2(c,s){return s?{reachable:!0,wasDown:c.wasDown}:{reachable:!1,wasDown:!0}}function v2(c){const s=c.rows,h=r=>r!=null&&r!==c.active&&(s===void 0||s.includes(r));return h(c.pinned)?c.pinned:h(c.parent)?c.parent:h(c.previous)?c.previous:s?.find(r=>r!==c.active)??null}function b2(c){return!c.split||c.compare===null||c.compare===c.active?[c.active]:[c.active,c.compare]}const x2=.999,S2=.05;function E2(c){const{gutter:s,panes:h,scaleSplit:r,stageHeight:d,stageWidth:y,viewport:S}=c,j=h>1?(y-(h-1))/h:y,M=S??y,x=j-(S!==null?s:0),q=d-(S!==null?s:0),J=r&&h>1&&y>0&&M>0?Math.max(S2,Math.min(1,x/M)):1,Q=J<x2;return{boxHeight:q*J,boxWidth:M*J,designWidth:M,frameHeight:q,scale:J,scaling:Q}}const M2="#__next-build-watcher,#nuxt-devtools-anchor,astro-dev-toolbar{display:none!important}",C2="#devtools-indicator{display:none!important}",w2=12;function j2(c,s,h=[]){const r=c.replace(/\s+/g," ").trim().toLowerCase();return r.length<w2?null:`${s.join(">")} ${r} ${h.join("|")}`.trimEnd()}const A2=new Set(["LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE"]);function N2(c,s){if(!c)return[];const h=[];let r=c;for(let d=0;d<4;d+=1){const y=s(r);h.push(`${y.backgroundColor};${y.backgroundImage};${y.color}`);const S=Array.from(r.children).filter(M=>!A2.has(M.tagName??"")),j=S.length===1?S[0]:void 0;if(j===void 0)break;r=j}return h}function D2(c){const s=new Map;for(const[r,d]of Object.entries(c)){if(d===null)continue;const y=s.get(d);y?y.push(r):s.set(d,[r])}const h={};for(const r of s.values())if(!(r.length<2))for(const d of r)h[d]=r.filter(y=>y!==d);return h}function T2(c,s,h){const r=new Set(h);return c.filter(d=>!(!d.url.startsWith("/")||d.title in s||r.has(d.title))).map(d=>d.title)}const j0=24,z2=10,A0=44;function O2(c,s){const h=(r,d)=>{const y=Math.min(j0,d/2),S=Math.max(y,d-j0);return Math.max(y,Math.min(S,r))};return{x:h(c.x,s.width),y:h(c.y,s.height)}}function _2(c){return{x:c.x-A0/2,y:c.y-A0/2}}function R2(c,s,h=z2){return Math.abs(s.x-c.x)>h||Math.abs(s.y-c.y)>h}function U2(c,s){const h=c.x<s.width/2,r=c.y<s.height/2;return r&&h?{corner:"top-left"}:r?{corner:"top-right"}:h?{corner:"bottom-left"}:{corner:"bottom-right"}}const H2=3,Ne={action:6e3,plain:2600};function B2(c,s,h=H2){return[...c.filter(d=>d.kind!==s.kind),s].slice(-h)}function L2(c,s){return c.filter(h=>h.id!==s)}const q2=10;function W0(c,s){let h=c;for(let r=0;r<q2;r+=1){const d=s.get(h);if(d===void 0||d===c)return h;h=d}return h}function k2(c,s){const h=new Set(c),r=new Map,d=[];for(const y of c){const S=W0(y,s);if(S===y||!h.has(S))d.push(y);else{const j=r.get(S);j?j.push(y):r.set(S,[y])}}return d.flatMap(y=>[{title:y,depth:0},...(r.get(y)??[]).map(S=>({title:S,depth:1}))])}function Y2(c,s){if(s.size===0)return[...c];let h=null;return c.filter(r=>r.depth===0?(h=r.title,!0):h===null||!s.has(h))}const N0=c=>c.trim().replace(/\s+/g," ").toLowerCase();function G2(c,s,h){const r=c.trim().replace(/\s+/g," "),d=h.get(s)??s;if(r===""||r===s)return d===s?{kind:"same"}:{kind:"reset",value:s};if(r===d)return{kind:"same"};for(const[y,S]of h)if(y!==s&&N0(S)===N0(r))return{kind:"taken",by:S};return{kind:"set",value:r}}function X2(c,s){try{return new URL(c,s).toString()}catch{return c}}function Q2({displayName:c,preview:s,previewUrl:h,title:r}){const d=c===r?"":` (shown as ${JSON.stringify(c)})`,y=s?.note?` — ${s.note}`:"",S=s?.tags.length?` [${s.tags.join(", ")}]`:"",j=[`Leglas direction ${JSON.stringify(r)}${d}${y}${S}`];return s?.file?j.push(`Source: ${s.file}`):s?.branch?j.push(`Branch: ${s.branch}`):s&&j.push(`Route: ${s.url}`),j.push(`Preview: ${h}`),s?.basedOn&&j.push(`A variant of: ${s.basedOn}`),j.push("","Inspect this direction in full:",` npx leglas show ${JSON.stringify(r)} --json`),j.join(`
|
|
10
|
+
`)}function Z2({previews:c,project:s,searchRef:h,onToggleSplit:r,onToggleHelp:d,onToggleTools:y,onToggleNote:S,suspended:j=!1}){const M=Jm(s),x=()=>$m(typeof window>"u"?null:window.localStorage.getItem(M),c),[q,H]=z.useState(x),J=new Map(c.map(_=>[_.title,_])),Q=()=>{const _=x();return _.order.find(tt=>!_.hidden.includes(tt))??_.order[0]??""},[X,G]=z.useState(Q),dt=typeof window<"u"&&window.self!==window.top,[ot,g]=z.useState(()=>[Q()]),[et,ut]=z.useState(""),[I,nt]=z.useState([]),F=_=>{nt(tt=>tt.length?[]:tt),ut(_)},[ct,ht]=z.useState(!1),[rt,yt]=z.useState(null),[St,wt]=z.useState(null),[Nt,Bt]=z.useState(null),[D,Y]=z.useState(!1),[N,U]=z.useState({}),[K,p]=z.useState([]),[T,Z]=z.useState(null),V=z.useRef(1),W=z.useRef(null),P=z.useRef(0),st=_=>{P.current+=1,p(tt=>B2(tt,{..._,id:P.current}))},Ot=_=>p(tt=>L2(tt,_)),Dt=_=>{G(_),g(tt=>tt.includes(_)?tt:[...tt,_])};z.useEffect(()=>{window.localStorage.setItem(M,JSON.stringify(q))},[q,M]),z.useEffect(()=>()=>{W.current&&clearTimeout(W.current)},[]);const Wt=_=>q.renames[_]??_,Ml=_=>J.get(_)?.url??"/",cn=_=>{if(!et.trim())return!0;const tt=et.toLowerCase(),Et=J.get(_);return Wt(_).toLowerCase().includes(tt)||_.toLowerCase().includes(tt)||(Et?.note??"").toLowerCase().includes(tt)||(Et?.tags??[]).some(mt=>mt.toLowerCase().includes(tt))},sn=c.map(_=>_.title).filter(_=>!q.deleted.includes(_)),ze=Wm(q.order,sn),Cl=et.trim()!=="",wl=Cl?I:q.collapsedFamilies,oe=new Map(c.flatMap(_=>_.basedOn===void 0?[]:[[_.title,_.basedOn]])),gl=k2(ze.filter(_=>!q.hidden.includes(_)&&cn(_)),oe),Hl=Y2(gl,new Set(wl)),el=Hl.map(_=>_.title),Oe=new Map(Hl.map(_=>{const tt=_.depth===0?gl.filter(Et=>Et.depth===1&&W0(Et.title,oe)===_.title).length:0;return[_.title,{depth:_.depth,variants:tt,folded:wl.includes(_.title)}]})),on=(_,tt)=>_.includes(tt)?_.filter(Et=>Et!==tt):[..._,tt],rn=_=>Cl?nt(tt=>on(tt,_)):H(tt=>({...tt,collapsedFamilies:on(tt.collapsedFamilies,_)})),Ee=_=>J.get(_)?.basedOn??null,ll=ze.filter(_=>!q.hidden.includes(_)).length,qn=(_,tt)=>H(Et=>({...Et,order:Im(Et,c,_,tt)})),Bl=(_,tt=!1)=>{H(Et=>({...Et,hidden:Et.hidden.filter(mt=>mt!==_)})),tt&&Dt(_)},Ze=_=>{const tt=Wt(_),Et=X===_;if(H(mt=>({...mt,hidden:[...mt.hidden,_]})),Et){const mt=ze.find(bt=>bt!==_&&!q.hidden.includes(bt));mt&&Dt(mt)}st({action:{label:"Undo",run:()=>Bl(_,Et)},kind:`remove:${_}`,message:`${tt} removed from the list`,tone:"info",ttl:Ne.action})},ra=async _=>{const tt=[...new Set(_)].filter(bt=>q.hidden.includes(bt)),Et=tt.filter(bt=>J.get(bt)?.local===!0);if(Et.length>0){const bt=await fetch("/leglas/api/previews/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({titles:Et})});if(!bt.ok){const It=await bt.json().catch(()=>null);throw new Error(It?.error??"The directions could not be deleted from Leglas.")}}const mt=new Set(tt);if(H(bt=>Fm(bt,tt)),g(bt=>bt.filter(It=>!mt.has(It))),tt.includes(X)){const bt=ze.find(It=>!mt.has(It)&&!q.hidden.includes(It));G(bt??"")}q.hidden.every(bt=>mt.has(bt))&&ht(!1)},fn=(_,tt)=>H(Et=>{const mt={...Et.renames};return tt===void 0?delete mt[_]:mt[_]=tt,fetch("/leglas/api/renames",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({renames:mt})}).catch(()=>{}),{...Et,renames:mt}}),Ll=_=>{yt(_),wt(null)},kn=(_,tt,Et="submit")=>{const mt=new Map(sn.map(Pt=>[Pt,Wt(Pt)])),bt=G2(tt,_,mt);if(bt.kind==="taken"){if(Et==="submit"){wt(`${bt.by} already goes by that name.`);return}Ll(null),st({kind:`rename:${_}`,message:`Still called ${Wt(_)}. ${bt.by} already goes by that name.`,tone:"info",ttl:Ne.plain});return}if(Ll(null),bt.kind==="same")return;const It=q.renames[_];fn(_,bt.kind==="reset"?void 0:bt.value),st({action:{label:"Undo",run:()=>fn(_,It)},kind:`rename:${_}`,message:bt.kind==="reset"?`Name reset to ${bt.value}`:`Renamed to ${bt.value}`,tone:"success",ttl:Ne.action})};z.useEffect(()=>{const _=el,tt=mt=>{const bt=mt.target,It=bt?.tagName?.toLowerCase(),Pt=m2({key:mt.key,altKey:mt.altKey,ctrlKey:mt.ctrlKey,metaKey:mt.metaKey,shiftKey:mt.shiftKey,typing:It==="input"||It==="textarea"||It==="select"||(bt?.isContentEditable??!1)});if(Pt&&!(j&&Pt.kind!=="help")){if(Pt.kind==="search"||Pt.kind==="request")mt.preventDefault(),H(ie=>ie.collapsed?{...ie,collapsed:!1}:ie),Z({target:Pt.kind,nonce:V.current++});else if(Pt.kind==="split")mt.preventDefault(),r?.();else if(Pt.kind==="help")mt.preventDefault(),d?.();else if(Pt.kind==="tools")mt.preventDefault(),y?.();else if(Pt.kind==="note")mt.preventDefault(),S?.();else if(Pt.kind==="rail")H(ie=>({...ie,collapsed:!ie.collapsed}));else if(Pt.kind==="jump"){const ie=_[Pt.index];ie&&(mt.preventDefault(),Dt(ie))}else if(Pt.kind==="move"){mt.preventDefault();const ie=_.indexOf(X),nl=Pt.delta===1?_[Math.min(_.length-1,ie+1)]:_[Math.max(0,ie-1)];nl&&Dt(nl)}}},Et=[window];for(const mt of Array.from(document.querySelectorAll("iframe")))try{const bt=mt.contentDocument;bt&&Et.push(bt)}catch{}for(const mt of Et)mt.addEventListener("keydown",tt);return()=>{for(const mt of Et)mt.removeEventListener("keydown",tt)}},[X,el.join("|"),r,d,y,S,j,ot.join("|"),Object.entries(N).filter(([,_])=>_).map(([_])=>_).join("|")]);const jl=(_,tt)=>{const Et=X2(Ml(_),window.location.origin),mt=tt==="link"?Et:Q2({displayName:Wt(_),preview:J.get(_),previewUrl:Et,title:_});zo(mt).then(bt=>{if(bt==="blocked"){Bt(null),st({detail:Et,kind:"copy",message:"Your browser blocked the clipboard. The direction is at:",tone:"danger",ttl:null});return}Bt({kind:tt,title:_}),W.current&&clearTimeout(W.current),W.current=setTimeout(()=>Bt(null),1200),st({kind:"copy",message:tt==="link"?`Link to ${Wt(_)} copied`:`Reference to ${Wt(_)} copied`,tone:"success",ttl:Ne.plain})})},xe=_=>jl(_,"link"),Ve=_=>jl(_,"reference"),$t=_=>{_.preventDefault();const tt=_.currentTarget;tt.setPointerCapture(_.pointerId);const Et=_.clientX,mt=q.width;Y(!0);const bt=Pt=>{const ie=Math.min(V0,Math.max(Z0,mt+Pt.clientX-Et));H(nl=>nl.width===ie?nl:{...nl,width:ie})},It=Pt=>{tt.releasePointerCapture(Pt.pointerId),tt.removeEventListener("pointermove",bt),tt.removeEventListener("pointerup",It),tt.removeEventListener("pointercancel",It),Y(!1)};tt.addEventListener("pointermove",bt),tt.addEventListener("pointerup",It),tt.addEventListener("pointercancel",It)},ql=_=>U(tt=>tt[_]?tt:{...tt,[_]:!0}),_e=_=>U(tt=>tt[_]?{...tt,[_]:!1}:tt),fa=dt?[X]:sn.filter(_=>ot.includes(_));return{active:X,copied:Nt,copyLink:xe,copyReference:Ve,deleteRemoved:ra,displayName:Wt,dismissToast:Ot,focusing:T,hiddenCount:q.hidden.length,hide:Ze,loaded:N,markLoaded:ql,matches:cn,moveOption:qn,nested:dt,notify:st,onHandlePointerDown:$t,panes:fa,prefs:q,previewFor:_=>J.get(_),query:et,rename:kn,renameError:St,renaming:rt,parentOf:Ee,resetLoaded:_e,resizing:D,restore:Bl,rowMeta:Oe,rows:el,toggleFamily:rn,setActive:Dt,setPrefs:H,setQuery:F,setShowHidden:ht,showHidden:ct,startRename:Ll,toasts:K,urlFor:Ml,visibleCount:ll,viewports:J0}}function D0(c){const s=c?.trim()??"";return s===""?null:s}function I0(c){const s=D0(c?.basedOn),h=D0(c?.askedFor);return s===null&&h===null?null:{basedOn:s,askedFor:h}}function V2(c,s){const h=c===null?null:`Variant of ${c}`,r=s===null?null:`asked for “${s}”`;return h===null?r===null?null:`You ${r}`:r===null?h:`${h} · you ${r}`}const T0=80,K2=6,J2=8;function $2(c){if(typeof c!="string")return null;const s=c.trim();return/^[A-Za-z][\w-]*$/.test(s)?s:null}function F2(c){return typeof c!="string"?[]:c.trim().split(/\s+/).filter(Boolean).slice(0,K2)}function uc(c){const s=(c??"").replace(/\s+/g," ").trim();return s.length>T0?`${s.slice(0,T0-1)}…`:s}function W2(c){const s=[];let h=c;for(;h!==null&&s.length<J2;){const r=h.tagName.toLowerCase();if(r==="body"||r==="html")break;const d=$2(h.id);if(d!==null)return s.unshift(`#${d}`),s.join(" > ");const y=h.parentElement;if(y===null){s.unshift(r);break}let S=1;for(let j=0;j<y.children.length;j+=1){const M=y.children[j];if(M===h)break;M?.tagName===h.tagName&&(S+=1)}s.unshift(`${r}:nth-of-type(${S})`),h=y}return s.join(" > ")}function z0(c,s){return!Number.isFinite(c)||!Number.isFinite(s)||s<=0?.5:Math.round(Math.min(1,Math.max(0,c/s))*1e3)/1e3}function O0(c,s,h,r){return{classes:F2(c.className),rect:{height:Math.round(s.height),width:Math.round(s.width),x:Math.round(s.x),y:Math.round(s.y)},selector:W2(c),spot:{x:r===void 0?.5:z0(r.x-s.x,s.width),y:r===void 0?.5:z0(r.y-s.y,s.height)},tag:c.tagName.toLowerCase(),text:uc(c.textContent),viewport:Math.round(h)}}const _0=6;function R0(c,s){return Math.abs(s.x-c.x)>=_0||Math.abs(s.y-c.y)>=_0}function U0(c,s){return{height:Math.abs(s.y-c.y),width:Math.abs(s.x-c.x),x:Math.min(c.x,s.x),y:Math.min(c.y,s.y)}}function I2(c,s){return c.x<s.x+s.width&&c.x+c.width>s.x&&c.y<s.y+s.height&&c.y+c.height>s.y}function H0(c,s){return s.x>=c.x&&s.y>=c.y&&s.x+s.width<=c.x+c.width&&s.y+s.height<=c.y+c.height}function P2(c,s){const h=c.width>0?c.width:1,r=c.height>0?c.height:1,d=y=>Math.round(Math.min(1,Math.max(0,y))*1e3)/1e3;return{height:d(s.height/r),width:d(s.width/h),x:d((s.x-c.x)/h),y:d((s.y-c.y)/r)}}function tg(c,s){return{height:s.height*c.height,width:s.width*c.width,x:c.x+s.x*c.width,y:c.y+s.y*c.height}}function eg(c){const s=c.gap??8,{anchor:h,bounds:r,card:d}=c,y=h.y+h.height+s,S=h.y-s-d.height,j=y+d.height>r.height&&S>=0,M=j?S:y;let x=h.x;return x+d.width>r.width&&(x=r.width-d.width),{flipped:j,left:Math.max(0,x),top:Math.max(0,Math.min(M,Math.max(0,r.height-d.height)))}}function lg(c){return!Number.isFinite(c)||c<=0?256:Math.round(Math.min(256,Math.max(180,c-48)))}function ng(c){if(c.length===0)return null;const s=Math.min(...c.map(y=>y.x)),h=Math.min(...c.map(y=>y.y)),r=Math.max(...c.map(y=>y.x+y.width));return{height:Math.max(...c.map(y=>y.y+y.height))-h,width:r-s,x:s,y:h}}const ag=8;function ig(c){const s=new Set,h=[];for(const r of c){const d=`${r.tag}:${r.text}`;if(!s.has(d)&&(s.add(d),h.push(r),h.length===ag))break}return h}const ac=2,ug=4e3,B0=600;function un(c){return"left"in c?{height:c.height,width:c.width,x:c.left,y:c.top}:c}function cg(c,s){return s.x>=c.x&&s.y>=c.y&&s.x<=c.x+c.width&&s.y<=c.y+c.height}function sg({notes:c,onExit:s,onForget:h,onKeep:r,paneScale:d,scaling:y,title:S}){const j=z.useRef(null),M=z.useRef(null),x=z.useRef(null),q=z.useRef(null),[H,J]=z.useState(null),[Q,X]=z.useState(null),[G,dt]=z.useState(null),[ot,g]=z.useState([]),[et,ut]=z.useState({height:92,width:256}),I=z.useCallback(()=>{const N=document.querySelector(`iframe[data-preview="${CSS.escape(S)}"]`);if(N===null)return null;let U=null;try{U=N.contentDocument}catch{return null}const K=U?.defaultView??null;if(U===null||K===null)return null;const p=N.getBoundingClientRect();return{doc:U,rect:p,scale:K.innerWidth>0?p.width/K.innerWidth:1,view:K}},[S]),nt=z.useCallback((N,U)=>{const K=I();return K===null?null:{x:(N-K.rect.left)/K.scale,y:(U-K.rect.top)/K.scale}},[I]),F=z.useCallback((N,U)=>{const K=N.doc.elementFromPoint(U.x,U.y);if(K===null)return null;const p=new Set;let T=K,Z=0;for(let P=0;T!==null&&P<3&&Z<B0;P+=1){p.add(T);const st=N.doc.createTreeWalker(T,NodeFilter.SHOW_ELEMENT);let Ot=st.nextNode();for(;Ot!==null&&Z<B0;)p.has(Ot)||(p.add(Ot),Z+=1),Ot=st.nextNode();T=T.parentElement}const V=P=>{const st=P.tagName.toLowerCase();return(uc(P.textContent)===""?0:4)+(st==="a"||st==="button"||st==="img"?3:0)+(/^h[1-6]$/.test(st)||st==="p"||st==="li"?2:0)},W=[...p].filter(P=>{const st=P.tagName.toLowerCase();if(P===N.doc.body||P===N.doc.documentElement||st==="head"||st==="script"||st==="style")return!1;const Ot=un(P.getBoundingClientRect());if(Ot.width<=0||Ot.height<=0||!cg(Ot,U))return!1;const Dt=N.view.getComputedStyle(P);return Dt.display!=="none"&&Dt.visibility!=="hidden"}).map(P=>({box:un(P.getBoundingClientRect()),element:P,weight:V(P)}));return W.length===0?null:(W.sort((P,st)=>{const Ot=P.element.contains(st.element),Dt=st.element.contains(P.element);if(Ot!==Dt)return Ot?1:-1;const Wt=st.weight-P.weight;return Wt!==0?Wt:P.box.width*P.box.height-st.box.width*st.box.height}),W[0]??null)},[]),ct=z.useCallback(()=>{const N=I();return N===null?[]:c.map((U,K)=>{let p=null;try{p=N.doc.querySelector(U.anchor.selector)}catch{}const T=un(p===null?U.anchor.rect:p.getBoundingClientRect()),Z=U.anchor.spot??{x:.5,y:.5},V=U.anchor.region?tg(T,U.anchor.region):null;return{box:V??{height:0,width:0,x:T.x+Z.x*T.width,y:T.y+Z.y*T.height},id:U.id,note:U.note,number:K+1,region:V,stale:p===null}})},[I,c]),ht=z.useCallback(()=>g(ct()),[ct]),rt=z.useCallback(()=>{const N=x.current,U=I();N===null||U===null||G!==null||J(F(U,N)?.box??null)},[G,F,I]);z.useEffect(()=>{ht();const N=I(),U=()=>{ht(),rt()};return N?.view.addEventListener("scroll",U,{passive:!0}),N?.view.addEventListener("resize",U),window.addEventListener("resize",U),()=>{N?.view.removeEventListener("scroll",U),N?.view.removeEventListener("resize",U),window.removeEventListener("resize",U)}},[I,ht,rt]),z.useEffect(()=>{const N=j.current;if(N===null)return;const U=K=>{const p=I();p!==null&&(K.preventDefault(),p.view.scrollBy({behavior:"auto",left:K.deltaX,top:K.deltaY}))};return N.addEventListener("wheel",U,{passive:!1}),()=>N.removeEventListener("wheel",U)},[I]),z.useEffect(()=>{const N=p=>{if(p.key==="Escape"){if(G!==null){dt(null);return}s()}},U=[window],K=I();K!==null&&U.push(K.doc);for(const p of U)p.addEventListener("keydown",N);return()=>{for(const p of U)p.removeEventListener("keydown",N)}},[G,I,s]),z.useEffect(()=>{const N=M.current;if(G===null||N===null)return;const U=N.offsetHeight,K=N.offsetWidth;ut(p=>p.height===U&&p.width===K?p:{height:U,width:K})},[G]);const yt=(N,U)=>{const K=[...N.doc.body.querySelectorAll("*")].slice(0,ug),p=K.filter(V=>{const W=un(V.getBoundingClientRect());return W.width>0&&W.height>0&&I2(U,W)}),T=p.filter(V=>!p.some(W=>W!==V&&V.contains(W))&&!H0(un(V.getBoundingClientRect()),U)&&(uc(V.textContent)!==""||["a","button","canvas","img","input","svg","video"].includes(V.tagName.toLowerCase())));let Z=N.doc.body;for(const V of K){const W=un(V.getBoundingClientRect());H0(W,U)&&Z.contains(V)&&(Z=V)}return{bounds:ng(T.map(V=>un(V.getBoundingClientRect())))??U,covers:ig(T.map(V=>({tag:V.tagName.toLowerCase(),text:uc(V.textContent)}))),holder:Z}},St=(N,U)=>{const K=I();if(K===null)return;if(U!==null&&R0(U,N)){const T=U0(U,N),{bounds:Z,covers:V,holder:W}=yt(K,T),P=un(W.getBoundingClientRect());dt({anchor:{...O0(W,P,K.view.innerWidth,{x:Z.x+Z.width/2,y:Z.y+Z.height/2}),covers:V,region:P2(P,Z)},about:Z});return}const p=F(K,N);p!==null&&dt({anchor:O0(p.element,p.box,K.view.innerWidth,N),about:p.box})},wt=y&&d>0?1/d:1,Nt=I(),Bt={height:Nt?.view.innerHeight??0,width:Nt?.view.innerWidth??0},D=lg(Bt.width),Y=G===null?null:eg({anchor:G.about,bounds:Bt,card:{height:et.height*wt,width:D*wt}});return o.jsxs("div",{className:`absolute inset-0 z-20 ${G===null?"cursor-crosshair":"cursor-default"}`,onPointerDown:N=>{if(G!==null)return;const U=nt(N.clientX,N.clientY),K=I();if(!(U===null||K===null)){try{N.currentTarget.setPointerCapture(N.pointerId)}catch{}q.current={from:U,scroll:{x:K.view.scrollX,y:K.view.scrollY}}}},onPointerLeave:()=>{x.current=null,q.current===null&&J(null)},onPointerMove:N=>{if(G!==null)return;const U=nt(N.clientX,N.clientY),K=I();if(U===null||K===null)return;x.current=U;const p=q.current;if(p!==null){const T={x:p.from.x+p.scroll.x-K.view.scrollX,y:p.from.y+p.scroll.y-K.view.scrollY};X(R0(T,U)?U0(T,U):null),J(null);return}J(F(K,U)?.box??null)},onPointerUp:N=>{const U=q.current;if(q.current=null,X(null),G!==null)return;const K=nt(N.clientX,N.clientY),p=I();if(K===null||p===null)return;const T=U===null?null:{x:U.from.x+U.scroll.x-p.view.scrollX,y:U.from.y+U.scroll.y-p.view.scrollY};J(null),St(K,T)},ref:j,children:[H!==null&&G===null&&Q===null?o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:H.height,left:H.x,top:H.y,width:H.width}}):null,Q!==null?o.jsx("div",{className:"pointer-events-none absolute rounded-sm border-2 border-dashed border-[#7C9CFF] bg-[#7C9CFF]/10",style:{height:Q.height,left:Q.x,top:Q.y,width:Q.width}}):null,ot.map(N=>o.jsxs("div",{children:[N.region===null?null:o.jsx("div",{className:`pointer-events-none absolute rounded-sm border-2 border-dashed ${N.stale?"border-amber-500/70 bg-amber-500/5":"border-[#7C9CFF]/70 bg-[#7C9CFF]/5"}`,style:{height:N.region.height+ac*2,left:N.region.x-ac,top:N.region.y-ac,width:N.region.width+ac*2}}),o.jsxs("div",{className:"group/pin absolute size-5",onPointerDown:U=>U.stopPropagation(),onPointerMove:U=>U.stopPropagation(),onPointerUp:U=>U.stopPropagation(),style:{left:N.box.x,top:N.box.y,transform:`translate(-50%, -50%) scale(${wt})`,transformOrigin:"center"},children:[o.jsx("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold text-white shadow-lg ${N.stale?"bg-amber-500":"bg-[#7C9CFF]"}`,title:N.stale?"This element has moved or gone since the annotation was left.":void 0,children:N.number}),o.jsxs("span",{className:"pointer-events-none absolute left-full top-1/2 ml-1 flex w-max max-w-56 -translate-y-1/2 items-center gap-1 rounded-md border border-white/10 bg-[#171717] px-1.5 py-1 text-[11px] leading-snug text-white opacity-0 shadow-lg transition-opacity group-hover/pin:pointer-events-auto group-hover/pin:opacity-100",children:[o.jsx("span",{className:"min-w-0 flex-1 truncate",children:N.note||"No words"}),o.jsx("button",{"aria-label":"Forget this annotation",className:"shrink-0 rounded px-1 text-[#84848C] transition-colors hover:text-white",onClick:U=>{U.stopPropagation(),h(N.id)},type:"button",children:"×"})]})]})]},N.id)),G!==null&&Y!==null?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:G.anchor.region?{height:G.anchor.region.height*G.anchor.rect.height,left:G.anchor.rect.x+G.anchor.region.x*G.anchor.rect.width,top:G.anchor.rect.y+G.anchor.region.y*G.anchor.rect.height,width:G.anchor.region.width*G.anchor.rect.width}:{height:G.anchor.rect.height,left:G.anchor.rect.x,top:G.anchor.rect.y,width:G.anchor.rect.width}}),o.jsxs("form",{className:"absolute z-30 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl",onClick:N=>N.stopPropagation(),onPointerDown:N=>N.stopPropagation(),onSubmit:N=>{N.preventDefault();const U=N.currentTarget.elements.namedItem("note");r(G.anchor,U instanceof HTMLInputElement?U.value.trim():""),dt(null)},ref:M,style:{left:Y.left,top:Y.top,transform:`scale(${wt})`,transformOrigin:Y.flipped?"bottom left":"top left",width:D},children:[o.jsx("input",{autoFocus:!0,className:"w-full rounded border border-[#232328] bg-[#2E2E2E]/40 px-2 py-1 text-xs text-white placeholder:text-[#84848C] focus:border-[#D1D5DB]/40 focus:outline-none",name:"note",onKeyDown:N=>{N.key==="Escape"&&(N.preventDefault(),dt(null))},placeholder:G.anchor.region?"What is wrong with this area?":`What is wrong with this ${G.anchor.tag}?`}),o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:G.anchor.covers&&G.anchor.covers.length>0?`${G.anchor.covers.length} ${G.anchor.covers.length===1?"element":"elements"} · Enter keeps it · Esc drops it`:"Enter keeps it · Esc drops it"})]})]}):null]})}const Ro=(c,s)=>fetch(c,s);async function og(c=Ro){const s=await c("/leglas/api/annotations");if(!s.ok)throw new Error("Leglas refused the notes.");return(await s.json()).annotations??[]}async function P0(c,s,h){const r=await h(c,{body:JSON.stringify(s),headers:{"content-type":"application/json"},method:"POST"});if(!r.ok)throw new Error("Leglas refused the note.");const d=await r.json();if(d.ok!==!0)throw new Error("Leglas refused the note.");return d}function rg(c,s,h,r=Ro){return P0("/leglas/api/annotations",{anchor:h,note:s,title:c},r)}function fg(c,s=Ro){return P0("/leglas/api/annotations/delete",{ids:c},s)}function dg(c,s,h,r=null){if(c==="custom"){const y=r?.trim().split(/\s+/)[0]??"";return{kind:"chosen",id:"custom",name:y===""?"Custom":y.split("/").pop()??"Custom"}}const d=c===null?void 0:s.find(y=>y.id===c);return d?.available?{kind:"chosen",id:d.id,name:d.name}:s.some(y=>y.available)?h?{kind:"manual"}:{kind:"choose"}:{kind:"none"}}function hg(c){const s=c.max===null?`retry ${c.attempt}`:`retry ${c.attempt} of ${c.max}`,h=c.status,r=c.reason??"";return h===429||r.includes("rate")?`provider is rate limiting · ${s}`:h===401||h===403||r.includes("auth")?`provider refused the login · ${s}`:h===529||h===503||r.includes("overload")?`provider is overloaded · ${s}`:`provider returned an error · ${s}`}function mg(c){const s=Math.max(0,Math.floor(c/1e3));return s<60?`${s}s`:`${Math.floor(s/60)}m ${String(s%60).padStart(2,"0")}s`}function gg(c,s,h){const r=c.find(S=>S.status==="running");if(s.running||r!==void 0)return{kind:"running",id:r?.id??null,name:s.name??"Your agent",activity:s.activity,startedAt:s.startedAt,title:r?.title??null,stopping:s.stopping===!0,waiting:s.stopping===!0?null:s.waiting??null};const d=c.filter(S=>S.status==="queued").length;if(d>0)return{kind:"queued",count:d,attended:h};if(c.some(S=>S.status==="picked-up"))return{kind:"picked-up"};const y=c.findLast(S=>S.status==="failed"||S.status==="cancelled");return y===void 0?null:y.status==="cancelled"?{kind:"stopped",id:y.id,title:y.title}:{kind:"failed",id:y.id,title:y.title,reason:y.failure?.message??null}}const ki=(c,s)=>fetch(c,s);async function pg(c=ki){const s=await c("/leglas/api/agents");if(!s.ok)throw new Error("Leglas refused the agent request.");return s.json()}async function cc(c,s,h){const r=await h(c,{method:"POST",...s===null?{}:{headers:{"content-type":"application/json"},body:JSON.stringify(s)}});if(!r.ok)throw new Error("Leglas refused the agent request.");if((await r.json()).ok!==!0)throw new Error("Leglas refused the agent request.")}function yg(c,s,h=ki){return cc("/leglas/api/agent",s===void 0?{agent:c}:{agent:c,run:s},h)}function vg(c,s=ki){return cc("/leglas/api/requests/cancel",c==null?null:{id:c},s)}function bg(c,s=ki){return cc("/leglas/api/requests/retry",{id:c},s)}function xg(c,s=ki){return cc("/leglas/api/requests/dismiss",{id:c},s)}function Sg({children:c,label:s}){return s===null?o.jsx(o.Fragment,{children:c}):o.jsx(Ae,{label:s,side:"right",wide:!0,children:c})}function Eg(c,s,h){const r=I0(c);return r===null?null:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block text-white",children:s}),c?.note?o.jsx("span",{className:"mt-0.5 block font-normal text-[#D1D5DB]",children:c.note}):null,o.jsxs("span",{className:"mt-1.5 block border-t border-white/10 pt-1.5 font-normal text-[#84848C]",children:[r.basedOn===null?null:o.jsxs("span",{className:"block",children:["Variant of ",h(r.basedOn)]}),r.askedFor===null?null:o.jsxs("span",{className:"mt-0.5 block",children:["You asked for “",r.askedFor,"”"]})]})]})}const Ao=[{key:"satoshi",label:"Satoshi",stack:"var(--font-satoshi)"},{key:"outfit",label:"Outfit",stack:"var(--font-outfit)"},{key:"geist",label:"Geist",stack:"var(--font-geist)"}],No=["#34D399","#38BDF8","#818CF8","#C084FC","#FB7185","#FB923C"];function Mg(c){let s=0;for(const r of c)s=s*31+r.charCodeAt(0)|0;const h=No[Math.abs(s)%No.length]??No[0];return{backgroundColor:`${h}22`,color:h}}const L0=15e3,Cg=96,wg="claude mcp add leglas -- npx leglas-mcp",jg=`{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"leglas": { "command": "npx", "args": ["leglas-mcp"] }
|
|
13
|
+
}
|
|
14
|
+
}`,q0={attached:!1,running:!1,name:null,activity:null,startedAt:null,stopping:!1,waiting:null},Ag={agents:[],choice:null,customRun:null},t1=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),Ng=F0(t1);function Dg({mac:c,onClose:s}){const h=z.useRef(null),r=g2(c);return z.useEffect(()=>{const d=document.activeElement;h.current?.focus();const y=S=>{S.key==="Escape"&&(S.preventDefault(),s())};return window.addEventListener("keydown",y),()=>{window.removeEventListener("keydown",y),d?.focus?.()}},[s]),o.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/50 p-6 backdrop-blur-sm",onPointerDown:d=>{d.target===d.currentTarget&&s()},children:o.jsxs("div",{"aria-label":"Keyboard shortcuts","aria-modal":"true",className:"w-full max-w-sm rounded-lg border border-[#232328] bg-[#1E1E22] p-4 shadow-2xl focus:outline-none",ref:h,role:"dialog",tabIndex:-1,children:[o.jsx("span",{className:"block pb-3 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Keyboard"}),o.jsx("dl",{className:"flex flex-col gap-2.5",children:r.map(d=>o.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[o.jsx("dt",{className:"flex shrink-0 items-baseline gap-1",children:d.keys.map((y,S)=>o.jsxs("span",{className:"flex items-baseline gap-1",children:[S>0&&d.join?o.jsx("span",{className:"text-[10px] text-[#84848C]",children:d.join}):null,o.jsx("kbd",{className:"rounded border border-[#232328] bg-[#2E2E2E]/60 px-1.5 py-0.5 font-sans text-[11px] text-[#E8E8EA]",children:y})]},y))}),o.jsx("dd",{className:"text-right text-xs leading-snug text-[#9CA3AF]",children:d.label})]},d.label))})]})})}function Tg({busy:c,count:s,error:h,fallbackFocusRef:r,name:d,onCancel:y,onConfirm:S}){const j=z.useRef(null),M=z.useRef(null),x=z.useRef(y);x.current=y,z.useEffect(()=>{const Q=M.current;if(Q===null)return;const X=document.activeElement,G=ot=>{ot.preventDefault(),x.current()},dt=ot=>{if(ot.key!=="Tab")return;const g=Array.from(Q.querySelectorAll("button:not(:disabled)")),et=g[0],ut=g.at(-1);et===void 0||ut===void 0?(ot.preventDefault(),Q.focus()):ot.shiftKey&&document.activeElement===et?(ot.preventDefault(),ut.focus()):!ot.shiftKey&&document.activeElement===ut&&(ot.preventDefault(),et.focus())};return Q.addEventListener("cancel",G),Q.addEventListener("keydown",dt),Q.open||Q.showModal(),j.current?.focus(),()=>{Q.removeEventListener("cancel",G),Q.removeEventListener("keydown",dt),Q.open&&Q.close(),(X?.isConnected?X:r.current)?.focus()}},[]);const q=s===1,H=q?"Delete removed direction?":"Clear removed directions?",J=q?`This permanently removes “${d??"this direction"}” from Leglas.`:`This permanently removes all ${s} directions from Leglas.`;return o.jsx("dialog",{"aria-describedby":"delete-removed-description","aria-labelledby":"delete-removed-title","aria-modal":"true",className:"m-auto max-h-[calc(100dvh-3rem)] max-w-none overflow-visible border-0 bg-transparent p-0 text-left text-inherit backdrop:bg-black/50 backdrop:backdrop-blur-sm",onPointerDown:Q=>{Q.target===Q.currentTarget&&!c&&y()},ref:M,role:"alertdialog",tabIndex:-1,children:o.jsxs("div",{className:"w-[calc(100vw-3rem)] max-w-sm overscroll-contain rounded-lg border border-[#232328] bg-[#1E1E22] p-4 shadow-2xl",children:[o.jsx("h2",{className:"text-sm font-medium text-white",id:"delete-removed-title",children:H}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs leading-relaxed text-[#9CA3AF]",id:"delete-removed-description",children:[o.jsx("p",{children:J}),o.jsx("p",{children:"Source files and shared project config stay untouched."})]}),h!==null?o.jsx("p",{className:"mt-3 text-xs leading-relaxed text-red-300",role:"alert",children:h}):null,o.jsxs("div",{className:"mt-4 flex justify-end gap-2",children:[o.jsx("button",{className:"rounded-md px-3 py-1.5 text-xs text-[#D1D5DB] transition-[background-color,color,scale] hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:opacity-50",disabled:c,onClick:y,ref:j,type:"button",children:"Cancel"}),o.jsx("button",{className:"rounded-md bg-red-500/90 px-3 py-1.5 text-xs font-medium text-white transition-[background-color,scale] hover:bg-red-500 active:scale-[0.96] disabled:opacity-60",disabled:c,onClick:S,type:"button",children:c?"Deleting…":q?"Delete":"Delete all"})]})]})})}function zg({previews:c,project:s}){const h=z.useRef(null),r=z.useRef(null),d=z.useRef(null),[y,S]=z.useState(!1),[j,M]=z.useState(null),[x,q]=z.useState(!1),H=z.useCallback(()=>d.current?.(),[]),J=z.useCallback(()=>S(m=>!m),[]),Q=z.useCallback(()=>S(!1),[]),[X,G]=z.useState(!1),dt=z.useCallback(()=>G(m=>!m),[]),ot=z.useCallback(()=>Gn(m=>!m),[]),g=Z2({previews:c,project:s,searchRef:h,onToggleSplit:H,onToggleHelp:J,onToggleTools:dt,onToggleNote:ot,suspended:y||j!==null}),et=()=>{x||M(null)},ut=async()=>{if(j===null||x)return;const m=j;q(!0),M({...m,error:null});try{await g.deleteRemoved(m.titles),M(null),g.notify({kind:`delete:${m.titles.join("|")}`,message:m.titles.length===1?`${g.displayName(m.titles[0]??"")} permanently deleted`:`${m.titles.length} removed directions permanently deleted`,tone:"info",ttl:Ne.plain})}catch(k){M({...m,error:k instanceof Error?k.message:"The directions could not be deleted."})}finally{q(!1)}},[I,nt]=z.useState(!1),[F,ct]=z.useState(null),ht=F!==null,rt=z.useRef(!1),[yt,St]=z.useState(""),[wt,Nt]=z.useState("variant");z.useEffect(()=>{const m=r.current;m!==null&&(m.style.height="0px",m.style.height=`${Math.min(m.scrollHeight,96)}px`)},[yt,g.prefs.width]);const[Bt,D]=z.useState(!1),[Y,N]=z.useState(null),[U,K]=z.useState(!1),[p,T]=z.useState(null),[Z,V]=z.useState(!1),[W,P]=z.useState(null),st=z.useRef(null),Ot=z.useRef(null),Dt=z.useRef(null),Wt=z.useRef(null),Ml=z.useRef(null),[cn,sn]=z.useState(Cg);z.useEffect(()=>{const m=Ml.current;if(m===null||typeof ResizeObserver>"u")return;const k=()=>sn(m.offsetHeight);k();const $=new ResizeObserver(k);return $.observe(m),()=>$.disconnect()},[]);const ze=z.useRef(null),[Cl,wl]=z.useState({height:0,on:!1,top:0});z.useEffect(()=>{wl(m=>m.on?{...m,on:!1}:m)},[g.rows.join("|")]);const[oe,gl]=z.useState(null),Hl=z.useRef(null),el=z.useRef(null);z.useEffect(()=>{Hl.current=oe},[oe]),z.useEffect(()=>{if(!g.focusing)return;const m=g.focusing.target==="search"?h.current:r.current;m?.focus(),m?.select()},[g.focusing]),z.useEffect(()=>{if(!oe)return;const m=el.current;if(!m)return;const k=lt=>{const at=lt.clientY-m.startY,jt=lt.clientX-m.startX;gl(At=>{if(!At||At.settling)return At;if(!At.started){if(Math.abs(at)<=4&&Math.abs(jt)<=4)return{...At,dy:at};if(Math.abs(jt)>Math.abs(at))return null;window.getSelection()?.removeAllRanges()}const Ht=m.rows[At.from];if(!Ht)return At;const Qt=Math.max(m.minDy,Math.min(m.maxDy,at)),fe=Ht.mid+at;let de=0;return m.rows.forEach((Ue,Zt)=>{Zt!==At.from&&fe>Ue.mid&&(de+=1)}),{...At,dy:Qt,started:!0,to:de}})},$=()=>{const lt=Hl.current;if(!lt?.started){gl(null);return}m.suppressed=!0;let at=0;if(lt.to>lt.from)for(let jt=lt.from+1;jt<=lt.to;jt+=1)at+=(m.rows[jt]?.height??0)+lt.gap;else for(let jt=lt.to;jt<lt.from;jt+=1)at-=(m.rows[jt]?.height??0)+lt.gap;gl({...lt,dy:at,settling:!0}),window.setTimeout(()=>{g.moveOption(lt.title,lt.to),gl(null),window.setTimeout(()=>{m.suppressed=!1},0)},190)};return window.addEventListener("pointermove",k),window.addEventListener("pointerup",$),window.addEventListener("pointercancel",$),()=>{window.removeEventListener("pointermove",k),window.removeEventListener("pointerup",$),window.removeEventListener("pointercancel",$)}},[oe!==null]),z.useEffect(()=>{if(!X)return;Ot.current?.focus();const m=lt=>{lt.key==="Escape"&&(G(!1),st.current?.focus())},k=lt=>{const at=lt.target;!Ot.current?.contains(at)&&!st.current?.contains(at)&&G(!1)},$=()=>G(!1);return window.addEventListener("keydown",m),window.addEventListener("pointerdown",k),window.addEventListener("blur",$),()=>{window.removeEventListener("keydown",m),window.removeEventListener("pointerdown",k),window.removeEventListener("blur",$)}},[X]);const Oe="flex h-7 w-full items-center justify-between gap-2 whitespace-nowrap rounded px-2 text-xs hover:bg-[#2E2E2E] hover:text-white disabled:cursor-not-allowed disabled:opacity-40",on=Ao.find(m=>m.key===g.prefs.font)??Ao[0],rn=g.prefs.viewport!==null,Ee=48,ll=oe?.started??!1,qn=g.resizing||ll||ht,[Bl,Ze]=z.useState({}),[ra,fn]=z.useState({}),[Ll,kn]=z.useState(!1),[jl,xe]=z.useState(null),Ve=z.useRef(null);z.useEffect(()=>()=>{Ve.current=g.active},[g.active]),d.current=()=>{!Ll&&$t!==null&&xe($t),($t!==null||Ll)&&kn(m=>!m)};const $t=v2({active:g.active,previous:Ve.current,pinned:jl,parent:g.parentOf(g.active),rows:g.rows}),ql=b2({active:g.active,compare:$t,split:Ll}),_e=ql.length>1,fa=[...new Set([...g.panes,...ql])],_=z.useRef(null),tt=z.useRef(null),[Et,mt]=z.useState({height:0,width:0}),bt=z.useCallback(m=>{if(_.current=m,tt.current?.disconnect(),m===null)return;const k=m.getBoundingClientRect();mt({height:k.height,width:k.width});const $=new ResizeObserver(([lt])=>{const at=lt?.contentRect;at&&mt({height:at.height,width:at.width})});$.observe(m),tt.current=$},[]),{boxHeight:It,boxWidth:Pt,designWidth:ie,frameHeight:nl,scale:kl,scaling:Al}=E2({gutter:Ee,panes:ql.length,scaleSplit:g.prefs.scaleSplit,stageHeight:Et.height,stageWidth:Et.width,viewport:g.prefs.viewport}),Yi=F?(()=>{const{x:m,y:k}=_2(F);return{bottom:"auto",left:m,right:"auto",top:k}})():void 0,Gi=m=>{if(m.button!==0)return;const k=_.current?.getBoundingClientRect();if(!k)return;const $=m.currentTarget;$.setPointerCapture(m.pointerId),rt.current=!1;const lt={x:m.clientX,y:m.clientY};let at=!1;const jt=Ht=>{!at&&!R2(lt,{x:Ht.clientX,y:Ht.clientY})||(at=!0,ct(O2({x:Ht.clientX-k.left,y:Ht.clientY-k.top},{width:k.width,height:k.height})))},At=Ht=>{if($.hasPointerCapture(Ht.pointerId)&&$.releasePointerCapture(Ht.pointerId),$.removeEventListener("pointermove",jt),$.removeEventListener("pointerup",At),$.removeEventListener("pointercancel",At),ct(null),!at)return;rt.current=!0;const{corner:Qt}=U2({x:Ht.clientX-k.left,y:Ht.clientY-k.top},{width:k.width,height:k.height});g.setPrefs(fe=>({...fe,corner:Qt})),G(!1)};$.addEventListener("pointermove",jt),$.addEventListener("pointerup",At),$.addEventListener("pointercancel",At)},[Be,da]=z.useState(p2),pl=new Set(c.filter(w0).map(m=>m.title)),Xi=pl.size>0,[Yn,Nl]=z.useState({requests:[],agent:q0}),[ye,De]=z.useState([]),[Le,Gn]=z.useState(!1),[Dl,sc]=z.useState(Ag),[Qi,dn]=z.useReducer(m=>m+1,0);z.useEffect(()=>{let m=!1;return pg().then(k=>{m||sc($=>JSON.stringify($)===JSON.stringify(k)?$:k)}).catch(()=>{}),()=>{m=!0}},[Qi]);const[Za,Ke]=z.useReducer(m=>m+1,0);z.useEffect(()=>{let m=!1;const k=()=>Promise.all([fetch("/leglas/api/requests").then(lt=>lt.json()).then(lt=>{if(m)return;const at={requests:lt.requests,agent:lt.agent??q0};Nl(jt=>JSON.stringify(jt)===JSON.stringify(at)?jt:at)}),og().then(lt=>{m||De(at=>JSON.stringify(at)===JSON.stringify(lt)?at:lt)})]).catch(()=>{}),$=window.setInterval(()=>{k()},2e3);return k(),()=>{m=!0,window.clearInterval($)}},[Za]);const Yt=dg(Dl.choice,Dl.agents,g.prefs.agentPickerDismissed,Dl.customRun),ve=g.active===null?[]:ye.filter(m=>m.title===g.active),Tl=(()=>{const m=I0(g.active===null?void 0:g.previewFor(g.active));return m===null?null:V2(m.basedOn===null?null:g.displayName(m.basedOn),m.askedFor)})(),re=Yt.kind==="chosen"&&Dl.agents.some(m=>m.id===Yt.id&&m.auth==="signed-out"),vt=gg(Yn.requests,Yn.agent,Yt.kind==="chosen"||Yn.agent.attached),Zi=vt===null?null:vt.kind==="running"?vt.stopping?`Stopping ${vt.name}`:`${vt.name} is on it`:vt.kind==="queued"?vt.count===1?"Change queued":`${vt.count} changes queued`:vt.kind==="picked-up"?"Your agent is on it":vt.kind==="stopped"?"You stopped that change":"That change failed",zl=vt===null?null:vt.kind==="running"?vt.stopping?"waiting for it to exit":vt.waiting!==null?hg(vt.waiting):vt.activity??vt.title:vt.kind==="queued"?vt.attended?"your agent picks it up next":Yt.kind==="manual"?"waiting for your own agent":"pick who runs your changes":vt.kind==="failed"?vt.reason??vt.title:vt.kind==="stopped"?vt.title:null,yl=vt?.kind==="running"?vt.startedAt:null,[oc,Va]=z.useState(()=>Date.now());z.useEffect(()=>{if(yl===null)return;Va(Date.now());const m=window.setInterval(()=>Va(Date.now()),1e3);return()=>window.clearInterval(m)},[yl]),z.useEffect(()=>{Yt.kind==="none"&&K(!1)},[Yt.kind]),z.useEffect(()=>{U||(T(null),V(!1))},[U]),z.useEffect(()=>{if(!U)return;Dt.current?.focus();const m=lt=>{lt.key==="Escape"&&(K(!1),Wt.current?.focus())},k=lt=>{const at=lt.target;!Dt.current?.contains(at)&&!Wt.current?.contains(at)&&K(!1)},$=()=>K(!1);return window.addEventListener("keydown",m),window.addEventListener("pointerdown",k),window.addEventListener("blur",$),()=>{window.removeEventListener("keydown",m),window.removeEventListener("pointerdown",k),window.removeEventListener("blur",$)}},[U]);const ha=(m,k)=>{Y===null&&(N(m),yg(m,k).then(()=>{dn(),K(!1)}).catch(()=>{g.notify({kind:"agent-choice",message:m==="custom"?"That command could not be saved. Nothing changed.":"That agent could not be selected. No run started.",tone:"danger",ttl:Ne.action})}).finally(()=>N(null)))},rc=m=>{W===null&&(P("cancel"),vg(m).then(()=>Ke()).catch(()=>{g.notify({kind:"agent-cancel",message:"Leglas could not stop that run.",tone:"danger",ttl:Ne.action})}).finally(()=>P(null)))},ma=m=>{W===null&&(P("retry"),bg(m).then(()=>Ke()).catch(()=>{g.notify({kind:"agent-retry",message:"That change could not be retried.",tone:"danger",ttl:Ne.action})}).finally(()=>P(null)))},Xn=(m,k)=>{zo(k).then($=>{g.notify({kind:"agent-connect",message:$==="copied"?`${m} copied.`:"Your browser blocked the clipboard. The README carries the same snippet.",tone:$==="copied"?"success":"danger",ttl:Ne.plain})})},vl=m=>{W===null&&(P("dismiss"),xg(m).then(()=>Ke()).catch(()=>{g.notify({kind:"agent-dismiss",message:"That change could not be dismissed.",tone:"danger",ttl:Ne.action})}).finally(()=>P(null)))},Re=z.useRef(g.loaded);Re.current=g.loaded,z.useEffect(()=>{let m=!1;const k=()=>fetch("/leglas/api/health").then(lt=>lt.json()).then(({reachable:lt})=>{m||da(at=>y2(at,lt))}).catch(()=>{}),$=window.setInterval(k,3e3);return k(),()=>{m=!0,window.clearInterval($)}},[]),z.useEffect(()=>{!Be.reachable||!Be.wasDown||(Ze(m=>{const k={...m};for(const $ of Object.keys(k))pl.has($)&&(k[$]=!1);return k}),fn(m=>{const k={...m};for(const $ of Object.keys(Re.current))pl.has($)&&(k[$]=(k[$]??0)+1);return k}),da(m=>({...m,wasDown:!1})))},[Be.reachable,Be.wasDown]);const[ga,Ka]=z.useState({}),Yl=D2(ga),Gl=(m,k)=>{let $=null;try{$=m.contentDocument}catch{return}if(!$?.head)return;const lt="leglas-hide-dev-overlays",at=(jt,At,Ht)=>{const Qt=jt.getElementById(lt);if(!k){Qt?.remove();return}if(Qt)return;const fe=$.createElement("style");fe.id=lt,fe.textContent=Ht,At.appendChild(fe)};at($,$.head,M2);for(const jt of $.querySelectorAll("nextjs-portal")){const At=jt.shadowRoot;At&&at(At,At,C2)}};z.useEffect(()=>{for(const m of document.querySelectorAll("iframe"))Gl(m,!g.prefs.showDevOverlays)});const Qn=(m,k)=>{let $=null;try{$=k.contentDocument}catch{return}if(!$?.body)return;const lt=[...$.body.querySelectorAll("*")].slice(0,400).map(Ht=>Ht.tagName),at=$.defaultView,jt=at?N2($.body,Ht=>{const Qt=at.getComputedStyle(Ht);return{backgroundColor:Qt.backgroundColor,backgroundImage:Qt.backgroundImage,color:Qt.color}}):[],At=j2($.body.innerText??"",lt,jt);Ka(Ht=>Ht[m]===At?Ht:{...Ht,[m]:At})},fc=Be.reachable?c:c.filter(m=>!w0(m)),ue=T2(fc,ga,fa)[0]??null,Ja=m=>(Be.reachable||!pl.has(m))&&!(m in ga)&&g.urlFor(m).startsWith("/");z.useEffect(()=>{if(ue===null)return;const m=window.setTimeout(()=>{Ka(k=>ue in k?k:{...k,[ue]:null})},L0);return()=>clearTimeout(m)},[ue]);const Vi=(m,k)=>{Gl(k,!g.prefs.showDevOverlays),window.setTimeout(()=>{Gl(k,!g.prefs.showDevOverlays);let $=!1;try{$=k.contentDocument!=null}catch{$=!1}$?Qn(m,k):Ka(lt=>({...lt,[m]:null}))},600)};z.useEffect(()=>{if(g.loaded[g.active]||Bl[g.active])return;const m=Be.reachable||!pl.has(g.active)?L0:0,k=setTimeout(()=>Ze($=>({...$,[g.active]:!0})),m);return()=>clearTimeout(k)},[g.active,g.loaded,Bl,ra,Be.reachable]);const $a=m=>{Ze(k=>({...k,[m]:!1})),g.resetLoaded(m),fn(k=>({...k,[m]:(k[m]??0)+1}))},hn=(m,k)=>$=>{if($.button!==0||g.renaming||g.query.trim()||g.rows.length<2||$.target.closest("button, [data-selectable]"))return;const lt=ze.current,at=lt?.parentElement;if(!lt||!at)return;const jt=[...lt.querySelectorAll("li[data-title]")],At=jt.map(Ue=>({height:Ue.offsetHeight,mid:Ue.offsetTop+Ue.offsetHeight/2,title:Ue.dataset.title??"",top:Ue.offsetTop})),Ht=at.getBoundingClientRect(),Qt=jt[k]?.getBoundingClientRect();el.current={maxDy:Qt?Ht.bottom-Qt.bottom:0,minDy:Qt?Ht.top-Qt.top:0,rows:At,startX:$.clientX,startY:$.clientY,suppressed:!1};const fe=At[0],de=At[1];gl({dy:0,from:k,gap:fe&&de?de.top-fe.top-fe.height:0,height:At[k]?.height??0,title:m,settling:!1,started:!1,to:k})},Ki=m=>{if(!oe?.started)return 0;const k=oe.height+oe.gap;return m<oe.from&&m>=oe.to?k:m>oe.from&&m<=oe.to?-k:0},Fa=z.useCallback(()=>Gn(!1),[]),mn=(m,k,$)=>{rg(m,$,k).then(()=>Ke()).catch(()=>g.notify({kind:"request",message:"That annotation could not be kept.",tone:"danger",ttl:Ne.action}))},dc=m=>{fg([m]).then(()=>Ke()).catch(()=>{})},Ji=m=>{window.open(g.urlFor(m),"_blank","noopener,noreferrer")},$i=(m,k)=>{const $=m===g.active,lt=g.previewFor(m),at=ll&&oe?.title===m,jt=ll&&!at?Ki(k):0,At=g.rowMeta.get(m),Ht=At?.depth===1,Qt=At?.variants??0,fe=At?.folded??!1,de=g.renaming===m,Ue=ll||de?"":"group-hover:hidden group-has-[button:focus-visible]:hidden";return o.jsxs("li",{className:`group relative ${at?`z-30 rounded-md bg-white/[0.06] shadow-2xl ${oe?.settling?`transition-transform duration-200 ${ca} motion-reduce:transition-none`:""}`:"z-10"} ${ll&&!at?`transition-transform duration-200 ${ca} motion-reduce:transition-none`:""}`,"data-title":m,onPointerEnter:Zt=>wl({height:Zt.currentTarget.offsetHeight,on:!0,top:Zt.currentTarget.offsetTop}),style:at?{transform:`translateY(${oe?.dy??0}px)`}:jt?{transform:`translateY(${jt}px)`}:void 0,children:[o.jsx(Sg,{label:de?null:Eg(lt,g.displayName(m),g.displayName),children:o.jsx("div",{"aria-pressed":$,className:`relative flex w-full cursor-grab items-start gap-2 rounded-md py-2 pr-3 text-left transition-colors active:cursor-grabbing ${Ht?"pl-11":"pl-3"} ${$?"bg-[#2E2E2E] ring-1 ring-inset ring-[#D1D5DB]/40":""}`,onClick:()=>{if(!de){if(el.current?.suppressed){el.current.suppressed=!1;return}g.setActive(m)}},onDoubleClick:Zt=>{de||Zt.target.closest("button")||(window.getSelection()?.removeAllRanges(),Ji(m))},onKeyDown:Zt=>{Zt.target===Zt.currentTarget&&(Zt.key==="Enter"||Zt.key===" ")&&(Zt.preventDefault(),g.setActive(m))},onPointerDown:hn(m,k),role:"button",tabIndex:0,children:o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsxs("span",{className:`flex items-center gap-2 ${ll||de?"":$?"group-hover:pr-[72px] group-has-[button:focus-visible]:pr-[72px]":"group-hover:pr-[98px] group-has-[button:focus-visible]:pr-[98px]"}`,children:[Qt>0&&o.jsx(Ae,{label:fe?`Show ${Qt} variant${Qt===1?"":"s"}`:"Fold the variants away",children:o.jsxs("button",{"aria-expanded":!fe,"aria-label":`${fe?"Show":"Hide"} the variants of ${g.displayName(m)}`,className:"-ml-1 flex shrink-0 items-center gap-1 rounded px-0.5 py-1 text-[#84848C] transition-colors hover:text-[#E8EAED]",onClick:Zt=>{Zt.stopPropagation(),g.toggleFamily(m)},onPointerDown:Zt=>Zt.stopPropagation(),type:"button",children:[o.jsx("svg",{className:`size-2.5 transition-transform duration-150 motion-reduce:transition-none ${fe?"-rotate-90":""}`,fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 10 10",children:o.jsx("path",{d:"M2 3.5 5 6.5 8 3.5",strokeLinecap:"round",strokeLinejoin:"round"})}),fe?o.jsx("span",{className:"text-[10px] leading-none tabular-nums",children:Qt}):null]})}),de?o.jsx(a2,{error:g.renameError,initial:g.displayName(m),label:`Rename the ${g.displayName(m)} direction`,onCancel:()=>g.startRename(null),onCommit:(Zt,bl)=>g.rename(m,Zt,bl)}):o.jsx("span",{className:`min-w-0 flex-1 text-sm font-medium leading-5 transition-colors duration-150 ${$?"text-white":"text-[#D1D5DB] group-hover:text-[#E8EAED]"}`,children:o.jsx("span",{className:`block w-fit min-w-[70%] max-w-full cursor-text truncate -my-1 py-1 pr-2 ${Qt>0?"":"-ml-3 pl-3"}`,onDoubleClick:Zt=>{Zt.stopPropagation(),window.getSelection()?.removeAllRanges(),g.startRename(m)},children:g.displayName(m)})}),_e&&m===$t?o.jsx("span",{className:`shrink-0 rounded bg-white/[0.08] px-1.5 py-0.5 text-[10px] font-medium leading-normal text-[#E8E8EA] ${Ue}`,children:"Comparing"}):Yl[m]?o.jsx(Ae,{label:`Renders the same page as ${Yl[m]?.join(", ")}. Check the URL.`,children:o.jsxs("span",{className:`shrink-0 rounded bg-amber-400/10 px-1.5 py-0.5 text-[10px] font-medium leading-normal text-amber-300/90 ${Ue}`,children:["Same as ",Yl[m]?.length===1?Yl[m]?.[0]:`${Yl[m]?.length} others`]})}):Ja(m)?o.jsxs("span",{className:`flex h-5 shrink-0 items-center gap-1 rounded bg-white/[0.04] pl-0.5 pr-1.5 text-[10px] font-medium leading-none text-[#84848C]/80 ${Ue}`,children:[o.jsx(X0,{"aria-label":"Checking for duplicates",size:20,state:Q0,theme:"dark"}),"Cooking"]}):lt?.tags[0]&&o.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium leading-normal ${Ue}`,style:Mg(lt.tags[0]),children:lt.tags[0]})]}),o.jsx("span",{className:`mt-0.5 line-clamp-2 block cursor-text text-xs leading-snug transition-colors ${de&&g.renameError?"text-amber-300/90":$?"text-[#D1D5DB]":"text-[#84848C]"}`,id:de&&g.renameError?"leglas-rename-error":void 0,children:de&&g.renameError?g.renameError:lt?.note??lt?.url})]})})}),o.jsxs("div",{className:`pointer-events-none absolute right-2 top-1.5 flex items-center gap-0.5 opacity-0 transition-opacity duration-150 ${de?"invisible":""} ${ll?"":"group-hover:pointer-events-auto group-hover:opacity-100 group-has-[button:focus-visible]:pointer-events-auto group-has-[button:focus-visible]:opacity-100"}`,children:[m!==g.active&&o.jsx(Ae,{label:_e&&m===$t?"Stop comparing":`Compare with ${g.displayName(g.active)}`,children:o.jsx("button",{"aria-label":_e&&m===$t?`Stop comparing ${g.displayName(m)}`:`Compare ${g.displayName(m)} with ${g.displayName(g.active)}`,"aria-pressed":_e&&m===$t,className:`${qi} ${_e&&m===$t?"text-white":""}`,onClick:Zt=>{if(Zt.stopPropagation(),_e&&m===$t){kn(!1);return}xe(m),kn(!0)},type:"button",children:o.jsx(hl,{d:dl.split})})}),o.jsx(Ae,{label:g.copied?.kind==="link"&&g.copied.title===m?"Copied":"Copy preview link",children:o.jsx("button",{"aria-label":`Copy the preview link to the ${g.displayName(m)} direction`,className:qi,onClick:()=>g.copyLink(m),type:"button",children:g.copied?.kind==="link"&&g.copied.title===m?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(hl,{d:dl.link})})}),o.jsx(Ae,{label:g.copied?.kind==="reference"&&g.copied.title===m?"Copied":o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Copy a detailed reference."}),o.jsx("span",{className:"block",children:"For a teammate or an agent."})]}),children:o.jsx("button",{"aria-label":`Copy a detailed reference to the ${g.displayName(m)} direction`,className:qi,onClick:()=>g.copyReference(m),type:"button",children:g.copied?.kind==="reference"&&g.copied.title===m?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(hl,{d:dl.copy,size:12})})}),o.jsx(Ae,{label:"Rename",children:o.jsx("button",{"aria-label":`Rename the ${g.displayName(m)} direction`,className:qi,onClick:()=>g.startRename(m),type:"button",children:o.jsx(hl,{d:dl.pencil,size:12})})}),o.jsx(Ae,{label:"Remove from list",children:o.jsx("button",{"aria-label":`Remove the ${g.displayName(m)} direction from the list`,className:qi,onClick:()=>g.hide(m),type:"button",children:o.jsx(hl,{d:dl.trash,size:12})})})]})]},m)};return o.jsxs("main",{className:`flex h-dvh bg-[#1C1C20] text-white antialiased selection:bg-[#E6E8EC] selection:text-[#17181B] ${g.resizing?"cursor-col-resize":""} ${qn?"select-none":""}`,"data-leglas-shell":"",style:{fontFamily:on.stack},children:[o.jsxs("aside",{className:`relative shrink-0 overflow-hidden border-r border-[#232328] ${g.prefs.collapsed?"":"shadow-2xl"} ${g.resizing?"":`transition-[width] duration-200 ${ca} motion-reduce:transition-none`}`,style:{width:g.prefs.collapsed?48:g.prefs.width},children:[o.jsxs("div",{className:`flex h-full flex-col transition-opacity duration-150 ${g.prefs.collapsed?"pointer-events-none opacity-0":"opacity-100"}`,inert:g.prefs.collapsed,style:{width:g.prefs.width},children:[o.jsxs("div",{className:"z-10 flex shrink-0 items-center justify-between gap-2 border-b border-[#232328] bg-[#1E1E22] px-2.5 py-2.5",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(ic,{size:28}),o.jsx(n2,{height:18})]}),o.jsx(Ae,{label:o.jsxs(o.Fragment,{children:["Collapse panel ",o.jsx("kbd",{className:"ml-1 text-[#9CA3AF]",children:"["})]}),side:"right",children:o.jsx("button",{"aria-label":"Collapse the directions panel",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded p-1 text-[#9CA3AF] transition-colors hover:bg-[#2E2E2E] hover:text-white",onClick:()=>g.setPrefs(m=>({...m,collapsed:!0})),type:"button",children:o.jsx(hl,{d:dl.sidebar,size:16})})})]}),o.jsx("div",{className:"px-3 pb-1 pt-2",children:o.jsxs("div",{className:"relative",children:[o.jsx("span",{className:"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 text-[#D1D5DB]",children:o.jsx(hl,{d:dl.search})}),o.jsx("kbd",{className:`pointer-events-none absolute right-2 top-1/2 -translate-y-1/2 rounded border border-[#232328] bg-[#2E2E2E]/60 px-1.5 py-0.5 font-sans text-[10px] leading-none tracking-wide text-[#84848C] transition-opacity duration-150 motion-reduce:transition-none ${g.query||I?"opacity-0":"opacity-100"}`,children:Ng}),o.jsx("input",{"aria-label":"Search directions",className:"w-full rounded-md border border-[#232328] bg-[#2E2E2E]/40 py-1.5 pl-7 pr-16 text-xs text-white placeholder:text-[#E8EAED] focus:outline-none focus:ring-1 focus:ring-[#D1D5DB]/60",onBlur:()=>nt(!1),onFocus:()=>nt(!0),onChange:m=>g.setQuery(m.target.value),onKeyDown:m=>{m.key==="Escape"&&(g.query?g.setQuery(""):m.currentTarget.blur())},placeholder:"Search directions…",ref:h,type:"text",value:g.query})]})}),Xi&&!Be.reachable&&o.jsxs("div",{className:"mx-3 mb-1 mt-1 rounded-md border border-amber-400/20 bg-amber-400/[0.07] px-2.5 py-2",children:[o.jsx("p",{className:"text-xs font-medium text-amber-300/90",children:"Dev server not responding"}),o.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-[#9CA3AF]",children:"Anything on screen is from before it stopped. Previews return on their own once it is back."})]}),o.jsxs("div",{className:"flex-1 overflow-y-auto px-3 py-2 [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",children:[o.jsxs("ul",{className:"relative flex flex-col gap-1",onPointerLeave:()=>wl(m=>({...m,on:!1})),ref:ze,children:[o.jsx("div",{"aria-hidden":!0,className:`pointer-events-none absolute left-0 right-0 z-0 rounded-md bg-white/[0.06] transition-[transform,height,opacity] duration-150 ${ca} motion-reduce:transition-none`,style:{height:Cl.height,opacity:Cl.on&&!ll?1:0,transform:`translateY(${Cl.top}px)`}}),g.rows.map((m,k)=>$i(m,k))]}),g.rows.length===0&&o.jsx("div",{className:"px-3 py-2",children:g.query.trim()?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-xs text-[#9CA3AF]",children:["Nothing matches “",g.query,"”."]}),o.jsx("button",{className:"mt-1 rounded text-xs text-[#84848C] underline underline-offset-2 transition-colors hover:text-[#D1D5DB]",onClick:()=>g.setQuery(""),type:"button",children:"Clear search"})]}):o.jsx("p",{className:"text-xs leading-snug text-[#9CA3AF]",children:g.visibleCount===0&&g.hiddenCount>0?"Every direction is removed. Restore one below.":"No directions yet. Add them to leglas.config.ts."})}),g.hiddenCount>0&&o.jsxs("div",{className:"mt-1 flex items-center justify-between gap-2",children:[o.jsxs("button",{className:"min-w-0 flex-1 rounded px-3 py-1.5 text-left text-[11px] text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>g.setShowHidden(m=>!m),type:"button",children:[g.showHidden?"Hide":"Show"," removed (",g.hiddenCount,")"]}),g.showHidden?o.jsx("button",{className:"rounded px-3 py-1.5 text-[11px] text-[#9CA3AF] transition-[color,scale] hover:text-red-300 active:scale-[0.96]",onClick:()=>M({error:null,titles:[...g.prefs.hidden]}),type:"button",children:"Clear all"}):null]}),g.showHidden&&o.jsx("ul",{className:"relative",children:g.prefs.hidden.filter(g.matches).map(m=>o.jsx("li",{className:"group relative",children:o.jsxs("div",{className:"flex items-center justify-between rounded-md px-3 py-2 transition-colors group-hover:bg-white/[0.04]",children:[o.jsx("span",{className:"truncate text-sm font-medium text-[#9CA3AF]",children:g.displayName(m)}),o.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[o.jsx("button",{className:"rounded text-[11px] text-[#9CA3AF] transition-colors hover:text-white",onClick:()=>{g.restore(m),g.notify({kind:`remove:${m}`,message:`${g.displayName(m)} is back in the list`,tone:"success",ttl:Ne.plain})},type:"button",children:"Restore"}),o.jsx("button",{className:"rounded text-[11px] text-[#84848C] transition-[color,scale] hover:text-red-300 active:scale-[0.96]",onClick:()=>M({error:null,titles:[m]}),type:"button",children:"Delete"})]})]})},m))})]}),o.jsxs("div",{ref:Ml,children:[vt!==null&&o.jsx("div",{className:"mx-3 mt-2 rounded-lg border border-[#232328] bg-[#1E1E22] px-2.5 py-2 shadow-lg",role:"status",children:o.jsxs("div",{className:"flex items-center gap-2",children:[vt.kind==="stopped"?o.jsx("span",{"aria-hidden":"true",className:"flex size-3.5 shrink-0 items-center justify-center text-[#84848C]",children:o.jsx("span",{className:"block size-2 rounded-[2px] bg-current"})}):vt.kind==="failed"?o.jsxs("svg",{"aria-hidden":"true",className:"shrink-0 text-amber-400/90",fill:"none",height:"14",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",viewBox:"0 0 16 16",width:"14",children:[o.jsx("path",{d:"M8 2.6 14.6 13.4H1.4Z"}),o.jsx("path",{d:"M8 6.8v2.7"}),o.jsx("path",{d:"M8 11.6h.01"})]}):vt.kind==="queued"?o.jsx("span",{"aria-hidden":"true",className:"flex size-3.5 shrink-0 items-center justify-center",children:o.jsx("span",{className:"size-1.5 animate-pulse rounded-full bg-[#84848C] motion-reduce:animate-none"})}):o.jsx("span",{"aria-hidden":"true",className:"size-3.5 shrink-0 animate-spin rounded-full border-[1.5px] border-white/15 border-t-white/70 motion-reduce:animate-none"}),o.jsxs("div",{className:"min-w-0 flex-1",children:[o.jsx("p",{className:"truncate text-[11px] font-medium leading-tight text-[#D1D5DB]",children:Zi}),zl!==null&&o.jsx("p",{className:"mt-0.5 text-[10px] leading-tight text-[#84848C]",children:zl})]}),vt.kind==="running"&&yl!==null&&o.jsx("span",{className:"shrink-0 text-[10px] tabular-nums text-[#84848C]",children:mg(oc-yl)}),vt.kind==="running"&&o.jsx(Ae,{label:"Stop this run",children:o.jsx("button",{"aria-label":"Stop this run",className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:W!==null||vt.stopping,onClick:()=>rc(vt.id),type:"button",children:W==="cancel"||vt.stopping?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("span",{className:"block size-2 rounded-[2px] bg-current"})})}),(vt.kind==="failed"||vt.kind==="stopped")&&o.jsxs("span",{className:"flex shrink-0 items-center",children:[o.jsx(Ae,{label:vt.kind==="stopped"?"Run it after all":"Try it again",children:o.jsx("button",{"aria-label":vt.kind==="stopped"?"Run this change after all":"Retry this change",className:"flex h-6 w-6 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:W!==null,onClick:()=>ma(vt.id),type:"button",children:W==="retry"?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsxs("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:[o.jsx("path",{d:"M13.5 8a5.5 5.5 0 1 1-1.6-3.9"}),o.jsx("path",{d:"M13.7 1.8v2.7H11"})]})})}),o.jsx(Ae,{label:"Let it go",children:o.jsx("button",{"aria-label":vt.kind==="stopped"?"Dismiss this stopped change":"Dismiss this failed change",className:"flex h-6 w-6 items-center justify-center rounded-md text-[#84848C] transition-[background-color,color,transform] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:cursor-wait disabled:opacity-40 motion-reduce:transition-none",disabled:W!==null,onClick:()=>vl(vt.id),type:"button",children:W==="dismiss"?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:o.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})})})})]})]})}),o.jsx("form",{className:"relative px-3 pb-2.5 pt-2",onSubmit:m=>{m.preventDefault();const k=yt.trim(),$=g.active;if(!k&&ve.length===0||!$||Bt)return;const lt=g.displayName($);D(!0),fetch("/leglas/api/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:$,intent:k,mode:wt})}).then(at=>at.json()).then(at=>{if(at.duplicate===!0){D(!1),g.notify({kind:"request",message:`That exact change to ${lt} is already queued.`,tone:"info",ttl:Ne.action});return}if(!at.ok||!at.prompt)throw new Error("refused");St(""),D(!1),Ke(),g.notify({kind:"request",message:`Asked for a change to ${lt}.`,tone:"success",ttl:Ne.plain}),zo(at.prompt).then(jt=>{g.notify({kind:"request",message:jt==="copied"?`Asked for a change to ${lt}. Prompt copied.`:`Asked for a change to ${lt}. Your browser blocked the clipboard, so read it with npx leglas requests.`,tone:"success",ttl:Ne.plain})})}).catch(()=>{D(!1),g.notify({kind:"request",message:`That request never reached Leglas. ${lt} is unchanged.`,tone:"danger",ttl:Ne.action})})},children:o.jsxs("div",{className:"rounded-md border border-[#232328] bg-[#2E2E2E]/40 transition-colors focus-within:border-[#D1D5DB]/40 focus-within:ring-1 focus-within:ring-[#D1D5DB]/40",children:[o.jsx("textarea",{"aria-label":g.active?`Ask your agent to change the ${g.displayName(g.active)} direction`:"Ask your agent to change a direction",className:"block w-full resize-none overflow-y-auto bg-transparent px-2.5 pb-1 pt-2 text-xs leading-4 text-white placeholder:text-[#84848C] focus:outline-none disabled:cursor-not-allowed disabled:opacity-60",disabled:Bt||!g.active,onChange:m=>St(m.target.value),onKeyDown:m=>{m.key==="Enter"&&!m.shiftKey&&(m.preventDefault(),m.currentTarget.form?.requestSubmit())},placeholder:g.active===null?"No direction to change yet":ve.length>0?`Send ${ve.length===1?"the annotation":`${ve.length} annotations`}, or add words…`:`Change ${g.displayName(g.active)}…`,ref:r,rows:1,value:yt}),o.jsxs("div",{className:"flex items-center justify-end gap-1.5 p-1",children:[o.jsx(Ae,{label:wt==="variant"?"Builds a new direction beside this one and leaves this one alone.":"Changes this direction itself. Nothing is kept of what it was.",children:o.jsxs("button",{"aria-label":wt==="variant"?"This change makes a new variant. Switch to changing the direction itself.":"This change edits the direction itself. Switch to making a new variant.",className:"mr-auto flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none text-[#84848C] transition-colors hover:bg-white/[0.06] hover:text-[#D1D5DB]",onClick:()=>Nt(wt==="variant"?"replace":"variant"),type:"button",children:[wt==="variant"?o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("circle",{cx:"4.5",cy:"3.6",r:"1.9"}),o.jsx("circle",{cx:"11.5",cy:"12.4",r:"1.9"}),o.jsx("path",{d:"M4.5 5.5v2.6a4.3 4.3 0 0 0 4.3 4.3h0.8",strokeLinecap:"round"})]}):o.jsx("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:o.jsx("path",{d:"M10.8 2.9 13.1 5.2 5.6 12.7H3.3v-2.3z",strokeLinejoin:"round"})}),wt==="variant"?"as a variant":"in place"]})}),o.jsx(Ae,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:Le?"Stop annotating":ve.length>0?"Show what you marked up":"Point at what is wrong, instead of describing where it is"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:Le?"Click a detail · drag an area · Esc to stop":o.jsx("kbd",{className:"font-sans",children:"A"})})]}),children:o.jsxs("button",{"aria-keyshortcuts":"a","aria-label":Le?"Stop annotating the design":`Annotate the design${ve.length>0?`, ${ve.length} annotation${ve.length===1?"":"s"} so far`:""}`,"aria-pressed":Le,className:`flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none transition-colors ${Le?"bg-[#7C9CFF]/20 text-[#AFC2FF]":"text-[#84848C] hover:bg-white/[0.06] hover:text-[#D1D5DB]"}`,onClick:()=>Le?Fa():Gn(!0),type:"button",children:[o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("path",{d:"M8 1.8a4.2 4.2 0 0 1 4.2 4.2c0 3-4.2 8-4.2 8S3.8 9 3.8 6A4.2 4.2 0 0 1 8 1.8Z",strokeLinejoin:"round"}),o.jsx("circle",{cx:"8",cy:"6",r:"1.4"})]}),"Annotate",ve.length>0?o.jsx("span",{className:"rounded-full bg-white/15 px-1 text-[9px] leading-[1.5] text-white",children:ve.length}):null]})}),Yt.kind==="none"?o.jsxs("span",{className:"min-w-0 truncate px-1.5 text-[10px] leading-snug text-[#84848C]",children:["Enter queues it for ",o.jsx("span",{className:"font-medium",children:"npx leglas requests"})]}):o.jsxs("div",{className:"relative flex min-w-0 items-center",children:[o.jsx("div",{"aria-hidden":!U,"aria-label":"Who runs your changes",className:`absolute bottom-full right-0 z-10 mb-1.5 w-max min-w-36 origin-bottom-right rounded-lg border border-[#232328] bg-[#1E1E22] p-1 text-[#D1D5DB] shadow-2xl transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.165,0.84,0.44,1)] focus:outline-none motion-reduce:transition-none ${U?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!U,ref:Dt,role:"dialog",tabIndex:-1,children:p!==null?o.jsxs("div",{className:"w-60 p-1",children:[o.jsx("label",{className:"block px-1 pb-1 text-[10px] leading-snug text-[#84848C]",htmlFor:"leglas-custom-run",children:"The command that runs your agent."}),o.jsx("input",{className:"w-full rounded border border-[#232328] bg-[#2E2E2E]/40 px-2 py-1 font-mono text-[11px] text-white transition-colors placeholder:text-[#84848C] focus:border-[#D1D5DB]/40 focus:outline-none",id:"leglas-custom-run",onChange:m=>T(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.preventDefault(),p.trim()!==""&&Y===null&&ha("custom",p.trim()))},placeholder:"npx my-agent",value:p}),o.jsxs("p",{className:"px-1 pt-1 text-[9px] leading-snug text-[#84848C]/80",children:["Your request is added at the end. Put"," ",o.jsx("span",{className:"font-mono",children:"{prompt}"})," where it should go instead, if needed."]}),o.jsxs("div",{className:"flex items-center justify-between pt-1.5",children:[o.jsx("button",{className:"rounded px-1 text-[11px] text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>T(null),type:"button",children:"Back"}),o.jsx("button",{className:"rounded px-1.5 py-0.5 text-[11px] text-[#D1D5DB] transition-colors hover:bg-white/[0.06] hover:text-white disabled:cursor-not-allowed disabled:opacity-40",disabled:p.trim()===""||Y!==null,onClick:()=>ha("custom",p.trim()),type:"button",children:Y==="custom"?"Saving…":"Save"})]})]}):Z?o.jsxs("div",{className:"w-64 p-1",children:[o.jsx("p",{className:"px-1 pb-1 text-[10px] leading-snug text-[#84848C]",children:"Give your agent the Leglas tools. Copy the one your agent understands:"}),o.jsxs("button",{className:Oe,onClick:()=>Xn("The Claude Code command",wg),type:"button",children:[o.jsx("span",{className:"truncate",children:"Claude Code command"}),o.jsx(hl,{d:dl.copy,size:12})]}),o.jsxs("button",{className:Oe,onClick:()=>Xn("The mcp.json entry",jg),type:"button",children:[o.jsx("span",{className:"truncate",children:"mcp.json for everything else"}),o.jsx(hl,{d:dl.copy,size:12})]}),o.jsx("p",{className:"px-1 pt-1 text-[9px] leading-snug text-[#84848C]/80",children:"Then ask it to handle your Leglas change requests. While it works, the built-in runner stays out of its way."}),o.jsx("div",{className:"flex items-center justify-between pt-1.5",children:o.jsx("button",{className:"rounded px-1 text-[11px] text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>V(!1),type:"button",children:"Back"})})]}):o.jsxs(o.Fragment,{children:[Dl.agents.filter(m=>m.available).map(m=>{const k=Yt.kind==="chosen"&&m.id===Yt.id;return o.jsxs("button",{className:Oe,disabled:Y!==null,onClick:()=>k?K(!1):ha(m.id),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(jo,{id:m.id}),o.jsx("span",{className:"truncate",children:m.name})]}),Y===m.id?o.jsx("span",{"aria-label":"selecting",className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):m.auth==="signed-out"?o.jsx("span",{className:"text-[10px] text-amber-400/80",children:"signed out"}):k&&o.jsx("span",{"aria-label":"current choice",children:"✓"})]},m.id)}),o.jsxs("button",{className:`${Oe} ${Yt.kind==="chosen"&&Yt.id==="custom"?"":"text-[#84848C]"}`,disabled:Y!==null,onClick:()=>T(Dl.customRun??""),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(jo,{id:"custom"}),o.jsx("span",{className:"truncate",children:Yt.kind==="chosen"&&Yt.id==="custom"?Yt.name:"Add your own…"})]}),Yt.kind==="chosen"&&Yt.id==="custom"&&o.jsx("span",{"aria-label":"current choice",children:"✓"})]}),o.jsx("button",{className:`${Oe} text-[#84848C]`,onClick:()=>V(!0),type:"button",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(hl,{d:dl.link,size:14}),o.jsx("span",{className:"truncate",children:"Connect another agent…"})]})}),Dl.choice===null&&o.jsxs("button",{className:`${Oe} text-[#84848C]`,onClick:()=>{g.setPrefs(m=>({...m,agentPickerDismissed:!0})),K(!1)},type:"button",children:[o.jsx("span",{children:"I'll run my own"}),Yt.kind==="manual"&&o.jsx("span",{"aria-label":"current choice",children:"✓"})]}),Dl.choice===null&&o.jsx("p",{className:"mt-1 max-w-48 border-t border-[#232328] px-1 pb-0.5 pt-1.5 text-[10px] leading-snug text-[#84848C]",children:"Runs in this project with write access, like in your terminal."})]})}),o.jsxs("button",{"aria-expanded":U,"aria-haspopup":"dialog",className:"flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[11px] leading-none text-[#84848C] transition-colors hover:bg-white/[0.04] hover:text-[#D1D5DB]",onClick:()=>{U||dn(),K(m=>!m)},ref:Wt,type:"button",children:[Yt.kind==="chosen"&&o.jsx(jo,{id:Yt.id,size:12}),o.jsx("span",{className:"truncate",children:Yt.kind==="chosen"?Yt.name:Yt.kind==="manual"?"I'll run my own":"Choose an agent"}),re&&o.jsx("span",{className:"size-1.5 shrink-0 rounded-full bg-amber-400",title:"This CLI is signed out. Sign in in your terminal.",children:o.jsx("span",{className:"sr-only",children:"signed out"})}),o.jsx("svg",{"aria-hidden":"true",className:`shrink-0 transition-transform duration-150 motion-reduce:transition-none ${U?"rotate-180":""}`,fill:"none",height:"12",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"12",children:o.jsx("path",{d:"M4 6.5 8 10.5l4-4"})})]})]}),o.jsx("button",{"aria-label":g.active?`Send the change to ${g.displayName(g.active)}`:"Send the change",className:`flex h-6 w-6 shrink-0 items-center justify-center rounded-md transition-[background-color,color,transform] duration-150 active:scale-[0.96] motion-reduce:transition-none ${(yt.trim()!==""||ve.length>0)&&g.active&&!Bt?"bg-[#E8E8EA] text-[#1C1C20] hover:bg-white":"pointer-events-none text-[#84848C]/60"}`,disabled:yt.trim()===""&&ve.length===0||!g.active||Bt,type:"submit",children:Bt?o.jsx("span",{className:"size-3 animate-spin rounded-full border-[1.5px] border-current border-t-transparent motion-reduce:animate-none"}):o.jsx("svg",{"aria-hidden":"true",fill:"none",height:"13",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"13",children:o.jsx("path",{d:"M8 13V3M3.5 7.5 8 3l4.5 4.5"})})})]})]})}),Tl===null?null:o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",title:Tl,children:Tl})}),g.prefs.showWidget?Yn.agent.attached&&vt===null?o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",children:"Your agent is listening"})}):null:o.jsx("div",{className:"px-3 pb-2",children:o.jsxs("button",{className:"min-w-0 max-w-full truncate rounded text-left text-[10px] leading-snug text-[#84848C] transition-colors hover:text-[#D1D5DB]",onClick:()=>G(!0),type:"button",children:["Bring the tools back ",o.jsx("kbd",{className:"font-sans text-[#9CA3AF]",children:"T"})]})})]})]}),o.jsxs("div",{className:`absolute inset-y-0 left-0 z-30 flex w-12 flex-col items-center bg-[#1C1C20] py-3 transition-opacity duration-150 ${g.prefs.collapsed?"opacity-100":"pointer-events-none opacity-0"}`,inert:!g.prefs.collapsed,children:[o.jsx(ic,{size:24}),o.jsx(Ae,{label:o.jsxs(o.Fragment,{children:["Open directions ",o.jsx("kbd",{className:"ml-1 text-[#9CA3AF]",children:"["})]}),side:"right",children:o.jsx("button",{"aria-label":"Open the directions panel",className:"mt-3 flex h-6 w-6 items-center justify-center rounded p-1 text-[#9CA3AF] transition-colors hover:bg-[#2E2E2E] hover:text-white",onClick:()=>g.setPrefs(m=>({...m,collapsed:!1})),type:"button",children:o.jsx(hl,{d:dl.sidebar,size:16})})})]}),!g.prefs.collapsed&&o.jsx("div",{"aria-hidden":!0,className:"group/resize absolute inset-y-0 right-0 z-20 flex w-3 cursor-col-resize touch-none justify-end",onPointerDown:g.onHandlePointerDown,children:o.jsx("span",{className:`h-full transition-all duration-150 ${g.resizing?"w-0.5 bg-[#9CA3AF]":"w-px bg-[#232328] group-hover/resize:w-0.5 group-hover/resize:bg-[#9CA3AF]"}`})})]}),o.jsx("span",{"aria-live":"polite",className:"sr-only",role:"status",children:g.copied===null?"":g.copied.kind==="link"?"Link copied":"Reference copied"}),o.jsxs("div",{className:`relative min-w-0 flex-1 ${_e?"flex":"overflow-auto"}`,ref:bt,children:[fa.map(m=>o.jsxs("div",{className:ql.includes(m)?_e?`relative min-w-0 flex-1 overflow-auto ${m===$t?"border-l border-[#232328]":""} ${Al?"flex flex-col items-center justify-center gap-2.5":rn?"flex min-h-full justify-center p-6":""}`:rn?"flex min-h-full justify-center p-6":"absolute inset-0":"hidden",style:_e?{order:ql.indexOf(m)}:void 0,children:[_e&&o.jsx("div",{className:Al?"pointer-events-none z-10 flex justify-center":"pointer-events-none absolute inset-x-0 top-0 z-10 flex justify-center p-3",children:o.jsxs("span",{className:"rounded-full bg-[#1C1C20]/85 px-2.5 py-1 text-[11px] font-medium text-[#E8E8EA] shadow-lg backdrop-blur",children:[g.displayName(m),Al&&o.jsxs("span",{className:"ml-1.5 font-normal text-[#8E8E96]",children:[Math.round(ie),"px · ",Math.round(kl*100),"%"]})]})}),o.jsxs("div",{className:Al?"relative shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.12)]":rn?`relative h-[calc(100dvh-48px)] shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.10)] transition-[width] duration-200 ${ca} motion-reduce:transition-none`:"relative size-full",style:Al?{height:It,width:Pt}:rn?{width:g.prefs.viewport??void 0}:void 0,children:[o.jsxs("div",{className:Al?"relative origin-top-left":"relative size-full",style:Al?{height:nl,transform:`scale(${kl})`,width:ie}:void 0,children:[o.jsx("iframe",{className:`size-full border-0 bg-white ${qn?"pointer-events-none":""}`,onError:()=>Ze(k=>({...k,[m]:!0})),onLoad:k=>{const lt=g.urlFor(m).startsWith("/");let at=!0;if(lt)try{at=k.currentTarget.contentDocument!=null}catch{at=!1}if(at){g.markLoaded(m),Ze(At=>At[m]?{...At,[m]:!1}:At);const jt=k.currentTarget;Gl(jt,!g.prefs.showDevOverlays),window.setTimeout(()=>{Gl(jt,!g.prefs.showDevOverlays),Qn(m,jt)},600)}else Ze(jt=>({...jt,[m]:!0}))},"data-preview":m,src:g.urlFor(m),title:`Preview: ${g.displayName(m)}`},ra[m]??0),Le&&m===g.active?o.jsx(sg,{notes:ve,onExit:Fa,onForget:dc,onKeep:(k,$)=>mn(m,k,$),paneScale:kl,scaling:Al,title:m}):null]}),Bl[m]?o.jsx(r2,{onReload:()=>$a(m),reason:Be.reachable||!pl.has(m)?`${g.urlFor(m)} didn’t respond.`:"Your dev server stopped. This returns on its own once it is back."}):o.jsx(o2,{loaded:!!g.loaded[m]}),!Be.reachable&&g.loaded[m]&&pl.has(m)&&o.jsx("div",{className:"pointer-events-none absolute inset-x-0 top-0 flex justify-center p-3",children:o.jsx("span",{className:"rounded-full bg-[#1C1C20]/90 px-2.5 py-1 text-[11px] font-medium text-amber-300/90 shadow-lg",children:"Stale — dev server stopped"})})]})]},m)),o.jsxs("div",{className:`absolute z-50 flex gap-2 ${F?"flex-col items-start":{"bottom-right":"bottom-4 right-4 flex-col items-end","bottom-left":"bottom-4 left-4 flex-col items-start","top-right":"right-4 top-4 flex-col-reverse items-end","top-left":"left-4 top-4 flex-col-reverse items-start"}[g.prefs.corner]}`,style:Yi,children:[o.jsxs("div",{"aria-hidden":!X,"aria-label":"Leglas tools",className:`w-56 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl transition-[opacity,transform] duration-150 ease-[cubic-bezier(0.165,0.84,0.44,1)] focus:outline-none motion-reduce:transition-none ${F?"hidden ":""}${X?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!X,ref:Ot,role:"dialog",tabIndex:-1,children:[o.jsx("span",{className:"block px-1 pb-1 pt-0.5 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Typeface"}),o.jsx("div",{"aria-label":"Interface typeface",className:"flex items-center gap-0.5 rounded-md bg-[#2E2E2E]/40 p-0.5",role:"group",children:Ao.map(m=>o.jsx("button",{"aria-pressed":on.key===m.key,className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${on.key===m.key?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>g.setPrefs(k=>({...k,font:m.key})),style:{fontFamily:m.stack},type:"button",children:m.label},m.key))}),o.jsx("span",{className:"block px-1 pb-1 pt-2 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Viewport"}),o.jsx("div",{"aria-label":"Viewport width",className:"flex items-center gap-0.5 rounded-md bg-[#2E2E2E]/40 p-0.5",role:"group",children:g.viewports.map(({label:m,width:k})=>o.jsx("button",{className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${g.prefs.viewport===k?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>g.setPrefs($=>({...$,viewport:k})),type:"button",children:m},m))}),_e&&o.jsxs("button",{"aria-checked":g.prefs.scaleSplit,className:`${Oe} mt-1 ${g.prefs.scaleSplit?"text-white":"text-[#9CA3AF]"}`,onClick:()=>g.setPrefs(m=>({...m,scaleSplit:!m.scaleSplit})),role:"switch",type:"button",children:[o.jsx("span",{children:"Scale each side to fit"}),o.jsx(wo,{on:g.prefs.scaleSplit})]}),o.jsx("span",{className:"block px-1 pb-1 pt-2 text-[10px] uppercase tracking-[0.08em] text-[#84848C]",children:"Dev overlays"}),o.jsxs("button",{"aria-checked":g.prefs.showDevOverlays,className:`${Oe} ${g.prefs.showDevOverlays?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const m=!g.prefs.showDevOverlays;g.setPrefs(k=>({...k,showDevOverlays:m}));for(const k of document.querySelectorAll("iframe"))Gl(k,!m)},role:"switch",type:"button",children:[o.jsx("span",{children:"Show dev tool overlay"}),o.jsx(wo,{on:g.prefs.showDevOverlays})]}),o.jsxs("button",{"aria-checked":g.prefs.showWidget,className:`${Oe} ${g.prefs.showWidget?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const m=!g.prefs.showWidget;g.setPrefs(k=>({...k,showWidget:m})),m||g.notify({kind:"widget",message:"Press T to reopen the tools",tone:"info",ttl:Ne.plain+3e3})},role:"switch",type:"button",children:[o.jsx("span",{children:"Show Leglas overlay"}),o.jsx(wo,{on:g.prefs.showWidget})]}),o.jsxs("button",{className:"mt-1 flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",onClick:()=>g.copyReference(g.active),type:"button",children:[o.jsx(hl,{d:dl.copy,size:12}),g.copied?.kind==="reference"&&g.copied.title===g.active?"Copied":"Copy reference"]}),o.jsx(Ae,{label:"Or double-click any direction in the rail",children:o.jsxs("a",{className:"flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",href:g.urlFor(g.active),rel:"noreferrer",target:"_blank",children:[o.jsx("span",{className:"inline-block size-3 rounded-sm border border-current"}),"Open in new tab"]})}),o.jsxs("button",{className:"flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-left text-xs text-[#D1D5DB] transition-colors hover:bg-[#2E2E2E]/60 hover:text-white",onClick:()=>{G(!1),S(!0)},type:"button",children:[o.jsx("span",{children:"Keyboard shortcuts"}),o.jsx("kbd",{className:"rounded border border-[#232328] bg-[#2E2E2E]/60 px-1 py-0.5 font-sans text-[10px] text-[#84848C]",children:"?"})]})]}),(g.prefs.showWidget||X)&&o.jsx(Ae,{label:"Leglas tools",children:o.jsxs("button",{"aria-expanded":X,"aria-haspopup":"dialog","aria-label":"Leglas tools",className:"relative flex h-11 w-11 items-center justify-center rounded-full border border-white/10 bg-[#1C1C20] shadow-lg transition-[border-color,transform] duration-150 hover:scale-[1.04] hover:border-white/20 active:scale-[0.95] motion-reduce:transform-none motion-reduce:hover:scale-100 motion-reduce:active:scale-100",onClick:()=>{if(rt.current){rt.current=!1;return}G(m=>!m)},onPointerDown:Gi,ref:st,type:"button",children:[o.jsx(ic,{size:30}),!g.loaded[g.active]&&o.jsx("span",{className:"absolute -right-0.5 -top-0.5 size-2 animate-pulse rounded-full bg-amber-400 motion-reduce:animate-none"})]})})]})]}),o.jsx(s2,{bottom:g.prefs.collapsed?12:cn+8,left:g.prefs.collapsed?60:12,onDismiss:g.dismissToast,toasts:g.toasts,width:(g.prefs.collapsed?320:g.prefs.width)-24}),ue!==null&&o.jsx("iframe",{"aria-hidden":!0,className:"pointer-events-none fixed border-0",onLoad:m=>Vi(ue,m.currentTarget),src:g.urlFor(ue),style:{height:800,left:-2400,top:0,width:1280},tabIndex:-1,title:"Off-stage duplicate scan"},ue),y?o.jsx(Dg,{mac:t1,onClose:Q}):null,j!==null?o.jsx(Tg,{busy:x,count:j.titles.length,error:j.error,fallbackFocusRef:h,name:j.titles.length===1?g.displayName(j.titles[0]??""):null,onCancel:et,onConfirm:()=>{ut()}}):null]})}function Do({children:c,title:s}){return o.jsxs("div",{className:"flex h-dvh flex-col items-center justify-center gap-3 bg-[#1C1C20] px-6 text-center antialiased",style:{fontFamily:"var(--font-satoshi)"},children:[o.jsx(ic,{size:22}),o.jsx("p",{className:"text-sm font-medium text-white",children:s}),o.jsx("div",{className:"max-w-md text-xs leading-relaxed text-[#84848C]",children:c})]})}function Og(){const[c,s]=z.useState({status:"loading"});return z.useEffect(()=>{let h=!1;const r=()=>fetch("/leglas/api/config").then(y=>{if(!y.ok)throw new Error(`the server answered ${y.status}`);return y.json()});r().then(y=>{h||s({status:"ready",config:y})}).catch(y=>{h||s({status:"failed",message:y instanceof Error?y.message:String(y)})});const d=setInterval(()=>{r().then(y=>{h||s(S=>S.status!=="ready"||JSON.stringify(S.config)===JSON.stringify(y)?S:{status:"ready",config:y})}).catch(()=>{})},3e3);return()=>{h=!0,clearInterval(d)}},[]),c.status==="loading"?o.jsx(Do,{title:"Starting Leglas…",children:null}):c.status==="failed"?o.jsxs(Do,{title:"Couldn’t reach the Leglas server",children:[c.message,". The interface is served by the same process that proxies your app, so this usually means it stopped."]}):c.config.errors.length>0?o.jsxs(Do,{title:"Your config needs fixing",children:[o.jsx("ul",{className:"space-y-1 text-left",children:c.config.errors.map(h=>o.jsx("li",{children:h},h))}),o.jsx("p",{className:"mt-3",children:"Fix it and restart Leglas."})]}):o.jsx(zg,{previews:c.config.previews,project:c.config.project})}const e1=document.getElementById("root");if(!e1)throw new Error("Leglas: #root is missing from the document.");hm.createRoot(e1).render(o.jsx(z.StrictMode,{children:o.jsx(Og,{})}));
|