var Fr=Object.defineProperty;var a=(e,t)=>Fr(e,"name",{value:t,configurable:!0});import{b as st,r as A,j as V,F as wt,a as Et,R as ar}from"./jsx-runtime.33077135.js";import{j as or}from"./iframe.c2dfa352.js";import{m as Gr}from"./make-decorator.6876452f.js";import{S as zr}from"./search.af456f80.js";/** * @remix-run/router v1.4.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function H(){return H=Object.assign?Object.assign.bind():function(e){for(var t=1;tw(L,typeof L=="string"?null:L.state,R===0?"default":void 0));let c=u(r==null?i.length-1:r),s=re.Pop,d=null;function u(L){return Math.min(Math.max(L,0),i.length-1)}a(u,"clampIndex");function b(){return i[c]}a(b,"getCurrentLocation");function w(L,R,h){R===void 0&&(R=null);let I=ut(i?b().pathname:"/",L,R,h);return ge(I.pathname.charAt(0)==="/","relative pathnames are not supported in memory history: "+JSON.stringify(L)),I}a(w,"createMemoryLocation");function y(L){return typeof L=="string"?L:be(L)}return a(y,"createHref"),{get index(){return c},get action(){return s},get location(){return b()},createHref:y,createURL(L){return new URL(y(L),"http://localhost")},encodeLocation(L){let R=typeof L=="string"?de(L):L;return{pathname:R.pathname||"",search:R.search||"",hash:R.hash||""}},push(L,R){s=re.Push;let h=w(L,R);c+=1,i.splice(c,i.length,h),n&&d&&d({action:s,location:h,delta:1})},replace(L,R){s=re.Replace;let h=w(L,R);i[c]=h,n&&d&&d({action:s,location:h,delta:0})},go(L){s=re.Pop;let R=u(c+L),h=i[R];c=R,d&&d({action:s,location:h,delta:L})},listen(L){return d=L,()=>{d=null}}}}a(Kr,"createMemoryHistory");function $(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}a($,"invariant");function ge(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}a(ge,"warning");function Vr(){return Math.random().toString(36).substr(2,8)}a(Vr,"createKey");function ut(e,t,r,n){return r===void 0&&(r=null),H({pathname:typeof e=="string"?e:e.pathname,search:"",hash:""},typeof t=="string"?de(t):t,{state:r,key:t&&t.key||n||Vr()})}a(ut,"createLocation");function be(e){let{pathname:t="/",search:r="",hash:n=""}=e;return r&&r!=="?"&&(t+=r.charAt(0)==="?"?r:"?"+r),n&&n!=="#"&&(t+=n.charAt(0)==="#"?n:"#"+n),t}a(be,"createPath");function de(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}a(de,"parsePath");var ne;(function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"})(ne||(ne={}));const Wr=new Set(["lazy","caseSensitive","path","id","index","children"]);function Hr(e){return e.index===!0}a(Hr,"isIndexRoute");function ir(e,t,r,n){return r===void 0&&(r=[]),n===void 0&&(n={}),e.map((i,c)=>{let s=[...r,c],d=typeof i.id=="string"?i.id:s.join("-");if($(i.index!==!0||!i.children,"Cannot specify children on an index route"),$(!n[d],'Found a route id collision on id "'+d+`". Route id's must be globally unique within Data Router usages`),Hr(i)){let u=H({},i,{hasErrorBoundary:t(i),id:d});return n[d]=u,u}else{let u=H({},i,{id:d,hasErrorBoundary:t(i),children:void 0});return n[d]=u,i.children&&(u.children=ir(i.children,t,s,n)),u}})}a(ir,"convertRoutesToDataRoutes");function Le(e,t,r){r===void 0&&(r="/");let n=typeof t=="string"?de(t):t,i=Ie(n.pathname||"/",r);if(i==null)return null;let c=lr(e);Yr(c);let s=null;for(let d=0;s==null&&d{let u={relativePath:d===void 0?c.path||"":d,caseSensitive:c.caseSensitive===!0,childrenIndex:s,route:c};u.relativePath.startsWith("/")&&($(u.relativePath.startsWith(n),'Absolute route path "'+u.relativePath+'" nested under path '+('"'+n+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),u.relativePath=u.relativePath.slice(n.length));let b=me([n,u.relativePath]),w=r.concat(u);c.children&&c.children.length>0&&($(c.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+b+'".')),lr(c.children,t,w,b)),!(c.path==null&&!c.index)&&t.push({path:b,score:tn(b,c.index),routesMeta:w})},"flattenRoute");return e.forEach((c,s)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))i(c,s);else for(let u of sr(c.path))i(c,s,u)}),t}a(lr,"flattenRoutes");function sr(e){let t=e.split("/");if(t.length===0)return[];let[r,...n]=t,i=r.endsWith("?"),c=r.replace(/\?$/,"");if(n.length===0)return i?[c,""]:[c];let s=sr(n.join("/")),d=[];return d.push(...s.map(u=>u===""?c:[c,u].join("/"))),i&&d.push(...s),d.map(u=>e.startsWith("/")&&u===""?"/":u)}a(sr,"explodeOptionalSegments");function Yr(e){e.sort((t,r)=>t.score!==r.score?r.score-t.score:rn(t.routesMeta.map(n=>n.childrenIndex),r.routesMeta.map(n=>n.childrenIndex)))}a(Yr,"rankRouteBranches");const qr=/^:\w+$/,Jr=3,Xr=2,Qr=1,Zr=10,en=-2,kt=a(e=>e==="*","isSplat");function tn(e,t){let r=e.split("/"),n=r.length;return r.some(kt)&&(n+=en),t&&(n+=Xr),r.filter(i=>!kt(i)).reduce((i,c)=>i+(qr.test(c)?Jr:c===""?Qr:Zr),n)}a(tn,"computeScore");function rn(e,t){return e.length===t.length&&e.slice(0,-1).every((n,i)=>n===t[i])?e[e.length-1]-t[t.length-1]:0}a(rn,"compareIndexes");function nn(e,t){let{routesMeta:r}=e,n={},i="/",c=[];for(let s=0;s{if(s===d.length-1&&c==="*")return t["*"];const b=c.match(/^:(\w+)(\??)$/);if(b){const[,w,y]=b;let P=t[w];return y==="?"?P==null?"":P:(P==null&&$(!1,'Missing ":'+w+'" param'),P)}return c.replace(/\?$/g,"")}).filter(c=>!!c);return n+i.join("/")}a(an,"generatePath");function on(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=ln(e.path,e.caseSensitive,e.end),i=t.match(r);if(!i)return null;let c=i[0],s=c.replace(/(.)\/+$/,"$1"),d=i.slice(1);return{params:n.reduce((b,w,y)=>{if(w==="*"){let P=d[y]||"";s=c.slice(0,c.length-P.length).replace(/(.)\/+$/,"$1")}return b[w]=un(d[y]||"",w),b},{}),pathname:c,pathnameBase:s,pattern:e}}a(on,"matchPath");function ln(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!0),ge(e==="*"||!e.endsWith("*")||e.endsWith("/*"),'Route path "'+e+'" will be treated as if it were '+('"'+e.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+e.replace(/\*$/,"/*")+'".'));let n=[],i="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/\/:(\w+)/g,(s,d)=>(n.push(d),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),i+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?i+="\\/*$":e!==""&&e!=="/"&&(i+="(?:(?=\\/|$))"),[new RegExp(i,t?void 0:"i"),n]}a(ln,"compilePath");function sn(e){try{return decodeURI(e)}catch(t){return ge(!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}}a(sn,"safelyDecodeURI");function un(e,t){try{return decodeURIComponent(e)}catch(r){return ge(!1,'The value for the URL param "'+t+'" will not be decoded because'+(' the string "'+e+'" is a malformed URL segment. This is probably')+(" due to a bad percent encoding ("+r+").")),e}}a(un,"safelyDecodeURIComponent");function Ie(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&n!=="/"?null:e.slice(r)||"/"}a(Ie,"stripBasename");function cn(e,t){t===void 0&&(t="/");let{pathname:r,search:n="",hash:i=""}=typeof e=="string"?de(e):e;return{pathname:r?r.startsWith("/")?r:fn(r,t):t,search:hn(n),hash:pn(i)}}a(cn,"resolvePath");function fn(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(i=>{i===".."?r.length>1&&r.pop():i!=="."&&r.push(i)}),r.length>1?r.join("/"):"/"}a(fn,"resolvePathname");function at(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the ")+("`to."+r+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}a(at,"getInvalidPathError");function Je(e){return e.filter((t,r)=>r===0||t.route.path&&t.route.path.length>0)}a(Je,"getPathContributingMatches");function St(e,t,r,n){n===void 0&&(n=!1);let i;typeof e=="string"?i=de(e):(i=H({},e),$(!i.pathname||!i.pathname.includes("?"),at("?","pathname","search",i)),$(!i.pathname||!i.pathname.includes("#"),at("#","pathname","hash",i)),$(!i.search||!i.search.includes("#"),at("#","search","hash",i)));let c=e===""||i.pathname==="",s=c?"/":i.pathname,d;if(n||s==null)d=r;else{let y=t.length-1;if(s.startsWith("..")){let P=s.split("/");for(;P[0]==="..";)P.shift(),y-=1;i.pathname=P.join("/")}d=y>=0?t[y]:"/"}let u=cn(i,d),b=s&&s!=="/"&&s.endsWith("/"),w=(c||s===".")&&r.endsWith("/");return!u.pathname.endsWith("/")&&(b||w)&&(u.pathname+="/"),u}a(St,"resolveTo");const me=a(e=>e.join("/").replace(/\/\/+/g,"/"),"joinPaths"),dn=a(e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),"normalizePathname"),hn=a(e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,"normalizeSearch"),pn=a(e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,"normalizeHash");class ct extends Error{}a(ct,"AbortedDeferredError");class ur{constructor(t,r){this.pendingKeysSet=new Set,this.subscribers=new Set,this.deferredKeys=[],$(t&&typeof t=="object"&&!Array.isArray(t),"defer() only accepts plain objects");let n;this.abortPromise=new Promise((c,s)=>n=s),this.controller=new AbortController;let i=a(()=>n(new ct("Deferred data aborted")),"onAbort");this.unlistenAbortSignal=()=>this.controller.signal.removeEventListener("abort",i),this.controller.signal.addEventListener("abort",i),this.data=Object.entries(t).reduce((c,s)=>{let[d,u]=s;return Object.assign(c,{[d]:this.trackPromise(d,u)})},{}),this.done&&this.unlistenAbortSignal(),this.init=r}trackPromise(t,r){if(!(r instanceof Promise))return r;this.deferredKeys.push(t),this.pendingKeysSet.add(t);let n=Promise.race([r,this.abortPromise]).then(i=>this.onSettle(n,t,null,i),i=>this.onSettle(n,t,i));return n.catch(()=>{}),Object.defineProperty(n,"_tracked",{get:()=>!0}),n}onSettle(t,r,n,i){return this.controller.signal.aborted&&n instanceof ct?(this.unlistenAbortSignal(),Object.defineProperty(t,"_error",{get:()=>n}),Promise.reject(n)):(this.pendingKeysSet.delete(r),this.done&&this.unlistenAbortSignal(),n?(Object.defineProperty(t,"_error",{get:()=>n}),this.emit(!1,r),Promise.reject(n)):(Object.defineProperty(t,"_data",{get:()=>i}),this.emit(!1,r),i))}emit(t,r){this.subscribers.forEach(n=>n(t,r))}subscribe(t){return this.subscribers.add(t),()=>this.subscribers.delete(t)}cancel(){this.controller.abort(),this.pendingKeysSet.forEach((t,r)=>this.pendingKeysSet.delete(r)),this.emit(!0)}async resolveData(t){let r=!1;if(!this.done){let n=a(()=>this.cancel(),"onAbort");t.addEventListener("abort",n),r=await new Promise(i=>{this.subscribe(c=>{t.removeEventListener("abort",n),(c||this.done)&&i(c)})})}return r}get done(){return this.pendingKeysSet.size===0}get unwrappedData(){return $(this.data!==null&&this.done,"Can only unwrap data on initialized and settled deferreds"),Object.entries(this.data).reduce((t,r)=>{let[n,i]=r;return Object.assign(t,{[n]:yn(i)})},{})}get pendingKeys(){return Array.from(this.pendingKeysSet)}}a(ur,"DeferredData");function mn(e){return e instanceof Promise&&e._tracked===!0}a(mn,"isTrackedPromise");function yn(e){if(!mn(e))return e;if(e._error)throw e._error;return e._data}a(yn,"unwrapTrackedPromise");class Rt{constructor(t,r,n,i){i===void 0&&(i=!1),this.status=t,this.statusText=r||"",this.internal=i,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}}a(Rt,"ErrorResponse");function cr(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}a(cr,"isRouteErrorResponse");const fr=["post","put","patch","delete"],vn=new Set(fr),gn=["get",...fr],bn=new Set(gn),wn=new Set([301,302,303,307,308]),En=new Set([307,308]),ot={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},Sn={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},It={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},dr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hr=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Rn=!hr,Ln=a(e=>Boolean(e.hasErrorBoundary),"defaultDetectErrorBoundary");function Pn(e){$(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let t=e.detectErrorBoundary||Ln,r={},n=ir(e.routes,t,void 0,r),i,c=null,s=new Set,d=null,u=null,b=null,w=e.hydrationData!=null,y=Le(n,e.history.location,e.basename),P=null;if(y==null){let g=fe(404,{pathname:e.history.location.pathname}),{matches:E,route:S}=Bt(n);y=E,P={[S.id]:g}}let L=!y.some(g=>g.route.lazy)&&(!y.some(g=>g.route.loader)||e.hydrationData!=null),R,h={historyAction:e.history.action,location:e.history.location,matches:y,initialized:L,navigation:ot,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},I=re.Pop,C=!1,M,G=!1,j=!1,z=[],q=[],F=new Map,Q=0,Z=-1,ee=new Map,le=new Set,f=new Map,o=new Map,l=new Map,p=!1;function v(){if(c=e.history.listen(S=>{let{action:O,location:x,delta:U}=S;if(p){p=!1;return}ge(l.size===0||U!=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 N=Ct({currentLocation:h.location,nextLocation:x,historyAction:O});if(N&&U!=null){p=!0,e.history.go(U*-1),$e(N,{state:"blocked",location:x,proceed(){$e(N,{state:"proceeding",proceed:void 0,reset:void 0,location:x}),e.history.go(U)},reset(){Oe(N),D({blockers:new Map(R.state.blockers)})}});return}return W(O,x)}),h.initialized)return R;let g=h.matches.filter(S=>S.route.lazy);if(g.length===0)return W(re.Pop,h.location),R;let E=g.map(S=>ft(S.route,t,r));return Promise.all(E).then(()=>{!h.matches.some(O=>O.route.loader)||e.hydrationData!=null?D({initialized:!0}):W(re.Pop,h.location)}),R}a(v,"initialize");function m(){c&&c(),s.clear(),M&&M.abort(),h.fetchers.forEach((g,E)=>Ze(E)),h.blockers.forEach((g,E)=>Oe(E))}a(m,"dispose");function T(g){return s.add(g),()=>s.delete(g)}a(T,"subscribe");function D(g){h=H({},h,g),s.forEach(E=>E(h))}a(D,"updateState");function _(g,E){var S,O;let x=h.actionData!=null&&h.navigation.formMethod!=null&&pe(h.navigation.formMethod)&&h.navigation.state==="loading"&&((S=g.state)==null?void 0:S._isRedirect)!==!0,U;E.actionData?Object.keys(E.actionData).length>0?U=E.actionData:U=null:x?U=h.actionData:U=null;let N=E.loaderData?$t(h.loaderData,E.loaderData,E.matches||[],E.errors):h.loaderData;for(let[k]of l)Oe(k);let B=C===!0||h.navigation.formMethod!=null&&pe(h.navigation.formMethod)&&((O=g.state)==null?void 0:O._isRedirect)!==!0;i&&(n=i,i=void 0),D(H({},E,{actionData:U,loaderData:N,historyAction:I,location:g,initialized:!0,navigation:ot,revalidation:"idle",restoreScrollPosition:Mt(g,E.matches||h.matches),preventScrollReset:B,blockers:new Map(h.blockers)})),G||I===re.Pop||(I===re.Push?e.history.push(g,g.state):I===re.Replace&&e.history.replace(g,g.state)),I=re.Pop,C=!1,G=!1,j=!1,z=[],q=[]}a(_,"completeNavigation");async function X(g,E){if(typeof g=="number"){e.history.go(g);return}let{path:S,submission:O,error:x}=Nt(g,E),U=h.location,N=ut(h.location,S,E&&E.state);N=H({},N,e.history.encodeLocation(N));let B=E&&E.replace!=null?E.replace:void 0,k=re.Push;B===!0?k=re.Replace:B===!1||O!=null&&pe(O.formMethod)&&O.formAction===h.location.pathname+h.location.search&&(k=re.Replace);let ae=E&&"preventScrollReset"in E?E.preventScrollReset===!0:void 0,Y=Ct({currentLocation:U,nextLocation:N,historyAction:k});if(Y){$e(Y,{state:"blocked",location:N,proceed(){$e(Y,{state:"proceeding",proceed:void 0,reset:void 0,location:N}),X(g,E)},reset(){Oe(Y),D({blockers:new Map(h.blockers)})}});return}return await W(k,N,{submission:O,pendingError:x,preventScrollReset:ae,replace:E&&E.replace})}a(X,"navigate");function J(){if(Xe(),D({revalidation:"loading"}),h.navigation.state!=="submitting"){if(h.navigation.state==="idle"){W(h.historyAction,h.location,{startUninterruptedRevalidation:!0});return}W(I||h.historyAction,h.navigation.location,{overrideNavigation:h.navigation})}}a(J,"revalidate");async function W(g,E,S){M&&M.abort(),M=null,I=g,G=(S&&S.startUninterruptedRevalidation)===!0,_r(h.location,h.matches),C=(S&&S.preventScrollReset)===!0;let O=i||n,x=S&&S.overrideNavigation,U=Le(O,E,e.basename);if(!U){let te=fe(404,{pathname:E.pathname}),{matches:ue,route:se}=Bt(O);et(),_(E,{matches:ue,loaderData:{},errors:{[se.id]:te}});return}if(Cn(h.location,E)&&!(S&&S.submission&&pe(S.submission.formMethod))){_(E,{matches:U});return}M=new AbortController;let N=Me(e.history,E,M.signal,S&&S.submission),B,k;if(S&&S.pendingError)k={[Pe(U).route.id]:S.pendingError};else if(S&&S.submission&&pe(S.submission.formMethod)){let te=await Or(N,E,S.submission,U,{replace:S.replace});if(te.shortCircuited)return;B=te.pendingActionData,k=te.pendingActionError,x=H({state:"loading",location:E},S.submission),N=new Request(N.url,{signal:N.signal})}let{shortCircuited:ae,loaderData:Y,errors:ie}=await Ar(N,E,U,x,S&&S.submission,S&&S.replace,B,k);ae||(M=null,_(E,H({matches:U},B?{actionData:B}:{},{loaderData:Y,errors:ie})))}a(W,"startNavigation");async function Or(g,E,S,O,x){Xe();let U=H({state:"submitting",location:E},S);D({navigation:U});let N,B=dt(O,E);if(!B.route.action&&!B.route.lazy)N={type:ne.error,error:fe(405,{method:g.method,pathname:E.pathname,routeId:B.route.id})};else if(N=await Ce("action",g,B,O,r,t,R.basename),g.signal.aborted)return{shortCircuited:!0};if(Te(N)){let k;return x&&x.replace!=null?k=x.replace:k=N.location===h.location.pathname+h.location.search,await De(h,N,{submission:S,replace:k}),{shortCircuited:!0}}if(xe(N)){let k=Pe(O,B.route.id);return(x&&x.replace)!==!0&&(I=re.Push),{pendingActionData:{},pendingActionError:{[k.route.id]:N.error}}}if(Se(N))throw fe(400,{type:"defer-action"});return{pendingActionData:{[B.route.id]:N.data}}}a(Or,"handleAction");async function Ar(g,E,S,O,x,U,N,B){let k=O;k||(k=H({state:"loading",location:E,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},x));let ae=x||(k.formMethod&&k.formAction&&k.formData&&k.formEncType?{formMethod:k.formMethod,formAction:k.formAction,formData:k.formData,formEncType:k.formEncType}:void 0),Y=i||n,[ie,te]=_t(e.history,h,S,ae,E,j,z,q,f,Y,e.basename,N,B);if(et(oe=>!(S&&S.some(ce=>ce.route.id===oe))||ie&&ie.some(ce=>ce.route.id===oe)),ie.length===0&&te.length===0)return _(E,H({matches:S,loaderData:{},errors:B||null},N?{actionData:N}:{})),{shortCircuited:!0};if(!G){te.forEach(ce=>{let Ee=h.fetchers.get(ce.key),Ge={state:"loading",data:Ee&&Ee.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(ce.key,Ge)});let oe=N||h.actionData;D(H({navigation:k},oe?Object.keys(oe).length===0?{actionData:null}:{actionData:oe}:{},te.length>0?{fetchers:new Map(h.fetchers)}:{}))}Z=++Q,te.forEach(oe=>F.set(oe.key,M));let{results:ue,loaderResults:se,fetcherResults:Ae}=await Dt(h.matches,S,ie,te,g);if(g.signal.aborted)return{shortCircuited:!0};te.forEach(oe=>F.delete(oe.key));let Be=Ft(ue);if(Be)return await De(h,Be,{replace:U}),{shortCircuited:!0};let{loaderData:Fe,errors:Re}=Ut(h,S,ie,se,B,te,Ae,o);o.forEach((oe,ce)=>{oe.subscribe(Ee=>{(Ee||oe.done)&&o.delete(ce)})}),kr();let tt=At(Z);return H({loaderData:Fe,errors:Re},tt||te.length>0?{fetchers:new Map(h.fetchers)}:{})}a(Ar,"handleLoaders");function Tt(g){return h.fetchers.get(g)||Sn}a(Tt,"getFetcher");function Cr(g,E,S,O){if(Rn)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.");F.has(g)&&Ue(g);let U=Le(i||n,S,e.basename);if(!U){Qe(g,E,fe(404,{pathname:S}));return}let{path:N,submission:B}=Nt(S,O,!0),k=dt(U,N);if(C=(O&&O.preventScrollReset)===!0,B&&pe(B.formMethod)){Mr(g,E,N,k,U,B);return}f.set(g,{routeId:E,path:N}),xr(g,E,N,k,U,B)}a(Cr,"fetch");async function Mr(g,E,S,O,x,U){if(Xe(),f.delete(g),!O.route.action&&!O.route.lazy){let he=fe(405,{method:U.formMethod,pathname:S,routeId:E});Qe(g,E,he);return}let N=h.fetchers.get(g),B=H({state:"submitting"},U,{data:N&&N.data," _hasFetcherDoneAnything ":!0});h.fetchers.set(g,B),D({fetchers:new Map(h.fetchers)});let k=new AbortController,ae=Me(e.history,S,k.signal,U);F.set(g,k);let Y=await Ce("action",ae,O,x,r,t,R.basename);if(ae.signal.aborted){F.get(g)===k&&F.delete(g);return}if(Te(Y)){F.delete(g),le.add(g);let he=H({state:"loading"},U,{data:void 0," _hasFetcherDoneAnything ":!0});return h.fetchers.set(g,he),D({fetchers:new Map(h.fetchers)}),De(h,Y,{isFetchActionRedirect:!0})}if(xe(Y)){Qe(g,E,Y.error);return}if(Se(Y))throw fe(400,{type:"defer-action"});let ie=h.navigation.location||h.location,te=Me(e.history,ie,k.signal),ue=i||n,se=h.navigation.state!=="idle"?Le(ue,h.navigation.location,e.basename):h.matches;$(se,"Didn't find any matches after fetcher action");let Ae=++Q;ee.set(g,Ae);let Be=H({state:"loading",data:Y.data},U,{" _hasFetcherDoneAnything ":!0});h.fetchers.set(g,Be);let[Fe,Re]=_t(e.history,h,se,U,ie,j,z,q,f,ue,e.basename,{[O.route.id]:Y.data},void 0);Re.filter(he=>he.key!==g).forEach(he=>{let nt=he.key,xt=h.fetchers.get(nt),Br={state:"loading",data:xt&&xt.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(nt,Br),F.set(nt,k)}),D({fetchers:new Map(h.fetchers)});let{results:tt,loaderResults:oe,fetcherResults:ce}=await Dt(h.matches,se,Fe,Re,te);if(k.signal.aborted)return;ee.delete(g),F.delete(g),Re.forEach(he=>F.delete(he.key));let Ee=Ft(tt);if(Ee)return De(h,Ee);let{loaderData:Ge,errors:rt}=Ut(h,h.matches,Fe,oe,void 0,Re,ce,o),Ur={state:"idle",data:Y.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(g,Ur);let $r=At(Ae);h.navigation.state==="loading"&&Ae>Z?($(I,"Expected pending action"),M&&M.abort(),_(h.navigation.location,{matches:se,loaderData:Ge,errors:rt,fetchers:new Map(h.fetchers)})):(D(H({errors:rt,loaderData:$t(h.loaderData,Ge,se,rt)},$r?{fetchers:new Map(h.fetchers)}:{})),j=!1)}a(Mr,"handleFetcherAction");async function xr(g,E,S,O,x,U){let N=h.fetchers.get(g),B=H({state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0},U,{data:N&&N.data," _hasFetcherDoneAnything ":!0});h.fetchers.set(g,B),D({fetchers:new Map(h.fetchers)});let k=new AbortController,ae=Me(e.history,S,k.signal);F.set(g,k);let Y=await Ce("loader",ae,O,x,r,t,R.basename);if(Se(Y)&&(Y=await vr(Y,ae.signal,!0)||Y),F.get(g)===k&&F.delete(g),ae.signal.aborted)return;if(Te(Y)){await De(h,Y);return}if(xe(Y)){let te=Pe(h.matches,E);h.fetchers.delete(g),D({fetchers:new Map(h.fetchers),errors:{[te.route.id]:Y.error}});return}$(!Se(Y),"Unhandled fetcher deferred data");let ie={state:"idle",data:Y.data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(g,ie),D({fetchers:new Map(h.fetchers)})}a(xr,"handleFetcherLoader");async function De(g,E,S){var O;let{submission:x,replace:U,isFetchActionRedirect:N}=S===void 0?{}:S;E.revalidate&&(j=!0);let B=ut(g.location,E.location,H({_isRedirect:!0},N?{_isFetchActionRedirect:!0}:{}));if($(B,"Expected a location on the redirect navigation"),dr.test(E.location)&&hr&&typeof((O=window)==null?void 0:O.location)<"u"){let ue=e.history.createURL(E.location),se=Ie(ue.pathname,e.basename||"/")==null;if(window.location.origin!==ue.origin||se){U?window.location.replace(E.location):window.location.assign(E.location);return}}M=null;let k=U===!0?re.Replace:re.Push,{formMethod:ae,formAction:Y,formEncType:ie,formData:te}=g.navigation;!x&&ae&&Y&&te&&ie&&(x={formMethod:ae,formAction:Y,formEncType:ie,formData:te}),En.has(E.status)&&x&&pe(x.formMethod)?await W(k,B,{submission:H({},x,{formAction:E.location}),preventScrollReset:C}):await W(k,B,{overrideNavigation:{state:"loading",location:B,formMethod:x?x.formMethod:void 0,formAction:x?x.formAction:void 0,formEncType:x?x.formEncType:void 0,formData:x?x.formData:void 0},preventScrollReset:C})}a(De,"startRedirectNavigation");async function Dt(g,E,S,O,x){let U=await Promise.all([...S.map(k=>Ce("loader",x,k,E,r,t,R.basename)),...O.map(k=>k.matches&&k.match?Ce("loader",Me(e.history,k.path,x.signal),k.match,k.matches,r,t,R.basename):{type:ne.error,error:fe(404,{pathname:k.path})})]),N=U.slice(0,S.length),B=U.slice(S.length);return await Promise.all([Gt(g,S,N,x.signal,!1,h.loaderData),Gt(g,O.map(k=>k.match),B,x.signal,!0)]),{results:U,loaderResults:N,fetcherResults:B}}a(Dt,"callLoadersAndMaybeResolveData");function Xe(){j=!0,z.push(...et()),f.forEach((g,E)=>{F.has(E)&&(q.push(E),Ue(E))})}a(Xe,"interruptActiveLoads");function Qe(g,E,S){let O=Pe(h.matches,E);Ze(g),D({errors:{[O.route.id]:S},fetchers:new Map(h.fetchers)})}a(Qe,"setFetcherError");function Ze(g){F.has(g)&&Ue(g),f.delete(g),ee.delete(g),le.delete(g),h.fetchers.delete(g)}a(Ze,"deleteFetcher");function Ue(g){let E=F.get(g);$(E,"Expected fetch controller: "+g),E.abort(),F.delete(g)}a(Ue,"abortFetcher");function Ot(g){for(let E of g){let O={state:"idle",data:Tt(E).data,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0," _hasFetcherDoneAnything ":!0};h.fetchers.set(E,O)}}a(Ot,"markFetchersDone");function kr(){let g=[];for(let E of le){let S=h.fetchers.get(E);$(S,"Expected fetcher: "+E),S.state==="loading"&&(le.delete(E),g.push(E))}Ot(g)}a(kr,"markFetchRedirectsDone");function At(g){let E=[];for(let[S,O]of ee)if(O0}a(At,"abortStaleFetchLoads");function Ir(g,E){let S=h.blockers.get(g)||It;return l.get(g)!==E&&l.set(g,E),S}a(Ir,"getBlocker");function Oe(g){h.blockers.delete(g),l.delete(g)}a(Oe,"deleteBlocker");function $e(g,E){let S=h.blockers.get(g)||It;$(S.state==="unblocked"&&E.state==="blocked"||S.state==="blocked"&&E.state==="blocked"||S.state==="blocked"&&E.state==="proceeding"||S.state==="blocked"&&E.state==="unblocked"||S.state==="proceeding"&&E.state==="unblocked","Invalid blocker state transition: "+S.state+" -> "+E.state),h.blockers.set(g,E),D({blockers:new Map(h.blockers)})}a($e,"updateBlocker");function Ct(g){let{currentLocation:E,nextLocation:S,historyAction:O}=g;if(l.size===0)return;l.size>1&&ge(!1,"A router only supports one blocker at a time");let x=Array.from(l.entries()),[U,N]=x[x.length-1],B=h.blockers.get(U);if(!(B&&B.state==="proceeding")&&N({currentLocation:E,nextLocation:S,historyAction:O}))return U}a(Ct,"shouldBlockNavigation");function et(g){let E=[];return o.forEach((S,O)=>{(!g||g(O))&&(S.cancel(),E.push(O),o.delete(O))}),E}a(et,"cancelActiveDeferreds");function Nr(g,E,S){if(d=g,b=E,u=S||(O=>O.key),!w&&h.navigation===ot){w=!0;let O=Mt(h.location,h.matches);O!=null&&D({restoreScrollPosition:O})}return()=>{d=null,b=null,u=null}}a(Nr,"enableScrollRestoration");function _r(g,E){if(d&&u&&b){let S=E.map(x=>zt(x,h.loaderData)),O=u(g,S)||g.key;d[O]=b()}}a(_r,"saveScrollPosition");function Mt(g,E){if(d&&u&&b){let S=E.map(U=>zt(U,h.loaderData)),O=u(g,S)||g.key,x=d[O];if(typeof x=="number")return x}return null}a(Mt,"getSavedScrollPosition");function jr(g){i=g}return a(jr,"_internalSetRoutes"),R={get basename(){return e.basename},get state(){return h},get routes(){return n},initialize:v,subscribe:T,enableScrollRestoration:Nr,navigate:X,fetch:Cr,revalidate:J,createHref:g=>e.history.createHref(g),encodeLocation:g=>e.history.encodeLocation(g),getFetcher:Tt,deleteFetcher:Ze,dispose:m,getBlocker:Ir,deleteBlocker:Oe,_internalFetchControllers:F,_internalActiveDeferreds:o,_internalSetRoutes:jr},R}a(Pn,"createRouter");function Tn(e){return e!=null&&"formData"in e}a(Tn,"isSubmissionNavigation");function Nt(e,t,r){r===void 0&&(r=!1);let n=typeof e=="string"?e:be(e);if(!t||!Tn(t))return{path:n};if(t.formMethod&&!xn(t.formMethod))return{path:n,error:fe(405,{method:t.formMethod})};let i;if(t.formData&&(i={formMethod:t.formMethod||"get",formAction:yr(n),formEncType:t&&t.formEncType||"application/x-www-form-urlencoded",formData:t.formData},pe(i.formMethod)))return{path:n,submission:i};let c=de(n),s=mr(t.formData);return r&&c.search&&gr(c.search)&&s.append("index",""),c.search="?"+s,{path:be(c),submission:i}}a(Nt,"normalizeNavigateOptions");function Dn(e,t){let r=e;if(t){let n=e.findIndex(i=>i.route.id===t);n>=0&&(r=e.slice(0,n))}return r}a(Dn,"getLoaderMatchesUntilBoundary");function _t(e,t,r,n,i,c,s,d,u,b,w,y,P){let L=P?Object.values(P)[0]:y?Object.values(y)[0]:void 0,R=e.createURL(t.location),h=e.createURL(i),I=c||R.toString()===h.toString()||R.search!==h.search,C=P?Object.keys(P)[0]:void 0,G=Dn(r,C).filter((z,q)=>{if(z.route.lazy)return!0;if(z.route.loader==null)return!1;if(On(t.loaderData,t.matches[q],z)||s.some(Z=>Z===z.route.id))return!0;let F=t.matches[q],Q=z;return jt(z,H({currentUrl:R,currentParams:F.params,nextUrl:h,nextParams:Q.params},n,{actionResult:L,defaultShouldRevalidate:I||pr(F,Q)}))}),j=[];return u.forEach((z,q)=>{if(!r.some(ee=>ee.route.id===z.routeId))return;let F=Le(b,z.path,w);if(!F){j.push(H({key:q},z,{matches:null,match:null}));return}let Q=dt(F,z.path);if(d.includes(q)){j.push(H({key:q,matches:F,match:Q},z));return}jt(Q,H({currentUrl:R,currentParams:t.matches[t.matches.length-1].params,nextUrl:h,nextParams:r[r.length-1].params},n,{actionResult:L,defaultShouldRevalidate:I}))&&j.push(H({key:q,matches:F,match:Q},z))}),[G,j]}a(_t,"getMatchesToLoad");function On(e,t,r){let n=!t||r.route.id!==t.route.id,i=e[r.route.id]===void 0;return n||i}a(On,"isNewLoader");function pr(e,t){let r=e.route.path;return e.pathname!==t.pathname||r!=null&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}a(pr,"isNewRouteInstance");function jt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if(typeof r=="boolean")return r}return t.defaultShouldRevalidate}a(jt,"shouldRevalidateLoader");async function ft(e,t,r){if(!e.lazy)return;let n=await e.lazy();if(!e.lazy)return;let i=r[e.id];$(i,"No route found in manifest");let c={};for(let s in n){let u=i[s]!==void 0&&s!=="hasErrorBoundary";ge(!u,'Route "'+i.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.')),!u&&!Wr.has(s)&&(c[s]=n[s])}Object.assign(i,c),Object.assign(i,{hasErrorBoundary:t(H({},i)),lazy:void 0})}a(ft,"loadLazyRouteModule");async function Ce(e,t,r,n,i,c,s,d,u,b){s===void 0&&(s="/"),d===void 0&&(d=!1),u===void 0&&(u=!1);let w,y,P,L=a(I=>{let C,M=new Promise((G,j)=>C=j);return P=a(()=>C(),"onReject"),t.signal.addEventListener("abort",P),Promise.race([I({request:t,params:r.params,context:b}),M])},"runHandler");try{let I=r.route[e];if(r.route.lazy)if(I)y=(await Promise.all([L(I),ft(r.route,c,i)]))[0];else if(await ft(r.route,c,i),I=r.route[e],I)y=await L(I);else{if(e==="action")throw fe(405,{method:t.method,pathname:new URL(t.url).pathname,routeId:r.route.id});return{type:ne.data,data:void 0}}else $(I,"Could not find the "+e+' to run on the "'+r.route.id+'" route'),y=await L(I);$(y!==void 0,"You defined "+(e==="action"?"an action":"a loader")+" for route "+('"'+r.route.id+"\" but didn't return anything from your `"+e+"` ")+"function. Please return a value or `null`.")}catch(I){w=ne.error,y=I}finally{P&&t.signal.removeEventListener("abort",P)}if(Mn(y)){let I=y.status;if(wn.has(I)){let G=y.headers.get("Location");if($(G,"Redirects returned/thrown from loaders/actions must have a Location header"),dr.test(G)){if(!d){let j=new URL(t.url),z=G.startsWith("//")?new URL(j.protocol+G):new URL(G),q=Ie(z.pathname,s)!=null;z.origin===j.origin&&q&&(G=z.pathname+z.search+z.hash)}}else{let j=n.slice(0,n.indexOf(r)+1),z=Je(j).map(F=>F.pathnameBase),q=St(G,z,new URL(t.url).pathname);if($(be(q),"Unable to resolve redirect location: "+G),s){let F=q.pathname;q.pathname=F==="/"?s:me([s,F])}G=be(q)}if(d)throw y.headers.set("Location",G),y;return{type:ne.redirect,status:I,location:G,revalidate:y.headers.get("X-Remix-Revalidate")!==null}}if(u)throw{type:w||ne.data,response:y};let C,M=y.headers.get("Content-Type");return M&&/\bapplication\/json\b/.test(M)?C=await y.json():C=await y.text(),w===ne.error?{type:w,error:new Rt(I,y.statusText,C),headers:y.headers}:{type:ne.data,data:C,statusCode:y.status,headers:y.headers}}if(w===ne.error)return{type:w,error:y};if(y instanceof ur){var R,h;return{type:ne.deferred,deferredData:y,statusCode:(R=y.init)==null?void 0:R.status,headers:((h=y.init)==null?void 0:h.headers)&&new Headers(y.init.headers)}}return{type:ne.data,data:y}}a(Ce,"callLoaderOrAction");function Me(e,t,r,n){let i=e.createURL(yr(t)).toString(),c={signal:r};if(n&&pe(n.formMethod)){let{formMethod:s,formEncType:d,formData:u}=n;c.method=s.toUpperCase(),c.body=d==="application/x-www-form-urlencoded"?mr(u):u}return new Request(i,c)}a(Me,"createClientSideRequest");function mr(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,n instanceof File?n.name:n);return t}a(mr,"convertFormDataToSearchParams");function An(e,t,r,n,i){let c={},s=null,d,u=!1,b={};return r.forEach((w,y)=>{let P=t[y].route.id;if($(!Te(w),"Cannot handle redirect results in processLoaderData"),xe(w)){let L=Pe(e,P),R=w.error;n&&(R=Object.values(n)[0],n=void 0),s=s||{},s[L.route.id]==null&&(s[L.route.id]=R),c[P]=void 0,u||(u=!0,d=cr(w.error)?w.error.status:500),w.headers&&(b[P]=w.headers)}else Se(w)?(i.set(P,w.deferredData),c[P]=w.deferredData.data):c[P]=w.data,w.statusCode!=null&&w.statusCode!==200&&!u&&(d=w.statusCode),w.headers&&(b[P]=w.headers)}),n&&(s=n,c[Object.keys(n)[0]]=void 0),{loaderData:c,errors:s,statusCode:d||200,loaderHeaders:b}}a(An,"processRouteLoaderData");function Ut(e,t,r,n,i,c,s,d){let{loaderData:u,errors:b}=An(t,r,n,i,d);for(let w=0;wn.route.id===t)+1):[...e]).reverse().find(n=>n.route.hasErrorBoundary===!0)||e[0]}a(Pe,"findNearestBoundary");function Bt(e){let t=e.find(r=>r.index||!r.path||r.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}a(Bt,"getShortCircuitMatches");function fe(e,t){let{pathname:r,routeId:n,method:i,type:c}=t===void 0?{}:t,s="Unknown Server Error",d="Unknown @remix-run/router error";return e===400?(s="Bad Request",i&&r&&n?d="You made a "+i+' request to "'+r+'" but '+('did not provide a `loader` for route "'+n+'", ')+"so there is no way to handle the request.":c==="defer-action"&&(d="defer() is not supported in actions")):e===403?(s="Forbidden",d='Route "'+n+'" does not match URL "'+r+'"'):e===404?(s="Not Found",d='No route matches URL "'+r+'"'):e===405&&(s="Method Not Allowed",i&&r&&n?d="You made a "+i.toUpperCase()+' request to "'+r+'" but '+('did not provide an `action` for route "'+n+'", ')+"so there is no way to handle the request.":i&&(d='Invalid request method "'+i.toUpperCase()+'"')),new Rt(e||500,s,new Error(d),!0)}a(fe,"getInternalRouterError");function Ft(e){for(let t=e.length-1;t>=0;t--){let r=e[t];if(Te(r))return r}}a(Ft,"findRedirect");function yr(e){let t=typeof e=="string"?de(e):e;return be(H({},t,{hash:""}))}a(yr,"stripHashFromPath");function Cn(e,t){return e.pathname===t.pathname&&e.search===t.search&&e.hash!==t.hash}a(Cn,"isHashChangeOnly");function Se(e){return e.type===ne.deferred}a(Se,"isDeferredResult");function xe(e){return e.type===ne.error}a(xe,"isErrorResult");function Te(e){return(e&&e.type)===ne.redirect}a(Te,"isRedirectResult");function Mn(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}a(Mn,"isResponse");function xn(e){return bn.has(e)}a(xn,"isValidMethod");function pe(e){return vn.has(e)}a(pe,"isMutationMethod");async function Gt(e,t,r,n,i,c){for(let s=0;sy.route.id===u.route.id),w=b!=null&&!pr(b,u)&&(c&&c[u.route.id])!==void 0;Se(d)&&(i||w)&&await vr(d,n,i).then(y=>{y&&(r[s]=y||r[s])})}}a(Gt,"resolveDeferredResults");async function vr(e,t,r){if(r===void 0&&(r=!1),!await e.deferredData.resolveData(t)){if(r)try{return{type:ne.data,data:e.deferredData.unwrappedData}}catch(i){return{type:ne.error,error:i}}return{type:ne.data,data:e.deferredData.data}}}a(vr,"resolveDeferredData");function gr(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}a(gr,"hasNakedIndexQuery");function zt(e,t){let{route:r,pathname:n,params:i}=e;return{id:r.id,pathname:n,params:i,data:t[r.id],handle:r.handle}}a(zt,"createUseMatchesMatch");function dt(e,t){let r=typeof t=="string"?de(t).search:t.search;if(e[e.length-1].route.index&&gr(r||""))return e[e.length-1];let n=Je(e);return n[n.length-1]}a(dt,"getTargetMatch");/** * React Router v6.9.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function kn(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}a(kn,"isPolyfill");const In=typeof Object.is=="function"?Object.is:kn,{useState:Nn,useEffect:_n,useLayoutEffect:jn,useDebugValue:Un}=st;function $n(e,t,r){const n=t(),[{inst:i},c]=Nn({inst:{value:n,getSnapshot:t}});return jn(()=>{i.value=n,i.getSnapshot=t,it(i)&&c({inst:i})},[e,n,t]),_n(()=>(it(i)&&c({inst:i}),e(a(()=>{it(i)&&c({inst:i})},"handleStoreChange"))),[e]),Un(n),n}a($n,"useSyncExternalStore$2");function it(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!In(r,n)}catch{return!0}}a(it,"checkIfSnapshotChanged");function Bn(e,t,r){return t()}a(Bn,"useSyncExternalStore$1");const Fn=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Gn=!Fn,zn=Gn?Bn:$n,Kn="useSyncExternalStore"in st?(e=>e.useSyncExternalStore)(st):zn,Lt=A.exports.createContext(null),Pt=A.exports.createContext(null),Ne=A.exports.createContext(null),_e=A.exports.createContext(null),ye=A.exports.createContext({outlet:null,matches:[]}),br=A.exports.createContext(null);function ht(){return ht=Object.assign?Object.assign.bind():function(e){for(var t=1;td.pathnameBase)),c=A.exports.useRef(!1);return A.exports.useEffect(()=>{c.current=!0}),A.exports.useCallback(function(d,u){if(u===void 0&&(u={}),!c.current)return;if(typeof d=="number"){t.go(d);return}let b=St(d,JSON.parse(i),n,u.relative==="path");e!=="/"&&(b.pathname=b.pathname==="/"?e:me([e,b.pathname])),(u.replace?t.replace:t.push)(b,u.state,u)},[e,t,i,n])}a(wr,"useNavigate");function Hn(){let{matches:e}=A.exports.useContext(ye),t=e[e.length-1];return t?t.params:{}}a(Hn,"useParams");function Er(e,t){let{relative:r}=t===void 0?{}:t,{matches:n}=A.exports.useContext(ye),{pathname:i}=we(),c=JSON.stringify(Je(n).map(s=>s.pathnameBase));return A.exports.useMemo(()=>St(e,JSON.parse(c),i,r==="path"),[e,c,i,r])}a(Er,"useResolvedPath");function Yn(e,t){je()||$(!1);let{navigator:r}=A.exports.useContext(Ne),n=A.exports.useContext(Pt),{matches:i}=A.exports.useContext(ye),c=i[i.length-1],s=c?c.params:{};c&&c.pathname;let d=c?c.pathnameBase:"/";c&&c.route;let u=we(),b;if(t){var w;let h=typeof t=="string"?de(t):t;d==="/"||((w=h.pathname)==null?void 0:w.startsWith(d))||$(!1),b=h}else b=u;let y=b.pathname||"/",P=d==="/"?y:y.slice(d.length)||"/",L=Le(e,{pathname:P}),R=Xn(L&&L.map(h=>Object.assign({},h,{params:Object.assign({},s,h.params),pathname:me([d,r.encodeLocation?r.encodeLocation(h.pathname).pathname:h.pathname]),pathnameBase:h.pathnameBase==="/"?d:me([d,r.encodeLocation?r.encodeLocation(h.pathnameBase).pathname:h.pathnameBase])})),i,n||void 0);return t&&R?V(_e.Provider,{value:{location:ht({pathname:"/",search:"",hash:"",state:null,key:"default"},b),navigationType:re.Pop},children:R}):R}a(Yn,"useRoutes");function qn(){let e=ta(),t=cr(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null;return Et(wt,{children:[V("h2",{children:"Unexpected Application Error!"}),V("h3",{style:{fontStyle:"italic"},children:t}),r?V("pre",{style:{padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},children:r}):null,null]})}a(qn,"DefaultErrorComponent");class Sr extends A.exports.Component{constructor(t){super(t),this.state={location:t.location,error:t.error}}static getDerivedStateFromError(t){return{error:t}}static getDerivedStateFromProps(t,r){return r.location!==t.location?{error:t.error,location:t.location}:{error:t.error||r.error,location:r.location}}componentDidCatch(t,r){console.error("React Router caught the following error during render",t,r)}render(){return this.state.error?V(ye.Provider,{value:this.props.routeContext,children:V(br.Provider,{value:this.state.error,children:this.props.component})}):this.props.children}}a(Sr,"RenderErrorBoundary");function Jn(e){let{routeContext:t,match:r,children:n}=e,i=A.exports.useContext(Lt);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),V(ye.Provider,{value:t,children:n})}a(Jn,"RenderedRoute");function Xn(e,t,r){if(t===void 0&&(t=[]),e==null)if(r!=null&&r.errors)e=r.matches;else return null;let n=e,i=r==null?void 0:r.errors;if(i!=null){let c=n.findIndex(s=>s.route.id&&(i==null?void 0:i[s.route.id]));c>=0||$(!1),n=n.slice(0,Math.min(n.length,c+1))}return n.reduceRight((c,s,d)=>{let u=s.route.id?i==null?void 0:i[s.route.id]:null,b=null;r&&(s.route.ErrorBoundary?b=A.exports.createElement(s.route.ErrorBoundary,null):s.route.errorElement?b=s.route.errorElement:b=V(qn,{}));let w=t.concat(n.slice(0,d+1)),y=a(()=>{let P=c;return u?P=b:s.route.Component?P=A.exports.createElement(s.route.Component,null):s.route.element&&(P=s.route.element),V(Jn,{match:s,routeContext:{outlet:c,matches:w},children:P})},"getChildren");return r&&(s.route.ErrorBoundary||s.route.errorElement||d===0)?V(Sr,{location:r.location,component:b,error:u,children:y(),routeContext:{outlet:null,matches:w}}):y()},null)}a(Xn,"_renderMatches");var Kt;(function(e){e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator"})(Kt||(Kt={}));var We;(function(e){e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator"})(We||(We={}));function Qn(e){let t=A.exports.useContext(Pt);return t||$(!1),t}a(Qn,"useDataRouterState");function Zn(e){let t=A.exports.useContext(ye);return t||$(!1),t}a(Zn,"useRouteContext");function ea(e){let t=Zn(),r=t.matches[t.matches.length-1];return r.route.id||$(!1),r.route.id}a(ea,"useCurrentRouteId");function ta(){var e;let t=A.exports.useContext(br),r=Qn(We.UseRouteError),n=ea(We.UseRouteError);return t||((e=r.errors)==null?void 0:e[n])}a(ta,"useRouteError");function ra(e){let{fallbackElement:t,router:r}=e,n=A.exports.useCallback(()=>r.state,[r]),i=Kn(r.subscribe,n,n),c=A.exports.useMemo(()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:u=>r.navigate(u),push:(u,b,w)=>r.navigate(u,{state:b,preventScrollReset:w==null?void 0:w.preventScrollReset}),replace:(u,b,w)=>r.navigate(u,{replace:!0,state:b,preventScrollReset:w==null?void 0:w.preventScrollReset})}),[r]),s=r.basename||"/",d=A.exports.useMemo(()=>({router:r,navigator:c,static:!1,basename:s}),[r,c,s]);return V(wt,{children:V(Lt.Provider,{value:d,children:V(Pt.Provider,{value:i,children:V(na,{basename:r.basename,location:r.state.location,navigationType:r.state.historyAction,navigator:c,children:r.state.initialized?V(aa,{}):t})})})})}a(ra,"RouterProvider");function Ke(e){$(!1)}a(Ke,"Route");function na(e){let{basename:t="/",children:r=null,location:n,navigationType:i=re.Pop,navigator:c,static:s=!1}=e;je()&&$(!1);let d=t.replace(/^\/*/,"/"),u=A.exports.useMemo(()=>({basename:d,navigator:c,static:s}),[d,c,s]);typeof n=="string"&&(n=de(n));let{pathname:b="/",search:w="",hash:y="",state:P=null,key:L="default"}=n,R=A.exports.useMemo(()=>{let h=Ie(b,d);return h==null?null:{location:{pathname:h,search:w,hash:y,state:P,key:L},navigationType:i}},[d,b,w,y,P,L,i]);return R==null?null:V(Ne.Provider,{value:u,children:V(_e.Provider,{children:r,value:R})})}a(na,"Router");function aa(e){let{children:t,location:r}=e,n=A.exports.useContext(Lt),i=n&&!t?n.router.routes:He(t);return Yn(i,r)}a(aa,"Routes");var Vt;(function(e){e[e.pending=0]="pending",e[e.success=1]="success",e[e.error=2]="error"})(Vt||(Vt={}));new Promise(()=>{});function He(e,t){t===void 0&&(t=[]);let r=[];return A.exports.Children.forEach(e,(n,i)=>{if(!A.exports.isValidElement(n))return;if(n.type===A.exports.Fragment){r.push.apply(r,He(n.props.children,t));return}n.type!==Ke&&$(!1),!n.props.index||!n.props.children||$(!1);let c=[...t,i],s={id:n.props.id||c.join("-"),caseSensitive:n.props.caseSensitive,element:n.props.element,Component:n.props.Component,index:n.props.index,path:n.props.path,loader:n.props.loader,action:n.props.action,errorElement:n.props.errorElement,ErrorBoundary:n.props.ErrorBoundary,hasErrorBoundary:n.props.ErrorBoundary!=null||n.props.errorElement!=null,shouldRevalidate:n.props.shouldRevalidate,handle:n.props.handle,lazy:n.props.lazy};n.props.children&&(s.children=He(n.props.children,c)),r.push(s)}),r}a(He,"createRoutesFromChildren");function oa(e){return Boolean(e.ErrorBoundary)||Boolean(e.errorElement)}a(oa,"detectErrorBoundary");function ia(e,t){return Pn({basename:t==null?void 0:t.basename,history:Kr({initialEntries:t==null?void 0:t.initialEntries,initialIndex:t==null?void 0:t.initialIndex}),hydrationData:t==null?void 0:t.hydrationData,routes:e,detectErrorBoundary:oa}).initialize()}a(ia,"createMemoryRouter");/** * React Router DOM v6.9.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function la(e,t){if(e==null)return{};var r={},n=Object.keys(e),i,c;for(c=0;c=0)&&(r[i]=e[i]);return r}a(la,"_objectWithoutPropertiesLoose");function sa(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}a(sa,"isModifiedEvent");function ua(e,t){return e.button===0&&(!t||t==="_self")&&!sa(e)}a(ua,"shouldProcessLinkClick");function pt(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(i=>[r,i]):[[r,n]])},[]))}a(pt,"createSearchParams");function ca(e,t){let r=pt(e);if(t)for(let n of t.keys())r.has(n)||t.getAll(n).forEach(i=>{r.append(n,i)});return r}a(ca,"getSearchParamsForLocation");const fa=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset"],da=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",ha=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,pa=A.exports.forwardRef(a(function(t,r){let{onClick:n,relative:i,reloadDocument:c,replace:s,state:d,target:u,to:b,preventScrollReset:w}=t,y=la(t,fa),{basename:P}=A.exports.useContext(Ne),L,R=!1;if(typeof b=="string"&&ha.test(b)&&(L=b,da)){let M=new URL(window.location.href),G=b.startsWith("//")?new URL(M.protocol+b):new URL(b),j=Ie(G.pathname,P);G.origin===M.origin&&j!=null?b=j+G.search+G.hash:R=!0}let h=Vn(b,{relative:i}),I=ma(b,{replace:s,state:d,target:u,preventScrollReset:w,relative:i});function C(M){n&&n(M),M.defaultPrevented||I(M)}return a(C,"handleClick"),V("a",{...y,href:L||h,onClick:R||c?n:C,ref:r,target:u})},"LinkWithRef"));var Wt;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmitImpl="useSubmitImpl",e.UseFetcher="useFetcher"})(Wt||(Wt={}));var Ht;(function(e){e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(Ht||(Ht={}));function ma(e,t){let{target:r,replace:n,state:i,preventScrollReset:c,relative:s}=t===void 0?{}:t,d=wr(),u=we(),b=Er(e,{relative:s});return A.exports.useCallback(w=>{if(ua(w,r)){w.preventDefault();let y=n!==void 0?n:be(u)===be(b);d(e,{replace:y,state:i,preventScrollReset:c,relative:s})}},[u,d,b,n,i,r,e,c,s])}a(ma,"useLinkClickHandler");function ya(e){let t=A.exports.useRef(pt(e)),r=A.exports.useRef(!1),n=we(),i=A.exports.useMemo(()=>ca(n.search,r.current?null:t.current),[n.search]),c=wr(),s=A.exports.useCallback((d,u)=>{const b=pt(typeof d=="function"?d(i):d);r.current=!0,c("?"+b,u)},[c,i]);return[i,s]}a(ya,"useSearchParams");var ve="storybook/react-router-v6",va="reactRouter",K={CLEAR:"".concat(ve,"/clear"),NAVIGATION:"".concat(ve,"/navigation"),STORY_LOADED:"".concat(ve,"/story-loaded"),ROUTE_MATCHES:"".concat(ve,"/route-matches"),ACTION_INVOKED:"".concat(ve,"/action_invoked"),ACTION_SETTLED:"".concat(ve,"/action_settled"),LOADER_INVOKED:"".concat(ve,"/loader_invoked"),LOADER_SETTLED:"".concat(ve,"/loader_settled")},ga=a(function(){var t=we();return"".concat(t.pathname).concat(t.search).concat(t.hash)},"useCurrentUrl"),Rr=ar.createContext([]),Lr=a(function(){return ar.useContext(Rr)},"useDeepRouteMatches");function ba(e,t){return Ra(e)||Sa(e,t)||Ea(e,t)||wa()}a(ba,"_slicedToArray$3");function wa(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}a(wa,"_nonIterableRest$3");function Ea(e,t){if(!!e){if(typeof e=="string")return Yt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yt(e,t)}}a(Ea,"_unsupportedIterableToArray$3");function Yt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0;--v){var m=this.tryEntries[v],T=m.completion;if(m.tryLoc==="root")return p("end");if(m.tryLoc<=this.prev){var D=r.call(m,"catchLoc"),_=r.call(m,"finallyLoc");if(D&&_){if(this.prev=0;--p){var v=this.tryEntries[p];if(v.tryLoc<=this.prev&&r.call(v,"finallyLoc")&&this.prev=0;--l){var p=this.tryEntries[l];if(p.finallyLoc===o)return this.complete(p.completion,p.afterLoc),Q(p),y}},"finish"),catch:a(function(o){for(var l=this.tryEntries.length-1;l>=0;--l){var p=this.tryEntries[l];if(p.tryLoc===o){var v=p.completion;if(v.type==="throw"){var m=v.arg;Q(p)}return m}}throw new Error("illegal catch attempt")},"_catch"),delegateYield:a(function(o,l,p){return this.delegate={iterator:ee(o),resultName:l,nextLoc:p},this.method==="next"&&(this.arg=void 0),y},"delegateYield")},e}a(yt,"_regeneratorRuntime$2");function qt(e,t,r,n,i,c,s){try{var d=e[c](s),u=d.value}catch(b){r(b);return}d.done?t(u):Promise.resolve(u).then(n,i)}a(qt,"asyncGeneratorStep$2");function Pa(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var c=e.apply(t,r);function s(u){qt(c,n,i,s,d,"next",u)}a(s,"_next");function d(u){qt(c,n,i,s,d,"throw",u)}a(d,"_throw"),s(void 0)})}}a(Pa,"_asyncToGenerator$2");function Ta(){var e={};return e.promise=new Promise(function(t,r){e.resolve=t,e.reject=r}),e}a(Ta,"defer");function Da(e){var t={};return e.forEach(function(r,n){if(r instanceof File){t[n]={filename:r.name,filesize:r.size,filetype:r.type};return}t[n]=r}),t}a(Da,"getFormDataSummary");function Jt(e){return vt.apply(this,arguments)}a(Jt,"getHumanReadableBody");function vt(){return vt=Pa(yt().mark(a(function e(t){var r,n,i;return yt().wrap(a(function(s){for(;;)switch(s.prev=s.next){case 0:r=t.clone(),n=r.headers.get("content-type")||"",i=void 0,s.t0=!0,s.next=s.t0===n.startsWith("text")?6:s.t0===n.startsWith("application/json")?10:s.t0===n.startsWith("multipart/form-data")||s.t0===n.startsWith("application/x-www-form-urlencoded")?14:20;break;case 6:return s.next=8,r.text();case 8:return i=s.sent,s.abrupt("break",23);case 10:return s.next=12,r.json();case 12:return i=s.sent,s.abrupt("break",23);case 14:return s.t1=Da,s.next=17,r.formData();case 17:return s.t2=s.sent,i=(0,s.t1)(s.t2),s.abrupt("break",23);case 20:return s.next=22,r.arrayBuffer().then(function(d){return d.byteLength});case 22:s.sent;case 23:return s.abrupt("return",{url:r.url,method:r.method,body:i});case 24:case"end":return s.stop()}},"_callee$"),e)},"_callee"))),vt.apply(this,arguments)}a(vt,"_getHumanReadableBody");function lt(e,t){return Ma(e)||Ca(e,t)||Aa(e,t)||Oa()}a(lt,"_slicedToArray$2");function Oa(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}a(Oa,"_nonIterableRest$2");function Aa(e,t){if(!!e){if(typeof e=="string")return Xt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Xt(e,t)}}a(Aa,"_unsupportedIterableToArray$2");function Xt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);rh.length&&(I(M),n.emit(K.ROUTE_MATCHES,C(K.ROUTE_MATCHES)))},[M]),V(wt,{children:r})},"RouterLogger");function ka(e,t){return ja(e)||_a(e,t)||Na(e,t)||Ia()}a(ka,"_slicedToArray$1");function Ia(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}a(Ia,"_nonIterableRest$1");function Na(e,t){if(!!e){if(typeof e=="string")return Qt(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Qt(e,t)}}a(Na,"_unsupportedIterableToArray$1");function Qt(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0?"?".concat(R):"",I={search:h,state:s};d!==void 0&&(I.pathname=d),d===void 0&&L!==""&&(I.pathname=L);var C=He(r),M=ia(C,{initialEntries:[I],hydrationData:u});P(M)},[]),y!==void 0&&module&&module.hot&&module.hot.dispose&&module.hot.dispose(function(){return y.dispose()}),y===void 0?null:V(ra,{router:y,fallbackElement:V($a,{})})},"StoryRouter");function $a(){return V("p",{children:"Performing initial data load"})}a($a,"Fallback");function gt(e){return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gt(e)}a(gt,"_typeof$2");function bt(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */bt=a(function(){return e},"_regeneratorRuntime");var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(f,o,l){f[o]=l.value},i=typeof Symbol=="function"?Symbol:{},c=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",d=i.toStringTag||"@@toStringTag";function u(f,o,l){return Object.defineProperty(f,o,{value:l,enumerable:!0,configurable:!0,writable:!0}),f[o]}a(u,"define");try{u({},"")}catch{u=a(function(l,p,v){return l[p]=v},"define")}function b(f,o,l,p){var v=o&&o.prototype instanceof P?o:P,m=Object.create(v.prototype),T=new Z(p||[]);return n(m,"_invoke",{value:z(f,l,T)}),m}a(b,"wrap");function w(f,o,l){try{return{type:"normal",arg:f.call(o,l)}}catch(p){return{type:"throw",arg:p}}}a(w,"tryCatch"),e.wrap=b;var y={};function P(){}a(P,"Generator");function L(){}a(L,"GeneratorFunction");function R(){}a(R,"GeneratorFunctionPrototype");var h={};u(h,c,function(){return this});var I=Object.getPrototypeOf,C=I&&I(I(ee([])));C&&C!==t&&r.call(C,c)&&(h=C);var M=R.prototype=P.prototype=Object.create(h);function G(f){["next","throw","return"].forEach(function(o){u(f,o,function(l){return this._invoke(o,l)})})}a(G,"defineIteratorMethods");function j(f,o){function l(v,m,T,D){var _=w(f[v],f,m);if(_.type!=="throw"){var X=_.arg,J=X.value;return J&>(J)=="object"&&r.call(J,"__await")?o.resolve(J.__await).then(function(W){l("next",W,T,D)},function(W){l("throw",W,T,D)}):o.resolve(J).then(function(W){X.value=W,T(X)},function(W){return l("throw",W,T,D)})}D(_.arg)}a(l,"invoke");var p;n(this,"_invoke",{value:a(function(m,T){function D(){return new o(function(_,X){l(m,T,_,X)})}return a(D,"callInvokeWithMethodAndArg"),p=p?p.then(D,D):D()},"value")})}a(j,"AsyncIterator");function z(f,o,l){var p="suspendedStart";return function(v,m){if(p==="executing")throw new Error("Generator is already running");if(p==="completed"){if(v==="throw")throw m;return le()}for(l.method=v,l.arg=m;;){var T=l.delegate;if(T){var D=q(T,l);if(D){if(D===y)continue;return D}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(p==="suspendedStart")throw p="completed",l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);p="executing";var _=w(f,o,l);if(_.type==="normal"){if(p=l.done?"completed":"suspendedYield",_.arg===y)continue;return{value:_.arg,done:l.done}}_.type==="throw"&&(p="completed",l.method="throw",l.arg=_.arg)}}}a(z,"makeInvokeMethod");function q(f,o){var l=o.method,p=f.iterator[l];if(p===void 0)return o.delegate=null,l==="throw"&&f.iterator.return&&(o.method="return",o.arg=void 0,q(f,o),o.method==="throw")||l!=="return"&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+l+"' method")),y;var v=w(p,f.iterator,o.arg);if(v.type==="throw")return o.method="throw",o.arg=v.arg,o.delegate=null,y;var m=v.arg;return m?m.done?(o[f.resultName]=m.value,o.next=f.nextLoc,o.method!=="return"&&(o.method="next",o.arg=void 0),o.delegate=null,y):m:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,y)}a(q,"maybeInvokeDelegate");function F(f){var o={tryLoc:f[0]};1 in f&&(o.catchLoc=f[1]),2 in f&&(o.finallyLoc=f[2],o.afterLoc=f[3]),this.tryEntries.push(o)}a(F,"pushTryEntry");function Q(f){var o=f.completion||{};o.type="normal",delete o.arg,f.completion=o}a(Q,"resetTryEntry");function Z(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(F,this),this.reset(!0)}a(Z,"Context");function ee(f){if(f){var o=f[c];if(o)return o.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var l=-1,p=a(function v(){for(;++l=0;--v){var m=this.tryEntries[v],T=m.completion;if(m.tryLoc==="root")return p("end");if(m.tryLoc<=this.prev){var D=r.call(m,"catchLoc"),_=r.call(m,"finallyLoc");if(D&&_){if(this.prev=0;--p){var v=this.tryEntries[p];if(v.tryLoc<=this.prev&&r.call(v,"finallyLoc")&&this.prev=0;--l){var p=this.tryEntries[l];if(p.finallyLoc===o)return this.complete(p.completion,p.afterLoc),Q(p),y}},"finish"),catch:a(function(o){for(var l=this.tryEntries.length-1;l>=0;--l){var p=this.tryEntries[l];if(p.tryLoc===o){var v=p.completion;if(v.type==="throw"){var m=v.arg;Q(p)}return m}}throw new Error("illegal catch attempt")},"_catch"),delegateYield:a(function(o,l,p){return this.delegate={iterator:ee(o),resultName:l,nextLoc:p},this.method==="next"&&(this.arg=void 0),y},"delegateYield")},e}a(bt,"_regeneratorRuntime$1");function Zt(e,t,r,n,i,c,s){try{var d=e[c](s),u=d.value}catch(b){r(b);return}d.done?t(u):Promise.resolve(u).then(n,i)}a(Zt,"asyncGeneratorStep$1");function Ba(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var c=e.apply(t,r);function s(u){Zt(c,n,i,s,d,"next",u)}a(s,"_next");function d(u){Zt(c,n,i,s,d,"throw",u)}a(d,"_throw"),s(void 0)})}}a(Ba,"_asyncToGenerator$1");var Pr=a(function(){var t=A.exports.useRef(0);return function(){var r=Ba(bt().mark(a(function n(i,c){var s,d,u,b,w,y,P,L,R,h;return bt().wrap(a(function(C){for(;;)switch(C.prev=C.next){case 0:C.t0=i,C.next=C.t0===K.ACTION_INVOKED?3:C.t0===K.ACTION_SETTLED?6:C.t0===K.LOADER_INVOKED?7:C.t0===K.LOADER_SETTLED?10:11;break;case 3:return s=c,d=s.request,u=s.params,b=s.context,w={url:d.url,method:d.method,body:Jt(d)},C.abrupt("return",{key:"".concat(K.ACTION_INVOKED,"_").concat(t.current++),type:K.ACTION_INVOKED,data:{params:u,request:w,context:b}});case 6:return C.abrupt("return",{key:"".concat(K.ACTION_SETTLED,"_").concat(t.current++),type:K.ACTION_SETTLED,data:c});case 7:return y=c,P=y.request,L=y.params,R=y.context,h={url:P.url,method:P.method,body:Jt(P)},C.abrupt("return",{key:"".concat(K.LOADER_INVOKED,"_").concat(t.current++),type:K.LOADER_INVOKED,data:{params:L,request:h,context:R}});case 10:return C.abrupt("return",{key:"".concat(K.LOADER_SETTLED,"_").concat(t.current++),type:K.LOADER_SETTLED,data:c});case 11:case"end":return C.stop()}},"_callee$"),n)},"_callee")));return function(n,i){return r.apply(this,arguments)}}()},"useDataEventBuilder");function ke(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ke=a(function(){return e},"_regeneratorRuntime");var e={},t=Object.prototype,r=t.hasOwnProperty,n=Object.defineProperty||function(f,o,l){f[o]=l.value},i=typeof Symbol=="function"?Symbol:{},c=i.iterator||"@@iterator",s=i.asyncIterator||"@@asyncIterator",d=i.toStringTag||"@@toStringTag";function u(f,o,l){return Object.defineProperty(f,o,{value:l,enumerable:!0,configurable:!0,writable:!0}),f[o]}a(u,"define");try{u({},"")}catch{u=a(function(l,p,v){return l[p]=v},"define")}function b(f,o,l,p){var v=o&&o.prototype instanceof P?o:P,m=Object.create(v.prototype),T=new Z(p||[]);return n(m,"_invoke",{value:z(f,l,T)}),m}a(b,"wrap");function w(f,o,l){try{return{type:"normal",arg:f.call(o,l)}}catch(p){return{type:"throw",arg:p}}}a(w,"tryCatch"),e.wrap=b;var y={};function P(){}a(P,"Generator");function L(){}a(L,"GeneratorFunction");function R(){}a(R,"GeneratorFunctionPrototype");var h={};u(h,c,function(){return this});var I=Object.getPrototypeOf,C=I&&I(I(ee([])));C&&C!==t&&r.call(C,c)&&(h=C);var M=R.prototype=P.prototype=Object.create(h);function G(f){["next","throw","return"].forEach(function(o){u(f,o,function(l){return this._invoke(o,l)})})}a(G,"defineIteratorMethods");function j(f,o){function l(v,m,T,D){var _=w(f[v],f,m);if(_.type!=="throw"){var X=_.arg,J=X.value;return J&&Ye(J)=="object"&&r.call(J,"__await")?o.resolve(J.__await).then(function(W){l("next",W,T,D)},function(W){l("throw",W,T,D)}):o.resolve(J).then(function(W){X.value=W,T(X)},function(W){return l("throw",W,T,D)})}D(_.arg)}a(l,"invoke");var p;n(this,"_invoke",{value:a(function(m,T){function D(){return new o(function(_,X){l(m,T,_,X)})}return a(D,"callInvokeWithMethodAndArg"),p=p?p.then(D,D):D()},"value")})}a(j,"AsyncIterator");function z(f,o,l){var p="suspendedStart";return function(v,m){if(p==="executing")throw new Error("Generator is already running");if(p==="completed"){if(v==="throw")throw m;return le()}for(l.method=v,l.arg=m;;){var T=l.delegate;if(T){var D=q(T,l);if(D){if(D===y)continue;return D}}if(l.method==="next")l.sent=l._sent=l.arg;else if(l.method==="throw"){if(p==="suspendedStart")throw p="completed",l.arg;l.dispatchException(l.arg)}else l.method==="return"&&l.abrupt("return",l.arg);p="executing";var _=w(f,o,l);if(_.type==="normal"){if(p=l.done?"completed":"suspendedYield",_.arg===y)continue;return{value:_.arg,done:l.done}}_.type==="throw"&&(p="completed",l.method="throw",l.arg=_.arg)}}}a(z,"makeInvokeMethod");function q(f,o){var l=o.method,p=f.iterator[l];if(p===void 0)return o.delegate=null,l==="throw"&&f.iterator.return&&(o.method="return",o.arg=void 0,q(f,o),o.method==="throw")||l!=="return"&&(o.method="throw",o.arg=new TypeError("The iterator does not provide a '"+l+"' method")),y;var v=w(p,f.iterator,o.arg);if(v.type==="throw")return o.method="throw",o.arg=v.arg,o.delegate=null,y;var m=v.arg;return m?m.done?(o[f.resultName]=m.value,o.next=f.nextLoc,o.method!=="return"&&(o.method="next",o.arg=void 0),o.delegate=null,y):m:(o.method="throw",o.arg=new TypeError("iterator result is not an object"),o.delegate=null,y)}a(q,"maybeInvokeDelegate");function F(f){var o={tryLoc:f[0]};1 in f&&(o.catchLoc=f[1]),2 in f&&(o.finallyLoc=f[2],o.afterLoc=f[3]),this.tryEntries.push(o)}a(F,"pushTryEntry");function Q(f){var o=f.completion||{};o.type="normal",delete o.arg,f.completion=o}a(Q,"resetTryEntry");function Z(f){this.tryEntries=[{tryLoc:"root"}],f.forEach(F,this),this.reset(!0)}a(Z,"Context");function ee(f){if(f){var o=f[c];if(o)return o.call(f);if(typeof f.next=="function")return f;if(!isNaN(f.length)){var l=-1,p=a(function v(){for(;++l=0;--v){var m=this.tryEntries[v],T=m.completion;if(m.tryLoc==="root")return p("end");if(m.tryLoc<=this.prev){var D=r.call(m,"catchLoc"),_=r.call(m,"finallyLoc");if(D&&_){if(this.prev=0;--p){var v=this.tryEntries[p];if(v.tryLoc<=this.prev&&r.call(v,"finallyLoc")&&this.prev=0;--l){var p=this.tryEntries[l];if(p.finallyLoc===o)return this.complete(p.completion,p.afterLoc),Q(p),y}},"finish"),catch:a(function(o){for(var l=this.tryEntries.length-1;l>=0;--l){var p=this.tryEntries[l];if(p.tryLoc===o){var v=p.completion;if(v.type==="throw"){var m=v.arg;Q(p)}return m}}throw new Error("illegal catch attempt")},"_catch"),delegateYield:a(function(o,l,p){return this.delegate={iterator:ee(o),resultName:l,nextLoc:p},this.method==="next"&&(this.arg=void 0),y},"delegateYield")},e}a(ke,"_regeneratorRuntime");function er(e,t,r,n,i,c,s){try{var d=e[c](s),u=d.value}catch(b){r(b);return}d.done?t(u):Promise.resolve(u).then(n,i)}a(er,"asyncGeneratorStep");function Tr(e){return function(){var t=this,r=arguments;return new Promise(function(n,i){var c=e.apply(t,r);function s(u){er(c,n,i,s,d,"next",u)}a(s,"_next");function d(u){er(c,n,i,s,d,"throw",u)}a(d,"_throw"),s(void 0)})}}a(Tr,"_asyncToGenerator");function Ye(e){return Ye=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ye(e)}a(Ye,"_typeof$1");function Fa(e,t){return Va(e)||Ka(e,t)||za(e,t)||Ga()}a(Fa,"_slicedToArray");function Ga(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}a(Ga,"_nonIterableRest");function za(e,t){if(!!e){if(typeof e=="string")return tr(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return tr(e,t)}}a(za,"_unsupportedIterableToArray");function tr(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ree.length?Z.matches:ee}),Reflect.set(F,Q,Z)},"set")});var j=Ha(w)?w:{element:w},z={element:j.element,errorElement:j.errorElement,action:j.action!==void 0?rr(h,j.action):void 0,loader:j.loader!==void 0?nr(h,j.loader):void 0};return V(Rr.Provider,{value:M,children:V(Ua,{routePath:s,routeParams:d,routeState:b,searchParams:u,browserPath:i,hydrationData:y,children:Et(Ke,{path:s,action:P!==void 0?rr(h,P):void 0,loader:L!==void 0?nr(h,L):void 0,errorElement:R,element:V(xa,{children:n}),children:[j.element!==void 0&&j.path===void 0&&V(Ke,{index:!0,...z}),j.element!==void 0&&V(Ke,{path:j.path,...z})]})})})},"StoryRouteTree");function Ha(e){return e!==null&&Ye(e)==="object"&&Object.prototype.hasOwnProperty.call(e,"element")}a(Ha,"isOutletProps");function rr(e,t){var r=Pr();return function(){var n=Tr(ke().mark(a(function i(c){var s;return ke().wrap(a(function(u){for(;;)switch(u.prev=u.next){case 0:if(t!==void 0){u.next=2;break}return u.abrupt("return");case 2:return u.t0=e,u.t1=K.ACTION_INVOKED,u.next=6,r(K.ACTION_INVOKED,c);case 6:return u.t2=u.sent,u.t0.emit.call(u.t0,u.t1,u.t2),u.next=10,t(c);case 10:return s=u.sent,u.t3=e,u.t4=K.ACTION_SETTLED,u.next=15,r(K.ACTION_SETTLED,s);case 15:return u.t5=u.sent,u.t3.emit.call(u.t3,u.t4,u.t5),u.abrupt("return",s);case 18:case"end":return u.stop()}},"_callee$"),i)},"_callee")));return function(i){return n.apply(this,arguments)}}()}a(rr,"actionWrapper");function nr(e,t){var r=Pr();return function(){var n=Tr(ke().mark(a(function i(c){var s;return ke().wrap(a(function(u){for(;;)switch(u.prev=u.next){case 0:if(t!==void 0){u.next=2;break}return u.abrupt("return");case 2:return u.t0=e,u.t1=K.LOADER_INVOKED,u.next=6,r(K.LOADER_INVOKED,c);case 6:return u.t2=u.sent,u.t0.emit.call(u.t0,u.t1,u.t2),u.next=10,t(c);case 10:return s=u.sent,u.t3=e,u.t4=K.LOADER_SETTLED,u.next=15,r(K.LOADER_SETTLED,s);case 15:return u.t5=u.sent,u.t3.emit.call(u.t3,u.t4,u.t5),u.abrupt("return",s);case 18:case"end":return u.stop()}},"_callee2$"),i)},"_callee2")));return function(i){return n.apply(this,arguments)}}()}a(nr,"loaderWrapper");function qe(e){return qe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qe(e)}a(qe,"_typeof");var Ya=Gr({name:"withRouter",parameterName:va,wrapper:a(function(t,r,n){var i=n.parameters,c=i===void 0?{}:i,s=c.routePath,d=s===void 0?"*":s,u=c.routeParams,b=c.routeState,w=c.searchParams,y=c.outlet,P=c.browserPath,L=c.loader,R=c.action,h=c.hydrationData;if(typeof d!="string")throw new Error("React Router decorator : `path` must be a string");if(u!==void 0&&qe(u)!=="object")throw new Error("React Router decorator : `params` must be an object with strings as values");if(w!==void 0&&qe(w)!=="object")throw new Error("React Router decorator : `search` must be an object with strings as values");return V(Wa,{browserPath:P,routePath:d,routeParams:u,searchParams:w,routeState:b,outlet:y,loader:L,action:R,hydrationData:h,children:t(r)})},"wrapper")});module&&module.hot&&module.hot.decline&&module.hot.decline();const qa="_tile_1c4l6_1",Ja="_background_1c4l6_12",Xa="_textContainer_1c4l6_40",Qa="_iconContainer_1c4l6_46",ze={tile:qa,background:Ja,textContainer:Xa,iconContainer:Qa},Ve=a(({text:e,icon:t,linkTo:r,onClick:n})=>Et(pa,{to:r,onClick:n,className:ze.tile,children:[V("div",{className:ze.background}),V("span",{className:ze.iconContainer,children:V(t,{})}),V("span",{className:ze.textContainer,children:e})]}),"Tile"),Dr=Ve;try{Ve.displayName="Tile",Ve.__docgenInfo={description:"",displayName:"Tile",props:{text:{defaultValue:null,description:"",name:"text",required:!0,type:{name:"string"}},icon:{defaultValue:null,description:"",name:"icon",required:!0,type:{name:"FunctionComponent>> & { title?: string | undefined; }"}},linkTo:{defaultValue:null,description:"",name:"linkTo",required:!0,type:{name:"string"}},onClick:{defaultValue:null,description:"",name:"onClick",required:!1,type:{name:"(() => unknown)"}}}},typeof STORYBOOK_REACT_CLASSES<"u"&&(STORYBOOK_REACT_CLASSES["src/components/tile/Tile.tsx#Tile"]={docgenInfo:Ve.__docgenInfo,name:"Tile",path:"src/components/tile/Tile.tsx#Tile"})}catch{}const io={parameters:{storySource:{source:`import React from "react"; import { withRouter } from "storybook-addon-react-router-v6"; // @ts-ignore import { ReactComponent as Icon } from "../assets/search.svg"; import { ComponentStory, ComponentMeta } from "@storybook/react"; import Tile from "../components/tile"; import { Link } from "react-router-dom"; export default { title: "Tile", component: Tile, decorators: [withRouter] } as ComponentMeta; const Template: ComponentStory = (args) => ; export const defaultTile = Template.bind({}); defaultTile.args = { icon: Icon, }; `,locationsMap:{"default-tile":{startLoc:{col:46,line:13},endLoc:{col:74,line:13},startBody:{col:46,line:13},endBody:{col:74,line:13}}}}},title:"Tile",component:Dr,decorators:[Ya]},Za=a(e=>V(Dr,{...e}),"Template"),eo=Za.bind({});eo.args={icon:zr};const lo=["defaultTile"];export{lo as __namedExportsOrder,io as default,eo as defaultTile}; //# sourceMappingURL=Tile.stories.e288fa43.js.map