!function(e){"use strict";e.fn.awbAnimateCounterCircles=function(){e.each(fusion.getObserverSegmentation(e(this)),function(t){var r=fusion.getAnimationIntersectionData(t),a=new IntersectionObserver(function(t,r){e.each(t,function(t,n){fusion.shouldObserverEntryAnimate(n,r)&&(e(n.target).awbCalculateCircleSize(!0),e(n.target).awbDrawCircles(),a.unobserve(n.target),setTimeout(function(){i.observe(e(n.target).parent()[0])},e(n.target).children(".counter-circle").attr("data-speed")))})},r),i=new ResizeObserver(function(t){e.each(t,function(t,r){e(r.target).is(":hidden")||e(r.target).children().awbRedrawCircles()})});e(this).children().each(function(){a.observe(this)})})},e.fn.awbDrawCircles=function(){var t=e(this),r=t.children(".counter-circle").attr("data-countdown"),a=t.children(".counter-circle").attr("data-filledcolor"),i=t.children(".counter-circle").attr("data-unfilledcolor"),n=t.children(".counter-circle").attr("data-scale"),c=t.children(".counter-circle").attr("data-size"),o=t.children(".counter-circle").attr("data-speed"),l=t.children(".counter-circle").attr("data-strokesize"),s=t.children(".counter-circle").attr("data-percent-original");n&&(n=e("body").css("color")),r?(t.children(".counter-circle").attr("data-percent",100),t.children(".counter-circle").easyPieChart({barColor:a,trackColor:i,scaleColor:n,scaleLength:5,lineCap:"round",lineWidth:l,size:c,rotate:0,animate:{duration:o,enabled:!0}}),t.children(".counter-circle").data("easyPieChart").enableAnimation(),t.children(".counter-circle").data("easyPieChart").update(s)):t.children(".counter-circle").easyPieChart({barColor:a,trackColor:i,scaleColor:n,scaleLength:5,lineCap:"round",lineWidth:l,size:c,rotate:0,animate:{duration:o,enabled:!0}})},e.fn.awbCalculateCircleSize=function(t){var r,a,i,n=e(this);n.attr("data-currentsize",n.width()),n.removeAttr("style"),n.children().removeAttr("style"),r=n.data("originalsize"),a=n.parent().width(),i=a<n.data("currentsize")?a:r,n.css({width:i,height:i}),n.find(".fusion-counter-circle").each(function(){e(this).css({width:i,height:i,"font-size":50*i/220}),e(this).data("size",i),e(this).data("strokesize",i/220*11),t||e(this).data("animate",!1),e(this).attr("data-size",i),e(this).attr("data-strokesize",i/220*11)})},e.fn.awbRedrawCircles=function(){var t=e(this);t.awbCalculateCircleSize(!1),t.find("canvas").remove(),t.find(".counter-circle").removeData("easyPieChart"),t.awbDrawCircles()}}(jQuery),jQuery(window).on("load",function(){jQuery(".fusion-counters-circle").awbAnimateCounterCircles()}),jQuery(window).on("fusion-element-render-fusion_counter_circle",function(e,t){jQuery('div[data-cid="'+t+'"]').awbRedrawCircles()});