{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/privacy_policy/index.js"],"names":["messages","defineMessages","title","PrivacyPolicy","injectIntl","React","PureComponent","state","content","lastUpdated","isLoading","componentDidMount","api","get","then","data","this","setState","updated_at","catch","render","intl","multiColumn","props","bindToDocument","label","formatMessage","className","id","defaultMessage","values","date","width","value","year","month","day","dangerouslySetInnerHTML","__html","name"],"mappings":"8MAQA,MAAMA,EAAWC,YAAe,CAC9BC,MAAM,CAAD,6DACJ,IAGGC,EADUC,YAAU,EAAX,cACaC,IAAMC,cAAe,cAAD,yBAO9CC,MAAQ,CACNC,QAAS,KACTC,YAAa,KACbC,WAAW,GAGbC,oBACEC,cAAMC,IAAI,mCAAmCC,MAAK,IAAe,IAAd,KAAEC,GAAM,EACzDC,KAAKC,SAAS,CAAET,QAASO,EAAKP,QAASC,YAAaM,EAAKG,WAAYR,WAAW,OAC/ES,OAAM,KACPH,KAAKC,SAAS,CAAEP,WAAW,OAI/BU,SACE,MAAM,KAAEC,EAAI,YAAEC,GAAgBN,KAAKO,OAC7B,UAAEb,EAAS,QAAEF,EAAO,YAAEC,GAAgBO,KAAKT,MAEjD,OACE,YAAC,IAAM,CAACiB,gBAAiBF,EAAaG,MAAOJ,EAAKK,cAAc1B,EAASE,aAAO,EAC9E,mBAAKyB,UAAU,kCAA2B,EACxC,mBAAKA,UAAU,qBAAc,EAC3B,2BAAI,YAAC,IAAgB,CAACC,GAAG,uBAAuBC,eAAe,oBAC/D,0BAAG,YAAC,IAAgB,CAACD,GAAG,8BAA8BC,eAAe,sBAAsBC,OAAQ,CAAEC,KAAMrB,EAAY,YAAC,IAAQ,CAACsB,MAAM,SAAY,YAAC,IAAa,CAACC,MAAOxB,EAAayB,KAAK,UAAUC,MAAM,QAAQC,IAAI,iBAGzN,mBACET,UAAU,6BACVU,wBAAyB,CAAEC,OAAQ9B,MAIvC,YAAC,IAAM,UACL,8BAAQa,EAAKK,cAAc1B,EAASE,QACpC,oBAAMqC,KAAK,SAAS/B,QAAQ,cAMrC","file":"js/features/privacy_policy-0848fdf522588b430bdb.chunk.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport { Helmet } from 'react-helmet';\nimport { FormattedMessage, FormattedDate, injectIntl, defineMessages } from 'react-intl';\nimport Column from 'mastodon/components/column';\nimport api from 'mastodon/api';\nimport Skeleton from 'mastodon/components/skeleton';\n\nconst messages = defineMessages({\n title: { id: 'privacy_policy.title', defaultMessage: 'Privacy Policy' },\n});\n\nexport default @injectIntl\nclass PrivacyPolicy extends React.PureComponent {\n\n static propTypes = {\n intl: PropTypes.object,\n multiColumn: PropTypes.bool,\n };\n\n state = {\n content: null,\n lastUpdated: null,\n isLoading: true,\n };\n\n componentDidMount () {\n api().get('/api/v1/instance/privacy_policy').then(({ data }) => {\n this.setState({ content: data.content, lastUpdated: data.updated_at, isLoading: false });\n }).catch(() => {\n this.setState({ isLoading: false });\n });\n }\n\n render () {\n const { intl, multiColumn } = this.props;\n const { isLoading, content, lastUpdated } = this.state;\n\n return (\n <Column bindToDocument={!multiColumn} label={intl.formatMessage(messages.title)}>\n <div className='scrollable privacy-policy'>\n <div className='column-title'>\n <h3><FormattedMessage id='privacy_policy.title' defaultMessage='Privacy Policy' /></h3>\n <p><FormattedMessage id='privacy_policy.last_updated' defaultMessage='Last updated {date}' values={{ date: isLoading ? <Skeleton width='10ch' /> : <FormattedDate value={lastUpdated} year='numeric' month='short' day='2-digit' /> }} /></p>\n </div>\n\n <div\n className='privacy-policy__body prose'\n dangerouslySetInnerHTML={{ __html: content }}\n />\n </div>\n\n <Helmet>\n <title>{intl.formatMessage(messages.title)}</title>\n <meta name='robots' content='all' />\n </Helmet>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}