{"version":3,"file":"mail_to_target-2ba6302e.js","sources":["../../../app/javascript/mail-to-target/helpers.js","../../../app/javascript/mail-to-target/create-model.js","../../../app/javascript/mail-to-target/create-store.js","../../../node_modules/warning/warning.js","../../../node_modules/react-router-dom/node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/react-router-dom/node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/react-router-dom/node_modules/prop-types/index.js","../../../node_modules/resolve-pathname/esm/resolve-pathname.js","../../../node_modules/value-equal/esm/value-equal.js","../../../node_modules/tiny-invariant/dist/esm/tiny-invariant.js","../../../node_modules/history/esm/history.js","../../../node_modules/react-router/node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../node_modules/react-router/node_modules/prop-types/factoryWithThrowingShims.js","../../../node_modules/react-router/node_modules/prop-types/index.js","../../../node_modules/react-router/es/Router.js","../../../node_modules/react-router-dom/es/BrowserRouter.js","../../../node_modules/react-router-dom/es/Link.js","../../../node_modules/path-to-regexp/node_modules/isarray/index.js","../../../node_modules/path-to-regexp/index.js","../../../node_modules/react-router/es/matchPath.js","../../../node_modules/react-router/es/Route.js","../../../node_modules/react-router/es/generatePath.js","../../../node_modules/react-router/es/Redirect.js","../../../node_modules/react-router/es/Switch.js","../../../node_modules/react-router/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../../node_modules/react-router/es/withRouter.js","../../../app/javascript/mail-to-target/scroll-to-top.js","../../../app/javascript/mail-to-target/page.jsx","../../../app/javascript/mail-to-target/progress.jsx","../../../app/javascript/mail-to-target/footer.jsx","../../../app/javascript/mail-to-target/steps/lookup.jsx","../../../app/javascript/mail-to-target/steps/choose.jsx","../../../app/javascript/mail-to-target/steps/mp-header.jsx","../../../app/javascript/mail-to-target/steps/create.jsx","../../../app/javascript/mail-to-target/steps/email.jsx","../../../app/javascript/mail-to-target/steps/thanks.jsx","../../../app/javascript/mail-to-target/app.jsx","../../../app/javascript/mail-to-target/container.js","../../../app/javascript/entrypoints/mail_to_target.jsx"],"sourcesContent":["import { template } from 'lodash';\nimport { queryStringToObject, objectToQueryString } from '../lib/utils';\n\nexport const compileInitialState = (pageData, location) => {\n const queryStringParameters = queryStringToObject(location.search);\n const initialState = {\n ...pageData,\n userInput: {},\n queryStringParameters,\n url: location.toString(),\n shareUrl: location.toString().split('?')[0]\n };\n\n if (\n queryStringParameters.electorate &&\n pageData.electorates.some((e) => e.id === queryStringParameters.electorate)\n ) {\n initialState.userInput.selectedElectorateId =\n queryStringParameters.electorate;\n }\n if (\n queryStringParameters.party &&\n pageData.parties.some((p) => p.id === queryStringParameters.party)\n ) {\n initialState.userInput.selectedPartyId = queryStringParameters.party;\n }\n if (\n queryStringParameters.mp &&\n pageData.mps.some((mp) => mp.id === queryStringParameters.mp)\n ) {\n initialState.userInput.selectedMPId = queryStringParameters.mp;\n }\n\n return initialState;\n};\n\nconst buildPath = (basePath, queryStringParameters) => {\n const qs = objectToQueryString(queryStringParameters);\n return qs === '' ? basePath : `${basePath}?${qs}`;\n};\n\nexport const choosePath = (queryStringParameters) => {\n return buildPath(`/choose`, queryStringParameters);\n};\n\nexport const lookupPath = (queryStringParameters) => {\n return buildPath(`/`, queryStringParameters);\n};\n\nexport const createPath = (queryStringParameters) => {\n return buildPath(`/create`, queryStringParameters);\n};\n\nexport const emailPath = (queryStringParameters) => {\n return buildPath(`/email`, queryStringParameters);\n};\n\nexport const mpPartyElectorateText = (mp, party, electorate) => {\n if (mp.politicalOffice !== null) {\n return mp.politicalOffice;\n }\n\n return electorate.id === 'list'\n ? `${party.name} list MP`\n : `${party.name} MP for ${electorate.name}`;\n};\n\n// TODO: Find a better place for these\nexport const generateEmailSubject = (state) => {\n const {\n emailSubject,\n userInput: { firstName, lastName }\n } = state;\n const messageData = {\n senderName: `${firstName} ${lastName}`\n };\n return template(emailSubject)(messageData);\n};\n\nexport const generateEmailMessage = (state) => {\n const {\n talkingPoints,\n emailTemplate,\n mps,\n parties,\n electorates,\n userInput: {\n selectedElectorateId,\n selectedPartyId,\n selectedMPId,\n firstName,\n lastName,\n email,\n selectedTalkingPointsIds,\n personalMessage\n }\n } = state;\n const selectedMP = mps.find((mp) => mp.id === selectedMPId);\n const selectedMPParty = parties.find((p) => p.id === selectedMP.partyId);\n const selectedMPElectorate = electorates.find(\n (e) => e.id === selectedMP.electorateId\n );\n\n const messageData = {\n mpName: selectedMP.name,\n talkingPoints: selectedTalkingPointsIds\n .map(\n (stp) =>\n talkingPoints.find((tp) => stp === tp.table.id).table.talking_point\n )\n .join('\\n\\n'),\n personalMessage,\n senderName: `${firstName} ${lastName}`,\n senderEmail: email,\n party:\n selectedPartyId === selectedMP.partyId ? selectedMPParty.name : false,\n electorate:\n selectedElectorateId === selectedMP.electorateId\n ? selectedMPElectorate.name\n : false\n };\n\n return template(emailTemplate)(messageData);\n};\n","import { merge, pick } from 'lodash';\nimport Bugsnag from '@bugsnag/js';\nimport { generateEmailMessage, generateEmailSubject } from './helpers';\n\nexport const defaultState = {\n // userInput\n userInput: {\n selectedElectorateId: undefined,\n selectedPartyId: undefined,\n selectedMPId: undefined,\n selectedTalkingPointsIds: [],\n firstName: '',\n lastName: '',\n email: '',\n postal_address: '',\n personalMessage: '',\n question_answer: null,\n message: undefined\n },\n // Submission state\n processingSendEmail: false,\n sendEmailComplete: false,\n sendEmailErrorMessage: ''\n};\n\nconst createModel = (initialState = {}) => ({\n // Use defaultState and override with initialState is passed in\n // Use merge rather than spreading since 's recursive\n state: merge(defaultState, initialState),\n reducers: {\n setUserInput(state, updatedUserInput) {\n return {\n ...state,\n userInput: { ...state.userInput, ...updatedUserInput }\n };\n },\n generateAndSetEmailMessage(state) {\n return {\n ...state,\n userInput: {\n ...state.userInput,\n message: generateEmailMessage(state),\n subject: generateEmailSubject(state)\n }\n };\n },\n sendEmailRequest(state) {\n return {\n ...state,\n processingSendEmail: true,\n sendEmailComplete: false,\n sendEmailErrorMessage: ''\n };\n },\n sendEmailComplete(state) {\n return {\n ...state,\n sendEmailComplete: true,\n processingSendEmail: false\n };\n },\n sendEmailError(state, sendEmailErrorMessage) {\n return {\n ...state,\n processingSendEmail: false,\n sendEmailComplete: false,\n sendEmailErrorMessage\n };\n }\n },\n effects: (dispatch) => ({\n async sendEmail(_payload, rootState) {\n let payload;\n try {\n dispatch.mailToTarget.sendEmailRequest();\n\n const { userInput, aid, url, queryStringParameters } =\n rootState.mailToTarget;\n\n payload = {\n aid,\n first_name: userInput.firstName,\n last_name: userInput.lastName,\n email: userInput.email,\n postal_address: userInput.postal_address,\n mp: userInput.selectedMPId,\n subject: userInput.subject,\n message: userInput.message,\n question_answer: userInput.question_answer,\n party: userInput.selectedPartyId,\n electorate: userInput.selectedElectorateId,\n url,\n ...pick(\n queryStringParameters,\n 'utm_source',\n 'utm_medium',\n 'utm_campaign',\n 'utm_term',\n 'utm_content'\n )\n };\n console.log(payload);\n\n const response = await fetch('/action/email', {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'X-CSRF-Token': document.head.querySelector(\"[name='csrf-token']\")\n .attributes['content'].value\n },\n credentials: 'same-origin',\n body: JSON.stringify(payload)\n });\n\n const responseJSON = await response.json();\n\n if (response.status === 200) {\n dispatch.mailToTarget.sendEmailComplete();\n } else if (response.status === 422) {\n const errorMessages = Object.values(responseJSON).join(', ');\n dispatch.mailToTarget.sendEmailError(errorMessages);\n } else {\n throw Error(responseJSON);\n }\n } catch (error) {\n // TODO - bugsnag\n Bugsnag.notify(error, (event) => {\n event.addMetadata('redux state', {\n ...pick(rootState.mailToTarget, 'aid', 'url', 'userInput')\n });\n });\n console.log(error);\n dispatch.mailToTarget.sendEmailError(\n 'An error has occurred sending your email. If this problem continues, please email us at info@actionstation.org.nz'\n );\n }\n }\n })\n});\n\nexport default createModel;\n","import { init } from '@rematch/core';\nimport createModel from './create-model';\n\nconst createStore = (initialState) => {\n return init({\n models: {\n mailToTarget: createModel(initialState)\n }\n });\n};\n\nexport default createStore;\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\n/**\n * Similar to invariant but only logs a warning if the condition is not met.\n * This can be used to log issues in development environments in critical\n * paths. Removing the logging code for production environments will keep the\n * same logic and follow the same code paths.\n */\n\nvar __DEV__ = process.env.NODE_ENV !== 'production';\n\nvar warning = function() {};\n\nif (__DEV__) {\n var printWarning = function printWarning(format, args) {\n var len = arguments.length;\n args = new Array(len > 1 ? len - 1 : 0);\n for (var key = 1; key < len; key++) {\n args[key - 1] = arguments[key];\n }\n var argIndex = 0;\n var message = 'Warning: ' +\n format.replace(/%s/g, function() {\n return args[argIndex++];\n });\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n }\n\n warning = function(condition, format, args) {\n var len = arguments.length;\n args = new Array(len > 2 ? len - 2 : 0);\n for (var key = 2; key < len; key++) {\n args[key - 2] = arguments[key];\n }\n if (format === undefined) {\n throw new Error(\n '`warning(condition, format, ...args)` requires a warning ' +\n 'message argument'\n );\n }\n if (!condition) {\n printWarning.apply(null, [format].concat(args));\n }\n };\n}\n\nmodule.exports = warning;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","function isAbsolute(pathname) {\n return pathname.charAt(0) === '/';\n}\n\n// About 1.5x faster than the two-arg version of Array#splice()\nfunction spliceOne(list, index) {\n for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {\n list[i] = list[k];\n }\n\n list.pop();\n}\n\n// This implementation is based heavily on node's url.parse\nfunction resolvePathname(to, from) {\n if (from === undefined) from = '';\n\n var toParts = (to && to.split('/')) || [];\n var fromParts = (from && from.split('/')) || [];\n\n var isToAbs = to && isAbsolute(to);\n var isFromAbs = from && isAbsolute(from);\n var mustEndAbs = isToAbs || isFromAbs;\n\n if (to && isAbsolute(to)) {\n // to is absolute\n fromParts = toParts;\n } else if (toParts.length) {\n // to is relative, drop the filename\n fromParts.pop();\n fromParts = fromParts.concat(toParts);\n }\n\n if (!fromParts.length) return '/';\n\n var hasTrailingSlash;\n if (fromParts.length) {\n var last = fromParts[fromParts.length - 1];\n hasTrailingSlash = last === '.' || last === '..' || last === '';\n } else {\n hasTrailingSlash = false;\n }\n\n var up = 0;\n for (var i = fromParts.length; i >= 0; i--) {\n var part = fromParts[i];\n\n if (part === '.') {\n spliceOne(fromParts, i);\n } else if (part === '..') {\n spliceOne(fromParts, i);\n up++;\n } else if (up) {\n spliceOne(fromParts, i);\n up--;\n }\n }\n\n if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');\n\n if (\n mustEndAbs &&\n fromParts[0] !== '' &&\n (!fromParts[0] || !isAbsolute(fromParts[0]))\n )\n fromParts.unshift('');\n\n var result = fromParts.join('/');\n\n if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';\n\n return result;\n}\n\nexport default resolvePathname;\n","function valueOf(obj) {\n return obj.valueOf ? obj.valueOf() : Object.prototype.valueOf.call(obj);\n}\n\nfunction valueEqual(a, b) {\n // Test for strict equality first.\n if (a === b) return true;\n\n // Otherwise, if either of them == null they are not equal.\n if (a == null || b == null) return false;\n\n if (Array.isArray(a)) {\n return (\n Array.isArray(b) &&\n a.length === b.length &&\n a.every(function(item, index) {\n return valueEqual(item, b[index]);\n })\n );\n }\n\n if (typeof a === 'object' || typeof b === 'object') {\n var aValue = valueOf(a);\n var bValue = valueOf(b);\n\n if (aValue !== a || bValue !== b) return valueEqual(aValue, bValue);\n\n return Object.keys(Object.assign({}, a, b)).every(function(key) {\n return valueEqual(a[key], b[key]);\n });\n }\n\n return false;\n}\n\nexport default valueEqual;\n","var isProduction = process.env.NODE_ENV === 'production';\nvar prefix = 'Invariant failed';\nfunction invariant(condition, message) {\n if (condition) {\n return;\n }\n if (isProduction) {\n throw new Error(prefix);\n }\n var provided = typeof message === 'function' ? message() : message;\n var value = provided ? \"\".concat(prefix, \": \").concat(provided) : prefix;\n throw new Error(value);\n}\n\nexport { invariant as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport resolvePathname from 'resolve-pathname';\nimport valueEqual from 'value-equal';\nimport warning from 'tiny-warning';\nimport invariant from 'tiny-invariant';\n\nfunction addLeadingSlash(path) {\n return path.charAt(0) === '/' ? path : '/' + path;\n}\nfunction stripLeadingSlash(path) {\n return path.charAt(0) === '/' ? path.substr(1) : path;\n}\nfunction hasBasename(path, prefix) {\n return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;\n}\nfunction stripBasename(path, prefix) {\n return hasBasename(path, prefix) ? path.substr(prefix.length) : path;\n}\nfunction stripTrailingSlash(path) {\n return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;\n}\nfunction parsePath(path) {\n var pathname = path || '/';\n var search = '';\n var hash = '';\n var hashIndex = pathname.indexOf('#');\n\n if (hashIndex !== -1) {\n hash = pathname.substr(hashIndex);\n pathname = pathname.substr(0, hashIndex);\n }\n\n var searchIndex = pathname.indexOf('?');\n\n if (searchIndex !== -1) {\n search = pathname.substr(searchIndex);\n pathname = pathname.substr(0, searchIndex);\n }\n\n return {\n pathname: pathname,\n search: search === '?' ? '' : search,\n hash: hash === '#' ? '' : hash\n };\n}\nfunction createPath(location) {\n var pathname = location.pathname,\n search = location.search,\n hash = location.hash;\n var path = pathname || '/';\n if (search && search !== '?') path += search.charAt(0) === '?' ? search : \"?\" + search;\n if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : \"#\" + hash;\n return path;\n}\n\nfunction createLocation(path, state, key, currentLocation) {\n var location;\n\n if (typeof path === 'string') {\n // Two-arg form: push(path, state)\n location = parsePath(path);\n location.state = state;\n } else {\n // One-arg form: push(location)\n location = _extends({}, path);\n if (location.pathname === undefined) location.pathname = '';\n\n if (location.search) {\n if (location.search.charAt(0) !== '?') location.search = '?' + location.search;\n } else {\n location.search = '';\n }\n\n if (location.hash) {\n if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;\n } else {\n location.hash = '';\n }\n\n if (state !== undefined && location.state === undefined) location.state = state;\n }\n\n try {\n location.pathname = decodeURI(location.pathname);\n } catch (e) {\n if (e instanceof URIError) {\n throw new URIError('Pathname \"' + location.pathname + '\" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');\n } else {\n throw e;\n }\n }\n\n if (key) location.key = key;\n\n if (currentLocation) {\n // Resolve incomplete/relative pathname relative to current location.\n if (!location.pathname) {\n location.pathname = currentLocation.pathname;\n } else if (location.pathname.charAt(0) !== '/') {\n location.pathname = resolvePathname(location.pathname, currentLocation.pathname);\n }\n } else {\n // When there is no prior location and pathname is empty, set it to /\n if (!location.pathname) {\n location.pathname = '/';\n }\n }\n\n return location;\n}\nfunction locationsAreEqual(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash && a.key === b.key && valueEqual(a.state, b.state);\n}\n\nfunction createTransitionManager() {\n var prompt = null;\n\n function setPrompt(nextPrompt) {\n process.env.NODE_ENV !== \"production\" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;\n prompt = nextPrompt;\n return function () {\n if (prompt === nextPrompt) prompt = null;\n };\n }\n\n function confirmTransitionTo(location, action, getUserConfirmation, callback) {\n // TODO: If another transition starts while we're still confirming\n // the previous one, we may end up in a weird state. Figure out the\n // best way to handle this.\n if (prompt != null) {\n var result = typeof prompt === 'function' ? prompt(location, action) : prompt;\n\n if (typeof result === 'string') {\n if (typeof getUserConfirmation === 'function') {\n getUserConfirmation(result, callback);\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;\n callback(true);\n }\n } else {\n // Return false from a transition hook to cancel the transition.\n callback(result !== false);\n }\n } else {\n callback(true);\n }\n }\n\n var listeners = [];\n\n function appendListener(fn) {\n var isActive = true;\n\n function listener() {\n if (isActive) fn.apply(void 0, arguments);\n }\n\n listeners.push(listener);\n return function () {\n isActive = false;\n listeners = listeners.filter(function (item) {\n return item !== listener;\n });\n };\n }\n\n function notifyListeners() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n listeners.forEach(function (listener) {\n return listener.apply(void 0, args);\n });\n }\n\n return {\n setPrompt: setPrompt,\n confirmTransitionTo: confirmTransitionTo,\n appendListener: appendListener,\n notifyListeners: notifyListeners\n };\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nfunction getConfirmation(message, callback) {\n callback(window.confirm(message)); // eslint-disable-line no-alert\n}\n/**\n * Returns true if the HTML5 history API is supported. Taken from Modernizr.\n *\n * https://github.com/Modernizr/Modernizr/blob/master/LICENSE\n * https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js\n * changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586\n */\n\nfunction supportsHistory() {\n var ua = window.navigator.userAgent;\n if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;\n return window.history && 'pushState' in window.history;\n}\n/**\n * Returns true if browser fires popstate on hash change.\n * IE10 and IE11 do not.\n */\n\nfunction supportsPopStateOnHashChange() {\n return window.navigator.userAgent.indexOf('Trident') === -1;\n}\n/**\n * Returns false if using go(n) with hash history causes a full page reload.\n */\n\nfunction supportsGoWithoutReloadUsingHash() {\n return window.navigator.userAgent.indexOf('Firefox') === -1;\n}\n/**\n * Returns true if a given popstate event is an extraneous WebKit event.\n * Accounts for the fact that Chrome on iOS fires real popstate events\n * containing undefined state when pressing the back button.\n */\n\nfunction isExtraneousPopstateEvent(event) {\n return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;\n}\n\nvar PopStateEvent = 'popstate';\nvar HashChangeEvent = 'hashchange';\n\nfunction getHistoryState() {\n try {\n return window.history.state || {};\n } catch (e) {\n // IE 11 sometimes throws when accessing window.history.state\n // See https://github.com/ReactTraining/history/pull/289\n return {};\n }\n}\n/**\n * Creates a history object that uses the HTML5 history API including\n * pushState, replaceState, and the popstate event.\n */\n\n\nfunction createBrowserHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canUseHistory = supportsHistory();\n var needsHashChangeListener = !supportsPopStateOnHashChange();\n var _props = props,\n _props$forceRefresh = _props.forceRefresh,\n forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n\n function getDOMLocation(historyState) {\n var _ref = historyState || {},\n key = _ref.key,\n state = _ref.state;\n\n var _window$location = window.location,\n pathname = _window$location.pathname,\n search = _window$location.search,\n hash = _window$location.hash;\n var path = pathname + search + hash;\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path, state, key);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function handlePopState(event) {\n // Ignore extraneous popstate events in WebKit.\n if (isExtraneousPopstateEvent(event)) return;\n handlePop(getDOMLocation(event.state));\n }\n\n function handleHashChange() {\n handlePop(getDOMLocation(getHistoryState()));\n }\n\n var forceNextPop = false;\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of keys we've seen in sessionStorage.\n // Instead, we just default to 0 for keys we don't know.\n\n var toIndex = allKeys.indexOf(toLocation.key);\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allKeys.indexOf(fromLocation.key);\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n }\n\n var initialLocation = getDOMLocation(getHistoryState());\n var allKeys = [initialLocation.key]; // Public interface\n\n function createHref(location) {\n return basename + createPath(location);\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.pushState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.href = href;\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n var nextKeys = allKeys.slice(0, prevIndex + 1);\n nextKeys.push(location.key);\n allKeys = nextKeys;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;\n window.location.href = href;\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var href = createHref(location);\n var key = location.key,\n state = location.state;\n\n if (canUseHistory) {\n globalHistory.replaceState({\n key: key,\n state: state\n }, null, href);\n\n if (forceRefresh) {\n window.location.replace(href);\n } else {\n var prevIndex = allKeys.indexOf(history.location.key);\n if (prevIndex !== -1) allKeys[prevIndex] = location.key;\n setState({\n action: action,\n location: location\n });\n }\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;\n window.location.replace(href);\n }\n });\n }\n\n function go(n) {\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(PopStateEvent, handlePopState);\n if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nvar HashChangeEvent$1 = 'hashchange';\nvar HashPathCoders = {\n hashbang: {\n encodePath: function encodePath(path) {\n return path.charAt(0) === '!' ? path : '!/' + stripLeadingSlash(path);\n },\n decodePath: function decodePath(path) {\n return path.charAt(0) === '!' ? path.substr(1) : path;\n }\n },\n noslash: {\n encodePath: stripLeadingSlash,\n decodePath: addLeadingSlash\n },\n slash: {\n encodePath: addLeadingSlash,\n decodePath: addLeadingSlash\n }\n};\n\nfunction stripHash(url) {\n var hashIndex = url.indexOf('#');\n return hashIndex === -1 ? url : url.slice(0, hashIndex);\n}\n\nfunction getHashPath() {\n // We can't use window.location.hash here because it's not\n // consistent across browsers - Firefox will pre-decode it!\n var href = window.location.href;\n var hashIndex = href.indexOf('#');\n return hashIndex === -1 ? '' : href.substring(hashIndex + 1);\n}\n\nfunction pushHashPath(path) {\n window.location.hash = path;\n}\n\nfunction replaceHashPath(path) {\n window.location.replace(stripHash(window.location.href) + '#' + path);\n}\n\nfunction createHashHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n !canUseDOM ? process.env.NODE_ENV !== \"production\" ? invariant(false, 'Hash history needs a DOM') : invariant(false) : void 0;\n var globalHistory = window.history;\n var canGoWithoutReload = supportsGoWithoutReloadUsingHash();\n var _props = props,\n _props$getUserConfirm = _props.getUserConfirmation,\n getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,\n _props$hashType = _props.hashType,\n hashType = _props$hashType === void 0 ? 'slash' : _props$hashType;\n var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';\n var _HashPathCoders$hashT = HashPathCoders[hashType],\n encodePath = _HashPathCoders$hashT.encodePath,\n decodePath = _HashPathCoders$hashT.decodePath;\n\n function getDOMLocation() {\n var path = decodePath(getHashPath());\n process.env.NODE_ENV !== \"production\" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path \"' + path + '\" to begin with \"' + basename + '\".') : void 0;\n if (basename) path = stripBasename(path, basename);\n return createLocation(path);\n }\n\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = globalHistory.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n var forceNextPop = false;\n var ignorePath = null;\n\n function locationsAreEqual$$1(a, b) {\n return a.pathname === b.pathname && a.search === b.search && a.hash === b.hash;\n }\n\n function handleHashChange() {\n var path = getHashPath();\n var encodedPath = encodePath(path);\n\n if (path !== encodedPath) {\n // Ensure we always have a properly-encoded hash.\n replaceHashPath(encodedPath);\n } else {\n var location = getDOMLocation();\n var prevLocation = history.location;\n if (!forceNextPop && locationsAreEqual$$1(prevLocation, location)) return; // A hashchange doesn't always == location change.\n\n if (ignorePath === createPath(location)) return; // Ignore this change; we already setState in push/replace.\n\n ignorePath = null;\n handlePop(location);\n }\n }\n\n function handlePop(location) {\n if (forceNextPop) {\n forceNextPop = false;\n setState();\n } else {\n var action = 'POP';\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location\n });\n } else {\n revertPop(location);\n }\n });\n }\n }\n\n function revertPop(fromLocation) {\n var toLocation = history.location; // TODO: We could probably make this more reliable by\n // keeping a list of paths we've seen in sessionStorage.\n // Instead, we just default to 0 for paths we don't know.\n\n var toIndex = allPaths.lastIndexOf(createPath(toLocation));\n if (toIndex === -1) toIndex = 0;\n var fromIndex = allPaths.lastIndexOf(createPath(fromLocation));\n if (fromIndex === -1) fromIndex = 0;\n var delta = toIndex - fromIndex;\n\n if (delta) {\n forceNextPop = true;\n go(delta);\n }\n } // Ensure the hash is encoded properly before doing anything else.\n\n\n var path = getHashPath();\n var encodedPath = encodePath(path);\n if (path !== encodedPath) replaceHashPath(encodedPath);\n var initialLocation = getDOMLocation();\n var allPaths = [createPath(initialLocation)]; // Public interface\n\n function createHref(location) {\n var baseTag = document.querySelector('base');\n var href = '';\n\n if (baseTag && baseTag.getAttribute('href')) {\n href = stripHash(window.location.href);\n }\n\n return href + '#' + encodePath(basename + createPath(location));\n }\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot push state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a PUSH, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n pushHashPath(encodedPath);\n var prevIndex = allPaths.lastIndexOf(createPath(history.location));\n var nextPaths = allPaths.slice(0, prevIndex + 1);\n nextPaths.push(path);\n allPaths = nextPaths;\n setState({\n action: action,\n location: location\n });\n } else {\n process.env.NODE_ENV !== \"production\" ? warning(false, 'Hash history cannot PUSH the same path; a new entry will not be added to the history stack') : void 0;\n setState();\n }\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(state === undefined, 'Hash history cannot replace state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, undefined, undefined, history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var path = createPath(location);\n var encodedPath = encodePath(basename + path);\n var hashChanged = getHashPath() !== encodedPath;\n\n if (hashChanged) {\n // We cannot tell if a hashchange was caused by a REPLACE, so we'd\n // rather setState here and ignore the hashchange. The caveat here\n // is that other hash histories in the page will consider it a POP.\n ignorePath = path;\n replaceHashPath(encodedPath);\n }\n\n var prevIndex = allPaths.indexOf(createPath(history.location));\n if (prevIndex !== -1) allPaths[prevIndex] = path;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n process.env.NODE_ENV !== \"production\" ? warning(canGoWithoutReload, 'Hash history go(n) causes a full page reload in this browser') : void 0;\n globalHistory.go(n);\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n var listenerCount = 0;\n\n function checkDOMListeners(delta) {\n listenerCount += delta;\n\n if (listenerCount === 1 && delta === 1) {\n window.addEventListener(HashChangeEvent$1, handleHashChange);\n } else if (listenerCount === 0) {\n window.removeEventListener(HashChangeEvent$1, handleHashChange);\n }\n }\n\n var isBlocked = false;\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n var unblock = transitionManager.setPrompt(prompt);\n\n if (!isBlocked) {\n checkDOMListeners(1);\n isBlocked = true;\n }\n\n return function () {\n if (isBlocked) {\n isBlocked = false;\n checkDOMListeners(-1);\n }\n\n return unblock();\n };\n }\n\n function listen(listener) {\n var unlisten = transitionManager.appendListener(listener);\n checkDOMListeners(1);\n return function () {\n checkDOMListeners(-1);\n unlisten();\n };\n }\n\n var history = {\n length: globalHistory.length,\n action: 'POP',\n location: initialLocation,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n block: block,\n listen: listen\n };\n return history;\n}\n\nfunction clamp(n, lowerBound, upperBound) {\n return Math.min(Math.max(n, lowerBound), upperBound);\n}\n/**\n * Creates a history object that stores locations in memory.\n */\n\n\nfunction createMemoryHistory(props) {\n if (props === void 0) {\n props = {};\n }\n\n var _props = props,\n getUserConfirmation = _props.getUserConfirmation,\n _props$initialEntries = _props.initialEntries,\n initialEntries = _props$initialEntries === void 0 ? ['/'] : _props$initialEntries,\n _props$initialIndex = _props.initialIndex,\n initialIndex = _props$initialIndex === void 0 ? 0 : _props$initialIndex,\n _props$keyLength = _props.keyLength,\n keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;\n var transitionManager = createTransitionManager();\n\n function setState(nextState) {\n _extends(history, nextState);\n\n history.length = history.entries.length;\n transitionManager.notifyListeners(history.location, history.action);\n }\n\n function createKey() {\n return Math.random().toString(36).substr(2, keyLength);\n }\n\n var index = clamp(initialIndex, 0, initialEntries.length - 1);\n var entries = initialEntries.map(function (entry) {\n return typeof entry === 'string' ? createLocation(entry, undefined, createKey()) : createLocation(entry, undefined, entry.key || createKey());\n }); // Public interface\n\n var createHref = createPath;\n\n function push(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'PUSH';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n var prevIndex = history.index;\n var nextIndex = prevIndex + 1;\n var nextEntries = history.entries.slice(0);\n\n if (nextEntries.length > nextIndex) {\n nextEntries.splice(nextIndex, nextEntries.length - nextIndex, location);\n } else {\n nextEntries.push(location);\n }\n\n setState({\n action: action,\n location: location,\n index: nextIndex,\n entries: nextEntries\n });\n });\n }\n\n function replace(path, state) {\n process.env.NODE_ENV !== \"production\" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;\n var action = 'REPLACE';\n var location = createLocation(path, state, createKey(), history.location);\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (!ok) return;\n history.entries[history.index] = location;\n setState({\n action: action,\n location: location\n });\n });\n }\n\n function go(n) {\n var nextIndex = clamp(history.index + n, 0, history.entries.length - 1);\n var action = 'POP';\n var location = history.entries[nextIndex];\n transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {\n if (ok) {\n setState({\n action: action,\n location: location,\n index: nextIndex\n });\n } else {\n // Mimic the behavior of DOM histories by\n // causing a render after a cancelled POP.\n setState();\n }\n });\n }\n\n function goBack() {\n go(-1);\n }\n\n function goForward() {\n go(1);\n }\n\n function canGo(n) {\n var nextIndex = history.index + n;\n return nextIndex >= 0 && nextIndex < history.entries.length;\n }\n\n function block(prompt) {\n if (prompt === void 0) {\n prompt = false;\n }\n\n return transitionManager.setPrompt(prompt);\n }\n\n function listen(listener) {\n return transitionManager.appendListener(listener);\n }\n\n var history = {\n length: entries.length,\n action: 'POP',\n location: entries[index],\n index: index,\n entries: entries,\n createHref: createHref,\n push: push,\n replace: replace,\n go: go,\n goBack: goBack,\n goForward: goForward,\n canGo: canGo,\n block: block,\n listen: listen\n };\n return history;\n}\n\nexport { createBrowserHistory, createHashHistory, createMemoryHistory, createLocation, locationsAreEqual, parsePath, createPath };\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","var _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\n\n/**\n * The public API for putting history on context.\n */\n\nvar Router = function (_React$Component) {\n _inherits(Router, _React$Component);\n\n function Router() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Router);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props.history.location.pathname)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Router.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n history: this.props.history,\n route: {\n location: this.props.history.location,\n match: this.state.match\n }\n })\n };\n };\n\n Router.prototype.computeMatch = function computeMatch(pathname) {\n return {\n path: \"/\",\n url: \"/\",\n params: {},\n isExact: pathname === \"/\"\n };\n };\n\n Router.prototype.componentWillMount = function componentWillMount() {\n var _this2 = this;\n\n var _props = this.props,\n children = _props.children,\n history = _props.history;\n\n\n invariant(children == null || React.Children.count(children) === 1, \"A may have only one child element\");\n\n // Do this here so we can setState when a changes the\n // location in componentWillMount. This happens e.g. when doing\n // server rendering using a .\n this.unlisten = history.listen(function () {\n _this2.setState({\n match: _this2.computeMatch(history.location.pathname)\n });\n });\n };\n\n Router.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(this.props.history === nextProps.history, \"You cannot change \");\n };\n\n Router.prototype.componentWillUnmount = function componentWillUnmount() {\n this.unlisten();\n };\n\n Router.prototype.render = function render() {\n var children = this.props.children;\n\n return children ? React.Children.only(children) : null;\n };\n\n return Router;\n}(React.Component);\n\nRouter.propTypes = {\n history: PropTypes.object.isRequired,\n children: PropTypes.node\n};\nRouter.contextTypes = {\n router: PropTypes.object\n};\nRouter.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Router;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport { createBrowserHistory as createHistory } from \"history\";\nimport Router from \"./Router\";\n\n/**\n * The public API for a that uses HTML5 history.\n */\n\nvar BrowserRouter = function (_React$Component) {\n _inherits(BrowserRouter, _React$Component);\n\n function BrowserRouter() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, BrowserRouter);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.history = createHistory(_this.props), _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n BrowserRouter.prototype.componentWillMount = function componentWillMount() {\n warning(!this.props.history, \" ignores the history prop. To use a custom history, \" + \"use `import { Router }` instead of `import { BrowserRouter as Router }`.\");\n };\n\n BrowserRouter.prototype.render = function render() {\n return React.createElement(Router, { history: this.history, children: this.props.children });\n };\n\n return BrowserRouter;\n}(React.Component);\n\nBrowserRouter.propTypes = {\n basename: PropTypes.string,\n forceRefresh: PropTypes.bool,\n getUserConfirmation: PropTypes.func,\n keyLength: PropTypes.number,\n children: PropTypes.node\n};\n\n\nexport default BrowserRouter;","var _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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport invariant from \"invariant\";\nimport { createLocation } from \"history\";\n\nvar isModifiedEvent = function isModifiedEvent(event) {\n return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);\n};\n\n/**\n * The public API for rendering a history-aware .\n */\n\nvar Link = function (_React$Component) {\n _inherits(Link, _React$Component);\n\n function Link() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Link);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.handleClick = function (event) {\n if (_this.props.onClick) _this.props.onClick(event);\n\n if (!event.defaultPrevented && // onClick prevented default\n event.button === 0 && // ignore everything but left clicks\n !_this.props.target && // let browser handle \"target=_blank\" etc.\n !isModifiedEvent(event) // ignore clicks with modifier keys\n ) {\n event.preventDefault();\n\n var history = _this.context.router.history;\n var _this$props = _this.props,\n replace = _this$props.replace,\n to = _this$props.to;\n\n\n if (replace) {\n history.replace(to);\n } else {\n history.push(to);\n }\n }\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Link.prototype.render = function render() {\n var _props = this.props,\n replace = _props.replace,\n to = _props.to,\n innerRef = _props.innerRef,\n props = _objectWithoutProperties(_props, [\"replace\", \"to\", \"innerRef\"]); // eslint-disable-line no-unused-vars\n\n invariant(this.context.router, \"You should not use outside a \");\n\n invariant(to !== undefined, 'You must specify the \"to\" property');\n\n var history = this.context.router.history;\n\n var location = typeof to === \"string\" ? createLocation(to, null, null, history.location) : to;\n\n var href = history.createHref(location);\n return React.createElement(\"a\", _extends({}, props, { onClick: this.handleClick, href: href, ref: innerRef }));\n };\n\n return Link;\n}(React.Component);\n\nLink.propTypes = {\n onClick: PropTypes.func,\n target: PropTypes.string,\n replace: PropTypes.bool,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired,\n innerRef: PropTypes.oneOfType([PropTypes.string, PropTypes.func])\n};\nLink.defaultProps = {\n replace: false\n};\nLink.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired,\n createHref: PropTypes.func.isRequired\n }).isRequired\n }).isRequired\n};\n\n\nexport default Link;","module.exports = Array.isArray || function (arr) {\n return Object.prototype.toString.call(arr) == '[object Array]';\n};\n","var isarray = require('isarray')\n\n/**\n * Expose `pathToRegexp`.\n */\nmodule.exports = pathToRegexp\nmodule.exports.parse = parse\nmodule.exports.compile = compile\nmodule.exports.tokensToFunction = tokensToFunction\nmodule.exports.tokensToRegExp = tokensToRegExp\n\n/**\n * The main path matching regexp utility.\n *\n * @type {RegExp}\n */\nvar PATH_REGEXP = new RegExp([\n // Match escaped characters that would otherwise appear in future matches.\n // This allows the user to escape special characters that won't transform.\n '(\\\\\\\\.)',\n // Match Express-style parameters and un-named parameters with a prefix\n // and optional suffixes. Matches appear as:\n //\n // \"/:test(\\\\d+)?\" => [\"/\", \"test\", \"\\d+\", undefined, \"?\", undefined]\n // \"/route(\\\\d+)\" => [undefined, undefined, undefined, \"\\d+\", undefined, undefined]\n // \"/*\" => [\"/\", undefined, undefined, undefined, undefined, \"*\"]\n '([\\\\/.])?(?:(?:\\\\:(\\\\w+)(?:\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))?|\\\\(((?:\\\\\\\\.|[^\\\\\\\\()])+)\\\\))([+*?])?|(\\\\*))'\n].join('|'), 'g')\n\n/**\n * Parse a string for the raw tokens.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!Array}\n */\nfunction parse (str, options) {\n var tokens = []\n var key = 0\n var index = 0\n var path = ''\n var defaultDelimiter = options && options.delimiter || '/'\n var res\n\n while ((res = PATH_REGEXP.exec(str)) != null) {\n var m = res[0]\n var escaped = res[1]\n var offset = res.index\n path += str.slice(index, offset)\n index = offset + m.length\n\n // Ignore already escaped sequences.\n if (escaped) {\n path += escaped[1]\n continue\n }\n\n var next = str[index]\n var prefix = res[2]\n var name = res[3]\n var capture = res[4]\n var group = res[5]\n var modifier = res[6]\n var asterisk = res[7]\n\n // Push the current path onto the tokens.\n if (path) {\n tokens.push(path)\n path = ''\n }\n\n var partial = prefix != null && next != null && next !== prefix\n var repeat = modifier === '+' || modifier === '*'\n var optional = modifier === '?' || modifier === '*'\n var delimiter = prefix || defaultDelimiter\n var pattern = capture || group\n var prevText = prefix || (typeof tokens[tokens.length - 1] === 'string' ? tokens[tokens.length - 1] : '')\n\n tokens.push({\n name: name || key++,\n prefix: prefix || '',\n delimiter: delimiter,\n optional: optional,\n repeat: repeat,\n partial: partial,\n asterisk: !!asterisk,\n pattern: pattern ? escapeGroup(pattern) : (asterisk ? '.*' : restrictBacktrack(delimiter, prevText))\n })\n }\n\n // Match any characters still remaining.\n if (index < str.length) {\n path += str.substr(index)\n }\n\n // If the path exists, push it onto the end.\n if (path) {\n tokens.push(path)\n }\n\n return tokens\n}\n\nfunction restrictBacktrack(delimiter, prevText) {\n if (!prevText || prevText.indexOf(delimiter) > -1) {\n return '[^' + escapeString(delimiter) + ']+?'\n }\n\n return escapeString(prevText) + '|(?:(?!' + escapeString(prevText) + ')[^' + escapeString(delimiter) + '])+?'\n}\n\n/**\n * Compile a string to a template function for the path.\n *\n * @param {string} str\n * @param {Object=} options\n * @return {!function(Object=, Object=)}\n */\nfunction compile (str, options) {\n return tokensToFunction(parse(str, options), options)\n}\n\n/**\n * Prettier encoding of URI path segments.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeURIComponentPretty (str) {\n return encodeURI(str).replace(/[\\/?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Encode the asterisk parameter. Similar to `pretty`, but allows slashes.\n *\n * @param {string}\n * @return {string}\n */\nfunction encodeAsterisk (str) {\n return encodeURI(str).replace(/[?#]/g, function (c) {\n return '%' + c.charCodeAt(0).toString(16).toUpperCase()\n })\n}\n\n/**\n * Expose a method for transforming tokens into the path function.\n */\nfunction tokensToFunction (tokens, options) {\n // Compile all the tokens into regexps.\n var matches = new Array(tokens.length)\n\n // Compile all the patterns before compilation.\n for (var i = 0; i < tokens.length; i++) {\n if (typeof tokens[i] === 'object') {\n matches[i] = new RegExp('^(?:' + tokens[i].pattern + ')$', flags(options))\n }\n }\n\n return function (obj, opts) {\n var path = ''\n var data = obj || {}\n var options = opts || {}\n var encode = options.pretty ? encodeURIComponentPretty : encodeURIComponent\n\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n path += token\n\n continue\n }\n\n var value = data[token.name]\n var segment\n\n if (value == null) {\n if (token.optional) {\n // Prepend partial segment prefixes.\n if (token.partial) {\n path += token.prefix\n }\n\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to be defined')\n }\n }\n\n if (isarray(value)) {\n if (!token.repeat) {\n throw new TypeError('Expected \"' + token.name + '\" to not repeat, but received `' + JSON.stringify(value) + '`')\n }\n\n if (value.length === 0) {\n if (token.optional) {\n continue\n } else {\n throw new TypeError('Expected \"' + token.name + '\" to not be empty')\n }\n }\n\n for (var j = 0; j < value.length; j++) {\n segment = encode(value[j])\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected all \"' + token.name + '\" to match \"' + token.pattern + '\", but received `' + JSON.stringify(segment) + '`')\n }\n\n path += (j === 0 ? token.prefix : token.delimiter) + segment\n }\n\n continue\n }\n\n segment = token.asterisk ? encodeAsterisk(value) : encode(value)\n\n if (!matches[i].test(segment)) {\n throw new TypeError('Expected \"' + token.name + '\" to match \"' + token.pattern + '\", but received \"' + segment + '\"')\n }\n\n path += token.prefix + segment\n }\n\n return path\n }\n}\n\n/**\n * Escape a regular expression string.\n *\n * @param {string} str\n * @return {string}\n */\nfunction escapeString (str) {\n return str.replace(/([.+*?=^!:${}()[\\]|\\/\\\\])/g, '\\\\$1')\n}\n\n/**\n * Escape the capturing group by escaping special characters and meaning.\n *\n * @param {string} group\n * @return {string}\n */\nfunction escapeGroup (group) {\n return group.replace(/([=!:$\\/()])/g, '\\\\$1')\n}\n\n/**\n * Attach the keys as a property of the regexp.\n *\n * @param {!RegExp} re\n * @param {Array} keys\n * @return {!RegExp}\n */\nfunction attachKeys (re, keys) {\n re.keys = keys\n return re\n}\n\n/**\n * Get the flags for a regexp from the options.\n *\n * @param {Object} options\n * @return {string}\n */\nfunction flags (options) {\n return options && options.sensitive ? '' : 'i'\n}\n\n/**\n * Pull out keys from a regexp.\n *\n * @param {!RegExp} path\n * @param {!Array} keys\n * @return {!RegExp}\n */\nfunction regexpToRegexp (path, keys) {\n // Use a negative lookahead to match only capturing groups.\n var groups = path.source.match(/\\((?!\\?)/g)\n\n if (groups) {\n for (var i = 0; i < groups.length; i++) {\n keys.push({\n name: i,\n prefix: null,\n delimiter: null,\n optional: false,\n repeat: false,\n partial: false,\n asterisk: false,\n pattern: null\n })\n }\n }\n\n return attachKeys(path, keys)\n}\n\n/**\n * Transform an array into a regexp.\n *\n * @param {!Array} path\n * @param {Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction arrayToRegexp (path, keys, options) {\n var parts = []\n\n for (var i = 0; i < path.length; i++) {\n parts.push(pathToRegexp(path[i], keys, options).source)\n }\n\n var regexp = new RegExp('(?:' + parts.join('|') + ')', flags(options))\n\n return attachKeys(regexp, keys)\n}\n\n/**\n * Create a path regexp from string input.\n *\n * @param {string} path\n * @param {!Array} keys\n * @param {!Object} options\n * @return {!RegExp}\n */\nfunction stringToRegexp (path, keys, options) {\n return tokensToRegExp(parse(path, options), keys, options)\n}\n\n/**\n * Expose a function for taking tokens and returning a RegExp.\n *\n * @param {!Array} tokens\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction tokensToRegExp (tokens, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n var strict = options.strict\n var end = options.end !== false\n var route = ''\n\n // Iterate over the tokens and create our regexp string.\n for (var i = 0; i < tokens.length; i++) {\n var token = tokens[i]\n\n if (typeof token === 'string') {\n route += escapeString(token)\n } else {\n var prefix = escapeString(token.prefix)\n var capture = '(?:' + token.pattern + ')'\n\n keys.push(token)\n\n if (token.repeat) {\n capture += '(?:' + prefix + capture + ')*'\n }\n\n if (token.optional) {\n if (!token.partial) {\n capture = '(?:' + prefix + '(' + capture + '))?'\n } else {\n capture = prefix + '(' + capture + ')?'\n }\n } else {\n capture = prefix + '(' + capture + ')'\n }\n\n route += capture\n }\n }\n\n var delimiter = escapeString(options.delimiter || '/')\n var endsWithDelimiter = route.slice(-delimiter.length) === delimiter\n\n // In non-strict mode we allow a slash at the end of match. If the path to\n // match already ends with a slash, we remove it for consistency. The slash\n // is valid at the end of a path match, not in the middle. This is important\n // in non-ending mode, where \"/test/\" shouldn't match \"/test//route\".\n if (!strict) {\n route = (endsWithDelimiter ? route.slice(0, -delimiter.length) : route) + '(?:' + delimiter + '(?=$))?'\n }\n\n if (end) {\n route += '$'\n } else {\n // In non-ending mode, we need the capturing groups to match as much as\n // possible by using a positive lookahead to the end or next path segment.\n route += strict && endsWithDelimiter ? '' : '(?=' + delimiter + '|$)'\n }\n\n return attachKeys(new RegExp('^' + route, flags(options)), keys)\n}\n\n/**\n * Normalize the given path string, returning a regular expression.\n *\n * An empty array can be passed in for the keys, which will hold the\n * placeholder key descriptions. For example, using `/user/:id`, `keys` will\n * contain `[{ name: 'id', delimiter: '/', optional: false, repeat: false }]`.\n *\n * @param {(string|RegExp|Array)} path\n * @param {(Array|Object)=} keys\n * @param {Object=} options\n * @return {!RegExp}\n */\nfunction pathToRegexp (path, keys, options) {\n if (!isarray(keys)) {\n options = /** @type {!Object} */ (keys || options)\n keys = []\n }\n\n options = options || {}\n\n if (path instanceof RegExp) {\n return regexpToRegexp(path, /** @type {!Array} */ (keys))\n }\n\n if (isarray(path)) {\n return arrayToRegexp(/** @type {!Array} */ (path), /** @type {!Array} */ (keys), options)\n }\n\n return stringToRegexp(/** @type {string} */ (path), /** @type {!Array} */ (keys), options)\n}\n","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compilePath = function compilePath(pattern, options) {\n var cacheKey = \"\" + options.end + options.strict + options.sensitive;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var keys = [];\n var re = pathToRegexp(pattern, keys, options);\n var compiledPattern = { re: re, keys: keys };\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledPattern;\n cacheCount++;\n }\n\n return compiledPattern;\n};\n\n/**\n * Public API for matching a URL pathname to a path pattern.\n */\nvar matchPath = function matchPath(pathname) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var parent = arguments[2];\n\n if (typeof options === \"string\") options = { path: options };\n\n var _options = options,\n path = _options.path,\n _options$exact = _options.exact,\n exact = _options$exact === undefined ? false : _options$exact,\n _options$strict = _options.strict,\n strict = _options$strict === undefined ? false : _options$strict,\n _options$sensitive = _options.sensitive,\n sensitive = _options$sensitive === undefined ? false : _options$sensitive;\n\n\n if (path == null) return parent;\n\n var _compilePath = compilePath(path, { end: exact, strict: strict, sensitive: sensitive }),\n re = _compilePath.re,\n keys = _compilePath.keys;\n\n var match = re.exec(pathname);\n\n if (!match) return null;\n\n var url = match[0],\n values = match.slice(1);\n\n var isExact = pathname === url;\n\n if (exact && !isExact) return null;\n\n return {\n path: path, // the path pattern used to match\n url: path === \"/\" && url === \"\" ? \"/\" : url, // the matched portion of the URL\n isExact: isExact, // whether or not we matched exactly\n params: keys.reduce(function (memo, key, index) {\n memo[key.name] = values[index];\n return memo;\n }, {})\n };\n};\n\nexport default matchPath;","var _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport matchPath from \"./matchPath\";\n\nvar isEmptyChildren = function isEmptyChildren(children) {\n return React.Children.count(children) === 0;\n};\n\n/**\n * The public API for matching a single path and rendering.\n */\n\nvar Route = function (_React$Component) {\n _inherits(Route, _React$Component);\n\n function Route() {\n var _temp, _this, _ret;\n\n _classCallCheck(this, Route);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = _possibleConstructorReturn(this, _React$Component.call.apply(_React$Component, [this].concat(args))), _this), _this.state = {\n match: _this.computeMatch(_this.props, _this.context.router)\n }, _temp), _possibleConstructorReturn(_this, _ret);\n }\n\n Route.prototype.getChildContext = function getChildContext() {\n return {\n router: _extends({}, this.context.router, {\n route: {\n location: this.props.location || this.context.router.route.location,\n match: this.state.match\n }\n })\n };\n };\n\n Route.prototype.computeMatch = function computeMatch(_ref, router) {\n var computedMatch = _ref.computedMatch,\n location = _ref.location,\n path = _ref.path,\n strict = _ref.strict,\n exact = _ref.exact,\n sensitive = _ref.sensitive;\n\n if (computedMatch) return computedMatch; // already computed the match for us\n\n invariant(router, \"You should not use or withRouter() outside a \");\n\n var route = router.route;\n\n var pathname = (location || route.location).pathname;\n\n return matchPath(pathname, { path: path, strict: strict, exact: exact, sensitive: sensitive }, route.match);\n };\n\n Route.prototype.componentWillMount = function componentWillMount() {\n warning(!(this.props.component && this.props.render), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.component && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n\n warning(!(this.props.render && this.props.children && !isEmptyChildren(this.props.children)), \"You should not use and in the same route; will be ignored\");\n };\n\n Route.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps, nextContext) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n\n this.setState({\n match: this.computeMatch(nextProps, nextContext.router)\n });\n };\n\n Route.prototype.render = function render() {\n var match = this.state.match;\n var _props = this.props,\n children = _props.children,\n component = _props.component,\n render = _props.render;\n var _context$router = this.context.router,\n history = _context$router.history,\n route = _context$router.route,\n staticContext = _context$router.staticContext;\n\n var location = this.props.location || route.location;\n var props = { match: match, location: location, history: history, staticContext: staticContext };\n\n if (component) return match ? React.createElement(component, props) : null;\n\n if (render) return match ? render(props) : null;\n\n if (typeof children === \"function\") return children(props);\n\n if (children && !isEmptyChildren(children)) return React.Children.only(children);\n\n return null;\n };\n\n return Route;\n}(React.Component);\n\nRoute.propTypes = {\n computedMatch: PropTypes.object, // private, from \n path: PropTypes.string,\n exact: PropTypes.bool,\n strict: PropTypes.bool,\n sensitive: PropTypes.bool,\n component: PropTypes.func,\n render: PropTypes.func,\n children: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),\n location: PropTypes.object\n};\nRoute.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.object.isRequired,\n route: PropTypes.object.isRequired,\n staticContext: PropTypes.object\n })\n};\nRoute.childContextTypes = {\n router: PropTypes.object.isRequired\n};\n\n\nexport default Route;","import pathToRegexp from \"path-to-regexp\";\n\nvar patternCache = {};\nvar cacheLimit = 10000;\nvar cacheCount = 0;\n\nvar compileGenerator = function compileGenerator(pattern) {\n var cacheKey = pattern;\n var cache = patternCache[cacheKey] || (patternCache[cacheKey] = {});\n\n if (cache[pattern]) return cache[pattern];\n\n var compiledGenerator = pathToRegexp.compile(pattern);\n\n if (cacheCount < cacheLimit) {\n cache[pattern] = compiledGenerator;\n cacheCount++;\n }\n\n return compiledGenerator;\n};\n\n/**\n * Public API for generating a URL pathname from a pattern and parameters.\n */\nvar generatePath = function generatePath() {\n var pattern = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (pattern === \"/\") {\n return pattern;\n }\n var generator = compileGenerator(pattern);\n return generator(params, { pretty: true });\n};\n\nexport default generatePath;","var _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; };\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport { createLocation, locationsAreEqual } from \"history\";\nimport generatePath from \"./generatePath\";\n\n/**\n * The public API for updating the location programmatically\n * with a component.\n */\n\nvar Redirect = function (_React$Component) {\n _inherits(Redirect, _React$Component);\n\n function Redirect() {\n _classCallCheck(this, Redirect);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Redirect.prototype.isStatic = function isStatic() {\n return this.context.router && this.context.router.staticContext;\n };\n\n Redirect.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n\n if (this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidMount = function componentDidMount() {\n if (!this.isStatic()) this.perform();\n };\n\n Redirect.prototype.componentDidUpdate = function componentDidUpdate(prevProps) {\n var prevTo = createLocation(prevProps.to);\n var nextTo = createLocation(this.props.to);\n\n if (locationsAreEqual(prevTo, nextTo)) {\n warning(false, \"You tried to redirect to the same route you're currently on: \" + (\"\\\"\" + nextTo.pathname + nextTo.search + \"\\\"\"));\n return;\n }\n\n this.perform();\n };\n\n Redirect.prototype.computeTo = function computeTo(_ref) {\n var computedMatch = _ref.computedMatch,\n to = _ref.to;\n\n if (computedMatch) {\n if (typeof to === \"string\") {\n return generatePath(to, computedMatch.params);\n } else {\n return _extends({}, to, {\n pathname: generatePath(to.pathname, computedMatch.params)\n });\n }\n }\n\n return to;\n };\n\n Redirect.prototype.perform = function perform() {\n var history = this.context.router.history;\n var push = this.props.push;\n\n var to = this.computeTo(this.props);\n\n if (push) {\n history.push(to);\n } else {\n history.replace(to);\n }\n };\n\n Redirect.prototype.render = function render() {\n return null;\n };\n\n return Redirect;\n}(React.Component);\n\nRedirect.propTypes = {\n computedMatch: PropTypes.object, // private, from \n push: PropTypes.bool,\n from: PropTypes.string,\n to: PropTypes.oneOfType([PropTypes.string, PropTypes.object]).isRequired\n};\nRedirect.defaultProps = {\n push: false\n};\nRedirect.contextTypes = {\n router: PropTypes.shape({\n history: PropTypes.shape({\n push: PropTypes.func.isRequired,\n replace: PropTypes.func.isRequired\n }).isRequired,\n staticContext: PropTypes.object\n }).isRequired\n};\n\n\nexport default Redirect;","function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport warning from \"warning\";\nimport invariant from \"invariant\";\nimport matchPath from \"./matchPath\";\n\n/**\n * The public API for rendering the first that matches.\n */\n\nvar Switch = function (_React$Component) {\n _inherits(Switch, _React$Component);\n\n function Switch() {\n _classCallCheck(this, Switch);\n\n return _possibleConstructorReturn(this, _React$Component.apply(this, arguments));\n }\n\n Switch.prototype.componentWillMount = function componentWillMount() {\n invariant(this.context.router, \"You should not use outside a \");\n };\n\n Switch.prototype.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {\n warning(!(nextProps.location && !this.props.location), ' elements should not change from uncontrolled to controlled (or vice versa). You initially used no \"location\" prop and then provided one on a subsequent render.');\n\n warning(!(!nextProps.location && this.props.location), ' elements should not change from controlled to uncontrolled (or vice versa). You provided a \"location\" prop initially but omitted it on a subsequent render.');\n };\n\n Switch.prototype.render = function render() {\n var route = this.context.router.route;\n var children = this.props.children;\n\n var location = this.props.location || route.location;\n\n var match = void 0,\n child = void 0;\n React.Children.forEach(children, function (element) {\n if (match == null && React.isValidElement(element)) {\n var _element$props = element.props,\n pathProp = _element$props.path,\n exact = _element$props.exact,\n strict = _element$props.strict,\n sensitive = _element$props.sensitive,\n from = _element$props.from;\n\n var path = pathProp || from;\n\n child = element;\n match = matchPath(location.pathname, { path: path, exact: exact, strict: strict, sensitive: sensitive }, route.match);\n }\n });\n\n return match ? React.cloneElement(child, { location: location, computedMatch: match }) : null;\n };\n\n return Switch;\n}(React.Component);\n\nSwitch.contextTypes = {\n router: PropTypes.shape({\n route: PropTypes.object.isRequired\n }).isRequired\n};\nSwitch.propTypes = {\n children: PropTypes.node,\n location: PropTypes.object\n};\n\n\nexport default Switch;","'use strict';\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\n\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = getPrototypeOf && getPrototypeOf(Object);\n\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') { // don't hoist over string (html) components\n\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n if (!REACT_STATICS[key] && !KNOWN_STATICS[key] && (!blacklist || !blacklist[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n try { // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n\n return targetComponent;\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","var _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; };\n\nfunction _objectWithoutProperties(obj, keys) { var target = {}; for (var i in obj) { if (keys.indexOf(i) >= 0) continue; if (!Object.prototype.hasOwnProperty.call(obj, i)) continue; target[i] = obj[i]; } return target; }\n\nimport React from \"react\";\nimport PropTypes from \"prop-types\";\nimport hoistStatics from \"hoist-non-react-statics\";\nimport Route from \"./Route\";\n\n/**\n * A public higher-order component to access the imperative API\n */\nvar withRouter = function withRouter(Component) {\n var C = function C(props) {\n var wrappedComponentRef = props.wrappedComponentRef,\n remainingProps = _objectWithoutProperties(props, [\"wrappedComponentRef\"]);\n\n return React.createElement(Route, {\n children: function children(routeComponentProps) {\n return React.createElement(Component, _extends({}, remainingProps, routeComponentProps, {\n ref: wrappedComponentRef\n }));\n }\n });\n };\n\n C.displayName = \"withRouter(\" + (Component.displayName || Component.name) + \")\";\n C.WrappedComponent = Component;\n C.propTypes = {\n wrappedComponentRef: PropTypes.func\n };\n\n return hoistStatics(C, Component);\n};\n\nexport default withRouter;","import { Component } from 'react';\nimport { withRouter } from 'react-router';\n\nclass ScrollToTop extends Component {\n componentDidUpdate(prevProps) {\n if (this.props.location.pathname !== prevProps.location.pathname) {\n window.scrollTo({\n top: 0,\n behavior: 'smooth'\n });\n }\n }\n render() {\n return this.props.children;\n }\n}\nexport default withRouter(ScrollToTop);\n","import React from 'react';\n\nconst Page = ({ title, lead, infoPanel, header, footer, children }) => {\n return (\n
\n
\n
\n
\n
\n
\n
\n

{title}

\n

{lead}

\n
\n
\n
\n
\n
\n
\n
\n
\n
\n
{infoPanel}
\n
\n
\n
{header}
\n
{children}
\n {footer}\n
\n
\n
\n
\n
\n );\n};\n\nexport default Page;\n","import React from 'react';\n\nconst Progress = ({ step, totalSteps }) => (\n \n
\n \n
\n
\n Step {step} of {totalSteps}\n
\n
\n);\n\nexport default Progress;\n","import React from 'react';\nimport Progress from './progress';\n\nconst Footer = ({ left, right, step, totalSteps }) => {\n return (\n
\n
\n
{left}
\n
\n \n
\n
{right}
\n
\n
\n
\n \n
\n
\n
\n );\n};\n\nexport default Footer;\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport Page from '../page';\nimport { choosePath } from '../helpers';\nimport Footer from '../footer';\n\nconst Lookup = ({\n title,\n lead,\n landingStepContent,\n selectableElectorates,\n selectableParties,\n userInput: { selectedElectorateId, selectedPartyId },\n setUserInput\n}) => {\n const infoPanel = (\n
\n );\n\n const footer = (\n \n Next →\n \n }\n />\n );\n\n const header = (\n

Get started

\n );\n\n const renderParty = (party) => {\n const checked = party.id === selectedPartyId;\n return (\n
\n
\n
\n

{party.name}

\n
\n
\n \n {\n setUserInput({ selectedPartyId: party.id });\n }}\n />\n {checked ? 'Selected' : 'Select'}\n {checked && (\n \n )}\n \n
\n
\n
\n
\n );\n };\n\n return (\n \n

\n MPs are mostly likely to listen to people from their electorate or\n people who vote for their party.\n

\n
\n \n \n setUserInput({ selectedElectorateId: event.target.value })\n }\n >\n \n {selectableElectorates.map((se) => (\n \n ))}\n \n \n Only electorates that relate to this campaign will be shown. Feel free\n to skip.\n \n
\n\n
\n \n
\n {selectableParties.map((party) => renderParty(party))}\n {renderParty({ id: 'no-vote', name: `I didn't vote` })}\n
\n \n Feel free to skip.\n \n
\n \n );\n};\n\nexport default Lookup;\n","import React from 'react';\nimport { Link } from 'react-router-dom';\nimport Page from '../page';\nimport { shuffle } from 'lodash';\nimport { lookupPath, createPath, mpPartyElectorateText } from '../helpers';\nimport Footer from '../footer';\n\nconst Choose = ({\n electorates,\n parties,\n mps,\n title,\n lead,\n chooseStepContent,\n totalSteps,\n hideLookupStep,\n userInput: { selectedElectorateId, selectedPartyId },\n selectedParty,\n selectedElectorate,\n setUserInput,\n history\n}) => {\n const mpList = shuffle(mps);\n let selectedMPs = mpList.filter(\n (mp) =>\n mp.partyId === selectedPartyId || mp.electorateId === selectedElectorateId\n );\n\n let message = '';\n if (selectedParty || selectedElectorate) {\n if (selectedMPs.length === 0) {\n message =\n 'There were no MPs in the electorate or party you selected. Here is a list of MPs it would be good to target based on their portfolios, voting history or political positioning.';\n } else if (selectedParty && selectedElectorate) {\n message = `Based on your electorate of ${selectedElectorate.name} and vote for ${selectedParty.name} we suggest you write to:`;\n } else if (selectedParty) {\n message = `Based on your vote for ${selectedParty.name} we suggest you write to:`;\n } else {\n message = `Based on your electorate of ${selectedElectorate.name} we suggest you write to:`;\n }\n } else {\n message =\n 'Here is a list of MPs it would be good to target based on their portfolios, voting history or political positioning.';\n }\n if (selectedMPs.length === 0) {\n selectedMPs = mpList;\n }\n const otherMPs = mpList.filter(\n (mp) => !selectedMPs.some((smp) => smp.id === mp.id)\n );\n\n const infoPanel = (\n
\n );\n\n const renderMP = (mp) => {\n const mpParty = parties.find((p) => p.id === mp.partyId);\n const mpElectorate = electorates.find((e) => e.id === mp.electorateId);\n\n return (\n
\n
\n
\n \n

\n Email {mp.name}\n

\n {mpPartyElectorateText(mp, mpParty, mpElectorate)}\n
\n
\n {\n setUserInput({ selectedMPId: mp.id });\n history.push(\n createPath({\n mp: mp.id,\n electorate: selectedElectorateId,\n party: selectedPartyId\n })\n );\n }}\n className=\"btn btn-sm btn-block btn-outline-redpink\"\n >\n Select →\n \n
\n
\n
\n
\n );\n };\n\n const footerLink = !hideLookupStep && (\n \n ← Lookup\n \n );\n const footer = (\n \n );\n\n const header = (\n

\n Choose an MP to Write To\n

\n );\n\n return (\n \n
\n \n
{selectedMPs.map((p) => renderMP(p))}
\n
\n {otherMPs.length !== 0 && (\n
\n \n
{otherMPs.map((p) => renderMP(p))}
\n
\n )}\n \n );\n};\n\nexport default Choose;\n","import { mpPartyElectorateText } from '../helpers';\nimport React from 'react';\n\nconst MPHeader = ({ mp, party, electorate }) => (\n
\n
\n

Write to {mp.name}

\n {mpPartyElectorateText(mp, party, electorate)}\n
\n
\n \n
\n
\n);\n\nexport default MPHeader;\n","import React, { Component } from 'react';\nimport { Link, Redirect } from 'react-router-dom';\nimport Page from '../page';\nimport MPHeader from './mp-header';\nimport { choosePath, emailPath } from '../helpers';\nimport Footer from '../footer';\n\nexport default class Create extends Component {\n state = {\n submitted: false\n };\n constructor(props) {\n super(props);\n this.handleSubmit = this.handleSubmit.bind(this);\n }\n\n handleSubmit(event) {\n event.preventDefault();\n this.setState({\n submitted: true\n });\n\n const {\n userInput: { question_answer },\n setUserInput\n } = this.props;\n const qa_input = document.querySelector('#question_answer');\n if (qa_input !== null && question_answer === null) {\n setUserInput({ question_answer: false });\n }\n\n if (\n this.props.talkingPoints === null ||\n this.props.userInput.selectedTalkingPointsIds.length > 0\n ) {\n this.props.generateAndSetEmailMessage();\n this.props.history.push(\n emailPath({\n mp: this.props.selectedMP.id,\n electorate: this.props.selectedElectorateId,\n party: this.props.selectedPartyId\n })\n );\n }\n }\n\n render() {\n const {\n title,\n lead,\n mps,\n customMPDetails,\n parties,\n electorates,\n require_postal_address,\n talkingPoints,\n personalMessagePlaceholder,\n question,\n hideLookupStep,\n totalSteps,\n userInput: {\n selectedElectorateId,\n selectedPartyId,\n selectedMPId,\n firstName,\n lastName,\n email,\n postal_address,\n selectedTalkingPointsIds,\n personalMessage,\n question_answer\n },\n setUserInput\n } = this.props;\n\n if (!selectedMPId) {\n return (\n \n );\n }\n\n const selectedMP = mps.find((mp) => mp.id === selectedMPId);\n const selectedMPParty = parties.find((p) => p.id === selectedMP.partyId);\n const selectedMPElectorate = electorates.find(\n (e) => e.id === selectedMP.electorateId\n );\n const customDetails = customMPDetails.find(\n (c) => c.table.mp_id === selectedMPId\n );\n const summary =\n customDetails && customDetails.table.summary\n ? customDetails.table.summary\n : selectedMP.summary;\n const bio =\n customDetails && customDetails.table.bio\n ? customDetails.table.bio\n : selectedMP.bio;\n\n const showSelectedTalkingPointsError =\n this.state.submitted &&\n (talkingPoints ? selectedTalkingPointsIds.length === 0 : false);\n\n const infoPanel = (\n \n
\n

About {selectedMP.name}

\n

{summary}

\n
\n {customDetails && customDetails.table.content && (\n \n )}\n
\n \n );\n\n const footer = (\n \n ← Choose\n \n }\n right={\n \n }\n />\n );\n\n const qa_field = (\n \n
\n
\n \n setUserInput({ question_answer: event.target.checked })\n }\n />\n \n
\n
\n
\n );\n\n const postal_address_field = (\n \n
\n \n\n \n setUserInput({ postal_address: event.target.value })\n }\n />\n
\n
\n );\n\n return (\n
\n \n }\n footer={footer}\n >\n

