mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-23 23:11:27 +00:00
1 line
No EOL
58 KiB
JavaScript
Vendored
1 line
No EOL
58 KiB
JavaScript
Vendored
(window.webpackJsonp=window.webpackJsonp||[]).push([[11],{"0ox+":function(t,e,s){(t.exports=s("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;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%;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%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}@keyframes rotate{0%{transform:translateY(-50%) rotate(0deg)}to{transform:translateY(-50%) rotate(359deg)}}',""])},17:function(t,e,s){t.exports=s("7D/a")},"2jBX":function(t,e,s){var a=s("8oKe");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},"7D/a":function(t,e,s){Vue.component("direct-component",s("VGw1").default),Vue.component("direct-message",s("9oR/").default)},"8oKe":function(t,e,s){(t.exports=s("I1BE")(!1)).push([t.i,"\n.reply-btn[data-v-8f1cc6ce] {\n\tposition: absolute;\n\tbottom: 54px;\n\tright: 20px;\n\twidth: 90px;\n\ttext-align: center;\n\tborder-radius: 0 3px 3px 0;\n}\n.media-body .bg-primary[data-v-8f1cc6ce] {\n\tbackground: linear-gradient(135deg, #2EA2F4 0%, #0B93F6 100%) !important;\n}\n.pill-to[data-v-8f1cc6ce] {\n\tbackground:#EDF2F7;\n\tfont-weight: 500;\n\tborder-radius: 20px !important;\n\tpadding-left: 1rem;\n\tpadding-right: 1rem;\n\tpadding-top: 0.5rem;\n\tpadding-bottom: 0.5rem;\n\tmargin-right: 3rem;\n\tmargin-bottom: 0.25rem;\n}\n.pill-from[data-v-8f1cc6ce] {\n\tcolor: white !important;\n\ttext-align: right !important;\n\t/*background: #53d769;*/\n\tbackground: linear-gradient(135deg, #2EA2F4 0%, #0B93F6 100%) !important;\n\tfont-weight: 500;\n\tborder-radius: 20px !important;\n\tpadding-left: 1rem;\n\tpadding-right: 1rem;\n\tpadding-top: 0.5rem;\n\tpadding-bottom: 0.5rem;\n\tmargin-left: 3rem;\n\tmargin-bottom: 0.25rem;\n}\n.chat-msg[data-v-8f1cc6ce]:hover {\n\tbackground: #f7fbfd;\n}\n.no-focus[data-v-8f1cc6ce]:focus {\n\toutline: none !important;\n\toutline-width: 0 !important;\n\tbox-shadow: none;\n\t-moz-box-shadow: none;\n\t-webkit-box-shadow: none;\n}\n.emoji-msg[data-v-8f1cc6ce] {\n\tfont-size: 4rem !important;\n\tline-height: 30px !important;\n\tmargin-top: 10px !important;\n}\n.larger-text[data-v-8f1cc6ce] {\n\tfont-size: 22px;\n}\n",""])},"9oR/":function(t,e,s){"use strict";s.r(e);function a(t){return function(t){if(Array.isArray(t))return i(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(!t)return;if("string"==typeof t)return i(t,e);var s=Object.prototype.toString.call(t).slice(8,-1);"Object"===s&&t.constructor&&(s=t.constructor.name);if("Map"===s||"Set"===s)return Array.from(t);if("Arguments"===s||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(s))return i(t,e)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var s=0,a=new Array(e);s<e;s++)a[s]=t[s];return a}var n={props:["accountId"],data:function(){return{config:window.App.config,hideAvatars:!0,hideTimestamps:!1,largerText:!1,autoRefresh:!1,mutedNotifications:!1,blocked:!1,loaded:!1,profile:{},page:"read",pages:["browse","add","read"],threads:[],thread:!1,threadIndex:!1,replyText:"",composeUsername:"",ctxContext:null,ctxIndex:null,uploading:!1,uploadProgress:null,min_id:null,max_id:null,loadingMessages:!1,showLoadMore:!0}},mounted:function(){var t=this;this.fetchProfile();var e=this;axios.get("/api/direct/thread",{params:{pid:e.accountId}}).then((function(s){e.loaded=!0;var i=s.data;i.messages.reverse(),t.thread=i,t.threads=[i],t.threadIndex=0;var n=i.messages.map((function(t){return t.id}));t.max_id=Math.max.apply(Math,a(n)),t.min_id=Math.min.apply(Math,a(n)),t.mutedNotifications=i.muted,t.markAsRead(),setTimeout((function(){var t=document.querySelector(".dm-wrapper");t.scrollTop=t.scrollHeight}),300)}));var s=localStorage.getItem("px_dm_options");s&&(s=JSON.parse(s),this.hideAvatars=s.hideAvatars,this.hideTimestamps=s.hideTimestamps,this.largerText=s.largerText)},watch:{mutedNotifications:function(t){t?axios.post("/api/direct/mute",{id:this.accountId}).then((function(t){})):axios.post("/api/direct/unmute",{id:this.accountId}).then((function(t){})),this.mutedNotifications=t},hideAvatars:function(t){this.hideAvatars=t,this.updateOptions()},hideTimestamps:function(t){this.hideTimestamps=t,this.updateOptions()},largerText:function(t){this.largerText=t,this.updateOptions()}},updated:function(){$('[data-toggle="tooltip"]').tooltip()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window._sharedData.curUser=e.data,window.App.util.navatar()}))},sendMessage:function(){var t=this,e=this,s=this.replyText;axios.post("/api/direct/create",{to_id:this.threads[this.threadIndex].id,message:s,type:e.isEmoji(s)&&s.length<10?"emoji":"text"}).then((function(s){var i=s.data;e.threads[e.threadIndex].messages.push(i);var n=e.threads[e.threadIndex].messages.map((function(t){return t.id}));t.max_id=Math.max.apply(Math,a(n)),t.min_id=Math.min.apply(Math,a(n)),setTimeout((function(){var t=document.querySelector(".dm-wrapper");t.scrollTop=t.scrollHeight}),300)})).catch((function(t){403==t.response.status&&(e.blocked=!0,swal("Profile Unavailable","You cannot message this profile at this time.","error"))})),this.replyText=""},openCtxMenu:function(t,e){this.ctxIndex=e,this.ctxContext=t,this.$refs.ctxModal.show()},closeCtxMenu:function(){this.$refs.ctxModal.hide()},truncate:function(t){return _.truncate(t)},deleteMessage:function(){var t=this;window.confirm("Are you sure you want to delete this message?")?axios.delete("/api/direct/message",{params:{id:t.ctxContext.reportId}}).then((function(e){t.threads[t.threadIndex].messages.splice(t.ctxIndex,1),t.closeCtxMenu()})):t.closeCtxMenu()},reportMessage:function(){this.closeCtxMenu();var t="/i/report?type=post&id="+this.ctxContext.reportId;window.location.href=t},uploadMedia:function(t){var e=this;$(document).on("change","#uploadMedia",(function(t){e.handleUpload()}));var s=$(t.target);s.attr("disabled",""),$("#uploadMedia").click(),s.blur(),s.removeAttr("disabled")},handleUpload:function(){var t=this;t.uploading=!0;var e=document.querySelector("#uploadMedia");e.files.length||(this.uploading=!1),Array.prototype.forEach.call(e.files,(function(e,s){var a=e.type,i=t.config.uploader.media_types.split(",");if(-1==$.inArray(a,i))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"),void(t.uploading=!1);var n=new FormData;n.append("file",e),n.append("to_id",t.threads[t.threadIndex].id);var r={onUploadProgress:function(e){var s=Math.round(100*e.loaded/e.total);t.uploadProgress=s}};axios.post("/api/direct/media",n,r).then((function(e){t.uploadProgress=100,t.uploading=!1;var s={id:e.data.id,type:e.data.type,reportId:e.data.reportId,isAuthor:!0,text:null,media:e.data.url,timeAgo:"1s",seen:null};t.threads[t.threadIndex].messages.push(s),setTimeout((function(){var t=document.querySelector(".dm-wrapper");t.scrollTop=t.scrollHeight}),300)})).catch((function(s){switch(s.response.status){case 451:t.uploading=!1,e.value=null,swal("Banned Content","This content has been banned and cannot be uploaded.","error");break;default:t.uploading=!1,e.value=null,swal("Oops, something went wrong!","An unexpected error occurred.","error")}})),e.value=null,t.uploadProgress=0}))},viewOriginal:function(){var t=this.ctxContext.media;window.location.href=t},isEmoji:function(t){var e=t.replace(new RegExp("[\0-ữf]","g"),""),s=t.replace(new RegExp("[\n\rs]+|( )+","g"),"");return e.length===s.length},copyText:function(){window.App.util.clipboard(this.ctxContext.text),this.closeCtxMenu()},clickLink:function(){var t=this.ctxContext.text;1!=this.ctxContext.meta.local&&(t="/i/redirect?url="+encodeURI(this.ctxContext.text)),window.location.href=t},markAsRead:function(){},loadOlderMessages:function(){var t=this,e=this;this.loadingMessages=!0,axios.get("/api/direct/thread",{params:{pid:this.accountId,max_id:this.min_id}}).then((function(s){var i,n=s.data;if(!n.messages.length)return t.showLoadMore=!1,void(t.loadingMessages=!1);var r=t.thread.messages.map((function(t){return t.id})),o=n.messages.filter((function(t){return-1==r.indexOf(t.id)})).reverse(),l=o.map((function(t){return t.id})),c=Math.min.apply(Math,a(l));if(c==t.min_id)return t.showLoadMore=!1,void(t.loadingMessages=!1);t.min_id=c,(i=t.thread.messages).unshift.apply(i,a(o)),setTimeout((function(){e.loadingMessages=!1}),500)})).catch((function(e){t.loadingMessages=!1}))},messagePoll:function(){var t=this;setInterval((function(){axios.get("/api/direct/thread",{params:{pid:t.accountId,min_id:t.thread.messages[t.thread.messages.length-1].id}}).then((function(t){}))}),5e3)},showOptions:function(){this.page="options"},updateOptions:function(){var t={v:1,hideAvatars:this.hideAvatars,hideTimestamps:this.hideTimestamps,largerText:this.largerText};window.localStorage.setItem("px_dm_options",JSON.stringify(t))}}},r=(s("YESI"),s("KHd+")),o=Object(r.a)(n,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.loaded&&"read"==t.page?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white d-flex justify-content-between align-items-center"},[t._m(0),t._v(" "),s("span",[s("div",{staticClass:"media"},[s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:t.thread.avatar,width:"40",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.thread.name))])]),t._v(" "),s("p",{staticClass:"mb-0"},[t.thread.isLocal?s("a",{staticClass:"text-decoration-none text-muted",attrs:{href:"/"+t.thread.username}},[t._v("@"+t._s(t.thread.username))]):s("a",{staticClass:"text-decoration-none text-muted",attrs:{href:"/"+t.thread.username}},[t._v(t._s(t.thread.username))])])])])]),t._v(" "),s("span",[s("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.showOptions()}}},[s("i",{staticClass:"fas fa-cog fa-lg"})])])]),t._v(" "),s("ul",{staticClass:"list-group list-group-flush dm-wrapper",staticStyle:{height:"60vh","overflow-y":"scroll"}},[s("li",{staticClass:"list-group-item border-0"},[s("p",{staticClass:"text-center small text-muted"},[t._v("\n\t\t\t\t\t\t\tConversation with "),s("span",{staticClass:"font-weight-bold"},[t._v(t._s(t.thread.username))])]),t._v(" "),s("hr")]),t._v(" "),t.showLoadMore&&t.thread.messages&&t.thread.messages.length>5?s("li",{staticClass:"list-group-item border-0 mt-n4"},[s("p",{staticClass:"text-center small text-muted"},[t.loadingMessages?s("button",{staticClass:"btn btn-primary font-weight-bold rounded-pill btn-sm px-3",attrs:{disabled:""}},[t._v("Loading...")]):s("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,a){return s("li",{staticClass:"list-group-item border-0 chat-msg cursor-pointer",on:{click:function(s){return t.openCtxMenu(e,a)}}},[e.isAuthor?s("div",{staticClass:"media d-inline-flex float-right mb-0 mr-2"},[s("div",{staticClass:"media-body"},["photo"==e.type?s("p",{staticClass:"pill-from p-0 shadow"},[s("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})]):"link"==e.type?s("div",{staticClass:"media d-inline-flex float-right mb-0 cursor-pointer"},[s("div",{staticClass:"media-body"},[s("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[s("div",{staticClass:"card-body p-0"},[s("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?s("div",{staticClass:"bg-primary mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-white fa-2x"})]):s("div",{staticClass:"bg-light mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),s("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?s("p",{staticClass:"pill-from p-0 shadow"},[t._m(2,!0)]):"emoji"==e.type?s("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")]):"story:react"==e.type?s("p",{staticClass:"pill-from p-0 shadow",staticStyle:{"margin-bottom":"10px",position:"relative",width:"fit-content"}},[s("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.meta.story_media_url,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}}),t._v(" "),s("span",{staticClass:"badge badge-light rounded-pill border",staticStyle:{"font-size":"20px",position:"absolute",bottom:"-10px",right:"-10px"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.meta.reaction)+"\n\t\t\t\t\t\t\t\t\t")])]):"story:comment"==e.type?s("span",{staticClass:"p-0",staticStyle:{display:"flex","justify-content":"flex-end","margin-bottom":"10px",position:"relative"}},[s("span",{staticClass:"d-flex align-items-end flex-column"},[s("img",{staticClass:"d-block pill-from p-0 mr-0 pr-0 mb-n1",staticStyle:{"border-radius":"20px"},attrs:{src:e.meta.story_media_url,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}}),t._v(" "),s("span",{staticClass:"pill-from shadow text-break",staticStyle:{width:"fit-content"}},[t._v(t._s(e.meta.caption))])])]):s("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(" "),"story:react"==e.type?s("p",{staticClass:"small text-muted text-right mb-0 mr-0"},[t._v("\n\t\t\t\t\t\t\t\t\tYou reacted to "),s("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.meta.story_username))]),t._v("'s story\n\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),"story:comment"==e.type?s("p",{staticClass:"small text-muted text-right mb-0 mr-0"},[t._v("\n\t\t\t\t\t\t\t\t\tYou replied to "),s("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.meta.story_username))]),t._v("'s story\n\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t.hideTimestamps?s("p",[t._v(" ")]):s("p",{staticClass:"small text-muted font-weight-bold text-right"},[e.hidden?s("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[s("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():s("img",{staticClass:"ml-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.profile.avatar,alt:"avatar",width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}})]):s("div",{staticClass:"media d-inline-flex mb-0"},[t.hideAvatars?t._e():s("img",{staticClass:"mr-3 mt-2 rounded-circle img-thumbnail",attrs:{src:t.thread.avatar,alt:"avatar",width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),t._v(" "),s("div",{staticClass:"media-body"},["photo"==e.type?s("p",{staticClass:"pill-to p-0 shadow"},[s("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.media,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}})]):"link"==e.type?s("div",{staticClass:"media d-inline-flex mb-0 cursor-pointer"},[s("div",{staticClass:"media-body"},[s("div",{staticClass:"card mb-2 rounded border shadow",staticStyle:{width:"240px"},attrs:{title:e.text}},[s("div",{staticClass:"card-body p-0"},[s("div",{staticClass:"media d-flex align-items-center"},[e.meta.local?s("div",{staticClass:"bg-primary mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-white fa-2x"})]):s("div",{staticClass:"bg-light mr-3 border-right p-3"},[s("i",{staticClass:"fas fa-link text-lighter fa-2x"})]),t._v(" "),s("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?s("p",{staticClass:"pill-to p-0 shadow"},[t._m(1,!0)]):"emoji"==e.type?s("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")]):"story:react"==e.type?s("p",{staticClass:"pill-to p-0 shadow",staticStyle:{width:"140px","margin-bottom":"10px",position:"relative"}},[s("img",{staticStyle:{"border-radius":"20px"},attrs:{src:e.meta.story_media_url,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}}),t._v(" "),s("span",{staticClass:"badge badge-light rounded-pill border",staticStyle:{"font-size":"20px",position:"absolute",bottom:"-10px",left:"-10px"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.meta.reaction)+"\n\t\t\t\t\t\t\t\t\t")])]):"story:comment"==e.type?s("span",{staticClass:"p-0",staticStyle:{display:"flex","justify-content":"flex-start","margin-bottom":"10px",position:"relative"}},[s("span",{},[s("img",{staticClass:"d-block pill-to p-0 mr-0 pr-0 mb-n1",staticStyle:{"border-radius":"20px"},attrs:{src:e.meta.story_media_url,width:"140",onerror:"this.onerror=null;this.src='/storage/no-preview.png';"}}),t._v(" "),s("span",{staticClass:"pill-to shadow text-break",staticStyle:{width:"fit-content"}},[t._v(t._s(e.meta.caption))])])]):s("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(" "),"story:react"==e.type?s("p",{staticClass:"small text-muted mb-0 ml-0"},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.meta.story_actor_username))]),t._v(" reacted your story\n\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),"story:comment"==e.type?s("p",{staticClass:"small text-muted mb-0 ml-0"},[s("span",{staticClass:"font-weight-bold"},[t._v(t._s(e.meta.story_actor_username))]),t._v(" replied to your story\n\t\t\t\t\t\t\t\t")]):t._e(),t._v(" "),t.hideTimestamps?s("p",[t._v(" ")]):s("p",{staticClass:"small text-muted font-weight-bold d-flex align-items-center justify-content-start",attrs:{"data-timestamp":"timestamp"}},[e.hidden?s("span",{staticClass:"mr-2 small",attrs:{title:"Filtered Message","data-toggle":"tooltip","data-placement":"bottom"}},[s("i",{staticClass:"fas fa-lock"})]):t._e(),t._v(" "+t._s(e.timeAgo))])])])])}))],2),t._v(" "),s("div",{staticClass:"card-footer bg-white p-0"},[s("form",{staticClass:"border-0 rounded-0 align-middle",attrs:{method:"post",action:"#"}},[s("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(" "),s("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.apply(null,arguments)}}})])]),t._v(" "),s("div",{staticClass:"card-footer p-0"},[s("p",{staticClass:"d-flex justify-content-between align-items-center mb-0 px-3 py-1 small"},[s("span",[s("span",{staticClass:"btn btn-primary btn-sm font-weight-bold py-0 px-3 rounded-pill",on:{click:t.uploadMedia}},[s("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(" "),s("input",{staticClass:"d-none",attrs:{type:"file",id:"uploadMedia",name:"uploadMedia",accept:"image/jpeg,image/png,image/gif,video/mp4"}}),t._v(" "),s("span",{staticClass:"text-muted font-weight-bold"},[t._v(t._s(t.replyText.length)+"/600")])])])])])]):t._e(),t._v(" "),t.loaded&&"options"==t.page?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white d-flex justify-content-between align-items-center"},[s("span",[s("a",{staticClass:"text-muted",attrs:{href:"#"},on:{click:function(e){e.preventDefault(),t.page="read"}}},[s("i",{staticClass:"fas fa-chevron-left fa-lg"})])]),t._v(" "),t._m(3),t._v(" "),t._m(4)]),t._v(" "),s("ul",{staticClass:"list-group list-group-flush dm-wrapper",staticStyle:{height:"698px"}},[s("div",{staticClass:"list-group-item media border-bottom"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.hideAvatars,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.hideAvatars=s.concat([null])):n>-1&&(t.hideAvatars=s.slice(0,n).concat(s.slice(n+1)))}else t.hideAvatars=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch0"}})]),t._v(" "),s("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(" "),s("div",{staticClass:"list-group-item media border-bottom"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.hideTimestamps,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.hideTimestamps=s.concat([null])):n>-1&&(t.hideTimestamps=s.slice(0,n).concat(s.slice(n+1)))}else t.hideTimestamps=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch1"}})]),t._v(" "),s("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(" "),s("div",{staticClass:"list-group-item media border-bottom"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.largerText,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.largerText=s.concat([null])):n>-1&&(t.largerText=s.slice(0,n).concat(s.slice(n+1)))}else t.largerText=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch2"}})]),t._v(" "),s("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(" "),s("div",{staticClass:"list-group-item media border-bottom d-flex align-items-center"},[s("div",{staticClass:"d-inline-block custom-control custom-switch ml-3"},[s("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 s=t.mutedNotifications,a=e.target,i=!!a.checked;if(Array.isArray(s)){var n=t._i(s,null);a.checked?n<0&&(t.mutedNotifications=s.concat([null])):n>-1&&(t.mutedNotifications=s.slice(0,n).concat(s.slice(n+1)))}else t.mutedNotifications=i}}}),t._v(" "),s("label",{staticClass:"custom-control-label",attrs:{for:"customSwitch4"}})]),t._v(" "),s("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"),s("p",{staticClass:"small mb-0"},[t._v("You will not receive any direct message notifications from "),s("strong",[t._v(t._s(t.thread.username))]),t._v(".")])])])])])])]):t._e(),t._v(" "),s("b-modal",{ref:"ctxModal",attrs:{id:"ctx-modal","hide-header":"","hide-footer":"",centered:"",rounded:"",size:"sm","body-class":"list-group-flush p-0 rounded"}},[s("div",{staticClass:"list-group text-center"},[t.ctxContext&&"photo"==t.ctxContext.type?s("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?s("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?s("div",{staticClass:"list-group-item rounded cursor-pointer",on:{click:function(e){return t.clickLink()}}},[s("p",{staticClass:"mb-0",staticStyle:{"font-size":"12px"}},[t._v("\n\t\t\t\tNavigate to \n\t\t\t")]),t._v(" "),s("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():s("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?s("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?s("div",{staticClass:"list-group-item rounded cursor-pointer text-muted",on:{click:function(e){return t.deleteMessage()}}},[t._v("Delete")]):t._e(),t._v(" "),s("div",{staticClass:"list-group-item rounded cursor-pointer text-lighter",on:{click:function(e){return t.closeCtxMenu()}}},[t._v("Cancel")])])])],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,"8f1cc6ce",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 s=e.protocol+"//"+e.host,a=s+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("/")?s+n:a+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 s=function(t,e){var s=t[1]||"",a=t[3];if(!a)return s;if(e&&"function"==typeof btoa){var i=(r=a,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */"),n=a.sources.map((function(t){return"/*# sourceURL="+a.sourceRoot+t+" */"}));return[s].concat(n).concat([i]).join("\n")}var r;return[s].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+s+"}":s})).join("")},e.i=function(t,s){"string"==typeof t&&(t=[[null,t,""]]);for(var a={},i=0;i<this.length;i++){var n=this[i][0];"number"==typeof n&&(a[n]=!0)}for(i=0;i<t.length;i++){var r=t[i];"number"==typeof r[0]&&a[r[0]]||(s&&!r[2]?r[2]=s:s&&(r[2]="("+r[2]+") and ("+s+")"),e.push(r))}},e}},"KHd+":function(t,e,s){"use strict";function a(t,e,s,a,i,n,r,o){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=s,c._compiled=!0),a&&(c.functional=!0),n&&(c._scopeId="data-v-"+n),r?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(r)},c._ssrRegister=l):i&&(l=o?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var d=c.render;c.render=function(t,e){return l.call(e),d(t,e)}}else{var u=c.beforeCreate;c.beforeCreate=u?[].concat(u,l):[l]}return{exports:t,options:c}}s.d(e,"a",(function(){return a}))},VGw1:function(t,e,s){"use strict";s.r(e);var a=s("lb/t"),i=(s("i3gq"),{components:{Autocomplete:a.a},data:function(){return{config:window.App.config,loaded:!1,profile:{},page:"browse",pages:["browse","add","read"],tab:"inbox",tabs:["inbox","sent","filtered"],inboxPage:1,sentPage:1,filteredPage:1,threads:[],thread:!1,threadIndex:!1,replyText:"",composeUsername:"",ctxContext:null,ctxIndex:null,uploading:!1,uploadProgress:null,messages:{inbox:[],sent:[],filtered:[]},newType:"select",composeLoading:!1}},mounted:function(){var t=this;this.fetchProfile();var e=this;axios.get("/api/direct/browse",{params:{a:"inbox"}}).then((function(s){e.loaded=!0,t.threads=s.data,t.messages.inbox=s.data}))},updated:function(){$('[data-toggle="tooltip"]').tooltip()},methods:{fetchProfile:function(){var t=this;axios.get("/api/pixelfed/v1/accounts/verify_credentials").then((function(e){t.profile=e.data,window._sharedData.curUser=e.data,window.App.util.navatar()}))},goto:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"browse";this.page=t},loadMessage:function(t){var e="/account/direct/t/"+t;window.location.href=e},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.post("/api/direct/lookup",{q:t}).then((function(t){return t.data}))},getTagResultValue:function(t){return t.local?"@"+t.name:t.name},onTagSubmitLocation:function(t){this.composeLoading=!0,window.location.href="/account/direct/t/"+t.id},messagePagination:function(t,e){var s=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,s.threads=t.data,s.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,s.threads=t.data,s.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,s.threads=t.data,s.messages.filtered=t.data})))}}}),n=s("KHd+"),r=Object(n.a)(i,(function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[t.loaded&&"browse"==t.page?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"50vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white py-4"},[s("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("Direct Messages")]),t._v(" "),s("span",{staticClass:"float-right"},[s("a",{staticClass:"btn btn-outline-primary font-weight-bold py-0 rounded-pill",attrs:{href:"#"},on:{click:function(e){return e.preventDefault(),t.goto("add")}}},[t._v("New Message")])])]),t._v(" "),s("div",{staticClass:"card-header bg-white"},[s("ul",{staticClass:"nav nav-pills nav-fill"},[s("li",{staticClass:"nav-item"},[s("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(" "),s("li",{staticClass:"nav-item"},[s("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(" "),s("li",{staticClass:"nav-item"},[s("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?s("ul",{staticClass:"list-group list-group-flush"},[t.messages.inbox.length?t._l(t.messages.inbox,(function(e,a){return s("div",{key:"dm_inbox"+a},[s("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}},[s("div",{staticClass:"media d-flex align-items-center"},[t._o(s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),0,"dm_inbox"+a),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold text-truncate"},[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(" "),s("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(0,!0),t._v(" "),s("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(" "),s("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)])])])})):s("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[s("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"sent"==t.tab?s("ul",{staticClass:"list-group list-group-flush"},[t.messages.sent.length?t._l(t.messages.sent,(function(e,a){return s("div",{key:"dm_sent"+a},[s("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.loadMessage(e.id)}}},[s("div",{staticClass:"media d-flex align-items-center"},[t._o(s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),1,"dm_sent"+a),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold text-truncate"},[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(" "),s("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(2,!0),t._v(" "),s("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(" "),s("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)])])])})):s("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[s("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e(),t._v(" "),"filtered"==t.tab?s("ul",{staticClass:"list-group list-group-flush"},[t.messages.filtered.length?t._l(t.messages.filtered,(function(e,a){return s("div",{key:"dm_filtered"+a},[s("a",{staticClass:"list-group-item text-dark text-decoration-none border-left-0 border-right-0 border-top-0",attrs:{href:"#"},on:{click:function(s){return s.preventDefault(),t.loadMessage(e.id)}}},[s("div",{staticClass:"media d-flex align-items-center"},[t._o(s("img",{staticClass:"mr-3 rounded-circle img-thumbnail",attrs:{src:e.avatar,width:"32",onerror:"this.onerror=null;this.src='/storage/avatars/default.jpg';"}}),2,"dm_filtered"+a),t._v(" "),s("div",{staticClass:"media-body"},[s("p",{staticClass:"mb-0"},[s("span",{staticClass:"font-weight-bold text-truncate"},[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(" "),s("span",{staticClass:"pl-1 text-muted small text-truncate",staticStyle:{"font-weight":"500"}},[t._v("\n\t\t\t\t\t\t\t\t\t\t"+t._s(e.isLocal?"@"+e.username:e.username)+"\n\t\t\t\t\t\t\t\t\t")])]),t._v(" "),s("p",{staticClass:"text-muted mb-0",staticStyle:{"font-size":"13px","font-weight":"500"}},[t._m(4,!0),t._v(" "),s("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(" "),s("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)])])])})):s("div",{staticClass:"list-group-item d-flex justify-content-center align-items-center",staticStyle:{"min-height":"40vh"}},[s("p",{staticClass:"lead mb-0"},[t._v("No messages found :(")])])],2):t._e()]),t._v(" "),"inbox"==t.tab?s("div",{staticClass:"mt-3 text-center"},[s("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(" "),s("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?s("div",{staticClass:"mt-3 text-center"},[s("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(" "),s("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?s("div",{staticClass:"mt-3 text-center"},[s("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(" "),s("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?s("div",{staticClass:"container messages-page p-0 p-md-2 mt-n4",staticStyle:{"min-height":"60vh"}},[s("div",{staticClass:"col-12 col-md-8 offset-md-2 p-0 px-md-2"},[s("div",{staticClass:"card shadow-none border mt-4"},[s("div",{staticClass:"card-header bg-white py-4 d-flex justify-content-between"},[s("span",{staticClass:"cursor-pointer px-3",on:{click:function(e){return t.goto("browse")}}},[s("i",{staticClass:"fas fa-chevron-left"})]),t._v(" "),s("span",{staticClass:"h4 font-weight-bold mb-0"},[t._v("New Direct Message")]),t._v(" "),t._m(6)]),t._v(" "),s("div",{staticClass:"card-body d-flex align-items-center justify-content-center",staticStyle:{height:"60vh"}},[s("div",[s("p",{staticClass:"mb-0 font-weight-bold"},[t._v("Select Recipient")]),t._v(" "),s("autocomplete",{ref:"autocomplete",attrs:{search:t.composeSearch,disabled:t.composeLoading,placeholder:"@dansup","aria-label":"Search usernames","get-result-value":t.getTagResultValue},on:{submit:t.onTagSubmitLocation}}),t._v(" "),s("div",{staticStyle:{width:"300px"}})],1)])])])]):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"})])}],!1,null,"07ed533f",null);e.default=r.exports},YESI:function(t,e,s){"use strict";s("2jBX")},"aET+":function(t,e,s){var a,i,n={},r=(a=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=a.apply(this,arguments)),i}),o=function(t,e){return e?e.querySelector(t):document.querySelector(t)},l=function(t){var e={};return function(t,s){if("function"==typeof t)return t();if(void 0===e[t]){var a=o.call(this,t,s);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}e[t]=a}return e[t]}}(),c=null,d=0,u=[],p=s("9tPo");function h(t,e){for(var s=0;s<t.length;s++){var a=t[s],i=n[a.id];if(i){i.refs++;for(var r=0;r<i.parts.length;r++)i.parts[r](a.parts[r]);for(;r<a.parts.length;r++)i.parts.push(x(a.parts[r],e))}else{var o=[];for(r=0;r<a.parts.length;r++)o.push(x(a.parts[r],e));n[a.id]={id:a.id,refs:1,parts:o}}}}function m(t,e){for(var s=[],a={},i=0;i<t.length;i++){var n=t[i],r=e.base?n[0]+e.base:n[0],o={css:n[1],media:n[2],sourceMap:n[3]};a[r]?a[r].parts.push(o):s.push(a[r]={id:r,parts:[o]})}return s}function f(t,e){var s=l(t.insertInto);if(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var a=u[u.length-1];if("top"===t.insertAt)a?a.nextSibling?s.insertBefore(e,a.nextSibling):s.appendChild(e):s.insertBefore(e,s.firstChild),u.push(e);else if("bottom"===t.insertAt)s.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=l(t.insertAt.before,s);s.insertBefore(e,i)}}function g(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=u.indexOf(t);e>=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 a=function(){0;return s.nc}();a&&(t.attrs.nonce=a)}return b(e,t.attrs),f(t,e),e}function b(t,e){Object.keys(e).forEach((function(s){t.setAttribute(s,e[s])}))}function x(t,e){var s,a,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 r=d++;s=c||(c=v(e)),a=w.bind(null,s,r,!1),i=w.bind(null,s,r,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(s=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",b(e,t.attrs),f(t,e),e}(e),a=k.bind(null,s,e),i=function(){g(s),s.href&&URL.revokeObjectURL(s.href)}):(s=v(e),a=C.bind(null,s),i=function(){g(s)});return a(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;a(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=r()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var s=m(t,e);return h(s,e),function(t){for(var a=[],i=0;i<s.length;i++){var r=s[i];(o=n[r.id]).refs--,a.push(o)}t&&h(m(t,e),e);for(i=0;i<a.length;i++){var o;if(0===(o=a[i]).refs){for(var l=0;l<o.parts.length;l++)o.parts[l]();delete n[o.id]}}}};var _,y=(_=[],function(t,e){return _[t]=e,_.filter(Boolean).join("\n")});function w(t,e,s,a){var i=s?"":a.css;if(t.styleSheet)t.styleSheet.cssText=y(e,i);else{var n=document.createTextNode(i),r=t.childNodes;r[e]&&t.removeChild(r[e]),r.length?t.insertBefore(n,r[e]):t.appendChild(n)}}function C(t,e){var s=e.css,a=e.media;if(a&&t.setAttribute("media",a),t.styleSheet)t.styleSheet.cssText=s;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(s))}}function k(t,e,s){var a=s.css,i=s.sourceMap,n=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||n)&&(a=p(a)),i&&(a+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var r=new Blob([a],{type:"text/css"}),o=t.href;t.href=URL.createObjectURL(r),o&&URL.revokeObjectURL(o)}},i3gq:function(t,e,s){var a=s("0ox+");"string"==typeof a&&(a=[[t.i,a,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};s("aET+")(a,i);a.locals&&(t.exports=a.locals)},"lb/t":function(t,e,s){"use strict";(function(t){function s(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e,s){return e in t?Object.defineProperty(t,e,{value:s,enumerable:!0,configurable:!0,writable:!0}):t[e]=s,t}function i(t,e){var s=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),s.push.apply(s,a)}return s}function n(t){for(var e=1;e<arguments.length;e++){var s=null!=arguments[e]?arguments[e]:{};e%2?i(Object(s),!0).forEach((function(e){a(t,e,s[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(s)):i(Object(s)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(s,e))}))}return t}var r=function(t,e){return t.matches?t.matches(e):t.msMatchesSelector?t.msMatchesSelector(e):t.webkitMatchesSelector?t.webkitMatchesSelector(e):null},o=function(t,e){return t.closest?t.closest(e):function(t,e){for(var s=t;s&&1===s.nodeType;){if(r(s,e))return s;s=s.parentNode}return null}(t,e)},l=function(t){return Boolean(t&&"function"==typeof t.then)},c=function t(){var e=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=i.search,r=i.autoSelect,c=void 0!==r&&r,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,y=void 0===_?function(){}:_,w=i.onLoading,C=void 0===w?function(){}:w,k=i.onLoaded,S=void 0===k?function(){}:k;s(this,t),a(this,"value",""),a(this,"searchCounter",0),a(this,"results",[]),a(this,"selectedIndex",-1),a(this,"handleInput",(function(t){var s=t.target.value;e.updateResults(s),e.value=s})),a(this,"handleKeyDown",(function(t){var s=t.key;switch(s){case"Up":case"Down":case"ArrowUp":case"ArrowDown":var a="ArrowUp"===s||"Up"===s?e.selectedIndex-1:e.selectedIndex+1;t.preventDefault(),e.handleArrows(a);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}})),a(this,"handleFocus",(function(t){var s=t.target.value;e.updateResults(s),e.value=s})),a(this,"handleBlur",(function(){e.hideResults()})),a(this,"handleResultMouseDown",(function(t){t.preventDefault()})),a(this,"handleResultClick",(function(t){var s=t.target,a=o(s,"[data-result-index]");if(a){e.selectedIndex=parseInt(a.dataset.resultIndex,10);var i=e.results[e.selectedIndex];e.selectResult(),e.onSubmit(i)}})),a(this,"handleArrows",(function(t){var s=e.results.length;e.selectedIndex=(t%s+s)%s,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 s=++e.searchCounter;e.onLoading(),e.search(t).then((function(t){s===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 s=t.querySelector('[data-result-index="'.concat(e.selectedIndex,'"]'));if(s){var a=t.getBoundingClientRect(),i=s.getBoundingClientRect();i.top<a.top?t.scrollTop-=a.top-i.top:i.bottom>a.bottom&&(t.scrollTop+=i.bottom-a.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=y,this.onLoading=C,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,s,a,i,n,r,o,l,c){"boolean"!=typeof r&&(l=o,o=r,r=!1);const d="function"==typeof s?s.options:s;let u;if(t&&t.render&&(d.render=t.render,d.staticRenderFns=t.staticRenderFns,d._compiled=!0,i&&(d.functional=!0)),a&&(d._scopeId=a),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=r?function(t){e.call(this,c(t,this.$root.$options.shadowRoot))}:function(t){e.call(this,o(t))}),u)if(d.functional){const t=d.render;d.render=function(e,s){return u.call(s),t(e,s)}}else{const t=d.beforeCreate;d.beforeCreate=t?[].concat(t,u):[u]}return s}({render:function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{ref:"root"},[t._t("default",[s("div",t._b({},"div",t.rootProps,!1),[s("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(" "),s("ul",t._g(t._b({ref:"resultList"},"ul",t.resultListProps,!1),t.resultListListeners),[t._l(t.results,(function(e,a){return[t._t("result",[s("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,s,a,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,r=function(){a=null,s||t.apply(i,n)},o=s&&!a;clearTimeout(a),a=setTimeout(r,e),o&&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: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,s){return n({id:"".concat(t.baseClass,"-result-").concat(s),class:"".concat(t.baseClass,"-result"),"data-result-index":s,role:"option"},t.selectedIndex===s?{"aria-selected":"true"}:{})}))}},mounted:function(){document.body.addEventListener("click",this.handleDocumentClick)},beforeDestroy:function(){document.body.removeEventListener("click",this.handleDocumentClick)},updated:function(){var t,e,s,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,s=t.getBoundingClientRect(),a=e.getBoundingClientRect(),s.bottom+a.height>window.innerHeight&&window.innerHeight-s.bottom<s.top&&window.pageYOffset+s.top-a.height>0?"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,s("yLpj"))},yLpj:function(t,e){var s;s=function(){return this}();try{s=s||new Function("return this")()}catch(t){"object"==typeof window&&(s=window)}t.exports=s}},[[17,0]]]); |