All Downloads are FREE. Search and download functionalities are using the official Maven repository.

theme.keycloak.v2.admin.resources.assets.main-C7ps2lmX.js Maven / Gradle / Ivy

const __vite__fileDeps=["./EmptyStateFooter-C7aJPkYJ.css","./CodeEditor-uVSSJ6xN.css","./PaginatingTableToolbar-epCyHibv.css","./DataListItemRow-ZUMFKqGA.css","./GroupPickerDialog-CbaDMlZz.css","./FlexItem-tFXWL5R6.css","./KeySelect-CabrN3Wz.css","./Td-Dl3OQ1-v.css","./AddRoleMappingModal-BLJEQihC.css","./ViewHeader-BYFHsMok.css","./DynamicComponents-QWeGFChb.css","./Tabs-B495x4zf.css","./ExpandableSection-cN5yF_Ay.css","./DescriptionListTerm-CmoB2Pr4.css","./ListItem-CMcGP2EE.css","./Dashboard-CgtpGMDY.css","./FormAccess-D7lMFJsM.css","./AuthenticationSection-CQSjRKRA.css","./Droppable-CNBpgS4z.css","./FlowDetails-BO9ybQ1o.css","./NewClientForm-DgEg8Uyp.css","./PermissionTab-KawpLT37.css","./RolesList-BEg5xtP0.css","./DatePicker-D3B8ByKh.css","./NewPolicyDialog-CUGo3stg.css","./ClientDetails-BQIx-lwA.css","./ResourceDetails-KB4B34kN.css","./DropdownPanel-BkNaJ_5E.css","./EventsSection-DmG86Mkp.css","./GroupsSection-38FniizK.css","./discovery-settings-B39D0Na9.css","./SamlGeneralSettings-Yt184rIh.css","./ClickableCard-Dja9ooRY.css","./RealmSettingsSection-Ck7mw5nM.css","./realm-settings-section-DF3M4tsm.css","./SessionsSection-Cm_aKQ4_.css","./SettingsCache-CyJTXr8v.css","./CustomProviderSettings-D0xQ741e.css","./UserFederationSection-BtSRJ2eL.css","./user-section-C5iKawzc.css","./EditUser-CzVuyJpm.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
import{jsx as y,jsxs as Fe,Fragment as da}from"react/jsx-runtime";import*as c from"react";import me,{createContext as Ls,useContext as Pl,useState as Ae,useRef as Kt,useEffect as Ct,useCallback as Cr,forwardRef as df,useImperativeHandle as Rb,useMemo as Ot,useId as Pb,Fragment as Il,Children as uf,lazy as ue,Component as Ib,createElement as Tb,isValidElement as kb,Suspense as Lb,StrictMode as Nb}from"react";import*as Ns from"react-dom";import Ab from"react-dom";function Mb(e,t){for(var n=0;nr[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var Qt=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ff(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Db(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,a.get?a:{enumerable:!0,get:function(){return e[r]}})}),n}var pf,ed=Ab;pf=ed.createRoot,ed.hydrateRoot;/**
 * @remix-run/router v1.16.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function nt(){return nt=Object.assign?Object.assign.bind():function(e){for(var t=1;t"u")throw new Error(t)}function or(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function Ub(){return Math.random().toString(36).substr(2,8)}function nd(e,t){return{usr:e.state,key:e.key,idx:t}}function ni(e,t,n,r){return n===void 0&&(n=null),nt({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?Bn(t):t,{state:n,key:t&&t.key||r||Ub()})}function lr(e){let{pathname:t="/",search:n="",hash:r=""}=e;return n&&n!=="?"&&(t+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(t+=r.charAt(0)==="#"?r:"#"+r),t}function Bn(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substr(n),e=e.substr(0,n));let r=e.indexOf("?");r>=0&&(t.search=e.substr(r),e=e.substr(0,r)),e&&(t.pathname=e)}return t}function Bb(e,t,n,r){r===void 0&&(r={});let{window:a=document.defaultView,v5Compat:i=!1}=r,s=a.history,o=ot.Pop,l=null,d=u();d==null&&(d=0,s.replaceState(nt({},s.state,{idx:d}),""));function u(){return(s.state||{idx:null}).idx}function f(){o=ot.Pop;let w=u(),S=w==null?null:w-d;d=w,l&&l({action:o,location:b.location,delta:S})}function p(w,S){o=ot.Push;let P=ni(b.location,w,S);n&&n(P,w),d=u()+1;let A=nd(P,d),N=b.createHref(P);try{s.pushState(A,"",N)}catch(k){if(k instanceof DOMException&&k.name==="DataCloneError")throw k;a.location.assign(N)}i&&l&&l({action:o,location:b.location,delta:1})}function m(w,S){o=ot.Replace;let P=ni(b.location,w,S);n&&n(P,w),d=u();let A=nd(P,d),N=b.createHref(P);s.replaceState(A,"",N),i&&l&&l({action:o,location:b.location,delta:0})}function g(w){let S=a.location.origin!=="null"?a.location.origin:a.location.href,P=typeof w=="string"?w:lr(w);return P=P.replace(/ $/,"%20"),Te(S,"No window.location.(origin|href) available to create URL for href: "+P),new URL(P,S)}let b={get action(){return o},get location(){return e(a,s)},listen(w){if(l)throw new Error("A history only accepts one active listener");return a.addEventListener(td,f),l=w,()=>{a.removeEventListener(td,f),l=null}},createHref(w){return t(a,w)},createURL:g,encodeLocation(w){let S=g(w);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:p,replace:m,go(w){return s.go(w)}};return b}var tt;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(tt||(tt={}));const jb=new Set(["lazy","caseSensitive","path","id","index","children"]);function $b(e){return e.index===!0}function Ho(e,t,n,r){return n===void 0&&(n=[]),r===void 0&&(r={}),e.map((a,i)=>{let s=[...n,i],o=typeof a.id=="string"?a.id:s.join("-");if(Te(a.index!==!0||!a.children,"Cannot specify children on an index route"),Te(!r[o],'Found a route id collision on id "'+o+`".  Route id's must be globally unique within Data Router usages`),$b(a)){let l=nt({},a,t(a),{id:o});return r[o]=l,l}else{let l=nt({},a,t(a),{id:o,children:void 0});return r[o]=l,a.children&&(l.children=Ho(a.children,t,s,r)),l}})}function ta(e,t,n){n===void 0&&(n="/");let r=typeof t=="string"?Bn(t):t,a=tn(r.pathname||"/",n);if(a==null)return null;let i=hf(e);qb(i);let s=null;for(let o=0;s==null&&o{let l={relativePath:o===void 0?i.path||"":o,caseSensitive:i.caseSensitive===!0,childrenIndex:s,route:i};l.relativePath.startsWith("/")&&(Te(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 d=yn([r,l.relativePath]),u=n.concat(l);i.children&&i.children.length>0&&(Te(i.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+d+'".')),hf(i.children,t,u,d)),!(i.path==null&&!i.index)&&t.push({path:d,score:Xb(d,i.index),routesMeta:u})};return e.forEach((i,s)=>{var o;if(i.path===""||!((o=i.path)!=null&&o.includes("?")))a(i,s);else for(let l of gf(i.path))a(i,s,l)}),t}function gf(e){let t=e.split("/");if(t.length===0)return[];let[n,...r]=t,a=n.endsWith("?"),i=n.replace(/\?$/,"");if(r.length===0)return a?[i,""]:[i];let s=gf(r.join("/")),o=[];return o.push(...s.map(l=>l===""?i:[i,l].join("/"))),a&&o.push(...s),o.map(l=>e.startsWith("/")&&l===""?"/":l)}function qb(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:Jb(t.routesMeta.map(r=>r.childrenIndex),n.routesMeta.map(r=>r.childrenIndex)))}const Kb=/^:[\w-]+$/,Vb=3,Hb=2,zb=1,Gb=10,Wb=-2,rd=e=>e==="*";function Xb(e,t){let n=e.split("/"),r=n.length;return n.some(rd)&&(r+=Wb),t&&(r+=Hb),n.filter(a=>!rd(a)).reduce((a,i)=>a+(Kb.test(i)?Vb:i===""?zb:Gb),r)}function Jb(e,t){return e.length===t.length&&e.slice(0,-1).every((r,a)=>r===t[a])?e[e.length-1]-t[t.length-1]:0}function Yb(e,t){let{routesMeta:n}=e,r={},a="/",i=[];for(let s=0;ss==null?"":typeof s=="string"?s:String(s),i=n.split(/\/+/).map((s,o,l)=>{if(o===l.length-1&&s==="*")return a(t["*"]);const u=s.match(/^:([\w-]+)(\??)$/);if(u){const[,f,p]=u;let m=t[f];return Te(p==="?"||m!=null,'Missing ":'+f+'" param'),a(m)}return s.replace(/\?$/g,"")}).filter(s=>!!s);return r+i.join("/")}function Sr(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Zb(e.path,e.caseSensitive,e.end),a=t.match(n);if(!a)return null;let i=a[0],s=i.replace(/(.)\/+$/,"$1"),o=a.slice(1);return{params:r.reduce((d,u,f)=>{let{paramName:p,isOptional:m}=u;if(p==="*"){let b=o[f]||"";s=i.slice(0,i.length-b.length).replace(/(.)\/+$/,"$1")}const g=o[f];return m&&!g?d[p]=void 0:d[p]=(g||"").replace(/%2F/g,"/"),d},{}),pathname:i,pathnameBase:s,pattern:e}}function Zb(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!0),or(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let r=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(s,o,l)=>(r.push({paramName:o,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return e.endsWith("*")?(r.push({paramName:"*"}),a+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?a+="\\/*$":e!==""&&e!=="/"&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),r]}function Qb(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return or(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+t+").")),e}}function tn(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,r=e.charAt(n);return r&&r!=="/"?null:e.slice(n)||"/"}function ev(e,t){t===void 0&&(t="/");let{pathname:n,search:r="",hash:a=""}=typeof e=="string"?Bn(e):e;return{pathname:n?n.startsWith("/")?n:tv(n,t):t,search:rv(r),hash:av(a)}}function tv(e,t){let n=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(a=>{a===".."?n.length>1&&n.pop():a!=="."&&n.push(a)}),n.length>1?n.join("/"):"/"}function po(e,t,n,r){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(r)+"].  Please separate it out to the ")+("`to."+n+"` field. Alternatively you may provide the full path as ")+'a string in  and the router will parse it for you.'}function bf(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Tl(e,t){let n=bf(e);return t?n.map((r,a)=>a===e.length-1?r.pathname:r.pathnameBase):n.map(r=>r.pathnameBase)}function kl(e,t,n,r){r===void 0&&(r=!1);let a;typeof e=="string"?a=Bn(e):(a=nt({},e),Te(!a.pathname||!a.pathname.includes("?"),po("?","pathname","search",a)),Te(!a.pathname||!a.pathname.includes("#"),po("#","pathname","hash",a)),Te(!a.search||!a.search.includes("#"),po("#","search","hash",a)));let i=e===""||a.pathname==="",s=i?"/":a.pathname,o;if(s==null)o=n;else{let f=t.length-1;if(!r&&s.startsWith("..")){let p=s.split("/");for(;p[0]==="..";)p.shift(),f-=1;a.pathname=p.join("/")}o=f>=0?t[f]:"/"}let l=ev(a,o),d=s&&s!=="/"&&s.endsWith("/"),u=(i||s===".")&&n.endsWith("/");return!l.pathname.endsWith("/")&&(d||u)&&(l.pathname+="/"),l}const yn=e=>e.join("/").replace(/\/\/+/g,"/"),nv=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),rv=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,av=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e;class Ll{constructor(t,n,r,a){a===void 0&&(a=!1),this.status=t,this.statusText=n||"",this.internal=a,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}}function Nl(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}const vf=["post","put","patch","delete"],iv=new Set(vf),sv=["get",...vf],ov=new Set(sv),lv=new Set([301,302,303,307,308]),cv=new Set([307,308]),mo={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},dv={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},ka={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Al=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,uv=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),yf="remix-router-transitions";function fv(e){const t=e.window?e.window:typeof window<"u"?window:void 0,n=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u",r=!n;Te(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a;if(e.mapRouteProperties)a=e.mapRouteProperties;else if(e.detectErrorBoundary){let j=e.detectErrorBoundary;a=G=>({hasErrorBoundary:j(G)})}else a=uv;let i={},s=Ho(e.routes,a,void 0,i),o,l=e.basename||"/",d=e.unstable_dataStrategy||gv,u=nt({v7_fetcherPersist:!1,v7_normalizeFormMethod:!1,v7_partialHydration:!1,v7_prependBasename:!1,v7_relativeSplatPath:!1,unstable_skipActionErrorRevalidation:!1},e.future),f=null,p=new Set,m=null,g=null,b=null,w=e.hydrationData!=null,S=ta(s,e.history.location,l),P=null;if(S==null){let j=Bt(404,{pathname:e.history.location.pathname}),{matches:G,route:ee}=pd(s);S=G,P={[ee.id]:j}}let A,N=S.some(j=>j.route.lazy),k=S.some(j=>j.route.loader);if(N)A=!1;else if(!k)A=!0;else if(u.v7_partialHydration){let j=e.hydrationData?e.hydrationData.loaderData:null,G=e.hydrationData?e.hydrationData.errors:null,ee=oe=>oe.route.loader?typeof oe.route.loader=="function"&&oe.route.loader.hydrate===!0?!1:j&&j[oe.route.id]!==void 0||G&&G[oe.route.id]!==void 0:!0;if(G){let oe=S.findIndex(he=>G[he.route.id]!==void 0);A=S.slice(0,oe+1).every(ee)}else A=S.every(ee)}else A=e.hydrationData!=null;let v,h={historyAction:e.history.action,location:e.history.location,matches:S,initialized:A,navigation:mo,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||P,fetchers:new Map,blockers:new Map},L=ot.Pop,R=!1,I,x=!1,E=new Map,_=null,B=!1,O=!1,U=[],z=[],q=new Map,X=0,re=-1,C=new Map,D=new Set,K=new Map,H=new Map,V=new Set,Y=new Map,Z=new Map,Q=!1;function ae(){if(f=e.history.listen(j=>{let{action:G,location:ee,delta:oe}=j;if(Q){Q=!1;return}or(Z.size===0||oe!=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 he=Gn({currentLocation:h.location,nextLocation:ee,historyAction:G});if(he&&oe!=null){Q=!0,e.history.go(oe*-1),un(he,{state:"blocked",location:ee,proceed(){un(he,{state:"proceeding",proceed:void 0,reset:void 0,location:ee}),e.history.go(oe)},reset(){let Ie=new Map(h.blockers);Ie.set(he,ka),ce({blockers:Ie})}});return}return De(G,ee)}),n){Pv(t,E);let j=()=>Iv(t,E);t.addEventListener("pagehide",j),_=()=>t.removeEventListener("pagehide",j)}return h.initialized||De(ot.Pop,h.location,{initialHydration:!0}),v}function W(){f&&f(),_&&_(),p.clear(),I&&I.abort(),h.fetchers.forEach((j,G)=>Ne(G)),h.blockers.forEach((j,G)=>Wt(G))}function se(j){return p.add(j),()=>p.delete(j)}function ce(j,G){G===void 0&&(G={}),h=nt({},h,j);let ee=[],oe=[];u.v7_fetcherPersist&&h.fetchers.forEach((he,Ie)=>{he.state==="idle"&&(V.has(Ie)?oe.push(Ie):ee.push(Ie))}),[...p].forEach(he=>he(h,{deletedFetchers:oe,unstable_viewTransitionOpts:G.viewTransitionOpts,unstable_flushSync:G.flushSync===!0})),u.v7_fetcherPersist&&(ee.forEach(he=>h.fetchers.delete(he)),oe.forEach(he=>Ne(he)))}function ke(j,G,ee){var oe,he;let{flushSync:Ie}=ee===void 0?{}:ee,xe=h.actionData!=null&&h.navigation.formMethod!=null&&Jt(h.navigation.formMethod)&&h.navigation.state==="loading"&&((oe=j.state)==null?void 0:oe._isRedirect)!==!0,ve;G.actionData?Object.keys(G.actionData).length>0?ve=G.actionData:ve=null:xe?ve=h.actionData:ve=null;let Le=G.loaderData?ud(h.loaderData,G.loaderData,G.matches||[],G.errors):h.loaderData,Re=h.blockers;Re.size>0&&(Re=new Map(Re),Re.forEach((Oe,Qe)=>Re.set(Qe,ka)));let yt=R===!0||h.navigation.formMethod!=null&&Jt(h.navigation.formMethod)&&((he=j.state)==null?void 0:he._isRedirect)!==!0;o&&(s=o,o=void 0),B||L===ot.Pop||(L===ot.Push?e.history.push(j,j.state):L===ot.Replace&&e.history.replace(j,j.state));let wt;if(L===ot.Pop){let Oe=E.get(h.location.pathname);Oe&&Oe.has(j.pathname)?wt={currentLocation:h.location,nextLocation:j}:E.has(j.pathname)&&(wt={currentLocation:j,nextLocation:h.location})}else if(x){let Oe=E.get(h.location.pathname);Oe?Oe.add(j.pathname):(Oe=new Set([j.pathname]),E.set(h.location.pathname,Oe)),wt={currentLocation:h.location,nextLocation:j}}ce(nt({},G,{actionData:ve,loaderData:Le,historyAction:L,location:j,initialized:!0,navigation:mo,revalidation:"idle",restoreScrollPosition:We(j,G.matches||h.matches),preventScrollReset:yt,blockers:Re}),{viewTransitionOpts:wt,flushSync:Ie===!0}),L=ot.Pop,R=!1,x=!1,B=!1,O=!1,U=[],z=[]}async function Ke(j,G){if(typeof j=="number"){e.history.go(j);return}let ee=zo(h.location,h.matches,l,u.v7_prependBasename,j,u.v7_relativeSplatPath,G?.fromRouteId,G?.relative),{path:oe,submission:he,error:Ie}=ad(u.v7_normalizeFormMethod,!1,ee,G),xe=h.location,ve=ni(h.location,oe,G&&G.state);ve=nt({},ve,e.history.encodeLocation(ve));let Le=G&&G.replace!=null?G.replace:void 0,Re=ot.Push;Le===!0?Re=ot.Replace:Le===!1||he!=null&&Jt(he.formMethod)&&he.formAction===h.location.pathname+h.location.search&&(Re=ot.Replace);let yt=G&&"preventScrollReset"in G?G.preventScrollReset===!0:void 0,wt=(G&&G.unstable_flushSync)===!0,Oe=Gn({currentLocation:xe,nextLocation:ve,historyAction:Re});if(Oe){un(Oe,{state:"blocked",location:ve,proceed(){un(Oe,{state:"proceeding",proceed:void 0,reset:void 0,location:ve}),Ke(j,G)},reset(){let Qe=new Map(h.blockers);Qe.set(Oe,ka),ce({blockers:Qe})}});return}return await De(Re,ve,{submission:he,pendingError:Ie,preventScrollReset:yt,replace:G&&G.replace,enableViewTransition:G&&G.unstable_viewTransition,flushSync:wt})}function je(){if(le(),ce({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){De(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}De(L||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation})}}async function De(j,G,ee){I&&I.abort(),I=null,L=j,B=(ee&&ee.startUninterruptedRevalidation)===!0,Se(h.location,h.matches),R=(ee&&ee.preventScrollReset)===!0,x=(ee&&ee.enableViewTransition)===!0;let oe=o||s,he=ee&&ee.overrideNavigation,Ie=ta(oe,G,l),xe=(ee&&ee.flushSync)===!0;if(!Ie){let Oe=Bt(404,{pathname:G.pathname}),{matches:Qe,route:ht}=pd(oe);qr(),ke(G,{matches:Qe,loaderData:{},errors:{[ht.id]:Oe}},{flushSync:xe});return}if(h.initialized&&!O&&Ev(h.location,G)&&!(ee&&ee.submission&&Jt(ee.submission.formMethod))){ke(G,{matches:Ie},{flushSync:xe});return}I=new AbortController;let ve=zr(e.history,G,I.signal,ee&&ee.submission),Le;if(ee&&ee.pendingError)Le=[za(Ie).route.id,{type:tt.error,error:ee.pendingError}];else if(ee&&ee.submission&&Jt(ee.submission.formMethod)){let Oe=await Ye(ve,G,ee.submission,Ie,{replace:ee.replace,flushSync:xe});if(Oe.shortCircuited)return;Le=Oe.pendingActionResult,he=ho(G,ee.submission),xe=!1,ve=zr(e.history,ve.url,ve.signal)}let{shortCircuited:Re,loaderData:yt,errors:wt}=await M(ve,G,Ie,he,ee&&ee.submission,ee&&ee.fetcherSubmission,ee&&ee.replace,ee&&ee.initialHydration===!0,xe,Le);Re||(I=null,ke(G,nt({matches:Ie},fd(Le),{loaderData:yt,errors:wt})))}async function Ye(j,G,ee,oe,he){he===void 0&&(he={}),le();let Ie=Sv(G,ee);ce({navigation:Ie},{flushSync:he.flushSync===!0});let xe,ve=Wo(oe,G);if(!ve.route.action&&!ve.route.lazy)xe={type:tt.error,error:Bt(405,{method:j.method,pathname:G.pathname,routeId:ve.route.id})};else if(xe=(await te("action",j,[ve],oe))[0],j.signal.aborted)return{shortCircuited:!0};if(Er(xe)){let Le;return he&&he.replace!=null?Le=he.replace:Le=ld(xe.response.headers.get("Location"),new URL(j.url),l)===h.location.pathname+h.location.search,await ie(j,xe,{submission:ee,replace:Le}),{shortCircuited:!0}}if(xr(xe))throw Bt(400,{type:"defer-action"});if($t(xe)){let Le=za(oe,ve.route.id);return(he&&he.replace)!==!0&&(L=ot.Push),{pendingActionResult:[Le.route.id,xe]}}return{pendingActionResult:[ve.route.id,xe]}}async function M(j,G,ee,oe,he,Ie,xe,ve,Le,Re){let yt=oe||ho(G,he),wt=he||Ie||gd(yt),Oe=o||s,[Qe,ht]=id(e.history,h,ee,wt,G,u.v7_partialHydration&&ve===!0,u.unstable_skipActionErrorRevalidation,O,U,z,V,K,D,Oe,l,Re);if(qr(Be=>!(ee&&ee.some(Pt=>Pt.route.id===Be))||Qe&&Qe.some(Pt=>Pt.route.id===Be)),re=++X,Qe.length===0&&ht.length===0){let Be=Ze();return ke(G,nt({matches:ee,loaderData:{},errors:Re&&$t(Re[1])?{[Re[0]]:Re[1].error}:null},fd(Re),Be?{fetchers:new Map(h.fetchers)}:{}),{flushSync:Le}),{shortCircuited:!0}}if(!B&&(!u.v7_partialHydration||!ve)){ht.forEach(Pt=>{let Ft=h.fetchers.get(Pt.key),xt=La(void 0,Ft?Ft.data:void 0);h.fetchers.set(Pt.key,xt)});let Be;Re&&!$t(Re[1])?Be={[Re[0]]:Re[1].data}:h.actionData&&(Object.keys(h.actionData).length===0?Be=null:Be=h.actionData),ce(nt({navigation:yt},Be!==void 0?{actionData:Be}:{},ht.length>0?{fetchers:new Map(h.fetchers)}:{}),{flushSync:Le})}ht.forEach(Be=>{q.has(Be.key)&&be(Be.key),Be.controller&&q.set(Be.key,Be.controller)});let Ia=()=>ht.forEach(Be=>be(Be.key));I&&I.signal.addEventListener("abort",Ia);let{loaderResults:Wn,fetcherResults:Kr}=await pe(h.matches,ee,Qe,ht,j);if(j.signal.aborted)return{shortCircuited:!0};I&&I.signal.removeEventListener("abort",Ia),ht.forEach(Be=>q.delete(Be.key));let Vr=md([...Wn,...Kr]);if(Vr){if(Vr.idx>=Qe.length){let Be=ht[Vr.idx-Qe.length].key;D.add(Be)}return await ie(j,Vr.result,{replace:xe}),{shortCircuited:!0}}let{loaderData:Hr,errors:fn}=dd(h,ee,Qe,Wn,Re,ht,Kr,Y);Y.forEach((Be,Pt)=>{Be.subscribe(Ft=>{(Ft||Be.done)&&Y.delete(Pt)})}),u.v7_partialHydration&&ve&&h.errors&&Object.entries(h.errors).filter(Be=>{let[Pt]=Be;return!Qe.some(Ft=>Ft.route.id===Pt)}).forEach(Be=>{let[Pt,Ft]=Be;fn=Object.assign(fn||{},{[Pt]:Ft})});let Ai=Ze(),Mi=Rt(re),Di=Ai||Mi||ht.length>0;return nt({loaderData:Hr,errors:fn},Di?{fetchers:new Map(h.fetchers)}:{})}function F(j,G,ee,oe){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.");q.has(j)&&be(j);let he=(oe&&oe.unstable_flushSync)===!0,Ie=o||s,xe=zo(h.location,h.matches,l,u.v7_prependBasename,ee,u.v7_relativeSplatPath,G,oe?.relative),ve=ta(Ie,xe,l);if(!ve){Ce(j,G,Bt(404,{pathname:xe}),{flushSync:he});return}let{path:Le,submission:Re,error:yt}=ad(u.v7_normalizeFormMethod,!0,xe,oe);if(yt){Ce(j,G,yt,{flushSync:he});return}let wt=Wo(ve,Le);if(R=(oe&&oe.preventScrollReset)===!0,Re&&Jt(Re.formMethod)){$(j,G,Le,wt,ve,he,Re);return}K.set(j,{routeId:G,path:Le}),ne(j,G,Le,wt,ve,he,Re)}async function $(j,G,ee,oe,he,Ie,xe){if(le(),K.delete(j),!oe.route.action&&!oe.route.lazy){let xt=Bt(405,{method:xe.formMethod,pathname:ee,routeId:G});Ce(j,G,xt,{flushSync:Ie});return}let ve=h.fetchers.get(j);we(j,Rv(xe,ve),{flushSync:Ie});let Le=new AbortController,Re=zr(e.history,ee,Le.signal,xe);q.set(j,Le);let yt=X,Oe=(await te("action",Re,[oe],he))[0];if(Re.signal.aborted){q.get(j)===Le&&q.delete(j);return}if(u.v7_fetcherPersist&&V.has(j)){if(Er(Oe)||$t(Oe)){we(j,Qn(void 0));return}}else{if(Er(Oe))if(q.delete(j),re>yt){we(j,Qn(void 0));return}else return D.add(j),we(j,La(xe)),ie(Re,Oe,{fetcherSubmission:xe});if($t(Oe)){Ce(j,G,Oe.error);return}}if(xr(Oe))throw Bt(400,{type:"defer-action"});let Qe=h.navigation.location||h.location,ht=zr(e.history,Qe,Le.signal),Ia=o||s,Wn=h.navigation.state!=="idle"?ta(Ia,h.navigation.location,l):h.matches;Te(Wn,"Didn't find any matches after fetcher action");let Kr=++X;C.set(j,Kr);let Vr=La(xe,Oe.data);h.fetchers.set(j,Vr);let[Hr,fn]=id(e.history,h,Wn,xe,Qe,!1,u.unstable_skipActionErrorRevalidation,O,U,z,V,K,D,Ia,l,[oe.route.id,Oe]);fn.filter(xt=>xt.key!==j).forEach(xt=>{let Ta=xt.key,Qc=h.fetchers.get(Ta),Sb=La(void 0,Qc?Qc.data:void 0);h.fetchers.set(Ta,Sb),q.has(Ta)&&be(Ta),xt.controller&&q.set(Ta,xt.controller)}),ce({fetchers:new Map(h.fetchers)});let Ai=()=>fn.forEach(xt=>be(xt.key));Le.signal.addEventListener("abort",Ai);let{loaderResults:Mi,fetcherResults:Di}=await pe(h.matches,Wn,Hr,fn,ht);if(Le.signal.aborted)return;Le.signal.removeEventListener("abort",Ai),C.delete(j),q.delete(j),fn.forEach(xt=>q.delete(xt.key));let Be=md([...Mi,...Di]);if(Be){if(Be.idx>=Hr.length){let xt=fn[Be.idx-Hr.length].key;D.add(xt)}return ie(ht,Be.result)}let{loaderData:Pt,errors:Ft}=dd(h,h.matches,Hr,Mi,void 0,fn,Di,Y);if(h.fetchers.has(j)){let xt=Qn(Oe.data);h.fetchers.set(j,xt)}Rt(Kr),h.navigation.state==="loading"&&Kr>re?(Te(L,"Expected pending action"),I&&I.abort(),ke(h.navigation.location,{matches:Wn,loaderData:Pt,errors:Ft,fetchers:new Map(h.fetchers)})):(ce({errors:Ft,loaderData:ud(h.loaderData,Pt,Wn,Ft),fetchers:new Map(h.fetchers)}),O=!1)}async function ne(j,G,ee,oe,he,Ie,xe){let ve=h.fetchers.get(j);we(j,La(xe,ve?ve.data:void 0),{flushSync:Ie});let Le=new AbortController,Re=zr(e.history,ee,Le.signal);q.set(j,Le);let yt=X,Oe=(await te("loader",Re,[oe],he))[0];if(xr(Oe)&&(Oe=await Of(Oe,Re.signal,!0)||Oe),q.get(j)===Le&&q.delete(j),!Re.signal.aborted){if(V.has(j)){we(j,Qn(void 0));return}if(Er(Oe))if(re>yt){we(j,Qn(void 0));return}else{D.add(j),await ie(Re,Oe);return}if($t(Oe)){Ce(j,G,Oe.error);return}Te(!xr(Oe),"Unhandled fetcher deferred data"),we(j,Qn(Oe.data))}}async function ie(j,G,ee){let{submission:oe,fetcherSubmission:he,replace:Ie}=ee===void 0?{}:ee;G.response.headers.has("X-Remix-Revalidate")&&(O=!0);let xe=G.response.headers.get("Location");Te(xe,"Expected a Location header on the redirect Response"),xe=ld(xe,new URL(j.url),l);let ve=ni(h.location,xe,{_isRedirect:!0});if(n){let Qe=!1;if(G.response.headers.has("X-Remix-Reload-Document"))Qe=!0;else if(Al.test(xe)){const ht=e.history.createURL(xe);Qe=ht.origin!==t.location.origin||tn(ht.pathname,l)==null}if(Qe){Ie?t.location.replace(xe):t.location.assign(xe);return}}I=null;let Le=Ie===!0?ot.Replace:ot.Push,{formMethod:Re,formAction:yt,formEncType:wt}=h.navigation;!oe&&!he&&Re&&yt&&wt&&(oe=gd(h.navigation));let Oe=oe||he;if(cv.has(G.response.status)&&Oe&&Jt(Oe.formMethod))await De(Le,ve,{submission:nt({},Oe,{formAction:xe}),preventScrollReset:R});else{let Qe=ho(ve,oe);await De(Le,ve,{overrideNavigation:Qe,fetcherSubmission:he,preventScrollReset:R})}}async function te(j,G,ee,oe){try{let he=await bv(d,j,G,ee,oe,i,a);return await Promise.all(he.map((Ie,xe)=>{if(Ov(Ie)){let ve=Ie.result;return{type:tt.redirect,response:wv(ve,G,ee[xe].route.id,oe,l,u.v7_relativeSplatPath)}}return yv(Ie)}))}catch(he){return ee.map(()=>({type:tt.error,error:he}))}}async function pe(j,G,ee,oe,he){let[Ie,...xe]=await Promise.all([ee.length?te("loader",he,ee,G):[],...oe.map(ve=>{if(ve.matches&&ve.match&&ve.controller){let Le=zr(e.history,ve.path,ve.controller.signal);return te("loader",Le,[ve.match],ve.matches).then(Re=>Re[0])}else return Promise.resolve({type:tt.error,error:Bt(404,{pathname:ve.path})})})]);return await Promise.all([hd(j,ee,Ie,Ie.map(()=>he.signal),!1,h.loaderData),hd(j,oe.map(ve=>ve.match),xe,oe.map(ve=>ve.controller?ve.controller.signal:null),!0)]),{loaderResults:Ie,fetcherResults:xe}}function le(){O=!0,U.push(...qr()),K.forEach((j,G)=>{q.has(G)&&(z.push(G),be(G))})}function we(j,G,ee){ee===void 0&&(ee={}),h.fetchers.set(j,G),ce({fetchers:new Map(h.fetchers)},{flushSync:(ee&&ee.flushSync)===!0})}function Ce(j,G,ee,oe){oe===void 0&&(oe={});let he=za(h.matches,G);Ne(j),ce({errors:{[he.route.id]:ee},fetchers:new Map(h.fetchers)},{flushSync:(oe&&oe.flushSync)===!0})}function ye(j){return u.v7_fetcherPersist&&(H.set(j,(H.get(j)||0)+1),V.has(j)&&V.delete(j)),h.fetchers.get(j)||dv}function Ne(j){let G=h.fetchers.get(j);q.has(j)&&!(G&&G.state==="loading"&&C.has(j))&&be(j),K.delete(j),C.delete(j),D.delete(j),V.delete(j),h.fetchers.delete(j)}function rt(j){if(u.v7_fetcherPersist){let G=(H.get(j)||0)-1;G<=0?(H.delete(j),V.add(j)):H.set(j,G)}else Ne(j);ce({fetchers:new Map(h.fetchers)})}function be(j){let G=q.get(j);Te(G,"Expected fetch controller: "+j),G.abort(),q.delete(j)}function Ue(j){for(let G of j){let ee=ye(G),oe=Qn(ee.data);h.fetchers.set(G,oe)}}function Ze(){let j=[],G=!1;for(let ee of D){let oe=h.fetchers.get(ee);Te(oe,"Expected fetcher: "+ee),oe.state==="loading"&&(D.delete(ee),j.push(ee),G=!0)}return Ue(j),G}function Rt(j){let G=[];for(let[ee,oe]of C)if(oe0}function Gt(j,G){let ee=h.blockers.get(j)||ka;return Z.get(j)!==G&&Z.set(j,G),ee}function Wt(j){h.blockers.delete(j),Z.delete(j)}function un(j,G){let ee=h.blockers.get(j)||ka;Te(ee.state==="unblocked"&&G.state==="blocked"||ee.state==="blocked"&&G.state==="blocked"||ee.state==="blocked"&&G.state==="proceeding"||ee.state==="blocked"&&G.state==="unblocked"||ee.state==="proceeding"&&G.state==="unblocked","Invalid blocker state transition: "+ee.state+" -> "+G.state);let oe=new Map(h.blockers);oe.set(j,G),ce({blockers:oe})}function Gn(j){let{currentLocation:G,nextLocation:ee,historyAction:oe}=j;if(Z.size===0)return;Z.size>1&&or(!1,"A router only supports one blocker at a time");let he=Array.from(Z.entries()),[Ie,xe]=he[he.length-1],ve=h.blockers.get(Ie);if(!(ve&&ve.state==="proceeding")&&xe({currentLocation:G,nextLocation:ee,historyAction:oe}))return Ie}function qr(j){let G=[];return Y.forEach((ee,oe)=>{(!j||j(oe))&&(ee.cancel(),G.push(oe),Y.delete(oe))}),G}function Li(j,G,ee){if(m=j,b=G,g=ee||null,!w&&h.navigation===mo){w=!0;let oe=We(h.location,h.matches);oe!=null&&ce({restoreScrollPosition:oe})}return()=>{m=null,b=null,g=null}}function Ni(j,G){return g&&g(j,G.map(oe=>mf(oe,h.loaderData)))||j.key}function Se(j,G){if(m&&b){let ee=Ni(j,G);m[ee]=b()}}function We(j,G){if(m){let ee=Ni(j,G),oe=m[ee];if(typeof oe=="number")return oe}return null}function kn(j){i={},o=Ho(j,a,void 0,i)}return v={get basename(){return l},get future(){return u},get state(){return h},get routes(){return s},get window(){return t},initialize:ae,subscribe:se,enableScrollRestoration:Li,navigate:Ke,fetch:F,revalidate:je,createHref:j=>e.history.createHref(j),encodeLocation:j=>e.history.encodeLocation(j),getFetcher:ye,deleteFetcher:rt,dispose:W,getBlocker:Gt,deleteBlocker:Wt,_internalFetchControllers:q,_internalActiveDeferreds:Y,_internalSetRoutes:kn},v}function pv(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function zo(e,t,n,r,a,i,s,o){let l,d;if(s){l=[];for(let f of t)if(l.push(f),f.route.id===s){d=f;break}}else l=t,d=t[t.length-1];let u=kl(a||".",Tl(l,i),tn(e.pathname,n)||e.pathname,o==="path");return a==null&&(u.search=e.search,u.hash=e.hash),(a==null||a===""||a===".")&&d&&d.route.index&&!Ml(u.search)&&(u.search=u.search?u.search.replace(/^\?/,"?index&"):"?index"),r&&n!=="/"&&(u.pathname=u.pathname==="/"?n:yn([n,u.pathname])),lr(u)}function ad(e,t,n,r){if(!r||!pv(r))return{path:n};if(r.formMethod&&!Cv(r.formMethod))return{path:n,error:Bt(405,{method:r.formMethod})};let a=()=>({path:n,error:Bt(400,{type:"invalid-body"})}),i=r.formMethod||"get",s=e?i.toUpperCase():i.toLowerCase(),o=xf(n);if(r.body!==void 0){if(r.formEncType==="text/plain"){if(!Jt(s))return a();let p=typeof r.body=="string"?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((m,g)=>{let[b,w]=g;return""+m+b+"="+w+`
`},""):String(r.body);return{path:n,submission:{formMethod:s,formAction:o,formEncType:r.formEncType,formData:void 0,json:void 0,text:p}}}else if(r.formEncType==="application/json"){if(!Jt(s))return a();try{let p=typeof r.body=="string"?JSON.parse(r.body):r.body;return{path:n,submission:{formMethod:s,formAction:o,formEncType:r.formEncType,formData:void 0,json:p,text:void 0}}}catch{return a()}}}Te(typeof FormData=="function","FormData is not available in this environment");let l,d;if(r.formData)l=Go(r.formData),d=r.formData;else if(r.body instanceof FormData)l=Go(r.body),d=r.body;else if(r.body instanceof URLSearchParams)l=r.body,d=cd(l);else if(r.body==null)l=new URLSearchParams,d=new FormData;else try{l=new URLSearchParams(r.body),d=cd(l)}catch{return a()}let u={formMethod:s,formAction:o,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(Jt(u.formMethod))return{path:n,submission:u};let f=Bn(n);return t&&f.search&&Ml(f.search)&&l.append("index",""),f.search="?"+l,{path:lr(f),submission:u}}function mv(e,t){let n=e;if(t){let r=e.findIndex(a=>a.route.id===t);r>=0&&(n=e.slice(0,r))}return n}function id(e,t,n,r,a,i,s,o,l,d,u,f,p,m,g,b){let w=b?$t(b[1])?b[1].error:b[1].data:void 0,S=e.createURL(t.location),P=e.createURL(a),A=b&&$t(b[1])?b[0]:void 0,N=A?mv(n,A):n,k=b?b[1].statusCode:void 0,v=s&&k&&k>=400,h=N.filter((R,I)=>{let{route:x}=R;if(x.lazy)return!0;if(x.loader==null)return!1;if(i)return typeof x.loader!="function"||x.loader.hydrate?!0:t.loaderData[x.id]===void 0&&(!t.errors||t.errors[x.id]===void 0);if(hv(t.loaderData,t.matches[I],R)||l.some(B=>B===R.route.id))return!0;let E=t.matches[I],_=R;return sd(R,nt({currentUrl:S,currentParams:E.params,nextUrl:P,nextParams:_.params},r,{actionResult:w,unstable_actionStatus:k,defaultShouldRevalidate:v?!1:o||S.pathname+S.search===P.pathname+P.search||S.search!==P.search||wf(E,_)}))}),L=[];return f.forEach((R,I)=>{if(i||!n.some(O=>O.route.id===R.routeId)||u.has(I))return;let x=ta(m,R.path,g);if(!x){L.push({key:I,routeId:R.routeId,path:R.path,matches:null,match:null,controller:null});return}let E=t.fetchers.get(I),_=Wo(x,R.path),B=!1;p.has(I)?B=!1:d.includes(I)?B=!0:E&&E.state!=="idle"&&E.data===void 0?B=o:B=sd(_,nt({currentUrl:S,currentParams:t.matches[t.matches.length-1].params,nextUrl:P,nextParams:n[n.length-1].params},r,{actionResult:w,unstable_actionStatus:k,defaultShouldRevalidate:v?!1:o})),B&&L.push({key:I,routeId:R.routeId,path:R.path,matches:x,match:_,controller:new AbortController})}),[h,L]}function hv(e,t,n){let r=!t||n.route.id!==t.route.id,a=e[n.route.id]===void 0;return r||a}function wf(e,t){let n=e.route.path;return e.pathname!==t.pathname||n!=null&&n.endsWith("*")&&e.params["*"]!==t.params["*"]}function sd(e,t){if(e.route.shouldRevalidate){let n=e.route.shouldRevalidate(t);if(typeof n=="boolean")return n}return t.defaultShouldRevalidate}async function od(e,t,n){if(!e.lazy)return;let r=await e.lazy();if(!e.lazy)return;let a=n[e.id];Te(a,"No route found in manifest");let i={};for(let s in r){let l=a[s]!==void 0&&s!=="hasErrorBoundary";or(!l,'Route "'+a.id+'" has a static property "'+s+'" defined but its lazy function is also returning a value for this property. '+('The lazy route property "'+s+'" will be ignored.')),!l&&!jb.has(s)&&(i[s]=r[s])}Object.assign(a,i),Object.assign(a,nt({},t(a),{lazy:void 0}))}function gv(e){return Promise.all(e.matches.map(t=>t.resolve()))}async function bv(e,t,n,r,a,i,s,o){let l=r.reduce((f,p)=>f.add(p.route.id),new Set),d=new Set,u=await e({matches:a.map(f=>{let p=l.has(f.route.id);return nt({},f,{shouldLoad:p,resolve:g=>(d.add(f.route.id),p?vv(t,n,f,i,s,g,o):Promise.resolve({type:tt.data,result:void 0}))})}),request:n,params:a[0].params,context:o});return a.forEach(f=>Te(d.has(f.route.id),'`match.resolve()` was not called for route id "'+f.route.id+'". You must call `match.resolve()` on every match passed to `dataStrategy` to ensure all routes are properly loaded.')),u.filter((f,p)=>l.has(a[p].route.id))}async function vv(e,t,n,r,a,i,s){let o,l,d=u=>{let f,p=new Promise((b,w)=>f=w);l=()=>f(),t.signal.addEventListener("abort",l);let m=b=>typeof u!="function"?Promise.reject(new Error("You cannot call the handler for a route which defines a boolean "+('"'+e+'" [routeId: '+n.route.id+"]"))):u({request:t,params:n.params,context:s},...b!==void 0?[b]:[]),g;return i?g=i(b=>m(b)):g=(async()=>{try{return{type:"data",result:await m()}}catch(b){return{type:"error",result:b}}})(),Promise.race([g,p])};try{let u=n.route[e];if(n.route.lazy)if(u){let f,[p]=await Promise.all([d(u).catch(m=>{f=m}),od(n.route,a,r)]);if(f!==void 0)throw f;o=p}else if(await od(n.route,a,r),u=n.route[e],u)o=await d(u);else if(e==="action"){let f=new URL(t.url),p=f.pathname+f.search;throw Bt(405,{method:t.method,pathname:p,routeId:n.route.id})}else return{type:tt.data,result:void 0};else if(u)o=await d(u);else{let f=new URL(t.url),p=f.pathname+f.search;throw Bt(404,{pathname:p})}Te(o.result!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+n.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(u){return{type:tt.error,result:u}}finally{l&&t.signal.removeEventListener("abort",l)}return o}async function yv(e){let{result:t,type:n,status:r}=e;if(Ef(t)){let s;try{let o=t.headers.get("Content-Type");o&&/\bapplication\/json\b/.test(o)?t.body==null?s=null:s=await t.json():s=await t.text()}catch(o){return{type:tt.error,error:o}}return n===tt.error?{type:tt.error,error:new Ll(t.status,t.statusText,s),statusCode:t.status,headers:t.headers}:{type:tt.data,data:s,statusCode:t.status,headers:t.headers}}if(n===tt.error)return{type:tt.error,error:t,statusCode:Nl(t)?t.status:r};if(_v(t)){var a,i;return{type:tt.deferred,deferredData:t,statusCode:(a=t.init)==null?void 0:a.status,headers:((i=t.init)==null?void 0:i.headers)&&new Headers(t.init.headers)}}return{type:tt.data,data:t,statusCode:r}}function wv(e,t,n,r,a,i){let s=e.headers.get("Location");if(Te(s,"Redirects returned/thrown from loaders/actions must have a Location header"),!Al.test(s)){let o=r.slice(0,r.findIndex(l=>l.route.id===n)+1);s=zo(new URL(t.url),o,a,!0,s,i),e.headers.set("Location",s)}return e}function ld(e,t,n){if(Al.test(e)){let r=e,a=r.startsWith("//")?new URL(t.protocol+r):new URL(r),i=tn(a.pathname,n)!=null;if(a.origin===t.origin&&i)return a.pathname+a.search+a.hash}return e}function zr(e,t,n,r){let a=e.createURL(xf(t)).toString(),i={signal:n};if(r&&Jt(r.formMethod)){let{formMethod:s,formEncType:o}=r;i.method=s.toUpperCase(),o==="application/json"?(i.headers=new Headers({"Content-Type":o}),i.body=JSON.stringify(r.json)):o==="text/plain"?i.body=r.text:o==="application/x-www-form-urlencoded"&&r.formData?i.body=Go(r.formData):i.body=r.formData}return new Request(a,i)}function Go(e){let t=new URLSearchParams;for(let[n,r]of e.entries())t.append(n,typeof r=="string"?r:r.name);return t}function cd(e){let t=new FormData;for(let[n,r]of e.entries())t.append(n,r);return t}function xv(e,t,n,r,a,i){let s={},o=null,l,d=!1,u={},f=r&&$t(r[1])?r[1].error:void 0;return n.forEach((p,m)=>{let g=t[m].route.id;if(Te(!Er(p),"Cannot handle redirect results in processLoaderData"),$t(p)){let b=p.error;f!==void 0&&(b=f,f=void 0),o=o||{};{let w=za(e,g);o[w.route.id]==null&&(o[w.route.id]=b)}s[g]=void 0,d||(d=!0,l=Nl(p.error)?p.error.status:500),p.headers&&(u[g]=p.headers)}else xr(p)?(a.set(g,p.deferredData),s[g]=p.deferredData.data,p.statusCode!=null&&p.statusCode!==200&&!d&&(l=p.statusCode),p.headers&&(u[g]=p.headers)):(s[g]=p.data,p.statusCode&&p.statusCode!==200&&!d&&(l=p.statusCode),p.headers&&(u[g]=p.headers))}),f!==void 0&&r&&(o={[r[0]]:f},s[r[0]]=void 0),{loaderData:s,errors:o,statusCode:l||200,loaderHeaders:u}}function dd(e,t,n,r,a,i,s,o){let{loaderData:l,errors:d}=xv(t,n,r,a,o);for(let u=0;ur.route.id===t)+1):[...e]).reverse().find(r=>r.route.hasErrorBoundary===!0)||e[0]}function pd(e){let t=e.length===1?e[0]:e.find(n=>n.index||!n.path||n.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Bt(e,t){let{pathname:n,routeId:r,method:a,type:i}=t===void 0?{}:t,s="Unknown Server Error",o="Unknown @remix-run/router error";return e===400?(s="Bad Request",a&&n&&r?o="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"?o="defer() is not supported in actions":i==="invalid-body"&&(o="Unable to encode submission body")):e===403?(s="Forbidden",o='Route "'+r+'" does not match URL "'+n+'"'):e===404?(s="Not Found",o='No route matches URL "'+n+'"'):e===405&&(s="Method Not Allowed",a&&n&&r?o="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&&(o='Invalid request method "'+a.toUpperCase()+'"')),new Ll(e||500,s,new Error(o),!0)}function md(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(Er(n))return{result:n,idx:t}}}function xf(e){let t=typeof e=="string"?Bn(e):e;return lr(nt({},t,{hash:""}))}function Ev(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Ov(e){return Ef(e.result)&&lv.has(e.result.status)}function xr(e){return e.type===tt.deferred}function $t(e){return e.type===tt.error}function Er(e){return(e&&e.type)===tt.redirect}function _v(e){let t=e;return t&&typeof t=="object"&&typeof t.data=="object"&&typeof t.subscribe=="function"&&typeof t.cancel=="function"&&typeof t.resolveData=="function"}function Ef(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function Cv(e){return ov.has(e.toLowerCase())}function Jt(e){return iv.has(e.toLowerCase())}async function hd(e,t,n,r,a,i){for(let s=0;sf.route.id===l.route.id),u=d!=null&&!wf(d,l)&&(i&&i[l.route.id])!==void 0;if(xr(o)&&(a||u)){let f=r[s];Te(f,"Expected an AbortSignal for revalidating fetcher deferred result"),await Of(o,f,a).then(p=>{p&&(n[s]=p||n[s])})}}}async function Of(e,t,n){if(n===void 0&&(n=!1),!await e.deferredData.resolveData(t)){if(n)try{return{type:tt.data,data:e.deferredData.unwrappedData}}catch(a){return{type:tt.error,error:a}}return{type:tt.data,data:e.deferredData.data}}}function Ml(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Wo(e,t){let n=typeof t=="string"?Bn(t).search:t.search;if(e[e.length-1].route.index&&Ml(n||""))return e[e.length-1];let r=bf(e);return r[r.length-1]}function gd(e){let{formMethod:t,formAction:n,formEncType:r,text:a,formData:i,json:s}=e;if(!(!t||!n||!r)){if(a!=null)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:void 0,text:a};if(i!=null)return{formMethod:t,formAction:n,formEncType:r,formData:i,json:void 0,text:void 0};if(s!==void 0)return{formMethod:t,formAction:n,formEncType:r,formData:void 0,json:s,text:void 0}}}function ho(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 Sv(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 La(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 Rv(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 Qn(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 Pv(e,t){try{let n=e.sessionStorage.getItem(yf);if(n){let r=JSON.parse(n);for(let[a,i]of Object.entries(r||{}))i&&Array.isArray(i)&&t.set(a,new Set(i||[]))}}catch{}}function Iv(e,t){if(t.size>0){let n={};for(let[r,a]of t)n[r]=[...a];try{e.sessionStorage.setItem(yf,JSON.stringify(n))}catch(r){or(!1,"Failed to save applied view transitions in sessionStorage ("+r+").")}}}/**
 * React Router v6.23.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function ss(){return ss=Object.assign?Object.assign.bind():function(e){for(var t=1;tSr(e,t),[t,e])}function Rf(e){c.useContext(Rn).static||c.useLayoutEffect(e)}function Ul(){let{isDataRoute:e}=c.useContext(Pn);return e?Vv():Tv()}function Tv(){ya()||Te(!1);let e=c.useContext(xi),{basename:t,future:n,navigator:r}=c.useContext(Rn),{matches:a}=c.useContext(Pn),{pathname:i}=hr(),s=JSON.stringify(Tl(a,n.v7_relativeSplatPath)),o=c.useRef(!1);return Rf(()=>{o.current=!0}),c.useCallback(function(d,u){if(u===void 0&&(u={}),!o.current)return;if(typeof d=="number"){r.go(d);return}let f=kl(d,JSON.parse(s),i,u.relative==="path");e==null&&t!=="/"&&(f.pathname=f.pathname==="/"?t:yn([t,f.pathname])),(u.replace?r.replace:r.push)(f,u.state,u)},[t,r,s,i,e])}const kv=c.createContext(null);function Lv(e){let t=c.useContext(Pn).outlet;return t&&c.createElement(kv.Provider,{value:e},t)}function Pk(){let{matches:e}=c.useContext(Pn),t=e[e.length-1];return t?t.params:{}}function Ei(e,t){let{relative:n}=t===void 0?{}:t,{future:r}=c.useContext(Rn),{matches:a}=c.useContext(Pn),{pathname:i}=hr(),s=JSON.stringify(Tl(a,r.v7_relativeSplatPath));return c.useMemo(()=>kl(e,JSON.parse(s),i,n==="path"),[e,s,i,n])}function Nv(e,t,n,r){ya()||Te(!1);let{navigator:a}=c.useContext(Rn),{matches:i}=c.useContext(Pn),s=i[i.length-1],o=s?s.params:{};s&&s.pathname;let l=s?s.pathnameBase:"/";s&&s.route;let d=hr(),u;u=d;let f=u.pathname||"/",p=f;if(l!=="/"){let b=l.replace(/^\//,"").split("/");p="/"+f.replace(/^\//,"").split("/").slice(b.length).join("/")}let m=ta(e,{pathname:p});return Uv(m&&m.map(b=>Object.assign({},b,{params:Object.assign({},o,b.params),pathname:yn([l,a.encodeLocation?a.encodeLocation(b.pathname).pathname:b.pathname]),pathnameBase:b.pathnameBase==="/"?l:yn([l,a.encodeLocation?a.encodeLocation(b.pathnameBase).pathname:b.pathnameBase])})),i,n,r)}function Av(){let e=Kv(),t=Nl(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return c.createElement(c.Fragment,null,c.createElement("h2",null,"Unexpected Application Error!"),c.createElement("h3",{style:{fontStyle:"italic"}},t),n?c.createElement("pre",{style:a},n):null,null)}const Mv=c.createElement(Av,null);class Dv extends c.Component{constructor(t){super(t),this.state={location:t.location,revalidation:t.revalidation,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,n){return n.location!==t.location||n.revalidation!=="idle"&&t.revalidation==="idle"?{error:t.error,location:t.location,revalidation:t.revalidation}:{error:t.error!==void 0?t.error:n.error,location:n.location,revalidation:t.revalidation||n.revalidation}}componentDidCatch(t,n){console.error("React Router caught the following error during render",t,n)}render(){return this.state.error!==void 0?c.createElement(Pn.Provider,{value:this.props.routeContext},c.createElement(_f.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Fv(e){let{routeContext:t,match:n,children:r}=e,a=c.useContext(xi);return a&&a.static&&a.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=n.route.id),c.createElement(Pn.Provider,{value:t},r)}function Uv(e,t,n,r){var a;if(t===void 0&&(t=[]),n===void 0&&(n=null),r===void 0&&(r=null),e==null){var i;if((i=n)!=null&&i.errors)e=n.matches;else return null}let s=e,o=(a=n)==null?void 0:a.errors;if(o!=null){let u=s.findIndex(f=>f.route.id&&o?.[f.route.id]!==void 0);u>=0||Te(!1),s=s.slice(0,Math.min(s.length,u+1))}let l=!1,d=-1;if(n&&r&&r.v7_partialHydration)for(let u=0;u=0?s=s.slice(0,d+1):s=[s[0]];break}}}return s.reduceRight((u,f,p)=>{let m,g=!1,b=null,w=null;n&&(m=o&&f.route.id?o[f.route.id]:void 0,b=f.route.errorElement||Mv,l&&(d<0&&p===0?(g=!0,w=null):d===p&&(g=!0,w=f.route.hydrateFallbackElement||null)));let S=t.concat(s.slice(0,p+1)),P=()=>{let A;return m?A=b:g?A=w:f.route.Component?A=c.createElement(f.route.Component,null):f.route.element?A=f.route.element:A=u,c.createElement(Fv,{match:f,routeContext:{outlet:u,matches:S,isDataRoute:n!=null},children:A})};return n&&(f.route.ErrorBoundary||f.route.errorElement||p===0)?c.createElement(Dv,{location:n.location,revalidation:n.revalidation,component:b,error:m,children:P(),routeContext:{outlet:null,matches:S,isDataRoute:!0}}):P()},null)}var Pf=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}(Pf||{}),ua=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(ua||{});function Bv(e){let t=c.useContext(xi);return t||Te(!1),t}function If(e){let t=c.useContext(Dl);return t||Te(!1),t}function jv(e){let t=c.useContext(Pn);return t||Te(!1),t}function Bl(e){let t=jv(),n=t.matches[t.matches.length-1];return n.route.id||Te(!1),n.route.id}function $v(){return Bl(ua.UseRouteId)}function qv(){let{matches:e,loaderData:t}=If(ua.UseMatches);return c.useMemo(()=>e.map(n=>mf(n,t)),[e,t])}function Kv(){var e;let t=c.useContext(_f),n=If(ua.UseRouteError),r=Bl(ua.UseRouteError);return t!==void 0?t:(e=n.errors)==null?void 0:e[r]}function Vv(){let{router:e}=Bv(Pf.UseNavigateStable),t=Bl(ua.UseNavigateStable),n=c.useRef(!1);return Rf(()=>{n.current=!0}),c.useCallback(function(a,i){i===void 0&&(i={}),n.current&&(typeof a=="number"?e.navigate(a):e.navigate(a,ss({fromRouteId:t},i)))},[e,t])}function Hv(e){return Lv(e.context)}function zv(e){let{basename:t="/",children:n=null,location:r,navigationType:a=ot.Pop,navigator:i,static:s=!1,future:o}=e;ya()&&Te(!1);let l=t.replace(/^\/*/,"/"),d=c.useMemo(()=>({basename:l,navigator:i,static:s,future:ss({v7_relativeSplatPath:!1},o)}),[l,o,i,s]);typeof r=="string"&&(r=Bn(r));let{pathname:u="/",search:f="",hash:p="",state:m=null,key:g="default"}=r,b=c.useMemo(()=>{let w=tn(u,l);return w==null?null:{location:{pathname:w,search:f,hash:p,state:m,key:g},navigationType:a}},[l,u,f,p,m,g,a]);return b==null?null:c.createElement(Rn.Provider,{value:d},c.createElement(Fl.Provider,{children:n,value:b}))}new Promise(()=>{});function Gv(e){let t={hasErrorBoundary:e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&Object.assign(t,{element:c.createElement(e.Component),Component:void 0}),e.HydrateFallback&&Object.assign(t,{hydrateFallbackElement:c.createElement(e.HydrateFallback),HydrateFallback:void 0}),e.ErrorBoundary&&Object.assign(t,{errorElement:c.createElement(e.ErrorBoundary),ErrorBoundary:void 0}),t}/**
 * React Router DOM v6.23.1
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */function cr(){return cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&(n[a]=e[a]);return n}const Yi="get",go="application/x-www-form-urlencoded";function Ms(e){return e!=null&&typeof e.tagName=="string"}function Wv(e){return Ms(e)&&e.tagName.toLowerCase()==="button"}function Xv(e){return Ms(e)&&e.tagName.toLowerCase()==="form"}function Jv(e){return Ms(e)&&e.tagName.toLowerCase()==="input"}function Yv(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Zv(e,t){return e.button===0&&(!t||t==="_self")&&!Yv(e)}let Fi=null;function Qv(){if(Fi===null)try{new FormData(document.createElement("form"),0),Fi=!1}catch{Fi=!0}return Fi}const ey=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function bo(e){return e!=null&&!ey.has(e)?null:e}function ty(e,t){let n,r,a,i,s;if(Xv(e)){let o=e.getAttribute("action");r=o?tn(o,t):null,n=e.getAttribute("method")||Yi,a=bo(e.getAttribute("enctype"))||go,i=new FormData(e)}else if(Wv(e)||Jv(e)&&(e.type==="submit"||e.type==="image")){let o=e.form;if(o==null)throw new Error('Cannot submit a 




© 2015 - 2025 Weber Informatics LLC | Privacy Policy