import{r as o,u as _,a as re,N,b as me,s as I,c as he,D as ae,i as x,d as B,e as q,R as oe,f as pe,I as ve,g as ie,h as J,k as we,l as ye,m as Q,n as ge,o as Se,p as be}from"./index-DxNxE5m4.js";import{R as Re}from"./index-B7GvlSJl.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},n=new Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ddc4444b-cfa7-4fab-99b6-24c38f068729",e._sentryDebugIdIdentifier="sentry-dbid-ddc4444b-cfa7-4fab-99b6-24c38f068729")}catch{}})();/**
 * React Router DOM v6.27.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 E(){return E=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var t=arguments[n];for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])}return e},E.apply(this,arguments)}function X(e,n){if(e==null)return{};var t={},r=Object.keys(e),a,s;for(s=0;s<r.length;s++)a=r[s],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}const W="get",Y="application/x-www-form-urlencoded";function j(e){return e!=null&&typeof e.tagName=="string"}function Ee(e){return j(e)&&e.tagName.toLowerCase()==="button"}function Le(e){return j(e)&&e.tagName.toLowerCase()==="form"}function Te(e){return j(e)&&e.tagName.toLowerCase()==="input"}function Ce(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function xe(e,n){return e.button===0&&(!n||n==="_self")&&!Ce(e)}function G(e){return e===void 0&&(e=""),new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((n,t)=>{let r=e[t];return n.concat(Array.isArray(r)?r.map(a=>[t,a]):[[t,r]])},[]))}function Pe(e,n){let t=G(e);return n&&n.forEach((r,a)=>{t.has(a)||n.getAll(a).forEach(s=>{t.append(a,s)})}),t}let K=null;function Fe(){if(K===null)try{new FormData(document.createElement("form"),0),K=!1}catch{K=!0}return K}const Ie=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function z(e){return e!=null&&!Ie.has(e)?null:e}function ke(e,n){let t,r,a,s,l;if(Le(e)){let u=e.getAttribute("action");r=u?I(u,n):null,t=e.getAttribute("method")||W,a=z(e.getAttribute("enctype"))||Y,s=new FormData(e)}else if(Ee(e)||Te(e)&&(e.type==="submit"||e.type==="image")){let u=e.form;if(u==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||u.getAttribute("action");if(r=f?I(f,n):null,t=e.getAttribute("formmethod")||u.getAttribute("method")||W,a=z(e.getAttribute("formenctype"))||z(u.getAttribute("enctype"))||Y,s=new FormData(u,e),!Fe()){let{name:i,type:c,value:h}=e;if(c==="image"){let d=i?i+".":"";s.append(d+"x","0"),s.append(d+"y","0")}else i&&s.append(i,h)}}else{if(j(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');t=W,r=null,a=Y,l=e}return s&&a==="text/plain"&&(l=s,s=void 0),{action:r,method:t.toLowerCase(),encType:a,formData:s,body:l}}const Ue=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],Ae=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],De=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"],_e="6";try{window.__reactRouterVersion=_e}catch{}const se=o.createContext({isTransitioning:!1}),le=o.createContext(new Map),Ne="startTransition",Z=ie[Ne],Oe="flushSync",ee=Re[Oe],Me="useId",te=ie[Me];function Ke(e){Z?Z(e):e()}function A(e){ee?ee(e):e()}class Ve{constructor(){this.status="pending",this.promise=new Promise((n,t)=>{this.resolve=r=>{this.status==="pending"&&(this.status="resolved",n(r))},this.reject=r=>{this.status==="pending"&&(this.status="rejected",t(r))}})}}function tt(e){let{fallbackElement:n,router:t,future:r}=e,[a,s]=o.useState(t.state),[l,u]=o.useState(),[f,i]=o.useState({isTransitioning:!1}),[c,h]=o.useState(),[d,g]=o.useState(),[y,R]=o.useState(),S=o.useRef(new Map),{v7_startTransition:L}=r||{},m=o.useCallback(w=>{L?Ke(w):w()},[L]),p=o.useCallback((w,T)=>{let{deletedFetchers:b,flushSync:M,viewTransitionOpts:P}=T;b.forEach(F=>S.current.delete(F)),w.fetchers.forEach((F,de)=>{F.data!==void 0&&S.current.set(de,F.data)});let fe=t.window==null||t.window.document==null||typeof t.window.document.startViewTransition!="function";if(!P||fe){M?A(()=>s(w)):m(()=>s(w));return}if(M){A(()=>{d&&(c&&c.resolve(),d.skipTransition()),i({isTransitioning:!0,flushSync:!0,currentLocation:P.currentLocation,nextLocation:P.nextLocation})});let F=t.window.document.startViewTransition(()=>{A(()=>s(w))});F.finished.finally(()=>{A(()=>{h(void 0),g(void 0),u(void 0),i({isTransitioning:!1})})}),A(()=>g(F));return}d?(c&&c.resolve(),d.skipTransition(),R({state:w,currentLocation:P.currentLocation,nextLocation:P.nextLocation})):(u(w),i({isTransitioning:!0,flushSync:!1,currentLocation:P.currentLocation,nextLocation:P.nextLocation}))},[t.window,d,c,S,m]);o.useLayoutEffect(()=>t.subscribe(p),[t,p]),o.useEffect(()=>{f.isTransitioning&&!f.flushSync&&h(new Ve)},[f]),o.useEffect(()=>{if(c&&l&&t.window){let w=l,T=c.promise,b=t.window.document.startViewTransition(async()=>{m(()=>s(w)),await T});b.finished.finally(()=>{h(void 0),g(void 0),u(void 0),i({isTransitioning:!1})}),g(b)}},[m,l,c,t.window]),o.useEffect(()=>{c&&l&&a.location.key===l.location.key&&c.resolve()},[c,d,a.location,l]),o.useEffect(()=>{!f.isTransitioning&&y&&(u(y.state),i({isTransitioning:!0,flushSync:!1,currentLocation:y.currentLocation,nextLocation:y.nextLocation}),R(void 0))},[f.isTransitioning,y]),o.useEffect(()=>{},[]);let v=o.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:w=>t.navigate(w),push:(w,T,b)=>t.navigate(w,{state:T,preventScrollReset:b==null?void 0:b.preventScrollReset}),replace:(w,T,b)=>t.navigate(w,{replace:!0,state:T,preventScrollReset:b==null?void 0:b.preventScrollReset})}),[t]),C=t.basename||"/",U=o.useMemo(()=>({router:t,navigator:v,static:!1,basename:C}),[t,v,C]),O=o.useMemo(()=>({v7_relativeSplatPath:t.future.v7_relativeSplatPath}),[t.future.v7_relativeSplatPath]);return o.createElement(o.Fragment,null,o.createElement(ae.Provider,{value:U},o.createElement(J.Provider,{value:a},o.createElement(le.Provider,{value:S.current},o.createElement(se.Provider,{value:f},o.createElement(we,{basename:C,location:a.location,navigationType:a.historyAction,navigator:v,future:O},a.initialized||t.future.v7_partialHydration?o.createElement(We,{routes:t.routes,future:t.future,state:a}):n))))),null)}const We=o.memo(Be);function Be(e){let{routes:n,future:t,state:r}=e;return ye(n,void 0,r,t)}const je=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",He=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Ye=o.forwardRef(function(n,t){let{onClick:r,relative:a,reloadDocument:s,replace:l,state:u,target:f,to:i,preventScrollReset:c,viewTransition:h}=n,d=X(n,Ue),{basename:g}=o.useContext(N),y,R=!1;if(typeof i=="string"&&He.test(i)&&(y=i,je))try{let p=new URL(window.location.href),v=i.startsWith("//")?new URL(p.protocol+i):new URL(i),C=I(v.pathname,g);v.origin===p.origin&&C!=null?i=C+v.search+v.hash:R=!0}catch{}let S=he(i,{relative:a}),L=qe(i,{replace:l,state:u,target:f,preventScrollReset:c,relative:a,viewTransition:h});function m(p){r&&r(p),p.defaultPrevented||L(p)}return o.createElement("a",E({},d,{href:y||S,onClick:R||s?r:m,ref:t,target:f}))}),nt=o.forwardRef(function(n,t){let{"aria-current":r="page",caseSensitive:a=!1,className:s="",end:l=!1,style:u,to:f,viewTransition:i,children:c}=n,h=X(n,Ae),d=B(f,{relative:h.relative}),g=_(),y=o.useContext(J),{navigator:R,basename:S}=o.useContext(N),L=y!=null&&Qe(d)&&i===!0,m=R.encodeLocation?R.encodeLocation(d).pathname:d.pathname,p=g.pathname,v=y&&y.navigation&&y.navigation.location?y.navigation.location.pathname:null;a||(p=p.toLowerCase(),v=v?v.toLowerCase():null,m=m.toLowerCase()),v&&S&&(v=I(v,S)||v);const C=m!=="/"&&m.endsWith("/")?m.length-1:m.length;let U=p===m||!l&&p.startsWith(m)&&p.charAt(C)==="/",O=v!=null&&(v===m||!l&&v.startsWith(m)&&v.charAt(m.length)==="/"),w={isActive:U,isPending:O,isTransitioning:L},T=U?r:void 0,b;typeof s=="function"?b=s(w):b=[s,U?"active":null,O?"pending":null,L?"transitioning":null].filter(Boolean).join(" ");let M=typeof u=="function"?u(w):u;return o.createElement(Ye,E({},h,{"aria-current":T,className:b,ref:t,style:M,to:f,viewTransition:i}),typeof c=="function"?c(w):c)}),ze=o.forwardRef((e,n)=>{let{fetcherKey:t,navigate:r,reloadDocument:a,replace:s,state:l,method:u=W,action:f,onSubmit:i,relative:c,preventScrollReset:h,viewTransition:d}=e,g=X(e,De),y=ce(),R=Xe(f,{relative:c}),S=u.toLowerCase()==="get"?"get":"post",L=m=>{if(i&&i(m),m.defaultPrevented)return;m.preventDefault();let p=m.nativeEvent.submitter,v=(p==null?void 0:p.getAttribute("formmethod"))||u;y(p||m.currentTarget,{fetcherKey:t,method:v,navigate:r,replace:s,state:l,relative:c,preventScrollReset:h,viewTransition:d})};return o.createElement("form",E({ref:n,method:S,action:R,onSubmit:a?i:L},g))});var k;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(k||(k={}));var D;(function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"})(D||(D={}));function H(e){let n=o.useContext(ae);return n||x(!1),n}function $(e){let n=o.useContext(J);return n||x(!1),n}function qe(e,n){let{target:t,replace:r,state:a,preventScrollReset:s,relative:l,viewTransition:u}=n===void 0?{}:n,f=re(),i=_(),c=B(e,{relative:l});return o.useCallback(h=>{if(xe(h,t)){h.preventDefault();let d=r!==void 0?r:q(i)===q(c);f(e,{replace:d,state:a,preventScrollReset:s,relative:l,viewTransition:u})}},[i,f,c,r,a,t,e,s,l,u])}function rt(e){let n=o.useRef(G(e)),t=o.useRef(!1),r=_(),a=o.useMemo(()=>Pe(r.search,t.current?null:n.current),[r.search]),s=re(),l=o.useCallback((u,f)=>{const i=G(typeof u=="function"?u(a):u);t.current=!0,s("?"+i,f)},[s,a]);return[a,l]}function Ge(){if(typeof document>"u")throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}let Je=0,ue=()=>"__"+String(++Je)+"__";function ce(){let{router:e}=H(k.UseSubmit),{basename:n}=o.useContext(N),t=me();return o.useCallback(function(r,a){a===void 0&&(a={}),Ge();let{action:s,method:l,encType:u,formData:f,body:i}=ke(r,n);if(a.navigate===!1){let c=a.fetcherKey||ue();e.fetch(c,t,a.action||s,{preventScrollReset:a.preventScrollReset,formData:f,body:i,formMethod:a.method||l,formEncType:a.encType||u,flushSync:a.flushSync})}else e.navigate(a.action||s,{preventScrollReset:a.preventScrollReset,formData:f,body:i,formMethod:a.method||l,formEncType:a.encType||u,replace:a.replace,state:a.state,fromRouteId:t,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,n,t])}function Xe(e,n){let{relative:t}=n===void 0?{}:n,{basename:r}=o.useContext(N),a=o.useContext(oe);a||x(!1);let[s]=a.matches.slice(-1),l=E({},B(e||".",{relative:t})),u=_();if(e==null){l.search=u.search;let f=new URLSearchParams(l.search),i=f.getAll("index");if(i.some(h=>h==="")){f.delete("index"),i.filter(d=>d).forEach(d=>f.append("index",d));let h=f.toString();l.search=h?"?"+h:""}}return(!e||e===".")&&s.route.index&&(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(l.pathname=l.pathname==="/"?r:pe([r,l.pathname])),q(l)}function at(e){var n;let{key:t}=e===void 0?{}:e,{router:r}=H(k.UseFetcher),a=$(D.UseFetcher),s=o.useContext(le),l=o.useContext(oe),u=(n=l.matches[l.matches.length-1])==null?void 0:n.route.id;s||x(!1),l||x(!1),u==null&&x(!1);let f=te?te():"",[i,c]=o.useState(t||f);t&&t!==i?c(t):i||c(ue()),o.useEffect(()=>(r.getFetcher(i),()=>{r.deleteFetcher(i)}),[r,i]);let h=o.useCallback((m,p)=>{u||x(!1),r.fetch(i,u,m,p)},[i,u,r]),d=ce(),g=o.useCallback((m,p)=>{d(m,E({},p,{navigate:!1,fetcherKey:i}))},[i,d]),y=o.useMemo(()=>o.forwardRef((p,v)=>o.createElement(ze,E({},p,{navigate:!1,fetcherKey:i,ref:v}))),[i]),R=a.fetchers.get(i)||ve,S=s.get(i);return o.useMemo(()=>E({Form:y,submit:g,load:h},R,{data:S}),[y,g,h,R,S])}function ot(){let e=$(D.UseFetchers);return Array.from(e.fetchers.entries()).map(n=>{let[t,r]=n;return E({},r,{key:t})})}const ne="react-router-scroll-positions";let V={};function it(e){let{getKey:n,storageKey:t}=e===void 0?{}:e,{router:r}=H(k.UseScrollRestoration),{restoreScrollPosition:a,preventScrollReset:s}=$(D.UseScrollRestoration),{basename:l}=o.useContext(N),u=_(),f=ge(),i=Se();o.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),$e(o.useCallback(()=>{if(i.state==="idle"){let c=(n?n(u,f):null)||u.key;V[c]=window.scrollY}try{sessionStorage.setItem(t||ne,JSON.stringify(V))}catch{}window.history.scrollRestoration="auto"},[t,n,i.state,u,f])),typeof document<"u"&&(o.useLayoutEffect(()=>{try{let c=sessionStorage.getItem(t||ne);c&&(V=JSON.parse(c))}catch{}},[t]),o.useLayoutEffect(()=>{let c=n&&l!=="/"?(d,g)=>n(E({},d,{pathname:I(d.pathname,l)||d.pathname}),g):n,h=r==null?void 0:r.enableScrollRestoration(V,()=>window.scrollY,c);return()=>h&&h()},[r,l,n]),o.useLayoutEffect(()=>{if(a!==!1){if(typeof a=="number"){window.scrollTo(0,a);return}if(u.hash){let c=document.getElementById(decodeURIComponent(u.hash.slice(1)));if(c){c.scrollIntoView();return}}s!==!0&&window.scrollTo(0,0)}},[u,a,s]))}function st(e,n){let{capture:t}=n||{};o.useEffect(()=>{let r=t!=null?{capture:t}:void 0;return window.addEventListener("beforeunload",e,r),()=>{window.removeEventListener("beforeunload",e,r)}},[e,t])}function $e(e,n){let{capture:t}={};o.useEffect(()=>{let r=t!=null?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}function lt(e){let{when:n,message:t}=e,r=be(n);o.useEffect(()=>{r.state==="blocked"&&(window.confirm(t)?setTimeout(r.proceed,0):r.reset())},[r,t]),o.useEffect(()=>{r.state==="blocked"&&!n&&r.reset()},[r,n])}function Qe(e,n){n===void 0&&(n={});let t=o.useContext(se);t==null&&x(!1);let{basename:r}=H(k.useViewTransitionState),a=B(e,{relative:n.relative});if(!t.isTransitioning)return!1;let s=I(t.currentLocation.pathname,r)||t.currentLocation.pathname,l=I(t.nextLocation.pathname,r)||t.nextLocation.pathname;return Q(a.pathname,l)!=null||Q(a.pathname,s)!=null}export{ze as F,Ye as L,nt as N,tt as R,se as V,ce as a,rt as b,ot as c,at as d,le as e,G as f,lt as g,st as h,Xe as i,qe as j,Qe as k,it as u};
//# sourceMappingURL=index-Cjq7XsPA.js.map
