var AmWheel={id:0,getWheelWrapper:function(){var t=document.createElement("div");return t.classList.add("wheel-wrapper"),t},wheel:function(t){return{loopAmount:0,loopSpeed:0,id:this.id++,percentage:t.percentage,title:t.title,strokeColor:t.strokeColor,scrollElement:t.scrollElement}},getTemplate:function(t){return`\n\t\t
\n\t\t\t\n\t\t\t \n\t\t\t \n\t\t\t\n\t\t\t
\n\t\t\t

\n\t\t\t

\n\t\t\t

0%

\n\t\t\t
\n\t\t
\n\t\t`},newWheel:function(t){this.onDocumentLoad(this.setupWheel(t))},setupWheel:function(t){var e=Object.create(this.wheel(t)),n=this.getWheelWrapper();n.innerHTML=this.getTemplate(e),document.currentScript.parentElement.append(n),document.currentScript.remove(),document.getElementById(`am-wheel-${e.id}`).children[1].children[0].innerText=e.title[0],document.getElementById(`am-wheel-${e.id}`).children[1].children[1].innerText=e.title[1];var o=()=>{this.startWheel(e)},l=document.getElementById(`am-wheel-${e.id}`);e.scrollElement.addEventListener("scroll",(function t(){l.getBoundingClientRect().top<500&&(o(),console.log("CLICKED!"),e.scrollElement.removeEventListener("scroll",t))}))},startWheel:function(t){var e=t.percentage,n=t.loopAmount,o=t.loopSpeed;setTimeout((function(){setTimeout((function(){var o=document.getElementById(`am-wheel-${t.id}`);o.children[0].children[0].setAttribute("stroke-dasharray",`${n},100`),o.children[1].children[2].children[0].innerText=Math.trunc(n),t.loopAmount+=.5,e<=25?t.loopSpeed=n/1.1:e<=50?t.loopSpeed=n/2.2:e<=75?t.loopSpeed=n/3.3:e<=100&&(t.loopSpeed=n/4.4),n