-webpackJsonp([10],{1005:function(e,t,n){"use strict";var o=n(9),i=n(898),r=n(56),s=function(e){return{settings:e.getIn(["settings","direct"])}},a=function(e){return{onChange:function(t,n){e(Object(r.c)(["direct"].concat(t),n))}}};t.a=Object(o.connect)(s,a)(i.a)},284:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o,i,r=n(2),s=n.n(r),a=n(1),c=n.n(a),l=n(3),u=n.n(l),d=n(4),h=n.n(d),p=n(0),f=n.n(p),g=n(7),b=(i=o=function(e){function t(){return c()(this,t),u()(this,e.apply(this,arguments))}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.visible;return s()("button",{className:"load-more",disabled:t||!n,style:{visibility:n?"visible":"hidden"},onClick:this.props.onClick},void 0,s()(g.b,{id:"status.load_more",defaultMessage:"Load more"}))},t}(f.a.PureComponent),o.defaultProps={visible:!0},i)},286:function(e,t,n){"use strict";var o=n(2),i=n.n(o),r=n(0),s=(n.n(r),n(9)),a=n(156),c=n(68),l=n(17),u=n(69),d=n(22),h=n(91),p=n(89),f=n(155),g=n(26),b=n(7),v=n(13),m=n(33),y=Object(b.f)({deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this status?"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"}}),O=function(){var e=Object(c.e)();return function(t,n){return{status:e(t,n.id)}}},M=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(l.T)(t,n))},onModalReblog:function(t){e(Object(u.o)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(u.r)(t)):n.shiftKey||!v.b?this.onModalReblog(t):e(Object(g.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(u.p)(t):Object(u.k)(t))},onPin:function(t){e(t.get("pinned")?Object(u.q)(t):Object(u.n)(t))},onEmbed:function(t){e(Object(g.d)("EMBED",{url:t.get("url"),onError:function(t){return e(Object(m.e)(t))}}))},onDelete:function(t){e(v.e?Object(g.d)("CONFIRM",{message:n.formatMessage(y.deleteMessage),confirm:n.formatMessage(y.deleteConfirm),onConfirm:function(){return e(Object(h.f)(t.get("id")))}}):Object(h.f)(t.get("id")))},onDirect:function(t,n){e(Object(l.N)(t,n))},onMention:function(t,n){e(Object(l.R)(t,n))},onOpenMedia:function(t,n){e(Object(g.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(g.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(g.d)("CONFIRM",{message:i()(b.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(y.blockConfirm),onConfirm:function(){return e(Object(d.q)(t.get("id")))}}))},onReport:function(t){e(Object(f.k)(t.get("account"),t))},onMute:function(t){e(Object(p.g)(t))},onMuteConversation:function(t){e(t.get("muted")?Object(h.k)(t.get("id")):Object(h.i)(t.get("id")))},onToggleHidden:function(t){e(t.get("hidden")?Object(h.j)(t.get("id")):Object(h.h)(t.get("id")))}}};t.a=Object(b.g)(Object(s.connect)(O,M)(a.a))},287:function(e,t,n){"use strict";n.d(t,"a",function(){return L});var o,i,r=n(2),s=n.n(r),a=n(1),c=n.n(a),l=n(3),u=n.n(l),d=n(4),h=n.n(d),p=n(93),f=n.n(p),g=n(0),b=n.n(g),v=n(154),m=n(5),y=n.n(m),O=n(288),M=n(284),I=n(293),C=n(8),j=(n.n(C),n(10)),S=n.n(j),k=n(157),L=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.state={fullscreen:null},o.intersectionObserverWrapper=new I.a,o.handleScroll=f()(function(){if(o.node){var e=o.node,t=e.scrollTop;400>e.scrollHeight-t-e.clientHeight&&o.props.onLoadMore&&!o.props.isLoading&&o.props.onLoadMore(),t<100&&o.props.onScrollToTop?o.props.onScrollToTop():o.props.onScroll&&o.props.onScroll()}},150,{trailing:!0}),o.onFullScreenChange=function(){o.setState({fullscreen:Object(k.d)()})},o.setRef=function(e){o.node=e},o.handleLoadMore=function(e){e.preventDefault(),o.props.onLoadMore()},i=n,u()(o,i)}return h()(t,e),t.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(k.a)(this.onFullScreenChange),this.handleScroll()},t.prototype.getSnapshotBeforeUpdate=function(e){return b.a.Children.count(e.children)>0&&b.a.Children.count(e.children)<b.a.Children.count(this.props.children)&&this.getFirstChildKey(e)!==this.getFirstChildKey(this.props)&&this.node.scrollTop>0?this.node.scrollHeight-this.node.scrollTop:null},t.prototype.componentDidUpdate=function(e,t,n){if(null!==n){var o=this.node.scrollHeight-n;this.node.scrollTop!==o&&(this.node.scrollTop=o)}},t.prototype.componentWillUnmount=function(){this.detachScrollListener(),this.detachIntersectionObserver(),Object(k.b)(this.onFullScreenChange)},t.prototype.attachIntersectionObserver=function(){this.intersectionObserverWrapper.connect({root:this.node,rootMargin:"300% 0px"})},t.prototype.detachIntersectionObserver=function(){this.intersectionObserverWrapper.disconnect()},t.prototype.attachScrollListener=function(){this.node.addEventListener("scroll",this.handleScroll)},t.prototype.detachScrollListener=function(){this.node.removeEventListener("scroll",this.handleScroll)},t.prototype.getFirstChildKey=function(e){var t=e.children,n=t;return t instanceof C.List?n=t.get(0):Array.isArray(t)&&(n=t[0]),n&&n.key},t.prototype.render=function(){var e=this,t=this.props,n=t.children,o=t.scrollKey,i=t.trackScroll,r=t.shouldUpdateScroll,a=t.isLoading,c=t.hasMore,l=t.prepend,u=t.emptyMessage,d=t.onLoadMore,h=this.state.fullscreen,p=b.a.Children.count(n),f=c&&p>0&&d?s()(M.a,{visible:!a,onClick:this.handleLoadMore}):null,g=null;return g=a||p>0||!u?b.a.createElement("div",{className:S()("scrollable",{fullscreen:h}),ref:this.setRef},s()("div",{role:"feed",className:"item-list"},void 0,l,b.a.Children.map(this.props.children,function(t,n){return s()(O.a,{id:t.key,index:n,listLength:p,intersectionObserverWrapper:e.intersectionObserverWrapper,saveHeightKey:i?e.context.router.route.location.key+":"+o:null},t.key,t)}),f)):b.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},u),i?s()(v.a,{scrollKey:o,shouldUpdateScroll:r},void 0,g):g},t}(g.PureComponent),o.contextTypes={router:y.a.object},o.defaultProps={trackScroll:!0},i)},288:function(e,t,n){"use strict";var o=n(9),i=n(289),r=n(94),s=function(e,t){return{cachedHeight:e.getIn(["height_cache",t.saveHeightKey,t.id])}},a=function(e){return{onHeightChange:function(t,n,o){e(Object(r.d)(t,n,o))}}};t.a=Object(o.connect)(s,a)(i.a)},289:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o=n(1),i=n.n(o),r=n(3),s=n.n(r),a=n(4),c=n.n(a),l=n(0),u=n.n(l),d=n(290),h=n(292),p=n(8),f=(n.n(p),["id","index","listLength"]),g=["id","index","listLength","cachedHeight"],b=function(e){function t(){var n,o,r;i()(this,t);for(var a=arguments.length,c=Array(a),l=0;l<a;l++)c[l]=arguments[l];return n=o=s()(this,e.call.apply(e,[this].concat(c))),o.state={isHidden:!1},o.handleIntersection=function(e){o.entry=e,Object(d.a)(o.calculateHeight),o.setState(o.updateStateAfterIntersection)},o.updateStateAfterIntersection=function(e){return e.isIntersecting&&!o.entry.isIntersecting&&Object(d.a)(o.hideIfNotIntersecting),{isIntersecting:o.entry.isIntersecting,isHidden:!1}},o.calculateHeight=function(){var e=o.props,t=e.onHeightChange,n=e.saveHeightKey,i=e.id;o.height=Object(h.a)(o.entry).height,t&&n&&t(n,i,o.height)},o.hideIfNotIntersecting=function(){o.componentMounted&&o.setState(function(e){return{isHidden:!e.isIntersecting}})},o.handleRef=function(e){o.node=e},r=n,s()(o,r)}return c()(t,e),t.prototype.shouldComponentUpdate=function(e,t){var n=this,o=!this.state.isIntersecting&&(this.state.isHidden||this.props.cachedHeight);return!!o!=!(t.isIntersecting||!t.isHidden&&!e.cachedHeight)||!(o?g:f).every(function(t){return Object(p.is)(e[t],n.props[t])})},t.prototype.componentDidMount=function(){var e=this.props,t=e.intersectionObserverWrapper,n=e.id;t.observe(n,this.node,this.handleIntersection),this.componentMounted=!0},t.prototype.componentWillUnmount=function(){var e=this.props,t=e.intersectionObserverWrapper,n=e.id;t.unobserve(n,this.node),this.componentMounted=!1},t.prototype.render=function(){var e=this.props,t=e.children,n=e.id,o=e.index,i=e.listLength,r=e.cachedHeight,s=this.state,a=s.isIntersecting,c=s.isHidden;return a||!c&&!r?u.a.createElement("article",{ref:this.handleRef,"aria-posinset":o,"aria-setsize":i,"data-id":n,tabIndex:"0"},t&&u.a.cloneElement(t,{hidden:!1})):u.a.createElement("article",{ref:this.handleRef,"aria-posinset":o,"aria-setsize":i,style:{height:(this.height||r)+"px",opacity:0,overflow:"hidden"},"data-id":n,tabIndex:"0"},t&&u.a.cloneElement(t,{hidden:!0}))},t}(u.a.Component)},290:function(e,t,n){"use strict";function o(e){for(;a.length&&e.timeRemaining()>0;)a.shift()();a.length?requestIdleCallback(o):c=!1}function i(e){a.push(e),c||(c=!0,requestIdleCallback(o))}var r=n(291),s=n.n(r),a=new s.a,c=!1;t.a=i},291:function(e,t,n){"use strict";function o(){this.length=0}o.prototype.push=function(e){var t={item:e};this.last?this.last=this.last.next=t:this.last=this.first=t,this.length++},o.prototype.shift=function(){var e=this.first;if(e)return this.first=e.next,--this.length||(this.last=void 0),e.item},o.prototype.slice=function(e,t){e=void 0===e?0:e,t=void 0===t?1/0:t;for(var n=[],o=0,i=this.first;i&&!(--t<0);i=i.next)++o>e&&n.push(i.item);return n},e.exports=o},292:function(e,t,n){"use strict";function o(e){if("boolean"!=typeof i){var t=e.target.getBoundingClientRect(),n=e.boundingClientRect;i=t.height!==n.height||t.top!==n.top||t.width!==n.width||t.bottom!==n.bottom||t.left!==n.left||t.right!==n.right}return i?e.target.getBoundingClientRect():e.boundingClientRect}var i=void 0;t.a=o},293:function(e,t,n){"use strict";var o=n(1),i=n.n(o),r=function(){function e(){i()(this,e),this.callbacks={},this.observerBacklog=[],this.observer=null}return e.prototype.connect=function(e){var t=this,n=function(e){e.forEach(function(e){var n=e.target.getAttribute("data-id");t.callbacks[n]&&t.callbacks[n](e)})};this.observer=new IntersectionObserver(n,e),this.observerBacklog.forEach(function(e){var n=e[0],o=e[1],i=e[2];t.observe(n,o,i)}),this.observerBacklog=null},e.prototype.observe=function(e,t,n){this.observer?(this.callbacks[e]=n,this.observer.observe(t)):this.observerBacklog.push([e,t,n])},e.prototype.unobserve=function(e,t){this.observer&&(delete this.callbacks[e],this.observer.unobserve(t))},e.prototype.disconnect=function(){this.observer&&(this.callbacks={},this.observer.disconnect(),this.observer=null)},e}();t.a=r},294:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var o,i=n(2),r=n.n(i),s=n(1),a=n.n(s),c=n(3),l=n.n(c),u=n(4),d=n.n(u),h=n(0),p=n.n(h),f=n(7),g=Object(f.f)({load_more:{id:"status.load_more",defaultMessage:"Load more"}}),b=Object(f.g)(o=function(e){function t(){var n,o,i;a()(this,t);for(var r=arguments.length,s=Array(r),c=0;c<r;c++)s[c]=arguments[c];return n=o=l()(this,e.call.apply(e,[this].concat(s))),o.handleClick=function(){o.props.onClick(o.props.maxId)},i=n,l()(o,i)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.disabled,n=e.intl;return r()("button",{className:"load-more load-gap",disabled:t,onClick:this.handleClick,"aria-label":n.formatMessage(g.load_more)},void 0,r()("i",{className:"fa fa-ellipsis-h"}))},t}(p.a.PureComponent))||o},295:function(e,t,n){"use strict";n.d(t,"a",function(){return H});var o,i,r=n(34),s=n.n(r),a=n(2),c=n.n(a),l=n(55),u=n.n(l),d=n(1),h=n.n(d),p=n(3),f=n.n(p),g=n(4),b=n.n(g),v=n(32),m=n.n(v),y=n(0),O=n.n(y),M=n(14),I=n.n(M),C=n(5),j=n.n(C),S=n(286),k=n(12),L=n.n(k),_=n(294),x=n(287),R=n(7),H=(i=o=function(e){function t(){var n,o,i;h()(this,t);for(var r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];return n=o=f()(this,e.call.apply(e,[this].concat(s))),o.getFeaturedStatusCount=function(){return o.props.featuredStatusIds?o.props.featuredStatusIds.size:0},o.getCurrentStatusIndex=function(e,t){return t?o.props.featuredStatusIds.indexOf(e):o.props.statusIds.indexOf(e)+o.getFeaturedStatusCount()},o.handleMoveUp=function(e,t){var n=o.getCurrentStatusIndex(e,t)-1;o._selectChild(n)},o.handleMoveDown=function(e,t){var n=o.getCurrentStatusIndex(e,t)+1;o._selectChild(n)},o.handleLoadOlder=m()(function(){o.props.onLoadMore(o.props.statusIds.last())},300,{leading:!0}),o.setRef=function(e){o.node=e},i=n,f()(o,i)}return b()(t,e),t.prototype._selectChild=function(e){var t=this.node.node.querySelector("article:nth-of-type("+(e+1)+") .focusable");t&&t.focus()},t.prototype.render=function(){var e=this,t=this.props,n=t.statusIds,o=t.featuredStatusIds,i=t.onLoadMore,r=u()(t,["statusIds","featuredStatusIds","onLoadMore"]),a=r.isLoading;if(r.isPartial)return c()("div",{className:"regeneration-indicator"},void 0,c()("div",{},void 0,c()("div",{className:"regeneration-indicator__figure"}),c()("div",{className:"regeneration-indicator__label"},void 0,c()(R.b,{id:"regeneration_indicator.label",tagName:"strong",defaultMessage:"Loading…"}),c()(R.b,{id:"regeneration_indicator.sublabel",defaultMessage:"Your home feed is being prepared!"}))));var l=a||n.size>0?n.map(function(t,o){return null===t?c()(_.a,{disabled:a,maxId:o>0?n.get(o-1):null,onClick:i},"gap:"+n.get(o+1)):c()(S.a,{id:t,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},t)}):null;return l&&o&&(l=o.map(function(t){return c()(S.a,{id:t,featured:!0,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},"f-"+t)}).concat(l)),O.a.createElement(x.a,s()({},r,{onLoadMore:i&&this.handleLoadOlder,ref:this.setRef}),l)},t}(L.a),o.propTypes={scrollKey:j.a.string.isRequired,statusIds:I.a.list.isRequired,featuredStatusIds:I.a.list,onLoadMore:j.a.func,onScrollToTop:j.a.func,onScroll:j.a.func,trackScroll:j.a.bool,shouldUpdateScroll:j.a.func,isLoading:j.a.bool,isPartial:j.a.bool,hasMore:j.a.bool,prepend:j.a.node,emptyMessage:j.a.node},o.defaultProps={trackScroll:!0},i)},830:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return k});var o,i,r=n(2),s=n.n(r),a=n(1),c=n.n(a),l=n(3),u=n.n(l),d=n(4),h=n.n(d),p=n(0),f=n.n(p),g=n(9),b=n(92),v=n(71),m=n(70),y=n(19),O=n(299),M=n(7),I=n(1005),C=n(72),j=Object(M.f)({title:{id:"column.direct",defaultMessage:"Direct messages"}}),S=function(e){return{hasUnread:e.getIn(["timelines","direct","unread"])>0}},k=(o=Object(g.connect)(S))(i=Object(M.g)(i=function(e){function t(){var n,o,i;c()(this,t);for(var r=arguments.length,s=Array(r),a=0;a<r;a++)s[a]=arguments[a];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handlePin=function(){var e=o.props,t=e.columnId,n=e.dispatch;n(t?Object(O.h)(t):Object(O.e)("DIRECT",{}))},o.handleMove=function(e){var t=o.props,n=t.columnId;(0,t.dispatch)(Object(O.g)(n,e))},o.handleHeaderClick=function(){o.column.scrollTop()},o.setRef=function(e){o.column=e},o.handleLoadMore=function(e){o.props.dispatch(Object(y.n)({maxId:e}))},i=n,u()(o,i)}return h()(t,e),t.prototype.componentDidMount=function(){var e=this.props.dispatch;e(Object(y.n)()),this.disconnect=e(Object(C.b)())},t.prototype.componentWillUnmount=function(){this.disconnect&&(this.disconnect(),this.disconnect=null)},t.prototype.render=function(){var e=this.props,t=e.intl,n=e.hasUnread,o=e.columnId,i=e.multiColumn,r=!!o;return f.a.createElement(v.a,{ref:this.setRef},s()(m.a,{icon:"envelope",active:n,title:t.formatMessage(j.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:r,multiColumn:i},void 0,s()(I.a,{})),s()(b.a,{trackScroll:!r,scrollKey:"direct_timeline-"+o,timelineId:"direct",onLoadMore:this.handleLoadMore,emptyMessage:s()(M.b,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."})}))},t}(f.a.PureComponent))||i)||i},886:function(e,t,n){"use strict";n.d(t,"a",function(){return p});var o=n(2),i=n.n(o),r=n(1),s=n.n(r),a=n(3),c=n.n(a),l=n(4),u=n.n(l),d=n(0),h=n.n(d),p=function(e){function t(){var n,o,i;s()(this,t);for(var r=arguments.length,a=Array(r),l=0;l<r;l++)a[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(a))),o.handleChange=function(e){o.props.onChange(o.props.settingKey,e.target.value)},i=n,c()(o,i)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.settings,n=e.settingKey,o=e.label;return i()("label",{},void 0,i()("span",{style:{display:"none"}},void 0,o),i()("input",{className:"setting-text",value:t.getIn(n),onChange:this.handleChange,placeholder:o}))},t}(h.a.PureComponent)},898:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o,i=n(2),r=n.n(i),s=n(1),a=n.n(s),c=n(3),l=n.n(c),u=n(4),d=n.n(u),h=n(0),p=n.n(h),f=n(7),g=n(886),b=Object(f.f)({filter_regex:{id:"home.column_settings.filter_regex",defaultMessage:"Filter out by regular expressions"},settings:{id:"home.settings",defaultMessage:"Column settings"}}),v=Object(f.g)(o=function(e){function t(){return a()(this,t),l()(this,e.apply(this,arguments))}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.settings,n=e.onChange,o=e.intl;return r()("div",{},void 0,r()("span",{className:"column-settings__section"},void 0,r()(f.b,{id:"home.column_settings.advanced",defaultMessage:"Advanced"})),r()("div",{className:"column-settings__row"},void 0,r()(g.a,{settings:t,settingKey:["regex","body"],onChange:n,label:o.formatMessage(b.filter_regex)})))},t}(p.a.PureComponent))||o},92:function(e,t,n){"use strict";var o=n(32),i=n.n(o),r=n(9),s=n(295),a=n(19),c=n(8),l=(n.n(c),n(95)),u=(n.n(l),n(13)),d=function(){return Object(l.createSelector)([function(e,t){var n=t.type;return e.getIn(["settings",n],Object(c.Map)())},function(e,t){var n=t.type;return e.getIn(["timelines",n,"items"],Object(c.List)())},function(e){return e.get("statuses")}],function(e,t,n){var o=e.getIn(["regex","body"],"").trim(),i=null;try{i=o&&new RegExp(o,"i")}catch(e){}return t.filter(function(t){if(null===t)return!0;var o=n.get(t),r=!0;if(!1===e.getIn(["shows","reblog"])&&(r=r&&null===o.get("reblog")),!1===e.getIn(["shows","reply"])&&(r=r&&(null===o.get("in_reply_to_id")||o.get("in_reply_to_account_id")===u.g)),r&&i&&o.get("account")!==u.g){var s=o.get("reblog")?n.getIn([o.get("reblog"),"search_index"]):o.get("search_index");r=!i.test(s)}return r})})},h=function(){var e=d();return function(t,n){var o=n.timelineId;return{statusIds:e(t,{type:o}),isLoading:t.getIn(["timelines",o,"isLoading"],!0),isPartial:t.getIn(["timelines",o,"isPartial"],!1),hasMore:t.getIn(["timelines",o,"hasMore"])}}},p=function(e,t){var n=t.timelineId;return{onScrollToTop:i()(function(){e(Object(a.s)(n,!0))},100),onScroll:i()(function(){e(Object(a.s)(n,!1))},100)}};t.a=Object(r.connect)(h,p)(s.a)}});
+(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{811:function(e,t,n){"use strict";n.r(t);var a,o,s,c=n(0),i=n(2),r=n(7),d=n(1),l=n(3),u=n.n(l),p=n(13),h=n(736),f=n(733),b=n(102),m=n(250),v=n(6),j=n(740),O=n(8),g=n(30),M=n(62),y=n.n(M),_=n(5),w=n.n(_),C=n(14),R=n.n(C),k=n(18),I=n(229),L=n(282),x=n(710),D=n(754),S=n(294),E=n(50),N=n(104),U=n(295),T=n(20),H=n(12),A=n.n(H),q=Object(v.f)({more:{id:"status.more",defaultMessage:"More"},open:{id:"conversation.open",defaultMessage:"View conversation"},reply:{id:"status.reply",defaultMessage:"Reply"},markAsRead:{id:"conversation.mark_as_read",defaultMessage:"Mark as read"},delete:{id:"conversation.delete",defaultMessage:"Delete conversation"},muteConversation:{id:"status.mute_conversation",defaultMessage:"Mute conversation"},unmuteConversation:{id:"status.unmute_conversation",defaultMessage:"Unmute conversation"}}),P=Object(v.g)((s=o=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,Object(d.a)(Object(i.a)(t),"handleEmojiMouseEnter",(function(e){var t=e.target;t.src=t.getAttribute("data-original")})),Object(d.a)(Object(i.a)(t),"handleEmojiMouseLeave",(function(e){var t=e.target;t.src=t.getAttribute("data-static")})),Object(d.a)(Object(i.a)(t),"handleClick",(function(){if(t.context.router){var e=t.props,n=e.lastStatus,a=e.unread,o=e.markRead;a&&o(),t.context.router.history.push("/statuses/"+n.get("id"))}})),Object(d.a)(Object(i.a)(t),"handleMarkAsRead",(function(){t.props.markRead()})),Object(d.a)(Object(i.a)(t),"handleReply",(function(){t.props.reply(t.props.lastStatus,t.context.router.history)})),Object(d.a)(Object(i.a)(t),"handleDelete",(function(){t.props.delete()})),Object(d.a)(Object(i.a)(t),"handleHotkeyMoveUp",(function(){t.props.onMoveUp(t.props.conversationId)})),Object(d.a)(Object(i.a)(t),"handleHotkeyMoveDown",(function(){t.props.onMoveDown(t.props.conversationId)})),Object(d.a)(Object(i.a)(t),"handleConversationMute",(function(){t.props.onMute(t.props.lastStatus)})),Object(d.a)(Object(i.a)(t),"handleShowMore",(function(){t.props.onToggleHidden(t.props.lastStatus)})),Object(d.a)(Object(i.a)(t),"setNamesRef",(function(e){t.namesNode=e})),t}Object(r.a)(t,e);var n=t.prototype;return n._updateEmojis=function(){var e=this.namesNode;if(e&&!T.a)for(var t=e.querySelectorAll(".custom-emoji"),n=0;n<t.length;n++){var a=t[n];a.classList.contains("status-emoji")||(a.classList.add("status-emoji"),a.addEventListener("mouseenter",this.handleEmojiMouseEnter,!1),a.addEventListener("mouseleave",this.handleEmojiMouseLeave,!1))}},n.componentDidMount=function(){this._updateEmojis()},n.componentDidUpdate=function(){this._updateEmojis()},n.render=function(){var e=this.props,t=e.accounts,n=e.lastStatus,a=e.unread,o=e.intl;if(null===n)return null;var s=[{text:o.formatMessage(q.open),action:this.handleClick},null];s.push({text:o.formatMessage(n.get("muted")?q.unmuteConversation:q.muteConversation),action:this.handleConversationMute}),a&&(s.push({text:o.formatMessage(q.markAsRead),action:this.handleMarkAsRead}),s.push(null)),s.push({text:o.formatMessage(q.delete),action:this.handleDelete});var i=t.map((function(e){return Object(c.a)(S.a,{to:"/accounts/"+e.get("id"),href:e.get("url"),title:e.get("acct")},e.get("id"),Object(c.a)("bdi",{},void 0,Object(c.a)("strong",{className:"display-name__html",dangerouslySetInnerHTML:{__html:e.get("display_name_html")}})))})).reduce((function(e,t){return[e,", ",t]})),r={reply:this.handleReply,open:this.handleClick,moveUp:this.handleHotkeyMoveUp,moveDown:this.handleHotkeyMoveDown,toggleHidden:this.handleShowMore};return Object(c.a)(U.HotKeys,{handlers:r},void 0,Object(c.a)("div",{className:A()("conversation focusable muted",{"conversation--unread":a}),tabIndex:"0"},void 0,Object(c.a)("div",{className:"conversation__avatar"},void 0,Object(c.a)(D.a,{accounts:t,size:48})),Object(c.a)("div",{className:"conversation__content"},void 0,Object(c.a)("div",{className:"conversation__content__info"},void 0,Object(c.a)("div",{className:"conversation__content__relative-time"},void 0,a&&Object(c.a)("span",{className:"conversation__unread"})," ",Object(c.a)(N.default,{timestamp:n.get("created_at")})),u.a.createElement("div",{className:"conversation__content__names",ref:this.setNamesRef},Object(c.a)(v.b,{id:"conversation.with",defaultMessage:"With {names}",values:{names:Object(c.a)("span",{},void 0,i)}}))),Object(c.a)(I.a,{status:n,onClick:this.handleClick,expanded:!n.get("hidden"),onExpandedToggle:this.handleShowMore,collapsable:!0}),n.get("media_attachments").size>0&&Object(c.a)(L.a,{compact:!0,media:n.get("media_attachments")}),Object(c.a)("div",{className:"status__action-bar"},void 0,Object(c.a)(E.a,{className:"status__action-bar-button",title:o.formatMessage(q.reply),icon:"reply",onClick:this.handleReply}),Object(c.a)("div",{className:"status__action-bar-dropdown"},void 0,Object(c.a)(x.a,{status:n,items:s,icon:"ellipsis-h",size:18,direction:"right",title:o.formatMessage(q.more)}))))))},t}(k.a),Object(d.a)(o,"contextTypes",{router:w.a.object}),Object(d.a)(o,"propTypes",{conversationId:w.a.string.isRequired,accounts:R.a.list.isRequired,lastStatus:R.a.map,unread:w.a.bool.isRequired,onMoveUp:w.a.func,onMoveDown:w.a.func,markRead:w.a.func.isRequired,delete:w.a.func.isRequired,intl:w.a.object.isRequired}),a=s))||a,z=n(206),K=n(21),V=n(47),W=n(85),J=Object(v.f)({replyConfirm:{id:"confirmations.reply.confirm",defaultMessage:"Reply"},replyMessage:{id:"confirmations.reply.message",defaultMessage:"Replying now will overwrite the message you are currently composing. Are you sure you want to proceed?"}}),F=Object(v.g)(Object(p.connect)((function(){var e=Object(z.f)();return function(t,n){var a=n.conversationId,o=t.getIn(["conversations","items"]).find((function(e){return e.get("id")===a})),s=o.get("last_status",null);return{accounts:o.get("accounts").map((function(e){return t.getIn(["accounts",e],null)})),unread:o.get("unread"),lastStatus:s&&e(t,{id:s})}}}),(function(e,t){var n=t.intl,a=t.conversationId;return{markRead:function(){e(Object(b.k)(a))},reply:function(t,a){e((function(o,s){0!==s().getIn(["compose","text"]).trim().length?e(Object(V.d)("CONFIRM",{message:n.formatMessage(J.replyMessage),confirm:n.formatMessage(J.replyConfirm),onConfirm:function(){return e(Object(K.gb)(t,a))}})):e(Object(K.gb)(t,a))}))},delete:function(){e(Object(b.i)(a))},onMute:function(t){t.get("muted")?e(Object(W.n)(t.get("id"))):e(Object(W.k)(t.get("id")))},onToggleHidden:function(t){t.get("hidden")?e(Object(W.l)(t.get("id"))):e(Object(W.j)(t.get("id")))}}}))(P)),Y=n(1023),B=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,Object(d.a)(Object(i.a)(t),"getCurrentIndex",(function(e){return t.props.conversations.findIndex((function(t){return t.get("id")===e}))})),Object(d.a)(Object(i.a)(t),"handleMoveUp",(function(e){var n=t.getCurrentIndex(e)-1;t._selectChild(n,!0)})),Object(d.a)(Object(i.a)(t),"handleMoveDown",(function(e){var n=t.getCurrentIndex(e)+1;t._selectChild(n,!1)})),Object(d.a)(Object(i.a)(t),"setRef",(function(e){t.node=e})),Object(d.a)(Object(i.a)(t),"handleLoadOlder",y()((function(){var e=t.props.conversations.last();e&&e.get("last_status")&&t.props.onLoadMore(e.get("last_status"))}),300,{leading:!0})),t}Object(r.a)(t,e);var n=t.prototype;return n._selectChild=function(e,t){var n=this.node.node,a=n.querySelector("article:nth-of-type("+(e+1)+") .focusable");a&&(t&&n.scrollTop>a.offsetTop?a.scrollIntoView(!0):!t&&n.scrollTop+n.clientHeight<a.offsetTop+a.offsetHeight&&a.scrollIntoView(!1),a.focus())},n.render=function(){var e=this,t=this.props,n=t.conversations,a=t.onLoadMore,o=Object(g.default)(t,["conversations","onLoadMore"]);return u.a.createElement(Y.a,Object(O.default)({},o,{onLoadMore:a&&this.handleLoadOlder,scrollKey:"direct",ref:this.setRef}),n.map((function(t){return Object(c.a)(F,{conversationId:t.get("id"),onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},t.get("id"))})))},t}(k.a);Object(d.a)(B,"propTypes",{conversations:R.a.list.isRequired,hasMore:w.a.bool,isLoading:w.a.bool,onLoadMore:w.a.func,shouldUpdateScroll:w.a.func});var G,Q=Object(p.connect)((function(e){return{conversations:e.getIn(["conversations","items"]),isLoading:e.getIn(["conversations","isLoading"],!0),hasMore:e.getIn(["conversations","hasMore"],!1)}}),(function(e){return{onLoadMore:function(t){return e(Object(b.j)({maxId:t}))}}}))(B);n.d(t,"default",(function(){return Z}));var X=Object(v.f)({title:{id:"column.direct",defaultMessage:"Direct messages"}}),Z=Object(p.connect)()(G=Object(v.g)(G=function(e){function t(){for(var t,n=arguments.length,a=new Array(n),o=0;o<n;o++)a[o]=arguments[o];return t=e.call.apply(e,[this].concat(a))||this,Object(d.a)(Object(i.a)(t),"handlePin",(function(){var e=t.props,n=e.columnId,a=e.dispatch;a(n?Object(m.h)(n):Object(m.e)("DIRECT",{}))})),Object(d.a)(Object(i.a)(t),"handleMove",(function(e){var n=t.props,a=n.columnId;(0,n.dispatch)(Object(m.g)(a,e))})),Object(d.a)(Object(i.a)(t),"handleHeaderClick",(function(){t.column.scrollTop()})),Object(d.a)(Object(i.a)(t),"setRef",(function(e){t.column=e})),Object(d.a)(Object(i.a)(t),"handleLoadMore",(function(e){t.props.dispatch(Object(b.j)({maxId:e}))})),t}Object(r.a)(t,e);var n=t.prototype;return n.componentDidMount=function(){var e=this.props.dispatch;e(Object(b.l)()),e(Object(b.j)()),this.disconnect=e(Object(j.b)())},n.componentWillUnmount=function(){this.props.dispatch(Object(b.m)()),this.disconnect&&(this.disconnect(),this.disconnect=null)},n.render=function(){var e=this.props,t=e.intl,n=e.hasUnread,a=e.columnId,o=e.multiColumn,s=e.shouldUpdateScroll,i=!!a;return u.a.createElement(h.a,{bindToDocument:!o,ref:this.setRef,label:t.formatMessage(X.title)},Object(c.a)(f.a,{icon:"envelope",active:n,title:t.formatMessage(X.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:i,multiColumn:o}),Object(c.a)(Q,{trackScroll:!i,scrollKey:"direct_timeline-"+a,timelineId:"direct",onLoadMore:this.handleLoadMore,emptyMessage:Object(c.a)(v.b,{id:"empty_column.direct",defaultMessage:"You don't have any direct messages yet. When you send or receive one, it will show up here."}),shouldUpdateScroll:s}))},t}(u.a.PureComponent))||G)||G}}]);
//# sourceMappingURL=direct_timeline.js.map
\ No newline at end of file