text: (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-39756024"],{"04be":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{staticClass:"tabmenudemo-content"},[n("AllFollowerByUser",{attrs:{id:Number(e.$route.params.id),isOther:e.isOther}})],1)},i=[],o=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",{attrs:{id:"follower"}},[n("div",{staticClass:"container"},[n("b-card-group",{attrs:{deck:""}},e._l(e.followersFiltered,(function(e){return n("div",{key:e.id},[n("UserData",{attrs:{id:e.userFollower.id}})],1)})),0)],1)])},a=[],s=(n("4de4"),n("a9e3"),n("5530")),l=n("2f62"),u=n("f366"),d=n("1213"),c=n.n(d),f={name:"follower",components:{UserData:u["a"]},props:{labels:[],id:{type:Number,required:!0},isOther:{type:Boolean}},data:function(){return{followers:[]}},computed:Object(s["a"])({},Object(l["c"])({userId:function(e){return e.id},token:function(e){return e.token}}),{followersFiltered:function(){var e=this;return this.followers.filter((function(t){return t.userFollowing.id===e.id}))}}),methods:{queryFollower:function(){var e=this;this.$apollo.query({query:c.a,fetchPolicy:"no-cache",variables:{userId:this.userId},context:{headers:{Authorization:this.token}}}).then((function(t){e.followers=t.data.allUserFollow}))}},created:function(){this.queryFollower()}},m=f,v=n("2877"),h=Object(v["a"])(m,o,a,!1,null,null,null),p=h.exports,k={components:{AllFollowerByUser:p},props:{isOther:{type:Boolean}}},w=k,y=Object(v["a"])(w,r,i,!1,null,null,null);t["default"]=y.exports},"2ce5":function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"UserFollow"}},[r("ApolloQuery",{attrs:{query:n("ae48"),variables:{creatorId:e.creatorId},context:{headers:{Authorization:e.token}}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.result,i=(n.loading,n.error,n.data);return[i?r("div",{staticClass:"result apollo",staticStyle:{display:"none"}},[e._v(" "+e._s(e.user=i.userById)+" ")]):e._e()]}}])}),e.follows.some((function(t){return t.id===e.creatorId}))?r("b-button",{attrs:{variant:"secondary"},on:{click:function(t){return e.Unfollow(e.followId,e.token)}}},[e._v("Dejar de Seguir ")]):r("b-button",{attrs:{variant:"info"},on:{click:function(t){return e.Follow(e.userId,e.creatorId,e.token)}}},[e._v("Seguir ")])],1)},i=[],o=(n("7db0"),n("45fc"),n("a9e3"),n("96cf"),n("1da1")),a=n("5530"),s=n("2f62"),l=n("c231"),u=n.n(l),d=n("231f"),c=n.n(d),f=n("0f2a"),m=n.n(f),v=n("1213"),h=n.n(v),p={name:"FollowUser",components:{},props:{creatorId:{type:Number,required:!0}},data:function(){return{user:{},follows:[],userFollows:[],followId:Number}},watch:{userFollows:function(){var e=this;this.follows.some((function(t){return t.id===e.creatorId}))&&(this.followId=this.userFollows.find((function(t){return t.userFollower.id===e.userId&&t.userFollowing.id===e.creatorId})).id)}},computed:Object(a["a"])({},Object(s["c"])({userId:function(e){return Number(e.id)},token:function(e){return e.token}})),methods:{Unfollow:function(e,t){var n=this;this.$apollo.mutate({mutation:u.a,variables:{followId:e},context:{headers:{Authorization:t}}}).then((function(){console.log("unfollowed"),n.$emit("updated")}))},Follow:function(e,t,n){var r=this;this.$apollo.mutate({mutation:c.a,variables:{userFollower:e,userFollowing:t},context:{headers:{Authorization:n}}}).then((function(){console.log("followed"),r.$emit("updated")}))}},created:function(){var e=this;return Object(o["a"])(regeneratorRuntime.mark((function t(){var n,r,i,o;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n=Number(e.userId),r=e.token,t.next=4,e.$apollo.query({fetchPolicy:"no-cache",query:m.a,variables:{userId:n},context:{headers:{Authorization:r}}});case 4:return i=t.sent,t.next=7,e.$apollo.query({fetchPolicy:"no-cache",query:h.a,variables:{userId:n},context:{headers:{Authorization:r}}});case 7:o=t.sent,e.follows=i.data.usersFollowingByFollower,e.userFollows=o.data.allUserFollow;case 10:case"end":return t.stop()}}),t)})))()}},k=p,w=n("2877"),y=Object(w["a"])(k,r,i,!1,null,null,null);t["a"]=y.exports},"45fc":function(e,t,n){"use strict";var r=n("23e7"),i=n("b727").some,o=n("a640"),a=n("ae40"),s=o("some"),l=a("some");r({target:"Array",proto:!0,forced:!s||!l},{some:function(e){return i(this,e,arguments.length>1?arguments[1]:void 0)}})},8713:function(e,t){var n={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"userById"},variableDefinitions:[{kind:"VariableDefinition",variable:{kind:"Variable",name:{kind:"Name",value:"id"}},type:{kind:"NonNullType",type:{kind:"NamedType",name:{kind:"Name",value:"Int"}}},directives:[]}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userById"},arguments:[{kind:"Argument",name:{kind:"Name",value:"id"},value:{kind:"Variable",name:{kind:"Name",value:"id"}}}],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"username"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"firstName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"lastName"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"correo"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"profiles"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"userId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"countryId"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"fechaNacimiento"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"genero"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"foto"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"descripcion"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"edad"},arguments:[],directives:[]}]}}]}}]}}],loc:{start:0,end:263}};n.loc.source={body:"query userById($id: Int!){\n  userById (id: $id ) {\n    id\n    username\n    firstName\n    lastName\n    correo\n    profiles {\n        \tuserId\n        \tcountryId\n        \tfechaNacimiento\n        \tgenero\n        \tfoto\n        \tdescripcion\n        \tedad\n      }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};function r(e,t){if("FragmentSpread"===e.kind)t.add(e.name.value);else if("VariableDefinition"===e.kind){var n=e.type;"NamedType"===n.kind&&t.add(n.name.value)}e.selectionSet&&e.selectionSet.selections.forEach((function(e){r(e,t)})),e.variableDefinitions&&e.variableDefinitions.forEach((function(e){r(e,t)})),e.definitions&&e.definitions.forEach((function(e){r(e,t)}))}var i={};function o(e,t){for(var n=0;n<e.definitions.length;n++){var r=e.definitions[n];if(r.name&&r.name.value==t)return r}}function a(e,t){var n={kind:e.kind,definitions:[o(e,t)]};e.hasOwnProperty("loc")&&(n.loc=e.loc);var r=i[t]||new Set,a=new Set,s=new Set;r.forEach((function(e){s.add(e)}));while(s.size>0){var l=s;s=new Set,l.forEach((function(e){if(!a.has(e)){a.add(e);var t=i[e]||new Set;t.forEach((function(e){s.add(e)}))}}))}return a.forEach((function(t){var r=o(e,t);r&&n.definitions.push(r)})),n}(function(){n.definitions.forEach((function(e){if(e.name){var t=new Set;r(e,t),i[e.name.value]=t}}))})(),e.exports=n,e.exports["userById"]=a(n,"userById")},f366:function(e,t,n){"use strict";var r=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{attrs:{id:"userdata"}},[r("ApolloQuery",{attrs:{query:n("8713"),variables:{id:e.id},context:{headers:{Authorization:e.token}}},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.result,i=(n.loading,n.error,n.data);return[i?r("div",{staticClass:"result apollo",staticStyle:{display:"none"}},[e._v(e._s(e.user=i.userById)+" ")]):e._e()]}}])}),r("b-card",{staticClass:"mb-2",staticStyle:{"max-width":"20rem"},attrs:{"img-src":e.user.profiles[0].foto,"img-alt":"Image","img-top":"",tag:"article"},scopedSlots:e._u([{key:"header",fn:function(){return[r("a",{attrs:{href:"#"},on:{click:function(t){return e.$router.push({path:"/otherprofile/multimedia/"+e.user.id})}}},[e._v(" "+e._s(e.fullName)+" ")])]},proxy:!0}])},[r("b-card-body",[r("b-card-sub-title",{staticClass:"mb-2"},[e._v(e._s(e.user.username))])],1),r("FollowUser",{key:e.componentKey,attrs:{creatorId:Number(e.user.id)},on:{updated:e.forceRerender}})],1)],1)},i=[],o=(n("99af"),n("a9e3"),n("5530")),a=n("2f62"),s=n("2ce5"),l={name:"datauser",components:{FollowUser:s["a"]},props:{id:{type:Number,required:!0}},data:function(){return{componentKey:0,user:{id:"",firstName:"",lastName:"",profiles:[{}]}}},methods:{forceRerender:function(){this.componentKey+=1}},computed:Object(o["a"])({},Object(a["c"])({token:function(e){return e.token}}),{fullName:function(){return this.user.firstName.concat(" ",this.user.lastName)}})},u=l,d=n("2877"),c=Object(d["a"])(u,r,i,!1,null,null,null);t["a"]=c.exports}}]);
  //# sourceMappingURL=chunk-39756024.40ac1a1e.js.map