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kH,YAAW,CAAC3G,EAAOuG,IAAQ,wBAACF,EAAD,KAAqBrG,EAArB,CAA4BwG,aAAcD,MAAlF,C,oBCpCFlJ,EAAOD,QAAUwJ,C,oBCAjBvJ,EAAOD,QAAUyJ,C,oBCAjBxJ,EAAOD,QAAU0J,C,kBCAjBzJ,EAAOD,QAAU2J,C,oBCAjB1J,EAAOD,QAAU4J,C,kBCAjB3J,EAAOD,QAAU6J,C","sources":["../webpack/bootstrap","../../../../../../../../external/prop-types","../webpack-src:/router/index.js","../webpack-src:/router/src/router.js","../../../../../../../../external/history","../webpack-src:/router/src/create-web-history.js","../webpack-src:/router/src/history-processors.js","../webpack-src:/router/src/history-navigation.js","../webpack-src:/router/src/identity-parse-route.js","../webpack-src:/router/src/route.js","../webpack-src:/router/src/prop-types-ext.js","../../../../../../../../external/react-is","../webpack-src:/router/src/link.js","../webpack-src:/router/src/with-router.js","../../../../../../../../external/hoist-non-react-statics","../../../../../../../../external/@bingads-webui-react/hoc-utils","../../../../../../../../external/react-router-dom","../../../../../../../../external/react","../../../../../../../../external/urijs","../../../../../../../../external/underscore"],"sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1118);\n","module.exports = __WEBPACK_EXTERNAL_MODULE__10__;","export { Router, MemoryRouter, HashRouter } from './src/router';\r\nexport { Route } from './src/route';\r\nexport { Link } from './src/link';\r\nexport { withRouter } from './src/with-router';\r\nexport { createWebHistory } from './src/create-web-history';\r\nexport * from './src/history-processors';\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport { createMemoryHistory, createHashHistory } from 'history';\r\n\r\nimport { Router as ReactRouter } from 'react-router-dom';\r\n\r\nimport { createWebHistory } from './create-web-history';\r\nimport { identityParseRoute } from './identity-parse-route';\r\n\r\nconst routerConfigKeys = ['parseRoute'];\r\n\r\n/**\r\n * React context storing the router configuration object.\r\n */\r\nconst RouterContext = React.createContext({\r\n [routerConfigKeys]: _.noop,\r\n});\r\n\r\nexport const RouterConsumer = RouterContext.Consumer;\r\n\r\n/**\r\n * Wrapper around React Router that allows some customization to the default router\r\n * behavior.\r\n * @param {object} props - Router configuration options\r\n * @returns {object} - Configured router component\r\n */\r\nexport const Router = (props) => {\r\n const routerConfig = _.pick(props, routerConfigKeys);\r\n const remainingProps = _.omit(props, routerConfigKeys);\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n};\r\n\r\n/*\r\n * The public API for a that stores location in memory for testing purpose.\r\n */\r\nexport const MemoryRouter = (props) => {\r\n const history = createMemoryHistory(props);\r\n const routerConfig = _.pick(props, routerConfigKeys);\r\n return {props.children};\r\n};\r\n\r\n\r\n/*\r\n * The public API for a that uses window.location.hash.\r\n */\r\nexport const HashRouter = (props) => {\r\n const history = createHashHistory(props);\r\n const routerConfig = _.pick(props, routerConfigKeys);\r\n return {props.children};\r\n};\r\n\r\nRouter.propTypes = {\r\n /**\r\n * Function that parses the route props provided by React Router into the desired props\r\n * to send to route-consuming components.\r\n */\r\n parseRoute: PropTypes.func,\r\n /**\r\n * History object used by React Router for managing history and navigation.\r\n */\r\n history: PropTypes.shape(),\r\n};\r\n\r\nRouter.defaultProps = {\r\n parseRoute: identityParseRoute,\r\n history: createWebHistory(),\r\n};\r\n\r\nMemoryRouter.propTypes = {\r\n parseRoute: PropTypes.func,\r\n children: PropTypes.node,\r\n};\r\n\r\nMemoryRouter.defaultProps = {\r\n parseRoute: identityParseRoute,\r\n children: null,\r\n};\r\n\r\nHashRouter.propTypes = {\r\n parseRoute: PropTypes.func,\r\n children: PropTypes.node,\r\n};\r\n\r\nHashRouter.defaultProps = {\r\n parseRoute: identityParseRoute,\r\n children: null,\r\n};\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1121__;","import _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport { createBrowserHistory } from 'history';\r\nimport { getNavigationObject, navigationObjectFormat } from './history-processors';\r\nimport { serverSidePush, serverSideReplace } from './history-navigation';\r\n\r\n/**\r\n * Creates a history object compatible with React Router that handles both\r\n * server-side (full-page redirect) and client-side (React Router) routing.\r\n * This function extends and adds properties defined on the React Router default\r\n * browser history API.\r\n * @param {object} options - Configuration options for the history object\r\n * @param {string} options.basename - Base path for routing that is passed to the React\r\n * Router browser history\r\n * @param {function[]} processors - A list of processors passed in from the App. The order\r\n * matters, i.e the last processor is always overriding previous values.\r\n * Each processors received the args (path, options = { previousNavigationObject })\r\n * @returns {object} - History object compatible with React Router\r\n */\r\nexport const createWebHistory = ({ basename, processors = [] } = {}) => {\r\n const history = createBrowserHistory({ basename });\r\n const clientSidePush = history.push;\r\n const clientSideReplace = history.replace;\r\n\r\n /**\r\n * Store the basename for public reference where needed.\r\n */\r\n Object.defineProperty(history, 'basename', { get: () => basename });\r\n\r\n const serverOrClientSideNavigation = ({\r\n serverSideNavigation,\r\n clientSideNavigation,\r\n path,\r\n state,\r\n isReplace = false,\r\n }) => {\r\n const navigationObject = getNavigationObject({ processors, path, basename });\r\n if (navigationObject[navigationObjectFormat.forceRefresh] === true) {\r\n serverSideNavigation(navigationObject[navigationObjectFormat.path]);\r\n } else {\r\n let previousRoute = '';\r\n\r\n if (isReplace) {\r\n if (history.location.state && history.location.state.previousRoute) {\r\n ({ previousRoute } = history.location.state);\r\n }\r\n } else {\r\n previousRoute = window.location.href;\r\n }\r\n\r\n clientSideNavigation(navigationObject[navigationObjectFormat.path], _.extend({\r\n previousRoute,\r\n }, state));\r\n }\r\n };\r\n\r\n /**\r\n * Updated push method that performs a server-side redirect if the path given is an absolute URL\r\n * and a client-side redirect otherwise.\r\n * @param {string | object} path - a string indicating the navigation URL, or an object\r\n * describing a path per the history API\r\n * @param {object} state - state to send along with the history location object\r\n * @returns {void}\r\n */\r\n history.push = (path, state) => serverOrClientSideNavigation({\r\n serverSideNavigation: serverSidePush,\r\n clientSideNavigation: clientSidePush,\r\n path,\r\n state,\r\n });\r\n\r\n history.replace = (path, state) => serverOrClientSideNavigation({\r\n serverSideNavigation: serverSideReplace,\r\n clientSideNavigation: clientSideReplace,\r\n path,\r\n state,\r\n isReplace: true,\r\n });\r\n\r\n /**\r\n * Patch the current search query in the URL according to the given params.\r\n * @param {object} params - patch updates to the current query params in the URL\r\n * @returns {void}\r\n */\r\n history.setSearch = (params) => {\r\n const search = URI(history.location.search)\r\n .setSearch(params)\r\n .query();\r\n history.push({ search });\r\n };\r\n\r\n return history;\r\n};\r\n","import _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport { createLocation, createPath } from 'history';\r\n\r\n/**\r\n * NavigationObject object\r\n * @typedef {object} NavigationObject\r\n * @property {bool} [forceRefresh] the value indicating to force the navigation to\r\n * proceed to refresh (aka server-side redirection) if set to true\r\n * @property {string|object} [path] the path or location object to navigate to\r\n */\r\n\r\n/**\r\n * pilot model for NavigationObject properties\r\n */\r\nexport const navigationObjectFormat = {\r\n forceRefresh: 'forceRefresh',\r\n path: 'path',\r\n basename: 'basename',\r\n};\r\n\r\n/**\r\n * Ensure that each basename start with a slash and do not end with a slash\r\n * @param {string} basename the string basename given to the router\r\n * @return {string} the expected basename react-router is actually using for navigation\r\n */\r\nexport const normalizeBasename = (basename) => {\r\n const addLeadingSlash = b => (b.charAt(0) === '/' ? b : `/${b}`);\r\n const stripTrailingSlash = b => (b.charAt(b.length - 1) === '/' ? b.slice(0, -1) : b);\r\n\r\n return basename ? stripTrailingSlash(addLeadingSlash(basename)) : '';\r\n};\r\n\r\n/**\r\n * We consider to add the basename only if there is a basename in param and the url is relative\r\n * Returns true if the relative path doesn't start with the basename\r\n * @param {string} path the path to navigate to\r\n * @param {string} basename the string basename given to the router\r\n * @return {boolean} true if the path doesn't start with the basename or is not relative\r\n */\r\nconst pathIsRelativeAndNeedBasename = (path, basename) => {\r\n const uri = URI(path);\r\n if (!basename || uri.is('absolute')) {\r\n return false;\r\n }\r\n const firstPathSegment = _.first(uri.segment());\r\n const basenameSegment = _.first(URI(basename).segment());\r\n return firstPathSegment !== basenameSegment;\r\n};\r\n\r\n/**\r\n * createHref exists in the source code of react-router's `history`\r\n * but was not externalized so it is forked here.\r\n * @param {object|string} locationOrPath the location object or path to navigate to\r\n * @param {string} basename the string basename given to the router\r\n * @return {string} the href string from the basename and the location object in parameter,\r\n * leveraging react-router's `history` createPath function\r\n */\r\nexport const createHref = (locationOrPath, basename) => {\r\n const path = _.isObject(locationOrPath) ? createPath(locationOrPath) : locationOrPath;\r\n if (pathIsRelativeAndNeedBasename(path, basename)) {\r\n return normalizeBasename(basename) + path;\r\n }\r\n return path;\r\n};\r\n\r\n/**\r\n * Override memo with the processor function callback.\r\n * Processor can return a boolean to force refresh or not, or return an entire NavigationObject.\r\n * Each processor will receive in parameter the path we are about to navigate to,\r\n * and the previous NavigationObject for reference.\r\n * @param {NavigationObject} previousNavigationObject The previous NavigationObject\r\n * @param {function} processor The function callback that make some navigation switch decision\r\n * @return {NavigationObject} The new navigationObject from the processor result\r\n */\r\nexport const reduceProcessor = (previousNavigationObject, processor) => {\r\n const result = _.isFunction(processor)\r\n ? processor(previousNavigationObject[navigationObjectFormat.path], { previousNavigationObject })\r\n : null;\r\n if (_.isBoolean(result)) {\r\n return _.extend({}, previousNavigationObject, {\r\n [navigationObjectFormat.forceRefresh]: result,\r\n });\r\n }\r\n if (_.isObject(result)) {\r\n const navigationObject = _.pick(result, _.values(navigationObjectFormat));\r\n return _.extend({}, previousNavigationObject, navigationObject);\r\n }\r\n return previousNavigationObject;\r\n};\r\n\r\n/**\r\n * Force refresh (aka server side redirect) for location object or string path with absolute URL\r\n * @param {object|string} path The path or location object to navigate to\r\n * @return {NavigationObject} The { forceRefresh:true, path } NavigationObject if path is absolute,\r\n * or null otherwise.\r\n */\r\nexport const absoluteUrlProcessor = (path) => {\r\n const location = createLocation(path);\r\n const uri = URI(location.pathname);\r\n if (uri.is('absolute')) {\r\n if (location.search) {\r\n uri.search(location.search);\r\n }\r\n return {\r\n [navigationObjectFormat.forceRefresh]: true,\r\n [navigationObjectFormat.path]: uri.toString(),\r\n };\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * Ensure that if forceRefresh=true, we return a correct stringified Path with the basename\r\n * for a correct server side redirect. Server side redirect can't navigate with object in parameter\r\n * @param {object|string} path The path or location object to navigate to\r\n * @param {NavigationObject} previousNavigationObject The previous NavigationObject passed in\r\n * @return {NavigationObject} The { path: path.toString() } NavigationObject if forceRefresh==true\r\n * and path is an object, or null otherwise\r\n */\r\nexport const normalizeServerSideNavigationProcessor = (path, { previousNavigationObject }) => {\r\n if (previousNavigationObject[navigationObjectFormat.forceRefresh] === true) {\r\n const basename = previousNavigationObject[navigationObjectFormat.basename];\r\n return {\r\n [navigationObjectFormat.path]: createHref(path, basename),\r\n };\r\n }\r\n return null;\r\n};\r\n\r\n/**\r\n * A list of processors from params will be evaluated, in order of importance, to finally\r\n * return the last NavigationObject before proceed with the navigation.\r\n * This function always finish by evaluating the absoluteUrlProcessor\r\n * and normalizeServerSideNavigationProcessor, in this order.\r\n * @param {function[]} processors A list of processors passed in from the App. The order matters:\r\n * the last processor is overriding previous processors\r\n * @return {NavigationObject} The { path, forceRefresh } NavigationObject to help in the navigation\r\n */\r\nexport const getNavigationObject = ({ processors, path, basename }) => _.reduce(\r\n [...processors, ...[absoluteUrlProcessor, normalizeServerSideNavigationProcessor]],\r\n reduceProcessor,\r\n { forceRefresh: false, path, basename }\r\n);\r\n","// Externalize those 2 functions for mocking conveniance in unit tests\r\n\r\nexport const serverSidePush = /* istanbul ignore next */ (url) => {\r\n window.location.href = url;\r\n};\r\n\r\nexport const serverSideReplace = /* istanbul ignore next */ (url) => {\r\n window.location.replace(url);\r\n};\r\n","/**\r\n * Identity function that just returns the original route props provided by React Router\r\n * without any modifications.\r\n * @param {object} routeProps - Route props provided by React Router\r\n * @returns {object} - The same route props without any transformation\r\n */\r\nexport const identityParseRoute = ({ location, match }) => ({ location, match });\r\n","import _ from 'underscore';\r\n\r\nimport React from 'react';\r\nimport PropTypes from 'prop-types';\r\n\r\nimport { Route as ReactRoute } from 'react-router-dom';\r\n\r\nimport { PropTypesExt } from './prop-types-ext';\r\nimport { RouterConsumer } from './router';\r\n\r\nconst convertProps = ({\r\n routerConfig: {\r\n parseRoute,\r\n },\r\n routeProps,\r\n}) => {\r\n const params = parseRoute(routeProps);\r\n return _.defaults({}, routeProps, params);\r\n};\r\n\r\n/**\r\n * Extension of the React Router component that maps the default React Router\r\n * route props into new props according to the router config, then passes these to the\r\n * wrapped component.\r\n * Similar to React Router , the wrapped component can be passed in through the\r\n * \"component\", \"render\", and \"children\" props.\r\n * All other props will be passed through down to React Router .\r\n * @param {object} props - Route component props\r\n * @returns {object} - Component with route context\r\n */\r\nexport const Route = props => (\r\n \r\n {(routerConfig) => {\r\n const updatedProps = _.extend({}, props);\r\n\r\n if (props.component) {\r\n updatedProps.component = routeProps =>\r\n ;\r\n }\r\n\r\n if (props.render) {\r\n updatedProps.render = routeProps =>\r\n props.render(convertProps({ routerConfig, routeProps }));\r\n }\r\n\r\n if (props.children) {\r\n updatedProps.children = routeProps =>\r\n props.children(convertProps({ routerConfig, routeProps }));\r\n }\r\n\r\n return (\r\n \r\n );\r\n }}\r\n \r\n);\r\n\r\nRoute.propTypes = {\r\n children: PropTypes.func,\r\n // Bug in eslint: https://github.com/yannickcr/eslint-plugin-react/issues/1389\r\n // eslint-disable-next-line react/no-typos\r\n component: PropTypesExt.component,\r\n render: PropTypes.func,\r\n};\r\n\r\nRoute.defaultProps = {\r\n children: null,\r\n component: null,\r\n render: null,\r\n};\r\n","import { isValidElementType } from 'react-is';\r\n\r\nexport const PropTypesExt = {\r\n component:\r\n (props, propName, componentName) => {\r\n if (props[propName] && !isValidElementType(props[propName])) {\r\n return new Error(`Invalid prop ${propName} supplied to ${componentName}`);\r\n }\r\n return null;\r\n },\r\n};\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE__1128__;","import React from 'react';\r\nimport PropTypes from 'prop-types';\r\nimport _ from 'underscore';\r\nimport URI from 'urijs';\r\nimport { createPath } from 'history';\r\nimport { Link as ReactLink } from 'react-router-dom';\r\n\r\n/**\r\n * Extension of the React Router component that prevent absolute URL href to be overrided\r\n * by React Router by rendering a basic anchor DOM\r\n * Usage similar to components: https://reactrouter.com/web/api/Link\r\n * @param {object} props - component props\r\n * @returns {object} - component or anchor component for absolute URLs\r\n */\r\nexport const Link = (props) => {\r\n const {\r\n to,\r\n ...rest\r\n } = props;\r\n\r\n const path = _.isObject(to) ? createPath(to) : to;\r\n if (_.isString(path) && URI(path).is('absolute')) {\r\n // eslint-disable-next-line jsx-a11y/anchor-has-content\r\n return ;\r\n }\r\n\r\n return ;\r\n};\r\n\r\nLink.propTypes = {\r\n to: PropTypes.oneOfType([\r\n PropTypes.string,\r\n PropTypes.object,\r\n PropTypes.func,\r\n ]).isRequired,\r\n};\r\n","import _ from 'underscore';\r\nimport React from 'react';\r\nimport hoistNonReactStatics from 'hoist-non-react-statics';\r\n\r\nimport { getDisplayName } from '@bingads-webui-react/hoc-utils';\r\n\r\nimport { Route } from './route';\r\n\r\n/**\r\n * HOC that passes the mapped React Route route props to the wrapped component.\r\n * @param {object} WrappedComponent - Component to receive mapped route props\r\n * @returns {object} - Component with mapped route props\r\n */\r\nexport const withRouter = (WrappedComponent) => {\r\n const RoutedComponent = (props) => {\r\n /* eslint-disable react/prop-types */\r\n const rest = _.omit(props, 'forwardedRef');\r\n\r\n return (\r\n \r\n {routeComponentProps => (\r\n \r\n )\r\n }\r\n \r\n );\r\n };\r\n\r\n RoutedComponent.displayName = `withBingAdsRouter(${getDisplayName(WrappedComponent)})`;\r\n\r\n hoistNonReactStatics(RoutedComponent, WrappedComponent);\r\n\r\n return React.forwardRef((props, ref) => );\r\n};\r\n","module.exports = __WEBPACK_EXTERNAL_MODULE__130__;","module.exports = __WEBPACK_EXTERNAL_MODULE__131__;","module.exports = __WEBPACK_EXTERNAL_MODULE__216__;","module.exports = __WEBPACK_EXTERNAL_MODULE__3__;","module.exports = __WEBPACK_EXTERNAL_MODULE__353__;","module.exports = __WEBPACK_EXTERNAL_MODULE__9__;"],"names":["installedModules","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__WEBPACK_EXTERNAL_MODULE__10__","routerConfigKeys","RouterContext","React","createContext","_","noop","RouterConsumer","Consumer","Router","props","routerConfig","pick","remainingProps","omit","Provider","MemoryRouter","history","createMemoryHistory","children","HashRouter","createHashHistory","propTypes","parseRoute","PropTypes","func","shape","defaultProps","identityParseRoute","createWebHistory","node","__WEBPACK_EXTERNAL_MODULE__1121__","basename","processors","createBrowserHistory","clientSidePush","push","clientSideReplace","replace","serverOrClientSideNavigation","serverSideNavigation","clientSideNavigation","path","state","isReplace","navigationObject","getNavigationObject","navigationObjectFormat","forceRefresh","previousRoute","location","window","href","extend","serverSidePush","serverSideReplace","setSearch","params","search","query","normalizeBasename","b","charAt","length","slice","stripTrailingSlash","createHref","locationOrPath","isObject","createPath","uri","is","first","segment","pathIsRelativeAndNeedBasename","reduceProcessor","previousNavigationObject","processor","result","isFunction","isBoolean","values","absoluteUrlProcessor","createLocation","pathname","toString","normalizeServerSideNavigationProcessor","reduce","url","match","convertProps","routeProps","defaults","Route","updatedProps","component","render","PropTypesExt","propName","componentName","isValidElementType","Error","__WEBPACK_EXTERNAL_MODULE__1128__","Link","to","rest","isString","oneOfType","string","isRequired","WrappedComponent","RoutedComponent","routeComponentProps","ref","forwardedRef","displayName","getDisplayName","forwardRef","__WEBPACK_EXTERNAL_MODULE__130__","__WEBPACK_EXTERNAL_MODULE__131__","__WEBPACK_EXTERNAL_MODULE__216__","__WEBPACK_EXTERNAL_MODULE__3__","__WEBPACK_EXTERNAL_MODULE__353__","__WEBPACK_EXTERNAL_MODULE__9__"],"sourceRoot":""}