pixelfed/public/js/timeline.js
2019-11-24 16:18:00 -07:00

1 line
No EOL
72 KiB
JavaScript
Vendored
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(window.webpackJsonp=window.webpackJsonp||[]).push([[21],{"+27z":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.text-lighter[data-v-acffc3f6] {\n\tcolor:#B8C2CC !important;\n}\n.modal-body[data-v-acffc3f6] {\n\tpadding: 0;\n}\n",""])},"/1mt":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.postPresenterContainer[data-v-5ffdb4db] {\n\tdisplay: flex;\n\talign-items: center;\n\tbackground: #fff;\n}\n.word-break[data-v-5ffdb4db] {\n\tword-break: break-all;\n}\n.small .custom-control-label[data-v-5ffdb4db] {\n\tpadding-top: 3px;\n}\n.reply-btn[data-v-5ffdb4db] {\n\tposition: absolute;\n\tbottom: 12px;\n\tright: 20px;\n\twidth: 60px;\n\ttext-align: center;\n\tborder-radius: 0 3px 3px 0;\n}\n.emoji-reactions .nav-item[data-v-5ffdb4db] {\n\tfont-size: 1.2rem;\n\tpadding: 9px;\n\tcursor: pointer;\n}\n.emoji-reactions[data-v-5ffdb4db]::-webkit-scrollbar {\n\twidth: 0px;\n\theight: 0px;\n\tbackground: transparent;\n}\n.reply-btn[disabled][data-v-5ffdb4db] {\n\topacity: .3;\n\tcolor: #3897f0;\n}\n",""])},"2Jpm":function(t,e,s){"use strict";s.r(e);var a={props:["status"],methods:{playOrPause:function(t){var e=t.target;1==e.getAttribute("playing")?(e.removeAttribute("playing"),e.pause()):(e.setAttribute("playing",1),e.play())}}},i=s("KHd+"),o=Object(i.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("div",{staticClass:"embed-responsive embed-responsive-1by1"},[s("video",{staticClass:"video",attrs:{preload:"none",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id},on:{click:function(e){return t.playOrPause(e)}}},[s("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):s("div",{staticClass:"embed-responsive embed-responsive-16by9"},[s("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[s("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])},[],!1,null,null,null);e.default=o.exports},6:function(t,e,s){t.exports=s("KqaD")},"9tPo":function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var s=e.protocol+"//"+e.host,a=s+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?s+o:a+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},"9wGH":function(t,e,s){"use strict";s.r(e);var a={props:["status"]},i=s("KHd+"),o=Object(i.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,function(t,e){return s("b-carousel-slide",{key:t.id+"-media"},[s("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[s("source",{attrs:{src:t.url,type:t.mime}})])])}),1)],1)]):s("div",[s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,function(t,e){return s("b-carousel-slide",{key:t.id+"-media"},[s("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:t.description,width:"100%",height:"100%",poster:t.preview_url},slot:"img"},[s("source",{attrs:{src:t.url,type:t.mime}})])])}),1)],1)},[],!1,null,null,null);e.default=o.exports},BoLb:function(t,e,s){var a=s("/1mt");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},GlRX:function(t,e,s){"use strict";var a=s("Kz1s");s.n(a).a},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var s=function(t,e){var s=t[1]||"",a=t[3];if(!a)return s;if(e&&"function"==typeof btoa){var i=(n=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),o=a.sources.map(function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"});return[s].concat(o).concat([i]).join("\n")}var n;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s}).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(a[o]=!0)}for(i=0;i<t.length;i++){var n=t[i];"number"==typeof n[0]&&a[n[0]]||(s&&!n[2]?n[2]=s:s&&(n[2]="("+n[2]+") and ("+s+")"),e.push(n))}},e}},"KHd+":function(t,e,s){"use strict";function a(t,e,s,a,i,o,n,r){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),a&&(c.functional=!0),o&&(c._scopeId="data-v-"+o),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},c._ssrRegister=l):i&&(l=r?function(){i.call(this,this.$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}s.d(e,"a",function(){return a})},KhVi:function(t,e,s){"use strict";s.r(e);function a(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e<t.length;e++)s[e]=t[e];return s}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var i={props:["scope","layout"],data:function(){return{ids:[],config:window.App.config,page:2,feed:[],profile:{},min_id:0,max_id:0,suggestions:{},loading:!0,replies:[],replyId:null,modes:{mod:!1,dark:!1,notify:!0,distractionFree:!1},followers:[],followerCursor:1,followerMore:!0,following:[],followingCursor:1,followingMore:!0,lightboxMedia:!1,showSuggestions:!1,showReadMore:!0,replyStatus:{},replyText:"",emoji:window.App.util.emoji,showHashtagPosts:!1,hashtagPosts:[],hashtagPostsName:"",ctxMenuStatus:!1,ctxMenuRelationship:!1,ctxEmbedPayload:!1,copiedEmbed:!1,showTips:!0}},beforeMount:function(){this.fetchProfile(),this.fetchTimelineApi()},mounted:function(){0!=$('link[data-stylesheet="dark"]').length&&(this.modes.dark=!0),"false"==localStorage.getItem("pf_metro_ui.exp.rec")?this.showSuggestions=!1:this.showSuggestions=!0,"false"==localStorage.getItem("pf_metro_ui.exp.rm")?this.showReadMore=!1:this.showReadMore=!0,"true"==localStorage.getItem("pf_metro_ui.exp.df")?this.modes.distractionFree=!0:this.modes.distractionFree=!1,"false"==localStorage.getItem("metro-tips")&&(this.showTips=!1),this.$nextTick(function(){$('[data-toggle="tooltip"]').tooltip()})},updated:function(){1==this.showReadMore&&pixelfed.readmore()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then(function(e){t.profile=e.data,1==t.profile.is_admin&&(t.modes.mod=!0)}).catch(function(t){swal("Oops, something went wrong","Please reload the page.","error")})},fetchTimelineApi:function(){var t=this,e=!1;switch(this.scope){case"home":e="/api/pixelfed/v1/timelines/home";break;case"local":e="/api/pixelfed/v1/timelines/public";break;case"network":e="/api/pixelfed/v1/timelines/network"}axios.get(e,{params:{max_id:this.max_id,limit:3}}).then(function(e){var s,i=e.data;(s=t.feed).push.apply(s,a(i));var o=i.map(function(t){return t.id});t.ids=o,t.min_id=Math.max.apply(Math,a(o)).toString(),t.max_id=Math.min.apply(Math,a(o)).toString(),t.loading=!1,$(".timeline .pagination").removeClass("d-none"),0==t.hashtagPosts.length&&t.fetchHashtagPosts()}).catch(function(t){swal("Oops, something went wrong","Please reload the page.","error")})},infiniteTimeline:function(t){var e=this;if(this.loading)t.complete();else{this.page>40&&(this.loading=!1,t.complete());var s=!1;switch(this.scope){case"home":s="/api/pixelfed/v1/timelines/home";break;case"local":s="/api/pixelfed/v1/timelines/public";break;case"network":s="/api/pixelfed/v1/timelines/network"}axios.get(s,{params:{max_id:this.max_id,limit:6}}).then(function(s){if(s.data.length&&0==e.loading){var i=s.data,o=e;i.forEach(function(t,e){-1==o.ids.indexOf(t.id)&&(o.feed.push(t),o.ids.push(t.id))}),e.min_id=Math.max.apply(Math,a(e.ids)).toString(),e.max_id=Math.min.apply(Math,a(e.ids)).toString(),e.page+=1,t.loaded(),e.loading=!1}else t.complete()}).catch(function(s){e.loading=!1,t.complete()})}},reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},commentFocus:function(t,e){this.replyId==t.id||t.comments_disabled||(this.replies={},this.replyStatus={},this.replyText="",this.replyId=t.id,this.replyStatus=t,this.fetchStatusComments(t,""))},likeStatus:function(t){if(0!=$("body").hasClass("loggedIn")){var e=t.favourites_count;t.favourited=!t.favourited,axios.post("/i/like",{item:t.id}).then(function(e){t.favourites_count=e.data.count}).catch(function(s){t.favourited=!t.favourited,t.favourites_count=e,swal("Error","Something went wrong, please try again later.","error")})}},shareStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/share",{item:t.id}).then(function(e){t.reblogs_count=e.data.count,t.reblogged=!t.reblogged}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},redirect:function(t){window.location.href=t},statusOwner:function(t){return t.account.id==this.profile.id},fetchStatusComments:function(t,e){var s=this;axios.get("/api/v2/status/"+t.id+"/replies").then(function(t){var e=t.data.filter(function(t){return 0==t.sensitive});s.replies=_.reverse(e)}).catch(function(t){})},muteProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully muted "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:t.account.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.account.id!==t.account.id}),swal("Success","You have successfully blocked "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},deletePost:function(t){var e=this;0!=$("body").hasClass("loggedIn")&&0!=this.ownerOrAdmin(t)&&0!=window.confirm("Are you sure you want to delete this post?")&&axios.post("/i/delete",{type:"status",item:t.id}).then(function(s){e.feed=e.feed.filter(function(e){return e.id!=t.id}),e.$refs.ctxModal.hide()}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},commentSubmit:function(t,e){var s=this,a=t.id,i=this.replyText;axios.post("/i/comment",{item:a,comment:i}).then(function(t){s.replyText="",s.replies.push(t.data.entity)})},moderatePost:function(t,e,s){var a=t.account.username;switch(e){case"autocw":var i="Are you sure you want to enforce CW for "+a+" ?";swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully enforced CW for "+a,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"noautolink":i="Are you sure you want to disable auto linking for "+a+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled autolinking for "+a,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"unlisted":i="Are you sure you want to unlist from timelines for "+a+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully unlisted for "+a,"success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"disable":i="Are you sure you want to disable "+a+"s account ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully disabled "+a+"s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})});break;case"suspend":i="Are you sure you want to suspend "+a+"s account ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0}).then(function(s){s&&axios.post("/api/v2/moderator/action",{action:e,item_id:t.id,item_type:"status"}).then(function(t){swal("Success","Successfully suspend "+a+"s account","success")}).catch(function(t){swal("Error","Something went wrong, please try again later.","error")})})}},followingModal:function(){var t=this;this.following.length>0?this.$refs.followingModal.show():(axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){t.following=e.data,t.followingCursor++}),res.data.length<10&&(this.followingMore=!1),this.$refs.followingModal.show())},followersModal:function(){var t=this;this.followers.length>0?this.$refs.followerModal.show():(axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){t.followers=e.data,t.followerCursor++}),res.data.length<10&&(this.followerMore=!1),this.$refs.followerModal.show())},followingLoadMore:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor}}).then(function(e){var s;e.data.length>0&&((s=t.following).push.apply(s,a(e.data)),t.followingCursor++);e.data.length<10&&(t.followingMore=!1)})},followersLoadMore:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then(function(e){var s;e.data.length>0&&((s=t.followers).push.apply(s,a(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)})},lightbox:function(t){this.lightboxMedia=t.media_attachments[0],this.$refs.lightboxModal.show()},expLc:function(t){return 0==this.config.ab.lc||1==this.statusOwner(t)},expRec:function(){},expRecFollow:function(t,e){},followAction:function(t){var e=this,s=t.account.id;axios.post("/i/follow",{item:s}).then(function(a){e.feed.forEach(function(t){t.account.id==s&&(t.account.relationship.following=!t.account.relationship.following)});var i=t.account.acct;t.account.relationship.following?swal("Follow successful!","You are now following "+i,"success"):swal("Unfollow successful!","You are no longer following "+i,"success")}).catch(function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")})},owner:function(t){return this.profile.id===t.account.id},admin:function(){return 1==this.profile.is_admin},ownerOrAdmin:function(t){return this.owner(t)||this.admin()},hideSuggestions:function(){localStorage.setItem("pf_metro_ui.exp.rec",!1),this.showSuggestions=!1},emojiReaction:function(t){var e=event.target.innerText;0==this.replyText.length?(this.replyText=e+" ",$('textarea[name="comment"]').focus()):(this.replyText+=e+" ",$('textarea[name="comment"]').focus())},refreshSuggestions:function(){},fetchHashtagPosts:function(){var t=this;axios.get("/api/local/discover/tag/list").then(function(e){var s=e.data;if(0!=s.length){var a=s[Math.floor(Math.random(),s.length)];t.hashtagPostsName=a,axios.get("/api/v2/discover/tag",{params:{hashtag:a}}).then(function(e){e.data.tags.length>3&&(t.showHashtagPosts=!0,t.hashtagPosts=e.data.tags.splice(0,3))})}})},ctxMenu:function(t){var e=this;this.ctxMenuStatus=t,this.ctxEmbedPayload=window.App.util.embed.post(t.url),t.account.id==this.profile.id?this.$refs.ctxModal.show():axios.get("/api/pixelfed/v1/accounts/relationships",{params:{"id[]":t.account.id}}).then(function(t){e.ctxMenuRelationship=t.data[0],e.$refs.ctxModal.show()})},closeCtxMenu:function(t){this.copiedEmbed=!1,this.ctxMenuStatus=!1,this.ctxMenuRelationship=!1,this.$refs.ctxModal.hide()},ctxMenuCopyLink:function(){var t=this.ctxMenuStatus;navigator.clipboard.writeText(t.url),this.closeCtxMenu()},ctxMenuGoToPost:function(){var t=this.ctxMenuStatus;window.location.href=this.statusUrl(t),this.closeCtxMenu()},ctxMenuFollow:function(){var t=this,e=this.ctxMenuStatus.account.id;axios.post("/i/follow",{item:e}).then(function(s){t.feed.forEach(function(t){t.account.id==e&&(t.account.relationship.following=!t.account.relationship.following)});var a=t.ctxMenuStatus.account.acct;t.closeCtxMenu(),setTimeout(function(){swal("Follow successful!","You are now following "+a,"success")},500)})},ctxMenuUnfollow:function(){var t=this,e=this.ctxMenuStatus.account.id;axios.post("/i/follow",{item:e}).then(function(s){t.feed.forEach(function(t){t.account.id==e&&(t.account.relationship.following=!t.account.relationship.following)});var a=t.ctxMenuStatus.account.acct;"home"==t.scope&&(t.feed=t.feed.filter(function(e){return e.account.id!=t.ctxMenuStatus.account.id})),t.closeCtxMenu(),setTimeout(function(){swal("Unfollow successful!","You are no longer following "+a,"success")},500)})},ctxMenuReportPost:function(){window.location.href="/i/report?type=post&id="+this.ctxMenuStatus.id},ctxMenuEmbed:function(){this.$refs.ctxModal.hide(),this.$refs.ctxEmbedModal.show()},ctxMenuShare:function(){this.$refs.ctxModal.hide(),this.$refs.ctxShareModal.show()},closeCtxShareMenu:function(){this.$refs.ctxShareModal.hide(),this.$refs.ctxModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.$refs.ctxEmbedModal.hide()},ctxModMenuShow:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.show()},ctxModMenu:function(){this.$refs.ctxModal.hide()},ctxModMenuClose:function(){this.$refs.ctxModal.hide(),this.$refs.ctxModModal.hide()},hideTips:function(){this.showTips=!1,window.localStorage.setItem("metro-tips",!1)},formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return t.url},profileUrl:function(t){return t.account.url},statusCardUsernameFormat:function(t){if(1==t.account.local)return t.account.username;var e=window.App.config.username.remote.format,s=window.App.config.username.remote.custom,a=t.account.username,i=document.createElement("a");switch(i.href=t.account.url,i=i.hostname,e){case"@":return a+'<span class="text-lighter font-weight-bold">@'+i+"</span>";case"from":return a+'<span class="text-lighter font-weight-bold"> <span class="font-weight-normal">from</span> '+i+"</span>";case"custom":return a+'<span class="text-lighter font-weight-bold"> '+s+" "+i+"</span>";default:return a+'<span class="text-lighter font-weight-bold">@'+i+"</span>"}},previewUrl:function(t){return t.sensitive?"/storage/no-preview.png?v="+(new Date).getTime():t.media_attachments[0].preview_url},previewBackground:function(t){return"background-image: url("+this.previewUrl(t)+");"},trimCaption:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:60;return _.truncate(t,{length:e})}}},o=(s("Zol4"),s("KHd+")),n=Object(o.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container"},["feed"===t.layout?s("div",{staticClass:"row"},[s("div",{class:[t.modes.distractionFree?"col-md-8 col-lg-8 offset-md-2 px-0 my-sm-3 timeline order-2 order-md-1":"col-md-8 col-lg-8 px-0 my-sm-3 timeline order-2 order-md-1"]},[s("div",{staticClass:"d-none",attrs:{"data-id":"StoryTimelineComponent"}}),t._v(" "),s("div",{staticStyle:{"padding-top":"10px"}},[t.loading?s("div",{staticClass:"text-center"},[t._m(0)]):t._e(),t._v(" "),t._l(t.feed,function(e,a){return s("div",{key:a+"-"+e.id,attrs:{"data-status-id":e.id}},[2==a&&1==t.showSuggestions&&t.suggestions.length?s("div",{staticClass:"card mb-sm-4 status-card card-md-rounded-0 shadow-none border"},[s("div",{staticClass:"card-header d-flex align-items-center justify-content-between bg-white border-0 pb-0"},[s("h6",{staticClass:"text-muted font-weight-bold mb-0"},[t._v("Suggestions For You")]),t._v(" "),s("span",{staticClass:"cursor-pointer text-muted",on:{click:t.hideSuggestions}},[s("i",{staticClass:"fas fa-times"})])]),t._v(" "),s("div",{staticClass:"card-body row mx-0"},t._l(t.suggestions,function(e,a){return s("div",{staticClass:"col-12 col-md-4 mb-3"},[s("div",{staticClass:"card"},[s("div",{staticClass:"card-body text-center pt-3"},[s("p",{staticClass:"mb-0"},[s("a",{attrs:{href:"/"+e.username}},[s("img",{staticClass:"img-fluid rounded-circle cursor-pointer",attrs:{src:e.avatar,width:"45px",height:"45px"}})])]),t._v(" "),s("div",{staticClass:"py-3"},[s("p",{staticClass:"font-weight-bold text-dark cursor-pointer mb-0"},[s("a",{staticClass:"text-decoration-none text-dark",attrs:{href:"/"+e.username}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"small text-muted mb-0"},[t._v(t._s(e.message))])]),t._v(" "),s("p",{staticClass:"mb-0"},[s("a",{staticClass:"btn btn-primary btn-block font-weight-bold py-0",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.expRecFollow(e.id,a)}}},[t._v("Follow")])])])])])}),0)]):t._e(),t._v(" "),4==a&&t.showHashtagPosts&&t.hashtagPosts.length?s("div",{staticClass:"card mb-sm-4 status-card card-md-rounded-0 shadow-none border"},[s("div",{staticClass:"card-header d-flex align-items-center justify-content-between bg-white border-0 pb-0"},[s("span"),t._v(" "),s("h6",{staticClass:"text-muted font-weight-bold mb-0"},[s("a",{attrs:{href:"/discover/tags/"+t.hashtagPostsName+"?src=tr"}},[t._v("#"+t._s(t.hashtagPostsName))])]),t._v(" "),s("span",{staticClass:"cursor-pointer text-muted",on:{click:function(e){t.showHashtagPosts=!1}}},[s("i",{staticClass:"fas fa-times"})])]),t._v(" "),s("div",{staticClass:"card-body row mx-0"},t._l(t.hashtagPosts,function(e,a){return s("div",{staticClass:"col-4 p-0 p-sm-2 p-md-3 hashtag-post-square"},[s("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.status.url}},[s("div",{class:[e.status.filter?"square "+e.status.filter:"square"]},[s("div",{staticClass:"square-content",style:"background-image: url("+e.status.thumb+")"}),t._v(" "),s("div",{staticClass:"info-overlay-text"},[s("h5",{staticClass:"text-white m-auto font-weight-bold"},[s("span",{staticClass:"pr-4"},[s("span",{staticClass:"far fa-heart fa-lg pr-1"}),t._v(" "+t._s(e.status.like_count)+"\n\t\t\t\t\t\t\t\t\t\t\t\t")]),t._v(" "),s("span",[s("span",{staticClass:"fas fa-retweet fa-lg pr-1"}),t._v(" "+t._s(e.status.share_count)+"\n\t\t\t\t\t\t\t\t\t\t\t\t")])])])])])])}),0)]):t._e(),t._v(" "),s("div",{staticClass:"card mb-sm-4 status-card card-md-rounded-0 shadow-none border"},[t.modes.distractionFree?t._e():s("div",{staticClass:"card-header d-inline-flex align-items-center bg-white"},[s("img",{staticClass:"cursor-pointer",staticStyle:{"border-radius":"32px"},attrs:{src:e.account.avatar,width:"32px",height:"32px"},on:{click:function(s){return t.profileUrl(e)}}}),t._v(" "),s("div",{staticClass:"pl-2"},[s("a",{staticClass:"username font-weight-bold text-dark text-decoration-none",attrs:{href:t.profileUrl(e)},domProps:{innerHTML:t._s(t.statusCardUsernameFormat(e))}},[t._v("\n\t\t\t\t\t\t\t\t\tLoading...\n\t\t\t\t\t\t\t\t")]),t._v(" "),e.account.is_admin?s("span",{staticClass:"fa-stack",staticStyle:{height:"1em","line-height":"1em","max-width":"19px"},attrs:{title:"Admin Account","data-toggle":"tooltip"}},[s("i",{staticClass:"fas fa-certificate text-danger fa-stack-1x"}),t._v(" "),s("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"7px"}})]):t._e(),t._v(" "),"home"!=t.scope&&e.account.id!=t.profile.id&&e.account.relationship?s("span",[s("span",{staticClass:"px-1"},[t._v("•")]),t._v(" "),s("span",{class:"font-weight-bold cursor-pointer "+[1==e.account.relationship.following?"text-muted":"text-primary"],on:{click:function(s){return t.followAction(e)}}},[t._v(t._s(1==e.account.relationship.following?"Following":"Follow"))])]):t._e(),t._v(" "),e.place?s("a",{staticClass:"d-block small text-decoration-none",staticStyle:{color:"#718096"},attrs:{href:"/discover/places/"+e.place.id+"/"+e.place.slug}},[t._v(t._s(e.place.name)+", "+t._s(e.place.country))]):t._e()]),t._v(" "),s("div",{staticClass:"text-right",staticStyle:{"flex-grow":"1"}},[s("button",{staticClass:"btn btn-link text-dark py-0",attrs:{type:"button"},on:{click:function(s){return t.ctxMenu(e)}}},[s("span",{staticClass:"fas fa-ellipsis-h text-lighter"})])])]),t._v(" "),s("div",{staticClass:"postPresenterContainer",staticStyle:{background:"#000"}},["photo"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-presenter",{attrs:{status:e}})],1):"photo:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("photo-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):"video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("video-album-presenter",{attrs:{status:e}})],1):"photo:video:album"===e.pf_type?s("div",{staticClass:"w-100"},[s("mixed-album-presenter",{attrs:{status:e},on:{lightbox:t.lightbox}})],1):s("div",{staticClass:"w-100"},[s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])]),t._v(" "),s("div",{staticClass:"card-body"},[t.modes.distractionFree?t._e():s("div",{staticClass:"reactions my-1 pb-2"},[s("h3",{class:[e.favourited?"fas fa-heart text-danger pr-3 m-0 cursor-pointer":"far fa-heart pr-3 m-0 like-btn text-lighter cursor-pointer"],attrs:{title:"Like"},on:{click:function(s){return t.likeStatus(e,s)}}}),t._v(" "),e.comments_disabled?t._e():s("h3",{staticClass:"far fa-comment text-lighter pr-3 m-0 cursor-pointer",attrs:{title:"Comment"},on:{click:function(s){return t.commentFocus(e,s)}}}),t._v(" "),"public"==e.visibility?s("h3",{class:[e.reblogged?"fas fa-retweet pr-3 m-0 text-primary cursor-pointer":"fas fa-retweet pr-3 m-0 text-lighter share-btn cursor-pointer"],attrs:{title:"Share"},on:{click:function(s){return t.shareStatus(e,s)}}}):t._e(),t._v(" "),"photo"==e.pf_type?s("span",{staticClass:"float-right"},[s("h3",{staticClass:"fas fa-expand pr-3 m-0 cursor-pointer text-lighter",on:{click:function(s){return t.lightbox(e)}}})]):t._e()]),t._v(" "),1!=t.expLc(e)||t.modes.distractionFree?t._e():s("div",{staticClass:"likes font-weight-bold"},[s("span",{staticClass:"like-count"},[t._v(t._s(e.favourites_count))]),t._v(" "+t._s(1==e.favourites_count?"like":"likes")+"\n\t\t\t\t\t\t\t")]),t._v(" "),s("div",{staticClass:"caption"},[s("p",{staticClass:"mb-2 read-more",staticStyle:{overflow:"hidden"}},[s("span",{staticClass:"username font-weight-bold"},[s("bdi",[s("a",{staticClass:"text-dark",attrs:{href:t.profileUrl(e)}},[t._v(t._s(e.account.username))])])]),t._v(" "),s("span",{staticClass:"status-content",domProps:{innerHTML:t._s(e.content)}})])]),t._v(" "),e.id!=t.replyId||e.comments_disabled?t._e():s("div",{staticClass:"comments"},t._l(t.replies,function(e,a){return s("p",{staticClass:"mb-0 d-flex justify-content-between align-items-top read-more",staticStyle:{"overflow-y":"hidden"}},[s("span",[s("a",{staticClass:"text-dark font-weight-bold mr-1",attrs:{href:t.profileUrl(e)}},[t._v(t._s(e.account.username))]),t._v(" "),s("span",{domProps:{innerHTML:t._s(e.content)}})]),t._v(" "),s("span",{staticClass:"mb-0",staticStyle:{"min-width":"38px"}},[s("span",{on:{click:function(s){return t.likeStatus(e,s)}}},[s("i",{class:[e.favourited?"fas fa-heart fa-sm text-danger cursor-pointer":"far fa-heart fa-sm text-lighter cursor-pointer"]})]),t._v(" "),s("span",{staticClass:"text-lighter pl-2 cursor-pointer",on:{click:function(s){return t.ctxMenu(e)}}},[s("span",{staticClass:"fas fa-ellipsis-v text-lighter"})])])])}),0),t._v(" "),s("div",{staticClass:"timestamp mt-2"},[s("p",{staticClass:"small text-uppercase mb-0"},[s("a",{staticClass:"text-muted",attrs:{href:t.statusUrl(e)}},[s("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:e.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(e.created_at)}})],1),t._v(" "),t.modes.distractionFree?s("a",{staticClass:"float-right",attrs:{href:e.url}},[s("i",{staticClass:"fas fa-ellipsis-h fa-lg text-muted"})]):t._e()])])]),t._v(" "),e.id!=t.replyId||e.comments_disabled?t._e():s("div",{staticClass:"card-footer bg-white px-2 py-0"},[s("ul",{staticClass:"nav align-items-center emoji-reactions",staticStyle:{"overflow-x":"scroll","flex-wrap":"unset"}},t._l(t.emoji,function(a){return s("li",{staticClass:"nav-item",on:{click:function(s){return t.emojiReaction(e)}}},[t._v(t._s(a))])}),0)]),t._v(" "),e.id!=t.replyId||e.comments_disabled?t._e():s("div",{staticClass:"card-footer bg-white sticky-md-bottom p-0"},[s("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"/i/comment","data-id":e.id,"data-truncate":"false"}},[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control border-0 rounded-0",staticStyle:{height:"56px","line-height":"18px","max-height":"80px",resize:"none","padding-right":"4.2rem"},attrs:{name:"comment",placeholder:"Add a comment…",autocomplete:"off",autocorrect:"off"},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}}),t._v(" "),s("input",{staticClass:"d-inline-block btn btn-link font-weight-bold reply-btn text-decoration-none",attrs:{type:"button",value:"Post",disabled:0==t.replyText.length},on:{click:function(s){return s.preventDefault(),t.commentSubmit(e,s)}}})])])])])}),t._v(" "),!t.loading&&t.feed.length?s("div",[s("div",{staticClass:"card shadow-none"},[s("div",{staticClass:"card-body"},[s("infinite-loading",{attrs:{distance:800},on:{infinite:t.infiniteTimeline}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"},[t._v("No more posts to load")]),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"},[t._v("No more posts to load")])])],1)])]):t._e(),t._v(" "),t.loading||"home"!=t.scope||0!=t.feed.length?t._e():s("div",[s("div",{staticClass:"card shadow-none border"},[s("div",{staticClass:"card-body text-center"},[s("p",{staticClass:"h2 font-weight-lighter p-5"},[t._v("Hello, "+t._s(t.profile.acct))]),t._v(" "),t._m(1),t._v(" "),s("p",{staticClass:"h3 font-weight-lighter p-5"},[t._v("Start following people to build your timeline.")]),t._v(" "),t._m(2)])])])],2)]),t._v(" "),t.modes.distractionFree?t._e():s("div",{staticClass:"col-md-4 col-lg-4 my-3 order-1 order-md-2 d-none d-md-block"},[s("div",{staticClass:"position-sticky",staticStyle:{top:"78px"}},[s("div",{staticClass:"mb-4"},[s("div",{},[s("div",{},[s("div",{staticClass:"media d-flex align-items-center"},[s("a",{attrs:{href:t.profile.url}},[s("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:t.profile.avatar||"/storage/avatars/default.png",alt:"avatar",width:"64px",height:"64px"}})]),t._v(" "),s("div",{staticClass:"media-body d-flex justify-content-between word-break"},[s("div",[s("p",{staticClass:"mb-0 px-0 font-weight-bold"},[s("a",{staticClass:"text-dark",attrs:{href:t.profile.url}},[t._v(t._s(t.profile.username||"loading..."))])]),t._v(" "),s("p",{staticClass:"my-0 text-muted pb-0"},[t._v(t._s(t.profile.display_name||"loading..."))])]),t._v(" "),t._m(3)])])]),t._v(" "),s("div",{staticClass:"card-footer bg-transparent border-0 mt-2 py-1"},[s("div",{staticClass:"d-flex justify-content-between text-center"},[s("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.redirect(t.profile.url)}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Posts")])]),t._v(" "),s("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.redirect(t.profile.url+"?md=followers")}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Followers")])]),t._v(" "),s("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.redirect(t.profile.url+"?md=following")}}},[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v("Following")])])])])])]),t._v(" "),t.showTips?s("div",{staticClass:"mb-4 card-tips"},[s("div",{staticClass:"card border shadow-none mb-3",staticStyle:{"max-width":"18rem"}},[s("div",{staticClass:"card-body"},[s("div",{staticClass:"card-title"},[s("span",{staticClass:"font-weight-bold"},[t._v("Tip: Hide follower counts")]),t._v(" "),s("span",{staticClass:"float-right cursor-pointer",on:{click:function(e){return e.preventDefault(),t.hideTips()}}},[s("i",{staticClass:"fas fa-times text-lighter"})])]),t._v(" "),t._m(4)])])]):t._e(),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.modes.notify&&!t.loading,expression:"modes.notify == true && !loading"}],staticClass:"mb-4"},[s("notification-card")],1),t._v(" "),s("div",{directives:[{name:"show",rawName:"v-show",value:1==t.showSuggestions&&t.suggestions.length&&t.config.ab&&1==t.config.ab.rec,expression:"showSuggestions == true && suggestions.length && config.ab && config.ab.rec == true"}],staticClass:"mb-4"},[s("div",{staticClass:"card"},[s("div",{staticClass:"card-header bg-white d-flex align-items-center justify-content-between"},[s("a",{ref:"suggestionRefresh",staticClass:"small text-muted cursor-pointer",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.refreshSuggestions(e)}}},[s("i",{staticClass:"fas fa-sync-alt"})]),t._v(" "),s("div",{staticClass:"small text-dark text-uppercase font-weight-bold"},[t._v("Suggestions")]),t._v(" "),s("div",{staticClass:"small text-muted cursor-pointer",on:{click:t.hideSuggestions}},[s("i",{staticClass:"fas fa-times"})])]),t._v(" "),s("div",{staticClass:"card-body pt-0"},t._l(t.suggestions,function(e,a){return s("div",{staticClass:"media align-items-center mt-3"},[s("a",{attrs:{href:"/"+e.username}},[s("img",{staticClass:"rounded-circle mr-3",attrs:{src:e.avatar,width:"32px",height:"32px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0 font-weight-bold small"},[s("a",{staticClass:"text-decoration-none text-dark",attrs:{href:"/"+e.username}},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"mb-0 small text-muted"},[t._v(t._s(e.message))])]),t._v(" "),s("a",{staticClass:"font-weight-bold small",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.expRecFollow(e.id,a)}}},[t._v("Follow")])])}),0)])]),t._v(" "),t._m(5)])])]):s("div",{staticClass:"row pt-2"},[s("div",{staticClass:"col-12"},[t.loading?s("div",{staticClass:"text-center"},[t._m(6)]):s("div",{staticClass:"row"},t._l(t.feed,function(e,a){return s("div",{key:a+"-"+e.id,staticClass:"col-12 col-md-4 p-1 p-md-3 mb-3"},[s("div",{staticClass:"card info-overlay card-md-border-0 shadow-sm border border-light",attrs:{href:t.statusUrl(e)}},[s("div",{class:[e.sensitive?"square":"square "+e.media_attachments[0].filter_class]},["photo:album"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?s("span",{staticClass:"float-right mr-3 post-icon"},[s("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),s("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),s("div",{staticClass:"info-overlay-text px-4"},[s("p",{staticClass:"text-white m-auto text-center"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(t.trimCaption(e.content_text))+"\n\t\t\t\t\t\t\t\t")])])])]),t._v(" "),s("div",{staticClass:"py-3 media align-items-center"},[s("img",{staticClass:"mr-3 rounded-circle shadow-sm",attrs:{src:e.account.avatar,alt:e.account.username+" 's avatar",width:"30px",height:"30px"}}),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0 font-weight-bold small"},[t._v(t._s(e.account.username))]),t._v(" "),s("p",{staticClass:"mb-0",staticStyle:{"line-height":"0.7"}},[s("a",{staticClass:"small text-lighter",attrs:{href:t.statusUrl(e)}},[s("timeago",{directives:[{name:"b-tooltip",rawName:"v-b-tooltip.hover.bottom",modifiers:{hover:!0,bottom:!0}}],attrs:{datetime:e.created_at,"auto-update":60,"converter-options":{includeSeconds:!0},title:t.timestampFormat(e.created_at)}})],1)])]),t._v(" "),s("div",{staticClass:"ml-3"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold small"},[t._v(t._s(1==e.favourites_count?"1 like":e.favourites_count+" likes"))]),t._v(" "),s("span",{staticClass:"px-2"},[s("i",{class:[e.favourited?"fas fa-heart text-danger cursor-pointer":"far fa-heart like-btn text-lighter cursor-pointer"],on:{click:function(s){return t.likeStatus(e,s)}}})]),t._v(" "),s("span",{staticClass:"mr-2 cursor-pointer"},[s("i",{staticClass:"fas fa-ellipsis-v",on:{click:function(s){return t.ctxMenu(e)}}})])])])])])}),0),t._v(" "),!t.loading&&t.feed.length?s("div",[s("infinite-loading",{attrs:{distance:800},on:{infinite:t.infiniteTimeline}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"},[t._v("No more posts to load")]),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"},[t._v("No more posts to load")])])],1):t._e()])]),t._v(" "),s("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[s("div",{staticClass:"list-group text-center"},[t.ctxMenuStatus&&t.ctxMenuStatus.account.id!=t.profile.id?s("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-danger",on:{click:function(e){return t.ctxMenuReportPost()}}},[t._v("Report inappropriate")]):t._e(),t._v(" "),t.ctxMenuStatus&&t.ctxMenuStatus.account.id!=t.profile.id&&t.ctxMenuRelationship&&t.ctxMenuRelationship.following?s("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-danger",on:{click:function(e){return t.ctxMenuUnfollow()}}},[t._v("Unfollow")]):t._e(),t._v(" "),t.ctxMenuStatus&&t.ctxMenuStatus.account.id!=t.profile.id&&t.ctxMenuRelationship&&!t.ctxMenuRelationship.following?s("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-primary",on:{click:function(e){return t.ctxMenuFollow()}}},[t._v("Follow")]):t._e(),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuGoToPost()}}},[t._v("Go to post")]),t._v(" "),t.ctxMenuStatus&&1==t.ctxMenuStatus.local?s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuEmbed()}}},[t._v("Embed")]):t._e(),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxMenuCopyLink()}}},[t._v("Copy Link")]),t._v(" "),t.profile&&1==t.profile.is_admin?s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.ctxModMenuShow()}}},[t._v("Moderation Tools")]):t._e(),t._v(" "),t.ctxMenuStatus&&(t.profile.is_admin||t.profile.id==t.ctxMenuStatus.account.id)?s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.deletePost(t.ctxMenuStatus)}}},[t._v("Delete")]):t._e(),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("Cancel")])])]),t._v(" "),s("b-modal",{ref:"ctxModModal",attrs:{id:"ctx-mod-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[s("div",{staticClass:"list-group text-center"},[s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.moderatePost(t.ctxMenuStatus,"unlist")}}},[t._v("Unlist from Timelines")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(t){}}},[t._v("Add Content Warning")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.ctxModMenuClose()}}},[t._v("Cancel")])])]),t._v(" "),s("b-modal",{ref:"ctxShareModal",attrs:{id:"ctx-share-modal",title:"Share","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded text-center"}},[s("div",{staticClass:"list-group-item rounded cursor-pointer border-top-0"},[t._v("Email")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer"},[t._v("Facebook")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer"},[t._v("Mastodon")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer"},[t._v("Pinterest")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer"},[t._v("Pixelfed")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer"},[t._v("Twitter")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer"},[t._v("VK")]),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxShareMenu()}}},[t._v("Cancel")])]),t._v(" "),s("b-modal",{ref:"ctxEmbedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[s("div",[s("textarea",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedPayload,expression:"ctxEmbedPayload"}],staticClass:"form-control disabled",staticStyle:{border:"1px solid #efefef","font-size":"14px","line-height":"12px",height:"37px",margin:"0 0 7px",resize:"none","white-space":"nowrap"},attrs:{rows:"1"},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}}),t._v(" "),s("hr"),t._v(" "),s("button",{class:t.copiedEmbed?"btn btn-primary btn-block btn-sm py-1 font-weight-bold disabed":"btn btn-primary btn-block btn-sm py-1 font-weight-bold",attrs:{disabled:t.copiedEmbed},on:{click:t.ctxCopyEmbed}},[t._v(t._s(t.copiedEmbed?"Embed Code Copied!":"Copy Embed Code"))]),t._v(" "),s("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v("By using this embed, you agree to our "),s("a",{attrs:{href:"/site/terms"}},[t._v("Terms of Use")])])])]),t._v(" "),s("b-modal",{ref:"lightboxModal",attrs:{id:"lightbox","hide-header":"","hide-footer":"",centered:"",size:"lg","body-class":"p-0"}},[t.lightboxMedia?s("div",{staticClass:"w-100 h-100",class:t.lightboxMedia.filter_class},[s("img",{staticStyle:{"max-height":"100%","max-width":"100%"},attrs:{src:t.lightboxMedia.url}})]):t._e()])],1)},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"text-lighter"},[e("i",{staticClass:"fas fa-camera-retro fa-5x"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",[e("a",{staticClass:"btn btn-primary font-weight-bold py-0",attrs:{href:"/discover"}},[this._v("Discover new people and posts")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"ml-2"},[e("a",{staticClass:"text-muted",attrs:{href:"/settings/home"}},[e("i",{staticClass:"fas fa-cog fa-lg"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"card-text"},[e("span",{staticStyle:{"font-size":"13px"}},[this._v("You can hide followers or following count and lists on your profile.")]),this._v(" "),e("br"),e("a",{staticClass:"small font-weight-bold",attrs:{href:"/settings/privacy/"}},[this._v("Privacy Settings")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("footer",[s("div",{staticClass:"container pb-5"},[s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/about"}},[t._v("About Us")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/help"}},[t._v("Help")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/language"}},[t._v("Language")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/discover/profiles"}},[t._v("Profiles")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/discover/places"}},[t._v("Places")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/privacy"}},[t._v("Privacy")]),t._v(" "),s("a",{staticClass:"text-dark pr-2",attrs:{href:"/site/terms"}},[t._v("Terms")])]),t._v(" "),s("p",{staticClass:"mb-0 text-uppercase font-weight-bold text-muted small"},[s("a",{staticClass:"text-muted",attrs:{href:"http://pixelfed.org",rel:"noopener",title:"","data-toggle":"tooltip"}},[t._v("Powered by Pixelfed")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])}],!1,null,"5ffdb4db",null);e.default=n.exports},KqaD:function(t,e,s){Vue.component("notification-card",s("x6yo").default),Vue.component("photo-presenter",s("d+I4").default),Vue.component("video-presenter",s("2Jpm").default),Vue.component("photo-album-presenter",s("Mrqh").default),Vue.component("video-album-presenter",s("9wGH").default),Vue.component("mixed-album-presenter",s("exej").default),Vue.component("post-menu",s("yric").default),Vue.component("timeline",s("KhVi").default)},Kz1s:function(t,e,s){var a=s("+27z");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},Mrqh:function(t,e,s){"use strict";s.r(e);var a={props:["status"],data:function(){return{cursor:0}},created:function(){},beforeDestroy:function(){},methods:{loadSensitive:function(){this.$refs.carousel.onResize(),this.$refs.carousel.goToPage(0)},keypressNavigation:function(t){var e=this.$refs.carousel;"37"==t.keyCode&&(t.preventDefault(),e.advancePage("backward"),e.$emit("navigation-click","backward")),"39"==t.keyCode&&(t.preventDefault(),e.advancePage("forward"),e.$emit("navigation-click","forward"))}}},i=(s("gGDB"),s("KHd+")),o=Object(i.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",{on:{click:t.loadSensitive}},[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("carousel",{ref:"carousel",attrs:{centerMode:!0,loop:!1,"per-page":1,paginationPosition:"bottom-overlay",paginationActiveColor:"#3897f0",paginationColor:"#dbdbdb"}},t._l(t.status.media_attachments,function(t,e){return s("slide",{key:"px-carousel-"+t.id+"-"+e,staticClass:"w-100 h-100 d-block mx-auto text-center",attrs:{title:t.description}},[s("img",{class:t.filter_class+" img-fluid",attrs:{src:t.url,alt:t.description}})])}),1)],1)]):s("div",{staticClass:"w-100 h-100 p-0"},[s("carousel",{ref:"carousel",staticClass:"p-0 m-0",attrs:{centerMode:!0,loop:!1,"per-page":1,paginationPosition:"bottom-overlay",paginationActiveColor:"#3897f0",paginationColor:"#dbdbdb"}},t._l(t.status.media_attachments,function(t,e){return s("slide",{key:"px-carousel-"+t.id+"-"+e,staticStyle:{background:"#000",display:"flex","align-items":"center"},attrs:{title:t.description}},[s("img",{class:t.filter_class+" img-fluid w-100 p-0",attrs:{src:t.url,alt:t.description}})])}),1)],1)},[],!1,null,"56601076",null);e.default=o.exports},NRGb:function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-56601076] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},NTpJ:function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-07f513b4] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},V7D4:function(t,e,s){"use strict";var a=s("qnXJ");s.n(a).a},Zol4:function(t,e,s){"use strict";var a=s("BoLb");s.n(a).a},"aET+":function(t,e,s){var a,i,o={},n=(a=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=a.apply(this,arguments)),i}),r=function(t){var e={};return function(t,s){if("function"==typeof t)return t();if(void 0===e[t]){var a=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,s);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}e[t]=a}return e[t]}}(),l=null,c=0,d=[],u=s("9tPo");function f(t,e){for(var s=0;s<t.length;s++){var a=t[s],i=o[a.id];if(i){i.refs++;for(var n=0;n<i.parts.length;n++)i.parts[n](a.parts[n]);for(;n<a.parts.length;n++)i.parts.push(_(a.parts[n],e))}else{var r=[];for(n=0;n<a.parts.length;n++)r.push(_(a.parts[n],e));o[a.id]={id:a.id,refs:1,parts:r}}}}function p(t,e){for(var s=[],a={},i=0;i<t.length;i++){var o=t[i],n=e.base?o[0]+e.base:o[0],r={css:o[1],media:o[2],sourceMap:o[3]};a[n]?a[n].parts.push(r):s.push(a[n]={id:n,parts:[r]})}return s}function m(t,e){var s=r(t.insertInto);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var a=d[d.length-1];if("top"===t.insertAt)a?a.nextSibling?s.insertBefore(e,a.nextSibling):s.appendChild(e):s.insertBefore(e,s.firstChild),d.push(e);else if("bottom"===t.insertAt)s.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=r(t.insertAt.before,s);s.insertBefore(e,i)}}function h(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=d.indexOf(t);e>=0&&d.splice(e,1)}function v(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var a=function(){0;return s.nc}();a&&(t.attrs.nonce=a)}return g(e,t.attrs),m(t,e),e}function g(t,e){Object.keys(e).forEach(function(s){t.setAttribute(s,e[s])})}function _(t,e){var s,a,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var n=c++;s=l||(l=v(e)),a=x.bind(null,s,n,!1),i=x.bind(null,s,n,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",g(e,t.attrs),m(t,e),e}(e),a=function(t,e,s){var a=s.css,i=s.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(a=u(a));i&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var n=new Blob([a],{type:"text/css"}),r=t.href;t.href=URL.createObjectURL(n),r&&URL.revokeObjectURL(r)}.bind(null,s,e),i=function(){h(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),a=function(t,e){var s=e.css,a=e.media;a&&t.setAttribute("media",a);if(t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}.bind(null,s),i=function(){h(s)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=n()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=p(t,e);return f(s,e),function(t){for(var a=[],i=0;i<s.length;i++){var n=s[i];(r=o[n.id]).refs--,a.push(r)}t&&f(p(t,e),e);for(i=0;i<a.length;i++){var r;if(0===(r=a[i]).refs){for(var l=0;l<r.parts.length;l++)r.parts[l]();delete o[r.id]}}}};var b,w=(b=[],function(t,e){return b[t]=e,b.filter(Boolean).join("\n")});function x(t,e,s,a){var i=s?"":a.css;if(t.styleSheet)t.styleSheet.cssText=w(e,i);else{var o=document.createTextNode(i),n=t.childNodes;n[e]&&t.removeChild(n[e]),n.length?t.insertBefore(o,n[e]):t.appendChild(o)}}},"d+I4":function(t,e,s){"use strict";s.r(e);var a={props:["status"]},i=(s("V7D4"),s("KHd+")),o=Object(i.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("div",{staticClass:"max-hide-overflow",attrs:{title:t.status.media_attachments[0].description}},[s("img",{class:t.status.media_attachments[0].filter_class+" card-img-top",attrs:{src:t.status.media_attachments[0].url,loading:"lazy",alt:t.status.media_attachments[0].description}})])])]):s("div",[s("div",{attrs:{title:t.status.media_attachments[0].description}},[s("img",{class:t.status.media_attachments[0].filter_class+" card-img-top",attrs:{src:t.status.media_attachments[0].url,loading:"lazy",alt:t.status.media_attachments[0].description}})])])},[],!1,null,"07f513b4",null);e.default=o.exports},exej:function(t,e,s){"use strict";s.r(e);var a={props:["status"]},i=s("KHd+"),o=Object(i.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return 1==t.status.sensitive?s("div",[s("details",{staticClass:"details-animated"},[s("summary",[s("p",{staticClass:"mb-0 lead font-weight-bold"},[t._v(t._s(t.status.spoiler_text?t.status.spoiler_text:"CW / NSFW / Hidden Media"))]),t._v(" "),s("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),s("b-carousel",{staticStyle:{"text-shadow":"1px 1px 2px #333","background-color":"#000"},attrs:{id:t.status.id+"-carousel",controls:"","img-blank":"",background:"#ffffff",interval:0}},t._l(t.status.media_attachments,function(e,a){return s("b-carousel-slide",{key:e.id+"-media"},["Video"==e.type?s("video",{staticClass:"embed-responsive-item",attrs:{slot:"img",preload:"none",controls:"",loop:"",alt:e.description,width:"100%",height:"100%",poster:e.preview_url},slot:"img"},[s("source",{attrs:{src:e.url,type:e.mime}})]):"Image"==e.type?s("div",{attrs:{slot:"img",title:e.description},slot:"img"},[s("img",{class:e.filter_class+" d-block img-fluid w-100",attrs:{src:e.url,alt:e.description,loading:"lazy"}})]):s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])}),1)],1)]):s("div",{staticClass:"w-100 h-100 p-0"},[s("carousel",{ref:"carousel",staticClass:"p-0 m-0",attrs:{centerMode:!0,loop:!1,"per-page":1,paginationPosition:"bottom-overlay",paginationActiveColor:"#3897f0",paginationColor:"#dbdbdb"}},t._l(t.status.media_attachments,function(e,a){return s("slide",{key:"px-carousel-"+e.id+"-"+a,staticClass:"w-100 h-100 d-block mx-auto text-center",staticStyle:{background:"#000",display:"flex","align-items":"center"}},["Video"==e.type?s("video",{staticClass:"embed-responsive-item",attrs:{preload:"none",controls:"",loop:"",title:e.description,width:"100%",height:"100%",poster:e.preview_url}},[s("source",{attrs:{src:e.url,type:e.mime}})]):"Image"==e.type?s("div",{attrs:{title:e.description}},[s("img",{class:e.filter_class+" img-fluid w-100",attrs:{src:e.url,alt:e.description,loading:"lazy"}})]):s("p",{staticClass:"text-center p-0 font-weight-bold text-white"},[t._v("Error: Problem rendering preview.")])])}),1)],1)},[],!1,null,null,null);e.default=o.exports},gGDB:function(t,e,s){"use strict";var a=s("r8B5");s.n(a).a},qnXJ:function(t,e,s){var a=s("NTpJ");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},r8B5:function(t,e,s){var a=s("NRGb");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},x6yo:function(t,e,s){"use strict";s.r(e);function a(t){return function(t){if(Array.isArray(t)){for(var e=0,s=new Array(t.length);e<t.length;e++)s[e]=t[e];return s}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var i={data:function(){return{notifications:{},notificationCursor:2,notificationMaxId:0}},mounted:function(){this.fetchNotifications()},updated:function(){},methods:{fetchNotifications:function(){var t=this;axios.get("/api/pixelfed/v1/notifications").then(function(e){var s=e.data.filter(function(t){return!("share"==t.type&&!status)}),i=e.data.map(function(t){return t.id});t.notificationMaxId=Math.min.apply(Math,a(i)),t.notifications=s,$(".notification-card .loader").addClass("d-none"),$(".notification-card .contents").removeClass("d-none")})},infiniteNotifications:function(t){var e=this;this.notificationCursor>5?t.complete():axios.get("/api/pixelfed/v1/notifications",{params:{page:this.notificationCursor}}).then(function(s){if(s.data.length){var i,o=s.data.filter(function(t){return!("share"==t.type&&!status)&&!_.find(e.notifications,{id:t.id})});(i=e.notifications).push.apply(i,a(o)),e.notificationCursor++,t.loaded()}else t.complete()})},truncate:function(t){return t.length<=15?t:t.slice(0,15)+"..."},timeAgo:function(t){var e=Date.parse(t),s=Math.floor((new Date-e)/1e3),a=Math.floor(s/31536e3);return a>=1?a+"y":(a=Math.floor(s/604800))>=1?a+"w":(a=Math.floor(s/86400))>=1?a+"d":(a=Math.floor(s/3600))>=1?a+"h":(a=Math.floor(s/60))>=1?a+"m":Math.floor(s)+"s"},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},notificationPoll:function(){var t=this.notifications.length>5?15e3:12e4,e=this;setInterval(function(){axios.get("/api/pixelfed/v1/notifications").then(function(t){var s=t.data.filter(function(t){return!("share"==t.type||e.notificationMaxId>=t.id)});if(s.length){var i,o=s.map(function(t){return t.id});e.notificationMaxId=Math.max.apply(Math,a(o)),(i=e.notifications).unshift.apply(i,a(s));var n=new Audio("/static/beep.mp3");n.volume=.7,n.play(),$(".notification-card .far.fa-bell").addClass("fas text-danger").removeClass("far text-muted")}})},t)}}},o=s("KHd+"),n=Object(o.a)(i,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"card notification-card shadow-none border"},[t._m(0),t._v(" "),t._m(1),t._v(" "),s("div",{staticClass:"card-body pt-2 px-0 py-0 contents",staticStyle:{"max-height":"230px","overflow-y":"scroll"}},[t._l(t.notifications,function(e,a){return t.notifications.length>0?s("div",{staticClass:"media align-items-center px-3 py-2 border-bottom border-light"},[s("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:e.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),s("div",{staticClass:"media-body font-weight-light small"},["favourite"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username)))]),t._v(" liked your "),s("a",{staticClass:"font-weight-bold",attrs:{href:e.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t")])]):"comment"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username)))]),t._v(" commented on your "),s("a",{staticClass:"font-weight-bold",attrs:{href:e.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t")])]):"mention"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username)))]),t._v(" "),s("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(e.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t")])]):"follow"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username)))]),t._v(" followed you.\n\t\t\t\t\t\t")])]):"share"==e.type?s("div",[s("p",{staticClass:"my-0"},[s("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:e.account.url,title:e.account.username}},[t._v(t._s(t.truncate(e.account.username)))]),t._v(" shared your "),s("a",{staticClass:"font-weight-bold",attrs:{href:e.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t")])]):t._e()]),t._v(" "),s("div",{staticClass:"small text-muted font-weight-bold",attrs:{title:e.created_at}},[t._v(t._s(t.timeAgo(e.created_at)))])]):t._e()}),t._v(" "),t.notifications.length?s("div",[s("infinite-loading",{on:{infinite:t.infiniteNotifications}},[s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),s("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?s("div",{staticClass:"text-lighter text-center py-3"},[t._m(2),t._v(" "),s("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])])},[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header bg-white"},[e("p",{staticClass:"mb-0 d-flex align-items-center justify-content-between"},[e("span",[e("i",{staticClass:"far fa-bell fa-lg text-white"})]),this._v(" "),e("span",{staticClass:"small text-dark text-uppercase font-weight-bold"},[this._v("Notifications")]),this._v(" "),e("a",{staticClass:"text-decoration-none text-muted",attrs:{href:"/account/activity"}},[e("i",{staticClass:"fas fa-inbox fa-lg"})])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body loader text-center",staticStyle:{height:"230px"}},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("i",{staticClass:"fas fa-inbox fa-3x"})])}],!1,null,"485d8f30",null);e.default=n.exports},yric:function(t,e,s){"use strict";s.r(e);var a={props:["feed","status","profile","size","modal"],methods:{reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},timestampFormat:function(t){var e=new Date(t);return e.toDateString()+" "+e.toLocaleTimeString()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},replyUrl:function(t){return"/p/"+this.profile.username+"/"+(t.account.id==this.profile.id?t.id:t.in_reply_to_id)},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},statusOwner:function(t){return parseInt(t.account.id)==parseInt(this.profile.id)},deletePost:function(){this.$emit("deletePost"),$("#mt_pid_"+this.status.id).modal("hide")},hidePost:function(t){t.sensitive=!0,$("#mt_pid_"+t.id).modal("hide")},moderatePost:function(t,e,s){var a=t.account.username;switch(e){case"autocw":var i="Are you sure you want to enforce CW for "+a+" ?";swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0});break;case"suspend":i="Are you sure you want to suspend the account of "+a+" ?",swal({title:"Confirm",text:i,icon:"warning",buttons:!0,dangerMode:!0})}},muteProfile:function(t){0!=$("body").hasClass("loggedIn")&&axios.post("/i/mute",{type:"user",item:t.account.id}).then(function(e){swal("Success","You have successfully muted "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})},blockProfile:function(t){0!=$("body").hasClass("loggedIn")&&axios.post("/i/block",{type:"user",item:t.account.id}).then(function(e){swal("Success","You have successfully blocked "+t.account.acct,"success")}).catch(function(t){swal("Error","Something went wrong. Please try again later.","error")})}}},i=(s("GlRX"),s("KHd+")),o=Object(i.a)(a,function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",["true"!=t.modal?s("div",{staticClass:"dropdown"},[s("button",{staticClass:"btn btn-link text-dark no-caret dropdown-toggle py-0",attrs:{type:"button","data-toggle":"dropdown","aria-haspopup":"true","aria-expanded":"false",title:"Post options"}},[s("span",{class:["lg"==t.size?"fas fa-ellipsis-v fa-lg text-muted":"fas fa-ellipsis-v fa-sm text-lighter"]})]),t._v(" "),s("div",{staticClass:"dropdown-menu dropdown-menu-right"},[s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",attrs:{href:t.status.url}},[t._v("Go to post")]),t._v(" "),0==t.statusOwner(t.status)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold",attrs:{href:t.reportUrl(t.status)}},[t._v("Report")])]):t._e(),t._v(" "),1==t.statusOwner(t.status)?s("span",[s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return e.preventDefault(),t.muteProfile(t.status)}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return e.preventDefault(),t.blockProfile(t.status)}}},[t._v("Block Profile")])]):t._e(),t._v(" "),1==t.profile.is_admin?s("span",[s("div",{staticClass:"dropdown-divider"}),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-danger text-decoration-none",on:{click:function(e){return t.deletePost(t.status)}}},[t._v("Delete")]),t._v(" "),s("div",{staticClass:"dropdown-divider"}),t._v(" "),s("h6",{staticClass:"dropdown-header"},[t._v("Mod Tools")]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"autocw")}}},[s("p",{staticClass:"mb-0"},[t._v("Enforce CW")]),t._v(" "),t._m(0)]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"noautolink")}}},[s("p",{staticClass:"mb-0"},[t._v("No Autolinking")]),t._v(" "),t._m(1)]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"unlisted")}}},[s("p",{staticClass:"mb-0"},[t._v("Unlisted Posts")]),t._v(" "),t._m(2)]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"disable")}}},[s("p",{staticClass:"mb-0"},[t._v("Disable Account")]),t._v(" "),t._m(3)]),t._v(" "),s("a",{staticClass:"dropdown-item font-weight-bold text-decoration-none",on:{click:function(e){return t.moderatePost(t.status,"suspend")}}},[s("p",{staticClass:"mb-0"},[t._v("Suspend Account")]),t._v(" "),t._m(4)])]):t._e()])]):t._e(),t._v(" "),"true"==t.modal?s("div",[s("span",{attrs:{"data-toggle":"modal","data-target":"#mt_pid_"+t.status.id}},[s("span",{class:["lg"==t.size?"fas fa-ellipsis-v fa-lg text-muted":"fas fa-ellipsis-v fa-sm text-lighter"]})]),t._v(" "),s("div",{staticClass:"modal",attrs:{tabindex:"-1",role:"dialog",id:"mt_pid_"+t.status.id}},[s("div",{staticClass:"modal-dialog modal-sm",attrs:{role:"document"}},[s("div",{staticClass:"modal-content"},[s("div",{staticClass:"modal-body"},[s("div",{staticClass:"list-group"},[s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:t.status.url}},[t._v("Go to post")]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.hidePost(t.status)}}},[t._v("Hide")]),t._v(" "),0==t.statusOwner(t.status)?s("span",[s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:t.reportUrl(t.status)}},[t._v("Report")]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.muteProfile(t.status)}}},[t._v("Mute Profile")]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.blockProfile(t.status)}}},[t._v("Block Profile")])]):t._e(),t._v(" "),1==t.statusOwner(t.status)||1==t.profile.is_admin?s("span",[s("a",{staticClass:"list-group-item font-weight-bold text-danger text-decoration-none",on:{click:t.deletePost}},[t._v("Delete")])]):t._e(),t._v(" "),1==t.profile.is_admin?s("span",[s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.moderatePost(t.status,"autocw")}}},[s("p",{staticClass:"mb-0"},[t._v("Enforce CW")]),t._v(" "),t._m(5)]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.moderatePost(t.status,"noautolink")}}},[s("p",{staticClass:"mb-0"},[t._v("No Autolinking")]),t._v(" "),t._m(6)]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.moderatePost(t.status,"unlisted")}}},[s("p",{staticClass:"mb-0"},[t._v("Unlisted Posts")]),t._v(" "),t._m(7)]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.moderatePost(t.status,"disable")}}},[s("p",{staticClass:"mb-0"},[t._v("Disable Account")]),t._v(" "),t._m(8)]),t._v(" "),s("a",{staticClass:"list-group-item font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return t.moderatePost(t.status,"suspend")}}},[s("p",{staticClass:"mb-0"},[t._v("Suspend Account")]),t._v(" "),t._m(9)])]):t._e()])])])])])]):t._e()])},[function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Adds a CW to every post "),e("br"),this._v(" made by this account.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Do not transform mentions, "),e("br"),this._v(" hashtags or urls into HTML.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Removes account from "),e("br"),this._v(" public/network timelines.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Temporarily disable account "),e("br"),this._v(" until next time user log in.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("This prevents any new interactions, "),e("br"),this._v(" without deleting existing data.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Adds a CW to every post "),e("br"),this._v(" made by this account.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Do not transform mentions, "),e("br"),this._v(" hashtags or urls into HTML.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Removes account from "),e("br"),this._v(" public/network timelines.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("Temporarily disable account "),e("br"),this._v(" until next time user log in.")])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0 small text-muted"},[this._v("This prevents any new interactions, "),e("br"),this._v(" without deleting existing data.")])}],!1,null,"acffc3f6",null);e.default=o.exports}},[[6,0]]]);