text: (window.webpackJsonp=window.webpackJsonp||[]).push([[7],{116:function(t,n,e){var i=e(117);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};e(4)(i,s);i.locals&&(t.exports=i.locals)},117:function(t,n,e){(t.exports=e(3)(!1)).push([t.i,"/** Ripples */\n/** Elements */\n.theme--light.v-input--switch .v-input--switch__thumb {\n  color: #FFFFFF;\n}\n.theme--light.v-input--switch .v-input--switch__track {\n  color: rgba(0, 0, 0, 0.38);\n}\n.theme--light.v-input--switch.v-input--is-disabled:not(.v-input--is-dirty) .v-input--switch__thumb {\n  color: #fafafa !important;\n}\n.theme--light.v-input--switch.v-input--is-disabled:not(.v-input--is-dirty) .v-input--switch__track {\n  color: rgba(0, 0, 0, 0.12) !important;\n}\n\n.theme--dark.v-input--switch .v-input--switch__thumb {\n  color: #bdbdbd;\n}\n.theme--dark.v-input--switch .v-input--switch__track {\n  color: rgba(255, 255, 255, 0.3);\n}\n.theme--dark.v-input--switch.v-input--is-disabled:not(.v-input--is-dirty) .v-input--switch__thumb {\n  color: #424242 !important;\n}\n.theme--dark.v-input--switch.v-input--is-disabled:not(.v-input--is-dirty) .v-input--switch__track {\n  color: rgba(255, 255, 255, 0.1) !important;\n}\n\n.v-input--switch__track, .v-input--switch__thumb {\n  background-color: currentColor;\n  pointer-events: none;\n  -webkit-transition: inherit;\n  transition: inherit;\n}\n.v-input--switch__track {\n  border-radius: 8px;\n  width: 36px;\n  height: 14px;\n  left: 2px;\n  position: absolute;\n  opacity: 0.6;\n  right: 2px;\n  top: calc(50% - 7px);\n}\n.v-input--switch__thumb {\n  border-radius: 50%;\n  top: calc(50% - 10px);\n  height: 20px;\n  position: relative;\n  width: 20px;\n  display: -webkit-box;\n  display: flex;\n  -webkit-box-pack: center;\n          justify-content: center;\n  -webkit-box-align: center;\n          align-items: center;\n  -webkit-transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n  transition: 0.3s cubic-bezier(0.25, 0.8, 0.5, 1);\n}\n.v-input--switch .v-input--selection-controls__input {\n  width: 38px;\n}\n.v-input--switch .v-input--selection-controls__ripple {\n  top: calc(50% - 24px);\n}\n.v-input--switch.v-input--dense .v-input--switch__thumb {\n  width: 18px;\n  height: 18px;\n}\n.v-input--switch.v-input--dense .v-input--switch__track {\n  height: 12px;\n  width: 32px;\n}\n.v-input--switch.v-input--dense.v-input--switch--inset .v-input--switch__track {\n  height: 22px;\n  width: 44px;\n  top: calc(50% - 12px);\n  left: -3px;\n}\n.v-input--switch.v-input--dense .v-input--selection-controls__ripple {\n  top: calc(50% - 22px);\n}\n.v-input--switch.v-input--is-dirty.v-input--is-disabled {\n  opacity: 0.6;\n}\n.v-application--is-ltr .v-input--switch .v-input--selection-controls__ripple {\n  left: -14px;\n}\n.v-application--is-ltr .v-input--switch.v-input--dense .v-input--selection-controls__ripple {\n  left: -12px;\n}\n.v-application--is-ltr .v-input--switch.v-input--is-dirty .v-input--selection-controls__ripple,\n.v-application--is-ltr .v-input--switch.v-input--is-dirty .v-input--switch__thumb {\n  -webkit-transform: translate(20px, 0);\n          transform: translate(20px, 0);\n}\n.v-application--is-rtl .v-input--switch .v-input--selection-controls__ripple {\n  right: -14px;\n}\n.v-application--is-rtl .v-input--switch.v-input--dense .v-input--selection-controls__ripple {\n  right: -12px;\n}\n.v-application--is-rtl .v-input--switch.v-input--is-dirty .v-input--selection-controls__ripple,\n.v-application--is-rtl .v-input--switch.v-input--is-dirty .v-input--switch__thumb {\n  -webkit-transform: translate(-20px, 0);\n          transform: translate(-20px, 0);\n}\n.v-input--switch:not(.v-input--switch--flat):not(.v-input--switch--inset) .v-input--switch__thumb {\n  box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12);\n}\n.v-input--switch--inset .v-input--switch__track,\n.v-input--switch--inset .v-input--selection-controls__input {\n  width: 48px;\n}\n.v-input--switch--inset .v-input--switch__track {\n  border-radius: 14px;\n  height: 28px;\n  left: -4px;\n  opacity: 0.32;\n  top: calc(50% - 14px);\n}\n.v-application--is-ltr .v-input--switch--inset .v-input--selection-controls__ripple,\n.v-application--is-ltr .v-input--switch--inset .v-input--switch__thumb {\n  -webkit-transform: translate(0, 0) !important;\n          transform: translate(0, 0) !important;\n}\n.v-application--is-ltr .v-input--switch--inset.v-input--is-dirty .v-input--selection-controls__ripple,\n.v-application--is-ltr .v-input--switch--inset.v-input--is-dirty .v-input--switch__thumb {\n  -webkit-transform: translate(20px, 0) !important;\n          transform: translate(20px, 0) !important;\n}\n.v-application--is-rtl .v-input--switch--inset .v-input--selection-controls__ripple,\n.v-application--is-rtl .v-input--switch--inset .v-input--switch__thumb {\n  -webkit-transform: translate(-6px, 0) !important;\n          transform: translate(-6px, 0) !important;\n}\n.v-application--is-rtl .v-input--switch--inset.v-input--is-dirty .v-input--selection-controls__ripple,\n.v-application--is-rtl .v-input--switch--inset.v-input--is-dirty .v-input--switch__thumb {\n  -webkit-transform: translate(-26px, 0) !important;\n          transform: translate(-26px, 0) !important;\n}",""])},118:function(t,n,e){"use strict";var i=e(42);e.n(i).a},119:function(t,n,e){(t.exports=e(3)(!1)).push([t.i,"\n.user-approval[data-v-3d23e393] {\n    overflow: auto;\n    white-space: nowrap;\n}\n.refused[data-v-3d23e393] {\n    background-color: rgba(255, 223, 1, 0.5);\n}\n",""])},120:function(t,n,e){"use strict";var i=e(43);e.n(i).a},121:function(t,n,e){(t.exports=e(3)(!1)).push([t.i,"\n.v-content[data-v-d5fb6a60] {\n    background: #f8f9fa;\n}\n.v-subheader[data-v-d5fb6a60] {\n    padding-left: 0;\n}\n.v-input .v-label[data-v-d5fb6a60] {\n    margin: 0;\n}\n.result-item[data-v-d5fb6a60] {\n    border-radius: 4px;\n}\n.gold[data-v-d5fb6a60] {\n    background-color: #f1bd5f;\n}\n.silver[data-v-d5fb6a60] {\n    background-color: #ababab;\n}\n.bronze[data-v-d5fb6a60] {\n    background-color: #e38f59;\n}\n",""])},122:function(t,n,e){"use strict";var i=e(44);e.n(i).a},123:function(t,n,e){(t.exports=e(3)(!1)).push([t.i,"\n.transition-title[data-v-6301de0e] {\n    word-break: break-word;\n    text-align: left;\n    opacity: 1;\n}\n",""])},335:function(t,n,e){"use strict";e.r(n);var i=e(60),s=e(328),a=e(94),r=e(68),o=e(69),c=e(36),l=e(71),u=e(32),p=e(72),d=e(63),v=e(64),h=e(62),m=e(70),_=e(346),f={name:"ScattLobby",components:{VCard:i.a,VCardTitle:s.d,VCardActions:s.a,VBtn:a.a,VIcon:r.a,VCardText:s.c,VList:o.a,VListItem:c.a,VListItemAction:l.a,VListItemIcon:u.a,VListItemContent:p.a,VListItemTitle:p.c,VDivider:d.a,VSubheader:v.a,VListItemSubtitle:p.b,VChip:h.a,VAvatar:m.a,VSpacer:_.a},computed:{stateUser:function(){return this.$store.state.user.data},stateGame:function(){return this.$store.state.scattGame.data},isInGame:function(){var t=this;return this.$store.state.scattGame.data.users.filter((function(n){return n.id===t.stateUser.id})).length},facebookUrl:function(){return"fb-messenger://share/?link="+window.location.href+"&app_id=509740746484749"}},methods:{apiJoinGame:function(){this.$axios.post("/scatt/games/"+this.stateGame.id+"/join",null,{params:{api_token:window.userApiToken}}).then((function(t){console.log(t)}))},apiStartGame:function(){this.$axios.post("/scatt/games/"+this.stateGame.id+"/start",null,{params:{api_token:window.userApiToken}}).then((function(t){console.log(t)}))},copyUrl:function(){var t=document.getElementById("gameUrl");t.select(),t.setSelectionRange(0,99999),document.execCommand("copy")}}},w=e(8),b=Object(w.a)(f,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{attrs:{id:"scatt-lobby"}},[e("v-card",{staticClass:"mb-4",attrs:{color:"accent"}},[e("v-card-title",[t._v("Partie "+t._s(t.stateGame.id))]),t._v(" "),e("v-card-actions",[e("v-btn",{attrs:{icon:"",href:t.facebookUrl}},[e("v-icon",[t._v("mdi-facebook-messenger")])],1),t._v(" "),e("v-btn",{attrs:{icon:""},on:{click:t.copyUrl}},[e("v-icon",[t._v("mdi-content-copy")])],1)],1)],1),t._v(" "),e("v-card",{staticClass:"mb-4",attrs:{color:"white"}},[e("v-card-title",[t._v("Renseignements sur la partie")]),t._v(" "),e("v-card-text",[e("v-list",[e("v-list-item",[e("v-list-item-icon",[e("v-icon",[t._v("mdi-timer")])],1),t._v(" "),e("v-list-item-content",[0===t.stateGame.timer?e("v-list-item-title",[t._v("\n                            Sans limite\n                        ")]):1<t.stateGame.timer<59?e("v-list-item-title",[t._v("\n                            "+t._s(t.stateGame.timer)+" secondes\n                        ")]):e("v-list-item-title",[t._v("\n                            "+t._s(t.stateGame.timer/60)+" minute(s)\n                        ")])],1)],1),t._v(" "),e("v-list-item",[e("v-list-item-icon",[e("v-icon",[t._v("mdi-gamepad-square")])],1),t._v(" "),e("v-list-item-content",[e("v-list-item-title",[t._v("\n                            "+t._s(t.stateGame.rounds&&t.stateGame.rounds.length)+" rondes\n                        ")])],1)],1),t._v(" "),e("v-divider"),t._v(" "),e("v-subheader",[t._v("Catégories")]),t._v(" "),t._l(t.stateGame.categories,(function(n){return e("v-list-item",{key:n.id},[e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(n.title))]),t._v(" "),n.rules?e("v-list-item-subtitle",[t._v(t._s(n.rules))]):t._e()],1)],1)}))],2)],1),t._v(" "),e("v-card-actions",[t.stateGame.userId==t.stateUser.id?e("v-btn",{attrs:{color:"primary"},on:{click:t.apiStartGame}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-play")]),t._v("\n                Démarrer\n            ")],1):t._e()],1)],1),t._v(" "),e("v-card",{attrs:{color:"white"}},[e("v-card-title",[t._v("Joueurs")]),t._v(" "),e("v-card-text",t._l(t.stateGame.users,(function(n){return e("v-chip",{key:n.id,staticClass:"mr-2 mb-1",style:{cyan:n.id==t.stateGame.userId}},[e("v-avatar",{attrs:{left:""}},[e("img",{attrs:{src:n.avatar,alt:n.name}})]),t._v("\n                "+t._s(n.name)+"\n            ")],1)})),1),t._v(" "),e("v-card-actions",[t.isInGame?t._e():e("v-btn",{attrs:{color:"success"},on:{click:t.apiJoinGame}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-account-plus")]),t._v("\n                Rejoindre la partie\n            ")],1)],1)],1),t._v(" "),e("input",{attrs:{type:"hidden",id:"gameUrl"},domProps:{value:"https://gtgames.com/#/scatt-game/"+t.stateGame.id}})],1)}),[],!1,null,"5f5019ae",null).exports,g=e(18),x={name:"ScattRound",components:{VCard:i.a,VCardTitle:s.d,VCardText:s.c,VTextField:g.a,VBtn:a.a},computed:{stateCategories:function(){return this.$store.state.scattGame.data.categories},stateRound:function(){return this.$store.state.scattGame.activeRound},stateRoundAnswers:{get:function(){return this.$store.state.scattGame.roundAnswers},set:function(t){this.$store.commit("scattGame/setRoundAnswers",t)}},isInGame:function(){var t=this;return this.$store.state.scattGame.data.users.filter((function(n){return n.id===t.stateUser.id})).length}},data:function(){return{stopLoading:!1}},methods:{apiStopRound:function(){var t=this;this.stopLoading=!0,this.$axios.post("/scatt/rounds/"+this.stateRound.id+"/stop",null,{params:{api_token:window.userApiToken}}).then((function(n){console.log(n),t.stopLoading=!1}))}}},k=Object(w.a)(x,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{attrs:{id:"scatt-round"}},[e("v-card",{staticClass:"mb-4",attrs:{color:"cyan"}},[e("v-card-title",[t._v("Lettre "+t._s(t.stateRound.letter))])],1),t._v(" "),e("v-card",{staticClass:"mb-4"},[e("v-card-title",[t._v("Go!")]),t._v(" "),e("v-card-text",t._l(t.stateCategories,(function(n){return e("v-text-field",{key:n.id,attrs:{label:n.title},model:{value:t.stateRoundAnswers[n.id],callback:function(e){t.$set(t.stateRoundAnswers,n.id,e)},expression:"stateRoundAnswers[category.id]"}})})),1)],1),t._v(" "),e("v-btn",{staticClass:"mb-4",attrs:{block:"",color:"error","x-large":"",loading:t.stopLoading},on:{click:t.apiStopRound}},[t._v("Arrêter")])],1)}),[],!1,null,"5c8b9110",null).exports,A=e(15),C=(e(78),e(116),e(48)),R=e(12),y=e(50),$=e(21),G=e(35),S=e(0),V=C.a.extend({name:"v-switch",directives:{Touch:y.a},props:{inset:Boolean,loading:{type:[Boolean,String],default:!1},flat:{type:Boolean,default:!1}},computed:{classes(){return{...R.a.options.computed.classes.call(this),"v-input--selection-controls v-input--switch":!0,"v-input--switch--flat":this.flat,"v-input--switch--inset":this.inset}},attrs(){return{"aria-checked":String(this.isActive),"aria-disabled":String(this.disabled),role:"switch"}},validationState(){return this.hasError&&this.shouldValidate?"error":this.hasSuccess?"success":null!==this.hasColor?this.computedColor:void 0},switchData(){return this.setTextColor(this.loading?void 0:this.validationState,{class:this.themeClasses})}},methods:{genDefaultSlot(){return[this.genSwitch(),this.genLabel()]},genSwitch(){return this.$createElement("div",{staticClass:"v-input--selection-controls__input"},[this.genInput("checkbox",{...this.attrs,...this.attrs$}),this.genRipple(this.setTextColor(this.validationState,{directives:[{name:"touch",value:{left:this.onSwipeLeft,right:this.onSwipeRight}}]})),this.$createElement("div",{staticClass:"v-input--switch__track",...this.switchData}),this.$createElement("div",{staticClass:"v-input--switch__thumb",...this.switchData},[this.genProgress()])])},genProgress(){return this.$createElement($.c,{},[!1===this.loading?null:this.$slots.progress||this.$createElement(G.a,{props:{color:!0===this.loading||""===this.loading?this.color||"primary":this.loading,size:16,width:2,indeterminate:!0}})])},onSwipeLeft(){this.isActive&&this.onChange()},onSwipeRight(){this.isActive||this.onChange()},onKeydown(t){(t.keyCode===S.s.left&&this.isActive||t.keyCode===S.s.right&&!this.isActive)&&this.onChange()}}}),I={name:"ScattAnswers",components:{VAvatar:m.a,VBtn:a.a,VCard:i.a,VCardActions:s.a,VCardText:s.c,VCardTitle:s.d,VChip:h.a,VIcon:r.a,VSheet:A.a,VSpacer:_.a,VSwitch:V},computed:{isMod:function(){return this.$store.state.user.data.id==this.$store.state.scattGame.data.userId},stateCategories:function(){return this.$store.state.scattGame.data.categories},stateReceivedAnswers:function(){return this.$store.state.scattGame.receivedAnswers},stateRound:function(){return this.$store.state.scattGame.activeRound},stateRoundApproval:function(){return this.$store.state.scattGame.roundApproval},statePlayers:function(){return this.$store.state.scattGame.data.users}},data:function(){return{selfAcceptedAnswers:[],selfRoundAccepted:!1,loadingComplete:!1}},methods:{apiConfirmRound:function(t){var n=this;this.selfRoundAccepted=!0,this.$axios.post("/scatt/rounds/"+this.stateRound.id+"/confirm",{api_token:window.userApiToken,confirmed:t}).then((function(e){n.selfRoundAccepted=t,console.log(e)}))},apiContinueRound:function(){this.$axios.post("/scatt/rounds/"+this.stateRound.id+"/continue",{api_token:window.userApiToken}).then((function(t){console.log(t)}))},apiAcceptAnswer:function(t){this.$axios.post("/scatt/answers/"+t+"/accept",{api_token:window.userApiToken,accept:this.selfAcceptedAnswers[t]}).then((function(t){console.log(t)}))},launchSearch:function(t,n){window.open("https://google.com/search?q="+t+"+"+n,"_blank").focus()}},mounted:function(){var t=this;this.$axios.get("/scatt/rounds/"+this.stateRound.id+"/answers",{params:{api_token:window.userApiToken}}).then((function(n){t.$store.commit("scattGame/setReceivedAnswers",n.data.data),n.data.data.forEach((function(n){t.selfAcceptedAnswers[n.id]=n.approval[t.$store.state.user.data.id]})),t.loadingComplete=!0})),this.stateRoundApproval[this.stateRound.id][this.$store.state.user.data.id]&&(this.selfRoundAccepted=!0)}},T=(e(118),Object(w.a)(I,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{attrs:{id:"scatt-round"}},[e("v-card",{staticClass:"mb-4",attrs:{color:"cyan"}},[e("v-card-title",[t._v("Réponses pour la lettre "+t._s(t.stateRound.letter))])],1),t._v(" "),t._l(t.stateCategories,(function(n){return t.loadingComplete?e("v-card",{key:n.id,staticClass:"mb-4",attrs:{loading:t.selfRoundAccepted}},[e("v-card-title",[t._v(t._s(n.title))]),t._v(" "),t.stateReceivedAnswers[n.id].items?e("v-card-text",t._l(t.stateReceivedAnswers[n.id].items,(function(i){return e("v-sheet",{key:i.id,staticClass:"px-2 pb-2 mb-2",class:{refused:!i.approved},attrs:{width:"100%"}},[e("div",{staticClass:"d-flex"},[e("v-avatar",{staticClass:"mr-2 align-self-center",attrs:{size:"36px"}},[e("img",{attrs:{src:i.user.avatar,alt:i.user.name}})]),t._v(" "),e("div",{staticClass:"align-self-center"},[e("b",[t._v(t._s(i.user.name))]),e("br"),t._v(" "),e("span",[t._v("\n                            "+t._s(i.content)+"\n                            "),e("v-btn",{attrs:{icon:""},on:{click:function(e){return t.launchSearch(n.title,i.content)}}},[e("v-icon",[t._v("mdi-magnify")])],1)],1)]),t._v(" "),e("div",{staticClass:"align-self-center ml-auto"},[e("v-switch",{on:{change:function(n){return t.apiAcceptAnswer(i.id)}},model:{value:t.selfAcceptedAnswers[i.id],callback:function(n){t.$set(t.selfAcceptedAnswers,i.id,n)},expression:"selfAcceptedAnswers[answer.id]"}})],1)],1),t._v(" "),e("div",{staticClass:"user-approval"},t._l(t.statePlayers,(function(n){return e("v-chip",{key:n.id,staticClass:"mr-2",attrs:{small:""}},[i.approval[n.id]?e("v-icon",{attrs:{left:"",color:"success"}},[t._v("\n                            mdi-check\n                        ")]):e("v-icon",{attrs:{left:"",color:"red"}},[t._v("mdi-close")]),t._v("\n                        "+t._s(n.name.split(" ")[0])+"\n                    ")],1)})),1)])})),1):e("v-card-text",[t._v("Aucune réponse pour cette catégorie!")])],1):t._e()})),t._v(" "),e("v-card",[e("v-card-title",[t._v("Confirmation des réponses")]),t._v(" "),e("v-card-text",t._l(t.statePlayers,(function(n){return t.stateRoundApproval[t.stateRound.id]?e("v-chip",{key:n.id,staticClass:"mr-2 mb-2"},[t.stateRoundApproval[t.stateRound.id][n.id]?e("v-icon",{attrs:{left:"",color:"success"}},[t._v("\n                    mdi-check\n                ")]):e("v-icon",{attrs:{left:"",color:"red"}},[t._v("mdi-close")]),t._v("\n                "+t._s(n.name)+"\n            ")],1):t._e()})),1),t._v(" "),e("v-card-actions",[e("v-btn",{attrs:{color:"secondary"},on:{click:function(n){return t.apiConfirmRound(!t.selfRoundAccepted)}}},[t.selfRoundAccepted?e("v-icon",{attrs:{left:""}},[t._v("mdi-cancel")]):e("v-icon",{attrs:{left:""}},[t._v("mdi-send-check")]),t._v(" "),t.selfRoundAccepted?e("span",[t._v("Annuler")]):e("span",[t._v("Confirmer")])],1),t._v(" "),e("v-spacer"),t._v(" "),t.selfRoundAccepted&&t.isMod?e("v-btn",{attrs:{color:"primary",text:""},on:{click:function(n){return t.apiContinueRound()}}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-transfer-right")]),t._v("\n                Poursuivre\n            ")],1):t._e()],1)],1)],2)}),[],!1,null,"3d23e393",null).exports),L=e(73),E={name:"ScattResults",components:{VCard:i.a,VCardTitle:s.d,VCardText:s.c,VList:o.a,VListItem:c.a,VListItemAvatar:L.a,VListItemContent:p.a,VListItemTitle:p.c,VListItemSubtitle:p.b,VListItemAction:l.a,VIcon:r.a,VCardActions:s.a,VBtn:a.a},data:function(){return{rank:[]}},mounted:function(){var t=this;this.$axios.get("/scatt/games/"+this.$store.state.scattGame.data.id+"/results",{params:{api_token:window.userApiToken}}).then((function(n){n.data.data.users.forEach((function(e){e.gameReputation=n.data.data.reputation[e.id],t.rank.push(e)})),t.rank.sort((function(t,n){var e=0;return t.gameReputation>n.gameReputation&&(e=-1),n.gameReputation>t.gameReputation&&(e=1),e})),t.rank.forEach((function(n){var e="";t.rank[0]===n&&(e="gold"),t.rank[1]===n&&(e="silver"),t.rank[2]===n&&(e="bronze"),n.color=e}))}))}},D=(e(120),{name:"ScattGame",components:{ScattLobby:b,ScattRound:k,ScattAnswers:T,ScattResults:Object(w.a)(E,(function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("v-card",[e("v-card-title",[t._v("Résultats")]),t._v(" "),e("v-card-text",[e("v-list",t._l(t.rank,(function(n){return e("v-list-item",{key:n.id,staticClass:"mb-2 result-item",class:n.color},[e("v-list-item-avatar",[e("img",{attrs:{src:n.avatar,alt:n.name}})]),t._v(" "),e("v-list-item-content",[e("v-list-item-title",[t._v(t._s(n.name))]),t._v(" "),e("v-list-item-subtitle",[t._v("\n                        "+t._s(n.gameReputation)+" points\n                    ")])],1),t._v("m\n                "),t.rank[0]===n?e("v-list-item-action",[e("v-icon",[t._v("\n                        mdi-trophy-variant\n                    ")])],1):t._e()],1)})),1)],1),t._v(" "),e("v-card-actions",[e("v-btn",{attrs:{color:"primary",to:"/scatt/create"}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-autorenew")]),t._v("\n            Nouvelle partie\n        ")],1),t._v(" "),e("v-btn",{attrs:{color:"secondary",text:"",to:"/"}},[e("v-icon",{attrs:{left:""}},[t._v("mdi-home")]),t._v("\n            Accueil\n        ")],1)],1)],1)}),[],!1,null,"d5fb6a60",null).exports,VCard:i.a,VCardTitle:s.d},computed:{currentStateComponent:function(){return"scatt-"+this.$store.state.scattGame.data.currentState},stateGame:function(){return this.$store.state.scattGame.data},stateRoundAnswers:function(){return this.$store.state.scattGame.roundAnswers},stateUser:function(){return this.$store.state.user.data}},data:function(){return{transitionData:{active:!1,user:"",reason:"(de sa faute)"}}},mounted:function(){var t=this;this.$axios.get("/scatt/games/"+this.$route.params.id,{params:{api_token:window.userApiToken}}).then((function(n){t.$store.commit("scattGame/setGame",n.data.data),n.data.data.activeRound&&t.$store.commit("scattGame/setActiveRound",n.data.data.activeRound)})),this.$echo.channel("scatt-"+this.$route.params.id).listen(".App\\Events\\Scatt\\PlayerList",(function(n){t.$store.commit("scattGame/setPlayers",n)})).listen(".App\\Events\\Scatt\\ChangeState",(function(n){t.transitionData.user=n.responsibleUser,t.transitionData.active=!0,setTimeout((function(){t.$store.commit("scattGame/setActiveRound",n.newRound),t.$store.commit("scattGame/setState",n.newState),t.transitionData.active=!1}),1e3*n.transitionTime)})).listen(".App\\Events\\Scatt\\SendAnswers",(function(n){t.$axios.post("/scatt/answers/massStore",{api_token:window.userApiToken,roundId:n.roundId,answers:t.stateRoundAnswers}).then((function(t){console.log(t)}))})).listen(".App\\Events\\Scatt\\AnswersList",(function(n){t.$store.commit("scattGame/setUpdatedReceivedAnswers",n)})).listen(".App\\Events\\Scatt\\RoundApproval",(function(n){t.$store.commit("scattGame/setRoundApproval",n)}))}}),U=(e(122),Object(w.a)(D,(function(){var t=this.$createElement,n=this._self._c||t;return n("div",{attrs:{id:"scatt"}},[this.transitionData.active?n("v-card",{staticClass:"mb-4 text-center",attrs:{color:"white",loading:"cyan"}},[n("v-card-title",{staticClass:"transition-title"},[this._v(this._s(this.transitionData.user)+" "+this._s(this.transitionData.reason))])],1):n("div",[n(this.currentStateComponent,{tag:"component"})],1)],1)}),[],!1,null,"6301de0e",null));n.default=U.exports},42:function(t,n,e){var i=e(119);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};e(4)(i,s);i.locals&&(t.exports=i.locals)},43:function(t,n,e){var i=e(121);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};e(4)(i,s);i.locals&&(t.exports=i.locals)},44:function(t,n,e){var i=e(123);"string"==typeof i&&(i=[[t.i,i,""]]);var s={hmr:!0,transform:void 0,insertInto:void 0};e(4)(i,s);i.locals&&(t.exports=i.locals)}}]);