vendor: 5,642 bytes, line 1
1function Wn(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const o=Object.getOwnPropertyDescriptor(n,a);o&&Object.defineProperty(e,a,o.get?o:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}function Yn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var At={exports:{}},k={};var vr;function Vn(){if(vr)return k;vr=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),i=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),s=Symbol.for("react.suspense"),l=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.activity"),w=Symbol.iterator;function g(f){return f===null||typeof f!="object"?null:(f=w&&f[w]||f["@@iterator"],typeof f=="function"?f:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,x={};function _(f,R,$){this.props=f,this.context=R,this.refs=x,this.updater=$||C}_.prototype.isReactComponent={},_.prototype.setState=function(f,R){if(typeof f!="object"&&typeof f!="function"&&f!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,f,R,"setState")},_.prototype.forceUpdate=function(f){this.updater.enqueueForceUpdate(this,f,"forceUpdate")};function P(){}P.prototype=_.prototype;function A(f,R,$){this.props=f,this.context=R,this.refs=x,this.updater=$||C}var Z=A.prototype=new P;Z.constructor=A,S(Z,_.prototype),Z.isPureReactComponent=!0;var Y=Array.isArray;function te(){}var p={H:null,A:null,T:null,S:null},j=Object.prototype.hasOwnProperty;function B(f,R,$){var T=$.ref;return{$$typeof:e,type:f,key:R,ref:T!==void 0?T:null,props:$}}function re(f,R){return B(f.type,R,f.props)}function X(f){return typeof f=="object"&&f!==null&&f.$$typeof===e}function le(f){var R={"=":"=0",":":"=2"};return"$"+f.replace(/[=:]/g,function($){return R[$]})}var we=/\/+/g;function ne(f,R){return typeof f=="object"&&f!==null&&f.key!=null?le(""+f.key):R.toString(36)}function Q(f){switch(f.status){case"fulfilled":return f.value;case"rejected":throw f.reason;default:switch(typeof f.status=="string"?f.then(te,te):(f.status="pending",f.then(function(R){f.status==="pending"&&(f.status="fulfilled",f.value=R)},function(R){f.status==="pending"&&(f.status="rejected",f.reason=R)})),f.status){case"fulfilled":return f.value;case"rejected":throw f.reason}}throw f}function q(f,R,$,T,z){var H=typeof f;(H==="undefined"||H==="boolean")&&(f=null);var J=!1;if(f===null)J=!0;else switch(H){case"bigint":case"string":case"number":J=!0;break;case"object":switch(f.$$typeof){case e:case t:J=!0;break;case h:return J=f._init,q(J(f._payload),R,$,T,z)}}if(J)return z=z(f),J=T===""?"."+ne(f,0):T,Y(z)?($="",J!=null&&($=J.replace(we,"$&/")+"/"),q(z,R,$,"",function(Tt){return Tt})):z!=null&&(X(z)&&(z=re(z,$+(z.key==null||f&&f.key===z.key?"":(""+z.key).replace(we,"$&/")+"/")+J)),R.push(z)),1;J=0;var de=T===""?".":T+":";if(Y(f))for(var he=0;he<f.length;he++)T=f[he],H=de+ne(T,he),J+=q(T,R,$,H,z);else if(he=g(f),typeof he=="function")for(f=he.call(f),he=0;!(T=f.next()).done;)T=T.value,H=de+ne(T,he++),J+=q(T,R,$,H,z);else if(H==="object"){if(typeof f.then=="function")return q(Q(f),R,$,T,z);throw R=String(f),Error("Objects are not valid as a React child (found: "+(R==="[object Object]"?"object with keys {"+Object.keys(f).join(", ")+"}":R)+"). If you meant to render a collection of children, use an array instead.")}return J}function ue(f,R,$){if(f==null)return f;var T=[],z=0;return q(f,T,"","",function(H){return R.call($,H,z++)}),T}function G(f){if(f._status===-1){var R=f._result;R=R(),R.then(function($){(f._status===0||f._status===-1)&&(f._status=1,f._result=$)},function($){(f._status===0||f._status===-1)&&(f._status=2,f._result=$)}),f._status===-1&&(f._status=0,f._result=R)}if(f._status===1)return f._result.default;throw f._result}var oe=typeof reportError=="function"?reportError:function(f){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var R=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof f=="object"&&f!==null&&typeof f.message=="string"?String(f.message):String(f),error:f});if(!window.dispatchEvent(R))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",f);return}console.error(f)},fe={map:ue,forEach:function(f,R,$){ue(f,function(){R.apply(this,arguments)},$)},count:function(f){var R=0;return ue(f,function(){R++}),R},toArray:function(f){return ue(f,function(R){return R})||[]},only:function(f){if(!X(f))throw Error("React.Children.only expected to receive a single React element child.");return f}};return k.Activity=m,k.Children=fe,k.Component=_,k.Fragment=r,k.Profiler=a,k.PureComponent=A,k.StrictMode=n,k.Suspense=s,k.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=p,k.__COMPILER_RUNTIME={__proto__:null,c:function(f){return p.H.useMemoCache(f)}},k.cache=function(f){return function(){return f.apply(null,arguments)}},k.cacheSignal=function(){return null},k.cloneElement=function(f,R,$){if(f==null)throw Error("The argument must be a React element, but you passed "+f+".");var T=S({},f.props),z=f.key;if(R!=null)for(H in R.key!==void 0&&(z=""+R.key),R)!j.call(R,H)||H==="key"||H==="__self"||H==="__source"||H==="ref"&&R.ref===void 0||(T[H]=R[H
vendor: 6,591 bytes, line 1
1]);var H=arguments.length-2;if(H===1)T.children=$;else if(1<H){for(var J=Array(H),de=0;de<H;de++)J[de]=arguments[de+2];T.children=J}return B(f.type,z,T)},k.createContext=function(f){return f={$$typeof:i,_currentValue:f,_currentValue2:f,_threadCount:0,Provider:null,Consumer:null},f.Provider=f,f.Consumer={$$typeof:o,_context:f},f},k.createElement=function(f,R,$){var T,z={},H=null;if(R!=null)for(T in R.key!==void 0&&(H=""+R.key),R)j.call(R,T)&&T!=="key"&&T!=="__self"&&T!=="__source"&&(z[T]=R[T]);var J=arguments.length-2;if(J===1)z.children=$;else if(1<J){for(var de=Array(J),he=0;he<J;he++)de[he]=arguments[he+2];z.children=de}if(f&&f.defaultProps)for(T in J=f.defaultProps,J)z[T]===void 0&&(z[T]=J[T]);return B(f,H,z)},k.createRef=function(){return{current:null}},k.forwardRef=function(f){return{$$typeof:u,render:f}},k.isValidElement=X,k.lazy=function(f){return{$$typeof:h,_payload:{_status:-1,_result:f},_init:G}},k.memo=function(f,R){return{$$typeof:l,type:f,compare:R===void 0?null:R}},k.startTransition=function(f){var R=p.T,$={};p.T=$;try{var T=f(),z=p.S;z!==null&&z($,T),typeof T=="object"&&T!==null&&typeof T.then=="function"&&T.then(te,oe)}catch(H){oe(H)}finally{R!==null&&$.types!==null&&(R.types=$.types),p.T=R}},k.unstable_useCacheRefresh=function(){return p.H.useCacheRefresh()},k.use=function(f){return p.H.use(f)},k.useActionState=function(f,R,$){return p.H.useActionState(f,R,$)},k.useCallback=function(f,R){return p.H.useCallback(f,R)},k.useContext=function(f){return p.H.useContext(f)},k.useDebugValue=function(){},k.useDeferredValue=function(f,R){return p.H.useDeferredValue(f,R)},k.useEffect=function(f,R){return p.H.useEffect(f,R)},k.useEffectEvent=function(f){return p.H.useEffectEvent(f)},k.useId=function(){return p.H.useId()},k.useImperativeHandle=function(f,R,$){return p.H.useImperativeHandle(f,R,$)},k.useInsertionEffect=function(f,R){return p.H.useInsertionEffect(f,R)},k.useLayoutEffect=function(f,R){return p.H.useLayoutEffect(f,R)},k.useMemo=function(f,R){return p.H.useMemo(f,R)},k.useOptimistic=function(f,R){return p.H.useOptimistic(f,R)},k.useReducer=function(f,R,$){return p.H.useReducer(f,R,$)},k.useRef=function(f){return p.H.useRef(f)},k.useState=function(f){return p.H.useState(f)},k.useSyncExternalStore=function(f,R,$){return p.H.useSyncExternalStore(f,R,$)},k.useTransition=function(){return p.H.useTransition()},k.version="19.2.3",k}var gr;function qr(){return gr||(gr=1,At.exports=Vn()),At.exports}var v=qr();const Kn=Yn(v),Gn=Wn({__proto__:null,default:Kn},[v]);var Ut={exports:{}},ye={};var wr;function qn(){if(wr)return ye;wr=1;var e=qr();function t(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)l+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function o(s,l,h){var m=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:m==null?null:""+m,children:s,containerInfo:l,implementation:h}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(s,l){if(s==="font")return"";if(typeof l=="string")return l==="use-credentials"?l:""}return ye.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,ye.createPortal=function(s,l){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!l||l.nodeType!==1&&l.nodeType!==9&&l.nodeType!==11)throw Error(t(299));return o(s,l,null,h)},ye.flushSync=function(s){var l=i.T,h=n.p;try{if(i.T=null,n.p=2,s)return s()}finally{i.T=l,n.p=h,n.d.f()}},ye.preconnect=function(s,l){typeof s=="string"&&(l?(l=l.crossOrigin,l=typeof l=="string"?l==="use-credentials"?l:"":void 0):l=null,n.d.C(s,l))},ye.prefetchDNS=function(s){typeof s=="string"&&n.d.D(s)},ye.preinit=function(s,l){if(typeof s=="string"&&l&&typeof l.as=="string"){var h=l.as,m=u(h,l.crossOrigin),w=typeof l.integrity=="string"?l.integrity:void 0,g=typeof l.fetchPriority=="string"?l.fetchPriority:void 0;h==="style"?n.d.S(s,typeof l.precedence=="string"?l.precedence:void 0,{crossOrigin:m,integrity:w,fetchPriority:g}):h==="script"&&n.d.X(s,{crossOrigin:m,integrity:w,fetchPriority:g,nonce:typeof l.nonce=="string"?l.nonce:void 0})}},ye.preinitModule=function(s,l){if(typeof s=="string")if(typeof l=="object"&&l!==null){if(l.as==null||l.as==="script"){var h=u(l.as,l.crossOrigin);n.d.M(s,{crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0})}}else l==null&&n.d.M(s)},ye.preload=function(s,l){if(typeof s=="string"&&typeof l=="object"&&l!==null&&typeof l.as=="string"){var h=l.as,m=u(h,l.crossOrigin);n.d.L(s,h,{crossOrigin:m,integrity:typeof l.integrity=="string"?l.integrity:void 0,nonce:typeof l.nonce=="string"?l.nonce:void 0,type:typeof l.type=="string"?l.type:void 0,fetchPriority:typeof l.fetchPriority=="string"?l.fetchPriority:void 0,referrerPolicy:typeof l.referrerPolicy=="string"?l.referrerPolicy:void 0,imageSrcSet:typeof l.imageSrcSet=="string"?l.imageSrcSet:void 0,imageSizes:typeof l.imageSizes=="string"?l.imageSizes:void 0,media:typeof l.media=="string"?l.media:void 0})}},ye.preloadModule=function(s,l){if(typeof s=="string")if(l){var h=u(l.as,l.crossOrigin);n.d.m(s,{as:typeof l.as=="string"&&l.as!=="script"?l.as:void 0,crossOrigin:h,integrity:typeof l.integrity=="string"?l.integrity:void 0})}else n.d.m(s)},ye.requestFormReset=function(s){n.d.r(s)},ye.unstable_batchedUpdates=function(s,l){return s(l)},ye.useFormState=function(s,l,h){return i.H.useFormState(s,l,h)},ye.useFormStatus=function(){return i.H.useHostTransitionStatus()},ye.version="19.2.3",ye}var Rr;function Jn(){if(Rr)return Ut.exports;Rr=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Ut.exports=qn(),Ut.exports}var Jr=e=>{throw TypeError(e)},Xn=(e,t,r)=>t.has(e)||Jr("Cannot "+r),Ft=(e,t,r)=>(Xn(e,t,"read from private field"),r?r.call(e):t.get(e)),Qn=(e,t,r)=>t.has(e)?Jr("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),Er="popstate";function Zn(e={}){function t(n,a){let{pathname:o,search:i,hash:u}=n.location;return it("",{pathname:o,search:i,hash:u},a.state&&a.state.usr||null,a.state&&a.state.key||"default")}
1function r(n,a){return typeof a=="string"?a:Le(a)}return ta(t,r,null,e)}function I(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function ie(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function ea(){return Math.random().toString(36).substring(2,10)}function br(e,t){return{usr:e.state,key:e.key,idx:t}}function it(e,t,r=null,n){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Fe(t):t,state:r,key:t&&t.key||n||ea()}}function Le({pathname:e="/",search:t="",hash:r=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Fe(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ta(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,u="POP",s=null,l=h();l==null&&(l=0,i.replaceState({...i.state,idx:l},""));function h(){return(i.state||{idx:null}).idx}function m(){u="POP";let x=h(),_=x==null?null:x-l;l=x,s&&s({action:u,location:S.location,delta:_})}function w(x,_){u="PUSH";let P=it(S.location,x,_);l=h()+1;let A=br(P,l),Z=S.createHref(P);try{i.pushState(A,"",Z)}catch(Y){if(Y instanceof DOMException&&Y.name==="DataCloneError")throw Y;a.location.assign(Z)}o&&s&&s({action:u,location:S.location,delta:1})}function g(x,_){u="REPLACE";let P=it(S.location,x,_);l=h();let A=br(P,l),Z=S.createHref(P);i.replaceState(A,"",Z),o&&s&&s({action:u,location:S.location,delta:0})}function C(x){return Xr(x)}let S={get action(){return u},get location(){return e(a,i)}
1,listen(x){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(Er,m),s=x,()=>{a.removeEventListener(Er,m),s=null}},createHref(x){return t(a,x)},createURL:C,encodeLocation(x){let _=C(x);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:w,replace:g,go(x){return i.go(x)}};return S}function Xr(e,t=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),I(r,"No window.location.(origin|href) available to create URL");let n=typeof e=="string"?e:Le(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var nt,Cr=class{constructor(e){if(Qn(this,nt,new Map),e)for(let[t,r]of e)this.set(t,r)}get(e){if(Ft(this,nt).has(e))return Ft(this,nt).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){Ft(this,nt).set(e,t)}};nt=new WeakMap;var ra=new Set(["lazy","caseSensitive","path","id","index","children"]);function na(e){return ra.has(e)}var aa=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function oa(e){return aa.has(e)}function ia(e){return e.index===!0}function lt(e,t,r=[],n={},a=!1){return e.map((o,i)=>{let u=[...r,String(i)],s=typeof o.id=="string"?o.id:u.join("-");if(I(o.index!==!0||!o.children,"Cannot specify children on an index route"),I(a||!n[s],`Found a route id collision on i
1d "${s}". Route id's must be globally unique within Data Router usages`),ia(o)){let l={...o,id:s};return n[s]=Pr(l,t(l)),l}else{let l={...o,id:s,children:void 0};return n[s]=Pr(l,t(l)),o.children&&(l.children=lt(o.children,t,u,n,a)),l}})}function Pr(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function Ne(e,t,r="/"){return at(e,t,r,!1)}function at(e,t,r,n){let a=typeof t=="string"?Fe(t):t,o=Ce(a.pathname||"/",r);if(o==null)return null;let i=Qr(e);sa(i);let u=null;for(let s=0;u==null&&s<i.length;++s){let l=wa(o);u=va(i[s],l,n)}return u}function la(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function Qr(e,t=[],r=[],n="",a=!1){let o=(i,u,s=a,l)=>{let h={relativePath:l===void 0?i.path||"":l,caseSensitive:i.caseSensitive===!0,childrenIndex:u,route:i};if(h.relativePath.startsWith("/")){if(!h.relativePath.startsWith(n)&&s)return;I(h.relativePath.startsWith(n),`Absolute route path "${h.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),h.relativePath=h.relativePath.slice(n.length)}let m=_e([n,h.relativePath]),w=r.concat(h);i.children&&i.children.length>0&&(I(i.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${m}".`),Qr(i.children,t,w,m,s)),!(i.path==null&&!i.index)&&t.push({path:m,score:pa(m,i.index),routesMeta:w})};return e.forEach((i,u)=>{if(i.path===""||!i.path?.includes("?"))o(i,u);else for(let s of Zr(i.path))o(i,u,!0,s)}),t}function Zr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(n.length===0)return a?[o,""]:[o];let i=Zr(n.join("/")),u=[];return u.push(...i.map(s=>s===""?o:[o,s].join("/"))),a&&u.push(...i),u.map(s=>e.startsWith("/")&&s===""?"/":s)}function sa(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:ya(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}var ua=/^:[\w-]+$/,ca=3,fa=2,da=1,ha=10,ma=-2,Sr=e=>e==="*";function pa(e,t){let r=e.split("/"),n=r.length;return r.some(Sr)&&(n+=ma),t&&(n+=fa),r.filter(a=>!Sr(a)).reduce((a,o)=>a+(ua.test(o)?ca:o===""?da:ha),n)}function ya(e,t){return e.length===t.length&&e.slice(0,-1).every((n,a)=>n===t[a])?e[e.length-1]-t[t.length-1]:0}function va(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let u=0;u<n.length;++u){let s=n[u],l=u===n.length-1,h=o==="/"?t:t.slice(o.length)||"/",m=xt({path:s.relativePath,caseSensitive:s.caseSensitive,end:l},h),w=s.route;if(!m&&l&&r&&!n[n.length-1].route.index&&(m=xt({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},h)),!m)return null;
1Object.assign(a,m.params),i.push({params:a,pathname:_e([o,m.pathname]),pathnameBase:ba(_e([o,m.pathnameBase])),route:w}),m.pathnameBase!=="/"&&(o=_e([o,m.pathnameBase]))}return i}function xt(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ga(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),u=a.slice(1);return{params:n.reduce((l,{paramName:h,isOptional:m},w)=>{if(h==="*"){let C=u[w]||"";i=o.slice(0,o.length-C.length).replace(/(.)\/+$/,"$1")}const g=u[w];return m&&!g?l[h]=void 0:l[h]=(g||"").replace(/%2F/g,"/"),l},{}),pathname:o,pathnameBase:i,pattern:e}}function ga(e,t=!1,r=!0){ie(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let n=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(i,u,s)=>(n.push({paramName:u,isOptional:s!=null}),s?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function wa(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return ie(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ce(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}function Ra({basename:e,pathname:t}){return t==="/"?e:_e([e,t])}var en=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_t=e=>en.test(e);function Ea(e,t="/"){let{pathname:r,search:n="",hash:a=""}=typeof e=="string"?Fe(e):e,o;if(r)if(_t(r))o=r;else{if(r.includes("//")){let i=r;r=r.replace(/\/\/+/g,"/"),ie(!1,`Pathnames cannot have embedded double slashes - normalizing ${i} -> ${r}`)}r.startsWith("/")?o=xr(r.substring(1),"/"):o=xr(r,t)}else o=t;return{pathname:o,search:Ca(n),hash:Pa(a)}}function xr(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?r.length>1&&r.pop():a!=="."&&r.push(a)}),r.length>1?r.join("/"):"/"}function jt(e,t,r,n){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(n)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tn(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}function Kt(e){let t=tn(e);return t.map((r,n)=>n===t.length-1?r.pathname:r.pathnameBase)}function Gt(e,t,r,n=!1){let a;typeof e=="string"?a=Fe(e):(a={...e},I(!a.pathname||!a.pathname.includes("?"),jt("?","pathname","search",a)),I(!a.pathname||!a.pathname.includes("#"),jt("#","pathname","hash",a)),I(!a.search||!a.search.includes("#"),jt("#","search","hash",a)));let o=e===""||a.pathname==="",i=o?"/":a.pathname,u;if(i==null)u=r;else{let m=t.length-1;if(!n&&i.startsWith("..")){let w=i.split("/");for(;w[0]==="..";)w.shift(),m-=1;a.pathname=w.join("/")}u=m>=0?t[m]:"/"}let s=Ea(a,u),l=i&&i!=="/"&&i.endsWith("/"),h=(o||i===".")&&r.endsWith("/");return!s.pathname.endsWith("/")&&(l||h)&&(s.pathname+="/"),s}var _e=e=>e.join("/").replace(/\/\/+/g,"/"),ba=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),Ca=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,Pa=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,ut=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function st(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function ct(e){return e.map(t=>t.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var rn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function nn(e,t){let r=e;if(typeof r!="string"||!en.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(rn)try{let o=new URL(window.location.href),i=r.startsWith("//")?new URL(o.protocol+r):new URL(r),u=Ce(i.pathname,t);i.origin===o.origin&&u!=null?r=u+i.search+i.hash:a=!0}catch{ie(!1,`<Link to="${r}">
1 contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var Ue=Symbol("Uninstrumented");function Sa(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(a=>a({id:t.id,index:t.index,path:t.path,instrument(o){let i=Object.keys(r);for(let u of i)o[u]&&r[u].push(o[u])}}));let n={};if(typeof t.lazy=="function"&&r.lazy.length>0){let a=qe(r.lazy,t.lazy,()=>{});a&&(n.lazy=a)}if(typeof t.lazy=="object"){let a=t.lazy;["middleware","loader","action"].forEach(o=>{let i=a[o],u=r[`lazy.${o}`];if(typeof i=="function"&&u.length>0){let s=qe(u,i,()=>{});s&&(n.lazy=Object.assign(n.lazy||{},{[o]:s}))}})}return["loader","action"].forEach(a=>{let o=t[a];if(typeof o=="function"&&r[a].length>0){let i=o[Ue]??o,u=qe(r[a],i,(...s)=>_r(s[0]));u&&(a==="loader"&&i.hydrate===!0&&(u.hydrate=!0),u[Ue]=i,n[a]=u)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(a=>{let o=a[Ue]??a,i=qe(r.middleware,o,(...u)=>_r(u[0]));return i?(i[Ue]=o,i):a})),n}function xa(e,t){let r={navigate:[],fetch:[]};if(t.forEach(n=>n({instrument(a){let o=Object.keys(a);for(let i of o)a[i]&&r[i].push(a[i])}})),r.navigate.length>0){let n=e.navigate[Ue]??e.navigate,a=qe(r.navigate,n,(...o)=>{let[i,u]=o;return{to:typeof i=="number"||typeof i=="string"?i:i?Le(i):".",...Lr(e,u??{})}});a&&(a[Ue]=n,e.navigate=a)}if(r.fetch.length>0){let n=e.fetch[Ue]??e.fetch,a=qe(r.fetch,n,(...o)=>{let[i,,u,s]=o;return{href:u??".",fetcherKey:i,...Lr(e,s??{})}});a&&(a[Ue]=n,e.fetch=a)}return e}function qe(e,t,r){return e.length===0?null:async(...n)=>{let a=await an(e,r(...n),()=>t(...n),e.length-1);if(a.type==="error")throw a.value;return a.value}}async function an(e,t,r,n){let a=e[n],o;if(a){let i,u=async()=>(i?console.error("You cannot call instrumented handlers more than once"):i=an(e,t,r,n-1),o=await i,I(o,"Expected a result"),o.type==="error"&&o.value instanceof Error?{status:"error",error:o.value}:{status:"success",error:void 0});try{await a(u,t)}catch(s){console.error("An instrumentation function threw an error:",s)}i||await u(),await i}else try{o={type:"success",value:await r()}}catch(i){o={type:"error",value:i}}return o||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function _r(e){let{request:t,context:r,params:n,unstable_pattern:a}=e;return{request:_a(t),params:{...n},unstable_pattern:a,context:La(r)}}function Lr(e,t){return{currentUrl:Le(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function _a(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function La(e){if(Ta(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var Da=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ta(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===Da}var on=["POST","PUT","PATCH","DELETE"],Ma=new Set(on),Oa=["GET",...on],$a=new Set(Oa),ln=new Set([301,302,303,307,308]),Na=new Set([307,308]),zt={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Aa={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},et={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Ua=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),sn="remix-router-transitions",un=Symbol("ResetLoaderData");function Fa(e){const t=e.window?e.window:typeof window<"u"?window:void 0,r=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";I(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||Ua,o=a;if(e.unstable_instrumentations){let c=e.unstable_instrumentations;o=d=>({...a(d),...Sa(c.map(y=>
1y.route).filter(Boolean),d)})}let i={},u=lt(e.routes,o,void 0,i),s,l=e.basename||"/";l.startsWith("/")||(l=`/${l}`);let h=e.dataStrategy||Ha,m={...e.future},w=null,g=new Set,C=null,S=null,x=null,_=e.hydrationData!=null,P=Ne(u,e.history.location,l),A=!1,Z=null,Y;if(P==null&&!e.patchRoutesOnNavigation){let c=be(404,{pathname:e.history.location.pathname}),{matches:d,route:y}=Rt(u);Y=!0,P=d,Z={[y.id]:c}}else if(P&&!e.hydrationData&&pt(P,u,e.history.location.pathname).active&&(P=null),P)if(P.some(c=>c.route.lazy))Y=!1;else if(!P.some(c=>qt(c.route)))Y=!0;else{let c=e.hydrationData?e.hydrationData.loaderData:null,d=e.hydrationData?e.hydrationData.errors:null;if(d){let y=P.findIndex(E=>d[E.route.id]!==void 0);Y=P.slice(0,y+1).every(E=>!Wt(E.route,c,d))}else Y=P.every(y=>!Wt(y.route,c,d))}else{Y=!1,P=[];let c=pt(null,u,e.history.location.pathname);c.active&&c.matches&&(A=!0,P=c.matches)}let te,p={historyAction:e.history.action,location:e.history.location,matches:P,initialized:Y,navigation:zt,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||Z,fetchers:new Map,blockers:new Map},j="POP",B=null,re=!1,X,le=!1,we=new Map,ne=null,Q=!1,q=!1,ue=new Set,G=new Map,oe=0,fe=-1,f=new Map,R=new Set,$=new Map,T=new Map,z=new Set,H=new Map,J,de=null;function he(){if(w=e.history.listen(({action:c,location:d,delta:y})=>{if(J){J(),J=void 0;return}ie(H.size===0||y!=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 E=dr({currentLocation:p.location,nextLocation:d,historyAction:c});if(E&&y!=null){let b=new Promise(M=>{J=M});e.history.go(y*-1),mt(E,{state:"blocked",location:d,proceed(){mt(E,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),b.then(()=>e.history.go(y))},reset(){let M=new Map(p.blockers);M.set(E,et),me({blockers:M})}}),B?.resolve(),B=null;return}return je(c,d)}),r){io(t,we);let c=()=>lo(t,we);t.addEventListener("pagehide",c),ne=()=>t.removeEventListener("pagehide",c)}return p.initialized||je("POP",p.location,{initialHydration:!0}),te}function Tt(){w&&w(),ne&&ne(),g.clear(),X&&X.abort(),p.fetchers.forEach((c,d)=>Ot(d)),p.blockers.forEach((c,d)=>fr(d))}function Ln(c){return g.add(c),()=>g.delete(c)}function me(c,d={}){c.matches&&(c.matches=c.matches.map(b=>{let M=i[b.route.id],L=b.route;return L.element!==M.element||L.errorElement!==M.errorElement||L.hydrateFallbackElement!==M.hydrateFallbackElement?{...b,route:M}:b})),p={...p,...c};let y=[],E=[];p.fetchers.forEach((b,M)=>{b.state==="idle"&&(z.has(M)?y.push(M):E.push(M))}),z.forEach(b=>{!p.fetchers.has(b)&&!G.has(b)&&y.push(b)}),[...g].forEach(b=>b(p,{deletedFetchers:y,newErrors:c.errors??null,viewTransitionOpts:d.viewTransitionOpts,flushSync:d.flushSync===!0})),y.forEach(b=>Ot(b)),E.forEach(b=>p.fetchers.delete(b))}function Ve(c,d,{flushSync:y}={}){let E=p.actionData!=null&&p.navigation.formMethod!=null&&ve(p.navigation.formMethod)&&p.navigation.state==="loading"&&c.state?._isRedirect!==!0,b;d.actionData?Object.keys(d.actionData).length>0?b=d.actionData:b=null:E?b=p.actionData:b=null;let M=d.loaderData?jr(p.loaderData,d.loaderData,d.matches||[],d.errors):p.loaderData,L=p.blockers;L.size>
10&&(L=new Map(L),L.forEach((F,N)=>L.set(N,et)));let D=Q?!1:mr(c,d.matches||p.matches),O=re===!0||p.navigation.formMethod!=null&&ve(p.navigation.formMethod)&&c.state?._isRedirect!==!0;s&&(u=s,s=void 0),Q||j==="POP"||(j==="PUSH"?e.history.push(c,c.state):j==="REPLACE"&&e.history.replace(c,c.state));let U;if(j==="POP"){let F=we.get(p.location.pathname);F&&F.has(c.pathname)?U={currentLocation:p.location,nextLocation:c}:we.has(c.pathname)&&(U={currentLocation:c,nextLocation:p.location})}else if(le){let F=we.get(p.location.pathname);F?F.add(c.pathname):(F=new Set([c.pathname]),we.set(p.location.pathname,F)),U={currentLocation:p.location,nextLocation:c}}me({...d,actionData:b,loaderData:M,historyAction:j,location:c,initialized:!0,navigation:zt,revalidation:"idle",restoreScrollPosition:D,preventScrollReset:O,blockers:L},{viewTransitionOpts:U,flushSync:y===!0}),j="POP",re=!1,le=!1,Q=!1,q=!1,B?.resolve(),B=null,de?.resolve(),de=null}async function ar(c,d){if(B?.resolve(),B=null,typeof c=="number"){B||(B=Hr());let K=B.promise;return e.history.go(c),K}let y=Bt(p.location,p.matches,l,c,d?.fromRouteId,d?.relative),{path:E,submission:b,error:M}=Dr(!1,y,d),L=p.location,D=it(p.location,E,d&&d.state);D={...D,...e.history.encodeLocation(D)};let O=d&&d.replace!=null?d.replace:void 0,U="PUSH";O===!0?U="REPLACE":O===!1||b!=null&&ve(b.formMethod)&&b.formAction===p.location.pathname+p.location.search&&(U="REPLACE");let F=d&&"preventScrollReset"in d?d.preventScrollReset===!0:void 0,N=(d&&d.flushSync)===!0,V=dr({currentLocation:L,nextLocation:D,historyAction:U});if(V){mt(V,{state:"blocked",location:D,proceed(){mt(V,{state:"proceeding",proceed:void 0,reset:void 0,location:D}),ar(c,d)},reset(){let K=new Map(p.blockers);K.set(V,et),me({blockers:K})}});return}await je(U,D,{submission:b,pendingError:M,preventScrollReset:F,replace:d&&d.replace,enableViewTransition:d&&d.viewTransition,flushSync:N,callSiteDefaultShouldRevalidate:d&&d.unstable_defaultShouldRevalidate})}function Dn(){de||(de=Hr()),Mt(),me({revalidation:"loading"});let c=de.promise;return p.navigation.state==="submitting"?c:p.navigation.state==="idle"?(je(p.historyAction,p.location,{startUninterruptedRevalidation:!0}),c):(je(j||p.historyAction,p.navigation.location,{overrideNavigation:p.navigation,enableViewTransition:le===!0}),c)}async function je(c,d,y){X&&X.abort(),X=null,j=c,Q=(y&&y.startUninterruptedRevalidation)===!0,kn(p.location,p.matches),re=(y&&y.preventScrollReset)===!0,le=(y&&y.enableViewTransition)===!0;let E=s||u,b=y&&y.overrideNavigation,M=y?.initialHydration&&p.matches&&p.matches.length>0&&!A?p.matches:Ne(E,d,l),L=(y&&y.flushSync)===!0;if(M&&p.initialized&&!q&&Ja(p.location,d)&&!(y&&y.submission&&ve(y.submission.formMethod))){Ve(d,{matches:M},{flushSync:L});return}let D=pt(M,E,d.pathname);if(D.active&&D.matches&&(M=D.matches),!M){let{error:se,notFoundMatches:ge,route:ee}=$t(d.pathname);Ve(d,{matches:ge,loaderData:{},errors:{[ee.id]:se}},{flushSync:L});return}X=new AbortController;let O=Ge(e.history,d,X.signal,y&&y.submission),U=e.getContext?await e.getContext():new Cr,F;if(y&&y.pendingError)F=[Ae(M).route.id,{type:"error",error:y.pendingError}];else if(y&&y.submission&&ve(y.submission.formMethod)){let se=await Tn(O,d,y.submission,M,U,D.active,y&&y.initialHydration===!0,{replace:y.replace,flushSync:L});if(se.shortCircuited)return;if(se.pendingActionResult){let[ge,ee]=se.pendingActionResult;if(Re(ee)&&st(ee.error)&&ee.error.status===404){X=null,Ve(d,{matches:se.matches,loaderData:{},errors:{[ge]:ee.error}});return}}M=se.matches||M,F=se.pendingActionResult,b=kt(d,y.submission),L=!1,D.active=!1,O=Ge(e.history,O.url,O.signal)}let{shortCircuited:N,matches:V,loaderData:K,errors:ce}=await Mn(O,d,M,U,D.active,b,y&&y.submission,y&&y.fetcherSubmission,y&&y.replace,y&&y.initialHydration===!0,L,F,y&&y.callSiteDefaultShouldRevalidate);N||(X=null,Ve(d,{matches:V||M,...zr(F),loaderData:K,errors:ce}))}async function Tn(c,d,y,E,b,M,L,D={}){Mt();let O=ao(d,y);if(me({navigation:O},{flushSync:D.flushSync===!0}),M){let N=await yt(E,d.pathname,c.signal);if(N.type==="aborted")return{shortCircuited:!0};if(N.type==="error"){if(N.partialMatches.length===0){let{matches:K,route:ce}=Rt(u);return{matches:K,pendingActionResult:[ce.id,{type:"error",error:N.error}]}}let V=Ae(N.partialMatches).route.id;return{matches:N.partialMatches,pendingActionResult:[V,{type:"error",error:N.error}]}}else if(N.matches)E=N.matches;else{let{notFoundMatches:V,error:K,route:ce}=$t(d.pathname);return{matches:V,pendingActionResult:[ce.id,{type:"error",error:K}
1]}}}let U,F=Ct(E,d);if(!F.route.action&&!F.route.lazy)U={type:"error",error:be(405,{method:c.method,pathname:d.pathname,routeId:F.route.id})};else{let N=Je(o,i,c,E,F,L?[]:n,b),V=await Xe(c,N,b,null);if(U=V[F.route.id],!U){for(let K of E)if(V[K.route.id]){U=V[K.route.id];break}}if(c.signal.aborted)return{shortCircuited:!0}}if(Be(U)){let N;return D&&D.replace!=null?N=D.replace:N=Ar(U.response.headers.get("Location"),new URL(c.url),l,e.history)===p.location.pathname+p.location.search,await ze(c,U,!0,{submission:y,replace:N}),{shortCircuited:!0}}if(Re(U)){let N=Ae(E,F.route.id);return(D&&D.replace)!==!0&&(j="PUSH"),{matches:E,pendingActionResult:[N.route.id,U,F.route.id]}}return{matches:E,pendingActionResult:[F.route.id,U]}}async function Mn(c,d,y,E,b,M,L,D,O,U,F,N,V){let K=M||kt(d,L),ce=L||D||Ir(K),se=!Q&&!U;if(b){if(se){let pe=or(N);me({navigation:K,...pe!==void 0?{actionData:pe}:{}},{flushSync:F})}let W=await yt(y,d.pathname,c.signal);if(W.type==="aborted")return{shortCircuited:!0};if(W.type==="error"){if(W.partialMatches.length===0){let{matches:Ke,route:He}=Rt(u);return{matches:Ke,loaderData:{},errors:{[He.id]:W.error}}}let pe=Ae(W.partialMatches).route.id;return{matches:W.partialMatches,loaderData:{},errors:{[pe]:W.error}}}else if(W.matches)y=W.matches;else{let{error:pe,notFoundMatches:Ke,route:He}=$t(d.pathname);return{matches:Ke,loaderData:{},errors:{[He.id]:pe}}}}let ge=s||u,{dsMatches:ee,revalidatingFetchers:Ee}=Tr(c,E,o,i,e.history,p,y,ce,d,U?[]:n,U===!0,q,ue,z,$,R,ge,l,e.patchRoutesOnNavigation!=null,N,V);if(fe=++oe,!e.dataStrategy&&!ee.some(W=>W.shouldLoad)&&!ee.some(W=>W.route.middleware&&W.route.middleware.length>0)&&Ee.length===0){let W=ur();return Ve(d,{matches:y,loaderData:{},errors:N&&Re(N[1])?{[N[0]]:N[1].error}:null,...zr(N),...W?{fetchers:new Map(p.fetchers)}:{}},{flushSync:F}),{shortCircuited:!0}}if(se){let W={};if(!b){W.navigation=K;let pe=or(N);pe!==void 0&&(W.actionData=pe)}Ee.length>0&&(W.fetchers=On(Ee)),me(W,{flushSync:F})}Ee.forEach(W=>{Me(W.key),W.controller&&G.set(W.key,W.controller)});let ke=()=>Ee.forEach(W=>Me(W.key));X&&X.signal.addEventListener("abort",ke);let{loaderResults:Qe,fetcherResults:$e}=await ir(ee,Ee,c,E);if(c.signal.aborted)return{shortCircuited:!0};X&&X.signal.removeEventListener("abort",ke),Ee.forEach(W=>G.delete(W.key));let xe=Et(Qe);if(xe)return await ze(c,xe.result,!0,{replace:O}),{shortCircuited:!0};if(xe=Et($e),xe)return R.add(xe.key),await ze(c,xe.result,!0,{replace:O}),{shortCircuited:!0};let{loaderData:Nt,errors:Ze}=Fr(p,y,Qe,N,Ee,$e);U&&p.errors&&(Ze={...p.errors,...Ze});let Ie=ur(),vt=cr(fe),gt=Ie||vt||Ee.length>0;return{matches:y,loaderData:Nt,errors:Ze,...gt?{fetchers:new Map(p.fetchers)}:{}}}function or(c){if(c&&!Re(c[1]))return{[c[0]]:c[1].data};if(p.actionData)return Object.keys(p.actionData).length===0?null:p.actionData}function On(c){return c.forEach(d=>{let y=p.fetchers.get(d.key),E=tt(void 0,y?y.data:void 0);p.fetchers.set(d.key,E)}),new Map(p.fetchers)}async function $n(c,d,y,E){Me(c);let b=(E&&E.flushSync)===!0,M=s||u,L=Bt(p.location,p.matches,l,y,d,E?.relative),D=Ne(M,L,l),O=pt(D,M,L);if(O.active&&O.matches&&(D=O.matches),!D){Te(c,d,be(404,{pathname:L}),{flushSync:b});return}let{path:U,submission:F,error:N}=Dr(!0,L,E);if(N){Te(c,d,N,{flushSync:b});return}let V=e.getContext?await e.getContext():new Cr,K=(E&&E.preventScrollReset)===!0;if(F&&ve(F.formMethod)){await Nn(c,d,U,D,V,O.active,b,K,F,E&&E.unstable_defaultShouldRevalidate);return}$.set(c,{routeId:d,path:U}),await An(c,d,U,D,V,O.active,b,K,F)}async function Nn(c,d,y,E,b,M,L,D,O,U){Mt(),$.delete(c);let F=p.fetchers.get(c);De(c,oo(O,F),{flushSync:L});let N=new AbortController,V=Ge(e.history,y,N.signal,O);if(M){let ae=await yt(E,new URL(V.url).pathname,V.signal,c);if(ae.type==="aborted")return;if(ae.type==="error"){Te(c,d,ae.error,{flushSync:L});return}else if(ae.matches)E=ae.matches;else{Te(c,d,be(404,{pathname:y}),{flushSync:L});return}}let K=Ct(E,y);if(!K.route.action&&!K.route.lazy){let ae=be(405,{method:O.formMethod,pathname:y,routeId:d});Te(c,d,ae,{flushSync:L});return}G.set(c,N);let ce=oe,se=Je(o,i,V,E,K,n,b),ge=await Xe(V,se,b,c),ee=ge[K.route.id];if(!ee){for(let ae of se)if(ge[ae.route.id]){ee=ge[ae.route.id];break}}if(V.signal.aborted){G.get(c)===N&&G.delete(c);return}
1if(z.has(c)){if(Be(ee)||Re(ee)){De(c,Oe(void 0));return}}else{if(Be(ee))if(G.delete(c),fe>ce){De(c,Oe(void 0));return}else return R.add(c),De(c,tt(O)),ze(V,ee,!1,{fetcherSubmission:O,preventScrollReset:D});if(Re(ee)){Te(c,d,ee.error);return}}let Ee=p.navigation.location||p.location,ke=Ge(e.history,Ee,N.signal),Qe=s||u,$e=p.navigation.state!=="idle"?Ne(Qe,p.navigation.location,l):p.matches;I($e,"Didn't find any matches after fetcher action");let xe=++oe;f.set(c,xe);let Nt=tt(O,ee.data);p.fetchers.set(c,Nt);let{dsMatches:Ze,revalidatingFetchers:Ie}=Tr(ke,b,o,i,e.history,p,$e,O,Ee,n,!1,q,ue,z,$,R,Qe,l,e.patchRoutesOnNavigation!=null,[K.route.id,ee],U);Ie.filter(ae=>ae.key!==c).forEach(ae=>{let wt=ae.key,yr=p.fetchers.get(wt),Bn=tt(void 0,yr?yr.data:void 0);p.fetchers.set(wt,Bn),Me(wt),ae.controller&&G.set(wt,ae.controller)}),me({fetchers:new Map(p.fetchers)});let vt=()=>Ie.forEach(ae=>Me(ae.key));N.signal.addEventListener("abort",vt);let{loaderResults:gt,fetcherResults:W}=await ir(Ze,Ie,ke,b);if(N.signal.aborted)return;if(N.signal.removeEventListener("abort",vt),f.delete(c),G.delete(c),Ie.forEach(ae=>G.delete(ae.key)),p.fetchers.has(c)){let ae=Oe(ee.data);p.fetchers.set(c,ae)}let pe=Et(gt);if(pe)return ze(ke,pe.result,!1,{preventScrollReset:D});if(pe=Et(W),pe)return R.add(pe.key),ze(ke,pe.result,!1,{preventScrollReset:D});let{loaderData:Ke,errors:He}=Fr(p,$e,gt,void 0,Ie,W);cr(xe),p.navigation.state==="loading"&&xe>fe?(I(j,"Expected pending action"),X&&X.abort(),Ve(p.navigation.location,{matches:$e,loaderData:Ke,errors:He,fetchers:new Map(p.fetchers)})):(me({errors:He,loaderData:jr(p.loaderData,Ke,$e,He),fetchers:new Map(p.fetchers)}),q=!1)}async function An(c,d,y,E,b,M,L,D,O){let U=p.fetchers.get(c);De(c,tt(O,U?U.data:void 0),{flushSync:L});let F=new AbortController,N=Ge(e.history,y,F.signal);if(M){let ee=await yt(E,new URL(N.url).pathname,N.signal,c);if(ee.type==="aborted")return;if(ee.type==="error"){Te(c,d,ee.error,{flushSync:L});return}else if(ee.matches)E=ee.matches;else{Te(c,d,be(404,{pathname:y}),{flushSync:L});return}}let V=Ct(E,y);G.set(c,F);let K=oe,ce=Je(o,i,N,E,V,n,b),ge=(await Xe(N,ce,b,c))[V.route.id];if(G.get(c)===F&&G.delete(c),!N.signal.aborted){if(z.has(c)){De(c,Oe(void 0));return}if(Be(ge))if(fe>K){De(c,Oe(void 0));return}else{R.add(c),await ze(N,ge,!1,{preventScrollReset:D});return}if(Re(ge)){Te(c,d,ge.error);return}De(c,Oe(ge.data))}}async function ze(c,d,y,{submission:E,fetcherSubmission:b,preventScrollReset:M,replace:L}={}){y||(B?.resolve(),B=null),d.response.headers.has("X-Remix-Revalidate")&&(q=!0);let D=d.response.headers.get("Location");I(D,"Expected a Location header on the redirect Response"),D=Ar(D,new URL(c.url),l,e.history);let O=it(p.location,D,{_isRedirect:!0});if(r){let ce=!1;
1if(d.response.headers.has("X-Remix-Reload-Document"))ce=!0;else if(_t(D)){const se=Xr(D,!0);ce=se.origin!==t.location.origin||Ce(se.pathname,l)==null}if(ce){L?t.location.replace(D):t.location.assign(D);return}}X=null;let U=L===!0||d.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:F,formAction:N,formEncType:V}=p.navigation;!E&&!b&&F&&N&&V&&(E=Ir(p.navigation));let K=E||b;if(Na.has(d.response.status)&&K&&ve(K.formMethod))await je(U,O,{submission:{...K,formAction:D},preventScrollReset:M||re,enableViewTransition:y?le:void 0});else{let ce=kt(O,E);await je(U,O,{overrideNavigation:ce,fetcherSubmission:b,preventScrollReset:M||re,enableViewTransition:y?le:void 0})}}async function Xe(c,d,y,E){let b,M={};try{b=await Wa(h,c,d,E,y,!1)}catch(L){return d.filter(D=>D.shouldLoad).forEach(D=>{M[D.route.id]={type:"error",error:L}}),M}if(c.signal.aborted)return M;if(!ve(c.method))for(let L of d){if(b[L.route.id]?.type==="error")break;!b.hasOwnProperty(L.route.id)&&!p.loaderData.hasOwnProperty(L.route.id)&&(!p.errors||!p.errors.hasOwnProperty(L.route.id))&&L.shouldCallHandler()&&(b[L.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${L.route.id}`)})}for(let[L,D]of Object.entries(b))if(eo(D)){let O=D.result;M[L]={type:"redirect",response:Ga(O,c,L,d,l)}}else M[L]=await Ka(D);return M}async function ir(c,d,y,E){let b=Xe(y,c,E,null),M=Promise.all(d.map(async O=>{if(O.matches&&O.match&&O.request&&O.controller){let F=(await Xe(O.request,O.matches,E,O.key))[O.match.route.id];return{[O.key]:F}}else return Promise.resolve({[O.key]:{type:"error",error:be(404,{pathname:O.path})}})})),L=await b,D=(await M).reduce((O,U)=>Object.assign(O,U),{});return{loaderResults:L,fetcherResults:D}}function Mt(){q=!0,$.forEach((c,d)=>{G.has(d)&&ue.add(d),Me(d)})}function De(c,d,y={}){p.fetchers.set(c,d),me({fetchers:new Map(p.fetchers)},{flushSync:(y&&y.flushSync)===!0})}function Te(c,d,y,E={}){let b=Ae(p.matches,d);Ot(c),me({errors:{[b.route.id]:y},fetchers:new Map(p.fetchers)},{flushSync:(E&&E.flushSync)===!0})}function lr(c){return T.set(c,(T.get(c)||0)+1),z.has(c)&&z.delete(c),p.fetchers.get(c)||Aa}function Un(c,d){Me(c,d?.reason),De(c,Oe(null))}function Ot(c){let d=p.fetchers.get(c);G.has(c)&&!(d&&d.state==="loading"&&f.has(c))&&Me(c),$.delete(c),f.delete(c),R.delete(c),z.delete(c),ue.delete(c),p.fetchers.delete(c)}function Fn(c){let d=(T.get(c)||0)-1;d<=0?(T.delete(c),z.add(c)):T.set(c,d),me({fetchers:new Map(p.fetchers)})}function Me(c,d){let y=G.get(c);y&&(y.abort(d),G.delete(c))}function sr(c){for(let d of c){let y=lr(d),E=Oe(y.data);p.fetchers.set(d,E)}}function ur(){let c=[],d=!1;for(let y of R){let E=p.fetchers.get(y);I(E,`Expected fetcher: ${y}`),E.state==="loading"&&(R.delete(y),c.push(y),d=!0)}return sr(c),d}function cr(c){let d=[];for(let[y,E]of f)if(E<c){let b=p.fetchers.get(y);I(b,`Expected fetcher: ${y}`),b.state==="loading"&&(Me(y),f.delete(y),d.push(y))}return sr(d),d.length>0}function jn(c,d){let y=p.blockers.get(c)||et;return H.get(c)!==d&&H.set(c,d),y}function fr(c){p.blockers.delete(c),H.delete(c)}function mt(c,d){let y=p.blockers.get(c)||et;I(y.state==="unblocked"&&d.state==="blocked"||y.state==="blocked"&&d.state==="blocked"||y.state==="blocked"&&d.state==="proceeding"||y.state==="blocked"&&d.state==="unblocked"||y.state==="proceeding"&&d.state==="unblocked",`Invalid blocker state transition: ${y.state} -> ${d.state}`);let E=new Map(p.blockers);E.set(c,d),me({blockers:E})}function dr({currentLocation:c,nextLocation:d,historyAction:y}){if(H.size===0)return;H.size>1&&ie(!1,"A router only supports one blocker at a time");let E=Array.from(H.entries()),[b,M]=E[E.length-1],L=p.blockers.get(b);if(!(L&&L.state==="proceeding")&&M({currentLocation:c,nextLocation:d,historyAction:y}))return b}function $t(c){let d=be(404,{pathname:c}),y=s||u,{matches:E,route:b}=Rt(y);return{notFoundMatches:E,route:b,error:d}}function zn(c,d,y){if(C=c,x=d,S=y||null,!_&&p.navigation===zt){_=!0;let E=mr(p.location,p.matches);E!=null&&me({restoreScrollPosition:E})}return()=>{C=null,x=null,S=null}}function hr(c,d){return S&&S(c,d.map(E=>la(E,p.loaderData)))||c.key}function kn(c,d){if(C&&x){let y=hr(c,d);C[y]=x()}}function mr(c,d){if(C){let y=hr(c,d),E=C[y];if(typeof E=="number")return E}return null}
1function pt(c,d,y){if(e.patchRoutesOnNavigation)if(c){if(Object.keys(c[0].params).length>0)return{active:!0,matches:at(d,y,l,!0)}}else return{active:!0,matches:at(d,y,l,!0)||[]};return{active:!1,matches:null}}async function yt(c,d,y,E){if(!e.patchRoutesOnNavigation)return{type:"success",matches:c};let b=c;for(;;){let M=s==null,L=s||u,D=i;try{await e.patchRoutesOnNavigation({signal:y,path:d,matches:b,fetcherKey:E,patch:(F,N)=>{y.aborted||Mr(F,N,L,D,o,!1)}})}catch(F){return{type:"error",error:F,partialMatches:b}}finally{M&&!y.aborted&&(u=[...u])}if(y.aborted)return{type:"aborted"};let O=Ne(L,d,l),U=null;if(O){if(Object.keys(O[0].params).length===0)return{type:"success",matches:O};if(U=at(L,d,l,!0),!(U&&b.length<U.length&&pr(b,U.slice(0,b.length))))return{type:"success",matches:O}}if(U||(U=at(L,d,l,!0)),!U||pr(b,U))return{type:"success",matches:null};b=U}}function pr(c,d){return c.length===d.length&&c.every((y,E)=>y.route.id===d[E].route.id)}function In(c){i={},s=lt(c,o,void 0,i)}function Hn(c,d,y=!1){let E=s==null;Mr(c,d,s||u,i,o,y),E&&(u=[...u],me({}))}return te={get basename(){return l},get future(){return m},get state(){return p},get routes(){return u},get window(){return t},initialize:he,subscribe:Ln,enableScrollRestoration:zn,navigate:ar,fetch:$n,revalidate:Dn,createHref:c=>e.history.createHref(c),encodeLocation:c=>e.history.encodeLocation(c),getFetcher:lr,resetFetcher:Un,deleteFetcher:Fn,dispose:Tt,getBlocker:jn,deleteBlocker:fr,patchRoutes:Hn,_internalFetchControllers:G,_internalSetRoutes:In,_internalSetStateDoNotUseOrYouWillBreakYourApp(c){me(c)}},e.unstable_instrumentations&&(te=xa(te,e.unstable_instrumentations.map(c=>c.router).filter(Boolean))),te}function ja(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function Bt(e,t,r,n,a,o){let i,u;if(a){i=[];for(let l of t)if(i.push(l),l.route.id===a){u=l;break}}else i=t,u=t[t.length-1];let s=Gt(n||".",Kt(i),Ce(e.pathname,r)||e.pathname,o==="path");if(n==null&&(s.search=e.search,s.hash=e.hash),(n==null||n===""||n===".")&&u){let l=Xt(s.search);if(u.route.index&&!l)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!u.route.index&&l){let h=new URLSearchParams(s.search),m=h.getAll("index");h.delete("index"),m.filter(g=>g).forEach(g=>h.append("index",g));let w=h.toString();s.search=w?`?${w}`:""}}return r!=="/"&&(s.pathname=Ra({basename:r,pathname:s.pathname})),Le(s)}function Dr(e,t,r){if(!r||!ja(r))return{path:t};if(r.formMethod&&!no(r.formMethod))return{path:t,error:be(405,{method:r.formMethod})};let n=()=>({path:t,error:be(400,{type:"invalid-body"})}),o=(r.formMethod||"get").toUpperCase(),i=pn(t);
1if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!ve(o))return n();let m=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((w,[g,C])=>`${w}${g}=${C} 2`,""):String(r.body);return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:void 0,text:m}}}else if(r.formEncType==="application/json"){if(!ve(o))return n();try{let m=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:o,formAction:i,formEncType:r.formEncType,formData:void 0,json:m,text:void 0}}}catch{return n()}}}I(typeof FormData=="function","FormData is not available in this environment");let u,s;if(r.formData)u=Vt(r.formData),s=r.formData;else if(r.body instanceof FormData)u=Vt(r.body),s=r.body;else if(r.body instanceof URLSearchParams)u=r.body,s=Ur(u);else if(r.body==null)u=new URLSearchParams,s=new FormData;else try{u=new URLSearchParams(r.body),s=Ur(u)}catch{return n()}let l={formMethod:o,formAction:i,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:s,json:void 0,text:void 0};if(ve(l.formMethod))return{path:t,submission:l};let h=Fe(t);return e&&h.search&&Xt(h.search)&&u.append("index",""),h.search=`?${u}`,{path:Le(h),submission:l}}function Tr(e,t,r,n,a,o,i,u,s,l,h,m,w,g,C,S,x,_,P,A,Z){let Y=A?Re(A[1])?A[1].error:A[1].data:void 0,te=a.createURL(o.location),p=a.createURL(s),j;if(h&&o.errors){let Q=Object.keys(o.errors)[0];j=i.findIndex(q=>q.route.id===Q)}else if(A&&Re(A[1])){let Q=A[0];j=i.findIndex(q=>q.route.id===Q)-1}let B=A?A[1].statusCode:void 0,re=B&&B>=400,X={currentUrl:te,currentParams:o.matches[0]?.params||{},nextUrl:p,nextParams:i[0].params,...u,actionResult:Y,actionStatus:B},le=ct(i),we=i.map((Q,q)=>{let{route:ue}=Q,G=null;if(j!=null&&q>j?G=!1:ue.lazy?G=!0:qt(ue)?h?G=Wt(ue,o.loaderData,o.errors):za(o.loaderData,o.matches[q],Q)&&(G=!0):G=!1,G!==null)return Yt(r,n,e,le,Q,l,t,G);let oe=!1;typeof Z=="boolean"?oe=Z:re?oe=!1:(m||te.pathname+te.search===p.pathname+p.search||te.search!==p.search||ka(o.matches[q],Q))&&(oe=!0);let fe={...X,defaultShouldRevalidate:oe},f=ot(Q,fe);return Yt(r,n,e,le,Q,l,t,f,fe,Z)}),ne=[];
2return C.forEach((Q,q)=>{if(h||!i.some(T=>T.route.id===Q.routeId)||g.has(q))return;let ue=o.fetchers.get(q),G=ue&&ue.state!=="idle"&&ue.data===void 0,oe=Ne(x,Q.path,_);if(!oe){if(P&&G)return;ne.push({key:q,routeId:Q.routeId,path:Q.path,matches:null,match:null,request:null,controller:null});return}if(S.has(q))return;let fe=Ct(oe,Q.path),f=new AbortController,R=Ge(a,Q.path,f.signal),$=null;if(w.has(q))w.delete(q),$=Je(r,n,R,oe,fe,l,t);else if(G)m&&($=Je(r,n,R,oe,fe,l,t));else{let T;typeof Z=="boolean"?T=Z:re?T=!1:T=m;let z={...X,defaultShouldRevalidate:T};ot(fe,z)&&($=Je(r,n,R,oe,fe,l,t,z))}$&&ne.push({key:q,routeId:Q.routeId,path:Q.path,matches:$,match:fe,request:R,controller:f})}),{dsMatches:we,revalidatingFetchers:ne}}function qt(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function Wt(e,t,r){if(e.lazy)return!0;if(!qt(e))return!1;let n=t!=null&&e.id in t,a=r!=null&&r[e.id]!==void 0;return!n&&a?!1:typeof e.loader=="function"&&e.loader.hydrate===!0?!0:!n&&!a}function za(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a}function ka(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}function ot(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}function Mr(e,t,r,n,a,o){let i;if(e){let l=n[e];I(l,`No route found to patch children into: routeId = ${e}`),l.children||(l.children=[]),i=l.children}else i=r;let u=[],s=[];if(t.forEach(l=>{let h=i.find(m=>cn(l,m));h?s.push({existingRoute:h,newRoute:l}):u.push(l)}),u.length>0){let l=lt(u,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...l)}if(o&&s.length>0)for(let l=0;l<s.length;l++){let{existingRoute:h,newRoute:m}=s[l],w=h,[g]=lt([m],a,[],{},!0);Object.assign(w,{element:g.element?g.element:w.element,errorElement:g.errorElement?g.errorElement:w.errorElement,hydrateFallbackElement:g.hydrateFallbackElement?g.hydrateFallbackElement:w.hydrateFallbackElement})}}function cn(e,t){return"id"in e&&"id"in t&&e.id===t.id?!0:e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive?(!e.children||e.children.length===0)&&(!t.children||t.children.length===0)?!0:e.children.every((r,n)=>t.children?.some(a=>cn(r,a))):!1}var Or=new WeakMap,fn=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(I(a,"No route found in manifest"),!a.lazy||typeof a.lazy!="object")return;let o=a.lazy[e];if(!o)return;let i=Or.get(a);i||(i={},Or.set(a,i));let u=i[e];if(u)return u;let s=(async()=>{let l=na(e),m=a[e]!==void 0&&e!=="hasErrorBoundary";if(l)ie(!l,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(m)ie(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let w=await o();w!=null&&(Object.assign(a,{[e]:w}),Object.assign(a,n(a)))}typeof a.lazy=="object"&&(a.lazy[e]=void 0,Object.values(a.lazy).every(w=>w===void 0)&&(a.lazy=void 0))})();return i[e]=s,s},$r=new WeakMap;function Ia(e,t,r,n,a){let o=r[e.id];if(I(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let h=$r.get(o);if(h)return{lazyRoutePromise:h,lazyHandlerPromise:h};let m=(async()=>{I(typeof e.lazy=="function","No lazy route function found");let w=await e.lazy(),g={};for(let C in w){let S=w[C];if(S===void 0)continue;let x=oa(C),P=o[C]!==void 0&&C!=="hasErrorBoundary";x?ie(!x,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):P?ie(!P,`Route "${o.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):g[C]=S}Object.assign(o,g),Object.assign(o,{...n(o),lazy:void 0})})();return $r.set(o,m),m.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:m}}let i=Object.keys(e.lazy),u=[],s;for(let h of i){if(a&&a.includes(h))continue;let m=fn({key:h,route:e,manifest:r,mapRouteProperties:n});m&&(u.push(m),h===t&&(s=m))}let l=u.length>0?Promise.all(u).then(()=>{}):void 0;return l?.catch(()=>{}),s?.catch(()=>{}),{lazyRoutePromise:l,lazyHandlerPromise:s}}async function Nr(e){let t=e.matches.filter(a=>a.shouldLoad),r={};return(await Promise.all(t.map(a=>
2a.resolve()))).forEach((a,o)=>{r[t[o].route.id]=a}),r}async function Ha(e){return e.matches.some(t=>t.route.middleware)?dn(e,()=>Nr(e)):Nr(e)}function dn(e,t){return Ba(e,t,n=>{if(ro(n))throw n;return n},Qa,r);function r(n,a,o){if(o)return Promise.resolve(Object.assign(o.value,{[a]:{type:"error",result:n}}));{let{matches:i}=e,u=Math.min(Math.max(i.findIndex(l=>l.route.id===a),0),Math.max(i.findIndex(l=>l.shouldCallHandler()),0)),s=Ae(i,i[u].route.id).route.id;return Promise.resolve({[s]:{type:"error",result:n}})}}}async function Ba(e,t,r,n,a){let{matches:o,request:i,params:u,context:s,unstable_pattern:l}=e,h=o.flatMap(w=>w.route.middleware?w.route.middleware.map(g=>[w.route.id,g]):[]);return await hn({request:i,params:u,context:s,unstable_pattern:l},h,t,r,n,a)}async function hn(e,t,r,n,a,o,i=0){let{request:u}=e;if(u.signal.aborted)throw u.signal.reason??new Error(`Request aborted: ${u.method} ${u.url}`);let s=t[i];if(!s)return await r();let[l,h]=s,m,w=async()=>{if(m)throw new Error("You may only call `next()` once per middleware");try{return m={value:await hn(e,t,r,n,a,o,i+1)},m.value}catch(g){return m={value:await o(g,l,m)},m.value}};try{let g=await h(e,w),C=g!=null?n(g):void 0;return a(C)?C:m?C??m.value:(m={value:await w()},m.value)}catch(g){return await o(g,l,m)}}function mn(e,t,r,n,a){let o=fn({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=Ia(n.route,ve(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function Yt(e,t,r,n,a,o,i,u,s=null,l){let h=!1,m=mn(e,t,r,a,o);return{...a,_lazyPromises:m,shouldLoad:u,shouldRevalidateArgs:s,shouldCallHandler(w){return h=!0,s?typeof l=="boolean"?ot(a,{...s,defaultShouldRevalidate:l}):typeof w=="boolean"?ot(a,{...s,defaultShouldRevalidate:w}):ot(a,s):u},resolve(w){let{lazy:g,loader:C,middleware:S}=a.route,x=h||u||w&&!ve(r.method)&&(g||C),_=S&&S.length>0&&!C&&!g;return x&&(ve(r.method)||!_)?Ya({request:r,unstable_pattern:n,match:a,lazyHandlerPromise:m?.handler,lazyRoutePromise:m?.route,handlerOverride:w,scopedContext:i}):Promise.resolve({type:"data",result:void 0})}}}function Je(e,t,r,n,a,o,i,u=null){return n.map(s=>s.route.id!==a.route.id?{...s,shouldLoad:!1,shouldRevalidateArgs:u,shouldCallHandler:()=>!1,_lazyPromises:mn(e,t,r,s,o),resolve:()=>Promise.resolve({type:"data",result:void 0})}:Yt(e,t,r,ct(n),s,o,i,!0,u))}async function Wa(e,t,r,n,a,o){r.some(l=>l._lazyPromises?.middleware)&&await Promise.all(r.map(l=>l._lazyPromises?.middleware));let i={request:t,unstable_pattern:ct(r),params:r[0].params,context:a,matches:r},s=await e({...i,fetcherKey:n,runClientMiddleware:l=>{let h=i;return dn(h,()=>l({...h,fetcherKey:n,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(r.flatMap(l=>[l._lazyPromises?.handler,l._lazyPromises?.route]))}catch{}return s}async function Ya({request:e,unstable_pattern:t,match:r,lazyHandlerPromise:n,lazyRoutePromise:a,handlerOverride:o,scopedContext:i}){let u,s,l=ve(e.method),h=l?"action":"loader",m=w=>{let g,C=new Promise((_,P)=>g=P);s=()=>g(),e.signal.addEventListener("abort",s);let S=_=>typeof w!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${h}" [routeId: ${r.route.id}]`)):w({request:e,unstable_pattern:t,params:r.params,context:i},..._!==void 0?[_]:[]),x=(async()=>{try{return{type:"data",result:await(o?o(P=>S(P)):S())}}catch(_){return{type:"error",result:_}}})();return Promise.race([x,C])};try{let w=l?r.route.action:r.route.loader;if(n||a)if(w){let g,[C]=await Promise.all([m(w).catch(S=>{g=S}),n,a]);if(g!==void 0)throw g;u=C}else{await n;let g=l?r.route.action:r.route.loader;if(g)[u]=await Promise.all([m(g),a]);else if(h==="action"){let C=new URL(e.url),S=C.pathname+C.search;throw be(405,{method:e.method,pathname:S,routeId:r.route.id})}else return{type:"data",result:void 0}}else if(w)u=await m(w);else{let g=new URL(e.url),C=g.pathname+g.search;throw be(404,{pathname:C})}}catch(w){return{type:"error",result:w}}finally{s&&e.signal.removeEventListener("abort",s)}return u}async function Va(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Ka(e){let{result:t,type:r}=e;if(Jt(t)){let n;try{n=await Va(t)}catch(a){return{type:"error",error:a}}
2return r==="error"?{type:"error",error:new ut(t.status,t.statusText,n),statusCode:t.status,headers:t.headers}:{type:"data",data:n,statusCode:t.status,headers:t.headers}}return r==="error"?kr(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Xa(t),statusCode:st(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:st(t)?t.status:void 0}:kr(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Ga(e,t,r,n,a){let o=e.headers.get("Location");if(I(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!_t(o)){let i=n.slice(0,n.findIndex(u=>u.route.id===r)+1);o=Bt(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}function Ar(e,t,r,n){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(_t(e)){let o=e,i=o.startsWith("//")?new URL(t.protocol+o):new URL(o);if(a.includes(i.protocol))throw new Error("Invalid redirect location");let u=Ce(i.pathname,r)!=null;if(i.origin===t.origin&&u)return i.pathname+i.search+i.hash}try{let o=n.createURL(e);if(a.includes(o.protocol))throw new Error("Invalid redirect location")}catch{}return e}function Ge(e,t,r,n){let a=e.createURL(pn(t)).toString(),o={signal:r};if(n&&ve(n.formMethod)){let{formMethod:i,formEncType:u}=n;o.method=i.toUpperCase(),u==="application/json"?(o.headers=new Headers({"Content-Type":u}),o.body=JSON.stringify(n.json)):u==="text/plain"?o.body=n.text:u==="application/x-www-form-urlencoded"&&n.formData?o.body=Vt(n.formData):o.body=n.formData}return new Request(a,o)}function Vt(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,typeof n=="string"?n:n.name);return t}function Ur(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function qa(e,t,r,n=!1,a=!1){let o={},i=null,u,s=!1,l={},h=r&&Re(r[1])?r[1].error:void 0;return e.forEach(m=>{if(!(m.route.id in t))return;let w=m.route.id,g=t[w];if(I(!Be(g),"Cannot handle redirect results in processLoaderData"),Re(g)){let C=g.error;if(h!==void 0&&(C=h,h=void 0),i=i||{},a)i[w]=C;else{let S=Ae(e,w);i[S.route.id]==null&&(i[S.route.id]=C)}n||(o[w]=un),s||(s=!0,u=st(g.error)?g.error.status:500),g.headers&&(l[w]=g.headers)}else o[w]=g.data,g.statusCode&&g.statusCode!==200&&!s&&(u=g.statusCode),g.headers&&(l[w]=g.headers)}),h!==void 0&&r&&(i={[r[0]]:h},r[2]&&(o[r[2]]=void 0)),{loaderData:o,errors:i,statusCode:u||200,loaderHeaders:l}}function Fr(e,t,r,n,a,o){let{loaderData:i,errors:u}=qa(t,r,n);return a.filter(s=>!s.matches||s.matches.some(l=>l.shouldLoad)).forEach(s=>{let{key:l,match:h,controller:m}=s;if(m&&m.signal.aborted)return;let w=o[l];if(I(w,"Did not find corresponding fetcher result"),Re(w)){let g=Ae(e.matches,h?.route.id);u&&u[g.route.id]||(u={...u,[g.route.id]:w.error}),e.fetchers.delete(l)}else if(Be(w))I(!1,"Unhandled fetcher revalidation redirect");else{let g=Oe(w.data);e.fetchers.set(l,g)}}),{loaderData:i,errors:u}}function jr(e,t,r,n){let a=Object.entries(t).filter(([,o])=>o!==un).reduce((o,[i,u])=>(o[i]=u,o),{});for(let o of r){let i=o.route.id;if(!t.hasOwnProperty(i)&&e.hasOwnProperty(i)&&o.route.loader&&(a[i]=e[i]),n&&n.hasOwnProperty(i))break}return a}function zr(e){return e?Re(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ae(e,t){return(t?e.slice(0,e.findIndex(n=>n.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}function Rt(e){let t=e.length===1?e[0]:e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function be(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",u="Unknown @remix-run/router error";return e===400?(i="Bad Request",n&&t&&r?u=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:a==="invalid-body"&&(u="Unable to encode submission body")):e===403?(i="Forbidden",u=`Route "${r}" does not match URL "${t}"`):e===404?(i="Not Found",u=`No route matches URL "${t}"`):e===405&&(i="Method Not Allowed",n&&t&&r?u=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(u=`Invalid request method "${n.toUpperCase()}"`)),new ut(e||500,i,new Error(u),!0)}function Et(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[n,a]=t[r];if(Be(a))return{key:n,result:a}}}function pn(e){let t=typeof e=="string"?Fe(e):e;return Le({...t,hash:""})}function Ja(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Xa(e){return new ut(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Qa(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,r])=>typeof t=="string"&&Za(r))}function Za(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function eo(e){return Jt(e.result)&&ln.has(e.result.status)}function Re(e){return e.type==="error"}function Be(e){return(e&&e.type)==="redirect"}function kr(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Jt(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function to(e){return ln.has(e)}function ro(e){return Jt(e)&&to(e.status)&&e.headers.has("Location")}function no(e){return $a.has(e.toUpperCase())}function ve(e){return Ma.has(e.toUpperCase())}function Xt(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ct(e,t){let r=typeof t=="string"?Fe(t).search:t.search;if(e[e.length-1].route.index&&Xt(r||""))return e[e.length-1];let n=tn(e);return n[n.length-1]}function Ir(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;
2if(!(!t||!r||!n)){if(a!=null)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a};if(o!=null)return{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0};if(i!==void 0)return{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}}}function kt(e,t){return t?{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}:{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function ao(e,t){return{state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}function tt(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function oo(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function Oe(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function io(e,t){try{let r=e.sessionStorage.getItem(sn);if(r){let n=JSON.parse(r);for(let[a,o]of Object.entries(n||{}))o&&Array.isArray(o)&&t.set(a,new Set(o||[]))}}catch{}}function lo(e,t){if(t.size>0){let r={};for(let[n,a]of t)r[n]=[...a];try{e.sessionStorage.setItem(sn,JSON.stringify(r))}catch(n){ie(!1,`Failed to save applied view transitions in sessionStorage (${n}).`)}}}function Hr(){let e,t,r=new Promise((n,a)=>{e=async o=>{n(o);try{await r}catch{}},t=async o=>{a(o);try{await r}catch{}}});return{promise:r,resolve:e,reject:t}}var We=v.createContext(null);We.displayName="DataRouter";var ft=v.createContext(null);ft.displayName="DataRouterState";var yn=v.createContext(!1);function so(){return v.useContext(yn)}var Qt=v.createContext({isTransitioning:!1});Qt.displayName="ViewTransition";var vn=v.createContext(new Map);vn.displayName="Fetchers";var uo=v.createContext(null);uo.displayName="Await";var Pe=v.createContext(null);Pe.displayName="Navigation";var Lt=v.createContext(null);Lt.displayName="Location";var Se=v.createContext({outlet:null,matches:[],isDataRoute:!1});Se.displayName="Route";var Zt=v.createContext(null);Zt.displayName="RouteError";var gn="REACT_ROUTER_ERROR",co="REDIRECT",fo="ROUTE_ERROR_RESPONSE";function ho(e){if(e.startsWith(`${gn}:${co}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function mo(e){if(e.startsWith(`${gn}:${fo}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new ut(t.status,t.statusText,t.data)}catch{}}function po(e,{relative:t}={}){I(dt(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=v.useContext(Pe),{hash:a,pathname:o,search:i}=ht(e,{relative:t}),u=o;return r!=="/"&&(u=o==="/"?r:_e([r,o])),n.createHref({pathname:u,search:i,hash:a})}function dt(){return v.useContext(Lt)!=null}function Ye(){return I(dt(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Lt).location}var wn="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Rn(e){v.useContext(Pe).static||v.useLayoutEffect(e)}function yo(){let{isDataRoute:e}=v.useContext(Se);return e?Mo():vo()}function vo(){I(dt(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(We),{basename:t,navigator:r}=v.useContext(Pe),{matches:n}=v.useContext(Se),{pathname:a}=Ye(),o=JSON.stringify(Kt(n)),i=v.useRef(!1);return Rn(()=>{i.current=!0}),v.useCallback((s,l={})=>
2{if(ie(i.current,wn),!i.current)return;if(typeof s=="number"){r.go(s);return}let h=Gt(s,JSON.parse(o),a,l.relative==="path");e==null&&t!=="/"&&(h.pathname=h.pathname==="/"?t:_e([t,h.pathname])),(l.replace?r.replace:r.push)(h,l.state,l)},[t,r,o,a,e])}var go=v.createContext(null);function wo(e){let t=v.useContext(Se).outlet;return v.useMemo(()=>t&&v.createElement(go.Provider,{value:e},t),[t,e])}function Ci(){let{matches:e}=v.useContext(Se),t=e[e.length-1];return t?t.params:{}}function ht(e,{relative:t}={}){let{matches:r}=v.useContext(Se),{pathname:n}=Ye(),a=JSON.stringify(Kt(r));return v.useMemo(()=>Gt(e,JSON.parse(a),n,t==="path"),[e,a,n,t])}function Ro(e,t,r,n,a){I(dt(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:o}=v.useContext(Pe),{matches:i}=v.useContext(Se),u=i[i.length-1],s=u?u.params:{},l=u?u.pathname:"/",h=u?u.pathnameBase:"/",m=u&&u.route;{let P=m&&m.path||"";bn(l,!m||P.endsWith("*")||P.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${l}" (under <Route path="${P}">) 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. 3 4Please change the parent <Route path="${P}"> to <Route path="${P==="/"?"*":`${P}/*`}">.`)}let w=Ye(),g;g=w;let C=g.pathname||"/",S=C;if(h!=="/"){let P=h.replace(/^\//,"").split("/");S="/"+C.replace(/^\//,"").split("/").slice(P.length).join("/")}let x=Ne(e,{pathname:S});return ie(m||x!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),ie(x==null||x[x.length-1].route.element!==void 0||x[x.length-1].route.Component!==void 0||x[x.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),So(x&&x.map(P=>Object.assign({},P,{params:Object.assign({},s,P.params),pathname:_e([h,o.encodeLocation?o.encodeLocation(P.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathname]),pathnameBase:P.pathnameBase==="/"?h:_e([h,o.encodeLocation?o.encodeLocation(P.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:P.pathnameBase])})),i,r,n,a)}function Eo(){let e=To(),t=st(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return console.error("Error handled by React Router default ErrorBoundary:",e),i=v.createElement(v.Fragment,null,v.createElement("p",null,"ð¿ Hey developer ð"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:o},"ErrorBoundary")," or"," ",v.createElement("code",{style:o},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},t),r?v.createElement("pre",{style:a},r):null,i)}var bo=v.createElement(Eo,null),En=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=mo(e.digest);r&&(e=r)}let t=e!==void 0?v.createElement(Se.Provider,{value:this.props.routeContext},v.createElement(Zt.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(Co,{error:e},t):t}};En.contextType=yn;var It=new WeakMap;function Co({children:e,error:t}){let{basename:r}=v.useContext(Pe);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let n=ho(t.digest);if(n){let a=It.get(t);if(a)throw a;let o=nn(n.location,r);if(rn&&!It.get(t))if(o.isExternal||n.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const i=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:n.replace}));throw It.set(t,i),i}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function Po({routeContext:e,match:t,children:r}){let n=v.useContext(We);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),v.createElement(Se.Provider,{value:e},r)}function So(e,t=[],r=null,n=null,a=null){if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let o=e,i=r?.errors;if(i!=null){let h=o.findIndex(m=>m.route.id&&i?.[m.route.id]!==void 0);I(h>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(i).join(",")}`),o=o.slice(0,Math.min(o.length,h+1))}let u=!1,s=-1;if(r)for(let h=0;h<o.length;h++){let m=o[h];if((m.route.HydrateFallback||m.route.hydrateFallbackElement)&&(s=h),m.route.id){let{loaderData:w,errors:g}
4=r,C=m.route.loader&&!w.hasOwnProperty(m.route.id)&&(!g||g[m.route.id]===void 0);if(m.route.lazy||C){u=!0,s>=0?o=o.slice(0,s+1):o=[o[0]];break}}}let l=r&&n?(h,m)=>{n(h,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:ct(r.matches),errorInfo:m})}:void 0;return o.reduceRight((h,m,w)=>{let g,C=!1,S=null,x=null;r&&(g=i&&m.route.id?i[m.route.id]:void 0,S=m.route.errorElement||bo,u&&(s<0&&w===0?(bn("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,x=null):s===w&&(C=!0,x=m.route.hydrateFallbackElement||null)));let _=t.concat(o.slice(0,w+1)),P=()=>{let A;return g?A=S:C?A=x:m.route.Component?A=v.createElement(m.route.Component,null):m.route.element?A=m.route.element:A=h,v.createElement(Po,{match:m,routeContext:{outlet:h,matches:_,isDataRoute:r!=null},children:A})};return r&&(m.route.ErrorBoundary||m.route.errorElement||w===0)?v.createElement(En,{location:r.location,revalidation:r.revalidation,component:S,error:g,children:P(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:l}):P()},null)}function er(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function xo(e){let t=v.useContext(We);return I(t,er(e)),t}function _o(e){let t=v.useContext(ft);return I(t,er(e)),t}function Lo(e){let t=v.useContext(Se);return I(t,er(e)),t}function tr(e){let t=Lo(e),r=t.matches[t.matches.length-1];return I(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function Do(){return tr("useRouteId")}function To(){let e=v.useContext(Zt),t=_o("useRouteError"),r=tr("useRouteError");return e!==void 0?e:t.errors?.[r]}function Mo(){let{router:e}=xo("useNavigate"),t=tr("useNavigate"),r=v.useRef(!1);return Rn(()=>{r.current=!0}),v.useCallback(async(a,o={})=>{ie(r.current,wn),r.current&&(typeof a=="number"?await e.navigate(a):await e.navigate(a,{fromRouteId:t,...o}))},[e,t])}var Br={};function bn(e,t,r){!t&&!Br[e]&&(Br[e]=!0,ie(!1,r))}var Wr={};function Yr(e,t){!e&&!Wr[t]&&(Wr[t]=!0,console.warn(t))}var Oo="useOptimistic",Vr=Gn[Oo],$o=()=>{};function No(e){return Vr?Vr(e):[e,$o]}function Ao(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&ie(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:v.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&ie(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:v.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&ie(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:v.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var Uo=["HydrateFallback","hydrateFallbackElement"],Fo=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",e(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}};function jo({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){n=so()||n;let[o,i]=v.useState(e.state),[u,s]=No(o),[l,h]=v.useState(),[m,w]=v.useState({isTransitioning:!1}),[g,C]=v.useState(),[S,x]=v.useState(),[_,P]=v.useState(),A=v.useRef(new Map),Z=v.useCallback((j,{deletedFetchers:B,newErrors:re,flushSync:X,viewTransitionOpts:le})=>{re&&r&&Object.values(re).forEach(ne=>r(ne,{location:j.location,params:j.matches[0]?.params??{},unstable_pattern:ct(j.matches)})),j.fetchers.forEach((ne,Q)=>{ne.data!==void 0&&A.current.set(Q,ne.data)}),B.forEach(ne=>A.current.delete(ne)),Yr(X===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` 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 we=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(Yr(le==null||we,"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."),!le||!we){t&&X?t(()=>i(j)):n===!1?i(j):v.startTransition(()=>{n===!0&&s(ne=>Kr(ne,j)),i(j)});return}if(t&&X){t(()=>{S&&(g?.resolve(),S.skipTransition()),w({isTransitioning:!0,flushSync:!0,currentLocation:le.currentLocation,nextLocation:le.nextLocation})});let ne=e.window.document.startViewTransition(()=>{t(()=>i(j))});ne.finished.finally(()=>{t(()=>{C(void 0),x(void 0),h(void 0),w({isTransitioning:!1})})}),t(()=>x(ne));return}S?(g?.resolve(),S.skipTransition(),P({state:j,currentLocation:le.currentLocation,nextLocation:le.nextLocation})):(h(j),w({isTransitioning:!0,flushSync:!1,currentLocation:le.currentLocation,nextLocation:le.nextLocation}))},[e.window,t,S,g,n,s,r]);v.useLayoutEffect(()=>e.subscribe(Z),[e,Z]),v.useEffect(()=>{m.isTransitioning&&!m.flushSync&&C(new Fo)},[m]),v.useEffect(()=>{if(g&&l&&e.window){let j=l,B=g.promise,re=e.window.document.startViewTransition(async()=>{n===!1?i(j):v.startTransition(()=>{n===!0&&s(X=>Kr(X,j)),i(j)}),await B});re.finished.finally(()=>{C(void 0),x(void 0),h(void 0),w({isTransitioning:!1})}),x(re)}},[l,g,e.window,n,s]),v.useEffect(()=>{g&&l&&u.location.key===l.location.key&&g.resolve()},[g,S,u.location,l]),v.useEffect(()=>{!m.isTransitioning&&_&&(h(_.state),w({isTransitioning:!0,flushSync:!1,currentLocation:_.currentLocation,nextLocation:_.nextLocation}),P(void 0))},[m.isTransitioning,_]);let Y=v.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:j=>e.navigate(j),push:(j,B,re)=>e.navigate(j,{state:B,preventScrollReset:re?.preventScrollReset}),replace:(j,B,re)=>e.navigate(j,{replace:!0,state:B,preventScrollReset:re?.preventScrollReset})}),[e]),te=e.basename||"/",p=v.useMemo(()=>({router:e,navigator:Y,static:!1,basename:te,onError:r}),[e,Y,te,r]);return v.createElement(v.Fragment,null,v.createElement(We.Provider,{value:p},v.createElement(ft.Provider,{value:u},v.createElement(vn.Provider,{value:A.current},v.createElement(Qt.Provider,{value:m},v.createElement(Io,{basename:te,location:u.location,navigationType:u.historyAction,navigator:Y,unstable_useTransitions:n},v.createElement(zo,{routes:e.routes,future:e.future,state:u,onError:r})))))),null)}function Kr(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var zo=v.memo(ko);function ko({routes:e,future:t,state:r,onError:n}){return Ro(e,void 0,r,n,t)}function Pi(e){return wo(e.context)}function Io({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:i}){I(!dt(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let u=e.replace(/^\/*/,"/"),s=v.useMemo(()=>({basename:u,navigator:a,static:o,unstable_useTransitions:i,future:{}}),[u,a,o,i]);typeof r=="string"&&(r=Fe(r));
4let{pathname:l="/",search:h="",hash:m="",state:w=null,key:g="default"}=r,C=v.useMemo(()=>{let S=Ce(l,u);return S==null?null:{location:{pathname:S,search:h,hash:m,state:w,key:g},navigationType:n}},[u,l,h,m,w,g,n]);return ie(C!=null,`<Router basename="${u}"> is not able to match the URL "${l}${h}${m}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(Pe.Provider,{value:s},v.createElement(Lt.Provider,{children:t,value:C}))}var Pt="get",St="application/x-www-form-urlencoded";function Dt(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function Ho(e){return Dt(e)&&e.tagName.toLowerCase()==="button"}function Bo(e){return Dt(e)&&e.tagName.toLowerCase()==="form"}function Wo(e){return Dt(e)&&e.tagName.toLowerCase()==="input"}function Yo(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Vo(e,t){return e.button===0&&(!t||t==="_self")&&!Yo(e)}var bt=null;function Ko(){if(bt===null)try{new FormData(document.createElement("form"),0),bt=!1}catch{bt=!0}return bt}var Go=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ht(e){return e!=null&&!Go.has(e)?(ie(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${St}"`),null):e}function qo(e,t){let r,n,a,o,i;if(Bo(e)){let u=e.getAttribute("action");n=u?Ce(u,t):null,r=e.getAttribute("method")||Pt,a=Ht(e.getAttribute("enctype"))||St,o=new FormData(e)}else if(Ho(e)||Wo(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||u.getAttribute("action");if(n=s?Ce(s,t):null,r=e.getAttribute("formmethod")||u.getAttribute("method")||Pt,a=Ht(e.getAttribute("formenctype"))||Ht(u.getAttribute("enctype"))||St,o=new FormData(u,e),!Ko()){let{name:l,type:h,value:m}=e;if(h==="image"){let w=l?`${l}.`:"";o.append(`${w}x`,"0"),o.append(`${w}y`,"0")}else l&&o.append(l,m)}}else{if(Dt(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=Pt,n=null,a=St,i=e}return o&&a==="text/plain"&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function rr(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Jo(e,t,r,n){let a=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:a.pathname==="/"?a.pathname=`_root.${n}`:t&&Ce(a.pathname,t)==="/"?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function Xo(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Qo(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function Zo(e,t,r){let n=await Promise.all(e.map(async a=>{let o=t.routes[a.route.id];if(o){let i=await Xo(o,r);return i.links?i.links():[]}return[]}));return ni(n.flat(1).filter(Qo).filter(a=>a.rel==="stylesheet"||a.rel==="preload").map(a=>a.rel==="stylesheet"?{...a,rel:"prefetch",as:"style"}:{...a,rel:"prefetch"}))}function Gr(e,t,r,n,a,o){let i=(s,l)=>r[l]?s.route.id!==r[l].route.id:!0,u=(s,l)=>r[l].pathname!==s.pathname||r[l].route.path?.endsWith("*")&&r[l].params["*"]!==s.params["*"];return o==="assets"?t.filter((s,l)=>i(s,l)||u(s,l)):o==="data"?t.filter((s,l)=>{let h=n.routes[s.route.id];if(!h||!h.hasLoader)return!1;if(i(s,l)||u(s,l))return!0;
4if(s.route.shouldRevalidate){let m=s.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:s.params,defaultShouldRevalidate:!0});if(typeof m=="boolean")return m}return!0}):[]}function ei(e,t,{includeHydrateFallback:r}={}){return ti(e.map(n=>{let a=t.routes[n.route.id];if(!a)return[];let o=[a.module];return a.clientActionModule&&(o=o.concat(a.clientActionModule)),a.clientLoaderModule&&(o=o.concat(a.clientLoaderModule)),r&&a.hydrateFallbackModule&&(o=o.concat(a.hydrateFallbackModule)),a.imports&&(o=o.concat(a.imports)),o}).flat(1))}function ti(e){return[...new Set(e)]}function ri(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}function ni(e,t){let r=new Set;return new Set(t),e.reduce((n,a)=>{let o=JSON.stringify(ri(a));return r.has(o)||(r.add(o),n.push({key:o,link:a})),n},[])}function Cn(){let e=v.useContext(We);return rr(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function ai(){let e=v.useContext(ft);return rr(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var nr=v.createContext(void 0);nr.displayName="FrameworkContext";function Pn(){let e=v.useContext(nr);return rr(e,"You must render this element inside a <HydratedRouter> element"),e}function oi(e,t){let r=v.useContext(nr),[n,a]=v.useState(!1),[o,i]=v.useState(!1),{onFocus:u,onBlur:s,onMouseEnter:l,onMouseLeave:h,onTouchStart:m}=t,w=v.useRef(null);v.useEffect(()=>{if(e==="render"&&i(!0),e==="viewport"){let S=_=>{_.forEach(P=>{i(P.isIntersecting)})},x=new IntersectionObserver(S,{threshold:.5});return w.current&&x.observe(w.current),()=>{x.disconnect()}}},[e]),v.useEffect(()=>{if(n){let S=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(S)}}},[n]);let g=()=>{a(!0)},C=()=>{a(!1),i(!1)};return r?e!=="intent"?[o,w,{}]:[o,w,{onFocus:rt(u,g),onBlur:rt(s,C),onMouseEnter:rt(l,g),onMouseLeave:rt(h,C),onTouchStart:rt(m,g)}]:[!1,w,{}]}function rt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function ii({page:e,...t}){let{router:r}=Cn(),n=v.useMemo(()=>Ne(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?v.createElement(si,{page:e,matches:n,...t}):null}function li(e){let{manifest:t,routeModules:r}=Pn(),[n,a]=v.useState([]);return v.useEffect(()=>{let o=!1;return Zo(e,t,r).then(i=>{o||a(i)}),()=>{o=!0}},[e,t,r]),n}function si({page:e,matches:t,...r}){let n=Ye(),{future:a,manifest:o,routeModules:i}=Pn(),{basename:u}=Cn(),{loaderData:s,matches:l}=ai(),h=v.useMemo(()=>Gr(e,t,l,o,n,"data"),[e,t,l,o,n]),m=v.useMemo(()=>Gr(e,t,l,o,n,"assets"),[e,t,l,o,n]),w=v.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let S=new Set,x=!1;if(t.forEach(P=>{let A=o.routes[P.route.id];!A||!A.hasLoader||(!h.some(Z=>Z.route.id===P.route.id)&&P.route.id in s&&i[P.route.id]?.shouldRevalidate||A.hasClientLoader?x=!0:S.add(P.route.id))}),S.size===0)return[];let _=Jo(e,u,a.unstable_trailingSlashAwareDataRequests,"data");return x&&S.size>0&&_.searchParams.set("_routes",t.filter(P=>S.has(P.route.id)).map(P=>P.route.id).join(",")),[_.pathname+_.search]},[u,a.unstable_trailingSlashAwareDataRequests,s,n,o,h,t,e,i]),g=v.useMemo(()=>ei(m,o),[m,o]),C=li(m);return v.createElement(v.Fragment,null,w.map(S=>v.createElement("link",{key:S,rel:"prefetch",as:"fetch",href:S,...r})),g.map(S=>v.createElement("link",{key:S,rel:"modulepreload",href:S,...r})),C.map(({key:S,link:x})=>v.createElement("link",{key:S,nonce:r.nonce,...x})))}function ui(...e){return t=>{e.forEach(r=>{typeof r=="function"?r(t):r!=null&&(r.current=t)})}}var ci=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{ci&&(window.__reactRouterVersion="7.12.0")}catch{}function Si(e,t){return Fa({basename:t?.basename,getContext:t?.getContext,future:t?.future,history:Zn({window:t?.window}),hydrationData:fi(),routes:e,mapRouteProperties:Ao,hydrationRouteProperties:Uo,dataStrategy:t?.dataStrategy,patchRoutesOnNavigation:t?.patchRoutesOnNavigation,window:t?.window,unstable_instrumentations:t?.unstable_instrumentations}).initialize()}function fi(){let e=window?.__staticRouterHydrationData;return e&&e.errors&&(e={...e,errors:di(e.errors)}),e}function di(e){if(!e)return null;let t=Object.entries(e),r={};for(let[n,a]of t)if(a&&a.__type==="RouteErrorResponse")r[n]=new ut(a.status,a.statusText,a.data,a.internal===!0);else if(a&&a.__type==="Error"){if(a.__subType){let o=window[a.__subType];if(typeof o=="function")try{let i=new o(a.message);i.stack="",r[n]=i}catch{}}if(r[n]==null){let o=new Error(a.message);o.stack="",r[n]=o}}else r[n]=a;return r}var Sn=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xn=v.forwardRef(function({onClick:t,discover:r="render",prefetch:n="none",relative:a,reloadDocument:o,replace:i,state:u,target:s,to:l,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:w,...g}
4,C){let{basename:S,unstable_useTransitions:x}=v.useContext(Pe),_=typeof l=="string"&&Sn.test(l),P=nn(l,S);l=P.to;let A=po(l,{relative:a}),[Z,Y,te]=oi(n,g),p=yi(l,{replace:i,state:u,target:s,preventScrollReset:h,relative:a,viewTransition:m,unstable_defaultShouldRevalidate:w,unstable_useTransitions:x});function j(re){t&&t(re),re.defaultPrevented||p(re)}let B=v.createElement("a",{...g,...te,href:P.absoluteURL||A,onClick:P.isExternal||o?t:j,ref:ui(C,Y),target:s,"data-discover":!_&&r==="render"?"true":void 0});return Z&&!_?v.createElement(v.Fragment,null,B,v.createElement(ii,{page:A})):B});xn.displayName="Link";var hi=v.forwardRef(function({"aria-current":t="page",caseSensitive:r=!1,className:n="",end:a=!1,style:o,to:i,viewTransition:u,children:s,...l},h){let m=ht(i,{relative:l.relative}),w=Ye(),g=v.useContext(ft),{navigator:C,basename:S}=v.useContext(Pe),x=g!=null&&Ei(m)&&u===!0,_=C.encodeLocation?C.encodeLocation(m).pathname:m.pathname,P=w.pathname,A=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;r||(P=P.toLowerCase(),A=A?A.toLowerCase():null,_=_.toLowerCase()),A&&S&&(A=Ce(A,S)||A);const Z=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let Y=P===_||!a&&P.startsWith(_)&&P.charAt(Z)==="/",te=A!=null&&(A===_||!a&&A.startsWith(_)&&A.charAt(_.length)==="/"),p={isActive:Y,isPending:te,isTransitioning:x},j=Y?t:void 0,B;typeof n=="function"?B=n(p):B=[n,Y?"active":null,te?"pending":null,x?"transitioning":null].filter(Boolean).join(" ");let re=typeof o=="function"?o(p):o;return v.createElement(xn,{...l,"aria-current":j,className:B,ref:h,style:re,to:i,viewTransition:u},typeof s=="function"?s(p):s)});hi.displayName="NavLink";var mi=v.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=Pt,action:u,onSubmit:s,relative:l,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:w,...g},C)=>{let{unstable_useTransitions:S}=v.useContext(Pe),x=wi(),_=Ri(u,{relative:l}),P=i.toLowerCase()==="get"?"get":"post",A=typeof u=="string"&&Sn.test(u),Z=Y=>{if(s&&s(Y),Y.defaultPrevented)return;Y.preventDefault();let te=Y.nativeEvent.submitter,p=te?.getAttribute("formmethod")||i,j=()=>x(te||Y.currentTarget,{fetcherKey:t,method:p,navigate:r,replace:a,state:o,relative:l,preventScrollReset:h,viewTransition:m,unstable_defaultShouldRevalidate:w});S&&r!==!1?v.startTransition(()=>j()):j()};return v.createElement("form",{ref:C,method:P,action:_,onSubmit:n?s:Z,...g,"data-discover":!A&&e==="render"?"true":void 0})});mi.displayName="Form";function pi(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function _n(e){let t=v.useContext(We);return I(t,pi(e)),t}function yi(e,{target:t,replace:r,state:n,preventScrollReset:a,relative:o,viewTransition:i,unstable_defaultShouldRevalidate:u,unstable_useTransitions:s}={}){let l=yo(),h=Ye(),m=ht(e,{relative:o});return v.useCallback(w=>{if(Vo(w,t)){w.preventDefault();let g=r!==void 0?r:Le(h)===Le(m),C=()=>l(e,{replace:g,state:n,preventScrollReset:a,relative:o,viewTransition:i,unstable_defaultShouldRevalidate:u});s?v.startTransition(()=>C()):C()}},[h,l,m,r,n,t,e,a,o,i,u,s])}var vi=0,gi=()=>`__${String(++vi)}__`;function wi(){let{router:e}=_n("useSubmit"),{basename:t}=v.useContext(Pe),r=Do(),n=e.fetch,a=e.navigate;return v.useCallback(async(o,i={})=>{let{action:u,method:s,encType:l,formData:h,body:m}=qo(o,t);if(i.navigate===!1){let w=i.fetcherKey||gi();await n(w,r,i.action||u,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:m,formMethod:i.method||s,formEncType:i.encType||l,flushSync:i.flushSync})}else await a(i.action||u,{unstable_defaultShouldRevalidate:i.unstable_defaultShouldRevalidate,preventScrollReset:i.preventScrollReset,formData:h,body:m,formMethod:i.method||s,formEncType:i.encType||l,replace:i.replace,state:i.state,fromRouteId:r,flushSync:i.flushSync,viewTransition:i.viewTransition})},[n,a,t,r])}function Ri(e,{relative:t}={}){let{basename:r}=v.useContext(Pe),n=v.useContext(Se);I(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...ht(e||".",{relative:t})},i=Ye();if(e==null){o.search=i.search;let u=new URLSearchParams(o.search),s=u.getAll("index");if(s.some(h=>h==="")){u.delete("index"),s.filter(m=>m).forEach(m=>u.append("index",m));let h=u.toString();o.search=h?`?${h}`:""}}return(!e||e===".")&&a.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(o.pathname=o.pathname==="/"?r:_e([r,o.pathname])),Le(o)}function Ei(e,{relative:t}={}){let r=v.useContext(Qt);I(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=_n("useViewTransitionState"),a=ht(e,{relative:t});if(!r.isTransitioning)return!1;let o=Ce(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=Ce(r.nextLocation.pathname,n)||r.nextLocation.pathname;return xt(a.pathname,i)!=null||xt(a.pathname,o)!=null}var bi=Jn();function xi(e){return v.createElement(jo,{flushSync:bi.flushSync,...e})}export{xn as L,Pi as O,xi as R,Jn as a,v as b,yo as c,bi as d,Ci as e,Si as f,qr as r,Ye as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.