academic-refchecker 1.2.66__py3-none-any.whl → 1.2.68__py3-none-any.whl
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.
- {academic_refchecker-1.2.66.dist-info → academic_refchecker-1.2.68.dist-info}/METADATA +3 -1
- {academic_refchecker-1.2.66.dist-info → academic_refchecker-1.2.68.dist-info}/RECORD +15 -10
- backend/cli.py +11 -3
- backend/database.py +27 -2
- backend/main.py +105 -4
- backend/static/assets/index-2P6L_39v.css +1 -0
- backend/static/assets/index-hk21nqxR.js +25 -0
- backend/static/favicon.svg +6 -0
- backend/static/index.html +15 -0
- backend/static/vite.svg +1 -0
- refchecker/__version__.py +2 -2
- {academic_refchecker-1.2.66.dist-info → academic_refchecker-1.2.68.dist-info}/WHEEL +0 -0
- {academic_refchecker-1.2.66.dist-info → academic_refchecker-1.2.68.dist-info}/entry_points.txt +0 -0
- {academic_refchecker-1.2.66.dist-info → academic_refchecker-1.2.68.dist-info}/licenses/LICENSE +0 -0
- {academic_refchecker-1.2.66.dist-info → academic_refchecker-1.2.68.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))o(u);new MutationObserver(u=>{for(const h of u)if(h.type==="childList")for(const m of h.addedNodes)m.tagName==="LINK"&&m.rel==="modulepreload"&&o(m)}).observe(document,{childList:!0,subtree:!0});function i(u){const h={};return u.integrity&&(h.integrity=u.integrity),u.referrerPolicy&&(h.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?h.credentials="include":u.crossOrigin==="anonymous"?h.credentials="omit":h.credentials="same-origin",h}function o(u){if(u.ep)return;u.ep=!0;const h=i(u);fetch(u.href,h)}})();function ag(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var tc={exports:{}},Ka={};var Eh;function rg(){if(Eh)return Ka;Eh=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function i(o,u,h){var m=null;if(h!==void 0&&(m=""+h),u.key!==void 0&&(m=""+u.key),"key"in u){h={};for(var y in u)y!=="key"&&(h[y]=u[y])}else h=u;return u=h.ref,{$$typeof:r,type:o,key:m,ref:u!==void 0?u:null,props:h}}return Ka.Fragment=c,Ka.jsx=i,Ka.jsxs=i,Ka}var wh;function sg(){return wh||(wh=1,tc.exports=rg()),tc.exports}var f=sg(),lc={exports:{}},ue={};var Nh;function ig(){if(Nh)return ue;Nh=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),m=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),g=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),A=Symbol.iterator;function $(_){return _===null||typeof _!="object"?null:(_=A&&_[A]||_["@@iterator"],typeof _=="function"?_:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z=Object.assign,R={};function T(_,B,I){this.props=_,this.context=B,this.refs=R,this.updater=I||C}T.prototype.isReactComponent={},T.prototype.setState=function(_,B){if(typeof _!="object"&&typeof _!="function"&&_!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,_,B,"setState")},T.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function V(){}V.prototype=T.prototype;function G(_,B,I){this.props=_,this.context=B,this.refs=R,this.updater=I||C}var F=G.prototype=new V;F.constructor=G,z(F,T.prototype),F.isPureReactComponent=!0;var Q=Array.isArray;function H(){}var q={H:null,A:null,T:null,S:null},J=Object.prototype.hasOwnProperty;function te(_,B,I){var ee=I.ref;return{$$typeof:r,type:_,key:B,ref:ee!==void 0?ee:null,props:I}}function re(_,B){return te(_.type,B,_.props)}function ie(_){return typeof _=="object"&&_!==null&&_.$$typeof===r}function ce(_){var B={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(I){return B[I]})}var Ne=/\/+/g;function Se(_,B){return typeof _=="object"&&_!==null&&_.key!=null?ce(""+_.key):B.toString(36)}function Ce(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(H,H):(_.status="pending",_.then(function(B){_.status==="pending"&&(_.status="fulfilled",_.value=B)},function(B){_.status==="pending"&&(_.status="rejected",_.reason=B)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function E(_,B,I,ee,oe){var he=typeof _;(he==="undefined"||he==="boolean")&&(_=null);var je=!1;if(_===null)je=!0;else switch(he){case"bigint":case"string":case"number":je=!0;break;case"object":switch(_.$$typeof){case r:case c:je=!0;break;case b:return je=_._init,E(je(_._payload),B,I,ee,oe)}}if(je)return oe=oe(_),je=ee===""?"."+Se(_,0):ee,Q(oe)?(I="",je!=null&&(I=je.replace(Ne,"$&/")+"/"),E(oe,B,I,"",function(Wt){return Wt})):oe!=null&&(ie(oe)&&(oe=re(oe,I+(oe.key==null||_&&_.key===oe.key?"":(""+oe.key).replace(Ne,"$&/")+"/")+je)),B.push(oe)),1;je=0;var We=ee===""?".":ee+":";if(Q(_))for(var Le=0;Le<_.length;Le++)ee=_[Le],he=We+Se(ee,Le),je+=E(ee,B,I,he,oe);else if(Le=$(_),typeof Le=="function")for(_=Le.call(_),Le=0;!(ee=_.next()).done;)ee=ee.value,he=We+Se(ee,Le++),je+=E(ee,B,I,he,oe);else if(he==="object"){if(typeof _.then=="function")return E(Ce(_),B,I,ee,oe);throw B=String(_),Error("Objects are not valid as a React child (found: "+(B==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":B)+"). If you meant to render a collection of children, use an array instead.")}return je}function Z(_,B,I){if(_==null)return _;var ee=[],oe=0;return E(_,ee,"","",function(he){return B.call(I,he,oe++)}),ee}function P(_){if(_._status===-1){var B=_._result;B=B(),B.then(function(I){(_._status===0||_._status===-1)&&(_._status=1,_._result=I)},function(I){(_._status===0||_._status===-1)&&(_._status=2,_._result=I)}),_._status===-1&&(_._status=0,_._result=B)}if(_._status===1)return _._result.default;throw _._result}var K=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var B=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(B))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},ge={map:Z,forEach:function(_,B,I){Z(_,function(){B.apply(this,arguments)},I)},count:function(_){var B=0;return Z(_,function(){B++}),B},toArray:function(_){return Z(_,function(B){return B})||[]},only:function(_){if(!ie(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return ue.Activity=v,ue.Children=ge,ue.Component=T,ue.Fragment=i,ue.Profiler=u,ue.PureComponent=G,ue.StrictMode=o,ue.Suspense=x,ue.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,ue.__COMPILER_RUNTIME={__proto__:null,c:function(_){return q.H.useMemoCache(_)}},ue.cache=function(_){return function(){return _.apply(null,arguments)}},ue.cacheSignal=function(){return null},ue.cloneElement=function(_,B,I){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ee=z({},_.props),oe=_.key;if(B!=null)for(he in B.key!==void 0&&(oe=""+B.key),B)!J.call(B,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&B.ref===void 0||(ee[he]=B[he]);var he=arguments.length-2;if(he===1)ee.children=I;else if(1<he){for(var je=Array(he),We=0;We<he;We++)je[We]=arguments[We+2];ee.children=je}return te(_.type,oe,ee)},ue.createContext=function(_){return _={$$typeof:m,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:h,_context:_},_},ue.createElement=function(_,B,I){var ee,oe={},he=null;if(B!=null)for(ee in B.key!==void 0&&(he=""+B.key),B)J.call(B,ee)&&ee!=="key"&&ee!=="__self"&&ee!=="__source"&&(oe[ee]=B[ee]);var je=arguments.length-2;if(je===1)oe.children=I;else if(1<je){for(var We=Array(je),Le=0;Le<je;Le++)We[Le]=arguments[Le+2];oe.children=We}if(_&&_.defaultProps)for(ee in je=_.defaultProps,je)oe[ee]===void 0&&(oe[ee]=je[ee]);return te(_,he,oe)},ue.createRef=function(){return{current:null}},ue.forwardRef=function(_){return{$$typeof:y,render:_}},ue.isValidElement=ie,ue.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:P}},ue.memo=function(_,B){return{$$typeof:g,type:_,compare:B===void 0?null:B}},ue.startTransition=function(_){var B=q.T,I={};q.T=I;try{var ee=_(),oe=q.S;oe!==null&&oe(I,ee),typeof ee=="object"&&ee!==null&&typeof ee.then=="function"&&ee.then(H,K)}catch(he){K(he)}finally{B!==null&&I.types!==null&&(B.types=I.types),q.T=B}},ue.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},ue.use=function(_){return q.H.use(_)},ue.useActionState=function(_,B,I){return q.H.useActionState(_,B,I)},ue.useCallback=function(_,B){return q.H.useCallback(_,B)},ue.useContext=function(_){return q.H.useContext(_)},ue.useDebugValue=function(){},ue.useDeferredValue=function(_,B){return q.H.useDeferredValue(_,B)},ue.useEffect=function(_,B){return q.H.useEffect(_,B)},ue.useEffectEvent=function(_){return q.H.useEffectEvent(_)},ue.useId=function(){return q.H.useId()},ue.useImperativeHandle=function(_,B,I){return q.H.useImperativeHandle(_,B,I)},ue.useInsertionEffect=function(_,B){return q.H.useInsertionEffect(_,B)},ue.useLayoutEffect=function(_,B){return q.H.useLayoutEffect(_,B)},ue.useMemo=function(_,B){return q.H.useMemo(_,B)},ue.useOptimistic=function(_,B){return q.H.useOptimistic(_,B)},ue.useReducer=function(_,B,I){return q.H.useReducer(_,B,I)},ue.useRef=function(_){return q.H.useRef(_)},ue.useState=function(_){return q.H.useState(_)},ue.useSyncExternalStore=function(_,B,I){return q.H.useSyncExternalStore(_,B,I)},ue.useTransition=function(){return q.H.useTransition()},ue.version="19.2.3",ue}var kh;function xc(){return kh||(kh=1,lc.exports=ig()),lc.exports}var W=xc();const _s=ag(W);var nc={exports:{}},Ja={},ac={exports:{}},rc={};var Th;function og(){return Th||(Th=1,(function(r){function c(E,Z){var P=E.length;E.push(Z);e:for(;0<P;){var K=P-1>>>1,ge=E[K];if(0<u(ge,Z))E[K]=Z,E[P]=ge,P=K;else break e}}function i(E){return E.length===0?null:E[0]}function o(E){if(E.length===0)return null;var Z=E[0],P=E.pop();if(P!==Z){E[0]=P;e:for(var K=0,ge=E.length,_=ge>>>1;K<_;){var B=2*(K+1)-1,I=E[B],ee=B+1,oe=E[ee];if(0>u(I,P))ee<ge&&0>u(oe,I)?(E[K]=oe,E[ee]=P,K=ee):(E[K]=I,E[B]=P,K=B);else if(ee<ge&&0>u(oe,P))E[K]=oe,E[ee]=P,K=ee;else break e}}return Z}function u(E,Z){var P=E.sortIndex-Z.sortIndex;return P!==0?P:E.id-Z.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var h=performance;r.unstable_now=function(){return h.now()}}else{var m=Date,y=m.now();r.unstable_now=function(){return m.now()-y}}var x=[],g=[],b=1,v=null,A=3,$=!1,C=!1,z=!1,R=!1,T=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,G=typeof setImmediate<"u"?setImmediate:null;function F(E){for(var Z=i(g);Z!==null;){if(Z.callback===null)o(g);else if(Z.startTime<=E)o(g),Z.sortIndex=Z.expirationTime,c(x,Z);else break;Z=i(g)}}function Q(E){if(z=!1,F(E),!C)if(i(x)!==null)C=!0,H||(H=!0,ce());else{var Z=i(g);Z!==null&&Ce(Q,Z.startTime-E)}}var H=!1,q=-1,J=5,te=-1;function re(){return R?!0:!(r.unstable_now()-te<J)}function ie(){if(R=!1,H){var E=r.unstable_now();te=E;var Z=!0;try{e:{C=!1,z&&(z=!1,V(q),q=-1),$=!0;var P=A;try{t:{for(F(E),v=i(x);v!==null&&!(v.expirationTime>E&&re());){var K=v.callback;if(typeof K=="function"){v.callback=null,A=v.priorityLevel;var ge=K(v.expirationTime<=E);if(E=r.unstable_now(),typeof ge=="function"){v.callback=ge,F(E),Z=!0;break t}v===i(x)&&o(x),F(E)}else o(x);v=i(x)}if(v!==null)Z=!0;else{var _=i(g);_!==null&&Ce(Q,_.startTime-E),Z=!1}}break e}finally{v=null,A=P,$=!1}Z=void 0}}finally{Z?ce():H=!1}}}var ce;if(typeof G=="function")ce=function(){G(ie)};else if(typeof MessageChannel<"u"){var Ne=new MessageChannel,Se=Ne.port2;Ne.port1.onmessage=ie,ce=function(){Se.postMessage(null)}}else ce=function(){T(ie,0)};function Ce(E,Z){q=T(function(){E(r.unstable_now())},Z)}r.unstable_IdlePriority=5,r.unstable_ImmediatePriority=1,r.unstable_LowPriority=4,r.unstable_NormalPriority=3,r.unstable_Profiling=null,r.unstable_UserBlockingPriority=2,r.unstable_cancelCallback=function(E){E.callback=null},r.unstable_forceFrameRate=function(E){0>E||125<E?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):J=0<E?Math.floor(1e3/E):5},r.unstable_getCurrentPriorityLevel=function(){return A},r.unstable_next=function(E){switch(A){case 1:case 2:case 3:var Z=3;break;default:Z=A}var P=A;A=Z;try{return E()}finally{A=P}},r.unstable_requestPaint=function(){R=!0},r.unstable_runWithPriority=function(E,Z){switch(E){case 1:case 2:case 3:case 4:case 5:break;default:E=3}var P=A;A=E;try{return Z()}finally{A=P}},r.unstable_scheduleCallback=function(E,Z,P){var K=r.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?K+P:K):P=K,E){case 1:var ge=-1;break;case 2:ge=250;break;case 5:ge=1073741823;break;case 4:ge=1e4;break;default:ge=5e3}return ge=P+ge,E={id:b++,callback:Z,priorityLevel:E,startTime:P,expirationTime:ge,sortIndex:-1},P>K?(E.sortIndex=P,c(g,E),i(x)===null&&E===i(g)&&(z?(V(q),q=-1):z=!0,Ce(Q,P-K))):(E.sortIndex=ge,c(x,E),C||$||(C=!0,H||(H=!0,ce()))),E},r.unstable_shouldYield=re,r.unstable_wrapCallback=function(E){var Z=A;return function(){var P=A;A=Z;try{return E.apply(this,arguments)}finally{A=P}}}})(rc)),rc}var Ah;function cg(){return Ah||(Ah=1,ac.exports=og()),ac.exports}var sc={exports:{}},it={};var Mh;function ug(){if(Mh)return it;Mh=1;var r=xc();function c(x){var g="https://react.dev/errors/"+x;if(1<arguments.length){g+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)g+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+x+"; visit "+g+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(){}var o={d:{f:i,r:function(){throw Error(c(522))},D:i,C:i,L:i,m:i,X:i,S:i,M:i},p:0,findDOMNode:null},u=Symbol.for("react.portal");function h(x,g,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:u,key:v==null?null:""+v,children:x,containerInfo:g,implementation:b}}var m=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,g){if(x==="font")return"";if(typeof g=="string")return g==="use-credentials"?g:""}return it.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=o,it.createPortal=function(x,g){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!g||g.nodeType!==1&&g.nodeType!==9&&g.nodeType!==11)throw Error(c(299));return h(x,g,null,b)},it.flushSync=function(x){var g=m.T,b=o.p;try{if(m.T=null,o.p=2,x)return x()}finally{m.T=g,o.p=b,o.d.f()}},it.preconnect=function(x,g){typeof x=="string"&&(g?(g=g.crossOrigin,g=typeof g=="string"?g==="use-credentials"?g:"":void 0):g=null,o.d.C(x,g))},it.prefetchDNS=function(x){typeof x=="string"&&o.d.D(x)},it.preinit=function(x,g){if(typeof x=="string"&&g&&typeof g.as=="string"){var b=g.as,v=y(b,g.crossOrigin),A=typeof g.integrity=="string"?g.integrity:void 0,$=typeof g.fetchPriority=="string"?g.fetchPriority:void 0;b==="style"?o.d.S(x,typeof g.precedence=="string"?g.precedence:void 0,{crossOrigin:v,integrity:A,fetchPriority:$}):b==="script"&&o.d.X(x,{crossOrigin:v,integrity:A,fetchPriority:$,nonce:typeof g.nonce=="string"?g.nonce:void 0})}},it.preinitModule=function(x,g){if(typeof x=="string")if(typeof g=="object"&&g!==null){if(g.as==null||g.as==="script"){var b=y(g.as,g.crossOrigin);o.d.M(x,{crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0})}}else g==null&&o.d.M(x)},it.preload=function(x,g){if(typeof x=="string"&&typeof g=="object"&&g!==null&&typeof g.as=="string"){var b=g.as,v=y(b,g.crossOrigin);o.d.L(x,b,{crossOrigin:v,integrity:typeof g.integrity=="string"?g.integrity:void 0,nonce:typeof g.nonce=="string"?g.nonce:void 0,type:typeof g.type=="string"?g.type:void 0,fetchPriority:typeof g.fetchPriority=="string"?g.fetchPriority:void 0,referrerPolicy:typeof g.referrerPolicy=="string"?g.referrerPolicy:void 0,imageSrcSet:typeof g.imageSrcSet=="string"?g.imageSrcSet:void 0,imageSizes:typeof g.imageSizes=="string"?g.imageSizes:void 0,media:typeof g.media=="string"?g.media:void 0})}},it.preloadModule=function(x,g){if(typeof x=="string")if(g){var b=y(g.as,g.crossOrigin);o.d.m(x,{as:typeof g.as=="string"&&g.as!=="script"?g.as:void 0,crossOrigin:b,integrity:typeof g.integrity=="string"?g.integrity:void 0})}else o.d.m(x)},it.requestFormReset=function(x){o.d.r(x)},it.unstable_batchedUpdates=function(x,g){return x(g)},it.useFormState=function(x,g,b){return m.H.useFormState(x,g,b)},it.useFormStatus=function(){return m.H.useHostTransitionStatus()},it.version="19.2.3",it}var zh;function fg(){if(zh)return sc.exports;zh=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(c){console.error(c)}}return r(),sc.exports=ug(),sc.exports}var Rh;function dg(){if(Rh)return Ja;Rh=1;var r=cg(),c=xc(),i=fg();function o(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)t+="&args[]="+encodeURIComponent(arguments[l])}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 u(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function h(e){var t=e,l=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(l=t.return),e=t.return;while(e)}return t.tag===3?l:null}function m(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 y(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 x(e){if(h(e)!==e)throw Error(o(188))}function g(e){var t=e.alternate;if(!t){if(t=h(e),t===null)throw Error(o(188));return t!==e?null:e}for(var l=e,n=t;;){var a=l.return;if(a===null)break;var s=a.alternate;if(s===null){if(n=a.return,n!==null){l=n;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===l)return x(a),e;if(s===n)return x(a),t;s=s.sibling}throw Error(o(188))}if(l.return!==n.return)l=a,n=s;else{for(var d=!1,p=a.child;p;){if(p===l){d=!0,l=a,n=s;break}if(p===n){d=!0,n=a,l=s;break}p=p.sibling}if(!d){for(p=s.child;p;){if(p===l){d=!0,l=s,n=a;break}if(p===n){d=!0,n=s,l=a;break}p=p.sibling}if(!d)throw Error(o(189))}}if(l.alternate!==n)throw Error(o(190))}if(l.tag!==3)throw Error(o(188));return l.stateNode.current===l?e:t}function b(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=b(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,A=Symbol.for("react.element"),$=Symbol.for("react.transitional.element"),C=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),G=Symbol.for("react.context"),F=Symbol.for("react.forward_ref"),Q=Symbol.for("react.suspense"),H=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),re=Symbol.for("react.memo_cache_sentinel"),ie=Symbol.iterator;function ce(e){return e===null||typeof e!="object"?null:(e=ie&&e[ie]||e["@@iterator"],typeof e=="function"?e:null)}var Ne=Symbol.for("react.client.reference");function Se(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Ne?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case z:return"Fragment";case T:return"Profiler";case R:return"StrictMode";case Q:return"Suspense";case H:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case C:return"Portal";case G:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case F:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case q:return t=e.displayName||null,t!==null?t:Se(e.type)||"Memo";case J:t=e._payload,e=e._init;try{return Se(e(t))}catch{}}return null}var Ce=Array.isArray,E=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z=i.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,P={pending:!1,data:null,method:null,action:null},K=[],ge=-1;function _(e){return{current:e}}function B(e){0>ge||(e.current=K[ge],K[ge]=null,ge--)}function I(e,t){ge++,K[ge]=e.current,e.current=t}var ee=_(null),oe=_(null),he=_(null),je=_(null);function We(e,t){switch(I(he,t),I(oe,e),I(ee,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kd(t),e=Jd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}B(ee),I(ee,e)}function Le(){B(ee),B(oe),B(he)}function Wt(e){e.memoizedState!==null&&I(je,e);var t=ee.current,l=Jd(t,e.type);t!==l&&(I(oe,e),I(ee,l))}function hn(e){oe.current===e&&(B(ee),B(oe)),je.current===e&&(B(je),Ga._currentValue=P)}var ta,ar;function Ft(e){if(ta===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ta=t&&t[1]||"",ar=-1<l.stack.indexOf(`
|
|
2
|
+
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
+
`+ta+e+ar}var pe=!1;function It(e,t){if(!e||pe)return"";pe=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var n={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(L){var M=L}Reflect.construct(e,[],X)}else{try{X.call()}catch(L){M=L}e.call(X.prototype)}}else{try{throw Error()}catch(L){M=L}(X=e())&&typeof X.catch=="function"&&X.catch(function(){})}}catch(L){if(L&&M&&typeof L.stack=="string")return[L.stack,M.stack]}return[null,null]}};n.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(n.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(n.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=n.DetermineComponentFrameRoot(),d=s[0],p=s[1];if(d&&p){var S=d.split(`
|
|
4
|
+
`),k=p.split(`
|
|
5
|
+
`);for(a=n=0;n<S.length&&!S[n].includes("DetermineComponentFrameRoot");)n++;for(;a<k.length&&!k[a].includes("DetermineComponentFrameRoot");)a++;if(n===S.length||a===k.length)for(n=S.length-1,a=k.length-1;1<=n&&0<=a&&S[n]!==k[a];)a--;for(;1<=n&&0<=a;n--,a--)if(S[n]!==k[a]){if(n!==1||a!==1)do if(n--,a--,0>a||S[n]!==k[a]){var U=`
|
|
6
|
+
`+S[n].replace(" at new "," at ");return e.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",e.displayName)),U}while(1<=n&&0<=a);break}}}finally{pe=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Ft(l):""}function Gt(e,t){switch(e.tag){case 26:case 27:case 5:return Ft(e.type);case 16:return Ft("Lazy");case 13:return e.child!==t&&t!==null?Ft("Suspense Fallback"):Ft("Suspense");case 19:return Ft("SuspenseList");case 0:case 15:return It(e.type,!1);case 11:return It(e.type.render,!1);case 1:return It(e.type,!0);case 31:return Ft("Activity");default:return""}}function et(e){try{var t="",l=null;do t+=Gt(e,l),l=e,e=e.return;while(e);return t}catch(n){return`
|
|
7
|
+
Error generating stack: `+n.message+`
|
|
8
|
+
`+n.stack}}var xt=Object.prototype.hasOwnProperty,Vl=r.unstable_scheduleCallback,Ys=r.unstable_cancelCallback,Dm=r.unstable_shouldYield,Um=r.unstable_requestPaint,bt=r.unstable_now,Hm=r.unstable_getCurrentPriorityLevel,Ec=r.unstable_ImmediatePriority,wc=r.unstable_UserBlockingPriority,rr=r.unstable_NormalPriority,Bm=r.unstable_LowPriority,Nc=r.unstable_IdlePriority,qm=r.log,Ym=r.unstable_setDisableYieldValue,la=null,St=null;function vl(e){if(typeof qm=="function"&&Ym(e),St&&typeof St.setStrictMode=="function")try{St.setStrictMode(la,e)}catch{}}var _t=Math.clz32?Math.clz32:Gm,Xm=Math.log,Vm=Math.LN2;function Gm(e){return e>>>=0,e===0?32:31-(Xm(e)/Vm|0)|0}var sr=256,ir=262144,or=4194304;function Gl(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 cr(e,t,l){var n=e.pendingLanes;if(n===0)return 0;var a=0,s=e.suspendedLanes,d=e.pingedLanes;e=e.warmLanes;var p=n&134217727;return p!==0?(n=p&~s,n!==0?a=Gl(n):(d&=p,d!==0?a=Gl(d):l||(l=p&~e,l!==0&&(a=Gl(l))))):(p=n&~s,p!==0?a=Gl(p):d!==0?a=Gl(d):l||(l=n&~e,l!==0&&(a=Gl(l)))),a===0?0:t!==0&&t!==a&&(t&s)===0&&(s=a&-a,l=t&-t,s>=l||s===32&&(l&4194048)!==0)?t:a}function na(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Qm(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 kc(){var e=or;return or<<=1,(or&62914560)===0&&(or=4194304),e}function Xs(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function aa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Zm(e,t,l,n,a,s){var d=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var p=e.entanglements,S=e.expirationTimes,k=e.hiddenUpdates;for(l=d&~l;0<l;){var U=31-_t(l),X=1<<U;p[U]=0,S[U]=-1;var M=k[U];if(M!==null)for(k[U]=null,U=0;U<M.length;U++){var L=M[U];L!==null&&(L.lane&=-536870913)}l&=~X}n!==0&&Tc(e,n,0),s!==0&&a===0&&e.tag!==0&&(e.suspendedLanes|=s&~(d&~t))}function Tc(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var n=31-_t(t);e.entangledLanes|=t,e.entanglements[n]=e.entanglements[n]|1073741824|l&261930}function Ac(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var n=31-_t(l),a=1<<n;a&t|e[n]&t&&(e[n]|=t),l&=~a}}function Mc(e,t){var l=t&-t;return l=(l&42)!==0?1:Vs(l),(l&(e.suspendedLanes|t))!==0?0:l}function Vs(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 Gs(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function zc(){var e=Z.p;return e!==0?e:(e=window.event,e===void 0?32:vh(e.type))}function Rc(e,t){var l=Z.p;try{return Z.p=e,t()}finally{Z.p=l}}var xl=Math.random().toString(36).slice(2),tt="__reactFiber$"+xl,ut="__reactProps$"+xl,mn="__reactContainer$"+xl,Qs="__reactEvents$"+xl,$m="__reactListeners$"+xl,Km="__reactHandles$"+xl,Oc="__reactResources$"+xl,ra="__reactMarker$"+xl;function Zs(e){delete e[tt],delete e[ut],delete e[Qs],delete e[$m],delete e[Km]}function pn(e){var t=e[tt];if(t)return t;for(var l=e.parentNode;l;){if(t=l[mn]||l[tt]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=lh(e);e!==null;){if(l=e[tt])return l;e=lh(e)}return t}e=l,l=e.parentNode}return null}function gn(e){if(e=e[tt]||e[mn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function sa(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(o(33))}function yn(e){var t=e[Oc];return t||(t=e[Oc]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ie(e){e[ra]=!0}var Lc=new Set,Dc={};function Ql(e,t){vn(e,t),vn(e+"Capture",t)}function vn(e,t){for(Dc[e]=t,e=0;e<t.length;e++)Lc.add(t[e])}var Jm=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]*$"),Uc={},Hc={};function Wm(e){return xt.call(Hc,e)?!0:xt.call(Uc,e)?!1:Jm.test(e)?Hc[e]=!0:(Uc[e]=!0,!1)}function ur(e,t,l){if(Wm(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var n=t.toLowerCase().slice(0,5);if(n!=="data-"&&n!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function fr(e,t,l){if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+l)}}function Pt(e,t,l,n){if(n===null)e.removeAttribute(l);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+n)}}function At(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Bc(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Fm(e,t,l){var n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var a=n.get,s=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return a.call(this)},set:function(d){l=""+d,s.call(this,d)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return l},setValue:function(d){l=""+d},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $s(e){if(!e._valueTracker){var t=Bc(e)?"checked":"value";e._valueTracker=Fm(e,t,""+e[t])}}function qc(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),n="";return e&&(n=Bc(e)?e.checked?"true":"false":e.value),e=n,e!==l?(t.setValue(e),!0):!1}function dr(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 Im=/[\n"\\]/g;function Mt(e){return e.replace(Im,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ks(e,t,l,n,a,s,d,p){e.name="",d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"?e.type=d:e.removeAttribute("type"),t!=null?d==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+At(t)):e.value!==""+At(t)&&(e.value=""+At(t)):d!=="submit"&&d!=="reset"||e.removeAttribute("value"),t!=null?Js(e,d,At(t)):l!=null?Js(e,d,At(l)):n!=null&&e.removeAttribute("value"),a==null&&s!=null&&(e.defaultChecked=!!s),a!=null&&(e.checked=a&&typeof a!="function"&&typeof a!="symbol"),p!=null&&typeof p!="function"&&typeof p!="symbol"&&typeof p!="boolean"?e.name=""+At(p):e.removeAttribute("name")}function Yc(e,t,l,n,a,s,d,p){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||l!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){$s(e);return}l=l!=null?""+At(l):"",t=t!=null?""+At(t):l,p||t===e.value||(e.value=t),e.defaultValue=t}n=n??a,n=typeof n!="function"&&typeof n!="symbol"&&!!n,e.checked=p?e.checked:!!n,e.defaultChecked=!!n,d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.name=d),$s(e)}function Js(e,t,l){t==="number"&&dr(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function xn(e,t,l,n){if(e=e.options,t){t={};for(var a=0;a<l.length;a++)t["$"+l[a]]=!0;for(l=0;l<e.length;l++)a=t.hasOwnProperty("$"+e[l].value),e[l].selected!==a&&(e[l].selected=a),a&&n&&(e[l].defaultSelected=!0)}else{for(l=""+At(l),t=null,a=0;a<e.length;a++){if(e[a].value===l){e[a].selected=!0,n&&(e[a].defaultSelected=!0);return}t!==null||e[a].disabled||(t=e[a])}t!==null&&(t.selected=!0)}}function Xc(e,t,l){if(t!=null&&(t=""+At(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+At(l):""}function Vc(e,t,l,n){if(t==null){if(n!=null){if(l!=null)throw Error(o(92));if(Ce(n)){if(1<n.length)throw Error(o(93));n=n[0]}l=n}l==null&&(l=""),t=l}l=At(t),e.defaultValue=l,n=e.textContent,n===l&&n!==""&&n!==null&&(e.value=n),$s(e)}function bn(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Pm=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 Gc(e,t,l){var n=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?n?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":n?e.setProperty(t,l):typeof l!="number"||l===0||Pm.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function Qc(e,t,l){if(t!=null&&typeof t!="object")throw Error(o(62));if(e=e.style,l!=null){for(var n in l)!l.hasOwnProperty(n)||t!=null&&t.hasOwnProperty(n)||(n.indexOf("--")===0?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="");for(var a in t)n=t[a],t.hasOwnProperty(a)&&l[a]!==n&&Gc(e,a,n)}else for(var s in t)t.hasOwnProperty(s)&&Gc(e,s,t[s])}function Ws(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 ep=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"]]),tp=/^[\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 hr(e){return tp.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function el(){}var Fs=null;function Is(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Sn=null,_n=null;function Zc(e){var t=gn(e);if(t&&(e=t.stateNode)){var l=e[ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ks(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),t=l.name,l.type==="radio"&&t!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+Mt(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var n=l[t];if(n!==e&&n.form===e.form){var a=n[ut]||null;if(!a)throw Error(o(90));Ks(n,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<l.length;t++)n=l[t],n.form===e.form&&qc(n)}break e;case"textarea":Xc(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&xn(e,!!l.multiple,t,!1)}}}var Ps=!1;function $c(e,t,l){if(Ps)return e(t,l);Ps=!0;try{var n=e(t);return n}finally{if(Ps=!1,(Sn!==null||_n!==null)&&(es(),Sn&&(t=Sn,e=_n,_n=Sn=null,Zc(t),e)))for(t=0;t<e.length;t++)Zc(e[t])}}function ia(e,t){var l=e.stateNode;if(l===null)return null;var n=l[ut]||null;if(n===null)return null;l=n[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":(n=!n.disabled)||(e=e.type,n=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!n;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(o(231,t,typeof l));return l}var tl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ei=!1;if(tl)try{var oa={};Object.defineProperty(oa,"passive",{get:function(){ei=!0}}),window.addEventListener("test",oa,oa),window.removeEventListener("test",oa,oa)}catch{ei=!1}var bl=null,ti=null,mr=null;function Kc(){if(mr)return mr;var e,t=ti,l=t.length,n,a="value"in bl?bl.value:bl.textContent,s=a.length;for(e=0;e<l&&t[e]===a[e];e++);var d=l-e;for(n=1;n<=d&&t[l-n]===a[s-n];n++);return mr=a.slice(e,1<n?1-n:void 0)}function pr(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 gr(){return!0}function Jc(){return!1}function ft(e){function t(l,n,a,s,d){this._reactName=l,this._targetInst=a,this.type=n,this.nativeEvent=s,this.target=d,this.currentTarget=null;for(var p in e)e.hasOwnProperty(p)&&(l=e[p],this[p]=l?l(s):s[p]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?gr:Jc,this.isPropagationStopped=Jc,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=gr)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=gr)},persist:function(){},isPersistent:gr}),t}var Zl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},yr=ft(Zl),ca=v({},Zl,{view:0,detail:0}),lp=ft(ca),li,ni,ua,vr=v({},ca,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ri,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!==ua&&(ua&&e.type==="mousemove"?(li=e.screenX-ua.screenX,ni=e.screenY-ua.screenY):ni=li=0,ua=e),li)},movementY:function(e){return"movementY"in e?e.movementY:ni}}),Wc=ft(vr),np=v({},vr,{dataTransfer:0}),ap=ft(np),rp=v({},ca,{relatedTarget:0}),ai=ft(rp),sp=v({},Zl,{animationName:0,elapsedTime:0,pseudoElement:0}),ip=ft(sp),op=v({},Zl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),cp=ft(op),up=v({},Zl,{data:0}),Fc=ft(up),fp={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},dp={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"},hp={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function mp(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=hp[e])?!!t[e]:!1}function ri(){return mp}var pp=v({},ca,{key:function(e){if(e.key){var t=fp[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=pr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?dp[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ri,charCode:function(e){return e.type==="keypress"?pr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),gp=ft(pp),yp=v({},vr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ic=ft(yp),vp=v({},ca,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ri}),xp=ft(vp),bp=v({},Zl,{propertyName:0,elapsedTime:0,pseudoElement:0}),Sp=ft(bp),_p=v({},vr,{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}),Cp=ft(_p),jp=v({},Zl,{newState:0,oldState:0}),Ep=ft(jp),wp=[9,13,27,32],si=tl&&"CompositionEvent"in window,fa=null;tl&&"documentMode"in document&&(fa=document.documentMode);var Np=tl&&"TextEvent"in window&&!fa,Pc=tl&&(!si||fa&&8<fa&&11>=fa),eu=" ",tu=!1;function lu(e,t){switch(e){case"keyup":return wp.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function nu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Cn=!1;function kp(e,t){switch(e){case"compositionend":return nu(t);case"keypress":return t.which!==32?null:(tu=!0,eu);case"textInput":return e=t.data,e===eu&&tu?null:e;default:return null}}function Tp(e,t){if(Cn)return e==="compositionend"||!si&&lu(e,t)?(e=Kc(),mr=ti=bl=null,Cn=!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 Pc&&t.locale!=="ko"?null:t.data;default:return null}}var Ap={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 au(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Ap[e.type]:t==="textarea"}function ru(e,t,l,n){Sn?_n?_n.push(n):_n=[n]:Sn=n,t=is(t,"onChange"),0<t.length&&(l=new yr("onChange","change",null,l,n),e.push({event:l,listeners:t}))}var da=null,ha=null;function Mp(e){Xd(e,0)}function xr(e){var t=sa(e);if(qc(t))return e}function su(e,t){if(e==="change")return t}var iu=!1;if(tl){var ii;if(tl){var oi="oninput"in document;if(!oi){var ou=document.createElement("div");ou.setAttribute("oninput","return;"),oi=typeof ou.oninput=="function"}ii=oi}else ii=!1;iu=ii&&(!document.documentMode||9<document.documentMode)}function cu(){da&&(da.detachEvent("onpropertychange",uu),ha=da=null)}function uu(e){if(e.propertyName==="value"&&xr(ha)){var t=[];ru(t,ha,e,Is(e)),$c(Mp,t)}}function zp(e,t,l){e==="focusin"?(cu(),da=t,ha=l,da.attachEvent("onpropertychange",uu)):e==="focusout"&&cu()}function Rp(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xr(ha)}function Op(e,t){if(e==="click")return xr(t)}function Lp(e,t){if(e==="input"||e==="change")return xr(t)}function Dp(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Ct=typeof Object.is=="function"?Object.is:Dp;function ma(e,t){if(Ct(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),n=Object.keys(t);if(l.length!==n.length)return!1;for(n=0;n<l.length;n++){var a=l[n];if(!xt.call(t,a)||!Ct(e[a],t[a]))return!1}return!0}function fu(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function du(e,t){var l=fu(e);e=0;for(var n;l;){if(l.nodeType===3){if(n=e+l.textContent.length,e<=t&&n>=t)return{node:l,offset:t-e};e=n}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=fu(l)}}function hu(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?hu(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mu(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=dr(e.document);t instanceof e.HTMLIFrameElement;){try{var l=typeof t.contentWindow.location.href=="string"}catch{l=!1}if(l)e=t.contentWindow;else break;t=dr(e.document)}return t}function ci(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 Up=tl&&"documentMode"in document&&11>=document.documentMode,jn=null,ui=null,pa=null,fi=!1;function pu(e,t,l){var n=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;fi||jn==null||jn!==dr(n)||(n=jn,"selectionStart"in n&&ci(n)?n={start:n.selectionStart,end:n.selectionEnd}:(n=(n.ownerDocument&&n.ownerDocument.defaultView||window).getSelection(),n={anchorNode:n.anchorNode,anchorOffset:n.anchorOffset,focusNode:n.focusNode,focusOffset:n.focusOffset}),pa&&ma(pa,n)||(pa=n,n=is(ui,"onSelect"),0<n.length&&(t=new yr("onSelect","select",null,t,l),e.push({event:t,listeners:n}),t.target=jn)))}function $l(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var En={animationend:$l("Animation","AnimationEnd"),animationiteration:$l("Animation","AnimationIteration"),animationstart:$l("Animation","AnimationStart"),transitionrun:$l("Transition","TransitionRun"),transitionstart:$l("Transition","TransitionStart"),transitioncancel:$l("Transition","TransitionCancel"),transitionend:$l("Transition","TransitionEnd")},di={},gu={};tl&&(gu=document.createElement("div").style,"AnimationEvent"in window||(delete En.animationend.animation,delete En.animationiteration.animation,delete En.animationstart.animation),"TransitionEvent"in window||delete En.transitionend.transition);function Kl(e){if(di[e])return di[e];if(!En[e])return e;var t=En[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in gu)return di[e]=t[l];return e}var yu=Kl("animationend"),vu=Kl("animationiteration"),xu=Kl("animationstart"),Hp=Kl("transitionrun"),Bp=Kl("transitionstart"),qp=Kl("transitioncancel"),bu=Kl("transitionend"),Su=new Map,hi="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(" ");hi.push("scrollEnd");function qt(e,t){Su.set(e,t),Ql(t,[e])}var br=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)},zt=[],wn=0,mi=0;function Sr(){for(var e=wn,t=mi=wn=0;t<e;){var l=zt[t];zt[t++]=null;var n=zt[t];zt[t++]=null;var a=zt[t];zt[t++]=null;var s=zt[t];if(zt[t++]=null,n!==null&&a!==null){var d=n.pending;d===null?a.next=a:(a.next=d.next,d.next=a),n.pending=a}s!==0&&_u(l,a,s)}}function _r(e,t,l,n){zt[wn++]=e,zt[wn++]=t,zt[wn++]=l,zt[wn++]=n,mi|=n,e.lanes|=n,e=e.alternate,e!==null&&(e.lanes|=n)}function pi(e,t,l,n){return _r(e,t,l,n),Cr(e)}function Jl(e,t){return _r(e,null,null,t),Cr(e)}function _u(e,t,l){e.lanes|=l;var n=e.alternate;n!==null&&(n.lanes|=l);for(var a=!1,s=e.return;s!==null;)s.childLanes|=l,n=s.alternate,n!==null&&(n.childLanes|=l),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(a=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,a&&t!==null&&(a=31-_t(l),e=s.hiddenUpdates,n=e[a],n===null?e[a]=[t]:n.push(t),t.lane=l|536870912),s):null}function Cr(e){if(50<Ua)throw Ua=0,Eo=null,Error(o(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Nn={};function Yp(e,t,l,n){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=n,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function jt(e,t,l,n){return new Yp(e,t,l,n)}function gi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ll(e,t){var l=e.alternate;return l===null?(l=jt(e.tag,t,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=t,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,t=e.dependencies,l.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Cu(e,t){e.flags&=65011714;var l=e.alternate;return l===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=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,t=l.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function jr(e,t,l,n,a,s){var d=0;if(n=e,typeof e=="function")gi(e)&&(d=1);else if(typeof e=="string")d=Z0(e,l,ee.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=jt(31,l,t,a),e.elementType=te,e.lanes=s,e;case z:return Wl(l.children,a,s,t);case R:d=8,a|=24;break;case T:return e=jt(12,l,t,a|2),e.elementType=T,e.lanes=s,e;case Q:return e=jt(13,l,t,a),e.elementType=Q,e.lanes=s,e;case H:return e=jt(19,l,t,a),e.elementType=H,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case G:d=10;break e;case V:d=9;break e;case F:d=11;break e;case q:d=14;break e;case J:d=16,n=null;break e}d=29,l=Error(o(130,e===null?"null":typeof e,"")),n=null}return t=jt(d,l,t,a),t.elementType=e,t.type=n,t.lanes=s,t}function Wl(e,t,l,n){return e=jt(7,e,n,t),e.lanes=l,e}function yi(e,t,l){return e=jt(6,e,null,t),e.lanes=l,e}function ju(e){var t=jt(18,null,null,0);return t.stateNode=e,t}function vi(e,t,l){return t=jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Eu=new WeakMap;function Rt(e,t){if(typeof e=="object"&&e!==null){var l=Eu.get(e);return l!==void 0?l:(t={value:e,source:t,stack:et(t)},Eu.set(e,t),t)}return{value:e,source:t,stack:et(t)}}var kn=[],Tn=0,Er=null,ga=0,Ot=[],Lt=0,Sl=null,Qt=1,Zt="";function nl(e,t){kn[Tn++]=ga,kn[Tn++]=Er,Er=e,ga=t}function wu(e,t,l){Ot[Lt++]=Qt,Ot[Lt++]=Zt,Ot[Lt++]=Sl,Sl=e;var n=Qt;e=Zt;var a=32-_t(n)-1;n&=~(1<<a),l+=1;var s=32-_t(t)+a;if(30<s){var d=a-a%5;s=(n&(1<<d)-1).toString(32),n>>=d,a-=d,Qt=1<<32-_t(t)+a|l<<a|n,Zt=s+e}else Qt=1<<s|l<<a|n,Zt=e}function xi(e){e.return!==null&&(nl(e,1),wu(e,1,0))}function bi(e){for(;e===Er;)Er=kn[--Tn],kn[Tn]=null,ga=kn[--Tn],kn[Tn]=null;for(;e===Sl;)Sl=Ot[--Lt],Ot[Lt]=null,Zt=Ot[--Lt],Ot[Lt]=null,Qt=Ot[--Lt],Ot[Lt]=null}function Nu(e,t){Ot[Lt++]=Qt,Ot[Lt++]=Zt,Ot[Lt++]=Sl,Qt=t.id,Zt=t.overflow,Sl=e}var lt=null,De=null,_e=!1,_l=null,Dt=!1,Si=Error(o(519));function Cl(e){var t=Error(o(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ya(Rt(t,e)),Si}function ku(e){var t=e.stateNode,l=e.type,n=e.memoizedProps;switch(t[tt]=e,t[ut]=n,l){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(l=0;l<Ba.length;l++)ve(Ba[l],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),Yc(t,n.value,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name,!0);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),Vc(t,n.value,n.defaultValue,n.children)}l=n.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||n.suppressHydrationWarning===!0||Zd(t.textContent,l)?(n.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),n.onScroll!=null&&ve("scroll",t),n.onScrollEnd!=null&&ve("scrollend",t),n.onClick!=null&&(t.onclick=el),t=!0):t=!1,t||Cl(e,!0)}function Tu(e){for(lt=e.return;lt;)switch(lt.tag){case 5:case 31:case 13:Dt=!1;return;case 27:case 3:Dt=!0;return;default:lt=lt.return}}function An(e){if(e!==lt)return!1;if(!_e)return Tu(e),_e=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||qo(e.type,e.memoizedProps)),l=!l),l&&De&&Cl(e),Tu(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));De=th(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(317));De=th(e)}else t===27?(t=De,Ul(e.type)?(e=Qo,Qo=null,De=e):De=t):De=lt?Ht(e.stateNode.nextSibling):null;return!0}function Fl(){De=lt=null,_e=!1}function _i(){var e=_l;return e!==null&&(pt===null?pt=e:pt.push.apply(pt,e),_l=null),e}function ya(e){_l===null?_l=[e]:_l.push(e)}var Ci=_(null),Il=null,al=null;function jl(e,t,l){I(Ci,t._currentValue),t._currentValue=l}function rl(e){e._currentValue=Ci.current,B(Ci)}function ji(e,t,l){for(;e!==null;){var n=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,n!==null&&(n.childLanes|=t)):n!==null&&(n.childLanes&t)!==t&&(n.childLanes|=t),e===l)break;e=e.return}}function Ei(e,t,l,n){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var s=a.dependencies;if(s!==null){var d=a.child;s=s.firstContext;e:for(;s!==null;){var p=s;s=a;for(var S=0;S<t.length;S++)if(p.context===t[S]){s.lanes|=l,p=s.alternate,p!==null&&(p.lanes|=l),ji(s.return,l,e),n||(d=null);break e}s=p.next}}else if(a.tag===18){if(d=a.return,d===null)throw Error(o(341));d.lanes|=l,s=d.alternate,s!==null&&(s.lanes|=l),ji(d,l,e),d=null}else d=a.child;if(d!==null)d.return=a;else for(d=a;d!==null;){if(d===e){d=null;break}if(a=d.sibling,a!==null){a.return=d.return,d=a;break}d=d.return}a=d}}function Mn(e,t,l,n){e=null;for(var a=t,s=!1;a!==null;){if(!s){if((a.flags&524288)!==0)s=!0;else if((a.flags&262144)!==0)break}if(a.tag===10){var d=a.alternate;if(d===null)throw Error(o(387));if(d=d.memoizedProps,d!==null){var p=a.type;Ct(a.pendingProps.value,d.value)||(e!==null?e.push(p):e=[p])}}else if(a===je.current){if(d=a.alternate,d===null)throw Error(o(387));d.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e!==null?e.push(Ga):e=[Ga])}a=a.return}e!==null&&Ei(t,e,l,n),t.flags|=262144}function wr(e){for(e=e.firstContext;e!==null;){if(!Ct(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Pl(e){Il=e,al=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function nt(e){return Au(Il,e)}function Nr(e,t){return Il===null&&Pl(e),Au(e,t)}function Au(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},al===null){if(e===null)throw Error(o(308));al=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else al=al.next=t;return l}var Xp=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},Vp=r.unstable_scheduleCallback,Gp=r.unstable_NormalPriority,Qe={$$typeof:G,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function wi(){return{controller:new Xp,data:new Map,refCount:0}}function va(e){e.refCount--,e.refCount===0&&Vp(Gp,function(){e.controller.abort()})}var xa=null,Ni=0,zn=0,Rn=null;function Qp(e,t){if(xa===null){var l=xa=[];Ni=0,zn=Mo(),Rn={status:"pending",value:void 0,then:function(n){l.push(n)}}}return Ni++,t.then(Mu,Mu),t}function Mu(){if(--Ni===0&&xa!==null){Rn!==null&&(Rn.status="fulfilled");var e=xa;xa=null,zn=0,Rn=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Zp(e,t){var l=[],n={status:"pending",value:null,reason:null,then:function(a){l.push(a)}};return e.then(function(){n.status="fulfilled",n.value=t;for(var a=0;a<l.length;a++)(0,l[a])(t)},function(a){for(n.status="rejected",n.reason=a,a=0;a<l.length;a++)(0,l[a])(void 0)}),n}var zu=E.S;E.S=function(e,t){gd=bt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Qp(e,t),zu!==null&&zu(e,t)};var en=_(null);function ki(){var e=en.current;return e!==null?e:Oe.pooledCache}function kr(e,t){t===null?I(en,en.current):I(en,t.pool)}function Ru(){var e=ki();return e===null?null:{parent:Qe._currentValue,pool:e}}var On=Error(o(460)),Ti=Error(o(474)),Tr=Error(o(542)),Ar={then:function(){}};function Ou(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Lu(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(el,el),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uu(e),e;default:if(typeof t.status=="string")t.then(el,el);else{if(e=Oe,e!==null&&100<e.shellSuspendCounter)throw Error(o(482));e=t,e.status="pending",e.then(function(n){if(t.status==="pending"){var a=t;a.status="fulfilled",a.value=n}},function(n){if(t.status==="pending"){var a=t;a.status="rejected",a.reason=n}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Uu(e),e}throw ln=t,On}}function tn(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(ln=l,On):l}}var ln=null;function Du(){if(ln===null)throw Error(o(459));var e=ln;return ln=null,e}function Uu(e){if(e===On||e===Tr)throw Error(o(483))}var Ln=null,ba=0;function Mr(e){var t=ba;return ba+=1,Ln===null&&(Ln=[]),Lu(Ln,e,t)}function Sa(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function zr(e,t){throw t.$$typeof===A?Error(o(525)):(e=Object.prototype.toString.call(t),Error(o(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Hu(e){function t(w,j){if(e){var N=w.deletions;N===null?(w.deletions=[j],w.flags|=16):N.push(j)}}function l(w,j){if(!e)return null;for(;j!==null;)t(w,j),j=j.sibling;return null}function n(w){for(var j=new Map;w!==null;)w.key!==null?j.set(w.key,w):j.set(w.index,w),w=w.sibling;return j}function a(w,j){return w=ll(w,j),w.index=0,w.sibling=null,w}function s(w,j,N){return w.index=N,e?(N=w.alternate,N!==null?(N=N.index,N<j?(w.flags|=67108866,j):N):(w.flags|=67108866,j)):(w.flags|=1048576,j)}function d(w){return e&&w.alternate===null&&(w.flags|=67108866),w}function p(w,j,N,Y){return j===null||j.tag!==6?(j=yi(N,w.mode,Y),j.return=w,j):(j=a(j,N),j.return=w,j)}function S(w,j,N,Y){var ae=N.type;return ae===z?U(w,j,N.props.children,Y,N.key):j!==null&&(j.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===J&&tn(ae)===j.type)?(j=a(j,N.props),Sa(j,N),j.return=w,j):(j=jr(N.type,N.key,N.props,null,w.mode,Y),Sa(j,N),j.return=w,j)}function k(w,j,N,Y){return j===null||j.tag!==4||j.stateNode.containerInfo!==N.containerInfo||j.stateNode.implementation!==N.implementation?(j=vi(N,w.mode,Y),j.return=w,j):(j=a(j,N.children||[]),j.return=w,j)}function U(w,j,N,Y,ae){return j===null||j.tag!==7?(j=Wl(N,w.mode,Y,ae),j.return=w,j):(j=a(j,N),j.return=w,j)}function X(w,j,N){if(typeof j=="string"&&j!==""||typeof j=="number"||typeof j=="bigint")return j=yi(""+j,w.mode,N),j.return=w,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case $:return N=jr(j.type,j.key,j.props,null,w.mode,N),Sa(N,j),N.return=w,N;case C:return j=vi(j,w.mode,N),j.return=w,j;case J:return j=tn(j),X(w,j,N)}if(Ce(j)||ce(j))return j=Wl(j,w.mode,N,null),j.return=w,j;if(typeof j.then=="function")return X(w,Mr(j),N);if(j.$$typeof===G)return X(w,Nr(w,j),N);zr(w,j)}return null}function M(w,j,N,Y){var ae=j!==null?j.key:null;if(typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint")return ae!==null?null:p(w,j,""+N,Y);if(typeof N=="object"&&N!==null){switch(N.$$typeof){case $:return N.key===ae?S(w,j,N,Y):null;case C:return N.key===ae?k(w,j,N,Y):null;case J:return N=tn(N),M(w,j,N,Y)}if(Ce(N)||ce(N))return ae!==null?null:U(w,j,N,Y,null);if(typeof N.then=="function")return M(w,j,Mr(N),Y);if(N.$$typeof===G)return M(w,j,Nr(w,N),Y);zr(w,N)}return null}function L(w,j,N,Y,ae){if(typeof Y=="string"&&Y!==""||typeof Y=="number"||typeof Y=="bigint")return w=w.get(N)||null,p(j,w,""+Y,ae);if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case $:return w=w.get(Y.key===null?N:Y.key)||null,S(j,w,Y,ae);case C:return w=w.get(Y.key===null?N:Y.key)||null,k(j,w,Y,ae);case J:return Y=tn(Y),L(w,j,N,Y,ae)}if(Ce(Y)||ce(Y))return w=w.get(N)||null,U(j,w,Y,ae,null);if(typeof Y.then=="function")return L(w,j,N,Mr(Y),ae);if(Y.$$typeof===G)return L(w,j,N,Nr(j,Y),ae);zr(j,Y)}return null}function le(w,j,N,Y){for(var ae=null,Ee=null,ne=j,me=j=0,be=null;ne!==null&&me<N.length;me++){ne.index>me?(be=ne,ne=null):be=ne.sibling;var we=M(w,ne,N[me],Y);if(we===null){ne===null&&(ne=be);break}e&&ne&&we.alternate===null&&t(w,ne),j=s(we,j,me),Ee===null?ae=we:Ee.sibling=we,Ee=we,ne=be}if(me===N.length)return l(w,ne),_e&&nl(w,me),ae;if(ne===null){for(;me<N.length;me++)ne=X(w,N[me],Y),ne!==null&&(j=s(ne,j,me),Ee===null?ae=ne:Ee.sibling=ne,Ee=ne);return _e&&nl(w,me),ae}for(ne=n(ne);me<N.length;me++)be=L(ne,w,me,N[me],Y),be!==null&&(e&&be.alternate!==null&&ne.delete(be.key===null?me:be.key),j=s(be,j,me),Ee===null?ae=be:Ee.sibling=be,Ee=be);return e&&ne.forEach(function(Xl){return t(w,Xl)}),_e&&nl(w,me),ae}function se(w,j,N,Y){if(N==null)throw Error(o(151));for(var ae=null,Ee=null,ne=j,me=j=0,be=null,we=N.next();ne!==null&&!we.done;me++,we=N.next()){ne.index>me?(be=ne,ne=null):be=ne.sibling;var Xl=M(w,ne,we.value,Y);if(Xl===null){ne===null&&(ne=be);break}e&&ne&&Xl.alternate===null&&t(w,ne),j=s(Xl,j,me),Ee===null?ae=Xl:Ee.sibling=Xl,Ee=Xl,ne=be}if(we.done)return l(w,ne),_e&&nl(w,me),ae;if(ne===null){for(;!we.done;me++,we=N.next())we=X(w,we.value,Y),we!==null&&(j=s(we,j,me),Ee===null?ae=we:Ee.sibling=we,Ee=we);return _e&&nl(w,me),ae}for(ne=n(ne);!we.done;me++,we=N.next())we=L(ne,w,me,we.value,Y),we!==null&&(e&&we.alternate!==null&&ne.delete(we.key===null?me:we.key),j=s(we,j,me),Ee===null?ae=we:Ee.sibling=we,Ee=we);return e&&ne.forEach(function(ng){return t(w,ng)}),_e&&nl(w,me),ae}function Re(w,j,N,Y){if(typeof N=="object"&&N!==null&&N.type===z&&N.key===null&&(N=N.props.children),typeof N=="object"&&N!==null){switch(N.$$typeof){case $:e:{for(var ae=N.key;j!==null;){if(j.key===ae){if(ae=N.type,ae===z){if(j.tag===7){l(w,j.sibling),Y=a(j,N.props.children),Y.return=w,w=Y;break e}}else if(j.elementType===ae||typeof ae=="object"&&ae!==null&&ae.$$typeof===J&&tn(ae)===j.type){l(w,j.sibling),Y=a(j,N.props),Sa(Y,N),Y.return=w,w=Y;break e}l(w,j);break}else t(w,j);j=j.sibling}N.type===z?(Y=Wl(N.props.children,w.mode,Y,N.key),Y.return=w,w=Y):(Y=jr(N.type,N.key,N.props,null,w.mode,Y),Sa(Y,N),Y.return=w,w=Y)}return d(w);case C:e:{for(ae=N.key;j!==null;){if(j.key===ae)if(j.tag===4&&j.stateNode.containerInfo===N.containerInfo&&j.stateNode.implementation===N.implementation){l(w,j.sibling),Y=a(j,N.children||[]),Y.return=w,w=Y;break e}else{l(w,j);break}else t(w,j);j=j.sibling}Y=vi(N,w.mode,Y),Y.return=w,w=Y}return d(w);case J:return N=tn(N),Re(w,j,N,Y)}if(Ce(N))return le(w,j,N,Y);if(ce(N)){if(ae=ce(N),typeof ae!="function")throw Error(o(150));return N=ae.call(N),se(w,j,N,Y)}if(typeof N.then=="function")return Re(w,j,Mr(N),Y);if(N.$$typeof===G)return Re(w,j,Nr(w,N),Y);zr(w,N)}return typeof N=="string"&&N!==""||typeof N=="number"||typeof N=="bigint"?(N=""+N,j!==null&&j.tag===6?(l(w,j.sibling),Y=a(j,N),Y.return=w,w=Y):(l(w,j),Y=yi(N,w.mode,Y),Y.return=w,w=Y),d(w)):l(w,j)}return function(w,j,N,Y){try{ba=0;var ae=Re(w,j,N,Y);return Ln=null,ae}catch(ne){if(ne===On||ne===Tr)throw ne;var Ee=jt(29,ne,null,w.mode);return Ee.lanes=Y,Ee.return=w,Ee}}}var nn=Hu(!0),Bu=Hu(!1),El=!1;function Ai(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Mi(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 wl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Nl(e,t,l){var n=e.updateQueue;if(n===null)return null;if(n=n.shared,(ke&2)!==0){var a=n.pending;return a===null?t.next=t:(t.next=a.next,a.next=t),n.pending=t,t=Cr(e),_u(e,null,l),t}return _r(e,n,t,l),Cr(e)}function _a(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Ac(e,l)}}function zi(e,t){var l=e.updateQueue,n=e.alternate;if(n!==null&&(n=n.updateQueue,l===n)){var a=null,s=null;if(l=l.firstBaseUpdate,l!==null){do{var d={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};s===null?a=s=d:s=s.next=d,l=l.next}while(l!==null);s===null?a=s=t:s=s.next=t}else a=s=t;l={baseState:n.baseState,firstBaseUpdate:a,lastBaseUpdate:s,shared:n.shared,callbacks:n.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var Ri=!1;function Ca(){if(Ri){var e=Rn;if(e!==null)throw e}}function ja(e,t,l,n){Ri=!1;var a=e.updateQueue;El=!1;var s=a.firstBaseUpdate,d=a.lastBaseUpdate,p=a.shared.pending;if(p!==null){a.shared.pending=null;var S=p,k=S.next;S.next=null,d===null?s=k:d.next=k,d=S;var U=e.alternate;U!==null&&(U=U.updateQueue,p=U.lastBaseUpdate,p!==d&&(p===null?U.firstBaseUpdate=k:p.next=k,U.lastBaseUpdate=S))}if(s!==null){var X=a.baseState;d=0,U=k=S=null,p=s;do{var M=p.lane&-536870913,L=M!==p.lane;if(L?(xe&M)===M:(n&M)===M){M!==0&&M===zn&&(Ri=!0),U!==null&&(U=U.next={lane:0,tag:p.tag,payload:p.payload,callback:null,next:null});e:{var le=e,se=p;M=t;var Re=l;switch(se.tag){case 1:if(le=se.payload,typeof le=="function"){X=le.call(Re,X,M);break e}X=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=se.payload,M=typeof le=="function"?le.call(Re,X,M):le,M==null)break e;X=v({},X,M);break e;case 2:El=!0}}M=p.callback,M!==null&&(e.flags|=64,L&&(e.flags|=8192),L=a.callbacks,L===null?a.callbacks=[M]:L.push(M))}else L={lane:M,tag:p.tag,payload:p.payload,callback:p.callback,next:null},U===null?(k=U=L,S=X):U=U.next=L,d|=M;if(p=p.next,p===null){if(p=a.shared.pending,p===null)break;L=p,p=L.next,L.next=null,a.lastBaseUpdate=L,a.shared.pending=null}}while(!0);U===null&&(S=X),a.baseState=S,a.firstBaseUpdate=k,a.lastBaseUpdate=U,s===null&&(a.shared.lanes=0),zl|=d,e.lanes=d,e.memoizedState=X}}function qu(e,t){if(typeof e!="function")throw Error(o(191,e));e.call(t)}function Yu(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)qu(l[e],t)}var Dn=_(null),Rr=_(0);function Xu(e,t){e=ml,I(Rr,e),I(Dn,t),ml=e|t.baseLanes}function Oi(){I(Rr,ml),I(Dn,Dn.current)}function Li(){ml=Rr.current,B(Dn),B(Rr)}var Et=_(null),Ut=null;function kl(e){var t=e.alternate;I(Ye,Ye.current&1),I(Et,e),Ut===null&&(t===null||Dn.current!==null||t.memoizedState!==null)&&(Ut=e)}function Di(e){I(Ye,Ye.current),I(Et,e),Ut===null&&(Ut=e)}function Vu(e){e.tag===22?(I(Ye,Ye.current),I(Et,e),Ut===null&&(Ut=e)):Tl()}function Tl(){I(Ye,Ye.current),I(Et,Et.current)}function wt(e){B(Et),Ut===e&&(Ut=null),B(Ye)}var Ye=_(0);function Or(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Vo(l)||Go(l)))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 sl=0,fe=null,Me=null,Ze=null,Lr=!1,Un=!1,an=!1,Dr=0,Ea=0,Hn=null,$p=0;function Be(){throw Error(o(321))}function Ui(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!Ct(e[l],t[l]))return!1;return!0}function Hi(e,t,l,n,a,s){return sl=s,fe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,E.H=e===null||e.memoizedState===null?Nf:Pi,an=!1,s=l(n,a),an=!1,Un&&(s=Qu(t,l,n,a)),Gu(e),s}function Gu(e){E.H=ka;var t=Me!==null&&Me.next!==null;if(sl=0,Ze=Me=fe=null,Lr=!1,Ea=0,Hn=null,t)throw Error(o(300));e===null||$e||(e=e.dependencies,e!==null&&wr(e)&&($e=!0))}function Qu(e,t,l,n){fe=e;var a=0;do{if(Un&&(Hn=null),Ea=0,Un=!1,25<=a)throw Error(o(301));if(a+=1,Ze=Me=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}E.H=kf,s=t(l,n)}while(Un);return s}function Kp(){var e=E.H,t=e.useState()[0];return t=typeof t.then=="function"?wa(t):t,e=e.useState()[0],(Me!==null?Me.memoizedState:null)!==e&&(fe.flags|=1024),t}function Bi(){var e=Dr!==0;return Dr=0,e}function qi(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function Yi(e){if(Lr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lr=!1}sl=0,Ze=Me=fe=null,Un=!1,Ea=Dr=0,Hn=null}function ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Ze===null?fe.memoizedState=Ze=e:Ze=Ze.next=e,Ze}function Xe(){if(Me===null){var e=fe.alternate;e=e!==null?e.memoizedState:null}else e=Me.next;var t=Ze===null?fe.memoizedState:Ze.next;if(t!==null)Ze=t,Me=e;else{if(e===null)throw fe.alternate===null?Error(o(467)):Error(o(310));Me=e,e={memoizedState:Me.memoizedState,baseState:Me.baseState,baseQueue:Me.baseQueue,queue:Me.queue,next:null},Ze===null?fe.memoizedState=Ze=e:Ze=Ze.next=e}return Ze}function Ur(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wa(e){var t=Ea;return Ea+=1,Hn===null&&(Hn=[]),e=Lu(Hn,e,t),t=fe,(Ze===null?t.memoizedState:Ze.next)===null&&(t=t.alternate,E.H=t===null||t.memoizedState===null?Nf:Pi),e}function Hr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wa(e);if(e.$$typeof===G)return nt(e)}throw Error(o(438,String(e)))}function Xi(e){var t=null,l=fe.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var n=fe.alternate;n!==null&&(n=n.updateQueue,n!==null&&(n=n.memoCache,n!=null&&(t={data:n.data.map(function(a){return a.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=Ur(),fe.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),n=0;n<e;n++)l[n]=re;return t.index++,l}function il(e,t){return typeof t=="function"?t(e):t}function Br(e){var t=Xe();return Vi(t,Me,e)}function Vi(e,t,l){var n=e.queue;if(n===null)throw Error(o(311));n.lastRenderedReducer=l;var a=e.baseQueue,s=n.pending;if(s!==null){if(a!==null){var d=a.next;a.next=s.next,s.next=d}t.baseQueue=a=s,n.pending=null}if(s=e.baseState,a===null)e.memoizedState=s;else{t=a.next;var p=d=null,S=null,k=t,U=!1;do{var X=k.lane&-536870913;if(X!==k.lane?(xe&X)===X:(sl&X)===X){var M=k.revertLane;if(M===0)S!==null&&(S=S.next={lane:0,revertLane:0,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null}),X===zn&&(U=!0);else if((sl&M)===M){k=k.next,M===zn&&(U=!0);continue}else X={lane:0,revertLane:k.revertLane,gesture:null,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},S===null?(p=S=X,d=s):S=S.next=X,fe.lanes|=M,zl|=M;X=k.action,an&&l(s,X),s=k.hasEagerState?k.eagerState:l(s,X)}else M={lane:X,revertLane:k.revertLane,gesture:k.gesture,action:k.action,hasEagerState:k.hasEagerState,eagerState:k.eagerState,next:null},S===null?(p=S=M,d=s):S=S.next=M,fe.lanes|=X,zl|=X;k=k.next}while(k!==null&&k!==t);if(S===null?d=s:S.next=p,!Ct(s,e.memoizedState)&&($e=!0,U&&(l=Rn,l!==null)))throw l;e.memoizedState=s,e.baseState=d,e.baseQueue=S,n.lastRenderedState=s}return a===null&&(n.lanes=0),[e.memoizedState,n.dispatch]}function Gi(e){var t=Xe(),l=t.queue;if(l===null)throw Error(o(311));l.lastRenderedReducer=e;var n=l.dispatch,a=l.pending,s=t.memoizedState;if(a!==null){l.pending=null;var d=a=a.next;do s=e(s,d.action),d=d.next;while(d!==a);Ct(s,t.memoizedState)||($e=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),l.lastRenderedState=s}return[s,n]}function Zu(e,t,l){var n=fe,a=Xe(),s=_e;if(s){if(l===void 0)throw Error(o(407));l=l()}else l=t();var d=!Ct((Me||a).memoizedState,l);if(d&&(a.memoizedState=l,$e=!0),a=a.queue,$i(Ju.bind(null,n,a,e),[e]),a.getSnapshot!==t||d||Ze!==null&&Ze.memoizedState.tag&1){if(n.flags|=2048,Bn(9,{destroy:void 0},Ku.bind(null,n,a,l,t),null),Oe===null)throw Error(o(349));s||(sl&127)!==0||$u(n,t,l)}return l}function $u(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=fe.updateQueue,t===null?(t=Ur(),fe.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function Ku(e,t,l,n){t.value=l,t.getSnapshot=n,Wu(t)&&Fu(e)}function Ju(e,t,l){return l(function(){Wu(t)&&Fu(e)})}function Wu(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!Ct(e,l)}catch{return!0}}function Fu(e){var t=Jl(e,2);t!==null&>(t,e,2)}function Qi(e){var t=ct();if(typeof e=="function"){var l=e;if(e=l(),an){vl(!0);try{l()}finally{vl(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:e},t}function Iu(e,t,l,n){return e.baseState=l,Vi(e,Me,typeof n=="function"?n:il)}function Jp(e,t,l,n,a){if(Xr(e))throw Error(o(485));if(e=t.action,e!==null){var s={payload:a,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(d){s.listeners.push(d)}};E.T!==null?l(!0):s.isTransition=!1,n(s),l=t.pending,l===null?(s.next=t.pending=s,Pu(t,s)):(s.next=l.next,t.pending=l.next=s)}}function Pu(e,t){var l=t.action,n=t.payload,a=e.state;if(t.isTransition){var s=E.T,d={};E.T=d;try{var p=l(a,n),S=E.S;S!==null&&S(d,p),ef(e,t,p)}catch(k){Zi(e,t,k)}finally{s!==null&&d.types!==null&&(s.types=d.types),E.T=s}}else try{s=l(a,n),ef(e,t,s)}catch(k){Zi(e,t,k)}}function ef(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(n){tf(e,t,n)},function(n){return Zi(e,t,n)}):tf(e,t,l)}function tf(e,t,l){t.status="fulfilled",t.value=l,lf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Pu(e,l)))}function Zi(e,t,l){var n=e.pending;if(e.pending=null,n!==null){n=n.next;do t.status="rejected",t.reason=l,lf(t),t=t.next;while(t!==n)}e.action=null}function lf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function nf(e,t){return t}function af(e,t){if(_e){var l=Oe.formState;if(l!==null){e:{var n=fe;if(_e){if(De){t:{for(var a=De,s=Dt;a.nodeType!==8;){if(!s){a=null;break t}if(a=Ht(a.nextSibling),a===null){a=null;break t}}s=a.data,a=s==="F!"||s==="F"?a:null}if(a){De=Ht(a.nextSibling),n=a.data==="F!";break e}}Cl(n)}n=!1}n&&(t=l[0])}}return l=ct(),l.memoizedState=l.baseState=t,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:nf,lastRenderedState:t},l.queue=n,l=jf.bind(null,fe,n),n.dispatch=l,n=Qi(!1),s=Ii.bind(null,fe,!1,n.queue),n=ct(),a={state:t,dispatch:null,action:e,pending:null},n.queue=a,l=Jp.bind(null,fe,a,s,l),a.dispatch=l,n.memoizedState=e,[t,l,!1]}function rf(e){var t=Xe();return sf(t,Me,e)}function sf(e,t,l){if(t=Vi(e,t,nf)[0],e=Br(il)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var n=wa(t)}catch(d){throw d===On?Tr:d}else n=t;t=Xe();var a=t.queue,s=a.dispatch;return l!==t.memoizedState&&(fe.flags|=2048,Bn(9,{destroy:void 0},Wp.bind(null,a,l),null)),[n,s,e]}function Wp(e,t){e.action=t}function of(e){var t=Xe(),l=Me;if(l!==null)return sf(t,l,e);Xe(),t=t.memoizedState,l=Xe();var n=l.queue.dispatch;return l.memoizedState=e,[t,n,!1]}function Bn(e,t,l,n){return e={tag:e,create:l,deps:n,inst:t,next:null},t=fe.updateQueue,t===null&&(t=Ur(),fe.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(n=l.next,l.next=e,e.next=n,t.lastEffect=e),e}function cf(){return Xe().memoizedState}function qr(e,t,l,n){var a=ct();fe.flags|=e,a.memoizedState=Bn(1|t,{destroy:void 0},l,n===void 0?null:n)}function Yr(e,t,l,n){var a=Xe();n=n===void 0?null:n;var s=a.memoizedState.inst;Me!==null&&n!==null&&Ui(n,Me.memoizedState.deps)?a.memoizedState=Bn(t,s,l,n):(fe.flags|=e,a.memoizedState=Bn(1|t,s,l,n))}function uf(e,t){qr(8390656,8,e,t)}function $i(e,t){Yr(2048,8,e,t)}function Fp(e){fe.flags|=4;var t=fe.updateQueue;if(t===null)t=Ur(),fe.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function ff(e){var t=Xe().memoizedState;return Fp({ref:t,nextImpl:e}),function(){if((ke&2)!==0)throw Error(o(440));return t.impl.apply(void 0,arguments)}}function df(e,t){return Yr(4,2,e,t)}function hf(e,t){return Yr(4,4,e,t)}function mf(e,t){if(typeof t=="function"){e=e();var l=t(e);return function(){typeof l=="function"?l():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function pf(e,t,l){l=l!=null?l.concat([e]):null,Yr(4,4,mf.bind(null,t,e),l)}function Ki(){}function gf(e,t){var l=Xe();t=t===void 0?null:t;var n=l.memoizedState;return t!==null&&Ui(t,n[1])?n[0]:(l.memoizedState=[e,t],e)}function yf(e,t){var l=Xe();t=t===void 0?null:t;var n=l.memoizedState;if(t!==null&&Ui(t,n[1]))return n[0];if(n=e(),an){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[n,t],n}function Ji(e,t,l){return l===void 0||(sl&1073741824)!==0&&(xe&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=vd(),fe.lanes|=e,zl|=e,l)}function vf(e,t,l,n){return Ct(l,t)?l:Dn.current!==null?(e=Ji(e,l,n),Ct(e,t)||($e=!0),e):(sl&42)===0||(sl&1073741824)!==0&&(xe&261930)===0?($e=!0,e.memoizedState=l):(e=vd(),fe.lanes|=e,zl|=e,t)}function xf(e,t,l,n,a){var s=Z.p;Z.p=s!==0&&8>s?s:8;var d=E.T,p={};E.T=p,Ii(e,!1,t,l);try{var S=a(),k=E.S;if(k!==null&&k(p,S),S!==null&&typeof S=="object"&&typeof S.then=="function"){var U=Zp(S,n);Na(e,t,U,Tt(e))}else Na(e,t,n,Tt(e))}catch(X){Na(e,t,{then:function(){},status:"rejected",reason:X},Tt())}finally{Z.p=s,d!==null&&p.types!==null&&(d.types=p.types),E.T=d}}function Ip(){}function Wi(e,t,l,n){if(e.tag!==5)throw Error(o(476));var a=bf(e).queue;xf(e,a,t,P,l===null?Ip:function(){return Sf(e),l(n)})}function bf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:P,baseState:P,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:P},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:il,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Sf(e){var t=bf(e);t.next===null&&(t=e.alternate.memoizedState),Na(e,t.next.queue,{},Tt())}function Fi(){return nt(Ga)}function _f(){return Xe().memoizedState}function Cf(){return Xe().memoizedState}function Pp(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=Tt();e=wl(l);var n=Nl(t,e,l);n!==null&&(gt(n,t,l),_a(n,t,l)),t={cache:wi()},e.payload=t;return}t=t.return}}function e0(e,t,l){var n=Tt();l={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Xr(e)?Ef(t,l):(l=pi(e,t,l,n),l!==null&&(gt(l,e,n),wf(l,t,n)))}function jf(e,t,l){var n=Tt();Na(e,t,l,n)}function Na(e,t,l,n){var a={lane:n,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Xr(e))Ef(t,a);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var d=t.lastRenderedState,p=s(d,l);if(a.hasEagerState=!0,a.eagerState=p,Ct(p,d))return _r(e,t,a,0),Oe===null&&Sr(),!1}catch{}if(l=pi(e,t,a,n),l!==null)return gt(l,e,n),wf(l,t,n),!0}return!1}function Ii(e,t,l,n){if(n={lane:2,revertLane:Mo(),gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Xr(e)){if(t)throw Error(o(479))}else t=pi(e,l,n,2),t!==null&>(t,e,2)}function Xr(e){var t=e.alternate;return e===fe||t!==null&&t===fe}function Ef(e,t){Un=Lr=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function wf(e,t,l){if((l&4194048)!==0){var n=t.lanes;n&=e.pendingLanes,l|=n,t.lanes=l,Ac(e,l)}}var ka={readContext:nt,use:Hr,useCallback:Be,useContext:Be,useEffect:Be,useImperativeHandle:Be,useLayoutEffect:Be,useInsertionEffect:Be,useMemo:Be,useReducer:Be,useRef:Be,useState:Be,useDebugValue:Be,useDeferredValue:Be,useTransition:Be,useSyncExternalStore:Be,useId:Be,useHostTransitionStatus:Be,useFormState:Be,useActionState:Be,useOptimistic:Be,useMemoCache:Be,useCacheRefresh:Be};ka.useEffectEvent=Be;var Nf={readContext:nt,use:Hr,useCallback:function(e,t){return ct().memoizedState=[e,t===void 0?null:t],e},useContext:nt,useEffect:uf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,qr(4194308,4,mf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return qr(4194308,4,e,t)},useInsertionEffect:function(e,t){qr(4,2,e,t)},useMemo:function(e,t){var l=ct();t=t===void 0?null:t;var n=e();if(an){vl(!0);try{e()}finally{vl(!1)}}return l.memoizedState=[n,t],n},useReducer:function(e,t,l){var n=ct();if(l!==void 0){var a=l(t);if(an){vl(!0);try{l(t)}finally{vl(!1)}}}else a=t;return n.memoizedState=n.baseState=a,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:a},n.queue=e,e=e.dispatch=e0.bind(null,fe,e),[n.memoizedState,e]},useRef:function(e){var t=ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Qi(e);var t=e.queue,l=jf.bind(null,fe,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:Ki,useDeferredValue:function(e,t){var l=ct();return Ji(l,e,t)},useTransition:function(){var e=Qi(!1);return e=xf.bind(null,fe,e.queue,!0,!1),ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var n=fe,a=ct();if(_e){if(l===void 0)throw Error(o(407));l=l()}else{if(l=t(),Oe===null)throw Error(o(349));(xe&127)!==0||$u(n,t,l)}a.memoizedState=l;var s={value:l,getSnapshot:t};return a.queue=s,uf(Ju.bind(null,n,s,e),[e]),n.flags|=2048,Bn(9,{destroy:void 0},Ku.bind(null,n,s,l,t),null),l},useId:function(){var e=ct(),t=Oe.identifierPrefix;if(_e){var l=Zt,n=Qt;l=(n&~(1<<32-_t(n)-1)).toString(32)+l,t="_"+t+"R_"+l,l=Dr++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=$p++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Fi,useFormState:af,useActionState:af,useOptimistic:function(e){var t=ct();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=Ii.bind(null,fe,!0,l),l.dispatch=t,[e,t]},useMemoCache:Xi,useCacheRefresh:function(){return ct().memoizedState=Pp.bind(null,fe)},useEffectEvent:function(e){var t=ct(),l={impl:e};return t.memoizedState=l,function(){if((ke&2)!==0)throw Error(o(440));return l.impl.apply(void 0,arguments)}}},Pi={readContext:nt,use:Hr,useCallback:gf,useContext:nt,useEffect:$i,useImperativeHandle:pf,useInsertionEffect:df,useLayoutEffect:hf,useMemo:yf,useReducer:Br,useRef:cf,useState:function(){return Br(il)},useDebugValue:Ki,useDeferredValue:function(e,t){var l=Xe();return vf(l,Me.memoizedState,e,t)},useTransition:function(){var e=Br(il)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:wa(e),t]},useSyncExternalStore:Zu,useId:_f,useHostTransitionStatus:Fi,useFormState:rf,useActionState:rf,useOptimistic:function(e,t){var l=Xe();return Iu(l,Me,e,t)},useMemoCache:Xi,useCacheRefresh:Cf};Pi.useEffectEvent=ff;var kf={readContext:nt,use:Hr,useCallback:gf,useContext:nt,useEffect:$i,useImperativeHandle:pf,useInsertionEffect:df,useLayoutEffect:hf,useMemo:yf,useReducer:Gi,useRef:cf,useState:function(){return Gi(il)},useDebugValue:Ki,useDeferredValue:function(e,t){var l=Xe();return Me===null?Ji(l,e,t):vf(l,Me.memoizedState,e,t)},useTransition:function(){var e=Gi(il)[0],t=Xe().memoizedState;return[typeof e=="boolean"?e:wa(e),t]},useSyncExternalStore:Zu,useId:_f,useHostTransitionStatus:Fi,useFormState:of,useActionState:of,useOptimistic:function(e,t){var l=Xe();return Me!==null?Iu(l,Me,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Xi,useCacheRefresh:Cf};kf.useEffectEvent=ff;function eo(e,t,l,n){t=e.memoizedState,l=l(n,t),l=l==null?t:v({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var to={enqueueSetState:function(e,t,l){e=e._reactInternals;var n=Tt(),a=wl(n);a.payload=t,l!=null&&(a.callback=l),t=Nl(e,a,n),t!==null&&(gt(t,e,n),_a(t,e,n))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var n=Tt(),a=wl(n);a.tag=1,a.payload=t,l!=null&&(a.callback=l),t=Nl(e,a,n),t!==null&&(gt(t,e,n),_a(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=Tt(),n=wl(l);n.tag=2,t!=null&&(n.callback=t),t=Nl(e,n,l),t!==null&&(gt(t,e,l),_a(t,e,l))}};function Tf(e,t,l,n,a,s,d){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(n,s,d):t.prototype&&t.prototype.isPureReactComponent?!ma(l,n)||!ma(a,s):!0}function Af(e,t,l,n){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,n),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,n),t.state!==e&&to.enqueueReplaceState(t,t.state,null)}function rn(e,t){var l=t;if("ref"in t){l={};for(var n in t)n!=="ref"&&(l[n]=t[n])}if(e=e.defaultProps){l===t&&(l=v({},l));for(var a in e)l[a]===void 0&&(l[a]=e[a])}return l}function Mf(e){br(e)}function zf(e){console.error(e)}function Rf(e){br(e)}function Vr(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(n){setTimeout(function(){throw n})}}function Of(e,t,l){try{var n=e.onCaughtError;n(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(a){setTimeout(function(){throw a})}}function lo(e,t,l){return l=wl(l),l.tag=3,l.payload={element:null},l.callback=function(){Vr(e,t)},l}function Lf(e){return e=wl(e),e.tag=3,e}function Df(e,t,l,n){var a=l.type.getDerivedStateFromError;if(typeof a=="function"){var s=n.value;e.payload=function(){return a(s)},e.callback=function(){Of(t,l,n)}}var d=l.stateNode;d!==null&&typeof d.componentDidCatch=="function"&&(e.callback=function(){Of(t,l,n),typeof a!="function"&&(Rl===null?Rl=new Set([this]):Rl.add(this));var p=n.stack;this.componentDidCatch(n.value,{componentStack:p!==null?p:""})})}function t0(e,t,l,n,a){if(l.flags|=32768,n!==null&&typeof n=="object"&&typeof n.then=="function"){if(t=l.alternate,t!==null&&Mn(t,l,a,!0),l=Et.current,l!==null){switch(l.tag){case 31:case 13:return Ut===null?ts():l.alternate===null&&qe===0&&(qe=3),l.flags&=-257,l.flags|=65536,l.lanes=a,n===Ar?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([n]):t.add(n),ko(e,n,a)),!1;case 22:return l.flags|=65536,n===Ar?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([n])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([n]):l.add(n)),ko(e,n,a)),!1}throw Error(o(435,l.tag))}return ko(e,n,a),ts(),!1}if(_e)return t=Et.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=a,n!==Si&&(e=Error(o(422),{cause:n}),ya(Rt(e,l)))):(n!==Si&&(t=Error(o(423),{cause:n}),ya(Rt(t,l))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,n=Rt(n,l),a=lo(e.stateNode,n,a),zi(e,a),qe!==4&&(qe=2)),!1;var s=Error(o(520),{cause:n});if(s=Rt(s,l),Da===null?Da=[s]:Da.push(s),qe!==4&&(qe=2),t===null)return!0;n=Rt(n,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=a&-a,l.lanes|=e,e=lo(l.stateNode,n,e),zi(l,e),!1;case 1:if(t=l.type,s=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(Rl===null||!Rl.has(s))))return l.flags|=65536,a&=-a,l.lanes|=a,a=Lf(a),Df(a,e,l,n),zi(l,a),!1}l=l.return}while(l!==null);return!1}var no=Error(o(461)),$e=!1;function at(e,t,l,n){t.child=e===null?Bu(t,null,l,n):nn(t,e.child,l,n)}function Uf(e,t,l,n,a){l=l.render;var s=t.ref;if("ref"in n){var d={};for(var p in n)p!=="ref"&&(d[p]=n[p])}else d=n;return Pl(t),n=Hi(e,t,l,d,s,a),p=Bi(),e!==null&&!$e?(qi(e,t,a),ol(e,t,a)):(_e&&p&&xi(t),t.flags|=1,at(e,t,n,a),t.child)}function Hf(e,t,l,n,a){if(e===null){var s=l.type;return typeof s=="function"&&!gi(s)&&s.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=s,Bf(e,t,s,n,a)):(e=jr(l.type,null,n,t,t.mode,a),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!fo(e,a)){var d=s.memoizedProps;if(l=l.compare,l=l!==null?l:ma,l(d,n)&&e.ref===t.ref)return ol(e,t,a)}return t.flags|=1,e=ll(s,n),e.ref=t.ref,e.return=t,t.child=e}function Bf(e,t,l,n,a){if(e!==null){var s=e.memoizedProps;if(ma(s,n)&&e.ref===t.ref)if($e=!1,t.pendingProps=n=s,fo(e,a))(e.flags&131072)!==0&&($e=!0);else return t.lanes=e.lanes,ol(e,t,a)}return ao(e,t,l,n,a)}function qf(e,t,l,n){var a=n.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|l:l,e!==null){for(n=t.child=e.child,a=0;n!==null;)a=a|n.lanes|n.childLanes,n=n.sibling;n=a&~s}else n=0,t.child=null;return Yf(e,t,s,l,n)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&kr(t,s!==null?s.cachePool:null),s!==null?Xu(t,s):Oi(),Vu(t);else return n=t.lanes=536870912,Yf(e,t,s!==null?s.baseLanes|l:l,l,n)}else s!==null?(kr(t,s.cachePool),Xu(t,s),Tl(),t.memoizedState=null):(e!==null&&kr(t,null),Oi(),Tl());return at(e,t,a,l),t.child}function Ta(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Yf(e,t,l,n,a){var s=ki();return s=s===null?null:{parent:Qe._currentValue,pool:s},t.memoizedState={baseLanes:l,cachePool:s},e!==null&&kr(t,null),Oi(),Vu(t),e!==null&&Mn(e,t,n,!0),t.childLanes=a,null}function Gr(e,t){return t=Zr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Xf(e,t,l){return nn(t,e.child,null,l),e=Gr(t,t.pendingProps),e.flags|=2,wt(t),t.memoizedState=null,e}function l0(e,t,l){var n=t.pendingProps,a=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(_e){if(n.mode==="hidden")return e=Gr(t,n),t.lanes=536870912,Ta(null,e);if(Di(t),(e=De)?(e=eh(e,Dt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},l=ju(e),l.return=t,t.child=l,lt=t,De=null)):e=null,e===null)throw Cl(t);return t.lanes=536870912,null}return Gr(t,n)}var s=e.memoizedState;if(s!==null){var d=s.dehydrated;if(Di(t),a)if(t.flags&256)t.flags&=-257,t=Xf(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(o(558));else if($e||Mn(e,t,l,!1),a=(l&e.childLanes)!==0,$e||a){if(n=Oe,n!==null&&(d=Mc(n,l),d!==0&&d!==s.retryLane))throw s.retryLane=d,Jl(e,d),gt(n,e,d),no;ts(),t=Xf(e,t,l)}else e=s.treeContext,De=Ht(d.nextSibling),lt=t,_e=!0,_l=null,Dt=!1,e!==null&&Nu(t,e),t=Gr(t,n),t.flags|=4096;return t}return e=ll(e.child,{mode:n.mode,children:n.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Qr(e,t){var l=t.ref;if(l===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(o(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function ao(e,t,l,n,a){return Pl(t),l=Hi(e,t,l,n,void 0,a),n=Bi(),e!==null&&!$e?(qi(e,t,a),ol(e,t,a)):(_e&&n&&xi(t),t.flags|=1,at(e,t,l,a),t.child)}function Vf(e,t,l,n,a,s){return Pl(t),t.updateQueue=null,l=Qu(t,n,l,a),Gu(e),n=Bi(),e!==null&&!$e?(qi(e,t,s),ol(e,t,s)):(_e&&n&&xi(t),t.flags|=1,at(e,t,l,s),t.child)}function Gf(e,t,l,n,a){if(Pl(t),t.stateNode===null){var s=Nn,d=l.contextType;typeof d=="object"&&d!==null&&(s=nt(d)),s=new l(n,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=to,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=n,s.state=t.memoizedState,s.refs={},Ai(t),d=l.contextType,s.context=typeof d=="object"&&d!==null?nt(d):Nn,s.state=t.memoizedState,d=l.getDerivedStateFromProps,typeof d=="function"&&(eo(t,l,d,n),s.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(d=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),d!==s.state&&to.enqueueReplaceState(s,s.state,null),ja(t,n,s,a),Ca(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!0}else if(e===null){s=t.stateNode;var p=t.memoizedProps,S=rn(l,p);s.props=S;var k=s.context,U=l.contextType;d=Nn,typeof U=="object"&&U!==null&&(d=nt(U));var X=l.getDerivedStateFromProps;U=typeof X=="function"||typeof s.getSnapshotBeforeUpdate=="function",p=t.pendingProps!==p,U||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(p||k!==d)&&Af(t,s,n,d),El=!1;var M=t.memoizedState;s.state=M,ja(t,n,s,a),Ca(),k=t.memoizedState,p||M!==k||El?(typeof X=="function"&&(eo(t,l,X,n),k=t.memoizedState),(S=El||Tf(t,l,S,n,M,k,d))?(U||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=n,t.memoizedState=k),s.props=n,s.state=k,s.context=d,n=S):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),n=!1)}else{s=t.stateNode,Mi(e,t),d=t.memoizedProps,U=rn(l,d),s.props=U,X=t.pendingProps,M=s.context,k=l.contextType,S=Nn,typeof k=="object"&&k!==null&&(S=nt(k)),p=l.getDerivedStateFromProps,(k=typeof p=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(d!==X||M!==S)&&Af(t,s,n,S),El=!1,M=t.memoizedState,s.state=M,ja(t,n,s,a),Ca();var L=t.memoizedState;d!==X||M!==L||El||e!==null&&e.dependencies!==null&&wr(e.dependencies)?(typeof p=="function"&&(eo(t,l,p,n),L=t.memoizedState),(U=El||Tf(t,l,U,n,M,L,S)||e!==null&&e.dependencies!==null&&wr(e.dependencies))?(k||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(n,L,S),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(n,L,S)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),t.memoizedProps=n,t.memoizedState=L),s.props=n,s.state=L,s.context=S,n=U):(typeof s.componentDidUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||d===e.memoizedProps&&M===e.memoizedState||(t.flags|=1024),n=!1)}return s=n,Qr(e,t),n=(t.flags&128)!==0,s||n?(s=t.stateNode,l=n&&typeof l.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&n?(t.child=nn(t,e.child,null,a),t.child=nn(t,null,l,a)):at(e,t,l,a),t.memoizedState=s.state,e=t.child):e=ol(e,t,a),e}function Qf(e,t,l,n){return Fl(),t.flags|=256,at(e,t,l,n),t.child}var ro={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function so(e){return{baseLanes:e,cachePool:Ru()}}function io(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=kt),e}function Zf(e,t,l){var n=t.pendingProps,a=!1,s=(t.flags&128)!==0,d;if((d=s)||(d=e!==null&&e.memoizedState===null?!1:(Ye.current&2)!==0),d&&(a=!0,t.flags&=-129),d=(t.flags&32)!==0,t.flags&=-33,e===null){if(_e){if(a?kl(t):Tl(),(e=De)?(e=eh(e,Dt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Sl!==null?{id:Qt,overflow:Zt}:null,retryLane:536870912,hydrationErrors:null},l=ju(e),l.return=t,t.child=l,lt=t,De=null)):e=null,e===null)throw Cl(t);return Go(e)?t.lanes=32:t.lanes=536870912,null}var p=n.children;return n=n.fallback,a?(Tl(),a=t.mode,p=Zr({mode:"hidden",children:p},a),n=Wl(n,a,l,null),p.return=t,n.return=t,p.sibling=n,t.child=p,n=t.child,n.memoizedState=so(l),n.childLanes=io(e,d,l),t.memoizedState=ro,Ta(null,n)):(kl(t),oo(t,p))}var S=e.memoizedState;if(S!==null&&(p=S.dehydrated,p!==null)){if(s)t.flags&256?(kl(t),t.flags&=-257,t=co(e,t,l)):t.memoizedState!==null?(Tl(),t.child=e.child,t.flags|=128,t=null):(Tl(),p=n.fallback,a=t.mode,n=Zr({mode:"visible",children:n.children},a),p=Wl(p,a,l,null),p.flags|=2,n.return=t,p.return=t,n.sibling=p,t.child=n,nn(t,e.child,null,l),n=t.child,n.memoizedState=so(l),n.childLanes=io(e,d,l),t.memoizedState=ro,t=Ta(null,n));else if(kl(t),Go(p)){if(d=p.nextSibling&&p.nextSibling.dataset,d)var k=d.dgst;d=k,n=Error(o(419)),n.stack="",n.digest=d,ya({value:n,source:null,stack:null}),t=co(e,t,l)}else if($e||Mn(e,t,l,!1),d=(l&e.childLanes)!==0,$e||d){if(d=Oe,d!==null&&(n=Mc(d,l),n!==0&&n!==S.retryLane))throw S.retryLane=n,Jl(e,n),gt(d,e,n),no;Vo(p)||ts(),t=co(e,t,l)}else Vo(p)?(t.flags|=192,t.child=e.child,t=null):(e=S.treeContext,De=Ht(p.nextSibling),lt=t,_e=!0,_l=null,Dt=!1,e!==null&&Nu(t,e),t=oo(t,n.children),t.flags|=4096);return t}return a?(Tl(),p=n.fallback,a=t.mode,S=e.child,k=S.sibling,n=ll(S,{mode:"hidden",children:n.children}),n.subtreeFlags=S.subtreeFlags&65011712,k!==null?p=ll(k,p):(p=Wl(p,a,l,null),p.flags|=2),p.return=t,n.return=t,n.sibling=p,t.child=n,Ta(null,n),n=t.child,p=e.child.memoizedState,p===null?p=so(l):(a=p.cachePool,a!==null?(S=Qe._currentValue,a=a.parent!==S?{parent:S,pool:S}:a):a=Ru(),p={baseLanes:p.baseLanes|l,cachePool:a}),n.memoizedState=p,n.childLanes=io(e,d,l),t.memoizedState=ro,Ta(e.child,n)):(kl(t),l=e.child,e=l.sibling,l=ll(l,{mode:"visible",children:n.children}),l.return=t,l.sibling=null,e!==null&&(d=t.deletions,d===null?(t.deletions=[e],t.flags|=16):d.push(e)),t.child=l,t.memoizedState=null,l)}function oo(e,t){return t=Zr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Zr(e,t){return e=jt(22,e,null,t),e.lanes=0,e}function co(e,t,l){return nn(t,e.child,null,l),e=oo(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function $f(e,t,l){e.lanes|=t;var n=e.alternate;n!==null&&(n.lanes|=t),ji(e.return,t,l)}function uo(e,t,l,n,a,s){var d=e.memoizedState;d===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:n,tail:l,tailMode:a,treeForkCount:s}:(d.isBackwards=t,d.rendering=null,d.renderingStartTime=0,d.last=n,d.tail=l,d.tailMode=a,d.treeForkCount=s)}function Kf(e,t,l){var n=t.pendingProps,a=n.revealOrder,s=n.tail;n=n.children;var d=Ye.current,p=(d&2)!==0;if(p?(d=d&1|2,t.flags|=128):d&=1,I(Ye,d),at(e,t,n,l),n=_e?ga:0,!p&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&$f(e,l,t);else if(e.tag===19)$f(e,l,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(l=t.child,a=null;l!==null;)e=l.alternate,e!==null&&Or(e)===null&&(a=l),l=l.sibling;l=a,l===null?(a=t.child,t.child=null):(a=l.sibling,l.sibling=null),uo(t,!1,a,l,s,n);break;case"backwards":case"unstable_legacy-backwards":for(l=null,a=t.child,t.child=null;a!==null;){if(e=a.alternate,e!==null&&Or(e)===null){t.child=a;break}e=a.sibling,a.sibling=l,l=a,a=e}uo(t,!0,l,null,s,n);break;case"together":uo(t,!1,null,null,void 0,n);break;default:t.memoizedState=null}return t.child}function ol(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),zl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(Mn(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(o(153));if(t.child!==null){for(e=t.child,l=ll(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=ll(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function fo(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&wr(e)))}function n0(e,t,l){switch(t.tag){case 3:We(t,t.stateNode.containerInfo),jl(t,Qe,e.memoizedState.cache),Fl();break;case 27:case 5:Wt(t);break;case 4:We(t,t.stateNode.containerInfo);break;case 10:jl(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Di(t),null;break;case 13:var n=t.memoizedState;if(n!==null)return n.dehydrated!==null?(kl(t),t.flags|=128,null):(l&t.child.childLanes)!==0?Zf(e,t,l):(kl(t),e=ol(e,t,l),e!==null?e.sibling:null);kl(t);break;case 19:var a=(e.flags&128)!==0;if(n=(l&t.childLanes)!==0,n||(Mn(e,t,l,!1),n=(l&t.childLanes)!==0),a){if(n)return Kf(e,t,l);t.flags|=128}if(a=t.memoizedState,a!==null&&(a.rendering=null,a.tail=null,a.lastEffect=null),I(Ye,Ye.current),n)break;return null;case 22:return t.lanes=0,qf(e,t,l,t.pendingProps);case 24:jl(t,Qe,e.memoizedState.cache)}return ol(e,t,l)}function Jf(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)$e=!0;else{if(!fo(e,l)&&(t.flags&128)===0)return $e=!1,n0(e,t,l);$e=(e.flags&131072)!==0}else $e=!1,_e&&(t.flags&1048576)!==0&&wu(t,ga,t.index);switch(t.lanes=0,t.tag){case 16:e:{var n=t.pendingProps;if(e=tn(t.elementType),t.type=e,typeof e=="function")gi(e)?(n=rn(e,n),t.tag=1,t=Gf(null,t,e,n,l)):(t.tag=0,t=ao(null,t,e,n,l));else{if(e!=null){var a=e.$$typeof;if(a===F){t.tag=11,t=Uf(null,t,e,n,l);break e}else if(a===q){t.tag=14,t=Hf(null,t,e,n,l);break e}}throw t=Se(e)||e,Error(o(306,t,""))}}return t;case 0:return ao(e,t,t.type,t.pendingProps,l);case 1:return n=t.type,a=rn(n,t.pendingProps),Gf(e,t,n,a,l);case 3:e:{if(We(t,t.stateNode.containerInfo),e===null)throw Error(o(387));n=t.pendingProps;var s=t.memoizedState;a=s.element,Mi(e,t),ja(t,n,null,l);var d=t.memoizedState;if(n=d.cache,jl(t,Qe,n),n!==s.cache&&Ei(t,[Qe],l,!0),Ca(),n=d.element,s.isDehydrated)if(s={element:n,isDehydrated:!1,cache:d.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Qf(e,t,n,l);break e}else if(n!==a){a=Rt(Error(o(424)),t),ya(a),t=Qf(e,t,n,l);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,De=Ht(e.firstChild),lt=t,_e=!0,_l=null,Dt=!0,l=Bu(t,null,n,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Fl(),n===a){t=ol(e,t,l);break e}at(e,t,n,l)}t=t.child}return t;case 26:return Qr(e,t),e===null?(l=sh(t.type,null,t.pendingProps,null))?t.memoizedState=l:_e||(l=t.type,e=t.pendingProps,n=os(he.current).createElement(l),n[tt]=t,n[ut]=e,rt(n,l,e),Ie(n),t.stateNode=n):t.memoizedState=sh(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Wt(t),e===null&&_e&&(n=t.stateNode=nh(t.type,t.pendingProps,he.current),lt=t,Dt=!0,a=De,Ul(t.type)?(Qo=a,De=Ht(n.firstChild)):De=a),at(e,t,t.pendingProps.children,l),Qr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&_e&&((a=n=De)&&(n=R0(n,t.type,t.pendingProps,Dt),n!==null?(t.stateNode=n,lt=t,De=Ht(n.firstChild),Dt=!1,a=!0):a=!1),a||Cl(t)),Wt(t),a=t.type,s=t.pendingProps,d=e!==null?e.memoizedProps:null,n=s.children,qo(a,s)?n=null:d!==null&&qo(a,d)&&(t.flags|=32),t.memoizedState!==null&&(a=Hi(e,t,Kp,null,null,l),Ga._currentValue=a),Qr(e,t),at(e,t,n,l),t.child;case 6:return e===null&&_e&&((e=l=De)&&(l=O0(l,t.pendingProps,Dt),l!==null?(t.stateNode=l,lt=t,De=null,e=!0):e=!1),e||Cl(t)),null;case 13:return Zf(e,t,l);case 4:return We(t,t.stateNode.containerInfo),n=t.pendingProps,e===null?t.child=nn(t,null,n,l):at(e,t,n,l),t.child;case 11:return Uf(e,t,t.type,t.pendingProps,l);case 7:return at(e,t,t.pendingProps,l),t.child;case 8:return at(e,t,t.pendingProps.children,l),t.child;case 12:return at(e,t,t.pendingProps.children,l),t.child;case 10:return n=t.pendingProps,jl(t,t.type,n.value),at(e,t,n.children,l),t.child;case 9:return a=t.type._context,n=t.pendingProps.children,Pl(t),a=nt(a),n=n(a),t.flags|=1,at(e,t,n,l),t.child;case 14:return Hf(e,t,t.type,t.pendingProps,l);case 15:return Bf(e,t,t.type,t.pendingProps,l);case 19:return Kf(e,t,l);case 31:return l0(e,t,l);case 22:return qf(e,t,l,t.pendingProps);case 24:return Pl(t),n=nt(Qe),e===null?(a=ki(),a===null&&(a=Oe,s=wi(),a.pooledCache=s,s.refCount++,s!==null&&(a.pooledCacheLanes|=l),a=s),t.memoizedState={parent:n,cache:a},Ai(t),jl(t,Qe,a)):((e.lanes&l)!==0&&(Mi(e,t),ja(t,null,null,l),Ca()),a=e.memoizedState,s=t.memoizedState,a.parent!==n?(a={parent:n,cache:n},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),jl(t,Qe,n)):(n=s.cache,jl(t,Qe,n),n!==a.cache&&Ei(t,[Qe],l,!0))),at(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(o(156,t.tag))}function cl(e){e.flags|=4}function ho(e,t,l,n,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(_d())e.flags|=8192;else throw ln=Ar,Ti}else e.flags&=-16777217}function Wf(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!fh(t))if(_d())e.flags|=8192;else throw ln=Ar,Ti}function $r(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?kc():536870912,e.lanes|=t,Vn|=t)}function Aa(e,t){if(!_e)switch(e.tailMode){case"hidden":t=e.tail;for(var l=null;t!==null;)t.alternate!==null&&(l=t),t=t.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var n=null;l!==null;)l.alternate!==null&&(n=l),l=l.sibling;n===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:n.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,n=0;if(t)for(var a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags&65011712,n|=a.flags&65011712,a.return=e,a=a.sibling;else for(a=e.child;a!==null;)l|=a.lanes|a.childLanes,n|=a.subtreeFlags,n|=a.flags,a.return=e,a=a.sibling;return e.subtreeFlags|=n,e.childLanes=l,t}function a0(e,t,l){var n=t.pendingProps;switch(bi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Ue(t),null;case 3:return l=t.stateNode,n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),rl(Qe),Le(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(An(t)?cl(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,_i())),Ue(t),null;case 26:var a=t.type,s=t.memoizedState;return e===null?(cl(t),s!==null?(Ue(t),Wf(t,s)):(Ue(t),ho(t,a,null,n,l))):s?s!==e.memoizedState?(cl(t),Ue(t),Wf(t,s)):(Ue(t),t.flags&=-16777217):(e=e.memoizedProps,e!==n&&cl(t),Ue(t),ho(t,a,e,n,l)),null;case 27:if(hn(t),l=he.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&cl(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}e=ee.current,An(t)?ku(t):(e=nh(a,n,l),t.stateNode=e,cl(t))}return Ue(t),null;case 5:if(hn(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==n&&cl(t);else{if(!n){if(t.stateNode===null)throw Error(o(166));return Ue(t),null}if(s=ee.current,An(t))ku(t);else{var d=os(he.current);switch(s){case 1:s=d.createElementNS("http://www.w3.org/2000/svg",a);break;case 2:s=d.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;default:switch(a){case"svg":s=d.createElementNS("http://www.w3.org/2000/svg",a);break;case"math":s=d.createElementNS("http://www.w3.org/1998/Math/MathML",a);break;case"script":s=d.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof n.is=="string"?d.createElement("select",{is:n.is}):d.createElement("select"),n.multiple?s.multiple=!0:n.size&&(s.size=n.size);break;default:s=typeof n.is=="string"?d.createElement(a,{is:n.is}):d.createElement(a)}}s[tt]=t,s[ut]=n;e:for(d=t.child;d!==null;){if(d.tag===5||d.tag===6)s.appendChild(d.stateNode);else if(d.tag!==4&&d.tag!==27&&d.child!==null){d.child.return=d,d=d.child;continue}if(d===t)break e;for(;d.sibling===null;){if(d.return===null||d.return===t)break e;d=d.return}d.sibling.return=d.return,d=d.sibling}t.stateNode=s;e:switch(rt(s,a,n),a){case"button":case"input":case"select":case"textarea":n=!!n.autoFocus;break e;case"img":n=!0;break e;default:n=!1}n&&cl(t)}}return Ue(t),ho(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==n&&cl(t);else{if(typeof n!="string"&&t.stateNode===null)throw Error(o(166));if(e=he.current,An(t)){if(e=t.stateNode,l=t.memoizedProps,n=null,a=lt,a!==null)switch(a.tag){case 27:case 5:n=a.memoizedProps}e[tt]=t,e=!!(e.nodeValue===l||n!==null&&n.suppressHydrationWarning===!0||Zd(e.nodeValue,l)),e||Cl(t,!0)}else e=os(e).createTextNode(n),e[tt]=t,t.stateNode=e}return Ue(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(n=An(t),l!==null){if(e===null){if(!n)throw Error(o(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(o(557));e[tt]=t}else Fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),e=!1}else l=_i(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(wt(t),t):(wt(t),null);if((t.flags&128)!==0)throw Error(o(558))}return Ue(t),null;case 13:if(n=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=An(t),n!==null&&n.dehydrated!==null){if(e===null){if(!a)throw Error(o(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(o(317));a[tt]=t}else Fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ue(t),a=!1}else a=_i(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(wt(t),t):(wt(t),null)}return wt(t),(t.flags&128)!==0?(t.lanes=l,t):(l=n!==null,e=e!==null&&e.memoizedState!==null,l&&(n=t.child,a=null,n.alternate!==null&&n.alternate.memoizedState!==null&&n.alternate.memoizedState.cachePool!==null&&(a=n.alternate.memoizedState.cachePool.pool),s=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),s!==a&&(n.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),$r(t,t.updateQueue),Ue(t),null);case 4:return Le(),e===null&&Lo(t.stateNode.containerInfo),Ue(t),null;case 10:return rl(t.type),Ue(t),null;case 19:if(B(Ye),n=t.memoizedState,n===null)return Ue(t),null;if(a=(t.flags&128)!==0,s=n.rendering,s===null)if(a)Aa(n,!1);else{if(qe!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Or(e),s!==null){for(t.flags|=128,Aa(n,!1),e=s.updateQueue,t.updateQueue=e,$r(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Cu(l,e),l=l.sibling;return I(Ye,Ye.current&1|2),_e&&nl(t,n.treeForkCount),t.child}e=e.sibling}n.tail!==null&&bt()>Ir&&(t.flags|=128,a=!0,Aa(n,!1),t.lanes=4194304)}else{if(!a)if(e=Or(s),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,$r(t,e),Aa(n,!0),n.tail===null&&n.tailMode==="hidden"&&!s.alternate&&!_e)return Ue(t),null}else 2*bt()-n.renderingStartTime>Ir&&l!==536870912&&(t.flags|=128,a=!0,Aa(n,!1),t.lanes=4194304);n.isBackwards?(s.sibling=t.child,t.child=s):(e=n.last,e!==null?e.sibling=s:t.child=s,n.last=s)}return n.tail!==null?(e=n.tail,n.rendering=e,n.tail=e.sibling,n.renderingStartTime=bt(),e.sibling=null,l=Ye.current,I(Ye,a?l&1|2:l&1),_e&&nl(t,n.treeForkCount),e):(Ue(t),null);case 22:case 23:return wt(t),Li(),n=t.memoizedState!==null,e!==null?e.memoizedState!==null!==n&&(t.flags|=8192):n&&(t.flags|=8192),n?(l&536870912)!==0&&(t.flags&128)===0&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),l=t.updateQueue,l!==null&&$r(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),n=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(n=t.memoizedState.cachePool.pool),n!==l&&(t.flags|=2048),e!==null&&B(en),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),rl(Qe),Ue(t),null;case 25:return null;case 30:return null}throw Error(o(156,t.tag))}function r0(e,t){switch(bi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rl(Qe),Le(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return hn(t),null;case 31:if(t.memoizedState!==null){if(wt(t),t.alternate===null)throw Error(o(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(wt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(o(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return B(Ye),null;case 4:return Le(),null;case 10:return rl(t.type),null;case 22:case 23:return wt(t),Li(),e!==null&&B(en),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return rl(Qe),null;case 25:return null;default:return null}}function Ff(e,t){switch(bi(t),t.tag){case 3:rl(Qe),Le();break;case 26:case 27:case 5:hn(t);break;case 4:Le();break;case 31:t.memoizedState!==null&&wt(t);break;case 13:wt(t);break;case 19:B(Ye);break;case 10:rl(t.type);break;case 22:case 23:wt(t),Li(),e!==null&&B(en);break;case 24:rl(Qe)}}function Ma(e,t){try{var l=t.updateQueue,n=l!==null?l.lastEffect:null;if(n!==null){var a=n.next;l=a;do{if((l.tag&e)===e){n=void 0;var s=l.create,d=l.inst;n=s(),d.destroy=n}l=l.next}while(l!==a)}}catch(p){Ae(t,t.return,p)}}function Al(e,t,l){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var s=a.next;n=s;do{if((n.tag&e)===e){var d=n.inst,p=d.destroy;if(p!==void 0){d.destroy=void 0,a=t;var S=l,k=p;try{k()}catch(U){Ae(a,S,U)}}}n=n.next}while(n!==s)}}catch(U){Ae(t,t.return,U)}}function If(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{Yu(t,l)}catch(n){Ae(e,e.return,n)}}}function Pf(e,t,l){l.props=rn(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(n){Ae(e,t,n)}}function za(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}typeof l=="function"?e.refCleanup=l(n):l.current=n}}catch(a){Ae(e,t,a)}}function $t(e,t){var l=e.ref,n=e.refCleanup;if(l!==null)if(typeof n=="function")try{n()}catch(a){Ae(e,t,a)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(a){Ae(e,t,a)}else l.current=null}function ed(e){var t=e.type,l=e.memoizedProps,n=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&n.focus();break e;case"img":l.src?n.src=l.src:l.srcSet&&(n.srcset=l.srcSet)}}catch(a){Ae(e,e.return,a)}}function mo(e,t,l){try{var n=e.stateNode;N0(n,e.type,l,t),n[ut]=t}catch(a){Ae(e,e.return,a)}}function td(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ul(e.type)||e.tag===4}function po(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&&Ul(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 go(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,t):(t=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,t.appendChild(e),l=l._reactRootContainer,l!=null||t.onclick!==null||(t.onclick=el));else if(n!==4&&(n===27&&Ul(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(go(e,t,l),e=e.sibling;e!==null;)go(e,t,l),e=e.sibling}function Kr(e,t,l){var n=e.tag;if(n===5||n===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(n!==4&&(n===27&&Ul(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Kr(e,t,l),e=e.sibling;e!==null;)Kr(e,t,l),e=e.sibling}function ld(e){var t=e.stateNode,l=e.memoizedProps;try{for(var n=e.type,a=t.attributes;a.length;)t.removeAttributeNode(a[0]);rt(t,n,l),t[tt]=e,t[ut]=l}catch(s){Ae(e,e.return,s)}}var ul=!1,Ke=!1,yo=!1,nd=typeof WeakSet=="function"?WeakSet:Set,Pe=null;function s0(e,t){if(e=e.containerInfo,Ho=ps,e=mu(e),ci(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var n=l.getSelection&&l.getSelection();if(n&&n.rangeCount!==0){l=n.anchorNode;var a=n.anchorOffset,s=n.focusNode;n=n.focusOffset;try{l.nodeType,s.nodeType}catch{l=null;break e}var d=0,p=-1,S=-1,k=0,U=0,X=e,M=null;t:for(;;){for(var L;X!==l||a!==0&&X.nodeType!==3||(p=d+a),X!==s||n!==0&&X.nodeType!==3||(S=d+n),X.nodeType===3&&(d+=X.nodeValue.length),(L=X.firstChild)!==null;)M=X,X=L;for(;;){if(X===e)break t;if(M===l&&++k===a&&(p=d),M===s&&++U===n&&(S=d),(L=X.nextSibling)!==null)break;X=M,M=X.parentNode}X=L}l=p===-1||S===-1?null:{start:p,end:S}}else l=null}l=l||{start:0,end:0}}else l=null;for(Bo={focusedElem:e,selectionRange:l},ps=!1,Pe=t;Pe!==null;)if(t=Pe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Pe=e;else for(;Pe!==null;){switch(t=Pe,s=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(l=0;l<e.length;l++)a=e[l],a.ref.impl=a.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,l=t,a=s.memoizedProps,s=s.memoizedState,n=l.stateNode;try{var le=rn(l.type,a);e=n.getSnapshotBeforeUpdate(le,s),n.__reactInternalSnapshotBeforeUpdate=e}catch(se){Ae(l,l.return,se)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)Xo(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Xo(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(o(163))}if(e=t.sibling,e!==null){e.return=t.return,Pe=e;break}Pe=t.return}}function ad(e,t,l){var n=l.flags;switch(l.tag){case 0:case 11:case 15:dl(e,l),n&4&&Ma(5,l);break;case 1:if(dl(e,l),n&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(d){Ae(l,l.return,d)}else{var a=rn(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(a,t,e.__reactInternalSnapshotBeforeUpdate)}catch(d){Ae(l,l.return,d)}}n&64&&If(l),n&512&&za(l,l.return);break;case 3:if(dl(e,l),n&64&&(e=l.updateQueue,e!==null)){if(t=null,l.child!==null)switch(l.child.tag){case 27:case 5:t=l.child.stateNode;break;case 1:t=l.child.stateNode}try{Yu(e,t)}catch(d){Ae(l,l.return,d)}}break;case 27:t===null&&n&4&&ld(l);case 26:case 5:dl(e,l),t===null&&n&4&&ed(l),n&512&&za(l,l.return);break;case 12:dl(e,l);break;case 31:dl(e,l),n&4&&id(e,l);break;case 13:dl(e,l),n&4&&od(e,l),n&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=p0.bind(null,l),L0(e,l))));break;case 22:if(n=l.memoizedState!==null||ul,!n){t=t!==null&&t.memoizedState!==null||Ke,a=ul;var s=Ke;ul=n,(Ke=t)&&!s?hl(e,l,(l.subtreeFlags&8772)!==0):dl(e,l),ul=a,Ke=s}break;case 30:break;default:dl(e,l)}}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&&Zs(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 He=null,dt=!1;function fl(e,t,l){for(l=l.child;l!==null;)sd(e,t,l),l=l.sibling}function sd(e,t,l){if(St&&typeof St.onCommitFiberUnmount=="function")try{St.onCommitFiberUnmount(la,l)}catch{}switch(l.tag){case 26:Ke||$t(l,t),fl(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Ke||$t(l,t);var n=He,a=dt;Ul(l.type)&&(He=l.stateNode,dt=!1),fl(e,t,l),Ya(l.stateNode),He=n,dt=a;break;case 5:Ke||$t(l,t);case 6:if(n=He,a=dt,He=null,fl(e,t,l),He=n,dt=a,He!==null)if(dt)try{(He.nodeType===9?He.body:He.nodeName==="HTML"?He.ownerDocument.body:He).removeChild(l.stateNode)}catch(s){Ae(l,t,s)}else try{He.removeChild(l.stateNode)}catch(s){Ae(l,t,s)}break;case 18:He!==null&&(dt?(e=He,Id(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Fn(e)):Id(He,l.stateNode));break;case 4:n=He,a=dt,He=l.stateNode.containerInfo,dt=!0,fl(e,t,l),He=n,dt=a;break;case 0:case 11:case 14:case 15:Al(2,l,t),Ke||Al(4,l,t),fl(e,t,l);break;case 1:Ke||($t(l,t),n=l.stateNode,typeof n.componentWillUnmount=="function"&&Pf(l,t,n)),fl(e,t,l);break;case 21:fl(e,t,l);break;case 22:Ke=(n=Ke)||l.memoizedState!==null,fl(e,t,l),Ke=n;break;default:fl(e,t,l)}}function id(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fn(e)}catch(l){Ae(t,t.return,l)}}}function od(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fn(e)}catch(l){Ae(t,t.return,l)}}function i0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new nd),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new nd),t;default:throw Error(o(435,e.tag))}}function Jr(e,t){var l=i0(e);t.forEach(function(n){if(!l.has(n)){l.add(n);var a=g0.bind(null,e,n);n.then(a,a)}})}function ht(e,t){var l=t.deletions;if(l!==null)for(var n=0;n<l.length;n++){var a=l[n],s=e,d=t,p=d;e:for(;p!==null;){switch(p.tag){case 27:if(Ul(p.type)){He=p.stateNode,dt=!1;break e}break;case 5:He=p.stateNode,dt=!1;break e;case 3:case 4:He=p.stateNode.containerInfo,dt=!0;break e}p=p.return}if(He===null)throw Error(o(160));sd(s,d,a),He=null,dt=!1,s=a.alternate,s!==null&&(s.return=null),a.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)cd(t,e),t=t.sibling}var Yt=null;function cd(e,t){var l=e.alternate,n=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:ht(t,e),mt(e),n&4&&(Al(3,e,e.return),Ma(3,e),Al(5,e,e.return));break;case 1:ht(t,e),mt(e),n&512&&(Ke||l===null||$t(l,l.return)),n&64&&ul&&(e=e.updateQueue,e!==null&&(n=e.callbacks,n!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?n:l.concat(n))));break;case 26:var a=Yt;if(ht(t,e),mt(e),n&512&&(Ke||l===null||$t(l,l.return)),n&4){var s=l!==null?l.memoizedState:null;if(n=e.memoizedState,l===null)if(n===null)if(e.stateNode===null){e:{n=e.type,l=e.memoizedProps,a=a.ownerDocument||a;t:switch(n){case"title":s=a.getElementsByTagName("title")[0],(!s||s[ra]||s[tt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=a.createElement(n),a.head.insertBefore(s,a.querySelector("head > title"))),rt(s,n,l),s[tt]=e,Ie(s),n=s;break e;case"link":var d=ch("link","href",a).get(n+(l.href||""));if(d){for(var p=0;p<d.length;p++)if(s=d[p],s.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&s.getAttribute("rel")===(l.rel==null?null:l.rel)&&s.getAttribute("title")===(l.title==null?null:l.title)&&s.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){d.splice(p,1);break t}}s=a.createElement(n),rt(s,n,l),a.head.appendChild(s);break;case"meta":if(d=ch("meta","content",a).get(n+(l.content||""))){for(p=0;p<d.length;p++)if(s=d[p],s.getAttribute("content")===(l.content==null?null:""+l.content)&&s.getAttribute("name")===(l.name==null?null:l.name)&&s.getAttribute("property")===(l.property==null?null:l.property)&&s.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&s.getAttribute("charset")===(l.charSet==null?null:l.charSet)){d.splice(p,1);break t}}s=a.createElement(n),rt(s,n,l),a.head.appendChild(s);break;default:throw Error(o(468,n))}s[tt]=e,Ie(s),n=s}e.stateNode=n}else uh(a,e.type,e.stateNode);else e.stateNode=oh(a,n,e.memoizedProps);else s!==n?(s===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):s.count--,n===null?uh(a,e.type,e.stateNode):oh(a,n,e.memoizedProps)):n===null&&e.stateNode!==null&&mo(e,e.memoizedProps,l.memoizedProps)}break;case 27:ht(t,e),mt(e),n&512&&(Ke||l===null||$t(l,l.return)),l!==null&&n&4&&mo(e,e.memoizedProps,l.memoizedProps);break;case 5:if(ht(t,e),mt(e),n&512&&(Ke||l===null||$t(l,l.return)),e.flags&32){a=e.stateNode;try{bn(a,"")}catch(le){Ae(e,e.return,le)}}n&4&&e.stateNode!=null&&(a=e.memoizedProps,mo(e,a,l!==null?l.memoizedProps:a)),n&1024&&(yo=!0);break;case 6:if(ht(t,e),mt(e),n&4){if(e.stateNode===null)throw Error(o(162));n=e.memoizedProps,l=e.stateNode;try{l.nodeValue=n}catch(le){Ae(e,e.return,le)}}break;case 3:if(fs=null,a=Yt,Yt=cs(t.containerInfo),ht(t,e),Yt=a,mt(e),n&4&&l!==null&&l.memoizedState.isDehydrated)try{Fn(t.containerInfo)}catch(le){Ae(e,e.return,le)}yo&&(yo=!1,ud(e));break;case 4:n=Yt,Yt=cs(e.stateNode.containerInfo),ht(t,e),mt(e),Yt=n;break;case 12:ht(t,e),mt(e);break;case 31:ht(t,e),mt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Jr(e,n)));break;case 13:ht(t,e),mt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Fr=bt()),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Jr(e,n)));break;case 22:a=e.memoizedState!==null;var S=l!==null&&l.memoizedState!==null,k=ul,U=Ke;if(ul=k||a,Ke=U||S,ht(t,e),Ke=U,ul=k,mt(e),n&8192)e:for(t=e.stateNode,t._visibility=a?t._visibility&-2:t._visibility|1,a&&(l===null||S||ul||Ke||sn(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){S=l=t;try{if(s=S.stateNode,a)d=s.style,typeof d.setProperty=="function"?d.setProperty("display","none","important"):d.display="none";else{p=S.stateNode;var X=S.memoizedProps.style,M=X!=null&&X.hasOwnProperty("display")?X.display:null;p.style.display=M==null||typeof M=="boolean"?"":(""+M).trim()}}catch(le){Ae(S,S.return,le)}}}else if(t.tag===6){if(l===null){S=t;try{S.stateNode.nodeValue=a?"":S.memoizedProps}catch(le){Ae(S,S.return,le)}}}else if(t.tag===18){if(l===null){S=t;try{var L=S.stateNode;a?Pd(L,!0):Pd(S.stateNode,!1)}catch(le){Ae(S,S.return,le)}}}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;l===t&&(l=null),t=t.return}l===t&&(l=null),t.sibling.return=t.return,t=t.sibling}n&4&&(n=e.updateQueue,n!==null&&(l=n.retryQueue,l!==null&&(n.retryQueue=null,Jr(e,l))));break;case 19:ht(t,e),mt(e),n&4&&(n=e.updateQueue,n!==null&&(e.updateQueue=null,Jr(e,n)));break;case 30:break;case 21:break;default:ht(t,e),mt(e)}}function mt(e){var t=e.flags;if(t&2){try{for(var l,n=e.return;n!==null;){if(td(n)){l=n;break}n=n.return}if(l==null)throw Error(o(160));switch(l.tag){case 27:var a=l.stateNode,s=po(e);Kr(e,s,a);break;case 5:var d=l.stateNode;l.flags&32&&(bn(d,""),l.flags&=-33);var p=po(e);Kr(e,p,d);break;case 3:case 4:var S=l.stateNode.containerInfo,k=po(e);go(e,k,S);break;default:throw Error(o(161))}}catch(U){Ae(e,e.return,U)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function ud(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;ud(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function dl(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)ad(e,t.alternate,t),t=t.sibling}function sn(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Al(4,t,t.return),sn(t);break;case 1:$t(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Pf(t,t.return,l),sn(t);break;case 27:Ya(t.stateNode);case 26:case 5:$t(t,t.return),sn(t);break;case 22:t.memoizedState===null&&sn(t);break;case 30:sn(t);break;default:sn(t)}e=e.sibling}}function hl(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var n=t.alternate,a=e,s=t,d=s.flags;switch(s.tag){case 0:case 11:case 15:hl(a,s,l),Ma(4,s);break;case 1:if(hl(a,s,l),n=s,a=n.stateNode,typeof a.componentDidMount=="function")try{a.componentDidMount()}catch(k){Ae(n,n.return,k)}if(n=s,a=n.updateQueue,a!==null){var p=n.stateNode;try{var S=a.shared.hiddenCallbacks;if(S!==null)for(a.shared.hiddenCallbacks=null,a=0;a<S.length;a++)qu(S[a],p)}catch(k){Ae(n,n.return,k)}}l&&d&64&&If(s),za(s,s.return);break;case 27:ld(s);case 26:case 5:hl(a,s,l),l&&n===null&&d&4&&ed(s),za(s,s.return);break;case 12:hl(a,s,l);break;case 31:hl(a,s,l),l&&d&4&&id(a,s);break;case 13:hl(a,s,l),l&&d&4&&od(a,s);break;case 22:s.memoizedState===null&&hl(a,s,l),za(s,s.return);break;case 30:break;default:hl(a,s,l)}t=t.sibling}}function vo(e,t){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&va(l))}function xo(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&va(e))}function Xt(e,t,l,n){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)fd(e,t,l,n),t=t.sibling}function fd(e,t,l,n){var a=t.flags;switch(t.tag){case 0:case 11:case 15:Xt(e,t,l,n),a&2048&&Ma(9,t);break;case 1:Xt(e,t,l,n);break;case 3:Xt(e,t,l,n),a&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&va(e)));break;case 12:if(a&2048){Xt(e,t,l,n),e=t.stateNode;try{var s=t.memoizedProps,d=s.id,p=s.onPostCommit;typeof p=="function"&&p(d,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(S){Ae(t,t.return,S)}}else Xt(e,t,l,n);break;case 31:Xt(e,t,l,n);break;case 13:Xt(e,t,l,n);break;case 23:break;case 22:s=t.stateNode,d=t.alternate,t.memoizedState!==null?s._visibility&2?Xt(e,t,l,n):Ra(e,t):s._visibility&2?Xt(e,t,l,n):(s._visibility|=2,qn(e,t,l,n,(t.subtreeFlags&10256)!==0||!1)),a&2048&&vo(d,t);break;case 24:Xt(e,t,l,n),a&2048&&xo(t.alternate,t);break;default:Xt(e,t,l,n)}}function qn(e,t,l,n,a){for(a=a&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,d=t,p=l,S=n,k=d.flags;switch(d.tag){case 0:case 11:case 15:qn(s,d,p,S,a),Ma(8,d);break;case 23:break;case 22:var U=d.stateNode;d.memoizedState!==null?U._visibility&2?qn(s,d,p,S,a):Ra(s,d):(U._visibility|=2,qn(s,d,p,S,a)),a&&k&2048&&vo(d.alternate,d);break;case 24:qn(s,d,p,S,a),a&&k&2048&&xo(d.alternate,d);break;default:qn(s,d,p,S,a)}t=t.sibling}}function Ra(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,n=t,a=n.flags;switch(n.tag){case 22:Ra(l,n),a&2048&&vo(n.alternate,n);break;case 24:Ra(l,n),a&2048&&xo(n.alternate,n);break;default:Ra(l,n)}t=t.sibling}}var Oa=8192;function Yn(e,t,l){if(e.subtreeFlags&Oa)for(e=e.child;e!==null;)dd(e,t,l),e=e.sibling}function dd(e,t,l){switch(e.tag){case 26:Yn(e,t,l),e.flags&Oa&&e.memoizedState!==null&&$0(l,Yt,e.memoizedState,e.memoizedProps);break;case 5:Yn(e,t,l);break;case 3:case 4:var n=Yt;Yt=cs(e.stateNode.containerInfo),Yn(e,t,l),Yt=n;break;case 22:e.memoizedState===null&&(n=e.alternate,n!==null&&n.memoizedState!==null?(n=Oa,Oa=16777216,Yn(e,t,l),Oa=n):Yn(e,t,l));break;default:Yn(e,t,l)}}function hd(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 La(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Pe=n,pd(n,e)}hd(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)md(e),e=e.sibling}function md(e){switch(e.tag){case 0:case 11:case 15:La(e),e.flags&2048&&Al(9,e,e.return);break;case 3:La(e);break;case 12:La(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Wr(e)):La(e);break;default:La(e)}}function Wr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var n=t[l];Pe=n,pd(n,e)}hd(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Al(8,t,t.return),Wr(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Wr(t));break;default:Wr(t)}e=e.sibling}}function pd(e,t){for(;Pe!==null;){var l=Pe;switch(l.tag){case 0:case 11:case 15:Al(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var n=l.memoizedState.cachePool.pool;n!=null&&n.refCount++}break;case 24:va(l.memoizedState.cache)}if(n=l.child,n!==null)n.return=l,Pe=n;else e:for(l=e;Pe!==null;){n=Pe;var a=n.sibling,s=n.return;if(rd(n),n===l){Pe=null;break e}if(a!==null){a.return=s,Pe=a;break e}Pe=s}}}var o0={getCacheForType:function(e){var t=nt(Qe),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return nt(Qe).controller.signal}},c0=typeof WeakMap=="function"?WeakMap:Map,ke=0,Oe=null,ye=null,xe=0,Te=0,Nt=null,Ml=!1,Xn=!1,bo=!1,ml=0,qe=0,zl=0,on=0,So=0,kt=0,Vn=0,Da=null,pt=null,_o=!1,Fr=0,gd=0,Ir=1/0,Pr=null,Rl=null,Fe=0,Ol=null,Gn=null,pl=0,Co=0,jo=null,yd=null,Ua=0,Eo=null;function Tt(){return(ke&2)!==0&&xe!==0?xe&-xe:E.T!==null?Mo():zc()}function vd(){if(kt===0)if((xe&536870912)===0||_e){var e=ir;ir<<=1,(ir&3932160)===0&&(ir=262144),kt=e}else kt=536870912;return e=Et.current,e!==null&&(e.flags|=32),kt}function gt(e,t,l){(e===Oe&&(Te===2||Te===9)||e.cancelPendingCommit!==null)&&(Qn(e,0),Ll(e,xe,kt,!1)),aa(e,l),((ke&2)===0||e!==Oe)&&(e===Oe&&((ke&2)===0&&(on|=l),qe===4&&Ll(e,xe,kt,!1)),Kt(e))}function xd(e,t,l){if((ke&6)!==0)throw Error(o(327));var n=!l&&(t&127)===0&&(t&e.expiredLanes)===0||na(e,t),a=n?d0(e,t):No(e,t,!0),s=n;do{if(a===0){Xn&&!n&&Ll(e,t,0,!1);break}else{if(l=e.current.alternate,s&&!u0(l)){a=No(e,t,!1),s=!1;continue}if(a===2){if(s=t,e.errorRecoveryDisabledLanes&s)var d=0;else d=e.pendingLanes&-536870913,d=d!==0?d:d&536870912?536870912:0;if(d!==0){t=d;e:{var p=e;a=Da;var S=p.current.memoizedState.isDehydrated;if(S&&(Qn(p,d).flags|=256),d=No(p,d,!1),d!==2){if(bo&&!S){p.errorRecoveryDisabledLanes|=s,on|=s,a=4;break e}s=pt,pt=a,s!==null&&(pt===null?pt=s:pt.push.apply(pt,s))}a=d}if(s=!1,a!==2)continue}}if(a===1){Qn(e,0),Ll(e,t,0,!0);break}e:{switch(n=e,s=a,s){case 0:case 1:throw Error(o(345));case 4:if((t&4194048)!==t)break;case 6:Ll(n,t,kt,!Ml);break e;case 2:pt=null;break;case 3:case 5:break;default:throw Error(o(329))}if((t&62914560)===t&&(a=Fr+300-bt(),10<a)){if(Ll(n,t,kt,!Ml),cr(n,0,!0)!==0)break e;pl=t,n.timeoutHandle=Wd(bd.bind(null,n,l,pt,Pr,_o,t,kt,on,Vn,Ml,s,"Throttled",-0,0),a);break e}bd(n,l,pt,Pr,_o,t,kt,on,Vn,Ml,s,null,-0,0)}}break}while(!0);Kt(e)}function bd(e,t,l,n,a,s,d,p,S,k,U,X,M,L){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:el},dd(t,s,X);var le=(s&62914560)===s?Fr-bt():(s&4194048)===s?gd-bt():0;if(le=K0(X,le),le!==null){pl=s,e.cancelPendingCommit=le(kd.bind(null,e,t,s,l,n,a,d,p,S,U,X,null,M,L)),Ll(e,s,d,!k);return}}kd(e,t,s,l,n,a,d,p,S)}function u0(e){for(var t=e;;){var l=t.tag;if((l===0||l===11||l===15)&&t.flags&16384&&(l=t.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var n=0;n<l.length;n++){var a=l[n],s=a.getSnapshot;a=a.value;try{if(!Ct(s(),a))return!1}catch{return!1}}if(l=t.child,t.subtreeFlags&16384&&l!==null)l.return=t,t=l;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 Ll(e,t,l,n){t&=~So,t&=~on,e.suspendedLanes|=t,e.pingedLanes&=~t,n&&(e.warmLanes|=t),n=e.expirationTimes;for(var a=t;0<a;){var s=31-_t(a),d=1<<s;n[s]=-1,a&=~d}l!==0&&Tc(e,l,t)}function es(){return(ke&6)===0?(Ha(0),!1):!0}function wo(){if(ye!==null){if(Te===0)var e=ye.return;else e=ye,al=Il=null,Yi(e),Ln=null,ba=0,e=ye;for(;e!==null;)Ff(e.alternate,e),e=e.return;ye=null}}function Qn(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,A0(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),pl=0,wo(),Oe=e,ye=l=ll(e.current,null),xe=t,Te=0,Nt=null,Ml=!1,Xn=na(e,t),bo=!1,Vn=kt=So=on=zl=qe=0,pt=Da=null,_o=!1,(t&8)!==0&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var a=31-_t(n),s=1<<a;t|=e[a],n&=~s}return ml=t,Sr(),l}function Sd(e,t){fe=null,E.H=ka,t===On||t===Tr?(t=Du(),Te=3):t===Ti?(t=Du(),Te=4):Te=t===no?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Nt=t,ye===null&&(qe=1,Vr(e,Rt(t,e.current)))}function _d(){var e=Et.current;return e===null?!0:(xe&4194048)===xe?Ut===null:(xe&62914560)===xe||(xe&536870912)!==0?e===Ut:!1}function Cd(){var e=E.H;return E.H=ka,e===null?ka:e}function jd(){var e=E.A;return E.A=o0,e}function ts(){qe=4,Ml||(xe&4194048)!==xe&&Et.current!==null||(Xn=!0),(zl&134217727)===0&&(on&134217727)===0||Oe===null||Ll(Oe,xe,kt,!1)}function No(e,t,l){var n=ke;ke|=2;var a=Cd(),s=jd();(Oe!==e||xe!==t)&&(Pr=null,Qn(e,t)),t=!1;var d=qe;e:do try{if(Te!==0&&ye!==null){var p=ye,S=Nt;switch(Te){case 8:wo(),d=6;break e;case 3:case 2:case 9:case 6:Et.current===null&&(t=!0);var k=Te;if(Te=0,Nt=null,Zn(e,p,S,k),l&&Xn){d=0;break e}break;default:k=Te,Te=0,Nt=null,Zn(e,p,S,k)}}f0(),d=qe;break}catch(U){Sd(e,U)}while(!0);return t&&e.shellSuspendCounter++,al=Il=null,ke=n,E.H=a,E.A=s,ye===null&&(Oe=null,xe=0,Sr()),d}function f0(){for(;ye!==null;)Ed(ye)}function d0(e,t){var l=ke;ke|=2;var n=Cd(),a=jd();Oe!==e||xe!==t?(Pr=null,Ir=bt()+500,Qn(e,t)):Xn=na(e,t);e:do try{if(Te!==0&&ye!==null){t=ye;var s=Nt;t:switch(Te){case 1:Te=0,Nt=null,Zn(e,t,s,1);break;case 2:case 9:if(Ou(s)){Te=0,Nt=null,wd(t);break}t=function(){Te!==2&&Te!==9||Oe!==e||(Te=7),Kt(e)},s.then(t,t);break e;case 3:Te=7;break e;case 4:Te=5;break e;case 7:Ou(s)?(Te=0,Nt=null,wd(t)):(Te=0,Nt=null,Zn(e,t,s,7));break;case 5:var d=null;switch(ye.tag){case 26:d=ye.memoizedState;case 5:case 27:var p=ye;if(d?fh(d):p.stateNode.complete){Te=0,Nt=null;var S=p.sibling;if(S!==null)ye=S;else{var k=p.return;k!==null?(ye=k,ls(k)):ye=null}break t}}Te=0,Nt=null,Zn(e,t,s,5);break;case 6:Te=0,Nt=null,Zn(e,t,s,6);break;case 8:wo(),qe=6;break e;default:throw Error(o(462))}}h0();break}catch(U){Sd(e,U)}while(!0);return al=Il=null,E.H=n,E.A=a,ke=l,ye!==null?0:(Oe=null,xe=0,Sr(),qe)}function h0(){for(;ye!==null&&!Dm();)Ed(ye)}function Ed(e){var t=Jf(e.alternate,e,ml);e.memoizedProps=e.pendingProps,t===null?ls(e):ye=t}function wd(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=Vf(l,t,t.pendingProps,t.type,void 0,xe);break;case 11:t=Vf(l,t,t.pendingProps,t.type.render,t.ref,xe);break;case 5:Yi(t);default:Ff(l,t),t=ye=Cu(t,ml),t=Jf(l,t,ml)}e.memoizedProps=e.pendingProps,t===null?ls(e):ye=t}function Zn(e,t,l,n){al=Il=null,Yi(t),Ln=null,ba=0;var a=t.return;try{if(t0(e,a,t,l,xe)){qe=1,Vr(e,Rt(l,e.current)),ye=null;return}}catch(s){if(a!==null)throw ye=a,s;qe=1,Vr(e,Rt(l,e.current)),ye=null;return}t.flags&32768?(_e||n===1?e=!0:Xn||(xe&536870912)!==0?e=!1:(Ml=e=!0,(n===2||n===9||n===3||n===6)&&(n=Et.current,n!==null&&n.tag===13&&(n.flags|=16384))),Nd(t,e)):ls(t)}function ls(e){var t=e;do{if((t.flags&32768)!==0){Nd(t,Ml);return}e=t.return;var l=a0(t.alternate,t,ml);if(l!==null){ye=l;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);qe===0&&(qe=5)}function Nd(e,t){do{var l=r0(e.alternate,e);if(l!==null){l.flags&=32767,ye=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=l}while(e!==null);qe=6,ye=null}function kd(e,t,l,n,a,s,d,p,S){e.cancelPendingCommit=null;do ns();while(Fe!==0);if((ke&6)!==0)throw Error(o(327));if(t!==null){if(t===e.current)throw Error(o(177));if(s=t.lanes|t.childLanes,s|=mi,Zm(e,l,s,d,p,S),e===Oe&&(ye=Oe=null,xe=0),Gn=t,Ol=e,pl=l,Co=s,jo=a,yd=n,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,y0(rr,function(){return Rd(),null})):(e.callbackNode=null,e.callbackPriority=0),n=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||n){n=E.T,E.T=null,a=Z.p,Z.p=2,d=ke,ke|=4;try{s0(e,t,l)}finally{ke=d,Z.p=a,E.T=n}}Fe=1,Td(),Ad(),Md()}}function Td(){if(Fe===1){Fe=0;var e=Ol,t=Gn,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=E.T,E.T=null;var n=Z.p;Z.p=2;var a=ke;ke|=4;try{cd(t,e);var s=Bo,d=mu(e.containerInfo),p=s.focusedElem,S=s.selectionRange;if(d!==p&&p&&p.ownerDocument&&hu(p.ownerDocument.documentElement,p)){if(S!==null&&ci(p)){var k=S.start,U=S.end;if(U===void 0&&(U=k),"selectionStart"in p)p.selectionStart=k,p.selectionEnd=Math.min(U,p.value.length);else{var X=p.ownerDocument||document,M=X&&X.defaultView||window;if(M.getSelection){var L=M.getSelection(),le=p.textContent.length,se=Math.min(S.start,le),Re=S.end===void 0?se:Math.min(S.end,le);!L.extend&&se>Re&&(d=Re,Re=se,se=d);var w=du(p,se),j=du(p,Re);if(w&&j&&(L.rangeCount!==1||L.anchorNode!==w.node||L.anchorOffset!==w.offset||L.focusNode!==j.node||L.focusOffset!==j.offset)){var N=X.createRange();N.setStart(w.node,w.offset),L.removeAllRanges(),se>Re?(L.addRange(N),L.extend(j.node,j.offset)):(N.setEnd(j.node,j.offset),L.addRange(N))}}}}for(X=[],L=p;L=L.parentNode;)L.nodeType===1&&X.push({element:L,left:L.scrollLeft,top:L.scrollTop});for(typeof p.focus=="function"&&p.focus(),p=0;p<X.length;p++){var Y=X[p];Y.element.scrollLeft=Y.left,Y.element.scrollTop=Y.top}}ps=!!Ho,Bo=Ho=null}finally{ke=a,Z.p=n,E.T=l}}e.current=t,Fe=2}}function Ad(){if(Fe===2){Fe=0;var e=Ol,t=Gn,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=E.T,E.T=null;var n=Z.p;Z.p=2;var a=ke;ke|=4;try{ad(e,t.alternate,t)}finally{ke=a,Z.p=n,E.T=l}}Fe=3}}function Md(){if(Fe===4||Fe===3){Fe=0,Um();var e=Ol,t=Gn,l=pl,n=yd;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Fe=5:(Fe=0,Gn=Ol=null,zd(e,e.pendingLanes));var a=e.pendingLanes;if(a===0&&(Rl=null),Gs(l),t=t.stateNode,St&&typeof St.onCommitFiberRoot=="function")try{St.onCommitFiberRoot(la,t,void 0,(t.current.flags&128)===128)}catch{}if(n!==null){t=E.T,a=Z.p,Z.p=2,E.T=null;try{for(var s=e.onRecoverableError,d=0;d<n.length;d++){var p=n[d];s(p.value,{componentStack:p.stack})}}finally{E.T=t,Z.p=a}}(pl&3)!==0&&ns(),Kt(e),a=e.pendingLanes,(l&261930)!==0&&(a&42)!==0?e===Eo?Ua++:(Ua=0,Eo=e):Ua=0,Ha(0)}}function zd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,va(t)))}function ns(){return Td(),Ad(),Md(),Rd()}function Rd(){if(Fe!==5)return!1;var e=Ol,t=Co;Co=0;var l=Gs(pl),n=E.T,a=Z.p;try{Z.p=32>l?32:l,E.T=null,l=jo,jo=null;var s=Ol,d=pl;if(Fe=0,Gn=Ol=null,pl=0,(ke&6)!==0)throw Error(o(331));var p=ke;if(ke|=4,md(s.current),fd(s,s.current,d,l),ke=p,Ha(0,!1),St&&typeof St.onPostCommitFiberRoot=="function")try{St.onPostCommitFiberRoot(la,s)}catch{}return!0}finally{Z.p=a,E.T=n,zd(e,t)}}function Od(e,t,l){t=Rt(l,t),t=lo(e.stateNode,t,2),e=Nl(e,t,2),e!==null&&(aa(e,2),Kt(e))}function Ae(e,t,l){if(e.tag===3)Od(e,e,l);else for(;t!==null;){if(t.tag===3){Od(t,e,l);break}else if(t.tag===1){var n=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof n.componentDidCatch=="function"&&(Rl===null||!Rl.has(n))){e=Rt(l,e),l=Lf(2),n=Nl(t,l,2),n!==null&&(Df(l,n,t,e),aa(n,2),Kt(n));break}}t=t.return}}function ko(e,t,l){var n=e.pingCache;if(n===null){n=e.pingCache=new c0;var a=new Set;n.set(t,a)}else a=n.get(t),a===void 0&&(a=new Set,n.set(t,a));a.has(l)||(bo=!0,a.add(l),e=m0.bind(null,e,t,l),t.then(e,e))}function m0(e,t,l){var n=e.pingCache;n!==null&&n.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Oe===e&&(xe&l)===l&&(qe===4||qe===3&&(xe&62914560)===xe&&300>bt()-Fr?(ke&2)===0&&Qn(e,0):So|=l,Vn===xe&&(Vn=0)),Kt(e)}function Ld(e,t){t===0&&(t=kc()),e=Jl(e,t),e!==null&&(aa(e,t),Kt(e))}function p0(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),Ld(e,l)}function g0(e,t){var l=0;switch(e.tag){case 31:case 13:var n=e.stateNode,a=e.memoizedState;a!==null&&(l=a.retryLane);break;case 19:n=e.stateNode;break;case 22:n=e.stateNode._retryCache;break;default:throw Error(o(314))}n!==null&&n.delete(t),Ld(e,l)}function y0(e,t){return Vl(e,t)}var as=null,$n=null,To=!1,rs=!1,Ao=!1,Dl=0;function Kt(e){e!==$n&&e.next===null&&($n===null?as=$n=e:$n=$n.next=e),rs=!0,To||(To=!0,x0())}function Ha(e,t){if(!Ao&&rs){Ao=!0;do for(var l=!1,n=as;n!==null;){if(e!==0){var a=n.pendingLanes;if(a===0)var s=0;else{var d=n.suspendedLanes,p=n.pingedLanes;s=(1<<31-_t(42|e)+1)-1,s&=a&~(d&~p),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(l=!0,Bd(n,s))}else s=xe,s=cr(n,n===Oe?s:0,n.cancelPendingCommit!==null||n.timeoutHandle!==-1),(s&3)===0||na(n,s)||(l=!0,Bd(n,s));n=n.next}while(l);Ao=!1}}function v0(){Dd()}function Dd(){rs=To=!1;var e=0;Dl!==0&&T0()&&(e=Dl);for(var t=bt(),l=null,n=as;n!==null;){var a=n.next,s=Ud(n,t);s===0?(n.next=null,l===null?as=a:l.next=a,a===null&&($n=l)):(l=n,(e!==0||(s&3)!==0)&&(rs=!0)),n=a}Fe!==0&&Fe!==5||Ha(e),Dl!==0&&(Dl=0)}function Ud(e,t){for(var l=e.suspendedLanes,n=e.pingedLanes,a=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var d=31-_t(s),p=1<<d,S=a[d];S===-1?((p&l)===0||(p&n)!==0)&&(a[d]=Qm(p,t)):S<=t&&(e.expiredLanes|=p),s&=~p}if(t=Oe,l=xe,l=cr(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n=e.callbackNode,l===0||e===t&&(Te===2||Te===9)||e.cancelPendingCommit!==null)return n!==null&&n!==null&&Ys(n),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||na(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(n!==null&&Ys(n),Gs(l)){case 2:case 8:l=wc;break;case 32:l=rr;break;case 268435456:l=Nc;break;default:l=rr}return n=Hd.bind(null,e),l=Vl(l,n),e.callbackPriority=t,e.callbackNode=l,t}return n!==null&&n!==null&&Ys(n),e.callbackPriority=2,e.callbackNode=null,2}function Hd(e,t){if(Fe!==0&&Fe!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(ns()&&e.callbackNode!==l)return null;var n=xe;return n=cr(e,e===Oe?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),n===0?null:(xd(e,n,t),Ud(e,bt()),e.callbackNode!=null&&e.callbackNode===l?Hd.bind(null,e):null)}function Bd(e,t){if(ns())return null;xd(e,t,!0)}function x0(){M0(function(){(ke&6)!==0?Vl(Ec,v0):Dd()})}function Mo(){if(Dl===0){var e=zn;e===0&&(e=sr,sr<<=1,(sr&261888)===0&&(sr=256)),Dl=e}return Dl}function qd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:hr(""+e)}function Yd(e,t){var l=t.ownerDocument.createElement("input");return l.name=t.name,l.value=t.value,e.id&&l.setAttribute("form",e.id),t.parentNode.insertBefore(l,t),e=new FormData(e),l.parentNode.removeChild(l),e}function b0(e,t,l,n,a){if(t==="submit"&&l&&l.stateNode===a){var s=qd((a[ut]||null).action),d=n.submitter;d&&(t=(t=d[ut]||null)?qd(t.formAction):d.getAttribute("formAction"),t!==null&&(s=t,d=null));var p=new yr("action","action",null,n,a);e.push({event:p,listeners:[{instance:null,listener:function(){if(n.defaultPrevented){if(Dl!==0){var S=d?Yd(a,d):new FormData(a);Wi(l,{pending:!0,data:S,method:a.method,action:s},null,S)}}else typeof s=="function"&&(p.preventDefault(),S=d?Yd(a,d):new FormData(a),Wi(l,{pending:!0,data:S,method:a.method,action:s},s,S))},currentTarget:a}]})}}for(var zo=0;zo<hi.length;zo++){var Ro=hi[zo],S0=Ro.toLowerCase(),_0=Ro[0].toUpperCase()+Ro.slice(1);qt(S0,"on"+_0)}qt(yu,"onAnimationEnd"),qt(vu,"onAnimationIteration"),qt(xu,"onAnimationStart"),qt("dblclick","onDoubleClick"),qt("focusin","onFocus"),qt("focusout","onBlur"),qt(Hp,"onTransitionRun"),qt(Bp,"onTransitionStart"),qt(qp,"onTransitionCancel"),qt(bu,"onTransitionEnd"),vn("onMouseEnter",["mouseout","mouseover"]),vn("onMouseLeave",["mouseout","mouseover"]),vn("onPointerEnter",["pointerout","pointerover"]),vn("onPointerLeave",["pointerout","pointerover"]),Ql("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ql("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ql("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ql("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ql("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ql("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ba="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(" "),C0=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ba));function Xd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var n=e[l],a=n.event;n=n.listeners;e:{var s=void 0;if(t)for(var d=n.length-1;0<=d;d--){var p=n[d],S=p.instance,k=p.currentTarget;if(p=p.listener,S!==s&&a.isPropagationStopped())break e;s=p,a.currentTarget=k;try{s(a)}catch(U){br(U)}a.currentTarget=null,s=S}else for(d=0;d<n.length;d++){if(p=n[d],S=p.instance,k=p.currentTarget,p=p.listener,S!==s&&a.isPropagationStopped())break e;s=p,a.currentTarget=k;try{s(a)}catch(U){br(U)}a.currentTarget=null,s=S}}}}function ve(e,t){var l=t[Qs];l===void 0&&(l=t[Qs]=new Set);var n=e+"__bubble";l.has(n)||(Vd(t,e,2,!1),l.add(n))}function Oo(e,t,l){var n=0;t&&(n|=4),Vd(l,e,n,t)}var ss="_reactListening"+Math.random().toString(36).slice(2);function Lo(e){if(!e[ss]){e[ss]=!0,Lc.forEach(function(l){l!=="selectionchange"&&(C0.has(l)||Oo(l,!1,e),Oo(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[ss]||(t[ss]=!0,Oo("selectionchange",!1,t))}}function Vd(e,t,l,n){switch(vh(t)){case 2:var a=F0;break;case 8:a=I0;break;default:a=Wo}l=a.bind(null,t,l,e),a=void 0,!ei||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(a=!0),n?a!==void 0?e.addEventListener(t,l,{capture:!0,passive:a}):e.addEventListener(t,l,!0):a!==void 0?e.addEventListener(t,l,{passive:a}):e.addEventListener(t,l,!1)}function Do(e,t,l,n,a){var s=n;if((t&1)===0&&(t&2)===0&&n!==null)e:for(;;){if(n===null)return;var d=n.tag;if(d===3||d===4){var p=n.stateNode.containerInfo;if(p===a)break;if(d===4)for(d=n.return;d!==null;){var S=d.tag;if((S===3||S===4)&&d.stateNode.containerInfo===a)return;d=d.return}for(;p!==null;){if(d=pn(p),d===null)return;if(S=d.tag,S===5||S===6||S===26||S===27){n=s=d;continue e}p=p.parentNode}}n=n.return}$c(function(){var k=s,U=Is(l),X=[];e:{var M=Su.get(e);if(M!==void 0){var L=yr,le=e;switch(e){case"keypress":if(pr(l)===0)break e;case"keydown":case"keyup":L=gp;break;case"focusin":le="focus",L=ai;break;case"focusout":le="blur",L=ai;break;case"beforeblur":case"afterblur":L=ai;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":L=Wc;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":L=ap;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":L=xp;break;case yu:case vu:case xu:L=ip;break;case bu:L=Sp;break;case"scroll":case"scrollend":L=lp;break;case"wheel":L=Cp;break;case"copy":case"cut":case"paste":L=cp;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":L=Ic;break;case"toggle":case"beforetoggle":L=Ep}var se=(t&4)!==0,Re=!se&&(e==="scroll"||e==="scrollend"),w=se?M!==null?M+"Capture":null:M;se=[];for(var j=k,N;j!==null;){var Y=j;if(N=Y.stateNode,Y=Y.tag,Y!==5&&Y!==26&&Y!==27||N===null||w===null||(Y=ia(j,w),Y!=null&&se.push(qa(j,Y,N))),Re)break;j=j.return}0<se.length&&(M=new L(M,le,null,l,U),X.push({event:M,listeners:se}))}}if((t&7)===0){e:{if(M=e==="mouseover"||e==="pointerover",L=e==="mouseout"||e==="pointerout",M&&l!==Fs&&(le=l.relatedTarget||l.fromElement)&&(pn(le)||le[mn]))break e;if((L||M)&&(M=U.window===U?U:(M=U.ownerDocument)?M.defaultView||M.parentWindow:window,L?(le=l.relatedTarget||l.toElement,L=k,le=le?pn(le):null,le!==null&&(Re=h(le),se=le.tag,le!==Re||se!==5&&se!==27&&se!==6)&&(le=null)):(L=null,le=k),L!==le)){if(se=Wc,Y="onMouseLeave",w="onMouseEnter",j="mouse",(e==="pointerout"||e==="pointerover")&&(se=Ic,Y="onPointerLeave",w="onPointerEnter",j="pointer"),Re=L==null?M:sa(L),N=le==null?M:sa(le),M=new se(Y,j+"leave",L,l,U),M.target=Re,M.relatedTarget=N,Y=null,pn(U)===k&&(se=new se(w,j+"enter",le,l,U),se.target=N,se.relatedTarget=Re,Y=se),Re=Y,L&&le)t:{for(se=j0,w=L,j=le,N=0,Y=w;Y;Y=se(Y))N++;Y=0;for(var ae=j;ae;ae=se(ae))Y++;for(;0<N-Y;)w=se(w),N--;for(;0<Y-N;)j=se(j),Y--;for(;N--;){if(w===j||j!==null&&w===j.alternate){se=w;break t}w=se(w),j=se(j)}se=null}else se=null;L!==null&&Gd(X,M,L,se,!1),le!==null&&Re!==null&&Gd(X,Re,le,se,!0)}}e:{if(M=k?sa(k):window,L=M.nodeName&&M.nodeName.toLowerCase(),L==="select"||L==="input"&&M.type==="file")var Ee=su;else if(au(M))if(iu)Ee=Lp;else{Ee=Rp;var ne=zp}else L=M.nodeName,!L||L.toLowerCase()!=="input"||M.type!=="checkbox"&&M.type!=="radio"?k&&Ws(k.elementType)&&(Ee=su):Ee=Op;if(Ee&&(Ee=Ee(e,k))){ru(X,Ee,l,U);break e}ne&&ne(e,M,k),e==="focusout"&&k&&M.type==="number"&&k.memoizedProps.value!=null&&Js(M,"number",M.value)}switch(ne=k?sa(k):window,e){case"focusin":(au(ne)||ne.contentEditable==="true")&&(jn=ne,ui=k,pa=null);break;case"focusout":pa=ui=jn=null;break;case"mousedown":fi=!0;break;case"contextmenu":case"mouseup":case"dragend":fi=!1,pu(X,l,U);break;case"selectionchange":if(Up)break;case"keydown":case"keyup":pu(X,l,U)}var me;if(si)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 Cn?lu(e,l)&&(be="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(be="onCompositionStart");be&&(Pc&&l.locale!=="ko"&&(Cn||be!=="onCompositionStart"?be==="onCompositionEnd"&&Cn&&(me=Kc()):(bl=U,ti="value"in bl?bl.value:bl.textContent,Cn=!0)),ne=is(k,be),0<ne.length&&(be=new Fc(be,e,null,l,U),X.push({event:be,listeners:ne}),me?be.data=me:(me=nu(l),me!==null&&(be.data=me)))),(me=Np?kp(e,l):Tp(e,l))&&(be=is(k,"onBeforeInput"),0<be.length&&(ne=new Fc("onBeforeInput","beforeinput",null,l,U),X.push({event:ne,listeners:be}),ne.data=me)),b0(X,e,k,l,U)}Xd(X,t)})}function qa(e,t,l){return{instance:e,listener:t,currentTarget:l}}function is(e,t){for(var l=t+"Capture",n=[];e!==null;){var a=e,s=a.stateNode;if(a=a.tag,a!==5&&a!==26&&a!==27||s===null||(a=ia(e,l),a!=null&&n.unshift(qa(e,a,s)),a=ia(e,t),a!=null&&n.push(qa(e,a,s))),e.tag===3)return n;e=e.return}return[]}function j0(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Gd(e,t,l,n,a){for(var s=t._reactName,d=[];l!==null&&l!==n;){var p=l,S=p.alternate,k=p.stateNode;if(p=p.tag,S!==null&&S===n)break;p!==5&&p!==26&&p!==27||k===null||(S=k,a?(k=ia(l,s),k!=null&&d.unshift(qa(l,k,S))):a||(k=ia(l,s),k!=null&&d.push(qa(l,k,S)))),l=l.return}d.length!==0&&e.push({event:t,listeners:d})}var E0=/\r\n?/g,w0=/\u0000|\uFFFD/g;function Qd(e){return(typeof e=="string"?e:""+e).replace(E0,`
|
|
9
|
+
`).replace(w0,"")}function Zd(e,t){return t=Qd(t),Qd(e)===t}function ze(e,t,l,n,a,s){switch(l){case"children":typeof n=="string"?t==="body"||t==="textarea"&&n===""||bn(e,n):(typeof n=="number"||typeof n=="bigint")&&t!=="body"&&bn(e,""+n);break;case"className":fr(e,"class",n);break;case"tabIndex":fr(e,"tabindex",n);break;case"dir":case"role":case"viewBox":case"width":case"height":fr(e,l,n);break;case"style":Qc(e,n,s);break;case"data":if(t!=="object"){fr(e,"data",n);break}case"src":case"href":if(n===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(n==null||typeof n=="function"||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=hr(""+n),e.setAttribute(l,n);break;case"action":case"formAction":if(typeof n=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof s=="function"&&(l==="formAction"?(t!=="input"&&ze(e,t,"name",a.name,a,null),ze(e,t,"formEncType",a.formEncType,a,null),ze(e,t,"formMethod",a.formMethod,a,null),ze(e,t,"formTarget",a.formTarget,a,null)):(ze(e,t,"encType",a.encType,a,null),ze(e,t,"method",a.method,a,null),ze(e,t,"target",a.target,a,null)));if(n==null||typeof n=="symbol"||typeof n=="boolean"){e.removeAttribute(l);break}n=hr(""+n),e.setAttribute(l,n);break;case"onClick":n!=null&&(e.onclick=el);break;case"onScroll":n!=null&&ve("scroll",e);break;case"onScrollEnd":n!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"multiple":e.multiple=n&&typeof n!="function"&&typeof n!="symbol";break;case"muted":e.muted=n&&typeof n!="function"&&typeof n!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(n==null||typeof n=="function"||typeof n=="boolean"||typeof n=="symbol"){e.removeAttribute("xlink:href");break}l=hr(""+n),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""+n):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":n&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":n===!0?e.setAttribute(l,""):n!==!1&&n!=null&&typeof n!="function"&&typeof n!="symbol"?e.setAttribute(l,n):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":n!=null&&typeof n!="function"&&typeof n!="symbol"&&!isNaN(n)&&1<=n?e.setAttribute(l,n):e.removeAttribute(l);break;case"rowSpan":case"start":n==null||typeof n=="function"||typeof n=="symbol"||isNaN(n)?e.removeAttribute(l):e.setAttribute(l,n);break;case"popover":ve("beforetoggle",e),ve("toggle",e),ur(e,"popover",n);break;case"xlinkActuate":Pt(e,"http://www.w3.org/1999/xlink","xlink:actuate",n);break;case"xlinkArcrole":Pt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",n);break;case"xlinkRole":Pt(e,"http://www.w3.org/1999/xlink","xlink:role",n);break;case"xlinkShow":Pt(e,"http://www.w3.org/1999/xlink","xlink:show",n);break;case"xlinkTitle":Pt(e,"http://www.w3.org/1999/xlink","xlink:title",n);break;case"xlinkType":Pt(e,"http://www.w3.org/1999/xlink","xlink:type",n);break;case"xmlBase":Pt(e,"http://www.w3.org/XML/1998/namespace","xml:base",n);break;case"xmlLang":Pt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",n);break;case"xmlSpace":Pt(e,"http://www.w3.org/XML/1998/namespace","xml:space",n);break;case"is":ur(e,"is",n);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=ep.get(l)||l,ur(e,l,n))}}function Uo(e,t,l,n,a,s){switch(l){case"style":Qc(e,n,s);break;case"dangerouslySetInnerHTML":if(n!=null){if(typeof n!="object"||!("__html"in n))throw Error(o(61));if(l=n.__html,l!=null){if(a.children!=null)throw Error(o(60));e.innerHTML=l}}break;case"children":typeof n=="string"?bn(e,n):(typeof n=="number"||typeof n=="bigint")&&bn(e,""+n);break;case"onScroll":n!=null&&ve("scroll",e);break;case"onScrollEnd":n!=null&&ve("scrollend",e);break;case"onClick":n!=null&&(e.onclick=el);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dc.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(a=l.endsWith("Capture"),t=l.slice(2,a?l.length-7:void 0),s=e[ut]||null,s=s!=null?s[l]:null,typeof s=="function"&&e.removeEventListener(t,s,a),typeof n=="function")){typeof s!="function"&&s!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,n,a);break e}l in e?e[l]=n:n===!0?e.setAttribute(l,""):ur(e,l,n)}}}function rt(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var n=!1,a=!1,s;for(s in l)if(l.hasOwnProperty(s)){var d=l[s];if(d!=null)switch(s){case"src":n=!0;break;case"srcSet":a=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,s,d,l,null)}}a&&ze(e,t,"srcSet",l.srcSet,l,null),n&&ze(e,t,"src",l.src,l,null);return;case"input":ve("invalid",e);var p=s=d=a=null,S=null,k=null;for(n in l)if(l.hasOwnProperty(n)){var U=l[n];if(U!=null)switch(n){case"name":a=U;break;case"type":d=U;break;case"checked":S=U;break;case"defaultChecked":k=U;break;case"value":s=U;break;case"defaultValue":p=U;break;case"children":case"dangerouslySetInnerHTML":if(U!=null)throw Error(o(137,t));break;default:ze(e,t,n,U,l,null)}}Yc(e,s,p,S,k,d,a,!1);return;case"select":ve("invalid",e),n=d=s=null;for(a in l)if(l.hasOwnProperty(a)&&(p=l[a],p!=null))switch(a){case"value":s=p;break;case"defaultValue":d=p;break;case"multiple":n=p;default:ze(e,t,a,p,l,null)}t=s,l=d,e.multiple=!!n,t!=null?xn(e,!!n,t,!1):l!=null&&xn(e,!!n,l,!0);return;case"textarea":ve("invalid",e),s=a=n=null;for(d in l)if(l.hasOwnProperty(d)&&(p=l[d],p!=null))switch(d){case"value":n=p;break;case"defaultValue":a=p;break;case"children":s=p;break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(o(91));break;default:ze(e,t,d,p,l,null)}Vc(e,n,a,s);return;case"option":for(S in l)l.hasOwnProperty(S)&&(n=l[S],n!=null)&&(S==="selected"?e.selected=n&&typeof n!="function"&&typeof n!="symbol":ze(e,t,S,n,l,null));return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(n=0;n<Ba.length;n++)ve(Ba[n],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(k in l)if(l.hasOwnProperty(k)&&(n=l[k],n!=null))switch(k){case"children":case"dangerouslySetInnerHTML":throw Error(o(137,t));default:ze(e,t,k,n,l,null)}return;default:if(Ws(t)){for(U in l)l.hasOwnProperty(U)&&(n=l[U],n!==void 0&&Uo(e,t,U,n,l,void 0));return}}for(p in l)l.hasOwnProperty(p)&&(n=l[p],n!=null&&ze(e,t,p,n,l,null))}function N0(e,t,l,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var a=null,s=null,d=null,p=null,S=null,k=null,U=null;for(L in l){var X=l[L];if(l.hasOwnProperty(L)&&X!=null)switch(L){case"checked":break;case"value":break;case"defaultValue":S=X;default:n.hasOwnProperty(L)||ze(e,t,L,null,n,X)}}for(var M in n){var L=n[M];if(X=l[M],n.hasOwnProperty(M)&&(L!=null||X!=null))switch(M){case"type":s=L;break;case"name":a=L;break;case"checked":k=L;break;case"defaultChecked":U=L;break;case"value":d=L;break;case"defaultValue":p=L;break;case"children":case"dangerouslySetInnerHTML":if(L!=null)throw Error(o(137,t));break;default:L!==X&&ze(e,t,M,L,n,X)}}Ks(e,d,p,S,k,U,s,a);return;case"select":L=d=p=M=null;for(s in l)if(S=l[s],l.hasOwnProperty(s)&&S!=null)switch(s){case"value":break;case"multiple":L=S;default:n.hasOwnProperty(s)||ze(e,t,s,null,n,S)}for(a in n)if(s=n[a],S=l[a],n.hasOwnProperty(a)&&(s!=null||S!=null))switch(a){case"value":M=s;break;case"defaultValue":p=s;break;case"multiple":d=s;default:s!==S&&ze(e,t,a,s,n,S)}t=p,l=d,n=L,M!=null?xn(e,!!l,M,!1):!!n!=!!l&&(t!=null?xn(e,!!l,t,!0):xn(e,!!l,l?[]:"",!1));return;case"textarea":L=M=null;for(p in l)if(a=l[p],l.hasOwnProperty(p)&&a!=null&&!n.hasOwnProperty(p))switch(p){case"value":break;case"children":break;default:ze(e,t,p,null,n,a)}for(d in n)if(a=n[d],s=l[d],n.hasOwnProperty(d)&&(a!=null||s!=null))switch(d){case"value":M=a;break;case"defaultValue":L=a;break;case"children":break;case"dangerouslySetInnerHTML":if(a!=null)throw Error(o(91));break;default:a!==s&&ze(e,t,d,a,n,s)}Xc(e,M,L);return;case"option":for(var le in l)M=l[le],l.hasOwnProperty(le)&&M!=null&&!n.hasOwnProperty(le)&&(le==="selected"?e.selected=!1:ze(e,t,le,null,n,M));for(S in n)M=n[S],L=l[S],n.hasOwnProperty(S)&&M!==L&&(M!=null||L!=null)&&(S==="selected"?e.selected=M&&typeof M!="function"&&typeof M!="symbol":ze(e,t,S,M,n,L));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var se in l)M=l[se],l.hasOwnProperty(se)&&M!=null&&!n.hasOwnProperty(se)&&ze(e,t,se,null,n,M);for(k in n)if(M=n[k],L=l[k],n.hasOwnProperty(k)&&M!==L&&(M!=null||L!=null))switch(k){case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(o(137,t));break;default:ze(e,t,k,M,n,L)}return;default:if(Ws(t)){for(var Re in l)M=l[Re],l.hasOwnProperty(Re)&&M!==void 0&&!n.hasOwnProperty(Re)&&Uo(e,t,Re,void 0,n,M);for(U in n)M=n[U],L=l[U],!n.hasOwnProperty(U)||M===L||M===void 0&&L===void 0||Uo(e,t,U,M,n,L);return}}for(var w in l)M=l[w],l.hasOwnProperty(w)&&M!=null&&!n.hasOwnProperty(w)&&ze(e,t,w,null,n,M);for(X in n)M=n[X],L=l[X],!n.hasOwnProperty(X)||M===L||M==null&&L==null||ze(e,t,X,M,n,L)}function $d(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k0(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),n=0;n<l.length;n++){var a=l[n],s=a.transferSize,d=a.initiatorType,p=a.duration;if(s&&p&&$d(d)){for(d=0,p=a.responseEnd,n+=1;n<l.length;n++){var S=l[n],k=S.startTime;if(k>p)break;var U=S.transferSize,X=S.initiatorType;U&&$d(X)&&(S=S.responseEnd,d+=U*(S<p?1:(p-k)/(S-k)))}if(--n,t+=8*(s+d)/(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 Ho=null,Bo=null;function os(e){return e.nodeType===9?e:e.ownerDocument}function Kd(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 Jd(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 qo(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 Yo=null;function T0(){var e=window.event;return e&&e.type==="popstate"?e===Yo?!1:(Yo=e,!0):(Yo=null,!1)}var Wd=typeof setTimeout=="function"?setTimeout:void 0,A0=typeof clearTimeout=="function"?clearTimeout:void 0,Fd=typeof Promise=="function"?Promise:void 0,M0=typeof queueMicrotask=="function"?queueMicrotask:typeof Fd<"u"?function(e){return Fd.resolve(null).then(e).catch(z0)}:Wd;function z0(e){setTimeout(function(){throw e})}function Ul(e){return e==="head"}function Id(e,t){var l=t,n=0;do{var a=l.nextSibling;if(e.removeChild(l),a&&a.nodeType===8)if(l=a.data,l==="/$"||l==="/&"){if(n===0){e.removeChild(a),Fn(t);return}n--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")n++;else if(l==="html")Ya(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ya(l);for(var s=l.firstChild;s;){var d=s.nextSibling,p=s.nodeName;s[ra]||p==="SCRIPT"||p==="STYLE"||p==="LINK"&&s.rel.toLowerCase()==="stylesheet"||l.removeChild(s),s=d}}else l==="body"&&Ya(e.ownerDocument.body);l=a}while(l);Fn(t)}function Pd(e,t){var l=e;e=0;do{var n=l.nextSibling;if(l.nodeType===1?t?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(t?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),n&&n.nodeType===8)if(l=n.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=n}while(l)}function Xo(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var l=t;switch(t=t.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Xo(l),Zs(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function R0(e,t,l,n){for(;e.nodeType===1;){var a=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!n&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(n){if(!e[ra])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==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(s=e.getAttribute("src"),(s!==(a.src==null?null:a.src)||e.getAttribute("type")!==(a.type==null?null:a.type)||e.getAttribute("crossorigin")!==(a.crossOrigin==null?null:a.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=a.name==null?null:""+a.name;if(a.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=Ht(e.nextSibling),e===null)break}return null}function O0(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Ht(e.nextSibling),e===null))return null;return e}function eh(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Ht(e.nextSibling),e===null))return null;return e}function Vo(e){return e.data==="$?"||e.data==="$~"}function Go(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function L0(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var n=function(){t(),l.removeEventListener("DOMContentLoaded",n)};l.addEventListener("DOMContentLoaded",n),e._reactRetry=n}}function Ht(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 Qo=null;function th(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Ht(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function lh(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(t===0)return e;t--}else l!=="/$"&&l!=="/&"||t++}e=e.previousSibling}return null}function nh(e,t,l){switch(t=os(l),e){case"html":if(e=t.documentElement,!e)throw Error(o(452));return e;case"head":if(e=t.head,!e)throw Error(o(453));return e;case"body":if(e=t.body,!e)throw Error(o(454));return e;default:throw Error(o(451))}}function Ya(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Zs(e)}var Bt=new Map,ah=new Set;function cs(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var gl=Z.d;Z.d={f:D0,r:U0,D:H0,C:B0,L:q0,m:Y0,X:V0,S:X0,M:G0};function D0(){var e=gl.f(),t=es();return e||t}function U0(e){var t=gn(e);t!==null&&t.tag===5&&t.type==="form"?Sf(t):gl.r(e)}var Kn=typeof document>"u"?null:document;function rh(e,t,l){var n=Kn;if(n&&typeof t=="string"&&t){var a=Mt(t);a='link[rel="'+e+'"][href="'+a+'"]',typeof l=="string"&&(a+='[crossorigin="'+l+'"]'),ah.has(a)||(ah.add(a),e={rel:e,crossOrigin:l,href:t},n.querySelector(a)===null&&(t=n.createElement("link"),rt(t,"link",e),Ie(t),n.head.appendChild(t)))}}function H0(e){gl.D(e),rh("dns-prefetch",e,null)}function B0(e,t){gl.C(e,t),rh("preconnect",e,t)}function q0(e,t,l){gl.L(e,t,l);var n=Kn;if(n&&e&&t){var a='link[rel="preload"][as="'+Mt(t)+'"]';t==="image"&&l&&l.imageSrcSet?(a+='[imagesrcset="'+Mt(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(a+='[imagesizes="'+Mt(l.imageSizes)+'"]')):a+='[href="'+Mt(e)+'"]';var s=a;switch(t){case"style":s=Jn(e);break;case"script":s=Wn(e)}Bt.has(s)||(e=v({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),Bt.set(s,e),n.querySelector(a)!==null||t==="style"&&n.querySelector(Xa(s))||t==="script"&&n.querySelector(Va(s))||(t=n.createElement("link"),rt(t,"link",e),Ie(t),n.head.appendChild(t)))}}function Y0(e,t){gl.m(e,t);var l=Kn;if(l&&e){var n=t&&typeof t.as=="string"?t.as:"script",a='link[rel="modulepreload"][as="'+Mt(n)+'"][href="'+Mt(e)+'"]',s=a;switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=Wn(e)}if(!Bt.has(s)&&(e=v({rel:"modulepreload",href:e},t),Bt.set(s,e),l.querySelector(a)===null)){switch(n){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Va(s)))return}n=l.createElement("link"),rt(n,"link",e),Ie(n),l.head.appendChild(n)}}}function X0(e,t,l){gl.S(e,t,l);var n=Kn;if(n&&e){var a=yn(n).hoistableStyles,s=Jn(e);t=t||"default";var d=a.get(s);if(!d){var p={loading:0,preload:null};if(d=n.querySelector(Xa(s)))p.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},l),(l=Bt.get(s))&&Zo(e,l);var S=d=n.createElement("link");Ie(S),rt(S,"link",e),S._p=new Promise(function(k,U){S.onload=k,S.onerror=U}),S.addEventListener("load",function(){p.loading|=1}),S.addEventListener("error",function(){p.loading|=2}),p.loading|=4,us(d,t,n)}d={type:"stylesheet",instance:d,count:1,state:p},a.set(s,d)}}}function V0(e,t){gl.X(e,t);var l=Kn;if(l&&e){var n=yn(l).hoistableScripts,a=Wn(e),s=n.get(a);s||(s=l.querySelector(Va(a)),s||(e=v({src:e,async:!0},t),(t=Bt.get(a))&&$o(e,t),s=l.createElement("script"),Ie(s),rt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function G0(e,t){gl.M(e,t);var l=Kn;if(l&&e){var n=yn(l).hoistableScripts,a=Wn(e),s=n.get(a);s||(s=l.querySelector(Va(a)),s||(e=v({src:e,async:!0,type:"module"},t),(t=Bt.get(a))&&$o(e,t),s=l.createElement("script"),Ie(s),rt(s,"link",e),l.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},n.set(a,s))}}function sh(e,t,l,n){var a=(a=he.current)?cs(a):null;if(!a)throw Error(o(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Jn(l.href),l=yn(a).hoistableStyles,n=l.get(t),n||(n={type:"style",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Jn(l.href);var s=yn(a).hoistableStyles,d=s.get(e);if(d||(a=a.ownerDocument||a,d={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,d),(s=a.querySelector(Xa(e)))&&!s._p&&(d.instance=s,d.state.loading=5),Bt.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Bt.set(e,l),s||Q0(a,e,l,d.state))),t&&n===null)throw Error(o(528,""));return d}if(t&&n!==null)throw Error(o(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Wn(l),l=yn(a).hoistableScripts,n=l.get(t),n||(n={type:"script",instance:null,count:0,state:null},l.set(t,n)),n):{type:"void",instance:null,count:0,state:null};default:throw Error(o(444,e))}}function Jn(e){return'href="'+Mt(e)+'"'}function Xa(e){return'link[rel="stylesheet"]['+e+"]"}function ih(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Q0(e,t,l,n){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?n.loading=1:(t=e.createElement("link"),n.preload=t,t.addEventListener("load",function(){return n.loading|=1}),t.addEventListener("error",function(){return n.loading|=2}),rt(t,"link",l),Ie(t),e.head.appendChild(t))}function Wn(e){return'[src="'+Mt(e)+'"]'}function Va(e){return"script[async]"+e}function oh(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var n=e.querySelector('style[data-href~="'+Mt(l.href)+'"]');if(n)return t.instance=n,Ie(n),n;var a=v({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return n=(e.ownerDocument||e).createElement("style"),Ie(n),rt(n,"style",a),us(n,l.precedence,e),t.instance=n;case"stylesheet":a=Jn(l.href);var s=e.querySelector(Xa(a));if(s)return t.state.loading|=4,t.instance=s,Ie(s),s;n=ih(l),(a=Bt.get(a))&&Zo(n,a),s=(e.ownerDocument||e).createElement("link"),Ie(s);var d=s;return d._p=new Promise(function(p,S){d.onload=p,d.onerror=S}),rt(s,"link",n),t.state.loading|=4,us(s,l.precedence,e),t.instance=s;case"script":return s=Wn(l.src),(a=e.querySelector(Va(s)))?(t.instance=a,Ie(a),a):(n=l,(a=Bt.get(s))&&(n=v({},l),$o(n,a)),e=e.ownerDocument||e,a=e.createElement("script"),Ie(a),rt(a,"link",n),e.head.appendChild(a),t.instance=a);case"void":return null;default:throw Error(o(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(n=t.instance,t.state.loading|=4,us(n,l.precedence,e));return t.instance}function us(e,t,l){for(var n=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),a=n.length?n[n.length-1]:null,s=a,d=0;d<n.length;d++){var p=n[d];if(p.dataset.precedence===t)s=p;else if(s!==a)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function Zo(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function $o(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var fs=null;function ch(e,t,l){if(fs===null){var n=new Map,a=fs=new Map;a.set(l,n)}else a=fs,n=a.get(l),n||(n=new Map,a.set(l,n));if(n.has(e))return n;for(n.set(e,null),l=l.getElementsByTagName(e),a=0;a<l.length;a++){var s=l[a];if(!(s[ra]||s[tt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var d=s.getAttribute(t)||"";d=e+d;var p=n.get(d);p?p.push(s):n.set(d,[s])}}return n}function uh(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Z0(e,t,l){if(l===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 fh(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function $0(e,t,l,n){if(l.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var a=Jn(n.href),s=t.querySelector(Xa(a));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=ds.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=s,Ie(s);return}s=t.ownerDocument||t,n=ih(n),(a=Bt.get(a))&&Zo(n,a),s=s.createElement("link"),Ie(s);var d=s;d._p=new Promise(function(p,S){d.onload=p,d.onerror=S}),rt(s,"link",n),l.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=ds.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var Ko=0;function K0(e,t){return e.stylesheets&&e.count===0&&ms(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var n=setTimeout(function(){if(e.stylesheets&&ms(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Ko===0&&(Ko=62500*k0());var a=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ms(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Ko?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(n),clearTimeout(a)}}:null}function ds(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)ms(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var hs=null;function ms(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,hs=new Map,t.forEach(J0,e),hs=null,ds.call(e))}function J0(e,t){if(!(t.state.loading&4)){var l=hs.get(e);if(l)var n=l.get(null);else{l=new Map,hs.set(e,l);for(var a=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<a.length;s++){var d=a[s];(d.nodeName==="LINK"||d.getAttribute("media")!=="not all")&&(l.set(d.dataset.precedence,d),n=d)}n&&l.set(null,n)}a=t.instance,d=a.getAttribute("data-precedence"),s=l.get(d)||n,s===n&&l.set(null,a),l.set(d,a),this.count++,n=ds.bind(this),a.addEventListener("load",n),a.addEventListener("error",n),s?s.parentNode.insertBefore(a,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(a,e.firstChild)),t.state.loading|=4}}var Ga={$$typeof:G,Provider:null,Consumer:null,_currentValue:P,_currentValue2:P,_threadCount:0};function W0(e,t,l,n,a,s,d,p,S){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=Xs(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Xs(0),this.hiddenUpdates=Xs(null),this.identifierPrefix=n,this.onUncaughtError=a,this.onCaughtError=s,this.onRecoverableError=d,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=S,this.incompleteTransitions=new Map}function dh(e,t,l,n,a,s,d,p,S,k,U,X){return e=new W0(e,t,l,d,S,k,U,X,p),t=1,s===!0&&(t|=24),s=jt(3,null,null,t),e.current=s,s.stateNode=e,t=wi(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:n,isDehydrated:l,cache:t},Ai(s),e}function hh(e){return e?(e=Nn,e):Nn}function mh(e,t,l,n,a,s){a=hh(a),n.context===null?n.context=a:n.pendingContext=a,n=wl(t),n.payload={element:l},s=s===void 0?null:s,s!==null&&(n.callback=s),l=Nl(e,n,t),l!==null&&(gt(l,e,t),_a(l,e,t))}function ph(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function Jo(e,t){ph(e,t),(e=e.alternate)&&ph(e,t)}function gh(e){if(e.tag===13||e.tag===31){var t=Jl(e,67108864);t!==null&>(t,e,67108864),Jo(e,67108864)}}function yh(e){if(e.tag===13||e.tag===31){var t=Tt();t=Vs(t);var l=Jl(e,t);l!==null&>(l,e,t),Jo(e,t)}}var ps=!0;function F0(e,t,l,n){var a=E.T;E.T=null;var s=Z.p;try{Z.p=2,Wo(e,t,l,n)}finally{Z.p=s,E.T=a}}function I0(e,t,l,n){var a=E.T;E.T=null;var s=Z.p;try{Z.p=8,Wo(e,t,l,n)}finally{Z.p=s,E.T=a}}function Wo(e,t,l,n){if(ps){var a=Fo(n);if(a===null)Do(e,t,n,gs,l),xh(e,n);else if(eg(a,e,t,l,n))n.stopPropagation();else if(xh(e,n),t&4&&-1<P0.indexOf(e)){for(;a!==null;){var s=gn(a);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var d=Gl(s.pendingLanes);if(d!==0){var p=s;for(p.pendingLanes|=2,p.entangledLanes|=2;d;){var S=1<<31-_t(d);p.entanglements[1]|=S,d&=~S}Kt(s),(ke&6)===0&&(Ir=bt()+500,Ha(0))}}break;case 31:case 13:p=Jl(s,2),p!==null&>(p,s,2),es(),Jo(s,2)}if(s=Fo(n),s===null&&Do(e,t,n,gs,l),s===a)break;a=s}a!==null&&n.stopPropagation()}else Do(e,t,n,null,l)}}function Fo(e){return e=Is(e),Io(e)}var gs=null;function Io(e){if(gs=null,e=pn(e),e!==null){var t=h(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=m(t),e!==null)return e;e=null}else if(l===31){if(e=y(t),e!==null)return e;e=null}else if(l===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return gs=e,null}function vh(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(Hm()){case Ec:return 2;case wc:return 8;case rr:case Bm:return 32;case Nc:return 268435456;default:return 32}default:return 32}}var Po=!1,Hl=null,Bl=null,ql=null,Qa=new Map,Za=new Map,Yl=[],P0="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 xh(e,t){switch(e){case"focusin":case"focusout":Hl=null;break;case"dragenter":case"dragleave":Bl=null;break;case"mouseover":case"mouseout":ql=null;break;case"pointerover":case"pointerout":Qa.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Za.delete(t.pointerId)}}function $a(e,t,l,n,a,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:l,eventSystemFlags:n,nativeEvent:s,targetContainers:[a]},t!==null&&(t=gn(t),t!==null&&gh(t)),e):(e.eventSystemFlags|=n,t=e.targetContainers,a!==null&&t.indexOf(a)===-1&&t.push(a),e)}function eg(e,t,l,n,a){switch(t){case"focusin":return Hl=$a(Hl,e,t,l,n,a),!0;case"dragenter":return Bl=$a(Bl,e,t,l,n,a),!0;case"mouseover":return ql=$a(ql,e,t,l,n,a),!0;case"pointerover":var s=a.pointerId;return Qa.set(s,$a(Qa.get(s)||null,e,t,l,n,a)),!0;case"gotpointercapture":return s=a.pointerId,Za.set(s,$a(Za.get(s)||null,e,t,l,n,a)),!0}return!1}function bh(e){var t=pn(e.target);if(t!==null){var l=h(t);if(l!==null){if(t=l.tag,t===13){if(t=m(l),t!==null){e.blockedOn=t,Rc(e.priority,function(){yh(l)});return}}else if(t===31){if(t=y(l),t!==null){e.blockedOn=t,Rc(e.priority,function(){yh(l)});return}}else if(t===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function ys(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Fo(e.nativeEvent);if(l===null){l=e.nativeEvent;var n=new l.constructor(l.type,l);Fs=n,l.target.dispatchEvent(n),Fs=null}else return t=gn(l),t!==null&&gh(t),e.blockedOn=l,!1;t.shift()}return!0}function Sh(e,t,l){ys(e)&&l.delete(t)}function tg(){Po=!1,Hl!==null&&ys(Hl)&&(Hl=null),Bl!==null&&ys(Bl)&&(Bl=null),ql!==null&&ys(ql)&&(ql=null),Qa.forEach(Sh),Za.forEach(Sh)}function vs(e,t){e.blockedOn===t&&(e.blockedOn=null,Po||(Po=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,tg)))}var xs=null;function _h(e){xs!==e&&(xs=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){xs===e&&(xs=null);for(var t=0;t<e.length;t+=3){var l=e[t],n=e[t+1],a=e[t+2];if(typeof n!="function"){if(Io(n||l)===null)continue;break}var s=gn(l);s!==null&&(e.splice(t,3),t-=3,Wi(s,{pending:!0,data:a,method:l.method,action:n},n,a))}}))}function Fn(e){function t(S){return vs(S,e)}Hl!==null&&vs(Hl,e),Bl!==null&&vs(Bl,e),ql!==null&&vs(ql,e),Qa.forEach(t),Za.forEach(t);for(var l=0;l<Yl.length;l++){var n=Yl[l];n.blockedOn===e&&(n.blockedOn=null)}for(;0<Yl.length&&(l=Yl[0],l.blockedOn===null);)bh(l),l.blockedOn===null&&Yl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(n=0;n<l.length;n+=3){var a=l[n],s=l[n+1],d=a[ut]||null;if(typeof s=="function")d||_h(l);else if(d){var p=null;if(s&&s.hasAttribute("formAction")){if(a=s,d=s[ut]||null)p=d.formAction;else if(Io(a)!==null)continue}else p=d.action;typeof p=="function"?l[n+1]=p:(l.splice(n,3),n-=3),_h(l)}}}function Ch(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(d){return a=d})},focusReset:"manual",scroll:"manual"})}function t(){a!==null&&(a(),a=null),n||setTimeout(l,20)}function l(){if(!n&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var n=!1,a=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){n=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),a!==null&&(a(),a=null)}}}function ec(e){this._internalRoot=e}bs.prototype.render=ec.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(o(409));var l=t.current,n=Tt();mh(l,n,e,t,null,null)},bs.prototype.unmount=ec.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),es(),t[mn]=null}};function bs(e){this._internalRoot=e}bs.prototype.unstable_scheduleHydration=function(e){if(e){var t=zc();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Yl.length&&t!==0&&t<Yl[l].priority;l++);Yl.splice(l,0,e),l===0&&bh(e)}};var jh=c.version;if(jh!=="19.2.3")throw Error(o(527,jh,"19.2.3"));Z.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(o(188)):(e=Object.keys(e).join(","),Error(o(268,e)));return e=g(t),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var lg={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:E,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ss=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ss.isDisabled&&Ss.supportsFiber)try{la=Ss.inject(lg),St=Ss}catch{}}return Ja.createRoot=function(e,t){if(!u(e))throw Error(o(299));var l=!1,n="",a=Mf,s=zf,d=Rf;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(n=t.identifierPrefix),t.onUncaughtError!==void 0&&(a=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(d=t.onRecoverableError)),t=dh(e,1,!1,null,null,l,n,null,a,s,d,Ch),e[mn]=t.current,Lo(e),new ec(t)},Ja.hydrateRoot=function(e,t,l){if(!u(e))throw Error(o(299));var n=!1,a="",s=Mf,d=zf,p=Rf,S=null;return l!=null&&(l.unstable_strictMode===!0&&(n=!0),l.identifierPrefix!==void 0&&(a=l.identifierPrefix),l.onUncaughtError!==void 0&&(s=l.onUncaughtError),l.onCaughtError!==void 0&&(d=l.onCaughtError),l.onRecoverableError!==void 0&&(p=l.onRecoverableError),l.formState!==void 0&&(S=l.formState)),t=dh(e,1,!0,t,l??null,n,a,S,s,d,p,Ch),t.context=hh(null),l=t.current,n=Tt(),n=Vs(n),a=wl(n),a.callback=null,Nl(l,a,n),l=n,t.current.lanes=l,aa(t,l),Kt(t),e[mn]=t.current,Lo(e),new bs(t)},Ja.version="19.2.3",Ja}var Oh;function hg(){if(Oh)return nc.exports;Oh=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(c){console.error(c)}}return r(),nc.exports=dg(),nc.exports}var mg=hg();const Lh=r=>{let c;const i=new Set,o=(g,b)=>{const v=typeof g=="function"?g(c):g;if(!Object.is(v,c)){const A=c;c=b??(typeof v!="object"||v===null)?v:Object.assign({},c,v),i.forEach($=>$(c,A))}},u=()=>c,y={setState:o,getState:u,getInitialState:()=>x,subscribe:g=>(i.add(g),()=>i.delete(g))},x=c=r(o,u,y);return y},pg=(r=>r?Lh(r):Lh),gg=r=>r;function yg(r,c=gg){const i=_s.useSyncExternalStore(r.subscribe,_s.useCallback(()=>c(r.getState()),[r,c]),_s.useCallback(()=>c(r.getInitialState()),[r,c]));return _s.useDebugValue(i),i}const Dh=r=>{const c=pg(r),i=o=>yg(c,o);return Object.assign(i,c),i},Ia=(r=>r?Dh(r):Dh),im=Ia((r,c)=>({logs:[],isEnabled:localStorage.getItem("refchecker_debug")==="true",isVisible:!1,filter:"all",addLog:(i,o,u,h=null)=>{if(!c().isEnabled)return;const m={id:Date.now()+Math.random(),timestamp:new Date().toISOString(),level:i,component:o,message:u,data:h?JSON.stringify(h,null,2):null};r(y=>({logs:[...y.logs.slice(-499),m]}))},toggleEnabled:()=>{r(i=>{const o=!i.isEnabled;return localStorage.setItem("refchecker_debug",o.toString()),{isEnabled:o}})},toggleVisible:()=>{r(i=>({isVisible:!i.isVisible}))},setFilter:i=>{r({filter:i})},clearLogs:()=>{r({logs:[]})},getFilteredLogs:()=>{const{logs:i,filter:o}=c();return o==="all"?i:i.filter(u=>u.level.toLowerCase()===o)}})),om={DEBUG:0,INFO:1,WARN:2,ERROR:3},vg=om.DEBUG;function Cs(){return new Date().toISOString()}function js(r){return om[r]>=vg}function Es(r,c,i,o){try{im.getState().addLog(r,c,i,o)}catch{}}const D={debug(r,c,i=null){if(!js("DEBUG"))return;const o=Cs();Es("DEBUG",r,c,i),i?console.debug(`[${o}] [DEBUG] [${r}] ${c}`,i):console.debug(`[${o}] [DEBUG] [${r}] ${c}`)},info(r,c,i=null){if(!js("INFO"))return;const o=Cs();Es("INFO",r,c,i),i?console.info(`[${o}] [INFO] [${r}] ${c}`,i):console.info(`[${o}] [INFO] [${r}] ${c}`)},warn(r,c,i=null){if(!js("WARN"))return;const o=Cs();Es("WARN",r,c,i),i?console.warn(`[${o}] [WARN] [${r}] ${c}`,i):console.warn(`[${o}] [WARN] [${r}] ${c}`)},error(r,c,i=null){if(!js("ERROR"))return;const o=Cs();Es("ERROR",r,c,i),i?console.error(`[${o}] [ERROR] [${r}] ${c}`,i):console.error(`[${o}] [ERROR] [${r}] ${c}`)}};function cm(r,c){return function(){return r.apply(c,arguments)}}const{toString:xg}=Object.prototype,{getPrototypeOf:bc}=Object,{iterator:Ls,toStringTag:um}=Symbol,Ds=(r=>c=>{const i=xg.call(c);return r[i]||(r[i]=i.slice(8,-1).toLowerCase())})(Object.create(null)),Vt=r=>(r=r.toLowerCase(),c=>Ds(c)===r),Us=r=>c=>typeof c===r,{isArray:Pn}=Array,In=Us("undefined");function Pa(r){return r!==null&&!In(r)&&r.constructor!==null&&!In(r.constructor)&&yt(r.constructor.isBuffer)&&r.constructor.isBuffer(r)}const fm=Vt("ArrayBuffer");function bg(r){let c;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?c=ArrayBuffer.isView(r):c=r&&r.buffer&&fm(r.buffer),c}const Sg=Us("string"),yt=Us("function"),dm=Us("number"),er=r=>r!==null&&typeof r=="object",_g=r=>r===!0||r===!1,Ts=r=>{if(Ds(r)!=="object")return!1;const c=bc(r);return(c===null||c===Object.prototype||Object.getPrototypeOf(c)===null)&&!(um in r)&&!(Ls in r)},Cg=r=>{if(!er(r)||Pa(r))return!1;try{return Object.keys(r).length===0&&Object.getPrototypeOf(r)===Object.prototype}catch{return!1}},jg=Vt("Date"),Eg=Vt("File"),wg=Vt("Blob"),Ng=Vt("FileList"),kg=r=>er(r)&&yt(r.pipe),Tg=r=>{let c;return r&&(typeof FormData=="function"&&r instanceof FormData||yt(r.append)&&((c=Ds(r))==="formdata"||c==="object"&&yt(r.toString)&&r.toString()==="[object FormData]"))},Ag=Vt("URLSearchParams"),[Mg,zg,Rg,Og]=["ReadableStream","Request","Response","Headers"].map(Vt),Lg=r=>r.trim?r.trim():r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function tr(r,c,{allOwnKeys:i=!1}={}){if(r===null||typeof r>"u")return;let o,u;if(typeof r!="object"&&(r=[r]),Pn(r))for(o=0,u=r.length;o<u;o++)c.call(null,r[o],o,r);else{if(Pa(r))return;const h=i?Object.getOwnPropertyNames(r):Object.keys(r),m=h.length;let y;for(o=0;o<m;o++)y=h[o],c.call(null,r[y],y,r)}}function hm(r,c){if(Pa(r))return null;c=c.toLowerCase();const i=Object.keys(r);let o=i.length,u;for(;o-- >0;)if(u=i[o],c===u.toLowerCase())return u;return null}const un=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,mm=r=>!In(r)&&r!==un;function mc(){const{caseless:r,skipUndefined:c}=mm(this)&&this||{},i={},o=(u,h)=>{const m=r&&hm(i,h)||h;Ts(i[m])&&Ts(u)?i[m]=mc(i[m],u):Ts(u)?i[m]=mc({},u):Pn(u)?i[m]=u.slice():(!c||!In(u))&&(i[m]=u)};for(let u=0,h=arguments.length;u<h;u++)arguments[u]&&tr(arguments[u],o);return i}const Dg=(r,c,i,{allOwnKeys:o}={})=>(tr(c,(u,h)=>{i&&yt(u)?r[h]=cm(u,i):r[h]=u},{allOwnKeys:o}),r),Ug=r=>(r.charCodeAt(0)===65279&&(r=r.slice(1)),r),Hg=(r,c,i,o)=>{r.prototype=Object.create(c.prototype,o),r.prototype.constructor=r,Object.defineProperty(r,"super",{value:c.prototype}),i&&Object.assign(r.prototype,i)},Bg=(r,c,i,o)=>{let u,h,m;const y={};if(c=c||{},r==null)return c;do{for(u=Object.getOwnPropertyNames(r),h=u.length;h-- >0;)m=u[h],(!o||o(m,r,c))&&!y[m]&&(c[m]=r[m],y[m]=!0);r=i!==!1&&bc(r)}while(r&&(!i||i(r,c))&&r!==Object.prototype);return c},qg=(r,c,i)=>{r=String(r),(i===void 0||i>r.length)&&(i=r.length),i-=c.length;const o=r.indexOf(c,i);return o!==-1&&o===i},Yg=r=>{if(!r)return null;if(Pn(r))return r;let c=r.length;if(!dm(c))return null;const i=new Array(c);for(;c-- >0;)i[c]=r[c];return i},Xg=(r=>c=>r&&c instanceof r)(typeof Uint8Array<"u"&&bc(Uint8Array)),Vg=(r,c)=>{const o=(r&&r[Ls]).call(r);let u;for(;(u=o.next())&&!u.done;){const h=u.value;c.call(r,h[0],h[1])}},Gg=(r,c)=>{let i;const o=[];for(;(i=r.exec(c))!==null;)o.push(i);return o},Qg=Vt("HTMLFormElement"),Zg=r=>r.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(i,o,u){return o.toUpperCase()+u}),Uh=(({hasOwnProperty:r})=>(c,i)=>r.call(c,i))(Object.prototype),$g=Vt("RegExp"),pm=(r,c)=>{const i=Object.getOwnPropertyDescriptors(r),o={};tr(i,(u,h)=>{let m;(m=c(u,h,r))!==!1&&(o[h]=m||u)}),Object.defineProperties(r,o)},Kg=r=>{pm(r,(c,i)=>{if(yt(r)&&["arguments","caller","callee"].indexOf(i)!==-1)return!1;const o=r[i];if(yt(o)){if(c.enumerable=!1,"writable"in c){c.writable=!1;return}c.set||(c.set=()=>{throw Error("Can not rewrite read-only method '"+i+"'")})}})},Jg=(r,c)=>{const i={},o=u=>{u.forEach(h=>{i[h]=!0})};return Pn(r)?o(r):o(String(r).split(c)),i},Wg=()=>{},Fg=(r,c)=>r!=null&&Number.isFinite(r=+r)?r:c;function Ig(r){return!!(r&&yt(r.append)&&r[um]==="FormData"&&r[Ls])}const Pg=r=>{const c=new Array(10),i=(o,u)=>{if(er(o)){if(c.indexOf(o)>=0)return;if(Pa(o))return o;if(!("toJSON"in o)){c[u]=o;const h=Pn(o)?[]:{};return tr(o,(m,y)=>{const x=i(m,u+1);!In(x)&&(h[y]=x)}),c[u]=void 0,h}}return o};return i(r,0)},ey=Vt("AsyncFunction"),ty=r=>r&&(er(r)||yt(r))&&yt(r.then)&&yt(r.catch),gm=((r,c)=>r?setImmediate:c?((i,o)=>(un.addEventListener("message",({source:u,data:h})=>{u===un&&h===i&&o.length&&o.shift()()},!1),u=>{o.push(u),un.postMessage(i,"*")}))(`axios@${Math.random()}`,[]):i=>setTimeout(i))(typeof setImmediate=="function",yt(un.postMessage)),ly=typeof queueMicrotask<"u"?queueMicrotask.bind(un):typeof process<"u"&&process.nextTick||gm,ny=r=>r!=null&&yt(r[Ls]),O={isArray:Pn,isArrayBuffer:fm,isBuffer:Pa,isFormData:Tg,isArrayBufferView:bg,isString:Sg,isNumber:dm,isBoolean:_g,isObject:er,isPlainObject:Ts,isEmptyObject:Cg,isReadableStream:Mg,isRequest:zg,isResponse:Rg,isHeaders:Og,isUndefined:In,isDate:jg,isFile:Eg,isBlob:wg,isRegExp:$g,isFunction:yt,isStream:kg,isURLSearchParams:Ag,isTypedArray:Xg,isFileList:Ng,forEach:tr,merge:mc,extend:Dg,trim:Lg,stripBOM:Ug,inherits:Hg,toFlatObject:Bg,kindOf:Ds,kindOfTest:Vt,endsWith:qg,toArray:Yg,forEachEntry:Vg,matchAll:Gg,isHTMLForm:Qg,hasOwnProperty:Uh,hasOwnProp:Uh,reduceDescriptors:pm,freezeMethods:Kg,toObjectSet:Jg,toCamelCase:Zg,noop:Wg,toFiniteNumber:Fg,findKey:hm,global:un,isContextDefined:mm,isSpecCompliantForm:Ig,toJSONObject:Pg,isAsyncFn:ey,isThenable:ty,setImmediate:gm,asap:ly,isIterable:ny};function de(r,c,i,o,u){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=r,this.name="AxiosError",c&&(this.code=c),i&&(this.config=i),o&&(this.request=o),u&&(this.response=u,this.status=u.status?u.status:null)}O.inherits(de,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:O.toJSONObject(this.config),code:this.code,status:this.status}}});const ym=de.prototype,vm={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(r=>{vm[r]={value:r}});Object.defineProperties(de,vm);Object.defineProperty(ym,"isAxiosError",{value:!0});de.from=(r,c,i,o,u,h)=>{const m=Object.create(ym);O.toFlatObject(r,m,function(b){return b!==Error.prototype},g=>g!=="isAxiosError");const y=r&&r.message?r.message:"Error",x=c==null&&r?r.code:c;return de.call(m,y,x,i,o,u),r&&m.cause==null&&Object.defineProperty(m,"cause",{value:r,configurable:!0}),m.name=r&&r.name||"Error",h&&Object.assign(m,h),m};const ay=null;function pc(r){return O.isPlainObject(r)||O.isArray(r)}function xm(r){return O.endsWith(r,"[]")?r.slice(0,-2):r}function Hh(r,c,i){return r?r.concat(c).map(function(u,h){return u=xm(u),!i&&h?"["+u+"]":u}).join(i?".":""):c}function ry(r){return O.isArray(r)&&!r.some(pc)}const sy=O.toFlatObject(O,{},null,function(c){return/^is[A-Z]/.test(c)});function Hs(r,c,i){if(!O.isObject(r))throw new TypeError("target must be an object");c=c||new FormData,i=O.toFlatObject(i,{metaTokens:!0,dots:!1,indexes:!1},!1,function(z,R){return!O.isUndefined(R[z])});const o=i.metaTokens,u=i.visitor||b,h=i.dots,m=i.indexes,x=(i.Blob||typeof Blob<"u"&&Blob)&&O.isSpecCompliantForm(c);if(!O.isFunction(u))throw new TypeError("visitor must be a function");function g(C){if(C===null)return"";if(O.isDate(C))return C.toISOString();if(O.isBoolean(C))return C.toString();if(!x&&O.isBlob(C))throw new de("Blob is not supported. Use a Buffer instead.");return O.isArrayBuffer(C)||O.isTypedArray(C)?x&&typeof Blob=="function"?new Blob([C]):Buffer.from(C):C}function b(C,z,R){let T=C;if(C&&!R&&typeof C=="object"){if(O.endsWith(z,"{}"))z=o?z:z.slice(0,-2),C=JSON.stringify(C);else if(O.isArray(C)&&ry(C)||(O.isFileList(C)||O.endsWith(z,"[]"))&&(T=O.toArray(C)))return z=xm(z),T.forEach(function(G,F){!(O.isUndefined(G)||G===null)&&c.append(m===!0?Hh([z],F,h):m===null?z:z+"[]",g(G))}),!1}return pc(C)?!0:(c.append(Hh(R,z,h),g(C)),!1)}const v=[],A=Object.assign(sy,{defaultVisitor:b,convertValue:g,isVisitable:pc});function $(C,z){if(!O.isUndefined(C)){if(v.indexOf(C)!==-1)throw Error("Circular reference detected in "+z.join("."));v.push(C),O.forEach(C,function(T,V){(!(O.isUndefined(T)||T===null)&&u.call(c,T,O.isString(V)?V.trim():V,z,A))===!0&&$(T,z?z.concat(V):[V])}),v.pop()}}if(!O.isObject(r))throw new TypeError("data must be an object");return $(r),c}function Bh(r){const c={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(r).replace(/[!'()~]|%20|%00/g,function(o){return c[o]})}function Sc(r,c){this._pairs=[],r&&Hs(r,this,c)}const bm=Sc.prototype;bm.append=function(c,i){this._pairs.push([c,i])};bm.toString=function(c){const i=c?function(o){return c.call(this,o,Bh)}:Bh;return this._pairs.map(function(u){return i(u[0])+"="+i(u[1])},"").join("&")};function iy(r){return encodeURIComponent(r).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Sm(r,c,i){if(!c)return r;const o=i&&i.encode||iy;O.isFunction(i)&&(i={serialize:i});const u=i&&i.serialize;let h;if(u?h=u(c,i):h=O.isURLSearchParams(c)?c.toString():new Sc(c,i).toString(o),h){const m=r.indexOf("#");m!==-1&&(r=r.slice(0,m)),r+=(r.indexOf("?")===-1?"?":"&")+h}return r}class qh{constructor(){this.handlers=[]}use(c,i,o){return this.handlers.push({fulfilled:c,rejected:i,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(c){this.handlers[c]&&(this.handlers[c]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(c){O.forEach(this.handlers,function(o){o!==null&&c(o)})}}const _m={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},oy=typeof URLSearchParams<"u"?URLSearchParams:Sc,cy=typeof FormData<"u"?FormData:null,uy=typeof Blob<"u"?Blob:null,fy={isBrowser:!0,classes:{URLSearchParams:oy,FormData:cy,Blob:uy},protocols:["http","https","file","blob","url","data"]},_c=typeof window<"u"&&typeof document<"u",gc=typeof navigator=="object"&&navigator||void 0,dy=_c&&(!gc||["ReactNative","NativeScript","NS"].indexOf(gc.product)<0),hy=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",my=_c&&window.location.href||"http://localhost",py=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:_c,hasStandardBrowserEnv:dy,hasStandardBrowserWebWorkerEnv:hy,navigator:gc,origin:my},Symbol.toStringTag,{value:"Module"})),ot={...py,...fy};function gy(r,c){return Hs(r,new ot.classes.URLSearchParams,{visitor:function(i,o,u,h){return ot.isNode&&O.isBuffer(i)?(this.append(o,i.toString("base64")),!1):h.defaultVisitor.apply(this,arguments)},...c})}function yy(r){return O.matchAll(/\w+|\[(\w*)]/g,r).map(c=>c[0]==="[]"?"":c[1]||c[0])}function vy(r){const c={},i=Object.keys(r);let o;const u=i.length;let h;for(o=0;o<u;o++)h=i[o],c[h]=r[h];return c}function Cm(r){function c(i,o,u,h){let m=i[h++];if(m==="__proto__")return!0;const y=Number.isFinite(+m),x=h>=i.length;return m=!m&&O.isArray(u)?u.length:m,x?(O.hasOwnProp(u,m)?u[m]=[u[m],o]:u[m]=o,!y):((!u[m]||!O.isObject(u[m]))&&(u[m]=[]),c(i,o,u[m],h)&&O.isArray(u[m])&&(u[m]=vy(u[m])),!y)}if(O.isFormData(r)&&O.isFunction(r.entries)){const i={};return O.forEachEntry(r,(o,u)=>{c(yy(o),u,i,0)}),i}return null}function xy(r,c,i){if(O.isString(r))try{return(c||JSON.parse)(r),O.trim(r)}catch(o){if(o.name!=="SyntaxError")throw o}return(i||JSON.stringify)(r)}const lr={transitional:_m,adapter:["xhr","http","fetch"],transformRequest:[function(c,i){const o=i.getContentType()||"",u=o.indexOf("application/json")>-1,h=O.isObject(c);if(h&&O.isHTMLForm(c)&&(c=new FormData(c)),O.isFormData(c))return u?JSON.stringify(Cm(c)):c;if(O.isArrayBuffer(c)||O.isBuffer(c)||O.isStream(c)||O.isFile(c)||O.isBlob(c)||O.isReadableStream(c))return c;if(O.isArrayBufferView(c))return c.buffer;if(O.isURLSearchParams(c))return i.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),c.toString();let y;if(h){if(o.indexOf("application/x-www-form-urlencoded")>-1)return gy(c,this.formSerializer).toString();if((y=O.isFileList(c))||o.indexOf("multipart/form-data")>-1){const x=this.env&&this.env.FormData;return Hs(y?{"files[]":c}:c,x&&new x,this.formSerializer)}}return h||u?(i.setContentType("application/json",!1),xy(c)):c}],transformResponse:[function(c){const i=this.transitional||lr.transitional,o=i&&i.forcedJSONParsing,u=this.responseType==="json";if(O.isResponse(c)||O.isReadableStream(c))return c;if(c&&O.isString(c)&&(o&&!this.responseType||u)){const m=!(i&&i.silentJSONParsing)&&u;try{return JSON.parse(c,this.parseReviver)}catch(y){if(m)throw y.name==="SyntaxError"?de.from(y,de.ERR_BAD_RESPONSE,this,null,this.response):y}}return c}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:ot.classes.FormData,Blob:ot.classes.Blob},validateStatus:function(c){return c>=200&&c<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};O.forEach(["delete","get","head","post","put","patch"],r=>{lr.headers[r]={}});const by=O.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Sy=r=>{const c={};let i,o,u;return r&&r.split(`
|
|
10
|
+
`).forEach(function(m){u=m.indexOf(":"),i=m.substring(0,u).trim().toLowerCase(),o=m.substring(u+1).trim(),!(!i||c[i]&&by[i])&&(i==="set-cookie"?c[i]?c[i].push(o):c[i]=[o]:c[i]=c[i]?c[i]+", "+o:o)}),c},Yh=Symbol("internals");function Wa(r){return r&&String(r).trim().toLowerCase()}function As(r){return r===!1||r==null?r:O.isArray(r)?r.map(As):String(r)}function _y(r){const c=Object.create(null),i=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=i.exec(r);)c[o[1]]=o[2];return c}const Cy=r=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(r.trim());function ic(r,c,i,o,u){if(O.isFunction(o))return o.call(this,c,i);if(u&&(c=i),!!O.isString(c)){if(O.isString(o))return c.indexOf(o)!==-1;if(O.isRegExp(o))return o.test(c)}}function jy(r){return r.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(c,i,o)=>i.toUpperCase()+o)}function Ey(r,c){const i=O.toCamelCase(" "+c);["get","set","has"].forEach(o=>{Object.defineProperty(r,o+i,{value:function(u,h,m){return this[o].call(this,c,u,h,m)},configurable:!0})})}let vt=class{constructor(c){c&&this.set(c)}set(c,i,o){const u=this;function h(y,x,g){const b=Wa(x);if(!b)throw new Error("header name must be a non-empty string");const v=O.findKey(u,b);(!v||u[v]===void 0||g===!0||g===void 0&&u[v]!==!1)&&(u[v||x]=As(y))}const m=(y,x)=>O.forEach(y,(g,b)=>h(g,b,x));if(O.isPlainObject(c)||c instanceof this.constructor)m(c,i);else if(O.isString(c)&&(c=c.trim())&&!Cy(c))m(Sy(c),i);else if(O.isObject(c)&&O.isIterable(c)){let y={},x,g;for(const b of c){if(!O.isArray(b))throw TypeError("Object iterator must return a key-value pair");y[g=b[0]]=(x=y[g])?O.isArray(x)?[...x,b[1]]:[x,b[1]]:b[1]}m(y,i)}else c!=null&&h(i,c,o);return this}get(c,i){if(c=Wa(c),c){const o=O.findKey(this,c);if(o){const u=this[o];if(!i)return u;if(i===!0)return _y(u);if(O.isFunction(i))return i.call(this,u,o);if(O.isRegExp(i))return i.exec(u);throw new TypeError("parser must be boolean|regexp|function")}}}has(c,i){if(c=Wa(c),c){const o=O.findKey(this,c);return!!(o&&this[o]!==void 0&&(!i||ic(this,this[o],o,i)))}return!1}delete(c,i){const o=this;let u=!1;function h(m){if(m=Wa(m),m){const y=O.findKey(o,m);y&&(!i||ic(o,o[y],y,i))&&(delete o[y],u=!0)}}return O.isArray(c)?c.forEach(h):h(c),u}clear(c){const i=Object.keys(this);let o=i.length,u=!1;for(;o--;){const h=i[o];(!c||ic(this,this[h],h,c,!0))&&(delete this[h],u=!0)}return u}normalize(c){const i=this,o={};return O.forEach(this,(u,h)=>{const m=O.findKey(o,h);if(m){i[m]=As(u),delete i[h];return}const y=c?jy(h):String(h).trim();y!==h&&delete i[h],i[y]=As(u),o[y]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){const i=Object.create(null);return O.forEach(this,(o,u)=>{o!=null&&o!==!1&&(i[u]=c&&O.isArray(o)?o.join(", "):o)}),i}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,i])=>c+": "+i).join(`
|
|
11
|
+
`)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...i){const o=new this(c);return i.forEach(u=>o.set(u)),o}static accessor(c){const o=(this[Yh]=this[Yh]={accessors:{}}).accessors,u=this.prototype;function h(m){const y=Wa(m);o[y]||(Ey(u,m),o[y]=!0)}return O.isArray(c)?c.forEach(h):h(c),this}};vt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);O.reduceDescriptors(vt.prototype,({value:r},c)=>{let i=c[0].toUpperCase()+c.slice(1);return{get:()=>r,set(o){this[i]=o}}});O.freezeMethods(vt);function oc(r,c){const i=this||lr,o=c||i,u=vt.from(o.headers);let h=o.data;return O.forEach(r,function(y){h=y.call(i,h,u.normalize(),c?c.status:void 0)}),u.normalize(),h}function jm(r){return!!(r&&r.__CANCEL__)}function ea(r,c,i){de.call(this,r??"canceled",de.ERR_CANCELED,c,i),this.name="CanceledError"}O.inherits(ea,de,{__CANCEL__:!0});function Em(r,c,i){const o=i.config.validateStatus;!i.status||!o||o(i.status)?r(i):c(new de("Request failed with status code "+i.status,[de.ERR_BAD_REQUEST,de.ERR_BAD_RESPONSE][Math.floor(i.status/100)-4],i.config,i.request,i))}function wy(r){const c=/^([-+\w]{1,25})(:?\/\/|:)/.exec(r);return c&&c[1]||""}function Ny(r,c){r=r||10;const i=new Array(r),o=new Array(r);let u=0,h=0,m;return c=c!==void 0?c:1e3,function(x){const g=Date.now(),b=o[h];m||(m=g),i[u]=x,o[u]=g;let v=h,A=0;for(;v!==u;)A+=i[v++],v=v%r;if(u=(u+1)%r,u===h&&(h=(h+1)%r),g-m<c)return;const $=b&&g-b;return $?Math.round(A*1e3/$):void 0}}function ky(r,c){let i=0,o=1e3/c,u,h;const m=(g,b=Date.now())=>{i=b,u=null,h&&(clearTimeout(h),h=null),r(...g)};return[(...g)=>{const b=Date.now(),v=b-i;v>=o?m(g,b):(u=g,h||(h=setTimeout(()=>{h=null,m(u)},o-v)))},()=>u&&m(u)]}const Rs=(r,c,i=3)=>{let o=0;const u=Ny(50,250);return ky(h=>{const m=h.loaded,y=h.lengthComputable?h.total:void 0,x=m-o,g=u(x),b=m<=y;o=m;const v={loaded:m,total:y,progress:y?m/y:void 0,bytes:x,rate:g||void 0,estimated:g&&y&&b?(y-m)/g:void 0,event:h,lengthComputable:y!=null,[c?"download":"upload"]:!0};r(v)},i)},Xh=(r,c)=>{const i=r!=null;return[o=>c[0]({lengthComputable:i,total:r,loaded:o}),c[1]]},Vh=r=>(...c)=>O.asap(()=>r(...c)),Ty=ot.hasStandardBrowserEnv?((r,c)=>i=>(i=new URL(i,ot.origin),r.protocol===i.protocol&&r.host===i.host&&(c||r.port===i.port)))(new URL(ot.origin),ot.navigator&&/(msie|trident)/i.test(ot.navigator.userAgent)):()=>!0,Ay=ot.hasStandardBrowserEnv?{write(r,c,i,o,u,h,m){if(typeof document>"u")return;const y=[`${r}=${encodeURIComponent(c)}`];O.isNumber(i)&&y.push(`expires=${new Date(i).toUTCString()}`),O.isString(o)&&y.push(`path=${o}`),O.isString(u)&&y.push(`domain=${u}`),h===!0&&y.push("secure"),O.isString(m)&&y.push(`SameSite=${m}`),document.cookie=y.join("; ")},read(r){if(typeof document>"u")return null;const c=document.cookie.match(new RegExp("(?:^|; )"+r+"=([^;]*)"));return c?decodeURIComponent(c[1]):null},remove(r){this.write(r,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function My(r){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(r)}function zy(r,c){return c?r.replace(/\/?\/$/,"")+"/"+c.replace(/^\/+/,""):r}function wm(r,c,i){let o=!My(c);return r&&(o||i==!1)?zy(r,c):c}const Gh=r=>r instanceof vt?{...r}:r;function dn(r,c){c=c||{};const i={};function o(g,b,v,A){return O.isPlainObject(g)&&O.isPlainObject(b)?O.merge.call({caseless:A},g,b):O.isPlainObject(b)?O.merge({},b):O.isArray(b)?b.slice():b}function u(g,b,v,A){if(O.isUndefined(b)){if(!O.isUndefined(g))return o(void 0,g,v,A)}else return o(g,b,v,A)}function h(g,b){if(!O.isUndefined(b))return o(void 0,b)}function m(g,b){if(O.isUndefined(b)){if(!O.isUndefined(g))return o(void 0,g)}else return o(void 0,b)}function y(g,b,v){if(v in c)return o(g,b);if(v in r)return o(void 0,g)}const x={url:h,method:h,data:h,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,responseEncoding:m,validateStatus:y,headers:(g,b,v)=>u(Gh(g),Gh(b),v,!0)};return O.forEach(Object.keys({...r,...c}),function(b){const v=x[b]||u,A=v(r[b],c[b],b);O.isUndefined(A)&&v!==y||(i[b]=A)}),i}const Nm=r=>{const c=dn({},r);let{data:i,withXSRFToken:o,xsrfHeaderName:u,xsrfCookieName:h,headers:m,auth:y}=c;if(c.headers=m=vt.from(m),c.url=Sm(wm(c.baseURL,c.url,c.allowAbsoluteUrls),r.params,r.paramsSerializer),y&&m.set("Authorization","Basic "+btoa((y.username||"")+":"+(y.password?unescape(encodeURIComponent(y.password)):""))),O.isFormData(i)){if(ot.hasStandardBrowserEnv||ot.hasStandardBrowserWebWorkerEnv)m.setContentType(void 0);else if(O.isFunction(i.getHeaders)){const x=i.getHeaders(),g=["content-type","content-length"];Object.entries(x).forEach(([b,v])=>{g.includes(b.toLowerCase())&&m.set(b,v)})}}if(ot.hasStandardBrowserEnv&&(o&&O.isFunction(o)&&(o=o(c)),o||o!==!1&&Ty(c.url))){const x=u&&h&&Ay.read(h);x&&m.set(u,x)}return c},Ry=typeof XMLHttpRequest<"u",Oy=Ry&&function(r){return new Promise(function(i,o){const u=Nm(r);let h=u.data;const m=vt.from(u.headers).normalize();let{responseType:y,onUploadProgress:x,onDownloadProgress:g}=u,b,v,A,$,C;function z(){$&&$(),C&&C(),u.cancelToken&&u.cancelToken.unsubscribe(b),u.signal&&u.signal.removeEventListener("abort",b)}let R=new XMLHttpRequest;R.open(u.method.toUpperCase(),u.url,!0),R.timeout=u.timeout;function T(){if(!R)return;const G=vt.from("getAllResponseHeaders"in R&&R.getAllResponseHeaders()),Q={data:!y||y==="text"||y==="json"?R.responseText:R.response,status:R.status,statusText:R.statusText,headers:G,config:r,request:R};Em(function(q){i(q),z()},function(q){o(q),z()},Q),R=null}"onloadend"in R?R.onloadend=T:R.onreadystatechange=function(){!R||R.readyState!==4||R.status===0&&!(R.responseURL&&R.responseURL.indexOf("file:")===0)||setTimeout(T)},R.onabort=function(){R&&(o(new de("Request aborted",de.ECONNABORTED,r,R)),R=null)},R.onerror=function(F){const Q=F&&F.message?F.message:"Network Error",H=new de(Q,de.ERR_NETWORK,r,R);H.event=F||null,o(H),R=null},R.ontimeout=function(){let F=u.timeout?"timeout of "+u.timeout+"ms exceeded":"timeout exceeded";const Q=u.transitional||_m;u.timeoutErrorMessage&&(F=u.timeoutErrorMessage),o(new de(F,Q.clarifyTimeoutError?de.ETIMEDOUT:de.ECONNABORTED,r,R)),R=null},h===void 0&&m.setContentType(null),"setRequestHeader"in R&&O.forEach(m.toJSON(),function(F,Q){R.setRequestHeader(Q,F)}),O.isUndefined(u.withCredentials)||(R.withCredentials=!!u.withCredentials),y&&y!=="json"&&(R.responseType=u.responseType),g&&([A,C]=Rs(g,!0),R.addEventListener("progress",A)),x&&R.upload&&([v,$]=Rs(x),R.upload.addEventListener("progress",v),R.upload.addEventListener("loadend",$)),(u.cancelToken||u.signal)&&(b=G=>{R&&(o(!G||G.type?new ea(null,r,R):G),R.abort(),R=null)},u.cancelToken&&u.cancelToken.subscribe(b),u.signal&&(u.signal.aborted?b():u.signal.addEventListener("abort",b)));const V=wy(u.url);if(V&&ot.protocols.indexOf(V)===-1){o(new de("Unsupported protocol "+V+":",de.ERR_BAD_REQUEST,r));return}R.send(h||null)})},Ly=(r,c)=>{const{length:i}=r=r?r.filter(Boolean):[];if(c||i){let o=new AbortController,u;const h=function(g){if(!u){u=!0,y();const b=g instanceof Error?g:this.reason;o.abort(b instanceof de?b:new ea(b instanceof Error?b.message:b))}};let m=c&&setTimeout(()=>{m=null,h(new de(`timeout ${c} of ms exceeded`,de.ETIMEDOUT))},c);const y=()=>{r&&(m&&clearTimeout(m),m=null,r.forEach(g=>{g.unsubscribe?g.unsubscribe(h):g.removeEventListener("abort",h)}),r=null)};r.forEach(g=>g.addEventListener("abort",h));const{signal:x}=o;return x.unsubscribe=()=>O.asap(y),x}},Dy=function*(r,c){let i=r.byteLength;if(i<c){yield r;return}let o=0,u;for(;o<i;)u=o+c,yield r.slice(o,u),o=u},Uy=async function*(r,c){for await(const i of Hy(r))yield*Dy(i,c)},Hy=async function*(r){if(r[Symbol.asyncIterator]){yield*r;return}const c=r.getReader();try{for(;;){const{done:i,value:o}=await c.read();if(i)break;yield o}}finally{await c.cancel()}},Qh=(r,c,i,o)=>{const u=Uy(r,c);let h=0,m,y=x=>{m||(m=!0,o&&o(x))};return new ReadableStream({async pull(x){try{const{done:g,value:b}=await u.next();if(g){y(),x.close();return}let v=b.byteLength;if(i){let A=h+=v;i(A)}x.enqueue(new Uint8Array(b))}catch(g){throw y(g),g}},cancel(x){return y(x),u.return()}},{highWaterMark:2})},Zh=64*1024,{isFunction:ws}=O,By=(({Request:r,Response:c})=>({Request:r,Response:c}))(O.global),{ReadableStream:$h,TextEncoder:Kh}=O.global,Jh=(r,...c)=>{try{return!!r(...c)}catch{return!1}},qy=r=>{r=O.merge.call({skipUndefined:!0},By,r);const{fetch:c,Request:i,Response:o}=r,u=c?ws(c):typeof fetch=="function",h=ws(i),m=ws(o);if(!u)return!1;const y=u&&ws($h),x=u&&(typeof Kh=="function"?(C=>z=>C.encode(z))(new Kh):async C=>new Uint8Array(await new i(C).arrayBuffer())),g=h&&y&&Jh(()=>{let C=!1;const z=new i(ot.origin,{body:new $h,method:"POST",get duplex(){return C=!0,"half"}}).headers.has("Content-Type");return C&&!z}),b=m&&y&&Jh(()=>O.isReadableStream(new o("").body)),v={stream:b&&(C=>C.body)};u&&["text","arrayBuffer","blob","formData","stream"].forEach(C=>{!v[C]&&(v[C]=(z,R)=>{let T=z&&z[C];if(T)return T.call(z);throw new de(`Response type '${C}' is not supported`,de.ERR_NOT_SUPPORT,R)})});const A=async C=>{if(C==null)return 0;if(O.isBlob(C))return C.size;if(O.isSpecCompliantForm(C))return(await new i(ot.origin,{method:"POST",body:C}).arrayBuffer()).byteLength;if(O.isArrayBufferView(C)||O.isArrayBuffer(C))return C.byteLength;if(O.isURLSearchParams(C)&&(C=C+""),O.isString(C))return(await x(C)).byteLength},$=async(C,z)=>{const R=O.toFiniteNumber(C.getContentLength());return R??A(z)};return async C=>{let{url:z,method:R,data:T,signal:V,cancelToken:G,timeout:F,onDownloadProgress:Q,onUploadProgress:H,responseType:q,headers:J,withCredentials:te="same-origin",fetchOptions:re}=Nm(C),ie=c||fetch;q=q?(q+"").toLowerCase():"text";let ce=Ly([V,G&&G.toAbortSignal()],F),Ne=null;const Se=ce&&ce.unsubscribe&&(()=>{ce.unsubscribe()});let Ce;try{if(H&&g&&R!=="get"&&R!=="head"&&(Ce=await $(J,T))!==0){let _=new i(z,{method:"POST",body:T,duplex:"half"}),B;if(O.isFormData(T)&&(B=_.headers.get("content-type"))&&J.setContentType(B),_.body){const[I,ee]=Xh(Ce,Rs(Vh(H)));T=Qh(_.body,Zh,I,ee)}}O.isString(te)||(te=te?"include":"omit");const E=h&&"credentials"in i.prototype,Z={...re,signal:ce,method:R.toUpperCase(),headers:J.normalize().toJSON(),body:T,duplex:"half",credentials:E?te:void 0};Ne=h&&new i(z,Z);let P=await(h?ie(Ne,re):ie(z,Z));const K=b&&(q==="stream"||q==="response");if(b&&(Q||K&&Se)){const _={};["status","statusText","headers"].forEach(oe=>{_[oe]=P[oe]});const B=O.toFiniteNumber(P.headers.get("content-length")),[I,ee]=Q&&Xh(B,Rs(Vh(Q),!0))||[];P=new o(Qh(P.body,Zh,I,()=>{ee&&ee(),Se&&Se()}),_)}q=q||"text";let ge=await v[O.findKey(v,q)||"text"](P,C);return!K&&Se&&Se(),await new Promise((_,B)=>{Em(_,B,{data:ge,headers:vt.from(P.headers),status:P.status,statusText:P.statusText,config:C,request:Ne})})}catch(E){throw Se&&Se(),E&&E.name==="TypeError"&&/Load failed|fetch/i.test(E.message)?Object.assign(new de("Network Error",de.ERR_NETWORK,C,Ne),{cause:E.cause||E}):de.from(E,E&&E.code,C,Ne)}}},Yy=new Map,km=r=>{let c=r&&r.env||{};const{fetch:i,Request:o,Response:u}=c,h=[o,u,i];let m=h.length,y=m,x,g,b=Yy;for(;y--;)x=h[y],g=b.get(x),g===void 0&&b.set(x,g=y?new Map:qy(c)),b=g;return g};km();const Cc={http:ay,xhr:Oy,fetch:{get:km}};O.forEach(Cc,(r,c)=>{if(r){try{Object.defineProperty(r,"name",{value:c})}catch{}Object.defineProperty(r,"adapterName",{value:c})}});const Wh=r=>`- ${r}`,Xy=r=>O.isFunction(r)||r===null||r===!1;function Vy(r,c){r=O.isArray(r)?r:[r];const{length:i}=r;let o,u;const h={};for(let m=0;m<i;m++){o=r[m];let y;if(u=o,!Xy(o)&&(u=Cc[(y=String(o)).toLowerCase()],u===void 0))throw new de(`Unknown adapter '${y}'`);if(u&&(O.isFunction(u)||(u=u.get(c))))break;h[y||"#"+m]=u}if(!u){const m=Object.entries(h).map(([x,g])=>`adapter ${x} `+(g===!1?"is not supported by the environment":"is not available in the build"));let y=i?m.length>1?`since :
|
|
12
|
+
`+m.map(Wh).join(`
|
|
13
|
+
`):" "+Wh(m[0]):"as no adapter specified";throw new de("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return u}const Tm={getAdapter:Vy,adapters:Cc};function cc(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new ea(null,r)}function Fh(r){return cc(r),r.headers=vt.from(r.headers),r.data=oc.call(r,r.transformRequest),["post","put","patch"].indexOf(r.method)!==-1&&r.headers.setContentType("application/x-www-form-urlencoded",!1),Tm.getAdapter(r.adapter||lr.adapter,r)(r).then(function(o){return cc(r),o.data=oc.call(r,r.transformResponse,o),o.headers=vt.from(o.headers),o},function(o){return jm(o)||(cc(r),o&&o.response&&(o.response.data=oc.call(r,r.transformResponse,o.response),o.response.headers=vt.from(o.response.headers))),Promise.reject(o)})}const Am="1.13.2",Bs={};["object","boolean","number","function","string","symbol"].forEach((r,c)=>{Bs[r]=function(o){return typeof o===r||"a"+(c<1?"n ":" ")+r}});const Ih={};Bs.transitional=function(c,i,o){function u(h,m){return"[Axios v"+Am+"] Transitional option '"+h+"'"+m+(o?". "+o:"")}return(h,m,y)=>{if(c===!1)throw new de(u(m," has been removed"+(i?" in "+i:"")),de.ERR_DEPRECATED);return i&&!Ih[m]&&(Ih[m]=!0,console.warn(u(m," has been deprecated since v"+i+" and will be removed in the near future"))),c?c(h,m,y):!0}};Bs.spelling=function(c){return(i,o)=>(console.warn(`${o} is likely a misspelling of ${c}`),!0)};function Gy(r,c,i){if(typeof r!="object")throw new de("options must be an object",de.ERR_BAD_OPTION_VALUE);const o=Object.keys(r);let u=o.length;for(;u-- >0;){const h=o[u],m=c[h];if(m){const y=r[h],x=y===void 0||m(y,h,r);if(x!==!0)throw new de("option "+h+" must be "+x,de.ERR_BAD_OPTION_VALUE);continue}if(i!==!0)throw new de("Unknown option "+h,de.ERR_BAD_OPTION)}}const Ms={assertOptions:Gy,validators:Bs},Jt=Ms.validators;let fn=class{constructor(c){this.defaults=c||{},this.interceptors={request:new qh,response:new qh}}async request(c,i){try{return await this._request(c,i)}catch(o){if(o instanceof Error){let u={};Error.captureStackTrace?Error.captureStackTrace(u):u=new Error;const h=u.stack?u.stack.replace(/^.+\n/,""):"";try{o.stack?h&&!String(o.stack).endsWith(h.replace(/^.+\n.+\n/,""))&&(o.stack+=`
|
|
14
|
+
`+h):o.stack=h}catch{}}throw o}}_request(c,i){typeof c=="string"?(i=i||{},i.url=c):i=c||{},i=dn(this.defaults,i);const{transitional:o,paramsSerializer:u,headers:h}=i;o!==void 0&&Ms.assertOptions(o,{silentJSONParsing:Jt.transitional(Jt.boolean),forcedJSONParsing:Jt.transitional(Jt.boolean),clarifyTimeoutError:Jt.transitional(Jt.boolean)},!1),u!=null&&(O.isFunction(u)?i.paramsSerializer={serialize:u}:Ms.assertOptions(u,{encode:Jt.function,serialize:Jt.function},!0)),i.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?i.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:i.allowAbsoluteUrls=!0),Ms.assertOptions(i,{baseUrl:Jt.spelling("baseURL"),withXsrfToken:Jt.spelling("withXSRFToken")},!0),i.method=(i.method||this.defaults.method||"get").toLowerCase();let m=h&&O.merge(h.common,h[i.method]);h&&O.forEach(["delete","get","head","post","put","patch","common"],C=>{delete h[C]}),i.headers=vt.concat(m,h);const y=[];let x=!0;this.interceptors.request.forEach(function(z){typeof z.runWhen=="function"&&z.runWhen(i)===!1||(x=x&&z.synchronous,y.unshift(z.fulfilled,z.rejected))});const g=[];this.interceptors.response.forEach(function(z){g.push(z.fulfilled,z.rejected)});let b,v=0,A;if(!x){const C=[Fh.bind(this),void 0];for(C.unshift(...y),C.push(...g),A=C.length,b=Promise.resolve(i);v<A;)b=b.then(C[v++],C[v++]);return b}A=y.length;let $=i;for(;v<A;){const C=y[v++],z=y[v++];try{$=C($)}catch(R){z.call(this,R);break}}try{b=Fh.call(this,$)}catch(C){return Promise.reject(C)}for(v=0,A=g.length;v<A;)b=b.then(g[v++],g[v++]);return b}getUri(c){c=dn(this.defaults,c);const i=wm(c.baseURL,c.url,c.allowAbsoluteUrls);return Sm(i,c.params,c.paramsSerializer)}};O.forEach(["delete","get","head","options"],function(c){fn.prototype[c]=function(i,o){return this.request(dn(o||{},{method:c,url:i,data:(o||{}).data}))}});O.forEach(["post","put","patch"],function(c){function i(o){return function(h,m,y){return this.request(dn(y||{},{method:c,headers:o?{"Content-Type":"multipart/form-data"}:{},url:h,data:m}))}}fn.prototype[c]=i(),fn.prototype[c+"Form"]=i(!0)});let Qy=class Mm{constructor(c){if(typeof c!="function")throw new TypeError("executor must be a function.");let i;this.promise=new Promise(function(h){i=h});const o=this;this.promise.then(u=>{if(!o._listeners)return;let h=o._listeners.length;for(;h-- >0;)o._listeners[h](u);o._listeners=null}),this.promise.then=u=>{let h;const m=new Promise(y=>{o.subscribe(y),h=y}).then(u);return m.cancel=function(){o.unsubscribe(h)},m},c(function(h,m,y){o.reason||(o.reason=new ea(h,m,y),i(o.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}this._listeners?this._listeners.push(c):this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;const i=this._listeners.indexOf(c);i!==-1&&this._listeners.splice(i,1)}toAbortSignal(){const c=new AbortController,i=o=>{c.abort(o)};return this.subscribe(i),c.signal.unsubscribe=()=>this.unsubscribe(i),c.signal}static source(){let c;return{token:new Mm(function(u){c=u}),cancel:c}}};function Zy(r){return function(i){return r.apply(null,i)}}function $y(r){return O.isObject(r)&&r.isAxiosError===!0}const yc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(yc).forEach(([r,c])=>{yc[c]=r});function zm(r){const c=new fn(r),i=cm(fn.prototype.request,c);return O.extend(i,fn.prototype,c,{allOwnKeys:!0}),O.extend(i,c,null,{allOwnKeys:!0}),i.create=function(u){return zm(dn(r,u))},i}const Ge=zm(lr);Ge.Axios=fn;Ge.CanceledError=ea;Ge.CancelToken=Qy;Ge.isCancel=jm;Ge.VERSION=Am;Ge.toFormData=Hs;Ge.AxiosError=de;Ge.Cancel=Ge.CanceledError;Ge.all=function(c){return Promise.all(c)};Ge.spread=Zy;Ge.isAxiosError=$y;Ge.mergeConfig=dn;Ge.AxiosHeaders=vt;Ge.formToJSON=r=>Cm(O.isHTMLForm(r)?new FormData(r):r);Ge.getAdapter=Tm.getAdapter;Ge.HttpStatusCode=yc;Ge.default=Ge;const{Axios:Vv,AxiosError:Gv,CanceledError:Qv,isCancel:Zv,CancelToken:$v,VERSION:Kv,all:Jv,Cancel:Wv,isAxiosError:Fv,spread:Iv,toFormData:Pv,AxiosHeaders:e1,HttpStatusCode:t1,formToJSON:l1,getAdapter:n1,mergeConfig:a1}=Ge,Je=Ge.create({baseURL:"/api",timeout:3e4});Je.interceptors.request.use(r=>(D.debug("API",`${r.method?.toUpperCase()} ${r.url}`,r.data),r),r=>(D.error("API","Request error",r),Promise.reject(r)));Je.interceptors.response.use(r=>(D.debug("API",`Response ${r.status} from ${r.config.url}`),r),r=>(D.error("API",`Error from ${r.config?.url}`,r.response?.data||r.message),Promise.reject(r)));const Ky=()=>Je.get("/llm-configs"),Jy=r=>Je.post("/llm-configs",r),Wy=(r,c)=>Je.put(`/llm-configs/${r}`,c),Fy=r=>Je.delete(`/llm-configs/${r}`),Ph=r=>Je.post(`/llm-configs/${r}/set-default`),Iy=r=>Je.post("/llm-configs/validate",r),Py=()=>Je.get("/settings/semantic-scholar"),ev=r=>Je.put("/settings/semantic-scholar",{api_key:r}),tv=()=>Je.delete("/settings/semantic-scholar"),lv=r=>Je.post("/settings/semantic-scholar/validate",{api_key:r}),nv=r=>Je.post("/check",r,{headers:{"Content-Type":"multipart/form-data"},timeout:0}),Rm=r=>Je.post(`/cancel/${r}`),em=(r=50)=>Je.get("/history",{params:{limit:r}}),Fa=r=>Je.get(`/history/${r}`),av=r=>Je.delete(`/history/${r}`),rv=(r,c)=>Je.patch(`/history/${r}`,{custom_label:c}),sv=()=>Je.delete("/admin/cache"),iv=()=>Je.delete("/admin/database"),ov=(r,c)=>{const i=window.location.protocol==="https:"?"wss:":"ws:",o=window.location.host,u=`${i}//${o}/api/ws/${r}`;D.info("WebSocket",`Connecting to ${u}`);const h=new WebSocket(u);return h.onopen=()=>{D.info("WebSocket","Connected"),c.onOpen?.()},h.onmessage=m=>{try{const y=JSON.parse(m.data);D.debug("WebSocket",`Message received: ${y.type}`,y),c.onMessage?.(y)}catch(y){D.error("WebSocket","Failed to parse message",y)}},h.onerror=m=>{D.error("WebSocket","Error",m),c.onError?.(m)},h.onclose=m=>{D.info("WebSocket",`Disconnected (code: ${m.code})`),c.onClose?.(m)},h},Ve=Ia((r,c)=>({status:"idle",sessionId:null,currentCheckId:null,sessionToCheckMap:{},activeSessions:[],paperTitle:null,paperSource:null,sourceType:null,statusMessage:"",progress:0,references:[],stats:{total_refs:0,processed_refs:0,verified_count:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,refs_with_issues:0,refs_with_errors:0,refs_with_warnings_only:0,refs_verified:0,progress_percent:0},error:null,completedCheckId:null,statusFilter:[],startCheck:(i,o=null,u=null,h=null,m=null)=>{D.info("CheckStore",`Starting check with session ${i}, checkId ${o}, sourceType ${h}, paperTitle ${m}`);const y=c().sessionToCheckMap,x=o?{...y,[i]:o}:y,g=c().activeSessions.includes(i)?c().activeSessions:[...c().activeSessions,i];r({status:"checking",sessionId:i,currentCheckId:o,sessionToCheckMap:x,activeSessions:g,paperTitle:m,paperSource:u,sourceType:h,statusMessage:"Starting check...",progress:0,references:[],stats:{total_refs:0,processed_refs:0,verified_count:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,refs_with_issues:0,refs_with_errors:0,refs_with_warnings_only:0,refs_verified:0,progress_percent:0},error:null,completedCheckId:null,statusFilter:[]})},registerSession:(i,o)=>{if(!i)return;const{sessionToCheckMap:u,activeSessions:h}=c(),m=h.includes(i);D.info("CheckStore",`Registering session ${i} for check ${o}, alreadyActive=${m}`),r({sessionToCheckMap:{...u,[i]:o},activeSessions:m?h:[...h,i]})},unregisterSession:i=>{if(!i)return;const{sessionToCheckMap:o,activeSessions:u}=c(),h={...o};delete h[i],r({sessionToCheckMap:h,activeSessions:u.filter(m=>m!==i)})},adoptSession:i=>{const{session_id:o,id:u,paper_title:h,paper_source:m,results:y=[],total_refs:x=0,errors_count:g=0,warnings_count:b=0,suggestions_count:v=0,unverified_count:A=0,refs_with_issues:$=0,refs_with_errors:C,refs_with_warnings_only:z,refs_verified:R}=i||{},T=Array.isArray(y)?y.length:0,V=Math.max(x-g-b-v-A,0),G=x>0?Math.min(T/x*100,100):0;let F=C??0,Q=z??0,H=R??0;Array.isArray(y)&&y.length>0&&F===0&&Q===0&&H===0&&y.forEach(q=>{const J=q.errors?.some(ie=>ie.error_type!=="unverified"),te=q.warnings?.length>0,re=(q.status||"").toLowerCase();re==="error"||J?F++:re==="warning"||te?Q++:(re==="verified"||re==="suggestion")&&H++}),D.info("CheckStore",`Adopting in-progress session ${o} for check ${u}`),r({status:"checking",sessionId:o,currentCheckId:u,paperTitle:h,paperSource:m,statusMessage:"Reconnected to in-progress check",progress:G,references:Array.isArray(y)?y.map((q,J)=>({...q,index:J,status:q.status||"pending"})):[],stats:{total_refs:x,processed_refs:T,verified_count:V,errors_count:g,warnings_count:b,suggestions_count:v,unverified_count:A,refs_with_issues:$,refs_with_errors:F,refs_with_warnings_only:Q,refs_verified:H,progress_percent:G},error:null,completedCheckId:null,statusFilter:[]})},setCurrentCheckId:i=>{r({currentCheckId:i})},setStatusFilter:i=>{const o=c().statusFilter;o.includes(i)&&o.length===1?r({statusFilter:[]}):r({statusFilter:[i]})},clearStatusFilter:()=>{r({statusFilter:[]})},setStatusMessage:i=>{D.debug("CheckStore",`Status: ${i}`),r({statusMessage:i})},setProgress:i=>{r({progress:i})},setPaperTitle:i=>{D.info("CheckStore",`Paper title: ${i}`),r({paperTitle:i})},setPaperSource:i=>{D.info("CheckStore",`Paper source: ${i}`),r({paperSource:i})},setReferences:i=>{D.info("CheckStore",`References extracted: ${i.length}`);const o=i.map((u,h)=>({...u,index:h,status:"pending",errors:[],warnings:[],authoritative_urls:[]}));r({references:o})},updateReference:(i,o)=>{D.debug("CheckStore",`Reference ${i} updated`,o);const u=o?.status?o.status.toLowerCase():null,{index:h,...m}=o;r(y=>({references:y.references.map((x,g)=>g===i?{...x,...m,index:g,...u?{status:u}:{}}:x)}))},updateStats:i=>{D.debug("CheckStore","Stats updated",i),r({stats:i,progress:i.progress_percent||0})},completeCheck:i=>{D.info("CheckStore",`Check completed, id: ${i}`),r({status:"completed",statusMessage:"Check completed",completedCheckId:i})},cancelCheck:()=>{D.info("CheckStore","Check cancelled"),r({status:"cancelled",statusMessage:"Check cancelled"})},setError:i=>{D.error("CheckStore","Check error",i);let o=i;typeof i=="string"&&(o=i.replace(/\s*\(https?:\/\/[^\s)]+\)/g,""),o=o.replace(/^Check failed:\s*/i,"")),r({status:"error",statusMessage:`Error: ${o}`,error:o})},reset:()=>{D.info("CheckStore","Reset state");const i=c().sessionToCheckMap;r({status:"idle",sessionId:null,currentCheckId:null,sessionToCheckMap:i,paperTitle:null,paperSource:null,statusMessage:"",progress:0,references:[],stats:{total_refs:0,processed_refs:0,verified_count:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,refs_with_issues:0,refs_with_errors:0,refs_with_warnings_only:0,refs_verified:0,progress_percent:0},error:null,completedCheckId:null,statusFilter:[]})},handleWebSocketMessage:i=>{const{type:o,session_id:u,check_id:h,...m}=i,y=c(),x=st.getState(),g=h||y.sessionToCheckMap[u]||y.currentCheckId;if(u&&y.sessionId&&u!==y.sessionId){if(!g){D.warn("CheckStore",`Cannot route message - no check_id for session ${u}`);return}switch(o){case"started":case"extracting":x.updateHistoryProgress(g,{status:"in_progress"}),m.paper_title&&x.updateHistoryItemTitle(g,m.paper_title);break;case"references_extracted":const v=m.references?m.references.map((A,$)=>({...A,index:$,status:"pending",errors:[],warnings:[],authoritative_urls:[]})):[];x.updateHistoryProgress(g,{status:"in_progress",total_refs:m.total_refs||m.count||0,processed_refs:0,results:v,extraction_method:m.extraction_method});break;case"checking_reference":typeof m.index=="number"&&x.updateHistoryReference(g,m.index-1,{status:"checking"});break;case"reference_result":x.updateHistoryReference(g,m.index-1,{...m,status:m.status||"checked"});break;case"summary_update":x.updateHistoryProgress(g,{status:"in_progress",total_refs:m.total_refs,processed_refs:m.processed_refs,errors_count:m.errors_count,warnings_count:m.warnings_count,suggestions_count:m.suggestions_count,unverified_count:m.unverified_count,verified_count:m.verified_count,refs_with_errors:m.refs_with_errors,refs_with_warnings_only:m.refs_with_warnings_only,refs_verified:m.refs_verified});break;case"completed":D.info("CheckStore",`Check ${g} completed (concurrent session ${u?.slice(0,8)})`),x.updateHistoryProgress(g,{status:"completed",total_refs:m.total_refs,processed_refs:m.total_refs,errors_count:m.errors_count,warnings_count:m.warnings_count,suggestions_count:m.suggestions_count,unverified_count:m.unverified_count,verified_count:m.verified_count,refs_with_errors:m.refs_with_errors,refs_with_warnings_only:m.refs_with_warnings_only,refs_verified:m.refs_verified,extraction_method:m.extraction_method});break;case"error":D.error("CheckStore",`Check ${g} failed (concurrent session ${u?.slice(0,8)})`,m),x.updateHistoryProgress(g,{status:"error"});break;case"cancelled":D.info("CheckStore",`Check ${g} cancelled (concurrent session ${u?.slice(0,8)})`),x.updateHistoryProgress(g,{status:"cancelled"});break}return}switch(D.debug("CheckStore",`Processing message type: ${o}`),o){case"started":y.setStatusMessage(`Check started: ${m.message||"Initializing..."}`),m.source&&y.setPaperSource(m.source),st.getState().updateHistoryProgress(y.currentCheckId,{status:"in_progress",paper_source:m.source||y.paperSource||""});break;case"extracting":y.setStatusMessage(m.message||"Extracting references..."),m.paper_title&&m.paper_title!=="Unknown Paper"&&(!y.paperTitle||y.paperTitle==="Unknown Paper")&&(y.setPaperTitle(m.paper_title),st.getState().updateHistoryItemTitle(y.currentCheckId,m.paper_title)),st.getState().updateHistoryProgress(y.currentCheckId,{status:"in_progress"});break;case"title_updated":m.paper_title&&(y.setPaperTitle(m.paper_title),st.getState().updateHistoryItemTitle(y.currentCheckId,m.paper_title));break;case"references_extracted":y.setStatusMessage(`Found ${m.total_refs||m.count||0} references, starting verification...`),m.references&&y.setReferences(m.references),typeof m.total_refs=="number"&&st.getState().updateHistoryProgress(y.currentCheckId,{status:"in_progress",total_refs:m.total_refs,processed_refs:0,extraction_method:m.extraction_method}),m.extraction_method&&y.updateStats({...c().stats,extraction_method:m.extraction_method});break;case"checking_reference":typeof m.index=="number"&&y.updateReference(m.index-1,{status:"checking"});break;case"reference_result":y.updateReference(m.index-1,{...m,status:m.status||"checked"});break;case"summary_update":y.updateStats(m),y.setStatusMessage(`Processed ${m.processed_refs} of ${m.total_refs} references...`),st.getState().updateHistoryProgress(y.currentCheckId,{status:"in_progress",total_refs:m.total_refs,processed_refs:m.processed_refs,errors_count:m.errors_count,warnings_count:m.warnings_count,suggestions_count:m.suggestions_count,unverified_count:m.unverified_count,verified_count:m.verified_count,refs_with_errors:m.refs_with_errors,refs_with_warnings_only:m.refs_with_warnings_only,refs_verified:m.refs_verified});break;case"progress":y.setProgress(m.percent||m.current/m.total*100),m.message&&y.setStatusMessage(m.message);break;case"completed":y.completeCheck(m.check_id),st.getState().updateHistoryProgress(y.currentCheckId,{status:"completed",total_refs:m.total_refs,processed_refs:m.total_refs,errors_count:m.errors_count,warnings_count:m.warnings_count,suggestions_count:m.suggestions_count,unverified_count:m.unverified_count,verified_count:m.verified_count,refs_with_errors:m.refs_with_errors,refs_with_warnings_only:m.refs_with_warnings_only,refs_verified:m.refs_verified,extraction_method:m.extraction_method});break;case"cancelled":y.cancelCheck();break;case"error":D.error("CheckStore","Server error",{data:m,checkIdForMessage:g,currentCheckId:y.currentCheckId,sessionId:y.sessionId,messageSessionId:u}),y.setError(m.message||m.details||"Unknown error"),g?(D.info("CheckStore",`Updating history item ${g} to error status`),st.getState().updateHistoryProgress(g,{status:"error"})):D.warn("CheckStore","No checkIdForMessage available to update history");break;default:D.warn("CheckStore",`Unknown message type: ${o}`,m)}}})),st=Ia((r,c)=>({history:[],selectedCheckId:null,selectedCheck:null,isLoading:!1,isLoadingDetail:!1,error:null,placeholderAdded:!1,fetchHistory:async(i=50)=>{D.info("HistoryStore","fetchHistory called"),r({isLoading:!0,error:null});try{const u=(await em(i)).data;let h=Array.isArray(u)?[...u]:[];const m=Ve.getState(),y=m.status==="checking"&&!!m.currentCheckId,x=y&&h.some(H=>H.id===m.currentCheckId),g=h.find(H=>H.id===m.currentCheckId);if(g&&y&&g.status!=="in_progress"){D.info("HistoryStore","Detected completed/non-in-progress state for current check, hydrating detail",{id:g.id,status:g.status});try{const H=(await Fa(g.id)).data,q=Math.max((H.total_refs||0)-(H.errors_count||0)-(H.warnings_count||0)-(H.suggestions_count||0)-(H.unverified_count||0),0);Ve.setState({status:H.status||"completed",statusMessage:H.status==="completed"?"Check completed":`Status: ${H.status||""}`,currentCheckId:H.id,paperTitle:H.paper_title,paperSource:H.paper_source,references:Array.isArray(H.results)?H.results.map((J,te)=>({...J,index:te,status:J.status||"checked",errors:J.errors||[],warnings:J.warnings||[],authoritative_urls:J.authoritative_urls||[]})):[],stats:{total_refs:H.total_refs||0,processed_refs:H.total_refs||0,verified_count:q,errors_count:H.errors_count||0,warnings_count:H.warnings_count||0,suggestions_count:H.suggestions_count||0,unverified_count:H.unverified_count||0,refs_with_issues:H.refs_with_issues||0,refs_verified:H.refs_verified||q,progress_percent:100},completedCheckId:H.status==="completed"?H.id:null})}catch(H){D.error("HistoryStore","Failed to hydrate current check detail",H)}}const b=h.filter(H=>H.status==="in_progress").slice(0,5);for(const H of b)try{const q=(await Fa(H.id)).data,J=Array.isArray(q.results)?q.results:[],te=J.filter(re=>re&&re.status&&re.status!=="pending"&&re.status!=="checking").length;h=h.map(re=>re.id===H.id?{...re,status:q.status||"in_progress",total_refs:q.total_refs||0,processed_refs:te,errors_count:q.errors_count||0,warnings_count:q.warnings_count||0,suggestions_count:q.suggestions_count||0,unverified_count:q.unverified_count||0,refs_with_errors:q.refs_with_errors||0,refs_with_warnings_only:q.refs_with_warnings_only||0,results:J,session_id:H.session_id}:re),H.session_id&&q.status==="in_progress"&&Ve.getState().registerSession(H.session_id,H.id),D.info("HistoryStore","Loaded progress for in_progress item",{id:H.id,status:q.status,total_refs:q.total_refs,processed_refs:te,session_id:H.session_id})}catch(q){D.warn("HistoryStore","Failed to load in_progress item detail",{id:H.id,error:q?.message})}const v=!x&&y?[{id:m.currentCheckId,paper_title:m.paperTitle||m.paperSource||"In-progress check",paper_source:m.paperSource||"",custom_label:null,timestamp:new Date().toISOString(),total_refs:m.stats?.total_refs||0,errors_count:m.stats?.errors_count||0,warnings_count:m.stats?.warnings_count||0,suggestions_count:m.stats?.suggestions_count||0,unverified_count:m.stats?.unverified_count||0,llm_provider:null,llm_model:null,status:"in_progress",source_type:"url",placeholder:!1},...h]:h;!x&&y&&D.info("HistoryStore","Injected active check into history",{id:m.currentCheckId}),D.info("HistoryStore",`Fetched ${v.length} items (including injected) from API`);const A={completed:3,error:2,cancelled:2,in_progress:1,idle:0},$=c().history,C=v.map(H=>{const q=$.find(re=>re.id===H.id);if(!q)return H;const J=A[q.status]??0,te=A[H.status]??0;return J>te?(D.info("HistoryStore",`Preserving in-memory status for ${H.id}`,{inMemory:q.status,fetched:H.status}),{...H,...q}):H}),z=new Set(v.map(H=>H.id)),R=$.filter(H=>H.id!==-1&&!z.has(H.id)&&H.status==="in_progress");R.length>0&&(D.info("HistoryStore",`Preserving ${R.length} locally-added items not yet in API`),C.unshift(...R)),r({history:C,isLoading:!1}),D.info("HistoryStore",`Set ${C.length} history items (merged)`);const{selectedCheckId:T,selectedCheck:V}=c(),G=v.find(H=>H.id===T),F=G&&V&&G.status!==V.status;if(T!==null&&T!==-1&&(F||!V)){D.info("HistoryStore",`Refreshing selected check ${T} after history fetch`);try{const q=(await Fa(T)).data,J=Ve.getState(),te=J.status==="checking",re=J.sessionId===q.session_id;q.status==="in_progress"&&q.session_id&&!te&&!re&&Ve.getState().adoptSession(q),r({selectedCheck:q})}catch(H){D.error("HistoryStore",`Failed to refresh selected check ${T}`,H)}}}catch(o){D.error("HistoryStore","Failed to fetch history",o),r({error:o.message,isLoading:!1})}},initializeWithPlaceholder:async(i=50)=>{if(c().placeholderAdded){D.info("HistoryStore","Placeholder already added, skipping initialization");return}r({placeholderAdded:!0,isLoading:!0,error:null}),D.info("HistoryStore","Starting initializeWithPlaceholder API call");const u=new Promise((h,m)=>setTimeout(()=>m(new Error("Connection timeout - backend may not be running")),1e4));try{const m=(await Promise.race([em(i),u])).data;let y=Array.isArray(m)?[...m]:[];const x=y.filter(b=>b.status==="in_progress").slice(0,5);for(const b of x)try{const v=(await Fa(b.id)).data,A=Array.isArray(v.results)?v.results:[],$=A.filter(C=>C&&C.status&&C.status!=="pending"&&C.status!=="checking").length;y=y.map(C=>C.id===b.id?{...C,status:v.status||"in_progress",total_refs:v.total_refs||0,processed_refs:$,errors_count:v.errors_count||0,warnings_count:v.warnings_count||0,suggestions_count:v.suggestions_count||0,unverified_count:v.unverified_count||0,refs_with_errors:v.refs_with_errors||0,refs_with_warnings_only:v.refs_with_warnings_only||0,results:A,session_id:b.session_id}:C),b.session_id&&v.status==="in_progress"&&Ve.getState().registerSession(b.session_id,b.id),D.info("HistoryStore","Startup: loaded progress for in_progress item",{id:b.id,status:v.status,total_refs:v.total_refs,processed_refs:$,session_id:b.session_id})}catch(v){D.warn("HistoryStore","Startup: failed to load in_progress item detail",{id:b.id,error:v?.message})}D.info("HistoryStore",`Fetched ${y.length} items, adding placeholder`),r({history:[{id:-1,paper_title:"New refcheck",paper_source:"",custom_label:null,timestamp:null,total_refs:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,llm_provider:null,llm_model:null,status:"idle",source_type:"url",placeholder:!0},...y],isLoading:!1,selectedCheckId:-1,selectedCheck:null}),D.info("HistoryStore",`Initialized with placeholder and ${y.length} history items`)}catch(h){D.error("HistoryStore","Failed to initialize history",h),r({history:[{id:-1,paper_title:"New refcheck",paper_source:"",custom_label:null,timestamp:null,total_refs:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,llm_provider:null,llm_model:null,status:"idle",source_type:"url",placeholder:!0}],error:h.message,isLoading:!1,selectedCheckId:-1,selectedCheck:null}),D.info("HistoryStore","Initialized with placeholder only (API error)")}},selectCheck:async i=>{if(i===-1){r({selectedCheckId:-1,selectedCheck:null,isLoadingDetail:!1,error:null});return}const o=c().history.find(u=>u.id===i);if(o?.status==="in_progress"&&o?.total_refs>0,o?.status==="in_progress"&&o?.results?.length>0){r({selectedCheckId:i,selectedCheck:o,isLoadingDetail:!1,error:null});return}r({selectedCheckId:i,isLoadingDetail:!0,error:null});try{D.info("HistoryStore",`Loading check details for ${i}`);const h=(await Fa(i)).data,m=Ve.getState(),y=m.status==="checking",x=m.sessionId===h.session_id;h.status==="in_progress"&&h.session_id&&!y&&!x&&Ve.getState().adoptSession(h);const g={completed:3,error:2,cancelled:2,in_progress:1,idle:0};r(b=>{const v=b.history.find(Q=>Q.id===i),A=g[v?.status]??0,$=g[h.status]??0,C=v?.processed_refs||0,z=h.processed_refs||0,R=v&&(A>$||A===$&&v.status==="in_progress"&&C>z),T=v?.results||[],V=h.results||[],G=T.length>0&&(V.length===0||T.length>=V.length);return{selectedCheck:R&&v.status==="in_progress"?{...h,status:v.status,total_refs:v.total_refs||h.total_refs,processed_refs:v.processed_refs||h.processed_refs,errors_count:v.errors_count??h.errors_count,warnings_count:v.warnings_count??h.warnings_count,suggestions_count:v.suggestions_count??h.suggestions_count,unverified_count:v.unverified_count??h.unverified_count,results:G?T:V}:{...h,results:G?T:V},isLoadingDetail:!1,selectedCheckId:i,history:b.history.map(Q=>Q.id===i?R?Q:{...Q,status:h.status,total_refs:h.total_refs,processed_refs:h.processed_refs,errors_count:h.errors_count,warnings_count:h.warnings_count,suggestions_count:h.suggestions_count,unverified_count:h.unverified_count,refs_with_errors:h.refs_with_errors,refs_with_warnings_only:h.refs_with_warnings_only,paper_title:h.paper_title||Q.paper_title}:Q)}}),D.info("HistoryStore","Check details loaded and history synced",{title:h.paper_title,refs:h.total_refs,status:h.status})}catch(u){D.error("HistoryStore","Failed to load check details",u),r({error:u.message,isLoadingDetail:!1})}},clearSelection:()=>{r({selectedCheckId:null,selectedCheck:null})},updateLabel:async(i,o)=>{if(i!==-1)try{D.info("HistoryStore",`Updating label for ${i}`,{label:o}),await rv(i,o),r(u=>({history:u.history.map(h=>h.id===i?{...h,custom_label:o}:h),selectedCheck:u.selectedCheck?.id===i?{...u.selectedCheck,custom_label:o}:u.selectedCheck})),D.info("HistoryStore","Label updated")}catch(u){throw D.error("HistoryStore","Failed to update label",u),u}},updateHistoryProgress:(i,o={})=>{if(!i){D.warn("HistoryStore","updateHistoryProgress called with no id");return}r(u=>({history:u.history.map(h=>h.id===i?{...h,...o}:h),selectedCheck:u.selectedCheck?.id===i?{...u.selectedCheck,...o}:u.selectedCheck}))},updateHistoryReference:(i,o,u)=>{if(!i||o<0){D.warn("HistoryStore","updateHistoryReference called with invalid args",{checkId:i,refIndex:o});return}r(h=>{const m=h.history.map(x=>{if(x.id!==i||!x.results||o>=x.results.length)return x;const g=[...x.results];return g[o]={...g[o],...u},{...x,results:g}});let y=h.selectedCheck;if(h.selectedCheck?.id===i&&h.selectedCheck?.results){const x=[...h.selectedCheck.results];o<x.length&&(x[o]={...x[o],...u},y={...h.selectedCheck,results:x})}return{history:m,selectedCheck:y}})},deleteCheck:async i=>{if(i===-1){r(o=>({history:o.history.filter(u=>u.id!==-1),selectedCheckId:o.selectedCheckId===-1?null:o.selectedCheckId,selectedCheck:o.selectedCheckId===-1?null:o.selectedCheck}));return}try{D.info("HistoryStore",`Deleting check ${i}`),await av(i),r(u=>{const h=u.history.filter(g=>g.id!==i),m=u.selectedCheckId===i;let y=m?null:u.selectedCheckId,x=m?null:u.selectedCheck;if(m&&h.length>0&&!h.some(b=>b.id===-1)){const b=h[0];y=b.id,x=b}return{history:h,selectedCheckId:y,selectedCheck:x}});const o=c();if(o.selectedCheckId&&o.selectedCheckId!==i)try{const u=await(void 0)(o.selectedCheckId);r({selectedCheck:u.data})}catch(u){D.error("HistoryStore","Failed to fetch auto-selected check details",u)}D.info("HistoryStore","Check deleted")}catch(o){throw D.error("HistoryStore","Failed to delete check",o),o}},addToHistory:i=>{D.info("HistoryStore","Adding check to history",{id:i.id}),r(o=>({history:[i,...o.history.filter(u=>u.id!==-1)]}))},ensureNewRefcheckItem:()=>{r(i=>i.history.some(h=>h.id===-1)?{...i,placeholderAdded:!0}:{history:[{id:-1,paper_title:"New refcheck",paper_source:"",custom_label:null,timestamp:null,total_refs:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,llm_provider:null,llm_model:null,status:"idle",source_type:"url",placeholder:!0},...i.history],placeholderAdded:!0})},updateHistoryItemTitle:(i,o)=>{D.info("HistoryStore",`Updating title for ${i}`,{paper_title:o}),r(u=>({history:u.history.map(h=>h.id===i?{...h,paper_title:o}:h),selectedCheck:u.selectedCheck?.id===i?{...u.selectedCheck,paper_title:o}:u.selectedCheck}))}}));function cv(r){const c=new Date(r),o=new Date-c,u=Math.floor(o/(1e3*60*60*24));return u===0?`Today at ${c.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:u===1?`Yesterday at ${c.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}`:u<7?c.toLocaleDateString([],{weekday:"long",hour:"2-digit",minute:"2-digit"}):c.toLocaleDateString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})}function nr(r,c=!1){return!r||r.length===0?"Unknown authors":r.length===1?r[0]:r.length===2?`${r[0]} and ${r[1]}`:c?`${r[0]} et al.`:r.length>10?`${r.slice(0,10).join(", ")}, et al.`:r.join(", ")}function zs(r){if(r===0)return"0 Bytes";const c=1024,i=["Bytes","KB","MB","GB"],o=Math.floor(Math.log(r)/Math.log(c));return parseFloat((r/Math.pow(c,o)).toFixed(2))+" "+i[o]}function vc(r){if(!r)return null;const c=r.split(`
|
|
15
|
+
`);if(c.length>=3){const h=c[0].replace(/:$/,"").trim(),m=c[1].match(/cited:\s*(.*)/),y=c[2].match(/actual:\s*(.*)/);if(m||y)return{prefix:h,cited:m?m[1].trim():null,actual:y?y[1].trim():null}}const i=r.match(/^(.+?):?\s*cited:\s*([^a]+?)(?:\s+actual:\s*(.+))?$/i);if(i)return{prefix:i[1].trim(),cited:i[2]?.trim()||null,actual:i[3]?.trim()||null};const o=r.toLowerCase().indexOf("cited:"),u=r.toLowerCase().indexOf("actual:");if(o!==-1&&u!==-1&&u>o){const h=r.substring(0,o).replace(/:$/,"").trim(),m=r.substring(o+6,u).trim(),y=r.substring(u+7).trim();return{prefix:h,cited:m,actual:y}}return null}function jc(r){const c={title:r.title,authors:r.authors,year:r.year,venue:r.venue,url:r.authoritative_urls?.[0]?.url||r.cited_url},i=[...r.errors||[],...r.warnings||[]];for(const o of i){const u=(o.error_type||"").toLowerCase(),m=vc(o.error_details)?.actual||o.actual_value;if(m)switch(u){case"title":c.title=m;break;case"author":case"authors":typeof m=="string"?c.authors=m.split(/,\s*(?:and\s+)?|;\s*|\s+and\s+/).map(y=>y.trim()).filter(y=>y.length>0):Array.isArray(m)&&(c.authors=m);break;case"year":c.year=m;break;case"venue":c.venue=m;break}}if(r.suggestions?.length>0)for(const o of r.suggestions){const u=o.suggestion_details||o;if(typeof u=="string"){const h=u.match(/https?:\/\/arxiv\.org\/abs\/[\w.]+/);h&&(c.arxivUrl=h[0])}}return c}function uv({paperTitle:r,paperSource:c,stats:i,references:o}){const u=[];return u.push("# RefChecker Report"),u.push(""),u.push(`**Paper:** ${r||"Unknown"}`),c&&u.push(`**Source:** ${c}`),u.push(`**Date:** ${new Date().toLocaleString()}`),u.push(""),u.push("## Summary"),u.push(""),u.push("| Metric | Count |"),u.push("|--------|-------|"),u.push(`| Total References | ${i.total_refs||0} |`),u.push(`| Verified | ${i.refs_verified??i.verified_count??0} |`),u.push(`| With Errors | ${i.refs_with_errors??0} |`),u.push(`| With Warnings | ${i.refs_with_warnings_only??0} |`),u.push(`| Unverified | ${i.unverified_count??0} |`),u.push(""),u.push("| Issue Type | Count |"),u.push("|------------|-------|"),u.push(`| Errors | ${i.errors_count||0} |`),u.push(`| Warnings | ${i.warnings_count||0} |`),u.push(`| Suggestions | ${i.suggestions_count||0} |`),u.push(""),u.push("## References"),u.push(""),!o||o.length===0?u.push("No references found."):o.forEach((h,m)=>{const y=(h.status||"unknown").toLowerCase(),x={verified:"✅",warning:"⚠️",error:"❌",suggestion:"💡",unverified:"❓"}[y]||"❓";if(u.push(`### ${m+1}. ${h.title||h.cited_url||"Unknown Title"} ${x}`),u.push(""),h.authors?.length>0&&u.push(`**Authors:** ${nr(h.authors)}`),h.year&&u.push(`**Year:** ${h.year}`),h.venue&&u.push(`**Venue:** ${h.venue}`),h.cited_url&&u.push(`**Cited URL:** ${h.cited_url}`),h.authoritative_urls?.length>0&&(u.push(""),u.push("**Verified URLs:**"),h.authoritative_urls.forEach(g=>{const b={semantic_scholar:"Semantic Scholar",arxiv:"ArXiv",doi:"DOI",openalex:"OpenAlex",openreview:"OpenReview"}[g.type]||g.type;u.push(`- ${b}: ${g.url}`)})),h.errors?.length>0){const g=h.errors.filter(v=>v.error_type!=="unverified"),b=h.errors.find(v=>v.error_type==="unverified");g.length>0&&(u.push(""),u.push("**Errors:**"),g.forEach(v=>{const A=vc(v.error_details);A?(u.push(`- ❌ ${A.prefix}`),A.cited&&u.push(` - Cited: ${A.cited}`),A.actual&&u.push(` - Actual: ${A.actual}`)):(u.push(`- ❌ ${v.error_details||v.error_type}`),v.cited_value&&u.push(` - Cited: ${v.cited_value}`),v.actual_value&&u.push(` - Actual: ${v.actual_value}`))})),b&&y==="unverified"&&(u.push(""),u.push(`**Could not verify:** ${b.error_details||"Paper not found by any checker"}`))}h.warnings?.length>0&&(u.push(""),u.push("**Warnings:**"),h.warnings.forEach(g=>{const b=vc(g.error_details);b?(u.push(`- ⚠️ ${b.prefix}`),b.cited&&u.push(` - Cited: ${b.cited}`),b.actual&&u.push(` - Actual: ${b.actual}`)):(u.push(`- ⚠️ ${g.error_details||g.error_type}`),g.cited_value&&u.push(` - Cited: ${g.cited_value}`),g.actual_value&&u.push(` - Actual: ${g.actual_value}`))})),h.suggestions?.length>0&&(u.push(""),u.push("**Suggestions:**"),h.suggestions.forEach(g=>{const b=typeof g=="string"?g:g.suggestion_details;u.push(`- 💡 ${b}`)})),u.push(""),u.push("---"),u.push("")}),u.join(`
|
|
16
|
+
`)}function uc(r,c,i="text/markdown"){const o=new Blob([r],{type:i}),u=URL.createObjectURL(o),h=document.createElement("a");h.href=u,h.download=c,document.body.appendChild(h),h.click(),document.body.removeChild(h),URL.revokeObjectURL(u)}async function fv(r){try{return await navigator.clipboard.writeText(r),!0}catch(c){return console.error("Failed to copy to clipboard:",c),!1}}function dv({paperTitle:r,paperSource:c,stats:i,references:o}){const u=[];return u.push("REFCHECKER REPORT"),u.push("=".repeat(50)),u.push(""),u.push(`Paper: ${r||"Unknown"}`),c&&u.push(`Source: ${c}`),u.push(`Date: ${new Date().toLocaleString()}`),u.push(""),u.push("SUMMARY"),u.push("-".repeat(30)),u.push(`Total References: ${i.total_refs||0}`),u.push(`Verified: ${i.refs_verified??i.verified_count??0}`),u.push(`Errors: ${i.errors_count||0}`),u.push(`Warnings: ${i.warnings_count||0}`),u.push(`Unverified: ${i.unverified_count??0}`),u.push(""),u.push("REFERENCES"),u.push("-".repeat(30)),!o||o.length===0?u.push("No references found."):o.forEach((h,m)=>{const y=(h.status||"unknown").toUpperCase();u.push(""),u.push(`[${m+1}] ${h.title||h.cited_url||"Unknown Title"} [${y}]`),h.authors?.length>0&&u.push(` Authors: ${nr(h.authors)}`),h.year&&u.push(` Year: ${h.year}`),h.venue&&u.push(` Venue: ${h.venue}`),h.errors?.length>0&&h.errors.filter(x=>x.error_type!=="unverified").forEach(x=>{u.push(` ERROR: ${x.error_details||x.error_type}`)}),h.warnings?.length>0&&h.warnings.forEach(x=>{u.push(` WARNING: ${x.error_details||x.error_type}`)})}),u.join(`
|
|
17
|
+
`)}function hv(r,c){let i="";if(r.authors?.length>0){const u=r.authors[0].split(/[,\s]+/);i=u[u.length>1?u.length-1:0]||"",i=i.replace(/[^a-zA-Z]/g,"").toLowerCase()}if(r.year&&(i+=r.year),r.title){const o=r.title.split(/\s+/)[0].replace(/[^a-zA-Z]/g,"").toLowerCase();i+=o}return i||`ref${c+1}`}function Ns(r){return r?r.replace(/\\/g,"\\textbackslash{}").replace(/[&%$#_{}]/g,c=>"\\"+c).replace(/~/g,"\\textasciitilde{}").replace(/\^/g,"\\textasciicircum{}"):""}function Om(r,c=0){const i=jc(r),o=hv({...r,...i,authors:i.authors},c),u=[],h=(i.venue||"").toLowerCase();let m="article";if(h.includes("conference")||h.includes("proceedings")||h.includes("workshop")?m="inproceedings":(h.includes("arxiv")||i.arxivUrl||r.cited_url?.includes("arxiv"))&&(m="misc"),u.push(`@${m}{${o},`),i.title&&u.push(` title = {${Ns(i.title)}},`),i.authors?.length>0){const y=i.authors.map(x=>Ns(x)).join(" and ");u.push(` author = {${y}},`)}if(i.year&&u.push(` year = {${i.year}},`),i.venue&&(m==="inproceedings"?u.push(` booktitle = {${Ns(i.venue)}},`):m==="article"&&u.push(` journal = {${Ns(i.venue)}},`)),i.arxivUrl){u.push(` url = {${i.arxivUrl}},`);const y=i.arxivUrl.match(/arxiv\.org\/abs\/(.+)/);y&&(u.push(` eprint = {${y[1]}},`),u.push(" archiveprefix = {arXiv},"))}else{const y=r.authoritative_urls?.find(g=>g.type==="doi"),x=r.authoritative_urls?.find(g=>g.type==="arxiv");if(y){const g=y.url.match(/doi\.org\/(.+)/);g?u.push(` doi = {${g[1]}},`):u.push(` url = {${y.url}},`)}else if(x){u.push(` url = {${x.url}},`);const g=x.url.match(/arxiv\.org\/abs\/(.+)/);g&&(u.push(` eprint = {${g[1]}},`),u.push(" archiveprefix = {arXiv},"))}else r.cited_url&&u.push(` url = {${r.cited_url}},`)}return u.push("}"),u.join(`
|
|
18
|
+
`)}function mv({references:r}){return!r||r.length===0?"% No references found":r.map((i,o)=>Om(i,o)).join(`
|
|
19
|
+
|
|
20
|
+
`)}function pv(r){const c=jc(r),i=[];c.authors?.length>0&&i.push(nr(c.authors)),c.year&&i.push(c.year),c.title&&i.push(c.title),c.venue&&i.push(c.venue);let o=i.join(". ");o&&!o.endsWith(".")&&(o+=".");const u=c.arxivUrl||c.url;return u&&(o+=` ${u}`),o}function tm(r){const c=jc(r),i=[];c.title&&i.push(`**${c.title}**`),c.authors?.length>0&&i.push(`**Authors:** ${nr(c.authors)}`),c.year&&i.push(`**Year:** ${c.year}`),c.venue&&i.push(`**Venue:** *${c.venue}*`);const o=c.arxivUrl||c.url;return o&&i.push(`**URL:** ${o}`),i.join(`
|
|
21
|
+
`)}function lm(r){if(!r||r.startsWith("http://")||r.startsWith("https://"))return r;const c=r.match(/^(?:arXiv:)?(\d{4}\.\d{4,5}(?:v\d+)?)$/i);return c?`https://arxiv.org/abs/${c[1]}`:r}function gv({item:r,isSelected:c}){const{selectCheck:i,updateLabel:o,deleteCheck:u,updateHistoryProgress:h}=st(),m=Ve(K=>K.sessionId),y=Ve(K=>K.cancelCheck),[x,g]=W.useState(!1),[b,v]=W.useState(""),[A,$]=W.useState(!1),[C,z]=W.useState(!1),[R,T]=W.useState(!1),V=r.custom_label||r.paper_title||"Untitled Check",G=r.id===-1,F=r.status==="in_progress",Q=r.total_refs||0,H=r.processed_refs||0,q=Q>0?Math.min(H/Q*100,100):0,J=()=>{x||(D.info("HistoryItem",`Selecting check ${r.id}`),i(r.id))},te=K=>{K.stopPropagation(),v(V),g(!0)},re=async()=>{if(b.trim()&&b.trim()!==V)try{await o(r.id,b.trim()),D.info("HistoryItem",`Label updated for ${r.id}`)}catch(K){D.error("HistoryItem","Failed to update label",K)}g(!1)},ie=()=>{g(!1)},ce=K=>{K.key==="Enter"?re():K.key==="Escape"&&ie()},Ne=async K=>{K.stopPropagation(),z(!0)},Se=async K=>{K.stopPropagation();try{await u(r.id),D.info("HistoryItem",`Deleted check ${r.id}`)}catch(ge){D.error("HistoryItem","Failed to delete",ge)}z(!1)},Ce=K=>{K.stopPropagation(),z(!1)},E=async K=>{if(K.stopPropagation(),!(!r.session_id||R)){T(!0);try{D.info("HistoryItem",`Cancelling check ${r.session_id}`),await Rm(r.session_id),h(r.id,{status:"cancelled"}),r.session_id===m&&y(),D.info("HistoryItem",`Check ${r.id} cancelled`)}catch(ge){D.error("HistoryItem","Failed to cancel check",ge),h(r.id,{status:"cancelled"}),r.session_id===m&&y()}finally{T(!1)}}},P=r.status==="in_progress"?{color:"var(--color-accent)",label:"In progress",isAnimated:!0}:r.status==="cancelled"?{color:"var(--color-warning)",label:"Cancelled",isAnimated:!1}:r.status==="error"?{color:"var(--color-error)",label:"Error",isAnimated:!1}:r.errors_count>0?{color:"var(--color-error)",label:`${r.errors_count} errors`,isAnimated:!1}:r.warnings_count>0?{color:"var(--color-warning)",label:`${r.warnings_count} warnings`,isAnimated:!1}:r.unverified_count>0?{color:"var(--color-text-muted)",label:`${r.unverified_count} unverified`,isAnimated:!1}:{color:"var(--color-success)",label:"All verified",isAnimated:!1};return f.jsxs("div",{onClick:J,onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),className:"px-3 py-2 mx-2 my-0.5 cursor-pointer transition-colors rounded-md relative",style:{backgroundColor:c?"var(--color-bg-tertiary)":"transparent"},onMouseOver:K=>{c||(K.currentTarget.style.backgroundColor="var(--color-bg-tertiary)")},onMouseOut:K=>{c||(K.currentTarget.style.backgroundColor="transparent")},children:[f.jsxs("div",{className:"w-full",children:[x?f.jsx("input",{type:"text",value:b,onChange:K=>v(K.target.value),onBlur:re,onKeyDown:ce,onClick:K=>K.stopPropagation(),autoFocus:!0,className:"w-full px-2 py-1 text-sm rounded border focus:outline-none focus:ring-1",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-accent)",color:"var(--color-text-primary)"}}):f.jsx("div",{className:"font-medium text-sm leading-tight overflow-hidden text-ellipsis whitespace-nowrap",style:{color:"var(--color-text-primary)"},title:V,children:V}),!G&&r.paper_source&&r.source_type!=="text"&&r.source_type!=="file"&&f.jsx("div",{className:"text-xs mt-0.5 overflow-hidden text-ellipsis whitespace-nowrap",style:{color:"var(--color-text-muted)"},title:lm(r.paper_source),children:lm(r.paper_source)}),r.timestamp&&!G&&f.jsx("div",{className:"text-xs mt-1",style:{color:"var(--color-text-muted)"},children:cv(r.timestamp)}),f.jsxs("div",{className:"flex items-center gap-1.5 mt-1 text-xs",style:{color:"var(--color-text-muted)"},children:[r.status==="error"&&f.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",style:{color:"var(--color-error)"},children:f.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),r.status==="cancelled"&&f.jsx("svg",{className:"w-3 h-3 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",style:{color:"var(--color-warning)"},children:f.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8 7a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1zm4 0a1 1 0 00-1 1v4a1 1 0 102 0V8a1 1 0 00-1-1z",clipRule:"evenodd"})}),f.jsx("span",{style:{color:r.status==="error"?"var(--color-error)":r.status==="cancelled"?"var(--color-warning)":void 0},children:G?"Start a new check":r.status==="error"?"Check failed":r.status==="cancelled"?"Cancelled":F?Q>0?`${H}/${Q}`:"Extracting...":`${Q} refs`}),!G&&f.jsxs(f.Fragment,{children:[(r.refs_with_errors||0)>0&&f.jsxs("span",{className:"flex items-center",style:{color:"var(--color-error)"},title:`${r.refs_with_errors} ref${r.refs_with_errors===1?"":"s"} with errors`,children:[f.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"})}),f.jsx("span",{className:"ml-0.5",children:r.refs_with_errors})]}),(r.refs_with_warnings_only||0)>0&&f.jsxs("span",{className:"flex items-center",style:{color:"var(--color-warning)"},title:`${r.refs_with_warnings_only} ref${r.refs_with_warnings_only===1?"":"s"} with warnings`,children:[f.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),f.jsx("span",{className:"ml-0.5",children:r.refs_with_warnings_only})]}),(r.suggestions_count||0)>0&&f.jsxs("span",{className:"flex items-center",style:{color:"var(--color-suggestion)"},title:`${r.suggestions_count} suggestion${r.suggestions_count===1?"":"s"}`,children:[f.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",children:f.jsx("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"})}),f.jsx("span",{className:"ml-0.5",children:r.suggestions_count})]}),!F&&(r.refs_with_errors||0)===0&&(r.refs_with_warnings_only||0)===0&&(r.suggestions_count||0)===0&&r.status==="completed"&&f.jsx("svg",{className:"w-3 h-3",fill:"currentColor",viewBox:"0 0 20 20",style:{color:"var(--color-success)"},title:"All references verified",children:f.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})})]}),!G&&P.isAnimated&&f.jsxs("svg",{className:"w-3 h-3 animate-spin",fill:"none",viewBox:"0 0 24 24",style:{color:P.color},children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),F&&r.session_id&&f.jsx("button",{onClick:E,disabled:R,className:"ml-auto text-xs px-2 py-0.5 rounded transition-colors",style:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",opacity:R?.5:1,cursor:R?"wait":"pointer"},onMouseEnter:K=>{R||(K.currentTarget.style.backgroundColor="var(--color-error)",K.currentTarget.style.color="white")},onMouseLeave:K=>{K.currentTarget.style.backgroundColor="var(--color-error-bg)",K.currentTarget.style.color="var(--color-error)"},title:"Cancel this check",children:R?"Cancelling...":"Cancel"})]}),F&&Q>0&&f.jsxs("div",{className:"mt-2",children:[f.jsx("div",{className:"h-1 rounded-full overflow-hidden",style:{backgroundColor:"var(--color-bg-tertiary)"},children:f.jsx("div",{className:"h-full rounded-full transition-all duration-300 progress-bar",style:{width:`${Math.round(q)}%`}})}),f.jsxs("p",{className:"text-xs mt-0.5",style:{color:"var(--color-text-muted)"},children:[Math.round(q),"% complete"]})]})]}),C?f.jsxs("div",{className:"absolute top-2 right-2 flex items-center gap-1 px-2 py-1 rounded-lg",style:{backgroundColor:"var(--color-error-bg)"},children:[f.jsx("button",{onClick:Se,className:"p-1 rounded transition-colors",style:{color:"var(--color-error)"},onMouseEnter:K=>{K.currentTarget.style.backgroundColor="var(--color-error)",K.currentTarget.style.color="white"},onMouseLeave:K=>{K.currentTarget.style.backgroundColor="transparent",K.currentTarget.style.color="var(--color-error)"},title:"Confirm delete",children:f.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})})}),f.jsx("button",{onClick:Ce,className:"p-1 rounded transition-colors",style:{color:"var(--color-text-secondary)"},onMouseEnter:K=>{K.currentTarget.style.backgroundColor="var(--color-bg-tertiary)"},onMouseLeave:K=>{K.currentTarget.style.backgroundColor="transparent"},title:"Cancel",children:f.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}):A&&!x&&!G&&f.jsxs("div",{className:"absolute top-2 right-2 flex items-center",children:[f.jsx("div",{className:"w-8 h-6",style:{background:`linear-gradient(to right, transparent, ${c?"var(--color-bg-tertiary)":"var(--color-bg-primary)"})`}}),f.jsxs("div",{className:"flex items-center gap-1 pl-1 pr-1 h-6",style:{backgroundColor:c?"var(--color-bg-tertiary)":"var(--color-bg-primary)"},children:[f.jsx("button",{onClick:te,className:"p-1 rounded transition-colors cursor-pointer",style:{color:"var(--color-text-secondary)"},onMouseEnter:K=>{K.currentTarget.style.backgroundColor="var(--color-accent)",K.currentTarget.style.color="white"},onMouseLeave:K=>{K.currentTarget.style.backgroundColor="transparent",K.currentTarget.style.color="var(--color-text-secondary)"},title:"Edit label",children:f.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),f.jsx("button",{onClick:Ne,className:"p-1 rounded transition-colors cursor-pointer",style:{color:"var(--color-error)"},onMouseEnter:K=>{K.currentTarget.style.backgroundColor="var(--color-error-bg)"},onMouseLeave:K=>{K.currentTarget.style.backgroundColor="transparent"},title:"Delete",children:f.jsx("svg",{className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]})]})}function yv(){const{history:r,selectedCheckId:c,isLoading:i,error:o}=st(),[u,h]=W.useState(!1);return W.useEffect(()=>{if(i&&r.length===0){const m=setTimeout(()=>{h(!0)},5e3);return()=>clearTimeout(m)}else h(!1)},[i,r.length]),i&&r.length===0?f.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4",style:{color:"var(--color-text-muted)"},children:[f.jsxs("div",{className:"flex items-center",children:[f.jsxs("svg",{className:"animate-spin h-5 w-5 mr-2",fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),"Loading..."]}),u&&f.jsxs("p",{className:"text-xs mt-2 text-center",children:["Taking longer than expected...",f.jsx("br",{}),"Check if the backend is running on port 8000"]})]}):o&&r.length===0?f.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4 text-center",style:{color:"var(--color-text-muted)"},children:[f.jsx("svg",{className:"w-12 h-12 mb-3 text-red-400",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),f.jsx("p",{className:"text-sm text-red-400",children:"Failed to connect to backend"}),f.jsx("p",{className:"text-xs mt-1",children:"Make sure the server is running"})]}):r.length===0?f.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center p-4 text-center",style:{color:"var(--color-text-muted)"},children:[f.jsx("svg",{className:"w-12 h-12 mb-3 opacity-50",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})}),f.jsx("p",{className:"text-sm",children:"No checks yet"}),f.jsx("p",{className:"text-xs mt-1",children:"Start a check to see history"})]}):f.jsx("div",{className:"flex-1 overflow-y-auto",children:r.map(m=>f.jsx(gv,{item:m,isSelected:m.id===c},m.id))})}const qs=Ia((r,c)=>({configs:[],selectedConfigId:null,isLoading:!1,error:null,fetchConfigs:async()=>{r({isLoading:!0,error:null});try{D.info("ConfigStore","Fetching LLM configs");const o=(await Ky()).data,u=o.find(h=>h.is_default);r({configs:o,selectedConfigId:u?.id||o[0]?.id||null,isLoading:!1}),D.info("ConfigStore",`Loaded ${o.length} configs`)}catch(i){D.error("ConfigStore","Failed to fetch configs",i),r({error:i.message,isLoading:!1})}},addConfig:async i=>{r({isLoading:!0,error:null});try{D.info("ConfigStore","Creating LLM config",{name:i.name,provider:i.provider});const u=(await Jy(i)).data;return r(h=>({configs:[...h.configs,u],selectedConfigId:u.id,isLoading:!1})),await Ph(u.id),D.info("ConfigStore","Config created",u),u}catch(o){throw D.error("ConfigStore","Failed to create config",o),r({error:o.message,isLoading:!1}),o}},updateConfig:async(i,o)=>{r({isLoading:!0,error:null});try{D.info("ConfigStore",`Updating config ${i}`,o);const h=(await Wy(i,o)).data;return r(m=>({configs:m.configs.map(y=>y.id===i?h:y),isLoading:!1})),D.info("ConfigStore","Config updated"),h}catch(u){throw D.error("ConfigStore","Failed to update config",u),r({error:u.message,isLoading:!1}),u}},deleteConfig:async i=>{r({isLoading:!0,error:null});try{D.info("ConfigStore",`Deleting config ${i}`),await Fy(i),r(o=>{const u=o.configs.filter(m=>m.id!==i),h=o.selectedConfigId===i?u[0]?.id||null:o.selectedConfigId;return{configs:u,selectedConfigId:h,isLoading:!1}}),D.info("ConfigStore","Config deleted")}catch(o){throw D.error("ConfigStore","Failed to delete config",o),r({error:o.message,isLoading:!1}),o}},selectConfig:async i=>{D.info("ConfigStore",`Selecting config ${i}`);try{await Ph(i),r({selectedConfigId:i})}catch(o){D.error("ConfigStore","Failed to set default config",o)}},getSelectedConfig:()=>{const{configs:i,selectedConfigId:o}=c();return i.find(u=>u.id===o)||null}})),nm="",Lm=Ia((r,c)=>({settings:{},isLoading:!1,error:null,isSettingsOpen:!1,openSettings:()=>{r({isSettingsOpen:!0}),c().fetchSettings()},closeSettings:()=>{r({isSettingsOpen:!1})},toggleSettings:()=>{const{isSettingsOpen:i}=c();i?c().closeSettings():c().openSettings()},fetchSettings:async()=>{r({isLoading:!0,error:null});try{const i=await fetch(`${nm}/api/settings`);if(!i.ok)throw new Error(`Failed to fetch settings: ${i.status}`);const o=await i.json();D.info("SettingsStore","Fetched settings",o),r({settings:o,isLoading:!1})}catch(i){D.error("SettingsStore","Error fetching settings",i),r({error:i.message,isLoading:!1})}},updateSetting:async(i,o)=>{const{settings:u}=c(),h={...u};r({settings:{...u,[i]:{...u[i],value:String(o)}}});try{const m=await fetch(`${nm}/api/settings/${i}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({value:String(o)})});if(!m.ok)throw new Error(`Failed to update setting: ${m.status}`);const y=await m.json();D.info("SettingsStore",`Updated setting ${i}`,y),r({settings:{...c().settings,[i]:{...c().settings[i],value:y.value}}})}catch(m){D.error("SettingsStore",`Error updating setting ${i}`,m),r({settings:h,error:m.message})}},getSetting:i=>{const{settings:o}=c(),u=o[i];if(!u)return null;const h=u.value;switch(u.type){case"number":return parseInt(h,10);case"boolean":return h==="true";default:return h}}})),fc=220,dc=500,vv=280,am="refchecker-sidebar-width";function xv(){const{fetchConfigs:r}=qs(),{initializeWithPlaceholder:c,ensureNewRefcheckItem:i,selectCheck:o}=st(),{status:u,reset:h}=Ve(),{toggleSettings:m}=Lm(),[y,x]=W.useState(()=>{const z=localStorage.getItem(am);return z?Math.min(dc,Math.max(fc,parseInt(z,10))):vv}),[g,b]=W.useState(!1),v=W.useRef(null);W.useEffect(()=>{D.info("Sidebar","Initializing sidebar data"),r(),c()},[r,c]),W.useEffect(()=>{localStorage.setItem(am,y.toString())},[y]);const A=W.useCallback(z=>{z.preventDefault(),b(!0)},[]),$=W.useCallback(()=>{b(!1)},[]),C=W.useCallback(z=>{if(g&&v.current){const R=z.clientX-v.current.getBoundingClientRect().left;R>=fc&&R<=dc&&x(R)}},[g]);return W.useEffect(()=>(g&&(window.addEventListener("mousemove",C),window.addEventListener("mouseup",$),document.body.style.cursor="col-resize",document.body.style.userSelect="none"),()=>{window.removeEventListener("mousemove",C),window.removeEventListener("mouseup",$),document.body.style.cursor="",document.body.style.userSelect=""}),[g,C,$]),f.jsxs("aside",{ref:v,className:"flex flex-col h-full relative",style:{width:`${y}px`,minWidth:`${fc}px`,maxWidth:`${dc}px`,backgroundColor:"var(--color-bg-secondary)"},children:[f.jsx("div",{className:"flex-shrink-0 px-3 py-2",children:f.jsxs("button",{onClick:()=>{i(),u!=="checking"&&h(),o(-1)},className:"w-full px-3 py-2 flex items-center gap-2 cursor-pointer transition-colors rounded-md hover:bg-[var(--color-bg-tertiary)]",title:"Create new refcheck",children:[f.jsx("span",{className:"w-6 h-6 rounded-full font-medium flex items-center justify-center flex-shrink-0",style:{backgroundColor:"var(--color-accent)",color:"#ffffff"},children:f.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-3.5 h-3.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2.5,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4v16m8-8H4"})})}),f.jsx("span",{className:"text-sm font-medium",style:{color:"var(--color-text-primary)"},children:"New Refcheck"})]})}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden min-h-0",children:[f.jsx("div",{className:"px-4 py-2",children:f.jsx("h2",{className:"text-xs font-semibold uppercase tracking-wide",style:{color:"var(--color-text-muted)"},children:"History"})}),f.jsx(yv,{})]}),f.jsx("div",{className:"flex-shrink-0 px-3 py-2",children:f.jsxs("button",{onClick:m,className:"flex items-center gap-2 w-full px-3 py-2 rounded-md text-sm transition-colors cursor-pointer hover:bg-[var(--color-bg-tertiary)]",style:{color:"var(--color-text-secondary)"},title:"Settings",children:[f.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M10.325 4.317c.426-1.756 2.924-1.756 3.35 0a1.724 1.724 0 002.573 1.066c1.543-.94 3.31.826 2.37 2.37a1.724 1.724 0 001.065 2.572c1.756.426 1.756 2.924 0 3.35a1.724 1.724 0 00-1.066 2.573c.94 1.543-.826 3.31-2.37 2.37a1.724 1.724 0 00-2.572 1.065c-.426 1.756-2.924 1.756-3.35 0a1.724 1.724 0 00-2.573-1.066c-1.543.94-3.31-.826-2.37-2.37a1.724 1.724 0 00-1.065-2.572c-1.756-.426-1.756-2.924 0-3.35a1.724 1.724 0 001.066-2.573c-.94-1.543.826-3.31 2.37-2.37.996.608 2.296.07 2.572-1.065z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]}),f.jsx("span",{children:"Settings"})]})}),f.jsx("div",{onMouseDown:A,className:"absolute top-0 right-0 w-1 h-full cursor-col-resize hover:bg-blue-500 transition-colors",style:{backgroundColor:g?"var(--color-accent)":"transparent"}})]})}function Os({children:r,variant:c="primary",size:i="md",disabled:o=!1,loading:u=!1,className:h="",...m}){const y="inline-flex items-center justify-center font-medium rounded-lg transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",x={primary:{backgroundColor:"var(--color-accent)",color:"#ffffff",hoverBg:"var(--color-accent-hover)"},secondary:{backgroundColor:"var(--color-bg-tertiary)",color:"var(--color-text-primary)",hoverBg:"var(--color-border)"},danger:{backgroundColor:"var(--color-error)",color:"#ffffff",hoverBg:"#dc2626"},ghost:{backgroundColor:"transparent",color:"var(--color-text-secondary)",hoverBg:"var(--color-bg-tertiary)"}},g={sm:"px-2.5 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base"},b=x[c]||x.primary;return f.jsxs("button",{className:`${y} ${g[i]} ${h}`,style:{backgroundColor:o?"var(--color-bg-tertiary)":b.backgroundColor,color:o?"var(--color-text-muted)":b.color,cursor:o?"not-allowed":"pointer",opacity:o?.6:1},disabled:o||u,onMouseEnter:v=>{o||(v.currentTarget.style.backgroundColor=b.hoverBg)},onMouseLeave:v=>{o||(v.currentTarget.style.backgroundColor=b.backgroundColor)},...m,children:[u&&f.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),r]})}function bv({file:r,isDragging:c,error:i,onDragEnter:o,onDragLeave:u,onDragOver:h,onDrop:m,onFileSelect:y,onClear:x,disabled:g}){const b=W.useRef(null),v=()=>{!g&&b.current&&b.current.click()};return f.jsxs("div",{children:[f.jsxs("div",{onClick:v,onDragEnter:o,onDragLeave:u,onDragOver:h,onDrop:m,className:`
|
|
22
|
+
relative rounded-lg border-2 border-dashed p-8 text-center transition-all cursor-pointer
|
|
23
|
+
${c?"active":""}
|
|
24
|
+
`,style:{borderColor:c?"var(--color-accent)":i?"var(--color-error)":"var(--color-border)",backgroundColor:c?"var(--color-info-bg)":"var(--color-bg-primary)",opacity:g?.6:1,cursor:g?"not-allowed":"pointer"},children:[f.jsx("input",{ref:b,type:"file",onChange:y,accept:".pdf,.txt,.tex,.latex,.bib",className:"hidden",disabled:g}),r?f.jsxs("div",{className:"space-y-2",children:[f.jsxs("div",{className:"flex items-center justify-center gap-2",children:[f.jsx("svg",{className:"w-8 h-8",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"var(--color-success)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),f.jsx("span",{className:"font-medium",style:{color:"var(--color-text-primary)"},children:r.name})]}),f.jsx("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:zs(r.size)}),!g&&f.jsx("button",{onClick:A=>{A.stopPropagation(),x()},className:"text-sm underline transition-colors",style:{color:"var(--color-accent)"},children:"Choose different file"})]}):f.jsxs("div",{className:"space-y-2",children:[f.jsx("svg",{className:"w-12 h-12 mx-auto",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"var(--color-text-muted)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12"})}),f.jsxs("p",{style:{color:"var(--color-text-primary)"},children:[f.jsx("span",{className:"font-medium",style:{color:"var(--color-accent)"},children:"Click to upload"})," ","or drag and drop"]}),f.jsx("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:"PDF, TXT, TEX, LaTeX, or BibTeX (max 200MB)"})]})]}),i&&f.jsx("p",{className:"mt-2 text-sm",style:{color:"var(--color-error)"},children:i})]})}const hc=200*1024*1024,Sv=["application/pdf","text/plain","text/x-tex","application/x-tex","application/x-latex"],rm=[".pdf",".txt",".tex",".latex",".bib"];function _v(){const[r,c]=W.useState(null),[i,o]=W.useState(!1),[u,h]=W.useState(null),m=W.useRef(0),y=W.useCallback(z=>{if(z.size>hc){const G=`File too large. Maximum size is ${zs(hc)}, got ${zs(z.size)}`;return D.warn("useFileUpload",G),G}const R=z.name.toLowerCase(),T=rm.some(G=>R.endsWith(G)),V=Sv.includes(z.type)||z.type==="";if(!T&&!V){const G="Invalid file type. Allowed: PDF, TXT, TEX, LaTeX, BibTeX";return D.warn("useFileUpload",G),G}return null},[]),x=W.useCallback(z=>{h(null);const R=y(z);return R?(h(R),!1):(D.info("useFileUpload",`File selected: ${z.name} (${zs(z.size)})`),c(z),!0)},[y]),g=W.useCallback(z=>{z.preventDefault(),z.stopPropagation(),m.current++,z.dataTransfer.items&&z.dataTransfer.items.length>0&&o(!0)},[]),b=W.useCallback(z=>{z.preventDefault(),z.stopPropagation(),m.current--,m.current===0&&o(!1)},[]),v=W.useCallback(z=>{z.preventDefault(),z.stopPropagation()},[]),A=W.useCallback(z=>{z.preventDefault(),z.stopPropagation(),o(!1),m.current=0;const R=z.dataTransfer.files;R&&R.length>0&&x(R[0])},[x]),$=W.useCallback(z=>{const R=z.target.files;R&&R.length>0&&x(R[0])},[x]),C=W.useCallback(()=>{D.debug("useFileUpload","File cleared"),c(null),h(null)},[]);return{file:r,isDragging:i,error:u,handleDragEnter:g,handleDragLeave:b,handleDragOver:v,handleDrop:A,handleInputChange:$,clearFile:C,maxFileSize:hc,allowedExtensions:rm}}function Cv(){const[r,c]=W.useState("url"),[i,o]=W.useState(""),[u,h]=W.useState(""),[m,y]=W.useState(!1),{status:x,startCheck:g,reset:b,cancelCheck:v,setError:A}=Ve(),{getSelectedConfig:$}=qs(),{fetchHistory:C,clearSelection:z,selectCheck:R}=st(),T=_v(),V=async()=>{if(z(),r==="url"&&!i.trim()){D.warn("InputSection","No URL/ArXiv ID provided");return}if(r==="file"&&!T.file){D.warn("InputSection","No file selected");return}if(r==="text"&&!u.trim()){D.warn("InputSection","No text provided");return}y(!0);try{const J=$(),te=new FormData;te.append("source_type",r==="url"?"url":r==="file"?"file":"text"),r==="url"?te.append("source_value",i.trim()):r==="file"?te.append("file",T.file):te.append("source_text",u),J?(te.append("llm_config_id",J.id.toString()),te.append("llm_provider",J.provider),J.model&&te.append("llm_model",J.model),te.append("use_llm","true")):te.append("use_llm","false"),D.info("Check","Initiating check request",{mode:r,llm:J?.provider,model:J?.model,source:r==="url"?i.trim():r==="file"?T.file?.name:"pasted text"});const re=r==="url"?i.trim():r==="file"?T.file?.name:"Pasted text",ie=r==="url"?"url":r==="file"?"file":"text",ce=r==="file"?T.file?.name:null;D.info("API","Sending POST /api/check");const Ne=await nv(te),{session_id:Se,check_id:Ce,message:E}=Ne.data;D.info("API","Check started successfully",{session_id:Se,check_id:Ce,message:E}),g(Se,Ce,re,ie,ce);const{addToHistory:Z}=st.getState();Z({id:Ce,paper_title:ce||re,paper_source:re,source_type:ie,custom_label:null,timestamp:new Date().toISOString(),total_refs:0,errors_count:0,warnings_count:0,unverified_count:0,llm_provider:J?.provider||null,llm_model:J?.model||null,status:"in_progress",session_id:Se}),R(Ce)}catch(J){D.error("InputSection","Failed to start check",J),A(J.response?.data?.detail||J.message||"Failed to start check")}finally{y(!1)}},G=()=>{b(),C()},{selectedCheckId:F}=st.getState(),Q=F===-1,H=x==="checking"&&!Q,q=(x==="completed"||x==="cancelled"||x==="error")&&!Q;return f.jsxs("div",{className:"rounded-lg border p-6",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsx("h2",{className:"text-lg font-semibold mb-4",style:{color:"var(--color-text-primary)"},children:"Check Paper References"}),f.jsx("div",{className:"flex gap-2 mb-4",children:[{id:"url",label:"URL / ArXiv ID"},{id:"file",label:"Upload File"},{id:"text",label:"Paste Text"}].map(J=>f.jsx("button",{onClick:()=>c(J.id),disabled:H,className:"px-4 py-2 text-sm font-medium rounded-lg transition-colors",style:{backgroundColor:r===J.id?"var(--color-accent)":"var(--color-bg-tertiary)",color:r===J.id?"#ffffff":"var(--color-text-secondary)",cursor:H?"not-allowed":"pointer"},onMouseEnter:te=>{!H&&r!==J.id&&(te.currentTarget.style.backgroundColor="var(--color-bg-hover)",te.currentTarget.style.color="var(--color-text-primary)")},onMouseLeave:te=>{r!==J.id&&(te.currentTarget.style.backgroundColor="var(--color-bg-tertiary)",te.currentTarget.style.color="var(--color-text-secondary)")},children:J.label},J.id))}),f.jsxs("div",{className:"mb-4",children:[r==="url"&&f.jsx("input",{type:"text",value:i,onChange:J=>o(J.target.value),placeholder:"Enter ArXiv ID (e.g., 2401.12345) or URL",disabled:H,className:"w-full px-4 py-3 rounded-lg border focus:outline-none focus:ring-2",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"}}),r==="file"&&f.jsx(bv,{file:T.file,isDragging:T.isDragging,error:T.error,onDragEnter:T.handleDragEnter,onDragLeave:T.handleDragLeave,onDragOver:T.handleDragOver,onDrop:T.handleDrop,onFileSelect:T.handleInputChange,onClear:T.clearFile,disabled:H}),r==="text"&&f.jsx("textarea",{value:u,onChange:J=>h(J.target.value),placeholder:"Paste bibliography text here...",disabled:H,rows:6,className:"w-full px-4 py-3 rounded-lg border focus:outline-none focus:ring-2 resize-y",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"}})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[!H&&!q&&f.jsx(Os,{onClick:V,loading:m,disabled:r==="url"&&!i.trim()||r==="file"&&!T.file||r==="text"&&!u.trim(),children:"Check References"}),q&&f.jsx(Os,{onClick:G,children:"New Check"}),!q&&f.jsx("span",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:(()=>{const J=$();return J?`Using ${J.name} (${J.provider})`:"No LLM configured - using regex extraction"})()})]})]})}const yl="";function jv(r){if(!r)return null;const c=/(\d{4}\.\d{4,5})(v\d+)?/;if(c.test(r)){const i=r.match(c);return i?i[1]:null}if(r.includes("arxiv.org")){const i=r.match(c);return i?i[1]:null}return null}function Ev(r,c){if(!r)return{type:"unknown"};const i=jv(r);return i?{type:"arxiv",arxivId:i,thumbnailUrl:`https://arxiv.org/abs/${i}`,pdfUrl:`https://arxiv.org/pdf/${i}.pdf`}:c==="file"?r.toLowerCase().endsWith(".pdf")?{type:"pdf",filename:r}:{type:"file",filename:r}:c==="text"?{type:"text"}:r.startsWith("http://")||r.startsWith("https://")?r.toLowerCase().includes(".pdf")?{type:"pdf",url:r}:{type:"url",url:r}:{type:"unknown"}}function wv(r,c,i,o){if(!r||i==="text")return null;if(i==="file"&&c&&o)return{type:"file",value:`/api/file/${o}`,display:c,checkId:o};if(c&&r.startsWith(c)){const h=r.substring(c.length).trim();(h.startsWith("http://")||h.startsWith("https://"))&&(r=h)}if(r.startsWith("http://")||r.startsWith("https://"))return{type:"url",value:r,display:r};const u=r.match(/^(?:arXiv:)?(\d{4}\.\d{4,5}(?:v\d+)?)$/i);if(u){const h=`https://arxiv.org/abs/${u[1]}`;return{type:"url",value:h,display:h}}return{type:"text",value:r,display:r}}function Nv(){const{status:r,statusMessage:c,progress:i,paperTitle:o,paperSource:u,sourceType:h,currentCheckId:m,sessionId:y,stats:x,cancelCheck:g,setError:b}=Ve(),{selectedCheck:v,selectedCheckId:A,isLoadingDetail:$,updateHistoryProgress:C,history:z}=st(),R=z.find(pe=>pe.id===A),T=A!==null&&A!==-1,V=A===m?y:v?.session_id,G=A===m;let F="idle",Q=null,H=null,q="",J=0,te=0,re=0,ie=null,ce=null,Ne=null;G&&r!=="idle"?(F=r,Q=o&&o!=="Unknown Paper"?o:R?.paper_title||v?.paper_title||o,H=u||R?.paper_source||v?.paper_source,q=c,J=i,te=x?.total_refs||0,re=x?.processed_refs||0,ie=v?.llm_provider,ce=v?.llm_model,Ne=v?.extraction_method||x?.extraction_method):T&&v&&(F=v.status||"idle",Q=v.custom_label||v.paper_title,H=v.paper_source,te=v.total_refs||0,re=v.processed_refs||0,J=te>0?re/te*100:0,ie=v.llm_provider,ce=v.llm_model,Ne=v.extraction_method,F==="in_progress"?re>0?q=`Processed ${re} of ${te} references...`:te>0?q=`Found ${te} references, starting verification...`:q="Extracting references...":F==="completed"?q=`Completed • ${te} references checked`:F==="cancelled"?q="Check cancelled":F==="error"&&(q="Check failed"));const Se=v?.source_type||(G?h:null),Ce=wv(H,Q,Se,A),E=Ev(H,Se),Z=F==="in_progress"||F==="checking",P=F==="completed",K=F==="cancelled",ge=F==="error",[_,B]=W.useState(null),[I,ee]=W.useState(!1),[oe,he]=W.useState(!1),[je,We]=W.useState(!1),[Le,Wt]=W.useState(null);W.useEffect(()=>{if(!A||A===-1){B(null),Wt(null),ee(!1);return}B(null),Wt(null),ee(!1),he(!0);const pe=`${yl}/api/thumbnail/${A}`;B(pe),Wt(`${yl}/api/preview/${A}`),he(!1)},[A]);const hn=()=>{if(!A||A===-1)return null;const pe={width:"80px",height:"100px",flexShrink:0,borderRadius:"4px",overflow:"hidden",backgroundColor:"var(--color-bg-tertiary)",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid var(--color-border)"},It={width:"24px",height:"24px",color:"var(--color-text-muted)"};let Gt=null;if(E?.type==="arxiv"&&E?.pdfUrl?Gt=E.pdfUrl:E?.type==="url"&&E?.url||E?.type==="pdf"&&E?.url?Gt=E.url:E?.type==="text"&&A?Gt=`${yl}/api/text/${A}`:E?.type==="file"&&A&&(Gt=`${yl}/api/file/${A}`),_&&!I){const et=f.jsx("img",{src:_,alt:"Paper thumbnail",style:{width:"100%",height:"100%",objectFit:"cover",objectPosition:"top"},onError:()=>ee(!0),onLoad:()=>he(!1)});return f.jsx("button",{type:"button",title:"Click to enlarge",onClick:xt=>{xt.stopPropagation(),We(!0)},style:{...pe,cursor:"pointer",transition:"border-color 0.2s, box-shadow 0.2s",padding:0,background:"none"},className:"hover:border-blue-400 hover:shadow-md",children:oe?f.jsxs("svg",{className:"w-6 h-6 animate-spin",fill:"none",viewBox:"0 0 24 24",style:{color:"var(--color-text-muted)"},children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):et})}if(E?.type==="arxiv")return f.jsx("a",{href:Gt||E.thumbnailUrl,target:"_blank",rel:"noopener noreferrer",title:`View on ArXiv: ${E.arxivId}`,onClick:et=>et.stopPropagation(),style:{...pe,textDecoration:"none",cursor:"pointer"},className:"hover:border-blue-400",children:f.jsxs("div",{style:{textAlign:"center"},children:[f.jsxs("svg",{style:It,viewBox:"0 0 24 24",fill:"currentColor",children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"}),f.jsx("polyline",{points:"14 2 14 8 20 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"}),f.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13",stroke:"white",strokeWidth:"1.5"}),f.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17",stroke:"white",strokeWidth:"1.5"})]}),f.jsx("div",{style:{fontSize:"8px",marginTop:"2px",color:"var(--color-text-muted)"},children:"arXiv"})]})});if(E?.type==="pdf"){const et=f.jsxs("div",{style:{textAlign:"center"},children:[f.jsxs("svg",{style:It,viewBox:"0 0 24 24",fill:"currentColor",children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"}),f.jsx("polyline",{points:"14 2 14 8 20 8",fill:"none",stroke:"currentColor",strokeWidth:"1.5"})]}),f.jsx("div",{style:{fontSize:"8px",marginTop:"2px",color:"var(--color-text-muted)"},children:"PDF"})]});return Gt?f.jsx("a",{href:Gt,target:"_blank",rel:"noopener noreferrer",title:"View PDF",onClick:xt=>xt.stopPropagation(),style:{...pe,textDecoration:"none",cursor:"pointer"},className:"hover:border-blue-400",children:et}):f.jsx("div",{style:pe,children:et})}if(E?.type==="text"){const et=A?`${yl}/api/text/${A}`:null,xt=f.jsxs("div",{style:{textAlign:"center"},children:[f.jsxs("svg",{style:It,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"}),f.jsx("path",{d:"M14 2v6h6"}),f.jsx("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),f.jsx("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]}),f.jsx("div",{style:{fontSize:"8px",marginTop:"2px",color:"var(--color-text-muted)"},children:"Text"})]});return et?f.jsx("a",{href:et,target:"_blank",rel:"noopener noreferrer",title:"View pasted text",onClick:Vl=>Vl.stopPropagation(),style:{...pe,textDecoration:"none",cursor:"pointer"},className:"hover:border-blue-400",children:xt}):f.jsx("div",{style:pe,children:xt})}if(E?.type==="file"){const et=A?`${yl}/api/file/${A}`:null,xt=f.jsxs("div",{style:{textAlign:"center"},children:[f.jsxs("svg",{style:It,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[f.jsx("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6z"}),f.jsx("path",{d:"M14 2v6h6"})]}),f.jsx("div",{style:{fontSize:"8px",marginTop:"2px",color:"var(--color-text-muted)"},children:"File"})]});return et?f.jsx("a",{href:et,target:"_blank",rel:"noopener noreferrer",title:"View uploaded file",onClick:Vl=>Vl.stopPropagation(),style:{...pe,textDecoration:"none",cursor:"pointer"},className:"hover:border-blue-400",children:xt}):f.jsx("div",{style:pe,children:xt})}return E?.type==="url"?f.jsx("a",{href:E.url,target:"_blank",rel:"noopener noreferrer",title:"Open URL",onClick:et=>et.stopPropagation(),style:{...pe,textDecoration:"none",cursor:"pointer"},className:"hover:border-blue-400",children:f.jsxs("div",{style:{textAlign:"center"},children:[f.jsxs("svg",{style:It,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),f.jsx("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]}),f.jsx("div",{style:{fontSize:"8px",marginTop:"2px",color:"var(--color-text-muted)"},children:"URL"})]})}):null};if(T&&$)return f.jsx("div",{className:"rounded-lg border p-4",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0 animate-pulse",style:{backgroundColor:"var(--color-bg-tertiary)"},children:f.jsxs("svg",{className:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24",style:{color:"var(--color-text-muted)"},children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]})}),f.jsx("div",{className:"flex-1 min-w-0",children:f.jsx("h3",{className:"font-medium",style:{color:"var(--color-text-primary)"},children:"Loading check details..."})})]})});if(!T||F==="idle")return null;const ta=()=>Z?f.jsxs("svg",{className:"w-6 h-6 animate-spin",fill:"none",viewBox:"0 0 24 24",style:{color:"var(--color-accent)"},children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):P?f.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"var(--color-success)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):K?f.jsx("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",style:{color:"var(--color-warning)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}):ge?f.jsx("svg",{className:"w-6 h-6",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",style:{color:"var(--color-error)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}):null,ar=()=>Z?"var(--color-info-bg)":P?"var(--color-success-bg)":K?"var(--color-warning-bg)":ge?"var(--color-error-bg)":"var(--color-bg-tertiary)",Ft=Z&&V;return f.jsxs("div",{className:"rounded-lg border p-4",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("div",{className:"w-10 h-10 rounded-full flex items-center justify-center flex-shrink-0",style:{backgroundColor:ar()},children:ta()}),hn(),f.jsxs("div",{className:"flex-1 min-w-0",children:[Q&&f.jsx("h3",{className:"font-medium",style:{color:"var(--color-text-primary)",wordBreak:"break-word",overflowWrap:"anywhere"},children:Q}),Ce&&E?.type!=="text"&&f.jsx("p",{className:"text-sm",style:{color:"var(--color-text-muted)",wordBreak:"break-all",overflowWrap:"anywhere"},title:Ce.value,children:Ce.type==="url"||Ce.type==="file"?f.jsx("a",{href:Ce.value,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},onClick:pe=>pe.stopPropagation(),children:Ce.display}):Ce.display}),Ne&&["bbl","bib"].includes(Ne)?f.jsxs("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:["Source:"," ",A?f.jsx("a",{href:`${yl}/api/bibliography/${A}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},onClick:pe=>pe.stopPropagation(),children:Se==="text"?`Pasted .${Ne} file`:`ArXiv .${Ne} file`}):Se==="text"?`Pasted .${Ne} file`:`ArXiv .${Ne} file`]}):Ne==="pdf"?f.jsx("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:"Source: PDF extraction"}):Se==="text"&&A?f.jsxs("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:["Source:"," ",f.jsx("a",{href:`${yl}/api/text/${A}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},onClick:pe=>pe.stopPropagation(),children:"Pasted text"})]}):Se==="file"&&A?f.jsxs("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:["Source:"," ",f.jsx("a",{href:`${yl}/api/file/${A}`,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},onClick:pe=>pe.stopPropagation(),children:"Uploaded file"})]}):ce&&f.jsxs("p",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:["Model: ",ie?`${ie} / `:"",ce]}),f.jsx("p",{className:"text-sm",style:{color:ge?"var(--color-error)":"var(--color-text-muted)",wordBreak:"break-word",overflowWrap:"anywhere"},children:q})]}),Ft&&f.jsx("button",{onClick:async()=>{if(V)try{D.info("StatusSection",`Cancelling check ${V}`),await Rm(V),A&&C(A,{status:"cancelled"}),V===y&&g()}catch(pe){D.error("StatusSection","Failed to cancel",pe),A&&C(A,{status:"cancelled"}),V===y&&g(),b(pe.response?.data?.detail||pe.message||"Failed to cancel")}},className:"px-3 py-2 text-sm font-medium rounded transition-colors cursor-pointer hover:opacity-80",style:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)"},onMouseEnter:pe=>{pe.currentTarget.style.backgroundColor="var(--color-error)",pe.currentTarget.style.color="white"},onMouseLeave:pe=>{pe.currentTarget.style.backgroundColor="var(--color-error-bg)",pe.currentTarget.style.color="var(--color-error)"},children:"Cancel"})]}),Z&&f.jsxs("div",{className:"mt-4",children:[f.jsx("div",{className:"h-2 rounded-full overflow-hidden",style:{backgroundColor:"var(--color-bg-tertiary)"},children:f.jsx("div",{className:"h-full rounded-full transition-all duration-300 progress-bar",style:{width:`${Math.round(J)}%`}})}),f.jsx("p",{className:"text-xs mt-1",style:{color:"var(--color-text-muted)"},children:te>0?`${Math.round(J)}% complete`:"Starting..."})]}),je&&(Le||_)&&f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"rgba(0, 0, 0, 0.9)"},onClick:()=>We(!1),children:f.jsxs("div",{className:"relative w-full h-full flex items-center justify-center p-8",children:[f.jsx("button",{type:"button",onClick:()=>We(!1),className:"absolute top-4 right-4 w-10 h-10 flex items-center justify-center rounded-full bg-white/10 hover:bg-white/20 text-white transition-colors z-10",title:"Close (Esc)",children:f.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})}),f.jsx("img",{src:Le||_,alt:"Paper preview",style:{maxWidth:"95vw",maxHeight:"95vh",objectFit:"contain"},className:"rounded-lg shadow-2xl",onClick:pe=>pe.stopPropagation(),onError:pe=>{Le&&_&&pe.target.src!==_&&(pe.target.src=_)}})]})})]})}function kv({stats:r,isComplete:c,references:i,paperTitle:o,paperSource:u}){const{statusFilter:h,setStatusFilter:m}=Ve(),[y,x]=W.useState(!1),g=W.useRef(null);W.useEffect(()=>{const ie=ce=>{g.current&&!g.current.contains(ce.target)&&x(!1)};return document.addEventListener("mousedown",ie),()=>document.removeEventListener("mousedown",ie)},[]);const b={verified:{id:"verified",label:"Verified",color:"var(--color-success)",bgColor:"var(--color-success-bg)"},error:{id:"error",label:"Errors",color:"var(--color-error)",bgColor:"var(--color-error-bg)"},warning:{id:"warning",label:"Warnings",color:"var(--color-warning)",bgColor:"var(--color-warning-bg)"},suggestion:{id:"suggestion",label:"Suggestions",color:"var(--color-suggestion)",bgColor:"var(--color-suggestion-bg)"},unverified:{id:"unverified",label:"Unverified",color:"var(--color-text-muted)",bgColor:"var(--color-bg-tertiary)"}},v=[{...b.error,value:r.errors_count||0},{...b.warning,value:r.warnings_count||0},{...b.suggestion,value:r.suggestions_count||0},{...b.unverified,value:r.unverified_count||0}],A=ie=>{m(ie)},$=h.length>0,C=$?h[0]:null,z=C?b[C]:null,R=r.refs_with_errors??0,T=r.refs_with_warnings_only??0,V=r.refs_verified??r.verified_count??0,G=r.unverified_count??0,F=r.processed_refs??0,Q=h.includes("verified"),H=h.includes("error"),q=h.includes("warning"),J=h.includes("unverified"),te=`refchecker-${(o||"report").replace(/[^a-z0-9]/gi,"_").substring(0,50)}`,re=ie=>{x(!1);const ce={paperTitle:o,paperSource:u,stats:r,references:i};switch(ie){case"markdown":uc(uv(ce),`${te}.md`,"text/markdown");break;case"text":uc(dv(ce),`${te}.txt`,"text/plain");break;case"bibtex":uc(mv(ce),`${te}.bib`,"application/x-bibtex");break}};return f.jsxs("div",{className:"rounded-lg border p-3",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsxs("div",{className:"flex items-center justify-between mb-3 relative",style:{height:"24px"},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("h3",{className:"font-semibold text-sm",style:{color:"var(--color-text-primary)"},children:"Summary"}),!c&&r.processed_refs>0&&r.processed_refs<r.total_refs&&f.jsxs("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:[r.processed_refs,"/",r.total_refs," checked"]})]}),f.jsxs("div",{className:"absolute right-0 top-0 flex items-center gap-2",children:[$&&z&&f.jsxs("button",{onClick:()=>A(C),className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs font-medium transition-opacity hover:opacity-80",style:{backgroundColor:z.bgColor,color:z.color},children:[f.jsxs("span",{children:["Showing ",z.label.toLowerCase()]}),f.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{d:"M18 6L6 18M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round"})})]}),f.jsxs("div",{className:"relative",ref:g,children:[f.jsxs("button",{onClick:()=>c&&x(!y),disabled:!c,className:`flex items-center gap-1.5 px-2 py-0.5 rounded text-xs font-medium transition-all ${c?"cursor-pointer hover:opacity-80":"cursor-not-allowed opacity-40"}`,style:{backgroundColor:c?"var(--color-accent)":"var(--color-bg-tertiary)",color:c?"white":"var(--color-text-muted)"},title:c?"Export results":"Export available when check completes",children:[f.jsxs("svg",{className:"w-3.5 h-3.5",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[f.jsx("path",{d:"M21 15v4a2 2 0 01-2 2H5a2 2 0 01-2-2v-4",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("polyline",{points:"7,10 12,15 17,10",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("line",{x1:"12",y1:"15",x2:"12",y2:"3",strokeLinecap:"round",strokeLinejoin:"round"})]}),f.jsx("span",{children:"Export"}),f.jsx("svg",{className:"w-3 h-3",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),y&&f.jsxs("div",{className:"absolute right-0 top-full mt-1 py-1 rounded-lg border shadow-lg z-50",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)",minWidth:"140px"},children:[f.jsx("button",{onClick:()=>re("markdown"),className:"w-full px-3 py-1.5 text-xs text-left transition-colors cursor-pointer hover:bg-[var(--color-bg-tertiary)]",style:{color:"var(--color-text-primary)"},children:"📝 Markdown (.md)"}),f.jsx("button",{onClick:()=>re("text"),className:"w-full px-3 py-1.5 text-xs text-left transition-colors cursor-pointer hover:bg-[var(--color-bg-tertiary)]",style:{color:"var(--color-text-primary)"},children:"📄 Plain Text (.txt)"}),f.jsx("button",{onClick:()=>re("bibtex"),className:"w-full px-3 py-1.5 text-xs text-left transition-colors cursor-pointer hover:bg-[var(--color-bg-tertiary)]",style:{color:"var(--color-text-primary)"},children:"📚 BibTeX (.bib)"})]})]})]})]}),f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.jsxs("button",{onClick:()=>A("verified"),className:`flex items-center gap-1 px-2 py-1 rounded transition-all cursor-pointer hover:opacity-80 ${Q?"ring-1":""}`,style:{backgroundColor:Q?"var(--color-success-bg)":"transparent",ringColor:"var(--color-success)"},title:"Filter by verified",children:[f.jsxs("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-success)"}),f.jsx("path",{d:"M8.5 12.5l2.5 2.5 4.5-5",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}),f.jsx("span",{className:"text-sm font-bold",style:{color:"var(--color-success)"},children:V})]}),f.jsxs("button",{onClick:()=>A("error"),disabled:R===0,className:`flex items-center gap-1 px-2 py-1 rounded transition-all ${R>0?"cursor-pointer hover:opacity-80":"cursor-default opacity-50"} ${H?"ring-1":""}`,style:{backgroundColor:H?"var(--color-error-bg)":"transparent",ringColor:"var(--color-error)"},title:R>0?"Filter by errors":"No errors",children:[f.jsxs("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-error)"}),f.jsx("path",{d:"M12 7v6",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1.2",fill:"#fff"})]}),f.jsx("span",{className:"text-sm font-bold",style:{color:R>0?"var(--color-error)":"var(--color-text-muted)"},children:R})]}),f.jsxs("button",{onClick:()=>A("warning"),disabled:T===0,className:`flex items-center gap-1 px-2 py-1 rounded transition-all ${T>0?"cursor-pointer hover:opacity-80":"cursor-default opacity-50"} ${q?"ring-1":""}`,style:{backgroundColor:q?"var(--color-warning-bg)":"transparent",ringColor:"var(--color-warning)"},title:T>0?"Filter by warnings":"No warnings",children:[f.jsxs("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",children:[f.jsx("path",{d:"M12 2L2 20h20L12 2z",fill:"var(--color-warning)"}),f.jsx("path",{d:"M12 9v4",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1",fill:"#fff"})]}),f.jsx("span",{className:"text-sm font-bold",style:{color:T>0?"var(--color-warning)":"var(--color-text-muted)"},children:T})]}),G>0&&f.jsxs("button",{onClick:()=>A("unverified"),className:`flex items-center gap-1 px-2 py-1 rounded transition-all cursor-pointer hover:opacity-80 ${J?"ring-1":""}`,style:{backgroundColor:J?"var(--color-bg-tertiary)":"transparent",ringColor:"var(--color-text-muted)"},title:"Filter by unverified",children:[f.jsxs("svg",{className:"w-3.5 h-3.5 flex-shrink-0",viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-text-muted)"}),f.jsx("text",{x:"12",y:"16",textAnchor:"middle",fill:"#fff",fontSize:"12",fontWeight:"bold",children:"?"})]}),f.jsx("span",{className:"text-sm font-bold",style:{color:"var(--color-text-muted)"},children:G})]}),f.jsxs("span",{className:"text-xs px-1",style:{color:"var(--color-text-muted)"},children:["of ",F]}),f.jsx("div",{className:"w-px h-4 mx-1",style:{backgroundColor:"var(--color-border)"}}),v.filter(ie=>ie.value>0).map(ie=>{const ce=h.includes(ie.id);return f.jsxs("button",{onClick:()=>A(ie.id),className:"flex items-center gap-1 px-2 py-0.5 rounded-full text-xs transition-all cursor-pointer hover:opacity-80 border",style:{backgroundColor:ce?ie.bgColor:"transparent",borderColor:ce?ie.color:"var(--color-border)",color:ie.color},title:`Filter by ${ie.label.toLowerCase()}`,children:[f.jsx("span",{className:"font-bold",children:ie.value}),f.jsx("span",{children:ie.label})]},ie.id)})]})]})}const Tv=/https?:\/\/[^\s]+/g,sm=r=>{if(!r)return null;const c=r.split(`
|
|
25
|
+
`);if(c.length>=3){const m=c[0].replace(/:$/,"").trim(),x=c[1].match(/cited:\s*(.*)/),g=x?x[1].trim():null,v=c[2].match(/actual:\s*(.*)/),A=v?v[1].trim():null;return{prefix:m,cited:g,actual:A,isMultiline:!0}}const i=r.match(/cited:\s*'([^']*)'/),o=r.match(/actual:\s*'([^']*)'/);let u=r;const h=r.indexOf("cited:");return h>0?u=r.substring(0,h).trim():h===0&&(u=null),{prefix:u,cited:i?i[1]:null,actual:o?o[1]:null,isMultiline:!1}},cn=r=>{if(!r)return null;const c=[];let i=0,o;for(;(o=Tv.exec(r))!==null;){o.index>i&&c.push(r.slice(i,o.index));const u=o[0];c.push({type:"link",url:u}),i=o.index+u.length}return i<r.length&&c.push(r.slice(i)),c.map((u,h)=>typeof u=="string"?f.jsx("span",{children:u},`txt-${h}`):f.jsx("a",{href:u.url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},children:u.url},`url-${h}`))};function Av({reference:r,index:c,displayIndex:i,totalRefs:o}){const u=typeof c=="number"?c:typeof i=="number"?i:0,h=(r.status||"").toLowerCase(),[m,y]=W.useState(!1),x=W.useRef(null);W.useEffect(()=>{const C=z=>{x.current&&!x.current.contains(z.target)&&y(!1)};return m&&document.addEventListener("mousedown",C),()=>document.removeEventListener("mousedown",C)},[m]);const g=async C=>{let z;switch(C){case"markdown":z=tm(r);break;case"plaintext":z=pv(r);break;case"bibtex":z=Om(r);break;default:z=tm(r)}await fv(z),y(!1)},b=()=>{switch(h){case"verified":return"var(--color-success)";case"warning":return"var(--color-warning)";case"error":return"var(--color-error)";case"suggestion":return"var(--color-suggestion)";case"unverified":return"var(--color-text-muted)";case"unchecked":return"var(--color-text-muted)";case"checking":return"var(--color-accent)";case"pending":return"var(--color-text-muted)";default:return"var(--color-text-muted)"}},v=()=>{const C="w-7 h-7";return h==="checking"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Checking...",children:f.jsxs("svg",{className:`${C} animate-spin`,viewBox:"0 0 24 24",fill:"none",style:{color:b()},children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"3"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):h==="pending"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Waiting in queue",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-bg-tertiary)",stroke:b(),strokeWidth:"2"}),f.jsx("path",{d:"M12 7v5l3 2",stroke:b(),strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}):h==="error"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Error",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-error)"}),f.jsx("path",{d:"M12 7v6",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1.2",fill:"#fff"})]})}):h==="verified"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Verified",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-success)"}),f.jsx("path",{d:"M8.5 12.5l2.5 2.5 4.5-5",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]})}):h==="warning"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Warning",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("path",{d:"M12 2L2 20h20L12 2z",fill:"var(--color-warning)"}),f.jsx("path",{d:"M12 9v4",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1",fill:"#fff"})]})}):h==="suggestion"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Suggestion",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-suggestion)"}),f.jsx("path",{d:"M12 7v4m0 0l-2-2m2 2l2-2",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1.2",fill:"#fff"})]})}):h==="unchecked"?f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Not checked (check cancelled or timed out)",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-text-muted)"}),f.jsx("path",{d:"M8 12h8",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round"})]})}):f.jsx("span",{className:"flex-shrink-0 inline-block",title:"Unverified",children:f.jsxs("svg",{className:C,viewBox:"0 0 24 24",fill:"none",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10",fill:"var(--color-text-muted)"}),f.jsx("path",{d:"M10.75 9.5c.1-1.1.95-2 2.2-2 1.21 0 2.2.89 2.2 1.99 0 .86-.56 1.6-1.4 1.83-.55.15-.95.63-.95 1.2v.23",stroke:"#fff",strokeWidth:"1.6",strokeLinecap:"round"}),f.jsx("circle",{cx:"12",cy:"16",r:"1",fill:"#fff"})]})})},A=C=>{switch(C){case"semantic_scholar":return"Verified URL";case"arxiv":return"ArXiv URL";case"doi":return"DOI URL";case"openalex":return"OpenAlex URL";case"openreview":return"OpenReview URL";default:return"URL"}},$=C=>{switch(C){case"author":return"Author";case"year":return"Year";case"venue":return"Venue";case"title":return"Title";default:return C?.charAt(0).toUpperCase()+C?.slice(1)||"Unknown"}};return f.jsx("div",{className:"py-4 border-b font-mono text-sm",style:{borderColor:"var(--color-border)"},children:f.jsxs("div",{className:"flex items-start gap-3 pl-4 pr-8",children:[f.jsx("div",{className:"flex-shrink-0 w-8 flex justify-center pt-0.5",children:v()}),f.jsxs("span",{className:"flex-shrink-0 w-8 text-right",style:{color:"var(--color-text-secondary)"},children:[(u??0)+1,"."]}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-start justify-between gap-2",children:[f.jsx("div",{className:"font-bold flex-1",style:{color:"var(--color-text-primary)"},children:r.title||r.cited_url||"Unknown Title"}),f.jsxs("div",{className:"relative flex-shrink-0",ref:x,children:[f.jsx("button",{onClick:()=>y(!m),className:"p-1 rounded opacity-40 hover:opacity-100 transition-opacity cursor-pointer",style:{color:"var(--color-text-secondary)"},title:"Copy corrected reference",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:"2",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})})}),m&&f.jsxs("div",{className:"absolute right-0 top-full mt-1 py-1 rounded-md shadow-lg z-50 min-w-[140px]",style:{backgroundColor:"var(--color-bg-secondary)",border:"1px solid var(--color-border)"},children:[f.jsxs("button",{onClick:()=>g("markdown"),className:"w-full px-3 py-1.5 text-left text-xs hover:bg-black/10 dark:hover:bg-white/10 cursor-pointer flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[f.jsx("span",{children:"📝"})," Markdown"]}),f.jsxs("button",{onClick:()=>g("plaintext"),className:"w-full px-3 py-1.5 text-left text-xs hover:bg-black/10 dark:hover:bg-white/10 cursor-pointer flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[f.jsx("span",{children:"📄"})," Plain Text"]}),f.jsxs("button",{onClick:()=>g("bibtex"),className:"w-full px-3 py-1.5 text-left text-xs hover:bg-black/10 dark:hover:bg-white/10 cursor-pointer flex items-center gap-2",style:{color:"var(--color-text-primary)"},children:[f.jsx("span",{children:"📚"})," BibTeX"]})]})]})]}),r.authors?.length>0&&f.jsx("div",{style:{color:"var(--color-text-secondary)"},children:nr(r.authors)}),r.venue&&f.jsx("div",{style:{color:"var(--color-text-secondary)"},children:r.venue}),r.year&&f.jsx("div",{style:{color:"var(--color-text-secondary)"},children:r.year}),r.cited_url&&f.jsx("div",{children:f.jsx("a",{href:r.cited_url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},children:r.cited_url})}),(r.authoritative_urls?.length>0||r.errors?.length>0||r.warnings?.length>0||r.status==="unverified")&&f.jsxs("div",{className:"my-3 flex items-center gap-3",children:[f.jsx("span",{className:"text-xs uppercase tracking-wide font-medium",style:{color:"var(--color-text-muted)"},children:"Verification"}),f.jsx("div",{className:"flex-1 border-t",style:{borderColor:"var(--color-border)"}})]}),(()=>{const C=r.authoritative_urls||[],z=new Set;return C.filter(T=>T.type==="arxiv"?z.has("arxiv")||C.some(G=>G.type==="arxiv"&&G.url?.includes("/abs/"))&&T.url?.includes("/pdf/")?!1:(z.add("arxiv"),!0):!0).map((T,V)=>f.jsxs("div",{className:"flex",children:[f.jsxs("span",{className:"flex-shrink-0",style:{color:"var(--color-text-secondary)",width:"120px"},children:[A(T.type),":"]}),f.jsx("a",{href:T.url,target:"_blank",rel:"noopener noreferrer",className:"hover:underline",style:{color:"var(--color-link)"},children:T.url})]},V))})(),r.status==="unverified"&&f.jsxs("div",{className:"flex items-start gap-2",style:{color:"var(--color-text-muted)",wordBreak:"break-word"},children:[f.jsx("span",{className:"pt-0.5 inline-block flex-shrink-0",children:f.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("text",{x:"12",y:"16",textAnchor:"middle",fill:"#fff",fontSize:"14",fontWeight:"bold",children:"?"})]})}),f.jsxs("div",{children:[f.jsxs("div",{children:["Could not verify: ",r.title||"Unknown"]}),r.errors?.find(C=>C.error_type==="unverified")&&f.jsxs("div",{children:["Subreason: ",cn(r.errors.find(C=>C.error_type==="unverified")?.error_details||"Paper not found by any checker")]})]})]}),r.warnings?.map((C,z)=>{const R=sm(C.error_details),V=(R?.cited||R?.actual)&&R?.prefix?R.prefix.replace(/:$/,""):C.error_details||`${$(C.error_type)} mismatch`;return f.jsxs("div",{style:{color:"var(--color-warning)",wordBreak:"break-word"},children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{children:"⚠️"}),f.jsxs("span",{children:[f.jsx("span",{className:"font-bold",children:"Warning:"})," ",V]})]}),(R?.cited||C.cited_value)&&f.jsxs("div",{className:"flex ml-6",children:[f.jsx("span",{className:"flex-shrink-0",style:{width:"70px"},children:f.jsx("span",{className:"font-bold",children:"cited:"})}),f.jsx("span",{children:cn(R?.cited||C.cited_value)})]}),(R?.actual||C.actual_value)&&f.jsxs("div",{className:"flex ml-6",children:[f.jsx("span",{className:"flex-shrink-0",style:{width:"70px"},children:f.jsx("span",{className:"font-bold",children:"actual:"})}),f.jsx("span",{children:cn(R?.actual||C.actual_value)})]})]},`warning-${z}`)}),r.errors?.filter(C=>C.error_type!=="unverified").map((C,z)=>{const R=sm(C.error_details),T=R?.cited||R?.actual,V=T&&R?.prefix?R.prefix:C.error_details||C.error_type;return f.jsxs("div",{style:{color:"var(--color-error)",wordBreak:"break-word"},children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"pt-0.5 inline-block flex-shrink-0",children:f.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("path",{d:"M12 7v6",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1.2",fill:"#fff"})]})}),f.jsxs("span",{children:[f.jsx("span",{className:"font-bold",children:"Error:"})," ",T?V:cn(V)]})]}),(R?.cited||C.cited_value)&&f.jsxs("div",{className:"flex ml-6",children:[f.jsx("span",{className:"flex-shrink-0",style:{width:"70px"},children:f.jsx("span",{className:"font-bold",children:"cited:"})}),f.jsx("span",{children:cn(R?.cited||C.cited_value)})]}),(R?.actual||C.actual_value)&&f.jsxs("div",{className:"flex ml-6",children:[f.jsx("span",{className:"flex-shrink-0",style:{width:"70px"},children:f.jsx("span",{className:"font-bold",children:"actual:"})}),f.jsx("span",{children:cn(R?.actual||C.actual_value)})]})]},`error-${z}`)}),r.suggestions?.map((C,z)=>f.jsx("div",{style:{color:"var(--color-suggestion)",wordBreak:"break-word"},children:f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"pt-0.5 inline-block flex-shrink-0",children:f.jsxs("svg",{className:"w-4 h-4",viewBox:"0 0 24 24",fill:"currentColor",children:[f.jsx("circle",{cx:"12",cy:"12",r:"10"}),f.jsx("path",{d:"M12 7v4m0 0l-2-2m2 2l2-2",stroke:"#fff",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),f.jsx("circle",{cx:"12",cy:"15.5",r:"1.2",fill:"#fff"})]})}),f.jsxs("span",{children:[f.jsx("span",{className:"font-bold",children:"Suggestion:"})," ",cn(C.suggestion_details||C)]})]})},`suggestion-${z}`))]})]})})}const Mv=(r,c=!1)=>{const i=(r.status||"").trim().toLowerCase();if(["error","warning","suggestion","unverified","verified"].includes(i))return i;if(i==="pending"||i==="checking"||["in_progress","queued","processing","started"].includes(i))return c?"unchecked":i==="pending"?"pending":"checking";const o=Array.isArray(r.errors)&&r.errors.some(m=>(m?.error_type||"").toLowerCase()!=="unverified"),u=!o&&Array.isArray(r.warnings)&&r.warnings.length>0,h=!o&&!u&&Array.isArray(r.suggestions)&&r.suggestions.length>0;return o?"error":u?"warning":h?"suggestion":"verified"};function zv({references:r,isLoading:c,isCheckComplete:i=!1}){const{statusFilter:o}=Ve(),{sortedReferences:u,filteredReferences:h,normalizedFilters:m}=W.useMemo(()=>{const y=o.map(v=>v.toLowerCase()),x=(r||[]).slice().sort((v,A)=>{const $=typeof v?.index=="number"?v.index:Number.MAX_SAFE_INTEGER,C=typeof A?.index=="number"?A.index:Number.MAX_SAFE_INTEGER;return $-C}),b=x.map(v=>({...v,status:Mv(v,i),errors:Array.isArray(v.errors)?v.errors:[],warnings:Array.isArray(v.warnings)?v.warnings:[]})).filter(v=>{const A=(v.status||"").toLowerCase();return y.length===0?!0:y.some($=>{switch($){case"verified":return A==="verified"||A==="suggestion";case"error":return v.errors?.some(C=>C.error_type!=="unverified");case"warning":return v.warnings?.length>0;case"suggestion":return v.suggestions?.length>0;case"unverified":return A==="unverified"||v.errors?.some(C=>C.error_type==="unverified");default:return A===$}})});return{sortedReferences:x,filteredReferences:b,normalizedFilters:y}},[r,o,i]);return c?f.jsxs("div",{className:"rounded-lg border p-8 text-center",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsxs("svg",{className:"animate-spin h-8 w-8 mx-auto mb-3",fill:"none",viewBox:"0 0 24 24",style:{color:"var(--color-accent)"},children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}),f.jsx("p",{style:{color:"var(--color-text-muted)"},children:"Loading references..."})]}):!r||r.length===0?f.jsxs("div",{className:"rounded-lg border p-8 text-center",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsx("svg",{className:"w-12 h-12 mx-auto mb-3 opacity-50",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"var(--color-text-muted)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),f.jsx("p",{style:{color:"var(--color-text-muted)"},children:"No references extracted yet"}),f.jsx("p",{className:"text-sm mt-1",style:{color:"var(--color-text-muted)"},children:"References will appear here as they are found"})]}):f.jsxs("div",{className:"rounded-lg border overflow-hidden relative",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsxs("div",{className:"px-4 py-3 border-b flex items-center justify-between relative",style:{borderColor:"var(--color-border)",minHeight:"48px"},children:[f.jsxs("h3",{className:"font-semibold",style:{color:"var(--color-text-primary)"},children:["References (",u.length,")"]}),o.length>0&&f.jsxs("span",{className:"absolute right-4 text-sm px-2 py-1 rounded",style:{backgroundColor:"var(--color-bg-tertiary)",color:"var(--color-text-secondary)"},children:["Showing ",h.length," (",o.join(", "),")"]})]}),f.jsx("div",{className:"divide-y",style:{borderColor:"var(--color-border)"},children:h.map((y,x)=>f.jsx(Av,{reference:y,index:y.index??x,displayIndex:x,totalRefs:u.length},`ref-${y.index??x}-${x}`))})]})}function Rv(){const{status:r,references:c,stats:i,currentCheckId:o,clearStatusFilter:u}=Ve(),{selectedCheck:h,selectedCheckId:m,isLoadingDetail:y,selectCheck:x}=st(),g=m===-1,b=m!==null&&m!==-1;W.useEffect(()=>{u()},[m,u]);const v=g||!b&&r==="idle",A=b,$=m===o,C=h&&h.id===m,z=C?h.status:$?r:"idle",R=z==="in_progress"||z==="checking",T=z==="completed"||z==="cancelled",V=C?h.custom_label||h.paper_title:null,G=C?h.paper_source:null,Q=$&&c&&c.length>0?c:C&&h.results?h.results.map((J,te)=>({...J,index:te})):[],q=(()=>{if($&&i&&i.total_refs>0)return i;if(C){const J=h.total_refs||0,te=Q?.filter(P=>P.status&&!["pending","checking"].includes(P.status.toLowerCase())).length||0,re=h.processed_refs||te||0,ie=h.errors_count||0,ce=h.warnings_count||0,Ne=h.suggestions_count||0,Se=h.unverified_count||0,Ce=h.refs_verified??h.verified_count??Math.max(0,(R?re:J)-ie-ce-Se);let E=h.refs_with_errors,Z=h.refs_with_warnings_only;return E===void 0&&Q?.length>0&&(E=Q.filter(P=>P.status==="error"||P.errors?.some(K=>K.error_type!=="unverified")).length),Z===void 0&&Q?.length>0&&(Z=Q.filter(P=>(P.status==="warning"||P.warnings?.length>0)&&P.status!=="error"&&!P.errors?.some(K=>K.error_type!=="unverified")).length),{total_refs:J,processed_refs:re,verified_count:Ce,refs_verified:Ce,errors_count:ie,warnings_count:ce,suggestions_count:Ne,unverified_count:Se,refs_with_errors:E??0,refs_with_warnings_only:Z??0,progress_percent:J>0?re/J*100:0}}return i||{total_refs:0,processed_refs:0,verified_count:0,refs_verified:0,errors_count:0,warnings_count:0,suggestions_count:0,unverified_count:0,refs_with_errors:0,refs_with_warnings_only:0,progress_percent:0}})();return f.jsx("main",{className:"flex-1 relative",style:{backgroundColor:"var(--color-bg-primary)",overflowY:"scroll"},children:f.jsxs("div",{className:"max-w-4xl mx-auto p-6 space-y-6",children:[v&&f.jsx(Cv,{}),A&&f.jsx(Nv,{}),A&&f.jsx(kv,{stats:q,isComplete:T,references:Q,paperTitle:V,paperSource:G}),A&&f.jsx(zv,{references:Q,isLoading:y,isCheckComplete:T})]})})}function Ov(){const{logs:r,isEnabled:c,isVisible:i,filter:o,toggleEnabled:u,toggleVisible:h,setFilter:m,clearLogs:y}=im(),[x,g]=W.useState(null),b=W.useRef(null);W.useEffect(()=>{i&&b.current&&b.current.scrollIntoView({behavior:"smooth"})},[r,i]);const v=r.filter(T=>o==="all"?!0:T.level.toLowerCase()===o),A=T=>{switch(T){case"ERROR":return"#ef4444";case"WARN":return"#f59e0b";case"INFO":return"#3b82f6";case"DEBUG":return"#6b7280";default:return"#9ca3af"}},$=T=>{switch(T){case"ERROR":return"rgba(239, 68, 68, 0.1)";case"WARN":return"rgba(245, 158, 11, 0.1)";case"INFO":return"rgba(59, 130, 246, 0.1)";default:return"transparent"}},C=async()=>{if(confirm("Clear all cached verification results?")){g("cache");try{const T=await sv();alert(T.data.message)}catch(T){alert("Failed to clear cache: "+(T.response?.data?.detail||T.message))}finally{g(null)}}},z=async()=>{if(confirm("Clear all data (cache + history)? This cannot be undone.")){g("database");try{const T=await iv();alert(T.data.message),window.location.reload()}catch(T){alert("Failed to clear database: "+(T.response?.data?.detail||T.message))}finally{g(null)}}},R=f.jsx("button",{onClick:h,className:"fixed bottom-4 right-4 z-50 p-2 rounded-full shadow-lg transition-all",style:{backgroundColor:c?i?"#3b82f6":"#1f2937":"#374151",color:c?"white":"#9ca3af"},title:i?"Hide Debug Panel":"Show Debug Panel",children:f.jsx("svg",{className:"w-6 h-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 20l4-16m4 4l4 4-4 4M6 16l-4-4 4-4"})})});return i?f.jsxs(f.Fragment,{children:[R,f.jsxs("div",{className:"fixed bottom-16 right-4 z-40 w-[600px] max-w-[90vw] rounded-lg shadow-xl border overflow-hidden",style:{backgroundColor:"#1f2937",borderColor:"#374151",maxHeight:"50vh"},children:[f.jsxs("div",{className:"flex items-center justify-between px-4 py-2 border-b",style:{borderColor:"#374151",backgroundColor:"#111827"},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"text-white font-medium text-sm",children:"Debug Logs"}),f.jsxs("span",{className:"text-xs px-2 py-0.5 rounded",style:{backgroundColor:"#374151",color:"#9ca3af"},children:[v.length," entries"]})]}),f.jsxs("div",{className:"flex items-center gap-2",children:[f.jsx("button",{onClick:C,disabled:x!==null,className:"text-xs px-2 py-1 rounded",style:{backgroundColor:"#374151",color:"#9ca3af"},title:"Clear verification cache",children:x==="cache"?"...":"Clear Cache"}),f.jsx("button",{onClick:z,disabled:x!==null,className:"text-xs px-2 py-1 rounded",style:{backgroundColor:"#7f1d1d",color:"#fca5a5"},title:"Clear all data (cache + history)",children:x==="database"?"...":"Clear All"}),f.jsx("div",{className:"w-px h-4 bg-gray-600"}),f.jsxs("select",{value:o,onChange:T=>m(T.target.value),className:"text-xs px-2 py-1 rounded border-0",style:{backgroundColor:"#374151",color:"#e5e7eb"},children:[f.jsx("option",{value:"all",children:"All"}),f.jsx("option",{value:"error",children:"Errors"}),f.jsx("option",{value:"warn",children:"Warnings"}),f.jsx("option",{value:"info",children:"Info"}),f.jsx("option",{value:"debug",children:"Debug"})]}),f.jsx("button",{onClick:u,className:"text-xs px-2 py-1 rounded",style:{backgroundColor:c?"#059669":"#374151",color:c?"white":"#9ca3af"},children:c?"ON":"OFF"}),f.jsx("button",{onClick:y,className:"text-xs px-2 py-1 rounded",style:{backgroundColor:"#374151",color:"#9ca3af"},children:"Clear Logs"}),f.jsx("button",{onClick:h,className:"text-gray-400 hover:text-white",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]}),f.jsxs("div",{className:"overflow-y-auto font-mono text-xs",style:{maxHeight:"calc(50vh - 44px)"},children:[c?v.length===0?f.jsx("div",{className:"p-4 text-center text-gray-500",children:"No logs yet. Start a check to see logs."}):v.map(T=>f.jsxs("div",{className:"px-3 py-1.5 border-b hover:bg-gray-800",style:{borderColor:"#374151",backgroundColor:$(T.level)},children:[f.jsxs("div",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"text-gray-500 shrink-0",children:T.timestamp.split("T")[1].split(".")[0]}),f.jsx("span",{className:"font-bold shrink-0 w-12",style:{color:A(T.level)},children:T.level}),f.jsxs("span",{className:"text-purple-400 shrink-0",children:["[",T.component,"]"]}),f.jsx("span",{className:"text-gray-200 break-all",children:T.message})]}),T.data&&f.jsx("pre",{className:"mt-1 ml-24 text-gray-400 whitespace-pre-wrap break-all",style:{fontSize:"10px"},children:T.data})]},T.id)):f.jsx("div",{className:"p-4 text-center text-gray-500",children:'Debug logging is disabled. Click "ON" to enable.'}),f.jsx("div",{ref:b})]})]})]}):R}function Lv(){const r=Ve(h=>h.activeSessions),c=Ve(h=>h.handleWebSocketMessage),i=Ve(h=>h.setError),o=Ve(h=>h.unregisterSession),u=W.useRef(new Map);return W.useEffect(()=>{if(!(!r||r.length===0)){for(const h of r){if(u.current.has(h))continue;D.info("LiveWebSocketManager",`Creating WebSocket for session ${h}`);const m=ov(h,{onOpen:()=>{D.info("WebSocket",`Connected to session ${h}`)},onMessage:y=>{const x={...y,session_id:h};D.info("WebSocket",`Message from ${h}: ${y.type}`,y),c(x)},onError:y=>{D.error("WebSocket",`Error on session ${h}`,{error:y?.toString()}),Ve.getState().sessionId===h&&i("Connection error")},onClose:y=>{D.info("WebSocket",`Session ${h} closed with code ${y?.code||"unknown"}`),u.current.delete(h)}});u.current.set(h,m)}for(const[h,m]of u.current.entries())r.includes(h)||(D.info("LiveWebSocketManager",`Closing WebSocket for inactive session ${h}`),m.close(),u.current.delete(h))}},[r,c,i,o]),W.useEffect(()=>()=>{D.info("LiveWebSocketManager","Unmounting, closing all WebSocket connections"),u.current.forEach((h,m)=>{D.info("LiveWebSocketManager",`Closing connection to session ${m}`),h.close()}),u.current.clear()},[]),null}function Dv({theme:r,onThemeChange:c}){const{settings:i,isLoading:o,isSettingsOpen:u,closeSettings:h,updateSetting:m}=Lm(),y=W.useRef(null),[x,g]=W.useState("General"),[b,v]=W.useState(!1),[A,$]=W.useState(!1),[C,z]=W.useState(""),[R,T]=W.useState(!0),[V,G]=W.useState(!1),[F,Q]=W.useState(!1),[H,q]=W.useState(null);if(W.useEffect(()=>{u&&x==="API Keys"&&te()},[u,x]),W.useEffect(()=>{const E=Z=>{Z.key==="Escape"&&u&&h()};return document.addEventListener("keydown",E),()=>document.removeEventListener("keydown",E)},[u,h]),W.useEffect(()=>{const E=Z=>{y.current&&!y.current.contains(Z.target)&&h()};return u&&setTimeout(()=>{document.addEventListener("mousedown",E)},100),()=>document.removeEventListener("mousedown",E)},[u,h]),!u)return null;const J=(E,Z)=>{D.info("SettingsPanel",`Updating setting ${E} to ${Z}`),m(E,Z)},te=async()=>{try{T(!0);const E=await Py();v(E.data.has_key),D.info("SettingsPanel",`SS Key status: ${E.data.has_key?"configured":"not configured"}`)}catch(E){D.error("SettingsPanel","Failed to load SS key status",E),q("Failed to load status")}finally{T(!1)}},re=async()=>{if(!C.trim()){q("API key cannot be empty");return}try{Q(!0),q(null);const E=await lv(C.trim());if(!E.data.valid){q(E.data.message||"Invalid API key"),Q(!1);return}D.info("SettingsPanel","SS API key validated successfully"),Q(!1),G(!0),await ev(C.trim()),v(!0),$(!1),z(""),D.info("SettingsPanel","SS API key saved")}catch(E){D.error("SettingsPanel","Failed to save SS key",E),q(E.response?.data?.detail||"Failed to validate API key")}finally{Q(!1),G(!1)}},ie=async()=>{try{G(!0),q(null),await tv(),v(!1),$(!1),z(""),D.info("SettingsPanel","SS API key deleted")}catch(E){D.error("SettingsPanel","Failed to delete SS key",E),q(E.response?.data?.detail||"Failed to delete API key")}finally{G(!1)}},ce=()=>{$(!1),z(""),q(null)},Ne=[{id:"General",label:"General",icon:f.jsxs("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:[f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.594 3.94c.09-.542.56-.94 1.11-.94h2.593c.55 0 1.02.398 1.11.94l.213 1.281c.063.374.313.686.645.87.074.04.147.083.22.127.324.196.72.257 1.075.124l1.217-.456a1.125 1.125 0 011.37.49l1.296 2.247a1.125 1.125 0 01-.26 1.431l-1.003.827c-.293.24-.438.613-.431.992a6.759 6.759 0 010 .255c-.007.378.138.75.43.99l1.005.828c.424.35.534.954.26 1.43l-1.298 2.247a1.125 1.125 0 01-1.369.491l-1.217-.456c-.355-.133-.75-.072-1.076.124a6.57 6.57 0 01-.22.128c-.331.183-.581.495-.644.869l-.213 1.28c-.09.543-.56.941-1.11.941h-2.594c-.55 0-1.02-.398-1.11-.94l-.213-1.281c-.062-.374-.312-.686-.644-.87a6.52 6.52 0 01-.22-.127c-.325-.196-.72-.257-1.076-.124l-1.217.456a1.125 1.125 0 01-1.369-.49l-1.297-2.247a1.125 1.125 0 01.26-1.431l1.004-.827c.292-.24.437-.613.43-.992a6.932 6.932 0 010-.255c.007-.378-.138-.75-.43-.99l-1.004-.828a1.125 1.125 0 01-.26-1.43l1.297-2.247a1.125 1.125 0 011.37-.491l1.216.456c.356.133.751.072 1.076-.124.072-.044.146-.087.22-.128.332-.183.582-.495.644-.869l.214-1.281z"}),f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 12a3 3 0 11-6 0 3 3 0 016 0z"})]})},{id:"API Keys",label:"API Keys",icon:f.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 5.25a3 3 0 013 3m3 0a6 6 0 01-7.029 5.912c-.563-.097-1.159.026-1.563.43L10.5 17.25H8.25v2.25H6v2.25H2.25v-2.818c0-.597.237-1.17.659-1.591l6.499-6.499c.404-.404.527-1 .43-1.563A6 6 0 1121.75 8.25z"})})}],Se=()=>f.jsxs("div",{className:"space-y-1",children:[f.jsxs("div",{className:"flex items-center justify-between py-3 border-b",style:{borderColor:"var(--color-border)"},children:[f.jsx("div",{children:f.jsx("div",{className:"font-medium",style:{color:"var(--color-text-primary)"},children:"Theme"})}),f.jsxs("div",{className:"relative",children:[f.jsxs("select",{value:r,onChange:E=>c(E.target.value),className:"appearance-none px-4 py-2 pr-8 rounded-lg border text-sm cursor-pointer",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)",minWidth:"120px"},children:[f.jsx("option",{value:"system",children:"System"}),f.jsx("option",{value:"dark",children:"Dark"}),f.jsx("option",{value:"light",children:"Light"})]}),f.jsx("svg",{className:"absolute right-2 top-1/2 -translate-y-1/2 w-4 h-4 pointer-events-none",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",style:{color:"var(--color-text-secondary)"},children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]})]}),f.jsxs("div",{className:"flex items-center justify-between py-3 border-b",style:{borderColor:"var(--color-border)"},children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",style:{color:"var(--color-text-primary)"},children:i.max_concurrent_checks?.label||"Concurrent Checks"}),f.jsx("div",{className:"text-sm mt-0.5",style:{color:"var(--color-text-secondary)"},children:i.max_concurrent_checks?.description||"Maximum number of references to check simultaneously"})]}),f.jsx("input",{type:"number",value:i.max_concurrent_checks?.value??6,min:i.max_concurrent_checks?.min??1,max:i.max_concurrent_checks?.max??20,onChange:E=>J("max_concurrent_checks",E.target.value),className:"px-3 py-2 rounded-lg border text-sm text-center",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)",width:"80px"}})]})]}),Ce=()=>f.jsx("div",{className:"space-y-1",children:f.jsxs("div",{className:"py-3 border-b",style:{borderColor:"var(--color-border)"},children:[f.jsxs("div",{className:"flex items-center justify-between mb-1",children:[f.jsxs("div",{children:[f.jsx("div",{className:"font-medium",style:{color:"var(--color-text-primary)"},children:"Semantic Scholar API Key"}),f.jsx("div",{className:"text-sm mt-0.5",style:{color:"var(--color-text-secondary)"},children:"Optional. Increases rate limits for reference verification."})]}),!A&&f.jsxs("div",{className:"flex items-center gap-2",children:[b?f.jsx("span",{className:"text-xs px-2 py-0.5 rounded",style:{backgroundColor:"var(--color-success-bg)",color:"var(--color-success)"},children:"✓ Configured"}):f.jsx("span",{className:"text-xs",style:{color:"var(--color-text-muted)"},children:"Not configured"}),f.jsx("button",{onClick:()=>$(!0),className:"text-sm px-3 py-1 rounded transition-colors cursor-pointer",style:{color:"var(--color-accent)"},children:b?"Edit":"Add"})]})]}),R?f.jsx("div",{className:"text-sm",style:{color:"var(--color-text-muted)"},children:"Loading..."}):A&&f.jsxs("div",{className:"mt-3 space-y-2",children:[f.jsx("input",{type:"password",value:C,onChange:E=>z(E.target.value),placeholder:b?"Enter new key...":"Enter API key...",className:"w-full px-3 py-2 text-sm rounded border",style:{backgroundColor:"var(--color-bg-primary)",borderColor:H?"var(--color-error)":"var(--color-border)",color:"var(--color-text-primary)"},disabled:V||F,autoFocus:!0,onKeyDown:E=>{E.key==="Enter"&&re(),E.key==="Escape"&&ce()}}),H&&f.jsx("div",{className:"text-xs",style:{color:"var(--color-error)"},children:H}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{onClick:re,disabled:V||F||!C.trim(),className:"px-4 py-1.5 text-sm rounded cursor-pointer",style:{backgroundColor:"var(--color-accent)",color:"white",opacity:V||F||!C.trim()?.5:1},children:F?"Validating...":V?"Saving...":"Save"}),b&&f.jsx("button",{onClick:ie,disabled:V||F,className:"px-4 py-1.5 text-sm rounded cursor-pointer",style:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",opacity:V||F?.5:1},children:"Delete"}),f.jsx("button",{onClick:ce,disabled:V||F,className:"px-4 py-1.5 text-sm rounded border cursor-pointer",style:{borderColor:"var(--color-border)",color:"var(--color-text-secondary)"},children:"Cancel"})]})]})]})});return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center",style:{backgroundColor:"rgba(0, 0, 0, 0.6)"},children:f.jsxs("div",{ref:y,className:"rounded-2xl shadow-2xl overflow-hidden flex",style:{backgroundColor:"var(--color-bg-secondary)",width:"680px",maxWidth:"90vw",height:"400px",maxHeight:"80vh"},children:[f.jsxs("div",{className:"w-48 flex-shrink-0 border-r py-4",style:{borderColor:"var(--color-border)",backgroundColor:"var(--color-bg-primary)"},children:[f.jsxs("div",{className:"px-4 mb-4 flex items-center gap-2",children:[f.jsx("button",{onClick:h,className:"p-1.5 rounded-lg transition-colors cursor-pointer hover:bg-[var(--color-bg-tertiary)]",style:{color:"var(--color-text-secondary)"},children:f.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 18L18 6M6 6l12 12"})})}),f.jsx("span",{className:"font-semibold",style:{color:"var(--color-text-primary)"},children:"Settings"})]}),f.jsx("nav",{className:"space-y-1 px-3",children:Ne.map(E=>f.jsxs("button",{onClick:()=>g(E.id),className:"w-full flex items-center gap-3 px-3 py-2.5 rounded-lg text-sm font-medium transition-colors cursor-pointer",style:{backgroundColor:x===E.id?"var(--color-bg-tertiary)":"transparent",color:x===E.id?"var(--color-text-primary)":"var(--color-text-secondary)"},children:[E.icon,E.label]},E.id))})]}),f.jsxs("div",{className:"flex-1 flex flex-col min-w-0",children:[f.jsx("div",{className:"px-6 py-4 border-b",style:{borderColor:"var(--color-border)"},children:f.jsx("h2",{className:"text-lg font-semibold",style:{color:"var(--color-text-primary)"},children:x})}),f.jsx("div",{className:"flex-1 overflow-y-auto px-6 py-4",children:o?f.jsx("div",{className:"flex items-center justify-center py-8",children:f.jsxs("svg",{className:"animate-spin h-6 w-6",style:{color:"var(--color-accent)"},fill:"none",viewBox:"0 0 24 24",children:[f.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),f.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})}):f.jsxs(f.Fragment,{children:[x==="General"&&Se(),x==="API Keys"&&Ce()]})})]})]})})}function Uv({isOpen:r,onClose:c,title:i,children:o,size:u="md",closeOnBackdropClick:h=!1,closeOnEscape:m=!0}){const y=W.useRef(null),x=W.useRef(null);if(W.useEffect(()=>(r?(x.current=document.activeElement,y.current?.focus(),document.body.style.overflow="hidden"):(document.body.style.overflow="",x.current?.focus()),()=>{document.body.style.overflow=""}),[r]),W.useEffect(()=>{const b=v=>{v.key==="Escape"&&r&&m&&c()};return document.addEventListener("keydown",b),()=>document.removeEventListener("keydown",b)},[r,c,m]),!r)return null;const g={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl"};return f.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",style:{backgroundColor:"rgba(0, 0, 0, 0.5)"},onClick:b=>{h&&b.target===b.currentTarget&&c()},children:f.jsxs("div",{ref:y,role:"dialog","aria-modal":"true","aria-labelledby":"modal-title",tabIndex:-1,className:`w-full ${g[u]} rounded-lg shadow-xl transform transition-all`,style:{backgroundColor:"var(--color-bg-primary)"},children:[f.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b",style:{borderColor:"var(--color-border)"},children:[f.jsx("h2",{id:"modal-title",className:"text-lg font-semibold",style:{color:"var(--color-text-primary)"},children:i}),f.jsx("button",{onClick:c,className:"p-1 rounded-lg transition-colors",style:{color:"var(--color-text-secondary)"},onMouseEnter:b=>{b.currentTarget.style.backgroundColor="var(--color-bg-tertiary)"},onMouseLeave:b=>{b.currentTarget.style.backgroundColor="transparent"},"aria-label":"Close modal",children:f.jsx("svg",{className:"w-5 h-5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]}),f.jsx("div",{className:"px-6 py-4",children:o})]})})}const ks=[{id:"openai",name:"OpenAI",defaultModel:"gpt-4o",requiresKey:!0},{id:"anthropic",name:"Anthropic",defaultModel:"claude-3-5-sonnet-latest",requiresKey:!0},{id:"google",name:"Google",defaultModel:"gemini-1.5-flash",requiresKey:!0},{id:"azure",name:"Azure OpenAI",defaultModel:"gpt-4o",requiresKey:!0,requiresEndpoint:!0},{id:"vllm",name:"vLLM (Local)",defaultModel:"meta-llama/Llama-3.1-8B-Instruct",requiresKey:!1,requiresEndpoint:!0}];function Hv({isOpen:r,onClose:c,editConfig:i=null}){const{addConfig:o,updateConfig:u}=qs(),[h,m]=W.useState(!1),[y,x]=W.useState(!1),[g,b]=W.useState(null),[v,A]=W.useState({name:"",provider:"anthropic",model:"",api_key:"",endpoint:""});W.useEffect(()=>{if(r){const V=i?.provider||"anthropic",F=ks.find(Q=>Q.id===V)?.defaultModel||"";A({name:i?.name||F,provider:V,model:i?.model||"",api_key:"",endpoint:i?.endpoint||""}),b(null)}},[r,i]);const $=ks.find(V=>V.id===v.provider),C=V=>{const{name:G,value:F}=V.target;A(Q=>{const H={...Q,[G]:F};if(G==="model"&&!i){const q=Q.model||$?.defaultModel||"";(!Q.name||Q.name===q)&&(H.name=F||$?.defaultModel||"")}return H}),b(null)},z=V=>{const G=V.target.value,F=ks.find(Q=>Q.id===G);A(Q=>{const H=Q.model||$?.defaultModel||"",q=F?.defaultModel||"";return{...Q,provider:G,model:"",name:!Q.name||Q.name===H?q:Q.name,endpoint:G==="vllm"?"http://localhost:8000":Q.endpoint}}),b(null)},R=()=>v.name.trim()?$?.requiresKey&&!i&&!v.api_key.trim()?(b("API key is required"),!1):$?.requiresEndpoint&&!v.endpoint.trim()?(b("Endpoint URL is required"),!1):!0:(b("Name is required"),!1),T=async V=>{if(V.preventDefault(),!!R()){m(!0),b(null);try{const G={name:v.name.trim(),provider:v.provider,model:v.model.trim()||$?.defaultModel||null,endpoint:v.endpoint.trim()||null};if(v.api_key.trim()&&(G.api_key=v.api_key.trim()),$?.requiresKey&&(v.api_key.trim()||!i)){x(!0);try{const F={provider:G.provider,model:G.model,api_key:G.api_key,endpoint:G.endpoint};D.info("LLMConfigModal","Validating API connection...",{provider:G.provider,model:G.model});const Q=await Iy(F);if(!Q.data.valid)throw new Error(Q.data.error||"API validation failed");D.info("LLMConfigModal","API validation successful")}catch(F){D.error("LLMConfigModal","API validation failed",F);let Q="Unknown error";const H=F.response?.data?.detail;H?typeof H=="string"?Q=H:Array.isArray(H)?Q=H.map(J=>`${J.loc?.slice(1).join(".")||"field"}: ${J.msg}`).join(", "):H.message?Q=H.message:Q="Validation failed":F.response?.data?.message?Q=F.response.data.message:typeof F.message=="string"&&(Q=F.message),Q=Q.replace(/sk-[a-zA-Z0-9-_]+/g,"[REDACTED]"),Q=Q.replace(/"api_key":\s*"[^"]+"/g,'"api_key":"[REDACTED]"'),b(`API validation failed: ${Q}`),x(!1),m(!1);return}x(!1)}i?(await u(i.id,G),D.info("LLMConfigModal","Config updated")):(await o(G),D.info("LLMConfigModal","Config created")),c()}catch(G){D.error("LLMConfigModal","Failed to save config",G),b(G.response?.data?.detail||G.message||"Failed to save configuration")}finally{m(!1),x(!1)}}};return f.jsx(Uv,{isOpen:r,onClose:c,title:i?"Edit LLM Configuration":"Add LLM Configuration",size:"md",children:f.jsxs("form",{onSubmit:T,className:"space-y-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"name",className:"block text-sm font-medium mb-1",style:{color:"var(--color-text-primary)"},children:"Configuration Name"}),f.jsx("input",{type:"text",id:"name",name:"name",value:v.name,onChange:C,placeholder:"e.g., My GPT-4",className:"w-full px-3 py-2 rounded-lg border focus:outline-none focus:ring-2",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"}})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"provider",className:"block text-sm font-medium mb-1",style:{color:"var(--color-text-primary)"},children:"Provider"}),f.jsx("select",{id:"provider",name:"provider",value:v.provider,onChange:z,className:"w-full px-3 py-2 rounded-lg border focus:outline-none focus:ring-2",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"},children:ks.map(V=>f.jsx("option",{value:V.id,children:V.name},V.id))})]}),f.jsxs("div",{children:[f.jsxs("label",{htmlFor:"model",className:"block text-sm font-medium mb-1",style:{color:"var(--color-text-primary)"},children:["Model",f.jsx("span",{className:"ml-1 font-normal",style:{color:"var(--color-text-muted)"},children:"(optional)"})]}),f.jsx("input",{type:"text",id:"model",name:"model",value:v.model,onChange:C,placeholder:$?.defaultModel||"Default model",className:"w-full px-3 py-2 rounded-lg border focus:outline-none focus:ring-2",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"}}),f.jsxs("p",{className:"mt-1 text-xs",style:{color:"var(--color-text-muted)"},children:["Default: ",$?.defaultModel]})]}),$?.requiresKey&&f.jsxs("div",{children:[f.jsxs("label",{htmlFor:"api_key",className:"block text-sm font-medium mb-1",style:{color:"var(--color-text-primary)"},children:["API Key",i&&f.jsx("span",{className:"ml-1 font-normal",style:{color:"var(--color-text-muted)"},children:"(leave blank to keep existing)"})]}),f.jsx("input",{type:"password",id:"api_key",name:"api_key",value:v.api_key,onChange:C,placeholder:i?"••••••••":"Enter API key",className:"w-full px-3 py-2 rounded-lg border focus:outline-none focus:ring-2",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"}}),f.jsx("p",{className:"mt-1 text-xs",style:{color:"var(--color-text-muted)"},children:"Stored securely and never shown again"})]}),$?.requiresEndpoint&&f.jsxs("div",{children:[f.jsx("label",{htmlFor:"endpoint",className:"block text-sm font-medium mb-1",style:{color:"var(--color-text-primary)"},children:"Endpoint URL"}),f.jsx("input",{type:"url",id:"endpoint",name:"endpoint",value:v.endpoint,onChange:C,placeholder:v.provider==="vllm"?"http://localhost:8000":"https://your-resource.openai.azure.com",className:"w-full px-3 py-2 rounded-lg border focus:outline-none focus:ring-2",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"}})]}),g&&f.jsx("div",{className:"p-3 rounded-lg text-sm break-words overflow-hidden",style:{backgroundColor:"var(--color-error-bg)",color:"var(--color-error)",maxHeight:"120px",overflowY:"auto",wordBreak:"break-word"},children:g}),f.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[f.jsx(Os,{type:"button",variant:"secondary",onClick:c,disabled:h||y,children:"Cancel"}),f.jsx(Os,{type:"submit",loading:h||y,children:y?"Validating...":i?"Save Changes":"Add Configuration"})]})]})})}function Bv({compact:r=!1}){const{configs:c,selectedConfigId:i,selectConfig:o,deleteConfig:u,isLoading:h}=qs(),[m,y]=W.useState(!1),[x,g]=W.useState(!1),[b,v]=W.useState(null),A=W.useRef(null),$=c.find(T=>T.id===i),C=T=>{if(!T)return"No LLM configured";const V=T.model||"default";return`${T.provider}-${V}`};W.useEffect(()=>{const T=V=>{A.current&&!A.current.contains(V.target)&&y(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[]);const z=T=>{D.info("LLMSelector",`Selected config ${T}`),o(T),y(!1)},R=async(T,V)=>{if(T.stopPropagation(),confirm("Delete this LLM configuration?"))try{await u(V),D.info("LLMSelector",`Deleted config ${V}`)}catch(G){D.error("LLMSelector","Failed to delete config",G)}};return f.jsxs("div",{className:"relative",ref:A,children:[f.jsxs("button",{onClick:()=>y(!m),className:"w-full flex items-center justify-between px-3 py-2 rounded-lg border transition-colors",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)",color:"var(--color-text-primary)"},disabled:h,children:[f.jsx("span",{className:"truncate",children:$?f.jsx("span",{className:"font-medium",children:C($)}):f.jsx("span",{style:{color:"var(--color-text-muted)"},children:h?"Loading...":"No LLM configured"})}),f.jsx("svg",{className:`w-4 h-4 transition-transform ${m?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})})]}),m&&f.jsxs("div",{className:"absolute z-10 w-full mt-1 rounded-lg border shadow-lg overflow-hidden",style:{backgroundColor:"var(--color-bg-primary)",borderColor:"var(--color-border)"},children:[f.jsx("div",{className:"max-h-48 overflow-y-auto",children:c.length===0?f.jsx("div",{className:"px-3 py-2 text-sm",style:{color:"var(--color-text-muted)"},children:"No configurations"}):c.map(T=>f.jsxs("div",{className:"flex items-center justify-between px-3 py-2 cursor-pointer transition-colors",style:{backgroundColor:T.id===i?"var(--color-bg-tertiary)":"transparent"},onMouseEnter:V=>{T.id!==i&&(V.currentTarget.style.backgroundColor="var(--color-bg-secondary)")},onMouseLeave:V=>{T.id!==i&&(V.currentTarget.style.backgroundColor="transparent")},children:[f.jsxs("div",{className:"flex-1 min-w-0",onClick:()=>z(T.id),children:[f.jsx("div",{className:"font-medium truncate",style:{color:"var(--color-text-primary)"},children:C(T)}),f.jsx("div",{className:"text-xs truncate",style:{color:"var(--color-text-muted)"},children:T.name})]}),f.jsxs("div",{className:"flex items-center gap-1",children:[f.jsx("button",{onClick:V=>{V.stopPropagation(),v(T),g(!0),y(!1)},className:"p-1 rounded transition-colors cursor-pointer",style:{color:"var(--color-text-secondary)"},onMouseEnter:V=>{V.currentTarget.style.backgroundColor="var(--color-accent)",V.currentTarget.style.color="white"},onMouseLeave:V=>{V.currentTarget.style.backgroundColor="transparent",V.currentTarget.style.color="var(--color-text-secondary)"},title:"Edit configuration",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"})})}),f.jsx("button",{onClick:V=>R(V,T.id),className:"p-1 rounded transition-colors cursor-pointer",style:{color:"var(--color-error)"},onMouseEnter:V=>{V.currentTarget.style.backgroundColor="var(--color-error-bg)"},onMouseLeave:V=>{V.currentTarget.style.backgroundColor="transparent"},title:"Delete configuration",children:f.jsx("svg",{className:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"})})})]})]},T.id))}),f.jsx("div",{className:"border-t",style:{borderColor:"var(--color-border)"},children:f.jsxs("button",{onClick:()=>{y(!1),g(!0)},className:"w-full flex items-center px-3 py-2 text-sm transition-colors",style:{color:"var(--color-accent)"},onMouseEnter:T=>{T.currentTarget.style.backgroundColor="var(--color-bg-secondary)"},onMouseLeave:T=>{T.currentTarget.style.backgroundColor="transparent"},children:[f.jsx("svg",{className:"w-4 h-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:f.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 4v16m8-8H4"})}),"Add LLM Configuration"]})})]}),f.jsx(Hv,{isOpen:x,onClose:()=>{g(!1),v(null)},editConfig:b})]})}function qv(){const[r,c]=W.useState(()=>localStorage.getItem("refchecker-theme")||"system");W.useEffect(()=>{D.debug("App",`Theme changed to: ${r}`);let o=r;r==="system"&&(o=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),document.documentElement.classList.toggle("dark",o==="dark"),localStorage.setItem("refchecker-theme",r)},[r]),W.useEffect(()=>{const o=window.matchMedia("(prefers-color-scheme: dark)"),u=()=>{r==="system"&&document.documentElement.classList.toggle("dark",o.matches)};return o.addEventListener("change",u),()=>o.removeEventListener("change",u)},[r]);const i=o=>{c(o)};return f.jsxs("div",{className:"flex h-screen",style:{backgroundColor:"var(--color-bg-primary)"},children:[f.jsx(xv,{}),f.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[f.jsx(Lv,{}),f.jsxs("header",{className:"h-14 flex items-center justify-between px-6 border-b",style:{backgroundColor:"var(--color-bg-secondary)",borderColor:"var(--color-border)"},children:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("svg",{className:"w-8 h-8 flex-shrink-0",viewBox:"0 0 100 100",xmlns:"http://www.w3.org/2000/svg",children:[f.jsx("rect",{width:"100",height:"100",rx:"15",fill:"#3b82f6"}),f.jsx("path",{d:"M25 30h50M25 50h40M25 70h30",stroke:"white",strokeWidth:"8",strokeLinecap:"round"}),f.jsx("circle",{cx:"75",cy:"70",r:"12",fill:"#10b981"}),f.jsx("path",{d:"M70 70l4 4 8-8",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",fill:"none"})]}),f.jsx("h1",{className:"text-xl font-semibold",style:{color:"var(--color-text-primary)"},children:"RefChecker"})]}),f.jsxs("div",{className:"flex items-center gap-4",children:[f.jsx("div",{className:"w-64",children:f.jsx(Bv,{compact:!0})}),f.jsx("a",{href:"https://github.com/markrussinovich/refchecker",target:"_blank",rel:"noopener noreferrer",className:"text-gray-400 hover:text-gray-200 transition-colors",title:"View on GitHub",children:f.jsx("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 24 24",children:f.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z"})})})]})]}),f.jsx(Rv,{})]}),f.jsx(Ov,{}),f.jsx(Dv,{theme:r,onThemeChange:i})]})}D.info("App","RefChecker Web UI starting...");mg.createRoot(document.getElementById("root")).render(f.jsx(W.StrictMode,{children:f.jsx(qv,{})}));
|