function getChartColorsArray(e){if(null!==document.getElementById(e)){var t=document.getElementById(e).getAttribute("data-colors");return(t=JSON.parse(t)).map((function(e){var t=e.replace(" ","");if(!t.startsWith("rgba(var(")){var r=e.split(",");if(2==r.length){var o=getComputedStyle(document.documentElement).getPropertyValue(r[0]);return o="rgba("+o+","+r[1]+")"}return t}var a=t.match(/rgba\(var\(([^)]+)\),([\d.]+)\)/);if(a){var i=a[1],s=a[2];return"rgba("+getComputedStyle(document.documentElement).getPropertyValue(i).trim()+","+s+")"}}))}}$((function(){$("html").attr("dir");$(".patient-today").slick({slidesToShow:1,slidesToScroll:1,autoplay:!0,autoplaySpeed:2e3,arrows:!1,dots:!1})}));var appointmentsOverviewColors=getChartColorsArray("appointments-overview");if(appointmentsOverviewColors){var options={series:[{name:"New Patient",data:[200,150,210,160,250,110,210]},{name:"Follow-up Patient",data:[100,240,160,120,150,170,160]}],chart:{type:"bar",height:250},plotOptions:{bar:{horizontal:!1,columnWidth:"40%",borderRadius:4,borderRadiusApplication:"end"}},dataLabels:{enabled:!1},stroke:{show:!0,width:2,colors:["transparent"]},xaxis:{categories:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],axisBorder:{show:!1},axisTicks:{show:!1}},fill:{opacity:.7},colors:appointmentsOverviewColors,tooltip:{y:{formatter:function(e){return e+" Patients"}}},legend:{show:!1},grid:{show:!0,borderColor:"#e9ecef",strokeDashArray:3,padding:{top:-20,bottom:-10},xaxis:{lines:{show:!1}},yaxis:{lines:{show:!0}}}};(chart=new ApexCharts(document.querySelector("#appointments-overview"),options)).render()}var patientOverviewChartColors=getChartColorsArray("patient-overview-chart");if(patientOverviewChartColors){options={series:[38,25,44,35,25],chart:{width:255,type:"donut"},plotOptions:{pie:{startAngle:-90,endAngle:270}},colors:patientOverviewChartColors,dataLabels:{enabled:!1},fill:{type:"gradient",gradient:{shade:"light",type:"horizontal",shadeIntensity:.5,gradientToColors:patientOverviewChartColors,inverseColors:!0,opacityFrom:0,opacityTo:1,stops:[0,100]}},legend:{show:!1},tooltip:{enabled:!0,x:{show:!1},y:{formatter:function(e,t){return["Health","Nutrition","Exercise","Mental Wellbeing","Sleep"][t.seriesIndex]+": "+e+"%"}}},responsive:[{breakpoint:480,options:{chart:{width:200},legend:{position:"bottom"}}}]};(chart=new ApexCharts(document.querySelector("#patient-overview-chart"),options)).render()}options={series:[{name:"Distribution",data:[2,4,6,8,10,12,14,12,10,8,6,4,2]}],chart:{type:"bar",height:100,offsetY:10,toolbar:{show:!1}},plotOptions:{bar:{borderRadius:4,columnWidth:"40%",distributed:!0}},colors:["#a5bdcc","#a5bdcc","#a5bdcc","#a5bdcc","#a5bdcc","#a5bdcc","#fe5b5b","#a5bdcc","#a5bdcc","#a5bdcc","#a5bdcc","#a5bdcc","#a5bdcc"],xaxis:{labels:{show:!1},axisBorder:{show:!1},axisTicks:{show:!1}},yaxis:{labels:{show:!1},axisBorder:{show:!1},axisTicks:{show:!1}},grid:{show:!1,padding:{top:-50,bottom:-20,left:-30,right:-20}},legend:{show:!1},dataLabels:{enabled:!1},tooltip:{enabled:!1}};(chart=new ApexCharts(document.querySelector("#chart"),options)).render();var performanceChartColors=getChartColorsArray("performanceChart");if(performanceChartColors){var chart;options={series:[{name:"Performance",data:[44,65,51,78,38,50,21]}],chart:{type:"area",height:180,sparkline:{enabled:!0}},stroke:{curve:"smooth",width:2},fill:{type:"gradient",gradient:{shadeIntensity:1,opacityFrom:.5,opacityTo:0,gradientToColors:performanceChartColors,stops:[0,200]}},colors:performanceChartColors,tooltip:{enabled:!0,x:{show:!1}}};(chart=new ApexCharts(document.querySelector("#performanceChart"),options)).render()}