Socket
Socket
Sign inDemoInstall

react-router-dom

Package Overview
Dependencies
Maintainers
3
Versions
395
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-router-dom - npm Package Compare versions

Comparing version 0.0.0-experimental-b1ff171f to 0.0.0-experimental-compat.1

index.d.ts

382

index.js

@@ -1,18 +0,370 @@

import{Router,useHref,useNavigate,useLocation,useResolvedLocation,useBlocker}from'react-router';import{createBrowserHistory,createHashHistory,createPath}from'history';import PropTypes from'prop-types';import{useRef,unstable_useTransition,useReducer,useLayoutEffect,createElement,forwardRef,useCallback,useMemo}from'react';export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolveLocation,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedLocation,useRoutes}from'react-router';function n(){n=Object.assign||function(a){for(var c=1;c<arguments.length;c++){var b=arguments[c],d;for(d in b)Object.prototype.hasOwnProperty.call(b,d)&&(a[d]=b[d])}return a};return n.apply(this,arguments)}function p(a,c){if(null==a)return{};var b={},d=Object.keys(a),f;for(f=0;f<d.length;f++){var e=d[f];0<=c.indexOf(e)||(b[e]=a[e])}return b}
function q(a,c){if(a){if("string"===typeof a)return r(a,c);var b=Object.prototype.toString.call(a).slice(8,-1);"Object"===b&&a.constructor&&(b=a.constructor.name);if("Map"===b||"Set"===b)return Array.from(b);if("Arguments"===b||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(b))return r(a,c)}}function r(a,c){if(null==c||c>a.length)c=a.length;for(var b=0,d=Array(c);b<c;b++)d[b]=a[b];return d}
function t(a){var c=0;if("undefined"===typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=q(a)))return function(){return c>=a.length?{done:!0}:{done:!1,value:a[c++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}c=a[Symbol.iterator]();return c.next.bind(c)}function v(a,c){if(!a){"undefined"!==typeof console&&console.warn(c);try{throw Error(c);}catch(b){}}}
function w(a){var c=a.children,b=a.timeoutMs;b=void 0===b?5E3:b;var d=a.window;a=useRef();null==a.current&&(a.current=createBrowserHistory({window:d}));b=unstable_useTransition({timeoutMs:b});var f=b[0];b=b[1];var e=a.current;a=useReducer(function(a,b){return b},{action:e.action,location:e.location});d=a[0];var g=a[1];useLayoutEffect(function(){return e.listen(function(a){f(function(){g(a)})})},[e,f]);return createElement(Router,{children:c,action:d.action,location:d.location,navigator:e,pending:b})}
"production"!==process.env.NODE_ENV&&(w.displayName="BrowserRouter",w.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object});
function x(a){var c=a.children,b=a.timeoutMs;b=void 0===b?5E3:b;var d=a.window;a=useRef();null==a.current&&(a.current=createHashHistory({window:d}));b=unstable_useTransition({timeoutMs:b});var f=b[0];b=b[1];var e=a.current;a=useReducer(function(a,b){return b},{action:e.action,location:e.location});d=a[0];var g=a[1];useLayoutEffect(function(){return e.listen(function(a){f(function(){g(a)})})},[e,f]);return createElement(Router,{children:c,action:d.action,location:d.location,navigator:e,pending:b})}
"production"!==process.env.NODE_ENV&&(x.displayName="HashRouter",x.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object});
var y=forwardRef(function(a,c){var b=a.onClick,d=a.replace,f=void 0===d?!1:d,e=a.state,g=a.target,m=a.to;a=p(a,["onClick","replace","state","target","to"]);d=useHref(m);var k=useNavigate(),u=useLocation(),h=useResolvedLocation(m);return createElement("a",Object.assign({},a,{href:d,onClick:function(a){b&&b(a);a.defaultPrevented||0!==a.button||g&&"_self"!==g||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),a=!!f||createPath(u)===createPath(h),k(m,{replace:a,state:e}))},ref:c,target:g}))});
"production"!==process.env.NODE_ENV&&(y.displayName="Link",y.propTypes={onClick:PropTypes.func,replace:PropTypes.bool,state:PropTypes.object,target:PropTypes.string,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired});
var z=forwardRef(function(a,c){var b=a["aria-current"],d=void 0===b?"page":b;b=a.activeClassName;var f=void 0===b?"active":b;b=a.activeStyle;var e=a.caseSensitive,g=void 0===e?!1:e;e=a.className;var m=void 0===e?"":e;e=a.end;var k=void 0===e?!1:e,u=a.style;e=a.to;a=p(a,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var h=useLocation(),l=useResolvedLocation(e);h=h.pathname;l=l.pathname;g||(h=h.toLowerCase(),l=l.toLowerCase());d=(g=k?h===l:h.startsWith(l))?
d:void 0;f=[m,g?f:null].filter(Boolean).join(" ");b=n({},u,{},g?b:null);return createElement(y,Object.assign({},a,{"aria-current":d,className:f,ref:c,style:b,to:e}))});
"production"!==process.env.NODE_ENV&&(z.displayName="NavLink",z.propTypes=n({},y.propTypes,{"aria-current":PropTypes.oneOf("page step location date time true".split(" ")),activeClassName:PropTypes.string,activeStyle:PropTypes.object,className:PropTypes.string,style:PropTypes.object,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired}));function A(a){B(a.message,a.when);return null}
"production"!==process.env.NODE_ENV&&(A.displayName="Prompt",A.propTypes={message:PropTypes.string,when:PropTypes.bool});function B(a,c){void 0===c&&(c=!0);var b=useCallback(function(b){window.confirm(a)&&b.retry()},[a]);useBlocker(b,c)}function C(a){void 0===a&&(a="");return new URLSearchParams("string"===typeof a||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce(function(c,b){var d=a[b];return c.concat(Array.isArray(d)?d.map(function(a){return[b,a]}):[[b,d]])},[]))}
/**
* React Router DOM v0.0.0-experimental-compat.1
*
* 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
*/
import { useRef, useState, useLayoutEffect, createElement, forwardRef, useCallback, useMemo } from 'react';
import { createBrowserHistory, createHashHistory } from 'history';
import { Router, useHref, createPath, useLocation, useResolvedPath, useNavigate } from 'react-router';
export { MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createPath, createRoutesFromChildren, generatePath, matchPath, matchRoutes, parsePath, renderMatches, resolvePath, useHref, useInRouterContext, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes } from 'react-router';
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
function useSearchParams(a){"production"!==process.env.NODE_ENV?v("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\n\nIf you're unsure how to load polyfills, we recommend you check out https://polyfill.io/v3/ which provides some recommendations about how to load polyfills only for users that need them, instead of for every user."):void 0;
var c=useRef(C(a)),b=useLocation();a=useMemo(function(){function a(){var a=k.value;d.has(a)||c.current.getAll(a).forEach(function(b){d.append(a,b)})}for(var d=C(b.search),f=t(c.current.keys()),k;!(k=f()).done;)a();return d},[b.search]);var d=useNavigate(),f=useCallback(function(a,b){d("?"+C(a),b)},[d]);return[a,f]};export{w as BrowserRouter,x as HashRouter,y as Link,z as NavLink,A as Prompt,C as createSearchParams,B as usePrompt,useSearchParams}
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
const _excluded = ["onClick", "reloadDocument", "replace", "state", "target", "to"],
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"];
function warning(cond, message) {
if (!cond) {
// eslint-disable-next-line no-console
if (typeof console !== "undefined") console.warn(message);
try {
// Welcome to debugging React Router!
//
// This error is thrown as a convenience so you can more easily
// find the source for a warning that appears in the console by
// enabling "pause on exceptions" in your JavaScript debugger.
throw new Error(message); // eslint-disable-next-line no-empty
} catch (e) {}
}
} ////////////////////////////////////////////////////////////////////////////////
// COMPONENTS
////////////////////////////////////////////////////////////////////////////////
/**
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
*/
function BrowserRouter(_ref) {
let {
basename,
children,
window
} = _ref;
let historyRef = useRef();
if (historyRef.current == null) {
historyRef.current = createBrowserHistory({
window
});
}
let history = historyRef.current;
let [state, setState] = useState({
action: history.action,
location: history.location
});
useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/createElement(Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
/**
* A `<Router>` for use in web browsers. Stores the location in the hash
* portion of the URL so it is not sent to the server.
*/
function HashRouter(_ref2) {
let {
basename,
children,
window
} = _ref2;
let historyRef = useRef();
if (historyRef.current == null) {
historyRef.current = createHashHistory({
window
});
}
let history = historyRef.current;
let [state, setState] = useState({
action: history.action,
location: history.location
});
useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/createElement(Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
/**
* A `<Router>` that accepts a pre-instantiated history object. It's important
* to note that using your own history object is highly discouraged and may add
* two versions of the history library to your bundles unless you use the same
* version of the history library that React Router uses internally.
*/
function HistoryRouter(_ref3) {
let {
basename,
children,
history
} = _ref3;
const [state, setState] = useState({
action: history.action,
location: history.location
});
useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/createElement(Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
if (process.env.NODE_ENV !== "production") {
HistoryRouter.displayName = "unstable_HistoryRouter";
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
/**
* The public API for rendering a history-aware <a>.
*/
const Link = /*#__PURE__*/forwardRef(function LinkWithRef(_ref4, ref) {
let {
onClick,
reloadDocument,
replace = false,
state,
target,
to
} = _ref4,
rest = _objectWithoutPropertiesLoose(_ref4, _excluded);
let href = useHref(to);
let internalOnClick = useLinkClickHandler(to, {
replace,
state,
target
});
function handleClick(event) {
if (onClick) onClick(event);
if (!event.defaultPrevented && !reloadDocument) {
internalOnClick(event);
}
}
return (
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/anchor-has-content
createElement("a", _extends({}, rest, {
href: href,
onClick: handleClick,
ref: ref,
target: target
}))
);
});
if (process.env.NODE_ENV !== "production") {
Link.displayName = "Link";
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
const NavLink = /*#__PURE__*/forwardRef(function NavLinkWithRef(_ref5, ref) {
let {
"aria-current": ariaCurrentProp = "page",
caseSensitive = false,
className: classNameProp = "",
end = false,
style: styleProp,
to,
children
} = _ref5,
rest = _objectWithoutPropertiesLoose(_ref5, _excluded2);
let location = useLocation();
let path = useResolvedPath(to);
let locationPathname = location.pathname;
let toPathname = path.pathname;
if (!caseSensitive) {
locationPathname = locationPathname.toLowerCase();
toPathname = toPathname.toLowerCase();
}
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === "/";
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
let className;
if (typeof classNameProp === "function") {
className = classNameProp({
isActive
});
} else {
// If the className prop is not a function, we use a default `active`
// class for <NavLink />s that are active. In v5 `active` was the default
// value for `activeClassName`, but we are removing that API and can still
// use the old default behavior for a cleaner upgrade path and keep the
// simple styling rules working as they currently do.
className = [classNameProp, isActive ? "active" : null].filter(Boolean).join(" ");
}
let style = typeof styleProp === "function" ? styleProp({
isActive
}) : styleProp;
return /*#__PURE__*/createElement(Link, _extends({}, rest, {
"aria-current": ariaCurrent,
className: className,
ref: ref,
style: style,
to: to
}), typeof children === "function" ? children({
isActive
}) : children);
});
if (process.env.NODE_ENV !== "production") {
NavLink.displayName = "NavLink";
} ////////////////////////////////////////////////////////////////////////////////
// HOOKS
////////////////////////////////////////////////////////////////////////////////
/**
* Handles the click behavior for router `<Link>` components. This is useful if
* you need to create custom `<Link>` components with the same click behavior we
* use in our exported `<Link>`.
*/
function useLinkClickHandler(to, _temp) {
let {
target,
replace: replaceProp,
state
} = _temp === void 0 ? {} : _temp;
let navigate = useNavigate();
let location = useLocation();
let path = useResolvedPath(to);
return useCallback(event => {
if (event.button === 0 && ( // Ignore everything but left clicks
!target || target === "_self") && // Let browser handle "target=_blank" etc.
!isModifiedEvent(event) // Ignore clicks with modifier keys
) {
event.preventDefault(); // If the URL hasn't changed, a regular <a> will do a replace instead of
// a push, so do the same here.
let replace = !!replaceProp || createPath(location) === createPath(path);
navigate(to, {
replace,
state
});
}
}, [location, navigate, path, replaceProp, state, target, to]);
}
/**
* A convenient wrapper for reading and writing search parameters via the
* URLSearchParams interface.
*/
function useSearchParams(defaultInit) {
process.env.NODE_ENV !== "production" ? warning(typeof URLSearchParams !== "undefined", "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\n\n" + "If you're unsure how to load polyfills, we recommend you check out " + "https://polyfill.io/v3/ which provides some recommendations about how " + "to load polyfills only for users that need them, instead of for every " + "user.") : void 0;
let defaultSearchParamsRef = useRef(createSearchParams(defaultInit));
let location = useLocation();
let searchParams = useMemo(() => {
let searchParams = createSearchParams(location.search);
for (let key of defaultSearchParamsRef.current.keys()) {
if (!searchParams.has(key)) {
defaultSearchParamsRef.current.getAll(key).forEach(value => {
searchParams.append(key, value);
});
}
}
return searchParams;
}, [location.search]);
let navigate = useNavigate();
let setSearchParams = useCallback((nextInit, navigateOptions) => {
navigate("?" + createSearchParams(nextInit), navigateOptions);
}, [navigate]);
return [searchParams, setSearchParams];
}
/**
* Creates a URLSearchParams object using the given initializer.
*
* This is identical to `new URLSearchParams(init)` except it also
* supports arrays as values in the object form of the initializer
* instead of just strings. This is convenient when you need multiple
* values for a given key, but don't want to use an array initializer.
*
* For example, instead of:
*
* let searchParams = new URLSearchParams([
* ['sort', 'name'],
* ['sort', 'price']
* ]);
*
* you can do:
*
* let searchParams = createSearchParams({
* sort: ['name', 'price']
* });
*/
function createSearchParams(init) {
if (init === void 0) {
init = "";
}
return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {
let value = init[key];
return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);
}, []));
}
export { BrowserRouter, HashRouter, Link, NavLink, createSearchParams, HistoryRouter as unstable_HistoryRouter, useLinkClickHandler, useSearchParams };
//# sourceMappingURL=index.js.map

@@ -1,1 +0,19 @@

'use strict';module.exports="production"===process.env.NODE_ENV?require("./umd/react-router-dom.production.min.js"):require("./umd/react-router-dom.development.js");
/**
* React Router DOM v0.0.0-experimental-compat.1
*
* 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
*/
'use strict';
/* eslint-env node */
if (process.env.NODE_ENV === "production") {
module.exports = require("./umd/react-router-dom.production.min.js");
} else {
module.exports = require("./umd/react-router-dom.development.js");
}

27

package.json
{
"name": "react-router-dom",
"version": "0.0.0-experimental-b1ff171f",
"author": "React Training <hello@reacttraining.com>",
"version": "0.0.0-experimental-compat.1",
"author": "Remix Software <hello@remix.run>",
"description": "Declarative routing for React web applications",
"repository": "ReactTraining/react-router",
"repository": {
"type": "git",
"url": "https://github.com/remix-run/react-router.git",
"directory": "packages/react-router-dom"
},
"license": "MIT",
"main": "main.js",
"module": "index.js",
"types": "index.d.ts",
"unpkg": "umd/react-router-dom.production.min.js",
"main": "./main.js",
"module": "./index.js",
"types": "./index.d.ts",
"unpkg": "./umd/react-router-dom.production.min.js",
"dependencies": {
"history": "5.0.0-beta.9",
"prop-types": "^15.7.2"
"react-router": "0.0.0-experimental-compat.1",
"history": "^5.2.0"
},
"peerDependencies": {
"react": "0.0.0-experimental-33c3af284",
"react-dom": "0.0.0-experimental-33c3af284",
"react-router": "0.0.0-experimental-b1ff171f"
"react": ">=16.8",
"react-dom": ">=16.8"
},

@@ -21,0 +24,0 @@ "sideEffects": false,

@@ -1,14 +0,327 @@

import{Router,useHref,useNavigate,useLocation,useResolvedLocation,useBlocker}from'react-router';import{createBrowserHistory,createHashHistory,createPath}from'history';import PropTypes from'prop-types';import{useRef,unstable_useTransition,useReducer,useLayoutEffect,createElement,forwardRef,useCallback,useMemo}from'react';export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolveLocation,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedLocation,useRoutes}from'react-router';function n(a,d){if(!a){"undefined"!==typeof console&&console.warn(d);try{throw Error(d);}catch(e){}}}
function p({children:a,timeoutMs:d=5E3,window:e}){let c=useRef();null==c.current&&(c.current=createBrowserHistory({window:e}));let [f,k]=unstable_useTransition({timeoutMs:d}),b=c.current,[g,l]=useReducer((a,c)=>c,{action:b.action,location:b.location});useLayoutEffect(()=>b.listen(a=>{f(()=>{l(a)})}),[b,f]);return createElement(Router,{children:a,action:g.action,location:g.location,navigator:b,pending:k})}p.displayName="BrowserRouter";
p.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object};function q({children:a,timeoutMs:d=5E3,window:e}){let c=useRef();null==c.current&&(c.current=createHashHistory({window:e}));let [f,k]=unstable_useTransition({timeoutMs:d}),b=c.current,[g,l]=useReducer((a,c)=>c,{action:b.action,location:b.location});useLayoutEffect(()=>b.listen(a=>{f(()=>{l(a)})}),[b,f]);return createElement(Router,{children:a,action:g.action,location:g.location,navigator:b,pending:k})}
q.displayName="HashRouter";q.propTypes={children:PropTypes.node,timeoutMs:PropTypes.number,window:PropTypes.object};
let t=forwardRef(function({onClick:a,replace:d=!1,state:e,target:c,to:f,...k},b){let g=useHref(f),l=useNavigate(),r=useLocation(),h=useResolvedLocation(f);return createElement("a",Object.assign({},k,{href:g,onClick:function(b){a&&a(b);b.defaultPrevented||0!==b.button||c&&"_self"!==c||b.metaKey||b.altKey||b.ctrlKey||b.shiftKey||(b.preventDefault(),b=!!d||createPath(r)===createPath(h),l(f,{replace:b,state:e}))},ref:b,target:c}))});t.displayName="Link";
t.propTypes={onClick:PropTypes.func,replace:PropTypes.bool,state:PropTypes.object,target:PropTypes.string,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired};
let u=forwardRef(function({"aria-current":a="page",activeClassName:d="active",activeStyle:e,caseSensitive:c=!1,className:f="",end:k=!1,style:b,to:g,...l},r){var h=useLocation(),m=useResolvedLocation(g);h=h.pathname;m=m.pathname;c||(h=h.toLowerCase(),m=m.toLowerCase());a=(c=k?h===m:h.startsWith(m))?a:void 0;d=[f,c?d:null].filter(Boolean).join(" ");return createElement(t,Object.assign({},l,{"aria-current":a,className:d,ref:r,style:{...b,...c?e:null},to:g}))});u.displayName="NavLink";
u.propTypes={...t.propTypes,"aria-current":PropTypes.oneOf("page step location date time true".split(" ")),activeClassName:PropTypes.string,activeStyle:PropTypes.object,className:PropTypes.string,style:PropTypes.object,to:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string})]).isRequired};function v({message:a,when:d}){w(a,d);return null}v.displayName="Prompt";v.propTypes={message:PropTypes.string,when:PropTypes.bool};
function w(a,d=!0){let e=useCallback(c=>{window.confirm(a)&&c.retry()},[a]);useBlocker(e,d)}function x(a=""){return new URLSearchParams("string"===typeof a||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce((d,e)=>{let c=a[e];return d.concat(Array.isArray(c)?c.map(a=>[e,a]):[[e,c]])},[]))}
/**
* React Router DOM v0.0.0-experimental-compat.1
*
* 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
*/
import { useRef, useState, useLayoutEffect, createElement, forwardRef, useCallback, useMemo } from 'react';
import { createBrowserHistory, createHashHistory } from 'history';
import { Router, useHref, createPath, useLocation, useResolvedPath, useNavigate } from 'react-router';
export { MemoryRouter, Navigate, NavigationType, Outlet, Route, Router, Routes, UNSAFE_LocationContext, UNSAFE_NavigationContext, UNSAFE_RouteContext, createPath, createRoutesFromChildren, generatePath, matchPath, matchRoutes, parsePath, renderMatches, resolvePath, useHref, useInRouterContext, useLocation, useMatch, useNavigate, useNavigationType, useOutlet, useOutletContext, useParams, useResolvedPath, useRoutes } from 'react-router';
/**
* NOTE: If you refactor this to split up the modules into separate files,
* you'll need to update the rollup config for react-router-dom-v5-compat.
*/
function useSearchParams(a){n("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\n\nIf you're unsure how to load polyfills, we recommend you check out https://polyfill.io/v3/ which provides some recommendations about how to load polyfills only for users that need them, instead of for every user.");let d=
useRef(x(a)),e=useLocation();a=useMemo(()=>{let a=x(e.search);for(let b of d.current.keys())a.has(b)||d.current.getAll(b).forEach(c=>{a.append(b,c)});return a},[e.search]);let c=useNavigate(),f=useCallback((a,b)=>{c("?"+x(a),b)},[c]);return[a,f]};export{p as BrowserRouter,q as HashRouter,t as Link,u as NavLink,v as Prompt,x as createSearchParams,w as usePrompt,useSearchParams}
function warning(cond, message) {
if (!cond) {
// eslint-disable-next-line no-console
if (typeof console !== "undefined") console.warn(message);
try {
// Welcome to debugging React Router!
//
// This error is thrown as a convenience so you can more easily
// find the source for a warning that appears in the console by
// enabling "pause on exceptions" in your JavaScript debugger.
throw new Error(message); // eslint-disable-next-line no-empty
} catch (e) {}
}
} ////////////////////////////////////////////////////////////////////////////////
// COMPONENTS
////////////////////////////////////////////////////////////////////////////////
/**
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
*/
function BrowserRouter({
basename,
children,
window
}) {
let historyRef = useRef();
if (historyRef.current == null) {
historyRef.current = createBrowserHistory({
window
});
}
let history = historyRef.current;
let [state, setState] = useState({
action: history.action,
location: history.location
});
useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/createElement(Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
/**
* A `<Router>` for use in web browsers. Stores the location in the hash
* portion of the URL so it is not sent to the server.
*/
function HashRouter({
basename,
children,
window
}) {
let historyRef = useRef();
if (historyRef.current == null) {
historyRef.current = createHashHistory({
window
});
}
let history = historyRef.current;
let [state, setState] = useState({
action: history.action,
location: history.location
});
useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/createElement(Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
/**
* A `<Router>` that accepts a pre-instantiated history object. It's important
* to note that using your own history object is highly discouraged and may add
* two versions of the history library to your bundles unless you use the same
* version of the history library that React Router uses internally.
*/
function HistoryRouter({
basename,
children,
history
}) {
const [state, setState] = useState({
action: history.action,
location: history.location
});
useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/createElement(Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
{
HistoryRouter.displayName = "unstable_HistoryRouter";
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
/**
* The public API for rendering a history-aware <a>.
*/
const Link = /*#__PURE__*/forwardRef(function LinkWithRef({
onClick,
reloadDocument,
replace = false,
state,
target,
to,
...rest
}, ref) {
let href = useHref(to);
let internalOnClick = useLinkClickHandler(to, {
replace,
state,
target
});
function handleClick(event) {
if (onClick) onClick(event);
if (!event.defaultPrevented && !reloadDocument) {
internalOnClick(event);
}
}
return (
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/anchor-has-content
createElement("a", Object.assign({}, rest, {
href: href,
onClick: handleClick,
ref: ref,
target: target
}))
);
});
{
Link.displayName = "Link";
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
const NavLink = /*#__PURE__*/forwardRef(function NavLinkWithRef({
"aria-current": ariaCurrentProp = "page",
caseSensitive = false,
className: classNameProp = "",
end = false,
style: styleProp,
to,
children,
...rest
}, ref) {
let location = useLocation();
let path = useResolvedPath(to);
let locationPathname = location.pathname;
let toPathname = path.pathname;
if (!caseSensitive) {
locationPathname = locationPathname.toLowerCase();
toPathname = toPathname.toLowerCase();
}
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === "/";
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
let className;
if (typeof classNameProp === "function") {
className = classNameProp({
isActive
});
} else {
// If the className prop is not a function, we use a default `active`
// class for <NavLink />s that are active. In v5 `active` was the default
// value for `activeClassName`, but we are removing that API and can still
// use the old default behavior for a cleaner upgrade path and keep the
// simple styling rules working as they currently do.
className = [classNameProp, isActive ? "active" : null].filter(Boolean).join(" ");
}
let style = typeof styleProp === "function" ? styleProp({
isActive
}) : styleProp;
return /*#__PURE__*/createElement(Link, Object.assign({}, rest, {
"aria-current": ariaCurrent,
className: className,
ref: ref,
style: style,
to: to
}), typeof children === "function" ? children({
isActive
}) : children);
});
{
NavLink.displayName = "NavLink";
} ////////////////////////////////////////////////////////////////////////////////
// HOOKS
////////////////////////////////////////////////////////////////////////////////
/**
* Handles the click behavior for router `<Link>` components. This is useful if
* you need to create custom `<Link>` components with the same click behavior we
* use in our exported `<Link>`.
*/
function useLinkClickHandler(to, {
target,
replace: replaceProp,
state
} = {}) {
let navigate = useNavigate();
let location = useLocation();
let path = useResolvedPath(to);
return useCallback(event => {
if (event.button === 0 && ( // Ignore everything but left clicks
!target || target === "_self") && // Let browser handle "target=_blank" etc.
!isModifiedEvent(event) // Ignore clicks with modifier keys
) {
event.preventDefault(); // If the URL hasn't changed, a regular <a> will do a replace instead of
// a push, so do the same here.
let replace = !!replaceProp || createPath(location) === createPath(path);
navigate(to, {
replace,
state
});
}
}, [location, navigate, path, replaceProp, state, target, to]);
}
/**
* A convenient wrapper for reading and writing search parameters via the
* URLSearchParams interface.
*/
function useSearchParams(defaultInit) {
warning(typeof URLSearchParams !== "undefined", `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\n\n` + `If you're unsure how to load polyfills, we recommend you check out ` + `https://polyfill.io/v3/ which provides some recommendations about how ` + `to load polyfills only for users that need them, instead of for every ` + `user.`) ;
let defaultSearchParamsRef = useRef(createSearchParams(defaultInit));
let location = useLocation();
let searchParams = useMemo(() => {
let searchParams = createSearchParams(location.search);
for (let key of defaultSearchParamsRef.current.keys()) {
if (!searchParams.has(key)) {
defaultSearchParamsRef.current.getAll(key).forEach(value => {
searchParams.append(key, value);
});
}
}
return searchParams;
}, [location.search]);
let navigate = useNavigate();
let setSearchParams = useCallback((nextInit, navigateOptions) => {
navigate("?" + createSearchParams(nextInit), navigateOptions);
}, [navigate]);
return [searchParams, setSearchParams];
}
/**
* Creates a URLSearchParams object using the given initializer.
*
* This is identical to `new URLSearchParams(init)` except it also
* supports arrays as values in the object form of the initializer
* instead of just strings. This is convenient when you need multiple
* values for a given key, but don't want to use an array initializer.
*
* For example, instead of:
*
* let searchParams = new URLSearchParams([
* ['sort', 'name'],
* ['sort', 'price']
* ]);
*
* you can do:
*
* let searchParams = createSearchParams({
* sort: ['name', 'price']
* });
*/
function createSearchParams(init = "") {
return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {
let value = init[key];
return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);
}, []));
}
export { BrowserRouter, HashRouter, Link, NavLink, createSearchParams, HistoryRouter as unstable_HistoryRouter, useLinkClickHandler, useSearchParams };
//# sourceMappingURL=react-router-dom.development.js.map

@@ -1,2 +0,12 @@

import{Router as e,useHref as t,useNavigate as r,useLocation as n,useResolvedLocation as a,useBlocker as o}from"react-router";import{createBrowserHistory as i,createHashHistory as c,createPath as s}from"history";import{useRef as u,unstable_useTransition as l,useReducer as m,useLayoutEffect as f,createElement as h,forwardRef as d,useCallback as p,useMemo as y}from"react";export{MemoryRouter,Navigate,Outlet,Route,Router,Routes,createRoutesFromArray,createRoutesFromChildren,generatePath,matchPath,matchRoutes,resolveLocation,useBlocker,useHref,useInRouterContext,useLocation,useLocationPending,useMatch,useNavigate,useOutlet,useParams,useResolvedLocation,useRoutes}from"react-router";let g=d((function({onClick:e,replace:o=!1,state:i,target:c,to:u,...l},m){let f=t(u),d=r(),p=n(),y=a(u);return h("a",Object.assign({},l,{href:f,onClick:function(t){e&&e(t),t.defaultPrevented||0!==t.button||c&&"_self"!==c||t.metaKey||t.altKey||t.ctrlKey||t.shiftKey||(t.preventDefault(),t=!!o||s(p)===s(y),d(u,{replace:t,state:i}))},ref:m,target:c}))})),v=d((function({"aria-current":e="page",activeClassName:t="active",activeStyle:r,caseSensitive:o=!1,className:i="",end:c=!1,style:s,to:u,...l},m){var f=n(),d=a(u);return f=f.pathname,d=d.pathname,o||(f=f.toLowerCase(),d=d.toLowerCase()),e=(o=c?f===d:f.startsWith(d))?e:void 0,t=[i,o?t:null].filter(Boolean).join(" "),h(g,Object.assign({},l,{"aria-current":e,className:t,ref:m,style:{...s,...o?r:null},to:u}))}));function w(e,t=!0){let r=p(t=>{window.confirm(e)&&t.retry()},[e]);o(r,t)}function R(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]])},[]))}function L({children:t,timeoutMs:r=5e3,window:n}){let a=u();null==a.current&&(a.current=i({window:n}));let[o,c]=l({timeoutMs:r}),s=a.current,[d,p]=m((e,t)=>t,{action:s.action,location:s.location});return f(()=>s.listen(e=>{o(()=>{p(e)})}),[s,o]),h(e,{children:t,action:d.action,location:d.location,navigator:s,pending:c})}function P({children:t,timeoutMs:r=5e3,window:n}){let a=u();null==a.current&&(a.current=c({window:n}));let[o,i]=l({timeoutMs:r}),s=a.current,[d,p]=m((e,t)=>t,{action:s.action,location:s.location});return f(()=>s.listen(e=>{o(()=>{p(e)})}),[s,o]),h(e,{children:t,action:d.action,location:d.location,navigator:s,pending:i})}function k({message:e,when:t}){return w(e,t),null}function C(e){let t=u(R(e)),a=n();e=y(()=>{let e=R(a.search);for(let r of t.current.keys())e.has(r)||t.current.getAll(r).forEach(t=>{e.append(r,t)});return e},[a.search]);let o=r();return[e,p((e,t)=>{o("?"+R(e),t)},[o])]}export{L as BrowserRouter,P as HashRouter,g as Link,v as NavLink,k as Prompt,R as createSearchParams,w as usePrompt,C as useSearchParams};
/**
* React Router DOM v0.0.0-experimental-compat.1
*
* 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
*/
import{useRef as t,useState as e,useLayoutEffect as n,createElement as a,forwardRef as r,useCallback as o,useMemo as i}from"react";import{createBrowserHistory as c,createHashHistory as s}from"history";import{Router as l,useHref as u,createPath as f,useLocation as h,useResolvedPath as m,useNavigate as p}from"react-router";export{MemoryRouter,Navigate,NavigationType,Outlet,Route,Router,Routes,UNSAFE_LocationContext,UNSAFE_NavigationContext,UNSAFE_RouteContext,createPath,createRoutesFromChildren,generatePath,matchPath,matchRoutes,parsePath,renderMatches,resolvePath,useHref,useInRouterContext,useLocation,useMatch,useNavigate,useNavigationType,useOutlet,useOutletContext,useParams,useResolvedPath,useRoutes}from"react-router";function y({basename:r,children:o,window:i}){let s=t();null==s.current&&(s.current=c({window:i}));let u=s.current,[f,h]=e({action:u.action,location:u.location});return n((()=>u.listen(h)),[u]),a(l,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:u})}function g({basename:r,children:o,window:i}){let c=t();null==c.current&&(c.current=s({window:i}));let u=c.current,[f,h]=e({action:u.action,location:u.location});return n((()=>u.listen(h)),[u]),a(l,{basename:r,children:o,location:f.location,navigationType:f.action,navigator:u})}function d({basename:t,children:r,history:o}){const[i,c]=e({action:o.action,location:o.location});return n((()=>o.listen(c)),[o]),a(l,{basename:t,children:r,location:i.location,navigationType:i.action,navigator:o})}const v=r((function({onClick:t,reloadDocument:e,replace:n=!1,state:r,target:o,to:i,...c},s){let l=u(i),f=A(i,{replace:n,state:r,target:o});return a("a",Object.assign({},c,{href:l,onClick:function(n){t&&t(n),n.defaultPrevented||e||f(n)},ref:s,target:o}))})),R=r((function({"aria-current":t="page",caseSensitive:e=!1,className:n="",end:r=!1,style:o,to:i,children:c,...s},l){let u=h(),f=m(i),p=u.pathname,y=f.pathname;e||(p=p.toLowerCase(),y=y.toLowerCase());let g,d=p===y||!r&&p.startsWith(y)&&"/"===p.charAt(y.length),R=d?t:void 0;g="function"==typeof n?n({isActive:d}):[n,d?"active":null].filter(Boolean).join(" ");let A="function"==typeof o?o({isActive:d}):o;return a(v,Object.assign({},s,{"aria-current":R,className:g,ref:l,style:A,to:i}),"function"==typeof c?c({isActive:d}):c)}));function A(t,{target:e,replace:n,state:a}={}){let r=p(),i=h(),c=m(t);return o((o=>{if(!(0!==o.button||e&&"_self"!==e||function(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}(o))){o.preventDefault();let e=!!n||f(i)===f(c);r(t,{replace:e,state:a})}}),[i,r,c,n,a,e,t])}function b(e){let n=t(w(e)),a=h(),r=i((()=>{let t=w(a.search);for(let e of n.current.keys())t.has(e)||n.current.getAll(e).forEach((n=>{t.append(e,n)}));return t}),[a.search]),c=p();return[r,o(((t,e)=>{c("?"+w(t),e)}),[c])]}function w(t=""){return new URLSearchParams("string"==typeof t||Array.isArray(t)||t instanceof URLSearchParams?t:Object.keys(t).reduce(((e,n)=>{let a=t[n];return e.concat(Array.isArray(a)?a.map((t=>[n,t])):[[n,a]])}),[]))}export{y as BrowserRouter,g as HashRouter,v as Link,R as NavLink,w as createSearchParams,d as unstable_HistoryRouter,A as useLinkClickHandler,b as useSearchParams};
//# sourceMappingURL=react-router-dom.production.min.js.map
# React Router DOM
The `react-router-dom` package contains bindings for using [React
Router](https://github.com/ReactTraining/react-router) in web applications.
Please see [the main
README](https://github.com/ReactTraining/react-router/README.md) for more
information on how to get started with React Router.
Router](https://github.com/remix-run/react-router) in web applications.
Please see [the Getting Started guide](https://github.com/remix-run/react-router/blob/main/docs/getting-started/tutorial.md) for more information on how to get started with React Router.

@@ -1,5 +0,66 @@

'use strict';Object.defineProperty(exports,"__esModule",{value:!0});var React=require("react"),PropTypes=require("prop-types"),history=require("history"),reactRouterDom=require("react-router-dom");
function StaticRouter({children:c,location:b="/"}){"string"===typeof b&&(b=history.parsePath(b));return React.createElement(reactRouterDom.Router,{children:c,action:history.Action.Pop,location:{pathname:b.pathname||"/",search:b.search||"",hash:b.hash||"",state:b.state||null,key:b.key||"default"},navigator:{createHref(a){return"string"===typeof a?a:history.createPath(a)},push(a){throw Error("You cannot use navigator.push() on the server because it is a stateless environment. This error was probably triggered when you did a "+
`\`navigate(${JSON.stringify(a)})\` somewhere in your app.`);},replace(a){throw Error("You cannot use navigator.replace() on the server because it is a stateless environment. This error was probably triggered when you did a "+`\`navigate(${JSON.stringify(a)}, { replace: true })\` somewhere `+"in your app.");},go(a){throw Error(`You cannot use navigator.go(${a}) on the server because it is a stateless`+"environment. This error was probably triggered when you did a "+`\`navigate(${a})\` somewhere in your app.`);
},back(){throw Error("You cannot use navigator.back() on the server because it is a stateless environment.");},forward(){throw Error("You cannot use navigator.forward() on the server because it is a stateless environment.");},block(){throw Error("You cannot use navigator.block() on the server because it is a stateless environment.");}},static:!0})}
"production"!==process.env.NODE_ENV&&(StaticRouter.displayName="StaticRouter",StaticRouter.propTypes={children:PropTypes.node,location:PropTypes.oneOfType([PropTypes.string,PropTypes.shape({pathname:PropTypes.string,search:PropTypes.string,hash:PropTypes.string,state:PropTypes.object,key:PropTypes.string})])});exports.StaticRouter=StaticRouter;
'use strict';
Object.defineProperty(exports, '__esModule', { value: true });
var React = require('react');
var history = require('history');
var reactRouterDom = require('react-router-dom');
/**
* A <Router> that may not transition to any other location. This is useful
* on the server where there is no stateful UI.
*/
function StaticRouter({
basename,
children,
location: locationProp = "/"
}) {
if (typeof locationProp === "string") {
locationProp = history.parsePath(locationProp);
}
let action = history.Action.Pop;
let location = {
pathname: locationProp.pathname || "/",
search: locationProp.search || "",
hash: locationProp.hash || "",
state: locationProp.state || null,
key: locationProp.key || "default"
};
let staticNavigator = {
createHref(to) {
return typeof to === "string" ? to : history.createPath(to);
},
push(to) {
throw new Error(`You cannot use navigator.push() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)})\` somewhere in your app.`);
},
replace(to) {
throw new Error(`You cannot use navigator.replace() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${JSON.stringify(to)}, { replace: true })\` somewhere ` + `in your app.`);
},
go(delta) {
throw new Error(`You cannot use navigator.go() on the server because it is a stateless ` + `environment. This error was probably triggered when you did a ` + `\`navigate(${delta})\` somewhere in your app.`);
},
back() {
throw new Error(`You cannot use navigator.back() on the server because it is a stateless ` + `environment.`);
},
forward() {
throw new Error(`You cannot use navigator.forward() on the server because it is a stateless ` + `environment.`);
}
};
return /*#__PURE__*/React.createElement(reactRouterDom.Router, {
basename: basename,
children: children,
location: location,
navigationType: action,
navigator: staticNavigator,
static: true
});
}
exports.StaticRouter = StaticRouter;

@@ -1,38 +0,556 @@

'use strict';(function(d,m){"object"===typeof exports&&"undefined"!==typeof module?m(exports,require("react"),require("history"),require("react-router")):"function"===typeof define&&define.amd?define(["exports","react","history","react-router"],m):(d=d||self,m(d.ReactRouterDOM={},d.React,d.HistoryLibrary,d.ReactRouter))})(this,function(d,m,x,k){function y(){y=Object.assign||function(a){for(var b=1;b<arguments.length;b++){var c=arguments[b],l;for(l in c)Object.prototype.hasOwnProperty.call(c,l)&&(a[l]=
c[l])}return a};return y.apply(this,arguments)}function M(a,b){if(null==a)return{};var c={},l=Object.keys(a),f;for(f=0;f<l.length;f++){var g=l[f];0<=b.indexOf(g)||(c[g]=a[g])}return c}function S(a,b){if(a){if("string"===typeof a)return N(a,b);var c=Object.prototype.toString.call(a).slice(8,-1);"Object"===c&&a.constructor&&(c=a.constructor.name);if("Map"===c||"Set"===c)return Array.from(c);if("Arguments"===c||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(c))return N(a,b)}}function N(a,b){if(null==
b||b>a.length)b=a.length;for(var c=0,l=Array(b);c<b;c++)l[c]=a[c];return l}function T(a){var b=0;if("undefined"===typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(a=S(a)))return function(){return b>=a.length?{done:!0}:{done:!1,value:a[b++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}b=a[Symbol.iterator]();return b.next.bind(b)}function E(a,b){return b={exports:{}},a(b,
b.exports),b.exports}function F(a,b,c,l,f){for(var g in a)if(U(a,g)){try{if("function"!==typeof a[g]){var d=Error((l||"React class")+": "+c+" type `"+g+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof a[g]+"`.");d.name="Invariant Violation";throw d;}var q=a[g](b,g,l,c,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(v){q=v}!q||q instanceof Error||G((l||"React class")+": type specification of "+c+" `"+g+"` is invalid; the type checker function must return `null` or an `Error` but returned a "+
typeof q+". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).");if(q instanceof Error&&!(q.message in H)){H[q.message]=!0;var k=f?f():"";G("Failed "+c+" type: "+q.message+(null!=k?k:""))}}}function z(){return null}function V(a,b){if(!a){"undefined"!==typeof console&&console.warn(b);try{throw Error(b);}catch(c){}}}function I(a){var b=a.children,c=a.timeoutMs;c=void 0===c?5E3:c;var l=a.window;
a=m.useRef();null==a.current&&(a.current=x.createBrowserHistory({window:l}));c=m.unstable_useTransition({timeoutMs:c});var f=c[0];c=c[1];var g=a.current;a=m.useReducer(function(a,c){return c},{action:g.action,location:g.location});l=a[0];var d=a[1];m.useLayoutEffect(function(){return g.listen(function(a){f(function(){d(a)})})},[g,f]);return m.createElement(k.Router,{children:b,action:l.action,location:l.location,navigator:g,pending:c})}function J(a){var b=a.children,c=a.timeoutMs;c=void 0===c?5E3:
c;var l=a.window;a=m.useRef();null==a.current&&(a.current=x.createHashHistory({window:l}));c=m.unstable_useTransition({timeoutMs:c});var f=c[0];c=c[1];var g=a.current;a=m.useReducer(function(a,c){return c},{action:g.action,location:g.location});l=a[0];var d=a[1];m.useLayoutEffect(function(){return g.listen(function(a){f(function(){d(a)})})},[g,f]);return m.createElement(k.Router,{children:b,action:l.action,location:l.location,navigator:g,pending:c})}function K(a){O(a.message,a.when);return null}function O(a,
b){void 0===b&&(b=!0);var c=m.useCallback(function(c){window.confirm(a)&&c.retry()},[a]);k.useBlocker(c,b)}function A(a){void 0===a&&(a="");return new URLSearchParams("string"===typeof a||Array.isArray(a)||a instanceof URLSearchParams?a:Object.keys(a).reduce(function(b,c){var l=a[c];return b.concat(Array.isArray(l)?l.map(function(a){return[c,a]}):[[c,l]])},[]))}var aa=E(function(a,b){(function(){function a(a){if("object"===typeof a&&null!==a){var b=a.$$typeof;switch(b){case g:switch(a=a.type,a){case e:case u:case k:case m:case h:case B:return a;
default:switch(a=a&&a.$$typeof,a){case n:case r:case C:case D:case p:return a;default:return b}}case d:return b}}}function l(e){return a(e)===u}var f="function"===typeof Symbol&&Symbol.for,g=f?Symbol.for("react.element"):60103,d=f?Symbol.for("react.portal"):60106,k=f?Symbol.for("react.fragment"):60107,h=f?Symbol.for("react.strict_mode"):60108,m=f?Symbol.for("react.profiler"):60114,p=f?Symbol.for("react.provider"):60109,n=f?Symbol.for("react.context"):60110,e=f?Symbol.for("react.async_mode"):60111,
u=f?Symbol.for("react.concurrent_mode"):60111,r=f?Symbol.for("react.forward_ref"):60112,B=f?Symbol.for("react.suspense"):60113,W=f?Symbol.for("react.suspense_list"):60120,D=f?Symbol.for("react.memo"):60115,C=f?Symbol.for("react.lazy"):60116,X=f?Symbol.for("react.block"):60121,Y=f?Symbol.for("react.fundamental"):60117,t=f?Symbol.for("react.responder"):60118,Z=f?Symbol.for("react.scope"):60119,P=!1;b.AsyncMode=e;b.ConcurrentMode=u;b.ContextConsumer=n;b.ContextProvider=p;b.Element=g;b.ForwardRef=r;b.Fragment=
k;b.Lazy=C;b.Memo=D;b.Portal=d;b.Profiler=m;b.StrictMode=h;b.Suspense=B;b.isAsyncMode=function(b){P||(P=!0,console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API."));return l(b)||a(b)===e};b.isConcurrentMode=l;b.isContextConsumer=function(e){return a(e)===n};b.isContextProvider=function(e){return a(e)===p};b.isElement=function(a){return"object"===typeof a&&null!==a&&
a.$$typeof===g};b.isForwardRef=function(e){return a(e)===r};b.isFragment=function(e){return a(e)===k};b.isLazy=function(e){return a(e)===C};b.isMemo=function(e){return a(e)===D};b.isPortal=function(e){return a(e)===d};b.isProfiler=function(e){return a(e)===m};b.isStrictMode=function(e){return a(e)===h};b.isSuspense=function(e){return a(e)===B};b.isValidElementType=function(a){return"string"===typeof a||"function"===typeof a||a===k||a===u||a===m||a===h||a===B||a===W||"object"===typeof a&&null!==a&&
(a.$$typeof===C||a.$$typeof===D||a.$$typeof===p||a.$$typeof===n||a.$$typeof===r||a.$$typeof===Y||a.$$typeof===t||a.$$typeof===Z||a.$$typeof===X)};b.typeOf=a})()}),Q=E(function(a){a.exports=aa}),R=Object.getOwnPropertySymbols,ba=Object.prototype.hasOwnProperty,ca=Object.prototype.propertyIsEnumerable,da=function(){try{if(!Object.assign)return!1;var a=new String("abc");a[5]="de";if("5"===Object.getOwnPropertyNames(a)[0])return!1;var b={};for(a=0;10>a;a++)b["_"+String.fromCharCode(a)]=a;if("0123456789"!==
Object.getOwnPropertyNames(b).map(function(a){return b[a]}).join(""))return!1;var c={};"abcdefghijklmnopqrst".split("").forEach(function(a){c[a]=a});return"abcdefghijklmnopqrst"!==Object.keys(Object.assign({},c)).join("")?!1:!0}catch(l){return!1}}()?Object.assign:function(a,b){if(null===a||void 0===a)throw new TypeError("Object.assign cannot be called with null or undefined");var c=Object(a);for(var l,f=1;f<arguments.length;f++){var g=Object(arguments[f]);for(var d in g)ba.call(g,d)&&(c[d]=g[d]);
if(R){l=R(g);for(var k=0;k<l.length;k++)ca.call(g,l[k])&&(c[l[k]]=g[l[k]])}}return c},G=function(){},H={},U=Function.call.bind(Object.prototype.hasOwnProperty);G=function(a){a="Warning: "+a;"undefined"!==typeof console&&console.error(a);try{throw Error(a);}catch(b){}};F.resetWarningCache=function(){H={}};var ea=Function.call.bind(Object.prototype.hasOwnProperty),t=function(){};t=function(a){a="Warning: "+a;"undefined"!==typeof console&&console.error(a);try{throw Error(a);}catch(b){}};var fa=function(a,
b){function c(a,b){return a===b?0!==a||1/a===1/b:a!==a&&b!==b}function l(a){this.message=a;this.stack=""}function f(a){function e(e,u,d,r,k,f,h){r=r||"<<anonymous>>";f=f||d;if("SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"!==h){if(b)throw e=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"),e.name="Invariant Violation",e;"undefined"!==typeof console&&(h=r+":"+d,!c[h]&&
3>g&&(t("You are manually calling a React.PropTypes validation function for the `"+f+"` prop on `"+r+"`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."),c[h]=!0,g++))}return null==u[d]?e?null===u[d]?new l("The "+k+" `"+f+"` is marked as required in `"+(r+"`, but its value is `null`.")):new l("The "+k+" `"+f+"` is marked as required in `"+
(r+"`, but its value is `undefined`.")):null:a(u,d,r,k,f)}var c={},g=0,d=e.bind(null,!1);d.isRequired=e.bind(null,!0);return d}function g(a){return f(function(e,b,c,d,g,f){e=e[b];return k(e)!==a?(e=h(e),new l("Invalid "+d+" `"+g+"` of type `"+(e+"` supplied to `"+c+"`, expected `")+(a+"`."))):null})}function d(e){switch(typeof e){case "number":case "string":case "undefined":return!0;case "boolean":return!e;case "object":if(Array.isArray(e))return e.every(d);if(null===e||a(e))return!0;var b=e&&(p&&
e[p]||e["@@iterator"]);var c="function"===typeof b?b:void 0;if(c)if(b=c.call(e),c!==e.entries)for(;!(e=b.next()).done;){if(!d(e.value))return!1}else for(;!(e=b.next()).done;){if((e=e.value)&&!d(e[1]))return!1}else return!1;return!0;default:return!1}}function k(a){var e=typeof a;return Array.isArray(a)?"array":a instanceof RegExp?"object":"symbol"===e||a&&("Symbol"===a["@@toStringTag"]||"function"===typeof Symbol&&a instanceof Symbol)?"symbol":e}function h(a){if("undefined"===typeof a||null===a)return""+
a;var e=k(a);if("object"===e){if(a instanceof Date)return"date";if(a instanceof RegExp)return"regexp"}return e}function m(a){a=h(a);switch(a){case "array":case "object":return"an "+a;case "boolean":case "date":case "regexp":return"a "+a;default:return a}}var p="function"===typeof Symbol&&Symbol.iterator,n={array:g("array"),bool:g("boolean"),func:g("function"),number:g("number"),object:g("object"),string:g("string"),symbol:g("symbol"),any:f(z),arrayOf:function(a){return f(function(b,e,c,d,g){if("function"!==
typeof a)return new l("Property `"+g+"` of component `"+c+"` has invalid PropType notation inside arrayOf.");b=b[e];if(!Array.isArray(b))return b=k(b),new l("Invalid "+d+" `"+g+"` of type `"+(b+"` supplied to `"+c+"`, expected an array."));for(e=0;e<b.length;e++){var f=a(b,e,c,d,g+"["+e+"]","SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");if(f instanceof Error)return f}return null})},element:function(){return f(function(b,c,d,g,f){b=b[c];return a(b)?null:(b=k(b),new l("Invalid "+g+" `"+f+"` of type `"+
(b+"` supplied to `"+d+"`, expected a single ReactElement.")))})}(),elementType:function(){return f(function(a,b,c,d,g){a=a[b];return Q.isValidElementType(a)?null:(a=k(a),new l("Invalid "+d+" `"+g+"` of type `"+(a+"` supplied to `"+c+"`, expected a single ReactElement type.")))})}(),instanceOf:function(a){return f(function(b,c,e,d,g){if(!(b[c]instanceof a)){var f=a.name||"<<anonymous>>";b=b[c];b=b.constructor&&b.constructor.name?b.constructor.name:"<<anonymous>>";return new l("Invalid "+d+" `"+g+
"` of type `"+(b+"` supplied to `"+e+"`, expected instance of `")+(f+"`."))}return null})},node:function(){return f(function(a,b,c,g,f){return d(a[b])?null:new l("Invalid "+g+" `"+f+"` supplied to `"+(c+"`, expected a ReactNode."))})}(),objectOf:function(a){return f(function(b,c,e,d,g){if("function"!==typeof a)return new l("Property `"+g+"` of component `"+e+"` has invalid PropType notation inside objectOf.");b=b[c];c=k(b);if("object"!==c)return new l("Invalid "+d+" `"+g+"` of type `"+(c+"` supplied to `"+
e+"`, expected an object."));for(var f in b)if(ea(b,f)&&(c=a(b,f,e,d,g+"."+f,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"),c instanceof Error))return c;return null})},oneOf:function(a){return Array.isArray(a)?f(function(b,e,g,d,f){b=b[e];for(e=0;e<a.length;e++)if(c(b,a[e]))return null;e=JSON.stringify(a,function(a,b){return"symbol"===h(b)?String(b):b});return new l("Invalid "+d+" `"+f+"` of value `"+String(b)+"` supplied to `"+(g+"`, expected one of "+e+"."))}):(1<arguments.length?t("Invalid arguments supplied to oneOf, expected an array, got "+
arguments.length+" arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."):t("Invalid argument supplied to oneOf, expected an array."),z)},oneOfType:function(a){if(!Array.isArray(a))return t("Invalid argument supplied to oneOfType, expected an instance of array."),z;for(var b=0;b<a.length;b++){var c=a[b];if("function"!==typeof c)return t("Invalid argument supplied to oneOfType. Expected an array of check functions, but received "+m(c)+" at index "+b+"."),z}return f(function(b,
c,e,g,d){for(var f=0;f<a.length;f++)if(null==(0,a[f])(b,c,e,g,d,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"))return null;return new l("Invalid "+g+" `"+d+"` supplied to `"+(e+"`."))})},shape:function(a){return f(function(b,c,e,g,d){b=b[c];c=k(b);if("object"!==c)return new l("Invalid "+g+" `"+d+"` of type `"+c+"` supplied to `"+(e+"`, expected `object`."));for(var f in a)if(c=a[f])if(c=c(b,f,e,g,d+"."+f,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"))return c;return null})},exact:function(a){return f(function(b,
c,g,e,d){var f=b[c],h=k(f);if("object"!==h)return new l("Invalid "+e+" `"+d+"` of type `"+h+"` supplied to `"+(g+"`, expected `object`."));h=da({},b[c],a);for(var m in h){h=a[m];if(!h)return new l("Invalid "+e+" `"+d+"` key `"+m+"` supplied to `"+g+"`.\nBad object: "+JSON.stringify(b[c],null," ")+"\nValid keys: "+JSON.stringify(Object.keys(a),null," "));if(h=h(f,m,g,e,d+"."+m,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"))return h}return null})}};l.prototype=Error.prototype;n.checkPropTypes=F;
n.resetWarningCache=F.resetWarningCache;return n.PropTypes=n},h=E(function(a){a.exports=fa(Q.isElement,!0)});I.displayName="BrowserRouter";I.propTypes={children:h.node,timeoutMs:h.number,window:h.object};J.displayName="HashRouter";J.propTypes={children:h.node,timeoutMs:h.number,window:h.object};var w=m.forwardRef(function(a,b){var c=a.onClick,d=a.replace,f=void 0===d?!1:d,g=a.state,h=a.target,q=a.to;a=M(a,["onClick","replace","state","target","to"]);d=k.useHref(q);var t=k.useNavigate(),v=k.useLocation(),
p=k.useResolvedLocation(q);return m.createElement("a",Object.assign({},a,{href:d,onClick:function(a){c&&c(a);a.defaultPrevented||0!==a.button||h&&"_self"!==h||a.metaKey||a.altKey||a.ctrlKey||a.shiftKey||(a.preventDefault(),a=!!f||x.createPath(v)===x.createPath(p),t(q,{replace:a,state:g}))},ref:b,target:h}))});w.displayName="Link";w.propTypes={onClick:h.func,replace:h.bool,state:h.object,target:h.string,to:h.oneOfType([h.string,h.shape({pathname:h.string,search:h.string,hash:h.string})]).isRequired};
var L=m.forwardRef(function(a,b){var c=a["aria-current"],d=void 0===c?"page":c;c=a.activeClassName;var f=void 0===c?"active":c;c=a.activeStyle;var g=a.caseSensitive,h=void 0===g?!1:g;g=a.className;var q=void 0===g?"":g;g=a.end;var t=void 0===g?!1:g,v=a.style;g=a.to;a=M(a,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var p=k.useLocation(),n=k.useResolvedLocation(g);p=p.pathname;n=n.pathname;h||(p=p.toLowerCase(),n=n.toLowerCase());d=(h=t?p===n:p.startsWith(n))?
d:void 0;f=[q,h?f:null].filter(Boolean).join(" ");c=y({},v,{},h?c:null);return m.createElement(w,Object.assign({},a,{"aria-current":d,className:f,ref:b,style:c,to:g}))});L.displayName="NavLink";L.propTypes=y({},w.propTypes,{"aria-current":h.oneOf("page step location date time true".split(" ")),activeClassName:h.string,activeStyle:h.object,className:h.string,style:h.object,to:h.oneOfType([h.string,h.shape({pathname:h.string,search:h.string,hash:h.string})]).isRequired});K.displayName="Prompt";K.propTypes=
{message:h.string,when:h.bool};Object.defineProperty(d,"MemoryRouter",{enumerable:!0,get:function(){return k.MemoryRouter}});Object.defineProperty(d,"Navigate",{enumerable:!0,get:function(){return k.Navigate}});Object.defineProperty(d,"Outlet",{enumerable:!0,get:function(){return k.Outlet}});Object.defineProperty(d,"Route",{enumerable:!0,get:function(){return k.Route}});Object.defineProperty(d,"Router",{enumerable:!0,get:function(){return k.Router}});Object.defineProperty(d,"Routes",{enumerable:!0,
get:function(){return k.Routes}});Object.defineProperty(d,"createRoutesFromArray",{enumerable:!0,get:function(){return k.createRoutesFromArray}});Object.defineProperty(d,"createRoutesFromChildren",{enumerable:!0,get:function(){return k.createRoutesFromChildren}});Object.defineProperty(d,"generatePath",{enumerable:!0,get:function(){return k.generatePath}});Object.defineProperty(d,"matchPath",{enumerable:!0,get:function(){return k.matchPath}});Object.defineProperty(d,"matchRoutes",{enumerable:!0,get:function(){return k.matchRoutes}});
Object.defineProperty(d,"resolveLocation",{enumerable:!0,get:function(){return k.resolveLocation}});Object.defineProperty(d,"useBlocker",{enumerable:!0,get:function(){return k.useBlocker}});Object.defineProperty(d,"useHref",{enumerable:!0,get:function(){return k.useHref}});Object.defineProperty(d,"useInRouterContext",{enumerable:!0,get:function(){return k.useInRouterContext}});Object.defineProperty(d,"useLocation",{enumerable:!0,get:function(){return k.useLocation}});Object.defineProperty(d,"useLocationPending",
{enumerable:!0,get:function(){return k.useLocationPending}});Object.defineProperty(d,"useMatch",{enumerable:!0,get:function(){return k.useMatch}});Object.defineProperty(d,"useNavigate",{enumerable:!0,get:function(){return k.useNavigate}});Object.defineProperty(d,"useOutlet",{enumerable:!0,get:function(){return k.useOutlet}});Object.defineProperty(d,"useParams",{enumerable:!0,get:function(){return k.useParams}});Object.defineProperty(d,"useResolvedLocation",{enumerable:!0,get:function(){return k.useResolvedLocation}});
Object.defineProperty(d,"useRoutes",{enumerable:!0,get:function(){return k.useRoutes}});d.BrowserRouter=I;d.HashRouter=J;d.Link=w;d.NavLink=L;d.Prompt=K;d.createSearchParams=A;d.usePrompt=O;d.useSearchParams=function(a){V("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\n\nIf you're unsure how to load polyfills, we recommend you check out https://polyfill.io/v3/ which provides some recommendations about how to load polyfills only for users that need them, instead of for every user.");
var b=m.useRef(A(a)),c=k.useLocation();a=m.useMemo(function(){for(var a=A(c.search),d=function(){var c=h.value;a.has(c)||b.current.getAll(c).forEach(function(b){a.append(c,b)})},f=T(b.current.keys()),h;!(h=f()).done;)d();return a},[c.search]);var d=k.useNavigate(),f=m.useCallback(function(a,b){d("?"+A(a),b)},[d]);return[a,f]};Object.defineProperty(d,"__esModule",{value:!0})});
/**
* React Router DOM v0.0.0-experimental-compat.1
*
* 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 (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('history'), require('react-router')) :
typeof define === 'function' && define.amd ? define(['exports', 'react', 'history', 'react-router'], factory) :
(global = global || self, factory(global.ReactRouterDOM = {}, global.React, global.HistoryLibrary, global.ReactRouter));
}(this, (function (exports, React, history, reactRouter) { 'use strict';
function _extends() {
_extends = Object.assign || function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null) return {};
var target = {};
var sourceKeys = Object.keys(source);
var key, i;
for (i = 0; i < sourceKeys.length; i++) {
key = sourceKeys[i];
if (excluded.indexOf(key) >= 0) continue;
target[key] = source[key];
}
return target;
}
const _excluded = ["onClick", "reloadDocument", "replace", "state", "target", "to"],
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "children"];
function warning(cond, message) {
if (!cond) {
// eslint-disable-next-line no-console
if (typeof console !== "undefined") console.warn(message);
try {
// Welcome to debugging React Router!
//
// This error is thrown as a convenience so you can more easily
// find the source for a warning that appears in the console by
// enabling "pause on exceptions" in your JavaScript debugger.
throw new Error(message); // eslint-disable-next-line no-empty
} catch (e) {}
}
} ////////////////////////////////////////////////////////////////////////////////
// COMPONENTS
////////////////////////////////////////////////////////////////////////////////
/**
* A `<Router>` for use in web browsers. Provides the cleanest URLs.
*/
function BrowserRouter(_ref) {
let {
basename,
children,
window
} = _ref;
let historyRef = React.useRef();
if (historyRef.current == null) {
historyRef.current = history.createBrowserHistory({
window
});
}
let history$1 = historyRef.current;
let [state, setState] = React.useState({
action: history$1.action,
location: history$1.location
});
React.useLayoutEffect(() => history$1.listen(setState), [history$1]);
return /*#__PURE__*/React.createElement(reactRouter.Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history$1
});
}
/**
* A `<Router>` for use in web browsers. Stores the location in the hash
* portion of the URL so it is not sent to the server.
*/
function HashRouter(_ref2) {
let {
basename,
children,
window
} = _ref2;
let historyRef = React.useRef();
if (historyRef.current == null) {
historyRef.current = history.createHashHistory({
window
});
}
let history$1 = historyRef.current;
let [state, setState] = React.useState({
action: history$1.action,
location: history$1.location
});
React.useLayoutEffect(() => history$1.listen(setState), [history$1]);
return /*#__PURE__*/React.createElement(reactRouter.Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history$1
});
}
/**
* A `<Router>` that accepts a pre-instantiated history object. It's important
* to note that using your own history object is highly discouraged and may add
* two versions of the history library to your bundles unless you use the same
* version of the history library that React Router uses internally.
*/
function HistoryRouter(_ref3) {
let {
basename,
children,
history
} = _ref3;
const [state, setState] = React.useState({
action: history.action,
location: history.location
});
React.useLayoutEffect(() => history.listen(setState), [history]);
return /*#__PURE__*/React.createElement(reactRouter.Router, {
basename: basename,
children: children,
location: state.location,
navigationType: state.action,
navigator: history
});
}
{
HistoryRouter.displayName = "unstable_HistoryRouter";
}
function isModifiedEvent(event) {
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
}
/**
* The public API for rendering a history-aware <a>.
*/
const Link = /*#__PURE__*/React.forwardRef(function LinkWithRef(_ref4, ref) {
let {
onClick,
reloadDocument,
replace = false,
state,
target,
to
} = _ref4,
rest = _objectWithoutPropertiesLoose(_ref4, _excluded);
let href = reactRouter.useHref(to);
let internalOnClick = useLinkClickHandler(to, {
replace,
state,
target
});
function handleClick(event) {
if (onClick) onClick(event);
if (!event.defaultPrevented && !reloadDocument) {
internalOnClick(event);
}
}
return (
/*#__PURE__*/
// eslint-disable-next-line jsx-a11y/anchor-has-content
React.createElement("a", _extends({}, rest, {
href: href,
onClick: handleClick,
ref: ref,
target: target
}))
);
});
{
Link.displayName = "Link";
}
/**
* A <Link> wrapper that knows if it's "active" or not.
*/
const NavLink = /*#__PURE__*/React.forwardRef(function NavLinkWithRef(_ref5, ref) {
let {
"aria-current": ariaCurrentProp = "page",
caseSensitive = false,
className: classNameProp = "",
end = false,
style: styleProp,
to,
children
} = _ref5,
rest = _objectWithoutPropertiesLoose(_ref5, _excluded2);
let location = reactRouter.useLocation();
let path = reactRouter.useResolvedPath(to);
let locationPathname = location.pathname;
let toPathname = path.pathname;
if (!caseSensitive) {
locationPathname = locationPathname.toLowerCase();
toPathname = toPathname.toLowerCase();
}
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(toPathname.length) === "/";
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
let className;
if (typeof classNameProp === "function") {
className = classNameProp({
isActive
});
} else {
// If the className prop is not a function, we use a default `active`
// class for <NavLink />s that are active. In v5 `active` was the default
// value for `activeClassName`, but we are removing that API and can still
// use the old default behavior for a cleaner upgrade path and keep the
// simple styling rules working as they currently do.
className = [classNameProp, isActive ? "active" : null].filter(Boolean).join(" ");
}
let style = typeof styleProp === "function" ? styleProp({
isActive
}) : styleProp;
return /*#__PURE__*/React.createElement(Link, _extends({}, rest, {
"aria-current": ariaCurrent,
className: className,
ref: ref,
style: style,
to: to
}), typeof children === "function" ? children({
isActive
}) : children);
});
{
NavLink.displayName = "NavLink";
} ////////////////////////////////////////////////////////////////////////////////
// HOOKS
////////////////////////////////////////////////////////////////////////////////
/**
* Handles the click behavior for router `<Link>` components. This is useful if
* you need to create custom `<Link>` components with the same click behavior we
* use in our exported `<Link>`.
*/
function useLinkClickHandler(to, _temp) {
let {
target,
replace: replaceProp,
state
} = _temp === void 0 ? {} : _temp;
let navigate = reactRouter.useNavigate();
let location = reactRouter.useLocation();
let path = reactRouter.useResolvedPath(to);
return React.useCallback(event => {
if (event.button === 0 && ( // Ignore everything but left clicks
!target || target === "_self") && // Let browser handle "target=_blank" etc.
!isModifiedEvent(event) // Ignore clicks with modifier keys
) {
event.preventDefault(); // If the URL hasn't changed, a regular <a> will do a replace instead of
// a push, so do the same here.
let replace = !!replaceProp || reactRouter.createPath(location) === reactRouter.createPath(path);
navigate(to, {
replace,
state
});
}
}, [location, navigate, path, replaceProp, state, target, to]);
}
/**
* A convenient wrapper for reading and writing search parameters via the
* URLSearchParams interface.
*/
function useSearchParams(defaultInit) {
warning(typeof URLSearchParams !== "undefined", "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\n\n" + "If you're unsure how to load polyfills, we recommend you check out " + "https://polyfill.io/v3/ which provides some recommendations about how " + "to load polyfills only for users that need them, instead of for every " + "user.") ;
let defaultSearchParamsRef = React.useRef(createSearchParams(defaultInit));
let location = reactRouter.useLocation();
let searchParams = React.useMemo(() => {
let searchParams = createSearchParams(location.search);
for (let key of defaultSearchParamsRef.current.keys()) {
if (!searchParams.has(key)) {
defaultSearchParamsRef.current.getAll(key).forEach(value => {
searchParams.append(key, value);
});
}
}
return searchParams;
}, [location.search]);
let navigate = reactRouter.useNavigate();
let setSearchParams = React.useCallback((nextInit, navigateOptions) => {
navigate("?" + createSearchParams(nextInit), navigateOptions);
}, [navigate]);
return [searchParams, setSearchParams];
}
/**
* Creates a URLSearchParams object using the given initializer.
*
* This is identical to `new URLSearchParams(init)` except it also
* supports arrays as values in the object form of the initializer
* instead of just strings. This is convenient when you need multiple
* values for a given key, but don't want to use an array initializer.
*
* For example, instead of:
*
* let searchParams = new URLSearchParams([
* ['sort', 'name'],
* ['sort', 'price']
* ]);
*
* you can do:
*
* let searchParams = createSearchParams({
* sort: ['name', 'price']
* });
*/
function createSearchParams(init) {
if (init === void 0) {
init = "";
}
return new URLSearchParams(typeof init === "string" || Array.isArray(init) || init instanceof URLSearchParams ? init : Object.keys(init).reduce((memo, key) => {
let value = init[key];
return memo.concat(Array.isArray(value) ? value.map(v => [key, v]) : [[key, value]]);
}, []));
}
Object.defineProperty(exports, 'MemoryRouter', {
enumerable: true,
get: function () {
return reactRouter.MemoryRouter;
}
});
Object.defineProperty(exports, 'Navigate', {
enumerable: true,
get: function () {
return reactRouter.Navigate;
}
});
Object.defineProperty(exports, 'NavigationType', {
enumerable: true,
get: function () {
return reactRouter.NavigationType;
}
});
Object.defineProperty(exports, 'Outlet', {
enumerable: true,
get: function () {
return reactRouter.Outlet;
}
});
Object.defineProperty(exports, 'Route', {
enumerable: true,
get: function () {
return reactRouter.Route;
}
});
Object.defineProperty(exports, 'Router', {
enumerable: true,
get: function () {
return reactRouter.Router;
}
});
Object.defineProperty(exports, 'Routes', {
enumerable: true,
get: function () {
return reactRouter.Routes;
}
});
Object.defineProperty(exports, 'UNSAFE_LocationContext', {
enumerable: true,
get: function () {
return reactRouter.UNSAFE_LocationContext;
}
});
Object.defineProperty(exports, 'UNSAFE_NavigationContext', {
enumerable: true,
get: function () {
return reactRouter.UNSAFE_NavigationContext;
}
});
Object.defineProperty(exports, 'UNSAFE_RouteContext', {
enumerable: true,
get: function () {
return reactRouter.UNSAFE_RouteContext;
}
});
Object.defineProperty(exports, 'createPath', {
enumerable: true,
get: function () {
return reactRouter.createPath;
}
});
Object.defineProperty(exports, 'createRoutesFromChildren', {
enumerable: true,
get: function () {
return reactRouter.createRoutesFromChildren;
}
});
Object.defineProperty(exports, 'generatePath', {
enumerable: true,
get: function () {
return reactRouter.generatePath;
}
});
Object.defineProperty(exports, 'matchPath', {
enumerable: true,
get: function () {
return reactRouter.matchPath;
}
});
Object.defineProperty(exports, 'matchRoutes', {
enumerable: true,
get: function () {
return reactRouter.matchRoutes;
}
});
Object.defineProperty(exports, 'parsePath', {
enumerable: true,
get: function () {
return reactRouter.parsePath;
}
});
Object.defineProperty(exports, 'renderMatches', {
enumerable: true,
get: function () {
return reactRouter.renderMatches;
}
});
Object.defineProperty(exports, 'resolvePath', {
enumerable: true,
get: function () {
return reactRouter.resolvePath;
}
});
Object.defineProperty(exports, 'useHref', {
enumerable: true,
get: function () {
return reactRouter.useHref;
}
});
Object.defineProperty(exports, 'useInRouterContext', {
enumerable: true,
get: function () {
return reactRouter.useInRouterContext;
}
});
Object.defineProperty(exports, 'useLocation', {
enumerable: true,
get: function () {
return reactRouter.useLocation;
}
});
Object.defineProperty(exports, 'useMatch', {
enumerable: true,
get: function () {
return reactRouter.useMatch;
}
});
Object.defineProperty(exports, 'useNavigate', {
enumerable: true,
get: function () {
return reactRouter.useNavigate;
}
});
Object.defineProperty(exports, 'useNavigationType', {
enumerable: true,
get: function () {
return reactRouter.useNavigationType;
}
});
Object.defineProperty(exports, 'useOutlet', {
enumerable: true,
get: function () {
return reactRouter.useOutlet;
}
});
Object.defineProperty(exports, 'useOutletContext', {
enumerable: true,
get: function () {
return reactRouter.useOutletContext;
}
});
Object.defineProperty(exports, 'useParams', {
enumerable: true,
get: function () {
return reactRouter.useParams;
}
});
Object.defineProperty(exports, 'useResolvedPath', {
enumerable: true,
get: function () {
return reactRouter.useResolvedPath;
}
});
Object.defineProperty(exports, 'useRoutes', {
enumerable: true,
get: function () {
return reactRouter.useRoutes;
}
});
exports.BrowserRouter = BrowserRouter;
exports.HashRouter = HashRouter;
exports.Link = Link;
exports.NavLink = NavLink;
exports.createSearchParams = createSearchParams;
exports.unstable_HistoryRouter = HistoryRouter;
exports.useLinkClickHandler = useLinkClickHandler;
exports.useSearchParams = useSearchParams;
Object.defineProperty(exports, '__esModule', { value: true });
})));
//# sourceMappingURL=react-router-dom.development.js.map

@@ -1,2 +0,12 @@

"use strict";!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("history"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","history","react-router"],t):t((e=e||self).ReactRouterDOM={},e.React,e.HistoryLibrary,e.ReactRouter)}(this,(function(e,t,r,n){function o(){return(o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r,n=arguments[t];for(r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function a(e,t){if(null==e)return{};var r,n={},o=Object.keys(e);for(r=0;r<o.length;r++){var a=o[r];0<=t.indexOf(a)||(n[a]=e[a])}return n}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e){var t=0;if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(e){if("string"==typeof e)return u(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if("Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r)return Array.from(r);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return u(e,t)}}(e)))return function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}};throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}return(t=e[Symbol.iterator]()).next.bind(t)}function c(e,r){void 0===r&&(r=!0);var o=t.useCallback((function(t){window.confirm(e)&&t.retry()}),[e]);n.useBlocker(o,r)}function s(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((function(t,r){var n=e[r];return t.concat(Array.isArray(n)?n.map((function(e){return[r,e]})):[[r,n]])}),[]))}var f=t.forwardRef((function(e,o){var u=e.onClick,i=e.replace,c=void 0!==i&&i,s=e.state,f=e.target,l=e.to;e=a(e,["onClick","replace","state","target","to"]),i=n.useHref(l);var d=n.useNavigate(),m=n.useLocation(),y=n.useResolvedLocation(l);return t.createElement("a",Object.assign({},e,{href:i,onClick:function(e){u&&u(e),e.defaultPrevented||0!==e.button||f&&"_self"!==f||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey||(e.preventDefault(),e=!!c||r.createPath(m)===r.createPath(y),d(l,{replace:e,state:s}))},ref:o,target:f}))})),l=t.forwardRef((function(e,r){var u=e["aria-current"],i=void 0===u?"page":u,c=void 0===(u=e.activeClassName)?"active":u;u=e.activeStyle;var s=e.caseSensitive,l=void 0!==s&&s,d=void 0===(s=e.className)?"":s,m=void 0!==(s=e.end)&&s,y=e.style;s=e.to,e=a(e,"aria-current activeClassName activeStyle caseSensitive className end style to".split(" "));var b=n.useLocation(),v=n.useResolvedLocation(s);return b=b.pathname,v=v.pathname,l||(b=b.toLowerCase(),v=v.toLowerCase()),i=(l=m?b===v:b.startsWith(v))?i:void 0,c=[d,l?c:null].filter(Boolean).join(" "),u=o({},y,{},l?u:null),t.createElement(f,Object.assign({},e,{"aria-current":i,className:c,ref:r,style:u,to:s}))}));Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"createRoutesFromArray",{enumerable:!0,get:function(){return n.createRoutesFromArray}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"resolveLocation",{enumerable:!0,get:function(){return n.resolveLocation}}),Object.defineProperty(e,"useBlocker",{enumerable:!0,get:function(){return n.useBlocker}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useLocationPending",{enumerable:!0,get:function(){return n.useLocationPending}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedLocation",{enumerable:!0,get:function(){return n.useResolvedLocation}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){var o=e.children,a=e.timeoutMs;a=void 0===a?5e3:a;var u=e.window;null==(e=t.useRef()).current&&(e.current=r.createBrowserHistory({window:u}));var i=(a=t.unstable_useTransition({timeoutMs:a}))[0];a=a[1];var c=e.current;u=(e=t.useReducer((function(e,t){return t}),{action:c.action,location:c.location}))[0];var s=e[1];return t.useLayoutEffect((function(){return c.listen((function(e){i((function(){s(e)}))}))}),[c,i]),t.createElement(n.Router,{children:o,action:u.action,location:u.location,navigator:c,pending:a})},e.HashRouter=function(e){var o=e.children,a=e.timeoutMs;a=void 0===a?5e3:a;var u=e.window;null==(e=t.useRef()).current&&(e.current=r.createHashHistory({window:u}));var i=(a=t.unstable_useTransition({timeoutMs:a}))[0];a=a[1];var c=e.current;u=(e=t.useReducer((function(e,t){return t}),{action:c.action,location:c.location}))[0];var s=e[1];return t.useLayoutEffect((function(){return c.listen((function(e){i((function(){s(e)}))}))}),[c,i]),t.createElement(n.Router,{children:o,action:u.action,location:u.location,navigator:c,pending:a})},e.Link=f,e.NavLink=l,e.Prompt=function(e){return c(e.message,e.when),null},e.createSearchParams=s,e.usePrompt=c,e.useSearchParams=function(e){var r=t.useRef(s(e)),o=n.useLocation();e=t.useMemo((function(){for(var e,t=s(o.search),n=function(){var n=e.value;t.has(n)||r.current.getAll(n).forEach((function(e){t.append(n,e)}))},a=i(r.current.keys());!(e=a()).done;)n();return t}),[o.search]);var a=n.useNavigate();return[e,t.useCallback((function(e,t){a("?"+s(e),t)}),[a])]},Object.defineProperty(e,"__esModule",{value:!0})}));
/**
* React Router DOM v0.0.0-experimental-compat.1
*
* 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,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("history"),require("react-router")):"function"==typeof define&&define.amd?define(["exports","react","history","react-router"],t):t((e=e||self).ReactRouterDOM={},e.React,e.HistoryLibrary,e.ReactRouter)}(this,(function(e,t,r,n){"use strict";function a(){return a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},a.apply(this,arguments)}function o(e,t){if(null==e)return{};var r,n,a={},o=Object.keys(e);for(n=0;n<o.length;n++)r=o[n],t.indexOf(r)>=0||(a[r]=e[r]);return a}const u=["onClick","reloadDocument","replace","state","target","to"],i=["aria-current","caseSensitive","className","end","style","to","children"];const c=t.forwardRef((function(e,r){let{onClick:i,reloadDocument:c,replace:s=!1,state:f,target:b,to:y}=e,d=o(e,u),m=n.useHref(y),p=l(y,{replace:s,state:f,target:b});return t.createElement("a",a({},d,{href:m,onClick:function(e){i&&i(e),e.defaultPrevented||c||p(e)},ref:r,target:b}))})),s=t.forwardRef((function(e,r){let{"aria-current":u="page",caseSensitive:s=!1,className:l="",end:f=!1,style:b,to:y,children:d}=e,m=o(e,i),p=n.useLocation(),g=n.useResolvedPath(y),h=p.pathname,P=g.pathname;s||(h=h.toLowerCase(),P=P.toLowerCase());let O,v=h===P||!f&&h.startsWith(P)&&"/"===h.charAt(P.length),R=v?u:void 0;O="function"==typeof l?l({isActive:v}):[l,v?"active":null].filter(Boolean).join(" ");let j="function"==typeof b?b({isActive:v}):b;return t.createElement(c,a({},m,{"aria-current":R,className:O,ref:r,style:j,to:y}),"function"==typeof d?d({isActive:v}):d)}));function l(e,r){let{target:a,replace:o,state:u}=void 0===r?{}:r,i=n.useNavigate(),c=n.useLocation(),s=n.useResolvedPath(e);return t.useCallback((t=>{if(!(0!==t.button||a&&"_self"!==a||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(t))){t.preventDefault();let r=!!o||n.createPath(c)===n.createPath(s);i(e,{replace:r,state:u})}}),[c,i,s,o,u,a,e])}function f(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]])}),[]))}Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"NavigationType",{enumerable:!0,get:function(){return n.NavigationType}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"UNSAFE_LocationContext",{enumerable:!0,get:function(){return n.UNSAFE_LocationContext}}),Object.defineProperty(e,"UNSAFE_NavigationContext",{enumerable:!0,get:function(){return n.UNSAFE_NavigationContext}}),Object.defineProperty(e,"UNSAFE_RouteContext",{enumerable:!0,get:function(){return n.UNSAFE_RouteContext}}),Object.defineProperty(e,"createPath",{enumerable:!0,get:function(){return n.createPath}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return n.parsePath}}),Object.defineProperty(e,"renderMatches",{enumerable:!0,get:function(){return n.renderMatches}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return n.resolvePath}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useNavigationType",{enumerable:!0,get:function(){return n.useNavigationType}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useOutletContext",{enumerable:!0,get:function(){return n.useOutletContext}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return n.useResolvedPath}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){let{basename:a,children:o,window:u}=e,i=t.useRef();null==i.current&&(i.current=r.createBrowserHistory({window:u}));let c=i.current,[s,l]=t.useState({action:c.action,location:c.location});return t.useLayoutEffect((()=>c.listen(l)),[c]),t.createElement(n.Router,{basename:a,children:o,location:s.location,navigationType:s.action,navigator:c})},e.HashRouter=function(e){let{basename:a,children:o,window:u}=e,i=t.useRef();null==i.current&&(i.current=r.createHashHistory({window:u}));let c=i.current,[s,l]=t.useState({action:c.action,location:c.location});return t.useLayoutEffect((()=>c.listen(l)),[c]),t.createElement(n.Router,{basename:a,children:o,location:s.location,navigationType:s.action,navigator:c})},e.Link=c,e.NavLink=s,e.createSearchParams=f,e.unstable_HistoryRouter=function(e){let{basename:r,children:a,history:o}=e;const[u,i]=t.useState({action:o.action,location:o.location});return t.useLayoutEffect((()=>o.listen(i)),[o]),t.createElement(n.Router,{basename:r,children:a,location:u.location,navigationType:u.action,navigator:o})},e.useLinkClickHandler=l,e.useSearchParams=function(e){let r=t.useRef(f(e)),a=n.useLocation(),o=t.useMemo((()=>{let e=f(a.search);for(let t of r.current.keys())e.has(t)||r.current.getAll(t).forEach((r=>{e.append(t,r)}));return e}),[a.search]),u=n.useNavigate();return[o,t.useCallback(((e,t)=>{u("?"+f(e),t)}),[u])]},Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=react-router-dom.production.min.js.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc