(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-629b51b7"],{4812:function(e,t,o){},"4c88":function(e,t,o){"use strict";o.d(t,"a",(function(){return u}));o("b0c0"),o("a9e3"),o("ac1f"),o("841c");var l=o("5530"),r=o("2909"),a=(o("96cf"),o("1da1")),i=o("a34a"),n=o.n(i),s=o("ff07"),c=o("d70b");function u(e,t,o){return d.apply(this,arguments)}function d(){return d=Object(a["a"])(n.a.mark((function e(t,o,a){var i,u,d,f,w,h,g;return n.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(i=Number(t.params.userId),!isNaN(i)&&0!==i){e.next=12;break}return d=t.params.username,f=d?{usernames:[d]}:{id:Object(r["a"])(null!==c["a"].soloCreatorId?[c["a"].soloCreatorId]:[])},e.next=6,s["a"].UserPublicDataProvider.search({data:f});case 6:return w=e.sent,h=null!==(u=w.result[0])&&void 0!==u?u:null,a(h?Object(l["a"])(Object(l["a"])({},t),{},{name:null!==(g=t.name)&&void 0!==g?g:void 0,params:Object(l["a"])(Object(l["a"])({},t.params),{},{userId:h.id})}):{name:"home"}),e.abrupt("return");case 12:a();case 13:case"end":return e.stop()}}),e)}))),d.apply(this,arguments)}},"86ff":function(e,t,o){"use strict";o("4812")},aad2:function(e,t,o){"use strict";o.r(t),o.d(t,"default",(function(){return G}));var l=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("followers-view",{attrs:{loading:e.loading,scroll:e.scroll,isFollowingPage:e.isFollowingPage,followers:e.followingsSearchResult?e.followingsSearchResult.result:[],authorFollowings:e.authorFollowings,authUserId:e.authUserId,userId:e.userId,user:e.user},on:{next:e.getNextPage,toggleFollow:e.toggleFollow}})},r=[],a=(o("99af"),o("7db0"),o("d81d"),o("d3b7"),o("ac1f"),o("3ca3"),o("841c"),o("ddb0"),o("5530")),i=(o("96cf"),o("1da1")),n=o("d4ec"),s=o("bee2"),c=o("262e"),u=o("2caf"),d=o("a34a"),f=o.n(d),w=o("9ab4"),h=o("2fe1"),g=o("60a3"),p=o("4c88"),v=o("31cf"),b=o("51ce"),_=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("base-page",{staticClass:"followers-view",attrs:{loading:e.loading}},[o("page-title",{staticClass:"followers-view__title pa-4",on:{click:e.onBackClick}},[e._v(e._s(e.screenName))]),o("div",{staticClass:"followers-view__tabs"},[o("router-link",{staticClass:"followers-view__tab caption",class:{__active:!e.isFollowingPage},attrs:{to:{name:"followersById",params:{userId:e.userId}}}},[e._v(e._s(e.$t("Followers")))]),o("router-link",{staticClass:"followers-view__tab caption",class:{__active:e.isFollowingPage},attrs:{to:{name:"followingById",params:{userId:e.userId}}}},[e._v(e._s(e.$t("Following")))])],1),0!==e.followers.length?o("div",{staticClass:"py-4"},[o("infinite-scroll",{attrs:{enable:e.scroll},on:{next:e.$listeners.next}},e._l(e.followers,(function(t){return o("followers-item",{key:e.isFollowingPage?t.userId:t.followerId,attrs:{follower:t,isFollowingPage:e.isFollowingPage,authUserId:e.authUserId,"is-author":e.isAuthor,authorFollowings:e.authorFollowings},on:{toggleFollow:e.$listeners.toggleFollow}})})),1)],1):e._e(),0!==e.followers.length||e.loading?e._e():o("div",{staticClass:"followers-view__empty py-9"},[e._v(e._s(e.emptyText))])],1)},y=[],j=o("2b0e"),O=o("64ae"),F=o("78f9"),m=o("24a8"),k=o("1031"),I=o("855c"),x=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("list-item",{staticClass:"followers-item",attrs:{bottomShadow:!1},scopedSlots:e._u([{key:"prepend",fn:function(){return[o(e.profileUrl?"router-link":"div",{tag:"div",staticClass:"mr-2",attrs:{to:e.profileUrl}},[o("base-avatar",{staticClass:"mr-2",attrs:{size:56,user:e.followerData}})],1)]},proxy:!0},e.showFollow?{key:"append",fn:function(){return[o("div",{staticClass:"followers-item__link __follower caption",class:{__unfollow:e.isFollowed},on:{click:e.followClick}},[e._v(" "+e._s(e.isFollowed?e.$t("Unfollow"):e.canFollowing?e.$t("Follow"):"")+" ")])]},proxy:!0}:e.isFollowingPage?{key:"append",fn:function(){return[e.isFollowingPage&&e.isAuthor?o("div",{staticClass:"followers-item__link __following caption",class:{__unfollow:e.isFollowing},on:{click:e.followClick}},[e._v(" "+e._s(e.isFollowing?e.$t("Unfollow"):e.$t("Follow"))+" ")]):e._e()]},proxy:!0}:null],null,!0)},[o("div",{staticClass:"followers-item__name caption"},[o(e.profileUrl?"router-link":"div",{tag:"span",staticClass:"followers-item__text",attrs:{to:e.profileUrl}},[e._v(e._s(e.screenName))])],1)])},P=[],C=o("7fc7"),U=o("aaa0"),S=function(e){Object(c["a"])(o,e);var t=Object(u["a"])(o);function o(){var e;return Object(n["a"])(this,o),e=t.apply(this,arguments),e.isFollowed=!1,e.isFollowing=!0,e}return Object(s["a"])(o,[{key:"followClick",value:function(){var e=this;this.$emit("toggleFollow",this.followerData,(function(t){e.isFollowed=t,e.isFollowing=t}))}},{key:"profileUrl",get:function(){return this.followerData?Object(O["e"])(this.followerData):null}},{key:"screenName",get:function(){var e,t;return null!==(e=null===(t=this.followerData)||void 0===t?void 0:t.screenName)&&void 0!==e?e:""}},{key:"followerData",get:function(){return this.isFollowingPage?this.follower.user:this.follower.follower}},{key:"showFollow",get:function(){return null!==this.followerData&&this.canFollowing&&this.followerData.id!==this.authUserId}},{key:"canFollowing",get:function(){var e,t=this;return!this.authorFollowings.find((function(e){var o;return e.userId===(null===(o=t.followerData)||void 0===o?void 0:o.id)}))&&!(null!==(e=this.followerData)&&void 0!==e&&e.disabled)}}]),o}(j["default"]);Object(w["__decorate"])([Object(g["e"])({required:!0})],S.prototype,"follower",void 0),Object(w["__decorate"])([Object(g["e"])({type:String,required:!0})],S.prototype,"authUserId",void 0),Object(w["__decorate"])([Object(g["e"])({type:Boolean,required:!0})],S.prototype,"isFollowingPage",void 0),Object(w["__decorate"])([Object(g["e"])({type:Array,required:!0})],S.prototype,"authorFollowings",void 0),Object(w["__decorate"])([Object(g["e"])({type:Boolean,required:!0})],S.prototype,"isAuthor",void 0),S=Object(w["__decorate"])([Object(h["b"])({name:"FollowersItem",components:{BaseAvatar:C["a"],ListItem:U["a"]}})],S);var q=S,N=q,D=(o("e944"),o("2877")),$=Object(D["a"])(N,x,P,!1,null,"2f78cfad",null),B=$.exports,R=function(e){Object(c["a"])(o,e);var t=Object(u["a"])(o);function o(){return Object(n["a"])(this,o),t.apply(this,arguments)}return Object(s["a"])(o,[{key:"onBackClick",value:function(){this.$router.push(this.user?Object(O["e"])(this.user):Object(O["e"])(this.userId))}},{key:"screenName",get:function(){var e,t;return null!==(e=null===(t=this.user)||void 0===t?void 0:t.screenName)&&void 0!==e?e:""}},{key:"isAuthor",get:function(){return this.authUserId===this.userId}},{key:"emptyText",get:function(){return this.isAuthor?this.isFollowingPage?Object(F["a"])("You aren't following anyone yet"):Object(F["a"])("You don't have followers yet"):this.isFollowingPage?Object(F["a"])("{0} isn't following anyone yet",[this.screenName]):Object(F["a"])("{0} doesn't have followers yet",[this.screenName])}}]),o}(j["default"]);Object(w["__decorate"])([Object(g["e"])({type:String,required:!0})],R.prototype,"userId",void 0),Object(w["__decorate"])([Object(g["e"])({required:!0})],R.prototype,"user",void 0),Object(w["__decorate"])([Object(g["e"])({type:Boolean,required:!0})],R.prototype,"loading",void 0),Object(w["__decorate"])([Object(g["e"])({type:Boolean,required:!0})],R.prototype,"scroll",void 0),Object(w["__decorate"])([Object(g["e"])({type:String,required:!0})],R.prototype,"authUserId",void 0),Object(w["__decorate"])([Object(g["e"])({type:Boolean,required:!0})],R.prototype,"isFollowingPage",void 0),Object(w["__decorate"])([Object(g["e"])({type:Array,required:!0})],R.prototype,"followers",void 0),Object(w["__decorate"])([Object(g["e"])({type:Array,required:!0})],R.prototype,"authorFollowings",void 0),R=Object(w["__decorate"])([Object(h["b"])({name:"FollowersView",components:{BasePage:I["a"],PageTitle:k["a"],InfiniteScroll:m["a"],FollowersItem:B}})],R);var A=R,E=A,T=(o("86ff"),Object(D["a"])(E,_,y,!1,null,null,null)),z=T.exports,J=o("ff07"),V=function(e){Object(c["a"])(o,e);var t=Object(u["a"])(o);function o(){var e;return Object(n["a"])(this,o),e=t.apply(this,arguments),e.loading=!1,e.scroll=!1,e.user=null,e.followingsSearchResult=null,e.authorFollowings=[],e}return Object(s["a"])(o,[{key:"watchFollowingType",value:function(){var e=Object(i["a"])(f.a.mark((function e(t){return f.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.followingsSearchResult=null,this.loading=!0,e.next=5,this.getFollowers(t);case 5:return e.prev=5,this.loading=!1,e.finish(5);case 8:case"end":return e.stop()}}),e,this,[[0,,5,8]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getFollowers",value:function(){var e=Object(i["a"])(f.a.mark((function e(t){var o,l,r,i,n,s,c=arguments;return f.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=c.length>1&&void 0!==c[1]?c[1]:0,l=!(c.length>2&&void 0!==c[2])||c[2],this.scroll=!1,e.prev=3,r=this.isFollowingPage?{followerId:this.userId}:{userId:this.userId},e.next=7,J["a"].FollowingsProvider.find({data:Object(a["a"])(Object(a["a"])({},r),{},{sort:"TIME,DESC",page:o,size:20})});case 7:if(i=e.sent,this.followingsSearchResult=Object(a["a"])(Object(a["a"])({},i),{},{result:l||!this.followingsSearchResult?i.result:this.followingsSearchResult.result.concat(i.result)}),!this.authUser||0===i.result.length){e.next=17;break}if(this.authUser.id!==this.userId||!t){e.next=14;break}this.authorFollowings=this.followingsSearchResult.result,e.next=17;break;case 14:return e.next=16,J["a"].FollowingsProvider.searchFollowings({ids:i.result.map((function(e){return t?e.userId:e.followerId}))});case 16:this.authorFollowings=e.sent;case 17:return e.prev=17,this.scroll=null!==(n=null===(s=this.followingsSearchResult)||void 0===s?void 0:s.hasNextPage)&&void 0!==n&&n,e.finish(17);case 20:case"end":return e.stop()}}),e,this,[[3,,17,20]])})));function t(t){return e.apply(this,arguments)}return t}()},{key:"getNextPage",value:function(e){var t,o,l=(null!==(t=null===(o=this.followingsSearchResult)||void 0===o?void 0:o.page)&&void 0!==t?t:0)+1;this.getFollowers(this.isFollowingPage,l,!1).finally((function(){return e()}))}},{key:"created",value:function(){var e=Object(i["a"])(f.a.mark((function e(){var t;return f.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.prev=0,this.loading=!0,e.t0=Promise,e.next=5,J["a"].UserPublicDataProvider.search({data:{id:[this.userId]}});case 5:if(e.t2=t=e.sent.result[0],e.t1=null!==e.t2,!e.t1){e.next=9;break}e.t1=void 0!==t;case 9:if(!e.t1){e.next=13;break}e.t3=t,e.next=14;break;case 13:e.t3=null;case 14:return e.t4=this.user=e.t3,e.next=17,this.getFollowers(this.isFollowingPage);case 17:return e.t5=e.sent,e.t6=[e.t4,e.t5],e.next=21,e.t0.all.call(e.t0,e.t6);case 21:return e.prev=21,this.loading=!1,e.finish(21);case 24:case"end":return e.stop()}}),e,this,[[0,,21,24]])})));function t(){return e.apply(this,arguments)}return t}()},{key:"toggleFollow",value:function(){var e=Object(i["a"])(f.a.mark((function e(t,o){var l;return f.a.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,J["a"].FollowingsProvider.toggle({id:t.id});case 2:l=e.sent,o(l);case 4:case"end":return e.stop()}}),e)})));function t(t,o){return e.apply(this,arguments)}return t}()},{key:"beforeRouteEnter",value:function(e,t,o){Object(p["a"])(e,t,o)}},{key:"authUserId",get:function(){var e,t;return null!==(e=null===(t=this.authUser)||void 0===t?void 0:t.id)&&void 0!==e?e:""}}]),o}(Object(h["c"])(b["a"]));Object(w["__decorate"])([Object(g["e"])({type:String,required:!0})],V.prototype,"userId",void 0),Object(w["__decorate"])([Object(g["e"])({type:Boolean,required:!0})],V.prototype,"isFollowingPage",void 0),Object(w["__decorate"])([Object(g["i"])("isFollowingPage")],V.prototype,"watchFollowingType",null),Object(w["__decorate"])([v["a"]],V.prototype,"toggleFollow",null),V=Object(w["__decorate"])([Object(h["b"])({name:"PageFollowers",components:{FollowersView:z}})],V);var Y=V,L=Y,M=Object(D["a"])(L,l,r,!1,null,null,null),G=M.exports},d21c:function(e,t,o){},e944:function(e,t,o){"use strict";o("d21c")}}]);