(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{140:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(231),n(25),n(44),n(5),n(41),n(462),n(24);var r=n(0),o={date:function(dt){return r(dt).format("LL")},floatFormat:function(e,t){return e.toFixed(t)},amountFormat:function(e){return e.toFixed(2).replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1,")},currencyFormat:function(e,t){return new Intl.NumberFormat("en-US",{style:"currency",currency:t}).format(e)},formatDuration:function(e){var t=Math.floor(e/3600),n=Math.floor((e-3600*t)/60),r=e-3600*t-60*n;return(t>0?t.toString()+" h ":"")+n.toString()+" m "+r.toFixed(0)+" s"},toStrLeadZero:function(e){return e.toString().padStart(2,"0")},formatDate:function(a,e){return e?"".concat(a.getFullYear(),"-").concat(this.toStrLeadZero(a.getMonth()+1),"-").concat(this.toStrLeadZero(a.getDate())," ").concat(this.toStrLeadZero(a.getHours()),":").concat(this.toStrLeadZero(a.getMinutes())):"".concat(a.getFullYear(),"-").concat(this.toStrLeadZero(a.getMonth()+1),"-").concat(this.toStrLeadZero(a.getDate()))},formatTime:function(a){return"".concat(this.toStrLeadZero(a.getHours()),":").concat(this.toStrLeadZero(a.getMinutes()))}}},141:function(e,t,n){"use strict";var r={};r.admin=n(502),r.admin=r.admin.default||r.admin,r.authenticated=n(503),r.authenticated=r.authenticated.default||r.authenticated,t.a=r},179:function(e,t,n){"use strict";n(47),n(5),n(15),n(40),n(59),n(71),n(11),n(46),n(41),n(32),n(52),n(42),n(25),n(13),n(66),n(73),n(48);var r=n(2);function o(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,l=!0,f=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return l=e.done,e},e:function(e){f=!0,o=e},f:function(){try{l||null==n.return||n.return()}finally{if(f)throw o}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},canPrefetch:function(){var e=navigator.connection;return!(this.$nuxt.isOffline||e&&((e.effectiveType||"").includes("2g")||e.saveData))},getPrefetchComponents:function(){return this.$router.resolve(this.to,this.$route,this.append).resolved.matched.map((function(e){return e.components.default})).filter((function(e){return"function"==typeof e&&!e.options&&!e.__prefetched}))},prefetchLink:function(){if(this.canPrefetch()){d.unobserve(this.$el);var e,t=o(this.getPrefetchComponents());try{for(t.s();!(e=t.n()).done;){var n=e.value,r=n();r instanceof Promise&&r.catch((function(){})),n.__prefetched=!0}}catch(e){t.e(e)}finally{t.f()}}}}}},294:function(e,t,n){var content=n(515);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(30).default)("21781fbd",content,!0,{sourceMap:!1})},295:function(e,t,n){var content=n(517);content.__esModule&&(content=content.default),"string"==typeof content&&(content=[[e.i,content,""]]),content.locals&&(e.exports=content.locals);(0,n(30).default)("61ebe5b0",content,!0,{sourceMap:!1})},439:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));n(24);var r=n(63);function o(e){r.a.$emit("display-snackbar",function(e){return{color:"error",multiLine:!1,message:"Error: ".concat(e.response.statusText," ").concat(e.response.status,". \nReason: ").concat(JSON.stringify(e.response.data.detail))}}(e))}},453:function(e,t,n){"use strict";var r=n(7),o=(n(51),n(5),n(47),n(2)),c=n(6),l=window.__NUXT__;function f(){if(!this._hydrated)return this.$fetch()}function d(){if((e=this).$vnode&&e.$vnode.elm&&e.$vnode.elm.dataset&&e.$vnode.elm.dataset.fetchKey){var e;this._hydrated=!0,this._fetchKey=this.$vnode.elm.dataset.fetchKey;var data=l.fetch[this._fetchKey];if(data&&data._error)this.$fetchState.error=data._error;else for(var t in data)o.a.set(this.$data,t,data[t])}}function h(){var e=this;return this._fetchPromise||(this._fetchPromise=m.call(this).then((function(){delete e._fetchPromise}))),this._fetchPromise}function m(){return v.apply(this,arguments)}function v(){return(v=Object(r.a)(regeneratorRuntime.mark((function e(){var t,n,r,o=this;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this.$nuxt.nbFetching++,this.$fetchState.pending=!0,this.$fetchState.error=null,this._hydrated=!1,t=null,n=Date.now(),e.prev=6,e.next=9,this.$options.fetch.call(this);case 9:e.next=15;break;case 11:e.prev=11,e.t0=e.catch(6),t=Object(c.p)(e.t0);case 15:if(!((r=this._fetchDelay-(Date.now()-n))>0)){e.next=19;break}return e.next=19,new Promise((function(e){return setTimeout(e,r)}));case 19:this.$fetchState.error=t,this.$fetchState.pending=!1,this.$fetchState.timestamp=Date.now(),this.$nextTick((function(){return o.$nuxt.nbFetching--}));case 23:case"end":return e.stop()}}),e,this,[[6,11]])})))).apply(this,arguments)}t.a={beforeCreate:function(){Object(c.l)(this)&&(this._fetchDelay="number"==typeof this.$options.fetchDelay?this.$options.fetchDelay:200,o.a.util.defineReactive(this,"$fetchState",{pending:!1,error:null,timestamp:Date.now()}),this.$fetch=h.bind(this),Object(c.a)(this,"created",d),Object(c.a)(this,"beforeMount",f))}}},464:function(e,t,n){e.exports=n(465)},465:function(e,t,n){"use strict";n.r(t),function(e){n(46),n(41),n(52),n(13),n(66),n(73);var t=n(12),r=n(7),o=(n(193),n(482),n(494),n(496),n(51),n(32),n(5),n(15),n(11),n(14),n(40),n(59),n(24),n(71),n(25),n(42),n(48),n(47),n(2)),c=n(448),l=n(141),f=n(6),d=n(88),h=n(453),m=n(179);function v(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return y(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return y(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2?t-2:0),r=2;r0)||f.includes(e.video_id)})).filter((function(e){return!(d.length>0)||c.intersection(d,e.group_ids).length>0}))},calendarEvents:function(e,t){return t.eventsWithVideosAndGroups.map((function(e){return{id:e.id,name:e.video.name,groups:e.group_names,start:d.a.formatDate(new Date(e.event_ts),!0),end:d.a.formatDate(new Date(new Date(e.event_ts).getTime()+1e3*e.video.duration_seconds),!0),color:"primary"}}))}};function k(e,t){return t.filter((function(t){return e.includes(t.id)})).map((function(e){return e.name})).join(", ")}function _(e){if(e){var t=new Date(e.event_ts);return v(v({},e),{},{date:d.a.formatDate(t,!1),time:d.a.formatTime(t)})}}},579:function(e,t,n){var map={"./af":304,"./af.js":304,"./ar":305,"./ar-dz":306,"./ar-dz.js":306,"./ar-kw":307,"./ar-kw.js":307,"./ar-ly":308,"./ar-ly.js":308,"./ar-ma":309,"./ar-ma.js":309,"./ar-sa":310,"./ar-sa.js":310,"./ar-tn":311,"./ar-tn.js":311,"./ar.js":305,"./az":312,"./az.js":312,"./be":313,"./be.js":313,"./bg":314,"./bg.js":314,"./bm":315,"./bm.js":315,"./bn":316,"./bn-bd":317,"./bn-bd.js":317,"./bn.js":316,"./bo":318,"./bo.js":318,"./br":319,"./br.js":319,"./bs":320,"./bs.js":320,"./ca":321,"./ca.js":321,"./cs":322,"./cs.js":322,"./cv":323,"./cv.js":323,"./cy":324,"./cy.js":324,"./da":325,"./da.js":325,"./de":326,"./de-at":327,"./de-at.js":327,"./de-ch":328,"./de-ch.js":328,"./de.js":326,"./dv":329,"./dv.js":329,"./el":330,"./el.js":330,"./en-au":331,"./en-au.js":331,"./en-ca":332,"./en-ca.js":332,"./en-gb":333,"./en-gb.js":333,"./en-ie":334,"./en-ie.js":334,"./en-il":335,"./en-il.js":335,"./en-in":336,"./en-in.js":336,"./en-nz":337,"./en-nz.js":337,"./en-sg":338,"./en-sg.js":338,"./eo":339,"./eo.js":339,"./es":340,"./es-do":341,"./es-do.js":341,"./es-mx":342,"./es-mx.js":342,"./es-us":343,"./es-us.js":343,"./es.js":340,"./et":344,"./et.js":344,"./eu":345,"./eu.js":345,"./fa":346,"./fa.js":346,"./fi":347,"./fi.js":347,"./fil":348,"./fil.js":348,"./fo":349,"./fo.js":349,"./fr":350,"./fr-ca":351,"./fr-ca.js":351,"./fr-ch":352,"./fr-ch.js":352,"./fr.js":350,"./fy":353,"./fy.js":353,"./ga":354,"./ga.js":354,"./gd":355,"./gd.js":355,"./gl":356,"./gl.js":356,"./gom-deva":357,"./gom-deva.js":357,"./gom-latn":358,"./gom-latn.js":358,"./gu":359,"./gu.js":359,"./he":360,"./he.js":360,"./hi":361,"./hi.js":361,"./hr":362,"./hr.js":362,"./hu":363,"./hu.js":363,"./hy-am":364,"./hy-am.js":364,"./id":365,"./id.js":365,"./is":366,"./is.js":366,"./it":367,"./it-ch":368,"./it-ch.js":368,"./it.js":367,"./ja":369,"./ja.js":369,"./jv":370,"./jv.js":370,"./ka":371,"./ka.js":371,"./kk":372,"./kk.js":372,"./km":373,"./km.js":373,"./kn":374,"./kn.js":374,"./ko":375,"./ko.js":375,"./ku":376,"./ku.js":376,"./ky":377,"./ky.js":377,"./lb":378,"./lb.js":378,"./lo":379,"./lo.js":379,"./lt":380,"./lt.js":380,"./lv":381,"./lv.js":381,"./me":382,"./me.js":382,"./mi":383,"./mi.js":383,"./mk":384,"./mk.js":384,"./ml":385,"./ml.js":385,"./mn":386,"./mn.js":386,"./mr":387,"./mr.js":387,"./ms":388,"./ms-my":389,"./ms-my.js":389,"./ms.js":388,"./mt":390,"./mt.js":390,"./my":391,"./my.js":391,"./nb":392,"./nb.js":392,"./ne":393,"./ne.js":393,"./nl":394,"./nl-be":395,"./nl-be.js":395,"./nl.js":394,"./nn":396,"./nn.js":396,"./oc-lnc":397,"./oc-lnc.js":397,"./pa-in":398,"./pa-in.js":398,"./pl":399,"./pl.js":399,"./pt":400,"./pt-br":401,"./pt-br.js":401,"./pt.js":400,"./ro":402,"./ro.js":402,"./ru":403,"./ru.js":403,"./sd":404,"./sd.js":404,"./se":405,"./se.js":405,"./si":406,"./si.js":406,"./sk":407,"./sk.js":407,"./sl":408,"./sl.js":408,"./sq":409,"./sq.js":409,"./sr":410,"./sr-cyrl":411,"./sr-cyrl.js":411,"./sr.js":410,"./ss":412,"./ss.js":412,"./sv":413,"./sv.js":413,"./sw":414,"./sw.js":414,"./ta":415,"./ta.js":415,"./te":416,"./te.js":416,"./tet":417,"./tet.js":417,"./tg":418,"./tg.js":418,"./th":419,"./th.js":419,"./tk":420,"./tk.js":420,"./tl-ph":421,"./tl-ph.js":421,"./tlh":422,"./tlh.js":422,"./tr":423,"./tr.js":423,"./tzl":424,"./tzl.js":424,"./tzm":425,"./tzm-latn":426,"./tzm-latn.js":426,"./tzm.js":425,"./ug-cn":427,"./ug-cn.js":427,"./uk":428,"./uk.js":428,"./ur":429,"./ur.js":429,"./uz":430,"./uz-latn":431,"./uz-latn.js":431,"./uz.js":430,"./vi":432,"./vi.js":432,"./x-pseudo":433,"./x-pseudo.js":433,"./yo":434,"./yo.js":434,"./zh-cn":435,"./zh-cn.js":435,"./zh-hk":436,"./zh-hk.js":436,"./zh-mo":437,"./zh-mo.js":437,"./zh-tw":438,"./zh-tw.js":438};function r(e){var t=o(e);return n(t)}function o(e){if(!n.o(map,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return map[e]}r.keys=function(){return Object.keys(map)},r.resolve=o,e.exports=r,r.id=579},580:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return o})),n.d(t,"mutations",(function(){return c})),n.d(t,"actions",(function(){return l})),n.d(t,"getters",(function(){return f}));var r=n(7),o=(n(51),n(121),function(){return{list:[],selected:null}}),c={populate:function(e,t){e.list=t},remove:function(e,t){var n=t.group;e.list.splice(e.list.indexOf(n),1)},setSelected:function(e,t){e.selected=t}},l={getGroups:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,t.$api.$get("/web-api/user/groups/");case 3:o=n.sent,r("populate",o);case 5:case"end":return n.stop()}}),n)})))()},addGroup:function(e,t){this.$api.$post("/web-api/user/groups/",t).then((function(t){return e.dispatch("getGroups")})).catch((function(e){return console.log("Error:",e)}))},updateGroup:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.$api.$put("/web-api/user/groups/"+t.id,t);case 2:e.dispatch("getGroups");case 3:case"end":return r.stop()}}),r)})))()},deleteGroup:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.$api.$delete("/web-api/user/groups/"+t.id);case 2:e.dispatch("getGroups");case 3:case"end":return r.stop()}}),r)})))()},setSelected:function(e,t){e.commit("setSelected",t)}},f={groupsList:function(e){return e.list},selected:function(e){return e.selected}}},581:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return l})),n.d(t,"mutations",(function(){return f})),n.d(t,"actions",(function(){return d})),n.d(t,"getters",(function(){return h}));var r=n(7),o=(n(51),n(63)),c=function(){return{authenticated:!1}},l=c,f={setAuthenticated:function(e,t){e.authenticated=t},resetState:function(e){Object.assign(e,{authenticated:!1})}},d={login:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,c,l,f;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.commit,c=e.dispatch,n.prev=1,n.next=4,t.$axios.$get("/web-api/user/auth/userinfo");case 4:(l=n.sent).email_verified&&(localStorage.setItem("authenticated",!0),r("setAuthenticated",!0),localStorage.setItem("role",l.role),localStorage.setItem("x_csrf_token",l.x_csrf_token),c("ws/wsConnect",null,{root:!0})),n.next=14;break;case 8:if(n.prev=8,n.t0=n.catch(1),403!==n.t0.response.status){n.next=14;break}return f=n.t0.response.data.detail||"Access forbidden",Object(o.b)("error",f),n.abrupt("return",n.t0);case 14:case"end":return n.stop()}}),n,null,[[1,8]])})))()},logout:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,t.$api.$get("/web-api/user/auth/logout");case 3:t.$router.push("/"),localStorage.removeItem("x_csrf_token"),localStorage.removeItem("authenticated"),localStorage.removeItem("role"),r("setAuthenticated",!1);case 8:case"end":return n.stop()}}),n)})))()}},h={authenticated:function(e){return e.authenticated}}},582:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return f})),n.d(t,"mutations",(function(){return d})),n.d(t,"actions",(function(){return h})),n.d(t,"getters",(function(){return m}));var r=n(7),o=(n(51),n(22)),c=n.n(o),l=function(){return{diskStats:null,playersStatus:null}},f=l,d={setDiskStats:function(e,t){e.diskStats=t},setPlayersStatus:function(e,data){e.playersStatus=data},resetState:function(e){Object.assign(e,{diskStats:null,playersStatus:null})}},h={setDiskStats:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.commit,n.prev=1,n.next=4,t.$api.$get("/web-api/user/stats/disk");case 4:o=n.sent,r("setDiskStats",o),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(1),c.a.error(n.t0);case 11:case"end":return n.stop()}}),n,null,[[1,8]])})))()},setPlayersStatus:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,data;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.commit,n.prev=1,n.next=4,t.$api.$get("/web-api/user/stats/players-status");case 4:data=n.sent,r("setPlayersStatus",data),n.next=11;break;case 8:n.prev=8,n.t0=n.catch(1),c.a.error(n.t0);case 11:case"end":return n.stop()}}),n,null,[[1,8]])})))()}},m={diskStats:function(e){return e.diskStats},playersStatus:function(e){return e.playersStatus}}},583:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return o})),n.d(t,"mutations",(function(){return c})),n.d(t,"actions",(function(){return l})),n.d(t,"getters",(function(){return f}));var r=n(7),o=(n(51),function(){return{list:[],selected:null}}),c={populate:function(e,t){e.list=t},setSelected:function(e,t){e.selected=t}},l={getUsers:function(e){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,o;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=e.commit,n.next=3,t.$api.$get("/web-api/user/admin/list-users");case 3:o=n.sent,r("populate",o);case 5:case"end":return n.stop()}}),n)})))()},updateUserStatus:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function r(){return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,n.$api.$patch("/web-api/user/admin/user-status/"+t.id,{active:t.active});case 2:e.dispatch("getUsers");case 3:case"end":return r.stop()}}),r)})))()},setSelected:function(e,t){e.commit("setSelected",t)}},f={usersList:function(e){return e.list},selected:function(e){return e.selected}}},584:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return y})),n.d(t,"mutations",(function(){return x})),n.d(t,"actions",(function(){return w})),n.d(t,"getters",(function(){return j}));n(41),n(52),n(42),n(25),n(13),n(66),n(73),n(48);var r=n(7),o=n(74),c=(n(51),n(11),n(5),n(32),n(24),n(121),n(47),n(46),n(22)),l=n.n(c),f=n(451),d=n(96),h=n(63);function m(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return v(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return v(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function v(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0)){n.next=18;break}return video=e.state.uploadArray[0],n.next=5,t.$api.$post("/web-api/user/videos/file-exists",{filename:video.file.name});case 5:if(o=n.sent,!o.exists){n.next=12;break}e.commit("removeFromUploadArray",video),Object(h.b)("error","File already uploaded: ".concat(video.file.name)),n.next=15;break;case 12:return e.dispatch("removeFromUploadArray",video),n.next=15,e.dispatch("uploadVideo",video);case 15:r=e.state.uploadArray.length,n.next=1;break;case 18:case"end":return n.stop()}}),n)})))()},uploadVideo:function(e,video){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){var r,o,c,i,f,d,h,v,y,x,w,j,U;return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:r=5*Math.pow(1024,2),e.commit("setCancelUpload",!1),e.commit("setUploadFileName",video.file.name),e.commit("setUploadFileSize",video.file.size),e.commit("setUploadPercent",0),e.commit("setUploadedBytes",0),e.commit("setConcurentUploads",0),o=Math.ceil(e.state.uploadFileSize/r),c=0,i=0;case 10:if(!(i0)){n.next=65;break}l.a.info("Failed uploads:",e.state.failedUploads),l.a.info("Retry count:",c),v=m(e.state.failedUploads),n.prev=35,v.s();case 37:if((y=v.n()).done){n.next=48;break}return x=y.value,l.a.info("Failed index retry:",x),n.next=42,S(e);case 42:w=x===o-1,j=O(video,r,x),U=$(video,j,x,w,!1),_(t.$api,e,j,x,U,w,!0);case 46:n.next=37;break;case 48:n.next=53;break;case 50:n.prev=50,n.t0=n.catch(35),v.e(n.t0);case 53:return n.prev=53,v.f(),n.finish(53);case 56:return n.next=58,k(2e3);case 58:if(5!==(c+=1)){n.next=65;break}return l.a.info("Upload should be cancelled..."),e.commit("setCancelUpload",!0),e.commit("removeFromStartedUploads",video.file.name),e.commit("setFailedUploads",[]),n.abrupt("break",68);case 65:i++,n.next=10;break;case 68:case"end":return n.stop()}}),n,null,[[35,50,53,56]])})))()},updateVideo:function(e,video){var t=this;return Object(r.a)(regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,t.$api.$put("/web-api/user/videos/"+video.id,video);case 2:e.dispatch("getVideos");case 3:case"end":return n.stop()}}),n)})))()},deleteVideo:function(e,t){var n=this;return Object(r.a)(regeneratorRuntime.mark((function r(){var o,c;return regeneratorRuntime.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(o="success",c=null,r.prev=2,!t.fileOnly){r.next=9;break}return r.next=6,n.$api.$delete("/web-api/user/videos/"+t.video.id+"?file_only=true");case 6:c="Video file deleted successfully: ".concat(t.video.name),r.next=13;break;case 9:return r.next=11,n.$api.$delete("/web-api/user/videos/"+t.video.id);case 11:c="Video deleted successfully: ".concat(t.video.name),e.dispatch("getVideos");case 13:e.dispatch("stats/setDiskStats",null,{root:!0}),r.next=25;break;case 16:r.prev=16,r.t0=r.catch(2),o="error",r.t1=r.t0.response.status,r.next=409===r.t1?22:24;break;case 22:return c="The video can not be deleted because there are associated events.",r.abrupt("break",25);case 24:c="An error occured while deleting video";case 25:return r.prev=25,Object(h.b)(o,c),r.finish(25);case 28:case"end":return r.stop()}}),r,null,[[2,16,25,28]])})))()},downloadVideo:function(e,video){var t=video.file_path.split("/"),n=t[t.length-1];this.$api({url:"/web-api/user/videos/download/"+video.id,method:"GET",responseType:"blob"}).then((function(e){return Object(f.saveAs)(new Blob([e.data]),n)})).catch()},setSelected:function(e,video){e.commit("setSelected",video)},setCancelUpload:function(e,t){e.commit("setCancelUpload",t)}},j={videosList:function(e){return e.list},selected:function(e){return e.selected},uploadStarted:function(e){return e.uploadStarted},uploadProcessStarted:function(e){return e.uploadProcessStarted},uploadPercent:function(e){return e.uploadPercent},uploadFileName:function(e){return e.uploadFileName},timeElapsed:function(e){return e.timeElapsed},getVideoName:function(e){return function(t){var video=d.find(e.list,(function(video){return video.id===t}));return video?video.name:""}},uploadArray:function(e){return e.uploadArray},startedUploads:function(e){return e.startedUploads}};function k(e){return new Promise((function(t){return setTimeout(t,e)}))}function _(e,t,n,i,r,o,c){t.commit("increaseConcurentUploads",1),e(function(e){return{method:"POST",data:e,url:"/web-api/user/videos/upload",headers:{"Content-Type":"application/octet-stream"}}}(r)).then((function(e){c&&(l.a.info("Failed request succeeded..."),t.commit("removeFromFailedUploads",i)),function(e,t,n,r){t.commit("increaseConcurentUploads",-1),t.commit("increaseUploadedBytes",n.size),t.dispatch("setUploadPercent",Math.floor(100*t.state.uploadedBytes/t.state.uploadFileSize)),r&&l.a.info("Resp for last part upload:",e)}(e,t,n,o)})).catch((function(e){c?function(e,t){t.commit("increaseConcurentUploads",-1),l.a.error("Retry Error:",e)}(e,t):function(e,t,i){t.commit("increaseConcurentUploads",-1),t.commit("addToFailedUploads",i),l.a.error("Failed uploads:",t.state.failedUploads,e.response)}(e,t,i)}))}function O(video,e,i){return video.file.slice(i*e,Math.min(i*e+e,video.file.size),video.file.type)}function $(video,e,i,t,n){var r=new FormData;return r.append("file",e,video.file.name+".part"+i),r.append("is_last",t),r.append("name",video.name),r.append("info",video.info),n&&r.append("cancel",!0),r}function S(e){return U.apply(this,arguments)}function U(){return(U=Object(r.a)(regeneratorRuntime.mark((function e(t){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.state.concurrentUploads<5)){e.next=5;break}return e.abrupt("break",9);case 5:return e.next=7,k(1e3);case 7:e.next=0;break;case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}},585:function(e,t,n){"use strict";n.r(t),n.d(t,"state",(function(){return l})),n.d(t,"mutations",(function(){return f})),n.d(t,"actions",(function(){return d}));n(11),n(5),n(47),n(14),n(32);var r=n(22),o=n.n(r),c=n(63),l=function(){return{conn:null,messages:[]}},f={setConnection:function(e,t){e.conn=t},setConnOpen:function(e,t){e.connOpen=t},setMessages:function(e,t){e.messages=t},addToMessages:function(e,t){e.messages.push(t)},removeFromMessages:function(e,t){e.messages=e.messages.filter((function(e){return e!==t}))}},d={wsConnect:function(e){var t="wss://videoads.peerflow.io/web-api/user/ws?x_csrf_token="+localStorage.getItem("x_csrf_token"),n=new WebSocket(t);o.a.info("WS connection established:",t),n.onopen=function(e){o.a.info("WS connection established.",e)},n.onclose=function(t){o.a.info("WS connection closed.",t),e.commit("setMessages",[]),o.a.info("Trying to reconnect in 1 second..."),setTimeout((function(){return e.dispatch("wsConnect")}),1e3)},n.onmessage=function(t){var n=JSON.parse(t.data);n.subject&&n.body&&n.ts?h[n.subject](n,e):o.a.error("Can not handle ws message:",n)},e.commit("setConnection",n)},wsSendMessage:function(e,t){e.state.conn.send(t)}},h={welcome:function(e,t){o.a.info("WS message received:",e),t.commit("addToMessages",e)},"video-uploaded":function(e,t){Object(c.b)("success","Video successfully uploaded: ".concat(e.body.name)),t.dispatch("videos/removeFromStartedUploads",e.body.name,{root:!0}),t.dispatch("videos/addVideo",e.body,{root:!0}),t.dispatch("stats/setDiskStats",null,{root:!0})},"refresh-player-status":function(e,t){t.dispatch("stats/setPlayersStatus",null,{root:!0})}}},6:function(e,t,n){"use strict";n.d(t,"k",(function(){return x})),n.d(t,"m",(function(){return w})),n.d(t,"l",(function(){return j})),n.d(t,"e",(function(){return k})),n.d(t,"b",(function(){return _})),n.d(t,"s",(function(){return O})),n.d(t,"g",(function(){return $})),n.d(t,"h",(function(){return S})),n.d(t,"d",(function(){return U})),n.d(t,"r",(function(){return P})),n.d(t,"j",(function(){return C})),n.d(t,"t",(function(){return A})),n.d(t,"o",(function(){return T})),n.d(t,"q",(function(){return D})),n.d(t,"f",(function(){return L})),n.d(t,"c",(function(){return I})),n.d(t,"i",(function(){return F})),n.d(t,"p",(function(){return N})),n.d(t,"a",(function(){return K})),n.d(t,"v",(function(){return W})),n.d(t,"n",(function(){return Z})),n.d(t,"u",(function(){return J}));n(52),n(13),n(66),n(73),n(18),n(15),n(19);var r=n(12),o=n(7),c=n(3),l=n(17),f=(n(51),n(5),n(11),n(287),n(32),n(24),n(71),n(14),n(42),n(48),n(46),n(25),n(44),n(79),n(228),n(461),n(41),n(78),n(150),n(40),n(59),n(2)),d=n(87);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1&&void 0!==arguments[1]?arguments[1]:[],r=v(e.$children||[]);try{for(r.s();!(t=r.n()).done;){var o=t.value;o.$fetch&&n.push(o),o.$children&&k(o,n)}}catch(e){r.e(e)}finally{r.f()}return n}function _(e,t){if(t||!e.options.__hasNuxtData){var n=e.options._originDataFn||e.options.data||function(){return{}};e.options._originDataFn=n,e.options.data=function(){var data=n.call(this,this);return this.$ssrContext&&(t=this.$ssrContext.asyncData[e.cid]),m(m({},data),t)},e.options.__hasNuxtData=!0,e._Ctor&&e._Ctor.options&&(e._Ctor.options.data=e.options.data)}}function O(e){return e.options&&e._Ctor===e||(e.options?(e._Ctor=e,e.extendOptions=e.options):(e=f.a.extend(e))._Ctor=e,!e.options.name&&e.options.__file&&(e.options.name=e.options.__file)),e}function $(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"components";return Array.prototype.concat.apply([],e.matched.map((function(e,r){return Object.keys(e[n]).map((function(o){return t&&t.push(r),e[n][o]}))})))}function S(e){return $(e,arguments.length>1&&void 0!==arguments[1]&&arguments[1],"instances")}function U(e,t){return Array.prototype.concat.apply([],e.matched.map((function(e,n){return Object.keys(e.components).reduce((function(r,o){return e.components[o]?r.push(t(e.components[o],e.instances[o],e,o,n)):delete e.components[o],r}),[])})))}function P(e,t){return Promise.all(U(e,function(){var e=Object(o.a)(regeneratorRuntime.mark((function e(n,r,o,c){var l,f;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("function"!=typeof n||n.options){e.next=11;break}return e.prev=1,e.next=4,n();case 4:n=e.sent,e.next=11;break;case 7:throw e.prev=7,e.t0=e.catch(1),e.t0&&"ChunkLoadError"===e.t0.name&&"undefined"!=typeof window&&window.sessionStorage&&(l=Date.now(),(!(f=parseInt(window.sessionStorage.getItem("nuxt-reload")))||f+6e41&&void 0!==arguments[1]?arguments[1]:_,n=arguments.length>2?arguments[2]:void 0;return r.call(this,e,t,n)};var o=n.resolve.bind(n);return n.resolve=function(e,t,n){return"string"==typeof e&&(e=Object(x.c)(e)),o(e,t,n)},n}var S={name:"NuxtChild",functional:!0,props:{nuxtChildKey:{type:String,default:""},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0}},render:function(e,t){var n=t.parent,data=t.data,r=t.props,o=n.$createElement;data.nuxtChild=!0;for(var c=n,l=n.$nuxt.nuxt.transitions,f=n.$nuxt.nuxt.defaultTransition,d=0;n;)n.$vnode&&n.$vnode.data.nuxtChild&&d++,n=n.$parent;data.nuxtChildDepth=d;var h=l[d]||f,m={};U.forEach((function(e){void 0!==h[e]&&(m[e]=h[e])}));var v={};P.forEach((function(e){"function"==typeof h[e]&&(v[e]=h[e].bind(c))}));var y=v.beforeEnter;if(v.beforeEnter=function(e){if(window.$nuxt.$nextTick((function(){window.$nuxt.$emit("triggerScroll")})),y)return y.call(c,e)},!1===h.css){var x=v.leave;(!x||x.length<2)&&(v.leave=function(e,t){x&&x.call(c,e),c.$nextTick(t)})}var w=o("routerView",data);return r.keepAlive&&(w=o("keep-alive",{props:r.keepAliveProps},[w])),o("transition",{props:m,on:v},[w])}},U=["name","mode","appear","css","type","duration","enterClass","leaveClass","appearClass","enterActiveClass","enterActiveClass","leaveActiveClass","appearActiveClass","enterToClass","leaveToClass","appearToClass"],P=["beforeEnter","enter","afterEnter","enterCancelled","beforeLeave","leave","afterLeave","leaveCancelled","beforeAppear","appear","afterAppear","appearCancelled"],C=n(620),R={layout:"empty",props:{error:{type:Object,default:null}},data:function(){return{pageNotFound:"404 Not Found",otherError:"An error occurred"}},head:function(){return{title:404===this.error.statusCode?this.pageNotFound:this.otherError}}},A=(n(514),n(89)),E=Object(A.a)(R,(function(){var e=this,t=e._self._c;return t(C.a,{attrs:{dark:""}},[404===e.error.statusCode?t("h1",[e._v("\n "+e._s(e.pageNotFound)+"\n ")]):t("h1",[e._v("\n "+e._s(e.otherError)+"\n ")]),e._v(" "),t("NuxtLink",{attrs:{to:"/"}},[e._v("\n Home page\n ")])],1)}),[],!1,null,"bfedb7fe",null).exports,T=n(17),D=(n(41),{name:"Nuxt",components:{NuxtChild:S,NuxtError:E},props:{nuxtChildKey:{type:String,default:void 0},keepAlive:Boolean,keepAliveProps:{type:Object,default:void 0},name:{type:String,default:"default"}},errorCaptured:function(e){this.displayingNuxtError&&(this.errorFromNuxtError=e,this.$forceUpdate())},computed:{routerViewKey:function(){if(void 0!==this.nuxtChildKey||this.$route.matched.length>1)return this.nuxtChildKey||Object(w.c)(this.$route.matched[0].path)(this.$route.params);var e=Object(T.a)(this.$route.matched,1)[0];if(!e)return this.$route.path;var t=e.components.default;if(t&&t.options){var n=t.options;if(n.key)return"function"==typeof n.key?n.key(this.$route):n.key}return/\/$/.test(e.path)?this.$route.path:this.$route.path.replace(/\/$/,"")}},beforeCreate:function(){c.a.util.defineReactive(this,"nuxt",this.$root.$options.nuxt)},render:function(e){var t=this;return this.nuxt.err?this.errorFromNuxtError?(this.$nextTick((function(){return t.errorFromNuxtError=!1})),e("div",{},[e("h2","An error occurred while showing the error page"),e("p","Unfortunately an error occurred and while showing the error page another error occurred"),e("p","Error details: ".concat(this.errorFromNuxtError.toString())),e("nuxt-link",{props:{to:"/"}},"Go back to home")])):(this.displayingNuxtError=!0,this.$nextTick((function(){return t.displayingNuxtError=!1})),e(E,{props:{error:this.nuxt.err}})):e("NuxtChild",{key:this.routerViewKey,props:this.$props})}}),L=(n(46),n(52),n(66),n(73),n(47),{name:"NuxtLoading",data:function(){return{percent:0,show:!1,canSucceed:!0,reversed:!1,skipTimerCount:0,rtl:!1,throttle:200,duration:5e3,continuous:!1}},computed:{left:function(){return!(!this.continuous&&!this.rtl)&&(this.rtl?this.reversed?"0px":"auto":this.reversed?"auto":"0px")}},beforeDestroy:function(){this.clear()},methods:{clear:function(){clearInterval(this._timer),clearTimeout(this._throttle),clearTimeout(this._hide),this._timer=null},start:function(){var e=this;return this.clear(),this.percent=0,this.reversed=!1,this.skipTimerCount=0,this.canSucceed=!0,this.throttle?this._throttle=setTimeout((function(){return e.startTimer()}),this.throttle):this.startTimer(),this},set:function(e){return this.show=!0,this.canSucceed=!0,this.percent=Math.min(100,Math.max(0,Math.floor(e))),this},get:function(){return this.percent},increase:function(e){return this.percent=Math.min(100,Math.floor(this.percent+e)),this},decrease:function(e){return this.percent=Math.max(0,Math.floor(this.percent-e)),this},pause:function(){return clearInterval(this._timer),this},resume:function(){return this.startTimer(),this},finish:function(){return this.percent=this.reversed?0:100,this.hide(),this},hide:function(){var e=this;return this.clear(),this._hide=setTimeout((function(){e.show=!1,e.$nextTick((function(){e.percent=0,e.reversed=!1}))}),500),this},fail:function(e){return this.canSucceed=!1,this},startTimer:function(){var e=this;this.show||(this.show=!0),void 0===this._cut&&(this._cut=1e4/Math.floor(this.duration)),this._timer=setInterval((function(){e.skipTimerCount>0?e.skipTimerCount--:(e.reversed?e.decrease(e._cut):e.increase(e._cut),e.continuous&&(e.percent>=100||e.percent<=0)&&(e.skipTimerCount=1,e.reversed=!e.reversed))}),100)}},render:function(e){var t=e(!1);return this.show&&(t=e("div",{staticClass:"nuxt-progress",class:{"nuxt-progress-notransition":this.skipTimerCount>0,"nuxt-progress-failed":!this.canSucceed},style:{width:this.percent+"%",left:this.left}})),t}}),I=(n(516),Object(A.a)(L,undefined,undefined,!1,null,null,null).exports),F=n(627),N=n(213),V=n(626),M=n(629),z=n(628),B=n(624),G=n(454),H=n(607),K=n(606),W=n(609),Z=n(625),J=n(623),X=n(621),Q=n(181),Y=(n(24),n(22)),ee=n.n(Y),te=n(63),ne=n(630),re=n(608),oe=n(217),ae=n(215);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function se(e){for(var t=1;t0},uploadPercentValue:function(){return this.uploadPercent<100?this.uploadPercent:100}}),methods:se(se({},Object(l.b)({setCancelUpload:"videos/setCancelUpload"})),{},{cancel:function(){this.setCancelUpload(!0)}})};function ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function le(e){for(var t=1;t0?t("div",[e._v("\n Number of files in the upload list: "+e._s(e.uploadArray.length+e.startedUploads.length)+"\n ")]):e._e(),e._v("\n Upload progress for: "+e._s(e.uploadFileName)+"\n "),t(ae.a,{staticClass:"ma-2",attrs:{color:"primary",value:e.uploadPercentValue}}),e._v("\n "+e._s(e.uploadPercentValue)+" %.\n "),e.uploadPercent<100?t(N.a,{attrs:{text:"","x-small":"",color:"error"},on:{click:e.cancel}},[e._v("\n Cancel upload\n "),t(oe.a,{attrs:{right:""}},[e._v("mdi-cancel")])],1):t(re.a,{staticClass:"ma-2",attrs:{label:"",light:"",color:"primary"}},[e._v("\n Saving file...\n ")])],1)}),[],!1,null,"f51d8984",null).exports},data:function(){return{fixed:!1,miniVariant:!0,title:"Video Ads",snackbarText:"",snackbarVisible:!1,snackbarColor:null,snackbarMultiLine:!1,wsConnection:null}},computed:le(le({},Object(l.c)({uploadArray:"videos/uploadArray",startedUploads:"videos/startedUploads",authenticated:"session/authenticated"})),{},{isAuthenticated:function(){return localStorage.getItem("authenticated")||this.authenticated},isAdmin:function(){return"ADMIN"===localStorage.getItem("role")}}),watch:{uploadArray:function(){0===this.startedUploads.length&&(ee.a.info("Starting upload process for ".concat(this.uploadArray.length," files...")),this.startUploadProcess())}},created:function(){var e=this;te.a.$on("display-snackbar",(function(data){ee.a.info("Message received via event bus:",data),e.snackbarColor=data.color||"info",e.snackbarText=data.message,e.snackbarMultiLine=data.multiLine||!1,e.snackbarVisible=!0}))},methods:le(le({},Object(l.b)({apiLogout:"session/logout",startUploadProcess:"videos/startUploadProcess"})),{},{onLogOut:function(){this.$auth.logout(),this.apiLogout();var e=encodeURI(window.location.protocol+"//"+window.location.host);window.location="https://".concat("dev-w85tybw4.eu.auth0.com","/v2/logout?returnTo=").concat(e,"&client_id=").concat("yRJw9raEyKidvyimtaZpS8Se0BzO7zSS")}})},pe=Object(A.a)(fe,(function(){var e=this,t=e._self._c;return t(C.a,{attrs:{light:""}},[e.isAuthenticated?t(F.a,{attrs:{"clipped-left":"",fixed:"",app:"",color:"blue-grey lighten-5",light:""}},[t(G.a,{attrs:{src:n(541),"max-width":"200",alt:"logo"}}),e._v(" "),t(X.a),e._v(" "),t(Q.a,{staticClass:"hidden-sm-and-down"},[e.isAdmin?t(N.a,{attrs:{text:"",small:"",color:"error"},on:{click:function(t){return e.$router.push("/admin/users")}}},[e._v("\n Admin\n ")]):e._e(),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:function(t){return e.$router.push("/dashboard")}}},[e._v("\n Dashboard\n ")]),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:function(t){return e.$router.push("/calendar")}}},[e._v("\n Calendar\n ")]),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:function(t){return e.$router.push("/new-event")}}},[e._v("\n New Event\n ")]),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:function(t){return e.$router.push("/groups")}}},[e._v("\n Groups\n ")]),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:function(t){return e.$router.push("/videos")}}},[e._v("\n Video files\n ")]),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:function(t){return e.$router.push("/settings")}}},[e._v("\n Settings\n ")]),e._v(" "),t(X.a),e._v(" "),t(N.a,{attrs:{text:"",small:"",color:"primary"},on:{click:e.onLogOut}},[e._v("\n Log out\n ")])],1),e._v(" "),t(Q.a,{staticClass:"hidden-md-and-up"},[t(W.a,{attrs:{"offset-y":""},scopedSlots:e._u([{key:"activator",fn:function(n){var r=n.on,o=n.attrs;return[t(N.a,e._g(e._b({attrs:{color:"primary",text:""}},"v-btn",o,!1),r),[e._v("\n Menu\n ")])]}}],null,!1,1080396080)},[e._v(" "),t(H.a,[e.isAdmin?t(K.a,{on:{click:function(t){return e.$router.push("/admin/users")}}},[e._v("\n Admin\n ")]):e._e(),e._v(" "),t(K.a,{on:{click:function(t){return e.$router.push("/dashboard")}}},[e._v("\n Dashboard\n ")]),e._v(" "),t(K.a,{on:{click:function(t){return e.$router.push("/calendar")}}},[e._v("\n Calendar\n ")]),e._v(" "),t(K.a,{on:{click:function(t){return e.$router.push("/new-event")}}},[e._v("\n New Event\n ")]),e._v(" "),t(K.a,{on:{click:function(t){return e.$router.push("/videos")}}},[e._v("\n Videos\n ")]),e._v(" "),t(K.a,{on:{click:function(t){return e.$router.push("/settings")}}},[e._v("\n Settings\n ")]),e._v(" "),t(K.a,{on:{click:e.onLogOut}},[e._v("\n Log out\n ")])],1)],1)],1)],1):e._e(),e._v(" "),t(z.a,[e.isAuthenticated?t(M.a,{attrs:{fluid:""}},[t("nuxt")],1):e._e(),e._v(" "),e.isAuthenticated?e._e():t(M.a,{attrs:{fluid:"","fill-height":""}},[t("nuxt")],1)],1),e._v(" "),t(J.a,{attrs:{bottom:"",right:"","multi-line":e.snackbarMultiLine,color:e.snackbarColor,timeout:6e3},model:{value:e.snackbarVisible,callback:function(t){e.snackbarVisible=t},expression:"snackbarVisible"}},[e._v("\n "+e._s(e.snackbarText)+"\n "),t(N.a,{attrs:{dark:"",text:""},on:{click:function(t){e.snackbarVisible=!1}}},[e._v("\n Close\n ")])],1),e._v(" "),t(B.a,{attrs:{app:"",padless:"",color:"white"}},[t(Z.a,{staticClass:"blue--text text--darken-4 justify-space-between ma-2"},[e.isAuthenticated?t(V.a,{attrs:{cols:"12"}},[t("alert-upload-progress")],1):e._e(),e._v(" "),t(V.a,{attrs:{cols:"6"}},[e._v("\n Powered by Skynix\n ")]),e._v(" "),t(V.a,{staticClass:"text-right",attrs:{cols:"6"}},[e._v("\n Contact us: contact.us@skynix.net +359885511038\n ")])],1)],1)],1)}),[],!1,null,null,null).exports;function de(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return he(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return he(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function he(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i0},isPreview:function(){return Boolean(this.$options.previewData)}},methods:{refreshOnlineStatus:function(){void 0===window.navigator.onLine?this.isOnline=!0:this.isOnline=window.navigator.onLine},refresh:function(){var e=this;return Object(r.a)(regeneratorRuntime.mark((function t(){var n,o;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((n=Object(w.h)(e.$route)).length){t.next=3;break}return t.abrupt("return");case 3:return e.$loading.start(),o=n.map(function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(n){var p,r,o,component;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return p=[],n.$options.fetch&&n.$options.fetch.length&&p.push(Object(w.q)(n.$options.fetch,e.context)),n.$options.asyncData&&p.push(Object(w.q)(n.$options.asyncData,e.context).then((function(e){for(var t in e)c.a.set(n.$data,t,e[t])}))),t.next=5,Promise.all(p);case 5:p=[],n.$fetch&&p.push(n.$fetch()),r=de(Object(w.e)(n.$vnode.componentInstance));try{for(r.s();!(o=r.n()).done;)component=o.value,p.push(component.$fetch())}catch(e){r.e(e)}finally{r.f()}return t.abrupt("return",Promise.all(p));case 10:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}()),t.prev=5,t.next=8,Promise.all(o);case 8:t.next=15;break;case 10:t.prev=10,t.t0=t.catch(5),e.$loading.fail(t.t0),Object(w.k)(t.t0),e.error(t.t0);case 15:e.$loading.finish();case 16:case"end":return t.stop()}}),t,null,[[5,10]])})))()},errorChanged:function(){if(this.nuxt.err){this.$loading&&(this.$loading.fail&&this.$loading.fail(this.nuxt.err),this.$loading.finish&&this.$loading.finish());var e=(E.options||E).layout;"function"==typeof e&&(e=e(this.context)),this.setLayout(e)}},setLayout:function(e){return e&&me["_"+e]||(e="default"),this.layoutName=e,this.layout=me["_"+e],this.layout},loadLayout:function(e){return e&&me["_"+e]||(e="default"),Promise.resolve(me["_"+e])}},components:{NuxtLoading:I}};n(40);c.a.use(l.a);var ge=["state","getters","actions","mutations"],be={};(be=function(e,t){if((e=e.default||e).commit)throw new Error("[nuxt] ".concat(t," should export a method that returns a Vuex instance."));return"function"!=typeof e&&(e=Object.assign({},e)),xe(e,t)}(n(574),"store/index.js")).modules=be.modules||{},we(n(575),"apikeys.js"),we(n(576),"events.js"),we(n(580),"groups.js"),we(n(581),"session.js"),we(n(582),"stats.js"),we(n(583),"users.js"),we(n(584),"videos.js"),we(n(585),"ws.js");var ye=be instanceof Function?be:function(){return new l.a.Store(Object.assign({strict:!1},be))};function xe(e,t){if(e.state&&"function"!=typeof e.state){console.warn("'state' should be a method that returns an object in ".concat(t));var n=Object.assign({},e.state);e=Object.assign({},e,{state:function(){return n}})}return e}function we(e,t){e=e.default||e;var n=t.replace(/\.(js|mjs)$/,"").split("/"),r=n[n.length-1],o="store/".concat(t);if(e="state"===r?function(e,t){if("function"!=typeof e){console.warn("".concat(t," should export a method that returns an object"));var n=Object.assign({},e);return function(){return n}}return xe(e,t)}(e,o):xe(e,o),ge.includes(r)){var c=r;ke(je(be,n,{isProperty:!0}),e,c)}else{"index"===r&&(n.pop(),r=n[n.length-1]);for(var l=je(be,n),f=0,d=ge;f2&&void 0!==arguments[2]?arguments[2]:{}).isProperty,r=void 0!==n&&n;if(!t.length||r&&1===t.length)return e;var o=t.shift();return e.modules[o]=e.modules[o]||{},e.modules[o].namespaced=!0,e.modules[o].modules=e.modules[o].modules||{},je(e.modules[o],t,{isProperty:r})}function ke(e,t,n){t&&("state"===n?e.state=t||e.state:e[n]=Object.assign({},e[n],t))}var _e=n(143),Oe={theme:{dark:!1,themes:{dark:{primary:"#0d47a1",accent:"#757575",secondary:"#ff8f00",info:"#26a69a",warning:"#ffc107",error:"#b71c1c",success:"#00897b"},light:{primary:"#0d47a1",accent:"#757575",secondary:"#bdbdbd",info:"#29b6f6",warning:"#ffc107",error:"#b71c1c",success:"#00897b"}}}};c.a.use(_e.a,{});var $e=function(e){var t="function"==typeof Oe?Oe(e):Oe;t.icons=t.icons||{},t.icons.iconfont="mdi";var n=new _e.a(t);e.app.vuetify=n,e.$vuetify=n.framework},Se=n(144),Ue=n.n(Se),Pe=n(452);function Ce(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Re(e){for(var t=1;t=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function Ee(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i2&&void 0!==arguments[2]?arguments[2]:"common",o=Ae(Array.isArray(r)?r:[r]);try{for(o.s();!(n=o.n()).done;){var c=n.value;t?this.defaults.headers[c][e]=t:delete this.defaults.headers[c][e]}}catch(e){o.e(e)}finally{o.f()}},setToken:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"common",r=e?(t?t+" ":"")+e:null;this.setHeader("Authorization",r,n)},onRequest:function(e){this.interceptors.request.use((function(t){return e(t)||t}))},onResponse:function(e){this.interceptors.response.use((function(t){return e(t)||t}))},onRequestError:function(e){this.interceptors.request.use(void 0,(function(t){return e(t)||Promise.reject(t)}))},onResponseError:function(e){this.interceptors.response.use(void 0,(function(t){return e(t)||Promise.reject(t)}))},onError:function(e){this.onRequestError(e),this.onResponseError(e)},create:function(e){return Fe(Object(Pe.a)(e,this.defaults))}},De=function(){var e=Ie[Le];Te["$"+e]=function(){return this[e].apply(this,arguments).then((function(e){return e&&e.data}))}},Le=0,Ie=["request","delete","get","head","options","post","put","patch"];Le0&&void 0!==arguments[0]?arguments[0]:"").split("?")[0];return"/"===e.charAt(e.length-1)&&(e=e.slice(0,-1)),e}function tt(e){return"string"==typeof e?e:JSON.stringify(e)}function nt(e){if("string"==typeof e)try{return JSON.parse(e)}catch(e){}return e}function ot(e,t){if(!t||!e)return e;if(t in e)return e[t];for(var n=Array.isArray(t)?t:(t+"").split("."),r=e;n.length&&r;)r=r[n.shift()];return r}var at=function(){function e(t,n){Object(Be.a)(this,e),this.ctx=t,this.options=n,this._initState()}return Object(Ge.a)(e,[{key:"setUniversal",value:function(e,t){return Ke(t)?this.removeUniversal(e):(this.setState(e,t),this.setCookie(e,t),this.setLocalStorage(e,t),t)}},{key:"getUniversal",value:function(e){var t=this.getState(e);return Ke(t)&&(t=this.getCookie(e)),Ke(t)&&(t=this.getLocalStorage(e)),t}},{key:"syncUniversal",value:function(e,t){var n=this.getUniversal(e);return Ke(n)&&We(t)&&(n=t),We(n)&&this.setUniversal(e,n),n}},{key:"removeUniversal",value:function(e){this.removeState(e),this.removeLocalStorage(e),this.removeCookie(e)}},{key:"_initState",value:function(){var e=this;if(c.a.set(this,"_state",{}),this._useVuex=this.options.vuex&&this.ctx.store,this._useVuex){var t={namespaced:!0,state:function(){return e.options.initialState},mutations:{SET:function(e,t){c.a.set(e,t.key,t.value)}}};this.ctx.store.registerModule(this.options.vuex.namespace,t,{preserveState:Boolean(this.ctx.store.state[this.options.vuex.namespace])}),this.state=this.ctx.store.state[this.options.vuex.namespace]}else c.a.set(this,"state",{})}},{key:"setState",value:function(e,t){return"_"===e[0]?c.a.set(this._state,e,t):this._useVuex?this.ctx.store.commit(this.options.vuex.namespace+"/SET",{key:e,value:t}):c.a.set(this.state,e,t),t}},{key:"getState",value:function(e){return"_"!==e[0]?this.state[e]:this._state[e]}},{key:"watchState",value:function(e,t){var n=this;if(this._useVuex)return this.ctx.store.watch((function(t){return ot(t[n.options.vuex.namespace],e)}),t)}},{key:"removeState",value:function(e){this.setState(e,void 0)}},{key:"setLocalStorage",value:function(e,t){if(Ke(t))return this.removeLocalStorage(e);if("undefined"!=typeof localStorage&&this.options.localStorage){var n=this.options.localStorage.prefix+e;try{localStorage.setItem(n,tt(t))}catch(e){if(!this.options.ignoreExceptions)throw e}return t}}},{key:"getLocalStorage",value:function(e){if("undefined"!=typeof localStorage&&this.options.localStorage){var t=this.options.localStorage.prefix+e;return nt(localStorage.getItem(t))}}},{key:"removeLocalStorage",value:function(e){if("undefined"!=typeof localStorage&&this.options.localStorage){var t=this.options.localStorage.prefix+e;localStorage.removeItem(t)}}},{key:"getCookies",value:function(){var e=document.cookie;return Object(He.parse)(e||"")||{}}},{key:"setCookie",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(this.options.cookie){var r=this.options.cookie.prefix+e,o=Object.assign({},this.options.cookie.options,n),c=tt(t);Ke(t)&&(o.maxAge=-1),"number"==typeof o.expires&&(o.expires=new Date(1*new Date+864e5*o.expires));var l=Object(He.serialize)(r,c,o);return document.cookie=l,t}}},{key:"getCookie",value:function(e){if(this.options.cookie){var t=this.options.cookie.prefix+e,n=this.getCookies();return nt(n[t]?decodeURIComponent(n[t]):void 0)}}},{key:"removeCookie",value:function(e,t){this.setCookie(e,void 0,t)}}]),e}();function it(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return st(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return st(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var i=0,r=function(){};return{s:r,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,c=!0,l=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return c=e.done,e},e:function(e){l=!0,o=e},f:function(){try{c||null==n.return||n.return()}finally{if(l)throw o}}}}function st(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,n=new Array(t);i1?n-1:0),o=1;o1&&void 0!==arguments[1]?arguments[1]:{};this.error=e;var n,r=it(this._errorListeners);try{for(r.s();!(n=r.n()).done;){(0,n.value)(e,t)}}catch(e){r.e(e)}finally{r.f()}}},{key:"redirect",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];if(this.options.redirect){var n=this.options.fullPathRedirect?this.ctx.route.fullPath:this.ctx.route.path,r=this.options.redirect[e];if(r){if(this.options.rewriteRedirects&&("login"===e&&Je(n)&&!Ze(r,n)&&this.$storage.setUniversal("redirect",n),"home"===e)){var o=this.$storage.getUniversal("redirect");this.$storage.setUniversal("redirect",null),Je(o)&&(r=o)}r=this.callOnRedirect(r,n)||r,Ze(r,n)||(t?window.location.replace(r):this.ctx.redirect(r,this.ctx.query))}}}},{key:"onRedirect",value:function(e){this._redirectListeners.push(e)}},{key:"callOnRedirect",value:function(e,t){var n,r=it(this._redirectListeners);try{for(r.s();!(n=r.n()).done;){e=(0,n.value)(e,t)||e}}catch(e){r.e(e)}finally{r.f()}return e}},{key:"hasScope",value:function(e){var t=this.$state.user&&ot(this.$state.user,this.options.scopeKey);return!!t&&(Array.isArray(t)?t.includes(e):Boolean(ot(t,e)))}}]),e}();n(141).a.auth=function(e){if(!Ye(e.route,"auth",!1)){var t=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return[].concat.apply([],e.matched.map((function(e,n){return Object.keys(e.components).map((function(r){return t&&t.push(n),e.components[r]}))})))}(e.route,[]);if(t.length){var n=e.$auth.options.redirect,r=n.login,o=n.callback,c=Ye(e.route,"auth","guest"),l=function(t){return et(e.route.path)===et(t)};e.$auth.$state.loggedIn?(!r||l(r)||c)&&e.$auth.redirect("home"):c||o&&l(o)||e.$auth.redirect("login")}}};var ct=n(221),lt=n.n(ct);function ft(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var pt={token_type:"Bearer",response_type:"token",tokenName:"Authorization",token_key:"access_token",refresh_token_key:"refresh_token"},ht=function(){function e(t,n){Object(Be.a)(this,e),this.$auth=t,this.req=t.ctx.req,this.name=n._name,this.options=Object.assign({},pt,n)}var t,n,c,l;return Object(Ge.a)(e,[{key:"_scope",get:function(){return Array.isArray(this.options.scope)?this.options.scope.join(" "):this.options.scope}},{key:"_redirectURI",get:function(){var e=this.options.redirect_uri;return e||window.location.origin+this.$auth.options.redirect.callback}},{key:"mounted",value:(l=Object(r.a)(regeneratorRuntime.mark((function e(){var t;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=this.$auth.syncToken(this.name))&&this._setToken(t),e.next=4,this._handleCallback();case 4:if(e.sent){e.next=7;break}return e.abrupt("return",this.$auth.fetchUserOnce());case 7:case"end":return e.stop()}}),e,this)}))),function(){return l.apply(this,arguments)})},{key:"_setToken",value:function(e){this.$auth.ctx.app.$axios.setHeader(this.options.tokenName,e)}},{key:"_clearToken",value:function(){this.$auth.ctx.app.$axios.setHeader(this.options.tokenName,!1)}},{key:"reset",value:(c=Object(r.a)(regeneratorRuntime.mark((function e(){return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return this._clearToken(),this.$auth.setUser(!1),this.$auth.setToken(this.name,!1),this.$auth.setRefreshToken(this.name,!1),e.abrupt("return",Promise.resolve());case 5:case"end":return e.stop()}}),e,this)}))),function(){return c.apply(this,arguments)})},{key:"login",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.params,n=e.state,r=e.nonce,c=function(e){for(var t=1;t has been deprecated and will be removed in Nuxt 3, please use instead")),v.a.render(e,t)}})),c.a.component(S.name,S),c.a.component("NChild",S),c.a.component(D.name,D),Object.defineProperty(c.a.prototype,"$nuxt",{get:function(){var e=this.$root?this.$root.$options.$nuxt:null;return e||"undefined"==typeof window?e:window.$nuxt},configurable:!0}),c.a.use(f.a,{keyName:"head",attribute:"data-n-head",ssrAttribute:"data-n-head-ssr",tagIDKeyName:"hid"});var bt={name:"page",mode:"out-in",appear:!0,appearClass:"appear",appearActiveClass:"appear-active",appearToClass:"appear-to"};l.a.Store.prototype.registerModule;function yt(e){return xt.apply(this,arguments)}function xt(){return xt=Object(r.a)(regeneratorRuntime.mark((function e(t){var n,o,l,f,d,h,path,m,v=arguments;return regeneratorRuntime.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m=function(e,t){if(!e)throw new Error("inject(key, value) has no key provided");if(void 0===t)throw new Error("inject('".concat(e,"', value) has no value provided"));f[e="$"+e]=t,f.context[e]||(f.context[e]=t),o[e]=f[e];var n="__nuxt_"+e+"_installed__";c.a[n]||(c.a[n]=!0,c.a.use((function(){Object.prototype.hasOwnProperty.call(c.a.prototype,e)||Object.defineProperty(c.a.prototype,e,{get:function(){return this.$root.$options[e]}})})))},n=v.length>1&&void 0!==v[1]?v[1]:{},o=ye(t),e.next=5,$(0,n);case 5:return l=e.sent,o.$router=l,f=gt({head:{titleTemplate:"%s - videoads-webui",title:"videoads-webui",meta:[{charset:"utf-8"},{name:"viewport",content:"width=device-width, initial-scale=1"},{hid:"description",name:"description",content:""}],link:[{rel:"icon",type:"image/x-icon",href:"/favicon.ico"},{rel:"stylesheet",type:"text/css",href:"https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900&display=swap"},{rel:"stylesheet",type:"text/css",href:"https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"}],style:[],script:[]},store:o,router:l,nuxt:{defaultTransition:bt,transitions:[bt],setTransitions:function(e){return Array.isArray(e)||(e=[e]),e=e.map((function(e){return e=e?"string"==typeof e?Object.assign({},bt,{name:e}):Object.assign({},bt,e):bt})),this.$options.nuxt.transitions=e,e},err:null,dateErr:null,error:function(e){e=e||null,f.context._errored=Boolean(e),e=e?Object(w.p)(e):null;var n=f.nuxt;return this&&(n=this.nuxt||this.$options.nuxt),n.dateErr=Date.now(),n.err=e,t&&(t.nuxt.error=e),e}}},ve),o.app=f,d=t?t.next:function(e){return f.router.push(e)},t?h=l.resolve(t.url).route:(path=Object(w.f)(l.options.base,l.options.mode),h=l.resolve(path).route),e.next=13,Object(w.t)(f,{store:o,route:h,next:d,error:f.nuxt.error.bind(f),payload:t?t.payload:void 0,req:t?t.req:void 0,res:t?t.res:void 0,beforeRenderFns:t?t.beforeRenderFns:void 0,beforeSerializeFns:t?t.beforeSerializeFns:void 0,ssrContext:t});case 13:if(m("config",n),window.__NUXT__&&window.__NUXT__.state&&o.replaceState(window.__NUXT__.state),f.context.enablePreview=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};f.previewData=Object.assign({},e),m("preview",e)},"function"!=typeof $e){e.next=19;break}return e.next=19,$e(f.context,m);case 19:if("function"!=typeof Me){e.next=22;break}return e.next=22,Me(f.context,m);case 22:e.next=25;break;case 25:if("function"!=typeof ze){e.next=28;break}return e.next=28,ze(f.context,m);case 28:if("function"!=typeof mt){e.next=31;break}return e.next=31,mt(f.context,m);case 31:return f.context.enablePreview=function(){console.warn("You cannot call enablePreview() outside a plugin.")},e.next=34,new Promise((function(e,t){if(!l.resolve(f.context.route.fullPath).route.matched.length)return e();l.replace(f.context.route.fullPath,e,(function(n){if(!n._isRouter)return t(n);if(2!==n.type)return e();var o=l.afterEach(function(){var t=Object(r.a)(regeneratorRuntime.mark((function t(n,r){return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=3,Object(w.j)(n);case 3:f.context.route=t.sent,f.context.params=n.params||{},f.context.query=n.query||{},o(),e();case 8:case"end":return t.stop()}}),t)})));return function(e,n){return t.apply(this,arguments)}}())}))}));case 34:return e.abrupt("return",{store:o,app:f,router:l});case 35:case"end":return e.stop()}}),e)}))),xt.apply(this,arguments)}}},[[464,16,6,17]]]);