"use strict";(self.webpackChunkwordpress_particles=self.webpackChunkwordpress_particles||[]).push([[7715],{7715:function(i,n,t){t.r(n),t.d(n,{Grab:function(){return s},GrabLinks:function(){return o},loadExternalGrabInteraction:function(){return c}});var e=t(3563);class o{constructor(){this.blink=!1,this.consent=!1,this.opacity=1}load(i){i&&(void 0!==i.blink&&(this.blink=i.blink),void 0!==i.color&&(this.color=e.Oz.create(this.color,i.color)),void 0!==i.consent&&(this.consent=i.consent),void 0!==i.opacity&&(this.opacity=i.opacity))}}class s{constructor(){this.distance=100,this.links=new o}get lineLinked(){return this.links}set lineLinked(i){this.links=i}get line_linked(){return this.links}set line_linked(i){this.links=i}load(i){var n,t;i&&(void 0!==i.distance&&(this.distance=i.distance),this.links.load(null!==(t=null!==(n=i.links)&&void 0!==n?n:i.lineLinked)&&void 0!==t?t:i.line_linked))}}function r(i,n,t,o,s){i.canvas.draw((i=>{var r;const a=n.getPosition();!function(i,n,t,o,s,r){(0,e.pS)(i,t,o),i.strokeStyle=(0,e.iz)(s,r),i.lineWidth=n,i.stroke()}(i,null!==(r=n.retina.linksWidth)&&void 0!==r?r:0,a,s,t,o)}))}class a extends e.L8{constructor(i){super(i)}clear(){}init(){const i=this.container,n=i.actualOptions.interactivity.modes.grab;n&&(i.retina.grabModeDistance=n.distance*i.retina.pixelRatio)}async interact(){var i,n;const t=this.container,o=t.actualOptions.interactivity;if(!o.modes.grab||!o.events.onHover.enable||t.interactivity.status!==e.Wt)return;const s=t.interactivity.mouse.position;if(!s)return;const a=t.retina.grabModeDistance;if(!a||a<0)return;const c=t.particles.quadTree.queryCircle(s,a,(i=>this.isEnabled(i)));for(const l of c){const c=l.getPosition(),d=(0,e.Sp)(c,s);if(d>a)continue;const u=o.modes.grab.links,v=u.opacity,b=v-d*v/a;if(b<=0)continue;const k=null!==(i=u.color)&&void 0!==i?i:null===(n=l.options.links)||void 0===n?void 0:n.color;if(!t.particles.grabLineColor&&k){const i=o.modes.grab.links;t.particles.grabLineColor=(0,e.Dt)(k,i.blink,i.consent)}const p=(0,e.BE)(l,void 0,t.particles.grabLineColor);if(!p)return;r(t,l,p,b,s)}}isEnabled(i){var n;const t=this.container,o=t.interactivity.mouse,s=(null!==(n=null==i?void 0:i.interactivity)&&void 0!==n?n:t.actualOptions.interactivity).events;return s.onHover.enable&&!!o.position&&(0,e.dB)("grab",s.onHover.mode)}loadModeOptions(i){i.grab||(i.grab=new s);for(var n=arguments.length,t=new Array(n>1?n-1:0),e=1;e<n;e++)t[e-1]=arguments[e];for(const n of t)i.grab.load(null==n?void 0:n.grab)}reset(){}}async function c(i){await i.addInteractor("externalGrab",(i=>new a(i)))}}}]);