1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8026],{40528:function(a,e,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return r(94166)}])},94166:function(a,e,r){"use strict";r.r(e),r.d(e,{default:function(){return O}});var t=r(85893),n=r(87792),s=r(67294),l=r(13090),i=r(97365),o=r(79963),d=r(25133),u=r(91777),c=r(15924),v=r(19663);let m={labels:[],kpiValues:{}},p=a=>{var e;if(null==a?void 0:a.error)return m;let r=null==a?void 0:null===(e=a.data)||void 0===e?void 0:e.filter(a=>!!a.day_date);if(!(null==r?void 0:r.length))return m;let t=[...r].sort((a,e)=>a.day_date.localeCompare(e.day_date));if(!t.some(a=>Object.entries(a).some(a=>{let[e,r]=a;return"day_date"!==e&&0!==r})))return m;let n=t.map(a=>c.default.format(c.default.parse(a.day_date),{outFormat:v.default.DASHBOARD.OVERVIEW.CHART_DATE_FORMAT})),s={};return u.PN.forEach(a=>{s[a]=t.map(e=>{var r;return null!==(r=e[a])&&void 0!==r?r:0})}),{labels:n,kpiValues:s}};var _=r(98073),x=r(99493);let f=["total_cost","total_impressions","total_cpm","count_active_campaigns"],h=a=>{var e;let{appliedFilters:r}=a,{data:t,isLoading:n}=d.ZP.useDashboard({date:r.date,campaigns:r.campaigns}),s=(0,u.P)({elements:null==t?void 0:t.elements}),l=f.map(a=>s[a]).filter(a=>null!=a),{account_overview:i,channel_analysis:o,campaigns_table:c,goals_limit:v}=null!==(e=null==t?void 0:t.elements)&&void 0!==e?e:{};return{isLoading:n,hasContent:!!t,kpiMetrics:l,kpiMetricsById:s,accountOverviewData:p(i),accountOverviewHasError:!!(null==i?void 0:i.error),channelAnalysisData:(0,_.z)(o),channelAnalysisHasError:!!(null==o?void 0:o.error),campaignsData:null==c?void 0:c.data,goalsLimitData:(0,x.dJ)(v),goalsLimitHasError:!!(null==v?void 0:v.error)}};var g=r(46058),j=r(92472);let b={display:"flex",gap:"20px",width:"100%",flexDirection:{xs:"column",sm:"row"}};var y=()=>{let[a,e]=(0,s.useState)({date:(0,l.tt)("last7days")}),{isLoading:r,hasContent:n,kpiMetrics:d,kpiMetricsById:u,accountOverviewData:c,accountOverviewHasError:v,channelAnalysisData:m,channelAnalysisHasError:p,campaignsData:_}=h({appliedFilters:a});return n||r?(0,t.jsxs)(i.Z,{sx:g.r1,children:[(0,t.jsx)(o.SI,{onSubmit:a=>{e(a)},previousDate:a.date,previousCampaigns:a.campaigns}),(0,t.jsx)(o.uy,{metrics:d,isLoading:r}),(0,t.jsxs)(i.Z,{sx:b,children:[(0,t.jsx)(i.Z,{sx:{flex:2},children:(0,t.jsx)(o.x1,{data:c,hasError:v,isLoading:r,kpiMetricsById:u})}),(0,t.jsx)(i.Z,{sx:{flex:1},children:(0,t.jsx)(o.br,{data:m,hasError:p,isLoading:r})})]}),(0,t.jsx)(o.jS,{campaigns:_,isLoading:r})]}):(0,t.jsx)(j.l,{})};r(26475);var E=r(77527);r(25784),r(48499),r(85940),r(5506),(0,E.ZP)("iframe")({width:"100%",height:"100%",border:"none"});var w=r(33582),D=r(70456),O=()=>{let{isWhitelabel:a}=(0,D.y)();return(0,t.jsxs)(n.ZP,{children:[(0,t.jsx)(n.NC,{title:"Dashboard",breadcrumbs:!1,Icon:a?void 0:w.ds}),(0,t.jsx)(n.bU,{sx:{padding:0,display:"flex"},children:(0,t.jsx)(y,{})})]})}}},function(a){a.O(0,[2757,5653,6235,4080,4635,5042,6475,2888,9774,179],function(){return a(a.s=40528)}),_N_E=a.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.