1import i from"./apexcharts.esm-CfSzfZrp.js";import{a as S,t as a}from"./app-AZEPsVvL.js";import"./locale-switcher-BugcWviK.js";function z(){const o=window.ANALYTICS_DATA||{labels:[],sent:[],delivered:[],failed:[],queued:[],types:{labels:[],values:[]},devices:{labels:[],values:[]},heatmap:[]},c={fontFamily:"Plus Jakarta Sans, system-ui, sans-serif"},d=S("ink-900",.08);function f(){const t=document.querySelector("#hero-spark");t&&new i(t,{chart:{type:"area",height:60,sparkline:{enabled:!0}},colors:[a("wa-green")],stroke:{curve:"smooth",width:2.5},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.5,opacityTo:0,stops:[0,100]}},series:[{name:"Sent",data:o.sent}],tooltip:{y:{formatter:e=>e.toLocaleString()+" msg"},x:{show:!1}}}).render()}function h(){const t=document.querySelector("#chart-volume");t&&new i(t,{chart:{type:"area",height:320,...c,toolbar:{show:!1},animations:{enabled:!0}},colors:[a("wa-deep"),a("wa-teal"),a("accent-coral")],stroke:{curve:"smooth",width:[3,2,2],dashArray:[0,6,0]},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.32,opacityTo:.02,stops:[0,90,100]}},series:[{name:"Sent",data:o.sent},{name:"Delivered",data:o.delivered},{name:"Failed",data:o.failed}],dataLabels:{enabled:!1},grid:{borderColor:d,strokeDashArray:4},xaxis:{categories:o.labels,labels:{style:{fontSize:"10px"}},tickAmount:8,axisBorder:{show:!1},axisTicks:{show:!1}},yaxis:{labels:{formatter:e=>e>=1e3?(e/1e3).toFixed(0)+"k":e,style:{fontSize:"10px"}}},tooltip:{y:{formatter:e=>e.toLocaleString()+" msg"}},legend:{show:!1},markers:{size:0,hover:{size:5}}}).render()}function y(){const t=document.querySelector("#chart-totals");t&&new i(t,{chart:{type:"bar",height:280,stacked:!0,...c,toolbar:{show:!1}},colors:[a("wa-deep"),a("accent-amber"),a("accent-coral")],series:[{name:"Sent",data:o.sent},{name:"Queued",data:o.queued},{name:"Failed",data:o.failed}],plotOptions:{bar:{columnWidth:"55%",borderRadius:3}},dataLabels:{enabled:!1},grid:{borderColor:d,strokeDashArray:4},xaxis:{categories:o.labels,labels:{style:{fontSize:"10px"}},tickAmount:6,axisBorder:{show:!1},axisTicks:{show:!1}},yaxis:{labels:{formatter:e=>e>=1e3?(e/1e3).toFixed(0)+"k":e,style:{fontSize:"10px"}}},tooltip:{y:{formatter:e=>e.toLocaleString()+" msg"}},legend:{position:"bottom",fontSize:"11px"}}).render()}function b(){const t=document.querySelector("#chart-rates");if(!t)return;const e=(o.sent||[]).reduce((r,l)=>r+l,0),n=(o.delivered||[]).reduce((r,l)=>r+l,0),s=(o.queued||[]).reduce((r,l)=>r+l,0),u=(o.failed||[]).reduce((r,l)=>r+l,0),p=e+s+u,m=r=>p>0?Number((r/p*100).toFixed(1)):0;new i(t,{chart:{type:"donut",height:280,...c},colors:[a("wa-deep"),a("accent-amber"),a("accent-coral")],labels:["Delivered","Queued","Failed"],series:[m(n),m(s),m(u)],stroke:{width:3,colors:[a("paper-0")]},legend:{position:"bottom",fontSize:"11px"},dataLabels:{formatter:r=>r.toFixed(1)+"%"},plotOptions:{pie:{donut:{size:"68%",labels:{show:!0,value:{fontSize:"22px",fontFamily:"Fraunces, serif",fontWeight:500},total:{show:!0,label:"events",formatter:()=>p.toLocaleString()}}}}},tooltip:{y:{formatter:r=>r+"%"}}}).render()}function g(){const t=document.querySelector("#chart-types");if(!t)return;const e=o.types?.labels||["Text"],n=o.types?.values||[0];new i(t,{chart:{type:"donut",height:280,...c},colors:["#7B61FF",a("wa-deep"),a("accent-amber"),a("accent-coral"),"#13478A"],labels:e,series:n,stroke:{width:3,colors:[a("paper-0")]},legend:{position:"bottom",fontSize:"11px"},dataLabels:{formatter:s=>s.toFixed(1)+"%"},plotOptions:{pie:{donut:{size:"68%"}}}}).render()}function x(){const t=document.querySelector("#chart-devices");if(!t)return;const e=o.devices?.labels||[],n=o.devices?.values||[];if(!e.length){t.innerHTML='<div class="text-[12px] text-ink-500 py-6 text-center">No connected devices yet.</div>';return}new i(t,{chart:{type:"bar",height:280,...c,toolbar:{show:!1}},colors:[a("wa-deep")],series:[{name:"Messages",data:n}],plotOptions:{bar:{horizontal:!0,borderRadius:6,barHeight:"58%"}},dataLabels:{enabled:!0,style:{colors:[a("paper-0")],fontWeight:600,fontSize:"11px"},formatter:s=>
1s.toLocaleString(),offsetX:-2},xaxis:{categories:e,labels:{formatter:s=>s.toLocaleString(),style:{fontSize:"10px"}}},yaxis:{labels:{style:{fontSize:"11px"}}},grid:{borderColor:d,strokeDashArray:4},tooltip:{y:{formatter:s=>s.toLocaleString()+" msg"}}}).render()}function w(){const t=document.querySelector("#chart-heatmap");if(!t)return;const e=o.heatmap&&o.heatmap.length?o.heatmap:[];if(!e.length){t.innerHTML='<div class="text-[12px] text-ink-500 py-6 text-center">No message volume in this window.</div>';return}new i(t,{chart:{type:"heatmap",height:320,...c,toolbar:{show:!1}},series:e,dataLabels:{enabled:!1},colors:[a("wa-deep")],plotOptions:{heatmap:{radius:4,useFillColorAsStroke:!1,colorScale:{ranges:[{from:0,to:0,color:a("paper-50"),name:"none"},{from:1,to:5,color:"#CFE3DA",name:"low"},{from:6,to:20,color:"#7FB89D",name:"med"},{from:21,to:50,color:"#2A8865",name:"high"},{from:51,to:9999,color:a("wa-deep"),name:"peak"}]}}},xaxis:{type:"category",labels:{style:{fontSize:"10px",fontFamily:"JetBrains Mono"}}},yaxis:{labels:{style:{fontSize:"11px"}}},tooltip:{y:{formatter:n=>n+" messages"}},grid:{padding:{left:8,right:8}}}).render()}f(),h(),y(),b(),g(),x(),w()}export{z as default};
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.