GoScrobble/web/node_modules/.cache/babel-loader/42bda9b1d3220375ef45a2e66514fec4.json

1 line
28 KiB
JSON
Raw Permalink Normal View History

2022-04-25 02:47:15 +00:00
{"ast":null,"code":"import { Router, __RouterContext, matchPath } from 'react-router';\nexport { MemoryRouter, Prompt, Redirect, Route, Router, StaticRouter, Switch, generatePath, matchPath, useHistory, useLocation, useParams, useRouteMatch, withRouter } from 'react-router';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport React from 'react';\nimport { createBrowserHistory, createHashHistory, createLocation } from 'history';\nimport PropTypes from 'prop-types';\nimport warning from 'tiny-warning';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport invariant from 'tiny-invariant';\n/**\n * The public API for a <Router> that uses HTML5 history.\n */\n\nvar BrowserRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createBrowserHistory(_this.props);\n return _this;\n }\n\n var _proto = BrowserRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n BrowserRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number\n };\n\n BrowserRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \"<BrowserRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\") : void 0;\n };\n}\n/**\n * The public API for a <Router> that uses window.location.hash.\n */\n\n\nvar HashRouter = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(HashRouter, _React$Component);\n\n function HashRouter() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.history = createHashHistory(_this.props);\n return _this;\n }\n\n var _proto = HashRouter.prototype;\n\n _proto.render = function render() {\n return React.createElement(Router, {\n history: this.history,\n children: this.props.children\n });\n };\n\n return HashRouter;\n}(React.Component);\n\nif (process.env.NODE_ENV !== \"production\") {\n HashRouter.propTypes = {\n basename: PropTypes.string,\n children: PropTypes.node,\n getUserConfirmation: PropTypes.func,\n hashType: PropTypes.oneOf([\"hashbang\", \"noslash\", \"slash\"])\n };\n\n HashRouter.prototype.componentDidMount = function () {\n process.env.NODE_ENV !== \"production\" ? warning(!this.props.history, \"<HashRouter> ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { HashRouter as Router }`.\") : void 0;\n };\n}\n\nvar resolveToLocation = function resolveToLocation(to, currentLocation) {\n return typeof to === \"function\" ? to(currentLocation) : to;\n};\n\nvar normalizeToLocation = function normalizeToLocation(to, currentLocation) {\n return typeof to === \"string\" ? createLocation(to, null, null, currentLocation) : to;\n};\n\nvar forwardRefShim = function forwardRefShim(C) {\n return C;\n};\n\nvar forwardRef = React.forwardRef;\n\nif (typeof forwardRef === \"undefined\") {\n forwardRef = forwardRefShim;\n}\n\nfunction isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey)