"use strict";(globalThis.webpackChunkpojo_accessibility=globalThis.webpackChunkpojo_accessibility||[]).push([[1039],{14823(e,t,a){function n(e,t="warning"){}a.d(t,{m:()=>n}),new Set},84090(e,t,a){a.d(t,{LineChart:()=>g});var n=a(42666),i=a(82624),r=a(85848),s=a(26457),l=a(73124),o=a(55646),d=a(94284),c=a(38443),h=a(10790);const u=e=>{const{dataIndex:t,axis:a,series:n}=e;return n[0].data[t]?(0,h.jsxs)(d.A,{sx:{p:2,paddingBlockEnd:1},children:[(0,h.jsx)(r.A,{variant:"body2",color:"text.tertiary",children:(0,c.dateI18n)("d F",a.data[t],!1)}),(0,h.jsx)(r.A,{variant:"h6",children:n[0].data[t]})]}):null};var x=a(37082),p=a(44694);const g=()=>{const e=(0,s.A)(),{stats:t}=(0,p.p)(),a=t.dates.reduce((e,t)=>e+Number(t.total),0),d=t.dates.length>0;return(0,h.jsxs)(n.A,{variant:"outlined",sx:{height:"100%"},children:[(0,h.jsx)(i.A,{title:(0,h.jsx)(o.f,{}),subheader:a>0?(0,h.jsx)(r.A,{variant:"h3",component:"p",sx:{height:"50px"},children:a.toString()}):null,sx:{paddingBlockEnd:0}}),d&&(0,h.jsx)(l.b,{series:[{type:"line",curve:"linear",data:t.dates.map(e=>e.total),color:e.palette.info.main}],xAxis:[{scaleType:"point",data:t.dates.map(e=>e.date),valueFormatter:(e,t)=>"tick"===t.location?(0,c.dateI18n)("d.m",e,!1):e}],slots:{axisContent:u},tooltip:{trigger:a?"axis":"none"},height:250}),0===t.dates.length&&(0,h.jsx)(x.Y,{})]})}},7365(e,t,a){a.d(t,{PieChart:()=>A});var n=a(42666),i=a(82624),r=a(411),s=a(21164),l=a(2077),o=a(78398),d=a(37082),c=a(89968),h=a(94284),u=a(85848),x=a(95231),p=a(10790);const g=e=>{const{itemData:t,series:a}=e;return(0,p.jsxs)(h.A,{sx:{p:2,paddingBlockEnd:1},children:[(0,p.jsx)(m,{variant:"body2",color:"text.tertiary",itemColor:a.data[t.dataIndex].color,children:a.data[t.dataIndex].featureTitle}),(0,p.jsx)(u.A,{variant:"h6",children:`${a.data[t.dataIndex].featureClicks} (${a.data[t.dataIndex].value}%)`})]})},m=(0,x.I)(u.A,{shouldForwardProp:e=>"itemColor"!==e})`
	position: relative;
	padding-inline-start: 18px;
	&:before {
		content: '';
		position: absolute;
		left: 0;
		top: calc(50% - 5px);
		display: inline-block;
		width: 10px;
		height: 10px;
		border-radius: 50%;
		background-color: ${e=>e.itemColor};
	}
`;var v=a(86087),b=a(43331),f=a(44694),j=a(42679);const k=({enabled:e,children:t})=>e?(0,p.jsx)(r.A,{value:!0,children:t}):t,A=()=>{const{stats:e}=(0,f.p)(),{isRTL:t=!1}=(0,j.F)(),a=(0,v.useRef)(null),[r,h]=(0,v.useState)(null),u=()=>h(Number(a.current.offsetWidth)/4-32);(0,v.useEffect)(()=>(window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)),[]),(0,v.useEffect)(()=>{u()},[a]);const x=e.elements?.reduce((e,{event:t,total:a})=>(e[t]=(e[t]||0)+Number(a),e),{}),m=Object.entries(x).map(([e,t])=>({event:e,total:t})).sort((e,t)=>t.value-e.value),A=m.slice(0,6),y=m.slice(6).reduce((e,t)=>e+Number(t.total),0);y>0&&A.push({event:"other",total:y});const C=A.reduce((e,t)=>e+Number(t.total),0),w=a.current?.offsetWidth??0,T=Math.max(w-105,0),E=t&&T>0?T-(r+48):r+48,I=A.map((e,t)=>{const a=parseFloat((e.total/C*100).toFixed(2));return{label:`${b.xT[e.event].chartsTitle}: ${a}%`,featureTitle:b.xT[e.event].chartsTitle,featureClicks:e.total,color:b.Ph[t],value:a}}),S=e.elements.length>0&&null!==r;return(0,p.jsxs)(n.A,{variant:"outlined",sx:{height:"100%"},ref:a,children:[(0,p.jsx)(i.A,{title:(0,p.jsx)(c.B,{}),sx:{paddingBlockEnd:0}}),S&&(0,p.jsx)(k,{enabled:t,children:(0,p.jsx)(l.r,{series:[{data:I,innerRadius:r<100?r-15:85,outerRadius:r<100?r:100,paddingAngle:0,cornerRadius:0,startAngle:0,endAngle:360,cx:E,cy:150}],sx:{[`& .${o.hM.root}`]:{fontSize:"2.875rem",lineHeight:1.43,letterSpacing:"0.01071em"},[`& .${s.O.mark}`]:{ry:10}},slots:{itemContent:g},slotProps:{legend:{itemMarkWidth:10,itemMarkHeight:10,markGap:8,itemGap:12,padding:32,labelStyle:{fontWeight:400,fontSize:"0.875rem",lineHeight:1.43,letterSpacing:"0.01071em"}}},height:300})}),0===e.elements.length&&(0,p.jsx)(d.Y,{})]})}}}]);