-(window.webpackJsonp=window.webpackJsonp||[]).push([[30],{711:function(t,n,e){"use strict";e.r(n);var i,o,a,s,r,l,c=e(0),u=e.n(c),d=e(6),f=e.n(d),h=e(3),p=e.n(h),g=e(7),m=e.n(g),v=e(38),b=e.n(v),M=e(1),_=e.n(M),w=e(12),y=e(62),C=e(60),O=e(46),P=e(113),x=e(32),I=e(2),N=e.n(I),j=e(17),S=e.n(j),k=e(154),D=e(693),T=e(4),U=e(71),L=e(18),R=e(118),H=function(t,n,e){var i=[n];return i.push(t.formatDate(e,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),i.join(", ")},F=Object(T.g)((a=o=function(t){function n(){var e,i,o;f()(this,n);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return e=i=p()(this,t.call.apply(t,[this].concat(s))),i.handleMoveUp=function(){var t=i.props,n=t.notification;(0,t.onMoveUp)(n.get("id"))},i.handleMoveDown=function(){var t=i.props,n=t.notification;(0,t.onMoveDown)(n.get("id"))},i.handleOpen=function(){var t=i.props.notification;t.get("status")?i.context.router.history.push("/statuses/"+t.get("status")):i.handleOpenProfile()},i.handleOpenProfile=function(){var t=i.props.notification;i.context.router.history.push("/accounts/"+t.getIn(["account","id"]))},i.handleMention=function(t){t.preventDefault();var n=i.props,e=n.notification;(0,n.onMention)(e.get("account"),i.context.router.history)},o=e,p()(i,o)}return m()(n,t),n.prototype.getHandlers=function(){return{moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,open:this.handleOpen,openProfile:this.handleOpenProfile,mention:this.handleMention,reply:this.handleMention}},n.prototype.renderFollow=function(t,n,e){var i=this.props.intl;return u()(R.HotKeys,{handlers:this.getHandlers()},void 0,u()("div",{className:"notification notification-follow focusable",tabIndex:"0","aria-label":H(i,i.formatMessage({id:"notification.follow",defaultMessage:"{name} followed you"},{name:n.get("acct")}),t.get("created_at"))},void 0,u()("div",{className:"notification__message"},void 0,u()("div",{className:"notification__favourite-icon-wrapper"},void 0,u()("i",{className:"fa fa-fw fa-user-plus"})),u()(T.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:e}})),u()(D.a,{id:n.get("id"),withNote:!1,hidden:this.props.hidden})))},n.prototype.renderMention=function(t){return u()(k.a,{id:t.get("status"),withDismiss:!0,hidden:this.props.hidden,onMoveDown:this.handleMoveDown,onMoveUp:this.handleMoveUp,contextType:"notifications"})},n.prototype.renderFavourite=function(t,n){var e=this.props.intl;return u()(R.HotKeys,{handlers:this.getHandlers()},void 0,u()("div",{className:"notification notification-favourite focusable",tabIndex:"0","aria-label":H(e,e.formatMessage({id:"notification.favourite",defaultMessage:"{name} favourited your status"},{name:t.getIn(["account","acct"])}),t.get("created_at"))},void 0,u()("div",{className:"notification__message"},void 0,u()("div",{className:"notification__favourite-icon-wrapper"},void 0,u()("i",{className:"fa fa-fw fa-star star-icon"})),u()(T.b,{id:"notification.favourite",defaultMessage:"{name} favourited your status",values:{name:n}})),u()(k.a,{id:t.get("status"),account:t.get("account"),muted:!0,withDismiss:!0,hidden:!!this.props.hidden})))},n.prototype.renderReblog=function(t,n){var e=this.props.intl;return u()(R.HotKeys,{handlers:this.getHandlers()},void 0,u()("div",{className:"notification notification-reblog focusable",tabIndex:"0","aria-label":H(e,e.formatMessage({id:"notification.reblog",defaultMessage:"{name} boosted your status"},{name:t.getIn(["account","acct"])}),t.get("created_at"))},void 0,u()("div",{className:"notification__message"},void 0,u()("div",{className:"notification__favourite-icon-wrapper"},void 0,u()("i",{className:"fa fa-fw fa-retweet"})),u()(T.b,{id:"notification.reblog",defaultMessage:"{name} boosted your status",values:{name:n}})),u()(k.a,{id:t.get("status"),account:t.get("account"),muted:!0,withDismiss:!0,hidden:this.props.hidden})))},n.prototype.render=function(){var t=this.props.notification,n=t.get("account"),e={__html:n.get("display_name_html")},i=u()("bdi",{},void 0,u()(U.a,{className:"notification__display-name",href:n.get("url"),title:n.get("acct"),to:"/accounts/"+n.get("id"),dangerouslySetInnerHTML:e}));switch(t.get("type")){case"follow":return this.renderFollow(t,n,i);case"mention":return this.renderMention(t);case"favourite":return this.renderFavourite(t,i);case"reblog":return this.renderReblog(t,i)}return null},n}(L.a),o.contextTypes={router:N.a.object},o.propTypes={notification:S.a.map.isRequired,hidden:N.a.bool,onMoveUp:N.a.func.isRequired,onMoveDown:N.a.func.isRequired,onMention:N.a.func.isRequired,intl:N.a.object.isRequired},i=a))||i,q=e(11),A=Object(w.connect)(function(){var t=Object(x.e)();return function(n,e){return{notification:t(n,e.notification,e.accountId)}}},function(t){return{onMention:function(n,e){t(Object(q.R)(n,e))}}})(F),K=function(t){function n(){return f()(this,n),p()(this,t.apply(this,arguments))}return m()(n,t),n.prototype.render=function(){return u()("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.props.onClick},void 0,u()("i",{className:"fa fa-eraser"})," ",u()(T.b,{id:"notifications.clear",defaultMessage:"Clear notifications"}))},n}(_.a.PureComponent),G=e(201),J=function(t){function n(){var e,i,o;f()(this,n);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return e=i=p()(this,t.call.apply(t,[this].concat(s))),i.onPushChange=function(t,n){i.props.onChange(["push"].concat(t),n)},o=e,p()(i,o)}return m()(n,t),n.prototype.render=function(){var t=this.props,n=t.settings,e=t.pushSettings,i=t.onChange,o=t.onClear,a=u()(T.b,{id:"notifications.column_settings.alert",defaultMessage:"Desktop notifications"}),s=u()(T.b,{id:"notifications.column_settings.show",defaultMessage:"Show in column"}),r=u()(T.b,{id:"notifications.column_settings.sound",defaultMessage:"Play sound"}),l=e.get("browserSupport")&&e.get("isSubscribed"),c=l&&u()(T.b,{id:"notifications.column_settings.push",defaultMessage:"Push notifications"}),d=l&&u()(T.b,{id:"notifications.column_settings.push_meta",defaultMessage:"This device"});return u()("div",{},void 0,u()("div",{className:"column-settings__row"},void 0,u()(K,{onClick:o})),u()("div",{role:"group","aria-labelledby":"notifications-follow"},void 0,u()("span",{id:"notifications-follow",className:"column-settings__section"},void 0,u()(T.b,{id:"notifications.column_settings.follow",defaultMessage:"New followers:"})),u()("div",{className:"column-settings__row"},void 0,u()(G.a,{prefix:"notifications_desktop",settings:n,settingPath:["alerts","follow"],onChange:i,label:a}),l&&u()(G.a,{prefix:"notifications_push",settings:e,settingPath:["alerts","follow"],meta:d,onChange:this.onPushChange,label:c}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["shows","follow"],onChange:i,label:s}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["sounds","follow"],onChange:i,label:r}))),u()("div",{role:"group","aria-labelledby":"notifications-favourite"},void 0,u()("span",{id:"notifications-favourite",className:"column-settings__section"},void 0,u()(T.b,{id:"notifications.column_settings.favourite",defaultMessage:"Favourites:"})),u()("div",{className:"column-settings__row"},void 0,u()(G.a,{prefix:"notifications_desktop",settings:n,settingPath:["alerts","favourite"],onChange:i,label:a}),l&&u()(G.a,{prefix:"notifications_push",settings:e,settingPath:["alerts","favourite"],meta:d,onChange:this.onPushChange,label:c}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["shows","favourite"],onChange:i,label:s}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["sounds","favourite"],onChange:i,label:r}))),u()("div",{role:"group","aria-labelledby":"notifications-mention"},void 0,u()("span",{id:"notifications-mention",className:"column-settings__section"},void 0,u()(T.b,{id:"notifications.column_settings.mention",defaultMessage:"Mentions:"})),u()("div",{className:"column-settings__row"},void 0,u()(G.a,{prefix:"notifications_desktop",settings:n,settingPath:["alerts","mention"],onChange:i,label:a}),l&&u()(G.a,{prefix:"notifications_push",settings:e,settingPath:["alerts","mention"],meta:d,onChange:this.onPushChange,label:c}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["shows","mention"],onChange:i,label:s}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["sounds","mention"],onChange:i,label:r}))),u()("div",{role:"group","aria-labelledby":"notifications-reblog"},void 0,u()("span",{id:"notifications-reblog",className:"column-settings__section"},void 0,u()(T.b,{id:"notifications.column_settings.reblog",defaultMessage:"Boosts:"})),u()("div",{className:"column-settings__row"},void 0,u()(G.a,{prefix:"notifications_desktop",settings:n,settingPath:["alerts","reblog"],onChange:i,label:a}),l&&u()(G.a,{prefix:"notifications_push",settings:e,settingPath:["alerts","reblog"],meta:d,onChange:this.onPushChange,label:c}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["shows","reblog"],onChange:i,label:s}),u()(G.a,{prefix:"notifications",settings:n,settingPath:["sounds","reblog"],onChange:i,label:r}))))},n}(_.a.PureComponent),z=e(33),B=e(82),E=e(21),W=Object(T.f)({clearMessage:{id:"notifications.clear_confirmation",defaultMessage:"Are you sure you want to permanently clear all your notifications?"},clearConfirm:{id:"notifications.clear",defaultMessage:"Clear notifications"}}),Y=Object(T.g)(Object(w.connect)(function(t){return{settings:t.getIn(["settings","notifications"]),pushSettings:t.get("push_notifications")}},function(t,n){var e=n.intl;return{onChange:function(n,e){"push"===n[0]?t(Object(B.e)(n.slice(1),e)):t(Object(z.c)(["notifications"].concat(n),e))},onClear:function(){t(Object(E.d)("CONFIRM",{message:e.formatMessage(W.clearMessage),confirm:e.formatMessage(W.clearConfirm),onConfirm:function(){return t(Object(O.g)())}}))}}})(J)),Q=e(49),V=e(5),X=e(195),Z=e(212);e.d(n,"default",function(){return nt});var $=Object(T.f)({title:{id:"column.notifications",defaultMessage:"Notifications"}}),tt=Object(Q.createSelector)([function(t){return Object(V.List)(t.getIn(["settings","notifications","shows"]).filter(function(t){return!t}).keys())},function(t){return t.getIn(["notifications","items"])}],function(t,n){return n.filterNot(function(n){return null!==n&&t.includes(n.get("type"))})}),nt=Object(w.connect)(function(t){return{notifications:tt(t),isLoading:t.getIn(["notifications","isLoading"],!0),isUnread:t.getIn(["notifications","unread"])>0,hasMore:t.getIn(["notifications","hasMore"])}})(s=Object(T.g)((l=r=function(t){function n(){var e,i,o;f()(this,n);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return e=i=p()(this,t.call.apply(t,[this].concat(s))),i.handleLoadGap=function(t){i.props.dispatch(Object(O.h)({maxId:t}))},i.handleLoadOlder=b()(function(){var t=i.props.notifications.last();i.props.dispatch(Object(O.h)({maxId:t&&t.get("id")}))},300,{leading:!0}),i.handleScrollToTop=b()(function(){i.props.dispatch(Object(O.i)(!0))},100),i.handleScroll=b()(function(){i.props.dispatch(Object(O.i)(!1))},100),i.handlePin=function(){var t=i.props,n=t.columnId,e=t.dispatch;e(n?Object(P.h)(n):Object(P.e)("NOTIFICATIONS",{}))},i.handleMove=function(t){var n=i.props,e=n.columnId;(0,n.dispatch)(Object(P.g)(e,t))},i.handleHeaderClick=function(){i.column.scrollTop()},i.setColumnRef=function(t){i.column=t},i.handleMoveUp=function(t){var n=i.props.notifications.findIndex(function(n){return null!==n&&n.get("id")===t})-1;i._selectChild(n)},i.handleMoveDown=function(t){var n=i.props.notifications.findIndex(function(n){return null!==n&&n.get("id")===t})+1;i._selectChild(n)},o=e,p()(i,o)}return m()(n,t),n.prototype.componentWillUnmount=function(){this.handleLoadOlder.cancel(),this.handleScrollToTop.cancel(),this.handleScroll.cancel(),this.props.dispatch(Object(O.i)(!1))},n.prototype._selectChild=function(t){var n=this.column.node.querySelector("article:nth-of-type("+(t+1)+") .focusable");n&&n.focus()},n.prototype.render=function(){var t=this,n=this.props,e=n.intl,i=n.notifications,o=n.shouldUpdateScroll,a=n.isLoading,s=n.isUnread,r=n.columnId,l=n.multiColumn,c=n.hasMore,d=!!r,f=u()(T.b,{id:"empty_column.notifications",defaultMessage:"You don't have any notifications yet. Interact with others to start the conversation."}),h=null;h=a&&this.scrollableContent?this.scrollableContent:i.size>0||c?i.map(function(n,e){return null===n?u()(Z.a,{disabled:a,maxId:e>0?i.getIn([e-1,"id"]):null,onClick:t.handleLoadGap},"gap:"+i.getIn([e+1,"id"])):u()(A,{notification:n,accountId:n.get("account"),onMoveUp:t.handleMoveUp,onMoveDown:t.handleMoveDown},n.get("id"))}):null,this.scrollableContent=h;var p=u()(X.a,{scrollKey:"notifications-"+r,trackScroll:!d,isLoading:a,hasMore:c,emptyMessage:f,onLoadMore:this.handleLoadOlder,onScrollToTop:this.handleScrollToTop,onScroll:this.handleScroll,shouldUpdateScroll:o},void 0,h);return _.a.createElement(y.a,{ref:this.setColumnRef,label:e.formatMessage($.title)},u()(C.a,{icon:"bell",active:s,title:e.formatMessage($.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:d,multiColumn:l},void 0,u()(Y,{})),p)},n}(_.a.PureComponent),r.defaultProps={trackScroll:!0},s=l))||s)||s}}]);
+(window.webpackJsonp=window.webpackJsonp||[]).push([[36],{702:function(t,e,i){"use strict";i.r(e);var n,o,a,s,c,l,r,p=i(1),d=i(7),u=i(0),f=i(2),b=i(54),h=i.n(b),g=i(3),O=i.n(g),j=i(20),v=i(431),m=i(429),M=i(79),_=i(207),w=i(156),C=i(5),y=i.n(C),k=i(26),P=i.n(k),x=i(632),N=i(896),I=i(6),S=i(408),F=i(24),H=i(179),W=i(33),R=function(t,e,i){var n=[e];return n.push(t.formatDate(i,{hour:"2-digit",minute:"2-digit",month:"short",day:"numeric"})),n.join(", ")},T=Object(I.g)((a=o=function(o){function t(){for(var n,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n=o.call.apply(o,[this].concat(e))||this,Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMoveUp",function(){var t=n.props,e=t.notification;(0,t.onMoveUp)(e.get("id"))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMoveDown",function(){var t=n.props,e=t.notification;(0,t.onMoveDown)(e.get("id"))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleOpen",function(){var t=n.props.notification;t.get("status")?n.context.router.history.push("/statuses/"+t.get("status")):n.handleOpenProfile()}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleOpenProfile",function(){var t=n.props.notification;n.context.router.history.push("/accounts/"+t.getIn(["account","id"]))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMention",function(t){t.preventDefault();var e=n.props,i=e.notification;(0,e.onMention)(i.get("account"),n.context.router.history)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHotkeyFavourite",function(){var t=n.props.status;t&&n.props.onFavourite(t)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHotkeyBoost",function(t){var e=n.props.status;e&&n.props.onReblog(e,t)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHotkeyToggleHidden",function(){var t=n.props.status;t&&n.props.onToggleHidden(t)}),n}Object(d.a)(t,o);var e=t.prototype;return e.getHandlers=function(){return{reply:this.handleMention,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,mention:this.handleMention,open:this.handleOpen,openProfile:this.handleOpenProfile,moveUp:this.handleMoveUp,moveDown:this.handleMoveDown,toggleHidden:this.handleHotkeyToggleHidden}},e.renderFollow=function(t,e,i){var n=this.props.intl;return Object(p.a)(H.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-follow focusable",tabIndex:"0","aria-label":R(n,n.formatMessage({id:"notification.follow",defaultMessage:"{name} followed you"},{name:e.get("acct")}),t.get("created_at"))},void 0,Object(p.a)("div",{className:"notification__message"},void 0,Object(p.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(p.a)(W.a,{id:"user-plus",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(I.b,{id:"notification.follow",defaultMessage:"{name} followed you",values:{name:i}}))),Object(p.a)(N.a,{id:e.get("id"),withNote:!1,hidden:this.props.hidden})))},e.renderMention=function(t){return Object(p.a)(x.a,{id:t.get("status"),withDismiss:!0,hidden:this.props.hidden,onMoveDown:this.handleMoveDown,onMoveUp:this.handleMoveUp,contextType:"notifications",getScrollPosition:this.props.getScrollPosition,updateScrollBottom:this.props.updateScrollBottom,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth})},e.renderFavourite=function(t,e){var i=this.props.intl;return Object(p.a)(H.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-favourite focusable",tabIndex:"0","aria-label":R(i,i.formatMessage({id:"notification.favourite",defaultMessage:"{name} favourited your status"},{name:t.getIn(["account","acct"])}),t.get("created_at"))},void 0,Object(p.a)("div",{className:"notification__message"},void 0,Object(p.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(p.a)(W.a,{id:"star",className:"star-icon",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(I.b,{id:"notification.favourite",defaultMessage:"{name} favourited your status",values:{name:e}}))),Object(p.a)(x.a,{id:t.get("status"),account:t.get("account"),muted:!0,withDismiss:!0,hidden:!!this.props.hidden,getScrollPosition:this.props.getScrollPosition,updateScrollBottom:this.props.updateScrollBottom,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth})))},e.renderReblog=function(t,e){var i=this.props.intl;return Object(p.a)(H.HotKeys,{handlers:this.getHandlers()},void 0,Object(p.a)("div",{className:"notification notification-reblog focusable",tabIndex:"0","aria-label":R(i,i.formatMessage({id:"notification.reblog",defaultMessage:"{name} boosted your status"},{name:t.getIn(["account","acct"])}),t.get("created_at"))},void 0,Object(p.a)("div",{className:"notification__message"},void 0,Object(p.a)("div",{className:"notification__favourite-icon-wrapper"},void 0,Object(p.a)(W.a,{id:"retweet",fixedWidth:!0})),Object(p.a)("span",{title:t.get("created_at")},void 0,Object(p.a)(I.b,{id:"notification.reblog",defaultMessage:"{name} boosted your status",values:{name:e}}))),Object(p.a)(x.a,{id:t.get("status"),account:t.get("account"),muted:!0,withDismiss:!0,hidden:this.props.hidden,getScrollPosition:this.props.getScrollPosition,updateScrollBottom:this.props.updateScrollBottom,cachedMediaWidth:this.props.cachedMediaWidth,cacheMediaWidth:this.props.cacheMediaWidth})))},e.render=function(){var t=this.props.notification,e=t.get("account"),i={__html:e.get("display_name_html")},n=Object(p.a)("bdi",{},void 0,Object(p.a)(S.a,{className:"notification__display-name",href:e.get("url"),title:e.get("acct"),to:"/accounts/"+e.get("id"),dangerouslySetInnerHTML:i}));switch(t.get("type")){case"follow":return this.renderFollow(t,e,n);case"mention":return this.renderMention(t);case"favourite":return this.renderFavourite(t,n);case"reblog":return this.renderReblog(t,n)}return null},t}(F.a),Object(f.a)(o,"contextTypes",{router:y.a.object}),Object(f.a)(o,"propTypes",{notification:P.a.map.isRequired,hidden:y.a.bool,onMoveUp:y.a.func.isRequired,onMoveDown:y.a.func.isRequired,onMention:y.a.func.isRequired,onFavourite:y.a.func.isRequired,onReblog:y.a.func.isRequired,onToggleHidden:y.a.func.isRequired,status:y.a.option,intl:y.a.object.isRequired,getScrollPosition:y.a.func,updateScrollBottom:y.a.func,cacheMediaWidth:y.a.func,cachedMediaWidth:y.a.number}),n=a))||n,q=i(50),D=i(23),U=i(56),B=i(72),L=i(22),A=Object(j.connect)(function(){var n=Object(w.e)(),o=Object(w.f)();return function(t,e){var i=n(t,e.notification,e.accountId);return{notification:i,status:i.get("status")?o(t,{id:i.get("status")}):null}}},function(i){return{onMention:function(t,e){i(Object(D.R)(t,e))},onModalReblog:function(t){i(Object(U.o)(t))},onReblog:function(t,e){t.get("reblogged")?i(Object(U.r)(t)):e.shiftKey||!L.b?this.onModalReblog(t):i(Object(q.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){t.get("favourited")?i(Object(U.p)(t)):i(Object(U.k)(t))},onToggleHidden:function(t){t.get("hidden")?i(Object(B.k)(t.get("id"))):i(Object(B.i)(t.get("id")))}}})(T),K=function(t){function e(){return t.apply(this,arguments)||this}return Object(d.a)(e,t),e.prototype.render=function(){return Object(p.a)("button",{className:"text-btn column-header__setting-btn",tabIndex:"0",onClick:this.props.onClick},void 0,Object(p.a)(W.a,{id:"eraser"})," ",Object(p.a)(I.b,{id:"notifications.clear",defaultMessage:"Clear notifications"}))},e}(O.a.PureComponent),z=i(927),G=function(o){function t(){for(var i,t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return i=o.call.apply(o,[this].concat(e))||this,Object(f.a)(Object(u.a)(Object(u.a)(i)),"onPushChange",function(t,e){i.props.onChange(["push"].concat(t),e)}),i}return Object(d.a)(t,o),t.prototype.render=function(){var t=this.props,e=t.settings,i=t.pushSettings,n=t.onChange,o=t.onClear,a=Object(p.a)(I.b,{id:"notifications.column_settings.filter_bar.show",defaultMessage:"Show"}),s=Object(p.a)(I.b,{id:"notifications.column_settings.filter_bar.advanced",defaultMessage:"Display all categories"}),c=Object(p.a)(I.b,{id:"notifications.column_settings.alert",defaultMessage:"Desktop notifications"}),l=Object(p.a)(I.b,{id:"notifications.column_settings.show",defaultMessage:"Show in column"}),r=Object(p.a)(I.b,{id:"notifications.column_settings.sound",defaultMessage:"Play sound"}),d=i.get("browserSupport")&&i.get("isSubscribed"),u=d&&Object(p.a)(I.b,{id:"notifications.column_settings.push",defaultMessage:"Push notifications"});return Object(p.a)("div",{},void 0,Object(p.a)("div",{className:"column-settings__row"},void 0,Object(p.a)(K,{onClick:o})),Object(p.a)("div",{role:"group","aria-labelledby":"notifications-filter-bar"},void 0,Object(p.a)("span",{id:"notifications-filter-bar",className:"column-settings__section"},void 0,Object(p.a)(I.b,{id:"notifications.column_settings.filter_bar.category",defaultMessage:"Quick filter bar"})),Object(p.a)("div",{className:"column-settings__row"},void 0,Object(p.a)(z.a,{id:"show-filter-bar",prefix:"notifications",settings:e,settingPath:["quickFilter","show"],onChange:n,label:a}),Object(p.a)(z.a,{id:"show-filter-bar",prefix:"notifications",settings:e,settingPath:["quickFilter","advanced"],onChange:n,label:s}))),Object(p.a)("div",{role:"group","aria-labelledby":"notifications-follow"},void 0,Object(p.a)("span",{id:"notifications-follow",className:"column-settings__section"},void 0,Object(p.a)(I.b,{id:"notifications.column_settings.follow",defaultMessage:"New followers:"})),Object(p.a)("div",{className:"column-settings__row"},void 0,Object(p.a)(z.a,{prefix:"notifications_desktop",settings:e,settingPath:["alerts","follow"],onChange:n,label:c}),d&&Object(p.a)(z.a,{prefix:"notifications_push",settings:i,settingPath:["alerts","follow"],onChange:this.onPushChange,label:u}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["shows","follow"],onChange:n,label:l}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["sounds","follow"],onChange:n,label:r}))),Object(p.a)("div",{role:"group","aria-labelledby":"notifications-favourite"},void 0,Object(p.a)("span",{id:"notifications-favourite",className:"column-settings__section"},void 0,Object(p.a)(I.b,{id:"notifications.column_settings.favourite",defaultMessage:"Favourites:"})),Object(p.a)("div",{className:"column-settings__row"},void 0,Object(p.a)(z.a,{prefix:"notifications_desktop",settings:e,settingPath:["alerts","favourite"],onChange:n,label:c}),d&&Object(p.a)(z.a,{prefix:"notifications_push",settings:i,settingPath:["alerts","favourite"],onChange:this.onPushChange,label:u}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["shows","favourite"],onChange:n,label:l}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["sounds","favourite"],onChange:n,label:r}))),Object(p.a)("div",{role:"group","aria-labelledby":"notifications-mention"},void 0,Object(p.a)("span",{id:"notifications-mention",className:"column-settings__section"},void 0,Object(p.a)(I.b,{id:"notifications.column_settings.mention",defaultMessage:"Mentions:"})),Object(p.a)("div",{className:"column-settings__row"},void 0,Object(p.a)(z.a,{prefix:"notifications_desktop",settings:e,settingPath:["alerts","mention"],onChange:n,label:c}),d&&Object(p.a)(z.a,{prefix:"notifications_push",settings:i,settingPath:["alerts","mention"],onChange:this.onPushChange,label:u}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["shows","mention"],onChange:n,label:l}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["sounds","mention"],onChange:n,label:r}))),Object(p.a)("div",{role:"group","aria-labelledby":"notifications-reblog"},void 0,Object(p.a)("span",{id:"notifications-reblog",className:"column-settings__section"},void 0,Object(p.a)(I.b,{id:"notifications.column_settings.reblog",defaultMessage:"Boosts:"})),Object(p.a)("div",{className:"column-settings__row"},void 0,Object(p.a)(z.a,{prefix:"notifications_desktop",settings:e,settingPath:["alerts","reblog"],onChange:n,label:c}),d&&Object(p.a)(z.a,{prefix:"notifications_push",settings:i,settingPath:["alerts","reblog"],onChange:this.onPushChange,label:u}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["shows","reblog"],onChange:n,label:l}),Object(p.a)(z.a,{prefix:"notifications",settings:e,settingPath:["sounds","reblog"],onChange:n,label:r}))))},t}(O.a.PureComponent),J=i(86),E=i(183),Q=Object(I.f)({clearMessage:{id:"notifications.clear_confirmation",defaultMessage:"Are you sure you want to permanently clear all your notifications?"},clearConfirm:{id:"notifications.clear",defaultMessage:"Clear notifications"}}),Y=Object(I.g)(Object(j.connect)(function(t){return{settings:t.getIn(["settings","notifications"]),pushSettings:t.get("push_notifications")}},function(i,t){var e=t.intl;return{onChange:function(t,e){"push"===t[0]?i(Object(E.e)(t.slice(1),e)):"quickFilter"===t[0]?(i(Object(J.c)(["notifications"].concat(t),e)),i(Object(M.k)("all"))):i(Object(J.c)(["notifications"].concat(t),e))},onClear:function(){i(Object(q.d)("CONFIRM",{message:e.formatMessage(Q.clearMessage),confirm:e.formatMessage(Q.clearConfirm),onConfirm:function(){return i(Object(M.h)())}}))}}})(G)),V=Object(I.f)({mentions:{id:"notifications.filter.mentions",defaultMessage:"Mentions"},favourites:{id:"notifications.filter.favourites",defaultMessage:"Favourites"},boosts:{id:"notifications.filter.boosts",defaultMessage:"Boosts"},follows:{id:"notifications.filter.follows",defaultMessage:"Follows"}}),X=Object(I.g)(s=function(t){function e(){return t.apply(this,arguments)||this}Object(d.a)(e,t);var i=e.prototype;return i.onClick=function(t){var e=this;return function(){return e.props.selectFilter(t)}},i.render=function(){var t=this.props,e=t.selectedFilter,i=t.advancedMode,n=t.intl;return i?Object(p.a)("div",{className:"notification__filter-bar"},void 0,Object(p.a)("button",{className:"all"===e?"active":"",onClick:this.onClick("all")},void 0,Object(p.a)(I.b,{id:"notifications.filter.all",defaultMessage:"All"})),Object(p.a)("button",{className:"mention"===e?"active":"",onClick:this.onClick("mention"),title:n.formatMessage(V.mentions)},void 0,Object(p.a)(W.a,{id:"at",fixedWidth:!0})),Object(p.a)("button",{className:"favourite"===e?"active":"",onClick:this.onClick("favourite"),title:n.formatMessage(V.favourites)},void 0,Object(p.a)(W.a,{id:"star",fixedWidth:!0})),Object(p.a)("button",{className:"reblog"===e?"active":"",onClick:this.onClick("reblog"),title:n.formatMessage(V.boosts)},void 0,Object(p.a)(W.a,{id:"retweet",fixedWidth:!0})),Object(p.a)("button",{className:"follow"===e?"active":"",onClick:this.onClick("follow"),title:n.formatMessage(V.follows)},void 0,Object(p.a)(W.a,{id:"user-plus",fixedWidth:!0}))):Object(p.a)("div",{className:"notification__filter-bar"},void 0,Object(p.a)("button",{className:"all"===e?"active":"",onClick:this.onClick("all")},void 0,Object(p.a)(I.b,{id:"notifications.filter.all",defaultMessage:"All"})),Object(p.a)("button",{className:"mention"===e?"active":"",onClick:this.onClick("mention")},void 0,Object(p.a)(I.b,{id:"notifications.filter.mentions",defaultMessage:"Mentions"})))},e}(O.a.PureComponent))||s,Z=Object(j.connect)(function(t){return{selectedFilter:t.getIn(["settings","notifications","quickFilter","active"]),advancedMode:t.getIn(["settings","notifications","quickFilter","advanced"])}},function(e){return{selectFilter:function(t){e(Object(M.k)(t))}}})(X),$=i(60),tt=i(4),et=i(643),it=i(653);i.d(e,"default",function(){return at});var nt=Object(I.f)({title:{id:"column.notifications",defaultMessage:"Notifications"}}),ot=Object($.a)([function(t){return t.getIn(["settings","notifications","quickFilter","show"])},function(t){return t.getIn(["settings","notifications","quickFilter","active"])},function(t){return Object(tt.List)(t.getIn(["settings","notifications","shows"]).filter(function(t){return!t}).keys())},function(t){return t.getIn(["notifications","items"])}],function(t,e,i,n){return t&&"all"!==e?n.filter(function(t){return null!==t&&e===t.get("type")}):n.filterNot(function(t){return null!==t&&i.includes(t.get("type"))})}),at=Object(j.connect)(function(t){return{showFilterBar:t.getIn(["settings","notifications","quickFilter","show"]),notifications:ot(t),isLoading:t.getIn(["notifications","isLoading"],!0),isUnread:0<t.getIn(["notifications","unread"]),hasMore:t.getIn(["notifications","hasMore"])}})(c=Object(I.g)((r=l=function(o){function t(){for(var n,t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];return n=o.call.apply(o,[this].concat(e))||this,Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleLoadGap",function(t){n.props.dispatch(Object(M.i)({maxId:t}))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleLoadOlder",h()(function(){var t=n.props.notifications.last();n.props.dispatch(Object(M.i)({maxId:t&&t.get("id")}))},300,{leading:!0})),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleScrollToTop",h()(function(){n.props.dispatch(Object(M.j)(!0))},100)),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleScroll",h()(function(){n.props.dispatch(Object(M.j)(!1))},100)),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handlePin",function(){var t=n.props,e=t.columnId,i=t.dispatch;i(e?Object(_.h)(e):Object(_.e)("NOTIFICATIONS",{}))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMove",function(t){var e=n.props,i=e.columnId;(0,e.dispatch)(Object(_.g)(i,t))}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleHeaderClick",function(){n.column.scrollTop()}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"setColumnRef",function(t){n.column=t}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMoveUp",function(e){var t=n.props.notifications.findIndex(function(t){return null!==t&&t.get("id")===e})-1;n._selectChild(t)}),Object(f.a)(Object(u.a)(Object(u.a)(n)),"handleMoveDown",function(e){var t=n.props.notifications.findIndex(function(t){return null!==t&&t.get("id")===e})+1;n._selectChild(t)}),n}Object(d.a)(t,o);var e=t.prototype;return e.componentWillUnmount=function(){this.handleLoadOlder.cancel(),this.handleScrollToTop.cancel(),this.handleScroll.cancel(),this.props.dispatch(Object(M.j)(!1))},e._selectChild=function(t){var e=this.column.node.querySelector("article:nth-of-type("+(t+1)+") .focusable");e&&e.focus()},e.render=function(){var i=this,t=this.props,e=t.intl,n=t.notifications,o=t.shouldUpdateScroll,a=t.isLoading,s=t.isUnread,c=t.columnId,l=t.multiColumn,r=t.hasMore,d=t.showFilterBar,u=!!c,f=Object(p.a)(I.b,{id:"empty_column.notifications",defaultMessage:"You don't have any notifications yet. Interact with others to start the conversation."}),b=null,h=d?Object(p.a)(Z,{}):null;b=a&&this.scrollableContent?this.scrollableContent:0<n.size||r?n.map(function(t,e){return null===t?Object(p.a)(it.a,{disabled:a,maxId:0<e?n.getIn([e-1,"id"]):null,onClick:i.handleLoadGap},"gap:"+n.getIn([e+1,"id"])):Object(p.a)(A,{notification:t,accountId:t.get("account"),onMoveUp:i.handleMoveUp,onMoveDown:i.handleMoveDown},t.get("id"))}):null,this.scrollableContent=b;var g=Object(p.a)(et.a,{scrollKey:"notifications-"+c,trackScroll:!u,isLoading:a,showLoading:a&&0===n.size,hasMore:r,emptyMessage:f,onLoadMore:this.handleLoadOlder,onScrollToTop:this.handleScrollToTop,onScroll:this.handleScroll,shouldUpdateScroll:o},void 0,b);return O.a.createElement(v.a,{ref:this.setColumnRef,label:e.formatMessage(nt.title)},Object(p.a)(m.a,{icon:"bell",active:s,title:e.formatMessage(nt.title),onPin:this.handlePin,onMove:this.handleMove,onClick:this.handleHeaderClick,pinned:u,multiColumn:l},void 0,Object(p.a)(Y,{})),h,g)},t}(O.a.PureComponent),Object(f.a)(l,"defaultProps",{trackScroll:!0}),c=r))||c)||c}}]);