1var e=Object.defineProperty,t=(t,r,n)=>((t,r,n)=>r in t?e(t,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[r]=n)(t,"symbol"!=typeof r?r+"":r,n);import{r,e as n}from"./index-omYkHBZa.js";import{a}from"./index-iUOoGV2s.js";import{l as o,D as i,h as s,R as l,j as u,b as c,a as d,N as f,s as m,k as h,n as p,o as y,I as v,p as w,q as g,c as E,r as S,t as x,v as b,w as R,x as _,y as L,z as C,A as k,B as T,i as O,C as j,E as N,u as A,m as P,F as M,G as $,H as D,J as F,K as I}from"./index-BToWjq6v.js"; 2/** 3 * React Router DOM v6.30.4 4 * 5 * Copyright (c) Remix Software Inc. 6 * 7 * This source code is licensed under the MIT license found in the 8 * LICENSE.md file in the root directory of this source tree. 9 * 10 * @license MIT 11 */function U(){return U=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},U.apply(null,arguments)}function J(e,t){if(null==e)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(-1!==t.indexOf(n))continue;r[n]=e[n]}return r}const H="get",z="application/x-www-form-urlencoded";function B(e){return null!=e&&"string"==typeof e.tagName}function K(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||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(e=>[r,e]):[[r,n]])},[]))}let q=null;const X=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function W(e){return null==e||X.has(e)?e:null}function Y(e,t){let r,n,a,o,i;if(B(s=e)&&"form"===s.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?m(i,t):null,r=e.getAttribute("method")||H,a=W(e.getAttribute("enctype"))||z,o=new FormData(e)}else if(function(e){return B(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return B(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let i=e.form;if(null==i)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let s=e.getAttribute("formaction")||i.getAttribute("action");if(n=s?m(s,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||H,a=W(e.getAttribute("formenctype"))||W(i.getAttribute("enctype"))||z,o=new FormData(i,e),!function(){if(null===q)try{new FormData(document.createElement("form"),0),q=!1}catch(e){q=!0}return q}()){let{name:t,type:r,value:n}=e;if("image"===r){let e=t?t+".":"";o.append(e+"x","0"),o.append(e+"y","0")}else t&&o.append(t,n)}}else{if(B(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=H,n=null,a=z,i=e}var s;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}const V=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","viewTransition"],G=["aria-current","caseSensitive","className","end","style","to","viewTransition","children"],Z=["fetcherKey","navigate","reloadDocument","replace","state","method","action","onSubmit","relative","preventScrollReset","viewTransition"];try{window.__reactRouterVersion="6"}catch(yr){}const Q=r.createContext({isTransitioning:!1}),ee=r.createContext(new Map),te=n.startTransition,re=a.flushSync,ne=n.useId;function ae(e){re?re(e):e()}let oe=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}})}};function ie(e){let{fallbackElement:t,router:n,future:a}=e,[u,c]=r.useState(n.state),[d,f]=r.useState(),[m,h]=r.useState({isTransitioning:!1}),[p,y]=r.useState(),[v,w]=r.useState(),[g,E]=r.useState(),S=r.useRef(new Map),{v7_startTransition:x}=a||{},b=r.useCallback(e=>{x?function(e){te?te(e):e()}(e):e()},[x]),R=r.useCallback((e,t)=>{let{deletedFetchers:r,flushSync:a,viewTransitionOpts:o}=t;e.fetchers.forEach((e,t)=>{void 0!==e.data&&S.current.set(t,e.data)}),r.forEach(e=>S.current.delete(e));let i=null==n.window||null==n.window.document||"function"!=typeof n.window.document.startViewTransition;if(o&&!i){if(a){ae(()=>{v&&(p&&p.resolve(),v.skipTransition()),h({isTransitioning:!0,flushSync:!0,currentLocation:o.currentLocation,nextLocation:o.nextLocation})});let t=n.window.document.startViewTransition(()=>{ae(()=>c(e))});return t.finished.finally(()=>{ae(()=>{y(void 0),w(void 0),f(void 0),h({isTransitioning:!1})})}),void ae(()=>w(t))}v?(p&&p.resolve(),v.skipTransition(),E({state:e,currentLocation:o.currentLocation,nextLocation:o.nextLocation})):(f(e),h({isTransitioning:!0,flushSync:!1,currentLocation:o.currentLocation,nextLocation:o.nextLocation}))}else a?ae(()=>c(e)):b(()=>c(e))},[n.window,v,p,S,b]);r.useLayoutEffect(()=>n.subscribe(R),[n,R]),r.useEffect(()=>{m.isTransitioning&&!m.flushSync&&y(new oe)},[m]),r.useEffect(()=>{if(p&&d&&n.window){let e=d,t=p.promise,r=n.window.document.startViewTransition(async()=>{b(()=>c(e)),await t});r.finished.finally(()=>{y(void 0),w(void 0),f(void 0),h({isTransitioning:!1})}),w(r)}},[b,d,p,n.window]),r.useEffect(()=>{p&&d&&u.location.key===d.location.key&&p.resolve()},[p,v,u.location,d]),r.useEffect(()=>{!m.isTransitioning&&g&&(f(g.state),h({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),E(void 0))},[m.isTransitioning,g]),r.useEffect(()=>{},[]);let _=r.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:e=>n.navigate(e),push:(e,t,r)=>n.navigate(e,{state:t,preventScrollReset:null==r?void 0:r.preventScrollReset}),replace:(e,t,r)=>n.navigate(e,{replace:!0,state:t,preventScrollReset:null==r?void 0:r.preventScrollReset})}),[n]),L=n.basename||"/",C=r.useMemo(()=>({router:n,navigator:_,static:!1,basename:L}),[n,_,L]),k=r.useMemo(()=>({v7_relativeSplatPath:n.future.v7_relativeSplatPath}),[n.future.v7_relativeSplatPath]);return r.useEffect(()=>o(a,n.future),[a,n.future]),r.createElement(r.Fragment,null,r.createElement(i.Provider,{value:C},r.createElement(s.Provider,{value:u},r.createElement(ee.Provider,{value:S.current},r.createElement(Q.Provider,{value:m},r.createElement(l,{basename:L,location:u.location,navigationType:u.historyAction,navigator:_,future:k},u.initialized||n.future.v7_partialHydration?r.createElement(se,{routes:n.routes,future:n.future,state:u}):t))))),null)}const se=r.memo(le);function le(e){let{routes:t,future:r,state:n}=e;return u(t,void 0,n,r)}const ue="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,ce=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,de=r.forwardRef(function(e,t){let n,{onClick:a,relative:o,reloadDocument:i,replace:s,state:l,target:u,to:c,preventScrollReset:d,viewTransition:p}=e,y=J(e,V),{basename:v}=r.useContext(f),w=!1;if("string"==typeof c&&ce.test(c)&&(n=c,ue))try{let e=new URL(window.location.href),t=c.startsWith("//")?new URL(e.protocol+c):new URL(c),r=m(t.pathname,v);t.origin===e.origin&&null!=r?c=r+t.search+t.hash:w=!0}catch(yr){}let g=h(c,{relative:o}),E=Ee(c,{replace:s,state:l,target:u,preventScrollReset:d,relative:o,viewTransition:p});return r.createElement("a",U({},y,{href:n||g,onClick:w||i?a:function(e){a&&a(e),e.defaultPrevented||E(e)},ref:t,target:u}))}),fe=r.forwardRef(function(e,t){let{"aria-current":n="page",caseSensitive:a=!1,className:o="",end:i=!1,style:l,to:u,viewTransition:d,children:h}=e,p=J(e,G),y=S(u,{relative:p.relative}),v=c(),w=r.useContext(s),{navigator:g,basename:E}=r.useContext(f),x=null!=w&&Ne(y)&&!0===d,b=g.encodeLocation?g.encodeLocation(y).pathname:y.pathname,R=v.pathname,_=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;a||(R=R.toLowerCase(),_=_?_.toLowerCase():null,b=b.toLowerCase()),_&&E&&(_=m(_,E)||_);const L="/"!==b&&b.endsWith("/")?b.length-1:b.length;let C,k=R===b||!i&&R.startsWith(b)&&"/"===R.charAt(L),T=null!=_&&(_===b||!i&&_.startsWith(b)&&"/"===_.charAt(b.length)),O={isActive:k,isPending:T,isTransitioning:x},j=k?n:void 0;C="function"==typeof o?o(O):[o,k?"active":null,T?"pending":null,x?"transitioning":null].filter(
11Boolean).join(" ");let N="function"==typeof l?l(O):l;return r.createElement(de,U({},p,{"aria-current":j,className:C,ref:t,style:N,to:u,viewTransition:d}),"function"==typeof h?h(O):h)}),me=r.forwardRef((e,t)=>{let{fetcherKey:n,navigate:a,reloadDocument:o,replace:i,state:s,method:l=H,action:u,onSubmit:c,relative:d,preventScrollReset:f,viewTransition:m}=e,h=J(e,Z),p=Re(),y=_e(u,{relative:d}),v="get"===l.toLowerCase()?"get":"post";return r.createElement("form",U({ref:t,method:v,action:y,onSubmit:o?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,r=(null==t?void 0:t.getAttribute("formmethod"))||l;p(t||e.currentTarget,{fetcherKey:n,method:r,navigate:a,replace:i,state:s,relative:d,preventScrollReset:f,viewTransition:m})}},h))});var he,pe,ye,ve;function we(e){let t=r.useContext(i);return t||y(!1),t}function ge(e){let t=r.useContext(s);return t||y(!1),t}function Ee(e,t){let{target:n,replace:a,state:o,preventScrollReset:i,relative:s,viewTransition:l}=void 0===t?{}:t,u=d(),f=c(),m=S(e,{relative:s});return r.useCallback(t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,n)){t.preventDefault();let r=void 0!==a?a:x(f)===x(m);u(e,{replace:r,state:o,preventScrollReset:i,relative:s,viewTransition:l})}},[f,u,m,a,o,n,e,i,s,l])}function Se(e){let t=r.useRef(K(e)),n=r.useRef(!1),a=c(),o=r.useMemo(()=>function(e,t){let r=K(e);return t&&t.forEach((e,n)=>{r.has(n)||t.getAll(n).forEach(e=>{r.append(n,e)})}),r}(a.search,n.current?null:t.current),[a.search]),i=d(),s=r.useCallback((e,t)=>{const r=K("function"==typeof e?e(o):e);n.current=!0,i("?"+r,t)},[i,o]);return[o,s]}(pe=he||(he={})).UseScrollRestoration="useScrollRestoration",pe.UseSubmit="useSubmit",pe.UseSubmitFetcher="useSubmitFetcher",pe.UseFetcher="useFetcher",pe.useViewTransitionState="useViewTransitionState",(ve=ye||(ye={})).UseFetcher="useFetcher",ve.UseFetchers="useFetchers",ve.UseScrollRestoration="useScrollRestoration";let xe=0,be=()=>"__"+String(++xe)+"__";function Re(){let{router:e}
11=we(he.UseSubmit),{basename:t}=r.useContext(f),n=w();return r.useCallback(function(r,a){void 0===a&&(a={}),function(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}();let{action:o,method:i,encType:s,formData:l,body:u}=Y(r,t);if(!1===a.navigate){let t=a.fetcherKey||be();e.fetch(t,n,a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,flushSync:a.flushSync})}else e.navigate(a.action||o,{preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||i,formEncType:a.encType||s,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[e,t,n])}function _e(e,t){let{relative:n}=void 0===t?{}:t,{basename:a}=r.useContext(f),o=r.useContext(p);o||y(!1);let[i]=o.matches.slice(-1),s=U({},S(e||".",{relative:n})),l=c();if(null==e){s.search=l.search;let e=new URLSearchParams(s.search),t=e.getAll("index");if(t.some(e=>""===e)){e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?"?"+r:""}}return e&&"."!==e||!i.route.index||(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),"/"!==a&&(s.pathname="/"===s.pathname?a:b([a,s.pathname])),x(s)}function Le(){let e=ge(ye.UseFetchers);return Array.from(e.fetchers.entries()).map(e=>{let[t,r]=e;return U({},r,{key:t})})}const Ce="react-router-scroll-positions";let ke={};function Te(e){let{getKey:t,storageKey:n}=void 0===e?{}:e,{router:a}=we(he.UseScrollRestoration),{restoreScrollPosition:o,preventScrollReset:i}=ge(ye.UseScrollRestoration),{basename:s}=r.useContext(f),l=c(),u=g(),d=E();r.useEffect(()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"}),[]),function(e){let{capture:t}={};r.useEffect(()=>{let r=null!=t?{capture:t}:void 0;return window.addEventListener("pagehide",e,r),()=>{window.removeEventListener("pagehide",e,r)}},[e,t])}(r.useCallback(()=>{if("idle"===d.state){let e=(t?t(l,u):null)||l.key;ke[e]=window.scrollY}try{sessionStorage.setItem(n||Ce,JSON.stringify(ke))}catch(e){}window.history.scrollRestoration="auto"},[n,t,d.state,l,u])),"undefined"!=typeof document&&(r.useLayoutEffect(()=>{try{let e=sessionStorage.getItem(n||Ce);e&&(ke=JSON.parse(e))}catch(yr){}},[n]),r.useLayoutEffect(()=>{let e=t&&"/"!==s?(e,r)=>t(U({},e,{pathname:m(e.pathname,s)||e.pathname}),r):t,r=null==a?void 0:a.enableScrollRestoration(ke,()=>window.scrollY,e);return()=>r&&r()},[a,s,t]),r.useLayoutEffect(()=>{if(!1!==o)if("number"!=typeof o){if(l.hash){let e=document.getElementById(decodeURIComponent(l.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==i&&window.scrollTo(0,0)}else window.scrollTo(0,o)},[l,o,i]))}function Oe(e,t){let{capture:n}=t||{};r.useEffect(()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}},[e,n])}function je(e){let{when:t,message:n}=e,a=_(t);r.useEffect(()=>{if("blocked"===a.state){window.confirm(n)?setTimeout(a.proceed,0):a.reset()}},[a,n]),r.useEffect(()=>{"blocked"!==a.state||t||a.reset()},[a,t])}function Ne(e,t){void 0===t&&(t={});let n=r.useContext(Q);null==n&&y(!1);let{basename:a}=we(he.useViewTransitionState),o=S(e,{relative:t.relative});if(!n.isTransitioning)return!1;let i=m(n.currentLocation.pathname,a)||n.currentLocation.pathname,s=m(n.nextLocation.pathname,a)||n.nextLocation.pathname;return null!=R(o.pathname,s)||null!=R(o.pathname,i)}var Ae=class{constructor(){t(this,"promise"),t(this,"resolve"),t(this,"reject"),this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Pe="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0;function Me(e){const{hydrated:t,values:r}=this;if("number"==typeof e)return $e.call(this,e);if(!Array.isArray(e)||!e.length)throw new SyntaxError;const n=r.length;for(const a of e)r.push(a);return t.length=r.length,$e.call(this,n)}function $e(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,e=>{o=e}]];let s=[];for(;i.length>0;){const[e,o]=i.pop();switch(e){case-7:o(void 0);continue;case-5:o(null);continue;case-2:o(NaN);continue;case-6:o(1/0);continue;case-3:o(-1/0);continue;case-4:o(-0);continue}if(t[e]){o(t[e]);continue}const l=r[e];if(l&&"object"==typeof l){if(!Array.isArray(l)){const r={};t[e]=r;for(const e of Object.keys(l).reverse()){const t=[];i.push([l[e],e=>{t[1]=e}]),i.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{r[t[0]]=t[1]})}o(r);continue}if("string"!=typeof l[0]){const r=[];t[e]=r;for(let e=0;e<l.length;e++){const t=l[e];-1!==t&&i.push([t,t=>{r[e]=t}])}o(r);continue}{const[r,u,c]=l;switch(r){case"D":o(t[e]=new Date(u));continue;case"U":o(t[e]=new URL(u));continue;case"B":o(t[e]=BigInt(u));continue;case"R":o(t[e]=new RegExp(u,c));continue;case"Y":o(t[e]=Symbol.for(u));continue;case"S":const r=new Set;t[e]=r;for(let e=1;e<l.length;e++)i.push([l[e],e=>{r.add(e)}]);o(r);continue;case"M":const d=new Map;t[e]=d;for(let e=1;e<l.length;e+=2){const t=[];i.push([l[e+1],e=>{t[1]=e}]),i.push([l[e],e=>{t[0]=e}]),s.push(()=>{d.set(t[0],t[1])})}o(d);continue;case"N":const f=Object.create(null);t[e]=f;for(const e of Object.keys(u).reverse()){const t=[];i.push([u[e],e=>{t[1]=e}]),i.push([Number(e.slice(1)),e=>{t[0]=e}]),s.push(()=>{f[t[0]]=t[1]})}o(f);continue;case"P":if(t[u])o(t[e]=t[u]);else{const r=new Ae;n[u]=r,o(t[e]=r.promise)}continue;case"E":const[,m,h]=l;let p=h&&Pe&&Pe[h]?new Pe[h](m):new Error(m);t[e]=p,o(p);continue;case"Z":o(t[e]=t[u]);continue;default:if(Array.isArray(a)){const r=[],n=l.slice(1);for(let e=0;e<n.length;e++){const t=n[e];i.push([t,t=>{r[e]=t}])}s.push(()=>{for(const n of a){const a=n(l[0],...r);if(a)return void o(t[e]=a.value)}throw new SyntaxError});continue}throw new SyntaxError}}}else t[e]=l,o(l)}for(;s.length>0;)s.pop()();return o}async function De(e,t){const{plugins:r}=t??{},n=new Ae,a=e.pipeThrough(function(){const e=new TextDecoder;let t="";return new TransformStream({transform(r,n){const a=e.decode(r,{stream:!0}),o=(t+a).split("\n");t=o.pop()||"";for(const e of o)n.enqueue(e)},flush(e){t&&e.enqueue(t)}})}()).getReader(),o={values:[],hydrated:[],deferred:{},plugins:r},i=await Fe.call(o,a);let s=n.promise;
11return i.done?n.resolve():s=Ie.call(o,a).then(n.resolve).catch(e=>{for(const t of Object.values(o.deferred))t.reject(e);n.reject(e)}),{done:s.then(()=>a.closed),value:i.value}}async function Fe(e){const t=await e.read();if(!t.value)throw new SyntaxError;let r;try{r=JSON.parse(t.value)}catch(n){throw new SyntaxError}return{done:t.done,value:Me.call(this,r)}}async function Ie(e){let t=await e.read();for(;!t.done;){if(!t.value)continue;const n=t.value;switch(n[0]){case"P":{const e=n.indexOf(":"),t=Number(n.slice(1,e)),a=this.deferred[t];if(!a)throw new Error(`Deferred ID ${t} not found in stream`);const o=n.slice(e+1);let i;try{i=JSON.parse(o)}catch(r){throw new SyntaxError}const s=Me.call(this,i);a.resolve(s);break}case"E":{const e=n.indexOf(":"),t=Number(n.slice(1,e)),a=this.deferred[t];if(!a)throw new Error(`Deferred ID ${t} not found in stream`);const o=n.slice(e+1);let i;try{i=JSON.parse(o)}catch(r){throw new SyntaxError}const s=Me.call(this,i);a.reject(s);break}default:throw new SyntaxError}t=await e.read()}} 12/** 13 * @remix-run/server-runtime v2.17.5 14 * 15 * Copyright (c) Remix Software Inc. 16 * 17 * This source code is licensed under the MIT license found in the 18 * LICENSE.md file in the root directory of this source tree. 19 * 20 * @license MIT 21 */const Ue=Symbol("SingleFetchRedirect");function Je(e,t){return L(e,t)} 22/** 23 * @remix-run/react v2.17.5 24 * 25 * Copyright (c) Remix Software Inc. 26 * 27 * This source code is licensed under the MIT license found in the 28 * LICENSE.md file in the root directory of this source tree. 29 * 30 * @license MIT 31 */function He(){return He=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},He.apply(this,arguments)} 32/** 33 * @remix-run/react v2.17.5 34 * 35 * Copyright (c) Remix Software Inc. 36 * 37 * This source code is licensed under the MIT license found in the 38 * LICENSE.md file in the root directory of this source tree. 39 * 40 * @license MIT 41 */function ze(e,t){if(!1===e||null==e)throw new Error(t)} 42/** 43 * @remix-run/react v2.17.5 44 * 45 * Copyright (c) Remix Software Inc. 46 * 47 * This source code is licensed under the MIT license found in the 48 * LICENSE.md file in the root directory of this source tree. 49 * 50 * @license MIT 51 */async function Be(e,t){if(e.id in t)return t[e.id];try{let r=await import(e.module);return t[e.id]=r,r}catch(r){return window.__remixContext.isSpaMode,window.location.reload(),new Promise(()=>{})}} 52/** 53 * @remix-run/react v2.17.5 54 * 55 * Copyright (c) Remix Software Inc. 56 * 57 * This source code is licensed under the MIT license found in the 58 * LICENSE.md file in the root directory of this source tree. 59 * 60 * @license MIT 61 */function Ke(e,t,r){let n=e.map(e=>{var n;let a=t[e.route.id],o=r.routes[e.route.id];return[o.css?o.css.map(e=>({rel:"stylesheet",href:e})):[],(null==a||null===(n=a.links)||void 0===n?void 0:n.call(a))||[]]}).flat(2),a=function(e,t){return Ge(e.map(e=>{let r=t.routes[e.route.id],n=[r.module];return r.imports&&(n=n.concat(r.imports)),n}).flat(1))}(e,r);return Ze(n,a)}async function qe(e,t){var r,n;if(!e.css&&!t.links||!function(){if(void 0!==et)return et;let e=document.createElement("link");return et=e.relList.supports("preload"),e=null,et} 62/** 63 * @remix-run/react v2.17.5 64 * 65 * Copyright (c) Remix Software Inc. 66 * 67 * This source code is licensed under the MIT license found in the 68 * LICENSE.md file in the root directory of this source tree. 69 * 70 * @license MIT 71 */())return;let a=[(null===(r=e.css)||void 0===r?void 0:r.map(e=>({rel:"stylesheet",href:e})))??[],(null===(n=t.links)||void 0===n?void 0:n.call(t))??[]].flat(1);if(0===a.length)return;let o=[];for(let s of a)We(s)||"stylesheet"!==s.rel||o.push({...s,rel:"preload",as:"style"});let i=o.filter(e=>(!e.media||window.matchMedia(e.media).matches)&&!document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`));await Promise.all(i.map(Xe))}async function Xe(e){return new Promise(t=>{let r=document.createElement("link");function n(){document.head.contains(r)&&document.head.removeChild(r)}Object.assign(r,e),r.onload=()=>{n(),t()},r.onerror=()=>{n(),t()},document.head.appendChild(r)})}function We(e){return null!=e&&"string"==typeof e.page}function Ye(e){return null!=e&&(null==e.href?"preload"===e.rel&&"string"==typeof e.imageSrcSet&&"string"==typeof e.imageSizes:"string"==typeof e.rel&&"string"==typeof e.href)}function Ve(e,t,r,n,a,o,i){let s=Qe(e),l=(e,t)=>
71!r[t]||e.route.id!==r[t].route.id,u=(e,t)=>{var n;return r[t].pathname!==e.pathname||(null===(n=r[t].route.path)||void 0===n?void 0:n.endsWith("*"))&&r[t].params["*"]!==e.params["*"]};return"data"!==i||!o.v3_singleFetch&&a.search===s.search?t.filter((e,t)=>{let r=n.routes[e.route.id];return("assets"===i||r.hasLoader)&&(l(e,t)||u(e,t))}):t.filter((t,i)=>{if(!n.routes[t.route.id].hasLoader)return!1;if(l(t,i)||u(t,i))return!0;let c=o.v3_singleFetch||a.search!==s.search;if(t.route.shouldRevalidate){var d;let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:(null===(d=r[0])||void 0===d?void 0:d.params)||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:c});if("boolean"==typeof n)return n}return c})}function Ge(e){return[...new Set(e)]}function Ze(e,t){let r=new Set,n=new Set(t);return e.reduce((e,a)=>{if(t&&!We(a)&&"script"===a.as&&a.href&&n.has(a.href))return e;let o=JSON.stringify(function(e){let t={},r=Object.keys(e).sort();for(let n of r)t[n]=e[n];return t}(a));return r.has(o)||(r.add(o),e.push({key:o,link:a})),e},[])}function Qe(e){let t=C(e);return void 0===t.search&&(t.search=""),t}let et;const tt={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},rt=/[&><\u2028\u2029]/g;function nt(e){return e.replace(rt,e=>tt[e])}function at(e){return{__html:e}} 72/** 73 * @remix-run/react v2.17.5 74 * 75 * Copyright (c) Remix Software Inc. 76 * 77 * This source code is licensed under the MIT license found in the 78 * LICENSE.md file in the root directory of this source tree. 79 * 80 * @license MIT 81 */function ot(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}async function it(e,t,r=0){let n=new URL(e.url);n.searchParams.set("_data",t),r>0&&await new Promise(e=>setTimeout(e,5**r*10));let a=await st(e),o=window.__remixRevalidation,i=await fetch(n.href,a).catch(n=>{if("number"==typeof o&&o===window.__remixRevalidation&&"TypeError"===(null==n?void 0:n.name)&&r<3)return it(e,t,r+1);throw n});if(function(e){return null!=e.headers.get("X-Remix-Error")}(i)){let e=await i.json(),t=new Error(e.message);return t.stack=e.stack,t}if(function(e){return ot(e)&&e.status>=400&&null==e.headers.get("X-Remix-Error")&&null==e.headers.get("X-Remix-Catch")&&null==e.headers.get("X-Remix-Response")}(i)){let e=await i.text(),t=new Error(e);return t.stack=void 0,t}return i}async function st(e){let t={signal:e.signal};if("GET"!==e.method){t.method=e.method;let r=e.headers.get("Content-Type");r&&/\bapplication\/json\b/.test(r)?(t.headers={"Content-Type":r},t.body=JSON.stringify(await e.json())):r&&/\btext\/plain\b/.test(r)?(t.headers={"Content-Type":r},t.body=await e.text()):r&&/\bapplication\/x-www-form-urlencoded\b/.test(r)?t.body=new URLSearchParams(await e.text()):t.body=await e.formData()}return t}async function lt(e){if(!e)throw new Error("parseDeferredReadableStream requires stream argument");let t,r={};try{let n=async function*(e){let t=e.getReader(),r=[],n=[],a=!1,o=new TextEncoder,i=new TextDecoder,s=async()=>{if(n.length>0)return n.shift();for(;!a&&0===n.length;){let e=await t.read();if(e.done){a=!0;break}r.push(e.value);try{let e=i.decode(ut(...r)).split("\n\n");if(e.length>=2&&(n.push(...e.slice(0,-1)),r=[o.encode(e.slice(-1).join("\n\n"))]),n.length>0)break}catch{continue}}if(n.length>0)return n.shift();if(r.length>0){let e=i.decode(ut(...r));n=e.split("\n\n").filter(e=>e),r=[]}return n.shift()},l=await s();for(;l;)yield l,l=await s()}(e),a=(await n.next()).value;if(!a)throw new Error("no critical data");let o=JSON.parse(a);if("object"==typeof o&&null!==o)for(let[e,i]of Object.entries(o))"string"==typeof i&&i.startsWith("__deferred_promise:")&&(t=t||{},t[e]=new Promise((t,n)=>{r[e]={resolve:n=>{t(n),delete r[e]},reject:t=>{n(t),delete r[e]}}}));return(async()=>{try{for await(let e of n){let[t,...n]=e.split(":"),a=n.join(":"),o=JSON.parse(a);if("data"===t)for(let[e,i]of Object.entries(o))r[e]&&r[e].resolve(i);else if("error"===t)for(let[e,i]of Object.entries(o)){let t=new Error(i.message);t.stack=i.stack,r[e]&&r[e].reject(t)}}for(let[e,t]of Object.entries(r))t.reject(new k(`Deferred ${e} will never be resolved`))}catch(e){for(let t of Object.values(r))t.reject(e)}})(),new T({...o,...t})}catch(n){for(let e of Object.values(r))e.reject(n);throw n}}function ut(...e){let t=new Uint8Array(e.reduce((e,t)=>
81e+t.length,0)),r=0;for(let n of e)t.set(n,r),r+=n.length;return t} 82/** 83 * @remix-run/react v2.17.5 84 * 85 * Copyright (c) Remix Software Inc. 86 * 87 * This source code is licensed under the MIT license found in the 88 * LICENSE.md file in the root directory of this source tree. 89 * 90 * @license MIT 91 */function ct({context:e,identifier:t,reader:n,textDecoder:a,nonce:o}){if(!e.renderMeta||!e.renderMeta.didRenderScripts)return null;e.renderMeta.streamCache||(e.renderMeta.streamCache={});let{streamCache:i}=e.renderMeta,s=i[t];if(s||(s=i[t]=n.read().then(e=>{i[t].result={done:e.done,value:a.decode(e.value,{stream:!0})}}).catch(e=>{i[t].error=e})),s.error)throw s.error;if(void 0===s.result)throw s;let{done:l,value:u}=s.result,c=u?r.createElement("script",{nonce:o,dangerouslySetInnerHTML:{__html:`window.__remixContext.streamController.enqueue(${nt(JSON.stringify(u))});`}}):null;return l?r.createElement(r.Fragment,null,c,r.createElement("script",{nonce:o,dangerouslySetInnerHTML:{__html:"window.__remixContext.streamController.close();"}})):r.createElement(r.Fragment,null,c,r.createElement(r.Suspense,null,r.createElement(ct,{context:e,identifier:t+1,reader:n,textDecoder:a,nonce:o})))}function dt(e,t,r){return async({request:n,matches:a,fetcherKey:o})=>["POST","PUT","PATCH","DELETE"].includes(n.method)?async function(e,t){let r=t.find(e=>e.shouldLoad);ze(r,"No action match found");let n,a=await r.resolve(async t=>await t(async()=>{let t=ht(e.url),a=await st(e),{data:o,status:i}=await pt(t,a);return n=i,wt(o,r.route.id)}));if(ot(a.result)||O(a.result))return{[r.route.id]:a};return{[r.route.id]:{type:a.type,result:L(a.result,n)}}}(n,a):o?async function(e,t){let r=t.find(e=>e.shouldLoad);ze(r,"No fetcher match found");let n=await r.resolve(async t=>ft(t,mt(ht(e.url)),await st(e),r.route.id));return{[r.route.id]:n}}(n,a):async function(e,t,r,n,a){let o=new Set,i=!1,s=a.map(()=>gt()),l=Promise.all(s.map(e=>e.promise)),u=gt(),c=mt(ht(n.url)),d=await st(n),f={},m=Promise.all(a.map(async(n,a)=>n.resolve(async l=>{if(s[a].resolve(),!n.shouldLoad){var m;if(!r.state.initialized)return;if(n.route.id in r.state.loaderData&&e.routes[n.route.id]&&null!==(m=t[n.route.id])&&void 0!==m&&m.shouldRevalidate)return void(e.routes[n.route.id].hasLoader&&(i=!0))}if(e.routes[n.route.id].hasClientLoader){e.routes[n.route.id].hasLoader&&(i=!0);try{let e=await ft(l,c,d,n.route.id);f[n.route.id]={type:"data",result:e}}catch(yr){f[n.route.id]={type:"error",result:yr}}}else{e.routes[n.route.id].hasLoader&&o.add(n.route.id);try{let e=await l(async()=>vt(await u.promise,n.route.id));f[n.route.id]={type:"data",result:e}}catch(yr){f[n.route.id]={type:"error",result:yr}}}})));if(await l,r.state.initialized&&0!==o.size||window.__remixHdrActive)try{i&&o.size>0&&c.searchParams.set("_routes",a.filter(e=>o.has(e.route.id)).map(e=>e.route.id).join(","));let e=await pt(c,d);u.resolve(e.data)}catch(yr){u.reject(yr)}else u.resolve({});return await m,f}(e,t,r(),n,a)}function ft(e,t,r,n){return e(async()=>{let e=new URL(t);e.searchParams.set("_routes",n);let{data:a}=await pt(e,r);return vt(a,n)})}function mt(e){let t=e.searchParams.getAll("index");e.searchParams.delete("index");let r=[];for(let n of t)n&&r.push(n);for(let n of r)e.searchParams.append("index",n);return e}function ht(e){let t="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return"/"===t.pathname?t.pathname="_root.data":t.pathname=`${t.pathname.replace(/\/$/,"")}.data`,t}async function pt(e,t){let r=await fetch(e,t);if(new Set([100,101,204,205]).has(r.status))return t.method&&"GET"!==t.method?{status:r.status,data:{data:null}}:{status:r.status,data:{}};ze(r.body,"No response body to decode");try{let e=await yt(r.body,window);return{status:r.status,data:e.value}}catch(yr){throw new Error(`Unable to decode turbo-stream response from URL: ${e.toString()}`)}}function yt(e,t){return De(e,{plugins:[(e,...r)=>{if("SanitizedError"===e){let[e,n,a]=r,o=Error;e&&e in t&&"function"==typeof t[e]&&(o=t[e]);let i=new o(n);return i.stack=a,{value:i}}if("ErrorResponse"===e){let[e,t,n]=r;return{value:new N(t,n,e)}}if("SingleFetchRedirect"===e)return{value:{[Ue]:r[0]}}},(e,t)=>"SingleFetchFallback"===e?{value:void 0}:"SingleFetchClassInstance"===e?{value:t}:void 0]})}function vt(e,t){let r=e[Ue];return r?wt(r,t):void 0!==e[t]?wt(e[t],t):null}function wt(e,t){if("error"in e)throw e.error;if("redirect"in e){let t={};throw e.revalidate&&(t["X-Remix-Revalidate"]="yes"),e.reload&&(t["X-Remix-Reload-Document"]="yes"),e.replace&&(t["X-Remix-Replace"]="yes"),j(e.redirect,{status:e.status,headers:t})}if("data"in e)return e.data;throw new Error(`No response found for routeId "${t}"`)}function gt(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(yr){}},t=async e=>{a(e);try{await r}catch(yr){}}});return{promise:r,resolve:e,reject:t}} 92/** 93 * @remix-run/react v2.17.5 94 * 95 * Copyright (c) Remix Software Inc. 96 * 97 * This source code is licensed under the MIT license found in the 98 * LICENSE.md file in the root directory of this source tree. 99 * 100 * @license MIT 101 */class Et extends r.Component{constructor(e){super(e),this.state={error:e.error||null,location:e.location}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location?{error:e.error||null,location:e.location}:{error:e.error||t.error,location:t.location}}render(){return this.state.error?r.createElement(St,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}}function St({error:e,isOutsideRemixApp:t}){let n,a=r.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "ð¿ Hey developer ð. You can provide a way better UX than this when your app throws errors. Check out https://remix.run/guides/errors for more information."\n );\n '}});if(O(e))return r.createElement(xt,{title:"Unhandled Thrown Response!"},r.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),a);if(e instanceof Error)n=e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);n=new Error(t)}
101return r.createElement(xt,{title:"Application Error!",isOutsideRemixApp:t},r.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),r.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},n.stack),a)}function xt({title:e,renderScripts:t,isOutsideRemixApp:n,children:a}){var o;let{routeModules:i}=Bt();return null!==(o=i.root)&&void 0!==o&&o.Layout&&!n?a:r.createElement("html",{lang:"en"},r.createElement("head",null,r.createElement("meta",{charSet:"utf-8"}),r.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),r.createElement("title",null,e)),r.createElement("body",null,r.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},a,t?r.createElement(ir,null):null)))} 102/** 103 * @remix-run/react v2.17.5 104 * 105 * Copyright (c) Remix Software Inc. 106 * 107 * This source code is licensed under the MIT license found in the 108 * LICENSE.md file in the root directory of this source tree. 109 * 110 * @license MIT 111 */function bt(){return r.createElement(xt,{title:"Loading...",renderScripts:!0},r.createElement("script",{dangerouslySetInnerHTML:{__html:'\n console.log(\n "ð¿ Hey developer ð. You can provide a way better UX than this " +\n "when your app is loading JS modules and/or running `clientLoader` " +\n "functions. Check out https://remix.run/route/hydrate-fallback " +\n "for more information."\n );\n '}}))} 112/** 113 * @remix-run/react v2.17.5 114 * 115 * Copyright (c) Remix Software Inc. 116 * 117 * This source code is licensed under the MIT license found in the 118 * LICENSE.md file in the root directory of this source tree. 119 * 120 * @license MIT 121 */function Rt(e){let t={};return Object.values(e).forEach(e=>{let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)}),t}function _t(e,t,n){let a=Nt(t),o=!t.HydrateFallback||n&&"root"!==e.id?"root"===e.id?bt:void 0:t.HydrateFallback,i=t.ErrorBoundary?t.ErrorBoundary:"root"===e.id?()=>r.createElement(St,{error:A()}):void 0;return"root"===e.id&&t.Layout?{...a?{element:r.createElement(t.Layout,null,r.createElement(a,null))}:{Component:a},...i?{errorElement:r.createElement(t.Layout,null,r.createElement(i,null))}:{ErrorBoundary:i},...o?{hydrateFallbackElement:r.createElement(t.Layout,null,r.createElement(o,null))}:{HydrateFallback:o}}:{Component:a,ErrorBoundary:i,HydrateFallback:o}}function Lt(e,t,r,n,a="",o=Rt(e),i=Promise.resolve({Component:()=>null})){return(o[a]||[]).map(a=>{let s=t[a.id];ze(s,"No `routeModule` available to create server routes");let l={..._t(a,s,n),caseSensitive:a.caseSensitive,id:a.id,index:a.index,path:a.path,handle:s.handle,lazy:n?()=>
121i:void 0,loader:a.hasLoader||a.hasClientLoader?()=>null:void 0},u=Lt(e,t,r,n,a.id,o,i);return u.length>0&&(l.children=u),l})}function Ct(e,t,r,n,a,o){return Ot(t,r,n,a,o,"",Rt(t),e)}function kt(e,t,r){if(r){let r=`You cannot call ${"action"===e?"serverAction()":"serverLoader()"} in SPA Mode (routeId: "${t.id}")`;throw new N(400,"Bad Request",new Error(r),!0)}let n=`You are trying to call ${"action"===e?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;if("loader"===e&&!t.hasLoader||"action"===e&&!t.hasAction)throw new N(400,"Bad Request",new Error(n),!0)}function Tt(e,t){let r="clientAction"===e?"a":"an";throw new N(405,"Method Not Allowed",new Error(`Route "${t}" does not have ${r} ${e}, but you are trying to submit to it. To fix this, please add ${r} \`${e}\` function to the route`),!0)}function Ot(e,t,r,n,a,o="",i=Rt(e),s){return(i[o]||[]).map(o=>{let l=t[o.id];async function u(e,t,r){if("function"==typeof r){return await r()}let n=await async function(e,t){let r=await it(e,t.id);if(r instanceof Error)throw r;if(n=r,null!=n.headers.get("X-Remix-Redirect"))throw function(e){let t=parseInt(e.headers.get("X-Remix-Status"),10)||302,r=e.headers.get("X-Remix-Redirect"),n={},a=e.headers.get("X-Remix-Revalidate");a&&(n["X-Remix-Revalidate"]=a);let o=e.headers.get("X-Remix-Reload-Document");o&&(n["X-Remix-Reload-Document"]=o);let i=e.headers.get("X-Remix-Replace");i&&(n["X-Remix-Replace"]=i);return j(r,{status:t,headers:n})}(r);var n;if(function(e){return null!=e.headers.get("X-Remix-Catch")}(r))throw r;if(function(e){var t;return!(null===(t=e.headers.get("Content-Type"))||void 0===t||!t.match(/text\/remix-deferred/))}(r)&&r.body)return await lt(r.body);return r}(e,o);return t?function(e){if(function(e){let t=e;return t&&"object"==typeof t&&"object"==typeof t.data&&"function"==typeof t.subscribe&&"function"==typeof t.cancel&&"function"==typeof t.resolveData}(e))return e.data;if(ot(e)){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.json():e.text()}return e}(n):n}function c(e,t,r){return o.hasLoader?u(e,t,r):Promise.resolve(null)}function d(e,t,r){if(!o.hasAction)throw Tt("action",o.id);return u(e,t,r)}async function f(e){let r=t[o.id],n=r?qe(o,r):Promise.resolve();try{return e()}finally{await n}}let m={id:o.id,index:o.index,path:o.path};if(l){var h,p,y;Object.assign(m,{...m,..._t(o,l,a),handle:l.handle,shouldRevalidate:jt(n,l,o.id,s)});let e=null==r||null===(h=r.loaderData)||void 0===h?void 0:h[o.id],t=null==r||null===(p=r.errors)||void 0===p?void 0:p[o.id],i=null==s&&(!0===(null===(y=l.clientLoader)||void 0===y?void 0:y.hydrate)||!o.hasLoader);m.loader=async({request:r,params:n},s)=>{try{return await f(async()=>(ze(l,"No `routeModule` available for critical-route loader"),l.clientLoader?l.clientLoader({request:r,params:n,async serverLoader(){if
121(kt("loader",o,a),i){if(void 0!==e)return e;if(void 0!==t)throw t;return null}return c(r,!0,s)}}):a?null:c(r,!1,s)))}finally{i=!1}},m.loader.hydrate=At(o,l,a),m.action=({request:e,params:t},r)=>f(async()=>{if(ze(l,"No `routeModule` available for critical-route action"),!l.clientAction){if(a)throw Tt("clientAction",o.id);return d(e,!1,r)}return l.clientAction({request:e,params:t,serverAction:async()=>(kt("action",o,a),d(e,!0,r))})})}else o.hasClientLoader||(m.loader=({request:e},t)=>f(()=>a?Promise.resolve(null):c(e,!1,t))),o.hasClientAction||(m.action=({request:e},t)=>f(()=>{if(a)throw Tt("clientAction",o.id);return d(e,!1,t)})),m.lazy=async()=>{let e=await async function(e,t){let r=await Be(e,t);return await qe(e,r),{Component:Nt(r),ErrorBoundary:r.ErrorBoundary,clientAction:r.clientAction,clientLoader:r.clientLoader,handle:r.handle,links:r.links,meta:r.meta,shouldRevalidate:r.shouldRevalidate}}(o,t),r={...e};if(e.clientLoader){let t=e.clientLoader;r.loader=(e,r)=>t({...e,serverLoader:async()=>(kt("loader",o,a),c(e.request,!0,r))})}if(e.clientAction){let t=e.clientAction;r.action=(e,r)=>t({...e,serverAction:async()=>(kt("action",o,a),d(e.request,!0,r))})}return{...r.loader?{loader:r.loader}:{},...r.action?{action:r.action}:{},hasErrorBoundary:r.hasErrorBoundary,shouldRevalidate:jt(n,r,o.id,s),handle:r.handle,Component:r.Component,ErrorBoundary:r.ErrorBoundary}};let v=Ot(e,t,r,n,a,o.id,i,s);return v.length>0&&(m.children=v),m})}function jt(e,t,r,n){if(n)return function(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}(r,t.shouldRevalidate,n);if(e.v3_singleFetch&&t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:!0})}return t.shouldRevalidate}function Nt(e){if(null==e.default)return;return"object"==typeof e.default&&0===Object.keys(e.default).length?void 0:e.default}function At(e,t,r){return r&&"root"!==e.id||null!=t.clientLoader&&(!0===t.clientLoader.hydrate||!0!==e.hasLoader)} 122/** 123 * @remix-run/react v2.17.5 124 * 125 * Copyright (c) Remix Software Inc. 126 * 127 * This source code is licensed under the MIT license found in the 128 * LICENSE.md file in the root directory of this source tree. 129 * 130 * @license MIT 131 */const Pt=new Set,Mt=new Set;function $t(e,t){return!0===e.v3_lazyRouteDiscovery&&!t}function Dt(e,t,r,n,a){if($t(r,n))return async({path:o,patch:i,signal:s,fetcherKey:l})=>{Mt.has(o)||await Ut([o],l?window.location.href:o,e,t,r,n,a,i,s)}}function Ft(e,t,n,a,o){r.useEffect(()=>{var r;if(!$t(a,o)||!0===(null===(r=navigator.connection)||void 0===r?void 0:r.saveData))return;function i(e){let t="FORM"===e.tagName?e.getAttribute("action"):e.getAttribute("href");if(!t)return;let r=new URL(t,window.location.origin);Mt.has(r.pathname)||Pt.add(r.pathname)}async function s(){let r=Array.from(Pt.keys()).filter(e=>!Mt.has(e)||(Pt.delete(e),!1));if(0!==r.length)try{await Ut(r,null,t,n,a,o,e.basename,e.patchRoutes)}catch(yr){}}document.body.querySelectorAll("a[data-discover], form[data-discover]").forEach(e=>i(e)),s();let l=function(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}(s,100);let u=new MutationObserver(e=>{let t=new Set;e.forEach(e=>{[e.target,...e.addedNodes].forEach(e=>{(function(e){return e.nodeType===Node.ELEMENT_NODE})(e)&&(("A"===e.tagName&&e.getAttribute("data-discover")||"FORM"===e.tagName&&e.getAttribute("data-discover"))&&t.add(e),"A"!==e.tagName&&e.querySelectorAll("a[data-discover], form[data-discover]").forEach(e=>t.add(e)))})}),t.forEach(e=>i(e)),l()});return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[a,o,t,n,e])}const It="remix-manifest-version";async function Ut(e,t,r,n,a,o,i,s,l){let u,c=`${i??"/"}/__manifest`.replace(/\/+/g,"/"),d=new URL(c,window.location.origin);if(e.sort().forEach(e=>d.searchParams.append("p",e)),d.searchParams.set("version",r.version),d.toString().length>7680)return void Pt.clear();try{let e=await fetch(d,{signal:l});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);if(204===e.status&&e.headers.has("X-Remix-Reload-Document")){if(!t)return;if(sessionStorage.getItem(It)===r.version)return;throw sessionStorage.setItem(It,r.version),window.location.href=t,new Error("Detected manifest version mismatch, reloading...")}if(e.status>=400)throw new Error(await e.text());sessionStorage.removeItem(It),u=await e.json()}catch(yr){if(null!=l&&l.aborted)return;throw yr}let f=new Set(Object.keys(r.routes)),m=Object.values(u).reduce((e,t)=>
131f.has(t.id)?e:Object.assign(e,{[t.id]:t}),{});Object.assign(r.routes,m),e.forEach(e=>function(e,t){if(t.size>=1e3){let e=t.values().next().value;"string"==typeof e&&t.delete(e)}t.add(e)}(e,Mt));let h=new Set;Object.values(m).forEach(e=>{e.parentId&&m[e.parentId]||h.add(e.parentId)}),h.forEach(e=>s(e||null,Ot(m,n,null,a,o,e)))}function Jt(){let e=r.useContext(i);return ze(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function Ht(){let e=r.useContext(s);return ze(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}const zt=r.createContext(void 0);function Bt(){let e=r.useContext(zt);return ze(e,"You must render this element inside a <Remix> element"),e}function Kt(e,t){let[n,a]=r.useState(!1),[o,i]=r.useState(!1),{onFocus:s,onBlur:l,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,f=r.useRef(null);r.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return f.current&&e.observe(f.current),()=>{e.disconnect()}}},[e]);let m=()=>{"intent"===e&&a(!0)},h=()=>{"intent"===e&&(a(!1),i(!1))};return r.useEffect(()=>{if(n){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[n]),[o,f,{onFocus:Gt(s,m),onBlur:Gt(l,h),onMouseEnter:Gt(u,m),onMouseLeave:Gt(c,h),onTouchStart:Gt(d,m)}]}zt.displayName="Remix";const qt=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function Xt(e,t,r){return"render"!==e||t||r?void 0:"true"}let Wt=r.forwardRef(({to:e,prefetch:t="none",discover:n="render",...a},o)=>{let i="string"==typeof e&&qt.test(e),s=h(e),[l,u,c]=Kt(t,a);return r.createElement(r.Fragment,null,r.createElement(fe,He({},a,c,{ref:pr(o,u),to:e,"data-discover":Xt(n,i,a.reloadDocument)})),l&&!i?r.createElement(er,{page:s}):null)});Wt.displayName="NavLink";let Yt=r.forwardRef(({to:e,prefetch:t="none",discover:n="render",...a},o)=>{let i="string"==typeof e&&qt.test(e),s=h(e),[l,u,c]=Kt(t,a);return r.createElement(r.Fragment,null,r.createElement(de,He({},a,c,{ref:pr(o,u),to:e,"data-discover":Xt(n,i,a.reloadDocument)})),l&&!i?r.createElement(er,{page:s}):null)});Yt.displayName="Link";let Vt=r.forwardRef(({discover:e="render",...t},n)=>{let a="string"==typeof t.action&&qt.test(t.action);return r.createElement(me,He({},t,{ref:n,"data-discover":Xt(e,a,t.reloadDocument)}))});function Gt(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function Zt(e,t,r){if(r&&!or)return[e[0]];if(t){let r=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,r+1)}return e}function Qt(){let{isSpaMode:e,manifest:t,routeModules:n,criticalCss:a}=Bt(),{errors:o,matches:i}=Ht(),s=Zt(i,o,e),l=r.useMemo(()=>Ke(s,n,t),[s,n,t]);return r.createElement(r.Fragment,null,a?r.createElement("style",{dangerouslySetInnerHTML:{__html:a}}):null,l.map(({key:e,link:t})=>We(t)?r.createElement(er,He({key:e},t)):r.createElement("link",He({key:e},t))))}function er({page:e,...t}){let{router:n}=Jt(),a=r.useMemo(()=>P(n.routes,e,n.basename),[n.routes,e,n.basename]);return a?r.createElement(rr,He({page:e,matches:a},t)):null}function tr(e){let{manifest:t,routeModules:n}=Bt(),[a,o]=r.useState([]);return r.useEffect(()=>{let r=!1;return async function(e,t,r){return Ze((await Promise.all(e.map(async e=>{let n=await Be(t.routes[e.route.id],r);return n.links?n.links():[]}))).flat(1).filter(Ye).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,n).then(e=>{r||o(e)}),()=>{r=!0}},[e,t,n]),a}function rr({page:e,matches:t,...n}){let a=c(),{future:o,manifest:i,routeModules:s}=Bt(),{loaderData:l,matches:u}=Ht(),d=r.useMemo(()=>Ve(e,t,u,i,a,o,"data"),[e,t,u,i,a,o]),f=r.useMemo(()=>{if(!o.v3_singleFetch)return function(e,t,r){let n=Qe(e);return Ge(t.filter(e=>r.routes[e.route.id].hasLoader&&!r.routes[e.route.id].hasClientLoader).map(e=>{let{pathname:t,search:r}=n,a=new URLSearchParams(r);return a.set("_data",e.route.id),`${t}?${a}`}))}(e,d,i);if(e===a.pathname+a.search+a.hash)return[];let r=new Set,n=!1;if(t.forEach(e=>{var t;i.routes[e.route.id].hasLoader&&(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&null!==(t=s[e.route.id])&&void 0!==t&&t.shouldRevalidate||i.routes[e.route.id].hasClientLoader?n=!0:r.add(e.route.id))}),0===r.size)return[];let u=ht(e);return n&&r.size>0&&u.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[u.pathname+u.search]},[o.v3_singleFetch,l,a,i,d,t,e,s]),m=r.useMemo(()=>Ve(e,t,u,i,a,o,"assets"),[e,t,u,i,a,o]),h=r.useMemo(()=>function(e,t){return Ge(e.map(e=>{let r=t.routes[e.route.id],n=[r.module];return r.imports&&(n=n.concat(r.imports)),n}).flat(1))}(m,i),[m,i]),p=tr(m);return r.createElement(r.Fragment,null,f.map(e=>r.createElement("link",He({key:e,rel:"prefetch",as:"fetch",href:e},n))),h.map(e=>r.createElement("link",He({key:e,rel:"modulepreload",href:e},n))),p.map(({key:e,link:t})=>r.createElement("link",He({key:e},t))))}
131function nr(){let{isSpaMode:e,routeModules:t}=Bt(),{errors:n,matches:a,loaderData:o}=Ht(),i=c(),s=Zt(a,n,e),l=null;n&&(l=n[s[s.length-1].route.id]);let u=[],d=null,f=[];for(let r=0;r<s.length;r++){let e=s[r],n=e.route.id,a=o[n],c=e.params,m=t[n],h=[],p={id:n,data:a,meta:[],params:e.params,pathname:e.pathname,handle:e.route.handle,error:l};if(f[r]=p,null!=m&&m.meta?h="function"==typeof m.meta?m.meta({data:a,params:c,location:i,matches:f,error:l}):Array.isArray(m.meta)?[...m.meta]:m.meta:d&&(h=[...d]),h=h||[],!Array.isArray(h))throw new Error("The route at "+e.route.path+" returns an invalid value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://remix.run/route/meta");p.meta=h,f[r]=p,u=[...h],d=u}return r.createElement(r.Fragment,null,u.flat().map(e=>{if(!e)return null;if("tagName"in e){let{tagName:t,...n}=e;if(!function(e){return"string"==typeof e&&/^(meta|link)$/.test(e)}(t))return null;let a=t;return r.createElement(a,He({key:JSON.stringify(n)},n))}if("title"in e)return r.createElement("title",{key:"title"},String(e.title));if("charset"in e&&(e.charSet??(e.charSet=e.charset),delete e.charset),"charSet"in e&&null!=e.charSet)return"string"==typeof e.charSet?r.createElement("meta",{key:"charSet",charSet:e.charSet}):null;if("script:ld+json"in e)try{let t=JSON.stringify(e["script:ld+json"]);return r.createElement("script",{key:`script:ld+json:${t}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:nt(t)}})}catch(t){return null}return r.createElement("meta",He({key:JSON.stringify(e)},e))}))}function ar(e){return r.createElement(M,e)}Vt.displayName="Form";let or=!1;function ir(e){let{manifest:t,serverHandoffString:n,abortDelay:a,serializeError:o,isSpaMode:i,future:s,renderMeta:l}=Bt(),{router:u,static:c,staticContext:d}=Jt(),{matches:f}=Ht(),m=$t(s,i);l&&(l.didRenderScripts=!0);let h=Zt(f,null,i);r.useEffect(()=>{or=!0},[]);let p=(e,t)=>{let r;return r=o&&t instanceof Error?o(t):t,`${JSON.stringify(e)}:__remixContext.p(!1, ${nt(JSON.stringify(r))})`},y=(e,t,r)=>{let n;return n=o&&r instanceof Error?o(r):r,`__remixContext.r(${JSON.stringify(e)}, ${JSON.stringify(t)}, !1, ${nt(JSON.stringify(n))})`},v=(e,t,r)=>{let n;try{n=JSON.stringify(r)}catch(a){return y(e,t,a)}return`__remixContext.r(${JSON.stringify(e)}, ${JSON.stringify(t)}, ${nt(n)})`},w=[],g=r.useMemo(()=>{var o;let i=s.v3_singleFetch?"window.__remixContext.stream = new ReadableStream({start(controller){window.__remixContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());":"",l=d?`window.__remixContext = ${n};${i}`:" ",f=s.v3_singleFetch||null==d?void 0:d.activeDeferreds;l+=f?["__remixContext.p = function(v,e,p,x) {"," if (typeof e !== 'undefined') {",' x=new Error("Unexpected Server Error");\n x.stack=undefined;'," p=Promise.reject(x);"," } else {"," p=Promise.resolve(v);"," }"," return p;","};","__remixContext.n = function(i,k) {"," __remixContext.t = __remixContext.t || {};"," __remixContext.t[i] = __remixContext.t[i] || {};"," let p = new Promise((r, e) => {__remixContext.t[i][k] = {r:(v)=>{r(v);},e:(v)=>{e(v);}};});","number"==typeof a?`setTimeout(() => {if(typeof p._error !== "undefined" || typeof p._data !== "undefined"){return;} __remixContext.t[i][k].e(new Error("Server timeout."))}, ${a});`:""," return p;","};","__remixContext.r = function(i,k,v,e,p,x) {"," p = __remixContext.t[i][k];"," if (typeof e !== 'undefined') {",' x=new Error("Unexpected Server Error");\n x.stack=undefined;'," p.e(x);"," } else {"," p.r(v);"," }","};"].join("\n")+Object.entries(f).map(([t,n])=>{let a=new Set(n.pendingKeys),o=n.deferredKeys.map(o=>{if(a.has(o))return w.push(r.createElement(sr,{key:`${t} | ${o}`,deferredData:n,routeId:t,dataKey:o,scriptProps:e,serializeData:v,serializeError:y})),`${JSON.stringify(o)}:__remixContext.n(${JSON.stringify(t)}, ${JSON.stringify(o)})`;{let e=n.data[o];return void 0!==e._error?p(o,e._error):((e,t,r)=>{let n;try{n=JSON.stringify(r)}catch(a){return p(t,a)}return`${JSON.stringify(t)}:__remixContext.p(${nt(n)})`})(0,o,e._data)}}).join(",\n");return`Object.assign(__remixContext.state.loaderData[${JSON.stringify(t)}], {${o}});`}).join("\n")+(w.length>0?`__remixContext.a=${w.length};`:""):"";let g=c?`${null!==(o=t.hmr)&&void 0!==o&&o.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${m?"":`import ${JSON.stringify(t.url)}`};\n${h.map((e,r)=>`import * as route${r} from ${JSON.stringify(t.routes[e.route.id].module)};`).join("\n")}\n${m?`window.__remixManifest = ${JSON.stringify(function(e,t){let r=new Set(t.state.matches.map(e=>
131e.route.id)),n=t.state.location.pathname.split("/").filter(Boolean),a=["/"];for(n.pop();n.length>0;)a.push(`/${n.join("/")}`),n.pop();a.forEach(e=>{let n=P(t.routes,e,t.basename);n&&n.forEach(e=>r.add(e.route.id))});let o=[...r].reduce((t,r)=>Object.assign(t,{[r]:e.routes[r]}),{});return{...e,routes:o}}(t,u),null,2)};`:""}\nwindow.__remixRouteModules = {${h.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return r.createElement(r.Fragment,null,r.createElement("script",He({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:at(l),type:void 0})),r.createElement("script",He({},e,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:at(g),type:"module",async:!0})))},[]);if(!c&&"object"==typeof __remixContext&&__remixContext.a)for(let b=0;b<__remixContext.a;b++)w.push(r.createElement(sr,{key:b,scriptProps:e,serializeData:v,serializeError:y}));let E=h.map(e=>{let r=t.routes[e.route.id];return(r.imports||[]).concat([r.module])}).flat(1),S=or?[]:t.entry.imports.concat(E);return or?null:r.createElement(r.Fragment,null,m?null:r.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin}),r.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin}),(x=S,[...new Set(x)]).map(t=>r.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin})),g,w);var x}function sr({dataKey:e,deferredData:t,routeId:n,scriptProps:a,serializeData:o,serializeError:i}){return"undefined"==typeof document&&t&&e&&n&&ze(t.pendingKeys.includes(e),`Deferred data for route ${n} with key ${e} was not pending but tried to render a script for it.`),r.createElement(r.Suspense,{fallback:"undefined"==typeof document&&t&&e&&n?null:r.createElement("script",He({},a,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}}))},"undefined"==typeof document&&t&&e&&n?r.createElement(ar,{resolve:t.data[e],errorElement:r.createElement(lr,{dataKey:e,routeId:n,scriptProps:a,serializeError:i}),children:t=>r.createElement("script",He({},a,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:o(n,e,t)}}))}):r.createElement("script",He({},a,{async:!0,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:" "}})))}function lr({dataKey:e,routeId:t,scriptProps:n,serializeError:a}){let o=$();return r.createElement("script",He({},n,{suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a(t,e,o)}}))}function ur(){return g()}function cr(){return D()}function dr(e){return I(e)}function fr(){return F()}function mr(e={}){return function(e){var t;let{key:n}=void 0===e?{}:e,{router:a}=we(he.UseFetcher),o=ge(ye.UseFetcher),i=r.useContext(ee),s=r.useContext(p),l=null==(t=s.matches[s.matches.length-1])?void 0:t.route.id;i||y(!1),s||y(!1),null==l&&y(!1);let u=ne?ne():"",[c,d]=r.useState(n||u);n&&n!==c?d(n):c||d(be()),r.useEffect(()=>(a.getFetcher(c),()=>{a.deleteFetcher(c)}),[a,c]);let f=r.useCallback((e,t)=>{l||y(!1),a.fetch(c,l,e,t)},[c,l,a]),m=Re(),h=r.useCallback((e,t)=>{m(e,U({},t,{navigate:!1,fetcherKey:c}))},[c,m]),w=r.useMemo(()=>r.forwardRef((e,t)=>r.createElement(me,U({},e,{navigate:!1,fetcherKey:c,ref:t}))),[c]),g=o.fetchers.get(c)||v,E=i.get(c);return r.useMemo(()=>U({Form:w,submit:h,load:f},g,{data:E}),[w,h,f,g,E])}(e)}const hr=()=>null;function pr(...e){return t=>{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}export{ar as A,K as B,Je as C,je as D,Oe as E,Vt as F,_e as G,Ee as H,Ne as I,Yt as L,nr as M,Wt as N,er as P,zt as R,ct as S,Q as V,He as _,fr as a,Se as b,cr as c,dr as d,ur as e,Re as f,yt as g,Ot as h,ze as i,Dt as j,dt as k,Ct as l,Ft as m,Et as n,ie as o,Le as p,Bt as q,Te as r,At as s,nt as t,mr as u,ee as v,Lt as w,Qt as x,hr as y,ir as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.