"use strict";(self.webpackChunkpixelfed=self.webpackChunkpixelfed||[]).push([[9124],{66517:(t,e,a)=>{a.r(e),a.d(e,{default:()=>n});vari=a(5787),s=a(28772),o=a(19324);constn={components:{drawer:i.default,sidebar:s.default,"compose-modal":o.default},data:function(){return{isLoaded:!1,profile:void0}},mounted:function(){this.profile=window._sharedData.user,this.isLoaded=!0},methods:{closeModal:function(){this.$router.push("/i/web")}}}},50371:(t,e,a)=>{a.r(e),a.d(e,{default:()=>i});consti={data:function(){return{user:window._sharedData.user}}}},84154:(t,e,a)=>{a.r(e),a.d(e,{default:()=>i});consti={props:["user"],data:function(){return{loaded:!1,avatarUpdateIndex:0,avatarUpdateFile:void0,avatarUpdatePreview:void0}},methods:{open:function(){this.$refs.avatarUpdateModal.show()},avatarUpdateClose:function(){this.$refs.avatarUpdateModal.hide(),this.avatarUpdateIndex=0,this.avatarUpdateFile=void0},avatarUpdateClear:function(){this.avatarUpdateIndex=0,this.avatarUpdateFile=void0},avatarUpdateStep:function(t){this.$refs.avatarUpdateRef.click(),this.avatarUpdateIndex=t},handleAvatarUpdate:function(){vart=this,e=event.target.files;Array.prototype.forEach.call(e,(function(e,a){t.avatarUpdateFile=e,t.avatarUpdatePreview=URL.createObjectURL(e),t.avatarUpdateIndex=1}))},handleDrop:function(t){t.preventDefault();vare=this;if(t.dataTransfer.items){for(vara=0;a<t.dataTransfer.items.length;a++)if("file"===t.dataTransfer.items[a].kind){vari=t.dataTransfer.items[a].getAsFile();if(!i)return;e.avatarUpdateFile=i,e.avatarUpdatePreview=URL.createObjectURL(i),e.avatarUpdateIndex=1}}elsefor(a=0;a<t.dataTransfer.files.length;a++){if(!t.dataTransfer.files[a].hasOwnProperty("name"))return;e.avatarUpdateFile=t.dataTransfer.files[a],e.avatarUpdatePreview=URL.createObjectURL(t.dataTransfer.files[a]),e.avatarUpdateIndex=1}},confirmUpload:function(){vart=this;if(window.confirm("Are you sure you want to change your avatar photo?")){vare=newFormData;e.append("_method","PATCH"),e.append("avatar",this.avatarUpdateFile),axios.post("/api/v1/accounts/update_credentials",e).then((function(e){window._sharedData.user.avatar=e.data.avatar,t.avatarUpdateClose()})).catch((function(t){t.response.data&&t.response.data.errors&&t.response.data.errors.avatar&&t.response.data.errors.avatar.length&&swal("Oops!",t.response.data.errors.avatar[0],"error")}))}}}}},79318:(t,e,a)=>{a.r(e),a.d(e,{default:()=>l});vari=a(95353),s=a(90414);functiono(t){returno="function"==typeofSymbol&&"symbol"==typeofSymbol.iterator?function(t){returntypeoft}:function(t){returnt&&"function"==typeofSymbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeoft},o(t)}functionn(t,e){vara=Object.keys(t);if(Object.getOwnPropertySymbols){vari=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){returnObject.getOwnPropertyDescriptor(t,e).enumerable}))),a.push.apply(a,i)}returna}functionr(t,e,a){return(e=function(t){vare=function(t,e){if("object"!=o(t)||!t)returnt;vara=t[Symbol.toPrimitive];if(void0!==a){vari=a.call(t,e||"default");if("object"!=o(i))returni;thrownewTypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==o(e)?e:e+""}(e))int?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}constl={props:{user:{type:Object,default:function(){return{avatar:"/storage/avatars/default.jpg",username:!1,display_name:"",following_count:0,followers_count:0}}},links:{type:Array,default:function(){return[{name:"Discover",path:"/i/web/discover",icon:"fas fa-compass"},{name:"Groups",path:"/i/web/groups",icon:"far fa-user-friends"},{name:"Videos",path:"/i/web/videos",icon:"far fa-video"}]}}},components:{UpdateAvatar:s.default},computed:function(t){for(vare=1;e<arguments.length;e++){vara=null!=arguments[e]?arguments[e]:{};e%2?n(Object(a),!0).forEach((function(e){r(t,e,a[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,