@agi-cli/web-ui 0.1.88 → 0.1.89
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
`+P[d].replace(" at new "," at ");return r.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",r.displayName)),re}while(1<=d&&0<=g);break}}}finally{Vt=!1,Error.prepareStackTrace=l}return(l=r?r.displayName||r.name:"")?Ht(l):""}function Yt(r,i){switch(r.tag){case 26:case 27:case 5:return Ht(r.type);case 16:return Ht("Lazy");case 13:return r.child!==i&&i!==null?Ht("Suspense Fallback"):Ht("Suspense");case 19:return Ht("SuspenseList");case 0:case 15:return Xe(r.type,!1);case 11:return Xe(r.type.render,!1);case 1:return Xe(r.type,!0);case 31:return Ht("Activity");default:return""}}function Qt(r){try{var i="",l=null;do i+=Yt(r,l),l=r,r=r.return;while(r);return i}catch(d){return`
|
|
47
47
|
Error generating stack: `+d.message+`
|
|
48
48
|
`+d.stack}}var Jt=Object.prototype.hasOwnProperty,xt=e.unstable_scheduleCallback,Nn=e.unstable_cancelCallback,mn=e.unstable_shouldYield,Be=e.unstable_requestPaint,ke=e.unstable_now,Ge=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,le=e.unstable_UserBlockingPriority,fe=e.unstable_NormalPriority,Ee=e.unstable_LowPriority,Fe=e.unstable_IdlePriority,Ot=e.log,It=e.unstable_setDisableYieldValue,dt=null,Ze=null;function it(r){if(typeof Ot=="function"&&It(r),Ze&&typeof Ze.setStrictMode=="function")try{Ze.setStrictMode(dt,r)}catch{}}var $e=Math.clz32?Math.clz32:Cn,en=Math.log,jt=Math.LN2;function Cn(r){return r>>>=0,r===0?32:31-(en(r)/jt|0)|0}var ot=256,Wn=262144,ti=4194304;function Xn(r){var i=r&42;if(i!==0)return i;switch(r&-r){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 r&261888;case 262144:case 524288:case 1048576:case 2097152:return r&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return r&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return r}}function Sa(r,i,l){var d=r.pendingLanes;if(d===0)return 0;var g=0,S=r.suspendedLanes,T=r.pingedLanes;r=r.warmLanes;var O=d&134217727;return O!==0?(d=O&~S,d!==0?g=Xn(d):(T&=O,T!==0?g=Xn(T):l||(l=O&~r,l!==0&&(g=Xn(l))))):(O=d&~S,O!==0?g=Xn(O):T!==0?g=Xn(T):l||(l=d&~r,l!==0&&(g=Xn(l)))),g===0?0:i!==0&&i!==g&&(i&S)===0&&(S=g&-g,l=i&-i,S>=l||S===32&&(l&4194048)!==0)?i:g}function Ur(r,i){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&i)===0}function is(r,i){switch(r){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 xv(){var r=ti;return ti<<=1,(ti&62914560)===0&&(ti=4194304),r}function ec(r){for(var i=[],l=0;31>l;l++)i.push(r);return i}function ss(r,i){r.pendingLanes|=i,i!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function vL(r,i,l,d,g,S){var T=r.pendingLanes;r.pendingLanes=l,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=l,r.entangledLanes&=l,r.errorRecoveryDisabledLanes&=l,r.shellSuspendCounter=0;var O=r.entanglements,P=r.expirationTimes,X=r.hiddenUpdates;for(l=T&~l;0<l;){var re=31-$e(l),se=1<<re;O[re]=0,P[re]=-1;var Q=X[re];if(Q!==null)for(X[re]=null,re=0;re<Q.length;re++){var ee=Q[re];ee!==null&&(ee.lane&=-536870913)}l&=~se}d!==0&&wv(r,d,0),S!==0&&g===0&&r.tag!==0&&(r.suspendedLanes|=S&~(T&~i))}function wv(r,i,l){r.pendingLanes|=i,r.suspendedLanes&=~i;var d=31-$e(i);r.entangledLanes|=i,r.entanglements[d]=r.entanglements[d]|1073741824|l&261930}function Tv(r,i){var l=r.entangledLanes|=i;for(r=r.entanglements;l;){var d=31-$e(l),g=1<<d;g&i|r[d]&i&&(r[d]|=i),l&=~g}}function Av(r,i){var l=i&-i;return l=(l&42)!==0?1:tc(l),(l&(r.suspendedLanes|i))!==0?0:l}function tc(r){switch(r){case 2:r=1;break;case 8:r=4;break;case 32:r=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:r=128;break;case 268435456:r=134217728;break;default:r=0}return r}function nc(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function Rv(){var r=ne.p;return r!==0?r:(r=window.event,r===void 0?32:dT(r.type))}function _v(r,i){var l=ne.p;try{return ne.p=r,i()}finally{ne.p=l}}var Br=Math.random().toString(36).slice(2),Lt="__reactFiber$"+Br,tn="__reactProps$"+Br,ni="__reactContainer$"+Br,rc="__reactEvents$"+Br,EL="__reactListeners$"+Br,xL="__reactHandles$"+Br,kv="__reactResources$"+Br,os="__reactMarker$"+Br;function ac(r){delete r[Lt],delete r[tn],delete r[rc],delete r[EL],delete r[xL]}function ri(r){var i=r[Lt];if(i)return i;for(var l=r.parentNode;l;){if(i=l[ni]||l[Lt]){if(l=i.alternate,i.child!==null||l!==null&&l.child!==null)for(r=Ww(r);r!==null;){if(l=r[Lt])return l;r=Ww(r)}return i}r=l,l=r.parentNode}return null}function ai(r){if(r=r[Lt]||r[ni]){var i=r.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return r}return null}function ls(r){var i=r.tag;if(i===5||i===26||i===27||i===6)return r.stateNode;throw Error(a(33))}function ii(r){var i=r[kv];return i||(i=r[kv]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function kt(r){r[os]=!0}var Nv=new Set,Cv={};function va(r,i){si(r,i),si(r+"Capture",i)}function si(r,i){for(Cv[r]=i,r=0;r<i.length;r++)Nv.add(i[r])}var wL=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]*$"),Ov={},Iv={};function TL(r){return Jt.call(Iv,r)?!0:Jt.call(Ov,r)?!1:wL.test(r)?Iv[r]=!0:(Ov[r]=!0,!1)}function Oo(r,i,l){if(TL(i))if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":r.removeAttribute(i);return;case"boolean":var d=i.toLowerCase().slice(0,5);if(d!=="data-"&&d!=="aria-"){r.removeAttribute(i);return}}r.setAttribute(i,""+l)}}function Io(r,i,l){if(l===null)r.removeAttribute(i);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(i);return}r.setAttribute(i,""+l)}}function fr(r,i,l,d){if(d===null)r.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(l);return}r.setAttributeNS(i,l,""+d)}}function On(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function Lv(r){var i=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function AL(r,i,l){var d=Object.getOwnPropertyDescriptor(r.constructor.prototype,i);if(!r.hasOwnProperty(i)&&typeof d<"u"&&typeof d.get=="function"&&typeof d.set=="function"){var g=d.get,S=d.set;return Object.defineProperty(r,i,{configurable:!0,get:function(){return g.call(this)},set:function(T){l=""+T,S.call(this,T)}}),Object.defineProperty(r,i,{enumerable:d.enumerable}),{getValue:function(){return l},setValue:function(T){l=""+T},stopTracking:function(){r._valueTracker=null,delete r[i]}}}}function ic(r){if(!r._valueTracker){var i=Lv(r)?"checked":"value";r._valueTracker=AL(r,i,""+r[i])}}function Dv(r){if(!r)return!1;var i=r._valueTracker;if(!i)return!0;var l=i.getValue(),d="";return r&&(d=Lv(r)?r.checked?"true":"false":r.value),r=d,r!==l?(i.setValue(r),!0):!1}function Lo(r){if(r=r||(typeof document<"u"?document:void 0),typeof r>"u")return null;try{return r.activeElement||r.body}catch{return r.body}}var RL=/[\n"\\]/g;function In(r){return r.replace(RL,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function sc(r,i,l,d,g,S,T,O){r.name="",T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"?r.type=T:r.removeAttribute("type"),i!=null?T==="number"?(i===0&&r.value===""||r.value!=i)&&(r.value=""+On(i)):r.value!==""+On(i)&&(r.value=""+On(i)):T!=="submit"&&T!=="reset"||r.removeAttribute("value"),i!=null?oc(r,T,On(i)):l!=null?oc(r,T,On(l)):d!=null&&r.removeAttribute("value"),g==null&&S!=null&&(r.defaultChecked=!!S),g!=null&&(r.checked=g&&typeof g!="function"&&typeof g!="symbol"),O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"?r.name=""+On(O):r.removeAttribute("name")}function Mv(r,i,l,d,g,S,T,O){if(S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(r.type=S),i!=null||l!=null){if(!(S!=="submit"&&S!=="reset"||i!=null)){ic(r);return}l=l!=null?""+On(l):"",i=i!=null?""+On(i):l,O||i===r.value||(r.value=i),r.defaultValue=i}d=d??g,d=typeof d!="function"&&typeof d!="symbol"&&!!d,r.checked=O?r.checked:!!d,r.defaultChecked=!!d,T!=null&&typeof T!="function"&&typeof T!="symbol"&&typeof T!="boolean"&&(r.name=T),ic(r)}function oc(r,i,l){i==="number"&&Lo(r.ownerDocument)===r||r.defaultValue===""+l||(r.defaultValue=""+l)}function oi(r,i,l,d){if(r=r.options,i){i={};for(var g=0;g<l.length;g++)i["$"+l[g]]=!0;for(l=0;l<r.length;l++)g=i.hasOwnProperty("$"+r[l].value),r[l].selected!==g&&(r[l].selected=g),g&&d&&(r[l].defaultSelected=!0)}else{for(l=""+On(l),i=null,g=0;g<r.length;g++){if(r[g].value===l){r[g].selected=!0,d&&(r[g].defaultSelected=!0);return}i!==null||r[g].disabled||(i=r[g])}i!==null&&(i.selected=!0)}}function Fv(r,i,l){if(i!=null&&(i=""+On(i),i!==r.value&&(r.value=i),l==null)){r.defaultValue!==i&&(r.defaultValue=i);return}r.defaultValue=l!=null?""+On(l):""}function Uv(r,i,l,d){if(i==null){if(d!=null){if(l!=null)throw Error(a(92));if(K(d)){if(1<d.length)throw Error(a(93));d=d[0]}l=d}l==null&&(l=""),i=l}l=On(i),r.defaultValue=l,d=r.textContent,d===l&&d!==""&&d!==null&&(r.value=d),ic(r)}function li(r,i){if(i){var l=r.firstChild;if(l&&l===r.lastChild&&l.nodeType===3){l.nodeValue=i;return}}r.textContent=i}var _L=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 Bv(r,i,l){var d=i.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?d?r.setProperty(i,""):i==="float"?r.cssFloat="":r[i]="":d?r.setProperty(i,l):typeof l!="number"||l===0||_L.has(i)?i==="float"?r.cssFloat=l:r[i]=(""+l).trim():r[i]=l+"px"}function jv(r,i,l){if(i!=null&&typeof i!="object")throw Error(a(62));if(r=r.style,l!=null){for(var d in l)!l.hasOwnProperty(d)||i!=null&&i.hasOwnProperty(d)||(d.indexOf("--")===0?r.setProperty(d,""):d==="float"?r.cssFloat="":r[d]="");for(var g in i)d=i[g],i.hasOwnProperty(g)&&l[g]!==d&&Bv(r,g,d)}else for(var S in i)i.hasOwnProperty(S)&&Bv(r,S,i[S])}function lc(r){if(r.indexOf("-")===-1)return!1;switch(r){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 kL=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"]]),NL=/^[\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 Do(r){return NL.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function hr(){}var uc=null;function cc(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var ui=null,ci=null;function Pv(r){var i=ai(r);if(i&&(r=i.stateNode)){var l=r[tn]||null;e:switch(r=i.stateNode,i.type){case"input":if(sc(r,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),i=l.name,l.type==="radio"&&i!=null){for(l=r;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+In(""+i)+'"][type="radio"]'),i=0;i<l.length;i++){var d=l[i];if(d!==r&&d.form===r.form){var g=d[tn]||null;if(!g)throw Error(a(90));sc(d,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(i=0;i<l.length;i++)d=l[i],d.form===r.form&&Dv(d)}break e;case"textarea":Fv(r,l.value,l.defaultValue);break e;case"select":i=l.value,i!=null&&oi(r,!!l.multiple,i,!1)}}}var dc=!1;function zv(r,i,l){if(dc)return r(i,l);dc=!0;try{var d=r(i);return d}finally{if(dc=!1,(ui!==null||ci!==null)&&(El(),ui&&(i=ui,r=ci,ci=ui=null,Pv(i),r)))for(i=0;i<r.length;i++)Pv(r[i])}}function us(r,i){var l=r.stateNode;if(l===null)return null;var d=l[tn]||null;if(d===null)return null;l=d[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(r=r.type,d=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!d;break e;default:r=!1}if(r)return null;if(l&&typeof l!="function")throw Error(a(231,i,typeof l));return l}var mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),pc=!1;if(mr)try{var cs={};Object.defineProperty(cs,"passive",{get:function(){pc=!0}}),window.addEventListener("test",cs,cs),window.removeEventListener("test",cs,cs)}catch{pc=!1}var jr=null,fc=null,Mo=null;function qv(){if(Mo)return Mo;var r,i=fc,l=i.length,d,g="value"in jr?jr.value:jr.textContent,S=g.length;for(r=0;r<l&&i[r]===g[r];r++);var T=l-r;for(d=1;d<=T&&i[l-d]===g[S-d];d++);return Mo=g.slice(r,1<d?1-d:void 0)}function Fo(r){var i=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&i===13&&(r=13)):r=i,r===10&&(r=13),32<=r||r===13?r:0}function Uo(){return!0}function $v(){return!1}function nn(r){function i(l,d,g,S,T){this._reactName=l,this._targetInst=g,this.type=d,this.nativeEvent=S,this.target=T,this.currentTarget=null;for(var O in r)r.hasOwnProperty(O)&&(l=r[O],this[O]=l?l(S):S[O]);return this.isDefaultPrevented=(S.defaultPrevented!=null?S.defaultPrevented:S.returnValue===!1)?Uo:$v,this.isPropagationStopped=$v,this}return m(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=Uo)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Uo)},persist:function(){},isPersistent:Uo}),i}var Ea={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bo=nn(Ea),ds=m({},Ea,{view:0,detail:0}),CL=nn(ds),hc,mc,ps,jo=m({},ds,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:bc,button:0,buttons:0,relatedTarget:function(r){return r.relatedTarget===void 0?r.fromElement===r.srcElement?r.toElement:r.fromElement:r.relatedTarget},movementX:function(r){return"movementX"in r?r.movementX:(r!==ps&&(ps&&r.type==="mousemove"?(hc=r.screenX-ps.screenX,mc=r.screenY-ps.screenY):mc=hc=0,ps=r),hc)},movementY:function(r){return"movementY"in r?r.movementY:mc}}),Gv=nn(jo),OL=m({},jo,{dataTransfer:0}),IL=nn(OL),LL=m({},ds,{relatedTarget:0}),gc=nn(LL),DL=m({},Ea,{animationName:0,elapsedTime:0,pseudoElement:0}),ML=nn(DL),FL=m({},Ea,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),UL=nn(FL),BL=m({},Ea,{data:0}),Hv=nn(BL),jL={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},PL={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"},zL={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function qL(r){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(r):(r=zL[r])?!!i[r]:!1}function bc(){return qL}var $L=m({},ds,{key:function(r){if(r.key){var i=jL[r.key]||r.key;if(i!=="Unidentified")return i}return r.type==="keypress"?(r=Fo(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?PL[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:bc,charCode:function(r){return r.type==="keypress"?Fo(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Fo(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),GL=nn($L),HL=m({},jo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Vv=nn(HL),VL=m({},ds,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:bc}),YL=nn(VL),KL=m({},Ea,{propertyName:0,elapsedTime:0,pseudoElement:0}),WL=nn(KL),XL=m({},jo,{deltaX:function(r){return"deltaX"in r?r.deltaX:"wheelDeltaX"in r?-r.wheelDeltaX:0},deltaY:function(r){return"deltaY"in r?r.deltaY:"wheelDeltaY"in r?-r.wheelDeltaY:"wheelDelta"in r?-r.wheelDelta:0},deltaZ:0,deltaMode:0}),ZL=nn(XL),QL=m({},Ea,{newState:0,oldState:0}),JL=nn(QL),eD=[9,13,27,32],yc=mr&&"CompositionEvent"in window,fs=null;mr&&"documentMode"in document&&(fs=document.documentMode);var tD=mr&&"TextEvent"in window&&!fs,Yv=mr&&(!yc||fs&&8<fs&&11>=fs),Kv=" ",Wv=!1;function Xv(r,i){switch(r){case"keyup":return eD.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Zv(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var di=!1;function nD(r,i){switch(r){case"compositionend":return Zv(i);case"keypress":return i.which!==32?null:(Wv=!0,Kv);case"textInput":return r=i.data,r===Kv&&Wv?null:r;default:return null}}function rD(r,i){if(di)return r==="compositionend"||!yc&&Xv(r,i)?(r=qv(),Mo=fc=jr=null,di=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Yv&&i.locale!=="ko"?null:i.data;default:return null}}var aD={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 Qv(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i==="input"?!!aD[r.type]:i==="textarea"}function Jv(r,i,l,d){ui?ci?ci.push(d):ci=[d]:ui=d,i=kl(i,"onChange"),0<i.length&&(l=new Bo("onChange","change",null,l,d),r.push({event:l,listeners:i}))}var hs=null,ms=null;function iD(r){Mw(r,0)}function Po(r){var i=ls(r);if(Dv(i))return r}function eE(r,i){if(r==="change")return i}var tE=!1;if(mr){var Sc;if(mr){var vc="oninput"in document;if(!vc){var nE=document.createElement("div");nE.setAttribute("oninput","return;"),vc=typeof nE.oninput=="function"}Sc=vc}else Sc=!1;tE=Sc&&(!document.documentMode||9<document.documentMode)}function rE(){hs&&(hs.detachEvent("onpropertychange",aE),ms=hs=null)}function aE(r){if(r.propertyName==="value"&&Po(ms)){var i=[];Jv(i,ms,r,cc(r)),zv(iD,i)}}function sD(r,i,l){r==="focusin"?(rE(),hs=i,ms=l,hs.attachEvent("onpropertychange",aE)):r==="focusout"&&rE()}function oD(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Po(ms)}function lD(r,i){if(r==="click")return Po(i)}function uD(r,i){if(r==="input"||r==="change")return Po(i)}function cD(r,i){return r===i&&(r!==0||1/r===1/i)||r!==r&&i!==i}var gn=typeof Object.is=="function"?Object.is:cD;function gs(r,i){if(gn(r,i))return!0;if(typeof r!="object"||r===null||typeof i!="object"||i===null)return!1;var l=Object.keys(r),d=Object.keys(i);if(l.length!==d.length)return!1;for(d=0;d<l.length;d++){var g=l[d];if(!Jt.call(i,g)||!gn(r[g],i[g]))return!1}return!0}function iE(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function sE(r,i){var l=iE(r);r=0;for(var d;l;){if(l.nodeType===3){if(d=r+l.textContent.length,r<=i&&d>=i)return{node:l,offset:i-r};r=d}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=iE(l)}}function oE(r,i){return r&&i?r===i?!0:r&&r.nodeType===3?!1:i&&i.nodeType===3?oE(r,i.parentNode):"contains"in r?r.contains(i):r.compareDocumentPosition?!!(r.compareDocumentPosition(i)&16):!1:!1}function lE(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var i=Lo(r.document);i instanceof r.HTMLIFrameElement;){try{var l=typeof i.contentWindow.location.href=="string"}catch{l=!1}if(l)r=i.contentWindow;else break;i=Lo(r.document)}return i}function Ec(r){var i=r&&r.nodeName&&r.nodeName.toLowerCase();return i&&(i==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||i==="textarea"||r.contentEditable==="true")}var dD=mr&&"documentMode"in document&&11>=document.documentMode,pi=null,xc=null,bs=null,wc=!1;function uE(r,i,l){var d=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;wc||pi==null||pi!==Lo(d)||(d=pi,"selectionStart"in d&&Ec(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),bs&&gs(bs,d)||(bs=d,d=kl(xc,"onSelect"),0<d.length&&(i=new Bo("onSelect","select",null,i,l),r.push({event:i,listeners:d}),i.target=pi)))}function xa(r,i){var l={};return l[r.toLowerCase()]=i.toLowerCase(),l["Webkit"+r]="webkit"+i,l["Moz"+r]="moz"+i,l}var fi={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionrun:xa("Transition","TransitionRun"),transitionstart:xa("Transition","TransitionStart"),transitioncancel:xa("Transition","TransitionCancel"),transitionend:xa("Transition","TransitionEnd")},Tc={},cE={};mr&&(cE=document.createElement("div").style,"AnimationEvent"in window||(delete fi.animationend.animation,delete fi.animationiteration.animation,delete fi.animationstart.animation),"TransitionEvent"in window||delete fi.transitionend.transition);function wa(r){if(Tc[r])return Tc[r];if(!fi[r])return r;var i=fi[r],l;for(l in i)if(i.hasOwnProperty(l)&&l in cE)return Tc[r]=i[l];return r}var dE=wa("animationend"),pE=wa("animationiteration"),fE=wa("animationstart"),pD=wa("transitionrun"),fD=wa("transitionstart"),hD=wa("transitioncancel"),hE=wa("transitionend"),mE=new Map,Ac="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(" ");Ac.push("scrollEnd");function Gn(r,i){mE.set(r,i),va(i,[r])}var zo=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Ln=[],hi=0,Rc=0;function qo(){for(var r=hi,i=Rc=hi=0;i<r;){var l=Ln[i];Ln[i++]=null;var d=Ln[i];Ln[i++]=null;var g=Ln[i];Ln[i++]=null;var S=Ln[i];if(Ln[i++]=null,d!==null&&g!==null){var T=d.pending;T===null?g.next=g:(g.next=T.next,T.next=g),d.pending=g}S!==0&&gE(l,g,S)}}function $o(r,i,l,d){Ln[hi++]=r,Ln[hi++]=i,Ln[hi++]=l,Ln[hi++]=d,Rc|=d,r.lanes|=d,r=r.alternate,r!==null&&(r.lanes|=d)}function _c(r,i,l,d){return $o(r,i,l,d),Go(r)}function Ta(r,i){return $o(r,null,null,i),Go(r)}function gE(r,i,l){r.lanes|=l;var d=r.alternate;d!==null&&(d.lanes|=l);for(var g=!1,S=r.return;S!==null;)S.childLanes|=l,d=S.alternate,d!==null&&(d.childLanes|=l),S.tag===22&&(r=S.stateNode,r===null||r._visibility&1||(g=!0)),r=S,S=S.return;return r.tag===3?(S=r.stateNode,g&&i!==null&&(g=31-$e(l),r=S.hiddenUpdates,d=r[g],d===null?r[g]=[i]:d.push(i),i.lane=l|536870912),S):null}function Go(r){if(50<js)throw js=0,Fd=null,Error(a(185));for(var i=r.return;i!==null;)r=i,i=r.return;return r.tag===3?r.stateNode:null}var mi={};function mD(r,i,l,d){this.tag=r,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=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function bn(r,i,l,d){return new mD(r,i,l,d)}function kc(r){return r=r.prototype,!(!r||!r.isReactComponent)}function gr(r,i){var l=r.alternate;return l===null?(l=bn(r.tag,i,r.key,r.mode),l.elementType=r.elementType,l.type=r.type,l.stateNode=r.stateNode,l.alternate=r,r.alternate=l):(l.pendingProps=i,l.type=r.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=r.flags&65011712,l.childLanes=r.childLanes,l.lanes=r.lanes,l.child=r.child,l.memoizedProps=r.memoizedProps,l.memoizedState=r.memoizedState,l.updateQueue=r.updateQueue,i=r.dependencies,l.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},l.sibling=r.sibling,l.index=r.index,l.ref=r.ref,l.refCleanup=r.refCleanup,l}function bE(r,i){r.flags&=65011714;var l=r.alternate;return l===null?(r.childLanes=0,r.lanes=i,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=l.childLanes,r.lanes=l.lanes,r.child=l.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=l.memoizedProps,r.memoizedState=l.memoizedState,r.updateQueue=l.updateQueue,r.type=l.type,i=l.dependencies,r.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),r}function Ho(r,i,l,d,g,S){var T=0;if(d=r,typeof r=="function")kc(r)&&(T=1);else if(typeof r=="string")T=vM(r,l,oe.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case F:return r=bn(31,l,i,g),r.elementType=F,r.lanes=S,r;case x:return Aa(l.children,g,S,i);case w:T=8,g|=24;break;case _:return r=bn(12,l,i,g|2),r.elementType=_,r.lanes=S,r;case D:return r=bn(13,l,i,g),r.elementType=D,r.lanes=S,r;case k:return r=bn(19,l,i,g),r.elementType=k,r.lanes=S,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case A:T=10;break e;case R:T=9;break e;case N:T=11;break e;case C:T=14;break e;case j:T=16,d=null;break e}T=29,l=Error(a(130,r===null?"null":typeof r,"")),d=null}return i=bn(T,l,i,g),i.elementType=r,i.type=d,i.lanes=S,i}function Aa(r,i,l,d){return r=bn(7,r,d,i),r.lanes=l,r}function Nc(r,i,l){return r=bn(6,r,null,i),r.lanes=l,r}function yE(r){var i=bn(18,null,null,0);return i.stateNode=r,i}function Cc(r,i,l){return i=bn(4,r.children!==null?r.children:[],r.key,i),i.lanes=l,i.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},i}var SE=new WeakMap;function Dn(r,i){if(typeof r=="object"&&r!==null){var l=SE.get(r);return l!==void 0?l:(i={value:r,source:i,stack:Qt(i)},SE.set(r,i),i)}return{value:r,source:i,stack:Qt(i)}}var gi=[],bi=0,Vo=null,ys=0,Mn=[],Fn=0,Pr=null,Zn=1,Qn="";function br(r,i){gi[bi++]=ys,gi[bi++]=Vo,Vo=r,ys=i}function vE(r,i,l){Mn[Fn++]=Zn,Mn[Fn++]=Qn,Mn[Fn++]=Pr,Pr=r;var d=Zn;r=Qn;var g=32-$e(d)-1;d&=~(1<<g),l+=1;var S=32-$e(i)+g;if(30<S){var T=g-g%5;S=(d&(1<<T)-1).toString(32),d>>=T,g-=T,Zn=1<<32-$e(i)+g|l<<g|d,Qn=S+r}else Zn=1<<S|l<<g|d,Qn=r}function Oc(r){r.return!==null&&(br(r,1),vE(r,1,0))}function Ic(r){for(;r===Vo;)Vo=gi[--bi],gi[bi]=null,ys=gi[--bi],gi[bi]=null;for(;r===Pr;)Pr=Mn[--Fn],Mn[Fn]=null,Qn=Mn[--Fn],Mn[Fn]=null,Zn=Mn[--Fn],Mn[Fn]=null}function EE(r,i){Mn[Fn++]=Zn,Mn[Fn++]=Qn,Mn[Fn++]=Pr,Zn=i.id,Qn=i.overflow,Pr=r}var Dt=null,nt=null,Ue=!1,zr=null,Un=!1,Lc=Error(a(519));function qr(r){var i=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ss(Dn(i,r)),Lc}function xE(r){var i=r.stateNode,l=r.type,d=r.memoizedProps;switch(i[Lt]=r,i[tn]=d,l){case"dialog":Ie("cancel",i),Ie("close",i);break;case"iframe":case"object":case"embed":Ie("load",i);break;case"video":case"audio":for(l=0;l<zs.length;l++)Ie(zs[l],i);break;case"source":Ie("error",i);break;case"img":case"image":case"link":Ie("error",i),Ie("load",i);break;case"details":Ie("toggle",i);break;case"input":Ie("invalid",i),Mv(i,d.value,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name,!0);break;case"select":Ie("invalid",i);break;case"textarea":Ie("invalid",i),Uv(i,d.value,d.defaultValue,d.children)}l=d.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||i.textContent===""+l||d.suppressHydrationWarning===!0||jw(i.textContent,l)?(d.popover!=null&&(Ie("beforetoggle",i),Ie("toggle",i)),d.onScroll!=null&&Ie("scroll",i),d.onScrollEnd!=null&&Ie("scrollend",i),d.onClick!=null&&(i.onclick=hr),i=!0):i=!1,i||qr(r,!0)}function wE(r){for(Dt=r.return;Dt;)switch(Dt.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Dt=Dt.return}}function yi(r){if(r!==Dt)return!1;if(!Ue)return wE(r),Ue=!0,!1;var i=r.tag,l;if((l=i!==3&&i!==27)&&((l=i===5)&&(l=r.type,l=!(l!=="form"&&l!=="button")||Zd(r.type,r.memoizedProps)),l=!l),l&&nt&&qr(r),wE(r),i===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));nt=Kw(r)}else if(i===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(317));nt=Kw(r)}else i===27?(i=nt,na(r.type)?(r=np,np=null,nt=r):nt=i):nt=Dt?jn(r.stateNode.nextSibling):null;return!0}function Ra(){nt=Dt=null,Ue=!1}function Dc(){var r=zr;return r!==null&&(on===null?on=r:on.push.apply(on,r),zr=null),r}function Ss(r){zr===null?zr=[r]:zr.push(r)}var Mc=B(null),_a=null,yr=null;function $r(r,i,l){I(Mc,i._currentValue),i._currentValue=l}function Sr(r){r._currentValue=Mc.current,Y(Mc)}function Fc(r,i,l){for(;r!==null;){var d=r.alternate;if((r.childLanes&i)!==i?(r.childLanes|=i,d!==null&&(d.childLanes|=i)):d!==null&&(d.childLanes&i)!==i&&(d.childLanes|=i),r===l)break;r=r.return}}function Uc(r,i,l,d){var g=r.child;for(g!==null&&(g.return=r);g!==null;){var S=g.dependencies;if(S!==null){var T=g.child;S=S.firstContext;e:for(;S!==null;){var O=S;S=g;for(var P=0;P<i.length;P++)if(O.context===i[P]){S.lanes|=l,O=S.alternate,O!==null&&(O.lanes|=l),Fc(S.return,l,r),d||(T=null);break e}S=O.next}}else if(g.tag===18){if(T=g.return,T===null)throw Error(a(341));T.lanes|=l,S=T.alternate,S!==null&&(S.lanes|=l),Fc(T,l,r),T=null}else T=g.child;if(T!==null)T.return=g;else for(T=g;T!==null;){if(T===r){T=null;break}if(g=T.sibling,g!==null){g.return=T.return,T=g;break}T=T.return}g=T}}function Si(r,i,l,d){r=null;for(var g=i,S=!1;g!==null;){if(!S){if((g.flags&524288)!==0)S=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var T=g.alternate;if(T===null)throw Error(a(387));if(T=T.memoizedProps,T!==null){var O=g.type;gn(g.pendingProps.value,T.value)||(r!==null?r.push(O):r=[O])}}else if(g===me.current){if(T=g.alternate,T===null)throw Error(a(387));T.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(r!==null?r.push(Vs):r=[Vs])}g=g.return}r!==null&&Uc(i,r,l,d),i.flags|=262144}function Yo(r){for(r=r.firstContext;r!==null;){if(!gn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function ka(r){_a=r,yr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Mt(r){return TE(_a,r)}function Ko(r,i){return _a===null&&ka(r),TE(r,i)}function TE(r,i){var l=i._currentValue;if(i={context:i,memoizedValue:l,next:null},yr===null){if(r===null)throw Error(a(308));yr=i,r.dependencies={lanes:0,firstContext:i},r.flags|=524288}else yr=yr.next=i;return l}var gD=typeof AbortController<"u"?AbortController:function(){var r=[],i=this.signal={aborted:!1,addEventListener:function(l,d){r.push(d)}};this.abort=function(){i.aborted=!0,r.forEach(function(l){return l()})}},bD=e.unstable_scheduleCallback,yD=e.unstable_NormalPriority,gt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Bc(){return{controller:new gD,data:new Map,refCount:0}}function vs(r){r.refCount--,r.refCount===0&&bD(yD,function(){r.controller.abort()})}var Es=null,jc=0,vi=0,Ei=null;function SD(r,i){if(Es===null){var l=Es=[];jc=0,vi=qd(),Ei={status:"pending",value:void 0,then:function(d){l.push(d)}}}return jc++,i.then(AE,AE),i}function AE(){if(--jc===0&&Es!==null){Ei!==null&&(Ei.status="fulfilled");var r=Es;Es=null,vi=0,Ei=null;for(var i=0;i<r.length;i++)(0,r[i])()}}function vD(r,i){var l=[],d={status:"pending",value:null,reason:null,then:function(g){l.push(g)}};return r.then(function(){d.status="fulfilled",d.value=i;for(var g=0;g<l.length;g++)(0,l[g])(i)},function(g){for(d.status="rejected",d.reason=g,g=0;g<l.length;g++)(0,l[g])(void 0)}),d}var RE=G.S;G.S=function(r,i){uw=ke(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&SD(r,i),RE!==null&&RE(r,i)};var Na=B(null);function Pc(){var r=Na.current;return r!==null?r:Qe.pooledCache}function Wo(r,i){i===null?I(Na,Na.current):I(Na,i.pool)}function _E(){var r=Pc();return r===null?null:{parent:gt._currentValue,pool:r}}var xi=Error(a(460)),zc=Error(a(474)),Xo=Error(a(542)),Zo={then:function(){}};function kE(r){return r=r.status,r==="fulfilled"||r==="rejected"}function NE(r,i,l){switch(l=r[l],l===void 0?r.push(i):l!==i&&(i.then(hr,hr),i=l),i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,OE(r),r;default:if(typeof i.status=="string")i.then(hr,hr);else{if(r=Qe,r!==null&&100<r.shellSuspendCounter)throw Error(a(482));r=i,r.status="pending",r.then(function(d){if(i.status==="pending"){var g=i;g.status="fulfilled",g.value=d}},function(d){if(i.status==="pending"){var g=i;g.status="rejected",g.reason=d}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw r=i.reason,OE(r),r}throw Oa=i,xi}}function Ca(r){try{var i=r._init;return i(r._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Oa=l,xi):l}}var Oa=null;function CE(){if(Oa===null)throw Error(a(459));var r=Oa;return Oa=null,r}function OE(r){if(r===xi||r===Xo)throw Error(a(483))}var wi=null,xs=0;function Qo(r){var i=xs;return xs+=1,wi===null&&(wi=[]),NE(wi,r,i)}function ws(r,i){i=i.props.ref,r.ref=i!==void 0?i:null}function Jo(r,i){throw i.$$typeof===b?Error(a(525)):(r=Object.prototype.toString.call(i),Error(a(31,r==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":r)))}function IE(r){function i(V,$){if(r){var W=V.deletions;W===null?(V.deletions=[$],V.flags|=16):W.push($)}}function l(V,$){if(!r)return null;for(;$!==null;)i(V,$),$=$.sibling;return null}function d(V){for(var $=new Map;V!==null;)V.key!==null?$.set(V.key,V):$.set(V.index,V),V=V.sibling;return $}function g(V,$){return V=gr(V,$),V.index=0,V.sibling=null,V}function S(V,$,W){return V.index=W,r?(W=V.alternate,W!==null?(W=W.index,W<$?(V.flags|=67108866,$):W):(V.flags|=67108866,$)):(V.flags|=1048576,$)}function T(V){return r&&V.alternate===null&&(V.flags|=67108866),V}function O(V,$,W,ie){return $===null||$.tag!==6?($=Nc(W,V.mode,ie),$.return=V,$):($=g($,W),$.return=V,$)}function P(V,$,W,ie){var be=W.type;return be===x?re(V,$,W.props.children,ie,W.key):$!==null&&($.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&Ca(be)===$.type)?($=g($,W.props),ws($,W),$.return=V,$):($=Ho(W.type,W.key,W.props,null,V.mode,ie),ws($,W),$.return=V,$)}function X(V,$,W,ie){return $===null||$.tag!==4||$.stateNode.containerInfo!==W.containerInfo||$.stateNode.implementation!==W.implementation?($=Cc(W,V.mode,ie),$.return=V,$):($=g($,W.children||[]),$.return=V,$)}function re(V,$,W,ie,be){return $===null||$.tag!==7?($=Aa(W,V.mode,ie,be),$.return=V,$):($=g($,W),$.return=V,$)}function se(V,$,W){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Nc(""+$,V.mode,W),$.return=V,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case y:return W=Ho($.type,$.key,$.props,null,V.mode,W),ws(W,$),W.return=V,W;case E:return $=Cc($,V.mode,W),$.return=V,$;case j:return $=Ca($),se(V,$,W)}if(K($)||z($))return $=Aa($,V.mode,W,null),$.return=V,$;if(typeof $.then=="function")return se(V,Qo($),W);if($.$$typeof===A)return se(V,Ko(V,$),W);Jo(V,$)}return null}function Q(V,$,W,ie){var be=$!==null?$.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return be!==null?null:O(V,$,""+W,ie);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case y:return W.key===be?P(V,$,W,ie):null;case E:return W.key===be?X(V,$,W,ie):null;case j:return W=Ca(W),Q(V,$,W,ie)}if(K(W)||z(W))return be!==null?null:re(V,$,W,ie,null);if(typeof W.then=="function")return Q(V,$,Qo(W),ie);if(W.$$typeof===A)return Q(V,$,Ko(V,W),ie);Jo(V,W)}return null}function ee(V,$,W,ie,be){if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return V=V.get(W)||null,O($,V,""+ie,be);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case y:return V=V.get(ie.key===null?W:ie.key)||null,P($,V,ie,be);case E:return V=V.get(ie.key===null?W:ie.key)||null,X($,V,ie,be);case j:return ie=Ca(ie),ee(V,$,W,ie,be)}if(K(ie)||z(ie))return V=V.get(W)||null,re($,V,ie,be,null);if(typeof ie.then=="function")return ee(V,$,W,Qo(ie),be);if(ie.$$typeof===A)return ee(V,$,W,Ko($,ie),be);Jo($,ie)}return null}function he(V,$,W,ie){for(var be=null,Pe=null,ge=$,Ne=$=0,Me=null;ge!==null&&Ne<W.length;Ne++){ge.index>Ne?(Me=ge,ge=null):Me=ge.sibling;var ze=Q(V,ge,W[Ne],ie);if(ze===null){ge===null&&(ge=Me);break}r&&ge&&ze.alternate===null&&i(V,ge),$=S(ze,$,Ne),Pe===null?be=ze:Pe.sibling=ze,Pe=ze,ge=Me}if(Ne===W.length)return l(V,ge),Ue&&br(V,Ne),be;if(ge===null){for(;Ne<W.length;Ne++)ge=se(V,W[Ne],ie),ge!==null&&($=S(ge,$,Ne),Pe===null?be=ge:Pe.sibling=ge,Pe=ge);return Ue&&br(V,Ne),be}for(ge=d(ge);Ne<W.length;Ne++)Me=ee(ge,V,Ne,W[Ne],ie),Me!==null&&(r&&Me.alternate!==null&&ge.delete(Me.key===null?Ne:Me.key),$=S(Me,$,Ne),Pe===null?be=Me:Pe.sibling=Me,Pe=Me);return r&&ge.forEach(function(oa){return i(V,oa)}),Ue&&br(V,Ne),be}function Se(V,$,W,ie){if(W==null)throw Error(a(151));for(var be=null,Pe=null,ge=$,Ne=$=0,Me=null,ze=W.next();ge!==null&&!ze.done;Ne++,ze=W.next()){ge.index>Ne?(Me=ge,ge=null):Me=ge.sibling;var oa=Q(V,ge,ze.value,ie);if(oa===null){ge===null&&(ge=Me);break}r&&ge&&oa.alternate===null&&i(V,ge),$=S(oa,$,Ne),Pe===null?be=oa:Pe.sibling=oa,Pe=oa,ge=Me}if(ze.done)return l(V,ge),Ue&&br(V,Ne),be;if(ge===null){for(;!ze.done;Ne++,ze=W.next())ze=se(V,ze.value,ie),ze!==null&&($=S(ze,$,Ne),Pe===null?be=ze:Pe.sibling=ze,Pe=ze);return Ue&&br(V,Ne),be}for(ge=d(ge);!ze.done;Ne++,ze=W.next())ze=ee(ge,V,Ne,ze.value,ie),ze!==null&&(r&&ze.alternate!==null&&ge.delete(ze.key===null?Ne:ze.key),$=S(ze,$,Ne),Pe===null?be=ze:Pe.sibling=ze,Pe=ze);return r&&ge.forEach(function(OM){return i(V,OM)}),Ue&&br(V,Ne),be}function We(V,$,W,ie){if(typeof W=="object"&&W!==null&&W.type===x&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case y:e:{for(var be=W.key;$!==null;){if($.key===be){if(be=W.type,be===x){if($.tag===7){l(V,$.sibling),ie=g($,W.props.children),ie.return=V,V=ie;break e}}else if($.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===j&&Ca(be)===$.type){l(V,$.sibling),ie=g($,W.props),ws(ie,W),ie.return=V,V=ie;break e}l(V,$);break}else i(V,$);$=$.sibling}W.type===x?(ie=Aa(W.props.children,V.mode,ie,W.key),ie.return=V,V=ie):(ie=Ho(W.type,W.key,W.props,null,V.mode,ie),ws(ie,W),ie.return=V,V=ie)}return T(V);case E:e:{for(be=W.key;$!==null;){if($.key===be)if($.tag===4&&$.stateNode.containerInfo===W.containerInfo&&$.stateNode.implementation===W.implementation){l(V,$.sibling),ie=g($,W.children||[]),ie.return=V,V=ie;break e}else{l(V,$);break}else i(V,$);$=$.sibling}ie=Cc(W,V.mode,ie),ie.return=V,V=ie}return T(V);case j:return W=Ca(W),We(V,$,W,ie)}if(K(W))return he(V,$,W,ie);if(z(W)){if(be=z(W),typeof be!="function")throw Error(a(150));return W=be.call(W),Se(V,$,W,ie)}if(typeof W.then=="function")return We(V,$,Qo(W),ie);if(W.$$typeof===A)return We(V,$,Ko(V,W),ie);Jo(V,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,$!==null&&$.tag===6?(l(V,$.sibling),ie=g($,W),ie.return=V,V=ie):(l(V,$),ie=Nc(W,V.mode,ie),ie.return=V,V=ie),T(V)):l(V,$)}return function(V,$,W,ie){try{xs=0;var be=We(V,$,W,ie);return wi=null,be}catch(ge){if(ge===xi||ge===Xo)throw ge;var Pe=bn(29,ge,null,V.mode);return Pe.lanes=ie,Pe.return=V,Pe}finally{}}}var Ia=IE(!0),LE=IE(!1),Gr=!1;function qc(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function $c(r,i){r=r.updateQueue,i.updateQueue===r&&(i.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Hr(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Vr(r,i,l){var d=r.updateQueue;if(d===null)return null;if(d=d.shared,(qe&2)!==0){var g=d.pending;return g===null?i.next=i:(i.next=g.next,g.next=i),d.pending=i,i=Go(r),gE(r,null,l),i}return $o(r,d,i,l),Go(r)}function Ts(r,i,l){if(i=i.updateQueue,i!==null&&(i=i.shared,(l&4194048)!==0)){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Tv(r,l)}}function Gc(r,i){var l=r.updateQueue,d=r.alternate;if(d!==null&&(d=d.updateQueue,l===d)){var g=null,S=null;if(l=l.firstBaseUpdate,l!==null){do{var T={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};S===null?g=S=T:S=S.next=T,l=l.next}while(l!==null);S===null?g=S=i:S=S.next=i}else g=S=i;l={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:S,shared:d.shared,callbacks:d.callbacks},r.updateQueue=l;return}r=l.lastBaseUpdate,r===null?l.firstBaseUpdate=i:r.next=i,l.lastBaseUpdate=i}var Hc=!1;function As(){if(Hc){var r=Ei;if(r!==null)throw r}}function Rs(r,i,l,d){Hc=!1;var g=r.updateQueue;Gr=!1;var S=g.firstBaseUpdate,T=g.lastBaseUpdate,O=g.shared.pending;if(O!==null){g.shared.pending=null;var P=O,X=P.next;P.next=null,T===null?S=X:T.next=X,T=P;var re=r.alternate;re!==null&&(re=re.updateQueue,O=re.lastBaseUpdate,O!==T&&(O===null?re.firstBaseUpdate=X:O.next=X,re.lastBaseUpdate=P))}if(S!==null){var se=g.baseState;T=0,re=X=P=null,O=S;do{var Q=O.lane&-536870913,ee=Q!==O.lane;if(ee?(De&Q)===Q:(d&Q)===Q){Q!==0&&Q===vi&&(Hc=!0),re!==null&&(re=re.next={lane:0,tag:O.tag,payload:O.payload,callback:null,next:null});e:{var he=r,Se=O;Q=i;var We=l;switch(Se.tag){case 1:if(he=Se.payload,typeof he=="function"){se=he.call(We,se,Q);break e}se=he;break e;case 3:he.flags=he.flags&-65537|128;case 0:if(he=Se.payload,Q=typeof he=="function"?he.call(We,se,Q):he,Q==null)break e;se=m({},se,Q);break e;case 2:Gr=!0}}Q=O.callback,Q!==null&&(r.flags|=64,ee&&(r.flags|=8192),ee=g.callbacks,ee===null?g.callbacks=[Q]:ee.push(Q))}else ee={lane:Q,tag:O.tag,payload:O.payload,callback:O.callback,next:null},re===null?(X=re=ee,P=se):re=re.next=ee,T|=Q;if(O=O.next,O===null){if(O=g.shared.pending,O===null)break;ee=O,O=ee.next,ee.next=null,g.lastBaseUpdate=ee,g.shared.pending=null}}while(!0);re===null&&(P=se),g.baseState=P,g.firstBaseUpdate=X,g.lastBaseUpdate=re,S===null&&(g.shared.lanes=0),Zr|=T,r.lanes=T,r.memoizedState=se}}function DE(r,i){if(typeof r!="function")throw Error(a(191,r));r.call(i)}function ME(r,i){var l=r.callbacks;if(l!==null)for(r.callbacks=null,r=0;r<l.length;r++)DE(l[r],i)}var Ti=B(null),el=B(0);function FE(r,i){r=kr,I(el,r),I(Ti,i),kr=r|i.baseLanes}function Vc(){I(el,kr),I(Ti,Ti.current)}function Yc(){kr=el.current,Y(Ti),Y(el)}var yn=B(null),Bn=null;function Yr(r){var i=r.alternate;I(pt,pt.current&1),I(yn,r),Bn===null&&(i===null||Ti.current!==null||i.memoizedState!==null)&&(Bn=r)}function Kc(r){I(pt,pt.current),I(yn,r),Bn===null&&(Bn=r)}function UE(r){r.tag===22?(I(pt,pt.current),I(yn,r),Bn===null&&(Bn=r)):Kr()}function Kr(){I(pt,pt.current),I(yn,yn.current)}function Sn(r){Y(yn),Bn===r&&(Bn=null),Y(pt)}var pt=B(0);function tl(r){for(var i=r;i!==null;){if(i.tag===13){var l=i.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||ep(l)||tp(l)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var vr=0,Re=null,Ye=null,bt=null,nl=!1,Ai=!1,La=!1,rl=0,_s=0,Ri=null,ED=0;function lt(){throw Error(a(321))}function Wc(r,i){if(i===null)return!1;for(var l=0;l<i.length&&l<r.length;l++)if(!gn(r[l],i[l]))return!1;return!0}function Xc(r,i,l,d,g,S){return vr=S,Re=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,G.H=r===null||r.memoizedState===null?vx:dd,La=!1,S=l(d,g),La=!1,Ai&&(S=jE(i,l,d,g)),BE(r),S}function BE(r){G.H=Cs;var i=Ye!==null&&Ye.next!==null;if(vr=0,bt=Ye=Re=null,nl=!1,_s=0,Ri=null,i)throw Error(a(300));r===null||yt||(r=r.dependencies,r!==null&&Yo(r)&&(yt=!0))}function jE(r,i,l,d){Re=r;var g=0;do{if(Ai&&(Ri=null),_s=0,Ai=!1,25<=g)throw Error(a(301));if(g+=1,bt=Ye=null,r.updateQueue!=null){var S=r.updateQueue;S.lastEffect=null,S.events=null,S.stores=null,S.memoCache!=null&&(S.memoCache.index=0)}G.H=Ex,S=i(l,d)}while(Ai);return S}function xD(){var r=G.H,i=r.useState()[0];return i=typeof i.then=="function"?ks(i):i,r=r.useState()[0],(Ye!==null?Ye.memoizedState:null)!==r&&(Re.flags|=1024),i}function Zc(){var r=rl!==0;return rl=0,r}function Qc(r,i,l){i.updateQueue=r.updateQueue,i.flags&=-2053,r.lanes&=~l}function Jc(r){if(nl){for(r=r.memoizedState;r!==null;){var i=r.queue;i!==null&&(i.pending=null),r=r.next}nl=!1}vr=0,bt=Ye=Re=null,Ai=!1,_s=rl=0,Ri=null}function Kt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return bt===null?Re.memoizedState=bt=r:bt=bt.next=r,bt}function ft(){if(Ye===null){var r=Re.alternate;r=r!==null?r.memoizedState:null}else r=Ye.next;var i=bt===null?Re.memoizedState:bt.next;if(i!==null)bt=i,Ye=r;else{if(r===null)throw Re.alternate===null?Error(a(467)):Error(a(310));Ye=r,r={memoizedState:Ye.memoizedState,baseState:Ye.baseState,baseQueue:Ye.baseQueue,queue:Ye.queue,next:null},bt===null?Re.memoizedState=bt=r:bt=bt.next=r}return bt}function al(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ks(r){var i=_s;return _s+=1,Ri===null&&(Ri=[]),r=NE(Ri,r,i),i=Re,(bt===null?i.memoizedState:bt.next)===null&&(i=i.alternate,G.H=i===null||i.memoizedState===null?vx:dd),r}function il(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return ks(r);if(r.$$typeof===A)return Mt(r)}throw Error(a(438,String(r)))}function ed(r){var i=null,l=Re.updateQueue;if(l!==null&&(i=l.memoCache),i==null){var d=Re.alternate;d!==null&&(d=d.updateQueue,d!==null&&(d=d.memoCache,d!=null&&(i={data:d.data.map(function(g){return g.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),l===null&&(l=al(),Re.updateQueue=l),l.memoCache=i,l=i.data[i.index],l===void 0)for(l=i.data[i.index]=Array(r),d=0;d<r;d++)l[d]=L;return i.index++,l}function Er(r,i){return typeof i=="function"?i(r):i}function sl(r){var i=ft();return td(i,Ye,r)}function td(r,i,l){var d=r.queue;if(d===null)throw Error(a(311));d.lastRenderedReducer=l;var g=r.baseQueue,S=d.pending;if(S!==null){if(g!==null){var T=g.next;g.next=S.next,S.next=T}i.baseQueue=g=S,d.pending=null}if(S=r.baseState,g===null)r.memoizedState=S;else{i=g.next;var O=T=null,P=null,X=i,re=!1;do{var se=X.lane&-536870913;if(se!==X.lane?(De&se)===se:(vr&se)===se){var Q=X.revertLane;if(Q===0)P!==null&&(P=P.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),se===vi&&(re=!0);else if((vr&Q)===Q){X=X.next,Q===vi&&(re=!0);continue}else se={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},P===null?(O=P=se,T=S):P=P.next=se,Re.lanes|=Q,Zr|=Q;se=X.action,La&&l(S,se),S=X.hasEagerState?X.eagerState:l(S,se)}else Q={lane:se,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},P===null?(O=P=Q,T=S):P=P.next=Q,Re.lanes|=se,Zr|=se;X=X.next}while(X!==null&&X!==i);if(P===null?T=S:P.next=O,!gn(S,r.memoizedState)&&(yt=!0,re&&(l=Ei,l!==null)))throw l;r.memoizedState=S,r.baseState=T,r.baseQueue=P,d.lastRenderedState=S}return g===null&&(d.lanes=0),[r.memoizedState,d.dispatch]}function nd(r){var i=ft(),l=i.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=r;var d=l.dispatch,g=l.pending,S=i.memoizedState;if(g!==null){l.pending=null;var T=g=g.next;do S=r(S,T.action),T=T.next;while(T!==g);gn(S,i.memoizedState)||(yt=!0),i.memoizedState=S,i.baseQueue===null&&(i.baseState=S),l.lastRenderedState=S}return[S,d]}function PE(r,i,l){var d=Re,g=ft(),S=Ue;if(S){if(l===void 0)throw Error(a(407));l=l()}else l=i();var T=!gn((Ye||g).memoizedState,l);if(T&&(g.memoizedState=l,yt=!0),g=g.queue,id($E.bind(null,d,g,r),[r]),g.getSnapshot!==i||T||bt!==null&&bt.memoizedState.tag&1){if(d.flags|=2048,_i(9,{destroy:void 0},qE.bind(null,d,g,l,i),null),Qe===null)throw Error(a(349));S||(vr&127)!==0||zE(d,i,l)}return l}function zE(r,i,l){r.flags|=16384,r={getSnapshot:i,value:l},i=Re.updateQueue,i===null?(i=al(),Re.updateQueue=i,i.stores=[r]):(l=i.stores,l===null?i.stores=[r]:l.push(r))}function qE(r,i,l,d){i.value=l,i.getSnapshot=d,GE(i)&&HE(r)}function $E(r,i,l){return l(function(){GE(i)&&HE(r)})}function GE(r){var i=r.getSnapshot;r=r.value;try{var l=i();return!gn(r,l)}catch{return!0}}function HE(r){var i=Ta(r,2);i!==null&&ln(i,r,2)}function rd(r){var i=Kt();if(typeof r=="function"){var l=r;if(r=l(),La){it(!0);try{l()}finally{it(!1)}}}return i.memoizedState=i.baseState=r,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Er,lastRenderedState:r},i}function VE(r,i,l,d){return r.baseState=l,td(r,Ye,typeof d=="function"?d:Er)}function wD(r,i,l,d,g){if(ul(r))throw Error(a(485));if(r=i.action,r!==null){var S={payload:g,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(T){S.listeners.push(T)}};G.T!==null?l(!0):S.isTransition=!1,d(S),l=i.pending,l===null?(S.next=i.pending=S,YE(i,S)):(S.next=l.next,i.pending=l.next=S)}}function YE(r,i){var l=i.action,d=i.payload,g=r.state;if(i.isTransition){var S=G.T,T={};G.T=T;try{var O=l(g,d),P=G.S;P!==null&&P(T,O),KE(r,i,O)}catch(X){ad(r,i,X)}finally{S!==null&&T.types!==null&&(S.types=T.types),G.T=S}}else try{S=l(g,d),KE(r,i,S)}catch(X){ad(r,i,X)}}function KE(r,i,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(d){WE(r,i,d)},function(d){return ad(r,i,d)}):WE(r,i,l)}function WE(r,i,l){i.status="fulfilled",i.value=l,XE(i),r.state=l,i=r.pending,i!==null&&(l=i.next,l===i?r.pending=null:(l=l.next,i.next=l,YE(r,l)))}function ad(r,i,l){var d=r.pending;if(r.pending=null,d!==null){d=d.next;do i.status="rejected",i.reason=l,XE(i),i=i.next;while(i!==d)}r.action=null}function XE(r){r=r.listeners;for(var i=0;i<r.length;i++)(0,r[i])()}function ZE(r,i){return i}function QE(r,i){if(Ue){var l=Qe.formState;if(l!==null){e:{var d=Re;if(Ue){if(nt){t:{for(var g=nt,S=Un;g.nodeType!==8;){if(!S){g=null;break t}if(g=jn(g.nextSibling),g===null){g=null;break t}}S=g.data,g=S==="F!"||S==="F"?g:null}if(g){nt=jn(g.nextSibling),d=g.data==="F!";break e}}qr(d)}d=!1}d&&(i=l[0])}}return l=Kt(),l.memoizedState=l.baseState=i,d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ZE,lastRenderedState:i},l.queue=d,l=bx.bind(null,Re,d),d.dispatch=l,d=rd(!1),S=cd.bind(null,Re,!1,d.queue),d=Kt(),g={state:i,dispatch:null,action:r,pending:null},d.queue=g,l=wD.bind(null,Re,g,S,l),g.dispatch=l,d.memoizedState=r,[i,l,!1]}function JE(r){var i=ft();return ex(i,Ye,r)}function ex(r,i,l){if(i=td(r,i,ZE)[0],r=sl(Er)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var d=ks(i)}catch(T){throw T===xi?Xo:T}else d=i;i=ft();var g=i.queue,S=g.dispatch;return l!==i.memoizedState&&(Re.flags|=2048,_i(9,{destroy:void 0},TD.bind(null,g,l),null)),[d,S,r]}function TD(r,i){r.action=i}function tx(r){var i=ft(),l=Ye;if(l!==null)return ex(i,l,r);ft(),i=i.memoizedState,l=ft();var d=l.queue.dispatch;return l.memoizedState=r,[i,d,!1]}function _i(r,i,l,d){return r={tag:r,create:l,deps:d,inst:i,next:null},i=Re.updateQueue,i===null&&(i=al(),Re.updateQueue=i),l=i.lastEffect,l===null?i.lastEffect=r.next=r:(d=l.next,l.next=r,r.next=d,i.lastEffect=r),r}function nx(){return ft().memoizedState}function ol(r,i,l,d){var g=Kt();Re.flags|=r,g.memoizedState=_i(1|i,{destroy:void 0},l,d===void 0?null:d)}function ll(r,i,l,d){var g=ft();d=d===void 0?null:d;var S=g.memoizedState.inst;Ye!==null&&d!==null&&Wc(d,Ye.memoizedState.deps)?g.memoizedState=_i(i,S,l,d):(Re.flags|=r,g.memoizedState=_i(1|i,S,l,d))}function rx(r,i){ol(8390656,8,r,i)}function id(r,i){ll(2048,8,r,i)}function AD(r){Re.flags|=4;var i=Re.updateQueue;if(i===null)i=al(),Re.updateQueue=i,i.events=[r];else{var l=i.events;l===null?i.events=[r]:l.push(r)}}function ax(r){var i=ft().memoizedState;return AD({ref:i,nextImpl:r}),function(){if((qe&2)!==0)throw Error(a(440));return i.impl.apply(void 0,arguments)}}function ix(r,i){return ll(4,2,r,i)}function sx(r,i){return ll(4,4,r,i)}function ox(r,i){if(typeof i=="function"){r=r();var l=i(r);return function(){typeof l=="function"?l():i(null)}}if(i!=null)return r=r(),i.current=r,function(){i.current=null}}function lx(r,i,l){l=l!=null?l.concat([r]):null,ll(4,4,ox.bind(null,i,r),l)}function sd(){}function ux(r,i){var l=ft();i=i===void 0?null:i;var d=l.memoizedState;return i!==null&&Wc(i,d[1])?d[0]:(l.memoizedState=[r,i],r)}function cx(r,i){var l=ft();i=i===void 0?null:i;var d=l.memoizedState;if(i!==null&&Wc(i,d[1]))return d[0];if(d=r(),La){it(!0);try{r()}finally{it(!1)}}return l.memoizedState=[d,i],d}function od(r,i,l){return l===void 0||(vr&1073741824)!==0&&(De&261930)===0?r.memoizedState=i:(r.memoizedState=l,r=dw(),Re.lanes|=r,Zr|=r,l)}function dx(r,i,l,d){return gn(l,i)?l:Ti.current!==null?(r=od(r,l,d),gn(r,i)||(yt=!0),r):(vr&42)===0||(vr&1073741824)!==0&&(De&261930)===0?(yt=!0,r.memoizedState=l):(r=dw(),Re.lanes|=r,Zr|=r,i)}function px(r,i,l,d,g){var S=ne.p;ne.p=S!==0&&8>S?S:8;var T=G.T,O={};G.T=O,cd(r,!1,i,l);try{var P=g(),X=G.S;if(X!==null&&X(O,P),P!==null&&typeof P=="object"&&typeof P.then=="function"){var re=vD(P,d);Ns(r,i,re,xn(r))}else Ns(r,i,d,xn(r))}catch(se){Ns(r,i,{then:function(){},status:"rejected",reason:se},xn())}finally{ne.p=S,T!==null&&O.types!==null&&(T.types=O.types),G.T=T}}function RD(){}function ld(r,i,l,d){if(r.tag!==5)throw Error(a(476));var g=fx(r).queue;px(r,g,i,ae,l===null?RD:function(){return hx(r),l(d)})}function fx(r){var i=r.memoizedState;if(i!==null)return i;i={memoizedState:ae,baseState:ae,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Er,lastRenderedState:ae},next:null};var l={};return i.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Er,lastRenderedState:l},next:null},r.memoizedState=i,r=r.alternate,r!==null&&(r.memoizedState=i),i}function hx(r){var i=fx(r);i.next===null&&(i=r.alternate.memoizedState),Ns(r,i.next.queue,{},xn())}function ud(){return Mt(Vs)}function mx(){return ft().memoizedState}function gx(){return ft().memoizedState}function _D(r){for(var i=r.return;i!==null;){switch(i.tag){case 24:case 3:var l=xn();r=Hr(l);var d=Vr(i,r,l);d!==null&&(ln(d,i,l),Ts(d,i,l)),i={cache:Bc()},r.payload=i;return}i=i.return}}function kD(r,i,l){var d=xn();l={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},ul(r)?yx(i,l):(l=_c(r,i,l,d),l!==null&&(ln(l,r,d),Sx(l,i,d)))}function bx(r,i,l){var d=xn();Ns(r,i,l,d)}function Ns(r,i,l,d){var g={lane:d,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(ul(r))yx(i,g);else{var S=r.alternate;if(r.lanes===0&&(S===null||S.lanes===0)&&(S=i.lastRenderedReducer,S!==null))try{var T=i.lastRenderedState,O=S(T,l);if(g.hasEagerState=!0,g.eagerState=O,gn(O,T))return $o(r,i,g,0),Qe===null&&qo(),!1}catch{}finally{}if(l=_c(r,i,g,d),l!==null)return ln(l,r,d),Sx(l,i,d),!0}return!1}function cd(r,i,l,d){if(d={lane:2,revertLane:qd(),gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},ul(r)){if(i)throw Error(a(479))}else i=_c(r,l,d,2),i!==null&&ln(i,r,2)}function ul(r){var i=r.alternate;return r===Re||i!==null&&i===Re}function yx(r,i){Ai=nl=!0;var l=r.pending;l===null?i.next=i:(i.next=l.next,l.next=i),r.pending=i}function Sx(r,i,l){if((l&4194048)!==0){var d=i.lanes;d&=r.pendingLanes,l|=d,i.lanes=l,Tv(r,l)}}var Cs={readContext:Mt,use:il,useCallback:lt,useContext:lt,useEffect:lt,useImperativeHandle:lt,useLayoutEffect:lt,useInsertionEffect:lt,useMemo:lt,useReducer:lt,useRef:lt,useState:lt,useDebugValue:lt,useDeferredValue:lt,useTransition:lt,useSyncExternalStore:lt,useId:lt,useHostTransitionStatus:lt,useFormState:lt,useActionState:lt,useOptimistic:lt,useMemoCache:lt,useCacheRefresh:lt};Cs.useEffectEvent=lt;var vx={readContext:Mt,use:il,useCallback:function(r,i){return Kt().memoizedState=[r,i===void 0?null:i],r},useContext:Mt,useEffect:rx,useImperativeHandle:function(r,i,l){l=l!=null?l.concat([r]):null,ol(4194308,4,ox.bind(null,i,r),l)},useLayoutEffect:function(r,i){return ol(4194308,4,r,i)},useInsertionEffect:function(r,i){ol(4,2,r,i)},useMemo:function(r,i){var l=Kt();i=i===void 0?null:i;var d=r();if(La){it(!0);try{r()}finally{it(!1)}}return l.memoizedState=[d,i],d},useReducer:function(r,i,l){var d=Kt();if(l!==void 0){var g=l(i);if(La){it(!0);try{l(i)}finally{it(!1)}}}else g=i;return d.memoizedState=d.baseState=g,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:g},d.queue=r,r=r.dispatch=kD.bind(null,Re,r),[d.memoizedState,r]},useRef:function(r){var i=Kt();return r={current:r},i.memoizedState=r},useState:function(r){r=rd(r);var i=r.queue,l=bx.bind(null,Re,i);return i.dispatch=l,[r.memoizedState,l]},useDebugValue:sd,useDeferredValue:function(r,i){var l=Kt();return od(l,r,i)},useTransition:function(){var r=rd(!1);return r=px.bind(null,Re,r.queue,!0,!1),Kt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,i,l){var d=Re,g=Kt();if(Ue){if(l===void 0)throw Error(a(407));l=l()}else{if(l=i(),Qe===null)throw Error(a(349));(De&127)!==0||zE(d,i,l)}g.memoizedState=l;var S={value:l,getSnapshot:i};return g.queue=S,rx($E.bind(null,d,S,r),[r]),d.flags|=2048,_i(9,{destroy:void 0},qE.bind(null,d,S,l,i),null),l},useId:function(){var r=Kt(),i=Qe.identifierPrefix;if(Ue){var l=Qn,d=Zn;l=(d&~(1<<32-$e(d)-1)).toString(32)+l,i="_"+i+"R_"+l,l=rl++,0<l&&(i+="H"+l.toString(32)),i+="_"}else l=ED++,i="_"+i+"r_"+l.toString(32)+"_";return r.memoizedState=i},useHostTransitionStatus:ud,useFormState:QE,useActionState:QE,useOptimistic:function(r){var i=Kt();i.memoizedState=i.baseState=r;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=l,i=cd.bind(null,Re,!0,l),l.dispatch=i,[r,i]},useMemoCache:ed,useCacheRefresh:function(){return Kt().memoizedState=_D.bind(null,Re)},useEffectEvent:function(r){var i=Kt(),l={impl:r};return i.memoizedState=l,function(){if((qe&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},dd={readContext:Mt,use:il,useCallback:ux,useContext:Mt,useEffect:id,useImperativeHandle:lx,useInsertionEffect:ix,useLayoutEffect:sx,useMemo:cx,useReducer:sl,useRef:nx,useState:function(){return sl(Er)},useDebugValue:sd,useDeferredValue:function(r,i){var l=ft();return dx(l,Ye.memoizedState,r,i)},useTransition:function(){var r=sl(Er)[0],i=ft().memoizedState;return[typeof r=="boolean"?r:ks(r),i]},useSyncExternalStore:PE,useId:mx,useHostTransitionStatus:ud,useFormState:JE,useActionState:JE,useOptimistic:function(r,i){var l=ft();return VE(l,Ye,r,i)},useMemoCache:ed,useCacheRefresh:gx};dd.useEffectEvent=ax;var Ex={readContext:Mt,use:il,useCallback:ux,useContext:Mt,useEffect:id,useImperativeHandle:lx,useInsertionEffect:ix,useLayoutEffect:sx,useMemo:cx,useReducer:nd,useRef:nx,useState:function(){return nd(Er)},useDebugValue:sd,useDeferredValue:function(r,i){var l=ft();return Ye===null?od(l,r,i):dx(l,Ye.memoizedState,r,i)},useTransition:function(){var r=nd(Er)[0],i=ft().memoizedState;return[typeof r=="boolean"?r:ks(r),i]},useSyncExternalStore:PE,useId:mx,useHostTransitionStatus:ud,useFormState:tx,useActionState:tx,useOptimistic:function(r,i){var l=ft();return Ye!==null?VE(l,Ye,r,i):(l.baseState=r,[r,l.queue.dispatch])},useMemoCache:ed,useCacheRefresh:gx};Ex.useEffectEvent=ax;function pd(r,i,l,d){i=r.memoizedState,l=l(d,i),l=l==null?i:m({},i,l),r.memoizedState=l,r.lanes===0&&(r.updateQueue.baseState=l)}var fd={enqueueSetState:function(r,i,l){r=r._reactInternals;var d=xn(),g=Hr(d);g.payload=i,l!=null&&(g.callback=l),i=Vr(r,g,d),i!==null&&(ln(i,r,d),Ts(i,r,d))},enqueueReplaceState:function(r,i,l){r=r._reactInternals;var d=xn(),g=Hr(d);g.tag=1,g.payload=i,l!=null&&(g.callback=l),i=Vr(r,g,d),i!==null&&(ln(i,r,d),Ts(i,r,d))},enqueueForceUpdate:function(r,i){r=r._reactInternals;var l=xn(),d=Hr(l);d.tag=2,i!=null&&(d.callback=i),i=Vr(r,d,l),i!==null&&(ln(i,r,l),Ts(i,r,l))}};function xx(r,i,l,d,g,S,T){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(d,S,T):i.prototype&&i.prototype.isPureReactComponent?!gs(l,d)||!gs(g,S):!0}function wx(r,i,l,d){r=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(l,d),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(l,d),i.state!==r&&fd.enqueueReplaceState(i,i.state,null)}function Da(r,i){var l=i;if("ref"in i){l={};for(var d in i)d!=="ref"&&(l[d]=i[d])}if(r=r.defaultProps){l===i&&(l=m({},l));for(var g in r)l[g]===void 0&&(l[g]=r[g])}return l}function Tx(r){zo(r)}function Ax(r){console.error(r)}function Rx(r){zo(r)}function cl(r,i){try{var l=r.onUncaughtError;l(i.value,{componentStack:i.stack})}catch(d){setTimeout(function(){throw d})}}function _x(r,i,l){try{var d=r.onCaughtError;d(l.value,{componentStack:l.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function hd(r,i,l){return l=Hr(l),l.tag=3,l.payload={element:null},l.callback=function(){cl(r,i)},l}function kx(r){return r=Hr(r),r.tag=3,r}function Nx(r,i,l,d){var g=l.type.getDerivedStateFromError;if(typeof g=="function"){var S=d.value;r.payload=function(){return g(S)},r.callback=function(){_x(i,l,d)}}var T=l.stateNode;T!==null&&typeof T.componentDidCatch=="function"&&(r.callback=function(){_x(i,l,d),typeof g!="function"&&(Qr===null?Qr=new Set([this]):Qr.add(this));var O=d.stack;this.componentDidCatch(d.value,{componentStack:O!==null?O:""})})}function ND(r,i,l,d,g){if(l.flags|=32768,d!==null&&typeof d=="object"&&typeof d.then=="function"){if(i=l.alternate,i!==null&&Si(i,l,g,!0),l=yn.current,l!==null){switch(l.tag){case 31:case 13:return Bn===null?xl():l.alternate===null&&ut===0&&(ut=3),l.flags&=-257,l.flags|=65536,l.lanes=g,d===Zo?l.flags|=16384:(i=l.updateQueue,i===null?l.updateQueue=new Set([d]):i.add(d),jd(r,d,g)),!1;case 22:return l.flags|=65536,d===Zo?l.flags|=16384:(i=l.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([d])},l.updateQueue=i):(l=i.retryQueue,l===null?i.retryQueue=new Set([d]):l.add(d)),jd(r,d,g)),!1}throw Error(a(435,l.tag))}return jd(r,d,g),xl(),!1}if(Ue)return i=yn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=g,d!==Lc&&(r=Error(a(422),{cause:d}),Ss(Dn(r,l)))):(d!==Lc&&(i=Error(a(423),{cause:d}),Ss(Dn(i,l))),r=r.current.alternate,r.flags|=65536,g&=-g,r.lanes|=g,d=Dn(d,l),g=hd(r.stateNode,d,g),Gc(r,g),ut!==4&&(ut=2)),!1;var S=Error(a(520),{cause:d});if(S=Dn(S,l),Bs===null?Bs=[S]:Bs.push(S),ut!==4&&(ut=2),i===null)return!0;d=Dn(d,l),l=i;do{switch(l.tag){case 3:return l.flags|=65536,r=g&-g,l.lanes|=r,r=hd(l.stateNode,d,r),Gc(l,r),!1;case 1:if(i=l.type,S=l.stateNode,(l.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||S!==null&&typeof S.componentDidCatch=="function"&&(Qr===null||!Qr.has(S))))return l.flags|=65536,g&=-g,l.lanes|=g,g=kx(g),Nx(g,r,l,d),Gc(l,g),!1}l=l.return}while(l!==null);return!1}var md=Error(a(461)),yt=!1;function Ft(r,i,l,d){i.child=r===null?LE(i,null,l,d):Ia(i,r.child,l,d)}function Cx(r,i,l,d,g){l=l.render;var S=i.ref;if("ref"in d){var T={};for(var O in d)O!=="ref"&&(T[O]=d[O])}else T=d;return ka(i),d=Xc(r,i,l,T,S,g),O=Zc(),r!==null&&!yt?(Qc(r,i,g),xr(r,i,g)):(Ue&&O&&Oc(i),i.flags|=1,Ft(r,i,d,g),i.child)}function Ox(r,i,l,d,g){if(r===null){var S=l.type;return typeof S=="function"&&!kc(S)&&S.defaultProps===void 0&&l.compare===null?(i.tag=15,i.type=S,Ix(r,i,S,d,g)):(r=Ho(l.type,null,d,i,i.mode,g),r.ref=i.ref,r.return=i,i.child=r)}if(S=r.child,!wd(r,g)){var T=S.memoizedProps;if(l=l.compare,l=l!==null?l:gs,l(T,d)&&r.ref===i.ref)return xr(r,i,g)}return i.flags|=1,r=gr(S,d),r.ref=i.ref,r.return=i,i.child=r}function Ix(r,i,l,d,g){if(r!==null){var S=r.memoizedProps;if(gs(S,d)&&r.ref===i.ref)if(yt=!1,i.pendingProps=d=S,wd(r,g))(r.flags&131072)!==0&&(yt=!0);else return i.lanes=r.lanes,xr(r,i,g)}return gd(r,i,l,d,g)}function Lx(r,i,l,d){var g=d.children,S=r!==null?r.memoizedState:null;if(r===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),d.mode==="hidden"){if((i.flags&128)!==0){if(S=S!==null?S.baseLanes|l:l,r!==null){for(d=i.child=r.child,g=0;d!==null;)g=g|d.lanes|d.childLanes,d=d.sibling;d=g&~S}else d=0,i.child=null;return Dx(r,i,S,l,d)}if((l&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},r!==null&&Wo(i,S!==null?S.cachePool:null),S!==null?FE(i,S):Vc(),UE(i);else return d=i.lanes=536870912,Dx(r,i,S!==null?S.baseLanes|l:l,l,d)}else S!==null?(Wo(i,S.cachePool),FE(i,S),Kr(),i.memoizedState=null):(r!==null&&Wo(i,null),Vc(),Kr());return Ft(r,i,g,l),i.child}function Os(r,i){return r!==null&&r.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function Dx(r,i,l,d,g){var S=Pc();return S=S===null?null:{parent:gt._currentValue,pool:S},i.memoizedState={baseLanes:l,cachePool:S},r!==null&&Wo(i,null),Vc(),UE(i),r!==null&&Si(r,i,d,!0),i.childLanes=g,null}function dl(r,i){return i=fl({mode:i.mode,children:i.children},r.mode),i.ref=r.ref,r.child=i,i.return=r,i}function Mx(r,i,l){return Ia(i,r.child,null,l),r=dl(i,i.pendingProps),r.flags|=2,Sn(i),i.memoizedState=null,r}function CD(r,i,l){var d=i.pendingProps,g=(i.flags&128)!==0;if(i.flags&=-129,r===null){if(Ue){if(d.mode==="hidden")return r=dl(i,d),i.lanes=536870912,Os(null,r);if(Kc(i),(r=nt)?(r=Yw(r,Un),r=r!==null&&r.data==="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Pr!==null?{id:Zn,overflow:Qn}:null,retryLane:536870912,hydrationErrors:null},l=yE(r),l.return=i,i.child=l,Dt=i,nt=null)):r=null,r===null)throw qr(i);return i.lanes=536870912,null}return dl(i,d)}var S=r.memoizedState;if(S!==null){var T=S.dehydrated;if(Kc(i),g)if(i.flags&256)i.flags&=-257,i=Mx(r,i,l);else if(i.memoizedState!==null)i.child=r.child,i.flags|=128,i=null;else throw Error(a(558));else if(yt||Si(r,i,l,!1),g=(l&r.childLanes)!==0,yt||g){if(d=Qe,d!==null&&(T=Av(d,l),T!==0&&T!==S.retryLane))throw S.retryLane=T,Ta(r,T),ln(d,r,T),md;xl(),i=Mx(r,i,l)}else r=S.treeContext,nt=jn(T.nextSibling),Dt=i,Ue=!0,zr=null,Un=!1,r!==null&&EE(i,r),i=dl(i,d),i.flags|=4096;return i}return r=gr(r.child,{mode:d.mode,children:d.children}),r.ref=i.ref,i.child=r,r.return=i,r}function pl(r,i){var l=i.ref;if(l===null)r!==null&&r.ref!==null&&(i.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(r===null||r.ref!==l)&&(i.flags|=4194816)}}function gd(r,i,l,d,g){return ka(i),l=Xc(r,i,l,d,void 0,g),d=Zc(),r!==null&&!yt?(Qc(r,i,g),xr(r,i,g)):(Ue&&d&&Oc(i),i.flags|=1,Ft(r,i,l,g),i.child)}function Fx(r,i,l,d,g,S){return ka(i),i.updateQueue=null,l=jE(i,d,l,g),BE(r),d=Zc(),r!==null&&!yt?(Qc(r,i,S),xr(r,i,S)):(Ue&&d&&Oc(i),i.flags|=1,Ft(r,i,l,S),i.child)}function Ux(r,i,l,d,g){if(ka(i),i.stateNode===null){var S=mi,T=l.contextType;typeof T=="object"&&T!==null&&(S=Mt(T)),S=new l(d,S),i.memoizedState=S.state!==null&&S.state!==void 0?S.state:null,S.updater=fd,i.stateNode=S,S._reactInternals=i,S=i.stateNode,S.props=d,S.state=i.memoizedState,S.refs={},qc(i),T=l.contextType,S.context=typeof T=="object"&&T!==null?Mt(T):mi,S.state=i.memoizedState,T=l.getDerivedStateFromProps,typeof T=="function"&&(pd(i,l,T,d),S.state=i.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof S.getSnapshotBeforeUpdate=="function"||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(T=S.state,typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount(),T!==S.state&&fd.enqueueReplaceState(S,S.state,null),Rs(i,d,S,g),As(),S.state=i.memoizedState),typeof S.componentDidMount=="function"&&(i.flags|=4194308),d=!0}else if(r===null){S=i.stateNode;var O=i.memoizedProps,P=Da(l,O);S.props=P;var X=S.context,re=l.contextType;T=mi,typeof re=="object"&&re!==null&&(T=Mt(re));var se=l.getDerivedStateFromProps;re=typeof se=="function"||typeof S.getSnapshotBeforeUpdate=="function",O=i.pendingProps!==O,re||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(O||X!==T)&&wx(i,S,d,T),Gr=!1;var Q=i.memoizedState;S.state=Q,Rs(i,d,S,g),As(),X=i.memoizedState,O||Q!==X||Gr?(typeof se=="function"&&(pd(i,l,se,d),X=i.memoizedState),(P=Gr||xx(i,l,P,d,Q,X,T))?(re||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(i.flags|=4194308)):(typeof S.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=d,i.memoizedState=X),S.props=d,S.state=X,S.context=T,d=P):(typeof S.componentDidMount=="function"&&(i.flags|=4194308),d=!1)}else{S=i.stateNode,$c(r,i),T=i.memoizedProps,re=Da(l,T),S.props=re,se=i.pendingProps,Q=S.context,X=l.contextType,P=mi,typeof X=="object"&&X!==null&&(P=Mt(X)),O=l.getDerivedStateFromProps,(X=typeof O=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(T!==se||Q!==P)&&wx(i,S,d,P),Gr=!1,Q=i.memoizedState,S.state=Q,Rs(i,d,S,g),As();var ee=i.memoizedState;T!==se||Q!==ee||Gr||r!==null&&r.dependencies!==null&&Yo(r.dependencies)?(typeof O=="function"&&(pd(i,l,O,d),ee=i.memoizedState),(re=Gr||xx(i,l,re,d,Q,ee,P)||r!==null&&r.dependencies!==null&&Yo(r.dependencies))?(X||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(d,ee,P),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(d,ee,P)),typeof S.componentDidUpdate=="function"&&(i.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof S.componentDidUpdate!="function"||T===r.memoizedProps&&Q===r.memoizedState||(i.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&Q===r.memoizedState||(i.flags|=1024),i.memoizedProps=d,i.memoizedState=ee),S.props=d,S.state=ee,S.context=P,d=re):(typeof S.componentDidUpdate!="function"||T===r.memoizedProps&&Q===r.memoizedState||(i.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||T===r.memoizedProps&&Q===r.memoizedState||(i.flags|=1024),d=!1)}return S=d,pl(r,i),d=(i.flags&128)!==0,S||d?(S=i.stateNode,l=d&&typeof l.getDerivedStateFromError!="function"?null:S.render(),i.flags|=1,r!==null&&d?(i.child=Ia(i,r.child,null,g),i.child=Ia(i,null,l,g)):Ft(r,i,l,g),i.memoizedState=S.state,r=i.child):r=xr(r,i,g),r}function Bx(r,i,l,d){return Ra(),i.flags|=256,Ft(r,i,l,d),i.child}var bd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function yd(r){return{baseLanes:r,cachePool:_E()}}function Sd(r,i,l){return r=r!==null?r.childLanes&~l:0,i&&(r|=En),r}function jx(r,i,l){var d=i.pendingProps,g=!1,S=(i.flags&128)!==0,T;if((T=S)||(T=r!==null&&r.memoizedState===null?!1:(pt.current&2)!==0),T&&(g=!0,i.flags&=-129),T=(i.flags&32)!==0,i.flags&=-33,r===null){if(Ue){if(g?Yr(i):Kr(),(r=nt)?(r=Yw(r,Un),r=r!==null&&r.data!=="&"?r:null,r!==null&&(i.memoizedState={dehydrated:r,treeContext:Pr!==null?{id:Zn,overflow:Qn}:null,retryLane:536870912,hydrationErrors:null},l=yE(r),l.return=i,i.child=l,Dt=i,nt=null)):r=null,r===null)throw qr(i);return tp(r)?i.lanes=32:i.lanes=536870912,null}var O=d.children;return d=d.fallback,g?(Kr(),g=i.mode,O=fl({mode:"hidden",children:O},g),d=Aa(d,g,l,null),O.return=i,d.return=i,O.sibling=d,i.child=O,d=i.child,d.memoizedState=yd(l),d.childLanes=Sd(r,T,l),i.memoizedState=bd,Os(null,d)):(Yr(i),vd(i,O))}var P=r.memoizedState;if(P!==null&&(O=P.dehydrated,O!==null)){if(S)i.flags&256?(Yr(i),i.flags&=-257,i=Ed(r,i,l)):i.memoizedState!==null?(Kr(),i.child=r.child,i.flags|=128,i=null):(Kr(),O=d.fallback,g=i.mode,d=fl({mode:"visible",children:d.children},g),O=Aa(O,g,l,null),O.flags|=2,d.return=i,O.return=i,d.sibling=O,i.child=d,Ia(i,r.child,null,l),d=i.child,d.memoizedState=yd(l),d.childLanes=Sd(r,T,l),i.memoizedState=bd,i=Os(null,d));else if(Yr(i),tp(O)){if(T=O.nextSibling&&O.nextSibling.dataset,T)var X=T.dgst;T=X,d=Error(a(419)),d.stack="",d.digest=T,Ss({value:d,source:null,stack:null}),i=Ed(r,i,l)}else if(yt||Si(r,i,l,!1),T=(l&r.childLanes)!==0,yt||T){if(T=Qe,T!==null&&(d=Av(T,l),d!==0&&d!==P.retryLane))throw P.retryLane=d,Ta(r,d),ln(T,r,d),md;ep(O)||xl(),i=Ed(r,i,l)}else ep(O)?(i.flags|=192,i.child=r.child,i=null):(r=P.treeContext,nt=jn(O.nextSibling),Dt=i,Ue=!0,zr=null,Un=!1,r!==null&&EE(i,r),i=vd(i,d.children),i.flags|=4096);return i}return g?(Kr(),O=d.fallback,g=i.mode,P=r.child,X=P.sibling,d=gr(P,{mode:"hidden",children:d.children}),d.subtreeFlags=P.subtreeFlags&65011712,X!==null?O=gr(X,O):(O=Aa(O,g,l,null),O.flags|=2),O.return=i,d.return=i,d.sibling=O,i.child=d,Os(null,d),d=i.child,O=r.child.memoizedState,O===null?O=yd(l):(g=O.cachePool,g!==null?(P=gt._currentValue,g=g.parent!==P?{parent:P,pool:P}:g):g=_E(),O={baseLanes:O.baseLanes|l,cachePool:g}),d.memoizedState=O,d.childLanes=Sd(r,T,l),i.memoizedState=bd,Os(r.child,d)):(Yr(i),l=r.child,r=l.sibling,l=gr(l,{mode:"visible",children:d.children}),l.return=i,l.sibling=null,r!==null&&(T=i.deletions,T===null?(i.deletions=[r],i.flags|=16):T.push(r)),i.child=l,i.memoizedState=null,l)}function vd(r,i){return i=fl({mode:"visible",children:i},r.mode),i.return=r,r.child=i}function fl(r,i){return r=bn(22,r,null,i),r.lanes=0,r}function Ed(r,i,l){return Ia(i,r.child,null,l),r=vd(i,i.pendingProps.children),r.flags|=2,i.memoizedState=null,r}function Px(r,i,l){r.lanes|=i;var d=r.alternate;d!==null&&(d.lanes|=i),Fc(r.return,i,l)}function xd(r,i,l,d,g,S){var T=r.memoizedState;T===null?r.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:d,tail:l,tailMode:g,treeForkCount:S}:(T.isBackwards=i,T.rendering=null,T.renderingStartTime=0,T.last=d,T.tail=l,T.tailMode=g,T.treeForkCount=S)}function zx(r,i,l){var d=i.pendingProps,g=d.revealOrder,S=d.tail;d=d.children;var T=pt.current,O=(T&2)!==0;if(O?(T=T&1|2,i.flags|=128):T&=1,I(pt,T),Ft(r,i,d,l),d=Ue?ys:0,!O&&r!==null&&(r.flags&128)!==0)e:for(r=i.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&Px(r,l,i);else if(r.tag===19)Px(r,l,i);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(g){case"forwards":for(l=i.child,g=null;l!==null;)r=l.alternate,r!==null&&tl(r)===null&&(g=l),l=l.sibling;l=g,l===null?(g=i.child,i.child=null):(g=l.sibling,l.sibling=null),xd(i,!1,g,l,S,d);break;case"backwards":case"unstable_legacy-backwards":for(l=null,g=i.child,i.child=null;g!==null;){if(r=g.alternate,r!==null&&tl(r)===null){i.child=g;break}r=g.sibling,g.sibling=l,l=g,g=r}xd(i,!0,l,null,S,d);break;case"together":xd(i,!1,null,null,void 0,d);break;default:i.memoizedState=null}return i.child}function xr(r,i,l){if(r!==null&&(i.dependencies=r.dependencies),Zr|=i.lanes,(l&i.childLanes)===0)if(r!==null){if(Si(r,i,l,!1),(l&i.childLanes)===0)return null}else return null;if(r!==null&&i.child!==r.child)throw Error(a(153));if(i.child!==null){for(r=i.child,l=gr(r,r.pendingProps),i.child=l,l.return=i;r.sibling!==null;)r=r.sibling,l=l.sibling=gr(r,r.pendingProps),l.return=i;l.sibling=null}return i.child}function wd(r,i){return(r.lanes&i)!==0?!0:(r=r.dependencies,!!(r!==null&&Yo(r)))}function OD(r,i,l){switch(i.tag){case 3:Ae(i,i.stateNode.containerInfo),$r(i,gt,r.memoizedState.cache),Ra();break;case 27:case 5:et(i);break;case 4:Ae(i,i.stateNode.containerInfo);break;case 10:$r(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,Kc(i),null;break;case 13:var d=i.memoizedState;if(d!==null)return d.dehydrated!==null?(Yr(i),i.flags|=128,null):(l&i.child.childLanes)!==0?jx(r,i,l):(Yr(i),r=xr(r,i,l),r!==null?r.sibling:null);Yr(i);break;case 19:var g=(r.flags&128)!==0;if(d=(l&i.childLanes)!==0,d||(Si(r,i,l,!1),d=(l&i.childLanes)!==0),g){if(d)return zx(r,i,l);i.flags|=128}if(g=i.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),I(pt,pt.current),d)break;return null;case 22:return i.lanes=0,Lx(r,i,l,i.pendingProps);case 24:$r(i,gt,r.memoizedState.cache)}return xr(r,i,l)}function qx(r,i,l){if(r!==null)if(r.memoizedProps!==i.pendingProps)yt=!0;else{if(!wd(r,l)&&(i.flags&128)===0)return yt=!1,OD(r,i,l);yt=(r.flags&131072)!==0}else yt=!1,Ue&&(i.flags&1048576)!==0&&vE(i,ys,i.index);switch(i.lanes=0,i.tag){case 16:e:{var d=i.pendingProps;if(r=Ca(i.elementType),i.type=r,typeof r=="function")kc(r)?(d=Da(r,d),i.tag=1,i=Ux(null,i,r,d,l)):(i.tag=0,i=gd(null,i,r,d,l));else{if(r!=null){var g=r.$$typeof;if(g===N){i.tag=11,i=Cx(null,i,r,d,l);break e}else if(g===C){i.tag=14,i=Ox(null,i,r,d,l);break e}}throw i=H(r)||r,Error(a(306,i,""))}}return i;case 0:return gd(r,i,i.type,i.pendingProps,l);case 1:return d=i.type,g=Da(d,i.pendingProps),Ux(r,i,d,g,l);case 3:e:{if(Ae(i,i.stateNode.containerInfo),r===null)throw Error(a(387));d=i.pendingProps;var S=i.memoizedState;g=S.element,$c(r,i),Rs(i,d,null,l);var T=i.memoizedState;if(d=T.cache,$r(i,gt,d),d!==S.cache&&Uc(i,[gt],l,!0),As(),d=T.element,S.isDehydrated)if(S={element:d,isDehydrated:!1,cache:T.cache},i.updateQueue.baseState=S,i.memoizedState=S,i.flags&256){i=Bx(r,i,d,l);break e}else if(d!==g){g=Dn(Error(a(424)),i),Ss(g),i=Bx(r,i,d,l);break e}else{switch(r=i.stateNode.containerInfo,r.nodeType){case 9:r=r.body;break;default:r=r.nodeName==="HTML"?r.ownerDocument.body:r}for(nt=jn(r.firstChild),Dt=i,Ue=!0,zr=null,Un=!0,l=LE(i,null,d,l),i.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ra(),d===g){i=xr(r,i,l);break e}Ft(r,i,d,l)}i=i.child}return i;case 26:return pl(r,i),r===null?(l=Jw(i.type,null,i.pendingProps,null))?i.memoizedState=l:Ue||(l=i.type,r=i.pendingProps,d=Nl(ce.current).createElement(l),d[Lt]=i,d[tn]=r,Ut(d,l,r),kt(d),i.stateNode=d):i.memoizedState=Jw(i.type,r.memoizedProps,i.pendingProps,r.memoizedState),null;case 27:return et(i),r===null&&Ue&&(d=i.stateNode=Xw(i.type,i.pendingProps,ce.current),Dt=i,Un=!0,g=nt,na(i.type)?(np=g,nt=jn(d.firstChild)):nt=g),Ft(r,i,i.pendingProps.children,l),pl(r,i),r===null&&(i.flags|=4194304),i.child;case 5:return r===null&&Ue&&((g=d=nt)&&(d=oM(d,i.type,i.pendingProps,Un),d!==null?(i.stateNode=d,Dt=i,nt=jn(d.firstChild),Un=!1,g=!0):g=!1),g||qr(i)),et(i),g=i.type,S=i.pendingProps,T=r!==null?r.memoizedProps:null,d=S.children,Zd(g,S)?d=null:T!==null&&Zd(g,T)&&(i.flags|=32),i.memoizedState!==null&&(g=Xc(r,i,xD,null,null,l),Vs._currentValue=g),pl(r,i),Ft(r,i,d,l),i.child;case 6:return r===null&&Ue&&((r=l=nt)&&(l=lM(l,i.pendingProps,Un),l!==null?(i.stateNode=l,Dt=i,nt=null,r=!0):r=!1),r||qr(i)),null;case 13:return jx(r,i,l);case 4:return Ae(i,i.stateNode.containerInfo),d=i.pendingProps,r===null?i.child=Ia(i,null,d,l):Ft(r,i,d,l),i.child;case 11:return Cx(r,i,i.type,i.pendingProps,l);case 7:return Ft(r,i,i.pendingProps,l),i.child;case 8:return Ft(r,i,i.pendingProps.children,l),i.child;case 12:return Ft(r,i,i.pendingProps.children,l),i.child;case 10:return d=i.pendingProps,$r(i,i.type,d.value),Ft(r,i,d.children,l),i.child;case 9:return g=i.type._context,d=i.pendingProps.children,ka(i),g=Mt(g),d=d(g),i.flags|=1,Ft(r,i,d,l),i.child;case 14:return Ox(r,i,i.type,i.pendingProps,l);case 15:return Ix(r,i,i.type,i.pendingProps,l);case 19:return zx(r,i,l);case 31:return CD(r,i,l);case 22:return Lx(r,i,l,i.pendingProps);case 24:return ka(i),d=Mt(gt),r===null?(g=Pc(),g===null&&(g=Qe,S=Bc(),g.pooledCache=S,S.refCount++,S!==null&&(g.pooledCacheLanes|=l),g=S),i.memoizedState={parent:d,cache:g},qc(i),$r(i,gt,g)):((r.lanes&l)!==0&&($c(r,i),Rs(i,null,null,l),As()),g=r.memoizedState,S=i.memoizedState,g.parent!==d?(g={parent:d,cache:d},i.memoizedState=g,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=g),$r(i,gt,d)):(d=S.cache,$r(i,gt,d),d!==g.cache&&Uc(i,[gt],l,!0))),Ft(r,i,i.pendingProps.children,l),i.child;case 29:throw i.pendingProps}throw Error(a(156,i.tag))}function wr(r){r.flags|=4}function Td(r,i,l,d,g){if((i=(r.mode&32)!==0)&&(i=!1),i){if(r.flags|=16777216,(g&335544128)===g)if(r.stateNode.complete)r.flags|=8192;else if(mw())r.flags|=8192;else throw Oa=Zo,zc}else r.flags&=-16777217}function $x(r,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!aT(i))if(mw())r.flags|=8192;else throw Oa=Zo,zc}function hl(r,i){i!==null&&(r.flags|=4),r.flags&16384&&(i=r.tag!==22?xv():536870912,r.lanes|=i,Oi|=i)}function Is(r,i){if(!Ue)switch(r.tailMode){case"hidden":i=r.tail;for(var l=null;i!==null;)i.alternate!==null&&(l=i),i=i.sibling;l===null?r.tail=null:l.sibling=null;break;case"collapsed":l=r.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?i||r.tail===null?r.tail=null:r.tail.sibling=null:d.sibling=null}}function rt(r){var i=r.alternate!==null&&r.alternate.child===r.child,l=0,d=0;if(i)for(var g=r.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags&65011712,d|=g.flags&65011712,g.return=r,g=g.sibling;else for(g=r.child;g!==null;)l|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=r,g=g.sibling;return r.subtreeFlags|=d,r.childLanes=l,i}function ID(r,i,l){var d=i.pendingProps;switch(Ic(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(i),null;case 1:return rt(i),null;case 3:return l=i.stateNode,d=null,r!==null&&(d=r.memoizedState.cache),i.memoizedState.cache!==d&&(i.flags|=2048),Sr(gt),we(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(r===null||r.child===null)&&(yi(i)?wr(i):r===null||r.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,Dc())),rt(i),null;case 26:var g=i.type,S=i.memoizedState;return r===null?(wr(i),S!==null?(rt(i),$x(i,S)):(rt(i),Td(i,g,null,d,l))):S?S!==r.memoizedState?(wr(i),rt(i),$x(i,S)):(rt(i),i.flags&=-16777217):(r=r.memoizedProps,r!==d&&wr(i),rt(i),Td(i,g,r,d,l)),null;case 27:if(at(i),l=ce.current,g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&wr(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return rt(i),null}r=oe.current,yi(i)?xE(i):(r=Xw(g,d,l),i.stateNode=r,wr(i))}return rt(i),null;case 5:if(at(i),g=i.type,r!==null&&i.stateNode!=null)r.memoizedProps!==d&&wr(i);else{if(!d){if(i.stateNode===null)throw Error(a(166));return rt(i),null}if(S=oe.current,yi(i))xE(i);else{var T=Nl(ce.current);switch(S){case 1:S=T.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:S=T.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":S=T.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":S=T.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":S=T.createElement("div"),S.innerHTML="<script><\/script>",S=S.removeChild(S.firstChild);break;case"select":S=typeof d.is=="string"?T.createElement("select",{is:d.is}):T.createElement("select"),d.multiple?S.multiple=!0:d.size&&(S.size=d.size);break;default:S=typeof d.is=="string"?T.createElement(g,{is:d.is}):T.createElement(g)}}S[Lt]=i,S[tn]=d;e:for(T=i.child;T!==null;){if(T.tag===5||T.tag===6)S.appendChild(T.stateNode);else if(T.tag!==4&&T.tag!==27&&T.child!==null){T.child.return=T,T=T.child;continue}if(T===i)break e;for(;T.sibling===null;){if(T.return===null||T.return===i)break e;T=T.return}T.sibling.return=T.return,T=T.sibling}i.stateNode=S;e:switch(Ut(S,g,d),g){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}d&&wr(i)}}return rt(i),Td(i,i.type,r===null?null:r.memoizedProps,i.pendingProps,l),null;case 6:if(r&&i.stateNode!=null)r.memoizedProps!==d&&wr(i);else{if(typeof d!="string"&&i.stateNode===null)throw Error(a(166));if(r=ce.current,yi(i)){if(r=i.stateNode,l=i.memoizedProps,d=null,g=Dt,g!==null)switch(g.tag){case 27:case 5:d=g.memoizedProps}r[Lt]=i,r=!!(r.nodeValue===l||d!==null&&d.suppressHydrationWarning===!0||jw(r.nodeValue,l)),r||qr(i,!0)}else r=Nl(r).createTextNode(d),r[Lt]=i,i.stateNode=r}return rt(i),null;case 31:if(l=i.memoizedState,r===null||r.memoizedState!==null){if(d=yi(i),l!==null){if(r===null){if(!d)throw Error(a(318));if(r=i.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(a(557));r[Lt]=i}else Ra(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rt(i),r=!1}else l=Dc(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=l),r=!0;if(!r)return i.flags&256?(Sn(i),i):(Sn(i),null);if((i.flags&128)!==0)throw Error(a(558))}return rt(i),null;case 13:if(d=i.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(g=yi(i),d!==null&&d.dehydrated!==null){if(r===null){if(!g)throw Error(a(318));if(g=i.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(a(317));g[Lt]=i}else Ra(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;rt(i),g=!1}else g=Dc(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=g),g=!0;if(!g)return i.flags&256?(Sn(i),i):(Sn(i),null)}return Sn(i),(i.flags&128)!==0?(i.lanes=l,i):(l=d!==null,r=r!==null&&r.memoizedState!==null,l&&(d=i.child,g=null,d.alternate!==null&&d.alternate.memoizedState!==null&&d.alternate.memoizedState.cachePool!==null&&(g=d.alternate.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048)),l!==r&&l&&(i.child.flags|=8192),hl(i,i.updateQueue),rt(i),null);case 4:return we(),r===null&&Vd(i.stateNode.containerInfo),rt(i),null;case 10:return Sr(i.type),rt(i),null;case 19:if(Y(pt),d=i.memoizedState,d===null)return rt(i),null;if(g=(i.flags&128)!==0,S=d.rendering,S===null)if(g)Is(d,!1);else{if(ut!==0||r!==null&&(r.flags&128)!==0)for(r=i.child;r!==null;){if(S=tl(r),S!==null){for(i.flags|=128,Is(d,!1),r=S.updateQueue,i.updateQueue=r,hl(i,r),i.subtreeFlags=0,r=l,l=i.child;l!==null;)bE(l,r),l=l.sibling;return I(pt,pt.current&1|2),Ue&&br(i,d.treeForkCount),i.child}r=r.sibling}d.tail!==null&&ke()>Sl&&(i.flags|=128,g=!0,Is(d,!1),i.lanes=4194304)}else{if(!g)if(r=tl(S),r!==null){if(i.flags|=128,g=!0,r=r.updateQueue,i.updateQueue=r,hl(i,r),Is(d,!0),d.tail===null&&d.tailMode==="hidden"&&!S.alternate&&!Ue)return rt(i),null}else 2*ke()-d.renderingStartTime>Sl&&l!==536870912&&(i.flags|=128,g=!0,Is(d,!1),i.lanes=4194304);d.isBackwards?(S.sibling=i.child,i.child=S):(r=d.last,r!==null?r.sibling=S:i.child=S,d.last=S)}return d.tail!==null?(r=d.tail,d.rendering=r,d.tail=r.sibling,d.renderingStartTime=ke(),r.sibling=null,l=pt.current,I(pt,g?l&1|2:l&1),Ue&&br(i,d.treeForkCount),r):(rt(i),null);case 22:case 23:return Sn(i),Yc(),d=i.memoizedState!==null,r!==null?r.memoizedState!==null!==d&&(i.flags|=8192):d&&(i.flags|=8192),d?(l&536870912)!==0&&(i.flags&128)===0&&(rt(i),i.subtreeFlags&6&&(i.flags|=8192)):rt(i),l=i.updateQueue,l!==null&&hl(i,l.retryQueue),l=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),d=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(d=i.memoizedState.cachePool.pool),d!==l&&(i.flags|=2048),r!==null&&Y(Na),null;case 24:return l=null,r!==null&&(l=r.memoizedState.cache),i.memoizedState.cache!==l&&(i.flags|=2048),Sr(gt),rt(i),null;case 25:return null;case 30:return null}throw Error(a(156,i.tag))}function LD(r,i){switch(Ic(i),i.tag){case 1:return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 3:return Sr(gt),we(),r=i.flags,(r&65536)!==0&&(r&128)===0?(i.flags=r&-65537|128,i):null;case 26:case 27:case 5:return at(i),null;case 31:if(i.memoizedState!==null){if(Sn(i),i.alternate===null)throw Error(a(340));Ra()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 13:if(Sn(i),r=i.memoizedState,r!==null&&r.dehydrated!==null){if(i.alternate===null)throw Error(a(340));Ra()}return r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 19:return Y(pt),null;case 4:return we(),null;case 10:return Sr(i.type),null;case 22:case 23:return Sn(i),Yc(),r!==null&&Y(Na),r=i.flags,r&65536?(i.flags=r&-65537|128,i):null;case 24:return Sr(gt),null;case 25:return null;default:return null}}function Gx(r,i){switch(Ic(i),i.tag){case 3:Sr(gt),we();break;case 26:case 27:case 5:at(i);break;case 4:we();break;case 31:i.memoizedState!==null&&Sn(i);break;case 13:Sn(i);break;case 19:Y(pt);break;case 10:Sr(i.type);break;case 22:case 23:Sn(i),Yc(),r!==null&&Y(Na);break;case 24:Sr(gt)}}function Ls(r,i){try{var l=i.updateQueue,d=l!==null?l.lastEffect:null;if(d!==null){var g=d.next;l=g;do{if((l.tag&r)===r){d=void 0;var S=l.create,T=l.inst;d=S(),T.destroy=d}l=l.next}while(l!==g)}}catch(O){Ve(i,i.return,O)}}function Wr(r,i,l){try{var d=i.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var S=g.next;d=S;do{if((d.tag&r)===r){var T=d.inst,O=T.destroy;if(O!==void 0){T.destroy=void 0,g=i;var P=l,X=O;try{X()}catch(re){Ve(g,P,re)}}}d=d.next}while(d!==S)}}catch(re){Ve(i,i.return,re)}}function Hx(r){var i=r.updateQueue;if(i!==null){var l=r.stateNode;try{ME(i,l)}catch(d){Ve(r,r.return,d)}}}function Vx(r,i,l){l.props=Da(r.type,r.memoizedProps),l.state=r.memoizedState;try{l.componentWillUnmount()}catch(d){Ve(r,i,d)}}function Ds(r,i){try{var l=r.ref;if(l!==null){switch(r.tag){case 26:case 27:case 5:var d=r.stateNode;break;case 30:d=r.stateNode;break;default:d=r.stateNode}typeof l=="function"?r.refCleanup=l(d):l.current=d}}catch(g){Ve(r,i,g)}}function Jn(r,i){var l=r.ref,d=r.refCleanup;if(l!==null)if(typeof d=="function")try{d()}catch(g){Ve(r,i,g)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(g){Ve(r,i,g)}else l.current=null}function Yx(r){var i=r.type,l=r.memoizedProps,d=r.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":l.autoFocus&&d.focus();break e;case"img":l.src?d.src=l.src:l.srcSet&&(d.srcset=l.srcSet)}}catch(g){Ve(r,r.return,g)}}function Ad(r,i,l){try{var d=r.stateNode;tM(d,r.type,l,i),d[tn]=i}catch(g){Ve(r,r.return,g)}}function Kx(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&na(r.type)||r.tag===4}function Rd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||Kx(r.return))return null;r=r.return}for(r.sibling.return=r.return,r=r.sibling;r.tag!==5&&r.tag!==6&&r.tag!==18;){if(r.tag===27&&na(r.type)||r.flags&2||r.child===null||r.tag===4)continue e;r.child.return=r,r=r.child}if(!(r.flags&2))return r.stateNode}}function _d(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(r,i):(i=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,i.appendChild(r),l=l._reactRootContainer,l!=null||i.onclick!==null||(i.onclick=hr));else if(d!==4&&(d===27&&na(r.type)&&(l=r.stateNode,i=null),r=r.child,r!==null))for(_d(r,i,l),r=r.sibling;r!==null;)_d(r,i,l),r=r.sibling}function ml(r,i,l){var d=r.tag;if(d===5||d===6)r=r.stateNode,i?l.insertBefore(r,i):l.appendChild(r);else if(d!==4&&(d===27&&na(r.type)&&(l=r.stateNode),r=r.child,r!==null))for(ml(r,i,l),r=r.sibling;r!==null;)ml(r,i,l),r=r.sibling}function Wx(r){var i=r.stateNode,l=r.memoizedProps;try{for(var d=r.type,g=i.attributes;g.length;)i.removeAttributeNode(g[0]);Ut(i,d,l),i[Lt]=r,i[tn]=l}catch(S){Ve(r,r.return,S)}}var Tr=!1,St=!1,kd=!1,Xx=typeof WeakSet=="function"?WeakSet:Set,Nt=null;function DD(r,i){if(r=r.containerInfo,Wd=Fl,r=lE(r),Ec(r)){if("selectionStart"in r)var l={start:r.selectionStart,end:r.selectionEnd};else e:{l=(l=r.ownerDocument)&&l.defaultView||window;var d=l.getSelection&&l.getSelection();if(d&&d.rangeCount!==0){l=d.anchorNode;var g=d.anchorOffset,S=d.focusNode;d=d.focusOffset;try{l.nodeType,S.nodeType}catch{l=null;break e}var T=0,O=-1,P=-1,X=0,re=0,se=r,Q=null;t:for(;;){for(var ee;se!==l||g!==0&&se.nodeType!==3||(O=T+g),se!==S||d!==0&&se.nodeType!==3||(P=T+d),se.nodeType===3&&(T+=se.nodeValue.length),(ee=se.firstChild)!==null;)Q=se,se=ee;for(;;){if(se===r)break t;if(Q===l&&++X===g&&(O=T),Q===S&&++re===d&&(P=T),(ee=se.nextSibling)!==null)break;se=Q,Q=se.parentNode}se=ee}l=O===-1||P===-1?null:{start:O,end:P}}else l=null}l=l||{start:0,end:0}}else l=null;for(Xd={focusedElem:r,selectionRange:l},Fl=!1,Nt=i;Nt!==null;)if(i=Nt,r=i.child,(i.subtreeFlags&1028)!==0&&r!==null)r.return=i,Nt=r;else for(;Nt!==null;){switch(i=Nt,S=i.alternate,r=i.flags,i.tag){case 0:if((r&4)!==0&&(r=i.updateQueue,r=r!==null?r.events:null,r!==null))for(l=0;l<r.length;l++)g=r[l],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&S!==null){r=void 0,l=i,g=S.memoizedProps,S=S.memoizedState,d=l.stateNode;try{var he=Da(l.type,g);r=d.getSnapshotBeforeUpdate(he,S),d.__reactInternalSnapshotBeforeUpdate=r}catch(Se){Ve(l,l.return,Se)}}break;case 3:if((r&1024)!==0){if(r=i.stateNode.containerInfo,l=r.nodeType,l===9)Jd(r);else if(l===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":Jd(r);break;default:r.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)throw Error(a(163))}if(r=i.sibling,r!==null){r.return=i.return,Nt=r;break}Nt=i.return}}function Zx(r,i,l){var d=l.flags;switch(l.tag){case 0:case 11:case 15:Rr(r,l),d&4&&Ls(5,l);break;case 1:if(Rr(r,l),d&4)if(r=l.stateNode,i===null)try{r.componentDidMount()}catch(T){Ve(l,l.return,T)}else{var g=Da(l.type,i.memoizedProps);i=i.memoizedState;try{r.componentDidUpdate(g,i,r.__reactInternalSnapshotBeforeUpdate)}catch(T){Ve(l,l.return,T)}}d&64&&Hx(l),d&512&&Ds(l,l.return);break;case 3:if(Rr(r,l),d&64&&(r=l.updateQueue,r!==null)){if(i=null,l.child!==null)switch(l.child.tag){case 27:case 5:i=l.child.stateNode;break;case 1:i=l.child.stateNode}try{ME(r,i)}catch(T){Ve(l,l.return,T)}}break;case 27:i===null&&d&4&&Wx(l);case 26:case 5:Rr(r,l),i===null&&d&4&&Yx(l),d&512&&Ds(l,l.return);break;case 12:Rr(r,l);break;case 31:Rr(r,l),d&4&&ew(r,l);break;case 13:Rr(r,l),d&4&&tw(r,l),d&64&&(r=l.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(l=$D.bind(null,l),uM(r,l))));break;case 22:if(d=l.memoizedState!==null||Tr,!d){i=i!==null&&i.memoizedState!==null||St,g=Tr;var S=St;Tr=d,(St=i)&&!S?_r(r,l,(l.subtreeFlags&8772)!==0):Rr(r,l),Tr=g,St=S}break;case 30:break;default:Rr(r,l)}}function Qx(r){var i=r.alternate;i!==null&&(r.alternate=null,Qx(i)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(i=r.stateNode,i!==null&&ac(i)),r.stateNode=null,r.return=null,r.dependencies=null,r.memoizedProps=null,r.memoizedState=null,r.pendingProps=null,r.stateNode=null,r.updateQueue=null}var st=null,rn=!1;function Ar(r,i,l){for(l=l.child;l!==null;)Jx(r,i,l),l=l.sibling}function Jx(r,i,l){if(Ze&&typeof Ze.onCommitFiberUnmount=="function")try{Ze.onCommitFiberUnmount(dt,l)}catch{}switch(l.tag){case 26:St||Jn(l,i),Ar(r,i,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:St||Jn(l,i);var d=st,g=rn;na(l.type)&&(st=l.stateNode,rn=!1),Ar(r,i,l),$s(l.stateNode),st=d,rn=g;break;case 5:St||Jn(l,i);case 6:if(d=st,g=rn,st=null,Ar(r,i,l),st=d,rn=g,st!==null)if(rn)try{(st.nodeType===9?st.body:st.nodeName==="HTML"?st.ownerDocument.body:st).removeChild(l.stateNode)}catch(S){Ve(l,i,S)}else try{st.removeChild(l.stateNode)}catch(S){Ve(l,i,S)}break;case 18:st!==null&&(rn?(r=st,Hw(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,l.stateNode),ji(r)):Hw(st,l.stateNode));break;case 4:d=st,g=rn,st=l.stateNode.containerInfo,rn=!0,Ar(r,i,l),st=d,rn=g;break;case 0:case 11:case 14:case 15:Wr(2,l,i),St||Wr(4,l,i),Ar(r,i,l);break;case 1:St||(Jn(l,i),d=l.stateNode,typeof d.componentWillUnmount=="function"&&Vx(l,i,d)),Ar(r,i,l);break;case 21:Ar(r,i,l);break;case 22:St=(d=St)||l.memoizedState!==null,Ar(r,i,l),St=d;break;default:Ar(r,i,l)}}function ew(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{ji(r)}catch(l){Ve(i,i.return,l)}}}function tw(r,i){if(i.memoizedState===null&&(r=i.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{ji(r)}catch(l){Ve(i,i.return,l)}}function MD(r){switch(r.tag){case 31:case 13:case 19:var i=r.stateNode;return i===null&&(i=r.stateNode=new Xx),i;case 22:return r=r.stateNode,i=r._retryCache,i===null&&(i=r._retryCache=new Xx),i;default:throw Error(a(435,r.tag))}}function gl(r,i){var l=MD(r);i.forEach(function(d){if(!l.has(d)){l.add(d);var g=GD.bind(null,r,d);d.then(g,g)}})}function an(r,i){var l=i.deletions;if(l!==null)for(var d=0;d<l.length;d++){var g=l[d],S=r,T=i,O=T;e:for(;O!==null;){switch(O.tag){case 27:if(na(O.type)){st=O.stateNode,rn=!1;break e}break;case 5:st=O.stateNode,rn=!1;break e;case 3:case 4:st=O.stateNode.containerInfo,rn=!0;break e}O=O.return}if(st===null)throw Error(a(160));Jx(S,T,g),st=null,rn=!1,S=g.alternate,S!==null&&(S.return=null),g.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)nw(i,r),i=i.sibling}var Hn=null;function nw(r,i){var l=r.alternate,d=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:an(i,r),sn(r),d&4&&(Wr(3,r,r.return),Ls(3,r),Wr(5,r,r.return));break;case 1:an(i,r),sn(r),d&512&&(St||l===null||Jn(l,l.return)),d&64&&Tr&&(r=r.updateQueue,r!==null&&(d=r.callbacks,d!==null&&(l=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=l===null?d:l.concat(d))));break;case 26:var g=Hn;if(an(i,r),sn(r),d&512&&(St||l===null||Jn(l,l.return)),d&4){var S=l!==null?l.memoizedState:null;if(d=r.memoizedState,l===null)if(d===null)if(r.stateNode===null){e:{d=r.type,l=r.memoizedProps,g=g.ownerDocument||g;t:switch(d){case"title":S=g.getElementsByTagName("title")[0],(!S||S[os]||S[Lt]||S.namespaceURI==="http://www.w3.org/2000/svg"||S.hasAttribute("itemprop"))&&(S=g.createElement(d),g.head.insertBefore(S,g.querySelector("head > title"))),Ut(S,d,l),S[Lt]=r,kt(S),d=S;break e;case"link":var T=nT("link","href",g).get(d+(l.href||""));if(T){for(var O=0;O<T.length;O++)if(S=T[O],S.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&S.getAttribute("rel")===(l.rel==null?null:l.rel)&&S.getAttribute("title")===(l.title==null?null:l.title)&&S.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){T.splice(O,1);break t}}S=g.createElement(d),Ut(S,d,l),g.head.appendChild(S);break;case"meta":if(T=nT("meta","content",g).get(d+(l.content||""))){for(O=0;O<T.length;O++)if(S=T[O],S.getAttribute("content")===(l.content==null?null:""+l.content)&&S.getAttribute("name")===(l.name==null?null:l.name)&&S.getAttribute("property")===(l.property==null?null:l.property)&&S.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&S.getAttribute("charset")===(l.charSet==null?null:l.charSet)){T.splice(O,1);break t}}S=g.createElement(d),Ut(S,d,l),g.head.appendChild(S);break;default:throw Error(a(468,d))}S[Lt]=r,kt(S),d=S}r.stateNode=d}else rT(g,r.type,r.stateNode);else r.stateNode=tT(g,d,r.memoizedProps);else S!==d?(S===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):S.count--,d===null?rT(g,r.type,r.stateNode):tT(g,d,r.memoizedProps)):d===null&&r.stateNode!==null&&Ad(r,r.memoizedProps,l.memoizedProps)}break;case 27:an(i,r),sn(r),d&512&&(St||l===null||Jn(l,l.return)),l!==null&&d&4&&Ad(r,r.memoizedProps,l.memoizedProps);break;case 5:if(an(i,r),sn(r),d&512&&(St||l===null||Jn(l,l.return)),r.flags&32){g=r.stateNode;try{li(g,"")}catch(he){Ve(r,r.return,he)}}d&4&&r.stateNode!=null&&(g=r.memoizedProps,Ad(r,g,l!==null?l.memoizedProps:g)),d&1024&&(kd=!0);break;case 6:if(an(i,r),sn(r),d&4){if(r.stateNode===null)throw Error(a(162));d=r.memoizedProps,l=r.stateNode;try{l.nodeValue=d}catch(he){Ve(r,r.return,he)}}break;case 3:if(Il=null,g=Hn,Hn=Cl(i.containerInfo),an(i,r),Hn=g,sn(r),d&4&&l!==null&&l.memoizedState.isDehydrated)try{ji(i.containerInfo)}catch(he){Ve(r,r.return,he)}kd&&(kd=!1,rw(r));break;case 4:d=Hn,Hn=Cl(r.stateNode.containerInfo),an(i,r),sn(r),Hn=d;break;case 12:an(i,r),sn(r);break;case 31:an(i,r),sn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,gl(r,d)));break;case 13:an(i,r),sn(r),r.child.flags&8192&&r.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(yl=ke()),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,gl(r,d)));break;case 22:g=r.memoizedState!==null;var P=l!==null&&l.memoizedState!==null,X=Tr,re=St;if(Tr=X||g,St=re||P,an(i,r),St=re,Tr=X,sn(r),d&8192)e:for(i=r.stateNode,i._visibility=g?i._visibility&-2:i._visibility|1,g&&(l===null||P||Tr||St||Ma(r)),l=null,i=r;;){if(i.tag===5||i.tag===26){if(l===null){P=l=i;try{if(S=P.stateNode,g)T=S.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none";else{O=P.stateNode;var se=P.memoizedProps.style,Q=se!=null&&se.hasOwnProperty("display")?se.display:null;O.style.display=Q==null||typeof Q=="boolean"?"":(""+Q).trim()}}catch(he){Ve(P,P.return,he)}}}else if(i.tag===6){if(l===null){P=i;try{P.stateNode.nodeValue=g?"":P.memoizedProps}catch(he){Ve(P,P.return,he)}}}else if(i.tag===18){if(l===null){P=i;try{var ee=P.stateNode;g?Vw(ee,!0):Vw(P.stateNode,!1)}catch(he){Ve(P,P.return,he)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===r)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;l===i&&(l=null),i=i.return}l===i&&(l=null),i.sibling.return=i.return,i=i.sibling}d&4&&(d=r.updateQueue,d!==null&&(l=d.retryQueue,l!==null&&(d.retryQueue=null,gl(r,l))));break;case 19:an(i,r),sn(r),d&4&&(d=r.updateQueue,d!==null&&(r.updateQueue=null,gl(r,d)));break;case 30:break;case 21:break;default:an(i,r),sn(r)}}function sn(r){var i=r.flags;if(i&2){try{for(var l,d=r.return;d!==null;){if(Kx(d)){l=d;break}d=d.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var g=l.stateNode,S=Rd(r);ml(r,S,g);break;case 5:var T=l.stateNode;l.flags&32&&(li(T,""),l.flags&=-33);var O=Rd(r);ml(r,O,T);break;case 3:case 4:var P=l.stateNode.containerInfo,X=Rd(r);_d(r,X,P);break;default:throw Error(a(161))}}catch(re){Ve(r,r.return,re)}r.flags&=-3}i&4096&&(r.flags&=-4097)}function rw(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var i=r;rw(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),r=r.sibling}}function Rr(r,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Zx(r,i.alternate,i),i=i.sibling}function Ma(r){for(r=r.child;r!==null;){var i=r;switch(i.tag){case 0:case 11:case 14:case 15:Wr(4,i,i.return),Ma(i);break;case 1:Jn(i,i.return);var l=i.stateNode;typeof l.componentWillUnmount=="function"&&Vx(i,i.return,l),Ma(i);break;case 27:$s(i.stateNode);case 26:case 5:Jn(i,i.return),Ma(i);break;case 22:i.memoizedState===null&&Ma(i);break;case 30:Ma(i);break;default:Ma(i)}r=r.sibling}}function _r(r,i,l){for(l=l&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var d=i.alternate,g=r,S=i,T=S.flags;switch(S.tag){case 0:case 11:case 15:_r(g,S,l),Ls(4,S);break;case 1:if(_r(g,S,l),d=S,g=d.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(X){Ve(d,d.return,X)}if(d=S,g=d.updateQueue,g!==null){var O=d.stateNode;try{var P=g.shared.hiddenCallbacks;if(P!==null)for(g.shared.hiddenCallbacks=null,g=0;g<P.length;g++)DE(P[g],O)}catch(X){Ve(d,d.return,X)}}l&&T&64&&Hx(S),Ds(S,S.return);break;case 27:Wx(S);case 26:case 5:_r(g,S,l),l&&d===null&&T&4&&Yx(S),Ds(S,S.return);break;case 12:_r(g,S,l);break;case 31:_r(g,S,l),l&&T&4&&ew(g,S);break;case 13:_r(g,S,l),l&&T&4&&tw(g,S);break;case 22:S.memoizedState===null&&_r(g,S,l),Ds(S,S.return);break;case 30:break;default:_r(g,S,l)}i=i.sibling}}function Nd(r,i){var l=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==l&&(r!=null&&r.refCount++,l!=null&&vs(l))}function Cd(r,i){r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&vs(r))}function Vn(r,i,l,d){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)aw(r,i,l,d),i=i.sibling}function aw(r,i,l,d){var g=i.flags;switch(i.tag){case 0:case 11:case 15:Vn(r,i,l,d),g&2048&&Ls(9,i);break;case 1:Vn(r,i,l,d);break;case 3:Vn(r,i,l,d),g&2048&&(r=null,i.alternate!==null&&(r=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==r&&(i.refCount++,r!=null&&vs(r)));break;case 12:if(g&2048){Vn(r,i,l,d),r=i.stateNode;try{var S=i.memoizedProps,T=S.id,O=S.onPostCommit;typeof O=="function"&&O(T,i.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(P){Ve(i,i.return,P)}}else Vn(r,i,l,d);break;case 31:Vn(r,i,l,d);break;case 13:Vn(r,i,l,d);break;case 23:break;case 22:S=i.stateNode,T=i.alternate,i.memoizedState!==null?S._visibility&2?Vn(r,i,l,d):Ms(r,i):S._visibility&2?Vn(r,i,l,d):(S._visibility|=2,ki(r,i,l,d,(i.subtreeFlags&10256)!==0||!1)),g&2048&&Nd(T,i);break;case 24:Vn(r,i,l,d),g&2048&&Cd(i.alternate,i);break;default:Vn(r,i,l,d)}}function ki(r,i,l,d,g){for(g=g&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var S=r,T=i,O=l,P=d,X=T.flags;switch(T.tag){case 0:case 11:case 15:ki(S,T,O,P,g),Ls(8,T);break;case 23:break;case 22:var re=T.stateNode;T.memoizedState!==null?re._visibility&2?ki(S,T,O,P,g):Ms(S,T):(re._visibility|=2,ki(S,T,O,P,g)),g&&X&2048&&Nd(T.alternate,T);break;case 24:ki(S,T,O,P,g),g&&X&2048&&Cd(T.alternate,T);break;default:ki(S,T,O,P,g)}i=i.sibling}}function Ms(r,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var l=r,d=i,g=d.flags;switch(d.tag){case 22:Ms(l,d),g&2048&&Nd(d.alternate,d);break;case 24:Ms(l,d),g&2048&&Cd(d.alternate,d);break;default:Ms(l,d)}i=i.sibling}}var Fs=8192;function Ni(r,i,l){if(r.subtreeFlags&Fs)for(r=r.child;r!==null;)iw(r,i,l),r=r.sibling}function iw(r,i,l){switch(r.tag){case 26:Ni(r,i,l),r.flags&Fs&&r.memoizedState!==null&&EM(l,Hn,r.memoizedState,r.memoizedProps);break;case 5:Ni(r,i,l);break;case 3:case 4:var d=Hn;Hn=Cl(r.stateNode.containerInfo),Ni(r,i,l),Hn=d;break;case 22:r.memoizedState===null&&(d=r.alternate,d!==null&&d.memoizedState!==null?(d=Fs,Fs=16777216,Ni(r,i,l),Fs=d):Ni(r,i,l));break;default:Ni(r,i,l)}}function sw(r){var i=r.alternate;if(i!==null&&(r=i.child,r!==null)){i.child=null;do i=r.sibling,r.sibling=null,r=i;while(r!==null)}}function Us(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var d=i[l];Nt=d,lw(d,r)}sw(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)ow(r),r=r.sibling}function ow(r){switch(r.tag){case 0:case 11:case 15:Us(r),r.flags&2048&&Wr(9,r,r.return);break;case 3:Us(r);break;case 12:Us(r);break;case 22:var i=r.stateNode;r.memoizedState!==null&&i._visibility&2&&(r.return===null||r.return.tag!==13)?(i._visibility&=-3,bl(r)):Us(r);break;default:Us(r)}}function bl(r){var i=r.deletions;if((r.flags&16)!==0){if(i!==null)for(var l=0;l<i.length;l++){var d=i[l];Nt=d,lw(d,r)}sw(r)}for(r=r.child;r!==null;){switch(i=r,i.tag){case 0:case 11:case 15:Wr(8,i,i.return),bl(i);break;case 22:l=i.stateNode,l._visibility&2&&(l._visibility&=-3,bl(i));break;default:bl(i)}r=r.sibling}}function lw(r,i){for(;Nt!==null;){var l=Nt;switch(l.tag){case 0:case 11:case 15:Wr(8,l,i);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var d=l.memoizedState.cachePool.pool;d!=null&&d.refCount++}break;case 24:vs(l.memoizedState.cache)}if(d=l.child,d!==null)d.return=l,Nt=d;else e:for(l=r;Nt!==null;){d=Nt;var g=d.sibling,S=d.return;if(Qx(d),d===l){Nt=null;break e}if(g!==null){g.return=S,Nt=g;break e}Nt=S}}}var FD={getCacheForType:function(r){var i=Mt(gt),l=i.data.get(r);return l===void 0&&(l=r(),i.data.set(r,l)),l},cacheSignal:function(){return Mt(gt).controller.signal}},UD=typeof WeakMap=="function"?WeakMap:Map,qe=0,Qe=null,Oe=null,De=0,He=0,vn=null,Xr=!1,Ci=!1,Od=!1,kr=0,ut=0,Zr=0,Fa=0,Id=0,En=0,Oi=0,Bs=null,on=null,Ld=!1,yl=0,uw=0,Sl=1/0,vl=null,Qr=null,wt=0,Jr=null,Ii=null,Nr=0,Dd=0,Md=null,cw=null,js=0,Fd=null;function xn(){return(qe&2)!==0&&De!==0?De&-De:G.T!==null?qd():Rv()}function dw(){if(En===0)if((De&536870912)===0||Ue){var r=Wn;Wn<<=1,(Wn&3932160)===0&&(Wn=262144),En=r}else En=536870912;return r=yn.current,r!==null&&(r.flags|=32),En}function ln(r,i,l){(r===Qe&&(He===2||He===9)||r.cancelPendingCommit!==null)&&(Li(r,0),ea(r,De,En,!1)),ss(r,l),((qe&2)===0||r!==Qe)&&(r===Qe&&((qe&2)===0&&(Fa|=l),ut===4&&ea(r,De,En,!1)),er(r))}function pw(r,i,l){if((qe&6)!==0)throw Error(a(327));var d=!l&&(i&127)===0&&(i&r.expiredLanes)===0||Ur(r,i),g=d?PD(r,i):Bd(r,i,!0),S=d;do{if(g===0){Ci&&!d&&ea(r,i,0,!1);break}else{if(l=r.current.alternate,S&&!BD(l)){g=Bd(r,i,!1),S=!1;continue}if(g===2){if(S=i,r.errorRecoveryDisabledLanes&S)var T=0;else T=r.pendingLanes&-536870913,T=T!==0?T:T&536870912?536870912:0;if(T!==0){i=T;e:{var O=r;g=Bs;var P=O.current.memoizedState.isDehydrated;if(P&&(Li(O,T).flags|=256),T=Bd(O,T,!1),T!==2){if(Od&&!P){O.errorRecoveryDisabledLanes|=S,Fa|=S,g=4;break e}S=on,on=g,S!==null&&(on===null?on=S:on.push.apply(on,S))}g=T}if(S=!1,g!==2)continue}}if(g===1){Li(r,0),ea(r,i,0,!0);break}e:{switch(d=r,S=g,S){case 0:case 1:throw Error(a(345));case 4:if((i&4194048)!==i)break;case 6:ea(d,i,En,!Xr);break e;case 2:on=null;break;case 3:case 5:break;default:throw Error(a(329))}if((i&62914560)===i&&(g=yl+300-ke(),10<g)){if(ea(d,i,En,!Xr),Sa(d,0,!0)!==0)break e;Nr=i,d.timeoutHandle=$w(fw.bind(null,d,l,on,vl,Ld,i,En,Fa,Oi,Xr,S,"Throttled",-0,0),g);break e}fw(d,l,on,vl,Ld,i,En,Fa,Oi,Xr,S,null,-0,0)}}break}while(!0);er(r)}function fw(r,i,l,d,g,S,T,O,P,X,re,se,Q,ee){if(r.timeoutHandle=-1,se=i.subtreeFlags,se&8192||(se&16785408)===16785408){se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:hr},iw(i,S,se);var he=(S&62914560)===S?yl-ke():(S&4194048)===S?uw-ke():0;if(he=xM(se,he),he!==null){Nr=S,r.cancelPendingCommit=he(Ew.bind(null,r,i,S,l,d,g,T,O,P,re,se,null,Q,ee)),ea(r,S,T,!X);return}}Ew(r,i,S,l,d,g,T,O,P)}function BD(r){for(var i=r;;){var l=i.tag;if((l===0||l===11||l===15)&&i.flags&16384&&(l=i.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var d=0;d<l.length;d++){var g=l[d],S=g.getSnapshot;g=g.value;try{if(!gn(S(),g))return!1}catch{return!1}}if(l=i.child,i.subtreeFlags&16384&&l!==null)l.return=i,i=l;else{if(i===r)break;for(;i.sibling===null;){if(i.return===null||i.return===r)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function ea(r,i,l,d){i&=~Id,i&=~Fa,r.suspendedLanes|=i,r.pingedLanes&=~i,d&&(r.warmLanes|=i),d=r.expirationTimes;for(var g=i;0<g;){var S=31-$e(g),T=1<<S;d[S]=-1,g&=~T}l!==0&&wv(r,l,i)}function El(){return(qe&6)===0?(Ps(0),!1):!0}function Ud(){if(Oe!==null){if(He===0)var r=Oe.return;else r=Oe,yr=_a=null,Jc(r),wi=null,xs=0,r=Oe;for(;r!==null;)Gx(r.alternate,r),r=r.return;Oe=null}}function Li(r,i){var l=r.timeoutHandle;l!==-1&&(r.timeoutHandle=-1,aM(l)),l=r.cancelPendingCommit,l!==null&&(r.cancelPendingCommit=null,l()),Nr=0,Ud(),Qe=r,Oe=l=gr(r.current,null),De=i,He=0,vn=null,Xr=!1,Ci=Ur(r,i),Od=!1,Oi=En=Id=Fa=Zr=ut=0,on=Bs=null,Ld=!1,(i&8)!==0&&(i|=i&32);var d=r.entangledLanes;if(d!==0)for(r=r.entanglements,d&=i;0<d;){var g=31-$e(d),S=1<<g;i|=r[g],d&=~S}return kr=i,qo(),l}function hw(r,i){Re=null,G.H=Cs,i===xi||i===Xo?(i=CE(),He=3):i===zc?(i=CE(),He=4):He=i===md?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,vn=i,Oe===null&&(ut=1,cl(r,Dn(i,r.current)))}function mw(){var r=yn.current;return r===null?!0:(De&4194048)===De?Bn===null:(De&62914560)===De||(De&536870912)!==0?r===Bn:!1}function gw(){var r=G.H;return G.H=Cs,r===null?Cs:r}function bw(){var r=G.A;return G.A=FD,r}function xl(){ut=4,Xr||(De&4194048)!==De&&yn.current!==null||(Ci=!0),(Zr&134217727)===0&&(Fa&134217727)===0||Qe===null||ea(Qe,De,En,!1)}function Bd(r,i,l){var d=qe;qe|=2;var g=gw(),S=bw();(Qe!==r||De!==i)&&(vl=null,Li(r,i)),i=!1;var T=ut;e:do try{if(He!==0&&Oe!==null){var O=Oe,P=vn;switch(He){case 8:Ud(),T=6;break e;case 3:case 2:case 9:case 6:yn.current===null&&(i=!0);var X=He;if(He=0,vn=null,Di(r,O,P,X),l&&Ci){T=0;break e}break;default:X=He,He=0,vn=null,Di(r,O,P,X)}}jD(),T=ut;break}catch(re){hw(r,re)}while(!0);return i&&r.shellSuspendCounter++,yr=_a=null,qe=d,G.H=g,G.A=S,Oe===null&&(Qe=null,De=0,qo()),T}function jD(){for(;Oe!==null;)yw(Oe)}function PD(r,i){var l=qe;qe|=2;var d=gw(),g=bw();Qe!==r||De!==i?(vl=null,Sl=ke()+500,Li(r,i)):Ci=Ur(r,i);e:do try{if(He!==0&&Oe!==null){i=Oe;var S=vn;t:switch(He){case 1:He=0,vn=null,Di(r,i,S,1);break;case 2:case 9:if(kE(S)){He=0,vn=null,Sw(i);break}i=function(){He!==2&&He!==9||Qe!==r||(He=7),er(r)},S.then(i,i);break e;case 3:He=7;break e;case 4:He=5;break e;case 7:kE(S)?(He=0,vn=null,Sw(i)):(He=0,vn=null,Di(r,i,S,7));break;case 5:var T=null;switch(Oe.tag){case 26:T=Oe.memoizedState;case 5:case 27:var O=Oe;if(T?aT(T):O.stateNode.complete){He=0,vn=null;var P=O.sibling;if(P!==null)Oe=P;else{var X=O.return;X!==null?(Oe=X,wl(X)):Oe=null}break t}}He=0,vn=null,Di(r,i,S,5);break;case 6:He=0,vn=null,Di(r,i,S,6);break;case 8:Ud(),ut=6;break e;default:throw Error(a(462))}}zD();break}catch(re){hw(r,re)}while(!0);return yr=_a=null,G.H=d,G.A=g,qe=l,Oe!==null?0:(Qe=null,De=0,qo(),ut)}function zD(){for(;Oe!==null&&!mn();)yw(Oe)}function yw(r){var i=qx(r.alternate,r,kr);r.memoizedProps=r.pendingProps,i===null?wl(r):Oe=i}function Sw(r){var i=r,l=i.alternate;switch(i.tag){case 15:case 0:i=Fx(l,i,i.pendingProps,i.type,void 0,De);break;case 11:i=Fx(l,i,i.pendingProps,i.type.render,i.ref,De);break;case 5:Jc(i);default:Gx(l,i),i=Oe=bE(i,kr),i=qx(l,i,kr)}r.memoizedProps=r.pendingProps,i===null?wl(r):Oe=i}function Di(r,i,l,d){yr=_a=null,Jc(i),wi=null,xs=0;var g=i.return;try{if(ND(r,g,i,l,De)){ut=1,cl(r,Dn(l,r.current)),Oe=null;return}}catch(S){if(g!==null)throw Oe=g,S;ut=1,cl(r,Dn(l,r.current)),Oe=null;return}i.flags&32768?(Ue||d===1?r=!0:Ci||(De&536870912)!==0?r=!1:(Xr=r=!0,(d===2||d===9||d===3||d===6)&&(d=yn.current,d!==null&&d.tag===13&&(d.flags|=16384))),vw(i,r)):wl(i)}function wl(r){var i=r;do{if((i.flags&32768)!==0){vw(i,Xr);return}r=i.return;var l=ID(i.alternate,i,kr);if(l!==null){Oe=l;return}if(i=i.sibling,i!==null){Oe=i;return}Oe=i=r}while(i!==null);ut===0&&(ut=5)}function vw(r,i){do{var l=LD(r.alternate,r);if(l!==null){l.flags&=32767,Oe=l;return}if(l=r.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!i&&(r=r.sibling,r!==null)){Oe=r;return}Oe=r=l}while(r!==null);ut=6,Oe=null}function Ew(r,i,l,d,g,S,T,O,P){r.cancelPendingCommit=null;do Tl();while(wt!==0);if((qe&6)!==0)throw Error(a(327));if(i!==null){if(i===r.current)throw Error(a(177));if(S=i.lanes|i.childLanes,S|=Rc,vL(r,l,S,T,O,P),r===Qe&&(Oe=Qe=null,De=0),Ii=i,Jr=r,Nr=l,Dd=S,Md=g,cw=d,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,HD(fe,function(){return Rw(),null})):(r.callbackNode=null,r.callbackPriority=0),d=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||d){d=G.T,G.T=null,g=ne.p,ne.p=2,T=qe,qe|=4;try{DD(r,i,l)}finally{qe=T,ne.p=g,G.T=d}}wt=1,xw(),ww(),Tw()}}function xw(){if(wt===1){wt=0;var r=Jr,i=Ii,l=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||l){l=G.T,G.T=null;var d=ne.p;ne.p=2;var g=qe;qe|=4;try{nw(i,r);var S=Xd,T=lE(r.containerInfo),O=S.focusedElem,P=S.selectionRange;if(T!==O&&O&&O.ownerDocument&&oE(O.ownerDocument.documentElement,O)){if(P!==null&&Ec(O)){var X=P.start,re=P.end;if(re===void 0&&(re=X),"selectionStart"in O)O.selectionStart=X,O.selectionEnd=Math.min(re,O.value.length);else{var se=O.ownerDocument||document,Q=se&&se.defaultView||window;if(Q.getSelection){var ee=Q.getSelection(),he=O.textContent.length,Se=Math.min(P.start,he),We=P.end===void 0?Se:Math.min(P.end,he);!ee.extend&&Se>We&&(T=We,We=Se,Se=T);var V=sE(O,Se),$=sE(O,We);if(V&&$&&(ee.rangeCount!==1||ee.anchorNode!==V.node||ee.anchorOffset!==V.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var W=se.createRange();W.setStart(V.node,V.offset),ee.removeAllRanges(),Se>We?(ee.addRange(W),ee.extend($.node,$.offset)):(W.setEnd($.node,$.offset),ee.addRange(W))}}}}for(se=[],ee=O;ee=ee.parentNode;)ee.nodeType===1&&se.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof O.focus=="function"&&O.focus(),O=0;O<se.length;O++){var ie=se[O];ie.element.scrollLeft=ie.left,ie.element.scrollTop=ie.top}}Fl=!!Wd,Xd=Wd=null}finally{qe=g,ne.p=d,G.T=l}}r.current=i,wt=2}}function ww(){if(wt===2){wt=0;var r=Jr,i=Ii,l=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||l){l=G.T,G.T=null;var d=ne.p;ne.p=2;var g=qe;qe|=4;try{Zx(r,i.alternate,i)}finally{qe=g,ne.p=d,G.T=l}}wt=3}}function Tw(){if(wt===4||wt===3){wt=0,Be();var r=Jr,i=Ii,l=Nr,d=cw;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?wt=5:(wt=0,Ii=Jr=null,Aw(r,r.pendingLanes));var g=r.pendingLanes;if(g===0&&(Qr=null),nc(l),i=i.stateNode,Ze&&typeof Ze.onCommitFiberRoot=="function")try{Ze.onCommitFiberRoot(dt,i,void 0,(i.current.flags&128)===128)}catch{}if(d!==null){i=G.T,g=ne.p,ne.p=2,G.T=null;try{for(var S=r.onRecoverableError,T=0;T<d.length;T++){var O=d[T];S(O.value,{componentStack:O.stack})}}finally{G.T=i,ne.p=g}}(Nr&3)!==0&&Tl(),er(r),g=r.pendingLanes,(l&261930)!==0&&(g&42)!==0?r===Fd?js++:(js=0,Fd=r):js=0,Ps(0)}}function Aw(r,i){(r.pooledCacheLanes&=i)===0&&(i=r.pooledCache,i!=null&&(r.pooledCache=null,vs(i)))}function Tl(){return xw(),ww(),Tw(),Rw()}function Rw(){if(wt!==5)return!1;var r=Jr,i=Dd;Dd=0;var l=nc(Nr),d=G.T,g=ne.p;try{ne.p=32>l?32:l,G.T=null,l=Md,Md=null;var S=Jr,T=Nr;if(wt=0,Ii=Jr=null,Nr=0,(qe&6)!==0)throw Error(a(331));var O=qe;if(qe|=4,ow(S.current),aw(S,S.current,T,l),qe=O,Ps(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot=="function")try{Ze.onPostCommitFiberRoot(dt,S)}catch{}return!0}finally{ne.p=g,G.T=d,Aw(r,i)}}function _w(r,i,l){i=Dn(l,i),i=hd(r.stateNode,i,2),r=Vr(r,i,2),r!==null&&(ss(r,2),er(r))}function Ve(r,i,l){if(r.tag===3)_w(r,r,l);else for(;i!==null;){if(i.tag===3){_w(i,r,l);break}else if(i.tag===1){var d=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(Qr===null||!Qr.has(d))){r=Dn(l,r),l=kx(2),d=Vr(i,l,2),d!==null&&(Nx(l,d,i,r),ss(d,2),er(d));break}}i=i.return}}function jd(r,i,l){var d=r.pingCache;if(d===null){d=r.pingCache=new UD;var g=new Set;d.set(i,g)}else g=d.get(i),g===void 0&&(g=new Set,d.set(i,g));g.has(l)||(Od=!0,g.add(l),r=qD.bind(null,r,i,l),i.then(r,r))}function qD(r,i,l){var d=r.pingCache;d!==null&&d.delete(i),r.pingedLanes|=r.suspendedLanes&l,r.warmLanes&=~l,Qe===r&&(De&l)===l&&(ut===4||ut===3&&(De&62914560)===De&&300>ke()-yl?(qe&2)===0&&Li(r,0):Id|=l,Oi===De&&(Oi=0)),er(r)}function kw(r,i){i===0&&(i=xv()),r=Ta(r,i),r!==null&&(ss(r,i),er(r))}function $D(r){var i=r.memoizedState,l=0;i!==null&&(l=i.retryLane),kw(r,l)}function GD(r,i){var l=0;switch(r.tag){case 31:case 13:var d=r.stateNode,g=r.memoizedState;g!==null&&(l=g.retryLane);break;case 19:d=r.stateNode;break;case 22:d=r.stateNode._retryCache;break;default:throw Error(a(314))}d!==null&&d.delete(i),kw(r,l)}function HD(r,i){return xt(r,i)}var Al=null,Mi=null,Pd=!1,Rl=!1,zd=!1,ta=0;function er(r){r!==Mi&&r.next===null&&(Mi===null?Al=Mi=r:Mi=Mi.next=r),Rl=!0,Pd||(Pd=!0,YD())}function Ps(r,i){if(!zd&&Rl){zd=!0;do for(var l=!1,d=Al;d!==null;){if(r!==0){var g=d.pendingLanes;if(g===0)var S=0;else{var T=d.suspendedLanes,O=d.pingedLanes;S=(1<<31-$e(42|r)+1)-1,S&=g&~(T&~O),S=S&201326741?S&201326741|1:S?S|2:0}S!==0&&(l=!0,Iw(d,S))}else S=De,S=Sa(d,d===Qe?S:0,d.cancelPendingCommit!==null||d.timeoutHandle!==-1),(S&3)===0||Ur(d,S)||(l=!0,Iw(d,S));d=d.next}while(l);zd=!1}}function VD(){Nw()}function Nw(){Rl=Pd=!1;var r=0;ta!==0&&rM()&&(r=ta);for(var i=ke(),l=null,d=Al;d!==null;){var g=d.next,S=Cw(d,i);S===0?(d.next=null,l===null?Al=g:l.next=g,g===null&&(Mi=l)):(l=d,(r!==0||(S&3)!==0)&&(Rl=!0)),d=g}wt!==0&&wt!==5||Ps(r),ta!==0&&(ta=0)}function Cw(r,i){for(var l=r.suspendedLanes,d=r.pingedLanes,g=r.expirationTimes,S=r.pendingLanes&-62914561;0<S;){var T=31-$e(S),O=1<<T,P=g[T];P===-1?((O&l)===0||(O&d)!==0)&&(g[T]=is(O,i)):P<=i&&(r.expiredLanes|=O),S&=~O}if(i=Qe,l=De,l=Sa(r,r===i?l:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d=r.callbackNode,l===0||r===i&&(He===2||He===9)||r.cancelPendingCommit!==null)return d!==null&&d!==null&&Nn(d),r.callbackNode=null,r.callbackPriority=0;if((l&3)===0||Ur(r,l)){if(i=l&-l,i===r.callbackPriority)return i;switch(d!==null&&Nn(d),nc(l)){case 2:case 8:l=le;break;case 32:l=fe;break;case 268435456:l=Fe;break;default:l=fe}return d=Ow.bind(null,r),l=xt(l,d),r.callbackPriority=i,r.callbackNode=l,i}return d!==null&&d!==null&&Nn(d),r.callbackPriority=2,r.callbackNode=null,2}function Ow(r,i){if(wt!==0&&wt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var l=r.callbackNode;if(Tl()&&r.callbackNode!==l)return null;var d=De;return d=Sa(r,r===Qe?d:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),d===0?null:(pw(r,d,i),Cw(r,ke()),r.callbackNode!=null&&r.callbackNode===l?Ow.bind(null,r):null)}function Iw(r,i){if(Tl())return null;pw(r,i,!0)}function YD(){iM(function(){(qe&6)!==0?xt(te,VD):Nw()})}function qd(){if(ta===0){var r=vi;r===0&&(r=ot,ot<<=1,(ot&261888)===0&&(ot=256)),ta=r}return ta}function Lw(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:Do(""+r)}function Dw(r,i){var l=i.ownerDocument.createElement("input");return l.name=i.name,l.value=i.value,r.id&&l.setAttribute("form",r.id),i.parentNode.insertBefore(l,i),r=new FormData(r),l.parentNode.removeChild(l),r}function KD(r,i,l,d,g){if(i==="submit"&&l&&l.stateNode===g){var S=Lw((g[tn]||null).action),T=d.submitter;T&&(i=(i=T[tn]||null)?Lw(i.formAction):T.getAttribute("formAction"),i!==null&&(S=i,T=null));var O=new Bo("action","action",null,d,g);r.push({event:O,listeners:[{instance:null,listener:function(){if(d.defaultPrevented){if(ta!==0){var P=T?Dw(g,T):new FormData(g);ld(l,{pending:!0,data:P,method:g.method,action:S},null,P)}}else typeof S=="function"&&(O.preventDefault(),P=T?Dw(g,T):new FormData(g),ld(l,{pending:!0,data:P,method:g.method,action:S},S,P))},currentTarget:g}]})}}for(var $d=0;$d<Ac.length;$d++){var Gd=Ac[$d],WD=Gd.toLowerCase(),XD=Gd[0].toUpperCase()+Gd.slice(1);Gn(WD,"on"+XD)}Gn(dE,"onAnimationEnd"),Gn(pE,"onAnimationIteration"),Gn(fE,"onAnimationStart"),Gn("dblclick","onDoubleClick"),Gn("focusin","onFocus"),Gn("focusout","onBlur"),Gn(pD,"onTransitionRun"),Gn(fD,"onTransitionStart"),Gn(hD,"onTransitionCancel"),Gn(hE,"onTransitionEnd"),si("onMouseEnter",["mouseout","mouseover"]),si("onMouseLeave",["mouseout","mouseover"]),si("onPointerEnter",["pointerout","pointerover"]),si("onPointerLeave",["pointerout","pointerover"]),va("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),va("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),va("onBeforeInput",["compositionend","keypress","textInput","paste"]),va("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),va("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),va("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var zs="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(" "),ZD=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(zs));function Mw(r,i){i=(i&4)!==0;for(var l=0;l<r.length;l++){var d=r[l],g=d.event;d=d.listeners;e:{var S=void 0;if(i)for(var T=d.length-1;0<=T;T--){var O=d[T],P=O.instance,X=O.currentTarget;if(O=O.listener,P!==S&&g.isPropagationStopped())break e;S=O,g.currentTarget=X;try{S(g)}catch(re){zo(re)}g.currentTarget=null,S=P}else for(T=0;T<d.length;T++){if(O=d[T],P=O.instance,X=O.currentTarget,O=O.listener,P!==S&&g.isPropagationStopped())break e;S=O,g.currentTarget=X;try{S(g)}catch(re){zo(re)}g.currentTarget=null,S=P}}}}function Ie(r,i){var l=i[rc];l===void 0&&(l=i[rc]=new Set);var d=r+"__bubble";l.has(d)||(Fw(i,r,2,!1),l.add(d))}function Hd(r,i,l){var d=0;i&&(d|=4),Fw(l,r,d,i)}var _l="_reactListening"+Math.random().toString(36).slice(2);function Vd(r){if(!r[_l]){r[_l]=!0,Nv.forEach(function(l){l!=="selectionchange"&&(ZD.has(l)||Hd(l,!1,r),Hd(l,!0,r))});var i=r.nodeType===9?r:r.ownerDocument;i===null||i[_l]||(i[_l]=!0,Hd("selectionchange",!1,i))}}function Fw(r,i,l,d){switch(dT(i)){case 2:var g=AM;break;case 8:g=RM;break;default:g=op}l=g.bind(null,i,l,r),g=void 0,!pc||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(g=!0),d?g!==void 0?r.addEventListener(i,l,{capture:!0,passive:g}):r.addEventListener(i,l,!0):g!==void 0?r.addEventListener(i,l,{passive:g}):r.addEventListener(i,l,!1)}function Yd(r,i,l,d,g){var S=d;if((i&1)===0&&(i&2)===0&&d!==null)e:for(;;){if(d===null)return;var T=d.tag;if(T===3||T===4){var O=d.stateNode.containerInfo;if(O===g)break;if(T===4)for(T=d.return;T!==null;){var P=T.tag;if((P===3||P===4)&&T.stateNode.containerInfo===g)return;T=T.return}for(;O!==null;){if(T=ri(O),T===null)return;if(P=T.tag,P===5||P===6||P===26||P===27){d=S=T;continue e}O=O.parentNode}}d=d.return}zv(function(){var X=S,re=cc(l),se=[];e:{var Q=mE.get(r);if(Q!==void 0){var ee=Bo,he=r;switch(r){case"keypress":if(Fo(l)===0)break e;case"keydown":case"keyup":ee=GL;break;case"focusin":he="focus",ee=gc;break;case"focusout":he="blur",ee=gc;break;case"beforeblur":case"afterblur":ee=gc;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":ee=Gv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=IL;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=YL;break;case dE:case pE:case fE:ee=ML;break;case hE:ee=WL;break;case"scroll":case"scrollend":ee=CL;break;case"wheel":ee=ZL;break;case"copy":case"cut":case"paste":ee=UL;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Vv;break;case"toggle":case"beforetoggle":ee=JL}var Se=(i&4)!==0,We=!Se&&(r==="scroll"||r==="scrollend"),V=Se?Q!==null?Q+"Capture":null:Q;Se=[];for(var $=X,W;$!==null;){var ie=$;if(W=ie.stateNode,ie=ie.tag,ie!==5&&ie!==26&&ie!==27||W===null||V===null||(ie=us($,V),ie!=null&&Se.push(qs($,ie,W))),We)break;$=$.return}0<Se.length&&(Q=new ee(Q,he,null,l,re),se.push({event:Q,listeners:Se}))}}if((i&7)===0){e:{if(Q=r==="mouseover"||r==="pointerover",ee=r==="mouseout"||r==="pointerout",Q&&l!==uc&&(he=l.relatedTarget||l.fromElement)&&(ri(he)||he[ni]))break e;if((ee||Q)&&(Q=re.window===re?re:(Q=re.ownerDocument)?Q.defaultView||Q.parentWindow:window,ee?(he=l.relatedTarget||l.toElement,ee=X,he=he?ri(he):null,he!==null&&(We=o(he),Se=he.tag,he!==We||Se!==5&&Se!==27&&Se!==6)&&(he=null)):(ee=null,he=X),ee!==he)){if(Se=Gv,ie="onMouseLeave",V="onMouseEnter",$="mouse",(r==="pointerout"||r==="pointerover")&&(Se=Vv,ie="onPointerLeave",V="onPointerEnter",$="pointer"),We=ee==null?Q:ls(ee),W=he==null?Q:ls(he),Q=new Se(ie,$+"leave",ee,l,re),Q.target=We,Q.relatedTarget=W,ie=null,ri(re)===X&&(Se=new Se(V,$+"enter",he,l,re),Se.target=W,Se.relatedTarget=We,ie=Se),We=ie,ee&&he)t:{for(Se=QD,V=ee,$=he,W=0,ie=V;ie;ie=Se(ie))W++;ie=0;for(var be=$;be;be=Se(be))ie++;for(;0<W-ie;)V=Se(V),W--;for(;0<ie-W;)$=Se($),ie--;for(;W--;){if(V===$||$!==null&&V===$.alternate){Se=V;break t}V=Se(V),$=Se($)}Se=null}else Se=null;ee!==null&&Uw(se,Q,ee,Se,!1),he!==null&&We!==null&&Uw(se,We,he,Se,!0)}}e:{if(Q=X?ls(X):window,ee=Q.nodeName&&Q.nodeName.toLowerCase(),ee==="select"||ee==="input"&&Q.type==="file")var Pe=eE;else if(Qv(Q))if(tE)Pe=uD;else{Pe=oD;var ge=sD}else ee=Q.nodeName,!ee||ee.toLowerCase()!=="input"||Q.type!=="checkbox"&&Q.type!=="radio"?X&&lc(X.elementType)&&(Pe=eE):Pe=lD;if(Pe&&(Pe=Pe(r,X))){Jv(se,Pe,l,re);break e}ge&&ge(r,Q,X),r==="focusout"&&X&&Q.type==="number"&&X.memoizedProps.value!=null&&oc(Q,"number",Q.value)}switch(ge=X?ls(X):window,r){case"focusin":(Qv(ge)||ge.contentEditable==="true")&&(pi=ge,xc=X,bs=null);break;case"focusout":bs=xc=pi=null;break;case"mousedown":wc=!0;break;case"contextmenu":case"mouseup":case"dragend":wc=!1,uE(se,l,re);break;case"selectionchange":if(dD)break;case"keydown":case"keyup":uE(se,l,re)}var Ne;if(yc)e:{switch(r){case"compositionstart":var Me="onCompositionStart";break e;case"compositionend":Me="onCompositionEnd";break e;case"compositionupdate":Me="onCompositionUpdate";break e}Me=void 0}else di?Xv(r,l)&&(Me="onCompositionEnd"):r==="keydown"&&l.keyCode===229&&(Me="onCompositionStart");Me&&(Yv&&l.locale!=="ko"&&(di||Me!=="onCompositionStart"?Me==="onCompositionEnd"&&di&&(Ne=qv()):(jr=re,fc="value"in jr?jr.value:jr.textContent,di=!0)),ge=kl(X,Me),0<ge.length&&(Me=new Hv(Me,r,null,l,re),se.push({event:Me,listeners:ge}),Ne?Me.data=Ne:(Ne=Zv(l),Ne!==null&&(Me.data=Ne)))),(Ne=tD?nD(r,l):rD(r,l))&&(Me=kl(X,"onBeforeInput"),0<Me.length&&(ge=new Hv("onBeforeInput","beforeinput",null,l,re),se.push({event:ge,listeners:Me}),ge.data=Ne)),KD(se,r,X,l,re)}Mw(se,i)})}function qs(r,i,l){return{instance:r,listener:i,currentTarget:l}}function kl(r,i){for(var l=i+"Capture",d=[];r!==null;){var g=r,S=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||S===null||(g=us(r,l),g!=null&&d.unshift(qs(r,g,S)),g=us(r,i),g!=null&&d.push(qs(r,g,S))),r.tag===3)return d;r=r.return}return[]}function QD(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function Uw(r,i,l,d,g){for(var S=i._reactName,T=[];l!==null&&l!==d;){var O=l,P=O.alternate,X=O.stateNode;if(O=O.tag,P!==null&&P===d)break;O!==5&&O!==26&&O!==27||X===null||(P=X,g?(X=us(l,S),X!=null&&T.unshift(qs(l,X,P))):g||(X=us(l,S),X!=null&&T.push(qs(l,X,P)))),l=l.return}T.length!==0&&r.push({event:i,listeners:T})}var JD=/\r\n?/g,eM=/\u0000|\uFFFD/g;function Bw(r){return(typeof r=="string"?r:""+r).replace(JD,`
|
|
49
|
-
`).replace(eM,"")}function jw(r,i){return i=Bw(i),Bw(r)===i}function Ke(r,i,l,d,g,S){switch(l){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||li(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&li(r,""+d);break;case"className":Io(r,"class",d);break;case"tabIndex":Io(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Io(r,l,d);break;case"style":jv(r,d,S);break;case"data":if(i!=="object"){Io(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||l!=="href")){r.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(l);break}d=Do(""+d),r.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(l==="formAction"?(i!=="input"&&Ke(r,i,"name",g.name,g,null),Ke(r,i,"formEncType",g.formEncType,g,null),Ke(r,i,"formMethod",g.formMethod,g,null),Ke(r,i,"formTarget",g.formTarget,g,null)):(Ke(r,i,"encType",g.encType,g,null),Ke(r,i,"method",g.method,g,null),Ke(r,i,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(l);break}d=Do(""+d),r.setAttribute(l,d);break;case"onClick":d!=null&&(r.onclick=hr);break;case"onScroll":d!=null&&Ie("scroll",r);break;case"onScrollEnd":d!=null&&Ie("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}l=Do(""+d),r.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":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,""+d):r.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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":d===!0?r.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,d):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(l,d):r.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(l):r.setAttribute(l,d);break;case"popover":Ie("beforetoggle",r),Ie("toggle",r),Oo(r,"popover",d);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Oo(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=kL.get(l)||l,Oo(r,l,d))}}function Kd(r,i,l,d,g,S){switch(l){case"style":jv(r,d,S);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof d=="string"?li(r,d):(typeof d=="number"||typeof d=="bigint")&&li(r,""+d);break;case"onScroll":d!=null&&Ie("scroll",r);break;case"onScrollEnd":d!=null&&Ie("scrollend",r);break;case"onClick":d!=null&&(r.onclick=hr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cv.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),i=l.slice(2,g?l.length-7:void 0),S=r[tn]||null,S=S!=null?S[l]:null,typeof S=="function"&&r.removeEventListener(i,S,g),typeof d=="function")){typeof S!="function"&&S!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,d,g);break e}l in r?r[l]=d:d===!0?r.setAttribute(l,""):Oo(r,l,d)}}}function Ut(r,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",r),Ie("load",r);var d=!1,g=!1,S;for(S in l)if(l.hasOwnProperty(S)){var T=l[S];if(T!=null)switch(S){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ke(r,i,S,T,l,null)}}g&&Ke(r,i,"srcSet",l.srcSet,l,null),d&&Ke(r,i,"src",l.src,l,null);return;case"input":Ie("invalid",r);var O=S=T=g=null,P=null,X=null;for(d in l)if(l.hasOwnProperty(d)){var re=l[d];if(re!=null)switch(d){case"name":g=re;break;case"type":T=re;break;case"checked":P=re;break;case"defaultChecked":X=re;break;case"value":S=re;break;case"defaultValue":O=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:Ke(r,i,d,re,l,null)}}Mv(r,S,O,P,X,T,g,!1);return;case"select":Ie("invalid",r),d=T=S=null;for(g in l)if(l.hasOwnProperty(g)&&(O=l[g],O!=null))switch(g){case"value":S=O;break;case"defaultValue":T=O;break;case"multiple":d=O;default:Ke(r,i,g,O,l,null)}i=S,l=T,r.multiple=!!d,i!=null?oi(r,!!d,i,!1):l!=null&&oi(r,!!d,l,!0);return;case"textarea":Ie("invalid",r),S=g=d=null;for(T in l)if(l.hasOwnProperty(T)&&(O=l[T],O!=null))switch(T){case"value":d=O;break;case"defaultValue":g=O;break;case"children":S=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(a(91));break;default:Ke(r,i,T,O,l,null)}Uv(r,d,g,S);return;case"option":for(P in l)if(l.hasOwnProperty(P)&&(d=l[P],d!=null))switch(P){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Ke(r,i,P,d,l,null)}return;case"dialog":Ie("beforetoggle",r),Ie("toggle",r),Ie("cancel",r),Ie("close",r);break;case"iframe":case"object":Ie("load",r);break;case"video":case"audio":for(d=0;d<zs.length;d++)Ie(zs[d],r);break;case"image":Ie("error",r),Ie("load",r);break;case"details":Ie("toggle",r);break;case"embed":case"source":case"link":Ie("error",r),Ie("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(d=l[X],d!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ke(r,i,X,d,l,null)}return;default:if(lc(i)){for(re in l)l.hasOwnProperty(re)&&(d=l[re],d!==void 0&&Kd(r,i,re,d,l,void 0));return}}for(O in l)l.hasOwnProperty(O)&&(d=l[O],d!=null&&Ke(r,i,O,d,l,null))}function tM(r,i,l,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,S=null,T=null,O=null,P=null,X=null,re=null;for(ee in l){var se=l[ee];if(l.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":P=se;default:d.hasOwnProperty(ee)||Ke(r,i,ee,null,d,se)}}for(var Q in d){var ee=d[Q];if(se=l[Q],d.hasOwnProperty(Q)&&(ee!=null||se!=null))switch(Q){case"type":S=ee;break;case"name":g=ee;break;case"checked":X=ee;break;case"defaultChecked":re=ee;break;case"value":T=ee;break;case"defaultValue":O=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,i));break;default:ee!==se&&Ke(r,i,Q,ee,d,se)}}sc(r,T,O,P,X,re,S,g);return;case"select":ee=T=O=Q=null;for(S in l)if(P=l[S],l.hasOwnProperty(S)&&P!=null)switch(S){case"value":break;case"multiple":ee=P;default:d.hasOwnProperty(S)||Ke(r,i,S,null,d,P)}for(g in d)if(S=d[g],P=l[g],d.hasOwnProperty(g)&&(S!=null||P!=null))switch(g){case"value":Q=S;break;case"defaultValue":O=S;break;case"multiple":T=S;default:S!==P&&Ke(r,i,g,S,d,P)}i=O,l=T,d=ee,Q!=null?oi(r,!!l,Q,!1):!!d!=!!l&&(i!=null?oi(r,!!l,i,!0):oi(r,!!l,l?[]:"",!1));return;case"textarea":ee=Q=null;for(O in l)if(g=l[O],l.hasOwnProperty(O)&&g!=null&&!d.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Ke(r,i,O,null,d,g)}for(T in d)if(g=d[T],S=l[T],d.hasOwnProperty(T)&&(g!=null||S!=null))switch(T){case"value":Q=g;break;case"defaultValue":ee=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==S&&Ke(r,i,T,g,d,S)}Fv(r,Q,ee);return;case"option":for(var he in l)if(Q=l[he],l.hasOwnProperty(he)&&Q!=null&&!d.hasOwnProperty(he))switch(he){case"selected":r.selected=!1;break;default:Ke(r,i,he,null,d,Q)}for(P in d)if(Q=d[P],ee=l[P],d.hasOwnProperty(P)&&Q!==ee&&(Q!=null||ee!=null))switch(P){case"selected":r.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Ke(r,i,P,Q,d,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in l)Q=l[Se],l.hasOwnProperty(Se)&&Q!=null&&!d.hasOwnProperty(Se)&&Ke(r,i,Se,null,d,Q);for(X in d)if(Q=d[X],ee=l[X],d.hasOwnProperty(X)&&Q!==ee&&(Q!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,i));break;default:Ke(r,i,X,Q,d,ee)}return;default:if(lc(i)){for(var We in l)Q=l[We],l.hasOwnProperty(We)&&Q!==void 0&&!d.hasOwnProperty(We)&&Kd(r,i,We,void 0,d,Q);for(re in d)Q=d[re],ee=l[re],!d.hasOwnProperty(re)||Q===ee||Q===void 0&&ee===void 0||Kd(r,i,re,Q,d,ee);return}}for(var V in l)Q=l[V],l.hasOwnProperty(V)&&Q!=null&&!d.hasOwnProperty(V)&&Ke(r,i,V,null,d,Q);for(se in d)Q=d[se],ee=l[se],!d.hasOwnProperty(se)||Q===ee||Q==null&&ee==null||Ke(r,i,se,Q,d,ee)}function Pw(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nM(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var g=l[d],S=g.transferSize,T=g.initiatorType,O=g.duration;if(S&&O&&Pw(T)){for(T=0,O=g.responseEnd,d+=1;d<l.length;d++){var P=l[d],X=P.startTime;if(X>O)break;var re=P.transferSize,se=P.initiatorType;re&&Pw(se)&&(P=P.responseEnd,T+=re*(P<O?1:(O-X)/(P-X)))}if(--d,i+=8*(S+T)/(g.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Wd=null,Xd=null;function Nl(r){return r.nodeType===9?r:r.ownerDocument}function zw(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qw(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Zd(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function rM(){var r=window.event;return r&&r.type==="popstate"?r===Qd?!1:(Qd=r,!0):(Qd=null,!1)}var $w=typeof setTimeout=="function"?setTimeout:void 0,aM=typeof clearTimeout=="function"?clearTimeout:void 0,Gw=typeof Promise=="function"?Promise:void 0,iM=typeof queueMicrotask=="function"?queueMicrotask:typeof Gw<"u"?function(r){return Gw.resolve(null).then(r).catch(sM)}:$w;function sM(r){setTimeout(function(){throw r})}function na(r){return r==="head"}function Hw(r,i){var l=i,d=0;do{var g=l.nextSibling;if(r.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"||l==="/&"){if(d===0){r.removeChild(g),ji(i);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")$s(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,$s(l);for(var S=l.firstChild;S;){var T=S.nextSibling,O=S.nodeName;S[os]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&S.rel.toLowerCase()==="stylesheet"||l.removeChild(S),S=T}}else l==="body"&&$s(r.ownerDocument.body);l=g}while(l);ji(i)}function Vw(r,i){var l=r;r=0;do{var d=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=d}while(l)}function Jd(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Jd(l),ac(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function oM(r,i,l,d){for(;r.nodeType===1;){var g=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[os])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(S=r.getAttribute("rel"),S==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(S!==g.rel||r.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||r.getAttribute("title")!==(g.title==null?null:g.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(S=r.getAttribute("src"),(S!==(g.src==null?null:g.src)||r.getAttribute("type")!==(g.type==null?null:g.type)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&S&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var S=g.name==null?null:""+g.name;if(g.type==="hidden"&&r.getAttribute("name")===S)return r}else return r;if(r=jn(r.nextSibling),r===null)break}return null}function lM(r,i,l){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=jn(r.nextSibling),r===null))return null;return r}function Yw(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=jn(r.nextSibling),r===null))return null;return r}function ep(r){return r.data==="$?"||r.data==="$~"}function tp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function uM(r,i){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||l.readyState!=="loading")i();else{var d=function(){i(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function jn(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var np=null;function Kw(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(i===0)return jn(r.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}r=r.nextSibling}return null}function Ww(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return r;i--}else l!=="/$"&&l!=="/&"||i++}r=r.previousSibling}return null}function Xw(r,i,l){switch(i=Nl(l),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function $s(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);ac(r)}var Pn=new Map,Zw=new Set;function Cl(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Cr=ne.d;ne.d={f:cM,r:dM,D:pM,C:fM,L:hM,m:mM,X:bM,S:gM,M:yM};function cM(){var r=Cr.f(),i=El();return r||i}function dM(r){var i=ai(r);i!==null&&i.tag===5&&i.type==="form"?hx(i):Cr.r(r)}var Fi=typeof document>"u"?null:document;function Qw(r,i,l){var d=Fi;if(d&&typeof i=="string"&&i){var g=In(i);g='link[rel="'+r+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),Zw.has(g)||(Zw.add(g),r={rel:r,crossOrigin:l,href:i},d.querySelector(g)===null&&(i=d.createElement("link"),Ut(i,"link",r),kt(i),d.head.appendChild(i)))}}function pM(r){Cr.D(r),Qw("dns-prefetch",r,null)}function fM(r,i){Cr.C(r,i),Qw("preconnect",r,i)}function hM(r,i,l){Cr.L(r,i,l);var d=Fi;if(d&&r&&i){var g='link[rel="preload"][as="'+In(i)+'"]';i==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+In(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+In(l.imageSizes)+'"]')):g+='[href="'+In(r)+'"]';var S=g;switch(i){case"style":S=Ui(r);break;case"script":S=Bi(r)}Pn.has(S)||(r=m({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),Pn.set(S,r),d.querySelector(g)!==null||i==="style"&&d.querySelector(Gs(S))||i==="script"&&d.querySelector(Hs(S))||(i=d.createElement("link"),Ut(i,"link",r),kt(i),d.head.appendChild(i)))}}function mM(r,i){Cr.m(r,i);var l=Fi;if(l&&r){var d=i&&typeof i.as=="string"?i.as:"script",g='link[rel="modulepreload"][as="'+In(d)+'"][href="'+In(r)+'"]',S=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Bi(r)}if(!Pn.has(S)&&(r=m({rel:"modulepreload",href:r},i),Pn.set(S,r),l.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Hs(S)))return}d=l.createElement("link"),Ut(d,"link",r),kt(d),l.head.appendChild(d)}}}function gM(r,i,l){Cr.S(r,i,l);var d=Fi;if(d&&r){var g=ii(d).hoistableStyles,S=Ui(r);i=i||"default";var T=g.get(S);if(!T){var O={loading:0,preload:null};if(T=d.querySelector(Gs(S)))O.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":i},l),(l=Pn.get(S))&&rp(r,l);var P=T=d.createElement("link");kt(P),Ut(P,"link",r),P._p=new Promise(function(X,re){P.onload=X,P.onerror=re}),P.addEventListener("load",function(){O.loading|=1}),P.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Ol(T,i,d)}T={type:"stylesheet",instance:T,count:1,state:O},g.set(S,T)}}}function bM(r,i){Cr.X(r,i);var l=Fi;if(l&&r){var d=ii(l).hoistableScripts,g=Bi(r),S=d.get(g);S||(S=l.querySelector(Hs(g)),S||(r=m({src:r,async:!0},i),(i=Pn.get(g))&&ap(r,i),S=l.createElement("script"),kt(S),Ut(S,"link",r),l.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(g,S))}}function yM(r,i){Cr.M(r,i);var l=Fi;if(l&&r){var d=ii(l).hoistableScripts,g=Bi(r),S=d.get(g);S||(S=l.querySelector(Hs(g)),S||(r=m({src:r,async:!0,type:"module"},i),(i=Pn.get(g))&&ap(r,i),S=l.createElement("script"),kt(S),Ut(S,"link",r),l.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(g,S))}}function Jw(r,i,l,d){var g=(g=ce.current)?Cl(g):null;if(!g)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Ui(l.href),l=ii(g).hoistableStyles,d=l.get(i),d||(d={type:"style",instance:null,count:0,state:null},l.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=Ui(l.href);var S=ii(g).hoistableStyles,T=S.get(r);if(T||(g=g.ownerDocument||g,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(r,T),(S=g.querySelector(Gs(r)))&&!S._p&&(T.instance=S,T.state.loading=5),Pn.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Pn.set(r,l),S||SM(g,r,l,T.state))),i&&d===null)throw Error(a(528,""));return T}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Bi(l),l=ii(g).hoistableScripts,d=l.get(i),d||(d={type:"script",instance:null,count:0,state:null},l.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ui(r){return'href="'+In(r)+'"'}function Gs(r){return'link[rel="stylesheet"]['+r+"]"}function eT(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function SM(r,i,l,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Ut(i,"link",l),kt(i),r.head.appendChild(i))}function Bi(r){return'[src="'+In(r)+'"]'}function Hs(r){return"script[async]"+r}function tT(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+In(l.href)+'"]');if(d)return i.instance=d,kt(d),d;var g=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),kt(d),Ut(d,"style",g),Ol(d,l.precedence,r),i.instance=d;case"stylesheet":g=Ui(l.href);var S=r.querySelector(Gs(g));if(S)return i.state.loading|=4,i.instance=S,kt(S),S;d=eT(l),(g=Pn.get(g))&&rp(d,g),S=(r.ownerDocument||r).createElement("link"),kt(S);var T=S;return T._p=new Promise(function(O,P){T.onload=O,T.onerror=P}),Ut(S,"link",d),i.state.loading|=4,Ol(S,l.precedence,r),i.instance=S;case"script":return S=Bi(l.src),(g=r.querySelector(Hs(S)))?(i.instance=g,kt(g),g):(d=l,(g=Pn.get(S))&&(d=m({},l),ap(d,g)),r=r.ownerDocument||r,g=r.createElement("script"),kt(g),Ut(g,"link",d),r.head.appendChild(g),i.instance=g);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Ol(d,l.precedence,r));return i.instance}function Ol(r,i,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,S=g,T=0;T<d.length;T++){var O=d[T];if(O.dataset.precedence===i)S=O;else if(S!==g)break}S?S.parentNode.insertBefore(r,S.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function rp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function ap(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Il=null;function nT(r,i,l){if(Il===null){var d=new Map,g=Il=new Map;g.set(l,d)}else g=Il,d=g.get(l),d||(d=new Map,g.set(l,d));if(d.has(r))return d;for(d.set(r,null),l=l.getElementsByTagName(r),g=0;g<l.length;g++){var S=l[g];if(!(S[os]||S[Lt]||r==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var T=S.getAttribute(i)||"";T=r+T;var O=d.get(T);O?O.push(S):d.set(T,[S])}}return d}function rT(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i==="title"?r.querySelector("head > title"):null)}function vM(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function aT(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function EM(r,i,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=Ui(d.href),S=i.querySelector(Gs(g));if(S){i=S._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Ll.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=S,kt(S);return}S=i.ownerDocument||i,d=eT(d),(g=Pn.get(g))&&rp(d,g),S=S.createElement("link"),kt(S);var T=S;T._p=new Promise(function(O,P){T.onload=O,T.onerror=P}),Ut(S,"link",d),l.instance=S}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=Ll.bind(r),i.addEventListener("load",l),i.addEventListener("error",l))}}var ip=0;function xM(r,i){return r.stylesheets&&r.count===0&&Ml(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var d=setTimeout(function(){if(r.stylesheets&&Ml(r,r.stylesheets),r.unsuspend){var S=r.unsuspend;r.unsuspend=null,S()}},6e4+i);0<r.imgBytes&&ip===0&&(ip=62500*nM());var g=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Ml(r,r.stylesheets),r.unsuspend)){var S=r.unsuspend;r.unsuspend=null,S()}},(r.imgBytes>ip?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function Ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ml(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Dl=null;function Ml(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Dl=new Map,i.forEach(wM,r),Dl=null,Ll.call(r))}function wM(r,i){if(!(i.state.loading&4)){var l=Dl.get(r);if(l)var d=l.get(null);else{l=new Map,Dl.set(r,l);for(var g=r.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<g.length;S++){var T=g[S];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(l.set(T.dataset.precedence,T),d=T)}d&&l.set(null,d)}g=i.instance,T=g.getAttribute("data-precedence"),S=l.get(T)||d,S===d&&l.set(null,g),l.set(T,g),this.count++,d=Ll.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),S?S.parentNode.insertBefore(g,S.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(g,r.firstChild)),i.state.loading|=4}}var Vs={$$typeof:A,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function TM(r,i,l,d,g,S,T,O,P){this.tag=1,this.containerInfo=r,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=ec(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ec(0),this.hiddenUpdates=ec(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=S,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function iT(r,i,l,d,g,S,T,O,P,X,re,se){return r=new TM(r,i,l,T,P,X,re,se,O),i=1,S===!0&&(i|=24),S=bn(3,null,null,i),r.current=S,S.stateNode=r,i=Bc(),i.refCount++,r.pooledCache=i,i.refCount++,S.memoizedState={element:d,isDehydrated:l,cache:i},qc(S),r}function sT(r){return r?(r=mi,r):mi}function oT(r,i,l,d,g,S){g=sT(g),d.context===null?d.context=g:d.pendingContext=g,d=Hr(i),d.payload={element:l},S=S===void 0?null:S,S!==null&&(d.callback=S),l=Vr(r,d,i),l!==null&&(ln(l,r,i),Ts(l,r,i))}function lT(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function sp(r,i){lT(r,i),(r=r.alternate)&&lT(r,i)}function uT(r){if(r.tag===13||r.tag===31){var i=Ta(r,67108864);i!==null&&ln(i,r,67108864),sp(r,67108864)}}function cT(r){if(r.tag===13||r.tag===31){var i=xn();i=tc(i);var l=Ta(r,i);l!==null&&ln(l,r,i),sp(r,i)}}var Fl=!0;function AM(r,i,l,d){var g=G.T;G.T=null;var S=ne.p;try{ne.p=2,op(r,i,l,d)}finally{ne.p=S,G.T=g}}function RM(r,i,l,d){var g=G.T;G.T=null;var S=ne.p;try{ne.p=8,op(r,i,l,d)}finally{ne.p=S,G.T=g}}function op(r,i,l,d){if(Fl){var g=lp(d);if(g===null)Yd(r,i,d,Ul,l),pT(r,d);else if(kM(g,r,i,l,d))d.stopPropagation();else if(pT(r,d),i&4&&-1<_M.indexOf(r)){for(;g!==null;){var S=ai(g);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var T=Xn(S.pendingLanes);if(T!==0){var O=S;for(O.pendingLanes|=2,O.entangledLanes|=2;T;){var P=1<<31-$e(T);O.entanglements[1]|=P,T&=~P}er(S),(qe&6)===0&&(Sl=ke()+500,Ps(0))}}break;case 31:case 13:O=Ta(S,2),O!==null&&ln(O,S,2),El(),sp(S,2)}if(S=lp(d),S===null&&Yd(r,i,d,Ul,l),S===g)break;g=S}g!==null&&d.stopPropagation()}else Yd(r,i,d,null,l)}}function lp(r){return r=cc(r),up(r)}var Ul=null;function up(r){if(Ul=null,r=ri(r),r!==null){var i=o(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=u(i),r!==null)return r;r=null}else if(l===31){if(r=c(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Ul=r,null}function dT(r){switch(r){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(Ge()){case te:return 2;case le:return 8;case fe:case Ee:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var cp=!1,ra=null,aa=null,ia=null,Ys=new Map,Ks=new Map,sa=[],_M="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 pT(r,i){switch(r){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":ia=null;break;case"pointerover":case"pointerout":Ys.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(i.pointerId)}}function Ws(r,i,l,d,g,S){return r===null||r.nativeEvent!==S?(r={blockedOn:i,domEventName:l,eventSystemFlags:d,nativeEvent:S,targetContainers:[g]},i!==null&&(i=ai(i),i!==null&&uT(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,g!==null&&i.indexOf(g)===-1&&i.push(g),r)}function kM(r,i,l,d,g){switch(i){case"focusin":return ra=Ws(ra,r,i,l,d,g),!0;case"dragenter":return aa=Ws(aa,r,i,l,d,g),!0;case"mouseover":return ia=Ws(ia,r,i,l,d,g),!0;case"pointerover":var S=g.pointerId;return Ys.set(S,Ws(Ys.get(S)||null,r,i,l,d,g)),!0;case"gotpointercapture":return S=g.pointerId,Ks.set(S,Ws(Ks.get(S)||null,r,i,l,d,g)),!0}return!1}function fT(r){var i=ri(r.target);if(i!==null){var l=o(i);if(l!==null){if(i=l.tag,i===13){if(i=u(l),i!==null){r.blockedOn=i,_v(r.priority,function(){cT(l)});return}}else if(i===31){if(i=c(l),i!==null){r.blockedOn=i,_v(r.priority,function(){cT(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Bl(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=lp(r.nativeEvent);if(l===null){l=r.nativeEvent;var d=new l.constructor(l.type,l);uc=d,l.target.dispatchEvent(d),uc=null}else return i=ai(l),i!==null&&uT(i),r.blockedOn=l,!1;i.shift()}return!0}function hT(r,i,l){Bl(r)&&l.delete(i)}function NM(){cp=!1,ra!==null&&Bl(ra)&&(ra=null),aa!==null&&Bl(aa)&&(aa=null),ia!==null&&Bl(ia)&&(ia=null),Ys.forEach(hT),Ks.forEach(hT)}function jl(r,i){r.blockedOn===i&&(r.blockedOn=null,cp||(cp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,NM)))}var Pl=null;function mT(r){Pl!==r&&(Pl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pl===r&&(Pl=null);for(var i=0;i<r.length;i+=3){var l=r[i],d=r[i+1],g=r[i+2];if(typeof d!="function"){if(up(d||l)===null)continue;break}var S=ai(l);S!==null&&(r.splice(i,3),i-=3,ld(S,{pending:!0,data:g,method:l.method,action:d},d,g))}}))}function ji(r){function i(P){return jl(P,r)}ra!==null&&jl(ra,r),aa!==null&&jl(aa,r),ia!==null&&jl(ia,r),Ys.forEach(i),Ks.forEach(i);for(var l=0;l<sa.length;l++){var d=sa[l];d.blockedOn===r&&(d.blockedOn=null)}for(;0<sa.length&&(l=sa[0],l.blockedOn===null);)fT(l),l.blockedOn===null&&sa.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var g=l[d],S=l[d+1],T=g[tn]||null;if(typeof S=="function")T||mT(l);else if(T){var O=null;if(S&&S.hasAttribute("formAction")){if(g=S,T=S[tn]||null)O=T.formAction;else if(up(g)!==null)continue}else O=T.action;typeof O=="function"?l[d+1]=O:(l.splice(d,3),d-=3),mT(l)}}}function gT(){function r(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(T){return g=T})},focusReset:"manual",scroll:"manual"})}function i(){g!==null&&(g(),g=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),g!==null&&(g(),g=null)}}}function dp(r){this._internalRoot=r}zl.prototype.render=dp.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,d=xn();oT(l,d,r,i,null,null)},zl.prototype.unmount=dp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;oT(r.current,2,null,r,null,null),El(),i[ni]=null}};function zl(r){this._internalRoot=r}zl.prototype.unstable_scheduleHydration=function(r){if(r){var i=Rv();r={blockedOn:null,target:r,priority:i};for(var l=0;l<sa.length&&i!==0&&i<sa[l].priority;l++);sa.splice(l,0,r),l===0&&fT(r)}};var bT=t.version;if(bT!=="19.2.0")throw Error(a(527,bT,"19.2.0"));ne.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(i),r=r!==null?h(r):null,r=r===null?null:r.stateNode,r};var CM={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ql.isDisabled&&ql.supportsFiber)try{dt=ql.inject(CM),Ze=ql}catch{}}return Zs.createRoot=function(r,i){if(!s(r))throw Error(a(299));var l=!1,d="",g=Tx,S=Ax,T=Rx;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError)),i=iT(r,1,!1,null,null,l,d,null,g,S,T,gT),r[ni]=i.current,Vd(r),new dp(i)},Zs.hydrateRoot=function(r,i,l){if(!s(r))throw Error(a(299));var d=!1,g="",S=Tx,T=Ax,O=Rx,P=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(S=l.onUncaughtError),l.onCaughtError!==void 0&&(T=l.onCaughtError),l.onRecoverableError!==void 0&&(O=l.onRecoverableError),l.formState!==void 0&&(P=l.formState)),i=iT(r,1,!0,i,l??null,d,g,P,S,T,O,gT),i.context=sT(null),l=i.current,d=xn(),d=tc(d),g=Hr(d),g.callback=null,Vr(l,g,d),l=d,i.current.lanes=l,ss(i,l),er(i),r[ni]=i.current,Vd(r),new zl(i)},Zs.version="19.2.0",Zs}var _T;function jM(){if(_T)return hp.exports;_T=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hp.exports=BM(),hp.exports}var PM=jM(),Ji=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qM=class{#e=zM;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ja=new qM;function $M(e){setTimeout(e,0)}var Ha=typeof window>"u"||"Deno"in globalThis;function Wt(){}function GM(e,t){return typeof e=="function"?e(t):e}function My(e){return typeof e=="number"&&e>=0&&e!==1/0}function v1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function da(e,t){return typeof e=="function"?e(t):e}function qn(e,t){return typeof e=="function"?e(t):e}function kT(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:u,stale:c}=e;if(u){if(a){if(t.queryHash!==xS(u,t.options))return!1}else if(!mo(t.queryKey,u))return!1}if(n!=="all"){const p=t.isActive();if(n==="active"&&!p||n==="inactive"&&p)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||s&&s!==t.state.fetchStatus||o&&!o(t))}function NT(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Va(t.options.mutationKey)!==Va(o))return!1}else if(!mo(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function xS(e,t){return(t?.queryKeyHashFn||Va)(e)}function Va(e){return JSON.stringify(e,(t,n)=>Fy(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>mo(e[n],t[n])):!1}var HM=Object.prototype.hasOwnProperty;function E1(e,t){if(e===t)return e;const n=CT(e)&&CT(t);if(!n&&!(Fy(e)&&Fy(t)))return t;const s=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),u=o.length,c=n?new Array(u):{};let p=0;for(let f=0;f<u;f++){const h=n?f:o[f],m=e[h],b=t[h];if(m===b){c[h]=m,(n?f<s:HM.call(e,h))&&p++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){c[h]=b;continue}const y=E1(m,b);c[h]=y,y===m&&p++}return s===u&&p===s?e:c}function pu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function CT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fy(e){if(!OT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!OT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function OT(e){return Object.prototype.toString.call(e)==="[object Object]"}function VM(e){return new Promise(t=>{ja.setTimeout(t,e)})}function Uy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?E1(e,t):t}function YM(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function KM(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var wS=Symbol();function x1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===wS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function w1(e,t){return typeof e=="function"?e(...t):!!e}var WM=class extends Ji{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ha&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},TS=new WM;function By(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var XM=$M;function ZM(){let e=[],t=0,n=c=>{c()},a=c=>{c()},s=XM;const o=c=>{t?e.push(c):s(()=>{n(c)})},u=()=>{const c=e;e=[],c.length&&s(()=>{a(()=>{c.forEach(p=>{n(p)})})})};return{batch:c=>{let p;t++;try{p=c()}finally{t--,t||u()}return p},batchCalls:c=>(...p)=>{o(()=>{c(...p)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{a=c},setScheduler:c=>{s=c}}}var Tt=ZM(),QM=class extends Ji{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ha&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},fu=new QM;function JM(e){return Math.min(1e3*2**e,3e4)}function T1(e){return(e??"online")==="online"?fu.isOnline():!0}var jy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function A1(e){let t=!1,n=0,a;const s=By(),o=()=>s.status!=="pending",u=x=>{if(!o()){const w=new jy(x);b(w),e.onCancel?.(w)}},c=()=>{t=!0},p=()=>{t=!1},f=()=>TS.isFocused()&&(e.networkMode==="always"||fu.isOnline())&&e.canRun(),h=()=>T1(e.networkMode)&&e.canRun(),m=x=>{o()||(a?.(),s.resolve(x))},b=x=>{o()||(a?.(),s.reject(x))},y=()=>new Promise(x=>{a=w=>{(o()||f())&&x(w)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),E=()=>{if(o())return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(_){x=Promise.reject(_)}Promise.resolve(x).then(m).catch(_=>{if(o())return;const R=e.retry??(Ha?0:3),A=e.retryDelay??JM,N=typeof A=="function"?A(n,_):A,D=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,_);if(t||!D){b(_);return}n++,e.onFail?.(n,_),VM(N).then(()=>f()?void 0:y()).then(()=>{t?b(_):E()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(a?.(),s),cancelRetry:c,continueRetry:p,canStart:h,start:()=>(h()?E():y().then(E),s)}}var R1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),My(this.gcTime)&&(this.#e=ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ha?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ja.clearTimeout(this.#e),this.#e=void 0)}},e2=class extends R1{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=IT(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=IT(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Uy(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>qn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>da(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!v1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(p=>p.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,a=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const c=x1(this.options,t),f=(()=>{const h={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(h),h})();return this.#o=!1,this.options.persister?this.options.persister(c,f,this):c(f)},u=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:s};return a(c),c})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=A1({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:c=>{c instanceof jy&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,p)=>{this.#i({type:"failed",failureCount:c,error:p})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof jy){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#i({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,..._1(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function _1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:T1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function IT(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var t2=class extends Ji{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=By(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#m;#p;#f;#u;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),LT(this.#t,this.options)?this.#d():this.updateResult(),this.#S())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Py(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Py(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!pu(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&DT(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(t.enabled,this.#t)||da(this.options.staleTime,this.#t)!==da(t.staleTime,this.#t))&&this.#g();const s=this.#b();a&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(t.enabled,this.#t)||s!==this.#l)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return r2(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(n,a))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Wt)),t}#g(){this.#v();const e=da(this.options.staleTime,this.#t);if(Ha||this.#a.isStale||!My(e))return;const n=v1(this.#a.dataUpdatedAt,e)+1;this.#u=ja.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(Ha||qn(this.options.enabled,this.#t)===!1||!My(this.#l)||this.#l===0)&&(this.#c=ja.setInterval(()=>{(this.options.refetchIntervalInBackground||TS.isFocused())&&this.#d()},this.#l))}#S(){this.#g(),this.#y(this.#b())}#v(){this.#u&&(ja.clearTimeout(this.#u),this.#u=void 0)}#E(){this.#c&&(ja.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,a=this.options,s=this.#a,o=this.#r,u=this.#s,p=e!==n?e.state:this.#n,{state:f}=e;let h={...f},m=!1,b;if(t._optimisticResults){const j=this.hasListeners(),F=!j&<(e,t),L=j&&DT(e,n,t,a);(F||L)&&(h={...h,..._1(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:E,status:x}=h;b=h.data;let w=!1;if(t.placeholderData!==void 0&&b===void 0&&x==="pending"){let j;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(j=s.data,w=!0):j=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,j!==void 0&&(x="success",b=Uy(s?.data,j,t),m=!0)}if(t.select&&b!==void 0&&!w)if(s&&b===o?.data&&t.select===this.#m)b=this.#p;else try{this.#m=t.select,b=t.select(b),b=Uy(s?.data,b,t),this.#p=b,this.#i=null}catch(j){this.#i=j}this.#i&&(y=this.#i,b=this.#p,E=Date.now(),x="error");const _=h.fetchStatus==="fetching",R=x==="pending",A=x==="error",N=R&&_,D=b!==void 0,C={status:x,fetchStatus:h.fetchStatus,isPending:R,isSuccess:x==="success",isError:A,isInitialLoading:N,isLoading:N,data:b,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:E,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>p.dataUpdateCount||h.errorUpdateCount>p.errorUpdateCount,isFetching:_,isRefetching:_&&!R,isLoadingError:A&&!D,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&D,isStale:AS(e,t),refetch:this.refetch,promise:this.#o,isEnabled:qn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=q=>{C.status==="error"?q.reject(C.error):C.data!==void 0&&q.resolve(C.data)},F=()=>{const q=this.#o=C.promise=By();j(q)},L=this.#o;switch(L.status){case"pending":e.queryHash===n.queryHash&&j(L);break;case"fulfilled":(C.status==="error"||C.data!==L.value)&&F();break;case"rejected":(C.status!=="error"||C.error!==L.reason)&&F();break}}return C}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#f=this.#t),pu(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.#h.size)return!0;const o=new Set(s??this.#h);return this.options.throwOnError&&o.add("error"),Object.keys(this.#a).some(u=>{const c=u;return this.#a[c]!==e[c]&&o.has(c)})};this.#w({listeners:n()})}#x(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#S()}#w(e){Tt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function n2(e,t){return qn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function LT(e,t){return n2(e,t)||e.state.data!==void 0&&Py(e,t,t.refetchOnMount)}function Py(e,t,n){if(qn(t.enabled,e)!==!1&&da(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&AS(e,t)}return!1}function DT(e,t,n,a){return(e!==t||qn(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&AS(e,n)}function AS(e,t){return qn(t.enabled,e)!==!1&&e.isStaleByTime(da(t.staleTime,e))}function r2(e,t){return!pu(e.getCurrentResult(),t)}function MT(e){return{onFetch:(t,n)=>{const a=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},p=0;const f=async()=>{let h=!1;const m=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},b=x1(t.options,t.fetchOptions),y=async(E,x,w)=>{if(h)return Promise.reject();if(x==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:x,direction:w?"backward":"forward",meta:t.options.meta};return m(k),k})(),A=await b(R),{maxPages:N}=t.options,D=w?KM:YM;return{pages:D(E.pages,A,N),pageParams:D(E.pageParams,x,N)}};if(s&&o.length){const E=s==="backward",x=E?a2:FT,w={pages:o,pageParams:u},_=x(a,w);c=await y(w,_,E)}else{const E=e??o.length;do{const x=p===0?u[0]??a.initialPageParam:FT(a,c);if(p>0&&x==null)break;c=await y(c,x),p++}while(p<E)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function FT(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function a2(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var i2=class extends R1{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||k1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=A1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,u)=>{this.#r({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",s=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:s})}const o=await this.#a.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{throw await this.#n.config.onError?.(o,e,this.state.context,this,n),await this.options.onError?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,o,e,this.state.context,n),o}finally{this.#r({type:"error",error:o})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Tt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function k1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var s2=class extends Ji{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new i2({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=$l(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=$l(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=$l(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(s=>s.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=$l(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Tt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>NT(t,n))}findAll(e={}){return this.getAll().filter(t=>NT(e,t))}notify(e){Tt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Tt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Wt))))}};function $l(e){return e.options.scope?.id}var o2=class extends Ji{#e;#t=void 0;#n;#a;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),pu(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Va(n.mutationKey)!==Va(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#a=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??k1();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Tt.batch(()=>{if(this.#a&&this.hasListeners()){const n=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#a.onSuccess?.(t.data,n,a,s),this.#a.onSettled?.(t.data,null,n,a,s)):t?.type==="error"&&(this.#a.onError?.(t.error,n,a,s),this.#a.onSettled?.(void 0,t.error,n,a,s))}this.listeners.forEach(n=>{n(this.#t)})})}},l2=class extends Ji{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,s=t.queryHash??xS(a,t);let o=this.get(s);return o||(o=new e2({client:e,queryKey:a,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Tt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kT(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>kT(e,n)):t}notify(e){Tt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},u2=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new l2,this.#t=e.mutationCache||new s2,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=TS.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=fu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(da(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,u=GM(t,o);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Tt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Tt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Tt.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=Tt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return Tt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=Tt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Wt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(da(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=MT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=MT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(Va(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{mo(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Va(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{mo(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xS(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===wS&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},N1=U.createContext(void 0),_n=e=>{const t=U.useContext(N1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},c2=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(N1.Provider,{value:e,children:t})),C1=U.createContext(!1),d2=()=>U.useContext(C1);C1.Provider;function p2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var f2=U.createContext(p2()),h2=()=>U.useContext(f2),m2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},g2=e=>{U.useEffect(()=>{e.clearReset()},[e])},b2=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||w1(n,[e.error,a])),y2=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},S2=(e,t)=>e.isLoading&&e.isFetching&&!t,v2=(e,t)=>e?.suspense&&t.isPending,UT=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function E2(e,t,n){const a=d2(),s=h2(),o=_n(),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=a?"isRestoring":"optimistic",y2(u),m2(u,s),g2(s);const c=!o.getQueryCache().get(u.queryHash),[p]=U.useState(()=>new t(o,u)),f=p.getOptimisticResult(u),h=!a&&e.subscribed!==!1;if(U.useSyncExternalStore(U.useCallback(m=>{const b=h?p.subscribe(Tt.batchCalls(m)):Wt;return p.updateResult(),b},[p,h]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),U.useEffect(()=>{p.setOptions(u)},[u,p]),v2(u,f))throw UT(u,p,s);if(b2({result:f,errorResetBoundary:s,throwOnError:u.throwOnError,query:o.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,f),u.experimental_prefetchInRender&&!Ha&&S2(f,a)&&(c?UT(u,p,s):o.getQueryCache().get(u.queryHash)?.promise)?.catch(Wt).finally(()=>{p.updateResult()}),u.notifyOnChangeProps?f:p.trackResult(f)}function Xa(e,t){return E2(e,t2)}function cr(e,t){const n=_n(),[a]=U.useState(()=>new o2(n,e));U.useEffect(()=>{a.setOptions(e)},[a,e]);const s=U.useSyncExternalStore(U.useCallback(u=>a.subscribe(Tt.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=U.useCallback((u,c)=>{a.mutate(u,c).catch(Wt)},[a]);if(s.error&&w1(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const Hi=new WeakMap,ru=new WeakMap,hu={current:[]};let yp=!1,oo=0;const so=new Set,Gl=new Map;function O1(e){const t=Array.from(e).sort((n,a)=>n instanceof Vi&&n.options.deps.includes(a)?1:a instanceof Vi&&a.options.deps.includes(n)?-1:0);for(const n of t){if(hu.current.includes(n))continue;hu.current.push(n),n.recompute();const a=ru.get(n);if(a)for(const s of a){const o=Hi.get(s);o&&O1(o)}}}function x2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function w2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function I1(e){if(oo>0&&!Gl.has(e)&&Gl.set(e,e.prevState),so.add(e),!(oo>0)&&!yp)try{for(yp=!0;so.size>0;){const t=Array.from(so);so.clear();for(const n of t){const a=Gl.get(n)??n.prevState;n.prevState=a,x2(n)}for(const n of t){const a=Hi.get(n);a&&(hu.current.push(n),O1(a))}for(const n of t){const a=Hi.get(n);if(a)for(const s of a)w2(s)}}}finally{yp=!1,hu.current=[],Gl.clear()}}function lo(e){oo++;try{e()}finally{if(oo--,oo===0){const t=so.values().next().value;t&&I1(t)}}}function T2(e){return typeof e=="function"}class zy{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var s,o;this.listeners.add(a);const u=(o=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:o.call(s,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):T2(t)?this.state=t(this.prevState):this.state=t,(s=(a=this.options)==null?void 0:a.onUpdate)==null||s.call(a),I1(this)}}class Vi{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,a=new Array(n),s=new Array(n);for(let o=0;o<n;o++){const u=this.options.deps[o];a[o]=u.prevState,s[o]=u.state}return this.lastSeenDepValues=s,{prevDepVals:a,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,a;this.prevState=this.state;const s=this.getDepVals();this.state=this.options.fn(s),(a=(n=this.options).onUpdate)==null||a.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof Vi&&o.checkIfRecalculationNeededDeeply();let n=!1;const a=this.lastSeenDepValues,{currDepVals:s}=this.getDepVals();for(let o=0;o<s.length;o++)if(s[o]!==a[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var a,s;this.listeners.add(n);const o=(s=(a=this.options).onSubscribe)==null?void 0:s.call(a,n,this);return()=>{this.listeners.delete(n),o?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof Vi)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof zy){let a=Hi.get(n);a||(a=new Set,Hi.set(n,a)),a.add(this);let s=ru.get(this);s||(s=new Set,ru.set(this,s)),s.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Vi)this.unregisterFromGraph(n.options.deps);else if(n instanceof zy){const a=Hi.get(n);a&&a.delete(this);const s=ru.get(this);s&&s.delete(n)}}}const pa="__TSR_index",BT="popstate",jT="beforeunload";function A2(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:u}))},s=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},o=async({task:u,navigateOpts:c,...p})=>{if(c?.ignoreBlocker??!1){u();return}const h=e.getBlockers?.()??[],m=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&h.length&&m)for(const b of h){const y=mu(p.path,p.state);if(await b.blockerFn({currentLocation:t,nextLocation:y,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,c,p)=>{const f=t.state[pa];c=PT(f+1,c),o({task:()=>{e.pushState(u,c),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:c})},replace:(u,c,p)=>{const f=t.state[pa];c=PT(f,c),o({task:()=>{e.replaceState(u,c),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:c})},go:(u,c)=>{o({task:()=>{e.go(u),s({type:"GO",index:u})},navigateOpts:c,type:"GO"})},back:u=>{o({task:()=>{e.back(u?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{o({task:()=>{e.forward(u?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[pa]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(f=>f!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function PT(e,t){t||(t={});const n=RS();return{...t,key:n,__TSR_key:n,[pa]:e}}function R2(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let s=[];const o=()=>s,u=j=>s=j,c=(j=>j),p=(()=>mu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const j=RS();t.history.replaceState({[pa]:0,key:j,__TSR_key:j},"")}let f=p(),h,m=!1,b=!1,y=!1,E=!1;const x=()=>f;let w,_;const R=()=>{w&&(C._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),C._ignoreSubscribers=!1,w=void 0,_=void 0,h=void 0)},A=(j,F,L)=>{const q=c(F);_||(h=f),f=mu(F,L),w={href:q,state:L,isPush:w?.isPush||j==="push"},_||(_=Promise.resolve().then(()=>R()))},N=j=>{f=p(),C.notify({type:j})},D=async()=>{if(b){b=!1;return}const j=p(),F=j.state[pa]-f.state[pa],L=F===1,q=F===-1,z=!L&&!q||m;m=!1;const Z=z?"GO":q?"BACK":"FORWARD",H=z?{type:"GO",index:F}:{type:q?"BACK":"FORWARD"};if(y)y=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const G of K)if(await G.blockerFn({currentLocation:f,nextLocation:j,action:Z})){b=!0,t.history.go(1),C.notify(H);return}}}f=p(),C.notify(H)},k=j=>{if(E){E=!1;return}let F=!1;const L=o();if(typeof document<"u"&&L.length)for(const q of L){const z=q.enableBeforeUnload??!0;if(z===!0){F=!0;break}if(typeof z=="function"&&z()===!0){F=!0;break}}if(F)return j.preventDefault(),j.returnValue=""},C=A2({getLocation:x,getLength:()=>t.history.length,pushState:(j,F)=>A("push",j,F),replaceState:(j,F)=>A("replace",j,F),back:j=>(j&&(y=!0),E=!0,t.history.back()),forward:j=>{j&&(y=!0),E=!0,t.history.forward()},go:j=>{m=!0,t.history.go(j)},createHref:j=>c(j),flush:R,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(jT,k,{capture:!0}),t.removeEventListener(BT,D)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(jT,k,{capture:!0}),t.addEventListener(BT,D),t.history.pushState=function(...j){const F=n.apply(t.history,j);return C._ignoreSubscribers||N("PUSH"),F},t.history.replaceState=function(...j){const F=a.apply(t.history,j);return C._ignoreSubscribers||N("REPLACE"),F},C}function mu(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),s=RS();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[pa]:0,key:s,__TSR_key:s}}}function RS(){return(Math.random()+1).toString(36).substring(7)}function qy(e){return e[e.length-1]}function _2(e){return typeof e=="function"}function za(e,t){return _2(e)?e(t):e}const k2=Object.prototype.hasOwnProperty;function zn(e,t){if(e===t)return e;const n=t,a=$T(e)&&$T(n);if(!a&&!(gu(e)&&gu(n)))return n;const s=a?e:zT(e);if(!s)return n;const o=a?n:zT(n);if(!o)return n;const u=s.length,c=o.length,p=a?new Array(c):{};let f=0;for(let h=0;h<c;h++){const m=a?h:o[h],b=e[m],y=n[m];if(b===y){p[m]=b,(a?h<u:k2.call(e,m))&&f++;continue}if(b===null||y===null||typeof b!="object"||typeof y!="object"){p[m]=y;continue}const E=zn(b,y);p[m]=E,E===b&&f++}return u===c&&f===u?e:p}function zT(e){const t=[],n=Object.getOwnPropertyNames(e);for(const s of n){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}const a=Object.getOwnPropertySymbols(e);for(const s of a){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function gu(e){if(!qT(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!qT(n)||!n.hasOwnProperty("isPrototypeOf"))}function qT(e){return Object.prototype.toString.call(e)==="[object Object]"}function $T(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qa(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,s=e.length;a<s;a++)if(!qa(e[a],t[a],n))return!1;return!0}if(gu(e)&&gu(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!qa(e[u],t[u],n))return!1;return!0}let s=0;if(!a)s=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&s++;let o=0;for(const u in t)if((!a||t[u]!==void 0)&&(o++,o>s||!qa(e[u],t[u],n)))return!1;return s===o}return!1}function Ki(e){let t,n;const a=new Promise((s,o)=>{t=s,n=o});return a.status="pending",a.resolve=s=>{a.status="resolved",a.value=s,t(s),e?.(s)},a.reject=s=>{a.status="rejected",n(s)},a}function fa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}var N2="Invariant failed";function Dr(e,t){if(!e)throw new Error(N2)}const Tn="__root__",ir=0,Ya=1,Wi=2,Xi=3;function Lr(e){return _S(e.filter(t=>t!==void 0).join("/"))}function _S(e){return e.replace(/\/{2,}/g,"/")}function kS(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ha(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function au(e){return ha(kS(e))}function bu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function C2(e,t,n){return bu(e,n)===bu(t,n)}function O2(e){const{type:t,value:n}=e;if(t===ir)return n;const{prefixSegment:a,suffixSegment:s}=e;if(t===Ya){const o=n.substring(1);if(a&&s)return`${a}{$${o}}${s}`;if(a)return`${a}{$${o}}`;if(s)return`{$${o}}${s}`}if(t===Xi){const o=n.substring(1);return a&&s?`${a}{-$${o}}${s}`:a?`${a}{-$${o}}`:s?`{-$${o}}${s}`:`{-$${o}}`}if(t===Wi){if(a&&s)return`${a}{$}${s}`;if(a)return`${a}{$}`;if(s)return`{$}${s}`}return n}function I2({base:e,to:t,trailingSlash:n="never",parseCache:a}){let s=L1(e,a).slice();const o=Ou(t,a);s.length>1&&qy(s)?.value==="/"&&s.pop();for(let p=0,f=o.length;p<f;p++){const h=o[p],m=h.value;m==="/"?p?p===f-1&&s.push(h):s=[h]:m===".."?s.pop():m==="."||s.push(h)}s.length>1&&(qy(s).value==="/"?n==="never"&&s.pop():n==="always"&&s.push({type:ir,value:"/"}));const u=s.map(O2);return Lr(u)}const L1=(e,t)=>D1(e,t,!0),Ou=(e,t)=>D1(e,t,!1),D1=(e,t,n)=>{if(!e)return[];const a=t?.get(e);if(a)return a;const s=B2(e,n);return t?.set(e,s),s},L2=/^\$.{1,}$/,D2=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,M2=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,F2=/^\$$/,U2=/^(.*?)\{\$\}(.*)$/;function B2(e,t){e=_S(e);const n=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),n.push({type:ir,value:"/"})),!e)return n;const a=e.split("/").filter(Boolean);return n.push(...a.map(s=>{const o=!t&&s!==Tn&&s.slice(-1)==="_"?s.slice(0,-1):s,u=o.match(U2);if(u){const f=u[1],h=u[2];return{type:Wi,value:"$",prefixSegment:f||void 0,suffixSegment:h||void 0}}const c=o.match(M2);if(c){const f=c[1],h=c[2],m=c[3];return{type:Xi,value:h,prefixSegment:f||void 0,suffixSegment:m||void 0}}const p=o.match(D2);if(p){const f=p[1],h=p[2],m=p[3];return{type:Ya,value:""+h,prefixSegment:f||void 0,suffixSegment:m||void 0}}if(L2.test(o)){const f=o.substring(1);return{type:Ya,value:"$"+f,prefixSegment:void 0,suffixSegment:void 0}}return F2.test(o)?{type:Wi,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:ir,value:o.includes("%25")?o.split("%25").map(f=>decodeURI(f)).join("%25"):decodeURI(o)}})),e.slice(-1)==="/"&&(e=e.substring(1),n.push({type:ir,value:"/"})),n}function Hl({path:e,params:t,leaveWildcards:n,leaveParams:a,decodeCharMap:s,parseCache:o}){const u=Ou(e,o);function c(m){const b=t[m],y=typeof b=="string";return m==="*"||m==="_splat"?y?encodeURI(b):b:y?j2(b,s):b}let p=!1;const f={},h=Lr(u.map(m=>{if(m.type===ir)return m.value;if(m.type===Wi){f._splat=t._splat,f["*"]=t._splat;const b=m.prefixSegment||"",y=m.suffixSegment||"";if(!("_splat"in t))return p=!0,n?`${b}${m.value}${y}`:b||y?`${b}${y}`:void 0;const E=c("_splat");return n?`${b}${m.value}${E??""}${y}`:`${b}${E}${y}`}if(m.type===Ya){const b=m.value.substring(1);!p&&!(b in t)&&(p=!0),f[b]=t[b];const y=m.prefixSegment||"",E=m.suffixSegment||"";if(a){const x=c(m.value);return`${y}${m.value}${x??""}${E}`}return`${y}${c(b)??"undefined"}${E}`}if(m.type===Xi){const b=m.value.substring(1),y=m.prefixSegment||"",E=m.suffixSegment||"";if(!(b in t)||t[b]==null)return n?`${y}${b}${E}`:y||E?`${y}${E}`:void 0;if(f[b]=t[b],a){const x=c(m.value);return`${y}${m.value}${x??""}${E}`}return n?`${y}${b}${c(b)??""}${E}`:`${y}${c(b)??""}${E}`}return m.value}));return{usedParams:f,interpolatedPath:h,isMissingParams:p}}function j2(e,t){let n=encodeURIComponent(e);if(t)for(const[a,s]of t)n=n.replaceAll(a,s);return n}function $y(e,t,n){const a=P2(e,t,n);if(!(t.to&&!a))return a??{}}function P2(e,{to:t,fuzzy:n,caseSensitive:a},s){const o=t,u=L1(e.startsWith("/")?e:`/${e}`,s),c=Ou(o.startsWith("/")?o:`/${o}`,s),p={};return z2(u,c,p,n,a)?p:void 0}function z2(e,t,n,a,s){let o=0,u=0;for(;o<e.length||u<t.length;){const c=e[o],p=t[u];if(p){if(p.type===Wi){const f=e.slice(o);let h;if(p.prefixSegment||p.suffixSegment){if(!c)return!1;const m=p.prefixSegment||"",b=p.suffixSegment||"",y=c.value;if("prefixSegment"in p&&!y.startsWith(m)||"suffixSegment"in p&&!e[e.length-1]?.value.endsWith(b))return!1;let E=decodeURI(Lr(f.map(x=>x.value)));m&&E.startsWith(m)&&(E=E.slice(m.length)),b&&E.endsWith(b)&&(E=E.slice(0,E.length-b.length)),h=E}else h=decodeURI(Lr(f.map(m=>m.value)));return n["*"]=h,n._splat=h,!0}if(p.type===ir){if(p.value==="/"&&!c?.value){u++;continue}if(c){if(s){if(p.value!==c.value)return!1}else if(p.value.toLowerCase()!==c.value.toLowerCase())return!1;o++,u++;continue}else return!1}if(p.type===Ya){if(!c||c.value==="/")return!1;let f="",h=!1;if(p.prefixSegment||p.suffixSegment){const m=p.prefixSegment||"",b=p.suffixSegment||"",y=c.value;if(m&&!y.startsWith(m)||b&&!y.endsWith(b))return!1;let E=y;m&&E.startsWith(m)&&(E=E.slice(m.length)),b&&E.endsWith(b)&&(E=E.slice(0,E.length-b.length)),f=decodeURIComponent(E),h=!0}else f=decodeURIComponent(c.value),h=!0;h&&(n[p.value.substring(1)]=f,o++),u++;continue}if(p.type===Xi){if(!c){u++;continue}if(c.value==="/"){u++;continue}let f="",h=!1;if(p.prefixSegment||p.suffixSegment){const m=p.prefixSegment||"",b=p.suffixSegment||"",y=c.value;if((!m||y.startsWith(m))&&(!b||y.endsWith(b))){let E=y;m&&E.startsWith(m)&&(E=E.slice(m.length)),b&&E.endsWith(b)&&(E=E.slice(0,E.length-b.length)),f=decodeURIComponent(E),h=!0}}else{let m=!0;for(let b=u+1;b<t.length;b++){const y=t[b];if(y?.type===ir&&y.value===c.value){m=!1;break}if(y?.type===Ya||y?.type===Wi){e.length<t.length&&(m=!1);break}}m&&(f=decodeURIComponent(c.value),h=!0)}h&&(n[p.value.substring(1)]=f,o++),u++;continue}}if(o<e.length&&u>=t.length)return n["**"]=Lr(e.slice(o).map(f=>f.value)),!!a&&t[t.length-1]?.value!=="/";if(u<t.length&&o>=e.length){for(let f=u;f<t.length;f++)if(t[f]?.type!==Xi)return!1;break}break}return!0}const q2=.75,$2=1,G2=.5,H2=.4,V2=.25,Y2=.2,K2=.05,W2=.02,X2=.01,GT=2e-4,HT=1e-4;function VT(e,t){return e.prefixSegment&&e.suffixSegment?t+K2+GT*e.prefixSegment.length+HT*e.suffixSegment.length:e.prefixSegment?t+W2+GT*e.prefixSegment.length:e.suffixSegment?t+X2+HT*e.suffixSegment.length:t}function Z2(e){const t=[];return e.forEach((a,s)=>{if(a.isRoot||!a.path)return;const o=kS(a.fullPath);let u=Ou(o),c=0;for(;u.length>c+1&&u[c]?.value==="/";)c++;c>0&&(u=u.slice(c));let p=0,f=!1;const h=u.map((m,b)=>{if(m.value==="/")return q2;if(m.type===ir)return $2;let y;m.type===Ya?y=G2:m.type===Xi?(y=H2,p++):y=V2;for(let E=b+1;E<u.length;E++){const x=u[E];if(x.type===ir&&x.value!=="/")return f=!0,VT(m,y+Y2)}return VT(m,y)});t.push({child:a,trimmed:o,parsed:u,index:s,scores:h,optionalParamCount:p,hasStaticAfter:f})}),t.sort((a,s)=>{const o=Math.min(a.scores.length,s.scores.length);for(let u=0;u<o;u++)if(a.scores[u]!==s.scores[u])return s.scores[u]-a.scores[u];if(a.scores.length!==s.scores.length){if(a.optionalParamCount!==s.optionalParamCount){if(a.hasStaticAfter===s.hasStaticAfter)return a.optionalParamCount-s.optionalParamCount;if(a.hasStaticAfter&&!s.hasStaticAfter)return-1;if(!a.hasStaticAfter&&s.hasStaticAfter)return 1}return s.scores.length-a.scores.length}for(let u=0;u<o;u++)if(a.parsed[u].value!==s.parsed[u].value)return a.parsed[u].value>s.parsed[u].value?1:-1;return a.index-s.index}).map((a,s)=>(a.child.rank=s,a.child))}function Q2({routeTree:e,initRoute:t}){const n={},a={},s=u=>{u.forEach((c,p)=>{t?.(c,p);const f=n[c.id];if(Dr(!f,`Duplicate routes found with id: ${String(c.id)}`),n[c.id]=c,!c.isRoot&&c.path){const m=ha(c.fullPath);(!a[m]||c.fullPath.endsWith("/"))&&(a[m]=c)}const h=c.children;h?.length&&s(h)})};s([e]);const o=Z2(Object.values(n));return{routesById:n,routesByPath:a,flatRoutes:o}}function sr(e){return!!e?.isNotFound}function J2(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const yu="tsr-scroll-restoration-v1_3",eF=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function tF(){const e=J2();if(!e)return null;const t=e.getItem(yu);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=za(a,n)||n,e.setItem(yu,JSON.stringify(n)))}}const Vl=tF(),Gy=e=>e.state.__TSR_key||e.href;function nF(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Su=!1;function M1({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:s,location:o}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const c=t||window.history.state?.__TSR_key,p=u[c];Su=!0;e:{if(a&&p&&Object.keys(p).length>0){for(const m in p){const b=p[m];if(m==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:n});else if(m){const y=document.querySelector(m);y&&(y.scrollLeft=b.scrollX,y.scrollTop=b.scrollY)}}break e}const f=(o??window.location).hash.split("#",2)[1];if(f){const m=window.history.state?.__hashScrollIntoViewOptions??!0;if(m){const b=document.getElementById(f);b&&b.scrollIntoView(m)}break e}const h={top:0,left:0,behavior:n};if(window.scrollTo(h),s)for(const m of s){if(m==="window")continue;const b=typeof m=="function"?m():document.querySelector(m);b&&b.scrollTo(h)}}Su=!1}function rF(e,t){if(!Vl&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Vl))return;e.isScrollRestorationSetup=!0,Su=!1;const a=e.options.getScrollRestorationKey||Gy;window.history.scrollRestoration="manual";const s=o=>{if(Su||!e.isScrollRestoring)return;let u="";if(o.target===document||o.target===window)u="window";else{const p=o.target.getAttribute("data-scroll-restoration-id");p?u=`[data-scroll-restoration-id="${p}"]`:u=nF(o.target)}const c=a(e.state.location);Vl.set(p=>{const f=p[c]||={},h=f[u]||={};if(u==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(u){const m=document.querySelector(u);m&&(h.scrollX=m.scrollLeft||0,h.scrollY=m.scrollTop||0)}return p})};typeof document<"u"&&document.addEventListener("scroll",eF(s,100),!0),e.subscribe("onRendered",o=>{const u=a(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(M1({storageKey:yu,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Vl.set(c=>(c[u]||={},c)))})}function aF(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function iF(e,t=String){const n=new URLSearchParams;for(const a in e){const s=e[a];s!==void 0&&n.set(a,t(s))}return n.toString()}function Sp(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function sF(e){const t=new URLSearchParams(e),n={};for(const[a,s]of t.entries()){const o=n[a];o==null?n[a]=Sp(s):Array.isArray(o)?o.push(Sp(s)):n[a]=[o,Sp(s)]}return n}const oF=uF(JSON.parse),lF=cF(JSON.stringify,JSON.parse);function uF(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=sF(t);for(const a in n){const s=n[a];if(typeof s=="string")try{n[a]=e(s)}catch{}}return n}}function cF(e,t){const n=typeof t=="function";function a(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const o=iF(s,a);return o?`?${o}`:""}}function F1(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function rr(e){return e instanceof Response&&!!e.options}function dF(e){const t=new Map;let n,a;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,a&&(a.next=o,o.prev=a)):(o.next.prev=void 0,n=o.next,o.next=void 0,a&&(o.prev=a,a.next=o)),a=o)};return{get(o){const u=t.get(o);if(u)return s(u),u.value},set(o,u){if(t.size>=e&&n){const p=n;t.delete(p.key),p.next&&(n=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const c=t.get(o);if(c)c.value=u,s(c);else{const p={key:o,value:u,prev:a};a&&(a.next=p),a=p,n||(n=p),t.set(o,p)}}}}const iu=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Iu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),U1=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Dr(n.options.notFoundComponent);const a=e.matches.find(s=>s.routeId===n.id);Dr(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,s=>({...s,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,U1(e,t))},ua=(e,t,n)=>{if(!(!rr(n)&&!sr(n))){if(rr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=rr(n)?"redirected":"notFound";e.updateMatch(t.id,s=>({...s,status:a,isFetching:!1,error:n})),sr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw rr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(U1(e,n),n)}},B1=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Qs=(e,t,n,a)=>{const{id:s,routeId:o}=e.matches[t],u=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,ua(e,e.router.getMatch(s),n);try{u.options.onError?.(n)}catch(c){n=c,ua(e,e.router.getMatch(s),n)}e.updateMatch(s,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},pF=(e,t,n,a)=>{const s=e.router.getMatch(t),o=e.matches[n-1]?.id,u=o?e.router.getMatch(o):void 0;if(e.router.isShell()){s.ssr=t===Tn;return}if(u?.ssr===!1){s.ssr=!1;return}const c=y=>y===!0&&u?.ssr==="data-only"?"data-only":y,p=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){s.ssr=c(p);return}if(typeof a.options.ssr!="function"){s.ssr=c(a.options.ssr);return}const{search:f,params:h}=s,m={search:Yl(f,s.searchError),params:Yl(h,s.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:Yl(y.search,y.searchError),params:Yl(y.params,y.paramsError),ssr:y.ssr}))},b=a.options.ssr(m);if(fa(b))return b.then(y=>{s.ssr=c(y??p)});s.ssr=c(b??p)},j1=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Iu(e,t)&&(n.options.loader||n.options.beforeLoad||q1(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{iu(e)},s);a._nonReactive.pendingTimeout=u}},fF=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;j1(e,t,n,a);const s=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&ua(e,o,o.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(s):s()},hF=(e,t,n,a)=>{const s=e.router.getMatch(t),o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Ki(()=>{o?.resolve()});const{paramsError:u,searchError:c}=s;u&&Qs(e,n,u,"PARSE_PARAMS"),c&&Qs(e,n,c,"VALIDATE_SEARCH"),j1(e,t,a,s);const p=new AbortController,f=e.matches[n-1]?.id,b={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...s.__routeContext};let y=!1;const E=()=>{y||(y=!0,e.updateMatch(t,C=>({...C,isFetching:"beforeLoad",fetchCount:C.fetchCount+1,abortController:p,context:b})))},x=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!a.options.beforeLoad){lo(()=>{E(),x()});return}s._nonReactive.beforeLoadPromise=Ki();const{search:w,params:_,cause:R}=s,A=Iu(e,t),N={search:w,abortController:p,params:_,preload:A,context:b,location:e.location,navigate:C=>e.router.navigate({...C,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":R,matches:e.matches,...e.router.options.additionalContext},D=C=>{if(C===void 0){lo(()=>{E(),x()});return}(rr(C)||sr(C))&&(E(),Qs(e,n,C,"BEFORE_LOAD")),lo(()=>{E(),e.updateMatch(t,j=>({...j,__beforeLoadContext:C,context:{...j.context,...C}})),x()})};let k;try{if(k=a.options.beforeLoad(N),fa(k))return E(),k.catch(C=>{Qs(e,n,C,"BEFORE_LOAD")}).then(D)}catch(C){E(),Qs(e,n,C,"BEFORE_LOAD")}D(k)},mF=(e,t)=>{const{id:n,routeId:a}=e.matches[t],s=e.router.looseRoutesById[a],o=()=>{if(e.router.isServer){const p=pF(e,n,t,s);if(fa(p))return p.then(c)}return c()},u=()=>hF(e,n,t,s),c=()=>{if(B1(e,n))return;const p=fF(e,n,s);return fa(p)?p.then(u):u()};return o()},uo=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([o,u,c])=>{const p=o?.meta,f=o?.links,h=o?.scripts,m=o?.styles;return{meta:p,links:f,headScripts:h,headers:c,scripts:u,styles:m}})},P1=(e,t,n,a)=>{const s=e.matchPromises[n-1],{params:o,loaderDeps:u,abortController:c,context:p,cause:f}=e.router.getMatch(t),h=Iu(e,t);return{params:o,deps:u,preload:!!h,parentMatchPromise:s,abortController:c,context:p,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:h?"preload":f,route:a,...e.router.options.additionalContext}},YT=async(e,t,n,a)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&z1(a);const o=a.options.loader?.(P1(e,t,n,a)),u=a.options.loader&&fa(o);if(!!(u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,m=>({...m,isFetching:"loader"})),a.options.loader){const m=u?await o:o;ua(e,e.router.getMatch(t),m),m!==void 0&&e.updateMatch(t,b=>({...b,loaderData:m}))}a._lazyPromise&&await a._lazyPromise;const p=uo(e,t,a),f=p?await p:void 0,h=s._nonReactive.minPendingPromise;h&&await h,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,m=>({...m,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(o){let u=o;const c=s._nonReactive.minPendingPromise;c&&await c,ua(e,e.router.getMatch(t),o);try{a.options.onError?.(o)}catch(h){u=h,ua(e,e.router.getMatch(t),h)}const p=uo(e,t,a),f=p?await p:void 0;e.updateMatch(t,h=>({...h,error:u,status:"error",isFetching:!1,...f}))}}catch(s){const o=e.router.getMatch(t);if(o){const u=uo(e,t,a);if(u){const c=await u;e.updateMatch(t,p=>({...p,...c}))}o._nonReactive.loaderPromise=void 0}ua(e,o,s)}},gF=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let s=!1,o=!1;const u=e.router.looseRoutesById[a];if(B1(e,n)){if(e.router.isServer){const f=uo(e,n,u);if(f){const h=await f;e.updateMatch(n,m=>({...m,...h}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const h=e.router.getMatch(n);h.error&&ua(e,h,h.error)}else{const h=Date.now()-f.updatedAt,m=Iu(e,n),b=m?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,y=u.options.shouldReload,E=typeof y=="function"?y(P1(e,n,t,u)):y,x=!!m&&!e.router.state.matches.some(A=>A.id===n),w=e.router.getMatch(n);w._nonReactive.loaderPromise=Ki(),x!==w.preload&&e.updateMatch(n,A=>({...A,preload:x}));const{status:_,invalid:R}=w;if(s=_==="success"&&(R||(E??h>b)),!(m&&u.options.preload===!1))if(s&&!e.sync)o=!0,(async()=>{try{await YT(e,n,t,u);const A=e.router.getMatch(n);A._nonReactive.loaderPromise?.resolve(),A._nonReactive.loadPromise?.resolve(),A._nonReactive.loaderPromise=void 0}catch(A){rr(A)&&await e.router.navigate(A.options)}})();else if(_!=="success"||s&&e.sync)await YT(e,n,t,u);else{const A=uo(e,n,u);if(A){const N=await A;e.updateMatch(n,D=>({...D,...N}))}}}}const c=e.router.getMatch(n);o||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,o||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;const p=o?c.isFetching:!1;return p!==c.isFetching||c.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:p,invalid:!1})),e.router.getMatch(n)):c};async function KT(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&iu(t);try{for(let s=0;s<t.matches.length;s++){const o=mF(t,s);fa(o)&&await o}const n=t.firstBadMatchIndex??t.matches.length;for(let s=0;s<n;s++)t.matchPromises.push(gF(t,s));await Promise.all(t.matchPromises);const a=iu(t);fa(a)&&await a}catch(n){if(sr(n)&&!t.preload){const a=iu(t);throw fa(a)&&await a,n}if(rr(n))throw n}return t.matches}async function z1(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of $1){const s=e.options[a]?.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Yl(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function q1(e){for(const t of $1)if(e.options[t]?.preload)return!0;return!1}const $1=["component","errorComponent","pendingComponent","notFoundComponent"];function bF(e){return{input:({url:t})=>{for(const n of e)t=G1(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=H1(e[n],t);return t}}}function yF(e){const t=au(e.basepath),n=`/${t}`,a=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const c=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return c===s?u.pathname="/":c.startsWith(o)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=Lr(["/",t,u.pathname]),u)}}function G1(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function H1(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function $a(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,s=t?.href!==n.href,o=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:s,hashChanged:o}}class SF{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const a=this.options,s=this.basepath??a?.basepath??"/",o=this.basepath===void 0,u=a?.rewrite;this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(b=>[encodeURIComponent(b),b])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=R2())),this.origin=this.options.origin,this.origin||(this.isServer?this.origin="http://localhost":this.origin=window.origin),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new zy(EF(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),rF(this));let c=!1;const p=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==p||u!==f){this.basepath=p;const b=[];au(p)!==""&&b.push(yF({basepath:p})),f&&b.push(f),this.rewrite=b.length===0?void 0:b.length===1?b[0]:bF(b),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:a,flatRoutes:s}=Q2({routeTree:this.routeTree,initRoute:(u,c)=>{u.init({originalIndex:c})}});this.routesById=n,this.routesByPath=a,this.flatRoutes=s;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(n,a)=>{const s={eventType:n,fn:a};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const s=({href:p,state:f})=>{const h=new URL(p,this.origin),m=G1(this.rewrite,h),b=this.options.parseSearch(m.search),y=this.options.stringifySearch(b);m.search=y;const E=m.href.replace(m.origin,""),{pathname:x,hash:w}=m;return{href:E,publicHref:p,url:m.href,pathname:x,searchStr:y,search:zn(a?.search,b),hash:w.split("#").reverse()[0]??"",state:zn(a?.state,f)}},o=s(n),{__tempLocation:u,__tempKey:c}=o.state;if(u&&(!c||c===this.tempLocationKey)){const p=s(u);return p.state.key=o.state.key,p.state.__TSR_key=o.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:o}}return o},this.resolvePathWithBase=(n,a)=>I2({base:n,to:_S(a),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(n,a,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},s):this.matchRoutesInternal(n,a),this.parsePathnameCache=dF(1e3),this.getMatchedRoutes=(n,a)=>xF({pathname:n,routePathname:a,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=n=>{const a=(o={})=>{const u=o._fromLocation||this.latestLocation,c=this.matchRoutes(u,{_buildLocation:!0}),p=qy(c);o.from;const f=o.unsafeRelative==="path"?u.pathname:o.from??p.fullPath,h=this.resolvePathWithBase(f,"."),m=p.search,b={...p.params},y=o.to?this.resolvePathWithBase(h,`${o.to}`):this.resolvePathWithBase(h,"."),E=o.params===!1||o.params===null?{}:(o.params??!0)===!0?b:Object.assign(b,za(o.params,b)),x=Hl({path:y,params:E,parseCache:this.parsePathnameCache}).interpolatedPath,w=this.matchRoutes(x,void 0,{_buildLocation:!0}).map(L=>this.looseRoutesById[L.routeId]);if(Object.keys(E).length>0)for(const L of w){const q=L.options.params?.stringify??L.options.stringifyParams;q&&Object.assign(E,q(E))}const _=Hl({path:y,params:E,leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath;let R=m;if(n._includeValidateSearch&&this.options.search?.strict){const L={};w.forEach(q=>{if(q.options.validateSearch)try{Object.assign(L,Hy(q.options.validateSearch,{...L,...R}))}catch{}}),R=L}R=wF({search:R,dest:o,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),R=zn(m,R);const A=this.options.stringifySearch(R),N=o.hash===!0?u.hash:o.hash?za(o.hash,u.hash):void 0,D=N?`#${N}`:"";let k=o.state===!0?u.state:o.state?za(o.state,u.state):{};k=zn(u.state,k);const C=`${_}${A}${D}`,j=new URL(C,this.origin),F=H1(this.rewrite,j);return{publicHref:F.pathname+F.search+F.hash,href:C,url:F.href,pathname:_,search:R,searchStr:A,state:k,hash:N??"",unmaskOnReload:o.unmaskOnReload}},s=(o={},u)=>{const c=a(o);let p=u?a(u):void 0;if(!p){let f={};const h=this.options.routeMasks?.find(m=>{const b=$y(c.pathname,{to:m.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return b?(f=b,!0):!1});if(h){const{from:m,...b}=h;u={from:n.from,...b,params:f},p=a(u)}}return p&&(c.maskedLocation=p),c};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...s})=>{const o=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(h=>{s.state[h]=this.latestLocation.state[h]});const f=qa(s.state,this.latestLocation.state);return p.forEach(h=>{delete s.state[h]}),f},u=ha(this.latestLocation.href)===ha(s.href),c=this.commitLocationPromise;if(this.commitLocationPromise=Ki(()=>{c?.resolve()}),u&&o())this.load();else{let{maskedLocation:p,hashScrollIntoView:f,...h}=s;p&&(h={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:a})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:u,href:c,...p}={})=>{if(c){const h=this.history.location.state.__TSR_index,m=mu(c,{__TSR_index:n?h:h+1});p.to=m.pathname,p.search=this.options.parseSearch(m.search),p.hash=m.hash.slice(1)}const f=this.buildLocation({...p,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:a,hashScrollIntoView:s,ignoreBlocker:u})},this.navigate=({to:n,reloadDocument:a,href:s,...o})=>{if(!a&&s)try{new URL(`${s}`),a=!0}catch{}return a?(s||(s=this.buildLocation({to:n,...o}).url),o.replace?window.location.replace(s):window.location.href=s,Promise.resolve()):this.buildAndCommitLocation({...o,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),s=o=>{try{return encodeURI(decodeURI(o))}catch{return o}};if(au(s(this.latestLocation.href))!==au(s(a.href)))throw F1({href:a.href})}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(s=>!n.some(o=>o.id===s.id))}))},this.load=async n=>{let a,s,o;for(o=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,p=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...$a({resolvedLocation:p,location:c})}),this.emit({type:"onBeforeLoad",...$a({resolvedLocation:p,location:c})}),await KT({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let f,h,m;lo(()=>{this.__store.setState(b=>{const y=b.matches,E=b.pendingMatches||b.matches;return f=y.filter(x=>!E.some(w=>w.id===x.id)),h=E.filter(x=>!y.some(w=>w.id===x.id)),m=y.filter(x=>E.some(w=>w.id===x.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...f.filter(x=>x.status!=="error")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[h,"onEnter"],[m,"onStay"]].forEach(([b,y])=>{b.forEach(E=>{this.looseRoutesById[E.routeId].options[y]?.(E)})})})}})}catch(c){rr(c)?(a=c,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):sr(c)&&(s=c),this.__store.setState(p=>({...p,statusCode:a?a.status:s?404:p.matches.some(f=>f.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(u=>({...u,statusCode:404}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,u=this.state.resolvedLocation,c=typeof a.types=="function"?a.types($a({resolvedLocation:u,location:o})):a.types;s={update:n,types:c}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,a)=>{const s=this.state.pendingMatches?.some(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";s&&this.__store.setState(o=>({...o,[s]:o[s]?.map(u=>u.id===n?a(u):u)}))},this.getMatch=n=>{const a=s=>s.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(a),cachedMatches:s.cachedMatches.map(a),pendingMatches:s.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options);let s=a.url;this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),n.options.href=a.href,n.headers.set("Location",s)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(o=>!a(o))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const s=this.looseRoutesById[a.routeId];if(!s.options.loader)return!0;const o=(a.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=z1,this.preloadRoute=async n=>{const a=this.buildLocation(n);let s=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),u=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);lo(()=>{s.forEach(c=>{u.has(c.id)||this.__store.setState(p=>({...p,cachedMatches:[...p.cachedMatches,c]}))})});try{return s=await KT({router:this,matches:s,location:a,preload:!0,updateMatch:(c,p)=>{o.has(c)?s=s.map(f=>f.id===c?p(f):f):this.updateMatch(c,p)}}),s}catch(c){if(rr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:a});sr(c)||console.error(c);return}},this.matchRoute=(n,a)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(a?.pending&&this.state.status!=="pending")return!1;const c=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,p=$y(c.pathname,{...a,to:o.pathname},this.parsePathnameCache);return!p||n.params&&!qa(p,n.params,{partial:!0})?!1:p&&(a?.includeSearch??!0)?qa(c.search,o.search,{partial:!0})?p:!1:p},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??lF,parseSearch:t.parseSearch??oF}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:a,matchedRoutes:s,routeParams:o}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let u=!1;(a?a.path!=="/"&&o["**"]:ha(t.pathname))&&(this.options.notFoundRoute?s.push(this.options.notFoundRoute):u=!0);const c=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let h=s.length-1;h>=0;h--){const m=s[h];if(m.children)return m.id}return Tn}})(),p=[],f=h=>h?.id?h.context??this.options.context??void 0:this.options.context??void 0;return s.forEach((h,m)=>{const b=p[m-1],[y,E,x]=(()=>{const z=b?.search??t.search,Z=b?._strictSearch??void 0;try{const H=Hy(h.options.validateSearch,{...z})??void 0;return[{...z,...H},{...Z,...H},void 0]}catch(H){let K=H;if(H instanceof vu||(K=new vu(H.message,{cause:H})),n?.throwOnError)throw K;return[z,{},K]}})(),w=h.options.loaderDeps?.({search:y})??"",_=w?JSON.stringify(w):"",{interpolatedPath:R,usedParams:A}=Hl({path:h.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),N=Hl({path:h.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+_,D=this.getMatch(N),k=this.state.matches.find(z=>z.routeId===h.id),C=D?._strictParams??A;let j;if(!D){const z=h.options.params?.parse??h.options.parseParams;if(z)try{Object.assign(C,z(C))}catch(Z){if(j=new vF(Z.message,{cause:Z}),n?.throwOnError)throw j}}Object.assign(o,C);const F=k?"stay":"enter";let L;if(D)L={...D,cause:F,params:k?zn(k.params,o):o,_strictParams:C,search:zn(k?k.search:D.search,y),_strictSearch:E};else{const z=h.options.loader||h.options.beforeLoad||h.lazyFn||q1(h)?"pending":"success";L={id:N,index:m,routeId:h.id,params:k?zn(k.params,o):o,_strictParams:C,pathname:R,updatedAt:Date.now(),search:k?zn(k.search,y):y,_strictSearch:E,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:j,__routeContext:void 0,_nonReactive:{loadPromise:Ki()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:k?zn(k.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}n?.preload||(L.globalNotFound=c===h.id),L.searchError=x;const q=f(b);L.context={...q,...L.__routeContext,...L.__beforeLoadContext},p.push(L)}),p.forEach((h,m)=>{const b=this.looseRoutesById[h.routeId];if(!this.getMatch(h.id)&&n?._buildLocation!==!0){const E=p[m-1],x=f(E);if(b.options.context){const w={deps:h.loaderDeps,params:h.params,context:x??{},location:t,navigate:_=>this.navigate({..._,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:p};h.__routeContext=b.options.context(w)??void 0}h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}}),p}}class vu extends Error{}class vF extends Error{}function EF(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Hy(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new vu("Async validation not supported");if(n.issues)throw new vu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function xF({pathname:e,routePathname:t,caseSensitive:n,routesByPath:a,routesById:s,flatRoutes:o,parseCache:u}){let c={};const p=ha(e),f=y=>$y(p,{to:y.fullPath,caseSensitive:y.options?.caseSensitive??n,fuzzy:!0},u);let h=t!==void 0?a[t]:void 0;if(h)c=f(h);else{let y;for(const E of o){const x=f(E);if(x)if(E.path!=="/"&&x["**"])y||(y={foundRoute:E,routeParams:x});else{h=E,c=x;break}}!h&&y&&(h=y.foundRoute,c=y.routeParams)}let m=h||s[Tn];const b=[m];for(;m.parentRoute;)m=m.parentRoute,b.push(m);return b.reverse(),{matchedRoutes:b,routeParams:c,foundRoute:h}}function wF({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const s=n.reduce((c,p)=>{const f=[];if("search"in p.options)p.options.search?.middlewares&&f.push(...p.options.search.middlewares);else if(p.options.preSearchFilters||p.options.postSearchFilters){const h=({search:m,next:b})=>{let y=m;"preSearchFilters"in p.options&&p.options.preSearchFilters&&(y=p.options.preSearchFilters.reduce((x,w)=>w(x),m));const E=b(y);return"postSearchFilters"in p.options&&p.options.postSearchFilters?p.options.postSearchFilters.reduce((x,w)=>w(x),E):E};f.push(h)}if(a&&p.options.validateSearch){const h=({search:m,next:b})=>{const y=b(m);try{return{...y,...Hy(p.options.validateSearch,y)??void 0}}catch{return y}};f.push(h)}return c.concat(f)},[])??[],o=({search:c})=>t.search?t.search===!0?c:za(t.search,c):{};s.push(o);const u=(c,p)=>{if(c>=s.length)return p;const f=s[c];return f({search:p,next:m=>u(c+1,m)})};return u(0,e)}const TF="Error preloading route! ☝️";class V1{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,s=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Tn:this.parentRoute||Dr(!1);let o=s?Tn:a?.path;o&&o!=="/"&&(o=kS(o));const u=a?.id||o;let c=s?Tn:Lr([this.parentRoute.id===Tn?"":this.parentRoute.id,u]);o===Tn&&(o="/"),c!==Tn&&(c=Lr(["/",c]));const p=c===Tn?"/":Lr([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=p,this._to=p},this.clone=n=>{this._path=n._path,this._id=n._id,this._fullPath=n._fullPath,this._to=n._to,this.options.getParentRoute=n.options.getParentRoute,this.children=n.children},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class AF extends V1{constructor(t){super(t)}}function NS(e){const t=e.errorComponent??Lu;return v.jsx(RF,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?U.createElement(t,{error:n,reset:a}):e.children})}class RF extends U.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Lu({error:e}){const[t,n]=U.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function _F({children:e,fallback:t=null}){return kF()?v.jsx(Bt.Fragment,{children:e}):v.jsx(Bt.Fragment,{children:t})}function kF(){return Bt.useSyncExternalStore(NF,()=>!0,()=>!1)}function NF(){return()=>{}}var vp={exports:{}},Ep={},xp={exports:{}},wp={};/**
|
|
49
|
+
`).replace(eM,"")}function jw(r,i){return i=Bw(i),Bw(r)===i}function Ke(r,i,l,d,g,S){switch(l){case"children":typeof d=="string"?i==="body"||i==="textarea"&&d===""||li(r,d):(typeof d=="number"||typeof d=="bigint")&&i!=="body"&&li(r,""+d);break;case"className":Io(r,"class",d);break;case"tabIndex":Io(r,"tabindex",d);break;case"dir":case"role":case"viewBox":case"width":case"height":Io(r,l,d);break;case"style":jv(r,d,S);break;case"data":if(i!=="object"){Io(r,"data",d);break}case"src":case"href":if(d===""&&(i!=="a"||l!=="href")){r.removeAttribute(l);break}if(d==null||typeof d=="function"||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(l);break}d=Do(""+d),r.setAttribute(l,d);break;case"action":case"formAction":if(typeof d=="function"){r.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof S=="function"&&(l==="formAction"?(i!=="input"&&Ke(r,i,"name",g.name,g,null),Ke(r,i,"formEncType",g.formEncType,g,null),Ke(r,i,"formMethod",g.formMethod,g,null),Ke(r,i,"formTarget",g.formTarget,g,null)):(Ke(r,i,"encType",g.encType,g,null),Ke(r,i,"method",g.method,g,null),Ke(r,i,"target",g.target,g,null)));if(d==null||typeof d=="symbol"||typeof d=="boolean"){r.removeAttribute(l);break}d=Do(""+d),r.setAttribute(l,d);break;case"onClick":d!=null&&(r.onclick=hr);break;case"onScroll":d!=null&&Ie("scroll",r);break;case"onScrollEnd":d!=null&&Ie("scrollend",r);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"multiple":r.multiple=d&&typeof d!="function"&&typeof d!="symbol";break;case"muted":r.muted=d&&typeof d!="function"&&typeof d!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(d==null||typeof d=="function"||typeof d=="boolean"||typeof d=="symbol"){r.removeAttribute("xlink:href");break}l=Do(""+d),r.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":d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,""+d):r.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":d&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,""):r.removeAttribute(l);break;case"capture":case"download":d===!0?r.setAttribute(l,""):d!==!1&&d!=null&&typeof d!="function"&&typeof d!="symbol"?r.setAttribute(l,d):r.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":d!=null&&typeof d!="function"&&typeof d!="symbol"&&!isNaN(d)&&1<=d?r.setAttribute(l,d):r.removeAttribute(l);break;case"rowSpan":case"start":d==null||typeof d=="function"||typeof d=="symbol"||isNaN(d)?r.removeAttribute(l):r.setAttribute(l,d);break;case"popover":Ie("beforetoggle",r),Ie("toggle",r),Oo(r,"popover",d);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",d);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",d);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",d);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",d);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",d);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",d);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",d);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",d);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",d);break;case"is":Oo(r,"is",d);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=kL.get(l)||l,Oo(r,l,d))}}function Kd(r,i,l,d,g,S){switch(l){case"style":jv(r,d,S);break;case"dangerouslySetInnerHTML":if(d!=null){if(typeof d!="object"||!("__html"in d))throw Error(a(61));if(l=d.__html,l!=null){if(g.children!=null)throw Error(a(60));r.innerHTML=l}}break;case"children":typeof d=="string"?li(r,d):(typeof d=="number"||typeof d=="bigint")&&li(r,""+d);break;case"onScroll":d!=null&&Ie("scroll",r);break;case"onScrollEnd":d!=null&&Ie("scrollend",r);break;case"onClick":d!=null&&(r.onclick=hr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Cv.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(g=l.endsWith("Capture"),i=l.slice(2,g?l.length-7:void 0),S=r[tn]||null,S=S!=null?S[l]:null,typeof S=="function"&&r.removeEventListener(i,S,g),typeof d=="function")){typeof S!="function"&&S!==null&&(l in r?r[l]=null:r.hasAttribute(l)&&r.removeAttribute(l)),r.addEventListener(i,d,g);break e}l in r?r[l]=d:d===!0?r.setAttribute(l,""):Oo(r,l,d)}}}function Ut(r,i,l){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ie("error",r),Ie("load",r);var d=!1,g=!1,S;for(S in l)if(l.hasOwnProperty(S)){var T=l[S];if(T!=null)switch(S){case"src":d=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ke(r,i,S,T,l,null)}}g&&Ke(r,i,"srcSet",l.srcSet,l,null),d&&Ke(r,i,"src",l.src,l,null);return;case"input":Ie("invalid",r);var O=S=T=g=null,P=null,X=null;for(d in l)if(l.hasOwnProperty(d)){var re=l[d];if(re!=null)switch(d){case"name":g=re;break;case"type":T=re;break;case"checked":P=re;break;case"defaultChecked":X=re;break;case"value":S=re;break;case"defaultValue":O=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(a(137,i));break;default:Ke(r,i,d,re,l,null)}}Mv(r,S,O,P,X,T,g,!1);return;case"select":Ie("invalid",r),d=T=S=null;for(g in l)if(l.hasOwnProperty(g)&&(O=l[g],O!=null))switch(g){case"value":S=O;break;case"defaultValue":T=O;break;case"multiple":d=O;default:Ke(r,i,g,O,l,null)}i=S,l=T,r.multiple=!!d,i!=null?oi(r,!!d,i,!1):l!=null&&oi(r,!!d,l,!0);return;case"textarea":Ie("invalid",r),S=g=d=null;for(T in l)if(l.hasOwnProperty(T)&&(O=l[T],O!=null))switch(T){case"value":d=O;break;case"defaultValue":g=O;break;case"children":S=O;break;case"dangerouslySetInnerHTML":if(O!=null)throw Error(a(91));break;default:Ke(r,i,T,O,l,null)}Uv(r,d,g,S);return;case"option":for(P in l)if(l.hasOwnProperty(P)&&(d=l[P],d!=null))switch(P){case"selected":r.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Ke(r,i,P,d,l,null)}return;case"dialog":Ie("beforetoggle",r),Ie("toggle",r),Ie("cancel",r),Ie("close",r);break;case"iframe":case"object":Ie("load",r);break;case"video":case"audio":for(d=0;d<zs.length;d++)Ie(zs[d],r);break;case"image":Ie("error",r),Ie("load",r);break;case"details":Ie("toggle",r);break;case"embed":case"source":case"link":Ie("error",r),Ie("load",r);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(d=l[X],d!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,i));default:Ke(r,i,X,d,l,null)}return;default:if(lc(i)){for(re in l)l.hasOwnProperty(re)&&(d=l[re],d!==void 0&&Kd(r,i,re,d,l,void 0));return}}for(O in l)l.hasOwnProperty(O)&&(d=l[O],d!=null&&Ke(r,i,O,d,l,null))}function tM(r,i,l,d){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,S=null,T=null,O=null,P=null,X=null,re=null;for(ee in l){var se=l[ee];if(l.hasOwnProperty(ee)&&se!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":P=se;default:d.hasOwnProperty(ee)||Ke(r,i,ee,null,d,se)}}for(var Q in d){var ee=d[Q];if(se=l[Q],d.hasOwnProperty(Q)&&(ee!=null||se!=null))switch(Q){case"type":S=ee;break;case"name":g=ee;break;case"checked":X=ee;break;case"defaultChecked":re=ee;break;case"value":T=ee;break;case"defaultValue":O=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,i));break;default:ee!==se&&Ke(r,i,Q,ee,d,se)}}sc(r,T,O,P,X,re,S,g);return;case"select":ee=T=O=Q=null;for(S in l)if(P=l[S],l.hasOwnProperty(S)&&P!=null)switch(S){case"value":break;case"multiple":ee=P;default:d.hasOwnProperty(S)||Ke(r,i,S,null,d,P)}for(g in d)if(S=d[g],P=l[g],d.hasOwnProperty(g)&&(S!=null||P!=null))switch(g){case"value":Q=S;break;case"defaultValue":O=S;break;case"multiple":T=S;default:S!==P&&Ke(r,i,g,S,d,P)}i=O,l=T,d=ee,Q!=null?oi(r,!!l,Q,!1):!!d!=!!l&&(i!=null?oi(r,!!l,i,!0):oi(r,!!l,l?[]:"",!1));return;case"textarea":ee=Q=null;for(O in l)if(g=l[O],l.hasOwnProperty(O)&&g!=null&&!d.hasOwnProperty(O))switch(O){case"value":break;case"children":break;default:Ke(r,i,O,null,d,g)}for(T in d)if(g=d[T],S=l[T],d.hasOwnProperty(T)&&(g!=null||S!=null))switch(T){case"value":Q=g;break;case"defaultValue":ee=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(a(91));break;default:g!==S&&Ke(r,i,T,g,d,S)}Fv(r,Q,ee);return;case"option":for(var he in l)if(Q=l[he],l.hasOwnProperty(he)&&Q!=null&&!d.hasOwnProperty(he))switch(he){case"selected":r.selected=!1;break;default:Ke(r,i,he,null,d,Q)}for(P in d)if(Q=d[P],ee=l[P],d.hasOwnProperty(P)&&Q!==ee&&(Q!=null||ee!=null))switch(P){case"selected":r.selected=Q&&typeof Q!="function"&&typeof Q!="symbol";break;default:Ke(r,i,P,Q,d,ee)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Se in l)Q=l[Se],l.hasOwnProperty(Se)&&Q!=null&&!d.hasOwnProperty(Se)&&Ke(r,i,Se,null,d,Q);for(X in d)if(Q=d[X],ee=l[X],d.hasOwnProperty(X)&&Q!==ee&&(Q!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(Q!=null)throw Error(a(137,i));break;default:Ke(r,i,X,Q,d,ee)}return;default:if(lc(i)){for(var We in l)Q=l[We],l.hasOwnProperty(We)&&Q!==void 0&&!d.hasOwnProperty(We)&&Kd(r,i,We,void 0,d,Q);for(re in d)Q=d[re],ee=l[re],!d.hasOwnProperty(re)||Q===ee||Q===void 0&&ee===void 0||Kd(r,i,re,Q,d,ee);return}}for(var V in l)Q=l[V],l.hasOwnProperty(V)&&Q!=null&&!d.hasOwnProperty(V)&&Ke(r,i,V,null,d,Q);for(se in d)Q=d[se],ee=l[se],!d.hasOwnProperty(se)||Q===ee||Q==null&&ee==null||Ke(r,i,se,Q,d,ee)}function Pw(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function nM(){if(typeof performance.getEntriesByType=="function"){for(var r=0,i=0,l=performance.getEntriesByType("resource"),d=0;d<l.length;d++){var g=l[d],S=g.transferSize,T=g.initiatorType,O=g.duration;if(S&&O&&Pw(T)){for(T=0,O=g.responseEnd,d+=1;d<l.length;d++){var P=l[d],X=P.startTime;if(X>O)break;var re=P.transferSize,se=P.initiatorType;re&&Pw(se)&&(P=P.responseEnd,T+=re*(P<O?1:(O-X)/(P-X)))}if(--d,i+=8*(S+T)/(g.duration/1e3),r++,10<r)break}}if(0<r)return i/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var Wd=null,Xd=null;function Nl(r){return r.nodeType===9?r:r.ownerDocument}function zw(r){switch(r){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function qw(r,i){if(r===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&i==="foreignObject"?0:r}function Zd(r,i){return r==="textarea"||r==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function rM(){var r=window.event;return r&&r.type==="popstate"?r===Qd?!1:(Qd=r,!0):(Qd=null,!1)}var $w=typeof setTimeout=="function"?setTimeout:void 0,aM=typeof clearTimeout=="function"?clearTimeout:void 0,Gw=typeof Promise=="function"?Promise:void 0,iM=typeof queueMicrotask=="function"?queueMicrotask:typeof Gw<"u"?function(r){return Gw.resolve(null).then(r).catch(sM)}:$w;function sM(r){setTimeout(function(){throw r})}function na(r){return r==="head"}function Hw(r,i){var l=i,d=0;do{var g=l.nextSibling;if(r.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"||l==="/&"){if(d===0){r.removeChild(g),ji(i);return}d--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")d++;else if(l==="html")$s(r.ownerDocument.documentElement);else if(l==="head"){l=r.ownerDocument.head,$s(l);for(var S=l.firstChild;S;){var T=S.nextSibling,O=S.nodeName;S[os]||O==="SCRIPT"||O==="STYLE"||O==="LINK"&&S.rel.toLowerCase()==="stylesheet"||l.removeChild(S),S=T}}else l==="body"&&$s(r.ownerDocument.body);l=g}while(l);ji(i)}function Vw(r,i){var l=r;r=0;do{var d=l.nextSibling;if(l.nodeType===1?i?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(i?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),d&&d.nodeType===8)if(l=d.data,l==="/$"){if(r===0)break;r--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||r++;l=d}while(l)}function Jd(r){var i=r.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var l=i;switch(i=i.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Jd(l),ac(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}r.removeChild(l)}}function oM(r,i,l,d){for(;r.nodeType===1;){var g=l;if(r.nodeName.toLowerCase()!==i.toLowerCase()){if(!d&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(d){if(!r[os])switch(i){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(S=r.getAttribute("rel"),S==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(S!==g.rel||r.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||r.getAttribute("title")!==(g.title==null?null:g.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(S=r.getAttribute("src"),(S!==(g.src==null?null:g.src)||r.getAttribute("type")!==(g.type==null?null:g.type)||r.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&S&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(i==="input"&&r.type==="hidden"){var S=g.name==null?null:""+g.name;if(g.type==="hidden"&&r.getAttribute("name")===S)return r}else return r;if(r=jn(r.nextSibling),r===null)break}return null}function lM(r,i,l){if(i==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!l||(r=jn(r.nextSibling),r===null))return null;return r}function Yw(r,i){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!i||(r=jn(r.nextSibling),r===null))return null;return r}function ep(r){return r.data==="$?"||r.data==="$~"}function tp(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function uM(r,i){var l=r.ownerDocument;if(r.data==="$~")r._reactRetry=i;else if(r.data!=="$?"||l.readyState!=="loading")i();else{var d=function(){i(),l.removeEventListener("DOMContentLoaded",d)};l.addEventListener("DOMContentLoaded",d),r._reactRetry=d}}function jn(r){for(;r!=null;r=r.nextSibling){var i=r.nodeType;if(i===1||i===3)break;if(i===8){if(i=r.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return r}var np=null;function Kw(r){r=r.nextSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="/$"||l==="/&"){if(i===0)return jn(r.nextSibling);i--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||i++}r=r.nextSibling}return null}function Ww(r){r=r.previousSibling;for(var i=0;r;){if(r.nodeType===8){var l=r.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(i===0)return r;i--}else l!=="/$"&&l!=="/&"||i++}r=r.previousSibling}return null}function Xw(r,i,l){switch(i=Nl(l),r){case"html":if(r=i.documentElement,!r)throw Error(a(452));return r;case"head":if(r=i.head,!r)throw Error(a(453));return r;case"body":if(r=i.body,!r)throw Error(a(454));return r;default:throw Error(a(451))}}function $s(r){for(var i=r.attributes;i.length;)r.removeAttributeNode(i[0]);ac(r)}var Pn=new Map,Zw=new Set;function Cl(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Cr=ne.d;ne.d={f:cM,r:dM,D:pM,C:fM,L:hM,m:mM,X:bM,S:gM,M:yM};function cM(){var r=Cr.f(),i=El();return r||i}function dM(r){var i=ai(r);i!==null&&i.tag===5&&i.type==="form"?hx(i):Cr.r(r)}var Fi=typeof document>"u"?null:document;function Qw(r,i,l){var d=Fi;if(d&&typeof i=="string"&&i){var g=In(i);g='link[rel="'+r+'"][href="'+g+'"]',typeof l=="string"&&(g+='[crossorigin="'+l+'"]'),Zw.has(g)||(Zw.add(g),r={rel:r,crossOrigin:l,href:i},d.querySelector(g)===null&&(i=d.createElement("link"),Ut(i,"link",r),kt(i),d.head.appendChild(i)))}}function pM(r){Cr.D(r),Qw("dns-prefetch",r,null)}function fM(r,i){Cr.C(r,i),Qw("preconnect",r,i)}function hM(r,i,l){Cr.L(r,i,l);var d=Fi;if(d&&r&&i){var g='link[rel="preload"][as="'+In(i)+'"]';i==="image"&&l&&l.imageSrcSet?(g+='[imagesrcset="'+In(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(g+='[imagesizes="'+In(l.imageSizes)+'"]')):g+='[href="'+In(r)+'"]';var S=g;switch(i){case"style":S=Ui(r);break;case"script":S=Bi(r)}Pn.has(S)||(r=m({rel:"preload",href:i==="image"&&l&&l.imageSrcSet?void 0:r,as:i},l),Pn.set(S,r),d.querySelector(g)!==null||i==="style"&&d.querySelector(Gs(S))||i==="script"&&d.querySelector(Hs(S))||(i=d.createElement("link"),Ut(i,"link",r),kt(i),d.head.appendChild(i)))}}function mM(r,i){Cr.m(r,i);var l=Fi;if(l&&r){var d=i&&typeof i.as=="string"?i.as:"script",g='link[rel="modulepreload"][as="'+In(d)+'"][href="'+In(r)+'"]',S=g;switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":S=Bi(r)}if(!Pn.has(S)&&(r=m({rel:"modulepreload",href:r},i),Pn.set(S,r),l.querySelector(g)===null)){switch(d){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Hs(S)))return}d=l.createElement("link"),Ut(d,"link",r),kt(d),l.head.appendChild(d)}}}function gM(r,i,l){Cr.S(r,i,l);var d=Fi;if(d&&r){var g=ii(d).hoistableStyles,S=Ui(r);i=i||"default";var T=g.get(S);if(!T){var O={loading:0,preload:null};if(T=d.querySelector(Gs(S)))O.loading=5;else{r=m({rel:"stylesheet",href:r,"data-precedence":i},l),(l=Pn.get(S))&&rp(r,l);var P=T=d.createElement("link");kt(P),Ut(P,"link",r),P._p=new Promise(function(X,re){P.onload=X,P.onerror=re}),P.addEventListener("load",function(){O.loading|=1}),P.addEventListener("error",function(){O.loading|=2}),O.loading|=4,Ol(T,i,d)}T={type:"stylesheet",instance:T,count:1,state:O},g.set(S,T)}}}function bM(r,i){Cr.X(r,i);var l=Fi;if(l&&r){var d=ii(l).hoistableScripts,g=Bi(r),S=d.get(g);S||(S=l.querySelector(Hs(g)),S||(r=m({src:r,async:!0},i),(i=Pn.get(g))&&ap(r,i),S=l.createElement("script"),kt(S),Ut(S,"link",r),l.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(g,S))}}function yM(r,i){Cr.M(r,i);var l=Fi;if(l&&r){var d=ii(l).hoistableScripts,g=Bi(r),S=d.get(g);S||(S=l.querySelector(Hs(g)),S||(r=m({src:r,async:!0,type:"module"},i),(i=Pn.get(g))&&ap(r,i),S=l.createElement("script"),kt(S),Ut(S,"link",r),l.head.appendChild(S)),S={type:"script",instance:S,count:1,state:null},d.set(g,S))}}function Jw(r,i,l,d){var g=(g=ce.current)?Cl(g):null;if(!g)throw Error(a(446));switch(r){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(i=Ui(l.href),l=ii(g).hoistableStyles,d=l.get(i),d||(d={type:"style",instance:null,count:0,state:null},l.set(i,d)),d):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){r=Ui(l.href);var S=ii(g).hoistableStyles,T=S.get(r);if(T||(g=g.ownerDocument||g,T={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},S.set(r,T),(S=g.querySelector(Gs(r)))&&!S._p&&(T.instance=S,T.state.loading=5),Pn.has(r)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},Pn.set(r,l),S||SM(g,r,l,T.state))),i&&d===null)throw Error(a(528,""));return T}if(i&&d!==null)throw Error(a(529,""));return null;case"script":return i=l.async,l=l.src,typeof l=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Bi(l),l=ii(g).hoistableScripts,d=l.get(i),d||(d={type:"script",instance:null,count:0,state:null},l.set(i,d)),d):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,r))}}function Ui(r){return'href="'+In(r)+'"'}function Gs(r){return'link[rel="stylesheet"]['+r+"]"}function eT(r){return m({},r,{"data-precedence":r.precedence,precedence:null})}function SM(r,i,l,d){r.querySelector('link[rel="preload"][as="style"]['+i+"]")?d.loading=1:(i=r.createElement("link"),d.preload=i,i.addEventListener("load",function(){return d.loading|=1}),i.addEventListener("error",function(){return d.loading|=2}),Ut(i,"link",l),kt(i),r.head.appendChild(i))}function Bi(r){return'[src="'+In(r)+'"]'}function Hs(r){return"script[async]"+r}function tT(r,i,l){if(i.count++,i.instance===null)switch(i.type){case"style":var d=r.querySelector('style[data-href~="'+In(l.href)+'"]');if(d)return i.instance=d,kt(d),d;var g=m({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return d=(r.ownerDocument||r).createElement("style"),kt(d),Ut(d,"style",g),Ol(d,l.precedence,r),i.instance=d;case"stylesheet":g=Ui(l.href);var S=r.querySelector(Gs(g));if(S)return i.state.loading|=4,i.instance=S,kt(S),S;d=eT(l),(g=Pn.get(g))&&rp(d,g),S=(r.ownerDocument||r).createElement("link"),kt(S);var T=S;return T._p=new Promise(function(O,P){T.onload=O,T.onerror=P}),Ut(S,"link",d),i.state.loading|=4,Ol(S,l.precedence,r),i.instance=S;case"script":return S=Bi(l.src),(g=r.querySelector(Hs(S)))?(i.instance=g,kt(g),g):(d=l,(g=Pn.get(S))&&(d=m({},l),ap(d,g)),r=r.ownerDocument||r,g=r.createElement("script"),kt(g),Ut(g,"link",d),r.head.appendChild(g),i.instance=g);case"void":return null;default:throw Error(a(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(d=i.instance,i.state.loading|=4,Ol(d,l.precedence,r));return i.instance}function Ol(r,i,l){for(var d=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=d.length?d[d.length-1]:null,S=g,T=0;T<d.length;T++){var O=d[T];if(O.dataset.precedence===i)S=O;else if(S!==g)break}S?S.parentNode.insertBefore(r,S.nextSibling):(i=l.nodeType===9?l.head:l,i.insertBefore(r,i.firstChild))}function rp(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.title==null&&(r.title=i.title)}function ap(r,i){r.crossOrigin==null&&(r.crossOrigin=i.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=i.referrerPolicy),r.integrity==null&&(r.integrity=i.integrity)}var Il=null;function nT(r,i,l){if(Il===null){var d=new Map,g=Il=new Map;g.set(l,d)}else g=Il,d=g.get(l),d||(d=new Map,g.set(l,d));if(d.has(r))return d;for(d.set(r,null),l=l.getElementsByTagName(r),g=0;g<l.length;g++){var S=l[g];if(!(S[os]||S[Lt]||r==="link"&&S.getAttribute("rel")==="stylesheet")&&S.namespaceURI!=="http://www.w3.org/2000/svg"){var T=S.getAttribute(i)||"";T=r+T;var O=d.get(T);O?O.push(S):d.set(T,[S])}}return d}function rT(r,i,l){r=r.ownerDocument||r,r.head.insertBefore(l,i==="title"?r.querySelector("head > title"):null)}function vM(r,i,l){if(l===1||i.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return r=i.disabled,typeof i.precedence=="string"&&r==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function aT(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function EM(r,i,l,d){if(l.type==="stylesheet"&&(typeof d.media!="string"||matchMedia(d.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var g=Ui(d.href),S=i.querySelector(Gs(g));if(S){i=S._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(r.count++,r=Ll.bind(r),i.then(r,r)),l.state.loading|=4,l.instance=S,kt(S);return}S=i.ownerDocument||i,d=eT(d),(g=Pn.get(g))&&rp(d,g),S=S.createElement("link"),kt(S);var T=S;T._p=new Promise(function(O,P){T.onload=O,T.onerror=P}),Ut(S,"link",d),l.instance=S}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(l,i),(i=l.state.preload)&&(l.state.loading&3)===0&&(r.count++,l=Ll.bind(r),i.addEventListener("load",l),i.addEventListener("error",l))}}var ip=0;function xM(r,i){return r.stylesheets&&r.count===0&&Ml(r,r.stylesheets),0<r.count||0<r.imgCount?function(l){var d=setTimeout(function(){if(r.stylesheets&&Ml(r,r.stylesheets),r.unsuspend){var S=r.unsuspend;r.unsuspend=null,S()}},6e4+i);0<r.imgBytes&&ip===0&&(ip=62500*nM());var g=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&Ml(r,r.stylesheets),r.unsuspend)){var S=r.unsuspend;r.unsuspend=null,S()}},(r.imgBytes>ip?50:800)+i);return r.unsuspend=l,function(){r.unsuspend=null,clearTimeout(d),clearTimeout(g)}}:null}function Ll(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ml(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var Dl=null;function Ml(r,i){r.stylesheets=null,r.unsuspend!==null&&(r.count++,Dl=new Map,i.forEach(wM,r),Dl=null,Ll.call(r))}function wM(r,i){if(!(i.state.loading&4)){var l=Dl.get(r);if(l)var d=l.get(null);else{l=new Map,Dl.set(r,l);for(var g=r.querySelectorAll("link[data-precedence],style[data-precedence]"),S=0;S<g.length;S++){var T=g[S];(T.nodeName==="LINK"||T.getAttribute("media")!=="not all")&&(l.set(T.dataset.precedence,T),d=T)}d&&l.set(null,d)}g=i.instance,T=g.getAttribute("data-precedence"),S=l.get(T)||d,S===d&&l.set(null,g),l.set(T,g),this.count++,d=Ll.bind(this),g.addEventListener("load",d),g.addEventListener("error",d),S?S.parentNode.insertBefore(g,S.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(g,r.firstChild)),i.state.loading|=4}}var Vs={$$typeof:A,Provider:null,Consumer:null,_currentValue:ae,_currentValue2:ae,_threadCount:0};function TM(r,i,l,d,g,S,T,O,P){this.tag=1,this.containerInfo=r,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=ec(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ec(0),this.hiddenUpdates=ec(null),this.identifierPrefix=d,this.onUncaughtError=g,this.onCaughtError=S,this.onRecoverableError=T,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=P,this.incompleteTransitions=new Map}function iT(r,i,l,d,g,S,T,O,P,X,re,se){return r=new TM(r,i,l,T,P,X,re,se,O),i=1,S===!0&&(i|=24),S=bn(3,null,null,i),r.current=S,S.stateNode=r,i=Bc(),i.refCount++,r.pooledCache=i,i.refCount++,S.memoizedState={element:d,isDehydrated:l,cache:i},qc(S),r}function sT(r){return r?(r=mi,r):mi}function oT(r,i,l,d,g,S){g=sT(g),d.context===null?d.context=g:d.pendingContext=g,d=Hr(i),d.payload={element:l},S=S===void 0?null:S,S!==null&&(d.callback=S),l=Vr(r,d,i),l!==null&&(ln(l,r,i),Ts(l,r,i))}function lT(r,i){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var l=r.retryLane;r.retryLane=l!==0&&l<i?l:i}}function sp(r,i){lT(r,i),(r=r.alternate)&&lT(r,i)}function uT(r){if(r.tag===13||r.tag===31){var i=Ta(r,67108864);i!==null&&ln(i,r,67108864),sp(r,67108864)}}function cT(r){if(r.tag===13||r.tag===31){var i=xn();i=tc(i);var l=Ta(r,i);l!==null&&ln(l,r,i),sp(r,i)}}var Fl=!0;function AM(r,i,l,d){var g=G.T;G.T=null;var S=ne.p;try{ne.p=2,op(r,i,l,d)}finally{ne.p=S,G.T=g}}function RM(r,i,l,d){var g=G.T;G.T=null;var S=ne.p;try{ne.p=8,op(r,i,l,d)}finally{ne.p=S,G.T=g}}function op(r,i,l,d){if(Fl){var g=lp(d);if(g===null)Yd(r,i,d,Ul,l),pT(r,d);else if(kM(g,r,i,l,d))d.stopPropagation();else if(pT(r,d),i&4&&-1<_M.indexOf(r)){for(;g!==null;){var S=ai(g);if(S!==null)switch(S.tag){case 3:if(S=S.stateNode,S.current.memoizedState.isDehydrated){var T=Xn(S.pendingLanes);if(T!==0){var O=S;for(O.pendingLanes|=2,O.entangledLanes|=2;T;){var P=1<<31-$e(T);O.entanglements[1]|=P,T&=~P}er(S),(qe&6)===0&&(Sl=ke()+500,Ps(0))}}break;case 31:case 13:O=Ta(S,2),O!==null&&ln(O,S,2),El(),sp(S,2)}if(S=lp(d),S===null&&Yd(r,i,d,Ul,l),S===g)break;g=S}g!==null&&d.stopPropagation()}else Yd(r,i,d,null,l)}}function lp(r){return r=cc(r),up(r)}var Ul=null;function up(r){if(Ul=null,r=ri(r),r!==null){var i=o(r);if(i===null)r=null;else{var l=i.tag;if(l===13){if(r=u(i),r!==null)return r;r=null}else if(l===31){if(r=c(i),r!==null)return r;r=null}else if(l===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;r=null}else i!==r&&(r=null)}}return Ul=r,null}function dT(r){switch(r){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(Ge()){case te:return 2;case le:return 8;case fe:case Ee:return 32;case Fe:return 268435456;default:return 32}default:return 32}}var cp=!1,ra=null,aa=null,ia=null,Ys=new Map,Ks=new Map,sa=[],_M="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 pT(r,i){switch(r){case"focusin":case"focusout":ra=null;break;case"dragenter":case"dragleave":aa=null;break;case"mouseover":case"mouseout":ia=null;break;case"pointerover":case"pointerout":Ys.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":Ks.delete(i.pointerId)}}function Ws(r,i,l,d,g,S){return r===null||r.nativeEvent!==S?(r={blockedOn:i,domEventName:l,eventSystemFlags:d,nativeEvent:S,targetContainers:[g]},i!==null&&(i=ai(i),i!==null&&uT(i)),r):(r.eventSystemFlags|=d,i=r.targetContainers,g!==null&&i.indexOf(g)===-1&&i.push(g),r)}function kM(r,i,l,d,g){switch(i){case"focusin":return ra=Ws(ra,r,i,l,d,g),!0;case"dragenter":return aa=Ws(aa,r,i,l,d,g),!0;case"mouseover":return ia=Ws(ia,r,i,l,d,g),!0;case"pointerover":var S=g.pointerId;return Ys.set(S,Ws(Ys.get(S)||null,r,i,l,d,g)),!0;case"gotpointercapture":return S=g.pointerId,Ks.set(S,Ws(Ks.get(S)||null,r,i,l,d,g)),!0}return!1}function fT(r){var i=ri(r.target);if(i!==null){var l=o(i);if(l!==null){if(i=l.tag,i===13){if(i=u(l),i!==null){r.blockedOn=i,_v(r.priority,function(){cT(l)});return}}else if(i===31){if(i=c(l),i!==null){r.blockedOn=i,_v(r.priority,function(){cT(l)});return}}else if(i===3&&l.stateNode.current.memoizedState.isDehydrated){r.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Bl(r){if(r.blockedOn!==null)return!1;for(var i=r.targetContainers;0<i.length;){var l=lp(r.nativeEvent);if(l===null){l=r.nativeEvent;var d=new l.constructor(l.type,l);uc=d,l.target.dispatchEvent(d),uc=null}else return i=ai(l),i!==null&&uT(i),r.blockedOn=l,!1;i.shift()}return!0}function hT(r,i,l){Bl(r)&&l.delete(i)}function NM(){cp=!1,ra!==null&&Bl(ra)&&(ra=null),aa!==null&&Bl(aa)&&(aa=null),ia!==null&&Bl(ia)&&(ia=null),Ys.forEach(hT),Ks.forEach(hT)}function jl(r,i){r.blockedOn===i&&(r.blockedOn=null,cp||(cp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,NM)))}var Pl=null;function mT(r){Pl!==r&&(Pl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pl===r&&(Pl=null);for(var i=0;i<r.length;i+=3){var l=r[i],d=r[i+1],g=r[i+2];if(typeof d!="function"){if(up(d||l)===null)continue;break}var S=ai(l);S!==null&&(r.splice(i,3),i-=3,ld(S,{pending:!0,data:g,method:l.method,action:d},d,g))}}))}function ji(r){function i(P){return jl(P,r)}ra!==null&&jl(ra,r),aa!==null&&jl(aa,r),ia!==null&&jl(ia,r),Ys.forEach(i),Ks.forEach(i);for(var l=0;l<sa.length;l++){var d=sa[l];d.blockedOn===r&&(d.blockedOn=null)}for(;0<sa.length&&(l=sa[0],l.blockedOn===null);)fT(l),l.blockedOn===null&&sa.shift();if(l=(r.ownerDocument||r).$$reactFormReplay,l!=null)for(d=0;d<l.length;d+=3){var g=l[d],S=l[d+1],T=g[tn]||null;if(typeof S=="function")T||mT(l);else if(T){var O=null;if(S&&S.hasAttribute("formAction")){if(g=S,T=S[tn]||null)O=T.formAction;else if(up(g)!==null)continue}else O=T.action;typeof O=="function"?l[d+1]=O:(l.splice(d,3),d-=3),mT(l)}}}function gT(){function r(S){S.canIntercept&&S.info==="react-transition"&&S.intercept({handler:function(){return new Promise(function(T){return g=T})},focusReset:"manual",scroll:"manual"})}function i(){g!==null&&(g(),g=null),d||setTimeout(l,20)}function l(){if(!d&&!navigation.transition){var S=navigation.currentEntry;S&&S.url!=null&&navigation.navigate(S.url,{state:S.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var d=!1,g=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(l,100),function(){d=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),g!==null&&(g(),g=null)}}}function dp(r){this._internalRoot=r}zl.prototype.render=dp.prototype.render=function(r){var i=this._internalRoot;if(i===null)throw Error(a(409));var l=i.current,d=xn();oT(l,d,r,i,null,null)},zl.prototype.unmount=dp.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var i=r.containerInfo;oT(r.current,2,null,r,null,null),El(),i[ni]=null}};function zl(r){this._internalRoot=r}zl.prototype.unstable_scheduleHydration=function(r){if(r){var i=Rv();r={blockedOn:null,target:r,priority:i};for(var l=0;l<sa.length&&i!==0&&i<sa[l].priority;l++);sa.splice(l,0,r),l===0&&fT(r)}};var bT=t.version;if(bT!=="19.2.0")throw Error(a(527,bT,"19.2.0"));ne.findDOMNode=function(r){var i=r._reactInternals;if(i===void 0)throw typeof r.render=="function"?Error(a(188)):(r=Object.keys(r).join(","),Error(a(268,r)));return r=f(i),r=r!==null?h(r):null,r=r===null?null:r.stateNode,r};var CM={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var ql=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ql.isDisabled&&ql.supportsFiber)try{dt=ql.inject(CM),Ze=ql}catch{}}return Zs.createRoot=function(r,i){if(!s(r))throw Error(a(299));var l=!1,d="",g=Tx,S=Ax,T=Rx;return i!=null&&(i.unstable_strictMode===!0&&(l=!0),i.identifierPrefix!==void 0&&(d=i.identifierPrefix),i.onUncaughtError!==void 0&&(g=i.onUncaughtError),i.onCaughtError!==void 0&&(S=i.onCaughtError),i.onRecoverableError!==void 0&&(T=i.onRecoverableError)),i=iT(r,1,!1,null,null,l,d,null,g,S,T,gT),r[ni]=i.current,Vd(r),new dp(i)},Zs.hydrateRoot=function(r,i,l){if(!s(r))throw Error(a(299));var d=!1,g="",S=Tx,T=Ax,O=Rx,P=null;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(S=l.onUncaughtError),l.onCaughtError!==void 0&&(T=l.onCaughtError),l.onRecoverableError!==void 0&&(O=l.onRecoverableError),l.formState!==void 0&&(P=l.formState)),i=iT(r,1,!0,i,l??null,d,g,P,S,T,O,gT),i.context=sT(null),l=i.current,d=xn(),d=tc(d),g=Hr(d),g.callback=null,Vr(l,g,d),l=d,i.current.lanes=l,ss(i,l),er(i),r[ni]=i.current,Vd(r),new zl(i)},Zs.version="19.2.0",Zs}var _T;function jM(){if(_T)return hp.exports;_T=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),hp.exports=BM(),hp.exports}var PM=jM(),Ji=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},zM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},qM=class{#e=zM;#t=!1;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}},ja=new qM;function $M(e){setTimeout(e,0)}var Ha=typeof window>"u"||"Deno"in globalThis;function Wt(){}function GM(e,t){return typeof e=="function"?e(t):e}function My(e){return typeof e=="number"&&e>=0&&e!==1/0}function v1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function da(e,t){return typeof e=="function"?e(t):e}function qn(e,t){return typeof e=="function"?e(t):e}function kT(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:u,stale:c}=e;if(u){if(a){if(t.queryHash!==xS(u,t.options))return!1}else if(!mo(t.queryKey,u))return!1}if(n!=="all"){const p=t.isActive();if(n==="active"&&!p||n==="inactive"&&p)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||s&&s!==t.state.fetchStatus||o&&!o(t))}function NT(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Va(t.options.mutationKey)!==Va(o))return!1}else if(!mo(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function xS(e,t){return(t?.queryKeyHashFn||Va)(e)}function Va(e){return JSON.stringify(e,(t,n)=>Fy(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function mo(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>mo(e[n],t[n])):!1}var HM=Object.prototype.hasOwnProperty;function E1(e,t){if(e===t)return e;const n=CT(e)&&CT(t);if(!n&&!(Fy(e)&&Fy(t)))return t;const s=(n?e:Object.keys(e)).length,o=n?t:Object.keys(t),u=o.length,c=n?new Array(u):{};let p=0;for(let f=0;f<u;f++){const h=n?f:o[f],m=e[h],b=t[h];if(m===b){c[h]=m,(n?f<s:HM.call(e,h))&&p++;continue}if(m===null||b===null||typeof m!="object"||typeof b!="object"){c[h]=b;continue}const y=E1(m,b);c[h]=y,y===m&&p++}return s===u&&p===s?e:c}function pu(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function CT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Fy(e){if(!OT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!OT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function OT(e){return Object.prototype.toString.call(e)==="[object Object]"}function VM(e){return new Promise(t=>{ja.setTimeout(t,e)})}function Uy(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?E1(e,t):t}function YM(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function KM(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var wS=Symbol();function x1(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===wS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function w1(e,t){return typeof e=="function"?e(...t):!!e}var WM=class extends Ji{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ha&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(t=>{typeof t=="boolean"?this.setFocused(t):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}},TS=new WM;function By(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var XM=$M;function ZM(){let e=[],t=0,n=c=>{c()},a=c=>{c()},s=XM;const o=c=>{t?e.push(c):s(()=>{n(c)})},u=()=>{const c=e;e=[],c.length&&s(()=>{a(()=>{c.forEach(p=>{n(p)})})})};return{batch:c=>{let p;t++;try{p=c()}finally{t--,t||u()}return p},batchCalls:c=>(...p)=>{o(()=>{c(...p)})},schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{a=c},setScheduler:c=>{s=c}}}var Tt=ZM(),QM=class extends Ji{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ha&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#e!==e&&(this.#e=e,this.listeners.forEach(n=>{n(e)}))}isOnline(){return this.#e}},fu=new QM;function JM(e){return Math.min(1e3*2**e,3e4)}function T1(e){return(e??"online")==="online"?fu.isOnline():!0}var jy=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function A1(e){let t=!1,n=0,a;const s=By(),o=()=>s.status!=="pending",u=x=>{if(!o()){const w=new jy(x);b(w),e.onCancel?.(w)}},c=()=>{t=!0},p=()=>{t=!1},f=()=>TS.isFocused()&&(e.networkMode==="always"||fu.isOnline())&&e.canRun(),h=()=>T1(e.networkMode)&&e.canRun(),m=x=>{o()||(a?.(),s.resolve(x))},b=x=>{o()||(a?.(),s.reject(x))},y=()=>new Promise(x=>{a=w=>{(o()||f())&&x(w)},e.onPause?.()}).then(()=>{a=void 0,o()||e.onContinue?.()}),E=()=>{if(o())return;let x;const w=n===0?e.initialPromise:void 0;try{x=w??e.fn()}catch(_){x=Promise.reject(_)}Promise.resolve(x).then(m).catch(_=>{if(o())return;const R=e.retry??(Ha?0:3),A=e.retryDelay??JM,N=typeof A=="function"?A(n,_):A,D=R===!0||typeof R=="number"&&n<R||typeof R=="function"&&R(n,_);if(t||!D){b(_);return}n++,e.onFail?.(n,_),VM(N).then(()=>f()?void 0:y()).then(()=>{t?b(_):E()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(a?.(),s),cancelRetry:c,continueRetry:p,canStart:h,start:()=>(h()?E():y().then(E),s)}}var R1=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),My(this.gcTime)&&(this.#e=ja.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ha?1/0:300*1e3))}clearGcTimeout(){this.#e&&(ja.clearTimeout(this.#e),this.#e=void 0)}},e2=class extends R1{#e;#t;#n;#a;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#a=e.client,this.#n=this.#a.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=IT(this.options),this.state=e.state??this.#e,this.scheduleGc()}get meta(){return this.options.meta}get promise(){return this.#r?.promise}setOptions(e){if(this.options={...this.#s,...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=IT(this.options);t.data!==void 0&&(this.setData(t.data,{updatedAt:t.dataUpdatedAt,manual:!0}),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=Uy(this.state.data,e,this.options);return this.#i({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#i({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Wt).catch(Wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.#e)}isActive(){return this.observers.some(e=>qn(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===wS||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>da(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!v1(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#r?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#r?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#r&&(this.#o?this.#r.cancel({revert:!0}):this.#r.cancelRetry()),this.scheduleGc()),this.#n.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#i({type:"invalidate"})}async fetch(e,t){if(this.state.fetchStatus!=="idle"&&this.#r?.status()!=="rejected"){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#r)return this.#r.continueRetry(),this.#r.promise}if(e&&this.setOptions(e),!this.options.queryFn){const c=this.observers.find(p=>p.options.queryFn);c&&this.setOptions(c.options)}const n=new AbortController,a=c=>{Object.defineProperty(c,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const c=x1(this.options,t),f=(()=>{const h={client:this.#a,queryKey:this.queryKey,meta:this.meta};return a(h),h})();return this.#o=!1,this.options.persister?this.options.persister(c,f,this):c(f)},u=(()=>{const c={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#a,state:this.state,fetchFn:s};return a(c),c})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#i({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=A1({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:c=>{c instanceof jy&&c.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(c,p)=>{this.#i({type:"failed",failureCount:c,error:p})},onPause:()=>{this.#i({type:"pause"})},onContinue:()=>{this.#i({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const c=await this.#r.start();if(c===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(c),this.#n.config.onSuccess?.(c,this),this.#n.config.onSettled?.(c,this.state.error,this),c}catch(c){if(c instanceof jy){if(c.silent)return this.#r.promise;if(c.revert){if(this.state.data===void 0)throw c;return this.state.data}}throw this.#i({type:"error",error:c}),this.#n.config.onError?.(c,this),this.#n.config.onSettled?.(this.state.data,c,this),c}finally{this.scheduleGc()}}#i(e){const t=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,..._1(n.data,this.options),fetchMeta:e.meta??null};case"success":const a={...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?a:void 0,a;case"error":const s=e.error;return{...n,error:s,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Tt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function _1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:T1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function IT(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var t2=class extends Ji{constructor(e,t){super(),this.options=t,this.#e=e,this.#i=null,this.#o=By(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#a=void 0;#r;#s;#o;#i;#m;#p;#f;#u;#c;#l;#h=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),LT(this.#t,this.options)?this.#d():this.updateResult(),this.#S())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Py(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Py(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#v(),this.#E(),this.#t.removeObserver(this)}setOptions(e){const t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof qn(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#x(),this.#t.setOptions(this.options),t._defaulted&&!pu(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const a=this.hasListeners();a&&DT(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),a&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(t.enabled,this.#t)||da(this.options.staleTime,this.#t)!==da(t.staleTime,this.#t))&&this.#g();const s=this.#b();a&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(t.enabled,this.#t)||s!==this.#l)&&this.#y(s)}getOptimisticResult(e){const t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return r2(this,n)&&(this.#a=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#a}trackResult(e,t){return new Proxy(e,{get:(n,a)=>(this.trackProp(a),t?.(a),a==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#o.status==="pending"&&this.#o.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(n,a))})}trackProp(e){this.#h.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#d({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#a))}#d(e){this.#x();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Wt)),t}#g(){this.#v();const e=da(this.options.staleTime,this.#t);if(Ha||this.#a.isStale||!My(e))return;const n=v1(this.#a.dataUpdatedAt,e)+1;this.#u=ja.setTimeout(()=>{this.#a.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#E(),this.#l=e,!(Ha||qn(this.options.enabled,this.#t)===!1||!My(this.#l)||this.#l===0)&&(this.#c=ja.setInterval(()=>{(this.options.refetchIntervalInBackground||TS.isFocused())&&this.#d()},this.#l))}#S(){this.#g(),this.#y(this.#b())}#v(){this.#u&&(ja.clearTimeout(this.#u),this.#u=void 0)}#E(){this.#c&&(ja.clearInterval(this.#c),this.#c=void 0)}createResult(e,t){const n=this.#t,a=this.options,s=this.#a,o=this.#r,u=this.#s,p=e!==n?e.state:this.#n,{state:f}=e;let h={...f},m=!1,b;if(t._optimisticResults){const j=this.hasListeners(),F=!j&<(e,t),L=j&&DT(e,n,t,a);(F||L)&&(h={...h,..._1(f.data,e.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:y,errorUpdatedAt:E,status:x}=h;b=h.data;let w=!1;if(t.placeholderData!==void 0&&b===void 0&&x==="pending"){let j;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(j=s.data,w=!0):j=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,j!==void 0&&(x="success",b=Uy(s?.data,j,t),m=!0)}if(t.select&&b!==void 0&&!w)if(s&&b===o?.data&&t.select===this.#m)b=this.#p;else try{this.#m=t.select,b=t.select(b),b=Uy(s?.data,b,t),this.#p=b,this.#i=null}catch(j){this.#i=j}this.#i&&(y=this.#i,b=this.#p,E=Date.now(),x="error");const _=h.fetchStatus==="fetching",R=x==="pending",A=x==="error",N=R&&_,D=b!==void 0,C={status:x,fetchStatus:h.fetchStatus,isPending:R,isSuccess:x==="success",isError:A,isInitialLoading:N,isLoading:N,data:b,dataUpdatedAt:h.dataUpdatedAt,error:y,errorUpdatedAt:E,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>p.dataUpdateCount||h.errorUpdateCount>p.errorUpdateCount,isFetching:_,isRefetching:_&&!R,isLoadingError:A&&!D,isPaused:h.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:A&&D,isStale:AS(e,t),refetch:this.refetch,promise:this.#o,isEnabled:qn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const j=q=>{C.status==="error"?q.reject(C.error):C.data!==void 0&&q.resolve(C.data)},F=()=>{const q=this.#o=C.promise=By();j(q)},L=this.#o;switch(L.status){case"pending":e.queryHash===n.queryHash&&j(L);break;case"fulfilled":(C.status==="error"||C.data!==L.value)&&F();break;case"rejected":(C.status!=="error"||C.error!==L.reason)&&F();break}}return C}updateResult(){const e=this.#a,t=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#s=this.options,this.#r.data!==void 0&&(this.#f=this.#t),pu(t,e))return;this.#a=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:a}=this.options,s=typeof a=="function"?a():a;if(s==="all"||!s&&!this.#h.size)return!0;const o=new Set(s??this.#h);return this.options.throwOnError&&o.add("error"),Object.keys(this.#a).some(u=>{const c=u;return this.#a[c]!==e[c]&&o.has(c)})};this.#w({listeners:n()})}#x(){const e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;const t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#S()}#w(e){Tt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#a)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function n2(e,t){return qn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function LT(e,t){return n2(e,t)||e.state.data!==void 0&&Py(e,t,t.refetchOnMount)}function Py(e,t,n){if(qn(t.enabled,e)!==!1&&da(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&AS(e,t)}return!1}function DT(e,t,n,a){return(e!==t||qn(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&AS(e,n)}function AS(e,t){return qn(t.enabled,e)!==!1&&e.isStaleByTime(da(t.staleTime,e))}function r2(e,t){return!pu(e.getCurrentResult(),t)}function MT(e){return{onFetch:(t,n)=>{const a=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,o=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let c={pages:[],pageParams:[]},p=0;const f=async()=>{let h=!1;const m=E=>{Object.defineProperty(E,"signal",{enumerable:!0,get:()=>(t.signal.aborted?h=!0:t.signal.addEventListener("abort",()=>{h=!0}),t.signal)})},b=x1(t.options,t.fetchOptions),y=async(E,x,w)=>{if(h)return Promise.reject();if(x==null&&E.pages.length)return Promise.resolve(E);const R=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:x,direction:w?"backward":"forward",meta:t.options.meta};return m(k),k})(),A=await b(R),{maxPages:N}=t.options,D=w?KM:YM;return{pages:D(E.pages,A,N),pageParams:D(E.pageParams,x,N)}};if(s&&o.length){const E=s==="backward",x=E?a2:FT,w={pages:o,pageParams:u},_=x(a,w);c=await y(w,_,E)}else{const E=e??o.length;do{const x=p===0?u[0]??a.initialPageParam:FT(a,c);if(p>0&&x==null)break;c=await y(c,x),p++}while(p<E)}return c};t.options.persister?t.fetchFn=()=>t.options.persister?.(f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=f}}}function FT(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function a2(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var i2=class extends R1{#e;#t;#n;#a;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||k1(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#n.remove(this))}continue(){return this.#a?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#r({type:"continue"})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#a=A1({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(o,u)=>{this.#r({type:"failed",failureCount:o,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)});const a=this.state.status==="pending",s=!this.#a.canStart();try{if(a)t();else{this.#r({type:"pending",variables:e,isPaused:s}),await this.#n.config.onMutate?.(e,this,n);const u=await this.options.onMutate?.(e,n);u!==this.state.context&&this.#r({type:"pending",context:u,variables:e,isPaused:s})}const o=await this.#a.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#r({type:"success",data:o}),o}catch(o){try{throw await this.#n.config.onError?.(o,e,this.state.context,this,n),await this.options.onError?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(void 0,o,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(void 0,o,e,this.state.context,n),o}finally{this.#r({type:"error",error:o})}}finally{this.#n.runNext(this)}}#r(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=t(this.state),Tt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function k1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var s2=class extends Ji{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){const a=new i2({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(a),a}add(e){this.#e.add(e);const t=$l(e);if(typeof t=="string"){const n=this.#t.get(t);n?n.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=$l(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const a=n.indexOf(e);a!==-1&&n.splice(a,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=$l(e);if(typeof t=="string"){const a=this.#t.get(t)?.find(s=>s.state.status==="pending");return!a||a===e}else return!0}runNext(e){const t=$l(e);return typeof t=="string"?this.#t.get(t)?.find(a=>a!==e&&a.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Tt.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(n=>NT(t,n))}findAll(e={}){return this.getAll().filter(t=>NT(e,t))}notify(e){Tt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Tt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Wt))))}};function $l(e){return e.options.scope?.id}var o2=class extends Ji{#e;#t=void 0;#n;#a;constructor(t,n){super(),this.#e=t,this.setOptions(n),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const n=this.options;this.options=this.#e.defaultMutationOptions(t),pu(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Va(n.mutationKey)!==Va(this.options.mutationKey)?this.reset():this.#n?.state.status==="pending"&&this.#n.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#s(t)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#r(),this.#s()}mutate(t,n){return this.#a=n,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(t)}#r(){const t=this.#n?.state??k1();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#s(t){Tt.batch(()=>{if(this.#a&&this.hasListeners()){const n=this.#t.variables,a=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};t?.type==="success"?(this.#a.onSuccess?.(t.data,n,a,s),this.#a.onSettled?.(t.data,null,n,a,s)):t?.type==="error"&&(this.#a.onError?.(t.error,n,a,s),this.#a.onSettled?.(void 0,t.error,n,a,s))}this.listeners.forEach(n=>{n(this.#t)})})}},l2=class extends Ji{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const a=t.queryKey,s=t.queryHash??xS(a,t);let o=this.get(s);return o||(o=new e2({client:e,queryKey:a,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){Tt.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(n=>kT(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>kT(e,n)):t}notify(e){Tt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Tt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Tt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},u2=class{#e;#t;#n;#a;#r;#s;#o;#i;constructor(e={}){this.#e=e.queryCache||new l2,this.#t=e.mutationCache||new s2,this.#n=e.defaultOptions||{},this.#a=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=TS.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#i=fu.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#i?.(),this.#i=void 0)}isFetching(e){return this.#e.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#t.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=this.#e.build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(da(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),o=this.#e.get(a.queryHash)?.state.data,u=GM(t,o);if(u!==void 0)return this.#e.build(this,a).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Tt.batch(()=>this.#e.findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Tt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Tt.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=Tt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(Wt).catch(Wt)}invalidateQueries(e,t={}){return Tt.batch(()=>(this.#e.findAll(e).forEach(n=>{n.invalidate()}),e?.refetchType==="none"?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=Tt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(Wt)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(Wt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(da(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Wt).catch(Wt)}fetchInfiniteQuery(e){return e.behavior=MT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Wt).catch(Wt)}ensureInfiniteQueryData(e){return e.behavior=MT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return fu.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#a.set(Va(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#a.values()],n={};return t.forEach(a=>{mo(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Va(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(a=>{mo(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=xS(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===wS&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}},N1=U.createContext(void 0),_n=e=>{const t=U.useContext(N1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},c2=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),v.jsx(N1.Provider,{value:e,children:t})),C1=U.createContext(!1),d2=()=>U.useContext(C1);C1.Provider;function p2(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var f2=U.createContext(p2()),h2=()=>U.useContext(f2),m2=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},g2=e=>{U.useEffect(()=>{e.clearReset()},[e])},b2=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||w1(n,[e.error,a])),y2=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},S2=(e,t)=>e.isLoading&&e.isFetching&&!t,v2=(e,t)=>e?.suspense&&t.isPending,UT=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function E2(e,t,n){const a=d2(),s=h2(),o=_n(),u=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(u),u._optimisticResults=a?"isRestoring":"optimistic",y2(u),m2(u,s),g2(s);const c=!o.getQueryCache().get(u.queryHash),[p]=U.useState(()=>new t(o,u)),f=p.getOptimisticResult(u),h=!a&&e.subscribed!==!1;if(U.useSyncExternalStore(U.useCallback(m=>{const b=h?p.subscribe(Tt.batchCalls(m)):Wt;return p.updateResult(),b},[p,h]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),U.useEffect(()=>{p.setOptions(u)},[u,p]),v2(u,f))throw UT(u,p,s);if(b2({result:f,errorResetBoundary:s,throwOnError:u.throwOnError,query:o.getQueryCache().get(u.queryHash),suspense:u.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(u,f),u.experimental_prefetchInRender&&!Ha&&S2(f,a)&&(c?UT(u,p,s):o.getQueryCache().get(u.queryHash)?.promise)?.catch(Wt).finally(()=>{p.updateResult()}),u.notifyOnChangeProps?f:p.trackResult(f)}function Xa(e,t){return E2(e,t2)}function cr(e,t){const n=_n(),[a]=U.useState(()=>new o2(n,e));U.useEffect(()=>{a.setOptions(e)},[a,e]);const s=U.useSyncExternalStore(U.useCallback(u=>a.subscribe(Tt.batchCalls(u)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=U.useCallback((u,c)=>{a.mutate(u,c).catch(Wt)},[a]);if(s.error&&w1(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}const Hi=new WeakMap,ru=new WeakMap,hu={current:[]};let yp=!1,oo=0;const so=new Set,Gl=new Map;function O1(e){const t=Array.from(e).sort((n,a)=>n instanceof Vi&&n.options.deps.includes(a)?1:a instanceof Vi&&a.options.deps.includes(n)?-1:0);for(const n of t){if(hu.current.includes(n))continue;hu.current.push(n),n.recompute();const a=ru.get(n);if(a)for(const s of a){const o=Hi.get(s);o&&O1(o)}}}function x2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function w2(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function I1(e){if(oo>0&&!Gl.has(e)&&Gl.set(e,e.prevState),so.add(e),!(oo>0)&&!yp)try{for(yp=!0;so.size>0;){const t=Array.from(so);so.clear();for(const n of t){const a=Gl.get(n)??n.prevState;n.prevState=a,x2(n)}for(const n of t){const a=Hi.get(n);a&&(hu.current.push(n),O1(a))}for(const n of t){const a=Hi.get(n);if(a)for(const s of a)w2(s)}}}finally{yp=!1,hu.current=[],Gl.clear()}}function lo(e){oo++;try{e()}finally{if(oo--,oo===0){const t=so.values().next().value;t&&I1(t)}}}function T2(e){return typeof e=="function"}class zy{constructor(t,n){this.listeners=new Set,this.subscribe=a=>{var s,o;this.listeners.add(a);const u=(o=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:o.call(s,a,this);return()=>{this.listeners.delete(a),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,a,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):T2(t)?this.state=t(this.prevState):this.state=t,(s=(a=this.options)==null?void 0:a.onUpdate)==null||s.call(a),I1(this)}}class Vi{constructor(t){this.listeners=new Set,this._subscriptions=[],this.lastSeenDepValues=[],this.getDepVals=()=>{const n=this.options.deps.length,a=new Array(n),s=new Array(n);for(let o=0;o<n;o++){const u=this.options.deps[o];a[o]=u.prevState,s[o]=u.state}return this.lastSeenDepValues=s,{prevDepVals:a,currDepVals:s,prevVal:this.prevState??void 0}},this.recompute=()=>{var n,a;this.prevState=this.state;const s=this.getDepVals();this.state=this.options.fn(s),(a=(n=this.options).onUpdate)==null||a.call(n)},this.checkIfRecalculationNeededDeeply=()=>{for(const o of this.options.deps)o instanceof Vi&&o.checkIfRecalculationNeededDeeply();let n=!1;const a=this.lastSeenDepValues,{currDepVals:s}=this.getDepVals();for(let o=0;o<s.length;o++)if(s[o]!==a[o]){n=!0;break}n&&this.recompute()},this.mount=()=>(this.registerOnGraph(),this.checkIfRecalculationNeededDeeply(),()=>{this.unregisterFromGraph();for(const n of this._subscriptions)n()}),this.subscribe=n=>{var a,s;this.listeners.add(n);const o=(s=(a=this.options).onSubscribe)==null?void 0:s.call(a,n,this);return()=>{this.listeners.delete(n),o?.()}},this.options=t,this.state=t.fn({prevDepVals:void 0,prevVal:void 0,currDepVals:this.getDepVals().currDepVals})}registerOnGraph(t=this.options.deps){for(const n of t)if(n instanceof Vi)n.registerOnGraph(),this.registerOnGraph(n.options.deps);else if(n instanceof zy){let a=Hi.get(n);a||(a=new Set,Hi.set(n,a)),a.add(this);let s=ru.get(this);s||(s=new Set,ru.set(this,s)),s.add(n)}}unregisterFromGraph(t=this.options.deps){for(const n of t)if(n instanceof Vi)this.unregisterFromGraph(n.options.deps);else if(n instanceof zy){const a=Hi.get(n);a&&a.delete(this);const s=ru.get(this);s&&s.delete(n)}}}const pa="__TSR_index",BT="popstate",jT="beforeunload";function A2(e){let t=e.getLocation();const n=new Set,a=u=>{t=e.getLocation(),n.forEach(c=>c({location:t,action:u}))},s=u=>{e.notifyOnIndexChange??!0?a(u):t=e.getLocation()},o=async({task:u,navigateOpts:c,...p})=>{if(c?.ignoreBlocker??!1){u();return}const h=e.getBlockers?.()??[],m=p.type==="PUSH"||p.type==="REPLACE";if(typeof document<"u"&&h.length&&m)for(const b of h){const y=mu(p.path,p.state);if(await b.blockerFn({currentLocation:t,nextLocation:y,action:p.type})){e.onBlocked?.();return}}u()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:u=>(n.add(u),()=>{n.delete(u)}),push:(u,c,p)=>{const f=t.state[pa];c=PT(f+1,c),o({task:()=>{e.pushState(u,c),a({type:"PUSH"})},navigateOpts:p,type:"PUSH",path:u,state:c})},replace:(u,c,p)=>{const f=t.state[pa];c=PT(f,c),o({task:()=>{e.replaceState(u,c),a({type:"REPLACE"})},navigateOpts:p,type:"REPLACE",path:u,state:c})},go:(u,c)=>{o({task:()=>{e.go(u),s({type:"GO",index:u})},navigateOpts:c,type:"GO"})},back:u=>{o({task:()=>{e.back(u?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{o({task:()=>{e.forward(u?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[pa]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const c=e.getBlockers?.()??[];return e.setBlockers([...c,u]),()=>{const p=e.getBlockers?.()??[];e.setBlockers?.(p.filter(f=>f!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:a}}function PT(e,t){t||(t={});const n=RS();return{...t,key:n,__TSR_key:n,[pa]:e}}function R2(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,a=t.history.replaceState;let s=[];const o=()=>s,u=j=>s=j,c=(j=>j),p=(()=>mu(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const j=RS();t.history.replaceState({[pa]:0,key:j,__TSR_key:j},"")}let f=p(),h,m=!1,b=!1,y=!1,E=!1;const x=()=>f;let w,_;const R=()=>{w&&(C._ignoreSubscribers=!0,(w.isPush?t.history.pushState:t.history.replaceState)(w.state,"",w.href),C._ignoreSubscribers=!1,w=void 0,_=void 0,h=void 0)},A=(j,F,L)=>{const q=c(F);_||(h=f),f=mu(F,L),w={href:q,state:L,isPush:w?.isPush||j==="push"},_||(_=Promise.resolve().then(()=>R()))},N=j=>{f=p(),C.notify({type:j})},D=async()=>{if(b){b=!1;return}const j=p(),F=j.state[pa]-f.state[pa],L=F===1,q=F===-1,z=!L&&!q||m;m=!1;const Z=z?"GO":q?"BACK":"FORWARD",H=z?{type:"GO",index:F}:{type:q?"BACK":"FORWARD"};if(y)y=!1;else{const K=o();if(typeof document<"u"&&K.length){for(const G of K)if(await G.blockerFn({currentLocation:f,nextLocation:j,action:Z})){b=!0,t.history.go(1),C.notify(H);return}}}f=p(),C.notify(H)},k=j=>{if(E){E=!1;return}let F=!1;const L=o();if(typeof document<"u"&&L.length)for(const q of L){const z=q.enableBeforeUnload??!0;if(z===!0){F=!0;break}if(typeof z=="function"&&z()===!0){F=!0;break}}if(F)return j.preventDefault(),j.returnValue=""},C=A2({getLocation:x,getLength:()=>t.history.length,pushState:(j,F)=>A("push",j,F),replaceState:(j,F)=>A("replace",j,F),back:j=>(j&&(y=!0),E=!0,t.history.back()),forward:j=>{j&&(y=!0),E=!0,t.history.forward()},go:j=>{m=!0,t.history.go(j)},createHref:j=>c(j),flush:R,destroy:()=>{t.history.pushState=n,t.history.replaceState=a,t.removeEventListener(jT,k,{capture:!0}),t.removeEventListener(BT,D)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(jT,k,{capture:!0}),t.addEventListener(BT,D),t.history.pushState=function(...j){const F=n.apply(t.history,j);return C._ignoreSubscribers||N("PUSH"),F},t.history.replaceState=function(...j){const F=a.apply(t.history,j);return C._ignoreSubscribers||N("REPLACE"),F},C}function mu(e,t){const n=e.indexOf("#"),a=e.indexOf("?"),s=RS();return{href:e,pathname:e.substring(0,n>0?a>0?Math.min(n,a):n:a>0?a:e.length),hash:n>-1?e.substring(n):"",search:a>-1?e.slice(a,n===-1?void 0:n):"",state:t||{[pa]:0,key:s,__TSR_key:s}}}function RS(){return(Math.random()+1).toString(36).substring(7)}function qy(e){return e[e.length-1]}function _2(e){return typeof e=="function"}function za(e,t){return _2(e)?e(t):e}const k2=Object.prototype.hasOwnProperty;function zn(e,t){if(e===t)return e;const n=t,a=$T(e)&&$T(n);if(!a&&!(gu(e)&&gu(n)))return n;const s=a?e:zT(e);if(!s)return n;const o=a?n:zT(n);if(!o)return n;const u=s.length,c=o.length,p=a?new Array(c):{};let f=0;for(let h=0;h<c;h++){const m=a?h:o[h],b=e[m],y=n[m];if(b===y){p[m]=b,(a?h<u:k2.call(e,m))&&f++;continue}if(b===null||y===null||typeof b!="object"||typeof y!="object"){p[m]=y;continue}const E=zn(b,y);p[m]=E,E===b&&f++}return u===c&&f===u?e:p}function zT(e){const t=[],n=Object.getOwnPropertyNames(e);for(const s of n){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}const a=Object.getOwnPropertySymbols(e);for(const s of a){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function gu(e){if(!qT(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!qT(n)||!n.hasOwnProperty("isPrototypeOf"))}function qT(e){return Object.prototype.toString.call(e)==="[object Object]"}function $T(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function qa(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let a=0,s=e.length;a<s;a++)if(!qa(e[a],t[a],n))return!1;return!0}if(gu(e)&&gu(t)){const a=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!a||t[u]!==void 0)&&!qa(e[u],t[u],n))return!1;return!0}let s=0;if(!a)s=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&s++;let o=0;for(const u in t)if((!a||t[u]!==void 0)&&(o++,o>s||!qa(e[u],t[u],n)))return!1;return s===o}return!1}function Ki(e){let t,n;const a=new Promise((s,o)=>{t=s,n=o});return a.status="pending",a.resolve=s=>{a.status="resolved",a.value=s,t(s),e?.(s)},a.reject=s=>{a.status="rejected",n(s)},a}function fa(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}var N2="Invariant failed";function Dr(e,t){if(!e)throw new Error(N2)}const Tn="__root__",ir=0,Ya=1,Wi=2,Xi=3;function Lr(e){return _S(e.filter(t=>t!==void 0).join("/"))}function _S(e){return e.replace(/\/{2,}/g,"/")}function kS(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ha(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function au(e){return ha(kS(e))}function bu(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function C2(e,t,n){return bu(e,n)===bu(t,n)}function O2(e){const{type:t,value:n}=e;if(t===ir)return n;const{prefixSegment:a,suffixSegment:s}=e;if(t===Ya){const o=n.substring(1);if(a&&s)return`${a}{$${o}}${s}`;if(a)return`${a}{$${o}}`;if(s)return`{$${o}}${s}`}if(t===Xi){const o=n.substring(1);return a&&s?`${a}{-$${o}}${s}`:a?`${a}{-$${o}}`:s?`{-$${o}}${s}`:`{-$${o}}`}if(t===Wi){if(a&&s)return`${a}{$}${s}`;if(a)return`${a}{$}`;if(s)return`{$}${s}`}return n}function I2({base:e,to:t,trailingSlash:n="never",parseCache:a}){let s=L1(e,a).slice();const o=Ou(t,a);s.length>1&&qy(s)?.value==="/"&&s.pop();for(let p=0,f=o.length;p<f;p++){const h=o[p],m=h.value;m==="/"?p?p===f-1&&s.push(h):s=[h]:m===".."?s.pop():m==="."||s.push(h)}s.length>1&&(qy(s).value==="/"?n==="never"&&s.pop():n==="always"&&s.push({type:ir,value:"/"}));const u=s.map(O2);return Lr(u)}const L1=(e,t)=>D1(e,t,!0),Ou=(e,t)=>D1(e,t,!1),D1=(e,t,n)=>{if(!e)return[];const a=t?.get(e);if(a)return a;const s=B2(e,n);return t?.set(e,s),s},L2=/^\$.{1,}$/,D2=/^(.*?)\{(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,M2=/^(.*?)\{-(\$[a-zA-Z_$][a-zA-Z0-9_$]*)\}(.*)$/,F2=/^\$$/,U2=/^(.*?)\{\$\}(.*)$/;function B2(e,t){e=_S(e);const n=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),n.push({type:ir,value:"/"})),!e)return n;const a=e.split("/").filter(Boolean);return n.push(...a.map(s=>{const o=!t&&s!==Tn&&s.slice(-1)==="_"?s.slice(0,-1):s,u=o.match(U2);if(u){const f=u[1],h=u[2];return{type:Wi,value:"$",prefixSegment:f||void 0,suffixSegment:h||void 0}}const c=o.match(M2);if(c){const f=c[1],h=c[2],m=c[3];return{type:Xi,value:h,prefixSegment:f||void 0,suffixSegment:m||void 0}}const p=o.match(D2);if(p){const f=p[1],h=p[2],m=p[3];return{type:Ya,value:""+h,prefixSegment:f||void 0,suffixSegment:m||void 0}}if(L2.test(o)){const f=o.substring(1);return{type:Ya,value:"$"+f,prefixSegment:void 0,suffixSegment:void 0}}return F2.test(o)?{type:Wi,value:"$",prefixSegment:void 0,suffixSegment:void 0}:{type:ir,value:o.includes("%25")?o.split("%25").map(f=>decodeURI(f)).join("%25"):decodeURI(o)}})),e.slice(-1)==="/"&&(e=e.substring(1),n.push({type:ir,value:"/"})),n}function Hl({path:e,params:t,leaveWildcards:n,leaveParams:a,decodeCharMap:s,parseCache:o}){const u=Ou(e,o);function c(m){const b=t[m],y=typeof b=="string";return m==="*"||m==="_splat"?y?encodeURI(b):b:y?j2(b,s):b}let p=!1;const f={},h=Lr(u.map(m=>{if(m.type===ir)return m.value;if(m.type===Wi){f._splat=t._splat,f["*"]=t._splat;const b=m.prefixSegment||"",y=m.suffixSegment||"";if(!("_splat"in t))return p=!0,n?`${b}${m.value}${y}`:b||y?`${b}${y}`:void 0;const E=c("_splat");return n?`${b}${m.value}${E??""}${y}`:`${b}${E}${y}`}if(m.type===Ya){const b=m.value.substring(1);!p&&!(b in t)&&(p=!0),f[b]=t[b];const y=m.prefixSegment||"",E=m.suffixSegment||"";if(a){const x=c(m.value);return`${y}${m.value}${x??""}${E}`}return`${y}${c(b)??"undefined"}${E}`}if(m.type===Xi){const b=m.value.substring(1),y=m.prefixSegment||"",E=m.suffixSegment||"";if(!(b in t)||t[b]==null)return n?`${y}${b}${E}`:y||E?`${y}${E}`:void 0;if(f[b]=t[b],a){const x=c(m.value);return`${y}${m.value}${x??""}${E}`}return n?`${y}${b}${c(b)??""}${E}`:`${y}${c(b)??""}${E}`}return m.value}));return{usedParams:f,interpolatedPath:h,isMissingParams:p}}function j2(e,t){let n=encodeURIComponent(e);if(t)for(const[a,s]of t)n=n.replaceAll(a,s);return n}function $y(e,t,n){const a=P2(e,t,n);if(!(t.to&&!a))return a??{}}function P2(e,{to:t,fuzzy:n,caseSensitive:a},s){const o=t,u=L1(e.startsWith("/")?e:`/${e}`,s),c=Ou(o.startsWith("/")?o:`/${o}`,s),p={};return z2(u,c,p,n,a)?p:void 0}function z2(e,t,n,a,s){let o=0,u=0;for(;o<e.length||u<t.length;){const c=e[o],p=t[u];if(p){if(p.type===Wi){const f=e.slice(o);let h;if(p.prefixSegment||p.suffixSegment){if(!c)return!1;const m=p.prefixSegment||"",b=p.suffixSegment||"",y=c.value;if("prefixSegment"in p&&!y.startsWith(m)||"suffixSegment"in p&&!e[e.length-1]?.value.endsWith(b))return!1;let E=decodeURI(Lr(f.map(x=>x.value)));m&&E.startsWith(m)&&(E=E.slice(m.length)),b&&E.endsWith(b)&&(E=E.slice(0,E.length-b.length)),h=E}else h=decodeURI(Lr(f.map(m=>m.value)));return n["*"]=h,n._splat=h,!0}if(p.type===ir){if(p.value==="/"&&!c?.value){u++;continue}if(c){if(s){if(p.value!==c.value)return!1}else if(p.value.toLowerCase()!==c.value.toLowerCase())return!1;o++,u++;continue}else return!1}if(p.type===Ya){if(!c||c.value==="/")return!1;let f="",h=!1;if(p.prefixSegment||p.suffixSegment){const m=p.prefixSegment||"",b=p.suffixSegment||"",y=c.value;if(m&&!y.startsWith(m)||b&&!y.endsWith(b))return!1;let E=y;m&&E.startsWith(m)&&(E=E.slice(m.length)),b&&E.endsWith(b)&&(E=E.slice(0,E.length-b.length)),f=decodeURIComponent(E),h=!0}else f=decodeURIComponent(c.value),h=!0;h&&(n[p.value.substring(1)]=f,o++),u++;continue}if(p.type===Xi){if(!c){u++;continue}if(c.value==="/"){u++;continue}let f="",h=!1;if(p.prefixSegment||p.suffixSegment){const m=p.prefixSegment||"",b=p.suffixSegment||"",y=c.value;if((!m||y.startsWith(m))&&(!b||y.endsWith(b))){let E=y;m&&E.startsWith(m)&&(E=E.slice(m.length)),b&&E.endsWith(b)&&(E=E.slice(0,E.length-b.length)),f=decodeURIComponent(E),h=!0}}else{let m=!0;for(let b=u+1;b<t.length;b++){const y=t[b];if(y?.type===ir&&y.value===c.value){m=!1;break}if(y?.type===Ya||y?.type===Wi){e.length<t.length&&(m=!1);break}}m&&(f=decodeURIComponent(c.value),h=!0)}h&&(n[p.value.substring(1)]=f,o++),u++;continue}}if(o<e.length&&u>=t.length)return n["**"]=Lr(e.slice(o).map(f=>f.value)),!!a&&t[t.length-1]?.value!=="/";if(u<t.length&&o>=e.length){for(let f=u;f<t.length;f++)if(t[f]?.type!==Xi)return!1;break}break}return!0}const q2=.75,$2=1,G2=.5,H2=.4,V2=.25,Y2=.2,K2=.05,W2=.02,X2=.01,GT=2e-4,HT=1e-4;function VT(e,t){return e.prefixSegment&&e.suffixSegment?t+K2+GT*e.prefixSegment.length+HT*e.suffixSegment.length:e.prefixSegment?t+W2+GT*e.prefixSegment.length:e.suffixSegment?t+X2+HT*e.suffixSegment.length:t}function Z2(e){const t=[];return e.forEach((a,s)=>{if(a.isRoot||!a.path)return;const o=kS(a.fullPath);let u=Ou(o),c=0;for(;u.length>c+1&&u[c]?.value==="/";)c++;c>0&&(u=u.slice(c));let p=0,f=!1;const h=u.map((m,b)=>{if(m.value==="/")return q2;if(m.type===ir)return $2;let y;m.type===Ya?y=G2:m.type===Xi?(y=H2,p++):y=V2;for(let E=b+1;E<u.length;E++){const x=u[E];if(x.type===ir&&x.value!=="/")return f=!0,VT(m,y+Y2)}return VT(m,y)});t.push({child:a,trimmed:o,parsed:u,index:s,scores:h,optionalParamCount:p,hasStaticAfter:f})}),t.sort((a,s)=>{const o=Math.min(a.scores.length,s.scores.length);for(let u=0;u<o;u++)if(a.scores[u]!==s.scores[u])return s.scores[u]-a.scores[u];if(a.scores.length!==s.scores.length){if(a.optionalParamCount!==s.optionalParamCount){if(a.hasStaticAfter===s.hasStaticAfter)return a.optionalParamCount-s.optionalParamCount;if(a.hasStaticAfter&&!s.hasStaticAfter)return-1;if(!a.hasStaticAfter&&s.hasStaticAfter)return 1}return s.scores.length-a.scores.length}for(let u=0;u<o;u++)if(a.parsed[u].value!==s.parsed[u].value)return a.parsed[u].value>s.parsed[u].value?1:-1;return a.index-s.index}).map((a,s)=>(a.child.rank=s,a.child))}function Q2({routeTree:e,initRoute:t}){const n={},a={},s=u=>{u.forEach((c,p)=>{t?.(c,p);const f=n[c.id];if(Dr(!f,`Duplicate routes found with id: ${String(c.id)}`),n[c.id]=c,!c.isRoot&&c.path){const m=ha(c.fullPath);(!a[m]||c.fullPath.endsWith("/"))&&(a[m]=c)}const h=c.children;h?.length&&s(h)})};s([e]);const o=Z2(Object.values(n));return{routesById:n,routesByPath:a,flatRoutes:o}}function sr(e){return!!e?.isNotFound}function J2(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const yu="tsr-scroll-restoration-v1_3",eF=(e,t)=>{let n;return(...a)=>{n||(n=setTimeout(()=>{e(...a),n=null},t))}};function tF(){const e=J2();if(!e)return null;const t=e.getItem(yu);let n=t?JSON.parse(t):{};return{state:n,set:a=>(n=za(a,n)||n,e.setItem(yu,JSON.stringify(n)))}}const Vl=tF(),Gy=e=>e.state.__TSR_key||e.href;function nF(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}let Su=!1;function M1({storageKey:e,key:t,behavior:n,shouldScrollRestoration:a,scrollToTopSelectors:s,location:o}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(f){console.error(f);return}const c=t||window.history.state?.__TSR_key,p=u[c];Su=!0;e:{if(a&&p&&Object.keys(p).length>0){for(const m in p){const b=p[m];if(m==="window")window.scrollTo({top:b.scrollY,left:b.scrollX,behavior:n});else if(m){const y=document.querySelector(m);y&&(y.scrollLeft=b.scrollX,y.scrollTop=b.scrollY)}}break e}const f=(o??window.location).hash.split("#",2)[1];if(f){const m=window.history.state?.__hashScrollIntoViewOptions??!0;if(m){const b=document.getElementById(f);b&&b.scrollIntoView(m)}break e}const h={top:0,left:0,behavior:n};if(window.scrollTo(h),s)for(const m of s){if(m==="window")continue;const b=typeof m=="function"?m():document.querySelector(m);b&&b.scrollTo(h)}}Su=!1}function rF(e,t){if(!Vl&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!Vl))return;e.isScrollRestorationSetup=!0,Su=!1;const a=e.options.getScrollRestorationKey||Gy;window.history.scrollRestoration="manual";const s=o=>{if(Su||!e.isScrollRestoring)return;let u="";if(o.target===document||o.target===window)u="window";else{const p=o.target.getAttribute("data-scroll-restoration-id");p?u=`[data-scroll-restoration-id="${p}"]`:u=nF(o.target)}const c=a(e.state.location);Vl.set(p=>{const f=p[c]||={},h=f[u]||={};if(u==="window")h.scrollX=window.scrollX||0,h.scrollY=window.scrollY||0;else if(u){const m=document.querySelector(u);m&&(h.scrollX=m.scrollLeft||0,h.scrollY=m.scrollTop||0)}return p})};typeof document<"u"&&document.addEventListener("scroll",eF(s,100),!0),e.subscribe("onRendered",o=>{const u=a(o.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(M1({storageKey:yu,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&Vl.set(c=>(c[u]||={},c)))})}function aF(e){if(typeof document<"u"&&document.querySelector){const t=e.state.location.state.__hashScrollIntoViewOptions??!0;if(t&&e.state.location.hash!==""){const n=document.getElementById(e.state.location.hash);n&&n.scrollIntoView(t)}}}function iF(e,t=String){const n=new URLSearchParams;for(const a in e){const s=e[a];s!==void 0&&n.set(a,t(s))}return n.toString()}function Sp(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function sF(e){const t=new URLSearchParams(e),n={};for(const[a,s]of t.entries()){const o=n[a];o==null?n[a]=Sp(s):Array.isArray(o)?o.push(Sp(s)):n[a]=[o,Sp(s)]}return n}const oF=uF(JSON.parse),lF=cF(JSON.stringify,JSON.parse);function uF(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=sF(t);for(const a in n){const s=n[a];if(typeof s=="string")try{n[a]=e(s)}catch{}}return n}}function cF(e,t){const n=typeof t=="function";function a(s){if(typeof s=="object"&&s!==null)try{return e(s)}catch{}else if(n&&typeof s=="string")try{return t(s),e(s)}catch{}return s}return s=>{const o=iF(s,a);return o?`?${o}`:""}}function F1(e){if(e.statusCode=e.statusCode||e.code||307,!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function rr(e){return e instanceof Response&&!!e.options}function dF(e){const t=new Map;let n,a;const s=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,a&&(a.next=o,o.prev=a)):(o.next.prev=void 0,n=o.next,o.next=void 0,a&&(o.prev=a,a.next=o)),a=o)};return{get(o){const u=t.get(o);if(u)return s(u),u.value},set(o,u){if(t.size>=e&&n){const p=n;t.delete(p.key),p.next&&(n=p.next,p.next.prev=void 0),p===a&&(a=void 0)}const c=t.get(o);if(c)c.value=u,s(c);else{const p={key:o,value:u,prev:a};a&&(a.next=p),a=p,n||(n=p),t.set(o,p)}}}}const iu=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Iu=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),U1=(e,t)=>{const n=e.router.routesById[t.routeId??""]??e.router.routeTree;!n.options.notFoundComponent&&e.router.options?.defaultNotFoundComponent&&(n.options.notFoundComponent=e.router.options.defaultNotFoundComponent),Dr(n.options.notFoundComponent);const a=e.matches.find(s=>s.routeId===n.id);Dr(a,"Could not find match for route: "+n.id),e.updateMatch(a.id,s=>({...s,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,U1(e,t))},ua=(e,t,n)=>{if(!(!rr(n)&&!sr(n))){if(rr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(t){t._nonReactive.beforeLoadPromise?.resolve(),t._nonReactive.loaderPromise?.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0;const a=rr(n)?"redirected":"notFound";e.updateMatch(t.id,s=>({...s,status:a,isFetching:!1,error:n})),sr(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw rr(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(U1(e,n),n)}},B1=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},Qs=(e,t,n,a)=>{const{id:s,routeId:o}=e.matches[t],u=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=a,e.firstBadMatchIndex??=t,ua(e,e.router.getMatch(s),n);try{u.options.onError?.(n)}catch(c){n=c,ua(e,e.router.getMatch(s),n)}e.updateMatch(s,c=>(c._nonReactive.beforeLoadPromise?.resolve(),c._nonReactive.beforeLoadPromise=void 0,c._nonReactive.loadPromise?.resolve(),{...c,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},pF=(e,t,n,a)=>{const s=e.router.getMatch(t),o=e.matches[n-1]?.id,u=o?e.router.getMatch(o):void 0;if(e.router.isShell()){s.ssr=t===Tn;return}if(u?.ssr===!1){s.ssr=!1;return}const c=y=>y===!0&&u?.ssr==="data-only"?"data-only":y,p=e.router.options.defaultSsr??!0;if(a.options.ssr===void 0){s.ssr=c(p);return}if(typeof a.options.ssr!="function"){s.ssr=c(a.options.ssr);return}const{search:f,params:h}=s,m={search:Yl(f,s.searchError),params:Yl(h,s.paramsError),location:e.location,matches:e.matches.map(y=>({index:y.index,pathname:y.pathname,fullPath:y.fullPath,staticData:y.staticData,id:y.id,routeId:y.routeId,search:Yl(y.search,y.searchError),params:Yl(y.params,y.paramsError),ssr:y.ssr}))},b=a.options.ssr(m);if(fa(b))return b.then(y=>{s.ssr=c(y??p)});s.ssr=c(b??p)},j1=(e,t,n,a)=>{if(a._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Iu(e,t)&&(n.options.loader||n.options.beforeLoad||q1(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{iu(e)},s);a._nonReactive.pendingTimeout=u}},fF=(e,t,n)=>{const a=e.router.getMatch(t);if(!a._nonReactive.beforeLoadPromise&&!a._nonReactive.loaderPromise)return;j1(e,t,n,a);const s=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&ua(e,o,o.error)};return a._nonReactive.beforeLoadPromise?a._nonReactive.beforeLoadPromise.then(s):s()},hF=(e,t,n,a)=>{const s=e.router.getMatch(t),o=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Ki(()=>{o?.resolve()});const{paramsError:u,searchError:c}=s;u&&Qs(e,n,u,"PARSE_PARAMS"),c&&Qs(e,n,c,"VALIDATE_SEARCH"),j1(e,t,a,s);const p=new AbortController,f=e.matches[n-1]?.id,b={...(f?e.router.getMatch(f):void 0)?.context??e.router.options.context??void 0,...s.__routeContext};let y=!1;const E=()=>{y||(y=!0,e.updateMatch(t,C=>({...C,isFetching:"beforeLoad",fetchCount:C.fetchCount+1,abortController:p,context:b})))},x=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,C=>({...C,isFetching:!1}))};if(!a.options.beforeLoad){lo(()=>{E(),x()});return}s._nonReactive.beforeLoadPromise=Ki();const{search:w,params:_,cause:R}=s,A=Iu(e,t),N={search:w,abortController:p,params:_,preload:A,context:b,location:e.location,navigate:C=>e.router.navigate({...C,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:A?"preload":R,matches:e.matches,...e.router.options.additionalContext},D=C=>{if(C===void 0){lo(()=>{E(),x()});return}(rr(C)||sr(C))&&(E(),Qs(e,n,C,"BEFORE_LOAD")),lo(()=>{E(),e.updateMatch(t,j=>({...j,__beforeLoadContext:C,context:{...j.context,...C}})),x()})};let k;try{if(k=a.options.beforeLoad(N),fa(k))return E(),k.catch(C=>{Qs(e,n,C,"BEFORE_LOAD")}).then(D)}catch(C){E(),Qs(e,n,C,"BEFORE_LOAD")}D(k)},mF=(e,t)=>{const{id:n,routeId:a}=e.matches[t],s=e.router.looseRoutesById[a],o=()=>{if(e.router.isServer){const p=pF(e,n,t,s);if(fa(p))return p.then(c)}return c()},u=()=>hF(e,n,t,s),c=()=>{if(B1(e,n))return;const p=fF(e,n,s);return fa(p)?p.then(u):u()};return o()},uo=(e,t,n)=>{const a=e.router.getMatch(t);if(!a||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={matches:e.matches,match:a,params:a.params,loaderData:a.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([o,u,c])=>{const p=o?.meta,f=o?.links,h=o?.scripts,m=o?.styles;return{meta:p,links:f,headScripts:h,headers:c,scripts:u,styles:m}})},P1=(e,t,n,a)=>{const s=e.matchPromises[n-1],{params:o,loaderDeps:u,abortController:c,context:p,cause:f}=e.router.getMatch(t),h=Iu(e,t);return{params:o,deps:u,preload:!!h,parentMatchPromise:s,abortController:c,context:p,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:h?"preload":f,route:a,...e.router.options.additionalContext}},YT=async(e,t,n,a)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&z1(a);const o=a.options.loader?.(P1(e,t,n,a)),u=a.options.loader&&fa(o);if(!!(u||a._lazyPromise||a._componentsPromise||a.options.head||a.options.scripts||a.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,m=>({...m,isFetching:"loader"})),a.options.loader){const m=u?await o:o;ua(e,e.router.getMatch(t),m),m!==void 0&&e.updateMatch(t,b=>({...b,loaderData:m}))}a._lazyPromise&&await a._lazyPromise;const p=uo(e,t,a),f=p?await p:void 0,h=s._nonReactive.minPendingPromise;h&&await h,a._componentsPromise&&await a._componentsPromise,e.updateMatch(t,m=>({...m,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...f}))}catch(o){let u=o;const c=s._nonReactive.minPendingPromise;c&&await c,ua(e,e.router.getMatch(t),o);try{a.options.onError?.(o)}catch(h){u=h,ua(e,e.router.getMatch(t),h)}const p=uo(e,t,a),f=p?await p:void 0;e.updateMatch(t,h=>({...h,error:u,status:"error",isFetching:!1,...f}))}}catch(s){const o=e.router.getMatch(t);if(o){const u=uo(e,t,a);if(u){const c=await u;e.updateMatch(t,p=>({...p,...c}))}o._nonReactive.loaderPromise=void 0}ua(e,o,s)}},gF=async(e,t)=>{const{id:n,routeId:a}=e.matches[t];let s=!1,o=!1;const u=e.router.looseRoutesById[a];if(B1(e,n)){if(e.router.isServer){const f=uo(e,n,u);if(f){const h=await f;e.updateMatch(n,m=>({...m,...h}))}return e.router.getMatch(n)}}else{const f=e.router.getMatch(n);if(f._nonReactive.loaderPromise){if(f.status==="success"&&!e.sync&&!f.preload)return f;await f._nonReactive.loaderPromise;const h=e.router.getMatch(n);h.error&&ua(e,h,h.error)}else{const h=Date.now()-f.updatedAt,m=Iu(e,n),b=m?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,y=u.options.shouldReload,E=typeof y=="function"?y(P1(e,n,t,u)):y,x=!!m&&!e.router.state.matches.some(A=>A.id===n),w=e.router.getMatch(n);w._nonReactive.loaderPromise=Ki(),x!==w.preload&&e.updateMatch(n,A=>({...A,preload:x}));const{status:_,invalid:R}=w;if(s=_==="success"&&(R||(E??h>b)),!(m&&u.options.preload===!1))if(s&&!e.sync)o=!0,(async()=>{try{await YT(e,n,t,u);const A=e.router.getMatch(n);A._nonReactive.loaderPromise?.resolve(),A._nonReactive.loadPromise?.resolve(),A._nonReactive.loaderPromise=void 0}catch(A){rr(A)&&await e.router.navigate(A.options)}})();else if(_!=="success"||s&&e.sync)await YT(e,n,t,u);else{const A=uo(e,n,u);if(A){const N=await A;e.updateMatch(n,D=>({...D,...N}))}}}}const c=e.router.getMatch(n);o||(c._nonReactive.loaderPromise?.resolve(),c._nonReactive.loadPromise?.resolve()),clearTimeout(c._nonReactive.pendingTimeout),c._nonReactive.pendingTimeout=void 0,o||(c._nonReactive.loaderPromise=void 0),c._nonReactive.dehydrated=void 0;const p=o?c.isFetching:!1;return p!==c.isFetching||c.invalid!==!1?(e.updateMatch(n,f=>({...f,isFetching:p,invalid:!1})),e.router.getMatch(n)):c};async function KT(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&iu(t);try{for(let s=0;s<t.matches.length;s++){const o=mF(t,s);fa(o)&&await o}const n=t.firstBadMatchIndex??t.matches.length;for(let s=0;s<n;s++)t.matchPromises.push(gF(t,s));await Promise.all(t.matchPromises);const a=iu(t);fa(a)&&await a}catch(n){if(sr(n)&&!t.preload){const a=iu(t);throw fa(a)&&await a,n}if(rr(n))throw n}return t.matches}async function z1(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...a}=t.options;Object.assign(e.options,a),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const a of $1){const s=e.options[a]?.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0});e._componentsLoaded=!0,e._componentsPromise=void 0};e._componentsPromise=e._lazyPromise?e._lazyPromise.then(t):t()}return e._componentsPromise}function Yl(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function q1(e){for(const t of $1)if(e.options[t]?.preload)return!0;return!1}const $1=["component","errorComponent","pendingComponent","notFoundComponent"];function bF(e){return{input:({url:t})=>{for(const n of e)t=G1(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=H1(e[n],t);return t}}}function yF(e){const t=au(e.basepath),n=`/${t}`,a=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?a:a.toLowerCase();return{input:({url:u})=>{const c=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return c===s?u.pathname="/":c.startsWith(o)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=Lr(["/",t,u.pathname]),u)}}function G1(e,t){const n=e?.input?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function H1(e,t){const n=e?.output?.({url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function $a(e){const t=e.resolvedLocation,n=e.location,a=t?.pathname!==n.pathname,s=t?.href!==n.href,o=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:a,hrefChanged:s,hashChanged:o}}class SF{constructor(t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const a=this.options,s=this.basepath??a?.basepath??"/",o=this.basepath===void 0,u=a?.rewrite;this.options={...a,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(b=>[encodeURIComponent(b),b])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=R2())),this.origin=this.options.origin,this.origin||(this.isServer?this.origin="http://localhost":this.origin=window.origin),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new zy(EF(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(b=>!["redirected"].includes(b.status))}}}),rF(this));let c=!1;const p=this.options.basepath??"/",f=this.options.rewrite;if(o||s!==p||u!==f){this.basepath=p;const b=[];au(p)!==""&&b.push(yF({basepath:p})),f&&b.push(f),this.rewrite=b.length===0?void 0:b.length===1?b[0]:bF(b),this.history&&this.updateLatestLocation(),c=!0}c&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof window.CSS?.supports=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:a,flatRoutes:s}=Q2({routeTree:this.routeTree,initRoute:(u,c)=>{u.init({originalIndex:c})}});this.routesById=n,this.routesByPath=a,this.flatRoutes=s;const o=this.options.notFoundRoute;o&&(o.init({originalIndex:99999999999}),this.routesById[o.id]=o)},this.subscribe=(n,a)=>{const s={eventType:n,fn:a};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(a=>{a.eventType===n.type&&a.fn(n)})},this.parseLocation=(n,a)=>{const s=({href:p,state:f})=>{const h=new URL(p,this.origin),m=G1(this.rewrite,h),b=this.options.parseSearch(m.search),y=this.options.stringifySearch(b);m.search=y;const E=m.href.replace(m.origin,""),{pathname:x,hash:w}=m;return{href:E,publicHref:p,url:m.href,pathname:x,searchStr:y,search:zn(a?.search,b),hash:w.split("#").reverse()[0]??"",state:zn(a?.state,f)}},o=s(n),{__tempLocation:u,__tempKey:c}=o.state;if(u&&(!c||c===this.tempLocationKey)){const p=s(u);return p.state.key=o.state.key,p.state.__TSR_key=o.state.__TSR_key,delete p.state.__tempLocation,{...p,maskedLocation:o}}return o},this.resolvePathWithBase=(n,a)=>I2({base:n,to:_S(a),trailingSlash:this.options.trailingSlash,parseCache:this.parsePathnameCache}),this.matchRoutes=(n,a,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:a},s):this.matchRoutesInternal(n,a),this.parsePathnameCache=dF(1e3),this.getMatchedRoutes=(n,a)=>xF({pathname:n,routePathname:a,caseSensitive:this.options.caseSensitive,routesByPath:this.routesByPath,routesById:this.routesById,flatRoutes:this.flatRoutes,parseCache:this.parsePathnameCache}),this.cancelMatch=n=>{const a=this.getMatch(n);a&&(a.abortController.abort(),clearTimeout(a._nonReactive.pendingTimeout),a._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.state.pendingMatches?.forEach(n=>{this.cancelMatch(n.id)})},this.buildLocation=n=>{const a=(o={})=>{const u=o._fromLocation||this.latestLocation,c=this.matchRoutes(u,{_buildLocation:!0}),p=qy(c);o.from;const f=o.unsafeRelative==="path"?u.pathname:o.from??p.fullPath,h=this.resolvePathWithBase(f,"."),m=p.search,b={...p.params},y=o.to?this.resolvePathWithBase(h,`${o.to}`):this.resolvePathWithBase(h,"."),E=o.params===!1||o.params===null?{}:(o.params??!0)===!0?b:Object.assign(b,za(o.params,b)),x=Hl({path:y,params:E,parseCache:this.parsePathnameCache}).interpolatedPath,w=this.matchRoutes(x,void 0,{_buildLocation:!0}).map(L=>this.looseRoutesById[L.routeId]);if(Object.keys(E).length>0)for(const L of w){const q=L.options.params?.stringify??L.options.stringifyParams;q&&Object.assign(E,q(E))}const _=Hl({path:y,params:E,leaveWildcards:!1,leaveParams:n.leaveParams,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath;let R=m;if(n._includeValidateSearch&&this.options.search?.strict){const L={};w.forEach(q=>{if(q.options.validateSearch)try{Object.assign(L,Hy(q.options.validateSearch,{...L,...R}))}catch{}}),R=L}R=wF({search:R,dest:o,destRoutes:w,_includeValidateSearch:n._includeValidateSearch}),R=zn(m,R);const A=this.options.stringifySearch(R),N=o.hash===!0?u.hash:o.hash?za(o.hash,u.hash):void 0,D=N?`#${N}`:"";let k=o.state===!0?u.state:o.state?za(o.state,u.state):{};k=zn(u.state,k);const C=`${_}${A}${D}`,j=new URL(C,this.origin),F=H1(this.rewrite,j);return{publicHref:F.pathname+F.search+F.hash,href:C,url:F.href,pathname:_,search:R,searchStr:A,state:k,hash:N??"",unmaskOnReload:o.unmaskOnReload}},s=(o={},u)=>{const c=a(o);let p=u?a(u):void 0;if(!p){let f={};const h=this.options.routeMasks?.find(m=>{const b=$y(c.pathname,{to:m.from,caseSensitive:!1,fuzzy:!1},this.parsePathnameCache);return b?(f=b,!0):!1});if(h){const{from:m,...b}=h;u={from:n.from,...b,params:f},p=a(u)}}return p&&(c.maskedLocation=p),c};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:a,...s})=>{const o=()=>{const p=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];p.forEach(h=>{s.state[h]=this.latestLocation.state[h]});const f=qa(s.state,this.latestLocation.state);return p.forEach(h=>{delete s.state[h]}),f},u=ha(this.latestLocation.href)===ha(s.href),c=this.commitLocationPromise;if(this.commitLocationPromise=Ki(()=>{c?.resolve()}),u&&o())this.load();else{let{maskedLocation:p,hashScrollIntoView:f,...h}=s;p&&(h={...p,state:{...p.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:a})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:a,hashScrollIntoView:s,viewTransition:o,ignoreBlocker:u,href:c,...p}={})=>{if(c){const h=this.history.location.state.__TSR_index,m=mu(c,{__TSR_index:n?h:h+1});p.to=m.pathname,p.search=this.options.parseSearch(m.search),p.hash=m.hash.slice(1)}const f=this.buildLocation({...p,_includeValidateSearch:!0});return this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:a,hashScrollIntoView:s,ignoreBlocker:u})},this.navigate=({to:n,reloadDocument:a,href:s,...o})=>{if(!a&&s)try{new URL(`${s}`),a=!0}catch{}return a?(s||(s=this.buildLocation({to:n,...o}).url),o.replace?window.location.replace(s):window.location.href=s,Promise.resolve()):this.buildAndCommitLocation({...o,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const a=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),s=o=>{try{return encodeURI(decodeURI(o))}catch{return o}};if(au(s(this.latestLocation.href))!==au(s(a.href)))throw F1({href:a.href})}const n=this.matchRoutes(this.latestLocation);this.__store.setState(a=>({...a,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:a.cachedMatches.filter(s=>!n.some(o=>o.id===s.id))}))},this.load=async n=>{let a,s,o;for(o=new Promise(u=>{this.startTransition(async()=>{try{this.beforeLoad();const c=this.latestLocation,p=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...$a({resolvedLocation:p,location:c})}),this.emit({type:"onBeforeLoad",...$a({resolvedLocation:p,location:c})}),await KT({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:c,updateMatch:this.updateMatch,onReady:async()=>{this.startViewTransition(async()=>{let f,h,m;lo(()=>{this.__store.setState(b=>{const y=b.matches,E=b.pendingMatches||b.matches;return f=y.filter(x=>!E.some(w=>w.id===x.id)),h=E.filter(x=>!y.some(w=>w.id===x.id)),m=y.filter(x=>E.some(w=>w.id===x.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...f.filter(x=>x.status!=="error")]}}),this.clearExpiredCache()}),[[f,"onLeave"],[h,"onEnter"],[m,"onStay"]].forEach(([b,y])=>{b.forEach(E=>{this.looseRoutesById[E.routeId].options[y]?.(E)})})})}})}catch(c){rr(c)?(a=c,this.isServer||this.navigate({...a.options,replace:!0,ignoreBlocker:!0})):sr(c)&&(s=c),this.__store.setState(p=>({...p,statusCode:a?a.status:s?404:p.matches.some(f=>f.status==="error")?500:200,redirect:a}))}this.latestLoadPromise===o&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),u()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;this.hasNotFoundMatch()&&this.__store.setState(u=>({...u,statusCode:404}))},this.startViewTransition=n=>{const a=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,a&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof a=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,u=this.state.resolvedLocation,c=typeof a.types=="function"?a.types($a({resolvedLocation:u,location:o})):a.types;s={update:n,types:c}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,a)=>{const s=this.state.pendingMatches?.some(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";s&&this.__store.setState(o=>({...o,[s]:o[s]?.map(u=>u.id===n?a(u):u)}))},this.getMatch=n=>{const a=s=>s.id===n;return this.state.cachedMatches.find(a)??this.state.pendingMatches?.find(a)??this.state.matches.find(a)},this.invalidate=n=>{const a=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(a),cachedMatches:s.cachedMatches.map(a),pendingMatches:s.pendingMatches?.map(a)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.resolveRedirect=n=>{if(!n.options.href){const a=this.buildLocation(n.options);let s=a.url;this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),n.options.href=a.href,n.headers.set("Location",s)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const a=n?.filter;a!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(o=>!a(o))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=a=>{const s=this.looseRoutesById[a.routeId];if(!s.options.loader)return!0;const o=(a.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return a.status==="error"?!0:Date.now()-a.updatedAt>=o};this.clearCache({filter:n})},this.loadRouteChunk=z1,this.preloadRoute=async n=>{const a=this.buildLocation(n);let s=this.matchRoutes(a,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(c=>c.id)),u=new Set([...o,...this.state.cachedMatches.map(c=>c.id)]);lo(()=>{s.forEach(c=>{u.has(c.id)||this.__store.setState(p=>({...p,cachedMatches:[...p.cachedMatches,c]}))})});try{return s=await KT({router:this,matches:s,location:a,preload:!0,updateMatch:(c,p)=>{o.has(c)?s=s.map(f=>f.id===c?p(f):f):this.updateMatch(c,p)}}),s}catch(c){if(rr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:a});sr(c)||console.error(c);return}},this.matchRoute=(n,a)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(s);if(a?.pending&&this.state.status!=="pending")return!1;const c=(a?.pending===void 0?!this.state.isLoading:a.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,p=$y(c.pathname,{...a,to:o.pathname},this.parsePathnameCache);return!p||n.params&&!qa(p,n.params,{partial:!0})?!1:p&&(a?.includeSearch??!0)?qa(c.search,o.search,{partial:!0})?p:!1:p},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...t,caseSensitive:t.caseSensitive??!1,notFoundMode:t.notFoundMode??"fuzzy",stringifySearch:t.stringifySearch??lF,parseSearch:t.parseSearch??oF}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(t,n){const{foundRoute:a,matchedRoutes:s,routeParams:o}=this.getMatchedRoutes(t.pathname,n?.dest?.to);let u=!1;(a?a.path!=="/"&&o["**"]:ha(t.pathname))&&(this.options.notFoundRoute?s.push(this.options.notFoundRoute):u=!0);const c=(()=>{if(u){if(this.options.notFoundMode!=="root")for(let h=s.length-1;h>=0;h--){const m=s[h];if(m.children)return m.id}return Tn}})(),p=[],f=h=>h?.id?h.context??this.options.context??void 0:this.options.context??void 0;return s.forEach((h,m)=>{const b=p[m-1],[y,E,x]=(()=>{const z=b?.search??t.search,Z=b?._strictSearch??void 0;try{const H=Hy(h.options.validateSearch,{...z})??void 0;return[{...z,...H},{...Z,...H},void 0]}catch(H){let K=H;if(H instanceof vu||(K=new vu(H.message,{cause:H})),n?.throwOnError)throw K;return[z,{},K]}})(),w=h.options.loaderDeps?.({search:y})??"",_=w?JSON.stringify(w):"",{interpolatedPath:R,usedParams:A}=Hl({path:h.fullPath,params:o,decodeCharMap:this.pathParamsDecodeCharMap}),N=Hl({path:h.id,params:o,leaveWildcards:!0,decodeCharMap:this.pathParamsDecodeCharMap,parseCache:this.parsePathnameCache}).interpolatedPath+_,D=this.getMatch(N),k=this.state.matches.find(z=>z.routeId===h.id),C=D?._strictParams??A;let j;if(!D){const z=h.options.params?.parse??h.options.parseParams;if(z)try{Object.assign(C,z(C))}catch(Z){if(j=new vF(Z.message,{cause:Z}),n?.throwOnError)throw j}}Object.assign(o,C);const F=k?"stay":"enter";let L;if(D)L={...D,cause:F,params:k?zn(k.params,o):o,_strictParams:C,search:zn(k?k.search:D.search,y),_strictSearch:E};else{const z=h.options.loader||h.options.beforeLoad||h.lazyFn||q1(h)?"pending":"success";L={id:N,index:m,routeId:h.id,params:k?zn(k.params,o):o,_strictParams:C,pathname:R,updatedAt:Date.now(),search:k?zn(k.search,y):y,_strictSearch:E,searchError:void 0,status:z,isFetching:!1,error:void 0,paramsError:j,__routeContext:void 0,_nonReactive:{loadPromise:Ki()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:k?zn(k.loaderDeps,w):w,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:h.options.staticData||{},fullPath:h.fullPath}}n?.preload||(L.globalNotFound=c===h.id),L.searchError=x;const q=f(b);L.context={...q,...L.__routeContext,...L.__beforeLoadContext},p.push(L)}),p.forEach((h,m)=>{const b=this.looseRoutesById[h.routeId];if(!this.getMatch(h.id)&&n?._buildLocation!==!0){const E=p[m-1],x=f(E);if(b.options.context){const w={deps:h.loaderDeps,params:h.params,context:x??{},location:t,navigate:_=>this.navigate({..._,_fromLocation:t}),buildLocation:this.buildLocation,cause:h.cause,abortController:h.abortController,preload:!!h.preload,matches:p};h.__routeContext=b.options.context(w)??void 0}h.context={...x,...h.__routeContext,...h.__beforeLoadContext}}}),p}}class vu extends Error{}class vF extends Error{}function EF(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Hy(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new vu("Async validation not supported");if(n.issues)throw new vu(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function xF({pathname:e,routePathname:t,caseSensitive:n,routesByPath:a,routesById:s,flatRoutes:o,parseCache:u}){let c={};const p=ha(e),f=y=>$y(p,{to:y.fullPath,caseSensitive:y.options?.caseSensitive??n,fuzzy:!0},u);let h=t!==void 0?a[t]:void 0;if(h)c=f(h);else{let y;for(const E of o){const x=f(E);if(x)if(E.path!=="/"&&x["**"])y||(y={foundRoute:E,routeParams:x});else{h=E,c=x;break}}!h&&y&&(h=y.foundRoute,c=y.routeParams)}let m=h||s[Tn];const b=[m];for(;m.parentRoute;)m=m.parentRoute,b.push(m);return b.reverse(),{matchedRoutes:b,routeParams:c,foundRoute:h}}function wF({search:e,dest:t,destRoutes:n,_includeValidateSearch:a}){const s=n.reduce((c,p)=>{const f=[];if("search"in p.options)p.options.search?.middlewares&&f.push(...p.options.search.middlewares);else if(p.options.preSearchFilters||p.options.postSearchFilters){const h=({search:m,next:b})=>{let y=m;"preSearchFilters"in p.options&&p.options.preSearchFilters&&(y=p.options.preSearchFilters.reduce((x,w)=>w(x),m));const E=b(y);return"postSearchFilters"in p.options&&p.options.postSearchFilters?p.options.postSearchFilters.reduce((x,w)=>w(x),E):E};f.push(h)}if(a&&p.options.validateSearch){const h=({search:m,next:b})=>{const y=b(m);try{return{...y,...Hy(p.options.validateSearch,y)??void 0}}catch{return y}};f.push(h)}return c.concat(f)},[])??[],o=({search:c})=>t.search?t.search===!0?c:za(t.search,c):{};s.push(o);const u=(c,p)=>{if(c>=s.length)return p;const f=s[c];return f({search:p,next:m=>u(c+1,m)})};return u(0,e)}const TF="Error preloading route! ☝️";class V1{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const a=this.options,s=!a?.path&&!a?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Tn:this.parentRoute||Dr(!1);let o=s?Tn:a?.path;o&&o!=="/"&&(o=kS(o));const u=a?.id||o;let c=s?Tn:Lr([this.parentRoute.id===Tn?"":this.parentRoute.id,u]);o===Tn&&(o="/"),c!==Tn&&(c=Lr(["/",c]));const p=c===Tn?"/":Lr([this.parentRoute.fullPath,o]);this._path=o,this._id=c,this._fullPath=p,this._to=p},this.clone=n=>{this._path=n._path,this._id=n._id,this._fullPath=n._fullPath,this._to=n._to,this.options.getParentRoute=n.options.getParentRoute,this.children=n.children},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=t||{},this.isRoot=!t?.getParentRoute,t?.id&&t?.path)throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class AF extends V1{constructor(t){super(t)}}function NS(e){const t=e.errorComponent??Lu;return v.jsx(RF,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:a})=>n?U.createElement(t,{error:n,reset:a}):e.children})}class RF extends U.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(t){return{resetKey:t.getResetKey()}}static getDerivedStateFromError(t){return{error:t}}reset(){this.setState({error:null})}componentDidUpdate(t,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(t,n){this.props.onCatch&&this.props.onCatch(t,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function Lu({error:e}){const[t,n]=U.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(a=>!a),children:t?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),t?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?v.jsx("code",{children:e.message}):null})}):null]})}function _F({children:e,fallback:t=null}){return kF()?v.jsx(Bt.Fragment,{children:e}):v.jsx(Bt.Fragment,{children:t})}function kF(){return Bt.useSyncExternalStore(NF,()=>!0,()=>!1)}function NF(){return()=>{}}var vp={exports:{}},Ep={},xp={exports:{}},wp={};/**
|
|
50
50
|
* @license React
|
|
51
51
|
* use-sync-external-store-shim.production.js
|
|
52
52
|
*
|
|
@@ -347,7 +347,7 @@ Error generating stack: `+d.message+`
|
|
|
347
347
|
|
|
348
348
|
`);j=z.pop()??"";for(const Z of z){const H=Z.split(`
|
|
349
349
|
`),K=[];let G;for(const de of H)if(de.startsWith("data:"))K.push(de.replace(/^data:\s*/,""));else if(de.startsWith("event:"))G=de.replace(/^event:\s*/,"");else if(de.startsWith("id:"))m=de.replace(/^id:\s*/,"");else if(de.startsWith("retry:")){const M=Number.parseInt(de.replace(/^retry:\s*/,""),10);Number.isNaN(M)||(x=M)}let ne,ae=!1;if(K.length){const de=K.join(`
|
|
350
|
-
`);try{ne=JSON.parse(de),ae=!0}catch{ne=de}}ae&&(s&&await s(ne),a&&(ne=await a(ne))),n?.({data:ne,event:G,id:m,retry:x}),K.length&&(yield ne)}}}finally{_.removeEventListener("abort",F),C.releaseLock()}break}catch(A){if(t?.(A),u!==void 0&&w>=u)break;const N=Math.min(x*2**(w-1),c??3e4);await b(N)}}}()}},Ez=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},xz=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},wz=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},BO=({allowReserved:e,explode:t,name:n,style:a,value:s})=>{if(!t){const c=(e?s:s.map(p=>encodeURIComponent(p))).join(xz(a));switch(a){case"label":return`.${c}`;case"matrix":return`;${n}=${c}`;case"simple":return c;default:return`${n}=${c}`}}const o=Ez(a),u=s.map(c=>a==="label"||a==="simple"?e?c:encodeURIComponent(c):$u({allowReserved:e,name:n,value:c})).join(o);return a==="label"||a==="matrix"?o+u:u},$u=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},jO=({allowReserved:e,explode:t,name:n,style:a,value:s,valueOnly:o})=>{if(s instanceof Date)return o?s.toISOString():`${n}=${s.toISOString()}`;if(a!=="deepObject"&&!t){let p=[];Object.entries(s).forEach(([h,m])=>{p=[...p,h,e?m:encodeURIComponent(m)]});const f=p.join(",");switch(a){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const u=wz(a),c=Object.entries(s).map(([p,f])=>$u({allowReserved:e,name:a==="deepObject"?`${n}[${p}]`:p,value:f})).join(u);return a==="label"||a==="matrix"?u+c:c},Tz=/\{[^{}]+\}/g,Az=({path:e,url:t})=>{let n=t;const a=t.match(Tz);if(a)for(const s of a){let o=!1,u=s.substring(1,s.length-1),c="simple";u.endsWith("*")&&(o=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),c="label"):u.startsWith(";")&&(u=u.substring(1),c="matrix");const p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(s,BO({explode:o,name:u,style:c,value:p}));continue}if(typeof p=="object"){n=n.replace(s,jO({explode:o,name:u,style:c,value:p,valueOnly:!0}));continue}if(c==="matrix"){n=n.replace(s,`;${$u({name:u,value:p})}`);continue}const f=encodeURIComponent(c==="label"?`.${p}`:p);n=n.replace(s,f)}return n},Rz=({baseUrl:e,path:t,query:n,querySerializer:a,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let u=(e??"")+o;t&&(u=Az({path:t,url:u}));let c=n?a(n):"";return c.startsWith("?")&&(c=c.substring(1)),c&&(u+=`?${c}`),u};function _z(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const kz=async(e,t)=>{const n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},Nz=({allowReserved:e,array:t,object:n}={})=>s=>{const o=[];if(s&&typeof s=="object")for(const u in s){const c=s[u];if(c!=null)if(Array.isArray(c)){const p=BO({allowReserved:e,explode:!0,name:u,style:"form",value:c,...t});p&&o.push(p)}else if(typeof c=="object"){const p=jO({allowReserved:e,explode:!0,name:u,style:"deepObject",value:c,...n});p&&o.push(p)}else{const p=$u({allowReserved:e,name:u,value:c});p&&o.push(p)}}return o.join("&")},Cz=(e,t)=>t?t in e.headers||e.query?.[t]?!0:"Cookie"in e.headers&&e.headers.Cookie&&typeof e.headers.Cookie=="string"?e.headers.Cookie.includes(`${t}=`):!1:!1,Oz=async({security:e,...t})=>{for(const n of e){if(Cz(t,n.name))continue;const a=await kz(n,t.auth);if(!a)continue;const s=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[s]=a;break;case"cookie":{const o=`${s}=${a}`;"Cookie"in t.headers&&t.headers.Cookie?t.headers.Cookie=`${t.headers.Cookie}; ${o}`:t.headers.Cookie=o;break}case"header":default:t.headers[s]=a;break}}},DA=e=>{const t=e.axios?.defaults?.baseURL,n=e.baseURL&&typeof e.baseURL=="string"?e.baseURL:t;return Rz({baseUrl:n,path:e.path,query:e.paramsSerializer?void 0:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Nz(e.querySerializer),url:e.url})},MA=(e,t)=>{const n={...e,...t};return n.headers=iS(e.headers,t.headers),n},Iz=["common","delete","get","head","patch","post","put"],iS=(...e)=>{const t={};for(const n of e){if(!n||typeof n!="object")continue;const a=Object.entries(n);for(const[s,o]of a)if(Iz.includes(s)&&typeof o=="object")t[s]={...t[s],...o};else if(o===null)delete t[s];else if(Array.isArray(o))for(const u of o)t[s]=[...t[s]??[],u];else o!==void 0&&(t[s]=typeof o=="object"?JSON.stringify(o):o)}return t},PO=(e={})=>({...e}),Lz=(e={})=>{let t=MA(PO(),e),n;if(t.axios&&!("Axios"in t.axios))n=t.axios;else{const{auth:f,...h}=t;n=ht.create(h)}const a=()=>({...t}),s=f=>(t=MA(t,f),n.defaults={...n.defaults,...t,headers:iS(n.defaults.headers,t.headers)},a()),o=async f=>{const h={...t,...f,axios:f.axios??t.axios??n,headers:iS(t.headers,f.headers)};h.security&&await Oz({...h,security:h.security}),h.requestValidator&&await h.requestValidator(h),h.body!==void 0&&h.bodySerializer&&(h.body=h.bodySerializer(h.body));const m=DA(h);return{opts:h,url:m}},u=async f=>{const{opts:h,url:m}=await o(f);try{const b=h.axios,{auth:y,...E}=h,x=await b({...E,baseURL:"",data:_z(h),headers:h.headers,params:h.paramsSerializer?h.query:void 0,url:m});let{data:w}=x;return h.responseType==="json"&&(h.responseValidator&&await h.responseValidator(w),h.responseTransformer&&(w=await h.responseTransformer(w))),{...x,data:w??{}}}catch(b){const y=b;if(h.throwOnError)throw y;return y.error=y.response?.data??{},y}},c=f=>h=>u({...h,method:f}),p=f=>async h=>{const{opts:m,url:b}=await o(h);return vz({...m,body:m.body,headers:m.headers,method:f,signal:m.signal,url:b})};return{buildUrl:DA,connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),getConfig:a,head:c("HEAD"),instance:n,options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),request:u,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:c("TRACE")}},Dz=(e={})=>({...e,baseURL:e.baseURL}),Rt=Lz(Dz(PO())),Mz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/sessions",...e}),Fz=e=>(e?.client??Rt).post({responseType:"json",url:"/v1/sessions",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Uz=e=>(e.client??Rt).delete({responseType:"json",url:"/v1/sessions/{sessionId}/abort",...e}),Bz=e=>(e.client??Rt).get({responseType:"json",url:"/v1/sessions/{id}/messages",...e}),jz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/sessions/{id}/messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/config",...e}),zz=e=>(e.client??Rt).get({responseType:"json",url:"/v1/config/providers/{provider}/models",...e}),qz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/files",...e}),$z=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/git/status",...e}),Gz=e=>(e.client??Rt).get({responseType:"json",url:"/v1/git/diff",...e}),Hz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/git/branch",...e}),Vz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/stage",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/unstage",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/commit",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wz=e=>(e?.client??Rt).post({responseType:"json",url:"/v1/git/generate-commit-message",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Xz=e=>(e?.client??Rt).post({responseType:"json",url:"/v1/git/push",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Zz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/restore",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/delete",...e,headers:{"Content-Type":"application/json",...e.headers}});function Jz(){const e=window;return e.AGI_SERVER_URL?e.AGI_SERVER_URL:e.__AGI_API_URL__?e.__AGI_API_URL__:"http://localhost:9100"}const $S=Jz();function vt(e){if(!e)return"Unknown error";if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;if(t.error&&typeof t.error=="object"){const n=t.error;if(typeof n.message=="string")return n.message}if(typeof t.error=="string")return t.error;if(typeof t.message=="string")return t.message;try{return JSON.stringify(e)}catch{return"Error occurred (unable to parse)"}}return"Unknown error"}function eq(){const t=window.AGI_SERVER_URL||$S;Rt.setConfig({baseURL:t})}eq();function Op(e){return{...e,title:e.title??null,createdAt:typeof e.createdAt=="string"?new Date(e.createdAt).getTime():e.createdAt,lastActiveAt:typeof e.lastActiveAt=="string"?new Date(e.lastActiveAt).getTime():e.lastActiveAt}}function tq(e){return{...e,createdAt:typeof e.createdAt=="string"?new Date(e.createdAt).getTime():e.createdAt,completedAt:e.completedAt?typeof e.completedAt=="string"?new Date(e.completedAt).getTime():e.completedAt:null}}class nq{get baseUrl(){const t=window;return t.AGI_SERVER_URL?t.AGI_SERVER_URL:$S}async getSessions(){const t=await Mz();if(t.error)throw new Error(vt(t.error));return(t.data||[]).map(Op)}async createSession(t){const n=await Fz({body:t});if(n.error)throw new Error(vt(n.error));if(!n.data)throw new Error("No data returned from create session");return Op(n.data)}async updateSession(t,n){const a=await fetch(`${this.baseUrl}/v1/sessions/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const o=await a.json().catch(()=>({error:"Failed to update session"}));throw new Error(vt(o))}const s=await a.json();return Op(s)}async abortSession(t){const n=await Uz({path:{sessionId:t}});if(n.error)throw new Error(vt(n.error));return n.data}async getMessages(t){const n=await Bz({path:{id:t}});if(n.error)throw new Error(vt(n.error));return(n.data||[]).map(tq)}async sendMessage(t,n){const a=await jz({path:{id:t},body:n});if(a.error)throw new Error(vt(a.error));return a.data}getStreamUrl(t){return`${this.baseUrl}/v1/sessions/${t}/stream`}async getConfig(){const t=await Pz();if(t.error)throw new Error(vt(t.error));return t.data}async getModels(t){const n=await zz({path:{provider:t}});if(n.error)throw new Error(vt(n.error));return n.data}async getAllModels(){const t=await fetch(`${this.baseUrl}/v1/config/models`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to fetch models"}));throw new Error(vt(n))}return await t.json()}async getGitStatus(){const t=await $z();if(t.error)throw new Error(vt(t.error));return t.data?.data}async getGitDiff(t,n=!1){const a=await Gz({query:{file:t,staged:n?"true":"false"}});if(a.error)throw new Error(vt(a.error));return a.data?.data}async generateCommitMessage(){const t=await Wz({body:{}});if(t.error)throw new Error(vt(t.error));return t.data?.data}async stageFiles(t){const n=await Vz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async unstageFiles(t){const n=await Yz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async restoreFiles(t){const n=await Zz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async deleteFiles(t){const n=await Qz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async commitChanges(t){const n=await Kz({body:{message:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async getGitBranch(){const t=await Hz();if(t.error)throw new Error(vt(t.error));return t.data?.data}async pushCommits(){const t=await Xz({body:{}});if(t.error)throw new Error(vt(t.error));return t.data?.data}async listFiles(){const t=await qz();if(t.error)throw new Error(vt(t.error));return t.data}}const _t=new nq;function rq(){return Xa({queryKey:["files"],queryFn:async()=>await _t.listFiles(),staleTime:6e4,retry:1})}const zO="agi-preferences",Ip={vimMode:!1};function aq(){if(typeof window>"u")return Ip;try{const e=window.localStorage.getItem(zO);if(e){const t=JSON.parse(e);return{...Ip,...t}}}catch(e){console.warn("Failed to load preferences",e)}return Ip}function iq(){const[e,t]=U.useState(()=>aq());U.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(zO,JSON.stringify(e))}catch(a){console.warn("Failed to persist preferences",a)}},[e]);const n=U.useCallback(a=>{t(s=>({...s,...a}))},[]);return U.useMemo(()=>({preferences:e,updatePreferences:n}),[e,n])}function sq({enabled:e,onSend:t,textareaRef:n,setMessage:a}){const[s,o]=U.useState(e?"normal":"insert"),[u,c]=U.useState(""),p=U.useCallback((b,y)=>{for(;y<b.length&&/\S/.test(b[y]);)y++;for(;y<b.length&&/\s/.test(b[y]);)y++;return Math.min(y,b.length)},[]),f=U.useCallback((b,y)=>{for(y<b.length&&/\S/.test(b[y])&&y++;y<b.length&&/\s/.test(b[y]);)y++;for(;y<b.length&&/\S/.test(b[y]);)y++;return Math.max(0,y-1)},[]),h=U.useCallback((b,y)=>{for(y=Math.max(0,y-1);y>0&&/\s/.test(b[y]);)y--;for(;y>0&&/\S/.test(b[y-1]);)y--;return y},[]),m=U.useCallback(b=>{const y=n.current;if(!y)return!1;const E=b.key;if(E==="i")return b.preventDefault(),o("insert"),!0;if(E==="a"){b.preventDefault(),o("insert");const x=y.selectionStart;return setTimeout(()=>{y.setSelectionRange(x+1,x+1)},0),!0}if(E==="I"){b.preventDefault(),o("insert");const w=y.value.lastIndexOf(`
|
|
350
|
+
`);try{ne=JSON.parse(de),ae=!0}catch{ne=de}}ae&&(s&&await s(ne),a&&(ne=await a(ne))),n?.({data:ne,event:G,id:m,retry:x}),K.length&&(yield ne)}}}finally{_.removeEventListener("abort",F),C.releaseLock()}break}catch(A){if(t?.(A),u!==void 0&&w>=u)break;const N=Math.min(x*2**(w-1),c??3e4);await b(N)}}}()}},Ez=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},xz=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},wz=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},BO=({allowReserved:e,explode:t,name:n,style:a,value:s})=>{if(!t){const c=(e?s:s.map(p=>encodeURIComponent(p))).join(xz(a));switch(a){case"label":return`.${c}`;case"matrix":return`;${n}=${c}`;case"simple":return c;default:return`${n}=${c}`}}const o=Ez(a),u=s.map(c=>a==="label"||a==="simple"?e?c:encodeURIComponent(c):$u({allowReserved:e,name:n,value:c})).join(o);return a==="label"||a==="matrix"?o+u:u},$u=({allowReserved:e,name:t,value:n})=>{if(n==null)return"";if(typeof n=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?n:encodeURIComponent(n)}`},jO=({allowReserved:e,explode:t,name:n,style:a,value:s,valueOnly:o})=>{if(s instanceof Date)return o?s.toISOString():`${n}=${s.toISOString()}`;if(a!=="deepObject"&&!t){let p=[];Object.entries(s).forEach(([h,m])=>{p=[...p,h,e?m:encodeURIComponent(m)]});const f=p.join(",");switch(a){case"form":return`${n}=${f}`;case"label":return`.${f}`;case"matrix":return`;${n}=${f}`;default:return f}}const u=wz(a),c=Object.entries(s).map(([p,f])=>$u({allowReserved:e,name:a==="deepObject"?`${n}[${p}]`:p,value:f})).join(u);return a==="label"||a==="matrix"?u+c:c},Tz=/\{[^{}]+\}/g,Az=({path:e,url:t})=>{let n=t;const a=t.match(Tz);if(a)for(const s of a){let o=!1,u=s.substring(1,s.length-1),c="simple";u.endsWith("*")&&(o=!0,u=u.substring(0,u.length-1)),u.startsWith(".")?(u=u.substring(1),c="label"):u.startsWith(";")&&(u=u.substring(1),c="matrix");const p=e[u];if(p==null)continue;if(Array.isArray(p)){n=n.replace(s,BO({explode:o,name:u,style:c,value:p}));continue}if(typeof p=="object"){n=n.replace(s,jO({explode:o,name:u,style:c,value:p,valueOnly:!0}));continue}if(c==="matrix"){n=n.replace(s,`;${$u({name:u,value:p})}`);continue}const f=encodeURIComponent(c==="label"?`.${p}`:p);n=n.replace(s,f)}return n},Rz=({baseUrl:e,path:t,query:n,querySerializer:a,url:s})=>{const o=s.startsWith("/")?s:`/${s}`;let u=(e??"")+o;t&&(u=Az({path:t,url:u}));let c=n?a(n):"";return c.startsWith("?")&&(c=c.substring(1)),c&&(u+=`?${c}`),u};function _z(e){const t=e.body!==void 0;if(t&&e.bodySerializer)return"serializedBody"in e?e.serializedBody!==void 0&&e.serializedBody!==""?e.serializedBody:null:e.body!==""?e.body:null;if(t)return e.body}const kz=async(e,t)=>{const n=typeof t=="function"?await t(e):t;if(n)return e.scheme==="bearer"?`Bearer ${n}`:e.scheme==="basic"?`Basic ${btoa(n)}`:n},Nz=({allowReserved:e,array:t,object:n}={})=>s=>{const o=[];if(s&&typeof s=="object")for(const u in s){const c=s[u];if(c!=null)if(Array.isArray(c)){const p=BO({allowReserved:e,explode:!0,name:u,style:"form",value:c,...t});p&&o.push(p)}else if(typeof c=="object"){const p=jO({allowReserved:e,explode:!0,name:u,style:"deepObject",value:c,...n});p&&o.push(p)}else{const p=$u({allowReserved:e,name:u,value:c});p&&o.push(p)}}return o.join("&")},Cz=(e,t)=>t?t in e.headers||e.query?.[t]?!0:"Cookie"in e.headers&&e.headers.Cookie&&typeof e.headers.Cookie=="string"?e.headers.Cookie.includes(`${t}=`):!1:!1,Oz=async({security:e,...t})=>{for(const n of e){if(Cz(t,n.name))continue;const a=await kz(n,t.auth);if(!a)continue;const s=n.name??"Authorization";switch(n.in){case"query":t.query||(t.query={}),t.query[s]=a;break;case"cookie":{const o=`${s}=${a}`;"Cookie"in t.headers&&t.headers.Cookie?t.headers.Cookie=`${t.headers.Cookie}; ${o}`:t.headers.Cookie=o;break}case"header":default:t.headers[s]=a;break}}},DA=e=>{const t=e.axios?.defaults?.baseURL,n=e.baseURL&&typeof e.baseURL=="string"?e.baseURL:t;return Rz({baseUrl:n,path:e.path,query:e.paramsSerializer?void 0:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:Nz(e.querySerializer),url:e.url})},MA=(e,t)=>{const n={...e,...t};return n.headers=iS(e.headers,t.headers),n},Iz=["common","delete","get","head","patch","post","put"],iS=(...e)=>{const t={};for(const n of e){if(!n||typeof n!="object")continue;const a=Object.entries(n);for(const[s,o]of a)if(Iz.includes(s)&&typeof o=="object")t[s]={...t[s],...o};else if(o===null)delete t[s];else if(Array.isArray(o))for(const u of o)t[s]=[...t[s]??[],u];else o!==void 0&&(t[s]=typeof o=="object"?JSON.stringify(o):o)}return t},PO=(e={})=>({...e}),Lz=(e={})=>{let t=MA(PO(),e),n;if(t.axios&&!("Axios"in t.axios))n=t.axios;else{const{auth:f,...h}=t;n=ht.create(h)}const a=()=>({...t}),s=f=>(t=MA(t,f),n.defaults={...n.defaults,...t,headers:iS(n.defaults.headers,t.headers)},a()),o=async f=>{const h={...t,...f,axios:f.axios??t.axios??n,headers:iS(t.headers,f.headers)};h.security&&await Oz({...h,security:h.security}),h.requestValidator&&await h.requestValidator(h),h.body!==void 0&&h.bodySerializer&&(h.body=h.bodySerializer(h.body));const m=DA(h);return{opts:h,url:m}},u=async f=>{const{opts:h,url:m}=await o(f);try{const b=h.axios,{auth:y,...E}=h,x=await b({...E,baseURL:"",data:_z(h),headers:h.headers,params:h.paramsSerializer?h.query:void 0,url:m});let{data:w}=x;return h.responseType==="json"&&(h.responseValidator&&await h.responseValidator(w),h.responseTransformer&&(w=await h.responseTransformer(w))),{...x,data:w??{}}}catch(b){const y=b;if(h.throwOnError)throw y;return y.error=y.response?.data??{},y}},c=f=>h=>u({...h,method:f}),p=f=>async h=>{const{opts:m,url:b}=await o(h);return vz({...m,body:m.body,headers:m.headers,method:f,signal:m.signal,url:b})};return{buildUrl:DA,connect:c("CONNECT"),delete:c("DELETE"),get:c("GET"),getConfig:a,head:c("HEAD"),instance:n,options:c("OPTIONS"),patch:c("PATCH"),post:c("POST"),put:c("PUT"),request:u,setConfig:s,sse:{connect:p("CONNECT"),delete:p("DELETE"),get:p("GET"),head:p("HEAD"),options:p("OPTIONS"),patch:p("PATCH"),post:p("POST"),put:p("PUT"),trace:p("TRACE")},trace:c("TRACE")}},Dz=(e={})=>({...e,baseURL:e.baseURL}),Rt=Lz(Dz(PO())),Mz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/sessions",...e}),Fz=e=>(e?.client??Rt).post({responseType:"json",url:"/v1/sessions",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Uz=e=>(e.client??Rt).delete({responseType:"json",url:"/v1/sessions/{sessionId}/abort",...e}),Bz=e=>(e.client??Rt).get({responseType:"json",url:"/v1/sessions/{id}/messages",...e}),jz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/sessions/{id}/messages",...e,headers:{"Content-Type":"application/json",...e.headers}}),Pz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/config",...e}),zz=e=>(e.client??Rt).get({responseType:"json",url:"/v1/config/providers/{provider}/models",...e}),qz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/files",...e}),$z=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/git/status",...e}),Gz=e=>(e.client??Rt).get({responseType:"json",url:"/v1/git/diff",...e}),Hz=e=>(e?.client??Rt).get({responseType:"json",url:"/v1/git/branch",...e}),Vz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/stage",...e,headers:{"Content-Type":"application/json",...e.headers}}),Yz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/unstage",...e,headers:{"Content-Type":"application/json",...e.headers}}),Kz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/commit",...e,headers:{"Content-Type":"application/json",...e.headers}}),Wz=e=>(e?.client??Rt).post({responseType:"json",url:"/v1/git/generate-commit-message",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Xz=e=>(e?.client??Rt).post({responseType:"json",url:"/v1/git/push",...e,headers:{"Content-Type":"application/json",...e?.headers}}),Zz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/restore",...e,headers:{"Content-Type":"application/json",...e.headers}}),Qz=e=>(e.client??Rt).post({responseType:"json",url:"/v1/git/delete",...e,headers:{"Content-Type":"application/json",...e.headers}});function Jz(){const e=window;return e.AGI_SERVER_URL?e.AGI_SERVER_URL:e.__AGI_API_URL__?e.__AGI_API_URL__:"http://localhost:9100"}const $S=Jz();function vt(e){if(!e)return"Unknown error";if(typeof e=="string")return e;if(e&&typeof e=="object"){const t=e;if(t.error&&typeof t.error=="object"){const n=t.error;if(typeof n.message=="string")return n.message}if(typeof t.error=="string")return t.error;if(typeof t.message=="string")return t.message;try{return JSON.stringify(e)}catch{return"Error occurred (unable to parse)"}}return"Unknown error"}function eq(){const t=window.AGI_SERVER_URL||$S;Rt.setConfig({baseURL:t})}eq();function Op(e){return{...e,title:e.title??null,createdAt:typeof e.createdAt=="string"?new Date(e.createdAt).getTime():e.createdAt,lastActiveAt:typeof e.lastActiveAt=="string"?new Date(e.lastActiveAt).getTime():e.lastActiveAt}}function tq(e){return{...e,createdAt:typeof e.createdAt=="string"?new Date(e.createdAt).getTime():e.createdAt,completedAt:e.completedAt?typeof e.completedAt=="string"?new Date(e.completedAt).getTime():e.completedAt:null}}class nq{get baseUrl(){const t=window;return t.AGI_SERVER_URL?t.AGI_SERVER_URL:$S}async getSessions(){const t=await Mz();if(t.error)throw new Error(vt(t.error));return(t.data||[]).map(Op)}async createSession(t){const n=await Fz({body:t});if(n.error)throw new Error(vt(n.error));if(!n.data)throw new Error("No data returned from create session");return Op(n.data)}async updateSession(t,n){const a=await fetch(`${this.baseUrl}/v1/sessions/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const o=await a.json().catch(()=>({error:"Failed to update session"}));throw new Error(vt(o))}const s=await a.json();return Op(s)}async abortSession(t){const n=await Uz({path:{sessionId:t}});if(n.error)throw new Error(vt(n.error));return n.data}async getMessages(t){const n=await Bz({path:{id:t}});if(n.error)throw new Error(vt(n.error));return(n.data||[]).map(tq)}async sendMessage(t,n){const a=await jz({path:{id:t},body:n});if(a.error)throw new Error(vt(a.error));return a.data}getStreamUrl(t){return`${this.baseUrl}/v1/sessions/${t}/stream`}async getConfig(){const t=await Pz();if(t.error)throw new Error(vt(t.error));return t.data}async getModels(t){const n=await zz({path:{provider:t}});if(n.error)throw new Error(vt(n.error));return n.data}async getAllModels(){const t=await fetch(`${this.baseUrl}/v1/config/models`,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok){const n=await t.json().catch(()=>({error:"Failed to fetch models"}));throw new Error(vt(n))}return await t.json()}async getGitStatus(){const t=await $z();if(t.error)throw new Error(vt(t.error));return t.data?.data}async getGitDiff(t,n=!1){const a=await Gz({query:{file:t,staged:n?"true":"false"}});if(a.error)throw new Error(vt(a.error));return a.data?.data}async generateCommitMessage(){const t=await Wz({body:{}});if(t.error)throw new Error(vt(t.error));return t.data?.data}async stageFiles(t){const n=await Vz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async unstageFiles(t){const n=await Yz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async restoreFiles(t){const n=await Zz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async deleteFiles(t){const n=await Qz({body:{files:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async commitChanges(t){const n=await Kz({body:{message:t}});if(n.error)throw new Error(vt(n.error));return n.data?.data}async getGitBranch(){const t=await Hz();if(t.error)throw new Error(vt(t.error));return t.data?.data}async pushCommits(){const t=await Xz({body:{}});if(t.error)throw new Error(vt(t.error));return t.data?.data}async listFiles(){const t=await qz();if(t.error)throw new Error(vt(t.error));return t.data}}const _t=new nq;function rq(){return Xa({queryKey:["files"],queryFn:async()=>await _t.listFiles(),staleTime:1e4,refetchOnWindowFocus:!0,retry:1})}const zO="agi-preferences",Ip={vimMode:!1};function aq(){if(typeof window>"u")return Ip;try{const e=window.localStorage.getItem(zO);if(e){const t=JSON.parse(e);return{...Ip,...t}}}catch(e){console.warn("Failed to load preferences",e)}return Ip}function iq(){const[e,t]=U.useState(()=>aq());U.useEffect(()=>{if(!(typeof window>"u"))try{window.localStorage.setItem(zO,JSON.stringify(e))}catch(a){console.warn("Failed to persist preferences",a)}},[e]);const n=U.useCallback(a=>{t(s=>({...s,...a}))},[]);return U.useMemo(()=>({preferences:e,updatePreferences:n}),[e,n])}function sq({enabled:e,onSend:t,textareaRef:n,setMessage:a}){const[s,o]=U.useState(e?"normal":"insert"),[u,c]=U.useState(""),p=U.useCallback((b,y)=>{for(;y<b.length&&/\S/.test(b[y]);)y++;for(;y<b.length&&/\s/.test(b[y]);)y++;return Math.min(y,b.length)},[]),f=U.useCallback((b,y)=>{for(y<b.length&&/\S/.test(b[y])&&y++;y<b.length&&/\s/.test(b[y]);)y++;for(;y<b.length&&/\S/.test(b[y]);)y++;return Math.max(0,y-1)},[]),h=U.useCallback((b,y)=>{for(y=Math.max(0,y-1);y>0&&/\s/.test(b[y]);)y--;for(;y>0&&/\S/.test(b[y-1]);)y--;return y},[]),m=U.useCallback(b=>{const y=n.current;if(!y)return!1;const E=b.key;if(E==="i")return b.preventDefault(),o("insert"),!0;if(E==="a"){b.preventDefault(),o("insert");const x=y.selectionStart;return setTimeout(()=>{y.setSelectionRange(x+1,x+1)},0),!0}if(E==="I"){b.preventDefault(),o("insert");const w=y.value.lastIndexOf(`
|
|
351
351
|
`,y.selectionStart-1)+1;return setTimeout(()=>{y.setSelectionRange(w,w)},0),!0}if(E==="A"){b.preventDefault(),o("insert");const x=y.value;let w=x.indexOf(`
|
|
352
352
|
`,y.selectionStart);return w===-1&&(w=x.length),setTimeout(()=>{y.setSelectionRange(w,w)},0),!0}if(E==="0"){b.preventDefault();const w=y.value.lastIndexOf(`
|
|
353
353
|
`,y.selectionStart-1)+1;return y.setSelectionRange(w,w),!0}if(E==="$"){b.preventDefault();const x=y.value;let w=x.indexOf(`
|