(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[215],{85528:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>a});var s=n(19755);Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return!!(this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2)}});const a={data:function(){return{loading:!0,version:1,loops:[],tab:"new"}},mounted:function(){var t=this;axios.get("/api/v2/loops").then((function(e){t.loops=e.data,t.loading=!1}))},methods:{videoSrc:function(t){return t.media_attachments[0].url},posterSrc:function(t){return t.media_attachments[0].preview_url},setTab:function(t){this.tab=t},toggleVideo:function(t,e){var n=e.target;s("video").each((function(){n.src!=s(this)[0].src&&s(this)[0].pause()})),n.playing?n.pause():n.play()},incrementLoop:function(t){},timestamp:function(t){return new Date(t.created_at).toLocaleDateString()},getTitle:function(t){return(t.content?t.content:"Untitled").trim()},truncate:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:15;return _.truncate(t,{length:e})}}}},45502:(t,e,n)=>{Vue.component("loops-component",n(41091).default)},23802:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var s=n(23645),a=n.n(s)()((function(t){return t[1]}));a.push([t.id,".loops-container .card{box-shadow:none}.loops-container .card .card-img-top{border-radius:0}.loops-container a{color:#343a40}.loops-container .card-body a:hover,a.hashtag{color:#28a745!important}",""]);const r=a},60588:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>i});var s=n(93379),a=n.n(s),r=n(23802),o={insert:"head",singleton:!1};a()(r.default,o);const i=r.default.locals||{}},41091:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>o});var s=n(6939),a=n(61539),r={};for(const t in a)"default"!==t&&(r[t]=()=>a[t]);n.d(e,r);n(51042);const o=(0,n(51900).default)(a.default,s.render,s.staticRenderFns,!1,null,null,null).exports},61539:(t,e,n)=>{"use strict";n.r(e),n.d(e,{default:()=>r});var s=n(85528),a={};for(const t in s)"default"!==t&&(a[t]=()=>s[t]);n.d(e,a);const r=s.default},51042:(t,e,n)=>{"use strict";n.r(e);var s=n(60588),a={};for(const t in s)"default"!==t&&(a[t]=()=>s[t]);n.d(e,a)},6939:(t,e,n)=>{"use strict";n.r(e);var s=n(54995),a={};for(const t in s)"default"!==t&&(a[t]=()=>s[t]);n.d(e,a)},54995:(t,e,n)=>{"use strict";n.r(e),n.d(e,{render:()=>s,staticRenderFns:()=>a});var s=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"w-100 h-100"},[t.loading?n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]):n("div",[n("div",{staticClass:"mb-4"},[n("p",{staticClass:"text-center"},[n("a",{class:["new"==t.tab?"btn font-weight-bold py-0 btn-success":"btn font-weight-bold py-0 btn-outline-success"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setTab("new")}}},[t._v("New")]),t._v(" "),n("a",{class:["about"==t.tab?"btn font-weight-bold py-0 btn-success":"btn font-weight-bold py-0 btn-outline-success"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.setTab("about")}}},[t._v("About")])])]),t._v(" "),"about"!=t.tab?n("div",{staticClass:"row loops-container"},t._l(t.loops,(function(e,s){return n("div",{staticClass:"col-12 col-md-4 mb-3"},[n("div",{staticClass:"card border border-success"},[n("div",{staticClass:"embed-responsive embed-responsive-1by1"},[n("video",{staticClass:"embed-responsive-item",attrs:{src:t.videoSrc(e),preload:"none",width:"100%",height:"100%",loop:"",poster:t.posterSrc(e)},on:{click:function(n){return t.toggleVideo(e,n)}}})]),t._v(" "),n("div",{staticClass:"card-body"},[n("p",{staticClass:"username font-weight-bolder lead d-flex justify-content-between"},[n("a",{attrs:{href:e.account.url,title:e.account.acct}},[t._v(t._s(t.truncate(e.account.acct)))]),t._v(" "),n("a",{attrs:{href:e.url}},[t._v(t._s(t.timestamp(e)))])]),t._v(" "),n("p",{staticClass:"small text-muted text-truncate",domProps:{innerHTML:t._s(t.getTitle(e))}}),t._v(" "),n("div",{staticClass:"small text-muted d-flex justify-content-between mb-0"},[n("span",[t._v(t._s(e.favourites_count)+" Likes")]),t._v(" "),n("span",[t._v(t._s(e.reblogs_count)+" Shares")]),t._v(" "),n("span",[t._v(t._s(e.reply_count)+" Comments")])])])])])})),0):n("div",{staticClass:"col-12"},[t._m(0)])])])},a=[function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"card"},[n("div",{staticClass:"card-body"},[n("p",{staticClass:"lead text-center mb-0"},[t._v("Loops are an exciting new way to explore short videos on Pixelfed.")])])])}]}},t=>{t.O(0,[898],(()=>{return e=45502,t(t.s=e);var e}));t.O()}]);