leglas 0.7.2 → 0.7.4
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/dist/bin.js +172 -46
- package/dist/index.js +172 -46
- package/dist/shell/assets/index-CpYCCElH.css +1 -0
- package/dist/shell/assets/index-Ct9pp-D-.js +14 -0
- package/dist/shell/index.html +2 -2
- package/package.json +1 -1
- package/dist/shell/assets/index-DT33xxfg.css +0 -1
- package/dist/shell/assets/index-DbONqSbP.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 h of document.querySelectorAll('link[rel="modulepreload"]'))r(h);new MutationObserver(h=>{for(const g of h)if(g.type==="childList")for(const v of g.addedNodes)v.tagName==="LINK"&&v.rel==="modulepreload"&&r(v)}).observe(document,{childList:!0,subtree:!0});function f(h){const g={};return h.integrity&&(g.integrity=h.integrity),h.referrerPolicy&&(g.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?g.credentials="include":h.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function r(h){if(h.ep)return;h.ep=!0;const g=f(h);fetch(h.href,g)}})();var Wo={exports:{}},bu={};var P0;function Rm(){if(P0)return bu;P0=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function f(r,h,g){var v=null;if(g!==void 0&&(v=""+g),h.key!==void 0&&(v=""+h.key),"key"in h){g={};for(var C in h)C!=="key"&&(g[C]=h[C])}else g=h;return h=g.ref,{$$typeof:u,type:r,key:v,ref:h!==void 0?h:null,props:g}}return bu.Fragment=s,bu.jsx=f,bu.jsxs=f,bu}var e1;function _m(){return e1||(e1=1,Wo.exports=Rm()),Wo.exports}var o=_m(),Io={exports:{}},Ne={};var t1;function Lm(){if(t1)return Ne;t1=1;var u=Symbol.for("react.transitional.element"),s=Symbol.for("react.portal"),f=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),v=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),E=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),_=Symbol.for("react.lazy"),L=Symbol.for("react.activity"),B=Symbol.iterator;function Y(b){return b===null||typeof b!="object"?null:(b=B&&b[B]||b["@@iterator"],typeof b=="function"?b:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},te=Object.assign,se={};function V(b,U,F){this.props=b,this.context=U,this.refs=se,this.updater=F||R}V.prototype.isReactComponent={},V.prototype.setState=function(b,U){if(typeof b!="object"&&typeof b!="function"&&b!=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,b,U,"setState")},V.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function Q(){}Q.prototype=V.prototype;function W(b,U,F){this.props=b,this.context=U,this.refs=se,this.updater=F||R}var ie=W.prototype=new Q;ie.constructor=W,te(ie,V.prototype),ie.isPureReactComponent=!0;var ue=Array.isArray;function p(){}var I={H:null,A:null,T:null,S:null},fe=Object.prototype.hasOwnProperty;function me(b,U,F){var ne=F.ref;return{$$typeof:u,type:b,key:U,ref:ne!==void 0?ne:null,props:F}}function ge(b,U){return me(b.type,U,b.props)}function Ee(b){return typeof b=="object"&&b!==null&&b.$$typeof===u}function he(b){var U={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(F){return U[F]})}var qe=/\/+/g;function Ae(b,U){return typeof b=="object"&&b!==null&&b.key!=null?he(""+b.key):U.toString(36)}function ke(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(p,p):(b.status="pending",b.then(function(U){b.status==="pending"&&(b.status="fulfilled",b.value=U)},function(U){b.status==="pending"&&(b.status="rejected",b.reason=U)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function D(b,U,F,ne,oe){var ve=typeof b;(ve==="undefined"||ve==="boolean")&&(b=null);var k=!1;if(b===null)k=!0;else switch(ve){case"bigint":case"string":case"number":k=!0;break;case"object":switch(b.$$typeof){case u:case s:k=!0;break;case _:return k=b._init,D(k(b._payload),U,F,ne,oe)}}if(k)return oe=oe(b),k=ne===""?"."+Ae(b,0):ne,ue(oe)?(F="",k!=null&&(F=k.replace(qe,"$&/")+"/"),D(oe,U,F,"",function(ae){return ae})):oe!=null&&(Ee(oe)&&(oe=ge(oe,F+(oe.key==null||b&&b.key===oe.key?"":(""+oe.key).replace(qe,"$&/")+"/")+k)),U.push(oe)),1;k=0;var K=ne===""?".":ne+":";if(ue(b))for(var J=0;J<b.length;J++)ne=b[J],ve=K+Ae(ne,J),k+=D(ne,U,F,ve,oe);else if(J=Y(b),typeof J=="function")for(b=J.call(b),J=0;!(ne=b.next()).done;)ne=ne.value,ve=K+Ae(ne,J++),k+=D(ne,U,F,ve,oe);else if(ve==="object"){if(typeof b.then=="function")return D(ke(b),U,F,ne,oe);throw U=String(b),Error("Objects are not valid as a React child (found: "+(U==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":U)+"). If you meant to render a collection of children, use an array instead.")}return k}function Z(b,U,F){if(b==null)return b;var ne=[],oe=0;return D(b,ne,"","",function(ve){return U.call(F,ve,oe++)}),ne}function le(b){if(b._status===-1){var U=b._result;U=U(),U.then(function(F){(b._status===0||b._status===-1)&&(b._status=1,b._result=F)},function(F){(b._status===0||b._status===-1)&&(b._status=2,b._result=F)}),b._status===-1&&(b._status=0,b._result=U)}if(b._status===1)return b._result.default;throw b._result}var be=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var U=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(U))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},Me={map:Z,forEach:function(b,U,F){Z(b,function(){U.apply(this,arguments)},F)},count:function(b){var U=0;return Z(b,function(){U++}),U},toArray:function(b){return Z(b,function(U){return U})||[]},only:function(b){if(!Ee(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return Ne.Activity=L,Ne.Children=Me,Ne.Component=V,Ne.Fragment=f,Ne.Profiler=h,Ne.PureComponent=W,Ne.StrictMode=r,Ne.Suspense=E,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=I,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(b){return I.H.useMemoCache(b)}},Ne.cache=function(b){return function(){return b.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(b,U,F){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var ne=te({},b.props),oe=b.key;if(U!=null)for(ve in U.key!==void 0&&(oe=""+U.key),U)!fe.call(U,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&U.ref===void 0||(ne[ve]=U[ve]);var ve=arguments.length-2;if(ve===1)ne.children=F;else if(1<ve){for(var k=Array(ve),K=0;K<ve;K++)k[K]=arguments[K+2];ne.children=k}return me(b.type,oe,ne)},Ne.createContext=function(b){return b={$$typeof:v,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:g,_context:b},b},Ne.createElement=function(b,U,F){var ne,oe={},ve=null;if(U!=null)for(ne in U.key!==void 0&&(ve=""+U.key),U)fe.call(U,ne)&&ne!=="key"&&ne!=="__self"&&ne!=="__source"&&(oe[ne]=U[ne]);var k=arguments.length-2;if(k===1)oe.children=F;else if(1<k){for(var K=Array(k),J=0;J<k;J++)K[J]=arguments[J+2];oe.children=K}if(b&&b.defaultProps)for(ne in k=b.defaultProps,k)oe[ne]===void 0&&(oe[ne]=k[ne]);return me(b,ve,oe)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(b){return{$$typeof:C,render:b}},Ne.isValidElement=Ee,Ne.lazy=function(b){return{$$typeof:_,_payload:{_status:-1,_result:b},_init:le}},Ne.memo=function(b,U){return{$$typeof:x,type:b,compare:U===void 0?null:U}},Ne.startTransition=function(b){var U=I.T,F={};I.T=F;try{var ne=b(),oe=I.S;oe!==null&&oe(F,ne),typeof ne=="object"&&ne!==null&&typeof ne.then=="function"&&ne.then(p,be)}catch(ve){be(ve)}finally{U!==null&&F.types!==null&&(U.types=F.types),I.T=U}},Ne.unstable_useCacheRefresh=function(){return I.H.useCacheRefresh()},Ne.use=function(b){return I.H.use(b)},Ne.useActionState=function(b,U,F){return I.H.useActionState(b,U,F)},Ne.useCallback=function(b,U){return I.H.useCallback(b,U)},Ne.useContext=function(b){return I.H.useContext(b)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(b,U){return I.H.useDeferredValue(b,U)},Ne.useEffect=function(b,U){return I.H.useEffect(b,U)},Ne.useEffectEvent=function(b){return I.H.useEffectEvent(b)},Ne.useId=function(){return I.H.useId()},Ne.useImperativeHandle=function(b,U,F){return I.H.useImperativeHandle(b,U,F)},Ne.useInsertionEffect=function(b,U){return I.H.useInsertionEffect(b,U)},Ne.useLayoutEffect=function(b,U){return I.H.useLayoutEffect(b,U)},Ne.useMemo=function(b,U){return I.H.useMemo(b,U)},Ne.useOptimistic=function(b,U){return I.H.useOptimistic(b,U)},Ne.useReducer=function(b,U,F){return I.H.useReducer(b,U,F)},Ne.useRef=function(b){return I.H.useRef(b)},Ne.useState=function(b){return I.H.useState(b)},Ne.useSyncExternalStore=function(b,U,F){return I.H.useSyncExternalStore(b,U,F)},Ne.useTransition=function(){return I.H.useTransition()},Ne.version="19.2.8",Ne}var n1;function Sr(){return n1||(n1=1,Io.exports=Lm()),Io.exports}var M=Sr(),Po={exports:{}},xu={},er={exports:{}},tr={};var l1;function Um(){return l1||(l1=1,(function(u){function s(D,Z){var le=D.length;D.push(Z);e:for(;0<le;){var be=le-1>>>1,Me=D[be];if(0<h(Me,Z))D[be]=Z,D[le]=Me,le=be;else break e}}function f(D){return D.length===0?null:D[0]}function r(D){if(D.length===0)return null;var Z=D[0],le=D.pop();if(le!==Z){D[0]=le;e:for(var be=0,Me=D.length,b=Me>>>1;be<b;){var U=2*(be+1)-1,F=D[U],ne=U+1,oe=D[ne];if(0>h(F,le))ne<Me&&0>h(oe,F)?(D[be]=oe,D[ne]=le,be=ne):(D[be]=F,D[U]=le,be=U);else if(ne<Me&&0>h(oe,le))D[be]=oe,D[ne]=le,be=ne;else break e}}return Z}function h(D,Z){var le=D.sortIndex-Z.sortIndex;return le!==0?le:D.id-Z.id}if(u.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;u.unstable_now=function(){return g.now()}}else{var v=Date,C=v.now();u.unstable_now=function(){return v.now()-C}}var E=[],x=[],_=1,L=null,B=3,Y=!1,R=!1,te=!1,se=!1,V=typeof setTimeout=="function"?setTimeout:null,Q=typeof clearTimeout=="function"?clearTimeout:null,W=typeof setImmediate<"u"?setImmediate:null;function ie(D){for(var Z=f(x);Z!==null;){if(Z.callback===null)r(x);else if(Z.startTime<=D)r(x),Z.sortIndex=Z.expirationTime,s(E,Z);else break;Z=f(x)}}function ue(D){if(te=!1,ie(D),!R)if(f(E)!==null)R=!0,p||(p=!0,he());else{var Z=f(x);Z!==null&&ke(ue,Z.startTime-D)}}var p=!1,I=-1,fe=5,me=-1;function ge(){return se?!0:!(u.unstable_now()-me<fe)}function Ee(){if(se=!1,p){var D=u.unstable_now();me=D;var Z=!0;try{e:{R=!1,te&&(te=!1,Q(I),I=-1),Y=!0;var le=B;try{t:{for(ie(D),L=f(E);L!==null&&!(L.expirationTime>D&&ge());){var be=L.callback;if(typeof be=="function"){L.callback=null,B=L.priorityLevel;var Me=be(L.expirationTime<=D);if(D=u.unstable_now(),typeof Me=="function"){L.callback=Me,ie(D),Z=!0;break t}L===f(E)&&r(E),ie(D)}else r(E);L=f(E)}if(L!==null)Z=!0;else{var b=f(x);b!==null&&ke(ue,b.startTime-D),Z=!1}}break e}finally{L=null,B=le,Y=!1}Z=void 0}}finally{Z?he():p=!1}}}var he;if(typeof W=="function")he=function(){W(Ee)};else if(typeof MessageChannel<"u"){var qe=new MessageChannel,Ae=qe.port2;qe.port1.onmessage=Ee,he=function(){Ae.postMessage(null)}}else he=function(){V(Ee,0)};function ke(D,Z){I=V(function(){D(u.unstable_now())},Z)}u.unstable_IdlePriority=5,u.unstable_ImmediatePriority=1,u.unstable_LowPriority=4,u.unstable_NormalPriority=3,u.unstable_Profiling=null,u.unstable_UserBlockingPriority=2,u.unstable_cancelCallback=function(D){D.callback=null},u.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"):fe=0<D?Math.floor(1e3/D):5},u.unstable_getCurrentPriorityLevel=function(){return B},u.unstable_next=function(D){switch(B){case 1:case 2:case 3:var Z=3;break;default:Z=B}var le=B;B=Z;try{return D()}finally{B=le}},u.unstable_requestPaint=function(){se=!0},u.unstable_runWithPriority=function(D,Z){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var le=B;B=D;try{return Z()}finally{B=le}},u.unstable_scheduleCallback=function(D,Z,le){var be=u.unstable_now();switch(typeof le=="object"&&le!==null?(le=le.delay,le=typeof le=="number"&&0<le?be+le:be):le=be,D){case 1:var Me=-1;break;case 2:Me=250;break;case 5:Me=1073741823;break;case 4:Me=1e4;break;default:Me=5e3}return Me=le+Me,D={id:_++,callback:Z,priorityLevel:D,startTime:le,expirationTime:Me,sortIndex:-1},le>be?(D.sortIndex=le,s(x,D),f(E)===null&&D===f(x)&&(te?(Q(I),I=-1):te=!0,ke(ue,le-be))):(D.sortIndex=Me,s(E,D),R||Y||(R=!0,p||(p=!0,he()))),D},u.unstable_shouldYield=ge,u.unstable_wrapCallback=function(D){var Z=B;return function(){var le=B;B=Z;try{return D.apply(this,arguments)}finally{B=le}}}})(tr)),tr}var a1;function Bm(){return a1||(a1=1,er.exports=Um()),er.exports}var nr={exports:{}},Qt={};var i1;function km(){if(i1)return Qt;i1=1;var u=Sr();function s(E){var x="https://react.dev/errors/"+E;if(1<arguments.length){x+="?args[]="+encodeURIComponent(arguments[1]);for(var _=2;_<arguments.length;_++)x+="&args[]="+encodeURIComponent(arguments[_])}return"Minified React error #"+E+"; visit "+x+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function f(){}var r={d:{f,r:function(){throw Error(s(522))},D:f,C:f,L:f,m:f,X:f,S:f,M:f},p:0,findDOMNode:null},h=Symbol.for("react.portal");function g(E,x,_){var L=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:L==null?null:""+L,children:E,containerInfo:x,implementation:_}}var v=u.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function C(E,x){if(E==="font")return"";if(typeof x=="string")return x==="use-credentials"?x:""}return Qt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Qt.createPortal=function(E,x){var _=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 g(E,x,null,_)},Qt.flushSync=function(E){var x=v.T,_=r.p;try{if(v.T=null,r.p=2,E)return E()}finally{v.T=x,r.p=_,r.d.f()}},Qt.preconnect=function(E,x){typeof E=="string"&&(x?(x=x.crossOrigin,x=typeof x=="string"?x==="use-credentials"?x:"":void 0):x=null,r.d.C(E,x))},Qt.prefetchDNS=function(E){typeof E=="string"&&r.d.D(E)},Qt.preinit=function(E,x){if(typeof E=="string"&&x&&typeof x.as=="string"){var _=x.as,L=C(_,x.crossOrigin),B=typeof x.integrity=="string"?x.integrity:void 0,Y=typeof x.fetchPriority=="string"?x.fetchPriority:void 0;_==="style"?r.d.S(E,typeof x.precedence=="string"?x.precedence:void 0,{crossOrigin:L,integrity:B,fetchPriority:Y}):_==="script"&&r.d.X(E,{crossOrigin:L,integrity:B,fetchPriority:Y,nonce:typeof x.nonce=="string"?x.nonce:void 0})}},Qt.preinitModule=function(E,x){if(typeof E=="string")if(typeof x=="object"&&x!==null){if(x.as==null||x.as==="script"){var _=C(x.as,x.crossOrigin);r.d.M(E,{crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0,nonce:typeof x.nonce=="string"?x.nonce:void 0})}}else x==null&&r.d.M(E)},Qt.preload=function(E,x){if(typeof E=="string"&&typeof x=="object"&&x!==null&&typeof x.as=="string"){var _=x.as,L=C(_,x.crossOrigin);r.d.L(E,_,{crossOrigin:L,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})}},Qt.preloadModule=function(E,x){if(typeof E=="string")if(x){var _=C(x.as,x.crossOrigin);r.d.m(E,{as:typeof x.as=="string"&&x.as!=="script"?x.as:void 0,crossOrigin:_,integrity:typeof x.integrity=="string"?x.integrity:void 0})}else r.d.m(E)},Qt.requestFormReset=function(E){r.d.r(E)},Qt.unstable_batchedUpdates=function(E,x){return E(x)},Qt.useFormState=function(E,x,_){return v.H.useFormState(E,x,_)},Qt.useFormStatus=function(){return v.H.useHostTransitionStatus()},Qt.version="19.2.8",Qt}var u1;function Hm(){if(u1)return nr.exports;u1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),nr.exports=km(),nr.exports}var s1;function qm(){if(s1)return xu;s1=1;var u=Bm(),s=Sr(),f=Hm();function r(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function v(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function C(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function E(e){if(g(e)!==e)throw Error(r(188))}function x(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(r(188));return t!==e?null:e}for(var n=e,l=t;;){var a=n.return;if(a===null)break;var i=a.alternate;if(i===null){if(l=a.return,l!==null){n=l;continue}break}if(a.child===i.child){for(i=a.child;i;){if(i===n)return E(a),e;if(i===l)return E(a),t;i=i.sibling}throw Error(r(188))}if(n.return!==l.return)n=a,l=i;else{for(var c=!1,m=a.child;m;){if(m===n){c=!0,n=a,l=i;break}if(m===l){c=!0,l=a,n=i;break}m=m.sibling}if(!c){for(m=i.child;m;){if(m===n){c=!0,n=i,l=a;break}if(m===l){c=!0,l=i,n=a;break}m=m.sibling}if(!c)throw Error(r(189))}}if(n.alternate!==l)throw Error(r(190))}if(n.tag!==3)throw Error(r(188));return n.stateNode.current===n?e:t}function _(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=_(e),t!==null)return t;e=e.sibling}return null}var L=Object.assign,B=Symbol.for("react.element"),Y=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),se=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),W=Symbol.for("react.context"),ie=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),I=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),me=Symbol.for("react.activity"),ge=Symbol.for("react.memo_cache_sentinel"),Ee=Symbol.iterator;function he(e){return e===null||typeof e!="object"?null:(e=Ee&&e[Ee]||e["@@iterator"],typeof e=="function"?e:null)}var qe=Symbol.for("react.client.reference");function Ae(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===qe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case te:return"Fragment";case V:return"Profiler";case se:return"StrictMode";case ue:return"Suspense";case p:return"SuspenseList";case me:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case W:return e.displayName||"Context";case Q:return(e._context.displayName||"Context")+".Consumer";case ie:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case I:return t=e.displayName||null,t!==null?t:Ae(e.type)||"Memo";case fe:t=e._payload,e=e._init;try{return Ae(e(t))}catch{}}return null}var ke=Array.isArray,D=s.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=f.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,le={pending:!1,data:null,method:null,action:null},be=[],Me=-1;function b(e){return{current:e}}function U(e){0>Me||(e.current=be[Me],be[Me]=null,Me--)}function F(e,t){Me++,be[Me]=e.current,e.current=t}var ne=b(null),oe=b(null),ve=b(null),k=b(null);function K(e,t){switch(F(ve,t),F(oe,e),F(ne,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?E0(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=E0(t),e=w0(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}U(ne),F(ne,e)}function J(){U(ne),U(oe),U(ve)}function ae(e){e.memoizedState!==null&&F(k,e);var t=ne.current,n=w0(t,e.type);t!==n&&(F(oe,e),F(ne,n))}function Le(e){oe.current===e&&(U(ne),U(oe)),k.current===e&&(U(k),gu._currentValue=le)}var Ve,Xe;function $e(e){if(Ve===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ve=t&&t[1]||"",Xe=-1<n.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+Ve+e+Xe}var ze=!1;function Qe(e,t){if(!e||ze)return"";ze=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var l={DetermineComponentFrameRoot:function(){try{if(t){var X=function(){throw Error()};if(Object.defineProperty(X.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(X,[])}catch(z){var T=z}Reflect.construct(e,[],X)}else{try{X.call()}catch(z){T=z}e.call(X.prototype)}}else{try{throw Error()}catch(z){T=z}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(z){if(z&&T&&typeof z.stack=="string")return[z.stack,T.stack]}return[null,null]}};l.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(l.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(l.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=l.DetermineComponentFrameRoot(),c=i[0],m=i[1];if(c&&m){var y=c.split(`
|
|
4
|
+
`),N=m.split(`
|
|
5
|
+
`);for(a=l=0;l<y.length&&!y[l].includes("DetermineComponentFrameRoot");)l++;for(;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;if(l===y.length||a===N.length)for(l=y.length-1,a=N.length-1;1<=l&&0<=a&&y[l]!==N[a];)a--;for(;1<=l&&0<=a;l--,a--)if(y[l]!==N[a]){if(l!==1||a!==1)do if(l--,a--,0>a||y[l]!==N[a]){var H=`
|
|
6
|
+
`+y[l].replace(" at new "," at ");return e.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",e.displayName)),H}while(1<=l&&0<=a);break}}}finally{ze=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?$e(n):""}function nt(e,t){switch(e.tag){case 26:case 27:case 5:return $e(e.type);case 16:return $e("Lazy");case 13:return e.child!==t&&t!==null?$e("Suspense Fallback"):$e("Suspense");case 19:return $e("SuspenseList");case 0:case 15:return Qe(e.type,!1);case 11:return Qe(e.type.render,!1);case 1:return Qe(e.type,!0);case 31:return $e("Activity");default:return""}}function mt(e){try{var t="",n=null;do t+=nt(e,n),n=e,e=e.return;while(e);return t}catch(l){return`
|
|
7
|
+
Error generating stack: `+l.message+`
|
|
8
|
+
`+l.stack}}var Tt=Object.prototype.hasOwnProperty,nn=u.unstable_scheduleCallback,Ln=u.unstable_cancelCallback,Xn=u.unstable_shouldYield,Jl=u.unstable_requestPaint,gt=u.unstable_now,Fl=u.unstable_getCurrentPriorityLevel,Wl=u.unstable_ImmediatePriority,Ra=u.unstable_UserBlockingPriority,gl=u.unstable_NormalPriority,Il=u.unstable_LowPriority,pl=u.unstable_IdlePriority,Pl=u.log,xt=u.unstable_setDisableYieldValue,Zt=null,Rt=null;function Gt(e){if(typeof Pl=="function"&&xt(e),Rt&&typeof Rt.setStrictMode=="function")try{Rt.setStrictMode(Zt,e)}catch{}}var ft=Math.clz32?Math.clz32:Ei,ea=Math.log,yl=Math.LN2;function Ei(e){return e>>>=0,e===0?32:31-(ea(e)/yl|0)|0}var Vt=256,Qn=262144,jn=4194304;function O(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function P(e,t,n){var l=e.pendingLanes;if(l===0)return 0;var a=0,i=e.suspendedLanes,c=e.pingedLanes;e=e.warmLanes;var m=l&134217727;return m!==0?(l=m&~i,l!==0?a=O(l):(c&=m,c!==0?a=O(c):n||(n=m&~e,n!==0&&(a=O(n))))):(m=l&~i,m!==0?a=O(m):c!==0?a=O(c):n||(n=l&~e,n!==0&&(a=O(n)))),a===0?0:t!==0&&t!==a&&(t&i)===0&&(i=a&-a,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:a}function Ce(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Se(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 je(){var e=jn;return jn<<=1,(jn&62914560)===0&&(jn=4194304),e}function ot(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Ke(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function St(e,t,n,l,a,i){var c=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var m=e.entanglements,y=e.expirationTimes,N=e.hiddenUpdates;for(n=c&~n;0<n;){var H=31-ft(n),X=1<<H;m[H]=0,y[H]=-1;var T=N[H];if(T!==null)for(N[H]=null,H=0;H<T.length;H++){var z=T[H];z!==null&&(z.lane&=-536870913)}n&=~X}l!==0&&ut(e,l,0),i!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=i&~(c&~t))}function ut(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var l=31-ft(t);e.entangledLanes|=t,e.entanglements[l]=e.entanglements[l]|1073741824|n&261930}function vl(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var l=31-ft(n),a=1<<l;a&t|e[l]&t&&(e[l]|=t),n&=~a}}function Xt(e,t){var n=t&-t;return n=(n&42)!==0?1:Zn(n),(n&(e.suspendedLanes|t))!==0?0:n}function Zn(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ta(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Vn(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:V0(e.type))}function na(e,t){var n=Z.p;try{return Z.p=e,t()}finally{Z.p=n}}var An=Math.random().toString(36).slice(2),st="__reactFiber$"+An,Lt="__reactProps$"+An,Kn="__reactContainer$"+An,_a="__reactEvents$"+An,wu="__reactListeners$"+An,la="__reactHandles$"+An,wi="__reactResources$"+An,aa="__reactMarker$"+An;function Mi(e){delete e[st],delete e[Lt],delete e[_a],delete e[wu],delete e[la]}function bl(e){var t=e[st];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Kn]||n[st]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=D0(e);e!==null;){if(n=e[st])return n;e=D0(e)}return t}e=n,n=e.parentNode}return null}function $n(e){if(e=e[st]||e[Kn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function ia(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(r(33))}function Un(e){var t=e[wi];return t||(t=e[wi]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function We(e){e[aa]=!0}var Ci=new Set,Mu={};function Jn(e,t){Ut(e,t),Ut(e+"Capture",t)}function Ut(e,t){for(Mu[e]=t,e=0;e<t.length;e++)Ci.add(t[e])}var Cu=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]*$"),Fn={},ju={};function Nn(e){return Tt.call(ju,e)?!0:Tt.call(Fn,e)?!1:Cu.test(e)?ju[e]=!0:(Fn[e]=!0,!1)}function La(e,t,n){if(Nn(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var l=t.toLowerCase().slice(0,5);if(l!=="data-"&&l!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Ua(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function Tn(e,t,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+l)}}function Et(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Ba(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function ln(e,t,n){var l=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof l<"u"&&typeof l.get=="function"&&typeof l.set=="function"){var a=l.get,i=l.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(c){n=""+c,i.call(this,c)}}),Object.defineProperty(e,t,{enumerable:l.enumerable}),{getValue:function(){return n},setValue:function(c){n=""+c},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function xl(e){if(!e._valueTracker){var t=Ba(e)?"checked":"value";e._valueTracker=ln(e,t,""+e[t])}}function ji(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),l="";return e&&(l=Ba(e)?e.checked?"true":"false":e.value),e=l,e!==n?(t.setValue(e),!0):!1}function Sl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Qs=/[\n"\\]/g;function wt(e){return e.replace(Qs,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function rt(e,t,n,l,a,i,c,m){e.name="",c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"?e.type=c:e.removeAttribute("type"),t!=null?c==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Et(t)):e.value!==""+Et(t)&&(e.value=""+Et(t)):c!=="submit"&&c!=="reset"||e.removeAttribute("value"),t!=null?ua(e,c,Et(t)):n!=null?ua(e,c,Et(n)):l!=null&&e.removeAttribute("value"),a==null&&i!=null&&(e.defaultChecked=!!i),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?e.name=""+Et(m):e.removeAttribute("name")}function Ai(e,t,n,l,a,i,c,m){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){xl(e);return}n=n!=null?""+Et(n):"",t=t!=null?""+Et(t):n,m||t===e.value||(e.value=t),e.defaultValue=t}l=l??a,l=typeof l!="function"&&typeof l!="symbol"&&!!l,e.checked=m?e.checked:!!l,e.defaultChecked=!!l,c!=null&&typeof c!="function"&&typeof c!="symbol"&&typeof c!="boolean"&&(e.name=c),xl(e)}function ua(e,t,n){t==="number"&&Sl(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Jt(e,t,n,l){if(e=e.options,t){t={};for(var a=0;a<n.length;a++)t["$"+n[a]]=!0;for(n=0;n<e.length;n++)a=t.hasOwnProperty("$"+e[n].value),e[n].selected!==a&&(e[n].selected=a),a&&l&&(e[n].defaultSelected=!0)}else{for(n=""+Et(n),t=null,a=0;a<e.length;a++){if(e[a].value===n){e[a].selected=!0,l&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function ka(e,t,n){if(t!=null&&(t=""+Et(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Et(n):""}function Bt(e,t,n,l){if(t==null){if(l!=null){if(n!=null)throw Error(r(92));if(ke(l)){if(1<l.length)throw Error(r(93));l=l[0]}n=l}n==null&&(n=""),t=n}n=Et(t),e.defaultValue=n,l=e.textContent,l===n&&l!==""&&l!==null&&(e.value=l),xl(e)}function Bn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Zs=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 we(e,t,n){var l=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?l?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":l?e.setProperty(t,n):typeof n!="number"||n===0||Zs.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Au(e,t,n){if(t!=null&&typeof t!="object")throw Error(r(62));if(e=e.style,n!=null){for(var l in n)!n.hasOwnProperty(l)||t!=null&&t.hasOwnProperty(l)||(l.indexOf("--")===0?e.setProperty(l,""):l==="float"?e.cssFloat="":e[l]="");for(var a in t)l=t[a],t.hasOwnProperty(a)&&n[a]!==l&&we(e,a,l)}else for(var i in t)t.hasOwnProperty(i)&&we(e,i,t[i])}function Ha(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var qa=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"]]),Vs=/^[\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 sa(e){return Vs.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Dn(){}var Ni=null;function Ti(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var El=null,wl=null;function Di(e){var t=$n(e);if(t&&(e=t.stateNode)){var n=e[Lt]||null;e:switch(e=t.stateNode,t.type){case"input":if(rt(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+wt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var l=n[t];if(l!==e&&l.form===e.form){var a=l[Lt]||null;if(!a)throw Error(r(90));rt(l,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)l=n[t],l.form===e.form&&ji(l)}break e;case"textarea":ka(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Jt(e,!!n.multiple,t,!1)}}}var ca=!1;function Nu(e,t,n){if(ca)return e(t,n);ca=!0;try{var l=e(t);return l}finally{if(ca=!1,(El!==null||wl!==null)&&(gs(),El&&(t=El,e=wl,wl=El=null,Di(t),e)))for(t=0;t<e.length;t++)Di(e[t])}}function oa(e,t){var n=e.stateNode;if(n===null)return null;var l=n[Lt]||null;if(l===null)return null;n=l[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(l=!l.disabled)||(e=e.type,l=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!l;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(r(231,t,typeof n));return n}var an=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),zi=!1;if(an)try{var Ml={};Object.defineProperty(Ml,"passive",{get:function(){zi=!0}}),window.addEventListener("test",Ml,Ml),window.removeEventListener("test",Ml,Ml)}catch{zi=!1}var Ft=null,Oi=null,Ya=null;function Ri(){if(Ya)return Ya;var e,t=Oi,n=t.length,l,a="value"in Ft?Ft.value:Ft.textContent,i=a.length;for(e=0;e<n&&t[e]===a[e];e++);var c=n-e;for(l=1;l<=c&&t[n-l]===a[i-l];l++);return Ya=a.slice(e,1<l?1-l:void 0)}function Wn(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function ra(){return!0}function Tu(){return!1}function pt(e){function t(n,l,a,i,c){this._reactName=n,this._targetInst=a,this.type=l,this.nativeEvent=i,this.target=c,this.currentTarget=null;for(var m in e)e.hasOwnProperty(m)&&(n=e[m],this[m]=n?n(i):i[m]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?ra:Tu,this.isPropagationStopped=Tu,this}return L(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=ra)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=ra)},persist:function(){},isPersistent:ra}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ga=pt(In),fa=L({},In,{view:0,detail:0}),Ks=pt(fa),_i,Xa,da,kn=L({},fa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ui,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==da&&(da&&e.type==="mousemove"?(_i=e.screenX-da.screenX,Xa=e.screenY-da.screenY):Xa=_i=0,da=e),_i)},movementY:function(e){return"movementY"in e?e.movementY:Xa}}),mn=pt(kn),$s=L({},kn,{dataTransfer:0}),Qa=pt($s),Li=L({},fa,{relatedTarget:0}),ha=pt(Li),Du=L({},In,{animationName:0,elapsedTime:0,pseudoElement:0}),zu=pt(Du),Js=L({},In,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Fs=pt(Js),Ws=L({},In,{data:0}),Ou=pt(Ws),Ru={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Is={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"},Ps={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function ec(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ps[e])?!!t[e]:!1}function Ui(){return ec}var tc=L({},fa,{key:function(e){if(e.key){var t=Ru[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Wn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Is[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ui,charCode:function(e){return e.type==="keypress"?Wn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Wn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),d=pt(tc),j=L({},kn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),q=pt(j),$=L({},fa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ui}),ee=pt($),re=L({},In,{propertyName:0,elapsedTime:0,pseudoElement:0}),pe=pt(re),Oe=L({},kn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kt=pt(Oe),Dt=L({},In,{newState:0,oldState:0}),un=pt(Dt),Mt=[9,13,27,32],zn=an&&"CompositionEvent"in window,lt=null;an&&"documentMode"in document&&(lt=document.documentMode);var nc=an&&"TextEvent"in window&&!lt,Ar=an&&(!zn||lt&&8<lt&&11>=lt),Nr=" ",Tr=!1;function Dr(e,t){switch(e){case"keyup":return Mt.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function zr(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Za=!1;function lh(e,t){switch(e){case"compositionend":return zr(t);case"keypress":return t.which!==32?null:(Tr=!0,Nr);case"textInput":return e=t.data,e===Nr&&Tr?null:e;default:return null}}function ah(e,t){if(Za)return e==="compositionend"||!zn&&Dr(e,t)?(e=Ri(),Ya=Oi=Ft=null,Za=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ar&&t.locale!=="ko"?null:t.data;default:return null}}var ih={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 Or(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ih[e.type]:t==="textarea"}function Rr(e,t,n,l){El?wl?wl.push(l):wl=[l]:El=l,t=Es(t,"onChange"),0<t.length&&(n=new Ga("onChange","change",null,n,l),e.push({event:n,listeners:t}))}var Bi=null,ki=null;function uh(e){p0(e,0)}function _u(e){var t=ia(e);if(ji(t))return e}function _r(e,t){if(e==="change")return t}var Lr=!1;if(an){var lc;if(an){var ac="oninput"in document;if(!ac){var Ur=document.createElement("div");Ur.setAttribute("oninput","return;"),ac=typeof Ur.oninput=="function"}lc=ac}else lc=!1;Lr=lc&&(!document.documentMode||9<document.documentMode)}function Br(){Bi&&(Bi.detachEvent("onpropertychange",kr),ki=Bi=null)}function kr(e){if(e.propertyName==="value"&&_u(ki)){var t=[];Rr(t,ki,e,Ti(e)),Nu(uh,t)}}function sh(e,t,n){e==="focusin"?(Br(),Bi=t,ki=n,Bi.attachEvent("onpropertychange",kr)):e==="focusout"&&Br()}function ch(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return _u(ki)}function oh(e,t){if(e==="click")return _u(t)}function rh(e,t){if(e==="input"||e==="change")return _u(t)}function fh(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var sn=typeof Object.is=="function"?Object.is:fh;function Hi(e,t){if(sn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),l=Object.keys(t);if(n.length!==l.length)return!1;for(l=0;l<n.length;l++){var a=n[l];if(!Tt.call(t,a)||!sn(e[a],t[a]))return!1}return!0}function Hr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function qr(e,t){var n=Hr(e);e=0;for(var l;n;){if(n.nodeType===3){if(l=e+n.textContent.length,e<=t&&l>=t)return{node:n,offset:t-e};e=l}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Hr(n)}}function Yr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Yr(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Sl(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Sl(e.document)}return t}function ic(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var dh=an&&"documentMode"in document&&11>=document.documentMode,Va=null,uc=null,qi=null,sc=!1;function Xr(e,t,n){var l=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;sc||Va==null||Va!==Sl(l)||(l=Va,"selectionStart"in l&&ic(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),qi&&Hi(qi,l)||(qi=l,l=Es(uc,"onSelect"),0<l.length&&(t=new Ga("onSelect","select",null,t,n),e.push({event:t,listeners:l}),t.target=Va)))}function ma(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ka={animationend:ma("Animation","AnimationEnd"),animationiteration:ma("Animation","AnimationIteration"),animationstart:ma("Animation","AnimationStart"),transitionrun:ma("Transition","TransitionRun"),transitionstart:ma("Transition","TransitionStart"),transitioncancel:ma("Transition","TransitionCancel"),transitionend:ma("Transition","TransitionEnd")},cc={},Qr={};an&&(Qr=document.createElement("div").style,"AnimationEvent"in window||(delete Ka.animationend.animation,delete Ka.animationiteration.animation,delete Ka.animationstart.animation),"TransitionEvent"in window||delete Ka.transitionend.transition);function ga(e){if(cc[e])return cc[e];if(!Ka[e])return e;var t=Ka[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Qr)return cc[e]=t[n];return e}var Zr=ga("animationend"),Vr=ga("animationiteration"),Kr=ga("animationstart"),hh=ga("transitionrun"),mh=ga("transitionstart"),gh=ga("transitioncancel"),$r=ga("transitionend"),Jr=new Map,oc="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(" ");oc.push("scrollEnd");function On(e,t){Jr.set(e,t),Jn(t,[e])}var Lu=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},gn=[],$a=0,rc=0;function Uu(){for(var e=$a,t=rc=$a=0;t<e;){var n=gn[t];gn[t++]=null;var l=gn[t];gn[t++]=null;var a=gn[t];gn[t++]=null;var i=gn[t];if(gn[t++]=null,l!==null&&a!==null){var c=l.pending;c===null?a.next=a:(a.next=c.next,c.next=a),l.pending=a}i!==0&&Fr(n,a,i)}}function Bu(e,t,n,l){gn[$a++]=e,gn[$a++]=t,gn[$a++]=n,gn[$a++]=l,rc|=l,e.lanes|=l,e=e.alternate,e!==null&&(e.lanes|=l)}function fc(e,t,n,l){return Bu(e,t,n,l),ku(e)}function pa(e,t){return Bu(e,null,null,t),ku(e)}function Fr(e,t,n){e.lanes|=n;var l=e.alternate;l!==null&&(l.lanes|=n);for(var a=!1,i=e.return;i!==null;)i.childLanes|=n,l=i.alternate,l!==null&&(l.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(a=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,a&&t!==null&&(a=31-ft(n),e=i.hiddenUpdates,l=e[a],l===null?e[a]=[t]:l.push(t),t.lane=n|536870912),i):null}function ku(e){if(50<cu)throw cu=0,So=null,Error(r(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ja={};function ph(e,t,n,l){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=l,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cn(e,t,n,l){return new ph(e,t,n,l)}function dc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Pn(e,t){var n=e.alternate;return n===null?(n=cn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Wr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Hu(e,t,n,l,a,i){var c=0;if(l=e,typeof e=="function")dc(e)&&(c=1);else if(typeof e=="string")c=Sm(e,n,ne.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case me:return e=cn(31,n,t,a),e.elementType=me,e.lanes=i,e;case te:return ya(n.children,a,i,t);case se:c=8,a|=24;break;case V:return e=cn(12,n,t,a|2),e.elementType=V,e.lanes=i,e;case ue:return e=cn(13,n,t,a),e.elementType=ue,e.lanes=i,e;case p:return e=cn(19,n,t,a),e.elementType=p,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case W:c=10;break e;case Q:c=9;break e;case ie:c=11;break e;case I:c=14;break e;case fe:c=16,l=null;break e}c=29,n=Error(r(130,e===null?"null":typeof e,"")),l=null}return t=cn(c,n,t,a),t.elementType=e,t.type=l,t.lanes=i,t}function ya(e,t,n,l){return e=cn(7,e,l,t),e.lanes=n,e}function hc(e,t,n){return e=cn(6,e,null,t),e.lanes=n,e}function Ir(e){var t=cn(18,null,null,0);return t.stateNode=e,t}function mc(e,t,n){return t=cn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Pr=new WeakMap;function pn(e,t){if(typeof e=="object"&&e!==null){var n=Pr.get(e);return n!==void 0?n:(t={value:e,source:t,stack:mt(t)},Pr.set(e,t),t)}return{value:e,source:t,stack:mt(t)}}var Fa=[],Wa=0,qu=null,Yi=0,yn=[],vn=0,Cl=null,Hn=1,qn="";function el(e,t){Fa[Wa++]=Yi,Fa[Wa++]=qu,qu=e,Yi=t}function ef(e,t,n){yn[vn++]=Hn,yn[vn++]=qn,yn[vn++]=Cl,Cl=e;var l=Hn;e=qn;var a=32-ft(l)-1;l&=~(1<<a),n+=1;var i=32-ft(t)+a;if(30<i){var c=a-a%5;i=(l&(1<<c)-1).toString(32),l>>=c,a-=c,Hn=1<<32-ft(t)+a|n<<a|l,qn=i+e}else Hn=1<<i|n<<a|l,qn=e}function gc(e){e.return!==null&&(el(e,1),ef(e,1,0))}function pc(e){for(;e===qu;)qu=Fa[--Wa],Fa[Wa]=null,Yi=Fa[--Wa],Fa[Wa]=null;for(;e===Cl;)Cl=yn[--vn],yn[vn]=null,qn=yn[--vn],yn[vn]=null,Hn=yn[--vn],yn[vn]=null}function tf(e,t){yn[vn++]=Hn,yn[vn++]=qn,yn[vn++]=Cl,Hn=t.id,qn=t.overflow,Cl=e}var kt=null,at=null,He=!1,jl=null,bn=!1,yc=Error(r(519));function Al(e){var t=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Gi(pn(t,e)),yc}function nf(e){var t=e.stateNode,n=e.type,l=e.memoizedProps;switch(t[st]=e,t[Lt]=l,n){case"dialog":_e("cancel",t),_e("close",t);break;case"iframe":case"object":case"embed":_e("load",t);break;case"video":case"audio":for(n=0;n<ru.length;n++)_e(ru[n],t);break;case"source":_e("error",t);break;case"img":case"image":case"link":_e("error",t),_e("load",t);break;case"details":_e("toggle",t);break;case"input":_e("invalid",t),Ai(t,l.value,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name,!0);break;case"select":_e("invalid",t);break;case"textarea":_e("invalid",t),Bt(t,l.value,l.defaultValue,l.children)}n=l.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||l.suppressHydrationWarning===!0||x0(t.textContent,n)?(l.popover!=null&&(_e("beforetoggle",t),_e("toggle",t)),l.onScroll!=null&&_e("scroll",t),l.onScrollEnd!=null&&_e("scrollend",t),l.onClick!=null&&(t.onclick=Dn),t=!0):t=!1,t||Al(e,!0)}function lf(e){for(kt=e.return;kt;)switch(kt.tag){case 5:case 31:case 13:bn=!1;return;case 27:case 3:bn=!0;return;default:kt=kt.return}}function Ia(e){if(e!==kt)return!1;if(!He)return lf(e),He=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Uo(e.type,e.memoizedProps)),n=!n),n&&at&&Al(e),lf(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));at=T0(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(317));at=T0(e)}else t===27?(t=at,Yl(e.type)?(e=Yo,Yo=null,at=e):at=t):at=kt?Sn(e.stateNode.nextSibling):null;return!0}function va(){at=kt=null,He=!1}function vc(){var e=jl;return e!==null&&(en===null?en=e:en.push.apply(en,e),jl=null),e}function Gi(e){jl===null?jl=[e]:jl.push(e)}var bc=b(null),ba=null,tl=null;function Nl(e,t,n){F(bc,t._currentValue),t._currentValue=n}function nl(e){e._currentValue=bc.current,U(bc)}function xc(e,t,n){for(;e!==null;){var l=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,l!==null&&(l.childLanes|=t)):l!==null&&(l.childLanes&t)!==t&&(l.childLanes|=t),e===n)break;e=e.return}}function Sc(e,t,n,l){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var i=a.dependencies;if(i!==null){var c=a.child;i=i.firstContext;e:for(;i!==null;){var m=i;i=a;for(var y=0;y<t.length;y++)if(m.context===t[y]){i.lanes|=n,m=i.alternate,m!==null&&(m.lanes|=n),xc(i.return,n,e),l||(c=null);break e}i=m.next}}else if(a.tag===18){if(c=a.return,c===null)throw Error(r(341));c.lanes|=n,i=c.alternate,i!==null&&(i.lanes|=n),xc(c,n,e),c=null}else c=a.child;if(c!==null)c.return=a;else for(c=a;c!==null;){if(c===e){c=null;break}if(a=c.sibling,a!==null){a.return=c.return,c=a;break}c=c.return}a=c}}function Pa(e,t,n,l){e=null;for(var a=t,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 c=a.alternate;if(c===null)throw Error(r(387));if(c=c.memoizedProps,c!==null){var m=a.type;sn(a.pendingProps.value,c.value)||(e!==null?e.push(m):e=[m])}}else if(a===k.current){if(c=a.alternate,c===null)throw Error(r(387));c.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(gu):e=[gu])}a=a.return}e!==null&&Sc(t,e,n,l),t.flags|=262144}function Yu(e){for(e=e.firstContext;e!==null;){if(!sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){ba=e,tl=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return af(ba,e)}function Gu(e,t){return ba===null&&xa(e),af(e,t)}function af(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},tl===null){if(e===null)throw Error(r(308));tl=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else tl=tl.next=t;return n}var yh=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,l){e.push(l)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},vh=u.unstable_scheduleCallback,bh=u.unstable_NormalPriority,Ct={$$typeof:W,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ec(){return{controller:new yh,data:new Map,refCount:0}}function Xi(e){e.refCount--,e.refCount===0&&vh(bh,function(){e.controller.abort()})}var Qi=null,wc=0,ei=0,ti=null;function xh(e,t){if(Qi===null){var n=Qi=[];wc=0,ei=Ao(),ti={status:"pending",value:void 0,then:function(l){n.push(l)}}}return wc++,t.then(uf,uf),t}function uf(){if(--wc===0&&Qi!==null){ti!==null&&(ti.status="fulfilled");var e=Qi;Qi=null,ei=0,ti=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Sh(e,t){var n=[],l={status:"pending",value:null,reason:null,then:function(a){n.push(a)}};return e.then(function(){l.status="fulfilled",l.value=t;for(var a=0;a<n.length;a++)(0,n[a])(t)},function(a){for(l.status="rejected",l.reason=a,a=0;a<n.length;a++)(0,n[a])(void 0)}),l}var sf=D.S;D.S=function(e,t){Qd=gt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&xh(e,t),sf!==null&&sf(e,t)};var Sa=b(null);function Mc(){var e=Sa.current;return e!==null?e:tt.pooledCache}function Xu(e,t){t===null?F(Sa,Sa.current):F(Sa,t.pool)}function cf(){var e=Mc();return e===null?null:{parent:Ct._currentValue,pool:e}}var ni=Error(r(460)),Cc=Error(r(474)),Qu=Error(r(542)),Zu={then:function(){}};function of(e){return e=e.status,e==="fulfilled"||e==="rejected"}function rf(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Dn,Dn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,df(e),e;default:if(typeof t.status=="string")t.then(Dn,Dn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(r(482));e=t,e.status="pending",e.then(function(l){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=l}},function(l){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=l}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,df(e),e}throw wa=t,ni}}function Ea(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(wa=n,ni):n}}var wa=null;function ff(){if(wa===null)throw Error(r(459));var e=wa;return wa=null,e}function df(e){if(e===ni||e===Qu)throw Error(r(483))}var li=null,Zi=0;function Vu(e){var t=Zi;return Zi+=1,li===null&&(li=[]),rf(li,e,t)}function Vi(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ku(e,t){throw t.$$typeof===B?Error(r(525)):(e=Object.prototype.toString.call(t),Error(r(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function hf(e){function t(w,S){if(e){var A=w.deletions;A===null?(w.deletions=[S],w.flags|=16):A.push(S)}}function n(w,S){if(!e)return null;for(;S!==null;)t(w,S),S=S.sibling;return null}function l(w){for(var S=new Map;w!==null;)w.key!==null?S.set(w.key,w):S.set(w.index,w),w=w.sibling;return S}function a(w,S){return w=Pn(w,S),w.index=0,w.sibling=null,w}function i(w,S,A){return w.index=A,e?(A=w.alternate,A!==null?(A=A.index,A<S?(w.flags|=67108866,S):A):(w.flags|=67108866,S)):(w.flags|=1048576,S)}function c(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function m(w,S,A,G){return S===null||S.tag!==6?(S=hc(A,w.mode,G),S.return=w,S):(S=a(S,A),S.return=w,S)}function y(w,S,A,G){var ye=A.type;return ye===te?H(w,S,A.props.children,G,A.key):S!==null&&(S.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===fe&&Ea(ye)===S.type)?(S=a(S,A.props),Vi(S,A),S.return=w,S):(S=Hu(A.type,A.key,A.props,null,w.mode,G),Vi(S,A),S.return=w,S)}function N(w,S,A,G){return S===null||S.tag!==4||S.stateNode.containerInfo!==A.containerInfo||S.stateNode.implementation!==A.implementation?(S=mc(A,w.mode,G),S.return=w,S):(S=a(S,A.children||[]),S.return=w,S)}function H(w,S,A,G,ye){return S===null||S.tag!==7?(S=ya(A,w.mode,G,ye),S.return=w,S):(S=a(S,A),S.return=w,S)}function X(w,S,A){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return S=hc(""+S,w.mode,A),S.return=w,S;if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Y:return A=Hu(S.type,S.key,S.props,null,w.mode,A),Vi(A,S),A.return=w,A;case R:return S=mc(S,w.mode,A),S.return=w,S;case fe:return S=Ea(S),X(w,S,A)}if(ke(S)||he(S))return S=ya(S,w.mode,A,null),S.return=w,S;if(typeof S.then=="function")return X(w,Vu(S),A);if(S.$$typeof===W)return X(w,Gu(w,S),A);Ku(w,S)}return null}function T(w,S,A,G){var ye=S!==null?S.key:null;if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return ye!==null?null:m(w,S,""+A,G);if(typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:return A.key===ye?y(w,S,A,G):null;case R:return A.key===ye?N(w,S,A,G):null;case fe:return A=Ea(A),T(w,S,A,G)}if(ke(A)||he(A))return ye!==null?null:H(w,S,A,G,null);if(typeof A.then=="function")return T(w,S,Vu(A),G);if(A.$$typeof===W)return T(w,S,Gu(w,A),G);Ku(w,A)}return null}function z(w,S,A,G,ye){if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return w=w.get(A)||null,m(S,w,""+G,ye);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case Y:return w=w.get(G.key===null?A:G.key)||null,y(S,w,G,ye);case R:return w=w.get(G.key===null?A:G.key)||null,N(S,w,G,ye);case fe:return G=Ea(G),z(w,S,A,G,ye)}if(ke(G)||he(G))return w=w.get(A)||null,H(S,w,G,ye,null);if(typeof G.then=="function")return z(w,S,A,Vu(G),ye);if(G.$$typeof===W)return z(w,S,A,Gu(S,G),ye);Ku(S,G)}return null}function ce(w,S,A,G){for(var ye=null,Ye=null,de=S,De=S=0,Be=null;de!==null&&De<A.length;De++){de.index>De?(Be=de,de=null):Be=de.sibling;var Ge=T(w,de,A[De],G);if(Ge===null){de===null&&(de=Be);break}e&&de&&Ge.alternate===null&&t(w,de),S=i(Ge,S,De),Ye===null?ye=Ge:Ye.sibling=Ge,Ye=Ge,de=Be}if(De===A.length)return n(w,de),He&&el(w,De),ye;if(de===null){for(;De<A.length;De++)de=X(w,A[De],G),de!==null&&(S=i(de,S,De),Ye===null?ye=de:Ye.sibling=de,Ye=de);return He&&el(w,De),ye}for(de=l(de);De<A.length;De++)Be=z(de,w,De,A[De],G),Be!==null&&(e&&Be.alternate!==null&&de.delete(Be.key===null?De:Be.key),S=i(Be,S,De),Ye===null?ye=Be:Ye.sibling=Be,Ye=Be);return e&&de.forEach(function(Vl){return t(w,Vl)}),He&&el(w,De),ye}function xe(w,S,A,G){if(A==null)throw Error(r(151));for(var ye=null,Ye=null,de=S,De=S=0,Be=null,Ge=A.next();de!==null&&!Ge.done;De++,Ge=A.next()){de.index>De?(Be=de,de=null):Be=de.sibling;var Vl=T(w,de,Ge.value,G);if(Vl===null){de===null&&(de=Be);break}e&&de&&Vl.alternate===null&&t(w,de),S=i(Vl,S,De),Ye===null?ye=Vl:Ye.sibling=Vl,Ye=Vl,de=Be}if(Ge.done)return n(w,de),He&&el(w,De),ye;if(de===null){for(;!Ge.done;De++,Ge=A.next())Ge=X(w,Ge.value,G),Ge!==null&&(S=i(Ge,S,De),Ye===null?ye=Ge:Ye.sibling=Ge,Ye=Ge);return He&&el(w,De),ye}for(de=l(de);!Ge.done;De++,Ge=A.next())Ge=z(de,w,De,Ge.value,G),Ge!==null&&(e&&Ge.alternate!==null&&de.delete(Ge.key===null?De:Ge.key),S=i(Ge,S,De),Ye===null?ye=Ge:Ye.sibling=Ge,Ye=Ge);return e&&de.forEach(function(Om){return t(w,Om)}),He&&el(w,De),ye}function et(w,S,A,G){if(typeof A=="object"&&A!==null&&A.type===te&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Y:e:{for(var ye=A.key;S!==null;){if(S.key===ye){if(ye=A.type,ye===te){if(S.tag===7){n(w,S.sibling),G=a(S,A.props.children),G.return=w,w=G;break e}}else if(S.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===fe&&Ea(ye)===S.type){n(w,S.sibling),G=a(S,A.props),Vi(G,A),G.return=w,w=G;break e}n(w,S);break}else t(w,S);S=S.sibling}A.type===te?(G=ya(A.props.children,w.mode,G,A.key),G.return=w,w=G):(G=Hu(A.type,A.key,A.props,null,w.mode,G),Vi(G,A),G.return=w,w=G)}return c(w);case R:e:{for(ye=A.key;S!==null;){if(S.key===ye)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){n(w,S.sibling),G=a(S,A.children||[]),G.return=w,w=G;break e}else{n(w,S);break}else t(w,S);S=S.sibling}G=mc(A,w.mode,G),G.return=w,w=G}return c(w);case fe:return A=Ea(A),et(w,S,A,G)}if(ke(A))return ce(w,S,A,G);if(he(A)){if(ye=he(A),typeof ye!="function")throw Error(r(150));return A=ye.call(A),xe(w,S,A,G)}if(typeof A.then=="function")return et(w,S,Vu(A),G);if(A.$$typeof===W)return et(w,S,Gu(w,A),G);Ku(w,A)}return typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint"?(A=""+A,S!==null&&S.tag===6?(n(w,S.sibling),G=a(S,A),G.return=w,w=G):(n(w,S),G=hc(A,w.mode,G),G.return=w,w=G),c(w)):n(w,S)}return function(w,S,A,G){try{Zi=0;var ye=et(w,S,A,G);return li=null,ye}catch(de){if(de===ni||de===Qu)throw de;var Ye=cn(29,de,null,w.mode);return Ye.lanes=G,Ye.return=w,Ye}}}var Ma=hf(!0),mf=hf(!1),Tl=!1;function jc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ac(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Dl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function zl(e,t,n){var l=e.updateQueue;if(l===null)return null;if(l=l.shared,(Ze&2)!==0){var a=l.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),l.pending=t,t=ku(e),Fr(e,null,n),t}return Bu(e,l,t,n),ku(e)}function Ki(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,vl(e,n)}}function Nc(e,t){var n=e.updateQueue,l=e.alternate;if(l!==null&&(l=l.updateQueue,n===l)){var a=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var c={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?a=i=c:i=i.next=c,n=n.next}while(n!==null);i===null?a=i=t:i=i.next=t}else a=i=t;n={baseState:l.baseState,firstBaseUpdate:a,lastBaseUpdate:i,shared:l.shared,callbacks:l.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Tc=!1;function $i(){if(Tc){var e=ti;if(e!==null)throw e}}function Ji(e,t,n,l){Tc=!1;var a=e.updateQueue;Tl=!1;var i=a.firstBaseUpdate,c=a.lastBaseUpdate,m=a.shared.pending;if(m!==null){a.shared.pending=null;var y=m,N=y.next;y.next=null,c===null?i=N:c.next=N,c=y;var H=e.alternate;H!==null&&(H=H.updateQueue,m=H.lastBaseUpdate,m!==c&&(m===null?H.firstBaseUpdate=N:m.next=N,H.lastBaseUpdate=y))}if(i!==null){var X=a.baseState;c=0,H=N=y=null,m=i;do{var T=m.lane&-536870913,z=T!==m.lane;if(z?(Ue&T)===T:(l&T)===T){T!==0&&T===ei&&(Tc=!0),H!==null&&(H=H.next={lane:0,tag:m.tag,payload:m.payload,callback:null,next:null});e:{var ce=e,xe=m;T=t;var et=n;switch(xe.tag){case 1:if(ce=xe.payload,typeof ce=="function"){X=ce.call(et,X,T);break e}X=ce;break e;case 3:ce.flags=ce.flags&-65537|128;case 0:if(ce=xe.payload,T=typeof ce=="function"?ce.call(et,X,T):ce,T==null)break e;X=L({},X,T);break e;case 2:Tl=!0}}T=m.callback,T!==null&&(e.flags|=64,z&&(e.flags|=8192),z=a.callbacks,z===null?a.callbacks=[T]:z.push(T))}else z={lane:T,tag:m.tag,payload:m.payload,callback:m.callback,next:null},H===null?(N=H=z,y=X):H=H.next=z,c|=T;if(m=m.next,m===null){if(m=a.shared.pending,m===null)break;z=m,m=z.next,z.next=null,a.lastBaseUpdate=z,a.shared.pending=null}}while(!0);H===null&&(y=X),a.baseState=y,a.firstBaseUpdate=N,a.lastBaseUpdate=H,i===null&&(a.shared.lanes=0),Ul|=c,e.lanes=c,e.memoizedState=X}}function gf(e,t){if(typeof e!="function")throw Error(r(191,e));e.call(t)}function pf(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)gf(n[e],t)}var ai=b(null),$u=b(0);function yf(e,t){e=fl,F($u,e),F(ai,t),fl=e|t.baseLanes}function Dc(){F($u,fl),F(ai,ai.current)}function zc(){fl=$u.current,U(ai),U($u)}var on=b(null),xn=null;function Ol(e){var t=e.alternate;F(yt,yt.current&1),F(on,e),xn===null&&(t===null||ai.current!==null||t.memoizedState!==null)&&(xn=e)}function Oc(e){F(yt,yt.current),F(on,e),xn===null&&(xn=e)}function vf(e){e.tag===22?(F(yt,yt.current),F(on,e),xn===null&&(xn=e)):Rl()}function Rl(){F(yt,yt.current),F(on,on.current)}function rn(e){U(on),xn===e&&(xn=null),U(yt)}var yt=b(0);function Ju(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Ho(n)||qo(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ll=0,Te=null,Ie=null,jt=null,Fu=!1,ii=!1,Ca=!1,Wu=0,Fi=0,ui=null,Eh=0;function dt(){throw Error(r(321))}function Rc(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!sn(e[n],t[n]))return!1;return!0}function _c(e,t,n,l,a,i){return ll=i,Te=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,D.H=e===null||e.memoizedState===null?td:Jc,Ca=!1,i=n(l,a),Ca=!1,ii&&(i=xf(t,n,l,a)),bf(e),i}function bf(e){D.H=Pi;var t=Ie!==null&&Ie.next!==null;if(ll=0,jt=Ie=Te=null,Fu=!1,Fi=0,ui=null,t)throw Error(r(300));e===null||At||(e=e.dependencies,e!==null&&Yu(e)&&(At=!0))}function xf(e,t,n,l){Te=e;var a=0;do{if(ii&&(ui=null),Fi=0,ii=!1,25<=a)throw Error(r(301));if(a+=1,jt=Ie=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}D.H=nd,i=t(n,l)}while(ii);return i}function wh(){var e=D.H,t=e.useState()[0];return t=typeof t.then=="function"?Wi(t):t,e=e.useState()[0],(Ie!==null?Ie.memoizedState:null)!==e&&(Te.flags|=1024),t}function Lc(){var e=Wu!==0;return Wu=0,e}function Uc(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bc(e){if(Fu){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Fu=!1}ll=0,jt=Ie=Te=null,ii=!1,Fi=Wu=0,ui=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return jt===null?Te.memoizedState=jt=e:jt=jt.next=e,jt}function vt(){if(Ie===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Ie.next;var t=jt===null?Te.memoizedState:jt.next;if(t!==null)jt=t,Ie=e;else{if(e===null)throw Te.alternate===null?Error(r(467)):Error(r(310));Ie=e,e={memoizedState:Ie.memoizedState,baseState:Ie.baseState,baseQueue:Ie.baseQueue,queue:Ie.queue,next:null},jt===null?Te.memoizedState=jt=e:jt=jt.next=e}return jt}function Iu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wi(e){var t=Fi;return Fi+=1,ui===null&&(ui=[]),e=rf(ui,e,t),t=Te,(jt===null?t.memoizedState:jt.next)===null&&(t=t.alternate,D.H=t===null||t.memoizedState===null?td:Jc),e}function Pu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wi(e);if(e.$$typeof===W)return Ht(e)}throw Error(r(438,String(e)))}function kc(e){var t=null,n=Te.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var l=Te.alternate;l!==null&&(l=l.updateQueue,l!==null&&(l=l.memoCache,l!=null&&(t={data:l.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Iu(),Te.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),l=0;l<e;l++)n[l]=ge;return t.index++,n}function al(e,t){return typeof t=="function"?t(e):t}function es(e){var t=vt();return Hc(t,Ie,e)}function Hc(e,t,n){var l=e.queue;if(l===null)throw Error(r(311));l.lastRenderedReducer=n;var a=e.baseQueue,i=l.pending;if(i!==null){if(a!==null){var c=a.next;a.next=i.next,i.next=c}t.baseQueue=a=i,l.pending=null}if(i=e.baseState,a===null)e.memoizedState=i;else{t=a.next;var m=c=null,y=null,N=t,H=!1;do{var X=N.lane&-536870913;if(X!==N.lane?(Ue&X)===X:(ll&X)===X){var T=N.revertLane;if(T===0)y!==null&&(y=y.next={lane:0,revertLane:0,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null}),X===ei&&(H=!0);else if((ll&T)===T){N=N.next,T===ei&&(H=!0);continue}else X={lane:0,revertLane:N.revertLane,gesture:null,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(m=y=X,c=i):y=y.next=X,Te.lanes|=T,Ul|=T;X=N.action,Ca&&n(i,X),i=N.hasEagerState?N.eagerState:n(i,X)}else T={lane:X,revertLane:N.revertLane,gesture:N.gesture,action:N.action,hasEagerState:N.hasEagerState,eagerState:N.eagerState,next:null},y===null?(m=y=T,c=i):y=y.next=T,Te.lanes|=X,Ul|=X;N=N.next}while(N!==null&&N!==t);if(y===null?c=i:y.next=m,!sn(i,e.memoizedState)&&(At=!0,H&&(n=ti,n!==null)))throw n;e.memoizedState=i,e.baseState=c,e.baseQueue=y,l.lastRenderedState=i}return a===null&&(l.lanes=0),[e.memoizedState,l.dispatch]}function qc(e){var t=vt(),n=t.queue;if(n===null)throw Error(r(311));n.lastRenderedReducer=e;var l=n.dispatch,a=n.pending,i=t.memoizedState;if(a!==null){n.pending=null;var c=a=a.next;do i=e(i,c.action),c=c.next;while(c!==a);sn(i,t.memoizedState)||(At=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,l]}function Sf(e,t,n){var l=Te,a=vt(),i=He;if(i){if(n===void 0)throw Error(r(407));n=n()}else n=t();var c=!sn((Ie||a).memoizedState,n);if(c&&(a.memoizedState=n,At=!0),a=a.queue,Xc(Mf.bind(null,l,a,e),[e]),a.getSnapshot!==t||c||jt!==null&&jt.memoizedState.tag&1){if(l.flags|=2048,si(9,{destroy:void 0},wf.bind(null,l,a,n,t),null),tt===null)throw Error(r(349));i||(ll&127)!==0||Ef(l,t,n)}return n}function Ef(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Te.updateQueue,t===null?(t=Iu(),Te.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function wf(e,t,n,l){t.value=n,t.getSnapshot=l,Cf(t)&&jf(e)}function Mf(e,t,n){return n(function(){Cf(t)&&jf(e)})}function Cf(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!sn(e,n)}catch{return!0}}function jf(e){var t=pa(e,2);t!==null&&tn(t,e,2)}function Yc(e){var t=$t();if(typeof e=="function"){var n=e;if(e=n(),Ca){Gt(!0);try{n()}finally{Gt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:e},t}function Af(e,t,n,l){return e.baseState=n,Hc(e,Ie,typeof l=="function"?l:al)}function Mh(e,t,n,l,a){if(ls(e))throw Error(r(485));if(e=t.action,e!==null){var i={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(c){i.listeners.push(c)}};D.T!==null?n(!0):i.isTransition=!1,l(i),n=t.pending,n===null?(i.next=t.pending=i,Nf(t,i)):(i.next=n.next,t.pending=n.next=i)}}function Nf(e,t){var n=t.action,l=t.payload,a=e.state;if(t.isTransition){var i=D.T,c={};D.T=c;try{var m=n(a,l),y=D.S;y!==null&&y(c,m),Tf(e,t,m)}catch(N){Gc(e,t,N)}finally{i!==null&&c.types!==null&&(i.types=c.types),D.T=i}}else try{i=n(a,l),Tf(e,t,i)}catch(N){Gc(e,t,N)}}function Tf(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(l){Df(e,t,l)},function(l){return Gc(e,t,l)}):Df(e,t,n)}function Df(e,t,n){t.status="fulfilled",t.value=n,zf(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Nf(e,n)))}function Gc(e,t,n){var l=e.pending;if(e.pending=null,l!==null){l=l.next;do t.status="rejected",t.reason=n,zf(t),t=t.next;while(t!==l)}e.action=null}function zf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Of(e,t){return t}function Rf(e,t){if(He){var n=tt.formState;if(n!==null){e:{var l=Te;if(He){if(at){t:{for(var a=at,i=bn;a.nodeType!==8;){if(!i){a=null;break t}if(a=Sn(a.nextSibling),a===null){a=null;break t}}i=a.data,a=i==="F!"||i==="F"?a:null}if(a){at=Sn(a.nextSibling),l=a.data==="F!";break e}}Al(l)}l=!1}l&&(t=n[0])}}return n=$t(),n.memoizedState=n.baseState=t,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Of,lastRenderedState:t},n.queue=l,n=If.bind(null,Te,l),l.dispatch=n,l=Yc(!1),i=$c.bind(null,Te,!1,l.queue),l=$t(),a={state:t,dispatch:null,action:e,pending:null},l.queue=a,n=Mh.bind(null,Te,a,i,n),a.dispatch=n,l.memoizedState=e,[t,n,!1]}function _f(e){var t=vt();return Lf(t,Ie,e)}function Lf(e,t,n){if(t=Hc(e,t,Of)[0],e=es(al)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var l=Wi(t)}catch(c){throw c===ni?Qu:c}else l=t;t=vt();var a=t.queue,i=a.dispatch;return n!==t.memoizedState&&(Te.flags|=2048,si(9,{destroy:void 0},Ch.bind(null,a,n),null)),[l,i,e]}function Ch(e,t){e.action=t}function Uf(e){var t=vt(),n=Ie;if(n!==null)return Lf(t,n,e);vt(),t=t.memoizedState,n=vt();var l=n.queue.dispatch;return n.memoizedState=e,[t,l,!1]}function si(e,t,n,l){return e={tag:e,create:n,deps:l,inst:t,next:null},t=Te.updateQueue,t===null&&(t=Iu(),Te.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(l=n.next,n.next=e,e.next=l,t.lastEffect=e),e}function Bf(){return vt().memoizedState}function ts(e,t,n,l){var a=$t();Te.flags|=e,a.memoizedState=si(1|t,{destroy:void 0},n,l===void 0?null:l)}function ns(e,t,n,l){var a=vt();l=l===void 0?null:l;var i=a.memoizedState.inst;Ie!==null&&l!==null&&Rc(l,Ie.memoizedState.deps)?a.memoizedState=si(t,i,n,l):(Te.flags|=e,a.memoizedState=si(1|t,i,n,l))}function kf(e,t){ts(8390656,8,e,t)}function Xc(e,t){ns(2048,8,e,t)}function jh(e){Te.flags|=4;var t=Te.updateQueue;if(t===null)t=Iu(),Te.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Hf(e){var t=vt().memoizedState;return jh({ref:t,nextImpl:e}),function(){if((Ze&2)!==0)throw Error(r(440));return t.impl.apply(void 0,arguments)}}function qf(e,t){return ns(4,2,e,t)}function Yf(e,t){return ns(4,4,e,t)}function Gf(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Xf(e,t,n){n=n!=null?n.concat([e]):null,ns(4,4,Gf.bind(null,t,e),n)}function Qc(){}function Qf(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;return t!==null&&Rc(t,l[1])?l[0]:(n.memoizedState=[e,t],e)}function Zf(e,t){var n=vt();t=t===void 0?null:t;var l=n.memoizedState;if(t!==null&&Rc(t,l[1]))return l[0];if(l=e(),Ca){Gt(!0);try{e()}finally{Gt(!1)}}return n.memoizedState=[l,t],l}function Zc(e,t,n){return n===void 0||(ll&1073741824)!==0&&(Ue&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Vd(),Te.lanes|=e,Ul|=e,n)}function Vf(e,t,n,l){return sn(n,t)?n:ai.current!==null?(e=Zc(e,n,l),sn(e,t)||(At=!0),e):(ll&42)===0||(ll&1073741824)!==0&&(Ue&261930)===0?(At=!0,e.memoizedState=n):(e=Vd(),Te.lanes|=e,Ul|=e,t)}function Kf(e,t,n,l,a){var i=Z.p;Z.p=i!==0&&8>i?i:8;var c=D.T,m={};D.T=m,$c(e,!1,t,n);try{var y=a(),N=D.S;if(N!==null&&N(m,y),y!==null&&typeof y=="object"&&typeof y.then=="function"){var H=Sh(y,l);Ii(e,t,H,hn(e))}else Ii(e,t,l,hn(e))}catch(X){Ii(e,t,{then:function(){},status:"rejected",reason:X},hn())}finally{Z.p=i,c!==null&&m.types!==null&&(c.types=m.types),D.T=c}}function Ah(){}function Vc(e,t,n,l){if(e.tag!==5)throw Error(r(476));var a=$f(e).queue;Kf(e,a,t,le,n===null?Ah:function(){return Jf(e),n(l)})}function $f(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:le,baseState:le,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:le},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:al,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Jf(e){var t=$f(e);t.next===null&&(t=e.alternate.memoizedState),Ii(e,t.next.queue,{},hn())}function Kc(){return Ht(gu)}function Ff(){return vt().memoizedState}function Wf(){return vt().memoizedState}function Nh(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=hn();e=Dl(n);var l=zl(t,e,n);l!==null&&(tn(l,t,n),Ki(l,t,n)),t={cache:Ec()},e.payload=t;return}t=t.return}}function Th(e,t,n){var l=hn();n={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},ls(e)?Pf(t,n):(n=fc(e,t,n,l),n!==null&&(tn(n,e,l),ed(n,t,l)))}function If(e,t,n){var l=hn();Ii(e,t,n,l)}function Ii(e,t,n,l){var a={lane:l,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(ls(e))Pf(t,a);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var c=t.lastRenderedState,m=i(c,n);if(a.hasEagerState=!0,a.eagerState=m,sn(m,c))return Bu(e,t,a,0),tt===null&&Uu(),!1}catch{}if(n=fc(e,t,a,l),n!==null)return tn(n,e,l),ed(n,t,l),!0}return!1}function $c(e,t,n,l){if(l={lane:2,revertLane:Ao(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ls(e)){if(t)throw Error(r(479))}else t=fc(e,n,l,2),t!==null&&tn(t,e,2)}function ls(e){var t=e.alternate;return e===Te||t!==null&&t===Te}function Pf(e,t){ii=Fu=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ed(e,t,n){if((n&4194048)!==0){var l=t.lanes;l&=e.pendingLanes,n|=l,t.lanes=n,vl(e,n)}}var Pi={readContext:Ht,use:Pu,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};Pi.useEffectEvent=dt;var td={readContext:Ht,use:Pu,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:kf,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,ts(4194308,4,Gf.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ts(4194308,4,e,t)},useInsertionEffect:function(e,t){ts(4,2,e,t)},useMemo:function(e,t){var n=$t();t=t===void 0?null:t;var l=e();if(Ca){Gt(!0);try{e()}finally{Gt(!1)}}return n.memoizedState=[l,t],l},useReducer:function(e,t,n){var l=$t();if(n!==void 0){var a=n(t);if(Ca){Gt(!0);try{n(t)}finally{Gt(!1)}}}else a=t;return l.memoizedState=l.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},l.queue=e,e=e.dispatch=Th.bind(null,Te,e),[l.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=Yc(e);var t=e.queue,n=If.bind(null,Te,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Qc,useDeferredValue:function(e,t){var n=$t();return Zc(n,e,t)},useTransition:function(){var e=Yc(!1);return e=Kf.bind(null,Te,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var l=Te,a=$t();if(He){if(n===void 0)throw Error(r(407));n=n()}else{if(n=t(),tt===null)throw Error(r(349));(Ue&127)!==0||Ef(l,t,n)}a.memoizedState=n;var i={value:n,getSnapshot:t};return a.queue=i,kf(Mf.bind(null,l,i,e),[e]),l.flags|=2048,si(9,{destroy:void 0},wf.bind(null,l,i,n,t),null),n},useId:function(){var e=$t(),t=tt.identifierPrefix;if(He){var n=qn,l=Hn;n=(l&~(1<<32-ft(l)-1)).toString(32)+n,t="_"+t+"R_"+n,n=Wu++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Eh++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Kc,useFormState:Rf,useActionState:Rf,useOptimistic:function(e){var t=$t();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=$c.bind(null,Te,!0,n),n.dispatch=t,[e,t]},useMemoCache:kc,useCacheRefresh:function(){return $t().memoizedState=Nh.bind(null,Te)},useEffectEvent:function(e){var t=$t(),n={impl:e};return t.memoizedState=n,function(){if((Ze&2)!==0)throw Error(r(440));return n.impl.apply(void 0,arguments)}}},Jc={readContext:Ht,use:Pu,useCallback:Qf,useContext:Ht,useEffect:Xc,useImperativeHandle:Xf,useInsertionEffect:qf,useLayoutEffect:Yf,useMemo:Zf,useReducer:es,useRef:Bf,useState:function(){return es(al)},useDebugValue:Qc,useDeferredValue:function(e,t){var n=vt();return Vf(n,Ie.memoizedState,e,t)},useTransition:function(){var e=es(al)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Sf,useId:Ff,useHostTransitionStatus:Kc,useFormState:_f,useActionState:_f,useOptimistic:function(e,t){var n=vt();return Af(n,Ie,e,t)},useMemoCache:kc,useCacheRefresh:Wf};Jc.useEffectEvent=Hf;var nd={readContext:Ht,use:Pu,useCallback:Qf,useContext:Ht,useEffect:Xc,useImperativeHandle:Xf,useInsertionEffect:qf,useLayoutEffect:Yf,useMemo:Zf,useReducer:qc,useRef:Bf,useState:function(){return qc(al)},useDebugValue:Qc,useDeferredValue:function(e,t){var n=vt();return Ie===null?Zc(n,e,t):Vf(n,Ie.memoizedState,e,t)},useTransition:function(){var e=qc(al)[0],t=vt().memoizedState;return[typeof e=="boolean"?e:Wi(e),t]},useSyncExternalStore:Sf,useId:Ff,useHostTransitionStatus:Kc,useFormState:Uf,useActionState:Uf,useOptimistic:function(e,t){var n=vt();return Ie!==null?Af(n,Ie,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:kc,useCacheRefresh:Wf};nd.useEffectEvent=Hf;function Fc(e,t,n,l){t=e.memoizedState,n=n(l,t),n=n==null?t:L({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Wc={enqueueSetState:function(e,t,n){e=e._reactInternals;var l=hn(),a=Dl(l);a.payload=t,n!=null&&(a.callback=n),t=zl(e,a,l),t!==null&&(tn(t,e,l),Ki(t,e,l))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var l=hn(),a=Dl(l);a.tag=1,a.payload=t,n!=null&&(a.callback=n),t=zl(e,a,l),t!==null&&(tn(t,e,l),Ki(t,e,l))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=hn(),l=Dl(n);l.tag=2,t!=null&&(l.callback=t),t=zl(e,l,n),t!==null&&(tn(t,e,n),Ki(t,e,n))}};function ld(e,t,n,l,a,i,c){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(l,i,c):t.prototype&&t.prototype.isPureReactComponent?!Hi(n,l)||!Hi(a,i):!0}function ad(e,t,n,l){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,l),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,l),t.state!==e&&Wc.enqueueReplaceState(t,t.state,null)}function ja(e,t){var n=t;if("ref"in t){n={};for(var l in t)l!=="ref"&&(n[l]=t[l])}if(e=e.defaultProps){n===t&&(n=L({},n));for(var a in e)n[a]===void 0&&(n[a]=e[a])}return n}function id(e){Lu(e)}function ud(e){console.error(e)}function sd(e){Lu(e)}function as(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(l){setTimeout(function(){throw l})}}function cd(e,t,n){try{var l=e.onCaughtError;l(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function Ic(e,t,n){return n=Dl(n),n.tag=3,n.payload={element:null},n.callback=function(){as(e,t)},n}function od(e){return e=Dl(e),e.tag=3,e}function rd(e,t,n,l){var a=n.type.getDerivedStateFromError;if(typeof a=="function"){var i=l.value;e.payload=function(){return a(i)},e.callback=function(){cd(t,n,l)}}var c=n.stateNode;c!==null&&typeof c.componentDidCatch=="function"&&(e.callback=function(){cd(t,n,l),typeof a!="function"&&(Bl===null?Bl=new Set([this]):Bl.add(this));var m=l.stack;this.componentDidCatch(l.value,{componentStack:m!==null?m:""})})}function Dh(e,t,n,l,a){if(n.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){if(t=n.alternate,t!==null&&Pa(t,n,a,!0),n=on.current,n!==null){switch(n.tag){case 31:case 13:return xn===null?ps():n.alternate===null&&ht===0&&(ht=3),n.flags&=-257,n.flags|=65536,n.lanes=a,l===Zu?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([l]):t.add(l),Mo(e,l,a)),!1;case 22:return n.flags|=65536,l===Zu?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([l])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([l]):n.add(l)),Mo(e,l,a)),!1}throw Error(r(435,n.tag))}return Mo(e,l,a),ps(),!1}if(He)return t=on.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,l!==yc&&(e=Error(r(422),{cause:l}),Gi(pn(e,n)))):(l!==yc&&(t=Error(r(423),{cause:l}),Gi(pn(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,l=pn(l,n),a=Ic(e.stateNode,l,a),Nc(e,a),ht!==4&&(ht=2)),!1;var i=Error(r(520),{cause:l});if(i=pn(i,n),su===null?su=[i]:su.push(i),ht!==4&&(ht=2),t===null)return!0;l=pn(l,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ic(n.stateNode,l,e),Nc(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(Bl===null||!Bl.has(i))))return n.flags|=65536,a&=-a,n.lanes|=a,a=od(a),rd(a,e,n,l),Nc(n,a),!1}n=n.return}while(n!==null);return!1}var Pc=Error(r(461)),At=!1;function qt(e,t,n,l){t.child=e===null?mf(t,null,n,l):Ma(t,e.child,n,l)}function fd(e,t,n,l,a){n=n.render;var i=t.ref;if("ref"in l){var c={};for(var m in l)m!=="ref"&&(c[m]=l[m])}else c=l;return xa(t),l=_c(e,t,n,c,i,a),m=Lc(),e!==null&&!At?(Uc(e,t,a),il(e,t,a)):(He&&m&&gc(t),t.flags|=1,qt(e,t,l,a),t.child)}function dd(e,t,n,l,a){if(e===null){var i=n.type;return typeof i=="function"&&!dc(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,hd(e,t,i,l,a)):(e=Hu(n.type,null,l,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!so(e,a)){var c=i.memoizedProps;if(n=n.compare,n=n!==null?n:Hi,n(c,l)&&e.ref===t.ref)return il(e,t,a)}return t.flags|=1,e=Pn(i,l),e.ref=t.ref,e.return=t,t.child=e}function hd(e,t,n,l,a){if(e!==null){var i=e.memoizedProps;if(Hi(i,l)&&e.ref===t.ref)if(At=!1,t.pendingProps=l=i,so(e,a))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,il(e,t,a)}return eo(e,t,n,l,a)}function md(e,t,n,l){var a=l.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|n:n,e!==null){for(l=t.child=e.child,a=0;l!==null;)a=a|l.lanes|l.childLanes,l=l.sibling;l=a&~i}else l=0,t.child=null;return gd(e,t,i,n,l)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Xu(t,i!==null?i.cachePool:null),i!==null?yf(t,i):Dc(),vf(t);else return l=t.lanes=536870912,gd(e,t,i!==null?i.baseLanes|n:n,n,l)}else i!==null?(Xu(t,i.cachePool),yf(t,i),Rl(),t.memoizedState=null):(e!==null&&Xu(t,null),Dc(),Rl());return qt(e,t,a,n),t.child}function eu(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function gd(e,t,n,l,a){var i=Mc();return i=i===null?null:{parent:Ct._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&Xu(t,null),Dc(),vf(t),e!==null&&Pa(e,t,l,!0),t.childLanes=a,null}function is(e,t){return t=ss({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function pd(e,t,n){return Ma(t,e.child,null,n),e=is(t,t.pendingProps),e.flags|=2,rn(t),t.memoizedState=null,e}function zh(e,t,n){var l=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(He){if(l.mode==="hidden")return e=is(t,l),t.lanes=536870912,eu(null,e);if(Oc(t),(e=at)?(e=N0(e,bn),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cl!==null?{id:Hn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},n=Ir(e),n.return=t,t.child=n,kt=t,at=null)):e=null,e===null)throw Al(t);return t.lanes=536870912,null}return is(t,l)}var i=e.memoizedState;if(i!==null){var c=i.dehydrated;if(Oc(t),a)if(t.flags&256)t.flags&=-257,t=pd(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(r(558));else if(At||Pa(e,t,n,!1),a=(n&e.childLanes)!==0,At||a){if(l=tt,l!==null&&(c=Xt(l,n),c!==0&&c!==i.retryLane))throw i.retryLane=c,pa(e,c),tn(l,e,c),Pc;ps(),t=pd(e,t,n)}else e=i.treeContext,at=Sn(c.nextSibling),kt=t,He=!0,jl=null,bn=!1,e!==null&&tf(t,e),t=is(t,l),t.flags|=4096;return t}return e=Pn(e.child,{mode:l.mode,children:l.children}),e.ref=t.ref,t.child=e,e.return=t,e}function us(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(r(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function eo(e,t,n,l,a){return xa(t),n=_c(e,t,n,l,void 0,a),l=Lc(),e!==null&&!At?(Uc(e,t,a),il(e,t,a)):(He&&l&&gc(t),t.flags|=1,qt(e,t,n,a),t.child)}function yd(e,t,n,l,a,i){return xa(t),t.updateQueue=null,n=xf(t,l,n,a),bf(e),l=Lc(),e!==null&&!At?(Uc(e,t,i),il(e,t,i)):(He&&l&&gc(t),t.flags|=1,qt(e,t,n,i),t.child)}function vd(e,t,n,l,a){if(xa(t),t.stateNode===null){var i=Ja,c=n.contextType;typeof c=="object"&&c!==null&&(i=Ht(c)),i=new n(l,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Wc,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=l,i.state=t.memoizedState,i.refs={},jc(t),c=n.contextType,i.context=typeof c=="object"&&c!==null?Ht(c):Ja,i.state=t.memoizedState,c=n.getDerivedStateFromProps,typeof c=="function"&&(Fc(t,n,c,l),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(c=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),c!==i.state&&Wc.enqueueReplaceState(i,i.state,null),Ji(t,l,i,a),$i(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!0}else if(e===null){i=t.stateNode;var m=t.memoizedProps,y=ja(n,m);i.props=y;var N=i.context,H=n.contextType;c=Ja,typeof H=="object"&&H!==null&&(c=Ht(H));var X=n.getDerivedStateFromProps;H=typeof X=="function"||typeof i.getSnapshotBeforeUpdate=="function",m=t.pendingProps!==m,H||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m||N!==c)&&ad(t,i,l,c),Tl=!1;var T=t.memoizedState;i.state=T,Ji(t,l,i,a),$i(),N=t.memoizedState,m||T!==N||Tl?(typeof X=="function"&&(Fc(t,n,X,l),N=t.memoizedState),(y=Tl||ld(t,n,y,l,T,N,c))?(H||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"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=l,t.memoizedState=N),i.props=l,i.state=N,i.context=c,l=y):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),l=!1)}else{i=t.stateNode,Ac(e,t),c=t.memoizedProps,H=ja(n,c),i.props=H,X=t.pendingProps,T=i.context,N=n.contextType,y=Ja,typeof N=="object"&&N!==null&&(y=Ht(N)),m=n.getDerivedStateFromProps,(N=typeof m=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(c!==X||T!==y)&&ad(t,i,l,y),Tl=!1,T=t.memoizedState,i.state=T,Ji(t,l,i,a),$i();var z=t.memoizedState;c!==X||T!==z||Tl||e!==null&&e.dependencies!==null&&Yu(e.dependencies)?(typeof m=="function"&&(Fc(t,n,m,l),z=t.memoizedState),(H=Tl||ld(t,n,H,l,T,z,y)||e!==null&&e.dependencies!==null&&Yu(e.dependencies))?(N||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(l,z,y),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(l,z,y)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),t.memoizedProps=l,t.memoizedState=z),i.props=l,i.state=z,i.context=y,l=H):(typeof i.componentDidUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||c===e.memoizedProps&&T===e.memoizedState||(t.flags|=1024),l=!1)}return i=l,us(e,t),l=(t.flags&128)!==0,i||l?(i=t.stateNode,n=l&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&l?(t.child=Ma(t,e.child,null,a),t.child=Ma(t,null,n,a)):qt(e,t,n,a),t.memoizedState=i.state,e=t.child):e=il(e,t,a),e}function bd(e,t,n,l){return va(),t.flags|=256,qt(e,t,n,l),t.child}var to={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function no(e){return{baseLanes:e,cachePool:cf()}}function lo(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=dn),e}function xd(e,t,n){var l=t.pendingProps,a=!1,i=(t.flags&128)!==0,c;if((c=i)||(c=e!==null&&e.memoizedState===null?!1:(yt.current&2)!==0),c&&(a=!0,t.flags&=-129),c=(t.flags&32)!==0,t.flags&=-33,e===null){if(He){if(a?Ol(t):Rl(),(e=at)?(e=N0(e,bn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Cl!==null?{id:Hn,overflow:qn}:null,retryLane:536870912,hydrationErrors:null},n=Ir(e),n.return=t,t.child=n,kt=t,at=null)):e=null,e===null)throw Al(t);return qo(e)?t.lanes=32:t.lanes=536870912,null}var m=l.children;return l=l.fallback,a?(Rl(),a=t.mode,m=ss({mode:"hidden",children:m},a),l=ya(l,a,n,null),m.return=t,l.return=t,m.sibling=l,t.child=m,l=t.child,l.memoizedState=no(n),l.childLanes=lo(e,c,n),t.memoizedState=to,eu(null,l)):(Ol(t),ao(t,m))}var y=e.memoizedState;if(y!==null&&(m=y.dehydrated,m!==null)){if(i)t.flags&256?(Ol(t),t.flags&=-257,t=io(e,t,n)):t.memoizedState!==null?(Rl(),t.child=e.child,t.flags|=128,t=null):(Rl(),m=l.fallback,a=t.mode,l=ss({mode:"visible",children:l.children},a),m=ya(m,a,n,null),m.flags|=2,l.return=t,m.return=t,l.sibling=m,t.child=l,Ma(t,e.child,null,n),l=t.child,l.memoizedState=no(n),l.childLanes=lo(e,c,n),t.memoizedState=to,t=eu(null,l));else if(Ol(t),qo(m)){if(c=m.nextSibling&&m.nextSibling.dataset,c)var N=c.dgst;c=N,l=Error(r(419)),l.stack="",l.digest=c,Gi({value:l,source:null,stack:null}),t=io(e,t,n)}else if(At||Pa(e,t,n,!1),c=(n&e.childLanes)!==0,At||c){if(c=tt,c!==null&&(l=Xt(c,n),l!==0&&l!==y.retryLane))throw y.retryLane=l,pa(e,l),tn(c,e,l),Pc;Ho(m)||ps(),t=io(e,t,n)}else Ho(m)?(t.flags|=192,t.child=e.child,t=null):(e=y.treeContext,at=Sn(m.nextSibling),kt=t,He=!0,jl=null,bn=!1,e!==null&&tf(t,e),t=ao(t,l.children),t.flags|=4096);return t}return a?(Rl(),m=l.fallback,a=t.mode,y=e.child,N=y.sibling,l=Pn(y,{mode:"hidden",children:l.children}),l.subtreeFlags=y.subtreeFlags&65011712,N!==null?m=Pn(N,m):(m=ya(m,a,n,null),m.flags|=2),m.return=t,l.return=t,l.sibling=m,t.child=l,eu(null,l),l=t.child,m=e.child.memoizedState,m===null?m=no(n):(a=m.cachePool,a!==null?(y=Ct._currentValue,a=a.parent!==y?{parent:y,pool:y}:a):a=cf(),m={baseLanes:m.baseLanes|n,cachePool:a}),l.memoizedState=m,l.childLanes=lo(e,c,n),t.memoizedState=to,eu(e.child,l)):(Ol(t),n=e.child,e=n.sibling,n=Pn(n,{mode:"visible",children:l.children}),n.return=t,n.sibling=null,e!==null&&(c=t.deletions,c===null?(t.deletions=[e],t.flags|=16):c.push(e)),t.child=n,t.memoizedState=null,n)}function ao(e,t){return t=ss({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function ss(e,t){return e=cn(22,e,null,t),e.lanes=0,e}function io(e,t,n){return Ma(t,e.child,null,n),e=ao(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Sd(e,t,n){e.lanes|=t;var l=e.alternate;l!==null&&(l.lanes|=t),xc(e.return,t,n)}function uo(e,t,n,l,a,i){var c=e.memoizedState;c===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:l,tail:n,tailMode:a,treeForkCount:i}:(c.isBackwards=t,c.rendering=null,c.renderingStartTime=0,c.last=l,c.tail=n,c.tailMode=a,c.treeForkCount=i)}function Ed(e,t,n){var l=t.pendingProps,a=l.revealOrder,i=l.tail;l=l.children;var c=yt.current,m=(c&2)!==0;if(m?(c=c&1|2,t.flags|=128):c&=1,F(yt,c),qt(e,t,l,n),l=He?Yi:0,!m&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sd(e,n,t);else if(e.tag===19)Sd(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(a){case"forwards":for(n=t.child,a=null;n!==null;)e=n.alternate,e!==null&&Ju(e)===null&&(a=n),n=n.sibling;n=a,n===null?(a=t.child,t.child=null):(a=n.sibling,n.sibling=null),uo(t,!1,a,n,i,l);break;case"backwards":case"unstable_legacy-backwards":for(n=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Ju(e)===null){t.child=a;break}e=a.sibling,a.sibling=n,n=a,a=e}uo(t,!0,n,null,i,l);break;case"together":uo(t,!1,null,null,void 0,l);break;default:t.memoizedState=null}return t.child}function il(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Ul|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Pa(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(r(153));if(t.child!==null){for(e=t.child,n=Pn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Pn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function so(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Yu(e)))}function Oh(e,t,n){switch(t.tag){case 3:K(t,t.stateNode.containerInfo),Nl(t,Ct,e.memoizedState.cache),va();break;case 27:case 5:ae(t);break;case 4:K(t,t.stateNode.containerInfo);break;case 10:Nl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Oc(t),null;break;case 13:var l=t.memoizedState;if(l!==null)return l.dehydrated!==null?(Ol(t),t.flags|=128,null):(n&t.child.childLanes)!==0?xd(e,t,n):(Ol(t),e=il(e,t,n),e!==null?e.sibling:null);Ol(t);break;case 19:var a=(e.flags&128)!==0;if(l=(n&t.childLanes)!==0,l||(Pa(e,t,n,!1),l=(n&t.childLanes)!==0),a){if(l)return Ed(e,t,n);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),F(yt,yt.current),l)break;return null;case 22:return t.lanes=0,md(e,t,n,t.pendingProps);case 24:Nl(t,Ct,e.memoizedState.cache)}return il(e,t,n)}function wd(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!so(e,n)&&(t.flags&128)===0)return At=!1,Oh(e,t,n);At=(e.flags&131072)!==0}else At=!1,He&&(t.flags&1048576)!==0&&ef(t,Yi,t.index);switch(t.lanes=0,t.tag){case 16:e:{var l=t.pendingProps;if(e=Ea(t.elementType),t.type=e,typeof e=="function")dc(e)?(l=ja(e,l),t.tag=1,t=vd(null,t,e,l,n)):(t.tag=0,t=eo(null,t,e,l,n));else{if(e!=null){var a=e.$$typeof;if(a===ie){t.tag=11,t=fd(null,t,e,l,n);break e}else if(a===I){t.tag=14,t=dd(null,t,e,l,n);break e}}throw t=Ae(e)||e,Error(r(306,t,""))}}return t;case 0:return eo(e,t,t.type,t.pendingProps,n);case 1:return l=t.type,a=ja(l,t.pendingProps),vd(e,t,l,a,n);case 3:e:{if(K(t,t.stateNode.containerInfo),e===null)throw Error(r(387));l=t.pendingProps;var i=t.memoizedState;a=i.element,Ac(e,t),Ji(t,l,null,n);var c=t.memoizedState;if(l=c.cache,Nl(t,Ct,l),l!==i.cache&&Sc(t,[Ct],n,!0),$i(),l=c.element,i.isDehydrated)if(i={element:l,isDehydrated:!1,cache:c.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=bd(e,t,l,n);break e}else if(l!==a){a=pn(Error(r(424)),t),Gi(a),t=bd(e,t,l,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,at=Sn(e.firstChild),kt=t,He=!0,jl=null,bn=!0,n=mf(t,null,l,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(va(),l===a){t=il(e,t,n);break e}qt(e,t,l,n)}t=t.child}return t;case 26:return us(e,t),e===null?(n=_0(t.type,null,t.pendingProps,null))?t.memoizedState=n:He||(n=t.type,e=t.pendingProps,l=ws(ve.current).createElement(n),l[st]=t,l[Lt]=e,Yt(l,n,e),We(l),t.stateNode=l):t.memoizedState=_0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&He&&(l=t.stateNode=z0(t.type,t.pendingProps,ve.current),kt=t,bn=!0,a=at,Yl(t.type)?(Yo=a,at=Sn(l.firstChild)):at=a),qt(e,t,t.pendingProps.children,n),us(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&He&&((a=l=at)&&(l=cm(l,t.type,t.pendingProps,bn),l!==null?(t.stateNode=l,kt=t,at=Sn(l.firstChild),bn=!1,a=!0):a=!1),a||Al(t)),ae(t),a=t.type,i=t.pendingProps,c=e!==null?e.memoizedProps:null,l=i.children,Uo(a,i)?l=null:c!==null&&Uo(a,c)&&(t.flags|=32),t.memoizedState!==null&&(a=_c(e,t,wh,null,null,n),gu._currentValue=a),us(e,t),qt(e,t,l,n),t.child;case 6:return e===null&&He&&((e=n=at)&&(n=om(n,t.pendingProps,bn),n!==null?(t.stateNode=n,kt=t,at=null,e=!0):e=!1),e||Al(t)),null;case 13:return xd(e,t,n);case 4:return K(t,t.stateNode.containerInfo),l=t.pendingProps,e===null?t.child=Ma(t,null,l,n):qt(e,t,l,n),t.child;case 11:return fd(e,t,t.type,t.pendingProps,n);case 7:return qt(e,t,t.pendingProps,n),t.child;case 8:return qt(e,t,t.pendingProps.children,n),t.child;case 12:return qt(e,t,t.pendingProps.children,n),t.child;case 10:return l=t.pendingProps,Nl(t,t.type,l.value),qt(e,t,l.children,n),t.child;case 9:return a=t.type._context,l=t.pendingProps.children,xa(t),a=Ht(a),l=l(a),t.flags|=1,qt(e,t,l,n),t.child;case 14:return dd(e,t,t.type,t.pendingProps,n);case 15:return hd(e,t,t.type,t.pendingProps,n);case 19:return Ed(e,t,n);case 31:return zh(e,t,n);case 22:return md(e,t,n,t.pendingProps);case 24:return xa(t),l=Ht(Ct),e===null?(a=Mc(),a===null&&(a=tt,i=Ec(),a.pooledCache=i,i.refCount++,i!==null&&(a.pooledCacheLanes|=n),a=i),t.memoizedState={parent:l,cache:a},jc(t),Nl(t,Ct,a)):((e.lanes&n)!==0&&(Ac(e,t),Ji(t,null,null,n),$i()),a=e.memoizedState,i=t.memoizedState,a.parent!==l?(a={parent:l,cache:l},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),Nl(t,Ct,l)):(l=i.cache,Nl(t,Ct,l),l!==a.cache&&Sc(t,[Ct],n,!0))),qt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(r(156,t.tag))}function ul(e){e.flags|=4}function co(e,t,n,l,a){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(a&335544128)===a)if(e.stateNode.complete)e.flags|=8192;else if(Fd())e.flags|=8192;else throw wa=Zu,Cc}else e.flags&=-16777217}function Md(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!H0(t))if(Fd())e.flags|=8192;else throw wa=Zu,Cc}function cs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?je():536870912,e.lanes|=t,fi|=t)}function tu(e,t){if(!He)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:l.sibling=null}}function it(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,l=0;if(t)for(var a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags&65011712,l|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)n|=a.lanes|a.childLanes,l|=a.subtreeFlags,l|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=l,e.childLanes=n,t}function Rh(e,t,n){var l=t.pendingProps;switch(pc(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return it(t),null;case 1:return it(t),null;case 3:return n=t.stateNode,l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),nl(Ct),J(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Ia(t)?ul(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vc())),it(t),null;case 26:var a=t.type,i=t.memoizedState;return e===null?(ul(t),i!==null?(it(t),Md(t,i)):(it(t),co(t,a,null,l,n))):i?i!==e.memoizedState?(ul(t),it(t),Md(t,i)):(it(t),t.flags&=-16777217):(e=e.memoizedProps,e!==l&&ul(t),it(t),co(t,a,e,l,n)),null;case 27:if(Le(t),n=ve.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ul(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return it(t),null}e=ne.current,Ia(t)?nf(t):(e=z0(a,l,n),t.stateNode=e,ul(t))}return it(t),null;case 5:if(Le(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==l&&ul(t);else{if(!l){if(t.stateNode===null)throw Error(r(166));return it(t),null}if(i=ne.current,Ia(t))nf(t);else{var c=ws(ve.current);switch(i){case 1:i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":i=c.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":i=c.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":i=c.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof l.is=="string"?c.createElement("select",{is:l.is}):c.createElement("select"),l.multiple?i.multiple=!0:l.size&&(i.size=l.size);break;default:i=typeof l.is=="string"?c.createElement(a,{is:l.is}):c.createElement(a)}}i[st]=t,i[Lt]=l;e:for(c=t.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.tag!==27&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===t)break e;for(;c.sibling===null;){if(c.return===null||c.return===t)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}t.stateNode=i;e:switch(Yt(i,a,l),a){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&ul(t)}}return it(t),co(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==l&&ul(t);else{if(typeof l!="string"&&t.stateNode===null)throw Error(r(166));if(e=ve.current,Ia(t)){if(e=t.stateNode,n=t.memoizedProps,l=null,a=kt,a!==null)switch(a.tag){case 27:case 5:l=a.memoizedProps}e[st]=t,e=!!(e.nodeValue===n||l!==null&&l.suppressHydrationWarning===!0||x0(e.nodeValue,n)),e||Al(t,!0)}else e=ws(e).createTextNode(l),e[st]=t,t.stateNode=e}return it(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(l=Ia(t),n!==null){if(e===null){if(!l)throw Error(r(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(r(557));e[st]=t}else va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),e=!1}else n=vc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(rn(t),t):(rn(t),null);if((t.flags&128)!==0)throw Error(r(558))}return it(t),null;case 13:if(l=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=Ia(t),l!==null&&l.dehydrated!==null){if(e===null){if(!a)throw Error(r(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(r(317));a[st]=t}else va(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;it(t),a=!1}else a=vc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(rn(t),t):(rn(t),null)}return rn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=l!==null,e=e!==null&&e.memoizedState!==null,n&&(l=t.child,a=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(a=l.alternate.memoizedState.cachePool.pool),i=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(i=l.memoizedState.cachePool.pool),i!==a&&(l.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),cs(t,t.updateQueue),it(t),null);case 4:return J(),e===null&&zo(t.stateNode.containerInfo),it(t),null;case 10:return nl(t.type),it(t),null;case 19:if(U(yt),l=t.memoizedState,l===null)return it(t),null;if(a=(t.flags&128)!==0,i=l.rendering,i===null)if(a)tu(l,!1);else{if(ht!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Ju(e),i!==null){for(t.flags|=128,tu(l,!1),e=i.updateQueue,t.updateQueue=e,cs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Wr(n,e),n=n.sibling;return F(yt,yt.current&1|2),He&&el(t,l.treeForkCount),t.child}e=e.sibling}l.tail!==null&>()>hs&&(t.flags|=128,a=!0,tu(l,!1),t.lanes=4194304)}else{if(!a)if(e=Ju(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,cs(t,e),tu(l,!0),l.tail===null&&l.tailMode==="hidden"&&!i.alternate&&!He)return it(t),null}else 2*gt()-l.renderingStartTime>hs&&n!==536870912&&(t.flags|=128,a=!0,tu(l,!1),t.lanes=4194304);l.isBackwards?(i.sibling=t.child,t.child=i):(e=l.last,e!==null?e.sibling=i:t.child=i,l.last=i)}return l.tail!==null?(e=l.tail,l.rendering=e,l.tail=e.sibling,l.renderingStartTime=gt(),e.sibling=null,n=yt.current,F(yt,a?n&1|2:n&1),He&&el(t,l.treeForkCount),e):(it(t),null);case 22:case 23:return rn(t),zc(),l=t.memoizedState!==null,e!==null?e.memoizedState!==null!==l&&(t.flags|=8192):l&&(t.flags|=8192),l?(n&536870912)!==0&&(t.flags&128)===0&&(it(t),t.subtreeFlags&6&&(t.flags|=8192)):it(t),n=t.updateQueue,n!==null&&cs(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),l=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(l=t.memoizedState.cachePool.pool),l!==n&&(t.flags|=2048),e!==null&&U(Sa),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),nl(Ct),it(t),null;case 25:return null;case 30:return null}throw Error(r(156,t.tag))}function _h(e,t){switch(pc(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return nl(Ct),J(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Le(t),null;case 31:if(t.memoizedState!==null){if(rn(t),t.alternate===null)throw Error(r(340));va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(rn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(r(340));va()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return U(yt),null;case 4:return J(),null;case 10:return nl(t.type),null;case 22:case 23:return rn(t),zc(),e!==null&&U(Sa),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return nl(Ct),null;case 25:return null;default:return null}}function Cd(e,t){switch(pc(t),t.tag){case 3:nl(Ct),J();break;case 26:case 27:case 5:Le(t);break;case 4:J();break;case 31:t.memoizedState!==null&&rn(t);break;case 13:rn(t);break;case 19:U(yt);break;case 10:nl(t.type);break;case 22:case 23:rn(t),zc(),e!==null&&U(Sa);break;case 24:nl(Ct)}}function nu(e,t){try{var n=t.updateQueue,l=n!==null?n.lastEffect:null;if(l!==null){var a=l.next;n=a;do{if((n.tag&e)===e){l=void 0;var i=n.create,c=n.inst;l=i(),c.destroy=l}n=n.next}while(n!==a)}}catch(m){Fe(t,t.return,m)}}function _l(e,t,n){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var i=a.next;l=i;do{if((l.tag&e)===e){var c=l.inst,m=c.destroy;if(m!==void 0){c.destroy=void 0,a=t;var y=n,N=m;try{N()}catch(H){Fe(a,y,H)}}}l=l.next}while(l!==i)}}catch(H){Fe(t,t.return,H)}}function jd(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{pf(t,n)}catch(l){Fe(e,e.return,l)}}}function Ad(e,t,n){n.props=ja(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(l){Fe(e,t,l)}}function lu(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var l=e.stateNode;break;case 30:l=e.stateNode;break;default:l=e.stateNode}typeof n=="function"?e.refCleanup=n(l):n.current=l}}catch(a){Fe(e,t,a)}}function Yn(e,t){var n=e.ref,l=e.refCleanup;if(n!==null)if(typeof l=="function")try{l()}catch(a){Fe(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(a){Fe(e,t,a)}else n.current=null}function Nd(e){var t=e.type,n=e.memoizedProps,l=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&l.focus();break e;case"img":n.src?l.src=n.src:n.srcSet&&(l.srcset=n.srcSet)}}catch(a){Fe(e,e.return,a)}}function oo(e,t,n){try{var l=e.stateNode;nm(l,e.type,n,t),l[Lt]=t}catch(a){Fe(e,e.return,a)}}function Td(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Yl(e.type)||e.tag===4}function ro(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Td(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Yl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fo(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Dn));else if(l!==4&&(l===27&&Yl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(fo(e,t,n),e=e.sibling;e!==null;)fo(e,t,n),e=e.sibling}function os(e,t,n){var l=e.tag;if(l===5||l===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(l!==4&&(l===27&&Yl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(os(e,t,n),e=e.sibling;e!==null;)os(e,t,n),e=e.sibling}function Dd(e){var t=e.stateNode,n=e.memoizedProps;try{for(var l=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);Yt(t,l,n),t[st]=e,t[Lt]=n}catch(i){Fe(e,e.return,i)}}var sl=!1,Nt=!1,ho=!1,zd=typeof WeakSet=="function"?WeakSet:Set,_t=null;function Lh(e,t){if(e=e.containerInfo,_o=Ds,e=Gr(e),ic(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var l=n.getSelection&&n.getSelection();if(l&&l.rangeCount!==0){n=l.anchorNode;var a=l.anchorOffset,i=l.focusNode;l=l.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var c=0,m=-1,y=-1,N=0,H=0,X=e,T=null;t:for(;;){for(var z;X!==n||a!==0&&X.nodeType!==3||(m=c+a),X!==i||l!==0&&X.nodeType!==3||(y=c+l),X.nodeType===3&&(c+=X.nodeValue.length),(z=X.firstChild)!==null;)T=X,X=z;for(;;){if(X===e)break t;if(T===n&&++N===a&&(m=c),T===i&&++H===l&&(y=c),(z=X.nextSibling)!==null)break;X=T,T=X.parentNode}X=z}n=m===-1||y===-1?null:{start:m,end:y}}else n=null}n=n||{start:0,end:0}}else n=null;for(Lo={focusedElem:e,selectionRange:n},Ds=!1,_t=t;_t!==null;)if(t=_t,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,_t=e;else for(;_t!==null;){switch(t=_t,i=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)a=e[n],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,a=i.memoizedProps,i=i.memoizedState,l=n.stateNode;try{var ce=ja(n.type,a);e=l.getSnapshotBeforeUpdate(ce,i),l.__reactInternalSnapshotBeforeUpdate=e}catch(xe){Fe(n,n.return,xe)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)ko(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ko(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(r(163))}if(e=t.sibling,e!==null){e.return=t.return,_t=e;break}_t=t.return}}function Od(e,t,n){var l=n.flags;switch(n.tag){case 0:case 11:case 15:ol(e,n),l&4&&nu(5,n);break;case 1:if(ol(e,n),l&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(c){Fe(n,n.return,c)}else{var a=ja(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(c){Fe(n,n.return,c)}}l&64&&jd(n),l&512&&lu(n,n.return);break;case 3:if(ol(e,n),l&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{pf(e,t)}catch(c){Fe(n,n.return,c)}}break;case 27:t===null&&l&4&&Dd(n);case 26:case 5:ol(e,n),t===null&&l&4&&Nd(n),l&512&&lu(n,n.return);break;case 12:ol(e,n);break;case 31:ol(e,n),l&4&&Ld(e,n);break;case 13:ol(e,n),l&4&&Ud(e,n),l&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=Qh.bind(null,n),rm(e,n))));break;case 22:if(l=n.memoizedState!==null||sl,!l){t=t!==null&&t.memoizedState!==null||Nt,a=sl;var i=Nt;sl=l,(Nt=t)&&!i?rl(e,n,(n.subtreeFlags&8772)!==0):ol(e,n),sl=a,Nt=i}break;case 30:break;default:ol(e,n)}}function Rd(e){var t=e.alternate;t!==null&&(e.alternate=null,Rd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Mi(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var ct=null,Wt=!1;function cl(e,t,n){for(n=n.child;n!==null;)_d(e,t,n),n=n.sibling}function _d(e,t,n){if(Rt&&typeof Rt.onCommitFiberUnmount=="function")try{Rt.onCommitFiberUnmount(Zt,n)}catch{}switch(n.tag){case 26:Nt||Yn(n,t),cl(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:Nt||Yn(n,t);var l=ct,a=Wt;Yl(n.type)&&(ct=n.stateNode,Wt=!1),cl(e,t,n),du(n.stateNode),ct=l,Wt=a;break;case 5:Nt||Yn(n,t);case 6:if(l=ct,a=Wt,ct=null,cl(e,t,n),ct=l,Wt=a,ct!==null)if(Wt)try{(ct.nodeType===9?ct.body:ct.nodeName==="HTML"?ct.ownerDocument.body:ct).removeChild(n.stateNode)}catch(i){Fe(n,t,i)}else try{ct.removeChild(n.stateNode)}catch(i){Fe(n,t,i)}break;case 18:ct!==null&&(Wt?(e=ct,j0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),bi(e)):j0(ct,n.stateNode));break;case 4:l=ct,a=Wt,ct=n.stateNode.containerInfo,Wt=!0,cl(e,t,n),ct=l,Wt=a;break;case 0:case 11:case 14:case 15:_l(2,n,t),Nt||_l(4,n,t),cl(e,t,n);break;case 1:Nt||(Yn(n,t),l=n.stateNode,typeof l.componentWillUnmount=="function"&&Ad(n,t,l)),cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:Nt=(l=Nt)||n.memoizedState!==null,cl(e,t,n),Nt=l;break;default:cl(e,t,n)}}function Ld(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{bi(e)}catch(n){Fe(t,t.return,n)}}}function Ud(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{bi(e)}catch(n){Fe(t,t.return,n)}}function Uh(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zd),t;default:throw Error(r(435,e.tag))}}function rs(e,t){var n=Uh(e);t.forEach(function(l){if(!n.has(l)){n.add(l);var a=Zh.bind(null,e,l);l.then(a,a)}})}function It(e,t){var n=t.deletions;if(n!==null)for(var l=0;l<n.length;l++){var a=n[l],i=e,c=t,m=c;e:for(;m!==null;){switch(m.tag){case 27:if(Yl(m.type)){ct=m.stateNode,Wt=!1;break e}break;case 5:ct=m.stateNode,Wt=!1;break e;case 3:case 4:ct=m.stateNode.containerInfo,Wt=!0;break e}m=m.return}if(ct===null)throw Error(r(160));_d(i,c,a),ct=null,Wt=!1,i=a.alternate,i!==null&&(i.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Bd(t,e),t=t.sibling}var Rn=null;function Bd(e,t){var n=e.alternate,l=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:It(t,e),Pt(e),l&4&&(_l(3,e,e.return),nu(3,e),_l(5,e,e.return));break;case 1:It(t,e),Pt(e),l&512&&(Nt||n===null||Yn(n,n.return)),l&64&&sl&&(e=e.updateQueue,e!==null&&(l=e.callbacks,l!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?l:n.concat(l))));break;case 26:var a=Rn;if(It(t,e),Pt(e),l&512&&(Nt||n===null||Yn(n,n.return)),l&4){var i=n!==null?n.memoizedState:null;if(l=e.memoizedState,n===null)if(l===null)if(e.stateNode===null){e:{l=e.type,n=e.memoizedProps,a=a.ownerDocument||a;t:switch(l){case"title":i=a.getElementsByTagName("title")[0],(!i||i[aa]||i[st]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=a.createElement(l),a.head.insertBefore(i,a.querySelector("head > title"))),Yt(i,l,n),i[st]=e,We(i),l=i;break e;case"link":var c=B0("link","href",a).get(l+(n.href||""));if(c){for(var m=0;m<c.length;m++)if(i=c[m],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){c.splice(m,1);break t}}i=a.createElement(l),Yt(i,l,n),a.head.appendChild(i);break;case"meta":if(c=B0("meta","content",a).get(l+(n.content||""))){for(m=0;m<c.length;m++)if(i=c[m],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){c.splice(m,1);break t}}i=a.createElement(l),Yt(i,l,n),a.head.appendChild(i);break;default:throw Error(r(468,l))}i[st]=e,We(i),l=i}e.stateNode=l}else k0(a,e.type,e.stateNode);else e.stateNode=U0(a,l,e.memoizedProps);else i!==l?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,l===null?k0(a,e.type,e.stateNode):U0(a,l,e.memoizedProps)):l===null&&e.stateNode!==null&&oo(e,e.memoizedProps,n.memoizedProps)}break;case 27:It(t,e),Pt(e),l&512&&(Nt||n===null||Yn(n,n.return)),n!==null&&l&4&&oo(e,e.memoizedProps,n.memoizedProps);break;case 5:if(It(t,e),Pt(e),l&512&&(Nt||n===null||Yn(n,n.return)),e.flags&32){a=e.stateNode;try{Bn(a,"")}catch(ce){Fe(e,e.return,ce)}}l&4&&e.stateNode!=null&&(a=e.memoizedProps,oo(e,a,n!==null?n.memoizedProps:a)),l&1024&&(ho=!0);break;case 6:if(It(t,e),Pt(e),l&4){if(e.stateNode===null)throw Error(r(162));l=e.memoizedProps,n=e.stateNode;try{n.nodeValue=l}catch(ce){Fe(e,e.return,ce)}}break;case 3:if(js=null,a=Rn,Rn=Ms(t.containerInfo),It(t,e),Rn=a,Pt(e),l&4&&n!==null&&n.memoizedState.isDehydrated)try{bi(t.containerInfo)}catch(ce){Fe(e,e.return,ce)}ho&&(ho=!1,kd(e));break;case 4:l=Rn,Rn=Ms(e.stateNode.containerInfo),It(t,e),Pt(e),Rn=l;break;case 12:It(t,e),Pt(e);break;case 31:It(t,e),Pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,rs(e,l)));break;case 13:It(t,e),Pt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(ds=gt()),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,rs(e,l)));break;case 22:a=e.memoizedState!==null;var y=n!==null&&n.memoizedState!==null,N=sl,H=Nt;if(sl=N||a,Nt=H||y,It(t,e),Nt=H,sl=N,Pt(e),l&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(n===null||y||sl||Nt||Aa(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){y=n=t;try{if(i=y.stateNode,a)c=i.style,typeof c.setProperty=="function"?c.setProperty("display","none","important"):c.display="none";else{m=y.stateNode;var X=y.memoizedProps.style,T=X!=null&&X.hasOwnProperty("display")?X.display:null;m.style.display=T==null||typeof T=="boolean"?"":(""+T).trim()}}catch(ce){Fe(y,y.return,ce)}}}else if(t.tag===6){if(n===null){y=t;try{y.stateNode.nodeValue=a?"":y.memoizedProps}catch(ce){Fe(y,y.return,ce)}}}else if(t.tag===18){if(n===null){y=t;try{var z=y.stateNode;a?A0(z,!0):A0(y.stateNode,!1)}catch(ce){Fe(y,y.return,ce)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}l&4&&(l=e.updateQueue,l!==null&&(n=l.retryQueue,n!==null&&(l.retryQueue=null,rs(e,n))));break;case 19:It(t,e),Pt(e),l&4&&(l=e.updateQueue,l!==null&&(e.updateQueue=null,rs(e,l)));break;case 30:break;case 21:break;default:It(t,e),Pt(e)}}function Pt(e){var t=e.flags;if(t&2){try{for(var n,l=e.return;l!==null;){if(Td(l)){n=l;break}l=l.return}if(n==null)throw Error(r(160));switch(n.tag){case 27:var a=n.stateNode,i=ro(e);os(e,i,a);break;case 5:var c=n.stateNode;n.flags&32&&(Bn(c,""),n.flags&=-33);var m=ro(e);os(e,m,c);break;case 3:case 4:var y=n.stateNode.containerInfo,N=ro(e);fo(e,N,y);break;default:throw Error(r(161))}}catch(H){Fe(e,e.return,H)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function kd(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;kd(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ol(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Od(e,t.alternate,t),t=t.sibling}function Aa(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:_l(4,t,t.return),Aa(t);break;case 1:Yn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Ad(t,t.return,n),Aa(t);break;case 27:du(t.stateNode);case 26:case 5:Yn(t,t.return),Aa(t);break;case 22:t.memoizedState===null&&Aa(t);break;case 30:Aa(t);break;default:Aa(t)}e=e.sibling}}function rl(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var l=t.alternate,a=e,i=t,c=i.flags;switch(i.tag){case 0:case 11:case 15:rl(a,i,n),nu(4,i);break;case 1:if(rl(a,i,n),l=i,a=l.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(N){Fe(l,l.return,N)}if(l=i,a=l.updateQueue,a!==null){var m=l.stateNode;try{var y=a.shared.hiddenCallbacks;if(y!==null)for(a.shared.hiddenCallbacks=null,a=0;a<y.length;a++)gf(y[a],m)}catch(N){Fe(l,l.return,N)}}n&&c&64&&jd(i),lu(i,i.return);break;case 27:Dd(i);case 26:case 5:rl(a,i,n),n&&l===null&&c&4&&Nd(i),lu(i,i.return);break;case 12:rl(a,i,n);break;case 31:rl(a,i,n),n&&c&4&&Ld(a,i);break;case 13:rl(a,i,n),n&&c&4&&Ud(a,i);break;case 22:i.memoizedState===null&&rl(a,i,n),lu(i,i.return);break;case 30:break;default:rl(a,i,n)}t=t.sibling}}function mo(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Xi(n))}function go(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e))}function _n(e,t,n,l){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Hd(e,t,n,l),t=t.sibling}function Hd(e,t,n,l){var a=t.flags;switch(t.tag){case 0:case 11:case 15:_n(e,t,n,l),a&2048&&nu(9,t);break;case 1:_n(e,t,n,l);break;case 3:_n(e,t,n,l),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Xi(e)));break;case 12:if(a&2048){_n(e,t,n,l),e=t.stateNode;try{var i=t.memoizedProps,c=i.id,m=i.onPostCommit;typeof m=="function"&&m(c,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(y){Fe(t,t.return,y)}}else _n(e,t,n,l);break;case 31:_n(e,t,n,l);break;case 13:_n(e,t,n,l);break;case 23:break;case 22:i=t.stateNode,c=t.alternate,t.memoizedState!==null?i._visibility&2?_n(e,t,n,l):au(e,t):i._visibility&2?_n(e,t,n,l):(i._visibility|=2,ci(e,t,n,l,(t.subtreeFlags&10256)!==0||!1)),a&2048&&mo(c,t);break;case 24:_n(e,t,n,l),a&2048&&go(t.alternate,t);break;default:_n(e,t,n,l)}}function ci(e,t,n,l,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var i=e,c=t,m=n,y=l,N=c.flags;switch(c.tag){case 0:case 11:case 15:ci(i,c,m,y,a),nu(8,c);break;case 23:break;case 22:var H=c.stateNode;c.memoizedState!==null?H._visibility&2?ci(i,c,m,y,a):au(i,c):(H._visibility|=2,ci(i,c,m,y,a)),a&&N&2048&&mo(c.alternate,c);break;case 24:ci(i,c,m,y,a),a&&N&2048&&go(c.alternate,c);break;default:ci(i,c,m,y,a)}t=t.sibling}}function au(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,l=t,a=l.flags;switch(l.tag){case 22:au(n,l),a&2048&&mo(l.alternate,l);break;case 24:au(n,l),a&2048&&go(l.alternate,l);break;default:au(n,l)}t=t.sibling}}var iu=8192;function oi(e,t,n){if(e.subtreeFlags&iu)for(e=e.child;e!==null;)qd(e,t,n),e=e.sibling}function qd(e,t,n){switch(e.tag){case 26:oi(e,t,n),e.flags&iu&&e.memoizedState!==null&&Em(n,Rn,e.memoizedState,e.memoizedProps);break;case 5:oi(e,t,n);break;case 3:case 4:var l=Rn;Rn=Ms(e.stateNode.containerInfo),oi(e,t,n),Rn=l;break;case 22:e.memoizedState===null&&(l=e.alternate,l!==null&&l.memoizedState!==null?(l=iu,iu=16777216,oi(e,t,n),iu=l):oi(e,t,n));break;default:oi(e,t,n)}}function Yd(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function uu(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];_t=l,Xd(l,e)}Yd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Gd(e),e=e.sibling}function Gd(e){switch(e.tag){case 0:case 11:case 15:uu(e),e.flags&2048&&_l(9,e,e.return);break;case 3:uu(e);break;case 12:uu(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,fs(e)):uu(e);break;default:uu(e)}}function fs(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var l=t[n];_t=l,Xd(l,e)}Yd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:_l(8,t,t.return),fs(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,fs(t));break;default:fs(t)}e=e.sibling}}function Xd(e,t){for(;_t!==null;){var n=_t;switch(n.tag){case 0:case 11:case 15:_l(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var l=n.memoizedState.cachePool.pool;l!=null&&l.refCount++}break;case 24:Xi(n.memoizedState.cache)}if(l=n.child,l!==null)l.return=n,_t=l;else e:for(n=e;_t!==null;){l=_t;var a=l.sibling,i=l.return;if(Rd(l),l===n){_t=null;break e}if(a!==null){a.return=i,_t=a;break e}_t=i}}}var Bh={getCacheForType:function(e){var t=Ht(Ct),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Ht(Ct).controller.signal}},kh=typeof WeakMap=="function"?WeakMap:Map,Ze=0,tt=null,Re=null,Ue=0,Je=0,fn=null,Ll=!1,ri=!1,po=!1,fl=0,ht=0,Ul=0,Na=0,yo=0,dn=0,fi=0,su=null,en=null,vo=!1,ds=0,Qd=0,hs=1/0,ms=null,Bl=null,zt=0,kl=null,di=null,dl=0,bo=0,xo=null,Zd=null,cu=0,So=null;function hn(){return(Ze&2)!==0&&Ue!==0?Ue&-Ue:D.T!==null?Ao():Vn()}function Vd(){if(dn===0)if((Ue&536870912)===0||He){var e=Qn;Qn<<=1,(Qn&3932160)===0&&(Qn=262144),dn=e}else dn=536870912;return e=on.current,e!==null&&(e.flags|=32),dn}function tn(e,t,n){(e===tt&&(Je===2||Je===9)||e.cancelPendingCommit!==null)&&(hi(e,0),Hl(e,Ue,dn,!1)),Ke(e,n),((Ze&2)===0||e!==tt)&&(e===tt&&((Ze&2)===0&&(Na|=n),ht===4&&Hl(e,Ue,dn,!1)),Gn(e))}function Kd(e,t,n){if((Ze&6)!==0)throw Error(r(327));var l=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ce(e,t),a=l?Yh(e,t):wo(e,t,!0),i=l;do{if(a===0){ri&&!l&&Hl(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!Hh(n)){a=wo(e,t,!1),i=!1;continue}if(a===2){if(i=t,e.errorRecoveryDisabledLanes&i)var c=0;else c=e.pendingLanes&-536870913,c=c!==0?c:c&536870912?536870912:0;if(c!==0){t=c;e:{var m=e;a=su;var y=m.current.memoizedState.isDehydrated;if(y&&(hi(m,c).flags|=256),c=wo(m,c,!1),c!==2){if(po&&!y){m.errorRecoveryDisabledLanes|=i,Na|=i,a=4;break e}i=en,en=a,i!==null&&(en===null?en=i:en.push.apply(en,i))}a=c}if(i=!1,a!==2)continue}}if(a===1){hi(e,0),Hl(e,t,0,!0);break}e:{switch(l=e,i=a,i){case 0:case 1:throw Error(r(345));case 4:if((t&4194048)!==t)break;case 6:Hl(l,t,dn,!Ll);break e;case 2:en=null;break;case 3:case 5:break;default:throw Error(r(329))}if((t&62914560)===t&&(a=ds+300-gt(),10<a)){if(Hl(l,t,dn,!Ll),P(l,0,!0)!==0)break e;dl=t,l.timeoutHandle=M0($d.bind(null,l,n,en,ms,vo,t,dn,Na,fi,Ll,i,"Throttled",-0,0),a);break e}$d(l,n,en,ms,vo,t,dn,Na,fi,Ll,i,null,-0,0)}}break}while(!0);Gn(e)}function $d(e,t,n,l,a,i,c,m,y,N,H,X,T,z){if(e.timeoutHandle=-1,X=t.subtreeFlags,X&8192||(X&16785408)===16785408){X={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Dn},qd(t,i,X);var ce=(i&62914560)===i?ds-gt():(i&4194048)===i?Qd-gt():0;if(ce=wm(X,ce),ce!==null){dl=i,e.cancelPendingCommit=ce(n0.bind(null,e,t,i,n,l,a,c,m,y,H,X,null,T,z)),Hl(e,i,c,!N);return}}n0(e,t,i,n,l,a,c,m,y)}function Hh(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var l=0;l<n.length;l++){var a=n[l],i=a.getSnapshot;a=a.value;try{if(!sn(i(),a))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Hl(e,t,n,l){t&=~yo,t&=~Na,e.suspendedLanes|=t,e.pingedLanes&=~t,l&&(e.warmLanes|=t),l=e.expirationTimes;for(var a=t;0<a;){var i=31-ft(a),c=1<<i;l[i]=-1,a&=~c}n!==0&&ut(e,n,t)}function gs(){return(Ze&6)===0?(ou(0),!1):!0}function Eo(){if(Re!==null){if(Je===0)var e=Re.return;else e=Re,tl=ba=null,Bc(e),li=null,Zi=0,e=Re;for(;e!==null;)Cd(e.alternate,e),e=e.return;Re=null}}function hi(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,im(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),dl=0,Eo(),tt=e,Re=n=Pn(e.current,null),Ue=t,Je=0,fn=null,Ll=!1,ri=Ce(e,t),po=!1,fi=dn=yo=Na=Ul=ht=0,en=su=null,vo=!1,(t&8)!==0&&(t|=t&32);var l=e.entangledLanes;if(l!==0)for(e=e.entanglements,l&=t;0<l;){var a=31-ft(l),i=1<<a;t|=e[a],l&=~i}return fl=t,Uu(),n}function Jd(e,t){Te=null,D.H=Pi,t===ni||t===Qu?(t=ff(),Je=3):t===Cc?(t=ff(),Je=4):Je=t===Pc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,fn=t,Re===null&&(ht=1,as(e,pn(t,e.current)))}function Fd(){var e=on.current;return e===null?!0:(Ue&4194048)===Ue?xn===null:(Ue&62914560)===Ue||(Ue&536870912)!==0?e===xn:!1}function Wd(){var e=D.H;return D.H=Pi,e===null?Pi:e}function Id(){var e=D.A;return D.A=Bh,e}function ps(){ht=4,Ll||(Ue&4194048)!==Ue&&on.current!==null||(ri=!0),(Ul&134217727)===0&&(Na&134217727)===0||tt===null||Hl(tt,Ue,dn,!1)}function wo(e,t,n){var l=Ze;Ze|=2;var a=Wd(),i=Id();(tt!==e||Ue!==t)&&(ms=null,hi(e,t)),t=!1;var c=ht;e:do try{if(Je!==0&&Re!==null){var m=Re,y=fn;switch(Je){case 8:Eo(),c=6;break e;case 3:case 2:case 9:case 6:on.current===null&&(t=!0);var N=Je;if(Je=0,fn=null,mi(e,m,y,N),n&&ri){c=0;break e}break;default:N=Je,Je=0,fn=null,mi(e,m,y,N)}}qh(),c=ht;break}catch(H){Jd(e,H)}while(!0);return t&&e.shellSuspendCounter++,tl=ba=null,Ze=l,D.H=a,D.A=i,Re===null&&(tt=null,Ue=0,Uu()),c}function qh(){for(;Re!==null;)Pd(Re)}function Yh(e,t){var n=Ze;Ze|=2;var l=Wd(),a=Id();tt!==e||Ue!==t?(ms=null,hs=gt()+500,hi(e,t)):ri=Ce(e,t);e:do try{if(Je!==0&&Re!==null){t=Re;var i=fn;t:switch(Je){case 1:Je=0,fn=null,mi(e,t,i,1);break;case 2:case 9:if(of(i)){Je=0,fn=null,e0(t);break}t=function(){Je!==2&&Je!==9||tt!==e||(Je=7),Gn(e)},i.then(t,t);break e;case 3:Je=7;break e;case 4:Je=5;break e;case 7:of(i)?(Je=0,fn=null,e0(t)):(Je=0,fn=null,mi(e,t,i,7));break;case 5:var c=null;switch(Re.tag){case 26:c=Re.memoizedState;case 5:case 27:var m=Re;if(c?H0(c):m.stateNode.complete){Je=0,fn=null;var y=m.sibling;if(y!==null)Re=y;else{var N=m.return;N!==null?(Re=N,ys(N)):Re=null}break t}}Je=0,fn=null,mi(e,t,i,5);break;case 6:Je=0,fn=null,mi(e,t,i,6);break;case 8:Eo(),ht=6;break e;default:throw Error(r(462))}}Gh();break}catch(H){Jd(e,H)}while(!0);return tl=ba=null,D.H=l,D.A=a,Ze=n,Re!==null?0:(tt=null,Ue=0,Uu(),ht)}function Gh(){for(;Re!==null&&!Xn();)Pd(Re)}function Pd(e){var t=wd(e.alternate,e,fl);e.memoizedProps=e.pendingProps,t===null?ys(e):Re=t}function e0(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=yd(n,t,t.pendingProps,t.type,void 0,Ue);break;case 11:t=yd(n,t,t.pendingProps,t.type.render,t.ref,Ue);break;case 5:Bc(t);default:Cd(n,t),t=Re=Wr(t,fl),t=wd(n,t,fl)}e.memoizedProps=e.pendingProps,t===null?ys(e):Re=t}function mi(e,t,n,l){tl=ba=null,Bc(t),li=null,Zi=0;var a=t.return;try{if(Dh(e,a,t,n,Ue)){ht=1,as(e,pn(n,e.current)),Re=null;return}}catch(i){if(a!==null)throw Re=a,i;ht=1,as(e,pn(n,e.current)),Re=null;return}t.flags&32768?(He||l===1?e=!0:ri||(Ue&536870912)!==0?e=!1:(Ll=e=!0,(l===2||l===9||l===3||l===6)&&(l=on.current,l!==null&&l.tag===13&&(l.flags|=16384))),t0(t,e)):ys(t)}function ys(e){var t=e;do{if((t.flags&32768)!==0){t0(t,Ll);return}e=t.return;var n=Rh(t.alternate,t,fl);if(n!==null){Re=n;return}if(t=t.sibling,t!==null){Re=t;return}Re=t=e}while(t!==null);ht===0&&(ht=5)}function t0(e,t){do{var n=_h(e.alternate,e);if(n!==null){n.flags&=32767,Re=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Re=e;return}Re=e=n}while(e!==null);ht=6,Re=null}function n0(e,t,n,l,a,i,c,m,y){e.cancelPendingCommit=null;do vs();while(zt!==0);if((Ze&6)!==0)throw Error(r(327));if(t!==null){if(t===e.current)throw Error(r(177));if(i=t.lanes|t.childLanes,i|=rc,St(e,n,i,c,m,y),e===tt&&(Re=tt=null,Ue=0),di=t,kl=e,dl=n,bo=i,xo=a,Zd=l,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Vh(gl,function(){return s0(),null})):(e.callbackNode=null,e.callbackPriority=0),l=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||l){l=D.T,D.T=null,a=Z.p,Z.p=2,c=Ze,Ze|=4;try{Lh(e,t,n)}finally{Ze=c,Z.p=a,D.T=l}}zt=1,l0(),a0(),i0()}}function l0(){if(zt===1){zt=0;var e=kl,t=di,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=D.T,D.T=null;var l=Z.p;Z.p=2;var a=Ze;Ze|=4;try{Bd(t,e);var i=Lo,c=Gr(e.containerInfo),m=i.focusedElem,y=i.selectionRange;if(c!==m&&m&&m.ownerDocument&&Yr(m.ownerDocument.documentElement,m)){if(y!==null&&ic(m)){var N=y.start,H=y.end;if(H===void 0&&(H=N),"selectionStart"in m)m.selectionStart=N,m.selectionEnd=Math.min(H,m.value.length);else{var X=m.ownerDocument||document,T=X&&X.defaultView||window;if(T.getSelection){var z=T.getSelection(),ce=m.textContent.length,xe=Math.min(y.start,ce),et=y.end===void 0?xe:Math.min(y.end,ce);!z.extend&&xe>et&&(c=et,et=xe,xe=c);var w=qr(m,xe),S=qr(m,et);if(w&&S&&(z.rangeCount!==1||z.anchorNode!==w.node||z.anchorOffset!==w.offset||z.focusNode!==S.node||z.focusOffset!==S.offset)){var A=X.createRange();A.setStart(w.node,w.offset),z.removeAllRanges(),xe>et?(z.addRange(A),z.extend(S.node,S.offset)):(A.setEnd(S.node,S.offset),z.addRange(A))}}}}for(X=[],z=m;z=z.parentNode;)z.nodeType===1&&X.push({element:z,left:z.scrollLeft,top:z.scrollTop});for(typeof m.focus=="function"&&m.focus(),m=0;m<X.length;m++){var G=X[m];G.element.scrollLeft=G.left,G.element.scrollTop=G.top}}Ds=!!_o,Lo=_o=null}finally{Ze=a,Z.p=l,D.T=n}}e.current=t,zt=2}}function a0(){if(zt===2){zt=0;var e=kl,t=di,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=D.T,D.T=null;var l=Z.p;Z.p=2;var a=Ze;Ze|=4;try{Od(e,t.alternate,t)}finally{Ze=a,Z.p=l,D.T=n}}zt=3}}function i0(){if(zt===4||zt===3){zt=0,Jl();var e=kl,t=di,n=dl,l=Zd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?zt=5:(zt=0,di=kl=null,u0(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Bl=null),ta(n),t=t.stateNode,Rt&&typeof Rt.onCommitFiberRoot=="function")try{Rt.onCommitFiberRoot(Zt,t,void 0,(t.current.flags&128)===128)}catch{}if(l!==null){t=D.T,a=Z.p,Z.p=2,D.T=null;try{for(var i=e.onRecoverableError,c=0;c<l.length;c++){var m=l[c];i(m.value,{componentStack:m.stack})}}finally{D.T=t,Z.p=a}}(dl&3)!==0&&vs(),Gn(e),a=e.pendingLanes,(n&261930)!==0&&(a&42)!==0?e===So?cu++:(cu=0,So=e):cu=0,ou(0)}}function u0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Xi(t)))}function vs(){return l0(),a0(),i0(),s0()}function s0(){if(zt!==5)return!1;var e=kl,t=bo;bo=0;var n=ta(dl),l=D.T,a=Z.p;try{Z.p=32>n?32:n,D.T=null,n=xo,xo=null;var i=kl,c=dl;if(zt=0,di=kl=null,dl=0,(Ze&6)!==0)throw Error(r(331));var m=Ze;if(Ze|=4,Gd(i.current),Hd(i,i.current,c,n),Ze=m,ou(0,!1),Rt&&typeof Rt.onPostCommitFiberRoot=="function")try{Rt.onPostCommitFiberRoot(Zt,i)}catch{}return!0}finally{Z.p=a,D.T=l,u0(e,t)}}function c0(e,t,n){t=pn(n,t),t=Ic(e.stateNode,t,2),e=zl(e,t,2),e!==null&&(Ke(e,2),Gn(e))}function Fe(e,t,n){if(e.tag===3)c0(e,e,n);else for(;t!==null;){if(t.tag===3){c0(t,e,n);break}else if(t.tag===1){var l=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(Bl===null||!Bl.has(l))){e=pn(n,e),n=od(2),l=zl(t,n,2),l!==null&&(rd(n,l,t,e),Ke(l,2),Gn(l));break}}t=t.return}}function Mo(e,t,n){var l=e.pingCache;if(l===null){l=e.pingCache=new kh;var a=new Set;l.set(t,a)}else a=l.get(t),a===void 0&&(a=new Set,l.set(t,a));a.has(n)||(po=!0,a.add(n),e=Xh.bind(null,e,t,n),t.then(e,e))}function Xh(e,t,n){var l=e.pingCache;l!==null&&l.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,tt===e&&(Ue&n)===n&&(ht===4||ht===3&&(Ue&62914560)===Ue&&300>gt()-ds?(Ze&2)===0&&hi(e,0):yo|=n,fi===Ue&&(fi=0)),Gn(e)}function o0(e,t){t===0&&(t=je()),e=pa(e,t),e!==null&&(Ke(e,t),Gn(e))}function Qh(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),o0(e,n)}function Zh(e,t){var n=0;switch(e.tag){case 31:case 13:var l=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:l=e.stateNode;break;case 22:l=e.stateNode._retryCache;break;default:throw Error(r(314))}l!==null&&l.delete(t),o0(e,n)}function Vh(e,t){return nn(e,t)}var bs=null,gi=null,Co=!1,xs=!1,jo=!1,ql=0;function Gn(e){e!==gi&&e.next===null&&(gi===null?bs=gi=e:gi=gi.next=e),xs=!0,Co||(Co=!0,$h())}function ou(e,t){if(!jo&&xs){jo=!0;do for(var n=!1,l=bs;l!==null;){if(e!==0){var a=l.pendingLanes;if(a===0)var i=0;else{var c=l.suspendedLanes,m=l.pingedLanes;i=(1<<31-ft(42|e)+1)-1,i&=a&~(c&~m),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,h0(l,i))}else i=Ue,i=P(l,l===tt?i:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(i&3)===0||Ce(l,i)||(n=!0,h0(l,i));l=l.next}while(n);jo=!1}}function Kh(){r0()}function r0(){xs=Co=!1;var e=0;ql!==0&&am()&&(e=ql);for(var t=gt(),n=null,l=bs;l!==null;){var a=l.next,i=f0(l,t);i===0?(l.next=null,n===null?bs=a:n.next=a,a===null&&(gi=n)):(n=l,(e!==0||(i&3)!==0)&&(xs=!0)),l=a}zt!==0&&zt!==5||ou(e),ql!==0&&(ql=0)}function f0(e,t){for(var n=e.suspendedLanes,l=e.pingedLanes,a=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var c=31-ft(i),m=1<<c,y=a[c];y===-1?((m&n)===0||(m&l)!==0)&&(a[c]=Se(m,t)):y<=t&&(e.expiredLanes|=m),i&=~m}if(t=tt,n=Ue,n=P(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l=e.callbackNode,n===0||e===t&&(Je===2||Je===9)||e.cancelPendingCommit!==null)return l!==null&&l!==null&&Ln(l),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ce(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(l!==null&&Ln(l),ta(n)){case 2:case 8:n=Ra;break;case 32:n=gl;break;case 268435456:n=pl;break;default:n=gl}return l=d0.bind(null,e),n=nn(n,l),e.callbackPriority=t,e.callbackNode=n,t}return l!==null&&l!==null&&Ln(l),e.callbackPriority=2,e.callbackNode=null,2}function d0(e,t){if(zt!==0&&zt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(vs()&&e.callbackNode!==n)return null;var l=Ue;return l=P(e,e===tt?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),l===0?null:(Kd(e,l,t),f0(e,gt()),e.callbackNode!=null&&e.callbackNode===n?d0.bind(null,e):null)}function h0(e,t){if(vs())return null;Kd(e,t,!0)}function $h(){um(function(){(Ze&6)!==0?nn(Wl,Kh):r0()})}function Ao(){if(ql===0){var e=ei;e===0&&(e=Vt,Vt<<=1,(Vt&261888)===0&&(Vt=256)),ql=e}return ql}function m0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:sa(""+e)}function g0(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function Jh(e,t,n,l,a){if(t==="submit"&&n&&n.stateNode===a){var i=m0((a[Lt]||null).action),c=l.submitter;c&&(t=(t=c[Lt]||null)?m0(t.formAction):c.getAttribute("formAction"),t!==null&&(i=t,c=null));var m=new Ga("action","action",null,l,a);e.push({event:m,listeners:[{instance:null,listener:function(){if(l.defaultPrevented){if(ql!==0){var y=c?g0(a,c):new FormData(a);Vc(n,{pending:!0,data:y,method:a.method,action:i},null,y)}}else typeof i=="function"&&(m.preventDefault(),y=c?g0(a,c):new FormData(a),Vc(n,{pending:!0,data:y,method:a.method,action:i},i,y))},currentTarget:a}]})}}for(var No=0;No<oc.length;No++){var To=oc[No],Fh=To.toLowerCase(),Wh=To[0].toUpperCase()+To.slice(1);On(Fh,"on"+Wh)}On(Zr,"onAnimationEnd"),On(Vr,"onAnimationIteration"),On(Kr,"onAnimationStart"),On("dblclick","onDoubleClick"),On("focusin","onFocus"),On("focusout","onBlur"),On(hh,"onTransitionRun"),On(mh,"onTransitionStart"),On(gh,"onTransitionCancel"),On($r,"onTransitionEnd"),Ut("onMouseEnter",["mouseout","mouseover"]),Ut("onMouseLeave",["mouseout","mouseover"]),Ut("onPointerEnter",["pointerout","pointerover"]),Ut("onPointerLeave",["pointerout","pointerover"]),Jn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Jn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Jn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Jn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Jn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ru="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(" "),Ih=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ru));function p0(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var l=e[n],a=l.event;l=l.listeners;e:{var i=void 0;if(t)for(var c=l.length-1;0<=c;c--){var m=l[c],y=m.instance,N=m.currentTarget;if(m=m.listener,y!==i&&a.isPropagationStopped())break e;i=m,a.currentTarget=N;try{i(a)}catch(H){Lu(H)}a.currentTarget=null,i=y}else for(c=0;c<l.length;c++){if(m=l[c],y=m.instance,N=m.currentTarget,m=m.listener,y!==i&&a.isPropagationStopped())break e;i=m,a.currentTarget=N;try{i(a)}catch(H){Lu(H)}a.currentTarget=null,i=y}}}}function _e(e,t){var n=t[_a];n===void 0&&(n=t[_a]=new Set);var l=e+"__bubble";n.has(l)||(y0(t,e,2,!1),n.add(l))}function Do(e,t,n){var l=0;t&&(l|=4),y0(n,e,l,t)}var Ss="_reactListening"+Math.random().toString(36).slice(2);function zo(e){if(!e[Ss]){e[Ss]=!0,Ci.forEach(function(n){n!=="selectionchange"&&(Ih.has(n)||Do(n,!1,e),Do(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Ss]||(t[Ss]=!0,Do("selectionchange",!1,t))}}function y0(e,t,n,l){switch(V0(t)){case 2:var a=jm;break;case 8:a=Am;break;default:a=Vo}n=a.bind(null,t,n,e),a=void 0,!zi||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),l?a!==void 0?e.addEventListener(t,n,{capture:!0,passive:a}):e.addEventListener(t,n,!0):a!==void 0?e.addEventListener(t,n,{passive:a}):e.addEventListener(t,n,!1)}function Oo(e,t,n,l,a){var i=l;if((t&1)===0&&(t&2)===0&&l!==null)e:for(;;){if(l===null)return;var c=l.tag;if(c===3||c===4){var m=l.stateNode.containerInfo;if(m===a)break;if(c===4)for(c=l.return;c!==null;){var y=c.tag;if((y===3||y===4)&&c.stateNode.containerInfo===a)return;c=c.return}for(;m!==null;){if(c=bl(m),c===null)return;if(y=c.tag,y===5||y===6||y===26||y===27){l=i=c;continue e}m=m.parentNode}}l=l.return}Nu(function(){var N=i,H=Ti(n),X=[];e:{var T=Jr.get(e);if(T!==void 0){var z=Ga,ce=e;switch(e){case"keypress":if(Wn(n)===0)break e;case"keydown":case"keyup":z=d;break;case"focusin":ce="focus",z=ha;break;case"focusout":ce="blur",z=ha;break;case"beforeblur":case"afterblur":z=ha;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":z=mn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":z=Qa;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":z=ee;break;case Zr:case Vr:case Kr:z=zu;break;case $r:z=pe;break;case"scroll":case"scrollend":z=Ks;break;case"wheel":z=Kt;break;case"copy":case"cut":case"paste":z=Fs;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":z=q;break;case"toggle":case"beforetoggle":z=un}var xe=(t&4)!==0,et=!xe&&(e==="scroll"||e==="scrollend"),w=xe?T!==null?T+"Capture":null:T;xe=[];for(var S=N,A;S!==null;){var G=S;if(A=G.stateNode,G=G.tag,G!==5&&G!==26&&G!==27||A===null||w===null||(G=oa(S,w),G!=null&&xe.push(fu(S,G,A))),et)break;S=S.return}0<xe.length&&(T=new z(T,ce,null,n,H),X.push({event:T,listeners:xe}))}}if((t&7)===0){e:{if(T=e==="mouseover"||e==="pointerover",z=e==="mouseout"||e==="pointerout",T&&n!==Ni&&(ce=n.relatedTarget||n.fromElement)&&(bl(ce)||ce[Kn]))break e;if((z||T)&&(T=H.window===H?H:(T=H.ownerDocument)?T.defaultView||T.parentWindow:window,z?(ce=n.relatedTarget||n.toElement,z=N,ce=ce?bl(ce):null,ce!==null&&(et=g(ce),xe=ce.tag,ce!==et||xe!==5&&xe!==27&&xe!==6)&&(ce=null)):(z=null,ce=N),z!==ce)){if(xe=mn,G="onMouseLeave",w="onMouseEnter",S="mouse",(e==="pointerout"||e==="pointerover")&&(xe=q,G="onPointerLeave",w="onPointerEnter",S="pointer"),et=z==null?T:ia(z),A=ce==null?T:ia(ce),T=new xe(G,S+"leave",z,n,H),T.target=et,T.relatedTarget=A,G=null,bl(H)===N&&(xe=new xe(w,S+"enter",ce,n,H),xe.target=A,xe.relatedTarget=et,G=xe),et=G,z&&ce)t:{for(xe=Ph,w=z,S=ce,A=0,G=w;G;G=xe(G))A++;G=0;for(var ye=S;ye;ye=xe(ye))G++;for(;0<A-G;)w=xe(w),A--;for(;0<G-A;)S=xe(S),G--;for(;A--;){if(w===S||S!==null&&w===S.alternate){xe=w;break t}w=xe(w),S=xe(S)}xe=null}else xe=null;z!==null&&v0(X,T,z,xe,!1),ce!==null&&et!==null&&v0(X,et,ce,xe,!0)}}e:{if(T=N?ia(N):window,z=T.nodeName&&T.nodeName.toLowerCase(),z==="select"||z==="input"&&T.type==="file")var Ye=_r;else if(Or(T))if(Lr)Ye=rh;else{Ye=ch;var de=sh}else z=T.nodeName,!z||z.toLowerCase()!=="input"||T.type!=="checkbox"&&T.type!=="radio"?N&&Ha(N.elementType)&&(Ye=_r):Ye=oh;if(Ye&&(Ye=Ye(e,N))){Rr(X,Ye,n,H);break e}de&&de(e,T,N),e==="focusout"&&N&&T.type==="number"&&N.memoizedProps.value!=null&&ua(T,"number",T.value)}switch(de=N?ia(N):window,e){case"focusin":(Or(de)||de.contentEditable==="true")&&(Va=de,uc=N,qi=null);break;case"focusout":qi=uc=Va=null;break;case"mousedown":sc=!0;break;case"contextmenu":case"mouseup":case"dragend":sc=!1,Xr(X,n,H);break;case"selectionchange":if(dh)break;case"keydown":case"keyup":Xr(X,n,H)}var De;if(zn)e:{switch(e){case"compositionstart":var Be="onCompositionStart";break e;case"compositionend":Be="onCompositionEnd";break e;case"compositionupdate":Be="onCompositionUpdate";break e}Be=void 0}else Za?Dr(e,n)&&(Be="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Be="onCompositionStart");Be&&(Ar&&n.locale!=="ko"&&(Za||Be!=="onCompositionStart"?Be==="onCompositionEnd"&&Za&&(De=Ri()):(Ft=H,Oi="value"in Ft?Ft.value:Ft.textContent,Za=!0)),de=Es(N,Be),0<de.length&&(Be=new Ou(Be,e,null,n,H),X.push({event:Be,listeners:de}),De?Be.data=De:(De=zr(n),De!==null&&(Be.data=De)))),(De=nc?lh(e,n):ah(e,n))&&(Be=Es(N,"onBeforeInput"),0<Be.length&&(de=new Ou("onBeforeInput","beforeinput",null,n,H),X.push({event:de,listeners:Be}),de.data=De)),Jh(X,e,N,n,H)}p0(X,t)})}function fu(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Es(e,t){for(var n=t+"Capture",l=[];e!==null;){var a=e,i=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||i===null||(a=oa(e,n),a!=null&&l.unshift(fu(e,a,i)),a=oa(e,t),a!=null&&l.push(fu(e,a,i))),e.tag===3)return l;e=e.return}return[]}function Ph(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function v0(e,t,n,l,a){for(var i=t._reactName,c=[];n!==null&&n!==l;){var m=n,y=m.alternate,N=m.stateNode;if(m=m.tag,y!==null&&y===l)break;m!==5&&m!==26&&m!==27||N===null||(y=N,a?(N=oa(n,i),N!=null&&c.unshift(fu(n,N,y))):a||(N=oa(n,i),N!=null&&c.push(fu(n,N,y)))),n=n.return}c.length!==0&&e.push({event:t,listeners:c})}var em=/\r\n?/g,tm=/\u0000|\uFFFD/g;function b0(e){return(typeof e=="string"?e:""+e).replace(em,`
|
|
9
|
+
`).replace(tm,"")}function x0(e,t){return t=b0(t),b0(e)===t}function Pe(e,t,n,l,a,i){switch(n){case"children":typeof l=="string"?t==="body"||t==="textarea"&&l===""||Bn(e,l):(typeof l=="number"||typeof l=="bigint")&&t!=="body"&&Bn(e,""+l);break;case"className":Ua(e,"class",l);break;case"tabIndex":Ua(e,"tabindex",l);break;case"dir":case"role":case"viewBox":case"width":case"height":Ua(e,n,l);break;case"style":Au(e,l,i);break;case"data":if(t!=="object"){Ua(e,"data",l);break}case"src":case"href":if(l===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(l==null||typeof l=="function"||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=sa(""+l),e.setAttribute(n,l);break;case"action":case"formAction":if(typeof l=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",a.name,a,null),Pe(e,t,"formEncType",a.formEncType,a,null),Pe(e,t,"formMethod",a.formMethod,a,null),Pe(e,t,"formTarget",a.formTarget,a,null)):(Pe(e,t,"encType",a.encType,a,null),Pe(e,t,"method",a.method,a,null),Pe(e,t,"target",a.target,a,null)));if(l==null||typeof l=="symbol"||typeof l=="boolean"){e.removeAttribute(n);break}l=sa(""+l),e.setAttribute(n,l);break;case"onClick":l!=null&&(e.onclick=Dn);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"multiple":e.multiple=l&&typeof l!="function"&&typeof l!="symbol";break;case"muted":e.muted=l&&typeof l!="function"&&typeof l!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(l==null||typeof l=="function"||typeof l=="boolean"||typeof l=="symbol"){e.removeAttribute("xlink:href");break}n=sa(""+l),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""+l):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":l&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":l===!0?e.setAttribute(n,""):l!==!1&&l!=null&&typeof l!="function"&&typeof l!="symbol"?e.setAttribute(n,l):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":l!=null&&typeof l!="function"&&typeof l!="symbol"&&!isNaN(l)&&1<=l?e.setAttribute(n,l):e.removeAttribute(n);break;case"rowSpan":case"start":l==null||typeof l=="function"||typeof l=="symbol"||isNaN(l)?e.removeAttribute(n):e.setAttribute(n,l);break;case"popover":_e("beforetoggle",e),_e("toggle",e),La(e,"popover",l);break;case"xlinkActuate":Tn(e,"http://www.w3.org/1999/xlink","xlink:actuate",l);break;case"xlinkArcrole":Tn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",l);break;case"xlinkRole":Tn(e,"http://www.w3.org/1999/xlink","xlink:role",l);break;case"xlinkShow":Tn(e,"http://www.w3.org/1999/xlink","xlink:show",l);break;case"xlinkTitle":Tn(e,"http://www.w3.org/1999/xlink","xlink:title",l);break;case"xlinkType":Tn(e,"http://www.w3.org/1999/xlink","xlink:type",l);break;case"xmlBase":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:base",l);break;case"xmlLang":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",l);break;case"xmlSpace":Tn(e,"http://www.w3.org/XML/1998/namespace","xml:space",l);break;case"is":La(e,"is",l);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=qa.get(n)||n,La(e,n,l))}}function Ro(e,t,n,l,a,i){switch(n){case"style":Au(e,l,i);break;case"dangerouslySetInnerHTML":if(l!=null){if(typeof l!="object"||!("__html"in l))throw Error(r(61));if(n=l.__html,n!=null){if(a.children!=null)throw Error(r(60));e.innerHTML=n}}break;case"children":typeof l=="string"?Bn(e,l):(typeof l=="number"||typeof l=="bigint")&&Bn(e,""+l);break;case"onScroll":l!=null&&_e("scroll",e);break;case"onScrollEnd":l!=null&&_e("scrollend",e);break;case"onClick":l!=null&&(e.onclick=Dn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Mu.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(a=n.endsWith("Capture"),t=n.slice(2,a?n.length-7:void 0),i=e[Lt]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,a),typeof l=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,l,a);break e}n in e?e[n]=l:l===!0?e.setAttribute(n,""):La(e,n,l)}}}function Yt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":_e("error",e),_e("load",e);var l=!1,a=!1,i;for(i in n)if(n.hasOwnProperty(i)){var c=n[i];if(c!=null)switch(i){case"src":l=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,i,c,n,null)}}a&&Pe(e,t,"srcSet",n.srcSet,n,null),l&&Pe(e,t,"src",n.src,n,null);return;case"input":_e("invalid",e);var m=i=c=a=null,y=null,N=null;for(l in n)if(n.hasOwnProperty(l)){var H=n[l];if(H!=null)switch(l){case"name":a=H;break;case"type":c=H;break;case"checked":y=H;break;case"defaultChecked":N=H;break;case"value":i=H;break;case"defaultValue":m=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(r(137,t));break;default:Pe(e,t,l,H,n,null)}}Ai(e,i,m,y,N,c,a,!1);return;case"select":_e("invalid",e),l=c=i=null;for(a in n)if(n.hasOwnProperty(a)&&(m=n[a],m!=null))switch(a){case"value":i=m;break;case"defaultValue":c=m;break;case"multiple":l=m;default:Pe(e,t,a,m,n,null)}t=i,n=c,e.multiple=!!l,t!=null?Jt(e,!!l,t,!1):n!=null&&Jt(e,!!l,n,!0);return;case"textarea":_e("invalid",e),i=a=l=null;for(c in n)if(n.hasOwnProperty(c)&&(m=n[c],m!=null))switch(c){case"value":l=m;break;case"defaultValue":a=m;break;case"children":i=m;break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(r(91));break;default:Pe(e,t,c,m,n,null)}Bt(e,l,a,i);return;case"option":for(y in n)n.hasOwnProperty(y)&&(l=n[y],l!=null)&&(y==="selected"?e.selected=l&&typeof l!="function"&&typeof l!="symbol":Pe(e,t,y,l,n,null));return;case"dialog":_e("beforetoggle",e),_e("toggle",e),_e("cancel",e),_e("close",e);break;case"iframe":case"object":_e("load",e);break;case"video":case"audio":for(l=0;l<ru.length;l++)_e(ru[l],e);break;case"image":_e("error",e),_e("load",e);break;case"details":_e("toggle",e);break;case"embed":case"source":case"link":_e("error",e),_e("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(N in n)if(n.hasOwnProperty(N)&&(l=n[N],l!=null))switch(N){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,t));default:Pe(e,t,N,l,n,null)}return;default:if(Ha(t)){for(H in n)n.hasOwnProperty(H)&&(l=n[H],l!==void 0&&Ro(e,t,H,l,n,void 0));return}}for(m in n)n.hasOwnProperty(m)&&(l=n[m],l!=null&&Pe(e,t,m,l,n,null))}function nm(e,t,n,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,i=null,c=null,m=null,y=null,N=null,H=null;for(z in n){var X=n[z];if(n.hasOwnProperty(z)&&X!=null)switch(z){case"checked":break;case"value":break;case"defaultValue":y=X;default:l.hasOwnProperty(z)||Pe(e,t,z,null,l,X)}}for(var T in l){var z=l[T];if(X=n[T],l.hasOwnProperty(T)&&(z!=null||X!=null))switch(T){case"type":i=z;break;case"name":a=z;break;case"checked":N=z;break;case"defaultChecked":H=z;break;case"value":c=z;break;case"defaultValue":m=z;break;case"children":case"dangerouslySetInnerHTML":if(z!=null)throw Error(r(137,t));break;default:z!==X&&Pe(e,t,T,z,l,X)}}rt(e,c,m,y,N,H,i,a);return;case"select":z=c=m=T=null;for(i in n)if(y=n[i],n.hasOwnProperty(i)&&y!=null)switch(i){case"value":break;case"multiple":z=y;default:l.hasOwnProperty(i)||Pe(e,t,i,null,l,y)}for(a in l)if(i=l[a],y=n[a],l.hasOwnProperty(a)&&(i!=null||y!=null))switch(a){case"value":T=i;break;case"defaultValue":m=i;break;case"multiple":c=i;default:i!==y&&Pe(e,t,a,i,l,y)}t=m,n=c,l=z,T!=null?Jt(e,!!n,T,!1):!!l!=!!n&&(t!=null?Jt(e,!!n,t,!0):Jt(e,!!n,n?[]:"",!1));return;case"textarea":z=T=null;for(m in n)if(a=n[m],n.hasOwnProperty(m)&&a!=null&&!l.hasOwnProperty(m))switch(m){case"value":break;case"children":break;default:Pe(e,t,m,null,l,a)}for(c in l)if(a=l[c],i=n[c],l.hasOwnProperty(c)&&(a!=null||i!=null))switch(c){case"value":T=a;break;case"defaultValue":z=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(r(91));break;default:a!==i&&Pe(e,t,c,a,l,i)}ka(e,T,z);return;case"option":for(var ce in n)T=n[ce],n.hasOwnProperty(ce)&&T!=null&&!l.hasOwnProperty(ce)&&(ce==="selected"?e.selected=!1:Pe(e,t,ce,null,l,T));for(y in l)T=l[y],z=n[y],l.hasOwnProperty(y)&&T!==z&&(T!=null||z!=null)&&(y==="selected"?e.selected=T&&typeof T!="function"&&typeof T!="symbol":Pe(e,t,y,T,l,z));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 xe in n)T=n[xe],n.hasOwnProperty(xe)&&T!=null&&!l.hasOwnProperty(xe)&&Pe(e,t,xe,null,l,T);for(N in l)if(T=l[N],z=n[N],l.hasOwnProperty(N)&&T!==z&&(T!=null||z!=null))switch(N){case"children":case"dangerouslySetInnerHTML":if(T!=null)throw Error(r(137,t));break;default:Pe(e,t,N,T,l,z)}return;default:if(Ha(t)){for(var et in n)T=n[et],n.hasOwnProperty(et)&&T!==void 0&&!l.hasOwnProperty(et)&&Ro(e,t,et,void 0,l,T);for(H in l)T=l[H],z=n[H],!l.hasOwnProperty(H)||T===z||T===void 0&&z===void 0||Ro(e,t,H,T,l,z);return}}for(var w in n)T=n[w],n.hasOwnProperty(w)&&T!=null&&!l.hasOwnProperty(w)&&Pe(e,t,w,null,l,T);for(X in l)T=l[X],z=n[X],!l.hasOwnProperty(X)||T===z||T==null&&z==null||Pe(e,t,X,T,l,z)}function S0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function lm(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),l=0;l<n.length;l++){var a=n[l],i=a.transferSize,c=a.initiatorType,m=a.duration;if(i&&m&&S0(c)){for(c=0,m=a.responseEnd,l+=1;l<n.length;l++){var y=n[l],N=y.startTime;if(N>m)break;var H=y.transferSize,X=y.initiatorType;H&&S0(X)&&(y=y.responseEnd,c+=H*(y<m?1:(m-N)/(y-N)))}if(--l,t+=8*(i+c)/(a.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _o=null,Lo=null;function ws(e){return e.nodeType===9?e:e.ownerDocument}function E0(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function w0(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Uo(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Bo=null;function am(){var e=window.event;return e&&e.type==="popstate"?e===Bo?!1:(Bo=e,!0):(Bo=null,!1)}var M0=typeof setTimeout=="function"?setTimeout:void 0,im=typeof clearTimeout=="function"?clearTimeout:void 0,C0=typeof Promise=="function"?Promise:void 0,um=typeof queueMicrotask=="function"?queueMicrotask:typeof C0<"u"?function(e){return C0.resolve(null).then(e).catch(sm)}:M0;function sm(e){setTimeout(function(){throw e})}function Yl(e){return e==="head"}function j0(e,t){var n=t,l=0;do{var a=n.nextSibling;if(e.removeChild(n),a&&a.nodeType===8)if(n=a.data,n==="/$"||n==="/&"){if(l===0){e.removeChild(a),bi(t);return}l--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")l++;else if(n==="html")du(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,du(n);for(var i=n.firstChild;i;){var c=i.nextSibling,m=i.nodeName;i[aa]||m==="SCRIPT"||m==="STYLE"||m==="LINK"&&i.rel.toLowerCase()==="stylesheet"||n.removeChild(i),i=c}}else n==="body"&&du(e.ownerDocument.body);n=a}while(n);bi(t)}function A0(e,t){var n=e;e=0;do{var l=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),l&&l.nodeType===8)if(n=l.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=l}while(n)}function ko(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":ko(n),Mi(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function cm(e,t,n,l){for(;e.nodeType===1;){var a=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!l&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(l){if(!e[aa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==a.rel||e.getAttribute("href")!==(a.href==null||a.href===""?null:a.href)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin)||e.getAttribute("title")!==(a.title==null?null:a.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=Sn(e.nextSibling),e===null)break}return null}function om(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Sn(e.nextSibling),e===null))return null;return e}function N0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Sn(e.nextSibling),e===null))return null;return e}function Ho(e){return e.data==="$?"||e.data==="$~"}function qo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function rm(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var l=function(){t(),n.removeEventListener("DOMContentLoaded",l)};n.addEventListener("DOMContentLoaded",l),e._reactRetry=l}}function Sn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Yo=null;function T0(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return Sn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function D0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function z0(e,t,n){switch(t=ws(n),e){case"html":if(e=t.documentElement,!e)throw Error(r(452));return e;case"head":if(e=t.head,!e)throw Error(r(453));return e;case"body":if(e=t.body,!e)throw Error(r(454));return e;default:throw Error(r(451))}}function du(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Mi(e)}var En=new Map,O0=new Set;function Ms(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var hl=Z.d;Z.d={f:fm,r:dm,D:hm,C:mm,L:gm,m:pm,X:vm,S:ym,M:bm};function fm(){var e=hl.f(),t=gs();return e||t}function dm(e){var t=$n(e);t!==null&&t.tag===5&&t.type==="form"?Jf(t):hl.r(e)}var pi=typeof document>"u"?null:document;function R0(e,t,n){var l=pi;if(l&&typeof t=="string"&&t){var a=wt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof n=="string"&&(a+='[crossorigin="'+n+'"]'),O0.has(a)||(O0.add(a),e={rel:e,crossOrigin:n,href:t},l.querySelector(a)===null&&(t=l.createElement("link"),Yt(t,"link",e),We(t),l.head.appendChild(t)))}}function hm(e){hl.D(e),R0("dns-prefetch",e,null)}function mm(e,t){hl.C(e,t),R0("preconnect",e,t)}function gm(e,t,n){hl.L(e,t,n);var l=pi;if(l&&e&&t){var a='link[rel="preload"][as="'+wt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(a+='[imagesrcset="'+wt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(a+='[imagesizes="'+wt(n.imageSizes)+'"]')):a+='[href="'+wt(e)+'"]';var i=a;switch(t){case"style":i=yi(e);break;case"script":i=vi(e)}En.has(i)||(e=L({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),En.set(i,e),l.querySelector(a)!==null||t==="style"&&l.querySelector(hu(i))||t==="script"&&l.querySelector(mu(i))||(t=l.createElement("link"),Yt(t,"link",e),We(t),l.head.appendChild(t)))}}function pm(e,t){hl.m(e,t);var n=pi;if(n&&e){var l=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+wt(l)+'"][href="'+wt(e)+'"]',i=a;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=vi(e)}if(!En.has(i)&&(e=L({rel:"modulepreload",href:e},t),En.set(i,e),n.querySelector(a)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(mu(i)))return}l=n.createElement("link"),Yt(l,"link",e),We(l),n.head.appendChild(l)}}}function ym(e,t,n){hl.S(e,t,n);var l=pi;if(l&&e){var a=Un(l).hoistableStyles,i=yi(e);t=t||"default";var c=a.get(i);if(!c){var m={loading:0,preload:null};if(c=l.querySelector(hu(i)))m.loading=5;else{e=L({rel:"stylesheet",href:e,"data-precedence":t},n),(n=En.get(i))&&Go(e,n);var y=c=l.createElement("link");We(y),Yt(y,"link",e),y._p=new Promise(function(N,H){y.onload=N,y.onerror=H}),y.addEventListener("load",function(){m.loading|=1}),y.addEventListener("error",function(){m.loading|=2}),m.loading|=4,Cs(c,t,l)}c={type:"stylesheet",instance:c,count:1,state:m},a.set(i,c)}}}function vm(e,t){hl.X(e,t);var n=pi;if(n&&e){var l=Un(n).hoistableScripts,a=vi(e),i=l.get(a);i||(i=n.querySelector(mu(a)),i||(e=L({src:e,async:!0},t),(t=En.get(a))&&Xo(e,t),i=n.createElement("script"),We(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function bm(e,t){hl.M(e,t);var n=pi;if(n&&e){var l=Un(n).hoistableScripts,a=vi(e),i=l.get(a);i||(i=n.querySelector(mu(a)),i||(e=L({src:e,async:!0,type:"module"},t),(t=En.get(a))&&Xo(e,t),i=n.createElement("script"),We(i),Yt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},l.set(a,i))}}function _0(e,t,n,l){var a=(a=ve.current)?Ms(a):null;if(!a)throw Error(r(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=yi(n.href),n=Un(a).hoistableStyles,l=n.get(t),l||(l={type:"style",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=yi(n.href);var i=Un(a).hoistableStyles,c=i.get(e);if(c||(a=a.ownerDocument||a,c={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,c),(i=a.querySelector(hu(e)))&&!i._p&&(c.instance=i,c.state.loading=5),En.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},En.set(e,n),i||xm(a,e,n,c.state))),t&&l===null)throw Error(r(528,""));return c}if(t&&l!==null)throw Error(r(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=vi(n),n=Un(a).hoistableScripts,l=n.get(t),l||(l={type:"script",instance:null,count:0,state:null},n.set(t,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,e))}}function yi(e){return'href="'+wt(e)+'"'}function hu(e){return'link[rel="stylesheet"]['+e+"]"}function L0(e){return L({},e,{"data-precedence":e.precedence,precedence:null})}function xm(e,t,n,l){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?l.loading=1:(t=e.createElement("link"),l.preload=t,t.addEventListener("load",function(){return l.loading|=1}),t.addEventListener("error",function(){return l.loading|=2}),Yt(t,"link",n),We(t),e.head.appendChild(t))}function vi(e){return'[src="'+wt(e)+'"]'}function mu(e){return"script[async]"+e}function U0(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var l=e.querySelector('style[data-href~="'+wt(n.href)+'"]');if(l)return t.instance=l,We(l),l;var a=L({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return l=(e.ownerDocument||e).createElement("style"),We(l),Yt(l,"style",a),Cs(l,n.precedence,e),t.instance=l;case"stylesheet":a=yi(n.href);var i=e.querySelector(hu(a));if(i)return t.state.loading|=4,t.instance=i,We(i),i;l=L0(n),(a=En.get(a))&&Go(l,a),i=(e.ownerDocument||e).createElement("link"),We(i);var c=i;return c._p=new Promise(function(m,y){c.onload=m,c.onerror=y}),Yt(i,"link",l),t.state.loading|=4,Cs(i,n.precedence,e),t.instance=i;case"script":return i=vi(n.src),(a=e.querySelector(mu(i)))?(t.instance=a,We(a),a):(l=n,(a=En.get(i))&&(l=L({},n),Xo(l,a)),e=e.ownerDocument||e,a=e.createElement("script"),We(a),Yt(a,"link",l),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(r(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(l=t.instance,t.state.loading|=4,Cs(l,n.precedence,e));return t.instance}function Cs(e,t,n){for(var l=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=l.length?l[l.length-1]:null,i=a,c=0;c<l.length;c++){var m=l[c];if(m.dataset.precedence===t)i=m;else if(i!==a)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Go(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Xo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var js=null;function B0(e,t,n){if(js===null){var l=new Map,a=js=new Map;a.set(n,l)}else a=js,l=a.get(n),l||(l=new Map,a.set(n,l));if(l.has(e))return l;for(l.set(e,null),n=n.getElementsByTagName(e),a=0;a<n.length;a++){var i=n[a];if(!(i[aa]||i[st]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var c=i.getAttribute(t)||"";c=e+c;var m=l.get(c);m?m.push(i):l.set(c,[i])}}return l}function k0(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Sm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function H0(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Em(e,t,n,l){if(n.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var a=yi(l.href),i=t.querySelector(hu(a));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=As.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=i,We(i);return}i=t.ownerDocument||t,l=L0(l),(a=En.get(a))&&Go(l,a),i=i.createElement("link"),We(i);var c=i;c._p=new Promise(function(m,y){c.onload=m,c.onerror=y}),Yt(i,"link",l),n.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=As.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Qo=0;function wm(e,t){return e.stylesheets&&e.count===0&&Ts(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var l=setTimeout(function(){if(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},6e4+t);0<e.imgBytes&&Qo===0&&(Qo=62500*lm());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ts(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>Qo?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(l),clearTimeout(a)}}:null}function As(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ts(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Ns=null;function Ts(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Ns=new Map,t.forEach(Mm,e),Ns=null,As.call(e))}function Mm(e,t){if(!(t.state.loading&4)){var n=Ns.get(e);if(n)var l=n.get(null);else{n=new Map,Ns.set(e,n);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<a.length;i++){var c=a[i];(c.nodeName==="LINK"||c.getAttribute("media")!=="not all")&&(n.set(c.dataset.precedence,c),l=c)}l&&n.set(null,l)}a=t.instance,c=a.getAttribute("data-precedence"),i=n.get(c)||l,i===l&&n.set(null,a),n.set(c,a),this.count++,l=As.bind(this),a.addEventListener("load",l),a.addEventListener("error",l),i?i.parentNode.insertBefore(a,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var gu={$$typeof:W,Provider:null,Consumer:null,_currentValue:le,_currentValue2:le,_threadCount:0};function Cm(e,t,n,l,a,i,c,m,y){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=ot(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ot(0),this.hiddenUpdates=ot(null),this.identifierPrefix=l,this.onUncaughtError=a,this.onCaughtError=i,this.onRecoverableError=c,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=y,this.incompleteTransitions=new Map}function q0(e,t,n,l,a,i,c,m,y,N,H,X){return e=new Cm(e,t,n,c,y,N,H,X,m),t=1,i===!0&&(t|=24),i=cn(3,null,null,t),e.current=i,i.stateNode=e,t=Ec(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:l,isDehydrated:n,cache:t},jc(i),e}function Y0(e){return e?(e=Ja,e):Ja}function G0(e,t,n,l,a,i){a=Y0(a),l.context===null?l.context=a:l.pendingContext=a,l=Dl(t),l.payload={element:n},i=i===void 0?null:i,i!==null&&(l.callback=i),n=zl(e,l,t),n!==null&&(tn(n,e,t),Ki(n,e,t))}function X0(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zo(e,t){X0(e,t),(e=e.alternate)&&X0(e,t)}function Q0(e){if(e.tag===13||e.tag===31){var t=pa(e,67108864);t!==null&&tn(t,e,67108864),Zo(e,67108864)}}function Z0(e){if(e.tag===13||e.tag===31){var t=hn();t=Zn(t);var n=pa(e,t);n!==null&&tn(n,e,t),Zo(e,t)}}var Ds=!0;function jm(e,t,n,l){var a=D.T;D.T=null;var i=Z.p;try{Z.p=2,Vo(e,t,n,l)}finally{Z.p=i,D.T=a}}function Am(e,t,n,l){var a=D.T;D.T=null;var i=Z.p;try{Z.p=8,Vo(e,t,n,l)}finally{Z.p=i,D.T=a}}function Vo(e,t,n,l){if(Ds){var a=Ko(l);if(a===null)Oo(e,t,l,zs,n),K0(e,l);else if(Tm(a,e,t,n,l))l.stopPropagation();else if(K0(e,l),t&4&&-1<Nm.indexOf(e)){for(;a!==null;){var i=$n(a);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var c=O(i.pendingLanes);if(c!==0){var m=i;for(m.pendingLanes|=2,m.entangledLanes|=2;c;){var y=1<<31-ft(c);m.entanglements[1]|=y,c&=~y}Gn(i),(Ze&6)===0&&(hs=gt()+500,ou(0))}}break;case 31:case 13:m=pa(i,2),m!==null&&tn(m,i,2),gs(),Zo(i,2)}if(i=Ko(l),i===null&&Oo(e,t,l,zs,n),i===a)break;a=i}a!==null&&l.stopPropagation()}else Oo(e,t,l,null,n)}}function Ko(e){return e=Ti(e),$o(e)}var zs=null;function $o(e){if(zs=null,e=bl(e),e!==null){var t=g(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=v(t),e!==null)return e;e=null}else if(n===31){if(e=C(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return zs=e,null}function V0(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(Fl()){case Wl:return 2;case Ra:return 8;case gl:case Il:return 32;case pl:return 268435456;default:return 32}default:return 32}}var Jo=!1,Gl=null,Xl=null,Ql=null,pu=new Map,yu=new Map,Zl=[],Nm="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 K0(e,t){switch(e){case"focusin":case"focusout":Gl=null;break;case"dragenter":case"dragleave":Xl=null;break;case"mouseover":case"mouseout":Ql=null;break;case"pointerover":case"pointerout":pu.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":yu.delete(t.pointerId)}}function vu(e,t,n,l,a,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:l,nativeEvent:i,targetContainers:[a]},t!==null&&(t=$n(t),t!==null&&Q0(t)),e):(e.eventSystemFlags|=l,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function Tm(e,t,n,l,a){switch(t){case"focusin":return Gl=vu(Gl,e,t,n,l,a),!0;case"dragenter":return Xl=vu(Xl,e,t,n,l,a),!0;case"mouseover":return Ql=vu(Ql,e,t,n,l,a),!0;case"pointerover":var i=a.pointerId;return pu.set(i,vu(pu.get(i)||null,e,t,n,l,a)),!0;case"gotpointercapture":return i=a.pointerId,yu.set(i,vu(yu.get(i)||null,e,t,n,l,a)),!0}return!1}function $0(e){var t=bl(e.target);if(t!==null){var n=g(t);if(n!==null){if(t=n.tag,t===13){if(t=v(n),t!==null){e.blockedOn=t,na(e.priority,function(){Z0(n)});return}}else if(t===31){if(t=C(n),t!==null){e.blockedOn=t,na(e.priority,function(){Z0(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Os(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ko(e.nativeEvent);if(n===null){n=e.nativeEvent;var l=new n.constructor(n.type,n);Ni=l,n.target.dispatchEvent(l),Ni=null}else return t=$n(n),t!==null&&Q0(t),e.blockedOn=n,!1;t.shift()}return!0}function J0(e,t,n){Os(e)&&n.delete(t)}function Dm(){Jo=!1,Gl!==null&&Os(Gl)&&(Gl=null),Xl!==null&&Os(Xl)&&(Xl=null),Ql!==null&&Os(Ql)&&(Ql=null),pu.forEach(J0),yu.forEach(J0)}function Rs(e,t){e.blockedOn===t&&(e.blockedOn=null,Jo||(Jo=!0,u.unstable_scheduleCallback(u.unstable_NormalPriority,Dm)))}var _s=null;function F0(e){_s!==e&&(_s=e,u.unstable_scheduleCallback(u.unstable_NormalPriority,function(){_s===e&&(_s=null);for(var t=0;t<e.length;t+=3){var n=e[t],l=e[t+1],a=e[t+2];if(typeof l!="function"){if($o(l||n)===null)continue;break}var i=$n(n);i!==null&&(e.splice(t,3),t-=3,Vc(i,{pending:!0,data:a,method:n.method,action:l},l,a))}}))}function bi(e){function t(y){return Rs(y,e)}Gl!==null&&Rs(Gl,e),Xl!==null&&Rs(Xl,e),Ql!==null&&Rs(Ql,e),pu.forEach(t),yu.forEach(t);for(var n=0;n<Zl.length;n++){var l=Zl[n];l.blockedOn===e&&(l.blockedOn=null)}for(;0<Zl.length&&(n=Zl[0],n.blockedOn===null);)$0(n),n.blockedOn===null&&Zl.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(l=0;l<n.length;l+=3){var a=n[l],i=n[l+1],c=a[Lt]||null;if(typeof i=="function")c||F0(n);else if(c){var m=null;if(i&&i.hasAttribute("formAction")){if(a=i,c=i[Lt]||null)m=c.formAction;else if($o(a)!==null)continue}else m=c.action;typeof m=="function"?n[l+1]=m:(n.splice(l,3),l-=3),F0(n)}}}function W0(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(c){return a=c})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),l||setTimeout(n,20)}function n(){if(!l&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var l=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){l=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function Fo(e){this._internalRoot=e}Ls.prototype.render=Fo.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(r(409));var n=t.current,l=hn();G0(n,l,e,t,null,null)},Ls.prototype.unmount=Fo.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;G0(e.current,2,null,e,null,null),gs(),t[Kn]=null}};function Ls(e){this._internalRoot=e}Ls.prototype.unstable_scheduleHydration=function(e){if(e){var t=Vn();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Zl.length&&t!==0&&t<Zl[n].priority;n++);Zl.splice(n,0,e),n===0&&$0(e)}};var I0=s.version;if(I0!=="19.2.8")throw Error(r(527,I0,"19.2.8"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(r(188)):(e=Object.keys(e).join(","),Error(r(268,e)));return e=x(t),e=e!==null?_(e):null,e=e===null?null:e.stateNode,e};var zm={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Us=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Us.isDisabled&&Us.supportsFiber)try{Zt=Us.inject(zm),Rt=Us}catch{}}return xu.createRoot=function(e,t){if(!h(e))throw Error(r(299));var n=!1,l="",a=id,i=ud,c=sd;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(l=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=q0(e,1,!1,null,null,n,l,null,a,i,c,W0),e[Kn]=t.current,zo(e),new Fo(t)},xu.hydrateRoot=function(e,t,n){if(!h(e))throw Error(r(299));var l=!1,a="",i=id,c=ud,m=sd,y=null;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(m=n.onRecoverableError),n.formState!==void 0&&(y=n.formState)),t=q0(e,1,!0,t,n??null,l,a,y,i,c,m,W0),t.context=Y0(null),n=t.current,l=hn(),l=Zn(l),a=Dl(l),a.callback=null,zl(n,a,l),n=l,t.current.lanes=n,Ke(t,n),Gn(t),e[Kn]=t.current,zo(e),new Ls(t)},xu.version="19.2.8",xu}var c1;function Ym(){if(c1)return Po.exports;c1=1;function u(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(u)}catch(s){console.error(s)}}return u(),Po.exports=qm(),Po.exports}var Gm=Ym();function lr(u,s,f){return u+(s-u)*f}function B1(u){return u-Math.floor(u)}function ar(u,s){const f=Math.floor(u),r=Math.floor(s);let h=u-f,g=s-r;h=h*h*(3-2*h),g=g*g*(3-2*g);const v=Cn(f,r),C=Cn(f+1,r),E=Cn(f,r+1),x=Cn(f+1,r+1);return v+(C-v)*h+(E-v)*g+(v-C-E+x)*h*g}function Cn(u,s){const f=Math.sin(u*12.9898+s*78.233)*43758.5453;return f-Math.floor(f)}function Er(u,s){const f=Math.PI*(3-Math.sqrt(5)),r=1-2*(u+.5)/s,h=Math.sqrt(1-r*r),g=u*f;return[h*Math.cos(g),r,h*Math.sin(g)]}function Xm(u,s){return Math.atan2(Math.sin(u-s),Math.cos(u-s))}function Da(u,s,f,r,h){const g=Math.sin(s),v=Math.cos(s),C=Math.sin(u),E=Math.cos(u);return(x,_,L)=>{const B=x*E+L*C,Y=-x*C+L*E,R=_*v-Y*g,te=_*g+Y*v;return[f+B*h,r-R*h,te]}}function $l(u,s,f,r=.3){s.sort((h,g)=>h.z-g.z);for(const h of s){const g=h.a??1;if(g<.02)continue;const v=Math.min(1,Math.max(0,h.white)),C=Math.round((f?1-v:v)*255);u.fillStyle=`rgba(${C},${C},${C},${g})`,u.beginPath(),u.arc(h.x,h.y,Math.max(r,h.r),0,Math.PI*2),u.fill()}}function Qm(u,s,f){for(const r of s){const h=r.a??1;if(h<.02)continue;const g=Math.min(1,Math.max(0,r.white)),v=Math.round((f?1-g:g)*255);u.strokeStyle=`rgba(${v},${v},${v},${h})`,u.lineWidth=r.w,u.beginPath(),u.moveTo(r.x1,r.y1),u.lineTo(r.x2,r.y2),u.stroke()}}function za(u,s){return(u/300)**s}const Zm=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.76,E=Da(f*.4,.3,g,v,1),x=za(s,h.rsPow??.6),_=[],L=h.ghostN??150;for(let R=0;R<L;R++){const te=Er(R,L),[se,V,Q]=E(te[0]*C,te[1]*C,te[2]*C),W=(Q/C+1)/2;_.push({x:se,y:V,z:Q,r:.8*x,white:.78,a:.1+.22*W})}const B=h.strandN??52,Y=h.turns??3;for(let R=0;R<3;R++){const te=R/3*2*Math.PI;for(let se=0;se<B;se++){const V=(B1(se/B+f*.045)*2-1)*.96,Q=Math.sqrt(Math.max(0,1-V*V)),W=Math.min(1,(1-Math.abs(V))/.1),ie=V*Math.PI*Y+te,ue=1+.075*Math.sin(V*Math.PI*Y*2+te*2+f*.8),p=Q*C*ue,[I,fe,me]=E(Math.cos(ie)*p,V*C*ue,Math.sin(ie)*p),ge=(me/C+1)/2;_.push({x:I,y:fe,z:me,r:((h.rBase??1.2)+(h.rDepth??1.8)*ge)*x,white:.55-.45*ge,a:W*(.45+.55*ge)})}}$l(u,_,r,h.rMin)};function Vm(u,s,f,r){const h=2*s*f+r,g=u%h,v=new Array(s).fill(0);let C=-1;if(g<2*s*f){const E=Math.floor(g/f),x=(g-E*f)/f,_=1-(1-Math.min(1,x/.7))**3;if(E<s){for(let L=0;L<E;L++)v[L]=1;v[E]=_,C=E}else{const L=2*s-1-E;for(let B=0;B<L;B++)v[B]=1;v[L]=1-_,C=L}}return{amount:v,active:C}}function Km(u,s,f){let[r,h,g]=u,v=!1;for(let C=0;C<s.length;C++){if(f.amount[C]<=0)continue;const E=s[C],x=E.axis===0?r:E.axis===1?h:g;if(x<E.lo||x>=E.hi)continue;C===f.active&&(v=!0);const _=E.ang*f.amount[C],L=Math.cos(_),B=Math.sin(_);if(E.axis===0){const Y=h*L-g*B;g=h*B+g*L,h=Y}else if(E.axis===1){const Y=r*L+g*B;g=-r*B+g*L,r=Y}else{const Y=r*L-h*B;h=r*B+h*L,r=Y}}return[r,h,g,v]}function $m(u){const s=[];for(let f=0;f<u;f++){const r=Math.min(2,Math.floor(Cn(f,2.3)*3)),h=-1+.5*Math.min(3,Math.floor(Cn(f,5.9)*4)),g=Cn(f,7.7)<.5?1:-1;s.push({axis:r,lo:h,hi:h+.5,ang:g*Math.PI/2})}return s}const Jm=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.82,E=.4+.06*Math.sin(f*.35),x=Da(f*.5,E,g,v,C),_=f*(.5+(1.7-.5)*(h.scanMul??1)),L=za(s,h.rsPow??.6),B=h.dimBase??1,Y=[],R=h.latRings??17,te=h.lonDensity??44;for(let se=0;se<=R;se++){const V=-Math.PI/2+se/R*Math.PI,Q=Math.cos(V),W=Math.sin(V),ie=Math.max(1,Math.round(Math.abs(Q)*te));for(let ue=0;ue<ie;ue++){const p=ue/ie*2*Math.PI,[I,fe,me]=x(Q*Math.cos(p),W,Q*Math.sin(p)),ge=(me+1)/2,Ee=Xm(p+f*.5,_),he=Math.exp(-(Ee*Ee)/.18)*Math.max(0,me);Y.push({x:I,y:fe,z:me,r:((h.rBase??.6)+(h.rDepth??1.7)*ge+(h.rBoost??1)*he)*L,white:(h.inkFar??.62)-(h.inkSpan??.54)*ge,a:B+(1-B)*Math.min(1,he)})}}$l(u,Y,r,h.rMin)},Fm=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.82,E=Da(f*.55,.35+.1*Math.sin(f*.9),g,v,C),x=za(s,h.rsPow??.6),_=h.moveCount??14,L=$m(_),B=Vm(f,_,.42,1.2),Y=[],R=h.latRings??15,te=h.lonDensity??40;for(let se=0;se<=R;se++){const V=-Math.PI/2+se/R*Math.PI,Q=Math.cos(V),W=Math.sin(V),ie=Math.max(1,Math.round(Math.abs(Q)*te));for(let ue=0;ue<ie;ue++){const p=ue/ie*2*Math.PI,[I,fe,me,ge]=Km([Q*Math.cos(p),W,Q*Math.sin(p)],L,B),[Ee,he,qe]=E(I,fe,me),Ae=(qe+1)/2;Y.push({x:Ee,y:he,z:qe,r:((h.rBase??.6)+(h.rDepth??1.7)*Ae+(ge?h.rActive??.3:0))*x,white:(h.inkFar??.62)-(h.inkSpan??.54)*Ae-(ge?.14:0)})}}$l(u,Y,r,h.rMin)},Wm=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.874,E=Da(f*.18,.38,g,v,1),x=za(s,h.rsPow??.6),_=[],L=h.rings??15,B=h.lonDensity??40;for(let Y=0;Y<=L;Y++){const R=-Math.PI/2+Y/L*Math.PI,te=Math.cos(R),se=Math.sin(R),V=.62*Math.sin(f*2.1-Y*.52)+.38*Math.sin(f*1.27+Y*.83),Q=C*(.88+.105*V),W=Math.max(1,Math.round(Math.abs(te)*B));for(let ie=0;ie<W;ie++){const ue=ie/W*2*Math.PI,[p,I,fe]=E(te*Math.cos(ue)*Q,se*Q,te*Math.sin(ue)*Q),me=(fe/C+1)/2,ge=Math.max(0,V);_.push({x:p,y:I,z:fe,r:((h.rBase??.6)+(h.rDepth??1.7)*me)*(1+.4*ge)*x,white:.66-.56*me-.1*ge})}}$l(u,_,r,h.rMin)};function Im(u){return u*u*(3-2*u)}function k1(u){const s=u.length,f=[];let r=0;for(let h=0;h<s;h++){const g=u[h],v=u[(h+1)%s],C=Math.hypot(v[0]-g[0],v[1]-g[1]);f.push(C),r+=C}return h=>{let g=h*r,v=0;for(;g>f[v]&&v<s-1;)g-=f[v],v++;const C=u[v],E=u[(v+1)%s],x=f[v]?Math.min(1,g/f[v]):0;return[C[0]+(E[0]-C[0])*x,C[1]+(E[1]-C[1])*x]}}const Pm=u=>{const s=-Math.PI/2+u*2*Math.PI;return[Math.cos(s)*.24,Math.sin(s)*.24]},eg=k1([[0,-.26],[.24,.16],[-.24,.16]]),tg=k1([[0,-.2],[.2,-.2],[.2,.2],[-.2,.2],[-.2,-.2]]),ir=[Pm,eg,tg];function ng(u){return Math.max(6,Math.round(34*u))}const mr=1.4,H1=.9,ur=mr+H1,lg=(u,s,f,r,h)=>{const g=ir.length,v=f%(ur*g),C=Math.floor(v/ur),E=v-C*ur,x=E>mr?Im((E-mr)/H1):0,_=h.spread??1,L=ir[C],B=ir[(C+1)%g],Y=160,R=[];for(let fe=0;fe<Y;fe++){const me=fe/Y,ge=L(me),Ee=B(me);R.push([(ge[0]+(Ee[0]-ge[0])*x)*_,(ge[1]+(Ee[1]-ge[1])*x)*_])}const te=[];let se=0;for(let fe=0;fe<Y;fe++){const me=R[fe],ge=R[(fe+1)%Y],Ee=Math.hypot(ge[0]-me[0],ge[1]-me[1]);te.push(Ee),se+=Ee}const V=ng(h.iconD??1),Q=(h.rDot??.021)*1.35*_,W=1+.02*Math.sin(E*3.1),ie=[],ue=s/2;let p=0,I=0;for(let fe=0;fe<V;fe++){const me=fe/V*se;for(;I+te[p]<me&&p<Y-1;)I+=te[p],p++;const ge=R[p],Ee=R[(p+1)%Y],he=te[p]?Math.min(1,(me-I)/te[p]):0,qe=(ge[0]+(Ee[0]-ge[0])*he)*W,Ae=(ge[1]+(Ee[1]-ge[1])*he)*W;ie.push({x:ue+qe*s,y:ue+Ae*s,z:0,r:Math.max(.35,Q*s),white:.1})}$l(u,ie,r,h.rMin)},ag=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.82,E=Da(f*.12,.3,g,v,1),x=za(s,h.rsPow??.6),_=[],L=h.orbitN??12,B=h.ghostN??40,Y=h.particles??3;for(let R=0;R<L;R++){const te=Cn(R,1.7),se=Cn(R,5.2),V=Cn(R,8.9),Q=C*(.45+.52*te),W=te*2*Math.PI,ie=Math.acos(2*se-1),ue=Math.sin(ie)*Math.cos(W),p=Math.cos(ie),I=Math.sin(ie)*Math.sin(W);let fe=-p,me=ue;const ge=0,Ee=Math.max(1e-6,Math.sqrt(fe*fe+me*me));fe/=Ee,me/=Ee;const he=p*ge-I*me,qe=I*fe-ue*ge,Ae=ue*me-p*fe,ke=(.25+.55*V)*(V>.5?1:-1);for(let D=0;D<B;D++){const Z=D/B*2*Math.PI,[le,be,Me]=E((fe*Math.cos(Z)+he*Math.sin(Z))*Q,(me*Math.cos(Z)+qe*Math.sin(Z))*Q,(ge*Math.cos(Z)+Ae*Math.sin(Z))*Q),b=(Me/Q+1)/2;_.push({x:le,y:be,z:Me,r:(h.ghostR??.9)*x,white:.72,a:(h.ghostA??.5)*(.4+.6*b)})}for(let D=0;D<Y;D++){const Z=f*ke+D/Y*2*Math.PI+se*6,[le,be,Me]=E((fe*Math.cos(Z)+he*Math.sin(Z))*Q,(me*Math.cos(Z)+qe*Math.sin(Z))*Q,(ge*Math.cos(Z)+Ae*Math.sin(Z))*Q),b=(Me/Q+1)/2;_.push({x:le,y:be,z:Me,r:((h.partR??1.2)+(h.partRDepth??1.6)*b)*x,white:.3-.22*b})}}$l(u,_,r,h.rMin)},o1=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.78,E=h.spin??1,x=.3,_=Da(f*.1*E,x,g,v,1),L=za(s,h.rsPow??.6),B=[],Y=h.ghostN??150;for(let Ae=0;Ae<Y;Ae++){const ke=Er(Ae,Y),[D,Z,le]=_(ke[0]*C,ke[1]*C,ke[2]*C),be=(le/C+1)/2;B.push({x:D,y:Z,z:le,r:.8*L,white:.78,a:.1+.22*be})}const R=f*.24*E,te=h.faceOn?-x:.55+.3*Math.sin(f*.18)*E,se=Math.cos(R),V=0,Q=Math.sin(R),W=-Q*Math.sin(te),ie=Math.cos(te),ue=se*Math.sin(te),p=V*ue-Q*ie,I=Q*W-se*ue,fe=se*ie-V*W,me=.23*(h.wobMul??1),ge=h.faceOn?C/(1+.85*me):C,Ee=h.lanes??5,he=h.segs??88,qe=Math.max(1,Math.round(Ee*(h.bandMul??1)));for(let Ae=0;Ae<qe;Ae++){const ke=(Ae-(qe-1)/2)*.075,D=Math.abs(Ae-(qe-1)/2)/Math.max(1,(qe-1)/2);for(let Z=0;Z<he;Z++){const le=Z/he*2*Math.PI,be=(.16*Math.sin(le*3-f*1.7+Ae*.22)+.07*Math.sin(le*5+f*1.1))*(h.wobMul??1),Me=h.faceOn?1+be:1,b=h.faceOn?ke:ke+be,U=se*Math.cos(le)+W*Math.sin(le)+p*b,F=V*Math.cos(le)+ie*Math.sin(le)+I*b,ne=Q*Math.cos(le)+ue*Math.sin(le)+fe*b,oe=Math.sqrt(U*U+F*F+ne*ne),ve=ge*Me,[k,K,J]=_(U/oe*ve,F/oe*ve,ne/oe*ve),ae=(J/C+1)/2;B.push({x:k,y:K,z:J,r:((h.rBase??1.1)+(h.rDepth??1.7)*ae)*(1-.25*D)*L,white:.52-.44*ae+.18*D,a:.4+.6*ae})}}$l(u,B,r,h.rMin)},ig=(u,s,f,r,h)=>{const g=s/2,v=s/2,C=s/2*.8*(h.spread??1),E=Da(f*.12,.32,g,v,C),x=za(s,h.rsPow??.6),_=h.nodeN??30,L=h.thr??.72,B=h.nodeR??1.4,Y=h.nodeRDepth??1.8,R=[];for(let Q=0;Q<_;Q++){const W=Er(Q,_),ie=W[0]+.3*(ar(Q*.31+9,f*.24)-.5)*2,ue=W[1]+.3*(ar(Q*.53+27,f*.21)-.5)*2,p=W[2]+.3*(ar(Q*.77+55,f*.27)-.5)*2,I=Math.sqrt(ie*ie+ue*ue+p*p);R.push([ie/I,ue/I,p/I])}const te=[],se=[];for(let Q=0;Q<_;Q++)for(let W=Q+1;W<_;W++){const ie=R[Q][0]-R[W][0],ue=R[Q][1]-R[W][1],p=R[Q][2]-R[W][2],I=Math.sqrt(ie*ie+ue*ue+p*p);if(I>=L)continue;const[fe,me,ge]=E(R[Q][0],R[Q][1],R[Q][2]),[Ee,he,qe]=E(R[W][0],R[W][1],R[W][2]),Ae=((ge+qe)/2+1)/2;te.push({x1:fe,y1:me,x2:Ee,y2:he,white:.42,a:(1-I/L)*(.3+.55*Ae),w:Math.max(.6,(h.lineW??.8)*x)})}for(let Q=0;Q<_;Q++){const[W,ie,ue]=E(R[Q][0],R[Q][1],R[Q][2]),p=(ue+1)/2,I=1+.25*Math.sin(f*1.4+Q*2.7);se.push({x:W,y:ie,z:ue,r:(B+Y*p)*I*x,white:.55-.45*p})}const V=h.signals??5;for(let Q=0;Q<V;Q++){const W=Math.floor(f*.55+Q*7.31),ie=Math.floor(Cn(W,Q*3.1+1.7)*_),ue=Math.floor(Cn(W,Q*5.7+4.2)*_);if(ie===ue)continue;const p=B1(f*.55+Q*7.31),I=lr(R[ie][0],R[ue][0],p),fe=lr(R[ie][1],R[ue][1],p),me=lr(R[ie][2],R[ue][2],p),ge=Math.max(1e-6,Math.sqrt(I*I+fe*fe+me*me)),[Ee,he,qe]=E(I/ge,fe/ge,me/ge),Ae=(qe+1)/2;se.push({x:Ee,y:he,z:qe,r:(B*1.5+Y*Ae)*x,white:.05,a:.5+.5*Ae})}Qm(u,te,r),$l(u,se,r,h.rMin)},ug={orbits:ag,globe:Jm,rubik:Fm,wave:Wm,web:ig,braid:Zm,ribbon:o1,ring:o1,morph:lg},sg=[["latRings","lonDensity"],["rings","lonDensity"],["lanes","segs"]],cg=["orbitN","ghostN","nodeN","strandN","signals"],og=["iconD"],rg=["rBase","rDepth","rActive","rDot","ghostR","partR","partRDepth","nodeR","nodeRDepth"];function fg(u,s){const f={...u},r=new Set,h=Math.sqrt(s);for(const[g,v]of sg){const C=f[g],E=f[v];C!=null&&E!=null&&!r.has(g)&&!r.has(v)&&(f[g]=Math.max(2,Math.round(C*h)),f[v]=Math.max(2,Math.round(E*h)),r.add(g),r.add(v))}for(const g of cg){const v=f[g];v!=null&&v!==0&&!r.has(g)&&(f[g]=Math.max(1,Math.round(v*s)))}for(const g of og){const v=f[g];v!=null&&(f[g]=Math.max(.02,v*s))}return f}function dg(u,s){const f={...u};for(const r of rg){const h=f[r];h!=null&&(f[r]=h*s)}return f.rSizeMul=(f.rSizeMul??1)*s,f}const hg={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}},mg={working:"orbits",searching:"globe",solving:"rubik",listening:"wave",connecting:"web",weaving:"braid",composing:"ribbon",breathing:"ring",shaping:"morph"},gg={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}}}},r1=new Map;function pg(u,s){const f=`${u}-${s}`,r=r1.get(f);if(r)return r;const h=mg[u],g=gg[h][s];let v={...hg[h]};g.count!==1&&(v=fg(v,g.count)),g.size!==1&&(v=dg(v,g.size)),g.extra&&(v={...v,...g.extra});const C={mode:h,speed:g.speed,opts:v};return r1.set(f,C),C}function yg(u){let s=u;for(;s;){const f=s.getAttribute("data-theme");if(f==="dark")return!0;if(f==="light")return!1;if(s.classList.contains("dark"))return!0;if(s.classList.contains("light"))return!1;s=s.parentElement}return null}function vg(){return typeof matchMedia>"u"||matchMedia("(prefers-color-scheme: dark)").matches}function bg(u,s){const[f,r]=M.useState(!0);return M.useEffect(()=>{if(u==="dark"){r(!0);return}if(u==="light"){r(!1);return}const h=()=>{const E=yg(s.current);r(E??vg())};h();const g=typeof matchMedia<"u"?matchMedia("(prefers-color-scheme: dark)"):null,v=()=>h();g?.addEventListener("change",v);let C=null;return typeof MutationObserver<"u"&&s.current&&(C=new MutationObserver(h),C.observe(document.documentElement,{attributes:!0,attributeFilter:["class","data-theme"],subtree:!0})),()=>{g?.removeEventListener("change",v),C?.disconnect()}},[u,s]),f}function xg(){const[u,s]=M.useState(!1);return M.useEffect(()=>{if(typeof matchMedia>"u")return;const f=matchMedia("(prefers-reduced-motion: reduce)");s(f.matches);const r=h=>s(h.matches);return f.addEventListener("change",r),()=>f.removeEventListener("change",r)},[]),u}const Sg={working:"Working…",searching:"Searching…",solving:"Solving…",listening:"Listening…",connecting:"Connecting…",weaving:"Weaving…",composing:"Composing…",breathing:"Thinking…",shaping:"Shaping…"};function gr({state:u="working",size:s=64,theme:f="auto",speed:r=1,paused:h=!1,style:g,"aria-label":v,...C}){const E=M.useRef(null),x=bg(f,E),_=xg();return M.useEffect(()=>{const L=E.current;if(!L)return;const B=Math.min(2,typeof devicePixelRatio<"u"&&devicePixelRatio||1);L.width=Math.round(s*B),L.height=Math.round(s*B);const Y=L.getContext("2d");if(!Y)return;const{mode:R,speed:te,opts:se}=pg(u,s),V=ug[R],Q=te*r,W=he=>{Y.setTransform(B,0,0,B,0,0),Y.clearRect(0,0,s,s),V(Y,s,he,x,se)};if(_){W(.6);return}let ie=0,ue=!1;const p=()=>{W(performance.now()/1e3*Q),ue&&(ie=requestAnimationFrame(p))},I=()=>{ue||h||(ue=!0,ie=requestAnimationFrame(p))},fe=()=>{ue=!1,cancelAnimationFrame(ie)};W(performance.now()/1e3*Q);let me=!0;const ge=typeof IntersectionObserver<"u"?new IntersectionObserver(([he])=>{me=he.isIntersecting,me&&document.visibilityState!=="hidden"?I():fe()}):null;ge?.observe(L);const Ee=()=>{document.visibilityState==="hidden"?fe():me&&I()};return document.addEventListener("visibilitychange",Ee),ge||I(),()=>{fe(),ge?.disconnect(),document.removeEventListener("visibilitychange",Ee)}},[u,s,x,r,h,_]),o.jsx("canvas",{ref:E,role:"img","aria-label":v??Sg[u],style:{width:s,height:s,display:"block",...g},...C})}const sr=["searching","solving","composing","breathing","shaping"];function Eg(u){const s=Math.floor(u*sr.length);return sr[Math.min(sr.length-1,Math.max(0,s))]}const pr=Eg(Math.random()),Ta="ease-[cubic-bezier(0.32,0.72,0,1)]",q1=274,Y1=395,G1=368,X1=[{label:"Full",width:null},{label:"1440",width:1440},{label:"834",width:834},{label:"390",width:390}],Kl={collapsed:!1,collapsedFamilies:[],deleted:[],corner:"bottom-right",font:"satoshi",hidden:[],order:[],renames:{},scaleSplit:!0,showDevOverlays:!0,showWidget:!0,viewport:null,width:G1};function wg(u){return`leglas:${u}`}function Mg(u,s){const f=s.map(r=>r.title);try{if(!u)return{...Kl,order:f};const r=JSON.parse(u),h={...Kl,...r},g=(Array.isArray(h.deleted)?h.deleted:[]).filter(x=>f.includes(x)),v=f.filter(x=>!g.includes(x)),C=(Array.isArray(h.order)?h.order:[]).filter(x=>v.includes(x)),E=["bottom-left","bottom-right","top-left","top-right"];return{collapsed:!!h.collapsed,collapsedFamilies:(Array.isArray(h.collapsedFamilies)?h.collapsedFamilies:[]).filter(x=>v.includes(x)),corner:E.includes(h.corner)?h.corner:Kl.corner,deleted:g,font:typeof h.font=="string"?h.font:Kl.font,hidden:(Array.isArray(h.hidden)?h.hidden:[]).filter(x=>v.includes(x)),order:[...C,...v.filter(x=>!C.includes(x))],renames:Object.fromEntries(Object.entries(h.renames??{}).filter(([x])=>v.includes(x))),scaleSplit:typeof r.scaleSplit=="boolean"?r.scaleSplit:Kl.scaleSplit,showDevOverlays:typeof r.showDevOverlays=="boolean"?r.showDevOverlays:Kl.showDevOverlays,showWidget:typeof r.showWidget=="boolean"?r.showWidget:Kl.showWidget,viewport:X1.some(x=>x.width===h.viewport)?h.viewport:null,width:Number.isFinite(h.width)?Math.round(Math.min(Y1,Math.max(q1,h.width))):G1}}catch{return{...Kl,order:f}}}function Cg(u,s){const f=new Set(s),r=Object.fromEntries(Object.entries(u.renames).filter(([h])=>!f.has(h)));return{...u,collapsedFamilies:u.collapsedFamilies.filter(h=>!f.has(h)),deleted:[...new Set([...u.deleted,...s])],hidden:u.hidden.filter(h=>!f.has(h)),order:u.order.filter(h=>!f.has(h)),renames:r}}function jg(u,s){if(u.length===0)return[...s];const f=new Set(s),r=u.filter(g=>f.has(g)),h=new Set(r);return[...r,...s.filter(g=>!h.has(g))]}function Ag(u,s,f,r){const h=s.map(x=>x.title),g=(u.order.length?u.order:h).filter(x=>x!==f),C=g.filter(x=>!u.hidden.includes(x))[r],E=C===void 0?g.length:g.indexOf(C);return g.splice(E,0,f),g}const Q1=8,Ng=8;function Tg(u,s,f=Q1){return u.left<f?f-u.left:u.right>s-f?Math.max(f-u.left,s-f-u.right):0}function Dg(u,s,f,r=Q1){if(u.top>=r)return!1;const h=u.bottom-u.top;return s.bottom+r+h<=f-r}function zg(u,s,f,r){const h=u.at==="right"?u.x:u.x-s.width/2,g=u.at==="top"?u.y-s.height:u.at==="bottom"?u.y:u.y-s.height/2,v={bottom:g+s.height,left:h,right:h+s.width,top:g};if(u.at==="top"&&Dg(v,f,r.height))return{at:"bottom",shift:u.shift,y:f.bottom+Ng};const C=Tg(v,r.width);return C===u.shift?null:{at:u.at,shift:C,y:u.y}}function Eu({size:u=18}){return o.jsxs("svg",{"aria-hidden":!0,height:u,strokeLinejoin:"round",strokeWidth:22,viewBox:"160 370 1050 1320",width:Math.round(u*(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 Z1({height:u=16}){return o.jsxs("svg",{"aria-label":"Leglas",fill:"#E8ECF7",height:u,role:"img",viewBox:"1256 928 642 222",width:Math.round(u*(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 wn={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"},Su="flex h-6 w-6 items-center justify-center rounded text-[#D1D5DB] hover:bg-[#2E2E2E] hover:text-white";function cr({on:u}){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 ${u?"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 ${u?"translate-x-2.5 bg-[#17181B]":"bg-[#84848C]"}`})})}function Mn({d:u,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:u})})}let f1=0;function Ot({children:u,label:s,side:f="top",wide:r=!1}){const h=M.useRef(null),g=M.useRef(null),v=M.useRef(null),C=M.useRef(null),[E,x]=M.useState(null);M.useLayoutEffect(()=>{const Y=g.current,R=h.current?.firstElementChild;if(!E||E.out||!Y||!R)return;const te=zg(E,{height:Y.offsetHeight,width:Y.offsetWidth},R.getBoundingClientRect(),{height:window.innerHeight,width:window.innerWidth});te&&x(se=>se&&{...se,...te})},[s,E?.at,E?.out,E?.shift,E?.x,E?.y]),M.useEffect(()=>()=>{v.current&&clearTimeout(v.current),C.current&&clearTimeout(C.current)},[]);const _=()=>{const Y=h.current?.firstElementChild;if(!Y)return;const R=Y.getBoundingClientRect();C.current&&clearTimeout(C.current),x(f==="top"?{at:"top",out:!1,shift:0,x:R.left+R.width/2,y:R.top-8}:{at:"right",out:!1,shift:0,x:R.right+8,y:R.top+R.height/2})},L=()=>{v.current&&clearTimeout(v.current),v.current=setTimeout(_,Date.now()<f1?0:300)},B=()=>{v.current&&clearTimeout(v.current),f1=Date.now()+300,x(Y=>Y&&!Y.out?{...Y,out:!0}:Y),C.current&&clearTimeout(C.current),C.current=setTimeout(()=>x(null),120)};return o.jsxs("span",{className:"contents",onBlur:B,onFocus:Y=>{Y.target.matches(":focus-visible")&&_()},onPointerDown:B,onPointerEnter:L,onPointerLeave:B,ref:h,children:[u,E&&o.jsx("span",{"aria-hidden":!0,className:"pointer-events-none fixed z-[60]",style:{left:E.x+E.shift,top:E.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"}[E.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"} ${E.out?`leglas-tip-out-${E.at}`:`leglas-tip-in-${E.at}`}`,ref:g,children:s})})})]})}function Og({error:u,initial:s,label:f,onCancel:r,onCommit:h}){const g=M.useRef(!1);return M.useEffect(()=>{u&&(g.current=!1)}),o.jsx("form",{className:"leglas-rename min-w-0 flex-1",onSubmit:v=>{v.preventDefault();const C=new FormData(v.currentTarget).get("name");g.current=!0,h(typeof C=="string"?C.trim():"","submit")},children:o.jsx("input",{"aria-describedby":u?"leglas-rename-error":void 0,"aria-invalid":u?!0:void 0,"aria-label":f,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 ${u?"ring-amber-400/60":"ring-[#D1D5DB]/45 focus:ring-[#D1D5DB]/70"}`,defaultValue:s,name:"name",onBlur:v=>{g.current||h(v.currentTarget.value.trim(),"blur")},onKeyDown:v=>{v.key==="Escape"&&(g.current=!0,r())},type:"text"})})}const Rg={danger:"bg-amber-300",info:"bg-[#9CA3AF]",success:"bg-emerald-300"},_g=140;function Lg({onDismiss:u,toast:s}){const[f,r]=M.useState(!1),[h,g]=M.useState(!1),[v,C]=M.useState(!1),E=M.useRef(s.ttl),x=M.useRef(null),_=()=>{x.current||(r(!0),x.current=setTimeout(u,_g))},L=h||v;return M.useEffect(()=>{if(f||L||E.current===null)return;const B=Date.now(),Y=setTimeout(_,E.current);return()=>{clearTimeout(Y),E.current!==null&&(E.current=Math.max(0,E.current-(Date.now()-B)))}},[f,L]),M.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 ${f?"leglas-toast-out":"leglas-toast-in"}`,onBlur:()=>C(!1),onFocus:()=>C(!0),onPointerEnter:()=>g(!0),onPointerLeave:()=>g(!1),children:[o.jsx("span",{"aria-hidden":!0,className:`mt-[5px] size-1.5 shrink-0 rounded-full ${Rg[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(),_()},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:_,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 Ug({bottom:u,left:s,onDismiss:f,toasts:r,width:h}){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 ${Ta} motion-reduce:transition-none`,style:{bottom:u,left:s,width:h},children:r.map(g=>o.jsx(Lg,{onDismiss:()=>f(g.id),toast:g},g.id))})}function Bg({loaded:u}){return o.jsxs("div",{"aria-hidden":!0,className:`absolute inset-0 overflow-hidden bg-white transition-opacity duration-700 ${Ta} ${u?"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(gr,{"aria-label":"",size:20,state:pr,theme:"light"}),o.jsx("span",{className:"leglas-shimmer-text text-xs font-medium",children:"Loading preview…"})]})]})}function kg({branch:u,onStart:s,state:f}){if(f.status==="failed")return o.jsx(V1,{onReload:s,reason:f.reason});const r=f.status==="starting"?{"checking out":`Checking out ${u}`,installing:"Installing what it needs",starting:"Starting its dev server"}[f.phase]:`Opening ${u}`;return o.jsxs("div",{"aria-live":"polite",className:"absolute inset-0 flex flex-col items-center justify-center gap-3 bg-white p-6 text-center",children:[o.jsx("span",{className:"size-4 animate-spin rounded-full border-2 border-neutral-300 border-t-neutral-800 motion-reduce:animate-none"}),o.jsxs("div",{className:"max-w-xs",children:[o.jsx("p",{className:"text-sm font-medium text-neutral-800",children:r}),o.jsx("p",{className:"mt-1 text-xs leading-snug text-neutral-500",children:"A branch runs in its own checkout, built the first time you open it this session."})]})]})}function V1({onReload:u,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:u,type:"button",children:"Reload"})]})}function xi({id:u,size:s=14}){const f=M.useId();return u==="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"})}):u==="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"})}):u==="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:f,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(#${f})`}),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"})]}):u==="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}const yr=15e3,Hg=["config","requests","health"];function qg(u){return typeof u=="string"&&Hg.includes(u)}function Yg(u){if(typeof u!="string")return null;try{const s=JSON.parse(u);if(typeof s!="object"||s===null)return null;const f=Reflect.get(s,"changed");return qg(f)?f:null}catch{return null}}const d1=250,Gg=3e4;function Xg(u){return u<=0?d1:Math.min(Gg,d1*2**u)}function Qg(){const{host:u,protocol:s}=window.location;return`${s==="https:"?"wss":"ws"}://${u}/leglas/api/live`}let h1=null;function vr(){return h1??=Zg(),h1}function Zg(u={}){const s=u.connect??(B=>new WebSocket(B)),f=u.setTimeout??((B,Y)=>globalThis.setTimeout(B,Y)),r=u.clearTimeout??(B=>globalThis.clearTimeout(B)),h=new Map;let g=null,v=!1,C=0,E=null,x=!1;const _=()=>{if(x)return;let B;try{B=s(u.url??Qg())}catch{return L()}g=B,B.addEventListener("open",()=>{x||(v=!0,C=0)}),B.addEventListener("message",R=>{const te=Yg(R.data);if(te!==null)for(const se of h.get(te)??[])se()});const Y=()=>{g===B&&(v=!1,g=null,L())};B.addEventListener("close",Y),B.addEventListener("error",Y)},L=()=>{if(x||E!==null)return;const B=Xg(C);C+=1,E=f(()=>{E=null,_()},B)};return _(),{on(B,Y){const R=h.get(B)??new Set;return R.add(Y),h.set(B,R),()=>{R.delete(Y),R.size===0&&h.delete(B)}},get connected(){return v},stop(){x=!0,v=!1,E!==null&&r(E),E=null,h.clear();const B=g;g=null;try{B?.close()}catch{}}}}function Vg(u){return typeof u=="object"&&u!==null&&u.name==="AbortError"}const Kg=1e4,$g={setInterval:(u,s)=>globalThis.setInterval(u,s),clearInterval:u=>globalThis.clearInterval(u),setTimeout:(u,s)=>globalThis.setTimeout(u,s),clearTimeout:u=>globalThis.clearTimeout(u)};function br(u,s){const{everyMs:f,timeoutMs:r=Kg,timers:h=$g}=s;let g=!1,v=null;const C=()=>{if(g||v!==null)return;const _=new AbortController,L=h.setTimeout(()=>{_.abort(),v?.controller===_&&(v=null)},r),B={controller:_,deadline:L};v=B;const Y=()=>{v===B&&(h.clearTimeout(L),v=null)};u(_.signal).then(Y,Y)};C();const E=h.setInterval(C,f),x=s.subscribe?.(C);return()=>{g=!0,x?.(),h.clearInterval(E),v!==null&&(h.clearTimeout(v.deadline),v.controller.abort(),v=null)}}function Jg(u){const s=document.createElement("textarea");s.value=u,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 Fg(){return{clipboard:typeof navigator>"u"?void 0:navigator.clipboard,legacy:typeof document>"u"?void 0:Jg}}async function wr(u,s=Fg()){if(s.clipboard)try{return await s.clipboard.writeText(u),"copied"}catch{}try{if(s.legacy?.(u))return"copied"}catch{}return"blocked"}const Wg=9;function Ig(u){if((u.metaKey||u.ctrlKey)&&!u.altKey&&!u.shiftKey&&u.key.toLowerCase()==="k")return{kind:"search"};if(u.typing||u.metaKey||u.ctrlKey||u.altKey)return null;const{key:s}=u;if(s==="?")return{kind:"help"};if(s==="ArrowDown")return{kind:"move",delta:1};if(s==="ArrowUp")return{kind:"move",delta:-1};const f=s.length===1?s.toLowerCase():"";return f==="a"?{kind:"note"}:f==="c"?{kind:"split"}:f==="b"?{kind:"rail"}:f==="r"?{kind:"request"}:f==="t"?{kind:"tools"}:s.length===1&&s>="1"&&s<=String(Wg)?{kind:"jump",index:Number(s)-1}:null}function K1(u){return u?"⌘Cmd+K":"Ctrl+K"}function Pg(u){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:[K1(u)],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 e2(u,s,f){return`${u}\0${s}\0${f}`}function t2(u,s,f){return u[s]===f}function n2(u,s,f){return u[s]===f?u:{...u,[s]:f}}function l2(u,s){if(!(s in u))return u;const f={...u};return delete f[s],f}function xr(u){try{const s=u.contentDocument;return s!==null&&s.location.href!=="about:blank"&&s.readyState!=="loading"}catch{return!1}}function a2({frame:u,onFailure:s,onReady:f,sameOrigin:r,timeoutMs:h}){let g=!1,v=null;const C=()=>{u.removeEventListener("load",_),u.removeEventListener("error",L),v!==null&&(globalThis.clearTimeout(v),v=null)},E=B=>g||(r?!xr(u):!B)?!1:(g=!0,C(),f(),!0),x=B=>{g||B&&r&&E(!1)||(g=!0,C(),s())};function _(){E(!r)}function L(){x(!1)}return u.addEventListener("load",_),u.addEventListener("error",L),v=globalThis.setTimeout(()=>x(!0),h),r&&E(!1),()=>{g||(g=!0,C())}}function i2(u){if(typeof u!="object"||u===null)return null;const s=Reflect.get(u,"type");return s==="leglas:preview-ready"?"ready":s==="leglas:preview-error"?"error":null}function u2(u,s){if(s===null)return null;for(const f of u)if(f.contentWindow===s)return f;return null}function m1(u){return u.file===void 0&&u.branch===void 0&&u.url.startsWith("/")}const s2={reachable:!0,wasDown:!1};function c2(u,s){return s?u.reachable?u:{reachable:!0,wasDown:u.wasDown}:!u.reachable&&u.wasDown?u:{reachable:!1,wasDown:!0}}function o2(u){const s=u.rows,f=r=>r!=null&&r!==u.active&&(s===void 0||s.includes(r));return f(u.pinned)?u.pinned:f(u.parent)?u.parent:f(u.previous)?u.previous:s?.find(r=>r!==u.active)??null}function r2(u){return!u.split||u.compare===null||u.compare===u.active?[u.active]:[u.active,u.compare]}const f2=.999,d2=.05;function h2(u){const{gutter:s,panes:f,scaleSplit:r,stageHeight:h,stageWidth:g,viewport:v}=u,C=f>1?(g-(f-1))/f:g,E=v??g,x=C-(v!==null?s:0),_=h-(v!==null?s:0),B=r&&f>1&&g>0&&E>0?Math.max(d2,Math.min(1,x/E)):1,Y=B<f2;return{boxHeight:_*B,boxWidth:E*B,designWidth:E,frameHeight:_,scale:B,scaling:Y}}const m2="#__next-build-watcher,#nuxt-devtools-anchor,astro-dev-toolbar{display:none!important}",g2="#devtools-indicator{display:none!important}",p2=12;function y2(u,s,f=[],r=[]){const h=u.replace(/\s+/g," ").trim().toLowerCase();return h.length<p2?null:J1(`${s.join(">")} ${h} ${f.join("|")} ${r.join("|")}`.trimEnd())}const $1=new Set(["LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE"]),Bs=720,g1=180,v2=["display","visibility","position","top","right","bottom","left","inset","box-sizing","width","height","min-width","min-height","max-width","max-height","margin-top","margin-right","margin-bottom","margin-left","padding-top","padding-right","padding-bottom","padding-left","overflow-x","overflow-y","opacity","transform","transform-origin","perspective","z-index","color","background-color","background-image","background-position","background-size","border-top-width","border-right-width","border-bottom-width","border-left-width","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-left-radius","border-top-right-radius","border-bottom-right-radius","border-bottom-left-radius","box-shadow","outline","filter","backdrop-filter","-webkit-backdrop-filter","clip-path","mask-image","mix-blend-mode","isolation","object-fit","object-position","font-family","font-size","font-style","font-weight","line-height","letter-spacing","text-align","text-transform","white-space","flex-direction","flex-wrap","flex-grow","flex-shrink","flex-basis","align-items","align-self","justify-content","justify-self","gap","row-gap","column-gap","grid-template-columns","grid-template-rows","grid-column","grid-row","aspect-ratio","pointer-events","animation-name","animation-duration","animation-delay","animation-iteration-count","animation-direction","animation-timing-function"],b2=new Set(["bottom","filter","height","left","opacity","right","top","transform","width"]),x2=["content","display","position","inset","width","height","opacity","transform","color","background-color","background-image","border-radius","box-shadow","filter","clip-path"],S2=["viewBox","d","points","x","y","x1","y1","x2","y2","cx","cy","r","rx","ry","width","height","fill","stroke","stroke-width"],p1=["nextjs-portal","vite-error-overlay","#webpack-dev-server-client-overlay","#leglas-hide-dev-overlays"].join(",");function ks(u){if(!Number.isFinite(u))return"?";const s=Math.round(u*2)/2;return Object.is(s,-0)?"0":String(s)}function J1(u){let s=2166136261,f=2654435769;for(let r=0;r<u.length;r+=1){const h=u.charCodeAt(r);s=Math.imul(s^h,16777619),f=Math.imul(f^h,2246822507)}return`${(s>>>0).toString(16)}${(f>>>0).toString(16)}`}function Gs(u,s=480){const f=u.replace(/\s+/g," ").trim();return f.length<=s?f:`${f.slice(0,180)}…${f.slice(-80)}#${f.length}:${J1(f)}`}function E2(u){return $1.has(u.tagName)||u.matches(p1)||u.closest(p1)!==null}function w2(u){if(u.length<=Bs)return u.map((h,g)=>g);const s=new Set,f=h=>{h>=0&&h<u.length&&s.size<Bs&&s.add(h)};for(let h=0;h<g1;h+=1)f(h);for(let h=Math.max(0,u.length-g1);h<u.length;h+=1)f(h);for(let h=0;h<u.length&&s.size<Bs;h+=1){const g=u[h];if(!g.matches("a,button,input,select,textarea,summary,[role],svg,svg *,canvas,img,picture,video,audio,iframe"))continue;f(h);let v=g.parentElement;for(let C=0;v!==null&&C<3;C+=1)f(u.indexOf(v)),v=v.parentElement}const r=Bs-s.size;if(r>0){const h=(u.length-1)/Math.max(1,r-1);for(let g=0;g<r;g+=1)f(Math.round(g*h))}return[...s].sort((h,g)=>h-g)}function M2(u,s){if(s.getPropertyValue("animation-name").trim()!=="none")return!0;const f=u.getAnimations;if(typeof f!="function")return!1;try{return f.call(u).some(r=>r.playState==="running")}catch{return!1}}function C2(u,s){if(s)return"rect:animated";let f;try{f=u.getBoundingClientRect()}catch{return"rect:?"}const r=u.ownerDocument.defaultView,h=r?.getComputedStyle(u).position,g=h==="fixed"?0:r?.scrollX??0,v=h==="fixed"?0:r?.scrollY??0;return`rect:${ks(f.left+g)},${ks(f.top+v)},${ks(f.width)},${ks(f.height)}`}function j2(u){const s=[];for(const r of S2){const h=u.getAttribute(r);h!==null&&s.push(`${r}:${Gs(h)}`)}const f=u.tagName;if(["A","AUDIO","IFRAME","IMG","SOURCE","VIDEO"].includes(f))for(const r of["href","src","srcset","poster"]){const h=u.getAttribute(r);h!==null&&s.push(`${r}:${Gs(h)}`)}if(f==="CANVAS"){const r=u;s.push(`bitmap:${r.width}x${r.height}`)}return s.join(",")}function y1(u,s,f){let r;try{r=f(u,s)}catch{return""}const h=r.getPropertyValue("content").trim();return h===""||h==="none"||h==="normal"?"":`${s}{${x2.map(g=>`${g}:${Gs(r.getPropertyValue(g))}`).join(";")}}`}function A2(u,s){if(!u)return[];const f=[u,...u.querySelectorAll("*")].filter(r=>!E2(r));return w2(f).map(r=>{const h=f[r],g=s(h),v=M2(h,g),C=v2.map(Y=>{const R=v&&b2.has(Y)?"<animated>":Gs(g.getPropertyValue(Y));return`${Y}:${R}`}).join(";"),E=h.getAttribute("role"),x=h.getAttribute("type"),_=[E&&`role:${E}`,x&&`type:${x}`].filter(Boolean).join(","),L=y1(h,"::before",s),B=y1(h,"::after",s);return`${h.tagName}${_?`[${_}]`:""}{${C2(h,v)};${C};${j2(h)};${L};${B}}`})}function N2(u,s){if(!u)return[];const f=[];let r=u;for(let h=0;h<4;h+=1){const g=s(r);f.push(`${g.backgroundColor};${g.backgroundImage};${g.color}`);const v=Array.from(r.children).filter(E=>!$1.has(E.tagName??"")),C=v.length===1?v[0]:void 0;if(C===void 0)break;r=C}return f}function T2(u){const s=new Map;for(const[r,h]of Object.entries(u)){if(h===null)continue;const g=s.get(h);g?g.push(r):s.set(h,[r])}const f={};for(const r of s.values())if(!(r.length<2))for(const h of r)f[h]=r.filter(g=>g!==h);return f}function F1(u,s){const f=s[u.title];return f?.url===u.url?f:null}function or(u,s){let f=null;for(const r of s)r in u&&(f??={...u},delete f[r]);return f??u}function D2(u,s){const f=[];for(const[r,h]of s){const g=u.get(r);g!==void 0&&g!==h&&f.push(r)}return f}function z2(u,s,f){const r=f.status==="complete"?{url:s.url,status:"complete",signature:f.signature}:{url:s.url,status:"failed"},h=u[s.title],g=h?.status==="failed"&&r.status==="failed"||h?.status==="complete"&&r.status==="complete"&&h.signature===r.signature;return h?.url===r.url&&g?u:{...u,[s.title]:r}}function O2(u,s){const f={};for(const r of u){const h=F1(r,s);h?.status==="complete"&&(f[r.title]=h.signature)}return f}function R2(u,s){return u.filter(f=>f.url.startsWith("/")?F1(f,s)===null:!1)}const v1=24,_2=10,b1=44;function L2(u,s){const f=(r,h)=>{const g=Math.min(v1,h/2),v=Math.max(g,h-v1);return Math.max(g,Math.min(v,r))};return{x:f(u.x,s.width),y:f(u.y,s.height)}}function U2(u){return{x:u.x-b1/2,y:u.y-b1/2}}function B2(u,s,f=_2){return Math.abs(s.x-u.x)>f||Math.abs(s.y-u.y)>f}function k2(u,s){const f=u.x<s.width/2,r=u.y<s.height/2;return r&&f?{corner:"top-left"}:r?{corner:"top-right"}:f?{corner:"bottom-left"}:{corner:"bottom-right"}}const H2=3,bt={action:6e3,plain:2600};function q2(u,s,f=H2){return[...u.filter(h=>h.kind!==s.kind),s].slice(-f)}function Y2(u,s){return u.filter(f=>f.id!==s)}const G2=10;function W1(u,s){let f=u;for(let r=0;r<G2;r+=1){const h=s.get(f);if(h===void 0||h===u)return f;f=h}return f}function X2(u,s){const f=new Set(u),r=new Map,h=[];for(const g of u){const v=W1(g,s);if(v===g||!f.has(v))h.push(g);else{const C=r.get(v);C?C.push(g):r.set(v,[g])}}return h.flatMap(g=>[{title:g,depth:0},...(r.get(g)??[]).map(v=>({title:v,depth:1}))])}function Q2(u,s){if(s.size===0)return[...u];let f=null;return u.filter(r=>r.depth===0?(f=r.title,!0):f===null||!s.has(f))}const x1=u=>u.trim().replace(/\s+/g," ").toLowerCase();function Z2(u,s,f){const r=u.trim().replace(/\s+/g," "),h=f.get(s)??s;if(r===""||r===s)return h===s?{kind:"same"}:{kind:"reset",value:s};if(r===h)return{kind:"same"};for(const[g,v]of f)if(g!==s&&x1(v)===x1(r))return{kind:"taken",by:v};return{kind:"set",value:r}}function V2(u,s){try{return new URL(u,s).toString()}catch{return u}}function K2({displayName:u,preview:s,previewUrl:f,title:r}){const h=u===r?"":` (shown as ${JSON.stringify(u)})`,g=s?.note?` — ${s.note}`:"",v=s?.tags.length?` [${s.tags.join(", ")}]`:"",C=[`Leglas direction ${JSON.stringify(r)}${h}${g}${v}`];return s?.file?C.push(`Source: ${s.file}`):s?.branch?C.push(`Branch: ${s.branch}`):s&&C.push(`Route: ${s.url}`),C.push(`Preview: ${f}`),s?.basedOn&&C.push(`A variant of: ${s.basedOn}`),C.push("","Inspect this direction in full:",` npx leglas show ${JSON.stringify(r)} --json`),C.join(`
|
|
10
|
+
`)}function $2({previews:u,project:s,searchRef:f,onToggleSplit:r,onToggleHelp:h,onToggleTools:g,onToggleNote:v,suspended:C=!1}){const E=wg(s),x=()=>Mg(typeof window>"u"?null:window.localStorage.getItem(E),u),[_,L]=M.useState(x),B=new Map(u.map(O=>[O.title,O])),Y=()=>{const O=x();return O.order.find(P=>!O.hidden.includes(P))??O.order[0]??""},[R,te]=M.useState(Y),se=typeof window<"u"&&window.self!==window.top,[V,Q]=M.useState(()=>[Y()]),[W,ie]=M.useState(""),[ue,p]=M.useState([]),I=O=>{p(P=>P.length?[]:P),ie(O)},[fe,me]=M.useState(!1),[ge,Ee]=M.useState(null),[he,qe]=M.useState(null),[Ae,ke]=M.useState(null),[D,Z]=M.useState(!1),[le,be]=M.useState({}),[Me,b]=M.useState([]),[U,F]=M.useState(null),ne=M.useRef(1),oe=M.useRef(null),ve=M.useRef(0),k=O=>{ve.current+=1,b(P=>q2(P,{...O,id:ve.current}))},K=O=>b(P=>Y2(P,O)),J=O=>{te(O),Q(P=>P.includes(O)?P:[...P,O])};M.useEffect(()=>{window.localStorage.setItem(E,JSON.stringify(_))},[_,E]),M.useEffect(()=>()=>{oe.current&&clearTimeout(oe.current)},[]);const ae=O=>_.renames[O]??O,Le=O=>B.get(O)?.url??"/",Ve=O=>{const P=B.get(O);return P?.branch===void 0?null:P.state??{status:"idle"}},Xe=O=>{fetch("/leglas/api/previews/start",{body:JSON.stringify({title:O}),headers:{"content-type":"application/json"},method:"POST"}).catch(()=>{})},$e=O=>{if(!W.trim())return!0;const P=W.toLowerCase(),Ce=B.get(O);return ae(O).toLowerCase().includes(P)||O.toLowerCase().includes(P)||(Ce?.note??"").toLowerCase().includes(P)||(Ce?.tags??[]).some(Se=>Se.toLowerCase().includes(P))},ze=u.map(O=>O.title).filter(O=>!_.deleted.includes(O)),Qe=jg(_.order,ze),nt=W.trim()!=="",mt=nt?ue:_.collapsedFamilies,Tt=new Map(u.flatMap(O=>O.basedOn===void 0?[]:[[O.title,O.basedOn]])),nn=X2(Qe.filter(O=>!_.hidden.includes(O)&&$e(O)),Tt),Ln=Q2(nn,new Set(mt)),Xn=Ln.map(O=>O.title),Jl=new Map(Ln.map(O=>{const P=O.depth===0?nn.filter(Ce=>Ce.depth===1&&W1(Ce.title,Tt)===O.title).length:0;return[O.title,{depth:O.depth,variants:P,folded:mt.includes(O.title)}]})),gt=(O,P)=>O.includes(P)?O.filter(Ce=>Ce!==P):[...O,P],Fl=O=>nt?p(P=>gt(P,O)):L(P=>({...P,collapsedFamilies:gt(P.collapsedFamilies,O)})),Wl=O=>B.get(O)?.basedOn??null,Ra=Qe.filter(O=>!_.hidden.includes(O)).length,gl=(O,P)=>L(Ce=>({...Ce,order:Ag(Ce,u,O,P)})),Il=(O,P=!1)=>{L(Ce=>({...Ce,hidden:Ce.hidden.filter(Se=>Se!==O)})),P&&J(O)},pl=O=>{const P=ae(O),Ce=R===O;if(L(Se=>({...Se,hidden:[...Se.hidden,O]})),Ce){const Se=Qe.find(je=>je!==O&&!_.hidden.includes(je));Se&&J(Se)}k({action:{label:"Undo",run:()=>Il(O,Ce)},kind:`remove:${O}`,message:`${P} removed from the list`,tone:"info",ttl:bt.action})},Pl=async O=>{const P=[...new Set(O)].filter(je=>_.hidden.includes(je)),Ce=P.filter(je=>B.get(je)?.local===!0);if(Ce.length>0){const je=await fetch("/leglas/api/previews/delete",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({titles:Ce})});if(!je.ok){const ot=await je.json().catch(()=>null);throw new Error(ot?.error??"The directions could not be deleted from Leglas.")}}const Se=new Set(P);if(L(je=>Cg(je,P)),Q(je=>je.filter(ot=>!Se.has(ot))),P.includes(R)){const je=Qe.find(ot=>!Se.has(ot)&&!_.hidden.includes(ot));te(je??"")}_.hidden.every(je=>Se.has(je))&&me(!1)},xt=(O,P)=>L(Ce=>{const Se={...Ce.renames};return P===void 0?delete Se[O]:Se[O]=P,fetch("/leglas/api/renames",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({renames:Se})}).catch(()=>{}),{...Ce,renames:Se}}),Zt=O=>{Ee(O),qe(null)},Rt=(O,P,Ce="submit")=>{const Se=new Map(ze.map(Ke=>[Ke,ae(Ke)])),je=Z2(P,O,Se);if(je.kind==="taken"){if(Ce==="submit"){qe(`${je.by} already goes by that name.`);return}Zt(null),k({kind:`rename:${O}`,message:`Still called ${ae(O)}. ${je.by} already goes by that name.`,tone:"info",ttl:bt.plain});return}if(Zt(null),je.kind==="same")return;const ot=_.renames[O];xt(O,je.kind==="reset"?void 0:je.value),k({action:{label:"Undo",run:()=>xt(O,ot)},kind:`rename:${O}`,message:je.kind==="reset"?`Name reset to ${je.value}`:`Renamed to ${je.value}`,tone:"success",ttl:bt.action})};M.useEffect(()=>{const O=Xn,P=Se=>{const je=Se.target,ot=je?.tagName?.toLowerCase(),Ke=Ig({key:Se.key,altKey:Se.altKey,ctrlKey:Se.ctrlKey,metaKey:Se.metaKey,shiftKey:Se.shiftKey,typing:ot==="input"||ot==="textarea"||ot==="select"||(je?.isContentEditable??!1)});if(Ke&&!(C&&Ke.kind!=="help")){if(Ke.kind==="search"||Ke.kind==="request")Se.preventDefault(),L(St=>St.collapsed?{...St,collapsed:!1}:St),F({target:Ke.kind,nonce:ne.current++});else if(Ke.kind==="split")Se.preventDefault(),r?.();else if(Ke.kind==="help")Se.preventDefault(),h?.();else if(Ke.kind==="tools")Se.preventDefault(),g?.();else if(Ke.kind==="note")Se.preventDefault(),v?.();else if(Ke.kind==="rail")L(St=>({...St,collapsed:!St.collapsed}));else if(Ke.kind==="jump"){const St=O[Ke.index];St&&(Se.preventDefault(),J(St))}else if(Ke.kind==="move"){Se.preventDefault();const St=O.indexOf(R),ut=Ke.delta===1?O[Math.min(O.length-1,St+1)]:O[Math.max(0,St-1)];ut&&J(ut)}}},Ce=[window];for(const Se of Array.from(document.querySelectorAll("iframe")))try{const je=Se.contentDocument;je&&Ce.push(je)}catch{}for(const Se of Ce)Se.addEventListener("keydown",P);return()=>{for(const Se of Ce)Se.removeEventListener("keydown",P)}},[R,Xn.join("|"),r,h,g,v,C,V.join("|"),Object.entries(le).filter(([,O])=>O).map(([O])=>O).join("|")]);const Gt=(O,P)=>{const Ce=V2(Le(O),window.location.origin),Se=P==="link"?Ce:K2({displayName:ae(O),preview:B.get(O),previewUrl:Ce,title:O});wr(Se).then(je=>{if(je==="blocked"){ke(null),k({detail:Ce,kind:"copy",message:"Your browser blocked the clipboard. The direction is at:",tone:"danger",ttl:null});return}ke({kind:P,title:O}),oe.current&&clearTimeout(oe.current),oe.current=setTimeout(()=>ke(null),1200),k({kind:"copy",message:P==="link"?`Link to ${ae(O)} copied`:`Reference to ${ae(O)} copied`,tone:"success",ttl:bt.plain})})},ft=O=>Gt(O,"link"),ea=O=>Gt(O,"reference"),yl=O=>{O.preventDefault();const P=O.currentTarget;P.setPointerCapture(O.pointerId);const Ce=O.clientX,Se=_.width;Z(!0);const je=Ke=>{const St=Math.min(Y1,Math.max(q1,Se+Ke.clientX-Ce));L(ut=>ut.width===St?ut:{...ut,width:St})},ot=Ke=>{P.releasePointerCapture(Ke.pointerId),P.removeEventListener("pointermove",je),P.removeEventListener("pointerup",ot),P.removeEventListener("pointercancel",ot),Z(!1)};P.addEventListener("pointermove",je),P.addEventListener("pointerup",ot),P.addEventListener("pointercancel",ot)},Ei=(O,P)=>be(Ce=>n2(Ce,O,P)),Vt=(O,P)=>t2(le,O,P),Qn=O=>be(P=>l2(P,O)),jn=se?[R]:ze.filter(O=>V.includes(O));return{active:R,copied:Ae,copyLink:ft,copyReference:ea,deleteRemoved:Pl,displayName:ae,dismissToast:K,focusing:U,hiddenCount:_.hidden.length,hide:pl,isLoaded:Vt,loaded:le,markLoaded:Ei,matches:$e,moveOption:gl,nested:se,notify:k,onHandlePointerDown:yl,panes:jn,prefs:_,previewFor:O=>B.get(O),query:W,rename:Rt,renameError:he,renaming:ge,parentOf:Wl,resetLoaded:Qn,resizing:D,restore:Il,rowMeta:Jl,rows:Xn,toggleFamily:Fl,setActive:J,setPrefs:L,setQuery:I,setShowHidden:me,showHidden:fe,startRename:Zt,toasts:Me,urlFor:Le,branchState:Ve,startBranch:Xe,visibleCount:Ra,viewports:X1}}function S1(u){const s=u?.trim()??"";return s===""?null:s}function I1(u){const s=S1(u?.basedOn),f=S1(u?.askedFor);return s===null&&f===null?null:{basedOn:s,askedFor:f}}function J2(u,s){const f=u===null?null:`Variant of ${u}`,r=s===null?null:`asked for “${s}”`;return f===null?r===null?null:`You ${r}`:r===null?f:`${f} · you ${r}`}const E1=80,F2=6,W2=8;function I2(u){if(typeof u!="string")return null;const s=u.trim();return/^[A-Za-z][\w-]*$/.test(s)?s:null}function P2(u){return typeof u!="string"?[]:u.trim().split(/\s+/).filter(Boolean).slice(0,F2)}function Ys(u){const s=(u??"").replace(/\s+/g," ").trim();return s.length>E1?`${s.slice(0,E1-1)}…`:s}function ep(u){const s=[];let f=u;for(;f!==null&&s.length<W2;){const r=f.tagName.toLowerCase();if(r==="body"||r==="html")break;const h=I2(f.id);if(h!==null)return s.unshift(`#${h}`),s.join(" > ");const g=f.parentElement;if(g===null){s.unshift(r);break}let v=1;for(let C=0;C<g.children.length;C+=1){const E=g.children[C];if(E===f)break;E?.tagName===f.tagName&&(v+=1)}s.unshift(`${r}:nth-of-type(${v})`),f=g}return s.join(" > ")}function w1(u,s){return!Number.isFinite(u)||!Number.isFinite(s)||s<=0?.5:Math.round(Math.min(1,Math.max(0,u/s))*1e3)/1e3}function M1(u,s,f,r){return{classes:P2(u.className),rect:{height:Math.round(s.height),width:Math.round(s.width),x:Math.round(s.x),y:Math.round(s.y)},selector:ep(u),spot:{x:r===void 0?.5:w1(r.x-s.x,s.width),y:r===void 0?.5:w1(r.y-s.y,s.height)},tag:u.tagName.toLowerCase(),text:Ys(u.textContent),viewport:Math.round(f)}}const C1=6;function j1(u,s){return Math.abs(s.x-u.x)>=C1||Math.abs(s.y-u.y)>=C1}function A1(u,s){return{height:Math.abs(s.y-u.y),width:Math.abs(s.x-u.x),x:Math.min(u.x,s.x),y:Math.min(u.y,s.y)}}function tp(u,s){return u.x<s.x+s.width&&u.x+u.width>s.x&&u.y<s.y+s.height&&u.y+u.height>s.y}function N1(u,s){return s.x>=u.x&&s.y>=u.y&&s.x+s.width<=u.x+u.width&&s.y+s.height<=u.y+u.height}function np(u,s){const f=u.width>0?u.width:1,r=u.height>0?u.height:1,h=g=>Math.round(Math.min(1,Math.max(0,g))*1e3)/1e3;return{height:h(s.height/r),width:h(s.width/f),x:h((s.x-u.x)/f),y:h((s.y-u.y)/r)}}function lp(u,s){return{height:s.height*u.height,width:s.width*u.width,x:u.x+s.x*u.width,y:u.y+s.y*u.height}}function ap(u){const s=u.gap??8,{anchor:f,bounds:r,card:h}=u,g=f.y+f.height+s,v=f.y-s-h.height,C=g+h.height>r.height&&v>=0,E=C?v:g;let x=f.x;return x+h.width>r.width&&(x=r.width-h.width),{flipped:C,left:Math.max(0,x),top:Math.max(0,Math.min(E,Math.max(0,r.height-h.height)))}}function ip(u){return!Number.isFinite(u)||u<=0?256:Math.round(Math.min(256,Math.max(180,u-48)))}function up(u){if(u.length===0)return null;const s=Math.min(...u.map(g=>g.x)),f=Math.min(...u.map(g=>g.y)),r=Math.max(...u.map(g=>g.x+g.width));return{height:Math.max(...u.map(g=>g.y+g.height))-f,width:r-s,x:s,y:f}}const sp=8;function cp(u){const s=new Set,f=[];for(const r of u){const h=`${r.tag}:${r.text}`;if(!s.has(h)&&(s.add(h),f.push(r),f.length===sp))break}return f}const Hs=2,op=4e3,T1=600,D1=80;function rp(u){const s=u.note.length>D1?`${u.note.slice(0,D1-1)}…`:u.note;return[`Annotation ${u.number}`,s===""?null:`: ${s}`,u.sent?". Sent with a change.":null,u.stale?". Its element has gone.":null].filter(f=>f!==null).join("")}function fp(u){const s=[u.stale?"This element has moved or gone since the annotation was left.":null,u.sent?"Already sent with a change that has not landed yet.":null].filter(f=>f!==null);return s.length===0?void 0:s.join(" ")}function ml(u){return"left"in u?{height:u.height,width:u.width,x:u.left,y:u.top}:u}function dp(u,s){return s.x>=u.x&&s.y>=u.y&&s.x<=u.x+u.width&&s.y<=u.y+u.height}function hp({notes:u,onExit:s,onForget:f,onKeep:r,onRevise:h,paneScale:g,scaling:v,sent:C,title:E}){const x=M.useRef(null),_=M.useRef(null),L=M.useRef(null),B=M.useRef(null),[Y,R]=M.useState(null),[te,se]=M.useState(null),[V,Q]=M.useState(null),W=M.useRef(0),[ie,ue]=M.useState(null),[p,I]=M.useState(null),[fe,me]=M.useState([]),[ge,Ee]=M.useState({height:92,width:256}),he=M.useCallback(()=>{const k=document.querySelector(`iframe[data-preview="${CSS.escape(E)}"]`);if(k===null)return null;let K=null;try{K=k.contentDocument}catch{return null}const J=K?.defaultView??null;if(K===null||J===null)return null;const ae=k.getBoundingClientRect();return{doc:K,rect:ae,scale:J.innerWidth>0?ae.width/J.innerWidth:1,view:J}},[E]),qe=M.useCallback((k,K)=>{const J=he();return J===null?null:{x:(k-J.rect.left)/J.scale,y:(K-J.rect.top)/J.scale}},[he]),Ae=M.useCallback((k,K)=>{const J=k.doc.elementFromPoint(K.x,K.y);if(J===null)return null;const ae=new Set;let Le=J,Ve=0;for(let ze=0;Le!==null&&ze<3&&Ve<T1;ze+=1){ae.add(Le);const Qe=k.doc.createTreeWalker(Le,NodeFilter.SHOW_ELEMENT);let nt=Qe.nextNode();for(;nt!==null&&Ve<T1;)ae.has(nt)||(ae.add(nt),Ve+=1),nt=Qe.nextNode();Le=Le.parentElement}const Xe=ze=>{const Qe=ze.tagName.toLowerCase();return(Ys(ze.textContent)===""?0:4)+(Qe==="a"||Qe==="button"||Qe==="img"?3:0)+(/^h[1-6]$/.test(Qe)||Qe==="p"||Qe==="li"?2:0)},$e=[...ae].filter(ze=>{const Qe=ze.tagName.toLowerCase();if(ze===k.doc.body||ze===k.doc.documentElement||Qe==="head"||Qe==="script"||Qe==="style")return!1;const nt=ml(ze.getBoundingClientRect());if(nt.width<=0||nt.height<=0||!dp(nt,K))return!1;const mt=k.view.getComputedStyle(ze);return mt.display!=="none"&&mt.visibility!=="hidden"}).map(ze=>({box:ml(ze.getBoundingClientRect()),element:ze,weight:Xe(ze)}));return $e.length===0?null:($e.sort((ze,Qe)=>{const nt=ze.element.contains(Qe.element),mt=Qe.element.contains(ze.element);if(nt!==mt)return nt?1:-1;const Tt=Qe.weight-ze.weight;return Tt!==0?Tt:ze.box.width*ze.box.height-Qe.box.width*Qe.box.height}),$e[0]??null)},[]),ke=M.useCallback((k,K)=>{let J=null;try{J=k.doc.querySelector(K.selector)}catch{}const ae=ml(J===null?K.rect:J.getBoundingClientRect()),Le=K.spot??{x:.5,y:.5},Ve=K.region?lp(ae,K.region):null;return{about:Ve??ae,box:Ve??{height:0,width:0,x:ae.x+Le.x*ae.width,y:ae.y+Le.y*ae.height},stale:J===null}},[]),D=M.useCallback(()=>{const k=he();return k===null?[]:u.map((K,J)=>{const ae=ke(k,K.anchor);return{anchor:K.anchor,box:ae.box,id:K.id,note:K.note,number:J+1,region:K.anchor.region?ae.about:null,sent:C.has(K.id),stale:ae.stale}})},[ke,he,u,C]),Z=M.useCallback(()=>me(D()),[D]),le=M.useCallback(()=>{const k=L.current,K=he();k===null||K===null||V!==null||R(Ae(K,k)?.box??null)},[Ae,he,V]);M.useEffect(()=>{Z();const k=he(),K=()=>{Z(),le()};return k?.view.addEventListener("scroll",K,{passive:!0}),k?.view.addEventListener("resize",K),window.addEventListener("resize",K),()=>{k?.view.removeEventListener("scroll",K),k?.view.removeEventListener("resize",K),window.removeEventListener("resize",K)}},[he,Z,le]),M.useEffect(()=>{const k=x.current;if(k===null)return;const K=J=>{const ae=he();ae!==null&&(J.preventDefault(),ae.view.scrollBy({behavior:"auto",left:J.deltaX,top:J.deltaY}))};return k.addEventListener("wheel",K,{passive:!1}),()=>k.removeEventListener("wheel",K)},[he]),M.useEffect(()=>{const k=ae=>{if(ae.key==="Escape"){if(V!==null){Q(null);return}s()}},K=[window],J=he();J!==null&&K.push(J.doc);for(const ae of K)ae.addEventListener("keydown",k);return()=>{for(const ae of K)ae.removeEventListener("keydown",k)}},[he,s,V]),M.useEffect(()=>{V===null||V.kind!=="kept"||u.some(k=>k.id===V.id)||Q({anchor:V.anchor,answered:!0,field:V.field,kind:"new",note:V.note})},[u,V]),M.useEffect(()=>{const k=_.current;if(V===null||k===null)return;const K=k.offsetHeight,J=k.offsetWidth;Ee(ae=>ae.height===K&&ae.width===J?ae:{height:K,width:J})},[V]);const be=(k,K)=>{const J=[...k.doc.body.querySelectorAll("*")].slice(0,op),ae=J.filter(Xe=>{const $e=ml(Xe.getBoundingClientRect());return $e.width>0&&$e.height>0&&tp(K,$e)}),Le=ae.filter(Xe=>!ae.some($e=>$e!==Xe&&Xe.contains($e))&&!N1(ml(Xe.getBoundingClientRect()),K)&&(Ys(Xe.textContent)!==""||["a","button","canvas","img","input","svg","video"].includes(Xe.tagName.toLowerCase())));let Ve=k.doc.body;for(const Xe of J){const $e=ml(Xe.getBoundingClientRect());N1($e,K)&&Ve.contains(Xe)&&(Ve=Xe)}return{bounds:up(Le.map(Xe=>ml(Xe.getBoundingClientRect())))??K,covers:cp(Le.map(Xe=>({tag:Xe.tagName.toLowerCase(),text:Ys(Xe.textContent)}))),holder:Ve}},Me=(k,K)=>{const J=he();if(J===null)return;if(K!==null&&j1(K,k)){const Le=A1(K,k),{bounds:Ve,covers:Xe,holder:$e}=be(J,Le),ze=ml($e.getBoundingClientRect());Q({anchor:{...M1($e,ze,J.view.innerWidth,{x:Ve.x+Ve.width/2,y:Ve.y+Ve.height/2}),covers:Xe,region:np(ze,Ve)},field:String(W.current+=1),kind:"new",note:""}),I(null);return}const ae=Ae(J,k);ae!==null&&(Q({anchor:M1(ae.element,ae.box,J.view.innerWidth,k),field:String(W.current+=1),kind:"new",note:""}),I(null))},b=v&&g>0?1/g:1,U=he(),F={height:U?.view.innerHeight??0,width:U?.view.innerWidth??0},ne=ip(F.width),oe=V===null||U===null?null:ke(U,V.anchor),ve=oe===null?null:ap({anchor:oe.about,bounds:F,card:{height:ge.height*b,width:ne*b}});return o.jsxs("div",{className:`absolute inset-0 z-20 ${V===null?"cursor-crosshair":"cursor-default"}`,onPointerDown:k=>{if(V!==null)return;const K=qe(k.clientX,k.clientY),J=he();if(!(K===null||J===null)){try{k.currentTarget.setPointerCapture(k.pointerId)}catch{}B.current={from:K,scroll:{x:J.view.scrollX,y:J.view.scrollY}}}},onPointerLeave:()=>{L.current=null,B.current===null&&R(null)},onPointerMove:k=>{if(V!==null)return;const K=qe(k.clientX,k.clientY),J=he();if(K===null||J===null)return;L.current=K;const ae=B.current;if(ae!==null){const Le={x:ae.from.x+ae.scroll.x-J.view.scrollX,y:ae.from.y+ae.scroll.y-J.view.scrollY};se(j1(Le,K)?A1(Le,K):null),R(null);return}R(Ae(J,K)?.box??null)},onPointerUp:k=>{const K=B.current;if(B.current=null,se(null),V!==null)return;const J=qe(k.clientX,k.clientY),ae=he();if(J===null||ae===null)return;const Le=K===null?null:{x:K.from.x+K.scroll.x-ae.view.scrollX,y:K.from.y+K.scroll.y-ae.view.scrollY};R(null),Me(J,Le)},ref:x,children:[Y!==null&&V===null&&te===null?o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:Y.height,left:Y.x,top:Y.y,width:Y.width}}):null,te!==null?o.jsx("div",{className:"pointer-events-none absolute rounded-sm border-2 border-dashed border-[#7C9CFF] bg-[#7C9CFF]/10",style:{height:te.height,left:te.x,top:te.y,width:te.width}}):null,fe.map(k=>o.jsxs("div",{children:[k.region===null?null:o.jsx("div",{className:`pointer-events-none absolute rounded-sm border-2 border-dashed ${k.stale?"border-amber-500/70 bg-amber-500/5":"border-[#7C9CFF]/70 bg-[#7C9CFF]/5"}`,style:{height:k.region.height+Hs*2,left:k.region.x-Hs,top:k.region.y-Hs,width:k.region.width+Hs*2}}),o.jsxs("button",{"aria-label":rp(k),className:"group/pin absolute size-5 cursor-pointer",onClick:K=>{K.stopPropagation(),Q({anchor:k.anchor,field:String(W.current+=1),id:k.id,kind:"kept",note:k.note}),I(null)},onPointerDown:K=>K.stopPropagation(),onPointerMove:K=>K.stopPropagation(),onPointerUp:K=>K.stopPropagation(),style:{left:k.box.x,top:k.box.y,transform:`translate(-50%, -50%) scale(${b})`,transformOrigin:"center"},type:"button",children:[o.jsx("span",{"aria-hidden":!0,className:"absolute -inset-1.5"}),o.jsx("span",{className:`flex size-5 shrink-0 items-center justify-center rounded-full text-[10px] font-semibold text-white shadow-lg outline-offset-2 group-focus-visible/pin:outline group-focus-visible/pin:outline-2 group-focus-visible/pin:outline-white ${k.stale?"bg-amber-500":"bg-[#7C9CFF]"} ${k.sent?"ring-2 ring-white/80":""}`,title:fp(k),children:k.number}),o.jsx("span",{className:"pointer-events-none absolute left-full top-1/2 ml-1 w-max max-w-56 -translate-y-1/2 truncate rounded-md border border-white/10 bg-[#171717] px-1.5 py-1 text-left text-[11px] leading-snug text-white opacity-0 shadow-lg transition-opacity group-focus-visible/pin:opacity-100 group-hover/pin:opacity-100",children:k.note||"No words"})]})]},k.id)),V!==null&&oe!==null&&ve!==null?o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"pointer-events-none absolute bg-[#7C9CFF]/10 outline outline-2 outline-[#7C9CFF]",style:{height:oe.about.height,left:oe.about.x,top:oe.about.y,width:oe.about.width}}),o.jsxs("form",{className:"absolute z-30 rounded-lg border border-[#232328] bg-[#1E1E22] p-1.5 shadow-2xl",onClick:k=>k.stopPropagation(),onPointerDown:k=>k.stopPropagation(),onSubmit:k=>{k.preventDefault();const K=V.field;if(ie===K)return;const J=k.currentTarget.elements.namedItem("note"),ae=J instanceof HTMLInputElement?J.value.trim():"";ue(K),I(Le=>Le===K?null:Le),(V.kind==="new"?r(V.anchor,ae):h(V.id,ae)).then(Le=>{ue(Ve=>Ve===K?null:Ve),Le?Q(Ve=>Ve?.field===K?null:Ve):I(K)}).catch(()=>{ue(Le=>Le===K?null:Le),I(K)})},ref:_,style:{left:ve.left,top:ve.top,transform:`scale(${b})`,transformOrigin:ve.flipped?"bottom left":"top left",width:ne},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",defaultValue:V.note,onInput:p===V.field?()=>I(null):void 0,name:"note",placeholder:V.kind==="kept"?"What is wrong with it?":V.anchor.region?"What is wrong with this area?":`What is wrong with this ${V.anchor.tag}?`},V.field),V.kind==="kept"?o.jsxs(o.Fragment,{children:[C.has(V.id)?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#B7A57A]",children:"Already sent. New words go with the next change."}):null,oe.stale?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-amber-500/90",children:"Its element has gone. The outline is where it was."}):null,p===V.field?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#F87171]",children:"Those words were not saved. Enter tries again."}):null,o.jsxs("div",{className:"flex items-center justify-between gap-3 px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:[o.jsx("button",{className:"rounded transition-colors hover:text-[#F87171]",onClick:()=>{f(V.id),Q(null)},type:"button",children:"Forget it"}),o.jsx("span",{children:"Enter saves · Esc drops"})]})]}):o.jsxs(o.Fragment,{children:[V.answered?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#B7A57A]",children:"That change has landed. Enter leaves these words as a new note."}):null,p===V.field?o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#F87171]",children:"Those words were not saved. Enter tries again."}):null,o.jsx("p",{className:"px-1 pt-1 text-[10px] leading-snug text-[#84848C]",children:V.anchor.covers&&V.anchor.covers.length>0?`${V.anchor.covers.length} ${V.anchor.covers.length===1?"element":"elements"} · Enter keeps it · Esc drops it`:"Enter keeps it · Esc drops it"})]})]})]}):null]})}const P1=["image/png","image/jpeg","image/webp","image/gif"],Mr=4,mp=1e7;function gp(u){return P1.includes(u.type)}function pp(u,s){const f=[],r=[];let h=Math.max(0,Mr-u.length);for(const g of s){if(!gp(g)){r.push({file:g,why:"not-an-image"});continue}if(g.size>mp){r.push({file:g,why:"too-big"});continue}if(h===0){r.push({file:g,why:"too-many"});continue}h-=1,f.push(g)}return{accepted:f,refused:r}}function yp(u){const s=u[0];if(s===void 0)return null;const f=u.length>1;switch(s.why){case"too-many":return`Up to ${Mr} images can ride with a change. ${f?`${u.length} were`:"One was"} left off.`;case"too-big":return`${f?"Some images are":"That image is"} over 10MB, which is more than an agent needs. Left off.`;case"not-an-image":return f?"Only PNG, JPEG, WebP and GIF images can be attached.":`${Cr(s.file.name)} is not an image Leglas can attach. PNG, JPEG, WebP or GIF.`}}function Cr(u){const s=u.replace(/\s+/g," ").trim();return s===""?"image":s}function vp(u){const s=Cr(u).replace(/[^\x20-\x7E]/g,"").trim();return(s===""?"image":s).slice(0,80)}function bp(u){if(u<1024)return`${u} B`;const s=u/1024;if(s<1024)return`${Math.round(s)} KB`;const f=s/1024;return`${f<10?f.toFixed(1):Math.round(f)} MB`}function xp(u){return u.flatMap(s=>s.status==="ready"&&s.id!==null?[s.id]:[])}function Sp(u){return u.some(s=>s.status==="failed")?"failed":u.some(s=>s.status==="uploading")?"uploading":null}function qs(u){return u===void 0?!1:Array.from(u).includes("Files")}function Ep({drafts:u,onRemove:s,onRetry:f}){return u.length===0?null:o.jsx("ul",{"aria-label":"Images attached to this change",className:"flex flex-wrap gap-1.5 px-2 pt-2",children:u.map(r=>{const h=r.status==="failed";return o.jsxs("li",{className:"leglas-reference group/reference relative",children:[o.jsx(Ot,{label:h?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Did not upload"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:"Click to try again"})]}):`${r.name} · ${bp(r.bytes)}`,children:h?o.jsx("button",{"aria-label":`${r.name} did not upload. Try again`,className:"block rounded transition-transform duration-150 focus-visible:outline-2 focus-visible:outline-offset-2 active:scale-[0.96] motion-reduce:transition-none",onClick:()=>f(r.key),type:"button",children:o.jsx(z1,{draft:r,failed:!0})}):o.jsx(z1,{draft:r,failed:!1})}),r.status==="uploading"?o.jsx("span",{"aria-label":"Uploading",className:"absolute bottom-1 right-1 size-3 animate-spin rounded-full border-[1.5px] border-white/30 border-t-white motion-reduce:animate-none",role:"status"}):h?o.jsx("span",{"aria-hidden":"true",className:"absolute bottom-1 right-1 flex size-3 items-center justify-center rounded-full bg-amber-400 text-[9px] font-semibold leading-none text-[#1C1C20]",children:"!"}):null,o.jsx("button",{"aria-label":`Remove ${r.name}`,className:"absolute -right-1.5 -top-1.5 flex size-4 items-center justify-center rounded-full bg-[#1E1E22] text-[#D1D5DB] opacity-0 shadow-[0_0_0_1px_rgba(255,255,255,0.12)] transition-[opacity,color,transform] duration-150 hover:text-white focus-visible:opacity-100 active:scale-[0.96] group-hover/reference:opacity-100 motion-reduce:transition-none",onClick:()=>s(r.key),type:"button",children:o.jsx("svg",{"aria-hidden":!0,fill:"none",height:"8",stroke:"currentColor",strokeLinecap:"round",strokeWidth:"1.75",viewBox:"0 0 16 16",width:"8",children:o.jsx("path",{d:"m4 4 8 8M12 4l-8 8"})})})]},r.key)})})}function z1({draft:u,failed:s}){return o.jsx("img",{alt:u.name,className:`block h-10 w-auto min-w-10 max-w-28 rounded object-cover ${s?"opacity-70 shadow-[0_0_0_1px_rgba(251,191,36,0.8)]":"shadow-[0_0_0_1px_rgba(255,255,255,0.1)]"}`,draggable:!1,src:u.url})}const wp=(u,s)=>fetch(u,s);async function Mp(u,s=wp){const f=await s("/leglas/api/references",{body:u,headers:{"content-type":u.type,"x-leglas-filename":vp(u.name??"")},method:"POST"});if(!f.ok)throw new Error("Leglas refused the image.");const r=await f.json(),h=r.reference?.id,g=r.reference?.file;if(r.ok!==!0||typeof h!="string"||typeof g!="string")throw new Error("Leglas refused the image.");return{id:h,file:g}}const Xs=(u,s)=>fetch(u,s);async function Cp(u=Xs){const s=await u("/leglas/api/annotations");if(!s.ok)throw new Error("Leglas refused the notes.");return(await s.json()).annotations??[]}async function jr(u,s,f){const r=await f(u,{body:JSON.stringify(s),headers:{"content-type":"application/json"},method:"POST"});if(!r.ok)throw new Error("Leglas refused the note.");const h=await r.json();if(h.ok!==!0)throw new Error("Leglas refused the note.");return h}function jp(u,s,f,r=Xs){return jr("/leglas/api/annotations",{anchor:f,note:s,title:u},r)}function Ap(u,s,f=Xs){return jr("/leglas/api/annotations/update",{id:u,note:s},f)}function Np(u,s=Xs){return jr("/leglas/api/annotations/delete",{ids:u},s)}function Tp(u){return[...new Set(u.filter(s=>s.mode!=="variant"&&(s.status==="queued"||s.status==="picked-up"||s.status==="running")).map(s=>s.title))]}function Dp(u){return new Set(u.filter(s=>s.status==="queued"||s.status==="picked-up"||s.status==="running").flatMap(s=>s.notes??[]))}function zp(u){return new Set(u.filter(s=>s.status==="picked-up"||s.status==="running").map(s=>s.title))}function Op(u,s,f=null){if(u==="custom"){const h=f?.trim().split(/\s+/)[0]??"";return{kind:"chosen",id:"custom",name:h===""?"Custom":h.split("/").pop()??"Custom"}}const r=u===null?void 0:s.find(h=>h.id===u);return r?.available?{kind:"chosen",id:r.id,name:r.name}:s.some(h=>h.available)?{kind:"choose"}:{kind:"none"}}function Rp(u){const s=u.max===null?`retry ${u.attempt}`:`retry ${u.attempt} of ${u.max}`,f=u.status,r=u.reason??"";return f===429||r.includes("rate")?`provider is rate limiting · ${s}`:f===401||f===403||r.includes("auth")?`provider refused the login · ${s}`:f===529||f===503||r.includes("overload")?`provider is overloaded · ${s}`:`provider returned an error · ${s}`}function _p(u){const s=Math.max(0,Math.floor(u/1e3));return s<60?`${s}s`:`${Math.floor(s/60)}m ${String(s%60).padStart(2,"0")}s`}function Lp(u,s,f){const r=u.find(v=>v.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 h=u.filter(v=>v.status==="queued").length;if(h>0)return{kind:"queued",count:h,attended:f};if(u.some(v=>v.status==="picked-up"))return{kind:"picked-up"};const g=u.findLast(v=>v.status==="failed"||v.status==="cancelled");return g===void 0?null:g.status==="cancelled"?{kind:"stopped",id:g.id,title:g.title}:{kind:"failed",id:g.id,title:g.title,reason:g.failure?.message??null}}const Oa=(u,s)=>fetch(u,s),Up=5e3,Bp=1e4;async function eh(u,s,f,r){const h=new AbortController,g=setTimeout(()=>h.abort(),f);try{return await r(u,{...s,signal:h.signal})}finally{clearTimeout(g)}}async function O1(u=!1,s=Oa){const f=await eh(`/leglas/api/agents${u?"?refresh=1":""}`,void 0,Up,s);if(!f.ok)throw new Error("Leglas refused the agent request.");return f.json()}async function Si(u,s,f){const r=await eh(u,{method:"POST",...s===null?{}:{headers:{"content-type":"application/json"},body:JSON.stringify(s)}},Bp,f);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 kp(u,s,f=Oa){return Si("/leglas/api/agent",{agent:u},f)}function Hp(u,s,f=Oa){return Si("/leglas/api/agent",{agent:u,effort:s},f)}function qp(u=Oa){return Si("/leglas/api/agents/warm",null,u)}function Yp(u,s=Oa){return Si("/leglas/api/requests/cancel",u==null?null:{id:u},s)}function Gp(u,s=Oa){return Si("/leglas/api/requests/retry",{id:u},s)}function Xp(u,s=Oa){return Si("/leglas/api/requests/dismiss",{id:u},s)}const rr={claude:{codeLabel:"Terminal command",copyLabel:"Copy Claude Code command",description:"Add Leglas with one terminal command.",label:"Claude Code",nextStep:"Run this command from your project, then ask Claude to list your Leglas directions.",snippet:"claude mcp add leglas -- npx -y leglas-mcp"},other:{codeLabel:"MCP configuration",copyLabel:"Copy MCP configuration",description:"Use standard MCP JSON with another coding agent.",label:"Codex, Cursor & others",nextStep:"Add this configuration in your client's MCP settings, restart the client, then ask it to list your Leglas directions.",snippet:`{
|
|
11
|
+
"mcpServers": {
|
|
12
|
+
"leglas": { "command": "npx", "args": ["-y", "leglas-mcp"] }
|
|
13
|
+
}
|
|
14
|
+
}`}};function Qp(u,s){return s==="copying"?"Copying…":s==="copied"?"Copied":u.copyLabel}function Zp(u){return u?{title:"Agent connected",detail:"Leglas received activity from an MCP agent in this project."}:{title:"Waiting for agent activity",detail:"This updates after the agent uses a Leglas tool."}}function Vp({client:u}){return o.jsx("span",{"aria-hidden":"true",className:"mt-0.5 flex h-5 w-7 shrink-0 items-center justify-center text-[#D1D5DB]",children:u==="claude"?o.jsx(xi,{id:"claude",size:17}):o.jsxs("span",{className:"flex -space-x-1.5",children:[o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-[#25252B] ring-1 ring-[#3A3A42]",children:o.jsx(xi,{id:"codex",size:14})}),o.jsx("span",{className:"flex size-5 items-center justify-center rounded-full bg-[#25252B] ring-1 ring-[#3A3A42]",children:o.jsx(xi,{id:"cursor",size:13})})]})})}function Kp({connected:u,fallbackFocusRef:s,onClose:f}){const[r,h]=M.useState("claude"),[g,v]=M.useState("idle"),C=M.useRef(null),E=M.useRef(null),x=M.useRef(f);x.current=f,M.useEffect(()=>{const R=C.current;if(R===null)return;const te=document.activeElement,se=Q=>{Q.preventDefault(),x.current()},V=Q=>{if(Q.key!=="Tab")return;const W=Array.from(R.querySelectorAll("button:not(:disabled), input:not(:disabled), [href], [tabindex]:not([tabindex='-1'])")),ie=W[0],ue=W.at(-1);ie===void 0||ue===void 0?(Q.preventDefault(),R.focus()):Q.shiftKey&&document.activeElement===ie?(Q.preventDefault(),ue.focus()):!Q.shiftKey&&document.activeElement===ue&&(Q.preventDefault(),ie.focus())};return R.addEventListener("cancel",se),R.addEventListener("keydown",V),R.open||R.showModal(),E.current?.focus(),()=>{R.removeEventListener("cancel",se),R.removeEventListener("keydown",V),R.open&&R.close();const Q=s.current;(Q?.isConnected?Q:te)?.focus()}},[s]);const _=rr[r],L=Zp(u),B=R=>{h(R),v("idle")},Y=async()=>{if(g==="copying")return;v("copying");const R=await wr(_.snippet);v(R==="copied"?"copied":"blocked")};return o.jsx("dialog",{"aria-describedby":"mcp-connect-description","aria-labelledby":"mcp-connect-title","aria-modal":"true",className:"m-auto max-h-[calc(100dvh-2rem)] max-w-none overflow-visible border-0 bg-transparent p-0 text-start text-inherit backdrop:bg-black/55 backdrop:backdrop-blur-sm",onPointerDown:R=>{R.target===R.currentTarget&&f()},ref:C,tabIndex:-1,children:o.jsxs("div",{className:"w-[calc(100vw-2rem)] max-w-lg overscroll-contain rounded-xl border border-[#2A2A30] bg-[#1E1E22] p-5 shadow-2xl",children:[o.jsxs("div",{className:"flex items-start gap-3",children:[o.jsx("span",{"aria-hidden":"true",className:"flex size-10 shrink-0 items-center justify-center rounded-lg border border-[#34343B] bg-[#25252A] shadow-inner",children:o.jsx(Eu,{size:24})}),o.jsxs("div",{className:"min-w-0 pt-0.5",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(Z1,{height:11}),o.jsx("span",{className:"rounded-full bg-[#7C9CFF]/10 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-[0.08em] text-[#AFC2FF]",children:"MCP setup"})]}),o.jsx("h2",{className:"mt-2 text-base font-medium text-white",id:"mcp-connect-title",children:"Connect agent via MCP"}),o.jsx("p",{className:"mt-1.5 max-w-md text-xs leading-relaxed text-[#9CA3AF]",id:"mcp-connect-description",children:"Connect an MCP-compatible agent so it can handle requests in this project."})]})]}),o.jsxs("fieldset",{className:"mt-5",children:[o.jsx("legend",{className:"text-[10px] font-medium uppercase tracking-[0.08em] text-[#84848C]",children:"MCP client"}),o.jsx("div",{className:"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",children:Object.keys(rr).map((R,te)=>{const se=rr[R],V=r===R;return o.jsxs("label",{className:`flex cursor-pointer items-start gap-2.5 rounded-lg border p-3 transition-[background-color,border-color,color] duration-150 ${V?"border-[#6678B8] bg-[#7C9CFF]/10 text-white":"border-[#2A2A30] bg-[#19191D] text-[#D1D5DB] hover:border-[#3A3A42] hover:bg-[#24242A]"}`,children:[o.jsx("input",{checked:V,className:"mt-0.5 size-3.5 shrink-0 accent-[#AFC2FF] focus-visible:outline-2 focus-visible:outline-offset-2",name:"mcp-client",onChange:()=>B(R),ref:te===0?E:void 0,type:"radio",value:R}),o.jsx(Vp,{client:R}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:"block text-xs font-medium",children:se.label}),o.jsx("span",{className:"mt-0.5 block text-[10px] leading-relaxed text-[#84848C]",children:se.description})]})]},R)})})]}),o.jsxs("div",{className:"mt-5 overflow-hidden rounded-lg border border-[#2A2A30] bg-[#151519]",children:[o.jsxs("div",{className:"flex min-h-9 items-center justify-between gap-3 border-b border-[#2A2A30] px-3",children:[o.jsx("span",{className:"text-[10px] font-medium text-[#84848C]",children:_.codeLabel}),o.jsxs("button",{className:"flex min-h-7 shrink-0 items-center gap-1.5 rounded-md px-2 text-[10px] font-medium text-[#D1D5DB] transition-[background-color,color,scale] duration-150 hover:bg-white/[0.06] hover:text-white active:scale-[0.96] disabled:opacity-60",disabled:g==="copying",onClick:()=>{Y()},type:"button",children:[o.jsx(Mn,{d:wn.copy,size:12}),Qp(_,g)]})]}),o.jsx("pre",{"aria-label":_.codeLabel,className:"max-h-44 overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[11px] leading-relaxed text-[#D1D5DB]",tabIndex:0,children:o.jsx("code",{children:_.snippet})})]}),o.jsx("p",{className:"mt-2 min-h-4 text-[10px] leading-relaxed",role:"status",children:g==="blocked"?o.jsx("span",{className:"text-red-300",children:"Clipboard access is blocked. Select and copy the text above."}):g==="copied"?o.jsx("span",{className:"text-emerald-300",children:"Copied to the clipboard."}):null}),o.jsxs("div",{className:"mt-4 space-y-4",children:[o.jsx("p",{className:"text-xs leading-relaxed text-[#9CA3AF]",children:_.nextStep}),o.jsxs("div",{className:`flex items-start gap-2.5 rounded-lg px-3 py-2.5 ${u?"bg-emerald-400/10":"bg-white/[0.04]"}`,role:"status",children:[o.jsx("span",{"aria-hidden":"true",className:`mt-0.5 flex size-4 shrink-0 items-center justify-center rounded-full ${u?"bg-emerald-400 text-[#123326]":"border border-[#5B5B66]"}`,children:u?o.jsx("svg",{fill:"none",height:"10",viewBox:"0 0 12 12",width:"10",children:o.jsx("path",{d:"m2.2 6.1 2.2 2.2 5.4-5.2",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.8"})}):null}),o.jsxs("span",{className:"min-w-0",children:[o.jsx("span",{className:`block text-xs font-medium ${u?"text-emerald-200":"text-[#D1D5DB]"}`,children:L.title}),o.jsx("span",{className:"mt-0.5 block text-[10px] leading-relaxed text-[#84848C]",children:L.detail})]})]})]}),o.jsx("div",{className:"mt-5 flex justify-end",children:o.jsx("button",{className:"rounded-md bg-[#E8E8EA] px-3 py-1.5 text-xs font-medium text-[#1C1C20] transition-[background-color,scale] duration-150 hover:bg-white active:scale-[0.96]",onClick:f,type:"button",children:"Done"})})]})})}function $p({children:u,label:s}){return s===null?o.jsx(o.Fragment,{children:u}):o.jsx(Ot,{label:s,side:"right",wide:!0,children:u})}function Jp(u,s,f){const r=I1(u);return r===null?null:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block text-white",children:s}),u?.note?o.jsx("span",{className:"mt-0.5 block font-normal text-[#D1D5DB]",children:u.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 ",f(r.basedOn)]}),r.askedFor===null?null:o.jsxs("span",{className:"mt-0.5 block",children:["You asked for “",r.askedFor,"”"]})]})]})}const fr=[{key:"satoshi",label:"Satoshi",stack:"var(--font-satoshi)"},{key:"outfit",label:"Outfit",stack:"var(--font-outfit)"},{key:"geist",label:"Geist",stack:"var(--font-geist)"}],dr=["#34D399","#38BDF8","#818CF8","#C084FC","#FB7185","#FB923C"];function Fp(u){let s=0;for(const r of u)s=s*31+r.charCodeAt(0)|0;const f=dr[Math.abs(s)%dr.length]??dr[0];return{backgroundColor:`${f}22`,color:f}}const R1=15e3,Wp=3e4,_1={height:800,width:1280},Ip=96,L1={attached:!1,running:!1,name:null,activity:null,startedAt:null,stopping:!1,waiting:null},Pp={agents:[],choice:null,customRun:null,effort:null},U1={low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},th=typeof navigator<"u"&&/Mac|iPhone|iPad|iPod/.test(navigator.userAgent),ey=K1(th);function ty({mac:u,onClose:s}){const f=M.useRef(null),r=Pg(u);return M.useEffect(()=>{const h=document.activeElement;f.current?.focus();const g=v=>{v.key==="Escape"&&(v.preventDefault(),s())};return window.addEventListener("keydown",g),()=>{window.removeEventListener("keydown",g),h?.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:h=>{h.target===h.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:f,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(h=>o.jsxs("div",{className:"flex items-baseline justify-between gap-4",children:[o.jsx("dt",{className:"flex shrink-0 items-baseline gap-1",children:h.keys.map((g,v)=>o.jsxs("span",{className:"flex items-baseline gap-1",children:[v>0&&h.join?o.jsx("span",{className:"text-[10px] text-[#84848C]",children:h.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:g})]},g))}),o.jsx("dd",{className:"text-right text-xs leading-snug text-[#9CA3AF]",children:h.label})]},h.label))})]})})}function ny({busy:u,count:s,error:f,fallbackFocusRef:r,name:h,onCancel:g,onConfirm:v}){const C=M.useRef(null),E=M.useRef(null),x=M.useRef(g);x.current=g,M.useEffect(()=>{const Y=E.current;if(Y===null)return;const R=document.activeElement,te=V=>{V.preventDefault(),x.current()},se=V=>{if(V.key!=="Tab")return;const Q=Array.from(Y.querySelectorAll("button:not(:disabled)")),W=Q[0],ie=Q.at(-1);W===void 0||ie===void 0?(V.preventDefault(),Y.focus()):V.shiftKey&&document.activeElement===W?(V.preventDefault(),ie.focus()):!V.shiftKey&&document.activeElement===ie&&(V.preventDefault(),W.focus())};return Y.addEventListener("cancel",te),Y.addEventListener("keydown",se),Y.open||Y.showModal(),C.current?.focus(),()=>{Y.removeEventListener("cancel",te),Y.removeEventListener("keydown",se),Y.open&&Y.close(),(R?.isConnected?R:r.current)?.focus()}},[]);const _=s===1,L=_?"Delete removed direction?":"Clear removed directions?",B=_?`This permanently removes “${h??"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:Y=>{Y.target===Y.currentTarget&&!u&&g()},ref:E,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:L}),o.jsxs("div",{className:"mt-2 space-y-1 text-xs leading-relaxed text-[#9CA3AF]",id:"delete-removed-description",children:[o.jsx("p",{children:B}),o.jsx("p",{children:"Source files and shared project config stay untouched."})]}),f!==null?o.jsx("p",{className:"mt-3 text-xs leading-relaxed text-red-300",role:"alert",children:f}):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:u,onClick:g,ref:C,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:u,onClick:v,type:"button",children:u?"Deleting…":_?"Delete":"Delete all"})]})]})})}function ly({previews:u,project:s,scanPreviews:f=!0,warnings:r=[]}){const h=M.useRef(null),g=M.useRef(null),v=M.useRef(null),[C,E]=M.useState(!1),[x,_]=M.useState(null),[L,B]=M.useState(!1),[Y,R]=M.useState(!1),te=M.useCallback(()=>v.current?.(),[]),se=M.useCallback(()=>E(d=>!d),[]),V=M.useCallback(()=>E(!1),[]),[Q,W]=M.useState(!1),ie=M.useCallback(()=>W(d=>!d),[]),ue=M.useCallback(()=>Ba(d=>!d),[]),p=$2({previews:u,project:s,searchRef:h,onToggleSplit:te,onToggleHelp:se,onToggleTools:ie,onToggleNote:ue,suspended:C||x!==null||L}),I=()=>{Y||_(null)},fe=async()=>{if(x===null||Y)return;const d=x;R(!0),_({...d,error:null});try{await p.deleteRemoved(d.titles),_(null),p.notify({kind:`delete:${d.titles.join("|")}`,message:d.titles.length===1?`${p.displayName(d.titles[0]??"")} permanently deleted`:`${d.titles.length} removed directions permanently deleted`,tone:"info",ttl:bt.plain})}catch(j){_({...d,error:j instanceof Error?j.message:"The directions could not be deleted."})}finally{R(!1)}},[me,ge]=M.useState(!1),[Ee,he]=M.useState(null),qe=Ee!==null,Ae=M.useRef(!1),[ke,D]=M.useState(""),[Z,le]=M.useState("variant");M.useEffect(()=>{const d=g.current;d!==null&&(d.style.height="0px",d.style.height=`${Math.min(d.scrollHeight,96)}px`)},[ke,p.prefs.width]);const[be,Me]=M.useState(!1),[b,U]=M.useState([]),F=M.useRef(new Map),ne=M.useRef(null),[oe,ve]=M.useState(!1),k=M.useRef(0),K=M.useCallback((d,j)=>{F.current.set(d,j),U(q=>q.map($=>$.key===d?{...$,status:"uploading",id:null}:$)),Mp(j).then(({id:q})=>U($=>$.map(ee=>ee.key===d?{...ee,status:"ready",id:q}:ee))).catch(()=>U(q=>q.map($=>$.key===d?{...$,status:"failed",id:null}:$)))},[]),J=d=>{if(p.active===null||be)return;const{accepted:j,refused:q}=pp(b,d),$=yp(q);if($!==null&&p.notify({kind:"reference",message:$,tone:"info",ttl:bt.action}),j.length===0)return;const ee=j.map(re=>({key:crypto.randomUUID(),name:Cr(re.name),type:re.type,bytes:re.size,url:URL.createObjectURL(re),status:"uploading",id:null}));U(re=>[...re,...ee]),ee.forEach((re,pe)=>{const Oe=j[pe];Oe!==void 0&&K(re.key,Oe)})},ae=d=>{F.current.delete(d);const j=b.find(q=>q.key===d);j!==void 0&&URL.revokeObjectURL(j.url),U(q=>q.filter($=>$.key!==d))},Le=d=>{const j=F.current.get(d);j!==void 0&&K(d,j)},Ve=()=>{F.current.clear();for(const d of b)URL.revokeObjectURL(d.url);U([])},[Xe,$e]=M.useState(null),[ze,Qe]=M.useState(!1),[nt,mt]=M.useState(!1),[Tt,nn]=M.useState(null),Ln=M.useRef(null),Xn=M.useRef(null),Jl=M.useRef(null),gt=M.useRef(null),Fl=M.useRef(null),Wl=M.useRef(null),[Ra,gl]=M.useState(Ip);M.useEffect(()=>{const d=Wl.current;if(d===null||typeof ResizeObserver>"u")return;const j=()=>gl(d.offsetHeight);j();const q=new ResizeObserver(j);return q.observe(d),()=>q.disconnect()},[]);const Il=M.useRef(null),[pl,Pl]=M.useState({height:0,on:!1,top:0});M.useEffect(()=>{Pl(d=>d.on?{...d,on:!1}:d)},[p.rows.join("|")]);const[xt,Zt]=M.useState(null),Rt=M.useRef(null),Gt=M.useRef(null);M.useEffect(()=>{Rt.current=xt},[xt]),M.useEffect(()=>{if(!p.focusing)return;const d=p.focusing.target==="search"?h.current:g.current;d?.focus(),d?.select()},[p.focusing]),M.useEffect(()=>{if(!xt)return;const d=Gt.current;if(!d)return;const j=$=>{const ee=$.clientY-d.startY,re=$.clientX-d.startX;Zt(pe=>{if(!pe||pe.settling)return pe;if(!pe.started){if(Math.abs(ee)<=4&&Math.abs(re)<=4)return{...pe,dy:ee};if(Math.abs(re)>Math.abs(ee))return null;window.getSelection()?.removeAllRanges()}const Oe=d.rows[pe.from];if(!Oe)return pe;const Kt=Math.max(d.minDy,Math.min(d.maxDy,ee)),Dt=Oe.mid+ee;let un=0;return d.rows.forEach((Mt,zn)=>{zn!==pe.from&&Dt>Mt.mid&&(un+=1)}),{...pe,dy:Kt,started:!0,to:un}})},q=()=>{const $=Rt.current;if(!$?.started){Zt(null);return}d.suppressed=!0;let ee=0;if($.to>$.from)for(let re=$.from+1;re<=$.to;re+=1)ee+=(d.rows[re]?.height??0)+$.gap;else for(let re=$.to;re<$.from;re+=1)ee-=(d.rows[re]?.height??0)+$.gap;Zt({...$,dy:ee,settling:!0}),window.setTimeout(()=>{p.moveOption($.title,$.to),Zt(null),window.setTimeout(()=>{d.suppressed=!1},0)},190)};return window.addEventListener("pointermove",j),window.addEventListener("pointerup",q),window.addEventListener("pointercancel",q),()=>{window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",q),window.removeEventListener("pointercancel",q)}},[xt!==null]),M.useEffect(()=>{if(!Q)return;Xn.current?.focus();const d=$=>{$.key==="Escape"&&(W(!1),Ln.current?.focus())},j=$=>{const ee=$.target;!Xn.current?.contains(ee)&&!Ln.current?.contains(ee)&&W(!1)},q=()=>W(!1);return window.addEventListener("keydown",d),window.addEventListener("pointerdown",j),window.addEventListener("blur",q),()=>{window.removeEventListener("keydown",d),window.removeEventListener("pointerdown",j),window.removeEventListener("blur",q)}},[Q]);const ft="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",ea=fr.find(d=>d.key===p.prefs.font)??fr[0],yl=p.prefs.viewport!==null,Ei=48,Vt=xt?.started??!1,Qn=p.resizing||Vt||qe,[jn,O]=M.useState({}),[P,Ce]=M.useState({}),[Se,je]=M.useState(!1),[ot,Ke]=M.useState(null),St=M.useRef(null);M.useEffect(()=>()=>{St.current=p.active},[p.active]),v.current=()=>{!Se&&ut!==null&&Ke(ut),(ut!==null||Se)&&je(d=>!d)};const ut=o2({active:p.active,previous:St.current,pinned:ot,parent:p.parentOf(p.active),rows:p.rows}),vl=r2({active:p.active,compare:ut,split:Se}),Xt=vl.length>1,Zn=vl,ta=M.useRef(new Map),Vn=d=>e2(d,p.urlFor(d),P[d]??0),na=d=>{const j=Vn(d);return ta.current.get(d)===j&&p.isLoaded(d,j)},An=Zn.filter(d=>p.branchState(d)?.status==="idle").join("");M.useEffect(()=>{for(const d of An.split("").filter(Boolean))p.startBranch(d)},[An]);const st=new Map(Zn.map(d=>[d,Vn(d)])),Lt=[...st.values()].join(""),Kn=M.useRef(st);Kn.current=st,M.useLayoutEffect(()=>{const d=ta.current,j=[...st].filter(([q,$])=>d.get(q)!==$);for(const[q]of j)p.resetLoaded(q);j.some(([q])=>jn[q])&&O(q=>{const $={...q};for(const[ee]of j)$[ee]=!1;return $}),ta.current=new Map(st)},[Lt]);const _a=M.useRef(null),wu=M.useRef(null),[la,wi]=M.useState({height:0,width:0}),aa=M.useCallback(d=>{if(_a.current=d,wu.current?.disconnect(),d===null)return;const j=d.getBoundingClientRect();wi({height:j.height,width:j.width});const q=new ResizeObserver(([$])=>{const ee=$?.contentRect;ee&&wi({height:ee.height,width:ee.width})});q.observe(d),wu.current=q},[]),{boxHeight:Mi,boxWidth:bl,designWidth:$n,frameHeight:ia,scale:Un,scaling:We}=h2({gutter:Ei,panes:vl.length,scaleSplit:p.prefs.scaleSplit,stageHeight:la.height,stageWidth:la.width,viewport:p.prefs.viewport}),Ci=p.prefs.viewport!==null?Math.round(p.prefs.viewport):la.width<=0?null:Math.round(Xt&&!We?(la.width-1)/2:la.width),Mu=Ee?(()=>{const{x:d,y:j}=U2(Ee);return{bottom:"auto",left:d,right:"auto",top:j}})():void 0,Jn=d=>{if(d.button!==0)return;const j=_a.current?.getBoundingClientRect();if(!j)return;const q=d.currentTarget;q.setPointerCapture(d.pointerId),Ae.current=!1;const $={x:d.clientX,y:d.clientY};let ee=!1;const re=Oe=>{!ee&&!B2($,{x:Oe.clientX,y:Oe.clientY})||(ee=!0,he(L2({x:Oe.clientX-j.left,y:Oe.clientY-j.top},{width:j.width,height:j.height})))},pe=Oe=>{if(q.hasPointerCapture(Oe.pointerId)&&q.releasePointerCapture(Oe.pointerId),q.removeEventListener("pointermove",re),q.removeEventListener("pointerup",pe),q.removeEventListener("pointercancel",pe),he(null),!ee)return;Ae.current=!0;const{corner:Kt}=k2({x:Oe.clientX-j.left,y:Oe.clientY-j.top},{width:j.width,height:j.height});p.setPrefs(Dt=>({...Dt,corner:Kt})),W(!1)};q.addEventListener("pointermove",re),q.addEventListener("pointerup",pe),q.addEventListener("pointercancel",pe)},[Ut,Cu]=M.useState(s2),Fn=new Set(u.filter(m1).map(d=>d.title)),ju=Fn.size>0,[Nn,La]=M.useState({requests:[],agent:L1}),[Ua,Tn]=M.useState([]),[Et,Ba]=M.useState(!1),[ln,xl]=M.useState(Pp),[ji,Sl]=M.useReducer(d=>d+1,0);M.useEffect(()=>{let d=!1;return O1(ji>0).then(j=>{d||xl(q=>JSON.stringify(q)===JSON.stringify(j)?q:j)}).catch(()=>{}),()=>{d=!0}},[ji]);const[Qs,wt]=M.useReducer(d=>d+1,0);M.useEffect(()=>{let d=!1;const q=br(async $=>{const ee=(re,pe)=>fetch(re,{...pe,signal:$});await fetch("/leglas/api/requests",{signal:$}).then(re=>re.json()).then(re=>{if(d)return;const pe={requests:re.requests,agent:re.agent??L1};La(Oe=>JSON.stringify(Oe)===JSON.stringify(pe)?Oe:pe)}).catch(()=>{}),await Cp(ee).then(re=>{d||Tn(pe=>JSON.stringify(pe)===JSON.stringify(re)?pe:re)}).catch(()=>{})},{everyMs:yr,subscribe:$=>vr().on("requests",$)});return()=>{d=!0,q()}},[Qs]);const rt=Op(ln.choice,ln.agents,ln.customRun),Ai=M.useRef(0),ua=()=>{if(rt.kind!=="chosen")return;const d=Date.now();d-Ai.current<Wp||(Ai.current=d,qp().catch(()=>{}))},Jt=rt.kind==="chosen"?ln.agents.find(d=>d.id===rt.id&&d.available):void 0,ka=ln.effort!==null&&Jt?.efforts.includes(ln.effort)?ln.effort:null,Bt=p.active===null?[]:Ua.filter(d=>d.title===p.active),Bn=(()=>{const d=I1(p.active===null?void 0:p.previewFor(p.active));return d===null?null:J2(d.basedOn===null?null:p.displayName(d.basedOn),d.askedFor)})(),Zs=rt.kind==="chosen"&&ln.agents.some(d=>d.id===rt.id&&d.auth==="signed-out"),we=Lp(Nn.requests,Nn.agent,rt.kind==="chosen"||Nn.agent.attached),Au=we===null?null:we.kind==="running"?we.stopping?`Stopping ${we.name}`:`${we.name} is on it`:we.kind==="queued"?we.count===1?"Change queued":`${we.count} changes queued`:we.kind==="picked-up"?"Your agent is on it":we.kind==="stopped"?"You stopped that change":"That change failed",Ha=we===null?null:we.kind==="running"?we.stopping?"waiting for it to exit":we.waiting!==null?Rp(we.waiting):we.activity??we.title:we.kind==="queued"?we.attended?"your agent picks it up next":"pick who runs your changes":we.kind==="failed"?we.reason??we.title:we.kind==="stopped"?we.title:null,qa=we?.kind==="running"?we.startedAt:null,[Vs,sa]=M.useState(()=>Date.now());M.useEffect(()=>{if(qa===null)return;sa(Date.now());const d=window.setInterval(()=>sa(Date.now()),1e3);return()=>window.clearInterval(d)},[qa]),M.useEffect(()=>{rt.kind==="none"&&mt(!1)},[rt.kind]),M.useEffect(()=>{if(!nt)return;Jl.current?.focus();const d=$=>{$.key==="Escape"&&(mt(!1),gt.current?.focus())},j=$=>{const ee=$.target;!Jl.current?.contains(ee)&&!gt.current?.contains(ee)&&mt(!1)},q=()=>mt(!1);return window.addEventListener("keydown",d),window.addEventListener("pointerdown",j),window.addEventListener("blur",q),()=>{window.removeEventListener("keydown",d),window.removeEventListener("pointerdown",j),window.removeEventListener("blur",q)}},[nt]);const Dn=d=>{if(Xe!==null||ze)return;const j=ln.agents.find(q=>q.id===d)?.name??"Agent";$e(d),kp(d).then(()=>{Sl(),mt(!1)}).catch(async()=>{try{const q=await O1(!0);if(xl(q),q.choice===d){mt(!1);return}}catch{}p.notify({kind:"agent-choice",message:`${j} wasn’t selected. Try again.`,tone:"danger",ttl:bt.action})}).finally(()=>$e(null))},Ni=d=>{if(Jt===void 0||ze||Xe!==null)return;const j=ln.effort;Qe(!0),xl(q=>({...q,effort:d})),Hp(Jt.id,d).then(()=>Sl()).catch(()=>{xl(q=>({...q,effort:j})),p.notify({kind:"agent-choice",message:"Effort could not be saved. Agent settings did not change.",tone:"danger",ttl:bt.action})}).finally(()=>Qe(!1))},Ti=d=>{Tt===null&&(nn("cancel"),Yp(d).then(()=>wt()).catch(()=>{p.notify({kind:"agent-cancel",message:"Leglas could not stop that run.",tone:"danger",ttl:bt.action})}).finally(()=>nn(null)))},El=d=>{Tt===null&&(nn("retry"),Gp(d).then(()=>wt()).catch(()=>{p.notify({kind:"agent-retry",message:"That change could not be retried.",tone:"danger",ttl:bt.action})}).finally(()=>nn(null)))},wl=d=>{Tt===null&&(nn("dismiss"),Xp(d).then(()=>wt()).catch(()=>{p.notify({kind:"agent-dismiss",message:"That change could not be dismissed.",tone:"danger",ttl:bt.action})}).finally(()=>nn(null)))};M.useEffect(()=>{let d=!1;const q=br($=>fetch("/leglas/api/health",{signal:$}).then(ee=>ee.json()).then(({reachable:ee})=>{d||Cu(re=>c2(re,ee))}).catch(()=>{}),{everyMs:yr,subscribe:$=>vr().on("health",$)});return()=>{d=!0,q()}},[]),M.useEffect(()=>{!Ut.reachable||!Ut.wasDown||(O(d=>{const j={...d};for(const q of Object.keys(j))Fn.has(q)&&(j[q]=!1);return j}),Ce(d=>{const j={...d};for(const q of Fn)j[q]=(j[q]??0)+1;return j}),Cu(d=>({...d,wasDown:!1})))},[Ut.reachable,Ut.wasDown]);const[Di,ca]=M.useState({}),[Nu,oa]=M.useState(()=>!document.hidden);M.useEffect(()=>{const d=()=>oa(!document.hidden);return document.addEventListener("visibilitychange",d),()=>document.removeEventListener("visibilitychange",d)},[]);const an=new Map(u.map(d=>[d.title,Vn(d.title)])),zi=[...an].map(([d,j])=>`${d}${j}`).join(""),Ml=M.useRef(new Map);M.useLayoutEffect(()=>{const d=D2(Ml.current,an);d.length>0&&ca(j=>or(j,d)),Ml.current=new Map(an)},[zi]);const Ft=(d,j)=>{let q=null;try{q=d.contentDocument}catch{return}if(!q?.head)return;const $="leglas-hide-dev-overlays",ee=(re,pe,Oe)=>{const Kt=re.getElementById($);if(!j){Kt?.remove();return}if(Kt)return;const Dt=q.createElement("style");Dt.id=$,Dt.textContent=Oe,pe.appendChild(Dt)};ee(q,q.head,m2);for(const re of q.querySelectorAll("nextjs-portal")){const pe=re.shadowRoot;pe&&ee(pe,pe,g2)}};M.useEffect(()=>{for(const d of document.querySelectorAll("iframe"))Ft(d,!p.prefs.showDevOverlays)});const Oi=d=>{let j=null;try{j=d.contentDocument}catch{return}if(!j?.body)return;const q=[...j.body.querySelectorAll("*")].slice(0,400).map(pe=>pe.tagName),$=j.defaultView,ee=$?N2(j.body,pe=>{const Oe=$.getComputedStyle(pe);return{backgroundColor:Oe.backgroundColor,backgroundImage:Oe.backgroundImage,color:Oe.color}}):[],re=$?A2(j.body,(pe,Oe)=>$.getComputedStyle(pe,Oe)):[];return y2(j.body.innerText??"",q,ee,re)},Ya=(d,j)=>{let q;try{q=d.contentDocument?.fonts}catch{}const $=new Promise(re=>window.setTimeout(re,900));(q?.status==="loading"?Promise.race([q.ready.then(()=>{}),$]):Promise.resolve()).then(()=>{const re=()=>{Ft(d,!p.prefs.showDevOverlays),j(Oi(d))};typeof window.requestIdleCallback=="function"?window.requestIdleCallback(re,{timeout:1200}):window.setTimeout(re,0)})},Ri=M.useRef(new WeakSet),Wn=(d,j,q)=>{if(Kn.current.get(d)!==j)return;p.markLoaded(d,j),O(ee=>ee[d]?{...ee,[d]:!1}:ee),Ft(q,!p.prefs.showDevOverlays);let $=null;try{$=q.contentDocument}catch{}$===null||Ri.current.has($)||Ri.current.add($)},ra=M.useRef(Wn);ra.current=Wn,M.useEffect(()=>{const d=j=>{if(j.origin!==window.location.origin)return;const q=i2(j.data);if(q===null)return;const $=u2(document.querySelectorAll("iframe[data-preview]"),j.source),ee=$?.dataset.preview,re=$?.dataset.previewIdentity;$===null||ee===void 0||re===void 0||(q==="ready"?ra.current(ee,re,$):O(pe=>({...pe,[ee]:!0})))};return window.addEventListener("message",d),()=>window.removeEventListener("message",d)},[]);const Tu=f?Ut.reachable?u:u.filter(d=>!m1(d)):[],pt=Tp(Nn.requests),In=pt.toSorted().join("\0"),Ga=Nn.agent.running||pt.length>0,fa=zp(Nn.requests),Ks=Dp(Nn.requests);M.useEffect(()=>{pt.length!==0&&ca(d=>or(d,pt))},[In]);const _i=Zn.every(d=>na(d)),Xa=pt.length>0?or(Di,pt):Di,da=O2(u,Xa),kn=T2(da),mn=!Ga&&_i&&Nu?R2(Tu,Xa)[0]??null:null,$s=mn?.title??null,Qa=mn===null?null:`${mn.title}\0${mn.url}`,Li=M.useRef(Qa);Li.current=Qa;const ha=M.useRef(null),Du=M.useRef(new Map(u.map(d=>[d.title,d.url])));Du.current=new Map(u.map(d=>[d.title,d.url]));const zu=(d,j,q)=>{const $=`${d.title}\0${d.url}`;Li.current===$&&ha.current===q&&Du.current.get(d.title)===d.url&&ca(ee=>z2(ee,d,j))};M.useEffect(()=>{if(mn===null)return;const d=ha.current;if(d===null)return;const j=window.setTimeout(()=>{zu(mn,{status:"failed"},d)},R1);return()=>clearTimeout(j)},[Qa]);const Js=(d,j)=>{xr(j)&&(Ft(j,!p.prefs.showDevOverlays),window.setTimeout(()=>{const q=`${d.title}\0${d.url}`;Li.current===q&&Ya(j,$=>{zu(d,$===void 0?{status:"failed"}:{status:"complete",signature:$},j)})},600))};M.useEffect(()=>{const d=[];for(const j of Zn){const q=st.get(j)??Vn(j);if(p.isLoaded(j,q)||jn[j])continue;const $=document.querySelector(`iframe[data-preview="${CSS.escape(j)}"]`);if($===null)continue;const ee=Ut.reachable||!Fn.has(j)?R1:0;d.push(a2({frame:$,onFailure:()=>O(re=>({...re,[j]:!0})),onReady:()=>Wn(j,q,$),sameOrigin:p.urlFor(j).startsWith("/"),timeoutMs:ee}))}return()=>{for(const j of d)j()}},[Lt,p.loaded,jn,Ut.reachable]);const Fs=d=>{O(j=>({...j,[d]:!1})),p.resetLoaded(d),Ce(j=>({...j,[d]:(j[d]??0)+1}))},Ws=(d,j)=>q=>{if(q.button!==0||p.renaming||p.query.trim()||p.rows.length<2||q.target.closest("button, [data-selectable]"))return;const $=Il.current,ee=$?.parentElement;if(!$||!ee)return;const re=[...$.querySelectorAll("li[data-title]")],pe=re.map(Mt=>({height:Mt.offsetHeight,mid:Mt.offsetTop+Mt.offsetHeight/2,title:Mt.dataset.title??"",top:Mt.offsetTop})),Oe=ee.getBoundingClientRect(),Kt=re[j]?.getBoundingClientRect();Gt.current={maxDy:Kt?Oe.bottom-Kt.bottom:0,minDy:Kt?Oe.top-Kt.top:0,rows:pe,startX:q.clientX,startY:q.clientY,suppressed:!1};const Dt=pe[0],un=pe[1];Zt({dy:0,from:j,gap:Dt&&un?un.top-Dt.top-Dt.height:0,height:pe[j]?.height??0,title:d,settling:!1,started:!1,to:j})},Ou=d=>{if(!xt?.started)return 0;const j=xt.height+xt.gap;return d<xt.from&&d>=xt.to?j:d>xt.from&&d<=xt.to?-j:0},Ru=M.useCallback(()=>Ba(!1),[]),Is=(d,j,q)=>(ua(),jp(d,q,j).then(()=>(wt(),!0)).catch(()=>(p.notify({kind:"request",message:"That annotation could not be kept.",tone:"danger",ttl:bt.action}),!1))),Ps=(d,j)=>Ap(d,j).then(()=>(wt(),!0)).catch(()=>(p.notify({kind:"request",message:"That annotation could not be changed.",tone:"danger",ttl:bt.action}),!1)),ec=d=>{Np([d]).then(()=>wt()).catch(()=>{})},Ui=d=>{window.open(p.urlFor(d),"_blank","noopener,noreferrer")},tc=(d,j)=>{const q=d===p.active,$=fa.has(d),ee=p.previewFor(d),re=Vt&&xt?.title===d,pe=Vt&&!re?Ou(j):0,Oe=p.rowMeta.get(d),Kt=Oe?.depth===1,Dt=Oe?.variants??0,un=Oe?.folded??!1,Mt=p.renaming===d,zn=Vt||Mt?"":"group-hover:hidden group-has-[button:focus-visible]:hidden";return o.jsxs("li",{className:`group relative ${re?`z-30 rounded-md bg-white/[0.06] shadow-2xl ${xt?.settling?`transition-transform duration-200 ${Ta} motion-reduce:transition-none`:""}`:"z-10"} ${Vt&&!re?`transition-transform duration-200 ${Ta} motion-reduce:transition-none`:""}`,"data-title":d,onPointerEnter:lt=>Pl({height:lt.currentTarget.offsetHeight,on:!0,top:lt.currentTarget.offsetTop}),style:re?{transform:`translateY(${xt?.dy??0}px)`}:pe?{transform:`translateY(${pe}px)`}:void 0,children:[o.jsx($p,{label:Mt?null:Jp(ee,p.displayName(d),p.displayName),children:o.jsx("div",{"aria-pressed":q,className:`relative flex w-full cursor-grab items-start gap-2 rounded-md py-2 pr-3 text-left transition-colors active:cursor-grabbing ${Kt?"pl-11":"pl-3"} ${q?"bg-[#2E2E2E] ring-1 ring-inset ring-[#D1D5DB]/40":""}`,onClick:()=>{if(!Mt){if(Gt.current?.suppressed){Gt.current.suppressed=!1;return}p.setActive(d)}},onDoubleClick:lt=>{Mt||lt.target.closest("button")||(window.getSelection()?.removeAllRanges(),Ui(d))},onKeyDown:lt=>{lt.target===lt.currentTarget&&(lt.key==="Enter"||lt.key===" ")&&(lt.preventDefault(),p.setActive(d))},onPointerDown:Ws(d,j),role:"button",tabIndex:0,children:o.jsxs("span",{className:"min-w-0 flex-1",children:[o.jsxs("span",{className:`flex items-center gap-2 ${Vt||Mt?"":q?"group-hover:pr-[72px] group-has-[button:focus-visible]:pr-[72px]":"group-hover:pr-[98px] group-has-[button:focus-visible]:pr-[98px]"}`,children:[Dt>0&&o.jsx(Ot,{label:un?`Show ${Dt} variant${Dt===1?"":"s"}`:"Fold the variants away",children:o.jsxs("button",{"aria-expanded":!un,"aria-label":`${un?"Show":"Hide"} the variants of ${p.displayName(d)}`,className:"-ml-1 flex shrink-0 items-center gap-1 rounded px-0.5 py-1 text-[#84848C] transition-colors hover:text-[#E8EAED]",onClick:lt=>{lt.stopPropagation(),p.toggleFamily(d)},onPointerDown:lt=>lt.stopPropagation(),type:"button",children:[o.jsx("svg",{className:`size-2.5 transition-transform duration-150 motion-reduce:transition-none ${un?"-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"})}),un?o.jsx("span",{className:"text-[10px] leading-none tabular-nums",children:Dt}):null]})}),Mt?o.jsx(Og,{error:p.renameError,initial:p.displayName(d),label:`Rename the ${p.displayName(d)} direction`,onCancel:()=>p.startRename(null),onCommit:(lt,nc)=>p.rename(d,lt,nc)}):o.jsx("span",{className:`min-w-0 flex-1 text-sm font-medium leading-5 transition-colors duration-150 ${q?"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 ${Dt>0?"":"-ml-3 pl-3"}`,onDoubleClick:lt=>{lt.stopPropagation(),window.getSelection()?.removeAllRanges(),p.startRename(d)},children:p.displayName(d)})}),Xt&&d===ut?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] ${zn}`,children:"Comparing"}):$?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 ${zn}`,children:[o.jsx(gr,{"aria-label":"Working on direction",size:20,state:pr,theme:"dark"}),"Cooking"]}):kn[d]?o.jsx(Ot,{label:`Rendered structure, layout, visual styles, media and vector geometry match ${kn[d]?.join(", ")} in a 1280 × 800 comparison.`,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 ${zn}`,children:["Same as ",kn[d]?.length===1?kn[d]?.[0]:`${kn[d]?.length} others`]})}):$s===d?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 ${zn}`,children:[o.jsx(gr,{"aria-label":"Checking for duplicates",size:20,state:pr,theme:"dark"}),"Cooking"]}):ee?.tags[0]&&o.jsx("span",{className:`shrink-0 rounded px-1.5 py-0.5 text-[10px] font-medium leading-normal ${zn}`,style:Fp(ee.tags[0]),children:ee.tags[0]})]}),o.jsx("span",{className:`mt-0.5 line-clamp-2 block cursor-text text-xs leading-snug transition-colors ${Mt&&p.renameError?"text-amber-300/90":q?"text-[#D1D5DB]":"text-[#84848C]"}`,id:Mt&&p.renameError?"leglas-rename-error":void 0,children:Mt&&p.renameError?p.renameError:ee?.note??(ee?.branch===void 0?ee?.url:ee.branch)})]})})}),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 ${Mt?"invisible":""} ${Vt?"":"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:[d!==p.active&&o.jsx(Ot,{label:Xt&&d===ut?"Stop comparing":`Compare with ${p.displayName(p.active)}`,children:o.jsx("button",{"aria-label":Xt&&d===ut?`Stop comparing ${p.displayName(d)}`:`Compare ${p.displayName(d)} with ${p.displayName(p.active)}`,"aria-pressed":Xt&&d===ut,className:`${Su} ${Xt&&d===ut?"text-white":""}`,onClick:lt=>{if(lt.stopPropagation(),Xt&&d===ut){je(!1);return}Ke(d),je(!0)},type:"button",children:o.jsx(Mn,{d:wn.split})})}),o.jsx(Ot,{label:p.copied?.kind==="link"&&p.copied.title===d?"Copied":"Copy preview link",children:o.jsx("button",{"aria-label":`Copy the preview link to the ${p.displayName(d)} direction`,className:Su,onClick:()=>p.copyLink(d),type:"button",children:p.copied?.kind==="link"&&p.copied.title===d?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(Mn,{d:wn.link})})}),o.jsx(Ot,{label:p.copied?.kind==="reference"&&p.copied.title===d?"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 ${p.displayName(d)} direction`,className:Su,onClick:()=>p.copyReference(d),type:"button",children:p.copied?.kind==="reference"&&p.copied.title===d?o.jsx("span",{className:"text-[10px] text-emerald-300",children:"✓"}):o.jsx(Mn,{d:wn.copy,size:12})})}),o.jsx(Ot,{label:"Rename",children:o.jsx("button",{"aria-label":`Rename the ${p.displayName(d)} direction`,className:Su,onClick:()=>p.startRename(d),type:"button",children:o.jsx(Mn,{d:wn.pencil,size:12})})}),o.jsx(Ot,{label:"Remove from list",children:o.jsx("button",{"aria-label":`Remove the ${p.displayName(d)} direction from the list`,className:Su,onClick:()=>p.hide(d),type:"button",children:o.jsx(Mn,{d:wn.trash,size:12})})})]})]},d)};return o.jsxs("main",{className:`flex h-dvh bg-[#1C1C20] text-white antialiased selection:bg-[#E6E8EC] selection:text-[#17181B] ${p.resizing?"cursor-col-resize":""} ${Qn?"select-none":""}`,"data-leglas-shell":"",style:{fontFamily:ea.stack},children:[o.jsxs("aside",{className:`relative shrink-0 overflow-hidden border-r border-[#232328] ${p.prefs.collapsed?"":"shadow-2xl"} ${p.resizing?"":`transition-[width] duration-200 ${Ta} motion-reduce:transition-none`}`,style:{width:p.prefs.collapsed?48:p.prefs.width},children:[o.jsxs("div",{className:`flex h-full flex-col transition-opacity duration-150 ${p.prefs.collapsed?"pointer-events-none opacity-0":"opacity-100"}`,inert:p.prefs.collapsed,style:{width:p.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(Eu,{size:28}),o.jsx(Z1,{height:18})]}),o.jsx(Ot,{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:()=>p.setPrefs(d=>({...d,collapsed:!0})),type:"button",children:o.jsx(Mn,{d:wn.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(Mn,{d:wn.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 ${p.query||me?"opacity-0":"opacity-100"}`,children:ey}),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:()=>ge(!1),onFocus:()=>ge(!0),onChange:d=>p.setQuery(d.target.value),onKeyDown:d=>{d.key==="Escape"&&(p.query?p.setQuery(""):d.currentTarget.blur())},placeholder:"Search directions…",ref:h,type:"text",value:p.query})]})}),r.length>0&&o.jsxs("section",{"aria-label":"Preview warning",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:"Preview may be from another project"}),r.map(d=>o.jsx("p",{className:"mt-0.5 text-[11px] leading-snug text-[#9CA3AF]",children:d},d))]}),ju&&!Ut.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:()=>Pl(d=>({...d,on:!1})),ref:Il,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 ${Ta} motion-reduce:transition-none`,style:{height:pl.height,opacity:pl.on&&!Vt?1:0,transform:`translateY(${pl.top}px)`}}),p.rows.map((d,j)=>tc(d,j))]}),p.rows.length===0&&o.jsx("div",{className:"px-3 py-2",children:p.query.trim()?o.jsxs(o.Fragment,{children:[o.jsxs("p",{className:"text-xs text-[#9CA3AF]",children:["Nothing matches “",p.query,"”."]}),o.jsx("button",{className:"mt-1 rounded text-xs text-[#84848C] underline underline-offset-2 transition-colors hover:text-[#D1D5DB]",onClick:()=>p.setQuery(""),type:"button",children:"Clear search"})]}):o.jsx("p",{className:"text-xs leading-snug text-[#9CA3AF]",children:p.visibleCount===0&&p.hiddenCount>0?"Every direction is removed. Restore one below.":"No directions yet. Add them to leglas.config.ts."})}),p.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:()=>p.setShowHidden(d=>!d),type:"button",children:[p.showHidden?"Hide":"Show"," removed (",p.hiddenCount,")"]}),p.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:()=>_({error:null,titles:[...p.prefs.hidden]}),type:"button",children:"Clear all"}):null]}),p.showHidden&&o.jsx("ul",{className:"relative",children:p.prefs.hidden.filter(p.matches).map(d=>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:p.displayName(d)}),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:()=>{p.restore(d),p.notify({kind:`remove:${d}`,message:`${p.displayName(d)} is back in the list`,tone:"success",ttl:bt.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:()=>_({error:null,titles:[d]}),type:"button",children:"Delete"})]})]})},d))})]}),o.jsxs("div",{ref:Wl,children:[we!==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:[we.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"})}):we.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"})]}):we.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:Au}),Ha!==null&&o.jsx("p",{className:"mt-0.5 text-[10px] leading-tight text-[#84848C]",children:Ha})]}),we.kind==="running"&&qa!==null&&o.jsx("span",{className:"shrink-0 text-[10px] tabular-nums text-[#84848C]",children:_p(Vs-qa)}),we.kind==="running"&&o.jsx(Ot,{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:Tt!==null||we.stopping,onClick:()=>Ti(we.id),type:"button",children:Tt==="cancel"||we.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"})})}),(we.kind==="failed"||we.kind==="stopped")&&o.jsxs("span",{className:"flex shrink-0 items-center",children:[o.jsx(Ot,{label:we.kind==="stopped"?"Run it after all":"Try it again",children:o.jsx("button",{"aria-label":we.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:Tt!==null,onClick:()=>El(we.id),type:"button",children:Tt==="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(Ot,{label:"Let it go",children:o.jsx("button",{"aria-label":we.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:Tt!==null,onClick:()=>wl(we.id),type:"button",children:Tt==="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:d=>{d.preventDefault();const j=ke.trim(),q=p.active;if(!j&&Bt.length===0||!q||be)return;const $=p.displayName(q),ee=Sp(b);if(ee!==null){p.notify({kind:"request",message:ee==="uploading"?"Still uploading an image. Try again in a moment.":"One image did not upload. Retry it or remove it, then send.",tone:"info",ttl:bt.action});return}const re=xp(b);Me(!0),fetch("/leglas/api/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({title:q,intent:j,mode:Z,...Ci===null?{}:{width:Ci},...Xt&&ut!==null&&ut!==q?{compare:ut}:{},...re.length===0?{}:{references:re}})}).then(pe=>pe.json()).then(pe=>{if(pe.duplicate===!0){Me(!1),p.notify({kind:"request",message:`That exact change to ${$} is already queued.`,tone:"info",ttl:bt.action});return}if(!pe.ok&&typeof pe.error=="string"){Me(!1),p.notify({kind:"request",message:pe.error,tone:"danger",ttl:bt.action});return}if(!pe.ok||!pe.prompt)throw new Error("refused");D(""),Ve(),Me(!1),wt(),p.notify({kind:"request",message:`Asked for a change to ${$}.`,tone:"success",ttl:bt.plain}),wr(pe.prompt).then(Oe=>{p.notify({kind:"request",message:Oe==="copied"?`Asked for a change to ${$}. Prompt copied.`:`Asked for a change to ${$}. Your browser blocked the clipboard, so read it with npx leglas requests.`,tone:"success",ttl:bt.plain})})}).catch(()=>{Me(!1),p.notify({kind:"request",message:`That request never reached Leglas. ${$} is unchanged.`,tone:"danger",ttl:bt.action})})},children:o.jsxs("div",{className:`rounded-md border bg-[#2E2E2E]/40 transition-colors ${oe?"border-[#7C9CFF]/70 ring-1 ring-[#7C9CFF]/40":"border-[#232328] focus-within:border-[#D1D5DB]/40 focus-within:ring-1 focus-within:ring-[#D1D5DB]/40"}`,onDragEnter:d=>{qs(d.dataTransfer.types)&&(d.preventDefault(),k.current+=1,ve(!0))},onDragLeave:d=>{qs(d.dataTransfer.types)&&(k.current=Math.max(0,k.current-1),k.current===0&&ve(!1))},onDragOver:d=>{qs(d.dataTransfer.types)&&(d.preventDefault(),d.dataTransfer.dropEffect="copy")},onDrop:d=>{qs(d.dataTransfer.types)&&(d.preventDefault(),k.current=0,ve(!1),J(Array.from(d.dataTransfer.files)))},children:[o.jsx(Ep,{drafts:b,onRemove:ae,onRetry:Le}),o.jsx("textarea",{"aria-label":p.active?`Ask your agent to change the ${p.displayName(p.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:be||!p.active,onChange:d=>{ke===""&&d.target.value!==""&&ua(),D(d.target.value)},onFocus:ua,onKeyDown:d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),d.currentTarget.form?.requestSubmit())},onPaste:d=>{const j=Array.from(d.clipboardData.files);j.length!==0&&(d.preventDefault(),J(j))},placeholder:p.active===null?"No direction to change yet":oe?"Drop the image here":b.length>0&&Bt.length===0?`Say what to take from the ${b.length===1?"image":"images"}…`:Bt.length>0?`Send ${Bt.length===1?"the annotation":`${Bt.length} annotations`}, or add words…`:`Change ${p.displayName(p.active)}…`,ref:g,rows:1,value:ke}),o.jsxs("div",{className:"flex items-center justify-end gap-1.5 p-1",children:[o.jsx(Ot,{label:Z==="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":Z==="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:()=>le(Z==="variant"?"replace":"variant"),type:"button",children:[Z==="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"})}),Z==="variant"?"as a variant":"in place"]})}),o.jsx("input",{accept:P1.join(","),className:"sr-only",multiple:!0,onChange:d=>{J(Array.from(d.currentTarget.files??[])),d.currentTarget.value=""},ref:ne,tabIndex:-1,type:"file"}),o.jsx(Ot,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:"Attach a reference image"}),o.jsx("span",{className:"block text-[#9CA3AF]",children:"Paste or drop one, too"})]}),children:o.jsx("button",{"aria-label":b.length>0?`Attach another image, ${b.length} attached`:"Attach a reference image",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-[#D1D5DB] active:scale-[0.96] disabled:cursor-not-allowed disabled:opacity-40 motion-reduce:transition-none",disabled:!p.active||be||b.length>=Mr,onClick:()=>ne.current?.click(),type:"button",children:o.jsxs("svg",{"aria-hidden":!0,fill:"none",height:"11",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.7",viewBox:"0 0 16 16",width:"11",children:[o.jsx("rect",{height:"10.5",rx:"1.8",width:"12.5",x:"1.75",y:"2.75"}),o.jsx("circle",{cx:"5.6",cy:"6.3",r:"1.1"}),o.jsx("path",{d:"m14.25 10.4-3.1-3.1a1 1 0 0 0-1.4 0L4.5 12.5"})]})})}),o.jsx(Ot,{label:o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"block",children:Et?"Stop annotating":Bt.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:Et?"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":Et?"Stop annotating the design":`Annotate the design${Bt.length>0?`, ${Bt.length} annotation${Bt.length===1?"":"s"} so far`:""}`,"aria-pressed":Et,className:`flex h-6 shrink-0 items-center gap-1 rounded-md px-1.5 text-[10px] font-medium leading-none transition-colors ${Et?"bg-[#7C9CFF]/20 text-[#AFC2FF]":"text-[#84848C] hover:bg-white/[0.06] hover:text-[#D1D5DB]"}`,onClick:()=>Et?Ru():Ba(!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",Bt.length>0?o.jsx("span",{className:"rounded-full bg-white/15 px-1 text-[9px] leading-[1.5] text-white",children:Bt.length}):null]})}),rt.kind==="none"?o.jsxs("button",{className:"flex min-w-0 items-center gap-1.5 rounded px-1.5 py-1 text-[10px] leading-none text-[#84848C] transition-colors duration-150 hover:bg-white/[0.04] hover:text-[#D1D5DB]",onClick:()=>B(!0),ref:Fl,type:"button",children:[o.jsx(Mn,{d:wn.link,size:12}),o.jsx("span",{className:"truncate",children:"Connect agent via MCP…"})]}):o.jsxs("div",{className:"relative flex min-w-0 items-center",children:[o.jsxs("div",{"aria-hidden":!nt,"aria-label":"Who runs your changes",className:`absolute bottom-full right-0 z-10 mb-1.5 w-max min-w-48 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 ${nt?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!nt,ref:Jl,role:"dialog",tabIndex:-1,children:[ln.agents.filter(d=>d.available).map(d=>{const j=rt.kind==="chosen"&&d.id===rt.id;return o.jsxs("button",{className:ft,disabled:Xe!==null||ze,onClick:()=>j?mt(!1):Dn(d.id),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(xi,{id:d.id}),o.jsx("span",{className:"truncate",children:d.name})]}),Xe===d.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"}):d.auth==="signed-out"?o.jsx("span",{className:"text-[10px] text-amber-400/80",children:"signed out"}):j&&o.jsx("span",{"aria-label":"current choice",children:"✓"})]},d.id)}),rt.kind==="chosen"&&rt.id==="custom"?o.jsxs("button",{className:ft,onClick:()=>mt(!1),type:"button",children:[o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(xi,{id:"custom"}),o.jsx("span",{className:"truncate",children:rt.name})]}),o.jsx("span",{"aria-label":"current choice",children:"✓"})]}):null,Jt!==void 0&&Jt.efforts.length>0?o.jsx("div",{className:"mt-1 border-t border-[#232328] px-1 pb-0.5 pt-1.5",children:o.jsxs("label",{className:"flex min-h-7 items-center justify-between gap-3",children:[o.jsx("span",{className:"text-[10px] font-medium text-[#84848C]",children:"Effort"}),o.jsxs("select",{"aria-busy":ze,"aria-label":`${Jt.name} effort`,className:"min-h-7 rounded-md border border-[#303038] bg-[#17171B] px-2 text-[10px] text-[#D1D5DB] focus-visible:outline-2 focus-visible:outline-offset-2 disabled:opacity-60",disabled:ze||Xe!==null,onChange:d=>{const j=d.currentTarget.value;Ni(j===""?null:j)},value:ka??"",children:[o.jsx("option",{value:"",children:"Agent default"}),Jt.efforts.map(d=>o.jsx("option",{value:d,children:U1[d]},d))]})]})}):null,o.jsx("div",{className:"mt-1 border-t border-[#232328] pt-1",children:o.jsx("button",{className:`${ft} text-[#84848C]`,onClick:()=>{mt(!1),B(!0)},ref:Fl,type:"button",children:o.jsxs("span",{className:"flex min-w-0 items-center gap-2",children:[o.jsx(Mn,{d:wn.link,size:14}),o.jsx("span",{className:"truncate",children:"Connect agent via MCP…"})]})})})]}),o.jsxs("button",{"aria-expanded":nt,"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:()=>{nt||Sl(),mt(d=>!d)},ref:gt,type:"button",children:[rt.kind==="chosen"&&o.jsx(xi,{id:rt.id,size:12}),o.jsx("span",{className:"truncate",children:rt.kind==="chosen"?`${rt.name}${ka===null?"":` · ${U1[ka]}`}`:"Choose an agent"}),Zs&&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 ${nt?"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":p.active?`Send the change to ${p.displayName(p.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 ${(ke.trim()!==""||Bt.length>0)&&p.active&&!be?"bg-[#E8E8EA] text-[#1C1C20] hover:bg-white":"pointer-events-none text-[#84848C]/60"}`,disabled:ke.trim()===""&&Bt.length===0||!p.active||be,type:"submit",children:be?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"})})})]})]})}),be?o.jsx("div",{className:"px-3 pb-2",children:o.jsx("p",{"aria-live":"polite",className:"min-w-0 truncate text-[10px] leading-snug text-[#84848C]",children:"Capturing the design for your agent…"})}):Bn===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:Bn,children:Bn})}),p.prefs.showWidget?Nn.agent.attached&&we===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:()=>W(!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 ${p.prefs.collapsed?"opacity-100":"pointer-events-none opacity-0"}`,inert:!p.prefs.collapsed,children:[o.jsx(Eu,{size:24}),o.jsx(Ot,{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:()=>p.setPrefs(d=>({...d,collapsed:!1})),type:"button",children:o.jsx(Mn,{d:wn.sidebar,size:16})})})]}),!p.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:p.onHandlePointerDown,children:o.jsx("span",{className:`h-full transition-all duration-150 ${p.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:p.copied===null?"":p.copied.kind==="link"?"Link copied":"Reference copied"}),o.jsxs("div",{className:`relative min-w-0 flex-1 ${Xt?"flex":"overflow-auto"}`,ref:aa,children:[Zn.map(d=>o.jsxs("div",{className:vl.includes(d)?Xt?`relative min-w-0 flex-1 overflow-auto ${d===ut?"border-l border-[#232328]":""} ${We?"flex flex-col items-center justify-center gap-2.5":yl?"flex min-h-full justify-center p-6":""}`:yl?"flex min-h-full justify-center p-6":"absolute inset-0":"hidden",style:Xt?{order:vl.indexOf(d)}:void 0,children:[Xt&&o.jsx("div",{className:We?"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:[p.displayName(d),We&&o.jsxs("span",{className:"ml-1.5 font-normal text-[#8E8E96]",children:[Math.round($n),"px · ",Math.round(Un*100),"%"]})]})}),o.jsxs("div",{className:We?"relative shrink-0 overflow-hidden rounded-[10px] shadow-[0_0_0_1px_rgba(255,255,255,0.12)]":yl?`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 ${Ta} motion-reduce:transition-none`:"relative size-full",style:We?{height:Mi,width:bl}:yl?{width:p.prefs.viewport??void 0}:void 0,children:[o.jsxs("div",{className:We?"relative origin-top-left":"relative size-full",style:We?{height:ia,transform:`scale(${Un})`,width:$n}:void 0,children:[(()=>{const j=p.branchState(d);return j!==null&&j.status!=="ready"?o.jsx(kg,{branch:p.previewFor(d)?.branch??d,onStart:()=>p.startBranch(d),state:j}):o.jsx("iframe",{className:`size-full border-0 bg-white ${Qn?"pointer-events-none":""}`,onError:()=>O(q=>({...q,[d]:!0})),onLoad:q=>{const $=p.urlFor(d),ee=q.currentTarget.dataset.previewIdentity;ee!==void 0&&(!$.startsWith("/")||xr(q.currentTarget))&&Wn(d,ee,q.currentTarget)},"data-preview":d,"data-preview-identity":Vn(d),src:p.urlFor(d),title:`Preview: ${p.displayName(d)}`},Vn(d))})(),Et&&d===p.active?o.jsx(hp,{notes:Bt,onExit:Ru,onForget:ec,onKeep:(j,q)=>Is(d,j,q),onRevise:Ps,paneScale:Un,scaling:We,sent:Ks,title:d}):null]}),p.branchState(d)!==null&&p.branchState(d)?.status!=="ready"?null:jn[d]?o.jsx(V1,{onReload:()=>Fs(d),reason:Ut.reachable||!Fn.has(d)?`${p.urlFor(d)} didn’t respond.`:"Your dev server stopped. This returns on its own once it is back."}):o.jsx(Bg,{loaded:na(d)}),!Ut.reachable&&na(d)&&Fn.has(d)&&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"})})]})]},d)),o.jsxs("div",{className:`absolute z-50 flex gap-2 ${Ee?"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"}[p.prefs.corner]}`,style:Mu,children:[o.jsxs("div",{"aria-hidden":!Q,"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 ${Ee?"hidden ":""}${Q?"translate-y-0 scale-100 opacity-100":"pointer-events-none translate-y-1 scale-95 opacity-0"}`,inert:!Q,ref:Xn,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:fr.map(d=>o.jsx("button",{"aria-pressed":ea.key===d.key,className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${ea.key===d.key?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>p.setPrefs(j=>({...j,font:d.key})),style:{fontFamily:d.stack},type:"button",children:d.label},d.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:p.viewports.map(({label:d,width:j})=>o.jsx("button",{className:`flex-1 rounded px-2 py-1 text-xs transition-colors ${p.prefs.viewport===j?"bg-[#2E2E2E] font-medium text-white":"text-[#9CA3AF] hover:text-[#D1D5DB]"}`,onClick:()=>p.setPrefs(q=>({...q,viewport:j})),type:"button",children:d},d))}),Xt&&o.jsxs("button",{"aria-checked":p.prefs.scaleSplit,className:`${ft} mt-1 ${p.prefs.scaleSplit?"text-white":"text-[#9CA3AF]"}`,onClick:()=>p.setPrefs(d=>({...d,scaleSplit:!d.scaleSplit})),role:"switch",type:"button",children:[o.jsx("span",{children:"Scale each side to fit"}),o.jsx(cr,{on:p.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":p.prefs.showDevOverlays,className:`${ft} ${p.prefs.showDevOverlays?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const d=!p.prefs.showDevOverlays;p.setPrefs(j=>({...j,showDevOverlays:d}));for(const j of document.querySelectorAll("iframe"))Ft(j,!d)},role:"switch",type:"button",children:[o.jsx("span",{children:"Show dev tool overlay"}),o.jsx(cr,{on:p.prefs.showDevOverlays})]}),o.jsxs("button",{"aria-checked":p.prefs.showWidget,className:`${ft} ${p.prefs.showWidget?"text-white":"text-[#9CA3AF]"}`,onClick:()=>{const d=!p.prefs.showWidget;p.setPrefs(j=>({...j,showWidget:d})),d||p.notify({kind:"widget",message:"Press T to reopen the tools",tone:"info",ttl:bt.plain+3e3})},role:"switch",type:"button",children:[o.jsx("span",{children:"Show Leglas overlay"}),o.jsx(cr,{on:p.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:()=>p.copyReference(p.active),type:"button",children:[o.jsx(Mn,{d:wn.copy,size:12}),p.copied?.kind==="reference"&&p.copied.title===p.active?"Copied":"Copy reference"]}),o.jsx(Ot,{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:p.urlFor(p.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:()=>{W(!1),E(!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:"?"})]})]}),(p.prefs.showWidget||Q)&&o.jsx(Ot,{label:"Leglas tools",children:o.jsxs("button",{"aria-expanded":Q,"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(Ae.current){Ae.current=!1;return}W(d=>!d)},onPointerDown:Jn,ref:Ln,type:"button",children:[o.jsx(Eu,{size:30}),!na(p.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(Ug,{bottom:p.prefs.collapsed?12:Ra+8,left:p.prefs.collapsed?60:12,onDismiss:p.dismissToast,toasts:p.toasts,width:(p.prefs.collapsed?320:p.prefs.width)-24}),mn!==null&&o.jsx("iframe",{"aria-hidden":!0,className:"pointer-events-none fixed border-0",onLoad:d=>Js(mn,d.currentTarget),ref:ha,src:mn.url,style:{height:_1.height,left:-2400,top:0,width:_1.width},tabIndex:-1,title:"Off-stage duplicate scan"},Qa??void 0),C?o.jsx(ty,{mac:th,onClose:V}):null,L?o.jsx(Kp,{connected:Nn.agent.attached,fallbackFocusRef:rt.kind==="none"?Fl:gt,onClose:()=>B(!1)}):null,x!==null?o.jsx(ny,{busy:Y,count:x.titles.length,error:x.error,fallbackFocusRef:h,name:x.titles.length===1?p.displayName(x.titles[0]??""):null,onCancel:I,onConfirm:()=>{fe()}}):null]})}function hr({children:u,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(Eu,{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:u})]})}function ay(){const[u,s]=M.useState({status:"loading"});return M.useEffect(()=>{let f=!1;const r=g=>fetch("/leglas/api/config",{signal:g}).then(v=>{if(!v.ok)throw new Error(`the server answered ${v.status}`);return v.json()}),h=br(g=>r(g).then(v=>{f||s(C=>C.status==="ready"&&JSON.stringify(C.config)===JSON.stringify(v)?C:{status:"ready",config:v})}).catch(v=>{f||s(C=>C.status==="ready"?C:{status:"failed",message:Vg(v)?"it did not answer in time":v instanceof Error?v.message:String(v)})}),{everyMs:yr,subscribe:g=>vr().on("config",g)});return()=>{f=!0,h()}},[]),u.status==="loading"?o.jsx(hr,{title:"Starting Leglas…",children:null}):u.status==="failed"?o.jsxs(hr,{title:"Couldn’t reach the Leglas server",children:[u.message,". The interface is served by the same process that proxies your app, so this usually means it stopped."]}):u.config.errors.length>0?o.jsxs(hr,{title:"Your config needs fixing",children:[o.jsx("ul",{className:"space-y-1 text-left",children:u.config.errors.map(f=>o.jsx("li",{children:f},f))}),o.jsx("p",{className:"mt-3",children:"Fix it and restart Leglas."})]}):o.jsx(ly,{previews:u.config.previews,project:u.config.project,scanPreviews:u.config.scanPreviews??!0,warnings:u.config.warnings??[]})}const nh=document.getElementById("root");if(!nh)throw new Error("Leglas: #root is missing from the document.");Gm.createRoot(nh).render(o.jsx(M.StrictMode,{children:o.jsx(ay,{})}));
|