{"version":3,"sources":["webpack:///./app/javascript/mastodon/features/account_gallery/components/media_item.js","webpack:///./app/javascript/mastodon/features/account_gallery/index.js"],"names":["media_item_MediaItem","state","visible","_this","props","media","getIn","initial_state","handleClick","setState","render","this","status","get","x","y","style","label","icon","jsx_default","className","backgroundImage","backgroundPosition","permalink","to","href","onInterceptClick","react_immutable_pure_component_es","propTypes","ImmutablePropTypes_default","a","map","isRequired","account_gallery_LoadMoreMedia","handleLoadMore","onLoadMore","maxId","load_more","disabled","shouldUpdateScroll","prop_types_default","func","string","account_gallery_AccountGallery","Object","es","medias","selectors","params","accountId","isLoading","hasMore","handleScrollToBottom","_this2","last","handleScroll","e","_e$target","target","scrollTop","scrollHeight","clientHeight","dispatch","timelines","handleLoadOlder","preventDefault","componentDidMount","accounts","componentWillReceiveProps","nextProps","_props","loadOlder","column","loading_indicator","size","onClick","column_back_button","react_router_scroll_4_es","scrollKey","onScroll","header_container","index","object","list","bool"],"mappings":"+SAMqBA,kLAMnBC,OACEC,SAAUC,EAAKC,MAAMC,MAAMC,OAAO,SAAU,eAAiBC,EAAA,KAG/DC,YAAc,WACZ,OAAKL,EAAKF,MAAMC,UACdC,EAAKM,UAAWP,SAAS,KAClB,6CAMXQ,kBAAU,IACAL,EAAUM,KAAKP,MAAfC,MACAH,EAAYS,KAAKV,MAAjBC,QACFU,EAASP,EAAMQ,IAAI,UAGnBC,EAA2B,KAFlBT,EAAMC,OAAO,OAAQ,QAAS,MAEvB,EAAK,IACrBS,EAA2B,KAFlBV,EAAMC,OAAO,OAAQ,QAAS,OAEvB,EAAK,IACrBU,KAEFC,SAAOC,SAiBX,MAf0B,SAAtBb,EAAMQ,IAAI,UACZI,EAAAE,IAAAF,QAAAG,UAAwB,mCAAxB,UAGElB,GACFc,EAAMK,gBAAN,OAAkChB,EAAMQ,IAAI,eAA5C,IACAG,EAAMM,mBAAwBR,EAA9B,KAAoCC,EAApC,KAEAG,EAAAC,IAAAD,QAAAE,UACkB,qCADlB,EAAAD,I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9C,QAAUnC,EAAOxC,MAAM2E,EAAQ,EAAG,OAFb9D,IAM3BnB,GAN2BK,MAQnBA,GADFA,EAAMQ,IAAI,SAIlB0D,WAnF6B5C,EAAA,KAEnCC,WACLoB,OAAQR,EAAAV,EAAUoD,OAAOlD,WACzB8B,SAAUtB,EAAAV,EAAUW,KAAKT,WACzBc,OAAQjB,EAAAC,EAAmBqD,KAAKnD,WAChCkB,UAAWV,EAAAV,EAAUsD,KACrBjC,QAASX,EAAAV,EAAUsD","file":"features/account_gallery.js","sourcesContent":["import React from 'react';\nimport ImmutablePropTypes from 'react-immutable-proptypes';\nimport ImmutablePureComponent from 'react-immutable-pure-component';\nimport Permalink from '../../../components/permalink';\nimport { displaySensitiveMedia } from '../../../initial_state';\n\nexport default class MediaItem extends ImmutablePureComponent {\n\n static propTypes = {\n media: ImmutablePropTypes.map.isRequired,\n };\n\n state = {\n visible: !this.props.media.getIn(['status', 'sensitive']) || displaySensitiveMedia,\n };\n\n handleClick = () => {\n if (!this.state.visible) {\n this.setState({ visible: true });\n return true;\n }\n\n return false;\n }\n\n render () {\n const { media } = this.props;\n const { visible } = this.state;\n const status = media.get('status');\n const focusX = media.getIn(['meta', 'focus', 'x']);\n const focusY = media.getIn(['meta', 'focus', 'y']);\n const x = ((focusX / 2) + .5) * 100;\n const y = ((focusY / -2) + .5) * 100;\n const style = {};\n\n let label, icon;\n\n if (media.get('type') === 'gifv') {\n label = GIF;\n }\n\n if (visible) {\n style.backgroundImage = `url(${media.get('preview_url')})`;\n style.backgroundPosition = `${x}% ${y}%`;\n } else {\n icon = (\n \n \n \n );\n }\n\n return (\n