"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[4775],{4775(e,n,t){t.d(n,{loadPolygonShape:()=>l});var a=t(3199);const s=new Map;class o{draw(e){const{particle:n,radius:t}=e;!function(e,n){const{context:t,radius:o}=e,r=function(e){const n=s.get(e);if(n)return n;const t=a.R1e/e,o=!!(e%a.gdl),r=(-Math.PI+(o?0:t))*a.MXx,i=[];for(let n=0;n<e;n++){const e=r+n*t;i[n]={x:Math.cos(e),y:Math.sin(e)}}return s.set(e,i),i}(n.count.numerator/n.count.denominator);t.beginPath();for(let e=0;e<r.length;e++){const n=r[e];if(!n)continue;const a=n.x*o,s=n.y*o;e?t.lineTo(a,s):t.moveTo(a,s)}t.closePath()}(e,this.getSidesData(n,t))}getSidesCount(e){const n=e.shapeData;return Math.round((0,a.VGA)(n?.sides??5))}}class r extends o{getSidesData(e,n){const{sides:t}=e;return{count:{denominator:1,numerator:t},length:2.66*n/(t/3)}}}class i extends o{getSidesCount(){return 3}getSidesData(e,n){return{count:{denominator:1,numerator:3},length:2.66*n/1}}}async function c(e){e.checkVersion("4.1.3"),await e.pluginManager.register(e=>{e.pluginManager.addShape(["polygon"],()=>Promise.resolve(new r))})}async function u(e){e.checkVersion("4.1.3"),await e.pluginManager.register(e=>{e.pluginManager.addShape(["triangle"],()=>Promise.resolve(new i))})}async function l(e){e.checkVersion("4.1.3"),await Promise.all([c(e),u(e)])}}}]);