\n Now it's time to craft your message! Answer these questions, and\n we'll create a draft message that you can preview and edit before\n you send in the next step.\n

\n
\n
\n \n \n setUserInput({ firstName: event.target.value })\n }\n />\n
\n
\n \n \n setUserInput({ lastName: event.target.value })\n }\n />\n
\n
\n\n
\n \n setUserInput({ email: event.target.value })}\n />\n
\n\n {require_postal_address ? postal_address_field : ''}\n\n
\n\n {talkingPoints && (\n
\n \n Choose which recommendations you want included\n \n
\n {talkingPoints.map((talkingPoint) => (\n
\n {\n // TODO: Extract this\n const updatedTallkingPointIds = [\n ...selectedTalkingPointsIds\n ];\n if (event.target.checked) {\n updatedTallkingPointIds.push(talkingPoint.table.id);\n } else {\n updatedTallkingPointIds.splice(\n updatedTallkingPointIds.indexOf(\n talkingPoint.table.id\n ),\n 1\n );\n }\n setUserInput({\n selectedTalkingPointsIds: updatedTallkingPointIds\n });\n }}\n />\n \n {talkingPoint.table.summary}\n \n
\n ))}\n {showSelectedTalkingPointsError && (\n
\n Please select at least one talking point.\n
\n )}\n
\n
\n )}\n\n
\n \n \n setUserInput({ personalMessage: event.target.value })\n }\n />\n
\n\n {question && question.trim() !== '' ? qa_field : ''}\n \n
\n );\n }\n}\n","import React from 'react';\nimport { Link, Redirect } from 'react-router-dom';\nimport Page from '../page';\nimport MPHeader from './mp-header';\nimport { createPath, choosePath } from '../helpers';\nimport Footer from '../footer';\n\nconst Email = (props) => {\n const {\n title,\n lead,\n parties,\n electorates,\n selectedMP,\n redirectUrl,\n totalSteps,\n hideLookupStep,\n userInput: {\n selectedElectorateId,\n selectedPartyId,\n selectedMPId,\n firstName,\n lastName,\n email,\n personalMessage,\n subject,\n message\n },\n setUserInput,\n sendEmail,\n sendEmailComplete,\n processingSendEmail,\n sendEmailErrorMessage\n } = props;\n\n if (sendEmailComplete) {\n if (redirectUrl) {\n window.location = redirectUrl;\n } else {\n return ;\n }\n }\n\n if (!firstName || !lastName || !email || !personalMessage || !message) {\n if (selectedMPId) {\n return (\n \n );\n }\n return (\n \n );\n }\n\n // Get all data\n const selectedMPParty = parties.find((p) => p.id === selectedMP.partyId);\n const selectedMPElectorate = electorates.find(\n (e) => e.id === selectedMP.electorateId\n );\n\n // render components\n const footer = (\n \n ← Edit\n \n }\n right={\n \n {!processingSendEmail && (\n \n )}\n {processingSendEmail && (\n \n Sending{' '}\n \n \n )}\n \n }\n />\n );\n\n const InfoPanel = () => (\n \n

\n You're almost there!\n

\n

\n Here is the message that will be sent to {selectedMP.name} on your\n behalf.\n

\n

\n In order to maximise your impact, we recommend personalising your\n message before you press send.\n

\n

\n MPs receive hundreds, sometimes thousands, of emails, letters and calls\n from members of the public every week so the more you can make yours\n stand out from the crowd, the better!\n

\n

\n While we understand many of us are passionate about this issue, it's\n important to avoid disrespectful language. We won’t always agree with\n everything every MP does, but it won’t help advance our vision and\n values by casting insults at decision makers.\n

\n

\n Finally, all messages sent via ActionStation go through a process of\n moderation. We will not send them if they are insulting, rude,\n threatening, violent, bullying, homophobic, xenophobic, sexist, racist,\n transphobic, ableist, body-shaming etc. This is part of our commitment\n to a healthy and inclusive internet for everyone.\n

\n
\n );\n\n // render page\n return (\n {\n e.preventDefault();\n sendEmail();\n }}\n >\n }\n header={\n \n }\n lead={lead}\n footer={footer}\n >\n
\n

