{"version":3,"sources":["webpack:///./pagination/index.js","webpack:///./screens/session-timer/index.js","webpack:///./screens/simplelayout/index.js"],"names":["AnimatedSwitchPagination","previousPage","undefined","currentPage","stack","styles","offset","opacity","transform","window","scrollTo","className","runOnMount","location","pathname","atEnter","action","this","props","history","atLeave","atActive","mapStyles","children","Component","withRouter","l10n","getContent","SessionTimer","a","async","axios","onSessionExtended","style","width","margin","textAlign","aria-hidden","onClick","extendSession","React","Wrapper","glamorous","div","position","zIndex","height","background","display","tableLayout","top","White","right","left","overflow","overflowY","maxWidth","padding","isMyProfile","Content","marginTop","isSettingsPage","marginBottom","navigationItemStylingFix","cursor","NavLink","verticalAlign","Navigation","e","type","key","push","goBack","_closeLink","createRef","current","focus","dir","isTimeoutPage","tabIndex","onKeyDown","handleBackButton","data-testid","aria-label","data-pagename","data-pagename2","data-nextpagegroup","data-nextpagename","fontWeight","href","clientData","flowCancelUrl","ref","Layout","overpanel","document","getElementById","scrollTop","match","url","split","isNewUser","id","isNativeApp"],"mappings":";;;;;;;;;;;o3CAqCMA,E,6OACI,CACNC,kBAAcC,EACdC,iBAAaD,EACbE,MAAO,K,wCAGG,SAAAC,GACV,IAAIC,EAASD,EAAOC,OAGpB,OAFAA,EAAS,GAAH,OAAMA,EAAN,MAEC,CACLC,QAASF,EAAOE,QAChBC,UAAW,cAAF,OAAgBF,EAAhB,S,2FAKXG,OAAOC,SAAS,EAAG,K,+BAInB,OACE,kBAAC,IAAD,aACEC,UAAU,iBACVC,WAAkC,MAAtBC,SAASC,UAzCpB,CACLC,QAAS,CACPT,OAAmB,UAHAU,EA2CGC,KAAKC,MAAMC,QAAQH,QAxCb,KAAO,IACnCT,QAAS,GAEXa,QAAS,CACPd,OAAmB,SAAXU,GAAqB,IAAM,IACnCT,QAAS,GAEXc,SAAU,CACRf,OAAQ,EACRC,QAAS,IA4BT,CAIEe,UAAWL,KAAKK,YAEfL,KAAKC,MAAMK,UA9CpB,IAAyBP,M,GAiBcQ,aAmCxBC,sBAA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MC,IAAIC,MAAM,KAAK,GACjDC,EAAY,IAAMX,IAAY,2BAC9BZ,EACmC,oBAAvC7D,KAAKC,MAAMgF,MAAMC,IAAIC,MAAM,KAAK,GAClC,OACE,kBAAC3D,EAAD,KACE,kBAACU,EAAD,CAAOmD,GAAG,kCAAkC5C,YAAaA,IACrD2C,IAAcE,KACd,kBAACpC,EAAD,CACEhD,QAASF,KAAKC,MAAMC,QACpBuC,YAAaA,EACbG,eAAgBA,EAChBiB,cAAeA,IAGnB,kBAACnB,EAAD,CAASD,YAAaA,EAAaG,eAAgBA,GAChD5C,KAAKC,MAAMK,gB,GA1BHC,aAiCNC,sBAAWoE","file":"ppme-shared.bundle.js","sourcesContent":["// @flow\n\nimport React, { Component } from 'react'\nimport { AnimatedSwitch } from 'react-router-transition'\nimport { withRouter } from 'react-router-dom'\nimport type { RouterHistory } from 'react-router'\nimport './index.css'\n\ntype Props = {\n children: React$Element,\n history: RouterHistory,\n}\n\ntype State = {\n invert: boolean,\n currentPage: ?string,\n previousPage: ?string,\n stack: Array,\n}\n\nfunction pageTransitions(action) {\n return {\n atEnter: {\n offset: action === 'PUSH' ? 600 : -600,\n opacity: 1,\n },\n atLeave: {\n offset: action === 'PUSH' ? -600 : 600,\n opacity: 0,\n },\n atActive: {\n offset: 0,\n opacity: 1,\n },\n }\n}\n\nclass AnimatedSwitchPagination extends Component {\n state = {\n previousPage: undefined,\n currentPage: undefined,\n stack: [],\n }\n\n mapStyles = styles => {\n let offset = styles.offset\n offset = `${offset}px`\n\n return {\n opacity: styles.opacity,\n transform: `translateX(${offset})`,\n }\n }\n\n componentWillReceiveProps() {\n window.scrollTo(0, 0)\n }\n\n render() {\n return (\n \n {this.props.children}\n \n )\n }\n}\n\nexport default withRouter(AnimatedSwitchPagination)\n","// @flow\n\nimport React from 'react'\nimport getContent from 'pp-react-l10n'\nimport axios from 'axios'\n\nconst l10n = getContent('pages/session-timer')\n\ntype Props = {\n axios?: () => Promise,\n onSessionExtended: () => void,\n}\n\nclass SessionTimer extends React.Component {\n static defaultProps = { axios }\n extendSession = async () => {\n await this.props.axios('/auth/extend')\n this.props.onSessionExtended()\n }\n render() {\n return (\n
\n
\n
\n \n

{l10n('session.all_done')}

\n
\n
\n

\n {l10n('session.we_will_log_you_out')}\n

\n

\n \n

\n
\n
\n
\n )\n }\n}\n\nexport default SessionTimer\n","// @flow\n\nimport React, { Component } from 'react'\nimport glamorous from 'glamorous'\nimport getContent from 'pp-react-l10n'\nimport { withRouter } from 'react-router-dom'\nimport type { RouterHistory } from 'react-router'\nimport clientData from 'utils/client-data'\nimport _ from 'lodash'\nimport { isNativeApp } from 'utils/venice'\n\nconst l10n = getContent('pages/settings')\n\nconst Wrapper = glamorous.div({\n position: 'absolute',\n zIndex: '1050',\n width: '100%',\n height: '100%',\n background: '#f4f6f9',\n display: 'table',\n tableLayout: 'fixed',\n top: '0',\n})\n\nconst White = glamorous.div(props => ({\n position: 'fixed',\n right: 0,\n left: 0,\n\n // super important for animations to work because as our route\n // \"leaves\" to the right/left of the screen, it will be hidden\n overflow: 'hidden',\n overflowY: 'auto',\n\n width: '66.6%',\n height: '100%',\n maxWidth: '700px',\n margin: '0 auto',\n padding: '0 20px',\n background: '#ffffff',\n\n '@media (max-width: 640px)': {\n width: '100%',\n padding: props.isMyProfile ? '0' : '0 20px',\n },\n}))\n\nconst Content = glamorous.div(props => ({\n marginTop: props.isSettingsPage ? 84 : 104,\n marginBottom: 104,\n padding: props.isMyProfile ? '0 13%' : '0 25%',\n\n '@media (max-width: 1024px)': {\n padding: '0 12.5%',\n },\n\n '@media (max-width: 640px)': {\n padding: '0 8.33%',\n },\n\n '@media (max-width: 480px)': {\n padding: '0',\n },\n}))\n\n// the x and back button on the modal corners has a weird bounding\n// box due to use of padding instead of margin\nconst navigationItemStylingFix = {\n padding: 0,\n margin: '24px 4px 0',\n cursor: 'pointer',\n}\n\nconst NavLink = glamorous.a(\n 'vx_backBtn vx_backBtn_flow',\n navigationItemStylingFix,\n {\n // these overrides are to ensure the back arrow always points backwards\n // this overrides the [dir=rtl] style ruls from vx\n ':before': {\n verticalAlign: 'inherit',\n transform: 'none',\n },\n },\n)\n\ntype NavigationProps = {\n history: RouterHistory,\n isMyProfile: boolean,\n isSettingsPage: boolean,\n isTimeoutPage: boolean,\n}\n\nclass Navigation extends Component {\n constructor(props) {\n super(props)\n this._closeLink = React.createRef()\n }\n\n componentDidMount() {\n // for a11y, set the focus on the close link everytime it renders\n if (this._closeLink.current) this._closeLink.current.focus()\n }\n\n handleBackButton = e => {\n if (e.type === 'click' || e.key === 'Enter') {\n if (this.props.isMyProfile) {\n this.props.history.push('/my/settings')\n } else {\n this.props.history.goBack()\n }\n }\n }\n\n componentDidUpdate() {\n if (this._closeLink.current) this._closeLink.current.focus()\n }\n\n render() {\n // the navigation flow is directionality specific and should always go\n // from left to right. So we'll make sure things flow that way here too\n return (\n
\n {!(this.props.isSettingsPage || this.props.isTimeoutPage) ? (\n \n {this.props.isMyProfile ? (\n \n {l10n('button.manage')}\n \n ) : (\n {l10n('button.back')}\n )}\n \n ) : null}\n {!this.props.isTimeoutPage ? (\n \n {l10n('icon.close')}\n \n ) : null}\n
\n )\n }\n}\n\ntype LayoutProps = {\n children: Node,\n history: RouterHistory,\n match: {\n url: string,\n },\n}\nclass Layout extends Component {\n componentDidUpdate() {\n const overpanel = document.getElementById('core-white-overpanel-navigation')\n if (overpanel) {\n overpanel.scrollTop = 0\n }\n }\n\n render() {\n const isMyProfile = this.props.match.url.split('/')[2] === 'profile'\n const isSettingsPage = this.props.match.url.split('/')[2] === 'settings'\n const isNewUser = _.get(clientData, 'myProfileData.isNewUser')\n const isTimeoutPage =\n this.props.match.url.split('/')[2] === 'session-timeout'\n return (\n \n \n {!isNewUser && !isNativeApp && (\n \n )}\n \n {this.props.children}\n \n \n \n )\n }\n}\nexport default withRouter(Layout)\n"],"sourceRoot":""}