var Wg=Object.defineProperty;var Fg=(r,c,o)=>c in r?Wg(r,c,{enumerable:!0,configurable:!0,writable:!0,value:o}):r[c]=o;var Se=(r,c,o)=>Fg(r,typeof c!="symbol"?c+"":c,o);(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const h of document.querySelectorAll('link[rel="modulepreload"]'))s(h);new MutationObserver(h=>{for(const g of h)if(g.type==="childList")for(const T of g.addedNodes)T.tagName==="LINK"&&T.rel==="modulepreload"&&s(T)}).observe(document,{childList:!0,subtree:!0});function o(h){const g={};return h.integrity&&(g.integrity=h.integrity),h.referrerPolicy&&(g.referrerPolicy=h.referrerPolicy),h.crossOrigin==="use-credentials"?g.credentials="include":h.crossOrigin==="anonymous"?g.credentials="omit":g.credentials="same-origin",g}function s(h){if(h.ep)return;h.ep=!0;const g=o(h);fetch(h.href,g)}})();function Ig(r){return r&&r.__esModule&&Object.prototype.hasOwnProperty.call(r,"default")?r.default:r}var Er={exports:{}},jn={};/**
 * @license React
 * react-jsx-runtime.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Fd;function Pg(){if(Fd)return jn;Fd=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.fragment");function o(s,h,g){var T=null;if(g!==void 0&&(T=""+g),h.key!==void 0&&(T=""+h.key),"key"in h){g={};for(var y in h)y!=="key"&&(g[y]=h[y])}else g=h;return h=g.ref,{$$typeof:r,type:s,key:T,ref:h!==void 0?h:null,props:g}}return jn.Fragment=c,jn.jsx=o,jn.jsxs=o,jn}var Id;function em(){return Id||(Id=1,Er.exports=Pg()),Er.exports}var p=em(),_r={exports:{}},I={};/**
 * @license React
 * react.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var Pd;function tm(){if(Pd)return I;Pd=1;var r=Symbol.for("react.transitional.element"),c=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),s=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),g=Symbol.for("react.consumer"),T=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),x=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),z=Symbol.for("react.lazy"),C=Symbol.for("react.activity"),R=Symbol.iterator;function L(b){return b===null||typeof b!="object"?null:(b=R&&b[R]||b["@@iterator"],typeof b=="function"?b:null)}var Q={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},J=Object.assign,Ae={};function X(b,M,U){this.props=b,this.context=M,this.refs=Ae,this.updater=U||Q}X.prototype.isReactComponent={},X.prototype.setState=function(b,M){if(typeof b!="object"&&typeof b!="function"&&b!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,b,M,"setState")},X.prototype.forceUpdate=function(b){this.updater.enqueueForceUpdate(this,b,"forceUpdate")};function te(){}te.prototype=X.prototype;function le(b,M,U){this.props=b,this.context=M,this.refs=Ae,this.updater=U||Q}var ke=le.prototype=new te;ke.constructor=le,J(ke,X.prototype),ke.isPureReactComponent=!0;var Ne=Array.isArray;function Ce(){}var $={H:null,A:null,T:null,S:null},we=Object.prototype.hasOwnProperty;function pt(b,M,U){var B=U.ref;return{$$typeof:r,type:b,key:M,ref:B!==void 0?B:null,props:U}}function _e(b,M){return pt(b.type,M,b.props)}function bt(b){return typeof b=="object"&&b!==null&&b.$$typeof===r}function Le(b){var M={"=":"=0",":":"=2"};return"$"+b.replace(/[=:]/g,function(U){return M[U]})}var Rt=/\/+/g;function vt(b,M){return typeof b=="object"&&b!==null&&b.key!=null?Le(""+b.key):M.toString(36)}function it(b){switch(b.status){case"fulfilled":return b.value;case"rejected":throw b.reason;default:switch(typeof b.status=="string"?b.then(Ce,Ce):(b.status="pending",b.then(function(M){b.status==="pending"&&(b.status="fulfilled",b.value=M)},function(M){b.status==="pending"&&(b.status="rejected",b.reason=M)})),b.status){case"fulfilled":return b.value;case"rejected":throw b.reason}}throw b}function N(b,M,U,B,W){var F=typeof b;(F==="undefined"||F==="boolean")&&(b=null);var de=!1;if(b===null)de=!0;else switch(F){case"bigint":case"string":case"number":de=!0;break;case"object":switch(b.$$typeof){case r:case c:de=!0;break;case z:return de=b._init,N(de(b._payload),M,U,B,W)}}if(de)return W=W(b),de=B===""?"."+vt(b,0):B,Ne(W)?(U="",de!=null&&(U=de.replace(Rt,"$&/")+"/"),N(W,M,U,"",function(wa){return wa})):W!=null&&(bt(W)&&(W=_e(W,U+(W.key==null||b&&b.key===W.key?"":(""+W.key).replace(Rt,"$&/")+"/")+de)),M.push(W)),1;de=0;var We=B===""?".":B+":";if(Ne(b))for(var Oe=0;Oe<b.length;Oe++)B=b[Oe],F=We+vt(B,Oe),de+=N(B,M,U,F,W);else if(Oe=L(b),typeof Oe=="function")for(b=Oe.call(b),Oe=0;!(B=b.next()).done;)B=B.value,F=We+vt(B,Oe++),de+=N(B,M,U,F,W);else if(F==="object"){if(typeof b.then=="function")return N(it(b),M,U,B,W);throw M=String(b),Error("Objects are not valid as a React child (found: "+(M==="[object Object]"?"object with keys {"+Object.keys(b).join(", ")+"}":M)+"). If you meant to render a collection of children, use an array instead.")}return de}function H(b,M,U){if(b==null)return b;var B=[],W=0;return N(b,B,"","",function(F){return M.call(U,F,W++)}),B}function w(b){if(b._status===-1){var M=b._result;M=M(),M.then(function(U){(b._status===0||b._status===-1)&&(b._status=1,b._result=U)},function(U){(b._status===0||b._status===-1)&&(b._status=2,b._result=U)}),b._status===-1&&(b._status=0,b._result=M)}if(b._status===1)return b._result.default;throw b._result}var V=typeof reportError=="function"?reportError:function(b){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var M=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof b=="object"&&b!==null&&typeof b.message=="string"?String(b.message):String(b),error:b});if(!window.dispatchEvent(M))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",b);return}console.error(b)},ue={map:H,forEach:function(b,M,U){H(b,function(){M.apply(this,arguments)},U)},count:function(b){var M=0;return H(b,function(){M++}),M},toArray:function(b){return H(b,function(M){return M})||[]},only:function(b){if(!bt(b))throw Error("React.Children.only expected to receive a single React element child.");return b}};return I.Activity=C,I.Children=ue,I.Component=X,I.Fragment=o,I.Profiler=h,I.PureComponent=le,I.StrictMode=s,I.Suspense=x,I.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=$,I.__COMPILER_RUNTIME={__proto__:null,c:function(b){return $.H.useMemoCache(b)}},I.cache=function(b){return function(){return b.apply(null,arguments)}},I.cacheSignal=function(){return null},I.cloneElement=function(b,M,U){if(b==null)throw Error("The argument must be a React element, but you passed "+b+".");var B=J({},b.props),W=b.key;if(M!=null)for(F in M.key!==void 0&&(W=""+M.key),M)!we.call(M,F)||F==="key"||F==="__self"||F==="__source"||F==="ref"&&M.ref===void 0||(B[F]=M[F]);var F=arguments.length-2;if(F===1)B.children=U;else if(1<F){for(var de=Array(F),We=0;We<F;We++)de[We]=arguments[We+2];B.children=de}return pt(b.type,W,B)},I.createContext=function(b){return b={$$typeof:T,_currentValue:b,_currentValue2:b,_threadCount:0,Provider:null,Consumer:null},b.Provider=b,b.Consumer={$$typeof:g,_context:b},b},I.createElement=function(b,M,U){var B,W={},F=null;if(M!=null)for(B in M.key!==void 0&&(F=""+M.key),M)we.call(M,B)&&B!=="key"&&B!=="__self"&&B!=="__source"&&(W[B]=M[B]);var de=arguments.length-2;if(de===1)W.children=U;else if(1<de){for(var We=Array(de),Oe=0;Oe<de;Oe++)We[Oe]=arguments[Oe+2];W.children=We}if(b&&b.defaultProps)for(B in de=b.defaultProps,de)W[B]===void 0&&(W[B]=de[B]);return pt(b,F,W)},I.createRef=function(){return{current:null}},I.forwardRef=function(b){return{$$typeof:y,render:b}},I.isValidElement=bt,I.lazy=function(b){return{$$typeof:z,_payload:{_status:-1,_result:b},_init:w}},I.memo=function(b,M){return{$$typeof:d,type:b,compare:M===void 0?null:M}},I.startTransition=function(b){var M=$.T,U={};$.T=U;try{var B=b(),W=$.S;W!==null&&W(U,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&B.then(Ce,V)}catch(F){V(F)}finally{M!==null&&U.types!==null&&(M.types=U.types),$.T=M}},I.unstable_useCacheRefresh=function(){return $.H.useCacheRefresh()},I.use=function(b){return $.H.use(b)},I.useActionState=function(b,M,U){return $.H.useActionState(b,M,U)},I.useCallback=function(b,M){return $.H.useCallback(b,M)},I.useContext=function(b){return $.H.useContext(b)},I.useDebugValue=function(){},I.useDeferredValue=function(b,M){return $.H.useDeferredValue(b,M)},I.useEffect=function(b,M){return $.H.useEffect(b,M)},I.useEffectEvent=function(b){return $.H.useEffectEvent(b)},I.useId=function(){return $.H.useId()},I.useImperativeHandle=function(b,M,U){return $.H.useImperativeHandle(b,M,U)},I.useInsertionEffect=function(b,M){return $.H.useInsertionEffect(b,M)},I.useLayoutEffect=function(b,M){return $.H.useLayoutEffect(b,M)},I.useMemo=function(b,M){return $.H.useMemo(b,M)},I.useOptimistic=function(b,M){return $.H.useOptimistic(b,M)},I.useReducer=function(b,M,U){return $.H.useReducer(b,M,U)},I.useRef=function(b){return $.H.useRef(b)},I.useState=function(b){return $.H.useState(b)},I.useSyncExternalStore=function(b,M,U){return $.H.useSyncExternalStore(b,M,U)},I.useTransition=function(){return $.H.useTransition()},I.version="19.2.4",I}var eh;function Br(){return eh||(eh=1,_r.exports=tm()),_r.exports}var q=Br();const xy=Ig(q);var Ar={exports:{}},Nn={},Mr={exports:{}},jr={};/**
 * @license React
 * scheduler.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var th;function lm(){return th||(th=1,(function(r){function c(N,H){var w=N.length;N.push(H);e:for(;0<w;){var V=w-1>>>1,ue=N[V];if(0<h(ue,H))N[V]=H,N[w]=ue,w=V;else break e}}function o(N){return N.length===0?null:N[0]}function s(N){if(N.length===0)return null;var H=N[0],w=N.pop();if(w!==H){N[0]=w;e:for(var V=0,ue=N.length,b=ue>>>1;V<b;){var M=2*(V+1)-1,U=N[M],B=M+1,W=N[B];if(0>h(U,w))B<ue&&0>h(W,U)?(N[V]=W,N[B]=w,V=B):(N[V]=U,N[M]=w,V=M);else if(B<ue&&0>h(W,w))N[V]=W,N[B]=w,V=B;else break e}}return H}function h(N,H){var w=N.sortIndex-H.sortIndex;return w!==0?w:N.id-H.id}if(r.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var g=performance;r.unstable_now=function(){return g.now()}}else{var T=Date,y=T.now();r.unstable_now=function(){return T.now()-y}}var x=[],d=[],z=1,C=null,R=3,L=!1,Q=!1,J=!1,Ae=!1,X=typeof setTimeout=="function"?setTimeout:null,te=typeof clearTimeout=="function"?clearTimeout:null,le=typeof setImmediate<"u"?setImmediate:null;function ke(N){for(var H=o(d);H!==null;){if(H.callback===null)s(d);else if(H.startTime<=N)s(d),H.sortIndex=H.expirationTime,c(x,H);else break;H=o(d)}}function Ne(N){if(J=!1,ke(N),!Q)if(o(x)!==null)Q=!0,Ce||(Ce=!0,Le());else{var H=o(d);H!==null&&it(Ne,H.startTime-N)}}var Ce=!1,$=-1,we=5,pt=-1;function _e(){return Ae?!0:!(r.unstable_now()-pt<we)}function bt(){if(Ae=!1,Ce){var N=r.unstable_now();pt=N;var H=!0;try{e:{Q=!1,J&&(J=!1,te($),$=-1),L=!0;var w=R;try{t:{for(ke(N),C=o(x);C!==null&&!(C.expirationTime>N&&_e());){var V=C.callback;if(typeof V=="function"){C.callback=null,R=C.priorityLevel;var ue=V(C.expirationTime<=N);if(N=r.unstable_now(),typeof ue=="function"){C.callback=ue,ke(N),H=!0;break t}C===o(x)&&s(x),ke(N)}else s(x);C=o(x)}if(C!==null)H=!0;else{var b=o(d);b!==null&&it(Ne,b.startTime-N),H=!1}}break e}finally{C=null,R=w,L=!1}H=void 0}}finally{H?Le():Ce=!1}}}var Le;if(typeof le=="function")Le=function(){le(bt)};else if(typeof MessageChannel<"u"){var Rt=new MessageChannel,vt=Rt.port2;Rt.port1.onmessage=bt,Le=function(){vt.postMessage(null)}}else Le=function(){X(bt,0)};function it(N,H){$=X(function(){N(r.unstable_now())},H)}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(N){N.callback=null},r.unstable_forceFrameRate=function(N){0>N||125<N?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):we=0<N?Math.floor(1e3/N):5},r.unstable_getCurrentPriorityLevel=function(){return R},r.unstable_next=function(N){switch(R){case 1:case 2:case 3:var H=3;break;default:H=R}var w=R;R=H;try{return N()}finally{R=w}},r.unstable_requestPaint=function(){Ae=!0},r.unstable_runWithPriority=function(N,H){switch(N){case 1:case 2:case 3:case 4:case 5:break;default:N=3}var w=R;R=N;try{return H()}finally{R=w}},r.unstable_scheduleCallback=function(N,H,w){var V=r.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?V+w:V):w=V,N){case 1:var ue=-1;break;case 2:ue=250;break;case 5:ue=1073741823;break;case 4:ue=1e4;break;default:ue=5e3}return ue=w+ue,N={id:z++,callback:H,priorityLevel:N,startTime:w,expirationTime:ue,sortIndex:-1},w>V?(N.sortIndex=w,c(d,N),o(x)===null&&N===o(d)&&(J?(te($),$=-1):J=!0,it(Ne,w-V))):(N.sortIndex=ue,c(x,N),Q||L||(Q=!0,Ce||(Ce=!0,Le()))),N},r.unstable_shouldYield=_e,r.unstable_wrapCallback=function(N){var H=R;return function(){var w=R;R=H;try{return N.apply(this,arguments)}finally{R=w}}}})(jr)),jr}var lh;function am(){return lh||(lh=1,Mr.exports=lm()),Mr.exports}var Nr={exports:{}},$e={};/**
 * @license React
 * react-dom.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var ah;function nm(){if(ah)return $e;ah=1;var r=Br();function c(x){var d="https://react.dev/errors/"+x;if(1<arguments.length){d+="?args[]="+encodeURIComponent(arguments[1]);for(var z=2;z<arguments.length;z++)d+="&args[]="+encodeURIComponent(arguments[z])}return"Minified React error #"+x+"; visit "+d+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(){}var s={d:{f:o,r:function(){throw Error(c(522))},D:o,C:o,L:o,m:o,X:o,S:o,M:o},p:0,findDOMNode:null},h=Symbol.for("react.portal");function g(x,d,z){var C=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:h,key:C==null?null:""+C,children:x,containerInfo:d,implementation:z}}var T=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(x,d){if(x==="font")return"";if(typeof d=="string")return d==="use-credentials"?d:""}return $e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=s,$e.createPortal=function(x,d){var z=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!d||d.nodeType!==1&&d.nodeType!==9&&d.nodeType!==11)throw Error(c(299));return g(x,d,null,z)},$e.flushSync=function(x){var d=T.T,z=s.p;try{if(T.T=null,s.p=2,x)return x()}finally{T.T=d,s.p=z,s.d.f()}},$e.preconnect=function(x,d){typeof x=="string"&&(d?(d=d.crossOrigin,d=typeof d=="string"?d==="use-credentials"?d:"":void 0):d=null,s.d.C(x,d))},$e.prefetchDNS=function(x){typeof x=="string"&&s.d.D(x)},$e.preinit=function(x,d){if(typeof x=="string"&&d&&typeof d.as=="string"){var z=d.as,C=y(z,d.crossOrigin),R=typeof d.integrity=="string"?d.integrity:void 0,L=typeof d.fetchPriority=="string"?d.fetchPriority:void 0;z==="style"?s.d.S(x,typeof d.precedence=="string"?d.precedence:void 0,{crossOrigin:C,integrity:R,fetchPriority:L}):z==="script"&&s.d.X(x,{crossOrigin:C,integrity:R,fetchPriority:L,nonce:typeof d.nonce=="string"?d.nonce:void 0})}},$e.preinitModule=function(x,d){if(typeof x=="string")if(typeof d=="object"&&d!==null){if(d.as==null||d.as==="script"){var z=y(d.as,d.crossOrigin);s.d.M(x,{crossOrigin:z,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0})}}else d==null&&s.d.M(x)},$e.preload=function(x,d){if(typeof x=="string"&&typeof d=="object"&&d!==null&&typeof d.as=="string"){var z=d.as,C=y(z,d.crossOrigin);s.d.L(x,z,{crossOrigin:C,integrity:typeof d.integrity=="string"?d.integrity:void 0,nonce:typeof d.nonce=="string"?d.nonce:void 0,type:typeof d.type=="string"?d.type:void 0,fetchPriority:typeof d.fetchPriority=="string"?d.fetchPriority:void 0,referrerPolicy:typeof d.referrerPolicy=="string"?d.referrerPolicy:void 0,imageSrcSet:typeof d.imageSrcSet=="string"?d.imageSrcSet:void 0,imageSizes:typeof d.imageSizes=="string"?d.imageSizes:void 0,media:typeof d.media=="string"?d.media:void 0})}},$e.preloadModule=function(x,d){if(typeof x=="string")if(d){var z=y(d.as,d.crossOrigin);s.d.m(x,{as:typeof d.as=="string"&&d.as!=="script"?d.as:void 0,crossOrigin:z,integrity:typeof d.integrity=="string"?d.integrity:void 0})}else s.d.m(x)},$e.requestFormReset=function(x){s.d.r(x)},$e.unstable_batchedUpdates=function(x,d){return x(d)},$e.useFormState=function(x,d,z){return T.H.useFormState(x,d,z)},$e.useFormStatus=function(){return T.H.useHostTransitionStatus()},$e.version="19.2.4",$e}var nh;function um(){if(nh)return Nr.exports;nh=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(),Nr.exports=nm(),Nr.exports}/**
 * @license React
 * react-dom-client.production.js
 *
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */var uh;function im(){if(uh)return Nn;uh=1;var r=am(),c=Br(),o=um();function s(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 h(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function g(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 T(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(g(e)!==e)throw Error(s(188))}function d(e){var t=e.alternate;if(!t){if(t=g(e),t===null)throw Error(s(188));return t!==e?null:e}for(var l=e,a=t;;){var n=l.return;if(n===null)break;var u=n.alternate;if(u===null){if(a=n.return,a!==null){l=a;continue}break}if(n.child===u.child){for(u=n.child;u;){if(u===l)return x(n),e;if(u===a)return x(n),t;u=u.sibling}throw Error(s(188))}if(l.return!==a.return)l=n,a=u;else{for(var i=!1,f=n.child;f;){if(f===l){i=!0,l=n,a=u;break}if(f===a){i=!0,a=n,l=u;break}f=f.sibling}if(!i){for(f=u.child;f;){if(f===l){i=!0,l=u,a=n;break}if(f===a){i=!0,a=u,l=n;break}f=f.sibling}if(!i)throw Error(s(189))}}if(l.alternate!==a)throw Error(s(190))}if(l.tag!==3)throw Error(s(188));return l.stateNode.current===l?e:t}function z(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=z(e),t!==null)return t;e=e.sibling}return null}var C=Object.assign,R=Symbol.for("react.element"),L=Symbol.for("react.transitional.element"),Q=Symbol.for("react.portal"),J=Symbol.for("react.fragment"),Ae=Symbol.for("react.strict_mode"),X=Symbol.for("react.profiler"),te=Symbol.for("react.consumer"),le=Symbol.for("react.context"),ke=Symbol.for("react.forward_ref"),Ne=Symbol.for("react.suspense"),Ce=Symbol.for("react.suspense_list"),$=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),pt=Symbol.for("react.activity"),_e=Symbol.for("react.memo_cache_sentinel"),bt=Symbol.iterator;function Le(e){return e===null||typeof e!="object"?null:(e=bt&&e[bt]||e["@@iterator"],typeof e=="function"?e:null)}var Rt=Symbol.for("react.client.reference");function vt(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===Rt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case J:return"Fragment";case X:return"Profiler";case Ae:return"StrictMode";case Ne:return"Suspense";case Ce:return"SuspenseList";case pt:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case Q:return"Portal";case le:return e.displayName||"Context";case te:return(e._context.displayName||"Context")+".Consumer";case ke:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $:return t=e.displayName||null,t!==null?t:vt(e.type)||"Memo";case we:t=e._payload,e=e._init;try{return vt(e(t))}catch{}}return null}var it=Array.isArray,N=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,H=o.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,w={pending:!1,data:null,method:null,action:null},V=[],ue=-1;function b(e){return{current:e}}function M(e){0>ue||(e.current=V[ue],V[ue]=null,ue--)}function U(e,t){ue++,V[ue]=e.current,e.current=t}var B=b(null),W=b(null),F=b(null),de=b(null);function We(e,t){switch(U(F,t),U(W,e),U(B,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?xd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=xd(t),e=Sd(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}M(B),U(B,e)}function Oe(){M(B),M(W),M(F)}function wa(e){e.memoizedState!==null&&U(de,e);var t=B.current,l=Sd(t,e.type);t!==l&&(U(W,e),U(B,l))}function wn(e){W.current===e&&(M(B),M(W)),de.current===e&&(M(de),En._currentValue=w)}var ci,Jr;function Nl(e){if(ci===void 0)try{throw Error()}catch(l){var t=l.stack.trim().match(/\n( *(at )?)/);ci=t&&t[1]||"",Jr=-1<l.stack.indexOf(`
    at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
`+ci+e+Jr}var ri=!1;function si(e,t){if(!e||ri)return"";ri=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var D=function(){throw Error()};if(Object.defineProperty(D.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(D,[])}catch(A){var _=A}Reflect.construct(e,[],D)}else{try{D.call()}catch(A){_=A}e.call(D.prototype)}}else{try{throw Error()}catch(A){_=A}(D=e())&&typeof D.catch=="function"&&D.catch(function(){})}}catch(A){if(A&&_&&typeof A.stack=="string")return[A.stack,_.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var n=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");n&&n.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var u=a.DetermineComponentFrameRoot(),i=u[0],f=u[1];if(i&&f){var m=i.split(`
`),E=f.split(`
`);for(n=a=0;a<m.length&&!m[a].includes("DetermineComponentFrameRoot");)a++;for(;n<E.length&&!E[n].includes("DetermineComponentFrameRoot");)n++;if(a===m.length||n===E.length)for(a=m.length-1,n=E.length-1;1<=a&&0<=n&&m[a]!==E[n];)n--;for(;1<=a&&0<=n;a--,n--)if(m[a]!==E[n]){if(a!==1||n!==1)do if(a--,n--,0>n||m[a]!==E[n]){var j=`
`+m[a].replace(" at new "," at ");return e.displayName&&j.includes("<anonymous>")&&(j=j.replace("<anonymous>",e.displayName)),j}while(1<=a&&0<=n);break}}}finally{ri=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?Nl(l):""}function Ah(e,t){switch(e.tag){case 26:case 27:case 5:return Nl(e.type);case 16:return Nl("Lazy");case 13:return e.child!==t&&t!==null?Nl("Suspense Fallback"):Nl("Suspense");case 19:return Nl("SuspenseList");case 0:case 15:return si(e.type,!1);case 11:return si(e.type.render,!1);case 1:return si(e.type,!0);case 31:return Nl("Activity");default:return""}}function $r(e){try{var t="",l=null;do t+=Ah(e,l),l=e,e=e.return;while(e);return t}catch(a){return`
Error generating stack: `+a.message+`
`+a.stack}}var fi=Object.prototype.hasOwnProperty,oi=r.unstable_scheduleCallback,di=r.unstable_cancelCallback,Mh=r.unstable_shouldYield,jh=r.unstable_requestPaint,ct=r.unstable_now,Nh=r.unstable_getCurrentPriorityLevel,Wr=r.unstable_ImmediatePriority,Fr=r.unstable_UserBlockingPriority,Un=r.unstable_NormalPriority,Oh=r.unstable_LowPriority,Ir=r.unstable_IdlePriority,Dh=r.log,Rh=r.unstable_setDisableYieldValue,Ua=null,rt=null;function ul(e){if(typeof Dh=="function"&&Rh(e),rt&&typeof rt.setStrictMode=="function")try{rt.setStrictMode(Ua,e)}catch{}}var st=Math.clz32?Math.clz32:Uh,Ch=Math.log,wh=Math.LN2;function Uh(e){return e>>>=0,e===0?32:31-(Ch(e)/wh|0)|0}var Hn=256,Bn=262144,qn=4194304;function Ol(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 Ln(e,t,l){var a=e.pendingLanes;if(a===0)return 0;var n=0,u=e.suspendedLanes,i=e.pingedLanes;e=e.warmLanes;var f=a&134217727;return f!==0?(a=f&~u,a!==0?n=Ol(a):(i&=f,i!==0?n=Ol(i):l||(l=f&~e,l!==0&&(n=Ol(l))))):(f=a&~u,f!==0?n=Ol(f):i!==0?n=Ol(i):l||(l=a&~e,l!==0&&(n=Ol(l)))),n===0?0:t!==0&&t!==n&&(t&u)===0&&(u=n&-n,l=t&-t,u>=l||u===32&&(l&4194048)!==0)?t:n}function Ha(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Hh(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 Pr(){var e=qn;return qn<<=1,(qn&62914560)===0&&(qn=4194304),e}function hi(e){for(var t=[],l=0;31>l;l++)t.push(e);return t}function Ba(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Bh(e,t,l,a,n,u){var i=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 f=e.entanglements,m=e.expirationTimes,E=e.hiddenUpdates;for(l=i&~l;0<l;){var j=31-st(l),D=1<<j;f[j]=0,m[j]=-1;var _=E[j];if(_!==null)for(E[j]=null,j=0;j<_.length;j++){var A=_[j];A!==null&&(A.lane&=-536870913)}l&=~D}a!==0&&es(e,a,0),u!==0&&n===0&&e.tag!==0&&(e.suspendedLanes|=u&~(i&~t))}function es(e,t,l){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-st(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function ts(e,t){var l=e.entangledLanes|=t;for(e=e.entanglements;l;){var a=31-st(l),n=1<<a;n&t|e[a]&t&&(e[a]|=t),l&=~n}}function ls(e,t){var l=t&-t;return l=(l&42)!==0?1:gi(l),(l&(e.suspendedLanes|t))!==0?0:l}function gi(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 mi(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function as(){var e=H.p;return e!==0?e:(e=window.event,e===void 0?32:Xd(e.type))}function ns(e,t){var l=H.p;try{return H.p=e,t()}finally{H.p=l}}var il=Math.random().toString(36).slice(2),Xe="__reactFiber$"+il,Pe="__reactProps$"+il,Fl="__reactContainer$"+il,yi="__reactEvents$"+il,qh="__reactListeners$"+il,Lh="__reactHandles$"+il,us="__reactResources$"+il,qa="__reactMarker$"+il;function pi(e){delete e[Xe],delete e[Pe],delete e[yi],delete e[qh],delete e[Lh]}function Il(e){var t=e[Xe];if(t)return t;for(var l=e.parentNode;l;){if(t=l[Fl]||l[Xe]){if(l=t.alternate,t.child!==null||l!==null&&l.child!==null)for(e=Md(e);e!==null;){if(l=e[Xe])return l;e=Md(e)}return t}e=l,l=e.parentNode}return null}function Pl(e){if(e=e[Xe]||e[Fl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function La(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(s(33))}function ea(e){var t=e[us];return t||(t=e[us]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ge(e){e[qa]=!0}var is=new Set,cs={};function Dl(e,t){ta(e,t),ta(e+"Capture",t)}function ta(e,t){for(cs[e]=t,e=0;e<t.length;e++)is.add(t[e])}var Yh=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]*$"),rs={},ss={};function Gh(e){return fi.call(ss,e)?!0:fi.call(rs,e)?!1:Yh.test(e)?ss[e]=!0:(rs[e]=!0,!1)}function Yn(e,t,l){if(Gh(t))if(l===null)e.removeAttribute(t);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+l)}}function Gn(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 qt(e,t,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(t,l,""+a)}}function xt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function fs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Qh(e,t,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var n=a.get,u=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){l=""+i,u.call(this,i)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(i){l=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function bi(e){if(!e._valueTracker){var t=fs(e)?"checked":"value";e._valueTracker=Qh(e,t,""+e[t])}}function os(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var l=t.getValue(),a="";return e&&(a=fs(e)?e.checked?"true":"false":e.value),e=a,e!==l?(t.setValue(e),!0):!1}function Qn(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 Xh=/[\n"\\]/g;function St(e){return e.replace(Xh,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function vi(e,t,l,a,n,u,i,f){e.name="",i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"?e.type=i:e.removeAttribute("type"),t!=null?i==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+xt(t)):e.value!==""+xt(t)&&(e.value=""+xt(t)):i!=="submit"&&i!=="reset"||e.removeAttribute("value"),t!=null?xi(e,i,xt(t)):l!=null?xi(e,i,xt(l)):a!=null&&e.removeAttribute("value"),n==null&&u!=null&&(e.defaultChecked=!!u),n!=null&&(e.checked=n&&typeof n!="function"&&typeof n!="symbol"),f!=null&&typeof f!="function"&&typeof f!="symbol"&&typeof f!="boolean"?e.name=""+xt(f):e.removeAttribute("name")}function ds(e,t,l,a,n,u,i,f){if(u!=null&&typeof u!="function"&&typeof u!="symbol"&&typeof u!="boolean"&&(e.type=u),t!=null||l!=null){if(!(u!=="submit"&&u!=="reset"||t!=null)){bi(e);return}l=l!=null?""+xt(l):"",t=t!=null?""+xt(t):l,f||t===e.value||(e.value=t),e.defaultValue=t}a=a??n,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=f?e.checked:!!a,e.defaultChecked=!!a,i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.name=i),bi(e)}function xi(e,t,l){t==="number"&&Qn(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function la(e,t,l,a){if(e=e.options,t){t={};for(var n=0;n<l.length;n++)t["$"+l[n]]=!0;for(l=0;l<e.length;l++)n=t.hasOwnProperty("$"+e[l].value),e[l].selected!==n&&(e[l].selected=n),n&&a&&(e[l].defaultSelected=!0)}else{for(l=""+xt(l),t=null,n=0;n<e.length;n++){if(e[n].value===l){e[n].selected=!0,a&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function hs(e,t,l){if(t!=null&&(t=""+xt(t),t!==e.value&&(e.value=t),l==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=l!=null?""+xt(l):""}function gs(e,t,l,a){if(t==null){if(a!=null){if(l!=null)throw Error(s(92));if(it(a)){if(1<a.length)throw Error(s(93));a=a[0]}l=a}l==null&&(l=""),t=l}l=xt(t),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),bi(e)}function aa(e,t){if(t){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=t;return}}e.textContent=t}var Zh=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 ms(e,t,l){var a=t.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,l):typeof l!="number"||l===0||Zh.has(t)?t==="float"?e.cssFloat=l:e[t]=(""+l).trim():e[t]=l+"px"}function ys(e,t,l){if(t!=null&&typeof t!="object")throw Error(s(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var n in t)a=t[n],t.hasOwnProperty(n)&&l[n]!==a&&ms(e,n,a)}else for(var u in t)t.hasOwnProperty(u)&&ms(e,u,t[u])}function Si(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 Vh=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"]]),Kh=/^[\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 Xn(e){return Kh.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Lt(){}var Ti=null;function zi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var na=null,ua=null;function ps(e){var t=Pl(e);if(t&&(e=t.stateNode)){var l=e[Pe]||null;e:switch(e=t.stateNode,t.type){case"input":if(vi(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="'+St(""+t)+'"][type="radio"]'),t=0;t<l.length;t++){var a=l[t];if(a!==e&&a.form===e.form){var n=a[Pe]||null;if(!n)throw Error(s(90));vi(a,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name)}}for(t=0;t<l.length;t++)a=l[t],a.form===e.form&&os(a)}break e;case"textarea":hs(e,l.value,l.defaultValue);break e;case"select":t=l.value,t!=null&&la(e,!!l.multiple,t,!1)}}}var ki=!1;function bs(e,t,l){if(ki)return e(t,l);ki=!0;try{var a=e(t);return a}finally{if(ki=!1,(na!==null||ua!==null)&&(Ou(),na&&(t=na,e=ua,ua=na=null,ps(t),e)))for(t=0;t<e.length;t++)ps(e[t])}}function Ya(e,t){var l=e.stateNode;if(l===null)return null;var a=l[Pe]||null;if(a===null)return null;l=a[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":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(l&&typeof l!="function")throw Error(s(231,t,typeof l));return l}var Yt=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ei=!1;if(Yt)try{var Ga={};Object.defineProperty(Ga,"passive",{get:function(){Ei=!0}}),window.addEventListener("test",Ga,Ga),window.removeEventListener("test",Ga,Ga)}catch{Ei=!1}var cl=null,_i=null,Zn=null;function vs(){if(Zn)return Zn;var e,t=_i,l=t.length,a,n="value"in cl?cl.value:cl.textContent,u=n.length;for(e=0;e<l&&t[e]===n[e];e++);var i=l-e;for(a=1;a<=i&&t[l-a]===n[u-a];a++);return Zn=n.slice(e,1<a?1-a:void 0)}function Vn(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 Kn(){return!0}function xs(){return!1}function et(e){function t(l,a,n,u,i){this._reactName=l,this._targetInst=n,this.type=a,this.nativeEvent=u,this.target=i,this.currentTarget=null;for(var f in e)e.hasOwnProperty(f)&&(l=e[f],this[f]=l?l(u):u[f]);return this.isDefaultPrevented=(u.defaultPrevented!=null?u.defaultPrevented:u.returnValue===!1)?Kn:xs,this.isPropagationStopped=xs,this}return C(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=Kn)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Kn)},persist:function(){},isPersistent:Kn}),t}var Rl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jn=et(Rl),Qa=C({},Rl,{view:0,detail:0}),Jh=et(Qa),Ai,Mi,Xa,$n=C({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Ni,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!==Xa&&(Xa&&e.type==="mousemove"?(Ai=e.screenX-Xa.screenX,Mi=e.screenY-Xa.screenY):Mi=Ai=0,Xa=e),Ai)},movementY:function(e){return"movementY"in e?e.movementY:Mi}}),Ss=et($n),$h=C({},$n,{dataTransfer:0}),Wh=et($h),Fh=C({},Qa,{relatedTarget:0}),ji=et(Fh),Ih=C({},Rl,{animationName:0,elapsedTime:0,pseudoElement:0}),Ph=et(Ih),e0=C({},Rl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),t0=et(e0),l0=C({},Rl,{data:0}),Ts=et(l0),a0={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},n0={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"},u0={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function i0(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=u0[e])?!!t[e]:!1}function Ni(){return i0}var c0=C({},Qa,{key:function(e){if(e.key){var t=a0[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vn(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?n0[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Ni,charCode:function(e){return e.type==="keypress"?Vn(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vn(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),r0=et(c0),s0=C({},$n,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zs=et(s0),f0=C({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Ni}),o0=et(f0),d0=C({},Rl,{propertyName:0,elapsedTime:0,pseudoElement:0}),h0=et(d0),g0=C({},$n,{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}),m0=et(g0),y0=C({},Rl,{newState:0,oldState:0}),p0=et(y0),b0=[9,13,27,32],Oi=Yt&&"CompositionEvent"in window,Za=null;Yt&&"documentMode"in document&&(Za=document.documentMode);var v0=Yt&&"TextEvent"in window&&!Za,ks=Yt&&(!Oi||Za&&8<Za&&11>=Za),Es=" ",_s=!1;function As(e,t){switch(e){case"keyup":return b0.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ms(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ia=!1;function x0(e,t){switch(e){case"compositionend":return Ms(t);case"keypress":return t.which!==32?null:(_s=!0,Es);case"textInput":return e=t.data,e===Es&&_s?null:e;default:return null}}function S0(e,t){if(ia)return e==="compositionend"||!Oi&&As(e,t)?(e=vs(),Zn=_i=cl=null,ia=!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 ks&&t.locale!=="ko"?null:t.data;default:return null}}var T0={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 js(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!T0[e.type]:t==="textarea"}function Ns(e,t,l,a){na?ua?ua.push(a):ua=[a]:na=a,t=Bu(t,"onChange"),0<t.length&&(l=new Jn("onChange","change",null,l,a),e.push({event:l,listeners:t}))}var Va=null,Ka=null;function z0(e){gd(e,0)}function Wn(e){var t=La(e);if(os(t))return e}function Os(e,t){if(e==="change")return t}var Ds=!1;if(Yt){var Di;if(Yt){var Ri="oninput"in document;if(!Ri){var Rs=document.createElement("div");Rs.setAttribute("oninput","return;"),Ri=typeof Rs.oninput=="function"}Di=Ri}else Di=!1;Ds=Di&&(!document.documentMode||9<document.documentMode)}function Cs(){Va&&(Va.detachEvent("onpropertychange",ws),Ka=Va=null)}function ws(e){if(e.propertyName==="value"&&Wn(Ka)){var t=[];Ns(t,Ka,e,zi(e)),bs(z0,t)}}function k0(e,t,l){e==="focusin"?(Cs(),Va=t,Ka=l,Va.attachEvent("onpropertychange",ws)):e==="focusout"&&Cs()}function E0(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Wn(Ka)}function _0(e,t){if(e==="click")return Wn(t)}function A0(e,t){if(e==="input"||e==="change")return Wn(t)}function M0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ft=typeof Object.is=="function"?Object.is:M0;function Ja(e,t){if(ft(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var l=Object.keys(e),a=Object.keys(t);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var n=l[a];if(!fi.call(t,n)||!ft(e[n],t[n]))return!1}return!0}function Us(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hs(e,t){var l=Us(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=t&&a>=t)return{node:l,offset:t-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Us(l)}}function Bs(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Bs(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qs(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Qn(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=Qn(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 j0=Yt&&"documentMode"in document&&11>=document.documentMode,ca=null,wi=null,$a=null,Ui=!1;function Ls(e,t,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Ui||ca==null||ca!==Qn(a)||(a=ca,"selectionStart"in a&&Ci(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),$a&&Ja($a,a)||($a=a,a=Bu(wi,"onSelect"),0<a.length&&(t=new Jn("onSelect","select",null,t,l),e.push({event:t,listeners:a}),t.target=ca)))}function Cl(e,t){var l={};return l[e.toLowerCase()]=t.toLowerCase(),l["Webkit"+e]="webkit"+t,l["Moz"+e]="moz"+t,l}var ra={animationend:Cl("Animation","AnimationEnd"),animationiteration:Cl("Animation","AnimationIteration"),animationstart:Cl("Animation","AnimationStart"),transitionrun:Cl("Transition","TransitionRun"),transitionstart:Cl("Transition","TransitionStart"),transitioncancel:Cl("Transition","TransitionCancel"),transitionend:Cl("Transition","TransitionEnd")},Hi={},Ys={};Yt&&(Ys=document.createElement("div").style,"AnimationEvent"in window||(delete ra.animationend.animation,delete ra.animationiteration.animation,delete ra.animationstart.animation),"TransitionEvent"in window||delete ra.transitionend.transition);function wl(e){if(Hi[e])return Hi[e];if(!ra[e])return e;var t=ra[e],l;for(l in t)if(t.hasOwnProperty(l)&&l in Ys)return Hi[e]=t[l];return e}var Gs=wl("animationend"),Qs=wl("animationiteration"),Xs=wl("animationstart"),N0=wl("transitionrun"),O0=wl("transitionstart"),D0=wl("transitioncancel"),Zs=wl("transitionend"),Vs=new Map,Bi="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(" ");Bi.push("scrollEnd");function Nt(e,t){Vs.set(e,t),Dl(t,[e])}var Fn=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)},Tt=[],sa=0,qi=0;function In(){for(var e=sa,t=qi=sa=0;t<e;){var l=Tt[t];Tt[t++]=null;var a=Tt[t];Tt[t++]=null;var n=Tt[t];Tt[t++]=null;var u=Tt[t];if(Tt[t++]=null,a!==null&&n!==null){var i=a.pending;i===null?n.next=n:(n.next=i.next,i.next=n),a.pending=n}u!==0&&Ks(l,n,u)}}function Pn(e,t,l,a){Tt[sa++]=e,Tt[sa++]=t,Tt[sa++]=l,Tt[sa++]=a,qi|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Li(e,t,l,a){return Pn(e,t,l,a),eu(e)}function Ul(e,t){return Pn(e,null,null,t),eu(e)}function Ks(e,t,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var n=!1,u=e.return;u!==null;)u.childLanes|=l,a=u.alternate,a!==null&&(a.childLanes|=l),u.tag===22&&(e=u.stateNode,e===null||e._visibility&1||(n=!0)),e=u,u=u.return;return e.tag===3?(u=e.stateNode,n&&t!==null&&(n=31-st(l),e=u.hiddenUpdates,a=e[n],a===null?e[n]=[t]:a.push(t),t.lane=l|536870912),u):null}function eu(e){if(50<bn)throw bn=0,$c=null,Error(s(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var fa={};function R0(e,t,l,a){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=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ot(e,t,l,a){return new R0(e,t,l,a)}function Yi(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Gt(e,t){var l=e.alternate;return l===null?(l=ot(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 Js(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 tu(e,t,l,a,n,u){var i=0;if(a=e,typeof e=="function")Yi(e)&&(i=1);else if(typeof e=="string")i=Bg(e,l,B.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case pt:return e=ot(31,l,t,n),e.elementType=pt,e.lanes=u,e;case J:return Hl(l.children,n,u,t);case Ae:i=8,n|=24;break;case X:return e=ot(12,l,t,n|2),e.elementType=X,e.lanes=u,e;case Ne:return e=ot(13,l,t,n),e.elementType=Ne,e.lanes=u,e;case Ce:return e=ot(19,l,t,n),e.elementType=Ce,e.lanes=u,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case le:i=10;break e;case te:i=9;break e;case ke:i=11;break e;case $:i=14;break e;case we:i=16,a=null;break e}i=29,l=Error(s(130,e===null?"null":typeof e,"")),a=null}return t=ot(i,l,t,n),t.elementType=e,t.type=a,t.lanes=u,t}function Hl(e,t,l,a){return e=ot(7,e,a,t),e.lanes=l,e}function Gi(e,t,l){return e=ot(6,e,null,t),e.lanes=l,e}function $s(e){var t=ot(18,null,null,0);return t.stateNode=e,t}function Qi(e,t,l){return t=ot(4,e.children!==null?e.children:[],e.key,t),t.lanes=l,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ws=new WeakMap;function zt(e,t){if(typeof e=="object"&&e!==null){var l=Ws.get(e);return l!==void 0?l:(t={value:e,source:t,stack:$r(t)},Ws.set(e,t),t)}return{value:e,source:t,stack:$r(t)}}var oa=[],da=0,lu=null,Wa=0,kt=[],Et=0,rl=null,Ct=1,wt="";function Qt(e,t){oa[da++]=Wa,oa[da++]=lu,lu=e,Wa=t}function Fs(e,t,l){kt[Et++]=Ct,kt[Et++]=wt,kt[Et++]=rl,rl=e;var a=Ct;e=wt;var n=32-st(a)-1;a&=~(1<<n),l+=1;var u=32-st(t)+n;if(30<u){var i=n-n%5;u=(a&(1<<i)-1).toString(32),a>>=i,n-=i,Ct=1<<32-st(t)+n|l<<n|a,wt=u+e}else Ct=1<<u|l<<n|a,wt=e}function Xi(e){e.return!==null&&(Qt(e,1),Fs(e,1,0))}function Zi(e){for(;e===lu;)lu=oa[--da],oa[da]=null,Wa=oa[--da],oa[da]=null;for(;e===rl;)rl=kt[--Et],kt[Et]=null,wt=kt[--Et],kt[Et]=null,Ct=kt[--Et],kt[Et]=null}function Is(e,t){kt[Et++]=Ct,kt[Et++]=wt,kt[Et++]=rl,Ct=t.id,wt=t.overflow,rl=e}var Ze=null,Te=null,re=!1,sl=null,_t=!1,Vi=Error(s(519));function fl(e){var t=Error(s(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Fa(zt(t,e)),Vi}function Ps(e){var t=e.stateNode,l=e.type,a=e.memoizedProps;switch(t[Xe]=e,t[Pe]=a,l){case"dialog":ne("cancel",t),ne("close",t);break;case"iframe":case"object":case"embed":ne("load",t);break;case"video":case"audio":for(l=0;l<xn.length;l++)ne(xn[l],t);break;case"source":ne("error",t);break;case"img":case"image":case"link":ne("error",t),ne("load",t);break;case"details":ne("toggle",t);break;case"input":ne("invalid",t),ds(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":ne("invalid",t);break;case"textarea":ne("invalid",t),gs(t,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||t.textContent===""+l||a.suppressHydrationWarning===!0||bd(t.textContent,l)?(a.popover!=null&&(ne("beforetoggle",t),ne("toggle",t)),a.onScroll!=null&&ne("scroll",t),a.onScrollEnd!=null&&ne("scrollend",t),a.onClick!=null&&(t.onclick=Lt),t=!0):t=!1,t||fl(e,!0)}function ef(e){for(Ze=e.return;Ze;)switch(Ze.tag){case 5:case 31:case 13:_t=!1;return;case 27:case 3:_t=!0;return;default:Ze=Ze.return}}function ha(e){if(e!==Ze)return!1;if(!re)return ef(e),re=!0,!1;var t=e.tag,l;if((l=t!==3&&t!==27)&&((l=t===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||fr(e.type,e.memoizedProps)),l=!l),l&&Te&&fl(e),ef(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Te=Ad(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(317));Te=Ad(e)}else t===27?(t=Te,kl(e.type)?(e=mr,mr=null,Te=e):Te=t):Te=Ze?Mt(e.stateNode.nextSibling):null;return!0}function Bl(){Te=Ze=null,re=!1}function Ki(){var e=sl;return e!==null&&(nt===null?nt=e:nt.push.apply(nt,e),sl=null),e}function Fa(e){sl===null?sl=[e]:sl.push(e)}var Ji=b(null),ql=null,Xt=null;function ol(e,t,l){U(Ji,t._currentValue),t._currentValue=l}function Zt(e){e._currentValue=Ji.current,M(Ji)}function $i(e,t,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===l)break;e=e.return}}function Wi(e,t,l,a){var n=e.child;for(n!==null&&(n.return=e);n!==null;){var u=n.dependencies;if(u!==null){var i=n.child;u=u.firstContext;e:for(;u!==null;){var f=u;u=n;for(var m=0;m<t.length;m++)if(f.context===t[m]){u.lanes|=l,f=u.alternate,f!==null&&(f.lanes|=l),$i(u.return,l,e),a||(i=null);break e}u=f.next}}else if(n.tag===18){if(i=n.return,i===null)throw Error(s(341));i.lanes|=l,u=i.alternate,u!==null&&(u.lanes|=l),$i(i,l,e),i=null}else i=n.child;if(i!==null)i.return=n;else for(i=n;i!==null;){if(i===e){i=null;break}if(n=i.sibling,n!==null){n.return=i.return,i=n;break}i=i.return}n=i}}function ga(e,t,l,a){e=null;for(var n=t,u=!1;n!==null;){if(!u){if((n.flags&524288)!==0)u=!0;else if((n.flags&262144)!==0)break}if(n.tag===10){var i=n.alternate;if(i===null)throw Error(s(387));if(i=i.memoizedProps,i!==null){var f=n.type;ft(n.pendingProps.value,i.value)||(e!==null?e.push(f):e=[f])}}else if(n===de.current){if(i=n.alternate,i===null)throw Error(s(387));i.memoizedState.memoizedState!==n.memoizedState.memoizedState&&(e!==null?e.push(En):e=[En])}n=n.return}e!==null&&Wi(t,e,l,a),t.flags|=262144}function au(e){for(e=e.firstContext;e!==null;){if(!ft(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Ll(e){ql=e,Xt=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ve(e){return tf(ql,e)}function nu(e,t){return ql===null&&Ll(e),tf(e,t)}function tf(e,t){var l=t._currentValue;if(t={context:t,memoizedValue:l,next:null},Xt===null){if(e===null)throw Error(s(308));Xt=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else Xt=Xt.next=t;return l}var C0=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(l){return l()})}},w0=r.unstable_scheduleCallback,U0=r.unstable_NormalPriority,Ue={$$typeof:le,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Fi(){return{controller:new C0,data:new Map,refCount:0}}function Ia(e){e.refCount--,e.refCount===0&&w0(U0,function(){e.controller.abort()})}var Pa=null,Ii=0,ma=0,ya=null;function H0(e,t){if(Pa===null){var l=Pa=[];Ii=0,ma=tr(),ya={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Ii++,t.then(lf,lf),t}function lf(){if(--Ii===0&&Pa!==null){ya!==null&&(ya.status="fulfilled");var e=Pa;Pa=null,ma=0,ya=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function B0(e,t){var l=[],a={status:"pending",value:null,reason:null,then:function(n){l.push(n)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var n=0;n<l.length;n++)(0,l[n])(t)},function(n){for(a.status="rejected",a.reason=n,n=0;n<l.length;n++)(0,l[n])(void 0)}),a}var af=N.S;N.S=function(e,t){Go=ct(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&H0(e,t),af!==null&&af(e,t)};var Yl=b(null);function Pi(){var e=Yl.current;return e!==null?e:xe.pooledCache}function uu(e,t){t===null?U(Yl,Yl.current):U(Yl,t.pool)}function nf(){var e=Pi();return e===null?null:{parent:Ue._currentValue,pool:e}}var pa=Error(s(460)),ec=Error(s(474)),iu=Error(s(542)),cu={then:function(){}};function uf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function cf(e,t,l){switch(l=e[l],l===void 0?e.push(t):l!==t&&(t.then(Lt,Lt),t=l),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sf(e),e;default:if(typeof t.status=="string")t.then(Lt,Lt);else{if(e=xe,e!==null&&100<e.shellSuspendCounter)throw Error(s(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var n=t;n.status="fulfilled",n.value=a}},function(a){if(t.status==="pending"){var n=t;n.status="rejected",n.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,sf(e),e}throw Ql=t,pa}}function Gl(e){try{var t=e._init;return t(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ql=l,pa):l}}var Ql=null;function rf(){if(Ql===null)throw Error(s(459));var e=Ql;return Ql=null,e}function sf(e){if(e===pa||e===iu)throw Error(s(483))}var ba=null,en=0;function ru(e){var t=en;return en+=1,ba===null&&(ba=[]),cf(ba,e,t)}function tn(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function su(e,t){throw t.$$typeof===R?Error(s(525)):(e=Object.prototype.toString.call(t),Error(s(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function ff(e){function t(S,v){if(e){var k=S.deletions;k===null?(S.deletions=[v],S.flags|=16):k.push(v)}}function l(S,v){if(!e)return null;for(;v!==null;)t(S,v),v=v.sibling;return null}function a(S){for(var v=new Map;S!==null;)S.key!==null?v.set(S.key,S):v.set(S.index,S),S=S.sibling;return v}function n(S,v){return S=Gt(S,v),S.index=0,S.sibling=null,S}function u(S,v,k){return S.index=k,e?(k=S.alternate,k!==null?(k=k.index,k<v?(S.flags|=67108866,v):k):(S.flags|=67108866,v)):(S.flags|=1048576,v)}function i(S){return e&&S.alternate===null&&(S.flags|=67108866),S}function f(S,v,k,O){return v===null||v.tag!==6?(v=Gi(k,S.mode,O),v.return=S,v):(v=n(v,k),v.return=S,v)}function m(S,v,k,O){var Z=k.type;return Z===J?j(S,v,k.props.children,O,k.key):v!==null&&(v.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===we&&Gl(Z)===v.type)?(v=n(v,k.props),tn(v,k),v.return=S,v):(v=tu(k.type,k.key,k.props,null,S.mode,O),tn(v,k),v.return=S,v)}function E(S,v,k,O){return v===null||v.tag!==4||v.stateNode.containerInfo!==k.containerInfo||v.stateNode.implementation!==k.implementation?(v=Qi(k,S.mode,O),v.return=S,v):(v=n(v,k.children||[]),v.return=S,v)}function j(S,v,k,O,Z){return v===null||v.tag!==7?(v=Hl(k,S.mode,O,Z),v.return=S,v):(v=n(v,k),v.return=S,v)}function D(S,v,k){if(typeof v=="string"&&v!==""||typeof v=="number"||typeof v=="bigint")return v=Gi(""+v,S.mode,k),v.return=S,v;if(typeof v=="object"&&v!==null){switch(v.$$typeof){case L:return k=tu(v.type,v.key,v.props,null,S.mode,k),tn(k,v),k.return=S,k;case Q:return v=Qi(v,S.mode,k),v.return=S,v;case we:return v=Gl(v),D(S,v,k)}if(it(v)||Le(v))return v=Hl(v,S.mode,k,null),v.return=S,v;if(typeof v.then=="function")return D(S,ru(v),k);if(v.$$typeof===le)return D(S,nu(S,v),k);su(S,v)}return null}function _(S,v,k,O){var Z=v!==null?v.key:null;if(typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint")return Z!==null?null:f(S,v,""+k,O);if(typeof k=="object"&&k!==null){switch(k.$$typeof){case L:return k.key===Z?m(S,v,k,O):null;case Q:return k.key===Z?E(S,v,k,O):null;case we:return k=Gl(k),_(S,v,k,O)}if(it(k)||Le(k))return Z!==null?null:j(S,v,k,O,null);if(typeof k.then=="function")return _(S,v,ru(k),O);if(k.$$typeof===le)return _(S,v,nu(S,k),O);su(S,k)}return null}function A(S,v,k,O,Z){if(typeof O=="string"&&O!==""||typeof O=="number"||typeof O=="bigint")return S=S.get(k)||null,f(v,S,""+O,Z);if(typeof O=="object"&&O!==null){switch(O.$$typeof){case L:return S=S.get(O.key===null?k:O.key)||null,m(v,S,O,Z);case Q:return S=S.get(O.key===null?k:O.key)||null,E(v,S,O,Z);case we:return O=Gl(O),A(S,v,k,O,Z)}if(it(O)||Le(O))return S=S.get(k)||null,j(v,S,O,Z,null);if(typeof O.then=="function")return A(S,v,k,ru(O),Z);if(O.$$typeof===le)return A(S,v,k,nu(v,O),Z);su(v,O)}return null}function Y(S,v,k,O){for(var Z=null,se=null,G=v,ee=v=0,ce=null;G!==null&&ee<k.length;ee++){G.index>ee?(ce=G,G=null):ce=G.sibling;var fe=_(S,G,k[ee],O);if(fe===null){G===null&&(G=ce);break}e&&G&&fe.alternate===null&&t(S,G),v=u(fe,v,ee),se===null?Z=fe:se.sibling=fe,se=fe,G=ce}if(ee===k.length)return l(S,G),re&&Qt(S,ee),Z;if(G===null){for(;ee<k.length;ee++)G=D(S,k[ee],O),G!==null&&(v=u(G,v,ee),se===null?Z=G:se.sibling=G,se=G);return re&&Qt(S,ee),Z}for(G=a(G);ee<k.length;ee++)ce=A(G,S,ee,k[ee],O),ce!==null&&(e&&ce.alternate!==null&&G.delete(ce.key===null?ee:ce.key),v=u(ce,v,ee),se===null?Z=ce:se.sibling=ce,se=ce);return e&&G.forEach(function(jl){return t(S,jl)}),re&&Qt(S,ee),Z}function K(S,v,k,O){if(k==null)throw Error(s(151));for(var Z=null,se=null,G=v,ee=v=0,ce=null,fe=k.next();G!==null&&!fe.done;ee++,fe=k.next()){G.index>ee?(ce=G,G=null):ce=G.sibling;var jl=_(S,G,fe.value,O);if(jl===null){G===null&&(G=ce);break}e&&G&&jl.alternate===null&&t(S,G),v=u(jl,v,ee),se===null?Z=jl:se.sibling=jl,se=jl,G=ce}if(fe.done)return l(S,G),re&&Qt(S,ee),Z;if(G===null){for(;!fe.done;ee++,fe=k.next())fe=D(S,fe.value,O),fe!==null&&(v=u(fe,v,ee),se===null?Z=fe:se.sibling=fe,se=fe);return re&&Qt(S,ee),Z}for(G=a(G);!fe.done;ee++,fe=k.next())fe=A(G,S,ee,fe.value,O),fe!==null&&(e&&fe.alternate!==null&&G.delete(fe.key===null?ee:fe.key),v=u(fe,v,ee),se===null?Z=fe:se.sibling=fe,se=fe);return e&&G.forEach(function($g){return t(S,$g)}),re&&Qt(S,ee),Z}function ve(S,v,k,O){if(typeof k=="object"&&k!==null&&k.type===J&&k.key===null&&(k=k.props.children),typeof k=="object"&&k!==null){switch(k.$$typeof){case L:e:{for(var Z=k.key;v!==null;){if(v.key===Z){if(Z=k.type,Z===J){if(v.tag===7){l(S,v.sibling),O=n(v,k.props.children),O.return=S,S=O;break e}}else if(v.elementType===Z||typeof Z=="object"&&Z!==null&&Z.$$typeof===we&&Gl(Z)===v.type){l(S,v.sibling),O=n(v,k.props),tn(O,k),O.return=S,S=O;break e}l(S,v);break}else t(S,v);v=v.sibling}k.type===J?(O=Hl(k.props.children,S.mode,O,k.key),O.return=S,S=O):(O=tu(k.type,k.key,k.props,null,S.mode,O),tn(O,k),O.return=S,S=O)}return i(S);case Q:e:{for(Z=k.key;v!==null;){if(v.key===Z)if(v.tag===4&&v.stateNode.containerInfo===k.containerInfo&&v.stateNode.implementation===k.implementation){l(S,v.sibling),O=n(v,k.children||[]),O.return=S,S=O;break e}else{l(S,v);break}else t(S,v);v=v.sibling}O=Qi(k,S.mode,O),O.return=S,S=O}return i(S);case we:return k=Gl(k),ve(S,v,k,O)}if(it(k))return Y(S,v,k,O);if(Le(k)){if(Z=Le(k),typeof Z!="function")throw Error(s(150));return k=Z.call(k),K(S,v,k,O)}if(typeof k.then=="function")return ve(S,v,ru(k),O);if(k.$$typeof===le)return ve(S,v,nu(S,k),O);su(S,k)}return typeof k=="string"&&k!==""||typeof k=="number"||typeof k=="bigint"?(k=""+k,v!==null&&v.tag===6?(l(S,v.sibling),O=n(v,k),O.return=S,S=O):(l(S,v),O=Gi(k,S.mode,O),O.return=S,S=O),i(S)):l(S,v)}return function(S,v,k,O){try{en=0;var Z=ve(S,v,k,O);return ba=null,Z}catch(G){if(G===pa||G===iu)throw G;var se=ot(29,G,null,S.mode);return se.lanes=O,se.return=S,se}finally{}}}var Xl=ff(!0),of=ff(!1),dl=!1;function tc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function lc(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 hl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gl(e,t,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(oe&2)!==0){var n=a.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),a.pending=t,t=eu(e),Ks(e,null,l),t}return Pn(e,a,t,l),eu(e)}function ln(e,t,l){if(t=t.updateQueue,t!==null&&(t=t.shared,(l&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,ts(e,l)}}function ac(e,t){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var n=null,u=null;if(l=l.firstBaseUpdate,l!==null){do{var i={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};u===null?n=u=i:u=u.next=i,l=l.next}while(l!==null);u===null?n=u=t:u=u.next=t}else n=u=t;l={baseState:a.baseState,firstBaseUpdate:n,lastBaseUpdate:u,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=t:e.next=t,l.lastBaseUpdate=t}var nc=!1;function an(){if(nc){var e=ya;if(e!==null)throw e}}function nn(e,t,l,a){nc=!1;var n=e.updateQueue;dl=!1;var u=n.firstBaseUpdate,i=n.lastBaseUpdate,f=n.shared.pending;if(f!==null){n.shared.pending=null;var m=f,E=m.next;m.next=null,i===null?u=E:i.next=E,i=m;var j=e.alternate;j!==null&&(j=j.updateQueue,f=j.lastBaseUpdate,f!==i&&(f===null?j.firstBaseUpdate=E:f.next=E,j.lastBaseUpdate=m))}if(u!==null){var D=n.baseState;i=0,j=E=m=null,f=u;do{var _=f.lane&-536870913,A=_!==f.lane;if(A?(ie&_)===_:(a&_)===_){_!==0&&_===ma&&(nc=!0),j!==null&&(j=j.next={lane:0,tag:f.tag,payload:f.payload,callback:null,next:null});e:{var Y=e,K=f;_=t;var ve=l;switch(K.tag){case 1:if(Y=K.payload,typeof Y=="function"){D=Y.call(ve,D,_);break e}D=Y;break e;case 3:Y.flags=Y.flags&-65537|128;case 0:if(Y=K.payload,_=typeof Y=="function"?Y.call(ve,D,_):Y,_==null)break e;D=C({},D,_);break e;case 2:dl=!0}}_=f.callback,_!==null&&(e.flags|=64,A&&(e.flags|=8192),A=n.callbacks,A===null?n.callbacks=[_]:A.push(_))}else A={lane:_,tag:f.tag,payload:f.payload,callback:f.callback,next:null},j===null?(E=j=A,m=D):j=j.next=A,i|=_;if(f=f.next,f===null){if(f=n.shared.pending,f===null)break;A=f,f=A.next,A.next=null,n.lastBaseUpdate=A,n.shared.pending=null}}while(!0);j===null&&(m=D),n.baseState=m,n.firstBaseUpdate=E,n.lastBaseUpdate=j,u===null&&(n.shared.lanes=0),vl|=i,e.lanes=i,e.memoizedState=D}}function df(e,t){if(typeof e!="function")throw Error(s(191,e));e.call(t)}function hf(e,t){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)df(l[e],t)}var va=b(null),fu=b(0);function gf(e,t){e=el,U(fu,e),U(va,t),el=e|t.baseLanes}function uc(){U(fu,el),U(va,va.current)}function ic(){el=fu.current,M(va),M(fu)}var dt=b(null),At=null;function ml(e){var t=e.alternate;U(De,De.current&1),U(dt,e),At===null&&(t===null||va.current!==null||t.memoizedState!==null)&&(At=e)}function cc(e){U(De,De.current),U(dt,e),At===null&&(At=e)}function mf(e){e.tag===22?(U(De,De.current),U(dt,e),At===null&&(At=e)):yl()}function yl(){U(De,De.current),U(dt,dt.current)}function ht(e){M(dt),At===e&&(At=null),M(De)}var De=b(0);function ou(e){for(var t=e;t!==null;){if(t.tag===13){var l=t.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||hr(l)||gr(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 Vt=0,P=null,pe=null,He=null,du=!1,xa=!1,Zl=!1,hu=0,un=0,Sa=null,q0=0;function Me(){throw Error(s(321))}function rc(e,t){if(t===null)return!1;for(var l=0;l<t.length&&l<e.length;l++)if(!ft(e[l],t[l]))return!1;return!0}function sc(e,t,l,a,n,u){return Vt=u,P=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,N.H=e===null||e.memoizedState===null?If:kc,Zl=!1,u=l(a,n),Zl=!1,xa&&(u=pf(t,l,a,n)),yf(e),u}function yf(e){N.H=sn;var t=pe!==null&&pe.next!==null;if(Vt=0,He=pe=P=null,du=!1,un=0,Sa=null,t)throw Error(s(300));e===null||Be||(e=e.dependencies,e!==null&&au(e)&&(Be=!0))}function pf(e,t,l,a){P=e;var n=0;do{if(xa&&(Sa=null),un=0,xa=!1,25<=n)throw Error(s(301));if(n+=1,He=pe=null,e.updateQueue!=null){var u=e.updateQueue;u.lastEffect=null,u.events=null,u.stores=null,u.memoCache!=null&&(u.memoCache.index=0)}N.H=Pf,u=t(l,a)}while(xa);return u}function L0(){var e=N.H,t=e.useState()[0];return t=typeof t.then=="function"?cn(t):t,e=e.useState()[0],(pe!==null?pe.memoizedState:null)!==e&&(P.flags|=1024),t}function fc(){var e=hu!==0;return hu=0,e}function oc(e,t,l){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l}function dc(e){if(du){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}du=!1}Vt=0,He=pe=P=null,xa=!1,un=hu=0,Sa=null}function Fe(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return He===null?P.memoizedState=He=e:He=He.next=e,He}function Re(){if(pe===null){var e=P.alternate;e=e!==null?e.memoizedState:null}else e=pe.next;var t=He===null?P.memoizedState:He.next;if(t!==null)He=t,pe=e;else{if(e===null)throw P.alternate===null?Error(s(467)):Error(s(310));pe=e,e={memoizedState:pe.memoizedState,baseState:pe.baseState,baseQueue:pe.baseQueue,queue:pe.queue,next:null},He===null?P.memoizedState=He=e:He=He.next=e}return He}function gu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function cn(e){var t=un;return un+=1,Sa===null&&(Sa=[]),e=cf(Sa,e,t),t=P,(He===null?t.memoizedState:He.next)===null&&(t=t.alternate,N.H=t===null||t.memoizedState===null?If:kc),e}function mu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return cn(e);if(e.$$typeof===le)return Ve(e)}throw Error(s(438,String(e)))}function hc(e){var t=null,l=P.updateQueue;if(l!==null&&(t=l.memoCache),t==null){var a=P.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(n){return n.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),l===null&&(l=gu(),P.updateQueue=l),l.memoCache=t,l=t.data[t.index],l===void 0)for(l=t.data[t.index]=Array(e),a=0;a<e;a++)l[a]=_e;return t.index++,l}function Kt(e,t){return typeof t=="function"?t(e):t}function yu(e){var t=Re();return gc(t,pe,e)}function gc(e,t,l){var a=e.queue;if(a===null)throw Error(s(311));a.lastRenderedReducer=l;var n=e.baseQueue,u=a.pending;if(u!==null){if(n!==null){var i=n.next;n.next=u.next,u.next=i}t.baseQueue=n=u,a.pending=null}if(u=e.baseState,n===null)e.memoizedState=u;else{t=n.next;var f=i=null,m=null,E=t,j=!1;do{var D=E.lane&-536870913;if(D!==E.lane?(ie&D)===D:(Vt&D)===D){var _=E.revertLane;if(_===0)m!==null&&(m=m.next={lane:0,revertLane:0,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null}),D===ma&&(j=!0);else if((Vt&_)===_){E=E.next,_===ma&&(j=!0);continue}else D={lane:0,revertLane:E.revertLane,gesture:null,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},m===null?(f=m=D,i=u):m=m.next=D,P.lanes|=_,vl|=_;D=E.action,Zl&&l(u,D),u=E.hasEagerState?E.eagerState:l(u,D)}else _={lane:D,revertLane:E.revertLane,gesture:E.gesture,action:E.action,hasEagerState:E.hasEagerState,eagerState:E.eagerState,next:null},m===null?(f=m=_,i=u):m=m.next=_,P.lanes|=D,vl|=D;E=E.next}while(E!==null&&E!==t);if(m===null?i=u:m.next=f,!ft(u,e.memoizedState)&&(Be=!0,j&&(l=ya,l!==null)))throw l;e.memoizedState=u,e.baseState=i,e.baseQueue=m,a.lastRenderedState=u}return n===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function mc(e){var t=Re(),l=t.queue;if(l===null)throw Error(s(311));l.lastRenderedReducer=e;var a=l.dispatch,n=l.pending,u=t.memoizedState;if(n!==null){l.pending=null;var i=n=n.next;do u=e(u,i.action),i=i.next;while(i!==n);ft(u,t.memoizedState)||(Be=!0),t.memoizedState=u,t.baseQueue===null&&(t.baseState=u),l.lastRenderedState=u}return[u,a]}function bf(e,t,l){var a=P,n=Re(),u=re;if(u){if(l===void 0)throw Error(s(407));l=l()}else l=t();var i=!ft((pe||n).memoizedState,l);if(i&&(n.memoizedState=l,Be=!0),n=n.queue,bc(Sf.bind(null,a,n,e),[e]),n.getSnapshot!==t||i||He!==null&&He.memoizedState.tag&1){if(a.flags|=2048,Ta(9,{destroy:void 0},xf.bind(null,a,n,l,t),null),xe===null)throw Error(s(349));u||(Vt&127)!==0||vf(a,t,l)}return l}function vf(e,t,l){e.flags|=16384,e={getSnapshot:t,value:l},t=P.updateQueue,t===null?(t=gu(),P.updateQueue=t,t.stores=[e]):(l=t.stores,l===null?t.stores=[e]:l.push(e))}function xf(e,t,l,a){t.value=l,t.getSnapshot=a,Tf(t)&&zf(e)}function Sf(e,t,l){return l(function(){Tf(t)&&zf(e)})}function Tf(e){var t=e.getSnapshot;e=e.value;try{var l=t();return!ft(e,l)}catch{return!0}}function zf(e){var t=Ul(e,2);t!==null&&ut(t,e,2)}function yc(e){var t=Fe();if(typeof e=="function"){var l=e;if(e=l(),Zl){ul(!0);try{l()}finally{ul(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:e},t}function kf(e,t,l,a){return e.baseState=l,gc(e,pe,typeof a=="function"?a:Kt)}function Y0(e,t,l,a,n){if(vu(e))throw Error(s(485));if(e=t.action,e!==null){var u={payload:n,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(i){u.listeners.push(i)}};N.T!==null?l(!0):u.isTransition=!1,a(u),l=t.pending,l===null?(u.next=t.pending=u,Ef(t,u)):(u.next=l.next,t.pending=l.next=u)}}function Ef(e,t){var l=t.action,a=t.payload,n=e.state;if(t.isTransition){var u=N.T,i={};N.T=i;try{var f=l(n,a),m=N.S;m!==null&&m(i,f),_f(e,t,f)}catch(E){pc(e,t,E)}finally{u!==null&&i.types!==null&&(u.types=i.types),N.T=u}}else try{u=l(n,a),_f(e,t,u)}catch(E){pc(e,t,E)}}function _f(e,t,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){Af(e,t,a)},function(a){return pc(e,t,a)}):Af(e,t,l)}function Af(e,t,l){t.status="fulfilled",t.value=l,Mf(t),e.state=l,t=e.pending,t!==null&&(l=t.next,l===t?e.pending=null:(l=l.next,t.next=l,Ef(e,l)))}function pc(e,t,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=l,Mf(t),t=t.next;while(t!==a)}e.action=null}function Mf(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function jf(e,t){return t}function Nf(e,t){if(re){var l=xe.formState;if(l!==null){e:{var a=P;if(re){if(Te){t:{for(var n=Te,u=_t;n.nodeType!==8;){if(!u){n=null;break t}if(n=Mt(n.nextSibling),n===null){n=null;break t}}u=n.data,n=u==="F!"||u==="F"?n:null}if(n){Te=Mt(n.nextSibling),a=n.data==="F!";break e}}fl(a)}a=!1}a&&(t=l[0])}}return l=Fe(),l.memoizedState=l.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:jf,lastRenderedState:t},l.queue=a,l=$f.bind(null,P,a),a.dispatch=l,a=yc(!1),u=zc.bind(null,P,!1,a.queue),a=Fe(),n={state:t,dispatch:null,action:e,pending:null},a.queue=n,l=Y0.bind(null,P,n,u,l),n.dispatch=l,a.memoizedState=e,[t,l,!1]}function Of(e){var t=Re();return Df(t,pe,e)}function Df(e,t,l){if(t=gc(e,t,jf)[0],e=yu(Kt)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=cn(t)}catch(i){throw i===pa?iu:i}else a=t;t=Re();var n=t.queue,u=n.dispatch;return l!==t.memoizedState&&(P.flags|=2048,Ta(9,{destroy:void 0},G0.bind(null,n,l),null)),[a,u,e]}function G0(e,t){e.action=t}function Rf(e){var t=Re(),l=pe;if(l!==null)return Df(t,l,e);Re(),t=t.memoizedState,l=Re();var a=l.queue.dispatch;return l.memoizedState=e,[t,a,!1]}function Ta(e,t,l,a){return e={tag:e,create:l,deps:a,inst:t,next:null},t=P.updateQueue,t===null&&(t=gu(),P.updateQueue=t),l=t.lastEffect,l===null?t.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,t.lastEffect=e),e}function Cf(){return Re().memoizedState}function pu(e,t,l,a){var n=Fe();P.flags|=e,n.memoizedState=Ta(1|t,{destroy:void 0},l,a===void 0?null:a)}function bu(e,t,l,a){var n=Re();a=a===void 0?null:a;var u=n.memoizedState.inst;pe!==null&&a!==null&&rc(a,pe.memoizedState.deps)?n.memoizedState=Ta(t,u,l,a):(P.flags|=e,n.memoizedState=Ta(1|t,u,l,a))}function wf(e,t){pu(8390656,8,e,t)}function bc(e,t){bu(2048,8,e,t)}function Q0(e){P.flags|=4;var t=P.updateQueue;if(t===null)t=gu(),P.updateQueue=t,t.events=[e];else{var l=t.events;l===null?t.events=[e]:l.push(e)}}function Uf(e){var t=Re().memoizedState;return Q0({ref:t,nextImpl:e}),function(){if((oe&2)!==0)throw Error(s(440));return t.impl.apply(void 0,arguments)}}function Hf(e,t){return bu(4,2,e,t)}function Bf(e,t){return bu(4,4,e,t)}function qf(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 Lf(e,t,l){l=l!=null?l.concat([e]):null,bu(4,4,qf.bind(null,t,e),l)}function vc(){}function Yf(e,t){var l=Re();t=t===void 0?null:t;var a=l.memoizedState;return t!==null&&rc(t,a[1])?a[0]:(l.memoizedState=[e,t],e)}function Gf(e,t){var l=Re();t=t===void 0?null:t;var a=l.memoizedState;if(t!==null&&rc(t,a[1]))return a[0];if(a=e(),Zl){ul(!0);try{e()}finally{ul(!1)}}return l.memoizedState=[a,t],a}function xc(e,t,l){return l===void 0||(Vt&1073741824)!==0&&(ie&261930)===0?e.memoizedState=t:(e.memoizedState=l,e=Xo(),P.lanes|=e,vl|=e,l)}function Qf(e,t,l,a){return ft(l,t)?l:va.current!==null?(e=xc(e,l,a),ft(e,t)||(Be=!0),e):(Vt&42)===0||(Vt&1073741824)!==0&&(ie&261930)===0?(Be=!0,e.memoizedState=l):(e=Xo(),P.lanes|=e,vl|=e,t)}function Xf(e,t,l,a,n){var u=H.p;H.p=u!==0&&8>u?u:8;var i=N.T,f={};N.T=f,zc(e,!1,t,l);try{var m=n(),E=N.S;if(E!==null&&E(f,m),m!==null&&typeof m=="object"&&typeof m.then=="function"){var j=B0(m,a);rn(e,t,j,yt(e))}else rn(e,t,a,yt(e))}catch(D){rn(e,t,{then:function(){},status:"rejected",reason:D},yt())}finally{H.p=u,i!==null&&f.types!==null&&(i.types=f.types),N.T=i}}function X0(){}function Sc(e,t,l,a){if(e.tag!==5)throw Error(s(476));var n=Zf(e).queue;Xf(e,n,t,w,l===null?X0:function(){return Vf(e),l(a)})}function Zf(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:w,baseState:w,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:w},next:null};var l={};return t.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Kt,lastRenderedState:l},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Vf(e){var t=Zf(e);t.next===null&&(t=e.alternate.memoizedState),rn(e,t.next.queue,{},yt())}function Tc(){return Ve(En)}function Kf(){return Re().memoizedState}function Jf(){return Re().memoizedState}function Z0(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var l=yt();e=hl(l);var a=gl(t,e,l);a!==null&&(ut(a,t,l),ln(a,t,l)),t={cache:Fi()},e.payload=t;return}t=t.return}}function V0(e,t,l){var a=yt();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},vu(e)?Wf(t,l):(l=Li(e,t,l,a),l!==null&&(ut(l,e,a),Ff(l,t,a)))}function $f(e,t,l){var a=yt();rn(e,t,l,a)}function rn(e,t,l,a){var n={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(vu(e))Wf(t,n);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var i=t.lastRenderedState,f=u(i,l);if(n.hasEagerState=!0,n.eagerState=f,ft(f,i))return Pn(e,t,n,0),xe===null&&In(),!1}catch{}finally{}if(l=Li(e,t,n,a),l!==null)return ut(l,e,a),Ff(l,t,a),!0}return!1}function zc(e,t,l,a){if(a={lane:2,revertLane:tr(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},vu(e)){if(t)throw Error(s(479))}else t=Li(e,l,a,2),t!==null&&ut(t,e,2)}function vu(e){var t=e.alternate;return e===P||t!==null&&t===P}function Wf(e,t){xa=du=!0;var l=e.pending;l===null?t.next=t:(t.next=l.next,l.next=t),e.pending=t}function Ff(e,t,l){if((l&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,l|=a,t.lanes=l,ts(e,l)}}var sn={readContext:Ve,use:mu,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useLayoutEffect:Me,useInsertionEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useSyncExternalStore:Me,useId:Me,useHostTransitionStatus:Me,useFormState:Me,useActionState:Me,useOptimistic:Me,useMemoCache:Me,useCacheRefresh:Me};sn.useEffectEvent=Me;var If={readContext:Ve,use:mu,useCallback:function(e,t){return Fe().memoizedState=[e,t===void 0?null:t],e},useContext:Ve,useEffect:wf,useImperativeHandle:function(e,t,l){l=l!=null?l.concat([e]):null,pu(4194308,4,qf.bind(null,t,e),l)},useLayoutEffect:function(e,t){return pu(4194308,4,e,t)},useInsertionEffect:function(e,t){pu(4,2,e,t)},useMemo:function(e,t){var l=Fe();t=t===void 0?null:t;var a=e();if(Zl){ul(!0);try{e()}finally{ul(!1)}}return l.memoizedState=[a,t],a},useReducer:function(e,t,l){var a=Fe();if(l!==void 0){var n=l(t);if(Zl){ul(!0);try{l(t)}finally{ul(!1)}}}else n=t;return a.memoizedState=a.baseState=n,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},a.queue=e,e=e.dispatch=V0.bind(null,P,e),[a.memoizedState,e]},useRef:function(e){var t=Fe();return e={current:e},t.memoizedState=e},useState:function(e){e=yc(e);var t=e.queue,l=$f.bind(null,P,t);return t.dispatch=l,[e.memoizedState,l]},useDebugValue:vc,useDeferredValue:function(e,t){var l=Fe();return xc(l,e,t)},useTransition:function(){var e=yc(!1);return e=Xf.bind(null,P,e.queue,!0,!1),Fe().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,l){var a=P,n=Fe();if(re){if(l===void 0)throw Error(s(407));l=l()}else{if(l=t(),xe===null)throw Error(s(349));(ie&127)!==0||vf(a,t,l)}n.memoizedState=l;var u={value:l,getSnapshot:t};return n.queue=u,wf(Sf.bind(null,a,u,e),[e]),a.flags|=2048,Ta(9,{destroy:void 0},xf.bind(null,a,u,l,t),null),l},useId:function(){var e=Fe(),t=xe.identifierPrefix;if(re){var l=wt,a=Ct;l=(a&~(1<<32-st(a)-1)).toString(32)+l,t="_"+t+"R_"+l,l=hu++,0<l&&(t+="H"+l.toString(32)),t+="_"}else l=q0++,t="_"+t+"r_"+l.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Tc,useFormState:Nf,useActionState:Nf,useOptimistic:function(e){var t=Fe();t.memoizedState=t.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=l,t=zc.bind(null,P,!0,l),l.dispatch=t,[e,t]},useMemoCache:hc,useCacheRefresh:function(){return Fe().memoizedState=Z0.bind(null,P)},useEffectEvent:function(e){var t=Fe(),l={impl:e};return t.memoizedState=l,function(){if((oe&2)!==0)throw Error(s(440));return l.impl.apply(void 0,arguments)}}},kc={readContext:Ve,use:mu,useCallback:Yf,useContext:Ve,useEffect:bc,useImperativeHandle:Lf,useInsertionEffect:Hf,useLayoutEffect:Bf,useMemo:Gf,useReducer:yu,useRef:Cf,useState:function(){return yu(Kt)},useDebugValue:vc,useDeferredValue:function(e,t){var l=Re();return Qf(l,pe.memoizedState,e,t)},useTransition:function(){var e=yu(Kt)[0],t=Re().memoizedState;return[typeof e=="boolean"?e:cn(e),t]},useSyncExternalStore:bf,useId:Kf,useHostTransitionStatus:Tc,useFormState:Of,useActionState:Of,useOptimistic:function(e,t){var l=Re();return kf(l,pe,e,t)},useMemoCache:hc,useCacheRefresh:Jf};kc.useEffectEvent=Uf;var Pf={readContext:Ve,use:mu,useCallback:Yf,useContext:Ve,useEffect:bc,useImperativeHandle:Lf,useInsertionEffect:Hf,useLayoutEffect:Bf,useMemo:Gf,useReducer:mc,useRef:Cf,useState:function(){return mc(Kt)},useDebugValue:vc,useDeferredValue:function(e,t){var l=Re();return pe===null?xc(l,e,t):Qf(l,pe.memoizedState,e,t)},useTransition:function(){var e=mc(Kt)[0],t=Re().memoizedState;return[typeof e=="boolean"?e:cn(e),t]},useSyncExternalStore:bf,useId:Kf,useHostTransitionStatus:Tc,useFormState:Rf,useActionState:Rf,useOptimistic:function(e,t){var l=Re();return pe!==null?kf(l,pe,e,t):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:hc,useCacheRefresh:Jf};Pf.useEffectEvent=Uf;function Ec(e,t,l,a){t=e.memoizedState,l=l(a,t),l=l==null?t:C({},t,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var _c={enqueueSetState:function(e,t,l){e=e._reactInternals;var a=yt(),n=hl(a);n.payload=t,l!=null&&(n.callback=l),t=gl(e,n,a),t!==null&&(ut(t,e,a),ln(t,e,a))},enqueueReplaceState:function(e,t,l){e=e._reactInternals;var a=yt(),n=hl(a);n.tag=1,n.payload=t,l!=null&&(n.callback=l),t=gl(e,n,a),t!==null&&(ut(t,e,a),ln(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var l=yt(),a=hl(l);a.tag=2,t!=null&&(a.callback=t),t=gl(e,a,l),t!==null&&(ut(t,e,l),ln(t,e,l))}};function eo(e,t,l,a,n,u,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,u,i):t.prototype&&t.prototype.isPureReactComponent?!Ja(l,a)||!Ja(n,u):!0}function to(e,t,l,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(l,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(l,a),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function Vl(e,t){var l=t;if("ref"in t){l={};for(var a in t)a!=="ref"&&(l[a]=t[a])}if(e=e.defaultProps){l===t&&(l=C({},l));for(var n in e)l[n]===void 0&&(l[n]=e[n])}return l}function lo(e){Fn(e)}function ao(e){console.error(e)}function no(e){Fn(e)}function xu(e,t){try{var l=e.onUncaughtError;l(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function uo(e,t,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(n){setTimeout(function(){throw n})}}function Ac(e,t,l){return l=hl(l),l.tag=3,l.payload={element:null},l.callback=function(){xu(e,t)},l}function io(e){return e=hl(e),e.tag=3,e}function co(e,t,l,a){var n=l.type.getDerivedStateFromError;if(typeof n=="function"){var u=a.value;e.payload=function(){return n(u)},e.callback=function(){uo(t,l,a)}}var i=l.stateNode;i!==null&&typeof i.componentDidCatch=="function"&&(e.callback=function(){uo(t,l,a),typeof n!="function"&&(xl===null?xl=new Set([this]):xl.add(this));var f=a.stack;this.componentDidCatch(a.value,{componentStack:f!==null?f:""})})}function K0(e,t,l,a,n){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=l.alternate,t!==null&&ga(t,l,n,!0),l=dt.current,l!==null){switch(l.tag){case 31:case 13:return At===null?Du():l.alternate===null&&je===0&&(je=3),l.flags&=-257,l.flags|=65536,l.lanes=n,a===cu?l.flags|=16384:(t=l.updateQueue,t===null?l.updateQueue=new Set([a]):t.add(a),Ic(e,a,n)),!1;case 22:return l.flags|=65536,a===cu?l.flags|=16384:(t=l.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=t):(l=t.retryQueue,l===null?t.retryQueue=new Set([a]):l.add(a)),Ic(e,a,n)),!1}throw Error(s(435,l.tag))}return Ic(e,a,n),Du(),!1}if(re)return t=dt.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=n,a!==Vi&&(e=Error(s(422),{cause:a}),Fa(zt(e,l)))):(a!==Vi&&(t=Error(s(423),{cause:a}),Fa(zt(t,l))),e=e.current.alternate,e.flags|=65536,n&=-n,e.lanes|=n,a=zt(a,l),n=Ac(e.stateNode,a,n),ac(e,n),je!==4&&(je=2)),!1;var u=Error(s(520),{cause:a});if(u=zt(u,l),pn===null?pn=[u]:pn.push(u),je!==4&&(je=2),t===null)return!0;a=zt(a,l),l=t;do{switch(l.tag){case 3:return l.flags|=65536,e=n&-n,l.lanes|=e,e=Ac(l.stateNode,a,e),ac(l,e),!1;case 1:if(t=l.type,u=l.stateNode,(l.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||u!==null&&typeof u.componentDidCatch=="function"&&(xl===null||!xl.has(u))))return l.flags|=65536,n&=-n,l.lanes|=n,n=io(n),co(n,e,l,a),ac(l,n),!1}l=l.return}while(l!==null);return!1}var Mc=Error(s(461)),Be=!1;function Ke(e,t,l,a){t.child=e===null?of(t,null,l,a):Xl(t,e.child,l,a)}function ro(e,t,l,a,n){l=l.render;var u=t.ref;if("ref"in a){var i={};for(var f in a)f!=="ref"&&(i[f]=a[f])}else i=a;return Ll(t),a=sc(e,t,l,i,u,n),f=fc(),e!==null&&!Be?(oc(e,t,n),Jt(e,t,n)):(re&&f&&Xi(t),t.flags|=1,Ke(e,t,a,n),t.child)}function so(e,t,l,a,n){if(e===null){var u=l.type;return typeof u=="function"&&!Yi(u)&&u.defaultProps===void 0&&l.compare===null?(t.tag=15,t.type=u,fo(e,t,u,a,n)):(e=tu(l.type,null,a,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(u=e.child,!Uc(e,n)){var i=u.memoizedProps;if(l=l.compare,l=l!==null?l:Ja,l(i,a)&&e.ref===t.ref)return Jt(e,t,n)}return t.flags|=1,e=Gt(u,a),e.ref=t.ref,e.return=t,t.child=e}function fo(e,t,l,a,n){if(e!==null){var u=e.memoizedProps;if(Ja(u,a)&&e.ref===t.ref)if(Be=!1,t.pendingProps=a=u,Uc(e,n))(e.flags&131072)!==0&&(Be=!0);else return t.lanes=e.lanes,Jt(e,t,n)}return jc(e,t,l,a,n)}function oo(e,t,l,a){var n=a.children,u=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(u=u!==null?u.baseLanes|l:l,e!==null){for(a=t.child=e.child,n=0;a!==null;)n=n|a.lanes|a.childLanes,a=a.sibling;a=n&~u}else a=0,t.child=null;return ho(e,t,u,l,a)}if((l&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&uu(t,u!==null?u.cachePool:null),u!==null?gf(t,u):uc(),mf(t);else return a=t.lanes=536870912,ho(e,t,u!==null?u.baseLanes|l:l,l,a)}else u!==null?(uu(t,u.cachePool),gf(t,u),yl(),t.memoizedState=null):(e!==null&&uu(t,null),uc(),yl());return Ke(e,t,n,l),t.child}function fn(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ho(e,t,l,a,n){var u=Pi();return u=u===null?null:{parent:Ue._currentValue,pool:u},t.memoizedState={baseLanes:l,cachePool:u},e!==null&&uu(t,null),uc(),mf(t),e!==null&&ga(e,t,a,!0),t.childLanes=n,null}function Su(e,t){return t=zu({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function go(e,t,l){return Xl(t,e.child,null,l),e=Su(t,t.pendingProps),e.flags|=2,ht(t),t.memoizedState=null,e}function J0(e,t,l){var a=t.pendingProps,n=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(re){if(a.mode==="hidden")return e=Su(t,a),t.lanes=536870912,fn(null,e);if(cc(t),(e=Te)?(e=_d(e,_t),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:Ct,overflow:wt}:null,retryLane:536870912,hydrationErrors:null},l=$s(e),l.return=t,t.child=l,Ze=t,Te=null)):e=null,e===null)throw fl(t);return t.lanes=536870912,null}return Su(t,a)}var u=e.memoizedState;if(u!==null){var i=u.dehydrated;if(cc(t),n)if(t.flags&256)t.flags&=-257,t=go(e,t,l);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(s(558));else if(Be||ga(e,t,l,!1),n=(l&e.childLanes)!==0,Be||n){if(a=xe,a!==null&&(i=ls(a,l),i!==0&&i!==u.retryLane))throw u.retryLane=i,Ul(e,i),ut(a,e,i),Mc;Du(),t=go(e,t,l)}else e=u.treeContext,Te=Mt(i.nextSibling),Ze=t,re=!0,sl=null,_t=!1,e!==null&&Is(t,e),t=Su(t,a),t.flags|=4096;return t}return e=Gt(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Tu(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(s(284));(e===null||e.ref!==l)&&(t.flags|=4194816)}}function jc(e,t,l,a,n){return Ll(t),l=sc(e,t,l,a,void 0,n),a=fc(),e!==null&&!Be?(oc(e,t,n),Jt(e,t,n)):(re&&a&&Xi(t),t.flags|=1,Ke(e,t,l,n),t.child)}function mo(e,t,l,a,n,u){return Ll(t),t.updateQueue=null,l=pf(t,a,l,n),yf(e),a=fc(),e!==null&&!Be?(oc(e,t,u),Jt(e,t,u)):(re&&a&&Xi(t),t.flags|=1,Ke(e,t,l,u),t.child)}function yo(e,t,l,a,n){if(Ll(t),t.stateNode===null){var u=fa,i=l.contextType;typeof i=="object"&&i!==null&&(u=Ve(i)),u=new l(a,u),t.memoizedState=u.state!==null&&u.state!==void 0?u.state:null,u.updater=_c,t.stateNode=u,u._reactInternals=t,u=t.stateNode,u.props=a,u.state=t.memoizedState,u.refs={},tc(t),i=l.contextType,u.context=typeof i=="object"&&i!==null?Ve(i):fa,u.state=t.memoizedState,i=l.getDerivedStateFromProps,typeof i=="function"&&(Ec(t,l,i,a),u.state=t.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof u.getSnapshotBeforeUpdate=="function"||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(i=u.state,typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount(),i!==u.state&&_c.enqueueReplaceState(u,u.state,null),nn(t,a,u,n),an(),u.state=t.memoizedState),typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){u=t.stateNode;var f=t.memoizedProps,m=Vl(l,f);u.props=m;var E=u.context,j=l.contextType;i=fa,typeof j=="object"&&j!==null&&(i=Ve(j));var D=l.getDerivedStateFromProps;j=typeof D=="function"||typeof u.getSnapshotBeforeUpdate=="function",f=t.pendingProps!==f,j||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(f||E!==i)&&to(t,u,a,i),dl=!1;var _=t.memoizedState;u.state=_,nn(t,a,u,n),an(),E=t.memoizedState,f||_!==E||dl?(typeof D=="function"&&(Ec(t,l,D,a),E=t.memoizedState),(m=dl||eo(t,l,m,a,_,E,i))?(j||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(t.flags|=4194308)):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=E),u.props=a,u.state=E,u.context=i,a=m):(typeof u.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{u=t.stateNode,lc(e,t),i=t.memoizedProps,j=Vl(l,i),u.props=j,D=t.pendingProps,_=u.context,E=l.contextType,m=fa,typeof E=="object"&&E!==null&&(m=Ve(E)),f=l.getDerivedStateFromProps,(E=typeof f=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==D||_!==m)&&to(t,u,a,m),dl=!1,_=t.memoizedState,u.state=_,nn(t,a,u,n),an();var A=t.memoizedState;i!==D||_!==A||dl||e!==null&&e.dependencies!==null&&au(e.dependencies)?(typeof f=="function"&&(Ec(t,l,f,a),A=t.memoizedState),(j=dl||eo(t,l,j,a,_,A,m)||e!==null&&e.dependencies!==null&&au(e.dependencies))?(E||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(a,A,m),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(a,A,m)),typeof u.componentDidUpdate=="function"&&(t.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=A),u.props=a,u.state=A,u.context=m,a=j):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&_===e.memoizedState||(t.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&_===e.memoizedState||(t.flags|=1024),a=!1)}return u=a,Tu(e,t),a=(t.flags&128)!==0,u||a?(u=t.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:u.render(),t.flags|=1,e!==null&&a?(t.child=Xl(t,e.child,null,n),t.child=Xl(t,null,l,n)):Ke(e,t,l,n),t.memoizedState=u.state,e=t.child):e=Jt(e,t,n),e}function po(e,t,l,a){return Bl(),t.flags|=256,Ke(e,t,l,a),t.child}var Nc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Oc(e){return{baseLanes:e,cachePool:nf()}}function Dc(e,t,l){return e=e!==null?e.childLanes&~l:0,t&&(e|=mt),e}function bo(e,t,l){var a=t.pendingProps,n=!1,u=(t.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(De.current&2)!==0),i&&(n=!0,t.flags&=-129),i=(t.flags&32)!==0,t.flags&=-33,e===null){if(re){if(n?ml(t):yl(),(e=Te)?(e=_d(e,_t),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:rl!==null?{id:Ct,overflow:wt}:null,retryLane:536870912,hydrationErrors:null},l=$s(e),l.return=t,t.child=l,Ze=t,Te=null)):e=null,e===null)throw fl(t);return gr(e)?t.lanes=32:t.lanes=536870912,null}var f=a.children;return a=a.fallback,n?(yl(),n=t.mode,f=zu({mode:"hidden",children:f},n),a=Hl(a,n,l,null),f.return=t,a.return=t,f.sibling=a,t.child=f,a=t.child,a.memoizedState=Oc(l),a.childLanes=Dc(e,i,l),t.memoizedState=Nc,fn(null,a)):(ml(t),Rc(t,f))}var m=e.memoizedState;if(m!==null&&(f=m.dehydrated,f!==null)){if(u)t.flags&256?(ml(t),t.flags&=-257,t=Cc(e,t,l)):t.memoizedState!==null?(yl(),t.child=e.child,t.flags|=128,t=null):(yl(),f=a.fallback,n=t.mode,a=zu({mode:"visible",children:a.children},n),f=Hl(f,n,l,null),f.flags|=2,a.return=t,f.return=t,a.sibling=f,t.child=a,Xl(t,e.child,null,l),a=t.child,a.memoizedState=Oc(l),a.childLanes=Dc(e,i,l),t.memoizedState=Nc,t=fn(null,a));else if(ml(t),gr(f)){if(i=f.nextSibling&&f.nextSibling.dataset,i)var E=i.dgst;i=E,a=Error(s(419)),a.stack="",a.digest=i,Fa({value:a,source:null,stack:null}),t=Cc(e,t,l)}else if(Be||ga(e,t,l,!1),i=(l&e.childLanes)!==0,Be||i){if(i=xe,i!==null&&(a=ls(i,l),a!==0&&a!==m.retryLane))throw m.retryLane=a,Ul(e,a),ut(i,e,a),Mc;hr(f)||Du(),t=Cc(e,t,l)}else hr(f)?(t.flags|=192,t.child=e.child,t=null):(e=m.treeContext,Te=Mt(f.nextSibling),Ze=t,re=!0,sl=null,_t=!1,e!==null&&Is(t,e),t=Rc(t,a.children),t.flags|=4096);return t}return n?(yl(),f=a.fallback,n=t.mode,m=e.child,E=m.sibling,a=Gt(m,{mode:"hidden",children:a.children}),a.subtreeFlags=m.subtreeFlags&65011712,E!==null?f=Gt(E,f):(f=Hl(f,n,l,null),f.flags|=2),f.return=t,a.return=t,a.sibling=f,t.child=a,fn(null,a),a=t.child,f=e.child.memoizedState,f===null?f=Oc(l):(n=f.cachePool,n!==null?(m=Ue._currentValue,n=n.parent!==m?{parent:m,pool:m}:n):n=nf(),f={baseLanes:f.baseLanes|l,cachePool:n}),a.memoizedState=f,a.childLanes=Dc(e,i,l),t.memoizedState=Nc,fn(e.child,a)):(ml(t),l=e.child,e=l.sibling,l=Gt(l,{mode:"visible",children:a.children}),l.return=t,l.sibling=null,e!==null&&(i=t.deletions,i===null?(t.deletions=[e],t.flags|=16):i.push(e)),t.child=l,t.memoizedState=null,l)}function Rc(e,t){return t=zu({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function zu(e,t){return e=ot(22,e,null,t),e.lanes=0,e}function Cc(e,t,l){return Xl(t,e.child,null,l),e=Rc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function vo(e,t,l){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),$i(e.return,t,l)}function wc(e,t,l,a,n,u){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:n,treeForkCount:u}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=l,i.tailMode=n,i.treeForkCount=u)}function xo(e,t,l){var a=t.pendingProps,n=a.revealOrder,u=a.tail;a=a.children;var i=De.current,f=(i&2)!==0;if(f?(i=i&1|2,t.flags|=128):i&=1,U(De,i),Ke(e,t,a,l),a=re?Wa:0,!f&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&vo(e,l,t);else if(e.tag===19)vo(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(n){case"forwards":for(l=t.child,n=null;l!==null;)e=l.alternate,e!==null&&ou(e)===null&&(n=l),l=l.sibling;l=n,l===null?(n=t.child,t.child=null):(n=l.sibling,l.sibling=null),wc(t,!1,n,l,u,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&ou(e)===null){t.child=n;break}e=n.sibling,n.sibling=l,l=n,n=e}wc(t,!0,l,null,u,a);break;case"together":wc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Jt(e,t,l){if(e!==null&&(t.dependencies=e.dependencies),vl|=t.lanes,(l&t.childLanes)===0)if(e!==null){if(ga(e,t,l,!1),(l&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,l=Gt(e,e.pendingProps),t.child=l,l.return=t;e.sibling!==null;)e=e.sibling,l=l.sibling=Gt(e,e.pendingProps),l.return=t;l.sibling=null}return t.child}function Uc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&au(e)))}function $0(e,t,l){switch(t.tag){case 3:We(t,t.stateNode.containerInfo),ol(t,Ue,e.memoizedState.cache),Bl();break;case 27:case 5:wa(t);break;case 4:We(t,t.stateNode.containerInfo);break;case 10:ol(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,cc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(ml(t),t.flags|=128,null):(l&t.child.childLanes)!==0?bo(e,t,l):(ml(t),e=Jt(e,t,l),e!==null?e.sibling:null);ml(t);break;case 19:var n=(e.flags&128)!==0;if(a=(l&t.childLanes)!==0,a||(ga(e,t,l,!1),a=(l&t.childLanes)!==0),n){if(a)return xo(e,t,l);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),U(De,De.current),a)break;return null;case 22:return t.lanes=0,oo(e,t,l,t.pendingProps);case 24:ol(t,Ue,e.memoizedState.cache)}return Jt(e,t,l)}function So(e,t,l){if(e!==null)if(e.memoizedProps!==t.pendingProps)Be=!0;else{if(!Uc(e,l)&&(t.flags&128)===0)return Be=!1,$0(e,t,l);Be=(e.flags&131072)!==0}else Be=!1,re&&(t.flags&1048576)!==0&&Fs(t,Wa,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Gl(t.elementType),t.type=e,typeof e=="function")Yi(e)?(a=Vl(e,a),t.tag=1,t=yo(null,t,e,a,l)):(t.tag=0,t=jc(null,t,e,a,l));else{if(e!=null){var n=e.$$typeof;if(n===ke){t.tag=11,t=ro(null,t,e,a,l);break e}else if(n===$){t.tag=14,t=so(null,t,e,a,l);break e}}throw t=vt(e)||e,Error(s(306,t,""))}}return t;case 0:return jc(e,t,t.type,t.pendingProps,l);case 1:return a=t.type,n=Vl(a,t.pendingProps),yo(e,t,a,n,l);case 3:e:{if(We(t,t.stateNode.containerInfo),e===null)throw Error(s(387));a=t.pendingProps;var u=t.memoizedState;n=u.element,lc(e,t),nn(t,a,null,l);var i=t.memoizedState;if(a=i.cache,ol(t,Ue,a),a!==u.cache&&Wi(t,[Ue],l,!0),an(),a=i.element,u.isDehydrated)if(u={element:a,isDehydrated:!1,cache:i.cache},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){t=po(e,t,a,l);break e}else if(a!==n){n=zt(Error(s(424)),t),Fa(n),t=po(e,t,a,l);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(Te=Mt(e.firstChild),Ze=t,re=!0,sl=null,_t=!0,l=of(t,null,a,l),t.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Bl(),a===n){t=Jt(e,t,l);break e}Ke(e,t,a,l)}t=t.child}return t;case 26:return Tu(e,t),e===null?(l=Dd(t.type,null,t.pendingProps,null))?t.memoizedState=l:re||(l=t.type,e=t.pendingProps,a=qu(F.current).createElement(l),a[Xe]=t,a[Pe]=e,Je(a,l,e),Ge(a),t.stateNode=a):t.memoizedState=Dd(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return wa(t),e===null&&re&&(a=t.stateNode=jd(t.type,t.pendingProps,F.current),Ze=t,_t=!0,n=Te,kl(t.type)?(mr=n,Te=Mt(a.firstChild)):Te=n),Ke(e,t,t.pendingProps.children,l),Tu(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&re&&((n=a=Te)&&(a=Eg(a,t.type,t.pendingProps,_t),a!==null?(t.stateNode=a,Ze=t,Te=Mt(a.firstChild),_t=!1,n=!0):n=!1),n||fl(t)),wa(t),n=t.type,u=t.pendingProps,i=e!==null?e.memoizedProps:null,a=u.children,fr(n,u)?a=null:i!==null&&fr(n,i)&&(t.flags|=32),t.memoizedState!==null&&(n=sc(e,t,L0,null,null,l),En._currentValue=n),Tu(e,t),Ke(e,t,a,l),t.child;case 6:return e===null&&re&&((e=l=Te)&&(l=_g(l,t.pendingProps,_t),l!==null?(t.stateNode=l,Ze=t,Te=null,e=!0):e=!1),e||fl(t)),null;case 13:return bo(e,t,l);case 4:return We(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Xl(t,null,a,l):Ke(e,t,a,l),t.child;case 11:return ro(e,t,t.type,t.pendingProps,l);case 7:return Ke(e,t,t.pendingProps,l),t.child;case 8:return Ke(e,t,t.pendingProps.children,l),t.child;case 12:return Ke(e,t,t.pendingProps.children,l),t.child;case 10:return a=t.pendingProps,ol(t,t.type,a.value),Ke(e,t,a.children,l),t.child;case 9:return n=t.type._context,a=t.pendingProps.children,Ll(t),n=Ve(n),a=a(n),t.flags|=1,Ke(e,t,a,l),t.child;case 14:return so(e,t,t.type,t.pendingProps,l);case 15:return fo(e,t,t.type,t.pendingProps,l);case 19:return xo(e,t,l);case 31:return J0(e,t,l);case 22:return oo(e,t,l,t.pendingProps);case 24:return Ll(t),a=Ve(Ue),e===null?(n=Pi(),n===null&&(n=xe,u=Fi(),n.pooledCache=u,u.refCount++,u!==null&&(n.pooledCacheLanes|=l),n=u),t.memoizedState={parent:a,cache:n},tc(t),ol(t,Ue,n)):((e.lanes&l)!==0&&(lc(e,t),nn(t,null,null,l),an()),n=e.memoizedState,u=t.memoizedState,n.parent!==a?(n={parent:a,cache:a},t.memoizedState=n,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=n),ol(t,Ue,a)):(a=u.cache,ol(t,Ue,a),a!==n.cache&&Wi(t,[Ue],l,!0))),Ke(e,t,t.pendingProps.children,l),t.child;case 29:throw t.pendingProps}throw Error(s(156,t.tag))}function $t(e){e.flags|=4}function Hc(e,t,l,a,n){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(n&335544128)===n)if(e.stateNode.complete)e.flags|=8192;else if(Jo())e.flags|=8192;else throw Ql=cu,ec}else e.flags&=-16777217}function To(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Hd(t))if(Jo())e.flags|=8192;else throw Ql=cu,ec}function ku(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Pr():536870912,e.lanes|=t,_a|=t)}function on(e,t){if(!re)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 a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ze(e){var t=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(t)for(var n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags&65011712,a|=n.flags&65011712,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)l|=n.lanes|n.childLanes,a|=n.subtreeFlags,a|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=a,e.childLanes=l,t}function W0(e,t,l){var a=t.pendingProps;switch(Zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ze(t),null;case 1:return ze(t),null;case 3:return l=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Zt(Ue),Oe(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ha(t)?$t(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Ki())),ze(t),null;case 26:var n=t.type,u=t.memoizedState;return e===null?($t(t),u!==null?(ze(t),To(t,u)):(ze(t),Hc(t,n,null,a,l))):u?u!==e.memoizedState?($t(t),ze(t),To(t,u)):(ze(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&$t(t),ze(t),Hc(t,n,e,a,l)),null;case 27:if(wn(t),l=F.current,n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&$t(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return ze(t),null}e=B.current,ha(t)?Ps(t):(e=jd(n,a,l),t.stateNode=e,$t(t))}return ze(t),null;case 5:if(wn(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&$t(t);else{if(!a){if(t.stateNode===null)throw Error(s(166));return ze(t),null}if(u=B.current,ha(t))Ps(t);else{var i=qu(F.current);switch(u){case 1:u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":u=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":u=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":u=i.createElement("div"),u.innerHTML="<script><\/script>",u=u.removeChild(u.firstChild);break;case"select":u=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?u.multiple=!0:a.size&&(u.size=a.size);break;default:u=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}u[Xe]=t,u[Pe]=a;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)u.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=u;e:switch(Je(u,n,a),n){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&$t(t)}}return ze(t),Hc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,l),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&$t(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(s(166));if(e=F.current,ha(t)){if(e=t.stateNode,l=t.memoizedProps,a=null,n=Ze,n!==null)switch(n.tag){case 27:case 5:a=n.memoizedProps}e[Xe]=t,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||bd(e.nodeValue,l)),e||fl(t,!0)}else e=qu(e).createTextNode(a),e[Xe]=t,t.stateNode=e}return ze(t),null;case 31:if(l=t.memoizedState,e===null||e.memoizedState!==null){if(a=ha(t),l!==null){if(e===null){if(!a)throw Error(s(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(s(557));e[Xe]=t}else Bl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),e=!1}else l=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return t.flags&256?(ht(t),t):(ht(t),null);if((t.flags&128)!==0)throw Error(s(558))}return ze(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(n=ha(t),a!==null&&a.dehydrated!==null){if(e===null){if(!n)throw Error(s(318));if(n=t.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(s(317));n[Xe]=t}else Bl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ze(t),n=!1}else n=Ki(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),n=!0;if(!n)return t.flags&256?(ht(t),t):(ht(t),null)}return ht(t),(t.flags&128)!==0?(t.lanes=l,t):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=t.child,n=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(n=a.alternate.memoizedState.cachePool.pool),u=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(u=a.memoizedState.cachePool.pool),u!==n&&(a.flags|=2048)),l!==e&&l&&(t.child.flags|=8192),ku(t,t.updateQueue),ze(t),null);case 4:return Oe(),e===null&&ur(t.stateNode.containerInfo),ze(t),null;case 10:return Zt(t.type),ze(t),null;case 19:if(M(De),a=t.memoizedState,a===null)return ze(t),null;if(n=(t.flags&128)!==0,u=a.rendering,u===null)if(n)on(a,!1);else{if(je!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(u=ou(e),u!==null){for(t.flags|=128,on(a,!1),e=u.updateQueue,t.updateQueue=e,ku(t,e),t.subtreeFlags=0,e=l,l=t.child;l!==null;)Js(l,e),l=l.sibling;return U(De,De.current&1|2),re&&Qt(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&ct()>ju&&(t.flags|=128,n=!0,on(a,!1),t.lanes=4194304)}else{if(!n)if(e=ou(u),e!==null){if(t.flags|=128,n=!0,e=e.updateQueue,t.updateQueue=e,ku(t,e),on(a,!0),a.tail===null&&a.tailMode==="hidden"&&!u.alternate&&!re)return ze(t),null}else 2*ct()-a.renderingStartTime>ju&&l!==536870912&&(t.flags|=128,n=!0,on(a,!1),t.lanes=4194304);a.isBackwards?(u.sibling=t.child,t.child=u):(e=a.last,e!==null?e.sibling=u:t.child=u,a.last=u)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=ct(),e.sibling=null,l=De.current,U(De,n?l&1|2:l&1),re&&Qt(t,a.treeForkCount),e):(ze(t),null);case 22:case 23:return ht(t),ic(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(l&536870912)!==0&&(t.flags&128)===0&&(ze(t),t.subtreeFlags&6&&(t.flags|=8192)):ze(t),l=t.updateQueue,l!==null&&ku(t,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==l&&(t.flags|=2048),e!==null&&M(Yl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),t.memoizedState.cache!==l&&(t.flags|=2048),Zt(Ue),ze(t),null;case 25:return null;case 30:return null}throw Error(s(156,t.tag))}function F0(e,t){switch(Zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Zt(Ue),Oe(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return wn(t),null;case 31:if(t.memoizedState!==null){if(ht(t),t.alternate===null)throw Error(s(340));Bl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(ht(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Bl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return M(De),null;case 4:return Oe(),null;case 10:return Zt(t.type),null;case 22:case 23:return ht(t),ic(),e!==null&&M(Yl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return Zt(Ue),null;case 25:return null;default:return null}}function zo(e,t){switch(Zi(t),t.tag){case 3:Zt(Ue),Oe();break;case 26:case 27:case 5:wn(t);break;case 4:Oe();break;case 31:t.memoizedState!==null&&ht(t);break;case 13:ht(t);break;case 19:M(De);break;case 10:Zt(t.type);break;case 22:case 23:ht(t),ic(),e!==null&&M(Yl);break;case 24:Zt(Ue)}}function dn(e,t){try{var l=t.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var n=a.next;l=n;do{if((l.tag&e)===e){a=void 0;var u=l.create,i=l.inst;a=u(),i.destroy=a}l=l.next}while(l!==n)}}catch(f){ye(t,t.return,f)}}function pl(e,t,l){try{var a=t.updateQueue,n=a!==null?a.lastEffect:null;if(n!==null){var u=n.next;a=u;do{if((a.tag&e)===e){var i=a.inst,f=i.destroy;if(f!==void 0){i.destroy=void 0,n=t;var m=l,E=f;try{E()}catch(j){ye(n,m,j)}}}a=a.next}while(a!==u)}}catch(j){ye(t,t.return,j)}}function ko(e){var t=e.updateQueue;if(t!==null){var l=e.stateNode;try{hf(t,l)}catch(a){ye(e,e.return,a)}}}function Eo(e,t,l){l.props=Vl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){ye(e,t,a)}}function hn(e,t){try{var l=e.ref;if(l!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof l=="function"?e.refCleanup=l(a):l.current=a}}catch(n){ye(e,t,n)}}function Ut(e,t){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(n){ye(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(n){ye(e,t,n)}else l.current=null}function _o(e){var t=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(n){ye(e,e.return,n)}}function Bc(e,t,l){try{var a=e.stateNode;vg(a,e.type,l,t),a[Pe]=t}catch(n){ye(e,e.return,n)}}function Ao(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&kl(e.type)||e.tag===4}function qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ao(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&&kl(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 Lc(e,t,l){var a=e.tag;if(a===5||a===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=Lt));else if(a!==4&&(a===27&&kl(e.type)&&(l=e.stateNode,t=null),e=e.child,e!==null))for(Lc(e,t,l),e=e.sibling;e!==null;)Lc(e,t,l),e=e.sibling}function Eu(e,t,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?l.insertBefore(e,t):l.appendChild(e);else if(a!==4&&(a===27&&kl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Eu(e,t,l),e=e.sibling;e!==null;)Eu(e,t,l),e=e.sibling}function Mo(e){var t=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,n=t.attributes;n.length;)t.removeAttributeNode(n[0]);Je(t,a,l),t[Xe]=e,t[Pe]=l}catch(u){ye(e,e.return,u)}}var Wt=!1,qe=!1,Yc=!1,jo=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function I0(e,t){if(e=e.containerInfo,rr=Vu,e=qs(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 a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var n=a.anchorOffset,u=a.focusNode;a=a.focusOffset;try{l.nodeType,u.nodeType}catch{l=null;break e}var i=0,f=-1,m=-1,E=0,j=0,D=e,_=null;t:for(;;){for(var A;D!==l||n!==0&&D.nodeType!==3||(f=i+n),D!==u||a!==0&&D.nodeType!==3||(m=i+a),D.nodeType===3&&(i+=D.nodeValue.length),(A=D.firstChild)!==null;)_=D,D=A;for(;;){if(D===e)break t;if(_===l&&++E===n&&(f=i),_===u&&++j===a&&(m=i),(A=D.nextSibling)!==null)break;D=_,_=D.parentNode}D=A}l=f===-1||m===-1?null:{start:f,end:m}}else l=null}l=l||{start:0,end:0}}else l=null;for(sr={focusedElem:e,selectionRange:l},Vu=!1,Qe=t;Qe!==null;)if(t=Qe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Qe=e;else for(;Qe!==null;){switch(t=Qe,u=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++)n=e[l],n.ref.impl=n.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&u!==null){e=void 0,l=t,n=u.memoizedProps,u=u.memoizedState,a=l.stateNode;try{var Y=Vl(l.type,n);e=a.getSnapshotBeforeUpdate(Y,u),a.__reactInternalSnapshotBeforeUpdate=e}catch(K){ye(l,l.return,K)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,l=e.nodeType,l===9)dr(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":dr(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(s(163))}if(e=t.sibling,e!==null){e.return=t.return,Qe=e;break}Qe=t.return}}function No(e,t,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:It(e,l),a&4&&dn(5,l);break;case 1:if(It(e,l),a&4)if(e=l.stateNode,t===null)try{e.componentDidMount()}catch(i){ye(l,l.return,i)}else{var n=Vl(l.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(n,t,e.__reactInternalSnapshotBeforeUpdate)}catch(i){ye(l,l.return,i)}}a&64&&ko(l),a&512&&hn(l,l.return);break;case 3:if(It(e,l),a&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{hf(e,t)}catch(i){ye(l,l.return,i)}}break;case 27:t===null&&a&4&&Mo(l);case 26:case 5:It(e,l),t===null&&a&4&&_o(l),a&512&&hn(l,l.return);break;case 12:It(e,l);break;case 31:It(e,l),a&4&&Ro(e,l);break;case 13:It(e,l),a&4&&Co(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=cg.bind(null,l),Ag(e,l))));break;case 22:if(a=l.memoizedState!==null||Wt,!a){t=t!==null&&t.memoizedState!==null||qe,n=Wt;var u=qe;Wt=a,(qe=t)&&!u?Pt(e,l,(l.subtreeFlags&8772)!==0):It(e,l),Wt=n,qe=u}break;case 30:break;default:It(e,l)}}function Oo(e){var t=e.alternate;t!==null&&(e.alternate=null,Oo(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&pi(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 Ee=null,tt=!1;function Ft(e,t,l){for(l=l.child;l!==null;)Do(e,t,l),l=l.sibling}function Do(e,t,l){if(rt&&typeof rt.onCommitFiberUnmount=="function")try{rt.onCommitFiberUnmount(Ua,l)}catch{}switch(l.tag){case 26:qe||Ut(l,t),Ft(e,t,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:qe||Ut(l,t);var a=Ee,n=tt;kl(l.type)&&(Ee=l.stateNode,tt=!1),Ft(e,t,l),Tn(l.stateNode),Ee=a,tt=n;break;case 5:qe||Ut(l,t);case 6:if(a=Ee,n=tt,Ee=null,Ft(e,t,l),Ee=a,tt=n,Ee!==null)if(tt)try{(Ee.nodeType===9?Ee.body:Ee.nodeName==="HTML"?Ee.ownerDocument.body:Ee).removeChild(l.stateNode)}catch(u){ye(l,t,u)}else try{Ee.removeChild(l.stateNode)}catch(u){ye(l,t,u)}break;case 18:Ee!==null&&(tt?(e=Ee,kd(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Ca(e)):kd(Ee,l.stateNode));break;case 4:a=Ee,n=tt,Ee=l.stateNode.containerInfo,tt=!0,Ft(e,t,l),Ee=a,tt=n;break;case 0:case 11:case 14:case 15:pl(2,l,t),qe||pl(4,l,t),Ft(e,t,l);break;case 1:qe||(Ut(l,t),a=l.stateNode,typeof a.componentWillUnmount=="function"&&Eo(l,t,a)),Ft(e,t,l);break;case 21:Ft(e,t,l);break;case 22:qe=(a=qe)||l.memoizedState!==null,Ft(e,t,l),qe=a;break;default:Ft(e,t,l)}}function Ro(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Ca(e)}catch(l){ye(t,t.return,l)}}}function Co(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Ca(e)}catch(l){ye(t,t.return,l)}}function P0(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new jo),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new jo),t;default:throw Error(s(435,e.tag))}}function _u(e,t){var l=P0(e);t.forEach(function(a){if(!l.has(a)){l.add(a);var n=rg.bind(null,e,a);a.then(n,n)}})}function lt(e,t){var l=t.deletions;if(l!==null)for(var a=0;a<l.length;a++){var n=l[a],u=e,i=t,f=i;e:for(;f!==null;){switch(f.tag){case 27:if(kl(f.type)){Ee=f.stateNode,tt=!1;break e}break;case 5:Ee=f.stateNode,tt=!1;break e;case 3:case 4:Ee=f.stateNode.containerInfo,tt=!0;break e}f=f.return}if(Ee===null)throw Error(s(160));Do(u,i,n),Ee=null,tt=!1,u=n.alternate,u!==null&&(u.return=null),n.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)wo(t,e),t=t.sibling}var Ot=null;function wo(e,t){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:lt(t,e),at(e),a&4&&(pl(3,e,e.return),dn(3,e),pl(5,e,e.return));break;case 1:lt(t,e),at(e),a&512&&(qe||l===null||Ut(l,l.return)),a&64&&Wt&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var n=Ot;if(lt(t,e),at(e),a&512&&(qe||l===null||Ut(l,l.return)),a&4){var u=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,n=n.ownerDocument||n;t:switch(a){case"title":u=n.getElementsByTagName("title")[0],(!u||u[qa]||u[Xe]||u.namespaceURI==="http://www.w3.org/2000/svg"||u.hasAttribute("itemprop"))&&(u=n.createElement(a),n.head.insertBefore(u,n.querySelector("head > title"))),Je(u,a,l),u[Xe]=e,Ge(u),a=u;break e;case"link":var i=wd("link","href",n).get(a+(l.href||""));if(i){for(var f=0;f<i.length;f++)if(u=i[f],u.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&u.getAttribute("rel")===(l.rel==null?null:l.rel)&&u.getAttribute("title")===(l.title==null?null:l.title)&&u.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){i.splice(f,1);break t}}u=n.createElement(a),Je(u,a,l),n.head.appendChild(u);break;case"meta":if(i=wd("meta","content",n).get(a+(l.content||""))){for(f=0;f<i.length;f++)if(u=i[f],u.getAttribute("content")===(l.content==null?null:""+l.content)&&u.getAttribute("name")===(l.name==null?null:l.name)&&u.getAttribute("property")===(l.property==null?null:l.property)&&u.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&u.getAttribute("charset")===(l.charSet==null?null:l.charSet)){i.splice(f,1);break t}}u=n.createElement(a),Je(u,a,l),n.head.appendChild(u);break;default:throw Error(s(468,a))}u[Xe]=e,Ge(u),a=u}e.stateNode=a}else Ud(n,e.type,e.stateNode);else e.stateNode=Cd(n,a,e.memoizedProps);else u!==a?(u===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):u.count--,a===null?Ud(n,e.type,e.stateNode):Cd(n,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Bc(e,e.memoizedProps,l.memoizedProps)}break;case 27:lt(t,e),at(e),a&512&&(qe||l===null||Ut(l,l.return)),l!==null&&a&4&&Bc(e,e.memoizedProps,l.memoizedProps);break;case 5:if(lt(t,e),at(e),a&512&&(qe||l===null||Ut(l,l.return)),e.flags&32){n=e.stateNode;try{aa(n,"")}catch(Y){ye(e,e.return,Y)}}a&4&&e.stateNode!=null&&(n=e.memoizedProps,Bc(e,n,l!==null?l.memoizedProps:n)),a&1024&&(Yc=!0);break;case 6:if(lt(t,e),at(e),a&4){if(e.stateNode===null)throw Error(s(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(Y){ye(e,e.return,Y)}}break;case 3:if(Gu=null,n=Ot,Ot=Lu(t.containerInfo),lt(t,e),Ot=n,at(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Ca(t.containerInfo)}catch(Y){ye(e,e.return,Y)}Yc&&(Yc=!1,Uo(e));break;case 4:a=Ot,Ot=Lu(e.stateNode.containerInfo),lt(t,e),at(e),Ot=a;break;case 12:lt(t,e),at(e);break;case 31:lt(t,e),at(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,_u(e,a)));break;case 13:lt(t,e),at(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Mu=ct()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,_u(e,a)));break;case 22:n=e.memoizedState!==null;var m=l!==null&&l.memoizedState!==null,E=Wt,j=qe;if(Wt=E||n,qe=j||m,lt(t,e),qe=j,Wt=E,at(e),a&8192)e:for(t=e.stateNode,t._visibility=n?t._visibility&-2:t._visibility|1,n&&(l===null||m||Wt||qe||Kl(e)),l=null,t=e;;){if(t.tag===5||t.tag===26){if(l===null){m=l=t;try{if(u=m.stateNode,n)i=u.style,typeof i.setProperty=="function"?i.setProperty("display","none","important"):i.display="none";else{f=m.stateNode;var D=m.memoizedProps.style,_=D!=null&&D.hasOwnProperty("display")?D.display:null;f.style.display=_==null||typeof _=="boolean"?"":(""+_).trim()}}catch(Y){ye(m,m.return,Y)}}}else if(t.tag===6){if(l===null){m=t;try{m.stateNode.nodeValue=n?"":m.memoizedProps}catch(Y){ye(m,m.return,Y)}}}else if(t.tag===18){if(l===null){m=t;try{var A=m.stateNode;n?Ed(A,!0):Ed(m.stateNode,!1)}catch(Y){ye(m,m.return,Y)}}}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}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,_u(e,l))));break;case 19:lt(t,e),at(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,_u(e,a)));break;case 30:break;case 21:break;default:lt(t,e),at(e)}}function at(e){var t=e.flags;if(t&2){try{for(var l,a=e.return;a!==null;){if(Ao(a)){l=a;break}a=a.return}if(l==null)throw Error(s(160));switch(l.tag){case 27:var n=l.stateNode,u=qc(e);Eu(e,u,n);break;case 5:var i=l.stateNode;l.flags&32&&(aa(i,""),l.flags&=-33);var f=qc(e);Eu(e,f,i);break;case 3:case 4:var m=l.stateNode.containerInfo,E=qc(e);Lc(e,E,m);break;default:throw Error(s(161))}}catch(j){ye(e,e.return,j)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Uo(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Uo(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function It(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)No(e,t.alternate,t),t=t.sibling}function Kl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:pl(4,t,t.return),Kl(t);break;case 1:Ut(t,t.return);var l=t.stateNode;typeof l.componentWillUnmount=="function"&&Eo(t,t.return,l),Kl(t);break;case 27:Tn(t.stateNode);case 26:case 5:Ut(t,t.return),Kl(t);break;case 22:t.memoizedState===null&&Kl(t);break;case 30:Kl(t);break;default:Kl(t)}e=e.sibling}}function Pt(e,t,l){for(l=l&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,n=e,u=t,i=u.flags;switch(u.tag){case 0:case 11:case 15:Pt(n,u,l),dn(4,u);break;case 1:if(Pt(n,u,l),a=u,n=a.stateNode,typeof n.componentDidMount=="function")try{n.componentDidMount()}catch(E){ye(a,a.return,E)}if(a=u,n=a.updateQueue,n!==null){var f=a.stateNode;try{var m=n.shared.hiddenCallbacks;if(m!==null)for(n.shared.hiddenCallbacks=null,n=0;n<m.length;n++)df(m[n],f)}catch(E){ye(a,a.return,E)}}l&&i&64&&ko(u),hn(u,u.return);break;case 27:Mo(u);case 26:case 5:Pt(n,u,l),l&&a===null&&i&4&&_o(u),hn(u,u.return);break;case 12:Pt(n,u,l);break;case 31:Pt(n,u,l),l&&i&4&&Ro(n,u);break;case 13:Pt(n,u,l),l&&i&4&&Co(n,u);break;case 22:u.memoizedState===null&&Pt(n,u,l),hn(u,u.return);break;case 30:break;default:Pt(n,u,l)}t=t.sibling}}function Gc(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&&Ia(l))}function Qc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ia(e))}function Dt(e,t,l,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ho(e,t,l,a),t=t.sibling}function Ho(e,t,l,a){var n=t.flags;switch(t.tag){case 0:case 11:case 15:Dt(e,t,l,a),n&2048&&dn(9,t);break;case 1:Dt(e,t,l,a);break;case 3:Dt(e,t,l,a),n&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ia(e)));break;case 12:if(n&2048){Dt(e,t,l,a),e=t.stateNode;try{var u=t.memoizedProps,i=u.id,f=u.onPostCommit;typeof f=="function"&&f(i,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(m){ye(t,t.return,m)}}else Dt(e,t,l,a);break;case 31:Dt(e,t,l,a);break;case 13:Dt(e,t,l,a);break;case 23:break;case 22:u=t.stateNode,i=t.alternate,t.memoizedState!==null?u._visibility&2?Dt(e,t,l,a):gn(e,t):u._visibility&2?Dt(e,t,l,a):(u._visibility|=2,za(e,t,l,a,(t.subtreeFlags&10256)!==0||!1)),n&2048&&Gc(i,t);break;case 24:Dt(e,t,l,a),n&2048&&Qc(t.alternate,t);break;default:Dt(e,t,l,a)}}function za(e,t,l,a,n){for(n=n&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var u=e,i=t,f=l,m=a,E=i.flags;switch(i.tag){case 0:case 11:case 15:za(u,i,f,m,n),dn(8,i);break;case 23:break;case 22:var j=i.stateNode;i.memoizedState!==null?j._visibility&2?za(u,i,f,m,n):gn(u,i):(j._visibility|=2,za(u,i,f,m,n)),n&&E&2048&&Gc(i.alternate,i);break;case 24:za(u,i,f,m,n),n&&E&2048&&Qc(i.alternate,i);break;default:za(u,i,f,m,n)}t=t.sibling}}function gn(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var l=e,a=t,n=a.flags;switch(a.tag){case 22:gn(l,a),n&2048&&Gc(a.alternate,a);break;case 24:gn(l,a),n&2048&&Qc(a.alternate,a);break;default:gn(l,a)}t=t.sibling}}var mn=8192;function ka(e,t,l){if(e.subtreeFlags&mn)for(e=e.child;e!==null;)Bo(e,t,l),e=e.sibling}function Bo(e,t,l){switch(e.tag){case 26:ka(e,t,l),e.flags&mn&&e.memoizedState!==null&&qg(l,Ot,e.memoizedState,e.memoizedProps);break;case 5:ka(e,t,l);break;case 3:case 4:var a=Ot;Ot=Lu(e.stateNode.containerInfo),ka(e,t,l),Ot=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=mn,mn=16777216,ka(e,t,l),mn=a):ka(e,t,l));break;default:ka(e,t,l)}}function qo(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 yn(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Qe=a,Yo(a,e)}qo(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Lo(e),e=e.sibling}function Lo(e){switch(e.tag){case 0:case 11:case 15:yn(e),e.flags&2048&&pl(9,e,e.return);break;case 3:yn(e);break;case 12:yn(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Au(e)):yn(e);break;default:yn(e)}}function Au(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var l=0;l<t.length;l++){var a=t[l];Qe=a,Yo(a,e)}qo(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:pl(8,t,t.return),Au(t);break;case 22:l=t.stateNode,l._visibility&2&&(l._visibility&=-3,Au(t));break;default:Au(t)}e=e.sibling}}function Yo(e,t){for(;Qe!==null;){var l=Qe;switch(l.tag){case 0:case 11:case 15:pl(8,l,t);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:Ia(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,Qe=a;else e:for(l=e;Qe!==null;){a=Qe;var n=a.sibling,u=a.return;if(Oo(a),a===l){Qe=null;break e}if(n!==null){n.return=u,Qe=n;break e}Qe=u}}}var eg={getCacheForType:function(e){var t=Ve(Ue),l=t.data.get(e);return l===void 0&&(l=e(),t.data.set(e,l)),l},cacheSignal:function(){return Ve(Ue).controller.signal}},tg=typeof WeakMap=="function"?WeakMap:Map,oe=0,xe=null,ae=null,ie=0,me=0,gt=null,bl=!1,Ea=!1,Xc=!1,el=0,je=0,vl=0,Jl=0,Zc=0,mt=0,_a=0,pn=null,nt=null,Vc=!1,Mu=0,Go=0,ju=1/0,Nu=null,xl=null,Ye=0,Sl=null,Aa=null,tl=0,Kc=0,Jc=null,Qo=null,bn=0,$c=null;function yt(){return(oe&2)!==0&&ie!==0?ie&-ie:N.T!==null?tr():as()}function Xo(){if(mt===0)if((ie&536870912)===0||re){var e=Bn;Bn<<=1,(Bn&3932160)===0&&(Bn=262144),mt=e}else mt=536870912;return e=dt.current,e!==null&&(e.flags|=32),mt}function ut(e,t,l){(e===xe&&(me===2||me===9)||e.cancelPendingCommit!==null)&&(Ma(e,0),Tl(e,ie,mt,!1)),Ba(e,l),((oe&2)===0||e!==xe)&&(e===xe&&((oe&2)===0&&(Jl|=l),je===4&&Tl(e,ie,mt,!1)),Ht(e))}function Zo(e,t,l){if((oe&6)!==0)throw Error(s(327));var a=!l&&(t&127)===0&&(t&e.expiredLanes)===0||Ha(e,t),n=a?ng(e,t):Fc(e,t,!0),u=a;do{if(n===0){Ea&&!a&&Tl(e,t,0,!1);break}else{if(l=e.current.alternate,u&&!lg(l)){n=Fc(e,t,!1),u=!1;continue}if(n===2){if(u=t,e.errorRecoveryDisabledLanes&u)var i=0;else i=e.pendingLanes&-536870913,i=i!==0?i:i&536870912?536870912:0;if(i!==0){t=i;e:{var f=e;n=pn;var m=f.current.memoizedState.isDehydrated;if(m&&(Ma(f,i).flags|=256),i=Fc(f,i,!1),i!==2){if(Xc&&!m){f.errorRecoveryDisabledLanes|=u,Jl|=u,n=4;break e}u=nt,nt=n,u!==null&&(nt===null?nt=u:nt.push.apply(nt,u))}n=i}if(u=!1,n!==2)continue}}if(n===1){Ma(e,0),Tl(e,t,0,!0);break}e:{switch(a=e,u=n,u){case 0:case 1:throw Error(s(345));case 4:if((t&4194048)!==t)break;case 6:Tl(a,t,mt,!bl);break e;case 2:nt=null;break;case 3:case 5:break;default:throw Error(s(329))}if((t&62914560)===t&&(n=Mu+300-ct(),10<n)){if(Tl(a,t,mt,!bl),Ln(a,0,!0)!==0)break e;tl=t,a.timeoutHandle=Td(Vo.bind(null,a,l,nt,Nu,Vc,t,mt,Jl,_a,bl,u,"Throttled",-0,0),n);break e}Vo(a,l,nt,Nu,Vc,t,mt,Jl,_a,bl,u,null,-0,0)}}break}while(!0);Ht(e)}function Vo(e,t,l,a,n,u,i,f,m,E,j,D,_,A){if(e.timeoutHandle=-1,D=t.subtreeFlags,D&8192||(D&16785408)===16785408){D={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Lt},Bo(t,u,D);var Y=(u&62914560)===u?Mu-ct():(u&4194048)===u?Go-ct():0;if(Y=Lg(D,Y),Y!==null){tl=u,e.cancelPendingCommit=Y(ed.bind(null,e,t,u,l,a,n,i,f,m,j,D,null,_,A)),Tl(e,u,i,!E);return}}ed(e,t,u,l,a,n,i,f,m)}function lg(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 a=0;a<l.length;a++){var n=l[a],u=n.getSnapshot;n=n.value;try{if(!ft(u(),n))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 Tl(e,t,l,a){t&=~Zc,t&=~Jl,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var n=t;0<n;){var u=31-st(n),i=1<<u;a[u]=-1,n&=~i}l!==0&&es(e,l,t)}function Ou(){return(oe&6)===0?(vn(0),!1):!0}function Wc(){if(ae!==null){if(me===0)var e=ae.return;else e=ae,Xt=ql=null,dc(e),ba=null,en=0,e=ae;for(;e!==null;)zo(e.alternate,e),e=e.return;ae=null}}function Ma(e,t){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Tg(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,Wc(),xe=e,ae=l=Gt(e.current,null),ie=t,me=0,gt=null,bl=!1,Ea=Ha(e,t),Xc=!1,_a=mt=Zc=Jl=vl=je=0,nt=pn=null,Vc=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var n=31-st(a),u=1<<n;t|=e[n],a&=~u}return el=t,In(),l}function Ko(e,t){P=null,N.H=sn,t===pa||t===iu?(t=rf(),me=3):t===ec?(t=rf(),me=4):me=t===Mc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,gt=t,ae===null&&(je=1,xu(e,zt(t,e.current)))}function Jo(){var e=dt.current;return e===null?!0:(ie&4194048)===ie?At===null:(ie&62914560)===ie||(ie&536870912)!==0?e===At:!1}function $o(){var e=N.H;return N.H=sn,e===null?sn:e}function Wo(){var e=N.A;return N.A=eg,e}function Du(){je=4,bl||(ie&4194048)!==ie&&dt.current!==null||(Ea=!0),(vl&134217727)===0&&(Jl&134217727)===0||xe===null||Tl(xe,ie,mt,!1)}function Fc(e,t,l){var a=oe;oe|=2;var n=$o(),u=Wo();(xe!==e||ie!==t)&&(Nu=null,Ma(e,t)),t=!1;var i=je;e:do try{if(me!==0&&ae!==null){var f=ae,m=gt;switch(me){case 8:Wc(),i=6;break e;case 3:case 2:case 9:case 6:dt.current===null&&(t=!0);var E=me;if(me=0,gt=null,ja(e,f,m,E),l&&Ea){i=0;break e}break;default:E=me,me=0,gt=null,ja(e,f,m,E)}}ag(),i=je;break}catch(j){Ko(e,j)}while(!0);return t&&e.shellSuspendCounter++,Xt=ql=null,oe=a,N.H=n,N.A=u,ae===null&&(xe=null,ie=0,In()),i}function ag(){for(;ae!==null;)Fo(ae)}function ng(e,t){var l=oe;oe|=2;var a=$o(),n=Wo();xe!==e||ie!==t?(Nu=null,ju=ct()+500,Ma(e,t)):Ea=Ha(e,t);e:do try{if(me!==0&&ae!==null){t=ae;var u=gt;t:switch(me){case 1:me=0,gt=null,ja(e,t,u,1);break;case 2:case 9:if(uf(u)){me=0,gt=null,Io(t);break}t=function(){me!==2&&me!==9||xe!==e||(me=7),Ht(e)},u.then(t,t);break e;case 3:me=7;break e;case 4:me=5;break e;case 7:uf(u)?(me=0,gt=null,Io(t)):(me=0,gt=null,ja(e,t,u,7));break;case 5:var i=null;switch(ae.tag){case 26:i=ae.memoizedState;case 5:case 27:var f=ae;if(i?Hd(i):f.stateNode.complete){me=0,gt=null;var m=f.sibling;if(m!==null)ae=m;else{var E=f.return;E!==null?(ae=E,Ru(E)):ae=null}break t}}me=0,gt=null,ja(e,t,u,5);break;case 6:me=0,gt=null,ja(e,t,u,6);break;case 8:Wc(),je=6;break e;default:throw Error(s(462))}}ug();break}catch(j){Ko(e,j)}while(!0);return Xt=ql=null,N.H=a,N.A=n,oe=l,ae!==null?0:(xe=null,ie=0,In(),je)}function ug(){for(;ae!==null&&!Mh();)Fo(ae)}function Fo(e){var t=So(e.alternate,e,el);e.memoizedProps=e.pendingProps,t===null?Ru(e):ae=t}function Io(e){var t=e,l=t.alternate;switch(t.tag){case 15:case 0:t=mo(l,t,t.pendingProps,t.type,void 0,ie);break;case 11:t=mo(l,t,t.pendingProps,t.type.render,t.ref,ie);break;case 5:dc(t);default:zo(l,t),t=ae=Js(t,el),t=So(l,t,el)}e.memoizedProps=e.pendingProps,t===null?Ru(e):ae=t}function ja(e,t,l,a){Xt=ql=null,dc(t),ba=null,en=0;var n=t.return;try{if(K0(e,n,t,l,ie)){je=1,xu(e,zt(l,e.current)),ae=null;return}}catch(u){if(n!==null)throw ae=n,u;je=1,xu(e,zt(l,e.current)),ae=null;return}t.flags&32768?(re||a===1?e=!0:Ea||(ie&536870912)!==0?e=!1:(bl=e=!0,(a===2||a===9||a===3||a===6)&&(a=dt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Po(t,e)):Ru(t)}function Ru(e){var t=e;do{if((t.flags&32768)!==0){Po(t,bl);return}e=t.return;var l=W0(t.alternate,t,el);if(l!==null){ae=l;return}if(t=t.sibling,t!==null){ae=t;return}ae=t=e}while(t!==null);je===0&&(je=5)}function Po(e,t){do{var l=F0(e.alternate,e);if(l!==null){l.flags&=32767,ae=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!t&&(e=e.sibling,e!==null)){ae=e;return}ae=e=l}while(e!==null);je=6,ae=null}function ed(e,t,l,a,n,u,i,f,m){e.cancelPendingCommit=null;do Cu();while(Ye!==0);if((oe&6)!==0)throw Error(s(327));if(t!==null){if(t===e.current)throw Error(s(177));if(u=t.lanes|t.childLanes,u|=qi,Bh(e,l,u,i,f,m),e===xe&&(ae=xe=null,ie=0),Aa=t,Sl=e,tl=l,Kc=u,Jc=n,Qo=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,sg(Un,function(){return ud(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=N.T,N.T=null,n=H.p,H.p=2,i=oe,oe|=4;try{I0(e,t,l)}finally{oe=i,H.p=n,N.T=a}}Ye=1,td(),ld(),ad()}}function td(){if(Ye===1){Ye=0;var e=Sl,t=Aa,l=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||l){l=N.T,N.T=null;var a=H.p;H.p=2;var n=oe;oe|=4;try{wo(t,e);var u=sr,i=qs(e.containerInfo),f=u.focusedElem,m=u.selectionRange;if(i!==f&&f&&f.ownerDocument&&Bs(f.ownerDocument.documentElement,f)){if(m!==null&&Ci(f)){var E=m.start,j=m.end;if(j===void 0&&(j=E),"selectionStart"in f)f.selectionStart=E,f.selectionEnd=Math.min(j,f.value.length);else{var D=f.ownerDocument||document,_=D&&D.defaultView||window;if(_.getSelection){var A=_.getSelection(),Y=f.textContent.length,K=Math.min(m.start,Y),ve=m.end===void 0?K:Math.min(m.end,Y);!A.extend&&K>ve&&(i=ve,ve=K,K=i);var S=Hs(f,K),v=Hs(f,ve);if(S&&v&&(A.rangeCount!==1||A.anchorNode!==S.node||A.anchorOffset!==S.offset||A.focusNode!==v.node||A.focusOffset!==v.offset)){var k=D.createRange();k.setStart(S.node,S.offset),A.removeAllRanges(),K>ve?(A.addRange(k),A.extend(v.node,v.offset)):(k.setEnd(v.node,v.offset),A.addRange(k))}}}}for(D=[],A=f;A=A.parentNode;)A.nodeType===1&&D.push({element:A,left:A.scrollLeft,top:A.scrollTop});for(typeof f.focus=="function"&&f.focus(),f=0;f<D.length;f++){var O=D[f];O.element.scrollLeft=O.left,O.element.scrollTop=O.top}}Vu=!!rr,sr=rr=null}finally{oe=n,H.p=a,N.T=l}}e.current=t,Ye=2}}function ld(){if(Ye===2){Ye=0;var e=Sl,t=Aa,l=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||l){l=N.T,N.T=null;var a=H.p;H.p=2;var n=oe;oe|=4;try{No(e,t.alternate,t)}finally{oe=n,H.p=a,N.T=l}}Ye=3}}function ad(){if(Ye===4||Ye===3){Ye=0,jh();var e=Sl,t=Aa,l=tl,a=Qo;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ye=5:(Ye=0,Aa=Sl=null,nd(e,e.pendingLanes));var n=e.pendingLanes;if(n===0&&(xl=null),mi(l),t=t.stateNode,rt&&typeof rt.onCommitFiberRoot=="function")try{rt.onCommitFiberRoot(Ua,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=N.T,n=H.p,H.p=2,N.T=null;try{for(var u=e.onRecoverableError,i=0;i<a.length;i++){var f=a[i];u(f.value,{componentStack:f.stack})}}finally{N.T=t,H.p=n}}(tl&3)!==0&&Cu(),Ht(e),n=e.pendingLanes,(l&261930)!==0&&(n&42)!==0?e===$c?bn++:(bn=0,$c=e):bn=0,vn(0)}}function nd(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ia(t)))}function Cu(){return td(),ld(),ad(),ud()}function ud(){if(Ye!==5)return!1;var e=Sl,t=Kc;Kc=0;var l=mi(tl),a=N.T,n=H.p;try{H.p=32>l?32:l,N.T=null,l=Jc,Jc=null;var u=Sl,i=tl;if(Ye=0,Aa=Sl=null,tl=0,(oe&6)!==0)throw Error(s(331));var f=oe;if(oe|=4,Lo(u.current),Ho(u,u.current,i,l),oe=f,vn(0,!1),rt&&typeof rt.onPostCommitFiberRoot=="function")try{rt.onPostCommitFiberRoot(Ua,u)}catch{}return!0}finally{H.p=n,N.T=a,nd(e,t)}}function id(e,t,l){t=zt(l,t),t=Ac(e.stateNode,t,2),e=gl(e,t,2),e!==null&&(Ba(e,2),Ht(e))}function ye(e,t,l){if(e.tag===3)id(e,e,l);else for(;t!==null;){if(t.tag===3){id(t,e,l);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(xl===null||!xl.has(a))){e=zt(l,e),l=io(2),a=gl(t,l,2),a!==null&&(co(l,a,t,e),Ba(a,2),Ht(a));break}}t=t.return}}function Ic(e,t,l){var a=e.pingCache;if(a===null){a=e.pingCache=new tg;var n=new Set;a.set(t,n)}else n=a.get(t),n===void 0&&(n=new Set,a.set(t,n));n.has(l)||(Xc=!0,n.add(l),e=ig.bind(null,e,t,l),t.then(e,e))}function ig(e,t,l){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,xe===e&&(ie&l)===l&&(je===4||je===3&&(ie&62914560)===ie&&300>ct()-Mu?(oe&2)===0&&Ma(e,0):Zc|=l,_a===ie&&(_a=0)),Ht(e)}function cd(e,t){t===0&&(t=Pr()),e=Ul(e,t),e!==null&&(Ba(e,t),Ht(e))}function cg(e){var t=e.memoizedState,l=0;t!==null&&(l=t.retryLane),cd(e,l)}function rg(e,t){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,n=e.memoizedState;n!==null&&(l=n.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(s(314))}a!==null&&a.delete(t),cd(e,l)}function sg(e,t){return oi(e,t)}var wu=null,Na=null,Pc=!1,Uu=!1,er=!1,zl=0;function Ht(e){e!==Na&&e.next===null&&(Na===null?wu=Na=e:Na=Na.next=e),Uu=!0,Pc||(Pc=!0,og())}function vn(e,t){if(!er&&Uu){er=!0;do for(var l=!1,a=wu;a!==null;){if(e!==0){var n=a.pendingLanes;if(n===0)var u=0;else{var i=a.suspendedLanes,f=a.pingedLanes;u=(1<<31-st(42|e)+1)-1,u&=n&~(i&~f),u=u&201326741?u&201326741|1:u?u|2:0}u!==0&&(l=!0,od(a,u))}else u=ie,u=Ln(a,a===xe?u:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(u&3)===0||Ha(a,u)||(l=!0,od(a,u));a=a.next}while(l);er=!1}}function fg(){rd()}function rd(){Uu=Pc=!1;var e=0;zl!==0&&Sg()&&(e=zl);for(var t=ct(),l=null,a=wu;a!==null;){var n=a.next,u=sd(a,t);u===0?(a.next=null,l===null?wu=n:l.next=n,n===null&&(Na=l)):(l=a,(e!==0||(u&3)!==0)&&(Uu=!0)),a=n}Ye!==0&&Ye!==5||vn(e),zl!==0&&(zl=0)}function sd(e,t){for(var l=e.suspendedLanes,a=e.pingedLanes,n=e.expirationTimes,u=e.pendingLanes&-62914561;0<u;){var i=31-st(u),f=1<<i,m=n[i];m===-1?((f&l)===0||(f&a)!==0)&&(n[i]=Hh(f,t)):m<=t&&(e.expiredLanes|=f),u&=~f}if(t=xe,l=ie,l=Ln(e,e===t?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===t&&(me===2||me===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&di(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||Ha(e,l)){if(t=l&-l,t===e.callbackPriority)return t;switch(a!==null&&di(a),mi(l)){case 2:case 8:l=Fr;break;case 32:l=Un;break;case 268435456:l=Ir;break;default:l=Un}return a=fd.bind(null,e),l=oi(l,a),e.callbackPriority=t,e.callbackNode=l,t}return a!==null&&a!==null&&di(a),e.callbackPriority=2,e.callbackNode=null,2}function fd(e,t){if(Ye!==0&&Ye!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(Cu()&&e.callbackNode!==l)return null;var a=ie;return a=Ln(e,e===xe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Zo(e,a,t),sd(e,ct()),e.callbackNode!=null&&e.callbackNode===l?fd.bind(null,e):null)}function od(e,t){if(Cu())return null;Zo(e,t,!0)}function og(){zg(function(){(oe&6)!==0?oi(Wr,fg):rd()})}function tr(){if(zl===0){var e=ma;e===0&&(e=Hn,Hn<<=1,(Hn&261888)===0&&(Hn=256)),zl=e}return zl}function dd(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Xn(""+e)}function hd(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 dg(e,t,l,a,n){if(t==="submit"&&l&&l.stateNode===n){var u=dd((n[Pe]||null).action),i=a.submitter;i&&(t=(t=i[Pe]||null)?dd(t.formAction):i.getAttribute("formAction"),t!==null&&(u=t,i=null));var f=new Jn("action","action",null,a,n);e.push({event:f,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(zl!==0){var m=i?hd(n,i):new FormData(n);Sc(l,{pending:!0,data:m,method:n.method,action:u},null,m)}}else typeof u=="function"&&(f.preventDefault(),m=i?hd(n,i):new FormData(n),Sc(l,{pending:!0,data:m,method:n.method,action:u},u,m))},currentTarget:n}]})}}for(var lr=0;lr<Bi.length;lr++){var ar=Bi[lr],hg=ar.toLowerCase(),gg=ar[0].toUpperCase()+ar.slice(1);Nt(hg,"on"+gg)}Nt(Gs,"onAnimationEnd"),Nt(Qs,"onAnimationIteration"),Nt(Xs,"onAnimationStart"),Nt("dblclick","onDoubleClick"),Nt("focusin","onFocus"),Nt("focusout","onBlur"),Nt(N0,"onTransitionRun"),Nt(O0,"onTransitionStart"),Nt(D0,"onTransitionCancel"),Nt(Zs,"onTransitionEnd"),ta("onMouseEnter",["mouseout","mouseover"]),ta("onMouseLeave",["mouseout","mouseover"]),ta("onPointerEnter",["pointerout","pointerover"]),ta("onPointerLeave",["pointerout","pointerover"]),Dl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Dl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Dl("onBeforeInput",["compositionend","keypress","textInput","paste"]),Dl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Dl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Dl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var xn="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(" "),mg=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(xn));function gd(e,t){t=(t&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],n=a.event;a=a.listeners;e:{var u=void 0;if(t)for(var i=a.length-1;0<=i;i--){var f=a[i],m=f.instance,E=f.currentTarget;if(f=f.listener,m!==u&&n.isPropagationStopped())break e;u=f,n.currentTarget=E;try{u(n)}catch(j){Fn(j)}n.currentTarget=null,u=m}else for(i=0;i<a.length;i++){if(f=a[i],m=f.instance,E=f.currentTarget,f=f.listener,m!==u&&n.isPropagationStopped())break e;u=f,n.currentTarget=E;try{u(n)}catch(j){Fn(j)}n.currentTarget=null,u=m}}}}function ne(e,t){var l=t[yi];l===void 0&&(l=t[yi]=new Set);var a=e+"__bubble";l.has(a)||(md(t,e,2,!1),l.add(a))}function nr(e,t,l){var a=0;t&&(a|=4),md(l,e,a,t)}var Hu="_reactListening"+Math.random().toString(36).slice(2);function ur(e){if(!e[Hu]){e[Hu]=!0,is.forEach(function(l){l!=="selectionchange"&&(mg.has(l)||nr(l,!1,e),nr(l,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Hu]||(t[Hu]=!0,nr("selectionchange",!1,t))}}function md(e,t,l,a){switch(Xd(t)){case 2:var n=Qg;break;case 8:n=Xg;break;default:n=xr}l=n.bind(null,t,l,e),n=void 0,!Ei||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),a?n!==void 0?e.addEventListener(t,l,{capture:!0,passive:n}):e.addEventListener(t,l,!0):n!==void 0?e.addEventListener(t,l,{passive:n}):e.addEventListener(t,l,!1)}function ir(e,t,l,a,n){var u=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var i=a.tag;if(i===3||i===4){var f=a.stateNode.containerInfo;if(f===n)break;if(i===4)for(i=a.return;i!==null;){var m=i.tag;if((m===3||m===4)&&i.stateNode.containerInfo===n)return;i=i.return}for(;f!==null;){if(i=Il(f),i===null)return;if(m=i.tag,m===5||m===6||m===26||m===27){a=u=i;continue e}f=f.parentNode}}a=a.return}bs(function(){var E=u,j=zi(l),D=[];e:{var _=Vs.get(e);if(_!==void 0){var A=Jn,Y=e;switch(e){case"keypress":if(Vn(l)===0)break e;case"keydown":case"keyup":A=r0;break;case"focusin":Y="focus",A=ji;break;case"focusout":Y="blur",A=ji;break;case"beforeblur":case"afterblur":A=ji;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":A=Ss;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":A=Wh;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":A=o0;break;case Gs:case Qs:case Xs:A=Ph;break;case Zs:A=h0;break;case"scroll":case"scrollend":A=Jh;break;case"wheel":A=m0;break;case"copy":case"cut":case"paste":A=t0;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":A=zs;break;case"toggle":case"beforetoggle":A=p0}var K=(t&4)!==0,ve=!K&&(e==="scroll"||e==="scrollend"),S=K?_!==null?_+"Capture":null:_;K=[];for(var v=E,k;v!==null;){var O=v;if(k=O.stateNode,O=O.tag,O!==5&&O!==26&&O!==27||k===null||S===null||(O=Ya(v,S),O!=null&&K.push(Sn(v,O,k))),ve)break;v=v.return}0<K.length&&(_=new A(_,Y,null,l,j),D.push({event:_,listeners:K}))}}if((t&7)===0){e:{if(_=e==="mouseover"||e==="pointerover",A=e==="mouseout"||e==="pointerout",_&&l!==Ti&&(Y=l.relatedTarget||l.fromElement)&&(Il(Y)||Y[Fl]))break e;if((A||_)&&(_=j.window===j?j:(_=j.ownerDocument)?_.defaultView||_.parentWindow:window,A?(Y=l.relatedTarget||l.toElement,A=E,Y=Y?Il(Y):null,Y!==null&&(ve=g(Y),K=Y.tag,Y!==ve||K!==5&&K!==27&&K!==6)&&(Y=null)):(A=null,Y=E),A!==Y)){if(K=Ss,O="onMouseLeave",S="onMouseEnter",v="mouse",(e==="pointerout"||e==="pointerover")&&(K=zs,O="onPointerLeave",S="onPointerEnter",v="pointer"),ve=A==null?_:La(A),k=Y==null?_:La(Y),_=new K(O,v+"leave",A,l,j),_.target=ve,_.relatedTarget=k,O=null,Il(j)===E&&(K=new K(S,v+"enter",Y,l,j),K.target=k,K.relatedTarget=ve,O=K),ve=O,A&&Y)t:{for(K=yg,S=A,v=Y,k=0,O=S;O;O=K(O))k++;O=0;for(var Z=v;Z;Z=K(Z))O++;for(;0<k-O;)S=K(S),k--;for(;0<O-k;)v=K(v),O--;for(;k--;){if(S===v||v!==null&&S===v.alternate){K=S;break t}S=K(S),v=K(v)}K=null}else K=null;A!==null&&yd(D,_,A,K,!1),Y!==null&&ve!==null&&yd(D,ve,Y,K,!0)}}e:{if(_=E?La(E):window,A=_.nodeName&&_.nodeName.toLowerCase(),A==="select"||A==="input"&&_.type==="file")var se=Os;else if(js(_))if(Ds)se=A0;else{se=E0;var G=k0}else A=_.nodeName,!A||A.toLowerCase()!=="input"||_.type!=="checkbox"&&_.type!=="radio"?E&&Si(E.elementType)&&(se=Os):se=_0;if(se&&(se=se(e,E))){Ns(D,se,l,j);break e}G&&G(e,_,E),e==="focusout"&&E&&_.type==="number"&&E.memoizedProps.value!=null&&xi(_,"number",_.value)}switch(G=E?La(E):window,e){case"focusin":(js(G)||G.contentEditable==="true")&&(ca=G,wi=E,$a=null);break;case"focusout":$a=wi=ca=null;break;case"mousedown":Ui=!0;break;case"contextmenu":case"mouseup":case"dragend":Ui=!1,Ls(D,l,j);break;case"selectionchange":if(j0)break;case"keydown":case"keyup":Ls(D,l,j)}var ee;if(Oi)e:{switch(e){case"compositionstart":var ce="onCompositionStart";break e;case"compositionend":ce="onCompositionEnd";break e;case"compositionupdate":ce="onCompositionUpdate";break e}ce=void 0}else ia?As(e,l)&&(ce="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(ce="onCompositionStart");ce&&(ks&&l.locale!=="ko"&&(ia||ce!=="onCompositionStart"?ce==="onCompositionEnd"&&ia&&(ee=vs()):(cl=j,_i="value"in cl?cl.value:cl.textContent,ia=!0)),G=Bu(E,ce),0<G.length&&(ce=new Ts(ce,e,null,l,j),D.push({event:ce,listeners:G}),ee?ce.data=ee:(ee=Ms(l),ee!==null&&(ce.data=ee)))),(ee=v0?x0(e,l):S0(e,l))&&(ce=Bu(E,"onBeforeInput"),0<ce.length&&(G=new Ts("onBeforeInput","beforeinput",null,l,j),D.push({event:G,listeners:ce}),G.data=ee)),dg(D,e,E,l,j)}gd(D,t)})}function Sn(e,t,l){return{instance:e,listener:t,currentTarget:l}}function Bu(e,t){for(var l=t+"Capture",a=[];e!==null;){var n=e,u=n.stateNode;if(n=n.tag,n!==5&&n!==26&&n!==27||u===null||(n=Ya(e,l),n!=null&&a.unshift(Sn(e,n,u)),n=Ya(e,t),n!=null&&a.push(Sn(e,n,u))),e.tag===3)return a;e=e.return}return[]}function yg(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function yd(e,t,l,a,n){for(var u=t._reactName,i=[];l!==null&&l!==a;){var f=l,m=f.alternate,E=f.stateNode;if(f=f.tag,m!==null&&m===a)break;f!==5&&f!==26&&f!==27||E===null||(m=E,n?(E=Ya(l,u),E!=null&&i.unshift(Sn(l,E,m))):n||(E=Ya(l,u),E!=null&&i.push(Sn(l,E,m)))),l=l.return}i.length!==0&&e.push({event:t,listeners:i})}var pg=/\r\n?/g,bg=/\u0000|\uFFFD/g;function pd(e){return(typeof e=="string"?e:""+e).replace(pg,`
`).replace(bg,"")}function bd(e,t){return t=pd(t),pd(e)===t}function be(e,t,l,a,n,u){switch(l){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||aa(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&aa(e,""+a);break;case"className":Gn(e,"class",a);break;case"tabIndex":Gn(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Gn(e,l,a);break;case"style":ys(e,a,u);break;case"data":if(t!=="object"){Gn(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Xn(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="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 u=="function"&&(l==="formAction"?(t!=="input"&&be(e,t,"name",n.name,n,null),be(e,t,"formEncType",n.formEncType,n,null),be(e,t,"formMethod",n.formMethod,n,null),be(e,t,"formTarget",n.formTarget,n,null)):(be(e,t,"encType",n.encType,n,null),be(e,t,"method",n.method,n,null),be(e,t,"target",n.target,n,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=Xn(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Lt);break;case"onScroll":a!=null&&ne("scroll",e);break;case"onScrollEnd":a!=null&&ne("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}l=Xn(""+a),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":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":ne("beforetoggle",e),ne("toggle",e),Yn(e,"popover",a);break;case"xlinkActuate":qt(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":qt(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":qt(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":qt(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":qt(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":qt(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":qt(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":qt(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":qt(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Yn(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=Vh.get(l)||l,Yn(e,l,a))}}function cr(e,t,l,a,n,u){switch(l){case"style":ys(e,a,u);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(s(61));if(l=a.__html,l!=null){if(n.children!=null)throw Error(s(60));e.innerHTML=l}}break;case"children":typeof a=="string"?aa(e,a):(typeof a=="number"||typeof a=="bigint")&&aa(e,""+a);break;case"onScroll":a!=null&&ne("scroll",e);break;case"onScrollEnd":a!=null&&ne("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Lt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!cs.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(n=l.endsWith("Capture"),t=l.slice(2,n?l.length-7:void 0),u=e[Pe]||null,u=u!=null?u[l]:null,typeof u=="function"&&e.removeEventListener(t,u,n),typeof a=="function")){typeof u!="function"&&u!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(t,a,n);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):Yn(e,l,a)}}}function Je(e,t,l){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ne("error",e),ne("load",e);var a=!1,n=!1,u;for(u in l)if(l.hasOwnProperty(u)){var i=l[u];if(i!=null)switch(u){case"src":a=!0;break;case"srcSet":n=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:be(e,t,u,i,l,null)}}n&&be(e,t,"srcSet",l.srcSet,l,null),a&&be(e,t,"src",l.src,l,null);return;case"input":ne("invalid",e);var f=u=i=n=null,m=null,E=null;for(a in l)if(l.hasOwnProperty(a)){var j=l[a];if(j!=null)switch(a){case"name":n=j;break;case"type":i=j;break;case"checked":m=j;break;case"defaultChecked":E=j;break;case"value":u=j;break;case"defaultValue":f=j;break;case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(s(137,t));break;default:be(e,t,a,j,l,null)}}ds(e,u,f,m,E,i,n,!1);return;case"select":ne("invalid",e),a=i=u=null;for(n in l)if(l.hasOwnProperty(n)&&(f=l[n],f!=null))switch(n){case"value":u=f;break;case"defaultValue":i=f;break;case"multiple":a=f;default:be(e,t,n,f,l,null)}t=u,l=i,e.multiple=!!a,t!=null?la(e,!!a,t,!1):l!=null&&la(e,!!a,l,!0);return;case"textarea":ne("invalid",e),u=n=a=null;for(i in l)if(l.hasOwnProperty(i)&&(f=l[i],f!=null))switch(i){case"value":a=f;break;case"defaultValue":n=f;break;case"children":u=f;break;case"dangerouslySetInnerHTML":if(f!=null)throw Error(s(91));break;default:be(e,t,i,f,l,null)}gs(e,a,n,u);return;case"option":for(m in l)if(l.hasOwnProperty(m)&&(a=l[m],a!=null))switch(m){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:be(e,t,m,a,l,null)}return;case"dialog":ne("beforetoggle",e),ne("toggle",e),ne("cancel",e),ne("close",e);break;case"iframe":case"object":ne("load",e);break;case"video":case"audio":for(a=0;a<xn.length;a++)ne(xn[a],e);break;case"image":ne("error",e),ne("load",e);break;case"details":ne("toggle",e);break;case"embed":case"source":case"link":ne("error",e),ne("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(E in l)if(l.hasOwnProperty(E)&&(a=l[E],a!=null))switch(E){case"children":case"dangerouslySetInnerHTML":throw Error(s(137,t));default:be(e,t,E,a,l,null)}return;default:if(Si(t)){for(j in l)l.hasOwnProperty(j)&&(a=l[j],a!==void 0&&cr(e,t,j,a,l,void 0));return}}for(f in l)l.hasOwnProperty(f)&&(a=l[f],a!=null&&be(e,t,f,a,l,null))}function vg(e,t,l,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var n=null,u=null,i=null,f=null,m=null,E=null,j=null;for(A in l){var D=l[A];if(l.hasOwnProperty(A)&&D!=null)switch(A){case"checked":break;case"value":break;case"defaultValue":m=D;default:a.hasOwnProperty(A)||be(e,t,A,null,a,D)}}for(var _ in a){var A=a[_];if(D=l[_],a.hasOwnProperty(_)&&(A!=null||D!=null))switch(_){case"type":u=A;break;case"name":n=A;break;case"checked":E=A;break;case"defaultChecked":j=A;break;case"value":i=A;break;case"defaultValue":f=A;break;case"children":case"dangerouslySetInnerHTML":if(A!=null)throw Error(s(137,t));break;default:A!==D&&be(e,t,_,A,a,D)}}vi(e,i,f,m,E,j,u,n);return;case"select":A=i=f=_=null;for(u in l)if(m=l[u],l.hasOwnProperty(u)&&m!=null)switch(u){case"value":break;case"multiple":A=m;default:a.hasOwnProperty(u)||be(e,t,u,null,a,m)}for(n in a)if(u=a[n],m=l[n],a.hasOwnProperty(n)&&(u!=null||m!=null))switch(n){case"value":_=u;break;case"defaultValue":f=u;break;case"multiple":i=u;default:u!==m&&be(e,t,n,u,a,m)}t=f,l=i,a=A,_!=null?la(e,!!l,_,!1):!!a!=!!l&&(t!=null?la(e,!!l,t,!0):la(e,!!l,l?[]:"",!1));return;case"textarea":A=_=null;for(f in l)if(n=l[f],l.hasOwnProperty(f)&&n!=null&&!a.hasOwnProperty(f))switch(f){case"value":break;case"children":break;default:be(e,t,f,null,a,n)}for(i in a)if(n=a[i],u=l[i],a.hasOwnProperty(i)&&(n!=null||u!=null))switch(i){case"value":_=n;break;case"defaultValue":A=n;break;case"children":break;case"dangerouslySetInnerHTML":if(n!=null)throw Error(s(91));break;default:n!==u&&be(e,t,i,n,a,u)}hs(e,_,A);return;case"option":for(var Y in l)if(_=l[Y],l.hasOwnProperty(Y)&&_!=null&&!a.hasOwnProperty(Y))switch(Y){case"selected":e.selected=!1;break;default:be(e,t,Y,null,a,_)}for(m in a)if(_=a[m],A=l[m],a.hasOwnProperty(m)&&_!==A&&(_!=null||A!=null))switch(m){case"selected":e.selected=_&&typeof _!="function"&&typeof _!="symbol";break;default:be(e,t,m,_,a,A)}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 K in l)_=l[K],l.hasOwnProperty(K)&&_!=null&&!a.hasOwnProperty(K)&&be(e,t,K,null,a,_);for(E in a)if(_=a[E],A=l[E],a.hasOwnProperty(E)&&_!==A&&(_!=null||A!=null))switch(E){case"children":case"dangerouslySetInnerHTML":if(_!=null)throw Error(s(137,t));break;default:be(e,t,E,_,a,A)}return;default:if(Si(t)){for(var ve in l)_=l[ve],l.hasOwnProperty(ve)&&_!==void 0&&!a.hasOwnProperty(ve)&&cr(e,t,ve,void 0,a,_);for(j in a)_=a[j],A=l[j],!a.hasOwnProperty(j)||_===A||_===void 0&&A===void 0||cr(e,t,j,_,a,A);return}}for(var S in l)_=l[S],l.hasOwnProperty(S)&&_!=null&&!a.hasOwnProperty(S)&&be(e,t,S,null,a,_);for(D in a)_=a[D],A=l[D],!a.hasOwnProperty(D)||_===A||_==null&&A==null||be(e,t,D,_,a,A)}function vd(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function xg(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var n=l[a],u=n.transferSize,i=n.initiatorType,f=n.duration;if(u&&f&&vd(i)){for(i=0,f=n.responseEnd,a+=1;a<l.length;a++){var m=l[a],E=m.startTime;if(E>f)break;var j=m.transferSize,D=m.initiatorType;j&&vd(D)&&(m=m.responseEnd,i+=j*(m<f?1:(f-E)/(m-E)))}if(--a,t+=8*(u+i)/(n.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 rr=null,sr=null;function qu(e){return e.nodeType===9?e:e.ownerDocument}function xd(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 Sd(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 fr(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 or=null;function Sg(){var e=window.event;return e&&e.type==="popstate"?e===or?!1:(or=e,!0):(or=null,!1)}var Td=typeof setTimeout=="function"?setTimeout:void 0,Tg=typeof clearTimeout=="function"?clearTimeout:void 0,zd=typeof Promise=="function"?Promise:void 0,zg=typeof queueMicrotask=="function"?queueMicrotask:typeof zd<"u"?function(e){return zd.resolve(null).then(e).catch(kg)}:Td;function kg(e){setTimeout(function(){throw e})}function kl(e){return e==="head"}function kd(e,t){var l=t,a=0;do{var n=l.nextSibling;if(e.removeChild(l),n&&n.nodeType===8)if(l=n.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(n),Ca(t);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Tn(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Tn(l);for(var u=l.firstChild;u;){var i=u.nextSibling,f=u.nodeName;u[qa]||f==="SCRIPT"||f==="STYLE"||f==="LINK"&&u.rel.toLowerCase()==="stylesheet"||l.removeChild(u),u=i}}else l==="body"&&Tn(e.ownerDocument.body);l=n}while(l);Ca(t)}function Ed(e,t){var l=e;e=0;do{var a=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||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function dr(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":dr(l),pi(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Eg(e,t,l,a){for(;e.nodeType===1;){var n=l;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[qa])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(u=e.getAttribute("rel"),u==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(u!==n.rel||e.getAttribute("href")!==(n.href==null||n.href===""?null:n.href)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin)||e.getAttribute("title")!==(n.title==null?null:n.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(u=e.getAttribute("src"),(u!==(n.src==null?null:n.src)||e.getAttribute("type")!==(n.type==null?null:n.type)||e.getAttribute("crossorigin")!==(n.crossOrigin==null?null:n.crossOrigin))&&u&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var u=n.name==null?null:""+n.name;if(n.type==="hidden"&&e.getAttribute("name")===u)return e}else return e;if(e=Mt(e.nextSibling),e===null)break}return null}function _g(e,t,l){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=Mt(e.nextSibling),e===null))return null;return e}function _d(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Mt(e.nextSibling),e===null))return null;return e}function hr(e){return e.data==="$?"||e.data==="$~"}function gr(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Ag(e,t){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||l.readyState!=="loading")t();else{var a=function(){t(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Mt(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 mr=null;function Ad(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(t===0)return Mt(e.nextSibling);t--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||t++}e=e.nextSibling}return null}function Md(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 jd(e,t,l){switch(t=qu(l),e){case"html":if(e=t.documentElement,!e)throw Error(s(452));return e;case"head":if(e=t.head,!e)throw Error(s(453));return e;case"body":if(e=t.body,!e)throw Error(s(454));return e;default:throw Error(s(451))}}function Tn(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);pi(e)}var jt=new Map,Nd=new Set;function Lu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ll=H.d;H.d={f:Mg,r:jg,D:Ng,C:Og,L:Dg,m:Rg,X:wg,S:Cg,M:Ug};function Mg(){var e=ll.f(),t=Ou();return e||t}function jg(e){var t=Pl(e);t!==null&&t.tag===5&&t.type==="form"?Vf(t):ll.r(e)}var Oa=typeof document>"u"?null:document;function Od(e,t,l){var a=Oa;if(a&&typeof t=="string"&&t){var n=St(t);n='link[rel="'+e+'"][href="'+n+'"]',typeof l=="string"&&(n+='[crossorigin="'+l+'"]'),Nd.has(n)||(Nd.add(n),e={rel:e,crossOrigin:l,href:t},a.querySelector(n)===null&&(t=a.createElement("link"),Je(t,"link",e),Ge(t),a.head.appendChild(t)))}}function Ng(e){ll.D(e),Od("dns-prefetch",e,null)}function Og(e,t){ll.C(e,t),Od("preconnect",e,t)}function Dg(e,t,l){ll.L(e,t,l);var a=Oa;if(a&&e&&t){var n='link[rel="preload"][as="'+St(t)+'"]';t==="image"&&l&&l.imageSrcSet?(n+='[imagesrcset="'+St(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(n+='[imagesizes="'+St(l.imageSizes)+'"]')):n+='[href="'+St(e)+'"]';var u=n;switch(t){case"style":u=Da(e);break;case"script":u=Ra(e)}jt.has(u)||(e=C({rel:"preload",href:t==="image"&&l&&l.imageSrcSet?void 0:e,as:t},l),jt.set(u,e),a.querySelector(n)!==null||t==="style"&&a.querySelector(zn(u))||t==="script"&&a.querySelector(kn(u))||(t=a.createElement("link"),Je(t,"link",e),Ge(t),a.head.appendChild(t)))}}function Rg(e,t){ll.m(e,t);var l=Oa;if(l&&e){var a=t&&typeof t.as=="string"?t.as:"script",n='link[rel="modulepreload"][as="'+St(a)+'"][href="'+St(e)+'"]',u=n;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":u=Ra(e)}if(!jt.has(u)&&(e=C({rel:"modulepreload",href:e},t),jt.set(u,e),l.querySelector(n)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(kn(u)))return}a=l.createElement("link"),Je(a,"link",e),Ge(a),l.head.appendChild(a)}}}function Cg(e,t,l){ll.S(e,t,l);var a=Oa;if(a&&e){var n=ea(a).hoistableStyles,u=Da(e);t=t||"default";var i=n.get(u);if(!i){var f={loading:0,preload:null};if(i=a.querySelector(zn(u)))f.loading=5;else{e=C({rel:"stylesheet",href:e,"data-precedence":t},l),(l=jt.get(u))&&yr(e,l);var m=i=a.createElement("link");Ge(m),Je(m,"link",e),m._p=new Promise(function(E,j){m.onload=E,m.onerror=j}),m.addEventListener("load",function(){f.loading|=1}),m.addEventListener("error",function(){f.loading|=2}),f.loading|=4,Yu(i,t,a)}i={type:"stylesheet",instance:i,count:1,state:f},n.set(u,i)}}}function wg(e,t){ll.X(e,t);var l=Oa;if(l&&e){var a=ea(l).hoistableScripts,n=Ra(e),u=a.get(n);u||(u=l.querySelector(kn(n)),u||(e=C({src:e,async:!0},t),(t=jt.get(n))&&pr(e,t),u=l.createElement("script"),Ge(u),Je(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Ug(e,t){ll.M(e,t);var l=Oa;if(l&&e){var a=ea(l).hoistableScripts,n=Ra(e),u=a.get(n);u||(u=l.querySelector(kn(n)),u||(e=C({src:e,async:!0,type:"module"},t),(t=jt.get(n))&&pr(e,t),u=l.createElement("script"),Ge(u),Je(u,"link",e),l.head.appendChild(u)),u={type:"script",instance:u,count:1,state:null},a.set(n,u))}}function Dd(e,t,l,a){var n=(n=F.current)?Lu(n):null;if(!n)throw Error(s(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(t=Da(l.href),l=ea(n).hoistableStyles,a=l.get(t),a||(a={type:"style",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Da(l.href);var u=ea(n).hoistableStyles,i=u.get(e);if(i||(n=n.ownerDocument||n,i={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},u.set(e,i),(u=n.querySelector(zn(e)))&&!u._p&&(i.instance=u,i.state.loading=5),jt.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},jt.set(e,l),u||Hg(n,e,l,i.state))),t&&a===null)throw Error(s(528,""));return i}if(t&&a!==null)throw Error(s(529,""));return null;case"script":return t=l.async,l=l.src,typeof l=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Ra(l),l=ea(n).hoistableScripts,a=l.get(t),a||(a={type:"script",instance:null,count:0,state:null},l.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(s(444,e))}}function Da(e){return'href="'+St(e)+'"'}function zn(e){return'link[rel="stylesheet"]['+e+"]"}function Rd(e){return C({},e,{"data-precedence":e.precedence,precedence:null})}function Hg(e,t,l,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Je(t,"link",l),Ge(t),e.head.appendChild(t))}function Ra(e){return'[src="'+St(e)+'"]'}function kn(e){return"script[async]"+e}function Cd(e,t,l){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+St(l.href)+'"]');if(a)return t.instance=a,Ge(a),a;var n=C({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Ge(a),Je(a,"style",n),Yu(a,l.precedence,e),t.instance=a;case"stylesheet":n=Da(l.href);var u=e.querySelector(zn(n));if(u)return t.state.loading|=4,t.instance=u,Ge(u),u;a=Rd(l),(n=jt.get(n))&&yr(a,n),u=(e.ownerDocument||e).createElement("link"),Ge(u);var i=u;return i._p=new Promise(function(f,m){i.onload=f,i.onerror=m}),Je(u,"link",a),t.state.loading|=4,Yu(u,l.precedence,e),t.instance=u;case"script":return u=Ra(l.src),(n=e.querySelector(kn(u)))?(t.instance=n,Ge(n),n):(a=l,(n=jt.get(u))&&(a=C({},l),pr(a,n)),e=e.ownerDocument||e,n=e.createElement("script"),Ge(n),Je(n,"link",a),e.head.appendChild(n),t.instance=n);case"void":return null;default:throw Error(s(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,Yu(a,l.precedence,e));return t.instance}function Yu(e,t,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),n=a.length?a[a.length-1]:null,u=n,i=0;i<a.length;i++){var f=a[i];if(f.dataset.precedence===t)u=f;else if(u!==n)break}u?u.parentNode.insertBefore(e,u.nextSibling):(t=l.nodeType===9?l.head:l,t.insertBefore(e,t.firstChild))}function yr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function pr(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var Gu=null;function wd(e,t,l){if(Gu===null){var a=new Map,n=Gu=new Map;n.set(l,a)}else n=Gu,a=n.get(l),a||(a=new Map,n.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),n=0;n<l.length;n++){var u=l[n];if(!(u[qa]||u[Xe]||e==="link"&&u.getAttribute("rel")==="stylesheet")&&u.namespaceURI!=="http://www.w3.org/2000/svg"){var i=u.getAttribute(t)||"";i=e+i;var f=a.get(i);f?f.push(u):a.set(i,[u])}}return a}function Ud(e,t,l){e=e.ownerDocument||e,e.head.insertBefore(l,t==="title"?e.querySelector("head > title"):null)}function Bg(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Hd(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function qg(e,t,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var n=Da(a.href),u=t.querySelector(zn(n));if(u){t=u._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Qu.bind(e),t.then(e,e)),l.state.loading|=4,l.instance=u,Ge(u);return}u=t.ownerDocument||t,a=Rd(a),(n=jt.get(n))&&yr(a,n),u=u.createElement("link"),Ge(u);var i=u;i._p=new Promise(function(f,m){i.onload=f,i.onerror=m}),Je(u,"link",a),l.instance=u}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,t),(t=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=Qu.bind(e),t.addEventListener("load",l),t.addEventListener("error",l))}}var br=0;function Lg(e,t){return e.stylesheets&&e.count===0&&Zu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&Zu(e,e.stylesheets),e.unsuspend){var u=e.unsuspend;e.unsuspend=null,u()}},6e4+t);0<e.imgBytes&&br===0&&(br=62500*xg());var n=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Zu(e,e.stylesheets),e.unsuspend)){var u=e.unsuspend;e.unsuspend=null,u()}},(e.imgBytes>br?50:800)+t);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(n)}}:null}function Qu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Zu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xu=null;function Zu(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xu=new Map,t.forEach(Yg,e),Xu=null,Qu.call(e))}function Yg(e,t){if(!(t.state.loading&4)){var l=Xu.get(e);if(l)var a=l.get(null);else{l=new Map,Xu.set(e,l);for(var n=e.querySelectorAll("link[data-precedence],style[data-precedence]"),u=0;u<n.length;u++){var i=n[u];(i.nodeName==="LINK"||i.getAttribute("media")!=="not all")&&(l.set(i.dataset.precedence,i),a=i)}a&&l.set(null,a)}n=t.instance,i=n.getAttribute("data-precedence"),u=l.get(i)||a,u===a&&l.set(null,n),l.set(i,n),this.count++,a=Qu.bind(this),n.addEventListener("load",a),n.addEventListener("error",a),u?u.parentNode.insertBefore(n,u.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(n,e.firstChild)),t.state.loading|=4}}var En={$$typeof:le,Provider:null,Consumer:null,_currentValue:w,_currentValue2:w,_threadCount:0};function Gg(e,t,l,a,n,u,i,f,m){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=hi(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=hi(0),this.hiddenUpdates=hi(null),this.identifierPrefix=a,this.onUncaughtError=n,this.onCaughtError=u,this.onRecoverableError=i,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=m,this.incompleteTransitions=new Map}function Bd(e,t,l,a,n,u,i,f,m,E,j,D){return e=new Gg(e,t,l,i,m,E,j,D,f),t=1,u===!0&&(t|=24),u=ot(3,null,null,t),e.current=u,u.stateNode=e,t=Fi(),t.refCount++,e.pooledCache=t,t.refCount++,u.memoizedState={element:a,isDehydrated:l,cache:t},tc(u),e}function qd(e){return e?(e=fa,e):fa}function Ld(e,t,l,a,n,u){n=qd(n),a.context===null?a.context=n:a.pendingContext=n,a=hl(t),a.payload={element:l},u=u===void 0?null:u,u!==null&&(a.callback=u),l=gl(e,a,t),l!==null&&(ut(l,e,t),ln(l,e,t))}function Yd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<t?l:t}}function vr(e,t){Yd(e,t),(e=e.alternate)&&Yd(e,t)}function Gd(e){if(e.tag===13||e.tag===31){var t=Ul(e,67108864);t!==null&&ut(t,e,67108864),vr(e,67108864)}}function Qd(e){if(e.tag===13||e.tag===31){var t=yt();t=gi(t);var l=Ul(e,t);l!==null&&ut(l,e,t),vr(e,t)}}var Vu=!0;function Qg(e,t,l,a){var n=N.T;N.T=null;var u=H.p;try{H.p=2,xr(e,t,l,a)}finally{H.p=u,N.T=n}}function Xg(e,t,l,a){var n=N.T;N.T=null;var u=H.p;try{H.p=8,xr(e,t,l,a)}finally{H.p=u,N.T=n}}function xr(e,t,l,a){if(Vu){var n=Sr(a);if(n===null)ir(e,t,a,Ku,l),Zd(e,a);else if(Vg(n,e,t,l,a))a.stopPropagation();else if(Zd(e,a),t&4&&-1<Zg.indexOf(e)){for(;n!==null;){var u=Pl(n);if(u!==null)switch(u.tag){case 3:if(u=u.stateNode,u.current.memoizedState.isDehydrated){var i=Ol(u.pendingLanes);if(i!==0){var f=u;for(f.pendingLanes|=2,f.entangledLanes|=2;i;){var m=1<<31-st(i);f.entanglements[1]|=m,i&=~m}Ht(u),(oe&6)===0&&(ju=ct()+500,vn(0))}}break;case 31:case 13:f=Ul(u,2),f!==null&&ut(f,u,2),Ou(),vr(u,2)}if(u=Sr(a),u===null&&ir(e,t,a,Ku,l),u===n)break;n=u}n!==null&&a.stopPropagation()}else ir(e,t,a,null,l)}}function Sr(e){return e=zi(e),Tr(e)}var Ku=null;function Tr(e){if(Ku=null,e=Il(e),e!==null){var t=g(e);if(t===null)e=null;else{var l=t.tag;if(l===13){if(e=T(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 Ku=e,null}function Xd(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(Nh()){case Wr:return 2;case Fr:return 8;case Un:case Oh:return 32;case Ir:return 268435456;default:return 32}default:return 32}}var zr=!1,El=null,_l=null,Al=null,_n=new Map,An=new Map,Ml=[],Zg="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 Zd(e,t){switch(e){case"focusin":case"focusout":El=null;break;case"dragenter":case"dragleave":_l=null;break;case"mouseover":case"mouseout":Al=null;break;case"pointerover":case"pointerout":_n.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":An.delete(t.pointerId)}}function Mn(e,t,l,a,n,u){return e===null||e.nativeEvent!==u?(e={blockedOn:t,domEventName:l,eventSystemFlags:a,nativeEvent:u,targetContainers:[n]},t!==null&&(t=Pl(t),t!==null&&Gd(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function Vg(e,t,l,a,n){switch(t){case"focusin":return El=Mn(El,e,t,l,a,n),!0;case"dragenter":return _l=Mn(_l,e,t,l,a,n),!0;case"mouseover":return Al=Mn(Al,e,t,l,a,n),!0;case"pointerover":var u=n.pointerId;return _n.set(u,Mn(_n.get(u)||null,e,t,l,a,n)),!0;case"gotpointercapture":return u=n.pointerId,An.set(u,Mn(An.get(u)||null,e,t,l,a,n)),!0}return!1}function Vd(e){var t=Il(e.target);if(t!==null){var l=g(t);if(l!==null){if(t=l.tag,t===13){if(t=T(l),t!==null){e.blockedOn=t,ns(e.priority,function(){Qd(l)});return}}else if(t===31){if(t=y(l),t!==null){e.blockedOn=t,ns(e.priority,function(){Qd(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 Ju(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var l=Sr(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Ti=a,l.target.dispatchEvent(a),Ti=null}else return t=Pl(l),t!==null&&Gd(t),e.blockedOn=l,!1;t.shift()}return!0}function Kd(e,t,l){Ju(e)&&l.delete(t)}function Kg(){zr=!1,El!==null&&Ju(El)&&(El=null),_l!==null&&Ju(_l)&&(_l=null),Al!==null&&Ju(Al)&&(Al=null),_n.forEach(Kd),An.forEach(Kd)}function $u(e,t){e.blockedOn===t&&(e.blockedOn=null,zr||(zr=!0,r.unstable_scheduleCallback(r.unstable_NormalPriority,Kg)))}var Wu=null;function Jd(e){Wu!==e&&(Wu=e,r.unstable_scheduleCallback(r.unstable_NormalPriority,function(){Wu===e&&(Wu=null);for(var t=0;t<e.length;t+=3){var l=e[t],a=e[t+1],n=e[t+2];if(typeof a!="function"){if(Tr(a||l)===null)continue;break}var u=Pl(l);u!==null&&(e.splice(t,3),t-=3,Sc(u,{pending:!0,data:n,method:l.method,action:a},a,n))}}))}function Ca(e){function t(m){return $u(m,e)}El!==null&&$u(El,e),_l!==null&&$u(_l,e),Al!==null&&$u(Al,e),_n.forEach(t),An.forEach(t);for(var l=0;l<Ml.length;l++){var a=Ml[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Ml.length&&(l=Ml[0],l.blockedOn===null);)Vd(l),l.blockedOn===null&&Ml.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var n=l[a],u=l[a+1],i=n[Pe]||null;if(typeof u=="function")i||Jd(l);else if(i){var f=null;if(u&&u.hasAttribute("formAction")){if(n=u,i=u[Pe]||null)f=i.formAction;else if(Tr(n)!==null)continue}else f=i.action;typeof f=="function"?l[a+1]=f:(l.splice(a,3),a-=3),Jd(l)}}}function $d(){function e(u){u.canIntercept&&u.info==="react-transition"&&u.intercept({handler:function(){return new Promise(function(i){return n=i})},focusReset:"manual",scroll:"manual"})}function t(){n!==null&&(n(),n=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var u=navigation.currentEntry;u&&u.url!=null&&navigation.navigate(u.url,{state:u.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,n=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),n!==null&&(n(),n=null)}}}function kr(e){this._internalRoot=e}Fu.prototype.render=kr.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(s(409));var l=t.current,a=yt();Ld(l,a,e,t,null,null)},Fu.prototype.unmount=kr.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ld(e.current,2,null,e,null,null),Ou(),t[Fl]=null}};function Fu(e){this._internalRoot=e}Fu.prototype.unstable_scheduleHydration=function(e){if(e){var t=as();e={blockedOn:null,target:e,priority:t};for(var l=0;l<Ml.length&&t!==0&&t<Ml[l].priority;l++);Ml.splice(l,0,e),l===0&&Vd(e)}};var Wd=c.version;if(Wd!=="19.2.4")throw Error(s(527,Wd,"19.2.4"));H.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(s(188)):(e=Object.keys(e).join(","),Error(s(268,e)));return e=d(t),e=e!==null?z(e):null,e=e===null?null:e.stateNode,e};var Jg={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:N,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Iu.isDisabled&&Iu.supportsFiber)try{Ua=Iu.inject(Jg),rt=Iu}catch{}}return Nn.createRoot=function(e,t){if(!h(e))throw Error(s(299));var l=!1,a="",n=lo,u=ao,i=no;return t!=null&&(t.unstable_strictMode===!0&&(l=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(n=t.onUncaughtError),t.onCaughtError!==void 0&&(u=t.onCaughtError),t.onRecoverableError!==void 0&&(i=t.onRecoverableError)),t=Bd(e,1,!1,null,null,l,a,null,n,u,i,$d),e[Fl]=t.current,ur(e),new kr(t)},Nn.hydrateRoot=function(e,t,l){if(!h(e))throw Error(s(299));var a=!1,n="",u=lo,i=ao,f=no,m=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(n=l.identifierPrefix),l.onUncaughtError!==void 0&&(u=l.onUncaughtError),l.onCaughtError!==void 0&&(i=l.onCaughtError),l.onRecoverableError!==void 0&&(f=l.onRecoverableError),l.formState!==void 0&&(m=l.formState)),t=Bd(e,1,!0,t,l??null,a,n,m,u,i,f,$d),t.context=qd(null),l=t.current,a=yt(),a=gi(a),n=hl(a),n.callback=null,gl(l,n,a),l=a,t.current.lanes=l,Ba(t,l),Ht(t),e[Fl]=t.current,ur(e),new Fu(t)},Nn.version="19.2.4",Nn}var ih;function cm(){if(ih)return Ar.exports;ih=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(),Ar.exports=im(),Ar.exports}var rm=cm();const sm="modulepreload",fm=function(r){return"/"+r},ch={},om=function(c,o,s){let h=Promise.resolve();if(o&&o.length>0){let T=function(d){return Promise.all(d.map(z=>Promise.resolve(z).then(C=>({status:"fulfilled",value:C}),C=>({status:"rejected",reason:C}))))};document.getElementsByTagName("link");const y=document.querySelector("meta[property=csp-nonce]"),x=(y==null?void 0:y.nonce)||(y==null?void 0:y.getAttribute("nonce"));h=T(o.map(d=>{if(d=fm(d),d in ch)return;ch[d]=!0;const z=d.endsWith(".css"),C=z?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${d}"]${C}`))return;const R=document.createElement("link");if(R.rel=z?"stylesheet":sm,z||(R.as="script"),R.crossOrigin="",R.href=d,x&&R.setAttribute("nonce",x),document.head.appendChild(R),z)return new Promise((L,Q)=>{R.addEventListener("load",L),R.addEventListener("error",()=>Q(new Error(`Unable to preload CSS for ${d}`)))})}))}function g(T){const y=new Event("vite:preloadError",{cancelable:!0});if(y.payload=T,window.dispatchEvent(y),!y.defaultPrevented)throw T}return h.then(T=>{for(const y of T||[])y.status==="rejected"&&g(y.reason);return c().catch(g)})},Or="smartbot_sessionId";function dm({onMessage:r,enabled:c=!0}){const[o,s]=q.useState("disconnected"),[h,g]=q.useState(()=>localStorage.getItem(Or)),T=q.useRef(null),y=q.useRef(0),x=q.useRef(void 0),d=q.useRef(void 0),z=q.useRef(r);z.current=r;const C=10,R=1e3,L=3e4,Q=q.useCallback(()=>`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`,[]),J=q.useCallback(()=>{var te;if(((te=T.current)==null?void 0:te.readyState)!==WebSocket.OPEN){s("connecting");try{const le=new WebSocket(Q());T.current=le,le.onopen=()=>{y.current=0,s("connected"),z.current({type:"system",content:"Connected to Scallopbot"})},le.onmessage=ke=>{try{const Ne=JSON.parse(ke.data);Ne.type==="response"&&Ne.sessionId!==void 0&&(Ne.sessionId?(localStorage.setItem(Or,Ne.sessionId),g(Ne.sessionId)):(localStorage.removeItem(Or),g(null))),z.current(Ne)}catch{console.error("Failed to parse message")}},le.onclose=()=>{if(T.current=null,s("disconnected"),y.current<C){const ke=Math.min(R*Math.pow(2,y.current),3e4);y.current++,z.current({type:"system",content:`Reconnecting in ${Math.round(ke/1e3)}s...`}),x.current=setTimeout(J,ke)}else z.current({type:"error",error:"Connection lost. Please refresh the page."})},le.onerror=ke=>{console.error("WebSocket error:",ke)}}catch{s("disconnected")}}},[Q]),Ae=q.useCallback(te=>{var le;return((le=T.current)==null?void 0:le.readyState)===WebSocket.OPEN?(T.current.send(JSON.stringify({type:"chat",message:te})),!0):!1},[]),X=q.useCallback(()=>{var te;((te=T.current)==null?void 0:te.readyState)===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"stop"}))},[]);return q.useEffect(()=>{var te;if(!c){clearTimeout(x.current),clearInterval(d.current),(te=T.current)==null||te.close();return}return J(),d.current=setInterval(()=>{var le;((le=T.current)==null?void 0:le.readyState)===WebSocket.OPEN&&T.current.send(JSON.stringify({type:"ping"}))},L),()=>{var le;clearTimeout(x.current),clearInterval(d.current),(le=T.current)==null||le.close()}},[J,c]),{status:o,sendMessage:Ae,sendStop:X,sessionId:h}}const hm=3e4;function gm(){const[r,c]=q.useState(null),o=q.useCallback(async()=>{try{const h=await(await fetch("/api/costs")).json();h.enabled?c(h):c(null)}catch{console.error("Failed to fetch costs")}},[]);return q.useEffect(()=>{o();const s=setInterval(o,hm);return()=>clearInterval(s)},[o]),{costs:r,refetch:o}}function mm(){const[r,c]=q.useState("loading"),[o,s]=q.useState(null),h=q.useCallback(async()=>{try{const x=await fetch("/api/auth/status",{credentials:"same-origin"});if(!x.ok){c("authenticated");return}const d=await x.json();d.setupComplete?d.authenticated?c("authenticated"):c("needs-login"):c("needs-setup")}catch{c("authenticated")}},[]);q.useEffect(()=>{h()},[h]);const g=q.useCallback(async(x,d)=>{s(null);try{const z=await fetch("/api/auth/setup",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({email:x,password:d})}),C=await z.json();if(!z.ok){s(C.error||"Setup failed");return}c("authenticated")}catch{s("Network error")}},[]),T=q.useCallback(async(x,d)=>{s(null);try{const z=await fetch("/api/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},credentials:"same-origin",body:JSON.stringify({email:x,password:d})}),C=await z.json();if(!z.ok){const R=C.retryAfterSec?`Too many attempts. Try again in ${C.retryAfterSec}s.`:C.error||"Login failed";s(R);return}c("authenticated")}catch{s("Network error")}},[]),y=q.useCallback(async()=>{try{await fetch("/api/auth/logout",{method:"POST",credentials:"same-origin"})}catch{}c("needs-login")},[]);return{authState:r,error:o,setup:g,login:T,logout:y}}const ym={connected:"bg-green-500",connecting:"bg-yellow-400",disconnected:"bg-gray-400"};function pm({status:r,currentView:c,onViewChange:o,darkMode:s,onDarkModeToggle:h,debugMode:g,onDebugToggle:T,costsAvailable:y,hasSpend:x,onLogout:d}){return p.jsxs("aside",{className:"flex flex-col items-center w-16 shrink-0 border-r border-gray-200 dark:border-neutral-800 bg-gray-50 dark:bg-black py-3 gap-1",children:[p.jsxs("div",{className:"relative mb-3",children:[p.jsx("div",{className:"w-10 h-10 rounded-full bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 flex items-center justify-center text-gray-800 dark:text-gray-200",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 32 32",children:p.jsxs("g",{transform:"translate(4 3)",children:[p.jsx("line",{x1:"12",y1:"22",x2:"2",y2:"14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"7",y2:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"12",y2:"5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"17",y2:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"20",y2:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"22",y2:"14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})}),p.jsx("span",{className:`absolute -bottom-0.5 -right-0.5 w-3 h-3 rounded-full border-2 border-gray-50 dark:border-black ${ym[r]}`,title:r})]}),p.jsx(Dr,{active:c==="chat",onClick:()=>o("chat"),title:"Chat",children:p.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})})}),p.jsx(Dr,{active:c==="memory-map",onClick:()=>o("memory-map"),title:"Memory",children:p.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"3"}),p.jsx("path",{d:"M12 2v4m0 12v4m10-10h-4M6 12H2m15.07-7.07-2.83 2.83M9.76 14.24l-2.83 2.83m0-10.14 2.83 2.83m4.48 4.48 2.83 2.83"})]})}),y&&p.jsx(Dr,{active:c==="costs",onClick:()=>o("costs"),title:"Costs",badge:x&&c!=="costs",children:p.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"10"}),p.jsx("path",{d:"M12 6v6l4 2"})]})}),p.jsx("div",{className:"flex-1"}),p.jsx("button",{onClick:()=>T(!g),className:`w-10 h-10 flex items-center justify-center rounded-xl transition-colors ${g?"bg-gray-200 dark:bg-neutral-700 text-gray-900 dark:text-gray-100":"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-neutral-800"}`,title:g?"Debug on":"Debug off",children:p.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M12 12h.01M8 12h.01M16 12h.01M21 12c0 4.97-4.03 9-9 9s-9-4.03-9-9 4.03-9 9-9 9 4.03 9 9z"})})}),d&&p.jsx("button",{onClick:d,className:"w-10 h-10 flex items-center justify-center rounded-xl text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-neutral-800 transition-colors",title:"Sign out",children:p.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),p.jsx("polyline",{points:"16 17 21 12 16 7"}),p.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]})}),p.jsx("button",{onClick:h,className:"w-10 h-10 flex items-center justify-center rounded-xl text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-neutral-800 transition-colors",title:s?"Light mode":"Dark mode",children:s?p.jsxs("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"5"}),p.jsx("path",{d:"M12 1v2m0 18v2m-9-11h2m18 0h2m-4.22-6.78 1.42-1.42M4.22 19.78l1.42-1.42M4.22 4.22 5.64 5.64m12.72 12.72 1.42 1.42"})]}):p.jsx("svg",{viewBox:"0 0 24 24",width:"18",height:"18",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})})})]})}function Dr({active:r,onClick:c,title:o,children:s,badge:h}){return p.jsxs("button",{onClick:c,className:`relative w-10 h-10 flex flex-col items-center justify-center rounded-xl transition-colors ${r?"bg-gray-200 dark:bg-neutral-700 text-gray-900 dark:text-gray-100":"text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 hover:bg-gray-100 dark:hover:bg-neutral-800"}`,title:o,children:[s,p.jsx("span",{className:"text-[9px] font-medium mt-0.5 leading-none",children:o}),h&&p.jsx("span",{className:"absolute top-1 right-1 w-2 h-2 bg-blue-500 rounded-full"})]})}function bm(r){return"$"+r.toFixed(4)}function vm({dailyHistory:r}){const c=r.slice(-14);if(c.length===0)return null;const o=Math.max(...c.map(h=>h.cost)),s=new Date().toISOString().slice(0,10);return p.jsxs("div",{className:"mt-2.5",children:[p.jsxs("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-1.5",children:["Daily Spend (last ",c.length,"d)"]}),p.jsx("div",{className:"flex items-end gap-[3px] h-16",children:c.map(h=>{const g=o>0?h.cost/o*100:0,T=h.date===s;return p.jsx("div",{className:"flex-1 flex flex-col items-center justify-end h-full",children:p.jsx("div",{className:`w-full rounded-sm transition-all duration-300 ${T?"bg-gray-100 dark:bg-gray-200":"bg-gray-400 dark:bg-gray-600"}`,style:{height:`${Math.max(g,2)}%`},title:`${h.date}: ${bm(h.cost)} (${h.requests} req)`})},h.date)})}),p.jsx("div",{className:"flex gap-[3px] mt-0.5",children:c.map(h=>p.jsx("div",{className:"flex-1 text-center text-[8px] text-gray-400 dark:text-gray-500 truncate",children:h.date.slice(5)},h.date))})]})}function Rr(r){return"$"+r.toFixed(4)}function rh({spent:r,budget:c,exceeded:o,warning:s}){if(c==null)return null;const h=Math.min(r/c*100,100),g=o?"bg-red-400":s?"bg-yellow-400":"bg-blue-500";return p.jsx("div",{className:"h-1.5 bg-gray-100 dark:bg-gray-700 rounded-full mt-2 overflow-hidden",children:p.jsx("div",{className:`h-full rounded-full transition-all duration-300 ${g}`,style:{width:`${h}%`}})})}function xm({costs:r}){var c;return p.jsx("div",{className:"flex-1 overflow-y-auto px-[10%] py-6 bg-gray-50 dark:bg-gray-950 max-md:px-4",children:p.jsxs("div",{className:"max-w-3xl mx-auto",children:[p.jsx("h1",{className:"text-lg font-semibold text-gray-900 dark:text-gray-100 mb-4",children:"Cost Dashboard"}),p.jsxs("div",{className:"flex gap-3",children:[p.jsxs("div",{className:"flex-1 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:[p.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 uppercase tracking-wide",children:"Today"}),p.jsx("div",{className:"text-2xl font-semibold text-gray-900 dark:text-gray-100 mt-1",children:Rr(r.daily.spent)}),p.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 mt-0.5",children:r.daily.budget!=null?`of $${r.daily.budget.toFixed(2)} budget`:"no budget set"}),p.jsx(rh,{spent:r.daily.spent,budget:r.daily.budget,exceeded:r.daily.exceeded,warning:r.daily.warning})]}),p.jsxs("div",{className:"flex-1 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:[p.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 uppercase tracking-wide",children:"This Month"}),p.jsx("div",{className:"text-2xl font-semibold text-gray-900 dark:text-gray-100 mt-1",children:Rr(r.monthly.spent)}),p.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 mt-0.5",children:r.monthly.budget!=null?`of $${r.monthly.budget.toFixed(2)} budget`:"no budget set"}),p.jsx(rh,{spent:r.monthly.spent,budget:r.monthly.budget,exceeded:r.monthly.exceeded,warning:r.monthly.warning})]}),p.jsxs("div",{className:"flex-1 border border-gray-200 dark:border-gray-700 rounded-lg p-3",children:[p.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 uppercase tracking-wide",children:"Requests"}),p.jsx("div",{className:"text-2xl font-semibold text-gray-900 dark:text-gray-100 mt-1",children:r.totalRequests}),p.jsx("div",{className:"text-[11px] text-gray-500 dark:text-gray-400 mt-0.5",children:"total"})]})]}),r.topModels.length>0&&p.jsxs("div",{className:"mt-4",children:[p.jsx("div",{className:"text-xs text-gray-500 dark:text-gray-400 uppercase tracking-wide mb-2",children:"Models"}),p.jsx("div",{className:"flex flex-wrap gap-1.5",children:r.topModels.map(o=>p.jsxs("div",{className:"inline-flex items-center gap-1.5 border border-gray-200 dark:border-gray-700 rounded-md px-2 py-1 text-[11px]",children:[p.jsx("span",{className:"text-gray-500 dark:text-gray-400 font-mono",children:o.model}),p.jsx("span",{className:"text-blue-500 font-medium",children:Rr(o.cost)}),p.jsxs("span",{className:"text-gray-400 dark:text-gray-500 text-[10px]",children:["(",o.percentage,"%)"]})]},o.model))})]}),((c=r.dailyHistory)==null?void 0:c.length)>0&&p.jsx("div",{className:"mt-4",children:p.jsx(vm,{dailyHistory:r.dailyHistory})})]})})}function qr(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Wl=qr();function yh(r){Wl=r}var Rn={exec:()=>null};function ge(r,c=""){let o=typeof r=="string"?r:r.source;const s={replace:(h,g)=>{let T=typeof g=="string"?g:g.source;return T=T.replace(Ie.caret,"$1"),o=o.replace(h,T),s},getRegex:()=>new RegExp(o,c)};return s}var Ie={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[	 ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ 	][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},Sm=/^(?:[ \t]*(?:\n|$))+/,Tm=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,zm=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,Cn=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,km=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Lr=/(?:[*+-]|\d{1,9}[.)])/,ph=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,bh=ge(ph).replace(/bull/g,Lr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Em=ge(ph).replace(/bull/g,Lr).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Yr=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,_m=/^[^\n]+/,Gr=/(?!\s*\])(?:\\.|[^\[\]\\])+/,Am=ge(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Gr).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Mm=ge(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Lr).getRegex(),ui="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",Qr=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,jm=ge("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ 	]*)+\\n|$))","i").replace("comment",Qr).replace("tag",ui).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),vh=ge(Yr).replace("hr",Cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ui).getRegex(),Nm=ge(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",vh).getRegex(),Xr={blockquote:Nm,code:Tm,def:Am,fences:zm,heading:km,hr:Cn,html:jm,lheading:bh,list:Mm,newline:Sm,paragraph:vh,table:Rn,text:_m},sh=ge("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",Cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}	)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ui).getRegex(),Om={...Xr,lheading:Em,table:sh,paragraph:ge(Yr).replace("hr",Cn).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",sh).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ui).getRegex()},Dm={...Xr,html:ge(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",Qr).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Rn,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:ge(Yr).replace("hr",Cn).replace("heading",` *#{1,6} *[^
]`).replace("lheading",bh).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Rm=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Cm=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,xh=/^( {2,}|\\)\n(?!\s*$)/,wm=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ii=/[\p{P}\p{S}]/u,Zr=/[\s\p{P}\p{S}]/u,Sh=/[^\s\p{P}\p{S}]/u,Um=ge(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,Zr).getRegex(),Th=/(?!~)[\p{P}\p{S}]/u,Hm=/(?!~)[\s\p{P}\p{S}]/u,Bm=/(?:[^\s\p{P}\p{S}]|~)/u,qm=/\[[^[\]]*?\]\((?:\\.|[^\\\(\)]|\((?:\\.|[^\\\(\)])*\))*\)|`[^`]*?`|<[^<>]*?>/g,zh=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Lm=ge(zh,"u").replace(/punct/g,ii).getRegex(),Ym=ge(zh,"u").replace(/punct/g,Th).getRegex(),kh="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Gm=ge(kh,"gu").replace(/notPunctSpace/g,Sh).replace(/punctSpace/g,Zr).replace(/punct/g,ii).getRegex(),Qm=ge(kh,"gu").replace(/notPunctSpace/g,Bm).replace(/punctSpace/g,Hm).replace(/punct/g,Th).getRegex(),Xm=ge("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,Sh).replace(/punctSpace/g,Zr).replace(/punct/g,ii).getRegex(),Zm=ge(/\\(punct)/,"gu").replace(/punct/g,ii).getRegex(),Vm=ge(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Km=ge(Qr).replace("(?:-->|$)","-->").getRegex(),Jm=ge("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Km).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),li=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$m=ge(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",li).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),Eh=ge(/^!?\[(label)\]\[(ref)\]/).replace("label",li).replace("ref",Gr).getRegex(),_h=ge(/^!?\[(ref)\](?:\[\])?/).replace("ref",Gr).getRegex(),Wm=ge("reflink|nolink(?!\\()","g").replace("reflink",Eh).replace("nolink",_h).getRegex(),Vr={_backpedal:Rn,anyPunctuation:Zm,autolink:Vm,blockSkip:qm,br:xh,code:Cm,del:Rn,emStrongLDelim:Lm,emStrongRDelimAst:Gm,emStrongRDelimUnd:Xm,escape:Rm,link:$m,nolink:_h,punctuation:Um,reflink:Eh,reflinkSearch:Wm,tag:Jm,text:wm,url:Rn},Fm={...Vr,link:ge(/^!?\[(label)\]\((.*?)\)/).replace("label",li).getRegex(),reflink:ge(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",li).getRegex()},wr={...Vr,emStrongRDelimAst:Qm,emStrongLDelim:Ym,url:ge(/^((?:ftp|https?):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/,"i").replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\.|[^\\])*?(?:\\.|[^\s~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|https?:\/\/|ftp:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/},Im={...wr,br:ge(xh).replace("{2,}","*").getRegex(),text:ge(wr.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Pu={normal:Xr,gfm:Om,pedantic:Dm},On={normal:Vr,gfm:wr,breaks:Im,pedantic:Fm},Pm={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},fh=r=>Pm[r];function Bt(r,c){if(c){if(Ie.escapeTest.test(r))return r.replace(Ie.escapeReplace,fh)}else if(Ie.escapeTestNoEncode.test(r))return r.replace(Ie.escapeReplaceNoEncode,fh);return r}function oh(r){try{r=encodeURI(r).replace(Ie.percentDecode,"%")}catch{return null}return r}function dh(r,c){var g;const o=r.replace(Ie.findPipe,(T,y,x)=>{let d=!1,z=y;for(;--z>=0&&x[z]==="\\";)d=!d;return d?"|":" |"}),s=o.split(Ie.splitPipe);let h=0;if(s[0].trim()||s.shift(),s.length>0&&!((g=s.at(-1))!=null&&g.trim())&&s.pop(),c)if(s.length>c)s.splice(c);else for(;s.length<c;)s.push("");for(;h<s.length;h++)s[h]=s[h].trim().replace(Ie.slashPipe,"|");return s}function Dn(r,c,o){const s=r.length;if(s===0)return"";let h=0;for(;h<s&&r.charAt(s-h-1)===c;)h++;return r.slice(0,s-h)}function ey(r,c){if(r.indexOf(c[1])===-1)return-1;let o=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===c[0])o++;else if(r[s]===c[1]&&(o--,o<0))return s;return o>0?-2:-1}function hh(r,c,o,s,h){const g=c.href,T=c.title||null,y=r[1].replace(h.other.outputLinkReplace,"$1");s.state.inLink=!0;const x={type:r[0].charAt(0)==="!"?"image":"link",raw:o,href:g,title:T,text:y,tokens:s.inlineTokens(y)};return s.state.inLink=!1,x}function ty(r,c,o){const s=r.match(o.other.indentCodeCompensation);if(s===null)return c;const h=s[1];return c.split(`
`).map(g=>{const T=g.match(o.other.beginningSpace);if(T===null)return g;const[y]=T;return y.length>=h.length?g.slice(h.length):g}).join(`
`)}var ai=class{constructor(r){Se(this,"options");Se(this,"rules");Se(this,"lexer");this.options=r||Wl}space(r){const c=this.rules.block.newline.exec(r);if(c&&c[0].length>0)return{type:"space",raw:c[0]}}code(r){const c=this.rules.block.code.exec(r);if(c){const o=c[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:c[0],codeBlockStyle:"indented",text:this.options.pedantic?o:Dn(o,`
`)}}}fences(r){const c=this.rules.block.fences.exec(r);if(c){const o=c[0],s=ty(o,c[3]||"",this.rules);return{type:"code",raw:o,lang:c[2]?c[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):c[2],text:s}}}heading(r){const c=this.rules.block.heading.exec(r);if(c){let o=c[2].trim();if(this.rules.other.endingHash.test(o)){const s=Dn(o,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(o=s.trim())}return{type:"heading",raw:c[0],depth:c[1].length,text:o,tokens:this.lexer.inline(o)}}}hr(r){const c=this.rules.block.hr.exec(r);if(c)return{type:"hr",raw:Dn(c[0],`
`)}}blockquote(r){const c=this.rules.block.blockquote.exec(r);if(c){let o=Dn(c[0],`
`).split(`
`),s="",h="";const g=[];for(;o.length>0;){let T=!1;const y=[];let x;for(x=0;x<o.length;x++)if(this.rules.other.blockquoteStart.test(o[x]))y.push(o[x]),T=!0;else if(!T)y.push(o[x]);else break;o=o.slice(x);const d=y.join(`
`),z=d.replace(this.rules.other.blockquoteSetextReplace,`
    $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
${d}`:d,h=h?`${h}
${z}`:z;const C=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(z,g,!0),this.lexer.state.top=C,o.length===0)break;const R=g.at(-1);if((R==null?void 0:R.type)==="code")break;if((R==null?void 0:R.type)==="blockquote"){const L=R,Q=L.raw+`
`+o.join(`
`),J=this.blockquote(Q);g[g.length-1]=J,s=s.substring(0,s.length-L.raw.length)+J.raw,h=h.substring(0,h.length-L.text.length)+J.text;break}else if((R==null?void 0:R.type)==="list"){const L=R,Q=L.raw+`
`+o.join(`
`),J=this.list(Q);g[g.length-1]=J,s=s.substring(0,s.length-R.raw.length)+J.raw,h=h.substring(0,h.length-L.raw.length)+J.raw,o=Q.substring(g.at(-1).raw.length).split(`
`);continue}}return{type:"blockquote",raw:s,tokens:g,text:h}}}list(r){let c=this.rules.block.list.exec(r);if(c){let o=c[1].trim();const s=o.length>1,h={type:"list",raw:"",ordered:s,start:s?+o.slice(0,-1):"",loose:!1,items:[]};o=s?`\\d{1,9}\\${o.slice(-1)}`:`\\${o}`,this.options.pedantic&&(o=s?o:"[*+-]");const g=this.rules.other.listItemRegex(o);let T=!1;for(;r;){let x=!1,d="",z="";if(!(c=g.exec(r))||this.rules.block.hr.test(r))break;d=c[0],r=r.substring(d.length);let C=c[2].split(`
`,1)[0].replace(this.rules.other.listReplaceTabs,X=>" ".repeat(3*X.length)),R=r.split(`
`,1)[0],L=!C.trim(),Q=0;if(this.options.pedantic?(Q=2,z=C.trimStart()):L?Q=c[1].length+1:(Q=c[2].search(this.rules.other.nonSpaceChar),Q=Q>4?1:Q,z=C.slice(Q),Q+=c[1].length),L&&this.rules.other.blankLine.test(R)&&(d+=R+`
`,r=r.substring(R.length+1),x=!0),!x){const X=this.rules.other.nextBulletRegex(Q),te=this.rules.other.hrRegex(Q),le=this.rules.other.fencesBeginRegex(Q),ke=this.rules.other.headingBeginRegex(Q),Ne=this.rules.other.htmlBeginRegex(Q);for(;r;){const Ce=r.split(`
`,1)[0];let $;if(R=Ce,this.options.pedantic?(R=R.replace(this.rules.other.listReplaceNesting,"  "),$=R):$=R.replace(this.rules.other.tabCharGlobal,"    "),le.test(R)||ke.test(R)||Ne.test(R)||X.test(R)||te.test(R))break;if($.search(this.rules.other.nonSpaceChar)>=Q||!R.trim())z+=`
`+$.slice(Q);else{if(L||C.replace(this.rules.other.tabCharGlobal,"    ").search(this.rules.other.nonSpaceChar)>=4||le.test(C)||ke.test(C)||te.test(C))break;z+=`
`+R}!L&&!R.trim()&&(L=!0),d+=Ce+`
`,r=r.substring(Ce.length+1),C=$.slice(Q)}}h.loose||(T?h.loose=!0:this.rules.other.doubleBlankLine.test(d)&&(T=!0));let J=null,Ae;this.options.gfm&&(J=this.rules.other.listIsTask.exec(z),J&&(Ae=J[0]!=="[ ] ",z=z.replace(this.rules.other.listReplaceTask,""))),h.items.push({type:"list_item",raw:d,task:!!J,checked:Ae,loose:!1,text:z,tokens:[]}),h.raw+=d}const y=h.items.at(-1);if(y)y.raw=y.raw.trimEnd(),y.text=y.text.trimEnd();else return;h.raw=h.raw.trimEnd();for(let x=0;x<h.items.length;x++)if(this.lexer.state.top=!1,h.items[x].tokens=this.lexer.blockTokens(h.items[x].text,[]),!h.loose){const d=h.items[x].tokens.filter(C=>C.type==="space"),z=d.length>0&&d.some(C=>this.rules.other.anyLine.test(C.raw));h.loose=z}if(h.loose)for(let x=0;x<h.items.length;x++)h.items[x].loose=!0;return h}}html(r){const c=this.rules.block.html.exec(r);if(c)return{type:"html",block:!0,raw:c[0],pre:c[1]==="pre"||c[1]==="script"||c[1]==="style",text:c[0]}}def(r){const c=this.rules.block.def.exec(r);if(c){const o=c[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=c[2]?c[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",h=c[3]?c[3].substring(1,c[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):c[3];return{type:"def",tag:o,raw:c[0],href:s,title:h}}}table(r){var T;const c=this.rules.block.table.exec(r);if(!c||!this.rules.other.tableDelimiter.test(c[2]))return;const o=dh(c[1]),s=c[2].replace(this.rules.other.tableAlignChars,"").split("|"),h=(T=c[3])!=null&&T.trim()?c[3].replace(this.rules.other.tableRowBlankLine,"").split(`
`):[],g={type:"table",raw:c[0],header:[],align:[],rows:[]};if(o.length===s.length){for(const y of s)this.rules.other.tableAlignRight.test(y)?g.align.push("right"):this.rules.other.tableAlignCenter.test(y)?g.align.push("center"):this.rules.other.tableAlignLeft.test(y)?g.align.push("left"):g.align.push(null);for(let y=0;y<o.length;y++)g.header.push({text:o[y],tokens:this.lexer.inline(o[y]),header:!0,align:g.align[y]});for(const y of h)g.rows.push(dh(y,g.header.length).map((x,d)=>({text:x,tokens:this.lexer.inline(x),header:!1,align:g.align[d]})));return g}}lheading(r){const c=this.rules.block.lheading.exec(r);if(c)return{type:"heading",raw:c[0],depth:c[2].charAt(0)==="="?1:2,text:c[1],tokens:this.lexer.inline(c[1])}}paragraph(r){const c=this.rules.block.paragraph.exec(r);if(c){const o=c[1].charAt(c[1].length-1)===`
`?c[1].slice(0,-1):c[1];return{type:"paragraph",raw:c[0],text:o,tokens:this.lexer.inline(o)}}}text(r){const c=this.rules.block.text.exec(r);if(c)return{type:"text",raw:c[0],text:c[0],tokens:this.lexer.inline(c[0])}}escape(r){const c=this.rules.inline.escape.exec(r);if(c)return{type:"escape",raw:c[0],text:c[1]}}tag(r){const c=this.rules.inline.tag.exec(r);if(c)return!this.lexer.state.inLink&&this.rules.other.startATag.test(c[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(c[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(c[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(c[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:c[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:c[0]}}link(r){const c=this.rules.inline.link.exec(r);if(c){const o=c[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(o)){if(!this.rules.other.endAngleBracket.test(o))return;const g=Dn(o.slice(0,-1),"\\");if((o.length-g.length)%2===0)return}else{const g=ey(c[2],"()");if(g===-2)return;if(g>-1){const y=(c[0].indexOf("!")===0?5:4)+c[1].length+g;c[2]=c[2].substring(0,g),c[0]=c[0].substring(0,y).trim(),c[3]=""}}let s=c[2],h="";if(this.options.pedantic){const g=this.rules.other.pedanticHrefTitle.exec(s);g&&(s=g[1],h=g[3])}else h=c[3]?c[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(o)?s=s.slice(1):s=s.slice(1,-1)),hh(c,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:h&&h.replace(this.rules.inline.anyPunctuation,"$1")},c[0],this.lexer,this.rules)}}reflink(r,c){let o;if((o=this.rules.inline.reflink.exec(r))||(o=this.rules.inline.nolink.exec(r))){const s=(o[2]||o[1]).replace(this.rules.other.multipleSpaceGlobal," "),h=c[s.toLowerCase()];if(!h){const g=o[0].charAt(0);return{type:"text",raw:g,text:g}}return hh(o,h,o[0],this.lexer,this.rules)}}emStrong(r,c,o=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!s||s[3]&&o.match(this.rules.other.unicodeAlphaNumeric))return;if(!(s[1]||s[2]||"")||!o||this.rules.inline.punctuation.exec(o)){const g=[...s[0]].length-1;let T,y,x=g,d=0;const z=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(z.lastIndex=0,c=c.slice(-1*r.length+g);(s=z.exec(c))!=null;){if(T=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!T)continue;if(y=[...T].length,s[3]||s[4]){x+=y;continue}else if((s[5]||s[6])&&g%3&&!((g+y)%3)){d+=y;continue}if(x-=y,x>0)continue;y=Math.min(y,y+x+d);const C=[...s[0]][0].length,R=r.slice(0,g+s.index+C+y);if(Math.min(g,y)%2){const Q=R.slice(1,-1);return{type:"em",raw:R,text:Q,tokens:this.lexer.inlineTokens(Q)}}const L=R.slice(2,-2);return{type:"strong",raw:R,text:L,tokens:this.lexer.inlineTokens(L)}}}}codespan(r){const c=this.rules.inline.code.exec(r);if(c){let o=c[2].replace(this.rules.other.newLineCharGlobal," ");const s=this.rules.other.nonSpaceChar.test(o),h=this.rules.other.startingSpaceChar.test(o)&&this.rules.other.endingSpaceChar.test(o);return s&&h&&(o=o.substring(1,o.length-1)),{type:"codespan",raw:c[0],text:o}}}br(r){const c=this.rules.inline.br.exec(r);if(c)return{type:"br",raw:c[0]}}del(r){const c=this.rules.inline.del.exec(r);if(c)return{type:"del",raw:c[0],text:c[2],tokens:this.lexer.inlineTokens(c[2])}}autolink(r){const c=this.rules.inline.autolink.exec(r);if(c){let o,s;return c[2]==="@"?(o=c[1],s="mailto:"+o):(o=c[1],s=o),{type:"link",raw:c[0],text:o,href:s,tokens:[{type:"text",raw:o,text:o}]}}}url(r){var o;let c;if(c=this.rules.inline.url.exec(r)){let s,h;if(c[2]==="@")s=c[0],h="mailto:"+s;else{let g;do g=c[0],c[0]=((o=this.rules.inline._backpedal.exec(c[0]))==null?void 0:o[0])??"";while(g!==c[0]);s=c[0],c[1]==="www."?h="http://"+c[0]:h=c[0]}return{type:"link",raw:c[0],text:s,href:h,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(r){const c=this.rules.inline.text.exec(r);if(c){const o=this.lexer.state.inRawBlock;return{type:"text",raw:c[0],text:c[0],escaped:o}}}},al=class Ur{constructor(c){Se(this,"tokens");Se(this,"options");Se(this,"state");Se(this,"tokenizer");Se(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=c||Wl,this.options.tokenizer=this.options.tokenizer||new ai,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};const o={other:Ie,block:Pu.normal,inline:On.normal};this.options.pedantic?(o.block=Pu.pedantic,o.inline=On.pedantic):this.options.gfm&&(o.block=Pu.gfm,this.options.breaks?o.inline=On.breaks:o.inline=On.gfm),this.tokenizer.rules=o}static get rules(){return{block:Pu,inline:On}}static lex(c,o){return new Ur(o).lex(c)}static lexInline(c,o){return new Ur(o).inlineTokens(c)}lex(c){c=c.replace(Ie.carriageReturn,`
`),this.blockTokens(c,this.tokens);for(let o=0;o<this.inlineQueue.length;o++){const s=this.inlineQueue[o];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(c,o=[],s=!1){var h,g,T;for(this.options.pedantic&&(c=c.replace(Ie.tabCharGlobal,"    ").replace(Ie.spaceLine,""));c;){let y;if((g=(h=this.options.extensions)==null?void 0:h.block)!=null&&g.some(d=>(y=d.call({lexer:this},c,o))?(c=c.substring(y.raw.length),o.push(y),!0):!1))continue;if(y=this.tokenizer.space(c)){c=c.substring(y.raw.length);const d=o.at(-1);y.raw.length===1&&d!==void 0?d.raw+=`
`:o.push(y);continue}if(y=this.tokenizer.code(c)){c=c.substring(y.raw.length);const d=o.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
`+y.raw,d.text+=`
`+y.text,this.inlineQueue.at(-1).src=d.text):o.push(y);continue}if(y=this.tokenizer.fences(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.heading(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.hr(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.blockquote(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.list(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.html(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.def(c)){c=c.substring(y.raw.length);const d=o.at(-1);(d==null?void 0:d.type)==="paragraph"||(d==null?void 0:d.type)==="text"?(d.raw+=`
`+y.raw,d.text+=`
`+y.raw,this.inlineQueue.at(-1).src=d.text):this.tokens.links[y.tag]||(this.tokens.links[y.tag]={href:y.href,title:y.title});continue}if(y=this.tokenizer.table(c)){c=c.substring(y.raw.length),o.push(y);continue}if(y=this.tokenizer.lheading(c)){c=c.substring(y.raw.length),o.push(y);continue}let x=c;if((T=this.options.extensions)!=null&&T.startBlock){let d=1/0;const z=c.slice(1);let C;this.options.extensions.startBlock.forEach(R=>{C=R.call({lexer:this},z),typeof C=="number"&&C>=0&&(d=Math.min(d,C))}),d<1/0&&d>=0&&(x=c.substring(0,d+1))}if(this.state.top&&(y=this.tokenizer.paragraph(x))){const d=o.at(-1);s&&(d==null?void 0:d.type)==="paragraph"?(d.raw+=`
`+y.raw,d.text+=`
`+y.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):o.push(y),s=x.length!==c.length,c=c.substring(y.raw.length);continue}if(y=this.tokenizer.text(c)){c=c.substring(y.raw.length);const d=o.at(-1);(d==null?void 0:d.type)==="text"?(d.raw+=`
`+y.raw,d.text+=`
`+y.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=d.text):o.push(y);continue}if(c){const d="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(d);break}else throw new Error(d)}}return this.state.top=!0,o}inline(c,o=[]){return this.inlineQueue.push({src:c,tokens:o}),o}inlineTokens(c,o=[]){var y,x,d;let s=c,h=null;if(this.tokens.links){const z=Object.keys(this.tokens.links);if(z.length>0)for(;(h=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)z.includes(h[0].slice(h[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,h.index)+"["+"a".repeat(h[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(h=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,h.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(h=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)s=s.slice(0,h.index)+"["+"a".repeat(h[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);let g=!1,T="";for(;c;){g||(T=""),g=!1;let z;if((x=(y=this.options.extensions)==null?void 0:y.inline)!=null&&x.some(R=>(z=R.call({lexer:this},c,o))?(c=c.substring(z.raw.length),o.push(z),!0):!1))continue;if(z=this.tokenizer.escape(c)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.tag(c)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.link(c)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.reflink(c,this.tokens.links)){c=c.substring(z.raw.length);const R=o.at(-1);z.type==="text"&&(R==null?void 0:R.type)==="text"?(R.raw+=z.raw,R.text+=z.text):o.push(z);continue}if(z=this.tokenizer.emStrong(c,s,T)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.codespan(c)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.br(c)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.del(c)){c=c.substring(z.raw.length),o.push(z);continue}if(z=this.tokenizer.autolink(c)){c=c.substring(z.raw.length),o.push(z);continue}if(!this.state.inLink&&(z=this.tokenizer.url(c))){c=c.substring(z.raw.length),o.push(z);continue}let C=c;if((d=this.options.extensions)!=null&&d.startInline){let R=1/0;const L=c.slice(1);let Q;this.options.extensions.startInline.forEach(J=>{Q=J.call({lexer:this},L),typeof Q=="number"&&Q>=0&&(R=Math.min(R,Q))}),R<1/0&&R>=0&&(C=c.substring(0,R+1))}if(z=this.tokenizer.inlineText(C)){c=c.substring(z.raw.length),z.raw.slice(-1)!=="_"&&(T=z.raw.slice(-1)),g=!0;const R=o.at(-1);(R==null?void 0:R.type)==="text"?(R.raw+=z.raw,R.text+=z.text):o.push(z);continue}if(c){const R="Infinite loop on byte: "+c.charCodeAt(0);if(this.options.silent){console.error(R);break}else throw new Error(R)}}return o}},ni=class{constructor(r){Se(this,"options");Se(this,"parser");this.options=r||Wl}space(r){return""}code({text:r,lang:c,escaped:o}){var g;const s=(g=(c||"").match(Ie.notSpaceStart))==null?void 0:g[0],h=r.replace(Ie.endingNewline,"")+`
`;return s?'<pre><code class="language-'+Bt(s)+'">'+(o?h:Bt(h,!0))+`</code></pre>
`:"<pre><code>"+(o?h:Bt(h,!0))+`</code></pre>
`}blockquote({tokens:r}){return`<blockquote>
${this.parser.parse(r)}</blockquote>
`}html({text:r}){return r}heading({tokens:r,depth:c}){return`<h${c}>${this.parser.parseInline(r)}</h${c}>
`}hr(r){return`<hr>
`}list(r){const c=r.ordered,o=r.start;let s="";for(let T=0;T<r.items.length;T++){const y=r.items[T];s+=this.listitem(y)}const h=c?"ol":"ul",g=c&&o!==1?' start="'+o+'"':"";return"<"+h+g+`>
`+s+"</"+h+`>
`}listitem(r){var o;let c="";if(r.task){const s=this.checkbox({checked:!!r.checked});r.loose?((o=r.tokens[0])==null?void 0:o.type)==="paragraph"?(r.tokens[0].text=s+" "+r.tokens[0].text,r.tokens[0].tokens&&r.tokens[0].tokens.length>0&&r.tokens[0].tokens[0].type==="text"&&(r.tokens[0].tokens[0].text=s+" "+Bt(r.tokens[0].tokens[0].text),r.tokens[0].tokens[0].escaped=!0)):r.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):c+=s+" "}return c+=this.parser.parse(r.tokens,!!r.loose),`<li>${c}</li>
`}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
`}table(r){let c="",o="";for(let h=0;h<r.header.length;h++)o+=this.tablecell(r.header[h]);c+=this.tablerow({text:o});let s="";for(let h=0;h<r.rows.length;h++){const g=r.rows[h];o="";for(let T=0;T<g.length;T++)o+=this.tablecell(g[T]);s+=this.tablerow({text:o})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
<thead>
`+c+`</thead>
`+s+`</table>
`}tablerow({text:r}){return`<tr>
${r}</tr>
`}tablecell(r){const c=this.parser.parseInline(r.tokens),o=r.header?"th":"td";return(r.align?`<${o} align="${r.align}">`:`<${o}>`)+c+`</${o}>
`}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${Bt(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:c,tokens:o}){const s=this.parser.parseInline(o),h=oh(r);if(h===null)return s;r=h;let g='<a href="'+r+'"';return c&&(g+=' title="'+Bt(c)+'"'),g+=">"+s+"</a>",g}image({href:r,title:c,text:o,tokens:s}){s&&(o=this.parser.parseInline(s,this.parser.textRenderer));const h=oh(r);if(h===null)return Bt(o);r=h;let g=`<img src="${r}" alt="${o}"`;return c&&(g+=` title="${Bt(c)}"`),g+=">",g}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:Bt(r.text)}},Kr=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}},nl=class Hr{constructor(c){Se(this,"options");Se(this,"renderer");Se(this,"textRenderer");this.options=c||Wl,this.options.renderer=this.options.renderer||new ni,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Kr}static parse(c,o){return new Hr(o).parse(c)}static parseInline(c,o){return new Hr(o).parseInline(c)}parse(c,o=!0){var h,g;let s="";for(let T=0;T<c.length;T++){const y=c[T];if((g=(h=this.options.extensions)==null?void 0:h.renderers)!=null&&g[y.type]){const d=y,z=this.options.extensions.renderers[d.type].call({parser:this},d);if(z!==!1||!["space","hr","heading","code","table","blockquote","list","html","paragraph","text"].includes(d.type)){s+=z||"";continue}}const x=y;switch(x.type){case"space":{s+=this.renderer.space(x);continue}case"hr":{s+=this.renderer.hr(x);continue}case"heading":{s+=this.renderer.heading(x);continue}case"code":{s+=this.renderer.code(x);continue}case"table":{s+=this.renderer.table(x);continue}case"blockquote":{s+=this.renderer.blockquote(x);continue}case"list":{s+=this.renderer.list(x);continue}case"html":{s+=this.renderer.html(x);continue}case"paragraph":{s+=this.renderer.paragraph(x);continue}case"text":{let d=x,z=this.renderer.text(d);for(;T+1<c.length&&c[T+1].type==="text";)d=c[++T],z+=`
`+this.renderer.text(d);o?s+=this.renderer.paragraph({type:"paragraph",raw:z,text:z,tokens:[{type:"text",raw:z,text:z,escaped:!0}]}):s+=z;continue}default:{const d='Token with "'+x.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return s}parseInline(c,o=this.renderer){var h,g;let s="";for(let T=0;T<c.length;T++){const y=c[T];if((g=(h=this.options.extensions)==null?void 0:h.renderers)!=null&&g[y.type]){const d=this.options.extensions.renderers[y.type].call({parser:this},y);if(d!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(y.type)){s+=d||"";continue}}const x=y;switch(x.type){case"escape":{s+=o.text(x);break}case"html":{s+=o.html(x);break}case"link":{s+=o.link(x);break}case"image":{s+=o.image(x);break}case"strong":{s+=o.strong(x);break}case"em":{s+=o.em(x);break}case"codespan":{s+=o.codespan(x);break}case"br":{s+=o.br(x);break}case"del":{s+=o.del(x);break}case"text":{s+=o.text(x);break}default:{const d='Token with "'+x.type+'" type was not found.';if(this.options.silent)return console.error(d),"";throw new Error(d)}}}return s}},Cr,ti=(Cr=class{constructor(r){Se(this,"options");Se(this,"block");this.options=r||Wl}preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}provideLexer(){return this.block?al.lex:al.lexInline}provideParser(){return this.block?nl.parse:nl.parseInline}},Se(Cr,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens"])),Cr),ly=class{constructor(...r){Se(this,"defaults",qr());Se(this,"options",this.setOptions);Se(this,"parse",this.parseMarkdown(!0));Se(this,"parseInline",this.parseMarkdown(!1));Se(this,"Parser",nl);Se(this,"Renderer",ni);Se(this,"TextRenderer",Kr);Se(this,"Lexer",al);Se(this,"Tokenizer",ai);Se(this,"Hooks",ti);this.use(...r)}walkTokens(r,c){var s,h;let o=[];for(const g of r)switch(o=o.concat(c.call(this,g)),g.type){case"table":{const T=g;for(const y of T.header)o=o.concat(this.walkTokens(y.tokens,c));for(const y of T.rows)for(const x of y)o=o.concat(this.walkTokens(x.tokens,c));break}case"list":{const T=g;o=o.concat(this.walkTokens(T.items,c));break}default:{const T=g;(h=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&h[T.type]?this.defaults.extensions.childTokens[T.type].forEach(y=>{const x=T[y].flat(1/0);o=o.concat(this.walkTokens(x,c))}):T.tokens&&(o=o.concat(this.walkTokens(T.tokens,c)))}}return o}use(...r){const c=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(o=>{const s={...o};if(s.async=this.defaults.async||s.async||!1,o.extensions&&(o.extensions.forEach(h=>{if(!h.name)throw new Error("extension name required");if("renderer"in h){const g=c.renderers[h.name];g?c.renderers[h.name]=function(...T){let y=h.renderer.apply(this,T);return y===!1&&(y=g.apply(this,T)),y}:c.renderers[h.name]=h.renderer}if("tokenizer"in h){if(!h.level||h.level!=="block"&&h.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");const g=c[h.level];g?g.unshift(h.tokenizer):c[h.level]=[h.tokenizer],h.start&&(h.level==="block"?c.startBlock?c.startBlock.push(h.start):c.startBlock=[h.start]:h.level==="inline"&&(c.startInline?c.startInline.push(h.start):c.startInline=[h.start]))}"childTokens"in h&&h.childTokens&&(c.childTokens[h.name]=h.childTokens)}),s.extensions=c),o.renderer){const h=this.defaults.renderer||new ni(this.defaults);for(const g in o.renderer){if(!(g in h))throw new Error(`renderer '${g}' does not exist`);if(["options","parser"].includes(g))continue;const T=g,y=o.renderer[T],x=h[T];h[T]=(...d)=>{let z=y.apply(h,d);return z===!1&&(z=x.apply(h,d)),z||""}}s.renderer=h}if(o.tokenizer){const h=this.defaults.tokenizer||new ai(this.defaults);for(const g in o.tokenizer){if(!(g in h))throw new Error(`tokenizer '${g}' does not exist`);if(["options","rules","lexer"].includes(g))continue;const T=g,y=o.tokenizer[T],x=h[T];h[T]=(...d)=>{let z=y.apply(h,d);return z===!1&&(z=x.apply(h,d)),z}}s.tokenizer=h}if(o.hooks){const h=this.defaults.hooks||new ti;for(const g in o.hooks){if(!(g in h))throw new Error(`hook '${g}' does not exist`);if(["options","block"].includes(g))continue;const T=g,y=o.hooks[T],x=h[T];ti.passThroughHooks.has(g)?h[T]=d=>{if(this.defaults.async)return Promise.resolve(y.call(h,d)).then(C=>x.call(h,C));const z=y.call(h,d);return x.call(h,z)}:h[T]=(...d)=>{let z=y.apply(h,d);return z===!1&&(z=x.apply(h,d)),z}}s.hooks=h}if(o.walkTokens){const h=this.defaults.walkTokens,g=o.walkTokens;s.walkTokens=function(T){let y=[];return y.push(g.call(this,T)),h&&(y=y.concat(h.call(this,T))),y}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,c){return al.lex(r,c??this.defaults)}parser(r,c){return nl.parse(r,c??this.defaults)}parseMarkdown(r){return(o,s)=>{const h={...s},g={...this.defaults,...h},T=this.onError(!!g.silent,!!g.async);if(this.defaults.async===!0&&h.async===!1)return T(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof o>"u"||o===null)return T(new Error("marked(): input parameter is undefined or null"));if(typeof o!="string")return T(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(o)+", string expected"));g.hooks&&(g.hooks.options=g,g.hooks.block=r);const y=g.hooks?g.hooks.provideLexer():r?al.lex:al.lexInline,x=g.hooks?g.hooks.provideParser():r?nl.parse:nl.parseInline;if(g.async)return Promise.resolve(g.hooks?g.hooks.preprocess(o):o).then(d=>y(d,g)).then(d=>g.hooks?g.hooks.processAllTokens(d):d).then(d=>g.walkTokens?Promise.all(this.walkTokens(d,g.walkTokens)).then(()=>d):d).then(d=>x(d,g)).then(d=>g.hooks?g.hooks.postprocess(d):d).catch(T);try{g.hooks&&(o=g.hooks.preprocess(o));let d=y(o,g);g.hooks&&(d=g.hooks.processAllTokens(d)),g.walkTokens&&this.walkTokens(d,g.walkTokens);let z=x(d,g);return g.hooks&&(z=g.hooks.postprocess(z)),z}catch(d){return T(d)}}}onError(r,c){return o=>{if(o.message+=`
Please report this to https://github.com/markedjs/marked.`,r){const s="<p>An error occurred:</p><pre>"+Bt(o.message+"",!0)+"</pre>";return c?Promise.resolve(s):s}if(c)return Promise.reject(o);throw o}}},$l=new ly;function he(r,c){return $l.parse(r,c)}he.options=he.setOptions=function(r){return $l.setOptions(r),he.defaults=$l.defaults,yh(he.defaults),he};he.getDefaults=qr;he.defaults=Wl;he.use=function(...r){return $l.use(...r),he.defaults=$l.defaults,yh(he.defaults),he};he.walkTokens=function(r,c){return $l.walkTokens(r,c)};he.parseInline=$l.parseInline;he.Parser=nl;he.parser=nl.parse;he.Renderer=ni;he.TextRenderer=Kr;he.Lexer=al;he.lexer=al.lex;he.Tokenizer=ai;he.Hooks=ti;he.parse=he;he.options;he.setOptions;he.use;he.walkTokens;he.parseInline;nl.parse;al.lex;he.setOptions({breaks:!0,gfm:!0});function ay({message:r}){const c=q.useMemo(()=>{if(r.isMarkdown&&r.content)try{return he.parse(r.content)}catch{return r.content}return null},[r.content,r.isMarkdown]);switch(r.type){case"user":return p.jsx("div",{className:"self-end max-w-[65%] max-md:max-w-[85%] min-w-0 px-3 py-2 rounded-xl rounded-br-sm bg-blue-50 dark:bg-gray-800 text-gray-900 dark:text-gray-100 animate-[fade-in_0.15s_ease-out] whitespace-pre-wrap break-words overflow-hidden",children:r.content});case"assistant":return p.jsx("div",{className:"self-start max-w-[65%] max-md:max-w-[85%] min-w-0 px-3 py-2 rounded-xl rounded-bl-sm bg-gray-100 dark:bg-gray-800 text-gray-900 dark:text-gray-100 animate-[fade-in_0.15s_ease-out] overflow-hidden",children:c?p.jsx("div",{className:"markdown-content leading-relaxed",dangerouslySetInnerHTML:{__html:c}}):p.jsx("span",{className:"whitespace-pre-wrap break-words",children:r.content})});case"system":return p.jsx("div",{className:"self-center px-3 py-1 text-xs text-gray-500 dark:text-gray-400 bg-gray-100 dark:bg-gray-800 rounded-full animate-[fade-in_0.15s_ease-out]",children:r.content});case"error":return p.jsx("div",{className:"self-center px-3 py-1.5 text-xs text-red-600 dark:text-red-400 bg-red-50 dark:bg-red-900/20 rounded-lg animate-[fade-in_0.15s_ease-out]",children:r.content});default:return null}}const ny={"tool-start":"bg-blue-100 dark:bg-gray-700 text-blue-700 dark:text-gray-300 border-blue-300 dark:border-gray-600","tool-complete":"bg-green-100 dark:bg-gray-700 text-green-700 dark:text-gray-300 border-green-300 dark:border-gray-600","tool-error":"bg-red-100 dark:bg-gray-700 text-red-700 dark:text-red-300 border-red-300 dark:border-gray-600",memory:"bg-purple-100 dark:bg-gray-700 text-purple-700 dark:text-gray-300 border-purple-300 dark:border-gray-600",thinking:"bg-orange-100 dark:bg-gray-700 text-orange-700 dark:text-gray-300 border-orange-300 dark:border-gray-600"},uy={"tool-start":"border-blue-200 dark:border-gray-700","tool-complete":"border-green-200 dark:border-gray-700","tool-error":"border-red-200 dark:border-gray-700",memory:"border-purple-200 dark:border-gray-700",thinking:"border-orange-200 dark:border-gray-700"},iy={fact:"bg-purple-100 dark:bg-gray-700 text-purple-700 dark:text-gray-300",conversation:"bg-blue-100 dark:bg-gray-700 text-blue-700 dark:text-gray-300"};function cy({message:r}){const[c,o]=q.useState(!1),s=r.debugType||"",h=uy[s]||"border-gray-200 dark:border-gray-700",g=ny[s]||"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400",T=r.memoryItems,y=T&&T.length>0;return p.jsxs("div",{className:`self-start max-w-[80%] max-md:max-w-[95%] p-2 rounded-lg border border-dashed ${h} font-mono text-xs text-gray-500 dark:text-gray-400 animate-[fade-in_0.15s_ease-out]`,children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("span",{className:`inline-block px-1.5 py-0.5 rounded text-[10px] uppercase tracking-wider font-medium ${g}`,children:r.label||"debug"}),r.type==="memory"?p.jsx("span",{className:"flex-1 text-gray-500 dark:text-gray-400",children:r.content}):null,y&&p.jsx("button",{onClick:()=>o(x=>!x),className:"text-purple-500 dark:text-purple-400 text-[10px] px-1.5 py-0.5 rounded hover:bg-purple-50 dark:hover:bg-purple-900/30 transition-colors",children:c?"▼":"▶"})]}),r.type!=="memory"&&p.jsx("div",{className:"mt-1 whitespace-pre-wrap break-words",children:r.content}),y&&c&&p.jsx("div",{className:"mt-2 pt-2 border-t border-dashed border-gray-200 dark:border-gray-700 space-y-1",children:T.map((x,d)=>p.jsxs("div",{className:"flex gap-2 py-0.5",children:[p.jsx("span",{className:`text-[9px] px-1 py-0.5 rounded uppercase shrink-0 ${iy[x.type]||"bg-gray-100 dark:bg-gray-800 text-gray-600 dark:text-gray-400"}`,children:x.type}),p.jsx("span",{className:"text-[11px] text-gray-600 dark:text-gray-400 leading-snug",children:x.subject?`[${x.subject}] ${x.content}`:x.content})]},d))})]})}function ry({filePath:r,caption:c}){if(!r)return null;const o=r.split("/").pop()||"file";return p.jsxs("div",{className:"self-start max-w-[65%] max-md:max-w-[85%] animate-[fade-in_0.15s_ease-out]",children:[p.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 bg-blue-50 dark:bg-gray-800 border border-blue-100 dark:border-gray-700 rounded-lg",children:[p.jsx("span",{className:"text-lg",children:"📄"}),p.jsx("span",{className:"flex-1 font-medium text-gray-900 dark:text-gray-100 text-sm break-all",children:o}),p.jsx("a",{href:"/api/files?path="+encodeURIComponent(r),download:o,target:"_blank",rel:"noopener noreferrer",className:"px-3 py-1 bg-blue-500 text-white text-xs font-medium rounded hover:bg-blue-600 transition-colors whitespace-nowrap",children:"Download"})]}),c&&p.jsx("div",{className:"mt-1 text-sm text-gray-500 dark:text-gray-400",children:c})]})}function sy(){return p.jsxs("div",{className:"self-start flex gap-1 px-4 py-3 bg-gray-100 dark:bg-gray-800 rounded-xl rounded-bl-sm",children:[p.jsx("span",{className:"w-2 h-2 bg-gray-400 dark:bg-gray-500 rounded-full animate-[bounce-dot_1.4s_ease-in-out_infinite_-0.32s]"}),p.jsx("span",{className:"w-2 h-2 bg-gray-400 dark:bg-gray-500 rounded-full animate-[bounce-dot_1.4s_ease-in-out_infinite_-0.16s]"}),p.jsx("span",{className:"w-2 h-2 bg-gray-400 dark:bg-gray-500 rounded-full animate-[bounce-dot_1.4s_ease-in-out_infinite]"})]})}const fy=q.forwardRef(function({messages:c,debugMode:o,isWaiting:s,onLoadMore:h,isLoadingMore:g,hasMore:T},y){const x=q.useRef(null),d=y||x,z=q.useRef(!0),C=q.useCallback(()=>{const L=d.current;L&&(z.current=L.scrollHeight-L.scrollTop-L.clientHeight<150)},[d]);q.useEffect(()=>{const L=d.current;L&&z.current&&(L.scrollTop=L.scrollHeight)},[c,s,o,d]);const R=q.useCallback(()=>{C();const L=d.current;!L||!h||g||!T||L.scrollTop<100&&h()},[d,h,g,T,C]);return p.jsx("main",{ref:d,onScroll:R,className:"flex-1 overflow-y-auto overflow-x-hidden px-[10%] py-2 bg-gray-50 dark:bg-gray-950 max-md:px-3",children:p.jsxs("div",{className:"flex flex-col gap-1 max-w-3xl mx-auto",children:[g&&p.jsx("div",{className:"flex justify-center py-3",children:p.jsx("div",{className:"w-5 h-5 border-2 border-gray-400 dark:border-blue-400 border-t-transparent rounded-full animate-spin"})}),T&&!g&&p.jsx("button",{onClick:h,className:"text-xs text-gray-400 dark:text-gray-500 hover:text-gray-600 dark:hover:text-gray-300 py-2 mx-auto",children:"Load older messages"}),c.map(L=>L.type==="file"?p.jsx(ry,{filePath:L.filePath,caption:L.caption},L.id):L.type==="debug"||L.type==="memory"?o?p.jsx(cy,{message:L},L.id):null:p.jsx(ay,{message:L},L.id)),s&&p.jsx(sy,{})]})})}),oy=[{name:"new",description:"Start a new conversation",category:"builtin",sendImmediately:!0},{name:"help",description:"Show available commands",category:"builtin",sendImmediately:!0},{name:"model",description:"Switch AI model",category:"builtin",sendImmediately:!0},{name:"usage",description:"View token usage and costs",category:"builtin",sendImmediately:!0},{name:"stop",description:"Stop current generation",category:"builtin",sendImmediately:!0},{name:"verbose",description:"Toggle debug output",category:"builtin",sendImmediately:!0},{name:"settings",description:"View configuration",category:"builtin",sendImmediately:!0},{name:"memory_search",description:"Search long-term memory",category:"skill",sendImmediately:!1},{name:"goals",description:"Manage goals, milestones, and tasks",category:"skill",sendImmediately:!1},{name:"board",description:"View and manage the task board",category:"skill",sendImmediately:!1}];function dy({commands:r,activeIndex:c,onSelect:o}){const s=q.useRef(null);q.useEffect(()=>{var y;s.current&&c>=0&&((y=s.current.querySelectorAll("[data-cmd-item]")[c])==null||y.scrollIntoView({block:"nearest"}))},[c]);const h=r.filter(y=>y.category==="builtin"),g=r.filter(y=>y.category==="skill");if(r.length===0)return p.jsx("div",{className:"absolute bottom-full mb-2 left-0 right-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl shadow-lg overflow-hidden animate-[slide-up_150ms_ease-out]",children:p.jsx("div",{className:"px-4 py-3 text-sm text-gray-400 dark:text-gray-500",children:"No matching commands"})});let T=-1;return p.jsxs("div",{ref:s,className:"absolute bottom-full mb-2 left-0 right-0 bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-xl shadow-lg overflow-hidden animate-[slide-up_150ms_ease-out] max-h-72 overflow-y-auto",children:[h.length>0&&p.jsxs("div",{children:[p.jsx("div",{className:"px-4 pt-3 pb-1 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider",children:"Commands"}),h.map(y=>{T++;const x=T;return p.jsxs("button",{"data-cmd-item":!0,type:"button",onMouseDown:d=>{d.preventDefault(),o(y)},className:`w-full text-left px-4 py-2 flex items-center gap-3 transition-colors ${x===c?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[p.jsxs("span",{className:"text-sm font-mono text-gray-900 dark:text-gray-100",children:["/",y.name]}),p.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:y.description})]},y.name)})]}),g.length>0&&p.jsxs("div",{children:[p.jsx("div",{className:`px-4 pt-3 pb-1 text-xs font-semibold text-gray-400 dark:text-gray-500 uppercase tracking-wider ${h.length>0?"border-t border-gray-100 dark:border-gray-700":""}`,children:"Skills"}),g.map(y=>{T++;const x=T;return p.jsxs("button",{"data-cmd-item":!0,type:"button",onMouseDown:d=>{d.preventDefault(),o(y)},className:`w-full text-left px-4 py-2 flex items-center gap-3 transition-colors ${x===c?"bg-blue-50 dark:bg-blue-900/30":"hover:bg-gray-50 dark:hover:bg-gray-700/50"}`,children:[p.jsxs("span",{className:"text-sm font-mono text-gray-900 dark:text-gray-100",children:["/",y.name]}),p.jsx("span",{className:"text-sm text-gray-400 dark:text-gray-500",children:y.description})]},y.name)})]})]})}function hy({onSend:r,onStop:c,isWaiting:o,disabled:s,inputRef:h}){const[g,T]=q.useState(""),[y,x]=q.useState(!1),[d,z]=q.useState(0),C=q.useMemo(()=>{if(!y)return[];const X=g.startsWith("/")?g.slice(1).toLowerCase():"";return oy.filter(te=>te.name.toLowerCase().includes(X))},[y,g]);q.useEffect(()=>{z(0)},[C.length]),q.useEffect(()=>{if(!y)return;const X=te=>{te.target.closest("footer")||x(!1)};return document.addEventListener("mousedown",X),()=>document.removeEventListener("mousedown",X)},[y]);const R=X=>{var te;x(!1),X.name==="stop"?(c(),T("")):X.sendImmediately?(r(`/${X.name}`),T("")):(T(`/${X.name} `),(te=h.current)==null||te.focus())},L=X=>{if(X.preventDefault(),o){c();return}g.trim()&&(r(g),T(""),x(!1))},Q=X=>{T(X),X.startsWith("/")&&!X.includes(" ")?x(!0):x(!1)},J=X=>{if(y&&C.length>0){if(X.key==="ArrowDown"){X.preventDefault(),z(te=>(te+1)%C.length);return}if(X.key==="ArrowUp"){X.preventDefault(),z(te=>(te-1+C.length)%C.length);return}if(X.key==="Enter"||X.key==="Tab"){X.preventDefault(),R(C[d]);return}}if(X.key==="Escape"&&y){X.preventDefault(),x(!1),T("");return}X.key==="Enter"&&!X.shiftKey&&(X.preventDefault(),L(X))},Ae=()=>{var X;y?x(!1):(x(!0),g||T("/"),(X=h.current)==null||X.focus())};return p.jsx("footer",{className:"px-[10%] py-2 bg-transparent max-md:px-3",children:p.jsxs("form",{onSubmit:L,className:"relative flex gap-2 items-center max-w-3xl mx-auto",children:[y&&p.jsx(dy,{commands:C,activeIndex:d,onSelect:R}),p.jsx("button",{type:"button",onClick:Ae,className:"w-11 h-11 flex items-center justify-center rounded-full shrink-0 transition-colors bg-gray-100 hover:bg-gray-200 dark:bg-gray-800 dark:hover:bg-gray-700 text-gray-500 dark:text-gray-400",title:"Commands",children:p.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[p.jsx("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),p.jsx("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}),p.jsx("input",{ref:h,type:"text",value:g,onChange:X=>Q(X.target.value),onKeyDown:J,placeholder:"Message...",disabled:s,autoComplete:"off",className:"flex-1 px-4 py-3 text-sm bg-gray-50 dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-full text-gray-900 dark:text-gray-100 outline-none focus:border-blue-300 dark:focus:border-blue-500 focus:bg-white dark:focus:bg-gray-800 transition-colors disabled:opacity-50 disabled:cursor-not-allowed placeholder:text-gray-400 dark:placeholder:text-gray-500"}),p.jsx("button",{type:"submit",disabled:s,className:`w-11 h-11 flex items-center justify-center rounded-full shrink-0 transition-colors disabled:opacity-50 disabled:cursor-not-allowed ${o?"bg-red-500 hover:bg-red-600":"bg-blue-500 hover:bg-blue-600"}`,title:o?"Stop generation":"Send message",children:o?p.jsx("svg",{viewBox:"0 0 24 24",width:"20",height:"20",children:p.jsx("rect",{fill:"white",x:"6",y:"6",width:"12",height:"12",rx:"2"})}):p.jsxs("svg",{viewBox:"0 0 24 24",width:"20",height:"20",fill:"none",stroke:"white",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),p.jsx("polyline",{points:"5 12 12 5 19 12"})]})})]})})}function gy({onSetup:r,error:c,darkMode:o}){const[s,h]=q.useState(""),[g,T]=q.useState(""),[y,x]=q.useState(""),[d,z]=q.useState(null),[C,R]=q.useState(!1),L=async J=>{if(J.preventDefault(),z(null),g.length<8){z("Password must be at least 8 characters");return}if(g!==y){z("Passwords do not match");return}R(!0),await r(s,g),R(!1)},Q=d||c;return p.jsx("div",{className:o?"dark":"",children:p.jsx("div",{className:"flex items-center justify-center min-h-screen bg-white dark:bg-gray-950",children:p.jsxs("div",{className:"w-full max-w-sm px-6",children:[p.jsx("div",{className:"flex justify-center mb-6",children:p.jsx("div",{className:"w-14 h-14 rounded-full bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 flex items-center justify-center text-gray-800 dark:text-gray-200",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",children:p.jsxs("g",{transform:"translate(4 3)",children:[p.jsx("line",{x1:"12",y1:"22",x2:"2",y2:"14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"7",y2:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"12",y2:"5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"17",y2:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"20",y2:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"22",y2:"14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})})}),p.jsx("h1",{className:"text-xl font-semibold text-center text-gray-900 dark:text-gray-100 mb-6",children:"Welcome to Scallopbot"}),p.jsxs("form",{onSubmit:L,className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"setup-email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Email"}),p.jsx("input",{id:"setup-email",type:"email",required:!0,value:s,onChange:J=>h(J.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500",autoComplete:"email"})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"setup-password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Password"}),p.jsx("input",{id:"setup-password",type:"password",required:!0,minLength:8,value:g,onChange:J=>T(J.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500",placeholder:"8+ characters",autoComplete:"new-password"})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"setup-confirm",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Confirm Password"}),p.jsx("input",{id:"setup-confirm",type:"password",required:!0,minLength:8,value:y,onChange:J=>x(J.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500",autoComplete:"new-password"})]}),Q&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:Q}),p.jsx("button",{type:"submit",disabled:C,className:"w-full py-2 px-4 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-medium transition-colors disabled:opacity-50",children:C?"Creating...":"Create Account"})]})]})})})}function my({onLogin:r,error:c,darkMode:o}){const[s,h]=q.useState(""),[g,T]=q.useState(""),[y,x]=q.useState(!1),d=async z=>{z.preventDefault(),x(!0),await r(s,g),x(!1)};return p.jsx("div",{className:o?"dark":"",children:p.jsx("div",{className:"flex items-center justify-center min-h-screen bg-white dark:bg-gray-950",children:p.jsxs("div",{className:"w-full max-w-sm px-6",children:[p.jsx("div",{className:"flex justify-center mb-6",children:p.jsx("div",{className:"w-14 h-14 rounded-full bg-white dark:bg-neutral-800 border border-gray-200 dark:border-neutral-700 flex items-center justify-center text-gray-800 dark:text-gray-200",children:p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 32 32",children:p.jsxs("g",{transform:"translate(4 3)",children:[p.jsx("line",{x1:"12",y1:"22",x2:"2",y2:"14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"4",y2:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"7",y2:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"12",y2:"5",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"17",y2:"7",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"20",y2:"10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),p.jsx("line",{x1:"12",y1:"22",x2:"22",y2:"14",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]})})})}),p.jsx("h1",{className:"text-xl font-semibold text-center text-gray-900 dark:text-gray-100 mb-6",children:"Sign in"}),p.jsxs("form",{onSubmit:d,className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("label",{htmlFor:"login-email",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Email"}),p.jsx("input",{id:"login-email",type:"email",required:!0,value:s,onChange:z=>h(z.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500",autoComplete:"email"})]}),p.jsxs("div",{children:[p.jsx("label",{htmlFor:"login-password",className:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1",children:"Password"}),p.jsx("input",{id:"login-password",type:"password",required:!0,value:g,onChange:z=>T(z.target.value),className:"w-full px-3 py-2 rounded-lg border border-gray-300 dark:border-neutral-700 bg-white dark:bg-neutral-900 text-gray-900 dark:text-gray-100 focus:outline-none focus:ring-2 focus:ring-blue-500",autoComplete:"current-password"})]}),c&&p.jsx("p",{className:"text-sm text-red-600 dark:text-red-400",children:c}),p.jsx("button",{type:"submit",disabled:y,className:"w-full py-2 px-4 rounded-lg bg-blue-600 hover:bg-blue-700 text-white font-medium transition-colors disabled:opacity-50",children:y?"Signing in...":"Sign in"})]})]})})})}const yy=q.lazy(()=>om(()=>import("./MemoryMap-UVeLTuRI.js"),[]));function gh(r){return r==="/memory"?"memory-map":r==="/costs"?"costs":"chat"}function py(r){return r==="memory-map"?"/memory":r==="costs"?"/costs":"/"}function mh(r,c){const{role:o,content:s}=r,h=[];let g=null;if(s.startsWith("["))try{g=JSON.parse(s)}catch{}if(!g)return o==="user"?h.push({id:c(),type:"user",content:s,_dbId:r.id}):o==="assistant"&&h.push({id:c(),type:"assistant",content:s,isMarkdown:!0,_dbId:r.id}),h;for(const T of g)if(T.type==="text"&&T.text){const y=o==="user"?"user":"assistant";h.push({id:c(),type:y,content:T.text,isMarkdown:o==="assistant",_dbId:r.id})}else if(T.type==="thinking"&&T.thinking)h.push({id:c(),type:"debug",content:T.thinking,debugType:"thinking",label:"thinking",_dbId:r.id});else if(T.type==="tool_use"&&T.name){const y=T.input?JSON.stringify(T.input).slice(0,200):"";h.push({id:c(),type:"debug",content:y,debugType:"tool-start",label:`tool:${T.name}`,_dbId:r.id})}else if(T.type==="tool_result"){const y=typeof T.content=="string"?T.content.slice(0,300):"";h.push({id:c(),type:"debug",content:y,debugType:T.is_error?"tool-error":"tool-complete",label:"tool:result",_dbId:r.id})}return h}let ei=0;function by(){const[r,c]=q.useState([]),[o,s]=q.useState(!1),[h,g]=q.useState(!1),[T,y]=q.useState(()=>gh(window.location.pathname)),[x,d]=q.useState(()=>{const w=localStorage.getItem("darkMode");return w?w==="true":!0}),[z,C]=q.useState(!1),[R,L]=q.useState(!1),[Q,J]=q.useState(!1),{costs:Ae,refetch:X}=gm(),{authState:te,error:le,setup:ke,login:Ne,logout:Ce}=mm(),$=q.useRef(null),we=q.useRef(null),pt=q.useCallback(w=>{y(w);const V=py(w);window.location.pathname!==V&&window.history.pushState(null,"",V)},[]);q.useEffect(()=>{const w=()=>{y(gh(window.location.pathname))};return window.addEventListener("popstate",w),()=>window.removeEventListener("popstate",w)},[]),q.useEffect(()=>{localStorage.setItem("darkMode",String(x))},[x]);const _e=q.useCallback(w=>{c(V=>[...V,{...w,id:++ei}])},[]),bt=q.useCallback(w=>{var V,ue;switch(w.type){case"response":g(!1),w.sessionId===""&&(c([]),L(!1),J(!1)),w.content&&_e({type:"assistant",content:w.content,isMarkdown:!0}),X(),(V=$.current)==null||V.focus();break;case"chunk":w.content&&c(b=>{const M=b[b.length-1];return M&&M.type==="assistant"&&M.isMarkdown&&!M.label?[...b.slice(0,-1),{...M,content:M.content+w.content}]:[...b,{id:++ei,type:"assistant",content:w.content,isMarkdown:!0}]});break;case"system":_e({type:"system",content:w.content||""});break;case"skill_start":_e({type:"debug",content:w.input||w.message||"Starting...",debugType:"tool-start",label:"tool:"+(w.skill||"skill")});break;case"skill_complete":_e({type:"debug",content:w.output||w.result||"Complete",debugType:"tool-complete",label:"tool:"+(w.skill||"skill")});break;case"skill_error":_e({type:"debug",content:w.error||"Unknown error",debugType:"tool-error",label:"error:"+(w.skill||"skill")});break;case"memory":_e({type:"memory",content:w.message||`${w.count||0} items`,debugType:"memory",label:"memory:"+(w.action||"search"),memoryAction:w.action||"search",memoryItems:w.items||[]});break;case"thinking":_e({type:"debug",content:w.message||"...",debugType:"thinking",label:"thinking"});break;case"debug":_e({type:"debug",content:w.message||"...",label:"debug"});break;case"trigger":g(!1),w.content&&_e({type:"assistant",content:w.content,isMarkdown:!0});break;case"file":_e({type:"file",content:"",filePath:w.path,caption:w.caption});break;case"error":g(!1),_e({type:"error",content:w.error||"An error occurred"}),(ue=$.current)==null||ue.focus();break}},[_e,X]),{status:Le,sendMessage:Rt,sendStop:vt}=dm({onMessage:bt,enabled:te==="authenticated"});q.useEffect(()=>{if(Le!=="connected"||Q)return;(async()=>{try{const V=await fetch("/api/messages?limit=50");if(!V.ok){J(!0);return}const{messages:ue,hasMore:b}=await V.json();if(ue&&ue.length>0){const M=()=>++ei,U=ue.filter(B=>B.role==="user"||B.role==="assistant").flatMap(B=>mh(B,M));c(U),L(b),requestAnimationFrame(()=>{we.current&&(we.current.scrollTop=we.current.scrollHeight)})}}catch(V){console.error("Failed to load chat history:",V)}J(!0)})()},[Le,Q]);const it=q.useCallback(async()=>{if(z||!R)return;const w=r.reduce((b,M)=>M._dbId===void 0?b:b===void 0?M._dbId:Math.min(b,M._dbId),void 0);if(w===void 0)return;C(!0);const V=we.current,ue=(V==null?void 0:V.scrollHeight)||0;try{const b=await fetch(`/api/messages?limit=50&before=${w}`);if(!b.ok){C(!1);return}const{messages:M,hasMore:U}=await b.json();if(M&&M.length>0){const B=()=>++ei,W=M.filter(F=>F.role==="user"||F.role==="assistant").flatMap(F=>mh(F,B));c(F=>[...W,...F]),L(U),requestAnimationFrame(()=>{V&&(V.scrollTop=V.scrollHeight-ue)})}else L(!1)}catch(b){console.error("Failed to load more messages:",b)}C(!1)},[z,R,r]),N=q.useCallback(w=>{var V;w.trim()&&(_e({type:"user",content:w}),g(!0),Rt(w),(V=$.current)==null||V.focus())},[_e,Rt]),H=q.useCallback(()=>{vt(),_e({type:"system",content:"Stopping..."})},[_e,vt]);return te==="loading"?p.jsx("div",{className:x?"dark":"",children:p.jsx("div",{className:"flex items-center justify-center min-h-screen bg-white dark:bg-gray-950",children:p.jsx("div",{className:"w-8 h-8 border-2 border-gray-400 dark:border-blue-400 border-t-transparent rounded-full animate-spin"})})}):te==="needs-setup"?p.jsx(gy,{onSetup:ke,error:le,darkMode:x}):te==="needs-login"?p.jsx(my,{onLogin:Ne,error:le,darkMode:x}):p.jsx("div",{className:`${x?"dark":""}`,children:p.jsxs("div",{className:"flex h-screen bg-white dark:bg-gray-950 text-gray-900 dark:text-gray-100",children:[p.jsx(pm,{status:Le,currentView:T,onViewChange:pt,darkMode:x,onDarkModeToggle:()=>d(w=>!w),debugMode:o,onDebugToggle:s,costsAvailable:Ae!==null,hasSpend:Ae!==null&&Ae.daily.spent>0,onLogout:Ce}),p.jsx("div",{className:"flex flex-col flex-1 min-w-0",children:T==="costs"?Ae?p.jsx(xm,{costs:Ae}):p.jsx("div",{className:"flex-1 flex items-center justify-center text-gray-500 dark:text-gray-400",children:p.jsx("p",{children:"No cost data available"})}):T==="chat"?p.jsxs(p.Fragment,{children:[p.jsx(fy,{ref:we,messages:r,debugMode:o,isWaiting:h,onLoadMore:it,isLoadingMore:z,hasMore:R}),p.jsx(hy,{onSend:N,onStop:H,isWaiting:h,disabled:Le!=="connected",inputRef:$})]}):p.jsx(q.Suspense,{fallback:p.jsx("div",{className:"flex-1 flex items-center justify-center bg-gray-100 dark:bg-gray-950 text-gray-500 dark:text-gray-400",children:p.jsx("div",{className:"w-8 h-8 border-2 border-gray-400 dark:border-blue-400 border-t-transparent rounded-full animate-spin"})}),children:p.jsx(yy,{darkMode:x})})})]})})}rm.createRoot(document.getElementById("root")).render(p.jsx(q.StrictMode,{children:p.jsx(by,{})}));export{Br as a,am as b,rm as c,xy as e,Ig as g,p as j,q as r};
