"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[7765],{7765(o,e,a){a.d(e,{loadCogShape:()=>r});var i=a(3199);class n{afterDraw(o){!function(o){const{context:e,particle:a,radius:n}=o;if(void 0===a.cogHoleRadius||void 0===a.cogInnerRadius||void 0===a.cogInnerTaper||void 0===a.cogNotches||void 0===a.cogOuterTaper)return;const r=n*a.cogHoleRadius/i.a56;e.globalCompositeOperation="destination-out",e.beginPath(),e.moveTo(r,i.boI.y),e.arc(i.boI.x,i.boI.y,r,0,i.R1e),e.closePath(),e.fill(),e.globalCompositeOperation="source-over"}(o)}draw(o){!function(o){const{context:e,particle:a,radius:n}=o;if(void 0===a.cogHoleRadius||void 0===a.cogInnerRadius||void 0===a.cogInnerTaper||void 0===a.cogNotches||void 0===a.cogOuterTaper)return;const r=i.R1e/(a.cogNotches*i.gdl),s=r*a.cogInnerTaper*.005,t=r*a.cogOuterTaper*.005,c=n*a.cogInnerRadius/i.a56;let g=r,l=!1;for(e.moveTo(n*Math.cos(t),n*Math.sin(t));g<=i.R1e;g+=r)l?(e.lineTo(c*Math.cos(g-s),c*Math.sin(g-s)),e.lineTo(n*Math.cos(g+t),n*Math.sin(g+t))):(e.lineTo(n*Math.cos(g-t),n*Math.sin(g-t)),e.lineTo(c*Math.cos(g+s),c*Math.sin(g+s))),l=!l}(o)}particleInit(o,e){const a=e.shapeData;e.cogHoleRadius=(0,i.VGA)(a?.holeRadius??44),e.cogInnerRadius=(0,i.VGA)(a?.innerRadius??72),e.cogInnerTaper=(0,i.VGA)(a?.innerTaper??35),e.cogNotches=(0,i.VGA)(a?.notches??7),e.cogOuterTaper=(0,i.VGA)(a?.outerTaper??50)}}async function r(o){o.checkVersion("4.1.3"),await o.pluginManager.register(o=>{o.pluginManager.addShape(["cog"],()=>Promise.resolve(new n))})}}}]);