(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const s of o.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&r(s)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerpolicy&&(o.referrerPolicy=i.referrerpolicy),i.crossorigin==="use-credentials"?o.credentials="include":i.crossorigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function wd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var P={exports:{}},$={};/** * @license React * react.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ki=Symbol.for("react.element"),Ig=Symbol.for("react.portal"),Lg=Symbol.for("react.fragment"),Dg=Symbol.for("react.strict_mode"),Fg=Symbol.for("react.profiler"),Mg=Symbol.for("react.provider"),jg=Symbol.for("react.context"),Ag=Symbol.for("react.forward_ref"),$g=Symbol.for("react.suspense"),Ug=Symbol.for("react.memo"),zg=Symbol.for("react.lazy"),tc=Symbol.iterator;function Bg(e){return e===null||typeof e!="object"?null:(e=tc&&e[tc]||e["@@iterator"],typeof e=="function"?e:null)}var xd={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Pd=Object.assign,kd={};function Cr(e,t,n){this.props=e,this.context=t,this.refs=kd,this.updater=n||xd}Cr.prototype.isReactComponent={};Cr.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Cr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Od(){}Od.prototype=Cr.prototype;function _l(e,t,n){this.props=e,this.context=t,this.refs=kd,this.updater=n||xd}var El=_l.prototype=new Od;El.constructor=_l;Pd(El,Cr.prototype);El.isPureReactComponent=!0;var nc=Array.isArray,_d=Object.prototype.hasOwnProperty,Cl={current:null},Ed={key:!0,ref:!0,__self:!0,__source:!0};function Cd(e,t,n){var r,i={},o=null,s=null;if(t!=null)for(r in t.ref!==void 0&&(s=t.ref),t.key!==void 0&&(o=""+t.key),t)_d.call(t,r)&&!Ed.hasOwnProperty(r)&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1>>1,X=T[B];if(0>>1;Bi(Qn,M))Bei(Mt,Qn)?(T[B]=Mt,T[Be]=M,B=Be):(T[B]=Qn,T[_e]=M,B=_e);else if(Bei(Mt,M))T[B]=Mt,T[Be]=M,B=Be;else break e}}return F}function i(T,F){var M=T.sortIndex-F.sortIndex;return M!==0?M:T.id-F.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var s=Date,a=s.now();e.unstable_now=function(){return s.now()-a}}var l=[],u=[],c=1,f=null,d=3,p=!1,g=!1,y=!1,x=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,h=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function m(T){for(var F=n(u);F!==null;){if(F.callback===null)r(u);else if(F.startTime<=T)r(u),F.sortIndex=F.expirationTime,t(l,F);else break;F=n(u)}}function S(T){if(y=!1,m(T),!g)if(n(l)!==null)g=!0,Xe(_);else{var F=n(u);F!==null&&De(S,F.startTime-T)}}function _(T,F){g=!1,y&&(y=!1,v(b),b=-1),p=!0;var M=d;try{for(m(F),f=n(l);f!==null&&(!(f.expirationTime>F)||T&&!I());){var B=f.callback;if(typeof B=="function"){f.callback=null,d=f.priorityLevel;var X=B(f.expirationTime<=F);F=e.unstable_now(),typeof X=="function"?f.callback=X:f===n(l)&&r(l),m(F)}else r(l);f=n(l)}if(f!==null)var Yt=!0;else{var _e=n(u);_e!==null&&De(S,_e.startTime-F),Yt=!1}return Yt}finally{f=null,d=M,p=!1}}var O=!1,C=null,b=-1,k=5,E=-1;function I(){return!(e.unstable_now()-ET||125B?(T.sortIndex=M,t(u,T),n(l)===null&&T===n(u)&&(y?(v(b),b=-1):y=!0,De(S,M-B))):(T.sortIndex=X,t(l,T),g||p||(g=!0,Xe(_))),T},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(T){var F=d;return function(){var M=d;d=F;try{return T.apply(this,arguments)}finally{d=M}}}})(Nd);(function(e){e.exports=Nd})(Rd);/** * @license React * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Td=P.exports,We=Rd.exports;function N(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),da=Object.prototype.hasOwnProperty,Kg=/^[: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]*$/,ic={},oc={};function Wg(e){return da.call(oc,e)?!0:da.call(ic,e)?!1:Kg.test(e)?oc[e]=!0:(ic[e]=!0,!1)}function Gg(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Yg(e,t,n,r){if(t===null||typeof t>"u"||Gg(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Te(e,t,n,r,i,o,s){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=s}var ye={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ye[e]=new Te(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ye[t]=new Te(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ye[e]=new Te(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ye[e]=new Te(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){ye[e]=new Te(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ye[e]=new Te(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ye[e]=new Te(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ye[e]=new Te(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ye[e]=new Te(e,5,!1,e.toLowerCase(),null,!1,!1)});var Rl=/[\-:]([a-z])/g;function Nl(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(Rl,Nl);ye[t]=new Te(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(Rl,Nl);ye[t]=new Te(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(Rl,Nl);ye[t]=new Te(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ye[e]=new Te(e,1,!1,e.toLowerCase(),null,!1,!1)});ye.xlinkHref=new Te("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ye[e]=new Te(e,1,!1,e.toLowerCase(),null,!0,!0)});function Tl(e,t,n,r){var i=ye.hasOwnProperty(t)?ye[t]:null;(i!==null?i.type!==0:r||!(2a||i[s]!==o[a]){var l=` `+i[s].replace(" at new "," at ");return e.displayName&&l.includes("")&&(l=l.replace("",e.displayName)),l}while(1<=s&&0<=a);break}}}finally{bs=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Ur(e):""}function Jg(e){switch(e.tag){case 5:return Ur(e.type);case 16:return Ur("Lazy");case 13:return Ur("Suspense");case 19:return Ur("SuspenseList");case 0:case 2:case 15:return e=Rs(e.type,!1),e;case 11:return e=Rs(e.type.render,!1),e;case 1:return e=Rs(e.type,!0),e;default:return""}}function ma(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Wn:return"Fragment";case Kn:return"Portal";case pa:return"Profiler";case Il:return"StrictMode";case ha:return"Suspense";case ga:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Dd:return(e.displayName||"Context")+".Consumer";case Ld:return(e._context.displayName||"Context")+".Provider";case Ll:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Dl:return t=e.displayName||null,t!==null?t:ma(e.type)||"Memo";case Zt:t=e._payload,e=e._init;try{return ma(e(t))}catch{}}return null}function Xg(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ma(t);case 8:return t===Il?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function yn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Md(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Zg(e){var t=Md(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(s){r=""+s,o.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(s){r=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Di(e){e._valueTracker||(e._valueTracker=Zg(e))}function jd(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Md(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function go(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function va(e,t){var n=t.checked;return te({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n!=null?n:e._wrapperState.initialChecked})}function ac(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=yn(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Ad(e,t){t=t.checked,t!=null&&Tl(e,"checked",t,!1)}function ya(e,t){Ad(e,t);var n=yn(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Sa(e,t.type,n):t.hasOwnProperty("defaultValue")&&Sa(e,t.type,yn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function lc(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Sa(e,t,n){(t!=="number"||go(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var zr=Array.isArray;function or(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i"+t.valueOf().toString()+"",t=Fi.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function ni(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vr={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},em=["Webkit","ms","Moz","O"];Object.keys(Vr).forEach(function(e){em.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vr[t]=Vr[e]})});function Bd(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vr.hasOwnProperty(e)&&Vr[e]?(""+t).trim():t+"px"}function Qd(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,i=Bd(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}var tm=te({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Pa(e,t){if(t){if(tm[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(N(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(N(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(N(61))}if(t.style!=null&&typeof t.style!="object")throw Error(N(62))}}function ka(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Oa=null;function Fl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var _a=null,sr=null,ar=null;function fc(e){if(e=Ei(e)){if(typeof _a!="function")throw Error(N(280));var t=e.stateNode;t&&(t=rs(t),_a(e.stateNode,e.type,t))}}function Hd(e){sr?ar?ar.push(e):ar=[e]:sr=e}function Vd(){if(sr){var e=sr,t=ar;if(ar=sr=null,fc(e),t)for(e=0;e>>=0,e===0?32:31-(dm(e)/pm|0)|0}var Mi=64,ji=4194304;function Br(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function So(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,s=n&268435455;if(s!==0){var a=s&~i;a!==0?r=Br(a):(o&=s,o!==0&&(r=Br(o)))}else s=n&~i,s!==0?r=Br(s):o!==0&&(r=Br(o));if(r===0)return 0;if(t!==0&&t!==r&&(t&i)===0&&(i=r&-r,o=t&-t,i>=o||i===16&&(o&4194240)!==0))return t;if((r&4)!==0&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Oi(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ht(t),e[t]=n}function vm(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Kr),wc=String.fromCharCode(32),xc=!1;function fp(e,t){switch(e){case"keyup":return Vm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dp(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Gn=!1;function Km(e,t){switch(e){case"compositionend":return dp(t);case"keypress":return t.which!==32?null:(xc=!0,wc);case"textInput":return e=t.data,e===wc&&xc?null:e;default:return null}}function Wm(e,t){if(Gn)return e==="compositionend"||!Ql&&fp(e,t)?(e=up(),ro=Ul=sn=null,Gn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=_c(n)}}function mp(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?mp(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function vp(){for(var e=window,t=go();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=go(e.document)}return t}function Hl(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function rv(e){var t=vp(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&mp(n.ownerDocument.documentElement,n)){if(r!==null&&Hl(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=r.end===void 0?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=Ec(n,o);var s=Ec(n,r);i&&s&&(e.rangeCount!==1||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&(t=t.createRange(),t.setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Yn=null,Ta=null,Gr=null,Ia=!1;function Cc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ia||Yn==null||Yn!==go(r)||(r=Yn,"selectionStart"in r&&Hl(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Gr&&li(Gr,r)||(Gr=r,r=Po(Ta,"onSelect"),0Zn||(e.current=Aa[Zn],Aa[Zn]=null,Zn--)}function K(e,t){Zn++,Aa[Zn]=e.current,e.current=t}var Sn={},ke=Pn(Sn),je=Pn(!1),Fn=Sn;function pr(e,t){var n=e.type.contextTypes;if(!n)return Sn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i={},o;for(o in n)i[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=i),i}function Ae(e){return e=e.childContextTypes,e!=null}function Oo(){Y(je),Y(ke)}function Dc(e,t,n){if(ke.current!==Sn)throw Error(N(168));K(ke,t),K(je,n)}function Ep(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var i in r)if(!(i in t))throw Error(N(108,Xg(e)||"Unknown",i));return te({},n,r)}function _o(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Sn,Fn=ke.current,K(ke,e),K(je,je.current),!0}function Fc(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Ep(e,t,Fn),r.__reactInternalMemoizedMergedChildContext=e,Y(je),Y(ke),K(ke,e)):Y(je),K(je,n)}var At=null,is=!1,Qs=!1;function Cp(e){At===null?At=[e]:At.push(e)}function gv(e){is=!0,Cp(e)}function kn(){if(!Qs&&At!==null){Qs=!0;var e=0,t=V;try{var n=At;for(V=1;e>=s,i-=s,Ut=1<<32-ht(t)+i|n<b?(k=C,C=null):k=C.sibling;var E=d(v,C,m[b],S);if(E===null){C===null&&(C=k);break}e&&C&&E.alternate===null&&t(v,C),h=o(E,h,b),O===null?_=E:O.sibling=E,O=E,C=k}if(b===m.length)return n(v,C),J&&_n(v,b),_;if(C===null){for(;bb?(k=C,C=null):k=C.sibling;var I=d(v,C,E.value,S);if(I===null){C===null&&(C=k);break}e&&C&&I.alternate===null&&t(v,C),h=o(I,h,b),O===null?_=I:O.sibling=I,O=I,C=k}if(E.done)return n(v,C),J&&_n(v,b),_;if(C===null){for(;!E.done;b++,E=m.next())E=f(v,E.value,S),E!==null&&(h=o(E,h,b),O===null?_=E:O.sibling=E,O=E);return J&&_n(v,b),_}for(C=r(v,C);!E.done;b++,E=m.next())E=p(C,v,b,E.value,S),E!==null&&(e&&E.alternate!==null&&C.delete(E.key===null?b:E.key),h=o(E,h,b),O===null?_=E:O.sibling=E,O=E);return e&&C.forEach(function(j){return t(v,j)}),J&&_n(v,b),_}function x(v,h,m,S){if(typeof m=="object"&&m!==null&&m.type===Wn&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Li:e:{for(var _=m.key,O=h;O!==null;){if(O.key===_){if(_=m.type,_===Wn){if(O.tag===7){n(v,O.sibling),h=i(O,m.props.children),h.return=v,v=h;break e}}else if(O.elementType===_||typeof _=="object"&&_!==null&&_.$$typeof===Zt&&Bc(_)===O.type){n(v,O.sibling),h=i(O,m.props),h.ref=Mr(v,O,m),h.return=v,v=h;break e}n(v,O);break}else t(v,O);O=O.sibling}m.type===Wn?(h=Ln(m.props.children,v.mode,S,m.key),h.return=v,v=h):(S=fo(m.type,m.key,m.props,null,v.mode,S),S.ref=Mr(v,h,m),S.return=v,v=S)}return s(v);case Kn:e:{for(O=m.key;h!==null;){if(h.key===O)if(h.tag===4&&h.stateNode.containerInfo===m.containerInfo&&h.stateNode.implementation===m.implementation){n(v,h.sibling),h=i(h,m.children||[]),h.return=v,v=h;break e}else{n(v,h);break}else t(v,h);h=h.sibling}h=Js(m,v.mode,S),h.return=v,v=h}return s(v);case Zt:return O=m._init,x(v,h,O(m._payload),S)}if(zr(m))return g(v,h,m,S);if(Tr(m))return y(v,h,m,S);Hi(v,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,h!==null&&h.tag===6?(n(v,h.sibling),h=i(h,m),h.return=v,v=h):(n(v,h),h=Ys(m,v.mode,S),h.return=v,v=h),s(v)):n(v,h)}return x}var gr=Fp(!0),Mp=Fp(!1),Ci={},Rt=Pn(Ci),di=Pn(Ci),pi=Pn(Ci);function Rn(e){if(e===Ci)throw Error(N(174));return e}function Zl(e,t){switch(K(pi,t),K(di,e),K(Rt,Ci),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:xa(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=xa(t,e)}Y(Rt),K(Rt,t)}function mr(){Y(Rt),Y(di),Y(pi)}function jp(e){Rn(pi.current);var t=Rn(Rt.current),n=xa(t,e.type);t!==n&&(K(di,e),K(Rt,n))}function eu(e){di.current===e&&(Y(Rt),Y(di))}var Z=Pn(0);function To(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Hs=[];function tu(){for(var e=0;en?n:4,e(!0);var r=Vs.transition;Vs.transition={};try{e(!1),t()}finally{V=n,Vs.transition=r}}function Zp(){return at().memoizedState}function Sv(e,t,n){var r=hn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},eh(e))th(t,n);else if(n=Tp(e,t,n,r),n!==null){var i=Re();gt(n,e,r,i),nh(n,t,r)}}function wv(e,t,n){var r=hn(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(eh(e))th(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var s=t.lastRenderedState,a=o(s,n);if(i.hasEagerState=!0,i.eagerState=a,vt(a,s)){var l=t.interleaved;l===null?(i.next=i,Jl(t)):(i.next=l.next,l.next=i),t.interleaved=i;return}}catch{}finally{}n=Tp(e,t,i,r),n!==null&&(i=Re(),gt(n,e,r,i),nh(n,t,r))}}function eh(e){var t=e.alternate;return e===ee||t!==null&&t===ee}function th(e,t){Yr=Io=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function nh(e,t,n){if((n&4194240)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,jl(e,n)}}var Lo={readContext:st,useCallback:Se,useContext:Se,useEffect:Se,useImperativeHandle:Se,useInsertionEffect:Se,useLayoutEffect:Se,useMemo:Se,useReducer:Se,useRef:Se,useState:Se,useDebugValue:Se,useDeferredValue:Se,useTransition:Se,useMutableSource:Se,useSyncExternalStore:Se,useId:Se,unstable_isNewReconciler:!1},xv={readContext:st,useCallback:function(e,t){return Ot().memoizedState=[e,t===void 0?null:t],e},useContext:st,useEffect:Hc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,ao(4194308,4,Wp.bind(null,t,e),n)},useLayoutEffect:function(e,t){return ao(4194308,4,e,t)},useInsertionEffect:function(e,t){return ao(4,2,e,t)},useMemo:function(e,t){var n=Ot();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ot();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Sv.bind(null,ee,e),[r.memoizedState,e]},useRef:function(e){var t=Ot();return e={current:e},t.memoizedState=e},useState:Qc,useDebugValue:su,useDeferredValue:function(e){return Ot().memoizedState=e},useTransition:function(){var e=Qc(!1),t=e[0];return e=yv.bind(null,e[1]),Ot().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ee,i=Ot();if(J){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),pe===null)throw Error(N(349));(jn&30)!==0||Up(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Hc(Bp.bind(null,r,o,e),[e]),r.flags|=2048,mi(9,zp.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Ot(),t=pe.identifierPrefix;if(J){var n=zt,r=Ut;n=(r&~(1<<32-ht(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=hi++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=s.createElement(n,{is:r.is}):(e=s.createElement(n),n==="select"&&(s=e,r.multiple?s.multiple=!0:r.size&&(s.size=r.size))):e=s.createElementNS(e,n),e[_t]=t,e[fi]=r,fh(e,t,!1,!1),t.stateNode=e;e:{switch(s=ka(n,r),n){case"dialog":W("cancel",e),W("close",e),i=r;break;case"iframe":case"object":case"embed":W("load",e),i=r;break;case"video":case"audio":for(i=0;iyr&&(t.flags|=128,r=!0,jr(o,!1),t.lanes=4194304)}else{if(!r)if(e=To(s),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),jr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!s.alternate&&!J)return we(t),null}else 2*oe()-o.renderingStartTime>yr&&n!==1073741824&&(t.flags|=128,r=!0,jr(o,!1),t.lanes=4194304);o.isBackwards?(s.sibling=t.child,t.child=s):(n=o.last,n!==null?n.sibling=s:t.child=s,o.last=s)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=oe(),t.sibling=null,n=Z.current,K(Z,r?n&1|2:n&1),t):(we(t),null);case 22:case 23:return du(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&(t.mode&1)!==0?(Qe&1073741824)!==0&&(we(t),t.subtreeFlags&6&&(t.flags|=8192)):we(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Rv(e,t){switch(ql(t),t.tag){case 1:return Ae(t.type)&&Oo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return mr(),Y(je),Y(ke),tu(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return eu(t),null;case 13:if(Y(Z),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));hr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Y(Z),null;case 4:return mr(),null;case 10:return Yl(t.type._context),null;case 22:case 23:return du(),null;case 24:return null;default:return null}}var qi=!1,Pe=!1,Nv=typeof WeakSet=="function"?WeakSet:Set,L=null;function rr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){ne(e,t,r)}else n.current=null}function Ya(e,t,n){try{n()}catch(r){ne(e,t,r)}}var Zc=!1;function Tv(e,t){if(La=wo,e=vp(),Hl(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var s=0,a=-1,l=-1,u=0,c=0,f=e,d=null;t:for(;;){for(var p;f!==n||i!==0&&f.nodeType!==3||(a=s+i),f!==o||r!==0&&f.nodeType!==3||(l=s+r),f.nodeType===3&&(s+=f.nodeValue.length),(p=f.firstChild)!==null;)d=f,f=p;for(;;){if(f===e)break t;if(d===n&&++u===i&&(a=s),d===o&&++c===r&&(l=s),(p=f.nextSibling)!==null)break;f=d,d=f.parentNode}f=p}n=a===-1||l===-1?null:{start:a,end:l}}else n=null}n=n||{start:0,end:0}}else n=null;for(Da={focusedElem:e,selectionRange:n},wo=!1,L=t;L!==null;)if(t=L,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,L=e;else for(;L!==null;){t=L;try{var g=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var y=g.memoizedProps,x=g.memoizedState,v=t.stateNode,h=v.getSnapshotBeforeUpdate(t.elementType===t.type?y:ft(t.type,y),x);v.__reactInternalSnapshotBeforeUpdate=h}break;case 3:var m=t.stateNode.containerInfo;m.nodeType===1?m.textContent="":m.nodeType===9&&m.documentElement&&m.removeChild(m.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(N(163))}}catch(S){ne(t,t.return,S)}if(e=t.sibling,e!==null){e.return=t.return,L=e;break}L=t.return}return g=Zc,Zc=!1,g}function Jr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,o!==void 0&&Ya(t,n,o)}i=i.next}while(i!==r)}}function as(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Ja(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function hh(e){var t=e.alternate;t!==null&&(e.alternate=null,hh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[fi],delete t[ja],delete t[pv],delete t[hv])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function gh(e){return e.tag===5||e.tag===3||e.tag===4}function ef(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||gh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Xa(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=ko));else if(r!==4&&(e=e.child,e!==null))for(Xa(e,t,n),e=e.sibling;e!==null;)Xa(e,t,n),e=e.sibling}function Za(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Za(e,t,n),e=e.sibling;e!==null;)Za(e,t,n),e=e.sibling}var ge=null,dt=!1;function Jt(e,t,n){for(n=n.child;n!==null;)mh(e,t,n),n=n.sibling}function mh(e,t,n){if(bt&&typeof bt.onCommitFiberUnmount=="function")try{bt.onCommitFiberUnmount(Zo,n)}catch{}switch(n.tag){case 5:Pe||rr(n,t);case 6:var r=ge,i=dt;ge=null,Jt(e,t,n),ge=r,dt=i,ge!==null&&(dt?(e=ge,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):ge.removeChild(n.stateNode));break;case 18:ge!==null&&(dt?(e=ge,n=n.stateNode,e.nodeType===8?Bs(e.parentNode,n):e.nodeType===1&&Bs(e,n),si(e)):Bs(ge,n.stateNode));break;case 4:r=ge,i=dt,ge=n.stateNode.containerInfo,dt=!0,Jt(e,t,n),ge=r,dt=i;break;case 0:case 11:case 14:case 15:if(!Pe&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){i=r=r.next;do{var o=i,s=o.destroy;o=o.tag,s!==void 0&&((o&2)!==0||(o&4)!==0)&&Ya(n,t,s),i=i.next}while(i!==r)}Jt(e,t,n);break;case 1:if(!Pe&&(rr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){ne(n,t,a)}Jt(e,t,n);break;case 21:Jt(e,t,n);break;case 22:n.mode&1?(Pe=(r=Pe)||n.memoizedState!==null,Jt(e,t,n),Pe=r):Jt(e,t,n);break;default:Jt(e,t,n)}}function tf(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Nv),t.forEach(function(r){var i=Uv.bind(null,e,r);n.has(r)||(n.add(r),r.then(i,i))})}}function ut(e,t){var n=t.deletions;if(n!==null)for(var r=0;ri&&(i=s),r&=~o}if(r=i,r=oe()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Lv(r/1960))-r,10e?16:e,an===null)var r=!1;else{if(e=an,an=null,Mo=0,(U&6)!==0)throw Error(N(331));var i=U;for(U|=4,L=e.current;L!==null;){var o=L,s=o.child;if((L.flags&16)!==0){var a=o.deletions;if(a!==null){for(var l=0;loe()-cu?In(e,0):uu|=n),$e(e,t)}function Oh(e,t){t===0&&((e.mode&1)===0?t=1:(t=ji,ji<<=1,(ji&130023424)===0&&(ji=4194304)));var n=Re();e=Vt(e,t),e!==null&&(Oi(e,t,n),$e(e,n))}function $v(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Oh(e,n)}function Uv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Oh(e,n)}var _h;_h=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||je.current)Me=!0;else{if((e.lanes&n)===0&&(t.flags&128)===0)return Me=!1,Cv(e,t,n);Me=(e.flags&131072)!==0}else Me=!1,J&&(t.flags&1048576)!==0&&bp(t,Co,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;lo(e,t),e=t.pendingProps;var i=pr(t,ke.current);ur(t,n),i=ru(null,t,r,e,i,n);var o=iu();return t.flags|=1,typeof i=="object"&&i!==null&&typeof i.render=="function"&&i.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ae(r)?(o=!0,_o(t)):o=!1,t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,Xl(t),i.updater=os,t.stateNode=i,i._reactInternals=t,Qa(t,r,e,n),t=qa(null,t,r,!0,o,n)):(t.tag=0,J&&o&&Vl(t),Ce(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(lo(e,t),e=t.pendingProps,i=r._init,r=i(r._payload),t.type=r,i=t.tag=Bv(r),e=ft(r,e),i){case 0:t=Va(null,t,r,e,n);break e;case 1:t=Yc(null,t,r,e,n);break e;case 11:t=Wc(null,t,r,e,n);break e;case 14:t=Gc(null,t,r,ft(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ft(r,i),Va(e,t,r,i,n);case 1:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ft(r,i),Yc(e,t,r,i,n);case 3:e:{if(lh(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,i=o.element,Ip(e,t),No(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){i=vr(Error(N(423)),t),t=Jc(e,t,r,n,i);break e}else if(r!==i){i=vr(Error(N(424)),t),t=Jc(e,t,r,n,i);break e}else for(qe=fn(t.stateNode.containerInfo.firstChild),Ke=t,J=!0,pt=null,n=Mp(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(hr(),r===i){t=qt(e,t,n);break e}Ce(e,t,r,n)}t=t.child}return t;case 5:return jp(t),e===null&&Ua(t),r=t.type,i=t.pendingProps,o=e!==null?e.memoizedProps:null,s=i.children,Fa(r,i)?s=null:o!==null&&Fa(r,o)&&(t.flags|=32),ah(e,t),Ce(e,t,s,n),t.child;case 6:return e===null&&Ua(t),null;case 13:return uh(e,t,n);case 4:return Zl(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=gr(t,null,r,n):Ce(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ft(r,i),Wc(e,t,r,i,n);case 7:return Ce(e,t,t.pendingProps,n),t.child;case 8:return Ce(e,t,t.pendingProps.children,n),t.child;case 12:return Ce(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,K(bo,r._currentValue),r._currentValue=s,o!==null)if(vt(o.value,s)){if(o.children===i.children&&!je.current){t=qt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){s=o.child;for(var l=a.firstContext;l!==null;){if(l.context===r){if(o.tag===1){l=Bt(-1,n&-n),l.tag=2;var u=o.updateQueue;if(u!==null){u=u.shared;var c=u.pending;c===null?l.next=l:(l.next=c.next,c.next=l),u.pending=l}}o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),za(o.return,n,t),a.lanes|=n;break}l=l.next}}else if(o.tag===10)s=o.type===t.type?null:o.child;else if(o.tag===18){if(s=o.return,s===null)throw Error(N(341));s.lanes|=n,a=s.alternate,a!==null&&(a.lanes|=n),za(s,n,t),s=o.sibling}else s=o.child;if(s!==null)s.return=o;else for(s=o;s!==null;){if(s===t){s=null;break}if(o=s.sibling,o!==null){o.return=s.return,s=o;break}s=s.return}o=s}Ce(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,ur(t,n),i=st(i),r=r(i),t.flags|=1,Ce(e,t,r,n),t.child;case 14:return r=t.type,i=ft(r,t.pendingProps),i=ft(r.type,i),Gc(e,t,r,i,n);case 15:return oh(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ft(r,i),lo(e,t),t.tag=1,Ae(r)?(e=!0,_o(t)):e=!1,ur(t,n),Dp(t,r,i),Qa(t,r,i,n),qa(null,t,r,!0,e,n);case 19:return ch(e,t,n);case 22:return sh(e,t,n)}throw Error(N(156,t.tag))};function Eh(e,t){return Xd(e,t)}function zv(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function it(e,t,n,r){return new zv(e,t,n,r)}function hu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Bv(e){if(typeof e=="function")return hu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Ll)return 11;if(e===Dl)return 14}return 2}function gn(e,t){var n=e.alternate;return n===null?(n=it(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function fo(e,t,n,r,i,o){var s=2;if(r=e,typeof e=="function")hu(e)&&(s=1);else if(typeof e=="string")s=5;else e:switch(e){case Wn:return Ln(n.children,i,o,t);case Il:s=8,i|=8;break;case pa:return e=it(12,n,t,i|2),e.elementType=pa,e.lanes=o,e;case ha:return e=it(13,n,t,i),e.elementType=ha,e.lanes=o,e;case ga:return e=it(19,n,t,i),e.elementType=ga,e.lanes=o,e;case Fd:return us(n,i,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ld:s=10;break e;case Dd:s=9;break e;case Ll:s=11;break e;case Dl:s=14;break e;case Zt:s=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=it(s,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Ln(e,t,n,r){return e=it(7,e,r,t),e.lanes=n,e}function us(e,t,n,r){return e=it(22,e,r,t),e.elementType=Fd,e.lanes=n,e.stateNode={isHidden:!1},e}function Ys(e,t,n){return e=it(6,e,null,t),e.lanes=n,e}function Js(e,t,n){return t=it(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Qv(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ts(0),this.expirationTimes=Ts(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ts(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function gu(e,t,n,r,i,o,s,a,l){return e=new Qv(e,t,n,a,l),t===1?(t=1,o===!0&&(t|=8)):t=0,o=it(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Xl(o),e}function Hv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}t(),e.exports=Ye})(bd);var cf=bd.exports;fa.createRoot=cf.createRoot,fa.hydrateRoot=cf.hydrateRoot;var Su={exports:{}},Nh={};/** * @license React * use-sync-external-store-shim.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Sr=P.exports;function Gv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yv=typeof Object.is=="function"?Object.is:Gv,Jv=Sr.useState,Xv=Sr.useEffect,Zv=Sr.useLayoutEffect,ey=Sr.useDebugValue;function ty(e,t){var n=t(),r=Jv({inst:{value:n,getSnapshot:t}}),i=r[0].inst,o=r[1];return Zv(function(){i.value=n,i.getSnapshot=t,Xs(i)&&o({inst:i})},[e,n,t]),Xv(function(){return Xs(i)&&o({inst:i}),e(function(){Xs(i)&&o({inst:i})})},[e]),ey(n),n}function Xs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yv(e,n)}catch{return!0}}function ny(e,t){return t()}var ry=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?ny:ty;Nh.useSyncExternalStore=Sr.useSyncExternalStore!==void 0?Sr.useSyncExternalStore:ry;(function(e){e.exports=Nh})(Su);var hs={exports:{}},gs={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var iy=P.exports,oy=Symbol.for("react.element"),sy=Symbol.for("react.fragment"),ay=Object.prototype.hasOwnProperty,ly=iy.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,uy={key:!0,ref:!0,__self:!0,__source:!0};function Th(e,t,n){var r,i={},o=null,s=null;n!==void 0&&(o=""+n),t.key!==void 0&&(o=""+t.key),t.ref!==void 0&&(s=t.ref);for(r in t)ay.call(t,r)&&!uy.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps,t)i[r]===void 0&&(i[r]=t[r]);return{$$typeof:oy,type:e,key:o,ref:s,props:i,_owner:ly.current}}gs.Fragment=sy;gs.jsx=Th;gs.jsxs=Th;(function(e){e.exports=gs})(hs);const lt=hs.exports.Fragment,w=hs.exports.jsx,R=hs.exports.jsxs;/** * react-query * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */class bi{constructor(){this.listeners=[],this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.push(t),this.onSubscribe(),()=>{this.listeners=this.listeners.filter(n=>n!==t),this.onUnsubscribe()}}hasListeners(){return this.listeners.length>0}onSubscribe(){}onUnsubscribe(){}}const yi=typeof window>"u";function Ze(){}function cy(e,t){return typeof e=="function"?e(t):e}function il(e){return typeof e=="number"&&e>=0&&e!==1/0}function Ih(e,t){return Math.max(e+(t||0)-Date.now(),0)}function po(e,t,n){return ms(e)?typeof t=="function"?{...n,queryKey:e,queryFn:t}:{...t,queryKey:e}:e}function tn(e,t,n){return ms(e)?[{...t,queryKey:e},n]:[e||{},t]}function ff(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:s,stale:a}=e;if(ms(s)){if(r){if(t.queryHash!==wu(s,t.options))return!1}else if(!$o(t.queryKey,s))return!1}if(n!=="all"){const l=t.isActive();if(n==="active"&&!l||n==="inactive"&&l)return!1}return!(typeof a=="boolean"&&t.isStale()!==a||typeof i<"u"&&i!==t.state.fetchStatus||o&&!o(t))}function df(e,t){const{exact:n,fetching:r,predicate:i,mutationKey:o}=e;if(ms(o)){if(!t.options.mutationKey)return!1;if(n){if(Nn(t.options.mutationKey)!==Nn(o))return!1}else if(!$o(t.options.mutationKey,o))return!1}return!(typeof r=="boolean"&&t.state.status==="loading"!==r||i&&!i(t))}function wu(e,t){return((t==null?void 0:t.queryKeyHashFn)||Nn)(e)}function Nn(e){return JSON.stringify(e,(t,n)=>ol(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function $o(e,t){return Lh(e,t)}function Lh(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(n=>!Lh(e[n],t[n])):!1}function Dh(e,t){if(e===t)return e;const n=hf(e)&&hf(t);if(n||ol(e)&&ol(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!gf(n)||!n.hasOwnProperty("isPrototypeOf"))}function gf(e){return Object.prototype.toString.call(e)==="[object Object]"}function ms(e){return Array.isArray(e)}function Fh(e){return new Promise(t=>{setTimeout(t,e)})}function mf(e){Fh(0).then(e)}function fy(){if(typeof AbortController=="function")return new AbortController}function sl(e,t,n){return n.isDataEqual!=null&&n.isDataEqual(e,t)?e:typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?Dh(e,t):t}class dy extends bi{constructor(){super(),this.setup=t=>{if(!yi&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),window.addEventListener("focus",n,!1),()=>{window.removeEventListener("visibilitychange",n),window.removeEventListener("focus",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()})}setFocused(t){this.focused=t,t&&this.onFocus()}onFocus(){this.listeners.forEach(t=>{t()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const Uo=new dy;class py extends bi{constructor(){super(),this.setup=t=>{if(!yi&&window.addEventListener){const n=()=>t();return window.addEventListener("online",n,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",n)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var t;(t=this.cleanup)==null||t.call(this),this.cleanup=void 0}}setEventListener(t){var n;this.setup=t,(n=this.cleanup)==null||n.call(this),this.cleanup=t(r=>{typeof r=="boolean"?this.setOnline(r):this.onOnline()})}setOnline(t){this.online=t,t&&this.onOnline()}onOnline(){this.listeners.forEach(t=>{t()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const zo=new py;function hy(e){return Math.min(1e3*2**e,3e4)}function vs(e){return(e!=null?e:"online")==="online"?zo.isOnline():!0}class Mh{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}}function ho(e){return e instanceof Mh}function jh(e){let t=!1,n=0,r=!1,i,o,s;const a=new Promise((x,v)=>{o=x,s=v}),l=x=>{r||(p(new Mh(x)),e.abort==null||e.abort())},u=()=>{t=!0},c=()=>{t=!1},f=()=>!Uo.isFocused()||e.networkMode!=="always"&&!zo.isOnline(),d=x=>{r||(r=!0,e.onSuccess==null||e.onSuccess(x),i==null||i(),o(x))},p=x=>{r||(r=!0,e.onError==null||e.onError(x),i==null||i(),s(x))},g=()=>new Promise(x=>{i=v=>{if(r||!f())return x(v)},e.onPause==null||e.onPause()}).then(()=>{i=void 0,r||e.onContinue==null||e.onContinue()}),y=()=>{if(r)return;let x;try{x=e.fn()}catch(v){x=Promise.reject(v)}Promise.resolve(x).then(d).catch(v=>{var h,m;if(r)return;const S=(h=e.retry)!=null?h:3,_=(m=e.retryDelay)!=null?m:hy,O=typeof _=="function"?_(n,v):_,C=S===!0||typeof S=="number"&&n{if(f())return g()}).then(()=>{t?p(v):y()})})};return vs(e.networkMode)?y():g().then(y),{promise:a,cancel:l,continue:()=>{i==null||i()},cancelRetry:u,continueRetry:c}}const xu=console;function gy(){let e=[],t=0,n=c=>{c()},r=c=>{c()};const i=c=>{let f;t++;try{f=c()}finally{t--,t||a()}return f},o=c=>{t?e.push(c):mf(()=>{n(c)})},s=c=>(...f)=>{o(()=>{c(...f)})},a=()=>{const c=e;e=[],c.length&&mf(()=>{r(()=>{c.forEach(f=>{n(f)})})})};return{batch:i,batchCalls:s,schedule:o,setNotifyFunction:c=>{n=c},setBatchNotifyFunction:c=>{r=c}}}const ae=gy();class Ah{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),il(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(t){this.cacheTime=Math.max(this.cacheTime||0,t!=null?t:yi?1/0:5*60*1e3)}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class my extends Ah{constructor(t){super(),this.abortSignalConsumed=!1,this.defaultOptions=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.cache=t.cache,this.logger=t.logger||xu,this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.initialState=t.state||vy(this.options),this.state=this.initialState,this.meta=t.meta}setOptions(t){this.options={...this.defaultOptions,...t},this.meta=t==null?void 0:t.meta,this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(t,n){const r=sl(this.state.data,t,this.options);return this.dispatch({data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){this.dispatch({type:"setState",state:t,setStateOptions:n})}cancel(t){var n;const r=this.promise;return(n=this.retryer)==null||n.cancel(t),r?r.then(Ze).catch(Ze):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(t=>t.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(t=>t.getCurrentResult().isStale)}isStaleByTime(t=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!Ih(this.state.dataUpdatedAt,t)}onFocus(){var t;const n=this.observers.find(r=>r.shouldFetchOnWindowFocus());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}onOnline(){var t;const n=this.observers.find(r=>r.shouldFetchOnReconnect());n&&n.refetch({cancelRefetch:!1}),(t=this.retryer)==null||t.continue()}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.indexOf(t)!==-1&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(t,n){var r,i;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&n!=null&&n.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var o;return(o=this.retryer)==null||o.continueRetry(),this.promise}}if(t&&this.setOptions(t),!this.options.queryFn){const p=this.observers.find(g=>g.options.queryFn);p&&this.setOptions(p.options)}Array.isArray(this.options.queryKey);const s=fy(),a={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},l=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>{if(s)return this.abortSignalConsumed=!0,s.signal}})};l(a);const u=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(a)):Promise.reject("Missing queryFn"),c={fetchOptions:n,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:u,meta:this.meta};if(l(c),(r=this.options.behavior)==null||r.onFetch(c),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((i=c.fetchOptions)==null?void 0:i.meta)){var f;this.dispatch({type:"fetch",meta:(f=c.fetchOptions)==null?void 0:f.meta})}const d=p=>{if(ho(p)&&p.silent||this.dispatch({type:"error",error:p}),!ho(p)){var g,y;(g=(y=this.cache.config).onError)==null||g.call(y,p,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=jh({fn:c.fetchFn,abort:s==null?void 0:s.abort.bind(s),onSuccess:p=>{var g,y;if(typeof p>"u"){d(new Error("Query data cannot be undefined"));return}this.setData(p),(g=(y=this.cache.config).onSuccess)==null||g.call(y,p,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:d,onFail:()=>{this.dispatch({type:"failed"})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(t){const n=r=>{var i,o;switch(t.type){case"failed":return{...r,fetchFailureCount:r.fetchFailureCount+1};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,fetchFailureCount:0,fetchMeta:(i=t.meta)!=null?i:null,fetchStatus:vs(this.options.networkMode)?"fetching":"paused",...!r.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:(o=t.dataUpdatedAt)!=null?o:Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0}};case"error":const s=t.error;return ho(s)&&s.revert&&this.revertState?{...this.revertState}:{...r,error:s,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate(t)}),this.cache.notify({query:this,type:"updated",action:t})})}}function vy(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,r=typeof e.initialData<"u"?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0,i=typeof t<"u";return{data:t,dataUpdateCount:0,dataUpdatedAt:i?r!=null?r:Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchMeta:null,isInvalidated:!1,status:i?"success":"loading",fetchStatus:"idle"}}class yy extends bi{constructor(t){super(),this.config=t||{},this.queries=[],this.queriesMap={}}build(t,n,r){var i;const o=n.queryKey,s=(i=n.queryHash)!=null?i:wu(o,n);let a=this.get(s);return a||(a=new my({cache:this,logger:t.getLogger(),queryKey:o,queryHash:s,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(o),meta:n.meta}),this.add(a)),a}add(t){this.queriesMap[t.queryHash]||(this.queriesMap[t.queryHash]=t,this.queries.push(t),this.notify({type:"added",query:t}))}remove(t){const n=this.queriesMap[t.queryHash];n&&(t.destroy(),this.queries=this.queries.filter(r=>r!==t),n===t&&delete this.queriesMap[t.queryHash],this.notify({type:"removed",query:t}))}clear(){ae.batch(()=>{this.queries.forEach(t=>{this.remove(t)})})}get(t){return this.queriesMap[t]}getAll(){return this.queries}find(t,n){const[r]=tn(t,n);return typeof r.exact>"u"&&(r.exact=!0),this.queries.find(i=>ff(r,i))}findAll(t,n){const[r]=tn(t,n);return Object.keys(r).length>0?this.queries.filter(i=>ff(r,i)):this.queries}notify(t){ae.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){ae.batch(()=>{this.queries.forEach(t=>{t.onFocus()})})}onOnline(){ae.batch(()=>{this.queries.forEach(t=>{t.onOnline()})})}}class Sy extends Ah{constructor(t){super(),this.options={...t.defaultOptions,...t.options},this.mutationId=t.mutationId,this.mutationCache=t.mutationCache,this.logger=t.logger||xu,this.observers=[],this.state=t.state||wy(),this.meta=t.meta,this.updateCacheTime(this.options.cacheTime),this.scheduleGc()}setState(t){this.dispatch({type:"setState",state:t})}addObserver(t){this.observers.indexOf(t)===-1&&(this.observers.push(t),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.observers=this.observers.filter(n=>n!==t),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){return this.retryer?(this.retryer.continue(),this.retryer.promise):this.execute()}async execute(){const t=()=>{var m;return this.retryer=jh({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:()=>{this.dispatch({type:"failed"})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(m=this.options.retry)!=null?m:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},n=this.state.status==="loading";try{var r,i,o,s,a,l;if(!n){var u,c,f,d;this.dispatch({type:"loading",variables:this.options.variables}),(u=(c=this.mutationCache.config).onMutate)==null||u.call(c,this.state.variables,this);const S=await((f=(d=this.options).onMutate)==null?void 0:f.call(d,this.state.variables));S!==this.state.context&&this.dispatch({type:"loading",context:S,variables:this.state.variables})}const m=await t();return(r=(i=this.mutationCache.config).onSuccess)==null||r.call(i,m,this.state.variables,this.state.context,this),await((o=(s=this.options).onSuccess)==null?void 0:o.call(s,m,this.state.variables,this.state.context)),await((a=(l=this.options).onSettled)==null?void 0:a.call(l,m,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:m}),m}catch(m){try{var p,g,y,x,v,h;throw(p=(g=this.mutationCache.config).onError)==null||p.call(g,m,this.state.variables,this.state.context,this),await((y=(x=this.options).onError)==null?void 0:y.call(x,m,this.state.variables,this.state.context)),await((v=(h=this.options).onSettled)==null?void 0:v.call(h,void 0,m,this.state.variables,this.state.context)),m}finally{this.dispatch({type:"error",error:m})}}}dispatch(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:r.failureCount+1};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"loading":return{...r,context:t.context,data:void 0,error:null,isPaused:!vs(this.options.networkMode),status:"loading",variables:t.variables};case"success":return{...r,data:t.data,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,isPaused:!1,status:"error"};case"setState":return{...r,...t.state}}};this.state=n(this.state),ae.batch(()=>{this.observers.forEach(r=>{r.onMutationUpdate(t)}),this.mutationCache.notify({mutation:this,type:"updated",action:t})})}}function wy(){return{context:void 0,data:void 0,error:null,failureCount:0,isPaused:!1,status:"idle",variables:void 0}}class xy extends bi{constructor(t){super(),this.config=t||{},this.mutations=[],this.mutationId=0}build(t,n,r){const i=new Sy({mutationCache:this,logger:t.getLogger(),mutationId:++this.mutationId,options:t.defaultMutationOptions(n),state:r,defaultOptions:n.mutationKey?t.getMutationDefaults(n.mutationKey):void 0,meta:n.meta});return this.add(i),i}add(t){this.mutations.push(t),this.notify({type:"added",mutation:t})}remove(t){this.mutations=this.mutations.filter(n=>n!==t),this.notify({type:"removed",mutation:t})}clear(){ae.batch(()=>{this.mutations.forEach(t=>{this.remove(t)})})}getAll(){return this.mutations}find(t){return typeof t.exact>"u"&&(t.exact=!0),this.mutations.find(n=>df(t,n))}findAll(t){return this.mutations.filter(n=>df(t,n))}notify(t){ae.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.mutations.filter(n=>n.state.isPaused);return ae.batch(()=>t.reduce((n,r)=>n.then(()=>r.continue().catch(Ze)),Promise.resolve()))}}function Py(){return{onFetch:e=>{e.fetchFn=()=>{var t,n,r,i,o,s;const a=(t=e.fetchOptions)==null||(n=t.meta)==null?void 0:n.refetchPage,l=(r=e.fetchOptions)==null||(i=r.meta)==null?void 0:i.fetchMore,u=l==null?void 0:l.pageParam,c=(l==null?void 0:l.direction)==="forward",f=(l==null?void 0:l.direction)==="backward",d=((o=e.state.data)==null?void 0:o.pages)||[],p=((s=e.state.data)==null?void 0:s.pageParams)||[];let g=p,y=!1;const x=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var C;if((C=e.signal)!=null&&C.aborted)y=!0;else{var b;(b=e.signal)==null||b.addEventListener("abort",()=>{y=!0})}return e.signal}})},v=e.options.queryFn||(()=>Promise.reject("Missing queryFn")),h=(O,C,b,k)=>(g=k?[C,...g]:[...g,C],k?[b,...O]:[...O,b]),m=(O,C,b,k)=>{if(y)return Promise.reject("Cancelled");if(typeof b>"u"&&!C&&O.length)return Promise.resolve(O);const E={queryKey:e.queryKey,pageParam:b,meta:e.meta};x(E);const I=v(E);return Promise.resolve(I).then(z=>h(O,b,z,k))};let S;if(!d.length)S=m([]);else if(c){const O=typeof u<"u",C=O?u:vf(e.options,d);S=m(d,O,C)}else if(f){const O=typeof u<"u",C=O?u:ky(e.options,d);S=m(d,O,C,!0)}else{g=[];const O=typeof e.options.getNextPageParam>"u";S=(a&&d[0]?a(d[0],0,d):!0)?m([],O,p[0]):Promise.resolve(h([],p[0],d[0]));for(let b=1;b{if(a&&d[b]?a(d[b],b,d):!0){const I=O?p[b]:vf(e.options,k);return m(k,O,I)}return Promise.resolve(h(k,p[b],d[b]))})}return S.then(O=>({pages:O,pageParams:g}))}}}}function vf(e,t){return e.getNextPageParam==null?void 0:e.getNextPageParam(t[t.length-1],t)}function ky(e,t){return e.getPreviousPageParam==null?void 0:e.getPreviousPageParam(t[0],t)}class Oy{constructor(t={}){this.queryCache=t.queryCache||new yy,this.mutationCache=t.mutationCache||new xy,this.logger=t.logger||xu,this.defaultOptions=t.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[]}mount(){this.unsubscribeFocus=Uo.subscribe(()=>{Uo.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=zo.subscribe(()=>{zo.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())})}unmount(){var t,n;(t=this.unsubscribeFocus)==null||t.call(this),(n=this.unsubscribeOnline)==null||n.call(this)}isFetching(t,n){const[r]=tn(t,n);return r.fetchStatus="fetching",this.queryCache.findAll(r).length}isMutating(t){return this.mutationCache.findAll({...t,fetching:!0}).length}getQueryData(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state.data}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:n,state:r})=>{const i=r.data;return[n,i]})}setQueryData(t,n,r){const i=this.queryCache.find(t),o=i==null?void 0:i.state.data,s=cy(n,o);if(typeof s>"u")return;const a=po(t),l=this.defaultQueryOptions(a);return this.queryCache.build(this,l).setData(s,{...r,manual:!0})}setQueriesData(t,n,r){return ae.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,n,r)]))}getQueryState(t,n){var r;return(r=this.queryCache.find(t,n))==null?void 0:r.state}removeQueries(t,n){const[r]=tn(t,n),i=this.queryCache;ae.batch(()=>{i.findAll(r).forEach(o=>{i.remove(o)})})}resetQueries(t,n,r){const[i,o]=tn(t,n,r),s=this.queryCache,a={type:"active",...i};return ae.batch(()=>(s.findAll(i).forEach(l=>{l.reset()}),this.refetchQueries(a,o)))}cancelQueries(t,n,r){const[i,o={}]=tn(t,n,r);typeof o.revert>"u"&&(o.revert=!0);const s=ae.batch(()=>this.queryCache.findAll(i).map(a=>a.cancel(o)));return Promise.all(s).then(Ze).catch(Ze)}invalidateQueries(t,n,r){const[i,o]=tn(t,n,r);return ae.batch(()=>{var s,a;if(this.queryCache.findAll(i).forEach(u=>{u.invalidate()}),i.refetchType==="none")return Promise.resolve();const l={...i,type:(s=(a=i.refetchType)!=null?a:i.type)!=null?s:"active"};return this.refetchQueries(l,o)})}refetchQueries(t,n,r){const[i,o]=tn(t,n,r),s=ae.batch(()=>this.queryCache.findAll(i).filter(l=>!l.isDisabled()).map(l=>{var u;return l.fetch(void 0,{...o,cancelRefetch:(u=o==null?void 0:o.cancelRefetch)!=null?u:!0,meta:{refetchPage:i.refetchPage}})}));let a=Promise.all(s).then(Ze);return o!=null&&o.throwOnError||(a=a.catch(Ze)),a}fetchQuery(t,n,r){const i=po(t,n,r),o=this.defaultQueryOptions(i);typeof o.retry>"u"&&(o.retry=!1);const s=this.queryCache.build(this,o);return s.isStaleByTime(o.staleTime)?s.fetch(o):Promise.resolve(s.state.data)}prefetchQuery(t,n,r){return this.fetchQuery(t,n,r).then(Ze).catch(Ze)}fetchInfiniteQuery(t,n,r){const i=po(t,n,r);return i.behavior=Py(),this.fetchQuery(i)}prefetchInfiniteQuery(t,n,r){return this.fetchInfiniteQuery(t,n,r).then(Ze).catch(Ze)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(t){this.defaultOptions=t}setQueryDefaults(t,n){const r=this.queryDefaults.find(i=>Nn(t)===Nn(i.queryKey));r?r.defaultOptions=n:this.queryDefaults.push({queryKey:t,defaultOptions:n})}getQueryDefaults(t){if(!t)return;const n=this.queryDefaults.find(r=>$o(t,r.queryKey));return n==null?void 0:n.defaultOptions}setMutationDefaults(t,n){const r=this.mutationDefaults.find(i=>Nn(t)===Nn(i.mutationKey));r?r.defaultOptions=n:this.mutationDefaults.push({mutationKey:t,defaultOptions:n})}getMutationDefaults(t){if(!t)return;const n=this.mutationDefaults.find(r=>$o(t,r.mutationKey));return n==null?void 0:n.defaultOptions}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const n={...this.defaultOptions.queries,...this.getQueryDefaults(t==null?void 0:t.queryKey),...t,_defaulted:!0};return!n.queryHash&&n.queryKey&&(n.queryHash=wu(n.queryKey,n)),typeof n.refetchOnReconnect>"u"&&(n.refetchOnReconnect=n.networkMode!=="always"),typeof n.useErrorBoundary>"u"&&(n.useErrorBoundary=!!n.suspense),n}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...this.defaultOptions.mutations,...this.getMutationDefaults(t==null?void 0:t.mutationKey),...t,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class _y extends bi{constructor(t,n){super(),this.client=t,this.options=n,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(n)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.length===1&&(this.currentQuery.addObserver(this),yf(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.listeners.length||this.destroy()}shouldFetchOnReconnect(){return al(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return al(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=[],this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(t,n){const r=this.options,i=this.currentQuery;if(this.options=this.client.defaultQueryOptions(t),pf(r,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=r.queryKey),this.updateQuery();const o=this.hasListeners();o&&Sf(this.currentQuery,i,this.options,r)&&this.executeFetch(),this.updateResult(n),o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||this.options.staleTime!==r.staleTime)&&this.updateStaleTimeout();const s=this.computeRefetchInterval();o&&(this.currentQuery!==i||this.options.enabled!==r.enabled||s!==this.currentRefetchInterval)&&this.updateRefetchInterval(s)}getOptimisticResult(t){const n=this.client.getQueryCache().build(this.client,t);return this.createResult(n,t)}getCurrentResult(){return this.currentResult}trackResult(t){const n={};return Object.keys(t).forEach(r=>{Object.defineProperty(n,r,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(r),t[r])})}),n}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:t,...n}={}){return this.fetch({...n,meta:{refetchPage:t}})}fetchOptimistic(t){const n=this.client.defaultQueryOptions(t),r=this.client.getQueryCache().build(this.client,n);return r.isFetchingOptimistic=!0,r.fetch().then(()=>this.createResult(r,n))}fetch(t){var n;return this.executeFetch({...t,cancelRefetch:(n=t.cancelRefetch)!=null?n:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(t){this.updateQuery();let n=this.currentQuery.fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Ze)),n}updateStaleTimeout(){if(this.clearStaleTimeout(),yi||this.currentResult.isStale||!il(this.options.staleTime))return;const n=Ih(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},n)}computeRefetchInterval(){var t;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(t=this.options.refetchInterval)!=null?t:!1}updateRefetchInterval(t){this.clearRefetchInterval(),this.currentRefetchInterval=t,!(yi||this.options.enabled===!1||!il(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||Uo.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(t,n){const r=this.currentQuery,i=this.options,o=this.currentResult,s=this.currentResultState,a=this.currentResultOptions,l=t!==r,u=l?t.state:this.currentQueryInitialState,c=l?this.currentResult:this.previousQueryResult,{state:f}=t;let{dataUpdatedAt:d,error:p,errorUpdatedAt:g,fetchStatus:y,status:x}=f,v=!1,h=!1,m;if(n._optimisticResults){const O=this.hasListeners(),C=!O&&yf(t,n),b=O&&Sf(t,r,n,i);(C||b)&&(y=vs(t.options.networkMode)?"fetching":"paused",d||(x="loading")),n._optimisticResults==="isRestoring"&&(y="idle")}if(n.keepPreviousData&&!f.dataUpdateCount&&c!=null&&c.isSuccess&&x!=="error")m=c.data,d=c.dataUpdatedAt,x=c.status,v=!0;else if(n.select&&typeof f.data<"u")if(o&&f.data===(s==null?void 0:s.data)&&n.select===this.selectFn)m=this.selectResult;else try{this.selectFn=n.select,m=n.select(f.data),m=sl(o==null?void 0:o.data,m,n),this.selectResult=m,this.selectError=null}catch(O){this.selectError=O}else m=f.data;if(typeof n.placeholderData<"u"&&typeof m>"u"&&x==="loading"){let O;if(o!=null&&o.isPlaceholderData&&n.placeholderData===(a==null?void 0:a.placeholderData))O=o.data;else if(O=typeof n.placeholderData=="function"?n.placeholderData():n.placeholderData,n.select&&typeof O<"u")try{O=n.select(O),O=sl(o==null?void 0:o.data,O,n),this.selectError=null}catch(C){this.selectError=C}typeof O<"u"&&(x="success",m=O,h=!0)}this.selectError&&(p=this.selectError,m=this.selectResult,g=Date.now(),x="error");const S=y==="fetching";return{status:x,fetchStatus:y,isLoading:x==="loading",isSuccess:x==="success",isError:x==="error",data:m,dataUpdatedAt:d,error:p,errorUpdatedAt:g,failureCount:f.fetchFailureCount,errorUpdateCount:f.errorUpdateCount,isFetched:f.dataUpdateCount>0||f.errorUpdateCount>0,isFetchedAfterMount:f.dataUpdateCount>u.dataUpdateCount||f.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&x!=="loading",isLoadingError:x==="error"&&f.dataUpdatedAt===0,isPaused:y==="paused",isPlaceholderData:h,isPreviousData:v,isRefetchError:x==="error"&&f.dataUpdatedAt!==0,isStale:Pu(t,n),refetch:this.refetch,remove:this.remove}}updateResult(t){const n=this.currentResult,r=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,pf(r,n))return;this.currentResult=r;const i={cache:!0},o=()=>{if(!n)return!0;const{notifyOnChangeProps:s}=this.options;if(s==="all"||!s&&!this.trackedProps.size)return!0;const a=new Set(s!=null?s:this.trackedProps);return this.options.useErrorBoundary&&a.add("error"),Object.keys(this.currentResult).some(l=>{const u=l;return this.currentResult[u]!==n[u]&&a.has(u)})};(t==null?void 0:t.listeners)!==!1&&o()&&(i.listeners=!0),this.notify({...i,...t})}updateQuery(){const t=this.client.getQueryCache().build(this.client,this.options);if(t===this.currentQuery)return;const n=this.currentQuery;this.currentQuery=t,this.currentQueryInitialState=t.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))}onQueryUpdate(t){const n={};t.type==="success"?n.onSuccess=!t.manual:t.type==="error"&&!ho(t.error)&&(n.onError=!0),this.updateResult(n),this.hasListeners()&&this.updateTimers()}notify(t){ae.batch(()=>{if(t.onSuccess){var n,r,i,o;(n=(r=this.options).onSuccess)==null||n.call(r,this.currentResult.data),(i=(o=this.options).onSettled)==null||i.call(o,this.currentResult.data,null)}else if(t.onError){var s,a,l,u;(s=(a=this.options).onError)==null||s.call(a,this.currentResult.error),(l=(u=this.options).onSettled)==null||l.call(u,void 0,this.currentResult.error)}t.listeners&&this.listeners.forEach(c=>{c(this.currentResult)}),t.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function Ey(e,t){return t.enabled!==!1&&!e.state.dataUpdatedAt&&!(e.state.status==="error"&&t.retryOnMount===!1)}function yf(e,t){return Ey(e,t)||e.state.dataUpdatedAt>0&&al(e,t,t.refetchOnMount)}function al(e,t,n){if(t.enabled!==!1){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&Pu(e,t)}return!1}function Sf(e,t,n,r){return n.enabled!==!1&&(e!==t||r.enabled===!1)&&(!n.suspense||e.state.status!=="error")&&Pu(e,n)}function Pu(e,t){return e.isStaleByTime(t.staleTime)}const wf=P.exports.createContext(void 0),$h=P.exports.createContext(!1);function Uh(e,t){return e||(t&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=wf),window.ReactQueryClientContext):wf)}const zh=({context:e}={})=>{const t=P.exports.useContext(Uh(e,P.exports.useContext($h)));if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Cy=({client:e,children:t,context:n,contextSharing:r=!1})=>{P.exports.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]);const i=Uh(n,r);return w($h.Provider,{value:!n&&r,children:w(i.Provider,{value:e,children:t})})},Bh=P.exports.createContext(!1),by=()=>P.exports.useContext(Bh);Bh.Provider;function Ry(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const Ny=P.exports.createContext(Ry()),Ty=()=>P.exports.useContext(Ny);function Iy(e,t){return typeof e=="function"?e(...t):!!e}function Ly(e,t){const n=zh({context:e.context}),r=by(),i=Ty(),o=n.defaultQueryOptions(e);o._optimisticResults=r?"isRestoring":"optimistic",o.onError&&(o.onError=ae.batchCalls(o.onError)),o.onSuccess&&(o.onSuccess=ae.batchCalls(o.onSuccess)),o.onSettled&&(o.onSettled=ae.batchCalls(o.onSettled)),o.suspense&&typeof o.staleTime!="number"&&(o.staleTime=1e3),(o.suspense||o.useErrorBoundary)&&(i.isReset()||(o.retryOnMount=!1));const[s]=P.exports.useState(()=>new t(n,o)),a=s.getOptimisticResult(o);if(Su.exports.useSyncExternalStore(P.exports.useCallback(l=>r?()=>{}:s.subscribe(ae.batchCalls(l)),[s,r]),()=>s.getCurrentResult(),()=>s.getCurrentResult()),P.exports.useEffect(()=>{i.clearReset()},[i]),P.exports.useEffect(()=>{s.setOptions(o,{listeners:!1})},[o,s]),o.suspense&&a.isLoading&&a.isFetching&&!r)throw s.fetchOptimistic(o).then(({data:l})=>{o.onSuccess==null||o.onSuccess(l),o.onSettled==null||o.onSettled(l,null)}).catch(l=>{i.clearReset(),o.onError==null||o.onError(l),o.onSettled==null||o.onSettled(void 0,l)});if(a.isError&&!i.isReset()&&!a.isFetching&&Iy(o.useErrorBoundary,[a.error,s.getCurrentQuery()]))throw a.error;return o.notifyOnChangeProps?a:s.trackResult(a)}function wr(e,t,n){const r=po(e,t,n);return Ly(r,_y)}/** * react-query-devtools-noop * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function Dy(){return null}function rt(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;r3?t.i-4:t.i:Array.isArray(e)?1:ku(e)?2:Ou(e)?3:0}function ll(e,t){return Nr(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Fy(e,t){return Nr(e)===2?e.get(t):e[t]}function Qh(e,t,n){var r=Nr(e);r===2?e.set(t,n):r===3?(e.delete(t),e.add(n)):e[t]=n}function My(e,t){return e===t?e!==0||1/e==1/t:e!=e&&t!=t}function ku(e){return By&&e instanceof Map}function Ou(e){return Qy&&e instanceof Set}function fe(e){return e.o||e.t}function _u(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=Vy(e);delete t[Q];for(var n=Ru(t),r=0;r1&&(e.set=e.add=e.clear=e.delete=jy),Object.freeze(e),t&&Pr(e,function(n,r){return Eu(r,!0)},!0)),e}function jy(){rt(2)}function Cu(e){return e==null||typeof e!="object"||Object.isFrozen(e)}function Nt(e){var t=cl[e];return t||rt(18,e),t}function Ay(e,t){cl[e]||(cl[e]=t)}function Bo(){return wi}function Zs(e,t){t&&(Nt("Patches"),e.u=[],e.s=[],e.v=t)}function Qo(e){ul(e),e.p.forEach($y),e.p=null}function ul(e){e===wi&&(wi=e.l)}function xf(e){return wi={p:[],l:wi,h:e,m:!0,_:0}}function $y(e){var t=e[Q];t.i===0||t.i===1?t.j():t.O=!0}function ea(e,t){t._=t.p.length;var n=t.p[0],r=e!==void 0&&e!==n;return t.h.g||Nt("ES5").S(t,e,r),r?(n[Q].P&&(Qo(t),rt(4)),Kt(e)&&(e=Ho(t,e),t.l||Vo(t,e)),t.u&&Nt("Patches").M(n[Q].t,e,t.u,t.s)):e=Ho(t,n,[]),Qo(t),t.u&&t.v(t.u,t.s),e!==Hh?e:void 0}function Ho(e,t,n){if(Cu(t))return t;var r=t[Q];if(!r)return Pr(t,function(o,s){return Pf(e,r,t,o,s,n)},!0),t;if(r.A!==e)return t;if(!r.P)return Vo(e,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=r.i===4||r.i===5?r.o=_u(r.k):r.o;Pr(r.i===3?new Set(i):i,function(o,s){return Pf(e,r,i,o,s,n)}),Vo(e,i,!1),n&&e.u&&Nt("Patches").R(r,n,e.u,e.s)}return r.o}function Pf(e,t,n,r,i,o){if(xr(i)){var s=Ho(e,i,o&&t&&t.i!==3&&!ll(t.D,r)?o.concat(r):void 0);if(Qh(n,r,s),!xr(s))return;e.m=!1}if(Kt(i)&&!Cu(i)){if(!e.h.F&&e._<1)return;Ho(e,i),t&&t.A.l||Vo(e,i)}}function Vo(e,t,n){n===void 0&&(n=!1),e.h.F&&e.m&&Eu(t,n)}function ta(e,t){var n=e[Q];return(n?fe(n):e)[t]}function kf(e,t){if(t in e)for(var n=Object.getPrototypeOf(e);n;){var r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Object.getPrototypeOf(n)}}function $t(e){e.P||(e.P=!0,e.l&&$t(e.l))}function na(e){e.o||(e.o=_u(e.t))}function Si(e,t,n){var r=ku(t)?Nt("MapSet").N(t,n):Ou(t)?Nt("MapSet").T(t,n):e.g?function(i,o){var s=Array.isArray(i),a={i:s?1:0,A:o?o.A:Bo(),P:!1,I:!1,D:{},l:o,t:i,k:null,o:null,j:null,C:!1},l=a,u=fl;s&&(l=[a],u=Hr);var c=Proxy.revocable(l,u),f=c.revoke,d=c.proxy;return a.k=d,a.j=f,d}(t,n):Nt("ES5").J(t,n);return(n?n.A:Bo()).p.push(r),r}function Uy(e){return xr(e)||rt(22,e),function t(n){if(!Kt(n))return n;var r,i=n[Q],o=Nr(n);if(i){if(!i.P&&(i.i<4||!Nt("ES5").K(i)))return i.t;i.I=!0,r=Of(n,o),i.I=!1}else r=Of(n,o);return Pr(r,function(s,a){i&&Fy(i.t,s)===a||Qh(r,s,t(a))}),o===3?new Set(r):r}(e)}function Of(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return _u(e)}function zy(){function e(a,l){function u(){this.constructor=a}i(a,l),a.prototype=(u.prototype=l.prototype,new u)}function t(a){a.o||(a.D=new Map,a.o=new Map(a.t))}function n(a){a.o||(a.o=new Set,a.t.forEach(function(l){if(Kt(l)){var u=Si(a.A.h,l,a);a.p.set(l,u),a.o.add(u)}else a.o.add(l)}))}function r(a){a.O&&rt(3,JSON.stringify(fe(a)))}var i=function(a,l){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(u,c){u.__proto__=c}||function(u,c){for(var f in c)c.hasOwnProperty(f)&&(u[f]=c[f])})(a,l)},o=function(){function a(u,c){return this[Q]={i:2,l:c,A:c?c.A:Bo(),P:!1,I:!1,o:void 0,D:void 0,t:u,k:this,C:!1,O:!1},this}e(a,Map);var l=a.prototype;return Object.defineProperty(l,"size",{get:function(){return fe(this[Q]).size}}),l.has=function(u){return fe(this[Q]).has(u)},l.set=function(u,c){var f=this[Q];return r(f),fe(f).has(u)&&fe(f).get(u)===c||(t(f),$t(f),f.D.set(u,!0),f.o.set(u,c),f.D.set(u,!0)),this},l.delete=function(u){if(!this.has(u))return!1;var c=this[Q];return r(c),t(c),$t(c),c.t.has(u)?c.D.set(u,!1):c.D.delete(u),c.o.delete(u),!0},l.clear=function(){var u=this[Q];r(u),fe(u).size&&(t(u),$t(u),u.D=new Map,Pr(u.t,function(c){u.D.set(c,!1)}),u.o.clear())},l.forEach=function(u,c){var f=this;fe(this[Q]).forEach(function(d,p){u.call(c,f.get(p),p,f)})},l.get=function(u){var c=this[Q];r(c);var f=fe(c).get(u);if(c.I||!Kt(f)||f!==c.t.get(u))return f;var d=Si(c.A.h,f,c);return t(c),c.o.set(u,d),d},l.keys=function(){return fe(this[Q]).keys()},l.values=function(){var u,c=this,f=this.keys();return(u={})[Gi]=function(){return c.values()},u.next=function(){var d=f.next();return d.done?d:{done:!1,value:c.get(d.value)}},u},l.entries=function(){var u,c=this,f=this.keys();return(u={})[Gi]=function(){return c.entries()},u.next=function(){var d=f.next();if(d.done)return d;var p=c.get(d.value);return{done:!1,value:[d.value,p]}},u},l[Gi]=function(){return this.entries()},a}(),s=function(){function a(u,c){return this[Q]={i:3,l:c,A:c?c.A:Bo(),P:!1,I:!1,o:void 0,t:u,k:this,p:new Map,O:!1,C:!1},this}e(a,Set);var l=a.prototype;return Object.defineProperty(l,"size",{get:function(){return fe(this[Q]).size}}),l.has=function(u){var c=this[Q];return r(c),c.o?!!c.o.has(u)||!(!c.p.has(u)||!c.o.has(c.p.get(u))):c.t.has(u)},l.add=function(u){var c=this[Q];return r(c),this.has(u)||(n(c),$t(c),c.o.add(u)),this},l.delete=function(u){if(!this.has(u))return!1;var c=this[Q];return r(c),n(c),$t(c),c.o.delete(u)||!!c.p.has(u)&&c.o.delete(c.p.get(u))},l.clear=function(){var u=this[Q];r(u),fe(u).size&&(n(u),$t(u),u.o.clear())},l.values=function(){var u=this[Q];return r(u),n(u),u.o.values()},l.entries=function(){var u=this[Q];return r(u),n(u),u.o.entries()},l.keys=function(){return this.values()},l[Gi]=function(){return this.values()},l.forEach=function(u,c){for(var f=this.values(),d=f.next();!d.done;)u.call(c,d.value,d.value,this),d=f.next()},a}();Ay("MapSet",{N:function(a,l){return new o(a,l)},T:function(a,l){return new s(a,l)}})}var _f,wi,bu=typeof Symbol<"u"&&typeof Symbol("x")=="symbol",By=typeof Map<"u",Qy=typeof Set<"u",Ef=typeof Proxy<"u"&&Proxy.revocable!==void 0&&typeof Reflect<"u",Hh=bu?Symbol.for("immer-nothing"):((_f={})["immer-nothing"]=!0,_f),Cf=bu?Symbol.for("immer-draftable"):"__$immer_draftable",Q=bu?Symbol.for("immer-state"):"__$immer_state",Gi=typeof Symbol<"u"&&Symbol.iterator||"@@iterator",Hy=""+Object.prototype.constructor,Ru=typeof Reflect<"u"&&Reflect.ownKeys?Reflect.ownKeys:Object.getOwnPropertySymbols!==void 0?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,Vy=Object.getOwnPropertyDescriptors||function(e){var t={};return Ru(e).forEach(function(n){t[n]=Object.getOwnPropertyDescriptor(e,n)}),t},cl={},fl={get:function(e,t){if(t===Q)return e;var n=fe(e);if(!ll(n,t))return function(i,o,s){var a,l=kf(o,s);return l?"value"in l?l.value:(a=l.get)===null||a===void 0?void 0:a.call(i.k):void 0}(e,n,t);var r=n[t];return e.I||!Kt(r)?r:r===ta(e.t,t)?(na(e),e.o[t]=Si(e.A.h,r,e)):r},has:function(e,t){return t in fe(e)},ownKeys:function(e){return Reflect.ownKeys(fe(e))},set:function(e,t,n){var r=kf(fe(e),t);if(r!=null&&r.set)return r.set.call(e.k,n),!0;if(!e.P){var i=ta(fe(e),t),o=i==null?void 0:i[Q];if(o&&o.t===n)return e.o[t]=n,e.D[t]=!1,!0;if(My(n,i)&&(n!==void 0||ll(e.t,t)))return!0;na(e),$t(e)}return e.o[t]===n&&typeof n!="number"&&(n!==void 0||t in e.o)||(e.o[t]=n,e.D[t]=!0,!0)},deleteProperty:function(e,t){return ta(e.t,t)!==void 0||t in e.t?(e.D[t]=!1,na(e),$t(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var n=fe(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.i!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty:function(){rt(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){rt(12)}},Hr={};Pr(fl,function(e,t){Hr[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Hr.deleteProperty=function(e,t){return Hr.set.call(this,e,t,void 0)},Hr.set=function(e,t,n){return fl.set.call(this,e[0],t,n,e[0])};var qy=function(){function e(n){var r=this;this.g=Ef,this.F=!0,this.produce=function(i,o,s){if(typeof i=="function"&&typeof o!="function"){var a=o;o=i;var l=r;return function(y){var x=this;y===void 0&&(y=a);for(var v=arguments.length,h=Array(v>1?v-1:0),m=1;m1?c-1:0),d=1;d=0;i--){var o=r[i];if(o.path.length===0&&o.op==="replace"){n=o.value;break}}i>-1&&(r=r.slice(i+1));var s=Nt("Patches").$;return xr(n)?s(n,r):this.produce(n,function(a){return s(a,r)})},e}(),Ge=new qy,A=Ge.produce;Ge.produceWithPatches.bind(Ge);Ge.setAutoFreeze.bind(Ge);Ge.setUseProxies.bind(Ge);Ge.applyPatches.bind(Ge);Ge.createDraft.bind(Ge);Ge.finishDraft.bind(Ge);function kr(){return kr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(n),e=e.substr(0,n));var r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}/** * react-location * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function mt(){return mt=Object.assign||function(e){for(var t=1;t=0)&&(n[i]=e[i]);return n}function Yy(e,t){var n,r,i,o="";for(n in e)if((i=e[n])!==void 0)if(Array.isArray(i))for(r=0;rGh?Wy():Gy();class Nu{constructor(){this.listeners=[]}subscribe(t){return this.listeners.push(t),()=>{this.listeners=this.listeners.filter(n=>n!==t)}}notify(){this.listeners.forEach(t=>t())}}class n0 extends Nu{constructor(t){var n,r;super(),this.isTransitioning=!1,this.history=(t==null?void 0:t.history)||t0(),this.stringifySearch=(n=t==null?void 0:t.stringifySearch)!=null?n:g0,this.parseSearch=(r=t==null?void 0:t.parseSearch)!=null?r:h0,this.current=this.parseLocation(this.history.location),this.destroy=this.history.listen(i=>{this.current=this.parseLocation(i.location,this.current),this.notify()})}buildNext(t,n){var r,i,o,s;t===void 0&&(t="/"),n===void 0&&(n={});const a=mt({},this.current,n.from),l=p0(t,a.pathname,""+((r=n.to)!=null?r:".")),u=(i=n.__searchFilters)!=null&&i.length?n.__searchFilters.reduce((g,y)=>y(g),a.search):a.search,c=n.search===!0?u:n.search?(o=Df(n.search,u))!=null?o:{}:(s=n.__searchFilters)!=null&&s.length?u:{},f=ml(a.search,c),d=this.stringifySearch(f);let p=n.hash===!0?a.hash:Df(n.hash,a.hash);return p=p?"#"+p:"",{pathname:l,search:f,searchStr:d,hash:p,href:""+l+d+p,key:n.key}}navigate(t,n){this.current=t,this.navigateTimeout&&clearTimeout(this.navigateTimeout);let r="replace";return n||(r="push"),this.parseLocation(this.history.location).href===this.current.href&&!this.current.key&&(r="replace"),r==="replace"?this.history.replace({pathname:this.current.pathname,hash:this.current.hash,search:this.current.searchStr}):this.history.push({pathname:this.current.pathname,hash:this.current.hash,search:this.current.searchStr})}parseLocation(t,n){var r;const i=this.parseSearch(t.search);return{pathname:t.pathname,searchStr:t.search,search:ml(n==null?void 0:n.search,i),hash:(r=t.hash.split("#").reverse()[0])!=null?r:"",href:""+t.pathname+t.search+t.hash,key:t.key}}}function Yh(e){return w(Kh.Provider,{...e})}function r0(e){let{children:t,location:n,__experimental__snapshot:r}=e,i=hl(e,Xy);const o=P.exports.useRef(null);o.current||(o.current=new o0({location:n,__experimental__snapshot:r,routes:i.routes}));const s=o.current,[a,l]=P.exports.useReducer(()=>({}),{});return s.update(i),gl(()=>s.subscribe(()=>{l()}),[]),gl(()=>s.updateLocation(n.current).unsubscribe,[n.current.key]),P.exports.createElement(qh.Provider,{value:{location:n}},P.exports.createElement(Wh.Provider,{value:{router:s}},w(i0,{}),w(Yh,{value:[s.rootMatch,...s.state.matches],children:t!=null?t:w(ng,{})})))}function i0(){const e=Tu(),t=tg(),n=l0();return gl(()=>{t({to:".",search:!0,hash:!0}).href!==e.current.href&&n({to:".",search:!0,hash:!0,fromCurrent:!0,replace:!0})},[]),null}class o0 extends Nu{constructor(t){var n;let{location:r,__experimental__snapshot:i}=t,o=hl(t,Zy);super(),this.routesById={},this.update=a=>{let{basepath:l,routes:u}=a,c=hl(a,e0);Object.assign(this,c),this.basepath=ys("/"+(l!=null?l:"")),this.routesById={};const f=(d,p)=>d.map(g=>{var y,x,v,h;const m=(y=g.path)!=null?y:"*",S=Or([(p==null?void 0:p.id)==="root"?"":p==null?void 0:p.id,""+(m==null?void 0:m.replace(/(.)\/$/,"$1"))+(g.id?"-"+g.id:"")]);if(g=mt({},g,{pendingMs:(x=g.pendingMs)!=null?x:c==null?void 0:c.defaultPendingMs,pendingMinMs:(v=g.pendingMinMs)!=null?v:c==null?void 0:c.defaultPendingMinMs,id:S}),this.routesById[S])throw new Error;return this.routesById[S]=g,g.children=(h=g.children)!=null&&h.length?f(g.children,g):void 0,g});this.routes=f(u),this.rootMatch={id:"root",params:{},search:{},pathname:this.basepath,route:null,ownData:{},data:{},isLoading:!1,status:"resolved"}},this.setState=a=>{const l=a({state:this.state,pending:this.pending});this.state=l.state,this.pending=l.pending,this.cleanMatchCache(),this.notify()},this.matchCache={},this.cleanMatchCache=()=>{var a,l,u;const c=[...(a=this==null?void 0:this.state.matches)!=null?a:[],...(l=this==null||(u=this.pending)==null?void 0:u.matches)!=null?l:[]].map(f=>f.id);Object.values(this.matchCache).forEach(f=>{var d;if(!f.updatedAt||c.includes(f.id))return;const p=Date.now()-((d=f.updatedAt)!=null?d:0);(!f.maxAge||p>f.maxAge)&&(f.route.unloader&&f.route.unloader(f),delete this.matchCache[f.id])})},this.updateLocation=a=>{let l;return{promise:new Promise(c=>{const f=new If(this,a);this.setState(d=>mt({},d,{pending:{location:f.location,matches:f.matches}})),l=f.subscribe(()=>{const d=this.state.matches;d.filter(p=>!f.matches.find(g=>g.id===p.id)).forEach(p=>{p.onExit==null||p.onExit(p)}),d.filter(p=>f.matches.find(g=>g.id===p.id)).forEach(p=>{p.route.onTransition==null||p.route.onTransition(p)}),f.matches.filter(p=>!d.find(g=>g.id===p.id)).forEach(p=>{p.onExit=p.route.onMatch==null?void 0:p.route.onMatch(p)}),this.setState(p=>mt({},p,{state:{location:f.location,matches:f.matches},pending:void 0})),c()}),f.loadData(),f.startPending()}),unsubscribe:l}},this.__experimental__createSnapshot=()=>({location:this.state.location,matches:this.state.matches.map(a=>{let{ownData:l,id:u}=a;return{id:u,ownData:l}})}),this.update(o);let s=[];if(i){const a=new If(this,r.current);a.matches.forEach((l,u)=>{var c,f,d;if(l.id!==((c=i.matches[u])==null?void 0:c.id)){var p;throw new Error("Router hydration mismatch: "+l.id+" !== "+((p=i.matches[u])==null?void 0:p.id))}l.ownData=(f=(d=i.matches[u])==null?void 0:d.ownData)!=null?f:{}}),Jh(a.matches),s=a.matches}this.state={location:(n=i==null?void 0:i.location)!=null?n:r.current,matches:s},r.subscribe(()=>this.notify())}}function Tu(){const e=P.exports.useContext(qh);return rg(!!e,"useLocation must be used within a "),e.location}class s0{constructor(t){this.status="loading",this.ownData={},this.data={},this.isLoading=!1,this.notify=n=>{var r;(r=this.matchLoader)==null||r.preNotify(n?this:void 0)},this.assignMatchLoader=n=>{this.matchLoader=n},this.startPending=()=>{this.pendingTimeout&&clearTimeout(this.pendingTimeout),this.route.pendingMs!==void 0&&(this.pendingTimeout=setTimeout(()=>{var n;this.status==="loading"&&(this.status="pending"),(n=this.notify)==null||n.call(this),typeof this.route.pendingMinMs<"u"&&(this.pendingMinPromise=new Promise(r=>setTimeout(r,this.route.pendingMinMs)))},this.route.pendingMs))},this.load=n=>{var r,i;if(this.maxAge=(r=(i=n.maxAge)!=null?i:this.route.loaderMaxAge)!=null?r:n.router.defaultLoaderMaxAge,this.loaderPromise)return;const o=this.route.import;this.loaderPromise=(o?(()=>(this.isLoading=!0,o({params:this.params,search:this.search}).then(s=>{this.route=mt({},this.route,s)})))():Promise.resolve()).then(()=>{const s=[];["element","errorElement","pendingElement"].forEach(c=>{const f=this.route[c];this[c]||(typeof f=="function"?(this.isLoading=!0,s.push(f(this).then(d=>{this[c]=d}))):this[c]=this.route[c])});const l=this.route.loader,u=l?new Promise(async c=>{this.isLoading=!0;const f=g=>{this.updatedAt=Date.now(),c(this.ownData),this.status=g},d=g=>{this.ownData=g,this.error=void 0,f("resolved")},p=g=>{console.error(g),this.error=g,f("rejected")};try{d(await l(this,{parentMatch:n.parentMatch,dispatch:async g=>{var y;g.type==="resolve"?d(g.data):g.type==="reject"?p(g.error):g.type==="loading"?this.isLoading=!0:g.type==="maxAge"&&(this.maxAge=g.maxAge),this.updatedAt=Date.now(),(y=this.notify)==null||y.call(this,!0)}}))}catch(g){p(g)}}):Promise.resolve();return Promise.all([...s,u]).then(()=>{this.status="resolved",this.isLoading=!1,this.startPending=void 0}).then(()=>this.pendingMinPromise).then(()=>{var c;this.pendingTimeout&&clearTimeout(this.pendingTimeout),(c=this.notify)==null||c.call(this,!0)})}).then(()=>this.ownData)},Object.assign(this,t)}}class If extends Nu{constructor(t,n){var r;super(),r=this,this.preNotifiedMatches=[],this.status="pending",this.preNotify=o=>{o&&(this.preNotifiedMatches.includes(o)||this.preNotifiedMatches.push(o)),(!o||this.preNotifiedMatches.length===this.matches.length)&&(this.status="resolved",Jh(this.matches),this.notify())},this.loadData=async function(o){var s;let{maxAge:a}=o===void 0?{}:o;if(r.router.cleanMatchCache(),!((s=r.matches)!=null&&s.length)){r.preNotify();return}return r.firstRenderPromises=[],r.matches.forEach((l,u)=>{var c,f;const d=(c=r.matches)==null?void 0:c[u-1];l.assignMatchLoader==null||l.assignMatchLoader(r),l.load==null||l.load({maxAge:a,parentMatch:d,router:r.router}),(f=r.firstRenderPromises)==null||f.push(l.loaderPromise)}),await Promise.all(r.firstRenderPromises).then(()=>(r.preNotify(),r.matches))},this.load=async function(o){let{maxAge:s}=o===void 0?{}:o;return await r.loadData({maxAge:s})},this.startPending=async()=>{this.matches.forEach(o=>o.startPending==null?void 0:o.startPending())},this.router=t,this.location=n,this.matches=[];const i=Zh(this.router,this.location);this.matches=i==null?void 0:i.map(o=>(this.router.matchCache[o.id]||(this.router.matchCache[o.id]=new s0(o)),this.router.matchCache[o.id]))}}function Jh(e){e==null||e.forEach((t,n)=>{var r;const i=e==null?void 0:e[n-1];t.data=mt({},(r=i==null?void 0:i.data)!=null?r:{},t.ownData)})}function Xh(){const e=P.exports.useContext(Wh);if(!e)throw rg(!0,"You are trying to use useRouter() outside of ReactLocation!"),new Error;return e.router}function Zh(e,t){if(!e.routes.length)return[];const n=[],r=async(i,o)=>{var s;let{pathname:a,params:l}=o;const c=(e!=null&&e.filterRoutes?e==null?void 0:e.filterRoutes(i):i).find(g=>{var y,x;const v=Or([a,g.path]),h=!!(g.path!=="/"||(y=g.children)!=null&&y.length),m=u0(t,{to:v,search:g.search,fuzzy:h,caseSensitive:(x=g.caseSensitive)!=null?x:e.caseSensitive});return m&&(l=mt({},l,m)),!!m});if(!c)return;const f=Lf(c.path,l);a=Or([a,f]);const p={id:Lf(c.id,l,!0),route:c,params:l,pathname:a,search:t.search};n.push(p),(s=c.children)!=null&&s.length&&r(c.children,p)};return r(e.routes,e.rootMatch),n}function Lf(e,t,n){const r=xi(e);return Or(r.map(i=>{if(i.value==="*"&&!n)return"";if(i.type==="param"){var o;return(o=t[i.value.substring(1)])!=null?o:""}return i.value}))}function eg(){return P.exports.useContext(Kh)}function a0(){var e;return(e=eg())==null?void 0:e[0]}function l0(){const e=Tu(),t=a0(),n=tg();function r(i){var o;let{search:s,hash:a,replace:l,from:u,to:c,fromCurrent:f}=i;f=(o=f)!=null?o:typeof c>"u";const d=n({to:c,search:s,hash:a,from:f?e.current:u!=null?u:{pathname:t.pathname}});e.navigate(d,l)}return ig(r)}function tg(){const e=Tu(),t=Xh();return ig(r=>{const i=e.buildNext(t.basepath,r),s=Zh(t,i).map(a=>{var l;return(l=a.route.searchFilters)!=null?l:[]}).flat().filter(Boolean);return e.buildNext(t.basepath,mt({},r,{__searchFilters:s}))})}function ng(){var e;const t=Xh(),[n,...r]=eg(),i=r[0];if(!i)return null;const o=(e=i.errorElement)!=null?e:t.defaultErrorElement,s=(()=>{var a,l;if(i.status==="rejected"){if(o)return o;if(!t.useErrorBoundary)return"An unknown error occured!";throw i.error}const u=(a=i.pendingElement)!=null?a:t.defaultPendingElement;if(i.status==="loading")return null;if(i.status==="pending"&&(i.route.pendingMs||u))return u!=null?u:null;const c=(l=i.element)!=null?l:t.defaultElement;return c!=null?c:w(ng,{})})();return w(Yh,{value:r,children:s})}function u0(e,t){const n=f0(e,t),r=d0(e,t);if(!(t.to&&!n)&&!(t.search&&!r))return n!=null?n:{}}function rg(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function c0(e){return typeof e=="function"}function Df(e,t){return c0(e)?e(t):e}function Or(e){return ys(e.filter(Boolean).join("/"))}function ys(e){return(""+e).replace(/\/{2,}/g,"/")}function f0(e,t){var n;const r=xi(e.pathname),i=xi(""+((n=t.to)!=null?n:"*")),o={};return(()=>{for(let a=0;ad.value)),!0):!1;if(u.type==="pathname"){if(u.value==="/"&&!(l!=null&&l.value))return!0;if(l){if(t.caseSensitive){if(u.value!==l.value)return!1}else if(u.value.toLowerCase()!==l.value.toLowerCase())return!1}}if(!l)return!1;u.type==="param"&&(o[u.value.substring(1)]=l.value)}if(c&&!f)return!!t.fuzzy}return!0})()?o:void 0}function d0(e,t){return!!(t.search&&t.search(e.search))}function xi(e){if(!e)return[];e=ys(e);const t=[];if(e.slice(0,1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),!e)return t;const n=e.split("/").filter(Boolean);return t.push(...n.map(r=>r.startsWith("*")?{type:"wildcard",value:r}:r.charAt(0)===":"?{type:"param",value:r}:{type:"pathname",value:r})),e.slice(-1)==="/"&&(e=e.substring(1),t.push({type:"pathname",value:"/"})),t}function p0(e,t,n){t=t.replace(new RegExp("^"+e),"/"),n=n.replace(new RegExp("^"+e),"/");let r=xi(t);const i=xi(n);i.forEach((s,a)=>{if(s.value==="/")a?a===i.length-1&&r.push(s):r=[s];else if(s.value==="..")r.pop();else{if(s.value===".")return;r.push(s)}});const o=Or([e,...r.map(s=>s.value)]);return ys(o)}function ig(e){const t=P.exports.useRef(),n=P.exports.useRef(e);return n.current=e,t.current||(t.current=function(){return n.current(...arguments)}),t.current}function ml(e,t){if(e===t)return e;const n=Array.isArray(e)&&Array.isArray(t);if(n||Ff(e)&&Ff(t)){const r=n?e.length:Object.keys(e).length,i=n?t:Object.keys(t),o=i.length,s=n?[]:{};let a=0;for(let l=0;l"u")return!0;const n=t.prototype;return!(!Mf(n)||!n.hasOwnProperty("isPrototypeOf"))}function Mf(e){return Object.prototype.toString.call(e)==="[object Object]"}const h0=m0(JSON.parse),g0=v0(JSON.stringify);function m0(e){return t=>{t.substring(0,1)==="?"&&(t=t.substring(1));let n=Jy(t);for(let r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function v0(e){return t=>{t=mt({},t),t&&Object.keys(t).forEach(r=>{const i=t[r];if(typeof i>"u"||i===void 0)delete t[r];else if(i&&typeof i=="object"&&i!==null)try{t[r]=e(i)}catch{}});const n=Yy(t).toString();return n?"?"+n:""}}var y0="_1qevocv0",S0="_1qevocv2",w0="_1qevocv3",x0="_1qevocv4",P0="_1qevocv1";const Lt="",k0=5e3,O0=async()=>{const e=`${Lt}/ping`;return await(await fetch(e)).json()},_0=async()=>await(await fetch(`${Lt}/modifiers.json`)).json(),E0=async()=>(await(await fetch(`${Lt}/output_dir`)).json())[0],vl="config",og=async()=>await(await fetch(`${Lt}/app_config`)).json(),C0="toggle_config",b0=async e=>await(await fetch(`${Lt}/app_config`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({update_branch:e})})).json(),R0=async e=>await fetch(`${Lt}/image`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),sg=async()=>await(await fetch(`${Lt}/image/stop`)).json(),N0=[["Drawing Style",["Cel Shading","Children's Drawing","Crosshatch","Detailed and Intricate","Doodle","Dot Art","Line Art","Sketch"]],["Visual Style",["2D","8-bit","16-bit","Anaglyph","Anime","CGI"]]],jf=e=>{let t;const n=new Set,r=(l,u)=>{const c=typeof l=="function"?l(t):l;if(c!==t){const f=t;t=(u!=null?u:typeof c!="object")?c:Object.assign({},t,c),n.forEach(d=>d(t,f))}},i=()=>t,a={setState:r,getState:i,subscribe:l=>(n.add(l),()=>n.delete(l)),destroy:()=>n.clear()};return t=e(r,i,a),a},T0=e=>e?jf(e):jf;var ag={exports:{}},lg={};/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var Ss=P.exports,I0=Su.exports;function L0(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var D0=typeof Object.is=="function"?Object.is:L0,F0=I0.useSyncExternalStore,M0=Ss.useRef,j0=Ss.useEffect,A0=Ss.useMemo,$0=Ss.useDebugValue;lg.useSyncExternalStoreWithSelector=function(e,t,n,r,i){var o=M0(null);if(o.current===null){var s={hasValue:!1,value:null};o.current=s}else s=o.current;o=A0(function(){function l(p){if(!u){if(u=!0,c=p,p=r(p),i!==void 0&&s.hasValue){var g=s.value;if(i(g,p))return f=g}return f=p}if(g=f,D0(c,p))return g;var y=r(p);return i!==void 0&&i(g,y)?g:(c=p,f=y)}var u=!1,c,f,d=n===void 0?null:n;return[function(){return l(t())},d===null?void 0:function(){return l(d())}]},[t,n,r,i]);var a=F0(e,o[0],o[1]);return j0(function(){s.hasValue=!0,s.value=a},[a]),$0(a),a};(function(e){e.exports=lg})(ag);const U0=wd(ag.exports),{useSyncExternalStoreWithSelector:z0}=U0;function B0(e,t=e.getState,n){const r=z0(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return P.exports.useDebugValue(r),r}const Af=e=>{const t=typeof e=="function"?T0(e):e,n=(r,i)=>B0(t,r,i);return Object.assign(n,t),n},Q0=e=>e?Af(e):Af;var Ri=Q0;const H0=(e,t={})=>(n,r,i)=>{const{enabled:o,anonymousActionType:s,...a}=t;let l;try{l=(o!=null?o:({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production")&&window.__REDUX_DEVTOOLS_EXTENSION__}catch{}if(!l)return({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&o&&console.warn("[zustand devtools middleware] Please install/enable Redux devtools extension"),e(n,r,i);const u=l.connect(a);let c=!0;i.setState=(p,g,y)=>{const x=n(p,g);return c&&u.send(y===void 0?{type:s||"anonymous"}:typeof y=="string"?{type:y}:y,r()),x};const f=(...p)=>{const g=c;c=!1,n(...p),c=g},d=e(i.setState,r,i);if(u.init(d),i.dispatchFromDevtools&&typeof i.dispatch=="function"){let p=!1;const g=i.dispatch;i.dispatch=(...y)=>{({BASE_URL:"/",MODE:"production",DEV:!1,PROD:!0}&&"production")!=="production"&&y[0].type==="__setState"&&!p&&(console.warn('[zustand devtools middleware] "__setState" action type is reserved to set state from the devtools. Avoid using it.'),p=!0),g(...y)}}return u.subscribe(p=>{var g;switch(p.type){case"ACTION":if(typeof p.payload!="string"){console.error("[zustand devtools middleware] Unsupported action format");return}return ra(p.payload,y=>{if(y.type==="__setState"){f(y.state);return}!i.dispatchFromDevtools||typeof i.dispatch=="function"&&i.dispatch(y)});case"DISPATCH":switch(p.payload.type){case"RESET":return f(d),u.init(i.getState());case"COMMIT":return u.init(i.getState());case"ROLLBACK":return ra(p.state,y=>{f(y),u.init(i.getState())});case"JUMP_TO_STATE":case"JUMP_TO_ACTION":return ra(p.state,y=>{f(y)});case"IMPORT_STATE":{const{nextLiftedState:y}=p.payload,x=(g=y.computedStates.slice(-1)[0])==null?void 0:g.state;if(!x)return;f(x),u.send(null,y);return}case"PAUSE_RECORDING":return c=!c}return}}),d},V0=H0,ra=(e,t)=>{let n;try{n=JSON.parse(e)}catch(r){console.error("[zustand devtools middleware] Could not parse the received json",r)}n!==void 0&&t(n)},Wo=e=>t=>{try{const n=e(t);return n instanceof Promise?n:{then(r){return Wo(r)(n)},catch(r){return this}}}catch(n){return{then(r){return this},catch(r){return Wo(r)(n)}}}},q0=(e,t)=>(n,r,i)=>{let o={getStorage:()=>localStorage,serialize:JSON.stringify,deserialize:JSON.parse,partialize:x=>x,version:0,merge:(x,v)=>({...v,...x}),...t},s=!1;const a=new Set,l=new Set;let u;try{u=o.getStorage()}catch{}if(!u)return e((...x)=>{console.warn(`[zustand persist middleware] Unable to update item '${o.name}', the given storage is currently unavailable.`),n(...x)},r,i);const c=Wo(o.serialize),f=()=>{const x=o.partialize({...r()});let v;const h=c({state:x,version:o.version}).then(m=>u.setItem(o.name,m)).catch(m=>{v=m});if(v)throw v;return h},d=i.setState;i.setState=(x,v)=>{d(x,v),f()};const p=e((...x)=>{n(...x),f()},r,i);let g;const y=()=>{var x;if(!u)return;s=!1,a.forEach(h=>h(r()));const v=((x=o.onRehydrateStorage)==null?void 0:x.call(o,r()))||void 0;return Wo(u.getItem.bind(u))(o.name).then(h=>{if(h)return o.deserialize(h)}).then(h=>{if(h)if(typeof h.version=="number"&&h.version!==o.version){if(o.migrate)return o.migrate(h.state,h.version);console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return h.state}).then(h=>{var m;return g=o.merge(h,(m=r())!=null?m:p),n(g,!0),f()}).then(()=>{v==null||v(g,void 0),s=!0,l.forEach(h=>h(g))}).catch(h=>{v==null||v(void 0,h)})};return i.persist={setOptions:x=>{o={...o,...x},x.getStorage&&(u=x.getStorage())},clearStorage:()=>{u==null||u.removeItem(o.name)},getOptions:()=>o,rehydrate:()=>y(),hasHydrated:()=>s,onHydrate:x=>(a.add(x),()=>{a.delete(x)}),onFinishHydration:x=>(l.add(x),()=>{l.delete(x)})},y(),g||p},K0=q0;function Go(){return Math.floor(Math.random()*1e4)}const W0=["plms","ddim","heun","euler","euler_a","dpm2","dpm2_a","lms"],D=Ri(V0((e,t)=>({parallelCount:1,requestOptions:{session_id:new Date().getTime().toString(),prompt:"a photograph of an astronaut riding a horse",negative_prompt:"",seed:Go(),num_outputs:1,num_inference_steps:50,guidance_scale:7.5,width:512,height:512,prompt_strength:.8,turbo:!0,use_cpu:!1,use_full_precision:!0,save_to_disk_path:"null",use_face_correction:"GFPGANv1.3",use_upscale:"RealESRGAN_x4plus",show_only_filtered_image:!0,init_image:void 0,sampler:"plms",stream_progress_updates:!0,stream_image_progress:!1,mask:void 0},createTags:[],tagMap:{},uiOptions:{isUseRandomSeed:!0,isUseAutoSave:!1,isSoundEnabled:!1},allModifiers:[],isInpainting:!1,setParallelCount:n=>e(A(r=>{r.parallelCount=n})),setRequestOptions:(n,r)=>{e(A(i=>{i.requestOptions[n]=r}))},getValueForRequestKey:n=>t().requestOptions[n],setAllModifiers:n=>{e(A(r=>{r.allModifiers=n}))},toggleTag:(n,r)=>{e(A(i=>{Object.keys(i.tagMap).includes(n)?i.tagMap[n].includes(r)?i.tagMap[n]=i.tagMap[n].filter(o=>o!==r):i.tagMap[n].push(r):i.tagMap[n]=[r]}))},hasTag:(n,r)=>{var i;return(i=t().tagMap[n])==null?void 0:i.includes(r)},selectedTags:()=>{const n=t().allModifiers,r=t().tagMap;let i=[];for(const[o,s]of Object.entries(r)){const a=n.find(l=>l.category===o);if(a)for(const l of s){const u=a.modifiers.find(c=>c.modifier===l);u&&(i=i.concat({...u,category:a.category}))}}return i},addCreateTag:n=>{e(A(r=>{r.createTags.push(n)}))},removeCreateTag:n=>{e(A(r=>{r.createTags=r.createTags.filter(i=>i.id!==n)}))},changeCreateTagType:(n,r)=>{e(A(i=>{const o=i.createTags.find(s=>s.id===n);o&&(o.type=r)}))},reorderCreateTag:(n,r)=>{e(A(i=>{const o=i.createTags.indexOf(n);o!==-1&&(i.createTags.splice(o,1),i.createTags.splice(r,0,n))}))},builtRequest:()=>{const n=t(),r=n.requestOptions;t().selectedTags().map(l=>l.modifier);const o=n.createTags.filter(l=>l.type==="positive").map(l=>l.name).join(","),s=n.createTags.filter(l=>l.type==="negative").map(l=>l.name).join(","),a={...r,prompt:o,negative_prompt:s};return n.uiOptions.isUseAutoSave||(a.save_to_disk_path=null),a.init_image===void 0&&(a.prompt_strength=void 0),a.use_upscale===""&&(a.use_upscale=null),a.use_upscale===null&&a.use_face_correction===null&&(a.show_only_filtered_image=!1),a},toggleUseFaceCorrection:()=>{e(A(n=>{const r=typeof n.getValueForRequestKey("use_face_correction")=="string"?null:"GFPGANv1.3";n.requestOptions.use_face_correction=r}))},isUsingFaceCorrection:()=>typeof t().getValueForRequestKey("use_face_correction")=="string",isUsingUpscaling:()=>t().getValueForRequestKey("use_upscale")!=="",toggleUseRandomSeed:()=>{e(A(n=>{n.uiOptions.isUseRandomSeed=!n.uiOptions.isUseRandomSeed,n.requestOptions.seed=n.uiOptions.isUseRandomSeed?Go():n.requestOptions.seed}))},isRandomSeed:()=>t().uiOptions.isUseRandomSeed,toggleUseAutoSave:()=>{e(A(n=>{n.uiOptions.isUseAutoSave=!n.uiOptions.isUseAutoSave}))},isUseAutoSave:()=>t().uiOptions.isUseAutoSave,toggleSoundEnabled:()=>{e(A(n=>{n.uiOptions.isSoundEnabled=!n.uiOptions.isSoundEnabled}))},isSoundEnabled:()=>t().uiOptions.isSoundEnabled,toggleInpainting:()=>{e(A(n=>{n.isInpainting=!n.isInpainting}))}}))),G0=`${Lt}/ding.mp3`,Iu=G.forwardRef((e,t)=>w("audio",{ref:t,style:{display:"none"},children:w("source",{src:G0,type:"audio/mp3"})}));Iu.displayName="AudioDing";var $f="_1jo75h1",Uf="_1jo75h0",Y0="_1jo75h2";const zf="Stable Diffusion is starting...",J0="Stable Diffusion is ready to use!",Bf="Stable Diffusion is not running!";function X0({className:e}){const[t,n]=P.exports.useState(zf),[r,i]=P.exports.useState(Uf),o=P.exports.useRef(),{status:s,data:a}=wr(["health"],O0,{refetchInterval:k0});return P.exports.useEffect(()=>{var l;s==="loading"?(n(zf),i(Uf)):s==="error"?(n(Bf),i($f)):s==="success"&&(a[0]==="OK"?(n(J0),i(Y0),(l=o.current)==null||l.play().catch(u=>{console.log("DING!")})):(n(Bf),i($f)))},[s,a,o]),R(lt,{children:[w(Iu,{ref:o}),w("p",{className:[r,e].join(" "),children:t})]})}const ug=typeof window>"u"||typeof document>"u";let Wt=ug?P.exports.useEffect:P.exports.useLayoutEffect;function Dn(e){let t=P.exports.useRef(e);return Wt(()=>{t.current=e},[e]),t}function Z0(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}let q=function(e){let t=Dn(e);return G.useCallback((...n)=>t.current(...n),[t])},ia={serverHandoffComplete:!1};function e1(){let[e,t]=P.exports.useState(ia.serverHandoffComplete);return P.exports.useEffect(()=>{e!==!0&&t(!0)},[e]),P.exports.useEffect(()=>{ia.serverHandoffComplete===!1&&(ia.serverHandoffComplete=!0)},[]),e}var Qf;let t1=0;function Hf(){return++t1}let yt=(Qf=G.useId)!=null?Qf:function(){let e=e1(),[t,n]=G.useState(e?Hf:null);return Wt(()=>{t===null&&n(Hf())},[t]),t!=null?""+t:void 0};function St(e,t,...n){if(e in t){let i=t[e];return typeof i=="function"?i(...n):i}let r=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(i=>`"${i}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,St),r}function Lu(e){return ug?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let yl=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var me=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(me||{}),n1=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(n1||{}),r1=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(r1||{});function cg(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(yl))}var Du=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Du||{});function fg(e,t=0){var n;return e===((n=Lu(e))==null?void 0:n.body)?!1:St(t,{[0](){return e.matches(yl)},[1](){let r=e;for(;r!==null;){if(r.matches(yl))return!0;r=r.parentElement}return!1}})}let i1=["textarea","input"].join(",");function o1(e){var t,n;return(n=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,i1))!=null?n:!1}function Sl(e,t=n=>n){return e.slice().sort((n,r)=>{let i=t(n),o=t(r);if(i===null||o===null)return 0;let s=i.compareDocumentPosition(o);return s&Node.DOCUMENT_POSITION_FOLLOWING?-1:s&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function nt(e,t,n=!0,r=null){let i=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,o=Array.isArray(e)?n?Sl(e):e:cg(e);r=r!=null?r:i.activeElement;let s=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),a=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,o.indexOf(r))-1;if(t&4)return Math.max(0,o.indexOf(r))+1;if(t&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),l=t&32?{preventScroll:!0}:{},u=0,c=o.length,f;do{if(u>=c||u+c<=0)return 0;let d=a+u;if(t&16)d=(d+c)%c;else{if(d<0)return 3;if(d>=c)return 1}f=o[d],f==null||f.focus(l),u+=s}while(f!==i.activeElement);return t&6&&o1(f)&&f.select(),f.hasAttribute("tabindex")||f.setAttribute("tabindex","0"),2}function oa(e,t,n){let r=Dn(t);P.exports.useEffect(()=>{function i(o){r.current(o)}return document.addEventListener(e,i,n),()=>document.removeEventListener(e,i,n)},[e,n])}function s1(e,t,n=!0){let r=P.exports.useRef(!1);P.exports.useEffect(()=>{requestAnimationFrame(()=>{r.current=n})},[n]);function i(s,a){if(!r.current||s.defaultPrevented)return;let l=function c(f){return typeof f=="function"?c(f()):Array.isArray(f)||f instanceof Set?f:[f]}(e),u=a(s);if(u!==null&&!!u.ownerDocument.documentElement.contains(u)){for(let c of l){if(c===null)continue;let f=c instanceof HTMLElement?c:c.current;if(f!=null&&f.contains(u))return}return!fg(u,Du.Loose)&&u.tabIndex!==-1&&s.preventDefault(),t(s,u)}}let o=P.exports.useRef(null);oa("mousedown",s=>{r.current&&(o.current=s.target)},!0),oa("click",s=>{!o.current||(i(s,()=>o.current),o.current=null)},!0),oa("blur",s=>i(s,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Vf(e){var t;if(e.type)return e.type;let n=(t=e.as)!=null?t:"button";if(typeof n=="string"&&n.toLowerCase()==="button")return"button"}function Fu(e,t){let[n,r]=P.exports.useState(()=>Vf(e));return Wt(()=>{r(Vf(e))},[e.type,e.as]),Wt(()=>{n||!t.current||t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&r("button")},[n,t]),n}let dg=Symbol();function a1(e,t=!0){return Object.assign(e,{[dg]:t})}function Ue(...e){let t=P.exports.useRef(e);P.exports.useEffect(()=>{t.current=e},[e]);let n=q(r=>{for(let i of t.current)i!=null&&(typeof i=="function"?i(r):i.current=r)});return e.every(r=>r==null||(r==null?void 0:r[dg]))?void 0:n}var Un=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(Un||{}),l1=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(l1||{});function Ie({ourProps:e,theirProps:t,slot:n,defaultTag:r,features:i,visible:o=!0,name:s}){let a=pg(t,e);if(o)return Yi(a,n,r,s);let l=i!=null?i:0;if(l&2){let{static:u=!1,...c}=a;if(u)return Yi(c,n,r,s)}if(l&1){let{unmount:u=!0,...c}=a;return St(u?0:1,{[0](){return null},[1](){return Yi({...c,hidden:!0,style:{display:"none"}},n,r,s)}})}return Yi(a,n,r,s)}function Yi(e,t={},n,r){let{as:i=n,children:o,refName:s="ref",...a}=sa(e,["unmount","static"]),l=e.ref!==void 0?{[s]:e.ref}:{},u=typeof o=="function"?o(t):o;a.className&&typeof a.className=="function"&&(a.className=a.className(t));let c={};if(t){let f=!1,d=[];for(let[p,g]of Object.entries(t))typeof g=="boolean"&&(f=!0),g===!0&&d.push(p);f&&(c["data-headlessui-state"]=d.join(" "))}if(i===P.exports.Fragment&&Object.keys(wl(a)).length>0){if(!P.exports.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${r} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(a).map(f=>` - ${f}`).join(` `),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(f=>` - ${f}`).join(` `)].join(` `));return P.exports.cloneElement(u,Object.assign({},pg(u.props,wl(sa(a,["ref"]))),c,l,u1(u.ref,l.ref)))}return P.exports.createElement(i,Object.assign({},sa(a,["ref"]),i!==P.exports.Fragment&&l,i!==P.exports.Fragment&&c),u)}function u1(...e){return{ref:e.every(t=>t==null)?void 0:t=>{for(let n of e)n!=null&&(typeof n=="function"?n(t):n.current=t)}}}function pg(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},n={};for(let r of e)for(let i in r)i.startsWith("on")&&typeof r[i]=="function"?(n[i]!=null||(n[i]=[]),n[i].push(r[i])):t[i]=r[i];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(n).map(r=>[r,void 0])));for(let r in n)Object.assign(t,{[r](i,...o){let s=n[r];for(let a of s){if((i instanceof Event||(i==null?void 0:i.nativeEvent)instanceof Event)&&i.defaultPrevented)return;a(i,...o)}}});return t}function ze(e){var t;return Object.assign(P.exports.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function wl(e){let t=Object.assign({},e);for(let n in t)t[n]===void 0&&delete t[n];return t}function sa(e,t=[]){let n=Object.assign({},e);for(let r of t)r in n&&delete n[r];return n}function Mu(e){let t=e.parentElement,n=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(n=t),t=t.parentElement;let r=(t==null?void 0:t.getAttribute("disabled"))==="";return r&&c1(n)?!1:r}function c1(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function f1(e){var t;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let r of n.elements)if(r.tagName==="INPUT"&&r.type==="submit"||r.tagName==="BUTTON"&&r.type==="submit"||r.nodeName==="INPUT"&&r.type==="image"){r.click();return}}}let d1="div";var _r=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_r||{});let Er=ze(function(e,t){let{features:n=1,...r}=e,i={ref:t,"aria-hidden":(n&2)===2?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Ie({ourProps:i,theirProps:r,slot:{},defaultTag:d1,name:"Hidden"})}),ju=P.exports.createContext(null);ju.displayName="OpenClosedContext";var Pi=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Pi||{});function hg(){return P.exports.useContext(ju)}function p1({value:e,children:t}){return G.createElement(ju.Provider,{value:e},t)}var se=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(se||{});function h1(e,t,n){let[r,i]=P.exports.useState(n),o=e!==void 0;return[o?e:r,q(s=>(o||i(s),t==null?void 0:t(s)))]}function g1(e,t,n){let r=Dn(t);P.exports.useEffect(()=>{function i(o){r.current(o)}return window.addEventListener(e,i,n),()=>window.removeEventListener(e,i,n)},[e,n])}var Tn=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Tn||{});function gg(){let e=P.exports.useRef(0);return g1("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Au(...e){return P.exports.useMemo(()=>Lu(...e),[...e])}function m1(e,t,n,r){let i=Dn(n);P.exports.useEffect(()=>{e=e!=null?e:window;function o(s){i.current(s)}return e.addEventListener(t,o,r),()=>e.removeEventListener(t,o,r)},[e,t,r])}let mg=P.exports.createContext(null);function vg(){let e=P.exports.useContext(mg);if(e===null){let t=new Error("You used a component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,vg),t}return e}function v1(){let[e,t]=P.exports.useState([]);return[e.length>0?e.join(" "):void 0,P.exports.useMemo(()=>function(n){let r=q(o=>(t(s=>[...s,o]),()=>t(s=>{let a=s.slice(),l=a.indexOf(o);return l!==-1&&a.splice(l,1),a}))),i=P.exports.useMemo(()=>({register:r,slot:n.slot,name:n.name,props:n.props}),[r,n.slot,n.name,n.props]);return G.createElement(mg.Provider,{value:i},n.children)},[t])]}let y1="p",S1=ze(function(e,t){let n=vg(),r=`headlessui-description-${yt()}`,i=Ue(t);Wt(()=>n.register(r),[r,n.register]);let o=e,s={ref:i,...n.props,id:r};return Ie({ourProps:s,theirProps:o,slot:n.slot||{},defaultTag:y1,name:n.name||"Description"})});var w1=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(w1||{}),x1=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(x1||{});let P1={[0]:e=>({...e,popoverState:St(e.popoverState,{[0]:1,[1]:0})}),[1](e){return e.popoverState===1?e:{...e,popoverState:1}},[2](e,t){return e.button===t.button?e:{...e,button:t.button}},[3](e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},[4](e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},[5](e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},$u=P.exports.createContext(null);$u.displayName="PopoverContext";function ws(e){let t=P.exports.useContext($u);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ws),n}return t}let Uu=P.exports.createContext(null);Uu.displayName="PopoverAPIContext";function zu(e){let t=P.exports.useContext(Uu);if(t===null){let n=new Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,zu),n}return t}let Bu=P.exports.createContext(null);Bu.displayName="PopoverGroupContext";function yg(){return P.exports.useContext(Bu)}let Qu=P.exports.createContext(null);Qu.displayName="PopoverPanelContext";function k1(){return P.exports.useContext(Qu)}function O1(e,t){return St(t.type,P1,e,t)}let _1="div",E1=ze(function(e,t){var n;let r=`headlessui-popover-button-${yt()}`,i=`headlessui-popover-panel-${yt()}`,o=P.exports.useRef(null),s=Ue(t,a1(k=>{o.current=k})),a=P.exports.useReducer(O1,{popoverState:1,button:null,buttonId:r,panel:null,panelId:i,beforePanelSentinel:P.exports.createRef(),afterPanelSentinel:P.exports.createRef()}),[{popoverState:l,button:u,panel:c,beforePanelSentinel:f,afterPanelSentinel:d},p]=a,g=Au((n=o.current)!=null?n:u);P.exports.useEffect(()=>p({type:3,buttonId:r}),[r,p]),P.exports.useEffect(()=>p({type:5,panelId:i}),[i,p]);let y=P.exports.useMemo(()=>{if(!u||!c)return!1;for(let k of document.querySelectorAll("body > *"))if(Number(k==null?void 0:k.contains(u))^Number(k==null?void 0:k.contains(c)))return!0;return!1},[u,c]),x=P.exports.useMemo(()=>({buttonId:r,panelId:i,close:()=>p({type:1})}),[r,i,p]),v=yg(),h=v==null?void 0:v.registerPopover,m=q(()=>{var k;return(k=v==null?void 0:v.isFocusWithinPopoverGroup())!=null?k:(g==null?void 0:g.activeElement)&&((u==null?void 0:u.contains(g.activeElement))||(c==null?void 0:c.contains(g.activeElement)))});P.exports.useEffect(()=>h==null?void 0:h(x),[h,x]),m1(g==null?void 0:g.defaultView,"focus",k=>{var E,I,j,z;l===0&&(m()||!u||!c||(I=(E=f.current)==null?void 0:E.contains)!=null&&I.call(E,k.target)||(z=(j=d.current)==null?void 0:j.contains)!=null&&z.call(j,k.target)||p({type:1}))},!0),s1([u,c],(k,E)=>{p({type:1}),fg(E,Du.Loose)||(k.preventDefault(),u==null||u.focus())},l===0);let S=q(k=>{p({type:1});let E=(()=>k?k instanceof HTMLElement?k:"current"in k&&k.current instanceof HTMLElement?k.current:u:u)();E==null||E.focus()}),_=P.exports.useMemo(()=>({close:S,isPortalled:y}),[S,y]),O=P.exports.useMemo(()=>({open:l===0,close:S}),[l,S]),C=e,b={ref:s};return G.createElement($u.Provider,{value:a},G.createElement(Uu.Provider,{value:_},G.createElement(p1,{value:St(l,{[0]:Pi.Open,[1]:Pi.Closed})},Ie({ourProps:b,theirProps:C,slot:O,defaultTag:_1,name:"Popover"}))))}),C1="button",b1=ze(function(e,t){let[n,r]=ws("Popover.Button"),{isPortalled:i}=zu("Popover.Button"),o=P.exports.useRef(null),s=`headlessui-focus-sentinel-${yt()}`,a=yg(),l=a==null?void 0:a.closeOthers,u=k1(),c=u===null?!1:u===n.panelId,f=Ue(o,t,c?null:k=>r({type:2,button:k})),d=Ue(o,t),p=Au(o),g=q(k=>{var E,I,j;if(c){if(n.popoverState===1)return;switch(k.key){case se.Space:case se.Enter:k.preventDefault(),(I=(E=k.target).click)==null||I.call(E),r({type:1}),(j=n.button)==null||j.focus();break}}else switch(k.key){case se.Space:case se.Enter:k.preventDefault(),k.stopPropagation(),n.popoverState===1&&(l==null||l(n.buttonId)),r({type:0});break;case se.Escape:if(n.popoverState!==0)return l==null?void 0:l(n.buttonId);if(!o.current||(p==null?void 0:p.activeElement)&&!o.current.contains(p.activeElement))return;k.preventDefault(),k.stopPropagation(),r({type:1});break}}),y=q(k=>{c||k.key===se.Space&&k.preventDefault()}),x=q(k=>{var E,I;Mu(k.currentTarget)||e.disabled||(c?(r({type:1}),(E=n.button)==null||E.focus()):(k.preventDefault(),k.stopPropagation(),n.popoverState===1&&(l==null||l(n.buttonId)),r({type:0}),(I=n.button)==null||I.focus()))}),v=q(k=>{k.preventDefault(),k.stopPropagation()}),h=n.popoverState===0,m=P.exports.useMemo(()=>({open:h}),[h]),S=Fu(e,o),_=e,O=c?{ref:d,type:S,onKeyDown:g,onClick:x}:{ref:f,id:n.buttonId,type:S,"aria-expanded":e.disabled?void 0:n.popoverState===0,"aria-controls":n.panel?n.panelId:void 0,onKeyDown:g,onKeyUp:y,onClick:x,onMouseDown:v},C=gg(),b=q(()=>{let k=n.panel;if(!k)return;function E(){St(C.current,{[Tn.Forwards]:()=>nt(k,me.First),[Tn.Backwards]:()=>nt(k,me.Last)})}E()});return R(lt,{children:[Ie({ourProps:O,theirProps:_,slot:m,defaultTag:C1,name:"Popover.Button"}),h&&!c&&i&&w(Er,{id:s,features:_r.Focusable,as:"button",type:"button",onFocus:b})]})}),R1="div",N1=Un.RenderStrategy|Un.Static,T1=ze(function(e,t){let[{popoverState:n},r]=ws("Popover.Overlay"),i=Ue(t),o=`headlessui-popover-overlay-${yt()}`,s=hg(),a=(()=>s!==null?s===Pi.Open:n===0)(),l=q(c=>{if(Mu(c.currentTarget))return c.preventDefault();r({type:1})}),u=P.exports.useMemo(()=>({open:n===0}),[n]);return Ie({ourProps:{ref:i,id:o,"aria-hidden":!0,onClick:l},theirProps:e,slot:u,defaultTag:R1,features:N1,visible:a,name:"Popover.Overlay"})}),I1="div",L1=Un.RenderStrategy|Un.Static,D1=ze(function(e,t){let{focus:n=!1,...r}=e,[i,o]=ws("Popover.Panel"),{close:s,isPortalled:a}=zu("Popover.Panel"),l=`headlessui-focus-sentinel-before-${yt()}`,u=`headlessui-focus-sentinel-after-${yt()}`,c=P.exports.useRef(null),f=Ue(c,t,_=>{o({type:4,panel:_})}),d=Au(c),p=hg(),g=(()=>p!==null?p===Pi.Open:i.popoverState===0)(),y=q(_=>{var O;switch(_.key){case se.Escape:if(i.popoverState!==0||!c.current||(d==null?void 0:d.activeElement)&&!c.current.contains(d.activeElement))return;_.preventDefault(),_.stopPropagation(),o({type:1}),(O=i.button)==null||O.focus();break}});P.exports.useEffect(()=>{var _;e.static||i.popoverState===1&&((_=e.unmount)!=null?_:!0)&&o({type:4,panel:null})},[i.popoverState,e.unmount,e.static,o]),P.exports.useEffect(()=>{if(!n||i.popoverState!==0||!c.current)return;let _=d==null?void 0:d.activeElement;c.current.contains(_)||nt(c.current,me.First)},[n,c,i.popoverState]);let x=P.exports.useMemo(()=>({open:i.popoverState===0,close:s}),[i,s]),v={ref:f,id:i.panelId,onKeyDown:y,onBlur:n&&i.popoverState===0?_=>{var O,C,b,k,E;let I=_.relatedTarget;!I||!c.current||(O=c.current)!=null&&O.contains(I)||(o({type:1}),(((b=(C=i.beforePanelSentinel.current)==null?void 0:C.contains)==null?void 0:b.call(C,I))||((E=(k=i.afterPanelSentinel.current)==null?void 0:k.contains)==null?void 0:E.call(k,I)))&&I.focus({preventScroll:!0}))}:void 0,tabIndex:-1},h=gg(),m=q(()=>{let _=c.current;if(!_)return;function O(){St(h.current,{[Tn.Forwards]:()=>{nt(_,me.First)},[Tn.Backwards]:()=>{var C;(C=i.button)==null||C.focus({preventScroll:!0})}})}O()}),S=q(()=>{let _=c.current;if(!_)return;function O(){St(h.current,{[Tn.Forwards]:()=>{var C,b,k;if(!i.button)return;let E=cg(),I=E.indexOf(i.button),j=E.slice(0,I+1),z=[...E.slice(I+1),...j];for(let H of z.slice())if(((b=(C=H==null?void 0:H.id)==null?void 0:C.startsWith)==null?void 0:b.call(C,"headlessui-focus-sentinel-"))||((k=i.panel)==null?void 0:k.contains(H))){let Oe=z.indexOf(H);Oe!==-1&&z.splice(Oe,1)}nt(z,me.First,!1)},[Tn.Backwards]:()=>nt(_,me.Last)})}O()});return G.createElement(Qu.Provider,{value:i.panelId},g&&a&&w(Er,{id:l,ref:i.beforePanelSentinel,features:_r.Focusable,as:"button",type:"button",onFocus:m}),Ie({ourProps:v,theirProps:r,slot:x,defaultTag:I1,features:L1,visible:g,name:"Popover.Panel"}),g&&a&&w(Er,{id:u,ref:i.afterPanelSentinel,features:_r.Focusable,as:"button",type:"button",onFocus:S}))}),F1="div",M1=ze(function(e,t){let n=P.exports.useRef(null),r=Ue(n,t),[i,o]=P.exports.useState([]),s=q(g=>{o(y=>{let x=y.indexOf(g);if(x!==-1){let v=y.slice();return v.splice(x,1),v}return y})}),a=q(g=>(o(y=>[...y,g]),()=>s(g))),l=q(()=>{var g;let y=Lu(n);if(!y)return!1;let x=y.activeElement;return(g=n.current)!=null&&g.contains(x)?!0:i.some(v=>{var h,m;return((h=y.getElementById(v.buttonId))==null?void 0:h.contains(x))||((m=y.getElementById(v.panelId))==null?void 0:m.contains(x))})}),u=q(g=>{for(let y of i)y.buttonId!==g&&y.close()}),c=P.exports.useMemo(()=>({registerPopover:a,unregisterPopover:s,isFocusWithinPopoverGroup:l,closeOthers:u}),[a,s,l,u]),f=P.exports.useMemo(()=>({}),[]),d=e,p={ref:r};return G.createElement(Bu.Provider,{value:c},Ie({ourProps:p,theirProps:d,slot:f,defaultTag:F1,name:"Popover.Group"}))}),fr=Object.assign(E1,{Button:b1,Overlay:T1,Panel:D1,Group:M1}),Sg=P.exports.createContext(null);function wg(){let e=P.exports.useContext(Sg);if(e===null){let t=new Error("You used a