(function(t){function e(e){for(var a,o,r=e[0],c=e[1],l=e[2],m=0,g=[];m<r.length;m++)o=r[m],Object.prototype.hasOwnProperty.call(i,o)&&i[o]&&g.push(i[o][0]),i[o]=0;for(a in c)Object.prototype.hasOwnProperty.call(c,a)&&(t[a]=c[a]);u&&u(e);while(g.length)g.shift()();return n.push.apply(n,l||[]),s()}function s(){for(var t,e=0;e<n.length;e++){for(var s=n[e],a=!0,r=1;r<s.length;r++){var c=s[r];0!==i[c]&&(a=!1)}a&&(n.splice(e--,1),t=o(o.s=s[0]))}return t}var a={},i={logs:0},n=[];function o(e){if(a[e])return a[e].exports;var s=a[e]={i:e,l:!1,exports:{}};return t[e].call(s.exports,s,s.exports,o),s.l=!0,s.exports}o.m=t,o.c=a,o.d=function(t,e,s){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:s})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var s=Object.create(null);if(o.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)o.d(s,a,function(e){return t[e]}.bind(null,a));return s},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="/";var r=window["webpackJsonp"]=window["webpackJsonp"]||[],c=r.push.bind(r);r.push=e,r=r.slice();for(var l=0;l<r.length;l++)e(r[l]);var u=c;n.push([2,"chunk-vendors","chunk-common"]),s()})({"13c6":function(t,e,s){"use strict";s("52ae")},2:function(t,e,s){t.exports=s("77f0")},3537:function(t,e,s){"use strict";s("a153")},"4f84":function(t,e,s){},"528b":function(t,e,s){},"52ae":function(t,e,s){},"77f0":function(t,e,s){"use strict";s.r(e);s("e260"),s("e6cf"),s("cca6"),s("a79d"),s("92c6"),s("4888");var a=s("2b0e"),i=s("2f62"),n=s("4360"),o=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{attrs:{id:"app"}},[s("Title",{attrs:{title:"Logs",canDelete:"true"}}),t.isLoggedIn?t._e():s("AuthForm"),t.isLoggedIn?s("NavTabs",{on:{"on-update":t.tabUpdate}}):t._e(),t.isLoggedIn&&t.active.logs?s("div",[s("LogForm"),s("LogsTable")],1):t._e(),t.isLoggedIn&&t.active.piece?s("div",[s("PieceEngagement")],1):t._e(),s("Notification"),s("FooterBar")],1)},r=[],c=s("1da1"),l=(s("96cf"),s("159b"),s("b64b"),s("43b3")),u=s("7289"),m=s("7039"),g=s("d722"),d=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container",attrs:{id:"nav-tabs"}},[s("div",{staticClass:"tabs is-centered is-medium"},[s("ul",[s("li",{class:{"is-active":t.active.logs},attrs:{id:"images"},on:{click:function(e){return t.setActive("logs")}}},[t._m(0)]),s("li",{class:{"is-active":t.active.piece},attrs:{id:"devices"},on:{click:function(e){return t.setActive("piece")}}},[t._m(1)]),s("li",{class:{"is-active":t.active.content},attrs:{id:"devices"},on:{click:function(e){return t.setActive("content")}}},[t._m(2)]),s("li",{class:{"is-active":t.active.website},attrs:{id:"devices"},on:{click:function(e){return t.setActive("website")}}},[t._m(3)])])])])},p=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"fas fa-table",attrs:{"aria-hidden":"true"}})]),s("span",[t._v("Logs")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"far fa-circle",attrs:{"aria-hidden":"true"}})]),s("span",[t._v("Piece Engagement")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"far fa-circle",attrs:{"aria-hidden":"true"}})]),s("span",[t._v("Content Engagement")])])},function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("a",[s("span",{staticClass:"icon is-small"},[s("i",{staticClass:"far fa-circle",attrs:{"aria-hidden":"true"}})]),s("span",[t._v("Website Engagement ")])])}],f={name:"NavTabs",data:function(){return{active:{logs:!0,piece:!1,content:!1,website:!1}}},methods:{setActive:function(t){var e=this,s=!1;switch(Object.keys(this.active).forEach((function(t){e.active[t]=!1})),t){case"logs":this.active.logs=!0;break;case"piece":this.active.piece=!0;break;case"content":this.active.content=!0;break;case"website":this.active.website=!0;break;default:this.active.logs=!0,s=!0;break}s||this.$emit("on-update",t)}}},h=f,v=(s("c163"),s("2877")),b=Object(v["a"])(h,d,p,!1,null,"6b0538e8",null),C=b.exports,_=s("efac"),L=s("df40"),$=s("4093"),T=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container",staticStyle:{"padding-bottom":"30px"},attrs:{id:"media"}},[s("h2",{staticClass:"is-size-3"},[t._v("Users")]),s("div",{staticClass:"users-container"},t._l(t.users,(function(t){return s("UserSelect",{key:t.id,staticClass:"user-item",attrs:{user:t}})})),1),s("h2",{staticClass:"is-size-3"},[t._v("Codes")]),s("div",{staticClass:"code-container"},t._l(t.codes,(function(t){return s("CodeItem",{key:t,staticClass:"code-item",attrs:{code:t}})})),1),s("h2",{staticClass:"is-size-3"},[t._v("Timeline")]),s("div",{staticClass:"code-container"},[s("div",{staticClass:"time-selector-container"},[s("label",[t._v("From:")]),s("input",{staticClass:"time-selector",attrs:{type:"date"},on:{change:t.setFrom}})]),s("div",{staticClass:"time-selector-container"},[s("label",[t._v("To:")]),s("input",{staticClass:"time-selector",attrs:{type:"date"},on:{change:t.setTo}})])]),s("div",{staticStyle:{"text-align":"center"}},[s("button",{staticClass:"button is-primary is-large",class:{"is-loading":t.loadingData},staticStyle:{width:"400px"},on:{click:t.searchLogs}},[t._v("Search")])])])},y=[],x=(s("a9e3"),s("99af"),function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("input",{attrs:{type:"radio",name:t.user},domProps:{value:t.id},on:{input:t.updateSelectedUser}}),s("label",{staticClass:"user-log-name"},[t._v(t._s(t.username))])])}),S=[],E={props:["user"],name:"UserSelect",computed:{username:function(){return this.user.username},id:function(){return this.user.id}},methods:{updateSelectedUser:function(t){this.$store.commit("setLogFormUser",t.target.value)}}},w=E,k=(s("cdf6"),Object(v["a"])(w,x,S,!1,null,"77ba1cd1",null)),P=k.exports,O=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",[s("input",{attrs:{type:"checkbox",name:t.value,unchecked:""},domProps:{value:t.value},on:{input:t.updateSelectedCode}}),s("label",{staticClass:"code-button"},[t._v(t._s(t.value))])])},D=[],F={props:["code"],name:"CodeItem",computed:{value:function(){return this.code}},methods:{updateSelectedCode:function(t){this.$store.commit("updateLogFormCode",t.target.value)}}},I=F,N=(s("b494"),Object(v["a"])(I,O,D,!1,null,"4129af51",null)),A=N.exports,j={name:"LogForm",components:{UserSelect:P,CodeItem:A},data:function(){return{loadingData:!1}},computed:{users:function(){return this.$store.getters.getUsers},codes:function(){return this.$store.getters.getLoggingCodes}},methods:{searchLogs:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var s,a,i,n,o,r,c,l,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(s=t.$store.getters.getLogFormCodes,a=t.$store.getters.getLogFormUser,i=t.$store.getters.getToken,n=t.$store.getters.getLogFormFrom,o=t.$store.getters.getLogFormTo,r=t.$store.getters.getLogPageRequestAmount,c=t.$store.getters.getLogPageSize,null==a||null==i){e.next=15;break}return t.loadingData=!0,t.$store.commit("resetLogs"),e.next=12,g["a"].searchLogs(i,s,a,1,r,c,n,o);case 12:if(l=e.sent,l.pages.length>0){for(u=0;u<l.pages.length;u++)null!=l.pages&&t.$store.commit("addLogPage",l.pages[u]);t.$store.commit("setLogPageAdded",l.pages[l.pages.length-1].index),t.$store.commit("setLastPage",l.totalPages)}t.loadingData=!1;case 15:case"end":return e.stop()}}),e)})))()},setFrom:function(t){this.$store.commit("setLogFormFrom",Number(new Date(t.target.value).getTime()))},setTo:function(t){var e=new Date(t.target.value),s=new Date("".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate(),"T23:59:59.999Z"));this.$store.commit("setLogFormTo",Number(s))}}},R=j,U=(s("84e3"),Object(v["a"])(R,T,y,!1,null,"68206c1a",null)),W=U.exports,M=function(){var t=this,e=t.$createElement,s=t._self._c||e;return t.hasData?s("div",{staticClass:"container",staticStyle:{"margin-top":"30px","margin-bottom":"60px"},attrs:{id:"media"}},[s("div",{staticClass:"field has-addons",staticStyle:{"justify-content":"center","border-bottom-style":"solid","border-bottom-width":"2px","border-bottom-color":"#209cee"}},[s("p",{staticClass:"control style",staticStyle:{"margin-right":"20px"}},[s("button",{staticClass:"button is-info",on:{click:t.goToFirstPage}},[t._v("1")])]),s("p",{staticClass:"control"},[s("button",{staticClass:"button is-info",on:{click:t.previousPage}},[t._v("<-")])]),s("p",{staticClass:"control"},[s("button",{staticClass:"button is-info",attrs:{disabled:""}},[t._v(t._s(t.currentPageIndex))])]),s("p",{staticClass:"control"},[s("button",{staticClass:"button is-info",on:{click:t.nextPage}},[t._v("->")])]),s("p",{staticClass:"control style",staticStyle:{"margin-left":"20px"}},[s("button",{staticClass:"button is-info",on:{click:t.goToLastPage}},[t._v(t._s(t.lastPageIndex))])])]),s("table",{staticClass:"log-table"},[t._m(0),t._l(t.currentPageLogs,(function(t){return s("LogItem",{key:t._id,attrs:{log:t}})}))],2),s("div",{staticClass:"field has-addons",staticStyle:{"justify-content":"center","border-top-style":"solid","border-top-width":"2px","border-top-color":"#209cee"}},[s("p",{staticClass:"control style",staticStyle:{"margin-right":"20px"}},[s("button",{staticClass:"button is-info",on:{click:t.goToFirstPage}},[t._v("1")])]),s("p",{staticClass:"control"},[s("button",{staticClass:"button is-info",on:{click:t.previousPage}},[t._v("<-")])]),s("p",{staticClass:"control"},[s("button",{staticClass:"button is-info",attrs:{disabled:""}},[t._v(t._s(t.currentPageIndex))])]),s("p",{staticClass:"control"},[s("button",{staticClass:"button is-info",on:{click:t.nextPage}},[t._v("->")])]),s("p",{staticClass:"control style",staticStyle:{"margin-left":"20px"}},[s("button",{staticClass:"button is-info",on:{click:t.goToLastPage}},[t._v(t._s(t.lastPageIndex))])])])]):t._e()},B=[function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("tr",[s("th",[t._v("Code")]),s("th",[t._v("Timestamp")]),s("th",[t._v("Content")]),s("th",[t._v("Message")])])}],G=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("tr",[s("td",[t._v(t._s(t.code))]),s("td",[t._v(t._s(t.timestamp))]),s("td",{staticClass:"content"},[t._v(t._s(t.content))]),s("td",[t._v(t._s(t.message))])])},V=[],z=(s("5319"),s("ac1f"),{props:["log"],name:"LogItem",computed:{code:function(){return this.log.code},timestamp:function(){return this.log.timestamp.replace("T"," ").replace("Z","")},content:function(){for(var t="",e=JSON.parse(this.log.content),s=Object.keys(e),a=0;a<s.length;a++)"media"==s[a]?t+="".concat(s[a],": ").concat(JSON.stringify(e[s[a]]),"\n"):"token"!=s[a]&&"user"!=s[a]&&(t+="".concat(s[a],": ").concat(e[s[a]],"\n"));return t},message:function(){return this.log.message}}}),H=z,Y=(s("aaca"),Object(v["a"])(H,G,V,!1,null,"e902de7a",null)),J=Y.exports,Z={name:"LogsTable",components:{LogItem:J},computed:{currentPageLogs:function(){return this.$store.getters.getCurrentLogPage},currentPageIndex:function(){return this.$store.getters.getCurrentLogPageIndex},lastPageIndex:function(){return this.$store.getters.getLastLogPageIndex},hasData:function(){return null!=this.$store.getters.getCurrentLogPage}},methods:{nextPage:function(){var t=this.$store.getters.getToken;this.$store.commit("goToNextPage",t)},previousPage:function(){this.$store.commit("goToPreviousPage",this.$store.getters.getToken)},goToFirstPage:function(){var t=this.$store.getters.getToken;this.$store.commit("goToPage",{page:1,token:t})},goToLastPage:function(){var t=this.$store.getters.getToken;this.$store.commit("goToPage",{page:this.$store.getters.getLastLogPageIndex,token:t})}}},q=Z,K=(s("dbfe"),Object(v["a"])(q,M,B,!1,null,"740aebaf",null)),Q=K.exports,X=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container",attrs:{id:"media"}},[s("div",{staticStyle:{display:"inline"}},[s("h2",{staticClass:"is-size-3",staticStyle:{display:"inline"}},[t._v(t._s(this.pageTitle)+" ")]),t.showButtons?t._e():s("button",{staticClass:"button is-primary",staticStyle:{display:"inline","margin-top":"8px"},on:{click:t.goBack}},[t._v("Go Back")])]),t.showButtons?s("div",{staticClass:"media-collection"},[s("button",{staticClass:"button is-primary is-large is-outlined metric",on:{click:t.showNumberOfSessions}},[t._v("Number of Sessions")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Length of Sessions")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Number of Images Viewed")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Time of Day")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Time Between Sessions")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Total Wear Time")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Skipped Days")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("Wear Window")]),s("button",{staticClass:"button is-primary is-large is-outlined metric"},[t._v("False Starts")])]):s("div",[this.numberOfSessions?s("NumberOfSessions"):t._e()],1)])},tt=[],et=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticStyle:{"text-align":"center"}},[s("ChartForm"),s("svg",{staticClass:"chart",attrs:{height:t.height,width:t.width}})],1)},st=[],at=(s("d81d"),s("5698")),it=function(){var t=this,e=t.$createElement,s=t._self._c||e;return s("div",{staticClass:"container",staticStyle:{"padding-bottom":"30px"},attrs:{id:"media"}},[s("h2",{staticClass:"is-size-3"},[t._v("Users")]),s("div",{staticClass:"user-container"},t._l(t.users,(function(t){return s("UserSelect",{key:t.id,staticClass:"user-item",attrs:{user:t}})})),1),s("h2",{staticClass:"is-size-3"},[t._v("Timeline")]),s("div",{staticClass:"code-container"},[s("div",{staticClass:"time-selector-container"},[s("label",[t._v("From:")]),s("input",{staticClass:"time-selector",attrs:{type:"date"},on:{change:t.setFrom}})]),s("div",{staticClass:"time-selector-container"},[s("label",[t._v("To:")]),s("input",{staticClass:"time-selector",attrs:{type:"date"},on:{change:t.setTo}})])]),s("div",{staticStyle:{"text-align":"center"}},[s("button",{staticClass:"button is-primary is-large",class:{"is-loading":t.loadingData},staticStyle:{width:"400px"},on:{click:t.searchLogs}},[t._v("Search")])])])},nt=[],ot={name:"ChartForm",components:{UserSelect:P},data:function(){return{loadingData:!1}},computed:{users:function(){return this.$store.getters.getUsers},codes:function(){return this.$store.getters.getLoggingCodes}},methods:{searchLogs:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var s,a,i,n,o,r,c,l,u;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(s=t.$store.getters.getLogFormCodes,a=t.$store.getters.getLogFormUser,i=t.$store.getters.getToken,n=t.$store.getters.getLogFormFrom,o=t.$store.getters.getLogFormTo,r=t.$store.getters.getLogPageRequestAmount,c=t.$store.getters.getLogPageSize,null==a||null==i){e.next=15;break}return t.loadingData=!0,t.$store.commit("resetLogs"),e.next=12,g["a"].searchLogs(i,s,a,1,r,c,n,o);case 12:if(l=e.sent,l.pages.length>0){for(u=0;u<l.pages.length;u++)null!=l.pages&&t.$store.commit("addLogPage",l.pages[u]);t.$store.commit("setLogPageAdded",l.pages[l.pages.length-1].index),t.$store.commit("setLastPage",l.totalPages)}t.loadingData=!1;case 15:case"end":return e.stop()}}),e)})))()},setFrom:function(t){this.$store.commit("setLogFormFrom",Number(new Date(t.target.value).getTime()))},setTo:function(t){var e=new Date(t.target.value),s=new Date("".concat(e.getFullYear(),"-").concat(e.getMonth()+1,"-").concat(e.getDate(),"T23:59:59.999Z"));this.$store.commit("setLogFormTo",Number(s))}}},rt=ot,ct=(s("3537"),Object(v["a"])(rt,it,nt,!1,null,"5ef9923c",null)),lt=ct.exports,ut={name:"NumberOfSessions",components:{ChartForm:lt},mounted:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var s,a,i;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:return s="m",a=t.$store.getters.getToken,e.next=4,g["a"].numberOfSessions(a,"5db6ed2a18eef30011ee2a9a",s,15722208e5,1575331199999);case 4:return i=e.sent,e.abrupt("return",t.renderChart(i,s));case 6:case"end":return e.stop()}}),e)})))()},data:function(){return{data:{maxSession:6,chartData:[{timestamp:"11/24",sessions:0},{timestamp:"11/25",sessions:2},{timestamp:"11/26",sessions:3},{timestamp:"11/27",sessions:4},{timestamp:"11/28",sessions:1},{timestamp:"11/29",sessions:3},{timestamp:"11/30",sessions:0},{timestamp:"11/31",sessions:0},{timestamp:"12/01",sessions:3},{timestamp:"12/02",sessions:1},{timestamp:"12/03",sessions:2},{timestamp:"12/04",oldtimestamp:15748992e5,sessions:3},{timestamp:"12/05",oldtimestamp:15748992e5,sessions:0},{timestamp:"12/06",oldtimestamp:15748992e5,sessions:4},{timestamp:"12/07",oldtimestamp:15748992e5,sessions:5},{timestamp:"12/08",oldtimestamp:15748992e5,sessions:6},{timestamp:"12/09",oldtimestamp:15748992e5,sessions:3},{timestamp:"12/10",oldtimestamp:15748992e5,sessions:2},{timestamp:"12/11",oldtimestamp:15748992e5,sessions:3},{timestamp:"12/12",oldtimestamp:15748992e5,sessions:0},{timestamp:"12/13",oldtimestamp:15748992e5,sessions:0},{timestamp:"12/14",oldtimestamp:15748992e5,sessions:4},{timestamp:"12/15",oldtimestamp:15748992e5,sessions:3},{timestamp:"12/16",oldtimestamp:15748992e5,sessions:2},{timestamp:"12/17",oldtimestamp:15748992e5,sessions:1},{timestamp:"12/18",oldtimestamp:15748992e5,sessions:4}]},showTags:!1,height:600,width:600}},methods:{renderChart:function(t,e){var s=60,a=1e3,i=600,n=1e3-2*s,o=600-2*s,r=at["f"](".chart").attr("width",a).attr("height",i);this.chart=r.append("g").attr("transform","translate(".concat(s,", ").concat(s,")"));var c=at["e"]().range([o,0]).domain([0,t.maxSession]);this.chart.append("g").call(at["b"](c).ticks(t.maxSession));var l=at["d"]().range([0,n]).domain(t.chartData.map((function(t){return t.timestamp}))).padding(.2);this.chart.append("g").attr("transform","translate(0, ".concat(o,")")).call(at["a"](l));var u=this.chart.selectAll("rect").data(t.chartData).enter();u.append("rect").attr("class","bar").attr("x",(function(t){return l(t.timestamp)})).attr("y",(function(t){return c(t.sessions)})).attr("height",(function(t){return o-c(t.sessions)})).attr("width",l.bandwidth()+10).attr("x",(function(t){return l(t.timestamp)-5})).style("fill",at["c"]("steelblue")).attr("text-anchor","middle").attr("opacity",.6),r.append("text").attr("class","label").attr("x",-o/2-s).attr("y",s/2.4).attr("transform","rotate(-90)").attr("text-anchor","middle").text("Number of Sessions"),"d"==e?r.append("text").attr("class","label").attr("x",n/2+s).attr("y",o+1.7*s).attr("text-anchor","middle").text("Days"):"w"==e?r.append("text").attr("class","label").attr("x",n/2+s).attr("y",o+1.7*s).attr("text-anchor","middle").text("Weeks"):"m"==e&&r.append("text").attr("class","label").attr("x",n/2+s).attr("y",o+1.7*s).attr("text-anchor","middle").text("Months")}},computed:{}},mt=ut,gt=(s("b7bd"),Object(v["a"])(mt,et,st,!1,null,"6d71d5b4",null)),dt=gt.exports,pt={name:"PieceEngagement",components:{NumberOfSessions:dt},data:function(){return{pageTitle:"Piece Engagement",numberOfSessions:!1,lengthOfSessions:!1,numberOfImagesViewed:!1,timeOfDay:!1,timeBetweenSessions:!1,totalWearTime:!1,skippedDays:!1,wearWindow:!1,falseStarts:!1}},computed:{showButtons:function(){return!this.numberOfSessions&&!this.lengthOfSessions&&!this.numberOfImagesViewed&&!this.timeOfDay&&!this.timeBetweenSessions&&!this.totalWearTime&&!this.skippedDays&&!this.wearWindow&&!this.falseStarts}},methods:{goBack:function(){this.pageTitle="Piece Engagement",this.numberOfSessions=!1,this.lengthOfSessions=!1,this.numberOfImagesViewed=!1,this.timeOfDay=!1,this.timeBetweenSessions=!1,this.totalWearTime=!1,this.skippedDays=!1,this.wearWindow=!1,this.falseStarts=!1},showNumberOfSessions:function(){this.pageTitle="Number of Sessions",this.numberOfSessions=!0}}},ft=pt,ht=(s("13c6"),Object(v["a"])(ft,X,tt,!1,null,"31553195",null)),vt=ht.exports,bt={name:"app",components:{FooterBar:$["a"],Notification:_["a"],NavTabs:C,AuthForm:u["a"],Title:l["a"],LogForm:W,LogsTable:Q,PieceEngagement:vt},data:function(){return{active:{logs:!0,piece:!1,content:!1,website:!1}}},computed:{isLoggedIn:function(){return this.$store.getters.getToken}},methods:{tabUpdate:function(t){var e=this;Object.keys(this.active).forEach((function(t){e.active[t]=!1})),this.active[t]=!0}},mounted:function(){var t=this;return Object(c["a"])(regeneratorRuntime.mark((function e(){var s,a,i,n,o;return regeneratorRuntime.wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(s=m["a"].get("authToken"),!s){e.next=50;break}return t.$store.commit("updateToken",s),e.prev=3,e.next=6,g["a"].getUserLogsAmount(t.$store.getters.getToken);case 6:return a=e.sent,t.$store.commit("setUsers",a),t.$store.commit("addLoggingCode","WAKE_UP"),t.$store.commit("addLoggingCode","CONTENT_DISPLAYED"),t.$store.commit("addLoggingCode","SLEEP"),t.$store.commit("addLoggingCode","ACTIVITY_STARTED"),t.$store.commit("addLoggingCode","ACTIVITY_TERMINATED"),t.$store.commit("addLoggingCode","CHARGER_CONNECTED"),t.$store.commit("addLoggingCode","CHARGER_DISCONNECTED"),t.$store.commit("addLoggingCode","PULLED_CONTENT"),t.$store.commit("addLoggingCode","PUSHED_LOGS"),t.$store.commit("addLoggingCode","NEW_CONTENT_ADDED"),t.$store.commit("addLoggingCode","CONTENT_REMOVED"),t.$store.commit("addLoggingCode","STARTED_WATCHFACE"),t.$store.commit("addLoggingCode","STOPPED_WATCHFACE"),t.$store.commit("addLoggingCode","REGISTER"),t.$store.commit("addLoggingCode","LOGIN"),t.$store.commit("addLoggingCode","LOGIN_DEVICE"),t.$store.commit("addLoggingCode","NEW_MEDIA"),t.$store.commit("addLoggingCode","DEL_MEDIA"),t.$store.commit("addLoggingCode","GET_MEDIA"),t.$store.commit("addLoggingCode","GET_INF_MEDIA"),t.$store.commit("addLoggingCode","RECEIVED_LOGS"),t.$store.commit("addLoggingCode","WEBSITE"),t.$store.commit("addLoggingCode","PIECE"),t.$store.commit("addLoggingCode","ALL"),e.next=34,g["a"].getAllMedia(t.$store.getters.getToken);case 34:return i=e.sent,t.$store.commit("updateMedia",i),e.next=38,g["a"].getDevices(t.$store.getters.getToken);case 38:return n=e.sent,t.$store.commit("updateDevices",n),e.next=42,g["a"].getAllTags(t.$store.getters.getToken);case 42:o=e.sent,t.$store.commit("addTags",o),e.next=50;break;case 46:e.prev=46,e.t0=e["catch"](3),console.log(e.t0),L["a"].setNotification("danger","Something went wrong");case 50:case"end":return e.stop()}}),e,null,[[3,46]])})))()}},Ct=bt,_t=(s("794c"),Object(v["a"])(Ct,o,r,!1,null,null,null)),Lt=_t.exports;a["a"].use(i["a"]),a["a"].config.productionTip=!1,new a["a"]({store:n["a"],render:function(t){return t(Lt)}}).$mount("#app")},"794c":function(t,e,s){"use strict";s("fb778")},"84e3":function(t,e,s){"use strict";s("f6f2")},"8d06":function(t,e,s){},a153:function(t,e,s){},a1f4:function(t,e,s){},aaca:function(t,e,s){"use strict";s("4f84")},b494:function(t,e,s){"use strict";s("528b")},b7bd:function(t,e,s){"use strict";s("fe38")},c163:function(t,e,s){"use strict";s("8d06")},cdf6:function(t,e,s){"use strict";s("d1f8")},d1f8:function(t,e,s){},dbfe:function(t,e,s){"use strict";s("a1f4")},f6f2:function(t,e,s){},fb778:function(t,e,s){},fe38:function(t,e,s){}});
//# sourceMappingURL=logs.8ee281ed.js.map