(()=>{"use strict";const t=class{constructor(t){this.chart=t,this.chart.parentNode.getAttribute("data-chart-type")?this.parentChart=this.chart.parentNode:this.parentChart=this.chart.parentNode.parentNode,this.chartType=this.parentChart.getAttribute("data-chart-type"),this.dataString=this.parentChart.getAttribute("data-data"),this.optionsString=this.parentChart.getAttribute("data-options"),this.getChart()}getChart(){const t=this.chart.getContext("2d");new Chart(t,{type:this.chartType,data:JSON.parse(this.dataString),options:JSON.parse(this.optionsString)})}};document.addEventListener("DOMContentLoaded",()=>{document.querySelectorAll(".ablocks-chart-canvas").forEach(a=>{new t(a)})})})();