"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[7283],{7283:(o,e,a)=>{a.r(e),a.d(e,{loadColorUpdater:()=>n});var l=a(6720),t=a(5302);function i(o,e,a,l,i){if(!e||!a.enable||(e.maxLoops??0)>0&&(e.loops??0)>(e.maxLoops??0))return;if(e.time||(e.time=0),(e.delayTime??0)>0&&e.time<(e.delayTime??0)&&(e.time+=o.value),(e.delayTime??0)>0&&e.time<(e.delayTime??0))return;const s=(0,t.vd)(a.offset),n=(e.velocity??0)*o.factor+3.6*s,r=e.decay??1;i&&"increasing"!==e.status?(e.value-=n,e.value<0&&(e.loops||(e.loops=0),e.loops++,e.status="increasing",e.value+=e.value)):(e.value+=n,e.value>l&&(e.loops||(e.loops=0),e.loops++,i&&(e.status="decreasing",e.value-=e.value%l))),e.velocity&&1!==r&&(e.velocity*=r),e.value>l&&(e.value%=l)}class s{constructor(o){this.container=o}init(o){const e=(0,l.lN)(o.options.color,o.id,o.options.reduceDuplicates);e&&(o.color=(0,l.bS)(e,o.options.color.animation,this.container.retina.reduceFactor))}isEnabled(o){const{h:e,s:a,l}=o.options.color.animation,{color:t}=o;return!o.destroyed&&!o.spawning&&(void 0!==t?.h.value&&e.enable||void 0!==t?.s.value&&a.enable||void 0!==t?.l.value&&l.enable)}update(o,e){!function(o,e){const{h:a,s:l,l:t}=o.options.color.animation,{color:s}=o;if(!s)return;const{h:n,s:r,l:c}=s;n&&i(e,n,a,360,!1),r&&i(e,r,l,100,!0),c&&i(e,c,t,100,!0)}(o,e)}}async function n(o,e=!0){await o.addParticleUpdater("color",(o=>new s(o)),e)}}}]);