"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[9577],{9577:function(e,o,n){n.r(o),n.d(o,{loadWobbleUpdater:function(){return i}});var l=n(3563);class a{constructor(){this.angle=50,this.move=10}load(e){e&&(void 0!==e.angle&&(this.angle=(0,l.Cs)(e.angle)),void 0!==e.move&&(this.move=(0,l.Cs)(e.move)))}}class s{constructor(){this.distance=5,this.enable=!1,this.speed=new a}load(e){if(e&&(void 0!==e.distance&&(this.distance=(0,l.Cs)(e.distance)),void 0!==e.enable&&(this.enable=e.enable),void 0!==e.speed))if("number"==typeof e.speed)this.speed.load({angle:e.speed});else{const o=e.speed;void 0!==o.min?this.speed.load({angle:o}):this.speed.load(e.speed)}}}class t{constructor(e){this.container=e}init(e){var o;const n=e.options.wobble;(null==n?void 0:n.enable)?e.wobble={angle:(0,l.sZ)()*Math.PI*2,angleSpeed:(0,l.Gu)(n.speed.angle)/360,moveSpeed:(0,l.Gu)(n.speed.move)/10}:e.wobble={angle:0,angleSpeed:0,moveSpeed:0},e.retina.wobbleDistance=(0,l.Gu)(null!==(o=null==n?void 0:n.distance)&&void 0!==o?o:0)*this.container.retina.pixelRatio}isEnabled(e){var o;return!e.destroyed&&!e.spawning&&!!(null===(o=e.options.wobble)||void 0===o?void 0:o.enable)}loadOptions(e){e.wobble||(e.wobble=new s);for(var o=arguments.length,n=new Array(o>1?o-1:0),l=1;l<o;l++)n[l-1]=arguments[l];for(const o of n)e.wobble.load(null==o?void 0:o.wobble)}update(e,o){this.isEnabled(e)&&function(e,o){var n;const l=e.options.wobble;if(!(null==l?void 0:l.enable)||!e.wobble)return;const a=e.wobble.angleSpeed*o.factor,s=e.wobble.moveSpeed*o.factor*((null!==(n=e.retina.wobbleDistance)&&void 0!==n?n:0)*o.factor)/(1e3/60),t=2*Math.PI;e.wobble.angle+=a,e.wobble.angle>t&&(e.wobble.angle-=t),e.position.x+=s*Math.cos(e.wobble.angle),e.position.y+=s*Math.abs(Math.sin(e.wobble.angle))}(e,o)}}async function i(e){await e.addParticleUpdater("wobble",(e=>new t(e)))}}}]);