"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[91],{91:(i,t,a)=>{a.r(t),a.d(t,{Trail:()=>o,loadExternalTrailInteraction:()=>n});var e=a(3290);class o{constructor(){this.delay=1,this.pauseOnStop=!1,this.quantity=1}load(i){i&&(void 0!==i.delay&&(this.delay=i.delay),void 0!==i.quantity&&(this.quantity=i.quantity),void 0!==i.particles&&(this.particles=(0,e.ZB)({},i.particles)),void 0!==i.pauseOnStop&&(this.pauseOnStop=i.pauseOnStop))}}class s extends e.L8{constructor(i){super(i),this._delay=0}clear(){}init(){}async interact(i){var t,a,e,o;if(!this.container.retina.reduceFactor)return;const s=this.container,n=s.actualOptions.interactivity.modes.trail;if(!n)return;const r=1e3*n.delay/this.container.retina.reduceFactor;if(this._delay<r&&(this._delay+=i.value),this._delay<r)return;let l=!0;n.pauseOnStop&&(s.interactivity.mouse.position===this._lastPosition||(null===(t=s.interactivity.mouse.position)||void 0===t?void 0:t.x)===(null===(a=this._lastPosition)||void 0===a?void 0:a.x)&&(null===(e=s.interactivity.mouse.position)||void 0===e?void 0:e.y)===(null===(o=this._lastPosition)||void 0===o?void 0:o.y))&&(l=!1),s.interactivity.mouse.position?this._lastPosition={x:s.interactivity.mouse.position.x,y:s.interactivity.mouse.position.y}:delete this._lastPosition,l&&s.particles.push(n.quantity,s.interactivity.mouse,n.particles),this._delay-=r}isEnabled(i){var t;const a=this.container,o=a.actualOptions,s=a.interactivity.mouse,n=(null!==(t=null==i?void 0:i.interactivity)&&void 0!==t?t:o.interactivity).events;return s.clicking&&s.inside&&!!s.position&&(0,e.dB)("trail",n.onClick.mode)||s.inside&&!!s.position&&(0,e.dB)("trail",n.onHover.mode)}loadModeOptions(i){i.trail||(i.trail=new o);for(var t=arguments.length,a=new Array(t>1?t-1:0),e=1;e<t;e++)a[e-1]=arguments[e];for(const t of a)i.trail.load(null==t?void 0:t.trail)}reset(){}}async function n(i){await i.addInteractor("externalTrail",(i=>new s(i)))}}}]);