const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ko-DLfDAMXg.js","assets/metadata-uYgMmUOT.js","assets/Home-DsktlitM.js","assets/experiment-Dwa8JALw.js","assets/LazyImage-nxtp_GLW.js","assets/circle-play-BlBVWkxg.js","assets/music-CsIaO1lh.js","assets/triangle-alert-BN-5Hobj.js","assets/shield-check-BE723Ngx.js","assets/circle-check-DdSr8r-B.js","assets/key-round-a8XXPx6e.js","assets/apple-CMA_HBdi.js","assets/monitor-YlItq-wC.js","assets/volume-2-J7NveaUd.js","assets/Home-Ca3xR9CF.js","assets/Download-BQ2kUvPy.js","assets/download-_IsM0wTg.js","assets/Faq-CTxABr2v.js","assets/accordion-BjIFJmlr.js","assets/index-B_uwGlwi.js","assets/index-PUyGNx1I.js","assets/utils-CWs4mQ9_.js","assets/chevron-down-DXQUUnkC.js","assets/search-_EZCQC_7.js","assets/smartphone-Dm9oYbmT.js","assets/credit-card-DzAy0FTR.js","assets/info-B0E56qW1.js","assets/Pricing-DeNcsuxM.js","assets/billingPolicy-B7oUdS7n.js","assets/premium-DAImkahd.js","assets/premium-D_IRhNVd.css","assets/billingTranslations-CfgbECl3.js","assets/consentDocuments-BVgsSUdu.js","assets/Pricing-Cae-pbFs.css","assets/Terms-x5zHZ-an.js","assets/PremiumTerms-CDyWimBy.js","assets/Terms-C8bouA9v.js","assets/Login-BxGfeiVc.js","assets/oauthState-EV50fmYH.js","assets/index-CRMaZT1b.js","assets/is-html-element-DvmxM0K5.js","assets/loader-circle-DjM95wec.js","assets/LoginCallback-BLzclxBQ.js","assets/attribution-BNx7CKTD.js","assets/storeProfile-CrFmQntJ.js","assets/circle-alert-CpVGUaK2.js","assets/DeviceCode-Cf6AooZ3.js","assets/subscriptionConfirmation-DJN5ciWq.js","assets/deviceCodeGuidance-BqtXFNkD.js","assets/message-circle-CH06EY2o.js","assets/phone-BPD7lg3x.js","assets/DeviceCode-Bq-ut1HI.css","assets/LoginHelp-Df_Rx_Ts.js","assets/About-C0uem81d.js","assets/sparkles-D_1SXkBc.js","assets/Contact-CVxnG8e3.js","assets/external-link-CGj5lhQr.js","assets/arrow-right-Crv7M9wS.js","assets/CafeLanding-ByEJNM14.js","assets/MusicPreview-CAdGgze9.js","assets/UnmannedLanding-CYZwJUqb.js","assets/UnmannedLanding-1cboFH7x.js","assets/Support-DvHRp0je.js","assets/send-DO9F9kJ7.js","assets/BlogList-COtdDCiX.js","assets/BlogPost-B1k6cecs.js","assets/NotFound-CrIbD0bM.js","assets/arrow-left-YIuBscsc.js","assets/chevron-right-C77pd8k_.js","assets/TrialEntry-0JhhIdfh.js","assets/SignupContact-D6DfMjKg.js","assets/message-square-text-CtSxS_DP.js","assets/check-4z5GJfo_.js","assets/OnboardingStep1-Bk2qtVhW.js","assets/OnboardingOverlay-Bx3Xma8v.js","assets/chevron-left-DcnEp7L0.js","assets/OnboardingStep2-UdVDJ9Ua.js","assets/OnboardingStep3-xyDK-oM8.js","assets/OnboardingComplete-DgF2aApw.js","assets/Checkout-BdSj1HPd.js","assets/PremiumCheckout-DtFhsncj.js","assets/shared-BAtWx4-b.js","assets/billing-DxT-b_08.js","assets/paymentTracking-CjwvHaTL.js","assets/accountCoupon-JMzjM9kl.js","assets/Checkout-z_8CDqRS.js","assets/store-C-5CL3LS.js","assets/CheckoutComplete-BVRjvCdt.js","assets/PremiumCheckoutComplete-CmnllY1D.js","assets/CheckoutComplete-CpFlfBki.js","assets/MyPage-EUNnENTE.js","assets/deviceDisplay-wxbMkMNL.js","assets/policy-Cr6oY8Ph.js","assets/PremiumDialog-D_hZRYnB.js","assets/ReanalysisDialog-DZWs_YiF.js","assets/PremiumUsageCard-CCRR8aRJ.js","assets/accountPayments-D-SJZeJL.js","assets/MyPage-BYrljB82.css","assets/PaymentHistory-DD-NZU0S.js","assets/receipt-DJ-ma04R.js","assets/PaymentHistory-DWtyZQ2o.js","assets/MyCoupons-Cb-1vhw-.js","assets/WithdrawComplete-tx__J0IL.js","assets/StoreEdit-XvBUGrFc.js","assets/playerApiPath-DjKfxdzH.js","assets/PremiumStores-D3GpbQMz.js","assets/StoreAnalysisRegister-J538049C.js","assets/PremiumStoreDetail-C15TAo8P.js","assets/StoreAnalysisResult-DW-f6z0W.js","assets/useEvidenceImage-DSqlP5YX.js","assets/StoreAnalysisProgress-DT5Vwxj_.js","assets/StoreAnalysisMusic-D8lzFgGG.js","assets/AlbumCover-CiSGVR_0.js","assets/previewPolicy-BrHJXhIR.js","assets/PremiumAlbums-Dbf_mmft.js","assets/StorePlayer-HQwvxlvi.js","assets/motionFeatures-CP-vUKEK.js"])))=>i.map(i=>d[i]); function Qy(n,r){for(var i=0;ia[l]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))a(l);new MutationObserver(l=>{for(const u of l)if(u.type==="childList")for(const f of u.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&a(f)}).observe(document,{childList:!0,subtree:!0});function i(l){const u={};return l.integrity&&(u.integrity=l.integrity),l.referrerPolicy&&(u.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?u.credentials="include":l.crossOrigin==="anonymous"?u.credentials="omit":u.credentials="same-origin",u}function a(l){if(l.ep)return;l.ep=!0;const u=i(l);fetch(l.href,u)}})();const Gy="modulepreload",Xy=function(n){return"/"+n},Gd={},he=function(r,i,a){let l=Promise.resolve();if(i&&i.length>0){let f=function(m){return Promise.all(m.map(v=>Promise.resolve(v).then(y=>({status:"fulfilled",value:y}),y=>({status:"rejected",reason:y}))))};document.getElementsByTagName("link");const h=document.querySelector("meta[property=csp-nonce]"),p=(h==null?void 0:h.nonce)||(h==null?void 0:h.getAttribute("nonce"));l=f(i.map(m=>{if(m=Xy(m),m in Gd)return;Gd[m]=!0;const v=m.endsWith(".css"),y=v?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${m}"]${y}`))return;const w=document.createElement("link");if(w.rel=v?"stylesheet":Gy,v||(w.as="script"),w.crossOrigin="",w.href=m,p&&w.setAttribute("nonce",p),document.head.appendChild(w),v)return new Promise((S,k)=>{w.addEventListener("load",S),w.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${m}`)))})}))}function u(f){const h=new Event("vite:preloadError",{cancelable:!0});if(h.payload=f,window.dispatchEvent(h),!h.defaultPrevented)throw f}return l.then(f=>{for(const h of f||[])h.status==="rejected"&&u(h.reason);return r().catch(u)})};function qy(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var uu={exports:{}},yo={},cu={exports:{}},Ie={};/** * @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 Xd;function Jy(){if(Xd)return Ie;Xd=1;var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),u=Symbol.for("react.provider"),f=Symbol.for("react.context"),h=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),v=Symbol.for("react.lazy"),y=Symbol.iterator;function w(R){return R===null||typeof R!="object"?null:(R=y&&R[y]||R["@@iterator"],typeof R=="function"?R:null)}var S={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,N={};function b(R,A,Se){this.props=R,this.context=A,this.refs=N,this.updater=Se||S}b.prototype.isReactComponent={},b.prototype.setState=function(R,A){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,A,"setState")},b.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function B(){}B.prototype=b.prototype;function F(R,A,Se){this.props=R,this.context=A,this.refs=N,this.updater=Se||S}var j=F.prototype=new B;j.constructor=F,k(j,b.prototype),j.isPureReactComponent=!0;var W=Array.isArray,q=Object.prototype.hasOwnProperty,we={current:null},O={key:!0,ref:!0,__self:!0,__source:!0};function ee(R,A,Se){var _e,Ee={},Oe=null,$e=null;if(A!=null)for(_e in A.ref!==void 0&&($e=A.ref),A.key!==void 0&&(Oe=""+A.key),A)q.call(A,_e)&&!O.hasOwnProperty(_e)&&(Ee[_e]=A[_e]);var be=arguments.length-2;if(be===1)Ee.children=Se;else if(1>>1,A=z[R];if(0>>1;Rl(Ee,Q))Oel($e,Ee)?(z[R]=$e,z[Oe]=Q,R=Oe):(z[R]=Ee,z[_e]=Q,R=_e);else if(Oel($e,Q))z[R]=$e,z[Oe]=Q,R=Oe;else break e}}return te}function l(z,te){var Q=z.sortIndex-te.sortIndex;return Q!==0?Q:z.id-te.id}if(typeof performance=="object"&&typeof performance.now=="function"){var u=performance;n.unstable_now=function(){return u.now()}}else{var f=Date,h=f.now();n.unstable_now=function(){return f.now()-h}}var p=[],m=[],v=1,y=null,w=3,S=!1,k=!1,N=!1,b=typeof setTimeout=="function"?setTimeout:null,B=typeof clearTimeout=="function"?clearTimeout:null,F=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function j(z){for(var te=i(m);te!==null;){if(te.callback===null)a(m);else if(te.startTime<=z)a(m),te.sortIndex=te.expirationTime,r(p,te);else break;te=i(m)}}function W(z){if(N=!1,j(z),!k)if(i(p)!==null)k=!0,ue(q);else{var te=i(m);te!==null&&ye(W,te.startTime-z)}}function q(z,te){k=!1,N&&(N=!1,B(ee),ee=-1),S=!0;var Q=w;try{for(j(te),y=i(p);y!==null&&(!(y.expirationTime>te)||z&&!X());){var R=y.callback;if(typeof R=="function"){y.callback=null,w=y.priorityLevel;var A=R(y.expirationTime<=te);te=n.unstable_now(),typeof A=="function"?y.callback=A:y===i(p)&&a(p),j(te)}else a(p);y=i(p)}if(y!==null)var Se=!0;else{var _e=i(m);_e!==null&&ye(W,_e.startTime-te),Se=!1}return Se}finally{y=null,w=Q,S=!1}}var we=!1,O=null,ee=-1,ae=5,pe=-1;function X(){return!(n.unstable_now()-pez||125R?(z.sortIndex=Q,r(m,z),i(p)===null&&z===i(m)&&(N?(B(ee),ee=-1):N=!0,ye(W,Q-R))):(z.sortIndex=A,r(p,z),k||S||(k=!0,ue(q))),z},n.unstable_shouldYield=X,n.unstable_wrapCallback=function(z){var te=w;return function(){var Q=w;w=te;try{return z.apply(this,arguments)}finally{w=Q}}}})(hu)),hu}var th;function nv(){return th||(th=1,du.exports=tv()),du.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 nh;function rv(){if(nh)return Mt;nh=1;var n=Ss(),r=nv();function i(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,o=1;o"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),p=Object.prototype.hasOwnProperty,m=/^[: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]*$/,v={},y={};function w(e){return p.call(y,e)?!0:p.call(v,e)?!1:m.test(e)?y[e]=!0:(v[e]=!0,!1)}function S(e,t,o,s){if(o!==null&&o.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return s?!1:o!==null?!o.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function k(e,t,o,s){if(t===null||typeof t>"u"||S(e,t,o,s))return!0;if(s)return!1;if(o!==null)switch(o.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 N(e,t,o,s,c,d,g){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=s,this.attributeNamespace=c,this.mustUseProperty=o,this.propertyName=e,this.type=t,this.sanitizeURL=d,this.removeEmptyString=g}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new N(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];b[t]=new N(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new N(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new N(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){b[e]=new N(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){b[e]=new N(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){b[e]=new N(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){b[e]=new N(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){b[e]=new N(e,5,!1,e.toLowerCase(),null,!1,!1)});var B=/[\-:]([a-z])/g;function F(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(B,F);b[t]=new N(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(B,F);b[t]=new N(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(B,F);b[t]=new N(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){b[e]=new N(e,1,!1,e.toLowerCase(),null,!1,!1)}),b.xlinkHref=new N("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){b[e]=new N(e,1,!1,e.toLowerCase(),null,!0,!0)});function j(e,t,o,s){var c=b.hasOwnProperty(t)?b[t]:null;(c!==null?c.type!==0:s||!(2x||c[g]!==d[x]){var C=` `+c[g].replace(" at new "," at ");return e.displayName&&C.includes("")&&(C=C.replace("",e.displayName)),C}while(1<=g&&0<=x);break}}}finally{Se=!1,Error.prepareStackTrace=o}return(e=e?e.displayName||e.name:"")?A(e):""}function Ee(e){switch(e.tag){case 5:return A(e.type);case 16:return A("Lazy");case 13:return A("Suspense");case 19:return A("SuspenseList");case 0:case 2:case 15:return e=_e(e.type,!1),e;case 11:return e=_e(e.type.render,!1),e;case 1:return e=_e(e.type,!0),e;default:return""}}function Oe(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 O:return"Fragment";case we:return"Portal";case ae:return"Profiler";case ee:return"StrictMode";case J:return"Suspense";case re:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case X:return(e.displayName||"Context")+".Consumer";case pe:return(e._context.displayName||"Context")+".Provider";case Z:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ne:return t=e.displayName||null,t!==null?t:Oe(e.type)||"Memo";case ue:t=e._payload,e=e._init;try{return Oe(e(t))}catch{}}return null}function $e(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 Oe(t);case 8:return t===ee?"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 be(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function We(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function xt(e){var t=We(e)?"checked":"value",o=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),s=""+e[t];if(!e.hasOwnProperty(t)&&typeof o<"u"&&typeof o.get=="function"&&typeof o.set=="function"){var c=o.get,d=o.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return c.call(this)},set:function(g){s=""+g,d.call(this,g)}}),Object.defineProperty(e,t,{enumerable:o.enumerable}),{getValue:function(){return s},setValue:function(g){s=""+g},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $r(e){e._valueTracker||(e._valueTracker=xt(e))}function at(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var o=t.getValue(),s="";return e&&(s=We(e)?e.checked?"true":"false":e.value),e=s,e!==o?(t.setValue(e),!0):!1}function nn(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 Vr(e,t){var o=t.checked;return Q({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:o??e._wrapperState.initialChecked})}function Wo(e,t){var o=t.defaultValue==null?"":t.defaultValue,s=t.checked!=null?t.checked:t.defaultChecked;o=be(t.value!=null?t.value:o),e._wrapperState={initialChecked:s,initialValue:o,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function cn(e,t){t=t.checked,t!=null&&j(e,"checked",t,!1)}function Ti(e,t){cn(e,t);var o=be(t.value),s=t.type;if(o!=null)s==="number"?(o===0&&e.value===""||e.value!=o)&&(e.value=""+o):e.value!==""+o&&(e.value=""+o);else if(s==="submit"||s==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Ur(e,t.type,o):t.hasOwnProperty("defaultValue")&&Ur(e,t.type,be(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Ko(e,t,o){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var s=t.type;if(!(s!=="submit"&&s!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,o||t===e.value||(e.value=t),e.defaultValue=t}o=e.name,o!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,o!==""&&(e.name=o)}function Ur(e,t,o){(t!=="number"||nn(e.ownerDocument)!==e)&&(o==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+o&&(e.defaultValue=""+o))}var pr=Array.isArray;function An(e,t,o,s){if(e=e.options,t){t={};for(var c=0;c"+t.valueOf().toString()+"",t=Ct.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function jn(e,t){if(t){var o=e.firstChild;if(o&&o===e.lastChild&&o.nodeType===3){o.nodeValue=t;return}}e.textContent=t}var gr={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},Mi=["Webkit","ms","Moz","O"];Object.keys(gr).forEach(function(e){Mi.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),gr[t]=gr[e]})});function Qo(e,t,o){return t==null||typeof t=="boolean"||t===""?"":o||typeof t!="number"||t===0||gr.hasOwnProperty(e)&&gr[e]?(""+t).trim():t+"px"}function Wt(e,t){e=e.style;for(var o in t)if(t.hasOwnProperty(o)){var s=o.indexOf("--")===0,c=Qo(o,t[o],s);o==="float"&&(o="cssFloat"),s?e.setProperty(o,c):e[o]=c}}var Go=Q({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 Br(e,t){if(t){if(Go[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(i(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(i(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(i(61))}if(t.style!=null&&typeof t.style!="object")throw Error(i(62))}}function Hr(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 Di=null;function Wr(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var zn=null,xn=null,dn=null;function Xo(e){if(e=to(e)){if(typeof zn!="function")throw Error(i(280));var t=e.stateNode;t&&(t=pa(t),zn(e.stateNode,e.type,t))}}function Ii(e){xn?dn?dn.push(e):dn=[e]:xn=e}function qo(){if(xn){var e=xn,t=dn;if(dn=xn=null,Xo(e),t)for(e=0;e>>=0,e===0?32:31-(Un(e)/_n|0)|0}var kn=64,xr=4194304;function Er(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 Jo(e,t){var o=e.pendingLanes;if(o===0)return 0;var s=0,c=e.suspendedLanes,d=e.pingedLanes,g=o&268435455;if(g!==0){var x=g&~c;x!==0?s=Er(x):(d&=g,d!==0&&(s=Er(d)))}else g=o&~c,g!==0?s=Er(g):d!==0&&(s=Er(d));if(s===0)return 0;if(t!==0&&t!==s&&(t&c)===0&&(c=s&-s,d=t&-t,c>=d||c===16&&(d&4194240)!==0))return t;if((s&4)!==0&&(s|=o&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=s;0o;o++)t.push(e);return t}function ji(e,t,o){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-He(t),e[t]=o}function mg(e,t){var o=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 s=e.eventTimes;for(e=e.expirationTimes;0=Ki),Vc=" ",Uc=!1;function Bc(e,t){switch(e){case"keyup":return Bg.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hc(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Qr=!1;function Wg(e,t){switch(e){case"compositionend":return Hc(t);case"keypress":return t.which!==32?null:(Uc=!0,Vc);case"textInput":return e=t.data,e===Vc&&Uc?null:e;default:return null}}function Kg(e,t){if(Qr)return e==="compositionend"||!Bs&&Bc(e,t)?(e=bc(),ra=Fs=Yn=null,Qr=!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:o,offset:t-e};e=s}e:{for(;o;){if(o.nextSibling){o=o.nextSibling;break e}o=o.parentNode}o=void 0}o=qc(o)}}function Zc(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zc(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function ef(){for(var e=window,t=nn();t instanceof e.HTMLIFrameElement;){try{var o=typeof t.contentWindow.location.href=="string"}catch{o=!1}if(o)e=t.contentWindow;else break;t=nn(e.document)}return t}function Ks(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 ty(e){var t=ef(),o=e.focusedElem,s=e.selectionRange;if(t!==o&&o&&o.ownerDocument&&Zc(o.ownerDocument.documentElement,o)){if(s!==null&&Ks(o)){if(t=s.start,e=s.end,e===void 0&&(e=t),"selectionStart"in o)o.selectionStart=t,o.selectionEnd=Math.min(e,o.value.length);else if(e=(t=o.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var c=o.textContent.length,d=Math.min(s.start,c);s=s.end===void 0?d:Math.min(s.end,c),!e.extend&&d>s&&(c=s,s=d,d=c),c=Jc(o,d);var g=Jc(o,s);c&&g&&(e.rangeCount!==1||e.anchorNode!==c.node||e.anchorOffset!==c.offset||e.focusNode!==g.node||e.focusOffset!==g.offset)&&(t=t.createRange(),t.setStart(c.node,c.offset),e.removeAllRanges(),d>s?(e.addRange(t),e.extend(g.node,g.offset)):(t.setEnd(g.node,g.offset),e.addRange(t)))}}for(t=[],e=o;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof o.focus=="function"&&o.focus(),o=0;o=document.documentMode,Gr=null,Ys=null,Xi=null,Qs=!1;function tf(e,t,o){var s=o.window===o?o.document:o.nodeType===9?o:o.ownerDocument;Qs||Gr==null||Gr!==nn(s)||(s=Gr,"selectionStart"in s&&Ks(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),Xi&&Gi(Xi,s)||(Xi=s,s=fa(Ys,"onSelect"),0ei||(e.current=al[ei],al[ei]=null,ei--)}function Ke(e,t){ei++,al[ei]=e.current,e.current=t}var qn={},gt=Xn(qn),Pt=Xn(!1),kr=qn;function ti(e,t){var o=e.type.contextTypes;if(!o)return qn;var s=e.stateNode;if(s&&s.__reactInternalMemoizedUnmaskedChildContext===t)return s.__reactInternalMemoizedMaskedChildContext;var c={},d;for(d in o)c[d]=t[d];return s&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=c),c}function Lt(e){return e=e.childContextTypes,e!=null}function ma(){Qe(Pt),Qe(gt)}function yf(e,t,o){if(gt.current!==qn)throw Error(i(168));Ke(gt,t),Ke(Pt,o)}function vf(e,t,o){var s=e.stateNode;if(t=t.childContextTypes,typeof s.getChildContext!="function")return o;s=s.getChildContext();for(var c in s)if(!(c in t))throw Error(i(108,$e(e)||"Unknown",c));return Q({},o,s)}function ga(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||qn,kr=gt.current,Ke(gt,e),Ke(Pt,Pt.current),!0}function wf(e,t,o){var s=e.stateNode;if(!s)throw Error(i(169));o?(e=vf(e,t,kr),s.__reactInternalMemoizedMergedChildContext=e,Qe(Pt),Qe(gt),Ke(gt,e)):Qe(Pt),Ke(Pt,o)}var Rn=null,ya=!1,sl=!1;function Sf(e){Rn===null?Rn=[e]:Rn.push(e)}function hy(e){ya=!0,Sf(e)}function Jn(){if(!sl&&Rn!==null){sl=!0;var e=0,t=Be;try{var o=Rn;for(Be=1;e>=g,c-=g,Pn=1<<32-He(t)+c|o<Pe?(dt=Ce,Ce=null):dt=Ce.sibling;var ze=$(T,Ce,M[Pe],Y);if(ze===null){Ce===null&&(Ce=dt);break}e&&Ce&&ze.alternate===null&&t(T,Ce),P=d(ze,P,Pe),ke===null?ge=ze:ke.sibling=ze,ke=ze,Ce=dt}if(Pe===M.length)return o(T,Ce),Xe&&Rr(T,Pe),ge;if(Ce===null){for(;PePe?(dt=Ce,Ce=null):dt=Ce.sibling;var sr=$(T,Ce,ze.value,Y);if(sr===null){Ce===null&&(Ce=dt);break}e&&Ce&&sr.alternate===null&&t(T,Ce),P=d(sr,P,Pe),ke===null?ge=sr:ke.sibling=sr,ke=sr,Ce=dt}if(ze.done)return o(T,Ce),Xe&&Rr(T,Pe),ge;if(Ce===null){for(;!ze.done;Pe++,ze=M.next())ze=H(T,ze.value,Y),ze!==null&&(P=d(ze,P,Pe),ke===null?ge=ze:ke.sibling=ze,ke=ze);return Xe&&Rr(T,Pe),ge}for(Ce=s(T,Ce);!ze.done;Pe++,ze=M.next())ze=ne(Ce,T,Pe,ze.value,Y),ze!==null&&(e&&ze.alternate!==null&&Ce.delete(ze.key===null?Pe:ze.key),P=d(ze,P,Pe),ke===null?ge=ze:ke.sibling=ze,ke=ze);return e&&Ce.forEach(function(Yy){return t(T,Yy)}),Xe&&Rr(T,Pe),ge}function rt(T,P,M,Y){if(typeof M=="object"&&M!==null&&M.type===O&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case q:e:{for(var ge=M.key,ke=P;ke!==null;){if(ke.key===ge){if(ge=M.type,ge===O){if(ke.tag===7){o(T,ke.sibling),P=c(ke,M.props.children),P.return=T,T=P;break e}}else if(ke.elementType===ge||typeof ge=="object"&&ge!==null&&ge.$$typeof===ue&&Rf(ge)===ke.type){o(T,ke.sibling),P=c(ke,M.props),P.ref=no(T,ke,M),P.return=T,T=P;break e}o(T,ke);break}else t(T,ke);ke=ke.sibling}M.type===O?(P=Ir(M.props.children,T.mode,Y,M.key),P.return=T,T=P):(Y=Wa(M.type,M.key,M.props,null,T.mode,Y),Y.ref=no(T,P,M),Y.return=T,T=Y)}return g(T);case we:e:{for(ke=M.key;P!==null;){if(P.key===ke)if(P.tag===4&&P.stateNode.containerInfo===M.containerInfo&&P.stateNode.implementation===M.implementation){o(T,P.sibling),P=c(P,M.children||[]),P.return=T,T=P;break e}else{o(T,P);break}else t(T,P);P=P.sibling}P=iu(M,T.mode,Y),P.return=T,T=P}return g(T);case ue:return ke=M._init,rt(T,P,ke(M._payload),Y)}if(pr(M))return le(T,P,M,Y);if(te(M))return de(T,P,M,Y);xa(T,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,P!==null&&P.tag===6?(o(T,P.sibling),P=c(P,M),P.return=T,T=P):(o(T,P),P=ru(M,T.mode,Y),P.return=T,T=P),g(T)):o(T,P)}return rt}var oi=Pf(!0),Lf=Pf(!1),Ea=Xn(null),_a=null,ai=null,hl=null;function pl(){hl=ai=_a=null}function ml(e){var t=Ea.current;Qe(Ea),e._currentValue=t}function gl(e,t,o){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===o)break;e=e.return}}function si(e,t){_a=e,hl=ai=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Tt=!0),e.firstContext=null)}function Gt(e){var t=e._currentValue;if(hl!==e)if(e={context:e,memoizedValue:t,next:null},ai===null){if(_a===null)throw Error(i(308));ai=e,_a.dependencies={lanes:0,firstContext:e}}else ai=ai.next=e;return t}var Pr=null;function yl(e){Pr===null?Pr=[e]:Pr.push(e)}function Tf(e,t,o,s){var c=t.interleaved;return c===null?(o.next=o,yl(t)):(o.next=c.next,c.next=o),t.interleaved=o,Tn(e,s)}function Tn(e,t){e.lanes|=t;var o=e.alternate;for(o!==null&&(o.lanes|=t),o=e,e=e.return;e!==null;)e.childLanes|=t,o=e.alternate,o!==null&&(o.childLanes|=t),o=e,e=e.return;return o.tag===3?o.stateNode:null}var Zn=!1;function vl(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Nf(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 Nn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function er(e,t,o){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,(je&2)!==0){var c=s.pending;return c===null?t.next=t:(t.next=c.next,c.next=t),s.pending=t,Tn(e,o)}return c=s.interleaved,c===null?(t.next=t,yl(s)):(t.next=c.next,c.next=t),s.interleaved=t,Tn(e,o)}function ka(e,t,o){if(t=t.updateQueue,t!==null&&(t=t.shared,(o&4194240)!==0)){var s=t.lanes;s&=e.pendingLanes,o|=s,t.lanes=o,Ms(e,o)}}function Of(e,t){var o=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,o===s)){var c=null,d=null;if(o=o.firstBaseUpdate,o!==null){do{var g={eventTime:o.eventTime,lane:o.lane,tag:o.tag,payload:o.payload,callback:o.callback,next:null};d===null?c=d=g:d=d.next=g,o=o.next}while(o!==null);d===null?c=d=t:d=d.next=t}else c=d=t;o={baseState:s.baseState,firstBaseUpdate:c,lastBaseUpdate:d,shared:s.shared,effects:s.effects},e.updateQueue=o;return}e=o.lastBaseUpdate,e===null?o.firstBaseUpdate=t:e.next=t,o.lastBaseUpdate=t}function Ca(e,t,o,s){var c=e.updateQueue;Zn=!1;var d=c.firstBaseUpdate,g=c.lastBaseUpdate,x=c.shared.pending;if(x!==null){c.shared.pending=null;var C=x,I=C.next;C.next=null,g===null?d=I:g.next=I,g=C;var U=e.alternate;U!==null&&(U=U.updateQueue,x=U.lastBaseUpdate,x!==g&&(x===null?U.firstBaseUpdate=I:x.next=I,U.lastBaseUpdate=C))}if(d!==null){var H=c.baseState;g=0,U=I=C=null,x=d;do{var $=x.lane,ne=x.eventTime;if((s&$)===$){U!==null&&(U=U.next={eventTime:ne,lane:0,tag:x.tag,payload:x.payload,callback:x.callback,next:null});e:{var le=e,de=x;switch($=t,ne=o,de.tag){case 1:if(le=de.payload,typeof le=="function"){H=le.call(ne,H,$);break e}H=le;break e;case 3:le.flags=le.flags&-65537|128;case 0:if(le=de.payload,$=typeof le=="function"?le.call(ne,H,$):le,$==null)break e;H=Q({},H,$);break e;case 2:Zn=!0}}x.callback!==null&&x.lane!==0&&(e.flags|=64,$=c.effects,$===null?c.effects=[x]:$.push(x))}else ne={eventTime:ne,lane:$,tag:x.tag,payload:x.payload,callback:x.callback,next:null},U===null?(I=U=ne,C=H):U=U.next=ne,g|=$;if(x=x.next,x===null){if(x=c.shared.pending,x===null)break;$=x,x=$.next,$.next=null,c.lastBaseUpdate=$,c.shared.pending=null}}while(!0);if(U===null&&(C=H),c.baseState=C,c.firstBaseUpdate=I,c.lastBaseUpdate=U,t=c.shared.interleaved,t!==null){c=t;do g|=c.lane,c=c.next;while(c!==t)}else d===null&&(c.shared.lanes=0);Nr|=g,e.lanes=g,e.memoizedState=H}}function Mf(e,t,o){if(e=t.effects,t.effects=null,e!==null)for(t=0;to?o:4,e(!0);var s=_l.transition;_l.transition={};try{e(!1),t()}finally{Be=o,_l.transition=s}}function qf(){return Xt().memoizedState}function yy(e,t,o){var s=ir(e);if(o={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null},Jf(e))Zf(t,o);else if(o=Tf(e,t,o,s),o!==null){var c=kt();un(o,e,s,c),ed(o,t,s)}}function vy(e,t,o){var s=ir(e),c={lane:s,action:o,hasEagerState:!1,eagerState:null,next:null};if(Jf(e))Zf(t,c);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=t.lastRenderedReducer,d!==null))try{var g=t.lastRenderedState,x=d(g,o);if(c.hasEagerState=!0,c.eagerState=x,rn(x,g)){var C=t.interleaved;C===null?(c.next=c,yl(t)):(c.next=C.next,C.next=c),t.interleaved=c;return}}catch{}finally{}o=Tf(e,t,c,s),o!==null&&(c=kt(),un(o,e,s,c),ed(o,t,s))}}function Jf(e){var t=e.alternate;return e===Je||t!==null&&t===Je}function Zf(e,t){ao=La=!0;var o=e.pending;o===null?t.next=t:(t.next=o.next,o.next=t),e.pending=t}function ed(e,t,o){if((o&4194240)!==0){var s=t.lanes;s&=e.pendingLanes,o|=s,t.lanes=o,Ms(e,o)}}var Oa={readContext:Gt,useCallback:yt,useContext:yt,useEffect:yt,useImperativeHandle:yt,useInsertionEffect:yt,useLayoutEffect:yt,useMemo:yt,useReducer:yt,useRef:yt,useState:yt,useDebugValue:yt,useDeferredValue:yt,useTransition:yt,useMutableSource:yt,useSyncExternalStore:yt,useId:yt,unstable_isNewReconciler:!1},wy={readContext:Gt,useCallback:function(e,t){return gn().memoizedState=[e,t===void 0?null:t],e},useContext:Gt,useEffect:Bf,useImperativeHandle:function(e,t,o){return o=o!=null?o.concat([e]):null,Ta(4194308,4,Kf.bind(null,t,e),o)},useLayoutEffect:function(e,t){return Ta(4194308,4,e,t)},useInsertionEffect:function(e,t){return Ta(4,2,e,t)},useMemo:function(e,t){var o=gn();return t=t===void 0?null:t,e=e(),o.memoizedState=[e,t],e},useReducer:function(e,t,o){var s=gn();return t=o!==void 0?o(t):t,s.memoizedState=s.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},s.queue=e,e=e.dispatch=yy.bind(null,Je,e),[s.memoizedState,e]},useRef:function(e){var t=gn();return e={current:e},t.memoizedState=e},useState:Vf,useDebugValue:Nl,useDeferredValue:function(e){return gn().memoizedState=e},useTransition:function(){var e=Vf(!1),t=e[0];return e=gy.bind(null,e[1]),gn().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,o){var s=Je,c=gn();if(Xe){if(o===void 0)throw Error(i(407));o=o()}else{if(o=t(),ft===null)throw Error(i(349));(Tr&30)!==0||Af(s,t,o)}c.memoizedState=o;var d={value:o,getSnapshot:t};return c.queue=d,Bf(jf.bind(null,s,d,e),[e]),s.flags|=2048,uo(9,Ff.bind(null,s,d,o,t),void 0,null),o},useId:function(){var e=gn(),t=ft.identifierPrefix;if(Xe){var o=Ln,s=Pn;o=(s&~(1<<32-He(s)-1)).toString(32)+o,t=":"+t+"R"+o,o=so++,0<\/script>",e=e.removeChild(e.firstChild)):typeof s.is=="string"?e=g.createElement(o,{is:s.is}):(e=g.createElement(o),o==="select"&&(g=e,s.multiple?g.multiple=!0:s.size&&(g.size=s.size))):e=g.createElementNS(e,o),e[pn]=t,e[eo]=s,Sd(e,t,!1,!1),t.stateNode=e;e:{switch(g=Hr(o,s),o){case"dialog":Ye("cancel",e),Ye("close",e),c=s;break;case"iframe":case"object":case"embed":Ye("load",e),c=s;break;case"video":case"audio":for(c=0;cdi&&(t.flags|=128,s=!0,co(d,!1),t.lanes=4194304)}else{if(!s)if(e=Ra(g),e!==null){if(t.flags|=128,s=!0,o=e.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),co(d,!0),d.tail===null&&d.tailMode==="hidden"&&!g.alternate&&!Xe)return vt(t),null}else 2*Ue()-d.renderingStartTime>di&&o!==1073741824&&(t.flags|=128,s=!0,co(d,!1),t.lanes=4194304);d.isBackwards?(g.sibling=t.child,t.child=g):(o=d.last,o!==null?o.sibling=g:t.child=g,d.last=g)}return d.tail!==null?(t=d.tail,d.rendering=t,d.tail=t.sibling,d.renderingStartTime=Ue(),t.sibling=null,o=qe.current,Ke(qe,s?o&1|2:o&1),t):(vt(t),null);case 22:case 23:return eu(),s=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==s&&(t.flags|=8192),s&&(t.mode&1)!==0?($t&1073741824)!==0&&(vt(t),t.subtreeFlags&6&&(t.flags|=8192)):vt(t),null;case 24:return null;case 25:return null}throw Error(i(156,t.tag))}function Py(e,t){switch(ul(t),t.tag){case 1:return Lt(t.type)&&ma(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return li(),Qe(Pt),Qe(gt),El(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return Sl(t),null;case 13:if(Qe(qe),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ii()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Qe(qe),null;case 4:return li(),null;case 10:return ml(t.type._context),null;case 22:case 23:return eu(),null;case 24:return null;default:return null}}var ba=!1,wt=!1,Ly=typeof WeakSet=="function"?WeakSet:Set,oe=null;function ci(e,t){var o=e.ref;if(o!==null)if(typeof o=="function")try{o(null)}catch(s){et(e,t,s)}else o.current=null}function Ul(e,t,o){try{o()}catch(s){et(e,t,s)}}var _d=!1;function Ty(e,t){if(el=ta,e=ef(),Ks(e)){if("selectionStart"in e)var o={start:e.selectionStart,end:e.selectionEnd};else e:{o=(o=e.ownerDocument)&&o.defaultView||window;var s=o.getSelection&&o.getSelection();if(s&&s.rangeCount!==0){o=s.anchorNode;var c=s.anchorOffset,d=s.focusNode;s=s.focusOffset;try{o.nodeType,d.nodeType}catch{o=null;break e}var g=0,x=-1,C=-1,I=0,U=0,H=e,$=null;t:for(;;){for(var ne;H!==o||c!==0&&H.nodeType!==3||(x=g+c),H!==d||s!==0&&H.nodeType!==3||(C=g+s),H.nodeType===3&&(g+=H.nodeValue.length),(ne=H.firstChild)!==null;)$=H,H=ne;for(;;){if(H===e)break t;if($===o&&++I===c&&(x=g),$===d&&++U===s&&(C=g),(ne=H.nextSibling)!==null)break;H=$,$=H.parentNode}H=ne}o=x===-1||C===-1?null:{start:x,end:C}}else o=null}o=o||{start:0,end:0}}else o=null;for(tl={focusedElem:e,selectionRange:o},ta=!1,oe=t;oe!==null;)if(t=oe,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,oe=e;else for(;oe!==null;){t=oe;try{var le=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(le!==null){var de=le.memoizedProps,rt=le.memoizedState,T=t.stateNode,P=T.getSnapshotBeforeUpdate(t.elementType===t.type?de:an(t.type,de),rt);T.__reactInternalSnapshotBeforeUpdate=P}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(i(163))}}catch(Y){et(t,t.return,Y)}if(e=t.sibling,e!==null){e.return=t.return,oe=e;break}oe=t.return}return le=_d,_d=!1,le}function fo(e,t,o){var s=t.updateQueue;if(s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&e)===e){var d=c.destroy;c.destroy=void 0,d!==void 0&&Ul(t,o,d)}c=c.next}while(c!==s)}}function Aa(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var o=t=t.next;do{if((o.tag&e)===e){var s=o.create;o.destroy=s()}o=o.next}while(o!==t)}}function Bl(e){var t=e.ref;if(t!==null){var o=e.stateNode;switch(e.tag){case 5:e=o;break;default:e=o}typeof t=="function"?t(e):t.current=e}}function kd(e){var t=e.alternate;t!==null&&(e.alternate=null,kd(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[pn],delete t[eo],delete t[ol],delete t[fy],delete t[dy])),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 Cd(e){return e.tag===5||e.tag===3||e.tag===4}function Rd(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Cd(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 Hl(e,t,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?o.nodeType===8?o.parentNode.insertBefore(e,t):o.insertBefore(e,t):(o.nodeType===8?(t=o.parentNode,t.insertBefore(e,o)):(t=o,t.appendChild(e)),o=o._reactRootContainer,o!=null||t.onclick!==null||(t.onclick=ha));else if(s!==4&&(e=e.child,e!==null))for(Hl(e,t,o),e=e.sibling;e!==null;)Hl(e,t,o),e=e.sibling}function Wl(e,t,o){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?o.insertBefore(e,t):o.appendChild(e);else if(s!==4&&(e=e.child,e!==null))for(Wl(e,t,o),e=e.sibling;e!==null;)Wl(e,t,o),e=e.sibling}var pt=null,sn=!1;function tr(e,t,o){for(o=o.child;o!==null;)Pd(e,t,o),o=o.sibling}function Pd(e,t,o){if(Et&&typeof Et.onCommitFiberUnmount=="function")try{Et.onCommitFiberUnmount(En,o)}catch{}switch(o.tag){case 5:wt||ci(o,t);case 6:var s=pt,c=sn;pt=null,tr(e,t,o),pt=s,sn=c,pt!==null&&(sn?(e=pt,o=o.stateNode,e.nodeType===8?e.parentNode.removeChild(o):e.removeChild(o)):pt.removeChild(o.stateNode));break;case 18:pt!==null&&(sn?(e=pt,o=o.stateNode,e.nodeType===8?il(e.parentNode,o):e.nodeType===1&&il(e,o),Bi(e)):il(pt,o.stateNode));break;case 4:s=pt,c=sn,pt=o.stateNode.containerInfo,sn=!0,tr(e,t,o),pt=s,sn=c;break;case 0:case 11:case 14:case 15:if(!wt&&(s=o.updateQueue,s!==null&&(s=s.lastEffect,s!==null))){c=s=s.next;do{var d=c,g=d.destroy;d=d.tag,g!==void 0&&((d&2)!==0||(d&4)!==0)&&Ul(o,t,g),c=c.next}while(c!==s)}tr(e,t,o);break;case 1:if(!wt&&(ci(o,t),s=o.stateNode,typeof s.componentWillUnmount=="function"))try{s.props=o.memoizedProps,s.state=o.memoizedState,s.componentWillUnmount()}catch(x){et(o,t,x)}tr(e,t,o);break;case 21:tr(e,t,o);break;case 22:o.mode&1?(wt=(s=wt)||o.memoizedState!==null,tr(e,t,o),wt=s):tr(e,t,o);break;default:tr(e,t,o)}}function Ld(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var o=e.stateNode;o===null&&(o=e.stateNode=new Ly),t.forEach(function(s){var c=jy.bind(null,e,s);o.has(s)||(o.add(s),s.then(c,c))})}}function ln(e,t){var o=t.deletions;if(o!==null)for(var s=0;sc&&(c=g),s&=~d}if(s=c,s=Ue()-s,s=(120>s?120:480>s?480:1080>s?1080:1920>s?1920:3e3>s?3e3:4320>s?4320:1960*Oy(s/1960))-s,10e?16:e,rr===null)var s=!1;else{if(e=rr,rr=null,Va=0,(je&6)!==0)throw Error(i(331));var c=je;for(je|=4,oe=e.current;oe!==null;){var d=oe,g=d.child;if((oe.flags&16)!==0){var x=d.deletions;if(x!==null){for(var C=0;CUe()-Ql?Mr(e,0):Yl|=o),Ot(e,t)}function Vd(e,t){t===0&&((e.mode&1)===0?t=1:(t=xr,xr<<=1,(xr&130023424)===0&&(xr=4194304)));var o=kt();e=Tn(e,t),e!==null&&(ji(e,t,o),Ot(e,o))}function Fy(e){var t=e.memoizedState,o=0;t!==null&&(o=t.retryLane),Vd(e,o)}function jy(e,t){var o=0;switch(e.tag){case 13:var s=e.stateNode,c=e.memoizedState;c!==null&&(o=c.retryLane);break;case 19:s=e.stateNode;break;default:throw Error(i(314))}s!==null&&s.delete(t),Vd(e,o)}var Ud;Ud=function(e,t,o){if(e!==null)if(e.memoizedProps!==t.pendingProps||Pt.current)Tt=!0;else{if((e.lanes&o)===0&&(t.flags&128)===0)return Tt=!1,Cy(e,t,o);Tt=(e.flags&131072)!==0}else Tt=!1,Xe&&(t.flags&1048576)!==0&&xf(t,wa,t.index);switch(t.lanes=0,t.tag){case 2:var s=t.type;Ia(e,t),e=t.pendingProps;var c=ti(t,gt.current);si(t,o),c=Cl(null,t,s,e,c,o);var d=Rl();return t.flags|=1,typeof c=="object"&&c!==null&&typeof c.render=="function"&&c.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Lt(s)?(d=!0,ga(t)):d=!1,t.memoizedState=c.state!==null&&c.state!==void 0?c.state:null,vl(t),c.updater=Ma,t.stateNode=c,c._reactInternals=t,Ml(t,s,e,o),t=Al(null,t,s,!0,d,o)):(t.tag=0,Xe&&d&&ll(t),_t(null,t,c,o),t=t.child),t;case 16:s=t.elementType;e:{switch(Ia(e,t),e=t.pendingProps,c=s._init,s=c(s._payload),t.type=s,c=t.tag=$y(s),e=an(s,e),c){case 0:t=bl(null,t,s,e,o);break e;case 1:t=pd(null,t,s,e,o);break e;case 11:t=ud(null,t,s,e,o);break e;case 14:t=cd(null,t,s,an(s.type,e),o);break e}throw Error(i(306,s,""))}return t;case 0:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:an(s,c),bl(e,t,s,c,o);case 1:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:an(s,c),pd(e,t,s,c,o);case 3:e:{if(md(t),e===null)throw Error(i(387));s=t.pendingProps,d=t.memoizedState,c=d.element,Nf(e,t),Ca(t,s,null,o);var g=t.memoizedState;if(s=g.element,d.isDehydrated)if(d={element:s,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},t.updateQueue.baseState=d,t.memoizedState=d,t.flags&256){c=ui(Error(i(423)),t),t=gd(e,t,s,o,c);break e}else if(s!==c){c=ui(Error(i(424)),t),t=gd(e,t,s,o,c);break e}else for(zt=Gn(t.stateNode.containerInfo.firstChild),jt=t,Xe=!0,on=null,o=Lf(t,null,s,o),t.child=o;o;)o.flags=o.flags&-3|4096,o=o.sibling;else{if(ii(),s===c){t=On(e,t,o);break e}_t(e,t,s,o)}t=t.child}return t;case 5:return Df(t),e===null&&fl(t),s=t.type,c=t.pendingProps,d=e!==null?e.memoizedProps:null,g=c.children,nl(s,c)?g=null:d!==null&&nl(s,d)&&(t.flags|=32),hd(e,t),_t(e,t,g,o),t.child;case 6:return e===null&&fl(t),null;case 13:return yd(e,t,o);case 4:return wl(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=oi(t,null,s,o):_t(e,t,s,o),t.child;case 11:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:an(s,c),ud(e,t,s,c,o);case 7:return _t(e,t,t.pendingProps,o),t.child;case 8:return _t(e,t,t.pendingProps.children,o),t.child;case 12:return _t(e,t,t.pendingProps.children,o),t.child;case 10:e:{if(s=t.type._context,c=t.pendingProps,d=t.memoizedProps,g=c.value,Ke(Ea,s._currentValue),s._currentValue=g,d!==null)if(rn(d.value,g)){if(d.children===c.children&&!Pt.current){t=On(e,t,o);break e}}else for(d=t.child,d!==null&&(d.return=t);d!==null;){var x=d.dependencies;if(x!==null){g=d.child;for(var C=x.firstContext;C!==null;){if(C.context===s){if(d.tag===1){C=Nn(-1,o&-o),C.tag=2;var I=d.updateQueue;if(I!==null){I=I.shared;var U=I.pending;U===null?C.next=C:(C.next=U.next,U.next=C),I.pending=C}}d.lanes|=o,C=d.alternate,C!==null&&(C.lanes|=o),gl(d.return,o,t),x.lanes|=o;break}C=C.next}}else if(d.tag===10)g=d.type===t.type?null:d.child;else if(d.tag===18){if(g=d.return,g===null)throw Error(i(341));g.lanes|=o,x=g.alternate,x!==null&&(x.lanes|=o),gl(g,o,t),g=d.sibling}else g=d.child;if(g!==null)g.return=d;else for(g=d;g!==null;){if(g===t){g=null;break}if(d=g.sibling,d!==null){d.return=g.return,g=d;break}g=g.return}d=g}_t(e,t,c.children,o),t=t.child}return t;case 9:return c=t.type,s=t.pendingProps.children,si(t,o),c=Gt(c),s=s(c),t.flags|=1,_t(e,t,s,o),t.child;case 14:return s=t.type,c=an(s,t.pendingProps),c=an(s.type,c),cd(e,t,s,c,o);case 15:return fd(e,t,t.type,t.pendingProps,o);case 17:return s=t.type,c=t.pendingProps,c=t.elementType===s?c:an(s,c),Ia(e,t),t.tag=1,Lt(s)?(e=!0,ga(t)):e=!1,si(t,o),nd(t,s,c),Ml(t,s,c,o),Al(null,t,s,!0,e,o);case 19:return wd(e,t,o);case 22:return dd(e,t,o)}throw Error(i(156,t.tag))};function Bd(e,t){return nt(e,t)}function zy(e,t,o,s){this.tag=e,this.key=o,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=s,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Jt(e,t,o,s){return new zy(e,t,o,s)}function nu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function $y(e){if(typeof e=="function")return nu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Z)return 11;if(e===Ne)return 14}return 2}function ar(e,t){var o=e.alternate;return o===null?(o=Jt(e.tag,t,e.key,e.mode),o.elementType=e.elementType,o.type=e.type,o.stateNode=e.stateNode,o.alternate=e,e.alternate=o):(o.pendingProps=t,o.type=e.type,o.flags=0,o.subtreeFlags=0,o.deletions=null),o.flags=e.flags&14680064,o.childLanes=e.childLanes,o.lanes=e.lanes,o.child=e.child,o.memoizedProps=e.memoizedProps,o.memoizedState=e.memoizedState,o.updateQueue=e.updateQueue,t=e.dependencies,o.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},o.sibling=e.sibling,o.index=e.index,o.ref=e.ref,o}function Wa(e,t,o,s,c,d){var g=2;if(s=e,typeof e=="function")nu(e)&&(g=1);else if(typeof e=="string")g=5;else e:switch(e){case O:return Ir(o.children,c,d,t);case ee:g=8,c|=8;break;case ae:return e=Jt(12,o,t,c|2),e.elementType=ae,e.lanes=d,e;case J:return e=Jt(13,o,t,c),e.elementType=J,e.lanes=d,e;case re:return e=Jt(19,o,t,c),e.elementType=re,e.lanes=d,e;case ye:return Ka(o,c,d,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case pe:g=10;break e;case X:g=9;break e;case Z:g=11;break e;case Ne:g=14;break e;case ue:g=16,s=null;break e}throw Error(i(130,e==null?e:typeof e,""))}return t=Jt(g,o,t,c),t.elementType=e,t.type=s,t.lanes=d,t}function Ir(e,t,o,s){return e=Jt(7,e,s,t),e.lanes=o,e}function Ka(e,t,o,s){return e=Jt(22,e,s,t),e.elementType=ye,e.lanes=o,e.stateNode={isHidden:!1},e}function ru(e,t,o){return e=Jt(6,e,null,t),e.lanes=o,e}function iu(e,t,o){return t=Jt(4,e.children!==null?e.children:[],e.key,t),t.lanes=o,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Vy(e,t,o,s,c){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=Os(0),this.expirationTimes=Os(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Os(0),this.identifierPrefix=s,this.onRecoverableError=c,this.mutableSourceEagerHydrationData=null}function ou(e,t,o,s,c,d,g,x,C){return e=new Vy(e,t,o,x,C),t===1?(t=1,d===!0&&(t|=8)):t=0,d=Jt(3,null,null,t),e.current=d,d.stateNode=e,d.memoizedState={element:s,isDehydrated:o,cache:null,transitions:null,pendingSuspenseBoundaries:null},vl(d),e}function Uy(e,t,o){var s=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),fu.exports=rv(),fu.exports}var ih;function ov(){if(ih)return Za;ih=1;var n=iv();return Za.createRoot=n.createRoot,Za.hydrateRoot=n.hydrateRoot,Za}var av=ov(),E=Ss();const sv=qy(E),lv=Qy({__proto__:null,default:sv},[E]);/** * react-router v7.13.0 * * 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 */var Pp=n=>{throw TypeError(n)},uv=(n,r,i)=>r.has(n)||Pp("Cannot "+i),pu=(n,r,i)=>(uv(n,r,"read from private field"),i?i.call(n):r.get(n)),cv=(n,r,i)=>r.has(n)?Pp("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(n):r.set(n,i),oh="popstate";function fv(n={}){function r(a,l){let{pathname:u,search:f,hash:h}=a.location;return Io("",{pathname:u,search:f,hash:h},l.state&&l.state.usr||null,l.state&&l.state.key||"default")}function i(a,l){return typeof l=="string"?l:Sn(l)}return hv(r,i,null,n)}function De(n,r){if(n===!1||n===null||typeof n>"u")throw new Error(r)}function tt(n,r){if(!n){typeof console<"u"&&console.warn(r);try{throw new Error(r)}catch{}}}function dv(){return Math.random().toString(36).substring(2,10)}function ah(n,r){return{usr:n.state,key:n.key,idx:r}}function Io(n,r,i=null,a){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof r=="string"?hr(r):r,state:i,key:r&&r.key||a||dv()}}function Sn({pathname:n="/",search:r="",hash:i=""}){return r&&r!=="?"&&(n+=r.charAt(0)==="?"?r:"?"+r),i&&i!=="#"&&(n+=i.charAt(0)==="#"?i:"#"+i),n}function hr(n){let r={};if(n){let i=n.indexOf("#");i>=0&&(r.hash=n.substring(i),n=n.substring(0,i));let a=n.indexOf("?");a>=0&&(r.search=n.substring(a),n=n.substring(0,a)),n&&(r.pathname=n)}return r}function hv(n,r,i,a={}){let{window:l=document.defaultView,v5Compat:u=!1}=a,f=l.history,h="POP",p=null,m=v();m==null&&(m=0,f.replaceState({...f.state,idx:m},""));function v(){return(f.state||{idx:null}).idx}function y(){h="POP";let b=v(),B=b==null?null:b-m;m=b,p&&p({action:h,location:N.location,delta:B})}function w(b,B){h="PUSH";let F=Io(N.location,b,B);m=v()+1;let j=ah(F,m),W=N.createHref(F);try{f.pushState(j,"",W)}catch(q){if(q instanceof DOMException&&q.name==="DataCloneError")throw q;l.location.assign(W)}u&&p&&p({action:h,location:N.location,delta:1})}function S(b,B){h="REPLACE";let F=Io(N.location,b,B);m=v();let j=ah(F,m),W=N.createHref(F);f.replaceState(j,"",W),u&&p&&p({action:h,location:N.location,delta:0})}function k(b){return Lp(b)}let N={get action(){return h},get location(){return n(l,f)},listen(b){if(p)throw new Error("A history only accepts one active listener");return l.addEventListener(oh,y),p=b,()=>{l.removeEventListener(oh,y),p=null}},createHref(b){return r(l,b)},createURL:k,encodeLocation(b){let B=k(b);return{pathname:B.pathname,search:B.search,hash:B.hash}},push:w,replace:S,go(b){return f.go(b)}};return N}function Lp(n,r=!1){let i="http://localhost";typeof window<"u"&&(i=window.location.origin!=="null"?window.location.origin:window.location.href),De(i,"No window.location.(origin|href) available to create URL");let a=typeof n=="string"?n:Sn(n);return a=a.replace(/ $/,"%20"),!r&&a.startsWith("//")&&(a=i+a),new URL(a,i)}var Eo,sh=class{constructor(n){if(cv(this,Eo,new Map),n)for(let[r,i]of n)this.set(r,i)}get(n){if(pu(this,Eo).has(n))return pu(this,Eo).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,r){pu(this,Eo).set(n,r)}};Eo=new WeakMap;var pv=new Set(["lazy","caseSensitive","path","id","index","children"]);function mv(n){return pv.has(n)}var gv=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function yv(n){return gv.has(n)}function vv(n){return n.index===!0}function bo(n,r,i=[],a={},l=!1){return n.map((u,f)=>{let h=[...i,String(f)],p=typeof u.id=="string"?u.id:h.join("-");if(De(u.index!==!0||!u.children,"Cannot specify children on an index route"),De(l||!a[p],`Found a route id collision on id "${p}". Route id's must be globally unique within Data Router usages`),vv(u)){let m={...u,id:p};return a[p]=lh(m,r(m)),m}else{let m={...u,id:p,children:void 0};return a[p]=lh(m,r(m)),u.children&&(m.children=bo(u.children,r,h,a,l)),m}})}function lh(n,r){return Object.assign(n,{...r,...typeof r.lazy=="object"&&r.lazy!=null?{lazy:{...n.lazy,...r.lazy}}:{}})}function cr(n,r,i="/"){return _o(n,r,i,!1)}function _o(n,r,i,a){let l=typeof r=="string"?hr(r):r,u=It(l.pathname||"/",i);if(u==null)return null;let f=Tp(n);Sv(f);let h=null;for(let p=0;h==null&&p{let v={relativePath:m===void 0?f.path||"":m,caseSensitive:f.caseSensitive===!0,childrenIndex:h,route:f};if(v.relativePath.startsWith("/")){if(!v.relativePath.startsWith(a)&&p)return;De(v.relativePath.startsWith(a),`Absolute route path "${v.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),v.relativePath=v.relativePath.slice(a.length)}let y=wn([a,v.relativePath]),w=i.concat(v);f.children&&f.children.length>0&&(De(f.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${y}".`),Tp(f.children,r,w,y,p)),!(f.path==null&&!f.index)&&r.push({path:y,score:Pv(y,f.index),routesMeta:w})};return n.forEach((f,h)=>{var p;if(f.path===""||!((p=f.path)!=null&&p.includes("?")))u(f,h);else for(let m of Np(f.path))u(f,h,!0,m)}),r}function Np(n){let r=n.split("/");if(r.length===0)return[];let[i,...a]=r,l=i.endsWith("?"),u=i.replace(/\?$/,"");if(a.length===0)return l?[u,""]:[u];let f=Np(a.join("/")),h=[];return h.push(...f.map(p=>p===""?u:[u,p].join("/"))),l&&h.push(...f),h.map(p=>n.startsWith("/")&&p===""?"/":p)}function Sv(n){n.sort((r,i)=>r.score!==i.score?i.score-r.score:Lv(r.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var xv=/^:[\w-]+$/,Ev=3,_v=2,kv=1,Cv=10,Rv=-2,uh=n=>n==="*";function Pv(n,r){let i=n.split("/"),a=i.length;return i.some(uh)&&(a+=Rv),r&&(a+=_v),i.filter(l=>!uh(l)).reduce((l,u)=>l+(xv.test(u)?Ev:u===""?kv:Cv),a)}function Lv(n,r){return n.length===r.length&&n.slice(0,-1).every((a,l)=>a===r[l])?n[n.length-1]-r[r.length-1]:0}function Tv(n,r,i=!1){let{routesMeta:a}=n,l={},u="/",f=[];for(let h=0;h{if(v==="*"){let k=h[w]||"";f=u.slice(0,u.length-k.length).replace(/(.)\/+$/,"$1")}const S=h[w];return y&&!S?m[v]=void 0:m[v]=(S||"").replace(/%2F/g,"/"),m},{}),pathname:u,pathnameBase:f,pattern:n}}function Nv(n,r=!1,i=!0){tt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let a=[],l="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(f,h,p)=>(a.push({paramName:h,isOptional:p!=null}),p?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(a.push({paramName:"*"}),l+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?l+="\\/*$":n!==""&&n!=="/"&&(l+="(?:(?=\\/|$))"),[new RegExp(l,r?void 0:"i"),a]}function Ov(n){try{return n.split("/").map(r=>decodeURIComponent(r).replace(/\//g,"%2F")).join("/")}catch(r){return tt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${r}).`),n}}function It(n,r){if(r==="/")return n;if(!n.toLowerCase().startsWith(r.toLowerCase()))return null;let i=r.endsWith("/")?r.length-1:r.length,a=n.charAt(i);return a&&a!=="/"?null:n.slice(i)||"/"}function Mv({basename:n,pathname:r}){return r==="/"?n:wn([n,r])}var Op=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,oc=n=>Op.test(n);function Dv(n,r="/"){let{pathname:i,search:a="",hash:l=""}=typeof n=="string"?hr(n):n,u;return i?(i=i.replace(/\/\/+/g,"/"),i.startsWith("/")?u=ch(i.substring(1),"/"):u=ch(i,r)):u=r,{pathname:u,search:bv(a),hash:Av(l)}}function ch(n,r){let i=r.replace(/\/+$/,"").split("/");return n.split("/").forEach(l=>{l===".."?i.length>1&&i.pop():l!=="."&&i.push(l)}),i.length>1?i.join("/"):"/"}function mu(n,r,i,a){return`Cannot include a '${n}' character in a manually specified \`to.${r}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function Mp(n){return n.filter((r,i)=>i===0||r.route.path&&r.route.path.length>0)}function xs(n){let r=Mp(n);return r.map((i,a)=>a===r.length-1?i.pathname:i.pathnameBase)}function Es(n,r,i,a=!1){let l;typeof n=="string"?l=hr(n):(l={...n},De(!l.pathname||!l.pathname.includes("?"),mu("?","pathname","search",l)),De(!l.pathname||!l.pathname.includes("#"),mu("#","pathname","hash",l)),De(!l.search||!l.search.includes("#"),mu("#","search","hash",l)));let u=n===""||l.pathname==="",f=u?"/":l.pathname,h;if(f==null)h=i;else{let y=r.length-1;if(!a&&f.startsWith("..")){let w=f.split("/");for(;w[0]==="..";)w.shift(),y-=1;l.pathname=w.join("/")}h=y>=0?r[y]:"/"}let p=Dv(l,h),m=f&&f!=="/"&&f.endsWith("/"),v=(u||f===".")&&i.endsWith("/");return!p.pathname.endsWith("/")&&(m||v)&&(p.pathname+="/"),p}var wn=n=>n.join("/").replace(/\/\/+/g,"/"),Iv=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),bv=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,Av=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,zo=class{constructor(n,r,i,a=!1){this.status=n,this.statusText=r||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function _i(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function $o(n){return n.map(r=>r.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Dp=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ip(n,r){let i=n;if(typeof i!="string"||!Op.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,l=!1;if(Dp)try{let u=new URL(window.location.href),f=i.startsWith("//")?new URL(u.protocol+i):new URL(i),h=It(f.pathname,r);f.origin===u.origin&&h!=null?i=h+f.search+f.hash:l=!0}catch{tt(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:l,to:i}}var dr=Symbol("Uninstrumented");function Fv(n,r){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(l=>l({id:r.id,index:r.index,path:r.path,instrument(u){let f=Object.keys(i);for(let h of f)u[h]&&i[h].push(u[h])}}));let a={};if(typeof r.lazy=="function"&&i.lazy.length>0){let l=yi(i.lazy,r.lazy,()=>{});l&&(a.lazy=l)}if(typeof r.lazy=="object"){let l=r.lazy;["middleware","loader","action"].forEach(u=>{let f=l[u],h=i[`lazy.${u}`];if(typeof f=="function"&&h.length>0){let p=yi(h,f,()=>{});p&&(a.lazy=Object.assign(a.lazy||{},{[u]:p}))}})}return["loader","action"].forEach(l=>{let u=r[l];if(typeof u=="function"&&i[l].length>0){let f=u[dr]??u,h=yi(i[l],f,(...p)=>fh(p[0]));h&&(l==="loader"&&f.hydrate===!0&&(h.hydrate=!0),h[dr]=f,a[l]=h)}}),r.middleware&&r.middleware.length>0&&i.middleware.length>0&&(a.middleware=r.middleware.map(l=>{let u=l[dr]??l,f=yi(i.middleware,u,(...h)=>fh(h[0]));return f?(f[dr]=u,f):l})),a}function jv(n,r){let i={navigate:[],fetch:[]};if(r.forEach(a=>a({instrument(l){let u=Object.keys(l);for(let f of u)l[f]&&i[f].push(l[f])}})),i.navigate.length>0){let a=n.navigate[dr]??n.navigate,l=yi(i.navigate,a,(...u)=>{let[f,h]=u;return{to:typeof f=="number"||typeof f=="string"?f:f?Sn(f):".",...dh(n,h??{})}});l&&(l[dr]=a,n.navigate=l)}if(i.fetch.length>0){let a=n.fetch[dr]??n.fetch,l=yi(i.fetch,a,(...u)=>{let[f,,h,p]=u;return{href:h??".",fetcherKey:f,...dh(n,p??{})}});l&&(l[dr]=a,n.fetch=l)}return n}function yi(n,r,i){return n.length===0?null:async(...a)=>{let l=await bp(n,i(...a),()=>r(...a),n.length-1);if(l.type==="error")throw l.value;return l.value}}async function bp(n,r,i,a){let l=n[a],u;if(l){let f,h=async()=>(f?console.error("You cannot call instrumented handlers more than once"):f=bp(n,r,i,a-1),u=await f,De(u,"Expected a result"),u.type==="error"&&u.value instanceof Error?{status:"error",error:u.value}:{status:"success",error:void 0});try{await l(h,r)}catch(p){console.error("An instrumentation function threw an error:",p)}f||await h(),await f}else try{u={type:"success",value:await i()}}catch(f){u={type:"error",value:f}}return u||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function fh(n){let{request:r,context:i,params:a,unstable_pattern:l}=n;return{request:zv(r),params:{...a},unstable_pattern:l,context:$v(i)}}function dh(n,r){return{currentUrl:Sn(n.state.location),..."formMethod"in r?{formMethod:r.formMethod}:{},..."formEncType"in r?{formEncType:r.formEncType}:{},..."formData"in r?{formData:r.formData}:{},..."body"in r?{body:r.body}:{}}}function zv(n){return{method:n.method,url:n.url,headers:{get:(...r)=>n.headers.get(...r)}}}function $v(n){if(Uv(n)){let r={...n};return Object.freeze(r),r}else return{get:r=>n.get(r)}}var Vv=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Uv(n){if(n===null||typeof n!="object")return!1;const r=Object.getPrototypeOf(n);return r===Object.prototype||r===null||Object.getOwnPropertyNames(r).sort().join("\0")===Vv}var Ap=["POST","PUT","PATCH","DELETE"],Bv=new Set(Ap),Hv=["GET",...Ap],Wv=new Set(Hv),Fp=new Set([301,302,303,307,308]),Kv=new Set([307,308]),gu={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Yv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},mi={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Qv=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),jp="remix-router-transitions",zp=Symbol("ResetLoaderData");function Gv(n){const r=n.window?n.window:typeof window<"u"?window:void 0,i=typeof r<"u"&&typeof r.document<"u"&&typeof r.document.createElement<"u";De(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=n.hydrationRouteProperties||[],l=n.mapRouteProperties||Qv,u=l;if(n.unstable_instrumentations){let _=n.unstable_instrumentations;u=L=>({...l(L),...Fv(_.map(D=>D.route).filter(Boolean),L)})}let f={},h=bo(n.routes,u,void 0,f),p,m=n.basename||"/";m.startsWith("/")||(m=`/${m}`);let v=n.dataStrategy||e0,y={...n.future},w=null,S=new Set,k=null,N=null,b=null,B=n.hydrationData!=null,F=cr(h,n.history.location,m),j=!1,W=null,q;if(F==null&&!n.patchRoutesOnNavigation){let _=en(404,{pathname:n.history.location.pathname}),{matches:L,route:D}=es(h);q=!0,F=L,W={[D.id]:_}}else if(F&&!n.hydrationData&&yr(F,h,n.history.location.pathname).active&&(F=null),F)if(F.some(_=>_.route.lazy))q=!1;else if(!F.some(_=>ac(_.route)))q=!0;else{let _=n.hydrationData?n.hydrationData.loaderData:null,L=n.hydrationData?n.hydrationData.errors:null;if(L){let D=F.findIndex(V=>L[V.route.id]!==void 0);q=F.slice(0,D+1).every(V=>!bu(V.route,_,L))}else q=F.every(D=>!bu(D.route,_,L))}else{q=!1,F=[];let _=yr(null,h,n.history.location.pathname);_.active&&_.matches&&(j=!0,F=_.matches)}let we,O={historyAction:n.history.action,location:n.history.location,matches:F,initialized:q,navigation:gu,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||W,fetchers:new Map,blockers:new Map},ee="POP",ae=null,pe=!1,X,Z=!1,J=new Map,re=null,Ne=!1,ue=!1,ye=new Set,z=new Map,te=0,Q=-1,R=new Map,A=new Set,Se=new Map,_e=new Map,Ee=new Set,Oe=new Map,$e,be=null;function We(){if(w=n.history.listen(({action:_,location:L,delta:D})=>{if($e){$e(),$e=void 0;return}tt(Oe.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 V=xn({currentLocation:O.location,nextLocation:L,historyAction:_});if(V&&D!=null){let G=new Promise(me=>{$e=me});n.history.go(D*-1),zn(V,{state:"blocked",location:L,proceed(){zn(V,{state:"proceeding",proceed:void 0,reset:void 0,location:L}),G.then(()=>n.history.go(D))},reset(){let me=new Map(O.blockers);me.set(V,mi),at({blockers:me})}}),ae==null||ae.resolve(),ae=null;return}return cn(_,L)}),i){v0(r,J);let _=()=>w0(r,J);r.addEventListener("pagehide",_),re=()=>r.removeEventListener("pagehide",_)}return O.initialized||cn("POP",O.location,{initialHydration:!0}),we}function xt(){w&&w(),re&&re(),S.clear(),X&&X.abort(),O.fetchers.forEach((_,L)=>Mi(L)),O.blockers.forEach((_,L)=>Wr(L))}function $r(_){return S.add(_),()=>S.delete(_)}function at(_,L={}){_.matches&&(_.matches=_.matches.map(G=>{let me=f[G.route.id],xe=G.route;return xe.element!==me.element||xe.errorElement!==me.errorElement||xe.hydrateFallbackElement!==me.hydrateFallbackElement?{...G,route:me}:G})),O={...O,..._};let D=[],V=[];O.fetchers.forEach((G,me)=>{G.state==="idle"&&(Ee.has(me)?D.push(me):V.push(me))}),Ee.forEach(G=>{!O.fetchers.has(G)&&!z.has(G)&&D.push(G)}),[...S].forEach(G=>G(O,{deletedFetchers:D,newErrors:_.errors??null,viewTransitionOpts:L.viewTransitionOpts,flushSync:L.flushSync===!0})),D.forEach(G=>Mi(G)),V.forEach(G=>O.fetchers.delete(G))}function nn(_,L,{flushSync:D}={}){var Te,ve;let V=O.actionData!=null&&O.navigation.formMethod!=null&&St(O.navigation.formMethod)&&O.navigation.state==="loading"&&((Te=_.state)==null?void 0:Te._isRedirect)!==!0,G;L.actionData?Object.keys(L.actionData).length>0?G=L.actionData:G=null:V?G=O.actionData:G=null;let me=L.loaderData?Eh(O.loaderData,L.loaderData,L.matches||[],L.errors):O.loaderData,xe=O.blockers;xe.size>0&&(xe=new Map(xe),xe.forEach((Me,Ae)=>xe.set(Ae,mi)));let ie=Ne?!1:bi(_,L.matches||O.matches),se=pe===!0||O.navigation.formMethod!=null&&St(O.navigation.formMethod)&&((ve=_.state)==null?void 0:ve._isRedirect)!==!0;p&&(h=p,p=void 0),Ne||ee==="POP"||(ee==="PUSH"?n.history.push(_,_.state):ee==="REPLACE"&&n.history.replace(_,_.state));let ce;if(ee==="POP"){let Me=J.get(O.location.pathname);Me&&Me.has(_.pathname)?ce={currentLocation:O.location,nextLocation:_}:J.has(_.pathname)&&(ce={currentLocation:_,nextLocation:O.location})}else if(Z){let Me=J.get(O.location.pathname);Me?Me.add(_.pathname):(Me=new Set([_.pathname]),J.set(O.location.pathname,Me)),ce={currentLocation:O.location,nextLocation:_}}at({...L,actionData:G,loaderData:me,historyAction:ee,location:_,initialized:!0,navigation:gu,revalidation:"idle",restoreScrollPosition:ie,preventScrollReset:se,blockers:xe},{viewTransitionOpts:ce,flushSync:D===!0}),ee="POP",pe=!1,Z=!1,Ne=!1,ue=!1,ae==null||ae.resolve(),ae=null,be==null||be.resolve(),be=null}async function Vr(_,L){if(ae==null||ae.resolve(),ae=null,typeof _=="number"){ae||(ae=Rh());let Ae=ae.promise;return n.history.go(_),Ae}let D=Iu(O.location,O.matches,m,_,L==null?void 0:L.fromRouteId,L==null?void 0:L.relative),{path:V,submission:G,error:me}=hh(!1,D,L),xe=O.location,ie=Io(O.location,V,L&&L.state);ie={...ie,...n.history.encodeLocation(ie)};let se=L&&L.replace!=null?L.replace:void 0,ce="PUSH";se===!0?ce="REPLACE":se===!1||G!=null&&St(G.formMethod)&&G.formAction===O.location.pathname+O.location.search&&(ce="REPLACE");let Te=L&&"preventScrollReset"in L?L.preventScrollReset===!0:void 0,ve=(L&&L.flushSync)===!0,Me=xn({currentLocation:xe,nextLocation:ie,historyAction:ce});if(Me){zn(Me,{state:"blocked",location:ie,proceed(){zn(Me,{state:"proceeding",proceed:void 0,reset:void 0,location:ie}),Vr(_,L)},reset(){let Ae=new Map(O.blockers);Ae.set(Me,mi),at({blockers:Ae})}});return}await cn(ce,ie,{submission:G,pendingError:me,preventScrollReset:Te,replace:L&&L.replace,enableViewTransition:L&&L.viewTransition,flushSync:ve,callSiteDefaultShouldRevalidate:L&&L.unstable_defaultShouldRevalidate})}function Wo(){be||(be=Rh()),mr(),at({revalidation:"loading"});let _=be.promise;return O.navigation.state==="submitting"?_:O.navigation.state==="idle"?(cn(O.historyAction,O.location,{startUninterruptedRevalidation:!0}),_):(cn(ee||O.historyAction,O.navigation.location,{overrideNavigation:O.navigation,enableViewTransition:Z===!0}),_)}async function cn(_,L,D){X&&X.abort(),X=null,ee=_,Ne=(D&&D.startUninterruptedRevalidation)===!0,qo(O.location,O.matches),pe=(D&&D.preventScrollReset)===!0,Z=(D&&D.enableViewTransition)===!0;let V=p||h,G=D&&D.overrideNavigation,me=D!=null&&D.initialHydration&&O.matches&&O.matches.length>0&&!j?O.matches:cr(V,L,m),xe=(D&&D.flushSync)===!0;if(me&&O.initialized&&!ue&&l0(O.location,L)&&!(D&&D.submission&&St(D.submission.formMethod))){nn(L,{matches:me},{flushSync:xe});return}let ie=yr(me,V,L.pathname);if(ie.active&&ie.matches&&(me=ie.matches),!me){let{error:nt,notFoundMatches:ut,route:Ve}=dn(L.pathname);nn(L,{matches:ut,loaderData:{},errors:{[Ve.id]:nt}},{flushSync:xe});return}X=new AbortController;let se=gi(n.history,L,X.signal,D&&D.submission),ce=n.getContext?await n.getContext():new sh,Te;if(D&&D.pendingError)Te=[fr(me).route.id,{type:"error",error:D.pendingError}];else if(D&&D.submission&&St(D.submission.formMethod)){let nt=await Ti(se,L,D.submission,me,ce,ie.active,D&&D.initialHydration===!0,{replace:D.replace,flushSync:xe});if(nt.shortCircuited)return;if(nt.pendingActionResult){let[ut,Ve]=nt.pendingActionResult;if(Ut(Ve)&&_i(Ve.error)&&Ve.error.status===404){X=null,nn(L,{matches:nt.matches,loaderData:{},errors:{[ut]:Ve.error}});return}}me=nt.matches||me,Te=nt.pendingActionResult,G=yu(L,D.submission),xe=!1,ie.active=!1,se=gi(n.history,se.url,se.signal)}let{shortCircuited:ve,matches:Me,loaderData:Ae,errors:it}=await Ko(se,L,me,ce,ie.active,G,D&&D.submission,D&&D.fetcherSubmission,D&&D.replace,D&&D.initialHydration===!0,xe,Te,D&&D.callSiteDefaultShouldRevalidate);ve||(X=null,nn(L,{matches:Me||me,..._h(Te),loaderData:Ae,errors:it}))}async function Ti(_,L,D,V,G,me,xe,ie={}){mr();let se=g0(L,D);if(at({navigation:se},{flushSync:ie.flushSync===!0}),me){let ve=await $n(V,L.pathname,_.signal);if(ve.type==="aborted")return{shortCircuited:!0};if(ve.type==="error"){if(ve.partialMatches.length===0){let{matches:Ae,route:it}=es(h);return{matches:Ae,pendingActionResult:[it.id,{type:"error",error:ve.error}]}}let Me=fr(ve.partialMatches).route.id;return{matches:ve.partialMatches,pendingActionResult:[Me,{type:"error",error:ve.error}]}}else if(ve.matches)V=ve.matches;else{let{notFoundMatches:Me,error:Ae,route:it}=dn(L.pathname);return{matches:Me,pendingActionResult:[it.id,{type:"error",error:Ae}]}}}let ce,Te=ls(V,L);if(!Te.route.action&&!Te.route.lazy)ce={type:"error",error:en(405,{method:_.method,pathname:L.pathname,routeId:Te.route.id})};else{let ve=wi(u,f,_,V,Te,xe?[]:a,G),Me=await Fn(_,ve,G,null);if(ce=Me[Te.route.id],!ce){for(let Ae of V)if(Me[Ae.route.id]){ce=Me[Ae.route.id];break}}if(_.signal.aborted)return{shortCircuited:!0}}if(br(ce)){let ve;return ie&&ie.replace!=null?ve=ie.replace:ve=wh(ce.response.headers.get("Location"),new URL(_.url),m,n.history)===O.location.pathname+O.location.search,await fn(_,ce,!0,{submission:D,replace:ve}),{shortCircuited:!0}}if(Ut(ce)){let ve=fr(V,Te.route.id);return(ie&&ie.replace)!==!0&&(ee="PUSH"),{matches:V,pendingActionResult:[ve.route.id,ce,Te.route.id]}}return{matches:V,pendingActionResult:[Te.route.id,ce]}}async function Ko(_,L,D,V,G,me,xe,ie,se,ce,Te,ve,Me){let Ae=me||yu(L,xe),it=xe||ie||Ch(Ae),nt=!Ne&&!ce;if(G){if(nt){let He=Ur(ve);at({navigation:Ae,...He!==void 0?{actionData:He}:{}},{flushSync:Te})}let Fe=await $n(D,L.pathname,_.signal);if(Fe.type==="aborted")return{shortCircuited:!0};if(Fe.type==="error"){if(Fe.partialMatches.length===0){let{matches:Un,route:_n}=es(h);return{matches:Un,loaderData:{},errors:{[_n.id]:Fe.error}}}let He=fr(Fe.partialMatches).route.id;return{matches:Fe.partialMatches,loaderData:{},errors:{[He]:Fe.error}}}else if(Fe.matches)D=Fe.matches;else{let{error:He,notFoundMatches:Un,route:_n}=dn(L.pathname);return{matches:Un,loaderData:{},errors:{[_n.id]:He}}}}let ut=p||h,{dsMatches:Ve,revalidatingFetchers:Rt}=ph(_,V,u,f,n.history,O,D,it,L,ce?[]:a,ce===!0,ue,ye,Ee,Se,A,ut,m,n.patchRoutesOnNavigation!=null,ve,Me);if(Q=++te,!n.dataStrategy&&!Ve.some(Fe=>Fe.shouldLoad)&&!Ve.some(Fe=>Fe.route.middleware&&Fe.route.middleware.length>0)&&Rt.length===0){let Fe=Br();return nn(L,{matches:D,loaderData:{},errors:ve&&Ut(ve[1])?{[ve[0]]:ve[1].error}:null,..._h(ve),...Fe?{fetchers:new Map(O.fetchers)}:{}},{flushSync:Te}),{shortCircuited:!0}}if(nt){let Fe={};if(!G){Fe.navigation=Ae;let He=Ur(ve);He!==void 0&&(Fe.actionData=He)}Rt.length>0&&(Fe.fetchers=pr(Rt)),at(Fe,{flushSync:Te})}Rt.forEach(Fe=>{Wt(Fe.key),Fe.controller&&z.set(Fe.key,Fe.controller)});let Ue=()=>Rt.forEach(Fe=>Wt(Fe.key));X&&X.signal.addEventListener("abort",Ue);let{loaderResults:wr,fetcherResults:Kt}=await Oi(Ve,Rt,_,V);if(_.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",Ue),Rt.forEach(Fe=>z.delete(Fe.key));let At=ts(wr);if(At)return await fn(_,At.result,!0,{replace:se}),{shortCircuited:!0};if(At=ts(Kt),At)return A.add(At.key),await fn(_,At.result,!0,{replace:se}),{shortCircuited:!0};let{loaderData:Vn,errors:Sr}=xh(O,D,wr,ve,Rt,Kt);ce&&O.errors&&(Sr={...O.errors,...Sr});let hn=Br(),En=Hr(Q),Et=hn||En||Rt.length>0;return{matches:D,loaderData:Vn,errors:Sr,...Et?{fetchers:new Map(O.fetchers)}:{}}}function Ur(_){if(_&&!Ut(_[1]))return{[_[0]]:_[1].data};if(O.actionData)return Object.keys(O.actionData).length===0?null:O.actionData}function pr(_){return _.forEach(L=>{let D=O.fetchers.get(L.key),V=vo(void 0,D?D.data:void 0);O.fetchers.set(L.key,V)}),new Map(O.fetchers)}async function An(_,L,D,V){Wt(_);let G=(V&&V.flushSync)===!0,me=p||h,xe=Iu(O.location,O.matches,m,D,L,V==null?void 0:V.relative),ie=cr(me,xe,m),se=yr(ie,me,xe);if(se.active&&se.matches&&(ie=se.matches),!ie){Ht(_,L,en(404,{pathname:xe}),{flushSync:G});return}let{path:ce,submission:Te,error:ve}=hh(!0,xe,V);if(ve){Ht(_,L,ve,{flushSync:G});return}let Me=n.getContext?await n.getContext():new sh,Ae=(V&&V.preventScrollReset)===!0;if(Te&&St(Te.formMethod)){await Ni(_,L,ce,ie,Me,se.active,G,Ae,Te,V&&V.unstable_defaultShouldRevalidate);return}Se.set(_,{routeId:L,path:ce}),await Yo(_,L,ce,ie,Me,se.active,G,Ae,Te)}async function Ni(_,L,D,V,G,me,xe,ie,se,ce){mr(),Se.delete(_);let Te=O.fetchers.get(_);Ct(_,y0(se,Te),{flushSync:xe});let ve=new AbortController,Me=gi(n.history,D,ve.signal,se);if(me){let Ge=await $n(V,new URL(Me.url).pathname,Me.signal,_);if(Ge.type==="aborted")return;if(Ge.type==="error"){Ht(_,L,Ge.error,{flushSync:xe});return}else if(Ge.matches)V=Ge.matches;else{Ht(_,L,en(404,{pathname:D}),{flushSync:xe});return}}let Ae=ls(V,D);if(!Ae.route.action&&!Ae.route.lazy){let Ge=en(405,{method:se.formMethod,pathname:D,routeId:L});Ht(_,L,Ge,{flushSync:xe});return}z.set(_,ve);let it=te,nt=wi(u,f,Me,V,Ae,a,G),ut=await Fn(Me,nt,G,_),Ve=ut[Ae.route.id];if(!Ve){for(let Ge of nt)if(ut[Ge.route.id]){Ve=ut[Ge.route.id];break}}if(Me.signal.aborted){z.get(_)===ve&&z.delete(_);return}if(Ee.has(_)){if(br(Ve)||Ut(Ve)){Ct(_,In(void 0));return}}else{if(br(Ve))if(z.delete(_),Q>it){Ct(_,In(void 0));return}else return A.add(_),Ct(_,vo(se)),fn(Me,Ve,!1,{fetcherSubmission:se,preventScrollReset:ie});if(Ut(Ve)){Ht(_,L,Ve.error);return}}let Rt=O.navigation.location||O.location,Ue=gi(n.history,Rt,ve.signal),wr=p||h,Kt=O.navigation.state!=="idle"?cr(wr,O.navigation.location,m):O.matches;De(Kt,"Didn't find any matches after fetcher action");let At=++te;R.set(_,At);let Vn=vo(se,Ve.data);O.fetchers.set(_,Vn);let{dsMatches:Sr,revalidatingFetchers:hn}=ph(Ue,G,u,f,n.history,O,Kt,se,Rt,a,!1,ue,ye,Ee,Se,A,wr,m,n.patchRoutesOnNavigation!=null,[Ae.route.id,Ve],ce);hn.filter(Ge=>Ge.key!==_).forEach(Ge=>{let kn=Ge.key,xr=O.fetchers.get(kn),Er=vo(void 0,xr?xr.data:void 0);O.fetchers.set(kn,Er),Wt(kn),Ge.controller&&z.set(kn,Ge.controller)}),at({fetchers:new Map(O.fetchers)});let En=()=>hn.forEach(Ge=>Wt(Ge.key));ve.signal.addEventListener("abort",En);let{loaderResults:Et,fetcherResults:Fe}=await Oi(Sr,hn,Ue,G);if(ve.signal.aborted)return;if(ve.signal.removeEventListener("abort",En),R.delete(_),z.delete(_),hn.forEach(Ge=>z.delete(Ge.key)),O.fetchers.has(_)){let Ge=In(Ve.data);O.fetchers.set(_,Ge)}let He=ts(Et);if(He)return fn(Ue,He.result,!1,{preventScrollReset:ie});if(He=ts(Fe),He)return A.add(He.key),fn(Ue,He.result,!1,{preventScrollReset:ie});let{loaderData:Un,errors:_n}=xh(O,Kt,Et,void 0,hn,Fe);Hr(At),O.navigation.state==="loading"&&At>Q?(De(ee,"Expected pending action"),X&&X.abort(),nn(O.navigation.location,{matches:Kt,loaderData:Un,errors:_n,fetchers:new Map(O.fetchers)})):(at({errors:_n,loaderData:Eh(O.loaderData,Un,Kt,_n),fetchers:new Map(O.fetchers)}),ue=!1)}async function Yo(_,L,D,V,G,me,xe,ie,se){let ce=O.fetchers.get(_);Ct(_,vo(se,ce?ce.data:void 0),{flushSync:xe});let Te=new AbortController,ve=gi(n.history,D,Te.signal);if(me){let Ve=await $n(V,new URL(ve.url).pathname,ve.signal,_);if(Ve.type==="aborted")return;if(Ve.type==="error"){Ht(_,L,Ve.error,{flushSync:xe});return}else if(Ve.matches)V=Ve.matches;else{Ht(_,L,en(404,{pathname:D}),{flushSync:xe});return}}let Me=ls(V,D);z.set(_,Te);let Ae=te,it=wi(u,f,ve,V,Me,a,G),ut=(await Fn(ve,it,G,_))[Me.route.id];if(z.get(_)===Te&&z.delete(_),!ve.signal.aborted){if(Ee.has(_)){Ct(_,In(void 0));return}if(br(ut))if(Q>Ae){Ct(_,In(void 0));return}else{A.add(_),await fn(ve,ut,!1,{preventScrollReset:ie});return}if(Ut(ut)){Ht(_,L,ut.error);return}Ct(_,In(ut.data))}}async function fn(_,L,D,{submission:V,fetcherSubmission:G,preventScrollReset:me,replace:xe}={}){D||(ae==null||ae.resolve(),ae=null),L.response.headers.has("X-Remix-Revalidate")&&(ue=!0);let ie=L.response.headers.get("Location");De(ie,"Expected a Location header on the redirect Response"),ie=wh(ie,new URL(_.url),m,n.history);let se=Io(O.location,ie,{_isRedirect:!0});if(i){let it=!1;if(L.response.headers.has("X-Remix-Reload-Document"))it=!0;else if(oc(ie)){const nt=Lp(ie,!0);it=nt.origin!==r.location.origin||It(nt.pathname,m)==null}if(it){xe?r.location.replace(ie):r.location.assign(ie);return}}X=null;let ce=xe===!0||L.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Te,formAction:ve,formEncType:Me}=O.navigation;!V&&!G&&Te&&ve&&Me&&(V=Ch(O.navigation));let Ae=V||G;if(Kv.has(L.response.status)&&Ae&&St(Ae.formMethod))await cn(ce,se,{submission:{...Ae,formAction:ie},preventScrollReset:me||pe,enableViewTransition:D?Z:void 0});else{let it=yu(se,V);await cn(ce,se,{overrideNavigation:it,fetcherSubmission:G,preventScrollReset:me||pe,enableViewTransition:D?Z:void 0})}}async function Fn(_,L,D,V){var xe;let G,me={};try{G=await n0(v,_,L,V,D,!1)}catch(ie){return L.filter(se=>se.shouldLoad).forEach(se=>{me[se.route.id]={type:"error",error:ie}}),me}if(_.signal.aborted)return me;if(!St(_.method))for(let ie of L){if(((xe=G[ie.route.id])==null?void 0:xe.type)==="error")break;!G.hasOwnProperty(ie.route.id)&&!O.loaderData.hasOwnProperty(ie.route.id)&&(!O.errors||!O.errors.hasOwnProperty(ie.route.id))&&ie.shouldCallHandler()&&(G[ie.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ie.route.id}`)})}for(let[ie,se]of Object.entries(G))if(d0(se)){let ce=se.result;me[ie]={type:"redirect",response:a0(ce,_,ie,L,m)}}else me[ie]=await o0(se);return me}async function Oi(_,L,D,V){let G=Fn(D,_,V,null),me=Promise.all(L.map(async se=>{if(se.matches&&se.match&&se.request&&se.controller){let Te=(await Fn(se.request,se.matches,V,se.key))[se.match.route.id];return{[se.key]:Te}}else return Promise.resolve({[se.key]:{type:"error",error:en(404,{pathname:se.path})}})})),xe=await G,ie=(await me).reduce((se,ce)=>Object.assign(se,ce),{});return{loaderResults:xe,fetcherResults:ie}}function mr(){ue=!0,Se.forEach((_,L)=>{z.has(L)&&ye.add(L),Wt(L)})}function Ct(_,L,D={}){O.fetchers.set(_,L),at({fetchers:new Map(O.fetchers)},{flushSync:(D&&D.flushSync)===!0})}function Ht(_,L,D,V={}){let G=fr(O.matches,L);Mi(_),at({errors:{[G.route.id]:D},fetchers:new Map(O.fetchers)},{flushSync:(V&&V.flushSync)===!0})}function jn(_){return _e.set(_,(_e.get(_)||0)+1),Ee.has(_)&&Ee.delete(_),O.fetchers.get(_)||Yv}function gr(_,L){Wt(_,L==null?void 0:L.reason),Ct(_,In(null))}function Mi(_){let L=O.fetchers.get(_);z.has(_)&&!(L&&L.state==="loading"&&R.has(_))&&Wt(_),Se.delete(_),R.delete(_),A.delete(_),Ee.delete(_),ye.delete(_),O.fetchers.delete(_)}function Qo(_){let L=(_e.get(_)||0)-1;L<=0?(_e.delete(_),Ee.add(_)):_e.set(_,L),at({fetchers:new Map(O.fetchers)})}function Wt(_,L){let D=z.get(_);D&&(D.abort(L),z.delete(_))}function Go(_){for(let L of _){let D=jn(L),V=In(D.data);O.fetchers.set(L,V)}}function Br(){let _=[],L=!1;for(let D of A){let V=O.fetchers.get(D);De(V,`Expected fetcher: ${D}`),V.state==="loading"&&(A.delete(D),_.push(D),L=!0)}return Go(_),L}function Hr(_){let L=[];for(let[D,V]of R)if(V<_){let G=O.fetchers.get(D);De(G,`Expected fetcher: ${D}`),G.state==="loading"&&(Wt(D),R.delete(D),L.push(D))}return Go(L),L.length>0}function Di(_,L){let D=O.blockers.get(_)||mi;return Oe.get(_)!==L&&Oe.set(_,L),D}function Wr(_){O.blockers.delete(_),Oe.delete(_)}function zn(_,L){let D=O.blockers.get(_)||mi;De(D.state==="unblocked"&&L.state==="blocked"||D.state==="blocked"&&L.state==="blocked"||D.state==="blocked"&&L.state==="proceeding"||D.state==="blocked"&&L.state==="unblocked"||D.state==="proceeding"&&L.state==="unblocked",`Invalid blocker state transition: ${D.state} -> ${L.state}`);let V=new Map(O.blockers);V.set(_,L),at({blockers:V})}function xn({currentLocation:_,nextLocation:L,historyAction:D}){if(Oe.size===0)return;Oe.size>1&&tt(!1,"A router only supports one blocker at a time");let V=Array.from(Oe.entries()),[G,me]=V[V.length-1],xe=O.blockers.get(G);if(!(xe&&xe.state==="proceeding")&&me({currentLocation:_,nextLocation:L,historyAction:D}))return G}function dn(_){let L=en(404,{pathname:_}),D=p||h,{matches:V,route:G}=es(D);return{notFoundMatches:V,route:G,error:L}}function Xo(_,L,D){if(k=_,b=L,N=D||null,!B&&O.navigation===gu){B=!0;let V=bi(O.location,O.matches);V!=null&&at({restoreScrollPosition:V})}return()=>{k=null,b=null,N=null}}function Ii(_,L){return N&&N(_,L.map(V=>wv(V,O.loaderData)))||_.key}function qo(_,L){if(k&&b){let D=Ii(_,L);k[D]=b()}}function bi(_,L){if(k){let D=Ii(_,L),V=k[D];if(typeof V=="number")return V}return null}function yr(_,L,D){if(n.patchRoutesOnNavigation)if(_){if(Object.keys(_[0].params).length>0)return{active:!0,matches:_o(L,D,m,!0)}}else return{active:!0,matches:_o(L,D,m,!0)||[]};return{active:!1,matches:null}}async function $n(_,L,D,V){if(!n.patchRoutesOnNavigation)return{type:"success",matches:_};let G=_;for(;;){let me=p==null,xe=p||h,ie=f;try{await n.patchRoutesOnNavigation({signal:D,path:L,matches:G,fetcherKey:V,patch:(Te,ve)=>{D.aborted||mh(Te,ve,xe,ie,u,!1)}})}catch(Te){return{type:"error",error:Te,partialMatches:G}}finally{me&&!D.aborted&&(h=[...h])}if(D.aborted)return{type:"aborted"};let se=cr(xe,L,m),ce=null;if(se){if(Object.keys(se[0].params).length===0)return{type:"success",matches:se};if(ce=_o(xe,L,m,!0),!(ce&&G.lengthD.route.id===L[V].route.id)}function vr(_){f={},p=bo(_,u,void 0,f)}function Fi(_,L,D=!1){let V=p==null;mh(_,L,p||h,f,u,D),V&&(h=[...h],at({}))}return we={get basename(){return m},get future(){return y},get state(){return O},get routes(){return h},get window(){return r},initialize:We,subscribe:$r,enableScrollRestoration:Xo,navigate:Vr,fetch:An,revalidate:Wo,createHref:_=>n.history.createHref(_),encodeLocation:_=>n.history.encodeLocation(_),getFetcher:jn,resetFetcher:gr,deleteFetcher:Qo,dispose:xt,getBlocker:Di,deleteBlocker:Wr,patchRoutes:Fi,_internalFetchControllers:z,_internalSetRoutes:vr,_internalSetStateDoNotUseOrYouWillBreakYourApp(_){at(_)}},n.unstable_instrumentations&&(we=jv(we,n.unstable_instrumentations.map(_=>_.router).filter(Boolean))),we}function Xv(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function Iu(n,r,i,a,l,u){let f,h;if(l){f=[];for(let m of r)if(f.push(m),m.route.id===l){h=m;break}}else f=r,h=r[r.length-1];let p=Es(a||".",xs(f),It(n.pathname,i)||n.pathname,u==="path");if(a==null&&(p.search=n.search,p.hash=n.hash),(a==null||a===""||a===".")&&h){let m=lc(p.search);if(h.route.index&&!m)p.search=p.search?p.search.replace(/^\?/,"?index&"):"?index";else if(!h.route.index&&m){let v=new URLSearchParams(p.search),y=v.getAll("index");v.delete("index"),y.filter(S=>S).forEach(S=>v.append("index",S));let w=v.toString();p.search=w?`?${w}`:""}}return i!=="/"&&(p.pathname=Mv({basename:i,pathname:p.pathname})),Sn(p)}function hh(n,r,i){if(!i||!Xv(i))return{path:r};if(i.formMethod&&!m0(i.formMethod))return{path:r,error:en(405,{method:i.formMethod})};let a=()=>({path:r,error:en(400,{type:"invalid-body"})}),u=(i.formMethod||"get").toUpperCase(),f=Wp(r);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!St(u))return a();let y=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((w,[S,k])=>`${w}${S}=${k} `,""):String(i.body);return{path:r,submission:{formMethod:u,formAction:f,formEncType:i.formEncType,formData:void 0,json:void 0,text:y}}}else if(i.formEncType==="application/json"){if(!St(u))return a();try{let y=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:r,submission:{formMethod:u,formAction:f,formEncType:i.formEncType,formData:void 0,json:y,text:void 0}}}catch{return a()}}}De(typeof FormData=="function","FormData is not available in this environment");let h,p;if(i.formData)h=Fu(i.formData),p=i.formData;else if(i.body instanceof FormData)h=Fu(i.body),p=i.body;else if(i.body instanceof URLSearchParams)h=i.body,p=Sh(h);else if(i.body==null)h=new URLSearchParams,p=new FormData;else try{h=new URLSearchParams(i.body),p=Sh(h)}catch{return a()}let m={formMethod:u,formAction:f,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:p,json:void 0,text:void 0};if(St(m.formMethod))return{path:r,submission:m};let v=hr(r);return n&&v.search&&lc(v.search)&&h.append("index",""),v.search=`?${h}`,{path:Sn(v),submission:m}}function ph(n,r,i,a,l,u,f,h,p,m,v,y,w,S,k,N,b,B,F,j,W){var Ne;let q=j?Ut(j[1])?j[1].error:j[1].data:void 0,we=l.createURL(u.location),O=l.createURL(p),ee;if(v&&u.errors){let ue=Object.keys(u.errors)[0];ee=f.findIndex(ye=>ye.route.id===ue)}else if(j&&Ut(j[1])){let ue=j[0];ee=f.findIndex(ye=>ye.route.id===ue)-1}let ae=j?j[1].statusCode:void 0,pe=ae&&ae>=400,X={currentUrl:we,currentParams:((Ne=u.matches[0])==null?void 0:Ne.params)||{},nextUrl:O,nextParams:f[0].params,...h,actionResult:q,actionStatus:ae},Z=$o(f),J=f.map((ue,ye)=>{let{route:z}=ue,te=null;if(ee!=null&&ye>ee?te=!1:z.lazy?te=!0:ac(z)?v?te=bu(z,u.loaderData,u.errors):qv(u.loaderData,u.matches[ye],ue)&&(te=!0):te=!1,te!==null)return Au(i,a,n,Z,ue,m,r,te);let Q=!1;typeof W=="boolean"?Q=W:pe?Q=!1:(y||we.pathname+we.search===O.pathname+O.search||we.search!==O.search||Jv(u.matches[ye],ue))&&(Q=!0);let R={...X,defaultShouldRevalidate:Q},A=Lo(ue,R);return Au(i,a,n,Z,ue,m,r,A,R,W)}),re=[];return k.forEach((ue,ye)=>{if(v||!f.some(Ee=>Ee.route.id===ue.routeId)||S.has(ye))return;let z=u.fetchers.get(ye),te=z&&z.state!=="idle"&&z.data===void 0,Q=cr(b,ue.path,B);if(!Q){if(F&&te)return;re.push({key:ye,routeId:ue.routeId,path:ue.path,matches:null,match:null,request:null,controller:null});return}if(N.has(ye))return;let R=ls(Q,ue.path),A=new AbortController,Se=gi(l,ue.path,A.signal),_e=null;if(w.has(ye))w.delete(ye),_e=wi(i,a,Se,Q,R,m,r);else if(te)y&&(_e=wi(i,a,Se,Q,R,m,r));else{let Ee;typeof W=="boolean"?Ee=W:pe?Ee=!1:Ee=y;let Oe={...X,defaultShouldRevalidate:Ee};Lo(R,Oe)&&(_e=wi(i,a,Se,Q,R,m,r,Oe))}_e&&re.push({key:ye,routeId:ue.routeId,path:ue.path,matches:_e,match:R,request:Se,controller:A})}),{dsMatches:J,revalidatingFetchers:re}}function ac(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function bu(n,r,i){if(n.lazy)return!0;if(!ac(n))return!1;let a=r!=null&&n.id in r,l=i!=null&&i[n.id]!==void 0;return!a&&l?!1:typeof n.loader=="function"&&n.loader.hydrate===!0?!0:!a&&!l}function qv(n,r,i){let a=!r||i.route.id!==r.route.id,l=!n.hasOwnProperty(i.route.id);return a||l}function Jv(n,r){let i=n.route.path;return n.pathname!==r.pathname||i!=null&&i.endsWith("*")&&n.params["*"]!==r.params["*"]}function Lo(n,r){if(n.route.shouldRevalidate){let i=n.route.shouldRevalidate(r);if(typeof i=="boolean")return i}return r.defaultShouldRevalidate}function mh(n,r,i,a,l,u){let f;if(n){let m=a[n];De(m,`No route found to patch children into: routeId = ${n}`),m.children||(m.children=[]),f=m.children}else f=i;let h=[],p=[];if(r.forEach(m=>{let v=f.find(y=>$p(m,y));v?p.push({existingRoute:v,newRoute:m}):h.push(m)}),h.length>0){let m=bo(h,l,[n||"_","patch",String((f==null?void 0:f.length)||"0")],a);f.push(...m)}if(u&&p.length>0)for(let m=0;m{var l;return(l=r.children)==null?void 0:l.some(u=>$p(i,u))}):!1}var gh=new WeakMap,Vp=({key:n,route:r,manifest:i,mapRouteProperties:a})=>{let l=i[r.id];if(De(l,"No route found in manifest"),!l.lazy||typeof l.lazy!="object")return;let u=l.lazy[n];if(!u)return;let f=gh.get(l);f||(f={},gh.set(l,f));let h=f[n];if(h)return h;let p=(async()=>{let m=mv(n),y=l[n]!==void 0&&n!=="hasErrorBoundary";if(m)tt(!m,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),f[n]=Promise.resolve();else if(y)tt(!1,`Route "${l.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let w=await u();w!=null&&(Object.assign(l,{[n]:w}),Object.assign(l,a(l)))}typeof l.lazy=="object"&&(l.lazy[n]=void 0,Object.values(l.lazy).every(w=>w===void 0)&&(l.lazy=void 0))})();return f[n]=p,p},yh=new WeakMap;function Zv(n,r,i,a,l){let u=i[n.id];if(De(u,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let v=yh.get(u);if(v)return{lazyRoutePromise:v,lazyHandlerPromise:v};let y=(async()=>{De(typeof n.lazy=="function","No lazy route function found");let w=await n.lazy(),S={};for(let k in w){let N=w[k];if(N===void 0)continue;let b=yv(k),F=u[k]!==void 0&&k!=="hasErrorBoundary";b?tt(!b,"Route property "+k+" is not a supported property to be returned from a lazy route function. This property will be ignored."):F?tt(!F,`Route "${u.id}" has a static property "${k}" defined but its lazy function is also returning a value for this property. The lazy route property "${k}" will be ignored.`):S[k]=N}Object.assign(u,S),Object.assign(u,{...a(u),lazy:void 0})})();return yh.set(u,y),y.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:y}}let f=Object.keys(n.lazy),h=[],p;for(let v of f){if(l&&l.includes(v))continue;let y=Vp({key:v,route:n,manifest:i,mapRouteProperties:a});y&&(h.push(y),v===r&&(p=y))}let m=h.length>0?Promise.all(h).then(()=>{}):void 0;return m==null||m.catch(()=>{}),p==null||p.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:p}}async function vh(n){let r=n.matches.filter(l=>l.shouldLoad),i={};return(await Promise.all(r.map(l=>l.resolve()))).forEach((l,u)=>{i[r[u].route.id]=l}),i}async function e0(n){return n.matches.some(r=>r.route.middleware)?Up(n,()=>vh(n)):vh(n)}function Up(n,r){return t0(n,r,a=>{if(p0(a))throw a;return a},c0,i);function i(a,l,u){if(u)return Promise.resolve(Object.assign(u.value,{[l]:{type:"error",result:a}}));{let{matches:f}=n,h=Math.min(Math.max(f.findIndex(m=>m.route.id===l),0),Math.max(f.findIndex(m=>m.shouldCallHandler()),0)),p=fr(f,f[h].route.id).route.id;return Promise.resolve({[p]:{type:"error",result:a}})}}}async function t0(n,r,i,a,l){let{matches:u,request:f,params:h,context:p,unstable_pattern:m}=n,v=u.flatMap(w=>w.route.middleware?w.route.middleware.map(S=>[w.route.id,S]):[]);return await Bp({request:f,params:h,context:p,unstable_pattern:m},v,r,i,a,l)}async function Bp(n,r,i,a,l,u,f=0){let{request:h}=n;if(h.signal.aborted)throw h.signal.reason??new Error(`Request aborted: ${h.method} ${h.url}`);let p=r[f];if(!p)return await i();let[m,v]=p,y,w=async()=>{if(y)throw new Error("You may only call `next()` once per middleware");try{return y={value:await Bp(n,r,i,a,l,u,f+1)},y.value}catch(S){return y={value:await u(S,m,y)},y.value}};try{let S=await v(n,w),k=S!=null?a(S):void 0;return l(k)?k:y?k??y.value:(y={value:await w()},y.value)}catch(S){return await u(S,m,y)}}function Hp(n,r,i,a,l){let u=Vp({key:"middleware",route:a.route,manifest:r,mapRouteProperties:n}),f=Zv(a.route,St(i.method)?"action":"loader",r,n,l);return{middleware:u,route:f.lazyRoutePromise,handler:f.lazyHandlerPromise}}function Au(n,r,i,a,l,u,f,h,p=null,m){let v=!1,y=Hp(n,r,i,l,u);return{...l,_lazyPromises:y,shouldLoad:h,shouldRevalidateArgs:p,shouldCallHandler(w){return v=!0,p?typeof m=="boolean"?Lo(l,{...p,defaultShouldRevalidate:m}):typeof w=="boolean"?Lo(l,{...p,defaultShouldRevalidate:w}):Lo(l,p):h},resolve(w){let{lazy:S,loader:k,middleware:N}=l.route,b=v||h||w&&!St(i.method)&&(S||k),B=N&&N.length>0&&!k&&!S;return b&&(St(i.method)||!B)?r0({request:i,unstable_pattern:a,match:l,lazyHandlerPromise:y==null?void 0:y.handler,lazyRoutePromise:y==null?void 0:y.route,handlerOverride:w,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function wi(n,r,i,a,l,u,f,h=null){return a.map(p=>p.route.id!==l.route.id?{...p,shouldLoad:!1,shouldRevalidateArgs:h,shouldCallHandler:()=>!1,_lazyPromises:Hp(n,r,i,p,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Au(n,r,i,$o(a),p,u,f,!0,h))}async function n0(n,r,i,a,l,u){i.some(m=>{var v;return(v=m._lazyPromises)==null?void 0:v.middleware})&&await Promise.all(i.map(m=>{var v;return(v=m._lazyPromises)==null?void 0:v.middleware}));let f={request:r,unstable_pattern:$o(i),params:i[0].params,context:l,matches:i},p=await n({...f,fetcherKey:a,runClientMiddleware:m=>{let v=f;return Up(v,()=>m({...v,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(i.flatMap(m=>{var v,y;return[(v=m._lazyPromises)==null?void 0:v.handler,(y=m._lazyPromises)==null?void 0:y.route]}))}catch{}return p}async function r0({request:n,unstable_pattern:r,match:i,lazyHandlerPromise:a,lazyRoutePromise:l,handlerOverride:u,scopedContext:f}){let h,p,m=St(n.method),v=m?"action":"loader",y=w=>{let S,k=new Promise((B,F)=>S=F);p=()=>S(),n.signal.addEventListener("abort",p);let N=B=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${i.route.id}]`)):w({request:n,unstable_pattern:r,params:i.params,context:f},...B!==void 0?[B]:[]),b=(async()=>{try{return{type:"data",result:await(u?u(F=>N(F)):N())}}catch(B){return{type:"error",result:B}}})();return Promise.race([b,k])};try{let w=m?i.route.action:i.route.loader;if(a||l)if(w){let S,[k]=await Promise.all([y(w).catch(N=>{S=N}),a,l]);if(S!==void 0)throw S;h=k}else{await a;let S=m?i.route.action:i.route.loader;if(S)[h]=await Promise.all([y(S),l]);else if(v==="action"){let k=new URL(n.url),N=k.pathname+k.search;throw en(405,{method:n.method,pathname:N,routeId:i.route.id})}else return{type:"data",result:void 0}}else if(w)h=await y(w);else{let S=new URL(n.url),k=S.pathname+S.search;throw en(404,{pathname:k})}}catch(w){return{type:"error",result:w}}finally{p&&n.signal.removeEventListener("abort",p)}return h}async function i0(n){let r=n.headers.get("Content-Type");return r&&/\bapplication\/json\b/.test(r)?n.body==null?null:n.json():n.text()}async function o0(n){var a,l,u,f,h;let{result:r,type:i}=n;if(sc(r)){let p;try{p=await i0(r)}catch(m){return{type:"error",error:m}}return i==="error"?{type:"error",error:new zo(r.status,r.statusText,p),statusCode:r.status,headers:r.headers}:{type:"data",data:p,statusCode:r.status,headers:r.headers}}return i==="error"?kh(r)?r.data instanceof Error?{type:"error",error:r.data,statusCode:(a=r.init)==null?void 0:a.status,headers:(l=r.init)!=null&&l.headers?new Headers(r.init.headers):void 0}:{type:"error",error:u0(r),statusCode:_i(r)?r.status:void 0,headers:(u=r.init)!=null&&u.headers?new Headers(r.init.headers):void 0}:{type:"error",error:r,statusCode:_i(r)?r.status:void 0}:kh(r)?{type:"data",data:r.data,statusCode:(f=r.init)==null?void 0:f.status,headers:(h=r.init)!=null&&h.headers?new Headers(r.init.headers):void 0}:{type:"data",data:r}}function a0(n,r,i,a,l){let u=n.headers.get("Location");if(De(u,"Redirects returned/thrown from loaders/actions must have a Location header"),!oc(u)){let f=a.slice(0,a.findIndex(h=>h.route.id===i)+1);u=Iu(new URL(r.url),f,l,u),n.headers.set("Location",u)}return n}function wh(n,r,i,a){let l=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(oc(n)){let u=n,f=u.startsWith("//")?new URL(r.protocol+u):new URL(u);if(l.includes(f.protocol))throw new Error("Invalid redirect location");let h=It(f.pathname,i)!=null;if(f.origin===r.origin&&h)return f.pathname+f.search+f.hash}try{let u=a.createURL(n);if(l.includes(u.protocol))throw new Error("Invalid redirect location")}catch{}return n}function gi(n,r,i,a){let l=n.createURL(Wp(r)).toString(),u={signal:i};if(a&&St(a.formMethod)){let{formMethod:f,formEncType:h}=a;u.method=f.toUpperCase(),h==="application/json"?(u.headers=new Headers({"Content-Type":h}),u.body=JSON.stringify(a.json)):h==="text/plain"?u.body=a.text:h==="application/x-www-form-urlencoded"&&a.formData?u.body=Fu(a.formData):u.body=a.formData}return new Request(l,u)}function Fu(n){let r=new URLSearchParams;for(let[i,a]of n.entries())r.append(i,typeof a=="string"?a:a.name);return r}function Sh(n){let r=new FormData;for(let[i,a]of n.entries())r.append(i,a);return r}function s0(n,r,i,a=!1,l=!1){let u={},f=null,h,p=!1,m={},v=i&&Ut(i[1])?i[1].error:void 0;return n.forEach(y=>{if(!(y.route.id in r))return;let w=y.route.id,S=r[w];if(De(!br(S),"Cannot handle redirect results in processLoaderData"),Ut(S)){let k=S.error;if(v!==void 0&&(k=v,v=void 0),f=f||{},l)f[w]=k;else{let N=fr(n,w);f[N.route.id]==null&&(f[N.route.id]=k)}a||(u[w]=zp),p||(p=!0,h=_i(S.error)?S.error.status:500),S.headers&&(m[w]=S.headers)}else u[w]=S.data,S.statusCode&&S.statusCode!==200&&!p&&(h=S.statusCode),S.headers&&(m[w]=S.headers)}),v!==void 0&&i&&(f={[i[0]]:v},i[2]&&(u[i[2]]=void 0)),{loaderData:u,errors:f,statusCode:h||200,loaderHeaders:m}}function xh(n,r,i,a,l,u){let{loaderData:f,errors:h}=s0(r,i,a);return l.filter(p=>!p.matches||p.matches.some(m=>m.shouldLoad)).forEach(p=>{let{key:m,match:v,controller:y}=p;if(y&&y.signal.aborted)return;let w=u[m];if(De(w,"Did not find corresponding fetcher result"),Ut(w)){let S=fr(n.matches,v==null?void 0:v.route.id);h&&h[S.route.id]||(h={...h,[S.route.id]:w.error}),n.fetchers.delete(m)}else if(br(w))De(!1,"Unhandled fetcher revalidation redirect");else{let S=In(w.data);n.fetchers.set(m,S)}}),{loaderData:f,errors:h}}function Eh(n,r,i,a){let l=Object.entries(r).filter(([,u])=>u!==zp).reduce((u,[f,h])=>(u[f]=h,u),{});for(let u of i){let f=u.route.id;if(!r.hasOwnProperty(f)&&n.hasOwnProperty(f)&&u.route.loader&&(l[f]=n[f]),a&&a.hasOwnProperty(f))break}return l}function _h(n){return n?Ut(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function fr(n,r){return(r?n.slice(0,n.findIndex(a=>a.route.id===r)+1):[...n]).reverse().find(a=>a.route.hasErrorBoundary===!0)||n[0]}function es(n){let r=n.length===1?n[0]:n.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:r}],route:r}}function en(n,{pathname:r,routeId:i,method:a,type:l,message:u}={}){let f="Unknown Server Error",h="Unknown @remix-run/router error";return n===400?(f="Bad Request",a&&r&&i?h=`You made a ${a} request to "${r}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:l==="invalid-body"&&(h="Unable to encode submission body")):n===403?(f="Forbidden",h=`Route "${i}" does not match URL "${r}"`):n===404?(f="Not Found",h=`No route matches URL "${r}"`):n===405&&(f="Method Not Allowed",a&&r&&i?h=`You made a ${a.toUpperCase()} request to "${r}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:a&&(h=`Invalid request method "${a.toUpperCase()}"`)),new zo(n||500,f,new Error(h),!0)}function ts(n){let r=Object.entries(n);for(let i=r.length-1;i>=0;i--){let[a,l]=r[i];if(br(l))return{key:a,result:l}}}function Wp(n){let r=typeof n=="string"?hr(n):n;return Sn({...r,hash:""})}function l0(n,r){return n.pathname!==r.pathname||n.search!==r.search?!1:n.hash===""?r.hash!=="":n.hash===r.hash?!0:r.hash!==""}function u0(n){var r,i;return new zo(((r=n.init)==null?void 0:r.status)??500,((i=n.init)==null?void 0:i.statusText)??"Internal Server Error",n.data)}function c0(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([r,i])=>typeof r=="string"&&f0(i))}function f0(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function d0(n){return sc(n.result)&&Fp.has(n.result.status)}function Ut(n){return n.type==="error"}function br(n){return(n&&n.type)==="redirect"}function kh(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function sc(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function h0(n){return Fp.has(n)}function p0(n){return sc(n)&&h0(n.status)&&n.headers.has("Location")}function m0(n){return Wv.has(n.toUpperCase())}function St(n){return Bv.has(n.toUpperCase())}function lc(n){return new URLSearchParams(n).getAll("index").some(r=>r==="")}function ls(n,r){let i=typeof r=="string"?hr(r).search:r.search;if(n[n.length-1].route.index&&lc(i||""))return n[n.length-1];let a=Mp(n);return a[a.length-1]}function Ch(n){let{formMethod:r,formAction:i,formEncType:a,text:l,formData:u,json:f}=n;if(!(!r||!i||!a)){if(l!=null)return{formMethod:r,formAction:i,formEncType:a,formData:void 0,json:void 0,text:l};if(u!=null)return{formMethod:r,formAction:i,formEncType:a,formData:u,json:void 0,text:void 0};if(f!==void 0)return{formMethod:r,formAction:i,formEncType:a,formData:void 0,json:f,text:void 0}}}function yu(n,r){return r?{state:"loading",location:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function g0(n,r){return{state:"submitting",location:n,formMethod:r.formMethod,formAction:r.formAction,formEncType:r.formEncType,formData:r.formData,json:r.json,text:r.text}}function vo(n,r){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:r}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:r}}function y0(n,r){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:r?r.data:void 0}}function In(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function v0(n,r){try{let i=n.sessionStorage.getItem(jp);if(i){let a=JSON.parse(i);for(let[l,u]of Object.entries(a||{}))u&&Array.isArray(u)&&r.set(l,new Set(u||[]))}}catch{}}function w0(n,r){if(r.size>0){let i={};for(let[a,l]of r)i[a]=[...l];try{n.sessionStorage.setItem(jp,JSON.stringify(i))}catch(a){tt(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function Rh(){let n,r,i=new Promise((a,l)=>{n=async u=>{a(u);try{await i}catch{}},r=async u=>{l(u);try{await i}catch{}}});return{promise:i,resolve:n,reject:r}}var zr=E.createContext(null);zr.displayName="DataRouter";var Vo=E.createContext(null);Vo.displayName="DataRouterState";var Kp=E.createContext(!1);function S0(){return E.useContext(Kp)}var uc=E.createContext({isTransitioning:!1});uc.displayName="ViewTransition";var Yp=E.createContext(new Map);Yp.displayName="Fetchers";var x0=E.createContext(null);x0.displayName="Await";var Bt=E.createContext(null);Bt.displayName="Navigation";var _s=E.createContext(null);_s.displayName="Location";var tn=E.createContext({outlet:null,matches:[],isDataRoute:!1});tn.displayName="Route";var cc=E.createContext(null);cc.displayName="RouteError";var Qp="REACT_ROUTER_ERROR",E0="REDIRECT",_0="ROUTE_ERROR_RESPONSE";function k0(n){if(n.startsWith(`${Qp}:${E0}:{`))try{let r=JSON.parse(n.slice(28));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string"&&typeof r.location=="string"&&typeof r.reloadDocument=="boolean"&&typeof r.replace=="boolean")return r}catch{}}function C0(n){if(n.startsWith(`${Qp}:${_0}:{`))try{let r=JSON.parse(n.slice(40));if(typeof r=="object"&&r&&typeof r.status=="number"&&typeof r.statusText=="string")return new zo(r.status,r.statusText,r.data)}catch{}}function R0(n,{relative:r}={}){De(ki(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:a}=E.useContext(Bt),{hash:l,pathname:u,search:f}=Uo(n,{relative:r}),h=u;return i!=="/"&&(h=u==="/"?i:wn([i,u])),a.createHref({pathname:h,search:f,hash:l})}function ki(){return E.useContext(_s)!=null}function bt(){return De(ki(),"useLocation() may be used only in the context of a component."),E.useContext(_s).location}var Gp="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Xp(n){E.useContext(Bt).static||E.useLayoutEffect(n)}function Ci(){let{isDataRoute:n}=E.useContext(tn);return n?z0():P0()}function P0(){De(ki(),"useNavigate() may be used only in the context of a component.");let n=E.useContext(zr),{basename:r,navigator:i}=E.useContext(Bt),{matches:a}=E.useContext(tn),{pathname:l}=bt(),u=JSON.stringify(xs(a)),f=E.useRef(!1);return Xp(()=>{f.current=!0}),E.useCallback((p,m={})=>{if(tt(f.current,Gp),!f.current)return;if(typeof p=="number"){i.go(p);return}let v=Es(p,JSON.parse(u),l,m.relative==="path");n==null&&r!=="/"&&(v.pathname=v.pathname==="/"?r:wn([r,v.pathname])),(m.replace?i.replace:i.push)(v,m.state,m)},[r,i,u,l,n])}var L0=E.createContext(null);function T0(n){let r=E.useContext(tn).outlet;return E.useMemo(()=>r&&E.createElement(L0.Provider,{value:n},r),[r,n])}function p_(){let{matches:n}=E.useContext(tn),r=n[n.length-1];return r?r.params:{}}function Uo(n,{relative:r}={}){let{matches:i}=E.useContext(tn),{pathname:a}=bt(),l=JSON.stringify(xs(i));return E.useMemo(()=>Es(n,JSON.parse(l),a,r==="path"),[n,l,a,r])}function N0(n,r,i,a,l){De(ki(),"useRoutes() may be used only in the context of a component.");let{navigator:u}=E.useContext(Bt),{matches:f}=E.useContext(tn),h=f[f.length-1],p=h?h.params:{},m=h?h.pathname:"/",v=h?h.pathnameBase:"/",y=h&&h.route;{let F=y&&y.path||"";em(m,!y||F.endsWith("*")||F.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${m}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. Please change the parent to .`)}let w=bt(),S;S=w;let k=S.pathname||"/",N=k;if(v!=="/"){let F=v.replace(/^\//,"").split("/");N="/"+k.replace(/^\//,"").split("/").slice(F.length).join("/")}let b=cr(n,{pathname:N});return tt(y||b!=null,`No routes matched location "${S.pathname}${S.search}${S.hash}" `),tt(b==null||b[b.length-1].route.element!==void 0||b[b.length-1].route.Component!==void 0||b[b.length-1].route.lazy!==void 0,`Matched leaf route at location "${S.pathname}${S.search}${S.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),b0(b&&b.map(F=>Object.assign({},F,{params:Object.assign({},p,F.params),pathname:wn([v,u.encodeLocation?u.encodeLocation(F.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathname]),pathnameBase:F.pathnameBase==="/"?v:wn([v,u.encodeLocation?u.encodeLocation(F.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:F.pathnameBase])})),f,i,a,l)}function O0(){let n=Zp(),r=_i(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),i=n instanceof Error?n.stack:null,a="rgba(200,200,200, 0.5)",l={padding:"0.5rem",backgroundColor:a},u={padding:"2px 4px",backgroundColor:a},f=null;return console.error("Error handled by React Router default ErrorBoundary:",n),f=E.createElement(E.Fragment,null,E.createElement("p",null,"💿 Hey developer 👋"),E.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",E.createElement("code",{style:u},"ErrorBoundary")," or"," ",E.createElement("code",{style:u},"errorElement")," prop on your route.")),E.createElement(E.Fragment,null,E.createElement("h2",null,"Unexpected Application Error!"),E.createElement("h3",{style:{fontStyle:"italic"}},r),i?E.createElement("pre",{style:l},i):null,f)}var M0=E.createElement(O0,null),qp=class extends E.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,r){return r.location!==n.location||r.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:r.error,location:r.location,revalidation:n.revalidation||r.revalidation}}componentDidCatch(n,r){this.props.onError?this.props.onError(n,r):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const i=C0(n.digest);i&&(n=i)}let r=n!==void 0?E.createElement(tn.Provider,{value:this.props.routeContext},E.createElement(cc.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?E.createElement(D0,{error:n},r):r}};qp.contextType=Kp;var vu=new WeakMap;function D0({children:n,error:r}){let{basename:i}=E.useContext(Bt);if(typeof r=="object"&&r&&"digest"in r&&typeof r.digest=="string"){let a=k0(r.digest);if(a){let l=vu.get(r);if(l)throw l;let u=Ip(a.location,i);if(Dp&&!vu.get(r))if(u.isExternal||a.reloadDocument)window.location.href=u.absoluteURL||u.to;else{const f=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:a.replace}));throw vu.set(r,f),f}return E.createElement("meta",{httpEquiv:"refresh",content:`0;url=${u.absoluteURL||u.to}`})}}return n}function I0({routeContext:n,match:r,children:i}){let a=E.useContext(zr);return a&&a.static&&a.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=r.route.id),E.createElement(tn.Provider,{value:n},i)}function b0(n,r=[],i=null,a=null,l=null){if(n==null){if(!i)return null;if(i.errors)n=i.matches;else if(r.length===0&&!i.initialized&&i.matches.length>0)n=i.matches;else return null}let u=n,f=i==null?void 0:i.errors;if(f!=null){let v=u.findIndex(y=>y.route.id&&(f==null?void 0:f[y.route.id])!==void 0);De(v>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(f).join(",")}`),u=u.slice(0,Math.min(u.length,v+1))}let h=!1,p=-1;if(i)for(let v=0;v=0?u=u.slice(0,p+1):u=[u[0]];break}}}let m=i&&a?(v,y)=>{var w,S;a(v,{location:i.location,params:((S=(w=i.matches)==null?void 0:w[0])==null?void 0:S.params)??{},unstable_pattern:$o(i.matches),errorInfo:y})}:void 0;return u.reduceRight((v,y,w)=>{let S,k=!1,N=null,b=null;i&&(S=f&&y.route.id?f[y.route.id]:void 0,N=y.route.errorElement||M0,h&&(p<0&&w===0?(em("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,b=null):p===w&&(k=!0,b=y.route.hydrateFallbackElement||null)));let B=r.concat(u.slice(0,w+1)),F=()=>{let j;return S?j=N:k?j=b:y.route.Component?j=E.createElement(y.route.Component,null):y.route.element?j=y.route.element:j=v,E.createElement(I0,{match:y,routeContext:{outlet:v,matches:B,isDataRoute:i!=null},children:j})};return i&&(y.route.ErrorBoundary||y.route.errorElement||w===0)?E.createElement(qp,{location:i.location,revalidation:i.revalidation,component:N,error:S,children:F(),routeContext:{outlet:null,matches:B,isDataRoute:!0},onError:m}):F()},null)}function fc(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Jp(n){let r=E.useContext(zr);return De(r,fc(n)),r}function dc(n){let r=E.useContext(Vo);return De(r,fc(n)),r}function A0(n){let r=E.useContext(tn);return De(r,fc(n)),r}function ks(n){let r=A0(n),i=r.matches[r.matches.length-1];return De(i.route.id,`${n} can only be used on routes that contain a unique "id"`),i.route.id}function F0(){return ks("useRouteId")}function m_(){let n=dc("useLoaderData"),r=ks("useLoaderData");return n.loaderData[r]}function Zp(){var a;let n=E.useContext(cc),r=dc("useRouteError"),i=ks("useRouteError");return n!==void 0?n:(a=r.errors)==null?void 0:a[i]}var j0=0;function g_(n){let{router:r,basename:i}=Jp("useBlocker"),a=dc("useBlocker"),[l,u]=E.useState(""),f=E.useCallback(h=>{if(typeof n!="function")return!!n;if(i==="/")return n(h);let{currentLocation:p,nextLocation:m,historyAction:v}=h;return n({currentLocation:{...p,pathname:It(p.pathname,i)||p.pathname},nextLocation:{...m,pathname:It(m.pathname,i)||m.pathname},historyAction:v})},[i,n]);return E.useEffect(()=>{let h=String(++j0);return u(h),()=>r.deleteBlocker(h)},[r]),E.useEffect(()=>{l!==""&&r.getBlocker(l,f)},[r,l,f]),l&&a.blockers.has(l)?a.blockers.get(l):mi}function z0(){let{router:n}=Jp("useNavigate"),r=ks("useNavigate"),i=E.useRef(!1);return Xp(()=>{i.current=!0}),E.useCallback(async(l,u={})=>{tt(i.current,Gp),i.current&&(typeof l=="number"?await n.navigate(l):await n.navigate(l,{fromRouteId:r,...u}))},[n,r])}var Ph={};function em(n,r,i){!r&&!Ph[n]&&(Ph[n]=!0,tt(!1,i))}var Lh={};function Th(n,r){!n&&!Lh[r]&&(Lh[r]=!0,console.warn(r))}var $0="useOptimistic",Nh=lv[$0],V0=()=>{};function U0(n){return Nh?Nh(n):[n,V0]}function B0(n){let r={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&tt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(r,{element:E.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&tt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(r,{hydrateFallbackElement:E.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&tt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(r,{errorElement:E.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),r}var H0=["HydrateFallback","hydrateFallbackElement"],W0=class{constructor(){this.status="pending",this.promise=new Promise((n,r)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",n(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",r(i))}})}};function K0({router:n,flushSync:r,onError:i,unstable_useTransitions:a}){a=S0()||a;let[u,f]=E.useState(n.state),[h,p]=U0(u),[m,v]=E.useState(),[y,w]=E.useState({isTransitioning:!1}),[S,k]=E.useState(),[N,b]=E.useState(),[B,F]=E.useState(),j=E.useRef(new Map),W=E.useCallback((ee,{deletedFetchers:ae,newErrors:pe,flushSync:X,viewTransitionOpts:Z})=>{pe&&i&&Object.values(pe).forEach(re=>{var Ne;return i(re,{location:ee.location,params:((Ne=ee.matches[0])==null?void 0:Ne.params)??{},unstable_pattern:$o(ee.matches)})}),ee.fetchers.forEach((re,Ne)=>{re.data!==void 0&&j.current.set(Ne,re.data)}),ae.forEach(re=>j.current.delete(re)),Th(X===!1||r!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let J=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(Th(Z==null||J,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!Z||!J){r&&X?r(()=>f(ee)):a===!1?f(ee):E.startTransition(()=>{a===!0&&p(re=>Oh(re,ee)),f(ee)});return}if(r&&X){r(()=>{N&&(S==null||S.resolve(),N.skipTransition()),w({isTransitioning:!0,flushSync:!0,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})});let re=n.window.document.startViewTransition(()=>{r(()=>f(ee))});re.finished.finally(()=>{r(()=>{k(void 0),b(void 0),v(void 0),w({isTransitioning:!1})})}),r(()=>b(re));return}N?(S==null||S.resolve(),N.skipTransition(),F({state:ee,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation})):(v(ee),w({isTransitioning:!0,flushSync:!1,currentLocation:Z.currentLocation,nextLocation:Z.nextLocation}))},[n.window,r,N,S,a,p,i]);E.useLayoutEffect(()=>n.subscribe(W),[n,W]),E.useEffect(()=>{y.isTransitioning&&!y.flushSync&&k(new W0)},[y]),E.useEffect(()=>{if(S&&m&&n.window){let ee=m,ae=S.promise,pe=n.window.document.startViewTransition(async()=>{a===!1?f(ee):E.startTransition(()=>{a===!0&&p(X=>Oh(X,ee)),f(ee)}),await ae});pe.finished.finally(()=>{k(void 0),b(void 0),v(void 0),w({isTransitioning:!1})}),b(pe)}},[m,S,n.window,a,p]),E.useEffect(()=>{S&&m&&h.location.key===m.location.key&&S.resolve()},[S,N,h.location,m]),E.useEffect(()=>{!y.isTransitioning&&B&&(v(B.state),w({isTransitioning:!0,flushSync:!1,currentLocation:B.currentLocation,nextLocation:B.nextLocation}),F(void 0))},[y.isTransitioning,B]);let q=E.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:ee=>n.navigate(ee),push:(ee,ae,pe)=>n.navigate(ee,{state:ae,preventScrollReset:pe==null?void 0:pe.preventScrollReset}),replace:(ee,ae,pe)=>n.navigate(ee,{replace:!0,state:ae,preventScrollReset:pe==null?void 0:pe.preventScrollReset})}),[n]),we=n.basename||"/",O=E.useMemo(()=>({router:n,navigator:q,static:!1,basename:we,onError:i}),[n,q,we,i]);return E.createElement(E.Fragment,null,E.createElement(zr.Provider,{value:O},E.createElement(Vo.Provider,{value:h},E.createElement(Yp.Provider,{value:j.current},E.createElement(uc.Provider,{value:y},E.createElement(X0,{basename:we,location:h.location,navigationType:h.historyAction,navigator:q,unstable_useTransitions:a},E.createElement(Y0,{routes:n.routes,future:n.future,state:h,onError:i})))))),null)}function Oh(n,r){return{...n,navigation:r.navigation.state!=="idle"?r.navigation:n.navigation,revalidation:r.revalidation!=="idle"?r.revalidation:n.revalidation,actionData:r.navigation.state!=="submitting"?r.actionData:n.actionData,fetchers:r.fetchers}}var Y0=E.memo(Q0);function Q0({routes:n,future:r,state:i,onError:a}){return N0(n,void 0,i,a,r)}function y_({to:n,replace:r,state:i,relative:a}){De(ki()," may be used only in the context of a component.");let{static:l}=E.useContext(Bt);tt(!l," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:u}=E.useContext(tn),{pathname:f}=bt(),h=Ci(),p=Es(n,xs(u),f,a==="path"),m=JSON.stringify(p);return E.useEffect(()=>{h(JSON.parse(m),{replace:r,state:i,relative:a})},[h,m,a,r,i]),null}function G0(n){return T0(n.context)}function X0({basename:n="/",children:r=null,location:i,navigationType:a="POP",navigator:l,static:u=!1,unstable_useTransitions:f}){De(!ki(),"You cannot render a inside another . You should never have more than one in your app.");let h=n.replace(/^\/*/,"/"),p=E.useMemo(()=>({basename:h,navigator:l,static:u,unstable_useTransitions:f,future:{}}),[h,l,u,f]);typeof i=="string"&&(i=hr(i));let{pathname:m="/",search:v="",hash:y="",state:w=null,key:S="default"}=i,k=E.useMemo(()=>{let N=It(m,h);return N==null?null:{location:{pathname:N,search:v,hash:y,state:w,key:S},navigationType:a}},[h,m,v,y,w,S,a]);return tt(k!=null,` is not able to match the URL "${m}${v}${y}" because it does not start with the basename, so the won't render anything.`),k==null?null:E.createElement(Bt.Provider,{value:p},E.createElement(_s.Provider,{children:r,value:k}))}var us="get",cs="application/x-www-form-urlencoded";function Cs(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function q0(n){return Cs(n)&&n.tagName.toLowerCase()==="button"}function J0(n){return Cs(n)&&n.tagName.toLowerCase()==="form"}function Z0(n){return Cs(n)&&n.tagName.toLowerCase()==="input"}function ew(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function tw(n,r){return n.button===0&&(!r||r==="_self")&&!ew(n)}function ju(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((r,i)=>{let a=n[i];return r.concat(Array.isArray(a)?a.map(l=>[i,l]):[[i,a]])},[]))}function nw(n,r){let i=ju(n);return r&&r.forEach((a,l)=>{i.has(l)||r.getAll(l).forEach(u=>{i.append(l,u)})}),i}var ns=null;function rw(){if(ns===null)try{new FormData(document.createElement("form"),0),ns=!1}catch{ns=!0}return ns}var iw=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function wu(n){return n!=null&&!iw.has(n)?(tt(!1,`"${n}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${cs}"`),null):n}function ow(n,r){let i,a,l,u,f;if(J0(n)){let h=n.getAttribute("action");a=h?It(h,r):null,i=n.getAttribute("method")||us,l=wu(n.getAttribute("enctype"))||cs,u=new FormData(n)}else if(q0(n)||Z0(n)&&(n.type==="submit"||n.type==="image")){let h=n.form;if(h==null)throw new Error('Cannot submit a