@agi-cli/web-ui 0.1.111 → 0.1.112

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.
@@ -6,7 +6,7 @@
6
6
  `+X[m].replace(" at new "," at ");return r.displayName&&de.includes("<anonymous>")&&(de=de.replace("<anonymous>",r.displayName)),de}while(1<=m&&0<=C);break}}}finally{ze=!1,Error.prepareStackTrace=c}return(c=r?r.displayName||r.name:"")?Me(c):""}function xe(r,a){switch(r.tag){case 26:case 27:case 5:return Me(r.type);case 16:return Me("Lazy");case 13:return r.child!==a&&a!==null?Me("Suspense Fallback"):Me("Suspense");case 19:return Me("SuspenseList");case 0:case 15:return We(r.type,!1);case 11:return We(r.type.render,!1);case 1:return We(r.type,!0);case 31:return Me("Activity");default:return""}}function yt(r){try{var a="",c=null;do a+=xe(r,c),c=r,r=r.return;while(r);return a}catch(m){return`
7
7
  Error generating stack: `+m.message+`
8
8
  `+m.stack}}var vt=Object.prototype.hasOwnProperty,et=e.unstable_scheduleCallback,Bt=e.unstable_cancelCallback,Tt=e.unstable_shouldYield,Oe=e.unstable_requestPaint,Re=e.unstable_now,we=e.unstable_getCurrentPriorityLevel,oe=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,ve=e.unstable_NormalPriority,Te=e.unstable_LowPriority,Le=e.unstable_IdlePriority,pt=e.log,Pe=e.unstable_setDisableYieldValue,mt=null,st=null;function ht(r){if(typeof pt=="function"&&Pe(r),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(mt,r)}catch{}}var Je=Math.clz32?Math.clz32:On,nn=Math.log,Vt=Math.LN2;function On(r){return r>>>=0,r===0?32:31-(nn(r)/Vt|0)|0}var gt=256,er=262144,aa=4194304;function tr(r){var a=r&42;if(a!==0)return a;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 Ei(r,a,c){var m=r.pendingLanes;if(m===0)return 0;var C=0,A=r.suspendedLanes,D=r.pingedLanes;r=r.warmLanes;var H=m&134217727;return H!==0?(m=H&~A,m!==0?C=tr(m):(D&=H,D!==0?C=tr(D):c||(c=H&~r,c!==0&&(C=tr(c))))):(H=m&~A,H!==0?C=tr(H):D!==0?C=tr(D):c||(c=m&~r,c!==0&&(C=tr(c)))),C===0?0:a!==0&&a!==C&&(a&A)===0&&(A=C&-C,c=a&-a,A>=c||A===32&&(c&4194048)!==0)?a:C}function Fr(r,a){return(r.pendingLanes&~(r.suspendedLanes&~r.pingedLanes)&a)===0}function us(r,a){switch(r){case 1:case 2:case 4:case 8:case 64:return a+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 a+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 X_(){var r=aa;return aa<<=1,(aa&62914560)===0&&(aa=4194304),r}function vu(r){for(var a=[],c=0;31>c;c++)a.push(r);return a}function ds(r,a){r.pendingLanes|=a,a!==268435456&&(r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0)}function iD(r,a,c,m,C,A){var D=r.pendingLanes;r.pendingLanes=c,r.suspendedLanes=0,r.pingedLanes=0,r.warmLanes=0,r.expiredLanes&=c,r.entangledLanes&=c,r.errorRecoveryDisabledLanes&=c,r.shellSuspendCounter=0;var H=r.entanglements,X=r.expirationTimes,ae=r.hiddenUpdates;for(c=D&~c;0<c;){var de=31-Je(c),pe=1<<de;H[de]=0,X[de]=-1;var se=ae[de];if(se!==null)for(ae[de]=null,de=0;de<se.length;de++){var ue=se[de];ue!==null&&(ue.lane&=-536870913)}c&=~pe}m!==0&&Z_(r,m,0),A!==0&&C===0&&r.tag!==0&&(r.suspendedLanes|=A&~(D&~a))}function Z_(r,a,c){r.pendingLanes|=a,r.suspendedLanes&=~a;var m=31-Je(a);r.entangledLanes|=a,r.entanglements[m]=r.entanglements[m]|1073741824|c&261930}function Q_(r,a){var c=r.entangledLanes|=a;for(r=r.entanglements;c;){var m=31-Je(c),C=1<<m;C&a|r[m]&a&&(r[m]|=a),c&=~C}}function J_(r,a){var c=a&-a;return c=(c&42)!==0?1:_u(c),(c&(r.suspendedLanes|a))!==0?0:c}function _u(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 Su(r){return r&=-r,2<r?8<r?(r&134217727)!==0?32:268435456:8:2}function eS(){var r=Z.p;return r!==0?r:(r=window.event,r===void 0?32:Ux(r.type))}function tS(r,a){var c=Z.p;try{return Z.p=r,a()}finally{Z.p=c}}var Pr=Math.random().toString(36).slice(2),jt="__reactFiber$"+Pr,rn="__reactProps$"+Pr,sa="__reactContainer$"+Pr,Eu="__reactEvents$"+Pr,aD="__reactListeners$"+Pr,sD="__reactHandles$"+Pr,nS="__reactResources$"+Pr,hs="__reactMarker$"+Pr;function xu(r){delete r[jt],delete r[rn],delete r[Eu],delete r[aD],delete r[sD]}function oa(r){var a=r[jt];if(a)return a;for(var c=r.parentNode;c;){if(a=c[sa]||c[jt]){if(c=a.alternate,a.child!==null||c!==null&&c.child!==null)for(r=xx(r);r!==null;){if(c=r[jt])return c;r=xx(r)}return a}r=c,c=r.parentNode}return null}function la(r){if(r=r[jt]||r[sa]){var a=r.tag;if(a===5||a===6||a===13||a===31||a===26||a===27||a===3)return r}return null}function fs(r){var a=r.tag;if(a===5||a===26||a===27||a===6)return r.stateNode;throw Error(i(33))}function ca(r){var a=r[nS];return a||(a=r[nS]={hoistableStyles:new Map,hoistableScripts:new Map}),a}function Ft(r){r[hs]=!0}var rS=new Set,iS={};function xi(r,a){ua(r,a),ua(r+"Capture",a)}function ua(r,a){for(iS[r]=a,r=0;r<a.length;r++)rS.add(a[r])}var oD=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]*$"),aS={},sS={};function lD(r){return vt.call(sS,r)?!0:vt.call(aS,r)?!1:oD.test(r)?sS[r]=!0:(aS[r]=!0,!1)}function jo(r,a,c){if(lD(a))if(c===null)r.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":r.removeAttribute(a);return;case"boolean":var m=a.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){r.removeAttribute(a);return}}r.setAttribute(a,""+c)}}function zo(r,a,c){if(c===null)r.removeAttribute(a);else{switch(typeof c){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(a);return}r.setAttribute(a,""+c)}}function fr(r,a,c,m){if(m===null)r.removeAttribute(c);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":r.removeAttribute(c);return}r.setAttributeNS(a,c,""+m)}}function In(r){switch(typeof r){case"bigint":case"boolean":case"number":case"string":case"undefined":return r;case"object":return r;default:return""}}function oS(r){var a=r.type;return(r=r.nodeName)&&r.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function cD(r,a,c){var m=Object.getOwnPropertyDescriptor(r.constructor.prototype,a);if(!r.hasOwnProperty(a)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var C=m.get,A=m.set;return Object.defineProperty(r,a,{configurable:!0,get:function(){return C.call(this)},set:function(D){c=""+D,A.call(this,D)}}),Object.defineProperty(r,a,{enumerable:m.enumerable}),{getValue:function(){return c},setValue:function(D){c=""+D},stopTracking:function(){r._valueTracker=null,delete r[a]}}}}function wu(r){if(!r._valueTracker){var a=oS(r)?"checked":"value";r._valueTracker=cD(r,a,""+r[a])}}function lS(r){if(!r)return!1;var a=r._valueTracker;if(!a)return!0;var c=a.getValue(),m="";return r&&(m=oS(r)?r.checked?"true":"false":r.value),r=m,r!==c?(a.setValue(r),!0):!1}function Ho(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 uD=/[\n"\\]/g;function Ln(r){return r.replace(uD,function(a){return"\\"+a.charCodeAt(0).toString(16)+" "})}function Cu(r,a,c,m,C,A,D,H){r.name="",D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?r.type=D:r.removeAttribute("type"),a!=null?D==="number"?(a===0&&r.value===""||r.value!=a)&&(r.value=""+In(a)):r.value!==""+In(a)&&(r.value=""+In(a)):D!=="submit"&&D!=="reset"||r.removeAttribute("value"),a!=null?Tu(r,D,In(a)):c!=null?Tu(r,D,In(c)):m!=null&&r.removeAttribute("value"),C==null&&A!=null&&(r.defaultChecked=!!A),C!=null&&(r.checked=C&&typeof C!="function"&&typeof C!="symbol"),H!=null&&typeof H!="function"&&typeof H!="symbol"&&typeof H!="boolean"?r.name=""+In(H):r.removeAttribute("name")}function cS(r,a,c,m,C,A,D,H){if(A!=null&&typeof A!="function"&&typeof A!="symbol"&&typeof A!="boolean"&&(r.type=A),a!=null||c!=null){if(!(A!=="submit"&&A!=="reset"||a!=null)){wu(r);return}c=c!=null?""+In(c):"",a=a!=null?""+In(a):c,H||a===r.value||(r.value=a),r.defaultValue=a}m=m??C,m=typeof m!="function"&&typeof m!="symbol"&&!!m,r.checked=H?r.checked:!!m,r.defaultChecked=!!m,D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"&&(r.name=D),wu(r)}function Tu(r,a,c){a==="number"&&Ho(r.ownerDocument)===r||r.defaultValue===""+c||(r.defaultValue=""+c)}function da(r,a,c,m){if(r=r.options,a){a={};for(var C=0;C<c.length;C++)a["$"+c[C]]=!0;for(c=0;c<r.length;c++)C=a.hasOwnProperty("$"+r[c].value),r[c].selected!==C&&(r[c].selected=C),C&&m&&(r[c].defaultSelected=!0)}else{for(c=""+In(c),a=null,C=0;C<r.length;C++){if(r[C].value===c){r[C].selected=!0,m&&(r[C].defaultSelected=!0);return}a!==null||r[C].disabled||(a=r[C])}a!==null&&(a.selected=!0)}}function uS(r,a,c){if(a!=null&&(a=""+In(a),a!==r.value&&(r.value=a),c==null)){r.defaultValue!==a&&(r.defaultValue=a);return}r.defaultValue=c!=null?""+In(c):""}function dS(r,a,c,m){if(a==null){if(m!=null){if(c!=null)throw Error(i(92));if(K(m)){if(1<m.length)throw Error(i(93));m=m[0]}c=m}c==null&&(c=""),a=c}c=In(a),r.defaultValue=c,m=r.textContent,m===c&&m!==""&&m!==null&&(r.value=m),wu(r)}function ha(r,a){if(a){var c=r.firstChild;if(c&&c===r.lastChild&&c.nodeType===3){c.nodeValue=a;return}}r.textContent=a}var dD=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 hS(r,a,c){var m=a.indexOf("--")===0;c==null||typeof c=="boolean"||c===""?m?r.setProperty(a,""):a==="float"?r.cssFloat="":r[a]="":m?r.setProperty(a,c):typeof c!="number"||c===0||dD.has(a)?a==="float"?r.cssFloat=c:r[a]=(""+c).trim():r[a]=c+"px"}function fS(r,a,c){if(a!=null&&typeof a!="object")throw Error(i(62));if(r=r.style,c!=null){for(var m in c)!c.hasOwnProperty(m)||a!=null&&a.hasOwnProperty(m)||(m.indexOf("--")===0?r.setProperty(m,""):m==="float"?r.cssFloat="":r[m]="");for(var C in a)m=a[C],a.hasOwnProperty(C)&&c[C]!==m&&hS(r,C,m)}else for(var A in a)a.hasOwnProperty(A)&&hS(r,A,a[A])}function ku(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 hD=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"]]),fD=/^[\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 qo(r){return fD.test(""+r)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":r}function pr(){}var Au=null;function Ru(r){return r=r.target||r.srcElement||window,r.correspondingUseElement&&(r=r.correspondingUseElement),r.nodeType===3?r.parentNode:r}var fa=null,pa=null;function pS(r){var a=la(r);if(a&&(r=a.stateNode)){var c=r[rn]||null;e:switch(r=a.stateNode,a.type){case"input":if(Cu(r,c.value,c.defaultValue,c.defaultValue,c.checked,c.defaultChecked,c.type,c.name),a=c.name,c.type==="radio"&&a!=null){for(c=r;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll('input[name="'+Ln(""+a)+'"][type="radio"]'),a=0;a<c.length;a++){var m=c[a];if(m!==r&&m.form===r.form){var C=m[rn]||null;if(!C)throw Error(i(90));Cu(m,C.value,C.defaultValue,C.defaultValue,C.checked,C.defaultChecked,C.type,C.name)}}for(a=0;a<c.length;a++)m=c[a],m.form===r.form&&lS(m)}break e;case"textarea":uS(r,c.value,c.defaultValue);break e;case"select":a=c.value,a!=null&&da(r,!!c.multiple,a,!1)}}}var Nu=!1;function mS(r,a,c){if(Nu)return r(a,c);Nu=!0;try{var m=r(a);return m}finally{if(Nu=!1,(fa!==null||pa!==null)&&(Nl(),fa&&(a=fa,r=pa,pa=fa=null,pS(a),r)))for(a=0;a<r.length;a++)pS(r[a])}}function ps(r,a){var c=r.stateNode;if(c===null)return null;var m=c[rn]||null;if(m===null)return null;c=m[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(r=r.type,m=!(r==="button"||r==="input"||r==="select"||r==="textarea")),r=!m;break e;default:r=!1}if(r)return null;if(c&&typeof c!="function")throw Error(i(231,a,typeof c));return c}var mr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ou=!1;if(mr)try{var ms={};Object.defineProperty(ms,"passive",{get:function(){Ou=!0}}),window.addEventListener("test",ms,ms),window.removeEventListener("test",ms,ms)}catch{Ou=!1}var Ur=null,Iu=null,$o=null;function gS(){if($o)return $o;var r,a=Iu,c=a.length,m,C="value"in Ur?Ur.value:Ur.textContent,A=C.length;for(r=0;r<c&&a[r]===C[r];r++);var D=c-r;for(m=1;m<=D&&a[c-m]===C[A-m];m++);return $o=C.slice(r,1<m?1-m:void 0)}function Go(r){var a=r.keyCode;return"charCode"in r?(r=r.charCode,r===0&&a===13&&(r=13)):r=a,r===10&&(r=13),32<=r||r===13?r:0}function Vo(){return!0}function bS(){return!1}function an(r){function a(c,m,C,A,D){this._reactName=c,this._targetInst=C,this.type=m,this.nativeEvent=A,this.target=D,this.currentTarget=null;for(var H in r)r.hasOwnProperty(H)&&(c=r[H],this[H]=c?c(A):A[H]);return this.isDefaultPrevented=(A.defaultPrevented!=null?A.defaultPrevented:A.returnValue===!1)?Vo:bS,this.isPropagationStopped=bS,this}return f(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Vo)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Vo)},persist:function(){},isPersistent:Vo}),a}var wi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(r){return r.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wo=an(wi),gs=f({},wi,{view:0,detail:0}),pD=an(gs),Lu,Du,bs,Ko=f({},gs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bu,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!==bs&&(bs&&r.type==="mousemove"?(Lu=r.screenX-bs.screenX,Du=r.screenY-bs.screenY):Du=Lu=0,bs=r),Lu)},movementY:function(r){return"movementY"in r?r.movementY:Du}}),yS=an(Ko),mD=f({},Ko,{dataTransfer:0}),gD=an(mD),bD=f({},gs,{relatedTarget:0}),Mu=an(bD),yD=f({},wi,{animationName:0,elapsedTime:0,pseudoElement:0}),vD=an(yD),_D=f({},wi,{clipboardData:function(r){return"clipboardData"in r?r.clipboardData:window.clipboardData}}),SD=an(_D),ED=f({},wi,{data:0}),vS=an(ED),xD={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wD={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"},CD={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function TD(r){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(r):(r=CD[r])?!!a[r]:!1}function Bu(){return TD}var kD=f({},gs,{key:function(r){if(r.key){var a=xD[r.key]||r.key;if(a!=="Unidentified")return a}return r.type==="keypress"?(r=Go(r),r===13?"Enter":String.fromCharCode(r)):r.type==="keydown"||r.type==="keyup"?wD[r.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bu,charCode:function(r){return r.type==="keypress"?Go(r):0},keyCode:function(r){return r.type==="keydown"||r.type==="keyup"?r.keyCode:0},which:function(r){return r.type==="keypress"?Go(r):r.type==="keydown"||r.type==="keyup"?r.keyCode:0}}),AD=an(kD),RD=f({},Ko,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),_S=an(RD),ND=f({},gs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bu}),OD=an(ND),ID=f({},wi,{propertyName:0,elapsedTime:0,pseudoElement:0}),LD=an(ID),DD=f({},Ko,{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}),MD=an(DD),BD=f({},wi,{newState:0,oldState:0}),FD=an(BD),PD=[9,13,27,32],Fu=mr&&"CompositionEvent"in window,ys=null;mr&&"documentMode"in document&&(ys=document.documentMode);var UD=mr&&"TextEvent"in window&&!ys,SS=mr&&(!Fu||ys&&8<ys&&11>=ys),ES=" ",xS=!1;function wS(r,a){switch(r){case"keyup":return PD.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function CS(r){return r=r.detail,typeof r=="object"&&"data"in r?r.data:null}var ma=!1;function jD(r,a){switch(r){case"compositionend":return CS(a);case"keypress":return a.which!==32?null:(xS=!0,ES);case"textInput":return r=a.data,r===ES&&xS?null:r;default:return null}}function zD(r,a){if(ma)return r==="compositionend"||!Fu&&wS(r,a)?(r=gS(),$o=Iu=Ur=null,ma=!1,r):null;switch(r){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return SS&&a.locale!=="ko"?null:a.data;default:return null}}var HD={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 TS(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a==="input"?!!HD[r.type]:a==="textarea"}function kS(r,a,c,m){fa?pa?pa.push(m):pa=[m]:fa=m,a=Fl(a,"onChange"),0<a.length&&(c=new Wo("onChange","change",null,c,m),r.push({event:c,listeners:a}))}var vs=null,_s=null;function qD(r){cx(r,0)}function Yo(r){var a=fs(r);if(lS(a))return r}function AS(r,a){if(r==="change")return a}var RS=!1;if(mr){var Pu;if(mr){var Uu="oninput"in document;if(!Uu){var NS=document.createElement("div");NS.setAttribute("oninput","return;"),Uu=typeof NS.oninput=="function"}Pu=Uu}else Pu=!1;RS=Pu&&(!document.documentMode||9<document.documentMode)}function OS(){vs&&(vs.detachEvent("onpropertychange",IS),_s=vs=null)}function IS(r){if(r.propertyName==="value"&&Yo(_s)){var a=[];kS(a,_s,r,Ru(r)),mS(qD,a)}}function $D(r,a,c){r==="focusin"?(OS(),vs=a,_s=c,vs.attachEvent("onpropertychange",IS)):r==="focusout"&&OS()}function GD(r){if(r==="selectionchange"||r==="keyup"||r==="keydown")return Yo(_s)}function VD(r,a){if(r==="click")return Yo(a)}function WD(r,a){if(r==="input"||r==="change")return Yo(a)}function KD(r,a){return r===a&&(r!==0||1/r===1/a)||r!==r&&a!==a}var yn=typeof Object.is=="function"?Object.is:KD;function Ss(r,a){if(yn(r,a))return!0;if(typeof r!="object"||r===null||typeof a!="object"||a===null)return!1;var c=Object.keys(r),m=Object.keys(a);if(c.length!==m.length)return!1;for(m=0;m<c.length;m++){var C=c[m];if(!vt.call(a,C)||!yn(r[C],a[C]))return!1}return!0}function LS(r){for(;r&&r.firstChild;)r=r.firstChild;return r}function DS(r,a){var c=LS(r);r=0;for(var m;c;){if(c.nodeType===3){if(m=r+c.textContent.length,r<=a&&m>=a)return{node:c,offset:a-r};r=m}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=LS(c)}}function MS(r,a){return r&&a?r===a?!0:r&&r.nodeType===3?!1:a&&a.nodeType===3?MS(r,a.parentNode):"contains"in r?r.contains(a):r.compareDocumentPosition?!!(r.compareDocumentPosition(a)&16):!1:!1}function BS(r){r=r!=null&&r.ownerDocument!=null&&r.ownerDocument.defaultView!=null?r.ownerDocument.defaultView:window;for(var a=Ho(r.document);a instanceof r.HTMLIFrameElement;){try{var c=typeof a.contentWindow.location.href=="string"}catch{c=!1}if(c)r=a.contentWindow;else break;a=Ho(r.document)}return a}function ju(r){var a=r&&r.nodeName&&r.nodeName.toLowerCase();return a&&(a==="input"&&(r.type==="text"||r.type==="search"||r.type==="tel"||r.type==="url"||r.type==="password")||a==="textarea"||r.contentEditable==="true")}var YD=mr&&"documentMode"in document&&11>=document.documentMode,ga=null,zu=null,Es=null,Hu=!1;function FS(r,a,c){var m=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;Hu||ga==null||ga!==Ho(m)||(m=ga,"selectionStart"in m&&ju(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Es&&Ss(Es,m)||(Es=m,m=Fl(zu,"onSelect"),0<m.length&&(a=new Wo("onSelect","select",null,a,c),r.push({event:a,listeners:m}),a.target=ga)))}function Ci(r,a){var c={};return c[r.toLowerCase()]=a.toLowerCase(),c["Webkit"+r]="webkit"+a,c["Moz"+r]="moz"+a,c}var ba={animationend:Ci("Animation","AnimationEnd"),animationiteration:Ci("Animation","AnimationIteration"),animationstart:Ci("Animation","AnimationStart"),transitionrun:Ci("Transition","TransitionRun"),transitionstart:Ci("Transition","TransitionStart"),transitioncancel:Ci("Transition","TransitionCancel"),transitionend:Ci("Transition","TransitionEnd")},qu={},PS={};mr&&(PS=document.createElement("div").style,"AnimationEvent"in window||(delete ba.animationend.animation,delete ba.animationiteration.animation,delete ba.animationstart.animation),"TransitionEvent"in window||delete ba.transitionend.transition);function Ti(r){if(qu[r])return qu[r];if(!ba[r])return r;var a=ba[r],c;for(c in a)if(a.hasOwnProperty(c)&&c in PS)return qu[r]=a[c];return r}var US=Ti("animationend"),jS=Ti("animationiteration"),zS=Ti("animationstart"),XD=Ti("transitionrun"),ZD=Ti("transitionstart"),QD=Ti("transitioncancel"),HS=Ti("transitionend"),qS=new Map,$u="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(" ");$u.push("scrollEnd");function Wn(r,a){qS.set(r,a),xi(a,[r])}var Xo=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var a=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(a))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},Dn=[],ya=0,Gu=0;function Zo(){for(var r=ya,a=Gu=ya=0;a<r;){var c=Dn[a];Dn[a++]=null;var m=Dn[a];Dn[a++]=null;var C=Dn[a];Dn[a++]=null;var A=Dn[a];if(Dn[a++]=null,m!==null&&C!==null){var D=m.pending;D===null?C.next=C:(C.next=D.next,D.next=C),m.pending=C}A!==0&&$S(c,C,A)}}function Qo(r,a,c,m){Dn[ya++]=r,Dn[ya++]=a,Dn[ya++]=c,Dn[ya++]=m,Gu|=m,r.lanes|=m,r=r.alternate,r!==null&&(r.lanes|=m)}function Vu(r,a,c,m){return Qo(r,a,c,m),Jo(r)}function ki(r,a){return Qo(r,null,null,a),Jo(r)}function $S(r,a,c){r.lanes|=c;var m=r.alternate;m!==null&&(m.lanes|=c);for(var C=!1,A=r.return;A!==null;)A.childLanes|=c,m=A.alternate,m!==null&&(m.childLanes|=c),A.tag===22&&(r=A.stateNode,r===null||r._visibility&1||(C=!0)),r=A,A=A.return;return r.tag===3?(A=r.stateNode,C&&a!==null&&(C=31-Je(c),r=A.hiddenUpdates,m=r[C],m===null?r[C]=[a]:m.push(a),a.lane=c|536870912),A):null}function Jo(r){if(50<$s)throw $s=0,th=null,Error(i(185));for(var a=r.return;a!==null;)r=a,a=r.return;return r.tag===3?r.stateNode:null}var va={};function JD(r,a,c,m){this.tag=r,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function vn(r,a,c,m){return new JD(r,a,c,m)}function Wu(r){return r=r.prototype,!(!r||!r.isReactComponent)}function gr(r,a){var c=r.alternate;return c===null?(c=vn(r.tag,a,r.key,r.mode),c.elementType=r.elementType,c.type=r.type,c.stateNode=r.stateNode,c.alternate=r,r.alternate=c):(c.pendingProps=a,c.type=r.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=r.flags&65011712,c.childLanes=r.childLanes,c.lanes=r.lanes,c.child=r.child,c.memoizedProps=r.memoizedProps,c.memoizedState=r.memoizedState,c.updateQueue=r.updateQueue,a=r.dependencies,c.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},c.sibling=r.sibling,c.index=r.index,c.ref=r.ref,c.refCleanup=r.refCleanup,c}function GS(r,a){r.flags&=65011714;var c=r.alternate;return c===null?(r.childLanes=0,r.lanes=a,r.child=null,r.subtreeFlags=0,r.memoizedProps=null,r.memoizedState=null,r.updateQueue=null,r.dependencies=null,r.stateNode=null):(r.childLanes=c.childLanes,r.lanes=c.lanes,r.child=c.child,r.subtreeFlags=0,r.deletions=null,r.memoizedProps=c.memoizedProps,r.memoizedState=c.memoizedState,r.updateQueue=c.updateQueue,r.type=c.type,a=c.dependencies,r.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext}),r}function el(r,a,c,m,C,A){var D=0;if(m=r,typeof r=="function")Wu(r)&&(D=1);else if(typeof r=="string")D=iM(r,c,ee.current)?26:r==="html"||r==="head"||r==="body"?27:5;else e:switch(r){case I:return r=vn(31,c,a,C),r.elementType=I,r.lanes=A,r;case E:return Ai(c.children,C,A,a);case y:D=8,C|=24;break;case S:return r=vn(12,c,a,C|2),r.elementType=S,r.lanes=A,r;case N:return r=vn(13,c,a,C),r.elementType=N,r.lanes=A,r;case k:return r=vn(19,c,a,C),r.elementType=k,r.lanes=A,r;default:if(typeof r=="object"&&r!==null)switch(r.$$typeof){case _:D=10;break e;case v:D=9;break e;case w:D=11;break e;case O:D=14;break e;case R:D=16,m=null;break e}D=29,c=Error(i(130,r===null?"null":typeof r,"")),m=null}return a=vn(D,c,a,C),a.elementType=r,a.type=m,a.lanes=A,a}function Ai(r,a,c,m){return r=vn(7,r,m,a),r.lanes=c,r}function Ku(r,a,c){return r=vn(6,r,null,a),r.lanes=c,r}function VS(r){var a=vn(18,null,null,0);return a.stateNode=r,a}function Yu(r,a,c){return a=vn(4,r.children!==null?r.children:[],r.key,a),a.lanes=c,a.stateNode={containerInfo:r.containerInfo,pendingChildren:null,implementation:r.implementation},a}var WS=new WeakMap;function Mn(r,a){if(typeof r=="object"&&r!==null){var c=WS.get(r);return c!==void 0?c:(a={value:r,source:a,stack:yt(a)},WS.set(r,a),a)}return{value:r,source:a,stack:yt(a)}}var _a=[],Sa=0,tl=null,xs=0,Bn=[],Fn=0,jr=null,nr=1,rr="";function br(r,a){_a[Sa++]=xs,_a[Sa++]=tl,tl=r,xs=a}function KS(r,a,c){Bn[Fn++]=nr,Bn[Fn++]=rr,Bn[Fn++]=jr,jr=r;var m=nr;r=rr;var C=32-Je(m)-1;m&=~(1<<C),c+=1;var A=32-Je(a)+C;if(30<A){var D=C-C%5;A=(m&(1<<D)-1).toString(32),m>>=D,C-=D,nr=1<<32-Je(a)+C|c<<C|m,rr=A+r}else nr=1<<A|c<<C|m,rr=r}function Xu(r){r.return!==null&&(br(r,1),KS(r,1,0))}function Zu(r){for(;r===tl;)tl=_a[--Sa],_a[Sa]=null,xs=_a[--Sa],_a[Sa]=null;for(;r===jr;)jr=Bn[--Fn],Bn[Fn]=null,rr=Bn[--Fn],Bn[Fn]=null,nr=Bn[--Fn],Bn[Fn]=null}function YS(r,a){Bn[Fn++]=nr,Bn[Fn++]=rr,Bn[Fn++]=jr,nr=a.id,rr=a.overflow,jr=r}var zt=null,ut=null,Ke=!1,zr=null,Pn=!1,Qu=Error(i(519));function Hr(r){var a=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ws(Mn(a,r)),Qu}function XS(r){var a=r.stateNode,c=r.type,m=r.memoizedProps;switch(a[jt]=r,a[rn]=m,c){case"dialog":qe("cancel",a),qe("close",a);break;case"iframe":case"object":case"embed":qe("load",a);break;case"video":case"audio":for(c=0;c<Vs.length;c++)qe(Vs[c],a);break;case"source":qe("error",a);break;case"img":case"image":case"link":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"input":qe("invalid",a),cS(a,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":qe("invalid",a);break;case"textarea":qe("invalid",a),dS(a,m.value,m.defaultValue,m.children)}c=m.children,typeof c!="string"&&typeof c!="number"&&typeof c!="bigint"||a.textContent===""+c||m.suppressHydrationWarning===!0||fx(a.textContent,c)?(m.popover!=null&&(qe("beforetoggle",a),qe("toggle",a)),m.onScroll!=null&&qe("scroll",a),m.onScrollEnd!=null&&qe("scrollend",a),m.onClick!=null&&(a.onclick=pr),a=!0):a=!1,a||Hr(r,!0)}function ZS(r){for(zt=r.return;zt;)switch(zt.tag){case 5:case 31:case 13:Pn=!1;return;case 27:case 3:Pn=!0;return;default:zt=zt.return}}function Ea(r){if(r!==zt)return!1;if(!Ke)return ZS(r),Ke=!0,!1;var a=r.tag,c;if((c=a!==3&&a!==27)&&((c=a===5)&&(c=r.type,c=!(c!=="form"&&c!=="button")||gh(r.type,r.memoizedProps)),c=!c),c&&ut&&Hr(r),ZS(r),a===13){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=Ex(r)}else if(a===31){if(r=r.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(317));ut=Ex(r)}else a===27?(a=ut,ni(r.type)?(r=Sh,Sh=null,ut=r):ut=a):ut=zt?jn(r.stateNode.nextSibling):null;return!0}function Ri(){ut=zt=null,Ke=!1}function Ju(){var r=zr;return r!==null&&(cn===null?cn=r:cn.push.apply(cn,r),zr=null),r}function ws(r){zr===null?zr=[r]:zr.push(r)}var ed=B(null),Ni=null,yr=null;function qr(r,a,c){U(ed,a._currentValue),a._currentValue=c}function vr(r){r._currentValue=ed.current,q(ed)}function td(r,a,c){for(;r!==null;){var m=r.alternate;if((r.childLanes&a)!==a?(r.childLanes|=a,m!==null&&(m.childLanes|=a)):m!==null&&(m.childLanes&a)!==a&&(m.childLanes|=a),r===c)break;r=r.return}}function nd(r,a,c,m){var C=r.child;for(C!==null&&(C.return=r);C!==null;){var A=C.dependencies;if(A!==null){var D=C.child;A=A.firstContext;e:for(;A!==null;){var H=A;A=C;for(var X=0;X<a.length;X++)if(H.context===a[X]){A.lanes|=c,H=A.alternate,H!==null&&(H.lanes|=c),td(A.return,c,r),m||(D=null);break e}A=H.next}}else if(C.tag===18){if(D=C.return,D===null)throw Error(i(341));D.lanes|=c,A=D.alternate,A!==null&&(A.lanes|=c),td(D,c,r),D=null}else D=C.child;if(D!==null)D.return=C;else for(D=C;D!==null;){if(D===r){D=null;break}if(C=D.sibling,C!==null){C.return=D.return,D=C;break}D=D.return}C=D}}function xa(r,a,c,m){r=null;for(var C=a,A=!1;C!==null;){if(!A){if((C.flags&524288)!==0)A=!0;else if((C.flags&262144)!==0)break}if(C.tag===10){var D=C.alternate;if(D===null)throw Error(i(387));if(D=D.memoizedProps,D!==null){var H=C.type;yn(C.pendingProps.value,D.value)||(r!==null?r.push(H):r=[H])}}else if(C===Y.current){if(D=C.alternate,D===null)throw Error(i(387));D.memoizedState.memoizedState!==C.memoizedState.memoizedState&&(r!==null?r.push(Zs):r=[Zs])}C=C.return}r!==null&&nd(a,r,c,m),a.flags|=262144}function nl(r){for(r=r.firstContext;r!==null;){if(!yn(r.context._currentValue,r.memoizedValue))return!0;r=r.next}return!1}function Oi(r){Ni=r,yr=null,r=r.dependencies,r!==null&&(r.firstContext=null)}function Ht(r){return QS(Ni,r)}function rl(r,a){return Ni===null&&Oi(r),QS(r,a)}function QS(r,a){var c=a._currentValue;if(a={context:a,memoizedValue:c,next:null},yr===null){if(r===null)throw Error(i(308));yr=a,r.dependencies={lanes:0,firstContext:a},r.flags|=524288}else yr=yr.next=a;return c}var e2=typeof AbortController<"u"?AbortController:function(){var r=[],a=this.signal={aborted:!1,addEventListener:function(c,m){r.push(m)}};this.abort=function(){a.aborted=!0,r.forEach(function(c){return c()})}},t2=e.unstable_scheduleCallback,n2=e.unstable_NormalPriority,kt={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function rd(){return{controller:new e2,data:new Map,refCount:0}}function Cs(r){r.refCount--,r.refCount===0&&t2(n2,function(){r.controller.abort()})}var Ts=null,id=0,wa=0,Ca=null;function r2(r,a){if(Ts===null){var c=Ts=[];id=0,wa=oh(),Ca={status:"pending",value:void 0,then:function(m){c.push(m)}}}return id++,a.then(JS,JS),a}function JS(){if(--id===0&&Ts!==null){Ca!==null&&(Ca.status="fulfilled");var r=Ts;Ts=null,wa=0,Ca=null;for(var a=0;a<r.length;a++)(0,r[a])()}}function i2(r,a){var c=[],m={status:"pending",value:null,reason:null,then:function(C){c.push(C)}};return r.then(function(){m.status="fulfilled",m.value=a;for(var C=0;C<c.length;C++)(0,c[C])(a)},function(C){for(m.status="rejected",m.reason=C,C=0;C<c.length;C++)(0,c[C])(void 0)}),m}var eE=W.S;W.S=function(r,a){F0=Re(),typeof a=="object"&&a!==null&&typeof a.then=="function"&&r2(r,a),eE!==null&&eE(r,a)};var Ii=B(null);function ad(){var r=Ii.current;return r!==null?r:ot.pooledCache}function il(r,a){a===null?U(Ii,Ii.current):U(Ii,a.pool)}function tE(){var r=ad();return r===null?null:{parent:kt._currentValue,pool:r}}var Ta=Error(i(460)),sd=Error(i(474)),al=Error(i(542)),sl={then:function(){}};function nE(r){return r=r.status,r==="fulfilled"||r==="rejected"}function rE(r,a,c){switch(c=r[c],c===void 0?r.push(a):c!==a&&(a.then(pr,pr),a=c),a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,aE(r),r;default:if(typeof a.status=="string")a.then(pr,pr);else{if(r=ot,r!==null&&100<r.shellSuspendCounter)throw Error(i(482));r=a,r.status="pending",r.then(function(m){if(a.status==="pending"){var C=a;C.status="fulfilled",C.value=m}},function(m){if(a.status==="pending"){var C=a;C.status="rejected",C.reason=m}})}switch(a.status){case"fulfilled":return a.value;case"rejected":throw r=a.reason,aE(r),r}throw Di=a,Ta}}function Li(r){try{var a=r._init;return a(r._payload)}catch(c){throw c!==null&&typeof c=="object"&&typeof c.then=="function"?(Di=c,Ta):c}}var Di=null;function iE(){if(Di===null)throw Error(i(459));var r=Di;return Di=null,r}function aE(r){if(r===Ta||r===al)throw Error(i(483))}var ka=null,ks=0;function ol(r){var a=ks;return ks+=1,ka===null&&(ka=[]),rE(ka,r,a)}function As(r,a){a=a.props.ref,r.ref=a!==void 0?a:null}function ll(r,a){throw a.$$typeof===g?Error(i(525)):(r=Object.prototype.toString.call(a),Error(i(31,r==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":r)))}function sE(r){function a(te,J){if(r){var ie=te.deletions;ie===null?(te.deletions=[J],te.flags|=16):ie.push(J)}}function c(te,J){if(!r)return null;for(;J!==null;)a(te,J),J=J.sibling;return null}function m(te){for(var J=new Map;te!==null;)te.key!==null?J.set(te.key,te):J.set(te.index,te),te=te.sibling;return J}function C(te,J){return te=gr(te,J),te.index=0,te.sibling=null,te}function A(te,J,ie){return te.index=ie,r?(ie=te.alternate,ie!==null?(ie=ie.index,ie<J?(te.flags|=67108866,J):ie):(te.flags|=67108866,J)):(te.flags|=1048576,J)}function D(te){return r&&te.alternate===null&&(te.flags|=67108866),te}function H(te,J,ie,fe){return J===null||J.tag!==6?(J=Ku(ie,te.mode,fe),J.return=te,J):(J=C(J,ie),J.return=te,J)}function X(te,J,ie,fe){var Ce=ie.type;return Ce===E?de(te,J,ie.props.children,fe,ie.key):J!==null&&(J.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===R&&Li(Ce)===J.type)?(J=C(J,ie.props),As(J,ie),J.return=te,J):(J=el(ie.type,ie.key,ie.props,null,te.mode,fe),As(J,ie),J.return=te,J)}function ae(te,J,ie,fe){return J===null||J.tag!==4||J.stateNode.containerInfo!==ie.containerInfo||J.stateNode.implementation!==ie.implementation?(J=Yu(ie,te.mode,fe),J.return=te,J):(J=C(J,ie.children||[]),J.return=te,J)}function de(te,J,ie,fe,Ce){return J===null||J.tag!==7?(J=Ai(ie,te.mode,fe,Ce),J.return=te,J):(J=C(J,ie),J.return=te,J)}function pe(te,J,ie){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=Ku(""+J,te.mode,ie),J.return=te,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return ie=el(J.type,J.key,J.props,null,te.mode,ie),As(ie,J),ie.return=te,ie;case x:return J=Yu(J,te.mode,ie),J.return=te,J;case R:return J=Li(J),pe(te,J,ie)}if(K(J)||j(J))return J=Ai(J,te.mode,ie,null),J.return=te,J;if(typeof J.then=="function")return pe(te,ol(J),ie);if(J.$$typeof===_)return pe(te,rl(te,J),ie);ll(te,J)}return null}function se(te,J,ie,fe){var Ce=J!==null?J.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint")return Ce!==null?null:H(te,J,""+ie,fe);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:return ie.key===Ce?X(te,J,ie,fe):null;case x:return ie.key===Ce?ae(te,J,ie,fe):null;case R:return ie=Li(ie),se(te,J,ie,fe)}if(K(ie)||j(ie))return Ce!==null?null:de(te,J,ie,fe,null);if(typeof ie.then=="function")return se(te,J,ol(ie),fe);if(ie.$$typeof===_)return se(te,J,rl(te,ie),fe);ll(te,ie)}return null}function ue(te,J,ie,fe,Ce){if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return te=te.get(ie)||null,H(J,te,""+fe,Ce);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case b:return te=te.get(fe.key===null?ie:fe.key)||null,X(J,te,fe,Ce);case x:return te=te.get(fe.key===null?ie:fe.key)||null,ae(J,te,fe,Ce);case R:return fe=Li(fe),ue(te,J,ie,fe,Ce)}if(K(fe)||j(fe))return te=te.get(ie)||null,de(J,te,fe,Ce,null);if(typeof fe.then=="function")return ue(te,J,ie,ol(fe),Ce);if(fe.$$typeof===_)return ue(te,J,ie,rl(J,fe),Ce);ll(J,fe)}return null}function _e(te,J,ie,fe){for(var Ce=null,Xe=null,Se=J,Ue=J=0,Ve=null;Se!==null&&Ue<ie.length;Ue++){Se.index>Ue?(Ve=Se,Se=null):Ve=Se.sibling;var Ze=se(te,Se,ie[Ue],fe);if(Ze===null){Se===null&&(Se=Ve);break}r&&Se&&Ze.alternate===null&&a(te,Se),J=A(Ze,J,Ue),Xe===null?Ce=Ze:Xe.sibling=Ze,Xe=Ze,Se=Ve}if(Ue===ie.length)return c(te,Se),Ke&&br(te,Ue),Ce;if(Se===null){for(;Ue<ie.length;Ue++)Se=pe(te,ie[Ue],fe),Se!==null&&(J=A(Se,J,Ue),Xe===null?Ce=Se:Xe.sibling=Se,Xe=Se);return Ke&&br(te,Ue),Ce}for(Se=m(Se);Ue<ie.length;Ue++)Ve=ue(Se,te,Ue,ie[Ue],fe),Ve!==null&&(r&&Ve.alternate!==null&&Se.delete(Ve.key===null?Ue:Ve.key),J=A(Ve,J,Ue),Xe===null?Ce=Ve:Xe.sibling=Ve,Xe=Ve);return r&&Se.forEach(function(oi){return a(te,oi)}),Ke&&br(te,Ue),Ce}function Ne(te,J,ie,fe){if(ie==null)throw Error(i(151));for(var Ce=null,Xe=null,Se=J,Ue=J=0,Ve=null,Ze=ie.next();Se!==null&&!Ze.done;Ue++,Ze=ie.next()){Se.index>Ue?(Ve=Se,Se=null):Ve=Se.sibling;var oi=se(te,Se,Ze.value,fe);if(oi===null){Se===null&&(Se=Ve);break}r&&Se&&oi.alternate===null&&a(te,Se),J=A(oi,J,Ue),Xe===null?Ce=oi:Xe.sibling=oi,Xe=oi,Se=Ve}if(Ze.done)return c(te,Se),Ke&&br(te,Ue),Ce;if(Se===null){for(;!Ze.done;Ue++,Ze=ie.next())Ze=pe(te,Ze.value,fe),Ze!==null&&(J=A(Ze,J,Ue),Xe===null?Ce=Ze:Xe.sibling=Ze,Xe=Ze);return Ke&&br(te,Ue),Ce}for(Se=m(Se);!Ze.done;Ue++,Ze=ie.next())Ze=ue(Se,te,Ue,Ze.value,fe),Ze!==null&&(r&&Ze.alternate!==null&&Se.delete(Ze.key===null?Ue:Ze.key),J=A(Ze,J,Ue),Xe===null?Ce=Ze:Xe.sibling=Ze,Xe=Ze);return r&&Se.forEach(function(mM){return a(te,mM)}),Ke&&br(te,Ue),Ce}function at(te,J,ie,fe){if(typeof ie=="object"&&ie!==null&&ie.type===E&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case b:e:{for(var Ce=ie.key;J!==null;){if(J.key===Ce){if(Ce=ie.type,Ce===E){if(J.tag===7){c(te,J.sibling),fe=C(J,ie.props.children),fe.return=te,te=fe;break e}}else if(J.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===R&&Li(Ce)===J.type){c(te,J.sibling),fe=C(J,ie.props),As(fe,ie),fe.return=te,te=fe;break e}c(te,J);break}else a(te,J);J=J.sibling}ie.type===E?(fe=Ai(ie.props.children,te.mode,fe,ie.key),fe.return=te,te=fe):(fe=el(ie.type,ie.key,ie.props,null,te.mode,fe),As(fe,ie),fe.return=te,te=fe)}return D(te);case x:e:{for(Ce=ie.key;J!==null;){if(J.key===Ce)if(J.tag===4&&J.stateNode.containerInfo===ie.containerInfo&&J.stateNode.implementation===ie.implementation){c(te,J.sibling),fe=C(J,ie.children||[]),fe.return=te,te=fe;break e}else{c(te,J);break}else a(te,J);J=J.sibling}fe=Yu(ie,te.mode,fe),fe.return=te,te=fe}return D(te);case R:return ie=Li(ie),at(te,J,ie,fe)}if(K(ie))return _e(te,J,ie,fe);if(j(ie)){if(Ce=j(ie),typeof Ce!="function")throw Error(i(150));return ie=Ce.call(ie),Ne(te,J,ie,fe)}if(typeof ie.then=="function")return at(te,J,ol(ie),fe);if(ie.$$typeof===_)return at(te,J,rl(te,ie),fe);ll(te,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"||typeof ie=="bigint"?(ie=""+ie,J!==null&&J.tag===6?(c(te,J.sibling),fe=C(J,ie),fe.return=te,te=fe):(c(te,J),fe=Ku(ie,te.mode,fe),fe.return=te,te=fe),D(te)):c(te,J)}return function(te,J,ie,fe){try{ks=0;var Ce=at(te,J,ie,fe);return ka=null,Ce}catch(Se){if(Se===Ta||Se===al)throw Se;var Xe=vn(29,Se,null,te.mode);return Xe.lanes=fe,Xe.return=te,Xe}}}var Mi=sE(!0),oE=sE(!1),$r=!1;function od(r){r.updateQueue={baseState:r.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function ld(r,a){r=r.updateQueue,a.updateQueue===r&&(a.updateQueue={baseState:r.baseState,firstBaseUpdate:r.firstBaseUpdate,lastBaseUpdate:r.lastBaseUpdate,shared:r.shared,callbacks:null})}function Gr(r){return{lane:r,tag:0,payload:null,callback:null,next:null}}function Vr(r,a,c){var m=r.updateQueue;if(m===null)return null;if(m=m.shared,(Qe&2)!==0){var C=m.pending;return C===null?a.next=a:(a.next=C.next,C.next=a),m.pending=a,a=Jo(r),$S(r,null,c),a}return Qo(r,m,a,c),Jo(r)}function Rs(r,a,c){if(a=a.updateQueue,a!==null&&(a=a.shared,(c&4194048)!==0)){var m=a.lanes;m&=r.pendingLanes,c|=m,a.lanes=c,Q_(r,c)}}function cd(r,a){var c=r.updateQueue,m=r.alternate;if(m!==null&&(m=m.updateQueue,c===m)){var C=null,A=null;if(c=c.firstBaseUpdate,c!==null){do{var D={lane:c.lane,tag:c.tag,payload:c.payload,callback:null,next:null};A===null?C=A=D:A=A.next=D,c=c.next}while(c!==null);A===null?C=A=a:A=A.next=a}else C=A=a;c={baseState:m.baseState,firstBaseUpdate:C,lastBaseUpdate:A,shared:m.shared,callbacks:m.callbacks},r.updateQueue=c;return}r=c.lastBaseUpdate,r===null?c.firstBaseUpdate=a:r.next=a,c.lastBaseUpdate=a}var ud=!1;function Ns(){if(ud){var r=Ca;if(r!==null)throw r}}function Os(r,a,c,m){ud=!1;var C=r.updateQueue;$r=!1;var A=C.firstBaseUpdate,D=C.lastBaseUpdate,H=C.shared.pending;if(H!==null){C.shared.pending=null;var X=H,ae=X.next;X.next=null,D===null?A=ae:D.next=ae,D=X;var de=r.alternate;de!==null&&(de=de.updateQueue,H=de.lastBaseUpdate,H!==D&&(H===null?de.firstBaseUpdate=ae:H.next=ae,de.lastBaseUpdate=X))}if(A!==null){var pe=C.baseState;D=0,de=ae=X=null,H=A;do{var se=H.lane&-536870913,ue=se!==H.lane;if(ue?(Ge&se)===se:(m&se)===se){se!==0&&se===wa&&(ud=!0),de!==null&&(de=de.next={lane:0,tag:H.tag,payload:H.payload,callback:null,next:null});e:{var _e=r,Ne=H;se=a;var at=c;switch(Ne.tag){case 1:if(_e=Ne.payload,typeof _e=="function"){pe=_e.call(at,pe,se);break e}pe=_e;break e;case 3:_e.flags=_e.flags&-65537|128;case 0:if(_e=Ne.payload,se=typeof _e=="function"?_e.call(at,pe,se):_e,se==null)break e;pe=f({},pe,se);break e;case 2:$r=!0}}se=H.callback,se!==null&&(r.flags|=64,ue&&(r.flags|=8192),ue=C.callbacks,ue===null?C.callbacks=[se]:ue.push(se))}else ue={lane:se,tag:H.tag,payload:H.payload,callback:H.callback,next:null},de===null?(ae=de=ue,X=pe):de=de.next=ue,D|=se;if(H=H.next,H===null){if(H=C.shared.pending,H===null)break;ue=H,H=ue.next,ue.next=null,C.lastBaseUpdate=ue,C.shared.pending=null}}while(!0);de===null&&(X=pe),C.baseState=X,C.firstBaseUpdate=ae,C.lastBaseUpdate=de,A===null&&(C.shared.lanes=0),Zr|=D,r.lanes=D,r.memoizedState=pe}}function lE(r,a){if(typeof r!="function")throw Error(i(191,r));r.call(a)}function cE(r,a){var c=r.callbacks;if(c!==null)for(r.callbacks=null,r=0;r<c.length;r++)lE(c[r],a)}var Aa=B(null),cl=B(0);function uE(r,a){r=Ar,U(cl,r),U(Aa,a),Ar=r|a.baseLanes}function dd(){U(cl,Ar),U(Aa,Aa.current)}function hd(){Ar=cl.current,q(Aa),q(cl)}var _n=B(null),Un=null;function Wr(r){var a=r.alternate;U(xt,xt.current&1),U(_n,r),Un===null&&(a===null||Aa.current!==null||a.memoizedState!==null)&&(Un=r)}function fd(r){U(xt,xt.current),U(_n,r),Un===null&&(Un=r)}function dE(r){r.tag===22?(U(xt,xt.current),U(_n,r),Un===null&&(Un=r)):Kr()}function Kr(){U(xt,xt.current),U(_n,_n.current)}function Sn(r){q(_n),Un===r&&(Un=null),q(xt)}var xt=B(0);function ul(r){for(var a=r;a!==null;){if(a.tag===13){var c=a.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||vh(c)||_h(c)))return a}else if(a.tag===19&&(a.memoizedProps.revealOrder==="forwards"||a.memoizedProps.revealOrder==="backwards"||a.memoizedProps.revealOrder==="unstable_legacy-backwards"||a.memoizedProps.revealOrder==="together")){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var _r=0,Be=null,rt=null,At=null,dl=!1,Ra=!1,Bi=!1,hl=0,Is=0,Na=null,a2=0;function _t(){throw Error(i(321))}function pd(r,a){if(a===null)return!1;for(var c=0;c<a.length&&c<r.length;c++)if(!yn(r[c],a[c]))return!1;return!0}function md(r,a,c,m,C,A){return _r=A,Be=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,W.H=r===null||r.memoizedState===null?KE:Nd,Bi=!1,A=c(m,C),Bi=!1,Ra&&(A=fE(a,c,m,C)),hE(r),A}function hE(r){W.H=Ms;var a=rt!==null&&rt.next!==null;if(_r=0,At=rt=Be=null,dl=!1,Is=0,Na=null,a)throw Error(i(300));r===null||Rt||(r=r.dependencies,r!==null&&nl(r)&&(Rt=!0))}function fE(r,a,c,m){Be=r;var C=0;do{if(Ra&&(Na=null),Is=0,Ra=!1,25<=C)throw Error(i(301));if(C+=1,At=rt=null,r.updateQueue!=null){var A=r.updateQueue;A.lastEffect=null,A.events=null,A.stores=null,A.memoCache!=null&&(A.memoCache.index=0)}W.H=YE,A=a(c,m)}while(Ra);return A}function s2(){var r=W.H,a=r.useState()[0];return a=typeof a.then=="function"?Ls(a):a,r=r.useState()[0],(rt!==null?rt.memoizedState:null)!==r&&(Be.flags|=1024),a}function gd(){var r=hl!==0;return hl=0,r}function bd(r,a,c){a.updateQueue=r.updateQueue,a.flags&=-2053,r.lanes&=~c}function yd(r){if(dl){for(r=r.memoizedState;r!==null;){var a=r.queue;a!==null&&(a.pending=null),r=r.next}dl=!1}_r=0,At=rt=Be=null,Ra=!1,Is=hl=0,Na=null}function Qt(){var r={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return At===null?Be.memoizedState=At=r:At=At.next=r,At}function wt(){if(rt===null){var r=Be.alternate;r=r!==null?r.memoizedState:null}else r=rt.next;var a=At===null?Be.memoizedState:At.next;if(a!==null)At=a,rt=r;else{if(r===null)throw Be.alternate===null?Error(i(467)):Error(i(310));rt=r,r={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},At===null?Be.memoizedState=At=r:At=At.next=r}return At}function fl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ls(r){var a=Is;return Is+=1,Na===null&&(Na=[]),r=rE(Na,r,a),a=Be,(At===null?a.memoizedState:At.next)===null&&(a=a.alternate,W.H=a===null||a.memoizedState===null?KE:Nd),r}function pl(r){if(r!==null&&typeof r=="object"){if(typeof r.then=="function")return Ls(r);if(r.$$typeof===_)return Ht(r)}throw Error(i(438,String(r)))}function vd(r){var a=null,c=Be.updateQueue;if(c!==null&&(a=c.memoCache),a==null){var m=Be.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(a={data:m.data.map(function(C){return C.slice()}),index:0})))}if(a==null&&(a={data:[],index:0}),c===null&&(c=fl(),Be.updateQueue=c),c.memoCache=a,c=a.data[a.index],c===void 0)for(c=a.data[a.index]=Array(r),m=0;m<r;m++)c[m]=L;return a.index++,c}function Sr(r,a){return typeof a=="function"?a(r):a}function ml(r){var a=wt();return _d(a,rt,r)}function _d(r,a,c){var m=r.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=c;var C=r.baseQueue,A=m.pending;if(A!==null){if(C!==null){var D=C.next;C.next=A.next,A.next=D}a.baseQueue=C=A,m.pending=null}if(A=r.baseState,C===null)r.memoizedState=A;else{a=C.next;var H=D=null,X=null,ae=a,de=!1;do{var pe=ae.lane&-536870913;if(pe!==ae.lane?(Ge&pe)===pe:(_r&pe)===pe){var se=ae.revertLane;if(se===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null}),pe===wa&&(de=!0);else if((_r&se)===se){ae=ae.next,se===wa&&(de=!0);continue}else pe={lane:0,revertLane:ae.revertLane,gesture:null,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(H=X=pe,D=A):X=X.next=pe,Be.lanes|=se,Zr|=se;pe=ae.action,Bi&&c(A,pe),A=ae.hasEagerState?ae.eagerState:c(A,pe)}else se={lane:pe,revertLane:ae.revertLane,gesture:ae.gesture,action:ae.action,hasEagerState:ae.hasEagerState,eagerState:ae.eagerState,next:null},X===null?(H=X=se,D=A):X=X.next=se,Be.lanes|=pe,Zr|=pe;ae=ae.next}while(ae!==null&&ae!==a);if(X===null?D=A:X.next=H,!yn(A,r.memoizedState)&&(Rt=!0,de&&(c=Ca,c!==null)))throw c;r.memoizedState=A,r.baseState=D,r.baseQueue=X,m.lastRenderedState=A}return C===null&&(m.lanes=0),[r.memoizedState,m.dispatch]}function Sd(r){var a=wt(),c=a.queue;if(c===null)throw Error(i(311));c.lastRenderedReducer=r;var m=c.dispatch,C=c.pending,A=a.memoizedState;if(C!==null){c.pending=null;var D=C=C.next;do A=r(A,D.action),D=D.next;while(D!==C);yn(A,a.memoizedState)||(Rt=!0),a.memoizedState=A,a.baseQueue===null&&(a.baseState=A),c.lastRenderedState=A}return[A,m]}function pE(r,a,c){var m=Be,C=wt(),A=Ke;if(A){if(c===void 0)throw Error(i(407));c=c()}else c=a();var D=!yn((rt||C).memoizedState,c);if(D&&(C.memoizedState=c,Rt=!0),C=C.queue,wd(bE.bind(null,m,C,r),[r]),C.getSnapshot!==a||D||At!==null&&At.memoizedState.tag&1){if(m.flags|=2048,Oa(9,{destroy:void 0},gE.bind(null,m,C,c,a),null),ot===null)throw Error(i(349));A||(_r&127)!==0||mE(m,a,c)}return c}function mE(r,a,c){r.flags|=16384,r={getSnapshot:a,value:c},a=Be.updateQueue,a===null?(a=fl(),Be.updateQueue=a,a.stores=[r]):(c=a.stores,c===null?a.stores=[r]:c.push(r))}function gE(r,a,c,m){a.value=c,a.getSnapshot=m,yE(a)&&vE(r)}function bE(r,a,c){return c(function(){yE(a)&&vE(r)})}function yE(r){var a=r.getSnapshot;r=r.value;try{var c=a();return!yn(r,c)}catch{return!0}}function vE(r){var a=ki(r,2);a!==null&&un(a,r,2)}function Ed(r){var a=Qt();if(typeof r=="function"){var c=r;if(r=c(),Bi){ht(!0);try{c()}finally{ht(!1)}}}return a.memoizedState=a.baseState=r,a.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:r},a}function _E(r,a,c,m){return r.baseState=c,_d(r,rt,typeof m=="function"?m:Sr)}function o2(r,a,c,m,C){if(yl(r))throw Error(i(485));if(r=a.action,r!==null){var A={payload:C,action:r,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(D){A.listeners.push(D)}};W.T!==null?c(!0):A.isTransition=!1,m(A),c=a.pending,c===null?(A.next=a.pending=A,SE(a,A)):(A.next=c.next,a.pending=c.next=A)}}function SE(r,a){var c=a.action,m=a.payload,C=r.state;if(a.isTransition){var A=W.T,D={};W.T=D;try{var H=c(C,m),X=W.S;X!==null&&X(D,H),EE(r,a,H)}catch(ae){xd(r,a,ae)}finally{A!==null&&D.types!==null&&(A.types=D.types),W.T=A}}else try{A=c(C,m),EE(r,a,A)}catch(ae){xd(r,a,ae)}}function EE(r,a,c){c!==null&&typeof c=="object"&&typeof c.then=="function"?c.then(function(m){xE(r,a,m)},function(m){return xd(r,a,m)}):xE(r,a,c)}function xE(r,a,c){a.status="fulfilled",a.value=c,wE(a),r.state=c,a=r.pending,a!==null&&(c=a.next,c===a?r.pending=null:(c=c.next,a.next=c,SE(r,c)))}function xd(r,a,c){var m=r.pending;if(r.pending=null,m!==null){m=m.next;do a.status="rejected",a.reason=c,wE(a),a=a.next;while(a!==m)}r.action=null}function wE(r){r=r.listeners;for(var a=0;a<r.length;a++)(0,r[a])()}function CE(r,a){return a}function TE(r,a){if(Ke){var c=ot.formState;if(c!==null){e:{var m=Be;if(Ke){if(ut){t:{for(var C=ut,A=Pn;C.nodeType!==8;){if(!A){C=null;break t}if(C=jn(C.nextSibling),C===null){C=null;break t}}A=C.data,C=A==="F!"||A==="F"?C:null}if(C){ut=jn(C.nextSibling),m=C.data==="F!";break e}}Hr(m)}m=!1}m&&(a=c[0])}}return c=Qt(),c.memoizedState=c.baseState=a,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:CE,lastRenderedState:a},c.queue=m,c=GE.bind(null,Be,m),m.dispatch=c,m=Ed(!1),A=Rd.bind(null,Be,!1,m.queue),m=Qt(),C={state:a,dispatch:null,action:r,pending:null},m.queue=C,c=o2.bind(null,Be,C,A,c),C.dispatch=c,m.memoizedState=r,[a,c,!1]}function kE(r){var a=wt();return AE(a,rt,r)}function AE(r,a,c){if(a=_d(r,a,CE)[0],r=ml(Sr)[0],typeof a=="object"&&a!==null&&typeof a.then=="function")try{var m=Ls(a)}catch(D){throw D===Ta?al:D}else m=a;a=wt();var C=a.queue,A=C.dispatch;return c!==a.memoizedState&&(Be.flags|=2048,Oa(9,{destroy:void 0},l2.bind(null,C,c),null)),[m,A,r]}function l2(r,a){r.action=a}function RE(r){var a=wt(),c=rt;if(c!==null)return AE(a,c,r);wt(),a=a.memoizedState,c=wt();var m=c.queue.dispatch;return c.memoizedState=r,[a,m,!1]}function Oa(r,a,c,m){return r={tag:r,create:c,deps:m,inst:a,next:null},a=Be.updateQueue,a===null&&(a=fl(),Be.updateQueue=a),c=a.lastEffect,c===null?a.lastEffect=r.next=r:(m=c.next,c.next=r,r.next=m,a.lastEffect=r),r}function NE(){return wt().memoizedState}function gl(r,a,c,m){var C=Qt();Be.flags|=r,C.memoizedState=Oa(1|a,{destroy:void 0},c,m===void 0?null:m)}function bl(r,a,c,m){var C=wt();m=m===void 0?null:m;var A=C.memoizedState.inst;rt!==null&&m!==null&&pd(m,rt.memoizedState.deps)?C.memoizedState=Oa(a,A,c,m):(Be.flags|=r,C.memoizedState=Oa(1|a,A,c,m))}function OE(r,a){gl(8390656,8,r,a)}function wd(r,a){bl(2048,8,r,a)}function c2(r){Be.flags|=4;var a=Be.updateQueue;if(a===null)a=fl(),Be.updateQueue=a,a.events=[r];else{var c=a.events;c===null?a.events=[r]:c.push(r)}}function IE(r){var a=wt().memoizedState;return c2({ref:a,nextImpl:r}),function(){if((Qe&2)!==0)throw Error(i(440));return a.impl.apply(void 0,arguments)}}function LE(r,a){return bl(4,2,r,a)}function DE(r,a){return bl(4,4,r,a)}function ME(r,a){if(typeof a=="function"){r=r();var c=a(r);return function(){typeof c=="function"?c():a(null)}}if(a!=null)return r=r(),a.current=r,function(){a.current=null}}function BE(r,a,c){c=c!=null?c.concat([r]):null,bl(4,4,ME.bind(null,a,r),c)}function Cd(){}function FE(r,a){var c=wt();a=a===void 0?null:a;var m=c.memoizedState;return a!==null&&pd(a,m[1])?m[0]:(c.memoizedState=[r,a],r)}function PE(r,a){var c=wt();a=a===void 0?null:a;var m=c.memoizedState;if(a!==null&&pd(a,m[1]))return m[0];if(m=r(),Bi){ht(!0);try{r()}finally{ht(!1)}}return c.memoizedState=[m,a],m}function Td(r,a,c){return c===void 0||(_r&1073741824)!==0&&(Ge&261930)===0?r.memoizedState=a:(r.memoizedState=c,r=U0(),Be.lanes|=r,Zr|=r,c)}function UE(r,a,c,m){return yn(c,a)?c:Aa.current!==null?(r=Td(r,c,m),yn(r,a)||(Rt=!0),r):(_r&42)===0||(_r&1073741824)!==0&&(Ge&261930)===0?(Rt=!0,r.memoizedState=c):(r=U0(),Be.lanes|=r,Zr|=r,a)}function jE(r,a,c,m,C){var A=Z.p;Z.p=A!==0&&8>A?A:8;var D=W.T,H={};W.T=H,Rd(r,!1,a,c);try{var X=C(),ae=W.S;if(ae!==null&&ae(H,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var de=i2(X,m);Ds(r,a,de,wn(r))}else Ds(r,a,m,wn(r))}catch(pe){Ds(r,a,{then:function(){},status:"rejected",reason:pe},wn())}finally{Z.p=A,D!==null&&H.types!==null&&(D.types=H.types),W.T=D}}function u2(){}function kd(r,a,c,m){if(r.tag!==5)throw Error(i(476));var C=zE(r).queue;jE(r,C,a,Q,c===null?u2:function(){return HE(r),c(m)})}function zE(r){var a=r.memoizedState;if(a!==null)return a;a={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:Q},next:null};var c={};return a.next={memoizedState:c,baseState:c,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Sr,lastRenderedState:c},next:null},r.memoizedState=a,r=r.alternate,r!==null&&(r.memoizedState=a),a}function HE(r){var a=zE(r);a.next===null&&(a=r.alternate.memoizedState),Ds(r,a.next.queue,{},wn())}function Ad(){return Ht(Zs)}function qE(){return wt().memoizedState}function $E(){return wt().memoizedState}function d2(r){for(var a=r.return;a!==null;){switch(a.tag){case 24:case 3:var c=wn();r=Gr(c);var m=Vr(a,r,c);m!==null&&(un(m,a,c),Rs(m,a,c)),a={cache:rd()},r.payload=a;return}a=a.return}}function h2(r,a,c){var m=wn();c={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null},yl(r)?VE(a,c):(c=Vu(r,a,c,m),c!==null&&(un(c,r,m),WE(c,a,m)))}function GE(r,a,c){var m=wn();Ds(r,a,c,m)}function Ds(r,a,c,m){var C={lane:m,revertLane:0,gesture:null,action:c,hasEagerState:!1,eagerState:null,next:null};if(yl(r))VE(a,C);else{var A=r.alternate;if(r.lanes===0&&(A===null||A.lanes===0)&&(A=a.lastRenderedReducer,A!==null))try{var D=a.lastRenderedState,H=A(D,c);if(C.hasEagerState=!0,C.eagerState=H,yn(H,D))return Qo(r,a,C,0),ot===null&&Zo(),!1}catch{}if(c=Vu(r,a,C,m),c!==null)return un(c,r,m),WE(c,a,m),!0}return!1}function Rd(r,a,c,m){if(m={lane:2,revertLane:oh(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},yl(r)){if(a)throw Error(i(479))}else a=Vu(r,c,m,2),a!==null&&un(a,r,2)}function yl(r){var a=r.alternate;return r===Be||a!==null&&a===Be}function VE(r,a){Ra=dl=!0;var c=r.pending;c===null?a.next=a:(a.next=c.next,c.next=a),r.pending=a}function WE(r,a,c){if((c&4194048)!==0){var m=a.lanes;m&=r.pendingLanes,c|=m,a.lanes=c,Q_(r,c)}}var Ms={readContext:Ht,use:pl,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};Ms.useEffectEvent=_t;var KE={readContext:Ht,use:pl,useCallback:function(r,a){return Qt().memoizedState=[r,a===void 0?null:a],r},useContext:Ht,useEffect:OE,useImperativeHandle:function(r,a,c){c=c!=null?c.concat([r]):null,gl(4194308,4,ME.bind(null,a,r),c)},useLayoutEffect:function(r,a){return gl(4194308,4,r,a)},useInsertionEffect:function(r,a){gl(4,2,r,a)},useMemo:function(r,a){var c=Qt();a=a===void 0?null:a;var m=r();if(Bi){ht(!0);try{r()}finally{ht(!1)}}return c.memoizedState=[m,a],m},useReducer:function(r,a,c){var m=Qt();if(c!==void 0){var C=c(a);if(Bi){ht(!0);try{c(a)}finally{ht(!1)}}}else C=a;return m.memoizedState=m.baseState=C,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:r,lastRenderedState:C},m.queue=r,r=r.dispatch=h2.bind(null,Be,r),[m.memoizedState,r]},useRef:function(r){var a=Qt();return r={current:r},a.memoizedState=r},useState:function(r){r=Ed(r);var a=r.queue,c=GE.bind(null,Be,a);return a.dispatch=c,[r.memoizedState,c]},useDebugValue:Cd,useDeferredValue:function(r,a){var c=Qt();return Td(c,r,a)},useTransition:function(){var r=Ed(!1);return r=jE.bind(null,Be,r.queue,!0,!1),Qt().memoizedState=r,[!1,r]},useSyncExternalStore:function(r,a,c){var m=Be,C=Qt();if(Ke){if(c===void 0)throw Error(i(407));c=c()}else{if(c=a(),ot===null)throw Error(i(349));(Ge&127)!==0||mE(m,a,c)}C.memoizedState=c;var A={value:c,getSnapshot:a};return C.queue=A,OE(bE.bind(null,m,A,r),[r]),m.flags|=2048,Oa(9,{destroy:void 0},gE.bind(null,m,A,c,a),null),c},useId:function(){var r=Qt(),a=ot.identifierPrefix;if(Ke){var c=rr,m=nr;c=(m&~(1<<32-Je(m)-1)).toString(32)+c,a="_"+a+"R_"+c,c=hl++,0<c&&(a+="H"+c.toString(32)),a+="_"}else c=a2++,a="_"+a+"r_"+c.toString(32)+"_";return r.memoizedState=a},useHostTransitionStatus:Ad,useFormState:TE,useActionState:TE,useOptimistic:function(r){var a=Qt();a.memoizedState=a.baseState=r;var c={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return a.queue=c,a=Rd.bind(null,Be,!0,c),c.dispatch=a,[r,a]},useMemoCache:vd,useCacheRefresh:function(){return Qt().memoizedState=d2.bind(null,Be)},useEffectEvent:function(r){var a=Qt(),c={impl:r};return a.memoizedState=c,function(){if((Qe&2)!==0)throw Error(i(440));return c.impl.apply(void 0,arguments)}}},Nd={readContext:Ht,use:pl,useCallback:FE,useContext:Ht,useEffect:wd,useImperativeHandle:BE,useInsertionEffect:LE,useLayoutEffect:DE,useMemo:PE,useReducer:ml,useRef:NE,useState:function(){return ml(Sr)},useDebugValue:Cd,useDeferredValue:function(r,a){var c=wt();return UE(c,rt.memoizedState,r,a)},useTransition:function(){var r=ml(Sr)[0],a=wt().memoizedState;return[typeof r=="boolean"?r:Ls(r),a]},useSyncExternalStore:pE,useId:qE,useHostTransitionStatus:Ad,useFormState:kE,useActionState:kE,useOptimistic:function(r,a){var c=wt();return _E(c,rt,r,a)},useMemoCache:vd,useCacheRefresh:$E};Nd.useEffectEvent=IE;var YE={readContext:Ht,use:pl,useCallback:FE,useContext:Ht,useEffect:wd,useImperativeHandle:BE,useInsertionEffect:LE,useLayoutEffect:DE,useMemo:PE,useReducer:Sd,useRef:NE,useState:function(){return Sd(Sr)},useDebugValue:Cd,useDeferredValue:function(r,a){var c=wt();return rt===null?Td(c,r,a):UE(c,rt.memoizedState,r,a)},useTransition:function(){var r=Sd(Sr)[0],a=wt().memoizedState;return[typeof r=="boolean"?r:Ls(r),a]},useSyncExternalStore:pE,useId:qE,useHostTransitionStatus:Ad,useFormState:RE,useActionState:RE,useOptimistic:function(r,a){var c=wt();return rt!==null?_E(c,rt,r,a):(c.baseState=r,[r,c.queue.dispatch])},useMemoCache:vd,useCacheRefresh:$E};YE.useEffectEvent=IE;function Od(r,a,c,m){a=r.memoizedState,c=c(m,a),c=c==null?a:f({},a,c),r.memoizedState=c,r.lanes===0&&(r.updateQueue.baseState=c)}var Id={enqueueSetState:function(r,a,c){r=r._reactInternals;var m=wn(),C=Gr(m);C.payload=a,c!=null&&(C.callback=c),a=Vr(r,C,m),a!==null&&(un(a,r,m),Rs(a,r,m))},enqueueReplaceState:function(r,a,c){r=r._reactInternals;var m=wn(),C=Gr(m);C.tag=1,C.payload=a,c!=null&&(C.callback=c),a=Vr(r,C,m),a!==null&&(un(a,r,m),Rs(a,r,m))},enqueueForceUpdate:function(r,a){r=r._reactInternals;var c=wn(),m=Gr(c);m.tag=2,a!=null&&(m.callback=a),a=Vr(r,m,c),a!==null&&(un(a,r,c),Rs(a,r,c))}};function XE(r,a,c,m,C,A,D){return r=r.stateNode,typeof r.shouldComponentUpdate=="function"?r.shouldComponentUpdate(m,A,D):a.prototype&&a.prototype.isPureReactComponent?!Ss(c,m)||!Ss(C,A):!0}function ZE(r,a,c,m){r=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(c,m),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(c,m),a.state!==r&&Id.enqueueReplaceState(a,a.state,null)}function Fi(r,a){var c=a;if("ref"in a){c={};for(var m in a)m!=="ref"&&(c[m]=a[m])}if(r=r.defaultProps){c===a&&(c=f({},c));for(var C in r)c[C]===void 0&&(c[C]=r[C])}return c}function QE(r){Xo(r)}function JE(r){console.error(r)}function e0(r){Xo(r)}function vl(r,a){try{var c=r.onUncaughtError;c(a.value,{componentStack:a.stack})}catch(m){setTimeout(function(){throw m})}}function t0(r,a,c){try{var m=r.onCaughtError;m(c.value,{componentStack:c.stack,errorBoundary:a.tag===1?a.stateNode:null})}catch(C){setTimeout(function(){throw C})}}function Ld(r,a,c){return c=Gr(c),c.tag=3,c.payload={element:null},c.callback=function(){vl(r,a)},c}function n0(r){return r=Gr(r),r.tag=3,r}function r0(r,a,c,m){var C=c.type.getDerivedStateFromError;if(typeof C=="function"){var A=m.value;r.payload=function(){return C(A)},r.callback=function(){t0(a,c,m)}}var D=c.stateNode;D!==null&&typeof D.componentDidCatch=="function"&&(r.callback=function(){t0(a,c,m),typeof C!="function"&&(Qr===null?Qr=new Set([this]):Qr.add(this));var H=m.stack;this.componentDidCatch(m.value,{componentStack:H!==null?H:""})})}function f2(r,a,c,m,C){if(c.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(a=c.alternate,a!==null&&xa(a,c,C,!0),c=_n.current,c!==null){switch(c.tag){case 31:case 13:return Un===null?Ol():c.alternate===null&&St===0&&(St=3),c.flags&=-257,c.flags|=65536,c.lanes=C,m===sl?c.flags|=16384:(a=c.updateQueue,a===null?c.updateQueue=new Set([m]):a.add(m),ih(r,m,C)),!1;case 22:return c.flags|=65536,m===sl?c.flags|=16384:(a=c.updateQueue,a===null?(a={transitions:null,markerInstances:null,retryQueue:new Set([m])},c.updateQueue=a):(c=a.retryQueue,c===null?a.retryQueue=new Set([m]):c.add(m)),ih(r,m,C)),!1}throw Error(i(435,c.tag))}return ih(r,m,C),Ol(),!1}if(Ke)return a=_n.current,a!==null?((a.flags&65536)===0&&(a.flags|=256),a.flags|=65536,a.lanes=C,m!==Qu&&(r=Error(i(422),{cause:m}),ws(Mn(r,c)))):(m!==Qu&&(a=Error(i(423),{cause:m}),ws(Mn(a,c))),r=r.current.alternate,r.flags|=65536,C&=-C,r.lanes|=C,m=Mn(m,c),C=Ld(r.stateNode,m,C),cd(r,C),St!==4&&(St=2)),!1;var A=Error(i(520),{cause:m});if(A=Mn(A,c),qs===null?qs=[A]:qs.push(A),St!==4&&(St=2),a===null)return!0;m=Mn(m,c),c=a;do{switch(c.tag){case 3:return c.flags|=65536,r=C&-C,c.lanes|=r,r=Ld(c.stateNode,m,r),cd(c,r),!1;case 1:if(a=c.type,A=c.stateNode,(c.flags&128)===0&&(typeof a.getDerivedStateFromError=="function"||A!==null&&typeof A.componentDidCatch=="function"&&(Qr===null||!Qr.has(A))))return c.flags|=65536,C&=-C,c.lanes|=C,C=n0(C),r0(C,r,c,m),cd(c,C),!1}c=c.return}while(c!==null);return!1}var Dd=Error(i(461)),Rt=!1;function qt(r,a,c,m){a.child=r===null?oE(a,null,c,m):Mi(a,r.child,c,m)}function i0(r,a,c,m,C){c=c.render;var A=a.ref;if("ref"in m){var D={};for(var H in m)H!=="ref"&&(D[H]=m[H])}else D=m;return Oi(a),m=md(r,a,c,D,A,C),H=gd(),r!==null&&!Rt?(bd(r,a,C),Er(r,a,C)):(Ke&&H&&Xu(a),a.flags|=1,qt(r,a,m,C),a.child)}function a0(r,a,c,m,C){if(r===null){var A=c.type;return typeof A=="function"&&!Wu(A)&&A.defaultProps===void 0&&c.compare===null?(a.tag=15,a.type=A,s0(r,a,A,m,C)):(r=el(c.type,null,m,a,a.mode,C),r.ref=a.ref,r.return=a,a.child=r)}if(A=r.child,!Hd(r,C)){var D=A.memoizedProps;if(c=c.compare,c=c!==null?c:Ss,c(D,m)&&r.ref===a.ref)return Er(r,a,C)}return a.flags|=1,r=gr(A,m),r.ref=a.ref,r.return=a,a.child=r}function s0(r,a,c,m,C){if(r!==null){var A=r.memoizedProps;if(Ss(A,m)&&r.ref===a.ref)if(Rt=!1,a.pendingProps=m=A,Hd(r,C))(r.flags&131072)!==0&&(Rt=!0);else return a.lanes=r.lanes,Er(r,a,C)}return Md(r,a,c,m,C)}function o0(r,a,c,m){var C=m.children,A=r!==null?r.memoizedState:null;if(r===null&&a.stateNode===null&&(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((a.flags&128)!==0){if(A=A!==null?A.baseLanes|c:c,r!==null){for(m=a.child=r.child,C=0;m!==null;)C=C|m.lanes|m.childLanes,m=m.sibling;m=C&~A}else m=0,a.child=null;return l0(r,a,A,c,m)}if((c&536870912)!==0)a.memoizedState={baseLanes:0,cachePool:null},r!==null&&il(a,A!==null?A.cachePool:null),A!==null?uE(a,A):dd(),dE(a);else return m=a.lanes=536870912,l0(r,a,A!==null?A.baseLanes|c:c,c,m)}else A!==null?(il(a,A.cachePool),uE(a,A),Kr(),a.memoizedState=null):(r!==null&&il(a,null),dd(),Kr());return qt(r,a,C,c),a.child}function Bs(r,a){return r!==null&&r.tag===22||a.stateNode!==null||(a.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.sibling}function l0(r,a,c,m,C){var A=ad();return A=A===null?null:{parent:kt._currentValue,pool:A},a.memoizedState={baseLanes:c,cachePool:A},r!==null&&il(a,null),dd(),dE(a),r!==null&&xa(r,a,m,!0),a.childLanes=C,null}function _l(r,a){return a=El({mode:a.mode,children:a.children},r.mode),a.ref=r.ref,r.child=a,a.return=r,a}function c0(r,a,c){return Mi(a,r.child,null,c),r=_l(a,a.pendingProps),r.flags|=2,Sn(a),a.memoizedState=null,r}function p2(r,a,c){var m=a.pendingProps,C=(a.flags&128)!==0;if(a.flags&=-129,r===null){if(Ke){if(m.mode==="hidden")return r=_l(a,m),a.lanes=536870912,Bs(null,r);if(fd(a),(r=ut)?(r=Sx(r,Pn),r=r!==null&&r.data==="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:jr!==null?{id:nr,overflow:rr}:null,retryLane:536870912,hydrationErrors:null},c=VS(r),c.return=a,a.child=c,zt=a,ut=null)):r=null,r===null)throw Hr(a);return a.lanes=536870912,null}return _l(a,m)}var A=r.memoizedState;if(A!==null){var D=A.dehydrated;if(fd(a),C)if(a.flags&256)a.flags&=-257,a=c0(r,a,c);else if(a.memoizedState!==null)a.child=r.child,a.flags|=128,a=null;else throw Error(i(558));else if(Rt||xa(r,a,c,!1),C=(c&r.childLanes)!==0,Rt||C){if(m=ot,m!==null&&(D=J_(m,c),D!==0&&D!==A.retryLane))throw A.retryLane=D,ki(r,D),un(m,r,D),Dd;Ol(),a=c0(r,a,c)}else r=A.treeContext,ut=jn(D.nextSibling),zt=a,Ke=!0,zr=null,Pn=!1,r!==null&&YS(a,r),a=_l(a,m),a.flags|=4096;return a}return r=gr(r.child,{mode:m.mode,children:m.children}),r.ref=a.ref,a.child=r,r.return=a,r}function Sl(r,a){var c=a.ref;if(c===null)r!==null&&r.ref!==null&&(a.flags|=4194816);else{if(typeof c!="function"&&typeof c!="object")throw Error(i(284));(r===null||r.ref!==c)&&(a.flags|=4194816)}}function Md(r,a,c,m,C){return Oi(a),c=md(r,a,c,m,void 0,C),m=gd(),r!==null&&!Rt?(bd(r,a,C),Er(r,a,C)):(Ke&&m&&Xu(a),a.flags|=1,qt(r,a,c,C),a.child)}function u0(r,a,c,m,C,A){return Oi(a),a.updateQueue=null,c=fE(a,m,c,C),hE(r),m=gd(),r!==null&&!Rt?(bd(r,a,A),Er(r,a,A)):(Ke&&m&&Xu(a),a.flags|=1,qt(r,a,c,A),a.child)}function d0(r,a,c,m,C){if(Oi(a),a.stateNode===null){var A=va,D=c.contextType;typeof D=="object"&&D!==null&&(A=Ht(D)),A=new c(m,A),a.memoizedState=A.state!==null&&A.state!==void 0?A.state:null,A.updater=Id,a.stateNode=A,A._reactInternals=a,A=a.stateNode,A.props=m,A.state=a.memoizedState,A.refs={},od(a),D=c.contextType,A.context=typeof D=="object"&&D!==null?Ht(D):va,A.state=a.memoizedState,D=c.getDerivedStateFromProps,typeof D=="function"&&(Od(a,c,D,m),A.state=a.memoizedState),typeof c.getDerivedStateFromProps=="function"||typeof A.getSnapshotBeforeUpdate=="function"||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(D=A.state,typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount(),D!==A.state&&Id.enqueueReplaceState(A,A.state,null),Os(a,m,A,C),Ns(),A.state=a.memoizedState),typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!0}else if(r===null){A=a.stateNode;var H=a.memoizedProps,X=Fi(c,H);A.props=X;var ae=A.context,de=c.contextType;D=va,typeof de=="object"&&de!==null&&(D=Ht(de));var pe=c.getDerivedStateFromProps;de=typeof pe=="function"||typeof A.getSnapshotBeforeUpdate=="function",H=a.pendingProps!==H,de||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(H||ae!==D)&&ZE(a,A,m,D),$r=!1;var se=a.memoizedState;A.state=se,Os(a,m,A,C),Ns(),ae=a.memoizedState,H||se!==ae||$r?(typeof pe=="function"&&(Od(a,c,pe,m),ae=a.memoizedState),(X=$r||XE(a,c,X,m,se,ae,D))?(de||typeof A.UNSAFE_componentWillMount!="function"&&typeof A.componentWillMount!="function"||(typeof A.componentWillMount=="function"&&A.componentWillMount(),typeof A.UNSAFE_componentWillMount=="function"&&A.UNSAFE_componentWillMount()),typeof A.componentDidMount=="function"&&(a.flags|=4194308)):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=m,a.memoizedState=ae),A.props=m,A.state=ae,A.context=D,m=X):(typeof A.componentDidMount=="function"&&(a.flags|=4194308),m=!1)}else{A=a.stateNode,ld(r,a),D=a.memoizedProps,de=Fi(c,D),A.props=de,pe=a.pendingProps,se=A.context,ae=c.contextType,X=va,typeof ae=="object"&&ae!==null&&(X=Ht(ae)),H=c.getDerivedStateFromProps,(ae=typeof H=="function"||typeof A.getSnapshotBeforeUpdate=="function")||typeof A.UNSAFE_componentWillReceiveProps!="function"&&typeof A.componentWillReceiveProps!="function"||(D!==pe||se!==X)&&ZE(a,A,m,X),$r=!1,se=a.memoizedState,A.state=se,Os(a,m,A,C),Ns();var ue=a.memoizedState;D!==pe||se!==ue||$r||r!==null&&r.dependencies!==null&&nl(r.dependencies)?(typeof H=="function"&&(Od(a,c,H,m),ue=a.memoizedState),(de=$r||XE(a,c,de,m,se,ue,X)||r!==null&&r.dependencies!==null&&nl(r.dependencies))?(ae||typeof A.UNSAFE_componentWillUpdate!="function"&&typeof A.componentWillUpdate!="function"||(typeof A.componentWillUpdate=="function"&&A.componentWillUpdate(m,ue,X),typeof A.UNSAFE_componentWillUpdate=="function"&&A.UNSAFE_componentWillUpdate(m,ue,X)),typeof A.componentDidUpdate=="function"&&(a.flags|=4),typeof A.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof A.componentDidUpdate!="function"||D===r.memoizedProps&&se===r.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||D===r.memoizedProps&&se===r.memoizedState||(a.flags|=1024),a.memoizedProps=m,a.memoizedState=ue),A.props=m,A.state=ue,A.context=X,m=de):(typeof A.componentDidUpdate!="function"||D===r.memoizedProps&&se===r.memoizedState||(a.flags|=4),typeof A.getSnapshotBeforeUpdate!="function"||D===r.memoizedProps&&se===r.memoizedState||(a.flags|=1024),m=!1)}return A=m,Sl(r,a),m=(a.flags&128)!==0,A||m?(A=a.stateNode,c=m&&typeof c.getDerivedStateFromError!="function"?null:A.render(),a.flags|=1,r!==null&&m?(a.child=Mi(a,r.child,null,C),a.child=Mi(a,null,c,C)):qt(r,a,c,C),a.memoizedState=A.state,r=a.child):r=Er(r,a,C),r}function h0(r,a,c,m){return Ri(),a.flags|=256,qt(r,a,c,m),a.child}var Bd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Fd(r){return{baseLanes:r,cachePool:tE()}}function Pd(r,a,c){return r=r!==null?r.childLanes&~c:0,a&&(r|=xn),r}function f0(r,a,c){var m=a.pendingProps,C=!1,A=(a.flags&128)!==0,D;if((D=A)||(D=r!==null&&r.memoizedState===null?!1:(xt.current&2)!==0),D&&(C=!0,a.flags&=-129),D=(a.flags&32)!==0,a.flags&=-33,r===null){if(Ke){if(C?Wr(a):Kr(),(r=ut)?(r=Sx(r,Pn),r=r!==null&&r.data!=="&"?r:null,r!==null&&(a.memoizedState={dehydrated:r,treeContext:jr!==null?{id:nr,overflow:rr}:null,retryLane:536870912,hydrationErrors:null},c=VS(r),c.return=a,a.child=c,zt=a,ut=null)):r=null,r===null)throw Hr(a);return _h(r)?a.lanes=32:a.lanes=536870912,null}var H=m.children;return m=m.fallback,C?(Kr(),C=a.mode,H=El({mode:"hidden",children:H},C),m=Ai(m,C,c,null),H.return=a,m.return=a,H.sibling=m,a.child=H,m=a.child,m.memoizedState=Fd(c),m.childLanes=Pd(r,D,c),a.memoizedState=Bd,Bs(null,m)):(Wr(a),Ud(a,H))}var X=r.memoizedState;if(X!==null&&(H=X.dehydrated,H!==null)){if(A)a.flags&256?(Wr(a),a.flags&=-257,a=jd(r,a,c)):a.memoizedState!==null?(Kr(),a.child=r.child,a.flags|=128,a=null):(Kr(),H=m.fallback,C=a.mode,m=El({mode:"visible",children:m.children},C),H=Ai(H,C,c,null),H.flags|=2,m.return=a,H.return=a,m.sibling=H,a.child=m,Mi(a,r.child,null,c),m=a.child,m.memoizedState=Fd(c),m.childLanes=Pd(r,D,c),a.memoizedState=Bd,a=Bs(null,m));else if(Wr(a),_h(H)){if(D=H.nextSibling&&H.nextSibling.dataset,D)var ae=D.dgst;D=ae,m=Error(i(419)),m.stack="",m.digest=D,ws({value:m,source:null,stack:null}),a=jd(r,a,c)}else if(Rt||xa(r,a,c,!1),D=(c&r.childLanes)!==0,Rt||D){if(D=ot,D!==null&&(m=J_(D,c),m!==0&&m!==X.retryLane))throw X.retryLane=m,ki(r,m),un(D,r,m),Dd;vh(H)||Ol(),a=jd(r,a,c)}else vh(H)?(a.flags|=192,a.child=r.child,a=null):(r=X.treeContext,ut=jn(H.nextSibling),zt=a,Ke=!0,zr=null,Pn=!1,r!==null&&YS(a,r),a=Ud(a,m.children),a.flags|=4096);return a}return C?(Kr(),H=m.fallback,C=a.mode,X=r.child,ae=X.sibling,m=gr(X,{mode:"hidden",children:m.children}),m.subtreeFlags=X.subtreeFlags&65011712,ae!==null?H=gr(ae,H):(H=Ai(H,C,c,null),H.flags|=2),H.return=a,m.return=a,m.sibling=H,a.child=m,Bs(null,m),m=a.child,H=r.child.memoizedState,H===null?H=Fd(c):(C=H.cachePool,C!==null?(X=kt._currentValue,C=C.parent!==X?{parent:X,pool:X}:C):C=tE(),H={baseLanes:H.baseLanes|c,cachePool:C}),m.memoizedState=H,m.childLanes=Pd(r,D,c),a.memoizedState=Bd,Bs(r.child,m)):(Wr(a),c=r.child,r=c.sibling,c=gr(c,{mode:"visible",children:m.children}),c.return=a,c.sibling=null,r!==null&&(D=a.deletions,D===null?(a.deletions=[r],a.flags|=16):D.push(r)),a.child=c,a.memoizedState=null,c)}function Ud(r,a){return a=El({mode:"visible",children:a},r.mode),a.return=r,r.child=a}function El(r,a){return r=vn(22,r,null,a),r.lanes=0,r}function jd(r,a,c){return Mi(a,r.child,null,c),r=Ud(a,a.pendingProps.children),r.flags|=2,a.memoizedState=null,r}function p0(r,a,c){r.lanes|=a;var m=r.alternate;m!==null&&(m.lanes|=a),td(r.return,a,c)}function zd(r,a,c,m,C,A){var D=r.memoizedState;D===null?r.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:m,tail:c,tailMode:C,treeForkCount:A}:(D.isBackwards=a,D.rendering=null,D.renderingStartTime=0,D.last=m,D.tail=c,D.tailMode=C,D.treeForkCount=A)}function m0(r,a,c){var m=a.pendingProps,C=m.revealOrder,A=m.tail;m=m.children;var D=xt.current,H=(D&2)!==0;if(H?(D=D&1|2,a.flags|=128):D&=1,U(xt,D),qt(r,a,m,c),m=Ke?xs:0,!H&&r!==null&&(r.flags&128)!==0)e:for(r=a.child;r!==null;){if(r.tag===13)r.memoizedState!==null&&p0(r,c,a);else if(r.tag===19)p0(r,c,a);else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===a)break e;for(;r.sibling===null;){if(r.return===null||r.return===a)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}switch(C){case"forwards":for(c=a.child,C=null;c!==null;)r=c.alternate,r!==null&&ul(r)===null&&(C=c),c=c.sibling;c=C,c===null?(C=a.child,a.child=null):(C=c.sibling,c.sibling=null),zd(a,!1,C,c,A,m);break;case"backwards":case"unstable_legacy-backwards":for(c=null,C=a.child,a.child=null;C!==null;){if(r=C.alternate,r!==null&&ul(r)===null){a.child=C;break}r=C.sibling,C.sibling=c,c=C,C=r}zd(a,!0,c,null,A,m);break;case"together":zd(a,!1,null,null,void 0,m);break;default:a.memoizedState=null}return a.child}function Er(r,a,c){if(r!==null&&(a.dependencies=r.dependencies),Zr|=a.lanes,(c&a.childLanes)===0)if(r!==null){if(xa(r,a,c,!1),(c&a.childLanes)===0)return null}else return null;if(r!==null&&a.child!==r.child)throw Error(i(153));if(a.child!==null){for(r=a.child,c=gr(r,r.pendingProps),a.child=c,c.return=a;r.sibling!==null;)r=r.sibling,c=c.sibling=gr(r,r.pendingProps),c.return=a;c.sibling=null}return a.child}function Hd(r,a){return(r.lanes&a)!==0?!0:(r=r.dependencies,!!(r!==null&&nl(r)))}function m2(r,a,c){switch(a.tag){case 3:$(a,a.stateNode.containerInfo),qr(a,kt,r.memoizedState.cache),Ri();break;case 27:case 5:he(a);break;case 4:$(a,a.stateNode.containerInfo);break;case 10:qr(a,a.type,a.memoizedProps.value);break;case 31:if(a.memoizedState!==null)return a.flags|=128,fd(a),null;break;case 13:var m=a.memoizedState;if(m!==null)return m.dehydrated!==null?(Wr(a),a.flags|=128,null):(c&a.child.childLanes)!==0?f0(r,a,c):(Wr(a),r=Er(r,a,c),r!==null?r.sibling:null);Wr(a);break;case 19:var C=(r.flags&128)!==0;if(m=(c&a.childLanes)!==0,m||(xa(r,a,c,!1),m=(c&a.childLanes)!==0),C){if(m)return m0(r,a,c);a.flags|=128}if(C=a.memoizedState,C!==null&&(C.rendering=null,C.tail=null,C.lastEffect=null),U(xt,xt.current),m)break;return null;case 22:return a.lanes=0,o0(r,a,c,a.pendingProps);case 24:qr(a,kt,r.memoizedState.cache)}return Er(r,a,c)}function g0(r,a,c){if(r!==null)if(r.memoizedProps!==a.pendingProps)Rt=!0;else{if(!Hd(r,c)&&(a.flags&128)===0)return Rt=!1,m2(r,a,c);Rt=(r.flags&131072)!==0}else Rt=!1,Ke&&(a.flags&1048576)!==0&&KS(a,xs,a.index);switch(a.lanes=0,a.tag){case 16:e:{var m=a.pendingProps;if(r=Li(a.elementType),a.type=r,typeof r=="function")Wu(r)?(m=Fi(r,m),a.tag=1,a=d0(null,a,r,m,c)):(a.tag=0,a=Md(null,a,r,m,c));else{if(r!=null){var C=r.$$typeof;if(C===w){a.tag=11,a=i0(null,a,r,m,c);break e}else if(C===O){a.tag=14,a=a0(null,a,r,m,c);break e}}throw a=V(r)||r,Error(i(306,a,""))}}return a;case 0:return Md(r,a,a.type,a.pendingProps,c);case 1:return m=a.type,C=Fi(m,a.pendingProps),d0(r,a,m,C,c);case 3:e:{if($(a,a.stateNode.containerInfo),r===null)throw Error(i(387));m=a.pendingProps;var A=a.memoizedState;C=A.element,ld(r,a),Os(a,m,null,c);var D=a.memoizedState;if(m=D.cache,qr(a,kt,m),m!==A.cache&&nd(a,[kt],c,!0),Ns(),m=D.element,A.isDehydrated)if(A={element:m,isDehydrated:!1,cache:D.cache},a.updateQueue.baseState=A,a.memoizedState=A,a.flags&256){a=h0(r,a,m,c);break e}else if(m!==C){C=Mn(Error(i(424)),a),ws(C),a=h0(r,a,m,c);break e}else for(r=a.stateNode.containerInfo,r.nodeType===9?r=r.body:r=r.nodeName==="HTML"?r.ownerDocument.body:r,ut=jn(r.firstChild),zt=a,Ke=!0,zr=null,Pn=!0,c=oE(a,null,m,c),a.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(Ri(),m===C){a=Er(r,a,c);break e}qt(r,a,m,c)}a=a.child}return a;case 26:return Sl(r,a),r===null?(c=kx(a.type,null,a.pendingProps,null))?a.memoizedState=c:Ke||(c=a.type,r=a.pendingProps,m=Pl(ne.current).createElement(c),m[jt]=a,m[rn]=r,$t(m,c,r),Ft(m),a.stateNode=m):a.memoizedState=kx(a.type,r.memoizedProps,a.pendingProps,r.memoizedState),null;case 27:return he(a),r===null&&Ke&&(m=a.stateNode=wx(a.type,a.pendingProps,ne.current),zt=a,Pn=!0,C=ut,ni(a.type)?(Sh=C,ut=jn(m.firstChild)):ut=C),qt(r,a,a.pendingProps.children,c),Sl(r,a),r===null&&(a.flags|=4194304),a.child;case 5:return r===null&&Ke&&((C=m=ut)&&(m=G2(m,a.type,a.pendingProps,Pn),m!==null?(a.stateNode=m,zt=a,ut=jn(m.firstChild),Pn=!1,C=!0):C=!1),C||Hr(a)),he(a),C=a.type,A=a.pendingProps,D=r!==null?r.memoizedProps:null,m=A.children,gh(C,A)?m=null:D!==null&&gh(C,D)&&(a.flags|=32),a.memoizedState!==null&&(C=md(r,a,s2,null,null,c),Zs._currentValue=C),Sl(r,a),qt(r,a,m,c),a.child;case 6:return r===null&&Ke&&((r=c=ut)&&(c=V2(c,a.pendingProps,Pn),c!==null?(a.stateNode=c,zt=a,ut=null,r=!0):r=!1),r||Hr(a)),null;case 13:return f0(r,a,c);case 4:return $(a,a.stateNode.containerInfo),m=a.pendingProps,r===null?a.child=Mi(a,null,m,c):qt(r,a,m,c),a.child;case 11:return i0(r,a,a.type,a.pendingProps,c);case 7:return qt(r,a,a.pendingProps,c),a.child;case 8:return qt(r,a,a.pendingProps.children,c),a.child;case 12:return qt(r,a,a.pendingProps.children,c),a.child;case 10:return m=a.pendingProps,qr(a,a.type,m.value),qt(r,a,m.children,c),a.child;case 9:return C=a.type._context,m=a.pendingProps.children,Oi(a),C=Ht(C),m=m(C),a.flags|=1,qt(r,a,m,c),a.child;case 14:return a0(r,a,a.type,a.pendingProps,c);case 15:return s0(r,a,a.type,a.pendingProps,c);case 19:return m0(r,a,c);case 31:return p2(r,a,c);case 22:return o0(r,a,c,a.pendingProps);case 24:return Oi(a),m=Ht(kt),r===null?(C=ad(),C===null&&(C=ot,A=rd(),C.pooledCache=A,A.refCount++,A!==null&&(C.pooledCacheLanes|=c),C=A),a.memoizedState={parent:m,cache:C},od(a),qr(a,kt,C)):((r.lanes&c)!==0&&(ld(r,a),Os(a,null,null,c),Ns()),C=r.memoizedState,A=a.memoizedState,C.parent!==m?(C={parent:m,cache:m},a.memoizedState=C,a.lanes===0&&(a.memoizedState=a.updateQueue.baseState=C),qr(a,kt,m)):(m=A.cache,qr(a,kt,m),m!==C.cache&&nd(a,[kt],c,!0))),qt(r,a,a.pendingProps.children,c),a.child;case 29:throw a.pendingProps}throw Error(i(156,a.tag))}function xr(r){r.flags|=4}function qd(r,a,c,m,C){if((a=(r.mode&32)!==0)&&(a=!1),a){if(r.flags|=16777216,(C&335544128)===C)if(r.stateNode.complete)r.flags|=8192;else if(q0())r.flags|=8192;else throw Di=sl,sd}else r.flags&=-16777217}function b0(r,a){if(a.type!=="stylesheet"||(a.state.loading&4)!==0)r.flags&=-16777217;else if(r.flags|=16777216,!Ix(a))if(q0())r.flags|=8192;else throw Di=sl,sd}function xl(r,a){a!==null&&(r.flags|=4),r.flags&16384&&(a=r.tag!==22?X_():536870912,r.lanes|=a,Ma|=a)}function Fs(r,a){if(!Ke)switch(r.tailMode){case"hidden":a=r.tail;for(var c=null;a!==null;)a.alternate!==null&&(c=a),a=a.sibling;c===null?r.tail=null:c.sibling=null;break;case"collapsed":c=r.tail;for(var m=null;c!==null;)c.alternate!==null&&(m=c),c=c.sibling;m===null?a||r.tail===null?r.tail=null:r.tail.sibling=null:m.sibling=null}}function dt(r){var a=r.alternate!==null&&r.alternate.child===r.child,c=0,m=0;if(a)for(var C=r.child;C!==null;)c|=C.lanes|C.childLanes,m|=C.subtreeFlags&65011712,m|=C.flags&65011712,C.return=r,C=C.sibling;else for(C=r.child;C!==null;)c|=C.lanes|C.childLanes,m|=C.subtreeFlags,m|=C.flags,C.return=r,C=C.sibling;return r.subtreeFlags|=m,r.childLanes=c,a}function g2(r,a,c){var m=a.pendingProps;switch(Zu(a),a.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dt(a),null;case 1:return dt(a),null;case 3:return c=a.stateNode,m=null,r!==null&&(m=r.memoizedState.cache),a.memoizedState.cache!==m&&(a.flags|=2048),vr(kt),re(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(r===null||r.child===null)&&(Ea(a)?xr(a):r===null||r.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Ju())),dt(a),null;case 26:var C=a.type,A=a.memoizedState;return r===null?(xr(a),A!==null?(dt(a),b0(a,A)):(dt(a),qd(a,C,null,m,c))):A?A!==r.memoizedState?(xr(a),dt(a),b0(a,A)):(dt(a),a.flags&=-16777217):(r=r.memoizedProps,r!==m&&xr(a),dt(a),qd(a,C,r,m,c)),null;case 27:if(ge(a),c=ne.current,C=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==m&&xr(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return dt(a),null}r=ee.current,Ea(a)?XS(a):(r=wx(C,m,c),a.stateNode=r,xr(a))}return dt(a),null;case 5:if(ge(a),C=a.type,r!==null&&a.stateNode!=null)r.memoizedProps!==m&&xr(a);else{if(!m){if(a.stateNode===null)throw Error(i(166));return dt(a),null}if(A=ee.current,Ea(a))XS(a);else{var D=Pl(ne.current);switch(A){case 1:A=D.createElementNS("http://www.w3.org/2000/svg",C);break;case 2:A=D.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;default:switch(C){case"svg":A=D.createElementNS("http://www.w3.org/2000/svg",C);break;case"math":A=D.createElementNS("http://www.w3.org/1998/Math/MathML",C);break;case"script":A=D.createElement("div"),A.innerHTML="<script><\/script>",A=A.removeChild(A.firstChild);break;case"select":A=typeof m.is=="string"?D.createElement("select",{is:m.is}):D.createElement("select"),m.multiple?A.multiple=!0:m.size&&(A.size=m.size);break;default:A=typeof m.is=="string"?D.createElement(C,{is:m.is}):D.createElement(C)}}A[jt]=a,A[rn]=m;e:for(D=a.child;D!==null;){if(D.tag===5||D.tag===6)A.appendChild(D.stateNode);else if(D.tag!==4&&D.tag!==27&&D.child!==null){D.child.return=D,D=D.child;continue}if(D===a)break e;for(;D.sibling===null;){if(D.return===null||D.return===a)break e;D=D.return}D.sibling.return=D.return,D=D.sibling}a.stateNode=A;e:switch($t(A,C,m),C){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&xr(a)}}return dt(a),qd(a,a.type,r===null?null:r.memoizedProps,a.pendingProps,c),null;case 6:if(r&&a.stateNode!=null)r.memoizedProps!==m&&xr(a);else{if(typeof m!="string"&&a.stateNode===null)throw Error(i(166));if(r=ne.current,Ea(a)){if(r=a.stateNode,c=a.memoizedProps,m=null,C=zt,C!==null)switch(C.tag){case 27:case 5:m=C.memoizedProps}r[jt]=a,r=!!(r.nodeValue===c||m!==null&&m.suppressHydrationWarning===!0||fx(r.nodeValue,c)),r||Hr(a,!0)}else r=Pl(r).createTextNode(m),r[jt]=a,a.stateNode=r}return dt(a),null;case 31:if(c=a.memoizedState,r===null||r.memoizedState!==null){if(m=Ea(a),c!==null){if(r===null){if(!m)throw Error(i(318));if(r=a.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(i(557));r[jt]=a}else Ri(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;dt(a),r=!1}else c=Ju(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=c),r=!0;if(!r)return a.flags&256?(Sn(a),a):(Sn(a),null);if((a.flags&128)!==0)throw Error(i(558))}return dt(a),null;case 13:if(m=a.memoizedState,r===null||r.memoizedState!==null&&r.memoizedState.dehydrated!==null){if(C=Ea(a),m!==null&&m.dehydrated!==null){if(r===null){if(!C)throw Error(i(318));if(C=a.memoizedState,C=C!==null?C.dehydrated:null,!C)throw Error(i(317));C[jt]=a}else Ri(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;dt(a),C=!1}else C=Ju(),r!==null&&r.memoizedState!==null&&(r.memoizedState.hydrationErrors=C),C=!0;if(!C)return a.flags&256?(Sn(a),a):(Sn(a),null)}return Sn(a),(a.flags&128)!==0?(a.lanes=c,a):(c=m!==null,r=r!==null&&r.memoizedState!==null,c&&(m=a.child,C=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(C=m.alternate.memoizedState.cachePool.pool),A=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(A=m.memoizedState.cachePool.pool),A!==C&&(m.flags|=2048)),c!==r&&c&&(a.child.flags|=8192),xl(a,a.updateQueue),dt(a),null);case 4:return re(),r===null&&dh(a.stateNode.containerInfo),dt(a),null;case 10:return vr(a.type),dt(a),null;case 19:if(q(xt),m=a.memoizedState,m===null)return dt(a),null;if(C=(a.flags&128)!==0,A=m.rendering,A===null)if(C)Fs(m,!1);else{if(St!==0||r!==null&&(r.flags&128)!==0)for(r=a.child;r!==null;){if(A=ul(r),A!==null){for(a.flags|=128,Fs(m,!1),r=A.updateQueue,a.updateQueue=r,xl(a,r),a.subtreeFlags=0,r=c,c=a.child;c!==null;)GS(c,r),c=c.sibling;return U(xt,xt.current&1|2),Ke&&br(a,m.treeForkCount),a.child}r=r.sibling}m.tail!==null&&Re()>Al&&(a.flags|=128,C=!0,Fs(m,!1),a.lanes=4194304)}else{if(!C)if(r=ul(A),r!==null){if(a.flags|=128,C=!0,r=r.updateQueue,a.updateQueue=r,xl(a,r),Fs(m,!0),m.tail===null&&m.tailMode==="hidden"&&!A.alternate&&!Ke)return dt(a),null}else 2*Re()-m.renderingStartTime>Al&&c!==536870912&&(a.flags|=128,C=!0,Fs(m,!1),a.lanes=4194304);m.isBackwards?(A.sibling=a.child,a.child=A):(r=m.last,r!==null?r.sibling=A:a.child=A,m.last=A)}return m.tail!==null?(r=m.tail,m.rendering=r,m.tail=r.sibling,m.renderingStartTime=Re(),r.sibling=null,c=xt.current,U(xt,C?c&1|2:c&1),Ke&&br(a,m.treeForkCount),r):(dt(a),null);case 22:case 23:return Sn(a),hd(),m=a.memoizedState!==null,r!==null?r.memoizedState!==null!==m&&(a.flags|=8192):m&&(a.flags|=8192),m?(c&536870912)!==0&&(a.flags&128)===0&&(dt(a),a.subtreeFlags&6&&(a.flags|=8192)):dt(a),c=a.updateQueue,c!==null&&xl(a,c.retryQueue),c=null,r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),m=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(m=a.memoizedState.cachePool.pool),m!==c&&(a.flags|=2048),r!==null&&q(Ii),null;case 24:return c=null,r!==null&&(c=r.memoizedState.cache),a.memoizedState.cache!==c&&(a.flags|=2048),vr(kt),dt(a),null;case 25:return null;case 30:return null}throw Error(i(156,a.tag))}function b2(r,a){switch(Zu(a),a.tag){case 1:return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 3:return vr(kt),re(),r=a.flags,(r&65536)!==0&&(r&128)===0?(a.flags=r&-65537|128,a):null;case 26:case 27:case 5:return ge(a),null;case 31:if(a.memoizedState!==null){if(Sn(a),a.alternate===null)throw Error(i(340));Ri()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 13:if(Sn(a),r=a.memoizedState,r!==null&&r.dehydrated!==null){if(a.alternate===null)throw Error(i(340));Ri()}return r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 19:return q(xt),null;case 4:return re(),null;case 10:return vr(a.type),null;case 22:case 23:return Sn(a),hd(),r!==null&&q(Ii),r=a.flags,r&65536?(a.flags=r&-65537|128,a):null;case 24:return vr(kt),null;case 25:return null;default:return null}}function y0(r,a){switch(Zu(a),a.tag){case 3:vr(kt),re();break;case 26:case 27:case 5:ge(a);break;case 4:re();break;case 31:a.memoizedState!==null&&Sn(a);break;case 13:Sn(a);break;case 19:q(xt);break;case 10:vr(a.type);break;case 22:case 23:Sn(a),hd(),r!==null&&q(Ii);break;case 24:vr(kt)}}function Ps(r,a){try{var c=a.updateQueue,m=c!==null?c.lastEffect:null;if(m!==null){var C=m.next;c=C;do{if((c.tag&r)===r){m=void 0;var A=c.create,D=c.inst;m=A(),D.destroy=m}c=c.next}while(c!==C)}}catch(H){nt(a,a.return,H)}}function Yr(r,a,c){try{var m=a.updateQueue,C=m!==null?m.lastEffect:null;if(C!==null){var A=C.next;m=A;do{if((m.tag&r)===r){var D=m.inst,H=D.destroy;if(H!==void 0){D.destroy=void 0,C=a;var X=c,ae=H;try{ae()}catch(de){nt(C,X,de)}}}m=m.next}while(m!==A)}}catch(de){nt(a,a.return,de)}}function v0(r){var a=r.updateQueue;if(a!==null){var c=r.stateNode;try{cE(a,c)}catch(m){nt(r,r.return,m)}}}function _0(r,a,c){c.props=Fi(r.type,r.memoizedProps),c.state=r.memoizedState;try{c.componentWillUnmount()}catch(m){nt(r,a,m)}}function Us(r,a){try{var c=r.ref;if(c!==null){switch(r.tag){case 26:case 27:case 5:var m=r.stateNode;break;case 30:m=r.stateNode;break;default:m=r.stateNode}typeof c=="function"?r.refCleanup=c(m):c.current=m}}catch(C){nt(r,a,C)}}function ir(r,a){var c=r.ref,m=r.refCleanup;if(c!==null)if(typeof m=="function")try{m()}catch(C){nt(r,a,C)}finally{r.refCleanup=null,r=r.alternate,r!=null&&(r.refCleanup=null)}else if(typeof c=="function")try{c(null)}catch(C){nt(r,a,C)}else c.current=null}function S0(r){var a=r.type,c=r.memoizedProps,m=r.stateNode;try{e:switch(a){case"button":case"input":case"select":case"textarea":c.autoFocus&&m.focus();break e;case"img":c.src?m.src=c.src:c.srcSet&&(m.srcset=c.srcSet)}}catch(C){nt(r,r.return,C)}}function $d(r,a,c){try{var m=r.stateNode;U2(m,r.type,c,a),m[rn]=a}catch(C){nt(r,r.return,C)}}function E0(r){return r.tag===5||r.tag===3||r.tag===26||r.tag===27&&ni(r.type)||r.tag===4}function Gd(r){e:for(;;){for(;r.sibling===null;){if(r.return===null||E0(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&&ni(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 Vd(r,a,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,a?(c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c).insertBefore(r,a):(a=c.nodeType===9?c.body:c.nodeName==="HTML"?c.ownerDocument.body:c,a.appendChild(r),c=c._reactRootContainer,c!=null||a.onclick!==null||(a.onclick=pr));else if(m!==4&&(m===27&&ni(r.type)&&(c=r.stateNode,a=null),r=r.child,r!==null))for(Vd(r,a,c),r=r.sibling;r!==null;)Vd(r,a,c),r=r.sibling}function wl(r,a,c){var m=r.tag;if(m===5||m===6)r=r.stateNode,a?c.insertBefore(r,a):c.appendChild(r);else if(m!==4&&(m===27&&ni(r.type)&&(c=r.stateNode),r=r.child,r!==null))for(wl(r,a,c),r=r.sibling;r!==null;)wl(r,a,c),r=r.sibling}function x0(r){var a=r.stateNode,c=r.memoizedProps;try{for(var m=r.type,C=a.attributes;C.length;)a.removeAttributeNode(C[0]);$t(a,m,c),a[jt]=r,a[rn]=c}catch(A){nt(r,r.return,A)}}var wr=!1,Nt=!1,Wd=!1,w0=typeof WeakSet=="function"?WeakSet:Set,Pt=null;function y2(r,a){if(r=r.containerInfo,ph=Gl,r=BS(r),ju(r)){if("selectionStart"in r)var c={start:r.selectionStart,end:r.selectionEnd};else e:{c=(c=r.ownerDocument)&&c.defaultView||window;var m=c.getSelection&&c.getSelection();if(m&&m.rangeCount!==0){c=m.anchorNode;var C=m.anchorOffset,A=m.focusNode;m=m.focusOffset;try{c.nodeType,A.nodeType}catch{c=null;break e}var D=0,H=-1,X=-1,ae=0,de=0,pe=r,se=null;t:for(;;){for(var ue;pe!==c||C!==0&&pe.nodeType!==3||(H=D+C),pe!==A||m!==0&&pe.nodeType!==3||(X=D+m),pe.nodeType===3&&(D+=pe.nodeValue.length),(ue=pe.firstChild)!==null;)se=pe,pe=ue;for(;;){if(pe===r)break t;if(se===c&&++ae===C&&(H=D),se===A&&++de===m&&(X=D),(ue=pe.nextSibling)!==null)break;pe=se,se=pe.parentNode}pe=ue}c=H===-1||X===-1?null:{start:H,end:X}}else c=null}c=c||{start:0,end:0}}else c=null;for(mh={focusedElem:r,selectionRange:c},Gl=!1,Pt=a;Pt!==null;)if(a=Pt,r=a.child,(a.subtreeFlags&1028)!==0&&r!==null)r.return=a,Pt=r;else for(;Pt!==null;){switch(a=Pt,A=a.alternate,r=a.flags,a.tag){case 0:if((r&4)!==0&&(r=a.updateQueue,r=r!==null?r.events:null,r!==null))for(c=0;c<r.length;c++)C=r[c],C.ref.impl=C.nextImpl;break;case 11:case 15:break;case 1:if((r&1024)!==0&&A!==null){r=void 0,c=a,C=A.memoizedProps,A=A.memoizedState,m=c.stateNode;try{var _e=Fi(c.type,C);r=m.getSnapshotBeforeUpdate(_e,A),m.__reactInternalSnapshotBeforeUpdate=r}catch(Ne){nt(c,c.return,Ne)}}break;case 3:if((r&1024)!==0){if(r=a.stateNode.containerInfo,c=r.nodeType,c===9)yh(r);else if(c===1)switch(r.nodeName){case"HEAD":case"HTML":case"BODY":yh(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(i(163))}if(r=a.sibling,r!==null){r.return=a.return,Pt=r;break}Pt=a.return}}function C0(r,a,c){var m=c.flags;switch(c.tag){case 0:case 11:case 15:Tr(r,c),m&4&&Ps(5,c);break;case 1:if(Tr(r,c),m&4)if(r=c.stateNode,a===null)try{r.componentDidMount()}catch(D){nt(c,c.return,D)}else{var C=Fi(c.type,a.memoizedProps);a=a.memoizedState;try{r.componentDidUpdate(C,a,r.__reactInternalSnapshotBeforeUpdate)}catch(D){nt(c,c.return,D)}}m&64&&v0(c),m&512&&Us(c,c.return);break;case 3:if(Tr(r,c),m&64&&(r=c.updateQueue,r!==null)){if(a=null,c.child!==null)switch(c.child.tag){case 27:case 5:a=c.child.stateNode;break;case 1:a=c.child.stateNode}try{cE(r,a)}catch(D){nt(c,c.return,D)}}break;case 27:a===null&&m&4&&x0(c);case 26:case 5:Tr(r,c),a===null&&m&4&&S0(c),m&512&&Us(c,c.return);break;case 12:Tr(r,c);break;case 31:Tr(r,c),m&4&&A0(r,c);break;case 13:Tr(r,c),m&4&&R0(r,c),m&64&&(r=c.memoizedState,r!==null&&(r=r.dehydrated,r!==null&&(c=k2.bind(null,c),W2(r,c))));break;case 22:if(m=c.memoizedState!==null||wr,!m){a=a!==null&&a.memoizedState!==null||Nt,C=wr;var A=Nt;wr=m,(Nt=a)&&!A?kr(r,c,(c.subtreeFlags&8772)!==0):Tr(r,c),wr=C,Nt=A}break;case 30:break;default:Tr(r,c)}}function T0(r){var a=r.alternate;a!==null&&(r.alternate=null,T0(a)),r.child=null,r.deletions=null,r.sibling=null,r.tag===5&&(a=r.stateNode,a!==null&&xu(a)),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 ft=null,sn=!1;function Cr(r,a,c){for(c=c.child;c!==null;)k0(r,a,c),c=c.sibling}function k0(r,a,c){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(mt,c)}catch{}switch(c.tag){case 26:Nt||ir(c,a),Cr(r,a,c),c.memoizedState?c.memoizedState.count--:c.stateNode&&(c=c.stateNode,c.parentNode.removeChild(c));break;case 27:Nt||ir(c,a);var m=ft,C=sn;ni(c.type)&&(ft=c.stateNode,sn=!1),Cr(r,a,c),Ks(c.stateNode),ft=m,sn=C;break;case 5:Nt||ir(c,a);case 6:if(m=ft,C=sn,ft=null,Cr(r,a,c),ft=m,sn=C,ft!==null)if(sn)try{(ft.nodeType===9?ft.body:ft.nodeName==="HTML"?ft.ownerDocument.body:ft).removeChild(c.stateNode)}catch(A){nt(c,a,A)}else try{ft.removeChild(c.stateNode)}catch(A){nt(c,a,A)}break;case 18:ft!==null&&(sn?(r=ft,vx(r.nodeType===9?r.body:r.nodeName==="HTML"?r.ownerDocument.body:r,c.stateNode),qa(r)):vx(ft,c.stateNode));break;case 4:m=ft,C=sn,ft=c.stateNode.containerInfo,sn=!0,Cr(r,a,c),ft=m,sn=C;break;case 0:case 11:case 14:case 15:Yr(2,c,a),Nt||Yr(4,c,a),Cr(r,a,c);break;case 1:Nt||(ir(c,a),m=c.stateNode,typeof m.componentWillUnmount=="function"&&_0(c,a,m)),Cr(r,a,c);break;case 21:Cr(r,a,c);break;case 22:Nt=(m=Nt)||c.memoizedState!==null,Cr(r,a,c),Nt=m;break;default:Cr(r,a,c)}}function A0(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null))){r=r.dehydrated;try{qa(r)}catch(c){nt(a,a.return,c)}}}function R0(r,a){if(a.memoizedState===null&&(r=a.alternate,r!==null&&(r=r.memoizedState,r!==null&&(r=r.dehydrated,r!==null))))try{qa(r)}catch(c){nt(a,a.return,c)}}function v2(r){switch(r.tag){case 31:case 13:case 19:var a=r.stateNode;return a===null&&(a=r.stateNode=new w0),a;case 22:return r=r.stateNode,a=r._retryCache,a===null&&(a=r._retryCache=new w0),a;default:throw Error(i(435,r.tag))}}function Cl(r,a){var c=v2(r);a.forEach(function(m){if(!c.has(m)){c.add(m);var C=A2.bind(null,r,m);m.then(C,C)}})}function on(r,a){var c=a.deletions;if(c!==null)for(var m=0;m<c.length;m++){var C=c[m],A=r,D=a,H=D;e:for(;H!==null;){switch(H.tag){case 27:if(ni(H.type)){ft=H.stateNode,sn=!1;break e}break;case 5:ft=H.stateNode,sn=!1;break e;case 3:case 4:ft=H.stateNode.containerInfo,sn=!0;break e}H=H.return}if(ft===null)throw Error(i(160));k0(A,D,C),ft=null,sn=!1,A=C.alternate,A!==null&&(A.return=null),C.return=null}if(a.subtreeFlags&13886)for(a=a.child;a!==null;)N0(a,r),a=a.sibling}var Kn=null;function N0(r,a){var c=r.alternate,m=r.flags;switch(r.tag){case 0:case 11:case 14:case 15:on(a,r),ln(r),m&4&&(Yr(3,r,r.return),Ps(3,r),Yr(5,r,r.return));break;case 1:on(a,r),ln(r),m&512&&(Nt||c===null||ir(c,c.return)),m&64&&wr&&(r=r.updateQueue,r!==null&&(m=r.callbacks,m!==null&&(c=r.shared.hiddenCallbacks,r.shared.hiddenCallbacks=c===null?m:c.concat(m))));break;case 26:var C=Kn;if(on(a,r),ln(r),m&512&&(Nt||c===null||ir(c,c.return)),m&4){var A=c!==null?c.memoizedState:null;if(m=r.memoizedState,c===null)if(m===null)if(r.stateNode===null){e:{m=r.type,c=r.memoizedProps,C=C.ownerDocument||C;t:switch(m){case"title":A=C.getElementsByTagName("title")[0],(!A||A[hs]||A[jt]||A.namespaceURI==="http://www.w3.org/2000/svg"||A.hasAttribute("itemprop"))&&(A=C.createElement(m),C.head.insertBefore(A,C.querySelector("head > title"))),$t(A,m,c),A[jt]=r,Ft(A),m=A;break e;case"link":var D=Nx("link","href",C).get(m+(c.href||""));if(D){for(var H=0;H<D.length;H++)if(A=D[H],A.getAttribute("href")===(c.href==null||c.href===""?null:c.href)&&A.getAttribute("rel")===(c.rel==null?null:c.rel)&&A.getAttribute("title")===(c.title==null?null:c.title)&&A.getAttribute("crossorigin")===(c.crossOrigin==null?null:c.crossOrigin)){D.splice(H,1);break t}}A=C.createElement(m),$t(A,m,c),C.head.appendChild(A);break;case"meta":if(D=Nx("meta","content",C).get(m+(c.content||""))){for(H=0;H<D.length;H++)if(A=D[H],A.getAttribute("content")===(c.content==null?null:""+c.content)&&A.getAttribute("name")===(c.name==null?null:c.name)&&A.getAttribute("property")===(c.property==null?null:c.property)&&A.getAttribute("http-equiv")===(c.httpEquiv==null?null:c.httpEquiv)&&A.getAttribute("charset")===(c.charSet==null?null:c.charSet)){D.splice(H,1);break t}}A=C.createElement(m),$t(A,m,c),C.head.appendChild(A);break;default:throw Error(i(468,m))}A[jt]=r,Ft(A),m=A}r.stateNode=m}else Ox(C,r.type,r.stateNode);else r.stateNode=Rx(C,m,r.memoizedProps);else A!==m?(A===null?c.stateNode!==null&&(c=c.stateNode,c.parentNode.removeChild(c)):A.count--,m===null?Ox(C,r.type,r.stateNode):Rx(C,m,r.memoizedProps)):m===null&&r.stateNode!==null&&$d(r,r.memoizedProps,c.memoizedProps)}break;case 27:on(a,r),ln(r),m&512&&(Nt||c===null||ir(c,c.return)),c!==null&&m&4&&$d(r,r.memoizedProps,c.memoizedProps);break;case 5:if(on(a,r),ln(r),m&512&&(Nt||c===null||ir(c,c.return)),r.flags&32){C=r.stateNode;try{ha(C,"")}catch(_e){nt(r,r.return,_e)}}m&4&&r.stateNode!=null&&(C=r.memoizedProps,$d(r,C,c!==null?c.memoizedProps:C)),m&1024&&(Wd=!0);break;case 6:if(on(a,r),ln(r),m&4){if(r.stateNode===null)throw Error(i(162));m=r.memoizedProps,c=r.stateNode;try{c.nodeValue=m}catch(_e){nt(r,r.return,_e)}}break;case 3:if(zl=null,C=Kn,Kn=Ul(a.containerInfo),on(a,r),Kn=C,ln(r),m&4&&c!==null&&c.memoizedState.isDehydrated)try{qa(a.containerInfo)}catch(_e){nt(r,r.return,_e)}Wd&&(Wd=!1,O0(r));break;case 4:m=Kn,Kn=Ul(r.stateNode.containerInfo),on(a,r),ln(r),Kn=m;break;case 12:on(a,r),ln(r);break;case 31:on(a,r),ln(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Cl(r,m)));break;case 13:on(a,r),ln(r),r.child.flags&8192&&r.memoizedState!==null!=(c!==null&&c.memoizedState!==null)&&(kl=Re()),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Cl(r,m)));break;case 22:C=r.memoizedState!==null;var X=c!==null&&c.memoizedState!==null,ae=wr,de=Nt;if(wr=ae||C,Nt=de||X,on(a,r),Nt=de,wr=ae,ln(r),m&8192)e:for(a=r.stateNode,a._visibility=C?a._visibility&-2:a._visibility|1,C&&(c===null||X||wr||Nt||Pi(r)),c=null,a=r;;){if(a.tag===5||a.tag===26){if(c===null){X=c=a;try{if(A=X.stateNode,C)D=A.style,typeof D.setProperty=="function"?D.setProperty("display","none","important"):D.display="none";else{H=X.stateNode;var pe=X.memoizedProps.style,se=pe!=null&&pe.hasOwnProperty("display")?pe.display:null;H.style.display=se==null||typeof se=="boolean"?"":(""+se).trim()}}catch(_e){nt(X,X.return,_e)}}}else if(a.tag===6){if(c===null){X=a;try{X.stateNode.nodeValue=C?"":X.memoizedProps}catch(_e){nt(X,X.return,_e)}}}else if(a.tag===18){if(c===null){X=a;try{var ue=X.stateNode;C?_x(ue,!0):_x(X.stateNode,!1)}catch(_e){nt(X,X.return,_e)}}}else if((a.tag!==22&&a.tag!==23||a.memoizedState===null||a===r)&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===r)break e;for(;a.sibling===null;){if(a.return===null||a.return===r)break e;c===a&&(c=null),a=a.return}c===a&&(c=null),a.sibling.return=a.return,a=a.sibling}m&4&&(m=r.updateQueue,m!==null&&(c=m.retryQueue,c!==null&&(m.retryQueue=null,Cl(r,c))));break;case 19:on(a,r),ln(r),m&4&&(m=r.updateQueue,m!==null&&(r.updateQueue=null,Cl(r,m)));break;case 30:break;case 21:break;default:on(a,r),ln(r)}}function ln(r){var a=r.flags;if(a&2){try{for(var c,m=r.return;m!==null;){if(E0(m)){c=m;break}m=m.return}if(c==null)throw Error(i(160));switch(c.tag){case 27:var C=c.stateNode,A=Gd(r);wl(r,A,C);break;case 5:var D=c.stateNode;c.flags&32&&(ha(D,""),c.flags&=-33);var H=Gd(r);wl(r,H,D);break;case 3:case 4:var X=c.stateNode.containerInfo,ae=Gd(r);Vd(r,ae,X);break;default:throw Error(i(161))}}catch(de){nt(r,r.return,de)}r.flags&=-3}a&4096&&(r.flags&=-4097)}function O0(r){if(r.subtreeFlags&1024)for(r=r.child;r!==null;){var a=r;O0(a),a.tag===5&&a.flags&1024&&a.stateNode.reset(),r=r.sibling}}function Tr(r,a){if(a.subtreeFlags&8772)for(a=a.child;a!==null;)C0(r,a.alternate,a),a=a.sibling}function Pi(r){for(r=r.child;r!==null;){var a=r;switch(a.tag){case 0:case 11:case 14:case 15:Yr(4,a,a.return),Pi(a);break;case 1:ir(a,a.return);var c=a.stateNode;typeof c.componentWillUnmount=="function"&&_0(a,a.return,c),Pi(a);break;case 27:Ks(a.stateNode);case 26:case 5:ir(a,a.return),Pi(a);break;case 22:a.memoizedState===null&&Pi(a);break;case 30:Pi(a);break;default:Pi(a)}r=r.sibling}}function kr(r,a,c){for(c=c&&(a.subtreeFlags&8772)!==0,a=a.child;a!==null;){var m=a.alternate,C=r,A=a,D=A.flags;switch(A.tag){case 0:case 11:case 15:kr(C,A,c),Ps(4,A);break;case 1:if(kr(C,A,c),m=A,C=m.stateNode,typeof C.componentDidMount=="function")try{C.componentDidMount()}catch(ae){nt(m,m.return,ae)}if(m=A,C=m.updateQueue,C!==null){var H=m.stateNode;try{var X=C.shared.hiddenCallbacks;if(X!==null)for(C.shared.hiddenCallbacks=null,C=0;C<X.length;C++)lE(X[C],H)}catch(ae){nt(m,m.return,ae)}}c&&D&64&&v0(A),Us(A,A.return);break;case 27:x0(A);case 26:case 5:kr(C,A,c),c&&m===null&&D&4&&S0(A),Us(A,A.return);break;case 12:kr(C,A,c);break;case 31:kr(C,A,c),c&&D&4&&A0(C,A);break;case 13:kr(C,A,c),c&&D&4&&R0(C,A);break;case 22:A.memoizedState===null&&kr(C,A,c),Us(A,A.return);break;case 30:break;default:kr(C,A,c)}a=a.sibling}}function Kd(r,a){var c=null;r!==null&&r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(c=r.memoizedState.cachePool.pool),r=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==c&&(r!=null&&r.refCount++,c!=null&&Cs(c))}function Yd(r,a){r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Cs(r))}function Yn(r,a,c,m){if(a.subtreeFlags&10256)for(a=a.child;a!==null;)I0(r,a,c,m),a=a.sibling}function I0(r,a,c,m){var C=a.flags;switch(a.tag){case 0:case 11:case 15:Yn(r,a,c,m),C&2048&&Ps(9,a);break;case 1:Yn(r,a,c,m);break;case 3:Yn(r,a,c,m),C&2048&&(r=null,a.alternate!==null&&(r=a.alternate.memoizedState.cache),a=a.memoizedState.cache,a!==r&&(a.refCount++,r!=null&&Cs(r)));break;case 12:if(C&2048){Yn(r,a,c,m),r=a.stateNode;try{var A=a.memoizedProps,D=A.id,H=A.onPostCommit;typeof H=="function"&&H(D,a.alternate===null?"mount":"update",r.passiveEffectDuration,-0)}catch(X){nt(a,a.return,X)}}else Yn(r,a,c,m);break;case 31:Yn(r,a,c,m);break;case 13:Yn(r,a,c,m);break;case 23:break;case 22:A=a.stateNode,D=a.alternate,a.memoizedState!==null?A._visibility&2?Yn(r,a,c,m):js(r,a):A._visibility&2?Yn(r,a,c,m):(A._visibility|=2,Ia(r,a,c,m,(a.subtreeFlags&10256)!==0||!1)),C&2048&&Kd(D,a);break;case 24:Yn(r,a,c,m),C&2048&&Yd(a.alternate,a);break;default:Yn(r,a,c,m)}}function Ia(r,a,c,m,C){for(C=C&&((a.subtreeFlags&10256)!==0||!1),a=a.child;a!==null;){var A=r,D=a,H=c,X=m,ae=D.flags;switch(D.tag){case 0:case 11:case 15:Ia(A,D,H,X,C),Ps(8,D);break;case 23:break;case 22:var de=D.stateNode;D.memoizedState!==null?de._visibility&2?Ia(A,D,H,X,C):js(A,D):(de._visibility|=2,Ia(A,D,H,X,C)),C&&ae&2048&&Kd(D.alternate,D);break;case 24:Ia(A,D,H,X,C),C&&ae&2048&&Yd(D.alternate,D);break;default:Ia(A,D,H,X,C)}a=a.sibling}}function js(r,a){if(a.subtreeFlags&10256)for(a=a.child;a!==null;){var c=r,m=a,C=m.flags;switch(m.tag){case 22:js(c,m),C&2048&&Kd(m.alternate,m);break;case 24:js(c,m),C&2048&&Yd(m.alternate,m);break;default:js(c,m)}a=a.sibling}}var zs=8192;function La(r,a,c){if(r.subtreeFlags&zs)for(r=r.child;r!==null;)L0(r,a,c),r=r.sibling}function L0(r,a,c){switch(r.tag){case 26:La(r,a,c),r.flags&zs&&r.memoizedState!==null&&aM(c,Kn,r.memoizedState,r.memoizedProps);break;case 5:La(r,a,c);break;case 3:case 4:var m=Kn;Kn=Ul(r.stateNode.containerInfo),La(r,a,c),Kn=m;break;case 22:r.memoizedState===null&&(m=r.alternate,m!==null&&m.memoizedState!==null?(m=zs,zs=16777216,La(r,a,c),zs=m):La(r,a,c));break;default:La(r,a,c)}}function D0(r){var a=r.alternate;if(a!==null&&(r=a.child,r!==null)){a.child=null;do a=r.sibling,r.sibling=null,r=a;while(r!==null)}}function Hs(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var m=a[c];Pt=m,B0(m,r)}D0(r)}if(r.subtreeFlags&10256)for(r=r.child;r!==null;)M0(r),r=r.sibling}function M0(r){switch(r.tag){case 0:case 11:case 15:Hs(r),r.flags&2048&&Yr(9,r,r.return);break;case 3:Hs(r);break;case 12:Hs(r);break;case 22:var a=r.stateNode;r.memoizedState!==null&&a._visibility&2&&(r.return===null||r.return.tag!==13)?(a._visibility&=-3,Tl(r)):Hs(r);break;default:Hs(r)}}function Tl(r){var a=r.deletions;if((r.flags&16)!==0){if(a!==null)for(var c=0;c<a.length;c++){var m=a[c];Pt=m,B0(m,r)}D0(r)}for(r=r.child;r!==null;){switch(a=r,a.tag){case 0:case 11:case 15:Yr(8,a,a.return),Tl(a);break;case 22:c=a.stateNode,c._visibility&2&&(c._visibility&=-3,Tl(a));break;default:Tl(a)}r=r.sibling}}function B0(r,a){for(;Pt!==null;){var c=Pt;switch(c.tag){case 0:case 11:case 15:Yr(8,c,a);break;case 23:case 22:if(c.memoizedState!==null&&c.memoizedState.cachePool!==null){var m=c.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Cs(c.memoizedState.cache)}if(m=c.child,m!==null)m.return=c,Pt=m;else e:for(c=r;Pt!==null;){m=Pt;var C=m.sibling,A=m.return;if(T0(m),m===c){Pt=null;break e}if(C!==null){C.return=A,Pt=C;break e}Pt=A}}}var _2={getCacheForType:function(r){var a=Ht(kt),c=a.data.get(r);return c===void 0&&(c=r(),a.data.set(r,c)),c},cacheSignal:function(){return Ht(kt).controller.signal}},S2=typeof WeakMap=="function"?WeakMap:Map,Qe=0,ot=null,He=null,Ge=0,tt=0,En=null,Xr=!1,Da=!1,Xd=!1,Ar=0,St=0,Zr=0,Ui=0,Zd=0,xn=0,Ma=0,qs=null,cn=null,Qd=!1,kl=0,F0=0,Al=1/0,Rl=null,Qr=null,Dt=0,Jr=null,Ba=null,Rr=0,Jd=0,eh=null,P0=null,$s=0,th=null;function wn(){return(Qe&2)!==0&&Ge!==0?Ge&-Ge:W.T!==null?oh():eS()}function U0(){if(xn===0)if((Ge&536870912)===0||Ke){var r=er;er<<=1,(er&3932160)===0&&(er=262144),xn=r}else xn=536870912;return r=_n.current,r!==null&&(r.flags|=32),xn}function un(r,a,c){(r===ot&&(tt===2||tt===9)||r.cancelPendingCommit!==null)&&(Fa(r,0),ei(r,Ge,xn,!1)),ds(r,c),((Qe&2)===0||r!==ot)&&(r===ot&&((Qe&2)===0&&(Ui|=c),St===4&&ei(r,Ge,xn,!1)),ar(r))}function j0(r,a,c){if((Qe&6)!==0)throw Error(i(327));var m=!c&&(a&127)===0&&(a&r.expiredLanes)===0||Fr(r,a),C=m?w2(r,a):rh(r,a,!0),A=m;do{if(C===0){Da&&!m&&ei(r,a,0,!1);break}else{if(c=r.current.alternate,A&&!E2(c)){C=rh(r,a,!1),A=!1;continue}if(C===2){if(A=a,r.errorRecoveryDisabledLanes&A)var D=0;else D=r.pendingLanes&-536870913,D=D!==0?D:D&536870912?536870912:0;if(D!==0){a=D;e:{var H=r;C=qs;var X=H.current.memoizedState.isDehydrated;if(X&&(Fa(H,D).flags|=256),D=rh(H,D,!1),D!==2){if(Xd&&!X){H.errorRecoveryDisabledLanes|=A,Ui|=A,C=4;break e}A=cn,cn=C,A!==null&&(cn===null?cn=A:cn.push.apply(cn,A))}C=D}if(A=!1,C!==2)continue}}if(C===1){Fa(r,0),ei(r,a,0,!0);break}e:{switch(m=r,A=C,A){case 0:case 1:throw Error(i(345));case 4:if((a&4194048)!==a)break;case 6:ei(m,a,xn,!Xr);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((a&62914560)===a&&(C=kl+300-Re(),10<C)){if(ei(m,a,xn,!Xr),Ei(m,0,!0)!==0)break e;Rr=a,m.timeoutHandle=bx(z0.bind(null,m,c,cn,Rl,Qd,a,xn,Ui,Ma,Xr,A,"Throttled",-0,0),C);break e}z0(m,c,cn,Rl,Qd,a,xn,Ui,Ma,Xr,A,null,-0,0)}}break}while(!0);ar(r)}function z0(r,a,c,m,C,A,D,H,X,ae,de,pe,se,ue){if(r.timeoutHandle=-1,pe=a.subtreeFlags,pe&8192||(pe&16785408)===16785408){pe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:pr},L0(a,A,pe);var _e=(A&62914560)===A?kl-Re():(A&4194048)===A?F0-Re():0;if(_e=sM(pe,_e),_e!==null){Rr=A,r.cancelPendingCommit=_e(Y0.bind(null,r,a,A,c,m,C,D,H,X,de,pe,null,se,ue)),ei(r,A,D,!ae);return}}Y0(r,a,A,c,m,C,D,H,X)}function E2(r){for(var a=r;;){var c=a.tag;if((c===0||c===11||c===15)&&a.flags&16384&&(c=a.updateQueue,c!==null&&(c=c.stores,c!==null)))for(var m=0;m<c.length;m++){var C=c[m],A=C.getSnapshot;C=C.value;try{if(!yn(A(),C))return!1}catch{return!1}}if(c=a.child,a.subtreeFlags&16384&&c!==null)c.return=a,a=c;else{if(a===r)break;for(;a.sibling===null;){if(a.return===null||a.return===r)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ei(r,a,c,m){a&=~Zd,a&=~Ui,r.suspendedLanes|=a,r.pingedLanes&=~a,m&&(r.warmLanes|=a),m=r.expirationTimes;for(var C=a;0<C;){var A=31-Je(C),D=1<<A;m[A]=-1,C&=~D}c!==0&&Z_(r,c,a)}function Nl(){return(Qe&6)===0?(Gs(0),!1):!0}function nh(){if(He!==null){if(tt===0)var r=He.return;else r=He,yr=Ni=null,yd(r),ka=null,ks=0,r=He;for(;r!==null;)y0(r.alternate,r),r=r.return;He=null}}function Fa(r,a){var c=r.timeoutHandle;c!==-1&&(r.timeoutHandle=-1,H2(c)),c=r.cancelPendingCommit,c!==null&&(r.cancelPendingCommit=null,c()),Rr=0,nh(),ot=r,He=c=gr(r.current,null),Ge=a,tt=0,En=null,Xr=!1,Da=Fr(r,a),Xd=!1,Ma=xn=Zd=Ui=Zr=St=0,cn=qs=null,Qd=!1,(a&8)!==0&&(a|=a&32);var m=r.entangledLanes;if(m!==0)for(r=r.entanglements,m&=a;0<m;){var C=31-Je(m),A=1<<C;a|=r[C],m&=~A}return Ar=a,Zo(),c}function H0(r,a){Be=null,W.H=Ms,a===Ta||a===al?(a=iE(),tt=3):a===sd?(a=iE(),tt=4):tt=a===Dd?8:a!==null&&typeof a=="object"&&typeof a.then=="function"?6:1,En=a,He===null&&(St=1,vl(r,Mn(a,r.current)))}function q0(){var r=_n.current;return r===null?!0:(Ge&4194048)===Ge?Un===null:(Ge&62914560)===Ge||(Ge&536870912)!==0?r===Un:!1}function $0(){var r=W.H;return W.H=Ms,r===null?Ms:r}function G0(){var r=W.A;return W.A=_2,r}function Ol(){St=4,Xr||(Ge&4194048)!==Ge&&_n.current!==null||(Da=!0),(Zr&134217727)===0&&(Ui&134217727)===0||ot===null||ei(ot,Ge,xn,!1)}function rh(r,a,c){var m=Qe;Qe|=2;var C=$0(),A=G0();(ot!==r||Ge!==a)&&(Rl=null,Fa(r,a)),a=!1;var D=St;e:do try{if(tt!==0&&He!==null){var H=He,X=En;switch(tt){case 8:nh(),D=6;break e;case 3:case 2:case 9:case 6:_n.current===null&&(a=!0);var ae=tt;if(tt=0,En=null,Pa(r,H,X,ae),c&&Da){D=0;break e}break;default:ae=tt,tt=0,En=null,Pa(r,H,X,ae)}}x2(),D=St;break}catch(de){H0(r,de)}while(!0);return a&&r.shellSuspendCounter++,yr=Ni=null,Qe=m,W.H=C,W.A=A,He===null&&(ot=null,Ge=0,Zo()),D}function x2(){for(;He!==null;)V0(He)}function w2(r,a){var c=Qe;Qe|=2;var m=$0(),C=G0();ot!==r||Ge!==a?(Rl=null,Al=Re()+500,Fa(r,a)):Da=Fr(r,a);e:do try{if(tt!==0&&He!==null){a=He;var A=En;t:switch(tt){case 1:tt=0,En=null,Pa(r,a,A,1);break;case 2:case 9:if(nE(A)){tt=0,En=null,W0(a);break}a=function(){tt!==2&&tt!==9||ot!==r||(tt=7),ar(r)},A.then(a,a);break e;case 3:tt=7;break e;case 4:tt=5;break e;case 7:nE(A)?(tt=0,En=null,W0(a)):(tt=0,En=null,Pa(r,a,A,7));break;case 5:var D=null;switch(He.tag){case 26:D=He.memoizedState;case 5:case 27:var H=He;if(D?Ix(D):H.stateNode.complete){tt=0,En=null;var X=H.sibling;if(X!==null)He=X;else{var ae=H.return;ae!==null?(He=ae,Il(ae)):He=null}break t}}tt=0,En=null,Pa(r,a,A,5);break;case 6:tt=0,En=null,Pa(r,a,A,6);break;case 8:nh(),St=6;break e;default:throw Error(i(462))}}C2();break}catch(de){H0(r,de)}while(!0);return yr=Ni=null,W.H=m,W.A=C,Qe=c,He!==null?0:(ot=null,Ge=0,Zo(),St)}function C2(){for(;He!==null&&!Tt();)V0(He)}function V0(r){var a=g0(r.alternate,r,Ar);r.memoizedProps=r.pendingProps,a===null?Il(r):He=a}function W0(r){var a=r,c=a.alternate;switch(a.tag){case 15:case 0:a=u0(c,a,a.pendingProps,a.type,void 0,Ge);break;case 11:a=u0(c,a,a.pendingProps,a.type.render,a.ref,Ge);break;case 5:yd(a);default:y0(c,a),a=He=GS(a,Ar),a=g0(c,a,Ar)}r.memoizedProps=r.pendingProps,a===null?Il(r):He=a}function Pa(r,a,c,m){yr=Ni=null,yd(a),ka=null,ks=0;var C=a.return;try{if(f2(r,C,a,c,Ge)){St=1,vl(r,Mn(c,r.current)),He=null;return}}catch(A){if(C!==null)throw He=C,A;St=1,vl(r,Mn(c,r.current)),He=null;return}a.flags&32768?(Ke||m===1?r=!0:Da||(Ge&536870912)!==0?r=!1:(Xr=r=!0,(m===2||m===9||m===3||m===6)&&(m=_n.current,m!==null&&m.tag===13&&(m.flags|=16384))),K0(a,r)):Il(a)}function Il(r){var a=r;do{if((a.flags&32768)!==0){K0(a,Xr);return}r=a.return;var c=g2(a.alternate,a,Ar);if(c!==null){He=c;return}if(a=a.sibling,a!==null){He=a;return}He=a=r}while(a!==null);St===0&&(St=5)}function K0(r,a){do{var c=b2(r.alternate,r);if(c!==null){c.flags&=32767,He=c;return}if(c=r.return,c!==null&&(c.flags|=32768,c.subtreeFlags=0,c.deletions=null),!a&&(r=r.sibling,r!==null)){He=r;return}He=r=c}while(r!==null);St=6,He=null}function Y0(r,a,c,m,C,A,D,H,X){r.cancelPendingCommit=null;do Ll();while(Dt!==0);if((Qe&6)!==0)throw Error(i(327));if(a!==null){if(a===r.current)throw Error(i(177));if(A=a.lanes|a.childLanes,A|=Gu,iD(r,c,A,D,H,X),r===ot&&(He=ot=null,Ge=0),Ba=a,Jr=r,Rr=c,Jd=A,eh=C,P0=m,(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?(r.callbackNode=null,r.callbackPriority=0,R2(ve,function(){return ex(),null})):(r.callbackNode=null,r.callbackPriority=0),m=(a.flags&13878)!==0,(a.subtreeFlags&13878)!==0||m){m=W.T,W.T=null,C=Z.p,Z.p=2,D=Qe,Qe|=4;try{y2(r,a,c)}finally{Qe=D,Z.p=C,W.T=m}}Dt=1,X0(),Z0(),Q0()}}function X0(){if(Dt===1){Dt=0;var r=Jr,a=Ba,c=(a.flags&13878)!==0;if((a.subtreeFlags&13878)!==0||c){c=W.T,W.T=null;var m=Z.p;Z.p=2;var C=Qe;Qe|=4;try{N0(a,r);var A=mh,D=BS(r.containerInfo),H=A.focusedElem,X=A.selectionRange;if(D!==H&&H&&H.ownerDocument&&MS(H.ownerDocument.documentElement,H)){if(X!==null&&ju(H)){var ae=X.start,de=X.end;if(de===void 0&&(de=ae),"selectionStart"in H)H.selectionStart=ae,H.selectionEnd=Math.min(de,H.value.length);else{var pe=H.ownerDocument||document,se=pe&&pe.defaultView||window;if(se.getSelection){var ue=se.getSelection(),_e=H.textContent.length,Ne=Math.min(X.start,_e),at=X.end===void 0?Ne:Math.min(X.end,_e);!ue.extend&&Ne>at&&(D=at,at=Ne,Ne=D);var te=DS(H,Ne),J=DS(H,at);if(te&&J&&(ue.rangeCount!==1||ue.anchorNode!==te.node||ue.anchorOffset!==te.offset||ue.focusNode!==J.node||ue.focusOffset!==J.offset)){var ie=pe.createRange();ie.setStart(te.node,te.offset),ue.removeAllRanges(),Ne>at?(ue.addRange(ie),ue.extend(J.node,J.offset)):(ie.setEnd(J.node,J.offset),ue.addRange(ie))}}}}for(pe=[],ue=H;ue=ue.parentNode;)ue.nodeType===1&&pe.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof H.focus=="function"&&H.focus(),H=0;H<pe.length;H++){var fe=pe[H];fe.element.scrollLeft=fe.left,fe.element.scrollTop=fe.top}}Gl=!!ph,mh=ph=null}finally{Qe=C,Z.p=m,W.T=c}}r.current=a,Dt=2}}function Z0(){if(Dt===2){Dt=0;var r=Jr,a=Ba,c=(a.flags&8772)!==0;if((a.subtreeFlags&8772)!==0||c){c=W.T,W.T=null;var m=Z.p;Z.p=2;var C=Qe;Qe|=4;try{C0(r,a.alternate,a)}finally{Qe=C,Z.p=m,W.T=c}}Dt=3}}function Q0(){if(Dt===4||Dt===3){Dt=0,Oe();var r=Jr,a=Ba,c=Rr,m=P0;(a.subtreeFlags&10256)!==0||(a.flags&10256)!==0?Dt=5:(Dt=0,Ba=Jr=null,J0(r,r.pendingLanes));var C=r.pendingLanes;if(C===0&&(Qr=null),Su(c),a=a.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(mt,a,void 0,(a.current.flags&128)===128)}catch{}if(m!==null){a=W.T,C=Z.p,Z.p=2,W.T=null;try{for(var A=r.onRecoverableError,D=0;D<m.length;D++){var H=m[D];A(H.value,{componentStack:H.stack})}}finally{W.T=a,Z.p=C}}(Rr&3)!==0&&Ll(),ar(r),C=r.pendingLanes,(c&261930)!==0&&(C&42)!==0?r===th?$s++:($s=0,th=r):$s=0,Gs(0)}}function J0(r,a){(r.pooledCacheLanes&=a)===0&&(a=r.pooledCache,a!=null&&(r.pooledCache=null,Cs(a)))}function Ll(){return X0(),Z0(),Q0(),ex()}function ex(){if(Dt!==5)return!1;var r=Jr,a=Jd;Jd=0;var c=Su(Rr),m=W.T,C=Z.p;try{Z.p=32>c?32:c,W.T=null,c=eh,eh=null;var A=Jr,D=Rr;if(Dt=0,Ba=Jr=null,Rr=0,(Qe&6)!==0)throw Error(i(331));var H=Qe;if(Qe|=4,M0(A.current),I0(A,A.current,D,c),Qe=H,Gs(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(mt,A)}catch{}return!0}finally{Z.p=C,W.T=m,J0(r,a)}}function tx(r,a,c){a=Mn(c,a),a=Ld(r.stateNode,a,2),r=Vr(r,a,2),r!==null&&(ds(r,2),ar(r))}function nt(r,a,c){if(r.tag===3)tx(r,r,c);else for(;a!==null;){if(a.tag===3){tx(a,r,c);break}else if(a.tag===1){var m=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(Qr===null||!Qr.has(m))){r=Mn(c,r),c=n0(2),m=Vr(a,c,2),m!==null&&(r0(c,m,a,r),ds(m,2),ar(m));break}}a=a.return}}function ih(r,a,c){var m=r.pingCache;if(m===null){m=r.pingCache=new S2;var C=new Set;m.set(a,C)}else C=m.get(a),C===void 0&&(C=new Set,m.set(a,C));C.has(c)||(Xd=!0,C.add(c),r=T2.bind(null,r,a,c),a.then(r,r))}function T2(r,a,c){var m=r.pingCache;m!==null&&m.delete(a),r.pingedLanes|=r.suspendedLanes&c,r.warmLanes&=~c,ot===r&&(Ge&c)===c&&(St===4||St===3&&(Ge&62914560)===Ge&&300>Re()-kl?(Qe&2)===0&&Fa(r,0):Zd|=c,Ma===Ge&&(Ma=0)),ar(r)}function nx(r,a){a===0&&(a=X_()),r=ki(r,a),r!==null&&(ds(r,a),ar(r))}function k2(r){var a=r.memoizedState,c=0;a!==null&&(c=a.retryLane),nx(r,c)}function A2(r,a){var c=0;switch(r.tag){case 31:case 13:var m=r.stateNode,C=r.memoizedState;C!==null&&(c=C.retryLane);break;case 19:m=r.stateNode;break;case 22:m=r.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(a),nx(r,c)}function R2(r,a){return et(r,a)}var Dl=null,Ua=null,ah=!1,Ml=!1,sh=!1,ti=0;function ar(r){r!==Ua&&r.next===null&&(Ua===null?Dl=Ua=r:Ua=Ua.next=r),Ml=!0,ah||(ah=!0,O2())}function Gs(r,a){if(!sh&&Ml){sh=!0;do for(var c=!1,m=Dl;m!==null;){if(r!==0){var C=m.pendingLanes;if(C===0)var A=0;else{var D=m.suspendedLanes,H=m.pingedLanes;A=(1<<31-Je(42|r)+1)-1,A&=C&~(D&~H),A=A&201326741?A&201326741|1:A?A|2:0}A!==0&&(c=!0,sx(m,A))}else A=Ge,A=Ei(m,m===ot?A:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(A&3)===0||Fr(m,A)||(c=!0,sx(m,A));m=m.next}while(c);sh=!1}}function N2(){rx()}function rx(){Ml=ah=!1;var r=0;ti!==0&&z2()&&(r=ti);for(var a=Re(),c=null,m=Dl;m!==null;){var C=m.next,A=ix(m,a);A===0?(m.next=null,c===null?Dl=C:c.next=C,C===null&&(Ua=c)):(c=m,(r!==0||(A&3)!==0)&&(Ml=!0)),m=C}Dt!==0&&Dt!==5||Gs(r),ti!==0&&(ti=0)}function ix(r,a){for(var c=r.suspendedLanes,m=r.pingedLanes,C=r.expirationTimes,A=r.pendingLanes&-62914561;0<A;){var D=31-Je(A),H=1<<D,X=C[D];X===-1?((H&c)===0||(H&m)!==0)&&(C[D]=us(H,a)):X<=a&&(r.expiredLanes|=H),A&=~H}if(a=ot,c=Ge,c=Ei(r,r===a?c:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m=r.callbackNode,c===0||r===a&&(tt===2||tt===9)||r.cancelPendingCommit!==null)return m!==null&&m!==null&&Bt(m),r.callbackNode=null,r.callbackPriority=0;if((c&3)===0||Fr(r,c)){if(a=c&-c,a===r.callbackPriority)return a;switch(m!==null&&Bt(m),Su(c)){case 2:case 8:c=me;break;case 32:c=ve;break;case 268435456:c=Le;break;default:c=ve}return m=ax.bind(null,r),c=et(c,m),r.callbackPriority=a,r.callbackNode=c,a}return m!==null&&m!==null&&Bt(m),r.callbackPriority=2,r.callbackNode=null,2}function ax(r,a){if(Dt!==0&&Dt!==5)return r.callbackNode=null,r.callbackPriority=0,null;var c=r.callbackNode;if(Ll()&&r.callbackNode!==c)return null;var m=Ge;return m=Ei(r,r===ot?m:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),m===0?null:(j0(r,m,a),ix(r,Re()),r.callbackNode!=null&&r.callbackNode===c?ax.bind(null,r):null)}function sx(r,a){if(Ll())return null;j0(r,a,!0)}function O2(){q2(function(){(Qe&6)!==0?et(oe,N2):rx()})}function oh(){if(ti===0){var r=wa;r===0&&(r=gt,gt<<=1,(gt&261888)===0&&(gt=256)),ti=r}return ti}function ox(r){return r==null||typeof r=="symbol"||typeof r=="boolean"?null:typeof r=="function"?r:qo(""+r)}function lx(r,a){var c=a.ownerDocument.createElement("input");return c.name=a.name,c.value=a.value,r.id&&c.setAttribute("form",r.id),a.parentNode.insertBefore(c,a),r=new FormData(r),c.parentNode.removeChild(c),r}function I2(r,a,c,m,C){if(a==="submit"&&c&&c.stateNode===C){var A=ox((C[rn]||null).action),D=m.submitter;D&&(a=(a=D[rn]||null)?ox(a.formAction):D.getAttribute("formAction"),a!==null&&(A=a,D=null));var H=new Wo("action","action",null,m,C);r.push({event:H,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(ti!==0){var X=D?lx(C,D):new FormData(C);kd(c,{pending:!0,data:X,method:C.method,action:A},null,X)}}else typeof A=="function"&&(H.preventDefault(),X=D?lx(C,D):new FormData(C),kd(c,{pending:!0,data:X,method:C.method,action:A},A,X))},currentTarget:C}]})}}for(var lh=0;lh<$u.length;lh++){var ch=$u[lh],L2=ch.toLowerCase(),D2=ch[0].toUpperCase()+ch.slice(1);Wn(L2,"on"+D2)}Wn(US,"onAnimationEnd"),Wn(jS,"onAnimationIteration"),Wn(zS,"onAnimationStart"),Wn("dblclick","onDoubleClick"),Wn("focusin","onFocus"),Wn("focusout","onBlur"),Wn(XD,"onTransitionRun"),Wn(ZD,"onTransitionStart"),Wn(QD,"onTransitionCancel"),Wn(HS,"onTransitionEnd"),ua("onMouseEnter",["mouseout","mouseover"]),ua("onMouseLeave",["mouseout","mouseover"]),ua("onPointerEnter",["pointerout","pointerover"]),ua("onPointerLeave",["pointerout","pointerover"]),xi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),xi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),xi("onBeforeInput",["compositionend","keypress","textInput","paste"]),xi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),xi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),xi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Vs="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(" "),M2=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Vs));function cx(r,a){a=(a&4)!==0;for(var c=0;c<r.length;c++){var m=r[c],C=m.event;m=m.listeners;e:{var A=void 0;if(a)for(var D=m.length-1;0<=D;D--){var H=m[D],X=H.instance,ae=H.currentTarget;if(H=H.listener,X!==A&&C.isPropagationStopped())break e;A=H,C.currentTarget=ae;try{A(C)}catch(de){Xo(de)}C.currentTarget=null,A=X}else for(D=0;D<m.length;D++){if(H=m[D],X=H.instance,ae=H.currentTarget,H=H.listener,X!==A&&C.isPropagationStopped())break e;A=H,C.currentTarget=ae;try{A(C)}catch(de){Xo(de)}C.currentTarget=null,A=X}}}}function qe(r,a){var c=a[Eu];c===void 0&&(c=a[Eu]=new Set);var m=r+"__bubble";c.has(m)||(ux(a,r,2,!1),c.add(m))}function uh(r,a,c){var m=0;a&&(m|=4),ux(c,r,m,a)}var Bl="_reactListening"+Math.random().toString(36).slice(2);function dh(r){if(!r[Bl]){r[Bl]=!0,rS.forEach(function(c){c!=="selectionchange"&&(M2.has(c)||uh(c,!1,r),uh(c,!0,r))});var a=r.nodeType===9?r:r.ownerDocument;a===null||a[Bl]||(a[Bl]=!0,uh("selectionchange",!1,a))}}function ux(r,a,c,m){switch(Ux(a)){case 2:var C=cM;break;case 8:C=uM;break;default:C=Th}c=C.bind(null,a,c,r),C=void 0,!Ou||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(C=!0),m?C!==void 0?r.addEventListener(a,c,{capture:!0,passive:C}):r.addEventListener(a,c,!0):C!==void 0?r.addEventListener(a,c,{passive:C}):r.addEventListener(a,c,!1)}function hh(r,a,c,m,C){var A=m;if((a&1)===0&&(a&2)===0&&m!==null)e:for(;;){if(m===null)return;var D=m.tag;if(D===3||D===4){var H=m.stateNode.containerInfo;if(H===C)break;if(D===4)for(D=m.return;D!==null;){var X=D.tag;if((X===3||X===4)&&D.stateNode.containerInfo===C)return;D=D.return}for(;H!==null;){if(D=oa(H),D===null)return;if(X=D.tag,X===5||X===6||X===26||X===27){m=A=D;continue e}H=H.parentNode}}m=m.return}mS(function(){var ae=A,de=Ru(c),pe=[];e:{var se=qS.get(r);if(se!==void 0){var ue=Wo,_e=r;switch(r){case"keypress":if(Go(c)===0)break e;case"keydown":case"keyup":ue=AD;break;case"focusin":_e="focus",ue=Mu;break;case"focusout":_e="blur",ue=Mu;break;case"beforeblur":case"afterblur":ue=Mu;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=yS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=gD;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=OD;break;case US:case jS:case zS:ue=vD;break;case HS:ue=LD;break;case"scroll":case"scrollend":ue=pD;break;case"wheel":ue=MD;break;case"copy":case"cut":case"paste":ue=SD;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=_S;break;case"toggle":case"beforetoggle":ue=FD}var Ne=(a&4)!==0,at=!Ne&&(r==="scroll"||r==="scrollend"),te=Ne?se!==null?se+"Capture":null:se;Ne=[];for(var J=ae,ie;J!==null;){var fe=J;if(ie=fe.stateNode,fe=fe.tag,fe!==5&&fe!==26&&fe!==27||ie===null||te===null||(fe=ps(J,te),fe!=null&&Ne.push(Ws(J,fe,ie))),at)break;J=J.return}0<Ne.length&&(se=new ue(se,_e,null,c,de),pe.push({event:se,listeners:Ne}))}}if((a&7)===0){e:{if(se=r==="mouseover"||r==="pointerover",ue=r==="mouseout"||r==="pointerout",se&&c!==Au&&(_e=c.relatedTarget||c.fromElement)&&(oa(_e)||_e[sa]))break e;if((ue||se)&&(se=de.window===de?de:(se=de.ownerDocument)?se.defaultView||se.parentWindow:window,ue?(_e=c.relatedTarget||c.toElement,ue=ae,_e=_e?oa(_e):null,_e!==null&&(at=l(_e),Ne=_e.tag,_e!==at||Ne!==5&&Ne!==27&&Ne!==6)&&(_e=null)):(ue=null,_e=ae),ue!==_e)){if(Ne=yS,fe="onMouseLeave",te="onMouseEnter",J="mouse",(r==="pointerout"||r==="pointerover")&&(Ne=_S,fe="onPointerLeave",te="onPointerEnter",J="pointer"),at=ue==null?se:fs(ue),ie=_e==null?se:fs(_e),se=new Ne(fe,J+"leave",ue,c,de),se.target=at,se.relatedTarget=ie,fe=null,oa(de)===ae&&(Ne=new Ne(te,J+"enter",_e,c,de),Ne.target=ie,Ne.relatedTarget=at,fe=Ne),at=fe,ue&&_e)t:{for(Ne=B2,te=ue,J=_e,ie=0,fe=te;fe;fe=Ne(fe))ie++;fe=0;for(var Ce=J;Ce;Ce=Ne(Ce))fe++;for(;0<ie-fe;)te=Ne(te),ie--;for(;0<fe-ie;)J=Ne(J),fe--;for(;ie--;){if(te===J||J!==null&&te===J.alternate){Ne=te;break t}te=Ne(te),J=Ne(J)}Ne=null}else Ne=null;ue!==null&&dx(pe,se,ue,Ne,!1),_e!==null&&at!==null&&dx(pe,at,_e,Ne,!0)}}e:{if(se=ae?fs(ae):window,ue=se.nodeName&&se.nodeName.toLowerCase(),ue==="select"||ue==="input"&&se.type==="file")var Xe=AS;else if(TS(se))if(RS)Xe=WD;else{Xe=GD;var Se=$D}else ue=se.nodeName,!ue||ue.toLowerCase()!=="input"||se.type!=="checkbox"&&se.type!=="radio"?ae&&ku(ae.elementType)&&(Xe=AS):Xe=VD;if(Xe&&(Xe=Xe(r,ae))){kS(pe,Xe,c,de);break e}Se&&Se(r,se,ae),r==="focusout"&&ae&&se.type==="number"&&ae.memoizedProps.value!=null&&Tu(se,"number",se.value)}switch(Se=ae?fs(ae):window,r){case"focusin":(TS(Se)||Se.contentEditable==="true")&&(ga=Se,zu=ae,Es=null);break;case"focusout":Es=zu=ga=null;break;case"mousedown":Hu=!0;break;case"contextmenu":case"mouseup":case"dragend":Hu=!1,FS(pe,c,de);break;case"selectionchange":if(YD)break;case"keydown":case"keyup":FS(pe,c,de)}var Ue;if(Fu)e:{switch(r){case"compositionstart":var Ve="onCompositionStart";break e;case"compositionend":Ve="onCompositionEnd";break e;case"compositionupdate":Ve="onCompositionUpdate";break e}Ve=void 0}else ma?wS(r,c)&&(Ve="onCompositionEnd"):r==="keydown"&&c.keyCode===229&&(Ve="onCompositionStart");Ve&&(SS&&c.locale!=="ko"&&(ma||Ve!=="onCompositionStart"?Ve==="onCompositionEnd"&&ma&&(Ue=gS()):(Ur=de,Iu="value"in Ur?Ur.value:Ur.textContent,ma=!0)),Se=Fl(ae,Ve),0<Se.length&&(Ve=new vS(Ve,r,null,c,de),pe.push({event:Ve,listeners:Se}),Ue?Ve.data=Ue:(Ue=CS(c),Ue!==null&&(Ve.data=Ue)))),(Ue=UD?jD(r,c):zD(r,c))&&(Ve=Fl(ae,"onBeforeInput"),0<Ve.length&&(Se=new vS("onBeforeInput","beforeinput",null,c,de),pe.push({event:Se,listeners:Ve}),Se.data=Ue)),I2(pe,r,ae,c,de)}cx(pe,a)})}function Ws(r,a,c){return{instance:r,listener:a,currentTarget:c}}function Fl(r,a){for(var c=a+"Capture",m=[];r!==null;){var C=r,A=C.stateNode;if(C=C.tag,C!==5&&C!==26&&C!==27||A===null||(C=ps(r,c),C!=null&&m.unshift(Ws(r,C,A)),C=ps(r,a),C!=null&&m.push(Ws(r,C,A))),r.tag===3)return m;r=r.return}return[]}function B2(r){if(r===null)return null;do r=r.return;while(r&&r.tag!==5&&r.tag!==27);return r||null}function dx(r,a,c,m,C){for(var A=a._reactName,D=[];c!==null&&c!==m;){var H=c,X=H.alternate,ae=H.stateNode;if(H=H.tag,X!==null&&X===m)break;H!==5&&H!==26&&H!==27||ae===null||(X=ae,C?(ae=ps(c,A),ae!=null&&D.unshift(Ws(c,ae,X))):C||(ae=ps(c,A),ae!=null&&D.push(Ws(c,ae,X)))),c=c.return}D.length!==0&&r.push({event:a,listeners:D})}var F2=/\r\n?/g,P2=/\u0000|\uFFFD/g;function hx(r){return(typeof r=="string"?r:""+r).replace(F2,`
9
- `).replace(P2,"")}function fx(r,a){return a=hx(a),hx(r)===a}function it(r,a,c,m,C,A){switch(c){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||ha(r,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&ha(r,""+m);break;case"className":zo(r,"class",m);break;case"tabIndex":zo(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":zo(r,c,m);break;case"style":fS(r,m,A);break;case"data":if(a!=="object"){zo(r,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=qo(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"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 A=="function"&&(c==="formAction"?(a!=="input"&&it(r,a,"name",C.name,C,null),it(r,a,"formEncType",C.formEncType,C,null),it(r,a,"formMethod",C.formMethod,C,null),it(r,a,"formTarget",C.formTarget,C,null)):(it(r,a,"encType",C.encType,C,null),it(r,a,"method",C.method,C,null),it(r,a,"target",C.target,C,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=qo(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=pr);break;case"onScroll":m!=null&&qe("scroll",r);break;case"onScrollEnd":m!=null&&qe("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=qo(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);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":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":qe("beforetoggle",r),qe("toggle",r),jo(r,"popover",m);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":jo(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=hD.get(c)||c,jo(r,c,m))}}function fh(r,a,c,m,C,A){switch(c){case"style":fS(r,m,A);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?ha(r,m):(typeof m=="number"||typeof m=="bigint")&&ha(r,""+m);break;case"onScroll":m!=null&&qe("scroll",r);break;case"onScrollEnd":m!=null&&qe("scrollend",r);break;case"onClick":m!=null&&(r.onclick=pr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!iS.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(C=c.endsWith("Capture"),a=c.slice(2,C?c.length-7:void 0),A=r[rn]||null,A=A!=null?A[c]:null,typeof A=="function"&&r.removeEventListener(a,A,C),typeof m=="function")){typeof A!="function"&&A!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(a,m,C);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):jo(r,c,m)}}}function $t(r,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",r),qe("load",r);var m=!1,C=!1,A;for(A in c)if(c.hasOwnProperty(A)){var D=c[A];if(D!=null)switch(A){case"src":m=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(r,a,A,D,c,null)}}C&&it(r,a,"srcSet",c.srcSet,c,null),m&&it(r,a,"src",c.src,c,null);return;case"input":qe("invalid",r);var H=A=D=C=null,X=null,ae=null;for(m in c)if(c.hasOwnProperty(m)){var de=c[m];if(de!=null)switch(m){case"name":C=de;break;case"type":D=de;break;case"checked":X=de;break;case"defaultChecked":ae=de;break;case"value":A=de;break;case"defaultValue":H=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(i(137,a));break;default:it(r,a,m,de,c,null)}}cS(r,A,H,X,ae,D,C,!1);return;case"select":qe("invalid",r),m=D=A=null;for(C in c)if(c.hasOwnProperty(C)&&(H=c[C],H!=null))switch(C){case"value":A=H;break;case"defaultValue":D=H;break;case"multiple":m=H;default:it(r,a,C,H,c,null)}a=A,c=D,r.multiple=!!m,a!=null?da(r,!!m,a,!1):c!=null&&da(r,!!m,c,!0);return;case"textarea":qe("invalid",r),A=C=m=null;for(D in c)if(c.hasOwnProperty(D)&&(H=c[D],H!=null))switch(D){case"value":m=H;break;case"defaultValue":C=H;break;case"children":A=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(91));break;default:it(r,a,D,H,c,null)}dS(r,m,C,A);return;case"option":for(X in c)c.hasOwnProperty(X)&&(m=c[X],m!=null)&&(X==="selected"?r.selected=m&&typeof m!="function"&&typeof m!="symbol":it(r,a,X,m,c,null));return;case"dialog":qe("beforetoggle",r),qe("toggle",r),qe("cancel",r),qe("close",r);break;case"iframe":case"object":qe("load",r);break;case"video":case"audio":for(m=0;m<Vs.length;m++)qe(Vs[m],r);break;case"image":qe("error",r),qe("load",r);break;case"details":qe("toggle",r);break;case"embed":case"source":case"link":qe("error",r),qe("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(ae in c)if(c.hasOwnProperty(ae)&&(m=c[ae],m!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(r,a,ae,m,c,null)}return;default:if(ku(a)){for(de in c)c.hasOwnProperty(de)&&(m=c[de],m!==void 0&&fh(r,a,de,m,c,void 0));return}}for(H in c)c.hasOwnProperty(H)&&(m=c[H],m!=null&&it(r,a,H,m,c,null))}function U2(r,a,c,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,A=null,D=null,H=null,X=null,ae=null,de=null;for(ue in c){var pe=c[ue];if(c.hasOwnProperty(ue)&&pe!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":X=pe;default:m.hasOwnProperty(ue)||it(r,a,ue,null,m,pe)}}for(var se in m){var ue=m[se];if(pe=c[se],m.hasOwnProperty(se)&&(ue!=null||pe!=null))switch(se){case"type":A=ue;break;case"name":C=ue;break;case"checked":ae=ue;break;case"defaultChecked":de=ue;break;case"value":D=ue;break;case"defaultValue":H=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,a));break;default:ue!==pe&&it(r,a,se,ue,m,pe)}}Cu(r,D,H,X,ae,de,A,C);return;case"select":ue=D=H=se=null;for(A in c)if(X=c[A],c.hasOwnProperty(A)&&X!=null)switch(A){case"value":break;case"multiple":ue=X;default:m.hasOwnProperty(A)||it(r,a,A,null,m,X)}for(C in m)if(A=m[C],X=c[C],m.hasOwnProperty(C)&&(A!=null||X!=null))switch(C){case"value":se=A;break;case"defaultValue":H=A;break;case"multiple":D=A;default:A!==X&&it(r,a,C,A,m,X)}a=H,c=D,m=ue,se!=null?da(r,!!c,se,!1):!!m!=!!c&&(a!=null?da(r,!!c,a,!0):da(r,!!c,c?[]:"",!1));return;case"textarea":ue=se=null;for(H in c)if(C=c[H],c.hasOwnProperty(H)&&C!=null&&!m.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:it(r,a,H,null,m,C)}for(D in m)if(C=m[D],A=c[D],m.hasOwnProperty(D)&&(C!=null||A!=null))switch(D){case"value":se=C;break;case"defaultValue":ue=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:C!==A&&it(r,a,D,C,m,A)}uS(r,se,ue);return;case"option":for(var _e in c)se=c[_e],c.hasOwnProperty(_e)&&se!=null&&!m.hasOwnProperty(_e)&&(_e==="selected"?r.selected=!1:it(r,a,_e,null,m,se));for(X in m)se=m[X],ue=c[X],m.hasOwnProperty(X)&&se!==ue&&(se!=null||ue!=null)&&(X==="selected"?r.selected=se&&typeof se!="function"&&typeof se!="symbol":it(r,a,X,se,m,ue));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 Ne in c)se=c[Ne],c.hasOwnProperty(Ne)&&se!=null&&!m.hasOwnProperty(Ne)&&it(r,a,Ne,null,m,se);for(ae in m)if(se=m[ae],ue=c[ae],m.hasOwnProperty(ae)&&se!==ue&&(se!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,a));break;default:it(r,a,ae,se,m,ue)}return;default:if(ku(a)){for(var at in c)se=c[at],c.hasOwnProperty(at)&&se!==void 0&&!m.hasOwnProperty(at)&&fh(r,a,at,void 0,m,se);for(de in m)se=m[de],ue=c[de],!m.hasOwnProperty(de)||se===ue||se===void 0&&ue===void 0||fh(r,a,de,se,m,ue);return}}for(var te in c)se=c[te],c.hasOwnProperty(te)&&se!=null&&!m.hasOwnProperty(te)&&it(r,a,te,null,m,se);for(pe in m)se=m[pe],ue=c[pe],!m.hasOwnProperty(pe)||se===ue||se==null&&ue==null||it(r,a,pe,se,m,ue)}function px(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var C=c[m],A=C.transferSize,D=C.initiatorType,H=C.duration;if(A&&H&&px(D)){for(D=0,H=C.responseEnd,m+=1;m<c.length;m++){var X=c[m],ae=X.startTime;if(ae>H)break;var de=X.transferSize,pe=X.initiatorType;de&&px(pe)&&(X=X.responseEnd,D+=de*(X<H?1:(H-ae)/(X-ae)))}if(--m,a+=8*(A+D)/(C.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var ph=null,mh=null;function Pl(r){return r.nodeType===9?r:r.ownerDocument}function mx(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 gx(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function gh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var bh=null;function z2(){var r=window.event;return r&&r.type==="popstate"?r===bh?!1:(bh=r,!0):(bh=null,!1)}var bx=typeof setTimeout=="function"?setTimeout:void 0,H2=typeof clearTimeout=="function"?clearTimeout:void 0,yx=typeof Promise=="function"?Promise:void 0,q2=typeof queueMicrotask=="function"?queueMicrotask:typeof yx<"u"?function(r){return yx.resolve(null).then(r).catch($2)}:bx;function $2(r){setTimeout(function(){throw r})}function ni(r){return r==="head"}function vx(r,a){var c=a,m=0;do{var C=c.nextSibling;if(r.removeChild(c),C&&C.nodeType===8)if(c=C.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(C),qa(a);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")Ks(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,Ks(c);for(var A=c.firstChild;A;){var D=A.nextSibling,H=A.nodeName;A[hs]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&A.rel.toLowerCase()==="stylesheet"||c.removeChild(A),A=D}}else c==="body"&&Ks(r.ownerDocument.body);c=C}while(c);qa(a)}function _x(r,a){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?a?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(a?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function yh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":yh(c),xu(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function G2(r,a,c,m){for(;r.nodeType===1;){var C=c;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[hs])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(A=r.getAttribute("rel"),A==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(A!==C.rel||r.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||r.getAttribute("title")!==(C.title==null?null:C.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(A=r.getAttribute("src"),(A!==(C.src==null?null:C.src)||r.getAttribute("type")!==(C.type==null?null:C.type)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&A&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var A=C.name==null?null:""+C.name;if(C.type==="hidden"&&r.getAttribute("name")===A)return r}else return r;if(r=jn(r.nextSibling),r===null)break}return null}function V2(r,a,c){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=jn(r.nextSibling),r===null))return null;return r}function Sx(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=jn(r.nextSibling),r===null))return null;return r}function vh(r){return r.data==="$?"||r.data==="$~"}function _h(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function W2(r,a){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||c.readyState!=="loading")a();else{var m=function(){a(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function jn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Sh=null;function Ex(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(a===0)return jn(r.nextSibling);a--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||a++}r=r.nextSibling}return null}function xx(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(a===0)return r;a--}else c!=="/$"&&c!=="/&"||a++}r=r.previousSibling}return null}function wx(r,a,c){switch(a=Pl(c),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Ks(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);xu(r)}var zn=new Map,Cx=new Set;function Ul(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Nr=Z.d;Z.d={f:K2,r:Y2,D:X2,C:Z2,L:Q2,m:J2,X:tM,S:eM,M:nM};function K2(){var r=Nr.f(),a=Nl();return r||a}function Y2(r){var a=la(r);a!==null&&a.tag===5&&a.type==="form"?HE(a):Nr.r(r)}var ja=typeof document>"u"?null:document;function Tx(r,a,c){var m=ja;if(m&&typeof a=="string"&&a){var C=Ln(a);C='link[rel="'+r+'"][href="'+C+'"]',typeof c=="string"&&(C+='[crossorigin="'+c+'"]'),Cx.has(C)||(Cx.add(C),r={rel:r,crossOrigin:c,href:a},m.querySelector(C)===null&&(a=m.createElement("link"),$t(a,"link",r),Ft(a),m.head.appendChild(a)))}}function X2(r){Nr.D(r),Tx("dns-prefetch",r,null)}function Z2(r,a){Nr.C(r,a),Tx("preconnect",r,a)}function Q2(r,a,c){Nr.L(r,a,c);var m=ja;if(m&&r&&a){var C='link[rel="preload"][as="'+Ln(a)+'"]';a==="image"&&c&&c.imageSrcSet?(C+='[imagesrcset="'+Ln(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(C+='[imagesizes="'+Ln(c.imageSizes)+'"]')):C+='[href="'+Ln(r)+'"]';var A=C;switch(a){case"style":A=za(r);break;case"script":A=Ha(r)}zn.has(A)||(r=f({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:r,as:a},c),zn.set(A,r),m.querySelector(C)!==null||a==="style"&&m.querySelector(Ys(A))||a==="script"&&m.querySelector(Xs(A))||(a=m.createElement("link"),$t(a,"link",r),Ft(a),m.head.appendChild(a)))}}function J2(r,a){Nr.m(r,a);var c=ja;if(c&&r){var m=a&&typeof a.as=="string"?a.as:"script",C='link[rel="modulepreload"][as="'+Ln(m)+'"][href="'+Ln(r)+'"]',A=C;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Ha(r)}if(!zn.has(A)&&(r=f({rel:"modulepreload",href:r},a),zn.set(A,r),c.querySelector(C)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Xs(A)))return}m=c.createElement("link"),$t(m,"link",r),Ft(m),c.head.appendChild(m)}}}function eM(r,a,c){Nr.S(r,a,c);var m=ja;if(m&&r){var C=ca(m).hoistableStyles,A=za(r);a=a||"default";var D=C.get(A);if(!D){var H={loading:0,preload:null};if(D=m.querySelector(Ys(A)))H.loading=5;else{r=f({rel:"stylesheet",href:r,"data-precedence":a},c),(c=zn.get(A))&&Eh(r,c);var X=D=m.createElement("link");Ft(X),$t(X,"link",r),X._p=new Promise(function(ae,de){X.onload=ae,X.onerror=de}),X.addEventListener("load",function(){H.loading|=1}),X.addEventListener("error",function(){H.loading|=2}),H.loading|=4,jl(D,a,m)}D={type:"stylesheet",instance:D,count:1,state:H},C.set(A,D)}}}function tM(r,a){Nr.X(r,a);var c=ja;if(c&&r){var m=ca(c).hoistableScripts,C=Ha(r),A=m.get(C);A||(A=c.querySelector(Xs(C)),A||(r=f({src:r,async:!0},a),(a=zn.get(C))&&xh(r,a),A=c.createElement("script"),Ft(A),$t(A,"link",r),c.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function nM(r,a){Nr.M(r,a);var c=ja;if(c&&r){var m=ca(c).hoistableScripts,C=Ha(r),A=m.get(C);A||(A=c.querySelector(Xs(C)),A||(r=f({src:r,async:!0,type:"module"},a),(a=zn.get(C))&&xh(r,a),A=c.createElement("script"),Ft(A),$t(A,"link",r),c.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function kx(r,a,c,m){var C=(C=ne.current)?Ul(C):null;if(!C)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=za(c.href),c=ca(C).hoistableStyles,m=c.get(a),m||(m={type:"style",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=za(c.href);var A=ca(C).hoistableStyles,D=A.get(r);if(D||(C=C.ownerDocument||C,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(r,D),(A=C.querySelector(Ys(r)))&&!A._p&&(D.instance=A,D.state.loading=5),zn.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},zn.set(r,c),A||rM(C,r,c,D.state))),a&&m===null)throw Error(i(528,""));return D}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ha(c),c=ca(C).hoistableScripts,m=c.get(a),m||(m={type:"script",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function za(r){return'href="'+Ln(r)+'"'}function Ys(r){return'link[rel="stylesheet"]['+r+"]"}function Ax(r){return f({},r,{"data-precedence":r.precedence,precedence:null})}function rM(r,a,c,m){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=r.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),$t(a,"link",c),Ft(a),r.head.appendChild(a))}function Ha(r){return'[src="'+Ln(r)+'"]'}function Xs(r){return"script[async]"+r}function Rx(r,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var m=r.querySelector('style[data-href~="'+Ln(c.href)+'"]');if(m)return a.instance=m,Ft(m),m;var C=f({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Ft(m),$t(m,"style",C),jl(m,c.precedence,r),a.instance=m;case"stylesheet":C=za(c.href);var A=r.querySelector(Ys(C));if(A)return a.state.loading|=4,a.instance=A,Ft(A),A;m=Ax(c),(C=zn.get(C))&&Eh(m,C),A=(r.ownerDocument||r).createElement("link"),Ft(A);var D=A;return D._p=new Promise(function(H,X){D.onload=H,D.onerror=X}),$t(A,"link",m),a.state.loading|=4,jl(A,c.precedence,r),a.instance=A;case"script":return A=Ha(c.src),(C=r.querySelector(Xs(A)))?(a.instance=C,Ft(C),C):(m=c,(C=zn.get(A))&&(m=f({},c),xh(m,C)),r=r.ownerDocument||r,C=r.createElement("script"),Ft(C),$t(C,"link",m),r.head.appendChild(C),a.instance=C);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,jl(m,c.precedence,r));return a.instance}function jl(r,a,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=m.length?m[m.length-1]:null,A=C,D=0;D<m.length;D++){var H=m[D];if(H.dataset.precedence===a)A=H;else if(A!==C)break}A?A.parentNode.insertBefore(r,A.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(r,a.firstChild))}function Eh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function xh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var zl=null;function Nx(r,a,c){if(zl===null){var m=new Map,C=zl=new Map;C.set(c,m)}else C=zl,m=C.get(c),m||(m=new Map,C.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),C=0;C<c.length;C++){var A=c[C];if(!(A[hs]||A[jt]||r==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var D=A.getAttribute(a)||"";D=r+D;var H=m.get(D);H?H.push(A):m.set(D,[A])}}return m}function Ox(r,a,c){r=r.ownerDocument||r,r.head.insertBefore(c,a==="title"?r.querySelector("head > title"):null)}function iM(r,a,c){if(c===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ix(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function aM(r,a,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var C=za(m.href),A=a.querySelector(Ys(C));if(A){a=A._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Hl.bind(r),a.then(r,r)),c.state.loading|=4,c.instance=A,Ft(A);return}A=a.ownerDocument||a,m=Ax(m),(C=zn.get(C))&&Eh(m,C),A=A.createElement("link"),Ft(A);var D=A;D._p=new Promise(function(H,X){D.onload=H,D.onerror=X}),$t(A,"link",m),c.instance=A}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,a),(a=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=Hl.bind(r),a.addEventListener("load",c),a.addEventListener("error",c))}}var wh=0;function sM(r,a){return r.stylesheets&&r.count===0&&$l(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&$l(r,r.stylesheets),r.unsuspend){var A=r.unsuspend;r.unsuspend=null,A()}},6e4+a);0<r.imgBytes&&wh===0&&(wh=62500*j2());var C=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&$l(r,r.stylesheets),r.unsuspend)){var A=r.unsuspend;r.unsuspend=null,A()}},(r.imgBytes>wh?50:800)+a);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(C)}}:null}function Hl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$l(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ql=null;function $l(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ql=new Map,a.forEach(oM,r),ql=null,Hl.call(r))}function oM(r,a){if(!(a.state.loading&4)){var c=ql.get(r);if(c)var m=c.get(null);else{c=new Map,ql.set(r,c);for(var C=r.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<C.length;A++){var D=C[A];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(c.set(D.dataset.precedence,D),m=D)}m&&c.set(null,m)}C=a.instance,D=C.getAttribute("data-precedence"),A=c.get(D)||m,A===m&&c.set(null,C),c.set(D,C),this.count++,m=Hl.bind(this),C.addEventListener("load",m),C.addEventListener("error",m),A?A.parentNode.insertBefore(C,A.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(C,r.firstChild)),a.state.loading|=4}}var Zs={$$typeof:_,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function lM(r,a,c,m,C,A,D,H,X){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=vu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vu(0),this.hiddenUpdates=vu(null),this.identifierPrefix=m,this.onUncaughtError=C,this.onCaughtError=A,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Lx(r,a,c,m,C,A,D,H,X,ae,de,pe){return r=new lM(r,a,c,D,X,ae,de,pe,H),a=1,A===!0&&(a|=24),A=vn(3,null,null,a),r.current=A,A.stateNode=r,a=rd(),a.refCount++,r.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:c,cache:a},od(A),r}function Dx(r){return r?(r=va,r):va}function Mx(r,a,c,m,C,A){C=Dx(C),m.context===null?m.context=C:m.pendingContext=C,m=Gr(a),m.payload={element:c},A=A===void 0?null:A,A!==null&&(m.callback=A),c=Vr(r,m,a),c!==null&&(un(c,r,a),Rs(c,r,a))}function Bx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<a?c:a}}function Ch(r,a){Bx(r,a),(r=r.alternate)&&Bx(r,a)}function Fx(r){if(r.tag===13||r.tag===31){var a=ki(r,67108864);a!==null&&un(a,r,67108864),Ch(r,67108864)}}function Px(r){if(r.tag===13||r.tag===31){var a=wn();a=_u(a);var c=ki(r,a);c!==null&&un(c,r,a),Ch(r,a)}}var Gl=!0;function cM(r,a,c,m){var C=W.T;W.T=null;var A=Z.p;try{Z.p=2,Th(r,a,c,m)}finally{Z.p=A,W.T=C}}function uM(r,a,c,m){var C=W.T;W.T=null;var A=Z.p;try{Z.p=8,Th(r,a,c,m)}finally{Z.p=A,W.T=C}}function Th(r,a,c,m){if(Gl){var C=kh(m);if(C===null)hh(r,a,m,Vl,c),jx(r,m);else if(hM(C,r,a,c,m))m.stopPropagation();else if(jx(r,m),a&4&&-1<dM.indexOf(r)){for(;C!==null;){var A=la(C);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var D=tr(A.pendingLanes);if(D!==0){var H=A;for(H.pendingLanes|=2,H.entangledLanes|=2;D;){var X=1<<31-Je(D);H.entanglements[1]|=X,D&=~X}ar(A),(Qe&6)===0&&(Al=Re()+500,Gs(0))}}break;case 31:case 13:H=ki(A,2),H!==null&&un(H,A,2),Nl(),Ch(A,2)}if(A=kh(m),A===null&&hh(r,a,m,Vl,c),A===C)break;C=A}C!==null&&m.stopPropagation()}else hh(r,a,m,null,c)}}function kh(r){return r=Ru(r),Ah(r)}var Vl=null;function Ah(r){if(Vl=null,r=oa(r),r!==null){var a=l(r);if(a===null)r=null;else{var c=a.tag;if(c===13){if(r=u(a),r!==null)return r;r=null}else if(c===31){if(r=o(a),r!==null)return r;r=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Vl=r,null}function Ux(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(we()){case oe:return 2;case me:return 8;case ve:case Te:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Rh=!1,ri=null,ii=null,ai=null,Qs=new Map,Js=new Map,si=[],dM="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 jx(r,a){switch(r){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":ai=null;break;case"pointerover":case"pointerout":Qs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(a.pointerId)}}function eo(r,a,c,m,C,A){return r===null||r.nativeEvent!==A?(r={blockedOn:a,domEventName:c,eventSystemFlags:m,nativeEvent:A,targetContainers:[C]},a!==null&&(a=la(a),a!==null&&Fx(a)),r):(r.eventSystemFlags|=m,a=r.targetContainers,C!==null&&a.indexOf(C)===-1&&a.push(C),r)}function hM(r,a,c,m,C){switch(a){case"focusin":return ri=eo(ri,r,a,c,m,C),!0;case"dragenter":return ii=eo(ii,r,a,c,m,C),!0;case"mouseover":return ai=eo(ai,r,a,c,m,C),!0;case"pointerover":var A=C.pointerId;return Qs.set(A,eo(Qs.get(A)||null,r,a,c,m,C)),!0;case"gotpointercapture":return A=C.pointerId,Js.set(A,eo(Js.get(A)||null,r,a,c,m,C)),!0}return!1}function zx(r){var a=oa(r.target);if(a!==null){var c=l(a);if(c!==null){if(a=c.tag,a===13){if(a=u(c),a!==null){r.blockedOn=a,tS(r.priority,function(){Px(c)});return}}else if(a===31){if(a=o(c),a!==null){r.blockedOn=a,tS(r.priority,function(){Px(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Wl(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var c=kh(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);Au=m,c.target.dispatchEvent(m),Au=null}else return a=la(c),a!==null&&Fx(a),r.blockedOn=c,!1;a.shift()}return!0}function Hx(r,a,c){Wl(r)&&c.delete(a)}function fM(){Rh=!1,ri!==null&&Wl(ri)&&(ri=null),ii!==null&&Wl(ii)&&(ii=null),ai!==null&&Wl(ai)&&(ai=null),Qs.forEach(Hx),Js.forEach(Hx)}function Kl(r,a){r.blockedOn===a&&(r.blockedOn=null,Rh||(Rh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fM)))}var Yl=null;function qx(r){Yl!==r&&(Yl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yl===r&&(Yl=null);for(var a=0;a<r.length;a+=3){var c=r[a],m=r[a+1],C=r[a+2];if(typeof m!="function"){if(Ah(m||c)===null)continue;break}var A=la(c);A!==null&&(r.splice(a,3),a-=3,kd(A,{pending:!0,data:C,method:c.method,action:m},m,C))}}))}function qa(r){function a(X){return Kl(X,r)}ri!==null&&Kl(ri,r),ii!==null&&Kl(ii,r),ai!==null&&Kl(ai,r),Qs.forEach(a),Js.forEach(a);for(var c=0;c<si.length;c++){var m=si[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<si.length&&(c=si[0],c.blockedOn===null);)zx(c),c.blockedOn===null&&si.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var C=c[m],A=c[m+1],D=C[rn]||null;if(typeof A=="function")D||qx(c);else if(D){var H=null;if(A&&A.hasAttribute("formAction")){if(C=A,D=A[rn]||null)H=D.formAction;else if(Ah(C)!==null)continue}else H=D.action;typeof H=="function"?c[m+1]=H:(c.splice(m,3),m-=3),qx(c)}}}function $x(){function r(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(D){return C=D})},focusReset:"manual",scroll:"manual"})}function a(){C!==null&&(C(),C=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,C=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),C!==null&&(C(),C=null)}}}function Nh(r){this._internalRoot=r}Xl.prototype.render=Nh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var c=a.current,m=wn();Mx(c,m,r,a,null,null)},Xl.prototype.unmount=Nh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Mx(r.current,2,null,r,null,null),Nl(),a[sa]=null}};function Xl(r){this._internalRoot=r}Xl.prototype.unstable_scheduleHydration=function(r){if(r){var a=eS();r={blockedOn:null,target:r,priority:a};for(var c=0;c<si.length&&a!==0&&a<si[c].priority;c++);si.splice(c,0,r),c===0&&zx(r)}};var Gx=t.version;if(Gx!=="19.2.3")throw Error(i(527,Gx,"19.2.3"));Z.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var pM={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{mt=Zl.inject(pM),st=Zl}catch{}}return no.createRoot=function(r,a){if(!s(r))throw Error(i(299));var c=!1,m="",C=QE,A=JE,D=e0;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(C=a.onUncaughtError),a.onCaughtError!==void 0&&(A=a.onCaughtError),a.onRecoverableError!==void 0&&(D=a.onRecoverableError)),a=Lx(r,1,!1,null,null,c,m,null,C,A,D,$x),r[sa]=a.current,dh(r),new Nh(a)},no.hydrateRoot=function(r,a,c){if(!s(r))throw Error(i(299));var m=!1,C="",A=QE,D=JE,H=e0,X=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(C=c.identifierPrefix),c.onUncaughtError!==void 0&&(A=c.onUncaughtError),c.onCaughtError!==void 0&&(D=c.onCaughtError),c.onRecoverableError!==void 0&&(H=c.onRecoverableError),c.formState!==void 0&&(X=c.formState)),a=Lx(r,1,!0,a,c??null,m,C,X,A,D,H,$x),a.context=Dx(null),c=a.current,m=wn(),m=_u(m),C=Gr(m),C.callback=null,Vr(c,C,m),c=m,a.current.lanes=c,ds(a,c),ar(a),r[sa]=a.current,dh(r),new Xl(a)},no.version="19.2.3",no}var tw;function xM(){if(tw)return Lh.exports;tw=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(),Lh.exports=EM(),Lh.exports}var wM=xM(),rs=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(){}},CM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TM=class{#e=CM;#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)}},Hi=new TM;function kM(e){setTimeout(e,0)}var Ki=typeof window>"u"||"Deno"in globalThis;function Jt(){}function AM(e,t){return typeof e=="function"?e(t):e}function sv(e){return typeof e=="number"&&e>=0&&e!==1/0}function JN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fi(e,t){return typeof e=="function"?e(t):e}function qn(e,t){return typeof e=="function"?e(t):e}function nw(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:l,queryKey:u,stale:o}=e;if(u){if(i){if(t.queryHash!==Vv(u,t.options))return!1}else if(!_o(t.queryKey,u))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function rw(e,t){const{exact:n,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(l))return!1}else if(!_o(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Vv(e,t){return(t?.queryKeyHashFn||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>ov(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function _o(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_o(e[n],t[n])):!1}var RM=Object.prototype.hasOwnProperty;function eO(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=iw(e)&&iw(t);if(!i&&!(ov(e)&&ov(t)))return t;const l=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),o=u.length,d=i?new Array(o):{};let h=0;for(let p=0;p<o;p++){const f=i?p:u[p],g=e[f],b=t[f];if(g===b){d[f]=g,(i?p<l:RM.call(e,f))&&h++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){d[f]=b;continue}const x=eO(g,b,n+1);d[f]=x,x===g&&h++}return l===o&&h===l?e:d}function xc(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 iw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ov(e){if(!aw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!aw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function aw(e){return Object.prototype.toString.call(e)==="[object Object]"}function NM(e){return new Promise(t=>{Hi.setTimeout(t,e)})}function lv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eO(e,t):t}function OM(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function IM(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Wv=Symbol();function tO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kv(e,t){return typeof e=="function"?e(...t):!!e}function LM(e,t,n){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var DM=class extends rs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ki&&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"}},Yv=new DM;function cv(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var MM=kM;function BM(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=MM;const l=o=>{t?e.push(o):s(()=>{n(o)})},u=()=>{const o=e;e=[],o.length&&s(()=>{i(()=>{o.forEach(d=>{n(d)})})})};return{batch:o=>{let d;t++;try{d=o()}finally{t--,t||u()}return d},batchCalls:o=>(...d)=>{l(()=>{o(...d)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var Mt=BM(),FM=class extends rs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ki&&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}},wc=new FM;function PM(e){return Math.min(1e3*2**e,3e4)}function nO(e){return(e??"online")==="online"?wc.isOnline():!0}var uv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function rO(e){let t=!1,n=0,i;const s=cv(),l=()=>s.status!=="pending",u=E=>{if(!l()){const y=new uv(E);g(y),e.onCancel?.(y)}},o=()=>{t=!0},d=()=>{t=!1},h=()=>Yv.isFocused()&&(e.networkMode==="always"||wc.isOnline())&&e.canRun(),p=()=>nO(e.networkMode)&&e.canRun(),f=E=>{l()||(i?.(),s.resolve(E))},g=E=>{l()||(i?.(),s.reject(E))},b=()=>new Promise(E=>{i=y=>{(l()||h())&&E(y)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let E;const y=n===0?e.initialPromise:void 0;try{E=y??e.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(f).catch(S=>{if(l())return;const v=e.retry??(Ki?0:3),_=e.retryDelay??PM,w=typeof _=="function"?_(n,S):_,N=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,S);if(t||!N){g(S);return}n++,e.onFail?.(n,S),NM(w).then(()=>h()?void 0:b()).then(()=>{t?g(S):x()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:d,canStart:p,start:()=>(p()?x():b().then(x),s)}}var iO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sv(this.gcTime)&&(this.#e=Hi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ki?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Hi.clearTimeout(this.#e),this.#e=void 0)}},UM=class extends iO{#e;#t;#n;#i;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ow(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=ow(this.options);t.data!==void 0&&(this.setState(sw(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=lv(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Jt).catch(Jt):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===Wv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>fi(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:!JN(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.#a({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 o=this.observers.find(d=>d.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,i=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const o=tO(this.options,t),h=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(p),p})();return this.#o=!1,this.options.persister?this.options.persister(o,h,this):o(h)},u=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return i(o),o})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#a({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=rO({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:o=>{o instanceof uv&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,d)=>{this.#a({type:"failed",failureCount:o,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const o=await this.#r.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof uv){if(o.silent)return this.#r.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#a({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#a(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,...aO(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...sw(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;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",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Mt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function aO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ow(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jM=class extends rs{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=cv(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#o;#a;#m;#h;#f;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),lw(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#S(),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.#E(),this.#t.setOptions(this.options),t._defaulted&&!xc(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&cw(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(t.enabled,this.#t)||fi(this.options.staleTime,this.#t)!==fi(t.staleTime,this.#t))&&this.#g();const s=this.#b();i&&(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 HM(this,n)&&(this.#i=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="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,i))})}trackProp(e){this.#p.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.#i))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Jt)),t}#g(){this.#_();const e=fi(this.options.staleTime,this.#t);if(Ki||this.#i.isStale||!sv(e))return;const n=JN(this.#i.dataUpdatedAt,e)+1;this.#c=Hi.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#S(),this.#l=e,!(Ki||qn(this.options.enabled,this.#t)===!1||!sv(this.#l)||this.#l===0)&&(this.#u=Hi.setInterval(()=>{(this.options.refetchIntervalInBackground||Yv.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#_(){this.#c&&(Hi.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(Hi.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#i,l=this.#r,u=this.#s,d=e!==n?e.state:this.#n,{state:h}=e;let p={...h},f=!1,g;if(t._optimisticResults){const R=this.hasListeners(),I=!R&&lw(e,t),L=R&&cw(e,n,t,i);(I||L)&&(p={...p,...aO(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:E}=p;g=p.data;let y=!1;if(t.placeholderData!==void 0&&g===void 0&&E==="pending"){let R;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(R=s.data,y=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,R!==void 0&&(E="success",g=lv(s?.data,R,t),f=!0)}if(t.select&&g!==void 0&&!y)if(s&&g===l?.data&&t.select===this.#m)g=this.#h;else try{this.#m=t.select,g=t.select(g),g=lv(s?.data,g,t),this.#h=g,this.#a=null}catch(R){this.#a=R}this.#a&&(b=this.#a,g=this.#h,x=Date.now(),E="error");const S=p.fetchStatus==="fetching",v=E==="pending",_=E==="error",w=v&&S,N=g!==void 0,O={status:E,fetchStatus:p.fetchStatus,isPending:v,isSuccess:E==="success",isError:_,isInitialLoading:w,isLoading:w,data:g,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!v,isLoadingError:_&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&N,isStale:Xv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:qn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=O.data!==void 0,I=O.status==="error"&&!R,L=z=>{I?z.reject(O.error):R&&z.resolve(O.data)},F=()=>{const z=this.#o=O.promise=cv();L(z)},j=this.#o;switch(j.status){case"pending":e.queryHash===n.queryHash&&L(j);break;case"fulfilled":(I||O.data!==j.value)&&F();break;case"rejected":(!I||O.error!==j.reason)&&F();break}}return O}updateResult(){const e=this.#i,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),xc(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#i).some(u=>{const o=u;return this.#i[o]!==e[o]&&l.has(o)})};this.#x({listeners:n()})}#E(){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.#v()}#x(e){Mt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function zM(e,t){return qn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function lw(e,t){return zM(e,t)||e.state.data!==void 0&&dv(e,t,t.refetchOnMount)}function dv(e,t,n){if(qn(t.enabled,e)!==!1&&fi(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Xv(e,t)}return!1}function cw(e,t,n,i){return(e!==t||qn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Xv(e,n)}function Xv(e,t){return qn(t.enabled,e)!==!1&&e.isStaleByTime(fi(t.staleTime,e))}function HM(e,t){return!xc(e.getCurrentResult(),t)}function uw(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const f=x=>{LM(x,()=>t.signal,()=>p=!0)},g=tO(t.options,t.fetchOptions),b=async(x,E,y)=>{if(p)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const v=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:E,direction:y?"backward":"forward",meta:t.options.meta};return f(k),k})(),_=await g(v),{maxPages:w}=t.options,N=y?IM:OM;return{pages:N(x.pages,_,w),pageParams:N(x.pageParams,E,w)}};if(s&&l.length){const x=s==="backward",E=x?qM:dw,y={pages:l,pageParams:u},S=E(i,y);o=await b(y,S,x)}else{const x=e??l.length;do{const E=d===0?u[0]??i.initialPageParam:dw(i,o);if(d>0&&E==null)break;o=await b(o,E),d++}while(d<x)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function dw(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function qM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $M=class extends iO{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||sO(),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.#i?.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.#i=rO({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,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 i=this.state.status==="pending",s=!this.#i.canStart();try{if(i)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 l=await this.#i.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:l}),l}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),Mt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function sO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var GM=class extends rs{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 i=new $M({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=Ql(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=Ql(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ql(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Ql(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Mt.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=>rw(t,n))}findAll(e={}){return this.getAll().filter(t=>rw(e,t))}notify(e){Mt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Mt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Jt))))}};function Ql(e){return e.options.scope?.id}var VM=class extends rs{#e;#t=void 0;#n;#i;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),xc(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(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.#i=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??sO();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){Mt.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(t.data,null,n,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(void 0,t.error,n,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(n=>{n(this.#t)})})}},WM=class extends rs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Vv(i,t);let l=this.get(s);return l||(l=new UM({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}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(){Mt.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=>nw(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>nw(e,n)):t}notify(e){Mt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Mt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Mt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},KM=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new WM,this.#t=e.mutationCache||new GM,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=Yv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=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),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(fi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,u=AM(t,l);if(u!==void 0)return this.#e.build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Mt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Mt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Mt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Mt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Mt.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},i=Mt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(Jt)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(fi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=uw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=uw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wc.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.#i.set(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{_o(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{_o(e,i.mutationKey)&&Object.assign(n,i.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=Vv(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===Wv&&(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()}},oO=G.createContext(void 0),mn=e=>{const t=G.useContext(oO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YM=({client:e,children:t})=>(G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(oO.Provider,{value:e,children:t})),lO=G.createContext(!1),XM=()=>G.useContext(lO);lO.Provider;function ZM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QM=G.createContext(ZM()),JM=()=>G.useContext(QM),eB=(e,t,n)=>{const i=n?.state.error&&typeof e.throwOnError=="function"?Kv(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},tB=e=>{G.useEffect(()=>{e.clearReset()},[e])},nB=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||Kv(n,[e.error,i])),rB=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},iB=(e,t)=>e.isLoading&&e.isFetching&&!t,aB=(e,t)=>e?.suspense&&t.isPending,hw=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sB(e,t,n){const i=XM(),s=JM(),l=mn(),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const o=l.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",rB(u),eB(u,s,o),tB(s);const d=!l.getQueryCache().get(u.queryHash),[h]=G.useState(()=>new t(l,u)),p=h.getOptimisticResult(u),f=!i&&e.subscribed!==!1;if(G.useSyncExternalStore(G.useCallback(g=>{const b=f?h.subscribe(Mt.batchCalls(g)):Jt;return h.updateResult(),b},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),G.useEffect(()=>{h.setOptions(u)},[u,h]),aB(u,p))throw hw(u,h,s);if(nB({result:p,errorResetBoundary:s,throwOnError:u.throwOnError,query:o,suspense:u.suspense}))throw p.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,p),u.experimental_prefetchInRender&&!Ki&&iB(p,i)&&(d?hw(u,h,s):o?.promise)?.catch(Jt).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?p:h.trackResult(p)}function bi(e,t){return sB(e,jM)}function Qn(e,t){const n=mn(),[i]=G.useState(()=>new VM(n,e));G.useEffect(()=>{i.setOptions(e)},[i,e]);const s=G.useSyncExternalStore(G.useCallback(u=>i.subscribe(Mt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=G.useCallback((u,o)=>{i.mutate(u,o).catch(Jt)},[i]);if(s.error&&Kv(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const hv=new WeakMap,oB=new WeakMap,Cc={current:[]};let Fh=!1,po=0;const fo=new Set,Jl=new Map;function cO(e){for(const t of e){if(Cc.current.includes(t))continue;Cc.current.push(t),t.recompute();const n=oB.get(t);if(n)for(const i of n){const s=hv.get(i);s?.length&&cO(s)}}}function lB(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function cB(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function uO(e){if(po>0&&!Jl.has(e)&&Jl.set(e,e.prevState),fo.add(e),!(po>0)&&!Fh)try{for(Fh=!0;fo.size>0;){const t=Array.from(fo);fo.clear();for(const n of t){const i=Jl.get(n)??n.prevState;n.prevState=i,lB(n)}for(const n of t){const i=hv.get(n);i&&(Cc.current.push(n),cO(i))}for(const n of t){const i=hv.get(n);if(i)for(const s of i)cB(s)}}}finally{Fh=!1,Cc.current=[],Jl.clear()}}function mo(e){po++;try{e()}finally{if(po--,po===0){const t=fo.values().next().value;t&&uO(t)}}}function uB(e){return typeof e=="function"}class dB{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var s,l;this.listeners.add(i);const u=(l=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:l.call(s,i,this);return()=>{this.listeners.delete(i),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,i,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):uB(t)?this.state=t(this.prevState):this.state=t,(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),uO(this)}}const pi="__TSR_index",fw="popstate",pw="beforeunload";function hB(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:u}))},s=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:o,...d})=>{if(o?.ignoreBlocker??!1){u();return}const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const g of p){const b=Tc(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:d.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,o,d)=>{const h=t.state[pi];o=mw(h+1,o),l({task:()=>{e.pushState(u,o),i({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:u,state:o})},replace:(u,o,d)=>{const h=t.state[pi];o=mw(h,o),l({task:()=>{e.replaceState(u,o),i({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:u,state:o})},go:(u,o)=>{l({task:()=>{e.go(u),s({type:"GO",index:u})},navigateOpts:o,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[pi]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,u]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function mw(e,t){t||(t={});const n=Zv();return{...t,key:n,__TSR_key:n,[pi]:e}}function fB(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let s=[];const l=()=>s,u=R=>s=R,o=(R=>R),d=(()=>Tc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=Zv();t.history.replaceState({[pi]:0,key:R,__TSR_key:R},"")}let h=d(),p,f=!1,g=!1,b=!1,x=!1;const E=()=>h;let y,S;const v=()=>{y&&(O._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),O._ignoreSubscribers=!1,y=void 0,S=void 0,p=void 0)},_=(R,I,L)=>{const F=o(I);S||(p=h),h=Tc(I,L),y={href:F,state:L,isPush:y?.isPush||R==="push"},S||(S=Promise.resolve().then(()=>v()))},w=R=>{h=d(),O.notify({type:R})},N=async()=>{if(g){g=!1;return}const R=d(),I=R.state[pi]-h.state[pi],L=I===1,F=I===-1,j=!L&&!F||f;f=!1;const z=j?"GO":F?"BACK":"FORWARD",V=j?{type:"GO",index:I}:{type:F?"BACK":"FORWARD"};if(b)b=!1;else{const K=l();if(typeof document<"u"&&K.length){for(const W of K)if(await W.blockerFn({currentLocation:h,nextLocation:R,action:z})){g=!0,t.history.go(1),O.notify(V);return}}}h=d(),O.notify(V)},k=R=>{if(x){x=!1;return}let I=!1;const L=l();if(typeof document<"u"&&L.length)for(const F of L){const j=F.enableBeforeUnload??!0;if(j===!0){I=!0;break}if(typeof j=="function"&&j()===!0){I=!0;break}}if(I)return R.preventDefault(),R.returnValue=""},O=hB({getLocation:E,getLength:()=>t.history.length,pushState:(R,I)=>_("push",R,I),replaceState:(R,I)=>_("replace",R,I),back:R=>(R&&(b=!0),x=!0,t.history.back()),forward:R=>{R&&(b=!0),x=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>o(R),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(pw,k,{capture:!0}),t.removeEventListener(fw,N)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(pw,k,{capture:!0}),t.addEventListener(fw,N),t.history.pushState=function(...R){const I=n.apply(t.history,R);return O._ignoreSubscribers||w("PUSH"),I},t.history.replaceState=function(...R){const I=i.apply(t.history,R);return O._ignoreSubscribers||w("REPLACE"),I},O}function pB(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Tc(e,t){const n=pB(e),i=n.indexOf("#"),s=n.indexOf("?"),l=Zv();return{href:n,pathname:n.substring(0,i>0?s>0?Math.min(i,s):i:s>0?s:n.length),hash:i>-1?n.substring(i):"",search:s>-1?n.slice(s,i===-1?void 0:i):"",state:t||{[pi]:0,key:l,__TSR_key:l}}}function Zv(){return(Math.random()+1).toString(36).substring(7)}function kc(e){return e[e.length-1]}function mB(e){return typeof e=="function"}function ui(e,t){return mB(e)?e(t):e}const gB=Object.prototype.hasOwnProperty;function Hn(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=t,s=yw(e)&&yw(i);if(!s&&!(Ac(e)&&Ac(i)))return i;const l=s?e:gw(e);if(!l)return i;const u=s?i:gw(i);if(!u)return i;const o=l.length,d=u.length,h=s?new Array(d):{};let p=0;for(let f=0;f<d;f++){const g=s?f:u[f],b=e[g],x=i[g];if(b===x){h[g]=b,(s?f<o:gB.call(e,g))&&p++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){h[g]=x;continue}const E=Hn(b,x,n+1);h[g]=E,E===b&&p++}return o===d&&p===o?e:h}function gw(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 i=Object.getOwnPropertySymbols(e);for(const s of i){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function Ac(e){if(!bw(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!bw(n)||!n.hasOwnProperty("isPrototypeOf"))}function bw(e){return Object.prototype.toString.call(e)==="[object Object]"}function yw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gi(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 i=0,s=e.length;i<s;i++)if(!Gi(e[i],t[i],n))return!1;return!0}if(Ac(e)&&Ac(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Gi(e[u],t[u],n))return!1;return!0}let s=0;if(!i)s=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&s++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>s||!Gi(e[u],t[u],n)))return!1;return s===l}return!1}function Qa(e){let t,n;const i=new Promise((s,l)=>{t=s,n=l});return i.status="pending",i.resolve=s=>{i.status="resolved",i.value=s,t(s),e?.(s)},i.reject=s=>{i.status="rejected",n(s)},i}function mi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function bB(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function vw(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return bB(t)}const dO=["http:","https:","mailto:","tel:"];function Rc(e){if(!e)return!1;try{const t=new URL(e);return!dO.includes(t.protocol)}catch{return!1}}const yB={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},vB=/[&><\u2028\u2029]/g;function _B(e){return e.replace(vB,t=>yB[t])}function _w(e,t){if(!e)return e;const n=/%25|%5C/gi;let i=0,s="",l;for(;(l=n.exec(e))!==null;)s+=vw(e.slice(i,l.index))+l[0],i=n.lastIndex;return s=s+vw(i?e.slice(i):e),s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}var SB="Invariant failed";function Lr(e,t){if(!e)throw new Error(SB)}function Nc(e){const t=new Map;let n,i;const s=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return s(u),u.value},set(l,u){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===i&&(i=void 0)}const o=t.get(l);if(o)o.value=u,s(o);else{const d={key:l,value:u,prev:i};i&&(i.next=d),i=d,n||(n=d),t.set(l,d)}},clear(){t.clear(),n=void 0,i=void 0}}}const Ja=0,Xi=1,Zi=2,So=3,Ka=4,EB=5,xB=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,wB=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,CB=/^([^{]*)\{\$\}([^}]*)$/;function Qv(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),s=i===-1?e.length:i,l=e.substring(t,s);if(!l||!l.includes("$"))return n[0]=Ja,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(l==="$"){const h=e.length;return n[0]=Zi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=Xi,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const u=l.match(CB);if(u){const p=u[1].length;return n[0]=Zi,n[1]=t+p,n[2]=t+p+1,n[3]=t+p+2,n[4]=t+p+3,n[5]=e.length,n}const o=l.match(wB);if(o){const h=o[1],p=o[2],f=o[3],g=h.length;return n[0]=So,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+p.length,n[4]=s-f.length,n[5]=s,n}const d=l.match(xB);if(d){const h=d[1],p=d[2],f=d[3],g=h.length;return n[0]=Xi,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+p.length,n[4]=s-f.length,n[5]=s,n}return n[0]=Ja,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Gc(e,t,n,i,s,l,u){u?.(n);let o=i;{const d=n.fullPath??n.from,h=d.length,p=n.options?.caseSensitive??e,f=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;o<h;){const b=Qv(d,o,t);let x;const E=o,y=b[5];switch(o=y+1,l++,b[0]){case Ja:{const v=d.substring(b[2],b[3]);if(p){const _=s.static?.get(v);if(_)x=_;else{s.static??=new Map;const w=qi(n.fullPath??n.from);w.parent=s,w.depth=l,x=w,s.static.set(v,w)}}else{const _=v.toLowerCase(),w=s.staticInsensitive?.get(_);if(w)x=w;else{s.staticInsensitive??=new Map;const N=qi(n.fullPath??n.from);N.parent=s,N.depth=l,x=N,s.staticInsensitive.set(_,N)}}break}case Xi:{const v=d.substring(E,b[1]),_=d.substring(b[4],y),w=p&&!!(v||_),N=v?w?v:v.toLowerCase():void 0,k=_?w?_:_.toLowerCase():void 0,O=!f&&s.dynamic?.find(R=>!R.skipOnParamError&&R.caseSensitive===w&&R.prefix===N&&R.suffix===k);if(O)x=O;else{const R=Uh(Xi,n.fullPath??n.from,w,N,k);x=R,R.depth=l,R.parent=s,s.dynamic??=[],s.dynamic.push(R)}break}case So:{const v=d.substring(E,b[1]),_=d.substring(b[4],y),w=p&&!!(v||_),N=v?w?v:v.toLowerCase():void 0,k=_?w?_:_.toLowerCase():void 0,O=!f&&s.optional?.find(R=>!R.skipOnParamError&&R.caseSensitive===w&&R.prefix===N&&R.suffix===k);if(O)x=O;else{const R=Uh(So,n.fullPath??n.from,w,N,k);x=R,R.parent=s,R.depth=l,s.optional??=[],s.optional.push(R)}break}case Zi:{const v=d.substring(E,b[1]),_=d.substring(b[4],y),w=p&&!!(v||_),N=v?w?v:v.toLowerCase():void 0,k=_?w?_:_.toLowerCase():void 0,O=Uh(Zi,n.fullPath??n.from,w,N,k);x=O,O.parent=s,O.depth=l,s.wildcard??=[],s.wildcard.push(O)}}s=x}if(f&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=qi(n.fullPath??n.from);b.kind=EB,b.parent=s,l++,b.depth=l,s.pathless??=[],s.pathless.push(b),s=b}const g=(n.path||!n.children)&&!n.isRoot;if(g&&d.endsWith("/")){const b=qi(n.fullPath??n.from);b.kind=Ka,b.parent=s,l++,b.depth=l,s.index=b,s=b}s.parse=n.options?.params?.parse??null,s.skipOnParamError=f,s.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,g&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Gc(e,t,d,o,s,l,u)}function Ph(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ci(e){if(e.pathless)for(const t of e.pathless)ci(t);if(e.static)for(const t of e.static.values())ci(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ci(t);if(e.dynamic?.length){e.dynamic.sort(Ph);for(const t of e.dynamic)ci(t)}if(e.optional?.length){e.optional.sort(Ph);for(const t of e.optional)ci(t)}if(e.wildcard?.length){e.wildcard.sort(Ph);for(const t of e.wildcard)ci(t)}}function qi(e){return{kind:Ja,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Uh(e,t,n,i,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:i,suffix:s}}function TB(e,t){const n=qi("/"),i=new Uint16Array(6);for(const s of e)Gc(!1,i,s,1,n,0);ci(n),t.masksTree=n,t.flatCache=Nc(1e3)}function kB(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=Jv(e,t.masksTree);return t.flatCache.set(e,i),i}function AB(e,t,n,i,s){e||="/",i||="/";const l=t?`case\0${e}`:e;let u=s.singleCache.get(l);if(!u){u=qi("/");const o=new Uint16Array(6);Gc(t,o,{from:e},1,u,0),s.singleCache.set(l,u)}return Jv(i,u,n)}function RB(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,s=t.matchCache.get(i);if(s!==void 0)return s;e||="/";const l=Jv(e,t.segmentTree,n);return l&&(l.branch=IB(l.route)),t.matchCache.set(i,l),l}function NB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function OB(e,t=!1,n){const i=qi(e.fullPath),s=new Uint16Array(6),l={},u={};let o=0;return Gc(t,s,e,1,i,0,h=>{if(n?.(h,o),Lr(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,o!==0&&h.path){const p=NB(h.fullPath);(!u[p]||h.fullPath.endsWith("/"))&&(u[p]=h)}o++}),ci(i),{processedTree:{segmentTree:i,singleCache:Nc(1e3),matchCache:Nc(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Jv(e,t,n=!1){const i=e.split("/"),s=DB(e,i,t,n);if(!s)return null;const[l]=hO(e,i,s);return{route:s.node.route,rawParams:l,parsedParams:s.parsedParams}}function hO(e,t,n){const i=LB(n.node);let s=null;const l={};let u=n.extract?.part??0,o=n.extract?.node??0,d=n.extract?.path??0;for(;o<i.length;u++,o++,d++){const h=i[o],p=t[u],f=d;if(p&&(d+=p.length),h.kind===Xi){s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0;if(g.charCodeAt(b)===123){const E=h.suffix?.length??0,y=g.substring(b+2,g.length-E-1),S=p.substring(b,p.length-E);l[y]=decodeURIComponent(S)}else{const E=g.substring(1);l[E]=decodeURIComponent(p)}}else if(h.kind===So){if(n.skipped&1<<o){u--;continue}s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0,x=h.suffix?.length??0,E=g.substring(b+3,g.length-x-1),y=h.suffix||h.prefix?p.substring(b,p.length-x):p;y&&(l[E]=decodeURIComponent(y))}else if(h.kind===Zi){const g=h,b=e.substring(f+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),x=decodeURIComponent(b);l["*"]=x,l._splat=x;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:u,node:o,path:d}]}function IB(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function LB(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function DB(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!kc(t),l=s&&e!=="/",u=t.length-(s?1:0),o=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,h=null,p=null;for(;o.length;){const f=o.pop(),{node:g,index:b,skipped:x,depth:E,statics:y,dynamics:S,optionals:v}=f;let{extract:_,rawParams:w,parsedParams:N}=f;if(g.skipOnParamError){if(!jh(e,t,f))continue;w=f.rawParams,_=f.extract,N=f.parsedParams}i&&g.route&&g.kind!==Ka&&ro(h,f)&&(h=f);const k=b===u;if(k&&(g.route&&!l&&ro(p,f)&&(p=f),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const O=k?void 0:t[b];let R;if(k&&g.index){const I={node:g.index,index:b,skipped:x,depth:E+1,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N};if(g.index.skipOnParamError&&!jh(e,t,I))continue;if(y===u&&!S&&!v&&!x)return I;ro(p,I)&&(p=I)}if(g.wildcard&&ro(d,f))for(const I of g.wildcard){const{prefix:L,suffix:F}=I;if(L&&(k||!(I.caseSensitive?O:R??=O.toLowerCase()).startsWith(L)))continue;if(F){if(k)continue;const z=t.slice(b).join("/").slice(-F.length);if((I.caseSensitive?z:z.toLowerCase())!==F)continue}const j={node:I,index:u,skipped:x,depth:E,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N};if(!(I.skipOnParamError&&!jh(e,t,j))){d=j;break}}if(g.optional){const I=x|1<<E,L=E+1;for(let F=g.optional.length-1;F>=0;F--){const j=g.optional[F];o.push({node:j,index:b,skipped:I,depth:L,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(!k)for(let F=g.optional.length-1;F>=0;F--){const j=g.optional[F],{prefix:z,suffix:V}=j;if(z||V){const K=j.caseSensitive?O:R??=O.toLowerCase();if(z&&!K.startsWith(z)||V&&!K.endsWith(V))continue}o.push({node:j,index:b+1,skipped:x,depth:L,statics:y,dynamics:S,optionals:v+1,extract:_,rawParams:w,parsedParams:N})}}if(!k&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const L=g.dynamic[I],{prefix:F,suffix:j}=L;if(F||j){const z=L.caseSensitive?O:R??=O.toLowerCase();if(F&&!z.startsWith(F)||j&&!z.endsWith(j))continue}o.push({node:L,index:b+1,skipped:x,depth:E+1,statics:y,dynamics:S+1,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(!k&&g.staticInsensitive){const I=g.staticInsensitive.get(R??=O.toLowerCase());I&&o.push({node:I,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(!k&&g.static){const I=g.static.get(O);I&&o.push({node:I,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(g.pathless){const I=E+1;for(let L=g.pathless.length-1;L>=0;L--){const F=g.pathless[L];o.push({node:F,index:b,skipped:x,depth:I,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}}}if(p&&d)return ro(d,p)?p:d;if(p)return p;if(d)return d;if(i&&h){let f=h.index;for(let b=0;b<h.index;b++)f+=t[b].length;const g=f===e.length?"/":e.slice(f);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(g),h}return null}function jh(e,t,n){try{const[i,s]=hO(e,t,n);n.rawParams=i,n.extract=s;const l=n.node.parse(i);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function ro(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ka)>(e.node.kind===Ka)||t.node.kind===Ka==(e.node.kind===Ka)&&t.depth>e.depth))):!0}function hc(e){return e_(e.filter(t=>t!==void 0).join("/"))}function e_(e){return e.replace(/\/{2,}/g,"/")}function fO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function gi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function pO(e){return gi(fO(e))}function Oc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function MB(e,t,n){return Oc(e,n)===Oc(t,n)}function BB({base:e,to:t,trailingSlash:n="never",cache:i}){const s=t.startsWith("/"),l=!s&&t===".";let u;if(i){u=s?t:l?e:e+"\0"+t;const f=i.get(u);if(f)return f}let o;if(l)o=e.split("/");else if(s)o=t.split("/");else{for(o=e.split("/");o.length>1&&kc(o)==="";)o.pop();const f=t.split("/");for(let g=0,b=f.length;g<b;g++){const x=f[g];x===""?g?g===b-1&&o.push(x):o=[x]:x===".."?o.pop():x==="."||o.push(x)}}o.length>1&&(kc(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let d,h="";for(let f=0;f<o.length;f++){f>0&&(h+="/");const g=o[f];if(!g)continue;d=Qv(g,0,d);const b=d[0];if(b===Ja){h+=g;continue}const x=d[5],E=g.substring(0,d[1]),y=g.substring(d[4],x),S=g.substring(d[2],d[3]);b===Xi?h+=E||y?`${E}{$${S}}${y}`:`$${S}`:b===Zi?h+=E||y?`${E}{$}${y}`:"$":h+=`${E}{-$${S}}${y}`}h=e_(h);const p=h||"/";return u&&i&&i.set(u,p),p}function zh(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):FB(i,n)}function Hh({path:e,params:t,decodeCharMap:n}){let i=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const l=e.length;let u=0,o,d="";for(;u<l;){const p=u;o=Qv(e,p,o);const f=o[5];if(u=f+1,p===f)continue;const g=o[0];if(g===Ja){d+="/"+e.substring(p,f);continue}if(g===Zi){const b=t._splat;s._splat=b,s["*"]=b;const x=e.substring(p,o[1]),E=e.substring(o[4],f);if(!b){i=!0,(x||E)&&(d+="/"+x+E);continue}const y=zh("_splat",t,n);d+="/"+x+y+E;continue}if(g===Xi){const b=e.substring(o[2],o[3]);!i&&!(b in t)&&(i=!0),s[b]=t[b];const x=e.substring(p,o[1]),E=e.substring(o[4],f),y=zh(b,t,n)??"undefined";d+="/"+x+y+E;continue}if(g===So){const b=e.substring(o[2],o[3]),x=t[b];if(x==null)continue;s[b]=x;const E=e.substring(p,o[1]),y=e.substring(o[4],f),S=zh(b,t,n)??"";d+="/"+E+S+y;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:i}}function FB(e,t){let n=encodeURIComponent(e);if(t)for(const[i,s]of t)n=n.replaceAll(i,s);return n}function An(e){return!!e?.isNotFound}function PB(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ic="tsr-scroll-restoration-v1_3",UB=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function jB(){const e=PB();if(!e)return null;const t=e.getItem(Ic);let n=t?JSON.parse(t):{};return{state:n,set:i=>{n=ui(i,n)||n;try{e.setItem(Ic,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const ec=jB(),fv=e=>e.state.__TSR_key||e.href;function zB(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 Lc=!1;function mO({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:s,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const o=t||window.history.state?.__TSR_key,d=u[o];Lc=!0;e:{if(i&&d&&Object.keys(d).length>0){for(const f in d){const g=d[f];if(f==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(f){const b=document.querySelector(f);b&&(b.scrollLeft=g.scrollX,b.scrollTop=g.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const g=document.getElementById(h);g&&g.scrollIntoView(f)}break e}const p={top:0,left:0,behavior:n};if(window.scrollTo(p),s)for(const f of s){if(f==="window")continue;const g=typeof f=="function"?f():document.querySelector(f);g&&g.scrollTo(p)}}Lc=!1}function HB(e,t){if(!ec&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ec))return;e.isScrollRestorationSetup=!0,Lc=!1;const i=e.options.getScrollRestorationKey||fv;window.history.scrollRestoration="manual";const s=l=>{if(Lc||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const d=l.target.getAttribute("data-scroll-restoration-id");d?u=`[data-scroll-restoration-id="${d}"]`:u=zB(l.target)}const o=i(e.state.location);ec.set(d=>{const h=d[o]||={},p=h[u]||={};if(u==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(u){const f=document.querySelector(u);f&&(p.scrollX=f.scrollLeft||0,p.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",UB(s,100),!0),e.subscribe("onRendered",l=>{const u=i(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(mO({storageKey:Ic,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ec.set(o=>(o[u]||={},o)))})}function qB(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 $B(e,t=String){const n=new URLSearchParams;for(const i in e){const s=e[i];s!==void 0&&n.set(i,t(s))}return n.toString()}function qh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function GB(e){const t=new URLSearchParams(e),n={};for(const[i,s]of t.entries()){const l=n[i];l==null?n[i]=qh(s):Array.isArray(l)?l.push(qh(s)):n[i]=[l,qh(s)]}return n}const VB=KB(JSON.parse),WB=YB(JSON.stringify,JSON.parse);function KB(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=GB(t);for(const i in n){const s=n[i];if(typeof s=="string")try{n[i]=e(s)}catch{}}return n}}function YB(e,t){const n=typeof t=="function";function i(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 l=$B(s,i);return l?`?${l}`:""}}const Tn="__root__";function t_(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&Rc(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${dO.join(", ")} protocols are allowed.`);if(!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 Gn(e){return e instanceof Response&&!!e.options}const fc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Vc=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Xa=(e,t,n=!0)=>{const i={...e.router.options.context??{}},s=n?t:t-1;for(let l=0;l<=s;l++){const u=e.matches[l];if(!u)continue;const o=e.router.getMatch(u.id);o&&Object.assign(i,o.__routeContext,o.__beforeLoadContext)}return i},gO=(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),Lr(n.options.notFoundComponent);const i=e.matches.find(s=>s.routeId===n.id);Lr(i,"Could not find match for route: "+n.id),e.updateMatch(i.id,s=>({...s,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,gO(e,t))},di=(e,t,n)=>{if(!(!Gn(n)&&!An(n))){if(Gn(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 i=Gn(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:i,context:Xa(e,t.index),isFetching:!1,error:n})),An(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Gn(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(gO(e,n),n)}},bO=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},io=(e,t,n,i)=>{const{id:s,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??=t,di(e,e.router.getMatch(s),n);try{u.options.onError?.(n)}catch(o){n=o,di(e,e.router.getMatch(s),n)}e.updateMatch(s,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},XB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){s.ssr=i.id===Tn;return}if(u?.ssr===!1){s.ssr=!1;return}const o=b=>b===!0&&u?.ssr==="data-only"?"data-only":b,d=e.router.options.defaultSsr??!0;if(i.options.ssr===void 0){s.ssr=o(d);return}if(typeof i.options.ssr!="function"){s.ssr=o(i.options.ssr);return}const{search:h,params:p}=s,f={search:tc(h,s.searchError),params:tc(p,s.paramsError),location:e.location,matches:e.matches.map(b=>({index:b.index,pathname:b.pathname,fullPath:b.fullPath,staticData:b.staticData,id:b.id,routeId:b.routeId,search:tc(b.search,b.searchError),params:tc(b.params,b.paramsError),ssr:b.ssr}))},g=i.options.ssr(f);if(mi(g))return g.then(b=>{s.ssr=o(b??d)});s.ssr=o(g??d)},yO=(e,t,n,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Vc(e,t)&&(n.options.loader||n.options.beforeLoad||SO(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{fc(e)},s);i._nonReactive.pendingTimeout=u}},ZB=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;yO(e,t,n,i);const s=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&di(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(s):s()},QB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Qa(()=>{l?.resolve()});const{paramsError:u,searchError:o}=s;u&&io(e,n,u,"PARSE_PARAMS"),o&&io(e,n,o,"VALIDATE_SEARCH"),yO(e,t,i,s);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let f=!1;const g=()=>{f||(f=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:d})))},b=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!i.options.beforeLoad){mo(()=>{g(),b()});return}s._nonReactive.beforeLoadPromise=Qa();const x={...Xa(e,n,!1),...s.__routeContext},{search:E,params:y,cause:S}=s,v=Vc(e,t),_={search:E,abortController:d,params:y,preload:v,context:x,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":S,matches:e.matches,...e.router.options.additionalContext},w=k=>{if(k===void 0){mo(()=>{g(),b()});return}(Gn(k)||An(k))&&(g(),io(e,n,k,"BEFORE_LOAD")),mo(()=>{g(),e.updateMatch(t,O=>({...O,__beforeLoadContext:k})),b()})};let N;try{if(N=i.options.beforeLoad(_),mi(N))return g(),N.catch(k=>{io(e,n,k,"BEFORE_LOAD")}).then(w)}catch(k){g(),io(e,n,k,"BEFORE_LOAD")}w(N)},JB=(e,t)=>{const{id:n,routeId:i}=e.matches[t],s=e.router.looseRoutesById[i],l=()=>{if(e.router.isServer){const d=XB(e,n,t,s);if(mi(d))return d.then(o)}return o()},u=()=>QB(e,n,t,s),o=()=>{if(bO(e,n))return;const d=ZB(e,n,s);return mi(d)?d.then(u):u()};return l()},e3=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([l,u,o])=>{const d=l?.meta,h=l?.links,p=l?.scripts,f=l?.styles;return{meta:d,links:h,headScripts:p,headers:o,scripts:u,styles:f}})},vO=(e,t,n,i)=>{const s=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:o,cause:d}=e.router.getMatch(t),h=Xa(e,n),p=Vc(e,t);return{params:l,deps:u,preload:!!p,parentMatchPromise:s,abortController:o,context:h,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:p?"preload":d,route:i,...e.router.options.additionalContext}},Sw=async(e,t,n,i)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&_O(i);const l=i.options.loader?.(vO(e,t,n,i)),u=i.options.loader&&mi(l);if((u||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),i.options.loader){const h=u?await l:l;di(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,p=>({...p,loaderData:h}))}i._lazyPromise&&await i._lazyPromise;const d=s._nonReactive.minPendingPromise;d&&await d,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:Xa(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;if(u?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Xa(e,n)}));return}const o=s._nonReactive.minPendingPromise;o&&await o,An(l)&&await i.options.notFoundComponent?.preload?.(),di(e,e.router.getMatch(t),l);try{i.options.onError?.(l)}catch(d){u=d,di(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:u,context:Xa(e,n),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),di(e,l,s)}},t3=async(e,t)=>{const{id:n,routeId:i}=e.matches[t];let s=!1,l=!1;const u=e.router.looseRoutesById[i];if(bO(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const p=e.router.getMatch(n),f=p._nonReactive.error||p.error;f&&di(e,p,f)}else{const p=Date.now()-h.updatedAt,f=Vc(e,n),g=f?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,b=u.options.shouldReload,x=typeof b=="function"?b(vO(e,n,t,u)):b,E=!!f&&!e.router.state.matches.some(_=>_.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=Qa(),E!==y.preload&&e.updateMatch(n,_=>({..._,preload:E}));const{status:S,invalid:v}=y;s=S==="success"&&(v||(x??p>g)),f&&u.options.preload===!1||(s&&!e.sync?(l=!0,(async()=>{try{await Sw(e,n,t,u);const _=e.router.getMatch(n);_._nonReactive.loaderPromise?.resolve(),_._nonReactive.loadPromise?.resolve(),_._nonReactive.loaderPromise=void 0}catch(_){Gn(_)&&await e.router.navigate(_.options)}})()):(S!=="success"||s&&e.sync)&&await Sw(e,n,t,u))}}const o=e.router.getMatch(n);l||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0,l||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const d=l?o.isFetching:!1;return d!==o.isFetching||o.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):o};async function Ew(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&fc(t);try{for(let o=0;o<t.matches.length;o++){const d=JB(t,o);mi(d)&&await d}const n=t.firstBadMatchIndex??t.matches.length;for(let o=0;o<n;o++)t.matchPromises.push(t3(t,o));const s=(await Promise.allSettled(t.matchPromises)).filter(o=>o.status==="rejected").map(o=>o.reason);let l;for(const o of s){if(Gn(o))throw o;!l&&An(o)&&(l=o)}for(const o of t.matches){const{id:d,routeId:h}=o,p=t.router.looseRoutesById[h];try{const f=e3(t,d,p);if(f){const g=await f;t.updateMatch(d,b=>({...b,...g}))}}catch(f){console.error(`Error executing head for route ${h}:`,f)}}if(l)throw l;const u=fc(t);mi(u)&&await u}catch(n){if(An(n)&&!t.preload){const i=fc(t);throw mi(i)&&await i,n}if(Gn(n))throw n}return t.matches}async function _O(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...i}=t.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const i of EO){const s=e.options[i]?.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 tc(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function SO(e){for(const t of EO)if(e.options[t]?.preload)return!0;return!1}const EO=["component","errorComponent","pendingComponent","notFoundComponent"];function n3(e){return{input:({url:t})=>{for(const n of e)t=pv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=xO(e[n],t);return t}}}function r3(e){const t=pO(e.basepath),n=`/${t}`,i=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const o=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return o===s?u.pathname="/":o.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=hc(["/",t,u.pathname]),u)}}function pv(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 xO(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 Vi(e){const t=e.resolvedLocation,n=e.location,i=t?.pathname!==n.pathname,s=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:i,hrefChanged:s,hashChanged:l}}class i3{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 i=this.options,s=this.basepath??i?.basepath??"/",l=this.basepath===void 0,u=i?.rewrite;this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=fB())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new dB(s3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),HB(this));let o=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(l||s!==d||u!==h){this.basepath=d;const g=[];pO(d)!==""&&g.push(r3({basepath:d})),h&&g.push(h),this.rewrite=g.length===0?void 0:g.length===1?g[0]:n3(g),this.history&&this.updateLatestLocation(),o=!0}o&&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:i,processedTree:s}=OB(this.routeTree,this.options.caseSensitive,(u,o)=>{u.init({originalIndex:o})});this.options.routeMasks&&TB(this.options.routeMasks,s),this.routesById=n,this.routesByPath=i,this.processedTree=s;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,i)=>{const s={eventType:n,fn:i};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const s=({href:d,state:h})=>{const p=new URL(d,this.origin),f=pv(this.rewrite,p),g=this.options.parseSearch(f.search),b=this.options.stringifySearch(g);return f.search=b,{href:f.href.replace(f.origin,""),publicHref:d,url:f,pathname:_w(f.pathname),searchStr:b,search:Hn(i?.search,g),hash:f.hash.split("#").reverse()[0]??"",state:Hn(i?.state,h)}},l=s(n),{__tempLocation:u,__tempKey:o}=l.state;if(u&&(!o||o===this.tempLocationKey)){const d=s(u);return d.state.key=l.state.key,d.state.__TSR_key=l.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:l}}return l},this.resolvePathCache=Nc(1e3),this.resolvePathWithBase=(n,i)=>BB({base:n,to:e_(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},s):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>o3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),i=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const i=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(u,{_buildLocation:!0}),d=kc(o);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??d.fullPath,p=this.resolvePathWithBase(h,"."),f=d.search,g={...d.params},b=l.to?this.resolvePathWithBase(p,`${l.to}`):this.resolvePathWithBase(p,"."),x=l.params===!1||l.params===null?{}:(l.params??!0)===!0?g:Object.assign(g,ui(l.params,g)),E=Hh({path:b,params:x}).interpolatedPath,y=this.matchRoutes(E,void 0,{_buildLocation:!0}).map(L=>this.looseRoutesById[L.routeId]);if(Object.keys(x).length>0)for(const L of y){const F=L.options.params?.stringify??L.options.stringifyParams;F&&Object.assign(x,F(x))}const S=n.leaveParams?b:_w(Hh({path:b,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let v=f;if(n._includeValidateSearch&&this.options.search?.strict){const L={};y.forEach(F=>{if(F.options.validateSearch)try{Object.assign(L,mv(F.options.validateSearch,{...L,...v}))}catch{}}),v=L}v=l3({search:v,dest:l,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),v=Hn(f,v);const _=this.options.stringifySearch(v),w=l.hash===!0?u.hash:l.hash?ui(l.hash,u.hash):void 0,N=w?`#${w}`:"";let k=l.state===!0?u.state:l.state?ui(l.state,u.state):{};k=Hn(u.state,k);const O=`${S}${_}${N}`,R=new URL(O,this.origin),I=xO(this.rewrite,R);return{publicHref:I.pathname+I.search+I.hash,href:O,url:I,pathname:S,search:v,searchStr:_,state:k,hash:w??"",unmaskOnReload:l.unmaskOnReload}},s=(l={},u)=>{const o=i(l);let d=u?i(u):void 0;if(!d){const h={};if(this.options.routeMasks){const p=kB(o.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:f,params:g,...b}=p.route,x=g===!1||g===null?{}:(g??!0)===!0?h:Object.assign(h,ui(g,h));u={from:n.from,...b,params:x},d=i(u)}}}return d&&(o.maskedLocation=d),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:i,...s})=>{const l=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{s.state[p]=this.latestLocation.state[p]});const h=Gi(s.state,this.latestLocation.state);return d.forEach(p=>{delete s.state[p]}),h},u=gi(this.latestLocation.href)===gi(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=Qa(()=>{o?.resolve()}),u&&l())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,url:p,...f}=s;d&&(f={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:i})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:s,viewTransition:l,ignoreBlocker:u,href:o,...d}={})=>{if(o){const f=this.history.location.state.__TSR_index,g=Tc(o,{__TSR_index:n?f:f+1}),b=new URL(g.pathname,this.origin),x=pv(this.rewrite,b);d.to=x.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:s,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:i,href:s,publicHref:l,...u})=>{let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!i&&(i=!0),i){if(n!==void 0||!s){const h=this.buildLocation({to:n,...u});s=s??h.url.href,l=l??h.url.href}const d=!o&&l?l:s;if(Rc(d))return Promise.resolve();if(!u.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const f of p)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...u,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const i=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==i.publicHref||i.url.origin!==this.origin){const s=this.getParsedLocationHref(i);throw t_({href:s})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(s=>!n.some(l=>l.id===s.id))}))},this.load=async n=>{let i,s,l;for(l=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Vi({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Vi({resolvedLocation:h,location:d})}),await Ew({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],f=[],g=[];mo(()=>{this.__store.setState(b=>{const x=b.matches,E=b.pendingMatches||b.matches;return p=x.filter(y=>!E.some(S=>S.id===y.id)),f=E.filter(y=>!x.some(S=>S.id===y.id)),g=E.filter(y=>x.some(S=>S.id===y.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...p.filter(y=>y.status!=="error"&&y.status!=="notFound")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[f,"onEnter"],[g,"onStay"]].forEach(([b,x])=>{b.forEach(E=>{this.looseRoutesById[E.routeId].options[x]?.(E)})})})})}})}catch(d){Gn(d)?(i=d,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):An(d)&&(s=d),this.__store.setState(h=>({...h,statusCode:i?i.status:s?404:h.matches.some(p=>p.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(o=>o.status==="error")&&(u=500),u!==void 0&&this.__store.setState(o=>({...o,statusCode:u}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,o=typeof i.types=="function"?i.types(Vi({resolvedLocation:u,location:l})):i.types;if(o===!1){n();return}s={update:n,types:o}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";s&&this.__store.setState(l=>({...l,[s]:l[s]?.map(u=>u.id===n?i(u):u)}))})},this.getMatch=n=>{const i=s=>s.id===n;return this.state.cachedMatches.find(i)??this.state.pendingMatches?.find(i)??this.state.matches.find(i)},this.invalidate=n=>{const i=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(i),cachedMatches:s.cachedMatches.map(i),pendingMatches:s.pendingMatches?.map(i)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let i=n.url.href;return this.origin&&n.url.origin===this.origin&&(i=i.replace(this.origin,"")||"/"),i},this.resolveRedirect=n=>{const i=n.headers.get("Location");if(n.options.href){if(i)try{const s=new URL(i);if(this.origin&&s.origin===this.origin){const l=s.pathname+s.search+s.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}}else{const s=this.buildLocation(n.options),l=this.getParsedLocationHref(s);n.options.href=l,n.headers.set("Location",l)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n?.filter;i!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(l=>!i(l))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const l=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=_O,this.preloadRoute=async n=>{const i=this.buildLocation(n);let s=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),u=new Set([...l,...this.state.cachedMatches.map(o=>o.id)]);mo(()=>{s.forEach(o=>{u.has(o.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,o]}))})});try{return s=await Ew({router:this,matches:s,location:i,preload:!0,updateMatch:(o,d)=>{l.has(o)?s=s.map(h=>h.id===o?d(h):h):this.updateMatch(o,d)}}),s}catch(o){if(Gn(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:i});An(o)||console.error(o);return}},this.matchRoute=(n,i)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(s);if(i?.pending&&this.state.status!=="pending")return!1;const o=(i?.pending===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=AB(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,o.pathname,this.processedTree);return!d||n.params&&!Gi(d.rawParams,n.params,{partial:!0})?!1:i?.includeSearch??!0?Gi(o.search,l.search,{partial:!0})?d.rawParams:!1:d.rawParams},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??WB,parseSearch:t.parseSearch??VB}),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 i=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:l,parsedParams:u}=i;let{matchedRoutes:o}=i,d=!1;(s?s.path!=="/"&&l["**"]:gi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:d=!0);const h=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let g=o.length-1;g>=0;g--){const b=o[g];if(b.children)return b.id}return Tn}})(),p=[],f=g=>g?.id?g.context??this.options.context??void 0:this.options.context??void 0;return o.forEach((g,b)=>{const x=p[b-1],[E,y,S]=(()=>{const V=x?.search??t.search,K=x?._strictSearch??void 0;try{const W=mv(g.options.validateSearch,{...V})??void 0;return[{...V,...W},{...K,...W},void 0]}catch(W){let Z=W;if(W instanceof Dc||(Z=new Dc(W.message,{cause:W})),n?.throwOnError)throw Z;return[V,{},Z]}})(),v=g.options.loaderDeps?.({search:E})??"",_=v?JSON.stringify(v):"",{interpolatedPath:w,usedParams:N}=Hh({path:g.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),k=g.id+w+_,O=this.getMatch(k),R=this.state.matches.find(V=>V.routeId===g.id),I=O?._strictParams??N;let L;if(!O)if(g.options.skipRouteOnParseError)for(const V in N)V in u&&(I[V]=u[V]);else{const V=g.options.params?.parse??g.options.parseParams;if(V)try{Object.assign(I,V(I))}catch(K){if(An(K)||Gn(K)?L=K:L=new a3(K.message,{cause:K}),n?.throwOnError)throw L}}Object.assign(l,I);const F=R?"stay":"enter";let j;if(O)j={...O,cause:F,params:R?Hn(R.params,l):l,_strictParams:I,search:Hn(R?R.search:O.search,E),_strictSearch:y};else{const V=g.options.loader||g.options.beforeLoad||g.lazyFn||SO(g)?"pending":"success";j={id:k,ssr:this.isServer?void 0:g.options.ssr,index:b,routeId:g.id,params:R?Hn(R.params,l):l,_strictParams:I,pathname:w,updatedAt:Date.now(),search:R?Hn(R.search,E):E,_strictSearch:y,searchError:void 0,status:V,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:Qa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:R?Hn(R.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}n?.preload||(j.globalNotFound=h===g.id),j.searchError=S;const z=f(x);j.context={...z,...j.__routeContext,...j.__beforeLoadContext},p.push(j)}),p.forEach((g,b)=>{const x=this.looseRoutesById[g.routeId];if(!this.getMatch(g.id)&&n?._buildLocation!==!0){const y=p[b-1],S=f(y);if(x.options.context){const v={deps:g.loaderDeps,params:g.params,context:S??{},location:t,navigate:_=>this.navigate({..._,_fromLocation:t}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:p};g.__routeContext=x.options.context(v)??void 0}g.context={...S,...g.__routeContext,...g.__beforeLoadContext}}}),p}}class Dc extends Error{}class a3 extends Error{}function s3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function mv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Dc("Async validation not supported");if(n.issues)throw new Dc(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 o3({pathname:e,routesById:t,processedTree:n}){const i={},s=gi(e);let l,u;const o=RB(s,n,!0);return o&&(l=o.route,Object.assign(i,o.rawParams),u=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[t[Tn]],routeParams:i,foundRoute:l,parsedParams:u}}function l3({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){const s=n.reduce((o,d)=>{const h=[];if("search"in d.options)d.options.search?.middlewares&&h.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const p=({search:f,next:g})=>{let b=f;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(b=d.options.preSearchFilters.reduce((E,y)=>y(E),f));const x=g(b);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((E,y)=>y(E),x):x};h.push(p)}if(i&&d.options.validateSearch){const p=({search:f,next:g})=>{const b=g(f);try{return{...b,...mv(d.options.validateSearch,b)??void 0}}catch{return b}};h.push(p)}return o.concat(h)},[])??[],l=({search:o})=>t.search?t.search===!0?o:ui(t.search,o):{};s.push(l);const u=(o,d)=>{if(o>=s.length)return d;const h=s[o];return h({search:d,next:f=>u(o+1,f)})};return u(0,e)}const c3="Error preloading route! ☝️";class wO{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const i=this.options,s=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Tn:this.parentRoute||Lr(!1);let l=s?Tn:i?.path;l&&l!=="/"&&(l=fO(l));const u=i?.id||l;let o=s?Tn:hc([this.parentRoute.id===Tn?"":this.parentRoute.id,u]);l===Tn&&(l="/"),o!==Tn&&(o=hc(["/",o]));const d=o===Tn?"/":hc([this.parentRoute.fullPath,l]);this._path=l,this._id=o,this._fullPath=d,this._to=gi(d)},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.redirect=n=>t_({from:this.fullPath,...n}),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 u3 extends wO{constructor(t){super(t)}}const nc=typeof window<"u"?G.useLayoutEffect:G.useEffect;function $h(e){const t=G.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function d3(e,t,n={},i={}){G.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([l])=>{t(l)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,i.disabled,e])}function h3(e){const t=G.useRef(null);return G.useImperativeHandle(e,()=>t.current,[]),t}function n_(e){const t=e.errorComponent??Wc;return T.jsx(f3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?G.createElement(t,{error:n,reset:i}):e.children})}class f3 extends G.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 Wc({error:e}){const[t,n]=G.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function p3({children:e,fallback:t=null}){return m3()?T.jsx(Gt.Fragment,{children:e}):T.jsx(Gt.Fragment,{children:t})}function m3(){return Gt.useSyncExternalStore(g3,()=>!0,()=>!1)}function g3(){return()=>{}}var Gh={exports:{}},Vh={},Wh={exports:{}},Kh={};var xw;function b3(){if(xw)return Kh;xw=1;var e=Ro();function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function o(f,g){var b=g(),x=i({inst:{value:b,getSnapshot:g}}),E=x[0].inst,y=x[1];return l(function(){E.value=b,E.getSnapshot=g,d(E)&&y({inst:E})},[f,b,g]),s(function(){return d(E)&&y({inst:E}),f(function(){d(E)&&y({inst:E})})},[f]),u(b),b}function d(f){var g=f.getSnapshot;f=f.value;try{var b=g();return!n(f,b)}catch{return!0}}function h(f,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:o;return Kh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Kh}var ww;function y3(){return ww||(ww=1,Wh.exports=b3()),Wh.exports}var Cw;function v3(){if(Cw)return Vh;Cw=1;var e=Ro(),t=y3();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var i=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,o=e.useMemo,d=e.useDebugValue;return Vh.useSyncExternalStoreWithSelector=function(h,p,f,g,b){var x=l(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=o(function(){function S(k){if(!v){if(v=!0,_=k,k=g(k),b!==void 0&&E.hasValue){var O=E.value;if(b(O,k))return w=O}return w=k}if(O=w,i(_,k))return O;var R=g(k);return b!==void 0&&b(O,R)?(_=k,O):(_=k,w=R)}var v=!1,_,w,N=f===void 0?null:f;return[function(){return S(p())},N===null?void 0:function(){return S(N())}]},[p,f,g,b]);var y=s(h,x[0],x[1]);return u(function(){E.hasValue=!0,E.value=y},[y]),d(y),y},Vh}var Tw;function _3(){return Tw||(Tw=1,Gh.exports=v3()),Gh.exports}var S3=_3();function E3(e,t=i=>i,n={}){const i=n.equal??x3;return S3.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,i)}function x3(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!t.has(i)||!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=kw(e);if(n.length!==kw(t).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Object.is(e[n[i]],t[n[i]]))return!1;return!0}function kw(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Yh=G.createContext(null);function CO(){return typeof document>"u"?Yh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Yh,Yh)}function Nn(e){const t=G.useContext(CO());return e?.warn,t}function hn(e){const t=Nn({warn:e?.router===void 0}),n=e?.router||t,i=G.useRef(void 0);return E3(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Hn(i.current,e.select(s));return i.current=l,l}return e.select(s)}return s})}const Kc=G.createContext(void 0),w3=G.createContext(void 0);function ur(e){const t=G.useContext(e.from?w3:Kc);return hn({select:i=>{const s=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Lr(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function r_(e){return ur({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function i_(e){const{select:t,...n}=e;return ur({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function a_(e){return ur({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function s_(e){return ur({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Yc(e){const t=Nn();return G.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var C3=QN();function T3(e,t){const n=Nn(),[i,s]=G.useState(!1),l=G.useRef(!1),u=h3(t),{activeProps:o,inactiveProps:d,activeOptions:h,to:p,preload:f,preloadDelay:g,hashScrollIntoView:b,replace:x,startTransition:E,resetScroll:y,viewTransition:S,children:v,target:_,disabled:w,style:N,className:k,onClick:O,onFocus:R,onMouseEnter:I,onMouseLeave:L,onTouchStart:F,ignoreBlocker:j,params:z,search:V,hash:K,state:W,mask:Z,reloadDocument:Q,unsafeRelative:P,from:M,_fromLocation:B,...q}=e,U=hn({select:Oe=>Oe.location.search,structuralSharing:!0}),ee=e.from,ce=G.useMemo(()=>({...e,from:ee}),[n,U,ee,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ne=G.useMemo(()=>n.buildLocation({...ce}),[n,ce]),Y=G.useMemo(()=>{if(w)return;let Oe=ne.maskedLocation?ne.maskedLocation.url.href:ne.url.href,Re=!1;return n.origin&&(Oe.startsWith(n.origin)?Oe=n.history.createHref(Oe.replace(n.origin,""))||"/":Re=!0),{href:Oe,external:Re}},[w,ne.maskedLocation,ne.url,n.origin,n.history]),$=G.useMemo(()=>{if(Y?.external)return Rc(Y.href)?void 0:Y.href;try{return new URL(p),Rc(p)?void 0:p}catch{}},[p,Y]),re=e.reloadDocument||$?!1:f??n.options.defaultPreload,he=g??n.options.defaultPreloadDelay??0,ge=hn({select:Oe=>{if($)return!1;if(h?.exact){if(!MB(Oe.location.pathname,ne.pathname,n.basepath))return!1}else{const Re=Oc(Oe.location.pathname,n.basepath),we=Oc(ne.pathname,n.basepath);if(!(Re.startsWith(we)&&(Re.length===we.length||Re[we.length]==="/")))return!1}return(h?.includeSearch??!0)&&!Gi(Oe.location.search,ne.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Oe.location.hash===ne.hash:!0}}),be=G.useCallback(()=>{n.preloadRoute({...ce}).catch(Oe=>{console.warn(Oe),console.warn(c3)})},[n,ce]),Ee=G.useCallback(Oe=>{Oe?.isIntersecting&&be()},[be]);d3(u,Ee,O3,{disabled:!!w||re!=="viewport"}),G.useEffect(()=>{l.current||!w&&re==="render"&&(be(),l.current=!0)},[w,be,re]);const Me=Oe=>{const Re=Oe.currentTarget.getAttribute("target"),we=_!==void 0?_:Re;if(!w&&!I3(Oe)&&!Oe.defaultPrevented&&(!we||we==="_self")&&Oe.button===0){Oe.preventDefault(),C3.flushSync(()=>{s(!0)});const oe=n.subscribe("onResolved",()=>{oe(),s(!1)});n.navigate({...ce,replace:x,resetScroll:y,hashScrollIntoView:b,startTransition:E,viewTransition:S,ignoreBlocker:j})}};if($)return{...q,ref:u,href:$,...v&&{children:v},..._&&{target:_},...w&&{disabled:w},...N&&{style:N},...k&&{className:k},...O&&{onClick:O},...R&&{onFocus:R},...I&&{onMouseEnter:I},...L&&{onMouseLeave:L},...F&&{onTouchStart:F}};const ze=Oe=>{w||re&&be()},We=ze,xe=Oe=>{if(!(w||!re))if(!he)be();else{const Re=Oe.target;if(ao.has(Re))return;const we=setTimeout(()=>{ao.delete(Re),be()},he);ao.set(Re,we)}},yt=Oe=>{if(w||!re||!he)return;const Re=Oe.target,we=ao.get(Re);we&&(clearTimeout(we),ao.delete(Re))},vt=ge?ui(o,{})??k3:Xh,et=ge?Xh:ui(d,{})??Xh,Bt=[k,vt.className,et.className].filter(Boolean).join(" "),Tt=(N||vt.style||et.style)&&{...N,...vt.style,...et.style};return{...q,...vt,...et,href:Y?.href,ref:u,onClick:so([O,Me]),onFocus:so([R,ze]),onMouseEnter:so([I,xe]),onMouseLeave:so([L,yt]),onTouchStart:so([F,We]),disabled:!!w,target:_,...Tt&&{style:Tt},...Bt&&{className:Bt},...w&&A3,...ge&&R3,...i&&N3}}const Xh={},k3={className:"active"},A3={role:"link","aria-disabled":!0},R3={"data-status":"active","aria-current":"page"},N3={"data-transitioning":"transitioning"},ao=new WeakMap,O3={rootMargin:"100px"},so=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},TO=G.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:s,ref:l,...u}=T3(i,t),o=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;return n===void 0&&delete u.disabled,G.createElement(n||"a",{...u,ref:l},o)});function I3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let L3=class extends wO{constructor(t){super(t),this.useMatch=n=>ur({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ur({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>s_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>a_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>i_({...n,from:this.id}),this.useLoaderData=n=>r_({...n,from:this.id}),this.useNavigate=()=>Yc({from:this.fullPath}),this.Link=Gt.forwardRef((n,i)=>T.jsx(TO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function D3(e){return new L3(e)}class M3 extends u3{constructor(t){super(t),this.useMatch=n=>ur({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ur({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>s_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>a_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>i_({...n,from:this.id}),this.useLoaderData=n=>r_({...n,from:this.id}),this.useNavigate=()=>Yc({from:this.fullPath}),this.Link=Gt.forwardRef((n,i)=>T.jsx(TO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function B3(e){return new M3(e)}function Eo(e){return typeof e=="object"?new Aw(e,{silent:!0}).createRoute(e):new Aw(e,{silent:!0}).createRoute}class Aw{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const s=D3(i);return s.isRoot=!1,s},this.silent=n?.silent}}class Rw{constructor(t){this.useMatch=n=>ur({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ur({from:this.options.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>s_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>a_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>i_({...n,from:this.options.id}),this.useLoaderData=n=>r_({...n,from:this.options.id}),this.useNavigate=()=>{const n=Nn();return Yc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Nw(e){return typeof e=="object"?new Rw(e):t=>new Rw({id:e,...t})}function F3(){const e=Nn(),t=G.useRef({router:e,mounted:!1}),[n,i]=G.useState(!1),{hasPendingMatches:s,isLoading:l}=hn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),u=$h(l),o=l||n||s,d=$h(o),h=l||s,p=$h(h);return e.startTransition=f=>{i(!0),G.startTransition(()=>{f(),i(!1)})},G.useEffect(()=>{const f=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return gi(e.latestLocation.publicHref)!==gi(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{f()}},[e,e.history]),nc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),nc(()=>{u&&!l&&e.emit({type:"onLoad",...Vi(e.state)})},[u,e,l]),nc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...Vi(e.state)})},[h,p,e]),nc(()=>{if(d&&!o){const f=Vi(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),f.hrefChanged&&qB(e)}},[o,d,e]),null}function P3(e){const t=hn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return T.jsx(n_,{getResetKey:()=>t,onCatch:(n,i)=>{if(An(n))e.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(An(n))return e.fallback?.(n);throw n},children:e.children})}function U3(){return T.jsx("p",{children:"Not Found"})}function Va(e){return T.jsx(T.Fragment,{children:e.children})}function kO(e,t,n){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{...n}):T.jsx(U3,{})}function j3({children:e}){const t=Nn();return t.isServer?T.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function z3(){const e=Nn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||fv)(e.latestLocation),i=n!==fv(e.latestLocation)?n:void 0,s={storageKey:Ic,shouldScrollRestoration:!0};return i&&(s.key=i),T.jsx(j3,{children:`(${mO.toString()})(${_B(JSON.stringify(s))})`})}const AO=G.memo(function({matchId:t}){const n=Nn(),i=hn({select:S=>{const v=S.matches.find(_=>_.id===t);return Lr(v),{routeId:v.routeId,ssr:v.ssr,_displayPending:v._displayPending}},structuralSharing:!0}),s=n.routesById[i.routeId],l=s.options.pendingComponent??n.options.defaultPendingComponent,u=l?T.jsx(l,{}):null,o=s.options.errorComponent??n.options.defaultErrorComponent,d=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??n.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=i.ssr===!1||i.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??l??(s.options.errorComponent?.preload||p))?G.Suspense:Va,g=o?n_:Va,b=h?P3:Va,x=hn({select:S=>S.loadedAt}),E=hn({select:S=>{const v=S.matches.findIndex(_=>_.id===t);return S.matches[v-1]?.routeId}}),y=s.isRoot?s.options.shellComponent??Va:Va;return T.jsxs(y,{children:[T.jsx(Kc.Provider,{value:t,children:T.jsx(f,{fallback:u,children:T.jsx(g,{getResetKey:()=>x,errorComponent:o||Wc,onCatch:(S,v)=>{if(An(S))throw S;d?.(S,v)},children:T.jsx(b,{fallback:S=>{if(!h||S.routeId&&S.routeId!==i.routeId||!S.routeId&&!s.isRoot)throw S;return G.createElement(h,S)},children:p||i._displayPending?T.jsx(p3,{fallback:u,children:T.jsx(Ow,{matchId:t})}):T.jsx(Ow,{matchId:t})})})})}),E===Tn&&n.options.scrollRestoration?T.jsxs(T.Fragment,{children:[T.jsx(H3,{}),T.jsx(z3,{})]}):null]})});function H3(){const e=Nn(),t=G.useRef(void 0);return T.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Vi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ow=G.memo(function({matchId:t}){const n=Nn(),{match:i,key:s,routeId:l}=hn({select:d=>{const h=d.matches.find(x=>x.id===t),p=h.routeId,g=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],o=G.useMemo(()=>{const d=u.options.component??n.options.defaultComponent;return d?T.jsx(d,{},s):T.jsx(RO,{})},[s,u.options.component,n.options.defaultComponent]);if(i._displayPending)throw n.getMatch(i.id)?._nonReactive.displayPendingPromise;if(i._forcePending)throw n.getMatch(i.id)?._nonReactive.minPendingPromise;if(i.status==="pending"){const d=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(i.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const p=Qa();h._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(i.id)?._nonReactive.loadPromise}if(i.status==="notFound")return Lr(An(i.error)),kO(n,u,i.error);if(i.status==="redirected")throw Lr(Gn(i.error)),n.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const d=(u.options.errorComponent??n.options.defaultErrorComponent)||Wc;return T.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return o}),RO=G.memo(function(){const t=Nn(),n=G.useContext(Kc),i=hn({select:h=>h.matches.find(p=>p.id===n)?.routeId}),s=t.routesById[i],l=hn({select:h=>{const f=h.matches.find(g=>g.id===n);return Lr(f),f.globalNotFound}}),u=hn({select:h=>{const p=h.matches,f=p.findIndex(g=>g.id===n);return p[f+1]?.id}}),o=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(l)return kO(t,s,void 0);if(!u)return null;const d=T.jsx(AO,{matchId:u});return i===Tn?T.jsx(G.Suspense,{fallback:o,children:d}):d});function q3(){const e=Nn(),n=e.routesById[Tn].options.pendingComponent??e.options.defaultPendingComponent,i=n?T.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?Va:G.Suspense,l=T.jsxs(s,{fallback:i,children:[!e.isServer&&T.jsx(F3,{}),T.jsx($3,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:l}):l}function $3(){const e=Nn(),t=hn({select:s=>s.matches[0]?.id}),n=hn({select:s=>s.loadedAt}),i=t?T.jsx(AO,{matchId:t}):null;return T.jsx(Kc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:T.jsx(n_,{getResetKey:()=>n,errorComponent:Wc,onCatch:s=>{s.message||s.toString()},children:i})})}const G3=e=>new V3(e);class V3 extends i3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Eo,globalThis.createLazyFileRoute=Nw):typeof window<"u"&&(window.createFileRoute=Eo,window.createLazyFileRoute=Nw);function W3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=CO(),s=T.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:s}):s}function K3({router:e,...t}){return T.jsx(W3,{router:e,...t,children:T.jsx(q3,{})})}const Xc=B3({component:Y3});function Y3(){return T.jsxs(T.Fragment,{children:[T.jsx(RO,{}),null]})}const X3=Eo("/")({beforeLoad:()=>{throw t_({to:"/sessions"})},component:()=>null}),bt=G.forwardRef(({className:e="",variant:t="primary",size:n="md",...i},s)=>{const l="inline-flex items-center justify-center rounded font-medium transition-colors focus-visible:outline-none disabled:opacity-50 disabled:cursor-not-allowed",u={primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-muted text-foreground hover:bg-muted/80 border border-border",ghost:"text-muted-foreground hover:text-foreground hover:bg-muted/50"},o={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base",icon:"w-10 h-10 p-0"};return T.jsx("button",{ref:s,className:`${l} ${u[t]} ${o[n]} ${e}`,...i})});bt.displayName="Button";const Z3=G.forwardRef(({className:e="",children:t,...n},i)=>T.jsx("div",{ref:i,className:`bg-card text-card-foreground border border-border rounded-lg ${e}`,...n,children:t}));Z3.displayName="Card";const Q3=G.forwardRef(({className:e="",...t},n)=>T.jsx("input",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none ${e}`,...t}));Q3.displayName="Input";const o_=G.forwardRef(({className:e="",...t},n)=>T.jsx("textarea",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none resize-none ${e}`,...t}));o_.displayName="Textarea";const Iw=e=>{let t;const n=new Set,i=(h,p)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const g=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(b=>b(t,g))}},s=()=>t,o={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(i,s,o);return o},J3=(e=>e?Iw(e):Iw),eF=e=>e;function tF(e,t=eF){const n=Gt.useSyncExternalStore(e.subscribe,Gt.useCallback(()=>t(e.getState()),[e,t]),Gt.useCallback(()=>t(e.getInitialState()),[e,t]));return Gt.useDebugValue(n),n}const Lw=e=>{const t=J3(e),n=i=>tF(t,i);return Object.assign(n,t),n},No=(e=>e?Lw(e):Lw),l_=No(e=>({isOpen:!1,title:"Confirm Action",message:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:void 0,openConfirmation:t=>e({isOpen:!0,title:t.title||"Confirm Action",message:t.message,confirmLabel:t.confirmLabel||"Confirm",cancelLabel:t.cancelLabel||"Cancel",variant:t.variant||"default",onConfirm:t.onConfirm,onCancel:t.onCancel}),closeConfirmation:()=>e({isOpen:!1,onConfirm:()=>{},onCancel:void 0})}));const nF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),Dw=e=>{const t=rF(e);return t.charAt(0).toUpperCase()+t.slice(1)},NO=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),iF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var aF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const sF=G.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:u,...o},d)=>G.createElement("svg",{ref:d,...aF,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:NO("lucide",s),...!l&&!iF(o)&&{"aria-hidden":"true"},...o},[...u.map(([h,p])=>G.createElement(h,p)),...Array.isArray(l)?l:[l]]));const ke=(e,t)=>{const n=G.forwardRef(({className:i,...s},l)=>G.createElement(sF,{ref:l,iconNode:t,className:NO(`lucide-${nF(Dw(e))}`,`lucide-${e}`,i),...s}));return n.displayName=Dw(e),n};const oF=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],lF=ke("arrow-down",oF);const cF=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],uF=ke("arrow-left",cF);const dF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hF=ke("arrow-right",dF);const fF=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],pF=ke("arrow-up",fF);const mF=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],OO=ke("bot",mF);const gF=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],bF=ke("braces",gF);const yF=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],c_=ke("brain",yF);const vF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zc=ke("check",vF);const _F=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qi=ke("chevron-down",_F);const SF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xt=ke("chevron-right",SF);const EF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Mr=ke("circle-alert",EF);const xF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wF=ke("circle-check",xF);const CF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],IO=ke("circle-stop",CF);const TF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],kF=ke("circle",TF);const AF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],RF=ke("clock",AF);const NF=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],OF=ke("code",NF);const IF=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Mw=ke("command",IF);const LF=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],DF=ke("copy",LF);const MF=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],Bw=ke("diff",MF);const BF=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],LO=ke("dollar-sign",BF);const FF=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],PF=ke("ellipsis-vertical",FF);const UF=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],jF=ke("external-link",UF);const zF=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],HF=ke("file-code",zF);const qF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],$F=ke("file-json",qF);const GF=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Fw=ke("file-pen",GF);const VF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],WF=ke("file-plus",VF);const KF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],DO=ke("file-text",KF);const YF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],XF=ke("file-type",YF);const ZF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],QF=ke("file-x",ZF);const JF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],go=ke("file",JF);const e4=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],t4=ke("folder-tree",e4);const n4=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],r4=ke("folder",n4);const i4=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],xo=ke("git-branch",i4);const a4=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Mc=ke("git-commit-horizontal",a4);const s4=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],MO=ke("hash",s4);const o4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],gv=ke("image",o4);const l4=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],BO=ke("keyboard",l4);const c4=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],u4=ke("list",c4);const d4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],FO=ke("loader-circle",d4);const h4=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],f4=ke("message-square",h4);const p4=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],m4=ke("octagon-x",p4);const g4=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Pw=ke("pencil",g4);const b4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bc=ke("plus",b4);const y4=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],v4=ke("refresh-cw",y4);const _4=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],S4=ke("rotate-ccw",_4);const E4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],u_=ke("search",E4);const x4=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],wo=ke("sparkles",x4);const w4=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],C4=ke("square-check-big",w4);const T4=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ji=ke("terminal",T4);const k4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],A4=ke("trash-2",k4);const R4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],N4=ke("upload",R4);const O4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],PO=ke("user",O4);const I4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],is=ke("x",I4);function L4(){const{isOpen:e,title:t,message:n,confirmLabel:i,cancelLabel:s,variant:l,onConfirm:u,onCancel:o,closeConfirmation:d}=l_(),[h,p]=G.useState(!1);G.useEffect(()=>{e||p(!1)},[e]);const f=G.useCallback(async()=>{p(!0);try{await u(),d()}catch(x){console.error("Confirmation action failed:",x),p(!1)}},[u,d]),g=G.useCallback(()=>{o?.(),d()},[o,d]),b=x=>{x.target===x.currentTarget&&!h&&g()};return G.useEffect(()=>{const x=E=>{if(e&&!h){const y=E.target,S=y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable;(E.key==="Escape"||E.key==="q"&&!S)&&(E.preventDefault(),g()),E.key==="Enter"&&(E.preventDefault(),f())}};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,h,f,g]),e?T.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:b,onKeyDown:x=>{const E=x.target,y=E.tagName==="INPUT"||E.tagName==="TEXTAREA"||E.isContentEditable;(x.key==="Escape"||x.key==="q"&&!y)&&!h&&(x.preventDefault(),g())},children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg max-w-md w-full mx-4",children:[T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[l==="destructive"&&T.jsx(Mr,{className:"w-5 h-5 text-destructive"}),T.jsx("h2",{className:"text-lg font-semibold",children:t})]}),T.jsx("button",{type:"button",onClick:g,disabled:h,className:"p-1 hover:bg-muted rounded transition-colors disabled:opacity-50","aria-label":"Close",children:T.jsx(is,{className:"w-5 h-5"})})]}),T.jsx("div",{className:"p-4",children:T.jsx("p",{className:"text-muted-foreground",children:n})}),T.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[T.jsx("button",{type:"button",onClick:g,disabled:h,className:"px-4 py-2 text-sm font-medium rounded transition-colors hover:bg-muted disabled:opacity-50",children:s}),T.jsx("button",{type:"button",onClick:f,disabled:h,className:`px-4 py-2 text-sm font-medium rounded transition-colors disabled:opacity-50 ${l==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:h?"Processing...":i})]})]})}):null}function Dr(e){return Array.isArray?Array.isArray(e):zO(e)==="[object Array]"}function D4(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function M4(e){return e==null?"":D4(e)}function cr(e){return typeof e=="string"}function UO(e){return typeof e=="number"}function B4(e){return e===!0||e===!1||F4(e)&&zO(e)=="[object Boolean]"}function jO(e){return typeof e=="object"}function F4(e){return jO(e)&&e!==null}function kn(e){return e!=null}function Zh(e){return!e.trim().length}function zO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const P4="Incorrect 'index' type",U4=e=>`Invalid value for key ${e}`,j4=e=>`Pattern length exceeds max of ${e}.`,z4=e=>`Missing ${e} property in key`,H4=e=>`Property 'weight' in key '${e}' must be a positive integer`,Uw=Object.prototype.hasOwnProperty;class q4{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(i=>{let s=HO(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function HO(e){let t=null,n=null,i=null,s=1,l=null;if(cr(e)||Dr(e))i=e,t=jw(e),n=bv(e);else{if(!Uw.call(e,"name"))throw new Error(z4("name"));const u=e.name;if(i=u,Uw.call(e,"weight")&&(s=e.weight,s<=0))throw new Error(H4(u));t=jw(u),n=bv(u),l=e.getFn}return{path:t,id:n,weight:s,src:i,getFn:l}}function jw(e){return Dr(e)?e:e.split(".")}function bv(e){return Dr(e)?e.join("."):e}function $4(e,t){let n=[],i=!1;const s=(l,u,o)=>{if(kn(l))if(!u[o])n.push(l);else{let d=u[o];const h=l[d];if(!kn(h))return;if(o===u.length-1&&(cr(h)||UO(h)||B4(h)))n.push(M4(h));else if(Dr(h)){i=!0;for(let p=0,f=h.length;p<f;p+=1)s(h[p],u,o+1)}else u.length&&s(h,u,o+1)}};return s(e,cr(t)?t.split("."):t,0),i?n:n[0]}const G4={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},V4={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},W4={location:0,threshold:.6,distance:100},K4={useExtendedSearch:!1,getFn:$4,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ie={...V4,...G4,...W4,...K4};const Y4=/[^ ]+/g;function X4(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){const l=s.match(Y4).length;if(n.has(l))return n.get(l);const u=1/Math.pow(l,.5*e),o=parseFloat(Math.round(u*i)/i);return n.set(l,o),o},clear(){n.clear()}}}class d_{constructor({getFn:t=Ie.getFn,fieldNormWeight:n=Ie.fieldNormWeight}={}){this.norm=X4(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,i)=>{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,cr(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();cr(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,i=this.size();n<i;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!kn(t)||Zh(t))return;let i={v:t,i:n,n:this.norm.get(t)};this.records.push(i)}_addObject(t,n){let i={i:n,$:{}};this.keys.forEach((s,l)=>{let u=s.getFn?s.getFn(t):this.getFn(t,s.path);if(kn(u)){if(Dr(u)){let o=[];const d=[{nestedArrIndex:-1,value:u}];for(;d.length;){const{nestedArrIndex:h,value:p}=d.pop();if(kn(p))if(cr(p)&&!Zh(p)){let f={v:p,i:h,n:this.norm.get(p)};o.push(f)}else Dr(p)&&p.forEach((f,g)=>{d.push({nestedArrIndex:g,value:f})})}i.$[l]=o}else if(cr(u)&&!Zh(u)){let o={v:u,n:this.norm.get(u)};i.$[l]=o}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function qO(e,t,{getFn:n=Ie.getFn,fieldNormWeight:i=Ie.fieldNormWeight}={}){const s=new d_({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(HO)),s.setSources(t),s.create(),s}function Z4(e,{getFn:t=Ie.getFn,fieldNormWeight:n=Ie.fieldNormWeight}={}){const{keys:i,records:s}=e,l=new d_({getFn:t,fieldNormWeight:n});return l.setKeys(i),l.setIndexRecords(s),l}function rc(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Ie.distance,ignoreLocation:l=Ie.ignoreLocation}={}){const u=t/e.length;if(l)return u;const o=Math.abs(i-n);return s?u+o/s:o?1:u}function Q4(e=[],t=Ie.minMatchCharLength){let n=[],i=-1,s=-1,l=0;for(let u=e.length;l<u;l+=1){let o=e[l];o&&i===-1?i=l:!o&&i!==-1&&(s=l-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[l-1]&&l-i>=t&&n.push([i,l-1]),n}const zi=32;function J4(e,t,n,{location:i=Ie.location,distance:s=Ie.distance,threshold:l=Ie.threshold,findAllMatches:u=Ie.findAllMatches,minMatchCharLength:o=Ie.minMatchCharLength,includeMatches:d=Ie.includeMatches,ignoreLocation:h=Ie.ignoreLocation}={}){if(t.length>zi)throw new Error(j4(zi));const p=t.length,f=e.length,g=Math.max(0,Math.min(i,f));let b=l,x=g;const E=o>1||d,y=E?Array(f):[];let S;for(;(S=e.indexOf(t,x))>-1;){let O=rc(t,{currentLocation:S,expectedLocation:g,distance:s,ignoreLocation:h});if(b=Math.min(O,b),x=S+p,E){let R=0;for(;R<p;)y[S+R]=1,R+=1}}x=-1;let v=[],_=1,w=p+f;const N=1<<p-1;for(let O=0;O<p;O+=1){let R=0,I=w;for(;R<I;)rc(t,{errors:O,currentLocation:g+I,expectedLocation:g,distance:s,ignoreLocation:h})<=b?R=I:w=I,I=Math.floor((w-R)/2+R);w=I;let L=Math.max(1,g-I+1),F=u?f:Math.min(g+I,f)+p,j=Array(F+2);j[F+1]=(1<<O)-1;for(let V=F;V>=L;V-=1){let K=V-1,W=n[e.charAt(K)];if(E&&(y[K]=+!!W),j[V]=(j[V+1]<<1|1)&W,O&&(j[V]|=(v[V+1]|v[V])<<1|1|v[V+1]),j[V]&N&&(_=rc(t,{errors:O,currentLocation:K,expectedLocation:g,distance:s,ignoreLocation:h}),_<=b)){if(b=_,x=K,x<=g)break;L=Math.max(1,2*g-x)}}if(rc(t,{errors:O+1,currentLocation:g,expectedLocation:g,distance:s,ignoreLocation:h})>b)break;v=j}const k={isMatch:x>=0,score:Math.max(.001,_)};if(E){const O=Q4(y,o);O.length?d&&(k.indices=O):k.isMatch=!1}return k}function eP(e){let t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}const Fc=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class $O{constructor(t,{location:n=Ie.location,threshold:i=Ie.threshold,distance:s=Ie.distance,includeMatches:l=Ie.includeMatches,findAllMatches:u=Ie.findAllMatches,minMatchCharLength:o=Ie.minMatchCharLength,isCaseSensitive:d=Ie.isCaseSensitive,ignoreDiacritics:h=Ie.ignoreDiacritics,ignoreLocation:p=Ie.ignoreLocation}={}){if(this.options={location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p},t=d?t:t.toLowerCase(),t=h?Fc(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(b,x)=>{this.chunks.push({pattern:b,alphabet:eP(b),startIndex:x})},g=this.pattern.length;if(g>zi){let b=0;const x=g%zi,E=g-x;for(;b<E;)f(this.pattern.substr(b,zi),b),b+=zi;if(x){const y=g-zi;f(this.pattern.substr(y),y)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s}=this.options;if(t=n?t:t.toLowerCase(),t=i?Fc(t):t,this.pattern===t){let E={isMatch:!0,score:0};return s&&(E.indices=[[0,t.length-1]]),E}const{location:l,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,ignoreLocation:p}=this.options;let f=[],g=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:y,startIndex:S})=>{const{isMatch:v,score:_,indices:w}=J4(t,E,y,{location:l+S,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,includeMatches:s,ignoreLocation:p});v&&(b=!0),g+=_,v&&w&&(f=[...f,...w])});let x={isMatch:b,score:b?g/this.chunks.length:1};return b&&s&&(x.indices=f),x}}class yi{constructor(t){this.pattern=t}static isMultiMatch(t){return zw(t,this.multiRegex)}static isSingleMatch(t){return zw(t,this.singleRegex)}search(){}}function zw(e,t){const n=e.match(t);return n?n[1]:null}class tP extends yi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class nP extends yi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class rP extends yi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class iP extends yi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class aP extends yi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class sP extends yi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class GO extends yi{constructor(t,{location:n=Ie.location,threshold:i=Ie.threshold,distance:s=Ie.distance,includeMatches:l=Ie.includeMatches,findAllMatches:u=Ie.findAllMatches,minMatchCharLength:o=Ie.minMatchCharLength,isCaseSensitive:d=Ie.isCaseSensitive,ignoreDiacritics:h=Ie.ignoreDiacritics,ignoreLocation:p=Ie.ignoreLocation}={}){super(t),this._bitapSearch=new $O(t,{location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class VO extends yi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,i;const s=[],l=this.pattern.length;for(;(i=t.indexOf(this.pattern,n))>-1;)n=i+l,s.push([i,n-1]);const u=!!s.length;return{isMatch:u,score:u?0:1,indices:s}}}const yv=[tP,VO,rP,iP,sP,aP,nP,GO],Hw=yv.length,oP=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,lP="|";function cP(e,t={}){return e.split(lP).map(n=>{let i=n.trim().split(oP).filter(l=>l&&!!l.trim()),s=[];for(let l=0,u=i.length;l<u;l+=1){const o=i[l];let d=!1,h=-1;for(;!d&&++h<Hw;){const p=yv[h];let f=p.isMultiMatch(o);f&&(s.push(new p(f,t)),d=!0)}if(!d)for(h=-1;++h<Hw;){const p=yv[h];let f=p.isSingleMatch(o);if(f){s.push(new p(f,t));break}}}return s})}const uP=new Set([GO.type,VO.type]);class dP{constructor(t,{isCaseSensitive:n=Ie.isCaseSensitive,ignoreDiacritics:i=Ie.ignoreDiacritics,includeMatches:s=Ie.includeMatches,minMatchCharLength:l=Ie.minMatchCharLength,ignoreLocation:u=Ie.ignoreLocation,findAllMatches:o=Ie.findAllMatches,location:d=Ie.location,threshold:h=Ie.threshold,distance:p=Ie.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s,minMatchCharLength:l,findAllMatches:o,ignoreLocation:u,location:d,threshold:h,distance:p},t=n?t:t.toLowerCase(),t=i?Fc(t):t,this.pattern=t,this.query=cP(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:s,ignoreDiacritics:l}=this.options;t=s?t:t.toLowerCase(),t=l?Fc(t):t;let u=0,o=[],d=0;for(let h=0,p=n.length;h<p;h+=1){const f=n[h];o.length=0,u=0;for(let g=0,b=f.length;g<b;g+=1){const x=f[g],{isMatch:E,indices:y,score:S}=x.search(t);if(E){if(u+=1,d+=S,i){const v=x.constructor.type;uP.has(v)?o=[...o,...y]:o.push(y)}}else{d=0,u=0,o.length=0;break}}if(u){let g={isMatch:!0,score:d/u};return i&&(g.indices=o),g}}return{isMatch:!1,score:1}}}const vv=[];function hP(...e){vv.push(...e)}function _v(e,t){for(let n=0,i=vv.length;n<i;n+=1){let s=vv[n];if(s.condition(e,t))return new s(e,t)}return new $O(e,t)}const Pc={AND:"$and",OR:"$or"},Sv={PATH:"$path",PATTERN:"$val"},Ev=e=>!!(e[Pc.AND]||e[Pc.OR]),fP=e=>!!e[Sv.PATH],pP=e=>!Dr(e)&&jO(e)&&!Ev(e),qw=e=>({[Pc.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function WO(e,t,{auto:n=!0}={}){const i=s=>{let l=Object.keys(s);const u=fP(s);if(!u&&l.length>1&&!Ev(s))return i(qw(s));if(pP(s)){const d=u?s[Sv.PATH]:l[0],h=u?s[Sv.PATTERN]:s[d];if(!cr(h))throw new Error(U4(d));const p={keyId:bv(d),pattern:h};return n&&(p.searcher=_v(h,t)),p}let o={children:[],operator:l[0]};return l.forEach(d=>{const h=s[d];Dr(h)&&h.forEach(p=>{o.children.push(i(p))})}),o};return Ev(e)||(e=qw(e)),i(e)}function mP(e,{ignoreFieldNorm:t=Ie.ignoreFieldNorm}){e.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:l,score:u})=>{const o=s?s.weight:null;i*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(t?1:l))}),n.score=i})}function gP(e,t){const n=e.matches;t.matches=[],kn(n)&&n.forEach(i=>{if(!kn(i.indices)||!i.indices.length)return;const{indices:s,value:l}=i;let u={indices:s,value:l};i.key&&(u.key=i.key.src),i.idx>-1&&(u.refIndex=i.idx),t.matches.push(u)})}function bP(e,t){t.score=e.score}function yP(e,t,{includeMatches:n=Ie.includeMatches,includeScore:i=Ie.includeScore}={}){const s=[];return n&&s.push(gP),i&&s.push(bP),e.map(l=>{const{idx:u}=l,o={item:t[u],refIndex:u};return s.length&&s.forEach(d=>{d(l,o)}),o})}class vi{constructor(t,n={},i){this.options={...Ie,...n},this.options.useExtendedSearch,this._keyStore=new q4(this.options.keys),this.setCollection(t,i)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof d_))throw new Error(P4);this._myIndex=n||qO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){kn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let i=0,s=this._docs.length;i<s;i+=1){const l=this._docs[i];t(l,i)&&(this.removeAt(i),i-=1,s-=1,n.push(l))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:i,includeScore:s,shouldSort:l,sortFn:u,ignoreFieldNorm:o}=this.options;let d=cr(t)?cr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return mP(d,{ignoreFieldNorm:o}),l&&d.sort(u),UO(n)&&n>-1&&(d=d.slice(0,n)),yP(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(t){const n=_v(t,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:l,i:u,n:o})=>{if(!kn(l))return;const{isMatch:d,score:h,indices:p}=n.searchIn(l);d&&s.push({item:l,idx:u,matches:[{score:h,value:l,norm:o,indices:p}]})}),s}_searchLogical(t){const n=WO(t,this.options),i=(o,d,h)=>{if(!o.children){const{keyId:f,searcher:g}=o,b=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(d,f),searcher:g});return b&&b.length?[{idx:h,item:d,matches:b}]:[]}const p=[];for(let f=0,g=o.children.length;f<g;f+=1){const b=o.children[f],x=i(b,d,h);if(x.length)p.push(...x);else if(o.operator===Pc.AND)return[]}return p},s=this._myIndex.records,l={},u=[];return s.forEach(({$:o,i:d})=>{if(kn(o)){let h=i(n,o,d);h.length&&(l[d]||(l[d]={idx:d,item:o,matches:[]},u.push(l[d])),h.forEach(({matches:p})=>{l[d].matches.push(...p)}))}}),u}_searchObjectList(t){const n=_v(t,this.options),{keys:i,records:s}=this._myIndex,l=[];return s.forEach(({$:u,i:o})=>{if(!kn(u))return;let d=[];i.forEach((h,p)=>{d.push(...this._findMatches({key:h,value:u[p],searcher:n}))}),d.length&&l.push({idx:o,item:u,matches:d})}),l}_findMatches({key:t,value:n,searcher:i}){if(!kn(n))return[];let s=[];if(Dr(n))n.forEach(({v:l,i:u,n:o})=>{if(!kn(l))return;const{isMatch:d,score:h,indices:p}=i.searchIn(l);d&&s.push({score:h,key:t,value:l,idx:u,norm:o,indices:p})});else{const{v:l,n:u}=n,{isMatch:o,score:d,indices:h}=i.searchIn(l);o&&s.push({score:d,key:t,value:l,norm:u,indices:h})}return s}}vi.version="7.1.0";vi.createIndex=qO;vi.parseIndex=Z4;vi.config=Ie;vi.parseQuery=WO;hP(dP);function vP(e){switch(e.split(".").pop()?.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"cjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":return HF;case"json":case"yaml":case"yml":case"toml":return $F;case"md":case"txt":case"log":return DO;case"png":case"jpg":case"jpeg":case"gif":case"svg":case"webp":return gv;case"css":case"scss":case"sass":case"less":return bF;case"html":case"xml":return XF;default:return go}}function _P(e,t){const n=t.get(e);return n?{added:{icon:Bc,label:"Added",className:"text-green-500"},modified:{icon:Pw,label:"Modified",className:"text-yellow-500"},untracked:{icon:Bc,label:"Untracked",className:"text-blue-500"}}[n]||{icon:Pw,label:"Modified",className:"text-yellow-500"}:null}function SP({files:e,changedFiles:t=[],query:n,selectedIndex:i,onSelect:s,onEnterSelect:l,onClose:u}){const o=G.useMemo(()=>new Map(t?.map(p=>[p.path,p.status])||[]),[t]),d=G.useMemo(()=>new vi(e,{threshold:.4,distance:100,ignoreLocation:!0,includeMatches:!0}),[e]),h=G.useMemo(()=>{if(!n)return e.slice(0,20);const p=d.search(n).map(f=>f.item);return p.sort((f,g)=>{const b=o.has(f),x=o.has(g);return b&&!x?-1:!b&&x?1:0}),p.slice(0,20)},[d,n,e,o]);return G.useEffect(()=>{document.getElementById(`file-item-${i}`)?.scrollIntoView({block:"nearest"})},[i]),G.useEffect(()=>{l(h[i])},[h,i,l]),G.useEffect(()=>{const p=f=>{f.target.closest("[data-file-mention-popup]")||u()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[u]),h.length===0?T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No files found"})}):T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:h.map((p,f)=>T.jsx("button",{type:"button",id:`file-item-${f}`,onMouseDown:g=>{g.preventDefault(),s(p)},className:`w-full text-left px-3 py-2 hover:bg-accent ${f===i?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-2 w-full",children:[(()=>{const g=vP(p);return T.jsx(g,{className:"w-4 h-4 flex-shrink-0 text-muted-foreground"})})(),T.jsx("span",{className:"font-mono text-sm flex-1 truncate",children:p}),(()=>{const g=_P(p,o);return g&&T.jsx(g.icon,{className:`w-3.5 h-3.5 flex-shrink-0 ${g.className}`,title:g.label})})()]})},p))})}const KO="agi-preferences",pc={vimMode:!1,reasoningEnabled:!0};function EP(){if(typeof window>"u")return pc;try{const e=window.localStorage.getItem(KO);if(e){const t=JSON.parse(e);return{...pc,...t}}}catch(e){console.warn("Failed to load preferences",e)}return pc}let mc=EP();const xv=new Set;function xP(){return mc}function wP(){return pc}function CP(e){return xv.add(e),()=>xv.delete(e)}function TP(){for(const e of xv)e()}function kP(e){if(mc={...mc,...e},typeof window<"u")try{window.localStorage.setItem(KO,JSON.stringify(mc))}catch(t){console.warn("Failed to persist preferences",t)}TP()}function Qc(){const e=G.useSyncExternalStore(CP,xP,wP),t=G.useCallback(n=>{kP(n)},[]);return G.useMemo(()=>({preferences:e,updatePreferences:t}),[e,t])}const wv=[{id:"models",label:"/models",description:"Open model selector",icon:wo},{id:"agents",label:"/agents",description:"Open agent selector",icon:Ji},{id:"new",label:"/new",description:"Create new session",icon:Bc},{id:"stop",label:"/stop",description:"Stop current generation",icon:IO},{id:"help",label:"/help",description:"Show keyboard shortcuts and help",icon:BO},{id:"vim",label:"/vim",description:e=>e.vimModeEnabled?"Disable Vim mode":"Enable Vim mode",icon:OF},{id:"reasoning",label:"/reasoning",description:e=>e.reasoningEnabled?"Disable extended thinking":"Enable extended thinking",icon:c_},{id:"stage",label:"/stage",description:"Stage all changes (git add -A)",icon:xo},{id:"commit",label:"/commit",description:"Commit staged changes",icon:Zc}];function YO(e,t){return typeof e.description=="function"?e.description(t):e.description}function AP(e,t){if(!e)return wv;const n=e.toLowerCase(),i=[];for(const s of wv){const l=YO(s,t),u=s.label.toLowerCase().includes(n),o=l.toLowerCase().includes(n);if(u||o){const d=u?10:5;i.push({...s,matchScore:d})}}return i.sort((s,l)=>{const u=l.matchScore-s.matchScore;return u!==0?u:s.label.localeCompare(l.label)})}function RP({query:e,selectedIndex:t,onSelect:n,onEnterSelect:i,onClose:s}){const{preferences:l}=Qc(),u=G.useMemo(()=>({vimModeEnabled:l.vimMode,reasoningEnabled:l.reasoningEnabled}),[l.vimMode,l.reasoningEnabled]),o=G.useMemo(()=>AP(e,u),[e,u]);return G.useEffect(()=>{document.getElementById(`command-item-${t}`)?.scrollIntoView({block:"nearest"})},[t]),G.useEffect(()=>{i(o[t]?.id)},[o,t,i]),G.useEffect(()=>{const d=h=>{h.target.closest("[data-command-popup]")||s()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[s]),o.length===0?T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No commands found"})}):T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:o.map((d,h)=>{const p=d.icon;return T.jsx("button",{type:"button",id:`command-item-${h}`,onMouseDown:f=>{f.preventDefault(),n(d.id)},className:`w-full text-left px-3 py-2 hover:bg-accent ${h===t?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-3 w-full",children:[T.jsx(p,{className:"w-4 h-4 flex-shrink-0 text-primary"}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"font-mono text-sm font-medium text-foreground",children:d.label}),T.jsx("div",{className:"text-xs text-muted-foreground truncate",children:YO(d,u)})]})]})},d.id)})})}const NP={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};function h_({isOpen:e,onClose:t,title:n,children:i,showCloseButton:s=!0,closeOnBackdropClick:l=!0,closeOnEscape:u=!0,maxWidth:o="md"}){if(G.useEffect(()=>{if(!e||!u)return;const h=p=>{const f=p.target,g=f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable;(p.key==="Escape"||p.key==="q"&&!g)&&(p.preventDefault(),p.stopPropagation(),t())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,u,t]),G.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;const d=h=>{l&&h.target===h.currentTarget&&t()};return T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[9999] cursor-default",onClick:d,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&d(h)},"aria-label":"Close modal"}),T.jsx("div",{className:`fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[9999] w-full ${NP[o]} px-4`,children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg",children:[(n||s)&&T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[n&&T.jsx("div",{className:"text-lg font-semibold text-foreground",children:n}),s&&T.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground transition-colors ml-auto","aria-label":"Close",children:T.jsx(is,{className:"h-5 w-5"})})]}),T.jsx("div",{className:"p-4",children:i})]})})]})}const OP=[{keys:["Ctrl","H"],description:"Navigate to left sidebar (sessions)",category:"Navigation"},{keys:["Ctrl","L"],description:"Navigate to right sidebar (git)",category:"Navigation"},{keys:["Ctrl","/"],description:"Toggle left sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","\\"],description:"Toggle right sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","N"],description:"Create new session",category:"Navigation"},{keys:["ESC"],description:"Close sidebar and return to center",category:"Navigation"},{keys:["J"],description:"Navigate to next item (in focused list)",category:"List Navigation"},{keys:["K"],description:"Navigate to previous item (in focused list)",category:"List Navigation"},{keys:["Enter"],description:"Select focused item and return to input",category:"List Navigation"},{keys:["Space"],description:"Toggle stage/unstage for focused file (git panel)",category:"Git Operations"},{keys:["A"],description:"Stage all unstaged files",category:"Git Operations"},{keys:["U"],description:"Unstage all staged files",category:"Git Operations"},{keys:["C"],description:"Open commit modal (if files are staged)",category:"Git Operations"},{keys:["Tab"],description:"Toggle plan mode",category:"Chat"},{keys:["Enter"],description:"Send message",category:"Chat"},{keys:["Shift","Enter"],description:"New line in message",category:"Chat"},{keys:["@"],description:"Mention file (opens file picker)",category:"Chat"},{keys:["/"],description:"Slash command (opens command menu)",category:"Chat"}],IP=[{keys:["i"],description:"Enter insert mode at cursor (vim mode)",category:"Vim Mode"},{keys:["a"],description:"Enter insert mode after cursor (vim mode)",category:"Vim Mode"},{keys:["I"],description:"Enter insert mode at line start (vim mode)",category:"Vim Mode"},{keys:["A"],description:"Enter insert mode at line end (vim mode)",category:"Vim Mode"},{keys:["o"],description:"New line below and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["O"],description:"New line above and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["ESC"],description:"Return to normal mode (vim mode)",category:"Vim Mode"},{keys:["Enter"],description:"Send message in normal mode (vim mode)",category:"Vim Mode"},{keys:["w"],description:"Jump to next word start (vim mode)",category:"Vim Mode"},{keys:["e"],description:"Jump to next word end (vim mode)",category:"Vim Mode"},{keys:["b"],description:"Jump to previous word start (vim mode)",category:"Vim Mode"},{keys:["x"],description:"Delete character under cursor (vim mode)",category:"Vim Mode"},{keys:["s"],description:"Delete character and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["S"],description:"Delete line and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["f","{char}"],description:"Find and jump to next character on line (vim mode)",category:"Vim Mode"},{keys:["d","d"],description:"Delete current line (vim mode)",category:"Vim Mode"},{keys:["0"],description:"Jump to line start (vim mode)",category:"Vim Mode"},{keys:["$"],description:"Jump to line end (vim mode)",category:"Vim Mode"}],LP=[{command:"/models",description:"Open model selector"},{command:"/agents",description:"Open agent selector"},{command:"/new",description:"Create new session"},{command:"/help",description:"Show keyboard shortcuts and help (this modal)"}];function DP(e){const t={};for(const n of e)t[n.category]||(t[n.category]=[]),t[n.category].push(n);return t}function MP({isOpen:e,onClose:t}){const n=[...OP,...IP],i=DP(n),s=G.useRef(null),l=G.useRef(null);return G.useEffect(()=>{e?(l.current=document.activeElement,l.current&&l.current.blur()):l.current&&(l.current.focus(),l.current=null)},[e]),G.useEffect(()=>{if(!e)return;const u=o=>{const d=o.target;if(!(d.tagName==="INPUT"||d.tagName==="TEXTAREA"||d.isContentEditable))if(o.key==="j"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:100,behavior:"smooth"})}else if(o.key==="k"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:-100,behavior:"smooth"})}else o.key==="Enter"&&(o.preventDefault(),t())};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,t]),T.jsx(h_,{isOpen:e,onClose:t,title:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(BO,{className:"w-5 h-5"}),T.jsx("span",{children:"Keyboard Shortcuts & Help"})]}),maxWidth:"2xl",closeOnEscape:!0,closeOnBackdropClick:!0,children:T.jsxs("div",{ref:s,className:"space-y-6 max-h-[70vh] overflow-y-auto",children:[Object.entries(i).map(([u,o])=>T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(Mw,{className:"w-4 h-4"}),u]}),T.jsx("div",{className:"space-y-2",children:o.map((d,h)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:d.description}),T.jsx("div",{className:"flex items-center gap-1",children:d.keys.map(p=>T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:p}),d.keys.indexOf(p)<d.keys.length-1&&T.jsx("span",{className:"text-muted-foreground",children:"+"})]},p))})]},`${u}-${d.description}`))})]},u)),T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(Mw,{className:"w-4 h-4"}),"Slash Commands"]}),T.jsx("div",{className:"space-y-2",children:LP.map((u,o)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:u.description}),T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:u.command})]},u.command))})]}),T.jsx("div",{className:"pt-4 border-t border-border",children:T.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.jsx("strong",{children:"Tip:"})," Shortcuts are disabled when typing in input fields. Press ",T.jsx("kbd",{className:"text-xs",children:"ESC"})," to close popups and return focus to chat input."]})})]})})}var $w;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.GOOGLE="google",e.OPENROUTER="openrouter",e.OPENCODE="opencode",e.ZAI="zai",e.SOLFORGE="solforge"})($w||($w={}));function XO(e,t){return function(){return e.apply(t,arguments)}}const{toString:BP}=Object.prototype,{getPrototypeOf:f_}=Object,{iterator:Jc,toStringTag:ZO}=Symbol,eu=(e=>t=>{const n=BP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=e=>(e=e.toLowerCase(),t=>eu(t)===e),tu=e=>t=>typeof t===e,{isArray:as}=Array,es=tu("undefined");function Oo(e){return e!==null&&!es(e)&&e.constructor!==null&&!es(e.constructor)&&fn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const QO=Jn("ArrayBuffer");function FP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&QO(e.buffer),t}const PP=tu("string"),fn=tu("function"),JO=tu("number"),Io=e=>e!==null&&typeof e=="object",UP=e=>e===!0||e===!1,gc=e=>{if(eu(e)!=="object")return!1;const t=f_(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ZO in e)&&!(Jc in e)},jP=e=>{if(!Io(e)||Oo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},zP=Jn("Date"),HP=Jn("File"),qP=Jn("Blob"),$P=Jn("FileList"),GP=e=>Io(e)&&fn(e.pipe),VP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||fn(e.append)&&((t=eu(e))==="formdata"||t==="object"&&fn(e.toString)&&e.toString()==="[object FormData]"))},WP=Jn("URLSearchParams"),[KP,YP,XP,ZP]=["ReadableStream","Request","Response","Headers"].map(Jn),QP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),as(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(Oo(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let o;for(i=0;i<u;i++)o=l[i],t.call(null,e[o],o,e)}}function eI(e,t){if(Oo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const $i=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tI=e=>!es(e)&&e!==$i;function Cv(){const{caseless:e,skipUndefined:t}=tI(this)&&this||{},n={},i=(s,l)=>{const u=e&&eI(n,l)||l;gc(n[u])&&gc(s)?n[u]=Cv(n[u],s):gc(s)?n[u]=Cv({},s):as(s)?n[u]=s.slice():(!t||!es(s))&&(n[u]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Lo(arguments[s],i);return n}const JP=(e,t,n,{allOwnKeys:i}={})=>(Lo(t,(s,l)=>{n&&fn(s)?e[l]=XO(s,n):e[l]=s},{allOwnKeys:i}),e),eU=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tU=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nU=(e,t,n,i)=>{let s,l,u;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)u=s[l],(!i||i(u,e,t))&&!o[u]&&(t[u]=e[u],o[u]=!0);e=n!==!1&&f_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rU=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},iU=e=>{if(!e)return null;if(as(e))return e;let t=e.length;if(!JO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},aU=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&f_(Uint8Array)),sU=(e,t)=>{const i=(e&&e[Jc]).call(e);let s;for(;(s=i.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},oU=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},lU=Jn("HTMLFormElement"),cU=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Gw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uU=Jn("RegExp"),nI=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Lo(n,(s,l)=>{let u;(u=t(s,l,e))!==!1&&(i[l]=u||s)}),Object.defineProperties(e,i)},dU=e=>{nI(e,(t,n)=>{if(fn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(fn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},hU=(e,t)=>{const n={},i=s=>{s.forEach(l=>{n[l]=!0})};return as(e)?i(e):i(String(e).split(t)),n},fU=()=>{},pU=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mU(e){return!!(e&&fn(e.append)&&e[ZO]==="FormData"&&e[Jc])}const gU=e=>{const t=new Array(10),n=(i,s)=>{if(Io(i)){if(t.indexOf(i)>=0)return;if(Oo(i))return i;if(!("toJSON"in i)){t[s]=i;const l=as(i)?[]:{};return Lo(i,(u,o)=>{const d=n(u,s+1);!es(d)&&(l[o]=d)}),t[s]=void 0,l}}return i};return n(e,0)},bU=Jn("AsyncFunction"),yU=e=>e&&(Io(e)||fn(e))&&fn(e.then)&&fn(e.catch),rI=((e,t)=>e?setImmediate:t?((n,i)=>($i.addEventListener("message",({source:s,data:l})=>{s===$i&&l===n&&i.length&&i.shift()()},!1),s=>{i.push(s),$i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fn($i.postMessage)),vU=typeof queueMicrotask<"u"?queueMicrotask.bind($i):typeof process<"u"&&process.nextTick||rI,_U=e=>e!=null&&fn(e[Jc]),le={isArray:as,isArrayBuffer:QO,isBuffer:Oo,isFormData:VP,isArrayBufferView:FP,isString:PP,isNumber:JO,isBoolean:UP,isObject:Io,isPlainObject:gc,isEmptyObject:jP,isReadableStream:KP,isRequest:YP,isResponse:XP,isHeaders:ZP,isUndefined:es,isDate:zP,isFile:HP,isBlob:qP,isRegExp:uU,isFunction:fn,isStream:GP,isURLSearchParams:WP,isTypedArray:aU,isFileList:$P,forEach:Lo,merge:Cv,extend:JP,trim:QP,stripBOM:eU,inherits:tU,toFlatObject:nU,kindOf:eu,kindOfTest:Jn,endsWith:rU,toArray:iU,forEachEntry:sU,matchAll:oU,isHTMLForm:lU,hasOwnProperty:Gw,hasOwnProp:Gw,reduceDescriptors:nI,freezeMethods:dU,toObjectSet:hU,toCamelCase:cU,noop:fU,toFiniteNumber:pU,findKey:eI,global:$i,isContextDefined:tI,isSpecCompliantForm:mU,toJSONObject:gU,isAsyncFn:bU,isThenable:yU,setImmediate:rI,asap:vU,isIterable:_U};function Fe(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}le.inherits(Fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:le.toJSONObject(this.config),code:this.code,status:this.status}}});const iI=Fe.prototype,aI={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{aI[e]={value:e}});Object.defineProperties(Fe,aI);Object.defineProperty(iI,"isAxiosError",{value:!0});Fe.from=(e,t,n,i,s,l)=>{const u=Object.create(iI);le.toFlatObject(e,u,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const o=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return Fe.call(u,o,d,n,i,s),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",l&&Object.assign(u,l),u};const SU=null;function Tv(e){return le.isPlainObject(e)||le.isArray(e)}function sI(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function Vw(e,t,n){return e?e.concat(t).map(function(s,l){return s=sI(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function EU(e){return le.isArray(e)&&!e.some(Tv)}const xU=le.toFlatObject(le,{},null,function(t){return/^is[A-Z]/.test(t)});function nu(e,t,n){if(!le.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!le.isUndefined(y[E])});const i=n.metaTokens,s=n.visitor||p,l=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&le.isSpecCompliantForm(t);if(!le.isFunction(s))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(le.isDate(x))return x.toISOString();if(le.isBoolean(x))return x.toString();if(!d&&le.isBlob(x))throw new Fe("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(x)||le.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,E,y){let S=x;if(x&&!y&&typeof x=="object"){if(le.endsWith(E,"{}"))E=i?E:E.slice(0,-2),x=JSON.stringify(x);else if(le.isArray(x)&&EU(x)||(le.isFileList(x)||le.endsWith(E,"[]"))&&(S=le.toArray(x)))return E=sI(E),S.forEach(function(_,w){!(le.isUndefined(_)||_===null)&&t.append(u===!0?Vw([E],w,l):u===null?E:E+"[]",h(_))}),!1}return Tv(x)?!0:(t.append(Vw(y,E,l),h(x)),!1)}const f=[],g=Object.assign(xU,{defaultVisitor:p,convertValue:h,isVisitable:Tv});function b(x,E){if(!le.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(x),le.forEach(x,function(S,v){(!(le.isUndefined(S)||S===null)&&s.call(t,S,le.isString(v)?v.trim():v,E,g))===!0&&b(S,E?E.concat(v):[v])}),f.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ww(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function p_(e,t){this._pairs=[],e&&nu(e,this,t)}const oI=p_.prototype;oI.append=function(t,n){this._pairs.push([t,n])};oI.toString=function(t){const n=t?function(i){return t.call(this,i,Ww)}:Ww;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function wU(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function lI(e,t,n){if(!t)return e;const i=n&&n.encode||wU;le.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let l;if(s?l=s(t,n):l=le.isURLSearchParams(t)?t.toString():new p_(t,n).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Kw{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){le.forEach(this.handlers,function(i){i!==null&&t(i)})}}const cI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},CU=typeof URLSearchParams<"u"?URLSearchParams:p_,TU=typeof FormData<"u"?FormData:null,kU=typeof Blob<"u"?Blob:null,AU={isBrowser:!0,classes:{URLSearchParams:CU,FormData:TU,Blob:kU},protocols:["http","https","file","blob","url","data"]},m_=typeof window<"u"&&typeof document<"u",kv=typeof navigator=="object"&&navigator||void 0,RU=m_&&(!kv||["ReactNative","NativeScript","NS"].indexOf(kv.product)<0),NU=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OU=m_&&window.location.href||"http://localhost",IU=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:m_,hasStandardBrowserEnv:RU,hasStandardBrowserWebWorkerEnv:NU,navigator:kv,origin:OU},Symbol.toStringTag,{value:"Module"})),Kt={...IU,...AU};function LU(e,t){return nu(e,new Kt.classes.URLSearchParams,{visitor:function(n,i,s,l){return Kt.isNode&&le.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function DU(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function MU(e){const t={},n=Object.keys(e);let i;const s=n.length;let l;for(i=0;i<s;i++)l=n[i],t[l]=e[l];return t}function uI(e){function t(n,i,s,l){let u=n[l++];if(u==="__proto__")return!0;const o=Number.isFinite(+u),d=l>=n.length;return u=!u&&le.isArray(s)?s.length:u,d?(le.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!o):((!s[u]||!le.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],l)&&le.isArray(s[u])&&(s[u]=MU(s[u])),!o)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(i,s)=>{t(DU(i),s,n,0)}),n}return null}function BU(e,t,n){if(le.isString(e))try{return(t||JSON.parse)(e),le.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const Do={transitional:cI,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,l=le.isObject(t);if(l&&le.isHTMLForm(t)&&(t=new FormData(t)),le.isFormData(t))return s?JSON.stringify(uI(t)):t;if(le.isArrayBuffer(t)||le.isBuffer(t)||le.isStream(t)||le.isFile(t)||le.isBlob(t)||le.isReadableStream(t))return t;if(le.isArrayBufferView(t))return t.buffer;if(le.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return LU(t,this.formSerializer).toString();if((o=le.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return nu(o?{"files[]":t}:t,d&&new d,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),BU(t)):t}],transformResponse:[function(t){const n=this.transitional||Do.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(le.isResponse(t)||le.isReadableStream(t))return t;if(t&&le.isString(t)&&(i&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(u)throw o.name==="SyntaxError"?Fe.from(o,Fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kt.classes.FormData,Blob:Kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{Do.headers[e]={}});const FU=le.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),PU=e=>{const t={};let n,i,s;return e&&e.split(`
9
+ `).replace(P2,"")}function fx(r,a){return a=hx(a),hx(r)===a}function it(r,a,c,m,C,A){switch(c){case"children":typeof m=="string"?a==="body"||a==="textarea"&&m===""||ha(r,m):(typeof m=="number"||typeof m=="bigint")&&a!=="body"&&ha(r,""+m);break;case"className":zo(r,"class",m);break;case"tabIndex":zo(r,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":zo(r,c,m);break;case"style":fS(r,m,A);break;case"data":if(a!=="object"){zo(r,"data",m);break}case"src":case"href":if(m===""&&(a!=="a"||c!=="href")){r.removeAttribute(c);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=qo(""+m),r.setAttribute(c,m);break;case"action":case"formAction":if(typeof m=="function"){r.setAttribute(c,"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 A=="function"&&(c==="formAction"?(a!=="input"&&it(r,a,"name",C.name,C,null),it(r,a,"formEncType",C.formEncType,C,null),it(r,a,"formMethod",C.formMethod,C,null),it(r,a,"formTarget",C.formTarget,C,null)):(it(r,a,"encType",C.encType,C,null),it(r,a,"method",C.method,C,null),it(r,a,"target",C.target,C,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){r.removeAttribute(c);break}m=qo(""+m),r.setAttribute(c,m);break;case"onClick":m!=null&&(r.onclick=pr);break;case"onScroll":m!=null&&qe("scroll",r);break;case"onScrollEnd":m!=null&&qe("scrollend",r);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"multiple":r.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":r.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){r.removeAttribute("xlink:href");break}c=qo(""+m),r.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",c);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""+m):r.removeAttribute(c);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":m&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,""):r.removeAttribute(c);break;case"capture":case"download":m===!0?r.setAttribute(c,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?r.setAttribute(c,m):r.removeAttribute(c);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?r.setAttribute(c,m):r.removeAttribute(c);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?r.removeAttribute(c):r.setAttribute(c,m);break;case"popover":qe("beforetoggle",r),qe("toggle",r),jo(r,"popover",m);break;case"xlinkActuate":fr(r,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":fr(r,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":fr(r,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":fr(r,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":fr(r,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":fr(r,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":fr(r,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":fr(r,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":fr(r,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":jo(r,"is",m);break;case"innerText":case"textContent":break;default:(!(2<c.length)||c[0]!=="o"&&c[0]!=="O"||c[1]!=="n"&&c[1]!=="N")&&(c=hD.get(c)||c,jo(r,c,m))}}function fh(r,a,c,m,C,A){switch(c){case"style":fS(r,m,A);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(c=m.__html,c!=null){if(C.children!=null)throw Error(i(60));r.innerHTML=c}}break;case"children":typeof m=="string"?ha(r,m):(typeof m=="number"||typeof m=="bigint")&&ha(r,""+m);break;case"onScroll":m!=null&&qe("scroll",r);break;case"onScrollEnd":m!=null&&qe("scrollend",r);break;case"onClick":m!=null&&(r.onclick=pr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!iS.hasOwnProperty(c))e:{if(c[0]==="o"&&c[1]==="n"&&(C=c.endsWith("Capture"),a=c.slice(2,C?c.length-7:void 0),A=r[rn]||null,A=A!=null?A[c]:null,typeof A=="function"&&r.removeEventListener(a,A,C),typeof m=="function")){typeof A!="function"&&A!==null&&(c in r?r[c]=null:r.hasAttribute(c)&&r.removeAttribute(c)),r.addEventListener(a,m,C);break e}c in r?r[c]=m:m===!0?r.setAttribute(c,""):jo(r,c,m)}}}function $t(r,a,c){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",r),qe("load",r);var m=!1,C=!1,A;for(A in c)if(c.hasOwnProperty(A)){var D=c[A];if(D!=null)switch(A){case"src":m=!0;break;case"srcSet":C=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(r,a,A,D,c,null)}}C&&it(r,a,"srcSet",c.srcSet,c,null),m&&it(r,a,"src",c.src,c,null);return;case"input":qe("invalid",r);var H=A=D=C=null,X=null,ae=null;for(m in c)if(c.hasOwnProperty(m)){var de=c[m];if(de!=null)switch(m){case"name":C=de;break;case"type":D=de;break;case"checked":X=de;break;case"defaultChecked":ae=de;break;case"value":A=de;break;case"defaultValue":H=de;break;case"children":case"dangerouslySetInnerHTML":if(de!=null)throw Error(i(137,a));break;default:it(r,a,m,de,c,null)}}cS(r,A,H,X,ae,D,C,!1);return;case"select":qe("invalid",r),m=D=A=null;for(C in c)if(c.hasOwnProperty(C)&&(H=c[C],H!=null))switch(C){case"value":A=H;break;case"defaultValue":D=H;break;case"multiple":m=H;default:it(r,a,C,H,c,null)}a=A,c=D,r.multiple=!!m,a!=null?da(r,!!m,a,!1):c!=null&&da(r,!!m,c,!0);return;case"textarea":qe("invalid",r),A=C=m=null;for(D in c)if(c.hasOwnProperty(D)&&(H=c[D],H!=null))switch(D){case"value":m=H;break;case"defaultValue":C=H;break;case"children":A=H;break;case"dangerouslySetInnerHTML":if(H!=null)throw Error(i(91));break;default:it(r,a,D,H,c,null)}dS(r,m,C,A);return;case"option":for(X in c)c.hasOwnProperty(X)&&(m=c[X],m!=null)&&(X==="selected"?r.selected=m&&typeof m!="function"&&typeof m!="symbol":it(r,a,X,m,c,null));return;case"dialog":qe("beforetoggle",r),qe("toggle",r),qe("cancel",r),qe("close",r);break;case"iframe":case"object":qe("load",r);break;case"video":case"audio":for(m=0;m<Vs.length;m++)qe(Vs[m],r);break;case"image":qe("error",r),qe("load",r);break;case"details":qe("toggle",r);break;case"embed":case"source":case"link":qe("error",r),qe("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(ae in c)if(c.hasOwnProperty(ae)&&(m=c[ae],m!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,a));default:it(r,a,ae,m,c,null)}return;default:if(ku(a)){for(de in c)c.hasOwnProperty(de)&&(m=c[de],m!==void 0&&fh(r,a,de,m,c,void 0));return}}for(H in c)c.hasOwnProperty(H)&&(m=c[H],m!=null&&it(r,a,H,m,c,null))}function U2(r,a,c,m){switch(a){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var C=null,A=null,D=null,H=null,X=null,ae=null,de=null;for(ue in c){var pe=c[ue];if(c.hasOwnProperty(ue)&&pe!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":X=pe;default:m.hasOwnProperty(ue)||it(r,a,ue,null,m,pe)}}for(var se in m){var ue=m[se];if(pe=c[se],m.hasOwnProperty(se)&&(ue!=null||pe!=null))switch(se){case"type":A=ue;break;case"name":C=ue;break;case"checked":ae=ue;break;case"defaultChecked":de=ue;break;case"value":D=ue;break;case"defaultValue":H=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(i(137,a));break;default:ue!==pe&&it(r,a,se,ue,m,pe)}}Cu(r,D,H,X,ae,de,A,C);return;case"select":ue=D=H=se=null;for(A in c)if(X=c[A],c.hasOwnProperty(A)&&X!=null)switch(A){case"value":break;case"multiple":ue=X;default:m.hasOwnProperty(A)||it(r,a,A,null,m,X)}for(C in m)if(A=m[C],X=c[C],m.hasOwnProperty(C)&&(A!=null||X!=null))switch(C){case"value":se=A;break;case"defaultValue":H=A;break;case"multiple":D=A;default:A!==X&&it(r,a,C,A,m,X)}a=H,c=D,m=ue,se!=null?da(r,!!c,se,!1):!!m!=!!c&&(a!=null?da(r,!!c,a,!0):da(r,!!c,c?[]:"",!1));return;case"textarea":ue=se=null;for(H in c)if(C=c[H],c.hasOwnProperty(H)&&C!=null&&!m.hasOwnProperty(H))switch(H){case"value":break;case"children":break;default:it(r,a,H,null,m,C)}for(D in m)if(C=m[D],A=c[D],m.hasOwnProperty(D)&&(C!=null||A!=null))switch(D){case"value":se=C;break;case"defaultValue":ue=C;break;case"children":break;case"dangerouslySetInnerHTML":if(C!=null)throw Error(i(91));break;default:C!==A&&it(r,a,D,C,m,A)}uS(r,se,ue);return;case"option":for(var _e in c)se=c[_e],c.hasOwnProperty(_e)&&se!=null&&!m.hasOwnProperty(_e)&&(_e==="selected"?r.selected=!1:it(r,a,_e,null,m,se));for(X in m)se=m[X],ue=c[X],m.hasOwnProperty(X)&&se!==ue&&(se!=null||ue!=null)&&(X==="selected"?r.selected=se&&typeof se!="function"&&typeof se!="symbol":it(r,a,X,se,m,ue));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 Ne in c)se=c[Ne],c.hasOwnProperty(Ne)&&se!=null&&!m.hasOwnProperty(Ne)&&it(r,a,Ne,null,m,se);for(ae in m)if(se=m[ae],ue=c[ae],m.hasOwnProperty(ae)&&se!==ue&&(se!=null||ue!=null))switch(ae){case"children":case"dangerouslySetInnerHTML":if(se!=null)throw Error(i(137,a));break;default:it(r,a,ae,se,m,ue)}return;default:if(ku(a)){for(var at in c)se=c[at],c.hasOwnProperty(at)&&se!==void 0&&!m.hasOwnProperty(at)&&fh(r,a,at,void 0,m,se);for(de in m)se=m[de],ue=c[de],!m.hasOwnProperty(de)||se===ue||se===void 0&&ue===void 0||fh(r,a,de,se,m,ue);return}}for(var te in c)se=c[te],c.hasOwnProperty(te)&&se!=null&&!m.hasOwnProperty(te)&&it(r,a,te,null,m,se);for(pe in m)se=m[pe],ue=c[pe],!m.hasOwnProperty(pe)||se===ue||se==null&&ue==null||it(r,a,pe,se,m,ue)}function px(r){switch(r){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function j2(){if(typeof performance.getEntriesByType=="function"){for(var r=0,a=0,c=performance.getEntriesByType("resource"),m=0;m<c.length;m++){var C=c[m],A=C.transferSize,D=C.initiatorType,H=C.duration;if(A&&H&&px(D)){for(D=0,H=C.responseEnd,m+=1;m<c.length;m++){var X=c[m],ae=X.startTime;if(ae>H)break;var de=X.transferSize,pe=X.initiatorType;de&&px(pe)&&(X=X.responseEnd,D+=de*(X<H?1:(H-ae)/(X-ae)))}if(--m,a+=8*(A+D)/(C.duration/1e3),r++,10<r)break}}if(0<r)return a/r/1e6}return navigator.connection&&(r=navigator.connection.downlink,typeof r=="number")?r:5}var ph=null,mh=null;function Pl(r){return r.nodeType===9?r:r.ownerDocument}function mx(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 gx(r,a){if(r===0)switch(a){case"svg":return 1;case"math":return 2;default:return 0}return r===1&&a==="foreignObject"?0:r}function gh(r,a){return r==="textarea"||r==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.children=="bigint"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var bh=null;function z2(){var r=window.event;return r&&r.type==="popstate"?r===bh?!1:(bh=r,!0):(bh=null,!1)}var bx=typeof setTimeout=="function"?setTimeout:void 0,H2=typeof clearTimeout=="function"?clearTimeout:void 0,yx=typeof Promise=="function"?Promise:void 0,q2=typeof queueMicrotask=="function"?queueMicrotask:typeof yx<"u"?function(r){return yx.resolve(null).then(r).catch($2)}:bx;function $2(r){setTimeout(function(){throw r})}function ni(r){return r==="head"}function vx(r,a){var c=a,m=0;do{var C=c.nextSibling;if(r.removeChild(c),C&&C.nodeType===8)if(c=C.data,c==="/$"||c==="/&"){if(m===0){r.removeChild(C),qa(a);return}m--}else if(c==="$"||c==="$?"||c==="$~"||c==="$!"||c==="&")m++;else if(c==="html")Ks(r.ownerDocument.documentElement);else if(c==="head"){c=r.ownerDocument.head,Ks(c);for(var A=c.firstChild;A;){var D=A.nextSibling,H=A.nodeName;A[hs]||H==="SCRIPT"||H==="STYLE"||H==="LINK"&&A.rel.toLowerCase()==="stylesheet"||c.removeChild(A),A=D}}else c==="body"&&Ks(r.ownerDocument.body);c=C}while(c);qa(a)}function _x(r,a){var c=r;r=0;do{var m=c.nextSibling;if(c.nodeType===1?a?(c._stashedDisplay=c.style.display,c.style.display="none"):(c.style.display=c._stashedDisplay||"",c.getAttribute("style")===""&&c.removeAttribute("style")):c.nodeType===3&&(a?(c._stashedText=c.nodeValue,c.nodeValue=""):c.nodeValue=c._stashedText||""),m&&m.nodeType===8)if(c=m.data,c==="/$"){if(r===0)break;r--}else c!=="$"&&c!=="$?"&&c!=="$~"&&c!=="$!"||r++;c=m}while(c)}function yh(r){var a=r.firstChild;for(a&&a.nodeType===10&&(a=a.nextSibling);a;){var c=a;switch(a=a.nextSibling,c.nodeName){case"HTML":case"HEAD":case"BODY":yh(c),xu(c);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(c.rel.toLowerCase()==="stylesheet")continue}r.removeChild(c)}}function G2(r,a,c,m){for(;r.nodeType===1;){var C=c;if(r.nodeName.toLowerCase()!==a.toLowerCase()){if(!m&&(r.nodeName!=="INPUT"||r.type!=="hidden"))break}else if(m){if(!r[hs])switch(a){case"meta":if(!r.hasAttribute("itemprop"))break;return r;case"link":if(A=r.getAttribute("rel"),A==="stylesheet"&&r.hasAttribute("data-precedence"))break;if(A!==C.rel||r.getAttribute("href")!==(C.href==null||C.href===""?null:C.href)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin)||r.getAttribute("title")!==(C.title==null?null:C.title))break;return r;case"style":if(r.hasAttribute("data-precedence"))break;return r;case"script":if(A=r.getAttribute("src"),(A!==(C.src==null?null:C.src)||r.getAttribute("type")!==(C.type==null?null:C.type)||r.getAttribute("crossorigin")!==(C.crossOrigin==null?null:C.crossOrigin))&&A&&r.hasAttribute("async")&&!r.hasAttribute("itemprop"))break;return r;default:return r}}else if(a==="input"&&r.type==="hidden"){var A=C.name==null?null:""+C.name;if(C.type==="hidden"&&r.getAttribute("name")===A)return r}else return r;if(r=jn(r.nextSibling),r===null)break}return null}function V2(r,a,c){if(a==="")return null;for(;r.nodeType!==3;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!c||(r=jn(r.nextSibling),r===null))return null;return r}function Sx(r,a){for(;r.nodeType!==8;)if((r.nodeType!==1||r.nodeName!=="INPUT"||r.type!=="hidden")&&!a||(r=jn(r.nextSibling),r===null))return null;return r}function vh(r){return r.data==="$?"||r.data==="$~"}function _h(r){return r.data==="$!"||r.data==="$?"&&r.ownerDocument.readyState!=="loading"}function W2(r,a){var c=r.ownerDocument;if(r.data==="$~")r._reactRetry=a;else if(r.data!=="$?"||c.readyState!=="loading")a();else{var m=function(){a(),c.removeEventListener("DOMContentLoaded",m)};c.addEventListener("DOMContentLoaded",m),r._reactRetry=m}}function jn(r){for(;r!=null;r=r.nextSibling){var a=r.nodeType;if(a===1||a===3)break;if(a===8){if(a=r.data,a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"||a==="F!"||a==="F")break;if(a==="/$"||a==="/&")return null}}return r}var Sh=null;function Ex(r){r=r.nextSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="/$"||c==="/&"){if(a===0)return jn(r.nextSibling);a--}else c!=="$"&&c!=="$!"&&c!=="$?"&&c!=="$~"&&c!=="&"||a++}r=r.nextSibling}return null}function xx(r){r=r.previousSibling;for(var a=0;r;){if(r.nodeType===8){var c=r.data;if(c==="$"||c==="$!"||c==="$?"||c==="$~"||c==="&"){if(a===0)return r;a--}else c!=="/$"&&c!=="/&"||a++}r=r.previousSibling}return null}function wx(r,a,c){switch(a=Pl(c),r){case"html":if(r=a.documentElement,!r)throw Error(i(452));return r;case"head":if(r=a.head,!r)throw Error(i(453));return r;case"body":if(r=a.body,!r)throw Error(i(454));return r;default:throw Error(i(451))}}function Ks(r){for(var a=r.attributes;a.length;)r.removeAttributeNode(a[0]);xu(r)}var zn=new Map,Cx=new Set;function Ul(r){return typeof r.getRootNode=="function"?r.getRootNode():r.nodeType===9?r:r.ownerDocument}var Nr=Z.d;Z.d={f:K2,r:Y2,D:X2,C:Z2,L:Q2,m:J2,X:tM,S:eM,M:nM};function K2(){var r=Nr.f(),a=Nl();return r||a}function Y2(r){var a=la(r);a!==null&&a.tag===5&&a.type==="form"?HE(a):Nr.r(r)}var ja=typeof document>"u"?null:document;function Tx(r,a,c){var m=ja;if(m&&typeof a=="string"&&a){var C=Ln(a);C='link[rel="'+r+'"][href="'+C+'"]',typeof c=="string"&&(C+='[crossorigin="'+c+'"]'),Cx.has(C)||(Cx.add(C),r={rel:r,crossOrigin:c,href:a},m.querySelector(C)===null&&(a=m.createElement("link"),$t(a,"link",r),Ft(a),m.head.appendChild(a)))}}function X2(r){Nr.D(r),Tx("dns-prefetch",r,null)}function Z2(r,a){Nr.C(r,a),Tx("preconnect",r,a)}function Q2(r,a,c){Nr.L(r,a,c);var m=ja;if(m&&r&&a){var C='link[rel="preload"][as="'+Ln(a)+'"]';a==="image"&&c&&c.imageSrcSet?(C+='[imagesrcset="'+Ln(c.imageSrcSet)+'"]',typeof c.imageSizes=="string"&&(C+='[imagesizes="'+Ln(c.imageSizes)+'"]')):C+='[href="'+Ln(r)+'"]';var A=C;switch(a){case"style":A=za(r);break;case"script":A=Ha(r)}zn.has(A)||(r=f({rel:"preload",href:a==="image"&&c&&c.imageSrcSet?void 0:r,as:a},c),zn.set(A,r),m.querySelector(C)!==null||a==="style"&&m.querySelector(Ys(A))||a==="script"&&m.querySelector(Xs(A))||(a=m.createElement("link"),$t(a,"link",r),Ft(a),m.head.appendChild(a)))}}function J2(r,a){Nr.m(r,a);var c=ja;if(c&&r){var m=a&&typeof a.as=="string"?a.as:"script",C='link[rel="modulepreload"][as="'+Ln(m)+'"][href="'+Ln(r)+'"]',A=C;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":A=Ha(r)}if(!zn.has(A)&&(r=f({rel:"modulepreload",href:r},a),zn.set(A,r),c.querySelector(C)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(c.querySelector(Xs(A)))return}m=c.createElement("link"),$t(m,"link",r),Ft(m),c.head.appendChild(m)}}}function eM(r,a,c){Nr.S(r,a,c);var m=ja;if(m&&r){var C=ca(m).hoistableStyles,A=za(r);a=a||"default";var D=C.get(A);if(!D){var H={loading:0,preload:null};if(D=m.querySelector(Ys(A)))H.loading=5;else{r=f({rel:"stylesheet",href:r,"data-precedence":a},c),(c=zn.get(A))&&Eh(r,c);var X=D=m.createElement("link");Ft(X),$t(X,"link",r),X._p=new Promise(function(ae,de){X.onload=ae,X.onerror=de}),X.addEventListener("load",function(){H.loading|=1}),X.addEventListener("error",function(){H.loading|=2}),H.loading|=4,jl(D,a,m)}D={type:"stylesheet",instance:D,count:1,state:H},C.set(A,D)}}}function tM(r,a){Nr.X(r,a);var c=ja;if(c&&r){var m=ca(c).hoistableScripts,C=Ha(r),A=m.get(C);A||(A=c.querySelector(Xs(C)),A||(r=f({src:r,async:!0},a),(a=zn.get(C))&&xh(r,a),A=c.createElement("script"),Ft(A),$t(A,"link",r),c.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function nM(r,a){Nr.M(r,a);var c=ja;if(c&&r){var m=ca(c).hoistableScripts,C=Ha(r),A=m.get(C);A||(A=c.querySelector(Xs(C)),A||(r=f({src:r,async:!0,type:"module"},a),(a=zn.get(C))&&xh(r,a),A=c.createElement("script"),Ft(A),$t(A,"link",r),c.head.appendChild(A)),A={type:"script",instance:A,count:1,state:null},m.set(C,A))}}function kx(r,a,c,m){var C=(C=ne.current)?Ul(C):null;if(!C)throw Error(i(446));switch(r){case"meta":case"title":return null;case"style":return typeof c.precedence=="string"&&typeof c.href=="string"?(a=za(c.href),c=ca(C).hoistableStyles,m=c.get(a),m||(m={type:"style",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(c.rel==="stylesheet"&&typeof c.href=="string"&&typeof c.precedence=="string"){r=za(c.href);var A=ca(C).hoistableStyles,D=A.get(r);if(D||(C=C.ownerDocument||C,D={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},A.set(r,D),(A=C.querySelector(Ys(r)))&&!A._p&&(D.instance=A,D.state.loading=5),zn.has(r)||(c={rel:"preload",as:"style",href:c.href,crossOrigin:c.crossOrigin,integrity:c.integrity,media:c.media,hrefLang:c.hrefLang,referrerPolicy:c.referrerPolicy},zn.set(r,c),A||rM(C,r,c,D.state))),a&&m===null)throw Error(i(528,""));return D}if(a&&m!==null)throw Error(i(529,""));return null;case"script":return a=c.async,c=c.src,typeof c=="string"&&a&&typeof a!="function"&&typeof a!="symbol"?(a=Ha(c),c=ca(C).hoistableScripts,m=c.get(a),m||(m={type:"script",instance:null,count:0,state:null},c.set(a,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,r))}}function za(r){return'href="'+Ln(r)+'"'}function Ys(r){return'link[rel="stylesheet"]['+r+"]"}function Ax(r){return f({},r,{"data-precedence":r.precedence,precedence:null})}function rM(r,a,c,m){r.querySelector('link[rel="preload"][as="style"]['+a+"]")?m.loading=1:(a=r.createElement("link"),m.preload=a,a.addEventListener("load",function(){return m.loading|=1}),a.addEventListener("error",function(){return m.loading|=2}),$t(a,"link",c),Ft(a),r.head.appendChild(a))}function Ha(r){return'[src="'+Ln(r)+'"]'}function Xs(r){return"script[async]"+r}function Rx(r,a,c){if(a.count++,a.instance===null)switch(a.type){case"style":var m=r.querySelector('style[data-href~="'+Ln(c.href)+'"]');if(m)return a.instance=m,Ft(m),m;var C=f({},c,{"data-href":c.href,"data-precedence":c.precedence,href:null,precedence:null});return m=(r.ownerDocument||r).createElement("style"),Ft(m),$t(m,"style",C),jl(m,c.precedence,r),a.instance=m;case"stylesheet":C=za(c.href);var A=r.querySelector(Ys(C));if(A)return a.state.loading|=4,a.instance=A,Ft(A),A;m=Ax(c),(C=zn.get(C))&&Eh(m,C),A=(r.ownerDocument||r).createElement("link"),Ft(A);var D=A;return D._p=new Promise(function(H,X){D.onload=H,D.onerror=X}),$t(A,"link",m),a.state.loading|=4,jl(A,c.precedence,r),a.instance=A;case"script":return A=Ha(c.src),(C=r.querySelector(Xs(A)))?(a.instance=C,Ft(C),C):(m=c,(C=zn.get(A))&&(m=f({},c),xh(m,C)),r=r.ownerDocument||r,C=r.createElement("script"),Ft(C),$t(C,"link",m),r.head.appendChild(C),a.instance=C);case"void":return null;default:throw Error(i(443,a.type))}else a.type==="stylesheet"&&(a.state.loading&4)===0&&(m=a.instance,a.state.loading|=4,jl(m,c.precedence,r));return a.instance}function jl(r,a,c){for(var m=c.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),C=m.length?m[m.length-1]:null,A=C,D=0;D<m.length;D++){var H=m[D];if(H.dataset.precedence===a)A=H;else if(A!==C)break}A?A.parentNode.insertBefore(r,A.nextSibling):(a=c.nodeType===9?c.head:c,a.insertBefore(r,a.firstChild))}function Eh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.title==null&&(r.title=a.title)}function xh(r,a){r.crossOrigin==null&&(r.crossOrigin=a.crossOrigin),r.referrerPolicy==null&&(r.referrerPolicy=a.referrerPolicy),r.integrity==null&&(r.integrity=a.integrity)}var zl=null;function Nx(r,a,c){if(zl===null){var m=new Map,C=zl=new Map;C.set(c,m)}else C=zl,m=C.get(c),m||(m=new Map,C.set(c,m));if(m.has(r))return m;for(m.set(r,null),c=c.getElementsByTagName(r),C=0;C<c.length;C++){var A=c[C];if(!(A[hs]||A[jt]||r==="link"&&A.getAttribute("rel")==="stylesheet")&&A.namespaceURI!=="http://www.w3.org/2000/svg"){var D=A.getAttribute(a)||"";D=r+D;var H=m.get(D);H?H.push(A):m.set(D,[A])}}return m}function Ox(r,a,c){r=r.ownerDocument||r,r.head.insertBefore(c,a==="title"?r.querySelector("head > title"):null)}function iM(r,a,c){if(c===1||a.itemProp!=null)return!1;switch(r){case"meta":case"title":return!0;case"style":if(typeof a.precedence!="string"||typeof a.href!="string"||a.href==="")break;return!0;case"link":if(typeof a.rel!="string"||typeof a.href!="string"||a.href===""||a.onLoad||a.onError)break;return a.rel==="stylesheet"?(r=a.disabled,typeof a.precedence=="string"&&r==null):!0;case"script":if(a.async&&typeof a.async!="function"&&typeof a.async!="symbol"&&!a.onLoad&&!a.onError&&a.src&&typeof a.src=="string")return!0}return!1}function Ix(r){return!(r.type==="stylesheet"&&(r.state.loading&3)===0)}function aM(r,a,c,m){if(c.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(c.state.loading&4)===0){if(c.instance===null){var C=za(m.href),A=a.querySelector(Ys(C));if(A){a=A._p,a!==null&&typeof a=="object"&&typeof a.then=="function"&&(r.count++,r=Hl.bind(r),a.then(r,r)),c.state.loading|=4,c.instance=A,Ft(A);return}A=a.ownerDocument||a,m=Ax(m),(C=zn.get(C))&&Eh(m,C),A=A.createElement("link"),Ft(A);var D=A;D._p=new Promise(function(H,X){D.onload=H,D.onerror=X}),$t(A,"link",m),c.instance=A}r.stylesheets===null&&(r.stylesheets=new Map),r.stylesheets.set(c,a),(a=c.state.preload)&&(c.state.loading&3)===0&&(r.count++,c=Hl.bind(r),a.addEventListener("load",c),a.addEventListener("error",c))}}var wh=0;function sM(r,a){return r.stylesheets&&r.count===0&&$l(r,r.stylesheets),0<r.count||0<r.imgCount?function(c){var m=setTimeout(function(){if(r.stylesheets&&$l(r,r.stylesheets),r.unsuspend){var A=r.unsuspend;r.unsuspend=null,A()}},6e4+a);0<r.imgBytes&&wh===0&&(wh=62500*j2());var C=setTimeout(function(){if(r.waitingForImages=!1,r.count===0&&(r.stylesheets&&$l(r,r.stylesheets),r.unsuspend)){var A=r.unsuspend;r.unsuspend=null,A()}},(r.imgBytes>wh?50:800)+a);return r.unsuspend=c,function(){r.unsuspend=null,clearTimeout(m),clearTimeout(C)}}:null}function Hl(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)$l(this,this.stylesheets);else if(this.unsuspend){var r=this.unsuspend;this.unsuspend=null,r()}}}var ql=null;function $l(r,a){r.stylesheets=null,r.unsuspend!==null&&(r.count++,ql=new Map,a.forEach(oM,r),ql=null,Hl.call(r))}function oM(r,a){if(!(a.state.loading&4)){var c=ql.get(r);if(c)var m=c.get(null);else{c=new Map,ql.set(r,c);for(var C=r.querySelectorAll("link[data-precedence],style[data-precedence]"),A=0;A<C.length;A++){var D=C[A];(D.nodeName==="LINK"||D.getAttribute("media")!=="not all")&&(c.set(D.dataset.precedence,D),m=D)}m&&c.set(null,m)}C=a.instance,D=C.getAttribute("data-precedence"),A=c.get(D)||m,A===m&&c.set(null,C),c.set(D,C),this.count++,m=Hl.bind(this),C.addEventListener("load",m),C.addEventListener("error",m),A?A.parentNode.insertBefore(C,A.nextSibling):(r=r.nodeType===9?r.head:r,r.insertBefore(C,r.firstChild)),a.state.loading|=4}}var Zs={$$typeof:_,Provider:null,Consumer:null,_currentValue:Q,_currentValue2:Q,_threadCount:0};function lM(r,a,c,m,C,A,D,H,X){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=vu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vu(0),this.hiddenUpdates=vu(null),this.identifierPrefix=m,this.onUncaughtError=C,this.onCaughtError=A,this.onRecoverableError=D,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function Lx(r,a,c,m,C,A,D,H,X,ae,de,pe){return r=new lM(r,a,c,D,X,ae,de,pe,H),a=1,A===!0&&(a|=24),A=vn(3,null,null,a),r.current=A,A.stateNode=r,a=rd(),a.refCount++,r.pooledCache=a,a.refCount++,A.memoizedState={element:m,isDehydrated:c,cache:a},od(A),r}function Dx(r){return r?(r=va,r):va}function Mx(r,a,c,m,C,A){C=Dx(C),m.context===null?m.context=C:m.pendingContext=C,m=Gr(a),m.payload={element:c},A=A===void 0?null:A,A!==null&&(m.callback=A),c=Vr(r,m,a),c!==null&&(un(c,r,a),Rs(c,r,a))}function Bx(r,a){if(r=r.memoizedState,r!==null&&r.dehydrated!==null){var c=r.retryLane;r.retryLane=c!==0&&c<a?c:a}}function Ch(r,a){Bx(r,a),(r=r.alternate)&&Bx(r,a)}function Fx(r){if(r.tag===13||r.tag===31){var a=ki(r,67108864);a!==null&&un(a,r,67108864),Ch(r,67108864)}}function Px(r){if(r.tag===13||r.tag===31){var a=wn();a=_u(a);var c=ki(r,a);c!==null&&un(c,r,a),Ch(r,a)}}var Gl=!0;function cM(r,a,c,m){var C=W.T;W.T=null;var A=Z.p;try{Z.p=2,Th(r,a,c,m)}finally{Z.p=A,W.T=C}}function uM(r,a,c,m){var C=W.T;W.T=null;var A=Z.p;try{Z.p=8,Th(r,a,c,m)}finally{Z.p=A,W.T=C}}function Th(r,a,c,m){if(Gl){var C=kh(m);if(C===null)hh(r,a,m,Vl,c),jx(r,m);else if(hM(C,r,a,c,m))m.stopPropagation();else if(jx(r,m),a&4&&-1<dM.indexOf(r)){for(;C!==null;){var A=la(C);if(A!==null)switch(A.tag){case 3:if(A=A.stateNode,A.current.memoizedState.isDehydrated){var D=tr(A.pendingLanes);if(D!==0){var H=A;for(H.pendingLanes|=2,H.entangledLanes|=2;D;){var X=1<<31-Je(D);H.entanglements[1]|=X,D&=~X}ar(A),(Qe&6)===0&&(Al=Re()+500,Gs(0))}}break;case 31:case 13:H=ki(A,2),H!==null&&un(H,A,2),Nl(),Ch(A,2)}if(A=kh(m),A===null&&hh(r,a,m,Vl,c),A===C)break;C=A}C!==null&&m.stopPropagation()}else hh(r,a,m,null,c)}}function kh(r){return r=Ru(r),Ah(r)}var Vl=null;function Ah(r){if(Vl=null,r=oa(r),r!==null){var a=l(r);if(a===null)r=null;else{var c=a.tag;if(c===13){if(r=u(a),r!==null)return r;r=null}else if(c===31){if(r=o(a),r!==null)return r;r=null}else if(c===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;r=null}else a!==r&&(r=null)}}return Vl=r,null}function Ux(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(we()){case oe:return 2;case me:return 8;case ve:case Te:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Rh=!1,ri=null,ii=null,ai=null,Qs=new Map,Js=new Map,si=[],dM="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 jx(r,a){switch(r){case"focusin":case"focusout":ri=null;break;case"dragenter":case"dragleave":ii=null;break;case"mouseover":case"mouseout":ai=null;break;case"pointerover":case"pointerout":Qs.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(a.pointerId)}}function eo(r,a,c,m,C,A){return r===null||r.nativeEvent!==A?(r={blockedOn:a,domEventName:c,eventSystemFlags:m,nativeEvent:A,targetContainers:[C]},a!==null&&(a=la(a),a!==null&&Fx(a)),r):(r.eventSystemFlags|=m,a=r.targetContainers,C!==null&&a.indexOf(C)===-1&&a.push(C),r)}function hM(r,a,c,m,C){switch(a){case"focusin":return ri=eo(ri,r,a,c,m,C),!0;case"dragenter":return ii=eo(ii,r,a,c,m,C),!0;case"mouseover":return ai=eo(ai,r,a,c,m,C),!0;case"pointerover":var A=C.pointerId;return Qs.set(A,eo(Qs.get(A)||null,r,a,c,m,C)),!0;case"gotpointercapture":return A=C.pointerId,Js.set(A,eo(Js.get(A)||null,r,a,c,m,C)),!0}return!1}function zx(r){var a=oa(r.target);if(a!==null){var c=l(a);if(c!==null){if(a=c.tag,a===13){if(a=u(c),a!==null){r.blockedOn=a,tS(r.priority,function(){Px(c)});return}}else if(a===31){if(a=o(c),a!==null){r.blockedOn=a,tS(r.priority,function(){Px(c)});return}}else if(a===3&&c.stateNode.current.memoizedState.isDehydrated){r.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}r.blockedOn=null}function Wl(r){if(r.blockedOn!==null)return!1;for(var a=r.targetContainers;0<a.length;){var c=kh(r.nativeEvent);if(c===null){c=r.nativeEvent;var m=new c.constructor(c.type,c);Au=m,c.target.dispatchEvent(m),Au=null}else return a=la(c),a!==null&&Fx(a),r.blockedOn=c,!1;a.shift()}return!0}function Hx(r,a,c){Wl(r)&&c.delete(a)}function fM(){Rh=!1,ri!==null&&Wl(ri)&&(ri=null),ii!==null&&Wl(ii)&&(ii=null),ai!==null&&Wl(ai)&&(ai=null),Qs.forEach(Hx),Js.forEach(Hx)}function Kl(r,a){r.blockedOn===a&&(r.blockedOn=null,Rh||(Rh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fM)))}var Yl=null;function qx(r){Yl!==r&&(Yl=r,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Yl===r&&(Yl=null);for(var a=0;a<r.length;a+=3){var c=r[a],m=r[a+1],C=r[a+2];if(typeof m!="function"){if(Ah(m||c)===null)continue;break}var A=la(c);A!==null&&(r.splice(a,3),a-=3,kd(A,{pending:!0,data:C,method:c.method,action:m},m,C))}}))}function qa(r){function a(X){return Kl(X,r)}ri!==null&&Kl(ri,r),ii!==null&&Kl(ii,r),ai!==null&&Kl(ai,r),Qs.forEach(a),Js.forEach(a);for(var c=0;c<si.length;c++){var m=si[c];m.blockedOn===r&&(m.blockedOn=null)}for(;0<si.length&&(c=si[0],c.blockedOn===null);)zx(c),c.blockedOn===null&&si.shift();if(c=(r.ownerDocument||r).$$reactFormReplay,c!=null)for(m=0;m<c.length;m+=3){var C=c[m],A=c[m+1],D=C[rn]||null;if(typeof A=="function")D||qx(c);else if(D){var H=null;if(A&&A.hasAttribute("formAction")){if(C=A,D=A[rn]||null)H=D.formAction;else if(Ah(C)!==null)continue}else H=D.action;typeof H=="function"?c[m+1]=H:(c.splice(m,3),m-=3),qx(c)}}}function $x(){function r(A){A.canIntercept&&A.info==="react-transition"&&A.intercept({handler:function(){return new Promise(function(D){return C=D})},focusReset:"manual",scroll:"manual"})}function a(){C!==null&&(C(),C=null),m||setTimeout(c,20)}function c(){if(!m&&!navigation.transition){var A=navigation.currentEntry;A&&A.url!=null&&navigation.navigate(A.url,{state:A.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,C=null;return navigation.addEventListener("navigate",r),navigation.addEventListener("navigatesuccess",a),navigation.addEventListener("navigateerror",a),setTimeout(c,100),function(){m=!0,navigation.removeEventListener("navigate",r),navigation.removeEventListener("navigatesuccess",a),navigation.removeEventListener("navigateerror",a),C!==null&&(C(),C=null)}}}function Nh(r){this._internalRoot=r}Xl.prototype.render=Nh.prototype.render=function(r){var a=this._internalRoot;if(a===null)throw Error(i(409));var c=a.current,m=wn();Mx(c,m,r,a,null,null)},Xl.prototype.unmount=Nh.prototype.unmount=function(){var r=this._internalRoot;if(r!==null){this._internalRoot=null;var a=r.containerInfo;Mx(r.current,2,null,r,null,null),Nl(),a[sa]=null}};function Xl(r){this._internalRoot=r}Xl.prototype.unstable_scheduleHydration=function(r){if(r){var a=eS();r={blockedOn:null,target:r,priority:a};for(var c=0;c<si.length&&a!==0&&a<si[c].priority;c++);si.splice(c,0,r),c===0&&zx(r)}};var Gx=t.version;if(Gx!=="19.2.3")throw Error(i(527,Gx,"19.2.3"));Z.findDOMNode=function(r){var a=r._reactInternals;if(a===void 0)throw typeof r.render=="function"?Error(i(188)):(r=Object.keys(r).join(","),Error(i(268,r)));return r=h(a),r=r!==null?p(r):null,r=r===null?null:r.stateNode,r};var pM={bundleType:0,version:"19.2.3",rendererPackageName:"react-dom",currentDispatcherRef:W,reconcilerVersion:"19.2.3"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Zl=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zl.isDisabled&&Zl.supportsFiber)try{mt=Zl.inject(pM),st=Zl}catch{}}return no.createRoot=function(r,a){if(!s(r))throw Error(i(299));var c=!1,m="",C=QE,A=JE,D=e0;return a!=null&&(a.unstable_strictMode===!0&&(c=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(C=a.onUncaughtError),a.onCaughtError!==void 0&&(A=a.onCaughtError),a.onRecoverableError!==void 0&&(D=a.onRecoverableError)),a=Lx(r,1,!1,null,null,c,m,null,C,A,D,$x),r[sa]=a.current,dh(r),new Nh(a)},no.hydrateRoot=function(r,a,c){if(!s(r))throw Error(i(299));var m=!1,C="",A=QE,D=JE,H=e0,X=null;return c!=null&&(c.unstable_strictMode===!0&&(m=!0),c.identifierPrefix!==void 0&&(C=c.identifierPrefix),c.onUncaughtError!==void 0&&(A=c.onUncaughtError),c.onCaughtError!==void 0&&(D=c.onCaughtError),c.onRecoverableError!==void 0&&(H=c.onRecoverableError),c.formState!==void 0&&(X=c.formState)),a=Lx(r,1,!0,a,c??null,m,C,X,A,D,H,$x),a.context=Dx(null),c=a.current,m=wn(),m=_u(m),C=Gr(m),C.callback=null,Vr(c,C,m),c=m,a.current.lanes=c,ds(a,c),ar(a),r[sa]=a.current,dh(r),new Xl(a)},no.version="19.2.3",no}var tw;function xM(){if(tw)return Lh.exports;tw=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(),Lh.exports=EM(),Lh.exports}var wM=xM(),rs=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(){}},CM={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},TM=class{#e=CM;#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)}},Hi=new TM;function kM(e){setTimeout(e,0)}var Ki=typeof window>"u"||"Deno"in globalThis;function Jt(){}function AM(e,t){return typeof e=="function"?e(t):e}function sv(e){return typeof e=="number"&&e>=0&&e!==1/0}function JN(e,t){return Math.max(e+(t||0)-Date.now(),0)}function fi(e,t){return typeof e=="function"?e(t):e}function qn(e,t){return typeof e=="function"?e(t):e}function nw(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:l,queryKey:u,stale:o}=e;if(u){if(i){if(t.queryHash!==Vv(u,t.options))return!1}else if(!_o(t.queryKey,u))return!1}if(n!=="all"){const d=t.isActive();if(n==="active"&&!d||n==="inactive"&&d)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||s&&s!==t.state.fetchStatus||l&&!l(t))}function rw(e,t){const{exact:n,status:i,predicate:s,mutationKey:l}=e;if(l){if(!t.options.mutationKey)return!1;if(n){if(Yi(t.options.mutationKey)!==Yi(l))return!1}else if(!_o(t.options.mutationKey,l))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function Vv(e,t){return(t?.queryKeyHashFn||Yi)(e)}function Yi(e){return JSON.stringify(e,(t,n)=>ov(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function _o(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>_o(e[n],t[n])):!1}var RM=Object.prototype.hasOwnProperty;function eO(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=iw(e)&&iw(t);if(!i&&!(ov(e)&&ov(t)))return t;const l=(i?e:Object.keys(e)).length,u=i?t:Object.keys(t),o=u.length,d=i?new Array(o):{};let h=0;for(let p=0;p<o;p++){const f=i?p:u[p],g=e[f],b=t[f];if(g===b){d[f]=g,(i?p<l:RM.call(e,f))&&h++;continue}if(g===null||b===null||typeof g!="object"||typeof b!="object"){d[f]=b;continue}const x=eO(g,b,n+1);d[f]=x,x===g&&h++}return l===o&&h===l?e:d}function xc(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 iw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ov(e){if(!aw(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!aw(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function aw(e){return Object.prototype.toString.call(e)==="[object Object]"}function NM(e){return new Promise(t=>{Hi.setTimeout(t,e)})}function lv(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?eO(e,t):t}function OM(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function IM(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var Wv=Symbol();function tO(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Wv?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Kv(e,t){return typeof e=="function"?e(...t):!!e}function LM(e,t,n){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??=t(),i||(i=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var DM=class extends rs{#e;#t;#n;constructor(){super(),this.#n=e=>{if(!Ki&&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"}},Yv=new DM;function cv(){let e,t;const n=new Promise((s,l)=>{e=s,t=l});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var MM=kM;function BM(){let e=[],t=0,n=o=>{o()},i=o=>{o()},s=MM;const l=o=>{t?e.push(o):s(()=>{n(o)})},u=()=>{const o=e;e=[],o.length&&s(()=>{i(()=>{o.forEach(d=>{n(d)})})})};return{batch:o=>{let d;t++;try{d=o()}finally{t--,t||u()}return d},batchCalls:o=>(...d)=>{l(()=>{o(...d)})},schedule:l,setNotifyFunction:o=>{n=o},setBatchNotifyFunction:o=>{i=o},setScheduler:o=>{s=o}}}var Mt=BM(),FM=class extends rs{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(!Ki&&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}},wc=new FM;function PM(e){return Math.min(1e3*2**e,3e4)}function nO(e){return(e??"online")==="online"?wc.isOnline():!0}var uv=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function rO(e){let t=!1,n=0,i;const s=cv(),l=()=>s.status!=="pending",u=E=>{if(!l()){const y=new uv(E);g(y),e.onCancel?.(y)}},o=()=>{t=!0},d=()=>{t=!1},h=()=>Yv.isFocused()&&(e.networkMode==="always"||wc.isOnline())&&e.canRun(),p=()=>nO(e.networkMode)&&e.canRun(),f=E=>{l()||(i?.(),s.resolve(E))},g=E=>{l()||(i?.(),s.reject(E))},b=()=>new Promise(E=>{i=y=>{(l()||h())&&E(y)},e.onPause?.()}).then(()=>{i=void 0,l()||e.onContinue?.()}),x=()=>{if(l())return;let E;const y=n===0?e.initialPromise:void 0;try{E=y??e.fn()}catch(S){E=Promise.reject(S)}Promise.resolve(E).then(f).catch(S=>{if(l())return;const v=e.retry??(Ki?0:3),_=e.retryDelay??PM,w=typeof _=="function"?_(n,S):_,N=v===!0||typeof v=="number"&&n<v||typeof v=="function"&&v(n,S);if(t||!N){g(S);return}n++,e.onFail?.(n,S),NM(w).then(()=>h()?void 0:b()).then(()=>{t?g(S):x()})})};return{promise:s,status:()=>s.status,cancel:u,continue:()=>(i?.(),s),cancelRetry:o,continueRetry:d,canStart:p,start:()=>(p()?x():b().then(x),s)}}var iO=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),sv(this.gcTime)&&(this.#e=Hi.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ki?1/0:300*1e3))}clearGcTimeout(){this.#e&&(Hi.clearTimeout(this.#e),this.#e=void 0)}},UM=class extends iO{#e;#t;#n;#i;#r;#s;#o;constructor(e){super(),this.#o=!1,this.#s=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#n=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#e=ow(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=ow(this.options);t.data!==void 0&&(this.setState(sw(t.data,t.dataUpdatedAt)),this.#e=t)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#n.remove(this)}setData(e,t){const n=lv(this.state.data,e,this.options);return this.#a({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.#a({type:"setState",state:e,setStateOptions:t})}cancel(e){const t=this.#r?.promise;return this.#r?.cancel(e),t?t.then(Jt).catch(Jt):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===Wv||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>fi(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:!JN(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.#a({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 o=this.observers.find(d=>d.options.queryFn);o&&this.setOptions(o.options)}const n=new AbortController,i=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(this.#o=!0,n.signal)})},s=()=>{const o=tO(this.options,t),h=(()=>{const p={client:this.#i,queryKey:this.queryKey,meta:this.meta};return i(p),p})();return this.#o=!1,this.options.persister?this.options.persister(o,h,this):o(h)},u=(()=>{const o={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:s};return i(o),o})();this.options.behavior?.onFetch(u,this),this.#t=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==u.fetchOptions?.meta)&&this.#a({type:"fetch",meta:u.fetchOptions?.meta}),this.#r=rO({initialPromise:t?.initialPromise,fn:u.fetchFn,onCancel:o=>{o instanceof uv&&o.revert&&this.setState({...this.#t,fetchStatus:"idle"}),n.abort()},onFail:(o,d)=>{this.#a({type:"failed",failureCount:o,error:d})},onPause:()=>{this.#a({type:"pause"})},onContinue:()=>{this.#a({type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0});try{const o=await this.#r.start();if(o===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(o),this.#n.config.onSuccess?.(o,this),this.#n.config.onSettled?.(o,this.state.error,this),o}catch(o){if(o instanceof uv){if(o.silent)return this.#r.promise;if(o.revert){if(this.state.data===void 0)throw o;return this.state.data}}throw this.#a({type:"error",error:o}),this.#n.config.onError?.(o,this),this.#n.config.onSettled?.(this.state.data,o,this),o}finally{this.scheduleGc()}}#a(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,...aO(n.data,this.options),fetchMeta:e.meta??null};case"success":const i={...n,...sw(e.data,e.dataUpdatedAt),dataUpdateCount:n.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#t=e.manual?i:void 0,i;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",isInvalidated:!0};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),Mt.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate()}),this.#n.notify({query:this,type:"updated",action:e})})}};function aO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:nO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function sw(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ow(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var jM=class extends rs{constructor(e,t){super(),this.options=t,this.#e=e,this.#a=null,this.#o=cv(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#i=void 0;#r;#s;#o;#a;#m;#h;#f;#c;#u;#l;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),lw(this.#t,this.options)?this.#d():this.updateResult(),this.#v())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return dv(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return dv(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#_(),this.#S(),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.#E(),this.#t.setOptions(this.options),t._defaulted&&!xc(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&cw(this.#t,n,this.options,t)&&this.#d(),this.updateResult(),i&&(this.#t!==n||qn(this.options.enabled,this.#t)!==qn(t.enabled,this.#t)||fi(this.options.staleTime,this.#t)!==fi(t.staleTime,this.#t))&&this.#g();const s=this.#b();i&&(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 HM(this,n)&&(this.#i=n,this.#s=this.options,this.#r=this.#t.state),n}getCurrentResult(){return this.#i}trackResult(e,t){return new Proxy(e,{get:(n,i)=>(this.trackProp(i),t?.(i),i==="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,i))})}trackProp(e){this.#p.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.#i))}#d(e){this.#E();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(Jt)),t}#g(){this.#_();const e=fi(this.options.staleTime,this.#t);if(Ki||this.#i.isStale||!sv(e))return;const n=JN(this.#i.dataUpdatedAt,e)+1;this.#c=Hi.setTimeout(()=>{this.#i.isStale||this.updateResult()},n)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#y(e){this.#S(),this.#l=e,!(Ki||qn(this.options.enabled,this.#t)===!1||!sv(this.#l)||this.#l===0)&&(this.#u=Hi.setInterval(()=>{(this.options.refetchIntervalInBackground||Yv.isFocused())&&this.#d()},this.#l))}#v(){this.#g(),this.#y(this.#b())}#_(){this.#c&&(Hi.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(Hi.clearInterval(this.#u),this.#u=void 0)}createResult(e,t){const n=this.#t,i=this.options,s=this.#i,l=this.#r,u=this.#s,d=e!==n?e.state:this.#n,{state:h}=e;let p={...h},f=!1,g;if(t._optimisticResults){const R=this.hasListeners(),I=!R&&lw(e,t),L=R&&cw(e,n,t,i);(I||L)&&(p={...p,...aO(h.data,e.options)}),t._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:x,status:E}=p;g=p.data;let y=!1;if(t.placeholderData!==void 0&&g===void 0&&E==="pending"){let R;s?.isPlaceholderData&&t.placeholderData===u?.placeholderData?(R=s.data,y=!0):R=typeof t.placeholderData=="function"?t.placeholderData(this.#f?.state.data,this.#f):t.placeholderData,R!==void 0&&(E="success",g=lv(s?.data,R,t),f=!0)}if(t.select&&g!==void 0&&!y)if(s&&g===l?.data&&t.select===this.#m)g=this.#h;else try{this.#m=t.select,g=t.select(g),g=lv(s?.data,g,t),this.#h=g,this.#a=null}catch(R){this.#a=R}this.#a&&(b=this.#a,g=this.#h,x=Date.now(),E="error");const S=p.fetchStatus==="fetching",v=E==="pending",_=E==="error",w=v&&S,N=g!==void 0,O={status:E,fetchStatus:p.fetchStatus,isPending:v,isSuccess:E==="success",isError:_,isInitialLoading:w,isLoading:w,data:g,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:x,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>d.dataUpdateCount||p.errorUpdateCount>d.errorUpdateCount,isFetching:S,isRefetching:S&&!v,isLoadingError:_&&!N,isPaused:p.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:_&&N,isStale:Xv(e,t),refetch:this.refetch,promise:this.#o,isEnabled:qn(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const R=O.data!==void 0,I=O.status==="error"&&!R,L=z=>{I?z.reject(O.error):R&&z.resolve(O.data)},F=()=>{const z=this.#o=O.promise=cv();L(z)},j=this.#o;switch(j.status){case"pending":e.queryHash===n.queryHash&&L(j);break;case"fulfilled":(I||O.data!==j.value)&&F();break;case"rejected":(!I||O.error!==j.reason)&&F();break}}return O}updateResult(){const e=this.#i,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),xc(t,e))return;this.#i=t;const n=()=>{if(!e)return!0;const{notifyOnChangeProps:i}=this.options,s=typeof i=="function"?i():i;if(s==="all"||!s&&!this.#p.size)return!0;const l=new Set(s??this.#p);return this.options.throwOnError&&l.add("error"),Object.keys(this.#i).some(u=>{const o=u;return this.#i[o]!==e[o]&&l.has(o)})};this.#x({listeners:n()})}#E(){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.#v()}#x(e){Mt.batch(()=>{e.listeners&&this.listeners.forEach(t=>{t(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function zM(e,t){return qn(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function lw(e,t){return zM(e,t)||e.state.data!==void 0&&dv(e,t,t.refetchOnMount)}function dv(e,t,n){if(qn(t.enabled,e)!==!1&&fi(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Xv(e,t)}return!1}function cw(e,t,n,i){return(e!==t||qn(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Xv(e,n)}function Xv(e,t){return qn(t.enabled,e)!==!1&&e.isStaleByTime(fi(t.staleTime,e))}function HM(e,t){return!xc(e.getCurrentResult(),t)}function uw(e){return{onFetch:(t,n)=>{const i=t.options,s=t.fetchOptions?.meta?.fetchMore?.direction,l=t.state.data?.pages||[],u=t.state.data?.pageParams||[];let o={pages:[],pageParams:[]},d=0;const h=async()=>{let p=!1;const f=x=>{LM(x,()=>t.signal,()=>p=!0)},g=tO(t.options,t.fetchOptions),b=async(x,E,y)=>{if(p)return Promise.reject();if(E==null&&x.pages.length)return Promise.resolve(x);const v=(()=>{const k={client:t.client,queryKey:t.queryKey,pageParam:E,direction:y?"backward":"forward",meta:t.options.meta};return f(k),k})(),_=await g(v),{maxPages:w}=t.options,N=y?IM:OM;return{pages:N(x.pages,_,w),pageParams:N(x.pageParams,E,w)}};if(s&&l.length){const x=s==="backward",E=x?qM:dw,y={pages:l,pageParams:u},S=E(i,y);o=await b(y,S,x)}else{const x=e??l.length;do{const E=d===0?u[0]??i.initialPageParam:dw(i,o);if(d>0&&E==null)break;o=await b(o,E),d++}while(d<x)}return o};t.options.persister?t.fetchFn=()=>t.options.persister?.(h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=h}}}function dw(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function qM(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var $M=class extends iO{#e;#t;#n;#i;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||sO(),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.#i?.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.#i=rO({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(l,u)=>{this.#r({type:"failed",failureCount:l,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 i=this.state.status==="pending",s=!this.#i.canStart();try{if(i)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 l=await this.#i.start();return await this.#n.config.onSuccess?.(l,e,this.state.context,this,n),await this.options.onSuccess?.(l,e,this.state.context,n),await this.#n.config.onSettled?.(l,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(l,null,e,this.state.context,n),this.#r({type:"success",data:l}),l}catch(l){try{await this.#n.config.onError?.(l,e,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onError?.(l,e,this.state.context,n)}catch(u){Promise.reject(u)}try{await this.#n.config.onSettled?.(void 0,l,this.state.variables,this.state.context,this,n)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,l,e,this.state.context,n)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:l}),l}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),Mt.batch(()=>{this.#t.forEach(n=>{n.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:"updated",action:e})})}};function sO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var GM=class extends rs{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 i=new $M({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:n});return this.add(i),i}add(e){this.#e.add(e);const t=Ql(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=Ql(e);if(typeof t=="string"){const n=this.#t.get(t);if(n)if(n.length>1){const i=n.indexOf(e);i!==-1&&n.splice(i,1)}else n[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=Ql(e);if(typeof t=="string"){const i=this.#t.get(t)?.find(s=>s.state.status==="pending");return!i||i===e}else return!0}runNext(e){const t=Ql(e);return typeof t=="string"?this.#t.get(t)?.find(i=>i!==e&&i.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){Mt.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=>rw(t,n))}findAll(e={}){return this.getAll().filter(t=>rw(e,t))}notify(e){Mt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(t=>t.state.isPaused);return Mt.batch(()=>Promise.all(e.map(t=>t.continue().catch(Jt))))}};function Ql(e){return e.options.scope?.id}var VM=class extends rs{#e;#t=void 0;#n;#i;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),xc(this.options,n)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#n,observer:this}),n?.mutationKey&&this.options.mutationKey&&Yi(n.mutationKey)!==Yi(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.#i=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??sO();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){Mt.batch(()=>{if(this.#i&&this.hasListeners()){const n=this.#t.variables,i=this.#t.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(t.data,null,n,i,s)}catch(l){Promise.reject(l)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,n,i,s)}catch(l){Promise.reject(l)}try{this.#i.onSettled?.(void 0,t.error,n,i,s)}catch(l){Promise.reject(l)}}}this.listeners.forEach(n=>{n(this.#t)})})}},WM=class extends rs{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){const i=t.queryKey,s=t.queryHash??Vv(i,t);let l=this.get(s);return l||(l=new UM({client:e,queryKey:i,queryHash:s,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(l)),l}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(){Mt.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=>nw(t,n))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(n=>nw(e,n)):t}notify(e){Mt.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Mt.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Mt.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},KM=class{#e;#t;#n;#i;#r;#s;#o;#a;constructor(e={}){this.#e=e.queryCache||new WM,this.#t=e.mutationCache||new GM,this.#n=e.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#s=0}mount(){this.#s++,this.#s===1&&(this.#o=Yv.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#a=wc.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#s--,this.#s===0&&(this.#o?.(),this.#o=void 0,this.#a?.(),this.#a=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),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(fi(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#e.findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),l=this.#e.get(i.queryHash)?.state.data,u=AM(t,l);if(u!==void 0)return this.#e.build(this,i).setData(u,{...n,manual:!0})}setQueriesData(e,t,n){return Mt.batch(()=>this.#e.findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#e.get(t.queryHash)?.state}removeQueries(e){const t=this.#e;Mt.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=this.#e;return Mt.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=Mt.batch(()=>this.#e.findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(Jt).catch(Jt)}invalidateQueries(e,t={}){return Mt.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},i=Mt.batch(()=>this.#e.findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let l=s.fetch(void 0,n);return n.throwOnError||(l=l.catch(Jt)),s.state.fetchStatus==="paused"?Promise.resolve():l}));return Promise.all(i).then(Jt)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=this.#e.build(this,t);return n.isStaleByTime(fi(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Jt).catch(Jt)}fetchInfiniteQuery(e){return e.behavior=uw(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Jt).catch(Jt)}ensureInfiniteQueryData(e){return e.behavior=uw(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return wc.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.#i.set(Yi(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#i.values()],n={};return t.forEach(i=>{_o(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){this.#r.set(Yi(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#r.values()],n={};return t.forEach(i=>{_o(e,i.mutationKey)&&Object.assign(n,i.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=Vv(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===Wv&&(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()}},oO=G.createContext(void 0),mn=e=>{const t=G.useContext(oO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},YM=({client:e,children:t})=>(G.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),T.jsx(oO.Provider,{value:e,children:t})),lO=G.createContext(!1),XM=()=>G.useContext(lO);lO.Provider;function ZM(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var QM=G.createContext(ZM()),JM=()=>G.useContext(QM),eB=(e,t,n)=>{const i=n?.state.error&&typeof e.throwOnError=="function"?Kv(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},tB=e=>{G.useEffect(()=>{e.clearReset()},[e])},nB=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||Kv(n,[e.error,i])),rB=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},iB=(e,t)=>e.isLoading&&e.isFetching&&!t,aB=(e,t)=>e?.suspense&&t.isPending,hw=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function sB(e,t,n){const i=XM(),s=JM(),l=mn(),u=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(u);const o=l.getQueryCache().get(u.queryHash);u._optimisticResults=i?"isRestoring":"optimistic",rB(u),eB(u,s,o),tB(s);const d=!l.getQueryCache().get(u.queryHash),[h]=G.useState(()=>new t(l,u)),p=h.getOptimisticResult(u),f=!i&&e.subscribed!==!1;if(G.useSyncExternalStore(G.useCallback(g=>{const b=f?h.subscribe(Mt.batchCalls(g)):Jt;return h.updateResult(),b},[h,f]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),G.useEffect(()=>{h.setOptions(u)},[u,h]),aB(u,p))throw hw(u,h,s);if(nB({result:p,errorResetBoundary:s,throwOnError:u.throwOnError,query:o,suspense:u.suspense}))throw p.error;return l.getDefaultOptions().queries?._experimental_afterQuery?.(u,p),u.experimental_prefetchInRender&&!Ki&&iB(p,i)&&(d?hw(u,h,s):o?.promise)?.catch(Jt).finally(()=>{h.updateResult()}),u.notifyOnChangeProps?p:h.trackResult(p)}function bi(e,t){return sB(e,jM)}function Qn(e,t){const n=mn(),[i]=G.useState(()=>new VM(n,e));G.useEffect(()=>{i.setOptions(e)},[i,e]);const s=G.useSyncExternalStore(G.useCallback(u=>i.subscribe(Mt.batchCalls(u)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),l=G.useCallback((u,o)=>{i.mutate(u,o).catch(Jt)},[i]);if(s.error&&Kv(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:l,mutateAsync:s.mutate}}const hv=new WeakMap,oB=new WeakMap,Cc={current:[]};let Fh=!1,po=0;const fo=new Set,Jl=new Map;function cO(e){for(const t of e){if(Cc.current.includes(t))continue;Cc.current.push(t),t.recompute();const n=oB.get(t);if(n)for(const i of n){const s=hv.get(i);s?.length&&cO(s)}}}function lB(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function cB(e){const t={prevVal:e.prevState,currentVal:e.state};for(const n of e.listeners)n(t)}function uO(e){if(po>0&&!Jl.has(e)&&Jl.set(e,e.prevState),fo.add(e),!(po>0)&&!Fh)try{for(Fh=!0;fo.size>0;){const t=Array.from(fo);fo.clear();for(const n of t){const i=Jl.get(n)??n.prevState;n.prevState=i,lB(n)}for(const n of t){const i=hv.get(n);i&&(Cc.current.push(n),cO(i))}for(const n of t){const i=hv.get(n);if(i)for(const s of i)cB(s)}}}finally{Fh=!1,Cc.current=[],Jl.clear()}}function mo(e){po++;try{e()}finally{if(po--,po===0){const t=fo.values().next().value;t&&uO(t)}}}function uB(e){return typeof e=="function"}class dB{constructor(t,n){this.listeners=new Set,this.subscribe=i=>{var s,l;this.listeners.add(i);const u=(l=(s=this.options)==null?void 0:s.onSubscribe)==null?void 0:l.call(s,i,this);return()=>{this.listeners.delete(i),u?.()}},this.prevState=t,this.state=t,this.options=n}setState(t){var n,i,s;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(t):uB(t)?this.state=t(this.prevState):this.state=t,(s=(i=this.options)==null?void 0:i.onUpdate)==null||s.call(i),uO(this)}}const pi="__TSR_index",fw="popstate",pw="beforeunload";function hB(e){let t=e.getLocation();const n=new Set,i=u=>{t=e.getLocation(),n.forEach(o=>o({location:t,action:u}))},s=u=>{e.notifyOnIndexChange??!0?i(u):t=e.getLocation()},l=async({task:u,navigateOpts:o,...d})=>{if(o?.ignoreBlocker??!1){u();return}const p=e.getBlockers?.()??[],f=d.type==="PUSH"||d.type==="REPLACE";if(typeof document<"u"&&p.length&&f)for(const g of p){const b=Tc(d.path,d.state);if(await g.blockerFn({currentLocation:t,nextLocation:b,action:d.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,o,d)=>{const h=t.state[pi];o=mw(h+1,o),l({task:()=>{e.pushState(u,o),i({type:"PUSH"})},navigateOpts:d,type:"PUSH",path:u,state:o})},replace:(u,o,d)=>{const h=t.state[pi];o=mw(h,o),l({task:()=>{e.replaceState(u,o),i({type:"REPLACE"})},navigateOpts:d,type:"REPLACE",path:u,state:o})},go:(u,o)=>{l({task:()=>{e.go(u),s({type:"GO",index:u})},navigateOpts:o,type:"GO"})},back:u=>{l({task:()=>{e.back(u?.ignoreBlocker??!1),s({type:"BACK"})},navigateOpts:u,type:"BACK"})},forward:u=>{l({task:()=>{e.forward(u?.ignoreBlocker??!1),s({type:"FORWARD"})},navigateOpts:u,type:"FORWARD"})},canGoBack:()=>t.state[pi]!==0,createHref:u=>e.createHref(u),block:u=>{if(!e.setBlockers)return()=>{};const o=e.getBlockers?.()??[];return e.setBlockers([...o,u]),()=>{const d=e.getBlockers?.()??[];e.setBlockers?.(d.filter(h=>h!==u))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:i}}function mw(e,t){t||(t={});const n=Zv();return{...t,key:n,__TSR_key:n,[pi]:e}}function fB(e){const t=typeof document<"u"?window:void 0,n=t.history.pushState,i=t.history.replaceState;let s=[];const l=()=>s,u=R=>s=R,o=(R=>R),d=(()=>Tc(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){const R=Zv();t.history.replaceState({[pi]:0,key:R,__TSR_key:R},"")}let h=d(),p,f=!1,g=!1,b=!1,x=!1;const E=()=>h;let y,S;const v=()=>{y&&(O._ignoreSubscribers=!0,(y.isPush?t.history.pushState:t.history.replaceState)(y.state,"",y.href),O._ignoreSubscribers=!1,y=void 0,S=void 0,p=void 0)},_=(R,I,L)=>{const F=o(I);S||(p=h),h=Tc(I,L),y={href:F,state:L,isPush:y?.isPush||R==="push"},S||(S=Promise.resolve().then(()=>v()))},w=R=>{h=d(),O.notify({type:R})},N=async()=>{if(g){g=!1;return}const R=d(),I=R.state[pi]-h.state[pi],L=I===1,F=I===-1,j=!L&&!F||f;f=!1;const z=j?"GO":F?"BACK":"FORWARD",V=j?{type:"GO",index:I}:{type:F?"BACK":"FORWARD"};if(b)b=!1;else{const K=l();if(typeof document<"u"&&K.length){for(const W of K)if(await W.blockerFn({currentLocation:h,nextLocation:R,action:z})){g=!0,t.history.go(1),O.notify(V);return}}}h=d(),O.notify(V)},k=R=>{if(x){x=!1;return}let I=!1;const L=l();if(typeof document<"u"&&L.length)for(const F of L){const j=F.enableBeforeUnload??!0;if(j===!0){I=!0;break}if(typeof j=="function"&&j()===!0){I=!0;break}}if(I)return R.preventDefault(),R.returnValue=""},O=hB({getLocation:E,getLength:()=>t.history.length,pushState:(R,I)=>_("push",R,I),replaceState:(R,I)=>_("replace",R,I),back:R=>(R&&(b=!0),x=!0,t.history.back()),forward:R=>{R&&(b=!0),x=!0,t.history.forward()},go:R=>{f=!0,t.history.go(R)},createHref:R=>o(R),flush:v,destroy:()=>{t.history.pushState=n,t.history.replaceState=i,t.removeEventListener(pw,k,{capture:!0}),t.removeEventListener(fw,N)},onBlocked:()=>{p&&h!==p&&(h=p)},getBlockers:l,setBlockers:u,notifyOnIndexChange:!1});return t.addEventListener(pw,k,{capture:!0}),t.addEventListener(fw,N),t.history.pushState=function(...R){const I=n.apply(t.history,R);return O._ignoreSubscribers||w("PUSH"),I},t.history.replaceState=function(...R){const I=i.apply(t.history,R);return O._ignoreSubscribers||w("REPLACE"),I},O}function pB(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Tc(e,t){const n=pB(e),i=n.indexOf("#"),s=n.indexOf("?"),l=Zv();return{href:n,pathname:n.substring(0,i>0?s>0?Math.min(i,s):i:s>0?s:n.length),hash:i>-1?n.substring(i):"",search:s>-1?n.slice(s,i===-1?void 0:i):"",state:t||{[pi]:0,key:l,__TSR_key:l}}}function Zv(){return(Math.random()+1).toString(36).substring(7)}function kc(e){return e[e.length-1]}function mB(e){return typeof e=="function"}function ui(e,t){return mB(e)?e(t):e}const gB=Object.prototype.hasOwnProperty;function Hn(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=t,s=yw(e)&&yw(i);if(!s&&!(Ac(e)&&Ac(i)))return i;const l=s?e:gw(e);if(!l)return i;const u=s?i:gw(i);if(!u)return i;const o=l.length,d=u.length,h=s?new Array(d):{};let p=0;for(let f=0;f<d;f++){const g=s?f:u[f],b=e[g],x=i[g];if(b===x){h[g]=b,(s?f<o:gB.call(e,g))&&p++;continue}if(b===null||x===null||typeof b!="object"||typeof x!="object"){h[g]=x;continue}const E=Hn(b,x,n+1);h[g]=E,E===b&&p++}return o===d&&p===o?e:h}function gw(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 i=Object.getOwnPropertySymbols(e);for(const s of i){if(!Object.prototype.propertyIsEnumerable.call(e,s))return!1;t.push(s)}return t}function Ac(e){if(!bw(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!bw(n)||!n.hasOwnProperty("isPrototypeOf"))}function bw(e){return Object.prototype.toString.call(e)==="[object Object]"}function yw(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Gi(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 i=0,s=e.length;i<s;i++)if(!Gi(e[i],t[i],n))return!1;return!0}if(Ac(e)&&Ac(t)){const i=n?.ignoreUndefined??!0;if(n?.partial){for(const u in t)if((!i||t[u]!==void 0)&&!Gi(e[u],t[u],n))return!1;return!0}let s=0;if(!i)s=Object.keys(e).length;else for(const u in e)e[u]!==void 0&&s++;let l=0;for(const u in t)if((!i||t[u]!==void 0)&&(l++,l>s||!Gi(e[u],t[u],n)))return!1;return s===l}return!1}function Qa(e){let t,n;const i=new Promise((s,l)=>{t=s,n=l});return i.status="pending",i.resolve=s=>{i.status="resolved",i.value=s,t(s),e?.(s)},i.reject=s=>{i.status="rejected",n(s)},i}function mi(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function bB(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function vw(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return bB(t)}const dO=["http:","https:","mailto:","tel:"];function Rc(e){if(!e)return!1;try{const t=new URL(e);return!dO.includes(t.protocol)}catch{return!1}}const yB={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},vB=/[&><\u2028\u2029]/g;function _B(e){return e.replace(vB,t=>yB[t])}function _w(e,t){if(!e)return e;const n=/%25|%5C/gi;let i=0,s="",l;for(;(l=n.exec(e))!==null;)s+=vw(e.slice(i,l.index))+l[0],i=n.lastIndex;return s=s+vw(i?e.slice(i):e),s.startsWith("//")&&(s="/"+s.replace(/^\/+/,"")),s}var SB="Invariant failed";function Lr(e,t){if(!e)throw new Error(SB)}function Nc(e){const t=new Map;let n,i;const s=l=>{l.next&&(l.prev?(l.prev.next=l.next,l.next.prev=l.prev,l.next=void 0,i&&(i.next=l,l.prev=i)):(l.next.prev=void 0,n=l.next,l.next=void 0,i&&(l.prev=i,i.next=l)),i=l)};return{get(l){const u=t.get(l);if(u)return s(u),u.value},set(l,u){if(t.size>=e&&n){const d=n;t.delete(d.key),d.next&&(n=d.next,d.next.prev=void 0),d===i&&(i=void 0)}const o=t.get(l);if(o)o.value=u,s(o);else{const d={key:l,value:u,prev:i};i&&(i.next=d),i=d,n||(n=d),t.set(l,d)}},clear(){t.clear(),n=void 0,i=void 0}}}const Ja=0,Xi=1,Zi=2,So=3,Ka=4,EB=5,xB=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,wB=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,CB=/^([^{]*)\{\$\}([^}]*)$/;function Qv(e,t,n=new Uint16Array(6)){const i=e.indexOf("/",t),s=i===-1?e.length:i,l=e.substring(t,s);if(!l||!l.includes("$"))return n[0]=Ja,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n;if(l==="$"){const h=e.length;return n[0]=Zi,n[1]=t,n[2]=t,n[3]=h,n[4]=h,n[5]=h,n}if(l.charCodeAt(0)===36)return n[0]=Xi,n[1]=t,n[2]=t+1,n[3]=s,n[4]=s,n[5]=s,n;const u=l.match(CB);if(u){const p=u[1].length;return n[0]=Zi,n[1]=t+p,n[2]=t+p+1,n[3]=t+p+2,n[4]=t+p+3,n[5]=e.length,n}const o=l.match(wB);if(o){const h=o[1],p=o[2],f=o[3],g=h.length;return n[0]=So,n[1]=t+g,n[2]=t+g+3,n[3]=t+g+3+p.length,n[4]=s-f.length,n[5]=s,n}const d=l.match(xB);if(d){const h=d[1],p=d[2],f=d[3],g=h.length;return n[0]=Xi,n[1]=t+g,n[2]=t+g+2,n[3]=t+g+2+p.length,n[4]=s-f.length,n[5]=s,n}return n[0]=Ja,n[1]=t,n[2]=t,n[3]=s,n[4]=s,n[5]=s,n}function Gc(e,t,n,i,s,l,u){u?.(n);let o=i;{const d=n.fullPath??n.from,h=d.length,p=n.options?.caseSensitive??e,f=!!(n.options?.params?.parse&&n.options?.skipRouteOnParseError?.params);for(;o<h;){const b=Qv(d,o,t);let x;const E=o,y=b[5];switch(o=y+1,l++,b[0]){case Ja:{const v=d.substring(b[2],b[3]);if(p){const _=s.static?.get(v);if(_)x=_;else{s.static??=new Map;const w=qi(n.fullPath??n.from);w.parent=s,w.depth=l,x=w,s.static.set(v,w)}}else{const _=v.toLowerCase(),w=s.staticInsensitive?.get(_);if(w)x=w;else{s.staticInsensitive??=new Map;const N=qi(n.fullPath??n.from);N.parent=s,N.depth=l,x=N,s.staticInsensitive.set(_,N)}}break}case Xi:{const v=d.substring(E,b[1]),_=d.substring(b[4],y),w=p&&!!(v||_),N=v?w?v:v.toLowerCase():void 0,k=_?w?_:_.toLowerCase():void 0,O=!f&&s.dynamic?.find(R=>!R.skipOnParamError&&R.caseSensitive===w&&R.prefix===N&&R.suffix===k);if(O)x=O;else{const R=Uh(Xi,n.fullPath??n.from,w,N,k);x=R,R.depth=l,R.parent=s,s.dynamic??=[],s.dynamic.push(R)}break}case So:{const v=d.substring(E,b[1]),_=d.substring(b[4],y),w=p&&!!(v||_),N=v?w?v:v.toLowerCase():void 0,k=_?w?_:_.toLowerCase():void 0,O=!f&&s.optional?.find(R=>!R.skipOnParamError&&R.caseSensitive===w&&R.prefix===N&&R.suffix===k);if(O)x=O;else{const R=Uh(So,n.fullPath??n.from,w,N,k);x=R,R.parent=s,R.depth=l,s.optional??=[],s.optional.push(R)}break}case Zi:{const v=d.substring(E,b[1]),_=d.substring(b[4],y),w=p&&!!(v||_),N=v?w?v:v.toLowerCase():void 0,k=_?w?_:_.toLowerCase():void 0,O=Uh(Zi,n.fullPath??n.from,w,N,k);x=O,O.parent=s,O.depth=l,s.wildcard??=[],s.wildcard.push(O)}}s=x}if(f&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const b=qi(n.fullPath??n.from);b.kind=EB,b.parent=s,l++,b.depth=l,s.pathless??=[],s.pathless.push(b),s=b}const g=(n.path||!n.children)&&!n.isRoot;if(g&&d.endsWith("/")){const b=qi(n.fullPath??n.from);b.kind=Ka,b.parent=s,l++,b.depth=l,s.index=b,s=b}s.parse=n.options?.params?.parse??null,s.skipOnParamError=f,s.parsingPriority=n.options?.skipRouteOnParseError?.priority??0,g&&!s.route&&(s.route=n,s.fullPath=n.fullPath??n.from)}if(n.children)for(const d of n.children)Gc(e,t,d,o,s,l,u)}function Ph(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function ci(e){if(e.pathless)for(const t of e.pathless)ci(t);if(e.static)for(const t of e.static.values())ci(t);if(e.staticInsensitive)for(const t of e.staticInsensitive.values())ci(t);if(e.dynamic?.length){e.dynamic.sort(Ph);for(const t of e.dynamic)ci(t)}if(e.optional?.length){e.optional.sort(Ph);for(const t of e.optional)ci(t)}if(e.wildcard?.length){e.wildcard.sort(Ph);for(const t of e.wildcard)ci(t)}}function qi(e){return{kind:Ja,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function Uh(e,t,n,i,s){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:i,suffix:s}}function TB(e,t){const n=qi("/"),i=new Uint16Array(6);for(const s of e)Gc(!1,i,s,1,n,0);ci(n),t.masksTree=n,t.flatCache=Nc(1e3)}function kB(e,t){e||="/";const n=t.flatCache.get(e);if(n)return n;const i=Jv(e,t.masksTree);return t.flatCache.set(e,i),i}function AB(e,t,n,i,s){e||="/",i||="/";const l=t?`case\0${e}`:e;let u=s.singleCache.get(l);if(!u){u=qi("/");const o=new Uint16Array(6);Gc(t,o,{from:e},1,u,0),s.singleCache.set(l,u)}return Jv(i,u,n)}function RB(e,t,n=!1){const i=n?e:`nofuzz\0${e}`,s=t.matchCache.get(i);if(s!==void 0)return s;e||="/";const l=Jv(e,t.segmentTree,n);return l&&(l.branch=IB(l.route)),t.matchCache.set(i,l),l}function NB(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function OB(e,t=!1,n){const i=qi(e.fullPath),s=new Uint16Array(6),l={},u={};let o=0;return Gc(t,s,e,1,i,0,h=>{if(n?.(h,o),Lr(!(h.id in l),`Duplicate routes found with id: ${String(h.id)}`),l[h.id]=h,o!==0&&h.path){const p=NB(h.fullPath);(!u[p]||h.fullPath.endsWith("/"))&&(u[p]=h)}o++}),ci(i),{processedTree:{segmentTree:i,singleCache:Nc(1e3),matchCache:Nc(1e3),flatCache:null,masksTree:null},routesById:l,routesByPath:u}}function Jv(e,t,n=!1){const i=e.split("/"),s=DB(e,i,t,n);if(!s)return null;const[l]=hO(e,i,s);return{route:s.node.route,rawParams:l,parsedParams:s.parsedParams}}function hO(e,t,n){const i=LB(n.node);let s=null;const l={};let u=n.extract?.part??0,o=n.extract?.node??0,d=n.extract?.path??0;for(;o<i.length;u++,o++,d++){const h=i[o],p=t[u],f=d;if(p&&(d+=p.length),h.kind===Xi){s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0;if(g.charCodeAt(b)===123){const E=h.suffix?.length??0,y=g.substring(b+2,g.length-E-1),S=p.substring(b,p.length-E);l[y]=decodeURIComponent(S)}else{const E=g.substring(1);l[E]=decodeURIComponent(p)}}else if(h.kind===So){if(n.skipped&1<<o){u--;continue}s??=n.node.fullPath.split("/");const g=s[o],b=h.prefix?.length??0,x=h.suffix?.length??0,E=g.substring(b+3,g.length-x-1),y=h.suffix||h.prefix?p.substring(b,p.length-x):p;y&&(l[E]=decodeURIComponent(y))}else if(h.kind===Zi){const g=h,b=e.substring(f+(g.prefix?.length??0),e.length-(g.suffix?.length??0)),x=decodeURIComponent(b);l["*"]=x,l._splat=x;break}}return n.rawParams&&Object.assign(l,n.rawParams),[l,{part:u,node:o,path:d}]}function IB(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function LB(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function DB(e,t,n,i){if(e==="/"&&n.index)return{node:n.index,skipped:0};const s=!kc(t),l=s&&e!=="/",u=t.length-(s?1:0),o=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let d=null,h=null,p=null;for(;o.length;){const f=o.pop(),{node:g,index:b,skipped:x,depth:E,statics:y,dynamics:S,optionals:v}=f;let{extract:_,rawParams:w,parsedParams:N}=f;if(g.skipOnParamError){if(!jh(e,t,f))continue;w=f.rawParams,_=f.extract,N=f.parsedParams}i&&g.route&&g.kind!==Ka&&ro(h,f)&&(h=f);const k=b===u;if(k&&(g.route&&!l&&ro(p,f)&&(p=f),!g.optional&&!g.wildcard&&!g.index&&!g.pathless))continue;const O=k?void 0:t[b];let R;if(k&&g.index){const I={node:g.index,index:b,skipped:x,depth:E+1,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N};if(g.index.skipOnParamError&&!jh(e,t,I))continue;if(y===u&&!S&&!v&&!x)return I;ro(p,I)&&(p=I)}if(g.wildcard&&ro(d,f))for(const I of g.wildcard){const{prefix:L,suffix:F}=I;if(L&&(k||!(I.caseSensitive?O:R??=O.toLowerCase()).startsWith(L)))continue;if(F){if(k)continue;const z=t.slice(b).join("/").slice(-F.length);if((I.caseSensitive?z:z.toLowerCase())!==F)continue}const j={node:I,index:u,skipped:x,depth:E,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N};if(!(I.skipOnParamError&&!jh(e,t,j))){d=j;break}}if(g.optional){const I=x|1<<E,L=E+1;for(let F=g.optional.length-1;F>=0;F--){const j=g.optional[F];o.push({node:j,index:b,skipped:I,depth:L,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(!k)for(let F=g.optional.length-1;F>=0;F--){const j=g.optional[F],{prefix:z,suffix:V}=j;if(z||V){const K=j.caseSensitive?O:R??=O.toLowerCase();if(z&&!K.startsWith(z)||V&&!K.endsWith(V))continue}o.push({node:j,index:b+1,skipped:x,depth:L,statics:y,dynamics:S,optionals:v+1,extract:_,rawParams:w,parsedParams:N})}}if(!k&&g.dynamic&&O)for(let I=g.dynamic.length-1;I>=0;I--){const L=g.dynamic[I],{prefix:F,suffix:j}=L;if(F||j){const z=L.caseSensitive?O:R??=O.toLowerCase();if(F&&!z.startsWith(F)||j&&!z.endsWith(j))continue}o.push({node:L,index:b+1,skipped:x,depth:E+1,statics:y,dynamics:S+1,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(!k&&g.staticInsensitive){const I=g.staticInsensitive.get(R??=O.toLowerCase());I&&o.push({node:I,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(!k&&g.static){const I=g.static.get(O);I&&o.push({node:I,index:b+1,skipped:x,depth:E+1,statics:y+1,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}if(g.pathless){const I=E+1;for(let L=g.pathless.length-1;L>=0;L--){const F=g.pathless[L];o.push({node:F,index:b,skipped:x,depth:I,statics:y,dynamics:S,optionals:v,extract:_,rawParams:w,parsedParams:N})}}}if(p&&d)return ro(d,p)?p:d;if(p)return p;if(d)return d;if(i&&h){let f=h.index;for(let b=0;b<h.index;b++)f+=t[b].length;const g=f===e.length?"/":e.slice(f);return h.rawParams??={},h.rawParams["**"]=decodeURIComponent(g),h}return null}function jh(e,t,n){try{const[i,s]=hO(e,t,n);n.rawParams=i,n.extract=s;const l=n.node.parse(i);return n.parsedParams=Object.assign({},n.parsedParams,l),!0}catch{return null}}function ro(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===Ka)>(e.node.kind===Ka)||t.node.kind===Ka==(e.node.kind===Ka)&&t.depth>e.depth))):!0}function hc(e){return e_(e.filter(t=>t!==void 0).join("/"))}function e_(e){return e.replace(/\/{2,}/g,"/")}function fO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function gi(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function pO(e){return gi(fO(e))}function Oc(e,t){return e?.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function MB(e,t,n){return Oc(e,n)===Oc(t,n)}function BB({base:e,to:t,trailingSlash:n="never",cache:i}){const s=t.startsWith("/"),l=!s&&t===".";let u;if(i){u=s?t:l?e:e+"\0"+t;const f=i.get(u);if(f)return f}let o;if(l)o=e.split("/");else if(s)o=t.split("/");else{for(o=e.split("/");o.length>1&&kc(o)==="";)o.pop();const f=t.split("/");for(let g=0,b=f.length;g<b;g++){const x=f[g];x===""?g?g===b-1&&o.push(x):o=[x]:x===".."?o.pop():x==="."||o.push(x)}}o.length>1&&(kc(o)===""?n==="never"&&o.pop():n==="always"&&o.push(""));let d,h="";for(let f=0;f<o.length;f++){f>0&&(h+="/");const g=o[f];if(!g)continue;d=Qv(g,0,d);const b=d[0];if(b===Ja){h+=g;continue}const x=d[5],E=g.substring(0,d[1]),y=g.substring(d[4],x),S=g.substring(d[2],d[3]);b===Xi?h+=E||y?`${E}{$${S}}${y}`:`$${S}`:b===Zi?h+=E||y?`${E}{$}${y}`:"$":h+=`${E}{-$${S}}${y}`}h=e_(h);const p=h||"/";return u&&i&&i.set(u,p),p}function zh(e,t,n){const i=t[e];return typeof i!="string"?i:e==="_splat"?encodeURI(i):FB(i,n)}function Hh({path:e,params:t,decodeCharMap:n}){let i=!1;const s={};if(!e||e==="/")return{interpolatedPath:"/",usedParams:s,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:s,isMissingParams:i};const l=e.length;let u=0,o,d="";for(;u<l;){const p=u;o=Qv(e,p,o);const f=o[5];if(u=f+1,p===f)continue;const g=o[0];if(g===Ja){d+="/"+e.substring(p,f);continue}if(g===Zi){const b=t._splat;s._splat=b,s["*"]=b;const x=e.substring(p,o[1]),E=e.substring(o[4],f);if(!b){i=!0,(x||E)&&(d+="/"+x+E);continue}const y=zh("_splat",t,n);d+="/"+x+y+E;continue}if(g===Xi){const b=e.substring(o[2],o[3]);!i&&!(b in t)&&(i=!0),s[b]=t[b];const x=e.substring(p,o[1]),E=e.substring(o[4],f),y=zh(b,t,n)??"undefined";d+="/"+x+y+E;continue}if(g===So){const b=e.substring(o[2],o[3]),x=t[b];if(x==null)continue;s[b]=x;const E=e.substring(p,o[1]),y=e.substring(o[4],f),S=zh(b,t,n)??"";d+="/"+E+S+y;continue}}return e.endsWith("/")&&(d+="/"),{usedParams:s,interpolatedPath:d||"/",isMissingParams:i}}function FB(e,t){let n=encodeURIComponent(e);if(t)for(const[i,s]of t)n=n.replaceAll(i,s);return n}function An(e){return!!e?.isNotFound}function PB(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const Ic="tsr-scroll-restoration-v1_3",UB=(e,t)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{e(...i),n=null},t))}};function jB(){const e=PB();if(!e)return null;const t=e.getItem(Ic);let n=t?JSON.parse(t):{};return{state:n,set:i=>{n=ui(i,n)||n;try{e.setItem(Ic,JSON.stringify(n))}catch{console.warn("[ts-router] Could not persist scroll restoration state to sessionStorage.")}}}}const ec=jB(),fv=e=>e.state.__TSR_key||e.href;function zB(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 Lc=!1;function mO({storageKey:e,key:t,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:s,location:l}){let u;try{u=JSON.parse(sessionStorage.getItem(e)||"{}")}catch(h){console.error(h);return}const o=t||window.history.state?.__TSR_key,d=u[o];Lc=!0;e:{if(i&&d&&Object.keys(d).length>0){for(const f in d){const g=d[f];if(f==="window")window.scrollTo({top:g.scrollY,left:g.scrollX,behavior:n});else if(f){const b=document.querySelector(f);b&&(b.scrollLeft=g.scrollX,b.scrollTop=g.scrollY)}}break e}const h=(l??window.location).hash.split("#",2)[1];if(h){const f=window.history.state?.__hashScrollIntoViewOptions??!0;if(f){const g=document.getElementById(h);g&&g.scrollIntoView(f)}break e}const p={top:0,left:0,behavior:n};if(window.scrollTo(p),s)for(const f of s){if(f==="window")continue;const g=typeof f=="function"?f():document.querySelector(f);g&&g.scrollTo(p)}}Lc=!1}function HB(e,t){if(!ec&&!e.isServer||((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isServer||e.isScrollRestorationSetup||!ec))return;e.isScrollRestorationSetup=!0,Lc=!1;const i=e.options.getScrollRestorationKey||fv;window.history.scrollRestoration="manual";const s=l=>{if(Lc||!e.isScrollRestoring)return;let u="";if(l.target===document||l.target===window)u="window";else{const d=l.target.getAttribute("data-scroll-restoration-id");d?u=`[data-scroll-restoration-id="${d}"]`:u=zB(l.target)}const o=i(e.state.location);ec.set(d=>{const h=d[o]||={},p=h[u]||={};if(u==="window")p.scrollX=window.scrollX||0,p.scrollY=window.scrollY||0;else if(u){const f=document.querySelector(u);f&&(p.scrollX=f.scrollLeft||0,p.scrollY=f.scrollTop||0)}return d})};typeof document<"u"&&document.addEventListener("scroll",UB(s,100),!0),e.subscribe("onRendered",l=>{const u=i(l.toLocation);if(!e.resetNextScroll){e.resetNextScroll=!0;return}typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation})||(mO({storageKey:Ic,key:u,behavior:e.options.scrollRestorationBehavior,shouldScrollRestoration:e.isScrollRestoring,scrollToTopSelectors:e.options.scrollToTopSelectors,location:e.history.location}),e.isScrollRestoring&&ec.set(o=>(o[u]||={},o)))})}function qB(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 $B(e,t=String){const n=new URLSearchParams;for(const i in e){const s=e[i];s!==void 0&&n.set(i,t(s))}return n.toString()}function qh(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function GB(e){const t=new URLSearchParams(e),n={};for(const[i,s]of t.entries()){const l=n[i];l==null?n[i]=qh(s):Array.isArray(l)?l.push(qh(s)):n[i]=[l,qh(s)]}return n}const VB=KB(JSON.parse),WB=YB(JSON.stringify,JSON.parse);function KB(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=GB(t);for(const i in n){const s=n[i];if(typeof s=="string")try{n[i]=e(s)}catch{}}return n}}function YB(e,t){const n=typeof t=="function";function i(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 l=$B(s,i);return l?`?${l}`:""}}const Tn="__root__";function t_(e){if(e.statusCode=e.statusCode||e.code||307,typeof e.href=="string"&&Rc(e.href))throw new Error(`Redirect blocked: unsafe protocol in href "${e.href}". Only ${dO.join(", ")} protocols are allowed.`);if(!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 Gn(e){return e instanceof Response&&!!e.options}const fc=e=>{if(!e.rendered)return e.rendered=!0,e.onReady?.()},Vc=(e,t)=>!!(e.preload&&!e.router.state.matches.some(n=>n.id===t)),Xa=(e,t,n=!0)=>{const i={...e.router.options.context??{}},s=n?t:t-1;for(let l=0;l<=s;l++){const u=e.matches[l];if(!u)continue;const o=e.router.getMatch(u.id);o&&Object.assign(i,o.__routeContext,o.__beforeLoadContext)}return i},gO=(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),Lr(n.options.notFoundComponent);const i=e.matches.find(s=>s.routeId===n.id);Lr(i,"Could not find match for route: "+n.id),e.updateMatch(i.id,s=>({...s,status:"notFound",error:t,isFetching:!1})),t.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(t.routeId=n.parentRoute.id,gO(e,t))},di=(e,t,n)=>{if(!(!Gn(n)&&!An(n))){if(Gn(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 i=Gn(n)?"redirected":"notFound";t._nonReactive.error=n,e.updateMatch(t.id,s=>({...s,status:i,context:Xa(e,t.index),isFetching:!1,error:n})),An(n)&&!n.routeId&&(n.routeId=t.routeId),t._nonReactive.loadPromise?.resolve()}throw Gn(n)?(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n),n):(gO(e,n),n)}},bO=(e,t)=>{const n=e.router.getMatch(t);return!!(!e.router.isServer&&n._nonReactive.dehydrated||e.router.isServer&&n.ssr===!1)},io=(e,t,n,i)=>{const{id:s,routeId:l}=e.matches[t],u=e.router.looseRoutesById[l];if(n instanceof Promise)throw n;n.routerCode=i,e.firstBadMatchIndex??=t,di(e,e.router.getMatch(s),n);try{u.options.onError?.(n)}catch(o){n=o,di(e,e.router.getMatch(s),n)}e.updateMatch(s,o=>(o._nonReactive.beforeLoadPromise?.resolve(),o._nonReactive.beforeLoadPromise=void 0,o._nonReactive.loadPromise?.resolve(),{...o,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}))},XB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=e.matches[n-1]?.id,u=l?e.router.getMatch(l):void 0;if(e.router.isShell()){s.ssr=i.id===Tn;return}if(u?.ssr===!1){s.ssr=!1;return}const o=b=>b===!0&&u?.ssr==="data-only"?"data-only":b,d=e.router.options.defaultSsr??!0;if(i.options.ssr===void 0){s.ssr=o(d);return}if(typeof i.options.ssr!="function"){s.ssr=o(i.options.ssr);return}const{search:h,params:p}=s,f={search:tc(h,s.searchError),params:tc(p,s.paramsError),location:e.location,matches:e.matches.map(b=>({index:b.index,pathname:b.pathname,fullPath:b.fullPath,staticData:b.staticData,id:b.id,routeId:b.routeId,search:tc(b.search,b.searchError),params:tc(b.params,b.paramsError),ssr:b.ssr}))},g=i.options.ssr(f);if(mi(g))return g.then(b=>{s.ssr=o(b??d)});s.ssr=o(g??d)},yO=(e,t,n,i)=>{if(i._nonReactive.pendingTimeout!==void 0)return;const s=n.options.pendingMs??e.router.options.defaultPendingMs;if(!!(e.onReady&&!e.router.isServer&&!Vc(e,t)&&(n.options.loader||n.options.beforeLoad||SO(n))&&typeof s=="number"&&s!==1/0&&(n.options.pendingComponent??e.router.options?.defaultPendingComponent))){const u=setTimeout(()=>{fc(e)},s);i._nonReactive.pendingTimeout=u}},ZB=(e,t,n)=>{const i=e.router.getMatch(t);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;yO(e,t,n,i);const s=()=>{const l=e.router.getMatch(t);l.preload&&(l.status==="redirected"||l.status==="notFound")&&di(e,l,l.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(s):s()},QB=(e,t,n,i)=>{const s=e.router.getMatch(t),l=s._nonReactive.loadPromise;s._nonReactive.loadPromise=Qa(()=>{l?.resolve()});const{paramsError:u,searchError:o}=s;u&&io(e,n,u,"PARSE_PARAMS"),o&&io(e,n,o,"VALIDATE_SEARCH"),yO(e,t,i,s);const d=new AbortController,h=e.matches[n-1]?.id;(h?e.router.getMatch(h):void 0)?.context??e.router.options.context;let f=!1;const g=()=>{f||(f=!0,e.updateMatch(t,k=>({...k,isFetching:"beforeLoad",fetchCount:k.fetchCount+1,abortController:d})))},b=()=>{s._nonReactive.beforeLoadPromise?.resolve(),s._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,k=>({...k,isFetching:!1}))};if(!i.options.beforeLoad){mo(()=>{g(),b()});return}s._nonReactive.beforeLoadPromise=Qa();const x={...Xa(e,n,!1),...s.__routeContext},{search:E,params:y,cause:S}=s,v=Vc(e,t),_={search:E,abortController:d,params:y,preload:v,context:x,location:e.location,navigate:k=>e.router.navigate({...k,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:v?"preload":S,matches:e.matches,...e.router.options.additionalContext},w=k=>{if(k===void 0){mo(()=>{g(),b()});return}(Gn(k)||An(k))&&(g(),io(e,n,k,"BEFORE_LOAD")),mo(()=>{g(),e.updateMatch(t,O=>({...O,__beforeLoadContext:k})),b()})};let N;try{if(N=i.options.beforeLoad(_),mi(N))return g(),N.catch(k=>{io(e,n,k,"BEFORE_LOAD")}).then(w)}catch(k){g(),io(e,n,k,"BEFORE_LOAD")}w(N)},JB=(e,t)=>{const{id:n,routeId:i}=e.matches[t],s=e.router.looseRoutesById[i],l=()=>{if(e.router.isServer){const d=XB(e,n,t,s);if(mi(d))return d.then(o)}return o()},u=()=>QB(e,n,t,s),o=()=>{if(bO(e,n))return;const d=ZB(e,n,s);return mi(d)?d.then(u):u()};return l()},e3=(e,t,n)=>{const i=e.router.getMatch(t);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const s={ssr:e.router.options.ssr,matches:e.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([n.options.head?.(s),n.options.scripts?.(s),n.options.headers?.(s)]).then(([l,u,o])=>{const d=l?.meta,h=l?.links,p=l?.scripts,f=l?.styles;return{meta:d,links:h,headScripts:p,headers:o,scripts:u,styles:f}})},vO=(e,t,n,i)=>{const s=e.matchPromises[n-1],{params:l,loaderDeps:u,abortController:o,cause:d}=e.router.getMatch(t),h=Xa(e,n),p=Vc(e,t);return{params:l,deps:u,preload:!!p,parentMatchPromise:s,abortController:o,context:h,location:e.location,navigate:f=>e.router.navigate({...f,_fromLocation:e.location}),cause:p?"preload":d,route:i,...e.router.options.additionalContext}},Sw=async(e,t,n,i)=>{try{const s=e.router.getMatch(t);try{(!e.router.isServer||s.ssr===!0)&&_O(i);const l=i.options.loader?.(vO(e,t,n,i)),u=i.options.loader&&mi(l);if((u||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||s._nonReactive.minPendingPromise)&&e.updateMatch(t,h=>({...h,isFetching:"loader"})),i.options.loader){const h=u?await l:l;di(e,e.router.getMatch(t),h),h!==void 0&&e.updateMatch(t,p=>({...p,loaderData:h}))}i._lazyPromise&&await i._lazyPromise;const d=s._nonReactive.minPendingPromise;d&&await d,i._componentsPromise&&await i._componentsPromise,e.updateMatch(t,h=>({...h,error:void 0,context:Xa(e,n),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(l){let u=l;if(u?.name==="AbortError"){e.updateMatch(t,d=>({...d,status:d.status==="pending"?"success":d.status,isFetching:!1,context:Xa(e,n)}));return}const o=s._nonReactive.minPendingPromise;o&&await o,An(l)&&await i.options.notFoundComponent?.preload?.(),di(e,e.router.getMatch(t),l);try{i.options.onError?.(l)}catch(d){u=d,di(e,e.router.getMatch(t),d)}e.updateMatch(t,d=>({...d,error:u,context:Xa(e,n),status:"error",isFetching:!1}))}}catch(s){const l=e.router.getMatch(t);l&&(l._nonReactive.loaderPromise=void 0),di(e,l,s)}},t3=async(e,t)=>{const{id:n,routeId:i}=e.matches[t];let s=!1,l=!1;const u=e.router.looseRoutesById[i];if(bO(e,n)){if(e.router.isServer)return e.router.getMatch(n)}else{const h=e.router.getMatch(n);if(h._nonReactive.loaderPromise){if(h.status==="success"&&!e.sync&&!h.preload)return h;await h._nonReactive.loaderPromise;const p=e.router.getMatch(n),f=p._nonReactive.error||p.error;f&&di(e,p,f)}else{const p=Date.now()-h.updatedAt,f=Vc(e,n),g=f?u.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:u.options.staleTime??e.router.options.defaultStaleTime??0,b=u.options.shouldReload,x=typeof b=="function"?b(vO(e,n,t,u)):b,E=!!f&&!e.router.state.matches.some(_=>_.id===n),y=e.router.getMatch(n);y._nonReactive.loaderPromise=Qa(),E!==y.preload&&e.updateMatch(n,_=>({..._,preload:E}));const{status:S,invalid:v}=y;s=S==="success"&&(v||(x??p>g)),f&&u.options.preload===!1||(s&&!e.sync?(l=!0,(async()=>{try{await Sw(e,n,t,u);const _=e.router.getMatch(n);_._nonReactive.loaderPromise?.resolve(),_._nonReactive.loadPromise?.resolve(),_._nonReactive.loaderPromise=void 0}catch(_){Gn(_)&&await e.router.navigate(_.options)}})()):(S!=="success"||s&&e.sync)&&await Sw(e,n,t,u))}}const o=e.router.getMatch(n);l||(o._nonReactive.loaderPromise?.resolve(),o._nonReactive.loadPromise?.resolve()),clearTimeout(o._nonReactive.pendingTimeout),o._nonReactive.pendingTimeout=void 0,l||(o._nonReactive.loaderPromise=void 0),o._nonReactive.dehydrated=void 0;const d=l?o.isFetching:!1;return d!==o.isFetching||o.invalid!==!1?(e.updateMatch(n,h=>({...h,isFetching:d,invalid:!1})),e.router.getMatch(n)):o};async function Ew(e){const t=Object.assign(e,{matchPromises:[]});!t.router.isServer&&t.router.state.matches.some(n=>n._forcePending)&&fc(t);try{for(let o=0;o<t.matches.length;o++){const d=JB(t,o);mi(d)&&await d}const n=t.firstBadMatchIndex??t.matches.length;for(let o=0;o<n;o++)t.matchPromises.push(t3(t,o));const s=(await Promise.allSettled(t.matchPromises)).filter(o=>o.status==="rejected").map(o=>o.reason);let l;for(const o of s){if(Gn(o))throw o;!l&&An(o)&&(l=o)}for(const o of t.matches){const{id:d,routeId:h}=o,p=t.router.looseRoutesById[h];try{const f=e3(t,d,p);if(f){const g=await f;t.updateMatch(d,b=>({...b,...g}))}}catch(f){console.error(`Error executing head for route ${h}:`,f)}}if(l)throw l;const u=fc(t);mi(u)&&await u}catch(n){if(An(n)&&!t.preload){const i=fc(t);throw mi(i)&&await i,n}if(Gn(n))throw n}return t.matches}async function _O(e){if(!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(t=>{const{id:n,...i}=t.options;Object.assign(e.options,i),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0),!e._componentsLoaded&&e._componentsPromise===void 0){const t=()=>{const n=[];for(const i of EO){const s=e.options[i]?.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 tc(e,t){return t?{status:"error",error:t}:{status:"success",value:e}}function SO(e){for(const t of EO)if(e.options[t]?.preload)return!0;return!1}const EO=["component","errorComponent","pendingComponent","notFoundComponent"];function n3(e){return{input:({url:t})=>{for(const n of e)t=pv(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=xO(e[n],t);return t}}}function r3(e){const t=pO(e.basepath),n=`/${t}`,i=`${n}/`,s=e.caseSensitive?n:n.toLowerCase(),l=e.caseSensitive?i:i.toLowerCase();return{input:({url:u})=>{const o=e.caseSensitive?u.pathname:u.pathname.toLowerCase();return o===s?u.pathname="/":o.startsWith(l)&&(u.pathname=u.pathname.slice(n.length)),u},output:({url:u})=>(u.pathname=hc(["/",t,u.pathname]),u)}}function pv(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 xO(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 Vi(e){const t=e.resolvedLocation,n=e.location,i=t?.pathname!==n.pathname,s=t?.href!==n.href,l=t?.hash!==n.hash;return{fromLocation:t,toLocation:n,pathChanged:i,hrefChanged:s,hashChanged:l}}class i3{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 i=this.options,s=this.basepath??i?.basepath??"/",l=this.basepath===void 0,u=i?.rewrite;this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(g=>[encodeURIComponent(g),g])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=fB())),this.origin=this.options.origin,this.origin||(!this.isServer&&window?.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new dB(s3(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(g=>!["redirected"].includes(g.status))}}}),HB(this));let o=!1;const d=this.options.basepath??"/",h=this.options.rewrite;if(l||s!==d||u!==h){this.basepath=d;const g=[];pO(d)!==""&&g.push(r3({basepath:d})),h&&g.push(h),this.rewrite=g.length===0?void 0:g.length===1?g[0]:n3(g),this.history&&this.updateLatestLocation(),o=!0}o&&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:i,processedTree:s}=OB(this.routeTree,this.options.caseSensitive,(u,o)=>{u.init({originalIndex:o})});this.options.routeMasks&&TB(this.options.routeMasks,s),this.routesById=n,this.routesByPath=i,this.processedTree=s;const l=this.options.notFoundRoute;l&&(l.init({originalIndex:99999999999}),this.routesById[l.id]=l)},this.subscribe=(n,i)=>{const s={eventType:n,fn:i};return this.subscribers.add(s),()=>{this.subscribers.delete(s)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const s=({href:d,state:h})=>{const p=new URL(d,this.origin),f=pv(this.rewrite,p),g=this.options.parseSearch(f.search),b=this.options.stringifySearch(g);return f.search=b,{href:f.href.replace(f.origin,""),publicHref:d,url:f,pathname:_w(f.pathname),searchStr:b,search:Hn(i?.search,g),hash:f.hash.split("#").reverse()[0]??"",state:Hn(i?.state,h)}},l=s(n),{__tempLocation:u,__tempKey:o}=l.state;if(u&&(!o||o===this.tempLocationKey)){const d=s(u);return d.state.key=l.state.key,d.state.__TSR_key=l.state.__TSR_key,delete d.state.__tempLocation,{...d,maskedLocation:l}}return l},this.resolvePathCache=Nc(1e3),this.resolvePathWithBase=(n,i)=>BB({base:n,to:e_(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,s)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},s):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>o3({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(l=>l.status==="pending"),i=this.state.matches.filter(l=>l.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(l=>{this.cancelMatch(l.id)})},this.buildLocation=n=>{const i=(l={})=>{const u=l._fromLocation||this.pendingBuiltLocation||this.latestLocation,o=this.matchRoutes(u,{_buildLocation:!0}),d=kc(o);l.from;const h=l.unsafeRelative==="path"?u.pathname:l.from??d.fullPath,p=this.resolvePathWithBase(h,"."),f=d.search,g={...d.params},b=l.to?this.resolvePathWithBase(p,`${l.to}`):this.resolvePathWithBase(p,"."),x=l.params===!1||l.params===null?{}:(l.params??!0)===!0?g:Object.assign(g,ui(l.params,g)),E=Hh({path:b,params:x}).interpolatedPath,y=this.matchRoutes(E,void 0,{_buildLocation:!0}).map(L=>this.looseRoutesById[L.routeId]);if(Object.keys(x).length>0)for(const L of y){const F=L.options.params?.stringify??L.options.stringifyParams;F&&Object.assign(x,F(x))}const S=n.leaveParams?b:_w(Hh({path:b,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let v=f;if(n._includeValidateSearch&&this.options.search?.strict){const L={};y.forEach(F=>{if(F.options.validateSearch)try{Object.assign(L,mv(F.options.validateSearch,{...L,...v}))}catch{}}),v=L}v=l3({search:v,dest:l,destRoutes:y,_includeValidateSearch:n._includeValidateSearch}),v=Hn(f,v);const _=this.options.stringifySearch(v),w=l.hash===!0?u.hash:l.hash?ui(l.hash,u.hash):void 0,N=w?`#${w}`:"";let k=l.state===!0?u.state:l.state?ui(l.state,u.state):{};k=Hn(u.state,k);const O=`${S}${_}${N}`,R=new URL(O,this.origin),I=xO(this.rewrite,R);return{publicHref:I.pathname+I.search+I.hash,href:O,url:I,pathname:S,search:v,searchStr:_,state:k,hash:w??"",unmaskOnReload:l.unmaskOnReload}},s=(l={},u)=>{const o=i(l);let d=u?i(u):void 0;if(!d){const h={};if(this.options.routeMasks){const p=kB(o.pathname,this.processedTree);if(p){Object.assign(h,p.rawParams);const{from:f,params:g,...b}=p.route,x=g===!1||g===null?{}:(g??!0)===!0?h:Object.assign(h,ui(g,h));u={from:n.from,...b,params:x},d=i(u)}}}return d&&(o.maskedLocation=d),o};return n.mask?s(n,{from:n.from,...n.mask}):s(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:i,...s})=>{const l=()=>{const d=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];d.forEach(p=>{s.state[p]=this.latestLocation.state[p]});const h=Gi(s.state,this.latestLocation.state);return d.forEach(p=>{delete s.state[p]}),h},u=gi(this.latestLocation.href)===gi(s.href),o=this.commitLocationPromise;if(this.commitLocationPromise=Qa(()=>{o?.resolve()}),u&&l())this.load();else{let{maskedLocation:d,hashScrollIntoView:h,url:p,...f}=s;d&&(f={...d,state:{...d.state,__tempKey:void 0,__tempLocation:{...f,search:f.searchStr,state:{...f.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(f.unmaskOnReload??this.options.unmaskOnReload??!1)&&(f.state.__tempKey=this.tempLocationKey)),f.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[s.replace?"replace":"push"](f.publicHref,f.state,{ignoreBlocker:i})}return this.resetNextScroll=s.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:s,viewTransition:l,ignoreBlocker:u,href:o,...d}={})=>{if(o){const f=this.history.location.state.__TSR_index,g=Tc(o,{__TSR_index:n?f:f+1}),b=new URL(g.pathname,this.origin),x=pv(this.rewrite,b);d.to=x.pathname,d.search=this.options.parseSearch(g.search),d.hash=g.hash.slice(1)}const h=this.buildLocation({...d,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const p=this.commitLocation({...h,viewTransition:l,replace:n,resetScroll:i,hashScrollIntoView:s,ignoreBlocker:u});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),p},this.navigate=async({to:n,reloadDocument:i,href:s,publicHref:l,...u})=>{let o=!1;if(s)try{new URL(`${s}`),o=!0}catch{}if(o&&!i&&(i=!0),i){if(n!==void 0||!s){const h=this.buildLocation({to:n,...u});s=s??h.url.href,l=l??h.url.href}const d=!o&&l?l:s;if(Rc(d))return Promise.resolve();if(!u.ignoreBlocker){const p=this.history.getBlockers?.()??[];for(const f of p)if(f?.blockerFn&&await f.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return u.replace?window.location.replace(d):window.location.href=d,Promise.resolve()}return this.buildAndCommitLocation({...u,href:s,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const i=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(this.latestLocation.publicHref!==i.publicHref||i.url.origin!==this.origin){const s=this.getParsedLocationHref(i);throw t_({href:s})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(s=>!n.some(l=>l.id===s.id))}))},this.load=async n=>{let i,s,l;for(l=new Promise(o=>{this.startTransition(async()=>{try{this.beforeLoad();const d=this.latestLocation,h=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Vi({resolvedLocation:h,location:d})}),this.emit({type:"onBeforeLoad",...Vi({resolvedLocation:h,location:d})}),await Ew({router:this,sync:n?.sync,matches:this.state.pendingMatches,location:d,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],f=[],g=[];mo(()=>{this.__store.setState(b=>{const x=b.matches,E=b.pendingMatches||b.matches;return p=x.filter(y=>!E.some(S=>S.id===y.id)),f=E.filter(y=>!x.some(S=>S.id===y.id)),g=E.filter(y=>x.some(S=>S.id===y.id)),{...b,isLoading:!1,loadedAt:Date.now(),matches:E,pendingMatches:void 0,cachedMatches:[...b.cachedMatches,...p.filter(y=>y.status!=="error"&&y.status!=="notFound")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[f,"onEnter"],[g,"onStay"]].forEach(([b,x])=>{b.forEach(E=>{this.looseRoutesById[E.routeId].options[x]?.(E)})})})})}})}catch(d){Gn(d)?(i=d,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):An(d)&&(s=d),this.__store.setState(h=>({...h,statusCode:i?i.status:s?404:h.matches.some(p=>p.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===l&&(this.commitLocationPromise?.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),o()})}),this.latestLoadPromise=l,await l;this.latestLoadPromise&&l!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.__store.state.matches.some(o=>o.status==="error")&&(u=500),u!==void 0&&this.__store.setState(o=>({...o,statusCode:u}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let s;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const l=this.latestLocation,u=this.state.resolvedLocation,o=typeof i.types=="function"?i.types(Vi({resolvedLocation:u,location:l})):i.types;if(o===!1){n();return}s={update:n,types:o}}else s=n;document.startViewTransition(s)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{const s=this.state.pendingMatches?.some(l=>l.id===n)?"pendingMatches":this.state.matches.some(l=>l.id===n)?"matches":this.state.cachedMatches.some(l=>l.id===n)?"cachedMatches":"";s&&this.__store.setState(l=>({...l,[s]:l[s]?.map(u=>u.id===n?i(u):u)}))})},this.getMatch=n=>{const i=s=>s.id===n;return this.state.cachedMatches.find(i)??this.state.pendingMatches?.find(i)??this.state.matches.find(i)},this.invalidate=n=>{const i=s=>n?.filter?.(s)??!0?{...s,invalid:!0,...n?.forcePending||s.status==="error"||s.status==="notFound"?{status:"pending",error:void 0}:void 0}:s;return this.__store.setState(s=>({...s,matches:s.matches.map(i),cachedMatches:s.cachedMatches.map(i),pendingMatches:s.pendingMatches?.map(i)})),this.shouldViewTransition=!1,this.load({sync:n?.sync})},this.getParsedLocationHref=n=>{let i=n.url.href;return this.origin&&n.url.origin===this.origin&&(i=i.replace(this.origin,"")||"/"),i},this.resolveRedirect=n=>{const i=n.headers.get("Location");if(n.options.href){if(i)try{const s=new URL(i);if(this.origin&&s.origin===this.origin){const l=s.pathname+s.search+s.hash;n.options.href=l,n.headers.set("Location",l)}}catch{}}else{const s=this.buildLocation(n.options),l=this.getParsedLocationHref(s);n.options.href=l,n.headers.set("Location",l)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n?.filter;i!==void 0?this.__store.setState(s=>({...s,cachedMatches:s.cachedMatches.filter(l=>!i(l))})):this.__store.setState(s=>({...s,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const s=this.looseRoutesById[i.routeId];if(!s.options.loader)return!0;const l=(i.preload?s.options.preloadGcTime??this.options.defaultPreloadGcTime:s.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=l};this.clearCache({filter:n})},this.loadRouteChunk=_O,this.preloadRoute=async n=>{const i=this.buildLocation(n);let s=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const l=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(o=>o.id)),u=new Set([...l,...this.state.cachedMatches.map(o=>o.id)]);mo(()=>{s.forEach(o=>{u.has(o.id)||this.__store.setState(d=>({...d,cachedMatches:[...d.cachedMatches,o]}))})});try{return s=await Ew({router:this,matches:s,location:i,preload:!0,updateMatch:(o,d)=>{l.has(o)?s=s.map(h=>h.id===o?d(h):h):this.updateMatch(o,d)}}),s}catch(o){if(Gn(o))return o.options.reloadDocument?void 0:await this.preloadRoute({...o.options,_fromLocation:i});An(o)||console.error(o);return}},this.matchRoute=(n,i)=>{const s={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},l=this.buildLocation(s);if(i?.pending&&this.state.status!=="pending")return!1;const o=(i?.pending===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,d=AB(l.pathname,i?.caseSensitive??!1,i?.fuzzy??!1,o.pathname,this.processedTree);return!d||n.params&&!Gi(d.rawParams,n.params,{partial:!0})?!1:i?.includeSearch??!0?Gi(o.search,l.search,{partial:!0})?d.rawParams:!1:d.rawParams},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??WB,parseSearch:t.parseSearch??VB}),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 i=this.getMatchedRoutes(t.pathname),{foundRoute:s,routeParams:l,parsedParams:u}=i;let{matchedRoutes:o}=i,d=!1;(s?s.path!=="/"&&l["**"]:gi(t.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:d=!0);const h=(()=>{if(d){if(this.options.notFoundMode!=="root")for(let g=o.length-1;g>=0;g--){const b=o[g];if(b.children)return b.id}return Tn}})(),p=[],f=g=>g?.id?g.context??this.options.context??void 0:this.options.context??void 0;return o.forEach((g,b)=>{const x=p[b-1],[E,y,S]=(()=>{const V=x?.search??t.search,K=x?._strictSearch??void 0;try{const W=mv(g.options.validateSearch,{...V})??void 0;return[{...V,...W},{...K,...W},void 0]}catch(W){let Z=W;if(W instanceof Dc||(Z=new Dc(W.message,{cause:W})),n?.throwOnError)throw Z;return[V,{},Z]}})(),v=g.options.loaderDeps?.({search:E})??"",_=v?JSON.stringify(v):"",{interpolatedPath:w,usedParams:N}=Hh({path:g.fullPath,params:l,decodeCharMap:this.pathParamsDecodeCharMap}),k=g.id+w+_,O=this.getMatch(k),R=this.state.matches.find(V=>V.routeId===g.id),I=O?._strictParams??N;let L;if(!O)if(g.options.skipRouteOnParseError)for(const V in N)V in u&&(I[V]=u[V]);else{const V=g.options.params?.parse??g.options.parseParams;if(V)try{Object.assign(I,V(I))}catch(K){if(An(K)||Gn(K)?L=K:L=new a3(K.message,{cause:K}),n?.throwOnError)throw L}}Object.assign(l,I);const F=R?"stay":"enter";let j;if(O)j={...O,cause:F,params:R?Hn(R.params,l):l,_strictParams:I,search:Hn(R?R.search:O.search,E),_strictSearch:y};else{const V=g.options.loader||g.options.beforeLoad||g.lazyFn||SO(g)?"pending":"success";j={id:k,ssr:this.isServer?void 0:g.options.ssr,index:b,routeId:g.id,params:R?Hn(R.params,l):l,_strictParams:I,pathname:w,updatedAt:Date.now(),search:R?Hn(R.search,E):E,_strictSearch:y,searchError:void 0,status:V,isFetching:!1,error:void 0,paramsError:L,__routeContext:void 0,_nonReactive:{loadPromise:Qa()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:F,loaderDeps:R?Hn(R.loaderDeps,v):v,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:g.options.staticData||{},fullPath:g.fullPath}}n?.preload||(j.globalNotFound=h===g.id),j.searchError=S;const z=f(x);j.context={...z,...j.__routeContext,...j.__beforeLoadContext},p.push(j)}),p.forEach((g,b)=>{const x=this.looseRoutesById[g.routeId];if(!this.getMatch(g.id)&&n?._buildLocation!==!0){const y=p[b-1],S=f(y);if(x.options.context){const v={deps:g.loaderDeps,params:g.params,context:S??{},location:t,navigate:_=>this.navigate({..._,_fromLocation:t}),buildLocation:this.buildLocation,cause:g.cause,abortController:g.abortController,preload:!!g.preload,matches:p};g.__routeContext=x.options.context(v)??void 0}g.context={...S,...g.__routeContext,...g.__beforeLoadContext}}}),p}}class Dc extends Error{}class a3 extends Error{}function s3(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function mv(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Dc("Async validation not supported");if(n.issues)throw new Dc(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 o3({pathname:e,routesById:t,processedTree:n}){const i={},s=gi(e);let l,u;const o=RB(s,n,!0);return o&&(l=o.route,Object.assign(i,o.rawParams),u=Object.assign({},o.parsedParams)),{matchedRoutes:o?.branch||[t[Tn]],routeParams:i,foundRoute:l,parsedParams:u}}function l3({search:e,dest:t,destRoutes:n,_includeValidateSearch:i}){const s=n.reduce((o,d)=>{const h=[];if("search"in d.options)d.options.search?.middlewares&&h.push(...d.options.search.middlewares);else if(d.options.preSearchFilters||d.options.postSearchFilters){const p=({search:f,next:g})=>{let b=f;"preSearchFilters"in d.options&&d.options.preSearchFilters&&(b=d.options.preSearchFilters.reduce((E,y)=>y(E),f));const x=g(b);return"postSearchFilters"in d.options&&d.options.postSearchFilters?d.options.postSearchFilters.reduce((E,y)=>y(E),x):x};h.push(p)}if(i&&d.options.validateSearch){const p=({search:f,next:g})=>{const b=g(f);try{return{...b,...mv(d.options.validateSearch,b)??void 0}}catch{return b}};h.push(p)}return o.concat(h)},[])??[],l=({search:o})=>t.search?t.search===!0?o:ui(t.search,o):{};s.push(l);const u=(o,d)=>{if(o>=s.length)return d;const h=s[o];return h({search:d,next:f=>u(o+1,f)})};return u(0,e)}const c3="Error preloading route! ☝️";class wO{constructor(t){if(this.init=n=>{this.originalIndex=n.originalIndex;const i=this.options,s=!i?.path&&!i?.id;this.parentRoute=this.options.getParentRoute?.(),s?this._path=Tn:this.parentRoute||Lr(!1);let l=s?Tn:i?.path;l&&l!=="/"&&(l=fO(l));const u=i?.id||l;let o=s?Tn:hc([this.parentRoute.id===Tn?"":this.parentRoute.id,u]);l===Tn&&(l="/"),o!==Tn&&(o=hc(["/",o]));const d=o===Tn?"/":hc([this.parentRoute.fullPath,l]);this._path=l,this._id=o,this._fullPath=d,this._to=gi(d)},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.redirect=n=>t_({from:this.fullPath,...n}),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 u3 extends wO{constructor(t){super(t)}}const nc=typeof window<"u"?G.useLayoutEffect:G.useEffect;function $h(e){const t=G.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function d3(e,t,n={},i={}){G.useEffect(()=>{if(!e.current||i.disabled||typeof IntersectionObserver!="function")return;const s=new IntersectionObserver(([l])=>{t(l)},n);return s.observe(e.current),()=>{s.disconnect()}},[t,n,i.disabled,e])}function h3(e){const t=G.useRef(null);return G.useImperativeHandle(e,()=>t.current,[]),t}function n_(e){const t=e.errorComponent??Wc;return T.jsx(f3,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:i})=>n?G.createElement(t,{error:n,reset:i}):e.children})}class f3 extends G.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 Wc({error:e}){const[t,n]=G.useState(!1);return T.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[T.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[T.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),T.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:t?"Hide Error":"Show Error"})]}),T.jsx("div",{style:{height:".25rem"}}),t?T.jsx("div",{children:T.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?T.jsx("code",{children:e.message}):null})}):null]})}function p3({children:e,fallback:t=null}){return m3()?T.jsx(Gt.Fragment,{children:e}):T.jsx(Gt.Fragment,{children:t})}function m3(){return Gt.useSyncExternalStore(g3,()=>!0,()=>!1)}function g3(){return()=>{}}var Gh={exports:{}},Vh={},Wh={exports:{}},Kh={};var xw;function b3(){if(xw)return Kh;xw=1;var e=Ro();function t(f,g){return f===g&&(f!==0||1/f===1/g)||f!==f&&g!==g}var n=typeof Object.is=="function"?Object.is:t,i=e.useState,s=e.useEffect,l=e.useLayoutEffect,u=e.useDebugValue;function o(f,g){var b=g(),x=i({inst:{value:b,getSnapshot:g}}),E=x[0].inst,y=x[1];return l(function(){E.value=b,E.getSnapshot=g,d(E)&&y({inst:E})},[f,b,g]),s(function(){return d(E)&&y({inst:E}),f(function(){d(E)&&y({inst:E})})},[f]),u(b),b}function d(f){var g=f.getSnapshot;f=f.value;try{var b=g();return!n(f,b)}catch{return!0}}function h(f,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:o;return Kh.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:p,Kh}var ww;function y3(){return ww||(ww=1,Wh.exports=b3()),Wh.exports}var Cw;function v3(){if(Cw)return Vh;Cw=1;var e=Ro(),t=y3();function n(h,p){return h===p&&(h!==0||1/h===1/p)||h!==h&&p!==p}var i=typeof Object.is=="function"?Object.is:n,s=t.useSyncExternalStore,l=e.useRef,u=e.useEffect,o=e.useMemo,d=e.useDebugValue;return Vh.useSyncExternalStoreWithSelector=function(h,p,f,g,b){var x=l(null);if(x.current===null){var E={hasValue:!1,value:null};x.current=E}else E=x.current;x=o(function(){function S(k){if(!v){if(v=!0,_=k,k=g(k),b!==void 0&&E.hasValue){var O=E.value;if(b(O,k))return w=O}return w=k}if(O=w,i(_,k))return O;var R=g(k);return b!==void 0&&b(O,R)?(_=k,O):(_=k,w=R)}var v=!1,_,w,N=f===void 0?null:f;return[function(){return S(p())},N===null?void 0:function(){return S(N())}]},[p,f,g,b]);var y=s(h,x[0],x[1]);return u(function(){E.hasValue=!0,E.value=y},[y]),d(y),y},Vh}var Tw;function _3(){return Tw||(Tw=1,Gh.exports=v3()),Gh.exports}var S3=_3();function E3(e,t=i=>i,n={}){const i=n.equal??x3;return S3.useSyncExternalStoreWithSelector(e.subscribe,()=>e.state,()=>e.state,t,i)}function x3(e,t){if(Object.is(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(const[i,s]of e)if(!t.has(i)||!Object.is(s,t.get(i)))return!1;return!0}if(e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(const i of e)if(!t.has(i))return!1;return!0}if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();const n=kw(e);if(n.length!==kw(t).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(t,n[i])||!Object.is(e[n[i]],t[n[i]]))return!1;return!0}function kw(e){return Object.keys(e).concat(Object.getOwnPropertySymbols(e))}const Yh=G.createContext(null);function CO(){return typeof document>"u"?Yh:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Yh,Yh)}function Nn(e){const t=G.useContext(CO());return e?.warn,t}function hn(e){const t=Nn({warn:e?.router===void 0}),n=e?.router||t,i=G.useRef(void 0);return E3(n.__store,s=>{if(e?.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const l=Hn(i.current,e.select(s));return i.current=l,l}return e.select(s)}return s})}const Kc=G.createContext(void 0),w3=G.createContext(void 0);function ur(e){const t=G.useContext(e.from?w3:Kc);return hn({select:i=>{const s=i.matches.find(l=>e.from?e.from===l.routeId:l.id===t);if(Lr(!((e.shouldThrow??!0)&&!s),`Could not find ${e.from?`an active match from "${e.from}"`:"a nearest match!"}`),s!==void 0)return e.select?e.select(s):s},structuralSharing:e.structuralSharing})}function r_(e){return ur({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function i_(e){const{select:t,...n}=e;return ur({...n,select:i=>t?t(i.loaderDeps):i.loaderDeps})}function a_(e){return ur({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function s_(e){return ur({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function Yc(e){const t=Nn();return G.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}var C3=QN();function T3(e,t){const n=Nn(),[i,s]=G.useState(!1),l=G.useRef(!1),u=h3(t),{activeProps:o,inactiveProps:d,activeOptions:h,to:p,preload:f,preloadDelay:g,hashScrollIntoView:b,replace:x,startTransition:E,resetScroll:y,viewTransition:S,children:v,target:_,disabled:w,style:N,className:k,onClick:O,onFocus:R,onMouseEnter:I,onMouseLeave:L,onTouchStart:F,ignoreBlocker:j,params:z,search:V,hash:K,state:W,mask:Z,reloadDocument:Q,unsafeRelative:P,from:M,_fromLocation:B,...q}=e,U=hn({select:Oe=>Oe.location.search,structuralSharing:!0}),ee=e.from,ce=G.useMemo(()=>({...e,from:ee}),[n,U,ee,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ne=G.useMemo(()=>n.buildLocation({...ce}),[n,ce]),Y=G.useMemo(()=>{if(w)return;let Oe=ne.maskedLocation?ne.maskedLocation.url.href:ne.url.href,Re=!1;return n.origin&&(Oe.startsWith(n.origin)?Oe=n.history.createHref(Oe.replace(n.origin,""))||"/":Re=!0),{href:Oe,external:Re}},[w,ne.maskedLocation,ne.url,n.origin,n.history]),$=G.useMemo(()=>{if(Y?.external)return Rc(Y.href)?void 0:Y.href;try{return new URL(p),Rc(p)?void 0:p}catch{}},[p,Y]),re=e.reloadDocument||$?!1:f??n.options.defaultPreload,he=g??n.options.defaultPreloadDelay??0,ge=hn({select:Oe=>{if($)return!1;if(h?.exact){if(!MB(Oe.location.pathname,ne.pathname,n.basepath))return!1}else{const Re=Oc(Oe.location.pathname,n.basepath),we=Oc(ne.pathname,n.basepath);if(!(Re.startsWith(we)&&(Re.length===we.length||Re[we.length]==="/")))return!1}return(h?.includeSearch??!0)&&!Gi(Oe.location.search,ne.search,{partial:!h?.exact,ignoreUndefined:!h?.explicitUndefined})?!1:h?.includeHash?Oe.location.hash===ne.hash:!0}}),be=G.useCallback(()=>{n.preloadRoute({...ce}).catch(Oe=>{console.warn(Oe),console.warn(c3)})},[n,ce]),Ee=G.useCallback(Oe=>{Oe?.isIntersecting&&be()},[be]);d3(u,Ee,O3,{disabled:!!w||re!=="viewport"}),G.useEffect(()=>{l.current||!w&&re==="render"&&(be(),l.current=!0)},[w,be,re]);const Me=Oe=>{const Re=Oe.currentTarget.getAttribute("target"),we=_!==void 0?_:Re;if(!w&&!I3(Oe)&&!Oe.defaultPrevented&&(!we||we==="_self")&&Oe.button===0){Oe.preventDefault(),C3.flushSync(()=>{s(!0)});const oe=n.subscribe("onResolved",()=>{oe(),s(!1)});n.navigate({...ce,replace:x,resetScroll:y,hashScrollIntoView:b,startTransition:E,viewTransition:S,ignoreBlocker:j})}};if($)return{...q,ref:u,href:$,...v&&{children:v},..._&&{target:_},...w&&{disabled:w},...N&&{style:N},...k&&{className:k},...O&&{onClick:O},...R&&{onFocus:R},...I&&{onMouseEnter:I},...L&&{onMouseLeave:L},...F&&{onTouchStart:F}};const ze=Oe=>{w||re&&be()},We=ze,xe=Oe=>{if(!(w||!re))if(!he)be();else{const Re=Oe.target;if(ao.has(Re))return;const we=setTimeout(()=>{ao.delete(Re),be()},he);ao.set(Re,we)}},yt=Oe=>{if(w||!re||!he)return;const Re=Oe.target,we=ao.get(Re);we&&(clearTimeout(we),ao.delete(Re))},vt=ge?ui(o,{})??k3:Xh,et=ge?Xh:ui(d,{})??Xh,Bt=[k,vt.className,et.className].filter(Boolean).join(" "),Tt=(N||vt.style||et.style)&&{...N,...vt.style,...et.style};return{...q,...vt,...et,href:Y?.href,ref:u,onClick:so([O,Me]),onFocus:so([R,ze]),onMouseEnter:so([I,xe]),onMouseLeave:so([L,yt]),onTouchStart:so([F,We]),disabled:!!w,target:_,...Tt&&{style:Tt},...Bt&&{className:Bt},...w&&A3,...ge&&R3,...i&&N3}}const Xh={},k3={className:"active"},A3={role:"link","aria-disabled":!0},R3={"data-status":"active","aria-current":"page"},N3={"data-transitioning":"transitioning"},ao=new WeakMap,O3={rootMargin:"100px"},so=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}},TO=G.forwardRef((e,t)=>{const{_asChild:n,...i}=e,{type:s,ref:l,...u}=T3(i,t),o=typeof i.children=="function"?i.children({isActive:u["data-status"]==="active"}):i.children;return n===void 0&&delete u.disabled,G.createElement(n||"a",{...u,ref:l},o)});function I3(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}let L3=class extends wO{constructor(t){super(t),this.useMatch=n=>ur({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ur({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>s_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>a_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>i_({...n,from:this.id}),this.useLoaderData=n=>r_({...n,from:this.id}),this.useNavigate=()=>Yc({from:this.fullPath}),this.Link=Gt.forwardRef((n,i)=>T.jsx(TO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}};function D3(e){return new L3(e)}class M3 extends u3{constructor(t){super(t),this.useMatch=n=>ur({select:n?.select,from:this.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ur({...n,from:this.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>s_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useParams=n=>a_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.id}),this.useLoaderDeps=n=>i_({...n,from:this.id}),this.useLoaderData=n=>r_({...n,from:this.id}),this.useNavigate=()=>Yc({from:this.fullPath}),this.Link=Gt.forwardRef((n,i)=>T.jsx(TO,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function B3(e){return new M3(e)}function Eo(e){return typeof e=="object"?new Aw(e,{silent:!0}).createRoute(e):new Aw(e,{silent:!0}).createRoute}class Aw{constructor(t,n){this.path=t,this.createRoute=i=>{this.silent;const s=D3(i);return s.isRoot=!1,s},this.silent=n?.silent}}class Rw{constructor(t){this.useMatch=n=>ur({select:n?.select,from:this.options.id,structuralSharing:n?.structuralSharing}),this.useRouteContext=n=>ur({from:this.options.id,select:i=>n?.select?n.select(i.context):i.context}),this.useSearch=n=>s_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useParams=n=>a_({select:n?.select,structuralSharing:n?.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>i_({...n,from:this.options.id}),this.useLoaderData=n=>r_({...n,from:this.options.id}),this.useNavigate=()=>{const n=Nn();return Yc({from:n.routesById[this.options.id].fullPath})},this.options=t,this.$$typeof=Symbol.for("react.memo")}}function Nw(e){return typeof e=="object"?new Rw(e):t=>new Rw({id:e,...t})}function F3(){const e=Nn(),t=G.useRef({router:e,mounted:!1}),[n,i]=G.useState(!1),{hasPendingMatches:s,isLoading:l}=hn({select:f=>({isLoading:f.isLoading,hasPendingMatches:f.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),u=$h(l),o=l||n||s,d=$h(o),h=l||s,p=$h(h);return e.startTransition=f=>{i(!0),G.startTransition(()=>{f(),i(!1)})},G.useEffect(()=>{const f=e.history.subscribe(e.load),g=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return gi(e.latestLocation.publicHref)!==gi(g.publicHref)&&e.commitLocation({...g,replace:!0}),()=>{f()}},[e,e.history]),nc(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(g){console.error(g)}})()},[e]),nc(()=>{u&&!l&&e.emit({type:"onLoad",...Vi(e.state)})},[u,e,l]),nc(()=>{p&&!h&&e.emit({type:"onBeforeRouteMount",...Vi(e.state)})},[h,p,e]),nc(()=>{if(d&&!o){const f=Vi(e.state);e.emit({type:"onResolved",...f}),e.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),f.hrefChanged&&qB(e)}},[o,d,e]),null}function P3(e){const t=hn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return T.jsx(n_,{getResetKey:()=>t,onCatch:(n,i)=>{if(An(n))e.onCatch?.(n,i);else throw n},errorComponent:({error:n})=>{if(An(n))return e.fallback?.(n);throw n},children:e.children})}function U3(){return T.jsx("p",{children:"Not Found"})}function Va(e){return T.jsx(T.Fragment,{children:e.children})}function kO(e,t,n){return t.options.notFoundComponent?T.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?T.jsx(e.options.defaultNotFoundComponent,{...n}):T.jsx(U3,{})}function j3({children:e}){const t=Nn();return t.isServer?T.jsx("script",{nonce:t.options.ssr?.nonce,dangerouslySetInnerHTML:{__html:e+";document.currentScript.remove()"}}):null}function z3(){const e=Nn();if(!e.isScrollRestoring||!e.isServer||typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))return null;const n=(e.options.getScrollRestorationKey||fv)(e.latestLocation),i=n!==fv(e.latestLocation)?n:void 0,s={storageKey:Ic,shouldScrollRestoration:!0};return i&&(s.key=i),T.jsx(j3,{children:`(${mO.toString()})(${_B(JSON.stringify(s))})`})}const AO=G.memo(function({matchId:t}){const n=Nn(),i=hn({select:S=>{const v=S.matches.find(_=>_.id===t);return Lr(v),{routeId:v.routeId,ssr:v.ssr,_displayPending:v._displayPending}},structuralSharing:!0}),s=n.routesById[i.routeId],l=s.options.pendingComponent??n.options.defaultPendingComponent,u=l?T.jsx(l,{}):null,o=s.options.errorComponent??n.options.defaultErrorComponent,d=s.options.onCatch??n.options.defaultOnCatch,h=s.isRoot?s.options.notFoundComponent??n.options.notFoundRoute?.options.component:s.options.notFoundComponent,p=i.ssr===!1||i.ssr==="data-only",f=(!s.isRoot||s.options.wrapInSuspense||p)&&(s.options.wrapInSuspense??l??(s.options.errorComponent?.preload||p))?G.Suspense:Va,g=o?n_:Va,b=h?P3:Va,x=hn({select:S=>S.loadedAt}),E=hn({select:S=>{const v=S.matches.findIndex(_=>_.id===t);return S.matches[v-1]?.routeId}}),y=s.isRoot?s.options.shellComponent??Va:Va;return T.jsxs(y,{children:[T.jsx(Kc.Provider,{value:t,children:T.jsx(f,{fallback:u,children:T.jsx(g,{getResetKey:()=>x,errorComponent:o||Wc,onCatch:(S,v)=>{if(An(S))throw S;d?.(S,v)},children:T.jsx(b,{fallback:S=>{if(!h||S.routeId&&S.routeId!==i.routeId||!S.routeId&&!s.isRoot)throw S;return G.createElement(h,S)},children:p||i._displayPending?T.jsx(p3,{fallback:u,children:T.jsx(Ow,{matchId:t})}):T.jsx(Ow,{matchId:t})})})})}),E===Tn&&n.options.scrollRestoration?T.jsxs(T.Fragment,{children:[T.jsx(H3,{}),T.jsx(z3,{})]}):null]})});function H3(){const e=Nn(),t=G.useRef(void 0);return T.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(t.current===void 0||t.current.href!==e.latestLocation.href)&&(e.emit({type:"onRendered",...Vi(e.state)}),t.current=e.latestLocation)}},e.latestLocation.state.__TSR_key)}const Ow=G.memo(function({matchId:t}){const n=Nn(),{match:i,key:s,routeId:l}=hn({select:d=>{const h=d.matches.find(x=>x.id===t),p=h.routeId,g=(n.routesById[p].options.remountDeps??n.options.defaultRemountDeps)?.({routeId:p,loaderDeps:h.loaderDeps,params:h._strictParams,search:h._strictSearch});return{key:g?JSON.stringify(g):void 0,routeId:p,match:{id:h.id,status:h.status,error:h.error,invalid:h.invalid,_forcePending:h._forcePending,_displayPending:h._displayPending}}},structuralSharing:!0}),u=n.routesById[l],o=G.useMemo(()=>{const d=u.options.component??n.options.defaultComponent;return d?T.jsx(d,{},s):T.jsx(RO,{})},[s,u.options.component,n.options.defaultComponent]);if(i._displayPending)throw n.getMatch(i.id)?._nonReactive.displayPendingPromise;if(i._forcePending)throw n.getMatch(i.id)?._nonReactive.minPendingPromise;if(i.status==="pending"){const d=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(d){const h=n.getMatch(i.id);if(h&&!h._nonReactive.minPendingPromise&&!n.isServer){const p=Qa();h._nonReactive.minPendingPromise=p,setTimeout(()=>{p.resolve(),h._nonReactive.minPendingPromise=void 0},d)}}throw n.getMatch(i.id)?._nonReactive.loadPromise}if(i.status==="notFound")return Lr(An(i.error)),kO(n,u,i.error);if(i.status==="redirected")throw Lr(Gn(i.error)),n.getMatch(i.id)?._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const d=(u.options.errorComponent??n.options.defaultErrorComponent)||Wc;return T.jsx(d,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return o}),RO=G.memo(function(){const t=Nn(),n=G.useContext(Kc),i=hn({select:h=>h.matches.find(p=>p.id===n)?.routeId}),s=t.routesById[i],l=hn({select:h=>{const f=h.matches.find(g=>g.id===n);return Lr(f),f.globalNotFound}}),u=hn({select:h=>{const p=h.matches,f=p.findIndex(g=>g.id===n);return p[f+1]?.id}}),o=t.options.defaultPendingComponent?T.jsx(t.options.defaultPendingComponent,{}):null;if(l)return kO(t,s,void 0);if(!u)return null;const d=T.jsx(AO,{matchId:u});return i===Tn?T.jsx(G.Suspense,{fallback:o,children:d}):d});function q3(){const e=Nn(),n=e.routesById[Tn].options.pendingComponent??e.options.defaultPendingComponent,i=n?T.jsx(n,{}):null,s=e.isServer||typeof document<"u"&&e.ssr?Va:G.Suspense,l=T.jsxs(s,{fallback:i,children:[!e.isServer&&T.jsx(F3,{}),T.jsx($3,{})]});return e.options.InnerWrap?T.jsx(e.options.InnerWrap,{children:l}):l}function $3(){const e=Nn(),t=hn({select:s=>s.matches[0]?.id}),n=hn({select:s=>s.loadedAt}),i=t?T.jsx(AO,{matchId:t}):null;return T.jsx(Kc.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?i:T.jsx(n_,{getResetKey:()=>n,errorComponent:Wc,onCatch:s=>{s.message||s.toString()},children:i})})}const G3=e=>new V3(e);class V3 extends i3{constructor(t){super(t)}}typeof globalThis<"u"?(globalThis.createFileRoute=Eo,globalThis.createLazyFileRoute=Nw):typeof window<"u"&&(window.createFileRoute=Eo,window.createLazyFileRoute=Nw);function W3({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const i=CO(),s=T.jsx(i.Provider,{value:e,children:t});return e.options.Wrap?T.jsx(e.options.Wrap,{children:s}):s}function K3({router:e,...t}){return T.jsx(W3,{router:e,...t,children:T.jsx(q3,{})})}const Xc=B3({component:Y3});function Y3(){return T.jsxs(T.Fragment,{children:[T.jsx(RO,{}),null]})}const X3=Eo("/")({beforeLoad:()=>{throw t_({to:"/sessions"})},component:()=>null}),bt=G.forwardRef(({className:e="",variant:t="primary",size:n="md",...i},s)=>{const l="inline-flex items-center justify-center rounded font-medium transition-colors focus-visible:outline-none disabled:opacity-50 disabled:cursor-not-allowed",u={primary:"bg-primary text-primary-foreground hover:bg-primary/90",secondary:"bg-muted text-foreground hover:bg-muted/80 border border-border",ghost:"text-muted-foreground hover:text-foreground hover:bg-muted/50"},o={sm:"px-3 py-1.5 text-sm",md:"px-4 py-2 text-sm",lg:"px-6 py-3 text-base",icon:"w-10 h-10 p-0"};return T.jsx("button",{ref:s,className:`${l} ${u[t]} ${o[n]} ${e}`,...i})});bt.displayName="Button";const Z3=G.forwardRef(({className:e="",children:t,...n},i)=>T.jsx("div",{ref:i,className:`bg-card text-card-foreground border border-border rounded-lg ${e}`,...n,children:t}));Z3.displayName="Card";const Q3=G.forwardRef(({className:e="",...t},n)=>T.jsx("input",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none ${e}`,...t}));Q3.displayName="Input";const o_=G.forwardRef(({className:e="",...t},n)=>T.jsx("textarea",{ref:n,className:`w-full px-3 py-2 bg-muted border border-border rounded text-foreground placeholder-muted-foreground outline-none resize-none ${e}`,...t}));o_.displayName="Textarea";const Iw=e=>{let t;const n=new Set,i=(h,p)=>{const f=typeof h=="function"?h(t):h;if(!Object.is(f,t)){const g=t;t=p??(typeof f!="object"||f===null)?f:Object.assign({},t,f),n.forEach(b=>b(t,g))}},s=()=>t,o={setState:i,getState:s,getInitialState:()=>d,subscribe:h=>(n.add(h),()=>n.delete(h))},d=t=e(i,s,o);return o},J3=(e=>e?Iw(e):Iw),eF=e=>e;function tF(e,t=eF){const n=Gt.useSyncExternalStore(e.subscribe,Gt.useCallback(()=>t(e.getState()),[e,t]),Gt.useCallback(()=>t(e.getInitialState()),[e,t]));return Gt.useDebugValue(n),n}const Lw=e=>{const t=J3(e),n=i=>tF(t,i);return Object.assign(n,t),n},No=(e=>e?Lw(e):Lw),l_=No(e=>({isOpen:!1,title:"Confirm Action",message:"",confirmLabel:"Confirm",cancelLabel:"Cancel",variant:"default",onConfirm:()=>{},onCancel:void 0,openConfirmation:t=>e({isOpen:!0,title:t.title||"Confirm Action",message:t.message,confirmLabel:t.confirmLabel||"Confirm",cancelLabel:t.cancelLabel||"Cancel",variant:t.variant||"default",onConfirm:t.onConfirm,onCancel:t.onCancel}),closeConfirmation:()=>e({isOpen:!1,onConfirm:()=>{},onCancel:void 0})}));const nF=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),rF=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,i)=>i?i.toUpperCase():n.toLowerCase()),Dw=e=>{const t=rF(e);return t.charAt(0).toUpperCase()+t.slice(1)},NO=(...e)=>e.filter((t,n,i)=>!!t&&t.trim()!==""&&i.indexOf(t)===n).join(" ").trim(),iF=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var aF={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const sF=G.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:s="",children:l,iconNode:u,...o},d)=>G.createElement("svg",{ref:d,...aF,width:t,height:t,stroke:e,strokeWidth:i?Number(n)*24/Number(t):n,className:NO("lucide",s),...!l&&!iF(o)&&{"aria-hidden":"true"},...o},[...u.map(([h,p])=>G.createElement(h,p)),...Array.isArray(l)?l:[l]]));const ke=(e,t)=>{const n=G.forwardRef(({className:i,...s},l)=>G.createElement(sF,{ref:l,iconNode:t,className:NO(`lucide-${nF(Dw(e))}`,`lucide-${e}`,i),...s}));return n.displayName=Dw(e),n};const oF=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],lF=ke("arrow-down",oF);const cF=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],uF=ke("arrow-left",cF);const dF=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],hF=ke("arrow-right",dF);const fF=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],pF=ke("arrow-up",fF);const mF=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],OO=ke("bot",mF);const gF=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],bF=ke("braces",gF);const yF=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],c_=ke("brain",yF);const vF=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Zc=ke("check",vF);const _F=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Qi=ke("chevron-down",_F);const SF=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xt=ke("chevron-right",SF);const EF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Mr=ke("circle-alert",EF);const xF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],wF=ke("circle-check",xF);const CF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],IO=ke("circle-stop",CF);const TF=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],kF=ke("circle",TF);const AF=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],RF=ke("clock",AF);const NF=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],OF=ke("code",NF);const IF=[["path",{d:"M15 6v12a3 3 0 1 0 3-3H6a3 3 0 1 0 3 3V6a3 3 0 1 0-3 3h12a3 3 0 1 0-3-3",key:"11bfej"}]],Mw=ke("command",IF);const LF=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],DF=ke("copy",LF);const MF=[["path",{d:"M12 3v14",key:"7cf3v8"}],["path",{d:"M5 10h14",key:"elsbfy"}],["path",{d:"M5 21h14",key:"11awu3"}]],Bw=ke("diff",MF);const BF=[["line",{x1:"12",x2:"12",y1:"2",y2:"22",key:"7eqyqh"}],["path",{d:"M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6",key:"1b0p4s"}]],LO=ke("dollar-sign",BF);const FF=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],PF=ke("ellipsis-vertical",FF);const UF=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],jF=ke("external-link",UF);const zF=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],HF=ke("file-code",zF);const qF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],$F=ke("file-json",qF);const GF=[["path",{d:"M12.5 22H18a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v9.5",key:"1couwa"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M13.378 15.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z",key:"1y4qbx"}]],Fw=ke("file-pen",GF);const VF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 15h6",key:"cctwl0"}],["path",{d:"M12 18v-6",key:"17g6i2"}]],WF=ke("file-plus",VF);const KF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],DO=ke("file-text",KF);const YF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M9 13v-1h6v1",key:"1bb014"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M11 18h2",key:"12mj7e"}]],XF=ke("file-type",YF);const ZF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]],QF=ke("file-x",ZF);const JF=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],go=ke("file",JF);const e4=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],t4=ke("folder-tree",e4);const n4=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],r4=ke("folder",n4);const i4=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],xo=ke("git-branch",i4);const a4=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Mc=ke("git-commit-horizontal",a4);const s4=[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]],MO=ke("hash",s4);const o4=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],gv=ke("image",o4);const l4=[["path",{d:"M10 8h.01",key:"1r9ogq"}],["path",{d:"M12 12h.01",key:"1mp3jc"}],["path",{d:"M14 8h.01",key:"1primd"}],["path",{d:"M16 12h.01",key:"1l6xoz"}],["path",{d:"M18 8h.01",key:"emo2bl"}],["path",{d:"M6 8h.01",key:"x9i8wu"}],["path",{d:"M7 16h10",key:"wp8him"}],["path",{d:"M8 12h.01",key:"czm47f"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}]],BO=ke("keyboard",l4);const c4=[["path",{d:"M3 5h.01",key:"18ugdj"}],["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 19h.01",key:"noohij"}],["path",{d:"M8 5h13",key:"1pao27"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 19h13",key:"m83p4d"}]],u4=ke("list",c4);const d4=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],FO=ke("loader-circle",d4);const h4=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],f4=ke("message-square",h4);const p4=[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],m4=ke("octagon-x",p4);const g4=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Pw=ke("pencil",g4);const b4=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bc=ke("plus",b4);const y4=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],v4=ke("refresh-cw",y4);const _4=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],S4=ke("rotate-ccw",_4);const E4=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],u_=ke("search",E4);const x4=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],wo=ke("sparkles",x4);const w4=[["path",{d:"M21 10.656V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.344",key:"2acyp4"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],C4=ke("square-check-big",w4);const T4=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],Ji=ke("terminal",T4);const k4=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],A4=ke("trash-2",k4);const R4=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],N4=ke("upload",R4);const O4=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],PO=ke("user",O4);const I4=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],is=ke("x",I4);function L4(){const{isOpen:e,title:t,message:n,confirmLabel:i,cancelLabel:s,variant:l,onConfirm:u,onCancel:o,closeConfirmation:d}=l_(),[h,p]=G.useState(!1);G.useEffect(()=>{e||p(!1)},[e]);const f=G.useCallback(async()=>{p(!0);try{await u(),d()}catch(x){console.error("Confirmation action failed:",x),p(!1)}},[u,d]),g=G.useCallback(()=>{o?.(),d()},[o,d]),b=x=>{x.target===x.currentTarget&&!h&&g()};return G.useEffect(()=>{const x=E=>{if(e&&!h){const y=E.target,S=y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable;(E.key==="Escape"||E.key==="q"&&!S)&&(E.preventDefault(),g()),E.key==="Enter"&&(E.preventDefault(),f())}};if(e)return document.addEventListener("keydown",x),()=>document.removeEventListener("keydown",x)},[e,h,f,g]),e?T.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 bg-black/50 flex items-center justify-center z-50",onClick:b,onKeyDown:x=>{const E=x.target,y=E.tagName==="INPUT"||E.tagName==="TEXTAREA"||E.isContentEditable;(x.key==="Escape"||x.key==="q"&&!y)&&!h&&(x.preventDefault(),g())},children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg max-w-md w-full mx-4",children:[T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[l==="destructive"&&T.jsx(Mr,{className:"w-5 h-5 text-destructive"}),T.jsx("h2",{className:"text-lg font-semibold",children:t})]}),T.jsx("button",{type:"button",onClick:g,disabled:h,className:"p-1 hover:bg-muted rounded transition-colors disabled:opacity-50","aria-label":"Close",children:T.jsx(is,{className:"w-5 h-5"})})]}),T.jsx("div",{className:"p-4",children:T.jsx("p",{className:"text-muted-foreground",children:n})}),T.jsxs("div",{className:"flex items-center justify-end gap-3 p-4 border-t border-border",children:[T.jsx("button",{type:"button",onClick:g,disabled:h,className:"px-4 py-2 text-sm font-medium rounded transition-colors hover:bg-muted disabled:opacity-50",children:s}),T.jsx("button",{type:"button",onClick:f,disabled:h,className:`px-4 py-2 text-sm font-medium rounded transition-colors disabled:opacity-50 ${l==="destructive"?"bg-destructive text-destructive-foreground hover:bg-destructive/90":"bg-primary text-primary-foreground hover:bg-primary/90"}`,children:h?"Processing...":i})]})]})}):null}function Dr(e){return Array.isArray?Array.isArray(e):zO(e)==="[object Array]"}function D4(e){if(typeof e=="string")return e;let t=e+"";return t=="0"&&1/e==-1/0?"-0":t}function M4(e){return e==null?"":D4(e)}function cr(e){return typeof e=="string"}function UO(e){return typeof e=="number"}function B4(e){return e===!0||e===!1||F4(e)&&zO(e)=="[object Boolean]"}function jO(e){return typeof e=="object"}function F4(e){return jO(e)&&e!==null}function kn(e){return e!=null}function Zh(e){return!e.trim().length}function zO(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const P4="Incorrect 'index' type",U4=e=>`Invalid value for key ${e}`,j4=e=>`Pattern length exceeds max of ${e}.`,z4=e=>`Missing ${e} property in key`,H4=e=>`Property 'weight' in key '${e}' must be a positive integer`,Uw=Object.prototype.hasOwnProperty;class q4{constructor(t){this._keys=[],this._keyMap={};let n=0;t.forEach(i=>{let s=HO(i);this._keys.push(s),this._keyMap[s.id]=s,n+=s.weight}),this._keys.forEach(i=>{i.weight/=n})}get(t){return this._keyMap[t]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function HO(e){let t=null,n=null,i=null,s=1,l=null;if(cr(e)||Dr(e))i=e,t=jw(e),n=bv(e);else{if(!Uw.call(e,"name"))throw new Error(z4("name"));const u=e.name;if(i=u,Uw.call(e,"weight")&&(s=e.weight,s<=0))throw new Error(H4(u));t=jw(u),n=bv(u),l=e.getFn}return{path:t,id:n,weight:s,src:i,getFn:l}}function jw(e){return Dr(e)?e:e.split(".")}function bv(e){return Dr(e)?e.join("."):e}function $4(e,t){let n=[],i=!1;const s=(l,u,o)=>{if(kn(l))if(!u[o])n.push(l);else{let d=u[o];const h=l[d];if(!kn(h))return;if(o===u.length-1&&(cr(h)||UO(h)||B4(h)))n.push(M4(h));else if(Dr(h)){i=!0;for(let p=0,f=h.length;p<f;p+=1)s(h[p],u,o+1)}else u.length&&s(h,u,o+1)}};return s(e,cr(t)?t.split("."):t,0),i?n:n[0]}const G4={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},V4={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(e,t)=>e.score===t.score?e.idx<t.idx?-1:1:e.score<t.score?-1:1},W4={location:0,threshold:.6,distance:100},K4={useExtendedSearch:!1,getFn:$4,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var Ie={...V4,...G4,...W4,...K4};const Y4=/[^ ]+/g;function X4(e=1,t=3){const n=new Map,i=Math.pow(10,t);return{get(s){const l=s.match(Y4).length;if(n.has(l))return n.get(l);const u=1/Math.pow(l,.5*e),o=parseFloat(Math.round(u*i)/i);return n.set(l,o),o},clear(){n.clear()}}}class d_{constructor({getFn:t=Ie.getFn,fieldNormWeight:n=Ie.fieldNormWeight}={}){this.norm=X4(n,3),this.getFn=t,this.isCreated=!1,this.setIndexRecords()}setSources(t=[]){this.docs=t}setIndexRecords(t=[]){this.records=t}setKeys(t=[]){this.keys=t,this._keysMap={},t.forEach((n,i)=>{this._keysMap[n.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,cr(this.docs[0])?this.docs.forEach((t,n)=>{this._addString(t,n)}):this.docs.forEach((t,n)=>{this._addObject(t,n)}),this.norm.clear())}add(t){const n=this.size();cr(t)?this._addString(t,n):this._addObject(t,n)}removeAt(t){this.records.splice(t,1);for(let n=t,i=this.size();n<i;n+=1)this.records[n].i-=1}getValueForItemAtKeyId(t,n){return t[this._keysMap[n]]}size(){return this.records.length}_addString(t,n){if(!kn(t)||Zh(t))return;let i={v:t,i:n,n:this.norm.get(t)};this.records.push(i)}_addObject(t,n){let i={i:n,$:{}};this.keys.forEach((s,l)=>{let u=s.getFn?s.getFn(t):this.getFn(t,s.path);if(kn(u)){if(Dr(u)){let o=[];const d=[{nestedArrIndex:-1,value:u}];for(;d.length;){const{nestedArrIndex:h,value:p}=d.pop();if(kn(p))if(cr(p)&&!Zh(p)){let f={v:p,i:h,n:this.norm.get(p)};o.push(f)}else Dr(p)&&p.forEach((f,g)=>{d.push({nestedArrIndex:g,value:f})})}i.$[l]=o}else if(cr(u)&&!Zh(u)){let o={v:u,n:this.norm.get(u)};i.$[l]=o}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function qO(e,t,{getFn:n=Ie.getFn,fieldNormWeight:i=Ie.fieldNormWeight}={}){const s=new d_({getFn:n,fieldNormWeight:i});return s.setKeys(e.map(HO)),s.setSources(t),s.create(),s}function Z4(e,{getFn:t=Ie.getFn,fieldNormWeight:n=Ie.fieldNormWeight}={}){const{keys:i,records:s}=e,l=new d_({getFn:t,fieldNormWeight:n});return l.setKeys(i),l.setIndexRecords(s),l}function rc(e,{errors:t=0,currentLocation:n=0,expectedLocation:i=0,distance:s=Ie.distance,ignoreLocation:l=Ie.ignoreLocation}={}){const u=t/e.length;if(l)return u;const o=Math.abs(i-n);return s?u+o/s:o?1:u}function Q4(e=[],t=Ie.minMatchCharLength){let n=[],i=-1,s=-1,l=0;for(let u=e.length;l<u;l+=1){let o=e[l];o&&i===-1?i=l:!o&&i!==-1&&(s=l-1,s-i+1>=t&&n.push([i,s]),i=-1)}return e[l-1]&&l-i>=t&&n.push([i,l-1]),n}const zi=32;function J4(e,t,n,{location:i=Ie.location,distance:s=Ie.distance,threshold:l=Ie.threshold,findAllMatches:u=Ie.findAllMatches,minMatchCharLength:o=Ie.minMatchCharLength,includeMatches:d=Ie.includeMatches,ignoreLocation:h=Ie.ignoreLocation}={}){if(t.length>zi)throw new Error(j4(zi));const p=t.length,f=e.length,g=Math.max(0,Math.min(i,f));let b=l,x=g;const E=o>1||d,y=E?Array(f):[];let S;for(;(S=e.indexOf(t,x))>-1;){let O=rc(t,{currentLocation:S,expectedLocation:g,distance:s,ignoreLocation:h});if(b=Math.min(O,b),x=S+p,E){let R=0;for(;R<p;)y[S+R]=1,R+=1}}x=-1;let v=[],_=1,w=p+f;const N=1<<p-1;for(let O=0;O<p;O+=1){let R=0,I=w;for(;R<I;)rc(t,{errors:O,currentLocation:g+I,expectedLocation:g,distance:s,ignoreLocation:h})<=b?R=I:w=I,I=Math.floor((w-R)/2+R);w=I;let L=Math.max(1,g-I+1),F=u?f:Math.min(g+I,f)+p,j=Array(F+2);j[F+1]=(1<<O)-1;for(let V=F;V>=L;V-=1){let K=V-1,W=n[e.charAt(K)];if(E&&(y[K]=+!!W),j[V]=(j[V+1]<<1|1)&W,O&&(j[V]|=(v[V+1]|v[V])<<1|1|v[V+1]),j[V]&N&&(_=rc(t,{errors:O,currentLocation:K,expectedLocation:g,distance:s,ignoreLocation:h}),_<=b)){if(b=_,x=K,x<=g)break;L=Math.max(1,2*g-x)}}if(rc(t,{errors:O+1,currentLocation:g,expectedLocation:g,distance:s,ignoreLocation:h})>b)break;v=j}const k={isMatch:x>=0,score:Math.max(.001,_)};if(E){const O=Q4(y,o);O.length?d&&(k.indices=O):k.isMatch=!1}return k}function eP(e){let t={};for(let n=0,i=e.length;n<i;n+=1){const s=e.charAt(n);t[s]=(t[s]||0)|1<<i-n-1}return t}const Fc=String.prototype.normalize?(e=>e.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,"")):(e=>e);class $O{constructor(t,{location:n=Ie.location,threshold:i=Ie.threshold,distance:s=Ie.distance,includeMatches:l=Ie.includeMatches,findAllMatches:u=Ie.findAllMatches,minMatchCharLength:o=Ie.minMatchCharLength,isCaseSensitive:d=Ie.isCaseSensitive,ignoreDiacritics:h=Ie.ignoreDiacritics,ignoreLocation:p=Ie.ignoreLocation}={}){if(this.options={location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p},t=d?t:t.toLowerCase(),t=h?Fc(t):t,this.pattern=t,this.chunks=[],!this.pattern.length)return;const f=(b,x)=>{this.chunks.push({pattern:b,alphabet:eP(b),startIndex:x})},g=this.pattern.length;if(g>zi){let b=0;const x=g%zi,E=g-x;for(;b<E;)f(this.pattern.substr(b,zi),b),b+=zi;if(x){const y=g-zi;f(this.pattern.substr(y),y)}}else f(this.pattern,0)}searchIn(t){const{isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s}=this.options;if(t=n?t:t.toLowerCase(),t=i?Fc(t):t,this.pattern===t){let E={isMatch:!0,score:0};return s&&(E.indices=[[0,t.length-1]]),E}const{location:l,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,ignoreLocation:p}=this.options;let f=[],g=0,b=!1;this.chunks.forEach(({pattern:E,alphabet:y,startIndex:S})=>{const{isMatch:v,score:_,indices:w}=J4(t,E,y,{location:l+S,distance:u,threshold:o,findAllMatches:d,minMatchCharLength:h,includeMatches:s,ignoreLocation:p});v&&(b=!0),g+=_,v&&w&&(f=[...f,...w])});let x={isMatch:b,score:b?g/this.chunks.length:1};return b&&s&&(x.indices=f),x}}class yi{constructor(t){this.pattern=t}static isMultiMatch(t){return zw(t,this.multiRegex)}static isSingleMatch(t){return zw(t,this.singleRegex)}search(){}}function zw(e,t){const n=e.match(t);return n?n[1]:null}class tP extends yi{constructor(t){super(t)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(t){const n=t===this.pattern;return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class nP extends yi{constructor(t){super(t)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(t){const i=t.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,t.length-1]}}}class rP extends yi{constructor(t){super(t)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(t){const n=t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,this.pattern.length-1]}}}class iP extends yi{constructor(t){super(t)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(t){const n=!t.startsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class aP extends yi{constructor(t){super(t)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(t){const n=t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[t.length-this.pattern.length,t.length-1]}}}class sP extends yi{constructor(t){super(t)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(t){const n=!t.endsWith(this.pattern);return{isMatch:n,score:n?0:1,indices:[0,t.length-1]}}}class GO extends yi{constructor(t,{location:n=Ie.location,threshold:i=Ie.threshold,distance:s=Ie.distance,includeMatches:l=Ie.includeMatches,findAllMatches:u=Ie.findAllMatches,minMatchCharLength:o=Ie.minMatchCharLength,isCaseSensitive:d=Ie.isCaseSensitive,ignoreDiacritics:h=Ie.ignoreDiacritics,ignoreLocation:p=Ie.ignoreLocation}={}){super(t),this._bitapSearch=new $O(t,{location:n,threshold:i,distance:s,includeMatches:l,findAllMatches:u,minMatchCharLength:o,isCaseSensitive:d,ignoreDiacritics:h,ignoreLocation:p})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(t){return this._bitapSearch.searchIn(t)}}class VO extends yi{constructor(t){super(t)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(t){let n=0,i;const s=[],l=this.pattern.length;for(;(i=t.indexOf(this.pattern,n))>-1;)n=i+l,s.push([i,n-1]);const u=!!s.length;return{isMatch:u,score:u?0:1,indices:s}}}const yv=[tP,VO,rP,iP,sP,aP,nP,GO],Hw=yv.length,oP=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,lP="|";function cP(e,t={}){return e.split(lP).map(n=>{let i=n.trim().split(oP).filter(l=>l&&!!l.trim()),s=[];for(let l=0,u=i.length;l<u;l+=1){const o=i[l];let d=!1,h=-1;for(;!d&&++h<Hw;){const p=yv[h];let f=p.isMultiMatch(o);f&&(s.push(new p(f,t)),d=!0)}if(!d)for(h=-1;++h<Hw;){const p=yv[h];let f=p.isSingleMatch(o);if(f){s.push(new p(f,t));break}}}return s})}const uP=new Set([GO.type,VO.type]);class dP{constructor(t,{isCaseSensitive:n=Ie.isCaseSensitive,ignoreDiacritics:i=Ie.ignoreDiacritics,includeMatches:s=Ie.includeMatches,minMatchCharLength:l=Ie.minMatchCharLength,ignoreLocation:u=Ie.ignoreLocation,findAllMatches:o=Ie.findAllMatches,location:d=Ie.location,threshold:h=Ie.threshold,distance:p=Ie.distance}={}){this.query=null,this.options={isCaseSensitive:n,ignoreDiacritics:i,includeMatches:s,minMatchCharLength:l,findAllMatches:o,ignoreLocation:u,location:d,threshold:h,distance:p},t=n?t:t.toLowerCase(),t=i?Fc(t):t,this.pattern=t,this.query=cP(this.pattern,this.options)}static condition(t,n){return n.useExtendedSearch}searchIn(t){const n=this.query;if(!n)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:s,ignoreDiacritics:l}=this.options;t=s?t:t.toLowerCase(),t=l?Fc(t):t;let u=0,o=[],d=0;for(let h=0,p=n.length;h<p;h+=1){const f=n[h];o.length=0,u=0;for(let g=0,b=f.length;g<b;g+=1){const x=f[g],{isMatch:E,indices:y,score:S}=x.search(t);if(E){if(u+=1,d+=S,i){const v=x.constructor.type;uP.has(v)?o=[...o,...y]:o.push(y)}}else{d=0,u=0,o.length=0;break}}if(u){let g={isMatch:!0,score:d/u};return i&&(g.indices=o),g}}return{isMatch:!1,score:1}}}const vv=[];function hP(...e){vv.push(...e)}function _v(e,t){for(let n=0,i=vv.length;n<i;n+=1){let s=vv[n];if(s.condition(e,t))return new s(e,t)}return new $O(e,t)}const Pc={AND:"$and",OR:"$or"},Sv={PATH:"$path",PATTERN:"$val"},Ev=e=>!!(e[Pc.AND]||e[Pc.OR]),fP=e=>!!e[Sv.PATH],pP=e=>!Dr(e)&&jO(e)&&!Ev(e),qw=e=>({[Pc.AND]:Object.keys(e).map(t=>({[t]:e[t]}))});function WO(e,t,{auto:n=!0}={}){const i=s=>{let l=Object.keys(s);const u=fP(s);if(!u&&l.length>1&&!Ev(s))return i(qw(s));if(pP(s)){const d=u?s[Sv.PATH]:l[0],h=u?s[Sv.PATTERN]:s[d];if(!cr(h))throw new Error(U4(d));const p={keyId:bv(d),pattern:h};return n&&(p.searcher=_v(h,t)),p}let o={children:[],operator:l[0]};return l.forEach(d=>{const h=s[d];Dr(h)&&h.forEach(p=>{o.children.push(i(p))})}),o};return Ev(e)||(e=qw(e)),i(e)}function mP(e,{ignoreFieldNorm:t=Ie.ignoreFieldNorm}){e.forEach(n=>{let i=1;n.matches.forEach(({key:s,norm:l,score:u})=>{const o=s?s.weight:null;i*=Math.pow(u===0&&o?Number.EPSILON:u,(o||1)*(t?1:l))}),n.score=i})}function gP(e,t){const n=e.matches;t.matches=[],kn(n)&&n.forEach(i=>{if(!kn(i.indices)||!i.indices.length)return;const{indices:s,value:l}=i;let u={indices:s,value:l};i.key&&(u.key=i.key.src),i.idx>-1&&(u.refIndex=i.idx),t.matches.push(u)})}function bP(e,t){t.score=e.score}function yP(e,t,{includeMatches:n=Ie.includeMatches,includeScore:i=Ie.includeScore}={}){const s=[];return n&&s.push(gP),i&&s.push(bP),e.map(l=>{const{idx:u}=l,o={item:t[u],refIndex:u};return s.length&&s.forEach(d=>{d(l,o)}),o})}class vi{constructor(t,n={},i){this.options={...Ie,...n},this.options.useExtendedSearch,this._keyStore=new q4(this.options.keys),this.setCollection(t,i)}setCollection(t,n){if(this._docs=t,n&&!(n instanceof d_))throw new Error(P4);this._myIndex=n||qO(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(t){kn(t)&&(this._docs.push(t),this._myIndex.add(t))}remove(t=()=>!1){const n=[];for(let i=0,s=this._docs.length;i<s;i+=1){const l=this._docs[i];t(l,i)&&(this.removeAt(i),i-=1,s-=1,n.push(l))}return n}removeAt(t){this._docs.splice(t,1),this._myIndex.removeAt(t)}getIndex(){return this._myIndex}search(t,{limit:n=-1}={}){const{includeMatches:i,includeScore:s,shouldSort:l,sortFn:u,ignoreFieldNorm:o}=this.options;let d=cr(t)?cr(this._docs[0])?this._searchStringList(t):this._searchObjectList(t):this._searchLogical(t);return mP(d,{ignoreFieldNorm:o}),l&&d.sort(u),UO(n)&&n>-1&&(d=d.slice(0,n)),yP(d,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(t){const n=_v(t,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:l,i:u,n:o})=>{if(!kn(l))return;const{isMatch:d,score:h,indices:p}=n.searchIn(l);d&&s.push({item:l,idx:u,matches:[{score:h,value:l,norm:o,indices:p}]})}),s}_searchLogical(t){const n=WO(t,this.options),i=(o,d,h)=>{if(!o.children){const{keyId:f,searcher:g}=o,b=this._findMatches({key:this._keyStore.get(f),value:this._myIndex.getValueForItemAtKeyId(d,f),searcher:g});return b&&b.length?[{idx:h,item:d,matches:b}]:[]}const p=[];for(let f=0,g=o.children.length;f<g;f+=1){const b=o.children[f],x=i(b,d,h);if(x.length)p.push(...x);else if(o.operator===Pc.AND)return[]}return p},s=this._myIndex.records,l={},u=[];return s.forEach(({$:o,i:d})=>{if(kn(o)){let h=i(n,o,d);h.length&&(l[d]||(l[d]={idx:d,item:o,matches:[]},u.push(l[d])),h.forEach(({matches:p})=>{l[d].matches.push(...p)}))}}),u}_searchObjectList(t){const n=_v(t,this.options),{keys:i,records:s}=this._myIndex,l=[];return s.forEach(({$:u,i:o})=>{if(!kn(u))return;let d=[];i.forEach((h,p)=>{d.push(...this._findMatches({key:h,value:u[p],searcher:n}))}),d.length&&l.push({idx:o,item:u,matches:d})}),l}_findMatches({key:t,value:n,searcher:i}){if(!kn(n))return[];let s=[];if(Dr(n))n.forEach(({v:l,i:u,n:o})=>{if(!kn(l))return;const{isMatch:d,score:h,indices:p}=i.searchIn(l);d&&s.push({score:h,key:t,value:l,idx:u,norm:o,indices:p})});else{const{v:l,n:u}=n,{isMatch:o,score:d,indices:h}=i.searchIn(l);o&&s.push({score:d,key:t,value:l,norm:u,indices:h})}return s}}vi.version="7.1.0";vi.createIndex=qO;vi.parseIndex=Z4;vi.config=Ie;vi.parseQuery=WO;hP(dP);function vP(e){switch(e.split(".").pop()?.toLowerCase()){case"ts":case"tsx":case"js":case"jsx":case"mjs":case"cjs":case"py":case"rb":case"go":case"rs":case"java":case"c":case"cpp":case"h":case"hpp":return HF;case"json":case"yaml":case"yml":case"toml":return $F;case"md":case"txt":case"log":return DO;case"png":case"jpg":case"jpeg":case"gif":case"svg":case"webp":return gv;case"css":case"scss":case"sass":case"less":return bF;case"html":case"xml":return XF;default:return go}}function _P(e,t){const n=t.get(e);return n?{added:{icon:Bc,label:"Added",className:"text-green-500"},modified:{icon:Pw,label:"Modified",className:"text-yellow-500"},untracked:{icon:Bc,label:"Untracked",className:"text-blue-500"}}[n]||{icon:Pw,label:"Modified",className:"text-yellow-500"}:null}function SP({files:e,changedFiles:t=[],query:n,selectedIndex:i,onSelect:s,onEnterSelect:l,onClose:u}){const o=G.useMemo(()=>new Map(t?.map(p=>[p.path,p.status])||[]),[t]),d=G.useMemo(()=>new vi(e,{threshold:.4,distance:100,ignoreLocation:!0,includeMatches:!0}),[e]),h=G.useMemo(()=>{if(!n)return e.slice(0,20);const p=d.search(n).map(f=>f.item);return p.sort((f,g)=>{const b=o.has(f),x=o.has(g);return b&&!x?-1:!b&&x?1:0}),p.slice(0,20)},[d,n,e,o]);return G.useEffect(()=>{document.getElementById(`file-item-${i}`)?.scrollIntoView({block:"nearest"})},[i]),G.useEffect(()=>{l(h[i])},[h,i,l]),G.useEffect(()=>{const p=f=>{f.target.closest("[data-file-mention-popup]")||u()};return document.addEventListener("mousedown",p),()=>document.removeEventListener("mousedown",p)},[u]),h.length===0?T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No files found"})}):T.jsx("div",{"data-file-mention-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:h.map((p,f)=>T.jsx("button",{type:"button",id:`file-item-${f}`,onMouseDown:g=>{g.preventDefault(),s(p)},className:`w-full text-left px-3 py-2 hover:bg-accent ${f===i?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-2 w-full",children:[(()=>{const g=vP(p);return T.jsx(g,{className:"w-4 h-4 flex-shrink-0 text-muted-foreground"})})(),T.jsx("span",{className:"font-mono text-sm flex-1 truncate",children:p}),(()=>{const g=_P(p,o);return g&&T.jsx(g.icon,{className:`w-3.5 h-3.5 flex-shrink-0 ${g.className}`,title:g.label})})()]})},p))})}const KO="agi-preferences",pc={vimMode:!1,reasoningEnabled:!0};function EP(){if(typeof window>"u")return pc;try{const e=window.localStorage.getItem(KO);if(e){const t=JSON.parse(e);return{...pc,...t}}}catch(e){console.warn("Failed to load preferences",e)}return pc}let mc=EP();const xv=new Set;function xP(){return mc}function wP(){return pc}function CP(e){return xv.add(e),()=>xv.delete(e)}function TP(){for(const e of xv)e()}function kP(e){if(mc={...mc,...e},typeof window<"u")try{window.localStorage.setItem(KO,JSON.stringify(mc))}catch(t){console.warn("Failed to persist preferences",t)}TP()}function Qc(){const e=G.useSyncExternalStore(CP,xP,wP),t=G.useCallback(n=>{kP(n)},[]);return G.useMemo(()=>({preferences:e,updatePreferences:t}),[e,t])}const wv=[{id:"models",label:"/models",description:"Open model selector",icon:wo},{id:"agents",label:"/agents",description:"Open agent selector",icon:Ji},{id:"new",label:"/new",description:"Create new session",icon:Bc},{id:"stop",label:"/stop",description:"Stop current generation",icon:IO},{id:"help",label:"/help",description:"Show keyboard shortcuts and help",icon:BO},{id:"vim",label:"/vim",description:e=>e.vimModeEnabled?"Disable Vim mode":"Enable Vim mode",icon:OF},{id:"reasoning",label:"/reasoning",description:e=>e.reasoningEnabled?"Disable extended thinking":"Enable extended thinking",icon:c_},{id:"stage",label:"/stage",description:"Stage all changes (git add -A)",icon:xo},{id:"commit",label:"/commit",description:"Commit staged changes",icon:Zc}];function YO(e,t){return typeof e.description=="function"?e.description(t):e.description}function AP(e,t){if(!e)return wv;const n=e.toLowerCase(),i=[];for(const s of wv){const l=YO(s,t),u=s.label.toLowerCase().includes(n),o=l.toLowerCase().includes(n);if(u||o){const d=u?10:5;i.push({...s,matchScore:d})}}return i.sort((s,l)=>{const u=l.matchScore-s.matchScore;return u!==0?u:s.label.localeCompare(l.label)})}function RP({query:e,selectedIndex:t,onSelect:n,onEnterSelect:i,onClose:s}){const{preferences:l}=Qc(),u=G.useMemo(()=>({vimModeEnabled:l.vimMode,reasoningEnabled:l.reasoningEnabled}),[l.vimMode,l.reasoningEnabled]),o=G.useMemo(()=>AP(e,u),[e,u]);return G.useEffect(()=>{document.getElementById(`command-item-${t}`)?.scrollIntoView({block:"nearest"})},[t]),G.useEffect(()=>{i(o[t]?.id)},[o,t,i]),G.useEffect(()=>{const d=h=>{h.target.closest("[data-command-popup]")||s()};return document.addEventListener("mousedown",d),()=>document.removeEventListener("mousedown",d)},[s]),o.length===0?T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg z-50 p-3",children:T.jsx("span",{className:"text-muted-foreground text-sm",children:"No commands found"})}):T.jsx("div",{"data-command-popup":!0,className:"absolute bottom-full left-0 right-0 mb-2 bg-card border border-border rounded-lg shadow-lg max-h-[300px] overflow-y-auto z-50",children:o.map((d,h)=>{const p=d.icon;return T.jsx("button",{type:"button",id:`command-item-${h}`,onMouseDown:f=>{f.preventDefault(),n(d.id)},className:`w-full text-left px-3 py-2 hover:bg-accent ${h===t?"bg-accent":""}`,children:T.jsxs("div",{className:"flex items-center gap-3 w-full",children:[T.jsx(p,{className:"w-4 h-4 flex-shrink-0 text-primary"}),T.jsxs("div",{className:"flex-1 min-w-0",children:[T.jsx("div",{className:"font-mono text-sm font-medium text-foreground",children:d.label}),T.jsx("div",{className:"text-xs text-muted-foreground truncate",children:YO(d,u)})]})]})},d.id)})})}const NP={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl"};function h_({isOpen:e,onClose:t,title:n,children:i,showCloseButton:s=!0,closeOnBackdropClick:l=!0,closeOnEscape:u=!0,maxWidth:o="md"}){if(G.useEffect(()=>{if(!e||!u)return;const h=p=>{const f=p.target,g=f.tagName==="INPUT"||f.tagName==="TEXTAREA"||f.isContentEditable;(p.key==="Escape"||p.key==="q"&&!g)&&(p.preventDefault(),p.stopPropagation(),t())};return document.addEventListener("keydown",h),()=>document.removeEventListener("keydown",h)},[e,u,t]),G.useEffect(()=>{if(e)return document.body.style.overflow="hidden",()=>{document.body.style.overflow=""}},[e]),!e)return null;const d=h=>{l&&h.target===h.currentTarget&&t()};return T.jsxs(T.Fragment,{children:[T.jsx("button",{type:"button",className:"fixed inset-0 bg-black/50 backdrop-blur-sm z-[9999] cursor-default",onClick:d,onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&d(h)},"aria-label":"Close modal"}),T.jsx("div",{className:`fixed top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 z-[9999] w-full ${NP[o]} px-4`,children:T.jsxs("div",{className:"bg-background border border-border rounded-lg shadow-lg",children:[(n||s)&&T.jsxs("div",{className:"flex items-center justify-between p-4 border-b border-border",children:[n&&T.jsx("div",{className:"text-lg font-semibold text-foreground",children:n}),s&&T.jsx("button",{type:"button",onClick:t,className:"text-muted-foreground hover:text-foreground transition-colors ml-auto","aria-label":"Close",children:T.jsx(is,{className:"h-5 w-5"})})]}),T.jsx("div",{className:"p-4",children:i})]})})]})}const OP=[{keys:["Ctrl","H"],description:"Navigate to left sidebar (sessions)",category:"Navigation"},{keys:["Ctrl","L"],description:"Navigate to right sidebar (git)",category:"Navigation"},{keys:["Ctrl","/"],description:"Toggle left sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","\\"],description:"Toggle right sidebar collapse/expand",category:"Navigation"},{keys:["Ctrl","N"],description:"Create new session",category:"Navigation"},{keys:["ESC"],description:"Close sidebar and return to center",category:"Navigation"},{keys:["J"],description:"Navigate to next item (in focused list)",category:"List Navigation"},{keys:["K"],description:"Navigate to previous item (in focused list)",category:"List Navigation"},{keys:["Enter"],description:"Select focused item and return to input",category:"List Navigation"},{keys:["Space"],description:"Toggle stage/unstage for focused file (git panel)",category:"Git Operations"},{keys:["A"],description:"Stage all unstaged files",category:"Git Operations"},{keys:["U"],description:"Unstage all staged files",category:"Git Operations"},{keys:["C"],description:"Open commit modal (if files are staged)",category:"Git Operations"},{keys:["Tab"],description:"Toggle plan mode",category:"Chat"},{keys:["Enter"],description:"Send message",category:"Chat"},{keys:["Shift","Enter"],description:"New line in message",category:"Chat"},{keys:["@"],description:"Mention file (opens file picker)",category:"Chat"},{keys:["/"],description:"Slash command (opens command menu)",category:"Chat"}],IP=[{keys:["i"],description:"Enter insert mode at cursor (vim mode)",category:"Vim Mode"},{keys:["a"],description:"Enter insert mode after cursor (vim mode)",category:"Vim Mode"},{keys:["I"],description:"Enter insert mode at line start (vim mode)",category:"Vim Mode"},{keys:["A"],description:"Enter insert mode at line end (vim mode)",category:"Vim Mode"},{keys:["o"],description:"New line below and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["O"],description:"New line above and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["ESC"],description:"Return to normal mode (vim mode)",category:"Vim Mode"},{keys:["Enter"],description:"Send message in normal mode (vim mode)",category:"Vim Mode"},{keys:["w"],description:"Jump to next word start (vim mode)",category:"Vim Mode"},{keys:["e"],description:"Jump to next word end (vim mode)",category:"Vim Mode"},{keys:["b"],description:"Jump to previous word start (vim mode)",category:"Vim Mode"},{keys:["x"],description:"Delete character under cursor (vim mode)",category:"Vim Mode"},{keys:["s"],description:"Delete character and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["S"],description:"Delete line and enter insert mode (vim mode)",category:"Vim Mode"},{keys:["f","{char}"],description:"Find and jump to next character on line (vim mode)",category:"Vim Mode"},{keys:["d","d"],description:"Delete current line (vim mode)",category:"Vim Mode"},{keys:["0"],description:"Jump to line start (vim mode)",category:"Vim Mode"},{keys:["$"],description:"Jump to line end (vim mode)",category:"Vim Mode"}],LP=[{command:"/models",description:"Open model selector"},{command:"/agents",description:"Open agent selector"},{command:"/new",description:"Create new session"},{command:"/help",description:"Show keyboard shortcuts and help (this modal)"}];function DP(e){const t={};for(const n of e)t[n.category]||(t[n.category]=[]),t[n.category].push(n);return t}function MP({isOpen:e,onClose:t}){const n=[...OP,...IP],i=DP(n),s=G.useRef(null),l=G.useRef(null);return G.useEffect(()=>{e?(l.current=document.activeElement,l.current&&l.current.blur()):l.current&&(l.current.focus(),l.current=null)},[e]),G.useEffect(()=>{if(!e)return;const u=o=>{const d=o.target;if(!(d.tagName==="INPUT"||d.tagName==="TEXTAREA"||d.isContentEditable))if(o.key==="j"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:100,behavior:"smooth"})}else if(o.key==="k"){o.preventDefault();const p=s.current;p&&p.scrollBy({top:-100,behavior:"smooth"})}else o.key==="Enter"&&(o.preventDefault(),t())};return document.addEventListener("keydown",u),()=>document.removeEventListener("keydown",u)},[e,t]),T.jsx(h_,{isOpen:e,onClose:t,title:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx(BO,{className:"w-5 h-5"}),T.jsx("span",{children:"Keyboard Shortcuts & Help"})]}),maxWidth:"2xl",closeOnEscape:!0,closeOnBackdropClick:!0,children:T.jsxs("div",{ref:s,className:"space-y-6 max-h-[70vh] overflow-y-auto",children:[Object.entries(i).map(([u,o])=>T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(Mw,{className:"w-4 h-4"}),u]}),T.jsx("div",{className:"space-y-2",children:o.map((d,h)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:d.description}),T.jsx("div",{className:"flex items-center gap-1",children:d.keys.map(p=>T.jsxs("span",{className:"flex items-center gap-1",children:[T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:p}),d.keys.indexOf(p)<d.keys.length-1&&T.jsx("span",{className:"text-muted-foreground",children:"+"})]},p))})]},`${u}-${d.description}`))})]},u)),T.jsxs("div",{children:[T.jsxs("h3",{className:"text-sm font-semibold text-foreground mb-3 flex items-center gap-2",children:[T.jsx(Mw,{className:"w-4 h-4"}),"Slash Commands"]}),T.jsx("div",{className:"space-y-2",children:LP.map((u,o)=>T.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-lg bg-accent/50 hover:bg-accent transition-colors",children:[T.jsx("span",{className:"text-sm text-foreground",children:u.description}),T.jsx("kbd",{className:"px-2 py-1 text-xs font-mono bg-background border border-border rounded shadow-sm",children:u.command})]},u.command))})]}),T.jsx("div",{className:"pt-4 border-t border-border",children:T.jsxs("p",{className:"text-xs text-muted-foreground",children:[T.jsx("strong",{children:"Tip:"})," Shortcuts are disabled when typing in input fields. Press ",T.jsx("kbd",{className:"text-xs",children:"ESC"})," to close popups and return focus to chat input."]})})]})})}var $w;(function(e){e.OPENAI="openai",e.ANTHROPIC="anthropic",e.GOOGLE="google",e.OPENROUTER="openrouter",e.OPENCODE="opencode",e.ZAI="zai",e.ZAI_CODING="zai-coding",e.SOLFORGE="solforge"})($w||($w={}));function XO(e,t){return function(){return e.apply(t,arguments)}}const{toString:BP}=Object.prototype,{getPrototypeOf:f_}=Object,{iterator:Jc,toStringTag:ZO}=Symbol,eu=(e=>t=>{const n=BP.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Jn=e=>(e=e.toLowerCase(),t=>eu(t)===e),tu=e=>t=>typeof t===e,{isArray:as}=Array,es=tu("undefined");function Oo(e){return e!==null&&!es(e)&&e.constructor!==null&&!es(e.constructor)&&fn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const QO=Jn("ArrayBuffer");function FP(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&QO(e.buffer),t}const PP=tu("string"),fn=tu("function"),JO=tu("number"),Io=e=>e!==null&&typeof e=="object",UP=e=>e===!0||e===!1,gc=e=>{if(eu(e)!=="object")return!1;const t=f_(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ZO in e)&&!(Jc in e)},jP=e=>{if(!Io(e)||Oo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},zP=Jn("Date"),HP=Jn("File"),qP=Jn("Blob"),$P=Jn("FileList"),GP=e=>Io(e)&&fn(e.pipe),VP=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||fn(e.append)&&((t=eu(e))==="formdata"||t==="object"&&fn(e.toString)&&e.toString()==="[object FormData]"))},WP=Jn("URLSearchParams"),[KP,YP,XP,ZP]=["ReadableStream","Request","Response","Headers"].map(Jn),QP=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Lo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let i,s;if(typeof e!="object"&&(e=[e]),as(e))for(i=0,s=e.length;i<s;i++)t.call(null,e[i],i,e);else{if(Oo(e))return;const l=n?Object.getOwnPropertyNames(e):Object.keys(e),u=l.length;let o;for(i=0;i<u;i++)o=l[i],t.call(null,e[o],o,e)}}function eI(e,t){if(Oo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let i=n.length,s;for(;i-- >0;)if(s=n[i],t===s.toLowerCase())return s;return null}const $i=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,tI=e=>!es(e)&&e!==$i;function Cv(){const{caseless:e,skipUndefined:t}=tI(this)&&this||{},n={},i=(s,l)=>{const u=e&&eI(n,l)||l;gc(n[u])&&gc(s)?n[u]=Cv(n[u],s):gc(s)?n[u]=Cv({},s):as(s)?n[u]=s.slice():(!t||!es(s))&&(n[u]=s)};for(let s=0,l=arguments.length;s<l;s++)arguments[s]&&Lo(arguments[s],i);return n}const JP=(e,t,n,{allOwnKeys:i}={})=>(Lo(t,(s,l)=>{n&&fn(s)?e[l]=XO(s,n):e[l]=s},{allOwnKeys:i}),e),eU=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),tU=(e,t,n,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},nU=(e,t,n,i)=>{let s,l,u;const o={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),l=s.length;l-- >0;)u=s[l],(!i||i(u,e,t))&&!o[u]&&(t[u]=e[u],o[u]=!0);e=n!==!1&&f_(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},rU=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const i=e.indexOf(t,n);return i!==-1&&i===n},iU=e=>{if(!e)return null;if(as(e))return e;let t=e.length;if(!JO(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},aU=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&f_(Uint8Array)),sU=(e,t)=>{const i=(e&&e[Jc]).call(e);let s;for(;(s=i.next())&&!s.done;){const l=s.value;t.call(e,l[0],l[1])}},oU=(e,t)=>{let n;const i=[];for(;(n=e.exec(t))!==null;)i.push(n);return i},lU=Jn("HTMLFormElement"),cU=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,i,s){return i.toUpperCase()+s}),Gw=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),uU=Jn("RegExp"),nI=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),i={};Lo(n,(s,l)=>{let u;(u=t(s,l,e))!==!1&&(i[l]=u||s)}),Object.defineProperties(e,i)},dU=e=>{nI(e,(t,n)=>{if(fn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const i=e[n];if(fn(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},hU=(e,t)=>{const n={},i=s=>{s.forEach(l=>{n[l]=!0})};return as(e)?i(e):i(String(e).split(t)),n},fU=()=>{},pU=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function mU(e){return!!(e&&fn(e.append)&&e[ZO]==="FormData"&&e[Jc])}const gU=e=>{const t=new Array(10),n=(i,s)=>{if(Io(i)){if(t.indexOf(i)>=0)return;if(Oo(i))return i;if(!("toJSON"in i)){t[s]=i;const l=as(i)?[]:{};return Lo(i,(u,o)=>{const d=n(u,s+1);!es(d)&&(l[o]=d)}),t[s]=void 0,l}}return i};return n(e,0)},bU=Jn("AsyncFunction"),yU=e=>e&&(Io(e)||fn(e))&&fn(e.then)&&fn(e.catch),rI=((e,t)=>e?setImmediate:t?((n,i)=>($i.addEventListener("message",({source:s,data:l})=>{s===$i&&l===n&&i.length&&i.shift()()},!1),s=>{i.push(s),$i.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",fn($i.postMessage)),vU=typeof queueMicrotask<"u"?queueMicrotask.bind($i):typeof process<"u"&&process.nextTick||rI,_U=e=>e!=null&&fn(e[Jc]),le={isArray:as,isArrayBuffer:QO,isBuffer:Oo,isFormData:VP,isArrayBufferView:FP,isString:PP,isNumber:JO,isBoolean:UP,isObject:Io,isPlainObject:gc,isEmptyObject:jP,isReadableStream:KP,isRequest:YP,isResponse:XP,isHeaders:ZP,isUndefined:es,isDate:zP,isFile:HP,isBlob:qP,isRegExp:uU,isFunction:fn,isStream:GP,isURLSearchParams:WP,isTypedArray:aU,isFileList:$P,forEach:Lo,merge:Cv,extend:JP,trim:QP,stripBOM:eU,inherits:tU,toFlatObject:nU,kindOf:eu,kindOfTest:Jn,endsWith:rU,toArray:iU,forEachEntry:sU,matchAll:oU,isHTMLForm:lU,hasOwnProperty:Gw,hasOwnProp:Gw,reduceDescriptors:nI,freezeMethods:dU,toObjectSet:hU,toCamelCase:cU,noop:fU,toFiniteNumber:pU,findKey:eI,global:$i,isContextDefined:tI,isSpecCompliantForm:mU,toJSONObject:gU,isAsyncFn:bU,isThenable:yU,setImmediate:rI,asap:vU,isIterable:_U};function Fe(e,t,n,i,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),i&&(this.request=i),s&&(this.response=s,this.status=s.status?s.status:null)}le.inherits(Fe,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:le.toJSONObject(this.config),code:this.code,status:this.status}}});const iI=Fe.prototype,aI={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{aI[e]={value:e}});Object.defineProperties(Fe,aI);Object.defineProperty(iI,"isAxiosError",{value:!0});Fe.from=(e,t,n,i,s,l)=>{const u=Object.create(iI);le.toFlatObject(e,u,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const o=e&&e.message?e.message:"Error",d=t==null&&e?e.code:t;return Fe.call(u,o,d,n,i,s),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",l&&Object.assign(u,l),u};const SU=null;function Tv(e){return le.isPlainObject(e)||le.isArray(e)}function sI(e){return le.endsWith(e,"[]")?e.slice(0,-2):e}function Vw(e,t,n){return e?e.concat(t).map(function(s,l){return s=sI(s),!n&&l?"["+s+"]":s}).join(n?".":""):t}function EU(e){return le.isArray(e)&&!e.some(Tv)}const xU=le.toFlatObject(le,{},null,function(t){return/^is[A-Z]/.test(t)});function nu(e,t,n){if(!le.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=le.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,y){return!le.isUndefined(y[E])});const i=n.metaTokens,s=n.visitor||p,l=n.dots,u=n.indexes,d=(n.Blob||typeof Blob<"u"&&Blob)&&le.isSpecCompliantForm(t);if(!le.isFunction(s))throw new TypeError("visitor must be a function");function h(x){if(x===null)return"";if(le.isDate(x))return x.toISOString();if(le.isBoolean(x))return x.toString();if(!d&&le.isBlob(x))throw new Fe("Blob is not supported. Use a Buffer instead.");return le.isArrayBuffer(x)||le.isTypedArray(x)?d&&typeof Blob=="function"?new Blob([x]):Buffer.from(x):x}function p(x,E,y){let S=x;if(x&&!y&&typeof x=="object"){if(le.endsWith(E,"{}"))E=i?E:E.slice(0,-2),x=JSON.stringify(x);else if(le.isArray(x)&&EU(x)||(le.isFileList(x)||le.endsWith(E,"[]"))&&(S=le.toArray(x)))return E=sI(E),S.forEach(function(_,w){!(le.isUndefined(_)||_===null)&&t.append(u===!0?Vw([E],w,l):u===null?E:E+"[]",h(_))}),!1}return Tv(x)?!0:(t.append(Vw(y,E,l),h(x)),!1)}const f=[],g=Object.assign(xU,{defaultVisitor:p,convertValue:h,isVisitable:Tv});function b(x,E){if(!le.isUndefined(x)){if(f.indexOf(x)!==-1)throw Error("Circular reference detected in "+E.join("."));f.push(x),le.forEach(x,function(S,v){(!(le.isUndefined(S)||S===null)&&s.call(t,S,le.isString(v)?v.trim():v,E,g))===!0&&b(S,E?E.concat(v):[v])}),f.pop()}}if(!le.isObject(e))throw new TypeError("data must be an object");return b(e),t}function Ww(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function p_(e,t){this._pairs=[],e&&nu(e,this,t)}const oI=p_.prototype;oI.append=function(t,n){this._pairs.push([t,n])};oI.toString=function(t){const n=t?function(i){return t.call(this,i,Ww)}:Ww;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function wU(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function lI(e,t,n){if(!t)return e;const i=n&&n.encode||wU;le.isFunction(n)&&(n={serialize:n});const s=n&&n.serialize;let l;if(s?l=s(t,n):l=le.isURLSearchParams(t)?t.toString():new p_(t,n).toString(i),l){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+l}return e}class Kw{constructor(){this.handlers=[]}use(t,n,i){return this.handlers.push({fulfilled:t,rejected:n,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){le.forEach(this.handlers,function(i){i!==null&&t(i)})}}const cI={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},CU=typeof URLSearchParams<"u"?URLSearchParams:p_,TU=typeof FormData<"u"?FormData:null,kU=typeof Blob<"u"?Blob:null,AU={isBrowser:!0,classes:{URLSearchParams:CU,FormData:TU,Blob:kU},protocols:["http","https","file","blob","url","data"]},m_=typeof window<"u"&&typeof document<"u",kv=typeof navigator=="object"&&navigator||void 0,RU=m_&&(!kv||["ReactNative","NativeScript","NS"].indexOf(kv.product)<0),NU=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",OU=m_&&window.location.href||"http://localhost",IU=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:m_,hasStandardBrowserEnv:RU,hasStandardBrowserWebWorkerEnv:NU,navigator:kv,origin:OU},Symbol.toStringTag,{value:"Module"})),Kt={...IU,...AU};function LU(e,t){return nu(e,new Kt.classes.URLSearchParams,{visitor:function(n,i,s,l){return Kt.isNode&&le.isBuffer(n)?(this.append(i,n.toString("base64")),!1):l.defaultVisitor.apply(this,arguments)},...t})}function DU(e){return le.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function MU(e){const t={},n=Object.keys(e);let i;const s=n.length;let l;for(i=0;i<s;i++)l=n[i],t[l]=e[l];return t}function uI(e){function t(n,i,s,l){let u=n[l++];if(u==="__proto__")return!0;const o=Number.isFinite(+u),d=l>=n.length;return u=!u&&le.isArray(s)?s.length:u,d?(le.hasOwnProp(s,u)?s[u]=[s[u],i]:s[u]=i,!o):((!s[u]||!le.isObject(s[u]))&&(s[u]=[]),t(n,i,s[u],l)&&le.isArray(s[u])&&(s[u]=MU(s[u])),!o)}if(le.isFormData(e)&&le.isFunction(e.entries)){const n={};return le.forEachEntry(e,(i,s)=>{t(DU(i),s,n,0)}),n}return null}function BU(e,t,n){if(le.isString(e))try{return(t||JSON.parse)(e),le.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(n||JSON.stringify)(e)}const Do={transitional:cI,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const i=n.getContentType()||"",s=i.indexOf("application/json")>-1,l=le.isObject(t);if(l&&le.isHTMLForm(t)&&(t=new FormData(t)),le.isFormData(t))return s?JSON.stringify(uI(t)):t;if(le.isArrayBuffer(t)||le.isBuffer(t)||le.isStream(t)||le.isFile(t)||le.isBlob(t)||le.isReadableStream(t))return t;if(le.isArrayBufferView(t))return t.buffer;if(le.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(l){if(i.indexOf("application/x-www-form-urlencoded")>-1)return LU(t,this.formSerializer).toString();if((o=le.isFileList(t))||i.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return nu(o?{"files[]":t}:t,d&&new d,this.formSerializer)}}return l||s?(n.setContentType("application/json",!1),BU(t)):t}],transformResponse:[function(t){const n=this.transitional||Do.transitional,i=n&&n.forcedJSONParsing,s=this.responseType==="json";if(le.isResponse(t)||le.isReadableStream(t))return t;if(t&&le.isString(t)&&(i&&!this.responseType||s)){const u=!(n&&n.silentJSONParsing)&&s;try{return JSON.parse(t,this.parseReviver)}catch(o){if(u)throw o.name==="SyntaxError"?Fe.from(o,Fe.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Kt.classes.FormData,Blob:Kt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};le.forEach(["delete","get","head","post","put","patch"],e=>{Do.headers[e]={}});const FU=le.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),PU=e=>{const t={};let n,i,s;return e&&e.split(`
10
10
  `).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),i=u.substring(s+1).trim(),!(!n||t[n]&&FU[n])&&(n==="set-cookie"?t[n]?t[n].push(i):t[n]=[i]:t[n]=t[n]?t[n]+", "+i:i)}),t},Yw=Symbol("internals");function oo(e){return e&&String(e).trim().toLowerCase()}function bc(e){return e===!1||e==null?e:le.isArray(e)?e.map(bc):String(e)}function UU(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=n.exec(e);)t[i[1]]=i[2];return t}const jU=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Qh(e,t,n,i,s){if(le.isFunction(i))return i.call(this,t,n);if(s&&(t=n),!!le.isString(t)){if(le.isString(i))return t.indexOf(i)!==-1;if(le.isRegExp(i))return i.test(t)}}function zU(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,i)=>n.toUpperCase()+i)}function HU(e,t){const n=le.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+n,{value:function(s,l,u){return this[i].call(this,t,s,l,u)},configurable:!0})})}let pn=class{constructor(t){t&&this.set(t)}set(t,n,i){const s=this;function l(o,d,h){const p=oo(d);if(!p)throw new Error("header name must be a non-empty string");const f=le.findKey(s,p);(!f||s[f]===void 0||h===!0||h===void 0&&s[f]!==!1)&&(s[f||d]=bc(o))}const u=(o,d)=>le.forEach(o,(h,p)=>l(h,p,d));if(le.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(le.isString(t)&&(t=t.trim())&&!jU(t))u(PU(t),n);else if(le.isObject(t)&&le.isIterable(t)){let o={},d,h;for(const p of t){if(!le.isArray(p))throw TypeError("Object iterator must return a key-value pair");o[h=p[0]]=(d=o[h])?le.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(o,n)}else t!=null&&l(n,t,i);return this}get(t,n){if(t=oo(t),t){const i=le.findKey(this,t);if(i){const s=this[i];if(!n)return s;if(n===!0)return UU(s);if(le.isFunction(n))return n.call(this,s,i);if(le.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=oo(t),t){const i=le.findKey(this,t);return!!(i&&this[i]!==void 0&&(!n||Qh(this,this[i],i,n)))}return!1}delete(t,n){const i=this;let s=!1;function l(u){if(u=oo(u),u){const o=le.findKey(i,u);o&&(!n||Qh(i,i[o],o,n))&&(delete i[o],s=!0)}}return le.isArray(t)?t.forEach(l):l(t),s}clear(t){const n=Object.keys(this);let i=n.length,s=!1;for(;i--;){const l=n[i];(!t||Qh(this,this[l],l,t,!0))&&(delete this[l],s=!0)}return s}normalize(t){const n=this,i={};return le.forEach(this,(s,l)=>{const u=le.findKey(i,l);if(u){n[u]=bc(s),delete n[l];return}const o=t?zU(l):String(l).trim();o!==l&&delete n[l],n[o]=bc(s),i[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return le.forEach(this,(i,s)=>{i!=null&&i!==!1&&(n[s]=t&&le.isArray(i)?i.join(", "):i)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
11
11
  `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const i=new this(t);return n.forEach(s=>i.set(s)),i}static accessor(t){const i=(this[Yw]=this[Yw]={accessors:{}}).accessors,s=this.prototype;function l(u){const o=oo(u);i[o]||(HU(s,u),i[o]=!0)}return le.isArray(t)?t.forEach(l):l(t),this}};pn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);le.reduceDescriptors(pn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[n]=i}}});le.freezeMethods(pn);function Jh(e,t){const n=this||Do,i=t||n,s=pn.from(i.headers);let l=i.data;return le.forEach(e,function(o){l=o.call(n,l,s.normalize(),t?t.status:void 0)}),s.normalize(),l}function dI(e){return!!(e&&e.__CANCEL__)}function ss(e,t,n){Fe.call(this,e??"canceled",Fe.ERR_CANCELED,t,n),this.name="CanceledError"}le.inherits(ss,Fe,{__CANCEL__:!0});function hI(e,t,n){const i=n.config.validateStatus;!n.status||!i||i(n.status)?e(n):t(new Fe("Request failed with status code "+n.status,[Fe.ERR_BAD_REQUEST,Fe.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function qU(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function $U(e,t){e=e||10;const n=new Array(e),i=new Array(e);let s=0,l=0,u;return t=t!==void 0?t:1e3,function(d){const h=Date.now(),p=i[l];u||(u=h),n[s]=d,i[s]=h;let f=l,g=0;for(;f!==s;)g+=n[f++],f=f%e;if(s=(s+1)%e,s===l&&(l=(l+1)%e),h-u<t)return;const b=p&&h-p;return b?Math.round(g*1e3/b):void 0}}function GU(e,t){let n=0,i=1e3/t,s,l;const u=(h,p=Date.now())=>{n=p,s=null,l&&(clearTimeout(l),l=null),e(...h)};return[(...h)=>{const p=Date.now(),f=p-n;f>=i?u(h,p):(s=h,l||(l=setTimeout(()=>{l=null,u(s)},i-f)))},()=>s&&u(s)]}const Uc=(e,t,n=3)=>{let i=0;const s=$U(50,250);return GU(l=>{const u=l.loaded,o=l.lengthComputable?l.total:void 0,d=u-i,h=s(d),p=u<=o;i=u;const f={loaded:u,total:o,progress:o?u/o:void 0,bytes:d,rate:h||void 0,estimated:h&&o&&p?(o-u)/h:void 0,event:l,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(f)},n)},Xw=(e,t)=>{const n=e!=null;return[i=>t[0]({lengthComputable:n,total:e,loaded:i}),t[1]]},Zw=e=>(...t)=>le.asap(()=>e(...t)),VU=Kt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Kt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Kt.origin),Kt.navigator&&/(msie|trident)/i.test(Kt.navigator.userAgent)):()=>!0,WU=Kt.hasStandardBrowserEnv?{write(e,t,n,i,s,l,u){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];le.isNumber(n)&&o.push(`expires=${new Date(n).toUTCString()}`),le.isString(i)&&o.push(`path=${i}`),le.isString(s)&&o.push(`domain=${s}`),l===!0&&o.push("secure"),le.isString(u)&&o.push(`SameSite=${u}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function KU(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function YU(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function fI(e,t,n){let i=!KU(t);return e&&(i||n==!1)?YU(e,t):t}const Qw=e=>e instanceof pn?{...e}:e;function ea(e,t){t=t||{};const n={};function i(h,p,f,g){return le.isPlainObject(h)&&le.isPlainObject(p)?le.merge.call({caseless:g},h,p):le.isPlainObject(p)?le.merge({},p):le.isArray(p)?p.slice():p}function s(h,p,f,g){if(le.isUndefined(p)){if(!le.isUndefined(h))return i(void 0,h,f,g)}else return i(h,p,f,g)}function l(h,p){if(!le.isUndefined(p))return i(void 0,p)}function u(h,p){if(le.isUndefined(p)){if(!le.isUndefined(h))return i(void 0,h)}else return i(void 0,p)}function o(h,p,f){if(f in t)return i(h,p);if(f in e)return i(void 0,h)}const d={url:l,method:l,data:l,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:o,headers:(h,p,f)=>s(Qw(h),Qw(p),f,!0)};return le.forEach(Object.keys({...e,...t}),function(p){const f=d[p]||s,g=f(e[p],t[p],p);le.isUndefined(g)&&f!==o||(n[p]=g)}),n}const pI=e=>{const t=ea({},e);let{data:n,withXSRFToken:i,xsrfHeaderName:s,xsrfCookieName:l,headers:u,auth:o}=t;if(t.headers=u=pn.from(u),t.url=lI(fI(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&u.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),le.isFormData(n)){if(Kt.hasStandardBrowserEnv||Kt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(le.isFunction(n.getHeaders)){const d=n.getHeaders(),h=["content-type","content-length"];Object.entries(d).forEach(([p,f])=>{h.includes(p.toLowerCase())&&u.set(p,f)})}}if(Kt.hasStandardBrowserEnv&&(i&&le.isFunction(i)&&(i=i(t)),i||i!==!1&&VU(t.url))){const d=s&&l&&WU.read(l);d&&u.set(s,d)}return t},XU=typeof XMLHttpRequest<"u",ZU=XU&&function(e){return new Promise(function(n,i){const s=pI(e);let l=s.data;const u=pn.from(s.headers).normalize();let{responseType:o,onUploadProgress:d,onDownloadProgress:h}=s,p,f,g,b,x;function E(){b&&b(),x&&x(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let y=new XMLHttpRequest;y.open(s.method.toUpperCase(),s.url,!0),y.timeout=s.timeout;function S(){if(!y)return;const _=pn.from("getAllResponseHeaders"in y&&y.getAllResponseHeaders()),N={data:!o||o==="text"||o==="json"?y.responseText:y.response,status:y.status,statusText:y.statusText,headers:_,config:e,request:y};hI(function(O){n(O),E()},function(O){i(O),E()},N),y=null}"onloadend"in y?y.onloadend=S:y.onreadystatechange=function(){!y||y.readyState!==4||y.status===0&&!(y.responseURL&&y.responseURL.indexOf("file:")===0)||setTimeout(S)},y.onabort=function(){y&&(i(new Fe("Request aborted",Fe.ECONNABORTED,e,y)),y=null)},y.onerror=function(w){const N=w&&w.message?w.message:"Network Error",k=new Fe(N,Fe.ERR_NETWORK,e,y);k.event=w||null,i(k),y=null},y.ontimeout=function(){let w=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const N=s.transitional||cI;s.timeoutErrorMessage&&(w=s.timeoutErrorMessage),i(new Fe(w,N.clarifyTimeoutError?Fe.ETIMEDOUT:Fe.ECONNABORTED,e,y)),y=null},l===void 0&&u.setContentType(null),"setRequestHeader"in y&&le.forEach(u.toJSON(),function(w,N){y.setRequestHeader(N,w)}),le.isUndefined(s.withCredentials)||(y.withCredentials=!!s.withCredentials),o&&o!=="json"&&(y.responseType=s.responseType),h&&([g,x]=Uc(h,!0),y.addEventListener("progress",g)),d&&y.upload&&([f,b]=Uc(d),y.upload.addEventListener("progress",f),y.upload.addEventListener("loadend",b)),(s.cancelToken||s.signal)&&(p=_=>{y&&(i(!_||_.type?new ss(null,e,y):_),y.abort(),y=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const v=qU(s.url);if(v&&Kt.protocols.indexOf(v)===-1){i(new Fe("Unsupported protocol "+v+":",Fe.ERR_BAD_REQUEST,e));return}y.send(l||null)})},QU=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let i=new AbortController,s;const l=function(h){if(!s){s=!0,o();const p=h instanceof Error?h:this.reason;i.abort(p instanceof Fe?p:new ss(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,l(new Fe(`timeout ${t} of ms exceeded`,Fe.ETIMEDOUT))},t);const o=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(l):h.removeEventListener("abort",l)}),e=null)};e.forEach(h=>h.addEventListener("abort",l));const{signal:d}=i;return d.unsubscribe=()=>le.asap(o),d}},JU=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let i=0,s;for(;i<n;)s=i+t,yield e.slice(i,s),i=s},ej=async function*(e,t){for await(const n of tj(e))yield*JU(n,t)},tj=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:i}=await t.read();if(n)break;yield i}}finally{await t.cancel()}},Jw=(e,t,n,i)=>{const s=ej(e,t);let l=0,u,o=d=>{u||(u=!0,i&&i(d))};return new ReadableStream({async pull(d){try{const{done:h,value:p}=await s.next();if(h){o(),d.close();return}let f=p.byteLength;if(n){let g=l+=f;n(g)}d.enqueue(new Uint8Array(p))}catch(h){throw o(h),h}},cancel(d){return o(d),s.return()}},{highWaterMark:2})},e1=64*1024,{isFunction:ic}=le,nj=(({Request:e,Response:t})=>({Request:e,Response:t}))(le.global),{ReadableStream:t1,TextEncoder:n1}=le.global,r1=(e,...t)=>{try{return!!e(...t)}catch{return!1}},rj=e=>{e=le.merge.call({skipUndefined:!0},nj,e);const{fetch:t,Request:n,Response:i}=e,s=t?ic(t):typeof fetch=="function",l=ic(n),u=ic(i);if(!s)return!1;const o=s&&ic(t1),d=s&&(typeof n1=="function"?(x=>E=>x.encode(E))(new n1):async x=>new Uint8Array(await new n(x).arrayBuffer())),h=l&&o&&r1(()=>{let x=!1;const E=new n(Kt.origin,{body:new t1,method:"POST",get duplex(){return x=!0,"half"}}).headers.has("Content-Type");return x&&!E}),p=u&&o&&r1(()=>le.isReadableStream(new i("").body)),f={stream:p&&(x=>x.body)};s&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!f[x]&&(f[x]=(E,y)=>{let S=E&&E[x];if(S)return S.call(E);throw new Fe(`Response type '${x}' is not supported`,Fe.ERR_NOT_SUPPORT,y)})});const g=async x=>{if(x==null)return 0;if(le.isBlob(x))return x.size;if(le.isSpecCompliantForm(x))return(await new n(Kt.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(le.isArrayBufferView(x)||le.isArrayBuffer(x))return x.byteLength;if(le.isURLSearchParams(x)&&(x=x+""),le.isString(x))return(await d(x)).byteLength},b=async(x,E)=>{const y=le.toFiniteNumber(x.getContentLength());return y??g(E)};return async x=>{let{url:E,method:y,data:S,signal:v,cancelToken:_,timeout:w,onDownloadProgress:N,onUploadProgress:k,responseType:O,headers:R,withCredentials:I="same-origin",fetchOptions:L}=pI(x),F=t||fetch;O=O?(O+"").toLowerCase():"text";let j=QU([v,_&&_.toAbortSignal()],w),z=null;const V=j&&j.unsubscribe&&(()=>{j.unsubscribe()});let K;try{if(k&&h&&y!=="get"&&y!=="head"&&(K=await b(R,S))!==0){let B=new n(E,{method:"POST",body:S,duplex:"half"}),q;if(le.isFormData(S)&&(q=B.headers.get("content-type"))&&R.setContentType(q),B.body){const[U,ee]=Xw(K,Uc(Zw(k)));S=Jw(B.body,e1,U,ee)}}le.isString(I)||(I=I?"include":"omit");const W=l&&"credentials"in n.prototype,Z={...L,signal:j,method:y.toUpperCase(),headers:R.normalize().toJSON(),body:S,duplex:"half",credentials:W?I:void 0};z=l&&new n(E,Z);let Q=await(l?F(z,L):F(E,Z));const P=p&&(O==="stream"||O==="response");if(p&&(N||P&&V)){const B={};["status","statusText","headers"].forEach(ce=>{B[ce]=Q[ce]});const q=le.toFiniteNumber(Q.headers.get("content-length")),[U,ee]=N&&Xw(q,Uc(Zw(N),!0))||[];Q=new i(Jw(Q.body,e1,U,()=>{ee&&ee(),V&&V()}),B)}O=O||"text";let M=await f[le.findKey(f,O)||"text"](Q,x);return!P&&V&&V(),await new Promise((B,q)=>{hI(B,q,{data:M,headers:pn.from(Q.headers),status:Q.status,statusText:Q.statusText,config:x,request:z})})}catch(W){throw V&&V(),W&&W.name==="TypeError"&&/Load failed|fetch/i.test(W.message)?Object.assign(new Fe("Network Error",Fe.ERR_NETWORK,x,z),{cause:W.cause||W}):Fe.from(W,W&&W.code,x,z)}}},ij=new Map,mI=e=>{let t=e&&e.env||{};const{fetch:n,Request:i,Response:s}=t,l=[i,s,n];let u=l.length,o=u,d,h,p=ij;for(;o--;)d=l[o],h=p.get(d),h===void 0&&p.set(d,h=o?new Map:rj(t)),p=h;return h};mI();const g_={http:SU,xhr:ZU,fetch:{get:mI}};le.forEach(g_,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const i1=e=>`- ${e}`,aj=e=>le.isFunction(e)||e===null||e===!1;function sj(e,t){e=le.isArray(e)?e:[e];const{length:n}=e;let i,s;const l={};for(let u=0;u<n;u++){i=e[u];let o;if(s=i,!aj(i)&&(s=g_[(o=String(i)).toLowerCase()],s===void 0))throw new Fe(`Unknown adapter '${o}'`);if(s&&(le.isFunction(s)||(s=s.get(t))))break;l[o||"#"+u]=s}if(!s){const u=Object.entries(l).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let o=n?u.length>1?`since :
12
12
  `+u.map(i1).join(`
@@ -71,9 +71,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
71
71
  ]))(?:`+(/[^\s\\]/.source+'|[ ]+(?:(?![ "])|'+s+")|"+/\\[\r\n]+(?:[#;].*[\r\n]+)*(?![#;])/.source)+")*"),lookbehind:!0,greedy:!0,alias:"attr-value",inside:{comment:i,quoted:{pattern:RegExp(/(^|\s)/.source+s),lookbehind:!0,greedy:!0},punctuation:/\\$/m,boolean:{pattern:/^(?:false|no|off|on|true|yes)$/,greedy:!0}}},punctuation:/=/}})(t)}return vy}var _y,rN;function V_(){if(rN)return _y;rN=1,_y=e,e.displayName="t4Templating",e.aliases=[];function e(t){(function(n){function i(l,u,o){return{pattern:RegExp("<#"+l+"[\\s\\S]*?#>"),alias:"block",inside:{delimiter:{pattern:RegExp("^<#"+l+"|#>$"),alias:"important"},content:{pattern:/[\s\S]+/,inside:u,alias:o}}}}function s(l){var u=n.languages[l],o="language-"+l;return{block:{pattern:/<#[\s\S]+?#>/,inside:{directive:i("@",{"attr-value":{pattern:/=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/,inside:{punctuation:/^=|^["']|["']$/}},keyword:/\b\w+(?=\s)/,"attr-name":/\b\w+/}),expression:i("=",u,o),"class-feature":i("\\+",u,o),standard:i("",u,o)}}}}n.languages["t4-templating"]=Object.defineProperty({},"createT4",{value:s})})(t)}return _y}var Sy,iN;function $Y(){if(iN)return Sy;iN=1;var e=V_(),t=fu();Sy=n,n.displayName="t4Cs",n.aliases=[];function n(i){i.register(e),i.register(t),i.languages.t4=i.languages["t4-cs"]=i.languages["t4-templating"].createT4("csharp")}return Sy}var Ey,aN;function XL(){if(aN)return Ey;aN=1;var e=VL();Ey=t,t.displayName="vbnet",t.aliases=[];function t(n){n.register(e),n.languages.vbnet=n.languages.extend("basic",{comment:[{pattern:/(?:!|REM\b).+/i,inside:{keyword:/^REM/i}},{pattern:/(^|[^\\:])'.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(^|[^"])"(?:""|[^"])*"(?!")/,lookbehind:!0,greedy:!0},keyword:/(?:\b(?:ADDHANDLER|ADDRESSOF|ALIAS|AND|ANDALSO|AS|BEEP|BLOAD|BOOLEAN|BSAVE|BYREF|BYTE|BYVAL|CALL(?: ABSOLUTE)?|CASE|CATCH|CBOOL|CBYTE|CCHAR|CDATE|CDBL|CDEC|CHAIN|CHAR|CHDIR|CINT|CLASS|CLEAR|CLNG|CLOSE|CLS|COBJ|COM|COMMON|CONST|CONTINUE|CSBYTE|CSHORT|CSNG|CSTR|CTYPE|CUINT|CULNG|CUSHORT|DATA|DATE|DECIMAL|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DEFAULT|DELEGATE|DIM|DIRECTCAST|DO|DOUBLE|ELSE|ELSEIF|END|ENUM|ENVIRON|ERASE|ERROR|EVENT|EXIT|FALSE|FIELD|FILES|FINALLY|FOR(?: EACH)?|FRIEND|FUNCTION|GET|GETTYPE|GETXMLNAMESPACE|GLOBAL|GOSUB|GOTO|HANDLES|IF|IMPLEMENTS|IMPORTS|IN|INHERITS|INPUT|INTEGER|INTERFACE|IOCTL|IS|ISNOT|KEY|KILL|LET|LIB|LIKE|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|ME|MKDIR|MOD|MODULE|MUSTINHERIT|MUSTOVERRIDE|MYBASE|MYCLASS|NAME|NAMESPACE|NARROWING|NEW|NEXT|NOT|NOTHING|NOTINHERITABLE|NOTOVERRIDABLE|OBJECT|OF|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPERATOR|OPTION(?: BASE)?|OPTIONAL|OR|ORELSE|OUT|OVERLOADS|OVERRIDABLE|OVERRIDES|PARAMARRAY|PARTIAL|POKE|PRIVATE|PROPERTY|PROTECTED|PUBLIC|PUT|RAISEEVENT|READ|READONLY|REDIM|REM|REMOVEHANDLER|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SBYTE|SELECT(?: CASE)?|SET|SHADOWS|SHARED|SHELL|SHORT|SINGLE|SLEEP|STATIC|STEP|STOP|STRING|STRUCTURE|SUB|SWAP|SYNCLOCK|SYSTEM|THEN|THROW|TIMER|TO|TROFF|TRON|TRUE|TRY|TRYCAST|TYPE|TYPEOF|UINTEGER|ULONG|UNLOCK|UNTIL|USHORT|USING|VIEW PRINT|WAIT|WEND|WHEN|WHILE|WIDENING|WITH|WITHEVENTS|WRITE|WRITEONLY|XOR)|\B(?:#CONST|#ELSE|#ELSEIF|#END|#IF))(?:\$|\b)/i,punctuation:/[,;:(){}]/})}return Ey}var xy,sN;function GY(){if(sN)return xy;sN=1;var e=V_(),t=XL();xy=n,n.displayName="t4Vb",n.aliases=[];function n(i){i.register(e),i.register(t),i.languages["t4-vb"]=i.languages["t4-templating"].createT4("vbnet")}return xy}var wy,oN;function ZL(){if(oN)return wy;oN=1,wy=e,e.displayName="yaml",e.aliases=["yml"];function e(t){(function(n){var i=/[*&][^\s[\]{},]+/,s=/!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/,l="(?:"+s.source+"(?:[ ]+"+i.source+")?|"+i.source+"(?:[ ]+"+s.source+")?)",u=/(?:[^\s\x00-\x08\x0e-\x1f!"#%&'*,\-:>?@[\]`{|}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*/.source.replace(/<PLAIN>/g,function(){return/[^\s\x00-\x08\x0e-\x1f,[\]{}\x7f-\x84\x86-\x9f\ud800-\udfff\ufffe\uffff]/.source}),o=/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'/.source;function d(h,p){p=(p||"").replace(/m/g,"")+"m";var f=/([:\-,[{]\s*(?:\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<value>>/g,function(){return h});return RegExp(f,p)}n.languages.yaml={scalar:{pattern:RegExp(/([\-:]\s*(?:\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\S[^\r\n]*(?:\2[^\r\n]+)*)/.source.replace(/<<prop>>/g,function(){return l})),lookbehind:!0,alias:"string"},comment:/#.*/,key:{pattern:RegExp(/((?:^|[:\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\s*:\s)/.source.replace(/<<prop>>/g,function(){return l}).replace(/<<key>>/g,function(){return"(?:"+u+"|"+o+")"})),lookbehind:!0,greedy:!0,alias:"atrule"},directive:{pattern:/(^[ \t]*)%.+/m,lookbehind:!0,alias:"important"},datetime:{pattern:d(/\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?(?:[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?))?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?/.source),lookbehind:!0,alias:"number"},boolean:{pattern:d(/false|true/.source,"i"),lookbehind:!0,alias:"important"},null:{pattern:d(/null|~/.source,"i"),lookbehind:!0,alias:"important"},string:{pattern:d(o),lookbehind:!0,greedy:!0},number:{pattern:d(/[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|\.inf|\.nan)/.source,"i"),lookbehind:!0},tag:s,important:i,punctuation:/---|[:[\]{}\-,|>?]|\.\.\./},n.languages.yml=n.languages.yaml})(t)}return wy}var Cy,lN;function VY(){if(lN)return Cy;lN=1;var e=ZL();Cy=t,t.displayName="tap",t.aliases=[];function t(n){n.register(e),n.languages.tap={fail:/not ok[^#{\n\r]*/,pass:/ok[^#{\n\r]*/,pragma:/pragma [+-][a-z]+/,bailout:/bail out!.*/i,version:/TAP version \d+/i,plan:/\b\d+\.\.\d+(?: +#.*)?/,subtest:{pattern:/# Subtest(?:: .*)?/,greedy:!0},punctuation:/[{}]/,directive:/#.*/,yamlish:{pattern:/(^[ \t]*)---[\s\S]*?[\r\n][ \t]*\.\.\.$/m,lookbehind:!0,inside:n.languages.yaml,alias:"language-yaml"}}}return Cy}var Ty,cN;function WY(){if(cN)return Ty;cN=1,Ty=e,e.displayName="tcl",e.aliases=[];function e(t){t.languages.tcl={comment:{pattern:/(^|[^\\])#.*/,lookbehind:!0},string:{pattern:/"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,greedy:!0},variable:[{pattern:/(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,lookbehind:!0},{pattern:/(\$)\{[^}]+\}/,lookbehind:!0},{pattern:/(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,lookbehind:!0}],function:{pattern:/(^[\t ]*proc[ \t]+)\S+/m,lookbehind:!0},builtin:[{pattern:/(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,lookbehind:!0},/\b(?:else|elseif)\b/],scope:{pattern:/(^[\t ]*)(?:global|upvar|variable)\b/m,lookbehind:!0,alias:"constant"},keyword:{pattern:/(^[\t ]*|\[)(?:Safe_Base|Tcl|after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,lookbehind:!0},operator:/!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,punctuation:/[{}()\[\]]/}}return Ty}var ky,uN;function KY(){if(uN)return ky;uN=1,ky=e,e.displayName="textile",e.aliases=[];function e(t){(function(n){var i=/\([^|()\n]+\)|\[[^\]\n]+\]|\{[^}\n]+\}/.source,s=/\)|\((?![^|()\n]+\))/.source;function l(g,b){return RegExp(g.replace(/<MOD>/g,function(){return"(?:"+i+")"}).replace(/<PAR>/g,function(){return"(?:"+s+")"}),b||"")}var u={css:{pattern:/\{[^{}]+\}/,inside:{rest:n.languages.css}},"class-id":{pattern:/(\()[^()]+(?=\))/,lookbehind:!0,alias:"attr-value"},lang:{pattern:/(\[)[^\[\]]+(?=\])/,lookbehind:!0,alias:"attr-value"},punctuation:/[\\\/]\d+|\S/},o=n.languages.textile=n.languages.extend("markup",{phrase:{pattern:/(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/,lookbehind:!0,inside:{"block-tag":{pattern:l(/^[a-z]\w*(?:<MOD>|<PAR>|[<>=])*\./.source),inside:{modifier:{pattern:l(/(^[a-z]\w*)(?:<MOD>|<PAR>|[<>=])+(?=\.)/.source),lookbehind:!0,inside:u},tag:/^[a-z]\w*/,punctuation:/\.$/}},list:{pattern:l(/^[*#]+<MOD>*\s+\S.*/.source,"m"),inside:{modifier:{pattern:l(/(^[*#]+)<MOD>+/.source),lookbehind:!0,inside:u},punctuation:/^[*#]+/}},table:{pattern:l(/^(?:(?:<MOD>|<PAR>|[<>=^~])+\.\s*)?(?:\|(?:(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.|(?!(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+\.))[^|]*)+\|/.source,"m"),inside:{modifier:{pattern:l(/(^|\|(?:\r?\n|\r)?)(?:<MOD>|<PAR>|[<>=^~_]|[\\/]\d+)+(?=\.)/.source),lookbehind:!0,inside:u},punctuation:/\||^\./}},inline:{pattern:l(/(^|[^a-zA-Z\d])(\*\*|__|\?\?|[*_%@+\-^~])<MOD>*.+?\2(?![a-zA-Z\d])/.source),lookbehind:!0,inside:{bold:{pattern:l(/(^(\*\*?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},italic:{pattern:l(/(^(__?)<MOD>*).+?(?=\2)/.source),lookbehind:!0},cite:{pattern:l(/(^\?\?<MOD>*).+?(?=\?\?)/.source),lookbehind:!0,alias:"string"},code:{pattern:l(/(^@<MOD>*).+?(?=@)/.source),lookbehind:!0,alias:"keyword"},inserted:{pattern:l(/(^\+<MOD>*).+?(?=\+)/.source),lookbehind:!0},deleted:{pattern:l(/(^-<MOD>*).+?(?=-)/.source),lookbehind:!0},span:{pattern:l(/(^%<MOD>*).+?(?=%)/.source),lookbehind:!0},modifier:{pattern:l(/(^\*\*|__|\?\?|[*_%@+\-^~])<MOD>+/.source),lookbehind:!0,inside:u},punctuation:/[*_%?@+\-^~]+/}},"link-ref":{pattern:/^\[[^\]]+\]\S+$/m,inside:{string:{pattern:/(^\[)[^\]]+(?=\])/,lookbehind:!0},url:{pattern:/(^\])\S+$/,lookbehind:!0},punctuation:/[\[\]]/}},link:{pattern:l(/"<MOD>*[^"]+":.+?(?=[^\w/]?(?:\s|$))/.source),inside:{text:{pattern:l(/(^"<MOD>*)[^"]+(?=")/.source),lookbehind:!0},modifier:{pattern:l(/(^")<MOD>+/.source),lookbehind:!0,inside:u},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[":]/}},image:{pattern:l(/!(?:<MOD>|<PAR>|[<>=])*(?![<>=])[^!\s()]+(?:\([^)]+\))?!(?::.+?(?=[^\w/]?(?:\s|$)))?/.source),inside:{source:{pattern:l(/(^!(?:<MOD>|<PAR>|[<>=])*)(?![<>=])[^!\s()]+(?:\([^)]+\))?(?=!)/.source),lookbehind:!0,alias:"url"},modifier:{pattern:l(/(^!)(?:<MOD>|<PAR>|[<>=])+/.source),lookbehind:!0,inside:u},url:{pattern:/(:).+/,lookbehind:!0},punctuation:/[!:]/}},footnote:{pattern:/\b\[\d+\]/,alias:"comment",inside:{punctuation:/\[|\]/}},acronym:{pattern:/\b[A-Z\d]+\([^)]+\)/,inside:{comment:{pattern:/(\()[^()]+(?=\))/,lookbehind:!0},punctuation:/[()]/}},mark:{pattern:/\b\((?:C|R|TM)\)/,alias:"comment",inside:{punctuation:/[()]/}}}}}),d=o.phrase.inside,h={inline:d.inline,link:d.link,image:d.image,footnote:d.footnote,acronym:d.acronym,mark:d.mark};o.tag.pattern=/<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i;var p=d.inline.inside;p.bold.inside=h,p.italic.inside=h,p.inserted.inside=h,p.deleted.inside=h,p.span.inside=h;var f=d.table.inside;f.inline=h.inline,f.link=h.link,f.image=h.image,f.footnote=h.footnote,f.acronym=h.acronym,f.mark=h.mark})(t)}return ky}var Ay,dN;function YY(){if(dN)return Ay;dN=1,Ay=e,e.displayName="toml",e.aliases=[];function e(t){(function(n){var i=/(?:[\w-]+|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*")/.source;function s(l){return l.replace(/__/g,function(){return i})}n.languages.toml={comment:{pattern:/#.*/,greedy:!0},table:{pattern:RegExp(s(/(^[\t ]*\[\s*(?:\[\s*)?)__(?:\s*\.\s*__)*(?=\s*\])/.source),"m"),lookbehind:!0,greedy:!0,alias:"class-name"},key:{pattern:RegExp(s(/(^[\t ]*|[{,]\s*)__(?:\s*\.\s*__)*(?=\s*=)/.source),"m"),lookbehind:!0,greedy:!0,alias:"property"},string:{pattern:/"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/,greedy:!0},date:[{pattern:/\b\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?\b/i,alias:"number"},{pattern:/\b\d{2}:\d{2}:\d{2}(?:\.\d+)?\b/,alias:"number"}],number:/(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\b\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?\b(?:inf|nan)\b/,boolean:/\b(?:false|true)\b/,punctuation:/[.,=[\]{}]/}})(t)}return Ay}var Ry,hN;function XY(){if(hN)return Ry;hN=1,Ry=e,e.displayName="tremor",e.aliases=[];function e(t){(function(n){n.languages.tremor={comment:{pattern:/(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/,lookbehind:!0},"interpolated-string":null,extractor:{pattern:/\b[a-z_]\w*\|(?:[^\r\n\\|]|\\(?:\r\n|[\s\S]))*\|/i,greedy:!0,inside:{regex:{pattern:/(^re)\|[\s\S]+/,lookbehind:!0},function:/^\w+/,value:/\|[\s\S]+/}},identifier:{pattern:/`[^`]*`/,greedy:!0},function:/\b[a-z_]\w*(?=\s*(?:::\s*<|\())\b/,keyword:/\b(?:args|as|by|case|config|connect|connector|const|copy|create|default|define|deploy|drop|each|emit|end|erase|event|flow|fn|for|from|group|having|insert|into|intrinsic|let|links|match|merge|mod|move|of|operator|patch|pipeline|recur|script|select|set|sliding|state|stream|to|tumbling|update|use|when|where|window|with)\b/,boolean:/\b(?:false|null|true)\b/i,number:/\b(?:0b[01_]*|0x[0-9a-fA-F_]*|\d[\d_]*(?:\.\d[\d_]*)?(?:[Ee][+-]?[\d_]+)?)\b/,"pattern-punctuation":{pattern:/%(?=[({[])/,alias:"punctuation"},operator:/[-+*\/%~!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?>?=?|(?:absent|and|not|or|present|xor)\b/,punctuation:/::|[;\[\]()\{\},.:]/};var i=/#\{(?:[^"{}]|\{[^{}]*\}|"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*")*\}/.source;n.languages.tremor["interpolated-string"]={pattern:RegExp(/(^|[^\\])/.source+'(?:"""(?:'+/[^"\\#]|\\[\s\S]|"(?!"")|#(?!\{)/.source+"|"+i+')*"""|"(?:'+/[^"\\\r\n#]|\\(?:\r\n|[\s\S])|#(?!\{)/.source+"|"+i+')*")'),lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:RegExp(i),inside:{punctuation:/^#\{|\}$/,expression:{pattern:/[\s\S]+/,inside:n.languages.tremor}}},string:/[\s\S]+/}},n.languages.troy=n.languages.tremor,n.languages.trickle=n.languages.tremor})(t)}return Ry}var Ny,fN;function ZY(){if(fN)return Ny;fN=1;var e=KL(),t=q_();Ny=n,n.displayName="tsx",n.aliases=[];function n(i){i.register(e),i.register(t),(function(s){var l=s.util.clone(s.languages.typescript);s.languages.tsx=s.languages.extend("jsx",l),delete s.languages.tsx.parameter,delete s.languages.tsx["literal-property"];var u=s.languages.tsx.tag;u.pattern=RegExp(/(^|[^\w$]|(?=<\/))/.source+"(?:"+u.pattern.source+")",u.pattern.flags),u.lookbehind=!0})(i)}return Ny}var Oy,pN;function QY(){if(pN)return Oy;pN=1;var e=bn();Oy=t,t.displayName="tt2",t.aliases=[];function t(n){n.register(e),(function(i){i.languages.tt2=i.languages.extend("clike",{comment:/#.*|\[%#[\s\S]*?%\]/,keyword:/\b(?:BLOCK|CALL|CASE|CATCH|CLEAR|DEBUG|DEFAULT|ELSE|ELSIF|END|FILTER|FINAL|FOREACH|GET|IF|IN|INCLUDE|INSERT|LAST|MACRO|META|NEXT|PERL|PROCESS|RAWPERL|RETURN|SET|STOP|SWITCH|TAGS|THROW|TRY|UNLESS|USE|WHILE|WRAPPER)\b/,punctuation:/[[\]{},()]/}),i.languages.insertBefore("tt2","number",{operator:/=[>=]?|!=?|<=?|>=?|&&|\|\|?|\b(?:and|not|or)\b/,variable:{pattern:/\b[a-z]\w*(?:\s*\.\s*(?:\d+|\$?[a-z]\w*))*\b/i}}),i.languages.insertBefore("tt2","keyword",{delimiter:{pattern:/^(?:\[%|%%)-?|-?%\]$/,alias:"punctuation"}}),i.languages.insertBefore("tt2","string",{"single-quoted-string":{pattern:/'[^\\']*(?:\\[\s\S][^\\']*)*'/,greedy:!0,alias:"string"},"double-quoted-string":{pattern:/"[^\\"]*(?:\\[\s\S][^\\"]*)*"/,greedy:!0,alias:"string",inside:{variable:{pattern:/\$(?:[a-z]\w*(?:\.(?:\d+|\$?[a-z]\w*))*)/i}}}}),delete i.languages.tt2.string,i.hooks.add("before-tokenize",function(s){var l=/\[%[\s\S]+?%\]/g;i.languages["markup-templating"].buildPlaceholders(s,"tt2",l)}),i.hooks.add("after-tokenize",function(s){i.languages["markup-templating"].tokenizePlaceholders(s,"tt2")})})(n)}return Oy}var Iy,mN;function JY(){if(mN)return Iy;mN=1;var e=bn();Iy=t,t.displayName="twig",t.aliases=[];function t(n){n.register(e),n.languages.twig={comment:/^\{#[\s\S]*?#\}$/,"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/}},keyword:/\b(?:even|if|odd)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/},n.hooks.add("before-tokenize",function(i){if(i.language==="twig"){var s=/\{(?:#[\s\S]*?#|%[\s\S]*?%|\{[\s\S]*?\})\}/g;n.languages["markup-templating"].buildPlaceholders(i,"twig",s)}}),n.hooks.add("after-tokenize",function(i){n.languages["markup-templating"].tokenizePlaceholders(i,"twig")})}return Iy}var Ly,gN;function eX(){if(gN)return Ly;gN=1,Ly=e,e.displayName="typoscript",e.aliases=["tsconfig"];function e(t){(function(n){var i=/\b(?:ACT|ACTIFSUB|CARRAY|CASE|CLEARGIF|COA|COA_INT|CONSTANTS|CONTENT|CUR|EDITPANEL|EFFECT|EXT|FILE|FLUIDTEMPLATE|FORM|FRAME|FRAMESET|GIFBUILDER|GMENU|GMENU_FOLDOUT|GMENU_LAYERS|GP|HMENU|HRULER|HTML|IENV|IFSUB|IMAGE|IMGMENU|IMGMENUITEM|IMGTEXT|IMG_RESOURCE|INCLUDE_TYPOSCRIPT|JSMENU|JSMENUITEM|LLL|LOAD_REGISTER|NO|PAGE|RECORDS|RESTORE_REGISTER|TEMPLATE|TEXT|TMENU|TMENUITEM|TMENU_LAYERS|USER|USER_INT|_GIFBUILDER|global|globalString|globalVar)\b/;n.languages.typoscript={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:= \t]|(?:^|[^= \t])[ \t]+)\/\/.*/,lookbehind:!0,greedy:!0},{pattern:/(^|[^"'])#.*/,lookbehind:!0,greedy:!0}],function:[{pattern:/<INCLUDE_TYPOSCRIPT:\s*source\s*=\s*(?:"[^"\r\n]*"|'[^'\r\n]*')\s*>/,inside:{string:{pattern:/"[^"\r\n]*"|'[^'\r\n]*'/,inside:{keyword:i}},keyword:{pattern:/INCLUDE_TYPOSCRIPT/}}},{pattern:/@import\s*(?:"[^"\r\n]*"|'[^'\r\n]*')/,inside:{string:/"[^"\r\n]*"|'[^'\r\n]*'/}}],string:{pattern:/^([^=]*=[< ]?)(?:(?!\]\n).)*/,lookbehind:!0,inside:{function:/\{\$.*\}/,keyword:i,number:/^\d+$/,punctuation:/[,|:]/}},keyword:i,number:{pattern:/\b\d+\s*[.{=]/,inside:{operator:/[.{=]/}},tag:{pattern:/\.?[-\w\\]+\.?/,inside:{punctuation:/\./}},punctuation:/[{}[\];(),.:|]/,operator:/[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/},n.languages.tsconfig=n.languages.typoscript})(t)}return Ly}var Dy,bN;function tX(){if(bN)return Dy;bN=1,Dy=e,e.displayName="unrealscript",e.aliases=["uc","uscript"];function e(t){t.languages.unrealscript={comment:/\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},category:{pattern:/(\b(?:(?:autoexpand|hide|show)categories|var)\s*\()[^()]+(?=\))/,lookbehind:!0,greedy:!0,alias:"property"},metadata:{pattern:/(\w\s*)<\s*\w+\s*=[^<>|=\r\n]+(?:\|\s*\w+\s*=[^<>|=\r\n]+)*>/,lookbehind:!0,greedy:!0,inside:{property:/\b\w+(?=\s*=)/,operator:/=/,punctuation:/[<>|]/}},macro:{pattern:/`\w+/,alias:"property"},"class-name":{pattern:/(\b(?:class|enum|extends|interface|state(?:\(\))?|struct|within)\s+)\w+/,lookbehind:!0},keyword:/\b(?:abstract|actor|array|auto|autoexpandcategories|bool|break|byte|case|class|classgroup|client|coerce|collapsecategories|config|const|continue|default|defaultproperties|delegate|dependson|deprecated|do|dontcollapsecategories|editconst|editinlinenew|else|enum|event|exec|export|extends|final|float|for|forcescriptorder|foreach|function|goto|guid|hidecategories|hidedropdown|if|ignores|implements|inherits|input|int|interface|iterator|latent|local|material|name|native|nativereplication|noexport|nontransient|noteditinlinenew|notplaceable|operator|optional|out|pawn|perobjectconfig|perobjectlocalized|placeable|postoperator|preoperator|private|protected|reliable|replication|return|server|showcategories|simulated|singular|state|static|string|struct|structdefault|structdefaultproperties|switch|texture|transient|travel|unreliable|until|var|vector|while|within)\b/,function:/\b[a-z_]\w*(?=\s*\()/i,boolean:/\b(?:false|true)\b/,number:/\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/>>|<<|--|\+\+|\*\*|[-+*/~!=<>$@]=?|&&?|\|\|?|\^\^?|[?:%]|\b(?:ClockwiseFrom|Cross|Dot)\b/,punctuation:/[()[\]{};,.]/},t.languages.uc=t.languages.uscript=t.languages.unrealscript}return Dy}var My,yN;function nX(){if(yN)return My;yN=1,My=e,e.displayName="uorazor",e.aliases=[];function e(t){t.languages.uorazor={"comment-hash":{pattern:/#.*/,alias:"comment",greedy:!0},"comment-slash":{pattern:/\/\/.*/,alias:"comment",greedy:!0},string:{pattern:/("|')(?:\\.|(?!\1)[^\\\r\n])*\1/,inside:{punctuation:/^['"]|['"]$/},greedy:!0},"source-layers":{pattern:/\b(?:arms|backpack|blue|bracelet|cancel|clear|cloak|criminal|earrings|enemy|facialhair|friend|friendly|gloves|gray|grey|ground|hair|head|innerlegs|innertorso|innocent|lefthand|middletorso|murderer|neck|nonfriendly|onehandedsecondary|outerlegs|outertorso|pants|red|righthand|ring|self|shirt|shoes|talisman|waist)\b/i,alias:"function"},"source-commands":{pattern:/\b(?:alliance|attack|cast|clearall|clearignore|clearjournal|clearlist|clearsysmsg|createlist|createtimer|dclick|dclicktype|dclickvar|dress|dressconfig|drop|droprelloc|emote|getlabel|guild|gumpclose|gumpresponse|hotkey|ignore|lasttarget|lift|lifttype|menu|menuresponse|msg|org|organize|organizer|overhead|pause|poplist|potion|promptresponse|pushlist|removelist|removetimer|rename|restock|say|scav|scavenger|script|setability|setlasttarget|setskill|settimer|setvar|sysmsg|target|targetloc|targetrelloc|targettype|undress|unignore|unsetvar|useobject|useonce|useskill|usetype|virtue|wait|waitforgump|waitformenu|waitforprompt|waitforstat|waitforsysmsg|waitfortarget|walk|wfsysmsg|wft|whisper|yell)\b/,alias:"function"},"tag-name":{pattern:/(^\{%-?\s*)\w+/,lookbehind:!0,alias:"keyword"},delimiter:{pattern:/^\{[{%]-?|-?[%}]\}$/,alias:"punctuation"},function:/\b(?:atlist|close|closest|count|counter|counttype|dead|dex|diffhits|diffmana|diffstam|diffweight|find|findbuff|finddebuff|findlayer|findtype|findtypelist|followers|gumpexists|hidden|hits|hp|hue|human|humanoid|ingump|inlist|insysmessage|insysmsg|int|invul|lhandempty|list|listexists|mana|maxhits|maxhp|maxmana|maxstam|maxweight|monster|mounted|name|next|noto|paralyzed|poisoned|position|prev|previous|queued|rand|random|rhandempty|skill|stam|str|targetexists|timer|timerexists|varexist|warmode|weight)\b/,keyword:/\b(?:and|as|break|continue|else|elseif|endfor|endif|endwhile|for|if|loop|not|or|replay|stop|while)\b/,boolean:/\b(?:false|null|true)\b/,number:/\b0x[\dA-Fa-f]+|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:[Ee][-+]?\d+)?/,operator:[{pattern:/(\s)(?:and|b-and|b-or|b-xor|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/,lookbehind:!0},/[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/],punctuation:/[()\[\]{}:.,]/}}return My}var By,vN;function rX(){if(vN)return By;vN=1,By=e,e.displayName="uri",e.aliases=["url"];function e(t){t.languages.uri={scheme:{pattern:/^[a-z][a-z0-9+.-]*:/im,greedy:!0,inside:{"scheme-delimiter":/:$/}},fragment:{pattern:/#[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"fragment-delimiter":/^#/}},query:{pattern:/\?[\w\-.~!$&'()*+,;=%:@/?]*/,inside:{"query-delimiter":{pattern:/^\?/,greedy:!0},"pair-delimiter":/[&;]/,pair:{pattern:/^[^=][\s\S]*/,inside:{key:/^[^=]+/,value:{pattern:/(^=)[\s\S]+/,lookbehind:!0}}}}},authority:{pattern:RegExp(/^\/\//.source+/(?:[\w\-.~!$&'()*+,;=%:]*@)?/.source+("(?:"+/\[(?:[0-9a-fA-F:.]{2,48}|v[0-9a-fA-F]+\.[\w\-.~!$&'()*+,;=]+)\]/.source+"|"+/[\w\-.~!$&'()*+,;=%]*/.source+")")+/(?::\d*)?/.source,"m"),inside:{"authority-delimiter":/^\/\//,"user-info-segment":{pattern:/^[\w\-.~!$&'()*+,;=%:]*@/,inside:{"user-info-delimiter":/@$/,"user-info":/^[\w\-.~!$&'()*+,;=%:]+/}},"port-segment":{pattern:/:\d*$/,inside:{"port-delimiter":/^:/,port:/^\d+/}},host:{pattern:/[\s\S]+/,inside:{"ip-literal":{pattern:/^\[[\s\S]+\]$/,inside:{"ip-literal-delimiter":/^\[|\]$/,"ipv-future":/^v[\s\S]+/,"ipv6-address":/^[\s\S]+/}},"ipv4-address":/^(?:(?:[03-9]\d?|[12]\d{0,2})\.){3}(?:[03-9]\d?|[12]\d{0,2})$/}}}},path:{pattern:/^[\w\-.~!$&'()*+,;=%:@/]+/m,inside:{"path-separator":/\//}}},t.languages.url=t.languages.uri}return By}var Fy,_N;function iX(){if(_N)return Fy;_N=1,Fy=e,e.displayName="v",e.aliases=[];function e(t){(function(n){var i={pattern:/[\s\S]+/,inside:null};n.languages.v=n.languages.extend("clike",{string:{pattern:/r?(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,alias:"quoted-string",greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)\$(?:\{[^{}]*\}|\w+(?:\.\w+(?:\([^\(\)]*\))?|\[[^\[\]]+\])*)/,lookbehind:!0,inside:{"interpolation-variable":{pattern:/^\$\w[\s\S]*$/,alias:"variable"},"interpolation-punctuation":{pattern:/^\$\{|\}$/,alias:"punctuation"},"interpolation-expression":i}}}},"class-name":{pattern:/(\b(?:enum|interface|struct|type)\s+)(?:C\.)?\w+/,lookbehind:!0},keyword:/(?:\b(?:__global|as|asm|assert|atomic|break|chan|const|continue|defer|else|embed|enum|fn|for|go(?:to)?|if|import|in|interface|is|lock|match|module|mut|none|or|pub|return|rlock|select|shared|sizeof|static|struct|type(?:of)?|union|unsafe)|\$(?:else|for|if)|#(?:flag|include))\b/,number:/\b(?:0x[a-f\d]+(?:_[a-f\d]+)*|0b[01]+(?:_[01]+)*|0o[0-7]+(?:_[0-7]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?)\b/i,operator:/~|\?|[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\.?/,builtin:/\b(?:any(?:_float|_int)?|bool|byte(?:ptr)?|charptr|f(?:32|64)|i(?:8|16|64|128|nt)|rune|size_t|string|u(?:16|32|64|128)|voidptr)\b/}),i.inside=n.languages.v,n.languages.insertBefore("v","string",{char:{pattern:/`(?:\\`|\\?[^`]{1,2})`/,alias:"rune"}}),n.languages.insertBefore("v","operator",{attribute:{pattern:/(^[\t ]*)\[(?:deprecated|direct_array_access|flag|inline|live|ref_only|typedef|unsafe_fn|windows_stdcall)\]/m,lookbehind:!0,alias:"annotation",inside:{punctuation:/[\[\]]/,keyword:/\w+/}},generic:{pattern:/<\w+>(?=\s*[\)\{])/,inside:{punctuation:/[<>]/,"class-name":/\w+/}}}),n.languages.insertBefore("v","function",{"generic-function":{pattern:/\b\w+\s*<\w+>(?=\()/,inside:{function:/^\w+/,generic:{pattern:/<\w+>/,inside:n.languages.v.generic.inside}}}})})(t)}return Fy}var Py,SN;function aX(){if(SN)return Py;SN=1,Py=e,e.displayName="vala",e.aliases=[];function e(t){t.languages.vala=t.languages.extend("clike",{"class-name":[{pattern:/\b[A-Z]\w*(?:\.\w+)*\b(?=(?:\?\s+|\*?\s+\*?)\w)/,inside:{punctuation:/\./}},{pattern:/(\[)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}},{pattern:/((?:\b(?:class|enum|interface|new|struct)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/,lookbehind:!0,inside:{punctuation:/\./}}],keyword:/\b(?:abstract|as|assert|async|base|bool|break|case|catch|char|class|const|construct|continue|default|delegate|delete|do|double|dynamic|else|ensures|enum|errordomain|extern|finally|float|for|foreach|get|if|in|inline|int|int16|int32|int64|int8|interface|internal|is|lock|long|namespace|new|null|out|override|owned|params|private|protected|public|ref|requires|return|set|short|signal|sizeof|size_t|ssize_t|static|string|struct|switch|this|throw|throws|try|typeof|uchar|uint|uint16|uint32|uint64|uint8|ulong|unichar|unowned|ushort|using|value|var|virtual|void|volatile|weak|while|yield)\b/i,function:/\b\w+(?=\s*\()/,number:/(?:\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)(?:f|u?l?)?/i,operator:/\+\+|--|&&|\|\||<<=?|>>=?|=>|->|~|[+\-*\/%&^|=!<>]=?|\?\??|\.\.\./,punctuation:/[{}[\];(),.:]/,constant:/\b[A-Z0-9_]+\b/}),t.languages.insertBefore("vala","string",{"raw-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"template-string":{pattern:/@"[\s\S]*?"/,greedy:!0,inside:{interpolation:{pattern:/\$(?:\([^)]*\)|[a-zA-Z]\w*)/,inside:{delimiter:{pattern:/^\$\(?|\)$/,alias:"punctuation"},rest:t.languages.vala}},string:/[\s\S]+/}}}),t.languages.insertBefore("vala","keyword",{regex:{pattern:/\/(?:\[(?:[^\]\\\r\n]|\\.)*\]|\\.|[^/\\\[\r\n])+\/[imsx]{0,4}(?=\s*(?:$|[\r\n,.;})\]]))/,greedy:!0,inside:{"regex-source":{pattern:/^(\/)[\s\S]+(?=\/[a-z]*$)/,lookbehind:!0,alias:"language-regex",inside:t.languages.regex},"regex-delimiter":/^\//,"regex-flags":/^[a-z]+$/}}})}return Py}var Uy,EN;function sX(){if(EN)return Uy;EN=1,Uy=e,e.displayName="velocity",e.aliases=[];function e(t){(function(n){n.languages.velocity=n.languages.extend("markup",{});var i={variable:{pattern:/(^|[^\\](?:\\\\)*)\$!?(?:[a-z][\w-]*(?:\([^)]*\))?(?:\.[a-z][\w-]*(?:\([^)]*\))?|\[[^\]]+\])*|\{[^}]+\})/i,lookbehind:!0,inside:{}},string:{pattern:/"[^"]*"|'[^']*'/,greedy:!0},number:/\b\d+\b/,boolean:/\b(?:false|true)\b/,operator:/[=!<>]=?|[+*/%-]|&&|\|\||\.\.|\b(?:eq|g[et]|l[et]|n(?:e|ot))\b/,punctuation:/[(){}[\]:,.]/};i.variable.inside={string:i.string,function:{pattern:/([^\w-])[a-z][\w-]*(?=\()/,lookbehind:!0},number:i.number,boolean:i.boolean,punctuation:i.punctuation},n.languages.insertBefore("velocity","comment",{unparsed:{pattern:/(^|[^\\])#\[\[[\s\S]*?\]\]#/,lookbehind:!0,greedy:!0,inside:{punctuation:/^#\[\[|\]\]#$/}},"velocity-comment":[{pattern:/(^|[^\\])#\*[\s\S]*?\*#/,lookbehind:!0,greedy:!0,alias:"comment"},{pattern:/(^|[^\\])##.*/,lookbehind:!0,greedy:!0,alias:"comment"}],directive:{pattern:/(^|[^\\](?:\\\\)*)#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})(?:\s*\((?:[^()]|\([^()]*\))*\))?/i,lookbehind:!0,inside:{keyword:{pattern:/^#@?(?:[a-z][\w-]*|\{[a-z][\w-]*\})|\bin\b/,inside:{punctuation:/[{}]/}},rest:i}},variable:i.variable}),n.languages.velocity.tag.inside["attr-value"].inside.rest=n.languages.velocity})(t)}return Uy}var jy,xN;function oX(){if(xN)return jy;xN=1,jy=e,e.displayName="verilog",e.aliases=[];function e(t){t.languages.verilog={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/,greedy:!0},"kernel-function":{pattern:/\B\$\w+\b/,alias:"property"},constant:/\B`\w+\b/,function:/\b\w+(?=\()/,keyword:/\b(?:alias|and|assert|assign|assume|automatic|before|begin|bind|bins|binsof|bit|break|buf|bufif0|bufif1|byte|case|casex|casez|cell|chandle|class|clocking|cmos|config|const|constraint|context|continue|cover|covergroup|coverpoint|cross|deassign|default|defparam|design|disable|dist|do|edge|else|end|endcase|endclass|endclocking|endconfig|endfunction|endgenerate|endgroup|endinterface|endmodule|endpackage|endprimitive|endprogram|endproperty|endsequence|endspecify|endtable|endtask|enum|event|expect|export|extends|extern|final|first_match|for|force|foreach|forever|fork|forkjoin|function|generate|genvar|highz0|highz1|if|iff|ifnone|ignore_bins|illegal_bins|import|incdir|include|initial|inout|input|inside|instance|int|integer|interface|intersect|join|join_any|join_none|large|liblist|library|local|localparam|logic|longint|macromodule|matches|medium|modport|module|nand|negedge|new|nmos|nor|noshowcancelled|not|notif0|notif1|null|or|output|package|packed|parameter|pmos|posedge|primitive|priority|program|property|protected|pull0|pull1|pulldown|pullup|pulsestyle_ondetect|pulsestyle_onevent|pure|rand|randc|randcase|randsequence|rcmos|real|realtime|ref|reg|release|repeat|return|rnmos|rpmos|rtran|rtranif0|rtranif1|scalared|sequence|shortint|shortreal|showcancelled|signed|small|solve|specify|specparam|static|string|strong0|strong1|struct|super|supply0|supply1|table|tagged|task|this|throughout|time|timeprecision|timeunit|tran|tranif0|tranif1|tri|tri0|tri1|triand|trior|trireg|type|typedef|union|unique|unsigned|use|uwire|var|vectored|virtual|void|wait|wait_order|wand|weak0|weak1|while|wildcard|wire|with|within|wor|xnor|xor)\b/,important:/\b(?:always|always_comb|always_ff|always_latch)\b(?: *@)?/,number:/\B##?\d+|(?:\b\d+)?'[odbh] ?[\da-fzx_?]+|\b(?:\d*[._])?\d+(?:e[-+]?\d+)?/i,operator:/[-+{}^~%*\/?=!<>&|]+/,punctuation:/[[\];(),.:]/}}return jy}var zy,wN;function lX(){if(wN)return zy;wN=1,zy=e,e.displayName="vhdl",e.aliases=[];function e(t){t.languages.vhdl={comment:/--.+/,"vhdl-vectors":{pattern:/\b[oxb]"[\da-f_]+"|"[01uxzwlh-]+"/i,alias:"number"},"quoted-function":{pattern:/"\S+?"(?=\()/,alias:"function"},string:/"(?:[^\\"\r\n]|\\(?:\r\n|[\s\S]))*"/,constant:/\b(?:library|use)\b/i,keyword:/\b(?:'active|'ascending|'base|'delayed|'driving|'driving_value|'event|'high|'image|'instance_name|'last_active|'last_event|'last_value|'left|'leftof|'length|'low|'path_name|'pos|'pred|'quiet|'range|'reverse_range|'right|'rightof|'simple_name|'stable|'succ|'transaction|'val|'value|access|after|alias|all|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|new|next|null|of|on|open|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|report|return|select|severity|shared|signal|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with)\b/i,boolean:/\b(?:false|true)\b/i,function:/\w+(?=\()/,number:/'[01uxzwlh-]'|\b(?:\d+#[\da-f_.]+#|\d[\d_.]*)(?:e[-+]?\d+)?/i,operator:/[<>]=?|:=|[-+*/&=]|\b(?:abs|and|mod|nand|nor|not|or|rem|rol|ror|sla|sll|sra|srl|xnor|xor)\b/i,punctuation:/[{}[\];(),.:]/}}return zy}var Hy,CN;function cX(){if(CN)return Hy;CN=1,Hy=e,e.displayName="vim",e.aliases=[];function e(t){t.languages.vim={string:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/,comment:/".*/,function:/\b\w+(?=\()/,keyword:/\b(?:N|Next|P|Print|X|XMLent|XMLns|ab|abbreviate|abc|abclear|abo|aboveleft|al|all|ar|arga|argadd|argd|argdelete|argdo|arge|argedit|argg|argglobal|argl|arglocal|args|argu|argument|as|ascii|b|bN|bNext|ba|bad|badd|ball|bd|bdelete|be|bel|belowright|bf|bfirst|bl|blast|bm|bmodified|bn|bnext|bo|botright|bp|bprevious|br|brea|break|breaka|breakadd|breakd|breakdel|breakl|breaklist|brewind|bro|browse|bufdo|buffer|buffers|bun|bunload|bw|bwipeout|c|cN|cNext|cNfcNfile|ca|cabbrev|cabc|cabclear|cad|caddb|caddbuffer|caddexpr|caddf|caddfile|cal|call|cat|catch|cb|cbuffer|cc|ccl|cclose|cd|ce|center|cex|cexpr|cf|cfile|cfir|cfirst|cg|cgetb|cgetbuffer|cgete|cgetexpr|cgetfile|change|changes|chd|chdir|che|checkpath|checkt|checktime|cl|cla|clast|clist|clo|close|cmapc|cmapclear|cn|cnew|cnewer|cnext|cnf|cnfile|cnorea|cnoreabbrev|co|col|colder|colo|colorscheme|comc|comclear|comp|compiler|con|conf|confirm|continue|cope|copen|copy|cp|cpf|cpfile|cprevious|cq|cquit|cr|crewind|cu|cuna|cunabbrev|cunmap|cw|cwindow|d|debugg|debuggreedy|delc|delcommand|delete|delf|delfunction|delm|delmarks|di|diffg|diffget|diffoff|diffpatch|diffpu|diffput|diffsplit|diffthis|diffu|diffupdate|dig|digraphs|display|dj|djump|dl|dlist|dr|drop|ds|dsearch|dsp|dsplit|e|earlier|echoe|echoerr|echom|echomsg|echon|edit|el|else|elsei|elseif|em|emenu|en|endf|endfo|endfor|endfun|endfunction|endif|endt|endtry|endw|endwhile|ene|enew|ex|exi|exit|exu|exusage|f|file|files|filetype|fin|fina|finally|find|fini|finish|fir|first|fix|fixdel|fo|fold|foldc|foldclose|foldd|folddoc|folddoclosed|folddoopen|foldo|foldopen|for|fu|fun|function|go|goto|gr|grep|grepa|grepadd|h|ha|hardcopy|help|helpf|helpfind|helpg|helpgrep|helpt|helptags|hid|hide|his|history|ia|iabbrev|iabc|iabclear|if|ij|ijump|il|ilist|imapc|imapclear|in|inorea|inoreabbrev|isearch|isp|isplit|iu|iuna|iunabbrev|iunmap|j|join|ju|jumps|k|kee|keepalt|keepj|keepjumps|keepmarks|l|lN|lNext|lNf|lNfile|la|lad|laddb|laddbuffer|laddexpr|laddf|laddfile|lan|language|last|later|lb|lbuffer|lc|lcd|lch|lchdir|lcl|lclose|left|lefta|leftabove|let|lex|lexpr|lf|lfile|lfir|lfirst|lg|lgetb|lgetbuffer|lgete|lgetexpr|lgetfile|lgr|lgrep|lgrepa|lgrepadd|lh|lhelpgrep|list|ll|lla|llast|lli|llist|lm|lmak|lmake|lmap|lmapc|lmapclear|ln|lne|lnew|lnewer|lnext|lnf|lnfile|lnoremap|lo|loadview|loc|lockmarks|lockv|lockvar|lol|lolder|lop|lopen|lp|lpf|lpfile|lprevious|lr|lrewind|ls|lt|ltag|lu|lunmap|lv|lvimgrep|lvimgrepa|lvimgrepadd|lw|lwindow|m|ma|mak|make|mark|marks|mat|match|menut|menutranslate|mk|mkexrc|mks|mksession|mksp|mkspell|mkv|mkvie|mkview|mkvimrc|mod|mode|move|mz|mzf|mzfile|mzscheme|n|nbkey|new|next|nmapc|nmapclear|noh|nohlsearch|norea|noreabbrev|nu|number|nun|nunmap|o|omapc|omapclear|on|only|open|opt|options|ou|ounmap|p|pc|pclose|pe|ped|pedit|perl|perld|perldo|po|pop|popu|popup|pp|ppop|pre|preserve|prev|previous|print|prof|profd|profdel|profile|promptf|promptfind|promptr|promptrepl|ps|psearch|ptN|ptNext|pta|ptag|ptf|ptfirst|ptj|ptjump|ptl|ptlast|ptn|ptnext|ptp|ptprevious|ptr|ptrewind|pts|ptselect|pu|put|pw|pwd|py|pyf|pyfile|python|q|qa|qall|quit|quita|quitall|r|read|rec|recover|red|redi|redir|redo|redr|redraw|redraws|redrawstatus|reg|registers|res|resize|ret|retab|retu|return|rew|rewind|ri|right|rightb|rightbelow|ru|rub|ruby|rubyd|rubydo|rubyf|rubyfile|runtime|rv|rviminfo|sN|sNext|sa|sal|sall|san|sandbox|sargument|sav|saveas|sb|sbN|sbNext|sba|sball|sbf|sbfirst|sbl|sblast|sbm|sbmodified|sbn|sbnext|sbp|sbprevious|sbr|sbrewind|sbuffer|scrip|scripte|scriptencoding|scriptnames|se|set|setf|setfiletype|setg|setglobal|setl|setlocal|sf|sfind|sfir|sfirst|sh|shell|sign|sil|silent|sim|simalt|sl|sla|slast|sleep|sm|smagic|smap|smapc|smapclear|sme|smenu|sn|snext|sni|sniff|sno|snomagic|snor|snoremap|snoreme|snoremenu|so|sor|sort|source|sp|spe|spelld|spelldump|spellgood|spelli|spellinfo|spellr|spellrepall|spellu|spellundo|spellw|spellwrong|split|spr|sprevious|sre|srewind|st|sta|stag|star|startg|startgreplace|startinsert|startr|startreplace|stj|stjump|stop|stopi|stopinsert|sts|stselect|sun|sunhide|sunm|sunmap|sus|suspend|sv|sview|syncbind|t|tN|tNext|ta|tab|tabN|tabNext|tabc|tabclose|tabd|tabdo|tabe|tabedit|tabf|tabfind|tabfir|tabfirst|tabl|tablast|tabm|tabmove|tabn|tabnew|tabnext|tabo|tabonly|tabp|tabprevious|tabr|tabrewind|tabs|tag|tags|tc|tcl|tcld|tcldo|tclf|tclfile|te|tearoff|tf|tfirst|th|throw|tj|tjump|tl|tlast|tm|tmenu|tn|tnext|to|topleft|tp|tprevious|tr|trewind|try|ts|tselect|tu|tunmenu|u|una|unabbreviate|undo|undoj|undojoin|undol|undolist|unh|unhide|unlet|unlo|unlockvar|unm|unmap|up|update|ve|verb|verbose|version|vert|vertical|vi|vie|view|vim|vimgrep|vimgrepa|vimgrepadd|visual|viu|viusage|vmapc|vmapclear|vne|vnew|vs|vsplit|vu|vunmap|w|wN|wNext|wa|wall|wh|while|win|winc|wincmd|windo|winp|winpos|winsize|wn|wnext|wp|wprevious|wq|wqa|wqall|write|ws|wsverb|wv|wviminfo|x|xa|xall|xit|xm|xmap|xmapc|xmapclear|xme|xmenu|xn|xnoremap|xnoreme|xnoremenu|xu|xunmap|y|yank)\b/,builtin:/\b(?:acd|ai|akm|aleph|allowrevins|altkeymap|ambiwidth|ambw|anti|antialias|arab|arabic|arabicshape|ari|arshape|autochdir|autocmd|autoindent|autoread|autowrite|autowriteall|aw|awa|background|backspace|backup|backupcopy|backupdir|backupext|backupskip|balloondelay|ballooneval|balloonexpr|bdir|bdlay|beval|bex|bexpr|bg|bh|bin|binary|biosk|bioskey|bk|bkc|bomb|breakat|brk|browsedir|bs|bsdir|bsk|bt|bufhidden|buflisted|buftype|casemap|ccv|cdpath|cedit|cfu|ch|charconvert|ci|cin|cindent|cink|cinkeys|cino|cinoptions|cinw|cinwords|clipboard|cmdheight|cmdwinheight|cmp|cms|columns|com|comments|commentstring|compatible|complete|completefunc|completeopt|consk|conskey|copyindent|cot|cpo|cpoptions|cpt|cscopepathcomp|cscopeprg|cscopequickfix|cscopetag|cscopetagorder|cscopeverbose|cspc|csprg|csqf|cst|csto|csverb|cuc|cul|cursorcolumn|cursorline|cwh|debug|deco|def|define|delcombine|dex|dg|dict|dictionary|diff|diffexpr|diffopt|digraph|dip|dir|directory|dy|ea|ead|eadirection|eb|ed|edcompatible|ef|efm|ei|ek|enc|encoding|endofline|eol|ep|equalalways|equalprg|errorbells|errorfile|errorformat|esckeys|et|eventignore|expandtab|exrc|fcl|fcs|fdc|fde|fdi|fdl|fdls|fdm|fdn|fdo|fdt|fen|fenc|fencs|fex|ff|ffs|fileencoding|fileencodings|fileformat|fileformats|fillchars|fk|fkmap|flp|fml|fmr|foldcolumn|foldenable|foldexpr|foldignore|foldlevel|foldlevelstart|foldmarker|foldmethod|foldminlines|foldnestmax|foldtext|formatexpr|formatlistpat|formatoptions|formatprg|fp|fs|fsync|ft|gcr|gd|gdefault|gfm|gfn|gfs|gfw|ghr|gp|grepformat|grepprg|gtl|gtt|guicursor|guifont|guifontset|guifontwide|guiheadroom|guioptions|guipty|guitablabel|guitabtooltip|helpfile|helpheight|helplang|hf|hh|hi|hidden|highlight|hk|hkmap|hkmapp|hkp|hl|hlg|hls|hlsearch|ic|icon|iconstring|ignorecase|im|imactivatekey|imak|imc|imcmdline|imd|imdisable|imi|iminsert|ims|imsearch|inc|include|includeexpr|incsearch|inde|indentexpr|indentkeys|indk|inex|inf|infercase|insertmode|invacd|invai|invakm|invallowrevins|invaltkeymap|invanti|invantialias|invar|invarab|invarabic|invarabicshape|invari|invarshape|invautochdir|invautoindent|invautoread|invautowrite|invautowriteall|invaw|invawa|invbackup|invballooneval|invbeval|invbin|invbinary|invbiosk|invbioskey|invbk|invbl|invbomb|invbuflisted|invcf|invci|invcin|invcindent|invcompatible|invconfirm|invconsk|invconskey|invcopyindent|invcp|invcscopetag|invcscopeverbose|invcst|invcsverb|invcuc|invcul|invcursorcolumn|invcursorline|invdeco|invdelcombine|invdg|invdiff|invdigraph|invdisable|invea|inveb|inved|invedcompatible|invek|invendofline|inveol|invequalalways|inverrorbells|invesckeys|invet|invex|invexpandtab|invexrc|invfen|invfk|invfkmap|invfoldenable|invgd|invgdefault|invguipty|invhid|invhidden|invhk|invhkmap|invhkmapp|invhkp|invhls|invhlsearch|invic|invicon|invignorecase|invim|invimc|invimcmdline|invimd|invincsearch|invinf|invinfercase|invinsertmode|invis|invjoinspaces|invjs|invlazyredraw|invlbr|invlinebreak|invlisp|invlist|invloadplugins|invlpl|invlz|invma|invmacatsui|invmagic|invmh|invml|invmod|invmodeline|invmodifiable|invmodified|invmore|invmousef|invmousefocus|invmousehide|invnu|invnumber|invodev|invopendevice|invpaste|invpi|invpreserveindent|invpreviewwindow|invprompt|invpvw|invreadonly|invremap|invrestorescreen|invrevins|invri|invrightleft|invrightleftcmd|invrl|invrlc|invro|invrs|invru|invruler|invsb|invsc|invscb|invscrollbind|invscs|invsecure|invsft|invshellslash|invshelltemp|invshiftround|invshortname|invshowcmd|invshowfulltag|invshowmatch|invshowmode|invsi|invsm|invsmartcase|invsmartindent|invsmarttab|invsmd|invsn|invsol|invspell|invsplitbelow|invsplitright|invspr|invsr|invssl|invsta|invstartofline|invstmp|invswapfile|invswf|invta|invtagbsearch|invtagrelative|invtagstack|invtbi|invtbidi|invtbs|invtermbidi|invterse|invtextauto|invtextmode|invtf|invtgst|invtildeop|invtimeout|invtitle|invto|invtop|invtr|invttimeout|invttybuiltin|invttyfast|invtx|invvb|invvisualbell|invwa|invwarn|invwb|invweirdinvert|invwfh|invwfw|invwildmenu|invwinfixheight|invwinfixwidth|invwiv|invwmnu|invwrap|invwrapscan|invwrite|invwriteany|invwritebackup|invws|isf|isfname|isi|isident|isk|iskeyword|isprint|joinspaces|js|key|keymap|keymodel|keywordprg|km|kmp|kp|langmap|langmenu|laststatus|lazyredraw|lbr|lcs|linebreak|lines|linespace|lisp|lispwords|listchars|loadplugins|lpl|lsp|lz|macatsui|magic|makeef|makeprg|matchpairs|matchtime|maxcombine|maxfuncdepth|maxmapdepth|maxmem|maxmempattern|maxmemtot|mco|mef|menuitems|mfd|mh|mis|mkspellmem|ml|mls|mm|mmd|mmp|mmt|modeline|modelines|modifiable|modified|more|mouse|mousef|mousefocus|mousehide|mousem|mousemodel|mouses|mouseshape|mouset|mousetime|mp|mps|msm|mzq|mzquantum|nf|noacd|noai|noakm|noallowrevins|noaltkeymap|noanti|noantialias|noar|noarab|noarabic|noarabicshape|noari|noarshape|noautochdir|noautoindent|noautoread|noautowrite|noautowriteall|noaw|noawa|nobackup|noballooneval|nobeval|nobin|nobinary|nobiosk|nobioskey|nobk|nobl|nobomb|nobuflisted|nocf|noci|nocin|nocindent|nocompatible|noconfirm|noconsk|noconskey|nocopyindent|nocp|nocscopetag|nocscopeverbose|nocst|nocsverb|nocuc|nocul|nocursorcolumn|nocursorline|nodeco|nodelcombine|nodg|nodiff|nodigraph|nodisable|noea|noeb|noed|noedcompatible|noek|noendofline|noeol|noequalalways|noerrorbells|noesckeys|noet|noex|noexpandtab|noexrc|nofen|nofk|nofkmap|nofoldenable|nogd|nogdefault|noguipty|nohid|nohidden|nohk|nohkmap|nohkmapp|nohkp|nohls|noic|noicon|noignorecase|noim|noimc|noimcmdline|noimd|noincsearch|noinf|noinfercase|noinsertmode|nois|nojoinspaces|nojs|nolazyredraw|nolbr|nolinebreak|nolisp|nolist|noloadplugins|nolpl|nolz|noma|nomacatsui|nomagic|nomh|noml|nomod|nomodeline|nomodifiable|nomodified|nomore|nomousef|nomousefocus|nomousehide|nonu|nonumber|noodev|noopendevice|nopaste|nopi|nopreserveindent|nopreviewwindow|noprompt|nopvw|noreadonly|noremap|norestorescreen|norevins|nori|norightleft|norightleftcmd|norl|norlc|noro|nors|noru|noruler|nosb|nosc|noscb|noscrollbind|noscs|nosecure|nosft|noshellslash|noshelltemp|noshiftround|noshortname|noshowcmd|noshowfulltag|noshowmatch|noshowmode|nosi|nosm|nosmartcase|nosmartindent|nosmarttab|nosmd|nosn|nosol|nospell|nosplitbelow|nosplitright|nospr|nosr|nossl|nosta|nostartofline|nostmp|noswapfile|noswf|nota|notagbsearch|notagrelative|notagstack|notbi|notbidi|notbs|notermbidi|noterse|notextauto|notextmode|notf|notgst|notildeop|notimeout|notitle|noto|notop|notr|nottimeout|nottybuiltin|nottyfast|notx|novb|novisualbell|nowa|nowarn|nowb|noweirdinvert|nowfh|nowfw|nowildmenu|nowinfixheight|nowinfixwidth|nowiv|nowmnu|nowrap|nowrapscan|nowrite|nowriteany|nowritebackup|nows|nrformats|numberwidth|nuw|odev|oft|ofu|omnifunc|opendevice|operatorfunc|opfunc|osfiletype|pa|para|paragraphs|paste|pastetoggle|patchexpr|patchmode|path|pdev|penc|pex|pexpr|pfn|ph|pheader|pi|pm|pmbcs|pmbfn|popt|preserveindent|previewheight|previewwindow|printdevice|printencoding|printexpr|printfont|printheader|printmbcharset|printmbfont|printoptions|prompt|pt|pumheight|pvh|pvw|qe|quoteescape|readonly|remap|report|restorescreen|revins|rightleft|rightleftcmd|rl|rlc|ro|rs|rtp|ruf|ruler|rulerformat|runtimepath|sbo|sc|scb|scr|scroll|scrollbind|scrolljump|scrolloff|scrollopt|scs|sect|sections|secure|sel|selection|selectmode|sessionoptions|sft|shcf|shellcmdflag|shellpipe|shellquote|shellredir|shellslash|shelltemp|shelltype|shellxquote|shiftround|shiftwidth|shm|shortmess|shortname|showbreak|showcmd|showfulltag|showmatch|showmode|showtabline|shq|si|sidescroll|sidescrolloff|siso|sj|slm|smartcase|smartindent|smarttab|smc|smd|softtabstop|sol|spc|spell|spellcapcheck|spellfile|spelllang|spellsuggest|spf|spl|splitbelow|splitright|sps|sr|srr|ss|ssl|ssop|stal|startofline|statusline|stl|stmp|su|sua|suffixes|suffixesadd|sw|swapfile|swapsync|swb|swf|switchbuf|sws|sxq|syn|synmaxcol|syntax|t_AB|t_AF|t_AL|t_CS|t_CV|t_Ce|t_Co|t_Cs|t_DL|t_EI|t_F1|t_F2|t_F3|t_F4|t_F5|t_F6|t_F7|t_F8|t_F9|t_IE|t_IS|t_K1|t_K3|t_K4|t_K5|t_K6|t_K7|t_K8|t_K9|t_KA|t_KB|t_KC|t_KD|t_KE|t_KF|t_KG|t_KH|t_KI|t_KJ|t_KK|t_KL|t_RI|t_RV|t_SI|t_Sb|t_Sf|t_WP|t_WS|t_ZH|t_ZR|t_al|t_bc|t_cd|t_ce|t_cl|t_cm|t_cs|t_da|t_db|t_dl|t_fs|t_k1|t_k2|t_k3|t_k4|t_k5|t_k6|t_k7|t_k8|t_k9|t_kB|t_kD|t_kI|t_kN|t_kP|t_kb|t_kd|t_ke|t_kh|t_kl|t_kr|t_ks|t_ku|t_le|t_mb|t_md|t_me|t_mr|t_ms|t_nd|t_op|t_se|t_so|t_sr|t_te|t_ti|t_ts|t_ue|t_us|t_ut|t_vb|t_ve|t_vi|t_vs|t_xs|tabline|tabpagemax|tabstop|tagbsearch|taglength|tagrelative|tagstack|tal|tb|tbi|tbidi|tbis|tbs|tenc|term|termbidi|termencoding|terse|textauto|textmode|textwidth|tgst|thesaurus|tildeop|timeout|timeoutlen|title|titlelen|titleold|titlestring|toolbar|toolbariconsize|top|tpm|tsl|tsr|ttimeout|ttimeoutlen|ttm|tty|ttybuiltin|ttyfast|ttym|ttymouse|ttyscroll|ttytype|tw|tx|uc|ul|undolevels|updatecount|updatetime|ut|vb|vbs|vdir|verbosefile|vfile|viewdir|viewoptions|viminfo|virtualedit|visualbell|vop|wak|warn|wb|wc|wcm|wd|weirdinvert|wfh|wfw|whichwrap|wi|wig|wildchar|wildcharm|wildignore|wildmenu|wildmode|wildoptions|wim|winaltkeys|window|winfixheight|winfixwidth|winheight|winminheight|winminwidth|winwidth|wiv|wiw|wm|wmh|wmnu|wmw|wop|wrap|wrapmargin|wrapscan|writeany|writebackup|writedelay|ww)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?)\b/i,operator:/\|\||&&|[-+.]=?|[=!](?:[=~][#?]?)?|[<>]=?[#?]?|[*\/%?]|\b(?:is(?:not)?)\b/,punctuation:/[{}[\](),;:]/}}return Hy}var qy,TN;function uX(){if(TN)return qy;TN=1,qy=e,e.displayName="visualBasic",e.aliases=[];function e(t){t.languages["visual-basic"]={comment:{pattern:/(?:['‘’]|REM\b)(?:[^\r\n_]|_(?:\r\n?|\n)?)*/i,inside:{keyword:/^REM/i}},directive:{pattern:/#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:\b_[ \t]*(?:\r\n?|\n)|.)+/i,alias:"property",greedy:!0},string:{pattern:/\$?["“”](?:["“”]{2}|[^"“”])*["“”]C?/i,greedy:!0},date:{pattern:/#[ \t]*(?:\d+([/-])\d+\1\d+(?:[ \t]+(?:\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?))?|\d+[ \t]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[ \t]*(?:AM|PM))?)[ \t]*#/i,alias:"number"},number:/(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:[FRD]|U?[ILS])?/i,boolean:/\b(?:False|Nothing|True)\b/i,keyword:/\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Currency|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|Type|TypeOf|U(?:Integer|Long|Short)|Until|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i,operator:/[+\-*/\\^<=>&#@$%!]|\b_(?=[ \t]*[\r\n])/,punctuation:/[{}().,:?]/},t.languages.vb=t.languages["visual-basic"],t.languages.vba=t.languages["visual-basic"]}return qy}var $y,kN;function dX(){if(kN)return $y;kN=1,$y=e,e.displayName="warpscript",e.aliases=[];function e(t){t.languages.warpscript={comment:/#.*|\/\/.*|\/\*[\s\S]*?\*\//,string:{pattern:/"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\\\r\n]|\\.)*'|<'(?:[^\\']|'(?!>)|\\.)*'>/,greedy:!0},variable:/\$\S+/,macro:{pattern:/@\S+/,alias:"property"},keyword:/\b(?:BREAK|CHECKMACRO|CONTINUE|CUDF|DEFINED|DEFINEDMACRO|EVAL|FAIL|FOR|FOREACH|FORSTEP|IFT|IFTE|MSGFAIL|NRETURN|RETHROW|RETURN|SWITCH|TRY|UDF|UNTIL|WHILE)\b/,number:/[+-]?\b(?:NaN|Infinity|\d+(?:\.\d*)?(?:[Ee][+-]?\d+)?|0x[\da-fA-F]+|0b[01]+)\b/,boolean:/\b(?:F|T|false|true)\b/,punctuation:/<%|%>|[{}[\]()]/,operator:/==|&&?|\|\|?|\*\*?|>>>?|<<|[<>!~]=?|[-/%^]|\+!?|\b(?:AND|NOT|OR)\b/}}return $y}var Gy,AN;function hX(){if(AN)return Gy;AN=1,Gy=e,e.displayName="wasm",e.aliases=[];function e(t){t.languages.wasm={comment:[/\(;[\s\S]*?;\)/,{pattern:/;;.*/,greedy:!0}],string:{pattern:/"(?:\\[\s\S]|[^"\\])*"/,greedy:!0},keyword:[{pattern:/\b(?:align|offset)=/,inside:{operator:/=/}},{pattern:/\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|neg?|nearest|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|sqrt|store(?:8|16|32)?|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/,inside:{punctuation:/\./}},/\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/],variable:/\$[\w!#$%&'*+\-./:<=>?@\\^`|~]+/,number:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,punctuation:/[()]/}}return Gy}var Vy,RN;function fX(){if(RN)return Vy;RN=1,Vy=e,e.displayName="webIdl",e.aliases=[];function e(t){(function(n){var i=/(?:\B-|\b_|\b)[A-Za-z][\w-]*(?![\w-])/.source,s="(?:"+/\b(?:unsigned\s+)?long\s+long(?![\w-])/.source+"|"+/\b(?:unrestricted|unsigned)\s+[a-z]+(?![\w-])/.source+"|"+/(?!(?:unrestricted|unsigned)\b)/.source+i+/(?:\s*<(?:[^<>]|<[^<>]*>)*>)?/.source+")"+/(?:\s*\?)?/.source,l={};n.languages["web-idl"]={comment:{pattern:/\/\/.*|\/\*[\s\S]*?\*\//,greedy:!0},string:{pattern:/"[^"]*"/,greedy:!0},namespace:{pattern:RegExp(/(\bnamespace\s+)/.source+i),lookbehind:!0},"class-name":[{pattern:/(^|[^\w-])(?:iterable|maplike|setlike)\s*<(?:[^<>]|<[^<>]*>)*>/,lookbehind:!0,inside:l},{pattern:RegExp(/(\b(?:attribute|const|deleter|getter|optional|setter)\s+)/.source+s),lookbehind:!0,inside:l},{pattern:RegExp("("+/\bcallback\s+/.source+i+/\s*=\s*/.source+")"+s),lookbehind:!0,inside:l},{pattern:RegExp(/(\btypedef\b\s*)/.source+s),lookbehind:!0,inside:l},{pattern:RegExp(/(\b(?:callback|dictionary|enum|interface(?:\s+mixin)?)\s+)(?!(?:interface|mixin)\b)/.source+i),lookbehind:!0},{pattern:RegExp(/(:\s*)/.source+i),lookbehind:!0},RegExp(i+/(?=\s+(?:implements|includes)\b)/.source),{pattern:RegExp(/(\b(?:implements|includes)\s+)/.source+i),lookbehind:!0},{pattern:RegExp(s+"(?="+/\s*(?:\.{3}\s*)?/.source+i+/\s*[(),;=]/.source+")"),inside:l}],builtin:/\b(?:ArrayBuffer|BigInt64Array|BigUint64Array|ByteString|DOMString|DataView|Float32Array|Float64Array|FrozenArray|Int16Array|Int32Array|Int8Array|ObservableArray|Promise|USVString|Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray)\b/,keyword:[/\b(?:async|attribute|callback|const|constructor|deleter|dictionary|enum|getter|implements|includes|inherit|interface|mixin|namespace|null|optional|or|partial|readonly|required|setter|static|stringifier|typedef|unrestricted)\b/,/\b(?:any|bigint|boolean|byte|double|float|iterable|long|maplike|object|octet|record|sequence|setlike|short|symbol|undefined|unsigned|void)\b/],boolean:/\b(?:false|true)\b/,number:{pattern:/(^|[^\w-])-?(?:0x[0-9a-f]+|(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?|NaN|Infinity)(?![\w-])/i,lookbehind:!0},operator:/\.{3}|[=:?<>-]/,punctuation:/[(){}[\].,;]/};for(var u in n.languages["web-idl"])u!=="class-name"&&(l[u]=n.languages["web-idl"][u]);n.languages.webidl=n.languages["web-idl"]})(t)}return Vy}var Wy,NN;function pX(){if(NN)return Wy;NN=1,Wy=e,e.displayName="wiki",e.aliases=[];function e(t){t.languages.wiki=t.languages.extend("markup",{"block-comment":{pattern:/(^|[^\\])\/\*[\s\S]*?\*\//,lookbehind:!0,alias:"comment"},heading:{pattern:/^(=+)[^=\r\n].*?\1/m,inside:{punctuation:/^=+|=+$/,important:/.+/}},emphasis:{pattern:/('{2,5}).+?\1/,inside:{"bold-italic":{pattern:/(''''').+?(?=\1)/,lookbehind:!0,alias:["bold","italic"]},bold:{pattern:/(''')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},italic:{pattern:/('')[^'](?:.*?[^'])?(?=\1)/,lookbehind:!0},punctuation:/^''+|''+$/}},hr:{pattern:/^-{4,}/m,alias:"punctuation"},url:[/ISBN +(?:97[89][ -]?)?(?:\d[ -]?){9}[\dx]\b|(?:PMID|RFC) +\d+/i,/\[\[.+?\]\]|\[.+?\]/],variable:[/__[A-Z]+__/,/\{{3}.+?\}{3}/,/\{\{.+?\}\}/],symbol:[/^#redirect/im,/~{3,5}/],"table-tag":{pattern:/((?:^|[|!])[|!])[^|\r\n]+\|(?!\|)/m,lookbehind:!0,inside:{"table-bar":{pattern:/\|$/,alias:"punctuation"},rest:t.languages.markup.tag.inside}},punctuation:/^(?:\{\||\|\}|\|-|[*#:;!|])|\|\||!!/m}),t.languages.insertBefore("wiki","tag",{nowiki:{pattern:/<(nowiki|pre|source)\b[^>]*>[\s\S]*?<\/\1>/i,inside:{tag:{pattern:/<(?:nowiki|pre|source)\b[^>]*>|<\/(?:nowiki|pre|source)>/i,inside:t.languages.markup.tag.inside}}}})}return Wy}var Ky,ON;function mX(){if(ON)return Ky;ON=1,Ky=e,e.displayName="wolfram",e.aliases=["mathematica","wl","nb"];function e(t){t.languages.wolfram={comment:/\(\*(?:\(\*(?:[^*]|\*(?!\)))*\*\)|(?!\(\*)[\s\S])*?\*\)/,string:{pattern:/"(?:\\.|[^"\\\r\n])*"/,greedy:!0},keyword:/\b(?:Abs|AbsArg|Accuracy|Block|Do|For|Function|If|Manipulate|Module|Nest|NestList|None|Return|Switch|Table|Which|While)\b/,context:{pattern:/\b\w+`+\w*/,alias:"class-name"},blank:{pattern:/\b\w+_\b/,alias:"regex"},"global-variable":{pattern:/\$\w+/,alias:"variable"},boolean:/\b(?:False|True)\b/,number:/(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?j?\b/i,operator:/\/\.|;|=\.|\^=|\^:=|:=|<<|>>|<\||\|>|:>|\|->|->|<-|@@@|@@|@|\/@|=!=|===|==|=|\+|-|\^|\[\/-+%=\]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/,punctuation:/[{}[\];(),.:]/},t.languages.mathematica=t.languages.wolfram,t.languages.wl=t.languages.wolfram,t.languages.nb=t.languages.wolfram}return Ky}var Yy,IN;function gX(){if(IN)return Yy;IN=1,Yy=e,e.displayName="wren",e.aliases=[];function e(t){t.languages.wren={comment:[{pattern:/\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*)|\/\*(?:[^*/]|\*(?!\/)|\/(?!\*))*\*\/)*\*\/)*\*\//,greedy:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],"triple-quoted-string":{pattern:/"""[\s\S]*?"""/,greedy:!0,alias:"string"},"string-literal":null,hashbang:{pattern:/^#!\/.+/,greedy:!0,alias:"comment"},attribute:{pattern:/#!?[ \t\u3000]*\w+/,alias:"keyword"},"class-name":[{pattern:/(\bclass\s+)\w+/,lookbehind:!0},/\b[A-Z][a-z\d_]*\b/],constant:/\b[A-Z][A-Z\d_]*\b/,null:{pattern:/\bnull\b/,alias:"keyword"},keyword:/\b(?:as|break|class|construct|continue|else|for|foreign|if|import|in|is|return|static|super|this|var|while)\b/,boolean:/\b(?:false|true)\b/,number:/\b(?:0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)\b/i,function:/\b[a-z_]\w*(?=\s*[({])/i,operator:/<<|>>|[=!<>]=?|&&|\|\||[-+*/%~^&|?:]|\.{2,3}/,punctuation:/[\[\](){}.,;]/},t.languages.wren["string-literal"]={pattern:/(^|[^\\"])"(?:[^\\"%]|\\[\s\S]|%(?!\()|%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\))*"/,lookbehind:!0,greedy:!0,inside:{interpolation:{pattern:/((?:^|[^\\])(?:\\{2})*)%\((?:[^()]|\((?:[^()]|\([^)]*\))*\))*\)/,lookbehind:!0,inside:{expression:{pattern:/^(%\()[\s\S]+(?=\)$)/,lookbehind:!0,inside:t.languages.wren},"interpolation-punctuation":{pattern:/^%\(|\)$/,alias:"punctuation"}}},string:/[\s\S]+/}}}return Yy}var Xy,LN;function bX(){if(LN)return Xy;LN=1,Xy=e,e.displayName="xeora",e.aliases=["xeoracube"];function e(t){(function(n){n.languages.xeora=n.languages.extend("markup",{constant:{pattern:/\$(?:DomainContents|PageRenderDuration)\$/,inside:{punctuation:{pattern:/\$/}}},variable:{pattern:/\$@?(?:#+|[-+*~=^])?[\w.]+\$/,inside:{punctuation:{pattern:/[$.]/},operator:{pattern:/#+|[-+*~=^@]/}}},"function-inline":{pattern:/\$F:[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\$/,inside:{variable:{pattern:/(?:[,|])@?(?:#+|[-+*~=^])?[\w.]+/,inside:{punctuation:{pattern:/[,.|]/},operator:{pattern:/#+|[-+*~=^@]/}}},punctuation:{pattern:/\$\w:|[$:?.,|]/}},alias:"function"},"function-block":{pattern:/\$XF:\{[-\w.]+\?[-\w.]+(?:,(?:(?:@[-#]*\w+\.[\w+.]\.*)*\|)*(?:(?:[\w+]|[-#*.~^]+[\w+]|=\S)(?:[^$=]|=+[^=])*=*|(?:@[-#]*\w+\.[\w+.]\.*)+(?:(?:[\w+]|[-#*~^][-#*.~^]*[\w+]|=\S)(?:[^$=]|=+[^=])*=*)?)?)?\}:XF\$/,inside:{punctuation:{pattern:/[$:{}?.,|]/}},alias:"function"},"directive-inline":{pattern:/\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\/\w.]+\$/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}}},alias:"function"},"directive-block-open":{pattern:/\$\w+:\{|\$\w(?:#\d+\+?)?(?:\[[-\w.]+\])?:[-\w.]+:\{(?:![A-Z]+)?/,inside:{punctuation:{pattern:/\$(?:\w:|C(?:\[|#\d))?|[:{[\]]/,inside:{tag:{pattern:/#\d/}}},attribute:{pattern:/![A-Z]+$/,inside:{punctuation:{pattern:/!/}},alias:"keyword"}},alias:"function"},"directive-block-separator":{pattern:/\}:[-\w.]+:\{/,inside:{punctuation:{pattern:/[:{}]/}},alias:"function"},"directive-block-close":{pattern:/\}:[-\w.]+\$/,inside:{punctuation:{pattern:/[:{}$]/}},alias:"function"}}),n.languages.insertBefore("inside","punctuation",{variable:n.languages.xeora["function-inline"].inside.variable},n.languages.xeora["function-block"]),n.languages.xeoracube=n.languages.xeora})(t)}return Xy}var Zy,DN;function yX(){if(DN)return Zy;DN=1,Zy=e,e.displayName="xmlDoc",e.aliases=[];function e(t){(function(n){function i(o,d){n.languages[o]&&n.languages.insertBefore(o,"comment",{"doc-comment":d})}var s=n.languages.markup.tag,l={pattern:/\/\/\/.*/,greedy:!0,alias:"comment",inside:{tag:s}},u={pattern:/'''.*/,greedy:!0,alias:"comment",inside:{tag:s}};i("csharp",l),i("fsharp",l),i("vbnet",u)})(t)}return Zy}var Qy,MN;function vX(){if(MN)return Qy;MN=1,Qy=e,e.displayName="xojo",e.aliases=[];function e(t){t.languages.xojo={comment:{pattern:/(?:'|\/\/|Rem\b).+/i,greedy:!0},string:{pattern:/"(?:""|[^"])*"/,greedy:!0},number:[/(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:E[+-]?\d+)?/i,/&[bchou][a-z\d]+/i],directive:{pattern:/#(?:Else|ElseIf|Endif|If|Pragma)\b/i,alias:"property"},keyword:/\b(?:AddHandler|App|Array|As(?:signs)?|Auto|Boolean|Break|By(?:Ref|Val)|Byte|Call|Case|Catch|CFStringRef|CGFloat|Class|Color|Const|Continue|CString|Currency|CurrentMethodName|Declare|Delegate|Dim|Do(?:uble|wnTo)?|Each|Else(?:If)?|End|Enumeration|Event|Exception|Exit|Extends|False|Finally|For|Function|Get|GetTypeInfo|Global|GOTO|If|Implements|In|Inherits|Int(?:8|16|32|64|eger|erface)?|Lib|Loop|Me|Module|Next|Nil|Object|Optional|OSType|ParamArray|Private|Property|Protected|PString|Ptr|Raise(?:Event)?|ReDim|RemoveHandler|Return|Select(?:or)?|Self|Set|Shared|Short|Single|Soft|Static|Step|String|Sub|Super|Text|Then|To|True|Try|Ubound|UInt(?:8|16|32|64|eger)?|Until|Using|Var(?:iant)?|Wend|While|WindowPtr|WString)\b/i,operator:/<[=>]?|>=?|[+\-*\/\\^=]|\b(?:AddressOf|And|Ctype|IsA?|Mod|New|Not|Or|WeakAddressOf|Xor)\b/i,punctuation:/[.,;:()]/}}return Qy}var Jy,BN;function _X(){if(BN)return Jy;BN=1,Jy=e,e.displayName="xquery",e.aliases=[];function e(t){(function(n){n.languages.xquery=n.languages.extend("markup",{"xquery-comment":{pattern:/\(:[\s\S]*?:\)/,greedy:!0,alias:"comment"},string:{pattern:/(["'])(?:\1\1|(?!\1)[\s\S])*\1/,greedy:!0},extension:{pattern:/\(#.+?#\)/,alias:"symbol"},variable:/\$[-\w:]+/,axis:{pattern:/(^|[^-])(?:ancestor(?:-or-self)?|attribute|child|descendant(?:-or-self)?|following(?:-sibling)?|parent|preceding(?:-sibling)?|self)(?=::)/,lookbehind:!0,alias:"operator"},"keyword-operator":{pattern:/(^|[^:-])\b(?:and|castable as|div|eq|except|ge|gt|idiv|instance of|intersect|is|le|lt|mod|ne|or|union)\b(?=$|[^:-])/,lookbehind:!0,alias:"operator"},keyword:{pattern:/(^|[^:-])\b(?:as|ascending|at|base-uri|boundary-space|case|cast as|collation|construction|copy-namespaces|declare|default|descending|else|empty (?:greatest|least)|encoding|every|external|for|function|if|import|in|inherit|lax|let|map|module|namespace|no-inherit|no-preserve|option|order(?: by|ed|ing)?|preserve|return|satisfies|schema|some|stable|strict|strip|then|to|treat as|typeswitch|unordered|validate|variable|version|where|xquery)\b(?=$|[^:-])/,lookbehind:!0},function:/[\w-]+(?::[\w-]+)*(?=\s*\()/,"xquery-element":{pattern:/(element\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"tag"},"xquery-attribute":{pattern:/(attribute\s+)[\w-]+(?::[\w-]+)*/,lookbehind:!0,alias:"attr-name"},builtin:{pattern:/(^|[^:-])\b(?:attribute|comment|document|element|processing-instruction|text|xs:(?:ENTITIES|ENTITY|ID|IDREFS?|NCName|NMTOKENS?|NOTATION|Name|QName|anyAtomicType|anyType|anyURI|base64Binary|boolean|byte|date|dateTime|dayTimeDuration|decimal|double|duration|float|gDay|gMonth|gMonthDay|gYear|gYearMonth|hexBinary|int|integer|language|long|negativeInteger|nonNegativeInteger|nonPositiveInteger|normalizedString|positiveInteger|short|string|time|token|unsigned(?:Byte|Int|Long|Short)|untyped(?:Atomic)?|yearMonthDuration))\b(?=$|[^:-])/,lookbehind:!0},number:/\b\d+(?:\.\d+)?(?:E[+-]?\d+)?/,operator:[/[+*=?|@]|\.\.?|:=|!=|<[=<]?|>[=>]?/,{pattern:/(\s)-(?=\s)/,lookbehind:!0}],punctuation:/[[\](){},;:/]/}),n.languages.xquery.tag.pattern=/<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/,n.languages.xquery.tag.inside["attr-value"].pattern=/=(?:("|')(?:\\[\s\S]|\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}|(?!\1)[^\\])*\1|[^\s'">=]+)/,n.languages.xquery.tag.inside["attr-value"].inside.punctuation=/^="|"$/,n.languages.xquery.tag.inside["attr-value"].inside.expression={pattern:/\{(?!\{)(?:\{(?:\{[^{}]*\}|[^{}])*\}|[^{}])+\}/,inside:n.languages.xquery,alias:"language-xquery"};var i=function(l){return typeof l=="string"?l:typeof l.content=="string"?l.content:l.content.map(i).join("")},s=function(l){for(var u=[],o=0;o<l.length;o++){var d=l[o],h=!1;if(typeof d!="string"&&(d.type==="tag"&&d.content[0]&&d.content[0].type==="tag"?d.content[0].content[0].content==="</"?u.length>0&&u[u.length-1].tagName===i(d.content[0].content[1])&&u.pop():d.content[d.content.length-1].content==="/>"||u.push({tagName:i(d.content[0].content[1]),openedBraces:0}):u.length>0&&d.type==="punctuation"&&d.content==="{"&&(!l[o+1]||l[o+1].type!=="punctuation"||l[o+1].content!=="{")&&(!l[o-1]||l[o-1].type!=="plain-text"||l[o-1].content!=="{")?u[u.length-1].openedBraces++:u.length>0&&u[u.length-1].openedBraces>0&&d.type==="punctuation"&&d.content==="}"?u[u.length-1].openedBraces--:d.type!=="comment"&&(h=!0)),(h||typeof d=="string")&&u.length>0&&u[u.length-1].openedBraces===0){var p=i(d);o<l.length-1&&(typeof l[o+1]=="string"||l[o+1].type==="plain-text")&&(p+=i(l[o+1]),l.splice(o+1,1)),o>0&&(typeof l[o-1]=="string"||l[o-1].type==="plain-text")&&(p=i(l[o-1])+p,l.splice(o-1,1),o--),/^\s+$/.test(p)?l[o]=p:l[o]=new n.Token("plain-text",p,null,p)}d.content&&typeof d.content!="string"&&s(d.content)}};n.hooks.add("after-tokenize",function(l){l.language==="xquery"&&s(l.tokens)})})(t)}return Jy}var ev,FN;function SX(){if(FN)return ev;FN=1,ev=e,e.displayName="yang",e.aliases=[];function e(t){t.languages.yang={comment:/\/\*[\s\S]*?\*\/|\/\/.*/,string:{pattern:/"(?:[^\\"]|\\.)*"|'[^']*'/,greedy:!0},keyword:{pattern:/(^|[{};\r\n][ \t]*)[a-z_][\w.-]*/i,lookbehind:!0},namespace:{pattern:/(\s)[a-z_][\w.-]*(?=:)/i,lookbehind:!0},boolean:/\b(?:false|true)\b/,operator:/\+/,punctuation:/[{};:]/}}return ev}var tv,PN;function EX(){if(PN)return tv;PN=1,tv=e,e.displayName="zig",e.aliases=[];function e(t){(function(n){function i(p){return function(){return p}}var s=/\b(?:align|allowzero|and|anyframe|anytype|asm|async|await|break|cancel|catch|comptime|const|continue|defer|else|enum|errdefer|error|export|extern|fn|for|if|inline|linksection|nakedcc|noalias|nosuspend|null|or|orelse|packed|promise|pub|resume|return|stdcallcc|struct|suspend|switch|test|threadlocal|try|undefined|union|unreachable|usingnamespace|var|volatile|while)\b/,l="\\b(?!"+s.source+")(?!\\d)\\w+\\b",u=/align\s*\((?:[^()]|\([^()]*\))*\)/.source,o=/(?:\?|\bpromise->|(?:\[[^[\]]*\]|\*(?!\*)|\*\*)(?:\s*<ALIGN>|\s*const\b|\s*volatile\b|\s*allowzero\b)*)/.source.replace(/<ALIGN>/g,i(u)),d=/(?:\bpromise\b|(?:\berror\.)?<ID>(?:\.<ID>)*(?!\s+<ID>))/.source.replace(/<ID>/g,i(l)),h="(?!\\s)(?:!?\\s*(?:"+o+"\\s*)*"+d+")+";n.languages.zig={comment:[{pattern:/\/\/[/!].*/,alias:"doc-comment"},/\/{2}.*/],string:[{pattern:/(^|[^\\@])c?"(?:[^"\\\r\n]|\\.)*"/,lookbehind:!0,greedy:!0},{pattern:/([\r\n])([ \t]+c?\\{2}).*(?:(?:\r\n?|\n)\2.*)*/,lookbehind:!0,greedy:!0}],char:{pattern:/(^|[^\\])'(?:[^'\\\r\n]|[\uD800-\uDFFF]{2}|\\(?:.|x[a-fA-F\d]{2}|u\{[a-fA-F\d]{1,6}\}))'/,lookbehind:!0,greedy:!0},builtin:/\B@(?!\d)\w+(?=\s*\()/,label:{pattern:/(\b(?:break|continue)\s*:\s*)\w+\b|\b(?!\d)\w+\b(?=\s*:\s*(?:\{|while\b))/,lookbehind:!0},"class-name":[/\b(?!\d)\w+(?=\s*=\s*(?:(?:extern|packed)\s+)?(?:enum|struct|union)\s*[({])/,{pattern:RegExp(/(:\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?[=;,)])|<TYPE>(?=\s*(?:<ALIGN>\s*)?\{)/.source.replace(/<TYPE>/g,i(h)).replace(/<ALIGN>/g,i(u))),lookbehind:!0,inside:null},{pattern:RegExp(/(\)\s*)<TYPE>(?=\s*(?:<ALIGN>\s*)?;)/.source.replace(/<TYPE>/g,i(h)).replace(/<ALIGN>/g,i(u))),lookbehind:!0,inside:null}],"builtin-type":{pattern:/\b(?:anyerror|bool|c_u?(?:int|long|longlong|short)|c_longdouble|c_void|comptime_(?:float|int)|f(?:16|32|64|128)|[iu](?:8|16|32|64|128|size)|noreturn|type|void)\b/,alias:"keyword"},keyword:s,function:/\b(?!\d)\w+(?=\s*\()/,number:/\b(?:0b[01]+|0o[0-7]+|0x[a-fA-F\d]+(?:\.[a-fA-F\d]*)?(?:[pP][+-]?[a-fA-F\d]+)?|\d+(?:\.\d*)?(?:[eE][+-]?\d+)?)\b/,boolean:/\b(?:false|true)\b/,operator:/\.[*?]|\.{2,3}|[-=]>|\*\*|\+\+|\|\||(?:<<|>>|[-+*]%|[-+*/%^&|<>!=])=?|[?~]/,punctuation:/[.:,;(){}[\]]/},n.languages.zig["class-name"].forEach(function(p){p.inside===null&&(p.inside=n.languages.zig)})})(t)}return tv}var nv,UN;function xX(){if(UN)return nv;UN=1;var e=jG();return nv=e,e.register(zG()),e.register(HG()),e.register(qG()),e.register($G()),e.register(GG()),e.register(VG()),e.register(WG()),e.register(KG()),e.register(YG()),e.register(XG()),e.register(ZG()),e.register(QG()),e.register(JG()),e.register(eV()),e.register(tV()),e.register(nV()),e.register(rV()),e.register(iV()),e.register(aV()),e.register(sV()),e.register(oV()),e.register(lV()),e.register(GL()),e.register(VL()),e.register(cV()),e.register(uV()),e.register(dV()),e.register(hV()),e.register(fV()),e.register(pV()),e.register(mV()),e.register(gV()),e.register(bV()),e.register(yV()),e.register(ra()),e.register(vV()),e.register(_V()),e.register(SV()),e.register(EV()),e.register(xV()),e.register(wV()),e.register(CV()),e.register(TV()),e.register(kV()),e.register(j_()),e.register(AV()),e.register(fu()),e.register(RV()),e.register(NV()),e.register(OV()),e.register(IV()),e.register(LV()),e.register(DV()),e.register(MV()),e.register(BV()),e.register(FV()),e.register(PV()),e.register(UV()),e.register(jV()),e.register(zV()),e.register(HV()),e.register(qV()),e.register($V()),e.register(GV()),e.register(VV()),e.register(WV()),e.register(KV()),e.register(YV()),e.register(XV()),e.register(ZV()),e.register(QV()),e.register(JV()),e.register(eW()),e.register(tW()),e.register(nW()),e.register(rW()),e.register(iW()),e.register(aW()),e.register(sW()),e.register(oW()),e.register(lW()),e.register(cW()),e.register(uW()),e.register(dW()),e.register(hW()),e.register(fW()),e.register(pW()),e.register(mW()),e.register(gW()),e.register(bW()),e.register(yW()),e.register(vW()),e.register(_W()),e.register(SW()),e.register(z_()),e.register(EW()),e.register(xW()),e.register(wW()),e.register(CW()),e.register(TW()),e.register(kW()),e.register(AW()),e.register(RW()),e.register(NW()),e.register(OW()),e.register(IW()),e.register(LW()),e.register(DW()),e.register(MW()),e.register(BW()),e.register(FW()),e.register(PW()),e.register(H_()),e.register(UW()),e.register(mu()),e.register(jW()),e.register(zW()),e.register(HW()),e.register(qW()),e.register($W()),e.register(GW()),e.register(VW()),e.register($_()),e.register(WW()),e.register(KW()),e.register(YW()),e.register(KL()),e.register(XW()),e.register(ZW()),e.register(QW()),e.register(JW()),e.register(eK()),e.register(tK()),e.register(nK()),e.register(rK()),e.register(iK()),e.register(aK()),e.register(sK()),e.register(oK()),e.register(lK()),e.register(cK()),e.register(uK()),e.register(dK()),e.register(WL()),e.register(hK()),e.register(fK()),e.register(pK()),e.register(bn()),e.register(mK()),e.register(gK()),e.register(bK()),e.register(yK()),e.register(vK()),e.register(_K()),e.register(SK()),e.register(EK()),e.register(xK()),e.register(wK()),e.register(CK()),e.register(TK()),e.register(kK()),e.register(AK()),e.register(RK()),e.register(NK()),e.register(OK()),e.register(IK()),e.register(LK()),e.register(DK()),e.register(MK()),e.register(BK()),e.register(FK()),e.register(PK()),e.register(UK()),e.register(jK()),e.register(zK()),e.register(HK()),e.register(qK()),e.register($K()),e.register(GK()),e.register(VK()),e.register(gu()),e.register(WK()),e.register(KK()),e.register(YK()),e.register(XK()),e.register(ZK()),e.register(QK()),e.register(JK()),e.register(eY()),e.register(tY()),e.register(nY()),e.register(rY()),e.register(iY()),e.register(aY()),e.register(sY()),e.register(oY()),e.register(lY()),e.register(cY()),e.register(uY()),e.register(dY()),e.register(hY()),e.register(fY()),e.register(pY()),e.register(mY()),e.register(gY()),e.register(bY()),e.register(yY()),e.register(vY()),e.register(_Y()),e.register(SY()),e.register(EY()),e.register(pu()),e.register(xY()),e.register(wY()),e.register(CY()),e.register(TY()),e.register(G_()),e.register(kY()),e.register(AY()),e.register(RY()),e.register(NY()),e.register(OY()),e.register(IY()),e.register(LY()),e.register(DY()),e.register(MY()),e.register(BY()),e.register(FY()),e.register(PY()),e.register(U_()),e.register(UY()),e.register(jY()),e.register(zY()),e.register(HY()),e.register(qY()),e.register($Y()),e.register(V_()),e.register(GY()),e.register(VY()),e.register(WY()),e.register(KY()),e.register(YY()),e.register(XY()),e.register(ZY()),e.register(QY()),e.register(YL()),e.register(JY()),e.register(q_()),e.register(eX()),e.register(tX()),e.register(nX()),e.register(rX()),e.register(iX()),e.register(aX()),e.register(XL()),e.register(sX()),e.register(oX()),e.register(lX()),e.register(cX()),e.register(uX()),e.register(dX()),e.register(hX()),e.register(fX()),e.register(pX()),e.register(mX()),e.register(gX()),e.register(bX()),e.register(yX()),e.register(vX()),e.register(_X()),e.register(ZL()),e.register(SX()),e.register(EX()),nv}var wX=xX();const CX=$c(wX);var Zn=h9(CX,Si);Zn.supportedLanguages=f9;const ia={'pre[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none",padding:"1em",margin:".5em 0",overflow:"auto",background:"#1e1e1e"},'code[class*="language-"]':{color:"#d4d4d4",fontSize:"13px",textShadow:"none",fontFamily:'Menlo, Monaco, Consolas, "Andale Mono", "Ubuntu Mono", "Courier New", monospace',direction:"ltr",textAlign:"left",whiteSpace:"pre",wordSpacing:"normal",wordBreak:"normal",lineHeight:"1.5",MozTabSize:"4",OTabSize:"4",tabSize:"4",WebkitHyphens:"none",MozHyphens:"none",msHyphens:"none",hyphens:"none"},'pre[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"]::selection':{textShadow:"none",background:"#264F78"},'pre[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},'code[class*="language-"] *::selection':{textShadow:"none",background:"#264F78"},':not(pre) > code[class*="language-"]':{padding:".1em .3em",borderRadius:".3em",color:"#db4c69",background:"#1e1e1e"},".namespace":{Opacity:".7"},"doctype.doctype-tag":{color:"#569CD6"},"doctype.name":{color:"#9cdcfe"},comment:{color:"#6a9955"},prolog:{color:"#6a9955"},punctuation:{color:"#d4d4d4"},".language-html .language-css .token.punctuation":{color:"#d4d4d4"},".language-html .language-javascript .token.punctuation":{color:"#d4d4d4"},property:{color:"#9cdcfe"},tag:{color:"#569cd6"},boolean:{color:"#569cd6"},number:{color:"#b5cea8"},constant:{color:"#9cdcfe"},symbol:{color:"#b5cea8"},inserted:{color:"#b5cea8"},unit:{color:"#b5cea8"},selector:{color:"#d7ba7d"},"attr-name":{color:"#9cdcfe"},string:{color:"#ce9178"},char:{color:"#ce9178"},builtin:{color:"#ce9178"},deleted:{color:"#ce9178"},".language-css .token.string.url":{textDecoration:"underline"},operator:{color:"#d4d4d4"},entity:{color:"#569cd6"},"operator.arrow":{color:"#569CD6"},atrule:{color:"#ce9178"},"atrule.rule":{color:"#c586c0"},"atrule.url":{color:"#9cdcfe"},"atrule.url.function":{color:"#dcdcaa"},"atrule.url.punctuation":{color:"#d4d4d4"},keyword:{color:"#569CD6"},"keyword.module":{color:"#c586c0"},"keyword.control-flow":{color:"#c586c0"},function:{color:"#dcdcaa"},"function.maybe-class-name":{color:"#dcdcaa"},regex:{color:"#d16969"},important:{color:"#569cd6"},italic:{fontStyle:"italic"},"class-name":{color:"#4ec9b0"},"maybe-class-name":{color:"#4ec9b0"},console:{color:"#9cdcfe"},parameter:{color:"#9cdcfe"},interpolation:{color:"#9cdcfe"},"punctuation.interpolation-punctuation":{color:"#569cd6"},variable:{color:"#9cdcfe"},"imports.maybe-class-name":{color:"#9cdcfe"},"exports.maybe-class-name":{color:"#9cdcfe"},escape:{color:"#d7ba7d"},"tag.punctuation":{color:"#808080"},cdata:{color:"#808080"},"attr-value":{color:"#ce9178"},"attr-value.punctuation":{color:"#ce9178"},"attr-value.punctuation.attr-equals":{color:"#d4d4d4"},namespace:{color:"#4ec9b0"},'pre[class*="language-javascript"]':{color:"#9cdcfe"},'code[class*="language-javascript"]':{color:"#9cdcfe"},'pre[class*="language-jsx"]':{color:"#9cdcfe"},'code[class*="language-jsx"]':{color:"#9cdcfe"},'pre[class*="language-typescript"]':{color:"#9cdcfe"},'code[class*="language-typescript"]':{color:"#9cdcfe"},'pre[class*="language-tsx"]':{color:"#9cdcfe"},'code[class*="language-tsx"]':{color:"#9cdcfe"},'pre[class*="language-css"]':{color:"#ce9178"},'code[class*="language-css"]':{color:"#ce9178"},'pre[class*="language-html"]':{color:"#d4d4d4"},'code[class*="language-html"]':{color:"#d4d4d4"},".language-regex .token.anchor":{color:"#dcdcaa"},".language-html .token.punctuation":{color:"#808080"},'pre[class*="language-"] > code[class*="language-"]':{position:"relative",zIndex:"1"},".line-highlight.line-highlight":{background:"#f7ebc6",boxShadow:"inset 5px 0 0 #f7d87c",zIndex:"0"}};function tn(e){return e?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${e}ms`:""}function bu(e){if(!e||typeof e!="object")return!1;const t=e;return t.ok===!1||"error"in t||t.success===!1}function yu(e){if(!e||typeof e!="object")return null;const t=e,n=["error","stderr","message","detail","details","reason"];for(const i of n){const s=t[i];if(typeof s=="string"){const l=s.trim();if(l.length)return l}}return null}function hr({error:e,stack:t,showStack:n=!1}){return T.jsx("div",{className:"mt-2 ml-5 p-3 bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded text-sm",children:T.jsxs("div",{className:"flex items-start gap-2",children:[T.jsx(Mr,{className:"h-4 w-4 flex-shrink-0 text-red-600 dark:text-red-400 mt-0.5"}),T.jsxs("div",{className:"flex-1 space-y-2",children:[T.jsxs("div",{children:[T.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:"Tool Error:"}),T.jsx("div",{className:"mt-1 text-red-900 dark:text-red-200 whitespace-pre-wrap",children:e})]}),n&&t&&T.jsxs("details",{className:"mt-2",children:[T.jsx("summary",{className:"cursor-pointer text-xs text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200",children:"View stack trace"}),T.jsx("pre",{className:"mt-2 p-2 bg-red-100/50 dark:bg-red-900/20 rounded text-xs overflow-x-auto text-red-800 dark:text-red-300",children:t})]})]})]})})}function TX(e){const t=e.split(".").pop()?.toLowerCase();return{js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",json:"json",yaml:"yaml",yml:"yaml",xml:"xml",html:"html",css:"css",scss:"scss",md:"markdown",txt:"text"}[t||""]||"text"}function kX(e){if(!e)return;const t=e.match(/@(\d+)-(\d+)/);if(t)return Number.parseInt(t[1],10)}function AX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=e.args||{},u=typeof s=="object"&&"ok"in s&&s.ok===!1,o=u&&"error"in s&&typeof s.error=="string"?s.error:null,d=u&&"stack"in s&&typeof s.stack=="string"?s.stack:void 0,h=String(s.path||l.path||""),p=String(s.content||""),f=s.lineRange,g=p.split(`
72
72
  `),b=tn(t),x=TX(h),E=document?.documentElement.classList.contains("dark")?ia:Si,y=kX(f),S=f?`${h}:${f.replace("@","")}`:h,v=p.length>0||u;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:()=>v&&i(),className:`flex items-center gap-2 transition-colors w-full min-w-0 ${u?"text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200":v?"text-blue-700 dark:text-blue-300 hover:text-blue-600 dark:hover:text-blue-200":"text-blue-700 dark:text-blue-300"}`,children:[v?n?T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0 rotate-90 transition-transform"}):T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0 transition-transform"}):T.jsx("div",{className:"w-3 flex-shrink-0"}),u&&T.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-red-600 dark:text-red-400"}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:["read",u?" error":""]}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("span",{className:"text-foreground/70 min-w-0 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap",dir:"rtl",title:S,children:S}),!u&&g.length>0&&T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0 whitespace-nowrap",children:["· ",g.length," lines · ",b]}),u&&T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",b]})]}),n&&u&&o&&T.jsx(hr,{error:o,stack:d,showStack:!0}),n&&!u&&p&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto max-w-full",children:T.jsx("div",{className:"overflow-x-auto max-w-full",children:T.jsx(Zn,{language:x,style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},showLineNumbers:!0,startingLineNumber:y,wrapLines:!0,wrapLongLines:!0,children:p})})})]})}function RX(e){const t=e.split(".").pop()?.toLowerCase();return{js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",go:"go",rs:"rust",java:"java",c:"c",cpp:"cpp",h:"c",hpp:"cpp",cs:"csharp",php:"php",sh:"bash",bash:"bash",zsh:"bash",sql:"sql",json:"json",yaml:"yaml",yml:"yaml",xml:"xml",html:"html",css:"css",scss:"scss",md:"markdown",txt:"text",svelte:"svelte"}[t||""]||"javascript"}function NX(e){const t=e.split(`
73
73
  `),n=[];let i=0,s=0,l=!1,u="";for(const o of t){if(o.startsWith("+++")||o.startsWith("*** Update File:")){const h=o.match(/\+\+\+ b\/(.+)/)||o.match(/\*\*\* Update File: (.+)/);h&&(u=h[1])}const d=o.match(/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/);if(d){i=Number.parseInt(d[1],10),s=Number.parseInt(d[2],10),l=!0,n.push({content:o,codeContent:o,type:"header"});continue}if(o.startsWith("***")||o.startsWith("diff ")||o.startsWith("index ")||o.startsWith("---")||o.startsWith("+++")){n.push({content:o,codeContent:o,type:"meta"});continue}l?o.startsWith("+")?n.push({content:o,codeContent:o.slice(1),type:"add",newLineNum:s++}):o.startsWith("-")?n.push({content:o,codeContent:o.slice(1),type:"remove",oldLineNum:i++}):o.startsWith(" ")||o===""?n.push({content:o,codeContent:o.startsWith(" ")?o.slice(1):o,type:"context",oldLineNum:i++,newLineNum:s++}):n.push({content:o,codeContent:o,type:"context"}):n.push({content:o,codeContent:o,type:"meta"})}return{lines:n,filePath:u}}function Ao({patch:e}){const{lines:t,filePath:n}=NX(e),i=RX(n),s=document?.documentElement.classList.contains("dark")?ia:Si;return T.jsx("div",{className:"bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 max-w-full",children:T.jsx("div",{className:"overflow-x-auto overflow-y-auto max-h-96 text-xs font-mono",children:t.map((l,u)=>{const o=`line-${u}-${l.content.slice(0,20)}`;if(l.type==="meta"||l.type==="header")return T.jsx("div",{className:`px-3 py-0.5 whitespace-pre-wrap break-all ${l.type==="header"?"text-muted-foreground/80 bg-muted/20":"text-muted-foreground/80"}`,children:l.content},o);let d="",h="";switch(l.type){case"add":d="text-emerald-700 dark:text-emerald-300",h="bg-emerald-500/10";break;case"remove":d="text-red-600 dark:text-red-300",h="bg-red-500/10";break;default:d="text-foreground/80"}let p=l.content;return l.codeContent.trim()&&i!=="text"&&(p=T.jsx(Zn,{language:i,style:s,customStyle:{margin:0,padding:0,background:"transparent",display:"inline",fontSize:"inherit",lineHeight:"inherit"},codeTagProps:{style:{fontFamily:"inherit",background:"transparent"}},PreTag:"span",children:l.codeContent}),l.type==="add"?p=T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"select-none",children:"+"}),p]}):l.type==="remove"?p=T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"select-none",children:"-"}),p]}):l.type==="context"&&(p=T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"select-none",children:" "}),p]}))),T.jsxs("div",{className:`flex ${h}`,children:[T.jsx("div",{className:"px-2 py-0.5 text-right text-muted-foreground/40 select-none w-12 flex-shrink-0",children:l.oldLineNum||""}),T.jsx("div",{className:"px-2 py-0.5 text-right text-muted-foreground/40 select-none w-12 flex-shrink-0 border-r border-border/50",children:l.newLineNum||""}),T.jsx("div",{className:`px-3 py-0.5 flex-1 min-w-0 whitespace-pre-wrap break-all ${d}`,children:p})]},o)})})})}function OX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=e.args||{},u=e.artifact,o=typeof s=="object"&&"ok"in s&&s.ok===!1,d=o&&"error"in s&&typeof s.error=="string"?s.error:null,h=o&&"stack"in s&&typeof s.stack=="string"?s.stack:void 0,p=String(s.path||l.path||""),f=Number(s.bytes||0),g=u?.patch?String(u.patch):"",b=tn(t),x=g.length>0||o;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:()=>x&&i(),className:`flex items-center gap-2 transition-colors min-w-0 w-full ${o?"text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200":x?"text-emerald-700 dark:text-emerald-300 hover:text-emerald-600 dark:hover:text-emerald-200":"text-emerald-700 dark:text-emerald-300"}`,children:[x?n?T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0 rotate-90 transition-transform"}):T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0 transition-transform"}):T.jsx("div",{className:"w-3 flex-shrink-0"}),o&&T.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-red-600 dark:text-red-400"}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:["write",o?" error":""]}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("span",{className:"text-foreground/70 min-w-0 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap",dir:"rtl",title:p,children:p}),!o&&f>0&&T.jsxs("span",{className:"text-muted-foreground/80 whitespace-nowrap flex-shrink-0",children:["· ",f," bytes · ",b]}),o&&T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",b]})]}),n&&o&&d&&T.jsx(hr,{error:d,stack:h,showStack:!0}),n&&!o&&g&&T.jsx("div",{className:"mt-2 ml-5",children:T.jsx(Ao,{patch:g})})]})}function IX({args:e,result:t,artifact:n,toolDurationMs:i,isExpanded:s,onToggle:l}){const u=typeof t=="object"&&"ok"in t&&t.ok===!1,o=u&&"error"in t&&typeof t.error=="string"?t.error:null,d=u&&"stack"in t&&typeof t.stack=="string"?t.stack:void 0,h=String(t.path||e.path||""),p=Number(t.opsApplied||0),f=n?.patch?String(n.patch):"",g=tn(i),b=f.length>0||u;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:()=>b&&l(),className:`flex items-center gap-2 transition-colors min-w-0 w-full ${u?"text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200":b?"text-purple-700 dark:text-purple-300 hover:text-purple-600 dark:hover:text-purple-200":"text-purple-700 dark:text-purple-300"}`,children:[b?s?T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0 rotate-90 transition-transform"}):T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0 transition-transform"}):T.jsx("div",{className:"w-3 flex-shrink-0"}),u&&T.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-red-600 dark:text-red-400"}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:["edit",u?" error":""]}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("span",{className:"text-foreground/70 min-w-0 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap",dir:"rtl",title:h,children:h}),!u&&p>0&&T.jsxs("span",{className:"text-muted-foreground/80 whitespace-nowrap flex-shrink-0",children:["· ",p," ops · ",g]}),u&&T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",g]})]}),s&&u&&o&&T.jsx(hr,{error:o,stack:d,showStack:!0}),s&&!u&&f&&T.jsx("div",{className:"mt-2 ml-5",children:T.jsx(Ao,{patch:f})})]})}function LX({text:e,className:t=""}){const[n,i]=G.useState(!1),s=async l=>{l.stopPropagation();try{await navigator.clipboard.writeText(e),i(!0),setTimeout(()=>i(!1),2e3)}catch{}};return T.jsx("button",{type:"button",onClick:s,className:`p-1 rounded hover:bg-muted/50 text-muted-foreground hover:text-foreground transition-colors ${t}`,title:"Copy",children:n?T.jsx(Zc,{className:"h-3 w-3 text-emerald-500"}):T.jsx(DF,{className:"h-3 w-3"})})}function dc({title:e,icon:t,subtitle:n,copyText:i,variant:s="default",maxHeight:l="max-h-80",children:u}){const o=s==="error";return T.jsxs("div",{className:`bg-card/60 border rounded-lg overflow-hidden flex flex-col ${l} ${o?"border-red-500/50":"border-border"}`,children:[T.jsxs("div",{className:`flex items-center justify-between gap-2 text-xs px-3 py-1.5 border-b border-border sticky top-0 ${o?"text-red-600 dark:text-red-400 bg-red-500/10":"text-muted-foreground bg-muted/30"}`,children:[T.jsxs("div",{className:"flex items-center gap-2",children:[t,T.jsx("span",{children:e}),n&&T.jsx("span",{className:"text-muted-foreground/60",children:n})]}),i&&T.jsx(LX,{text:i})]}),T.jsx("div",{className:"overflow-auto flex-1",children:u})]})}const DX={default:{normal:"text-muted-foreground",hover:"hover:text-foreground",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"},blue:{normal:"text-blue-700 dark:text-blue-300",hover:"hover:text-blue-600 dark:hover:text-blue-200",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"},emerald:{normal:"text-emerald-700 dark:text-emerald-300",hover:"hover:text-emerald-600 dark:hover:text-emerald-200",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"},purple:{normal:"text-purple-700 dark:text-purple-300",hover:"hover:text-purple-600 dark:hover:text-purple-200",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"},cyan:{normal:"text-cyan-700 dark:text-cyan-300",hover:"hover:text-cyan-600 dark:hover:text-cyan-200",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"},amber:{normal:"text-amber-700 dark:text-amber-300",hover:"hover:text-amber-600 dark:hover:text-amber-200",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"},red:{normal:"text-red-700 dark:text-red-300",hover:"hover:text-red-600 dark:hover:text-red-200",error:"text-red-700 dark:text-red-300",errorHover:"hover:text-red-600 dark:hover:text-red-200"}};function Uo({toolName:e,isExpanded:t,onToggle:n,isError:i=!1,colorVariant:s="default",canExpand:l=!0,children:u}){const o=DX[s],d=i?`${o.error} ${o.errorHover}`:`${o.normal} ${o.hover}`;return T.jsxs("button",{type:"button",onClick:()=>l&&n(),className:`flex items-center gap-2 transition-colors w-full min-w-0 ${d}`,children:[l?t?T.jsx(Qi,{className:"h-3 w-3 flex-shrink-0"}):T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0"}):T.jsx("div",{className:"w-3 flex-shrink-0"}),i&&T.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-red-600 dark:text-red-400"}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:[e,i?" error":""]}),u]})}function Vn(){return T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"})}function W_({children:e,className:t=""}){return T.jsx("span",{className:`text-foreground/70 ${t}`,children:e})}function ns({children:e,className:t=""}){return T.jsx("span",{className:`text-muted-foreground/80 flex-shrink-0 whitespace-nowrap ${t}`,children:e})}function MX({children:e}){return T.jsx("span",{className:"text-emerald-600 dark:text-emerald-400 flex-shrink-0",children:e})}function BX({children:e}){return T.jsx("span",{className:"text-red-600 dark:text-red-400 flex-shrink-0",children:e})}function FX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=e.args||{},u=typeof s=="object"&&"ok"in s&&s.ok===!1,o=u&&"error"in s&&typeof s.error=="string"?s.error:null,d=u&&"stack"in s&&typeof s.stack=="string"?s.stack:void 0,h=String(s.stdout||""),p=String(s.stderr||""),f=Number(s.exitCode??0),g=String(l.cmd||""),b=l.cwd?String(l.cwd):void 0,x=tn(t),E=document?.documentElement.classList.contains("dark")?ia:Si,y=h.length>0||p.length>0,S=u||f!==0,v=p.length>0,_=h+(h&&p?`
74
- `:"")+p;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"bash",isExpanded:n,onToggle:i,isError:S,colorVariant:"default",canExpand:!0,children:[T.jsx(Vn,{}),T.jsx("span",{className:"text-foreground/70 min-w-0 truncate",title:g,children:g}),!u&&T.jsxs(T.Fragment,{children:[T.jsx(Vn,{}),f===0?T.jsxs(MX,{children:["exit ",f]}):T.jsxs(BX,{children:["exit ",f]}),T.jsx(Vn,{}),T.jsx(ns,{children:x})]}),u&&T.jsxs(ns,{children:["· ",x]})]}),n&&u&&o&&T.jsx(hr,{error:o,stack:d,showStack:!0}),n&&!u&&T.jsxs("div",{className:"mt-2 ml-5 flex flex-col gap-2 max-w-full",children:[T.jsx(dc,{title:"command",icon:T.jsx(Ji,{className:"h-3 w-3"}),subtitle:b&&b!=="."?`in ${b}`:void 0,copyText:g,maxHeight:"",children:T.jsx("div",{className:"px-3 py-2 font-mono text-xs bg-muted/10 break-all",children:g})}),y&&T.jsx(T.Fragment,{children:f===0?T.jsx(dc,{title:"output",copyText:_,maxHeight:"max-h-80",children:T.jsx(Zn,{language:"bash",style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:_})}):T.jsxs(T.Fragment,{children:[h&&T.jsx(dc,{title:"stdout",copyText:h,maxHeight:"max-h-40",children:T.jsx(Zn,{language:"bash",style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:h})}),v&&T.jsx(dc,{title:"stderr",copyText:p,variant:"error",maxHeight:"max-h-40",children:T.jsx(Zn,{language:"bash",style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:p})})]})})]})]})}function PX(e){if(!e||e.length<3)return null;const t=e[0],n=e[1],i=e.slice(3);if(t==="?"&&n==="?")return{status:"??",file:i,type:"untracked"};let s="unstaged";return t!==" "&&n!==" "?s="both":t!==" "&&(s="staged"),{status:`${t}${n}`,file:i,type:s}}function UX(e){return e==="??"?"?":e[0]==="A"||e[1]==="A"?"+":e[0]==="M"||e[1]==="M"?"~":e[0]==="D"||e[1]==="D"?"-":e[0]==="R"||e[1]==="R"?"→":e}function jX(e){switch(e){case"staged":return"text-emerald-600 dark:text-emerald-400";case"unstaged":return"text-amber-600 dark:text-amber-400";case"untracked":return"text-muted-foreground/60";case"both":return"text-blue-600 dark:text-blue-400"}}function zX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=bu(s),u=yu(s),o=Number(s.staged||0),d=Number(s.unstaged||0),h=s.raw||[],p=String(s.summary||""),f=tn(t),g=h.map(PX).filter(Boolean),b=o>0||d>0,x=g.length>0||l||!!p;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"git status",isExpanded:n,onToggle:i,isError:l,colorVariant:"blue",canExpand:x,children:[T.jsx(Vn,{}),b?T.jsxs(T.Fragment,{children:[o>0&&T.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400 flex-shrink-0",children:[o," staged"]}),d>0&&T.jsxs("span",{className:"text-amber-600 dark:text-amber-400 flex-shrink-0",children:[d," unstaged"]})]}):T.jsx("span",{className:"text-muted-foreground/60 flex-shrink-0",children:"clean"}),T.jsx(Vn,{}),T.jsx(ns,{children:f})]}),n&&l&&u&&T.jsx(hr,{error:u}),n&&!l&&(g.length>0||p)&&T.jsx("div",{className:"mt-2 ml-5",children:g.length>0?T.jsx("div",{className:"bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto",children:T.jsx("div",{className:"divide-y divide-border/50",children:g.map((E,y)=>T.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 font-mono hover:bg-muted/20",children:[T.jsx("span",{className:`font-semibold w-6 flex-shrink-0 ${jX(E.type)}`,children:UX(E.status)}),T.jsx("span",{className:"text-foreground/80 break-all",children:E.file})]},`${E.file}-${y}`))})}):p&&T.jsx("div",{className:"bg-card/60 border border-border rounded-lg p-3 text-muted-foreground",children:p})})]})}function HX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=String(s.patch||s.diff||""),u=s.all,o=tn(t),d=l.split(`
74
+ `:"")+p;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"bash",isExpanded:n,onToggle:i,isError:S,colorVariant:"default",canExpand:!0,children:[T.jsx(Vn,{}),T.jsx("span",{className:"text-foreground/70 min-w-0 truncate",title:g,children:g}),!u&&T.jsxs(T.Fragment,{children:[T.jsx(Vn,{}),f===0?T.jsxs(MX,{children:["exit ",f]}):T.jsxs(BX,{children:["exit ",f]}),T.jsx(Vn,{}),T.jsx(ns,{children:x})]}),u&&T.jsxs(ns,{children:["· ",x]})]}),n&&u&&o&&T.jsx(hr,{error:o,stack:d,showStack:!0}),n&&!u&&T.jsxs("div",{className:"mt-2 ml-5 flex flex-col gap-2 max-w-full",children:[T.jsx(dc,{title:"command",icon:T.jsx(Ji,{className:"h-3 w-3"}),subtitle:b&&b!=="."?`in ${b}`:void 0,copyText:g,maxHeight:"",children:T.jsx("div",{className:"px-3 py-2 font-mono text-xs bg-muted/10 break-all",children:g})}),y&&(f===0?T.jsx(dc,{title:"output",copyText:_,maxHeight:"max-h-80",children:T.jsx(Zn,{language:"bash",style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:_})}):T.jsxs(T.Fragment,{children:[h&&T.jsx(dc,{title:"stdout",copyText:h,maxHeight:"max-h-40",children:T.jsx(Zn,{language:"bash",style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:h})}),v&&T.jsx(dc,{title:"stderr",copyText:p,variant:"error",maxHeight:"max-h-40",children:T.jsx(Zn,{language:"bash",style:E,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:p})})]}))]})]})}function PX(e){if(!e||e.length<3)return null;const t=e[0],n=e[1],i=e.slice(3);if(t==="?"&&n==="?")return{status:"??",file:i,type:"untracked"};let s="unstaged";return t!==" "&&n!==" "?s="both":t!==" "&&(s="staged"),{status:`${t}${n}`,file:i,type:s}}function UX(e){return e==="??"?"?":e[0]==="A"||e[1]==="A"?"+":e[0]==="M"||e[1]==="M"?"~":e[0]==="D"||e[1]==="D"?"-":e[0]==="R"||e[1]==="R"?"→":e}function jX(e){switch(e){case"staged":return"text-emerald-600 dark:text-emerald-400";case"unstaged":return"text-amber-600 dark:text-amber-400";case"untracked":return"text-muted-foreground/60";case"both":return"text-blue-600 dark:text-blue-400"}}function zX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=bu(s),u=yu(s),o=Number(s.staged||0),d=Number(s.unstaged||0),h=s.raw||[],p=String(s.summary||""),f=tn(t),g=h.map(PX).filter(Boolean),b=o>0||d>0,x=g.length>0||l||!!p;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"git status",isExpanded:n,onToggle:i,isError:l,colorVariant:"blue",canExpand:x,children:[T.jsx(Vn,{}),b?T.jsxs(T.Fragment,{children:[o>0&&T.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400 flex-shrink-0",children:[o," staged"]}),d>0&&T.jsxs("span",{className:"text-amber-600 dark:text-amber-400 flex-shrink-0",children:[d," unstaged"]})]}):T.jsx("span",{className:"text-muted-foreground/60 flex-shrink-0",children:"clean"}),T.jsx(Vn,{}),T.jsx(ns,{children:f})]}),n&&l&&u&&T.jsx(hr,{error:u}),n&&!l&&(g.length>0||p)&&T.jsx("div",{className:"mt-2 ml-5",children:g.length>0?T.jsx("div",{className:"bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto",children:T.jsx("div",{className:"divide-y divide-border/50",children:g.map((E,y)=>T.jsxs("div",{className:"flex items-center gap-2 px-3 py-1.5 font-mono hover:bg-muted/20",children:[T.jsx("span",{className:`font-semibold w-6 flex-shrink-0 ${jX(E.type)}`,children:UX(E.status)}),T.jsx("span",{className:"text-foreground/80 break-all",children:E.file})]},`${E.file}-${y}`))})}):p&&T.jsx("div",{className:"bg-card/60 border border-border rounded-lg p-3 text-muted-foreground",children:p})})]})}function HX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=String(s.patch||s.diff||""),u=s.all,o=tn(t),d=l.split(`
75
75
  `);let h=0,p=0,f=0;for(const g of d)g.startsWith("diff --git")?h+=1:g.startsWith("+")&&!g.startsWith("+++")?p+=1:g.startsWith("-")&&!g.startsWith("---")&&(f+=1);return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-2 text-purple-700 dark:text-purple-300 transition-colors hover:text-purple-600 dark:hover:text-purple-200 w-full",children:[T.jsx(Xt,{className:`h-3 w-3 flex-shrink-0 transition-transform ${n?"rotate-90":""}`}),T.jsx("span",{className:"font-medium flex-shrink-0",children:"git diff"}),u&&T.jsx("span",{className:"text-xs text-muted-foreground/60 flex-shrink-0",children:"(all)"}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),h>0&&T.jsxs(T.Fragment,{children:[T.jsxs("span",{className:"text-foreground/70 flex-shrink-0",children:[h," ",h===1?"file":"files"]}),p>0&&T.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400 flex-shrink-0",children:["+",p]}),f>0&&T.jsxs("span",{className:"text-red-600 dark:text-red-400 flex-shrink-0",children:["-",f]})]}),T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",o]})]}),n&&l&&T.jsx("div",{className:"mt-2 ml-5",children:T.jsx(Ao,{patch:l})})]})}function qX({contentJson:e,toolDurationMs:t}){const n=e.result||{},i=String(n.message||""),s=tn(t),l=document?.documentElement.classList.contains("dark")?ia:Si;return T.jsxs("div",{className:"text-xs space-y-2",children:[T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("span",{className:"font-medium text-emerald-700 dark:text-emerald-300",children:"git commit"}),T.jsx("span",{className:"text-muted-foreground/70",children:"·"}),T.jsx("span",{className:"text-muted-foreground/80",children:s})]}),i&&T.jsx("div",{className:"bg-card/60 border border-border rounded-lg overflow-hidden max-w-full",children:T.jsx("div",{className:"overflow-x-auto max-w-full",children:T.jsx(Zn,{language:"bash",style:l,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:i})})})]})}function $X({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.artifact,l=tn(t),u=(v,_)=>_<=1?`${v}`:`${v}-${v+_-1}`,o=v=>{const _=`-${u(v.oldStart,v.oldLines)}`,w=`+${u(v.newStart,v.newLines)}`,N=[];v.additions>0&&N.push(`+${v.additions}`),v.deletions>0&&N.push(`-${v.deletions}`);const k=N.length>0?` (${N.join(", ")})`:"";return`${_} ${w}${k}`},d=s?.summary||{},h=Number(d.files||0),p=Number(d.additions||0),f=Number(d.deletions||0),g=s?.patch?String(s.patch):"",b=Array.isArray(e.result?.changes)?e.result?.changes:[],x=h===1&&b.length>0?b[0].filePath:null,E=e.error||e.result&&"ok"in e.result&&e.result.ok===!1,y=typeof e.error=="string"?e.error:e.result&&"error"in e.result&&typeof e.result.error=="string"?e.result.error:null,S=e.result&&typeof e.result=="object"&&"stack"in e.result&&typeof e.result.stack=="string"?e.result.stack:void 0;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:i,className:`flex items-center gap-2 transition-colors w-full ${E?"text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200":"text-purple-700 dark:text-purple-300 hover:text-purple-600 dark:hover:text-purple-200"}`,children:[T.jsx(Xt,{className:`h-3 w-3 flex-shrink-0 transition-transform ${n?"rotate-90":""}`}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:["apply patch",E?" error":""]}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),x?T.jsx("span",{className:"text-foreground/70 min-w-0 flex-shrink overflow-hidden text-ellipsis whitespace-nowrap",dir:"rtl",title:x,children:x}):T.jsxs("span",{className:"text-foreground/70 flex-shrink-0",children:[h," ",h===1?"file":"files"]}),T.jsxs("span",{className:"text-emerald-600 dark:text-emerald-400 flex-shrink-0",children:["+",p]}),T.jsxs("span",{className:"text-red-600 dark:text-red-400 flex-shrink-0",children:["-",f]}),T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",l]})]}),n&&E&&y&&T.jsxs("div",{children:[T.jsx(hr,{error:y,stack:S,showStack:!0}),g&&T.jsx("div",{className:"mt-2 ml-5",children:T.jsxs("details",{children:[T.jsx("summary",{className:"cursor-pointer text-xs text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200",children:"Show patch that failed"}),T.jsx("div",{className:"mt-2",children:T.jsx(Ao,{patch:g})})]})})]}),n&&!E&&b.length>0&&T.jsx("div",{className:"mt-2 ml-5 space-y-2",children:b.map(v=>T.jsxs("div",{className:"space-y-1",children:[T.jsx("div",{className:"font-mono text-foreground/80",children:v.filePath}),T.jsx("div",{className:"flex flex-wrap gap-2",children:v.hunks.map((_,w)=>T.jsx("span",{className:"rounded bg-muted px-2 py-0.5 text-[0.65rem] font-mono text-muted-foreground",children:o(_)},`apply-patch-${v.filePath}-hunk-${w}`))})]},`apply-patch-${v.filePath}-${v.kind}`))}),n&&!E&&g&&T.jsx("div",{className:"mt-2 ml-5",children:T.jsx(Ao,{patch:g})})]})}function GX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=bu(s),u=yu(s),o=s.entries||[],d=tn(t),h=o.length>0||l;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"ls",isExpanded:n,onToggle:i,isError:l,colorVariant:"cyan",canExpand:h,children:[T.jsx(Vn,{}),T.jsxs(W_,{children:[o.length," ",o.length===1?"entry":"entries"]}),T.jsx(Vn,{}),T.jsx(ns,{children:d})]}),n&&l&&u&&T.jsx(hr,{error:u}),n&&!l&&o.length>0&&T.jsx("div",{className:"mt-2 ml-5 space-y-0.5 max-h-96 overflow-y-auto",children:o.map((p,f)=>{const g=p,b=g.type==="dir"||g.isDirectory;return T.jsxs("div",{className:"flex items-center gap-1.5 text-xs font-mono text-foreground/80",children:[b?T.jsx(r4,{className:"h-3 w-3 text-blue-500"}):T.jsx(go,{className:"h-3 w-3 text-muted-foreground"}),T.jsx("span",{children:g.name})]},`${g.name}-${f}`)})})]})}function VX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=bu(s),u=yu(s),o=String(s.tree||""),d=o.split(`
76
- `).length,h=tn(t),p=document?.documentElement.classList.contains("dark")?ia:Si,f=o.length>0||l;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"tree",isExpanded:n,onToggle:i,isError:l,colorVariant:"cyan",canExpand:f,children:[T.jsx(Vn,{}),T.jsxs(W_,{children:[d," ",d===1?"line":"lines"]}),T.jsx(Vn,{}),T.jsx(ns,{children:h})]}),n&&l&&u&&T.jsx(hr,{error:u}),n&&!l&&o&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto max-w-full",children:T.jsx("div",{className:"overflow-x-auto max-w-full",children:T.jsx(Zn,{language:"bash",style:p,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:o})})})]})}function WX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=s.matches||[],u=s.files||[],o=tn(t),d=bu(s)||!!e.error,h=yu(s)||(typeof e.error=="string"?e.error:null),p=s&&typeof s=="object"&&"stack"in s?String(s.stack):void 0,f=l.length>0?l.length:u.length,g=l.length>0?l.length===1?"match":"matches":u.length===1?"file":"files",b=(()=>{const E=e.args;if(E&&typeof E=="object"){if(typeof E.pattern=="string")return E.pattern;if(typeof E.query=="string")return E.query;if(typeof E.filePattern=="string")return E.filePattern}return""})(),x=f>0||d;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"search",isExpanded:n,onToggle:i,isError:d,colorVariant:"amber",canExpand:x,children:[b&&T.jsxs(T.Fragment,{children:[T.jsx(Vn,{}),T.jsxs("span",{className:"font-mono text-foreground/90 text-[11px]",children:['"',b.length>30?`${b.slice(0,30)}…`:b,'"']})]}),T.jsx(Vn,{}),T.jsxs(W_,{children:[f," ",g]}),T.jsx(Vn,{}),T.jsx(ns,{children:o})]}),n&&d&&h&&T.jsx(hr,{error:h,stack:p,showStack:!0}),n&&!d&&l.length>0&&T.jsx("div",{className:"mt-2 ml-5 space-y-1 max-h-96 overflow-y-auto",children:l.map((E,y)=>{const S=E;return T.jsxs("div",{className:"text-xs font-mono bg-card/60 border border-border rounded px-2 py-1",children:[T.jsxs("div",{className:"text-blue-600 dark:text-blue-400 truncate",children:[S.file,":",S.line]}),T.jsx("div",{className:"text-foreground/80 truncate",children:S.text})]},`${S.file}-${S.line}-${y}`)})}),n&&!d&&u.length>0&&l.length===0&&T.jsx("div",{className:"mt-2 ml-5 space-y-0.5 max-h-96 overflow-y-auto",children:u.map(E=>T.jsx("div",{className:"text-xs font-mono text-foreground/70 truncate",children:String(E)},String(E)))})]})}function KX({toolDurationMs:e}){const t=tn(e);return T.jsx("div",{className:"text-xs",children:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("span",{className:"font-medium text-emerald-700 dark:text-emerald-300",children:"Done"}),t&&T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground/70",children:"·"}),T.jsx("span",{className:"text-muted-foreground/80",children:t})]})]})})}function YX({toolName:e,contentJson:t,toolDurationMs:n,isExpanded:i,onToggle:s}){const l=t.result,u=tn(n),o=l&&Object.keys(l).length>0,d=document?.documentElement.classList.contains("dark")?ia:Si,h=t.error||l&&typeof l=="object"&&"ok"in l&&l.ok===!1,p=typeof t.error=="string"?t.error:l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:null,f=l&&typeof l=="object"&&"stack"in l&&typeof l.stack=="string"?l.stack:void 0;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:s,className:`flex items-center gap-2 transition-colors w-full ${h?"text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200":"text-foreground hover:text-foreground/80"}`,children:[T.jsx(Xt,{className:`h-3 w-3 flex-shrink-0 transition-transform ${i?"rotate-90":""}`}),h&&T.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-red-600 dark:text-red-400"}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:[e,h?" error":""]}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("span",{className:"text-muted-foreground/80 flex-shrink-0",children:u})]}),i&&h&&p&&T.jsx(hr,{error:p,stack:f,showStack:!0}),i&&!h&&o&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto max-w-full",children:T.jsx("div",{className:"overflow-x-auto max-w-full",children:T.jsx(Zn,{language:"json",style:d,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:JSON.stringify(l,null,2)})})})]})}function XX({contentJson:e,toolDurationMs:t}){return T.jsx("div",{className:"text-xs",children:T.jsxs("div",{className:"text-muted-foreground",children:[T.jsxs("div",{children:["Tool: ",e.name]}),T.jsxs("div",{children:["Duration: ",t,"ms"]}),T.jsx("pre",{className:"mt-2 text-[10px] bg-card border border-border p-2 rounded overflow-x-auto",children:JSON.stringify(e,null,2)})]})})}function ZX({contentJson:e}){const t=e.result||{},n=t.items||[],i=t.note;return T.jsx("div",{className:"text-xs",children:T.jsxs("div",{className:"bg-blue-500/10 border border-blue-500/30 dark:bg-blue-500/5 dark:border-blue-500/20 rounded-lg p-3 space-y-2",children:[i&&T.jsx("div",{className:"text-blue-700 dark:text-blue-300 text-sm font-medium mb-3",children:i}),T.jsx("div",{className:"space-y-1.5",children:n.map((s,l)=>T.jsxs("div",{className:"flex items-start gap-2",children:[s.status==="completed"&&T.jsx(wF,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300 flex-shrink-0 mt-0.5"}),s.status==="in_progress"&&T.jsx(hF,{className:"h-4 w-4 text-blue-700 dark:text-blue-300 flex-shrink-0 mt-0.5 animate-pulse"}),s.status==="pending"&&T.jsx(kF,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),T.jsx("span",{className:`text-sm ${s.status==="completed"?"text-muted-foreground line-through":s.status==="in_progress"?"text-foreground":"text-muted-foreground/80"}`,children:s.step})]},`${s.step}-${l}`))})]})})}function QX({contentJson:e}){const t=e.result||{},n=String(t.message||"Processing..."),i=t.stage?String(t.stage):void 0,s=t.pct?Number(t.pct):void 0;return T.jsxs("div",{className:"flex items-center gap-2 text-sm text-violet-700 dark:text-violet-300 animate-pulse",children:[i&&T.jsxs("span",{className:"text-muted-foreground/80",children:["[",i,"]"]}),T.jsx("span",{children:n}),s!==void 0&&T.jsxs("span",{className:"text-muted-foreground/80",children:["(",s,"%)"]})]})}function JX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},[l,u]=G.useState(new Set),o=b=>{u(x=>{const E=new Set(x);return E.has(b)?E.delete(b):E.add(b),E})},d="results"in s,h=s.results||[],p=s;if(d){const b=tn(t);return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-2 text-purple-700 dark:text-purple-300 transition-colors hover:text-purple-600 dark:hover:text-purple-200",children:[n?T.jsx(Qi,{className:"h-3 w-3"}):T.jsx(Xt,{className:"h-3 w-3"}),T.jsx("span",{className:"font-medium",children:"web search"}),T.jsx("span",{className:"text-muted-foreground/70",children:"·"}),T.jsxs("span",{className:"text-foreground/70",children:[h.length," ",h.length===1?"result":"results"]}),T.jsxs("span",{className:"text-muted-foreground/80",children:["· ",b]})]}),n&&T.jsx("div",{className:"mt-2 ml-5 space-y-2 max-h-96 overflow-y-auto",children:h.map((x,E)=>T.jsxs("div",{className:"bg-card/60 border border-border rounded-lg p-3 space-y-1",children:[T.jsxs("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:underline font-medium",children:[x.title,T.jsx(jF,{className:"h-3 w-3"})]}),T.jsx("p",{className:"text-muted-foreground text-xs",children:x.snippet}),T.jsx("p",{className:"text-xs text-muted-foreground/70 truncate",children:x.url})]},`${x.url}-${E}`))})]})}const f=tn(t),g=p.url&&p.url.length>60?`${p.url.slice(0,60)}...`:p.url;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:()=>o(0),className:"flex items-center gap-2 text-purple-700 dark:text-purple-300 transition-colors hover:text-purple-600 dark:hover:text-purple-200 w-full text-left",children:[l.has(0)?T.jsx(Qi,{className:"h-3 w-3 flex-shrink-0"}):T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0"}),T.jsx("span",{className:"font-medium flex-shrink-0",children:"web fetch"}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline truncate flex-1 min-w-0",onClick:b=>b.stopPropagation(),children:g}),T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",f]})]}),l.has(0)&&p.content&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg p-3 max-h-96 overflow-y-auto",children:T.jsx("div",{className:"text-xs text-foreground/80 whitespace-pre-wrap break-words",children:p.content})})]})}function eZ({contentJson:e,debug:t}){const[n,i]=G.useState(!1);let s,l,u,o=!1;e.error&&typeof e.error=="object"?(s=e.error,s.message&&typeof s.message=="string"&&(l=s.message),s.type&&typeof s.type=="string"&&(u=s.type)):e.details&&typeof e.details=="object"?(s=e.details,e.message&&typeof e.message=="string"&&(l=e.message),e.type&&typeof e.type=="string"&&(u=e.type),e.isAborted===!0&&(o=!0)):(e.message&&typeof e.message=="string"&&(l=e.message),e.type&&typeof e.type=="string"&&(u=e.type),e.isAborted===!0&&(o=!0),s=e);let d;if(s?.responseBody&&typeof s.responseBody=="string")try{const g=JSON.parse(s.responseBody);g.error&&typeof g.error=="object"&&(d={type:typeof g.error.type=="string"?g.error.type:void 0,message:typeof g.error.message=="string"?g.error.message:void 0})}catch{}const h=g=>{if(g==null)return T.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof g=="boolean")return T.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:String(g)});if(typeof g=="number")return T.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:g});if(typeof g=="string"){if(g.startsWith("{")||g.startsWith("["))try{const b=JSON.parse(g);return T.jsx("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs overflow-x-auto",children:T.jsx("code",{children:JSON.stringify(b,null,2)})})}catch{}return T.jsx("span",{className:"text-foreground",children:g})}return typeof g=="object"?T.jsx("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs overflow-x-auto",children:T.jsx("code",{children:JSON.stringify(g,null,2)})}):T.jsx("span",{className:"text-foreground",children:String(g)})},p=["name","statusCode","url","model","isRetryable","cause"],f=new Set;return T.jsxs("div",{className:"space-y-2 text-sm",children:[o&&T.jsx("div",{className:"text-amber-600 dark:text-amber-400 font-medium",children:"Request aborted"}),d?.message&&T.jsxs("div",{className:"space-y-1",children:[T.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:"API Error:"}),T.jsx("div",{className:"text-foreground",children:d.message}),d.type&&T.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type: ",d.type]})]}),!d?.message&&l&&T.jsxs("div",{className:"space-y-1",children:[T.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:"Error:"}),T.jsx("div",{className:"text-foreground",children:l}),u&&T.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type: ",u]})]}),s&&T.jsx("div",{className:"space-y-1.5",children:p.map(g=>{const b=s[g];return b==null?null:(f.add(g),T.jsxs("div",{className:"flex gap-2",children:[T.jsxs("span",{className:"font-medium text-muted-foreground min-w-[100px]",children:[g,":"]}),h(b)]},g))})}),s&&T.jsxs("div",{className:"mt-3 border-t border-border pt-2",children:[T.jsxs("button",{type:"button",onClick:()=>i(!n),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[n?T.jsx(Qi,{className:"h-3 w-3"}):T.jsx(Xt,{className:"h-3 w-3"}),n?"Hide":"View"," Raw Error Details"]}),n&&T.jsx("div",{className:"mt-2",children:T.jsx("pre",{className:"p-3 bg-muted/50 rounded text-xs overflow-x-auto max-h-96 overflow-y-auto",children:T.jsx("code",{children:JSON.stringify(s,null,2)})})})]}),t&&T.jsxs("details",{className:"mt-4 text-xs",children:[T.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"Debug Info"}),T.jsx("pre",{className:"mt-2 p-2 bg-muted/30 rounded overflow-x-auto",children:T.jsx("code",{children:JSON.stringify({contentJson:e,errorDetails:s,apiError:d},null,2)})})]})]})}function tZ({part:e}){const[t,n]=G.useState(!0),i=G.useRef(null);let s="";const l=e.contentJson||e.content;return l&&typeof l=="object"&&"text"in l?s=String(l.text):typeof l=="string"&&(s=l),G.useEffect(()=>{i.current&&t&&!e.completedAt&&(i.current.scrollTop=i.current.scrollHeight)},[s,t,e.completedAt]),!s||!s.trim()?null:T.jsxs("div",{className:"w-full",children:[T.jsxs("button",{type:"button",onClick:()=>n(!t),className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full py-0.5",children:[t?T.jsx(Qi,{className:"h-3.5 w-3.5"}):T.jsx(Xt,{className:"h-3.5 w-3.5"}),T.jsx("span",{className:"font-medium",children:"Reasoning"}),!e.completedAt&&T.jsx("span",{className:"text-muted-foreground/60 animate-pulse",children:"thinking..."})]}),t&&T.jsx("div",{ref:i,className:"mt-2 p-3 bg-muted/30 rounded-md border border-border max-h-48 overflow-y-auto",children:T.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-wrap font-mono",children:s})})]})}const nZ={Read:"read",Write:"write",Edit:"edit",Ls:"ls",Tree:"tree",Cd:"cd",Pwd:"pwd",Glob:"glob",Grep:"ripgrep",Bash:"bash",Terminal:"terminal",GitStatus:"git_status",GitDiff:"git_diff",GitCommit:"git_commit",ApplyPatch:"apply_patch",UpdatePlan:"update_plan",ProgressUpdate:"progress_update",Finish:"finish",WebSearch:"websearch"};function rZ(e){return nZ[e]??e}function jN({toolName:e,contentJson:t,toolDurationMs:n,debug:i}){const[s,l]=G.useState(!1),u=rZ(e),o={contentJson:t,toolDurationMs:n??void 0,isExpanded:s,onToggle:()=>l(!s)};if(i)return T.jsx(XX,{...o,toolName:e});switch(u){case"read":return T.jsx(AX,{...o});case"write":return T.jsx(OX,{...o});case"edit":return T.jsx(IX,{...o});case"bash":return T.jsx(FX,{...o});case"git_status":return T.jsx(zX,{...o});case"git_diff":return T.jsx(HX,{...o});case"git_commit":return T.jsx(qX,{...o});case"apply_patch":return T.jsx($X,{...o});case"ls":return T.jsx(GX,{...o});case"tree":return T.jsx(VX,{...o});case"ripgrep":case"grep":case"glob":return T.jsx(WX,{...o});case"websearch":return T.jsx(JX,{...o});case"finish":return T.jsx(KX,{...o});case"update_plan":return T.jsx(ZX,{...o});case"progress_update":return T.jsx(QX,{...o});case"error":return T.jsx(eZ,{...o});default:return T.jsx(YX,{...o,toolName:e})}}function $v(e){const t=e.contentJson;if(t&&typeof t=="object")return t;try{if(e.content){const n=JSON.parse(e.content);if(n&&typeof n=="object"&&!Array.isArray(n))return n}}catch{}return null}function iZ(e){const t=$v(e);if(!t)return;const n=t.args;if(n&&typeof n=="object"&&!Array.isArray(n))return n}function aZ(e){if(!e)return null;const t=["cmd","command","script","input"];for(const n of t){const i=e[n];if(typeof i=="string"&&i.trim().length>0)return i.trim()}return null}function sZ(e,t){if(!t)return null;const n=[{key:"path",match:!0},{key:"file",match:!0},{key:"target",match:!0},{key:"cwd",match:!0},{key:"query",match:!0},{key:"pattern",match:!0},{key:"glob",match:!0},{key:"dir",match:!0}];for(const{key:i}of n){const s=t[i];if(typeof s=="string"&&s.trim().length>0)return{key:i,value:s.trim()}}if(e==="bash"){const i=t.command;if(typeof i=="string"&&i.trim().length>0)return{key:"command",value:i.trim()}}return null}function oZ(e,t){if(!e)return null;const n=[];for(const[s,l]of Object.entries(e))if(!(t&&s===t)){if(typeof l=="string"||typeof l=="number"){const u=`${s}=${String(l)}`;n.push(u)}if(n.length>=3)break}if(!n.length)return null;const i=n.join(" ");return i.length>120?`${i.slice(0,117)}…`:i}const zN=G.memo(function({part:t,showLine:n,isLastToolCall:i,isLastProgressUpdate:s}){if(t.type==="tool_call"&&!i||t.type==="tool_result"&&t.toolName==="progress_update"&&!s)return null;if(t.type==="text"){const f=t.contentJson||t.content;let g="";if(f&&typeof f=="object"&&"text"in f?g=String(f.text):typeof f=="string"&&(g=f),!g||!g.trim())return null}const l=t.type==="tool_call"||t.type==="tool_result",u=["flex-1","min-w-0","max-w-full"];l?u.push("pt-0.5","mt-[1px]"):u.push("pt-0"),t.type==="text"&&u.push("-mt-0.5");const o=u.join(" "),d=()=>{if(t.type==="reasoning")return T.jsx(c_,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"});if(t.type==="tool_call")return T.jsx(FO,{className:"h-4 w-4 text-amber-600 dark:text-amber-300 animate-spin"});if(t.type==="error")return $v(t)?.isAborted===!0?T.jsx(m4,{className:"h-4 w-4 text-amber-600 dark:text-amber-400"}):T.jsx(Mr,{className:"h-4 w-4 text-red-600 dark:text-red-400"});if(t.type==="tool_result"){const f=t.toolName||"";return f==="read"?T.jsx(DO,{className:"h-4 w-4 text-blue-600 dark:text-blue-300"}):f==="write"?T.jsx(Fw,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300"}):f==="edit"?T.jsx(Fw,{className:"h-4 w-4 text-purple-600 dark:text-purple-300"}):f==="ls"?T.jsx(u4,{className:"h-4 w-4 text-cyan-600 dark:text-cyan-300"}):f==="tree"?T.jsx(t4,{className:"h-4 w-4 text-cyan-600 dark:text-cyan-300"}):f==="bash"?T.jsx(Ji,{className:"h-4 w-4 text-muted-foreground"}):f==="ripgrep"||f==="grep"||f==="glob"?T.jsx(u_,{className:"h-4 w-4 text-amber-600 dark:text-amber-300"}):f==="apply_patch"?T.jsx(Bw,{className:"h-4 w-4 text-purple-600 dark:text-purple-300"}):f==="git_status"?T.jsx(xo,{className:"h-4 w-4 text-blue-600 dark:text-blue-300"}):f==="git_diff"?T.jsx(Bw,{className:"h-4 w-4 text-purple-600 dark:text-purple-300"}):f==="git_commit"?T.jsx(Mc,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300"}):f==="finish"?T.jsx(Zc,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300"}):T.jsx(Ji,{className:"h-4 w-4 text-muted-foreground"})}return T.jsx(wo,{className:"h-4 w-4 text-violet-600 dark:text-violet-300"})},h=()=>{const f=t.toolName||"";let g;try{t.contentJson&&typeof t.contentJson=="object"?g=t.contentJson:typeof t.content=="string"?g=JSON.parse(t.content):g={}}catch{g={result:t.content}}return T.jsx(jN,{toolName:f,contentJson:g,toolDurationMs:t.toolDurationMs,debug:!1})},p=()=>{if(t.type==="reasoning")return T.jsx(tZ,{part:t});if(t.type==="text"){let f="";const g=t.contentJson||t.content;return g&&typeof g=="object"&&"text"in g?f=String(g.text):typeof g=="string"?f=g:g&&(f=JSON.stringify(g,null,2)),T.jsx("div",{className:"text-base text-foreground leading-relaxed markdown-content max-w-full overflow-hidden",children:T.jsx(cL,{remarkPlugins:[LL],children:f})})}if(t.type==="error"){let f;try{t.contentJson&&typeof t.contentJson=="object"?f=t.contentJson:typeof t.content=="string"?f=JSON.parse(t.content):f={}}catch{f={message:t.content||"Unknown error"}}return T.jsx(jN,{toolName:"error",contentJson:f,toolDurationMs:t.toolDurationMs,debug:!1})}if(t.type==="tool_call"){const f=$v(t),g=t.toolName||(typeof f?.name=="string"?f.name:"tool"),b=g.replace(/_/g," "),x=iZ(t),E=sZ(g,x),y=oZ(x,E?.key),S=g==="bash"?aZ(x):null,v=[];S?v.push({key:"cmd",node:T.jsx("code",{className:"font-mono text-foreground/90 truncate max-w-xs",children:S})}):E&&v.push({key:"primary",node:T.jsx("code",{className:"font-mono text-foreground/85 truncate max-w-xs",children:E.value})}),y&&v.push({key:"args",node:T.jsx("span",{className:"text-muted-foreground/80 truncate max-w-xs",children:y})}),v.length===0&&v.push({key:"running",node:T.jsx("span",{className:"text-muted-foreground/75",children:"running…"})});const _=["flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-foreground/80 max-w-full"];return t.ephemeral&&_.push("animate-pulse"),T.jsxs("div",{className:_.join(" "),children:[T.jsx("span",{className:"font-medium text-foreground",children:b}),v.map(w=>T.jsxs(G.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground/65",children:"·"}),w.node]},w.key))]})}return t.type==="tool_result"?h():null};return T.jsxs("div",{className:"flex gap-3 pb-2 relative max-w-full overflow-hidden",children:[T.jsxs("div",{className:"flex-shrink-0 w-6 flex items-start justify-center relative pt-0.5",children:[T.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full relative bg-background",children:d()}),n&&T.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 w-[2px] bg-border z-0",style:{top:"1.25rem",bottom:"-0.5rem"}})]}),T.jsx("div",{className:o,children:p()})]})},(e,t)=>e.part.id===t.part.id&&e.part.content===t.part.content&&e.part.contentJson===t.part.contentJson&&e.part.ephemeral===t.part.ephemeral&&e.part.completedAt===t.part.completedAt&&e.showLine===t.showLine&&e.isLastToolCall===t.isLastToolCall&&e.isLastProgressUpdate===t.isLastProgressUpdate),HN=["Generating...","Cooking up something...","Thinking...","Processing...","Working on it...","Crafting response...","Brewing magic...","Computing..."];function lZ(e){const t=e.split("").reduce((n,i)=>n+i.charCodeAt(0),0);return HN[t%HN.length]}const cZ=G.memo(function({message:t,showHeader:n,hasNextAssistantMessage:i}){const s=t.parts||[],l=s.some(b=>b.toolName==="finish"),u=s.reduce((b,x,E)=>x.type==="tool_result"&&x.toolName==="progress_update"?E:b,-1),o=u>=0?s[u]:null,d=s.some(b=>!(b.type==="tool_result"&&b.toolName==="progress_update")),h=s.findIndex(b=>!(b.type==="tool_result"&&b.toolName==="progress_update")),p=t.status==="pending"&&!l&&!!o,f=t.status==="pending"&&!l&&!o,g=b=>b?new Date(b).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"";return T.jsxs("div",{className:"relative",children:[n&&T.jsx("div",{className:"pb-2",children:T.jsxs("div",{className:"inline-flex items-center bg-violet-500/10 border border-violet-500/30 dark:bg-violet-500/5 dark:border-violet-500/20 rounded-full pr-3 md:pr-4",children:[T.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-violet-500/50 bg-violet-500/20 dark:bg-violet-500/10",children:T.jsx(wo,{className:"h-3.5 w-3.5 text-violet-700 dark:text-violet-300"})}),T.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs md:text-sm text-muted-foreground pl-3",children:[t.agent&&T.jsx("span",{className:"font-medium text-violet-700 dark:text-violet-300 whitespace-nowrap",children:t.agent}),t.agent&&t.provider&&T.jsx("span",{className:"hidden md:inline",children:"·"}),t.provider&&T.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:t.provider}),t.model&&T.jsx("span",{className:"hidden md:inline",children:"·"}),t.model&&T.jsx("span",{className:"text-muted-foreground break-all md:break-normal",children:t.model}),t.createdAt&&T.jsx("span",{className:"hidden md:inline",children:"·"}),t.createdAt&&T.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:g(t.createdAt)})]})]})}),T.jsxs("div",{className:"relative ml-1",children:[s.map((b,x)=>{const E=x===s.length-1,y=b.type==="tool_result"&&b.toolName==="finish",S=(!E||i)&&!y,v=b.type==="tool_call"&&E;return b.type==="tool_result"&&b.toolName==="progress_update"?null:T.jsx(zN,{part:b,showLine:S,isFirstPart:x===h&&!n,isLastToolCall:v},b.id)}),p&&o&&T.jsx(zN,{part:o,showLine:i,isFirstPart:!d&&!n,isLastProgressUpdate:!0},o.id),f&&T.jsxs("div",{className:"flex gap-3 pb-2 relative",children:[T.jsx("div",{className:"flex-shrink-0 w-6 flex items-start justify-center relative pt-0.5",children:T.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full relative bg-card text-violet-700 dark:bg-background dark:text-violet-300",children:T.jsx(wo,{className:"h-4 w-4"})})}),T.jsx("div",{className:"flex-1 pt-0.5",children:T.jsx("div",{className:"text-base text-foreground animate-pulse",children:lZ(t.id)})})]})]})]})},(e,t)=>{const n=e.message.parts||[],i=t.message.parts||[];if(n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],u=i[s];if(l.id!==u.id||l.content!==u.content||l.contentJson!==u.contentJson||l.ephemeral!==u.ephemeral||l.completedAt!==u.completedAt)return!1}return e.message.id===t.message.id&&e.message.status===t.message.status&&e.message.completedAt===t.message.completedAt&&e.showHeader===t.showHeader&&e.hasNextAssistantMessage===t.hasNextAssistantMessage&&e.isLastMessage===t.isLastMessage}),uZ=G.memo(function({message:t}){const[n,i]=G.useState(null),s=t.parts||[],l=s.filter(b=>b.type==="text"),u=s.filter(b=>b.type==="image"),o=l[0];let d="";if(o){const b=o.contentJson||o.content;b&&typeof b=="object"&&"text"in b?d=String(b.text):typeof b=="string"?d=b:b&&(d=JSON.stringify(b,null,2))}const h=[];for(const b of u)try{const x=b.contentJson||JSON.parse(b.content||"{}");if(x&&typeof x=="object"&&"data"in x){const E=x,y=`data:${E.mediaType};base64,${E.data}`;h.push({id:b.id,src:y})}}catch{}const p=b=>b?new Date(b).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",f=d.trim().length>0,g=h.length>0;return!f&&!g?null:T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"relative pb-8 pt-6",children:T.jsxs("div",{className:"flex gap-3 md:gap-4 justify-end",children:[T.jsxs("div",{className:"flex flex-col items-end min-w-0 flex-1 max-w-[calc(100%-3rem)] md:max-w-2xl",children:[T.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground pb-2 justify-end",children:[T.jsx("span",{className:"font-medium text-emerald-700 dark:text-emerald-300",children:"You"}),t.createdAt&&T.jsx("span",{children:"·"}),t.createdAt&&T.jsx("span",{children:p(t.createdAt)})]}),T.jsxs("div",{className:"inline-block max-w-full text-sm text-foreground leading-relaxed bg-emerald-500/5 border border-emerald-500/20 rounded-xl px-4 py-3 [word-break:break-word] overflow-hidden",children:[g&&T.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:h.map(b=>T.jsx("button",{type:"button",onClick:()=>i(b.src),className:"w-16 h-16 rounded-lg overflow-hidden bg-muted hover:ring-2 hover:ring-primary/50 transition-all",children:T.jsx("img",{src:b.src,alt:"Attachment",className:"w-full h-full object-cover"})},b.id))}),f&&T.jsx("div",{className:"prose prose-invert prose-sm [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_*]:[word-break:break-word] [&_*]:overflow-wrap-anywhere",children:T.jsx(cL,{remarkPlugins:[LL],children:d})})]})]}),T.jsx("div",{className:"flex-shrink-0 w-8 flex items-start justify-center",children:T.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-emerald-500/50 bg-emerald-500/20 dark:bg-emerald-500/10 relative bg-background",children:T.jsx(PO,{className:"h-4 w-4 text-emerald-700 dark:text-emerald-300"})})})]})}),n&&T.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:()=>i(null),onKeyDown:b=>b.key==="Escape"&&i(null),children:[T.jsx("button",{type:"button",onClick:()=>i(null),className:"absolute top-4 right-4 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:T.jsx(is,{className:"w-6 h-6 text-white"})}),T.jsx("img",{src:n,alt:"Expanded attachment",className:"max-w-full max-h-full object-contain rounded-lg",onClick:b=>b.stopPropagation()})]})]})},(e,t)=>{const n=e.message.parts?.[0],i=t.message.parts?.[0];return e.message.id===t.message.id&&n?.content===i?.content&&n?.contentJson===i?.contentJson&&e.message.createdAt===t.message.createdAt&&e.message.parts?.length===t.message.parts?.length});function dZ({session:e}){const t=G.useMemo(()=>{const l=e.totalInputTokens||0,u=e.totalOutputTokens||0;return l+u},[e.totalInputTokens,e.totalOutputTokens]),n=G.useMemo(()=>{const l=e.totalInputTokens||0,u=e.totalOutputTokens||0,o=30,d=60,h=l/1e6*o,p=u/1e6*d;return h+p},[e.totalInputTokens,e.totalOutputTokens]),i=l=>{if(!l)return"0s";const u=Math.floor(l/1e3),o=Math.floor(u/60),d=Math.floor(o/60);if(d>0){const h=o%60;return`${d}h ${h}m`}if(o>0){const h=u%60;return`${o}m ${h}s`}return`${u}s`},s=l=>l.toLocaleString("en-US");return T.jsx("div",{className:"border-b border-border bg-background/95 backdrop-blur-sm",children:T.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6",children:[T.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-4",children:e.title||"Untitled Session"}),T.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(MO,{className:"w-4 h-4"}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Total Tokens"}),T.jsx("span",{className:"text-foreground font-medium",children:s(t)}),(e.totalInputTokens||e.totalOutputTokens)&&T.jsxs("span",{className:"text-xs opacity-60",children:[s(e.totalInputTokens||0)," in /"," ",s(e.totalOutputTokens||0)," out"]})]})]}),T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(RF,{className:"w-4 h-4"}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Tool Time"}),T.jsx("span",{className:"text-foreground font-medium",children:i(e.totalToolTimeMs)})]})]}),n>0&&T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(LO,{className:"w-4 h-4"}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Est. Cost"}),T.jsxs("span",{className:"text-foreground font-medium",children:["$",n.toFixed(4)]})]})]}),T.jsx("div",{className:"flex items-center gap-2 text-muted-foreground ml-auto",children:T.jsxs("div",{className:"flex flex-col items-end",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Model"}),T.jsx("span",{className:"text-foreground font-medium",children:e.model}),T.jsxs("span",{className:"text-xs opacity-60",children:[e.provider," · ",e.agent]})]})})]})]})})}function hZ({session:e,isVisible:t,isGenerating:n}){const i=G.useMemo(()=>{const l=e.totalInputTokens||0,u=e.totalOutputTokens||0,o=30,d=60,h=l/1e6*o,p=u/1e6*d;return h+p},[e.totalInputTokens,e.totalOutputTokens]),s=l=>l.toLocaleString("en-US");return T.jsx("div",{className:`absolute top-0 left-0 right-0 h-14 border-b border-border bg-background/95 backdrop-blur-sm z-10 transition-transform duration-200 ${t?"translate-y-0":"-translate-y-full"}`,children:T.jsxs("div",{className:"h-full px-6 flex items-center justify-between gap-6 text-sm",children:[T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(OO,{className:"w-4 h-4"}),T.jsx("span",{className:"text-foreground font-medium",children:e.agent})]}),n&&T.jsx(S6,{sessionId:e.id})]}),T.jsxs("div",{className:"flex items-center gap-6",children:[T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(MO,{className:"w-4 h-4"}),T.jsxs("span",{className:"text-foreground font-medium",children:[s(e.totalInputTokens||0)," /"," ",s(e.totalOutputTokens||0)]})]}),i>0&&T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(LO,{className:"w-4 h-4"}),T.jsxs("span",{className:"text-foreground font-medium",children:["$",i.toFixed(4)]})]})]})]})})}const fZ=G.memo(function({messages:t,session:n,isGenerating:i}){const s=G.useRef(null),l=G.useRef(null),u=G.useRef(null),[o,d]=G.useState(!0),[h,p]=G.useState(!1),f=G.useRef(0),g=G.useRef(0),b=()=>{const y=l.current;if(!y)return;const{scrollTop:S,scrollHeight:v,clientHeight:_}=y,w=v-S-_;d(w<100);const N=u.current;if(N){const k=N.getBoundingClientRect(),O=y.getBoundingClientRect();p(k.bottom<O.top)}};G.useEffect(()=>{t.length>g.current&&d(!0),g.current=t.length},[t.length]),G.useEffect(()=>{const y=l.current;!y||!o||requestAnimationFrame(()=>{if(!s.current||!y)return;const{scrollHeight:S}=y,_=S!==f.current?"smooth":"instant";s.current.scrollIntoView({behavior:_}),f.current=S})},[t,o]);const x=()=>{d(!0),s.current?.scrollIntoView({behavior:"smooth"})},E=G.useMemo(()=>t.filter(y=>y.role!=="system"),[t]);return t.length===0?T.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground text-sm",children:"No messages yet. Start a conversation below."}):T.jsxs("div",{className:"absolute inset-0 flex flex-col",children:[n&&T.jsx(hZ,{session:n,isVisible:h,isGenerating:i}),T.jsxs("div",{ref:l,className:"flex-1 overflow-y-auto",onScroll:b,children:[T.jsx("div",{ref:u,children:n&&T.jsx(dZ,{session:n})}),T.jsx("div",{className:"p-6 pb-32",children:T.jsxs("div",{className:"max-w-3xl mx-auto space-y-6",children:[E.map((y,S)=>{const v=E[S-1],_=E[S+1],w=S===E.length-1;if(y.role==="user")return T.jsx(uZ,{message:y,isFirst:S===0},y.id);if(y.role==="assistant"){const N=!v||v.role!=="assistant",k=_&&_.role==="assistant";return T.jsx(cZ,{message:y,showHeader:N,hasNextAssistantMessage:k,isLastMessage:w},y.id)}return null}),T.jsx("div",{ref:s})]})})]}),!o&&T.jsxs("button",{type:"button",onClick:x,className:"absolute bottom-36 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2 bg-background border border-border rounded-full shadow-lg hover:bg-muted/50 transition-all text-sm text-foreground z-10",children:[T.jsx(lF,{className:"w-4 h-4"}),T.jsx("span",{children:"Scroll to bottom"})]})]})});class pZ{abortController=null;handlers=new Map;running=!1;async connect(t){this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.running=!0;try{const n=await fetch(t,{headers:{Accept:"text/event-stream"},signal:this.abortController.signal});if(!n.ok){console.error("[SSE] Connection failed:",n.status);return}const i=n.body?.getReader();if(!i){console.error("[SSE] No response body");return}const s=new TextDecoder;let l="";for(;this.running;){const{done:u,value:o}=await i.read();if(u)break;l+=s.decode(o,{stream:!0});let d=l.indexOf(`
76
+ `).length,h=tn(t),p=document?.documentElement.classList.contains("dark")?ia:Si,f=o.length>0||l;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"tree",isExpanded:n,onToggle:i,isError:l,colorVariant:"cyan",canExpand:f,children:[T.jsx(Vn,{}),T.jsxs(W_,{children:[d," ",d===1?"line":"lines"]}),T.jsx(Vn,{}),T.jsx(ns,{children:h})]}),n&&l&&u&&T.jsx(hr,{error:u}),n&&!l&&o&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto max-w-full",children:T.jsx("div",{className:"overflow-x-auto max-w-full",children:T.jsx(Zn,{language:"bash",style:p,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:o})})})]})}function WX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},l=s.matches||[],u=s.files||[],o=tn(t),d=bu(s)||!!e.error,h=yu(s)||(typeof e.error=="string"?e.error:null),p=s&&typeof s=="object"&&"stack"in s?String(s.stack):void 0,f=l.length>0?l.length:u.length,g=l.length>0?l.length===1?"match":"matches":u.length===1?"file":"files",b=(()=>{const E=e.args;if(E&&typeof E=="object"){if(typeof E.pattern=="string")return E.pattern;if(typeof E.query=="string")return E.query;if(typeof E.filePattern=="string")return E.filePattern}return""})(),x=f>0||d;return T.jsxs("div",{className:"text-xs",children:[T.jsxs(Uo,{toolName:"search",isExpanded:n,onToggle:i,isError:d,colorVariant:"amber",canExpand:x,children:[b&&T.jsxs(T.Fragment,{children:[T.jsx(Vn,{}),T.jsxs("span",{className:"font-mono text-foreground/90 text-[11px]",children:['"',b.length>30?`${b.slice(0,30)}…`:b,'"']})]}),T.jsx(Vn,{}),T.jsxs(W_,{children:[f," ",g]}),T.jsx(Vn,{}),T.jsx(ns,{children:o})]}),n&&d&&h&&T.jsx(hr,{error:h,stack:p,showStack:!0}),n&&!d&&l.length>0&&T.jsx("div",{className:"mt-2 ml-5 space-y-1 max-h-96 overflow-y-auto",children:l.map((E,y)=>{const S=E;return T.jsxs("div",{className:"text-xs font-mono bg-card/60 border border-border rounded px-2 py-1",children:[T.jsxs("div",{className:"text-blue-600 dark:text-blue-400 truncate",children:[S.file,":",S.line]}),T.jsx("div",{className:"text-foreground/80 truncate",children:S.text})]},`${S.file}-${S.line}-${y}`)})}),n&&!d&&u.length>0&&l.length===0&&T.jsx("div",{className:"mt-2 ml-5 space-y-0.5 max-h-96 overflow-y-auto",children:u.map(E=>T.jsx("div",{className:"text-xs font-mono text-foreground/70 truncate",children:String(E)},String(E)))})]})}function KX({toolDurationMs:e}){const t=tn(e);return T.jsx("div",{className:"text-xs",children:T.jsxs("div",{className:"flex items-center gap-2",children:[T.jsx("span",{className:"font-medium text-emerald-700 dark:text-emerald-300",children:"Done"}),t&&T.jsxs(T.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground/70",children:"·"}),T.jsx("span",{className:"text-muted-foreground/80",children:t})]})]})})}function YX({toolName:e,contentJson:t,toolDurationMs:n,isExpanded:i,onToggle:s}){const l=t.result,u=tn(n),o=l&&Object.keys(l).length>0,d=document?.documentElement.classList.contains("dark")?ia:Si,h=t.error||l&&typeof l=="object"&&"ok"in l&&l.ok===!1,p=typeof t.error=="string"?t.error:l&&typeof l=="object"&&"error"in l&&typeof l.error=="string"?l.error:null,f=l&&typeof l=="object"&&"stack"in l&&typeof l.stack=="string"?l.stack:void 0;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:s,className:`flex items-center gap-2 transition-colors w-full ${h?"text-red-700 dark:text-red-300 hover:text-red-600 dark:hover:text-red-200":"text-foreground hover:text-foreground/80"}`,children:[T.jsx(Xt,{className:`h-3 w-3 flex-shrink-0 transition-transform ${i?"rotate-90":""}`}),h&&T.jsx(Mr,{className:"h-3 w-3 flex-shrink-0 text-red-600 dark:text-red-400"}),T.jsxs("span",{className:"font-medium flex-shrink-0",children:[e,h?" error":""]}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("span",{className:"text-muted-foreground/80 flex-shrink-0",children:u})]}),i&&h&&p&&T.jsx(hr,{error:p,stack:f,showStack:!0}),i&&!h&&o&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg overflow-hidden max-h-96 overflow-y-auto max-w-full",children:T.jsx("div",{className:"overflow-x-auto max-w-full",children:T.jsx(Zn,{language:"json",style:d,customStyle:{margin:0,padding:"0.75rem",fontSize:"0.75rem",lineHeight:"1.5",background:"transparent",maxWidth:"100%"},wrapLines:!0,wrapLongLines:!0,children:JSON.stringify(l,null,2)})})})]})}function XX({contentJson:e,toolDurationMs:t}){return T.jsx("div",{className:"text-xs",children:T.jsxs("div",{className:"text-muted-foreground",children:[T.jsxs("div",{children:["Tool: ",e.name]}),T.jsxs("div",{children:["Duration: ",t,"ms"]}),T.jsx("pre",{className:"mt-2 text-[10px] bg-card border border-border p-2 rounded overflow-x-auto",children:JSON.stringify(e,null,2)})]})})}function ZX({contentJson:e}){const t=e.result||{},n=t.items||[],i=t.note;return T.jsx("div",{className:"text-xs",children:T.jsxs("div",{className:"bg-blue-500/10 border border-blue-500/30 dark:bg-blue-500/5 dark:border-blue-500/20 rounded-lg p-3 space-y-2",children:[i&&T.jsx("div",{className:"text-blue-700 dark:text-blue-300 text-sm font-medium mb-3",children:i}),T.jsx("div",{className:"space-y-1.5",children:n.map((s,l)=>T.jsxs("div",{className:"flex items-start gap-2",children:[s.status==="completed"&&T.jsx(wF,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300 flex-shrink-0 mt-0.5"}),s.status==="in_progress"&&T.jsx(hF,{className:"h-4 w-4 text-blue-700 dark:text-blue-300 flex-shrink-0 mt-0.5 animate-pulse"}),s.status==="pending"&&T.jsx(kF,{className:"h-4 w-4 text-muted-foreground flex-shrink-0 mt-0.5"}),T.jsx("span",{className:`text-sm ${s.status==="completed"?"text-muted-foreground line-through":s.status==="in_progress"?"text-foreground":"text-muted-foreground/80"}`,children:s.step})]},`${s.step}-${l}`))})]})})}function QX({contentJson:e}){const t=e.result||{},n=String(t.message||"Processing..."),i=t.stage?String(t.stage):void 0,s=t.pct?Number(t.pct):void 0;return T.jsxs("div",{className:"flex items-center gap-2 text-sm text-violet-700 dark:text-violet-300 animate-pulse",children:[i&&T.jsxs("span",{className:"text-muted-foreground/80",children:["[",i,"]"]}),T.jsx("span",{children:n}),s!==void 0&&T.jsxs("span",{className:"text-muted-foreground/80",children:["(",s,"%)"]})]})}function JX({contentJson:e,toolDurationMs:t,isExpanded:n,onToggle:i}){const s=e.result||{},[l,u]=G.useState(new Set),o=b=>{u(x=>{const E=new Set(x);return E.has(b)?E.delete(b):E.add(b),E})},d="results"in s,h=s.results||[],p=s;if(d){const b=tn(t);return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-2 text-purple-700 dark:text-purple-300 transition-colors hover:text-purple-600 dark:hover:text-purple-200",children:[n?T.jsx(Qi,{className:"h-3 w-3"}):T.jsx(Xt,{className:"h-3 w-3"}),T.jsx("span",{className:"font-medium",children:"web search"}),T.jsx("span",{className:"text-muted-foreground/70",children:"·"}),T.jsxs("span",{className:"text-foreground/70",children:[h.length," ",h.length===1?"result":"results"]}),T.jsxs("span",{className:"text-muted-foreground/80",children:["· ",b]})]}),n&&T.jsx("div",{className:"mt-2 ml-5 space-y-2 max-h-96 overflow-y-auto",children:h.map((x,E)=>T.jsxs("div",{className:"bg-card/60 border border-border rounded-lg p-3 space-y-1",children:[T.jsxs("a",{href:x.url,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 text-blue-600 dark:text-blue-400 hover:underline font-medium",children:[x.title,T.jsx(jF,{className:"h-3 w-3"})]}),T.jsx("p",{className:"text-muted-foreground text-xs",children:x.snippet}),T.jsx("p",{className:"text-xs text-muted-foreground/70 truncate",children:x.url})]},`${x.url}-${E}`))})]})}const f=tn(t),g=p.url&&p.url.length>60?`${p.url.slice(0,60)}...`:p.url;return T.jsxs("div",{className:"text-xs",children:[T.jsxs("button",{type:"button",onClick:()=>o(0),className:"flex items-center gap-2 text-purple-700 dark:text-purple-300 transition-colors hover:text-purple-600 dark:hover:text-purple-200 w-full text-left",children:[l.has(0)?T.jsx(Qi,{className:"h-3 w-3 flex-shrink-0"}):T.jsx(Xt,{className:"h-3 w-3 flex-shrink-0"}),T.jsx("span",{className:"font-medium flex-shrink-0",children:"web fetch"}),T.jsx("span",{className:"text-muted-foreground/70 flex-shrink-0",children:"·"}),T.jsx("a",{href:p.url,target:"_blank",rel:"noopener noreferrer",className:"text-blue-600 dark:text-blue-400 hover:underline truncate flex-1 min-w-0",onClick:b=>b.stopPropagation(),children:g}),T.jsxs("span",{className:"text-muted-foreground/80 flex-shrink-0",children:["· ",f]})]}),l.has(0)&&p.content&&T.jsx("div",{className:"mt-2 ml-5 bg-card/60 border border-border rounded-lg p-3 max-h-96 overflow-y-auto",children:T.jsx("div",{className:"text-xs text-foreground/80 whitespace-pre-wrap break-words",children:p.content})})]})}function eZ({contentJson:e,debug:t}){const[n,i]=G.useState(!1);let s,l,u,o=!1;e.error&&typeof e.error=="object"?(s=e.error,s.message&&typeof s.message=="string"&&(l=s.message),s.type&&typeof s.type=="string"&&(u=s.type)):e.details&&typeof e.details=="object"?(s=e.details,e.message&&typeof e.message=="string"&&(l=e.message),e.type&&typeof e.type=="string"&&(u=e.type),e.isAborted===!0&&(o=!0)):(e.message&&typeof e.message=="string"&&(l=e.message),e.type&&typeof e.type=="string"&&(u=e.type),e.isAborted===!0&&(o=!0),s=e);let d;if(s?.responseBody&&typeof s.responseBody=="string")try{const g=JSON.parse(s.responseBody);g.error&&typeof g.error=="object"&&(d={type:typeof g.error.type=="string"?g.error.type:void 0,message:typeof g.error.message=="string"?g.error.message:void 0})}catch{}const h=g=>{if(g==null)return T.jsx("span",{className:"text-muted-foreground",children:"null"});if(typeof g=="boolean")return T.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:String(g)});if(typeof g=="number")return T.jsx("span",{className:"text-blue-600 dark:text-blue-400",children:g});if(typeof g=="string"){if(g.startsWith("{")||g.startsWith("["))try{const b=JSON.parse(g);return T.jsx("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs overflow-x-auto",children:T.jsx("code",{children:JSON.stringify(b,null,2)})})}catch{}return T.jsx("span",{className:"text-foreground",children:g})}return typeof g=="object"?T.jsx("pre",{className:"mt-1 p-2 bg-muted/50 rounded text-xs overflow-x-auto",children:T.jsx("code",{children:JSON.stringify(g,null,2)})}):T.jsx("span",{className:"text-foreground",children:String(g)})},p=["name","statusCode","url","model","isRetryable","cause"],f=new Set;return T.jsxs("div",{className:"space-y-2 text-sm",children:[o&&T.jsx("div",{className:"text-amber-600 dark:text-amber-400 font-medium",children:"Request aborted"}),d?.message&&T.jsxs("div",{className:"space-y-1",children:[T.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:"API Error:"}),T.jsx("div",{className:"text-foreground",children:d.message}),d.type&&T.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type: ",d.type]})]}),!d?.message&&l&&T.jsxs("div",{className:"space-y-1",children:[T.jsx("div",{className:"font-medium text-red-600 dark:text-red-400",children:"Error:"}),T.jsx("div",{className:"text-foreground",children:l}),u&&T.jsxs("div",{className:"text-xs text-muted-foreground",children:["Type: ",u]})]}),s&&T.jsx("div",{className:"space-y-1.5",children:p.map(g=>{const b=s[g];return b==null?null:(f.add(g),T.jsxs("div",{className:"flex gap-2",children:[T.jsxs("span",{className:"font-medium text-muted-foreground min-w-[100px]",children:[g,":"]}),h(b)]},g))})}),s&&T.jsxs("div",{className:"mt-3 border-t border-border pt-2",children:[T.jsxs("button",{type:"button",onClick:()=>i(!n),className:"flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:[n?T.jsx(Qi,{className:"h-3 w-3"}):T.jsx(Xt,{className:"h-3 w-3"}),n?"Hide":"View"," Raw Error Details"]}),n&&T.jsx("div",{className:"mt-2",children:T.jsx("pre",{className:"p-3 bg-muted/50 rounded text-xs overflow-x-auto max-h-96 overflow-y-auto",children:T.jsx("code",{children:JSON.stringify(s,null,2)})})})]}),t&&T.jsxs("details",{className:"mt-4 text-xs",children:[T.jsx("summary",{className:"cursor-pointer text-muted-foreground",children:"Debug Info"}),T.jsx("pre",{className:"mt-2 p-2 bg-muted/30 rounded overflow-x-auto",children:T.jsx("code",{children:JSON.stringify({contentJson:e,errorDetails:s,apiError:d},null,2)})})]})]})}function tZ({part:e}){const[t,n]=G.useState(!0),i=G.useRef(null);let s="";const l=e.contentJson||e.content;return l&&typeof l=="object"&&"text"in l?s=String(l.text):typeof l=="string"&&(s=l),G.useEffect(()=>{i.current&&t&&!e.completedAt&&(i.current.scrollTop=i.current.scrollHeight)},[t,e.completedAt]),!s||!s.trim()?null:T.jsxs("div",{className:"w-full",children:[T.jsxs("button",{type:"button",onClick:()=>n(!t),className:"flex items-center gap-2 text-xs text-muted-foreground hover:text-foreground transition-colors w-full py-0.5",children:[t?T.jsx(Qi,{className:"h-3.5 w-3.5"}):T.jsx(Xt,{className:"h-3.5 w-3.5"}),T.jsx("span",{className:"font-medium",children:"Reasoning"}),!e.completedAt&&T.jsx("span",{className:"text-muted-foreground/60 animate-pulse",children:"thinking..."})]}),t&&T.jsx("div",{ref:i,className:"mt-2 p-3 bg-muted/30 rounded-md border border-border max-h-48 overflow-y-auto",children:T.jsx("div",{className:"text-sm text-muted-foreground whitespace-pre-wrap font-mono",children:s})})]})}const nZ={Read:"read",Write:"write",Edit:"edit",Ls:"ls",Tree:"tree",Cd:"cd",Pwd:"pwd",Glob:"glob",Grep:"ripgrep",Bash:"bash",Terminal:"terminal",GitStatus:"git_status",GitDiff:"git_diff",GitCommit:"git_commit",ApplyPatch:"apply_patch",UpdatePlan:"update_plan",ProgressUpdate:"progress_update",Finish:"finish",WebSearch:"websearch"};function rZ(e){return nZ[e]??e}function jN({toolName:e,contentJson:t,toolDurationMs:n,debug:i}){const[s,l]=G.useState(!1),u=rZ(e),o={contentJson:t,toolDurationMs:n??void 0,isExpanded:s,onToggle:()=>l(!s)};if(i)return T.jsx(XX,{...o,toolName:e});switch(u){case"read":return T.jsx(AX,{...o});case"write":return T.jsx(OX,{...o});case"edit":return T.jsx(IX,{...o});case"bash":return T.jsx(FX,{...o});case"git_status":return T.jsx(zX,{...o});case"git_diff":return T.jsx(HX,{...o});case"git_commit":return T.jsx(qX,{...o});case"apply_patch":return T.jsx($X,{...o});case"ls":return T.jsx(GX,{...o});case"tree":return T.jsx(VX,{...o});case"ripgrep":case"grep":case"glob":return T.jsx(WX,{...o});case"websearch":return T.jsx(JX,{...o});case"finish":return T.jsx(KX,{...o});case"update_plan":return T.jsx(ZX,{...o});case"progress_update":return T.jsx(QX,{...o});case"error":return T.jsx(eZ,{...o});default:return T.jsx(YX,{...o,toolName:e})}}function $v(e){const t=e.contentJson;if(t&&typeof t=="object")return t;try{if(e.content){const n=JSON.parse(e.content);if(n&&typeof n=="object"&&!Array.isArray(n))return n}}catch{}return null}function iZ(e){const t=$v(e);if(!t)return;const n=t.args;if(n&&typeof n=="object"&&!Array.isArray(n))return n}function aZ(e){if(!e)return null;const t=["cmd","command","script","input"];for(const n of t){const i=e[n];if(typeof i=="string"&&i.trim().length>0)return i.trim()}return null}function sZ(e,t){if(!t)return null;const n=[{key:"path",match:!0},{key:"file",match:!0},{key:"target",match:!0},{key:"cwd",match:!0},{key:"query",match:!0},{key:"pattern",match:!0},{key:"glob",match:!0},{key:"dir",match:!0}];for(const{key:i}of n){const s=t[i];if(typeof s=="string"&&s.trim().length>0)return{key:i,value:s.trim()}}if(e==="bash"){const i=t.command;if(typeof i=="string"&&i.trim().length>0)return{key:"command",value:i.trim()}}return null}function oZ(e,t){if(!e)return null;const n=[];for(const[s,l]of Object.entries(e))if(!(t&&s===t)){if(typeof l=="string"||typeof l=="number"){const u=`${s}=${String(l)}`;n.push(u)}if(n.length>=3)break}if(!n.length)return null;const i=n.join(" ");return i.length>120?`${i.slice(0,117)}…`:i}const zN=G.memo(function({part:t,showLine:n,isLastToolCall:i,isLastProgressUpdate:s}){if(t.type==="tool_call"&&!i||t.type==="tool_result"&&t.toolName==="progress_update"&&!s)return null;if(t.type==="text"){const f=t.contentJson||t.content;let g="";if(f&&typeof f=="object"&&"text"in f?g=String(f.text):typeof f=="string"&&(g=f),!g||!g.trim())return null}const l=t.type==="tool_call"||t.type==="tool_result",u=["flex-1","min-w-0","max-w-full"];l?u.push("pt-0.5","mt-[1px]"):u.push("pt-0"),t.type==="text"&&u.push("-mt-0.5");const o=u.join(" "),d=()=>{if(t.type==="reasoning")return T.jsx(c_,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-300"});if(t.type==="tool_call")return T.jsx(FO,{className:"h-4 w-4 text-amber-600 dark:text-amber-300 animate-spin"});if(t.type==="error")return $v(t)?.isAborted===!0?T.jsx(m4,{className:"h-4 w-4 text-amber-600 dark:text-amber-400"}):T.jsx(Mr,{className:"h-4 w-4 text-red-600 dark:text-red-400"});if(t.type==="tool_result"){const f=t.toolName||"";return f==="read"?T.jsx(DO,{className:"h-4 w-4 text-blue-600 dark:text-blue-300"}):f==="write"?T.jsx(Fw,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300"}):f==="edit"?T.jsx(Fw,{className:"h-4 w-4 text-purple-600 dark:text-purple-300"}):f==="ls"?T.jsx(u4,{className:"h-4 w-4 text-cyan-600 dark:text-cyan-300"}):f==="tree"?T.jsx(t4,{className:"h-4 w-4 text-cyan-600 dark:text-cyan-300"}):f==="bash"?T.jsx(Ji,{className:"h-4 w-4 text-muted-foreground"}):f==="ripgrep"||f==="grep"||f==="glob"?T.jsx(u_,{className:"h-4 w-4 text-amber-600 dark:text-amber-300"}):f==="apply_patch"?T.jsx(Bw,{className:"h-4 w-4 text-purple-600 dark:text-purple-300"}):f==="git_status"?T.jsx(xo,{className:"h-4 w-4 text-blue-600 dark:text-blue-300"}):f==="git_diff"?T.jsx(Bw,{className:"h-4 w-4 text-purple-600 dark:text-purple-300"}):f==="git_commit"?T.jsx(Mc,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300"}):f==="finish"?T.jsx(Zc,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-300"}):T.jsx(Ji,{className:"h-4 w-4 text-muted-foreground"})}return T.jsx(wo,{className:"h-4 w-4 text-violet-600 dark:text-violet-300"})},h=()=>{const f=t.toolName||"";let g;try{t.contentJson&&typeof t.contentJson=="object"?g=t.contentJson:typeof t.content=="string"?g=JSON.parse(t.content):g={}}catch{g={result:t.content}}return T.jsx(jN,{toolName:f,contentJson:g,toolDurationMs:t.toolDurationMs,debug:!1})},p=()=>{if(t.type==="reasoning")return T.jsx(tZ,{part:t});if(t.type==="text"){let f="";const g=t.contentJson||t.content;return g&&typeof g=="object"&&"text"in g?f=String(g.text):typeof g=="string"?f=g:g&&(f=JSON.stringify(g,null,2)),T.jsx("div",{className:"text-base text-foreground leading-relaxed markdown-content max-w-full overflow-hidden",children:T.jsx(cL,{remarkPlugins:[LL],children:f})})}if(t.type==="error"){let f;try{t.contentJson&&typeof t.contentJson=="object"?f=t.contentJson:typeof t.content=="string"?f=JSON.parse(t.content):f={}}catch{f={message:t.content||"Unknown error"}}return T.jsx(jN,{toolName:"error",contentJson:f,toolDurationMs:t.toolDurationMs,debug:!1})}if(t.type==="tool_call"){const f=$v(t),g=t.toolName||(typeof f?.name=="string"?f.name:"tool"),b=g.replace(/_/g," "),x=iZ(t),E=sZ(g,x),y=oZ(x,E?.key),S=g==="bash"?aZ(x):null,v=[];S?v.push({key:"cmd",node:T.jsx("code",{className:"font-mono text-foreground/90 truncate max-w-xs",children:S})}):E&&v.push({key:"primary",node:T.jsx("code",{className:"font-mono text-foreground/85 truncate max-w-xs",children:E.value})}),y&&v.push({key:"args",node:T.jsx("span",{className:"text-muted-foreground/80 truncate max-w-xs",children:y})}),v.length===0&&v.push({key:"running",node:T.jsx("span",{className:"text-muted-foreground/75",children:"running…"})});const _=["flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-foreground/80 max-w-full"];return t.ephemeral&&_.push("animate-pulse"),T.jsxs("div",{className:_.join(" "),children:[T.jsx("span",{className:"font-medium text-foreground",children:b}),v.map(w=>T.jsxs(G.Fragment,{children:[T.jsx("span",{className:"text-muted-foreground/65",children:"·"}),w.node]},w.key))]})}return t.type==="tool_result"?h():null};return T.jsxs("div",{className:"flex gap-3 pb-2 relative max-w-full overflow-hidden",children:[T.jsxs("div",{className:"flex-shrink-0 w-6 flex items-start justify-center relative pt-0.5",children:[T.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full relative bg-background",children:d()}),n&&T.jsx("div",{className:"absolute left-1/2 -translate-x-1/2 w-[2px] bg-border z-0",style:{top:"1.25rem",bottom:"-0.5rem"}})]}),T.jsx("div",{className:o,children:p()})]})},(e,t)=>e.part.id===t.part.id&&e.part.content===t.part.content&&e.part.contentJson===t.part.contentJson&&e.part.ephemeral===t.part.ephemeral&&e.part.completedAt===t.part.completedAt&&e.showLine===t.showLine&&e.isLastToolCall===t.isLastToolCall&&e.isLastProgressUpdate===t.isLastProgressUpdate),HN=["Generating...","Cooking up something...","Thinking...","Processing...","Working on it...","Crafting response...","Brewing magic...","Computing..."];function lZ(e){const t=e.split("").reduce((n,i)=>n+i.charCodeAt(0),0);return HN[t%HN.length]}const cZ=G.memo(function({message:t,showHeader:n,hasNextAssistantMessage:i}){const s=t.parts||[],l=s.some(b=>b.toolName==="finish"),u=s.reduce((b,x,E)=>x.type==="tool_result"&&x.toolName==="progress_update"?E:b,-1),o=u>=0?s[u]:null,d=s.some(b=>!(b.type==="tool_result"&&b.toolName==="progress_update")),h=s.findIndex(b=>!(b.type==="tool_result"&&b.toolName==="progress_update")),p=t.status==="pending"&&!l&&!!o,f=t.status==="pending"&&!l&&!o,g=b=>b?new Date(b).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"";return T.jsxs("div",{className:"relative",children:[n&&T.jsx("div",{className:"pb-2",children:T.jsxs("div",{className:"inline-flex items-center bg-violet-500/10 border border-violet-500/30 dark:bg-violet-500/5 dark:border-violet-500/20 rounded-full pr-3 md:pr-4",children:[T.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border border-violet-500/50 bg-violet-500/20 dark:bg-violet-500/10",children:T.jsx(wo,{className:"h-3.5 w-3.5 text-violet-700 dark:text-violet-300"})}),T.jsxs("div",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-xs md:text-sm text-muted-foreground pl-3",children:[t.agent&&T.jsx("span",{className:"font-medium text-violet-700 dark:text-violet-300 whitespace-nowrap",children:t.agent}),t.agent&&t.provider&&T.jsx("span",{className:"hidden md:inline",children:"·"}),t.provider&&T.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:t.provider}),t.model&&T.jsx("span",{className:"hidden md:inline",children:"·"}),t.model&&T.jsx("span",{className:"text-muted-foreground break-all md:break-normal",children:t.model}),t.createdAt&&T.jsx("span",{className:"hidden md:inline",children:"·"}),t.createdAt&&T.jsx("span",{className:"text-muted-foreground whitespace-nowrap",children:g(t.createdAt)})]})]})}),T.jsxs("div",{className:"relative ml-1",children:[s.map((b,x)=>{const E=x===s.length-1,y=b.type==="tool_result"&&b.toolName==="finish",S=(!E||i)&&!y,v=b.type==="tool_call"&&E;return b.type==="tool_result"&&b.toolName==="progress_update"?null:T.jsx(zN,{part:b,showLine:S,isFirstPart:x===h&&!n,isLastToolCall:v},b.id)}),p&&o&&T.jsx(zN,{part:o,showLine:i,isFirstPart:!d&&!n,isLastProgressUpdate:!0},o.id),f&&T.jsxs("div",{className:"flex gap-3 pb-2 relative",children:[T.jsx("div",{className:"flex-shrink-0 w-6 flex items-start justify-center relative pt-0.5",children:T.jsx("div",{className:"flex h-5 w-5 shrink-0 items-center justify-center rounded-full relative bg-card text-violet-700 dark:bg-background dark:text-violet-300",children:T.jsx(wo,{className:"h-4 w-4"})})}),T.jsx("div",{className:"flex-1 pt-0.5",children:T.jsx("div",{className:"text-base text-foreground animate-pulse",children:lZ(t.id)})})]})]})]})},(e,t)=>{const n=e.message.parts||[],i=t.message.parts||[];if(n.length!==i.length)return!1;for(let s=0;s<n.length;s++){const l=n[s],u=i[s];if(l.id!==u.id||l.content!==u.content||l.contentJson!==u.contentJson||l.ephemeral!==u.ephemeral||l.completedAt!==u.completedAt)return!1}return e.message.id===t.message.id&&e.message.status===t.message.status&&e.message.completedAt===t.message.completedAt&&e.showHeader===t.showHeader&&e.hasNextAssistantMessage===t.hasNextAssistantMessage&&e.isLastMessage===t.isLastMessage}),uZ=G.memo(function({message:t}){const[n,i]=G.useState(null),s=t.parts||[],l=s.filter(b=>b.type==="text"),u=s.filter(b=>b.type==="image"),o=l[0];let d="";if(o){const b=o.contentJson||o.content;b&&typeof b=="object"&&"text"in b?d=String(b.text):typeof b=="string"?d=b:b&&(d=JSON.stringify(b,null,2))}const h=[];for(const b of u)try{const x=b.contentJson||JSON.parse(b.content||"{}");if(x&&typeof x=="object"&&"data"in x){const E=x,y=`data:${E.mediaType};base64,${E.data}`;h.push({id:b.id,src:y})}}catch{}const p=b=>b?new Date(b).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}):"",f=d.trim().length>0,g=h.length>0;return!f&&!g?null:T.jsxs(T.Fragment,{children:[T.jsx("div",{className:"relative pb-8 pt-6",children:T.jsxs("div",{className:"flex gap-3 md:gap-4 justify-end",children:[T.jsxs("div",{className:"flex flex-col items-end min-w-0 flex-1 max-w-[calc(100%-3rem)] md:max-w-2xl",children:[T.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground pb-2 justify-end",children:[T.jsx("span",{className:"font-medium text-emerald-700 dark:text-emerald-300",children:"You"}),t.createdAt&&T.jsx("span",{children:"·"}),t.createdAt&&T.jsx("span",{children:p(t.createdAt)})]}),T.jsxs("div",{className:"inline-block max-w-full text-sm text-foreground leading-relaxed bg-emerald-500/5 border border-emerald-500/20 rounded-xl px-4 py-3 [word-break:break-word] overflow-hidden",children:[g&&T.jsx("div",{className:"flex flex-wrap gap-2 mb-2",children:h.map(b=>T.jsx("button",{type:"button",onClick:()=>i(b.src),className:"w-16 h-16 rounded-lg overflow-hidden bg-muted hover:ring-2 hover:ring-primary/50 transition-all",children:T.jsx("img",{src:b.src,alt:"Attachment",className:"w-full h-full object-cover"})},b.id))}),f&&T.jsx("div",{className:"prose prose-invert prose-sm [&>*:first-child]:mt-0 [&>*:last-child]:mb-0 [&_*]:[word-break:break-word] [&_*]:overflow-wrap-anywhere",children:T.jsx(cL,{remarkPlugins:[LL],children:d})})]})]}),T.jsx("div",{className:"flex-shrink-0 w-8 flex items-start justify-center",children:T.jsx("div",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-full border-2 border-emerald-500/50 bg-emerald-500/20 dark:bg-emerald-500/10 relative bg-background",children:T.jsx(PO,{className:"h-4 w-4 text-emerald-700 dark:text-emerald-300"})})})]})}),n&&T.jsxs("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80 p-4",onClick:()=>i(null),onKeyDown:b=>b.key==="Escape"&&i(null),tabIndex:-1,children:[T.jsx("button",{type:"button",onClick:()=>i(null),className:"absolute top-4 right-4 p-2 rounded-full bg-white/10 hover:bg-white/20 transition-colors",children:T.jsx(is,{className:"w-6 h-6 text-white"})}),T.jsx("img",{src:n,alt:"Expanded attachment",className:"max-w-full max-h-full object-contain rounded-lg",onClick:b=>b.stopPropagation(),onKeyDown:b=>b.key==="Enter"&&b.stopPropagation()})]})]})},(e,t)=>{const n=e.message.parts?.[0],i=t.message.parts?.[0];return e.message.id===t.message.id&&n?.content===i?.content&&n?.contentJson===i?.contentJson&&e.message.createdAt===t.message.createdAt&&e.message.parts?.length===t.message.parts?.length});function dZ({session:e}){const t=G.useMemo(()=>{const l=e.totalInputTokens||0,u=e.totalOutputTokens||0;return l+u},[e.totalInputTokens,e.totalOutputTokens]),n=G.useMemo(()=>{const l=e.totalInputTokens||0,u=e.totalOutputTokens||0,o=30,d=60,h=l/1e6*o,p=u/1e6*d;return h+p},[e.totalInputTokens,e.totalOutputTokens]),i=l=>{if(!l)return"0s";const u=Math.floor(l/1e3),o=Math.floor(u/60),d=Math.floor(o/60);if(d>0){const h=o%60;return`${d}h ${h}m`}if(o>0){const h=u%60;return`${o}m ${h}s`}return`${u}s`},s=l=>l.toLocaleString("en-US");return T.jsx("div",{className:"border-b border-border bg-background/95 backdrop-blur-sm",children:T.jsxs("div",{className:"max-w-3xl mx-auto px-6 py-6",children:[T.jsx("h1",{className:"text-2xl font-semibold text-foreground mb-4",children:e.title||"Untitled Session"}),T.jsxs("div",{className:"flex flex-wrap gap-6 text-sm",children:[T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(MO,{className:"w-4 h-4"}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Total Tokens"}),T.jsx("span",{className:"text-foreground font-medium",children:s(t)}),(e.totalInputTokens||e.totalOutputTokens)&&T.jsxs("span",{className:"text-xs opacity-60",children:[s(e.totalInputTokens||0)," in /"," ",s(e.totalOutputTokens||0)," out"]})]})]}),T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(RF,{className:"w-4 h-4"}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Tool Time"}),T.jsx("span",{className:"text-foreground font-medium",children:i(e.totalToolTimeMs)})]})]}),n>0&&T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(LO,{className:"w-4 h-4"}),T.jsxs("div",{className:"flex flex-col",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Est. Cost"}),T.jsxs("span",{className:"text-foreground font-medium",children:["$",n.toFixed(4)]})]})]}),T.jsx("div",{className:"flex items-center gap-2 text-muted-foreground ml-auto",children:T.jsxs("div",{className:"flex flex-col items-end",children:[T.jsx("span",{className:"text-xs uppercase tracking-wide opacity-70",children:"Model"}),T.jsx("span",{className:"text-foreground font-medium",children:e.model}),T.jsxs("span",{className:"text-xs opacity-60",children:[e.provider," · ",e.agent]})]})})]})]})})}function hZ({session:e,isVisible:t,isGenerating:n}){const i=G.useMemo(()=>{const l=e.totalInputTokens||0,u=e.totalOutputTokens||0,o=30,d=60,h=l/1e6*o,p=u/1e6*d;return h+p},[e.totalInputTokens,e.totalOutputTokens]),s=l=>l.toLocaleString("en-US");return T.jsx("div",{className:`absolute top-0 left-0 right-0 h-14 border-b border-border bg-background/95 backdrop-blur-sm z-10 transition-transform duration-200 ${t?"translate-y-0":"-translate-y-full"}`,children:T.jsxs("div",{className:"h-full px-6 flex items-center justify-between gap-6 text-sm",children:[T.jsxs("div",{className:"flex items-center gap-4",children:[T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(OO,{className:"w-4 h-4"}),T.jsx("span",{className:"text-foreground font-medium",children:e.agent})]}),n&&T.jsx(S6,{sessionId:e.id})]}),T.jsxs("div",{className:"flex items-center gap-6",children:[T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(MO,{className:"w-4 h-4"}),T.jsxs("span",{className:"text-foreground font-medium",children:[s(e.totalInputTokens||0)," /"," ",s(e.totalOutputTokens||0)]})]}),i>0&&T.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[T.jsx(LO,{className:"w-4 h-4"}),T.jsxs("span",{className:"text-foreground font-medium",children:["$",i.toFixed(4)]})]})]})]})})}const fZ=G.memo(function({messages:t,session:n,isGenerating:i}){const s=G.useRef(null),l=G.useRef(null),u=G.useRef(null),[o,d]=G.useState(!0),[h,p]=G.useState(!1),f=G.useRef(0),g=G.useRef(0),b=()=>{const y=l.current;if(!y)return;const{scrollTop:S,scrollHeight:v,clientHeight:_}=y,w=v-S-_;d(w<100);const N=u.current;if(N){const k=N.getBoundingClientRect(),O=y.getBoundingClientRect();p(k.bottom<O.top)}};G.useEffect(()=>{t.length>g.current&&d(!0),g.current=t.length},[t.length]),G.useEffect(()=>{const y=l.current;!y||!o||requestAnimationFrame(()=>{if(!s.current||!y)return;const{scrollHeight:S}=y,_=S!==f.current?"smooth":"instant";s.current.scrollIntoView({behavior:_}),f.current=S})},[t,o]);const x=()=>{d(!0),s.current?.scrollIntoView({behavior:"smooth"})},E=G.useMemo(()=>t.filter(y=>y.role!=="system"),[t]);return t.length===0?T.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground text-sm",children:"No messages yet. Start a conversation below."}):T.jsxs("div",{className:"absolute inset-0 flex flex-col",children:[n&&T.jsx(hZ,{session:n,isVisible:h,isGenerating:i}),T.jsxs("div",{ref:l,className:"flex-1 overflow-y-auto",onScroll:b,children:[T.jsx("div",{ref:u,children:n&&T.jsx(dZ,{session:n})}),T.jsx("div",{className:"p-6 pb-32",children:T.jsxs("div",{className:"max-w-3xl mx-auto space-y-6",children:[E.map((y,S)=>{const v=E[S-1],_=E[S+1],w=S===E.length-1;if(y.role==="user")return T.jsx(uZ,{message:y,isFirst:S===0},y.id);if(y.role==="assistant"){const N=!v||v.role!=="assistant",k=_&&_.role==="assistant";return T.jsx(cZ,{message:y,showHeader:N,hasNextAssistantMessage:k,isLastMessage:w},y.id)}return null}),T.jsx("div",{ref:s})]})})]}),!o&&T.jsxs("button",{type:"button",onClick:x,className:"absolute bottom-36 left-1/2 -translate-x-1/2 flex items-center gap-2 px-4 py-2 bg-background border border-border rounded-full shadow-lg hover:bg-muted/50 transition-all text-sm text-foreground z-10",children:[T.jsx(lF,{className:"w-4 h-4"}),T.jsx("span",{children:"Scroll to bottom"})]})]})});class pZ{abortController=null;handlers=new Map;running=!1;async connect(t){this.abortController&&this.abortController.abort(),this.abortController=new AbortController,this.running=!0;try{const n=await fetch(t,{headers:{Accept:"text/event-stream"},signal:this.abortController.signal});if(!n.ok){console.error("[SSE] Connection failed:",n.status);return}const i=n.body?.getReader();if(!i){console.error("[SSE] No response body");return}const s=new TextDecoder;let l="";for(;this.running;){const{done:u,value:o}=await i.read();if(u)break;l+=s.decode(o,{stream:!0});let d=l.indexOf(`
77
77
 
78
78
  `);for(;d!==-1;){const h=l.slice(0,d);l=l.slice(d+2);const p=h.split(`
79
79
  `);let f="message",g="";for(const b of p)b.startsWith("event: ")?f=b.slice(7).trim():b.startsWith("data: ")?g+=(g?`