function yf(e,t){for(var n=0;nr[l]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function wf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sf={exports:{}},ri={},xf={exports:{}},G={};/** * @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 Ml=Symbol.for("react.element"),Rh=Symbol.for("react.portal"),Ph=Symbol.for("react.fragment"),_h=Symbol.for("react.strict_mode"),Lh=Symbol.for("react.profiler"),Th=Symbol.for("react.provider"),Dh=Symbol.for("react.context"),Nh=Symbol.for("react.forward_ref"),Mh=Symbol.for("react.suspense"),Oh=Symbol.for("react.memo"),zh=Symbol.for("react.lazy"),Ls=Symbol.iterator;function Fh(e){return e===null||typeof e!="object"?null:(e=Ls&&e[Ls]||e["@@iterator"],typeof e=="function"?e:null)}var Ef={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},kf=Object.assign,Cf={};function Mr(e,t,n){this.props=e,this.context=t,this.refs=Cf,this.updater=n||Ef}Mr.prototype.isReactComponent={};Mr.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")};Mr.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Rf(){}Rf.prototype=Mr.prototype;function su(e,t,n){this.props=e,this.context=t,this.refs=Cf,this.updater=n||Ef}var cu=su.prototype=new Rf;cu.constructor=su;kf(cu,Mr.prototype);cu.isPureReactComponent=!0;var Ts=Array.isArray,Pf=Object.prototype.hasOwnProperty,fu={current:null},_f={key:!0,ref:!0,__self:!0,__source:!0};function Lf(e,t,n){var r,l={},o=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(o=""+t.key),t)Pf.call(t,r)&&!_f.hasOwnProperty(r)&&(l[r]=t[r]);var a=arguments.length-2;if(a===1)l.children=n;else if(1>>1,le=L[re];if(0>>1;rel(Ae,V))Iel(ot,Ae)?(L[re]=ot,L[Ie]=V,re=Ie):(L[re]=Ae,L[Ge]=V,re=Ge);else if(Iel(ot,V))L[re]=ot,L[Ie]=V,re=Ie;else break e}}return U}function l(L,U){var V=L.sortIndex-U.sortIndex;return V!==0?V:L.id-U.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var i=Date,a=i.now();e.unstable_now=function(){return i.now()-a}}var u=[],s=[],f=1,c=null,p=3,v=!1,w=!1,S=!1,P=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,d=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(L){for(var U=n(s);U!==null;){if(U.callback===null)r(s);else if(U.startTime<=L)r(s),U.sortIndex=U.expirationTime,t(u,U);else break;U=n(s)}}function E(L){if(S=!1,m(L),!w)if(n(u)!==null)w=!0,oe(R);else{var U=n(s);U!==null&&de(E,U.startTime-L)}}function R(L,U){w=!1,S&&(S=!1,h(_),_=-1),v=!0;var V=p;try{for(m(U),c=n(u);c!==null&&(!(c.expirationTime>U)||L&&!H());){var re=c.callback;if(typeof re=="function"){c.callback=null,p=c.priorityLevel;var le=re(c.expirationTime<=U);U=e.unstable_now(),typeof le=="function"?c.callback=le:c===n(u)&&r(u),m(U)}else r(u);c=n(u)}if(c!==null)var dt=!0;else{var Ge=n(s);Ge!==null&&de(E,Ge.startTime-U),dt=!1}return dt}finally{c=null,p=V,v=!1}}var T=!1,y=null,_=-1,I=5,M=-1;function H(){return!(e.unstable_now()-ML||125re?(L.sortIndex=V,t(s,L),n(u)===null&&L===n(s)&&(S?(h(_),_=-1):S=!0,de(E,V-re))):(L.sortIndex=le,t(u,L),w||v||(w=!0,oe(R))),L},e.unstable_shouldYield=H,e.unstable_wrapCallback=function(L){var U=p;return function(){var V=p;p=U;try{return L.apply(this,arguments)}finally{p=V}}}})(Of);Mf.exports=Of;var Xh=Mf.exports;/** * @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 Gh=C,nt=Xh;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"),sa=Object.prototype.hasOwnProperty,Jh=/^[: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]*$/,Ms={},Os={};function Zh(e){return sa.call(Os,e)?!0:sa.call(Ms,e)?!1:Jh.test(e)?Os[e]=!0:(Ms[e]=!0,!1)}function qh(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 bh(e,t,n,r){if(t===null||typeof t>"u"||qh(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 Ve(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var Ne={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){Ne[e]=new Ve(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];Ne[t]=new Ve(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){Ne[e]=new Ve(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){Ne[e]=new Ve(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){Ne[e]=new Ve(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){Ne[e]=new Ve(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){Ne[e]=new Ve(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){Ne[e]=new Ve(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){Ne[e]=new Ve(e,5,!1,e.toLowerCase(),null,!1,!1)});var pu=/[\-:]([a-z])/g;function hu(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(pu,hu);Ne[t]=new Ve(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(pu,hu);Ne[t]=new Ve(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(pu,hu);Ne[t]=new Ve(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){Ne[e]=new Ve(e,1,!1,e.toLowerCase(),null,!1,!1)});Ne.xlinkHref=new Ve("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){Ne[e]=new Ve(e,1,!1,e.toLowerCase(),null,!0,!0)});function mu(e,t,n,r){var l=Ne.hasOwnProperty(t)?Ne[t]:null;(l!==null?l.type!==0:r||!(2a||l[i]!==o[a]){var u=` `+l[i].replace(" at new "," at ");return e.displayName&&u.includes("")&&(u=u.replace("",e.displayName)),u}while(1<=i&&0<=a);break}}}finally{Oi=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?qr(e):""}function em(e){switch(e.tag){case 5:return qr(e.type);case 16:return qr("Lazy");case 13:return qr("Suspense");case 19:return qr("SuspenseList");case 0:case 2:case 15:return e=zi(e.type,!1),e;case 11:return e=zi(e.type.render,!1),e;case 1:return e=zi(e.type,!0),e;default:return""}}function pa(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 lr:return"Fragment";case rr:return"Portal";case ca:return"Profiler";case vu:return"StrictMode";case fa:return"Suspense";case da:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Af:return(e.displayName||"Context")+".Consumer";case Ff:return(e._context.displayName||"Context")+".Provider";case gu:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yu:return t=e.displayName||null,t!==null?t:pa(e.type)||"Memo";case tn:t=e._payload,e=e._init;try{return pa(e(t))}catch{}}return null}function tm(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 pa(t);case 8:return t===vu?"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 gn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function nm(e){var t=Uf(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Xl(e){e._valueTracker||(e._valueTracker=nm(e))}function jf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Uf(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Po(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 ha(e,t){var n=t.checked;return me({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Fs(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=gn(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 Bf(e,t){t=t.checked,t!=null&&mu(e,"checked",t,!1)}function ma(e,t){Bf(e,t);var n=gn(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")?va(e,t.type,n):t.hasOwnProperty("defaultValue")&&va(e,t.type,gn(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function As(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 va(e,t,n){(t!=="number"||Po(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var br=Array.isArray;function mr(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Gl.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function pl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var rl={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},rm=["Webkit","ms","Moz","O"];Object.keys(rl).forEach(function(e){rm.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),rl[t]=rl[e]})});function Hf(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||rl.hasOwnProperty(e)&&rl[e]?(""+t).trim():t+"px"}function Qf(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=Hf(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var lm=me({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 wa(e,t){if(t){if(lm[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 Sa(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 xa=null;function wu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Ea=null,vr=null,gr=null;function js(e){if(e=Fl(e)){if(typeof Ea!="function")throw Error(N(280));var t=e.stateNode;t&&(t=ui(t),Ea(e.stateNode,e.type,t))}}function Kf(e){vr?gr?gr.push(e):gr=[e]:vr=e}function Yf(){if(vr){var e=vr,t=gr;if(gr=vr=null,js(e),t)for(e=0;e>>=0,e===0?32:31-(mm(e)/vm|0)|0}var Jl=64,Zl=4194304;function el(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 Do(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=el(a):(o&=i,o!==0&&(r=el(o)))}else i=n&~l,i!==0?r=el(i):o!==0&&(r=el(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Ol(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-yt(t),e[t]=n}function Sm(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=ol),Xs=" ",Gs=!1;function pd(e,t){switch(e){case"keyup":return Xm.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function hd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var or=!1;function Jm(e,t){switch(e){case"compositionend":return hd(t);case"keypress":return t.which!==32?null:(Gs=!0,Xs);case"textInput":return e=t.data,e===Xs&&Gs?null:e;default:return null}}function Zm(e,t){if(or)return e==="compositionend"||!_u&&pd(e,t)?(e=fd(),mo=Cu=on=null,or=!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=bs(n)}}function yd(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?yd(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function wd(){for(var e=window,t=Po();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Po(e.document)}return t}function Lu(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 iv(e){var t=wd(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&yd(n.ownerDocument.documentElement,n)){if(r!==null&&Lu(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=ec(n,o);var i=ec(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.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,ir=null,La=null,al=null,Ta=!1;function tc(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Ta||ir==null||ir!==Po(r)||(r=ir,"selectionStart"in r&&Lu(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}),al&&wl(al,r)||(al=r,r=Oo(La,"onSelect"),0sr||(e.current=Fa[sr],Fa[sr]=null,sr--)}function ae(e,t){sr++,Fa[sr]=e.current,e.current=t}var yn={},Fe=En(yn),Ke=En(!1),jn=yn;function kr(e,t){var n=e.type.contextTypes;if(!n)return yn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Ye(e){return e=e.childContextTypes,e!=null}function Fo(){se(Ke),se(Fe)}function uc(e,t,n){if(Fe.current!==yn)throw Error(N(168));ae(Fe,t),ae(Ke,n)}function Ld(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(N(108,tm(e)||"Unknown",l));return me({},n,r)}function Ao(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||yn,jn=Fe.current,ae(Fe,e),ae(Ke,Ke.current),!0}function sc(e,t,n){var r=e.stateNode;if(!r)throw Error(N(169));n?(e=Ld(e,t,jn),r.__reactInternalMemoizedMergedChildContext=e,se(Ke),se(Fe),ae(Fe,e)):se(Ke),ae(Ke,n)}var It=null,si=!1,Xi=!1;function Td(e){It===null?It=[e]:It.push(e)}function yv(e){si=!0,Td(e)}function kn(){if(!Xi&&It!==null){Xi=!0;var e=0,t=ne;try{var n=It;for(ne=1;e>=i,l-=i,Ut=1<<32-yt(t)+l|n<_?(I=y,y=null):I=y.sibling;var M=p(h,y,m[_],E);if(M===null){y===null&&(y=I);break}e&&y&&M.alternate===null&&t(h,y),d=o(M,d,_),T===null?R=M:T.sibling=M,T=M,y=I}if(_===m.length)return n(h,y),fe&&Tn(h,_),R;if(y===null){for(;__?(I=y,y=null):I=y.sibling;var H=p(h,y,M.value,E);if(H===null){y===null&&(y=I);break}e&&y&&H.alternate===null&&t(h,y),d=o(H,d,_),T===null?R=H:T.sibling=H,T=H,y=I}if(M.done)return n(h,y),fe&&Tn(h,_),R;if(y===null){for(;!M.done;_++,M=m.next())M=c(h,M.value,E),M!==null&&(d=o(M,d,_),T===null?R=M:T.sibling=M,T=M);return fe&&Tn(h,_),R}for(y=r(h,y);!M.done;_++,M=m.next())M=v(y,h,_,M.value,E),M!==null&&(e&&M.alternate!==null&&y.delete(M.key===null?_:M.key),d=o(M,d,_),T===null?R=M:T.sibling=M,T=M);return e&&y.forEach(function(Y){return t(h,Y)}),fe&&Tn(h,_),R}function P(h,d,m,E){if(typeof m=="object"&&m!==null&&m.type===lr&&m.key===null&&(m=m.props.children),typeof m=="object"&&m!==null){switch(m.$$typeof){case Yl:e:{for(var R=m.key,T=d;T!==null;){if(T.key===R){if(R=m.type,R===lr){if(T.tag===7){n(h,T.sibling),d=l(T,m.props.children),d.return=h,h=d;break e}}else if(T.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===tn&&dc(R)===T.type){n(h,T.sibling),d=l(T,m.props),d.ref=Yr(h,T,m),d.return=h,h=d;break e}n(h,T);break}else t(h,T);T=T.sibling}m.type===lr?(d=Un(m.props.children,h.mode,E,m.key),d.return=h,h=d):(E=ko(m.type,m.key,m.props,null,h.mode,E),E.ref=Yr(h,d,m),E.return=h,h=E)}return i(h);case rr:e:{for(T=m.key;d!==null;){if(d.key===T)if(d.tag===4&&d.stateNode.containerInfo===m.containerInfo&&d.stateNode.implementation===m.implementation){n(h,d.sibling),d=l(d,m.children||[]),d.return=h,h=d;break e}else{n(h,d);break}else t(h,d);d=d.sibling}d=na(m,h.mode,E),d.return=h,h=d}return i(h);case tn:return T=m._init,P(h,d,T(m._payload),E)}if(br(m))return w(h,d,m,E);if(Vr(m))return S(h,d,m,E);lo(h,m)}return typeof m=="string"&&m!==""||typeof m=="number"?(m=""+m,d!==null&&d.tag===6?(n(h,d.sibling),d=l(d,m),d.return=h,h=d):(n(h,d),d=ta(m,h.mode,E),d.return=h,h=d),i(h)):n(h,d)}return P}var Rr=Od(!0),zd=Od(!1),jo=En(null),Bo=null,dr=null,Mu=null;function Ou(){Mu=dr=Bo=null}function zu(e){var t=jo.current;se(jo),e._currentValue=t}function Ua(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function wr(e,t){Bo=e,Mu=dr=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&t&&(Qe=!0),e.firstContext=null)}function ct(e){var t=e._currentValue;if(Mu!==e)if(e={context:e,memoizedValue:t,next:null},dr===null){if(Bo===null)throw Error(N(308));dr=e,Bo.dependencies={lanes:0,firstContext:e}}else dr=dr.next=e;return t}var zn=null;function Fu(e){zn===null?zn=[e]:zn.push(e)}function Fd(e,t,n,r){var l=t.interleaved;return l===null?(n.next=n,Fu(t)):(n.next=l.next,l.next=n),t.interleaved=n,Ht(e,r)}function Ht(e,t){e.lanes|=t;var n=e.alternate;for(n!==null&&(n.lanes|=t),n=e,e=e.return;e!==null;)e.childLanes|=t,n=e.alternate,n!==null&&(n.childLanes|=t),n=e,e=e.return;return n.tag===3?n.stateNode:null}var nn=!1;function Au(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ad(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Bt(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function pn(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,q&2){var l=r.pending;return l===null?t.next=t:(t.next=l.next,l.next=t),r.pending=t,Ht(e,n)}return l=r.interleaved,l===null?(t.next=t,Fu(r)):(t.next=l.next,l.next=t),r.interleaved=t,Ht(e,n)}function go(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194240)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xu(e,n)}}function pc(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var l=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var i={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};o===null?l=o=i:o=o.next=i,n=n.next}while(n!==null);o===null?l=o=t:o=o.next=t}else l=o=t;n={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function $o(e,t,n,r){var l=e.updateQueue;nn=!1;var o=l.firstBaseUpdate,i=l.lastBaseUpdate,a=l.shared.pending;if(a!==null){l.shared.pending=null;var u=a,s=u.next;u.next=null,i===null?o=s:i.next=s,i=u;var f=e.alternate;f!==null&&(f=f.updateQueue,a=f.lastBaseUpdate,a!==i&&(a===null?f.firstBaseUpdate=s:a.next=s,f.lastBaseUpdate=u))}if(o!==null){var c=l.baseState;i=0,f=s=u=null,a=o;do{var p=a.lane,v=a.eventTime;if((r&p)===p){f!==null&&(f=f.next={eventTime:v,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var w=e,S=a;switch(p=t,v=n,S.tag){case 1:if(w=S.payload,typeof w=="function"){c=w.call(v,c,p);break e}c=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,p=typeof w=="function"?w.call(v,c,p):w,p==null)break e;c=me({},c,p);break e;case 2:nn=!0}}a.callback!==null&&a.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[a]:p.push(a))}else v={eventTime:v,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},f===null?(s=f=v,u=c):f=f.next=v,i|=p;if(a=a.next,a===null){if(a=l.shared.pending,a===null)break;p=a,a=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(f===null&&(u=c),l.baseState=u,l.firstBaseUpdate=s,l.lastBaseUpdate=f,t=l.shared.interleaved,t!==null){l=t;do i|=l.lane,l=l.next;while(l!==t)}else o===null&&(l.shared.lanes=0);Vn|=i,e.lanes=i,e.memoizedState=c}}function hc(e,t,n){if(e=t.effects,t.effects=null,e!==null)for(t=0;tn?n:4,e(!0);var r=Ji.transition;Ji.transition={};try{e(!1),t()}finally{ne=n,Ji.transition=r}}function bd(){return ft().memoizedState}function Ev(e,t,n){var r=mn(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ep(e))tp(t,n);else if(n=Fd(e,t,n,r),n!==null){var l=Be();wt(n,e,r,l),np(n,t,r)}}function kv(e,t,n){var r=mn(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ep(e))tp(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,St(a,i)){var u=t.interleaved;u===null?(l.next=l,Fu(t)):(l.next=u.next,u.next=l),t.interleaved=l;return}}catch{}finally{}n=Fd(e,t,l,r),n!==null&&(l=Be(),wt(n,e,r,l),np(n,t,r))}}function ep(e){var t=e.alternate;return e===he||t!==null&&t===he}function tp(e,t){ul=Wo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function np(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,xu(e,n)}}var Ho={readContext:ct,useCallback:Me,useContext:Me,useEffect:Me,useImperativeHandle:Me,useInsertionEffect:Me,useLayoutEffect:Me,useMemo:Me,useReducer:Me,useRef:Me,useState:Me,useDebugValue:Me,useDeferredValue:Me,useTransition:Me,useMutableSource:Me,useSyncExternalStore:Me,useId:Me,unstable_isNewReconciler:!1},Cv={readContext:ct,useCallback:function(e,t){return Pt().memoizedState=[e,t===void 0?null:t],e},useContext:ct,useEffect:vc,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,wo(4194308,4,Xd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return wo(4194308,4,e,t)},useInsertionEffect:function(e,t){return wo(4,2,e,t)},useMemo:function(e,t){var n=Pt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Pt();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=Ev.bind(null,he,e),[r.memoizedState,e]},useRef:function(e){var t=Pt();return e={current:e},t.memoizedState=e},useState:mc,useDebugValue:Hu,useDeferredValue:function(e){return Pt().memoizedState=e},useTransition:function(){var e=mc(!1),t=e[0];return e=xv.bind(null,e[1]),Pt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=he,l=Pt();if(fe){if(n===void 0)throw Error(N(407));n=n()}else{if(n=t(),_e===null)throw Error(N(349));$n&30||Bd(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,vc(Vd.bind(null,r,o,e),[e]),r.flags|=2048,_l(9,$d.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Pt(),t=_e.identifierPrefix;if(fe){var n=jt,r=Ut;n=(r&~(1<<32-yt(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Rl++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[_t]=t,e[El]=r,dp(e,t,!1,!1),t.stateNode=e;e:{switch(i=Sa(n,r),n){case"dialog":ue("cancel",e),ue("close",e),l=r;break;case"iframe":case"object":case"embed":ue("load",e),l=r;break;case"video":case"audio":for(l=0;lLr&&(t.flags|=128,r=!0,Xr(o,!1),t.lanes=4194304)}else{if(!r)if(e=Vo(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),Xr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!fe)return Oe(t),null}else 2*Se()-o.renderingStartTime>Lr&&n!==1073741824&&(t.flags|=128,r=!0,Xr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=Se(),t.sibling=null,n=pe.current,ae(pe,r?n&1|2:n&1),t):(Oe(t),null);case 22:case 23:return Ju(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?Je&1073741824&&(Oe(t),t.subtreeFlags&6&&(t.flags|=8192)):Oe(t),null;case 24:return null;case 25:return null}throw Error(N(156,t.tag))}function Mv(e,t){switch(Du(t),t.tag){case 1:return Ye(t.type)&&Fo(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return Pr(),se(Ke),se(Fe),ju(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return Uu(t),null;case 13:if(se(pe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(N(340));Cr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return se(pe),null;case 4:return Pr(),null;case 10:return zu(t.type._context),null;case 22:case 23:return Ju(),null;case 24:return null;default:return null}}var io=!1,ze=!1,Ov=typeof WeakSet=="function"?WeakSet:Set,z=null;function pr(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){we(e,t,r)}else n.current=null}function Ya(e,t,n){try{n()}catch(r){we(e,t,r)}}var _c=!1;function zv(e,t){if(Da=No,e=wd(),Lu(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,u=-1,s=0,f=0,c=e,p=null;t:for(;;){for(var v;c!==n||l!==0&&c.nodeType!==3||(a=i+l),c!==o||r!==0&&c.nodeType!==3||(u=i+r),c.nodeType===3&&(i+=c.nodeValue.length),(v=c.firstChild)!==null;)p=c,c=v;for(;;){if(c===e)break t;if(p===n&&++s===l&&(a=i),p===o&&++f===r&&(u=i),(v=c.nextSibling)!==null)break;c=p,p=c.parentNode}c=v}n=a===-1||u===-1?null:{start:a,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(Na={focusedElem:e,selectionRange:n},No=!1,z=t;z!==null;)if(t=z,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,z=e;else for(;z!==null;){t=z;try{var w=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,P=w.memoizedState,h=t.stateNode,d=h.getSnapshotBeforeUpdate(t.elementType===t.type?S:ht(t.type,S),P);h.__reactInternalSnapshotBeforeUpdate=d}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(E){we(t,t.return,E)}if(e=t.sibling,e!==null){e.return=t.return,z=e;break}z=t.return}return w=_c,_c=!1,w}function sl(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Ya(t,n,o)}l=l.next}while(l!==r)}}function di(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 Xa(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 mp(e){var t=e.alternate;t!==null&&(e.alternate=null,mp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[_t],delete t[El],delete t[za],delete t[vv],delete t[gv])),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 vp(e){return e.tag===5||e.tag===3||e.tag===4}function Lc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||vp(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 Ga(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=zo));else if(r!==4&&(e=e.child,e!==null))for(Ga(e,t,n),e=e.sibling;e!==null;)Ga(e,t,n),e=e.sibling}function Ja(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(Ja(e,t,n),e=e.sibling;e!==null;)Ja(e,t,n),e=e.sibling}var Te=null,mt=!1;function bt(e,t,n){for(n=n.child;n!==null;)gp(e,t,n),n=n.sibling}function gp(e,t,n){if(Tt&&typeof Tt.onCommitFiberUnmount=="function")try{Tt.onCommitFiberUnmount(li,n)}catch{}switch(n.tag){case 5:ze||pr(n,t);case 6:var r=Te,l=mt;Te=null,bt(e,t,n),Te=r,mt=l,Te!==null&&(mt?(e=Te,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):Te.removeChild(n.stateNode));break;case 18:Te!==null&&(mt?(e=Te,n=n.stateNode,e.nodeType===8?Yi(e.parentNode,n):e.nodeType===1&&Yi(e,n),gl(e)):Yi(Te,n.stateNode));break;case 4:r=Te,l=mt,Te=n.stateNode.containerInfo,mt=!0,bt(e,t,n),Te=r,mt=l;break;case 0:case 11:case 14:case 15:if(!ze&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&Ya(n,t,i),l=l.next}while(l!==r)}bt(e,t,n);break;case 1:if(!ze&&(pr(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){we(n,t,a)}bt(e,t,n);break;case 21:bt(e,t,n);break;case 22:n.mode&1?(ze=(r=ze)||n.memoizedState!==null,bt(e,t,n),ze=r):bt(e,t,n);break;default:bt(e,t,n)}}function Tc(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new Ov),t.forEach(function(r){var l=Wv.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function pt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=Se()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Av(r/1960))-r,10e?16:e,an===null)var r=!1;else{if(e=an,an=null,Yo=0,q&6)throw Error(N(331));var l=q;for(q|=4,z=e.current;z!==null;){var o=z,i=o.child;if(z.flags&16){var a=o.deletions;if(a!==null){for(var u=0;uSe()-Xu?In(e,0):Yu|=n),Xe(e,t)}function Rp(e,t){t===0&&(e.mode&1?(t=Zl,Zl<<=1,!(Zl&130023424)&&(Zl=4194304)):t=1);var n=Be();e=Ht(e,t),e!==null&&(Ol(e,t,n),Xe(e,n))}function Vv(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Rp(e,n)}function Wv(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(N(314))}r!==null&&r.delete(t),Rp(e,n)}var Pp;Pp=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||Ke.current)Qe=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Qe=!1,Dv(e,t,n);Qe=!!(e.flags&131072)}else Qe=!1,fe&&t.flags&1048576&&Dd(t,Uo,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;So(e,t),e=t.pendingProps;var l=kr(t,Fe.current);wr(t,n),l=$u(null,t,r,e,l,n);var o=Vu();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ye(r)?(o=!0,Ao(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Au(t),l.updater=fi,t.stateNode=l,l._reactInternals=t,Ba(t,r,e,n),t=Wa(null,t,r,!0,o,n)):(t.tag=0,fe&&o&&Tu(t),je(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(So(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Qv(r),e=ht(r,e),l){case 0:t=Va(null,t,r,e,n);break e;case 1:t=Cc(null,t,r,e,n);break e;case 11:t=Ec(null,t,r,e,n);break e;case 14:t=kc(null,t,r,ht(r.type,e),n);break e}throw Error(N(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),Va(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),Cc(e,t,r,l,n);case 3:e:{if(sp(t),e===null)throw Error(N(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ad(e,t),$o(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=_r(Error(N(423)),t),t=Rc(e,t,r,n,l);break e}else if(r!==l){l=_r(Error(N(424)),t),t=Rc(e,t,r,n,l);break e}else for(be=dn(t.stateNode.containerInfo.firstChild),et=t,fe=!0,gt=null,n=zd(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Cr(),r===l){t=Qt(e,t,n);break e}je(e,t,r,n)}t=t.child}return t;case 5:return Id(t),e===null&&Ia(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Ma(r,l)?i=null:o!==null&&Ma(r,o)&&(t.flags|=32),up(e,t),je(e,t,i,n),t.child;case 6:return e===null&&Ia(t),null;case 13:return cp(e,t,n);case 4:return Iu(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Rr(t,null,r,n):je(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),Ec(e,t,r,l,n);case 7:return je(e,t,t.pendingProps,n),t.child;case 8:return je(e,t,t.pendingProps.children,n),t.child;case 12:return je(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,ae(jo,r._currentValue),r._currentValue=i,o!==null)if(St(o.value,i)){if(o.children===l.children&&!Ke.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){i=o.child;for(var u=a.firstContext;u!==null;){if(u.context===r){if(o.tag===1){u=Bt(-1,n&-n),u.tag=2;var s=o.updateQueue;if(s!==null){s=s.shared;var f=s.pending;f===null?u.next=u:(u.next=f.next,f.next=u),s.pending=u}}o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),Ua(o.return,n,t),a.lanes|=n;break}u=u.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(N(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Ua(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}je(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,wr(t,n),l=ct(l),r=r(l),t.flags|=1,je(e,t,r,n),t.child;case 14:return r=t.type,l=ht(r,t.pendingProps),l=ht(r.type,l),kc(e,t,r,l,n);case 15:return ip(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ht(r,l),So(e,t),t.tag=1,Ye(r)?(e=!0,Ao(t)):e=!1,wr(t,n),rp(t,r,l),Ba(t,r,l,n),Wa(null,t,r,!0,e,n);case 19:return fp(e,t,n);case 22:return ap(e,t,n)}throw Error(N(156,t.tag))};function _p(e,t){return ed(e,t)}function Hv(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 ut(e,t,n,r){return new Hv(e,t,n,r)}function qu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Qv(e){if(typeof e=="function")return qu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===gu)return 11;if(e===yu)return 14}return 2}function vn(e,t){var n=e.alternate;return n===null?(n=ut(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 ko(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")qu(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case lr:return Un(n.children,l,o,t);case vu:i=8,l|=8;break;case ca:return e=ut(12,n,t,l|2),e.elementType=ca,e.lanes=o,e;case fa:return e=ut(13,n,t,l),e.elementType=fa,e.lanes=o,e;case da:return e=ut(19,n,t,l),e.elementType=da,e.lanes=o,e;case If:return hi(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ff:i=10;break e;case Af:i=9;break e;case gu:i=11;break e;case yu:i=14;break e;case tn:i=16,r=null;break e}throw Error(N(130,e==null?e:typeof e,""))}return t=ut(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function Un(e,t,n,r){return e=ut(7,e,r,t),e.lanes=n,e}function hi(e,t,n,r){return e=ut(22,e,r,t),e.elementType=If,e.lanes=n,e.stateNode={isHidden:!1},e}function ta(e,t,n){return e=ut(6,e,null,t),e.lanes=n,e}function na(e,t,n){return t=ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Kv(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Ai(0),this.expirationTimes=Ai(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ai(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function bu(e,t,n,r,l,o,i,a,u){return e=new Kv(e,t,n,a,u),t===1?(t=1,o===!0&&(t|=8)):t=0,o=ut(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Au(o),e}function Yv(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Np)}catch(e){console.error(e)}}Np(),Nf.exports=rt;var wi=Nf.exports;const qv=wf(wi),bv=yf({__proto__:null,default:qv},[wi]);var Ic=wi;Ns.createRoot=Ic.createRoot,Ns.hydrateRoot=Ic.hydrateRoot;/** * @remix-run/router v1.23.3 * * Copyright (c) Remix Software Inc. * * 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 ce(){return ce=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function Hn(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function tg(){return Math.random().toString(36).substr(2,8)}function jc(e,t){return{usr:e.state,key:e.key,idx:t}}function Tl(e,t,n,r){return n===void 0&&(n=null),ce({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Cn(t):t,{state:n,key:t&&t.key||r||tg()})}function Qn(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Cn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function ng(e,t,n,r){r===void 0&&(r={});let{window:l=document.defaultView,v5Compat:o=!1}=r,i=l.history,a=Ee.Pop,u=null,s=f();s==null&&(s=0,i.replaceState(ce({},i.state,{idx:s}),""));function f(){return(i.state||{idx:null}).idx}function c(){a=Ee.Pop;let P=f(),h=P==null?null:P-s;s=P,u&&u({action:a,location:S.location,delta:h})}function p(P,h){a=Ee.Push;let d=Tl(S.location,P,h);s=f()+1;let m=jc(d,s),E=S.createHref(d);try{i.pushState(m,"",E)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;l.location.assign(E)}o&&u&&u({action:a,location:S.location,delta:1})}function v(P,h){a=Ee.Replace;let d=Tl(S.location,P,h);s=f();let m=jc(d,s),E=S.createHref(d);i.replaceState(m,"",E),o&&u&&u({action:a,location:S.location,delta:0})}function w(P){let h=l.location.origin!=="null"?l.location.origin:l.location.href,d=typeof P=="string"?P:Qn(P);return d=d.replace(/ $/,"%20"),Q(h,"No window.location.(origin|href) available to create URL for href: "+d),new URL(d,h)}let S={get action(){return a},get location(){return e(l,i)},listen(P){if(u)throw new Error("A history only accepts one active listener");return l.addEventListener(Uc,c),u=P,()=>{l.removeEventListener(Uc,c),u=null}},createHref(P){return t(l,P)},createURL:w,encodeLocation(P){let h=w(P);return{pathname:h.pathname,search:h.search,hash:h.hash}},push:p,replace:v,go(P){return i.go(P)}};return S}var te;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(te||(te={}));const rg=new Set(["lazy","caseSensitive","path","id","index","children"]);function lg(e){return e.index===!0}function Jo(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((l,o)=>{let i=[...n,String(o)],a=typeof l.id=="string"?l.id:i.join("-");if(Q(l.index!==!0||!l.children,"Cannot specify children on an index route"),Q(!r[a],'Found a route id collision on id "'+a+`". Route id's must be globally unique within Data Router usages`),lg(l)){let u=ce({},l,t(l),{id:a});return r[a]=u,u}else{let u=ce({},l,t(l),{id:a,children:void 0});return r[a]=u,l.children&&(u.children=Jo(l.children,t,i,r)),u}})}function Nn(e,t,n){return n===void 0&&(n="/"),Co(e,t,n,!1)}function Co(e,t,n,r){let l=typeof t=="string"?Cn(t):t,o=xt(l.pathname||"/",n);if(o==null)return null;let i=Mp(e);ig(i);let a=null,u=gg(o);for(let s=0;a==null&&s{let u={relativePath:a===void 0?o.path||"":a,caseSensitive:o.caseSensitive===!0,childrenIndex:i,route:o};u.relativePath.startsWith("/")&&(Q(u.relativePath.startsWith(r),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(r.length));let s=$t([r,u.relativePath]),f=n.concat(u);o.children&&o.children.length>0&&(Q(o.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+s+'".')),Mp(o.children,t,f,s)),!(o.path==null&&!o.index)&&t.push({path:s,score:pg(s,o.index),routesMeta:f})};return e.forEach((o,i)=>{var a;if(o.path===""||!((a=o.path)!=null&&a.includes("?")))l(o,i);else for(let u of Op(o.path))l(o,i,u)}),t}function Op(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,l=n.endsWith("?"),o=n.replace(/\?$/,"");if(r.length===0)return l?[o,""]:[o];let i=Op(r.join("/")),a=[];return a.push(...i.map(u=>u===""?o:[o,u].join("/"))),l&&a.push(...i),a.map(u=>e.startsWith("/")&&u===""?"/":u)}function ig(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:hg(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const ag=/^:[\w-]+$/,ug=3,sg=2,cg=1,fg=10,dg=-2,Bc=e=>e==="*";function pg(e,t){let n=e.split("/"),r=n.length;return n.some(Bc)&&(r+=dg),t&&(r+=sg),n.filter(l=>!Bc(l)).reduce((l,o)=>l+(ag.test(o)?ug:o===""?cg:fg),r)}function hg(e,t){return e.length===t.length&&e.slice(0,-1).every((r,l)=>r===t[l])?e[e.length-1]-t[t.length-1]:0}function mg(e,t,n){n===void 0&&(n=!1);let{routesMeta:r}=e,l={},o="/",i=[];for(let a=0;a{let{paramName:p,isOptional:v}=f;if(p==="*"){let S=a[c]||"";i=o.slice(0,o.length-S.length).replace(/(.)\/+$/,"$1")}const w=a[c];return v&&!w?s[p]=void 0:s[p]=(w||"").replace(/%2F/g,"/"),s},{}),pathname:o,pathnameBase:i,pattern:e}}function vg(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),Hn(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],l="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,a,u)=>(r.push({paramName:a,isOptional:u!=null}),u?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),l+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?l+="\\/*$":e!==""&&e!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,t?void 0:"i"),r]}function gg(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Hn(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function xt(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}const yg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,wg=e=>yg.test(e);function Sg(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:l=""}=typeof e=="string"?Cn(e):e,o;if(n)if(wg(n))o=n;else{if(n.includes("//")){let i=n;n=rs(n),Hn(!1,"Pathnames cannot have embedded double slashes - normalizing "+(i+" -> "+n))}n.startsWith("/")?o=$c(n.substring(1),"/"):o=$c(n,t)}else o=t;return{pathname:o,search:Eg(r),hash:kg(l)}}function $c(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(l=>{l===".."?n.length>1&&n.pop():l!=="."&&n.push(l)}),n.length>1?n.join("/"):"/"}function ra(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function zp(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Si(e,t){let n=zp(e);return t?n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function xi(e,t,n,r){r===void 0&&(r=!1);let l;typeof e=="string"?l=Cn(e):(l=ce({},e),Q(!l.pathname||!l.pathname.includes("?"),ra("?","pathname","search",l)),Q(!l.pathname||!l.pathname.includes("#"),ra("#","pathname","hash",l)),Q(!l.search||!l.search.includes("#"),ra("#","search","hash",l)));let o=e===""||l.pathname==="",i=o?"/":l.pathname,a;if(i==null)a=n;else{let c=t.length-1;if(!r&&i.startsWith("..")){let p=i.split("/");for(;p[0]==="..";)p.shift(),c-=1;l.pathname=p.join("/")}a=c>=0?t[c]:"/"}let u=Sg(l,a),s=i&&i!=="/"&&i.endsWith("/"),f=(o||i===".")&&n.endsWith("/");return!u.pathname.endsWith("/")&&(s||f)&&(u.pathname+="/"),u}const rs=e=>e.replace(/\/\/+/g,"/"),$t=e=>rs(e.join("/")),xg=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Eg=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,kg=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class qo{constructor(t,n,r,l){l===void 0&&(l=!1),this.status=t,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Dl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const Fp=["post","put","patch","delete"],Cg=new Set(Fp),Rg=["get",...Fp],Pg=new Set(Rg),_g=new Set([301,302,303,307,308]),Lg=new Set([307,308]),la={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Tg={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},nr={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},ls=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dg=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),Ap="remix-router-transitions";function Ng(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Q(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let l;if(e.mapRouteProperties)l=e.mapRouteProperties;else if(e.detectErrorBoundary){let g=e.detectErrorBoundary;l=x=>({hasErrorBoundary:g(x)})}else l=Dg;let o={},i=Jo(e.routes,l,void 0,o),a,u=e.basename||"/",s=e.dataStrategy||Fg,f=e.patchRoutesOnNavigation,c=ce({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},e.future),p=null,v=new Set,w=null,S=null,P=null,h=e.hydrationData!=null,d=Nn(i,e.history.location,u),m=!1,E=null;if(d==null&&!f){let g=We(404,{pathname:e.history.location.pathname}),{matches:x,route:k}=qc(i);d=x,E={[k.id]:g}}d&&!e.hydrationData&&Vl(d,i,e.history.location.pathname).active&&(d=null);let R;if(d)if(d.some(g=>g.route.lazy))R=!1;else if(!d.some(g=>g.route.loader))R=!0;else if(c.v7_partialHydration){let g=e.hydrationData?e.hydrationData.loaderData:null,x=e.hydrationData?e.hydrationData.errors:null;if(x){let k=d.findIndex(D=>x[D.route.id]!==void 0);R=d.slice(0,k+1).every(D=>!nu(D.route,g,x))}else R=d.every(k=>!nu(k.route,g,x))}else R=e.hydrationData!=null;else if(R=!1,d=[],c.v7_partialHydration){let g=Vl(null,i,e.history.location.pathname);g.active&&g.matches&&(m=!0,d=g.matches)}let T,y={historyAction:e.history.action,location:e.history.location,matches:d,initialized:R,navigation:la,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||E,fetchers:new Map,blockers:new Map},_=Ee.Pop,I=!1,M,H=!1,Y=new Map,J=null,X=!1,ve=!1,oe=[],de=new Set,L=new Map,U=0,V=-1,re=new Map,le=new Set,dt=new Map,Ge=new Map,Ae=new Set,Ie=new Map,ot=new Map,jl;function uh(){if(p=e.history.listen(g=>{let{action:x,location:k,delta:D}=g;if(jl){jl(),jl=void 0;return}Hn(ot.size===0||D!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let O=Cs({currentLocation:y.location,nextLocation:k,historyAction:x});if(O&&D!=null){let $=new Promise(W=>{jl=W});e.history.go(D*-1),$l(O,{state:"blocked",location:k,proceed(){$l(O,{state:"proceeding",proceed:void 0,reset:void 0,location:k}),$.then(()=>e.history.go(D))},reset(){let W=new Map(y.blockers);W.set(O,nr),Ue({blockers:W})}});return}return Rn(x,k)}),n){Gg(t,Y);let g=()=>Jg(t,Y);t.addEventListener("pagehide",g),J=()=>t.removeEventListener("pagehide",g)}return y.initialized||Rn(Ee.Pop,y.location,{initialHydration:!0}),T}function sh(){p&&p(),J&&J(),v.clear(),M&&M.abort(),y.fetchers.forEach((g,x)=>Bl(x)),y.blockers.forEach((g,x)=>ks(x))}function ch(g){return v.add(g),()=>v.delete(g)}function Ue(g,x){x===void 0&&(x={}),y=ce({},y,g);let k=[],D=[];c.v7_fetcherPersist&&y.fetchers.forEach((O,$)=>{O.state==="idle"&&(Ae.has($)?D.push($):k.push($))}),Ae.forEach(O=>{!y.fetchers.has(O)&&!L.has(O)&&D.push(O)}),[...v].forEach(O=>O(y,{deletedFetchers:D,viewTransitionOpts:x.viewTransitionOpts,flushSync:x.flushSync===!0})),c.v7_fetcherPersist?(k.forEach(O=>y.fetchers.delete(O)),D.forEach(O=>Bl(O))):D.forEach(O=>Ae.delete(O))}function Jn(g,x,k){var D,O;let{flushSync:$}=k===void 0?{}:k,W=y.actionData!=null&&y.navigation.formMethod!=null&&vt(y.navigation.formMethod)&&y.navigation.state==="loading"&&((D=g.state)==null?void 0:D._isRedirect)!==!0,A;x.actionData?Object.keys(x.actionData).length>0?A=x.actionData:A=null:W?A=y.actionData:A=null;let j=x.loaderData?Jc(y.loaderData,x.loaderData,x.matches||[],x.errors):y.loaderData,F=y.blockers;F.size>0&&(F=new Map(F),F.forEach((Z,Le)=>F.set(Le,nr)));let B=I===!0||y.navigation.formMethod!=null&&vt(y.navigation.formMethod)&&((O=g.state)==null?void 0:O._isRedirect)!==!0;a&&(i=a,a=void 0),X||_===Ee.Pop||(_===Ee.Push?e.history.push(g,g.state):_===Ee.Replace&&e.history.replace(g,g.state));let K;if(_===Ee.Pop){let Z=Y.get(y.location.pathname);Z&&Z.has(g.pathname)?K={currentLocation:y.location,nextLocation:g}:Y.has(g.pathname)&&(K={currentLocation:g,nextLocation:y.location})}else if(H){let Z=Y.get(y.location.pathname);Z?Z.add(g.pathname):(Z=new Set([g.pathname]),Y.set(y.location.pathname,Z)),K={currentLocation:y.location,nextLocation:g}}Ue(ce({},x,{actionData:A,loaderData:j,historyAction:_,location:g,initialized:!0,navigation:la,revalidation:"idle",restoreScrollPosition:Ps(g,x.matches||y.matches),preventScrollReset:B,blockers:F}),{viewTransitionOpts:K,flushSync:$===!0}),_=Ee.Pop,I=!1,H=!1,X=!1,ve=!1,oe=[]}async function vs(g,x){if(typeof g=="number"){e.history.go(g);return}let k=tu(y.location,y.matches,u,c.v7_prependBasename,g,c.v7_relativeSplatPath,x==null?void 0:x.fromRouteId,x==null?void 0:x.relative),{path:D,submission:O,error:$}=Vc(c.v7_normalizeFormMethod,!1,k,x),W=y.location,A=Tl(y.location,D,x&&x.state);A=ce({},A,e.history.encodeLocation(A));let j=x&&x.replace!=null?x.replace:void 0,F=Ee.Push;j===!0?F=Ee.Replace:j===!1||O!=null&&vt(O.formMethod)&&O.formAction===y.location.pathname+y.location.search&&(F=Ee.Replace);let B=x&&"preventScrollReset"in x?x.preventScrollReset===!0:void 0,K=(x&&x.flushSync)===!0,Z=Cs({currentLocation:W,nextLocation:A,historyAction:F});if(Z){$l(Z,{state:"blocked",location:A,proceed(){$l(Z,{state:"proceeding",proceed:void 0,reset:void 0,location:A}),vs(g,x)},reset(){let Le=new Map(y.blockers);Le.set(Z,nr),Ue({blockers:Le})}});return}return await Rn(F,A,{submission:O,pendingError:$,preventScrollReset:B,replace:x&&x.replace,enableViewTransition:x&&x.viewTransition,flushSync:K})}function fh(){if(_i(),Ue({revalidation:"loading"}),y.navigation.state!=="submitting"){if(y.navigation.state==="idle"){Rn(y.historyAction,y.location,{startUninterruptedRevalidation:!0});return}Rn(_||y.historyAction,y.navigation.location,{overrideNavigation:y.navigation,enableViewTransition:H===!0})}}async function Rn(g,x,k){M&&M.abort(),M=null,_=g,X=(k&&k.startUninterruptedRevalidation)===!0,xh(y.location,y.matches),I=(k&&k.preventScrollReset)===!0,H=(k&&k.enableViewTransition)===!0;let D=a||i,O=k&&k.overrideNavigation,$=k!=null&&k.initialHydration&&y.matches&&y.matches.length>0&&!m?y.matches:Nn(D,x,u),W=(k&&k.flushSync)===!0;if($&&y.initialized&&!ve&&$g(y.location,x)&&!(k&&k.submission&&vt(k.submission.formMethod))){Jn(x,{matches:$},{flushSync:W});return}let A=Vl($,D,x.pathname);if(A.active&&A.matches&&($=A.matches),!$){let{error:ie,notFoundMatches:ee,route:ge}=Li(x.pathname);Jn(x,{matches:ee,loaderData:{},errors:{[ge.id]:ie}},{flushSync:W});return}M=new AbortController;let j=tr(e.history,x,M.signal,k&&k.submission),F;if(k&&k.pendingError)F=[Mn($).route.id,{type:te.error,error:k.pendingError}];else if(k&&k.submission&&vt(k.submission.formMethod)){let ie=await dh(j,x,k.submission,$,A.active,{replace:k.replace,flushSync:W});if(ie.shortCircuited)return;if(ie.pendingActionResult){let[ee,ge]=ie.pendingActionResult;if(Ze(ge)&&Dl(ge.error)&&ge.error.status===404){M=null,Jn(x,{matches:ie.matches,loaderData:{},errors:{[ee]:ge.error}});return}}$=ie.matches||$,F=ie.pendingActionResult,O=oa(x,k.submission),W=!1,A.active=!1,j=tr(e.history,j.url,j.signal)}let{shortCircuited:B,matches:K,loaderData:Z,errors:Le}=await ph(j,x,$,A.active,O,k&&k.submission,k&&k.fetcherSubmission,k&&k.replace,k&&k.initialHydration===!0,W,F);B||(M=null,Jn(x,ce({matches:K||$},Zc(F),{loaderData:Z,errors:Le})))}async function dh(g,x,k,D,O,$){$===void 0&&($={}),_i();let W=Yg(x,k);if(Ue({navigation:W},{flushSync:$.flushSync===!0}),O){let F=await Wl(D,x.pathname,g.signal);if(F.type==="aborted")return{shortCircuited:!0};if(F.type==="error"){let B=Mn(F.partialMatches).route.id;return{matches:F.partialMatches,pendingActionResult:[B,{type:te.error,error:F.error}]}}else if(F.matches)D=F.matches;else{let{notFoundMatches:B,error:K,route:Z}=Li(x.pathname);return{matches:B,pendingActionResult:[Z.id,{type:te.error,error:K}]}}}let A,j=nl(D,x);if(!j.route.action&&!j.route.lazy)A={type:te.error,error:We(405,{method:g.method,pathname:x.pathname,routeId:j.route.id})};else if(A=(await Ur("action",y,g,[j],D,null))[j.route.id],g.signal.aborted)return{shortCircuited:!0};if(An(A)){let F;return $&&$.replace!=null?F=$.replace:F=Yc(A.response.headers.get("Location"),new URL(g.url),u,e.history)===y.location.pathname+y.location.search,await Pn(g,A,!0,{submission:k,replace:F}),{shortCircuited:!0}}if(un(A))throw We(400,{type:"defer-action"});if(Ze(A)){let F=Mn(D,j.route.id);return($&&$.replace)!==!0&&(_=Ee.Push),{matches:D,pendingActionResult:[F.route.id,A]}}return{matches:D,pendingActionResult:[j.route.id,A]}}async function ph(g,x,k,D,O,$,W,A,j,F,B){let K=O||oa(x,$),Z=$||W||ef(K),Le=!X&&(!c.v7_partialHydration||!j);if(D){if(Le){let ye=gs(B);Ue(ce({navigation:K},ye!==void 0?{actionData:ye}:{}),{flushSync:F})}let b=await Wl(k,x.pathname,g.signal);if(b.type==="aborted")return{shortCircuited:!0};if(b.type==="error"){let ye=Mn(b.partialMatches).route.id;return{matches:b.partialMatches,loaderData:{},errors:{[ye]:b.error}}}else if(b.matches)k=b.matches;else{let{error:ye,notFoundMatches:qn,route:$r}=Li(x.pathname);return{matches:qn,loaderData:{},errors:{[$r.id]:ye}}}}let ie=a||i,[ee,ge]=Hc(e.history,y,k,Z,x,c.v7_partialHydration&&j===!0,c.v7_skipActionErrorRevalidation,ve,oe,de,Ae,dt,le,ie,u,B);if(Ti(b=>!(k&&k.some(ye=>ye.route.id===b))||ee&&ee.some(ye=>ye.route.id===b)),V=++U,ee.length===0&&ge.length===0){let b=xs();return Jn(x,ce({matches:k,loaderData:{},errors:B&&Ze(B[1])?{[B[0]]:B[1].error}:null},Zc(B),b?{fetchers:new Map(y.fetchers)}:{}),{flushSync:F}),{shortCircuited:!0}}if(Le){let b={};if(!D){b.navigation=K;let ye=gs(B);ye!==void 0&&(b.actionData=ye)}ge.length>0&&(b.fetchers=hh(ge)),Ue(b,{flushSync:F})}ge.forEach(b=>{qt(b.key),b.controller&&L.set(b.key,b.controller)});let Zn=()=>ge.forEach(b=>qt(b.key));M&&M.signal.addEventListener("abort",Zn);let{loaderResults:jr,fetcherResults:Ft}=await ys(y,k,ee,ge,g);if(g.signal.aborted)return{shortCircuited:!0};M&&M.signal.removeEventListener("abort",Zn),ge.forEach(b=>L.delete(b.key));let Ct=so(jr);if(Ct)return await Pn(g,Ct.result,!0,{replace:A}),{shortCircuited:!0};if(Ct=so(Ft),Ct)return le.add(Ct.key),await Pn(g,Ct.result,!0,{replace:A}),{shortCircuited:!0};let{loaderData:Di,errors:Br}=Gc(y,k,jr,B,ge,Ft,Ie);Ie.forEach((b,ye)=>{b.subscribe(qn=>{(qn||b.done)&&Ie.delete(ye)})}),c.v7_partialHydration&&j&&y.errors&&(Br=ce({},y.errors,Br));let _n=xs(),Hl=Es(V),Ql=_n||Hl||ge.length>0;return ce({matches:k,loaderData:Di,errors:Br},Ql?{fetchers:new Map(y.fetchers)}:{})}function gs(g){if(g&&!Ze(g[1]))return{[g[0]]:g[1].data};if(y.actionData)return Object.keys(y.actionData).length===0?null:y.actionData}function hh(g){return g.forEach(x=>{let k=y.fetchers.get(x.key),D=Jr(void 0,k?k.data:void 0);y.fetchers.set(x.key,D)}),new Map(y.fetchers)}function mh(g,x,k,D){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");qt(g);let O=(D&&D.flushSync)===!0,$=a||i,W=tu(y.location,y.matches,u,c.v7_prependBasename,k,c.v7_relativeSplatPath,x,D==null?void 0:D.relative),A=Nn($,W,u),j=Vl(A,$,W);if(j.active&&j.matches&&(A=j.matches),!A){zt(g,x,We(404,{pathname:W}),{flushSync:O});return}let{path:F,submission:B,error:K}=Vc(c.v7_normalizeFormMethod,!0,W,D);if(K){zt(g,x,K,{flushSync:O});return}let Z=nl(A,F),Le=(D&&D.preventScrollReset)===!0;if(B&&vt(B.formMethod)){vh(g,x,F,Z,A,j.active,O,Le,B);return}dt.set(g,{routeId:x,path:F}),gh(g,x,F,Z,A,j.active,O,Le,B)}async function vh(g,x,k,D,O,$,W,A,j){_i(),dt.delete(g);function F(xe){if(!xe.route.action&&!xe.route.lazy){let bn=We(405,{method:j.formMethod,pathname:k,routeId:x});return zt(g,x,bn,{flushSync:W}),!0}return!1}if(!$&&F(D))return;let B=y.fetchers.get(g);Zt(g,Xg(j,B),{flushSync:W});let K=new AbortController,Z=tr(e.history,k,K.signal,j);if($){let xe=await Wl(O,new URL(Z.url).pathname,Z.signal,g);if(xe.type==="aborted")return;if(xe.type==="error"){zt(g,x,xe.error,{flushSync:W});return}else if(xe.matches){if(O=xe.matches,D=nl(O,k),F(D))return}else{zt(g,x,We(404,{pathname:k}),{flushSync:W});return}}L.set(g,K);let Le=U,ee=(await Ur("action",y,Z,[D],O,g))[D.route.id];if(Z.signal.aborted){L.get(g)===K&&L.delete(g);return}if(c.v7_fetcherPersist&&Ae.has(g)){if(An(ee)||Ze(ee)){Zt(g,en(void 0));return}}else{if(An(ee))if(L.delete(g),V>Le){Zt(g,en(void 0));return}else return le.add(g),Zt(g,Jr(j)),Pn(Z,ee,!1,{fetcherSubmission:j,preventScrollReset:A});if(Ze(ee)){zt(g,x,ee.error);return}}if(un(ee))throw We(400,{type:"defer-action"});let ge=y.navigation.location||y.location,Zn=tr(e.history,ge,K.signal),jr=a||i,Ft=y.navigation.state!=="idle"?Nn(jr,y.navigation.location,u):y.matches;Q(Ft,"Didn't find any matches after fetcher action");let Ct=++U;re.set(g,Ct);let Di=Jr(j,ee.data);y.fetchers.set(g,Di);let[Br,_n]=Hc(e.history,y,Ft,j,ge,!1,c.v7_skipActionErrorRevalidation,ve,oe,de,Ae,dt,le,jr,u,[D.route.id,ee]);_n.filter(xe=>xe.key!==g).forEach(xe=>{let bn=xe.key,_s=y.fetchers.get(bn),Ch=Jr(void 0,_s?_s.data:void 0);y.fetchers.set(bn,Ch),qt(bn),xe.controller&&L.set(bn,xe.controller)}),Ue({fetchers:new Map(y.fetchers)});let Hl=()=>_n.forEach(xe=>qt(xe.key));K.signal.addEventListener("abort",Hl);let{loaderResults:Ql,fetcherResults:b}=await ys(y,Ft,Br,_n,Zn);if(K.signal.aborted)return;K.signal.removeEventListener("abort",Hl),re.delete(g),L.delete(g),_n.forEach(xe=>L.delete(xe.key));let ye=so(Ql);if(ye)return Pn(Zn,ye.result,!1,{preventScrollReset:A});if(ye=so(b),ye)return le.add(ye.key),Pn(Zn,ye.result,!1,{preventScrollReset:A});let{loaderData:qn,errors:$r}=Gc(y,Ft,Ql,void 0,_n,b,Ie);if(y.fetchers.has(g)){let xe=en(ee.data);y.fetchers.set(g,xe)}Es(Ct),y.navigation.state==="loading"&&Ct>V?(Q(_,"Expected pending action"),M&&M.abort(),Jn(y.navigation.location,{matches:Ft,loaderData:qn,errors:$r,fetchers:new Map(y.fetchers)})):(Ue({errors:$r,loaderData:Jc(y.loaderData,qn,Ft,$r),fetchers:new Map(y.fetchers)}),ve=!1)}async function gh(g,x,k,D,O,$,W,A,j){let F=y.fetchers.get(g);Zt(g,Jr(j,F?F.data:void 0),{flushSync:W});let B=new AbortController,K=tr(e.history,k,B.signal);if($){let ee=await Wl(O,new URL(K.url).pathname,K.signal,g);if(ee.type==="aborted")return;if(ee.type==="error"){zt(g,x,ee.error,{flushSync:W});return}else if(ee.matches)O=ee.matches,D=nl(O,k);else{zt(g,x,We(404,{pathname:k}),{flushSync:W});return}}L.set(g,B);let Z=U,ie=(await Ur("loader",y,K,[D],O,g))[D.route.id];if(un(ie)&&(ie=await os(ie,K.signal,!0)||ie),L.get(g)===B&&L.delete(g),!K.signal.aborted){if(Ae.has(g)){Zt(g,en(void 0));return}if(An(ie))if(V>Z){Zt(g,en(void 0));return}else{le.add(g),await Pn(K,ie,!1,{preventScrollReset:A});return}if(Ze(ie)){zt(g,x,ie.error);return}Q(!un(ie),"Unhandled fetcher deferred data"),Zt(g,en(ie.data))}}async function Pn(g,x,k,D){let{submission:O,fetcherSubmission:$,preventScrollReset:W,replace:A}=D===void 0?{}:D;x.response.headers.has("X-Remix-Revalidate")&&(ve=!0);let j=x.response.headers.get("Location");Q(j,"Expected a Location header on the redirect Response"),j=Yc(j,new URL(g.url),u,e.history);let F=Tl(y.location,j,{_isRedirect:!0});if(n){let ee=!1;if(x.response.headers.has("X-Remix-Reload-Document"))ee=!0;else if(ls.test(j)){const ge=e.history.createURL(j);ee=ge.origin!==t.location.origin||xt(ge.pathname,u)==null}if(ee){A?t.location.replace(j):t.location.assign(j);return}}M=null;let B=A===!0||x.response.headers.has("X-Remix-Replace")?Ee.Replace:Ee.Push,{formMethod:K,formAction:Z,formEncType:Le}=y.navigation;!O&&!$&&K&&Z&&Le&&(O=ef(y.navigation));let ie=O||$;if(Lg.has(x.response.status)&&ie&&vt(ie.formMethod))await Rn(B,F,{submission:ce({},ie,{formAction:j}),preventScrollReset:W||I,enableViewTransition:k?H:void 0});else{let ee=oa(F,O);await Rn(B,F,{overrideNavigation:ee,fetcherSubmission:$,preventScrollReset:W||I,enableViewTransition:k?H:void 0})}}async function Ur(g,x,k,D,O,$){let W,A={};try{W=await Ag(s,g,x,k,D,O,$,o,l)}catch(j){return D.forEach(F=>{A[F.route.id]={type:te.error,error:j}}),A}for(let[j,F]of Object.entries(W))if(Vg(F)){let B=F.result;A[j]={type:te.redirect,response:jg(B,k,j,O,u,c.v7_relativeSplatPath)}}else A[j]=await Ug(F);return A}async function ys(g,x,k,D,O){let $=g.matches,W=Ur("loader",g,O,k,x,null),A=Promise.all(D.map(async B=>{if(B.matches&&B.match&&B.controller){let Z=(await Ur("loader",g,tr(e.history,B.path,B.controller.signal),[B.match],B.matches,B.key))[B.match.route.id];return{[B.key]:Z}}else return Promise.resolve({[B.key]:{type:te.error,error:We(404,{pathname:B.path})}})})),j=await W,F=(await A).reduce((B,K)=>Object.assign(B,K),{});return await Promise.all([Qg(x,j,O.signal,$,g.loaderData),Kg(x,F,D)]),{loaderResults:j,fetcherResults:F}}function _i(){ve=!0,oe.push(...Ti()),dt.forEach((g,x)=>{L.has(x)&&de.add(x),qt(x)})}function Zt(g,x,k){k===void 0&&(k={}),y.fetchers.set(g,x),Ue({fetchers:new Map(y.fetchers)},{flushSync:(k&&k.flushSync)===!0})}function zt(g,x,k,D){D===void 0&&(D={});let O=Mn(y.matches,x);Bl(g),Ue({errors:{[O.route.id]:k},fetchers:new Map(y.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function ws(g){return Ge.set(g,(Ge.get(g)||0)+1),Ae.has(g)&&Ae.delete(g),y.fetchers.get(g)||Tg}function Bl(g){let x=y.fetchers.get(g);L.has(g)&&!(x&&x.state==="loading"&&re.has(g))&&qt(g),dt.delete(g),re.delete(g),le.delete(g),c.v7_fetcherPersist&&Ae.delete(g),de.delete(g),y.fetchers.delete(g)}function yh(g){let x=(Ge.get(g)||0)-1;x<=0?(Ge.delete(g),Ae.add(g),c.v7_fetcherPersist||Bl(g)):Ge.set(g,x),Ue({fetchers:new Map(y.fetchers)})}function qt(g){let x=L.get(g);x&&(x.abort(),L.delete(g))}function Ss(g){for(let x of g){let k=ws(x),D=en(k.data);y.fetchers.set(x,D)}}function xs(){let g=[],x=!1;for(let k of le){let D=y.fetchers.get(k);Q(D,"Expected fetcher: "+k),D.state==="loading"&&(le.delete(k),g.push(k),x=!0)}return Ss(g),x}function Es(g){let x=[];for(let[k,D]of re)if(D0}function wh(g,x){let k=y.blockers.get(g)||nr;return ot.get(g)!==x&&ot.set(g,x),k}function ks(g){y.blockers.delete(g),ot.delete(g)}function $l(g,x){let k=y.blockers.get(g)||nr;Q(k.state==="unblocked"&&x.state==="blocked"||k.state==="blocked"&&x.state==="blocked"||k.state==="blocked"&&x.state==="proceeding"||k.state==="blocked"&&x.state==="unblocked"||k.state==="proceeding"&&x.state==="unblocked","Invalid blocker state transition: "+k.state+" -> "+x.state);let D=new Map(y.blockers);D.set(g,x),Ue({blockers:D})}function Cs(g){let{currentLocation:x,nextLocation:k,historyAction:D}=g;if(ot.size===0)return;ot.size>1&&Hn(!1,"A router only supports one blocker at a time");let O=Array.from(ot.entries()),[$,W]=O[O.length-1],A=y.blockers.get($);if(!(A&&A.state==="proceeding")&&W({currentLocation:x,nextLocation:k,historyAction:D}))return $}function Li(g){let x=We(404,{pathname:g}),k=a||i,{matches:D,route:O}=qc(k);return Ti(),{notFoundMatches:D,route:O,error:x}}function Ti(g){let x=[];return Ie.forEach((k,D)=>{(!g||g(D))&&(k.cancel(),x.push(D),Ie.delete(D))}),x}function Sh(g,x,k){if(w=g,P=x,S=k||null,!h&&y.navigation===la){h=!0;let D=Ps(y.location,y.matches);D!=null&&Ue({restoreScrollPosition:D})}return()=>{w=null,P=null,S=null}}function Rs(g,x){return S&&S(g,x.map(D=>og(D,y.loaderData)))||g.key}function xh(g,x){if(w&&P){let k=Rs(g,x);w[k]=P()}}function Ps(g,x){if(w){let k=Rs(g,x),D=w[k];if(typeof D=="number")return D}return null}function Vl(g,x,k){if(f)if(g){if(Object.keys(g[0].params).length>0)return{active:!0,matches:Co(x,k,u,!0)}}else return{active:!0,matches:Co(x,k,u,!0)||[]};return{active:!1,matches:null}}async function Wl(g,x,k,D){if(!f)return{type:"success",matches:g};let O=g;for(;;){let $=a==null,W=a||i,A=o;try{await f({signal:k,path:x,matches:O,fetcherKey:D,patch:(B,K)=>{k.aborted||Kc(B,K,W,A,l)}})}catch(B){return{type:"error",error:B,partialMatches:O}}finally{$&&!k.aborted&&(i=[...i])}if(k.aborted)return{type:"aborted"};let j=Nn(W,x,u);if(j)return{type:"success",matches:j};let F=Co(W,x,u,!0);if(!F||O.length===F.length&&O.every((B,K)=>B.route.id===F[K].route.id))return{type:"success",matches:null};O=F}}function Eh(g){o={},a=Jo(g,l,void 0,o)}function kh(g,x){let k=a==null;Kc(g,x,a||i,o,l),k&&(i=[...i],Ue({}))}return T={get basename(){return u},get future(){return c},get state(){return y},get routes(){return i},get window(){return t},initialize:uh,subscribe:ch,enableScrollRestoration:Sh,navigate:vs,fetch:mh,revalidate:fh,createHref:g=>e.history.createHref(g),encodeLocation:g=>e.history.encodeLocation(g),getFetcher:ws,deleteFetcher:yh,dispose:sh,getBlocker:wh,deleteBlocker:ks,patchRoutes:kh,_internalFetchControllers:L,_internalActiveDeferreds:Ie,_internalSetRoutes:Eh},T}function Mg(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function tu(e,t,n,r,l,o,i,a){let u,s;if(i){u=[];for(let c of t)if(u.push(c),c.route.id===i){s=c;break}}else u=t,s=t[t.length-1];let f=xi(l||".",Si(u,o),xt(e.pathname,n)||e.pathname,a==="path");if(l==null&&(f.search=e.search,f.hash=e.hash),(l==null||l===""||l===".")&&s){let c=is(f.search);if(s.route.index&&!c)f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index";else if(!s.route.index&&c){let p=new URLSearchParams(f.search),v=p.getAll("index");p.delete("index"),v.filter(S=>S).forEach(S=>p.append("index",S));let w=p.toString();f.search=w?"?"+w:""}}return r&&n!=="/"&&(f.pathname=f.pathname==="/"?n:$t([n,f.pathname])),Qn(f)}function Vc(e,t,n,r){if(!r||!Mg(r))return{path:n};if(r.formMethod&&!Hg(r.formMethod))return{path:n,error:We(405,{method:r.formMethod})};let l=()=>({path:n,error:We(400,{type:"invalid-body"})}),o=r.formMethod||"get",i=e?o.toUpperCase():o.toLowerCase(),a=jp(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!vt(i))return l();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((v,w)=>{let[S,P]=w;return""+v+S+"="+P+` `},""):String(r.body);return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!vt(i))return l();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:i,formAction:a,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return l()}}}Q(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=ru(r.formData),s=r.formData;else if(r.body instanceof FormData)u=ru(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=Xc(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=Xc(u)}catch{return l()}let f={formMethod:i,formAction:a,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(vt(f.formMethod))return{path:n,submission:f};let c=Cn(n);return t&&c.search&&is(c.search)&&u.append("index",""),c.search="?"+u,{path:Qn(c),submission:f}}function Wc(e,t,n){n===void 0&&(n=!1);let r=e.findIndex(l=>l.route.id===t);return r>=0?e.slice(0,n?r+1:r):e}function Hc(e,t,n,r,l,o,i,a,u,s,f,c,p,v,w,S){let P=S?Ze(S[1])?S[1].error:S[1].data:void 0,h=e.createURL(t.location),d=e.createURL(l),m=n;o&&t.errors?m=Wc(n,Object.keys(t.errors)[0],!0):S&&Ze(S[1])&&(m=Wc(n,S[0]));let E=S?S[1].statusCode:void 0,R=i&&E&&E>=400,T=m.filter((_,I)=>{let{route:M}=_;if(M.lazy)return!0;if(M.loader==null)return!1;if(o)return nu(M,t.loaderData,t.errors);if(Og(t.loaderData,t.matches[I],_)||u.some(J=>J===_.route.id))return!0;let H=t.matches[I],Y=_;return Qc(_,ce({currentUrl:h,currentParams:H.params,nextUrl:d,nextParams:Y.params},r,{actionResult:P,actionStatus:E,defaultShouldRevalidate:R?!1:a||h.pathname+h.search===d.pathname+d.search||h.search!==d.search||Ip(H,Y)}))}),y=[];return c.forEach((_,I)=>{if(o||!n.some(X=>X.route.id===_.routeId)||f.has(I))return;let M=Nn(v,_.path,w);if(!M){y.push({key:I,routeId:_.routeId,path:_.path,matches:null,match:null,controller:null});return}let H=t.fetchers.get(I),Y=nl(M,_.path),J=!1;p.has(I)?J=!1:s.has(I)?(s.delete(I),J=!0):H&&H.state!=="idle"&&H.data===void 0?J=a:J=Qc(Y,ce({currentUrl:h,currentParams:t.matches[t.matches.length-1].params,nextUrl:d,nextParams:n[n.length-1].params},r,{actionResult:P,actionStatus:E,defaultShouldRevalidate:R?!1:a})),J&&y.push({key:I,routeId:_.routeId,path:_.path,matches:M,match:Y,controller:new AbortController})}),[T,y]}function nu(e,t,n){if(e.lazy)return!0;if(!e.loader)return!1;let r=t!=null&&t[e.id]!==void 0,l=n!=null&&n[e.id]!==void 0;return!r&&l?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!r&&!l}function Og(e,t,n){let r=!t||n.route.id!==t.route.id,l=e[n.route.id]===void 0;return r||l}function Ip(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function Qc(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}function Kc(e,t,n,r,l){var o;let i;if(e){let s=r[e];Q(s,"No route found to patch children into: routeId = "+e),s.children||(s.children=[]),i=s.children}else i=n;let a=t.filter(s=>!i.some(f=>Up(s,f))),u=Jo(a,l,[e||"_","patch",String(((o=i)==null?void 0:o.length)||"0")],r);i.push(...u)}function Up(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((n,r)=>{var l;return(l=t.children)==null?void 0:l.some(o=>Up(n,o))}):!1}async function zg(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let l=n[e.id];Q(l,"No route found in manifest");let o={};for(let i in r){let u=l[i]!==void 0&&i!=="hasErrorBoundary";Hn(!u,'Route "'+l.id+'" has a static property "'+i+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+i+'" will be ignored.')),!u&&!rg.has(i)&&(o[i]=r[i])}Object.assign(l,o),Object.assign(l,ce({},t(l),{lazy:void 0}))}async function Fg(e){let{matches:t}=e,n=t.filter(l=>l.shouldLoad);return(await Promise.all(n.map(l=>l.resolve()))).reduce((l,o,i)=>Object.assign(l,{[n[i].route.id]:o}),{})}async function Ag(e,t,n,r,l,o,i,a,u,s){let f=o.map(v=>v.route.lazy?zg(v.route,u,a):void 0),c=o.map((v,w)=>{let S=f[w],P=l.some(d=>d.route.id===v.route.id);return ce({},v,{shouldLoad:P,resolve:async d=>(d&&r.method==="GET"&&(v.route.lazy||v.route.loader)&&(P=!0),P?Ig(t,r,v,S,d,s):Promise.resolve({type:te.data,result:void 0}))})}),p=await e({matches:c,request:r,params:o[0].params,fetcherKey:i,context:s});try{await Promise.all(f)}catch{}return p}async function Ig(e,t,n,r,l,o){let i,a,u=s=>{let f,c=new Promise((w,S)=>f=S);a=()=>f(),t.signal.addEventListener("abort",a);let p=w=>typeof s!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):s({request:t,params:n.params,context:o},...w!==void 0?[w]:[]),v=(async()=>{try{return{type:"data",result:await(l?l(S=>p(S)):p())}}catch(w){return{type:"error",result:w}}})();return Promise.race([v,c])};try{let s=n.route[e];if(r)if(s){let f,[c]=await Promise.all([u(s).catch(p=>{f=p}),r]);if(f!==void 0)throw f;i=c}else if(await r,s=n.route[e],s)i=await u(s);else if(e==="action"){let f=new URL(t.url),c=f.pathname+f.search;throw We(405,{method:t.method,pathname:c,routeId:n.route.id})}else return{type:te.data,result:void 0};else if(s)i=await u(s);else{let f=new URL(t.url),c=f.pathname+f.search;throw We(404,{pathname:c})}Q(i.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(s){return{type:te.error,result:s}}finally{a&&t.signal.removeEventListener("abort",a)}return i}async function Ug(e){let{result:t,type:n}=e;if(Bp(t)){let c;try{let p=t.headers.get("Content-Type");p&&/\bapplication\/json\b/.test(p)?t.body==null?c=null:c=await t.json():c=await t.text()}catch(p){return{type:te.error,error:p}}return n===te.error?{type:te.error,error:new qo(t.status,t.statusText,c),statusCode:t.status,headers:t.headers}:{type:te.data,data:c,statusCode:t.status,headers:t.headers}}if(n===te.error){if(bc(t)){var r,l;if(t.data instanceof Error){var o,i;return{type:te.error,error:t.data,statusCode:(o=t.init)==null?void 0:o.status,headers:(i=t.init)!=null&&i.headers?new Headers(t.init.headers):void 0}}return{type:te.error,error:new qo(((r=t.init)==null?void 0:r.status)||500,void 0,t.data),statusCode:Dl(t)?t.status:void 0,headers:(l=t.init)!=null&&l.headers?new Headers(t.init.headers):void 0}}return{type:te.error,error:t,statusCode:Dl(t)?t.status:void 0}}if(Wg(t)){var a,u;return{type:te.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((u=t.init)==null?void 0:u.headers)&&new Headers(t.init.headers)}}if(bc(t)){var s,f;return{type:te.data,data:t.data,statusCode:(s=t.init)==null?void 0:s.status,headers:(f=t.init)!=null&&f.headers?new Headers(t.init.headers):void 0}}return{type:te.data,data:t}}function jg(e,t,n,r,l,o){let i=e.headers.get("Location");if(Q(i,"Redirects returned/thrown from loaders/actions must have a Location header"),!ls.test(i)){let a=r.slice(0,r.findIndex(u=>u.route.id===n)+1);i=tu(new URL(t.url),a,l,!0,i,o),e.headers.set("Location",i)}return e}function Yc(e,t,n,r){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(ls.test(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(l.includes(i.protocol))throw new Error("Invalid redirect location");let a=xt(i.pathname,n)!=null;if(i.origin===t.origin&&a)return rs(i.pathname)+i.search+i.hash}try{let o=r.createURL(e);if(l.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function tr(e,t,n,r){let l=e.createURL(jp(t)).toString(),o={signal:n};if(r&&vt(r.formMethod)){let{formMethod:i,formEncType:a}=r;o.method=i.toUpperCase(),a==="application/json"?(o.headers=new Headers({"Content-Type":a}),o.body=JSON.stringify(r.json)):a==="text/plain"?o.body=r.text:a==="application/x-www-form-urlencoded"&&r.formData?o.body=ru(r.formData):o.body=r.formData}return new Request(l,o)}function ru(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function Xc(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function Bg(e,t,n,r,l){let o={},i=null,a,u=!1,s={},f=n&&Ze(n[1])?n[1].error:void 0;return e.forEach(c=>{if(!(c.route.id in t))return;let p=c.route.id,v=t[p];if(Q(!An(v),"Cannot handle redirect results in processLoaderData"),Ze(v)){let w=v.error;f!==void 0&&(w=f,f=void 0),i=i||{};{let S=Mn(e,p);i[S.route.id]==null&&(i[S.route.id]=w)}o[p]=void 0,u||(u=!0,a=Dl(v.error)?v.error.status:500),v.headers&&(s[p]=v.headers)}else un(v)?(r.set(p,v.deferredData),o[p]=v.deferredData.data,v.statusCode!=null&&v.statusCode!==200&&!u&&(a=v.statusCode),v.headers&&(s[p]=v.headers)):(o[p]=v.data,v.statusCode&&v.statusCode!==200&&!u&&(a=v.statusCode),v.headers&&(s[p]=v.headers))}),f!==void 0&&n&&(i={[n[0]]:f},o[n[0]]=void 0),{loaderData:o,errors:i,statusCode:a||200,loaderHeaders:s}}function Gc(e,t,n,r,l,o,i){let{loaderData:a,errors:u}=Bg(t,n,r,i);return l.forEach(s=>{let{key:f,match:c,controller:p}=s,v=o[f];if(Q(v,"Did not find corresponding fetcher result"),!(p&&p.signal.aborted))if(Ze(v)){let w=Mn(e.matches,c==null?void 0:c.route.id);u&&u[w.route.id]||(u=ce({},u,{[w.route.id]:v.error})),e.fetchers.delete(f)}else if(An(v))Q(!1,"Unhandled fetcher revalidation redirect");else if(un(v))Q(!1,"Unhandled fetcher deferred data");else{let w=en(v.data);e.fetchers.set(f,w)}}),{loaderData:a,errors:u}}function Jc(e,t,n,r){let l=ce({},t);for(let o of n){let i=o.route.id;if(t.hasOwnProperty(i)?t[i]!==void 0&&(l[i]=t[i]):e[i]!==void 0&&o.route.loader&&(l[i]=e[i]),r&&r.hasOwnProperty(i))break}return l}function Zc(e){return e?Ze(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Mn(e,t){return(t?e.slice(0,e.findIndex(r=>r.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function qc(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function We(e,t){let{pathname:n,routeId:r,method:l,type:o,message:i}=t===void 0?{}:t,a="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(a="Bad Request",l&&n&&r?u="You made a "+l+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":o==="defer-action"?u="defer() is not supported in actions":o==="invalid-body"&&(u="Unable to encode submission body")):e===403?(a="Forbidden",u='Route "'+r+'" does not match URL "'+n+'"'):e===404?(a="Not Found",u='No route matches URL "'+n+'"'):e===405&&(a="Method Not Allowed",l&&n&&r?u="You made a "+l.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":l&&(u='Invalid request method "'+l.toUpperCase()+'"')),new qo(e||500,a,new Error(u),!0)}function so(e){let t=Object.entries(e);for(let n=t.length-1;n>=0;n--){let[r,l]=t[n];if(An(l))return{key:r,result:l}}}function jp(e){let t=typeof e=="string"?Cn(e):e;return Qn(ce({},t,{hash:""}))}function $g(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Vg(e){return Bp(e.result)&&_g.has(e.result.status)}function un(e){return e.type===te.deferred}function Ze(e){return e.type===te.error}function An(e){return(e&&e.type)===te.redirect}function bc(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Wg(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Bp(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Hg(e){return Pg.has(e.toLowerCase())}function vt(e){return Cg.has(e.toLowerCase())}async function Qg(e,t,n,r,l){let o=Object.entries(t);for(let i=0;i(p==null?void 0:p.route.id)===a);if(!s)continue;let f=r.find(p=>p.route.id===s.route.id),c=f!=null&&!Ip(f,s)&&(l&&l[s.route.id])!==void 0;un(u)&&c&&await os(u,n,!1).then(p=>{p&&(t[a]=p)})}}async function Kg(e,t,n){for(let r=0;r(s==null?void 0:s.route.id)===o)&&un(a)&&(Q(i,"Expected an AbortController for revalidating fetcher deferred result"),await os(a,i.signal,!0).then(s=>{s&&(t[l]=s)}))}}async function os(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:te.data,data:e.deferredData.unwrappedData}}catch(l){return{type:te.error,error:l}}return{type:te.data,data:e.deferredData.data}}}function is(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function nl(e,t){let n=typeof t=="string"?Cn(t).search:t.search;if(e[e.length-1].route.index&&is(n||""))return e[e.length-1];let r=zp(e);return r[r.length-1]}function ef(e){let{formMethod:t,formAction:n,formEncType:r,text:l,formData:o,json:i}=e;if(!(!t||!n||!r)){if(l!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:l};if(o!=null)return{formMethod:t,formAction:n,formEncType:r,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:i,text:void 0}}}function oa(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Yg(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function Jr(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Xg(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function en(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Gg(e,t){try{let n=e.sessionStorage.getItem(Ap);if(n){let r=JSON.parse(n);for(let[l,o]of Object.entries(r||{}))o&&Array.isArray(o)&&t.set(l,new Set(o||[]))}}catch{}}function Jg(e,t){if(t.size>0){let n={};for(let[r,l]of t)n[r]=[...l];try{e.sessionStorage.setItem(Ap,JSON.stringify(n))}catch(r){Hn(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/** * React Router v6.30.4 * * Copyright (c) Remix Software Inc. * * 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 Tr(){return Tr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{a.current=!0}),C.useCallback(function(s,f){if(f===void 0&&(f={}),!a.current)return;if(typeof s=="number"){r.go(s);return}let c=xi(s,JSON.parse(i),o,f.relative==="path");e==null&&t!=="/"&&(c.pathname=c.pathname==="/"?t:$t([t,c.pathname])),(f.replace?r.replace:r.push)(c,f.state,f)},[t,r,i,o,e])}const Wp=C.createContext(null);function M0(){return C.useContext(Wp)}function bg(e){let t=C.useContext(Mt).outlet;return t&&C.createElement(Wp.Provider,{value:e},t)}function O0(){let{matches:e}=C.useContext(Mt),t=e[e.length-1];return t?t.params:{}}function Ei(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=C.useContext(Gt),{matches:l}=C.useContext(Mt),{pathname:o}=Gn(),i=JSON.stringify(Si(l,r.v7_relativeSplatPath));return C.useMemo(()=>xi(e,JSON.parse(i),o,n==="path"),[e,i,o,n])}function ey(e,t,n,r){Fr()||Q(!1);let{navigator:l}=C.useContext(Gt),{matches:o}=C.useContext(Mt),i=o[o.length-1],a=i?i.params:{};i&&i.pathname;let u=i?i.pathnameBase:"/";i&&i.route;let s=Gn(),f;f=s;let c=f.pathname||"/",p=c;if(u!=="/"){let S=u.replace(/^\//,"").split("/");p="/"+c.replace(/^\//,"").split("/").slice(S.length).join("/")}let v=Nn(e,{pathname:p});return oy(v&&v.map(S=>Object.assign({},S,{params:Object.assign({},a,S.params),pathname:$t([u,l.encodeLocation?l.encodeLocation(S.pathname).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?u:$t([u,l.encodeLocation?l.encodeLocation(S.pathnameBase).pathname:S.pathnameBase])})),o,n,r)}function ty(){let e=ay(),t=Dl(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,l={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:l},n):null,null)}const ny=C.createElement(ty,null);class ry extends C.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?C.createElement(Mt.Provider,{value:this.props.routeContext},C.createElement($p.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function ly(e){let{routeContext:t,match:n,children:r}=e,l=C.useContext(Il);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),C.createElement(Mt.Provider,{value:t},r)}function oy(e,t,n,r){var l;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var o;if(!n)return null;if(n.errors)e=n.matches;else if((o=r)!=null&&o.v7_partialHydration&&t.length===0&&!n.initialized&&n.matches.length>0)e=n.matches;else return null}let i=e,a=(l=n)==null?void 0:l.errors;if(a!=null){let f=i.findIndex(c=>c.route.id&&(a==null?void 0:a[c.route.id])!==void 0);f>=0||Q(!1),i=i.slice(0,Math.min(i.length,f+1))}let u=!1,s=-1;if(n&&r&&r.v7_partialHydration)for(let f=0;f=0?i=i.slice(0,s+1):i=[i[0]];break}}}return i.reduceRight((f,c,p)=>{let v,w=!1,S=null,P=null;n&&(v=a&&c.route.id?a[c.route.id]:void 0,S=c.route.errorElement||ny,u&&(s<0&&p===0?(cy("route-fallback"),w=!0,P=null):s===p&&(w=!0,P=c.route.hydrateFallbackElement||null)));let h=t.concat(i.slice(0,p+1)),d=()=>{let m;return v?m=S:w?m=P:c.route.Component?m=C.createElement(c.route.Component,null):c.route.element?m=c.route.element:m=f,C.createElement(ly,{match:c,routeContext:{outlet:f,matches:h,isDataRoute:n!=null},children:m})};return n&&(c.route.ErrorBoundary||c.route.errorElement||p===0)?C.createElement(ry,{location:n.location,revalidation:n.revalidation,component:S,error:v,children:d(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):d()},null)}var Hp=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Hp||{}),Qp=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(Qp||{});function Kp(e){let t=C.useContext(Il);return t||Q(!1),t}function Yp(e){let t=C.useContext(as);return t||Q(!1),t}function iy(e){let t=C.useContext(Mt);return t||Q(!1),t}function Xp(e){let t=iy(),n=t.matches[t.matches.length-1];return n.route.id||Q(!1),n.route.id}function ay(){var e;let t=C.useContext($p),n=Yp(),r=Xp();return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}let uy=0;function z0(e){let{router:t,basename:n}=Kp(),r=Yp(),[l,o]=C.useState(""),i=C.useCallback(a=>{if(typeof e!="function")return!!e;if(n==="/")return e(a);let{currentLocation:u,nextLocation:s,historyAction:f}=a;return e({currentLocation:Tr({},u,{pathname:xt(u.pathname,n)||u.pathname}),nextLocation:Tr({},s,{pathname:xt(s.pathname,n)||s.pathname}),historyAction:f})},[n,e]);return C.useEffect(()=>{let a=String(++uy);return o(a),()=>t.deleteBlocker(a)},[t]),C.useEffect(()=>{l!==""&&t.getBlocker(l,i)},[t,l,i]),l&&r.blockers.has(l)?r.blockers.get(l):nr}function sy(){let{router:e}=Kp(Hp.UseNavigateStable),t=Xp(Qp.UseNavigateStable),n=C.useRef(!1);return Vp(()=>{n.current=!0}),C.useCallback(function(l,o){o===void 0&&(o={}),n.current&&(typeof l=="number"?e.navigate(l):e.navigate(l,Tr({fromRouteId:t},o)))},[e,t])}const tf={};function cy(e,t,n){tf[e]||(tf[e]=!0)}function fy(e,t){e==null||e.v7_startTransition,(e==null?void 0:e.v7_relativeSplatPath)===void 0&&(!t||t.v7_relativeSplatPath),t&&(t.v7_fetcherPersist,t.v7_normalizeFormMethod,t.v7_partialHydration,t.v7_skipActionErrorRevalidation)}function F0(e){let{to:t,replace:n,state:r,relative:l}=e;Fr()||Q(!1);let{future:o,static:i}=C.useContext(Gt),{matches:a}=C.useContext(Mt),{pathname:u}=Gn(),s=ss(),f=xi(t,Si(a,o.v7_relativeSplatPath),u,l==="path"),c=JSON.stringify(f);return C.useEffect(()=>s(JSON.parse(c),{replace:n,state:r,relative:l}),[s,c,l,n,r]),null}function A0(e){return bg(e.context)}function dy(e){Q(!1)}function py(e){let{basename:t="/",children:n=null,location:r,navigationType:l=Ee.Pop,navigator:o,static:i=!1,future:a}=e;Fr()&&Q(!1);let u=t.replace(/^\/*/,"/"),s=C.useMemo(()=>({basename:u,navigator:o,static:i,future:Tr({v7_relativeSplatPath:!1},a)}),[u,a,o,i]);typeof r=="string"&&(r=Cn(r));let{pathname:f="/",search:c="",hash:p="",state:v=null,key:w="default"}=r,S=C.useMemo(()=>{let P=xt(f,u);return P==null?null:{location:{pathname:P,search:c,hash:p,state:v,key:w},navigationType:l}},[u,f,c,p,v,w,l]);return S==null?null:C.createElement(Gt.Provider,{value:s},C.createElement(us.Provider,{children:n,value:S}))}new Promise(()=>{});function nf(e,t){t===void 0&&(t=[]);let n=[];return C.Children.forEach(e,(r,l)=>{if(!C.isValidElement(r))return;let o=[...t,l];if(r.type===C.Fragment){n.push.apply(n,nf(r.props.children,o));return}r.type!==dy&&Q(!1),!r.props.index||!r.props.children||Q(!1);let i={id:r.props.id||o.join("-"),caseSensitive:r.props.caseSensitive,element:r.props.element,Component:r.props.Component,index:r.props.index,path:r.props.path,loader:r.props.loader,action:r.props.action,errorElement:r.props.errorElement,ErrorBoundary:r.props.ErrorBoundary,hasErrorBoundary:r.props.ErrorBoundary!=null||r.props.errorElement!=null,shouldRevalidate:r.props.shouldRevalidate,handle:r.props.handle,lazy:r.props.lazy};r.props.children&&(i.children=nf(r.props.children,o)),n.push(i)}),n}function hy(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:C.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:C.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:C.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/** * React Router DOM v6.30.4 * * Copyright (c) Remix Software Inc. * * 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 Dr(){return Dr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{let r=e[n];return t.concat(Array.isArray(r)?r.map(l=>[n,l]):[[n,r]])},[]))}function gy(e,t){let n=lu(e);return t&&t.forEach((r,l)=>{n.has(l)||t.getAll(l).forEach(o=>{n.append(l,o)})}),n}const yy=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],wy=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Sy="6";try{window.__reactRouterVersion=Sy}catch{}function I0(e,t){return Ng({basename:void 0,future:Dr({},void 0,{v7_prependBasename:!0}),history:eg({window:void 0}),hydrationData:xy(),routes:e,mapRouteProperties:hy,dataStrategy:void 0,patchRoutesOnNavigation:void 0,window:void 0}).initialize()}function xy(){var e;let t=(e=window)==null?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=Dr({},t,{errors:Ey(t.errors)})),t}function Ey(e){if(!e)return null;let t=Object.entries(e),n={};for(let[r,l]of t)if(l&&l.__type==="RouteErrorResponse")n[r]=new qo(l.status,l.statusText,l.data,l.internal===!0);else if(l&&l.__type==="Error"){if(l.__subType){let o=window[l.__subType];if(typeof o=="function")try{let i=new o(l.message);i.stack="",n[r]=i}catch{}}if(n[r]==null){let o=new Error(l.message);o.stack="",n[r]=o}}else n[r]=l;return n}const Jp=C.createContext({isTransitioning:!1}),ky=C.createContext(new Map),Cy="startTransition",rf=$h[Cy],Ry="flushSync",lf=bv[Ry];function Py(e){rf?rf(e):e()}function Zr(e){lf?lf(e):e()}class _y{constructor(){this.status="pending",this.promise=new Promise((t,n)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",t(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",n(r))}})}}function U0(e){let{fallbackElement:t,router:n,future:r}=e,[l,o]=C.useState(n.state),[i,a]=C.useState(),[u,s]=C.useState({isTransitioning:!1}),[f,c]=C.useState(),[p,v]=C.useState(),[w,S]=C.useState(),P=C.useRef(new Map),{v7_startTransition:h}=r||{},d=C.useCallback(_=>{h?Py(_):_()},[h]),m=C.useCallback((_,I)=>{let{deletedFetchers:M,flushSync:H,viewTransitionOpts:Y}=I;_.fetchers.forEach((X,ve)=>{X.data!==void 0&&P.current.set(ve,X.data)}),M.forEach(X=>P.current.delete(X));let J=n.window==null||n.window.document==null||typeof n.window.document.startViewTransition!="function";if(!Y||J){H?Zr(()=>o(_)):d(()=>o(_));return}if(H){Zr(()=>{p&&(f&&f.resolve(),p.skipTransition()),s({isTransitioning:!0,flushSync:!0,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})});let X=n.window.document.startViewTransition(()=>{Zr(()=>o(_))});X.finished.finally(()=>{Zr(()=>{c(void 0),v(void 0),a(void 0),s({isTransitioning:!1})})}),Zr(()=>v(X));return}p?(f&&f.resolve(),p.skipTransition(),S({state:_,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation})):(a(_),s({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}))},[n.window,p,f,P,d]);C.useLayoutEffect(()=>n.subscribe(m),[n,m]),C.useEffect(()=>{u.isTransitioning&&!u.flushSync&&c(new _y)},[u]),C.useEffect(()=>{if(f&&i&&n.window){let _=i,I=f.promise,M=n.window.document.startViewTransition(async()=>{d(()=>o(_)),await I});M.finished.finally(()=>{c(void 0),v(void 0),a(void 0),s({isTransitioning:!1})}),v(M)}},[d,i,f,n.window]),C.useEffect(()=>{f&&i&&l.location.key===i.location.key&&f.resolve()},[f,p,l.location,i]),C.useEffect(()=>{!u.isTransitioning&&w&&(a(w.state),s({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),S(void 0))},[u.isTransitioning,w]),C.useEffect(()=>{},[]);let E=C.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:_=>n.navigate(_),push:(_,I,M)=>n.navigate(_,{state:I,preventScrollReset:M==null?void 0:M.preventScrollReset}),replace:(_,I,M)=>n.navigate(_,{replace:!0,state:I,preventScrollReset:M==null?void 0:M.preventScrollReset})}),[n]),R=n.basename||"/",T=C.useMemo(()=>({router:n,navigator:E,static:!1,basename:R}),[n,E,R]),y=C.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return C.useEffect(()=>fy(r,n.future),[r,n.future]),C.createElement(C.Fragment,null,C.createElement(Il.Provider,{value:T},C.createElement(as.Provider,{value:l},C.createElement(ky.Provider,{value:P.current},C.createElement(Jp.Provider,{value:u},C.createElement(py,{basename:R,location:l.location,navigationType:l.historyAction,navigator:E,future:y},l.initialized||n.future.v7_partialHydration?C.createElement(Ly,{routes:n.routes,future:n.future,state:l}):t))))),null)}const Ly=C.memo(Ty);function Ty(e){let{routes:t,future:n,state:r}=e;return ey(t,void 0,r,n)}const Dy=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ny=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,My=C.forwardRef(function(t,n){let{onClick:r,relative:l,reloadDocument:o,replace:i,state:a,target:u,to:s,preventScrollReset:f,viewTransition:c}=t,p=Gp(t,yy),{basename:v}=C.useContext(Gt),w,S=!1;if(typeof s=="string"&&Ny.test(s)&&(w=s,Dy))try{let m=new URL(window.location.href),E=s.startsWith("//")?new URL(m.protocol+s):new URL(s),R=xt(E.pathname,v);E.origin===m.origin&&R!=null?s=R+E.search+E.hash:S=!0}catch{}let P=Zg(s,{relative:l}),h=zy(s,{replace:i,state:a,target:u,preventScrollReset:f,relative:l,viewTransition:c});function d(m){r&&r(m),m.defaultPrevented||h(m)}return C.createElement("a",Dr({},p,{href:w||P,onClick:S||o?r:d,ref:n,target:u}))}),j0=C.forwardRef(function(t,n){let{"aria-current":r="page",caseSensitive:l=!1,className:o="",end:i=!1,style:a,to:u,viewTransition:s,children:f}=t,c=Gp(t,wy),p=Ei(u,{relative:c.relative}),v=Gn(),w=C.useContext(as),{navigator:S,basename:P}=C.useContext(Gt),h=w!=null&&Fy(p)&&s===!0,d=S.encodeLocation?S.encodeLocation(p).pathname:p.pathname,m=v.pathname,E=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;l||(m=m.toLowerCase(),E=E?E.toLowerCase():null,d=d.toLowerCase()),E&&P&&(E=xt(E,P)||E);const R=d!=="/"&&d.endsWith("/")?d.length-1:d.length;let T=m===d||!i&&m.startsWith(d)&&m.charAt(R)==="/",y=E!=null&&(E===d||!i&&E.startsWith(d)&&E.charAt(d.length)==="/"),_={isActive:T,isPending:y,isTransitioning:h},I=T?r:void 0,M;typeof o=="function"?M=o(_):M=[o,T?"active":null,y?"pending":null,h?"transitioning":null].filter(Boolean).join(" ");let H=typeof a=="function"?a(_):a;return C.createElement(My,Dr({},c,{"aria-current":I,className:M,ref:n,style:H,to:u,viewTransition:s}),typeof f=="function"?f(_):f)});var ou;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(ou||(ou={}));var of;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(of||(of={}));function Oy(e){let t=C.useContext(Il);return t||Q(!1),t}function zy(e,t){let{target:n,replace:r,state:l,preventScrollReset:o,relative:i,viewTransition:a}=t===void 0?{}:t,u=ss(),s=Gn(),f=Ei(e,{relative:i});return C.useCallback(c=>{if(vy(c,n)){c.preventDefault();let p=r!==void 0?r:Qn(s)===Qn(f);u(e,{replace:p,state:l,preventScrollReset:o,relative:i,viewTransition:a})}},[s,u,f,r,l,n,e,o,i,a])}function B0(e){let t=C.useRef(lu(e)),n=C.useRef(!1),r=Gn(),l=C.useMemo(()=>gy(r.search,n.current?null:t.current),[r.search]),o=ss(),i=C.useCallback((a,u)=>{const s=lu(typeof a=="function"?a(l):a);n.current=!0,o("?"+s,u)},[o,l]);return[l,i]}function Fy(e,t){t===void 0&&(t={});let n=C.useContext(Jp);n==null&&Q(!1);let{basename:r}=Oy(ou.useViewTransitionState),l=Ei(e,{relative:t.relative});if(!n.isTransitioning)return!1;let o=xt(n.currentLocation.pathname,r)||n.currentLocation.pathname,i=xt(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Zo(l.pathname,i)!=null||Zo(l.pathname,o)!=null}const Ay=["top","right","bottom","left"],wn=Math.min,qe=Math.max,bo=Math.round,co=Math.floor,Nt=e=>({x:e,y:e}),Iy={left:"right",right:"left",bottom:"top",top:"bottom"};function iu(e,t,n){return qe(e,wn(t,n))}function Kt(e,t){return typeof e=="function"?e(t):e}function Yt(e){return e.split("-")[0]}function Ar(e){return e.split("-")[1]}function cs(e){return e==="x"?"y":"x"}function fs(e){return e==="y"?"height":"width"}function Lt(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function ds(e){return cs(Lt(e))}function Uy(e,t,n){n===void 0&&(n=!1);const r=Ar(e),l=ds(e),o=fs(l);let i=l==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(i=ei(i)),[i,ei(i)]}function jy(e){const t=ei(e);return[au(e),t,au(t)]}function au(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const af=["left","right"],uf=["right","left"],By=["top","bottom"],$y=["bottom","top"];function Vy(e,t,n){switch(e){case"top":case"bottom":return n?t?uf:af:t?af:uf;case"left":case"right":return t?By:$y;default:return[]}}function Wy(e,t,n,r){const l=Ar(e);let o=Vy(Yt(e),n==="start",r);return l&&(o=o.map(i=>i+"-"+l),t&&(o=o.concat(o.map(au)))),o}function ei(e){const t=Yt(e);return Iy[t]+e.slice(t.length)}function Hy(e){return{top:0,right:0,bottom:0,left:0,...e}}function Zp(e){return typeof e!="number"?Hy(e):{top:e,right:e,bottom:e,left:e}}function ti(e){const{x:t,y:n,width:r,height:l}=e;return{width:r,height:l,top:n,left:t,right:t+r,bottom:n+l,x:t,y:n}}function sf(e,t,n){let{reference:r,floating:l}=e;const o=Lt(t),i=ds(t),a=fs(i),u=Yt(t),s=o==="y",f=r.x+r.width/2-l.width/2,c=r.y+r.height/2-l.height/2,p=r[a]/2-l[a]/2;let v;switch(u){case"top":v={x:f,y:r.y-l.height};break;case"bottom":v={x:f,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:c};break;case"left":v={x:r.x-l.width,y:c};break;default:v={x:r.x,y:r.y}}switch(Ar(t)){case"start":v[i]-=p*(n&&s?-1:1);break;case"end":v[i]+=p*(n&&s?-1:1);break}return v}async function Qy(e,t){var n;t===void 0&&(t={});const{x:r,y:l,platform:o,rects:i,elements:a,strategy:u}=e,{boundary:s="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:v=0}=Kt(t,e),w=Zp(v),P=a[p?c==="floating"?"reference":"floating":c],h=ti(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(P)))==null||n?P:P.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(a.floating)),boundary:s,rootBoundary:f,strategy:u})),d=c==="floating"?{x:r,y:l,width:i.floating.width,height:i.floating.height}:i.reference,m=await(o.getOffsetParent==null?void 0:o.getOffsetParent(a.floating)),E=await(o.isElement==null?void 0:o.isElement(m))?await(o.getScale==null?void 0:o.getScale(m))||{x:1,y:1}:{x:1,y:1},R=ti(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:d,offsetParent:m,strategy:u}):d);return{top:(h.top-R.top+w.top)/E.y,bottom:(R.bottom-h.bottom+w.bottom)/E.y,left:(h.left-R.left+w.left)/E.x,right:(R.right-h.right+w.right)/E.x}}const Ky=50,Yy=async(e,t,n)=>{const{placement:r="bottom",strategy:l="absolute",middleware:o=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:Qy},u=await(i.isRTL==null?void 0:i.isRTL(t));let s=await i.getElementRects({reference:e,floating:t,strategy:l}),{x:f,y:c}=sf(s,r,u),p=r,v=0;const w={};for(let S=0;S({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:l,rects:o,platform:i,elements:a,middlewareData:u}=t,{element:s,padding:f=0}=Kt(e,t)||{};if(s==null)return{};const c=Zp(f),p={x:n,y:r},v=ds(l),w=fs(v),S=await i.getDimensions(s),P=v==="y",h=P?"top":"left",d=P?"bottom":"right",m=P?"clientHeight":"clientWidth",E=o.reference[w]+o.reference[v]-p[v]-o.floating[w],R=p[v]-o.reference[v],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(s));let y=T?T[m]:0;(!y||!await(i.isElement==null?void 0:i.isElement(T)))&&(y=a.floating[m]||o.floating[w]);const _=E/2-R/2,I=y/2-S[w]/2-1,M=wn(c[h],I),H=wn(c[d],I),Y=M,J=y-S[w]-H,X=y/2-S[w]/2+_,ve=iu(Y,X,J),oe=!u.arrow&&Ar(l)!=null&&X!==ve&&o.reference[w]/2-(XX<=0)){var H,Y;const X=(((H=o.flip)==null?void 0:H.index)||0)+1,ve=y[X];if(ve&&(!(c==="alignment"?d!==Lt(ve):!1)||M.every(L=>Lt(L.placement)===d?L.overflows[0]>0:!0)))return{data:{index:X,overflows:M},reset:{placement:ve}};let oe=(Y=M.filter(de=>de.overflows[0]<=0).sort((de,L)=>de.overflows[1]-L.overflows[1])[0])==null?void 0:Y.placement;if(!oe)switch(v){case"bestFit":{var J;const de=(J=M.filter(L=>{if(T){const U=Lt(L.placement);return U===d||U==="y"}return!0}).map(L=>[L.placement,L.overflows.filter(U=>U>0).reduce((U,V)=>U+V,0)]).sort((L,U)=>L[1]-U[1])[0])==null?void 0:J[0];de&&(oe=de);break}case"initialPlacement":oe=a;break}if(l!==oe)return{reset:{placement:oe}}}return{}}}};function cf(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ff(e){return Ay.some(t=>e[t]>=0)}const Jy=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:l="referenceHidden",...o}=Kt(e,t);switch(l){case"referenceHidden":{const i=await r.detectOverflow(t,{...o,elementContext:"reference"}),a=cf(i,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:ff(a)}}}case"escaped":{const i=await r.detectOverflow(t,{...o,altBoundary:!0}),a=cf(i,n.floating);return{data:{escapedOffsets:a,escaped:ff(a)}}}default:return{}}}}},qp=new Set(["left","top"]);async function Zy(e,t){const{placement:n,platform:r,elements:l}=e,o=await(r.isRTL==null?void 0:r.isRTL(l.floating)),i=Yt(n),a=Ar(n),u=Lt(n)==="y",s=qp.has(i)?-1:1,f=o&&u?-1:1,c=Kt(t,e);let{mainAxis:p,crossAxis:v,alignmentAxis:w}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return a&&typeof w=="number"&&(v=a==="end"?w*-1:w),u?{x:v*f,y:p*s}:{x:p*s,y:v*f}}const qy=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:l,y:o,placement:i,middlewareData:a}=t,u=await Zy(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:l+u.x,y:o+u.y,data:{...u,placement:i}}}}},by=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:l,platform:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:u={fn:h=>{let{x:d,y:m}=h;return{x:d,y:m}}},...s}=Kt(e,t),f={x:n,y:r},c=await o.detectOverflow(t,s),p=Lt(Yt(l)),v=cs(p);let w=f[v],S=f[p];if(i){const h=v==="y"?"top":"left",d=v==="y"?"bottom":"right",m=w+c[h],E=w-c[d];w=iu(m,w,E)}if(a){const h=p==="y"?"top":"left",d=p==="y"?"bottom":"right",m=S+c[h],E=S-c[d];S=iu(m,S,E)}const P=u.fn({...t,[v]:w,[p]:S});return{...P,data:{x:P.x-n,y:P.y-r,enabled:{[v]:i,[p]:a}}}}}},e0=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:l,rects:o,middlewareData:i}=t,{offset:a=0,mainAxis:u=!0,crossAxis:s=!0}=Kt(e,t),f={x:n,y:r},c=Lt(l),p=cs(c);let v=f[p],w=f[c];const S=Kt(a,t),P=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(u){const m=p==="y"?"height":"width",E=o.reference[p]-o.floating[m]+P.mainAxis,R=o.reference[p]+o.reference[m]-P.mainAxis;vR&&(v=R)}if(s){var h,d;const m=p==="y"?"width":"height",E=qp.has(Yt(l)),R=o.reference[c]-o.floating[m]+(E&&((h=i.offset)==null?void 0:h[c])||0)+(E?0:P.crossAxis),T=o.reference[c]+o.reference[m]+(E?0:((d=i.offset)==null?void 0:d[c])||0)-(E?P.crossAxis:0);wT&&(w=T)}return{[p]:v,[c]:w}}}},t0=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:l,rects:o,platform:i,elements:a}=t,{apply:u=()=>{},...s}=Kt(e,t),f=await i.detectOverflow(t,s),c=Yt(l),p=Ar(l),v=Lt(l)==="y",{width:w,height:S}=o.floating;let P,h;c==="top"||c==="bottom"?(P=c,h=p===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(h=c,P=p==="end"?"top":"bottom");const d=S-f.top-f.bottom,m=w-f.left-f.right,E=wn(S-f[P],d),R=wn(w-f[h],m),T=!t.middlewareData.shift;let y=E,_=R;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(_=m),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(y=d),T&&!p){const M=qe(f.left,0),H=qe(f.right,0),Y=qe(f.top,0),J=qe(f.bottom,0);v?_=w-2*(M!==0||H!==0?M+H:qe(f.left,f.right)):y=S-2*(Y!==0||J!==0?Y+J:qe(f.top,f.bottom))}await u({...t,availableWidth:_,availableHeight:y});const I=await i.getDimensions(a.floating);return w!==I.width||S!==I.height?{reset:{rects:!0}}:{}}}};function ki(){return typeof window<"u"}function Ir(e){return bp(e)?(e.nodeName||"").toLowerCase():"#document"}function tt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ot(e){var t;return(t=(bp(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function bp(e){return ki()?e instanceof Node||e instanceof tt(e).Node:!1}function Et(e){return ki()?e instanceof Element||e instanceof tt(e).Element:!1}function Jt(e){return ki()?e instanceof HTMLElement||e instanceof tt(e).HTMLElement:!1}function df(e){return!ki()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tt(e).ShadowRoot}function Ul(e){const{overflow:t,overflowX:n,overflowY:r,display:l}=kt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&l!=="inline"&&l!=="contents"}function n0(e){return/^(table|td|th)$/.test(Ir(e))}function Ci(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const r0=/transform|translate|scale|rotate|perspective|filter/,l0=/paint|layout|strict|content/,Ln=e=>!!e&&e!=="none";let ia;function ps(e){const t=Et(e)?kt(e):e;return Ln(t.transform)||Ln(t.translate)||Ln(t.scale)||Ln(t.rotate)||Ln(t.perspective)||!hs()&&(Ln(t.backdropFilter)||Ln(t.filter))||r0.test(t.willChange||"")||l0.test(t.contain||"")}function o0(e){let t=Sn(e);for(;Jt(t)&&!Nr(t);){if(ps(t))return t;if(Ci(t))return null;t=Sn(t)}return null}function hs(){return ia==null&&(ia=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ia}function Nr(e){return/^(html|body|#document)$/.test(Ir(e))}function kt(e){return tt(e).getComputedStyle(e)}function Ri(e){return Et(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Sn(e){if(Ir(e)==="html")return e;const t=e.assignedSlot||e.parentNode||df(e)&&e.host||Ot(e);return df(t)?t.host:t}function eh(e){const t=Sn(e);return Nr(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jt(t)&&Ul(t)?t:eh(t)}function Nl(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const l=eh(e),o=l===((r=e.ownerDocument)==null?void 0:r.body),i=tt(l);if(o){const a=uu(i);return t.concat(i,i.visualViewport||[],Ul(l)?l:[],a&&n?Nl(a):[])}else return t.concat(l,Nl(l,[],n))}function uu(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function th(e){const t=kt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const l=Jt(e),o=l?e.offsetWidth:n,i=l?e.offsetHeight:r,a=bo(n)!==o||bo(r)!==i;return a&&(n=o,r=i),{width:n,height:r,$:a}}function ms(e){return Et(e)?e:e.contextElement}function xr(e){const t=ms(e);if(!Jt(t))return Nt(1);const n=t.getBoundingClientRect(),{width:r,height:l,$:o}=th(t);let i=(o?bo(n.width):n.width)/r,a=(o?bo(n.height):n.height)/l;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const i0=Nt(0);function nh(e){const t=tt(e);return!hs()||!t.visualViewport?i0:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function a0(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tt(e)?!1:t}function Kn(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const l=e.getBoundingClientRect(),o=ms(e);let i=Nt(1);t&&(r?Et(r)&&(i=xr(r)):i=xr(e));const a=a0(o,n,r)?nh(o):Nt(0);let u=(l.left+a.x)/i.x,s=(l.top+a.y)/i.y,f=l.width/i.x,c=l.height/i.y;if(o){const p=tt(o),v=r&&Et(r)?tt(r):r;let w=p,S=uu(w);for(;S&&r&&v!==w;){const P=xr(S),h=S.getBoundingClientRect(),d=kt(S),m=h.left+(S.clientLeft+parseFloat(d.paddingLeft))*P.x,E=h.top+(S.clientTop+parseFloat(d.paddingTop))*P.y;u*=P.x,s*=P.y,f*=P.x,c*=P.y,u+=m,s+=E,w=tt(S),S=uu(w)}}return ti({width:f,height:c,x:u,y:s})}function Pi(e,t){const n=Ri(e).scrollLeft;return t?t.left+n:Kn(Ot(e)).left+n}function rh(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Pi(e,n),l=n.top+t.scrollTop;return{x:r,y:l}}function u0(e){let{elements:t,rect:n,offsetParent:r,strategy:l}=e;const o=l==="fixed",i=Ot(r),a=t?Ci(t.floating):!1;if(r===i||a&&o)return n;let u={scrollLeft:0,scrollTop:0},s=Nt(1);const f=Nt(0),c=Jt(r);if((c||!c&&!o)&&((Ir(r)!=="body"||Ul(i))&&(u=Ri(r)),c)){const v=Kn(r);s=xr(r),f.x=v.x+r.clientLeft,f.y=v.y+r.clientTop}const p=i&&!c&&!o?rh(i,u):Nt(0);return{width:n.width*s.x,height:n.height*s.y,x:n.x*s.x-u.scrollLeft*s.x+f.x+p.x,y:n.y*s.y-u.scrollTop*s.y+f.y+p.y}}function s0(e){return Array.from(e.getClientRects())}function c0(e){const t=Ot(e),n=Ri(e),r=e.ownerDocument.body,l=qe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=qe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Pi(e);const a=-n.scrollTop;return kt(r).direction==="rtl"&&(i+=qe(t.clientWidth,r.clientWidth)-l),{width:l,height:o,x:i,y:a}}const pf=25;function f0(e,t){const n=tt(e),r=Ot(e),l=n.visualViewport;let o=r.clientWidth,i=r.clientHeight,a=0,u=0;if(l){o=l.width,i=l.height;const f=hs();(!f||f&&t==="fixed")&&(a=l.offsetLeft,u=l.offsetTop)}const s=Pi(r);if(s<=0){const f=r.ownerDocument,c=f.body,p=getComputedStyle(c),v=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,w=Math.abs(r.clientWidth-c.clientWidth-v);w<=pf&&(o-=w)}else s<=pf&&(o+=s);return{width:o,height:i,x:a,y:u}}function d0(e,t){const n=Kn(e,!0,t==="fixed"),r=n.top+e.clientTop,l=n.left+e.clientLeft,o=Jt(e)?xr(e):Nt(1),i=e.clientWidth*o.x,a=e.clientHeight*o.y,u=l*o.x,s=r*o.y;return{width:i,height:a,x:u,y:s}}function hf(e,t,n){let r;if(t==="viewport")r=f0(e,n);else if(t==="document")r=c0(Ot(e));else if(Et(t))r=d0(t,n);else{const l=nh(e);r={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return ti(r)}function lh(e,t){const n=Sn(e);return n===t||!Et(n)||Nr(n)?!1:kt(n).position==="fixed"||lh(n,t)}function p0(e,t){const n=t.get(e);if(n)return n;let r=Nl(e,[],!1).filter(a=>Et(a)&&Ir(a)!=="body"),l=null;const o=kt(e).position==="fixed";let i=o?Sn(e):e;for(;Et(i)&&!Nr(i);){const a=kt(i),u=ps(i);!u&&a.position==="fixed"&&(l=null),(o?!u&&!l:!u&&a.position==="static"&&!!l&&(l.position==="absolute"||l.position==="fixed")||Ul(i)&&!u&&lh(e,i))?r=r.filter(f=>f!==i):l=a,i=Sn(i)}return t.set(e,r),r}function h0(e){let{element:t,boundary:n,rootBoundary:r,strategy:l}=e;const i=[...n==="clippingAncestors"?Ci(t)?[]:p0(t,this._c):[].concat(n),r],a=hf(t,i[0],l);let u=a.top,s=a.right,f=a.bottom,c=a.left;for(let p=1;p{i(!1,1e-7)},1e3)}y===1&&!ih(s,e.getBoundingClientRect())&&i(),E=!1}try{n=new IntersectionObserver(R,{...m,root:l.ownerDocument})}catch{n=new IntersectionObserver(R,m)}n.observe(e)}return i(!0),o}function $0(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:l=!0,ancestorResize:o=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:u=!1}=r,s=ms(e),f=l||o?[...s?Nl(s):[],...t?Nl(t):[]]:[];f.forEach(h=>{l&&h.addEventListener("scroll",n,{passive:!0}),o&&h.addEventListener("resize",n)});const c=s&&a?S0(s,n):null;let p=-1,v=null;i&&(v=new ResizeObserver(h=>{let[d]=h;d&&d.target===s&&v&&t&&(v.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var m;(m=v)==null||m.observe(t)})),n()}),s&&!u&&v.observe(s),t&&v.observe(t));let w,S=u?Kn(e):null;u&&P();function P(){const h=Kn(e);S&&!ih(S,h)&&n(),S=h,w=requestAnimationFrame(P)}return n(),()=>{var h;f.forEach(d=>{l&&d.removeEventListener("scroll",n),o&&d.removeEventListener("resize",n)}),c==null||c(),(h=v)==null||h.disconnect(),v=null,u&&cancelAnimationFrame(w)}}const x0=qy,E0=by,k0=Gy,C0=t0,R0=Jy,vf=Xy,P0=e0,_0=(e,t,n)=>{const r=new Map,l={platform:w0,...n},o={...l.platform,_c:r};return Yy(e,t,{...l,platform:o})};var L0=typeof document<"u",T0=function(){},Ro=L0?C.useLayoutEffect:T0;function ni(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,l;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ni(e[r],t[r]))return!1;return!0}if(l=Object.keys(e),n=l.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,l[r]))return!1;for(r=n;r--!==0;){const o=l[r];if(!(o==="_owner"&&e.$$typeof)&&!ni(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function ah(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function gf(e,t){const n=ah(e);return Math.round(t*n)/n}function ua(e){const t=C.useRef(e);return Ro(()=>{t.current=e}),t}function V0(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:l,elements:{reference:o,floating:i}={},transform:a=!0,whileElementsMounted:u,open:s}=e,[f,c]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,v]=C.useState(r);ni(p,r)||v(r);const[w,S]=C.useState(null),[P,h]=C.useState(null),d=C.useCallback(L=>{L!==T.current&&(T.current=L,S(L))},[]),m=C.useCallback(L=>{L!==y.current&&(y.current=L,h(L))},[]),E=o||w,R=i||P,T=C.useRef(null),y=C.useRef(null),_=C.useRef(f),I=u!=null,M=ua(u),H=ua(l),Y=ua(s),J=C.useCallback(()=>{if(!T.current||!y.current)return;const L={placement:t,strategy:n,middleware:p};H.current&&(L.platform=H.current),_0(T.current,y.current,L).then(U=>{const V={...U,isPositioned:Y.current!==!1};X.current&&!ni(_.current,V)&&(_.current=V,wi.flushSync(()=>{c(V)}))})},[p,t,n,H,Y]);Ro(()=>{s===!1&&_.current.isPositioned&&(_.current.isPositioned=!1,c(L=>({...L,isPositioned:!1})))},[s]);const X=C.useRef(!1);Ro(()=>(X.current=!0,()=>{X.current=!1}),[]),Ro(()=>{if(E&&(T.current=E),R&&(y.current=R),E&&R){if(M.current)return M.current(E,R,J);J()}},[E,R,J,M,I]);const ve=C.useMemo(()=>({reference:T,floating:y,setReference:d,setFloating:m}),[d,m]),oe=C.useMemo(()=>({reference:E,floating:R}),[E,R]),de=C.useMemo(()=>{const L={position:n,left:0,top:0};if(!oe.floating)return L;const U=gf(oe.floating,f.x),V=gf(oe.floating,f.y);return a?{...L,transform:"translate("+U+"px, "+V+"px)",...ah(oe.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:U,top:V}},[n,a,oe.floating,f.x,f.y]);return C.useMemo(()=>({...f,update:J,refs:ve,elements:oe,floatingStyles:de}),[f,J,ve,oe,de])}const D0=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:l}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?vf({element:r.current,padding:l}).fn(n):{}:r?vf({element:r,padding:l}).fn(n):{}}}},W0=(e,t)=>{const n=x0(e);return{name:n.name,fn:n.fn,options:[e,t]}},H0=(e,t)=>{const n=E0(e);return{name:n.name,fn:n.fn,options:[e,t]}},Q0=(e,t)=>({fn:P0(e).fn,options:[e,t]}),K0=(e,t)=>{const n=k0(e);return{name:n.name,fn:n.fn,options:[e,t]}},Y0=(e,t)=>{const n=C0(e);return{name:n.name,fn:n.fn,options:[e,t]}},X0=(e,t)=>{const n=R0(e);return{name:n.name,fn:n.fn,options:[e,t]}},G0=(e,t)=>{const n=D0(e);return{name:n.name,fn:n.fn,options:[e,t]}};export{wf as A,My as L,j0 as N,A0 as O,$h as R,wi as a,Y0 as b,G0 as c,$0 as d,ss as e,K0 as f,Gn as g,X0 as h,B0 as i,N0 as j,Bh as k,Q0 as l,qv as m,I0 as n,W0 as o,nf as p,U0 as q,C as r,H0 as s,dy as t,V0 as u,F0 as v,Ns as w,M0 as x,O0 as y,z0 as z};