vendor: 6,056 bytes, line 1
1function e(e,t){for(var r=0;r<t.length;r++){const n=t[r];if("string"!=typeof n&&!Array.isArray(n))for(const t in n)if("default"!==t&&!(t in e)){const r=Object.getOwnPropertyDescriptor(n,t);r&&Object.defineProperty(e,t,r.get?r:{enumerable:!0,get:()=>n[t]})}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var t="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e){if(e.__esModule)return e;var t=e.default;if("function"==typeof t){var r=function e(){return this instanceof e?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var n=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,n.get?n:{enumerable:!0,get:function(){return e[t]}})}),r}var a={exports:{}},o={},i=Symbol.for("react.transitional.element"),l=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),d=Symbol.for("react.consumer"),h=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),g=Symbol.iterator;var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,E={};function S(e,t,r){this.props=e,this.context=t,this.refs=E,this.updater=r||w}function R(){}function x(e,t,r){this.props=e,this.context=t,this.refs=E,this.updater=r||w}S.prototype.isReactComponent={},S.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},S.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},R.prototype=S.prototype;var k=x.prototype=new R;k.constructor=x,b(k,S.prototype),k.isPureReactComponent=!0;var L=Array.isArray;function C(){}var _={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function P(e,t,r){var n=r.ref;return{$$typeof:i,type:e,key:t,ref:void 0!==n?n:null,props:r}}function D(e){return"object"==typeof e&&null!==e&&e.$$typeof===i}var T=/\/+/g;function O(e,t){return"object"==typeof e&&null!==e&&null!=e.key?(r=""+e.key,n={"=":"=0",":":"=2"},"$"+r.replace(/[=:]/g,function(e){return n[e]})):t.toString(36);var r,n}function $(e,t,r,n,a){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var s,u,c=!1;if(null===e)c=!0;else switch(o){case"bigint":case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case i:case l:c=!0;break;case y:return $((c=e._init)(e._payload),t,r,n,a)}}if(c)return a=a(e),c=""===n?"."+O(e,0):n,L(a)?(r="",null!=c&&(r=c.replace(T,"$&/")+"/"),$(a,t,r,"",function(e){return e})):null!=a&&(D(a)&&(s=a,u=r+(null==a.key||e&&e.key===a.key?"":(""+a.key).replace(T,"$&/")+"/")+c,a=P(s.type,u,s.props)),t.push(a)),1;c=0;var d,h=""===n?".":n+":";if(L(e))for(var f=0;f<e.length;f++)c+=$(n=e[f],t,r,o=h+O(n,f),a);else if("function"==typeof(f=null===(d=e)||"object"!=typeof d?null:"function"==typeof(d=g&&d[g]||d["@@iterator"])?d:null))for(e=f.call(e),f=0;!(n=e.next()).done;)c+=$(n=n.value,t,r,o=h+O(n,f++),a);else if("object"===o){if("function"==typeof e.then)return $(function(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch("string"==typeof e.status?e.then(C,C):(e.status="pending",e.then(function(t){"pending"===e.status&&(e.status="fulfilled",e.value=t)},function(t){"pending"===e.status&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}(e),t,r,n,a);throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return c}function j(e,t,r){if(null==e)return e;var n=[],a=0;return $(e,n,"","",function(e){return t.call(r,e,a++)}),n}function A(e){if(-1===e._status){var t=e._result;(t=t()).then(function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)},function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)}),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var N="function"==typeof reportError?reportError:function(e){if("object"==typeof window&&"function"==typeof window.ErrorEvent){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:"object"==typeof e&&null!==e&&"string"==typeof e.message?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if("object"==typeof process&&"function"==typeof process.emit)return void process.emit("uncaughtException",e)},F={map:j,forEach:function(e,t,r){j(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return j(e,function(){t++}),t},toArray:function(e){return j(e,function(e){return e})||[]},only:function(e){if(!D(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};o.Activity=v,o.Children=F,o.Component=S,o.Fragment=s,o.Profiler=c,o.PureComponent=x,o.StrictMode=u,o.Suspense=p,o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=_,o.__COMPILER_RUNTIME={__proto__:null,c:function(e){return _.H.useMemoCache(e)}},o.cache=function(e){return function(){return e.apply(null,arguments)}},o.cacheSignal=function(){return null},o.cloneElement=function(e,t,r){if(null==e)throw Error("The argument must be a React element, but you passed "+e+".");var n=b({},e.props),a=e.key;if(null!=t)for(o in void 0!==t.key&&(a=""+t.key),t)!M.call(t,o)||"key"===o||"__self"===o||"__source"===o||"ref"===o&&void 0===t.ref||(n[o]=t[o
1]);var o=arguments.length-2;if(1===o)n.children=r;else if(1<o){for(var i=Array(o),l=0;l<o;l++)i[l]=arguments[l+2];n.children=i}return P(e.type,a,n)},o.createContext=function(e){return(e={$$typeof:h,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null}).Provider=e,e.Consumer={$$typeof:d,_context:e},e},o.createElement=function(e,t,r){var n,a={},o=null;if(null!=t)for(n in void 0!==t.key&&(o=""+t.key),t)M.call(t,n)&&"key"!==n&&"__self"!==n&&"__source"!==n&&(a[n]=t[n]);var i=arguments.length-2;if(1===i)a.children=r;else if(1<i){for(var l=Array(i),s=0;s<i;s++)l[s]=arguments[s+2];a.children=l}if(e&&e.defaultProps)for(n in i=e.defaultProps)void 0===a[n]&&(a[n]=i[n]);return P(e,o,a)},o.createRef=function(){return{current:null}},o.forwardRef=function(e){return{$$typeof:f,render:e}},o.isValidElement=D,o.lazy=function(e){return{$$typeof:y,_payload:{_status:-1,_result:e},_init:A}},o.memo=function(e,t){return{$$typeof:m,type:e,compare:void 0===t?null:t}},o.startTransition=function(e){var t=_.T,r={};_.T=r;try{var n=e(),a=_.S;null!==a&&a(r,n),"object"==typeof n&&null!==n&&"function"==typeof n.then&&n.then(C,N)}catch(o){N(o)}finally{null!==t&&null!==r.types&&(t.types=r.types),_.T=t}},o.unstable_useCacheRefresh=function(){return _.H.useCacheRefresh()},o.use=function(e){return _.H.use(e)},o.useActionState=function(e,t,r){return _.H.useActionState(e,t,r)},o.useCallback=function(e,t){return _.H.useCallback(e,t)},o.useContext=function(e){return _.H.useContext(e)},o.useDebugValue=function(){},o.useDeferredValue=function(e,t){return _.H.useDeferredValue(e,t)},o.useEffect=function(e,t){return _.H.useEffect(e,t)},o.useEffectEvent=function(e){return _.H.useEffectEvent(e)},o.useId=function(){return _.H.useId()},o.useImperativeHandle=function(e,t,r){return _.H.useImperativeHandle(e,t,r)},o.useInsertionEffect=function(e,t){return _.H.useInsertionEffect(e,t)},o.useLayoutEffect=function(e,t){return _.H.useLayoutEffect(e,t)},o.useMemo=function(e,t){return _.H.useMemo(e,t)},o.useOptimistic=function(e,t){return _.H.useOptimistic(e,t)},o.useReducer=function(e,t,r){return _.H.useReducer(e,t,r)},o.useRef=function(e){return _.H.useRef(e)},o.useState=function(e){return _.H.useState(e)},o.useSyncExternalStore=function(e,t,r){return _.H.useSyncExternalStore(e,t,r)},o.useTransition=function(){return _.H.useTransition()},o.version="19.2.5",a.exports=o;var H=a.exports;const z=r(H),U=e({__proto__:null,default:z},[H]); 2/** 3 * react-router v7.13.2 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 */ 12var I,B=e=>{throw TypeError(e)},W=(e,t,r)=>(((e,t,r)=>{t.has(e)||B("Cannot "+r)})(e,t,"read from private field"),r?r.call(e):t.get(e)),q="popstate";function J(e){return"object"==typeof e&&null!=e&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function Y(e={}){return function(e,t,r,n={}){let{window:a=document.defaultView,v5Compat:o=!1}=n,i=a.history,l="POP",s=null,u=c();null==u&&(u=0,i.replaceState({...i.state,idx:u},""));function c(){return(i.state||{idx:null}).idx}function d(){l="POP";let e=c(),t=null==e?null:e-u;u=e,s&&s({action:l,location:m.location,delta:t})}function h(e,t){l="PUSH";let r=J(e)?e:G(m.location,e,t);u=c()+1;let n=K(r,u),d=m.createHref(r.unstable_mask||r);try{i.pushState(n,"",d)}catch(h){if(h instanceof DOMException&&"DataCloneError"===h.name)throw h;a.location.assign(d)}o&&s&&s({action:l,location:m.location,delta:1})}function f(e,t){l="REPLACE";let r=J(e)?e:G(m.location,e,t);u=c();let n=K(r,u),a=m.createHref(r.unstable_mask||r);i.replaceState(n,"",a),o&&s&&s({action:l,location:m.location,delta:0})}function p(e){return ee(e)}let m={get action(){return l},get location(){return e(a,i)},listen(e){if(s)throw new Error("A history only accepts one active listener");return a.addEventListener(q,d),s=e,()=>{a.removeEventListener(q,d),s=null}},createHref:e=>t(a,e),createURL:p,encodeLocation(e){let t=p(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:h,replace:f,go:e=>i.go(e)};return m}(function(e,t){let r=t.state?.masked,{pathname:n,search:a,hash:o}=r||e.location;return G("",{pathname:n,search:a,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default",r?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)},function(e,t){return"string"==typeof t?t:Z(t)},0,e)}function V(e,t){if(!1===e||null==e)throw new Error(t)}function X(e,t){if(!e)try{throw new Error(t)}catch(r){}}function K(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function G(e,t,r=null,n,a){return{pathname:"string"==typeof e?e:e.pathname,search:"",hash:"",..."string"==typeof t?Q(t):t,state:r,key:t&&t.key||n||Math.random().toString(36).substring(2,10),unstable_mask:a}}function Z({pathname:e="/",search:t="",hash:r=""}){return t&&"?"!==t&&(e+="?"===t.charAt(0)?t:"?"+t),r&&"#"!==r&&(e+="#"
12===r.charAt(0)?r:"#"+r),e}function Q(e){let t={};if(e){let r=e.indexOf("#");r>=0&&(t.hash=e.substring(r),e=e.substring(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substring(n),e=e.substring(0,n)),e&&(t.pathname=e)}return t}function ee(e,t=!1){let r="http://localhost";"undefined"!=typeof window&&(r="null"!==window.location.origin?window.location.origin:window.location.href),V(r,"No window.location.(origin|href) available to create URL");let n="string"==typeof e?e:Z(e);return n=n.replace(/ $/,"%20"),!t&&n.startsWith("//")&&(n=r+n),new URL(n,r)}var te=class{constructor(e){var t,r,n;if(t=this,r=I,n=new Map,r.has(t)?B("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,n),e)for(let[a,o]of e)this.set(a,o)}get(e){if(W(this,I).has(e))return W(this,I).get(e);if(void 0!==e.defaultValue)return e.defaultValue;throw new Error("No value found for context")}set(e,t){W(this,I).set(e,t)}};I=new WeakMap;var re=new Set(["lazy","caseSensitive","path","id","index","children"]);var ne=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function ae(e){return ne.has(e)}function oe(e,t,r=[],n={},a=!1){return e.map((e,o)=>{let i=[...r,String(o)],l="string"==typeof e.id?e.id:i.join("-");if(V(!0!==e.index||!e.children,"Cannot specify children on an index route"),V(a||!n[l],`Found a route id collision on i
12d "${l}". Route id's must be globally unique within Data Router usages`),function(e){return!0===e.index}(e)){let r={...e,id:l};return n[l]=ie(r,t(r)),r}{let r={...e,id:l,children:void 0};return n[l]=ie(r,t(r)),e.children&&(r.children=oe(e.children,t,i,n,a)),r}})}function ie(e,t){return Object.assign(e,{...t,..."object"==typeof t.lazy&&null!=t.lazy?{lazy:{...e.lazy,...t.lazy}}:{}})}function le(e,t,r="/"){return se(e,t,r,!1)}function se(e,t,r,n){let a=xe(("string"==typeof t?Q(t):t).pathname||"/",r);if(null==a)return null;let o=ce(e);!function(e){e.sort((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every((e,r)=>e===t[r]);return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)))}(o);let i=null;for(let l=0;null==i&&l<o.length;++l){let e=Re(a);i=be(o[l],e,n)}return i}function ue(e,t){let{route:r,pathname:n,params:a}=e;return{id:r.id,pathname:n,params:a,data:t[r.id],loaderData:t[r.id],handle:r.handle}}function ce(e,t=[],r=[],n="",a=!1){let o=(e,o,i=a,l)=>{let s={relativePath:void 0===l?e.path||"":l,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};if(s.relativePath.startsWith("/")){if(!s.relativePath.startsWith(n)&&i)return;V(s.relativePath.startsWith(n),`Absolute route path "${s.relativePath}" nested under path "${n}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),s.relativePath=s.relativePath.slice(n.length)}let u=Te([n,s.relativePath]),c=r.concat(s);e.children&&e.children.length>0&&(V(!0!==e.index,`Index routes must not have child routes. Please remove all child routes from route path "${u}".`),ce(e.children,t,c,u,i)),(null!=e.path||e.index)&&t.push({path:u,score:we(u,e.index),routesMeta:c})};return e.forEach((e,t)=>{if(""!==e.path&&e.path?.includes("?"))for(let r of de(e.path))o(e,t,!0,r);else o(e,t)}),t}function de(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,a=r.endsWith("?"),o=r.replace(/\?$/,"");if(0===n.length)return a?[o,""]:[o];let i=de(n.join("/")),l=[];return l.push(...i.map(e=>""===e?o:[o,e].join("/"))),a&&l.push(...i),l.map(t=>e.startsWith("/")&&""===t?"/":t)}var he=/^:[\w-]+$/,fe=3,pe=2,me=1,ye=10,ve=-2,ge=e=>"*"===e;function we(e,t){let r=e.split("/"),n=r.length;return r.some(ge)&&(n+=ve),t&&(n+=pe),r.filter(e=>!ge(e)).reduce((e,t)=>e+(he.test(t)?fe:""===t?me:ye),n)}function be(e,t,r=!1){let{routesMeta:n}=e,a={},o="/",i=[];for(let l=0;l<n.length;++l){let e=n[l],s=l===n.length-1,u="/"===o?t:t.slice(o.length)||"/",c=Ee({path:e.relativePath,caseSensitive:e.caseSensitive,end:s},u),d=e.route;if(!c&&s&&r&&!n[n.length-1].route.index&&(c=Ee({path:e.relativePath,caseSensitive:e.caseSensitive,end:!1},u)),!c)return null;
12Object.assign(a,c.params),i.push({params:a,pathname:Te([o,c.pathname]),pathnameBase:Oe(Te([o,c.pathnameBase])),route:d}),"/"!==c.pathnameBase&&(o=Te([o,c.pathnameBase]))}return i}function Ee(e,t){"string"==typeof e&&(e={path:e,caseSensitive:!1,end:!0});let[r,n]=Se(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],i=o.replace(/(.)\/+$/,"$1"),l=a.slice(1);return{params:n.reduce((e,{paramName:t,isOptional:r},n)=>{if("*"===t){let e=l[n]||"";i=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}const a=l[n];return e[t]=r&&!a?void 0:(a||"").replace(/%2F/g,"/"),e},{}),pathname:o,pathnameBase:i,pattern:e}}function Se(e,t=!1,r=!0){X("*"===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=[],a="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(e,t,r,a,o)=>{if(n.push({paramName:t,isOptional:null!=r}),r){let t=o.charAt(a+e.length);return t&&"/"!==t?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(n.push({paramName:"*"}),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}function Re(e){try{return e.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(t){return X(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function xe(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)||"/"}var ke=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Le=e=>ke.test(e);function Ce(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"}function _e(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 <Link to="..."> and the router will parse it for you.`}function Me(e){return e.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0)}function Pe(e){let t=Me(e);return t.map((e,r)=>r===t.length-1?e.pathname:e.pathnameBase)}function De(e,t,r,n=!1){let a;"string"==typeof e?a=Q(e):(a={...e},V(!a.pathname||!a.pathname.includes("?"),_e("?","pathname","search",a)),V(!a.pathname||!a.pathname.includes("#"),_e("#","pathname","hash",a)),V(!a.search||!a.search.includes("#"),_e("#","search","hash",a)));let o,i=""===e||""===a.pathname,l=i?"/":a.pathname;if(null==l)o=r;else{let e=t.length-1;if(!n&&l.startsWith("..")){let t=l.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t="/"){let r,{pathname:n,search:a="",hash:o=""}="string"==typeof e?Q(e):e;return n?(n=n.replace(/\/\/+/g,"/"),r=n.startsWith("/")?Ce(n.substring(1),"/"):Ce(n,t)):r=t,{pathname:r,search:$e(a),hash:je(o)}}(a,o),u=l&&"/"!==l&&l.endsWith("/"),c=(i||"."===l)&&r.endsWith("/");return s.pathname.endsWith("/")||!u&&!c||(s.pathname+="/"),s}var Te=e=>e.join("/").replace(/\/\/+/g,"/"),Oe=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),$e=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",je=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"",Ae=class{constructor(e,t){this.type="DataWithResponseInit",this.data=e,this.init=t||null}};function Ne(e,t){return new Ae(e,"number"==typeof t?{status:t}:t)}var Fe=(e,t=302)=>{let r=t;"number"==typeof r?r={status:r}:void 0===r.status&&(r.status=302);let n=new Headers(r.headers);return n.set("Location",e),new Response(null,{...r,headers:n})},He=class{constructor(e,t,r,n=!1){this.status=e,this.statusText=t||"",this.internal=n,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function ze(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}function Ue(e){return e.map(e=>
12e.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var Ie="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;function Be(e,t){let r=e;if("string"!=typeof r||!ke.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let n=r,a=!1;if(Ie)try{let e=new URL(window.location.href),n=r.startsWith("//")?new URL(e.protocol+r):new URL(r),o=xe(n.pathname,t);n.origin===e.origin&&null!=o?r=o+n.search+n.hash:a=!0}catch(o){X(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:n,isExternal:a,to:r}}var We=Symbol("Uninstrumented");function qe(e,t){let r={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(e=>e({id:t.id,index:t.index,path:t.path,instrument(e){let t=Object.keys(r);for(let n of t)e[n]&&r[n].push(e[n])}}));let n={};if("function"==typeof t.lazy&&r.lazy.length>0){let e=Je(r.lazy,t.lazy,()=>{});e&&(n.lazy=e)}if("object"==typeof t.lazy){let e=t.lazy;["middleware","loader","action"].forEach(t=>{let a=e[t],o=r[`lazy.${t}`];if("function"==typeof a&&o.length>0){let e=Je(o,a,()=>{});e&&(n.lazy=Object.assign(n.lazy||{},{[t]:e}))}})}return["loader","action"].forEach(e=>{let a=t[e];if("function"==typeof a&&r[e].length>0){let t=a[We]??a,o=Je(r[e],t,(...e)=>Ve(e[0]));o&&("loader"===e&&!0===t.hydrate&&(o.hydrate=!0),o[We]=t,n[e]=o)}}),t.middleware&&t.middleware.length>0&&r.middleware.length>0&&(n.middleware=t.middleware.map(e=>{let t=e[We]??e,n=Je(r.middleware,t,(...e)=>Ve(e[0]));return n?(n[We]=t,n):e})),n}function Je(e,t,r){return 0===e.length?null:async(...n)=>{let a=await Ye(e,r(...n),()=>t(...n),e.length-1);if("error"===a.type)throw a.value;return a.value}}async function Ye(e,t,r,n){let a,o=e[n];if(o){let l,s=async()=>(l||(l=Ye(e,t,r,n-1)),a=await l,V(a,"Expected a result"),"error"===a.type&&a.value instanceof Error?{status:"error",error:a.value}:{status:"success",error:void 0});try{await o(s,t)}catch(i){}l||await s(),await l}else try{let e=await r();a={type:"success",value:e}}catch(i){a={type:"error",value:i}}return a||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function Ve(e){let{request:t,context:r,params:n,unstable_pattern:a}=e;return{request:Ke(t),params:{...n},unstable_pattern:a,context:Ge(r)}}function Xe(e,t){return{currentUrl:Z(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function Ke(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function Ge(e){if(function(e){if(null===e||"object"!=typeof e)return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||null===t||Object.getOwnPropertyNames(t).sort().join("\0")===Ze}(e)){let t={...e};return Object.freeze(t),t}return{get:t=>e.get(t)}}var Ze=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var Qe=["POST","PUT","PATCH","DELETE"],et=new Set(Qe),tt=["GET",...Qe],rt=new Set(tt),nt=new Set([301,302,303,307,308]),at=new Set([307,308]),ot={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},it={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},lt={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},st=e=>({hasErrorBoundary:Boolean(e.hasErrorBoundary)}),ut="remix-router-transitions",ct=Symbol("ResetLoaderData");function dt(e){const t=e.window?e.window:"undefined"!=typeof window?window:void 0,r=void 0!==t&&void 0!==t.document&&void 0!==t.document.createElement;V(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let n=e.hydrationRouteProperties||[],a=e.mapRouteProperties||st,o=a;if(e.unstable_instrumentations){let t=e.unstable_instrumentations;o=e=>({...a(e),...qe(t.map(e=>e.route).filter(Boolean),e)})}let i,l={},s=oe(e.routes,o,void 0,l),u=e.basename||"/";u.startsWith("/")||(u=`/${u}`);let c,d,h,f=e.dataStrategy||xt,p={unstable_passThroughRequests:!1,...e.future},m=null,y=new Set,v=null,g=null,w=null,b=null!=e.hydrationData,E=le(s,e.history.location,u),S=!1,R=null;if(null!=E||e.patchRoutesOnNavigation){if(E&&!e.hydrationData){Ce(E,s,e.history.location.pathname).active&&(E=null)}if(E)if(E.some(e=>e.route.lazy))c=!1,d=!c;else if(E.some(e=>mt(e.route))){let t=e.hydrationData?e.hydrationData.loaderData:null,r=e.hydrationData?e.hydrationData.errors:null,n=E;
12if(r){let e=E.findIndex(e=>void 0!==r[e.route.id]);n=n.slice(0,e+1)}d=!1,c=!0,n.forEach(e=>{let n=yt(e.route,t,r);d=d||n.renderFallback,c=c&&!n.shouldLoad})}else c=!0,d=!c;else{c=!1,d=!c,E=[];let t=Ce(null,s,e.history.location.pathname);t.active&&t.matches&&(S=!0,E=t.matches)}}else{let t=Bt(404,{pathname:e.history.location.pathname}),{matches:r,route:n}=It(s);c=!0,d=!c,E=r,R={[n.id]:t}}let x,k,L={historyAction:e.history.action,location:e.history.location,matches:E,initialized:c,renderFallback:d,navigation:ot,restoreScrollPosition:null==e.hydrationData&&null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||R,fetchers:new Map,blockers:new Map},C="POP",_=null,M=!1,P=!1,D=new Map,T=null,O=!1,$=!1,j=new Set,A=new Map,N=0,F=-1,H=new Map,z=new Set,U=new Map,I=new Map,B=new Set,W=new Map,q=null;function J(e,t={}){e.matches&&(e.matches=e.matches.map(e=>{let t=l[e.route.id],r=e.route;return r.element!==t.element||r.errorElement!==t.errorElement||r.hydrateFallbackElement!==t.hydrateFallbackElement?{...e,route:t}:e})),L={...L,...e};let r=[],n=[];L.fetchers.forEach((e,t)=>{"idle"===e.state&&(B.has(t)?r.push(t):n.push(t))}),B.forEach(e=>{L.fetchers.has(e)||A.has(e)||r.push(e)}),[...y].forEach(n=>n(L,{deletedFetchers:r,newErrors:e.errors??null,viewTransitionOpts:t.viewTransitionOpts,flushSync:!0===t.flushSync})),r.forEach(e=>
12pe(e)),n.forEach(e=>L.fetchers.delete(e))}function Y(t,r,{flushSync:n}={}){let a,o=null!=L.actionData&&null!=L.navigation.formMethod&&Zt(L.navigation.formMethod)&&"loading"===L.navigation.state&&!0!==t.state?._isRedirect;a=r.actionData?Object.keys(r.actionData).length>0?r.actionData:null:o?L.actionData:null;let l=r.loaderData?Ht(L.loaderData,r.loaderData,r.matches||[],r.errors):L.loaderData,u=L.blockers;u.size>0&&(u=new Map(u),u.forEach((e,t)=>u.set(t,lt)));let c,d=!O&&ke(t,r.matches||L.matches),h=!0===M||null!=L.navigation.formMethod&&Zt(L.navigation.formMethod)&&!0!==t.state?._isRedirect;if(i&&(s=i,i=void 0),O||"POP"===C||("PUSH"===C?e.history.push(t,t.state):"REPLACE"===C&&e.history.replace(t,t.state)),"POP"===C){let e=D.get(L.location.pathname);e&&e.has(t.pathname)?c={currentLocation:L.location,nextLocation:t}:D.has(t.pathname)&&(c={currentLocation:t,nextLocation:L.location})}else if(P){let e=D.get(L.location.pathname);e?e.add(t.pathname):(e=new Set([t.pathname]),D.set(L.location.pathname,e)),c={currentLocation:L.location,nextLocation:t}}J({...r,actionData:a,loaderData:l,historyAction:C,location:t,initialized:!0,renderFallback:!1,navigation:ot,revalidation:"idle",restoreScrollPosition:d,preventScrollReset:h,blockers:u},{viewTransitionOpts:c,flushSync:!0===n}),C="POP",M=!1,P=!1,O=!1,$=!1,_?.resolve(),_=null,q?.resolve(),q=null}async function K(t,r,a){x&&x.abort(),x=null,C=t,O=!0===(a&&a.startUninterruptedRevalidation),function(e,t){if(v&&w){let r=Re(e,t);v[r]=w()}}(L.location,L.matches),M=!0===(a&&a.preventScrollReset),P=!0===(a&&a.enableViewTransition);let c=i||s,d=a&&a.overrideNavigation,h=a?.initialHydration&&L.matches&&L.matches.length>0&&!S?L.matches:le(c,r,u),f=!0===(a&&a.flushSync);if(h&&L.initialized&&!$&&function(e,t){if(e.pathname!==t.pathname||e.search!==t.search)return!1;if(""===e.hash)return""!==t.hash;if(e.hash===t.hash)return!0;if(""!==t.hash)return!0;return!1}(L.location,r)&&!(a&&a.submission&&Zt(a.submission.formMethod)))return void Y(r,{matches:h},{flushSync:f});let p=Ce(h,c,r.pathname);if(p.active&&p.matches&&(h=p.matches),!h){let{error:e,notFoundMatches:t,route:n}=Se(r.pathname);return void Y(r,{matches:t,loaderData:{},errors:{[n.id]:e}},{flushSync:f})}x=new AbortController;let m,y=$t(e.history,r,x.signal,a&&a.submission),g=e.getContext?await e.getContext():new te;if(a&&a.pendingError)m=[Ut(h).route.id,{type:"error",error:a.pendingError}];else if(a&&a.submission&&Zt(a.submission.formMethod)){let t=await async function(t,r,a,i,c,d,h,f={}){ce();let p,m=function(e,t){let r={state:"submitting",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text};return r}(r,a);if(J({navigation:m},{flushSync:!0===f.flushSync}),d){let e=await _e(i,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=It(s);return{matches:t,pendingActionResult:[r.id,{type:"error",error:e.error}]}}let t=Ut(e.partialMatches).route.id;return{matches:e.partialMatches,pendingActionResult:[t,{type:"error",error:e.error}]}}if(!e.matches){let{notFoundMatches:e,error:t,route:n}=Se(r.pathname);return{matches:e,pendingActionResult:[n.id,{type:"error",error:t}]}}i=e.matches}let y=er(i,r);if(y.route.action||y.route.lazy){let e=Mt(o,l,t,r,i,y,h?[]:n,c),a=await ae(t,r,e,c,null);if(p=a[y.route.id],!p)for(let t of i)if(a[t.route.id]){p=a[t.route.id];break}if(t.signal.aborted)return{shortCircuited:!0}}else p={type:"error",error:Bt(405,{method:t.method,pathname:r.pathname,routeId:y.route.id})};if(Xt(p)){let r;if(f&&null!=f.replace)r=f.replace;else{r=Ot(p.response.headers.get("Location"),new URL(t.url),u,e.history)===L.location.pathname+L.location.search}return await ne(t,p,!0,{submission:a,replace:r}),{shortCircuited:!0}}if(Vt(p)){let e=Ut(i,y.route.id);return!0!==(f&&f.replace)&&(C="PUSH"),{matches:i,pendingActionResult:[e.route.id,p,y.route.id]}}return{matches:i,pendingActionResult:[y.route.id,p]}}(y,r,a.submission,h,g,p.active,a&&!0===a.initialHydration,{replace:a.replace,flushSync:f});if(t.shortCircuited)return;if(t.pendingActionResult){let[e,n]=t.pendingActionResult;if(Vt(n)&&ze(n.error)&&404===n.error.status)return x=null,void Y(r,{matches:t.matches,loaderData:{},errors:{[e]:n.error}})}h=t.matches||h,m=t.pendingActionResult,d=rr(r,a.submission),f=!1,p.active=!1,y=$t(e.history,y.url,y.signal)}let{shortCircuited:b,matches:E,loaderData:R,errors:k}=await async function(t,r,a,c,d,h,f,p,m,y,v,g,w){let b=h||rr(r,f),E=f||p||tr(b),S=!O&&!y;if(d){if(S){let e=re(g);J({navigation:b,...void 0!==e?{actionData:e}:{}},{flushSync:v})}let e=await _e(a,r.pathname,t.signal);if("aborted"===e.type)return{shortCircuited:!0};if("error"===e.type){if(0===e.partialMatches.length){let{matches:t,route:r}=It(s);return{matches:t,loaderData:{},errors:{[r.id]:e.error}}}let t=Ut(e.partialMatches).route.id;return{matches:e.partialMatches,loaderData:{},errors:{[t]:e.error}}}if(!e.matches){let{error:e,notFoundMatches:t,route:n}=Se(r.pathname);return{matches:t,loaderData:{},errors:{[n.id]:e}}}a=e.matches}let R=i||s,{dsMatches:k,revalidatingFetchers:C}=pt(t,c,o,l,e.history,L,a,E,r,y?[]:n,!0===y,$,j,B,U,z,R,u,null!=e.patchRoutesOnNavigation,g,w);if(F=++N,!e.dataStrategy&&!k.some(e=>e.shouldLoad)&&!k.some(e=>e.route.middleware&&e.route.middleware.length>0)&&0===C.length){let e=ve();return Y(r,{matches:a,loaderData:{},errors:g&&Vt(g[1])?{[g[0]]:g[1].error}:null,...zt(g),...e?{fetchers:new Map(L.fetchers)}:{}},{flushSync:v}),{shortCircuited:!0}}if(S){let e={};if(!d){e.navigation=b;let t=re(g);void 0!==t&&(e.actionData=t)}C.length>
120&&(e.fetchers=function(e){return e.forEach(e=>{let t=L.fetchers.get(e.key),r=nr(void 0,t?t.data:void 0);L.fetchers.set(e.key,r)}),new Map(L.fetchers)}(C)),J(e,{flushSync:v})}C.forEach(e=>{me(e.key),e.controller&&A.set(e.key,e.controller)});let _=()=>C.forEach(e=>me(e.key));x&&x.signal.addEventListener("abort",_);let{loaderResults:M,fetcherResults:P}=await ie(k,C,t,r,c);if(t.signal.aborted)return{shortCircuited:!0};x&&x.signal.removeEventListener("abort",_);C.forEach(e=>A.delete(e.key));let D=Wt(M);if(D)return await ne(t,D.result,!0,{replace:m}),{shortCircuited:!0};if(D=Wt(P),D)return z.add(D.key),await ne(t,D.result,!0,{replace:m}),{shortCircuited:!0};let{loaderData:T,errors:H}=Ft(L,a,M,g,C,P);y&&L.errors&&(H={...L.errors,...H});let I=ve(),W=ge(F),q=I||W||C.length>0;return{matches:a,loaderData:T,errors:H,...q?{fetchers:new Map(L.fetchers)}:{}}}(y,r,h,g,p.active,d,a&&a.submission,a&&a.fetcherSubmission,a&&a.replace,a&&!0===a.initialHydration,f,m,a&&a.callSiteDefaultShouldRevalidate);b||(x=null,Y(r,{matches:E||h,...zt(m),loaderData:R,errors:k}))}function re(e){return e&&!Vt(e[1])?{[e[0]]:e[1].data}:L.actionData?0===Object.keys(L.actionData).length?null:L.actionData:void 0}async function ne(n,a,o,{submission:i,fetcherSubmission:l,preventScrollReset:s,replace:c}={}){o||(_?.resolve(),_=null),a.response.headers.has("X-Remix-Revalidate")&&($=!0);let d=a.response.headers.get("Location");V(d,"Expected a Location header on the redirect Response"),d=Ot(d,new URL(n.url),u,e.history);let h=G(L.location,d,{_isRedirect:!0});if(r){let e=!1;if(a.response.headers.has("X-Remix-Reload-Document"))e=!0;else if(Le(d)){const r=ee(d,!0);e=r.origin!==t.location.origin||null==xe(r.pathname,u)}if(e)return void(c?t.location.replace(d):t.location.assign(d))}x=null;let f=!0===c||a.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:p,formAction:m,formEncType:y}=L.navigation;!i&&!l&&p&&m&&y&&(i=tr(L.navigation));let v=i||l;if(at.has(a.response.status)&&v&&Zt(v.formMethod))await K(f,h,{submission:{...v,formAction:d},preventScrollReset:s||M,enableViewTransition:o?P:void 0});else{let e=rr(h,i);await K(f,h,{overrideNavigation:e,fetcherSubmission:l,preventScrollReset:s||M,enableViewTransition:o?P:void 0})}}async function ae(e,t,r,n,a){let o,i={};try{o=await async function(e,t,r,n,a,o){n.some(e=>e._lazyPromises?.middleware)&&await Promise.all(n.map(e=>e._lazyPromises?.middleware));let i={request:t,unstable_url:jt(t,r),unstable_pattern:Ue(n),params:n[0].params,context:o,matches:n},l=e=>{let t=i;return kt(t,()=>e({...t,fetcherKey:a,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))},s=await e({...i,fetcherKey:a,runClientMiddleware:l});try{await Promise.all(n.flatMap(e=>[e._lazyPromises?.handler,e._lazyPromises?.route]))}catch(u){}return s}(f,e,t,r,a,n)}catch(l){return r.filter(e=>e.shouldLoad).forEach(e=>{i[e.route.id]={type:"error",error:l}}),i}if(e.signal.aborted)return i;if(!Zt(e.method))for(let s of r){if("error"===o[s.route.id]?.type)break;o.hasOwnProperty(s.route.id)||L.loaderData.hasOwnProperty(s.route.id)||L.errors&&L.errors.hasOwnProperty(s.route.id)||!s.shouldCallHandler()||(o[s.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${s.route.id}`)})}for(let[s,c]of Object.entries(o))if(Yt(c)){let t=c.result;i[s]={type:"redirect",response:Dt(t,e,s,r,u)}}else i[s]=await Pt(c);return i}async function ie(e,t,r,n,a){let o=ae(r,n,e,a,null),i=Promise.all(t.map(async e=>{if(e.matches&&e.match&&e.request&&e.controller){let t=(await ae(e.request,e.path,e.matches,a,e.key))[e.match.route.id];return{[e.key]:t}}return Promise.resolve({[e.key]:{type:"error",error:Bt(404,{pathname:e.path})}})}));return{loaderResults:await o,fetcherResults:(await i).reduce((e,t)=>Object.assign(e,t),{})}}function ce(){$=!0,U.forEach((e,t)=>{A.has(t)&&j.add(t),me(t)})}function de(e,t,r={}){L.fetchers.set(e,t),J({fetchers:new Map(L.fetchers)},{flushSync:!0===(r&&r.flushSync)})}function he(e,t,r,n={}){let a=Ut(L.matches,t);pe(e),J({errors:{[a.route.id]:r},fetchers:new Map(L.fetchers)},{flushSync:!0===(n&&n.flushSync)})}function fe(e){return I.set(e,(I.get(e)||0)+1),B.has(e)&&B.delete(e),L.fetchers.get(e)||it}function pe(e){let t=L.fetchers.get(e);!A.has(e)||t&&"loading"===t.state&&H.has(e)||me(e),U.delete(e),H.delete(e),z.delete(e),B.delete(e),j.delete(e),L.fetchers.delete(e)}function me(e,t){let r=A.get(e);r&&(r.abort(t),A.delete(e))}function ye(e){for(let t of e){let e=ar(fe(t).data);L.fetchers.set(t,e)}}function ve(){let e=[],t=!1;for(let r of z){let n=L.fetchers.get(r);V(n,`Expected fetcher: ${r}`),"loading"===n.state&&(z.delete(r),e.push(r),t=!0)}return ye(e),t}function ge(e){let t=[];for(let[r,n]of H)if(n<e){let e=L.fetchers.get(r);V(e,`Expected fetcher: ${r}`),"loading"===e.state&&(me(r),H.delete(r),t.push(r))}return ye(t),t.length>0}function we(e){L.blockers.delete(e),W.delete(e)}function be(e,t){let r=L.blockers.get(e)||lt;V("unblocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"blocked"===t.state||"blocked"===r.state&&"proceeding"===t.state||"blocked"===r.state&&"unblocked"===t.state||"proceeding"===r.state&&"unblocked"===t.state,`Invalid blocker state transition: ${r.state} -> ${t.state}`);let n=new Map(L.blockers);n.set(e,t),J({blockers:n})}function Ee({currentLocation:e,nextLocation:t,historyAction:r}){if(0===W.size)return;W.size>1&&X(!1,"A router only supports one blocker at a time");let n=Array.from(W.entries()),[a,o]=n[n.length-1],i=L.blockers.get(a);return i&&"proceeding"===i.state?void 0:o({currentLocation:e,nextLocation:t,historyAction:r})?a:void 0}function Se(e){let t=Bt(404,{pathname:e}),r=i||s,{matches:n,route:a}=It(r);return{notFoundMatches:n,route:a,error:t}}function Re(e,t){if(g){return g(e,t.map(e=>ue(e,L.loaderData)))||e.key}return e.key}function ke(e,t){if(v){let r=Re(e,t),n=v[r];if("number"==typeof n)return n}return null}function Ce(t,r,n){if(e.patchRoutesOnNavigation){if(!t){return{active:!0,matches:se(r,n,u,!0)||[]}}if(Object.keys(t[0].params).length>0){return{active:!0,matches:se(r,n,u,!0)}}}return{active:!1,matches:null}}async function _e(t,r,n,a){if(!e.patchRoutesOnNavigation)return{type:"success",matches:t};let c=t;
12for(;;){let t=null==i,h=i||s,f=l;try{await e.patchRoutesOnNavigation({signal:n,path:r,matches:c,fetcherKey:a,patch:(e,t)=>{n.aborted||gt(e,t,h,f,o,!1)}})}catch(d){return{type:"error",error:d,partialMatches:c}}finally{t&&!n.aborted&&(s=[...s])}if(n.aborted)return{type:"aborted"};let p=le(h,r,u),m=null;if(p){if(0===Object.keys(p[0].params).length)return{type:"success",matches:p};if(m=se(h,r,u,!0),!(m&&c.length<m.length&&Me(c,m.slice(0,c.length))))return{type:"success",matches:p}}if(m||(m=se(h,r,u,!0)),!m||Me(c,m))return{type:"success",matches:null};c=m}}function Me(e,t){return e.length===t.length&&e.every((e,r)=>e.route.id===t[r].route.id)}return h={get basename(){return u},get future(){return p},get state(){return L},get routes(){return s},get window(){return t},initialize:function(){if(m=e.history.listen(({action:t,location:r,delta:n})=>{if(k)return k(),void(k=void 0);X(0===W.size||null!=n,"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 a=Ee({currentLocation:L.location,nextLocation:r,historyAction:t});if(a&&null!=n){let t=new Promise(e=>{k=e});return e.history.go(-1*n),be(a,{state:"blocked",location:r,proceed(){be(a,{state:"proceeding",proceed:void 0,reset:void 0,location:r}),t.then(()=>e.history.go(n))},reset(){let e=new Map(L.blockers);e.set(a,lt),J({blockers:e})}}),_?.resolve(),void(_=null)}return K(t,r)}),r){!function(e,t){try{let r=e.sessionStorage.getItem(ut);if(r){let e=JSON.parse(r);for(let[r,n]of Object.entries(e||{}))n&&Array.isArray(n)&&t.set(r,new Set(n||[]))}}catch(r){}}(t,D);let e=()=>function(e,t){if(t.size>0){let n={};for(let[e,r]of t)n[e]=[...r];try{e.sessionStorage.setItem(ut,JSON.stringify(n))}catch(r){X(!1,`Failed to save applied view transitions in sessionStorage (${r}).`)}}}(t,D);t.addEventListener("pagehide",e),T=()=>t.removeEventListener("pagehide",e)}return L.initialized||K("POP",L.location,{initialHydration:!0}),h},subscribe:function(e){return y.add(e),()=>y.delete(e)},enableScrollRestoration:function(e,t,r){if(v=e,w=t,g=r||null,!b&&L.navigation===ot){b=!0;let e=ke(L.location,L.matches);null!=e&&J({restoreScrollPosition:e})}return()=>{v=null,w=null,g=null}},navigate:async function t(r,n){if(_?.resolve(),_=null,"number"==typeof r){_||(_=or());let t=_.promise;return e.history.go(r),t}let a,o=ht(L.location,L.matches,u,r,n?.fromRouteId,n?.relative),{path:i,submission:l,error:s}=ft(!1,o,n);if(n?.unstable_mask){a={pathname:"",search:"",hash:"",..."string"==typeof n.unstable_mask?Q(n.unstable_mask):{...L.location.unstable_mask,...n.unstable_mask}}}let c=L.location,d=G(c,i,n&&n.state,void 0,a);d={...d,...e.history.encodeLocation(d)};let h=n&&null!=n.replace?n.replace:void 0,f="PUSH";!0===h?f="REPLACE":!1===h||null!=l&&Zt(l.formMethod)&&l.formAction===L.location.pathname+L.location.search&&(f="REPLACE");let p=n&&"preventScrollReset"in n?!0===n.preventScrollReset:void 0,m=!0===(n&&n.flushSync),y=Ee({currentLocation:c,nextLocation:d,historyAction:f});y?be(y,{state:"blocked",location:d,proceed(){be(y,{state:"proceeding",proceed:void 0,reset:void 0,location:d}),t(r,n)},reset(){let e=new Map(L.blockers);e.set(y,lt),J({blockers:e})}}):await K(f,d,{submission:l,pendingError:s,preventScrollReset:p,replace:n&&n.replace,enableViewTransition:n&&n.viewTransition,flushSync:m,callSiteDefaultShouldRevalidate:n&&n.unstable_defaultShouldRevalidate})},fetch:async function(t,r,a,c){me(t);let d=!0===(c&&c.flushSync),h=i||s,f=ht(L.location,L.matches,u,a,r,c?.relative),p=le(h,f,u),m=Ce(p,h,f);if(m.active&&m.matches&&(p=m.matches),!p)return void he(t,r,Bt(404,{pathname:f}),{flushSync:d});let{path:y,submission:v,error:g}=ft(!0,f,c);if(g)return void he(t,r,g,{flushSync:d});let w=e.getContext?await e.getContext():new te,b=!0===(c&&c.preventScrollReset);v&&Zt(v.formMethod)?await async function(t,r,a,c,d,h,f,p,m,y){ce(),U.delete(t);let v=L.fetchers.get(t);de(t,function(e,t){let r={state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0};return r}(m,v),{flushSync:f});let g=new AbortController,w=$t(e.history,a,g.signal,m);if(h){let e=await _e(c,new URL(w.url).pathname,w.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void he(t,r,e.error,{flushSync:f});if(!e.matches)return void he(t,r,Bt(404,{pathname:a}),{flushSync:f});c=e.matches}let b=er(c,a);if(!b.route.action&&!b.route.lazy){let e=Bt(405,{method:m.formMethod,pathname:a,routeId:r});return void he(t,r,e,{flushSync:f})}A.set(t,g);let E=N,S=Mt(o,l,w,a,c,b,n,d),R=await ae(w,a,S,d,t),k=R[b.route.id];if(!k)for(let e of S)if(R[e.route.id]){k=R[e.route.id];break}if(w.signal.aborted)return void(A.get(t)===g&&A.delete(t));if(B.has(t)){if(Xt(k)||Vt(k))return void de(t,ar(void 0))}else{if(Xt(k))return A.delete(t),F>E?void de(t,ar(void 0)):(z.add(t),de(t,nr(m)),ne(w,k,!1,{fetcherSubmission:m,preventScrollReset:p}));if(Vt(k))return void he(t,r,k.error)}let _=L.navigation.location||L.location,M=$t(e.history,_,g.signal),P=i||s,D="idle"!==L.navigation.state?le(P,L.navigation.location,u):L.matches;V(D,"Didn't find any matches after fetcher action");let T=++N;H.set(t,T);let O=nr(m,k.data);L.fetchers.set(t,O);let{dsMatches:I,revalidatingFetchers:W}=pt(M,d,o,l,e.history,L,D,m,_,n,!1,$,j,B,U,z,P,u,null!=e.patchRoutesOnNavigation,[b.route.id,k],y);W.filter(e=>
12e.key!==t).forEach(e=>{let t=e.key,r=L.fetchers.get(t),n=nr(void 0,r?r.data:void 0);L.fetchers.set(t,n),me(t),e.controller&&A.set(t,e.controller)}),J({fetchers:new Map(L.fetchers)});let q=()=>W.forEach(e=>me(e.key));g.signal.addEventListener("abort",q);let{loaderResults:X,fetcherResults:K}=await ie(I,W,M,_,d);if(g.signal.aborted)return;if(g.signal.removeEventListener("abort",q),H.delete(t),A.delete(t),W.forEach(e=>A.delete(e.key)),L.fetchers.has(t)){let e=ar(k.data);L.fetchers.set(t,e)}let G=Wt(X);if(G)return ne(M,G.result,!1,{preventScrollReset:p});if(G=Wt(K),G)return z.add(G.key),ne(M,G.result,!1,{preventScrollReset:p});let{loaderData:Z,errors:Q}=Ft(L,D,X,void 0,W,K);ge(T),"loading"===L.navigation.state&&T>F?(V(C,"Expected pending action"),x&&x.abort(),Y(L.navigation.location,{matches:D,loaderData:Z,errors:Q,fetchers:new Map(L.fetchers)})):(J({errors:Q,loaderData:Ht(L.loaderData,Z,D,Q),fetchers:new Map(L.fetchers)}),$=!1)}(t,r,y,p,w,m.active,d,b,v,c&&c.unstable_defaultShouldRevalidate):(U.set(t,{routeId:r,path:y}),await async function(t,r,a,i,s,u,c,d,h){let f=L.fetchers.get(t);de(t,nr(h,f?f.data:void 0),{flushSync:c});let p=new AbortController,m=$t(e.history,a,p.signal);if(u){let e=await _e(i,new URL(m.url).pathname,m.signal,t);if("aborted"===e.type)return;if("error"===e.type)return void he(t,r,e.error,{flushSync:c});if(!e.matches)return void he(t,r,Bt(404,{pathname:a}),{flushSync:c});i=e.matches}let y=er(i,a);A.set(t,p);let v=N,g=Mt(o,l,m,a,i,y,n,s),w=await ae(m,a,g,s,t),b=w[y.route.id];A.get(t)===p&&A.delete(t);if(m.signal.aborted)return;if(B.has(t))return void de(t,ar(void 0));if(Xt(b))return F>v?void de(t,ar(void 0)):(z.add(t),void(await ne(m,b,!1,{preventScrollReset:d})));if(Vt(b))return void he(t,r,b.error);de(t,ar(b.data))}(t,r,y,p,w,m.active,d,b,v))},revalidate:function(){q||(q=or()),ce(),J({revalidation:"loading"});let e=q.promise;return"submitting"===L.navigation.state?e:"idle"===L.navigation.state?(K(L.historyAction,L.location,{startUninterruptedRevalidation:!0}),e):(K(C||L.historyAction,L.navigation.location,{overrideNavigation:L.navigation,enableViewTransition:!0===P}),e)},createHref:t=>e.history.createHref(t),encodeLocation:t=>e.history.encodeLocation(t),getFetcher:fe,resetFetcher:function(e,t){me(e,t?.reason),de(e,ar(null))},deleteFetcher:function(e){let t=(I.get(e)||0)-1;t<=0?(I.delete(e),B.add(e)):I.set(e,t),J({fetchers:new Map(L.fetchers)})},dispose:function(){m&&m(),T&&T(),y.clear(),x&&x.abort(),L.fetchers.forEach((e,t)=>pe(t)),L.blockers.forEach((e,t)=>we(t))},getBlocker:function(e,t){let r=L.blockers.get(e)||lt;return W.get(e)!==t&&W.set(e,t),r},deleteBlocker:we,patchRoutes:function(e,t,r=!1){let n=null==i;gt(e,t,i||s,l,o,r),n&&(s=[...s],J({}))},_internalFetchControllers:A,_internalSetRoutes:function(e){l={},i=oe(e,o,void 0,l)},_internalSetStateDoNotUseOrYouWillBreakYourApp(e){J(e)}},e.unstable_instrumentations&&(h=function(e,t){let r={navigate:[],fetch:[]};if(t.forEach(e=>e({instrument(e){let t=Object.keys(e);for(let n of t)e[n]&&r[n].push(e[n])}})),r.navigate.length>0){let t=e.navigate[We]??e.navigate,n=Je(r.navigate,t,(...t)=>{let[r,n]=t;return{to:"number"==typeof r||"string"==typeof r?r:r?Z(r):".",...Xe(e,n??{})}});n&&(n[We]=t,e.navigate=n)}if(r.fetch.length>0){let t=e.fetch[We]??e.fetch,n=Je(r.fetch,t,(...t)=>{let[r,,n,a]=t;return{href:n??".",fetcherKey:r,...Xe(e,a??{})}});n&&(n[We]=t,e.fetch=n)}return e}(h,e.unstable_instrumentations.map(e=>e.router).filter(Boolean))),h}function ht(e,t,r,n,a,o){let i,l;if(a){i=[];for(let e of t)if(i.push(e),e.route.id===a){l=e;break}}else i=t,l=t[t.length-1];let s=De(n||".",Pe(i),xe(e.pathname,r)||e.pathname,"path"===o);if(null==n&&(s.search=e.search,s.hash=e.hash),(null==n||""===n||"."===n)&&l){let e=Qt(s.search);if(l.route.index&&!e)s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index";else if(!l.route.index&&e){let e=new URLSearchParams(s.search),t=e.getAll("index");e.delete("index"),t.filter(e=>e).forEach(t=>e.append("index",t));let r=e.toString();s.search=r?`?${r}`:""}}return"/"!==r&&(s.pathname=function({basename:e,pathname:t}){return"/"===t?e:Te([e,t])}({basename:r,pathname:s.pathname})),Z(s)}function ft(e,t,r){if(!r||!function(e){return null!=e&&("formData"in e&&null!=e.formData||"body"in e&&void 0!==e.body)}(r))return{path:t};if(r.formMethod&&(n=r.formMethod,!rt.has(n.toUpperCase())))return{path:t,error:Bt(405,{method:r.formMethod})};var n;let a,o,i=()=>({path:t,error:Bt(400,{type:"invalid-body"})}),l=(r.formMethod||"get").toUpperCase(),s=qt(t);if(void 0!==r.body){if("text/plain"===r.formEncType){if(!Zt(l))return i();let e="string"==typeof r.body?r.body:r.body instanceof FormData||r.body instanceof URLSearchParams?Array.from(r.body.entries()).reduce((e,[t,r])=>`${e}${t}=${r}\n`,""):String(r.body);return{path:t,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:void 0,text:e}}}if("application/json"===r.formEncType){if(!Zt(l))return i();try{let e="string"==typeof r.body?JSON.parse(r.body):r.body;return{path:t,submission:{formMethod:l,formAction:s,formEncType:r.formEncType,formData:void 0,json:e,text:void 0}}}catch(d){return i()}}}if(V("function"==typeof FormData,"FormData is not available in this environment"),r.formData)a=At(r.formData),o=r.formData;else if(r.body instanceof FormData)a=At(r.body),o=r.body;else if(r.body instanceof URLSearchParams)a=r.body,o=Nt(a);else if(null==r.body)a=new URLSearchParams,o=new FormData;else try{a=new URLSearchParams(r.body),o=Nt(a)}catch(d){return i()}let u={formMethod:l,formAction:s,formEncType:r&&r.formEncType||"application/x-www-form-urlencoded",formData:o,json:void 0,text:void 0};if(Zt(u.formMethod))return{path:t,submission:u};let c=Q(t);return e&&c.search&&Qt(c.search)&&a.append("index",""),c.search=`?${a}`,{path:Z(c),submission:u}}function pt(e,t,r,n,a,o,i,l,s,u,c,d,h,f,p,m,y,v,g,w,b){let E,S=w?Vt(w[1])?w[1].error:w[1].data:void 0,R=a.createURL(o.location),x=a.createURL(s);if(c&&o.errors){let e=Object.keys(o.errors)[0];E=i.findIndex(t=>t.route.id===e)}else if(w&&Vt(w[1])){let e=w[0];E=i.findIndex(t=>t.route.id===e)-1}let k=w?w[1].statusCode:void 0,L=k&&k>
12=400,C={currentUrl:R,currentParams:o.matches[0]?.params||{},nextUrl:x,nextParams:i[0].params,...l,actionResult:S,actionStatus:k},_=Ue(i),M=i.map((a,i)=>{let{route:l}=a,h=null;if(null!=E&&i>E)h=!1;else if(l.lazy)h=!0;else if(mt(l))if(c){let{shouldLoad:e}=yt(l,o.loaderData,o.errors);h=e}else(function(e,t,r){let n=!t||r.route.id!==t.route.id,a=!e.hasOwnProperty(r.route.id);return n||a})(o.loaderData,o.matches[i],a)&&(h=!0);else h=!1;if(null!==h)return _t(r,n,e,s,_,a,u,t,h);let f=!1;"boolean"==typeof b?f=b:L?f=!1:(d||R.pathname+R.search===x.pathname+x.search||R.search!==x.search||function(e,t){let r=e.route.path;return e.pathname!==t.pathname||null!=r&&r.endsWith("*")&&e.params["*"]!==t.params["*"]}(o.matches[i],a))&&(f=!0);let p={...C,defaultShouldRevalidate:f},m=vt(a,p);return _t(r,n,e,s,_,a,u,t,m,p,b)}),P=[];return p.forEach((e,l)=>{if(c||!i.some(t=>t.route.id===e.routeId)||f.has(l))return;let s=o.fetchers.get(l),p=s&&"idle"!==s.state&&void 0===s.data,w=le(y,e.path,v);if(!w){if(g&&p)return;return void P.push({key:l,routeId:e.routeId,path:e.path,matches:null,match:null,request:null,controller:null})}if(m.has(l))return;let E=er(w,e.path),S=new AbortController,R=$t(a,e.path,S.signal),x=null;if(h.has(l))h.delete(l),x=Mt(r,n,R,e.path,w,E,u,t);else if(p)d&&(x=Mt(r,n,R,e.path,w,E,u,t));else{let a;a="boolean"==typeof b?b:!L&&d;let o={...C,defaultShouldRevalidate:a};vt(E,o)&&(x=Mt(r,n,R,e.path,w,E,u,t,o))}x&&P.push({key:l,routeId:e.routeId,path:e.path,matches:x,match:E,request:R,c
12ontroller:S})}),{dsMatches:M,revalidatingFetchers:P}}function mt(e){return null!=e.loader||null!=e.middleware&&e.middleware.length>0}function yt(e,t,r){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!mt(e))return{shouldLoad:!1,renderFallback:!1};let n=null!=t&&e.id in t,a=null!=r&&void 0!==r[e.id];if(!n&&a)return{shouldLoad:!1,renderFallback:!1};if("function"==typeof e.loader&&!0===e.loader.hydrate)return{shouldLoad:!0,renderFallback:!n};let o=!n&&!a;return{shouldLoad:o,renderFallback:o}}function vt(e,t){if(e.route.shouldRevalidate){let r=e.route.shouldRevalidate(t);if("boolean"==typeof r)return r}return t.defaultShouldRevalidate}function gt(e,t,r,n,a,o){let i;if(e){let t=n[e];V(t,`No route found to patch children into: routeId = ${e}`),t.children||(t.children=[]),i=t.children}else i=r;let l=[],s=[];if(t.forEach(e=>{let t=i.find(t=>wt(e,t));t?s.push({existingRoute:t,newRoute:e}):l.push(e)}),l.length>0){let t=oe(l,a,[e||"_","patch",String(i?.length||"0")],n);i.push(...t)}if(o&&s.length>0)for(let u=0;u<s.length;u++){let{existingRoute:e,newRoute:t}=s[u],r=e,[n]=oe([t],a,[],{},!0);Object.assign(r,{element:n.element?n.element:r.element,errorElement:n.errorElement?n.errorElement:r.errorElement,hydrateFallbackElement:n.hydrateFallbackElement?n.hydrateFallbackElement:r.hydrateFallbackElement})}}function wt(e,t){return"id"in e&&"id"in t&&e.id===t.id||e.index===t.index&&e.path===t.path&&e.caseSensitive===t.caseSensitive&&(!(e.children&&0!==e.children.length||t.children&&0!==t.children.length)||(e.children?.every((e,r)=>t.children?.some(t=>wt(e,t)))??!1))}var bt=new WeakMap,Et=({key:e,route:t,manifest:r,mapRouteProperties:n})=>{let a=r[t.id];if(V(a,"No route found in manifest"),!a.lazy||"object"!=typeof a.lazy)return;let o=a.lazy[e];if(!o)return;let i=bt.get(a);i||(i={},bt.set(a,i));let l=i[e];if(l)return l;let s=(async()=>{let t=function(e){return re.has(e)}(e),r=void 0!==a[e]&&"hasErrorBoundary"!==e;if(t)X(!t,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),i[e]=Promise.resolve();else if(r)X(!1,`Route "${a.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let t=await o();null!=t&&(Object.assign(a,{[e]:t}),Object.assign(a,n(a)))}"object"==typeof a.lazy&&(a.lazy[e]=void 0,Object.values(a.lazy).every(e=>void 0===e)&&(a.lazy=void 0))})();return i[e]=s,s},St=new WeakMap;async function Rt(e){let t=e.matches.filter(e=>e.shouldLoad),r={};return(await Promise.all(t.map(e=>e.resolve()))).forEach((e,n)=>{r[t[n].route.id]=e}),r}async function xt(e){return e.matches.some(e=>e.route.middleware)?kt(e,()=>Rt(e)):Rt(e)}function kt(e,t){return async function(e,t,r,n,a){let{matches:o,...i}=e,l=o.flatMap(e=>e.route.middleware?e.route.middleware.map(t=>[e.route.id,t]):[]),s=await Lt(i,l,t,r,n,a);return s}(e,t,e=>{if(Gt(t=e)&&(r=t.status,nt.has(r))&&t.headers.has("Location"))throw e;var t,r;return e},Jt,function(t,r,n){if(n)return Promise.resolve(Object.assign(n.value,{[r]:{type:"error",result:t}}));{let{matches:n}=e,a=Math.min(Math.max(n.findIndex(e=>e.route.id===r),0),Math.max(n.findIndex(e=>e.shouldCallHandler()),0)),o=Ut(n,n[a].route.id).route.id;return Promise.resolve({[o]:{type:"error",result:t}})}})}async function Lt(e,t,r,n,a,o,i=0){let{request:l}=e;if(l.signal.aborted)throw l.signal.reason??new Error(`Request aborted: ${l.method} ${l.url}`);let s=t[i];if(!s){return await r()}let u,[c,d]=s,h=async()=>{if(u)throw new Error("You may only call `next()` once per middleware");try{let l=await Lt(e,t,r,n,a,o,i+1);return u={value:l},u.value}catch(l){return u={value:await o(l,c,u)},u.value}};try{let t=await d(e,h),r=null!=t?n(t):void 0;return a(r)?r:u?r??u.value:(u={value:await h()},u.value)}catch(f){return await o(f,c,u)}}function Ct(e,t,r,n,a){let o=Et({key:"middleware",route:n.route,manifest:t,mapRouteProperties:e}),i=function(e,t,r,n,a){let o=r[e.id];if(V(o,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if("function"==typeof e.lazy){let t=St.get(o);if(t)return{lazyRoutePromise:t,lazyHandlerPromise:t};let r=(async()=>{V("function"==typeof e.lazy,"No lazy route function found");let t=await e.lazy(),r={};for(let e in t){let n=t[e];if(void 0===n)continue;let a=ae(e),i=void 0!==o[e]&&"hasErrorBoundary"!==e;a?X(!a,"Route property "+e+" is not a supported property to be returned from a lazy route function. This property will be ignored."):i?X(!i,`Route "${o.id}" has a static property "${e}" defined but its lazy function is also returning a value for this property. The lazy route property "${e}" will be ignored.`):r[e]=n}Object.assign(o,r),Object.assign(o,{...n(o),lazy:void 0})})();return St.set(o,r),r.catch(()=>{}),{lazyRoutePromise:r,lazyHandlerPromise:r}}let i,l=Object.keys(e.lazy),s=[];for(let c of l){if(a&&a.includes(c))continue;let o=Et({key:c,route:e,manifest:r,mapRouteProperties:n});o&&(s.push(o),c===t&&(i=o))}let u=s.length>0?Promise.all(s).then(()=>{}):void 0;return u?.catch(()=>{}),i?.catch(()=>{}),{lazyRoutePromise:u,lazyHandlerPromise:i}}(n.route,Zt(r.method)?"action":"loader",t,e,a);return{middleware:o,route:i.lazyRoutePromise,handler:i.lazyHandlerPromise}}function _t(e,t,r,n,a,o,i,l,s,u=null,c){let d=!1,h=Ct(e,t,r,o,i);return{...o,_lazyPromises:h,shouldLoad:s,shouldRevalidateArgs:u,shouldCallHandler:e=>(d=!0,u?vt(o,"boolean"==typeof c?{...u,defaultShouldRevalidate:c}:"boolean"==typeof e?{...u,defaultShouldRevalidate:e}:u):s),resolve(e){let{lazy:t,loader:i,middleware:u}=o.route,c=d||s||e&&!Zt(r.method)&&(t||i),f=u&&u.length>0&&!i&&!t;return!c||!Zt(r.method)&&f?Promise.resolve({type:"data",result:void 0}):async function({request:e,path:t,unstable_pattern:r,match:n,lazyHandlerPromise:a,lazyRoutePromise:o,handlerOverride:i,scopedContext:l}){let s,u,c=Zt(e.method),d=c?"action":"loader",h=a=>{let o,s=new Promise((e,t)=>
12o=t);u=()=>o(),e.signal.addEventListener("abort",u);let c=o=>"function"!=typeof a?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${d}" [routeId: ${n.route.id}]`)):a({request:e,unstable_url:jt(e,t),unstable_pattern:r,params:n.params,context:l},...void 0!==o?[o]:[]),h=(async()=>{try{return{type:"data",result:await(i?i(e=>c(e)):c())}}catch(e){return{type:"error",result:e}}})();return Promise.race([h,s])};try{let t=c?n.route.action:n.route.loader;if(a||o)if(t){let e,[r]=await Promise.all([h(t).catch(t=>{e=t}),a,o]);if(void 0!==e)throw e;s=r}else{await a;let t=c?n.route.action:n.route.loader;if(!t){if("action"===d){let t=new URL(e.url),r=t.pathname+t.search;throw Bt(405,{method:e.method,pathname:r,routeId:n.route.id})}return{type:"data",result:void 0}}[s]=await Promise.all([h(t),o])}else{if(!t){let t=new URL(e.url);throw Bt(404,{pathname:t.pathname+t.search})}s=await h(t)}}catch(f){return{type:"error",result:f}}finally{u&&e.signal.removeEventListener("abort",u)}return s}({request:r,path:n,unstable_pattern:a,match:o,lazyHandlerPromise:h?.handler,lazyRoutePromise:h?.route,handlerOverride:e,scopedContext:l})}}}function Mt(e,t,r,n,a,o,i,l,s=null){return a.map(u=>u.route.id!==o.route.id?{...u,shouldLoad:!1,shouldRevalidateArgs:s,shouldCallHandler:()=>!1,_lazyPromises:Ct(e,t,r,u,i),resolve:()=>Promise.resolve({type:"data",result:void 0})}:_t(e,t,r,n,Ue(a),u,i,l,!0,s))}async function Pt(e){let{result:t,type:r}=e;if(Gt(t)){let e;try{e=await async function(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?null==e.body?null:e.json():e.text()}(t)}catch(a){return{type:"error",error:a}}return"error"===r?{type:"error",error:new He(t.status,t.statusText,e),statusCode:t.status,headers:t.headers}:{type:"data",data:e,statusCode:t.status,headers:t.headers}}return"error"===r?Kt(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:(n=t,new He(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)),statusCode:ze(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:ze(t)?t.status:void 0}:Kt(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t};var n}function Dt(e,t,r,n,a){let o=e.headers.get("Location");if(V(o,"Redirects returned/thrown from loaders/actions must have a Location header"),!Le(o)){let i=n.slice(0,n.findIndex(e=>e.route.id===r)+1);o=ht(new URL(t.url),i,a,o),e.headers.set("Location",o)}return e}var Tt=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function Ot(e,t,r,n){if(Le(e)){let n=e,a=n.startsWith("//")?new URL(t.protocol+n):new URL(n);if(Tt.includes(a.protocol))throw new Error("Invalid redirect location");let o=null!=xe(a.pathname,r);if(a.origin===t.origin&&o)return a.pathname+a.search+a.hash}try{let t=n.createURL(e);if(Tt.includes(t.protocol))throw new Error("Invalid redirect location")}catch(a){}return e}function $t(e,t,r,n){let a=e.createURL(qt(t)).toString(),o={signal:r};if(n&&Zt(n.formMethod)){let{formMethod:e,formEncType:t}=n;o.method=e.toUpperCase(),"application/json"===t?(o.headers=new Headers({"Content-Type":t}),o.body=JSON.stringify(n.json)):"text/plain"===t?o.body=n.text:"application/x-www-form-urlencoded"===t&&n.formData?o.body=At(n.formData):o.body=n.formData}return new Request(a,o)}function jt(e,t){let r=new URL(e.url),n="string"==typeof t?Q(t):t;if(r.pathname=n.pathname||"/",n.search){let e=new URLSearchParams(n.search),t=e.getAll("index");e.delete("index");for(let r of t.filter(Boolean))e.append("index",r);r.search=e.size?`?${e.toString()}`:""}else r.search="";return r.hash=n.hash||"",r}function At(e){let t=new URLSearchParams;for(let[r,n]of e.entries())t.append(r,"string"==typeof n?n:n.name);return t}function Nt(e){let t=new FormData;for(let[r,n]of e.entries())t.append(r,n);return t}function Ft(e,t,r,n,a,o){let{loaderData:i,errors:l}=function(e,t,r,n=!1,a=!1){let o,i={},l=null,s=!1,u={},c=r&&Vt(r[1])?r[1].error:void 0;return e.forEach(r=>{if(!(r.route.id in t))return;let d=r.route.id,h=t[d];if(V(!Xt(h),"Cannot handle redirect results in processLoaderData"),Vt(h)){let t=h.error;if(void 0!==c&&(t=c,c=void 0),l=l||{},a)l[d]=t;else{let r=Ut(e,d);null==l[r.route.id]&&(l[r.route.id]=t)}n||(i[d]=ct),s||(s=!0,o=ze(h.error)?h.error.status:500),h.headers&&(u[d]=h.headers)}else i[d]=h.data,h.statusCode&&200!==h.statusCode&&!s&&(o=h.statusCode),h.headers&&(u[d]=h.headers)}),void 0!==c&&r&&(l={[r[0]]:c},r[2]&&(i[r[2]]=void 0)),{loaderData:i,errors:l,statusCode:o||200,loaderHeaders:u}}(t,r,n);return a.filter(e=>!e.matches||e.matches.some(e=>
12e.shouldLoad)).forEach(t=>{let{key:r,match:n,controller:a}=t;if(a&&a.signal.aborted)return;let i=o[r];if(V(i,"Did not find corresponding fetcher result"),Vt(i)){let t=Ut(e.matches,n?.route.id);l&&l[t.route.id]||(l={...l,[t.route.id]:i.error}),e.fetchers.delete(r)}else if(Xt(i))V(!1,"Unhandled fetcher revalidation redirect");else{let t=ar(i.data);e.fetchers.set(r,t)}}),{loaderData:i,errors:l}}function Ht(e,t,r,n){let a=Object.entries(t).filter(([,e])=>e!==ct).reduce((e,[t,r])=>(e[t]=r,e),{});for(let o of r){let r=o.route.id;if(!t.hasOwnProperty(r)&&e.hasOwnProperty(r)&&o.route.loader&&(a[r]=e[r]),n&&n.hasOwnProperty(r))break}return a}function zt(e){return e?Vt(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function Ut(e,t){return(t?e.slice(0,e.findIndex(e=>e.route.id===t)+1):[...e]).reverse().find(e=>!0===e.route.hasErrorBoundary)||e[0]}function It(e){let t=1===e.length?e[0]:e.find(e=>e.index||!e.path||"/"===e.path)||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function Bt(e,{pathname:t,routeId:r,method:n,type:a,message:o}={}){let i="Unknown Server Error",l="Unknown @remix-run/router error";return 400===e?(i="Bad Request",n&&t&&r?l=`You made a ${n} request to "${t}" but did not provide a \`loader\` for route "${r}", so there is no way to handle the request.`:"invalid-body"===a&&(l="Unable to encode submission body")):403===e?(i="Forbidden",l=`Route "${r}" does not match URL "${t}"`):404===e?(i="Not Found",l=`No route matches URL "${t}"`):405===e&&(i="Method Not Allowed",n&&t&&r?l=`You made a ${n.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${r}", so there is no way to handle the request.`:n&&(l=`Invalid request method "${n.toUpperCase()}"`)),new He(e||500,i,new Error(l),!0)}function Wt(e){let t=Object.entries(e);for(let r=t.length-1;r>=0;r--){let[e,n]=t[r];
12if(Xt(n))return{key:e,result:n}}}function qt(e){return Z({..."string"==typeof e?Q(e):e,hash:""})}function Jt(e){return null!=e&&"object"==typeof e&&Object.entries(e).every(([e,t])=>"string"==typeof e&&function(e){return null!=e&&"object"==typeof e&&"type"in e&&"result"in e&&("data"===e.type||"error"===e.type)}(t))}function Yt(e){return Gt(e.result)&&nt.has(e.result.status)}function Vt(e){return"error"===e.type}function Xt(e){return"redirect"===(e&&e.type)}function Kt(e){return"object"==typeof e&&null!=e&&"type"in e&&"data"in e&&"init"in e&&"DataWithResponseInit"===e.type}function Gt(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"object"==typeof e.headers&&void 0!==e.body}function Zt(e){return et.has(e.toUpperCase())}function Qt(e){return new URLSearchParams(e).getAll("index").some(e=>""===e)}function er(e,t){let r="string"==typeof t?Q(t).search:t.search;if(e[e.length-1].route.index&&Qt(r||""))return e[e.length-1];let n=Me(e);return n[n.length-1]}function tr(e){let{formMethod:t,formAction:r,formEncType:n,text:a,formData:o,json:i}=e;if(t&&r&&n)return null!=a?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:void 0,text:a}:null!=o?{formMethod:t,formAction:r,formEncType:n,formData:o,json:void 0,text:void 0}:void 0!==i?{formMethod:t,formAction:r,formEncType:n,formData:void 0,json:i,text:void 0}:void 0}function rr(e,t){if(t){return{state:"loading",location:e,formMethod:t.formMethod,formAction:t.formAction,formEncType:t.formEncType,formData:t.formData,json:t.json,text:t.text}}return{state:"loading",location:e,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function nr(e,t){if(e){return{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}}return{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function ar(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function or(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}});return{promise:r,resolve:e,reject:t}}var ir=H.createContext(null);ir.displayName="DataRouter";var lr=H.createContext(null);lr.displayName="DataRouterState";var sr=H.createContext(!1);function ur(){return H.useContext(sr)}var cr=H.createContext({isTransitioning:!1});cr.displayName="ViewTransition";var dr=H.createContext(new Map);dr.displayName="Fetchers",H.createContext(null).displayName="Await";var hr=H.createContext(null);hr.displayName="Navigation";var fr=H.createContext(null);fr.displayName="Location";var pr=H.createContext({outlet:null,matches:[],isDataRoute:!1});pr.displayName="Route";var mr=H.createContext(null);mr.displayName="RouteError";var yr="REACT_ROUTER_ERROR";function vr(){return null!=H.useContext(fr)}function gr(){return V(vr(),"useLocation() may be used only in the context of a <Router> component."),H.useContext(fr).location}var wr="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function br(e){H.useContext(hr).static||H.useLayoutEffect(e)}function Er(){let{isDataRoute:e}=H.useContext(pr);return e?function(){let{router:e}=function(e){let t=H.useContext(ir);return V(t,Tr(e)),t}("useNavigate"),t=$r("useNavigate"),r=H.useRef(!1);return br(()=>{r.current=!0}),H.useCallback(async(n,a={})=>{X(r.current,wr),r.current&&("number"==typeof n?await e.navigate(n):await e.navigate(n,{fromRouteId:t,...a}))},[e,t])}():function(){V(vr(),"useNavigate() may be used only in the context of a <Router> component.");let e=H.useContext(ir),{basename:t,navigator:r}=H.useContext(hr),{matches:n}=H.useContext(pr),{pathname:a}=gr(),o=JSON.stringify(Pe(n)),i=H.useRef(!1);return br(()=>{i.current=!0}),H.useCallback((n,l={})=>{if(X(i.current,wr),!i.current)return;if("number"==typeof n)return void r.go(n);let s=De(n,JSON.parse(o),a,"path"===l.relative);null==e&&"/"!==t&&(s.pathname="/"===s.pathname?t:Te([t,s.pathname])),(l.replace?r.replace:r.push)(s,l.state,l)},[t,r,o,a,e])}()}var Sr=H.createContext(null);function Rr(){let{matches:e}=H.useContext(pr),t=e[e.length-1];return t?t.params:{}}function xr(e,{relative:t}={}){let{matches:r}=H.useContext(pr),{pathname:n}=gr(),a=JSON.stringify(Pe(r));return H.useMemo(()=>De(e,JSON.parse(a),n,"path"===t),[e,a,n,t])}function kr(e,t,r){V(vr(),"useRoutes() may be used only in the context of a <Router> component.");let n,{navigator:a}=H.useContext(hr),{matches:o}=H.useContext(pr),i=o[o.length-1],l=i?i.params:{},s=i?i.pathname:"/",u=i?i.pathnameBase:"/",c=i&&i.route;{let e=c&&c.path||"";zr(s,!c||e.endsWith("*")||e.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.\n\nPlease change the parent <Route path="${e}"> to <Route path="${"/"===e?"*":`${e}/*`}">.`)}n=gr();let d=n.pathname||"/",h=d;if("/"!==u){let e=u.replace(/^\//,"").split("/");h="/"+d.replace(/^\//,"").split("/").slice(e.length).join("/")}let f=le(e,{pathname:h});X(c||null!=f,`No routes matched location "${n.pathname}${n.search}${n.hash}" `),X(null==f||void 0!==f[f.length-1].route.element||void 0!==f[f.length-1].route.Component||void 0!==f[f.length-1].route.lazy,`Matched leaf route at location "${n.pathname}${n.search}${n.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let p=function(e,t=[],r){let n=r?.state;if(null==e){if(!n)return null;if(n.errors)e=n.matches;else{if(0!==t.length||n.initialized||!(n.matches.length>0))return null;e=n.matches}}let a=e,o=n?.errors;if(null!=o){let e=a.findIndex(e=>e.route.id&&void 0!==o?.[e.route.id]);V(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),a=a.slice(0,Math.min(a.length,e+1))}let i=!1,l=-1;if(r&&n){i=n.renderFallback;for(let e=0;e<a.length;e++){let t=a[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(l=e),t.route.id){let{loaderData:e,errors:o}
12=n,s=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!o||void 0===o[t.route.id]);if(t.route.lazy||s){r.isStatic&&(i=!0),a=l>=0?a.slice(0,l+1):[a[0]];break}}}}let s=r?.onError,u=n&&s?(e,t)=>{s(e,{location:n.location,params:n.matches?.[0]?.params??{},unstable_pattern:Ue(n.matches),errorInfo:t})}:void 0;return a.reduceRight((e,r,s)=>{let c,d=!1,h=null,f=null;n&&(c=o&&r.route.id?o[r.route.id]:void 0,h=r.route.errorElement||Cr,i&&(l<0&&0===s?(zr("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,f=null):l===s&&(d=!0,f=r.route.hydrateFallbackElement||null)));let p=t.concat(a.slice(0,s+1)),m=()=>{let t;return t=c?h:d?f:r.route.Component?H.createElement(r.route.Component,null):r.route.element?r.route.element:e,H.createElement(Dr,{match:r,routeContext:{outlet:e,matches:p,isDataRoute:null!=n},children:t})};return n&&(r.route.ErrorBoundary||r.route.errorElement||0===s)?H.createElement(_r,{location:n.location,revalidation:n.revalidation,component:h,error:c,children:m(),routeContext:{outlet:null,matches:p,isDataRoute:!0},onError:u}):m()},null)}(f&&f.map(e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Te([u,a.encodeLocation?a.encodeLocation(e.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?u:Te([u,a.encodeLocation?a.encodeLocation(e.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:e.pathnameBase])})),o,r);return p}function Lr(){let e=Fr(),t=ze(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n="rgba(200,200,200, 0.5)",a={padding:"0.5rem",backgroundColor:n},o={padding:"2px 4px",backgroundColor:n},i=null;return i=H.createElement(H.Fragment,null,H.createElement("p",null,"ð¿ Hey developer ð"),H.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",H.createElement("code",{style:o},"ErrorBoundary")," or"," ",H.createElement("code",{style:o},"errorElement")," prop on your route.")),H.createElement(H.Fragment,null,H.createElement("h2",null,"Unexpected Application Error!"),H.createElement("h3",{style:{fontStyle:"italic"}},t),r?H.createElement("pre",{style:a},r):null,i)}var Cr=H.createElement(Lr,null),_r=class extends H.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError&&this.props.onError(e,t)}render(){let e=this.state.error;if(this.context&&"object"==typeof e&&e&&"digest"in e&&"string"==typeof e.digest){const t=function(e){if(e.startsWith(`${yr}:ROUTE_ERROR_RESPONSE:{`))try{let t=JSON.parse(e.slice(40));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText)return new He(t.status,t.statusText,t.data)}catch{}}(e.digest);t&&(e=t)}let t=void 0!==e?H.createElement(pr.Provider,{value:this.props.routeContext},H.createElement(mr.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?H.createElement(Pr,{error:e},t):t}};_r.contextType=sr;var Mr=new WeakMap;function Pr({children:e,error:t}){let{basename:r}=H.useContext(hr);if("object"==typeof t&&t&&"digest"in t&&"string"==typeof t.digest){let e=function(e){if(e.startsWith(`${yr}:REDIRECT:{`))try{let t=JSON.parse(e.slice(28));if("object"==typeof t&&t&&"number"==typeof t.status&&"string"==typeof t.statusText&&"string"==typeof t.location&&"boolean"==typeof t.reloadDocument&&"boolean"==typeof t.replace)return t}catch{}}(t.digest);if(e){let n=Mr.get(t);if(n)throw n;let a=Be(e.location,r);if(Ie&&!Mr.get(t)){if(!a.isExternal&&!e.reloadDocument){const r=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(a.to,{replace:e.replace}));throw Mr.set(t,r),r}window.location.href=a.absoluteURL||a.to}return H.createElement("meta",{httpEquiv:"refresh",content:`0;url=${a.absoluteURL||a.to}`})}}return e}function Dr({routeContext:e,match:t,children:r}){let n=H.useContext(ir);return n&&n.static&&n.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(n.staticContext._deepestRenderedBoundaryId=t.route.id),H.createElement(pr.Provider,{value:e},r)}function Tr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Or(e){let t=H.useContext(lr);return V(t,Tr(e)),t}function $r(e){let t=function(e){let t=H.useContext(pr);return V(t,Tr(e)),t}(e),r=t.matches[t.matches.length-1];return V(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function jr(){let{matches:e,loaderData:t}=Or("useMatches");return H.useMemo(()=>e.map(e=>ue(e,t)),[e,t])}function Ar(){let e=Or("useLoaderData"),t=$r("useLoaderData");return e.loaderData[t]}function Nr(){let e=Or("useActionData"),t=$r("useLoaderData");return e.actionData?e.actionData[t]:void 0}function Fr(){let e=H.useContext(mr),t=Or("useRouteError"),r=$r("useRouteError");return void 0!==e?e:t.errors?.[r]}var Hr={};function zr(e,t,r){t||Hr[e]||(Hr[e]=!0,X(!1,r))}var Ur={};function Ir(e,t){e||Ur[t]||(Ur[t]=!0)}var Br=U.useOptimistic,Wr=()=>{};function qr(e){let t={hasErrorBoundary:e.hasErrorBoundary||null!=e.ErrorBoundary||null!=e.errorElement};return e.Component&&(e.element&&X(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:H.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&X(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:H.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&X(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:H.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}
12var Jr=["HydrateFallback","hydrateFallbackElement"],Yr=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 Vr({router:e,flushSync:t,onError:r,unstable_useTransitions:n}){let a=ur();n=a||n;let[o,i]=H.useState(e.state),[l,s]=(u=o,Br?Br(u):[u,Wr]);var u;let[c,d]=H.useState(),[h,f]=H.useState({isTransitioning:!1}),[p,m]=H.useState(),[y,v]=H.useState(),[g,w]=H.useState(),b=H.useRef(new Map),E=H.useCallback((a,{deletedFetchers:o,newErrors:l,flushSync:u,viewTransitionOpts:c})=>{l&&r&&Object.values(l).forEach(e=>r(e,{location:a.location,params:a.matches[0]?.params??{},unstable_pattern:Ue(a.matches)})),a.fetchers.forEach((e,t)=>{void 0!==e.data&&b.current.set(t,e.data)}),o.forEach(e=>b.current.delete(e)),Ir(!1===u||null!=t,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let h=null!=e.window&&null!=e.window.document&&"function"==typeof e.window.document.startViewTransition;if(Ir(null==c||h,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),c&&h){if(t&&u){t(()=>{y&&(p?.resolve(),y.skipTransition()),f({isTransitioning:!0,flushSync:!0,currentLocation:c.currentLocation,nextLocation:c.nextLocation})});let r=e.window.document.startViewTransition(()=>{t(()=>i(a))});return r.finished.finally(()=>{t(()=>{m(void 0),v(void 0),d(void 0),f({isTransitioning:!1})})}),void t(()=>v(r))}y?(p?.resolve(),y.skipTransition(),w({state:a,currentLocation:c.currentLocation,nextLocation:c.nextLocation})):(d(a),f({isTransitioning:!0,flushSync:!1,currentLocation:c.currentLocation,nextLocation:c.nextLocation}))}else t&&u?t(()=>i(a)):!1===n?i(a):H.startTransition(()=>{!0===n&&s(e=>Xr(e,a)),i(a)})},[e.window,t,y,p,n,s,r]);H.useLayoutEffect(()=>e.subscribe(E),[e,E]),H.useEffect(()=>{h.isTransitioning&&!h.flushSync&&m(new Yr)},[h]),H.useEffect(()=>{if(p&&c&&e.window){let t=c,r=p.promise,a=e.window.document.startViewTransition(async()=>{!1===n?i(t):H.startTransition(()=>{!0===n&&s(e=>Xr(e,t)),i(t)}),await r});a.finished.finally(()=>{m(void 0),v(void 0),d(void 0),f({isTransitioning:!1})}),v(a)}},[c,p,e.window,n,s]),H.useEffect(()=>{p&&c&&l.location.key===c.location.key&&p.resolve()},[p,y,l.location,c]),H.useEffect(()=>{!h.isTransitioning&&g&&(d(g.state),f({isTransitioning:!0,flushSync:!1,currentLocation:g.currentLocation,nextLocation:g.nextLocation}),w(void 0))},[h.isTransitioning,g]);let S=H.useMemo(()=>({createHref:e.createHref,encodeLocation:e.encodeLocation,go:t=>e.navigate(t),push:(t,r,n)=>e.navigate(t,{state:r,preventScrollReset:n?.preventScrollReset}),replace:(t,r,n)=>e.navigate(t,{replace:!0,state:r,preventScrollReset:n?.preventScrollReset})}),[e]),R=e.basename||"/",x=H.useMemo(()=>({router:e,navigator:S,static:!1,basename:R,onError:r}),[e,S,R,r]);return H.createElement(H.Fragment,null,H.createElement(ir.Provider,{value:x},H.createElement(lr.Provider,{value:l},H.createElement(dr.Provider,{value:b.current},H.createElement(cr.Provider,{value:h},H.createElement(Zr,{basename:R,location:l.location,navigationType:l.historyAction,navigator:S,unstable_useTransitions:n},H.createElement(Kr,{routes:e.routes,future:e.future,state:l,isStatic:!1,onError:r})))))),null)}function Xr(e,t){return{...e,navigation:"idle"!==t.navigation.state?t.navigation:e.navigation,revalidation:"idle"!==t.revalidation?t.revalidation:e.revalidation,actionData:"submitting"!==t.navigation.state?t.actionData:e.actionData,fetchers:t.fetchers}}var Kr=H.memo(function({routes:e,future:t,state:r,isStatic:n,onError:a}){return kr(e,0,{state:r,isStatic:n,onError:a})});function Gr(e){return function(e){let t=H.useContext(pr).outlet;return H.useMemo(()=>t&&H.createElement(Sr.Provider,{value:e},t),[t,e])}(e.context)}function Zr({basename:e="/",children:t=null,location:r,navigationType:n="POP",navigator:a,static:o=!1,unstable_useTransitions:i}){V(!vr(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let l=e.replace(/^\/*/,"/"),s=H.useMemo(()=>({basename:l,navigator:a,static:o,unstable_useTransitions:i,future:{}}),[l,a,o,i]);"string"==typeof r&&(r=Q(r));
12let{pathname:u="/",search:c="",hash:d="",state:h=null,key:f="default",unstable_mask:p}=r,m=H.useMemo(()=>{let e=xe(u,l);return null==e?null:{location:{pathname:e,search:c,hash:d,state:h,key:f,unstable_mask:p},navigationType:n}},[l,u,c,d,h,f,n,p]);return X(null!=m,`<Router basename="${l}"> is not able to match the URL "${u}${c}${d}" because it does not start with the basename, so the <Router> won't render anything.`),null==m?null:H.createElement(hr.Provider,{value:s},H.createElement(fr.Provider,{children:t,value:m}))}function Qr(e){return function(){const t={params:Rr(),loaderData:Ar(),actionData:Nr(),matches:jr()};return H.createElement(e,t)}}function en(e){return function(){const t={params:Rr(),loaderData:Ar(),actionData:Nr()};return H.createElement(e,t)}}var tn="get",rn="application/x-www-form-urlencoded";function nn(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function an(e=""){return 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]])},[]))}var on=null;var ln=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function sn(e){return null==e||ln.has(e)?e:(X(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${rn}"`),null)}function un(e,t){let r,n,a,o,i;if(nn(l=e)&&"form"===l.tagName.toLowerCase()){let i=e.getAttribute("action");n=i?xe(i,t):null,r=e.getAttribute("method")||tn,a=sn(e.getAttribute("enctype"))||rn,o=new FormData(e)}else if(function(e){return nn(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return nn(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 l=e.getAttribute("formaction")||i.getAttribute("action");if(n=l?xe(l,t):null,r=e.getAttribute("formmethod")||i.getAttribute("method")||tn,a=sn(e.getAttribute("formenctype"))||sn(i.getAttribute("enctype"))||rn,o=new FormData(i,e),!function(){if(null===on)try{new FormData(document.createElement("form"),0),on=!1}catch(e){on=!0}return on}()){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(nn(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=tn,n=null,a=rn,i=e}var l;return o&&"text/plain"===a&&(i=o,o=void 0),{action:n,method:r.toLowerCase(),encType:a,formData:o,body:i}}var cn=class{constructor(){this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}};Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var dn="undefined"!=typeof window?window:"undefined"!=typeof globalThis?globalThis:void 0;function hn(e){const{hydrated:t,values:r}=this;if("number"==typeof e)return fn.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,fn.call(this,n)}function fn(e){const{hydrated:t,values:r,deferred:n,plugins:a}=this;let o;const i=[[e,e=>{o=e}]];let l=[];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 s=r[e];if(s&&"object"==typeof s){if(!Array.isArray(s)){const r={};t[e]=r;for(const e of Object.keys(s).reverse()){const t=[];i.push([s[e],e=>{t[1]=e}]),i.push([Number(e.slice(1)),e=>{t[0]=e}]),l.push(()=>{r[t[0]]=t[1]})}o(r);continue}if("string"!=typeof s[0]){const r=[];t[e]=r;for(let e=0;e<s.length;e++){const t=s[e];-1!==t&&i.push([t,t=>{r[e]=t}])}o(r);continue}{const[r,u,c]=s;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=s.length-1;e>0;e--)i.push([s[e],e=>{r.add(e)}]);o(r);continue;case"M":const d=new Map;t[e]=d;for(let e=s.length-2;e>0;e-=2){const t=[];i.push([s[e+1],e=>{t[1]=e}]),i.push([s[e],e=>{t[0]=e}]),l.push(()=>{d.set(t[0],t[1])})}o(d);continue;case"N":const h=Object.create(null);t[e]=h;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}]),l.push(()=>{h[t[0]]=t[1]})}o(h);continue;case"P":if(t[u])o(t[e]=t[u]);else{const r=new cn;n[u]=r,o(t[e]=r.promise)}continue;case"E":const[,f,p]=s;let m=p&&dn&&dn[p]?new dn[p](f):new Error(f);t[e]=m,o(m);continue;case"Z":o(t[e]=t[u]);continue;default:if(Array.isArray(a)){const r=[],n=s.slice(1);for(let e=0;e<n.length;e++){const t=n[e];i.push([t,t=>{r[e]=t}])}l.push(()=>{for(const n of a){const a=n(s[0],...r);if(a)return void o(t[e]=a.value)}throw new SyntaxError});continue}throw new SyntaxError}}}else t[e]=s,o(s)}for(;l.length>0;)l.pop()();return o}async function pn(e,t){const{plugins:r}=t??{},n=new cn,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 mn.call(o,a);let l=n.promise;
12return i.done?n.resolve():l=yn.call(o,a).then(n.resolve).catch(e=>{for(const t of Object.values(o.deferred))t.reject(e);n.reject(e)}),{done:l.then(()=>a.closed),value:i.value}}async function mn(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:hn.call(this,r)}}async function yn(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 l=hn.call(this,i);a.resolve(l);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 l=hn.call(this,i);a.reject(l);break}default:throw new SyntaxError}t=await e.read()}}var vn={"&":"\\u0026",">":"\\u003e","<":"\\u003c","\u2028":"\\u2028","\u2029":"\\u2029"},gn=/[&><\u2028\u2029]/g;function wn(e,t){if(!1===e||null==e)throw new Error(t)}var bn,En=Symbol("SingleFetchRedirect"),Sn=class extends Error{},Rn=new Set([100,101,204,205]);function xn(e,t,r,n,a,o){let i=function(e,t,r,n,a,o,i=()=>!0){return async l=>{let{request:s,matches:u,fetcherKey:c}=l,d=e();if("GET"!==s.method)return async function(e,t,r,n){let a=e.matches.find(e=>e.shouldCallHandler());wn(a,"No action match found");let o,i=await a.resolve(async i=>await i(async()=>{let{data:i,status:l}=await t(e,r,n,[a.route.id]);return o=l,_n(i,a.route.id)}));if(Gt(i.result)||ze(i.result)||Kt(i.result))return{[a.route.id]:i};return{[a.route.id]:{type:i.type,result:Ne(i.result,o)}}}(l,r,a,o);let h=u.some(e=>{let{hasLoader:r,hasClientLoader:n}=t(e);return e.shouldCallHandler()&&r&&!n});return n||h?c?async function(e,t,r,n){let a=e.matches.find(e=>e.shouldCallHandler());wn(a,"No fetcher match found");let o=a.route.id,i=await a.resolve(async a=>a(async()=>{let{data:a}=await t(e,r,n,[o]);return _n(a,o)}));return{[a.route.id]:i}}(l,r,a,o):async function(e,t,r,n,a,o,i,l=()=>!0){let s=new Set,u=!1,c=e.matches.map(()=>Mn()),d=Mn(),h={},f=Promise.all(e.matches.map(async(t,a)=>t.resolve(async f=>{c[a].resolve();let p=t.route.id,{hasLoader:m,hasClientLoader:y,hasShouldRevalidate:v}=r(t),g=!t.shouldRevalidateArgs||null==t.shouldRevalidateArgs.actionStatus||t.shouldRevalidateArgs.actionStatus<400;if(t.shouldCallHandler(g))if(l(t)&&y){m&&(u=!0);try{let t=await f(async()=>{let{data:t}=await n(e,o,i,[p]);return _n(t,p)});h[p]={type:"data",result:t}}catch(w){h[p]={type:"error",result:w}}}else{m&&s.add(p);try{let e=await f(async()=>_n(await d.promise,p));h[p]={type:"data",result:e}}catch(w){h[p]={type:"error",result:w}}}else u||(u=null!=t.shouldRevalidateArgs&&m&&!0===v)})));await Promise.all(c.map(e=>e.promise));let p=!t.state.initialized&&"idle"===t.state.navigation.state;if(!p&&0!==s.size||window.__reactRouterHdrActive){let t=a&&u&&s.size>0?[...s.keys()]:void 0;try{let r=await n(e,o,i,t);d.resolve(r.data)}catch(m){d.reject(m)}}else d.resolve({routes:{}});return await f,await async function(e,t,r,n){try{let a,o=await e;if("routes"in o)for(let e of t)if(e.route.id in o.routes){let t=o.routes[e.route.id];if("error"in t){a=t.error,null==n[e.route.id]?.result&&(n[e.route.id]={type:"error",result:a});break}}void 0!==a&&Array.from(r.values()).forEach(e=>{n[e].result instanceof Sn&&(n[e].result=a)})}catch(m){}}(d.promise,e.matches,s,h),h}(l,d,t,r,n,a,o,i):async function(e,t,r,n,a){let o=e.matches.filter(e=>e.shouldCallHandler()),i={};return await Promise.all(o.map(o=>o.resolve(async l=>{try{let{hasClientLoader:s}=t(o),u=o.route.id,c=s?await l(async()=>{let{data:t}=await r(e,n,a,[u]);return _n(t,u)}):await l();i[o.route.id]={type:"data",result:c}}catch(s){i[o.route.id]={type:"error",result:s}}}))),i}(l,t,r,a,o)}}(e,e=>{let n=t.routes[e.route.id];wn(n,"Route not found in manifest");let a=r[e.route.id];return{hasLoader:n.hasLoader,hasClientLoader:n.hasClientLoader,hasS
12houldRevalidate:Boolean(a?.shouldRevalidate)}},Ln,n,a,o);return async e=>e.runClientMiddleware(i)}function kn(e,t,r,n){let a="string"==typeof e?new URL(e,"undefined"==typeof window?"server://singlefetch/":window.location.origin):e;return r?a.pathname.endsWith("/")?a.pathname=`${a.pathname}_.${n}`:a.pathname=`${a.pathname}.${n}`:"/"===a.pathname?a.pathname=`_root.${n}`:t&&"/"===xe(a.pathname,t)?a.pathname=`${t.replace(/\/$/,"")}/_root.${n}`:a.pathname=`${a.pathname.replace(/\/$/,"")}.${n}`,a}async function Ln(e,t,r,n){let{request:a}=e,o=kn(a.url,t,r,"data");"GET"===a.method&&(o=function(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}(o),n&&o.searchParams.set("_routes",n.join(",")));let i=await fetch(o,await async function(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}(a));if(i.status>=400&&!i.headers.has("X-Remix-Response"))throw new He(i.status,i.statusText,await i.text());if(204===i.status&&i.headers.has("X-Remix-Redirect"))return{status:202,data:{redirect:{redirect:i.headers.get("X-Remix-Redirect"),status:Number(i.headers.get("X-Remix-Status")||"302"),revalidate:"true"===i.headers.get("X-Remix-Revalidate"),reload:"true"===i.headers.get("X-Remix-Reload-Document"),replace:"true"===i.headers.get("X-Remix-Replace")}}};if(Rn.has(i.status)){let e={};return n&&"GET"!==a.method&&(e[n[0]]={data:void 0}),{status:i.status,data:{routes:e}}}wn(i.body,"No response body to decode");try{let e,t=await Cn(i.body,window);if("GET"===a.method){let r=t.value;e=En in r?{redirect:r[En]}:{routes:r}}else{let r=t.value,a=n?.[0];wn(a,"No routeId found for single fetch call decoding"),e="redirect"in r?{redirect:r}:{routes:{[a]:r}}}return{status:i.status,data:e}}catch(l){throw new Error("Unable to decode turbo-stream response")}}function Cn(e,t){return pn(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 He(t,n,e)}}return"SingleFetchRedirect"===e?{value:{[En]:r[0]}}:"SingleFetchClassInstance"===e?{value:r[0]}:"SingleFetchFallback"===e?{value:void 0}:void 0}]})}function _n(e,t){if("redirect"in e){let{redirect:t,revalidate:r,reload:n,replace:a,status:o}=e.redirect;throw Fe(t,{status:o,headers:{...r?{"X-Remix-Revalidate":"yes"}:null,...n?{"X-Remix-Reload-Document":"yes"}:null,...a?{"X-Remix-Replace":"yes"}:null}})}let r=e.routes[t];if(null==r)throw new Sn(`No result found for routeId "${t}"`);if("error"in r)throw r.error;if("data"in r)return r.data;throw new Error(`Invalid response found for routeId "${t}"`)}function Mn(){let e,t,r=new Promise((n,a)=>{e=async e=>{n(e);try{await r}catch(t){}},t=async e=>{a(e);try{await r}catch(t){}}});return{promise:r,resolve:e,reject:t}}async function Pn(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.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function Dn(e){return e.css?e.css.map(e=>({rel:"stylesheet",href:e})):[]}async function Tn(e,t){if(!e.css&&!t.links||!function(){if(void 0!==bn)return bn;let e=document.createElement("link");return bn=e.relList.supports("preload"),e=null,bn}())return;let r=[];if(e.css&&r.push(...Dn(e)),t.links&&r.push(...t.links()),0===r.length)return;let n=[];for(let a of r)$n(a)||"stylesheet"!==a.rel||n.push({...a,rel:"preload",as:"style"});await Promise.all(n.map(On))}async function On(e){return new Promise(t=>{if(e.media&&!window.matchMedia(e.media).matches||document.querySelector(`link[rel="stylesheet"][href="${e.href}"]`))return 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 $n(e){return null!=e&&"string"==typeof e.page}function jn(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 An(e,t,r,n,a,o){let i=(e,t)=>!r[t]||e.route.id!==r[t].route.id,l=(e,t)=>
12r[t].pathname!==e.pathname||r[t].route.path?.endsWith("*")&&r[t].params["*"]!==e.params["*"];return"assets"===o?t.filter((e,t)=>i(e,t)||l(e,t)):"data"===o?t.filter((t,o)=>{let s=n.routes[t.route.id];if(!s||!s.hasLoader)return!1;if(i(t,o)||l(t,o))return!0;if(t.route.shouldRevalidate){let n=t.route.shouldRevalidate({currentUrl:new URL(a.pathname+a.search+a.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if("boolean"==typeof n)return n}return!0}):[]}function Nn(e,t,{includeHydrateFallback:r}={}){return n=e.map(e=>{let n=t.routes[e.route.id];if(!n)return[];let a=[n.module];return n.clientActionModule&&(a=a.concat(n.clientActionModule)),n.clientLoaderModule&&(a=a.concat(n.clientLoaderModule)),r&&n.hydrateFallbackModule&&(a=a.concat(n.hydrateFallbackModule)),n.imports&&(a=a.concat(n.imports)),a}).flat(1),[...new Set(n)];var n}function Fn(e,t){let r=new Set,n=new Set(t);return e.reduce((e,a)=>{if(t&&!$n(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 Hn(){return H.createElement(wa,{title:"Loading...",renderScripts:!0},H.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://reactrouter.com/start/framework/route-module#hydratefallback " +\n "for more information."\n );\n '}}))}function zn(e){let t={};return Object.values(e).forEach(e=>{if(e){let r=e.parentId||"";t[r]||(t[r]=[]),t[r].push(e)}}),t}function Un(e,t,r){let n=Yn(t),a=!t.HydrateFallback||r&&"root"!==e.id?"root"===e.id?Hn:void 0:t.HydrateFallback,o=t.ErrorBoundary?t.ErrorBoundary:"root"===e.id?()=>H.createElement(ga,{error:Fr()}):void 0;return"root"===e.id&&t.Layout?{...n?{element:H.createElement(t.Layout,null,H.createElement(n,null))}:{Component:n},...o?{errorElement:H.createElement(t.Layout,null,H.createElement(o,null))}:{ErrorBoundary:o},...a?{hydrateFallbackElement:H.createElement(t.Layout,null,H.createElement(a,null))}:{HydrateFallback:a}}:{Component:n,ErrorBoundary:o,HydrateFallback:a}}function In(e,t,r,n,a,o){return qn(t,r,n,a,o,"",zn(t),e)}function Bn(e,t){if("loader"===e&&!t.hasLoader||"action"===e&&!t.hasAction){let r=`You are trying to call ${"action"===e?"serverAction()":"serverLoader()"} on a route that does not have a server ${e} (routeId: "${t.id}")`;throw new He(400,"Bad Request",new Error(r),!0)}}function Wn(e,t){let r="clientAction"===e?"a":"an";throw new He(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 qn(e,t,r,n,a,o="",i=zn(e),l){return(i[o]||[]).map(o=>{let s=t[o.id];function u(e){return wn("function"==typeof e,"No single fetch function available for route handler"),e()}function c(e){return o.hasLoader?u(e):Promise.resolve(null)}function d(e){if(!o.hasAction)throw Wn("action",o.id);return u(e)}function h(e){import(e)}function f(e){e.clientActionModule&&h(e.clientActionModule),e.clientLoaderModule&&h(e.clientLoaderModule)}async function p(e){let r=t[o.id],n=r?Tn(o,r):Promise.resolve();try{return e()}finally{await n}}let m={id:o.id,index:o.index,path:o.path};if(s){Object.assign(m,{...m,...Un(o,s,a),middleware:s.clientMiddleware,handle:s.handle,shouldRevalidate:Jn(m.path,s,o,n,l)});let v=r&&r.loaderData&&o.id in r.loaderData,g=v?r?.loaderData?.[o.id]:void 0,w=r&&r.errors&&o.id in r.errors,b=w?r?.errors?.[o.id]:void 0,E=null==l&&(!0===s.clientLoader?.hydrate||!o.hasLoader);m.loader=async({request:e,params:t,context:r,unstable_pattern:n,unstable_url:a},i)=>{try{return await p(async()=>(wn(s,"No `routeModule` available for critical-route loader"),s.clientLoader?s.clientLoader({request:e,params:t,context:r,unstable_pattern:n,unstable_url:a,async serverLoader(){if
12(Bn("loader",o),E){if(v)return g;if(w)throw b}return c(i)}}):c(i)))}finally{E=!1}},m.loader.hydrate=Vn(o.id,s.clientLoader,o.hasLoader,a),m.action=({request:e,params:t,context:r,unstable_pattern:n,unstable_url:i},l)=>p(async()=>{if(wn(s,"No `routeModule` available for critical-route action"),!s.clientAction){if(a)throw Wn("clientAction",o.id);return d(l)}return s.clientAction({request:e,params:t,context:r,unstable_pattern:n,unstable_url:i,serverAction:async()=>(Bn("action",o),d(l))})})}else{let S;async function R(){return S||(S=(async()=>{(o.clientLoaderModule||o.clientActionModule)&&await new Promise(e=>setTimeout(e,0));let e=async function(e,t){let r=Pn(e,t),n=async function(e){if(!e.css)return;let t=Dn(e);await Promise.all(t.map(On))}(e),a=await r;return await Promise.all([n,Tn(e,a)]),{Component:Yn(a),ErrorBoundary:a.ErrorBoundary,clientMiddleware:a.clientMiddleware,clientAction:a.clientAction,clientLoader:a.clientLoader,handle:a.handle,links:a.links,meta:a.meta,shouldRevalidate:a.shouldRevalidate}}(o,t);return f(o),await e})()),await S}o.hasClientLoader||(m.loader=(e,t)=>p(()=>c(t))),o.hasClientAction||(m.action=(e,t)=>p(()=>{if(a)throw Wn("clientAction",o.id);return d(t)})),m.lazy={loader:o.hasClientLoader?async()=>{let{clientLoader:e}=o.clientLoaderModule?await import(o.clientLoaderModule):await R();return wn(e,"No `clientLoader` export found"),(t,r)=>e({...t,serverLoader:async()=>(Bn("loader",o),c(r))})}:void 0,action:o.hasClientAction?async()=>{let e=o.clientActionModule?import(o.clientActionModule):R();f(o);let{clientAction:t}=await e;return wn(t,"No `clientAction` export found"),(e,r)=>t({...e,serverAction:async()=>(Bn("action",o),d(r))})}:void 0,middleware:o.hasClientMiddleware?async()=>{let{clientMiddleware:e}=o.clientMiddlewareModule?await import(o.clientMiddlewareModule):await R();return wn(e,"No `clientMiddleware` export found"),e}:void 0,shouldRevalidate:async()=>{let e=await R();return Jn(m.path,e,o,n,l)},handle:async()=>(await R()).handle,Component:async()=>(await R()).Component,ErrorBoundary:o.hasErrorBoundary?async()=>(await R()).ErrorBoundary:void 0}}let y=qn(e,t,r,n,a,o.id,i,l);return y.length>0&&(m.children=y),m})}function Jn(e,t,r,n,a){if(a)return function(e,t,r){let n=!1;return a=>n?t?t(a):a.defaultShouldRevalidate:(n=!0,r.has(e))}(r.id,t.shouldRevalidate,a);if(!n&&r.hasLoader&&!r.hasClientLoader){let r=e?Se(e)[1].map(e=>e.paramName):[];const n=e=>r.some(t=>e.currentParams[t]!==e.nextParams[t]);if(t.shouldRevalidate){let e=t.shouldRevalidate;return t=>e({...t,defaultShouldRevalidate:n(t)})}return e=>n(e)}return t.shouldRevalidate}function Yn(e){if(null==e.default)return;return"object"==typeof e.default&&0===Object.keys(e.default).length?void 0:e.default}function Vn(e,t,r,n){return n&&"root"!==e||null!=t&&(!0===t.hydrate||!0!==r)}var Xn=new Set,Kn=new Set;function Gn(e,t){return"lazy"===e.mode&&!0===t}function Zn(e,t,r,n,a,o,i){if(Gn(a,n))return async({path:l,patch:s,signal:u,fetcherKey:c})=>{if(Kn.has(l))return;let{state:d}=e();await ta([l],c?window.location.href:Z(d.navigation.location||d.location),t,r,n,o,i,a.manifestPath,s,u)}}function Qn(e,t,r,n,a,o){H.useEffect(()=>{if(!Gn(a,n)||!0===window.navigator?.connection?.saveData)return;function i(e){let t="FORM"===e.tagName?e.getAttribute("action"):e.getAttribute("href");if(!t)return;let r="A"===e.tagName?e.pathname:new URL(t,window.location.origin).pathname;Kn.has(r)||Xn.add(r)}async function l(){document.querySelectorAll("a[data-discover], form[data-discover]").forEach(i);let l=Array.from(Xn.keys()).filter(e=>!Kn.has(e)||(Xn.delete(e),!1));if(0!==l.length)try{await ta(l,null,t,r,n,o,e.basename,a.manifestPath,e.patchRoutes)}catch(s){}}let s=function(e,t){let r;return(...n)=>{window.clearTimeout(r),r=window.setTimeout(()=>e(...n),t)}}(l,100);l();let u=new MutationObserver(()=>s());return u.observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["data-discover","href","action"]}),()=>u.disconnect()},[n,o,t,r,e,a])}var ea="react-router-manifest-version";async function ta(e,t,r,n,a,o,i,l,s,u){const c=new URLSearchParams;c.set("paths",e.sort().join(",")),c.set("version",r.version);let d,h=new URL(function(e,t){let r=e||"/__manifest";return null==t?r:`${t}${r}`.replace(/\/+/g,"/")}(l,i),window.location.origin);if(h.search=c.toString(),h.toString().length>7680)return void Xn.clear();try{let e=await fetch(h,{signal:u});if(!e.ok)throw new Error(`${e.status} ${e.statusText}`);if(204===e.status&&e.headers.has("X-Remix-Reload-Document")){if(!t)return;try{if(sessionStorage.getItem(ea)===r.version)return;sessionStorage.setItem(ea,r.version)}catch{}window.location.href=t,await new Promise(()=>{})}else if(e.status>=400)throw new Error(await e.text());try{sessionStorage.removeItem(ea)}catch{}d=await e.json()}catch(y){if(u?.aborted)return;throw y}let f=new Set(Object.keys(r.routes)),p=Object.values(d).reduce((e,t)=>
12(t&&!f.has(t.id)&&(e[t.id]=t),e),{});Object.assign(r.routes,p),e.forEach(e=>function(e,t){if(t.size>=1e3){let e=t.values().next().value;t.delete(e)}t.add(e)}(e,Kn));let m=new Set;Object.values(p).forEach(e=>{!e||e.parentId&&p[e.parentId]||m.add(e.parentId)}),m.forEach(e=>s(e||null,qn(p,n,null,a,o,e)))}function ra(){let e=H.useContext(ir);return wn(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function na(){let e=H.useContext(lr);return wn(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var aa=H.createContext(void 0);function oa(){let e=H.useContext(aa);return wn(e,"You must render this element inside a <HydratedRouter> element"),e}function ia(e,t){return r=>{e&&e(r),r.defaultPrevented||t(r)}}function la(e,t,r){if(r&&!pa)return[e[0]];if(t){let r=e.findIndex(e=>void 0!==t[e.route.id]);return e.slice(0,r+1)}return e}aa.displayName="FrameworkContext";var sa="data-react-router-critical-css";function ua({nonce:e,crossOrigin:t}){let{isSpaMode:r,manifest:n,routeModules:a,criticalCss:o}=oa(),{errors:i,matches:l}=na(),s=la(l,i,r),u=H.useMemo(()=>function(e,t,r){return Fn(e.map(e=>{let n=t[e.route.id],a=r.routes[e.route.id];return[a&&a.css?a.css.map(e=>({rel:"stylesheet",href:e})):[],n?.links?.()||[]]}).flat(2),Nn(e,r))}(s,a,n),[s,a,n]);return H.createElement(H.Fragment,null,"string"==typeof o?H.createElement("style",{[sa]:"",nonce:e,dangerouslySetInnerHTML:{__html:o}}):null,"object"==typeof o?H.createElement("link",{[sa]:"",rel:"stylesheet",href:o.href,nonce:e,crossOrigin:t}):null,u.map(({key:r,link:n})=>$n(n)?H.createElement(ca,{key:r,nonce:e,...n,crossOrigin:n.crossOrigin??t}):H.createElement("link",{key:r,nonce:e,...n,crossOrigin:n.crossOrigin??t})))}function ca({page:e,...t}){let{router:r}=ra(),n=H.useMemo(()=>le(r.routes,e,r.basename),[r.routes,e,r.basename]);return n?H.createElement(ha,{page:e,matches:n,...t}):null}function da(e){let{manifest:t,routeModules:r}=oa(),[n,a]=H.useState([]);return H.useEffect(()=>{let n=!1;return async function(e,t,r){return Fn((await Promise.all(e.map(async e=>{let n=t.routes[e.route.id];if(n){let e=await Pn(n,r);return e.links?e.links():[]}return[]}))).flat(1).filter(jn).filter(e=>"stylesheet"===e.rel||"preload"===e.rel).map(e=>"stylesheet"===e.rel?{...e,rel:"prefetch",as:"style"}:{...e,rel:"prefetch"}))}(e,t,r).then(e=>{n||a(e)}),()=>{n=!0}},[e,t,r]),n}function ha({page:e,matches:t,...r}){let n=gr(),{future:a,manifest:o,routeModules:i}=oa(),{basename:l}=ra(),{loaderData:s,matches:u}=na(),c=H.useMemo(()=>An(e,t,u,o,n,"data"),[e,t,u,o,n]),d=H.useMemo(()=>An(e,t,u,o,n,"assets"),[e,t,u,o,n]),h=H.useMemo(()=>{if(e===n.pathname+n.search+n.hash)return[];let r=new Set,u=!1;if(t.forEach(e=>{let t=o.routes[e.route.id];t&&t.hasLoader&&(!c.some(t=>t.route.id===e.route.id)&&e.route.id in s&&i[e.route.id]?.shouldRevalidate||t.hasClientLoader?u=!0:r.add(e.route.id))}),0===r.size)return[];let d=kn(e,l,a.unstable_trailingSlashAwareDataRequests,"data");return u&&r.size>0&&d.searchParams.set("_routes",t.filter(e=>r.has(e.route.id)).map(e=>e.route.id).join(",")),[d.pathname+d.search]},[l,a.unstable_trailingSlashAwareDataRequests,s,n,o,c,t,e,i]),f=H.useMemo(()=>Nn(d,o),[d,o]),p=da(d);return H.createElement(H.Fragment,null,h.map(e=>H.createElement("link",{key:e,rel:"prefetch",as:"fetch",href:e,...r})),f.map(e=>H.createElement("link",{key:e,rel:"modulepreload",href:e,...r})),p.map(({key:e,link:t})=>H.createElement("link",{key:e,nonce:r.nonce,...t,crossOrigin:t.crossOrigin??r.crossOrigin})))}function fa(){let{isSpaMode:e,routeModules:t}=oa(),{errors:r,matches:n,loaderData:a}=na(),o=gr(),i=la(n,r,e),l=null;r&&(l=r[i[i.length-1].route.id]);let s=[],u=null,c=[];for(let d=0;d<i.length;d++){let e=i[d],r=e.route.id,n=a[r],h=e.params,f=t[r],p=[],m={id:r,data:n,loaderData:n,meta:[],params:e.params,pathname:e.pathname,handle:e.route.handle,error:l};if(c[d]=m,f?.meta?p="function"==typeof f.meta?f.meta({data:n,loaderData:n,params:h,location:o,matches:c,error:l}):Array.isArray(f.meta)?[...f.meta]:f.meta:u&&(p=[...u]),p=p||[],!Array.isArray(p))throw new Error("The route at "+e.route.path+" returns an invali
12d value. All route meta functions must return an array of meta objects.\n\nTo reference the meta function API, see https://reactrouter.com/start/framework/route-module#meta");m.meta=p,c[d]=m,s=[...p],u=s}return H.createElement(H.Fragment,null,s.flat().map(e=>{if(!e)return null;if("tagName"in e){let{tagName:t,...r}=e;if(!function(e){return"string"==typeof e&&/^(meta|link)$/.test(e)}(t))return null;let n=t;return H.createElement(n,{key:JSON.stringify(r),...r})}if("title"in e)return H.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?H.createElement("meta",{key:"charSet",charSet:e.charSet}):null;if("script:ld+json"in e)try{let r=JSON.stringify(e["script:ld+json"]);return H.createElement("script",{key:`script:ld+json:${r}`,type:"application/ld+json",dangerouslySetInnerHTML:{__html:(t=r,t.replace(gn,e=>vn[e]))}})}catch(r){return null}var t;return H.createElement("meta",{key:JSON.stringify(e),...e})}))}var pa=!1;function ma(e){let{manifest:t,serverHandoffString:r,isSpaMode:n,renderMeta:a,routeDiscovery:o,ssr:i}=oa(),{router:l,static:s,staticContext:u}=ra(),{matches:c}=na(),d=ur(),h=Gn(o,i);a&&(a.didRenderScripts=!0);let f=la(c,null,n);H.useEffect(()=>{pa=!0},[]);let p=H.useMemo(()=>{if(d)return null;let n=u?`window.__reactRouterContext = ${r};window.__reactRouterContext.stream = new ReadableStream({start(controller){window.__reactRouterContext.streamController = controller;}}).pipeThrough(new TextEncoderStream());`:" ",a=s?`${t.hmr?.runtime?`import ${JSON.stringify(t.hmr.runtime)};`:""}${h?"":`import ${JSON.stringify(t.url)}`};\n${f.map((e,r)=>{let n=`route${r}`,a=t.routes[e.route.id];wn(a,`Route ${e.route.id} not found in manifest`);let{clientActionModule:o,clientLoaderModule:i,clientMiddlewareModule:l,hydrateFallbackModule:s,module:u}=a,c=[...o?[{module:o,varName:`${n}_clientAction`}]:[],...i?[{module:i,varName:`${n}_clientLoader`}]:[],...l?[{module:l,varName:`${n}_clientMiddleware`}]:[],...s?[{module:s,varName:`${n}_HydrateFallback`}]:[],{module:u,varName:`${n}_main`}];return 1===c.length?`import * as ${n} from ${JSON.stringify(u)};`:[c.map(e=>`import * as ${e.varName} from "${e.module}";`).join("\n"),`const ${n} = {${c.map(e=>`...${e.varName}`).join(",")}};`].join("\n")}).join("\n")}\n ${h?`window.__reactRouterManifest = ${JSON.stringify(function({sri:e,...t},r){let n=new Set(r.state.matches.map(e=>e.route.id)),a=r.state.location.pathname.split("/").filter(Boolean),o=["/"];for(a.pop();a.length>0;)o.push(`/${a.join("/")}`),a.pop();o.forEach(e=>{let t=le(r.routes,e,r.basename);t&&t.forEach(e=>n.add(e.route.id))});let i=[...n].reduce((e,r)=>Object.assign(e,{[r]:t.routes[r]}),{});return{...t,routes:i,sri:!!e||void 0}}(t,l),null,2)};`:""}\n window.__reactRouterRouteModules = {${f.map((e,t)=>`${JSON.stringify(e.route.id)}:route${t}`).join(",")}};\n\nimport(${JSON.stringify(t.entry.module)});`:" ";return H.createElement(H.Fragment,null,H.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:n},type:void 0}),H.createElement("script",{...e,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:a},type:"module",async:!0}))},[]),m=pa||d?[]:(y=t.entry.imports.concat(Nn(f,t,{includeHydrateFallback:!0})),[...new Set(y)]);var y;let v="object"==typeof t.sri?t.sri:{};return Ir(!d,"The <Scripts /> element is a no-op when using RSC and can be safely removed."),pa||d?null:H.createElement(H.Fragment,null,"object"==typeof t.sri?H.createElement("script",{...e,"rr-importmap":"",type:"importmap",suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:JSON.stringify({integrity:v})}}):null,h?null:H.createElement("link",{rel:"modulepreload",href:t.url,crossOrigin:e.crossOrigin,integrity:v[t.url],suppressHydrationWarning:!0}),H.createElement("link",{rel:"modulepreload",href:t.entry.module,crossOrigin:e.crossOrigin,integrity:v[t.entry.module],suppressHydrationWarning:!0}),m.map(t=>H.createElement("link",{key:t,rel:"modulepreload",href:t,crossOrigin:e.crossOrigin,integrity:v[t],suppressHydrationWarning:!0})),p)}function ya(...e){return t=>
12{e.forEach(e=>{"function"==typeof e?e(t):null!=e&&(e.current=t)})}}var va=class extends H.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?H.createElement(ga,{error:this.state.error,isOutsideRemixApp:!0}):this.props.children}};function ga({error:e,isOutsideRemixApp:t}){let r,n=H.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://reactrouter.com/how-to/error-boundary for more information."\n );\n '}});if(ze(e))return H.createElement(wa,{title:"Unhandled Thrown Response!"},H.createElement("h1",{style:{fontSize:"24px"}},e.status," ",e.statusText),n);if(e instanceof Error)r=e;else{let t=null==e?"Unknown Error":"object"==typeof e&&"toString"in e?e.toString():JSON.stringify(e);r=new Error(t)}return H.createElement(wa,{title:"Application Error!",isOutsideRemixApp:t},H.createElement("h1",{style:{fontSize:"24px"}},"Application Error"),H.createElement("pre",{style:{padding:"2rem",background:"hsla(10, 50%, 50%, 0.1)",color:"red",overflow:"auto"}},r.stack),n)}function wa({title:e,renderScripts:t,isOutsideRemixApp:r,children:n}){let{routeModules:a}=oa();return a.root?.Layout&&!r?n:H.createElement("html",{lang:"en"},H.createElement("head",null,H.createElement("meta",{charSet:"utf-8"}),H.createElement("meta",{name:"viewport",content:"width=device-width,initial-scale=1,viewport-fit=cover"}),H.createElement("title",null,e)),H.createElement("body",null,H.createElement("main",{style:{fontFamily:"system-ui, sans-serif",padding:"2rem"}},n,t?H.createElement(ma,null):null)))}var ba="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement;try{ba&&(window.__reactRouterVersion="7.13.2")}catch(Ca){}var Ea=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Sa=H.forwardRef(function({onClick:e,discover:t="render",prefetch:r="none",relative:n,reloadDocument:a,replace:o,unstable_mask:i,state:l,target:s,to:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...f},p){let{basename:m,navigator:y,unstable_useTransitions:v}=H.useContext(hr),g="string"==typeof u&&Ea.test(u),w=Be(u,m),b=function(e,{relative:t}={}){V(vr(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:n}=H.useContext(hr),{hash:a,pathname:o,search:i}=xr(e,{relative:t}),l=o;return"/"!==r&&(l="/"===o?r:Te([r,o])),n.createHref({pathname:l,search:i,hash:a})}(u=w.to,{relative:n}),E=gr(),S=null;if(i){let e=De(i,[],E.unstable_mask?E.unstable_mask.pathname:"/",!0);"/"!==m&&(e.pathname="/"===e.pathname?m:Te([m,e.pathname])),S=y.createHref(e)}let[R,x,k]=function(e,t){let r=H.useContext(aa),[n,a]=H.useState(!1),[o,i]=H.useState(!1),{onFocus:l,onBlur:s,onMouseEnter:u,onMouseLeave:c,onTouchStart:d}=t,h=H.useRef(null);H.useEffect(()=>{if("render"===e&&i(!0),"viewport"===e){let e=new IntersectionObserver(e=>{e.forEach(e=>{i(e.isIntersecting)})},{threshold:.5});return h.current&&e.observe(h.current),()=>{e.disconnect()}}},[e]),H.useEffect(()=>{if(n){let e=setTimeout(()=>{i(!0)},100);return()=>{clearTimeout(e)}}},[n]);let f=()=>{a(!0)},p=()=>{a(!1),i(!1)};return r?"intent"!==e?[o,h,{}]:[o,h,{onFocus:ia(l,f),onBlur:ia(s,p),onMouseEnter:ia(u,f),onMouseLeave:ia(c,p),onTouchStart:ia(d,f)}]:[!1,h,{}]}(r,f),L=function(e,{target:t,replace:r,unstable_mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s,unstable_useTransitions:u}={}){let c=Er(),d=gr(),h=xr(e,{relative:i});return H.useCallback(f=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(f,t)){f.preventDefault();let t=void 0!==r?r:Z(d)===Z(h),p=()=>c(e,{replace:t,unstable_mask:n,state:a,preventScrollReset:o,relative:i,viewTransition:l,unstable_defaultShouldRevalidate:s});u?H.startTransition(()=>p()):p()}},[d,c,h,r,n,a,t,e,o,i,l,s,u])}(u,{replace:o,unstable_mask:i,state:l,target:s,preventScrollReset:c,relative:n,viewTransition:d,unstable_defaultShouldRevalidate:h,unstable_useTransitions:v});let C=!(w.isExternal||a),_=H.createElement("a",{...f,...k,href:(C?S:void 0)||w.absoluteURL||b,onClick:C?function(t){e&&e(t),t.defaultPrevented||L(t)}:e,ref:ya(p,x),target:s,"data-discover":g||"render"!==t?void 0:"true"});return R&&!g?H.createElement(H.Fragment,null,_,H.createElement(ca,{page:b})):_});function Ra(e){let t=H.useContext(ir);return V(t,function(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}(e)),t}function xa(e){X("undefined"!=typeof URLSearchParams,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=H.useRef(an(e)),r=H.useRef(!1),n=gr(),a=H.useMemo(()=>function(e,t){let r=an(e);return t&&t.forEach((e,n)=>
12{r.has(n)||t.getAll(n).forEach(e=>{r.append(n,e)})}),r}(n.search,r.current?null:t.current),[n.search]),o=Er(),i=H.useCallback((e,t)=>{const n=an("function"==typeof e?e(new URLSearchParams(a)):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,i]}Sa.displayName="Link",H.forwardRef(function({"aria-current":e="page",caseSensitive:t=!1,className:r="",end:n=!1,style:a,to:o,viewTransition:i,children:l,...s},u){let c=xr(o,{relative:s.relative}),d=gr(),h=H.useContext(lr),{navigator:f,basename:p}=H.useContext(hr),m=null!=h&&function(e,{relative:t}={}){let r=H.useContext(cr);V(null!=r,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:n}=Ra("useViewTransitionState"),a=xr(e,{relative:t});if(!r.isTransitioning)return!1;let o=xe(r.currentLocation.pathname,n)||r.currentLocation.pathname,i=xe(r.nextLocation.pathname,n)||r.nextLocation.pathname;return null!=Ee(a.pathname,i)||null!=Ee(a.pathname,o)}(c)&&!0===i,y=f.encodeLocation?f.encodeLocation(c).pathname:c.pathname,v=d.pathname,g=h&&h.navigation&&h.navigation.location?h.navigation.location.pathname:null;t||(v=v.toLowerCase(),g=g?g.toLowerCase():null,y=y.toLowerCase()),g&&p&&(g=xe(g,p)||g);const w="/"!==y&&y.endsWith("/")?y.length-1:y.length;let b,E=v===y||!n&&v.startsWith(y)&&"/"===v.charAt(w),S=null!=g&&(g===y||!n&&g.startsWith(y)&&"/"===g.charAt(y.length)),R={isActive:E,isPending:S,isTransitioning:m},x=E?e:void 0;b="function"==typeof r?r(R):[r,E?"active":null,S?"pending":null,m?"transitioning":null].filter(Boolean).join(" ");let k="function"==typeof a?a(R):a;return H.createElement(Sa,{...s,"aria-current":x,className:b,ref:u,style:k,to:o,viewTransition:i},"function"==typeof l?l(R):l)}).displayName="NavLink",H.forwardRef(({discover:e="render",fetcherKey:t,navigate:r,reloadDocument:n,replace:a,state:o,method:i=tn,action:l,onSubmit:s,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h,...f},p)=>{let{unstable_useTransitions:m}=H.useContext(hr),y=function(){let{router:e}=Ra("useSubmit"),{basename:t}=H.useContext(hr),r=$r("useRouteId"),n=e.fetch,a=e.navigate;return H.useCallback(async(e,o={})=>{let{action:i,method:l,encType:s,formData:u,body:c}=un(e,t);if(!1===o.navigate){let e=o.fetcherKey||La();await n(e,r,o.action||i,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,flushSync:o.flushSync})}else await a(o.action||i,{unstable_defaultShouldRevalidate:o.unstable_defaultShouldRevalidate,preventScrollReset:o.preventScrollReset,formData:u,body:c,formMethod:o.method||l,formEncType:o.encType||s,replace:o.replace,state:o.state,fromRouteId:r,flushSync:o.flushSync,viewTransition:o.viewTransition})},[n,a,t,r])}(),v=function(e,{relative:t}={}){let{basename:r}=H.useContext(hr),n=H.useContext(pr);V(n,"useFormAction must be used inside a RouteContext");let[a]=n.matches.slice(-1),o={...xr(e||".",{relative:t})},i=gr();if(null==e){o.search=i.search;let e=new URLSearchParams(o.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();o.search=r?`?${r}`:""}}e&&"."!==e||!a.route.index||(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index");"/"!==r&&(o.pathname="/"===o.pathname?r:Te([r,o.pathname]));return Z(o)}(l,{relative:u}),g="get"===i.toLowerCase()?"get":"post",w="string"==typeof l&&Ea.test(l);return H.createElement("form",{ref:p,method:g,action:v,onSubmit:n?s:e=>{if(s&&s(e),e.defaultPrevented)return;e.preventDefault();let n=e.nativeEvent.submitter,l=n?.getAttribute("formmethod")||i,f=()=>y(n||e.currentTarget,{fetcherKey:t,method:l,navigate:r,replace:a,state:o,relative:u,preventScrollReset:c,viewTransition:d,unstable_defaultShouldRevalidate:h});m&&!1!==r?H.startTransition(()=>f()):f()},...f,"data-discover":w||"render"!==e?void 0:"true"})}).displayName="Form";var ka=0,La=()=>`__${String(++ka)}__`;export{r as A,n as B,t as C,He as E,aa as F,Sa as L,fa as M,Rn as N,Gr as O,z as R,ma as S,Er as a,Ar as b,en as c,gr as d,Fe as e,ua as f,xa as g,V as h,ze as i,Qn as j,va as k,Vr as l,le as m,Cn as n,qn as o,dt as p,Zn as q,H as r,Vn as s,xn as t,Rr as u,Y as v,Qr as w,In as x,qr as y,Jr 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.