diff --git a/public/js/activity.js b/public/js/activity.js index 829344ea0..66eea31c7 100644 --- a/public/js/activity.js +++ b/public/js/activity.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{1:function(t,a,e){t.exports=e("hUgz")},"KHd+":function(t,a,e){"use strict";function o(t,a,e,o,n,s,i,r){var c,l="function"==typeof t?t.options:t;if(a&&(l.render=a,l.staticRenderFns=e,l._compiled=!0),o&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),i?(c=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__),n&&n.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=c):n&&(c=r?function(){n.call(this,this.$root.$options.shadowRoot)}:n),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,a){return c.call(a),u(t,a)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}e.d(a,"a",(function(){return o}))},hUgz:function(t,a,e){Vue.component("activity-component",e("tXHz").default)},tXHz:function(t,a,e){"use strict";e.r(a);function o(t){return function(t){if(Array.isArray(t)){for(var a=0,e=new Array(t.length);a10?t.complete():axios.get("/api/pixelfed/v1/notifications",{params:{pg:!0,page:this.notificationCursor}}).then((function(e){if(e.data.length){var n,s=e.data.filter((function(t){return!("share"==t.type&&!status)&&!_.find(a.notifications,{id:t.id})}));(n=a.notifications).push.apply(n,o(s)),a.notificationCursor++,t.loaded()}else t.complete()}))},truncate:function(t){return t.length<=15?t:t.slice(0,15)+"..."},timeAgo:function(t){var a=Date.parse(t),e=Math.floor((new Date-a)/1e3),o=Math.floor(e/31536e3);return o>=1?o+"y":(o=Math.floor(e/604800))>=1?o+"w":(o=Math.floor(e/86400))>=1?o+"d":(o=Math.floor(e/3600))>=1?o+"h":(o=Math.floor(e/60))>=1?o+"m":Math.floor(e)+"s"},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},followProfile:function(t){var a=this,e=t.account.id;axios.post("/i/follow",{item:e}).then((function(t){a.notifications.map((function(t){t.account.id===e&&(t.relationship.following=!0)}))})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},viewContext:function(t){switch(t.type){case"follow":return t.account.url;case"mention":return t.status.url;case"like":case"favourite":case"comment":return t.status.url;case"tagged":return t.tagged.post_url}return"/"}}},s=e("KHd+"),i=Object(s.a)(n,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"container"},[e("div",{staticClass:"row my-5"},[e("div",{staticClass:"col-12 col-md-8 offset-md-2"},[t._l(t.notifications,(function(a,o){return t.notifications.length>0?e("div",{staticClass:"media mb-3 align-items-center px-3 border-bottom pb-3"},[e("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:a.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),e("div",{staticClass:"media-body font-weight-light"},["favourite"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" liked your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"comment"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" commented on your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"mention"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(a.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t\t")])]):"follow"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" followed you.\n\t\t\t\t\t\t\t")])]):"share"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" shared your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"modlog"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" updated a "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.modlog.url}},[t._v("modlog")]),t._v(".\n\t\t\t\t\t\t\t")])]):"tagged"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" tagged you in a "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.tagged.post_url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),e("div",{staticClass:"align-items-center"},[e("span",{staticClass:"small text-muted",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.created_at}},[t._v(t._s(t.timeAgo(a.created_at)))])])]),t._v(" "),e("div",[a.status&&a.status&&a.status.media_attachments&&a.status.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.url}},[e("img",{attrs:{src:a.status.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):a.status&&a.status.parent&&a.status.parent.media_attachments&&a.status.parent.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.parent.url}},[e("img",{attrs:{src:a.status.parent.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):e("div",[e("a",{staticClass:"btn btn-outline-primary py-0 font-weight-bold",attrs:{href:t.viewContext(a)}},[t._v("View")])])])]):t._e()})),t._v(" "),t.notifications.length?e("div",[e("infinite-loading",{on:{infinite:t.infiniteNotifications}},[e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?e("div",{staticClass:"text-lighter text-center py-3"},[t._m(0),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])])])}),[function(){var t=this.$createElement,a=this._self._c||t;return a("p",{staticClass:"mb-0"},[a("i",{staticClass:"fas fa-inbox fa-3x"})])}],!1,null,null,null);a.default=i.exports}},[[1,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{1:function(t,a,e){t.exports=e("hUgz")},"KHd+":function(t,a,e){"use strict";function n(t,a,e,n,o,s,i,r){var c,l="function"==typeof t?t.options:t;if(a&&(l.render=a,l.staticRenderFns=e,l._compiled=!0),n&&(l.functional=!0),s&&(l._scopeId="data-v-"+s),i?(c=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__),o&&o.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(i)},l._ssrRegister=c):o&&(c=r?function(){o.call(this,this.$root.$options.shadowRoot)}:o),c)if(l.functional){l._injectStyles=c;var u=l.render;l.render=function(t,a){return c.call(a),u(t,a)}}else{var d=l.beforeCreate;l.beforeCreate=d?[].concat(d,c):[c]}return{exports:t,options:l}}e.d(a,"a",(function(){return n}))},hUgz:function(t,a,e){Vue.component("activity-component",e("tXHz").default)},tXHz:function(t,a,e){"use strict";e.r(a);function n(t){return function(t){if(Array.isArray(t)){for(var a=0,e=new Array(t.length);a10?t.complete():axios.get("/api/pixelfed/v1/notifications",{params:{pg:!0,page:this.notificationCursor}}).then((function(e){if(e.data.length){var o,s=e.data.filter((function(t){return!("share"==t.type&&!status)&&!_.find(a.notifications,{id:t.id})}));(o=a.notifications).push.apply(o,n(s)),a.notificationCursor++,t.loaded()}else t.complete()}))},truncate:function(t){return t.length<=15?t:t.slice(0,15)+"..."},timeAgo:function(t){var a=Date.parse(t),e=Math.floor((new Date-a)/1e3),n=Math.floor(e/31536e3);return n>=1?n+"y":(n=Math.floor(e/604800))>=1?n+"w":(n=Math.floor(e/86400))>=1?n+"d":(n=Math.floor(e/3600))>=1?n+"h":(n=Math.floor(e/60))>=1?n+"m":Math.floor(e)+"s"},mentionUrl:function(t){return"/p/"+t.account.username+"/"+t.id},followProfile:function(t){var a=this,e=t.account.id;axios.post("/i/follow",{item:e}).then((function(t){a.notifications.map((function(t){t.account.id===e&&(t.relationship.following=!0)}))})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},viewContext:function(t){switch(t.type){case"follow":return t.account.url;case"mention":return t.status.url;case"like":case"favourite":case"comment":return t.status.url;case"tagged":return t.tagged.post_url;case"direct":return"/account/direct/t/"+t.account.id}return"/"}}},s=e("KHd+"),i=Object(s.a)(o,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",[e("div",{staticClass:"container"},[e("div",{staticClass:"row my-5"},[e("div",{staticClass:"col-12 col-md-8 offset-md-2"},[t._l(t.notifications,(function(a,n){return t.notifications.length>0?e("div",{staticClass:"media mb-3 align-items-center px-3 border-bottom pb-3"},[e("img",{staticClass:"mr-2 rounded-circle",staticStyle:{border:"1px solid #ccc"},attrs:{src:a.account.avatar,alt:"",width:"32px",height:"32px"}}),t._v(" "),e("div",{staticClass:"media-body font-weight-light"},["favourite"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" liked your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"comment"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" commented on your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"mention"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" "),e("a",{staticClass:"font-weight-bold",attrs:{href:t.mentionUrl(a.status)}},[t._v("mentioned")]),t._v(" you.\n\t\t\t\t\t\t\t")])]):"follow"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" followed you.\n\t\t\t\t\t\t\t")])]):"share"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,"data-placement":"bottom","data-toggle":"tooltip",title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" shared your "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.status.reblog.url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"modlog"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" updated a "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.modlog.url}},[t._v("modlog")]),t._v(".\n\t\t\t\t\t\t\t")])]):"tagged"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" tagged you in a "),e("a",{staticClass:"font-weight-bold",attrs:{href:a.tagged.post_url}},[t._v("post")]),t._v(".\n\t\t\t\t\t\t\t")])]):"direct"==a.type?e("div",[e("p",{staticClass:"my-0"},[e("a",{staticClass:"font-weight-bold text-dark word-break",attrs:{href:a.account.url,title:a.account.username}},[t._v(t._s(t.truncate(a.account.username)))]),t._v(" sent a "),e("a",{staticClass:"font-weight-bold",attrs:{href:"/account/direct/t/"+a.account.id}},[t._v("dm")]),t._v(".\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),e("div",{staticClass:"align-items-center"},[e("span",{staticClass:"small text-muted",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:a.created_at}},[t._v(t._s(t.timeAgo(a.created_at)))])])]),t._v(" "),e("div",[a.status&&a.status&&a.status.media_attachments&&a.status.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.url}},[e("img",{attrs:{src:a.status.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):a.status&&a.status.parent&&a.status.parent.media_attachments&&a.status.parent.media_attachments.length?e("div",[e("a",{attrs:{href:a.status.parent.url}},[e("img",{attrs:{src:a.status.parent.media_attachments[0].preview_url,width:"32px",height:"32px"}})])]):e("div",[e("a",{staticClass:"btn btn-outline-primary py-0 font-weight-bold",attrs:{href:t.viewContext(a)}},[t._v("View")])])])]):t._e()})),t._v(" "),t.notifications.length?e("div",[e("infinite-loading",{on:{infinite:t.infiniteNotifications}},[e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),e("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e(),t._v(" "),0==t.notifications.length?e("div",{staticClass:"text-lighter text-center py-3"},[t._m(0),t._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold"},[t._v("0 Notifications!")])]):t._e()],2)])])])}),[function(){var t=this.$createElement,a=this._self._c||t;return a("p",{staticClass:"mb-0"},[a("i",{staticClass:"fas fa-inbox fa-3x"})])}],!1,null,null,null);a.default=i.exports}},[[1,0]]]); \ No newline at end of file diff --git a/public/js/compose.js b/public/js/compose.js index 84c03885c..3b8aaa1fa 100644 --- a/public/js/compose.js +++ b/public/js/compose.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"0ox+":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,'.autocomplete-input{border:1px solid #eee;border-radius:8px;width:100%;padding:12px 12px 12px 48px;box-sizing:border-box;position:relative;font-size:16px;line-height:1.5;-webkit-box-flex:1;flex:1;background-color:#eee;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-input:focus,.autocomplete-input[aria-expanded=true]{border-color:rgba(0,0,0,.12);background-color:#fff;outline:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-input[aria-expanded=true]{border-bottom-color:transparent;border-radius:8px 8px 0 0}[data-position=above] .autocomplete-input[aria-expanded=true]{border-top-color:transparent;border-radius:0 0 8px 8px;z-index:2}.autocomplete[data-loading=true]:after{content:"";border:3px solid rgba(0,0,0,.12);border-right-color:rgba(0,0,0,.48);border-radius:100%;width:20px;height:20px;position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.autocomplete-result-list{margin:0;border:1px solid rgba(0,0,0,.12);padding:0;box-sizing:border-box;max-height:296px;overflow-y:auto;background:#fff;list-style:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-result-list{margin-top:-1px;border-top-color:transparent;border-radius:0 0 8px 8px;padding-bottom:8px}[data-position=above] .autocomplete-result-list{margin-bottom:-1px;border-bottom-color:transparent;border-radius:8px 8px 0 0;padding-top:8px}.autocomplete-result{cursor:default;padding:12px 12px 12px 48px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-result:hover,.autocomplete-result[aria-selected=true]{background-color:rgba(0,0,0,.06)}@-webkit-keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}',""])},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.6\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2019-10-04T04:33:44.164Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n",""])},7:function(t,e,i){t.exports=i("K0g3")},"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 i=e.protocol+"//"+e.host,a=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,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:(n=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:a+o.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",a=t[3];if(!a)return i;if(e&&"function"==typeof btoa){var n=(r=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),o=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[i].concat(o).concat([n]).join("\n")}var r;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},n=0;n=0&&h.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 i.nc}();a&&(t.attrs.nonce=a)}return b(e,t.attrs),m(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,a,n,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 r=d++;i=l||(l=v(e)),a=C.bind(null,i,r,!1),n=C.bind(null,i,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),m(t,e),e}(e),a=k.bind(null,i,e),n=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),a=_.bind(null,i),n=function(){g(i)});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 n()}}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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=f(t,e);return u(i,e),function(t){for(var a=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=n.search,r=n.autoSelect,l=void 0!==r&&r,d=n.setValue,h=void 0===d?function(){}:d,p=n.setAttribute,u=void 0===p?function(){}:p,f=n.onUpdate,m=void 0===f?function(){}:f,g=n.onSubmit,v=void 0===g?function(){}:g,b=n.onShow,w=void 0===b?function(){}:b,x=n.onHide,y=void 0===x?function(){}:x,C=n.onLoading,_=void 0===C?function(){}:C,k=n.onLoaded,D=void 0===k?function(){}:k;i(this,t),a(this,"value",""),a(this,"searchCounter",0),a(this,"results",[]),a(this,"selectedIndex",-1),a(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var a="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(a);break;case"Tab":e.selectResult();break;case"Enter":var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),a(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleBlur",(function(){e.hideResults()})),a(this,"handleResultMouseDown",(function(t){t.preventDefault()})),a(this,"handleResultClick",(function(t){var i=t.target,a=s(i,"[data-result-index]");if(a){e.selectedIndex=parseInt(a.dataset.resultIndex,10);var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n)}})),a(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),a(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),a(this,"updateResults",(function(t){var i=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){i===e.searchCounter&&(e.results=t,e.onLoaded(),0!==e.results.length?(e.selectedIndex=e.autoSelect?0:-1,e.onUpdate(e.results,e.selectedIndex),e.showResults()):e.hideResults())}))})),a(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),a(this,"hideResults",(function(){e.selectedIndex=-1,e.results=[],e.setAttribute("aria-expanded",!1),e.setAttribute("aria-activedescendant",""),e.onUpdate(e.results,e.selectedIndex),e.onHide()})),a(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var a=t.getBoundingClientRect(),n=i.getBoundingClientRect();n.topa.bottom&&(t.scrollTop+=n.bottom-a.bottom)}})),this.search=c(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=l,this.setValue=h,this.setAttribute=u,this.onUpdate=m,this.onSubmit=v,this.onShow=w,this.onHide=y,this.onLoading=_,this.onLoaded=D},d=0,h=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,i,a,n,o,r,s,c,l){"boolean"!=typeof r&&(c=s,s=r,r=!1);const d="function"==typeof i?i.options:i;let h;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,n&&(d.functional=!0)),a&&(d._scopeId=a),o?(h=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__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},d._ssrRegister=h):e&&(h=r?function(t){e.call(this,l(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),h)if(d.functional){const t=d.render;d.render=function(e,i){return h.call(i),t(e,i)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,h):[h]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"root"},[t._t("default",[i("div",t._b({},"div",t.rootProps,!1),[i("input",t._g(t._b({ref:"input",on:{input:t.handleInput,keydown:t.core.handleKeyDown,focus:t.core.handleFocus,blur:t.core.handleBlur}},"input",t.inputProps,!1),t.$listeners)),t._v(" "),i("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,a){return[t._t("result",[i("li",t._b({key:t.resultProps[a].id},"li",t.resultProps[a],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[a]})]}))],2)])],{rootProps:t.rootProps,inputProps:t.inputProps,inputListeners:t.inputListeners,resultListProps:t.resultListProps,resultListListeners:t.resultListListeners,results:t.results,resultProps:t.resultProps})],2)},staticRenderFns:[]},void 0,{name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(t){return t}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var t,e,i,a,n=new l({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(n.handleInput=(t=n.handleInput,e=this.debounceTime,function(){var n=this,o=arguments,r=function(){a=null,i||t.apply(n,o)},s=i&&!a;clearTimeout(a),a=setTimeout(r,e),s&&t.apply(n,o)})),{core:n,value:this.defaultValue,resultListId:h("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return o({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var t="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:a({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},t,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var t=this;return this.results.map((function(e,i){return o({id:"".concat(t.baseClass,"-result-").concat(i),class:"".concat(t.baseClass,"-result"),"data-result-index":i,role:"option"},t.selectedIndex===i?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,i,a;this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=(t=this.$refs.input,e=this.$refs.resultList,i=t.getBoundingClientRect(),a=e.getBoundingClientRect(),i.bottom+a.height>window.innerHeight&&window.innerHeight-i.bottom0?"above":"below")),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(t){this.value=t?this.getResultValue(t):""},handleUpdate:function(t,e){this.results=t,this.selectedIndex=e,this.$emit("update",t,e)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(t){this.value=t.target.value,this.core.handleInput(t)},handleSubmit:function(t){this.$emit("submit",t)},handleDocumentClick:function(t){this.$refs.root.contains(t.target)||this.core.hideResults()}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function u(t){u.installed||(u.installed=!0,t.component("Autocomplete",p))}var f,m={install:u};"undefined"!=typeof window?f=window.Vue:void 0!==t&&(f=t.Vue),f&&f.use(m),p.install=u,e.a=p}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,n=i("urRO"),o=(a=n)&&a.__esModule?a:{default:a};var r="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%"},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:r,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props,e=(t.containerStyle,t.src,t.alt,t.imgStyle,function(t,e){var i={};for(var a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var a in e)void 0!==this[a]&&(i[a]=this[a]);this.cropper=new o.default(this.$refs.img,i)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}}},qLbV:function(t,e,i){var a=i("kHgw");"string"==typeof a&&(a=[[t.i,a,""]]);var n={hmr:!0,transform:void 0,insertInto:void 0};i("aET+")(a,n);a.locals&&(t.exports=a.locals)},urRO:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i0&&t<1/0};function E(t){return void 0===t}function O(e){return"object"===t(e)&&null!==e}var I=Object.prototype.hasOwnProperty;function N(t){if(!O(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&I.call(i,"isPrototypeOf")}catch(t){return!1}}function j(t){return"function"==typeof t}var z=Array.prototype.slice;function H(t){return Array.from?Array.from(t):z.call(t)}function U(t,e){return t&&j(e)&&(Array.isArray(t)||P(t.length)?H(t).forEach((function(i,a){e.call(t,i,a,t)})):O(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var W=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a0&&i.forEach((function(e){O(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Y=/\.\d*(?:0|9){12}\d*$/;function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Y.test(t)?Math.round(t*e)/e:t}var X=/^width|height|left|top|marginLeft|marginTop$/;function F(t,e){var i=t.style;U(e,(function(t,e){X.test(e)&&P(t)&&(t="".concat(t,"px")),i[e]=t}))}function V(t,e){if(e)if(P(t.length))U(t,(function(t){V(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Z(t,e){e&&(P(t.length)?U(t,(function(t){Z(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function q(t,e,i){e&&(P(t.length)?U(t,(function(t){q(t,e,i)})):i?V(t,e):Z(t,e))}var G=/([a-z\d])([A-Z])/g;function Q(t){return t.replace(G,"$1-$2").toLowerCase()}function J(t,e){return O(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Q(e)))}function K(t,e,i){O(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Q(e)),i)}var tt=/\s\s*/,et=function(){var t=!1;if(s){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,a),c.removeEventListener("test",i,a)}return t}();function it(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(!et){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function at(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(a.once&&!et){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,s=new Array(o),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",o=L(a),r=L(i);if(o&&r){var s=i*e;"contain"===n&&s>a||"cover"===n&&s=8&&(o=c+d)}}}if(o){var h,p,u=i.getUint16(o,a);for(p=0;pt.width?3===i?s=t.height*r:c=t.width/r:3===i?c=t.width/r:s=t.height*r;var l={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:s,height:c};l.left=(t.width-s)/2,l.top=(t.height-c)/2,l.oldLeft=l.left,l.oldTop=l.top,this.canvasData=l,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=W({},e),this.initialCanvasData=W({},l)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=n.aspectRatio,c=this.cropped&&o;if(t){var l=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;r>1?(l=Math.max(l,a.width),d=Math.max(d,a.height),3===r&&(d*s>l?l=d*s:d=l/s)):r>0&&(l?l=Math.max(l,c?o.width:0):d?d=Math.max(d,c?o.height:0):c&&(l=o.width,(d=o.height)*s>l?l=d*s:d=l/s));var h=pt({aspectRatio:s,width:l,height:d});l=h.width,d=h.height,n.minWidth=l,n.minHeight=d,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(c?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),c&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),s=e*r+i*o,c=e*o+i*r;return a>90?{width:c,height:s}:{width:s,height:c}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,s=i.width*(o/i.naturalWidth),c=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(c-i.height)/2,i.width=s,i.height=c,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=W({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,s=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,d=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,h=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;c=Math.min(c,a.width),l=Math.min(l,a.height),s&&(c&&l?l*s>c?l=c/s:c=l*s:c?l=c/s:l&&(c=l*s),h*s>d?h=d/s:d=h*s),o.minWidth=Math.min(c,d),o.minHeight=Math.min(l,h),o.maxWidth=d,o.maxHeight=h}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?"move":"all"),F(this.cropBox,W({width:i.width,height:i.height},dt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),nt(this.element,"crop",this.getData())}},bt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,U(r,(function(t){var i=document.createElement("img");K(t,w,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){U(this.previews,(function(t){var e=J(t,w);F(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(O(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Q(e)))}(t,w)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,s=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(F(this.viewBoxImage,W({width:o,height:r},dt(W({translateX:-s,translateY:-c},t)))),U(this.previews,(function(e){var i=J(e,w),l=i.width,d=i.height,h=l,p=d,u=1;a&&(p=n*(u=l/a)),n&&p>d&&(h=a*(u=d/n),p=d),F(e,{width:h,height:p}),F(e.getElementsByTagName("img")[0],W({width:o*u,height:r*u},dt(W({translateX:-s*u,translateY:-c*u},t))))})))}},wt={bind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&at(t,"cropstart",e.cropstart),j(e.cropmove)&&at(t,"cropmove",e.cropmove),j(e.cropend)&&at(t,"cropend",e.cropend),j(e.crop)&&at(t,"crop",e.crop),j(e.zoom)&&at(t,"zoom",e.zoom),at(i,_,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&at(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&at(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),at(t.ownerDocument,k,this.onCropMove=this.cropMove.bind(this)),at(t.ownerDocument,D,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&at(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&it(t,"cropstart",e.cropstart),j(e.cropmove)&&it(t,"cropmove",e.cropmove),j(e.cropend)&&it(t,"cropend",e.cropend),j(e.crop)&&it(t,"crop",e.crop),j(e.zoom)&&it(t,"zoom",e.zoom),it(i,_,this.onCropStart),e.zoomable&&e.zoomOnWheel&&it(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&it(i,"dblclick",this.onDblclick),it(t.ownerDocument,k,this.onCropMove),it(t.ownerDocument,D,this.onCropEnd),e.responsive&&it(window,"resize",this.onResize)}},xt={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=a||i.height<=n)){var o,r,s=e.offsetWidth/i.width;1===s&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(U(o,(function(t,e){o[e]=t*s}))),this.setCropBoxData(U(r,(function(t,e){r[e]=t*s})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=h,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(P(e)&&1!==e||P(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){o[t.identifier]=ht(t)})):o[t.pointerId||0]=ht(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?"zoom":J(t.target,b),M.test(a)&&!1!==nt(this.element,"cropstart",{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,"crop"===a&&(this.cropping=!0,V(this.dragBox,g)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==nt(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){W(i[t.identifier]||{},ht(t,!0))})):W(i[t.pointerId||0]||{},ht(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,q(this.dragBox,g,this.cropped&&this.options.modal)),nt(this.element,"cropend",{originalEvent:t,action:e}))}}},yt={change:function(t){var e,i=this.options,a=this.canvasData,n=this.containerData,r=this.cropBoxData,s=this.pointers,c=this.action,l=i.aspectRatio,d=r.left,h=r.top,p=r.width,f=r.height,m=d+p,g=h+f,v=0,b=0,w=n.width,x=n.height,y=!0;!l&&t.shiftKey&&(l=p&&f?p/f:1),this.limited&&(v=r.minLeft,b=r.minTop,w=v+Math.min(n.width,a.width,a.left+a.width),x=b+Math.min(n.height,a.height,a.top+a.height));var C=s[Object.keys(s)[0]],_={x:C.endX-C.startX,y:C.endY-C.startY},k=function(t){switch(t){case"e":m+_.x>w&&(_.x=w-m);break;case"w":d+_.xx&&(_.y=x-g)}};switch(c){case"all":d+=_.x,h+=_.y;break;case"e":if(_.x>=0&&(m>=w||l&&(h<=b||g>=x))){y=!1;break}k("e"),(p+=_.x)<0&&(c="w",d-=p=-p),l&&(f=p/l,h+=(r.height-f)/2);break;case"n":if(_.y<=0&&(h<=b||l&&(d<=v||m>=w))){y=!1;break}k("n"),f-=_.y,h+=_.y,f<0&&(c="s",h-=f=-f),l&&(p=f*l,d+=(r.width-p)/2);break;case"w":if(_.x<=0&&(d<=v||l&&(h<=b||g>=x))){y=!1;break}k("w"),p-=_.x,d+=_.x,p<0&&(c="e",d-=p=-p),l&&(f=p/l,h+=(r.height-f)/2);break;case"s":if(_.y>=0&&(g>=x||l&&(d<=v||m>=w))){y=!1;break}k("s"),(f+=_.y)<0&&(c="n",h-=f=-f),l&&(p=f*l,d+=(r.width-p)/2);break;case"ne":if(l){if(_.y<=0&&(h<=b||m>=w)){y=!1;break}k("n"),f-=_.y,h+=_.y,p=f*l}else k("n"),k("e"),_.x>=0?mb&&(f-=_.y,h+=_.y):(f-=_.y,h+=_.y);p<0&&f<0?(c="sw",h-=f=-f,d-=p=-p):p<0?(c="nw",d-=p=-p):f<0&&(c="se",h-=f=-f);break;case"nw":if(l){if(_.y<=0&&(h<=b||d<=v)){y=!1;break}k("n"),f-=_.y,h+=_.y,p=f*l,d+=r.width-p}else k("n"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y<=0&&h<=b&&(y=!1):(p-=_.x,d+=_.x),_.y<=0?h>b&&(f-=_.y,h+=_.y):(f-=_.y,h+=_.y);p<0&&f<0?(c="se",h-=f=-f,d-=p=-p):p<0?(c="ne",d-=p=-p):f<0&&(c="sw",h-=f=-f);break;case"sw":if(l){if(_.x<=0&&(d<=v||g>=x)){y=!1;break}k("w"),p-=_.x,d+=_.x,f=p/l}else k("s"),k("w"),_.x<=0?d>v?(p-=_.x,d+=_.x):_.y>=0&&g>=x&&(y=!1):(p-=_.x,d+=_.x),_.y>=0?g=0&&(m>=w||g>=x)){y=!1;break}k("e"),f=(p+=_.x)/l}else k("s"),k("e"),_.x>=0?m=0&&g>=x&&(y=!1):p+=_.x,_.y>=0?g0?c=_.y>0?"se":"ne":_.x<0&&(d-=p,c=_.y>0?"sw":"nw"),_.y<0&&(h-=f),this.cropped||(Z(this.cropBox,u),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}y&&(r.width=p,r.height=f,r.left=d,r.top=h,this.action=c,this.renderCropBox()),U(s,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Ct={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&V(this.dragBox,g),Z(this.cropBox,u),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,g),V(this.cropBox,u)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,U(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Z(this.cropper,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,V(this.cropper,p)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(E(t)?t:a+Number(t),E(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(P(t)&&(i.left=t,a=!0),P(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,s=n.naturalWidth,c=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var l=s*t,d=c*t;if(!1===nt(this.element,"zoom",{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var h=this.pointers,p=ot(this.cropper),u=h&&Object.keys(h).length?function(t){var e=0,i=0,a=0;return U(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}(h):{pageX:i.pageX,pageY:i.pageY};n.left-=(l-o)*((u.pageX-p.left-n.left)/o),n.top-=(d-r)*((u.pageY-p.top-n.top)/r)}else N(e)&&P(e.x)&&P(e.y)?(n.left-=(l-o)*((e.x-n.left)/o),n.top-=(d-r)*((e.y-n.top)/r)):(n.left-=(l-o)/2,n.top-=(d-r)/2);n.width=l,n.height=d,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return P(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,P(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(P(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(P(t)&&(i.scaleX=t,a=!0),P(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(U(t,(function(e,i){t[i]=e/r})),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&N(t)){var o=!1;e.rotatable&&P(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(P(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),P(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;P(t.x)&&(n.left=t.x*r+a.left),P(t.y)&&(n.top=t.y*r+a.top),P(t.width)&&(n.width=t.width*r),P(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&U(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&N(t)&&(P(t.left)&&(e.left=t.left),P(t.top)&&(e.top=t.top),P(t.width)?(e.width=t.width,e.height=t.width/i):P(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&N(t)&&(P(t.left)&&(a.left=t.left),P(t.top)&&(a.top=t.top),P(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),P(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ut(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,o=a.y,s=a.width,c=a.height,l=i.width/Math.floor(e.naturalWidth);1!==l&&(n*=l,o*=l,s*=l,c*=l);var d=s/c,h=pt({aspectRatio:d,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=pt({aspectRatio:d,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=pt({aspectRatio:d,width:t.width||(1!==l?i.width:s),height:t.height||(1!==l?i.height:c)}),f=u.width,m=u.height;f=Math.min(h.width,Math.max(p.width,f)),m=Math.min(h.height,Math.max(p.height,m));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=$(f),g.height=$(m),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,f,m);var b=t.imageSmoothingEnabled,w=void 0===b||b,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,x&&(v.imageSmoothingQuality=x);var y,C,_,k,D,M,T=i.width,S=i.height,A=n,B=o;A<=-s||A>T?(A=0,y=0,_=0,D=0):A<=0?(_=-A,A=0,D=y=Math.min(T,s+A)):A<=T&&(_=0,D=y=Math.min(s,T-A)),y<=0||B<=-c||B>S?(B=0,C=0,k=0,M=0):B<=0?(k=-B,B=0,M=C=Math.min(S,c+B)):B<=S&&(k=0,M=C=Math.min(c,S-B));var R=[A,B,y,C];if(D>0&&M>0){var P=f/s;R.push(_*P,k*P,D*P,M*P)}return v.drawImage.apply(v,[i].concat(r(R.map((function(t){return Math.floor($(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||E(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n="crop"===t,o=e.movable&&"move"===t;t=n||o?t:"none",e.dragMode=t,K(i,b,t),q(i,h,n),q(i,v,o),e.cropBoxMovable||(K(a,b,t),q(a,h,n),q(a,v,o))}return this}},_t=c.Cropper,kt=function(){function t(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!A.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=W({},B,N(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var a,n,o;return a=t,o=[{key:"noConflict",value:function(){return window.Cropper=_t,t}},{key:"setDefaults",value:function(t){W(B,N(t)&&t)}}],(n=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(T.test(t))S.test(t)?this.read((n=t.replace(mt,""),o=atob(n),r=new ArrayBuffer(o.length),U(s=new Uint8Array(r),(function(t,e){s[e]=o.charCodeAt(e)})),r)):this.clone();else{var n,o,r,s,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=lt(t)),c.open("GET",t),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=gt(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(ft.apply(null,H(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var s=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=s.rotate,o=s.scaleX,r=s.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),a=lt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),V(n,f),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),a=function(e,i){W(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='
';var o=n.querySelector(".".concat("cropper","-container")),r=o.querySelector(".".concat("cropper","-canvas")),s=o.querySelector(".".concat("cropper","-drag-box")),c=o.querySelector(".".concat("cropper","-crop-box")),l=c.querySelector(".".concat("cropper","-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=l,r.appendChild(i),V(t,u),a.insertBefore(o,t.nextSibling),this.isImg||Z(i,f),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,V(c,u),e.guides||V(c.getElementsByClassName("".concat("cropper","-dashed")),u),e.center||V(c.getElementsByClassName("".concat("cropper","-center")),u),e.background&&V(o,"".concat("cropper","-bg")),e.highlight||V(l,m),e.cropBoxMovable&&(V(l,v),K(l,b,"all")),e.cropBoxResizable||(V(c.getElementsByClassName("".concat("cropper","-line")),u),V(c.getElementsByClassName("".concat("cropper","-point")),u)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),j(e.ready)&&at(t,"ready",e.ready,{once:!0}),nt(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,u))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&i(a.prototype,n),o&&i(a,o),t}();return W(kt.prototype,vt,bt,wt,xt,yt,Ct),kt}()},yLpj:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},zlB4:function(t,e,i){"use strict";i.r(e);var a=i("lcPr"),n=i.n(a),o=(i("YQfW"),i("lb/t"));i("i3gq");function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var s={components:{VueCropper:n.a,Autocomplete:o.a},data:function(){var t;return r(t={config:window.App.config,pageLoading:!1,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),r(t,"place",!1),r(t,"commentsDisabled",!1),r(t,"pageTitle",""),r(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),r(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp"]),r(t,"cameraRollMedia",[]),r(t,"taggedUsernames",[]),r(t,"taggedPeopleSearch",null),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post"),this.filters=window.App.util.filters},mounted:function(){this.mediaWatcher()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window.pixelfed.currentUser=e.data,1==e.data.locked&&(t.visibility="private",t.visibilityTag="Followers Only")})).catch((function(t){}))},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},mediaWatcher:function(){var t=this;$(document).on("change","#pf-dz",(function(e){t.mediaUpload()}))},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");Array.prototype.forEach.call(e.files,(function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)return swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error"),t.uploading=!1,void(t.page=2);var a=e.type,n=t.config.uploader.media_types.split(",");if(-1==$.inArray(a,n))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),t.uploading=!1,void(t.page=2);var o=new FormData;o.append("file",e);var r={onUploadProgress:function(e){var i=Math.round(100*e.loaded/e.total);t.uploadProgress=i}};axios.post("/api/pixelfed/v1/media",o,r).then((function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.uploading=!1,setTimeout((function(){t.page=2}),300)})).catch((function(i){switch(i.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error"),t.page=2;break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error"),t.page=2}})),e.value=null,t.uploadProgress=0}))},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e,this.currentFilter=e},deleteMedia:function(){var t=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var e=this.media[this.carouselCursor].id;axios.delete("/api/pixelfed/v1/media",{params:{id:e}}).then((function(e){t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1),0==t.media.length?(t.ids=[],t.media=[],t.carouselCursor=0):t.carouselCursor=0})).catch((function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},compose:function(){var t=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":if(0==this.media.length)return void swal("Whoops!","You need to add media before you can save this!","warning");"Add optional caption..."==this.composeText&&(this.composeText="");var e={media:this.media,caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames};return void axios.post("/api/local/status/compose",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},closeModal:function(){this.composeType="",$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",this.page){case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;default:-1!=this.namedPages.indexOf(this.page)?this.page=3:this.page--}},nextPage:function(){switch(this.pageTitle="",this.page){case 1:this.page=2;break;case"cropPhoto":this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob((function(e){var i=new FormData;i.append("file",e);var a="/api/local/compose/media/update/"+t.ids[t.carouselCursor];axios.post(a,i).then((function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2})).catch((function(t){}))}));break;case 2:this.currentFilter?window.confirm("Are you sure you want to apply this filter?")&&(this.applyFilterToMedia(),this.page++):this.page++;break;case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},showTagHelpCard:function(){this.pageTitle="About Tag People",this.page="tagPeopleHelp"},showLocationCard:function(){this.pageTitle="Add Location",this.page="addLocation"},showAdvancedSettingsCard:function(){this.pageTitle="Advanced Settings",this.page="advancedSettings"},locationSearch:function(t){if(t.length<1)return[];return axios.get("/api/local/compose/location/search",{params:{q:t}}).then((function(t){return t.data}))},getResultValue:function(t){return t.name+", "+t.country},onSubmitLocation:function(t){this.place=t,this.pageTitle="",this.page=3},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},showCropPhotoCard:function(){this.pageTitle="Edit Photo",this.page="cropPhoto"},toggleVisibility:function(t){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=3},showMediaDescriptionsCard:function(){this.pageTitle="Media Descriptions",this.page="altText"},showAddToCollectionsCard:function(){this.pageTitle="Add to Collection",this.page="addToCollection"},showSchedulePostCard:function(){this.pageTitle="Schedule Post",this.page="schedulePost"},showEditMediaCard:function(){this.pageTitle="Edit Media",this.page="editMedia"},fetchCameraRollDrafts:function(){var t=this;axios.get("/api/pixelfed/local/drafts").then((function(e){t.cameraRollMedia=e.data}))},applyFilterToMedia:function(){},tagSearch:function(t){if(t.length<1)return[];var e=this;return axios.get("/api/local/compose/tag/search",{params:{q:t}}).then((function(t){return t.data.filter((function(t){return 0==e.taggedUsernames.filter((function(e){return e.id==t.id})).length}))}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){this.taggedUsernames.filter((function(e){return e.id==t.id})).length||(this.taggedUsernames.push(t),this.$refs.autocomplete.value="")},untagUsername:function(t){this.taggedUsernames.splice(t,1)}}},c=(i("WU34"),i("KHd+")),l=Object(c.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",accept:t.config.uploader.media_types}}),t._v(" "),i("div",{staticClass:"timeline"},[t.uploading?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100 bg-light py-3",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[i("div",{staticClass:"p-5 mt-2"},[i("b-progress",{attrs:{value:t.uploadProgress,max:100,striped:"",animated:!0}}),t._v(" "),i("p",{staticClass:"text-center mb-0 font-weight-bold"},[t._v("Uploading ... ("+t._s(t.uploadProgress)+"%)")])],1)])]):"cameraRoll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[t._m(0),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[t.cameraRollMedia.length>0?i("div",{staticClass:"row p-0 m-0"},t._l(t.cameraRollMedia,(function(t,e){return i("div",{class:[0==e?"col-12 p-0":"col-3 p-0"]},[i("div",{staticClass:"card info-overlay p-0 rounded-0 shadow-none border"},[i("div",{staticClass:"square"},[i("img",{staticClass:"square-content",attrs:{src:t.preview_url}})])])])})),0):i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("span",{staticClass:"w-100 h-100"},[i("button",{staticClass:"btn btn-primary",attrs:{type:"button"}},[t._v("Upload")]),t._v(" "),i("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.fetchCameraRollDrafts()}}},[t._v("Load Camera Roll")])])])])])]):i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[i("div",[1==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.closeModal()}}},[i("i",{staticClass:"fas fa-times fa-lg"}),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):2==t.page?i("span",[t.config.uploader.album_limit>t.media.length?i("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold",attrs:{id:"cm-add-media-btn"},on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("i",{staticClass:"fas fa-plus"})]):i("button",{staticClass:"btn btn-outline-secondary btn-sm font-weight-bold",attrs:{disabled:""}},[i("i",{staticClass:"fas fa-plus"})]),t._v(" "),i("b-tooltip",{attrs:{target:"cm-add-media-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\t\tUpload another photo or video\n\t\t\t\t\t\t\t")])],1):3==t.page?i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3 d-flex align-items-center",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg mr-2"}),t._v(" "),i("span",{staticClass:"btn btn-outline-secondary btn-sm px-2 py-0 disabled",attrs:{disabled:""}},[t._v(t._s(t.media.length))])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg"})])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]),t._v(" "),2==t.page?i("div",[1==t.media.length?i("a",{staticClass:"text-center text-dark",attrs:{href:"#",title:"Crop & Resize",id:"cm-crop-btn"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[i("i",{staticClass:"fas fa-crop-alt fa-lg"})]):t._e(),t._v(" "),i("b-tooltip",{attrs:{target:"cm-crop-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\tCrop & Resize\n\t\t\t\t\t\t")])],1):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(1)]):i("span",[!t.pageLoading&&t.page>1&&t.page<=2||1==t.page&&0!=t.ids.length||"cropPhoto"==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.nextPage(e)}}},[t._v("Next")]):t._e(),t._v(" "),t.pageLoading||3!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},[1==t.page?i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[i("div",{staticClass:"text-center"},[0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("div",{staticClass:"media"},[t._m(2),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(3),t._v(" "),i("p",{staticClass:"mb-0 text-muted"},[t._v("Share up to "+t._s(t.config.uploader.album_limit)+" photos or videos")])])])])]):t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(4)]):t._e(),t._v(" "),t._m(5),t._v(" "),t._m(6)])]):t._e(),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"w-100 h-100"},[t.ids.length>0?i("div",[i("vue-cropper",{ref:"cropper",attrs:{relativeZoom:t.cropper.zoom,aspectRatio:t.cropper.aspectRatio,viewMode:t.cropper.viewMode,zoomable:t.cropper.zoomable,rotatable:!0,src:t.media[t.carouselCursor].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[1==t.media.length?i("div",[i("div",{staticStyle:{display:"flex","min-height":"420px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[i("img",{class:"d-block img-fluid w-100 "+[t.media[t.carouselCursor].filter_class?t.media[t.carouselCursor].filter_class:""],attrs:{src:t.media[t.carouselCursor].url,alt:t.media[t.carouselCursor].description,title:t.media[t.carouselCursor].description}})]),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,a){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):t.media.length>1?i("div",{staticClass:"d-flex-inline px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")]),t._v(" "),t._l(t.media,(function(e,a){return i("li",{staticClass:"nav-item mx-md-4"},[i("div",{staticClass:"nav-link",staticStyle:{display:"block",width:"300px",height:"300px"},on:{click:function(e){t.carouselCursor=a}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[a==t.carouselCursor?" border-primary shadow":""],style:"display:block;padding:5px;width:100%;height:100%;background-image: url("+e.url+");background-size:cover;border-width:3px !important;"})])]),t._v(" "),a==t.carouselCursor?i("div",{staticClass:"text-center mb-0 small text-lighter font-weight-bold pt-2"},[i("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[t._v("Crop")]),t._v(" "),i("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return e.preventDefault(),t.showEditMediaCard()}}},[t._v("Edit")]),t._v(" "),i("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.deleteMedia()}}},[t._v("Delete")])]):t._e()])})),t._v(" "),i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")])],2),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,a){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):i("div",[i("p",{staticClass:"mb-0 p-5 text-center font-weight-bold"},[t._v("An error occured, please refresh the page.")])])]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{resize:"none"},attrs:{rows:"2",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])])])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(7),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.nsfw=i.concat([null])):o>-1&&(t.nsfw=i.slice(0,o).concat(i.slice(o+1)))}else t.nsfw=n}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showTagCard()}}},[t._v("Tag people "),i("span",{staticClass:"ml-2 badge badge-primary"},[t._v("NEW")])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[t.place?i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",{staticClass:"text-lighter"},[t._v("Location:")]),t._v(" "+t._s(t.place.name)+", "+t._s(t.place.country)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-2",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Edit")]),t._v(" "),i("a",{staticClass:"btn btn-outline-secondary btn-sm small",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.place=!1}}},[t._v("Remove")])])]):i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLocationCard()}}},[t._v("Add location")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[0==t.profile.locked?i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]):t._e(),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticStyle:{"min-height":"200px"}},[i("p",{staticClass:"px-4 mb-0 py-2 small font-weight-bold text-muted cursor-pointer",on:{click:function(e){return t.showAdvancedSettingsCard()}}},[t._v("Advanced settings")])])]):t._e(),t._v(" "),"tagPeople"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("autocomplete",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],ref:"autocomplete",attrs:{search:t.tagSearch,placeholder:"@pixelfed","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],staticClass:"font-weight-bold text-muted small"},[t._v("You can tag "+t._s(10-t.taggedUsernames.length)+" more "+t._s(9==t.taggedUsernames.length?"person":"people")+"!")]),t._v(" "),i("p",{staticClass:"font-weight-bold text-center mt-3"},[t._v("Tagged People")]),t._v(" "),i("div",{staticClass:"list-group"},[t._l(t.taggedUsernames,(function(e,a){return i("div",{staticClass:"list-group-item d-flex justify-content-between"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-2 rounded-circle border",attrs:{src:e.avatar,width:"24px",height:"24px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.name))])])]),t._v(" "),i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"tag.privacy"}],staticClass:"custom-control-input disabled",attrs:{type:"checkbox",id:"cci-tagged-privacy-switch"+a,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var a=e.privacy,n=i.target,o=!!n.checked;if(Array.isArray(a)){var r=t._i(a,null);n.checked?r<0&&t.$set(e,"privacy",a.concat([null])):r>-1&&t.$set(e,"privacy",a.slice(0,r).concat(a.slice(r+1)))}else t.$set(e,"privacy",o)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+a}},[t._v(t._s(e.privacy?"Public":"Private"))]),t._v(" "),i("a",{staticClass:"ml-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.untagUsername(a)}}},[i("i",{staticClass:"fas fa-times text-muted"})])])])})),t._v(" "),0==t.taggedUsernames.length?i("div",{staticClass:"list-group-item p-3"},[i("p",{staticClass:"text-center mb-0 font-weight-bold text-lighter"},[t._v("Search usernames to tag.")])]):t._e()],2),t._v(" "),i("p",{staticClass:"font-weight-bold text-center small text-muted pt-3 mb-0"},[t._v("When you tag someone, they are sent a notification."),i("br"),t._v("For more information on tagging, "),i("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTagHelpCard()}}},[t._v("click here")]),t._v(".")])],1):t._e(),t._v(" "),"tagPeopleHelp"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0 text-center py-3 px-2 lead"},[t._v("Tagging someone is like mentioning them, with the option to make it private between you.")]),t._v(" "),i("p",{staticClass:"mb-3 py-3 px-2 font-weight-lighter"},[t._v("\n\t\t\t\t\t\t\tYou can choose to tag someone in public or private mode. Public mode will allow others to see who you tagged in the post and private mode tagged users will not be shown to others.\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),"addLocation"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0"},[t._v("Add Location")]),t._v(" "),i("autocomplete",{attrs:{search:t.locationSearch,placeholder:"Search locations ...","aria-label":"Search locations ...","get-result-value":t.getResultValue},on:{submit:t.onSubmitLocation}})],1):t._e(),t._v(" "),"advancedSettings"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(8),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.commentsDisabled,expression:"commentsDisabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asdisablecomments"},domProps:{checked:Array.isArray(t.commentsDisabled)?t._i(t.commentsDisabled,null)>-1:t.commentsDisabled},on:{change:function(e){var i=t.commentsDisabled,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.commentsDisabled=i.concat([null])):o>-1&&(t.commentsDisabled=i.slice(0,o).concat(i.slice(o+1)))}else t.commentsDisabled=n}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asdisablecomments"}})])])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showMediaDescriptionsCard()}}},[t._m(9)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{class:"list-group-item lead cursor-pointer "+["public"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("Public")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["unlisted"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("Unlisted")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["private"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("Followers Only")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,a){return i("div",[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.alt,expression:"m.alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here..."},domProps:{value:e.alt},on:{input:function(i){i.target.composing||t.$set(e,"alt",i.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(e.alt?e.alt.length:0)+"/140")])])]),t._v(" "),i("hr")])})),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])],2):t._e(),t._v(" "),"addToCollection"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"list-group mb-3"},[i("div",{staticClass:"list-group-item cursor-pointer compose-action border",on:{click:function(e){return t.goBack()}}},[t._m(10)])]),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"schedulePost"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"mediaMetadata"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"addToStory"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"editMedia"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:t.media[t.carouselCursor].preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("Media Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].alt,expression:"media[carouselCursor].alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here..."},domProps:{value:t.media[t.carouselCursor].alt},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"alt",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span",[t._v("Describe your photo for people with visual impairments.")]),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].alt?t.media[t.carouselCursor].alt.length:0)+"/140")])])]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("License")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].license,expression:"media[carouselCursor].license"}],staticClass:"form-control",attrs:{type:"text",placeholder:"All Rights Reserved (Default license)"},domProps:{value:t.media[t.carouselCursor].license},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"license",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span"),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].license?t.media[t.carouselCursor].license.length:0)+"/140")])])])])]),t._v(" "),i("hr"),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e()]),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"card-footer bg-white d-flex justify-content-between"},[i("div",[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.rotate}},[i("i",{staticClass:"fas fa-redo"})])]),t._v(" "),i("div",[i("div",{staticClass:"d-inline-block button-group"},[i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==16/9?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(16/9)}}},[t._v("16:9")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==4/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(4/3)}}},[t._v("4:3")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1.5==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1.5)}}},[t._v("3:2")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1)}}},[t._v("1:1")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==2/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(2/3)}}},[t._v("2:3")])])])]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-cog fa-lg text-muted"})]),this._v(" "),e("span",{staticClass:"font-weight-bold"},[this._v("\n\t\t\t\t\t\tCamera Roll\n\t\t\t\t\t")]),this._v(" "),e("span",{staticClass:"text-primary font-weight-bold"},[this._v("Upload")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%","background-color":"#008DF5"}},[e("i",{staticClass:"fas fa-bolt text-white fa-lg"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-history text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Story")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Add Photo to Story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-images text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Collection")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("New collection of posts")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"py-3"},[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Help")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Turn off commenting")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Disables comments for this post, you can change this later.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"text-dark"},[this._v("Media Descriptions")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Describe your photos for people with visual impairments.")])]),this._v(" "),e("div",[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3",attrs:{src:"",alt:"",width:"50px",height:"50px"}}),this._v(" "),e("div",{staticClass:"media-body"},[e("h5",{staticClass:"mt-0"},[this._v("collection title")]),this._v(" "),e("p",{staticClass:"mb-0 text-muted small"},[this._v("3 Photos - Created 2h ago")])])])}],!1,null,"ff97df2e",null);e.default=l.exports}},[[7,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[8],{"0ox+":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,'.autocomplete-input{border:1px solid #eee;border-radius:8px;width:100%;padding:12px 12px 12px 48px;box-sizing:border-box;position:relative;font-size:16px;line-height:1.5;-webkit-box-flex:1;flex:1;background-color:#eee;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-input:focus,.autocomplete-input[aria-expanded=true]{border-color:rgba(0,0,0,.12);background-color:#fff;outline:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-input[aria-expanded=true]{border-bottom-color:transparent;border-radius:8px 8px 0 0}[data-position=above] .autocomplete-input[aria-expanded=true]{border-top-color:transparent;border-radius:0 0 8px 8px;z-index:2}.autocomplete[data-loading=true]:after{content:"";border:3px solid rgba(0,0,0,.12);border-right-color:rgba(0,0,0,.48);border-radius:100%;width:20px;height:20px;position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.autocomplete-result-list{margin:0;border:1px solid rgba(0,0,0,.12);padding:0;box-sizing:border-box;max-height:296px;overflow-y:auto;background:#fff;list-style:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-result-list{margin-top:-1px;border-top-color:transparent;border-radius:0 0 8px 8px;padding-bottom:8px}[data-position=above] .autocomplete-result-list{margin-bottom:-1px;border-bottom-color:transparent;border-radius:8px 8px 0 0;padding-top:8px}.autocomplete-result{cursor:default;padding:12px 12px 12px 48px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-result:hover,.autocomplete-result[aria-selected=true]{background-color:rgba(0,0,0,.06)}@-webkit-keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}',""])},"3VoG":function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"/*!\n * Cropper.js v1.5.6\n * https://fengyuanchen.github.io/cropperjs\n *\n * Copyright 2015-present Chen Fengyuan\n * Released under the MIT license\n *\n * Date: 2019-10-04T04:33:44.164Z\n */\n\n.cropper-container {\n direction: ltr;\n font-size: 0;\n line-height: 0;\n position: relative;\n -ms-touch-action: none;\n touch-action: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.cropper-container img {\n display: block;\n height: 100%;\n image-orientation: 0deg;\n max-height: none !important;\n max-width: none !important;\n min-height: 0 !important;\n min-width: 0 !important;\n width: 100%;\n}\n\n.cropper-wrap-box,\n.cropper-canvas,\n.cropper-drag-box,\n.cropper-crop-box,\n.cropper-modal {\n bottom: 0;\n left: 0;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n.cropper-wrap-box,\n.cropper-canvas {\n overflow: hidden;\n}\n\n.cropper-drag-box {\n background-color: #fff;\n opacity: 0;\n}\n\n.cropper-modal {\n background-color: #000;\n opacity: 0.5;\n}\n\n.cropper-view-box {\n display: block;\n height: 100%;\n outline: 1px solid #39f;\n outline-color: rgba(51, 153, 255, 0.75);\n overflow: hidden;\n width: 100%;\n}\n\n.cropper-dashed {\n border: 0 dashed #eee;\n display: block;\n opacity: 0.5;\n position: absolute;\n}\n\n.cropper-dashed.dashed-h {\n border-bottom-width: 1px;\n border-top-width: 1px;\n height: calc(100% / 3);\n left: 0;\n top: calc(100% / 3);\n width: 100%;\n}\n\n.cropper-dashed.dashed-v {\n border-left-width: 1px;\n border-right-width: 1px;\n height: 100%;\n left: calc(100% / 3);\n top: 0;\n width: calc(100% / 3);\n}\n\n.cropper-center {\n display: block;\n height: 0;\n left: 50%;\n opacity: 0.75;\n position: absolute;\n top: 50%;\n width: 0;\n}\n\n.cropper-center::before,\n.cropper-center::after {\n background-color: #eee;\n content: ' ';\n display: block;\n position: absolute;\n}\n\n.cropper-center::before {\n height: 1px;\n left: -3px;\n top: 0;\n width: 7px;\n}\n\n.cropper-center::after {\n height: 7px;\n left: 0;\n top: -3px;\n width: 1px;\n}\n\n.cropper-face,\n.cropper-line,\n.cropper-point {\n display: block;\n height: 100%;\n opacity: 0.1;\n position: absolute;\n width: 100%;\n}\n\n.cropper-face {\n background-color: #fff;\n left: 0;\n top: 0;\n}\n\n.cropper-line {\n background-color: #39f;\n}\n\n.cropper-line.line-e {\n cursor: ew-resize;\n right: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-n {\n cursor: ns-resize;\n height: 5px;\n left: 0;\n top: -3px;\n}\n\n.cropper-line.line-w {\n cursor: ew-resize;\n left: -3px;\n top: 0;\n width: 5px;\n}\n\n.cropper-line.line-s {\n bottom: -3px;\n cursor: ns-resize;\n height: 5px;\n left: 0;\n}\n\n.cropper-point {\n background-color: #39f;\n height: 5px;\n opacity: 0.75;\n width: 5px;\n}\n\n.cropper-point.point-e {\n cursor: ew-resize;\n margin-top: -3px;\n right: -3px;\n top: 50%;\n}\n\n.cropper-point.point-n {\n cursor: ns-resize;\n left: 50%;\n margin-left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-w {\n cursor: ew-resize;\n left: -3px;\n margin-top: -3px;\n top: 50%;\n}\n\n.cropper-point.point-s {\n bottom: -3px;\n cursor: s-resize;\n left: 50%;\n margin-left: -3px;\n}\n\n.cropper-point.point-ne {\n cursor: nesw-resize;\n right: -3px;\n top: -3px;\n}\n\n.cropper-point.point-nw {\n cursor: nwse-resize;\n left: -3px;\n top: -3px;\n}\n\n.cropper-point.point-sw {\n bottom: -3px;\n cursor: nesw-resize;\n left: -3px;\n}\n\n.cropper-point.point-se {\n bottom: -3px;\n cursor: nwse-resize;\n height: 20px;\n opacity: 1;\n right: -3px;\n width: 20px;\n}\n\n@media (min-width: 768px) {\n .cropper-point.point-se {\n height: 15px;\n width: 15px;\n }\n}\n\n@media (min-width: 992px) {\n .cropper-point.point-se {\n height: 10px;\n width: 10px;\n }\n}\n\n@media (min-width: 1200px) {\n .cropper-point.point-se {\n height: 5px;\n opacity: 0.75;\n width: 5px;\n }\n}\n\n.cropper-point.point-se::before {\n background-color: #39f;\n bottom: -50%;\n content: ' ';\n display: block;\n height: 200%;\n opacity: 0;\n position: absolute;\n right: -50%;\n width: 200%;\n}\n\n.cropper-invisible {\n opacity: 0;\n}\n\n.cropper-bg {\n background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC');\n}\n\n.cropper-hide {\n display: block;\n height: 0;\n position: absolute;\n width: 0;\n}\n\n.cropper-hidden {\n display: none !important;\n}\n\n.cropper-move {\n cursor: move;\n}\n\n.cropper-crop {\n cursor: crosshair;\n}\n\n.cropper-disabled .cropper-drag-box,\n.cropper-disabled .cropper-face,\n.cropper-disabled .cropper-line,\n.cropper-disabled .cropper-point {\n cursor: not-allowed;\n}\n",""])},7:function(t,e,i){t.exports=i("K0g3")},"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 i=e.protocol+"//"+e.host,a=i+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var n,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:(n=0===o.indexOf("//")?o:0===o.indexOf("/")?i+o:a+o.replace(/^\.\//,""),"url("+JSON.stringify(n)+")")}))}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=function(t,e){var i=t[1]||"",a=t[3];if(!a)return i;if(e&&"function"==typeof btoa){var n=(r=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),o=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[i].concat(o).concat([n]).join("\n")}var r;return[i].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+i+"}":i})).join("")},e.i=function(t,i){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},n=0;n=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 i.nc}();a&&(t.attrs.nonce=a)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(i){t.setAttribute(i,e[i])}))}function w(t,e){var i,a,n,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 r=h++;i=l||(l=v(e)),a=C.bind(null,i,r,!1),n=C.bind(null,i,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(i=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),a=k.bind(null,i,e),n=function(){g(i),i.href&&URL.revokeObjectURL(i.href)}):(i=v(e),a=_.bind(null,i),n=function(){g(i)});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 n()}}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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var i=m(t,e);return u(i,e),function(t){for(var a=[],n=0;n0&&void 0!==arguments[0]?arguments[0]:{},o=n.search,r=n.autoSelect,l=void 0!==r&&r,h=n.setValue,d=void 0===h?function(){}:h,p=n.setAttribute,u=void 0===p?function(){}:p,m=n.onUpdate,f=void 0===m?function(){}:m,g=n.onSubmit,v=void 0===g?function(){}:g,b=n.onShow,w=void 0===b?function(){}:b,x=n.onHide,y=void 0===x?function(){}:x,C=n.onLoading,_=void 0===C?function(){}:C,k=n.onLoaded,D=void 0===k?function(){}:k;i(this,t),a(this,"value",""),a(this,"searchCounter",0),a(this,"results",[]),a(this,"selectedIndex",-1),a(this,"handleInput",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleKeyDown",(function(t){var i=t.key;switch(i){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var a="ArrowUp"===i||"Up"===i?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(a);break;case"Tab":e.selectResult();break;case"Enter":var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),a(this,"handleFocus",(function(t){var i=t.target.value;e.updateResults(i),e.value=i})),a(this,"handleBlur",(function(){e.hideResults()})),a(this,"handleResultMouseDown",(function(t){t.preventDefault()})),a(this,"handleResultClick",(function(t){var i=t.target,a=s(i,"[data-result-index]");if(a){e.selectedIndex=parseInt(a.dataset.resultIndex,10);var n=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(n)}})),a(this,"handleArrows",(function(t){var i=e.results.length;e.selectedIndex=(t%i+i)%i,e.onUpdate(e.results,e.selectedIndex)})),a(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),a(this,"updateResults",(function(t){var i=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){i===e.searchCounter&&(e.results=t,e.onLoaded(),0!==e.results.length?(e.selectedIndex=e.autoSelect?0:-1,e.onUpdate(e.results,e.selectedIndex),e.showResults()):e.hideResults())}))})),a(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),a(this,"hideResults",(function(){e.selectedIndex=-1,e.results=[],e.setAttribute("aria-expanded",!1),e.setAttribute("aria-activedescendant",""),e.onUpdate(e.results,e.selectedIndex),e.onHide()})),a(this,"checkSelectedResultVisible",(function(t){var i=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(i){var a=t.getBoundingClientRect(),n=i.getBoundingClientRect();n.topa.bottom&&(t.scrollTop+=n.bottom-a.bottom)}})),this.search=c(o)?o:function(t){return Promise.resolve(o(t))},this.autoSelect=l,this.setValue=d,this.setAttribute=u,this.onUpdate=f,this.onSubmit=v,this.onShow=w,this.onHide=y,this.onLoading=_,this.onLoaded=D},h=0,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++h)};const p=function(t,e,i,a,n,o,r,s,c,l){"boolean"!=typeof r&&(c=s,s=r,r=!1);const h="function"==typeof i?i.options:i;let d;if(t&&t.render&&(h.render=t.render,h.staticRenderFns=t.staticRenderFns,h._compiled=!0,n&&(h.functional=!0)),a&&(h._scopeId=a),o?(d=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__),e&&e.call(this,c(t)),t&&t._registeredComponents&&t._registeredComponents.add(o)},h._ssrRegister=d):e&&(d=r?function(t){e.call(this,l(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,s(t))}),d)if(h.functional){const t=h.render;h.render=function(e,i){return d.call(i),t(e,i)}}else{const t=h.beforeCreate;h.beforeCreate=t?[].concat(t,d):[d]}return i}({render:function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{ref:"root"},[t._t("default",[i("div",t._b({},"div",t.rootProps,!1),[i("input",t._g(t._b({ref:"input",on:{input:t.handleInput,keydown:t.core.handleKeyDown,focus:t.core.handleFocus,blur:t.core.handleBlur}},"input",t.inputProps,!1),t.$listeners)),t._v(" "),i("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,a){return[t._t("result",[i("li",t._b({key:t.resultProps[a].id},"li",t.resultProps[a],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[a]})]}))],2)])],{rootProps:t.rootProps,inputProps:t.inputProps,inputListeners:t.inputListeners,resultListProps:t.resultListProps,resultListListeners:t.resultListListeners,results:t.results,resultProps:t.resultProps})],2)},staticRenderFns:[]},void 0,{name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(t){return t}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var t,e,i,a,n=new l({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(n.handleInput=(t=n.handleInput,e=this.debounceTime,function(){var n=this,o=arguments,r=function(){a=null,i||t.apply(n,o)},s=i&&!a;clearTimeout(a),a=setTimeout(r,e),s&&t.apply(n,o)})),{core:n,value:this.defaultValue,resultListId:d("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return o({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var t="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:a({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},t,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var t=this;return this.results.map((function(e,i){return o({id:"".concat(t.baseClass,"-result-").concat(i),class:"".concat(t.baseClass,"-result"),"data-result-index":i,role:"option"},t.selectedIndex===i?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,i,a;this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=(t=this.$refs.input,e=this.$refs.resultList,i=t.getBoundingClientRect(),a=e.getBoundingClientRect(),i.bottom+a.height>window.innerHeight&&window.innerHeight-i.bottom0?"above":"below")),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(t){this.value=t?this.getResultValue(t):""},handleUpdate:function(t,e){this.results=t,this.selectedIndex=e,this.$emit("update",t,e)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(t){this.value=t.target.value,this.core.handleInput(t)},handleSubmit:function(t){this.$emit("submit",t)},handleDocumentClick:function(t){this.$refs.root.contains(t.target)||this.core.hideResults()}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function u(t){u.installed||(u.installed=!0,t.component("Autocomplete",p))}var m,f={install:u};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=u,e.a=p}).call(this,i("yLpj"))},lcPr:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var a,n=i("urRO"),o=(a=n)&&a.__esModule?a:{default:a};var r="undefined"==typeof window?[String,Array]:[String,Array,Element,NodeList];e.default={render:function(t){return t("div",{style:this.containerStyle},[t("img",{ref:"img",attrs:{src:this.src,alt:this.alt||"image",style:"max-width: 100%"},on:this.$listeners,style:this.imgStyle})])},props:{containerStyle:Object,src:{type:String,default:""},alt:String,imgStyle:Object,viewMode:Number,dragMode:String,initialAspectRatio:Number,aspectRatio:Number,data:Object,preview:r,responsive:{type:Boolean,default:!0},restore:{type:Boolean,default:!0},checkCrossOrigin:{type:Boolean,default:!0},checkOrientation:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},guides:{type:Boolean,default:!0},center:{type:Boolean,default:!0},highlight:{type:Boolean,default:!0},background:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!0},autoCropArea:Number,movable:{type:Boolean,default:!0},rotatable:{type:Boolean,default:!0},scalable:{type:Boolean,default:!0},zoomable:{type:Boolean,default:!0},zoomOnTouch:{type:Boolean,default:!0},zoomOnWheel:{type:Boolean,default:!0},wheelZoomRatio:Number,cropBoxMovable:{type:Boolean,default:!0},cropBoxResizable:{type:Boolean,default:!0},toggleDragModeOnDblclick:{type:Boolean,default:!0},minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,minContainerWidth:Number,minContainerHeight:Number,ready:Function,cropstart:Function,cropmove:Function,cropend:Function,crop:Function,zoom:Function},mounted:function(){var t=this.$options.props,e=(t.containerStyle,t.src,t.alt,t.imgStyle,function(t,e){var i={};for(var a in t)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(t,a)&&(i[a]=t[a]);return i}(t,["containerStyle","src","alt","imgStyle"])),i={};for(var a in e)void 0!==this[a]&&(i[a]=this[a]);this.cropper=new o.default(this.$refs.img,i)},methods:{reset:function(){return this.cropper.reset()},clear:function(){return this.cropper.clear()},initCrop:function(){return this.cropper.crop()},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return this.cropper.replace(t,e)},enable:function(){return this.cropper.enable()},disable:function(){return this.cropper.disable()},destroy:function(){return this.cropper.destroy()},move:function(t,e){return this.cropper.move(t,e)},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.moveTo(t,e)},relativeZoom:function(t,e){return this.cropper.zoom(t,e)},zoomTo:function(t,e){return this.cropper.zoomTo(t,e)},rotate:function(t){return this.cropper.rotate(t)},rotateTo:function(t){return this.cropper.rotateTo(t)},scaleX:function(t){return this.cropper.scaleX(t)},scaleY:function(t){return this.cropper.scaleY(t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;return this.cropper.scale(t,e)},getData:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return this.cropper.getData(t)},setData:function(t){return this.cropper.setData(t)},getContainerData:function(){return this.cropper.getContainerData()},getImageData:function(){return this.cropper.getImageData()},getCanvasData:function(){return this.cropper.getCanvasData()},setCanvasData:function(t){return this.cropper.setCanvasData(t)},getCropBoxData:function(){return this.cropper.getCropBoxData()},setCropBoxData:function(t){return this.cropper.setCropBoxData(t)},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.cropper.getCroppedCanvas(t)},setAspectRatio:function(t){return this.cropper.setAspectRatio(t)},setDragMode:function(t){return this.cropper.setDragMode(t)}}}},urRO:function(t,e,i){t.exports=function(){"use strict";function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var i=0;i0&&t<1/0};function E(t){return void 0===t}function O(e){return"object"===t(e)&&null!==e}var I=Object.prototype.hasOwnProperty;function N(t){if(!O(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&I.call(i,"isPrototypeOf")}catch(t){return!1}}function j(t){return"function"==typeof t}var z=Array.prototype.slice;function H(t){return Array.from?Array.from(t):z.call(t)}function U(t,e){return t&&j(e)&&(Array.isArray(t)||P(t.length)?H(t).forEach((function(i,a){e.call(t,i,a,t)})):O(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var W=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a0&&i.forEach((function(e){O(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Y=/\.\d*(?:0|9){12}\d*$/;function $(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Y.test(t)?Math.round(t*e)/e:t}var X=/^width|height|left|top|marginLeft|marginTop$/;function F(t,e){var i=t.style;U(e,(function(t,e){X.test(e)&&P(t)&&(t="".concat(t,"px")),i[e]=t}))}function V(t,e){if(e)if(P(t.length))U(t,(function(t){V(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Z(t,e){e&&(P(t.length)?U(t,(function(t){Z(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function q(t,e,i){e&&(P(t.length)?U(t,(function(t){q(t,e,i)})):i?V(t,e):Z(t,e))}var G=/([a-z\d])([A-Z])/g;function Q(t){return t.replace(G,"$1-$2").toLowerCase()}function J(t,e){return O(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Q(e)))}function K(t,e,i){O(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Q(e)),i)}var tt=/\s\s*/,et=function(){var t=!1;if(s){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});c.addEventListener("test",i,a),c.removeEventListener("test",i,a)}return t}();function it(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(!et){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function at(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(tt).forEach((function(e){if(a.once&&!et){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,s=new Array(o),c=0;c1&&void 0!==arguments[1]?arguments[1]:"contain",o=L(a),r=L(i);if(o&&r){var s=i*e;"contain"===n&&s>a||"cover"===n&&s=8&&(o=c+h)}}}if(o){var d,p,u=i.getUint16(o,a);for(p=0;pt.width?3===i?s=t.height*r:c=t.width/r:3===i?c=t.width/r:s=t.height*r;var l={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:s,height:c};l.left=(t.width-s)/2,l.top=(t.height-c)/2,l.oldLeft=l.left,l.oldTop=l.top,this.canvasData=l,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=W({},e),this.initialCanvasData=W({},l)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,s=n.aspectRatio,c=this.cropped&&o;if(t){var l=Number(i.minCanvasWidth)||0,h=Number(i.minCanvasHeight)||0;r>1?(l=Math.max(l,a.width),h=Math.max(h,a.height),3===r&&(h*s>l?l=h*s:h=l/s)):r>0&&(l?l=Math.max(l,c?o.width:0):h?h=Math.max(h,c?o.height:0):c&&(l=o.width,(h=o.height)*s>l?l=h*s:h=l/s));var d=pt({aspectRatio:s,width:l,height:h});l=d.width,h=d.height,n.minWidth=l,n.minHeight=h,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(c?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),c&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=function(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),s=e*r+i*o,c=e*o+i*r;return a>90?{width:c,height:s}:{width:s,height:c}}({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,s=i.width*(o/i.naturalWidth),c=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(c-i.height)/2,i.width=s,i.height=c,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heighte.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=W({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,s=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,h=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;c=Math.min(c,a.width),l=Math.min(l,a.height),s&&(c&&l?l*s>c?l=c/s:c=l*s:c?l=c/s:l&&(c=l*s),d*s>h?d=h/s:h=d*s),o.minWidth=Math.min(c,h),o.minHeight=Math.min(l,d),o.maxWidth=h,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=e.width&&i.height>=e.height?"move":"all"),F(this.cropBox,W({width:i.width,height:i.height},ht({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),nt(this.element,"crop",this.getData())}},bt={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,U(r,(function(t){var i=document.createElement("img");K(t,w,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){U(this.previews,(function(t){var e=J(t,w);F(t,{width:e.width,height:e.height}),t.innerHTML=e.html,function(t,e){if(O(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Q(e)))}(t,w)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,s=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(F(this.viewBoxImage,W({width:o,height:r},ht(W({translateX:-s,translateY:-c},t)))),U(this.previews,(function(e){var i=J(e,w),l=i.width,h=i.height,d=l,p=h,u=1;a&&(p=n*(u=l/a)),n&&p>h&&(d=a*(u=h/n),p=h),F(e,{width:d,height:p}),F(e.getElementsByTagName("img")[0],W({width:o*u,height:r*u},ht(W({translateX:-s*u,translateY:-c*u},t))))})))}},wt={bind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&at(t,"cropstart",e.cropstart),j(e.cropmove)&&at(t,"cropmove",e.cropmove),j(e.cropend)&&at(t,"cropend",e.cropend),j(e.crop)&&at(t,"crop",e.crop),j(e.zoom)&&at(t,"zoom",e.zoom),at(i,_,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&at(i,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&at(i,"dblclick",this.onDblclick=this.dblclick.bind(this)),at(t.ownerDocument,k,this.onCropMove=this.cropMove.bind(this)),at(t.ownerDocument,D,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&at(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;j(e.cropstart)&&it(t,"cropstart",e.cropstart),j(e.cropmove)&&it(t,"cropmove",e.cropmove),j(e.cropend)&&it(t,"cropend",e.cropend),j(e.crop)&&it(t,"crop",e.crop),j(e.zoom)&&it(t,"zoom",e.zoom),it(i,_,this.onCropStart),e.zoomable&&e.zoomOnWheel&&it(i,"wheel",this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&it(i,"dblclick",this.onDblclick),it(t.ownerDocument,k,this.onCropMove),it(t.ownerDocument,D,this.onCropEnd),e.responsive&&it(window,"resize",this.onResize)}},xt={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||200,n=Number(t.minContainerHeight)||100;if(!(this.disabled||i.width<=a||i.height<=n)){var o,r,s=e.offsetWidth/i.width;1===s&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(U(o,(function(t,e){o[e]=t*s}))),this.setCropBoxData(U(r,(function(t,e){r[e]=t*s})))))}},dblclick:function(){var t,e;this.disabled||"none"===this.options.dragMode||this.setDragMode((t=this.dragBox,e=d,(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(P(e)&&1!==e||P(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){o[t.identifier]=dt(t)})):o[t.pointerId||0]=dt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?"zoom":J(t.target,b),M.test(a)&&!1!==nt(this.element,"cropstart",{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,"crop"===a&&(this.cropping=!0,V(this.dragBox,g)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==nt(this.element,"cropmove",{originalEvent:t,action:e})&&(t.changedTouches?U(t.changedTouches,(function(t){W(i[t.identifier]||{},dt(t,!0))})):W(i[t.pointerId||0]||{},dt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?U(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,q(this.dragBox,g,this.cropped&&this.options.modal)),nt(this.element,"cropend",{originalEvent:t,action:e}))}}},yt={change:function(t){var e,i=this.options,a=this.canvasData,n=this.containerData,r=this.cropBoxData,s=this.pointers,c=this.action,l=i.aspectRatio,h=r.left,d=r.top,p=r.width,m=r.height,f=h+p,g=d+m,v=0,b=0,w=n.width,x=n.height,y=!0;!l&&t.shiftKey&&(l=p&&m?p/m:1),this.limited&&(v=r.minLeft,b=r.minTop,w=v+Math.min(n.width,a.width,a.left+a.width),x=b+Math.min(n.height,a.height,a.top+a.height));var C=s[Object.keys(s)[0]],_={x:C.endX-C.startX,y:C.endY-C.startY},k=function(t){switch(t){case"e":f+_.x>w&&(_.x=w-f);break;case"w":h+_.xx&&(_.y=x-g)}};switch(c){case"all":h+=_.x,d+=_.y;break;case"e":if(_.x>=0&&(f>=w||l&&(d<=b||g>=x))){y=!1;break}k("e"),(p+=_.x)<0&&(c="w",h-=p=-p),l&&(m=p/l,d+=(r.height-m)/2);break;case"n":if(_.y<=0&&(d<=b||l&&(h<=v||f>=w))){y=!1;break}k("n"),m-=_.y,d+=_.y,m<0&&(c="s",d-=m=-m),l&&(p=m*l,h+=(r.width-p)/2);break;case"w":if(_.x<=0&&(h<=v||l&&(d<=b||g>=x))){y=!1;break}k("w"),p-=_.x,h+=_.x,p<0&&(c="e",h-=p=-p),l&&(m=p/l,d+=(r.height-m)/2);break;case"s":if(_.y>=0&&(g>=x||l&&(h<=v||f>=w))){y=!1;break}k("s"),(m+=_.y)<0&&(c="n",d-=m=-m),l&&(p=m*l,h+=(r.width-p)/2);break;case"ne":if(l){if(_.y<=0&&(d<=b||f>=w)){y=!1;break}k("n"),m-=_.y,d+=_.y,p=m*l}else k("n"),k("e"),_.x>=0?fb&&(m-=_.y,d+=_.y):(m-=_.y,d+=_.y);p<0&&m<0?(c="sw",d-=m=-m,h-=p=-p):p<0?(c="nw",h-=p=-p):m<0&&(c="se",d-=m=-m);break;case"nw":if(l){if(_.y<=0&&(d<=b||h<=v)){y=!1;break}k("n"),m-=_.y,d+=_.y,p=m*l,h+=r.width-p}else k("n"),k("w"),_.x<=0?h>v?(p-=_.x,h+=_.x):_.y<=0&&d<=b&&(y=!1):(p-=_.x,h+=_.x),_.y<=0?d>b&&(m-=_.y,d+=_.y):(m-=_.y,d+=_.y);p<0&&m<0?(c="se",d-=m=-m,h-=p=-p):p<0?(c="ne",h-=p=-p):m<0&&(c="sw",d-=m=-m);break;case"sw":if(l){if(_.x<=0&&(h<=v||g>=x)){y=!1;break}k("w"),p-=_.x,h+=_.x,m=p/l}else k("s"),k("w"),_.x<=0?h>v?(p-=_.x,h+=_.x):_.y>=0&&g>=x&&(y=!1):(p-=_.x,h+=_.x),_.y>=0?g=0&&(f>=w||g>=x)){y=!1;break}k("e"),m=(p+=_.x)/l}else k("s"),k("e"),_.x>=0?f=0&&g>=x&&(y=!1):p+=_.x,_.y>=0?g0?c=_.y>0?"se":"ne":_.x<0&&(h-=p,c=_.y>0?"sw":"nw"),_.y<0&&(d-=m),this.cropped||(Z(this.cropBox,u),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}y&&(r.width=p,r.height=m,r.left=h,r.top=d,this.action=c,this.renderCropBox()),U(s,(function(t){t.startX=t.endX,t.startY=t.endY}))}},Ct={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&V(this.dragBox,g),Z(this.cropBox,u),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Z(this.dragBox,g),V(this.cropBox,u)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,U(this.previews,(function(e){e.getElementsByTagName("img")[0].src=t})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,Z(this.cropper,p)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,V(this.cropper,p)),this},destroy:function(){var t=this.element;return t.cropper?(t.cropper=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(E(t)?t:a+Number(t),E(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(P(t)&&(i.left=t,a=!0),P(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,s=n.naturalWidth,c=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var l=s*t,h=c*t;if(!1===nt(this.element,"zoom",{ratio:t,oldRatio:o/s,originalEvent:i}))return this;if(i){var d=this.pointers,p=ot(this.cropper),u=d&&Object.keys(d).length?function(t){var e=0,i=0,a=0;return U(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(l-o)*((u.pageX-p.left-n.left)/o),n.top-=(h-r)*((u.pageY-p.top-n.top)/r)}else N(e)&&P(e.x)&&P(e.y)?(n.left-=(l-o)*((e.x-n.left)/o),n.top-=(h-r)*((e.y-n.top)/r)):(n.left-=(l-o)/2,n.top-=(h-r)/2);n.width=l,n.height=h,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return P(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,P(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(P(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(P(t)&&(i.scaleX=t,a=!0),P(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(U(t,(function(e,i){t[i]=e/r})),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&N(t)){var o=!1;e.rotatable&&P(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(P(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),P(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;P(t.x)&&(n.left=t.x*r+a.left),P(t.y)&&(n.top=t.y*r+a.top),P(t.width)&&(n.width=t.width*r),P(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&U(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&N(t)&&(P(t.left)&&(e.left=t.left),P(t.top)&&(e.top=t.top),P(t.width)?(e.width=t.width,e.height=t.width/i):P(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&N(t)&&(P(t.left)&&(a.left=t.left),P(t.top)&&(a.top=t.top),P(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),P(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=ut(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,o=a.y,s=a.width,c=a.height,l=i.width/Math.floor(e.naturalWidth);1!==l&&(n*=l,o*=l,s*=l,c*=l);var h=s/c,d=pt({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=pt({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=pt({aspectRatio:h,width:t.width||(1!==l?i.width:s),height:t.height||(1!==l?i.height:c)}),m=u.width,f=u.height;m=Math.min(d.width,Math.max(p.width,m)),f=Math.min(d.height,Math.max(p.height,f));var g=document.createElement("canvas"),v=g.getContext("2d");g.width=$(m),g.height=$(f),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,f);var b=t.imageSmoothingEnabled,w=void 0===b||b,x=t.imageSmoothingQuality;v.imageSmoothingEnabled=w,x&&(v.imageSmoothingQuality=x);var y,C,_,k,D,M,T=i.width,S=i.height,A=n,B=o;A<=-s||A>T?(A=0,y=0,_=0,D=0):A<=0?(_=-A,A=0,D=y=Math.min(T,s+A)):A<=T&&(_=0,D=y=Math.min(s,T-A)),y<=0||B<=-c||B>S?(B=0,C=0,k=0,M=0):B<=0?(k=-B,B=0,M=C=Math.min(S,c+B)):B<=S&&(k=0,M=C=Math.min(c,S-B));var R=[A,B,y,C];if(D>0&&M>0){var P=m/s;R.push(_*P,k*P,D*P,M*P)}return v.drawImage.apply(v,[i].concat(r(R.map((function(t){return Math.floor($(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||E(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n="crop"===t,o=e.movable&&"move"===t;t=n||o?t:"none",e.dragMode=t,K(i,b,t),q(i,d,n),q(i,v,o),e.cropBoxMovable||(K(a,b,t),q(a,d,n),q(a,v,o))}return this}},_t=c.Cropper,kt=function(){function t(i){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e(this,t),!i||!A.test(i.tagName))throw new Error("The first argument is required and must be an or element.");this.element=i,this.options=W({},B,N(a)&&a),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}var a,n,o;return a=t,o=[{key:"noConflict",value:function(){return window.Cropper=_t,t}},{key:"setDefaults",value:function(t){W(B,N(t)&&t)}}],(n=[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e.cropper){if(e.cropper=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(T.test(t))S.test(t)?this.read((n=t.replace(ft,""),o=atob(n),r=new ArrayBuffer(o.length),U(s=new Uint8Array(r),(function(t,e){s[e]=o.charCodeAt(e)})),r)):this.clone();else{var n,o,r,s,c=new XMLHttpRequest,l=this.clone.bind(this);this.reloading=!0,this.xhr=c,c.onabort=l,c.onerror=l,c.ontimeout=l,c.onprogress=function(){"image/jpeg"!==c.getResponseHeader("content-type")&&c.abort()},c.onload=function(){e.read(c.response)},c.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&ct(t)&&i.crossOrigin&&(t=lt(t)),c.open("GET",t),c.responseType="arraybuffer",c.withCredentials="use-credentials"===i.crossOrigin,c.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=gt(t),n=0,o=1,r=1;if(a>1){this.url=function(t,e){for(var i=[],a=new Uint8Array(t);a.length>0;)i.push(mt.apply(null,H(a.subarray(0,8192)))),a=a.subarray(8192);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}(t,"image/jpeg");var s=function(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}(a);n=s.rotate,o=s.scaleX,r=s.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&ct(e)&&(i||(i="anonymous"),a=lt(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),V(n,m),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),a=function(e,i){W(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML='
';var o=n.querySelector(".".concat("cropper","-container")),r=o.querySelector(".".concat("cropper","-canvas")),s=o.querySelector(".".concat("cropper","-drag-box")),c=o.querySelector(".".concat("cropper","-crop-box")),l=c.querySelector(".".concat("cropper","-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=s,this.cropBox=c,this.viewBox=o.querySelector(".".concat("cropper","-view-box")),this.face=l,r.appendChild(i),V(t,u),a.insertBefore(o,t.nextSibling),this.isImg||Z(i,m),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,V(c,u),e.guides||V(c.getElementsByClassName("".concat("cropper","-dashed")),u),e.center||V(c.getElementsByClassName("".concat("cropper","-center")),u),e.background&&V(o,"".concat("cropper","-bg")),e.highlight||V(l,f),e.cropBoxMovable&&(V(l,v),K(l,b,"all")),e.cropBoxResizable||(V(c.getElementsByClassName("".concat("cropper","-line")),u),V(c.getElementsByClassName("".concat("cropper","-point")),u)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),j(e.ready)&&at(t,"ready",e.ready,{once:!0}),nt(t,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Z(this.element,u))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}])&&i(a.prototype,n),o&&i(a,o),t}();return W(kt.prototype,vt,bt,wt,xt,yt,Ct),kt}()},wcbf:function(t,e,i){(t.exports=i("I1BE")(!1)).push([t.i,"\n.media-drawer-filters[data-v-33708765] {\n\t\toverflow-x: scroll;\n\t\tflex-wrap:unset;\n}\n.media-drawer-filters[data-v-33708765]::-webkit-scrollbar {\n\t\twidth: 0px;\n\t\tbackground: transparent;\n}\n.media-drawer-filters .nav-link[data-v-33708765] {\n\t\tmin-width:100px;\n\t\tpadding-top: 1rem;\n\t\tpadding-bottom: 1rem;\n}\n.media-drawer-filters .active[data-v-33708765] {\n\t\tcolor: #fff;\n\t\tfont-weight: bold;\n}\n@media (hover: none) and (pointer: coarse) {\n.media-drawer-filters[data-v-33708765]::-webkit-scrollbar {\n\t display: none;\n}\n}\n.no-focus[data-v-33708765] {\n\t\tborder-color: none;\n\t\toutline: 0;\n\t\tbox-shadow: none;\n}\na.list-group-item[data-v-33708765] {\n\t\ttext-decoration: none;\n}\na.list-group-item[data-v-33708765]:hover {\n\t\ttext-decoration: none;\n\t\tbackground-color: #f8f9fa !important;\n}\n.compose-action[data-v-33708765]:hover {\n\t\tcursor: pointer;\n\t\tbackground-color: #f8f9fa !important;\n}\n",""])},yLpj:function(t,e){var i;i=function(){return this}();try{i=i||new Function("return this")()}catch(t){"object"==typeof window&&(i=window)}t.exports=i},zlB4:function(t,e,i){"use strict";i.r(e);var a=i("lcPr"),n=i.n(a),o=(i("YQfW"),i("lb/t"));i("i3gq");function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var s={components:{VueCropper:n.a,Autocomplete:o.a},data:function(){var t;return r(t={config:window.App.config,pageLoading:!1,profile:{},composeText:"",composeTextLength:0,nsfw:!1,filters:[],currentFilter:!1,ids:[],media:[],carouselCursor:0,uploading:!1,uploadProgress:100,composeType:!1,page:1,composeState:"publish",visibility:"public",visibilityTag:"Public"},"nsfw",!1),r(t,"place",!1),r(t,"commentsDisabled",!1),r(t,"pageTitle",""),r(t,"cropper",{aspectRatio:1,viewMode:1,zoomable:!0,zoom:0}),r(t,"namedPages",["cropPhoto","tagPeople","addLocation","advancedSettings","visibility","altText","addToCollection","schedulePost","mediaMetadata","addToStory","editMedia","cameraRoll","tagPeopleHelp"]),r(t,"cameraRollMedia",[]),r(t,"taggedUsernames",[]),r(t,"taggedPeopleSearch",null),t},beforeMount:function(){this.fetchProfile(),0==this.config.uploader.media_types.includes("video/mp4")&&(this.composeType="post"),this.filters=window.App.util.filters},mounted:function(){this.mediaWatcher()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window.pixelfed.currentUser=e.data,1==e.data.locked&&(t.visibility="private",t.visibilityTag="Followers Only")})).catch((function(t){}))},addMedia:function(t){var e=$(t.target);e.attr("disabled",""),$('.file-input[name="media"]').trigger("click"),e.blur(),e.removeAttr("disabled")},mediaWatcher:function(){var t=this;$(document).on("change","#pf-dz",(function(e){t.mediaUpload()}))},mediaUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#pf-dz");e.files.length||(t.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,i){if(t.media&&t.media.length+i>=t.config.uploader.album_limit)return swal("Error","You can only upload "+t.config.uploader.album_limit+" photos per album","error"),t.uploading=!1,void(t.page=2);var a=e.type,n=t.config.uploader.media_types.split(",");if(-1==$.inArray(a,n))return swal("Invalid File Type","The file you are trying to add is not a valid mime type. Please upload a "+t.config.uploader.media_types+" only.","error"),t.uploading=!1,void(t.page=2);var o=new FormData;o.append("file",e);var r={onUploadProgress:function(e){var i=Math.round(100*e.loaded/e.total);t.uploadProgress=i}};axios.post("/api/pixelfed/v1/media",o,r).then((function(e){t.uploadProgress=100,t.ids.push(e.data.id),t.media.push(e.data),t.uploading=!1,setTimeout((function(){t.page=2}),300)})).catch((function(i){switch(i.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error"),t.page=2;break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error"),t.page=2}})),e.value=null,t.uploadProgress=0}))},toggleFilter:function(t,e){this.media[this.carouselCursor].filter_class=e,this.currentFilter=e},deleteMedia:function(){var t=this;if(0!=window.confirm("Are you sure you want to delete this media?")){var e=this.media[this.carouselCursor].id;axios.delete("/api/pixelfed/v1/media",{params:{id:e}}).then((function(e){t.ids.splice(t.carouselCursor,1),t.media.splice(t.carouselCursor,1),0==t.media.length?(t.ids=[],t.media=[],t.carouselCursor=0):t.carouselCursor=0})).catch((function(t){swal("Whoops!","An error occured when attempting to delete this, please try again","error")}))}},compose:function(){var t=this.composeState;if(100==this.uploadProgress&&0!=this.ids.length)if(this.composeText.length>this.config.uploader.max_caption_length)swal("Error","Caption is too long","error");else switch(t){case"publish":if(0==this.media.length)return void swal("Whoops!","You need to add media before you can save this!","warning");"Add optional caption..."==this.composeText&&(this.composeText="");var e={media:this.media,caption:this.composeText,visibility:this.visibility,cw:this.nsfw,comments_disabled:this.commentsDisabled,place:this.place,tagged:this.taggedUsernames};return void axios.post("/api/local/status/compose",e).then((function(t){var e=t.data;window.location.href=e})).catch((function(t){var e=t.response.data.message?t.response.data.message:"An unexpected error occured.";swal("Oops, something went wrong!",e,"error")}));case"delete":return this.ids=[],this.media=[],this.carouselCursor=0,this.composeText="",this.composeTextLength=0,void $("#composeModal").modal("hide")}},closeModal:function(){this.composeType="",$("#composeModal").modal("hide")},goBack:function(){switch(this.pageTitle="",this.page){case"cropPhoto":case"editMedia":this.page=2;break;case"tagPeopleHelp":this.showTagCard();break;default:-1!=this.namedPages.indexOf(this.page)?this.page=3:this.page--}},nextPage:function(){switch(this.pageTitle="",this.page){case 1:this.page=2;break;case"cropPhoto":this.pageLoading=!0;var t=this;this.$refs.cropper.getCroppedCanvas({maxWidth:4096,maxHeight:4096,fillColor:"#fff",imageSmoothingEnabled:!1,imageSmoothingQuality:"high"}).toBlob((function(e){var i=new FormData;i.append("file",e);var a="/api/local/compose/media/update/"+t.ids[t.carouselCursor];axios.post(a,i).then((function(e){t.media[t.carouselCursor].url=e.data.url,t.pageLoading=!1,t.page=2})).catch((function(t){}))}));break;case 2:this.currentFilter?window.confirm("Are you sure you want to apply this filter?")&&(this.applyFilterToMedia(),this.page++):this.page++;break;case 3:this.page++}},rotate:function(){this.$refs.cropper.rotate(90)},changeAspect:function(t){this.cropper.aspectRatio=t,this.$refs.cropper.setAspectRatio(t)},showTagCard:function(){this.pageTitle="Tag People",this.page="tagPeople"},showTagHelpCard:function(){this.pageTitle="About Tag People",this.page="tagPeopleHelp"},showLocationCard:function(){this.pageTitle="Add Location",this.page="addLocation"},showAdvancedSettingsCard:function(){this.pageTitle="Advanced Settings",this.page="advancedSettings"},locationSearch:function(t){if(t.length<1)return[];return axios.get("/api/local/compose/location/search",{params:{q:t}}).then((function(t){return t.data}))},getResultValue:function(t){return t.name+", "+t.country},onSubmitLocation:function(t){this.place=t,this.pageTitle="",this.page=3},showVisibilityCard:function(){this.pageTitle="Post Visibility",this.page="visibility"},showAddToStoryCard:function(){this.pageTitle="Add to Story",this.page="addToStory"},showCropPhotoCard:function(){this.pageTitle="Edit Photo",this.page="cropPhoto"},toggleVisibility:function(t){this.visibility=t,this.visibilityTag={public:"Public",private:"Followers Only",unlisted:"Unlisted"}[t],this.pageTitle="",this.page=3},showMediaDescriptionsCard:function(){this.pageTitle="Media Descriptions",this.page="altText"},showAddToCollectionsCard:function(){this.pageTitle="Add to Collection",this.page="addToCollection"},showSchedulePostCard:function(){this.pageTitle="Schedule Post",this.page="schedulePost"},showEditMediaCard:function(){this.pageTitle="Edit Media",this.page="editMedia"},fetchCameraRollDrafts:function(){var t=this;axios.get("/api/pixelfed/local/drafts").then((function(e){t.cameraRollMedia=e.data}))},applyFilterToMedia:function(){},tagSearch:function(t){if(t.length<1)return[];var e=this;return axios.get("/api/local/compose/tag/search",{params:{q:t}}).then((function(t){return t.data.filter((function(t){return 0==e.taggedUsernames.filter((function(e){return e.id==t.id})).length}))}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){this.taggedUsernames.filter((function(e){return e.id==t.id})).length||(this.taggedUsernames.push(t),this.$refs.autocomplete.value="")},untagUsername:function(t){this.taggedUsernames.splice(t,1)}}},c=(i("UfXo"),i("KHd+")),l=Object(c.a)(s,(function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[i("input",{staticClass:"w-100 h-100 d-none file-input",attrs:{type:"file",id:"pf-dz",name:"media",accept:t.config.uploader.media_types}}),t._v(" "),i("div",{staticClass:"timeline"},[t.uploading?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100 bg-light py-3",staticStyle:{"border-bottom":"1px solid #f1f1f1"}},[i("div",{staticClass:"p-5 mt-2"},[i("b-progress",{attrs:{value:t.uploadProgress,max:100,striped:"",animated:!0}}),t._v(" "),i("p",{staticClass:"text-center mb-0 font-weight-bold"},[t._v("Uploading ... ("+t._s(t.uploadProgress)+"%)")])],1)])]):"cameraRoll"==t.page?i("div",[i("div",{staticClass:"card status-card card-md-rounded-0",staticStyle:{display:"flex"}},[t._m(0),t._v(" "),i("div",{staticClass:"h-100 card-body p-0 border-top",staticStyle:{width:"100%","min-height":"400px"}},[t.cameraRollMedia.length>0?i("div",{staticClass:"row p-0 m-0"},t._l(t.cameraRollMedia,(function(t,e){return i("div",{class:[0==e?"col-12 p-0":"col-3 p-0"]},[i("div",{staticClass:"card info-overlay p-0 rounded-0 shadow-none border"},[i("div",{staticClass:"square"},[i("img",{staticClass:"square-content",attrs:{src:t.preview_url}})])])])})),0):i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center"},[i("span",{staticClass:"w-100 h-100"},[i("button",{staticClass:"btn btn-primary",attrs:{type:"button"}},[t._v("Upload")]),t._v(" "),i("button",{staticClass:"btn btn-primary",attrs:{type:"button"},on:{click:function(e){return t.fetchCameraRollDrafts()}}},[t._v("Load Camera Roll")])])])])])]):i("div",[i("div",{staticClass:"card status-card card-md-rounded-0 w-100 h-100",staticStyle:{display:"flex"}},[i("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[i("div",[1==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.closeModal()}}},[i("i",{staticClass:"fas fa-times fa-lg"}),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):2==t.page?i("span",[t.config.uploader.album_limit>t.media.length?i("button",{staticClass:"btn btn-outline-primary btn-sm font-weight-bold",attrs:{id:"cm-add-media-btn"},on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("i",{staticClass:"fas fa-plus"})]):i("button",{staticClass:"btn btn-outline-secondary btn-sm font-weight-bold",attrs:{disabled:""}},[i("i",{staticClass:"fas fa-plus"})]),t._v(" "),i("b-tooltip",{attrs:{target:"cm-add-media-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\t\tUpload another photo or video\n\t\t\t\t\t\t\t")])],1):3==t.page?i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3 d-flex align-items-center",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg mr-2"}),t._v(" "),i("span",{staticClass:"btn btn-outline-secondary btn-sm px-2 py-0 disabled",attrs:{disabled:""}},[t._v(t._s(t.media.length))])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]):i("span",[i("a",{staticClass:"text-lighter text-decoration-none mr-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goBack()}}},[i("i",{staticClass:"fas fa-long-arrow-alt-left fa-lg"})])]),t._v(" "),i("span",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.pageTitle))])]),t._v(" "),2==t.page?i("div",[1==t.media.length?i("a",{staticClass:"text-center text-dark",attrs:{href:"#",title:"Crop & Resize",id:"cm-crop-btn"},on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[i("i",{staticClass:"fas fa-crop-alt fa-lg"})]):t._e(),t._v(" "),i("b-tooltip",{attrs:{target:"cm-crop-btn",triggers:"hover"}},[t._v("\n\t\t\t\t\t\t\tCrop & Resize\n\t\t\t\t\t\t")])],1):t._e(),t._v(" "),i("div",[t.pageLoading?i("span",[t._m(1)]):i("span",[!t.pageLoading&&t.page>1&&t.page<=2||1==t.page&&0!=t.ids.length||"cropPhoto"==t.page?i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.nextPage(e)}}},[t._v("Next")]):t._e(),t._v(" "),t.pageLoading||3!=t.page?t._e():i("a",{staticClass:"font-weight-bold text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.compose()}}},[t._v("Post")])])])]),t._v(" "),i("div",{staticClass:"card-body p-0 border-top"},[1==t.page?i("div",{staticClass:"w-100 h-100 d-flex justify-content-center align-items-center",staticStyle:{"min-height":"400px"}},[i("div",{staticClass:"text-center"},[0==t.media.length?i("div",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark"},[i("div",{staticClass:"card-body",on:{click:function(e){return e.preventDefault(),t.addMedia(e)}}},[i("div",{staticClass:"media"},[t._m(2),t._v(" "),i("div",{staticClass:"media-body text-left"},[t._m(3),t._v(" "),i("p",{staticClass:"mb-0 text-muted"},[t._v("Share up to "+t._s(t.config.uploader.album_limit)+" photos or videos")])])])])]):t._e(),t._v(" "),1==t.config.features.stories?i("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/stories/new"}},[t._m(4)]):t._e(),t._v(" "),t._m(5),t._v(" "),t._m(6)])]):t._e(),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"w-100 h-100"},[t.ids.length>0?i("div",[i("vue-cropper",{ref:"cropper",attrs:{relativeZoom:t.cropper.zoom,aspectRatio:t.cropper.aspectRatio,viewMode:t.cropper.viewMode,zoomable:t.cropper.zoomable,rotatable:!0,src:t.media[t.carouselCursor].url}})],1):t._e()]):t._e(),t._v(" "),2==t.page?i("div",{staticClass:"w-100 h-100"},[1==t.media.length?i("div",[i("div",{staticStyle:{display:"flex","min-height":"420px","align-items":"center"},attrs:{slot:"img"},slot:"img"},[i("img",{class:"d-block img-fluid w-100 "+[t.media[t.carouselCursor].filter_class?t.media[t.carouselCursor].filter_class:""],attrs:{src:t.media[t.carouselCursor].url,alt:t.media[t.carouselCursor].description,title:t.media[t.carouselCursor].description}})]),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,a){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):t.media.length>1?i("div",{staticClass:"d-flex-inline px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")]),t._v(" "),t._l(t.media,(function(e,a){return i("li",{staticClass:"nav-item mx-md-4"},[i("div",{staticClass:"nav-link",staticStyle:{display:"block",width:"300px",height:"300px"},on:{click:function(e){t.carouselCursor=a}}},[i("span",{class:[e.filter_class?e.filter_class:""]},[i("span",{class:"rounded border "+[a==t.carouselCursor?" border-primary shadow":""],style:"display:block;padding:5px;width:100%;height:100%;background-image: url("+e.url+");background-size:cover;border-width:3px !important;"})])]),t._v(" "),a==t.carouselCursor?i("div",{staticClass:"text-center mb-0 small text-lighter font-weight-bold pt-2"},[i("span",{staticClass:"cursor-pointer",on:{click:function(e){return e.preventDefault(),t.showCropPhotoCard(e)}}},[t._v("Crop")]),t._v(" "),i("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return e.preventDefault(),t.showEditMediaCard()}}},[t._v("Edit")]),t._v(" "),i("span",{staticClass:"cursor-pointer",on:{click:function(e){return t.deleteMedia()}}},[t._v("Delete")])]):t._e()])})),t._v(" "),i("li",{staticClass:"nav-item mx-md-4"},[t._v(" ")])],2),t._v(" "),i("hr"),t._v(" "),t.ids.length>0&&"Image"==t.media[t.carouselCursor].type?i("div",{staticClass:"align-items-center px-2 pt-2"},[i("ul",{staticClass:"nav media-drawer-filters text-center"},[i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{staticClass:"cursor-pointer",attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}})]),t._v(" "),i("a",{class:[null==t.media[t.carouselCursor].filter_class?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.toggleFilter(e,null)}}},[t._v("No Filter")])]),t._v(" "),t._l(t.filters,(function(e,a){return i("li",{staticClass:"nav-item"},[i("div",{staticClass:"p-1 pt-3"},[i("img",{class:e[1],attrs:{src:t.media[t.carouselCursor].url,width:"100px",height:"60px"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}})]),t._v(" "),i("a",{class:[t.media[t.carouselCursor].filter_class==e[1]?"nav-link text-primary active":"nav-link text-muted"],attrs:{href:"#"},on:{click:function(i){return i.preventDefault(),t.toggleFilter(i,e[1])}}},[t._v(t._s(e[0]))])])}))],2)]):t._e()]):i("div",[i("p",{staticClass:"mb-0 p-5 text-center font-weight-bold"},[t._v("An error occured, please refresh the page.")])])]):t._e(),t._v(" "),3==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"border-bottom mt-2"},[i("div",{staticClass:"media px-3"},[i("img",{class:[t.media[0].filter_class?"mr-2 "+t.media[0].filter_class:"mr-2"],attrs:{src:t.media[0].url,width:"42px",height:"42px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small d-none"},[t._v("Caption")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.composeText,expression:"composeText"}],staticClass:"form-control border-0 rounded-0 no-focus",attrs:{rows:"3",placeholder:"Write a caption..."},domProps:{value:t.composeText},on:{keyup:function(e){t.composeTextLength=t.composeText.length},input:function(e){e.target.composing||(t.composeText=e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(t.composeTextLength)+"/"+t._s(t.config.uploader.max_caption_length))])])])])]),t._v(" "),i("div",{staticClass:"border-bottom d-flex justify-content-between px-4 mb-0 py-2 "},[t._m(7),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.nsfw,expression:"nsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asnsfw"},domProps:{checked:Array.isArray(t.nsfw)?t._i(t.nsfw,null)>-1:t.nsfw},on:{change:function(e){var i=t.nsfw,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.nsfw=i.concat([null])):o>-1&&(t.nsfw=i.slice(0,o).concat(i.slice(o+1)))}else t.nsfw=n}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asnsfw"}})])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showTagCard()}}},[t._v("Tag people "),i("span",{staticClass:"ml-2 badge badge-primary"},[t._v("NEW")])])]),t._v(" "),i("div",{staticClass:"border-bottom"},[t.place?i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",{staticClass:"text-lighter"},[t._v("Location:")]),t._v(" "+t._s(t.place.name)+", "+t._s(t.place.country)+"\n\t\t\t\t\t\t\t\t"),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-2",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showLocationCard()}}},[t._v("Edit")]),t._v(" "),i("a",{staticClass:"btn btn-outline-secondary btn-sm small",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.place=!1}}},[t._v("Remove")])])]):i("p",{staticClass:"px-4 mb-0 py-2 cursor-pointer",on:{click:function(e){return t.showLocationCard()}}},[t._v("Add location")])]),t._v(" "),i("div",{staticClass:"border-bottom"},[i("p",{staticClass:"px-4 mb-0 py-2"},[i("span",[t._v("Audience")]),t._v(" "),i("span",{staticClass:"float-right"},[i("a",{staticClass:"btn btn-outline-secondary btn-sm small mr-3 mt-n1 disabled",staticStyle:{"font-size":"10px",padding:"3px","text-transform":"uppercase"},attrs:{href:"#",disabled:""},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[t._v(t._s(t.visibilityTag))]),t._v(" "),i("a",{staticClass:"text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showVisibilityCard()}}},[i("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])])]),t._v(" "),i("div",{staticStyle:{"min-height":"200px"}},[i("p",{staticClass:"px-4 mb-0 py-2 small font-weight-bold text-muted cursor-pointer",on:{click:function(e){return t.showAdvancedSettingsCard()}}},[t._v("Advanced settings")])])]):t._e(),t._v(" "),"tagPeople"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("autocomplete",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],ref:"autocomplete",attrs:{search:t.tagSearch,placeholder:"@pixelfed","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),i("p",{directives:[{name:"show",rawName:"v-show",value:t.taggedUsernames.length<10,expression:"taggedUsernames.length < 10"}],staticClass:"font-weight-bold text-muted small"},[t._v("You can tag "+t._s(10-t.taggedUsernames.length)+" more "+t._s(9==t.taggedUsernames.length?"person":"people")+"!")]),t._v(" "),i("p",{staticClass:"font-weight-bold text-center mt-3"},[t._v("Tagged People")]),t._v(" "),i("div",{staticClass:"list-group"},[t._l(t.taggedUsernames,(function(e,a){return i("div",{staticClass:"list-group-item d-flex justify-content-between"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-2 rounded-circle border",attrs:{src:e.avatar,width:"24px",height:"24px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.name))])])]),t._v(" "),i("div",{staticClass:"custom-control custom-switch"},[i("input",{directives:[{name:"model",rawName:"v-model",value:e.privacy,expression:"tag.privacy"}],staticClass:"custom-control-input disabled",attrs:{type:"checkbox",id:"cci-tagged-privacy-switch"+a,disabled:""},domProps:{checked:Array.isArray(e.privacy)?t._i(e.privacy,null)>-1:e.privacy},on:{change:function(i){var a=e.privacy,n=i.target,o=!!n.checked;if(Array.isArray(a)){var r=t._i(a,null);n.checked?r<0&&t.$set(e,"privacy",a.concat([null])):r>-1&&t.$set(e,"privacy",a.slice(0,r).concat(a.slice(r+1)))}else t.$set(e,"privacy",o)}}}),t._v(" "),i("label",{staticClass:"custom-control-label font-weight-bold text-lighter",attrs:{for:"cci-tagged-privacy-switch"+a}},[t._v(t._s(e.privacy?"Public":"Private"))]),t._v(" "),i("a",{staticClass:"ml-3",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.untagUsername(a)}}},[i("i",{staticClass:"fas fa-times text-muted"})])])])})),t._v(" "),0==t.taggedUsernames.length?i("div",{staticClass:"list-group-item p-3"},[i("p",{staticClass:"text-center mb-0 font-weight-bold text-lighter"},[t._v("Search usernames to tag.")])]):t._e()],2),t._v(" "),i("p",{staticClass:"font-weight-bold text-center small text-muted pt-3 mb-0"},[t._v("When you tag someone, they are sent a notification."),i("br"),t._v("For more information on tagging, "),i("a",{staticClass:"text-primary",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showTagHelpCard()}}},[t._v("click here")]),t._v(".")])],1):t._e(),t._v(" "),"tagPeopleHelp"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0 text-center py-3 px-2 lead"},[t._v("Tagging someone is like mentioning them, with the option to make it private between you.")]),t._v(" "),i("p",{staticClass:"mb-3 py-3 px-2 font-weight-lighter"},[t._v("\n\t\t\t\t\t\t\tYou can choose to tag someone in public or private mode. Public mode will allow others to see who you tagged in the post and private mode tagged users will not be shown to others.\n\t\t\t\t\t\t")])]):t._e(),t._v(" "),"addLocation"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"mb-0"},[t._v("Add Location")]),t._v(" "),i("autocomplete",{attrs:{search:t.locationSearch,placeholder:"Search locations ...","aria-label":"Search locations ...","get-result-value":t.getResultValue},on:{submit:t.onSubmitLocation}})],1):t._e(),t._v(" "),"advancedSettings"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{staticClass:"list-group-item d-flex justify-content-between"},[t._m(8),t._v(" "),i("div",[i("div",{staticClass:"custom-control custom-switch",staticStyle:{"z-index":"9999"}},[i("input",{directives:[{name:"model",rawName:"v-model",value:t.commentsDisabled,expression:"commentsDisabled"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"asdisablecomments"},domProps:{checked:Array.isArray(t.commentsDisabled)?t._i(t.commentsDisabled,null)>-1:t.commentsDisabled},on:{change:function(e){var i=t.commentsDisabled,a=e.target,n=!!a.checked;if(Array.isArray(i)){var o=t._i(i,null);a.checked?o<0&&(t.commentsDisabled=i.concat([null])):o>-1&&(t.commentsDisabled=i.slice(0,o).concat(i.slice(o+1)))}else t.commentsDisabled=n}}}),t._v(" "),i("label",{staticClass:"custom-control-label",attrs:{for:"asdisablecomments"}})])])]),t._v(" "),i("a",{staticClass:"list-group-item",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showMediaDescriptionsCard()}}},[t._m(9)])])]):t._e(),t._v(" "),"visibility"==t.page?i("div",{staticClass:"w-100 h-100"},[i("div",{staticClass:"list-group list-group-flush"},[i("div",{class:"list-group-item lead cursor-pointer "+["public"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("public")}}},[t._v("Public")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["unlisted"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("unlisted")}}},[t._v("Unlisted")]),t._v(" "),i("div",{class:"list-group-item lead cursor-pointer "+["private"==t.visibility?"text-primary":""],on:{click:function(e){return t.toggleVisibility("private")}}},[t._v("Followers Only")])])]):t._e(),t._v(" "),"altText"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[t._l(t.media,(function(e,a){return i("div",[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:e.preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("textarea",{directives:[{name:"model",rawName:"v-model",value:e.alt,expression:"m.alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here..."},domProps:{value:e.alt},on:{input:function(i){i.target.composing||t.$set(e,"alt",i.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-right text-muted mb-0"},[t._v(t._s(e.alt?e.alt.length:0)+"/140")])])]),t._v(" "),i("hr")])})),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])],2):t._e(),t._v(" "),"addToCollection"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"list-group mb-3"},[i("div",{staticClass:"list-group-item cursor-pointer compose-action border",on:{click:function(e){return t.goBack()}}},[t._m(10)])]),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e(),t._v(" "),"schedulePost"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"mediaMetadata"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"addToStory"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("p",{staticClass:"text-center lead text-muted mb-0 py-5"},[t._v("This feature is not available yet.")])]):t._e(),t._v(" "),"editMedia"==t.page?i("div",{staticClass:"w-100 h-100 p-3"},[i("div",{staticClass:"media"},[i("img",{staticClass:"mr-3",attrs:{src:t.media[t.carouselCursor].preview_url,width:"50px",height:"50px"}}),t._v(" "),i("div",{staticClass:"media-body"},[i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("Media Description")]),t._v(" "),i("textarea",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].alt,expression:"media[carouselCursor].alt"}],staticClass:"form-control",attrs:{placeholder:"Add a media description here..."},domProps:{value:t.media[t.carouselCursor].alt},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"alt",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span",[t._v("Describe your photo for people with visual impairments.")]),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].alt?t.media[t.carouselCursor].alt.length:0)+"/140")])])]),t._v(" "),i("div",{staticClass:"form-group"},[i("label",{staticClass:"font-weight-bold text-muted small"},[t._v("License")]),t._v(" "),i("input",{directives:[{name:"model",rawName:"v-model",value:t.media[t.carouselCursor].license,expression:"media[carouselCursor].license"}],staticClass:"form-control",attrs:{type:"text",placeholder:"All Rights Reserved (Default license)"},domProps:{value:t.media[t.carouselCursor].license},on:{input:function(e){e.target.composing||t.$set(t.media[t.carouselCursor],"license",e.target.value)}}}),t._v(" "),i("p",{staticClass:"help-text small text-muted mb-0 d-flex justify-content-between"},[i("span"),t._v(" "),i("span",[t._v(t._s(t.media[t.carouselCursor].license?t.media[t.carouselCursor].license.length:0)+"/140")])])])])]),t._v(" "),i("hr"),t._v(" "),i("p",{staticClass:"d-flex justify-content-between mb-0"},[i("button",{staticClass:"btn btn-link text-muted font-weight-bold text-decoration-none",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Cancel")]),t._v(" "),i("button",{staticClass:"btn btn-primary font-weight-bold",attrs:{type:"button"},on:{click:function(e){return t.goBack()}}},[t._v("Save")])])]):t._e()]),t._v(" "),"cropPhoto"==t.page?i("div",{staticClass:"card-footer bg-white d-flex justify-content-between"},[i("div",[i("button",{staticClass:"btn btn-outline-secondary",attrs:{type:"button"},on:{click:t.rotate}},[i("i",{staticClass:"fas fa-redo"})])]),t._v(" "),i("div",[i("div",{staticClass:"d-inline-block button-group"},[i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==16/9?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(16/9)}}},[t._v("16:9")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==4/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(4/3)}}},[t._v("4:3")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1.5==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1.5)}}},[t._v("3:2")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[1==t.cropper.aspectRatio?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(1)}}},[t._v("1:1")]),t._v(" "),i("button",{class:"btn font-weight-bold "+[t.cropper.aspectRatio==2/3?"btn-primary":"btn-light"],on:{click:function(e){return e.preventDefault(),t.changeAspect(2/3)}}},[t._v("2:3")])])])]):t._e()])])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-header d-inline-flex align-items-center justify-content-between bg-white"},[e("span",{staticClass:"pr-3"},[e("i",{staticClass:"fas fa-cog fa-lg text-muted"})]),this._v(" "),e("span",{staticClass:"font-weight-bold"},[this._v("\n\t\t\t\t\t\tCamera Roll\n\t\t\t\t\t")]),this._v(" "),e("span",{staticClass:"text-primary font-weight-bold"},[this._v("Upload")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"spinner-border spinner-border-sm",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%","background-color":"#008DF5"}},[e("i",{staticClass:"fas fa-bolt text-white fa-lg"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Post")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-history text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Story")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("Add Photo to Story")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("a",{staticClass:"card mx-md-5 my-md-3 shadow-none border compose-action text-decoration-none text-dark",attrs:{href:"/i/collections/create"}},[e("div",{staticClass:"card-body"},[e("div",{staticClass:"media"},[e("div",{staticClass:"mr-3 align-items-center justify-content-center",staticStyle:{display:"inline-flex",width:"40px",height:"40px","border-radius":"100%",border:"2px solid #008DF5"}},[e("i",{staticClass:"fas fa-images text-primary fa-lg"})]),this._v(" "),e("div",{staticClass:"media-body text-left"},[e("p",{staticClass:"mb-0"},[e("span",{staticClass:"h5 mt-0 font-weight-bold text-primary"},[this._v("New Collection")]),this._v(" "),e("sup",{staticClass:"float-right mt-2"},[e("span",{staticClass:"btn btn-outline-lighter p-1 btn-sm font-weight-bold py-0",staticStyle:{"font-size":"10px","line-height":"0.6"}},[this._v("BETA")])])]),this._v(" "),e("p",{staticClass:"mb-0 text-muted"},[this._v("New collection of posts")])])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("p",{staticClass:"py-3"},[e("a",{staticClass:"font-weight-bold",attrs:{href:"/site/help"}},[this._v("Help")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Contains NSFW Media")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",[e("div",{staticClass:"text-dark "},[this._v("Turn off commenting")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Disables comments for this post, you can change this later.")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"d-flex justify-content-between align-items-center"},[e("div",[e("div",{staticClass:"text-dark"},[this._v("Media Descriptions")]),this._v(" "),e("p",{staticClass:"text-muted small mb-0"},[this._v("Describe your photos for people with visual impairments.")])]),this._v(" "),e("div",[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"media"},[e("img",{staticClass:"mr-3",attrs:{src:"",alt:"",width:"50px",height:"50px"}}),this._v(" "),e("div",{staticClass:"media-body"},[e("h5",{staticClass:"mt-0"},[this._v("collection title")]),this._v(" "),e("p",{staticClass:"mb-0 text-muted small"},[this._v("3 Photos - Created 2h ago")])])])}],!1,null,"33708765",null);e.default=l.exports}},[[7,0]]]); \ No newline at end of file diff --git a/public/js/direct.js b/public/js/direct.js new file mode 100644 index 000000000..02c65ef1a --- /dev/null +++ b/public/js/direct.js @@ -0,0 +1 @@ +(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"0ox+":function(t,e,a){(t.exports=a("I1BE")(!1)).push([t.i,'.autocomplete-input{border:1px solid #eee;border-radius:8px;width:100%;padding:12px 12px 12px 48px;box-sizing:border-box;position:relative;font-size:16px;line-height:1.5;-webkit-box-flex:1;flex:1;background-color:#eee;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjNjY2IiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-input:focus,.autocomplete-input[aria-expanded=true]{border-color:rgba(0,0,0,.12);background-color:#fff;outline:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-input[aria-expanded=true]{border-bottom-color:transparent;border-radius:8px 8px 0 0}[data-position=above] .autocomplete-input[aria-expanded=true]{border-top-color:transparent;border-radius:0 0 8px 8px;z-index:2}.autocomplete[data-loading=true]:after{content:"";border:3px solid rgba(0,0,0,.12);border-right-color:rgba(0,0,0,.48);border-radius:100%;width:20px;height:20px;position:absolute;right:12px;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);-webkit-animation:rotate 1s linear infinite;animation:rotate 1s linear infinite}.autocomplete-result-list{margin:0;border:1px solid rgba(0,0,0,.12);padding:0;box-sizing:border-box;max-height:296px;overflow-y:auto;background:#fff;list-style:none;box-shadow:0 2px 2px rgba(0,0,0,.16)}[data-position=below] .autocomplete-result-list{margin-top:-1px;border-top-color:transparent;border-radius:0 0 8px 8px;padding-bottom:8px}[data-position=above] .autocomplete-result-list{margin-bottom:-1px;border-bottom-color:transparent;border-radius:8px 8px 0 0;padding-top:8px}.autocomplete-result{cursor:default;padding:12px 12px 12px 48px;background-image:url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgZmlsbD0ibm9uZSIgc3Ryb2tlPSIjY2NjIiBzdHJva2Utd2lkdGg9IjIiIHN0cm9rZS1saW5lY2FwPSJyb3VuZCIgc3Ryb2tlLWxpbmVqb2luPSJyb3VuZCI+PGNpcmNsZSBjeD0iMTEiIGN5PSIxMSIgcj0iOCIvPjxwYXRoIGQ9Ik0yMSAyMWwtNC00Ii8+PC9zdmc+");background-repeat:no-repeat;background-position:12px}.autocomplete-result:hover,.autocomplete-result[aria-selected=true]{background-color:rgba(0,0,0,.06)}@-webkit-keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{-webkit-transform:translateY(-50%) rotate(0deg);transform:translateY(-50%) rotate(0deg)}to{-webkit-transform:translateY(-50%) rotate(359deg);transform:translateY(-50%) rotate(359deg)}}',""])},21:function(t,e,a){t.exports=a("7D/a")},"7D/a":function(t,e,a){Vue.component("direct-component",a("VGw1").default),Vue.component("direct-message",a("9oR/").default)},"9oR/":function(t,e,a){"use strict";a.r(e);function s(t){return function(t){if(Array.isArray(t)){for(var e=0,a=new Array(t.length);e5?a("li",{staticClass:"list-group-item border-0 mt-n4"},[a("p",{staticClass:"text-center small text-muted"},[t.loadingMessages?a("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill btn-sm px-3",attrs:{disabled:""}},[t._v("Loading...")]):a("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill btn-sm px-3",on:{click:function(e){return t.loadOlderMessages()}}},[t._v("Load Older Messages")])])]):t._e(),t._v(" "),t._l(t.thread.messages,(function(e,s){return a("li",{staticClass:"list-group-item border-0 chat-msg cursor-pointer",on:{click:function(a){return t.openCtxMenu(e,s)}}},[e.isAuthor?a("div",{staticClass:"media d-inline-flex float-right mb-0"},[a("div",{staticClass:"media-body"},["photo"==e.type?a("p",{staticClass:"pill-from p-0 shadow"},[a("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140px"}})]):"link"==e.type?a("div",{staticClass:"media d-inline-flex float-right mb-0 cursor-pointer"},[a("div",{staticClass:"media-body"},[a("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[a("div",{staticClass:"card-body p-0"},[a("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?a("div",{staticClass:"bg-primary mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-white fa-2x"})]):a("div",{staticClass:"bg-light mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),a("div",{staticClass:"media-body text-muted small text-truncate pr-2 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.meta.local?e.text.substr(8):e.meta.domain)+"\n\t\t\t\t\t\t\t\t\t\t\t\t\t")])])])])])]):"video"==e.type?a("p",{staticClass:"pill-from p-0 shadow"},[t._m(2,!0)]):"emoji"==e.type?a("p",{staticClass:"p-0 emoji-msg"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]):a("p",{class:[t.largerText?"pill-from shadow larger-text text-break":"pill-from shadow text-break"]},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),t.hideTimestamps?t._e():a("p",{staticClass:"small text-muted font-weight-bold text-right mr-2"},[e.hidden?a("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[a("i",{staticClass:"fas fa-lock"})]):t._e(),t._v(" "+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t")])]),t._v(" "),t.hideAvatars?t._e():a("img",{staticClass:"ml-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.profile.avatar,alt:"avatar",width:"32px"}})]):a("div",{staticClass:"media d-inline-flex mb-0"},[t.hideAvatars?t._e():a("img",{staticClass:"mr-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.thread.avatar,alt:"avatar",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},["photo"==e.type?a("p",{staticClass:"pill-to p-0 shadow"},[a("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140px"}})]):"link"==e.type?a("div",{staticClass:"media d-inline-flex mb-0 cursor-pointer"},[a("div",{staticClass:"media-body"},[a("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[a("div",{staticClass:"card-body p-0"},[a("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?a("div",{staticClass:"bg-primary mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-white fa-2x"})]):a("div",{staticClass:"bg-light mr-3 border-right p-3"},[a("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),a("div",{staticClass:"media-body text-muted small text-truncate pr-2 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t"+t._s(e.meta.local?e.text.substr(8):e.meta.domain)+"\n\t\t\t\t\t\t\t\t\t\t\t\t\t")])])])])])]):"video"==e.type?a("p",{staticClass:"pill-to p-0 shadow"},[t._m(1,!0)]):"emoji"==e.type?a("p",{staticClass:"p-0 emoji-msg"},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]):a("p",{class:[t.largerText?"pill-to shadow larger-text text-break":"pill-to shadow text-break"]},[t._v("\n\t\t\t\t\t\t\t\t\t"+t._s(e.text)+"\n\t\t\t\t\t\t\t\t")]),t._v(" "),t.hideTimestamps?t._e():a("p",{staticClass:"small text-muted font-weight-bold ml-2 d-flex align-items-center justify-content-start",attrs:{"data-timestamp":"timestamp"}},[e.hidden?a("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[a("i",{staticClass:"fas fa-lock"})]):t._e(),t._v(" "+t._s(e.timeAgo))])])])])}))],2),t._v(" "),a("div",{staticClass:"card-footer bg-white p-0"},[a("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"#"}},[a("textarea",{directives:[{name:"model",rawName:"v-model",value:t.replyText,expression:"replyText"}],staticClass:"form-control border-0 rounded-0 no-focus",staticStyle:{height:"86px","line-height":"18px","max-height":"80px",resize:"none","padding-right":"115.22px"},attrs:{name:"comment",placeholder:"Reply ...",autocomplete:"off",autocorrect:"off",disabled:t.blocked},domProps:{value:t.replyText},on:{input:function(e){e.target.composing||(t.replyText=e.target.value)}}}),t._v(" "),a("input",{class:[t.replyText.length?"d-inline-block btn btn-sm btn-primary rounded-pill font-weight-bold reply-btn text-decoration-none text-uppercase":"d-inline-block btn btn-sm btn-primary rounded-pill font-weight-bold reply-btn text-decoration-none text-uppercase disabled"],attrs:{type:"button",value:"Send",disabled:0==t.replyText.length},on:{click:function(e){return e.preventDefault(),t.sendMessage(e)}}})])]),t._v(" "),a("div",{staticClass:"card-footer p-0"},[a("p",{staticClass:"d-flex justify-content-between align-items-center mb-0 px-3 py-1 small"},[a("span",[a("span",{staticClass:"btn btn-primary btn-sm font-weight-bold py-0 px-3 rounded-pill",on:{click:t.uploadMedia}},[a("i",{staticClass:"fas fa-upload mr-1"}),t._v("\n\t\t\t\t\t\t\t\tAdd Photo/Video\n\t\t\t\t\t\t\t")])]),t._v(" "),a("input",{staticClass:"d-none",attrs:{type:"file",id:"uploadMedia",name:"uploadMedia",accept:"image/jpeg,image/png,image/gif,video/mp4"}}),t._v(" "),a("span",{staticClass:"text-muted font-weight-bold"},[t._v(t._s(t.replyText.length)+"/600")])])])])])]):t._e(),t._v(" "),t.loaded&&"options"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white d-flex justify-content-between align-items-center"},[a("span",[a("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="read"}}},[a("i",{staticClass:"fas fa-chevron-left fa-lg"})])]),t._v(" "),t._m(3),t._v(" "),t._m(4)]),t._v(" "),a("ul",{staticClass:"list-group list-group-flush dm-wrapper",staticStyle:{height:"698px"}},[a("div",{staticClass:"list-group-item media border-bottom"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hideAvatars,expression:"hideAvatars"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch0"},domProps:{checked:Array.isArray(t.hideAvatars)?t._i(t.hideAvatars,null)>-1:t.hideAvatars},on:{change:function(e){var a=t.hideAvatars,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.hideAvatars=a.concat([null])):n>-1&&(t.hideAvatars=a.slice(0,n).concat(a.slice(n+1)))}else t.hideAvatars=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch0"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tHide Avatars\n\t\t\t\t\t\t")])]),t._v(" "),a("div",{staticClass:"list-group-item media border-bottom"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.hideTimestamps,expression:"hideTimestamps"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch1"},domProps:{checked:Array.isArray(t.hideTimestamps)?t._i(t.hideTimestamps,null)>-1:t.hideTimestamps},on:{change:function(e){var a=t.hideTimestamps,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.hideTimestamps=a.concat([null])):n>-1&&(t.hideTimestamps=a.slice(0,n).concat(a.slice(n+1)))}else t.hideTimestamps=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tHide Timestamps\n\t\t\t\t\t\t")])]),t._v(" "),a("div",{staticClass:"list-group-item media border-bottom"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.largerText,expression:"largerText"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch2"},domProps:{checked:Array.isArray(t.largerText)?t._i(t.largerText,null)>-1:t.largerText},on:{change:function(e){var a=t.largerText,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.largerText=a.concat([null])):n>-1&&(t.largerText=a.slice(0,n).concat(a.slice(n+1)))}else t.largerText=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch2"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tLarger Text\n\t\t\t\t\t\t")])]),t._v(" "),a("div",{staticClass:"list-group-item media border-bottom d-flex align-items-center"},[a("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[a("input",{directives:[{name:"model",rawName:"v-model",value:t.mutedNotifications,expression:"mutedNotifications"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"customSwitch4"},domProps:{checked:Array.isArray(t.mutedNotifications)?t._i(t.mutedNotifications,null)>-1:t.mutedNotifications},on:{change:function(e){var a=t.mutedNotifications,s=e.target,i=!!s.checked;if(Array.isArray(a)){var n=t._i(a,null);s.checked?n<0&&(t.mutedNotifications=a.concat([null])):n>-1&&(t.mutedNotifications=a.slice(0,n).concat(a.slice(n+1)))}else t.mutedNotifications=i}}}),t._v(" "),a("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch4"}})]),t._v(" "),a("div",{staticClass:"d-inline-block ml-3 font-weight-bold"},[t._v("\n\t\t\t\t\t\t\tMute Notifications \n\t\t\t\t\t\t\t"),a("p",{staticClass:"small mb-0"},[t._v("You will not receive any direct message notifications from "),a("strong",[t._v(t._s(t.thread.username))]),t._v(".")])])])])])])]):t._e(),t._v(" "),a("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[a("div",{staticClass:"list-group text-center"},[t.ctxContext&&"photo"==t.ctxContext.type?a("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-dark",on:{click:function(e){return t.viewOriginal()}}},[t._v("View Original")]):t._e(),t._v(" "),t.ctxContext&&"video"==t.ctxContext.type?a("div",{staticClass:"list-group-item rounded cursor-pointer font-weight-bold text-dark",on:{click:function(e){return t.viewOriginal()}}},[t._v("Play")]):t._e(),t._v(" "),t.ctxContext&&"link"==t.ctxContext.type?a("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.clickLink()}}},[a("p",{staticClass:"mb-0",staticStyle:{"font-size":"12px"}},[t._v("\n\t\t\t\tNavigate to \n\t\t\t")]),t._v(" "),a("p",{staticClass:"mb-0 font-weight-bold text-dark"},[t._v("\n\t\t\t\t"+t._s(this.ctxContext.meta.domain)+"\n\t\t\t")])]):t._e(),t._v(" "),!t.ctxContext||"text"!=t.ctxContext.type&&"emoji"!=t.ctxContext.type&&"link"!=t.ctxContext.type?t._e():a("div",{staticClass:"list-group-item rounded cursor-pointer text-dark",on:{click:function(e){return t.copyText()}}},[t._v("Copy")]),t._v(" "),t.ctxContext&&!t.ctxContext.isAuthor?a("div",{staticClass:"list-group-item rounded cursor-pointer text-muted",on:{click:function(e){return t.reportMessage()}}},[t._v("Report")]):t._e(),t._v(" "),t.ctxContext&&t.ctxContext.isAuthor?a("div",{staticClass:"list-group-item rounded cursor-pointer text-muted",on:{click:function(e){return t.deleteMessage()}}},[t._v("Delete")]):t._e(),t._v(" "),a("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("Cancel")])])])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("a",{staticClass:"text-muted",attrs:{href:"/account/direct"}},[e("i",{staticClass:"fas fa-chevron-left fa-lg"})])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"d-block bg-primary d-flex align-items-center justify-content-center",staticStyle:{width:"200px",height:"110px","border-radius":"20px"}},[e("div",{staticClass:"text-center"},[e("p",{staticClass:"mb-1"},[e("i",{staticClass:"fas fa-play fa-2x text-white"})]),this._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold text-white"},[this._v("\n\t\t\t\t\t\t\t\t\t\t\t\tPlay\n\t\t\t\t\t\t\t\t\t\t\t")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"rounded-pill bg-primary d-flex align-items-center justify-content-center",staticStyle:{width:"200px",height:"110px"}},[e("div",{staticClass:"text-center"},[e("p",{staticClass:"mb-1"},[e("i",{staticClass:"fas fa-play fa-2x text-white"})]),this._v(" "),e("p",{staticClass:"mb-0 small font-weight-bold"},[this._v("\n\t\t\t\t\t\t\t\t\t\t\t\tPlay\n\t\t\t\t\t\t\t\t\t\t\t")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("p",{staticClass:"mb-0 lead font-weight-bold py-2"},[this._v("Message Settings")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"text-lighter",attrs:{"data-toggle":"tooltip","data-placement":"bottom",title:"Have a nice day!"}},[e("i",{staticClass:"far fa-smile fa-lg"})])}],!1,null,"c67f496c",null);e.default=o.exports},"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 a=e.protocol+"//"+e.host,s=a+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,n=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(n)?t:(i=0===n.indexOf("//")?n:0===n.indexOf("/")?a+n:s+n.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var a=function(t,e){var a=t[1]||"",s=t[3];if(!s)return a;if(e&&"function"==typeof btoa){var i=(o=s,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),n=s.sources.map((function(t){return"/*# sourceURL="+s.sourceRoot+t+" */"}));return[a].concat(n).concat([i]).join("\n")}var o;return[a].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+a+"}":a})).join("")},e.i=function(t,a){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},i=0;i0&&void 0!==arguments[0]?arguments[0]:"browse";this.page=t;var e="/account/direct";switch(t){case"read":e="/account/direct/t/"+this.thread.id;break;case"add":e+="#/new"}window.history.pushState({},"",e)},loadMessage:function(t){var e="/account/direct/t/"+t;window.location.href=e},composeUsernameSelect:function(){var t=this;if(this.profile.username==this.composeUsername)return swal("Ooops!","You cannot send a direct message to yourself.","error"),void(this.composeUsername="");axios.post("/api/direct/lookup",{username:this.composeUsername}).then((function(t){var e="/account/direct/t/"+t.data.id;window.location.href=e})).catch((function(e){swal("Ooops!","The username you entered is incorrect. Please try again","error"),t.composeUsername=""}))},truncate:function(t){return _.truncate(t)},switchTab:function(t){var e=this;switch(t){case"inbox":this.messages.inbox.length;break;case"sent":0==this.messages.sent.length&&axios.get("/api/direct/browse",{params:{a:"sent"}}).then((function(t){e.loaded=!0,e.threads=t.data,e.messages.sent=t.data}));break;case"filtered":0==this.messages.filtered.length&&axios.get("/api/direct/browse",{params:{a:"filtered"}}).then((function(t){e.loaded=!0,e.threads=t.data,e.messages.filtered=t.data}))}this.tab=t},composeSearch:function(t){if(t.length<1)return[];return axios.get("/api/local/compose/tag/search",{params:{q:t}}).then((function(t){return t.data}))},getTagResultValue:function(t){return"@"+t.name},onTagSubmitLocation:function(t){window.location.href="/account/direct/t/"+t.id},messagePagination:function(t,e){var a=this;"inbox"==t&&(this.inboxPage="prev"==e?this.inboxPage-1:this.inboxPage+1,axios.get("/api/direct/browse",{params:{a:"inbox",page:this.inboxPage}}).then((function(t){self.loaded=!0,a.threads=t.data,a.messages.inbox=t.data}))),"sent"==t&&(this.sentPage="prev"==e?this.sentPage-1:this.sentPage+1,axios.get("/api/direct/browse",{params:{a:"sent",page:this.sentPage}}).then((function(t){self.loaded=!0,a.threads=t.data,a.messages.sent=t.data}))),"filtered"==t&&(this.filteredPage="prev"==e?this.filteredPage-1:this.filteredPage+1,axios.get("/api/direct/browse",{params:{a:"filtered",page:this.filteredPage}}).then((function(t){self.loaded=!0,a.threads=t.data,a.messages.filtered=t.data})))}}}),n=a("KHd+"),o=Object(n.a)(i,(function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.loaded&&"browse"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"50vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white py-4"},[a("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("Direct Messages")]),t._v(" "),a("span",{staticClass:"float-right"},[a("a",{staticClass:"btn btn-outline-primary font-weight-bold py-0",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goto("add")}}},[t._v("New Message")])])]),t._v(" "),a("div",{staticClass:"card-header bg-white"},[a("ul",{staticClass:"nav nav-pills nav-fill"},[a("li",{staticClass:"nav-item"},[a("a",{class:["inbox"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("inbox")}}},[t._v("Inbox")])]),t._v(" "),a("li",{staticClass:"nav-item"},[a("a",{class:["sent"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("sent")}}},[t._v("Sent")])]),t._v(" "),a("li",{staticClass:"nav-item"},[a("a",{class:["filtered"==t.tab?"nav-link px-4 font-weight-bold rounded-pill active":"nav-link px-4 font-weight-bold rounded-pill"],attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchTab("filtered")}}},[t._v("Filtered")])])])]),t._v(" "),"inbox"==t.tab?a("ul",{staticClass:"list-group list-group-flush"},[t.messages.inbox.length?t._l(t.messages.inbox,(function(e,s){return a("div",[a("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"/account/direct/t/"+e.id}},[a("div",{staticClass:"media d-flex align-items-center"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,alt:"Generic placeholder image",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold text-truncate",attrs:{title:[e.isLocal?"@"+e.username:e.username],"data-toggle":"tooltip","data-placement":"bottom"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),a("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(0,!0),t._v(" "),a("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tReceived\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),a("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(1,!0)])])])})):a("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[a("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"sent"==t.tab?a("ul",{staticClass:"list-group list-group-flush"},[t.messages.sent.length?t._l(t.messages.sent,(function(e,s){return a("div",[a("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(a){return a.preventDefault(),t.loadMessage(e.id)}}},[a("div",{staticClass:"media d-flex align-items-center"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,alt:"Generic placeholder image",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold text-truncate",attrs:{title:[e.isLocal?"@"+e.username:e.username],"data-toggle":"tooltip","data-placement":"bottom"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),a("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(2,!0),t._v(" "),a("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tDelivered\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),a("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(3,!0)])])])})):a("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[a("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"filtered"==t.tab?a("ul",{staticClass:"list-group list-group-flush"},[t.messages.filtered.length?t._l(t.messages.filtered,(function(e,s){return a("div",[a("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(a){return a.preventDefault(),t.loadMessage(e.id)}}},[a("div",{staticClass:"media d-flex align-items-center"},[a("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,alt:"Generic placeholder image",width:"32px"}}),t._v(" "),a("div",{staticClass:"media-body"},[a("p",{staticClass:"mb-0"},[a("span",{staticClass:"font-weight-bold text-truncate",attrs:{title:[e.isLocal?"@"+e.username:e.username],"data-toggle":"tooltip","data-placement":"bottom"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.name)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),a("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(4,!0),t._v(" "),a("span",{staticClass:"pl-1 pr-3"},[t._v("\n\t\t\t\t\t\t\t\t\t\tFiltered\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),a("span",[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.timeAgo)+"\n\t\t\t\t\t\t\t\t\t")])])]),t._v(" "),t._m(5,!0)])])])})):a("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[a("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e()]),t._v(" "),"inbox"==t.tab?a("div",{staticClass:"mt-3 text-center"},[a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:1==t.inboxPage},on:{click:function(e){return t.messagePagination("inbox","prev")}}},[t._v("Prev")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:8!=t.messages.inbox.length},on:{click:function(e){return t.messagePagination("inbox","next")}}},[t._v("Next")])]):t._e(),t._v(" "),"sent"==t.tab?a("div",{staticClass:"mt-3 text-center"},[a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:1==t.sentPage},on:{click:function(e){return t.messagePagination("sent","prev")}}},[t._v("Prev")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:8!=t.messages.sent.length},on:{click:function(e){return t.messagePagination("sent","next")}}},[t._v("Next")])]):t._e(),t._v(" "),"filtered"==t.tab?a("div",{staticClass:"mt-3 text-center"},[a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:1==t.filteredPage},on:{click:function(e){return t.messagePagination("filtered","prev")}}},[t._v("Prev")]),t._v(" "),a("button",{staticClass:"btn btn-outline-primary rounded-pill btn-sm",attrs:{disabled:8!=t.messages.filtered.length},on:{click:function(e){return t.messagePagination("filtered","next")}}},[t._v("Next")])]):t._e()])]):t._e(),t._v(" "),t.loaded&&"add"==t.page?a("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[a("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[a("div",{staticClass:"card shadow-none border mt-4"},[a("div",{staticClass:"card-header bg-white py-4 d-flex justify-content-between"},[a("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return t.goto("browse")}}},[a("i",{staticClass:"fas fa-chevron-left"})]),t._v(" "),a("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("New Direct Message")]),t._v(" "),t._m(6)]),t._v(" "),a("div",{staticClass:"card-body d-flex align-items-center justify-content-center",staticStyle:{height:"60vh"}},[a("div",{},[a("p",{staticClass:"form-group"},[a("label",[t._v("To:")]),t._v(" "),a("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,placeholder:"@dansup","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),a("span",{staticClass:"help-text small text-muted"},[t._v("Select a username to send a message to.")])],1),t._v(" "),a("hr"),t._v(" "),t._m(7)])])])])]):t._e()])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"far fa-comment text-primary"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"far fa-paper-plane text-primary"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"fas fa-shield-alt",staticStyle:{color:"#fd9426"}})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"float-right"},[e("i",{staticClass:"fas fa-chevron-right fa-lg text-lighter"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("span",[e("i",{staticClass:"fas fa-chevron-right text-white"})])},function(){var t=this.$createElement,e=this._self._c||t;return e("ul",{staticClass:"text-muted"},[e("li",[this._v("You cannot message remote accounts yet.")])])}],!1,null,"d861bc5a",null);e.default=o.exports},"aET+":function(t,e,a){var s,i,n={},o=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=s.apply(this,arguments)),i}),r=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,a){if("function"==typeof t)return t();if(void 0===e[t]){var s=r.call(this,t,a);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),c=null,d=0,u=[],p=a("9tPo");function h(t,e){for(var a=0;a=0&&u.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 s=function(){0;return a.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(a){t.setAttribute(a,e[a])}))}function x(t,e){var a,s,i,n;if(e.transform&&t.css){if(!(n="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=n}if(e.singleton){var o=d++;a=c||(c=v(e)),s=C.bind(null,a,o,!1),i=C.bind(null,a,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(a=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),s=k.bind(null,a,e),i=function(){g(a),a.href&&URL.revokeObjectURL(a.href)}):(a=v(e),s=y.bind(null,a),i=function(){g(a)});return s(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;s(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=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var a=m(t,e);return h(a,e),function(t){for(var s=[],i=0;i0&&void 0!==arguments[0]?arguments[0]:{},n=i.search,o=i.autoSelect,c=void 0!==o&&o,d=i.setValue,u=void 0===d?function(){}:d,p=i.setAttribute,h=void 0===p?function(){}:p,m=i.onUpdate,f=void 0===m?function(){}:m,g=i.onSubmit,v=void 0===g?function(){}:g,b=i.onShow,x=void 0===b?function(){}:b,_=i.onHide,w=void 0===_?function(){}:_,C=i.onLoading,y=void 0===C?function(){}:C,k=i.onLoaded,S=void 0===k?function(){}:k;a(this,t),s(this,"value",""),s(this,"searchCounter",0),s(this,"results",[]),s(this,"selectedIndex",-1),s(this,"handleInput",(function(t){var a=t.target.value;e.updateResults(a),e.value=a})),s(this,"handleKeyDown",(function(t){var a=t.key;switch(a){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var s="ArrowUp"===a||"Up"===a?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(s);break;case"Tab":e.selectResult();break;case"Enter":var i=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(i);break;case"Esc":case"Escape":e.hideResults(),e.setValue();break;default:return}})),s(this,"handleFocus",(function(t){var a=t.target.value;e.updateResults(a),e.value=a})),s(this,"handleBlur",(function(){e.hideResults()})),s(this,"handleResultMouseDown",(function(t){t.preventDefault()})),s(this,"handleResultClick",(function(t){var a=t.target,s=r(a,"[data-result-index]");if(s){e.selectedIndex=parseInt(s.dataset.resultIndex,10);var i=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(i)}})),s(this,"handleArrows",(function(t){var a=e.results.length;e.selectedIndex=(t%a+a)%a,e.onUpdate(e.results,e.selectedIndex)})),s(this,"selectResult",(function(){var t=e.results[e.selectedIndex];t&&e.setValue(t),e.hideResults()})),s(this,"updateResults",(function(t){var a=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){a===e.searchCounter&&(e.results=t,e.onLoaded(),0!==e.results.length?(e.selectedIndex=e.autoSelect?0:-1,e.onUpdate(e.results,e.selectedIndex),e.showResults()):e.hideResults())}))})),s(this,"showResults",(function(){e.setAttribute("aria-expanded",!0),e.onShow()})),s(this,"hideResults",(function(){e.selectedIndex=-1,e.results=[],e.setAttribute("aria-expanded",!1),e.setAttribute("aria-activedescendant",""),e.onUpdate(e.results,e.selectedIndex),e.onHide()})),s(this,"checkSelectedResultVisible",(function(t){var a=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(a){var s=t.getBoundingClientRect(),i=a.getBoundingClientRect();i.tops.bottom&&(t.scrollTop+=i.bottom-s.bottom)}})),this.search=l(n)?n:function(t){return Promise.resolve(n(t))},this.autoSelect=c,this.setValue=u,this.setAttribute=h,this.onUpdate=f,this.onSubmit=v,this.onShow=x,this.onHide=w,this.onLoading=y,this.onLoaded=S},d=0,u=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(++d)};const p=function(t,e,a,s,i,n,o,r,l,c){"boolean"!=typeof o&&(l=r,r=o,o=!1);const d="function"==typeof a?a.options:a;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),s&&(d._scopeId=s),n?(u=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__),e&&e.call(this,l(t)),t&&t._registeredComponents&&t._registeredComponents.add(n)},d._ssrRegister=u):e&&(u=o?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,r(t))}),u)if(d.functional){const t=d.render;d.render=function(e,a){return u.call(a),t(e,a)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return a}({render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{ref:"root"},[t._t("default",[a("div",t._b({},"div",t.rootProps,!1),[a("input",t._g(t._b({ref:"input",on:{input:t.handleInput,keydown:t.core.handleKeyDown,focus:t.core.handleFocus,blur:t.core.handleBlur}},"input",t.inputProps,!1),t.$listeners)),t._v(" "),a("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,s){return[t._t("result",[a("li",t._b({key:t.resultProps[s].id},"li",t.resultProps[s],!1),[t._v("\n "+t._s(t.getResultValue(e))+"\n ")])],{result:e,props:t.resultProps[s]})]}))],2)])],{rootProps:t.rootProps,inputProps:t.inputProps,inputListeners:t.inputListeners,resultListProps:t.resultListProps,resultListListeners:t.resultListListeners,results:t.results,resultProps:t.resultProps})],2)},staticRenderFns:[]},void 0,{name:"Autocomplete",inheritAttrs:!1,props:{search:{type:Function,required:!0},baseClass:{type:String,default:"autocomplete"},autoSelect:{type:Boolean,default:!1},getResultValue:{type:Function,default:function(t){return t}},defaultValue:{type:String,default:""},debounceTime:{type:Number,default:0}},data:function(){var t,e,a,s,i=new c({search:this.search,autoSelect:this.autoSelect,setValue:this.setValue,onUpdate:this.handleUpdate,onSubmit:this.handleSubmit,onShow:this.handleShow,onHide:this.handleHide,onLoading:this.handleLoading,onLoaded:this.handleLoaded});return this.debounceTime>0&&(i.handleInput=(t=i.handleInput,e=this.debounceTime,function(){var i=this,n=arguments,o=function(){s=null,a||t.apply(i,n)},r=a&&!s;clearTimeout(s),s=setTimeout(o,e),r&&t.apply(i,n)})),{core:i,value:this.defaultValue,resultListId:u("".concat(this.baseClass,"-result-list-")),results:[],selectedIndex:-1,expanded:!1,loading:!1,position:"below",resetPosition:!0}},computed:{rootProps:function(){return{class:this.baseClass,style:{position:"relative"},"data-expanded":this.expanded,"data-loading":this.loading,"data-position":this.position}},inputProps:function(){return n({class:"".concat(this.baseClass,"-input"),value:this.value,role:"combobox",autocomplete:"off",autocapitalize:"off",autocorrect:"off",spellcheck:"false","aria-autocomplete":"list","aria-haspopup":"listbox","aria-owns":this.resultListId,"aria-expanded":this.expanded?"true":"false","aria-activedescendant":this.selectedIndex>-1?this.resultProps[this.selectedIndex].id:""},this.$attrs)},inputListeners:function(){return{input:this.handleInput,keydown:this.core.handleKeyDown,focus:this.core.handleFocus,blur:this.core.handleBlur}},resultListProps:function(){var t="below"===this.position?"top":"bottom";return{id:this.resultListId,class:"".concat(this.baseClass,"-result-list"),role:"listbox",style:s({position:"absolute",zIndex:1,width:"100%",visibility:this.expanded?"visible":"hidden",pointerEvents:this.expanded?"auto":"none"},t,"100%")}},resultListListeners:function(){return{mousedown:this.core.handleResultMouseDown,click:this.core.handleResultClick}},resultProps:function(){var t=this;return this.results.map((function(e,a){return n({id:"".concat(t.baseClass,"-result-").concat(a),class:"".concat(t.baseClass,"-result"),"data-result-index":a,role:"option"},t.selectedIndex===a?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,a,s;this.$refs.input&&this.$refs.resultList&&(this.resetPosition&&this.results.length>0&&(this.resetPosition=!1,this.position=(t=this.$refs.input,e=this.$refs.resultList,a=t.getBoundingClientRect(),s=e.getBoundingClientRect(),a.bottom+s.height>window.innerHeight&&window.innerHeight-a.bottom0?"above":"below")),this.core.checkSelectedResultVisible(this.$refs.resultList))},methods:{setValue:function(t){this.value=t?this.getResultValue(t):""},handleUpdate:function(t,e){this.results=t,this.selectedIndex=e,this.$emit("update",t,e)},handleShow:function(){this.expanded=!0},handleHide:function(){this.expanded=!1,this.resetPosition=!0},handleLoading:function(){this.loading=!0},handleLoaded:function(){this.loading=!1},handleInput:function(t){this.value=t.target.value,this.core.handleInput(t)},handleSubmit:function(t){this.$emit("submit",t)},handleDocumentClick:function(t){this.$refs.root.contains(t.target)||this.core.hideResults()}}},void 0,!1,void 0,!1,void 0,void 0,void 0);function h(t){h.installed||(h.installed=!0,t.component("Autocomplete",p))}var m,f={install:h};"undefined"!=typeof window?m=window.Vue:void 0!==t&&(m=t.Vue),m&&m.use(f),p.install=h,e.a=p}).call(this,a("yLpj"))},yLpj:function(t,e){var a;a=function(){return this}();try{a=a||new Function("return this")()}catch(t){"object"==typeof window&&(a=window)}t.exports=a}},[[21,0]]]); \ No newline at end of file diff --git a/public/js/discover.js b/public/js/discover.js index 5f36b2d78..ea55d1017 100644 --- a/public/js/discover.js +++ b/public/js/discover.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"+nCD":function(t,e,n){Vue.component("discover-component",n("RlRG").default)},"24l9":function(t,e,n){"use strict";var s=n("XcS0");n.n(s).a},3:function(t,e,n){t.exports=n("+nCD")},"4Fgl":function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.discover-bar[data-v-3fc56934]::-webkit-scrollbar { \n\tdisplay: none;\n}\n.card-disc[data-v-3fc56934] {\n\t-webkit-box-flex: 0;\n\t flex: 0 0 160px;\n\twidth:160px;\n\theight:100px;\n\tbackground-size: cover !important;\n}\n.post-icon[data-v-3fc56934] {\n\tcolor: #fff;\n\tposition:relative;\n\tmargin-top: 10px;\n\tz-index: 9;\n\topacity: 0.6;\n\ttext-shadow: 3px 3px 16px #272634;\n}\n",""])},"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 n=e.protocol+"//"+e.host,s=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var i,a=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(a)?t:(i=0===a.indexOf("//")?a:0===a.indexOf("/")?n+a:s+a.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")}))}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",s=t[3];if(!s)return n;if(e&&"function"==typeof btoa){var i=(r=s,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),a=s.sources.map((function(t){return"/*# sourceURL="+s.sourceRoot+t+" */"}));return[n].concat(a).concat([i]).join("\n")}var r;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var s={},i=0;i1&&(window.location.href="/i/results?q="+this.searchTerm)},loadTrending:function(){var t=this;"daily"==this.trendingRange&&this.trendingDaily.length?this.trending=this.trendingDaily:"monthly"==this.trendingRange&&this.trendingMonthly.length?this.trending=this.trendingMonthly:axios.get("/api/pixelfed/v2/discover/posts/trending",{params:{range:this.trendingRange}}).then((function(e){"daily"==t.trendingRange&&(t.trendingDaily=e.data),"monthly"==t.trendingRange&&(t.trendingMonthly=e.data),t.trending=e.data}))},trendingRangeToggle:function(t){this.trendingRange=t,this.loadTrending()},loadTrendingHashtags:function(){var t=this;axios.get("/api/pixelfed/v2/discover/posts/hashtags").then((function(e){t.hashtags=e.data}))},loadTrendingPlaces:function(){var t=this;axios.get("/api/pixelfed/v2/discover/posts/places").then((function(e){t.places=e.data}))}}},i=(n("24l9"),n("KHd+")),a=Object(i.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.loaded?n("div",[n("div",{staticClass:"d-block d-md-none border-top-0 pt-3"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTerm,expression:"searchTerm"}],staticClass:"form-control rounded-pill shadow-sm",attrs:{placeholder:"Search"},domProps:{value:t.searchTerm},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchSubmit(e)},input:function(e){e.target.composing||(t.searchTerm=e.target.value)}}})]),t._v(" "),t._m(0),t._v(" "),t.hashtags.length?n("section",{staticClass:"mb-4 pb-5 section-explore mt-4 pt-4"},[n("div",{staticClass:"lead"},[n("i",{staticClass:"fas fa-hashtag text-lighter fa-lg mr-3"}),t._v(" "),t._l(t.hashtags,(function(e,s){return n("a",{staticClass:"badge badge-light rounded-pill border py-2 px-3 mr-2 mb-2 shadow-sm border-danger text-danger",attrs:{href:e.url}},[t._v(t._s(e.name))])}))],2),t._v(" "),n("div",{staticClass:"lead mt-4"},[n("i",{staticClass:"fas fa-map-marker-alt text-lighter fa-lg mr-3"}),t._v(" "),t._l(t.places,(function(e,s){return n("a",{staticClass:"badge badge-light rounded-pill border py-2 px-3 mr-2 mb-2 shadow-sm border-danger text-danger",attrs:{href:e.url}},[t._v(t._s(e.name)+", "+t._s(e.country))])}))],2)]):t._e(),t._v(" "),t.trending.length?n("section",{staticClass:"mb-5 section-explore"},[n("div",{staticClass:"profile-timeline"},[n("div",{staticClass:"row p-0 mt-5"},[n("div",{staticClass:"col-12 mb-3 d-flex justify-content-between align-items-center"},[n("p",{staticClass:"d-block d-md-none h1 font-weight-bold mb-0"},[t._v("Trending")]),t._v(" "),n("p",{staticClass:"d-none d-md-block display-4 font-weight-bold mb-0"},[t._v("Trending")]),t._v(" "),n("div",[n("div",{staticClass:"btn-group"},[n("button",{class:"daily"==t.trendingRange?"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-danger":"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-outline-danger",on:{click:function(e){return t.trendingRangeToggle("daily")}}},[t._v("Daily")]),t._v(" "),n("button",{class:"monthly"==t.trendingRange?"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-danger":"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-outline-danger",on:{click:function(e){return t.trendingRangeToggle("monthly")}}},[t._v("Monthly")])])])])]),t._v(" "),n("div",{staticClass:"row p-0",staticStyle:{display:"flex"}},t._l(t.trending.slice(0,12),(function(e,s){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3 pt-0"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:{"background-image":"url("+e.media_attachments[0].preview_url+")"}})])])])})),0)])]):t._e(),t._v(" "),t.categories.length>0?n("section",{staticClass:"mb-5 section-explore"},[n("div",{staticClass:"profile-timeline pt-3"},[t._m(1),t._v(" "),n("section",{staticClass:"d-none d-md-flex mb-md-2 discover-bar",staticStyle:{width:"auto",overflow:"auto hidden"}},t._l(t.categories,(function(e,s){return n("a",{key:s+"_cat_",staticClass:"bg-dark rounded d-inline-flex align-items-end justify-content-center mr-3 box-shadow card-disc text-decoration-none",style:"background: linear-gradient(rgba(0, 0, 0, 0.3),rgba(0, 0, 0, 0.3)),url("+e.thumb+");",attrs:{href:e.url}},[n("p",{staticClass:"text-white font-weight-bold",staticStyle:{"text-shadow":"3px 3px 16px #272634"}},[t._v(t._s(e.name))])])})),0)])]):t._e(),t._v(" "),t.categories.length>0?n("section",{staticClass:"py-5 mb-5 section-explore bg-warning rounded"},[t._m(2)]):t._e(),t._v(" "),n("section",{staticClass:"pt-5 mb-5 section-explore"},[n("div",{staticClass:"profile-timeline pt-3"},[t._m(3),t._v(" "),n("div",{staticClass:"row p-0",staticStyle:{display:"flex"}},t._l(t.posts,(function(e,s){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3 pt-0"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:{"background-image":"url("+e.thumb+")"}})])])])})),0)])])]):n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"70vh"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"pt-3"},[e("p",{staticClass:"d-block d-md-none h1 font-weight-bold text-lighter pt-3",staticStyle:{opacity:"0.4"}},[e("i",{staticClass:"far fa-compass"}),this._v(" DISCOVER")]),this._v(" "),e("p",{staticClass:"d-none d-md-block display-3 font-weight-bold text-lighter pt-3",staticStyle:{opacity:"0.4"}},[e("i",{staticClass:"far fa-compass"}),this._v(" DISCOVER")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row p-0 mt-5"},[e("div",{staticClass:"col-12 mb-4 d-flex justify-content-between align-items-center"},[e("p",{staticClass:"d-block d-md-none h1 font-weight-bold mb-0"},[this._v("Categories")]),this._v(" "),e("p",{staticClass:"d-none d-md-block display-4 font-weight-bold mb-0"},[this._v("Categories")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"profile-timeline py-3"},[e("div",{staticClass:"row p-0 my-5"},[e("div",{staticClass:"col-12 mb-3 text-center text-dark"},[e("p",{staticClass:"d-none d-md-block display-3 font-weight-bold"},[this._v("Discover. Categories.")]),this._v(" "),e("p",{staticClass:"d-block d-md-none h1 font-weight-bold"},[this._v("Discover. Categories.")]),this._v(" "),e("p",{staticClass:"h4 font-weight-light mb-0"},[this._v("Discover amazing posts, people, places and hashtags.")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row p-0 mt-5"},[e("div",{staticClass:"col-12 mb-3 d-flex justify-content-between align-items-center"},[e("p",{staticClass:"d-block d-md-none h1 font-weight-bold mb-0"},[this._v("For You")]),this._v(" "),e("p",{staticClass:"d-none d-md-block display-4 font-weight-bold mb-0"},[this._v("For You")])])])}],!1,null,"3fc56934",null);e.default=a.exports},XcS0:function(t,e,n){var s=n("4Fgl");"string"==typeof s&&(s=[[t.i,s,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(s,i);s.locals&&(t.exports=s.locals)},"aET+":function(t,e,n){var s,i,a={},r=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=s.apply(this,arguments)),i}),o=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var s=o.call(this,t,n);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),c=null,d=0,f=[],p=n("9tPo");function u(t,e){for(var n=0;n=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var s=function(){0;return n.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),g(t,e),e}function b(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function y(t,e){var n,s,i,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var r=d++;n=c||(c=m(e)),s=x.bind(null,n,r,!1),i=x.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),g(t,e),e}(e),s=R.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),s=w.bind(null,n),i=function(){v(n)});return s(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;s(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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return u(n,e),function(t){for(var s=[],i=0;i1&&(window.location.href="/i/results?q="+this.searchTerm)},loadTrending:function(){var t=this;"daily"==this.trendingRange&&this.trendingDaily.length?this.trending=this.trendingDaily:"monthly"==this.trendingRange&&this.trendingMonthly.length?this.trending=this.trendingMonthly:axios.get("/api/pixelfed/v2/discover/posts/trending",{params:{range:this.trendingRange}}).then((function(e){"daily"==t.trendingRange&&(t.trendingDaily=e.data),"monthly"==t.trendingRange&&(t.trendingMonthly=e.data),t.trending=e.data}))},trendingRangeToggle:function(t){this.trendingRange=t,this.loadTrending()},loadTrendingHashtags:function(){var t=this;axios.get("/api/pixelfed/v2/discover/posts/hashtags").then((function(e){t.hashtags=e.data}))},loadTrendingPlaces:function(){var t=this;axios.get("/api/pixelfed/v2/discover/posts/places").then((function(e){t.places=e.data}))}}},i=(n("24l9"),n("KHd+")),a=Object(i.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.loaded?n("div",[n("div",{staticClass:"d-block d-md-none border-top-0 pt-3"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.searchTerm,expression:"searchTerm"}],staticClass:"form-control rounded-pill shadow-sm",attrs:{placeholder:"Search"},domProps:{value:t.searchTerm},on:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.searchSubmit(e)},input:function(e){e.target.composing||(t.searchTerm=e.target.value)}}})]),t._v(" "),t._m(0),t._v(" "),t.hashtags.length?n("section",{staticClass:"mb-4 pb-5 section-explore mt-4 pt-4"},[n("div",{staticClass:"lead"},[n("i",{staticClass:"fas fa-hashtag text-lighter fa-lg mr-3"}),t._v(" "),t._l(t.hashtags,(function(e,s){return n("a",{staticClass:"badge badge-light rounded-pill border py-2 px-3 mr-2 mb-2 shadow-sm border-danger text-danger",attrs:{href:e.url}},[t._v(t._s(e.name))])}))],2),t._v(" "),n("div",{staticClass:"lead mt-4"},[n("i",{staticClass:"fas fa-map-marker-alt text-lighter fa-lg mr-3"}),t._v(" "),t._l(t.places,(function(e,s){return n("a",{staticClass:"badge badge-light rounded-pill border py-2 px-3 mr-2 mb-2 shadow-sm border-danger text-danger",attrs:{href:e.url}},[t._v(t._s(e.name)+", "+t._s(e.country))])}))],2)]):t._e(),t._v(" "),t.trending.length?n("section",{staticClass:"mb-5 section-explore"},[n("div",{staticClass:"profile-timeline"},[n("div",{staticClass:"row p-0 mt-5"},[n("div",{staticClass:"col-12 mb-3 d-flex justify-content-between align-items-center"},[n("p",{staticClass:"d-block d-md-none h1 font-weight-bold mb-0"},[t._v("Trending")]),t._v(" "),n("p",{staticClass:"d-none d-md-block display-4 font-weight-bold mb-0"},[t._v("Trending")]),t._v(" "),n("div",[n("div",{staticClass:"btn-group"},[n("button",{class:"daily"==t.trendingRange?"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-danger":"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-outline-danger",on:{click:function(e){return t.trendingRangeToggle("daily")}}},[t._v("Daily")]),t._v(" "),n("button",{class:"monthly"==t.trendingRange?"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-danger":"btn py-1 font-weight-bold px-3 text-uppercase btn-sm btn-outline-danger",on:{click:function(e){return t.trendingRangeToggle("monthly")}}},[t._v("Monthly")])])])])]),t._v(" "),n("div",{staticClass:"row p-0",staticStyle:{display:"flex"}},t._l(t.trending.slice(0,12),(function(e,s){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3 pt-0"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:{"background-image":"url("+e.media_attachments[0].preview_url+")"}})])])])})),0)])]):t._e(),t._v(" "),t.categories.length>0?n("section",{staticClass:"mb-5 section-explore"},[n("div",{staticClass:"profile-timeline pt-3"},[t._m(1),t._v(" "),n("section",{staticClass:"d-none d-md-flex mb-md-2 discover-bar",staticStyle:{width:"auto",overflow:"auto hidden"}},t._l(t.categories,(function(e,s){return n("a",{key:s+"_cat_",staticClass:"bg-dark rounded d-inline-flex align-items-end justify-content-center mr-3 box-shadow card-disc text-decoration-none",style:"background: linear-gradient(rgba(0, 0, 0, 0.3),rgba(0, 0, 0, 0.3)),url("+e.thumb+");",attrs:{href:e.url}},[n("p",{staticClass:"text-white font-weight-bold",staticStyle:{"text-shadow":"3px 3px 16px #272634"}},[t._v(t._s(e.name))])])})),0)])]):t._e(),t._v(" "),t.categories.length>0?n("section",{staticClass:"py-5 mb-5 section-explore bg-warning rounded"},[t._m(2)]):t._e(),t._v(" "),n("section",{staticClass:"pt-5 mb-5 section-explore"},[n("div",{staticClass:"profile-timeline pt-3"},[t._m(3),t._v(" "),n("div",{staticClass:"row p-0",staticStyle:{display:"flex"}},t._l(t.posts,(function(e,s){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3 pt-0"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:{"background-image":"url("+e.thumb+")"}})])])])})),0)])])]):n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"70vh"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"pt-3"},[e("p",{staticClass:"d-block d-md-none h1 font-weight-bold text-lighter pt-3",staticStyle:{opacity:"0.4"}},[e("i",{staticClass:"far fa-compass"}),this._v(" DISCOVER")]),this._v(" "),e("p",{staticClass:"d-none d-md-block display-3 font-weight-bold text-lighter pt-3",staticStyle:{opacity:"0.4"}},[e("i",{staticClass:"far fa-compass"}),this._v(" DISCOVER")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row p-0 mt-5"},[e("div",{staticClass:"col-12 mb-4 d-flex justify-content-between align-items-center"},[e("p",{staticClass:"d-block d-md-none h1 font-weight-bold mb-0"},[this._v("Categories")]),this._v(" "),e("p",{staticClass:"d-none d-md-block display-4 font-weight-bold mb-0"},[this._v("Categories")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"profile-timeline py-3"},[e("div",{staticClass:"row p-0 my-5"},[e("div",{staticClass:"col-12 mb-3 text-center text-dark"},[e("p",{staticClass:"d-none d-md-block display-3 font-weight-bold"},[this._v("Discover. Categories.")]),this._v(" "),e("p",{staticClass:"d-block d-md-none h1 font-weight-bold"},[this._v("Discover. Categories.")]),this._v(" "),e("p",{staticClass:"h4 font-weight-light mb-0"},[this._v("Discover amazing posts, people, places and hashtags.")])])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row p-0 mt-5"},[e("div",{staticClass:"col-12 mb-3 d-flex justify-content-between align-items-center"},[e("p",{staticClass:"d-block d-md-none h1 font-weight-bold mb-0"},[this._v("For You")]),this._v(" "),e("p",{staticClass:"d-none d-md-block display-4 font-weight-bold mb-0"},[this._v("For You")])])])}],!1,null,"3fc56934",null);e.default=a.exports},XcS0:function(t,e,n){var s=n("4Fgl");"string"==typeof s&&(s=[[t.i,s,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(s,i);s.locals&&(t.exports=s.locals)},"aET+":function(t,e,n){var s,i,a={},r=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=s.apply(this,arguments)),i}),o=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var s=o.call(this,t,n);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),c=null,d=0,f=[],p=n("9tPo");function u(t,e){for(var n=0;n=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var s=function(){0;return n.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),g(t,e),e}function b(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function y(t,e){var n,s,i,a;if(e.transform&&t.css){if(!(a="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=a}if(e.singleton){var r=d++;n=c||(c=m(e)),s=x.bind(null,n,r,!1),i=x.bind(null,n,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),g(t,e),e}(e),s=R.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),s=w.bind(null,n),i=function(){v(n)});return s(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;s(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=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return u(n,e),function(t){for(var s=[],i=0;i(this.authenticated?29:10)?t.complete():axios.get("/api/v2/discover/tag",{params:{hashtag:this.hashtag,page:this.page}}).then((function(n){var a=n.data;if(a.tags.length){var r,o=a.tags.filter((function(t){return!(!t||0==t.length)}));if((r=e.tags).push.apply(r,s(o)),o.length>9)return void t.complete();e.page++,t.loaded()}else t.complete()}))},followHashtag:function(){var t=this;axios.post("/api/local/discover/tag/subscribe",{name:this.hashtag}).then((function(e){t.following=!0}))},unfollowHashtag:function(){var t=this;axios.post("/api/local/discover/tag/subscribe",{name:this.hashtag}).then((function(e){t.following=!1}))}}},r=(n("mXeM"),n("KHd+")),o=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.loaded?n("div",{staticClass:"container"},[n("div",{staticClass:"profile-header row my-5"},[t._m(0),t._v(" "),n("div",{staticClass:"col-12 col-md-9 d-flex align-items-center"},[n("div",{staticClass:"profile-details"},[n("div",{staticClass:"username-bar pb-2"},[n("p",{staticClass:"tag-header mb-0"},[t._v("#"+t._s(t.hashtag))]),t._v(" "),n("p",{staticClass:"lead"},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.tags.length?t.hashtagCount:"0"))]),t._v(" posts")]),t._v(" "),n("div",{staticClass:"d-flex justify-content-between align-items-center"},[t.authenticated&&t.tags.length?n("p",{staticClass:"pt-3 mr-4"},[t.following?n("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-1 px-5",attrs:{type:"button"},on:{click:t.unfollowHashtag}},[t._v("\n\t\t\t\t\t\t\t\t\tUnfollow\n\t\t\t\t\t\t\t\t")]):n("button",{staticClass:"btn btn-primary font-weight-bold py-1 px-5",attrs:{type:"button"},on:{click:t.followHashtag}},[t._v("\n\t\t\t\t\t\t\t\t\tFollow\n\t\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.forceNsfw,expression:"forceNsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"nsfwSwitch"},domProps:{checked:Array.isArray(t.forceNsfw)?t._i(t.forceNsfw,null)>-1:t.forceNsfw},on:{change:function(e){var n=t.forceNsfw,s=e.target,a=!!s.checked;if(Array.isArray(n)){var r=t._i(n,null);s.checked?r<0&&(t.forceNsfw=n.concat([null])):r>-1&&(t.forceNsfw=n.slice(0,r).concat(n.slice(r+1)))}else t.forceNsfw=a}}}),t._v(" "),n("label",{staticClass:"custom-control-label font-weight-bold text-muted",attrs:{for:"nsfwSwitch"}},[t._v("Show NSFW Content")])])])])])])]),t._v(" "),t.tags.length?n("div",{staticClass:"tag-timeline"},[t.top.length?n("p",{staticClass:"font-weight-bold text-muted mb-0"},[t._v("Top Posts")]):t._e(),t._v(" "),n("div",{staticClass:"row pb-5"},t._l(t.top,(function(e,s){return n("div",{staticClass:"col-4 p-0 p-sm-2 p-md-3 hashtag-post-square"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.status.url}},[n("div",{class:[e.status.filter?"square "+e.status.filter:"square"]},[e.status.sensitive&&0==t.forceNsfw?n("div",{staticClass:"square-content",style:"background-image: url(/storage/no-preview.png)"}):n("div",{staticClass:"square-content",style:"background-image: url("+e.status.thumb+")"}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",{staticClass:"pr-4"},[n("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._v(" "),n("span",[n("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")])])])])])])})),0),t._v(" "),n("p",{staticClass:"font-weight-bold text-muted mb-0"},[t._v("Most Recent")]),t._v(" "),n("div",{staticClass:"row"},[t._l(t.tags,(function(e,s){return n("div",{staticClass:"col-4 p-0 p-sm-2 p-md-3 hashtag-post-square"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.status.url}},[n("div",{class:[e.status.filter?"square "+e.status.filter:"square"]},[e.status.sensitive&&0==t.forceNsfw?n("div",{staticClass:"square-content",style:"background-image: url(/storage/no-preview.png)"}):n("div",{staticClass:"square-content",style:"background-image: url("+e.status.thumb+")"}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",{staticClass:"pr-4"},[n("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._v(" "),n("span",[n("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._v(" "),t.tags.length&&t.loaded?n("div",{staticClass:"card card-body text-center shadow-none bg-transparent border-0"},[n("infinite-loading",{on:{infinite:t.infiniteLoader}},[n("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),n("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e()],2)]):n("div",[n("p",{staticClass:"text-center lead font-weight-bold"},[t._v("No public posts found.")])])]):n("div",{staticClass:"container text-center"},[t._m(1)])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"col-12 col-md-3"},[e("div",{staticClass:"profile-avatar"},[e("div",{staticClass:"bg-primary mb-3 d-flex align-items-center justify-content-center display-4 font-weight-bold text-white",staticStyle:{width:"172px",height:"172px","border-radius":"100%"}},[this._v("#")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mt-5 spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])}],!1,null,"0b5bf014",null);e.default=o.exports},W8EH:function(t,e,n){var s=n("ou/g");"string"==typeof s&&(s=[[t.i,s,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(s,a);s.locals&&(t.exports=s.locals)},"aET+":function(t,e,n){var s,a,r={},o=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=s.apply(this,arguments)),a}),i=function(t,e){return e?e.querySelector(t):document.querySelector(t)},c=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var s=i.call(this,t,n);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),l=null,f=0,u=[],d=n("9tPo");function p(t,e){for(var n=0;n=0&&u.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var s=function(){0;return n.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),v(t,e),e}function b(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function w(t,e){var n,s,a,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var o=f++;n=l||(l=m(e)),s=_.bind(null,n,o,!1),a=_.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),v(t,e),e}(e),s=E.bind(null,n,e),a=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),s=x.bind(null,n),a=function(){g(n)});return s(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;s(t=e)}else a()}}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=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return p(n,e),function(t){for(var s=[],a=0;a(this.authenticated?29:10)?t.complete():axios.get("/api/v2/discover/tag",{params:{hashtag:this.hashtag,page:this.page}}).then((function(n){var a=n.data;if(a.tags.length){var r,o=a.tags.filter((function(t){return!(!t||0==t.length)}));if((r=e.tags).push.apply(r,s(o)),o.length>9)return void t.complete();e.page++,t.loaded()}else t.complete()}))},followHashtag:function(){var t=this;axios.post("/api/local/discover/tag/subscribe",{name:this.hashtag}).then((function(e){t.following=!0}))},unfollowHashtag:function(){var t=this;axios.post("/api/local/discover/tag/subscribe",{name:this.hashtag}).then((function(e){t.following=!1}))}}},r=(n("mXeM"),n("KHd+")),o=Object(r.a)(a,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.loaded?n("div",{staticClass:"container"},[n("div",{staticClass:"profile-header row my-5"},[t._m(0),t._v(" "),n("div",{staticClass:"col-12 col-md-9 d-flex align-items-center"},[n("div",{staticClass:"profile-details"},[n("div",{staticClass:"username-bar pb-2"},[n("p",{staticClass:"tag-header mb-0"},[t._v("#"+t._s(t.hashtag))]),t._v(" "),n("p",{staticClass:"lead"},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.tags.length?t.hashtagCount:"0"))]),t._v(" posts")]),t._v(" "),n("div",{staticClass:"d-flex justify-content-between align-items-center"},[t.authenticated&&t.tags.length?n("p",{staticClass:"pt-3 mr-4"},[t.following?n("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-1 px-5",attrs:{type:"button"},on:{click:t.unfollowHashtag}},[t._v("\n\t\t\t\t\t\t\t\t\tUnfollow\n\t\t\t\t\t\t\t\t")]):n("button",{staticClass:"btn btn-primary font-weight-bold py-1 px-5",attrs:{type:"button"},on:{click:t.followHashtag}},[t._v("\n\t\t\t\t\t\t\t\t\tFollow\n\t\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),n("div",{staticClass:"custom-control custom-switch"},[n("input",{directives:[{name:"model",rawName:"v-model",value:t.forceNsfw,expression:"forceNsfw"}],staticClass:"custom-control-input",attrs:{type:"checkbox",id:"nsfwSwitch"},domProps:{checked:Array.isArray(t.forceNsfw)?t._i(t.forceNsfw,null)>-1:t.forceNsfw},on:{change:function(e){var n=t.forceNsfw,s=e.target,a=!!s.checked;if(Array.isArray(n)){var r=t._i(n,null);s.checked?r<0&&(t.forceNsfw=n.concat([null])):r>-1&&(t.forceNsfw=n.slice(0,r).concat(n.slice(r+1)))}else t.forceNsfw=a}}}),t._v(" "),n("label",{staticClass:"custom-control-label font-weight-bold text-muted",attrs:{for:"nsfwSwitch"}},[t._v("Show NSFW Content")])])])])])])]),t._v(" "),t.tags.length?n("div",{staticClass:"tag-timeline"},[t.top.length?n("p",{staticClass:"font-weight-bold text-muted mb-0"},[t._v("Top Posts")]):t._e(),t._v(" "),n("div",{staticClass:"row pb-5"},t._l(t.top,(function(e,s){return n("div",{staticClass:"col-4 p-0 p-sm-2 p-md-3 hashtag-post-square"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.status.url}},[n("div",{class:[e.status.filter?"square "+e.status.filter:"square"]},[e.status.sensitive&&0==t.forceNsfw?n("div",{staticClass:"square-content",style:"background-image: url(/storage/no-preview.png)"}):n("div",{staticClass:"square-content",style:"background-image: url("+e.status.thumb+")"}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",{staticClass:"pr-4"},[n("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._v(" "),n("span",[n("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")])])])])])])})),0),t._v(" "),n("p",{staticClass:"font-weight-bold text-muted mb-0"},[t._v("Most Recent")]),t._v(" "),n("div",{staticClass:"row"},[t._l(t.tags,(function(e,s){return n("div",{staticClass:"col-4 p-0 p-sm-2 p-md-3 hashtag-post-square"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.status.url}},[n("div",{class:[e.status.filter?"square "+e.status.filter:"square"]},[e.status.sensitive&&0==t.forceNsfw?n("div",{staticClass:"square-content",style:"background-image: url(/storage/no-preview.png)"}):n("div",{staticClass:"square-content",style:"background-image: url("+e.status.thumb+")"}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",{staticClass:"pr-4"},[n("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._v(" "),n("span",[n("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._v(" "),t.tags.length&&t.loaded?n("div",{staticClass:"card card-body text-center shadow-none bg-transparent border-0"},[n("infinite-loading",{on:{infinite:t.infiniteLoader}},[n("div",{staticClass:"font-weight-bold",attrs:{slot:"no-results"},slot:"no-results"}),t._v(" "),n("div",{staticClass:"font-weight-bold",attrs:{slot:"no-more"},slot:"no-more"})])],1):t._e()],2)]):n("div",[n("p",{staticClass:"text-center lead font-weight-bold"},[t._v("No public posts found.")])])]):n("div",{staticClass:"container text-center"},[t._m(1)])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"col-12 col-md-3"},[e("div",{staticClass:"profile-avatar"},[e("div",{staticClass:"bg-primary mb-3 d-flex align-items-center justify-content-center display-4 font-weight-bold text-white",staticStyle:{width:"172px",height:"172px","border-radius":"100%"}},[this._v("#")])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"mt-5 spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])}],!1,null,"0b5bf014",null);e.default=o.exports},W8EH:function(t,e,n){var s=n("ou/g");"string"==typeof s&&(s=[[t.i,s,""]]);var a={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(s,a);s.locals&&(t.exports=s.locals)},"aET+":function(t,e,n){var s,a,r={},o=(s=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===a&&(a=s.apply(this,arguments)),a}),i=function(t,e){return e?e.querySelector(t):document.querySelector(t)},c=function(t){var e={};return function(t,n){if("function"==typeof t)return t();if(void 0===e[t]){var s=i.call(this,t,n);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(t){s=null}e[t]=s}return e[t]}}(),l=null,f=0,u=[],d=n("9tPo");function p(t,e){for(var n=0;n=0&&u.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var s=function(){0;return n.nc}();s&&(t.attrs.nonce=s)}return b(e,t.attrs),v(t,e),e}function b(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function w(t,e){var n,s,a,r;if(e.transform&&t.css){if(!(r="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=r}if(e.singleton){var o=f++;n=l||(l=m(e)),s=_.bind(null,n,o,!1),a=_.bind(null,n,o,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),v(t,e),e}(e),s=E.bind(null,n,e),a=function(){g(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),s=x.bind(null,n),a=function(){g(n)});return s(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;s(t=e)}else a()}}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=o()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return p(n,e),function(t){for(var s=[],a=0;a=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var s=l++;n=u||(u=m(e)),r=C.bind(null,n,s,!1),o=C.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),r=S.bind(null,n,e),o=function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=x.bind(null,n),o=function(){b(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}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=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=v(t,e);return p(n,e),function(t){for(var r=[],o=0;o0&&!this.paused&&!this.ended&&this.readyState>2)}});var r={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;$("video").each((function(){n.src!=$(this)[0].src&&$(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})}}},o=(n("ZmVo"),n("KHd+")),i=Object(o.a)(r,(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,r){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)])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("p",{staticClass:"lead text-center mb-0"},[this._v("Loops are an exciting new way to explore short videos on Pixelfed.")])])])}],!1,null,null,null);e.default=i.exports},iXJE:function(t,e,n){var r=n("LsAn");"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(t.exports=r.locals)},v6kC:function(t,e,n){Vue.component("loops-component",n("i8Ta").default)}},[[11,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{11:function(t,e,n){t.exports=n("v6kC")},"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 n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,i=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(i)?t:(o=0===i.indexOf("//")?i:0===i.indexOf("/")?n+i:r+i.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",r=t[3];if(!r)return n;if(e&&"function"==typeof btoa){var o=(s=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(s))))+" */"),i=r.sources.map((function(t){return"/*# sourceURL="+r.sourceRoot+t+" */"}));return[n].concat(i).concat([o]).join("\n")}var s;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},o=0;o=0&&f.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var r=function(){0;return n.nc}();r&&(t.attrs.nonce=r)}return y(e,t.attrs),h(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function g(t,e){var n,r,o,i;if(e.transform&&t.css){if(!(i="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=i}if(e.singleton){var s=l++;n=u||(u=m(e)),r=C.bind(null,n,s,!1),o=C.bind(null,n,s,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),h(t,e),e}(e),r=S.bind(null,n,e),o=function(){b(n),n.href&&URL.revokeObjectURL(n.href)}):(n=m(e),r=x.bind(null,n),o=function(){b(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else o()}}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=s()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=v(t,e);return p(n,e),function(t){for(var r=[],o=0;o0&&!this.paused&&!this.ended&&this.readyState>2)}});var r={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;$("video").each((function(){n.src!=$(this)[0].src&&$(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})}}},o=(n("ZmVo"),n("KHd+")),i=Object(o.a)(r,(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,r){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)])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-body"},[e("p",{staticClass:"lead text-center mb-0"},[this._v("Loops are an exciting new way to explore short videos on Pixelfed.")])])])}],!1,null,null,null);e.default=i.exports},iXJE:function(t,e,n){var r=n("LsAn");"string"==typeof r&&(r=[[t.i,r,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(r,o);r.locals&&(t.exports=r.locals)},v6kC:function(t,e,n){Vue.component("loops-component",n("i8Ta").default)}},[[11,0]]]); \ No newline at end of file diff --git a/public/js/mode-dot.js b/public/js/mode-dot.js index 32ccc1e22..74719c40f 100644 --- a/public/js/mode-dot.js +++ b/public/js/mode-dot.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[14],{14:function(e,t,n){e.exports=n("n/Tz")},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"n/Tz":function(e,t,n){(function(e){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,i=e.findMatchingBracket({row:t,column:r});if(!i||i.row==t)return 0;var a=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,r-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r})),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function e(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},e.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i})),ace.define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=(e("./doc_comment_highlight_rules").DocCommentHighlightRules,function(){var e=r.arrayToMap("strict|node|edge|graph|digraph|subgraph".split("|")),t=r.arrayToMap("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z".split("|"));this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/#.*$/},{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/},{token:"keyword.operator",regex:/\+|=|\->/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}});o.inherits(a,i),t.DotHighlightRules=a})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r,i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);if(r=i.match(this.foldingStartMarker)){var a=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,a);var l=e.getCommentFoldRange(n,a+r[0].length,1);return l&&!l.isMultiLine()&&(o?l=this.getSectionRange(e,n):"all"!=t&&(l=null)),l}if("markbegin"!==t&&(r=i.match(this.foldingStopMarker))){a=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length,l=t+=1,s=e.getLength();++tg)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==g)break}l=t}}return new r(i,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++na)return new r(a,o,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./dot_highlight_rules").DotHighlightRules,l=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=a,this.$outdent=new i,this.foldingRules=new l,this.$behaviour=this.$defaultBehaviour};o.inherits(s,r),function(){this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens;r.state;if(i.length&&"comment"==i[i.length-1].type)return o;"start"==e&&(t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(o+=n));return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/dot"}.call(s.prototype),t.Mode=s})),ace.require(["ace/mode/dot"],(function(o){"object"==n(e)&&"object"==n(t)&&e&&(e.exports=o)}))}).call(this,n("YuTi")(e))}},[[14,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{14:function(e,t,n){e.exports=n("n/Tz")},YuTi:function(e,t){e.exports=function(e){return e.webpackPolyfill||(e.deprecate=function(){},e.paths=[],e.children||(e.children=[]),Object.defineProperty(e,"loaded",{enumerable:!0,get:function(){return e.l}}),Object.defineProperty(e,"id",{enumerable:!0,get:function(){return e.i}}),e.webpackPolyfill=1),e}},"n/Tz":function(e,t,n){(function(e){function n(e){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],(function(e,t,n){"use strict";var o=e("../range").Range,r=function(){};(function(){this.checkOutdent=function(e,t){return!!/^\s+$/.test(e)&&/^\s*\}/.test(t)},this.autoOutdent=function(e,t){var n=e.getLine(t).match(/^(\s*\})/);if(!n)return 0;var r=n[1].length,i=e.findMatchingBracket({row:t,column:r});if(!i||i.row==t)return 0;var a=this.$getIndent(e.getLine(i.row));e.replace(new o(t,0,t,r-1),a)},this.$getIndent=function(e){return e.match(/^\s*/)[0]}}).call(r.prototype),t.MatchingBraceOutdent=r})),ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text_highlight_rules").TextHighlightRules,i=function e(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},e.getTagRule(),{defaultToken:"comment.doc",caseInsensitive:!0}]}};o.inherits(i,r),i.getTagRule=function(e){return{token:"comment.doc.tag.storage.type",regex:"\\b(?:TODO|FIXME|XXX|HACK)\\b"}},i.getStartRule=function(e){return{token:"comment.doc",regex:"\\/\\*(?=\\*)",next:e}},i.getEndRule=function(e){return{token:"comment.doc",regex:"\\*\\/",next:e}},t.DocCommentHighlightRules=i})),ace.define("ace/mode/dot_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"],(function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("../lib/lang"),i=e("./text_highlight_rules").TextHighlightRules,a=(e("./doc_comment_highlight_rules").DocCommentHighlightRules,function(){var e=r.arrayToMap("strict|node|edge|graph|digraph|subgraph".split("|")),t=r.arrayToMap("damping|k|url|area|arrowhead|arrowsize|arrowtail|aspect|bb|bgcolor|center|charset|clusterrank|color|colorscheme|comment|compound|concentrate|constraint|decorate|defaultdist|dim|dimen|dir|diredgeconstraints|distortion|dpi|edgeurl|edgehref|edgetarget|edgetooltip|epsilon|esep|fillcolor|fixedsize|fontcolor|fontname|fontnames|fontpath|fontsize|forcelabels|gradientangle|group|headurl|head_lp|headclip|headhref|headlabel|headport|headtarget|headtooltip|height|href|id|image|imagepath|imagescale|label|labelurl|label_scheme|labelangle|labeldistance|labelfloat|labelfontcolor|labelfontname|labelfontsize|labelhref|labeljust|labelloc|labeltarget|labeltooltip|landscape|layer|layerlistsep|layers|layerselect|layersep|layout|len|levels|levelsgap|lhead|lheight|lp|ltail|lwidth|margin|maxiter|mclimit|mindist|minlen|mode|model|mosek|nodesep|nojustify|normalize|nslimit|nslimit1|ordering|orientation|outputorder|overlap|overlap_scaling|pack|packmode|pad|page|pagedir|pencolor|penwidth|peripheries|pin|pos|quadtree|quantum|rank|rankdir|ranksep|ratio|rects|regular|remincross|repulsiveforce|resolution|root|rotate|rotation|samehead|sametail|samplepoints|scale|searchsize|sep|shape|shapefile|showboxes|sides|size|skew|smoothing|sortv|splines|start|style|stylesheet|tailurl|tail_lp|tailclip|tailhref|taillabel|tailport|tailtarget|tailtooltip|target|tooltip|truecolor|vertices|viewport|voro_margin|weight|width|xlabel|xlp|z".split("|"));this.$rules={start:[{token:"comment",regex:/\/\/.*$/},{token:"comment",regex:/#.*$/},{token:"comment",merge:!0,regex:/\/\*/,next:"comment"},{token:"string",regex:"'(?=.)",next:"qstring"},{token:"string",regex:'"(?=.)',next:"qqstring"},{token:"constant.numeric",regex:/[+\-]?\d+(?:(?:\.\d*)?(?:[eE][+\-]?\d+)?)?\b/},{token:"keyword.operator",regex:/\+|=|\->/},{token:"punctuation.operator",regex:/,|;/},{token:"paren.lparen",regex:/[\[{]/},{token:"paren.rparen",regex:/[\]}]/},{token:"comment",regex:/^#!.*$/},{token:function(n){return e.hasOwnProperty(n.toLowerCase())?"keyword":t.hasOwnProperty(n.toLowerCase())?"variable":"text"},regex:"\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*"}],comment:[{token:"comment",regex:"\\*\\/",next:"start"},{defaultToken:"comment"}],qqstring:[{token:"string",regex:'[^"\\\\]+',merge:!0},{token:"string",regex:"\\\\$",next:"qqstring",merge:!0},{token:"string",regex:'"|$',next:"start",merge:!0}],qstring:[{token:"string",regex:"[^'\\\\]+",merge:!0},{token:"string",regex:"\\\\$",next:"qstring",merge:!0},{token:"string",regex:"'|$",next:"start",merge:!0}]}});o.inherits(a,i),t.DotHighlightRules=a})),ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"],(function(e,t,n){"use strict";var o=e("../../lib/oop"),r=e("../../range").Range,i=e("./fold_mode").FoldMode,a=t.FoldMode=function(e){e&&(this.foldingStartMarker=new RegExp(this.foldingStartMarker.source.replace(/\|[^|]*?$/,"|"+e.start)),this.foldingStopMarker=new RegExp(this.foldingStopMarker.source.replace(/\|[^|]*?$/,"|"+e.end)))};o.inherits(a,i),function(){this.foldingStartMarker=/([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/,this.foldingStopMarker=/^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/,this.singleLineBlockCommentRe=/^\s*(\/\*).*\*\/\s*$/,this.tripleStarBlockCommentRe=/^\s*(\/\*\*\*).*\*\/\s*$/,this.startRegionRe=/^\s*(\/\*|\/\/)#?region\b/,this._getFoldWidgetBase=this.getFoldWidget,this.getFoldWidget=function(e,t,n){var o=e.getLine(n);if(this.singleLineBlockCommentRe.test(o)&&!this.startRegionRe.test(o)&&!this.tripleStarBlockCommentRe.test(o))return"";var r=this._getFoldWidgetBase(e,t,n);return!r&&this.startRegionRe.test(o)?"start":r},this.getFoldWidgetRange=function(e,t,n,o){var r,i=e.getLine(n);if(this.startRegionRe.test(i))return this.getCommentRegionBlock(e,i,n);if(r=i.match(this.foldingStartMarker)){var a=r.index;if(r[1])return this.openingBracketBlock(e,r[1],n,a);var l=e.getCommentFoldRange(n,a+r[0].length,1);return l&&!l.isMultiLine()&&(o?l=this.getSectionRange(e,n):"all"!=t&&(l=null)),l}if("markbegin"!==t&&(r=i.match(this.foldingStopMarker))){a=r.index+r[0].length;return r[1]?this.closingBracketBlock(e,r[1],n,a):e.getCommentFoldRange(n,a,-1)}},this.getSectionRange=function(e,t){for(var n=e.getLine(t),o=n.search(/\S/),i=t,a=n.length,l=t+=1,s=e.getLength();++tg)break;var c=this.getFoldWidgetRange(e,"all",t);if(c){if(c.start.row<=i)break;if(c.isMultiLine())t=c.end.row;else if(o==g)break}l=t}}return new r(i,a,l,e.getLine(l).length)},this.getCommentRegionBlock=function(e,t,n){for(var o=t.search(/\s*$/),i=e.getLength(),a=n,l=/^\s*(?:\/\*|\/\/|--)#?(end)?region\b/,s=1;++na)return new r(a,o,n,t.length)}}.call(a.prototype)})),ace.define("ace/mode/dot",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matching_brace_outdent","ace/mode/dot_highlight_rules","ace/mode/folding/cstyle"],(function(e,t,n){"use strict";var o=e("../lib/oop"),r=e("./text").Mode,i=e("./matching_brace_outdent").MatchingBraceOutdent,a=e("./dot_highlight_rules").DotHighlightRules,l=e("./folding/cstyle").FoldMode,s=function(){this.HighlightRules=a,this.$outdent=new i,this.foldingRules=new l,this.$behaviour=this.$defaultBehaviour};o.inherits(s,r),function(){this.lineCommentStart=["//","#"],this.blockComment={start:"/*",end:"*/"},this.getNextLineIndent=function(e,t,n){var o=this.$getIndent(t),r=this.getTokenizer().getLineTokens(t,e),i=r.tokens;r.state;if(i.length&&"comment"==i[i.length-1].type)return o;"start"==e&&(t.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/)&&(o+=n));return o},this.checkOutdent=function(e,t,n){return this.$outdent.checkOutdent(t,n)},this.autoOutdent=function(e,t,n){this.$outdent.autoOutdent(t,n)},this.$id="ace/mode/dot"}.call(s.prototype),t.Mode=s})),ace.require(["ace/mode/dot"],(function(o){"object"==n(e)&&"object"==n(t)&&e&&(e.exports=o)}))}).call(this,n("YuTi")(e))}},[[14,0]]]); \ No newline at end of file diff --git a/public/js/profile-directory.js b/public/js/profile-directory.js index c4ce28f29..2afbae464 100644 --- a/public/js/profile-directory.js +++ b/public/js/profile-directory.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[16],{19:function(t,e,s){t.exports=s("ETg6")},"7wkd":function(t,e,s){"use strict";s.r(e);var o={data:function(){return{loaded:!1,showLoadMore:!0,profiles:[],page:1}},beforeMount:function(){this.fetchData()},methods:{fetchData:function(){var t=this;axios.get("/api/pixelfed/v2/discover/profiles",{params:{page:this.page}}).then((function(e){if(0==e.data.length)return t.showLoadMore=!1,void(t.loaded=!0);t.profiles=e.data,t.showLoadMore=8==t.profiles.length,t.loaded=!0}))},prettyCount:function(t){return App.util.format.count(t)},loadMore:function(){this.loaded=!1,this.page++,this.fetchData()},thumbUrl:function(t){return t.media_attachments[0].url}}},a=s("KHd+"),n=Object(a.a)(o,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"col-12"},[s("p",{staticClass:"font-weight-bold text-lighter text-uppercase"},[t._v("Profiles Directory")]),t._v(" "),t.loaded?s("div",{},[s("div",{staticClass:"row"},[t._l(t.profiles,(function(e,o){return s("div",{staticClass:"col-12 col-md-6 p-1"},[s("div",{staticClass:"card card-body border shadow-none py-2"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.avatar,alt:"...",width:"40px",height:"40px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mt-0 mb-0 font-weight-bold"},[s("a",{staticClass:"text-dark",attrs:{href:e.url}},[t._v(t._s(e.username))])]),t._v(" "),s("p",{staticClass:"mb-1 small text-lighter d-flex justify-content-between font-weight-bold"},[s("span",[s("span",[t._v(t._s(t.prettyCount(e.statuses_count)))]),t._v(" POSTS\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s("span",[s("span",[t._v(t._s(t.prettyCount(e.followers_count)))]),t._v(" FOLLOWERS\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"mb-1"},t._l(e.posts,(function(e,o){return s("span",{key:"profile_posts_"+o,staticClass:"shadow-sm"},[s("a",{staticClass:"text-decoration-none mr-1",attrs:{href:e.url}},[s("img",{staticClass:"border rounded",attrs:{src:t.thumbUrl(e),width:"62.3px",height:"62.3px"}})])])})),0)])])])])})),t._v(" "),t.showLoadMore?s("div",{staticClass:"col-12"},[s("p",{staticClass:"text-center mb-0 pt-3"},[s("button",{staticClass:"btn btn-outline-secondary btn-sm px-4 py-1 font-weight-bold",on:{click:function(e){return t.loadMore()}}},[t._v("Load More")])])]):t._e()],2)]):s("div",[t._m(0)])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 d-flex justify-content-center align-items-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])])}],!1,null,"7b3eea1c",null);e.default=n.exports},ETg6:function(t,e,s){Vue.component("profile-directory",s("7wkd").default)},"KHd+":function(t,e,s){"use strict";function o(t,e,s,o,a,n,r,i){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=s,d._compiled=!0),o&&(d.functional=!0),n&&(d._scopeId="data-v-"+n),r?(c=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},d._ssrRegister=c):a&&(c=i?function(){a.call(this,this.$root.$options.shadowRoot)}:a),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(t,e){return c.call(e),l(t,e)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:d}}s.d(e,"a",(function(){return o}))}},[[19,0]]]); \ No newline at end of file +(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{19:function(t,e,s){t.exports=s("ETg6")},"7wkd":function(t,e,s){"use strict";s.r(e);var o={data:function(){return{loaded:!1,showLoadMore:!0,profiles:[],page:1}},beforeMount:function(){this.fetchData()},methods:{fetchData:function(){var t=this;axios.get("/api/pixelfed/v2/discover/profiles",{params:{page:this.page}}).then((function(e){if(0==e.data.length)return t.showLoadMore=!1,void(t.loaded=!0);t.profiles=e.data,t.showLoadMore=8==t.profiles.length,t.loaded=!0}))},prettyCount:function(t){return App.util.format.count(t)},loadMore:function(){this.loaded=!1,this.page++,this.fetchData()},thumbUrl:function(t){return t.media_attachments[0].url}}},a=s("KHd+"),n=Object(a.a)(o,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("div",{staticClass:"col-12"},[s("p",{staticClass:"font-weight-bold text-lighter text-uppercase"},[t._v("Profiles Directory")]),t._v(" "),t.loaded?s("div",{},[s("div",{staticClass:"row"},[t._l(t.profiles,(function(e,o){return s("div",{staticClass:"col-12 col-md-6 p-1"},[s("div",{staticClass:"card card-body border shadow-none py-2"},[s("div",{staticClass:"media"},[s("a",{attrs:{href:e.url}},[s("img",{staticClass:"rounded-circle border mr-3",attrs:{src:e.avatar,alt:"...",width:"40px",height:"40px"}})]),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mt-0 mb-0 font-weight-bold"},[s("a",{staticClass:"text-dark",attrs:{href:e.url}},[t._v(t._s(e.username))])]),t._v(" "),s("p",{staticClass:"mb-1 small text-lighter d-flex justify-content-between font-weight-bold"},[s("span",[s("span",[t._v(t._s(t.prettyCount(e.statuses_count)))]),t._v(" POSTS\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),s("span",[s("span",[t._v(t._s(t.prettyCount(e.followers_count)))]),t._v(" FOLLOWERS\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"mb-1"},t._l(e.posts,(function(e,o){return s("span",{key:"profile_posts_"+o,staticClass:"shadow-sm"},[s("a",{staticClass:"text-decoration-none mr-1",attrs:{href:e.url}},[s("img",{staticClass:"border rounded",attrs:{src:t.thumbUrl(e),width:"62.3px",height:"62.3px"}})])])})),0)])])])])})),t._v(" "),t.showLoadMore?s("div",{staticClass:"col-12"},[s("p",{staticClass:"text-center mb-0 pt-3"},[s("button",{staticClass:"btn btn-outline-secondary btn-sm px-4 py-1 font-weight-bold",on:{click:function(e){return t.loadMore()}}},[t._v("Load More")])])]):t._e()],2)]):s("div",[t._m(0)])])])}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12 d-flex justify-content-center align-items-center"},[e("div",{staticClass:"spinner-border",attrs:{role:"status"}},[e("span",{staticClass:"sr-only"},[this._v("Loading...")])])])])}],!1,null,"7b3eea1c",null);e.default=n.exports},ETg6:function(t,e,s){Vue.component("profile-directory",s("7wkd").default)},"KHd+":function(t,e,s){"use strict";function o(t,e,s,o,a,n,r,i){var c,d="function"==typeof t?t.options:t;if(e&&(d.render=e,d.staticRenderFns=s,d._compiled=!0),o&&(d.functional=!0),n&&(d._scopeId="data-v-"+n),r?(c=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__),a&&a.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},d._ssrRegister=c):a&&(c=i?function(){a.call(this,this.$root.$options.shadowRoot)}:a),c)if(d.functional){d._injectStyles=c;var l=d.render;d.render=function(t,e){return c.call(e),l(t,e)}}else{var u=d.beforeCreate;d.beforeCreate=u?[].concat(u,c):[c]}return{exports:t,options:d}}s.d(e,"a",(function(){return o}))}},[[19,0]]]); \ No newline at end of file diff --git a/public/js/profile.js b/public/js/profile.js index cbff7313f..dd544cad5 100644 --- a/public/js/profile.js +++ b/public/js/profile.js @@ -1 +1 @@ -(window.webpackJsonp=window.webpackJsonp||[]).push([[15],{"2Jpm":function(t,e,n){"use strict";n.r(e);var i={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())}}},o=n("KHd+"),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.status.sensitive?n("div",[n("details",{staticClass:"details-animated"},[n("summary",[n("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(" "),n("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),n("div",{staticClass:"embed-responsive embed-responsive-1by1"},[n("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)}}},[n("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])])]):n("div",{staticClass:"embed-responsive embed-responsive-16by9"},[n("video",{staticClass:"video",attrs:{controls:"",preload:"metadata",loop:"",poster:t.status.media_attachments[0].preview_url,"data-id":t.status.id}},[n("source",{attrs:{src:t.status.media_attachments[0].url,type:t.status.media_attachments[0].mime}})])])}),[],!1,null,null,null);e.default=s.exports},"2wtg":function(t,e,n){Vue.component("photo-presenter",n("d+I4").default),Vue.component("video-presenter",n("2Jpm").default),Vue.component("photo-album-presenter",n("Mrqh").default),Vue.component("video-album-presenter",n("9wGH").default),Vue.component("mixed-album-presenter",n("exej").default),Vue.component("post-menu",n("yric").default),Vue.component("story-viewer",n("Zhjo").default),Vue.component("profile",n("EHjT").default)},4:function(t,e,n){t.exports=n("2wtg")},"5ZYQ":function(t,e,n){"use strict";var i=n("kZOS");n.n(i).a},"9S4p":function(t,e,n){"use strict";var i=n("DBJi");n.n(i).a},"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 n=e.protocol+"//"+e.host,i=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,(function(t,e){var o,s=e.trim().replace(/^"(.*)"$/,(function(t,e){return e})).replace(/^'(.*)'$/,(function(t,e){return e}));return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(s)?t:(o=0===s.indexOf("//")?s:0===s.indexOf("/")?n+s:i+s.replace(/^\.\//,""),"url("+JSON.stringify(o)+")")}))}},"9wGH":function(t,e,n){"use strict";n.r(e);var i={props:["status"]},o=n("KHd+"),s=Object(o.a)(i,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return 1==t.status.sensitive?n("div",[n("details",{staticClass:"details-animated"},[n("summary",[n("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(" "),n("p",{staticClass:"font-weight-light"},[t._v("(click to show)")])]),t._v(" "),n("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 n("b-carousel-slide",{key:t.id+"-media"},[n("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"},[n("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)]):n("div",[n("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 n("b-carousel-slide",{key:t.id+"-media"},[n("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"},[n("source",{attrs:{src:t.url,type:t.mime}})])])})),1)],1)}),[],!1,null,null,null);e.default=s.exports},B6o4:function(t,e,n){"use strict";var i=n("CcmX");n.n(i).a},CcmX:function(t,e,n){var i=n("YG3N");"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(i,o);i.locals&&(t.exports=i.locals)},DBJi:function(t,e,n){var i=n("HBKM");"string"==typeof i&&(i=[[t.i,i,""]]);var o={hmr:!0,transform:void 0,insertInto:void 0};n("aET+")(i,o);i.locals&&(t.exports=i.locals)},EHjT:function(t,e,n){"use strict";n.r(e);var i=n("la7V");function o(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0})),i=n.map((function(t){return t.id}));t.ids=i,t.min_id=Math.max.apply(Math,o(i)),t.max_id=Math.min.apply(Math,o(i)),t.modalStatus=_.first(e.data),t.timeline=n,t.ownerCheck(),t.loading=!1})).catch((function(t){swal("Oops, something went wrong","Please release the page.","error")}))},ownerCheck:function(){0!=$("body").hasClass("loggedIn")?this.owner=this.profile.id===this.user.id:this.owner=!1},infiniteTimeline:function(t){var e=this;if(this.loading||this.timeline.length<9)t.complete();else{var n="/api/pixelfed/v1/accounts/"+this.profileId+"/statuses";axios.get(n,{params:{only_media:!0,max_id:this.max_id}}).then((function(n){if(n.data.length&&0==e.loading){var i=n.data,s=e;i.forEach((function(t){-1==s.ids.indexOf(t.id)&&(s.timeline.push(t),s.ids.push(t.id))}));var a=Math.min.apply(Math,o(e.ids));if(a==e.max_id)return void t.complete();e.min_id=Math.max.apply(Math,o(e.ids)),e.max_id=a,t.loaded(),e.loading=!1}else t.complete()}))}},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)+");"},switchMode:function(t){var e=this;this.mode=_.indexOf(this.modes,t)?t:"grid","bookmarks"==this.mode&&0==this.bookmarks.length&&axios.get("/api/local/bookmarks").then((function(t){e.bookmarks=t.data,e.bookmarksLoading=!1})),"collections"==this.mode&&0==this.collections.length&&axios.get("/api/local/profile/collections/"+this.profileId).then((function(t){e.collections=t.data}))},reportProfile:function(){var t=this.profile.id;window.location.href="/i/report?type=user&id="+t},reportUrl:function(t){return"/i/report?type="+(t.in_reply_to?"comment":"post")+"&id="+t.id},commentFocus:function(t,e){var n=event.target.parentElement.parentElement.parentElement,i=n.getElementsByClassName("comments")[0];0==i.children.length&&(i.classList.add("mb-2"),this.fetchStatusComments(t,n));var o=n.querySelectorAll(".card-footer")[0],s=n.querySelectorAll(".status-reply-input")[0];1==o.classList.contains("d-none")?(o.classList.remove("d-none"),s.focus()):(o.classList.add("d-none"),s.blur())},likeStatus:function(t,e){0!=$("body").hasClass("loggedIn")&&axios.post("/i/like",{item:t.id}).then((function(e){t.favourites_count=e.data.count,1==t.favourited?t.favourited=!1:t.favourited=!0})).catch((function(t){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,1==t.reblogged?t.reblogged=!1:t.reblogged=!0})).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()},editUrl:function(t){return t.url+"/edit"},redirect:function(t){window.location.href=t},remoteRedirect:function(t){window.location.href=window.App.config.site.url+"/i/redirect?url="+encodeURIComponent(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 t.account.id==this.profile.id},fetchRelationships:function(){var t=this;0!=document.querySelectorAll("body")[0].classList.contains("loggedIn")&&axios.get("/api/pixelfed/v1/accounts/relationships",{params:{"id[]":this.profileId}}).then((function(e){e.data.length&&(t.relationship=e.data[0],1==e.data[0].blocking&&(t.warning=!0))}))},muteProfile:function(){var t=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/mute",{type:"user",item:e}).then((function(e){t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully muted "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},unmuteProfile:function(){var t=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/unmute",{type:"user",item:e}).then((function(e){t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully unmuted "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},blockProfile:function(){var t=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/block",{type:"user",item:e}).then((function(e){t.warning=!0,t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully blocked "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},unblockProfile:function(){var t=this;arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(0!=$("body").hasClass("loggedIn")){var e=this.profileId;axios.post("/i/unblock",{type:"user",item:e}).then((function(e){t.fetchRelationships(),t.$refs.visitorContextMenu.hide(),swal("Success","You have successfully unblocked "+t.profile.acct,"success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))}},deletePost:function(t,e){var n=this;0!=$("body").hasClass("loggedIn")&&t.account.id===this.profile.id&&axios.post("/i/delete",{type:"status",item:t.id}).then((function(t){n.timeline.splice(e,1),swal("Success","You have successfully deleted this post","success")})).catch((function(t){swal("Error","Something went wrong. Please try again later.","error")}))},followProfile:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.post("/i/follow",{item:this.profileId}).then((function(e){t.$refs.visitorContextMenu.hide(),t.relationship.following?(t.profile.followers_count--,1==t.profile.locked&&(window.location.href="/")):t.profile.followers_count++,t.relationship.following=!t.relationship.following})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},followingModal:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){if(0!=this.profileSettings.following.list)return this.followingCursor>1||axios.get("/api/pixelfed/v1/accounts/"+this.profileId+"/following",{params:{page:this.followingCursor}}).then((function(e){t.following=e.data,t.followingModalSearchCache=e.data,t.followingCursor++,e.data.length<10&&(t.followingMore=!1)})),void this.$refs.followingModal.show()}else window.location.href=encodeURI("/login?next=/"+this.profileUsername+"/")},followersModal:function(){var t=this;if(0!=$("body").hasClass("loggedIn")){if(0!=this.profileSettings.followers.list)return this.followerCursor>1||axios.get("/api/pixelfed/v1/accounts/"+this.profileId+"/followers",{params:{page:this.followerCursor}}).then((function(e){var n;(n=t.followers).push.apply(n,o(e.data)),t.followerCursor++,e.data.length<10&&(t.followerMore=!1)})),void this.$refs.followerModal.show()}else window.location.href=encodeURI("/login?next=/"+this.profileUsername+"/")},followingLoadMore:function(){var t=this;0!=$("body").hasClass("loggedIn")?axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/following",{params:{page:this.followingCursor,fbu:this.followingModalSearch}}).then((function(e){var n;e.data.length>0&&((n=t.following).push.apply(n,o(e.data)),t.followingCursor++,t.followingModalSearchCache=t.following);e.data.length<10&&(t.followingModalSearchCache=t.following,t.followingMore=!1)})):window.location.href=encodeURI("/login?next=/"+this.profile.username+"/")},followersLoadMore:function(){var t=this;0!=$("body").hasClass("loggedIn")&&axios.get("/api/pixelfed/v1/accounts/"+this.profile.id+"/followers",{params:{page:this.followerCursor}}).then((function(e){var n;e.data.length>0&&((n=t.followers).push.apply(n,o(e.data)),t.followerCursor++);e.data.length<10&&(t.followerMore=!1)}))},visitorMenu:function(){this.$refs.visitorContextMenu.show()},followModalAction:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"following";axios.post("/i/follow",{item:t}).then((function(t){"following"==i&&(n.following.splice(e,1),n.profile.following_count--)})).catch((function(t){t.response.data.message&&swal("Error",t.response.data.message,"error")}))},momentBackground:function(){var t="w-100 h-100 mt-n3 ";return this.profile.header_bg?t+="default"==this.profile.header_bg?"bg-pixelfed":"bg-moment-"+this.profile.header_bg:t+="bg-pixelfed",t},loadSponsor:function(){var t=this;axios.get("/api/local/profile/sponsor/"+this.profileId).then((function(e){t.sponsorList=e.data}))},showSponsorModal:function(){this.$refs.sponsorModal.show()},goBack:function(){return window.history.length>2?void window.history.back():void(window.location.href="/")},copyProfileLink:function(){navigator.clipboard.writeText(window.location.href),this.$refs.visitorContextMenu.hide()},formatCount:function(t){return App.util.format.count(t)},statusUrl:function(t){return t.url},profileUrl:function(t){return t.url},showEmbedProfileModal:function(){this.ctxEmbedPayload=window.App.util.embed.profile(this.profile.url),this.$refs.visitorContextMenu.hide(),this.$refs.embedModal.show()},ctxCopyEmbed:function(){navigator.clipboard.writeText(this.ctxEmbedPayload),this.$refs.embedModal.hide(),this.$refs.visitorContextMenu.hide()},storyRedirect:function(){window.location.href="/stories/"+this.profileUsername},followingModalSearchHandler:function(){var t=this,e=this,n=this.followingModalSearch;if(0==n.length&&(this.following=this.followingModalSearchCache,this.followingModalSearch=null),n.length>0){var i="/api/pixelfed/v1/accounts/"+e.profileId+"/following?page=1&fbu="+n;axios.get(i).then((function(e){t.following=e.data})).catch((function(t){e.following=e.followingModalSearchCache,e.followingModalSearch=null}))}},truncate:function(t,e){return _.truncate(t,{length:e})}}},a=(n("5ZYQ"),n("KHd+")),r=Object(a.a)(s,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"w-100 h-100"},[t.isMobile?n("div",{staticClass:"bg-white p-3 border-bottom"},[n("div",{staticClass:"d-flex justify-content-between align-items-center"},[n("div",{staticClass:"cursor-pointer",on:{click:t.goBack}},[n("i",{staticClass:"fas fa-chevron-left fa-lg"})]),t._v(" "),n("div",{staticClass:"font-weight-bold"},[t._v("\n\t\t\t\t"+t._s(this.profileUsername)+"\t\t\t\t\t\t\t\t\n\n\t\t\t")]),t._v(" "),n("div",[n("a",{staticClass:"fas fa-ellipsis-v fa-lg text-muted text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})])])]):t._e(),t._v(" "),t.relationship&&t.relationship.blocking&&t.warning?n("div",{staticClass:"bg-white pt-3 border-bottom"},[n("div",{staticClass:"container"},[n("p",{staticClass:"text-center font-weight-bold"},[t._v("You are blocking this account")]),t._v(" "),n("p",{staticClass:"text-center font-weight-bold"},[t._v("Click "),n("a",{staticClass:"cursor-pointer",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.warning=!1}}},[t._v("here")]),t._v(" to view profile")])])]):t._e(),t._v(" "),t.loading?n("div",{staticClass:"d-flex justify-content-center align-items-center",staticStyle:{height:"80vh"}},[n("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})]):t._e(),t._v(" "),t.loading||t.warning?t._e():n("div",["metro"==t.layout?n("div",{staticClass:"container"},[n("div",{class:t.isMobile?"pt-5":"pt-5 border-bottom"},[n("div",{staticClass:"container px-0"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 col-md-4 d-md-flex"},[n("div",{staticClass:"profile-avatar mx-md-auto"},[n("div",{staticClass:"d-block d-md-none mt-n3 mb-3"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-4"},[t.hasStory?n("div",{staticClass:"has-story cursor-pointer shadow-sm",on:{click:function(e){return t.storyRedirect()}}},[n("img",{staticClass:"rounded-circle",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"77px",height:"77px"}})]):n("div",[n("img",{staticClass:"rounded-circle border",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"77px",height:"77px"}})])]),t._v(" "),n("div",{staticClass:"col-8"},[n("div",{staticClass:"d-block d-md-none mt-3 py-2"},[n("ul",{staticClass:"nav d-flex justify-content-between"},[n("li",{staticClass:"nav-item"},[n("div",{staticClass:"font-weight-light"},[n("span",{staticClass:"text-dark text-center"},[n("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v(" "),n("p",{staticClass:"text-muted mb-0 small"},[t._v("Posts")])])])]),t._v(" "),n("li",{staticClass:"nav-item"},[t.profileSettings.followers.count?n("div",{staticClass:"font-weight-light"},[n("a",{staticClass:"text-dark cursor-pointer text-center",on:{click:function(e){return t.followersModal()}}},[n("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v(" "),n("p",{staticClass:"text-muted mb-0 small"},[t._v("Followers")])])]):t._e()]),t._v(" "),n("li",{staticClass:"nav-item"},[t.profileSettings.following.count?n("div",{staticClass:"font-weight-light"},[n("a",{staticClass:"text-dark cursor-pointer text-center",on:{click:function(e){return t.followingModal()}}},[n("p",{staticClass:"font-weight-bold mb-0"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v(" "),n("p",{staticClass:"text-muted mb-0 small"},[t._v("Following")])])]):t._e()])])])])])]),t._v(" "),n("div",{staticClass:"d-none d-md-block pb-3"},[t.hasStory?n("div",{staticClass:"has-story-lg cursor-pointer shadow-sm",on:{click:function(e){return t.storyRedirect()}}},[n("img",{staticClass:"rounded-circle box-shadow cursor-pointer",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"150px",height:"150px"}})]):n("div",[n("img",{staticClass:"rounded-circle box-shadow",attrs:{alt:t.profileUsername+"'s profile picture",src:t.profile.avatar,width:"150px",height:"150px"}})]),t._v(" "),t.sponsorList.patreon||t.sponsorList.liberapay||t.sponsorList.opencollective?n("p",{staticClass:"text-center mt-3"},[n("button",{staticClass:"btn btn-outline-secondary font-weight-bold py-0",attrs:{type:"button"},on:{click:t.showSponsorModal}},[n("i",{staticClass:"fas fa-heart text-danger"}),t._v("\n\t\t\t\t\t\t\t\t\t\t\tDonate\n\t\t\t\t\t\t\t\t\t\t")])]):t._e()])])]),t._v(" "),n("div",{staticClass:"col-12 col-md-8 d-flex align-items-center"},[n("div",{staticClass:"profile-details"},[n("div",{staticClass:"d-none d-md-flex username-bar pb-3 align-items-center"},[n("span",{staticClass:"font-weight-ultralight h3 mb-0"},[t._v(t._s(t.profile.username))]),t._v(" "),t.profile.is_admin?n("span",{staticClass:"pl-1 pb-2 fa-stack",attrs:{title:"Admin Account","data-toggle":"tooltip"}},[n("i",{staticClass:"fas fa-certificate fa-lg text-danger fa-stack-1x"}),t._v(" "),n("i",{staticClass:"fas fa-crown text-white fa-sm fa-stack-1x",staticStyle:{"font-size":"9px"}})]):t._e(),t._v(" "),t.profile.id!=t.user.id&&t.user.hasOwnProperty("id")?n("span",[1==t.relationship.following?n("span",{staticClass:"pl-4"},[n("button",{staticClass:"btn btn-outline-secondary font-weight-bold btn-sm py-1",attrs:{type:"button","data-toggle":"tooltip",title:"Unfollow"},on:{click:t.followProfile}},[t._v("FOLLOWING")])]):t._e(),t._v(" "),t.relationship.following?t._e():n("span",{staticClass:"pl-4"},[n("button",{staticClass:"btn btn-primary font-weight-bold btn-sm py-1",attrs:{type:"button","data-toggle":"tooltip",title:"Follow"},on:{click:t.followProfile}},[t._v("FOLLOW")])])]):t._e(),t._v(" "),t.owner&&t.user.hasOwnProperty("id")?n("span",{staticClass:"pl-4"},[n("a",{staticClass:"btn btn-outline-secondary btn-sm",staticStyle:{"font-weight":"600"},attrs:{href:"/settings/home"}},[t._v("Edit Profile")])]):t._e(),t._v(" "),n("span",{staticClass:"pl-4"},[n("a",{staticClass:"fas fa-ellipsis-h fa-lg text-muted text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})])]),t._v(" "),n("div",{staticClass:"font-size-16px"},[n("div",{staticClass:"d-none d-md-inline-flex profile-stats pb-3"},[n("div",{staticClass:"font-weight-light pr-5"},[n("span",{staticClass:"text-dark"},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\t\t\tPosts\n\t\t\t\t\t\t\t\t\t\t\t")])]),t._v(" "),t.profileSettings.followers.count?n("div",{staticClass:"font-weight-light pr-5"},[n("a",{staticClass:"text-dark cursor-pointer",on:{click:function(e){return t.followersModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\t\t\tFollowers\n\t\t\t\t\t\t\t\t\t\t\t")])]):t._e(),t._v(" "),t.profileSettings.following.count?n("div",{staticClass:"font-weight-light"},[n("a",{staticClass:"text-dark cursor-pointer",on:{click:function(e){return t.followingModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\t\t\tFollowing\n\t\t\t\t\t\t\t\t\t\t\t")])]):t._e()]),t._v(" "),n("p",{staticClass:"mb-0 d-flex align-items-center"},[n("span",{staticClass:"font-weight-bold pr-3"},[t._v(t._s(t.profile.display_name))])]),t._v(" "),t.profile.note?n("div",{staticClass:"mb-0",domProps:{innerHTML:t._s(t.profile.note)}}):t._e(),t._v(" "),t.profile.website?n("p",{},[n("a",{staticClass:"profile-website",attrs:{href:t.profile.website,rel:"me external nofollow noopener",target:"_blank"},on:{click:function(e){return e.preventDefault(),t.remoteRedirect(t.profile.website)}}},[t._v(t._s(t.truncate(t.profile.website,24)))])]):t._e()])])])])])]),t._v(" "),n("div",{staticClass:"d-block d-md-none my-0 pt-3 border-bottom"},[t.user&&t.user.hasOwnProperty("id")?n("p",{staticClass:"pt-3"},[t.owner?n("button",{staticClass:"btn btn-outline-secondary bg-white btn-sm py-1 btn-block text-center font-weight-bold text-dark border border-lighter",on:{click:function(e){return e.preventDefault(),t.redirect("/settings/home")}}},[t._v("Edit Profile")]):t._e(),t._v(" "),!t.owner&&t.relationship.following?n("button",{staticClass:"btn btn-outline-secondary bg-white btn-sm py-1 px-5 font-weight-bold text-dark border border-lighter",on:{click:t.followProfile}},[t._v("   Unfollow   ")]):t._e(),t._v(" "),t.owner||t.relationship.following?t._e():n("button",{staticClass:"btn btn-primary btn-sm py-1 px-5 font-weight-bold",on:{click:t.followProfile}},[t._v(t._s(t.relationship.followed_by?"Follow Back":"     Follow     "))])]):t._e()]),t._v(" "),n("div",{},[n("ul",{staticClass:"nav nav-topbar d-flex justify-content-center border-0"},[n("li",{staticClass:"nav-item border-top"},[n("a",{class:"grid"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("grid")}}},[n("i",{staticClass:"fas fa-th"}),t._v(" "),n("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("POSTS")])])]),t._v(" "),n("li",{staticClass:"nav-item px-0 border-top"},[n("a",{class:"collections"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("collections")}}},[n("i",{staticClass:"fas fa-images"}),t._v(" "),n("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("COLLECTIONS")])])]),t._v(" "),t.owner?n("li",{staticClass:"nav-item border-top"},[n("a",{class:"bookmarks"==this.mode?"nav-link text-dark":"nav-link",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.switchMode("bookmarks")}}},[n("i",{staticClass:"fas fa-bookmark"}),t._v(" "),n("span",{staticClass:"d-none d-md-inline-block small pl-1"},[t._v("SAVED")])])]):t._e()])]),t._v(" "),n("div",{staticClass:"container px-0"},[n("div",{staticClass:"profile-timeline mt-md-4"},["grid"==t.mode?n("div",{staticClass:"row"},[t._l(t.timeline,(function(e,i){return n("div",{key:"tlob:"+i,staticClass:"col-4 p-1 p-md-3"},[t._o(n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.statusUrl(e)}},[n("div",{class:[e.sensitive?"square":"square "+e.media_attachments[0].filter_class]},["photo:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",[n("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),n("span",[n("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])]),0,"tlob:"+i)])})),t._v(" "),0==t.timeline.length?n("div",{staticClass:"col-12"},[t._m(0)]):t._e()],2):t._e(),t._v(" "),t.timeline.length&&"grid"==t.mode?n("div",[n("infinite-loading",{on:{infinite:t.infiniteTimeline}},[n("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),n("div",{attrs:{slot:"no-results"},slot:"no-results"})])],1):t._e(),t._v(" "),"bookmarks"==t.mode?n("div",[t.bookmarksLoading?n("div",[t._m(1)]):n("div",[t.bookmarks.length?n("div",{staticClass:"row"},t._l(t.bookmarks,(function(e,i){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:e.url}},[n("div",{staticClass:"square"},["photo:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-images fa-2x"})]):t._e(),t._v(" "),"video"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-video fa-2x"})]):t._e(),t._v(" "),"video:album"==e.pf_type?n("span",{staticClass:"float-right mr-3 post-icon"},[n("i",{staticClass:"fas fa-film fa-2x"})]):t._e(),t._v(" "),n("div",{staticClass:"square-content",style:t.previewBackground(e)}),t._v(" "),n("div",{staticClass:"info-overlay-text"},[n("h5",{staticClass:"text-white m-auto font-weight-bold"},[n("span",[n("span",{staticClass:"far fa-heart fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.favourites_count))])]),t._v(" "),n("span",[n("span",{staticClass:"fas fa-retweet fa-lg p-2 d-flex-inline"}),t._v(" "),n("span",{staticClass:"d-flex-inline"},[t._v(t._s(e.reblogs_count))])])])])])])])})),0):n("div",{staticClass:"col-12"},[t._m(2)])])]):t._e(),t._v(" "),"collections"==t.mode?n("div",[t.collections.length?n("div",{staticClass:"row"},t._l(t.collections,(function(t,e){return n("div",{staticClass:"col-4 p-1 p-sm-2 p-md-3"},[n("a",{staticClass:"card info-overlay card-md-border-0",attrs:{href:t.url}},[n("div",{staticClass:"square"},[n("div",{staticClass:"square-content",style:"background-image: url("+t.thumb+");"})])])])})),0):n("div",[t._m(3)])]):t._e()])])]):t._e(),t._v(" "),"moment"==t.layout?n("div",{staticClass:"mt-3"},[n("div",{class:t.momentBackground(),staticStyle:{width:"100%","min-height":"274px"}}),t._v(" "),n("div",{staticClass:"bg-white border-bottom"},[n("div",{staticClass:"container"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-12 row mx-0"},[n("div",{staticClass:"col-4 text-left mt-2"},[t.relationship&&t.relationship.followed_by?n("span",[n("span",{staticClass:"bg-light border border-secondary font-weight-bold small py-1 px-2 text-muted rounded"},[t._v("FOLLOWS YOU")])]):t._e(),t._v(" "),t.profile.is_admin?n("span",[n("span",{staticClass:"bg-light border border-danger font-weight-bold small py-1 px-2 text-danger rounded"},[t._v("ADMIN")])]):t._e()]),t._v(" "),n("div",{staticClass:"col-4 text-center"},[n("div",{staticClass:"d-block d-md-none"},[n("img",{staticClass:"rounded-circle box-shadow",staticStyle:{"margin-top":"-60px",border:"5px solid #fff"},attrs:{src:t.profile.avatar,width:"110px",height:"110px"}})]),t._v(" "),n("div",{staticClass:"d-none d-md-block"},[n("img",{staticClass:"rounded-circle box-shadow",staticStyle:{"margin-top":"-90px",border:"5px solid #fff"},attrs:{src:t.profile.avatar,width:"172px",height:"172px"}})])]),t._v(" "),n("div",{staticClass:"col-4 text-right mt-2"},[n("span",{staticClass:"d-none d-md-inline-block pl-4"},[n("a",{staticClass:"fas fa-rss fa-lg text-muted text-decoration-none",attrs:{href:"/users/"+t.profile.username+".atom"}})]),t._v(" "),t.owner?n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("a",{staticClass:"fas fa-cog fa-lg text-muted text-decoration-none",attrs:{href:"/settings/home"}})]):t._e(),t._v(" "),t.profile.id!=t.user.id&&t.user.hasOwnProperty("id")?n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("a",{staticClass:"fas fa-cog fa-lg text-muted text-decoration-none",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.visitorMenu(e)}}})]):t._e(),t._v(" "),t.profile.id!=t.user.id&&t.user.hasOwnProperty("id")?n("span",[1==t.relationship.following?n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("button",{staticClass:"btn btn-outline-secondary font-weight-bold btn-sm",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.followProfile()}}},[t._v("Unfollow")])]):n("span",{staticClass:"pl-md-4 pl-sm-2"},[n("button",{staticClass:"btn btn-primary font-weight-bold btn-sm",attrs:{type:"button"},on:{click:function(e){return e.preventDefault(),t.followProfile()}}},[t._v("Follow")])])]):t._e()])]),t._v(" "),n("div",{staticClass:"col-12 text-center"},[n("div",{staticClass:"profile-details my-3"},[n("p",{staticClass:"font-weight-ultralight h2 text-center"},[t._v(t._s(t.profile.username))]),t._v(" "),t.profile.note?n("div",{staticClass:"text-center text-muted p-3",domProps:{innerHTML:t._s(t.profile.note)}}):t._e(),t._v(" "),n("div",{staticClass:"pb-3 text-muted text-center"},[n("a",{staticClass:"text-lighter",attrs:{href:t.profile.url}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.statuses_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\tPosts\n\t\t\t\t\t\t\t\t\t")]),t._v(" "),t.profileSettings.followers.count?n("a",{staticClass:"text-lighter cursor-pointer px-3",on:{click:function(e){return t.followersModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.followers_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\tFollowers\n\t\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t.profileSettings.following.count?n("a",{staticClass:"text-lighter cursor-pointer",on:{click:function(e){return t.followingModal()}}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.formatCount(t.profile.following_count)))]),t._v("\n\t\t\t\t\t\t\t\t\t\tFollowing\n\t\t\t\t\t\t\t\t\t")]):t._e()])])])])])]),t._v(" "),n("div",{staticClass:"container-fluid"},[n("div",{staticClass:"profile-timeline mt-md-4"},["grid"==t.mode?n("div",{},[n("masonry",{attrs:{cols:{default:3,700:2,400:1},gutter:{default:"5px"}}},t._l(t.timeline,(function(e,i){return n("div",{staticClass:"p-1"},[n("a",{class:[e.sensitive?"card info-overlay card-md-border-0":e.media_attachments[0].filter_class+" card info-overlay card-md-border-0"],attrs:{href:t.statusUrl(e)}},[n("img",{staticClass:"img-fluid w-100",attrs:{src:t.previewUrl(e)}})])])})),0)],1):t._e(),t._v(" "),t.timeline.length?n("div",[n("infinite-loading",{on:{infinite:t.infiniteTimeline}},[n("div",{attrs:{slot:"no-more"},slot:"no-more"}),t._v(" "),n("div",{attrs:{slot:"no-results"},slot:"no-results"})])],1):t._e()])])]):t._e()]),t._v(" "),t.profile&&t.following?n("b-modal",{ref:"followingModal",attrs:{id:"following-modal","hide-footer":"",centered:"",scrollable:"",title:"Following","body-class":"list-group-flush py-3 px-0","dialog-class":"follow-modal"}},[t.loading?t._e():n("div",{staticClass:"list-group",staticStyle:{"min-height":"60vh"}},[1==t.owner?n("div",{staticClass:"list-group-item border-0 pt-0 px-0 mt-n2 mb-3"},[n("span",{staticClass:"d-flex px-4 pb-0 align-items-center"},[n("i",{staticClass:"fas fa-search text-lighter"}),t._v(" "),n("input",{directives:[{name:"model",rawName:"v-model",value:t.followingModalSearch,expression:"followingModalSearch"}],staticClass:"form-control border-0 shadow-0 no-focus",attrs:{type:"text",placeholder:"Search Following..."},domProps:{value:t.followingModalSearch},on:{keyup:t.followingModalSearchHandler,input:function(e){e.target.composing||(t.followingModalSearch=e.target.value)}}})])]):t._e(),t._v(" "),1==t.owner?n("div",{staticClass:"btn-group rounded-0 mt-n3 mb-3 border-top",attrs:{role:"group","aria-label":"Following"}}):n("div",{staticClass:"btn-group rounded-0 mt-n3 mb-3",attrs:{role:"group","aria-label":"Following"}}),t._v(" "),t._l(t.following,(function(e,i){return n("div",{key:"following_"+i,staticClass:"list-group-item border-0 py-1"},[n("div",{staticClass:"media"},[n("a",{attrs:{href:e.url}},[n("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px",loading:"lazy"}})]),t._v(" "),n("div",{staticClass:"media-body text-truncate"},[n("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[n("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t")])]),t._v(" "),e.local?n("p",{staticClass:"text-muted mb-0 text-truncate",staticStyle:{"font-size":"14px"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t")]):n("p",{staticClass:"text-muted mb-0 text-truncate mr-3",staticStyle:{"font-size":"14px"},attrs:{title:e.acct,"data-toggle":"dropdown","data-placement":"bottom"}},[n("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.acct.split("@")[0]))]),n("span",{staticClass:"text-lighter"},[t._v("@"+t._s(e.acct.split("@")[1]))])])]),t._v(" "),t.owner?n("div",[n("a",{staticClass:"btn btn-outline-dark btn-sm font-weight-bold",attrs:{href:"#"},on:{click:function(n){return n.preventDefault(),t.followModalAction(e.id,i,"following")}}},[t._v("Following")])]):t._e()])])})),t._v(" "),t.followingModalSearch&&0==t.following.length?n("div",{staticClass:"list-group-item border-0"},[n("div",{staticClass:"list-group-item border-0 pt-5"},[n("p",{staticClass:"p-3 text-center mb-0 lead"},[t._v("No Results Found")])])]):t._e(),t._v(" "),t.following.length>0&&t.followingMore?n("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followingLoadMore()}}},[n("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]):t._e(),t._v(" "),n("b-modal",{ref:"followerModal",attrs:{id:"follower-modal","hide-footer":"",centered:"",scrollable:"",title:"Followers","body-class":"list-group-flush py-3 px-0","dialog-class":"follow-modal"}},[n("div",{staticClass:"list-group"},[0==t.followers.length?n("div",{staticClass:"list-group-item border-0"},[n("p",{staticClass:"text-center mb-0 font-weight-bold text-muted py-5"},[n("span",{staticClass:"text-dark"},[t._v(t._s(t.profileUsername))]),t._v(" has no followers yet")])]):t._e(),t._v(" "),t._l(t.followers,(function(e,i){return n("div",{key:"follower_"+i,staticClass:"list-group-item border-0 py-1"},[n("div",{staticClass:"media mb-0"},[n("a",{attrs:{href:e.url}},[n("img",{staticClass:"mr-3 rounded-circle box-shadow",attrs:{src:e.avatar,alt:e.username+"’s avatar",width:"30px",height:"30px",loading:"lazy"}})]),t._v(" "),n("div",{staticClass:"media-body mb-0"},[n("p",{staticClass:"mb-0",staticStyle:{"font-size":"14px"}},[n("a",{staticClass:"font-weight-bold text-dark",attrs:{href:e.url}},[t._v("\n\t\t\t\t\t\t\t\t"+t._s(e.username)+"\n\t\t\t\t\t\t\t")])]),t._v(" "),n("p",{staticClass:"text-secondary mb-0",staticStyle:{"font-size":"13px"}},[t._v("\n\t\t\t\t\t\t\t"+t._s(e.display_name)+"\n\t\t\t\t\t\t")])])])])})),t._v(" "),t.followers.length&&t.followerMore?n("div",{staticClass:"list-group-item text-center",on:{click:function(e){return t.followersLoadMore()}}},[n("p",{staticClass:"mb-0 small text-muted font-weight-light cursor-pointer"},[t._v("Load more")])]):t._e()],2)]),t._v(" "),n("b-modal",{ref:"visitorContextMenu",attrs:{id:"visitor-context-menu","hide-footer":"","hide-header":"",centered:"",size:"sm","body-class":"list-group-flush p-0"}},[t.relationship?n("div",{staticClass:"list-group"},[n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.copyProfileLink}},[t._v("\n\t\t\t\tCopy Link\n\t\t\t")]),t._v(" "),0==t.profile.locked?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.showEmbedProfileModal}},[t._v("\n\t\t\t\tEmbed\n\t\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.following?t._e():n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.followProfile}},[t._v("\n\t\t\t\tFollow\n\t\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.following?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.followProfile}},[t._v("\n\t\t\t\tUnfollow\n\t\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.muting?t._e():n("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.muteProfile}},[t._v("\n\t\t\t\tMute\n\t\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.muting?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded",on:{click:t.unmuteProfile}},[t._v("\n\t\t\t\tUnmute\n\t\t\t")]):t._e(),t._v(" "),t.user&&!t.owner?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.reportProfile}},[t._v("\n\t\t\t\tReport User\n\t\t\t")]):t._e(),t._v(" "),!t.user||t.owner||t.relationship.blocking?t._e():n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.blockProfile}},[t._v("\n\t\t\t\tBlock\n\t\t\t")]),t._v(" "),t.user&&!t.owner&&t.relationship.blocking?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:t.unblockProfile}},[t._v("\n\t\t\t\tUnblock\n\t\t\t")]):t._e(),t._v(" "),t.user&&t.owner?n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:function(e){return t.redirect("/settings/home")}}},[t._v("\n\t\t\t\tSettings\n\t\t\t")]):t._e(),t._v(" "),n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-dark",on:{click:function(e){return t.redirect("/users/"+t.profileUsername+".atom")}}},[t._v("\n\t\t\t\tAtom Feed\n\t\t\t")]),t._v(" "),n("div",{staticClass:"list-group-item cursor-pointer text-center rounded text-muted font-weight-bold",on:{click:function(e){return t.$refs.visitorContextMenu.hide()}}},[t._v("\n\t\t\t\tClose\n\t\t\t")])]):t._e()]),t._v(" "),n("b-modal",{ref:"sponsorModal",attrs:{id:"sponsor-modal","hide-footer":"",title:"Sponsor "+t.profileUsername,centered:"",size:"md","body-class":"px-5"}},[n("div",[n("p",{staticClass:"font-weight-bold"},[t._v("External Links")]),t._v(" "),t.sponsorList.patreon?n("p",{staticClass:"pt-2"},[n("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.patreon,rel:"nofollow"}},[t._v(t._s(t.sponsorList.patreon))])]):t._e(),t._v(" "),t.sponsorList.liberapay?n("p",{staticClass:"pt-2"},[n("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.liberapay,rel:"nofollow"}},[t._v(t._s(t.sponsorList.liberapay))])]):t._e(),t._v(" "),t.sponsorList.opencollective?n("p",{staticClass:"pt-2"},[n("a",{staticClass:"font-weight-bold",attrs:{href:"https://"+t.sponsorList.opencollective,rel:"nofollow"}},[t._v(t._s(t.sponsorList.opencollective))])]):t._e()])]),t._v(" "),n("b-modal",{ref:"embedModal",attrs:{id:"ctx-embed-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"md","body-class":"p-2 rounded"}},[n("div",[n("textarea",{directives:[{name:"model",rawName:"v-model",value:t.ctxEmbedPayload,expression:"ctxEmbedPayload"}],staticClass:"form-control disabled text-monospace",staticStyle:{"overflow-y":"hidden",border:"1px solid #efefef","font-size":"12px","line-height":"18px",margin:"0 0 7px",resize:"none"},attrs:{rows:"6",disabled:""},domProps:{value:t.ctxEmbedPayload},on:{input:function(e){e.target.composing||(t.ctxEmbedPayload=e.target.value)}}}),t._v(" "),n("hr"),t._v(" "),n("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(" "),n("p",{staticClass:"mb-0 px-2 small text-muted"},[t._v("By using this embed, you agree to our "),n("a",{attrs:{href:"/site/terms"}},[t._v("Terms of Use")])])])])],1)}),[function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"py-5 text-center text-muted"},[e("p",[e("i",{staticClass:"fas fa-camera-retro fa-2x"})]),this._v(" "),e("p",{staticClass:"h2 font-weight-light pt-3"},[this._v("No posts yet")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"row"},[e("div",{staticClass:"col-12"},[e("div",{staticClass:"p-1 p-sm-2 p-md-3 d-flex justify-content-center align-items-center",staticStyle:{height:"30vh"}},[e("img",{attrs:{src:"/img/pixelfed-icon-grey.svg"}})])])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"py-5 text-center text-muted"},[e("p",[e("i",{staticClass:"fas fa-bookmark fa-2x"})]),this._v(" "),e("p",{staticClass:"h2 font-weight-light pt-3"},[this._v("No saved bookmarks")])])},function(){var t=this.$createElement,e=this._self._c||t;return e("div",{staticClass:"py-5 text-center text-muted"},[e("p",[e("i",{staticClass:"fas fa-images fa-2x"})]),this._v(" "),e("p",{staticClass:"h2 font-weight-light pt-3"},[this._v("No collections yet")])])}],!1,null,"2749d1ec",null);e.default=r.exports},HBKM:function(t,e,n){(t.exports=n("I1BE")(!1)).push([t.i,"\n.card-img-top[data-v-45b83517] {\n border-top-left-radius: 0 !important;\n border-top-right-radius: 0 !important;\n}\n",""])},I1BE:function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n=t[1]||"",i=t[3];if(!i)return n;if(e&&"function"==typeof btoa){var o=(a=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),s=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[n].concat(s).concat([o]).join("\n")}var a;return[n].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var i={},o=0;o