function Sd(i,c){for(var s=0;sp[y]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}(function(){const c=document.createElement("link").relList;if(c&&c.supports&&c.supports("modulepreload"))return;for(const y of document.querySelectorAll('link[rel="modulepreload"]'))p(y);new MutationObserver(y=>{for(const w of y)if(w.type==="childList")for(const S of w.addedNodes)S.tagName==="LINK"&&S.rel==="modulepreload"&&p(S)}).observe(document,{childList:!0,subtree:!0});function s(y){const w={};return y.integrity&&(w.integrity=y.integrity),y.referrerPolicy&&(w.referrerPolicy=y.referrerPolicy),y.crossOrigin==="use-credentials"?w.credentials="include":y.crossOrigin==="anonymous"?w.credentials="omit":w.credentials="same-origin",w}function p(y){if(y.ep)return;y.ep=!0;const w=s(y);fetch(y.href,w)}})();function sc(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}var Do={exports:{}},xr={},Uo={exports:{}},J={};var Wa;function kd(){if(Wa)return J;Wa=1;var i=Symbol.for("react.element"),c=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),p=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),S=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),j=Symbol.for("react.memo"),I=Symbol.for("react.lazy"),N=Symbol.iterator;function A(h){return h===null||typeof h!="object"?null:(h=N&&h[N]||h["@@iterator"],typeof h=="function"?h:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},q=Object.assign,H={};function L(h,E,X){this.props=h,this.context=E,this.refs=H,this.updater=X||b}L.prototype.isReactComponent={},L.prototype.setState=function(h,E){if(typeof h!="object"&&typeof h!="function"&&h!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,h,E,"setState")},L.prototype.forceUpdate=function(h){this.updater.enqueueForceUpdate(this,h,"forceUpdate")};function G(){}G.prototype=L.prototype;function Y(h,E,X){this.props=h,this.context=E,this.refs=H,this.updater=X||b}var se=Y.prototype=new G;se.constructor=Y,q(se,L.prototype),se.isPureReactComponent=!0;var V=Array.isArray,ue=Object.prototype.hasOwnProperty,fe={current:null},he={key:!0,ref:!0,__self:!0,__source:!0};function Ze(h,E,X){var Z,te={},ne=null,ae=null;if(E!=null)for(Z in E.ref!==void 0&&(ae=E.ref),E.key!==void 0&&(ne=""+E.key),E)ue.call(E,Z)&&!he.hasOwnProperty(Z)&&(te[Z]=E[Z]);var oe=arguments.length-2;if(oe===1)te.children=X;else if(1>>1,E=T[h];if(0>>1;hy(te,F))ney(ae,te)?(T[h]=ae,T[ne]=F,h=ne):(T[h]=te,T[Z]=F,h=Z);else if(ney(ae,F))T[h]=ae,T[ne]=F,h=ne;else break e}}return Q}function y(T,Q){var F=T.sortIndex-Q.sortIndex;return F!==0?F:T.id-Q.id}if(typeof performance=="object"&&typeof performance.now=="function"){var w=performance;i.unstable_now=function(){return w.now()}}else{var S=Date,R=S.now();i.unstable_now=function(){return S.now()-R}}var C=[],j=[],I=1,N=null,A=3,b=!1,q=!1,H=!1,L=typeof setTimeout=="function"?setTimeout:null,G=typeof clearTimeout=="function"?clearTimeout:null,Y=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function se(T){for(var Q=s(j);Q!==null;){if(Q.callback===null)p(j);else if(Q.startTime<=T)p(j),Q.sortIndex=Q.expirationTime,c(C,Q);else break;Q=s(j)}}function V(T){if(H=!1,se(T),!q)if(s(C)!==null)q=!0,Ue(ue);else{var Q=s(j);Q!==null&&we(V,Q.startTime-T)}}function ue(T,Q){q=!1,H&&(H=!1,G(Ze),Ze=-1),b=!0;var F=A;try{for(se(Q),N=s(C);N!==null&&(!(N.expirationTime>Q)||T&&!Jt());){var h=N.callback;if(typeof h=="function"){N.callback=null,A=N.priorityLevel;var E=h(N.expirationTime<=Q);Q=i.unstable_now(),typeof E=="function"?N.callback=E:N===s(C)&&p(C),se(Q)}else p(C);N=s(C)}if(N!==null)var X=!0;else{var Z=s(j);Z!==null&&we(V,Z.startTime-Q),X=!1}return X}finally{N=null,A=F,b=!1}}var fe=!1,he=null,Ze=-1,Rt=5,wt=-1;function Jt(){return!(i.unstable_now()-wtT||125h?(T.sortIndex=F,c(j,T),s(C)===null&&T===s(j)&&(H?(G(Ze),Ze=-1):H=!0,we(V,F-h))):(T.sortIndex=E,c(C,T),q||b||(q=!0,Ue(ue))),T},i.unstable_shouldYield=Jt,i.unstable_wrapCallback=function(T){var Q=A;return function(){var F=A;A=Q;try{return T.apply(this,arguments)}finally{A=F}}}})(Vo)),Vo}var Xa;function Pd(){return Xa||(Xa=1,Ao.exports=_d()),Ao.exports}var Ga;function Nd(){if(Ga)return He;Ga=1;var i=Ko(),c=Pd();function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),C=Object.prototype.hasOwnProperty,j=/^[: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]*$/,I={},N={};function A(e){return C.call(N,e)?!0:C.call(I,e)?!1:j.test(e)?N[e]=!0:(I[e]=!0,!1)}function b(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function q(e,t,n,r){if(t===null||typeof t>"u"||b(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function H(e,t,n,r,l,u,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=u,this.removeEmptyString=o}var L={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){L[e]=new H(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];L[t]=new H(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){L[e]=new H(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){L[e]=new H(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){L[e]=new H(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){L[e]=new H(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){L[e]=new H(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){L[e]=new H(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){L[e]=new H(e,5,!1,e.toLowerCase(),null,!1,!1)});var G=/[\-:]([a-z])/g;function Y(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(G,Y);L[t]=new H(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(G,Y);L[t]=new H(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(G,Y);L[t]=new H(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){L[e]=new H(e,1,!1,e.toLowerCase(),null,!1,!1)}),L.xlinkHref=new H("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){L[e]=new H(e,1,!1,e.toLowerCase(),null,!0,!0)});function se(e,t,n,r){var l=L.hasOwnProperty(t)?L[t]:null;(l!==null?l.type!==0:r||!(2a||l[o]!==u[a]){var f=` `+l[o].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=o&&0<=a);break}}}finally{X=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?E(e):""}function te(e){switch(e.tag){case 5:return E(e.type);case 16:return E("Lazy");case 13:return E("Suspense");case 19:return E("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1),e;case 11:return e=Z(e.type.render,!1),e;case 1:return e=Z(e.type,!0),e;default:return""}}function ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case he:return"Fragment";case fe:return"Portal";case Rt:return"Profiler";case Ze:return"StrictMode";case Qe:return"Suspense";case lt:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Jt:return(e.displayName||"Context")+".Consumer";case wt:return(e._context.displayName||"Context")+".Provider";case dt:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case pt:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case Ue:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function ae(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(t);case 8:return t===Ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function oe(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function me(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Ke(e){var t=me(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,u=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,u.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rr(e){e._valueTracker||(e._valueTracker=Ke(e))}function Go(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=me(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function zr(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}}function Wl(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Jo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=oe(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zo(e,t){t=t.checked,t!=null&&se(e,"checked",t,!1)}function Hl(e,t){Zo(e,t);var n=oe(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ql(e,t.type,n):t.hasOwnProperty("defaultValue")&&Ql(e,t.type,oe(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Ql(e,t,n){(t!=="number"||zr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var Un=Array.isArray;function dn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Lr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Bn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var An={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},xc=["Webkit","ms","Moz","O"];Object.keys(An).forEach(function(e){xc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),An[t]=An[e]})});function li(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||An.hasOwnProperty(e)&&An[e]?(""+t).trim():t+"px"}function ui(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=li(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Cc=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xl(e,t){if(t){if(Cc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Gl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 Jl=null;function Zl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ql=null,pn=null,hn=null;function oi(e){if(e=sr(e)){if(typeof ql!="function")throw Error(s(280));var t=e.stateNode;t&&(t=br(t),ql(e.stateNode,e.type,t))}}function ii(e){pn?hn?hn.push(e):hn=[e]:pn=e}function si(){if(pn){var e=pn,t=hn;if(hn=pn=null,oi(e),t)for(e=0;e>>=0,e===0?32:31-(Mc(e)/Fc|0)|0}var Mr=64,Fr=4194304;function Hn(e){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:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Dr(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,u=e.pingedLanes,o=n&268435455;if(o!==0){var a=o&~l;a!==0?r=Hn(a):(u&=o,u!==0&&(r=Hn(u)))}else o=n&~l,o!==0?r=Hn(o):u!==0&&(r=Hn(u));if(r===0)return 0;if(t!==0&&t!==r&&(t&l)===0&&(l=r&-r,u=t&-t,l>=u||l===16&&(u&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Qn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ut(t),e[t]=n}function Ac(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=bn),Fi=" ",Di=!1;function Ui(e,t){switch(e){case"keyup":return mf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bi(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yn=!1;function yf(e,t){switch(e){case"compositionend":return Bi(t);case"keypress":return t.which!==32?null:(Di=!0,Fi);case"textInput":return e=t.data,e===Fi&&Di?null:e;default:return null}}function gf(e,t){if(yn)return e==="compositionend"||!vu&&Ui(e,t)?(e=Li(),$r=cu=jt=null,yn=!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)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Ki(n)}}function Xi(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xi(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Gi(){for(var e=window,t=zr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=zr(e.document)}return t}function wu(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")}function Nf(e){var t=Gi(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Xi(n.ownerDocument.documentElement,n)){if(r!==null&&wu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,u=Math.min(r.start,l);r=r.end===void 0?u:Math.min(r.end,l),!e.extend&&u>r&&(l=r,r=u,u=l),l=Yi(n,u);var o=Yi(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),u>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,gn=null,Su=null,rr=null,ku=!1;function Ji(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ku||gn==null||gn!==zr(r)||(r=gn,"selectionStart"in r&&wu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),rr&&nr(rr,r)||(rr=r,r=Jr(Su,"onSelect"),0xn||(e.current=ju[xn],ju[xn]=null,xn--)}function ce(e,t){xn++,ju[xn]=e.current,e.current=t}var Dt={},Oe=Ft(Dt),Be=Ft(!1),bt=Dt;function Cn(e,t){var n=e.type.contextTypes;if(!n)return Dt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},u;for(u in n)l[u]=t[u];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ae(e){return e=e.childContextTypes,e!=null}function el(){pe(Be),pe(Oe)}function fs(e,t,n){if(Oe.current!==Dt)throw Error(s(168));ce(Oe,t),ce(Be,n)}function ds(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(s(108,ae(e)||"Unknown",l));return F({},n,r)}function tl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Dt,bt=Oe.current,ce(Oe,e),ce(Be,Be.current),!0}function ps(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=ds(e,t,bt),r.__reactInternalMemoizedMergedChildContext=e,pe(Be),pe(Oe),ce(Oe,e)):pe(Be),ce(Be,n)}var kt=null,nl=!1,Iu=!1;function hs(e){kt===null?kt=[e]:kt.push(e)}function Bf(e){nl=!0,hs(e)}function Ut(){if(!Iu&&kt!==null){Iu=!0;var e=0,t=ie;try{var n=kt;for(ie=1;e>=o,l-=o,Et=1<<32-ut(t)+l|n<K?(ze=W,W=null):ze=W.sibling;var re=k(m,W,v[K],P);if(re===null){W===null&&(W=ze);break}e&&W&&re.alternate===null&&t(m,W),d=u(re,d,K),$===null?B=re:$.sibling=re,$=re,W=ze}if(K===v.length)return n(m,W),ve&&tn(m,K),B;if(W===null){for(;KK?(ze=W,W=null):ze=W.sibling;var Yt=k(m,W,re.value,P);if(Yt===null){W===null&&(W=ze);break}e&&W&&Yt.alternate===null&&t(m,W),d=u(Yt,d,K),$===null?B=Yt:$.sibling=Yt,$=Yt,W=ze}if(re.done)return n(m,W),ve&&tn(m,K),B;if(W===null){for(;!re.done;K++,re=v.next())re=_(m,re.value,P),re!==null&&(d=u(re,d,K),$===null?B=re:$.sibling=re,$=re);return ve&&tn(m,K),B}for(W=r(m,W);!re.done;K++,re=v.next())re=O(W,m,K,re.value,P),re!==null&&(e&&re.alternate!==null&&W.delete(re.key===null?K:re.key),d=u(re,d,K),$===null?B=re:$.sibling=re,$=re);return e&&W.forEach(function(wd){return t(m,wd)}),ve&&tn(m,K),B}function Ee(m,d,v,P){if(typeof v=="object"&&v!==null&&v.type===he&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case ue:e:{for(var B=v.key,$=d;$!==null;){if($.key===B){if(B=v.type,B===he){if($.tag===7){n(m,$.sibling),d=l($,v.props.children),d.return=m,m=d;break e}}else if($.elementType===B||typeof B=="object"&&B!==null&&B.$$typeof===Ue&&Ss(B)===$.type){n(m,$.sibling),d=l($,v.props),d.ref=ar(m,$,v),d.return=m,m=d;break e}n(m,$);break}else t(m,$);$=$.sibling}v.type===he?(d=cn(v.props.children,m.mode,P,v.key),d.return=m,m=d):(P=Ll(v.type,v.key,v.props,null,m.mode,P),P.ref=ar(m,d,v),P.return=m,m=P)}return o(m);case fe:e:{for($=v.key;d!==null;){if(d.key===$)if(d.tag===4&&d.stateNode.containerInfo===v.containerInfo&&d.stateNode.implementation===v.implementation){n(m,d.sibling),d=l(d,v.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=Oo(v,m.mode,P),d.return=m,m=d}return o(m);case Ue:return $=v._init,Ee(m,d,$(v._payload),P)}if(Un(v))return D(m,d,v,P);if(Q(v))return U(m,d,v,P);ol(m,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,d!==null&&d.tag===6?(n(m,d.sibling),d=l(d,v),d.return=m,m=d):(n(m,d),d=To(v,m.mode,P),d.return=m,m=d),o(m)):n(m,d)}return Ee}var Rn=ks(!0),Es=ks(!1),il=Ft(null),sl=null,zn=null,Au=null;function Vu(){Au=zn=sl=null}function $u(e){var t=il.current;pe(il),e._currentValue=t}function Wu(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Ln(e,t){sl=e,Au=zn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Ve=!0),e.firstContext=null)}function et(e){var t=e._currentValue;if(Au!==e)if(e={context:e,memoizedValue:t,next:null},zn===null){if(sl===null)throw Error(s(308));zn=e,sl.dependencies={lanes:0,firstContext:e}}else zn=zn.next=e;return t}var nn=null;function Hu(e){nn===null?nn=[e]:nn.push(e)}function xs(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Hu(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ct(e,r)}function Ct(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var Bt=!1;function Qu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Cs(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _t(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function At(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(ee&2)!==0){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ct(e,n)}return l=r.interleaved,l===null?(t.next=t,Hu(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ct(e,n)}function al(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uu(e,n)}}function _s(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,u=null;if(n=n.firstBaseUpdate,n!==null){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};u===null?l=u=o:u=u.next=o,n=n.next}while(n!==null);u===null?l=u=t:u=u.next=t}else l=u=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:u,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function cl(e,t,n,r){var l=e.updateQueue;Bt=!1;var u=l.firstBaseUpdate,o=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var f=a,g=f.next;f.next=null,o===null?u=g:o.next=g,o=f;var x=e.alternate;x!==null&&(x=x.updateQueue,a=x.lastBaseUpdate,a!==o&&(a===null?x.firstBaseUpdate=g:a.next=g,x.lastBaseUpdate=f))}if(u!==null){var _=l.baseState;o=0,x=g=f=null,a=u;do{var k=a.lane,O=a.eventTime;if((r&k)===k){x!==null&&(x=x.next={eventTime:O,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var D=e,U=a;switch(k=t,O=n,U.tag){case 1:if(D=U.payload,typeof D=="function"){_=D.call(O,_,k);break e}_=D;break e;case 3:D.flags=D.flags&-65537|128;case 0:if(D=U.payload,k=typeof D=="function"?D.call(O,_,k):D,k==null)break e;_=F({},_,k);break e;case 2:Bt=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,k=l.effects,k===null?l.effects=[a]:k.push(a))}else O={eventTime:O,lane:k,tag:a.tag,payload:a.payload,callback:a.callback,next:null},x===null?(g=x=O,f=_):x=x.next=O,o|=k;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;k=a,a=k.next,k.next=null,l.lastBaseUpdate=k,l.shared.pending=null}}while(!0);if(x===null&&(f=_),l.baseState=f,l.firstBaseUpdate=g,l.lastBaseUpdate=x,t=l.shared.interleaved,t!==null){l=t;do o|=l.lane,l=l.next;while(l!==t)}else u===null&&(l.shared.lanes=0);un|=o,e.lanes=o,e.memoizedState=_}}function Ps(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ju.transition;Ju.transition={};try{e(!1),t()}finally{ie=n,Ju.transition=r}}function Qs(){return tt().memoizedState}function Wf(e,t,n){var r=Ht(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ks(e))Ys(t,n);else if(n=xs(e,t,n,r),n!==null){var l=De();ft(n,e,r,l),Xs(n,t,r)}}function Hf(e,t,n){var r=Ht(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ks(e))Ys(t,l);else{var u=e.alternate;if(e.lanes===0&&(u===null||u.lanes===0)&&(u=t.lastRenderedReducer,u!==null))try{var o=t.lastRenderedState,a=u(o,n);if(l.hasEagerState=!0,l.eagerState=a,ot(a,o)){var f=t.interleaved;f===null?(l.next=l,Hu(t)):(l.next=f.next,f.next=l),t.interleaved=l;return}}catch{}n=xs(e,t,l,r),n!==null&&(l=De(),ft(n,e,r,l),Xs(n,t,r))}}function Ks(e){var t=e.alternate;return e===ge||t!==null&&t===ge}function Ys(e,t){pr=pl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Xs(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,uu(e,n)}}var vl={readContext:et,useCallback:je,useContext:je,useEffect:je,useImperativeHandle:je,useInsertionEffect:je,useLayoutEffect:je,useMemo:je,useReducer:je,useRef:je,useState:je,useDebugValue:je,useDeferredValue:je,useTransition:je,useMutableSource:je,useSyncExternalStore:je,useId:je,unstable_isNewReconciler:!1},Qf={readContext:et,useCallback:function(e,t){return yt().memoizedState=[e,t===void 0?null:t],e},useContext:et,useEffect:Ds,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,hl(4194308,4,As.bind(null,t,e),n)},useLayoutEffect:function(e,t){return hl(4194308,4,e,t)},useInsertionEffect:function(e,t){return hl(4,2,e,t)},useMemo:function(e,t){var n=yt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=yt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Wf.bind(null,ge,e),[r.memoizedState,e]},useRef:function(e){var t=yt();return e={current:e},t.memoizedState=e},useState:Ms,useDebugValue:ro,useDeferredValue:function(e){return yt().memoizedState=e},useTransition:function(){var e=Ms(!1),t=e[0];return e=$f.bind(null,e[1]),yt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ge,l=yt();if(ve){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Re===null)throw Error(s(349));(ln&30)!==0||Ls(r,t,n)}l.memoizedState=n;var u={value:n,getSnapshot:t};return l.queue=u,Ds(Os.bind(null,r,u,e),[e]),r.flags|=2048,vr(9,Ts.bind(null,r,u,n,t),void 0,null),n},useId:function(){var e=yt(),t=Re.identifierPrefix;if(ve){var n=xt,r=Et;n=(r&~(1<<32-ut(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[mt]=t,e[ir]=r,ha(e,t,!1,!1),t.stateNode=e;e:{switch(o=Gl(n,r),n){case"dialog":de("cancel",e),de("close",e),l=r;break;case"iframe":case"object":case"embed":de("load",e),l=r;break;case"video":case"audio":for(l=0;lMn&&(t.flags|=128,r=!0,yr(u,!1),t.lanes=4194304)}else{if(!r)if(e=fl(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),yr(u,!0),u.tail===null&&u.tailMode==="hidden"&&!o.alternate&&!ve)return Ie(t),null}else 2*ke()-u.renderingStartTime>Mn&&n!==1073741824&&(t.flags|=128,r=!0,yr(u,!1),t.lanes=4194304);u.isBackwards?(o.sibling=t.child,t.child=o):(n=u.last,n!==null?n.sibling=o:t.child=o,u.last=o)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=ke(),t.sibling=null,n=ye.current,ce(ye,r?n&1|2:n&1),t):(Ie(t),null);case 22:case 23:return Ro(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Je&1073741824)!==0&&(Ie(t),t.subtreeFlags&6&&(t.flags|=8192)):Ie(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function bf(e,t){switch(Fu(t),t.tag){case 1:return Ae(t.type)&&el(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Tn(),pe(Be),pe(Oe),Gu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Yu(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Nn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return Tn(),null;case 10:return $u(t.type._context),null;case 22:case 23:return Ro(),null;case 24:return null;default:return null}}var Sl=!1,Me=!1,ed=typeof WeakSet=="function"?WeakSet:Set,M=null;function jn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function vo(e,t,n){try{n()}catch(r){Se(e,t,r)}}var ya=!1;function td(e,t){if(Nu=Ar,e=Gi(),wu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,u=r.focusNode;r=r.focusOffset;try{n.nodeType,u.nodeType}catch{n=null;break e}var o=0,a=-1,f=-1,g=0,x=0,_=e,k=null;t:for(;;){for(var O;_!==n||l!==0&&_.nodeType!==3||(a=o+l),_!==u||r!==0&&_.nodeType!==3||(f=o+r),_.nodeType===3&&(o+=_.nodeValue.length),(O=_.firstChild)!==null;)k=_,_=O;for(;;){if(_===e)break t;if(k===n&&++g===l&&(a=o),k===u&&++x===r&&(f=o),(O=_.nextSibling)!==null)break;_=k,k=_.parentNode}_=O}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ru={focusedElem:e,selectionRange:n},Ar=!1,M=t;M!==null;)if(t=M,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,M=e;else for(;M!==null;){t=M;try{var D=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(D!==null){var U=D.memoizedProps,Ee=D.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?U:st(t.type,U),Ee);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(P){Se(t,t.return,P)}if(e=t.sibling,e!==null){e.return=t.return,M=e;break}M=t.return}return D=ya,ya=!1,D}function gr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var u=l.destroy;l.destroy=void 0,u!==void 0&&vo(t,n,u)}l=l.next}while(l!==r)}}function kl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yo(e){var t=e.ref;if(t!==null){var n=e.stateNode;e.tag,e=n,typeof t=="function"?t(e):t.current=e}}function ga(e){var t=e.alternate;t!==null&&(e.alternate=null,ga(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[mt],delete t[ir],delete t[Ou],delete t[Df],delete t[Uf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wa(e){return e.tag===5||e.tag===3||e.tag===4}function Sa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wa(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.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function go(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=qr));else if(r!==4&&(e=e.child,e!==null))for(go(e,t,n),e=e.sibling;e!==null;)go(e,t,n),e=e.sibling}function wo(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(wo(e,t,n),e=e.sibling;e!==null;)wo(e,t,n),e=e.sibling}var Le=null,at=!1;function Vt(e,t,n){for(n=n.child;n!==null;)ka(e,t,n),n=n.sibling}function ka(e,t,n){if(ht&&typeof ht.onCommitFiberUnmount=="function")try{ht.onCommitFiberUnmount(Ir,n)}catch{}switch(n.tag){case 5:Me||jn(n,t);case 6:var r=Le,l=at;Le=null,Vt(e,t,n),Le=r,at=l,Le!==null&&(at?(e=Le,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Le.removeChild(n.stateNode));break;case 18:Le!==null&&(at?(e=Le,n=n.stateNode,e.nodeType===8?Tu(e.parentNode,n):e.nodeType===1&&Tu(e,n),Jn(e)):Tu(Le,n.stateNode));break;case 4:r=Le,l=at,Le=n.stateNode.containerInfo,at=!0,Vt(e,t,n),Le=r,at=l;break;case 0:case 11:case 14:case 15:if(!Me&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var u=l,o=u.destroy;u=u.tag,o!==void 0&&((u&2)!==0||(u&4)!==0)&&vo(n,t,o),l=l.next}while(l!==r)}Vt(e,t,n);break;case 1:if(!Me&&(jn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Se(n,t,a)}Vt(e,t,n);break;case 21:Vt(e,t,n);break;case 22:n.mode&1?(Me=(r=Me)||n.memoizedState!==null,Vt(e,t,n),Me=r):Vt(e,t,n);break;default:Vt(e,t,n)}}function Ea(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new ed),t.forEach(function(r){var l=cd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function ct(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~u}if(r=l,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*rd(r/1960))-r,10e?16:e,Wt===null)var r=!1;else{if(e=Wt,Wt=null,Pl=0,(ee&6)!==0)throw Error(s(331));var l=ee;for(ee|=4,M=e.current;M!==null;){var u=M,o=u.child;if((M.flags&16)!==0){var a=u.deletions;if(a!==null){for(var f=0;fke()-Eo?sn(e,0):ko|=n),We(e,t)}function Ma(e,t){t===0&&((e.mode&1)===0?t=1:(t=Fr,Fr<<=1,(Fr&130023424)===0&&(Fr=4194304)));var n=De();e=Ct(e,t),e!==null&&(Qn(e,t,n),We(e,n))}function ad(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ma(e,n)}function cd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Ma(e,n)}var Fa;Fa=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Be.current)Ve=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Ve=!1,Zf(e,t,n);Ve=(e.flags&131072)!==0}else Ve=!1,ve&&(t.flags&1048576)!==0&&ms(t,ll,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;wl(e,t),e=t.pendingProps;var l=Cn(t,Oe.current);Ln(t,n),l=qu(null,t,r,e,l,n);var u=bu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(u=!0,tl(t)):u=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Qu(t),l.updater=yl,t.stateNode=l,l._reactInternals=t,uo(t,r,e,n),t=ao(null,t,r,!0,u,n)):(t.tag=0,ve&&u&&Mu(t),Fe(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(wl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=dd(r),e=st(r,e),l){case 0:t=so(null,t,r,e,n);break e;case 1:t=sa(null,t,r,e,n);break e;case 11:t=ra(null,t,r,e,n);break e;case 14:t=la(null,t,r,st(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:st(r,l),so(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:st(r,l),sa(e,t,r,l,n);case 3:e:{if(aa(t),e===null)throw Error(s(387));r=t.pendingProps,u=t.memoizedState,l=u.element,Cs(e,t),cl(t,r,null,n);var o=t.memoizedState;if(r=o.element,u.isDehydrated)if(u={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=u,t.memoizedState=u,t.flags&256){l=On(Error(s(423)),t),t=ca(e,t,r,n,l);break e}else if(r!==l){l=On(Error(s(424)),t),t=ca(e,t,r,n,l);break e}else for(Ge=Mt(t.stateNode.containerInfo.firstChild),Xe=t,ve=!0,it=null,n=Es(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Nn(),r===l){t=Pt(e,t,n);break e}Fe(e,t,r,n)}t=t.child}return t;case 5:return Ns(t),e===null&&Uu(t),r=t.type,l=t.pendingProps,u=e!==null?e.memoizedProps:null,o=l.children,zu(r,l)?o=null:u!==null&&zu(r,u)&&(t.flags|=32),ia(e,t),Fe(e,t,o,n),t.child;case 6:return e===null&&Uu(t),null;case 13:return fa(e,t,n);case 4:return Ku(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rn(t,null,r,n):Fe(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:st(r,l),ra(e,t,r,l,n);case 7:return Fe(e,t,t.pendingProps,n),t.child;case 8:return Fe(e,t,t.pendingProps.children,n),t.child;case 12:return Fe(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,u=t.memoizedProps,o=l.value,ce(il,r._currentValue),r._currentValue=o,u!==null)if(ot(u.value,o)){if(u.children===l.children&&!Be.current){t=Pt(e,t,n);break e}}else for(u=t.child,u!==null&&(u.return=t);u!==null;){var a=u.dependencies;if(a!==null){o=u.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(u.tag===1){f=_t(-1,n&-n),f.tag=2;var g=u.updateQueue;if(g!==null){g=g.shared;var x=g.pending;x===null?f.next=f:(f.next=x.next,x.next=f),g.pending=f}}u.lanes|=n,f=u.alternate,f!==null&&(f.lanes|=n),Wu(u.return,n,t),a.lanes|=n;break}f=f.next}}else if(u.tag===10)o=u.type===t.type?null:u.child;else if(u.tag===18){if(o=u.return,o===null)throw Error(s(341));o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Wu(o,n,t),o=u.sibling}else o=u.child;if(o!==null)o.return=u;else for(o=u;o!==null;){if(o===t){o=null;break}if(u=o.sibling,u!==null){u.return=o.return,o=u;break}o=o.return}u=o}Fe(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Ln(t,n),l=et(l),r=r(l),t.flags|=1,Fe(e,t,r,n),t.child;case 14:return r=t.type,l=st(r,t.pendingProps),l=st(r.type,l),la(e,t,r,l,n);case 15:return ua(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:st(r,l),wl(e,t),t.tag=1,Ae(r)?(e=!0,tl(t)):e=!1,Ln(t,n),Js(t,r,l),uo(t,r,l,n),ao(null,t,r,!0,e,n);case 19:return pa(e,t,n);case 22:return oa(e,t,n)}throw Error(s(156,t.tag))};function Da(e,t){return vi(e,t)}function fd(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function rt(e,t,n,r){return new fd(e,t,n,r)}function Lo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function dd(e){if(typeof e=="function")return Lo(e)?1:0;if(e!=null){if(e=e.$$typeof,e===dt)return 11;if(e===pt)return 14}return 2}function Kt(e,t){var n=e.alternate;return n===null?(n=rt(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ll(e,t,n,r,l,u){var o=2;if(r=e,typeof e=="function")Lo(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case he:return cn(n.children,l,u,t);case Ze:o=8,l|=8;break;case Rt:return e=rt(12,n,t,l|2),e.elementType=Rt,e.lanes=u,e;case Qe:return e=rt(13,n,t,l),e.elementType=Qe,e.lanes=u,e;case lt:return e=rt(19,n,t,l),e.elementType=lt,e.lanes=u,e;case we:return Tl(n,l,u,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case wt:o=10;break e;case Jt:o=9;break e;case dt:o=11;break e;case pt:o=14;break e;case Ue:o=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=rt(o,n,t,l),t.elementType=e,t.type=r,t.lanes=u,t}function cn(e,t,n,r){return e=rt(7,e,r,t),e.lanes=n,e}function Tl(e,t,n,r){return e=rt(22,e,r,t),e.elementType=we,e.lanes=n,e.stateNode={isHidden:!1},e}function To(e,t,n){return e=rt(6,e,null,t),e.lanes=n,e}function Oo(e,t,n){return t=rt(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function pd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=lu(0),this.expirationTimes=lu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function jo(e,t,n,r,l,u,o,a,f){return e=new pd(e,t,n,a,f),t===1?(t=1,u===!0&&(t|=8)):t=0,u=rt(3,null,null,t),e.current=u,u.stateNode=e,u.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Qu(u),e}function hd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(i)}catch(c){console.error(c)}}return i(),Bo.exports=Nd(),Bo.exports}var Za;function Rd(){if(Za)return Ul;Za=1;var i=cc();return Ul.createRoot=i.createRoot,Ul.hydrateRoot=i.hydrateRoot,Ul}var zd=Rd();const Ld=sc(zd);cc();function Cr(){return Cr=Object.assign?Object.assign.bind():function(i){for(var c=1;c"u")throw new Error(c)}function Yo(i,c){if(!i){typeof console<"u"&&console.warn(c);try{throw new Error(c)}catch{}}}function Od(){return Math.random().toString(36).substr(2,8)}function ba(i,c){return{usr:i.state,key:i.key,idx:c}}function Wo(i,c,s,p){return s===void 0&&(s=null),Cr({pathname:typeof i=="string"?i:i.pathname,search:"",hash:""},typeof c=="string"?Dn(c):c,{state:s,key:c&&c.key||p||Od()})}function fc(i){let{pathname:c="/",search:s="",hash:p=""}=i;return s&&s!=="?"&&(c+=s.charAt(0)==="?"?s:"?"+s),p&&p!=="#"&&(c+=p.charAt(0)==="#"?p:"#"+p),c}function Dn(i){let c={};if(i){let s=i.indexOf("#");s>=0&&(c.hash=i.substr(s),i=i.substr(0,s));let p=i.indexOf("?");p>=0&&(c.search=i.substr(p),i=i.substr(0,p)),i&&(c.pathname=i)}return c}function jd(i,c,s,p){p===void 0&&(p={});let{window:y=document.defaultView,v5Compat:w=!1}=p,S=y.history,R=Xt.Pop,C=null,j=I();j==null&&(j=0,S.replaceState(Cr({},S.state,{idx:j}),""));function I(){return(S.state||{idx:null}).idx}function N(){R=Xt.Pop;let L=I(),G=L==null?null:L-j;j=L,C&&C({action:R,location:H.location,delta:G})}function A(L,G){R=Xt.Push;let Y=Wo(H.location,L,G);j=I()+1;let se=ba(Y,j),V=H.createHref(Y);try{S.pushState(se,"",V)}catch(ue){if(ue instanceof DOMException&&ue.name==="DataCloneError")throw ue;y.location.assign(V)}w&&C&&C({action:R,location:H.location,delta:1})}function b(L,G){R=Xt.Replace;let Y=Wo(H.location,L,G);j=I();let se=ba(Y,j),V=H.createHref(Y);S.replaceState(se,"",V),w&&C&&C({action:R,location:H.location,delta:0})}function q(L){let G=y.location.origin!=="null"?y.location.origin:y.location.href,Y=typeof L=="string"?L:fc(L);return Y=Y.replace(/ $/,"%20"),Ce(G,"No window.location.(origin|href) available to create URL for href: "+Y),new URL(Y,G)}let H={get action(){return R},get location(){return i(y,S)},listen(L){if(C)throw new Error("A history only accepts one active listener");return y.addEventListener(qa,N),C=L,()=>{y.removeEventListener(qa,N),C=null}},createHref(L){return c(y,L)},createURL:q,encodeLocation(L){let G=q(L);return{pathname:G.pathname,search:G.search,hash:G.hash}},push:A,replace:b,go(L){return S.go(L)}};return H}var ec;(function(i){i.data="data",i.deferred="deferred",i.redirect="redirect",i.error="error"})(ec||(ec={}));function Id(i,c,s){return s===void 0&&(s="/"),Md(i,c,s)}function Md(i,c,s,p){let y=typeof c=="string"?Dn(c):c,w=hc(y.pathname||"/",s);if(w==null)return null;let S=dc(i);Fd(S);let R=null;for(let C=0;R==null&&C{let C={relativePath:R===void 0?w.path||"":R,caseSensitive:w.caseSensitive===!0,childrenIndex:S,route:w};C.relativePath.startsWith("/")&&(Ce(C.relativePath.startsWith(p),'Absolute route path "'+C.relativePath+'" nested under path '+('"'+p+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),C.relativePath=C.relativePath.slice(p.length));let j=fn([p,C.relativePath]),I=s.concat(C);w.children&&w.children.length>0&&(Ce(w.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+j+'".')),dc(w.children,c,I,j)),!(w.path==null&&!w.index)&&c.push({path:j,score:Wd(j,w.index),routesMeta:I})};return i.forEach((w,S)=>{var R;if(w.path===""||!((R=w.path)!=null&&R.includes("?")))y(w,S);else for(let C of pc(w.path))y(w,S,C)}),c}function pc(i){let c=i.split("/");if(c.length===0)return[];let[s,...p]=c,y=s.endsWith("?"),w=s.replace(/\?$/,"");if(p.length===0)return y?[w,""]:[w];let S=pc(p.join("/")),R=[];return R.push(...S.map(C=>C===""?w:[w,C].join("/"))),y&&R.push(...S),R.map(C=>i.startsWith("/")&&C===""?"/":C)}function Fd(i){i.sort((c,s)=>c.score!==s.score?s.score-c.score:Hd(c.routesMeta.map(p=>p.childrenIndex),s.routesMeta.map(p=>p.childrenIndex)))}const Dd=/^:[\w-]+$/,Ud=3,Bd=2,Ad=1,Vd=10,$d=-2,tc=i=>i==="*";function Wd(i,c){let s=i.split("/"),p=s.length;return s.some(tc)&&(p+=$d),c&&(p+=Bd),s.filter(y=>!tc(y)).reduce((y,w)=>y+(Dd.test(w)?Ud:w===""?Ad:Vd),p)}function Hd(i,c){return i.length===c.length&&i.slice(0,-1).every((p,y)=>p===c[y])?i[i.length-1]-c[c.length-1]:0}function Qd(i,c,s){let{routesMeta:p}=i,y={},w="/",S=[];for(let R=0;R{let{paramName:A,isOptional:b}=I;if(A==="*"){let H=R[N]||"";S=w.slice(0,w.length-H.length).replace(/(.)\/+$/,"$1")}const q=R[N];return b&&!q?j[A]=void 0:j[A]=(q||"").replace(/%2F/g,"/"),j},{}),pathname:w,pathnameBase:S,pattern:i}}function Yd(i,c,s){c===void 0&&(c=!1),s===void 0&&(s=!0),Yo(i==="*"||!i.endsWith("*")||i.endsWith("/*"),'Route path "'+i+'" will be treated as if it were '+('"'+i.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+i.replace(/\*$/,"/*")+'".'));let p=[],y="^"+i.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(S,R,C)=>(p.push({paramName:R,isOptional:C!=null}),C?"/?([^\\/]+)?":"/([^\\/]+)"));return i.endsWith("*")?(p.push({paramName:"*"}),y+=i==="*"||i==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):s?y+="\\/*$":i!==""&&i!=="/"&&(y+="(?:(?=\\/|$))"),[new RegExp(y,c?void 0:"i"),p]}function Xd(i){try{return i.split("/").map(c=>decodeURIComponent(c).replace(/\//g,"%2F")).join("/")}catch(c){return Yo(!1,'The URL path "'+i+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+c+").")),i}}function hc(i,c){if(c==="/")return i;if(!i.toLowerCase().startsWith(c.toLowerCase()))return null;let s=c.endsWith("/")?c.length-1:c.length,p=i.charAt(s);return p&&p!=="/"?null:i.slice(s)||"/"}const Gd=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Jd=i=>Gd.test(i);function Zd(i,c){c===void 0&&(c="/");let{pathname:s,search:p="",hash:y=""}=typeof i=="string"?Dn(i):i,w;if(s)if(Jd(s))w=s;else{if(s.includes("//")){let S=s;s=s.replace(/\/\/+/g,"/"),Yo(!1,"Pathnames cannot have embedded double slashes - normalizing "+(S+" -> "+s))}s.startsWith("/")?w=nc(s.substring(1),"/"):w=nc(s,c)}else w=c;return{pathname:w,search:ep(p),hash:tp(y)}}function nc(i,c){let s=c.replace(/\/+$/,"").split("/");return i.split("/").forEach(y=>{y===".."?s.length>1&&s.pop():y!=="."&&s.push(y)}),s.length>1?s.join("/"):"/"}function $o(i,c,s,p){return"Cannot include a '"+i+"' character in a manually specified "+("`to."+c+"` field ["+JSON.stringify(p)+"]. Please separate it out to the ")+("`to."+s+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function qd(i){return i.filter((c,s)=>s===0||c.route.path&&c.route.path.length>0)}function mc(i,c){let s=qd(i);return c?s.map((p,y)=>y===s.length-1?p.pathname:p.pathnameBase):s.map(p=>p.pathnameBase)}function vc(i,c,s,p){p===void 0&&(p=!1);let y;typeof i=="string"?y=Dn(i):(y=Cr({},i),Ce(!y.pathname||!y.pathname.includes("?"),$o("?","pathname","search",y)),Ce(!y.pathname||!y.pathname.includes("#"),$o("#","pathname","hash",y)),Ce(!y.search||!y.search.includes("#"),$o("#","search","hash",y)));let w=i===""||y.pathname==="",S=w?"/":y.pathname,R;if(S==null)R=s;else{let N=c.length-1;if(!p&&S.startsWith("..")){let A=S.split("/");for(;A[0]==="..";)A.shift(),N-=1;y.pathname=A.join("/")}R=N>=0?c[N]:"/"}let C=Zd(y,R),j=S&&S!=="/"&&S.endsWith("/"),I=(w||S===".")&&s.endsWith("/");return!C.pathname.endsWith("/")&&(j||I)&&(C.pathname+="/"),C}const fn=i=>i.join("/").replace(/\/\/+/g,"/"),bd=i=>i.replace(/\/+$/,"").replace(/^\/*/,"/"),ep=i=>!i||i==="?"?"":i.startsWith("?")?i:"?"+i,tp=i=>!i||i==="#"?"":i.startsWith("#")?i:"#"+i;function np(i){return i!=null&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.internal=="boolean"&&"data"in i}const yc=["post","put","patch","delete"];new Set(yc);const rp=["get",...yc];new Set(rp);function _r(){return _r=Object.assign?Object.assign.bind():function(i){for(var c=1;c{R.current=!0}),z.useCallback(function(j,I){if(I===void 0&&(I={}),!R.current)return;if(typeof j=="number"){p.go(j);return}let N=vc(j,JSON.parse(S),w,I.relative==="path");i==null&&c!=="/"&&(N.pathname=N.pathname==="/"?c:fn([c,N.pathname])),(I.replace?p.replace:p.push)(N,I.state,I)},[c,p,S,w,i])}function op(){let{matches:i}=z.useContext(Gt),c=i[i.length-1];return c?c.params:{}}function ip(i,c){return sp(i,c)}function sp(i,c,s,p){Nr()||Ce(!1);let{navigator:y}=z.useContext(Pr),{matches:w}=z.useContext(Gt),S=w[w.length-1],R=S?S.params:{};S&&S.pathname;let C=S?S.pathnameBase:"/";S&&S.route;let j=Vl(),I;if(c){var N;let L=typeof c=="string"?Dn(c):c;C==="/"||(N=L.pathname)!=null&&N.startsWith(C)||Ce(!1),I=L}else I=j;let A=I.pathname||"/",b=A;if(C!=="/"){let L=C.replace(/^\//,"").split("/");b="/"+A.replace(/^\//,"").split("/").slice(L.length).join("/")}let q=Id(i,{pathname:b}),H=pp(q&&q.map(L=>Object.assign({},L,{params:Object.assign({},R,L.params),pathname:fn([C,y.encodeLocation?y.encodeLocation(L.pathname).pathname:L.pathname]),pathnameBase:L.pathnameBase==="/"?C:fn([C,y.encodeLocation?y.encodeLocation(L.pathnameBase).pathname:L.pathnameBase])})),w,s,p);return c&&H?z.createElement(Al.Provider,{value:{location:_r({pathname:"/",search:"",hash:"",state:null,key:"default"},I),navigationType:Xt.Pop}},H):H}function ap(){let i=yp(),c=np(i)?i.status+" "+i.statusText:i instanceof Error?i.message:JSON.stringify(i),s=i instanceof Error?i.stack:null,y={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return z.createElement(z.Fragment,null,z.createElement("h2",null,"Unexpected Application Error!"),z.createElement("h3",{style:{fontStyle:"italic"}},c),s?z.createElement("pre",{style:y},s):null,null)}const cp=z.createElement(ap,null);class fp extends z.Component{constructor(c){super(c),this.state={location:c.location,revalidation:c.revalidation,error:c.error}}static getDerivedStateFromError(c){return{error:c}}static getDerivedStateFromProps(c,s){return s.location!==c.location||s.revalidation!=="idle"&&c.revalidation==="idle"?{error:c.error,location:c.location,revalidation:c.revalidation}:{error:c.error!==void 0?c.error:s.error,location:s.location,revalidation:c.revalidation||s.revalidation}}componentDidCatch(c,s){console.error("React Router caught the following error during render",c,s)}render(){return this.state.error!==void 0?z.createElement(Gt.Provider,{value:this.props.routeContext},z.createElement(gc.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function dp(i){let{routeContext:c,match:s,children:p}=i,y=z.useContext(Xo);return y&&y.static&&y.staticContext&&(s.route.errorElement||s.route.ErrorBoundary)&&(y.staticContext._deepestRenderedBoundaryId=s.route.id),z.createElement(Gt.Provider,{value:c},p)}function pp(i,c,s,p){var y;if(c===void 0&&(c=[]),s===void 0&&(s=null),p===void 0&&(p=null),i==null){var w;if(!s)return null;if(s.errors)i=s.matches;else if((w=p)!=null&&w.v7_partialHydration&&c.length===0&&!s.initialized&&s.matches.length>0)i=s.matches;else return null}let S=i,R=(y=s)==null?void 0:y.errors;if(R!=null){let I=S.findIndex(N=>N.route.id&&R?.[N.route.id]!==void 0);I>=0||Ce(!1),S=S.slice(0,Math.min(S.length,I+1))}let C=!1,j=-1;if(s&&p&&p.v7_partialHydration)for(let I=0;I=0?S=S.slice(0,j+1):S=[S[0]];break}}}return S.reduceRight((I,N,A)=>{let b,q=!1,H=null,L=null;s&&(b=R&&N.route.id?R[N.route.id]:void 0,H=N.route.errorElement||cp,C&&(j<0&&A===0?(wp("route-fallback"),q=!0,L=null):j===A&&(q=!0,L=N.route.hydrateFallbackElement||null)));let G=c.concat(S.slice(0,A+1)),Y=()=>{let se;return b?se=H:q?se=L:N.route.Component?se=z.createElement(N.route.Component,null):N.route.element?se=N.route.element:se=I,z.createElement(dp,{match:N,routeContext:{outlet:I,matches:G,isDataRoute:s!=null},children:se})};return s&&(N.route.ErrorBoundary||N.route.errorElement||A===0)?z.createElement(fp,{location:s.location,revalidation:s.revalidation,component:H,error:b,children:Y(),routeContext:{outlet:null,matches:G,isDataRoute:!0}}):Y()},null)}var Sc=(function(i){return i.UseBlocker="useBlocker",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i})(Sc||{}),kc=(function(i){return i.UseBlocker="useBlocker",i.UseLoaderData="useLoaderData",i.UseActionData="useActionData",i.UseRouteError="useRouteError",i.UseNavigation="useNavigation",i.UseRouteLoaderData="useRouteLoaderData",i.UseMatches="useMatches",i.UseRevalidator="useRevalidator",i.UseNavigateStable="useNavigate",i.UseRouteId="useRouteId",i})(kc||{});function hp(i){let c=z.useContext(Xo);return c||Ce(!1),c}function mp(i){let c=z.useContext(lp);return c||Ce(!1),c}function vp(i){let c=z.useContext(Gt);return c||Ce(!1),c}function Ec(i){let c=vp(),s=c.matches[c.matches.length-1];return s.route.id||Ce(!1),s.route.id}function yp(){var i;let c=z.useContext(gc),s=mp(),p=Ec();return c!==void 0?c:(i=s.errors)==null?void 0:i[p]}function gp(){let{router:i}=hp(Sc.UseNavigateStable),c=Ec(kc.UseNavigateStable),s=z.useRef(!1);return wc(()=>{s.current=!0}),z.useCallback(function(y,w){w===void 0&&(w={}),s.current&&(typeof y=="number"?i.navigate(y):i.navigate(y,_r({fromRouteId:c},w)))},[i,c])}const rc={};function wp(i,c,s){rc[i]||(rc[i]=!0)}function Sp(i,c){i?.v7_startTransition,i?.v7_relativeSplatPath}function kp(i){let{to:c,replace:s,state:p,relative:y}=i;Nr()||Ce(!1);let{future:w,static:S}=z.useContext(Pr),{matches:R}=z.useContext(Gt),{pathname:C}=Vl(),j=$l(),I=vc(c,mc(R,w.v7_relativeSplatPath),C,y==="path"),N=JSON.stringify(I);return z.useEffect(()=>j(JSON.parse(N),{replace:s,state:p,relative:y}),[j,N,y,s,p]),null}function Bl(i){Ce(!1)}function Ep(i){let{basename:c="/",children:s=null,location:p,navigationType:y=Xt.Pop,navigator:w,static:S=!1,future:R}=i;Nr()&&Ce(!1);let C=c.replace(/^\/*/,"/"),j=z.useMemo(()=>({basename:C,navigator:w,static:S,future:_r({v7_relativeSplatPath:!1},R)}),[C,R,w,S]);typeof p=="string"&&(p=Dn(p));let{pathname:I="/",search:N="",hash:A="",state:b=null,key:q="default"}=p,H=z.useMemo(()=>{let L=hc(I,C);return L==null?null:{location:{pathname:L,search:N,hash:A,state:b,key:q},navigationType:y}},[C,I,N,A,b,q,y]);return H==null?null:z.createElement(Pr.Provider,{value:j},z.createElement(Al.Provider,{children:s,value:H}))}function xp(i){let{children:c,location:s}=i;return ip(Ho(c),s)}new Promise(()=>{});function Ho(i,c){c===void 0&&(c=[]);let s=[];return z.Children.forEach(i,(p,y)=>{if(!z.isValidElement(p))return;let w=[...c,y];if(p.type===z.Fragment){s.push.apply(s,Ho(p.props.children,w));return}p.type!==Bl&&Ce(!1),!p.props.index||!p.props.children||Ce(!1);let S={id:p.props.id||w.join("-"),caseSensitive:p.props.caseSensitive,element:p.props.element,Component:p.props.Component,index:p.props.index,path:p.props.path,loader:p.props.loader,action:p.props.action,errorElement:p.props.errorElement,ErrorBoundary:p.props.ErrorBoundary,hasErrorBoundary:p.props.ErrorBoundary!=null||p.props.errorElement!=null,shouldRevalidate:p.props.shouldRevalidate,handle:p.props.handle,lazy:p.props.lazy};p.props.children&&(S.children=Ho(p.props.children,w)),s.push(S)}),s}function Qo(i){return i===void 0&&(i=""),new URLSearchParams(typeof i=="string"||Array.isArray(i)||i instanceof URLSearchParams?i:Object.keys(i).reduce((c,s)=>{let p=i[s];return c.concat(Array.isArray(p)?p.map(y=>[s,y]):[[s,p]])},[]))}function Cp(i,c){let s=Qo(i);return c&&c.forEach((p,y)=>{s.has(y)||c.getAll(y).forEach(w=>{s.append(y,w)})}),s}const _p="6";try{window.__reactRouterVersion=_p}catch{}const Pp="startTransition",lc=Cd[Pp];function Np(i){let{basename:c,children:s,future:p,window:y}=i,w=z.useRef();w.current==null&&(w.current=Td({window:y,v5Compat:!0}));let S=w.current,[R,C]=z.useState({action:S.action,location:S.location}),{v7_startTransition:j}=p||{},I=z.useCallback(N=>{j&&lc?lc(()=>C(N)):C(N)},[C,j]);return z.useLayoutEffect(()=>S.listen(I),[S,I]),z.useEffect(()=>Sp(p),[p]),z.createElement(Ep,{basename:c,children:s,location:R.location,navigationType:R.action,navigator:S,future:p})}var uc;(function(i){i.UseScrollRestoration="useScrollRestoration",i.UseSubmit="useSubmit",i.UseSubmitFetcher="useSubmitFetcher",i.UseFetcher="useFetcher",i.useViewTransitionState="useViewTransitionState"})(uc||(uc={}));var oc;(function(i){i.UseFetcher="useFetcher",i.UseFetchers="useFetchers",i.UseScrollRestoration="useScrollRestoration"})(oc||(oc={}));function Rp(i){let c=z.useRef(Qo(i)),s=z.useRef(!1),p=Vl(),y=z.useMemo(()=>Cp(p.search,s.current?null:c.current),[p.search]),w=$l(),S=z.useCallback((R,C)=>{const j=Qo(typeof R=="function"?R(y):R);s.current=!0,w("?"+j,C)},[w,y]);return[y,S]}async function ic(i){const c=new URLSearchParams({limit:"80"});i&&c.set("cursor",i);const s=await fetch(`/api/feed?${c.toString()}`);if(!s.ok)throw new Error(`feed failed: ${s.status}`);return await s.json()}async function zp(i){const c=await fetch("/api/albums",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({filename:i.name,sizeBytes:i.size})});if(!c.ok)throw new Error(`create album failed: ${c.status}`);return await c.json()}async function Lp(i,c,s){const p=await fetch(i,{method:"PUT",headers:s,body:c});if(!p.ok)throw new Error(`zip upload failed: ${p.status}`)}async function Tp(i,c){const s=new FormData;s.append("file",c);const p=await fetch(`/api/albums/${i}/upload`,{method:"POST",body:s});if(!p.ok)throw new Error(`zip fallback upload failed: ${p.status}`)}async function Op(i){const c=await fetch(`/api/albums/${i}/finalize`,{method:"POST"});if(!c.ok)throw new Error(`finalize failed: ${c.status}`);return await c.json()}async function jp(i){const c=await fetch(`/api/albums/${i}`);if(!c.ok)throw new Error(`fetch album failed: ${c.status}`);return await c.json()}const Ip=[1,2,3,4];function Mp(){const[i,c]=z.useState([]),[s,p]=z.useState(void 0),[y,w]=z.useState(!1),[S,R]=z.useState(!0),[C,j]=z.useState(3),[I,N]=z.useState(null),[A,b]=z.useState(!1),q=z.useRef(null),H=z.useRef(null),L=$l(),G=z.useMemo(()=>({columnCount:C}),[C]),Y=z.useCallback(async()=>{if(!(y||!S)){w(!0),N(null);try{const V=await ic(s);c(ue=>[...ue,...V.items]),p(V.nextCursor),R(!!V.nextCursor)}catch(V){N(V.message)}finally{w(!1)}}},[s,y,S]);z.useEffect(()=>{Y()},[]),z.useEffect(()=>{const V=q.current;if(!V)return;const ue=new IntersectionObserver(fe=>{for(const he of fe)he.isIntersecting&&Y()},{rootMargin:"1200px"});return ue.observe(V),()=>ue.disconnect()},[Y]);const se=async V=>{const ue=V.target.files?.[0];if(ue){b(!0),N(null);try{const fe=await zp(ue);try{await Lp(fe.upload.url,ue,fe.upload.headers)}catch{await Tp(fe.albumId,ue)}await Op(fe.albumId);const he=await ic();c(he.items),p(he.nextCursor),R(!!he.nextCursor)}catch(fe){N(fe.message)}finally{b(!1),V.target&&(V.target.value="")}}};return le.jsxs("div",{className:"wall-page",children:[le.jsx("div",{className:"wall-grid",style:G,"data-testid":"wall-grid",children:i.map((V,ue)=>le.jsx("button",{className:"tile",onClick:()=>L(`/album/${V.albumId}?i=${V.i}`),"data-testid":"wall-tile",children:le.jsx("img",{src:V.src,alt:"",loading:"lazy",style:{aspectRatio:`${V.w} / ${V.h}`}})},`${V.albumId}-${V.i}-${ue}`))}),le.jsx("div",{ref:q,className:"sentinel"}),le.jsxs("div",{className:"bottom-bar",children:[le.jsx("div",{className:"columns",children:Ip.map(V=>le.jsx("button",{className:V===C?"active":"",onClick:()=>j(V),"data-testid":`columns-${V}`,children:V},V))}),le.jsx("button",{className:"upload",onClick:()=>H.current?.click(),disabled:A,"data-testid":"upload-button",children:A?"Uploading...":"+"}),le.jsx("input",{ref:H,type:"file",accept:".zip",hidden:!0,onChange:se,"data-testid":"upload-input"})]}),y&&le.jsx("div",{className:"status",children:"Loading..."}),I&&le.jsx("div",{className:"status error",children:I})]})}function Fp(){const{albumId:i=""}=op(),[c]=Rp(),s=Number(c.get("i")??"0"),[p,y]=z.useState(null),[w,S]=z.useState(Number.isFinite(s)?s:0),[R,C]=z.useState(!0),[j,I]=z.useState(null),N=z.useRef(null),A=$l();z.useEffect(()=>{let G=!1;return(async()=>{try{const Y=await jp(i);G||(y(Y),(w<0||w>=Y.photoCount)&&S(0))}catch(Y){G||I(Y.message)}})(),()=>{G=!0}},[i]);const b=z.useMemo(()=>p?`/api/image/${p.albumId}/${w}?mode=viewer&max=0`:"",[p,w]),q=G=>{const Y=G.changedTouches[0];N.current={x:Y.clientX,y:Y.clientY,t:Date.now()}},H=G=>{const Y=N.current;if(!Y||!p)return;const se=G.changedTouches[0],V=se.clientX-Y.x,ue=se.clientY-Y.y;if(!(Date.now()-Y.t>600)){if(Math.abs(V)>Math.abs(ue)&&Math.abs(V)>40){V<0&&whe+1),V>0&&w>0&&S(he=>he-1);return}ue>70&&Math.abs(ue)>Math.abs(V)&&A(-1)}},L=()=>C(G=>!G);return j?le.jsx("div",{className:"viewer-error",children:j}):p?le.jsxs("div",{className:"viewer",onTouchStart:q,onTouchEnd:H,onClick:L,children:[R&&le.jsxs("div",{className:"viewer-overlay top","data-testid":"viewer-overlay",children:[le.jsx("button",{onClick:()=>A(-1),"data-testid":"viewer-close",children:"Close"}),le.jsxs("span",{children:[w+1," / ",p.photoCount]})]}),le.jsx("img",{src:b,alt:"",className:"viewer-image","data-testid":"viewer-image"}),R&&le.jsx("div",{className:"viewer-overlay bottom",children:le.jsx("div",{className:"progress",children:le.jsx("div",{className:"progress-bar",style:{width:`${(w+1)/p.photoCount*100}%`}})})})]}):le.jsx("div",{className:"viewer-loading",children:"Loading album..."})}function Dp(){return le.jsx(Np,{children:le.jsxs(xp,{children:[le.jsx(Bl,{path:"/",element:le.jsx(Mp,{})}),le.jsx(Bl,{path:"/album/:albumId",element:le.jsx(Fp,{})}),le.jsx(Bl,{path:"*",element:le.jsx(kp,{to:"/",replace:!0})})]})})}Ld.createRoot(document.getElementById("root")).render(le.jsx(ac.StrictMode,{children:le.jsx(Dp,{})}));