{"version":3,"file":"bar_google-Cr-UAMfi.js","sources":["../assets/elementor/js/google-chart/BarGoogleChart.js"],"sourcesContent":["import GraphinaGoogleChartBase from './GraphinaGoogleChartBase';\n\n// Child class specifically for Bar Charts\nexport default class BarChart extends GraphinaGoogleChartBase {\n // Setup handlers for Bar Chart\n setUpChartsHandler() {\n this.chartHandlers = {\n bar_google: (element) => this.observeChartElement(element, 'BarChart'),\n };\n }\n\n // Setup IntersectionObserver to call setupChart when the element is in the viewport\n observeChartElement(element, chartType) {\n if (gcfe_public_localize.view_port === 'off') {\n if (!this.observer) {\n this.observer = new IntersectionObserver((entries) => {\n entries.forEach((entry) => {\n if (entry.isIntersecting) {\n // Element is in viewport; initialize the chart\n this.setupChart(jQuery(entry.target), chartType);\n // Stop observing the element after initializing the chart\n this.observer.unobserve(entry.target);\n }\n });\n }, { threshold: 0.1 }); // Trigger when at least 10% of the element is visible\n }\n this.observer.observe(element[0]); // Start observing the chart element\n } else {\n this.setupChart(element, chartType);\n }\n }\n\n // Customize chart options for Bar Charts (if needed)\n getFinalChartOptions(chartOptions) {\n // Customize options here if needed\n return chartOptions;\n }\n\n setupTableData(dynamicData,dataTable,googleChart,googleChartTexture,extraData){\n if(dynamicData?.google_chart_data?.title_array.length > 0 && dynamicData?.google_chart_data?.data.length > 0){\n dataTable.addColumn('string',dynamicData.google_chart_data.title)\n dynamicData.google_chart_data.title_array.forEach((col) => {\n dataTable.addColumn('number',col);\n if(dynamicData.google_chart_data.annotation_show){\n dataTable.addColumn({type:'string',role:'annotation'});\n }\n });\n dynamicData.google_chart_data.data.forEach(row => dataTable.addRow(row));\n googleChart.show()\n googleChartTexture.hide()\n }else if(dynamicData.columns.length > 0 && dynamicData.rows.length > 0){\n dynamicData.columns.forEach((col, index) => {\n dataTable.addColumn(col);\n });\n\n dynamicData.rows.forEach(row => dataTable.addRow(row));\n }else{\n googleChart.hide()\n googleChartTexture.show()\n }\n }\n}\n// Initialize Bar Chart\nnew BarChart();\n"],"names":["BarChart","GraphinaGoogleChartBase","element","chartType","entries","entry","chartOptions","dynamicData","dataTable","googleChart","googleChartTexture","extraData","_a","_b","col","row","index"],"mappings":"0DAGe,MAAMA,UAAiBC,CAAwB,CAE1D,oBAAqB,CACjB,KAAK,cAAgB,CACjB,WAAaC,GAAY,KAAK,oBAAoBA,EAAS,UAAU,CACxE,CACT,CAGI,oBAAoBA,EAASC,EAAW,CAChC,qBAAqB,YAAc,OAC9B,KAAK,WACN,KAAK,SAAW,IAAI,qBAAsBC,GAAY,CAClDA,EAAQ,QAASC,GAAU,CACnBA,EAAM,iBAEN,KAAK,WAAW,OAAOA,EAAM,MAAM,EAAGF,CAAS,EAE/C,KAAK,SAAS,UAAUE,EAAM,MAAM,EAEhE,CAAqB,CACrB,EAAmB,CAAE,UAAW,EAAG,CAAE,GAEzB,KAAK,SAAS,QAAQH,EAAQ,CAAC,CAAC,GAEhC,KAAK,WAAWA,EAASC,CAAS,CAE9C,CAGI,qBAAqBG,EAAc,CAE/B,OAAOA,CACf,CAEI,eAAeC,EAAYC,EAAUC,EAAYC,EAAmBC,EAAU,WACvEC,EAAAL,GAAA,YAAAA,EAAa,oBAAb,YAAAK,EAAgC,YAAY,QAAS,KAAKC,EAAAN,GAAA,YAAAA,EAAa,oBAAb,YAAAM,EAAgC,KAAK,QAAS,GACvGL,EAAU,UAAU,SAASD,EAAY,kBAAkB,KAAK,EAChEA,EAAY,kBAAkB,YAAY,QAASO,GAAQ,CACvDN,EAAU,UAAU,SAASM,CAAG,EAC7BP,EAAY,kBAAkB,iBAC7BC,EAAU,UAAU,CAAC,KAAK,SAAS,KAAK,YAAY,CAAC,CAEzE,CAAa,EACDD,EAAY,kBAAkB,KAAK,QAAQQ,GAAOP,EAAU,OAAOO,CAAG,CAAC,EACvEN,EAAY,KAAI,EAChBC,EAAmB,KAAI,GAClBH,EAAY,QAAQ,OAAS,GAAKA,EAAY,KAAK,OAAS,GACjEA,EAAY,QAAQ,QAAQ,CAACO,EAAKE,IAAU,CACxCR,EAAU,UAAUM,CAAG,CACvC,CAAa,EAEDP,EAAY,KAAK,QAAQQ,GAAOP,EAAU,OAAOO,CAAG,CAAC,IAErDN,EAAY,KAAI,EAChBC,EAAmB,KAAI,EAEnC,CACA,CAEA,IAAIV"}