-{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/status/containers/card_container.js","webpack:///./app/javascript/mastodon/features/status/components/detailed_status.js","webpack:///./app/javascript/mastodon/features/status/components/action_bar.js","webpack:///./app/javascript/mastodon/features/status/index.js"],"names":["card_container","Object","es","state","_ref","statusId","card","getIn","detailed_status_DetailedStatus","handleAccountClick","e","button","ctrlKey","metaKey","preventDefault","_this","context","router","history","push","props","status","stopPropagation","handleOpenVideo","media","startTime","onOpenVideo","handleExpandedToggle","onToggleHidden","render","this","get","applicationLink","reblogLink","reblogIcon","size","some","item","jsx_default","attachment_list","video","features_video","preview","src","alt","width","height","inline","sensitive","media_gallery","standalone","onOpenMedia","length","className","href","target","rel","Link","to","index_es","value","onClick","avatar","account","display_name","status_content","expanded","onExpandedToggle","Date","hour12","year","month","day","hour","minute","react_immutable_pure_component_es","contextTypes","prop_types_default","a","object","propTypes","ImmutablePropTypes_default","map","isRequired","func","messages","delete","id","defaultMessage","redraft","direct","mention","reply","reblog","reblog_private","cancel_reblog_private","cannot_reblog","favourite","mute","muteConversation","unmuteConversation","block","report","share","pin","unpin","embed","action_bar_ActionBar","handleReplyClick","onReply","handleReblogClick","onReblog","handleFavouriteClick","onFavourite","handleDeleteClick","onDelete","handleRedraftClick","handleDirectClick","onDirect","handleMentionClick","onMention","handleMuteClick","onMute","handleConversationMuteClick","onMuteConversation","handleBlockClick","onBlock","handleReport","onReport","handlePinClick","onPin","handleShare","navigator","text","url","handleEmbed","onEmbed","_props","intl","publicStatus","includes","mutingConversation","menu","formatMessage","action","initial_state","name","shareButton","icon_button","title","icon","reblog_disabled","disabled","active","animate","dropdown_menu_container","items","direction","react_default","PureComponent","status_messages","deleteConfirm","deleteMessage","redraftConfirm","redraftMessage","blockConfirm","revealAll","hideAll","detailedStatus","status_Status","getStatus","selectors","params","ancestorsIds","immutable_default","List","descendantsIds","withMutations","mutable","unshift","ids","shift","replies","reverse","forEach","fullscreen","dispatch","interactions","handlePin","compose","handleModalReblog","shiftKey","modal","withRedraft","arguments","undefined","_this$props","message","confirm","onConfirm","statuses","handleOpenMedia","index","time","mutes","handleToggleHidden","handleToggleAll","_this$props2","statusIds","concat","toJS","_this$props3","values","accounts","reports","handleHotkeyMoveUp","handleMoveUp","handleHotkeyMoveDown","handleMoveDown","handleHotkeyReply","handleHotkeyFavourite","handleHotkeyBoost","handleHotkeyMention","handleHotkeyOpenProfile","handleHotkeyToggleHidden","_this$props4","_selectChild","indexOf","_this$props5","setRef","c","node","onFullScreenChange","setState","util_fullscreen","componentWillMount","componentDidMount","componentWillReceiveProps","nextProps","_scrolledIntoView","element","querySelectorAll","focus","renderChildren","list","_this2","status_container","onMoveUp","onMoveDown","contextType","componentDidUpdate","window","requestAnimationFrame","scrollIntoView","componentWillUnmount","ancestors","descendants","_props2","shouldUpdateScroll","column","column_back_button","missing_indicator","handlers","moveUp","moveDown","boost","openProfile","toggleHidden","label","column_header","showBackButton","extraButton","aria-label","aria-pressed","react_router_scroll_4_es","scrollKey","createElement","classnames_default","ref","lib","tabIndex","components_status"],"mappings":"sWAOAA,EAAeC,OAAAC,EAAA,QAAAD,CAJS,SAACE,EAADC,GAAA,IAAUC,EAAVD,EAAUC,SAAV,OACtBC,KAAMH,EAAMI,OAAO,QAASF,GAAW,QAGzC,CAAwCC,EAAA,mBCOnBE,kLAanBC,mBAAqB,SAACC,GACH,IAAbA,EAAEC,QAAkBD,EAAEE,SAAWF,EAAEG,UACrCH,EAAEI,iBACFC,EAAKC,QAAQC,OAAOC,QAAQC,KAA5B,aAA8CJ,EAAKK,MAAMC,OAAOd,OAAO,UAAW,SAGpFG,EAAEY,qBAGJC,gBAAkB,SAACC,EAAOC,GACxBV,EAAKK,MAAMM,YAAYF,EAAOC,MAGhCE,qBAAuB,WACrBZ,EAAKK,MAAMQ,eAAeb,EAAKK,MAAMC,kDAGvCQ,kBACE,IAAMR,EAASS,KAAKV,MAAMC,OAAOU,IAAI,UAAYD,KAAKV,MAAMC,OAAOU,IAAI,UAAYD,K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vBvBG,MAwBepG,KAAK8J,UAxBpBpD,QAyBiB1G,KAAKyG,gBAKnByH,SAnVuBrL,EAAA,KAE3BC,cACL3D,OAAQ4D,EAAAC,EAAUC,UAGbC,WACL4F,OAAQ/F,EAAAC,EAAUC,OAAOI,WACzBuG,SAAU7G,EAAAC,EAAUM,KAAKD,WACzB9D,OAAQ4D,EAAAH,EAAmBI,IAC3B2F,aAAc5F,EAAAH,EAAmBsK,KACjCpE,eAAgB/F,EAAAH,EAAmBsK,KACnC1G,KAAM7D,EAAAC,EAAUC,OAAOI","file":"features/status.js","sourcesContent":["import { connect } from 'react-redux';\nimport Card from '../components/card';\n\nconst mapStateToProps = (state, { statusId }) => ({\n card: state.getIn(['cards', statusId], null),\n});\n\nexport default connect(mapStateToProps)(Card);\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Avatar from '../../../components/avatar';\nimport DisplayName from '../../../components/display_name';\nimport StatusContent from '../../../components/status_content';\nimport MediaGallery from '../../../components/media_gallery';\nimport AttachmentList from '../../../components/attachment_list';\nimport { Link } from 'react-router-dom';\nimport { FormattedDate, FormattedNumber } from 'react-intl';\nimport CardContainer from '../containers/card_container';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Video from '../../video';\n\nexport default class DetailedStatus extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n status: ImmutablePropTypes.map.isRequired,\n onOpenMedia: PropTypes.func.isRequired,\n onOpenVideo: PropTypes.func.isRequired,\n onToggleHidden: PropTypes.func.isRequired,\n };\n\n handleAccountClick = (e) => {\n if (e.button === 0 && !(e.ctrlKey || e.metaKey)) {\n e.preventDefault();\n this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);\n }\n\n e.stopPropagation();\n }\n\n handleOpenVideo = (media, startTime) => {\n this.props.onOpenVideo(media, startTime);\n }\n\n handleExpandedToggle = () => {\n this.props.onToggleHidden(this.props.status);\n }\n\n render () {\n const status = this.props.status.get('reblog') ? this.props.status.get('reblog') : this.props.status;\n\n let media = '';\n let applicationLink = '';\n let reblogLink = '';\n let reblogIcon = 'retweet';\n\n if (status.get('media_attachments').size > 0) {\n if (status.get('media_attachments').some(item => item.get('type') === 'unknown')) {\n media = <AttachmentList media={status.get('media_attachments')} />;\n } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n const video = status.getIn(['media_attachments', 0]);\n\n media = (\n <Video\n preview={video.get('preview_url')}\n src={video.get('url')}\n alt={video.get('description')}\n width={300}\n height={150}\n inline\n onOpenVideo={this.handleOpenVideo}\n sensitive={status.get('sensitive')}\n />\n );\n } else {\n media = (\n <MediaGallery\n standalone\n sensitive={status.get('sensitive')}\n media={status.get('media_attachments')}\n height={300}\n onOpenMedia={this.props.onOpenMedia}\n />\n );\n }\n } else if (status.get('spoiler_text').length === 0) {\n media = <CardContainer onOpenMedia={this.props.onOpenMedia} statusId={status.get('id')} />;\n }\n\n if (status.get('application')) {\n applicationLink = <span> · <a className='detailed-status__application' href={status.getIn(['application', 'website'])} target='_blank' rel='noopener'>{status.getIn(['application', 'name'])}</a></span>;\n }\n\n if (status.get('visibility') === 'direct') {\n reblogIcon = 'envelope';\n } else if (status.get('visibility') === 'private') {\n reblogIcon = 'lock';\n }\n\n if (status.get('visibility') === 'private') {\n reblogLink = <i className={`fa fa-${reblogIcon}`} />;\n } else {\n reblogLink = (<Link to={`/statuses/${status.get('id')}/reblogs`} className='detailed-status__link'>\n <i className={`fa fa-${reblogIcon}`} />\n <span className='detailed-status__reblogs'>\n <FormattedNumber value={status.get('reblogs_count')} />\n </span>\n </Link>);\n }\n\n return (\n <div className='detailed-status'>\n <a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='detailed-status__display-name'>\n <div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={48} /></div>\n <DisplayName account={status.get('account')} />\n </a>\n\n <StatusContent status={status} expanded={!status.get('hidden')} onExpandedToggle={this.handleExpandedToggle} />\n\n {media}\n\n <div className='detailed-status__meta'>\n <a className='detailed-status__datetime' href={status.get('url')} target='_blank' rel='noopener'>\n <FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />\n </a>{applicationLink} · {reblogLink} · <Link to={`/statuses/${status.get('id')}/favourites`} className='detailed-status__link'>\n <i className='fa fa-star' />\n <span className='detailed-status__favorites'>\n <FormattedNumber value={status.get('favourites_count')} />\n </span>\n </Link>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport IconButton from '../../../components/icon_button';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport DropdownMenuContainer from '../../../containers/dropdown_menu_container';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { me } from '../../../initial_state';\n\nconst messages = defineMessages({\n delete: { id: 'status.delete', defaultMessage: 'Delete' },\n redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },\n direct: { id: 'status.direct', defaultMessage: 'Direct message @{name}' },\n mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' },\n reply: { id: 'status.reply', defaultMessage: 'Reply' },\n reblog: { id: 'status.reblog', defaultMessage: 'Boost' },\n reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost to original audience' },\n cancel_reblog_private: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' },\n cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },\n favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },\n mute: { id: 'status.mute', defaultMessage: 'Mute @{name}' },\n muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },\n unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },\n block: { id: 'status.block', defaultMessage: 'Block @{name}' },\n report: { id: 'status.report', defaultMessage: 'Report @{name}' },\n share: { id: 'status.share', defaultMessage: 'Share' },\n pin: { id: 'status.pin', defaultMessage: 'Pin on profile' },\n unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },\n embed: { id: 'status.embed', defaultMessage: 'Embed' },\n});\n\n@injectIntl\nexport default class ActionBar extends React.PureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n status: ImmutablePropTypes.map.isRequired,\n onReply: PropTypes.func.isRequired,\n onReblog: PropTypes.func.isRequired,\n onFavourite: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n onDirect: PropTypes.func.isRequired,\n onMention: PropTypes.func.isRequired,\n onMute: PropTypes.func,\n onMuteConversation: PropTypes.func,\n onBlock: PropTypes.func,\n onReport: PropTypes.func,\n onPin: PropTypes.func,\n onEmbed: PropTypes.func,\n intl: PropTypes.object.isRequired,\n };\n\n handleReplyClick = () => {\n this.props.onReply(this.props.status);\n }\n\n handleReblogClick = (e) => {\n this.props.onReblog(this.props.status, e);\n }\n\n handleFavouriteClick = () => {\n this.props.onFavourite(this.props.status);\n }\n\n handleDeleteClick = () => {\n this.props.onDelete(this.props.status, this.context.router.history);\n }\n\n handleRedraftClick = () => {\n this.props.onDelete(this.props.status, this.context.router.history, true);\n }\n\n handleDirectClick = () => {\n this.props.onDirect(this.props.status.get('account'), this.context.router.history);\n }\n\n handleMentionClick = () => {\n this.props.onMention(this.props.status.get('account'), this.context.router.history);\n }\n\n handleMuteClick = () => {\n this.props.onMute(this.props.status.get('account'));\n }\n\n handleConversationMuteClick = () => {\n this.props.onMuteConversation(this.props.status);\n }\n\n handleBlockClick = () => {\n this.props.onBlock(this.props.status.get('account'));\n }\n\n handleReport = () => {\n this.props.onReport(this.props.status);\n }\n\n handlePinClick = () => {\n this.props.onPin(this.props.status);\n }\n\n handleShare = () => {\n navigator.share({\n text: this.props.status.get('search_index'),\n url: this.props.status.get('url'),\n });\n }\n\n handleEmbed = () => {\n this.props.onEmbed(this.props.status);\n }\n\n render () {\n const { status, intl } = this.props;\n\n const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));\n const mutingConversation = status.get('muted');\n\n let menu = [];\n\n if (publicStatus) {\n menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });\n menu.push(null);\n }\n\n if (me === status.getIn(['account', 'id'])) {\n if (publicStatus) {\n menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick });\n } else {\n if (status.get('visibility') === 'private') {\n menu.push({ text: intl.formatMessage(status.get('reblogged') ? messages.cancel_reblog_private : messages.reblog_private), action: this.handleReblogClick });\n }\n }\n\n menu.push(null);\n menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick });\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });\n menu.push({ text: intl.formatMessage(messages.redraft), action: this.handleRedraftClick });\n } else {\n menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick });\n menu.push({ text: intl.formatMessage(messages.direct, { name: status.getIn(['account', 'username']) }), action: this.handleDirectClick });\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick });\n menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick });\n menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });\n }\n\n const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (\n <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.share)} icon='share-alt' onClick={this.handleShare} /></div>\n );\n\n let reblogIcon = 'retweet';\n if (status.get('visibility') === 'direct') reblogIcon = 'envelope';\n else if (status.get('visibility') === 'private') reblogIcon = 'lock';\n\n let reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private');\n\n return (\n <div className='detailed-status__action-bar'>\n <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_id', null) === null ? 'reply' : 'reply-all'} onClick={this.handleReplyClick} /></div>\n <div className='detailed-status__button'><IconButton disabled={reblog_disabled} active={status.get('reblogged')} title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>\n <div className='detailed-status__button'><IconButton className='star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} /></div>\n {shareButton}\n\n <div className='detailed-status__action-bar-dropdown'>\n <DropdownMenuContainer size={18} icon='ellipsis-h' items={menu} direction='left' title='More' />\n </div>\n </div>\n );\n }\n\n}\n","import Immutable from 'immutable';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { fetchStatus } from '../../actions/statuses';\nimport MissingIndicator from '../../components/missing_indicator';\nimport DetailedStatus from './components/detailed_status';\nimport ActionBar from './components/action_bar';\nimport Column from '../ui/components/column';\nimport {\n favourite,\n unfavourite,\n reblog,\n unreblog,\n pin,\n unpin,\n} from '../../actions/interactions';\nimport {\n replyCompose,\n mentionCompose,\n directCompose,\n} from '../../actions/compose';\nimport { blockAccount } from '../../actions/accounts';\nimport {\n muteStatus,\n unmuteStatus,\n deleteStatus,\n hideStatus,\n revealStatus,\n} from '../../actions/statuses';\nimport { initMuteModal } from '../../actions/mutes';\nimport { initReport } from '../../actions/reports';\nimport { makeGetStatus } from '../../selectors';\nimport { ScrollContainer } from 'react-router-scroll-4';\nimport ColumnBackButton from '../../components/column_back_button';\nimport ColumnHeader from '../../components/column_header';\nimport StatusContainer from '../../containers/status_container';\nimport { openModal } from '../../actions/modal';\nimport { defineMessages, injectIntl, FormattedMessage } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { HotKeys } from 'react-hotkeys';\nimport { boostModal, deleteModal } from '../../initial_state';\nimport { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';\nimport { textForScreenReader } from '../../components/status';\n\nconst messages = defineMessages({\n deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },\n deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },\n redraftConfirm: { id: 'confirmations.redraft.confirm', defaultMessage: 'Delete & redraft' },\n redraftMessage: { id: 'confirmations.redraft.message', defaultMessage: 'Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.' },\n blockConfirm: { id: 'confirmations.block.confirm', defaultMessage: 'Block' },\n revealAll: { id: 'status.show_more_all', defaultMessage: 'Show more for all' },\n hideAll: { id: 'status.show_less_all', defaultMessage: 'Show less for all' },\n detailedStatus: { id: 'status.detailed_status', defaultMessage: 'Detailed conversation view' },\n});\n\nconst makeMapStateToProps = () => {\n const getStatus = makeGetStatus();\n\n const mapStateToProps = (state, props) => {\n const status = getStatus(state, { id: props.params.statusId });\n let ancestorsIds = Immutable.List();\n let descendantsIds = Immutable.List();\n\n if (status) {\n ancestorsIds = ancestorsIds.withMutations(mutable => {\n let id = status.get('in_reply_to_id');\n\n while (id) {\n mutable.unshift(id);\n id = state.getIn(['contexts', 'inReplyTos', id]);\n }\n });\n\n descendantsIds = descendantsIds.withMutations(mutable => {\n const ids = [status.get('id')];\n\n while (ids.length > 0) {\n let id = ids.shift();\n const replies = state.getIn(['contexts', 'replies', id]);\n\n if (status.get('id') !== id) {\n mutable.push(id);\n }\n\n if (replies) {\n replies.reverse().forEach(reply => {\n ids.unshift(reply);\n });\n }\n }\n });\n }\n\n return {\n status,\n ancestorsIds,\n descendantsIds,\n };\n };\n\n return mapStateToProps;\n};\n\n@injectIntl\n@connect(makeMapStateToProps)\nexport default class Status extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n status: ImmutablePropTypes.map,\n ancestorsIds: ImmutablePropTypes.list,\n descendantsIds: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n };\n\n state = {\n fullscreen: false,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchStatus(this.props.params.statusId));\n }\n\n componentDidMount () {\n attachFullscreenListener(this.onFullScreenChange);\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {\n this._scrolledIntoView = false;\n this.props.dispatch(fetchStatus(nextProps.params.statusId));\n }\n }\n\n handleFavouriteClick = (status) => {\n if (status.get('favourited')) {\n this.props.dispatch(unfavourite(status));\n } else {\n this.props.dispatch(favourite(status));\n }\n }\n\n handlePin = (status) => {\n if (status.get('pinned')) {\n this.props.dispatch(unpin(status));\n } else {\n this.props.dispatch(pin(status));\n }\n }\n\n handleReplyClick = (status) => {\n this.props.dispatch(replyCompose(status, this.context.router.history));\n }\n\n handleModalReblog = (status) => {\n this.props.dispatch(reblog(status));\n }\n\n handleReblogClick = (status, e) => {\n if (status.get('reblogged')) {\n this.props.dispatch(unreblog(status));\n } else {\n if (e.shiftKey || !boostModal) {\n this.handleModalReblog(status);\n } else {\n this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));\n }\n }\n }\n\n handleDeleteClick = (status, history, withRedraft = false) => {\n const { dispatch, intl } = this.props;\n\n if (!deleteModal) {\n dispatch(deleteStatus(status.get('id'), history, withRedraft));\n } else {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),\n confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),\n onConfirm: () => dispatch(deleteStatus(status.get('id'), history, withRedraft)),\n }));\n }\n }\n\n handleDirectClick = (account, router) => {\n this.props.dispatch(directCompose(account, router));\n }\n\n handleMentionClick = (account, router) => {\n this.props.dispatch(mentionCompose(account, router));\n }\n\n handleOpenMedia = (media, index) => {\n this.props.dispatch(openModal('MEDIA', { media, index }));\n }\n\n handleOpenVideo = (media, time) => {\n this.props.dispatch(openModal('VIDEO', { media, time }));\n }\n\n handleMuteClick = (account) => {\n this.props.dispatch(initMuteModal(account));\n }\n\n handleConversationMuteClick = (status) => {\n if (status.get('muted')) {\n this.props.dispatch(unmuteStatus(status.get('id')));\n } else {\n this.props.dispatch(muteStatus(status.get('id')));\n }\n }\n\n handleToggleHidden = (status) => {\n if (status.get('hidden')) {\n this.props.dispatch(revealStatus(status.get('id')));\n } else {\n this.props.dispatch(hideStatus(status.get('id')));\n }\n }\n\n handleToggleAll = () => {\n const { status, ancestorsIds, descendantsIds } = this.props;\n const statusIds = [status.get('id')].concat(ancestorsIds.toJS(), descendantsIds.toJS());\n\n if (status.get('hidden')) {\n this.props.dispatch(revealStatus(statusIds));\n } else {\n this.props.dispatch(hideStatus(statusIds));\n }\n }\n\n handleBlockClick = (account) => {\n const { dispatch, intl } = this.props;\n\n dispatch(openModal('CONFIRM', {\n message: <FormattedMessage id='confirmations.block.message' defaultMessage='Are you sure you want to block {name}?' values={{ name: <strong>@{account.get('acct')}</strong> }} />,\n confirm: intl.formatMessage(messages.blockConfirm),\n onConfirm: () => dispatch(blockAccount(account.get('id'))),\n }));\n }\n\n handleReport = (status) => {\n this.props.dispatch(initReport(status.get('account'), status));\n }\n\n handleEmbed = (status) => {\n this.props.dispatch(openModal('EMBED', { url: status.get('url') }));\n }\n\n handleHotkeyMoveUp = () => {\n this.handleMoveUp(this.props.status.get('id'));\n }\n\n handleHotkeyMoveDown = () => {\n this.handleMoveDown(this.props.status.get('id'));\n }\n\n handleHotkeyReply = e => {\n e.preventDefault();\n this.handleReplyClick(this.props.status);\n }\n\n handleHotkeyFavourite = () => {\n this.handleFavouriteClick(this.props.status);\n }\n\n handleHotkeyBoost = () => {\n this.handleReblogClick(this.props.status);\n }\n\n handleHotkeyMention = e => {\n e.preventDefault();\n this.handleMentionClick(this.props.status.get('account'));\n }\n\n handleHotkeyOpenProfile = () => {\n this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);\n }\n\n handleHotkeyToggleHidden = () => {\n this.handleToggleHidden(this.props.status);\n }\n\n handleMoveUp = id => {\n const { status, ancestorsIds, descendantsIds } = this.props;\n\n if (id === status.get('id')) {\n this._selectChild(ancestorsIds.size - 1);\n } else {\n let index = ancestorsIds.indexOf(id);\n\n if (index === -1) {\n index = descendantsIds.indexOf(id);\n this._selectChild(ancestorsIds.size + index);\n } else {\n this._selectChild(index - 1);\n }\n }\n }\n\n handleMoveDown = id => {\n const { status, ancestorsIds, descendantsIds } = this.props;\n\n if (id === status.get('id')) {\n this._selectChild(ancestorsIds.size + 1);\n } else {\n let index = ancestorsIds.indexOf(id);\n\n if (index === -1) {\n index = descendantsIds.indexOf(id);\n this._selectChild(ancestorsIds.size + index + 2);\n } else {\n this._selectChild(index + 1);\n }\n }\n }\n\n _selectChild (index) {\n const element = this.node.querySelectorAll('.focusable')[index];\n\n if (element) {\n element.focus();\n }\n }\n\n renderChildren (list) {\n return list.map(id => (\n <StatusContainer\n key={id}\n id={id}\n onMoveUp={this.handleMoveUp}\n onMoveDown={this.handleMoveDown}\n contextType='thread'\n />\n ));\n }\n\n setRef = c => {\n this.node = c;\n }\n\n componentDidUpdate () {\n if (this._scrolledIntoView) {\n return;\n }\n\n const { status, ancestorsIds } = this.props;\n\n if (status && ancestorsIds && ancestorsIds.size > 0) {\n const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size - 1];\n\n window.requestAnimationFrame(() => {\n element.scrollIntoView(true);\n });\n this._scrolledIntoView = true;\n }\n }\n\n componentWillUnmount () {\n detachFullscreenListener(this.onFullScreenChange);\n }\n\n onFullScreenChange = () => {\n this.setState({ fullscreen: isFullscreen() });\n }\n\n render () {\n let ancestors, descendants;\n const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl } = this.props;\n const { fullscreen } = this.state;\n\n if (status === null) {\n return (\n <Column>\n <ColumnBackButton />\n <MissingIndicator />\n </Column>\n );\n }\n\n if (ancestorsIds && ancestorsIds.size > 0) {\n ancestors = <div>{this.renderChildren(ancestorsIds)}</div>;\n }\n\n if (descendantsIds && descendantsIds.size > 0) {\n descendants = <div>{this.renderChildren(descendantsIds)}</div>;\n }\n\n const handlers = {\n moveUp: this.handleHotkeyMoveUp,\n moveDown: this.handleHotkeyMoveDown,\n reply: this.handleHotkeyReply,\n favourite: this.handleHotkeyFavourite,\n boost: this.handleHotkeyBoost,\n mention: this.handleHotkeyMention,\n openProfile: this.handleHotkeyOpenProfile,\n toggleHidden: this.handleHotkeyToggleHidden,\n };\n\n return (\n <Column label={intl.formatMessage(messages.detailedStatus)}>\n <ColumnHeader\n showBackButton\n extraButton={(\n <button className='column-header__button' title={intl.formatMessage(status.get('hidden') ? messages.revealAll : messages.hideAll)} aria-label={intl.formatMessage(status.get('hidden') ? messages.revealAll : messages.hideAll)} onClick={this.handleToggleAll} aria-pressed={status.get('hidden') ? 'false' : 'true'}><i className={`fa fa-${status.get('hidden') ? 'eye-slash' : 'eye'}`} /></button>\n )}\n />\n\n <ScrollContainer scrollKey='thread' shouldUpdateScroll={shouldUpdateScroll}>\n <div className={classNames('scrollable', 'detailed-status__wrapper', { fullscreen })} ref={this.setRef}>\n {ancestors}\n\n <HotKeys handlers={handlers}>\n <div className='focusable' tabIndex='0' aria-label={textForScreenReader(intl, status, false, !status.get('hidden'))}>\n <DetailedStatus\n status={status}\n onOpenVideo={this.handleOpenVideo}\n onOpenMedia={this.handleOpenMedia}\n onToggleHidden={this.handleToggleHidden}\n />\n\n <ActionBar\n status={status}\n onReply={this.handleReplyClick}\n onFavourite={this.handleFavouriteClick}\n onReblog={this.handleReblogClick}\n onDelete={this.handleDeleteClick}\n onDirect={this.handleDirectClick}\n onMention={this.handleMentionClick}\n onMute={this.handleMuteClick}\n onMuteConversation={this.handleConversationMuteClick}\n onBlock={this.handleBlockClick}\n onReport={this.handleReport}\n onPin={this.handlePin}\n onEmbed={this.handleEmbed}\n />\n </div>\n </HotKeys>\n\n {descendants}\n </div>\n </ScrollContainer>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file
+{"version":3,"sources":["webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/status/components/detailed_status.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/status/components/action_bar.js","webpack:///app/javascript/tank/sources/git/git.pleroma.social/pleroma/mastofe/app/javascript/mastodon/features/status/index.js"],"names":["DetailedStatus","height","e","button","ctrlKey","metaKey","context","router","preventDefault","history","push","props","status","getIn","stopPropagation","media","startTime","onOpenVideo","onToggleHidden","c","node","_measureHeight","href","target","nodeName","parentNode","window","open","heightJustChanged","this","measureHeight","scheduleIdleTask","setState","Math","ceil","scrollHeight","onHeightChange","componentDidUpdate","prevProps","prevState","state","render","get","outerStyle","boxSizing","compact","applicationLink","reblogLink","reblogIcon","favouriteLink","size","attachment","src","alt","duration","preload","preview","blurhash","width","inline","handleOpenVideo","sensitive","visible","showMedia","onToggleVisibility","onToggleMediaVisibility","standalone","onOpenMedia","length","card","className","rel","id","to","value","onClick","handleModalLink","style","ref","setRef","classNames","handleAccountClick","account","localDomain","domain","expanded","onExpandedToggle","handleExpandedToggle","Date","hour12","year","month","day","hour","minute","ImmutablePureComponent","PropTypes","object","ImmutablePropTypes","map","func","isRequired","bool","string","messages","defineMessages","delete","redraft","direct","mention","reply","reblog","reblog_private","cancel_reblog_private","cannot_reblog","favourite","mute","muteConversation","unmuteConversation","block","report","share","pin","unpin","embed","admin_account","admin_status","copy","ActionBar","injectIntl","onReply","onReblog","onFavourite","onDelete","onDirect","onMention","onMute","onMuteConversation","onBlock","onReport","onPin","navigator","text","url","onEmbed","textarea","document","createElement","textContent","position","body","appendChild","select","execCommand","removeChild","intl","publicStatus","includes","mutingConversation","menu","formatMessage","action","handleCopy","handleEmbed","me","handlePinClick","handleReblogClick","handleConversationMuteClick","handleDeleteClick","handleRedraftClick","name","handleMentionClick","handleDirectClick","handleMuteClick","handleBlockClick","handleReport","isStaff","replyIcon","shareButton","title","icon","handleShare","reblog_disabled","handleReplyClick","disabled","active","animate","handleFavouriteClick","items","direction","React","PureComponent","deleteConfirm","deleteMessage","redraftConfirm","redraftMessage","revealAll","hideAll","detailedStatus","replyConfirm","replyMessage","Status","connect","getStatus","makeGetStatus","getAncestorsIds","createSelector","_","statusId","inReplyTos","ancestorsIds","Immutable","List","withMutations","mutable","unshift","getDescendantsIds","contextReplies","statuses","descendantsIds","ids","shift","replies","reverse","forEach","insertAt","findIndex","idx","splice","params","askReplyConfirmation","trim","fullscreen","defaultMediaVisibility","loadedStatusId","undefined","dispatch","unfavourite","openModal","message","confirm","onConfirm","replyCompose","unreblog","shiftKey","boostModal","handleModalReblog","withRedraft","deleteModal","deleteStatus","directCompose","mentionCompose","index","time","initMuteModal","unmuteStatus","muteStatus","revealStatus","hideStatus","statusIds","concat","toJS","initBlockModal","initReport","handleMoveUp","handleMoveDown","handleToggleHidden","handleToggleMediaVisibility","_selectChild","indexOf","isFullscreen","componentWillMount","fetchStatus","componentDidMount","attachFullscreenListener","onFullScreenChange","componentWillReceiveProps","nextProps","_scrolledIntoView","align_top","container","element","querySelectorAll","scrollTop","offsetTop","scrollIntoView","clientHeight","offsetHeight","focus","renderChildren","list","onMoveUp","onMoveDown","contextType","requestAnimationFrame","componentWillUnmount","detachFullscreenListener","ancestors","descendants","shouldUpdateScroll","multiColumn","handlers","moveUp","handleHotkeyMoveUp","moveDown","handleHotkeyMoveDown","handleHotkeyReply","handleHotkeyFavourite","boost","handleHotkeyBoost","handleHotkeyMention","openProfile","handleHotkeyOpenProfile","toggleHidden","handleHotkeyToggleHidden","toggleSensitive","handleHotkeyToggleSensitive","bindToDocument","label","showBackButton","extraButton","aria-label","handleToggleAll","aria-pressed","scrollKey","tabIndex","textForScreenReader","handleOpenMedia","handlePin"],"mappings":"oUAiBqBA,E,sLAmBX,CACNC,OAAQ,O,gDAGW,SAACC,GACH,IAAbA,E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wBAAyBpC,KAAK8O,8BAGhC,YAAC,EAAD,CACE/P,OAAQA,EACRsH,QAASrG,KAAK0J,iBACdnD,YAAavG,KAAK8J,qBAClBxD,SAAUtG,KAAKyI,kBACfjC,SAAUxG,KAAK2I,kBACflC,SAAUzG,KAAK+I,kBACfrC,UAAW1G,KAAK8I,mBAChBnC,OAAQ3G,KAAKgJ,gBACbpC,mBAAoB5G,KAAK0I,4BACzB7B,QAAS7G,KAAKiJ,iBACdnC,SAAU9G,KAAKkJ,aACfnC,MAAO/G,KAAK2S,UACZxL,QAASnH,KAAKsI,gBAKnBuI,M,GApXQ3M,K,6BAEG,CACpBxF,OAAQyF,IAAUC,S,0BAGD,CACjBoI,OAAQrI,IAAUC,OAAOI,WACzBuI,SAAU5I,IAAUI,KAAKC,WACzBzF,OAAQsF,IAAmBC,IAC3B+G,aAAchH,IAAmBgM,KACjCvE,eAAgBzH,IAAmBgM,KACnCvI,KAAM3D,IAAUC,OAAOI,WACvBiI,qBAAsBtI,IAAUM,KAChCsM,YAAa5M,IAAUM,KACvBlB,OAAQY,IAAUO,OAAOF,a","file":"features/status.js","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport Avatar from '../../../components/avatar';\nimport DisplayName from '../../../components/display_name';\nimport StatusContent from '../../../components/status_content';\nimport MediaGallery from '../../../components/media_gallery';\nimport { Link } from 'react-router-dom';\nimport { FormattedDate, FormattedNumber } from 'react-intl';\nimport Card from './card';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Video from '../../video';\nimport Audio from '../../audio';\nimport scheduleIdleTask from '../../ui/util/schedule_idle_task';\nimport classNames from 'classnames';\nimport Icon from 'mastodon/components/icon';\n\nexport default class DetailedStatus extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n status: ImmutablePropTypes.map,\n onOpenMedia: PropTypes.func.isRequired,\n onOpenVideo: PropTypes.func.isRequired,\n onToggleHidden: PropTypes.func.isRequired,\n measureHeight: PropTypes.bool,\n onHeightChange: PropTypes.func,\n domain: PropTypes.string.isRequired,\n compact: PropTypes.bool,\n showMedia: PropTypes.bool,\n onToggleMediaVisibility: PropTypes.func,\n };\n\n state = {\n height: null,\n };\n\n handleAccountClick = (e) => {\n if (e.button === 0 && !(e.ctrlKey || e.metaKey) && this.context.router) {\n e.preventDefault();\n this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);\n }\n\n e.stopPropagation();\n }\n\n handleOpenVideo = (media, startTime) => {\n this.props.onOpenVideo(media, startTime);\n }\n\n handleExpandedToggle = () => {\n this.props.onToggleHidden(this.props.status);\n }\n\n _measureHeight (heightJustChanged) {\n if (this.props.measureHeight && this.node) {\n scheduleIdleTask(() => this.node && this.setState({ height: Math.ceil(this.node.scrollHeight) + 1 }));\n\n if (this.props.onHeightChange && heightJustChanged) {\n this.props.onHeightChange();\n }\n }\n }\n\n setRef = c => {\n this.node = c;\n this._measureHeight();\n }\n\n componentDidUpdate (prevProps, prevState) {\n this._measureHeight(prevState.height !== this.state.height);\n }\n\n handleModalLink = e => {\n e.preventDefault();\n\n let href;\n\n if (e.target.nodeName !== 'A') {\n href = e.target.parentNode.href;\n } else {\n href = e.target.href;\n }\n\n window.open(href, 'mastodon-intent', 'width=445,height=600,resizable=no,menubar=no,status=no,scrollbars=yes');\n }\n\n render () {\n const status = (this.props.status && this.props.status.get('reblog')) ? this.props.status.get('reblog') : this.props.status;\n const outerStyle = { boxSizing: 'border-box' };\n const { compact } = this.props;\n\n if (!status) {\n return null;\n }\n\n let media = '';\n let applicationLink = '';\n let reblogLink = '';\n let reblogIcon = 'retweet';\n let favouriteLink = '';\n\n if (this.props.measureHeight) {\n outerStyle.height = `${this.state.height}px`;\n }\n\n if (status.get('media_attachments').size > 0) {\n if (status.getIn(['media_attachments', 0, 'type']) === 'audio') {\n const attachment = status.getIn(['media_attachments', 0]);\n\n media = (\n <Audio\n src={attachment.get('url')}\n alt={attachment.get('description')}\n duration={attachment.getIn(['meta', 'original', 'duration'], 0)}\n height={110}\n preload\n />\n );\n } else if (status.getIn(['media_attachments', 0, 'type']) === 'video') {\n const attachment = status.getIn(['media_attachments', 0]);\n\n media = (\n <Video\n preview={attachment.get('preview_url')}\n blurhash={attachment.get('blurhash')}\n src={attachment.get('url')}\n alt={attachment.get('description')}\n width={300}\n height={150}\n inline\n onOpenVideo={this.handleOpenVideo}\n sensitive={status.get('sensitive')}\n visible={this.props.showMedia}\n onToggleVisibility={this.props.onToggleMediaVisibility}\n />\n );\n } else {\n media = (\n <MediaGallery\n standalone\n sensitive={status.get('sensitive')}\n media={status.get('media_attachments')}\n height={300}\n onOpenMedia={this.props.onOpenMedia}\n visible={this.props.showMedia}\n onToggleVisibility={this.props.onToggleMediaVisibility}\n />\n );\n }\n } else if (status.get('spoiler_text').length === 0) {\n media = <Card onOpenMedia={this.props.onOpenMedia} card={status.get('card', null)} />;\n }\n\n if (status.get('application')) {\n applicationLink = <span> · <a className='detailed-status__application' href={status.getIn(['application', 'website'])} target='_blank' rel='noopener'>{status.getIn(['application', 'name'])}</a></span>;\n }\n\n if (status.get('visibility') === 'direct') {\n reblogIcon = 'envelope';\n } else if (status.get('visibility') === 'private') {\n reblogIcon = 'lock';\n }\n\n if (status.get('visibility') === 'private') {\n reblogLink = <Icon id={reblogIcon} />;\n } else if (this.context.router) {\n reblogLink = (\n <Link to={`/statuses/${status.get('id')}/reblogs`} className='detailed-status__link'>\n <Icon id={reblogIcon} />\n <span className='detailed-status__reblogs'>\n <FormattedNumber value={status.get('reblogs_count')} />\n </span>\n </Link>\n );\n } else {\n reblogLink = (\n <a href={`/interact/${status.get('id')}?type=reblog`} className='detailed-status__link' onClick={this.handleModalLink}>\n <Icon id={reblogIcon} />\n <span className='detailed-status__reblogs'>\n <FormattedNumber value={status.get('reblogs_count')} />\n </span>\n </a>\n );\n }\n\n if (this.context.router) {\n favouriteLink = (\n <Link to={`/statuses/${status.get('id')}/favourites`} className='detailed-status__link'>\n <Icon id='star' />\n <span className='detailed-status__favorites'>\n <FormattedNumber value={status.get('favourites_count')} />\n </span>\n </Link>\n );\n } else {\n favouriteLink = (\n <a href={`/interact/${status.get('id')}?type=favourite`} className='detailed-status__link' onClick={this.handleModalLink}>\n <Icon id='star' />\n <span className='detailed-status__favorites'>\n <FormattedNumber value={status.get('favourites_count')} />\n </span>\n </a>\n );\n }\n\n return (\n <div style={outerStyle}>\n <div ref={this.setRef} className={classNames('detailed-status', { compact })}>\n <a href={status.getIn(['account', 'url'])} onClick={this.handleAccountClick} className='detailed-status__display-name'>\n <div className='detailed-status__display-avatar'><Avatar account={status.get('account')} size={48} /></div>\n <DisplayName account={status.get('account')} localDomain={this.props.domain} />\n </a>\n\n <StatusContent status={status} expanded={!status.get('hidden')} onExpandedToggle={this.handleExpandedToggle} />\n\n {media}\n\n <div className='detailed-status__meta'>\n <a className='detailed-status__datetime' href={status.get('url')} target='_blank' rel='noopener'>\n <FormattedDate value={new Date(status.get('created_at'))} hour12={false} year='numeric' month='short' day='2-digit' hour='2-digit' minute='2-digit' />\n </a>{applicationLink} · {reblogLink} · {favouriteLink}\n </div>\n </div>\n </div>\n );\n }\n\n}\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport IconButton from '../../../components/icon_button';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport DropdownMenuContainer from '../../../containers/dropdown_menu_container';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport { me, isStaff } from '../../../initial_state';\n\nconst messages = defineMessages({\n delete: { id: 'status.delete', defaultMessage: 'Delete' },\n redraft: { id: 'status.redraft', defaultMessage: 'Delete & re-draft' },\n direct: { id: 'status.direct', defaultMessage: 'Direct message @{name}' },\n mention: { id: 'status.mention', defaultMessage: 'Mention @{name}' },\n reply: { id: 'status.reply', defaultMessage: 'Reply' },\n reblog: { id: 'status.reblog', defaultMessage: 'Boost' },\n reblog_private: { id: 'status.reblog_private', defaultMessage: 'Boost to original audience' },\n cancel_reblog_private: { id: 'status.cancel_reblog_private', defaultMessage: 'Unboost' },\n cannot_reblog: { id: 'status.cannot_reblog', defaultMessage: 'This post cannot be boosted' },\n favourite: { id: 'status.favourite', defaultMessage: 'Favourite' },\n mute: { id: 'status.mute', defaultMessage: 'Mute @{name}' },\n muteConversation: { id: 'status.mute_conversation', defaultMessage: 'Mute conversation' },\n unmuteConversation: { id: 'status.unmute_conversation', defaultMessage: 'Unmute conversation' },\n block: { id: 'status.block', defaultMessage: 'Block @{name}' },\n report: { id: 'status.report', defaultMessage: 'Report @{name}' },\n share: { id: 'status.share', defaultMessage: 'Share' },\n pin: { id: 'status.pin', defaultMessage: 'Pin on profile' },\n unpin: { id: 'status.unpin', defaultMessage: 'Unpin from profile' },\n embed: { id: 'status.embed', defaultMessage: 'Embed' },\n admin_account: { id: 'status.admin_account', defaultMessage: 'Open moderation interface for @{name}' },\n admin_status: { id: 'status.admin_status', defaultMessage: 'Open this status in the moderation interface' },\n copy: { id: 'status.copy', defaultMessage: 'Copy link to status' },\n});\n\nexport default @injectIntl\nclass ActionBar extends React.PureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n status: ImmutablePropTypes.map.isRequired,\n onReply: PropTypes.func.isRequired,\n onReblog: PropTypes.func.isRequired,\n onFavourite: PropTypes.func.isRequired,\n onDelete: PropTypes.func.isRequired,\n onDirect: PropTypes.func.isRequired,\n onMention: PropTypes.func.isRequired,\n onMute: PropTypes.func,\n onMuteConversation: PropTypes.func,\n onBlock: PropTypes.func,\n onReport: PropTypes.func,\n onPin: PropTypes.func,\n onEmbed: PropTypes.func,\n intl: PropTypes.object.isRequired,\n };\n\n handleReplyClick = () => {\n this.props.onReply(this.props.status);\n }\n\n handleReblogClick = (e) => {\n this.props.onReblog(this.props.status, e);\n }\n\n handleFavouriteClick = () => {\n this.props.onFavourite(this.props.status);\n }\n\n handleDeleteClick = () => {\n this.props.onDelete(this.props.status, this.context.router.history);\n }\n\n handleRedraftClick = () => {\n this.props.onDelete(this.props.status, this.context.router.history, true);\n }\n\n handleDirectClick = () => {\n this.props.onDirect(this.props.status.get('account'), this.context.router.history);\n }\n\n handleMentionClick = () => {\n this.props.onMention(this.props.status.get('account'), this.context.router.history);\n }\n\n handleMuteClick = () => {\n this.props.onMute(this.props.status.get('account'));\n }\n\n handleConversationMuteClick = () => {\n this.props.onMuteConversation(this.props.status);\n }\n\n handleBlockClick = () => {\n this.props.onBlock(this.props.status);\n }\n\n handleReport = () => {\n this.props.onReport(this.props.status);\n }\n\n handlePinClick = () => {\n this.props.onPin(this.props.status);\n }\n\n handleShare = () => {\n navigator.share({\n text: this.props.status.get('search_index'),\n url: this.props.status.get('url'),\n });\n }\n\n handleEmbed = () => {\n this.props.onEmbed(this.props.status);\n }\n\n handleCopy = () => {\n const url = this.props.status.get('url');\n const textarea = document.createElement('textarea');\n\n textarea.textContent = url;\n textarea.style.position = 'fixed';\n\n document.body.appendChild(textarea);\n\n try {\n textarea.select();\n document.execCommand('copy');\n } catch (e) {\n\n } finally {\n document.body.removeChild(textarea);\n }\n }\n\n render () {\n const { status, intl } = this.props;\n\n const publicStatus = ['public', 'unlisted'].includes(status.get('visibility'));\n const mutingConversation = status.get('muted');\n\n let menu = [];\n\n if (publicStatus) {\n menu.push({ text: intl.formatMessage(messages.copy), action: this.handleCopy });\n menu.push({ text: intl.formatMessage(messages.embed), action: this.handleEmbed });\n menu.push(null);\n }\n\n if (me === status.getIn(['account', 'id'])) {\n if (publicStatus) {\n menu.push({ text: intl.formatMessage(status.get('pinned') ? messages.unpin : messages.pin), action: this.handlePinClick });\n } else {\n if (status.get('visibility') === 'private') {\n menu.push({ text: intl.formatMessage(status.get('reblogged') ? messages.cancel_reblog_private : messages.reblog_private), action: this.handleReblogClick });\n }\n }\n\n menu.push(null);\n menu.push({ text: intl.formatMessage(mutingConversation ? messages.unmuteConversation : messages.muteConversation), action: this.handleConversationMuteClick });\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.delete), action: this.handleDeleteClick });\n menu.push({ text: intl.formatMessage(messages.redraft), action: this.handleRedraftClick });\n } else {\n menu.push({ text: intl.formatMessage(messages.mention, { name: status.getIn(['account', 'username']) }), action: this.handleMentionClick });\n menu.push({ text: intl.formatMessage(messages.direct, { name: status.getIn(['account', 'username']) }), action: this.handleDirectClick });\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.mute, { name: status.getIn(['account', 'username']) }), action: this.handleMuteClick });\n menu.push({ text: intl.formatMessage(messages.block, { name: status.getIn(['account', 'username']) }), action: this.handleBlockClick });\n menu.push({ text: intl.formatMessage(messages.report, { name: status.getIn(['account', 'username']) }), action: this.handleReport });\n if (isStaff) {\n menu.push(null);\n menu.push({ text: intl.formatMessage(messages.admin_account, { name: status.getIn(['account', 'username']) }), href: `/admin/accounts/${status.getIn(['account', 'id'])}` });\n menu.push({ text: intl.formatMessage(messages.admin_status), href: `/admin/accounts/${status.getIn(['account', 'id'])}/statuses/${status.get('id')}` });\n }\n }\n\n const shareButton = ('share' in navigator) && status.get('visibility') === 'public' && (\n <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.share)} icon='share-alt' onClick={this.handleShare} /></div>\n );\n\n let replyIcon;\n if (status.get('in_reply_to_id', null) === null) {\n replyIcon = 'reply';\n } else {\n replyIcon = 'reply-all';\n }\n\n let reblogIcon = 'retweet';\n if (status.get('visibility') === 'direct') reblogIcon = 'envelope';\n else if (status.get('visibility') === 'private') reblogIcon = 'lock';\n\n let reblog_disabled = (status.get('visibility') === 'direct' || status.get('visibility') === 'private');\n\n return (\n <div className='detailed-status__action-bar'>\n <div className='detailed-status__button'><IconButton title={intl.formatMessage(messages.reply)} icon={status.get('in_reply_to_account_id') === status.getIn(['account', 'id']) ? 'reply' : replyIcon} onClick={this.handleReplyClick} /></div>\n <div className='detailed-status__button'><IconButton disabled={reblog_disabled} active={status.get('reblogged')} title={reblog_disabled ? intl.formatMessage(messages.cannot_reblog) : intl.formatMessage(messages.reblog)} icon={reblogIcon} onClick={this.handleReblogClick} /></div>\n <div className='detailed-status__button'><IconButton className='star-icon' animate active={status.get('favourited')} title={intl.formatMessage(messages.favourite)} icon='star' onClick={this.handleFavouriteClick} /></div>\n {shareButton}\n\n <div className='detailed-status__action-bar-dropdown'>\n <DropdownMenuContainer size={18} icon='ellipsis-h' items={menu} direction='left' title='More' />\n </div>\n </div>\n );\n }\n\n}\n","import Immutable from 'immutable';\nimport React from 'react';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport classNames from 'classnames';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport { createSelector } from 'reselect';\nimport { fetchStatus } from '../../actions/statuses';\nimport MissingIndicator from '../../components/missing_indicator';\nimport DetailedStatus from './components/detailed_status';\nimport ActionBar from './components/action_bar';\nimport Column from '../ui/components/column';\nimport {\n favourite,\n unfavourite,\n reblog,\n unreblog,\n pin,\n unpin,\n} from '../../actions/interactions';\nimport {\n replyCompose,\n mentionCompose,\n directCompose,\n} from '../../actions/compose';\nimport {\n muteStatus,\n unmuteStatus,\n deleteStatus,\n hideStatus,\n revealStatus,\n} from '../../actions/statuses';\nimport { initMuteModal } from '../../actions/mutes';\nimport { initBlockModal } from '../../actions/blocks';\nimport { initReport } from '../../actions/reports';\nimport { makeGetStatus } from '../../selectors';\nimport { ScrollContainer } from 'react-router-scroll-4';\nimport ColumnBackButton from '../../components/column_back_button';\nimport ColumnHeader from '../../components/column_header';\nimport StatusContainer from '../../containers/status_container';\nimport { openModal } from '../../actions/modal';\nimport { defineMessages, injectIntl } from 'react-intl';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport { HotKeys } from 'react-hotkeys';\nimport { boostModal, deleteModal } from '../../initial_state';\nimport { attachFullscreenListener, detachFullscreenListener, isFullscreen } from '../ui/util/fullscreen';\nimport { textForScreenReader, defaultMediaVisibility } from '../../components/status';\nimport Icon from 'mastodon/components/icon';\n\nconst messages = defineMessages({\n deleteConfirm: { id: 'confirmations.delete.confirm', defaultMessage: 'Delete' },\n deleteMessage: { id: 'confirmations.delete.message', defaultMessage: 'Are you sure you want to delete this status?' },\n redraftConfirm: { id: 'confirmations.redraft.confirm', defaultMessage: 'Delete & redraft' },\n redraftMessage: { id: 'confirmations.redraft.message', defaultMessage: 'Are you sure you want to delete this status and re-draft it? Favourites and boosts will be lost, and replies to the original post will be orphaned.' },\n revealAll: { id: 'status.show_more_all', defaultMessage: 'Show more for all' },\n hideAll: { id: 'status.show_less_all', defaultMessage: 'Show less for all' },\n detailedStatus: { id: 'status.detailed_status', defaultMessage: 'Detailed conversation view' },\n replyConfirm: { id: 'confirmations.reply.confirm', defaultMessage: 'Reply' },\n replyMessage: { id: 'confirmations.reply.message', defaultMessage: 'Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?' },\n});\n\nconst makeMapStateToProps = () => {\n const getStatus = makeGetStatus();\n\n const getAncestorsIds = createSelector([\n (_, { id }) => id,\n state => state.getIn(['contexts', 'inReplyTos']),\n ], (statusId, inReplyTos) => {\n let ancestorsIds = Immutable.List();\n ancestorsIds = ancestorsIds.withMutations(mutable => {\n let id = statusId;\n\n while (id) {\n mutable.unshift(id);\n id = inReplyTos.get(id);\n }\n });\n\n return ancestorsIds;\n });\n\n const getDescendantsIds = createSelector([\n (_, { id }) => id,\n state => state.getIn(['contexts', 'replies']),\n state => state.get('statuses'),\n ], (statusId, contextReplies, statuses) => {\n let descendantsIds = [];\n const ids = [statusId];\n\n while (ids.length > 0) {\n let id = ids.shift();\n const replies = contextReplies.get(id);\n\n if (statusId !== id) {\n descendantsIds.push(id);\n }\n\n if (replies) {\n replies.reverse().forEach(reply => {\n ids.unshift(reply);\n });\n }\n }\n\n let insertAt = descendantsIds.findIndex((id) => statuses.get(id).get('in_reply_to_account_id') !== statuses.get(id).get('account'));\n if (insertAt !== -1) {\n descendantsIds.forEach((id, idx) => {\n if (idx > insertAt && statuses.get(id).get('in_reply_to_account_id') === statuses.get(id).get('account')) {\n descendantsIds.splice(idx, 1);\n descendantsIds.splice(insertAt, 0, id);\n insertAt += 1;\n }\n });\n }\n\n return Immutable.List(descendantsIds);\n });\n\n const mapStateToProps = (state, props) => {\n const status = getStatus(state, { id: props.params.statusId });\n let ancestorsIds = Immutable.List();\n let descendantsIds = Immutable.List();\n\n if (status) {\n ancestorsIds = getAncestorsIds(state, { id: status.get('in_reply_to_id') });\n descendantsIds = getDescendantsIds(state, { id: status.get('id') });\n }\n\n return {\n status,\n ancestorsIds,\n descendantsIds,\n askReplyConfirmation: state.getIn(['compose', 'text']).trim().length !== 0,\n domain: state.getIn(['meta', 'domain']),\n };\n };\n\n return mapStateToProps;\n};\n\nexport default @injectIntl\n@connect(makeMapStateToProps)\nclass Status extends ImmutablePureComponent {\n\n static contextTypes = {\n router: PropTypes.object,\n };\n\n static propTypes = {\n params: PropTypes.object.isRequired,\n dispatch: PropTypes.func.isRequired,\n status: ImmutablePropTypes.map,\n ancestorsIds: ImmutablePropTypes.list,\n descendantsIds: ImmutablePropTypes.list,\n intl: PropTypes.object.isRequired,\n askReplyConfirmation: PropTypes.bool,\n multiColumn: PropTypes.bool,\n domain: PropTypes.string.isRequired,\n };\n\n state = {\n fullscreen: false,\n showMedia: defaultMediaVisibility(this.props.status),\n loadedStatusId: undefined,\n };\n\n componentWillMount () {\n this.props.dispatch(fetchStatus(this.props.params.statusId));\n }\n\n componentDidMount () {\n attachFullscreenListener(this.onFullScreenChange);\n }\n\n componentWillReceiveProps (nextProps) {\n if (nextProps.params.statusId !== this.props.params.statusId && nextProps.params.statusId) {\n this._scrolledIntoView = false;\n this.props.dispatch(fetchStatus(nextProps.params.statusId));\n }\n\n if (nextProps.status && nextProps.status.get('id') !== this.state.loadedStatusId) {\n this.setState({ showMedia: defaultMediaVisibility(nextProps.status), loadedStatusId: nextProps.status.get('id') });\n }\n }\n\n handleToggleMediaVisibility = () => {\n this.setState({ showMedia: !this.state.showMedia });\n }\n\n handleFavouriteClick = (status) => {\n if (status.get('favourited')) {\n this.props.dispatch(unfavourite(status));\n } else {\n this.props.dispatch(favourite(status));\n }\n }\n\n handlePin = (status) => {\n if (status.get('pinned')) {\n this.props.dispatch(unpin(status));\n } else {\n this.props.dispatch(pin(status));\n }\n }\n\n handleReplyClick = (status) => {\n let { askReplyConfirmation, dispatch, intl } = this.props;\n if (askReplyConfirmation) {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(messages.replyMessage),\n confirm: intl.formatMessage(messages.replyConfirm),\n onConfirm: () => dispatch(replyCompose(status, this.context.router.history)),\n }));\n } else {\n dispatch(replyCompose(status, this.context.router.history));\n }\n }\n\n handleModalReblog = (status) => {\n this.props.dispatch(reblog(status));\n }\n\n handleReblogClick = (status, e) => {\n if (status.get('reblogged')) {\n this.props.dispatch(unreblog(status));\n } else {\n if ((e && e.shiftKey) || !boostModal) {\n this.handleModalReblog(status);\n } else {\n this.props.dispatch(openModal('BOOST', { status, onReblog: this.handleModalReblog }));\n }\n }\n }\n\n handleDeleteClick = (status, history, withRedraft = false) => {\n const { dispatch, intl } = this.props;\n\n if (!deleteModal) {\n dispatch(deleteStatus(status.get('id'), history, withRedraft));\n } else {\n dispatch(openModal('CONFIRM', {\n message: intl.formatMessage(withRedraft ? messages.redraftMessage : messages.deleteMessage),\n confirm: intl.formatMessage(withRedraft ? messages.redraftConfirm : messages.deleteConfirm),\n onConfirm: () => dispatch(deleteStatus(status.get('id'), history, withRedraft)),\n }));\n }\n }\n\n handleDirectClick = (account, router) => {\n this.props.dispatch(directCompose(account, router));\n }\n\n handleMentionClick = (account, router) => {\n this.props.dispatch(mentionCompose(account, router));\n }\n\n handleOpenMedia = (media, index) => {\n this.props.dispatch(openModal('MEDIA', { media, index }));\n }\n\n handleOpenVideo = (media, time) => {\n this.props.dispatch(openModal('VIDEO', { media, time }));\n }\n\n handleMuteClick = (account) => {\n this.props.dispatch(initMuteModal(account));\n }\n\n handleConversationMuteClick = (status) => {\n if (status.get('muted')) {\n this.props.dispatch(unmuteStatus(status.get('id')));\n } else {\n this.props.dispatch(muteStatus(status.get('id')));\n }\n }\n\n handleToggleHidden = (status) => {\n if (status.get('hidden')) {\n this.props.dispatch(revealStatus(status.get('id')));\n } else {\n this.props.dispatch(hideStatus(status.get('id')));\n }\n }\n\n handleToggleAll = () => {\n const { status, ancestorsIds, descendantsIds } = this.props;\n const statusIds = [status.get('id')].concat(ancestorsIds.toJS(), descendantsIds.toJS());\n\n if (status.get('hidden')) {\n this.props.dispatch(revealStatus(statusIds));\n } else {\n this.props.dispatch(hideStatus(statusIds));\n }\n }\n\n handleBlockClick = (status) => {\n const { dispatch } = this.props;\n const account = status.get('account');\n dispatch(initBlockModal(account));\n }\n\n handleReport = (status) => {\n this.props.dispatch(initReport(status.get('account'), status));\n }\n\n handleEmbed = (status) => {\n this.props.dispatch(openModal('EMBED', { url: status.get('url') }));\n }\n\n handleHotkeyMoveUp = () => {\n this.handleMoveUp(this.props.status.get('id'));\n }\n\n handleHotkeyMoveDown = () => {\n this.handleMoveDown(this.props.status.get('id'));\n }\n\n handleHotkeyReply = e => {\n e.preventDefault();\n this.handleReplyClick(this.props.status);\n }\n\n handleHotkeyFavourite = () => {\n this.handleFavouriteClick(this.props.status);\n }\n\n handleHotkeyBoost = () => {\n this.handleReblogClick(this.props.status);\n }\n\n handleHotkeyMention = e => {\n e.preventDefault();\n this.handleMentionClick(this.props.status.get('account'));\n }\n\n handleHotkeyOpenProfile = () => {\n this.context.router.history.push(`/accounts/${this.props.status.getIn(['account', 'id'])}`);\n }\n\n handleHotkeyToggleHidden = () => {\n this.handleToggleHidden(this.props.status);\n }\n\n handleHotkeyToggleSensitive = () => {\n this.handleToggleMediaVisibility();\n }\n\n handleMoveUp = id => {\n const { status, ancestorsIds, descendantsIds } = this.props;\n\n if (id === status.get('id')) {\n this._selectChild(ancestorsIds.size - 1, true);\n } else {\n let index = ancestorsIds.indexOf(id);\n\n if (index === -1) {\n index = descendantsIds.indexOf(id);\n this._selectChild(ancestorsIds.size + index, true);\n } else {\n this._selectChild(index - 1, true);\n }\n }\n }\n\n handleMoveDown = id => {\n const { status, ancestorsIds, descendantsIds } = this.props;\n\n if (id === status.get('id')) {\n this._selectChild(ancestorsIds.size + 1, false);\n } else {\n let index = ancestorsIds.indexOf(id);\n\n if (index === -1) {\n index = descendantsIds.indexOf(id);\n this._selectChild(ancestorsIds.size + index + 2, false);\n } else {\n this._selectChild(index + 1, false);\n }\n }\n }\n\n _selectChild (index, align_top) {\n const container = this.node;\n const element = container.querySelectorAll('.focusable')[index];\n\n if (element) {\n if (align_top && container.scrollTop > element.offsetTop) {\n element.scrollIntoView(true);\n } else if (!align_top && container.scrollTop + container.clientHeight < element.offsetTop + element.offsetHeight) {\n element.scrollIntoView(false);\n }\n element.focus();\n }\n }\n\n renderChildren (list) {\n return list.map(id => (\n <StatusContainer\n key={id}\n id={id}\n onMoveUp={this.handleMoveUp}\n onMoveDown={this.handleMoveDown}\n contextType='thread'\n />\n ));\n }\n\n setRef = c => {\n this.node = c;\n }\n\n componentDidUpdate () {\n if (this._scrolledIntoView) {\n return;\n }\n\n const { status, ancestorsIds } = this.props;\n\n if (status && ancestorsIds && ancestorsIds.size > 0) {\n const element = this.node.querySelectorAll('.focusable')[ancestorsIds.size - 1];\n\n window.requestAnimationFrame(() => {\n element.scrollIntoView(true);\n });\n this._scrolledIntoView = true;\n }\n }\n\n componentWillUnmount () {\n detachFullscreenListener(this.onFullScreenChange);\n }\n\n onFullScreenChange = () => {\n this.setState({ fullscreen: isFullscreen() });\n }\n\n render () {\n let ancestors, descendants;\n const { shouldUpdateScroll, status, ancestorsIds, descendantsIds, intl, domain, multiColumn } = this.props;\n const { fullscreen } = this.state;\n\n if (status === null) {\n return (\n <Column>\n <ColumnBackButton multiColumn={multiColumn} />\n <MissingIndicator />\n </Column>\n );\n }\n\n if (ancestorsIds && ancestorsIds.size > 0) {\n ancestors = <div>{this.renderChildren(ancestorsIds)}</div>;\n }\n\n if (descendantsIds && descendantsIds.size > 0) {\n descendants = <div>{this.renderChildren(descendantsIds)}</div>;\n }\n\n const handlers = {\n moveUp: this.handleHotkeyMoveUp,\n moveDown: this.handleHotkeyMoveDown,\n reply: this.handleHotkeyReply,\n favourite: this.handleHotkeyFavourite,\n boost: this.handleHotkeyBoost,\n mention: this.handleHotkeyMention,\n openProfile: this.handleHotkeyOpenProfile,\n toggleHidden: this.handleHotkeyToggleHidden,\n toggleSensitive: this.handleHotkeyToggleSensitive,\n };\n\n return (\n <Column bindToDocument={!multiColumn} label={intl.formatMessage(messages.detailedStatus)}>\n <ColumnHeader\n showBackButton\n multiColumn={multiColumn}\n extraButton={(\n <button className='column-header__button' title={intl.formatMessage(status.get('hidden') ? messages.revealAll : messages.hideAll)} aria-label={intl.formatMessage(status.get('hidden') ? messages.revealAll : messages.hideAll)} onClick={this.handleToggleAll} aria-pressed={status.get('hidden') ? 'false' : 'true'}><Icon id={status.get('hidden') ? 'eye-slash' : 'eye'} /></button>\n )}\n />\n\n <ScrollContainer scrollKey='thread' shouldUpdateScroll={shouldUpdateScroll}>\n <div className={classNames('scrollable', { fullscreen })} ref={this.setRef}>\n {ancestors}\n\n <HotKeys handlers={handlers}>\n <div className={classNames('focusable', 'detailed-status__wrapper')} tabIndex='0' aria-label={textForScreenReader(intl, status, false)}>\n <DetailedStatus\n status={status}\n onOpenVideo={this.handleOpenVideo}\n onOpenMedia={this.handleOpenMedia}\n onToggleHidden={this.handleToggleHidden}\n domain={domain}\n showMedia={this.state.showMedia}\n onToggleMediaVisibility={this.handleToggleMediaVisibility}\n />\n\n <ActionBar\n status={status}\n onReply={this.handleReplyClick}\n onFavourite={this.handleFavouriteClick}\n onReblog={this.handleReblogClick}\n onDelete={this.handleDeleteClick}\n onDirect={this.handleDirectClick}\n onMention={this.handleMentionClick}\n onMute={this.handleMuteClick}\n onMuteConversation={this.handleConversationMuteClick}\n onBlock={this.handleBlockClick}\n onReport={this.handleReport}\n onPin={this.handlePin}\n onEmbed={this.handleEmbed}\n />\n </div>\n </HotKeys>\n\n {descendants}\n </div>\n </ScrollContainer>\n </Column>\n );\n }\n\n}\n"],"sourceRoot":""}
\ No newline at end of file