(window.webpackJsonp=window.webpackJsonp||[]).push([[63],{1100:function(t,e,s){"use strict";s.r(e),s.d(e,"default",(function(){return A}));var a,c,n=s(0),o=s(1),i=s.n(o),d=s(12),u=s(16),r=s.n(u),p=s(3),l=s.n(p),h=s(19),m=s(41),b=s(1330),I=s(371),O=s(1292),j=s(1343),g=s(1346),w=s(1435),f=s(2),R=s(18),L=s(4),M=s(1310),_=s(1371),y=s(1372),C=s(143);const k=Object(f.List)(),v=t=>{let{url:e}=t;return Object(n.a)(_.a,{url:e,resource:Object(n.a)(L.b,{id:"timeline_hint.resources.statuses",defaultMessage:"Older posts"})})};let A=Object(d.connect)(((t,e)=>{let{params:{acct:s,id:a},withReplies:c=!1}=e;const n=a||t.getIn(["accounts_map",s]);if(!n)return{isLoading:!0};const o=c?n+":with_replies":n;return{accountId:n,remote:!(t.getIn(["accounts",n,"acct"])===t.getIn(["accounts",n,"username"])),remoteUrl:t.getIn(["accounts",n,"url"]),isAccount:!!t.getIn(["accounts",n]),statusIds:t.getIn(["timelines","account:"+o,"items"],Object(f.List)()),featuredStatusIds:c?Object(f.List)():t.getIn(["timelines","account:"+n+":pinned","items"],Object(f.List)()),isLoading:t.getIn(["timelines","account:"+o,"isLoading"]),hasMore:t.getIn(["timelines","account:"+o,"hasMore"]),suspended:t.getIn(["accounts",n,"suspended"],!1),hidden:Object(C.b)(t,n)}}))(((c=class extends R.a{constructor(){super(...arguments),this.handleHeaderClick=()=>{this.column.scrollTop()},this.handleLoadMore=t=>{this.props.dispatch(Object(m.r)(this.props.accountId,{maxId:t,withReplies:this.props.withReplies}))},this.setRef=t=>{this.column=t}}_load(){const{accountId:t,withReplies:e,dispatch:s}=this.props;s(Object(h.W)(t)),e||s(Object(m.p)(t)),s(Object(m.r)(t,{withReplies:e}))}componentDidMount(){const{params:{acct:t},accountId:e,dispatch:s}=this.props;e?this._load():s(Object(h.eb)(t))}componentDidUpdate(t){const{params:{acct:e},accountId:s,dispatch:a}=this.props;t.accountId!==s&&s?this._load():t.params.acct!==e&&a(Object(h.eb)(e))}componentWillReceiveProps(t){const{dispatch:e}=this.props;(t.params.accountId!==this.props.params.accountId&&t.params.accountId||t.withReplies!==this.props.withReplies)&&(e(Object(h.W)(t.params.accountId)),t.withReplies||e(Object(m.p)(t.params.accountId)),e(Object(m.r)(t.params.accountId,{withReplies:t.params.withReplies})))}render(){const{accountId:t,statusIds:e,featuredStatusIds:s,isLoading:a,hasMore:c,suspended:o,isAccount:d,hidden:u,multiColumn:r,remote:p,remoteUrl:l}=this.props;if(!d)return Object(n.a)(O.a,{},void 0,Object(n.a)(w.a,{multiColumn:r}),Object(n.a)(M.a,{}));if(!e&&a)return Object(n.a)(O.a,{},void 0,Object(n.a)(I.b,{}));let h;const m=o||u;h=o?Object(n.a)(L.b,{id:"empty_column.account_suspended",defaultMessage:"Account suspended"}):u?Object(n.a)(y.a,{accountId:t}):p&&e.isEmpty()?Object(n.a)(v,{url:l}):Object(n.a)(L.b,{id:"empty_column.account_timeline",defaultMessage:"No posts found"});const f=p?Object(n.a)(v,{url:l}):null;return i.a.createElement(O.a,{ref:this.setRef,name:"account"},Object(n.a)(j.a,{onClick:this.handleHeaderClick,multiColumn:r}),Object(n.a)(b.a,{prepend:Object(n.a)(g.a,{accountId:this.props.accountId,hideTabs:m}),alwaysPrepend:!0,append:f,scrollKey:"account_timeline",statusIds:m?k:e,featuredStatusIds:s,isLoading:a,hasMore:!m&&c,onLoadMore:this.handleLoadMore,emptyMessage:h,bindToDocument:!r,timelineId:"account"}))}}).propTypes={params:l.a.shape({acct:l.a.string,id:l.a.string}).isRequired,accountId:l.a.string,dispatch:l.a.func.isRequired,statusIds:r.a.list,featuredStatusIds:r.a.list,isLoading:l.a.bool,hasMore:l.a.bool,withReplies:l.a.bool,isAccount:l.a.bool,suspended:l.a.bool,hidden:l.a.bool,remote:l.a.bool,remoteUrl:l.a.string,multiColumn:l.a.bool},a=c))||a}}]);
//# sourceMappingURL=account_timeline-9e729985a5889f9ce8f4.chunk.js.map