{"version":3,"sources":["webpack:///./src/views/seminars/components/VideoRatings.vue?b474","webpack:///./src/views/seminars/components/VideoRatings.vue?f4b5","webpack:///./src/views/seminars/components/VideoRatings.vue","webpack:///./src/views/seminars/components/VideoRatings.vue?319f","webpack:///./src/views/seminars/components/VideoRatings.vue?502a"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","class","selected","hasRated","on","$event","stopPropagation","rate","_v","_s","$t","_e","VTooltip","attrs","scopedSlots","_u","key","fn","ref","_g","isLoading","VProgressCircular","countRatings","VBtn","openRatings","VDialog","model","value","callback","$$v","ratingsDialog","expression","VCard","selectedType","shown","ratings","length","VList","_l","r","i","VListItem","getUser","rater","_f","createdAt","staticRenderFns","VideoRatings","rateLoading","typeLoading","submission","userId","isShared","isRateable","type","id","rateVideo","submissionId","$emit","videoRatings","filter","x","some","u","users","find","username","email","seminar","owner","Vue","__decorate","Prop","default","Getter","Action","Component","components","VideoPlayer","component"],"mappings":"yIAAA,W,yJCaIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACA,EAAG,MAAM,CAACE,YAAY,iCAAiC,CAACF,EAAG,MAAM,CAACE,YAAY,gBAAgBC,MAAM,CAAEC,SAAUR,EAAIS,SAAS,YAAaC,GAAG,CAAC,MAAQ,SAASC,GAAiC,OAAzBA,EAAOC,kBAAyBZ,EAAIa,KAAK,cAAc,CAAEb,EAAY,SAAEI,EAAG,OAAO,CAACE,YAAY,QAAQ,CAACN,EAAIc,GAAG,IAAId,EAAIe,GAAGf,EAAIgB,GAAG,6BAA6B,OAAOhB,EAAIiB,KAAMjB,EAAY,SAAEI,EAAG,OAAO,CAACE,YAAY,QAAQ,CAACN,EAAIc,GAAG,QAAQV,EAAGc,EAAA,KAAS,CAACC,MAAM,CAAC,IAAM,IAAIC,YAAYpB,EAAIqB,GAAG,CAAC,CAACC,IAAI,YAAYC,GAA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,aAAKH,EAAEI,MAAK,KAJ1BZ,KAAmB,QAAjB,EAAK5D,KAAKyE,eAAO,OAAO,QAAP,EAAZ,EAAcC,aAAK,WAAP,EAAZ,EAAqBd,IACvB,GAAP,OAAU5D,KAAKyE,QAAQC,MAAMH,SAAQ,aAAKvE,KAAKyE,QAAQC,MAAMF,MAAK,aAC7D,OAGV,EArF8B,CAASG,cACRC,gBAA/BC,eAAK,CAAEC,QAAS,kBAAM,MAAQ,+BACKF,gBAAnCC,eAAK,CAAEC,QAAS,gBAAkB,8BACCF,gBAAnCC,eAAK,CAAEC,QAAS,gBAAkB,iCACbF,gBAArBG,eAAO,eAAa,6BACKH,gBAAzBG,eAAO,mBAAiB,4BAEzBH,gBADCI,eAAO,uBAAqB,gCANV5B,EAAY,gBADhC6B,eAAU,CAAEC,WAAY,CAAEC,uBACN/B,WC3KsZ,I,wBCQvagC,EAAY,eACd,EACAtF,EACAqD,GACA,EACA,KACA,WACA,MAIa,aAAAiC,E","file":"assets/js/chunk-53c626be.82368b31.js","sourcesContent":["export * from \"-!../../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--9-oneOf-1-0!../../../../node_modules/css-loader/dist/cjs.js??ref--9-oneOf-1-1!../../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../../node_modules/postcss-loader/src/index.js??ref--9-oneOf-1-2!../../../../node_modules/sass-loader/dist/cjs.js??ref--9-oneOf-1-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VideoRatings.vue?vue&type=style&index=0&id=da0e81ac&prod&lang=scss&scoped=true&\"","import { VBtn } from 'vuetify/lib/components/VBtn';\nimport { VCard } from 'vuetify/lib/components/VCard';\nimport { VCardText } from 'vuetify/lib/components/VCard';\nimport { VCardTitle } from 'vuetify/lib/components/VCard';\nimport { VDialog } from 'vuetify/lib/components/VDialog';\nimport { VList } from 'vuetify/lib/components/VList';\nimport { VListItem } from 'vuetify/lib/components/VList';\nimport { VListItemContent } from 'vuetify/lib/components/VList';\nimport { VListItemSubtitle } from 'vuetify/lib/components/VList';\nimport { VListItemTitle } from 'vuetify/lib/components/VList';\nimport { VProgressCircular } from 'vuetify/lib/components/VProgressCircular';\nimport { VTooltip } from 'vuetify/lib/components/VTooltip';\n\nvar render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',[_c('div',{staticClass:\"d-flex flex-wrap align-center\"},[_c('div',{staticClass:\"rating-button\",class:{ selected: _vm.hasRated('amusing') },on:{\"click\":function($event){$event.stopPropagation();return _vm.rate('amusing')}}},[(_vm.extended)?_c('span',{staticClass:\"text\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"seminars.ratings.amusing\"))+\" \")]):_vm._e(),(_vm.extended)?_c('span',{staticClass:\"icon\"},[_vm._v(\"😮\")]):_c(VTooltip,{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('span',_vm._g({staticClass:\"icon\"},on),[_vm._v(\"😮\")])]}}])},[_c('span',[_vm._v(_vm._s(_vm.$t(\"seminars.ratings.amusing\")))])]),(_vm.isLoading('amusing'))?_c(VProgressCircular,{attrs:{\"indeterminate\":\"\",\"size\":\"16\",\"width\":\"2\"}}):_c('div',[_vm._v(_vm._s(_vm.countRatings(\"amusing\")))])],1),_c('div',{staticClass:\"rating-button\",class:{ selected: _vm.hasRated('creative') },on:{\"click\":function($event){$event.stopPropagation();return _vm.rate('creative')}}},[(_vm.extended)?_c('span',{staticClass:\"text\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"seminars.ratings.creative\"))+\" \")]):_vm._e(),(_vm.extended)?_c('span',{staticClass:\"icon\"},[_vm._v(\"🎨\")]):_c(VTooltip,{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('span',_vm._g({staticClass:\"icon\"},on),[_vm._v(\"🎨\")])]}}])},[_c('span',[_vm._v(_vm._s(_vm.$t(\"seminars.ratings.creative\")))])]),(_vm.isLoading('creative'))?_c(VProgressCircular,{attrs:{\"indeterminate\":\"\",\"size\":\"16\",\"width\":\"2\"}}):_c('div',[_vm._v(_vm._s(_vm.countRatings(\"creative\")))])],1),_c('div',{staticClass:\"rating-button\",class:{ selected: _vm.hasRated('professional') },on:{\"click\":function($event){$event.stopPropagation();return _vm.rate('professional')}}},[(_vm.extended)?_c('span',{staticClass:\"text\"},[_vm._v(\" \"+_vm._s(_vm.$t(\"seminars.ratings.professional\"))+\" \")]):_vm._e(),(_vm.extended)?_c('span',{staticClass:\"icon\"},[_vm._v(\"💼\")]):_c(VTooltip,{attrs:{\"top\":\"\"},scopedSlots:_vm._u([{key:\"activator\",fn:function(ref){\nvar on = ref.on;\nreturn [_c('span',_vm._g({staticClass:\"icon\"},on),[_vm._v(\"💼\")])]}}])},[_c('span',[_vm._v(_vm._s(_vm.$t(\"seminars.ratings.professional\")))])]),(_vm.isLoading('professional'))?_c(VProgressCircular,{attrs:{\"indeterminate\":\"\",\"size\":\"16\",\"width\":\"2\"}}):_c('div',[_vm._v(_vm._s(_vm.countRatings(\"professional\")))])],1),(_vm.extended)?_c(VBtn,{staticClass:\"ml-4\",attrs:{\"text\":\"\",\"small\":\"\"},on:{\"click\":_vm.openRatings}},[_c('span',[_vm._v(\"Details\")])]):_vm._e()],1),(_vm.extended)?_c(VDialog,{attrs:{\"max-width\":\"600px\"},model:{value:(_vm.ratingsDialog),callback:function ($$v) {_vm.ratingsDialog=$$v},expression:\"ratingsDialog\"}},[_c(VCard,{attrs:{\"outlined\":\"\"}},[_c(VCardTitle,[_vm._v(\"Ratings for this video\")]),_c(VCardText,[_c('div',{staticClass:\"ratings-toggle\"},[_c('div',{staticClass:\"tab-wrapper mr-4\"},[_c('div',{staticClass:\"tab\",on:{\"click\":function($event){_vm.selectedType = ''}}},[_c('div',[_vm._v(\"All\")])]),_c('div',{staticClass:\"indicator\",class:{ shown: _vm.selectedType === '' }})]),_c('div',{staticClass:\"tab-wrapper mr-4\"},[_c('div',{staticClass:\"tab\",on:{\"click\":function($event){_vm.selectedType = 'amusing'}}},[_c('span',{staticClass:\"icon\"},[_vm._v(\"😮\")]),_c('div',[_vm._v(_vm._s(_vm.countRatings(\"amusing\")))])]),_c('div',{staticClass:\"indicator\",class:{ shown: _vm.selectedType === 'amusing' }})]),_c('div',{staticClass:\"tab-wrapper mr-4\"},[_c('div',{staticClass:\"tab\",on:{\"click\":function($event){_vm.selectedType = 'creative'}}},[_c('span',{staticClass:\"icon\"},[_vm._v(\"🎨\")]),_c('div',[_vm._v(_vm._s(_vm.countRatings(\"creative\")))])]),_c('div',{staticClass:\"indicator\",class:{ shown: _vm.selectedType === 'creative' }})]),_c('div',{staticClass:\"tab-wrapper\"},[_c('div',{staticClass:\"tab\",on:{\"click\":function($event){_vm.selectedType = 'professional'}}},[_c('span',{staticClass:\"icon\"},[_vm._v(\"💼\")]),_c('div',[_vm._v(_vm._s(_vm.countRatings(\"professional\")))])]),_c('div',{staticClass:\"indicator\",class:{ shown: _vm.selectedType === 'professional' }})])]),(!_vm.ratings.length)?_c('div',[_vm._v(\"None\")]):_c('div',[_c(VList,_vm._l((_vm.filteredRatigns),function(r,i){return _c(VListItem,{key:i},[_c(VListItemContent,[_c(VListItemTitle,[_vm._v(_vm._s(_vm.getUser(r.rater)))]),_c(VListItemSubtitle,[_vm._v(\" \"+_vm._s(_vm._f(\"formatwithtime\")(r.createdAt))+\" \")]),(_vm.selectedType === '')?_c(VListItemSubtitle,[_vm._v(\" \"+_vm._s(_vm.$t((\"seminars.ratings.\" + (r.type))))+\" \")]):_vm._e()],1)],1)}),1)],1)])],1)],1):_vm._e()],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\nimport Vue from \"vue\";\r\nimport { Action, Getter } from \"vuex-class\";\r\nimport { Component, Prop } from \"vue-property-decorator\";\r\n\r\nimport {\r\n RateVideoAction,\r\n Rating,\r\n Seminar,\r\n SimpleUser,\r\n Submission,\r\n} from \"@/core/models\";\r\nimport VideoPlayer from \"@/components/common/VideoPlayer.vue\";\r\n\r\n@Component({ components: { VideoPlayer } })\r\nexport default class VideoRatings extends Vue {\r\n @Prop({ default: () => false }) extended!: boolean;\r\n @Prop({ default: () => undefined }) seminar?: Seminar;\r\n @Prop({ default: () => undefined }) submission?: Submission;\r\n @Getter(\"profile/id\") userId!: string;\r\n @Getter(\"seminars/users\") users!: SimpleUser[];\r\n @Action(\"seminars/rateVideo\")\r\n rateVideo!: (d: RateVideoAction) => Promise;\r\n\r\n get ownSub() {\r\n return this.submission?.userId === this.userId;\r\n }\r\n\r\n get isShared() {\r\n return (this.submission as any).isShared || false;\r\n }\r\n\r\n get isRateable() {\r\n return (this.submission as any).isRateable || false;\r\n }\r\n\r\n rateLoading = false;\r\n typeLoading = \"\";\r\n async rate(type: string) {\r\n if (\r\n !this.submission?.id ||\r\n this.rateLoading ||\r\n this.submission.type === \"watch_feedback\"\r\n )\r\n return;\r\n\r\n this.rateLoading = true;\r\n this.typeLoading = type;\r\n await this.rateVideo({\r\n submissionId: this.submission.id,\r\n type,\r\n });\r\n this.$emit(\"rated\", {\r\n submissionId: this.submission.id,\r\n type,\r\n });\r\n this.typeLoading = \"\";\r\n this.rateLoading = false;\r\n }\r\n\r\n isLoading(type: string) {\r\n return this.rateLoading && this.typeLoading === type;\r\n }\r\n\r\n countRatings(type: string) {\r\n const ratings = (this.submission as any)?.videoRatings as\r\n | Rating[]\r\n | undefined;\r\n if (!ratings?.length) return 0;\r\n return ratings.filter(x => x.type === type).length;\r\n }\r\n\r\n hasRated(type: string) {\r\n const ratings = (this.submission as any)?.videoRatings as\r\n | Rating[]\r\n | undefined;\r\n if (!ratings?.length) return false;\r\n return ratings.some(x => x.type === type && x.rater === this.userId);\r\n }\r\n\r\n selectedType = \"\";\r\n ratingsDialog = false;\r\n ratings: Rating[] = [];\r\n openRatings() {\r\n if (!this.submission) return;\r\n this.ratingsDialog = true;\r\n this.ratings = (this.submission as any).videoRatings;\r\n }\r\n get filteredRatigns() {\r\n if (!this.selectedType) return this.ratings;\r\n return this.ratings.filter(x => x.type === this.selectedType);\r\n }\r\n getUser(id: string) {\r\n const u = this.users.find(x => x.id === id);\r\n if (!u) {\r\n if (id === this.seminar?.owner?.id)\r\n return `${this.seminar.owner.username} (${this.seminar.owner.email}) - Owner`;\r\n return \"\";\r\n }\r\n return `${u.username} (${u.email})`;\r\n }\r\n}\r\n","import mod from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VideoRatings.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../../../node_modules/cache-loader/dist/cjs.js??ref--15-0!../../../../node_modules/thread-loader/dist/cjs.js!../../../../node_modules/babel-loader/lib/index.js!../../../../node_modules/ts-loader/index.js??ref--15-3!../../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./VideoRatings.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./VideoRatings.vue?vue&type=template&id=da0e81ac&scoped=true&\"\nimport script from \"./VideoRatings.vue?vue&type=script&lang=ts&\"\nexport * from \"./VideoRatings.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./VideoRatings.vue?vue&type=style&index=0&id=da0e81ac&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"da0e81ac\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}