const Sakura=function(t,e){if(void 0===t)throw new Error("No selector present. Define an element.");var i,a;function n(t){return t[Math.floor(Math.random()*t.length)]}function s(t,e){return Math.floor(Math.random()*(e-t+1))+t}this.el=document.querySelector(t),this.settings=(i={className:"sakura",fallSpeed:1,maxSize:14,minSize:10,delay:300,colors:[{gradientColorStart:"rgba(255, 183, 197, 0.9)",gradientColorEnd:"rgba(255, 197, 208, 0.9)",gradientColorDegree:120}]},a=e,Object.keys(i).forEach((t=>{a&&Object.prototype.hasOwnProperty.call(a,t)&&(i[t]=a[t])})),i),this.el.style.overflowX="hidden";const o=["webkit","moz","MS","o",""];function r(t,e,i){for(let a=0;a{this.el.dataset.sakuraAnimId&&setTimeout((()=>{window.requestAnimationFrame(this.createPetal)}),this.settings.delay);const t=n(["blow-soft-left","blow-medium-left","blow-soft-right","blow-medium-right"]),e=n(["sway-0","sway-1","sway-2","sway-3","sway-4","sway-5","sway-6","sway-7","sway-8"]),i=(.007*document.documentElement.clientHeight+Math.round(5*Math.random()))*this.settings.fallSpeed,a=[`fall ${i}s linear 0s 1`,`${t} ${(30{l(o)||o.remove()})),r(o,"AnimationIteration",(()=>{l(o)||o.remove()})),this.el.appendChild(o)},this.el.setAttribute("data-sakura-anim-id",window.requestAnimationFrame(this.createPetal))};Sakura.prototype.start=function(){if(this.el.dataset.sakuraAnimId)throw new Error("Sakura is already running.");this.el.setAttribute("data-sakura-anim-id",window.requestAnimationFrame(this.createPetal))},Sakura.prototype.stop=function(t=!1){var e=this.el.dataset.sakuraAnimId;e&&(window.cancelAnimationFrame(e),this.el.setAttribute("data-sakura-anim-id","")),t||setTimeout((()=>{for(var t=document.getElementsByClassName(this.settings.className);0