1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[5104],{50361:function(e,n,t){var i=t(85990);e.exports=function(e){return i(e,5)}},56314:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/online-daily-report",function(){return t(19110)}])},43191:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return x},default:function(){return m}});var i=t(85893),l=t(37238),a=t(58250),o=t(22870),s=t(3968),r=t(88355),c=t(65716),d=t(61752),u=t(92132),x=!0;function m(){let{t:e}=(0,u.$G)();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(d.Z,{}),(0,i.jsx)(r.Z,{allowAnonymous:!0,children:(0,i.jsx)(s.W2,{children:(0,i.jsxs)("div",{className:"flex flex-col items-center justify-center max-w-full overflow-hidden my-20 h-full w-full",children:[(0,i.jsx)("div",{className:"w-[485px] max-w-full",children:(0,i.jsx)(o.E,{src:"/403.png",alt:"",fit:"contain"})}),(0,i.jsx)(c.Z,{href:"/",children:(0,i.jsx)(l.zx,{variant:"filled",leftIcon:(0,i.jsx)(a.Z,{name:"home",size:20}),children:e("Back to home")})})]})})})]})}},19110:function(e,n,t){"use strict";t.r(n),t.d(n,{__N_SSG:function(){return L},default:function(){return Z}});var i=t(85893),l=t(37238),a=t(79274),o=t(8021),s=t(99412),r=t(63301),c=t(19353),d=t(43191),u=t(10777),x=t(92132),m=t(67294),v=t(64715),h=t(10723),y=t(67017),p=t(25615),j=t(88793),f=t(24570),g=t(78042),D=t(31712),w=t(86213),b=t(49843),k=t(89985),S=t(86010),A=t(11163),T=t(27426),N=t(17534),M=t(50361),_=t.n(M);let G=[{key:"visits",label:"Visits"},{key:"duration",label:"Access duration"}];var O=()=>{let{t:e}=(0,x.$G)(),n=localStorage.getItem("locale"),t=(0,A.useRouter)(),M=(0,T.f)("tab"),O=["visits","duration"].includes(M)?M:"visits",[C,K]=(0,m.useState)(O),[L,Z]=(0,m.useState)({to:r.DL.getCurrentDate(),from:r.DL.getPastDate(30)}),Y={[e("Avg")]:!0,[e("Max")]:!0,[e("Distinct users")]:!0,["".concat(e("Time")," online GA4")]:!0,["".concat(e("Time")," online ").concat(e("System"))]:!0},[q,E]=(0,m.useState)(Y),F=(0,c.p5)([s.Z.ManagerContent]),{data:I,isLoading:z}=(0,u.a)({queryKey:["online-daily-report-visit",L],queryFn:async()=>{var n,t;let i=_()(L);i.to=r.DL.getEndOfDay(i.to);let l=await k.c.getOnlineDailyReport(i);return(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.map(n=>({name:null==n?void 0:n.dateStr,[e("Avg")]:Math.round(null==n?void 0:n.avg),[e("Max")]:null==n?void 0:n.max,[e("Distinct users")]:null==n?void 0:n.distinctUserCount})))||[]},enabled:F&&"visits"===C}),{data:P,isLoading:U}=(0,u.a)({queryKey:["online-daily-report-duration",L],queryFn:async()=>{var n,t;let i={fromDate:L.from,toDate:L.to},l=await N.P.getAvgUserOnlineDurationReport(i);return(null==l?void 0:null===(t=l.data)||void 0===t?void 0:null===(n=t.data)||void 0===n?void 0:n.map(n=>({name:r.DL.formatDateGMT({dateString:null==n?void 0:n.date,checkHour:!1}),["".concat(e("Time")," online GA4")]:(null==n?void 0:n.avgInSeconds)/60,["".concat(e("Time")," online ").concat(e("System"))]:(null==n?void 0:n.notifyAvgInSeconds)/60,timeOnlineGa4:r.DL.convertSecondsToMinutes(null==n?void 0:n.avgInSeconds,e),timeOnlineSystem:r.DL.convertSecondsToMinutes(null==n?void 0:n.notifyAvgInSeconds,e)})))||[]},enabled:F&&"duration"===C}),B=e=>{let{value:n}=e;E(e=>({...e,[n]:!e[n]}))},R=e=>{t.push({pathname:"online-daily-report",query:{tab:e}},null,{shallow:!0}),K(e),E(Y)};return F?(0,i.jsx)("div",{children:(0,i.jsxs)("div",{className:"flex flex-col md:flex-row border-b",children:[(0,i.jsx)("div",{className:"px-4",children:(0,i.jsx)(b.Z,{title:"User management",type:o.CN.UserManagement})}),(0,i.jsxs)(w.W,{size:"xl",children:[(0,i.jsx)(l.Oo,{data:[{title:e("Home"),href:"/"},{title:e("Online daily report")}]}),(0,i.jsxs)("div",{className:"space-y-6 mb-10",children:[(0,i.jsxs)("div",{className:"flex flex-col md:flex-row gap-2 w-full items-center justify-between",children:[(0,i.jsx)("div",{className:" flex rounded-md bg-[#f3f4f6]",children:null==G?void 0:G.map(n=>(0,i.jsx)("div",{className:(0,S.Z)(" justify-center flex items-center cursor-pointer rounded-md px-4 py-2 ",{"!bg-navy-primary font-semibold text-white ":n.key===C}),onClick:()=>R(n.key),children:e(n.label)},n.key))}),(0,i.jsxs)("div",{className:"flex gap-2 w-full md:w-1/3",children:[(0,i.jsx)(a.a,{placeholder:e("From date"),valueFormat:"DD/MM/YYYY",value:L.from,clearable:!0,size:"md",locale:n,className:"w-full",disabled:U||z,maxDate:new Date,onChange:e=>Z(n=>({...n,from:e}))}),(0,i.jsx)(a.a,{placeholder:e("To date"),valueFormat:"DD/MM/YYYY",disabled:U||z,locale:n,clearable:!0,size:"md",className:"w-full",value:L.to,maxDate:new Date,onChange:e=>Z(n=>({...n,to:e}))})]})]}),(0,i.jsxs)("div",{className:"bg-white rounded-md shadow-md p-0 md:p-6 ",children:["visits"===C&&(0,i.jsx)(v.h,{width:"100%",height:600,children:(0,i.jsxs)(h.w,{data:I,margin:{top:20,right:30,left:2
10,bottom:5},children:[(0,i.jsx)(y.q,{strokeDasharray:"3 3"}),(0,i.jsx)(p.K,{dataKey:"name"}),(0,i.jsx)(j.B,{}),(0,i.jsx)(f.u,{content:n=>{let{active:t,payload:l,label:a}=n;if(t&&l&&l.length){let n=l[0].payload;return(0,i.jsxs)("div",{style:{backgroundColor:"white",border:"1px solid #ccc",padding:"10px"},children:[(0,i.jsxs)("p",{children:[(0,i.jsxs)("strong",{children:[e("Date"),":"]})," ",a]}),(0,i.jsxs)("p",{children:[(0,i.jsxs)("strong",{children:[e("Avg"),":"]})," ",null==n?void 0:n[e("Avg")]," ",e("People/hour").toLowerCase()]}),(0,i.jsxs)("p",{children:[(0,i.jsxs)("strong",{children:[e("Max"),":"]})," ",null==n?void 0:n[e("Max")]]}),(0,i.jsxs)("p",{children:[(0,i.jsxs)("strong",{children:[e("Distinct users"),":"]})," ",null==n?void 0:n[e("Distinct users")]]})]})}return null}}),(0,i.jsx)(g.D,{onClick:B,payload:[{value:e("Avg"),inactive:!q[e("Avg")],type:"line",color:"blue"},{value:e("Distinct users"),inactive:!q[e("Distinct users")],type:"line",color:"black"},{value:e("Max"),inactive:!q[e("Max")],type:"line",color:"green"}]}),(0,i.jsx)(D.x,{type:"monotone",dataKey:e("Avg"),stroke:"blue",strokeOpacity:q[e("Avg")]?1:0,activeDot:{r:q[e("Avg")]?1:0}}),(0,i.jsx)(D.x,{type:"monotone",dataKey:e("Distinct users"),stroke:"black",strokeOpacity:q[e("Distinct users")]?1:0,activeDot:{r:q[e("Distinct users")]?1:0}}),(0,i.jsx)(D.x,{type:"monotone",dataKey:e("Max"),stroke:"green",strokeOpacity:q[e("Max")]?1:0,activeDot:{r:q[e("Max")]?1:0}})]})}),"duration"===C&&(0,i.jsx)(v.h,{width:"100%",height:600,children:(0,i.jsxs)(h.w,{data:P,margin:{top:20,right:30,left:20,bottom:5},children:[(0,i.jsx)(y.q,{strokeDasharray:"3 3"}),(0,i.jsx)(p.K,{dataKey:"name"}),(0,i.jsx)(j.B,{}),(0,i.jsx)(f.u,{content:n=>{let{active:t,payload:l,label:a}=n;if(t&&l&&l.length){let n=l[0].payload;return(0,i.jsxs)("div",{style:{backgroundColor:"white",border:"1px solid #ccc",padding:"10px"},children:[(0,i.jsxs)("p",{children:[(0,i.jsxs)("strong",{children:[e("Date"),":"]})," ",a]}),(0,i.jsxs)("p",{children:[(0,i.jsx)("strong",{children:"".concat(e("Time")," online GA4:")})," ",null==n?void 0:n.timeOnlineGa4]}),(0,i.jsxs)("p",{children:[(0,i.jsx)("strong",{children:"".concat(e("Time")," online ").concat(e("System"),":")})," ",null==n?void 0:n.timeOnlineSystem]})]})}return null}}),(0,i.jsx)(g.D,{onClick:B,payload:[{value:"".concat(e("Time")," online GA4"),inactive:!q["".concat(e("Time")," online GA4")],type:"line",color:"blue"},{value:"".concat(e("Time")," online ").concat(e("System")),inactive:!q["".concat(e("Time")," online ").concat(e("System"))],type:"line",color:"green"}]}),(0,i.jsx)(D.x,{type:"monotone",dataKey:"".concat(e("Time")," online GA4"),stroke:"blue",strokeOpacity:q["".concat(e("Time")," online GA4")]?1:0,activeDot:{r:q["".concat(e("Time")," online GA4")]?1:0}}),(0,i.jsx)(D.x,{type:"monotone",dataKey:"".concat(e("Time")," online ").concat(e("System")),stroke:"green",strokeOpacity:q["".concat(e("Time")," online ").concat(e("System"))]?1:0,activeDot:{r:q["".concat(e("Time")," online ").concat(e("System"))]?1:0}})]})})]})]})]})]})}):(0,i.jsx)(d.default,{})},C=t(88355),K=t(61752),L=!0,Z=()=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(K.Z,{}),(0,i.jsx)(C.Z,{bgGray:!0,children:(0,i.jsx)(O,{})})]})}},function(e){e.O(0,[777,5990,460,723,735,2888,9774,179],function(){return e(e.s=56314)}),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.