"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1342],{201342:(e,t,r)=>{r.d(t,{tn:()=>et,lr:()=>Y});var n,a,o,l,i,s,u,c,h,p,d,m,f,v,g=r(667294),y=r.t(g,2);/** * @remix-run/router v1.5.0 * * Copyright (c) Remix Software Inc. * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */function E(){return(E=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}(n=c||(c={})).Pop="POP",n.Push="PUSH",n.Replace="REPLACE",(a=h||(h={})).data="data",a.deferred="deferred",a.redirect="redirect",a.error="error";let C=/^:\w+$/,R=e=>"*"===e;function P(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)||"/"}function S(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified "+("`to."+t)+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}let U=e=>e.join("/").replace(/\/\/+/g,"/"),B=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),L=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",O=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,Symbol("deferred");let{useState:A,useEffect:W,useLayoutEffect:$,useDebugValue:j}=y;"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,y.useSyncExternalStore;let D=g.createContext(null),_=g.createContext(null),k=g.createContext(null),I=g.createContext(null),T=g.createContext({outlet:null,matches:[]}),F=g.createContext(null);function M(){return(M=Object.assign?Object.assign.bind():function(e){for(var t=1;t({basename:i,navigator:o,static:l}),[i,o,l]);"string"==typeof n&&(n=x(n));let{pathname:u="/",search:h="",hash:p="",state:d=null,key:m="default"}=n,f=g.useMemo(()=>{let e=P(u,i);return null==e?null:{location:{pathname:e,search:h,hash:p,state:d,key:m},navigationType:a}},[i,u,h,p,d,m,a]);return null==f?null:g.createElement(k.Provider,{value:s},g.createElement(I.Provider,{children:r,value:f}))}function G(e){let{children:t,location:r}=e,n=g.useContext(D);return function(e,t){let r;N()||w(!1);let{navigator:n}=g.useContext(k),a=g.useContext(_),{matches:o}=g.useContext(T),l=o[o.length-1],i=l?l.params:{};l&&l.pathname;let s=l?l.pathnameBase:"/";l&&l.route;let u=H();if(t){var h;let e="string"==typeof t?x(t):t;"/"===s||(null==(h=e.pathname)?void 0:h.startsWith(s))||w(!1),r=e}else r=u;let p=r.pathname||"/",d=function(e,t,r){void 0===r&&(r="/");let n=P(("string"==typeof t?x(t):t).pathname||"/",r);if(null==n)return null;let a=function e(t,r,n,a){void 0===r&&(r=[]),void 0===n&&(n=[]),void 0===a&&(a="");let o=(t,o,l)=>{let i={relativePath:void 0===l?t.path||"":l,caseSensitive:!0===t.caseSensitive,childrenIndex:o,route:t};i.relativePath.startsWith("/")&&(w(i.relativePath.startsWith(a),'Absolute route path "'+i.relativePath+'" nested under path "'+a+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),i.relativePath=i.relativePath.slice(a.length));let s=U([a,i.relativePath]),u=n.concat(i);if(t.children&&t.children.length>0&&(w(!0!==t.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),e(t.children,r,u,s)),null!=t.path||t.index){var c;let e,n;r.push({path:s,score:(c=t.index,n=(e=s.split("/")).length,e.some(R)&&(n+=-2),c&&(n+=2),e.filter(e=>!R(e)).reduce((e,t)=>e+(C.test(t)?3:""===t?1:10),n)),routesMeta:u})}};return t.forEach((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of function e(t){let r=t.split("/");if(0===r.length)return[];let[n,...a]=r,o=n.endsWith("?"),l=n.replace(/\?$/,"");if(0===a.length)return o?[l,""]:[l];let i=e(a.join("/")),s=[];return s.push(...i.map(e=>""===e?l:[l,e].join("/"))),o&&s.push(...i),s.map(e=>t.startsWith("/")&&""===e?"/":e)}(e.path))o(e,t,r);else o(e,t)}),r}(e);!function(e){e.sort((e,t)=>{var r,n;return e.score!==t.score?t.score-e.score:(r=e.routesMeta.map(e=>e.childrenIndex),n=t.routesMeta.map(e=>e.childrenIndex),r.length===n.length&&r.slice(0,-1).every((e,t)=>e===n[t])?r[r.length-1]-n[n.length-1]:0)})}(a);let o=null;for(let e=0;null==o&&e(n.push(t),"/([^\\/]+)"));return e.endsWith("*")?(n.push("*"),a+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?a+="\\/*$":""!==e&&"/"!==e&&(a+="(?:(?=\\/|$))"),[new RegExp(a,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),a=t.match(r);if(!a)return null;let o=a[0],l=o.replace(/(.)\/+$/,"$1"),i=a.slice(1);return{params:n.reduce((e,t,r)=>{if("*"===t){let e=i[r]||"";l=o.slice(0,o.length-e.length).replace(/(.)\/+$/,"$1")}return e[t]=function(e,t){try{return decodeURIComponent(e)}catch(r){return b(!1,'The value for the URL param "'+t+'" will not be decoded because the string "'+e+'" is a malformed URL segment. This is probably due to a bad percent encoding ('+r+")."),e}}(i[r]||"",t),e},{}),pathname:o,pathnameBase:l,pattern:e}}({path:l.relativePath,caseSensitive:l.caseSensitive,end:i},s);if(!u)return null;Object.assign(n,u.params);let c=l.route;o.push({params:n,pathname:U([a,u.pathname]),pathnameBase:B(U([a,u.pathnameBase])),route:c}),"/"!==u.pathnameBase&&(a=U([a,u.pathnameBase]))}return o}(a[e],function(e){try{return decodeURI(e)}catch(t){return b(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}(n));return o}(e,{pathname:"/"===s?p:p.slice(s.length)||"/"}),m=function(e,t,r){if(void 0===t&&(t=[]),null==e){if(null==r||!r.errors)return null;e=r.matches}let n=e,a=null==r?void 0:r.errors;if(null!=a){let e=n.findIndex(e=>e.route.id&&(null==a?void 0:a[e.route.id]));e>=0||w(!1),n=n.slice(0,Math.min(n.length,e+1))}return n.reduceRight((e,o,l)=>{let i=o.route.id?null==a?void 0:a[o.route.id]:null,s=null;r&&(s=o.route.ErrorBoundary?g.createElement(o.route.ErrorBoundary,null):o.route.errorElement?o.route.errorElement:g.createElement(J,null));let u=t.concat(n.slice(0,l+1)),c=()=>{let t=e;return i?t=s:o.route.Component?t=g.createElement(o.route.Component,null):o.route.element&&(t=o.route.element),g.createElement(K,{match:o,routeContext:{outlet:e,matches:u},children:t})};return r&&(o.route.ErrorBoundary||o.route.errorElement||0===l)?g.createElement(z,{location:r.location,component:s,error:i,children:c(),routeContext:{outlet:null,matches:u}}):c()},null)}(d&&d.map(e=>Object.assign({},e,{params:Object.assign({},i,e.params),pathname:U([s,n.encodeLocation?n.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?s:U([s,n.encodeLocation?n.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])})),o,a||void 0);return t&&m?g.createElement(I.Provider,{value:{location:M({pathname:"/",search:"",hash:"",state:null,key:"default"},r),navigationType:c.Pop}},m):m}(n&&!t?n.router.routes:function e(t,r){void 0===r&&(r=[]);let n=[];return g.Children.forEach(t,(t,a)=>{if(!g.isValidElement(t))return;let o=[...r,a];if(t.type===g.Fragment){n.push.apply(n,e(t.props.children,o));return}t.type!==V&&w(!1),t.props.index&&t.props.children&&w(!1);let l={id:t.props.id||o.join("-"),caseSensitive:t.props.caseSensitive,element:t.props.element,Component:t.props.Component,index:t.props.index,path:t.props.path,loader:t.props.loader,action:t.props.action,errorElement:t.props.errorElement,ErrorBoundary:t.props.ErrorBoundary,hasErrorBoundary:null!=t.props.ErrorBoundary||null!=t.props.errorElement,shouldRevalidate:t.props.shouldRevalidate,handle:t.props.handle,lazy:t.props.lazy};t.props.children&&(l.children=e(t.props.children,o)),n.push(l)}),n}(t),r)}(o=p||(p={})).UseBlocker="useBlocker",o.UseRevalidator="useRevalidator",(l=d||(d={})).UseBlocker="useBlocker",l.UseLoaderData="useLoaderData",l.UseActionData="useActionData",l.UseRouteError="useRouteError",l.UseNavigation="useNavigation",l.UseRouteLoaderData="useRouteLoaderData",l.UseMatches="useMatches",l.UseRevalidator="useRevalidator",(i=m||(m={}))[i.pending=0]="pending",i[i.success=1]="success",i[i.error=2]="error",new Promise(()=>{});var Q=r(616550);function X(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,r)=>{let n=e[r];return t.concat(Array.isArray(n)?n.map(e=>[r,e]):[[r,n]])},[]))}function Y(e){let t=g.useRef(X(e)),r=g.useRef(!1),n=H(),a=g.useMemo(()=>(function(e,t){let r=X(e);if(t)for(let e of t.keys())r.has(e)||t.getAll(e).forEach(t=>{r.append(e,t)});return r})(n.search,r.current?null:t.current),[n.search]),o=function(){N()||w(!1);let{basename:e,navigator:t}=g.useContext(k),{matches:r}=g.useContext(T),{pathname:n}=H(),a=JSON.stringify(r.filter((e,t)=>0===t||e.route.path&&e.route.path.length>0).map(e=>e.pathnameBase)),o=g.useRef(!1);return g.useEffect(()=>{o.current=!0}),g.useCallback(function(r,l){if(void 0===l&&(l={}),!o.current)return;if("number"==typeof r){t.go(r);return}let i=function(e,t,r,n){let a,o;void 0===n&&(n=!1),"string"==typeof e?a=x(e):(w(!(a=E({},e)).pathname||!a.pathname.includes("?"),S("?","pathname","search",a)),w(!a.pathname||!a.pathname.includes("#"),S("#","pathname","hash",a)),w(!a.search||!a.search.includes("#"),S("#","search","hash",a)));let l=""===e||""===a.pathname,i=l?"/":a.pathname;if(n||null==i)o=r;else{let e=t.length-1;if(i.startsWith("..")){let t=i.split("/");for(;".."===t[0];)t.shift(),e-=1;a.pathname=t.join("/")}o=e>=0?t[e]:"/"}let s=function(e,t){let r;void 0===t&&(t="/");let{pathname:n,search:a="",hash:o=""}="string"==typeof e?x(e):e;return{pathname:n?n.startsWith("/")?n:(r=t.replace(/\/+$/,"").split("/"),n.split("/").forEach(e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)}),r.length>1?r.join("/"):"/"):t,search:L(a),hash:O(o)}}(a,o),u=i&&"/"!==i&&i.endsWith("/"),c=(l||"."===i)&&r.endsWith("/");return!s.pathname.endsWith("/")&&(u||c)&&(s.pathname+="/"),s}(r,JSON.parse(a),n,"path"===l.relative);"/"!==e&&(i.pathname="/"===i.pathname?e:U([e,i.pathname])),(l.replace?t.replace:t.push)(i,l.state,l)},[e,t,a,n])}(),l=g.useCallback((e,t)=>{let n=X("function"==typeof e?e(a):e);r.current=!0,o("?"+n,t)},[o,a]);return[a,l]}"undefined"!=typeof window&&void 0!==window.document&&window.document.createElement,(s=f||(f={})).UseScrollRestoration="useScrollRestoration",s.UseSubmitImpl="useSubmitImpl",s.UseFetcher="useFetcher",(u=v||(v={})).UseFetchers="useFetchers",u.UseScrollRestoration="useScrollRestoration";let Z=!!("undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement),ee=Z?g.useLayoutEffect:()=>{};function et(e){let{children:t}=e,r=(0,Q.useHistory)(),[n,a]=g.useState(()=>({location:r.location,action:r.action}));return ee(()=>{r.listen((e,t)=>a({location:e,action:t}))},[r]),g.createElement(q,{navigationType:n.action,location:n.location,navigator:r},g.createElement(G,null,g.createElement(V,{path:"*",element:t})))}}}]); //# sourceMappingURL=https://sm.pinimg.com/webapp/1342-c79d3d17da82f23c.mjs.map