\n Your message to {selectedMP.name}, which you can preview and edit\n before sending\n

\n
\n\n
\n \n \n setUserInput({ subject: event.target.value })\n }\n />\n
\n\n
\n \n \n setUserInput({ message: event.target.value })\n }\n />\n
\n
\n\n

{sendEmailErrorMessage}

\n \n \n );\n};\n\nexport default Email;\n","import React from 'react';\nimport Page from '../page';\nimport { Redirect } from 'react-router-dom';\n\nconst Thanks = ({\n mps,\n parties,\n title,\n name,\n lead,\n thanksStepContent,\n shareUrl,\n sendEmailComplete,\n userInput: { selectedMPId, firstName }\n}) => {\n if (!sendEmailComplete) {\n return ;\n }\n\n const selectedMP = mps.find((mp) => mp.id === selectedMPId);\n const selectedMPParty = parties.find((p) => p.id === selectedMP.partyId);\n const infoPanel = (\n
\n );\n\n const header = (\n

Increase your impact

\n );\n\n const twitterShareText = `I just emailed ${selectedMP.name} from ${selectedMPParty.name} about ${name}. You should email your MP too! @actionstation have made it really easy to do`;\n\n return (\n \n

\n Double your impact by asking your friends and family to write too.\n

\n
\n
\n \n Share on Facebook\n \n
\n
\n
\n
\n \n Share on Twitter\n \n
\n
\n

\n Copy this text into an email to share\n with your friends\n

\n
\n

Hey!

\n

\n I just emailed {selectedMP.name} about {name} and I’m hoping you will\n join me in taking action too.\n

\n

\n ActionStation have set up a tool that makes it really easy to do:{' '}\n {shareUrl}\n

\n

\n Thanks!\n
\n {firstName}\n

\n
\n \n );\n};\n\nexport default Thanks;\n","import React from 'react';\nimport {\n Switch,\n BrowserRouter as Router,\n Route,\n Redirect\n} from 'react-router-dom';\nimport ScrollToTop from './scroll-to-top';\nimport { Lookup, Choose, Create, Email, Thanks } from './steps';\n\nconst App = (props) => {\n return (\n \n \n \n {!props.hideLookupStep && (\n }\n />\n )}\n {props.hideLookupStep && (\n }\n />\n )}\n }\n />\n }\n />\n }\n />\n }\n />\n \n \n \n );\n};\n\nexport default App;\n","import { connect } from 'react-redux';\nimport App from './app';\n\nconst mapState = (state) => ({\n ...state.mailToTarget,\n totalSteps: state.mailToTarget.hideLookupStep ? 3 : 4,\n selectableElectorates: state.mailToTarget.electorates.filter(\n (e) => e.id !== 'list'\n ),\n selectableParties: state.mailToTarget.parties.filter(\n (p) => p.id !== 'list' && p.id !== 'independent'\n ),\n selectedElectorate: state.mailToTarget.electorates.find(\n (e) => e.id === state.mailToTarget.userInput.selectedElectorateId\n ),\n selectedParty: state.mailToTarget.parties.find(\n (p) => p.id === state.mailToTarget.userInput.selectedPartyId\n ),\n selectedMP: state.mailToTarget.mps.find(\n (mp) => mp.id === state.mailToTarget.userInput.selectedMPId\n )\n});\nconst mapDispatch = (dispatch) => ({\n sendEmail: () => dispatch.mailToTarget.sendEmail(),\n generateAndSetEmailMessage: () =>\n dispatch.mailToTarget.generateAndSetEmailMessage(),\n setUserInput: (userInput) => dispatch.mailToTarget.setUserInput(userInput)\n});\n\nexport default connect(mapState, mapDispatch)(App);\n","import 'babel-polyfill';\n// Enable fetch on IE11\nimport 'whatwg-fetch';\nimport smoothscroll from 'smoothscroll-polyfill';\nimport React from 'react';\nimport Bugsnag from '@bugsnag/js';\nimport BugsnagPluginReact from '@bugsnag/plugin-react';\nimport ReactDOM from 'react-dom';\nimport { Provider } from 'react-redux';\nimport createStore from '../mail-to-target/create-store';\nimport Container from '../mail-to-target/container';\nimport { compileInitialState } from '../mail-to-target/helpers';\n\nsmoothscroll.polyfill();\n\ndocument.addEventListener('DOMContentLoaded', () => {\n const pageData = JSON.parse(\n document.getElementById('page-data').getAttribute('data')\n );\n\n // TODO: Does all of this state need to be managed by Redux? Much of it will\n // be static, so think about another way to provide it to React components\n const initialState = compileInitialState(pageData, window.location);\n // if (process.env.NODE_ENV === 'development') {\n // console.log(initialState);\n // initialState.userInput = Object.assign(initialState.userInput, {\n // selectedPartyId: 'labour',\n // selectedElectorateId: 'te-tai_hauauru',\n // selectedMPId: 'adrian-rurawhe',\n // firstName: 'Vim',\n // lastName: 'Jo',\n // email: 'vim@noodle.io',\n // personalMessage: 'This is my message to you',\n // selectedTalkingPointsIds: [initialState.talkingPoints[0].table.id]\n // });\n // }\n const store = createStore(initialState);\n\n const releaseVersonElement = document.head.querySelector(\n \"[name='release-version']\"\n );\n\n const appVersion =\n (releaseVersonElement &&\n releaseVersonElement.attributes['content'].value) ||\n undefined;\n\n Bugsnag.start({\n apiKey: import.meta.env.VITE_CLIENT_BUGSNAG_API_KEY,\n appVersion,\n enabledReleaseStages: ['staging', 'production'],\n releaseStage:\n import.meta.env.VITE_CLIENT_BUGSNAG_RELEASE_STAGE || process.env.NODE_ENV,\n plugins: [new BugsnagPluginReact(React)]\n });\n\n const ErrorBoundary = Bugsnag.getPlugin('react');\n const loadingMessageEl = document.getElementById('js-loading-message');\n loadingMessageEl.parentNode.removeChild(loadingMessageEl);\n ReactDOM.render(\n \n \n \n \n ,\n document.getElementById('app')\n );\n});\n"],"names":["compileInitialState","pageData","location","queryStringParameters","queryStringToObject","initialState","e","p","mp","buildPath","basePath","qs","objectToQueryString","choosePath","lookupPath","createPath","emailPath","mpPartyElectorateText","party","electorate","generateEmailSubject","state","emailSubject","firstName","lastName","messageData","template","generateEmailMessage","talkingPoints","emailTemplate","mps","parties","electorates","selectedElectorateId","selectedPartyId","selectedMPId","email","selectedTalkingPointsIds","personalMessage","selectedMP","selectedMPParty","selectedMPElectorate","stp","tp","defaultState","createModel","merge","updatedUserInput","sendEmailErrorMessage","dispatch","_payload","rootState","payload","userInput","aid","url","pick","response","responseJSON","errorMessages","error","Bugsnag","event","createStore","init","warning","warning_1","ReactPropTypesSecret","ReactPropTypesSecret_1","require$$0","emptyFunction","emptyFunctionWithReset","factoryWithThrowingShims","shim","props","propName","componentName","propFullName","secret","err","getShim","ReactPropTypes","propTypesModule","isAbsolute","pathname","spliceOne","list","index","i","k","n","resolvePathname","to","from","toParts","fromParts","isToAbs","isFromAbs","mustEndAbs","hasTrailingSlash","last","up","part","result","valueOf","obj","valueEqual","a","b","item","aValue","bValue","key","isProduction","prefix","invariant","condition","message","provided","value","addLeadingSlash","path","hasBasename","stripBasename","stripTrailingSlash","parsePath","search","hash","hashIndex","searchIndex","createLocation","currentLocation","_extends","locationsAreEqual","createTransitionManager","prompt","setPrompt","nextPrompt","confirmTransitionTo","action","getUserConfirmation","callback","listeners","appendListener","fn","isActive","listener","notifyListeners","_len","args","_key","canUseDOM","getConfirmation","supportsHistory","ua","supportsPopStateOnHashChange","isExtraneousPopstateEvent","PopStateEvent","HashChangeEvent","getHistoryState","createBrowserHistory","globalHistory","canUseHistory","needsHashChangeListener","_props","_props$forceRefresh","forceRefresh","_props$getUserConfirm","_props$keyLength","keyLength","basename","getDOMLocation","historyState","_ref","_window$location","createKey","transitionManager","setState","nextState","history","handlePopState","handlePop","handleHashChange","forceNextPop","ok","revertPop","fromLocation","toLocation","toIndex","allKeys","fromIndex","delta","go","initialLocation","createHref","push","href","prevIndex","nextKeys","replace","goBack","goForward","listenerCount","checkDOMListeners","isBlocked","block","unblock","listen","unlisten","target","source","_classCallCheck","instance","Constructor","_possibleConstructorReturn","self","call","_inherits","subClass","superClass","Router","_React$Component","_temp","_this","_ret","_this2","children","React","nextProps","PropTypes","Router$2","BrowserRouter","createHistory","_objectWithoutProperties","keys","isModifiedEvent","Link","_this$props","innerRef","Link$1","isarray","arr","pathToRegexpModule","pathToRegexp","parse","compile","tokensToFunction","tokensToRegExp","PATH_REGEXP","str","options","tokens","defaultDelimiter","res","m","escaped","offset","next","name","capture","group","modifier","asterisk","partial","repeat","optional","delimiter","pattern","prevText","escapeGroup","restrictBacktrack","escapeString","encodeURIComponentPretty","c","encodeAsterisk","matches","flags","opts","data","encode","token","segment","j","attachKeys","re","regexpToRegexp","groups","arrayToRegexp","parts","regexp","stringToRegexp","strict","end","route","endsWithDelimiter","patternCache","cacheLimit","cacheCount","compilePath","cacheKey","cache","compiledPattern","matchPath","parent","_options","_options$exact","exact","_options$strict","_options$sensitive","sensitive","_compilePath","match","values","isExact","memo","matchPath$1","isEmptyChildren","Route","router","computedMatch","nextContext","component","render","_context$router","staticContext","Route$1","compileGenerator","compiledGenerator","generatePath","params","generator","generatePath$1","Redirect","prevProps","prevTo","nextTo","Redirect$1","Switch","child","element","_element$props","pathProp","Switch$1","REACT_STATICS","KNOWN_STATICS","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","getPrototypeOf","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","descriptor","hoistNonReactStatics_cjs","withRouter","Component","C","wrappedComponentRef","remainingProps","routeComponentProps","hoistStatics","withRouter$1","ScrollToTop","Page","title","lead","infoPanel","header","footer","Progress","step","totalSteps","Footer","left","right","Lookup","landingStepContent","selectableElectorates","selectableParties","setUserInput","renderParty","checked","se","Choose","chooseStepContent","hideLookupStep","selectedParty","selectedElectorate","mpList","shuffle","selectedMPs","otherMPs","smp","renderMP","mpParty","mpElectorate","footerLink","MPHeader","Create","__publicField","question_answer","customMPDetails","require_postal_address","personalMessagePlaceholder","question","postal_address","customDetails","summary","bio","showSelectedTalkingPointsError","qa_field","postal_address_field","talkingPoint","updatedTallkingPointIds","Email","redirectUrl","subject","sendEmail","sendEmailComplete","processingSendEmail","InfoPanel","Thanks","thanksStepContent","shareUrl","twitterShareText","App","routeProps","mapState","mapDispatch","Container","connect","smoothscroll","store","releaseVersonElement","appVersion","BugsnagPluginReact","ErrorBoundary","loadingMessageEl","ReactDOM","Provider"],"mappings":"sXAGO,MAAMA,GAAsB,CAACC,EAAUC,IAAa,CACzD,MAAMC,EAAwBC,GAAoBF,EAAS,MAAM,EAC3DG,EAAe,CACnB,GAAGJ,EACH,UAAW,CAAE,EACb,sBAAAE,EACA,IAAKD,EAAS,SAAU,EACxB,SAAUA,EAAS,SAAQ,EAAG,MAAM,GAAG,EAAE,CAAC,CAC9C,EAEE,OACEC,EAAsB,YACtBF,EAAS,YAAY,KAAMK,GAAMA,EAAE,KAAOH,EAAsB,UAAU,IAE1EE,EAAa,UAAU,qBACrBF,EAAsB,YAGxBA,EAAsB,OACtBF,EAAS,QAAQ,KAAMM,GAAMA,EAAE,KAAOJ,EAAsB,KAAK,IAEjEE,EAAa,UAAU,gBAAkBF,EAAsB,OAG/DA,EAAsB,IACtBF,EAAS,IAAI,KAAMO,GAAOA,EAAG,KAAOL,EAAsB,EAAE,IAE5DE,EAAa,UAAU,aAAeF,EAAsB,IAGvDE,CACT,EAEMI,GAAY,CAACC,EAAUP,IAA0B,CACrD,MAAMQ,EAAKC,GAAoBT,CAAqB,EACpD,OAAOQ,IAAO,GAAKD,EAAW,GAAGA,CAAQ,IAAIC,CAAE,EACjD,EAEaE,GAAcV,GAClBM,GAAU,UAAWN,CAAqB,EAGtCW,GAAcX,GAClBM,GAAU,IAAKN,CAAqB,EAGhCY,GAAcZ,GAClBM,GAAU,UAAWN,CAAqB,EAGtCa,GAAab,GACjBM,GAAU,SAAUN,CAAqB,EAGrCc,GAAwB,CAACT,EAAIU,EAAOC,IAC3CX,EAAG,kBAAoB,KAClBA,EAAG,gBAGLW,EAAW,KAAO,OACrB,GAAGD,EAAM,IAAI,WACb,GAAGA,EAAM,IAAI,WAAWC,EAAW,IAAI,GA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