\n\n"+`Please change the parent to .`);b=b?[d,b].join("/").replace(/\/\/+/g,"/"):d; let g=E();return(f=useMemo(()=>H(a,g,b),[g,a,b]))?f.reduceRight((a,{params:c,pathname:d,route:f})=>createElement(r.Provider,{children:f.element,value:{outlet:a,params:Object.freeze({...e,...c}),pathname:[b,d].join("/").replace(/\/\/+/g,"/"),route:f}}),null):null}function I(a){return a.map(b=>{let a={path:b.path||"/",caseSensitive:!0===b.caseSensitive,element:b.element||createElement(y,null)};b.children&&(a.children=I(b.children));return a})} function C(a){let b=[];Children.forEach(a,a=>{if(isValidElement(a))if(a.type===Fragment)b.push.apply(b,C(a.props.children));else{var c={path:a.props.path||"/",caseSensitive:!0===a.props.caseSensitive,element:a};a.props.children&&(a=C(a.props.children),a.length&&(c.children=a));b.push(c)}});return b} function H(a,b,c=""){"string"===typeof b&&(b=parsePath(b));b=b.pathname||"/";if(c)if(c=c.replace(/^\/*/,"/").replace(/\/+$/,""),b.startsWith(c))b=b===c?"/":b.slice(c.length);else return null;a=J(a);K(a);var d=null;for(c=0;null==d&&c{let f=[c,a.path].join("/").replace(/\/\/+/g,"/"),p=d.concat(a);g=e.concat(g);a.children&&J(a.children,b,f,p,g);b.push([f,p,g])});return b}function K(a){let b=a.reduce((a,[b])=>{a[b]=M(b);return a},{});N(a,(a,d)=>{let [c,,f]=a;a=b[c];let [g,,n]=d;d=b[g];return a!==d?d-a:O(f,n)})}let P=/^:\w+$/,Q=a=>"*"===a; function M(a){a=a.split("/");let b=a.length;a.some(Q)&&(b+=-2);return a.filter(a=>"*"!==a).reduce((a,b)=>a+(P.test(b)?2:""===b?1:10),b)}function O(a,b){return a.length===b.length&&a.slice(0,-1).every((a,d)=>a===b[d])?a[a.length-1]-b[b.length-1]:0}function N(a,b){let c=a.slice(0);a.sort((a,e)=>b(a,e)||c.indexOf(a)-c.indexOf(e))} function L(a,b){"string"===typeof a&&(a={path:a});let {path:c,caseSensitive:d=!1,end:e=!0}=a,[f,g]=R(c,d,e);b=b.match(f);if(!b)return null;a=b[1];let n=b.slice(2);b=g.reduce((a,b,c)=>{c=n[c];try{var d=decodeURIComponent(c.replace(/\+/g," "))}catch(S){k(!1,`The value for the URL param "${b}" will not be decoded because`+` the string "${c}" is a malformed URL segment. This is probably`+` due to a bad percent encoding (${S}).`),d=c}a[b]=d;return a},{});return{path:c,pathname:a,params:b}} function R(a,b,c){let d=[],e="^("+a.replace(/^\/*/,"/").replace(/\/?\*?$/,"").replace(/[\\.*+^$?{}|()[\]]/g,"\\$&").replace(/:(\w+)/g,(a,b)=>{d.push(b);return"([^\\/]+)"})+")";a.endsWith("*")?(a.endsWith("/*")&&(e+="\\/?"),d.push("*"),e+="(.*)"):c&&(e+="\\/?");c&&(e+="$");return[new RegExp(e,b?void 0:"i"),d]}function F(a,b="/"){let {pathname:c,search:d="",hash:e=""}="string"===typeof a?parsePath(a):a;return{pathname:c?T(c,c.startsWith("/")?"/":b):b,search:d,hash:e}} function T(a,b){let c=b.replace(/\/+$/,"").replace(/\/\/+/g,"/").split("/");a.replace(/\/\/+/g,"/").split("/").forEach(a=>{".."===a?1{null==b[d]?h(!1,`Missing ":${d}" param`):void 0;return b[d]}).replace(/\/*\*$/,()=>null==b["*"]?"":b["*"].replace(/^\/*/,"/"))}; function useBlocker(a,b=!0){w()?void 0:h(!1,"useBlocker() may be used only in the context of a component.");let c=useContext(q).navigator;useEffect(()=>{if(b){var d=c.block(b=>{a({...b,retry(){d();b.retry()}})});return d}},[c,a,b])};function useHref(a){w()?void 0:h(!1,"useHref() may be used only in the context of a component.");let b=useContext(q).navigator;a=G(a);return b.createHref(a)}; function useMatch(a){w()?void 0:h(!1,"useMatch() may be used only in the context of a component.");let b=E();return L(a,b.pathname)};function useParams(){return useContext(r).params};function useRoutes(a,b=""){w()?void 0:h(!1,"useRoutes() may be used only in the context of a component.");let c=useMemo(()=>I(a),[a]);return D(c,b)};export{t as MemoryRouter,v as Navigate,y as Outlet,A as Route,u as Router,B as Routes,I as createRoutesFromArray,C as createRoutesFromChildren,generatePath,L as matchPath,H as matchRoutes,F as resolvePath,useBlocker,useHref,w as useInRouterContext,E as useLocation,useMatch,x as useNavigate,z as useOutlet,useParams,G as useResolvedPath,useRoutes} //# sourceMappingURL=react-router.development.js.map