forked from mirrors/akkoma
2 lines
No EOL
28 KiB
JavaScript
2 lines
No EOL
28 KiB
JavaScript
webpackJsonp([13,26],{150:function(e,t,n){"use strict";n.d(t,"a",function(){return h});var i=n(2),a=n.n(i),o=n(1),s=n.n(o),r=n(3),l=n.n(r),c=n(4),d=n.n(c),u=n(0),p=n.n(u),h=function(e){function t(){var n,i,a;s()(this,t);for(var o=arguments.length,r=Array(o),c=0;c<o;c++)r[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(r))),i.handleClick=function(){i.props.onClick()},a=n,l()(i,a)}return d()(t,e),t.prototype.render=function(){var e=this.props,t=e.type,n=e.active,i=e.columnHeaderId,o="";return this.props.icon&&(o=a()("i",{className:"fa fa-fw fa-"+this.props.icon+" column-header__icon"})),a()("div",{role:"heading",tabIndex:"0",className:"column-header "+(n?"active":""),onClick:this.handleClick,id:i||null},void 0,o,t)},t}(p.a.PureComponent)},159:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return R});var i,a,o,s,r,l=n(2),c=n.n(l),d=n(1),u=n.n(d),p=n(3),h=n.n(p),f=n(4),g=n.n(f),v=n(0),m=n.n(v),b=n(5),y=n.n(b),_=n(8),M=(n.n(_),n(19)),O=n(6),C=n(33),k=n(10),j=n.n(k),w=n(18),I=Object(O.f)({toggle_visible:{id:"media_gallery.toggle_visible",defaultMessage:"Toggle visibility"}}),x=(a=i=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.handleMouseEnter=function(e){i.hoverToPlay()&&e.target.play()},i.handleMouseLeave=function(e){i.hoverToPlay()&&(e.target.pause(),e.target.currentTime=0)},i.handleClick=function(e){var t=i.props,n=t.index,a=t.onClick;i.context.router&&0===e.button&&(e.preventDefault(),a(n)),e.stopPropagation()},a=n,h()(i,a)}return g()(t,e),t.prototype.hoverToPlay=function(){var e=this.props.attachment;return!w.a&&"gifv"===e.get("type")},t.prototype.render=function(){var e=this.props,t=e.attachment,n=e.index,i=e.size,a=e.standalone,o=50,s=100,r="auto",l="auto",d="auto",u="auto";1===i&&(o=100),(4===i||3===i&&n>0)&&(s=50),2===i?0===n?u="2px":l="2px":3===i?(0===n?u="2px":n>0&&(l="2px"),1===n?d="2px":n>1&&(r="2px")):4===i&&(0!==n&&2!==n||(u="2px"),1!==n&&3!==n||(l="2px"),n<2?d="2px":r="2px");var p="";if("image"===t.get("type")){var h=t.get("preview_url"),f=t.getIn(["meta","small","width"]),g=t.get("url"),v=t.getIn(["meta","original","width"]),m="number"==typeof v&&"number"==typeof f,b=m?g+" "+v+"w, "+h+" "+f+"w":null,y=m?"(min-width: 1025px) "+o/100*320+"px, "+o+"vw":null;p=c()("a",{className:"media-gallery__item-thumbnail",href:t.get("remote_url")||g,onClick:this.handleClick,target:"_blank"},void 0,c()("img",{src:h,srcSet:b,sizes:y,alt:t.get("description"),title:t.get("description")}))}else if("gifv"===t.get("type")){var _=!Object(C.a)()&&w.a;p=c()("div",{className:j()("media-gallery__gifv",{autoplay:_})},void 0,c()("video",{className:"media-gallery__item-gifv-thumbnail","aria-label":t.get("description"),role:"application",src:t.get("url"),onClick:this.handleClick,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,autoPlay:_,loop:!0,muted:!0}),c()("span",{className:"media-gallery__gifv__label"},void 0,"GIF"))}return c()("div",{className:j()("media-gallery__item",{standalone:a}),style:{left:l,top:r,right:u,bottom:d,width:o+"%",height:s+"%"}},t.get("id"),p)},t}(m.a.PureComponent),i.contextTypes={router:y.a.object},i.defaultProps={standalone:!1,index:0,size:1},a),R=Object(O.g)((r=s=function(e){function t(){var n,i,a;u()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=h()(this,e.call.apply(e,[this].concat(s))),i.state={visible:!i.props.sensitive},i.handleOpen=function(){i.setState({visible:!i.state.visible})},i.handleClick=function(e){i.props.onOpenMedia(i.props.media,e)},i.handleRef=function(e){e&&i.isStandaloneEligible()&&i.setState({width:e.offsetWidth})},a=n,h()(i,a)}return g()(t,e),t.prototype.componentWillReceiveProps=function(e){Object(_.is)(e.media,this.props.media)||this.setState({visible:!e.sensitive})},t.prototype.isStandaloneEligible=function(){var e=this.props,t=e.media;return e.standalone&&1===t.size&&t.getIn([0,"meta","small","aspect"])},t.prototype.render=function(){var e=this,t=this.props,n=t.media,i=t.intl,a=t.sensitive,o=t.height,s=this.state,r=s.width,l=s.visible,d=void 0,u={};if(this.isStandaloneEligible()?u.height=!l&&r?r/this.props.media.getIn([0,"meta","small","aspect"]):"":u.height=o,l){var p=n.take(4).size;d=this.isStandaloneEligible()?c()(x,{standalone:!0,onClick:this.handleClick,attachment:n.get(0)}):n.take(4).map(function(t,n){return c()(x,{onClick:e.handleClick,attachment:t,index:n,size:p},t.get("id"))})}else{var h=void 0;h=a?c()(O.b,{id:"status.sensitive_warning",defaultMessage:"Sensitive content"}):c()(O.b,{id:"status.media_hidden",defaultMessage:"Media hidden"}),d=m.a.createElement("button",{className:"media-spoiler",onClick:this.handleOpen,style:u,ref:this.handleRef},c()("span",{className:"media-spoiler__warning"},void 0,h),c()("span",{className:"media-spoiler__trigger"},void 0,c()(O.b,{id:"status.sensitive_toggle",defaultMessage:"Click to view"})))}return c()("div",{className:"media-gallery",style:u},void 0,c()("div",{className:j()("spoiler-button",{"spoiler-button--visible":l})},void 0,c()(M.a,{title:i.formatMessage(I.toggle_visible),icon:l?"eye":"eye-slash",overlay:!0,onClick:this.handleOpen})),d)},t}(m.a.PureComponent),s.defaultProps={standalone:!1},o=r))||o},259:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var i=n(2),a=n.n(i),o=n(1),s=n.n(o),r=n(3),l=n.n(r),c=n(4),d=n.n(c),u=n(42),p=n.n(u),h=n(0),f=n.n(h),g=n(150),v=n(91),m=n(33),b=function(e){function t(){var n,i,a;s()(this,t);for(var o=arguments.length,r=Array(o),c=0;c<o;c++)r[c]=arguments[c];return n=i=l()(this,e.call.apply(e,[this].concat(r))),i.handleHeaderClick=function(){var e=i.node.querySelector(".scrollable");e&&(i._interruptScrollAnimation=Object(v.b)(e))},i.handleScroll=p()(function(){void 0!==i._interruptScrollAnimation&&i._interruptScrollAnimation()},200),i.setRef=function(e){i.node=e},a=n,l()(i,a)}return d()(t,e),t.prototype.scrollTop=function(){var e=this.node.querySelector(".scrollable");e&&(this._interruptScrollAnimation=Object(v.b)(e))},t.prototype.render=function(){var e=this.props,t=e.heading,n=e.icon,i=e.children,o=e.active,s=e.hideHeadingOnMobile,r=t&&(!s||s&&!Object(m.b)(window.innerWidth)),l=r&&t.replace(/ /g,"-"),c=r&&a()(g.a,{icon:n,active:o,type:t,onClick:this.handleHeaderClick,columnHeaderId:l});return f.a.createElement("div",{ref:this.setRef,role:"region","aria-labelledby":l,className:"column",onScroll:this.handleScroll},c,i)},t}(f.a.PureComponent)},261:function(e,t,n){"use strict";var i=n(2),a=n.n(i),o=n(0),s=(n.n(o),n(9)),r=n(153),l=n(69),c=n(15),d=n(43),u=n(22),p=n(57),h=n(151),f=n(31),g=n(6),v=n(18),m=Object(g.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"},muteConfirm:{id:"confirmations.mute.confirm",defaultMessage:"Mute"}}),b=function(){var e=Object(l.e)();return function(t,n){return{status:e(t,n.id)}}},y=function(e,t){var n=t.intl;return{onReply:function(t,n){e(Object(c.O)(t,n))},onModalReblog:function(t){e(Object(d.q)(t))},onReblog:function(t,n){t.get("reblogged")?e(Object(d.t)(t)):n.shiftKey||!v.b?this.onModalReblog(t):e(Object(f.d)("BOOST",{status:t,onReblog:this.onModalReblog}))},onFavourite:function(t){e(t.get("favourited")?Object(d.r)(t):Object(d.m)(t))},onPin:function(t){e(t.get("pinned")?Object(d.s)(t):Object(d.p)(t))},onEmbed:function(t){e(Object(f.d)("EMBED",{url:t.get("url")}))},onDelete:function(t){e(v.d?Object(f.d)("CONFIRM",{message:n.formatMessage(m.deleteMessage),confirm:n.formatMessage(m.deleteConfirm),onConfirm:function(){return e(Object(p.e)(t.get("id")))}}):Object(p.e)(t.get("id")))},onMention:function(t,n){e(Object(c.M)(t,n))},onOpenMedia:function(t,n){e(Object(f.d)("MEDIA",{media:t,index:n}))},onOpenVideo:function(t,n){e(Object(f.d)("VIDEO",{media:t,time:n}))},onBlock:function(t){e(Object(f.d)("CONFIRM",{message:a()(g.b,{id:"confirmations.block.message",defaultMessage:"Are you sure you want to block {name}?",values:{name:a()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(m.blockConfirm),onConfirm:function(){return e(Object(u.r)(t.get("id")))}}))},onReport:function(t){e(Object(h.i)(t.get("account"),t))},onMute:function(t){e(Object(f.d)("CONFIRM",{message:a()(g.b,{id:"confirmations.mute.message",defaultMessage:"Are you sure you want to mute {name}?",values:{name:a()("strong",{},void 0,"@",t.get("acct"))}}),confirm:n.formatMessage(m.muteConfirm),onConfirm:function(){return e(Object(u.B)(t.get("id")))}}))},onMuteConversation:function(t){e(t.get("muted")?Object(p.h)(t.get("id")):Object(p.g)(t.get("id")))}}};t.a=Object(g.g)(Object(s.connect)(b,y)(r.a))},316:function(e,t,n){"use strict";n.d(t,"a",function(){return M});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),c=n(3),d=n.n(c),u=n(4),p=n.n(u),h=n(0),f=n.n(h),g=n(317),v=n.n(g),m=n(10),b=n.n(m),y=function(e){return e.split(".").map(function(e){return 0===e.indexOf("xn--")?v.a.decode(e.slice("xn--".length)):e}).join(".")},_=function(e){var t=document.createElement("a");return t.href=e,t.hostname},M=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.state={width:0},i.setRef=function(e){e&&i.setState({width:e.offsetWidth})},a=n,d()(i,a)}return p()(t,e),t.prototype.renderLink=function(){var e=this.props,t=e.card,n=e.maxDescription,i="",a=t.get("provider_name");t.get("image")&&(i=s()("div",{className:"status-card__image"},void 0,s()("img",{src:t.get("image"),alt:t.get("title"),className:"status-card__image-image",width:t.get("width"),height:t.get("height")}))),a.length<1&&(a=y(_(t.get("url"))));var o=b()("status-card",{horizontal:t.get("width")>t.get("height")});return s()("a",{href:t.get("url"),className:o,target:"_blank",rel:"noopener"},void 0,i,s()("div",{className:"status-card__content"},void 0,s()("strong",{className:"status-card__title",title:t.get("title")},void 0,t.get("title")),s()("p",{className:"status-card__description"},void 0,(t.get("description")||"").substring(0,n)),s()("span",{className:"status-card__host"},void 0,a)))},t.prototype.renderPhoto=function(){var e=this.props.card;return s()("a",{href:e.get("url"),className:"status-card-photo",target:"_blank",rel:"noopener"},void 0,s()("img",{src:e.get("url"),alt:e.get("title"),width:e.get("width"),height:e.get("height")}))},t.prototype.renderVideo=function(){var e=this.props.card,t={__html:e.get("html")},n=this.state.width,i=e.get("width")/e.get("height"),a=e.get("width")>e.get("height")?n/i:n*i;return f.a.createElement("div",{ref:this.setRef,className:"status-card-video",dangerouslySetInnerHTML:t,style:{height:a}})},t.prototype.render=function(){var e=this.props.card;if(null===e)return null;switch(e.get("type")){case"link":return this.renderLink();case"photo":return this.renderPhoto();case"video":return this.renderVideo();case"rich":default:return null}},t}(f.a.PureComponent),i.defaultProps={maxDescription:50},a)},317:function(e,t,n){(function(e,i){var a;!function(o){function s(e){throw new RangeError(P[e])}function r(e,t){for(var n=e.length,i=[];n--;)i[n]=t(e[n]);return i}function l(e,t){var n=e.split("@"),i="";return n.length>1&&(i=n[0]+"@",e=n[1]),e=e.replace(S,"."),i+r(e.split("."),t).join(".")}function c(e){for(var t,n,i=[],a=0,o=e.length;a<o;)t=e.charCodeAt(a++),t>=55296&&t<=56319&&a<o?(n=e.charCodeAt(a++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),a--)):i.push(t);return i}function d(e){return r(e,function(e){var t="";return e>65535&&(e-=65536,t+=A(e>>>10&1023|55296),e=56320|1023&e),t+=A(e)}).join("")}function u(e){return e-48<10?e-22:e-65<26?e-65:e-97<26?e-97:M}function p(e,t){return e+22+75*(e<26)-((0!=t)<<5)}function h(e,t,n){var i=0;for(e=n?E(e/j):e>>1,e+=E(e/t);e>D*C>>1;i+=M)e=E(e/D);return E(i+(D+1)*e/(e+k))}function f(e){var t,n,i,a,o,r,l,c,p,f,g=[],v=e.length,m=0,b=I,y=w;for(n=e.lastIndexOf(x),n<0&&(n=0),i=0;i<n;++i)e.charCodeAt(i)>=128&&s("not-basic"),g.push(e.charCodeAt(i));for(a=n>0?n+1:0;a<v;){for(o=m,r=1,l=M;a>=v&&s("invalid-input"),c=u(e.charCodeAt(a++)),(c>=M||c>E((_-m)/r))&&s("overflow"),m+=c*r,p=l<=y?O:l>=y+C?C:l-y,!(c<p);l+=M)f=M-p,r>E(_/f)&&s("overflow"),r*=f;t=g.length+1,y=h(m-o,t,0==o),E(m/t)>_-b&&s("overflow"),b+=E(m/t),m%=t,g.splice(m++,0,b)}return d(g)}function g(e){var t,n,i,a,o,r,l,d,u,f,g,v,m,b,y,k=[];for(e=c(e),v=e.length,t=I,n=0,o=w,r=0;r<v;++r)(g=e[r])<128&&k.push(A(g));for(i=a=k.length,a&&k.push(x);i<v;){for(l=_,r=0;r<v;++r)(g=e[r])>=t&&g<l&&(l=g);for(m=i+1,l-t>E((_-n)/m)&&s("overflow"),n+=(l-t)*m,t=l,r=0;r<v;++r)if(g=e[r],g<t&&++n>_&&s("overflow"),g==t){for(d=n,u=M;f=u<=o?O:u>=o+C?C:u-o,!(d<f);u+=M)y=d-f,b=M-f,k.push(A(p(f+y%b,0))),d=E(y/b);k.push(A(p(d,0))),o=h(n,m,i==a),n=0,++i}++n,++t}return k.join("")}function v(e){return l(e,function(e){return R.test(e)?f(e.slice(4).toLowerCase()):e})}function m(e){return l(e,function(e){return N.test(e)?"xn--"+g(e):e})}var b=("object"==typeof t&&t&&t.nodeType,"object"==typeof e&&e&&e.nodeType,"object"==typeof i&&i);var y,_=2147483647,M=36,O=1,C=26,k=38,j=700,w=72,I=128,x="-",R=/^xn--/,N=/[^\x20-\x7E]/,S=/[\x2E\u3002\uFF0E\uFF61]/g,P={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},D=M-O,E=Math.floor,A=String.fromCharCode;y={version:"1.4.1",ucs2:{decode:c,encode:d},decode:f,encode:g,toASCII:m,toUnicode:v},void 0!==(a=function(){return y}.call(t,n,t,e))&&(e.exports=a)}()}).call(t,n(71)(e),n(44))},758:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n.d(t,"default",function(){return W});var i,a,o,s,r=n(2),l=n.n(r),c=n(1),d=n.n(c),u=n(3),p=n.n(u),h=n(4),f=n.n(h),g=n(0),v=n.n(g),m=n(9),b=n(5),y=n.n(b),_=n(10),M=n.n(_),O=n(12),C=n.n(O),k=n(57),j=n(780),w=n(892),I=n(895),x=n(259),R=n(43),N=n(15),S=n(151),P=n(69),D=n(152),E=n(779),A=n(261),F=n(31),H=n(6),T=n(11),z=n.n(T),V=n(162),q=(n.n(V),n(18)),B=n(154),U=Object(H.f)({deleteConfirm:{id:"confirmations.delete.confirm",defaultMessage:"Delete"},deleteMessage:{id:"confirmations.delete.message",defaultMessage:"Are you sure you want to delete this status?"}}),L=function(){var e=Object(P.e)();return function(t,n){return{status:e(t,n.params.statusId),ancestorsIds:t.getIn(["contexts","ancestors",n.params.statusId]),descendantsIds:t.getIn(["contexts","descendants",n.params.statusId])}}},W=(i=Object(m.connect)(L),Object(H.g)(a=i((s=o=function(e){function t(){var n,i,a;d()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=p()(this,e.call.apply(e,[this].concat(s))),i.state={fullscreen:!1},i.handleFavouriteClick=function(e){e.get("favourited")?i.props.dispatch(Object(R.r)(e)):i.props.dispatch(Object(R.m)(e))},i.handlePin=function(e){e.get("pinned")?i.props.dispatch(Object(R.s)(e)):i.props.dispatch(Object(R.p)(e))},i.handleReplyClick=function(e){i.props.dispatch(Object(N.O)(e,i.context.router.history))},i.handleModalReblog=function(e){i.props.dispatch(Object(R.q)(e))},i.handleReblogClick=function(e,t){e.get("reblogged")?i.props.dispatch(Object(R.t)(e)):t.shiftKey||!q.b?i.handleModalReblog(e):i.props.dispatch(Object(F.d)("BOOST",{status:e,onReblog:i.handleModalReblog}))},i.handleDeleteClick=function(e){var t=i.props,n=t.dispatch,a=t.intl;n(q.d?Object(F.d)("CONFIRM",{message:a.formatMessage(U.deleteMessage),confirm:a.formatMessage(U.deleteConfirm),onConfirm:function(){return n(Object(k.e)(e.get("id")))}}):Object(k.e)(e.get("id")))},i.handleMentionClick=function(e,t){i.props.dispatch(Object(N.M)(e,t))},i.handleOpenMedia=function(e,t){i.props.dispatch(Object(F.d)("MEDIA",{media:e,index:t}))},i.handleOpenVideo=function(e,t){i.props.dispatch(Object(F.d)("VIDEO",{media:e,time:t}))},i.handleReport=function(e){i.props.dispatch(Object(S.i)(e.get("account"),e))},i.handleEmbed=function(e){i.props.dispatch(Object(F.d)("EMBED",{url:e.get("url")}))},i.handleHotkeyMoveUp=function(){i.handleMoveUp(i.props.status.get("id"))},i.handleHotkeyMoveDown=function(){i.handleMoveDown(i.props.status.get("id"))},i.handleHotkeyReply=function(e){e.preventDefault(),i.handleReplyClick(i.props.status)},i.handleHotkeyFavourite=function(){i.handleFavouriteClick(i.props.status)},i.handleHotkeyBoost=function(){i.handleReblogClick(i.props.status)},i.handleHotkeyMention=function(e){e.preventDefault(),i.handleMentionClick(i.props.status)},i.handleHotkeyOpenProfile=function(){i.context.router.history.push("/accounts/"+i.props.status.getIn(["account","id"]))},i.handleMoveUp=function(e){var t=i.props,n=t.status,a=t.ancestorsIds,o=t.descendantsIds;if(e===n.get("id"))i._selectChild(a.size-1);else{var s=a.indexOf(e);-1===s?(s=o.indexOf(e),i._selectChild(a.size+s)):i._selectChild(s-1)}},i.handleMoveDown=function(e){var t=i.props,n=t.status,a=t.ancestorsIds,o=t.descendantsIds;if(e===n.get("id"))i._selectChild(a.size+1);else{var s=a.indexOf(e);-1===s?(s=o.indexOf(e),i._selectChild(a.size+s+2)):i._selectChild(s+1)}},i.setRef=function(e){i.node=e},i.onFullScreenChange=function(){i.setState({fullscreen:Object(B.d)()})},a=n,p()(i,a)}return f()(t,e),t.prototype.componentWillMount=function(){this.props.dispatch(Object(k.f)(this.props.params.statusId))},t.prototype.componentDidMount=function(){Object(B.a)(this.onFullScreenChange)},t.prototype.componentWillReceiveProps=function(e){e.params.statusId!==this.props.params.statusId&&e.params.statusId&&(this._scrolledIntoView=!1,this.props.dispatch(Object(k.f)(e.params.statusId)))},t.prototype._selectChild=function(e){var t=this.node.querySelectorAll(".focusable")[e];t&&t.focus()},t.prototype.renderChildren=function(e){var t=this;return e.map(function(e){return l()(A.a,{id:e,onMoveUp:t.handleMoveUp,onMoveDown:t.handleMoveDown},e)})},t.prototype.componentDidUpdate=function(){if(!this._scrolledIntoView){var e=this.props,t=e.status,n=e.ancestorsIds;if(t&&n&&n.size>0){this.node.querySelectorAll(".focusable")[n.size-1].scrollIntoView(!0),this._scrolledIntoView=!0}}},t.prototype.componentWillUnmount=function(){Object(B.b)(this.onFullScreenChange)},t.prototype.render=function(){var e=void 0,t=void 0,n=this.props,i=n.status,a=n.ancestorsIds,o=n.descendantsIds,s=this.state.fullscreen;if(null===i)return l()(x.a,{},void 0,l()(E.a,{}),l()(j.a,{}));a&&a.size>0&&(e=l()("div",{},void 0,this.renderChildren(a))),o&&o.size>0&&(t=l()("div",{},void 0,this.renderChildren(o)));var r={moveUp:this.handleHotkeyMoveUp,moveDown:this.handleHotkeyMoveDown,reply:this.handleHotkeyReply,favourite:this.handleHotkeyFavourite,boost:this.handleHotkeyBoost,mention:this.handleHotkeyMention,openProfile:this.handleHotkeyOpenProfile};return l()(x.a,{},void 0,l()(E.a,{}),l()(D.a,{scrollKey:"thread"},void 0,v.a.createElement("div",{className:M()("scrollable","detailed-status__wrapper",{fullscreen:s}),ref:this.setRef},e,l()(V.HotKeys,{handlers:r},void 0,l()("div",{className:"focusable",tabIndex:"0"},void 0,l()(w.a,{status:i,onOpenVideo:this.handleOpenVideo,onOpenMedia:this.handleOpenMedia}),l()(I.a,{status:i,onReply:this.handleReplyClick,onFavourite:this.handleFavouriteClick,onReblog:this.handleReblogClick,onDelete:this.handleDeleteClick,onMention:this.handleMentionClick,onReport:this.handleReport,onPin:this.handlePin,onEmbed:this.handleEmbed}))),t)))},t}(z.a),o.contextTypes={router:y.a.object},o.propTypes={params:y.a.object.isRequired,dispatch:y.a.func.isRequired,status:C.a.map,ancestorsIds:C.a.list,descendantsIds:C.a.list,intl:y.a.object.isRequired},a=s))||a)||a)},779:function(e,t,n){"use strict";n.d(t,"a",function(){return b});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),c=n(3),d=n.n(c),u=n(4),p=n.n(u),h=n(0),f=n.n(h),g=n(6),v=n(5),m=n.n(v),b=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.handleClick=function(){window.history&&1===window.history.length?i.context.router.history.push("/"):i.context.router.history.goBack()},a=n,d()(i,a)}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}(f.a.PureComponent),i.contextTypes={router:m.a.object},a)},780:function(e,t,n){"use strict";var i=n(2),a=n.n(i),o=n(0),s=(n.n(o),n(6)),r=function(){return a()("div",{className:"missing-indicator"},void 0,a()("div",{},void 0,a()(s.b,{id:"missing_indicator.label",defaultMessage:"Not found"})))};t.a=r},892:function(e,t,n){"use strict";n.d(t,"a",function(){return R});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),c=n(3),d=n.n(c),u=n(4),p=n.n(u),h=n(0),f=(n.n(h),n(5)),g=n.n(f),v=n(12),m=n.n(v),b=n(55),y=n(56),_=n(107),M=n(159),O=n(893),C=n(58),k=n(6),j=n(894),w=n(11),I=n.n(w),x=n(108),R=(a=i=function(e){function t(){var n,i,a;l()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=d()(this,e.call.apply(e,[this].concat(s))),i.handleAccountClick=function(e){0===e.button&&(e.preventDefault(),i.context.router.history.push("/accounts/"+i.props.status.getIn(["account","id"]))),e.stopPropagation()},i.handleOpenVideo=function(e){i.props.onOpenVideo(i.props.status.getIn(["media_attachments",0]),e)},a=n,d()(i,a)}return p()(t,e),t.prototype.render=function(){var e=this.props.status.get("reblog")?this.props.status.get("reblog"):this.props.status,t="",n="",i="",a="retweet";if(e.get("media_attachments").size>0)if(e.get("media_attachments").some(function(e){return"unknown"===e.get("type")}))t=s()(O.a,{media:e.get("media_attachments")});else if("video"===e.getIn(["media_attachments",0,"type"])){var o=e.getIn(["media_attachments",0]);t=s()(x.default,{preview:o.get("preview_url"),src:o.get("url"),width:300,height:150,onOpenVideo:this.handleOpenVideo,sensitive:e.get("sensitive")})}else t=s()(M.default,{standalone:!0,sensitive:e.get("sensitive"),media:e.get("media_attachments"),height:300,onOpenMedia:this.props.onOpenMedia});else 0===e.get("spoiler_text").length&&(t=s()(j.a,{statusId:e.get("id")}));return e.get("application")&&(n=s()("span",{},void 0," · ",s()("a",{className:"detailed-status__application",href:e.getIn(["application","website"]),target:"_blank",rel:"noopener"},void 0,e.getIn(["application","name"])))),"direct"===e.get("visibility")?a="envelope":"private"===e.get("visibility")&&(a="lock"),i="private"===e.get("visibility")?s()("i",{className:"fa fa-"+a}):s()(C.b,{to:"/statuses/"+e.get("id")+"/reblogs",className:"detailed-status__link"},void 0,s()("i",{className:"fa fa-"+a}),s()("span",{className:"detailed-status__reblogs"},void 0,s()(k.c,{value:e.get("reblogs_count")}))),s()("div",{className:"detailed-status"},void 0,s()("a",{href:e.getIn(["account","url"]),onClick:this.handleAccountClick,className:"detailed-status__display-name"},void 0,s()("div",{className:"detailed-status__display-avatar"},void 0,s()(b.a,{account:e.get("account"),size:48})),s()(y.a,{account:e.get("account")})),s()(_.a,{status:e}),t,s()("div",{className:"detailed-status__meta"},void 0,s()("a",{className:"detailed-status__datetime",href:e.get("url"),target:"_blank",rel:"noopener"},void 0,s()(k.a,{value:new Date(e.get("created_at")),hour12:!1,year:"numeric",month:"short",day:"2-digit",hour:"2-digit",minute:"2-digit"})),n," · ",i," · ",s()(C.b,{to:"/statuses/"+e.get("id")+"/favourites",className:"detailed-status__link"},void 0,s()("i",{className:"fa fa-star"}),s()("span",{className:"detailed-status__favorites"},void 0,s()(k.c,{value:e.get("favourites_count")})))))},t}(I.a),i.contextTypes={router:g.a.object},i.propTypes={status:m.a.map.isRequired,onOpenMedia:g.a.func.isRequired,onOpenVideo:g.a.func.isRequired},a)},893:function(e,t,n){"use strict";n.d(t,"a",function(){return y});var i,a,o=n(2),s=n.n(o),r=n(1),l=n.n(r),c=n(3),d=n.n(c),u=n(4),p=n.n(u),h=n(0),f=(n.n(h),n(12)),g=n.n(f),v=n(11),m=n.n(v),b=function(e){return e.split("/").pop().split("#")[0].split("?")[0]},y=(a=i=function(e){function t(){return l()(this,t),d()(this,e.apply(this,arguments))}return p()(t,e),t.prototype.render=function(){var e=this.props.media;return s()("div",{className:"attachment-list"},void 0,s()("div",{className:"attachment-list__icon"},void 0,s()("i",{className:"fa fa-link"})),s()("ul",{className:"attachment-list__list"},void 0,e.map(function(e){return s()("li",{},e.get("id"),s()("a",{href:e.get("remote_url"),target:"_blank",rel:"noopener"},void 0,b(e.get("remote_url"))))})))},t}(m.a),i.propTypes={media:g.a.list.isRequired},a)},894:function(e,t,n){"use strict";var i=n(9),a=n(316),o=function(e,t){var n=t.statusId;return{card:e.getIn(["cards",n],null)}};t.a=Object(i.connect)(o)(a.a)},895:function(e,t,n){"use strict";n.d(t,"a",function(){return C});var i,a,o,s=n(2),r=n.n(s),l=n(1),c=n.n(l),d=n(3),u=n.n(d),p=n(4),h=n.n(p),f=n(0),g=n.n(f),v=n(5),m=n.n(v),b=n(19),y=n(284),_=n(6),M=n(18),O=Object(_.f)({delete:{id:"status.delete",defaultMessage:"Delete"},mention:{id:"status.mention",defaultMessage:"Mention @{name}"},reply:{id:"status.reply",defaultMessage:"Reply"},reblog:{id:"status.reblog",defaultMessage:"Boost"},cannot_reblog:{id:"status.cannot_reblog",defaultMessage:"This post cannot be boosted"},favourite:{id:"status.favourite",defaultMessage:"Favourite"},report:{id:"status.report",defaultMessage:"Report @{name}"},share:{id:"status.share",defaultMessage:"Share"},pin:{id:"status.pin",defaultMessage:"Pin on profile"},unpin:{id:"status.unpin",defaultMessage:"Unpin from profile"},embed:{id:"status.embed",defaultMessage:"Embed"}}),C=Object(_.g)((o=a=function(e){function t(){var n,i,a;c()(this,t);for(var o=arguments.length,s=Array(o),r=0;r<o;r++)s[r]=arguments[r];return n=i=u()(this,e.call.apply(e,[this].concat(s))),i.handleReplyClick=function(){i.props.onReply(i.props.status)},i.handleReblogClick=function(e){i.props.onReblog(i.props.status,e)},i.handleFavouriteClick=function(){i.props.onFavourite(i.props.status)},i.handleDeleteClick=function(){i.props.onDelete(i.props.status)},i.handleMentionClick=function(){i.props.onMention(i.props.status.get("account"),i.context.router.history)},i.handleReport=function(){i.props.onReport(i.props.status)},i.handlePinClick=function(){i.props.onPin(i.props.status)},i.handleShare=function(){navigator.share({text:i.props.status.get("search_index"),url:i.props.status.get("url")})},i.handleEmbed=function(){i.props.onEmbed(i.props.status)},a=n,u()(i,a)}return h()(t,e),t.prototype.render=function(){var e=this.props,t=e.status,n=e.intl,i=["public","unlisted"].includes(t.get("visibility")),a=[];i&&a.push({text:n.formatMessage(O.embed),action:this.handleEmbed}),M.e===t.getIn(["account","id"])?(i&&a.push({text:n.formatMessage(t.get("pinned")?O.unpin:O.pin),action:this.handlePinClick}),a.push({text:n.formatMessage(O.delete),action:this.handleDeleteClick})):(a.push({text:n.formatMessage(O.mention,{name:t.getIn(["account","username"])}),action:this.handleMentionClick}),a.push(null),a.push({text:n.formatMessage(O.report,{name:t.getIn(["account","username"])}),action:this.handleReport}));var o="share"in navigator&&"public"===t.get("visibility")&&r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{title:n.formatMessage(O.share),icon:"share-alt",onClick:this.handleShare})),s="retweet";"direct"===t.get("visibility")?s="envelope":"private"===t.get("visibility")&&(s="lock");var l="direct"===t.get("visibility")||"private"===t.get("visibility");return r()("div",{className:"detailed-status__action-bar"},void 0,r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{title:n.formatMessage(O.reply),icon:null===t.get("in_reply_to_id",null)?"reply":"reply-all",onClick:this.handleReplyClick})),r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{disabled:l,active:t.get("reblogged"),title:l?n.formatMessage(O.cannot_reblog):n.formatMessage(O.reblog),icon:s,onClick:this.handleReblogClick})),r()("div",{className:"detailed-status__button"},void 0,r()(b.a,{animate:!0,active:t.get("favourited"),title:n.formatMessage(O.favourite),icon:"star",onClick:this.handleFavouriteClick,activeStyle:{color:"#ca8f04"}})),o,r()("div",{className:"detailed-status__action-bar-dropdown"},void 0,r()(y.a,{size:18,icon:"ellipsis-h",items:a,direction:"left",ariaLabel:"More"})))},t}(g.a.PureComponent),a.contextTypes={router:m.a.object},i=o))||i}});
|
|
//# sourceMappingURL=status-1f1807fdb4d1fd6daf40.js.map
|