"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[4404],{4404:(a,e,o)=>{o.r(e),o.d(e,{loadOpacityUpdater:()=>c});var t=o(4684),i=o(5302);class s{constructor(a){this.container=a}init(a){const e=a.options.opacity;a.opacity=(0,t.V0)(e,1);const o=e.animation;o.enable&&(a.opacity.velocity=(0,i.Gu)(o.speed)/100*this.container.retina.reduceFactor,o.sync||(a.opacity.velocity*=(0,i.sZ)()))}isEnabled(a){return!a.destroyed&&!a.spawning&&!!a.opacity&&a.opacity.enable&&((a.opacity.maxLoops??0)<=0||(a.opacity.maxLoops??0)>0&&(a.opacity.loops??0)<(a.opacity.maxLoops??0))}reset(a){a.opacity&&(a.opacity.time=0,a.opacity.loops=0)}update(a,e){this.isEnabled(a)&&function(a,e){const o=a.opacity;if(a.destroyed||!o?.enable||(o.maxLoops??0)>0&&(o.loops??0)>(o.maxLoops??0))return;const t=o.min,s=o.max,c=o.decay??1;if(o.time||(o.time=0),(o.delayTime??0)>0&&o.time<(o.delayTime??0)&&(o.time+=e.value),!((o.delayTime??0)>0&&o.time<(o.delayTime??0))){switch(o.status){case"increasing":o.value>=s?(o.status="decreasing",o.loops||(o.loops=0),o.loops++):o.value+=(o.velocity??0)*e.factor;break;case"decreasing":o.value<=t?(o.status="increasing",o.loops||(o.loops=0),o.loops++):o.value-=(o.velocity??0)*e.factor}o.velocity&&1!==o.decay&&(o.velocity*=c),function(a,e,o,t){switch(a.options.opacity.animation.destroy){case"max":e>=t&&a.destroy();break;case"min":e<=o&&a.destroy()}}(a,o.value,t,s),a.destroyed||(o.value=(0,i.uZ)(o.value,t,s))}}(a,e)}}async function c(a,e=!0){await a.addParticleUpdater("opacity",(a=>new s(a)),e)}}}]);