"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[4990],{4990:(t,e,a)=>{a.d(e,{loadRotateUpdater:()=>c});var o=a(9201);class i{constructor(){this.enable=!1,this.speed=0,this.decay=0,this.sync=!1}load(t){t&&(void 0!==t.enable&&(this.enable=t.enable),void 0!==t.speed&&(this.speed=(0,o.Cs)(t.speed)),void 0!==t.decay&&(this.decay=(0,o.Cs)(t.decay)),void 0!==t.sync&&(this.sync=t.sync))}}class s extends o.SW{constructor(){super(),this.animation=new i,this.direction="clockwise",this.path=!1,this.value=0}load(t){t&&(super.load(t),void 0!==t.direction&&(this.direction=t.direction),this.animation.load(t.animation),void 0!==t.path&&(this.path=t.path))}}class n{constructor(t){this.container=t}init(t){const e=t.options.rotate;if(!e)return;t.rotate={enable:e.animation.enable,value:(0,o.Gu)(e.value)*Math.PI/180},t.pathRotation=e.path;let a=e.direction;switch("random"===a&&(a=Math.floor(2*(0,o.sZ)())>0?"counter-clockwise":"clockwise"),a){case"counter-clockwise":case"counterClockwise":t.rotate.status="decreasing";break;case"clockwise":t.rotate.status="increasing"}const i=e.animation;i.enable&&(t.rotate.decay=1-(0,o.Gu)(i.decay),t.rotate.velocity=(0,o.Gu)(i.speed)/360*this.container.retina.reduceFactor,i.sync||(t.rotate.velocity*=(0,o.sZ)())),t.rotation=t.rotate.value}isEnabled(t){const e=t.options.rotate;return!!e&&!t.destroyed&&!t.spawning&&e.animation.enable&&!e.path}loadOptions(t,...e){t.rotate||(t.rotate=new s);for(const a of e)t.rotate.load(a?.rotate)}update(t,e){this.isEnabled(t)&&(function(t,e){const a=t.rotate,o=t.options.rotate;if(!a||!o)return;const i=o.animation,s=(a.velocity??0)*e.factor,n=2*Math.PI,c=a.decay??1;i.enable&&("increasing"===a.status?(a.value+=s,a.value>n&&(a.value-=n)):(a.value-=s,a.value<0&&(a.value+=n)),a.velocity&&1!==c&&(a.velocity*=c))}(t,e),t.rotation=t.rotate?.value??0)}}async function c(t,e=!0){await t.addParticleUpdater("rotate",(t=>new n(t)),e)}}}]);