2 lines
34 KiB
JavaScript
2 lines
34 KiB
JavaScript
webpackJsonp([6],{153:function(e,t,n){"use strict";n.d(t,"a",function(){return g});var o=n(2),i=n.n(o),a=n(1),s=n.n(a),r=n(3),c=n.n(r),l=n(4),u=n.n(l),d=n(0),p=n.n(d),f=n(10),h=n.n(f),g=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(r))),o.handleClick=function(){o.props.onClick()},i=n,c()(o,i)}return u()(t,e),t.prototype.render=function(){var e=this.props,t=e.icon,n=e.type,o=e.active,a=e.columnHeaderId,s="";return t&&(s=i()("i",{className:"fa fa-fw fa-"+t+" column-header__icon"})),i()("h1",{className:h()("column-header",{active:o}),id:a||null},void 0,i()("button",{onClick:this.handleClick},void 0,s,n))},t}(p.a.PureComponent)},283:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o=n(2),i=n.n(o),a=n(1),s=n.n(a),r=n(3),c=n.n(r),l=n(4),u=n.n(l),d=n(32),p=n.n(d),f=n(0),h=n.n(f),g=n(153),m=n(90),b=n(43),v=function(e){function t(){var n,o,i;s()(this,t);for(var a=arguments.length,r=Array(a),l=0;l<a;l++)r[l]=arguments[l];return n=o=c()(this,e.call.apply(e,[this].concat(r))),o.handleHeaderClick=function(){var e=o.node.querySelector(".scrollable");e&&(o._interruptScrollAnimation=Object(m.b)(e))},o.handleScroll=p()(function(){void 0!==o._interruptScrollAnimation&&o._interruptScrollAnimation()},200),o.setRef=function(e){o.node=e},i=n,c()(o,i)}return u()(t,e),t.prototype.scrollTop=function(){var e=this.node.querySelector(".scrollable");e&&(this._interruptScrollAnimation=Object(m.b)(e))},t.prototype.render=function(){var e=this.props,t=e.heading,n=e.icon,o=e.children,a=e.active,s=e.hideHeadingOnMobile,r=t&&(!s||s&&!Object(b.b)(window.innerWidth)),c=r&&t.replace(/ /g,"-"),l=r&&i()(g.a,{icon:n,active:a,type:t,onClick:this.handleHeaderClick,columnHeaderId:c});return h.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":c,className:"column",onScroll:this.handleScroll},l,o)},t}(h.a.PureComponent)},284:function(e,t,n){"use strict";n.d(t,"a",function(){return m});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=n.n(f),g=n(7),m=(i=o=function(e){function t(){return c()(this,t),u()(this,e.apply(this,arguments))}return p()(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}(h.a.PureComponent),o.defaultProps={visible:!0},i)},285:function(e,t,n){"use strict";n.d(t,"a",function(){return v});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=n.n(f),g=n(7),m=n(5),b=n.n(m),v=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handleClick=function(){window.history&&1===window.history.length?o.context.router.history.push("/"):o.context.router.history.goBack()},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){return s()("button",{onClick:this.handleClick,className:"column-back-button"},void 0,s()("i",{className:"fa fa-fw fa-chevron-left column-back-button__icon"}),s()(g.b,{id:"column_back_button.label",defaultMessage:"Back"}))},t}(h.a.PureComponent),o.contextTypes={router:b.a.object},i)},286:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),s=(n.n(a),n(9)),r=n(156),c=n(68),l=n(17),u=n(69),d=n(22),p=n(91),f=n(89),h=n(155),g=n(26),m=n(7),b=n(13),v=n(33),M=Object(m.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"}}),y=function(){var e=Object(c.e)();return function(t,n){return{status:e(t,n.id)}}},_=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||!b.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(v.e)(t))}}))},onDelete:function(t){e(b.e?Object(g.d)("CONFIRM",{message:n.formatMessage(M.deleteMessage),confirm:n.formatMessage(M.deleteConfirm),onConfirm:function(){return e(Object(p.f)(t.get("id")))}}):Object(p.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()(m.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(M.blockConfirm),onConfirm:function(){return e(Object(d.q)(t.get("id")))}}))},onReport:function(t){e(Object(h.k)(t.get("account"),t))},onMute:function(t){e(Object(f.g)(t))},onMuteConversation:function(t){e(t.get("muted")?Object(p.k)(t.get("id")):Object(p.i)(t.get("id")))},onToggleHidden:function(t){e(t.get("hidden")?Object(p.j)(t.get("id")):Object(p.h)(t.get("id")))}}};t.a=Object(m.g)(Object(s.connect)(y,_)(r.a))},287:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(93),h=n.n(f),g=n(0),m=n.n(g),b=n(154),v=n(5),M=n.n(v),y=n(288),_=n(284),k=n(293),O=n(8),I=(n.n(O),n(10)),w=n.n(I),j=n(157),C=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.state={fullscreen:null},o.intersectionObserverWrapper=new k.a,o.handleScroll=h()(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(j.d)()})},o.setRef=function(e){o.node=e},o.handleLoadMore=function(e){e.preventDefault(),o.props.onLoadMore()},i=n,u()(o,i)}return p()(t,e),t.prototype.componentDidMount=function(){this.attachScrollListener(),this.attachIntersectionObserver(),Object(j.a)(this.onFullScreenChange),this.handleScroll()},t.prototype.getSnapshotBeforeUpdate=function(e){return m.a.Children.count(e.children)>0&&m.a.Children.count(e.children)<m.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(j.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 O.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,a=t.shouldUpdateScroll,r=t.isLoading,c=t.hasMore,l=t.prepend,u=t.emptyMessage,d=t.onLoadMore,p=this.state.fullscreen,f=m.a.Children.count(n),h=c&&f>0&&d?s()(_.a,{visible:!r,onClick:this.handleLoadMore}):null,g=null;return g=r||f>0||!u?m.a.createElement("div",{className:w()("scrollable",{fullscreen:p}),ref:this.setRef},s()("div",{role:"feed",className:"item-list"},void 0,l,m.a.Children.map(this.props.children,function(t,n){return s()(y.a,{id:t.key,index:n,listLength:f,intersectionObserverWrapper:e.intersectionObserverWrapper,saveHeightKey:i?e.context.router.route.location.key+":"+o:null},t.key,t)}),h)):m.a.createElement("div",{className:"empty-column-indicator",ref:this.setRef},u),i?s()(b.a,{scrollKey:o,shouldUpdateScroll:a},void 0,g):g},t}(g.PureComponent),o.contextTypes={router:M.a.object},o.defaultProps={trackScroll:!0},i)},288:function(e,t,n){"use strict";var o=n(9),i=n(289),a=n(94),s=function(e,t){return{cachedHeight:e.getIn(["height_cache",t.saveHeightKey,t.id])}},r=function(e){return{onHeightChange:function(t,n,o){e(Object(a.d)(t,n,o))}}};t.a=Object(o.connect)(s,r)(i.a)},289:function(e,t,n){"use strict";n.d(t,"a",function(){return m});var o=n(1),i=n.n(o),a=n(3),s=n.n(a),r=n(4),c=n.n(r),l=n(0),u=n.n(l),d=n(290),p=n(292),f=n(8),h=(n.n(f),["id","index","listLength"]),g=["id","index","listLength","cachedHeight"],m=function(e){function t(){var n,o,a;i()(this,t);for(var r=arguments.length,c=Array(r),l=0;l<r;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(p.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},a=n,s()(o,a)}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:h).every(function(t){return Object(f.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,a=e.cachedHeight,s=this.state,r=s.isIntersecting,c=s.isHidden;return r||!c&&!a?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||a)+"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(;r.length&&e.timeRemaining()>0;)r.shift()();r.length?requestIdleCallback(o):c=!1}function i(e){r.push(e),c||(c=!0,requestIdleCallback(o))}var a=n(291),s=n.n(a),r=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),a=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=a},294:function(e,t,n){"use strict";n.d(t,"a",function(){return m});var o,i=n(2),a=n.n(i),s=n(1),r=n.n(s),c=n(3),l=n.n(c),u=n(4),d=n.n(u),p=n(0),f=n.n(p),h=n(7),g=Object(h.f)({load_more:{id:"status.load_more",defaultMessage:"Load more"}}),m=Object(h.g)(o=function(e){function t(){var n,o,i;r()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;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 a()("button",{className:"load-more load-gap",disabled:t,onClick:this.handleClick,"aria-label":n.formatMessage(g.load_more)},void 0,a()("i",{className:"fa fa-ellipsis-h"}))},t}(f.a.PureComponent))||o},295:function(e,t,n){"use strict";n.d(t,"a",function(){return x});var o,i,a=n(34),s=n.n(a),r=n(2),c=n.n(r),l=n(55),u=n.n(l),d=n(1),p=n.n(d),f=n(3),h=n.n(f),g=n(4),m=n.n(g),b=n(32),v=n.n(b),M=n(0),y=n.n(M),_=n(14),k=n.n(_),O=n(5),I=n.n(O),w=n(286),j=n(12),C=n.n(j),R=n(294),S=n(287),N=n(7),x=(i=o=function(e){function t(){var n,o,i;p()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=h()(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=v()(function(){o.props.onLoadMore(o.props.statusIds.last())},300,{leading:!0}),o.setRef=function(e){o.node=e},i=n,h()(o,i)}return m()(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,a=u()(t,["statusIds","featuredStatusIds","onLoadMore"]),r=a.isLoading;if(a.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()(N.b,{id:"regeneration_indicator.label",tagName:"strong",defaultMessage:"Loading…"}),c()(N.b,{id:"regeneration_indicator.sublabel",defaultMessage:"Your home feed is being prepared!"}))));var l=r||n.size>0?n.map(function(t,o){return null===t?c()(R.a,{disabled:r,maxId:o>0?n.get(o-1):null,onClick:i},"gap:"+n.get(o+1)):c()(w.a,{id:t,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},t)}):null;return l&&o&&(l=o.map(function(t){return c()(w.a,{id:t,featured:!0,onMoveUp:e.handleMoveUp,onMoveDown:e.handleMoveDown},"f-"+t)}).concat(l)),y.a.createElement(S.a,s()({},a,{onLoadMore:i&&this.handleLoadOlder,ref:this.setRef}),l)},t}(C.a),o.propTypes={scrollKey:I.a.string.isRequired,statusIds:k.a.list.isRequired,featuredStatusIds:k.a.list,onLoadMore:I.a.func,onScrollToTop:I.a.func,onScroll:I.a.func,trackScroll:I.a.bool,shouldUpdateScroll:I.a.func,isLoading:I.a.bool,isPartial:I.a.bool,hasMore:I.a.bool,prepend:I.a.node,emptyMessage:I.a.node},o.defaultProps={trackScroll:!0},i)},837:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return D});var o,i,a,s,r=n(2),c=n.n(r),l=n(1),u=n.n(l),d=n(3),p=n.n(d),f=n(4),h=n.n(f),g=n(0),m=(n.n(g),n(9)),b=n(14),v=n.n(b),M=n(5),y=n.n(M),_=n(22),k=n(19),O=n(295),I=n(298),w=n(283),j=n(887),C=n(285),R=n(8),S=(n.n(R),n(12)),N=n.n(S),x=function(e,t){var n=t.params.accountId,o=t.withReplies,i=void 0!==o&&o,a=i?n+":with_replies":n;return{statusIds:e.getIn(["timelines","account:"+a,"items"],Object(R.List)()),featuredStatusIds:i?Object(R.List)():e.getIn(["timelines","account:"+n+":pinned","items"],Object(R.List)()),isLoading:e.getIn(["timelines","account:"+a,"isLoading"]),hasMore:e.getIn(["timelines","account:"+a,"hasMore"])}},D=(o=Object(m.connect)(x))((s=a=function(e){function t(){var n,o,i;u()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=p()(this,e.call.apply(e,[this].concat(s))),o.handleLoadMore=function(e){o.props.dispatch(Object(k.l)(o.props.params.accountId,{maxId:e,withReplies:o.props.withReplies}))},i=n,p()(o,i)}return h()(t,e),t.prototype.componentWillMount=function(){var e=this.props,t=e.params.accountId,n=e.withReplies;this.props.dispatch(Object(_.u)(t)),n||this.props.dispatch(Object(k.j)(t)),this.props.dispatch(Object(k.l)(t,{withReplies:n}))},t.prototype.componentWillReceiveProps=function(e){(e.params.accountId!==this.props.params.accountId&&e.params.accountId||e.withReplies!==this.props.withReplies)&&(this.props.dispatch(Object(_.u)(e.params.accountId)),e.withReplies||this.props.dispatch(Object(k.j)(e.params.accountId)),this.props.dispatch(Object(k.l)(e.params.accountId,{withReplies:e.params.withReplies})))},t.prototype.render=function(){var e=this.props,t=e.statusIds,n=e.featuredStatusIds,o=e.isLoading,i=e.hasMore;return!t&&o?c()(w.a,{},void 0,c()(I.a,{})):c()(w.a,{},void 0,c()(C.a,{}),c()(O.a,{prepend:c()(j.a,{accountId:this.props.params.accountId}),scrollKey:"account_timeline",statusIds:t,featuredStatusIds:n,isLoading:o,hasMore:i,onLoadMore:this.handleLoadMore}))},t}(N.a),a.propTypes={params:y.a.object.isRequired,dispatch:y.a.func.isRequired,statusIds:v.a.list,featuredStatusIds:v.a.list,isLoading:y.a.bool,hasMore:y.a.bool,withReplies:y.a.bool},i=s))||i},881:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),s=(n.n(a),n(7)),r=function(){return i()("div",{className:"regeneration-indicator missing-indicator"},void 0,i()("div",{},void 0,i()("div",{className:"regeneration-indicator__figure"}),i()("div",{className:"regeneration-indicator__label"},void 0,i()(s.b,{id:"missing_indicator.label",tagName:"strong",defaultMessage:"Not found"}),i()(s.b,{id:"missing_indicator.sublabel",defaultMessage:"This resource could not be found"}))))};t.a=r},887:function(e,t,n){"use strict";var o=n(2),i=n.n(o),a=n(0),s=(n.n(a),n(9)),r=n(68),c=n(888),l=n(22),u=n(17),d=n(89),p=n(155),f=n(26),h=n(158),g=n(7),m=n(13),b=Object(g.f)({unfollowConfirm:{id:"confirmations.unfollow.confirm",defaultMessage:"Unfollow"},blockConfirm:{id:"confirmations.block.confirm",defaultMessage:"Block"},blockDomainConfirm:{id:"confirmations.domain_block.confirm",defaultMessage:"Hide entire domain"}}),v=function(){var e=Object(r.c)();return function(t,n){var o=n.accountId;return{account:e(t,o)}}},M=function(e,t){var n=t.intl;return{onFollow:function(t){e(t.getIn(["relationship","following"])||t.getIn(["relationship","requested"])?m.j?Object(f.d)("CONFIRM",{message:i()(g.b,{id:"confirmations.unfollow.message",defaultMessage:"Are you sure you want to unfollow {name}?",values:{name:i()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(b.unfollowConfirm),onConfirm:function(){return e(Object(l.D)(t.get("id")))}}):Object(l.D)(t.get("id")):Object(l.z)(t.get("id")))},onBlock:function(t){e(t.getIn(["relationship","blocking"])?Object(l.C)(t.get("id")):Object(f.d)("CONFIRM",{message:i()(g.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(b.blockConfirm),onConfirm:function(){return e(Object(l.q)(t.get("id")))}}))},onMention:function(t,n){e(Object(u.R)(t,n))},onDirect:function(t,n){e(Object(u.N)(t,n))},onReblogToggle:function(t){e(t.getIn(["relationship","showing_reblogs"])?Object(l.z)(t.get("id"),!1):Object(l.z)(t.get("id"),!0))},onReport:function(t){e(Object(p.k)(t))},onMute:function(t){e(t.getIn(["relationship","muting"])?Object(l.E)(t.get("id")):Object(d.g)(t))},onBlockDomain:function(t){e(Object(f.d)("CONFIRM",{message:i()(g.b,{id:"confirmations.domain_block.message",defaultMessage:"Are you really, really sure you want to block the entire {domain}? In most cases a few targeted blocks or mutes are sufficient and preferable.",values:{domain:i()("strong",{},void 0,t)}}),confirm:n.formatMessage(b.blockDomainConfirm),onConfirm:function(){return e(Object(h.e)(t))}}))},onUnblockDomain:function(t){e(Object(h.h)(t))}}};t.a=Object(g.g)(Object(s.connect)(v,M)(c.a))},888:function(e,t,n){"use strict";n.d(t,"a",function(){return j});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=(n.n(f),n(14)),g=n.n(h),m=n(5),b=n.n(m),v=n(889),M=n(890),y=n(881),_=n(12),k=n.n(_),O=n(891),I=n(7),w=n(44),j=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handleFollow=function(){o.props.onFollow(o.props.account)},o.handleBlock=function(){o.props.onBlock(o.props.account)},o.handleMention=function(){o.props.onMention(o.props.account,o.context.router.history)},o.handleDirect=function(){o.props.onDirect(o.props.account,o.context.router.history)},o.handleReport=function(){o.props.onReport(o.props.account)},o.handleReblogToggle=function(){o.props.onReblogToggle(o.props.account)},o.handleMute=function(){o.props.onMute(o.props.account)},o.handleBlockDomain=function(){var e=o.props.account.get("acct").split("@")[1];e&&o.props.onBlockDomain(e)},o.handleUnblockDomain=function(){var e=o.props.account.get("acct").split("@")[1];e&&o.props.onUnblockDomain(e)},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.hideTabs;return null===t?s()(y.a,{}):s()("div",{className:"account-timeline__header"},void 0,t.get("moved")&&s()(O.a,{from:t,to:t.get("moved")}),s()(v.a,{account:t,onFollow:this.handleFollow,onBlock:this.handleBlock}),s()(M.a,{account:t,onBlock:this.handleBlock,onMention:this.handleMention,onDirect:this.handleDirect,onReblogToggle:this.handleReblogToggle,onReport:this.handleReport,onMute:this.handleMute,onBlockDomain:this.handleBlockDomain,onUnblockDomain:this.handleUnblockDomain}),!n&&s()("div",{className:"account__section-headline"},void 0,s()(w.c,{exact:!0,to:"/accounts/"+t.get("id")},void 0,s()(I.b,{id:"account.posts",defaultMessage:"Toots"})),s()(w.c,{exact:!0,to:"/accounts/"+t.get("id")+"/with_replies"},void 0,s()(I.b,{id:"account.posts_with_replies",defaultMessage:"Toots and replies"})),s()(w.c,{exact:!0,to:"/accounts/"+t.get("id")+"/media"},void 0,s()(I.b,{id:"account.media",defaultMessage:"Media"}))))},t}(k.a),o.propTypes={account:g.a.map,onFollow:b.a.func.isRequired,onBlock:b.a.func.isRequired,onMention:b.a.func.isRequired,onDirect:b.a.func.isRequired,onReblogToggle:b.a.func.isRequired,onReport:b.a.func.isRequired,onMute:b.a.func.isRequired,onBlockDomain:b.a.func.isRequired,onUnblockDomain:b.a.func.isRequired,hideTabs:b.a.bool},o.contextTypes={router:b.a.object},i)},889:function(e,t,n){"use strict";n.d(t,"a",function(){return L});var o,i,a,s,r,c=n(2),l=n.n(c),u=n(1),d=n.n(u),p=n(3),f=n.n(p),h=n(4),g=n.n(h),m=n(0),b=(n.n(m),n(14)),v=n.n(b),M=n(5),y=n.n(M),_=n(7),k=n(23),O=n(27),I=n(28),w=n.n(I),j=n(12),C=n.n(j),R=n(13),S=n(10),N=n.n(S),x=Object(_.f)({unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},follow:{id:"account.follow",defaultMessage:"Follow"},requested:{id:"account.requested",defaultMessage:"Awaiting approval. Click to cancel follow request"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"}}),D=(i=o=function(e){function t(){var n,o,i;d()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=f()(this,e.call.apply(e,[this].concat(s))),o.state={isHovered:!1},o.handleMouseOver=function(){o.state.isHovered||o.setState({isHovered:!0})},o.handleMouseOut=function(){o.state.isHovered&&o.setState({isHovered:!1})},i=n,f()(o,i)}return g()(t,e),t.prototype.render=function(){var e=this,t=this.props.account,n=this.state.isHovered;return l()(O.a,{defaultStyle:{radius:90},style:{radius:w()(n?30:90,{stiffness:180,damping:12})}},void 0,function(o){var i=o.radius;return l()("a",{href:t.get("url"),className:"account__header__avatar",role:"presentation",target:"_blank",rel:"noopener",style:{borderRadius:i+"px",backgroundImage:"url("+(R.a||n?t.get("avatar"):t.get("avatar_static"))+")"},onMouseOver:e.handleMouseOver,onMouseOut:e.handleMouseOut,onFocus:e.handleMouseOver,onBlur:e.handleMouseOut},void 0,l()("span",{style:{display:"none"}},void 0,t.get("acct")))})},t}(C.a),o.propTypes={account:v.a.map.isRequired},i),L=Object(_.g)((r=s=function(e){function t(){return d()(this,t),f()(this,e.apply(this,arguments))}return g()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.intl;if(!t)return null;var o="",i="",a="",s="";R.g!==t.get("id")&&t.getIn(["relationship","followed_by"])?o=l()("span",{className:"account--follows-info"},void 0,l()(_.b,{id:"account.follows_you",defaultMessage:"Follows you"})):R.g!==t.get("id")&&t.getIn(["relationship","blocking"])&&(o=l()("span",{className:"account--follows-info"},void 0,l()(_.b,{id:"account.blocked",defaultMessage:"Blocked"}))),R.g!==t.get("id")&&t.getIn(["relationship","muting"])?i=l()("span",{className:"account--muting-info"},void 0,l()(_.b,{id:"account.muted",defaultMessage:"Muted"})):R.g!==t.get("id")&&t.getIn(["relationship","domain_blocking"])&&(i=l()("span",{className:"account--muting-info"},void 0,l()(_.b,{id:"account.domain_blocked",defaultMessage:"Domain hidden"}))),R.g!==t.get("id")&&(t.getIn(["relationship","requested"])?a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,active:!0,icon:"hourglass",title:n.formatMessage(x.requested),onClick:this.props.onFollow})):t.getIn(["relationship","blocking"])?t.getIn(["relationship","blocking"])&&(a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,icon:"unlock-alt",title:n.formatMessage(x.unblock,{name:t.get("username")}),onClick:this.props.onBlock}))):a=l()("div",{className:"account--action-button"},void 0,l()(k.a,{size:26,icon:t.getIn(["relationship","following"])?"user-times":"user-plus",active:t.getIn(["relationship","following"]),title:n.formatMessage(t.getIn(["relationship","following"])?x.unfollow:x.follow),onClick:this.props.onFollow}))),t.get("moved")&&!t.getIn(["relationship","following"])&&(a=""),t.get("locked")&&(s=l()("i",{className:"fa fa-lock"}));var r={__html:t.get("note_emojified")},c={__html:t.get("display_name_html")},u=t.get("fields")||[],d=t.get("bot")?l()("div",{className:"roles"},void 0,l()("div",{className:"account-role bot"},void 0,l()(_.b,{id:"account.badges.bot",defaultMessage:"Bot"}))):null;return l()("div",{className:N()("account__header",{inactive:!!t.get("moved")}),style:{backgroundImage:"url("+t.get("header")+")"}},void 0,l()("div",{},void 0,l()(D,{account:t}),l()("span",{className:"account__header__display-name",dangerouslySetInnerHTML:c}),l()("span",{className:"account__header__username"},void 0,"@",t.get("acct")," ",s),d,l()("div",{className:"account__header__content",dangerouslySetInnerHTML:r}),u.size>0&&l()("div",{className:"account__header__fields"},void 0,u.map(function(e,t){return l()("dl",{},t,l()("dt",{dangerouslySetInnerHTML:{__html:e.get("name_emojified")},title:e.get("name")}),l()("dd",{dangerouslySetInnerHTML:{__html:e.get("value_emojified")},title:e.get("value_plain")}))})),o,i,a))},t}(C.a),s.propTypes={account:v.a.map,onFollow:y.a.func.isRequired,onBlock:y.a.func.isRequired,intl:y.a.object.isRequired},a=r))||a},890:function(e,t,n){"use strict";n.d(t,"a",function(){return M});var o,i=n(2),a=n.n(i),s=n(1),r=n.n(s),c=n(3),l=n.n(c),u=n(4),d=n.n(u),p=n(0),f=n.n(p),h=n(300),g=n(44),m=n(7),b=n(13),v=Object(m.f)({mention:{id:"account.mention",defaultMessage:"Mention @{name}"},direct:{id:"account.direct",defaultMessage:"Direct message @{name}"},edit_profile:{id:"account.edit_profile",defaultMessage:"Edit profile"},unblock:{id:"account.unblock",defaultMessage:"Unblock @{name}"},unfollow:{id:"account.unfollow",defaultMessage:"Unfollow"},unmute:{id:"account.unmute",defaultMessage:"Unmute @{name}"},block:{id:"account.block",defaultMessage:"Block @{name}"},mute:{id:"account.mute",defaultMessage:"Mute @{name}"},follow:{id:"account.follow",defaultMessage:"Follow"},report:{id:"account.report",defaultMessage:"Report @{name}"},share:{id:"account.share",defaultMessage:"Share @{name}'s profile"},media:{id:"account.media",defaultMessage:"Media"},blockDomain:{id:"account.block_domain",defaultMessage:"Hide everything from {domain}"},unblockDomain:{id:"account.unblock_domain",defaultMessage:"Unhide {domain}"},hideReblogs:{id:"account.hide_reblogs",defaultMessage:"Hide boosts from @{name}"},showReblogs:{id:"account.show_reblogs",defaultMessage:"Show boosts from @{name}"}}),M=Object(m.g)(o=function(e){function t(){var n,o,i;r()(this,t);for(var a=arguments.length,s=Array(a),c=0;c<a;c++)s[c]=arguments[c];return n=o=l()(this,e.call.apply(e,[this].concat(s))),o.handleShare=function(){navigator.share({url:o.props.account.get("url")})},i=n,l()(o,i)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.account,n=e.intl,o=[],i="";if(o.push({text:n.formatMessage(v.mention,{name:t.get("username")}),action:this.props.onMention}),o.push({text:n.formatMessage(v.direct,{name:t.get("username")}),action:this.props.onDirect}),"share"in navigator&&o.push({text:n.formatMessage(v.share,{name:t.get("username")}),action:this.handleShare}),o.push(null),t.get("id")===b.g?o.push({text:n.formatMessage(v.edit_profile),href:"/user-settings"}):(t.getIn(["relationship","following"])&&(t.getIn(["relationship","showing_reblogs"])?o.push({text:n.formatMessage(v.hideReblogs,{name:t.get("username")}),action:this.props.onReblogToggle}):o.push({text:n.formatMessage(v.showReblogs,{name:t.get("username")}),action:this.props.onReblogToggle})),t.getIn(["relationship","muting"])?o.push({text:n.formatMessage(v.unmute,{name:t.get("username")}),action:this.props.onMute}):o.push({text:n.formatMessage(v.mute,{name:t.get("username")}),action:this.props.onMute}),t.getIn(["relationship","blocking"])?o.push({text:n.formatMessage(v.unblock,{name:t.get("username")}),action:this.props.onBlock}):o.push({text:n.formatMessage(v.block,{name:t.get("username")}),action:this.props.onBlock}),o.push({text:n.formatMessage(v.report,{name:t.get("username")}),action:this.props.onReport})),t.get("acct")!==t.get("username")){var s=t.get("acct").split("@")[1];i=a()("div",{className:"account__disclaimer"},void 0,a()(m.b,{id:"account.disclaimer_full",defaultMessage:"Information below may reflect the user's profile incompletely."})," ",a()("a",{target:"_blank",rel:"noopener",href:t.get("url")},void 0,a()(m.b,{id:"account.view_full_profile",defaultMessage:"View full profile"}))),o.push(null),t.getIn(["relationship","domain_blocking"])?o.push({text:n.formatMessage(v.unblockDomain,{domain:s}),action:this.props.onUnblockDomain}):o.push({text:n.formatMessage(v.blockDomain,{domain:s}),action:this.props.onBlockDomain})}return a()("div",{},void 0,i,a()("div",{className:"account__action-bar"},void 0,a()("div",{className:"account__action-bar-dropdown"},void 0,a()(h.a,{items:o,icon:"bars",size:24,direction:"right"})),a()("div",{className:"account__action-bar-links"},void 0,a()(g.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")},void 0,a()("span",{},void 0,a()(m.b,{id:"account.posts",defaultMessage:"Toots"})),a()("strong",{},void 0,a()(m.c,{value:t.get("statuses_count")}))),a()(g.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")+"/following"},void 0,a()("span",{},void 0,a()(m.b,{id:"account.follows",defaultMessage:"Follows"})),a()("strong",{},void 0,a()(m.c,{value:t.get("following_count")}))),a()(g.b,{className:"account__action-bar__tab",to:"/accounts/"+t.get("id")+"/followers"},void 0,a()("span",{},void 0,a()(m.b,{id:"account.followers",defaultMessage:"Followers"})),a()("strong",{},void 0,a()(m.c,{value:t.get("followers_count")}))))))},t}(f.a.PureComponent))||o},891:function(e,t,n){"use strict";n.d(t,"a",function(){return O});var o,i,a=n(2),s=n.n(a),r=n(1),c=n.n(r),l=n(3),u=n.n(l),d=n(4),p=n.n(d),f=n(0),h=(n.n(f),n(5)),g=n.n(h),m=n(14),b=n.n(m),v=n(7),M=n(12),y=n.n(M),_=n(301),k=n(53),O=(i=o=function(e){function t(){var n,o,i;c()(this,t);for(var a=arguments.length,s=Array(a),r=0;r<a;r++)s[r]=arguments[r];return n=o=u()(this,e.call.apply(e,[this].concat(s))),o.handleAccountClick=function(e){0===e.button&&(e.preventDefault(),o.context.router.history.push("/accounts/"+o.props.to.get("id"))),e.stopPropagation()},i=n,u()(o,i)}return p()(t,e),t.prototype.render=function(){var e=this.props,t=e.from,n=e.to,o={__html:t.get("display_name_html")};return s()("div",{className:"account__moved-note"},void 0,s()("div",{className:"account__moved-note__message"},void 0,s()("div",{className:"account__moved-note__icon-wrapper"},void 0,s()("i",{className:"fa fa-fw fa-suitcase account__moved-note__icon"})),s()(v.b,{id:"account.moved_to",defaultMessage:"{name} has moved to:",values:{name:s()("bdi",{},void 0,s()("strong",{dangerouslySetInnerHTML:o}))}})),s()("a",{href:n.get("url"),onClick:this.handleAccountClick,className:"detailed-status__display-name"},void 0,s()("div",{className:"detailed-status__display-avatar"},void 0,s()(_.a,{account:n,friend:t})),s()(k.a,{account:n})))},t}(y.a),o.contextTypes={router:g.a.object},o.propTypes={from:b.a.map.isRequired,to:b.a.map.isRequired},i)}});
|
|
//# sourceMappingURL=account_timeline.js.map
|