const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./ActionListItem-BJe01BGx.css","./DataListItemRow-0rnekGZx.css","./GroupPickerDialog-Dl_Lyzxi.css","./RoleMapping-Cz6tDcfR.css","./CodeEditor-YFvMvTG9.css","./DynamicComponents-DniN0CZn.css","./Tabs-ViNVmBYo.css","./ExpandableSection-Bbwii8N8.css","./Brand-aJQZaPjg.css","./DescriptionListTerm-DesQLGah.css","./Dashboard-BZlCREjn.css","./ViewHeader-BI0nMf5o.css","./FormAccess-BlCP4WRm.css","./Policies-FOBt4pOD.css","./AuthenticationSection-BnNz5huK.css","./Droppable-RFYrRrY9.css","./ToggleGroup-CTQqqZpK.css","./FlowDetails-Co6_ZaUN.css","./DropdownPanel-CO8imIg3.css","./DatePicker-BNaUop93.css","./AdminEvents-B_cz1hFf.css","./NewClientForm-C8TYIpRU.css","./PermissionTab-CIKqlXCr.css","./RolesList-CWiFlrTF.css","./NewPolicyDialog-DcIJAJkD.css","./Policies-54ZJmY_B.css","./ClientDetails-XXut5S9Q.css","./AttributeForm-YNWXrEWO.css","./ResourceDetails-jgm_B1Y8.css","./GroupsSection-CTVp1kn_.css","./discovery-settings-BdYoyeo1.css","./SamlGeneralSettings-Co50-Ouz.css","./ClickableCard-CFW7bC3I.css","./realm-settings-section-BuAKUDFS.css","./userProfileMetadata-CWZi8ycW.css","./RealmSettingsSection-CK9PwWh7.css","./SessionsSection-1P3dU17n.css","./SettingsCache-E5eDqPG-.css","./CustomProviderSettings-DOKoGkC0.css","./UserFederationSection-DmSRQBjS.css","./user-section-DQytkT-6.css","./EditUser-DBs3-mDj.css"])))=>i.map(i=>d[i]); import{jsx as v,jsxs as xe,Fragment as Mn}from"react/jsx-runtime";import*as d from"react";import ie,{createContext as uf,useContext as Ol,useMemo as Et,useRef as Tt,useCallback as Rt,useState as Pe,useEffect as _t,forwardRef as pf,useImperativeHandle as Ly,useReducer as _1,Fragment as ff,isValidElement as Dy,Children as My,useId as Fy,Component as S1,lazy as re,Suspense as C1,StrictMode as R1}from"react";import*as _l from"react-dom";import P1 from"react-dom";var Gr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function mf(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var ps={},Xm;function T1(){if(Xm)return ps;Xm=1;var t=P1;return ps.createRoot=t.createRoot,ps.hydrateRoot=t.hydrateRoot,ps}var I1=T1();function gt(){return gt=Object.assign?Object.assign.bind():function(t){for(var e=1;e"u")throw new Error(e)}function wr(t,e){if(!t){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function N1(){return Math.random().toString(36).substr(2,8)}function Jm(t,e){return{usr:t.state,key:t.key,idx:e}}function Co(t,e,n,r){return n===void 0&&(n=null),gt({pathname:typeof t=="string"?t:t.pathname,search:"",hash:""},typeof e=="string"?Rr(e):e,{state:n,key:e&&e.key||r||N1()})}function ta(t){let{pathname:e="/",search:n="",hash:r=""}=t;return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function Rr(t){let e={};if(t){let n=t.indexOf("#");n>=0&&(e.hash=t.substr(n),t=t.substr(0,n));let r=t.indexOf("?");r>=0&&(e.search=t.substr(r),t=t.substr(0,r)),t&&(e.pathname=t)}return e}function A1(t,e,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,o=a.history,s=Ct.Pop,l=null,c=u();c==null&&(c=0,o.replaceState(gt({},o.state,{idx:c}),""));function u(){return(o.state||{idx:null}).idx}function p(){s=Ct.Pop;let b=u(),x=b==null?null:b-c;c=b,l&&l({action:s,location:g.location,delta:x})}function f(b,x){s=Ct.Push;let y=Co(g.location,b,x);n&&n(y,b),c=u()+1;let R=Jm(y,c),E=g.createHref(y);try{o.pushState(R,"",E)}catch(_){if(_ instanceof DOMException&&_.name==="DataCloneError")throw _;a.location.assign(E)}i&&l&&l({action:s,location:g.location,delta:1})}function m(b,x){s=Ct.Replace;let y=Co(g.location,b,x);n&&n(y,b),c=u();let R=Jm(y,c),E=g.createHref(y);o.replaceState(R,"",E),i&&l&&l({action:s,location:g.location,delta:0})}function h(b){let x=a.location.origin!=="null"?a.location.origin:a.location.href,y=typeof b=="string"?b:ta(b);return y=y.replace(/ $/,"%20"),$e(x,"No window.location.(origin|href) available to create URL for href: "+y),new URL(y,x)}let g={get action(){return s},get location(){return t(a,o)},listen(b){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(Ym,p),l=b,()=>{a.removeEventListener(Ym,p),l=null}},createHref(b){return e(a,b)},createURL:h,encodeLocation(b){let x=h(b);return{pathname:x.pathname,search:x.search,hash:x.hash}},push:f,replace:m,go(b){return o.go(b)}};return g}var nt;(function(t){t.data="data",t.deferred="deferred",t.redirect="redirect",t.error="error"})(nt||(nt={}));const L1=new Set(["lazy","caseSensitive","path","id","index","children"]);function D1(t){return t.index===!0}function qs(t,e,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),t.map((a,i)=>{let o=[...n,String(i)],s=typeof a.id=="string"?a.id:o.join("-");if($e(a.index!==!0||!a.children,"Cannot specify children on an index route"),$e(!r[s],'Found a route id collision on id "'+s+`". Route id's must be globally unique within Data Router usages`),D1(a)){let l=gt({},a,e(a),{id:s});return r[s]=l,l}else{let l=gt({},a,e(a),{id:s,children:void 0});return r[s]=l,a.children&&(l.children=qs(a.children,e,o,r)),l}})}function ha(t,e,n){return n===void 0&&(n="/"),Ps(t,e,n,!1)}function Ps(t,e,n,r){let a=typeof e=="string"?Rr(e):e,i=Fn(a.pathname||"/",n);if(i==null)return null;let o=Vy(t);M1(o);let s=null,l=Uy(i);for(let c=0;s==null&&c{let l={relativePath:s===void 0?i.path||"":s,caseSensitive:i.caseSensitive===!0,childrenIndex:o,route:i};l.relativePath.startsWith("/")&&($e(l.relativePath.startsWith(r),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+r+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(r.length));let c=Qn([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&($e(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+c+'".')),Vy(i.children,e,u,c)),!(i.path==null&&!i.index)&&e.push({path:c,score:q1(c,i.index),routesMeta:u})};return t.forEach((i,o)=>{var s;if(i.path===""||!((s=i.path)!=null&&s.includes("?")))a(i,o);else for(let l of By(i.path))a(i,o,l)}),e}function By(t){let e=t.split("/");if(e.length===0)return[];let[n,...r]=e,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let o=By(r.join("/")),s=[];return s.push(...o.map(l=>l===""?i:[i,l].join("/"))),a&&s.push(...o),s.map(l=>t.startsWith("/")&&l===""?"/":l)}function M1(t){t.sort((e,n)=>e.score!==n.score?n.score-e.score:z1(e.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const F1=/^:[\w-]+$/,j1=3,V1=2,B1=1,U1=10,$1=-2,Zm=t=>t==="*";function q1(t,e){let n=t.split("/"),r=n.length;return n.some(Zm)&&(r+=$1),e&&(r+=V1),n.filter(a=>!Zm(a)).reduce((a,i)=>a+(F1.test(i)?j1:i===""?B1:U1),r)}function z1(t,e){return t.length===e.length&&t.slice(0,-1).every((r,a)=>r===e[a])?t[t.length-1]-e[e.length-1]:0}function K1(t,e,n){n===void 0&&(n=!1);let{routesMeta:r}=t,a={},i="/",o=[];for(let s=0;so==null?"":typeof o=="string"?o:String(o),i=n.split(/\/+/).map((o,s,l)=>{if(s===l.length-1&&o==="*")return a(e["*"]);const u=o.match(/^:([\w-]+)(\??)$/);if(u){const[,p,f]=u;let m=e[p];return $e(f==="?"||m!=null,'Missing ":'+p+'" param'),a(m)}return o.replace(/\?$/g,"")}).filter(o=>!!o);return r+i.join("/")}function hi(t,e){typeof t=="string"&&(t={path:t,caseSensitive:!1,end:!0});let[n,r]=G1(t.path,t.caseSensitive,t.end),a=e.match(n);if(!a)return null;let i=a[0],o=i.replace(/(.)\/+$/,"$1"),s=a.slice(1);return{params:r.reduce((c,u,p)=>{let{paramName:f,isOptional:m}=u;if(f==="*"){let g=s[p]||"";o=i.slice(0,i.length-g.length).replace(/(.)\/+$/,"$1")}const h=s[p];return m&&!h?c[f]=void 0:c[f]=(h||"").replace(/%2F/g,"/"),c},{}),pathname:i,pathnameBase:o,pattern:t}}function G1(t,e,n){e===void 0&&(e=!1),n===void 0&&(n=!0),wr(t==="*"||!t.endsWith("*")||t.endsWith("/*"),'Route path "'+t+'" will be treated as if it were '+('"'+t.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+t.replace(/\*$/,"/*")+'".'));let r=[],a="^"+t.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,s,l)=>(r.push({paramName:s,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return t.endsWith("*")?(r.push({paramName:"*"}),a+=t==="*"||t==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":t!==""&&t!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,e?void 0:"i"),r]}function Uy(t){try{return t.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return wr(!1,'The URL path "'+t+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),t}}function Fn(t,e){if(e==="/")return t;if(!t.toLowerCase().startsWith(e.toLowerCase()))return null;let n=e.endsWith("/")?e.length-1:e.length,r=t.charAt(n);return r&&r!=="/"?null:t.slice(n)||"/"}const H1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,W1=t=>H1.test(t);function X1(t,e){e===void 0&&(e="/");let{pathname:n,search:r="",hash:a=""}=typeof t=="string"?Rr(t):t,i;if(n)if(W1(n))i=n;else{if(n.includes("//")){let o=n;n=vf(n),wr(!1,"Pathnames cannot have embedded double slashes - normalizing "+(o+" -> "+n))}n.startsWith("/")?i=Qm(n.substring(1),"/"):i=Qm(n,e)}else i=e;return{pathname:i,search:J1(r),hash:Z1(a)}}function Qm(t,e){let n=e.replace(/\/+$/,"").split("/");return t.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function bc(t,e,n,r){return"Cannot include a '"+t+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(r)+"]. Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function $y(t){return t.filter((e,n)=>n===0||e.route.path&&e.route.path.length>0)}function hf(t,e){let n=$y(t);return e?n.map((r,a)=>a===n.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function gf(t,e,n,r){r===void 0&&(r=!1);let a;typeof t=="string"?a=Rr(t):(a=gt({},t),$e(!a.pathname||!a.pathname.includes("?"),bc("?","pathname","search",a)),$e(!a.pathname||!a.pathname.includes("#"),bc("#","pathname","hash",a)),$e(!a.search||!a.search.includes("#"),bc("#","search","hash",a)));let i=t===""||a.pathname==="",o=i?"/":a.pathname,s;if(o==null)s=n;else{let p=e.length-1;if(!r&&o.startsWith("..")){let f=o.split("/");for(;f[0]==="..";)f.shift(),p-=1;a.pathname=f.join("/")}s=p>=0?e[p]:"/"}let l=X1(a,s),c=o&&o!=="/"&&o.endsWith("/"),u=(i||o===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(c||u)&&(l.pathname+="/"),l}const vf=t=>t.replace(/\/\/+/g,"/"),Qn=t=>vf(t.join("/")),Y1=t=>t.replace(/\/+$/,"").replace(/^\/*/,"/"),J1=t=>!t||t==="?"?"":t.startsWith("?")?t:"?"+t,Z1=t=>!t||t==="#"?"":t.startsWith("#")?t:"#"+t;class zs{constructor(e,n,r,a){a===void 0&&(a=!1),this.status=e,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Ro(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.internal=="boolean"&&"data"in t}const qy=["post","put","patch","delete"],Q1=new Set(qy),eS=["get",...qy],tS=new Set(eS),nS=new Set([301,302,303,307,308]),rS=new Set([307,308]),yc={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},aS={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},$i={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},bf=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,iS=t=>({hasErrorBoundary:!!t.hasErrorBoundary}),zy="remix-router-transitions";function oS(t){const e=t.window?t.window:typeof window<"u"?window:void 0,n=typeof e<"u"&&typeof e.document<"u"&&typeof e.document.createElement<"u",r=!n;$e(t.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(t.mapRouteProperties)a=t.mapRouteProperties;else if(t.detectErrorBoundary){let M=t.detectErrorBoundary;a=B=>({hasErrorBoundary:M(B)})}else a=iS;let i={},o=qs(t.routes,a,void 0,i),s,l=t.basename||"/",c=t.dataStrategy||dS,u=t.patchRoutesOnNavigation,p=gt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,v7_skipActionErrorRevalidation:!1},t.future),f=null,m=new Set,h=null,g=null,b=null,x=t.hydrationData!=null,y=ha(o,t.history.location,l),R=!1,E=null;if(y==null&&!u){let M=nn(404,{pathname:t.history.location.pathname}),{matches:B,route:H}=dh(o);y=B,E={[H.id]:M}}y&&!t.hydrationData&&Dr(y,o,t.history.location.pathname).active&&(y=null);let _;if(y)if(y.some(M=>M.route.lazy))_=!1;else if(!y.some(M=>M.route.loader))_=!0;else if(p.v7_partialHydration){let M=t.hydrationData?t.hydrationData.loaderData:null,B=t.hydrationData?t.hydrationData.errors:null;if(B){let H=y.findIndex(ee=>B[ee.route.id]!==void 0);_=y.slice(0,H+1).every(ee=>!Zu(ee.route,M,B))}else _=y.every(H=>!Zu(H.route,M,B))}else _=t.hydrationData!=null;else if(_=!1,y=[],p.v7_partialHydration){let M=Dr(null,o,t.history.location.pathname);M.active&&M.matches&&(R=!0,y=M.matches)}let A,w={historyAction:t.history.action,location:t.history.location,matches:y,initialized:_,navigation:yc,restoreScrollPosition:t.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:t.hydrationData&&t.hydrationData.loaderData||{},actionData:t.hydrationData&&t.hydrationData.actionData||null,errors:t.hydrationData&&t.hydrationData.errors||E,fetchers:new Map,blockers:new Map},I=Ct.Pop,k=!1,N,L=!1,T=new Map,O=null,C=!1,D=!1,q=[],G=new Set,V=new Map,K=0,X=-1,Y=new Map,J=new Set,ne=new Map,Z=new Map,fe=new Set,ue=new Map,ke=new Map,Re;function He(){if(f=t.history.listen(M=>{let{action:B,location:H,delta:ee}=M;if(Re){Re(),Re=void 0;return}wr(ke.size===0||ee!=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 de=Mi({currentLocation:w.location,nextLocation:H,historyAction:B});if(de&&ee!=null){let Ce=new Promise(Ae=>{Re=Ae});t.history.go(ee*-1),vn(de,{state:"blocked",location:H,proceed(){vn(de,{state:"proceeding",proceed:void 0,reset:void 0,location:H}),Ce.then(()=>t.history.go(ee))},reset(){let Ae=new Map(w.blockers);Ae.set(de,$i),be({blockers:Ae})}});return}return Ke(B,H)}),n){_S(e,T);let M=()=>SS(e,T);e.addEventListener("pagehide",M),O=()=>e.removeEventListener("pagehide",M)}return w.initialized||Ke(Ct.Pop,w.location,{initialHydration:!0}),A}function he(){f&&f(),O&&O(),m.clear(),N&&N.abort(),w.fetchers.forEach((M,B)=>me(B)),w.blockers.forEach((M,B)=>Qt(B))}function _e(M){return m.add(M),()=>m.delete(M)}function be(M,B){B===void 0&&(B={}),w=gt({},w,M);let H=[],ee=[];p.v7_fetcherPersist&&w.fetchers.forEach((de,Ce)=>{de.state==="idle"&&(fe.has(Ce)?ee.push(Ce):H.push(Ce))}),fe.forEach(de=>{!w.fetchers.has(de)&&!V.has(de)&&ee.push(de)}),[...m].forEach(de=>de(w,{deletedFetchers:ee,viewTransitionOpts:B.viewTransitionOpts,flushSync:B.flushSync===!0})),p.v7_fetcherPersist?(H.forEach(de=>w.fetchers.delete(de)),ee.forEach(de=>me(de))):ee.forEach(de=>fe.delete(de))}function Ve(M,B,H){var ee,de;let{flushSync:Ce}=H===void 0?{}:H,Ae=w.actionData!=null&&w.navigation.formMethod!=null&&Tn(w.navigation.formMethod)&&w.navigation.state==="loading"&&((ee=M.state)==null?void 0:ee._isRedirect)!==!0,ye;B.actionData?Object.keys(B.actionData).length>0?ye=B.actionData:ye=null:Ae?ye=w.actionData:ye=null;let Ee=B.loaderData?lh(w.loaderData,B.loaderData,B.matches||[],B.errors):w.loaderData,ve=w.blockers;ve.size>0&&(ve=new Map(ve),ve.forEach((We,Bt)=>ve.set(Bt,$i)));let Oe=k===!0||w.navigation.formMethod!=null&&Tn(w.navigation.formMethod)&&((de=M.state)==null?void 0:de._isRedirect)!==!0;s&&(o=s,s=void 0),C||I===Ct.Pop||(I===Ct.Push?t.history.push(M,M.state):I===Ct.Replace&&t.history.replace(M,M.state));let Ue;if(I===Ct.Pop){let We=T.get(w.location.pathname);We&&We.has(M.pathname)?Ue={currentLocation:w.location,nextLocation:M}:T.has(M.pathname)&&(Ue={currentLocation:M,nextLocation:w.location})}else if(L){let We=T.get(w.location.pathname);We?We.add(M.pathname):(We=new Set([M.pathname]),T.set(w.location.pathname,We)),Ue={currentLocation:w.location,nextLocation:M}}be(gt({},B,{actionData:ye,loaderData:Ee,historyAction:I,location:M,initialized:!0,navigation:yc,revalidation:"idle",restoreScrollPosition:qa(M,B.matches||w.matches),preventScrollReset:Oe,blockers:ve}),{viewTransitionOpts:Ue,flushSync:Ce===!0}),I=Ct.Pop,k=!1,L=!1,C=!1,D=!1,q=[]}async function Ge(M,B){if(typeof M=="number"){t.history.go(M);return}let H=Ju(w.location,w.matches,l,p.v7_prependBasename,M,p.v7_relativeSplatPath,B?.fromRouteId,B?.relative),{path:ee,submission:de,error:Ce}=eh(p.v7_normalizeFormMethod,!1,H,B),Ae=w.location,ye=Co(w.location,ee,B&&B.state);ye=gt({},ye,t.history.encodeLocation(ye));let Ee=B&&B.replace!=null?B.replace:void 0,ve=Ct.Push;Ee===!0?ve=Ct.Replace:Ee===!1||de!=null&&Tn(de.formMethod)&&de.formAction===w.location.pathname+w.location.search&&(ve=Ct.Replace);let Oe=B&&"preventScrollReset"in B?B.preventScrollReset===!0:void 0,Ue=(B&&B.flushSync)===!0,We=Mi({currentLocation:Ae,nextLocation:ye,historyAction:ve});if(We){vn(We,{state:"blocked",location:ye,proceed(){vn(We,{state:"proceeding",proceed:void 0,reset:void 0,location:ye}),Ge(M,B)},reset(){let Bt=new Map(w.blockers);Bt.set(We,$i),be({blockers:Bt})}});return}return await Ke(ve,ye,{submission:de,pendingError:Ce,preventScrollReset:Oe,replace:B&&B.replace,enableViewTransition:B&&B.viewTransition,flushSync:Ue})}function Ye(){if(Q(),be({revalidation:"loading"}),w.navigation.state!=="submitting"){if(w.navigation.state==="idle"){Ke(w.historyAction,w.location,{startUninterruptedRevalidation:!0});return}Ke(I||w.historyAction,w.navigation.location,{overrideNavigation:w.navigation,enableViewTransition:L===!0})}}async function Ke(M,B,H){N&&N.abort(),N=null,I=M,C=(H&&H.startUninterruptedRevalidation)===!0,ur(w.location,w.matches),k=(H&&H.preventScrollReset)===!0,L=(H&&H.enableViewTransition)===!0;let ee=s||o,de=H&&H.overrideNavigation,Ce=H!=null&&H.initialHydration&&w.matches&&w.matches.length>0&&!R?w.matches:ha(ee,B,l),Ae=(H&&H.flushSync)===!0;if(Ce&&w.initialized&&!D&&gS(w.location,B)&&!(H&&H.submission&&Tn(H.submission.formMethod))){Ve(B,{matches:Ce},{flushSync:Ae});return}let ye=Dr(Ce,ee,B.pathname);if(ye.active&&ye.matches&&(Ce=ye.matches),!Ce){let{error:st,notFoundMatches:Ze,route:xt}=Fi(B.pathname);Ve(B,{matches:Ze,loaderData:{},errors:{[xt.id]:st}},{flushSync:Ae});return}N=new AbortController;let Ee=Ha(t.history,B,N.signal,H&&H.submission),ve;if(H&&H.pendingError)ve=[ga(Ce).route.id,{type:nt.error,error:H.pendingError}];else if(H&&H.submission&&Tn(H.submission.formMethod)){let st=await qe(Ee,B,H.submission,Ce,ye.active,{replace:H.replace,flushSync:Ae});if(st.shortCircuited)return;if(st.pendingActionResult){let[Ze,xt]=st.pendingActionResult;if(pn(xt)&&Ro(xt.error)&&xt.error.status===404){N=null,Ve(B,{matches:st.matches,loaderData:{},errors:{[Ze]:xt.error}});return}}Ce=st.matches||Ce,ve=st.pendingActionResult,de=xc(B,H.submission),Ae=!1,ye.active=!1,Ee=Ha(t.history,Ee.url,Ee.signal)}let{shortCircuited:Oe,matches:Ue,loaderData:We,errors:Bt}=await ge(Ee,B,Ce,ye.active,de,H&&H.submission,H&&H.fetcherSubmission,H&&H.replace,H&&H.initialHydration===!0,Ae,ve);Oe||(N=null,Ve(B,gt({matches:Ue||Ce},ch(ve),{loaderData:We,errors:Bt})))}async function qe(M,B,H,ee,de,Ce){Ce===void 0&&(Ce={}),Q();let Ae=ES(B,H);if(be({navigation:Ae},{flushSync:Ce.flushSync===!0}),de){let ve=await Mr(ee,B.pathname,M.signal);if(ve.type==="aborted")return{shortCircuited:!0};if(ve.type==="error"){let Oe=ga(ve.partialMatches).route.id;return{matches:ve.partialMatches,pendingActionResult:[Oe,{type:nt.error,error:ve.error}]}}else if(ve.matches)ee=ve.matches;else{let{notFoundMatches:Oe,error:Ue,route:We}=Fi(B.pathname);return{matches:Oe,pendingActionResult:[We.id,{type:nt.error,error:Ue}]}}}let ye,Ee=ao(ee,B);if(!Ee.route.action&&!Ee.route.lazy)ye={type:nt.error,error:nn(405,{method:M.method,pathname:B.pathname,routeId:Ee.route.id})};else if(ye=(await j("action",w,M,[Ee],ee,null))[Ee.route.id],M.signal.aborted)return{shortCircuited:!0};if(wa(ye)){let ve;return Ce&&Ce.replace!=null?ve=Ce.replace:ve=ih(ye.response.headers.get("Location"),new URL(M.url),l,t.history)===w.location.pathname+w.location.search,await U(M,ye,!0,{submission:H,replace:ve}),{shortCircuited:!0}}if(Hr(ye))throw nn(400,{type:"defer-action"});if(pn(ye)){let ve=ga(ee,Ee.route.id);return(Ce&&Ce.replace)!==!0&&(I=Ct.Push),{matches:ee,pendingActionResult:[ve.route.id,ye]}}return{matches:ee,pendingActionResult:[Ee.route.id,ye]}}async function ge(M,B,H,ee,de,Ce,Ae,ye,Ee,ve,Oe){let Ue=de||xc(B,Ce),We=Ce||Ae||ph(Ue),Bt=!C&&(!p.v7_partialHydration||!Ee);if(ee){if(Bt){let wt=oe(Oe);be(gt({navigation:Ue},wt!==void 0?{actionData:wt}:{}),{flushSync:ve})}let Je=await Mr(H,B.pathname,M.signal);if(Je.type==="aborted")return{shortCircuited:!0};if(Je.type==="error"){let wt=ga(Je.partialMatches).route.id;return{matches:Je.partialMatches,loaderData:{},errors:{[wt]:Je.error}}}else if(Je.matches)H=Je.matches;else{let{error:wt,notFoundMatches:Ka,route:Ui}=Fi(B.pathname);return{matches:Ka,loaderData:{},errors:{[Ui.id]:wt}}}}let st=s||o,[Ze,xt]=nh(t.history,w,H,We,B,p.v7_partialHydration&&Ee===!0,p.v7_skipActionErrorRevalidation,D,q,G,fe,ne,J,st,l,Oe);if(Ne(Je=>!(H&&H.some(wt=>wt.route.id===Je))||Ze&&Ze.some(wt=>wt.route.id===Je)),X=++K,Ze.length===0&&xt.length===0){let Je=jt();return Ve(B,gt({matches:H,loaderData:{},errors:Oe&&pn(Oe[1])?{[Oe[0]]:Oe[1].error}:null},ch(Oe),Je?{fetchers:new Map(w.fetchers)}:{}),{flushSync:ve}),{shortCircuited:!0}}if(Bt){let Je={};if(!ee){Je.navigation=Ue;let wt=oe(Oe);wt!==void 0&&(Je.actionData=wt)}xt.length>0&&(Je.fetchers=pe(xt)),be(Je,{flushSync:ve})}xt.forEach(Je=>{Xe(Je.key),Je.controller&&V.set(Je.key,Je.controller)});let za=()=>xt.forEach(Je=>Xe(Je.key));N&&N.signal.addEventListener("abort",za);let{loaderResults:Vi,fetcherResults:pr}=await W(w,H,Ze,xt,M);if(M.signal.aborted)return{shortCircuited:!0};N&&N.signal.removeEventListener("abort",za),xt.forEach(Je=>V.delete(Je.key));let Gn=fs(Vi);if(Gn)return await U(M,Gn.result,!0,{replace:ye}),{shortCircuited:!0};if(Gn=fs(pr),Gn)return J.add(Gn.key),await U(M,Gn.result,!0,{replace:ye}),{shortCircuited:!0};let{loaderData:vc,errors:Bi}=sh(w,H,Vi,Oe,xt,pr,ue);ue.forEach((Je,wt)=>{Je.subscribe(Ka=>{(Ka||Je.done)&&ue.delete(wt)})}),p.v7_partialHydration&&Ee&&w.errors&&(Bi=gt({},w.errors,Bi));let pa=jt(),ds=Vt(X),us=pa||ds||xt.length>0;return gt({matches:H,loaderData:vc,errors:Bi},us?{fetchers:new Map(w.fetchers)}:{})}function oe(M){if(M&&!pn(M[1]))return{[M[0]]:M[1].data};if(w.actionData)return Object.keys(w.actionData).length===0?null:w.actionData}function pe(M){return M.forEach(B=>{let H=w.fetchers.get(B.key),ee=qi(void 0,H?H.data:void 0);w.fetchers.set(B.key,ee)}),new Map(w.fetchers)}function P(M,B,H,ee){if(r)throw new Error("router.fetch() was called during the server render, but it shouldn't be. You are likely calling a useFetcher() method in the body of your component. Try moving it to a useEffect or a callback.");Xe(M);let de=(ee&&ee.flushSync)===!0,Ce=s||o,Ae=Ju(w.location,w.matches,l,p.v7_prependBasename,H,p.v7_relativeSplatPath,B,ee?.relative),ye=ha(Ce,Ae,l),Ee=Dr(ye,Ce,Ae);if(Ee.active&&Ee.matches&&(ye=Ee.matches),!ye){le(M,B,nn(404,{pathname:Ae}),{flushSync:de});return}let{path:ve,submission:Oe,error:Ue}=eh(p.v7_normalizeFormMethod,!0,Ae,ee);if(Ue){le(M,B,Ue,{flushSync:de});return}let We=ao(ye,ve),Bt=(ee&&ee.preventScrollReset)===!0;if(Oe&&Tn(Oe.formMethod)){F(M,B,ve,We,ye,Ee.active,de,Bt,Oe);return}ne.set(M,{routeId:B,path:ve}),$(M,B,ve,We,ye,Ee.active,de,Bt,Oe)}async function F(M,B,H,ee,de,Ce,Ae,ye,Ee){Q(),ne.delete(M);function ve(St){if(!St.route.action&&!St.route.lazy){let Ga=nn(405,{method:Ee.formMethod,pathname:H,routeId:B});return le(M,B,Ga,{flushSync:Ae}),!0}return!1}if(!Ce&&ve(ee))return;let Oe=w.fetchers.get(M);te(M,OS(Ee,Oe),{flushSync:Ae});let Ue=new AbortController,We=Ha(t.history,H,Ue.signal,Ee);if(Ce){let St=await Mr(de,new URL(We.url).pathname,We.signal,M);if(St.type==="aborted")return;if(St.type==="error"){le(M,B,St.error,{flushSync:Ae});return}else if(St.matches){if(de=St.matches,ee=ao(de,H),ve(ee))return}else{le(M,B,nn(404,{pathname:H}),{flushSync:Ae});return}}V.set(M,Ue);let Bt=K,Ze=(await j("action",w,We,[ee],de,M))[ee.route.id];if(We.signal.aborted){V.get(M)===Ue&&V.delete(M);return}if(p.v7_fetcherPersist&&fe.has(M)){if(wa(Ze)||pn(Ze)){te(M,$r(void 0));return}}else{if(wa(Ze))if(V.delete(M),X>Bt){te(M,$r(void 0));return}else return J.add(M),te(M,qi(Ee)),U(We,Ze,!1,{fetcherSubmission:Ee,preventScrollReset:ye});if(pn(Ze)){le(M,B,Ze.error);return}}if(Hr(Ze))throw nn(400,{type:"defer-action"});let xt=w.navigation.location||w.location,za=Ha(t.history,xt,Ue.signal),Vi=s||o,pr=w.navigation.state!=="idle"?ha(Vi,w.navigation.location,l):w.matches;$e(pr,"Didn't find any matches after fetcher action");let Gn=++K;Y.set(M,Gn);let vc=qi(Ee,Ze.data);w.fetchers.set(M,vc);let[Bi,pa]=nh(t.history,w,pr,Ee,xt,!1,p.v7_skipActionErrorRevalidation,D,q,G,fe,ne,J,Vi,l,[ee.route.id,Ze]);pa.filter(St=>St.key!==M).forEach(St=>{let Ga=St.key,Wm=w.fetchers.get(Ga),O1=qi(void 0,Wm?Wm.data:void 0);w.fetchers.set(Ga,O1),Xe(Ga),St.controller&&V.set(Ga,St.controller)}),be({fetchers:new Map(w.fetchers)});let ds=()=>pa.forEach(St=>Xe(St.key));Ue.signal.addEventListener("abort",ds);let{loaderResults:us,fetcherResults:Je}=await W(w,pr,Bi,pa,za);if(Ue.signal.aborted)return;Ue.signal.removeEventListener("abort",ds),Y.delete(M),V.delete(M),pa.forEach(St=>V.delete(St.key));let wt=fs(us);if(wt)return U(za,wt.result,!1,{preventScrollReset:ye});if(wt=fs(Je),wt)return J.add(wt.key),U(za,wt.result,!1,{preventScrollReset:ye});let{loaderData:Ka,errors:Ui}=sh(w,pr,us,void 0,pa,Je,ue);if(w.fetchers.has(M)){let St=$r(Ze.data);w.fetchers.set(M,St)}Vt(Gn),w.navigation.state==="loading"&&Gn>X?($e(I,"Expected pending action"),N&&N.abort(),Ve(w.navigation.location,{matches:pr,loaderData:Ka,errors:Ui,fetchers:new Map(w.fetchers)})):(be({errors:Ui,loaderData:lh(w.loaderData,Ka,pr,Ui),fetchers:new Map(w.fetchers)}),D=!1)}async function $(M,B,H,ee,de,Ce,Ae,ye,Ee){let ve=w.fetchers.get(M);te(M,qi(Ee,ve?ve.data:void 0),{flushSync:Ae});let Oe=new AbortController,Ue=Ha(t.history,H,Oe.signal);if(Ce){let Ze=await Mr(de,new URL(Ue.url).pathname,Ue.signal,M);if(Ze.type==="aborted")return;if(Ze.type==="error"){le(M,B,Ze.error,{flushSync:Ae});return}else if(Ze.matches)de=Ze.matches,ee=ao(de,H);else{le(M,B,nn(404,{pathname:H}),{flushSync:Ae});return}}V.set(M,Oe);let We=K,st=(await j("loader",w,Ue,[ee],de,M))[ee.route.id];if(Hr(st)&&(st=await yf(st,Ue.signal,!0)||st),V.get(M)===Oe&&V.delete(M),!Ue.signal.aborted){if(fe.has(M)){te(M,$r(void 0));return}if(wa(st))if(X>We){te(M,$r(void 0));return}else{J.add(M),await U(Ue,st,!1,{preventScrollReset:ye});return}if(pn(st)){le(M,B,st.error);return}$e(!Hr(st),"Unhandled fetcher deferred data"),te(M,$r(st.data))}}async function U(M,B,H,ee){let{submission:de,fetcherSubmission:Ce,preventScrollReset:Ae,replace:ye}=ee===void 0?{}:ee;B.response.headers.has("X-Remix-Revalidate")&&(D=!0);let Ee=B.response.headers.get("Location");$e(Ee,"Expected a Location header on the redirect Response"),Ee=ih(Ee,new URL(M.url),l,t.history);let ve=Co(w.location,Ee,{_isRedirect:!0});if(n){let Ze=!1;if(B.response.headers.has("X-Remix-Reload-Document"))Ze=!0;else if(bf.test(Ee)){const xt=t.history.createURL(Ee);Ze=xt.origin!==e.location.origin||Fn(xt.pathname,l)==null}if(Ze){ye?e.location.replace(Ee):e.location.assign(Ee);return}}N=null;let Oe=ye===!0||B.response.headers.has("X-Remix-Replace")?Ct.Replace:Ct.Push,{formMethod:Ue,formAction:We,formEncType:Bt}=w.navigation;!de&&!Ce&&Ue&&We&&Bt&&(de=ph(w.navigation));let st=de||Ce;if(rS.has(B.response.status)&&st&&Tn(st.formMethod))await Ke(Oe,ve,{submission:gt({},st,{formAction:Ee}),preventScrollReset:Ae||k,enableViewTransition:H?L:void 0});else{let Ze=xc(ve,de);await Ke(Oe,ve,{overrideNavigation:Ze,fetcherSubmission:Ce,preventScrollReset:Ae||k,enableViewTransition:H?L:void 0})}}async function j(M,B,H,ee,de,Ce){let Ae,ye={};try{Ae=await uS(c,M,B,H,ee,de,Ce,i,a)}catch(Ee){return ee.forEach(ve=>{ye[ve.route.id]={type:nt.error,error:Ee}}),ye}for(let[Ee,ve]of Object.entries(Ae))if(vS(ve)){let Oe=ve.result;ye[Ee]={type:nt.redirect,response:mS(Oe,H,Ee,de,l,p.v7_relativeSplatPath)}}else ye[Ee]=await fS(ve);return ye}async function W(M,B,H,ee,de){let Ce=M.matches,Ae=j("loader",M,de,H,B,null),ye=Promise.all(ee.map(async Oe=>{if(Oe.matches&&Oe.match&&Oe.controller){let We=(await j("loader",M,Ha(t.history,Oe.path,Oe.controller.signal),[Oe.match],Oe.matches,Oe.key))[Oe.match.route.id];return{[Oe.key]:We}}else return Promise.resolve({[Oe.key]:{type:nt.error,error:nn(404,{pathname:Oe.path})}})})),Ee=await Ae,ve=(await ye).reduce((Oe,Ue)=>Object.assign(Oe,Ue),{});return await Promise.all([xS(B,Ee,de.signal,Ce,M.loaderData),wS(B,ve,ee)]),{loaderResults:Ee,fetcherResults:ve}}function Q(){D=!0,q.push(...Ne()),ne.forEach((M,B)=>{V.has(B)&&G.add(B),Xe(B)})}function te(M,B,H){H===void 0&&(H={}),w.fetchers.set(M,B),be({fetchers:new Map(w.fetchers)},{flushSync:(H&&H.flushSync)===!0})}function le(M,B,H,ee){ee===void 0&&(ee={});let de=ga(w.matches,B);me(M),be({errors:{[de.route.id]:H},fetchers:new Map(w.fetchers)},{flushSync:(ee&&ee.flushSync)===!0})}function Be(M){return Z.set(M,(Z.get(M)||0)+1),fe.has(M)&&fe.delete(M),w.fetchers.get(M)||aS}function me(M){let B=w.fetchers.get(M);V.has(M)&&!(B&&B.state==="loading"&&Y.has(M))&&Xe(M),ne.delete(M),Y.delete(M),J.delete(M),p.v7_fetcherPersist&&fe.delete(M),G.delete(M),w.fetchers.delete(M)}function Me(M){let B=(Z.get(M)||0)-1;B<=0?(Z.delete(M),fe.add(M),p.v7_fetcherPersist||me(M)):Z.set(M,B),be({fetchers:new Map(w.fetchers)})}function Xe(M){let B=V.get(M);B&&(B.abort(),V.delete(M))}function yt(M){for(let B of M){let H=Be(B),ee=$r(H.data);w.fetchers.set(B,ee)}}function jt(){let M=[],B=!1;for(let H of J){let ee=w.fetchers.get(H);$e(ee,"Expected fetcher: "+H),ee.state==="loading"&&(J.delete(H),M.push(H),B=!0)}return yt(M),B}function Vt(M){let B=[];for(let[H,ee]of Y)if(ee0}function Zt(M,B){let H=w.blockers.get(M)||$i;return ke.get(M)!==B&&ke.set(M,B),H}function Qt(M){w.blockers.delete(M),ke.delete(M)}function vn(M,B){let H=w.blockers.get(M)||$i;$e(H.state==="unblocked"&&B.state==="blocked"||H.state==="blocked"&&B.state==="blocked"||H.state==="blocked"&&B.state==="proceeding"||H.state==="blocked"&&B.state==="unblocked"||H.state==="proceeding"&&B.state==="unblocked","Invalid blocker state transition: "+H.state+" -> "+B.state);let ee=new Map(w.blockers);ee.set(M,B),be({blockers:ee})}function Mi(M){let{currentLocation:B,nextLocation:H,historyAction:ee}=M;if(ke.size===0)return;ke.size>1&&wr(!1,"A router only supports one blocker at a time");let de=Array.from(ke.entries()),[Ce,Ae]=de[de.length-1],ye=w.blockers.get(Ce);if(!(ye&&ye.state==="proceeding")&&Ae({currentLocation:B,nextLocation:H,historyAction:ee}))return Ce}function Fi(M){let B=nn(404,{pathname:M}),H=s||o,{matches:ee,route:de}=dh(H);return Ne(),{notFoundMatches:ee,route:de,error:B}}function Ne(M){let B=[];return ue.forEach((H,ee)=>{(!M||M(ee))&&(H.cancel(),B.push(ee),ue.delete(ee))}),B}function ft(M,B,H){if(h=M,b=B,g=H||null,!x&&w.navigation===yc){x=!0;let ee=qa(w.location,w.matches);ee!=null&&be({restoreScrollPosition:ee})}return()=>{h=null,b=null,g=null}}function Kn(M,B){return g&&g(M,B.map(ee=>jy(ee,w.loaderData)))||M.key}function ur(M,B){if(h&&b){let H=Kn(M,B);h[H]=b()}}function qa(M,B){if(h){let H=Kn(M,B),ee=h[H];if(typeof ee=="number")return ee}return null}function Dr(M,B,H){if(u)if(M){if(Object.keys(M[0].params).length>0)return{active:!0,matches:Ps(B,H,l,!0)}}else return{active:!0,matches:Ps(B,H,l,!0)||[]};return{active:!1,matches:null}}async function Mr(M,B,H,ee){if(!u)return{type:"success",matches:M};let de=M;for(;;){let Ce=s==null,Ae=s||o,ye=i;try{await u({signal:H,path:B,matches:de,fetcherKey:ee,patch:(Oe,Ue)=>{H.aborted||ah(Oe,Ue,Ae,ye,a)}})}catch(Oe){return{type:"error",error:Oe,partialMatches:de}}finally{Ce&&!H.aborted&&(o=[...o])}if(H.aborted)return{type:"aborted"};let Ee=ha(Ae,B,l);if(Ee)return{type:"success",matches:Ee};let ve=Ps(Ae,B,l,!0);if(!ve||de.length===ve.length&&de.every((Oe,Ue)=>Oe.route.id===ve[Ue].route.id))return{type:"success",matches:null};de=ve}}function ji(M){i={},s=qs(M,a,void 0,i)}function E1(M,B){let H=s==null;ah(M,B,s||o,i,a),H&&(o=[...o],be({}))}return A={get basename(){return l},get future(){return p},get state(){return w},get routes(){return o},get window(){return e},initialize:He,subscribe:_e,enableScrollRestoration:ft,navigate:Ge,fetch:P,revalidate:Ye,createHref:M=>t.history.createHref(M),encodeLocation:M=>t.history.encodeLocation(M),getFetcher:Be,deleteFetcher:Me,dispose:he,getBlocker:Zt,deleteBlocker:Qt,patchRoutes:E1,_internalFetchControllers:V,_internalActiveDeferreds:ue,_internalSetRoutes:ji},A}function sS(t){return t!=null&&("formData"in t&&t.formData!=null||"body"in t&&t.body!==void 0)}function Ju(t,e,n,r,a,i,o,s){let l,c;if(o){l=[];for(let p of e)if(l.push(p),p.route.id===o){c=p;break}}else l=e,c=e[e.length-1];let u=gf(a||".",hf(l,i),Fn(t.pathname,n)||t.pathname,s==="path");if(a==null&&(u.search=t.search,u.hash=t.hash),(a==null||a===""||a===".")&&c){let p=xf(u.search);if(c.route.index&&!p)u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index";else if(!c.route.index&&p){let f=new URLSearchParams(u.search),m=f.getAll("index");f.delete("index"),m.filter(g=>g).forEach(g=>f.append("index",g));let h=f.toString();u.search=h?"?"+h:""}}return r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:Qn([n,u.pathname])),ta(u)}function eh(t,e,n,r){if(!r||!sS(r))return{path:n};if(r.formMethod&&!yS(r.formMethod))return{path:n,error:nn(405,{method:r.formMethod})};let a=()=>({path:n,error:nn(400,{type:"invalid-body"})}),i=r.formMethod||"get",o=t?i.toUpperCase():i.toLowerCase(),s=Hy(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Tn(o))return a();let f=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,h)=>{let[g,b]=h;return""+m+g+"="+b+` `},""):String(r.body);return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:f}}}else if(r.formEncType==="application/json"){if(!Tn(o))return a();try{let f=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:o,formAction:s,formEncType:r.formEncType,formData:void 0,json:f,text:void 0}}}catch{return a()}}}$e(typeof FormData=="function","FormData is not available in this environment");let l,c;if(r.formData)l=Qu(r.formData),c=r.formData;else if(r.body instanceof FormData)l=Qu(r.body),c=r.body;else if(r.body instanceof URLSearchParams)l=r.body,c=oh(l);else if(r.body==null)l=new URLSearchParams,c=new FormData;else try{l=new URLSearchParams(r.body),c=oh(l)}catch{return a()}let u={formMethod:o,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:c,json:void 0,text:void 0};if(Tn(u.formMethod))return{path:n,submission:u};let p=Rr(n);return e&&p.search&&xf(p.search)&&l.append("index",""),p.search="?"+l,{path:ta(p),submission:u}}function th(t,e,n){n===void 0&&(n=!1);let r=t.findIndex(a=>a.route.id===e);return r>=0?t.slice(0,n?r+1:r):t}function nh(t,e,n,r,a,i,o,s,l,c,u,p,f,m,h,g){let b=g?pn(g[1])?g[1].error:g[1].data:void 0,x=t.createURL(e.location),y=t.createURL(a),R=n;i&&e.errors?R=th(n,Object.keys(e.errors)[0],!0):g&&pn(g[1])&&(R=th(n,g[0]));let E=g?g[1].statusCode:void 0,_=o&&E&&E>=400,A=R.filter((I,k)=>{let{route:N}=I;if(N.lazy)return!0;if(N.loader==null)return!1;if(i)return Zu(N,e.loaderData,e.errors);if(lS(e.loaderData,e.matches[k],I)||l.some(O=>O===I.route.id))return!0;let L=e.matches[k],T=I;return rh(I,gt({currentUrl:x,currentParams:L.params,nextUrl:y,nextParams:T.params},r,{actionResult:b,actionStatus:E,defaultShouldRevalidate:_?!1:s||x.pathname+x.search===y.pathname+y.search||x.search!==y.search||Ky(L,T)}))}),w=[];return p.forEach((I,k)=>{if(i||!n.some(C=>C.route.id===I.routeId)||u.has(k))return;let N=ha(m,I.path,h);if(!N){w.push({key:k,routeId:I.routeId,path:I.path,matches:null,match:null,controller:null});return}let L=e.fetchers.get(k),T=ao(N,I.path),O=!1;f.has(k)?O=!1:c.has(k)?(c.delete(k),O=!0):L&&L.state!=="idle"&&L.data===void 0?O=s:O=rh(T,gt({currentUrl:x,currentParams:e.matches[e.matches.length-1].params,nextUrl:y,nextParams:n[n.length-1].params},r,{actionResult:b,actionStatus:E,defaultShouldRevalidate:_?!1:s})),O&&w.push({key:k,routeId:I.routeId,path:I.path,matches:N,match:T,controller:new AbortController})}),[A,w]}function Zu(t,e,n){if(t.lazy)return!0;if(!t.loader)return!1;let r=e!=null&&e[t.id]!==void 0,a=n!=null&&n[t.id]!==void 0;return!r&&a?!1:typeof t.loader=="function"&&t.loader.hydrate===!0?!0:!r&&!a}function lS(t,e,n){let r=!e||n.route.id!==e.route.id,a=t[n.route.id]===void 0;return r||a}function Ky(t,e){let n=t.route.path;return t.pathname!==e.pathname||n!=null&&n.endsWith("*")&&t.params["*"]!==e.params["*"]}function rh(t,e){if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate(e);if(typeof n=="boolean")return n}return e.defaultShouldRevalidate}function ah(t,e,n,r,a){var i;let o;if(t){let c=r[t];$e(c,"No route found to patch children into: routeId = "+t),c.children||(c.children=[]),o=c.children}else o=n;let s=e.filter(c=>!o.some(u=>Gy(c,u))),l=qs(s,a,[t||"_","patch",String(((i=o)==null?void 0:i.length)||"0")],r);o.push(...l)}function Gy(t,e){return"id"in t&&"id"in e&&t.id===e.id?!0:t.index===e.index&&t.path===e.path&&t.caseSensitive===e.caseSensitive?(!t.children||t.children.length===0)&&(!e.children||e.children.length===0)?!0:t.children.every((n,r)=>{var a;return(a=e.children)==null?void 0:a.some(i=>Gy(n,i))}):!1}async function cS(t,e,n){if(!t.lazy)return;let r=await t.lazy();if(!t.lazy)return;let a=n[t.id];$e(a,"No route found in manifest");let i={};for(let o in r){let l=a[o]!==void 0&&o!=="hasErrorBoundary";wr(!l,'Route "'+a.id+'" has a static property "'+o+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+o+'" will be ignored.')),!l&&!L1.has(o)&&(i[o]=r[o])}Object.assign(a,i),Object.assign(a,gt({},e(a),{lazy:void 0}))}async function dS(t){let{matches:e}=t,n=e.filter(a=>a.shouldLoad);return(await Promise.all(n.map(a=>a.resolve()))).reduce((a,i,o)=>Object.assign(a,{[n[o].route.id]:i}),{})}async function uS(t,e,n,r,a,i,o,s,l,c){let u=i.map(m=>m.route.lazy?cS(m.route,l,s):void 0),p=i.map((m,h)=>{let g=u[h],b=a.some(y=>y.route.id===m.route.id);return gt({},m,{shouldLoad:b,resolve:async y=>(y&&r.method==="GET"&&(m.route.lazy||m.route.loader)&&(b=!0),b?pS(e,r,m,g,y,c):Promise.resolve({type:nt.data,result:void 0}))})}),f=await t({matches:p,request:r,params:i[0].params,fetcherKey:o,context:c});try{await Promise.all(u)}catch{}return f}async function pS(t,e,n,r,a,i){let o,s,l=c=>{let u,p=new Promise((h,g)=>u=g);s=()=>u(),e.signal.addEventListener("abort",s);let f=h=>typeof c!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+t+'" [routeId: '+n.route.id+"]"))):c({request:e,params:n.params,context:i},...h!==void 0?[h]:[]),m=(async()=>{try{return{type:"data",result:await(a?a(g=>f(g)):f())}}catch(h){return{type:"error",result:h}}})();return Promise.race([m,p])};try{let c=n.route[t];if(r)if(c){let u,[p]=await Promise.all([l(c).catch(f=>{u=f}),r]);if(u!==void 0)throw u;o=p}else if(await r,c=n.route[t],c)o=await l(c);else if(t==="action"){let u=new URL(e.url),p=u.pathname+u.search;throw nn(405,{method:e.method,pathname:p,routeId:n.route.id})}else return{type:nt.data,result:void 0};else if(c)o=await l(c);else{let u=new URL(e.url),p=u.pathname+u.search;throw nn(404,{pathname:p})}$e(o.result!==void 0,"You defined "+(t==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+t+"` ")+"function. Please return a value or `null`.")}catch(c){return{type:nt.error,result:c}}finally{s&&e.signal.removeEventListener("abort",s)}return o}async function fS(t){let{result:e,type:n}=t;if(Wy(e)){let p;try{let f=e.headers.get("Content-Type");f&&/\bapplication\/json\b/.test(f)?e.body==null?p=null:p=await e.json():p=await e.text()}catch(f){return{type:nt.error,error:f}}return n===nt.error?{type:nt.error,error:new zs(e.status,e.statusText,p),statusCode:e.status,headers:e.headers}:{type:nt.data,data:p,statusCode:e.status,headers:e.headers}}if(n===nt.error){if(uh(e)){var r,a;if(e.data instanceof Error){var i,o;return{type:nt.error,error:e.data,statusCode:(i=e.init)==null?void 0:i.status,headers:(o=e.init)!=null&&o.headers?new Headers(e.init.headers):void 0}}return{type:nt.error,error:new zs(((r=e.init)==null?void 0:r.status)||500,void 0,e.data),statusCode:Ro(e)?e.status:void 0,headers:(a=e.init)!=null&&a.headers?new Headers(e.init.headers):void 0}}return{type:nt.error,error:e,statusCode:Ro(e)?e.status:void 0}}if(bS(e)){var s,l;return{type:nt.deferred,deferredData:e,statusCode:(s=e.init)==null?void 0:s.status,headers:((l=e.init)==null?void 0:l.headers)&&new Headers(e.init.headers)}}if(uh(e)){var c,u;return{type:nt.data,data:e.data,statusCode:(c=e.init)==null?void 0:c.status,headers:(u=e.init)!=null&&u.headers?new Headers(e.init.headers):void 0}}return{type:nt.data,data:e}}function mS(t,e,n,r,a,i){let o=t.headers.get("Location");if($e(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!bf.test(o)){let s=r.slice(0,r.findIndex(l=>l.route.id===n)+1);o=Ju(new URL(e.url),s,a,!0,o,i),t.headers.set("Location",o)}return t}function ih(t,e,n,r){let a=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(bf.test(t)){let i=t,o=i.startsWith("//")?new URL(e.protocol+i):new URL(i);if(a.includes(o.protocol))throw new Error("Invalid redirect location");let s=Fn(o.pathname,n)!=null;if(o.origin===e.origin&&s)return vf(o.pathname)+o.search+o.hash}try{let i=r.createURL(t);if(a.includes(i.protocol))throw new Error("Invalid redirect location")}catch{}return t}function Ha(t,e,n,r){let a=t.createURL(Hy(e)).toString(),i={signal:n};if(r&&Tn(r.formMethod)){let{formMethod:o,formEncType:s}=r;i.method=o.toUpperCase(),s==="application/json"?(i.headers=new Headers({"Content-Type":s}),i.body=JSON.stringify(r.json)):s==="text/plain"?i.body=r.text:s==="application/x-www-form-urlencoded"&&r.formData?i.body=Qu(r.formData):i.body=r.formData}return new Request(a,i)}function Qu(t){let e=new URLSearchParams;for(let[n,r]of t.entries())e.append(n,typeof r=="string"?r:r.name);return e}function oh(t){let e=new FormData;for(let[n,r]of t.entries())e.append(n,r);return e}function hS(t,e,n,r,a){let i={},o=null,s,l=!1,c={},u=n&&pn(n[1])?n[1].error:void 0;return t.forEach(p=>{if(!(p.route.id in e))return;let f=p.route.id,m=e[f];if($e(!wa(m),"Cannot handle redirect results in processLoaderData"),pn(m)){let h=m.error;u!==void 0&&(h=u,u=void 0),o=o||{};{let g=ga(t,f);o[g.route.id]==null&&(o[g.route.id]=h)}i[f]=void 0,l||(l=!0,s=Ro(m.error)?m.error.status:500),m.headers&&(c[f]=m.headers)}else Hr(m)?(r.set(f,m.deferredData),i[f]=m.deferredData.data,m.statusCode!=null&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(c[f]=m.headers)):(i[f]=m.data,m.statusCode&&m.statusCode!==200&&!l&&(s=m.statusCode),m.headers&&(c[f]=m.headers))}),u!==void 0&&n&&(o={[n[0]]:u},i[n[0]]=void 0),{loaderData:i,errors:o,statusCode:s||200,loaderHeaders:c}}function sh(t,e,n,r,a,i,o){let{loaderData:s,errors:l}=hS(e,n,r,o);return a.forEach(c=>{let{key:u,match:p,controller:f}=c,m=i[u];if($e(m,"Did not find corresponding fetcher result"),!(f&&f.signal.aborted))if(pn(m)){let h=ga(t.matches,p?.route.id);l&&l[h.route.id]||(l=gt({},l,{[h.route.id]:m.error})),t.fetchers.delete(u)}else if(wa(m))$e(!1,"Unhandled fetcher revalidation redirect");else if(Hr(m))$e(!1,"Unhandled fetcher deferred data");else{let h=$r(m.data);t.fetchers.set(u,h)}}),{loaderData:s,errors:l}}function lh(t,e,n,r){let a=gt({},e);for(let i of n){let o=i.route.id;if(e.hasOwnProperty(o)?e[o]!==void 0&&(a[o]=e[o]):t[o]!==void 0&&i.route.loader&&(a[o]=t[o]),r&&r.hasOwnProperty(o))break}return a}function ch(t){return t?pn(t[1])?{actionData:{}}:{actionData:{[t[0]]:t[1].data}}:{}}function ga(t,e){return(e?t.slice(0,t.findIndex(r=>r.route.id===e)+1):[...t]).reverse().find(r=>r.route.hasErrorBoundary===!0)||t[0]}function dh(t){let e=t.length===1?t[0]:t.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:e}],route:e}}function nn(t,e){let{pathname:n,routeId:r,method:a,type:i,message:o}=e===void 0?{}:e,s="Unknown Server Error",l="Unknown @remix-run/router error";return t===400?(s="Bad Request",a&&n&&r?l="You made a "+a+' request to "'+n+'" but '+('did not provide a `loader` for route "'+r+'", ')+"so there is no way to handle the request.":i==="defer-action"?l="defer() is not supported in actions":i==="invalid-body"&&(l="Unable to encode submission body")):t===403?(s="Forbidden",l='Route "'+r+'" does not match URL "'+n+'"'):t===404?(s="Not Found",l='No route matches URL "'+n+'"'):t===405&&(s="Method Not Allowed",a&&n&&r?l="You made a "+a.toUpperCase()+' request to "'+n+'" but '+('did not provide an `action` for route "'+r+'", ')+"so there is no way to handle the request.":a&&(l='Invalid request method "'+a.toUpperCase()+'"')),new zs(t||500,s,new Error(l),!0)}function fs(t){let e=Object.entries(t);for(let n=e.length-1;n>=0;n--){let[r,a]=e[n];if(wa(a))return{key:r,result:a}}}function Hy(t){let e=typeof t=="string"?Rr(t):t;return ta(gt({},e,{hash:""}))}function gS(t,e){return t.pathname!==e.pathname||t.search!==e.search?!1:t.hash===""?e.hash!=="":t.hash===e.hash?!0:e.hash!==""}function vS(t){return Wy(t.result)&&nS.has(t.result.status)}function Hr(t){return t.type===nt.deferred}function pn(t){return t.type===nt.error}function wa(t){return(t&&t.type)===nt.redirect}function uh(t){return typeof t=="object"&&t!=null&&"type"in t&&"data"in t&&"init"in t&&t.type==="DataWithResponseInit"}function bS(t){let e=t;return e&&typeof e=="object"&&typeof e.data=="object"&&typeof e.subscribe=="function"&&typeof e.cancel=="function"&&typeof e.resolveData=="function"}function Wy(t){return t!=null&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.headers=="object"&&typeof t.body<"u"}function yS(t){return tS.has(t.toLowerCase())}function Tn(t){return Q1.has(t.toLowerCase())}async function xS(t,e,n,r,a){let i=Object.entries(e);for(let o=0;of?.route.id===s);if(!c)continue;let u=r.find(f=>f.route.id===c.route.id),p=u!=null&&!Ky(u,c)&&(a&&a[c.route.id])!==void 0;Hr(l)&&p&&await yf(l,n,!1).then(f=>{f&&(e[s]=f)})}}async function wS(t,e,n){for(let r=0;rc?.route.id===i)&&Hr(s)&&($e(o,"Expected an AbortController for revalidating fetcher deferred result"),await yf(s,o.signal,!0).then(c=>{c&&(e[a]=c)}))}}async function yf(t,e,n){if(n===void 0&&(n=!1),!await t.deferredData.resolveData(e)){if(n)try{return{type:nt.data,data:t.deferredData.unwrappedData}}catch(a){return{type:nt.error,error:a}}return{type:nt.data,data:t.deferredData.data}}}function xf(t){return new URLSearchParams(t).getAll("index").some(e=>e==="")}function ao(t,e){let n=typeof e=="string"?Rr(e).search:e.search;if(t[t.length-1].route.index&&xf(n||""))return t[t.length-1];let r=$y(t);return r[r.length-1]}function ph(t){let{formMethod:e,formAction:n,formEncType:r,text:a,formData:i,json:o}=t;if(!(!e||!n||!r)){if(a!=null)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:e,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(o!==void 0)return{formMethod:e,formAction:n,formEncType:r,formData:void 0,json:o,text:void 0}}}function xc(t,e){return e?{state:"loading",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}:{state:"loading",location:t,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function ES(t,e){return{state:"submitting",location:t,formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text}}function qi(t,e){return t?{state:"loading",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function OS(t,e){return{state:"submitting",formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text,data:e?e.data:void 0}}function $r(t){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function _S(t,e){try{let n=t.sessionStorage.getItem(zy);if(n){let r=JSON.parse(n);for(let[a,i]of Object.entries(r||{}))i&&Array.isArray(i)&&e.set(a,new Set(i||[]))}}catch{}}function SS(t,e){if(e.size>0){let n={};for(let[r,a]of e)n[r]=[...a];try{t.sessionStorage.setItem(zy,JSON.stringify(n))}catch(r){wr(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}function Ks(){return Ks=Object.assign?Object.assign.bind():function(t){for(var e=1;ehi(t,Uy(e)),[e,t])}function Jy(t){d.useContext(or).static||d.useLayoutEffect(t)}function Of(){let{isDataRoute:t}=d.useContext(sr);return t?BS():CS()}function CS(){Ci()||$e(!1);let t=d.useContext(Ho),{basename:e,future:n,navigator:r}=d.useContext(or),{matches:a}=d.useContext(sr),{pathname:i}=Pr(),o=JSON.stringify(hf(a,n.v7_relativeSplatPath)),s=d.useRef(!1);return Jy(()=>{s.current=!0}),d.useCallback(function(c,u){if(u===void 0&&(u={}),!s.current)return;if(typeof c=="number"){r.go(c);return}let p=gf(c,JSON.parse(o),i,u.relative==="path");t==null&&e!=="/"&&(p.pathname=p.pathname==="/"?e:Qn([e,p.pathname])),(u.replace?r.replace:r.push)(p,u.state,u)},[e,r,o,i,t])}const RS=d.createContext(null);function PS(t){let e=d.useContext(sr).outlet;return e&&d.createElement(RS.Provider,{value:t},e)}function Z7(){let{matches:t}=d.useContext(sr),e=t[t.length-1];return e?e.params:{}}function Wo(t,e){let{relative:n}=e===void 0?{}:e,{future:r}=d.useContext(or),{matches:a}=d.useContext(sr),{pathname:i}=Pr(),o=JSON.stringify(hf(a,r.v7_relativeSplatPath));return d.useMemo(()=>gf(t,JSON.parse(o),i,n==="path"),[t,o,i,n])}function TS(t,e,n,r){Ci()||$e(!1);let{navigator:a}=d.useContext(or),{matches:i}=d.useContext(sr),o=i[i.length-1],s=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let c=Pr(),u;u=c;let p=u.pathname||"/",f=p;if(l!=="/"){let g=l.replace(/^\//,"").split("/");f="/"+p.replace(/^\//,"").split("/").slice(g.length).join("/")}let m=ha(t,{pathname:f});return LS(m&&m.map(g=>Object.assign({},g,{params:Object.assign({},s,g.params),pathname:Qn([l,a.encodeLocation?a.encodeLocation(g.pathname).pathname:g.pathname]),pathnameBase:g.pathnameBase==="/"?l:Qn([l,a.encodeLocation?a.encodeLocation(g.pathnameBase).pathname:g.pathnameBase])})),i,n,r)}function IS(){let t=VS(),e=Ro(t)?t.status+" "+t.statusText:t instanceof Error?t.message:JSON.stringify(t),n=t instanceof Error?t.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return d.createElement(d.Fragment,null,d.createElement("h2",null,"Unexpected Application Error!"),d.createElement("h3",{style:{fontStyle:"italic"}},e),n?d.createElement("pre",{style:a},n):null,null)}const kS=d.createElement(IS,null);class NS extends d.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,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){console.error("React Router caught the following error during render",e,n)}render(){return this.state.error!==void 0?d.createElement(sr.Provider,{value:this.props.routeContext},d.createElement(Xy.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function AS(t){let{routeContext:e,match:n,children:r}=t,a=d.useContext(Ho);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),d.createElement(sr.Provider,{value:e},r)}function LS(t,e,n,r){var a;if(e===void 0&&(e=[]),n===void 0&&(n=null),r===void 0&&(r=null),t==null){var i;if(!n)return null;if(n.errors)t=n.matches;else if((i=r)!=null&&i.v7_partialHydration&&e.length===0&&!n.initialized&&n.matches.length>0)t=n.matches;else return null}let o=t,s=(a=n)==null?void 0:a.errors;if(s!=null){let u=o.findIndex(p=>p.route.id&&s?.[p.route.id]!==void 0);u>=0||$e(!1),o=o.slice(0,Math.min(o.length,u+1))}let l=!1,c=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?o=o.slice(0,c+1):o=[o[0]];break}}}return o.reduceRight((u,p,f)=>{let m,h=!1,g=null,b=null;n&&(m=s&&p.route.id?s[p.route.id]:void 0,g=p.route.errorElement||kS,l&&(c<0&&f===0?(US("route-fallback"),h=!0,b=null):c===f&&(h=!0,b=p.route.hydrateFallbackElement||null)));let x=e.concat(o.slice(0,f+1)),y=()=>{let R;return m?R=g:h?R=b:p.route.Component?R=d.createElement(p.route.Component,null):p.route.element?R=p.route.element:R=u,d.createElement(AS,{match:p,routeContext:{outlet:u,matches:x,isDataRoute:n!=null},children:R})};return n&&(p.route.ErrorBoundary||p.route.errorElement||f===0)?d.createElement(NS,{location:n.location,revalidation:n.revalidation,component:g,error:m,children:y(),routeContext:{outlet:null,matches:x,isDataRoute:!0}}):y()},null)}var Zy=(function(t){return t.UseBlocker="useBlocker",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t})(Zy||{}),Qy=(function(t){return t.UseBlocker="useBlocker",t.UseLoaderData="useLoaderData",t.UseActionData="useActionData",t.UseRouteError="useRouteError",t.UseNavigation="useNavigation",t.UseRouteLoaderData="useRouteLoaderData",t.UseMatches="useMatches",t.UseRevalidator="useRevalidator",t.UseNavigateStable="useNavigate",t.UseRouteId="useRouteId",t})(Qy||{});function DS(t){let e=d.useContext(Ho);return e||$e(!1),e}function ex(t){let e=d.useContext(wf);return e||$e(!1),e}function MS(t){let e=d.useContext(sr);return e||$e(!1),e}function _f(t){let e=MS(),n=e.matches[e.matches.length-1];return n.route.id||$e(!1),n.route.id}function FS(){return _f()}function jS(){let{matches:t,loaderData:e}=ex();return d.useMemo(()=>t.map(n=>jy(n,e)),[t,e])}function VS(){var t;let e=d.useContext(Xy),n=ex(),r=_f();return e!==void 0?e:(t=n.errors)==null?void 0:t[r]}function BS(){let{router:t}=DS(Zy.UseNavigateStable),e=_f(Qy.UseNavigateStable),n=d.useRef(!1);return Jy(()=>{n.current=!0}),d.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?t.navigate(a):t.navigate(a,Ks({fromRouteId:e},i)))},[t,e])}const fh={};function US(t,e,n){fh[t]||(fh[t]=!0)}function $S(t,e){t?.v7_startTransition,t?.v7_relativeSplatPath===void 0&&(!e||e.v7_relativeSplatPath),e&&(e.v7_fetcherPersist,e.v7_normalizeFormMethod,e.v7_partialHydration,e.v7_skipActionErrorRevalidation)}function qS(t){return PS(t.context)}function zS(t){let{basename:e="/",children:n=null,location:r,navigationType:a=Ct.Pop,navigator:i,static:o=!1,future:s}=t;Ci()&&$e(!1);let l=e.replace(/^\/*/,"/"),c=d.useMemo(()=>({basename:l,navigator:i,static:o,future:Ks({v7_relativeSplatPath:!1},s)}),[l,s,i,o]);typeof r=="string"&&(r=Rr(r));let{pathname:u="/",search:p="",hash:f="",state:m=null,key:h="default"}=r,g=d.useMemo(()=>{let b=Fn(u,l);return b==null?null:{location:{pathname:b,search:p,hash:f,state:m,key:h},navigationType:a}},[l,u,p,f,m,h,a]);return g==null?null:d.createElement(or.Provider,{value:c},d.createElement(Ef.Provider,{children:n,value:g}))}new Promise(()=>{});function KS(t){let e={hasErrorBoundary:t.ErrorBoundary!=null||t.errorElement!=null};return t.Component&&Object.assign(e,{element:d.createElement(t.Component),Component:void 0}),t.HydrateFallback&&Object.assign(e,{hydrateFallbackElement:d.createElement(t.HydrateFallback),HydrateFallback:void 0}),t.ErrorBoundary&&Object.assign(e,{errorElement:d.createElement(t.ErrorBoundary),ErrorBoundary:void 0}),e}function na(){return na=Object.assign?Object.assign.bind():function(t){for(var e=1;e{let r=t[n];return e.concat(Array.isArray(r)?r.map(a=>[n,a]):[[n,r]])},[]))}function JS(t,e){let n=ep(t);return e&&e.forEach((r,a)=>{n.has(a)||e.getAll(a).forEach(i=>{n.append(a,i)})}),n}let ms=null;function ZS(){if(ms===null)try{new FormData(document.createElement("form"),0),ms=!1}catch{ms=!0}return ms}const QS=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ec(t){return t!=null&&!QS.has(t)?null:t}function eC(t,e){let n,r,a,i,o;if(HS(t)){let s=t.getAttribute("action");r=s?Fn(s,e):null,n=t.getAttribute("method")||Ts,a=Ec(t.getAttribute("enctype"))||wc,i=new FormData(t)}else if(GS(t)||WS(t)&&(t.type==="submit"||t.type==="image")){let s=t.form;if(s==null)throw new Error('Cannot submit a