"use strict";(globalThis.webpackChunkwordpress_particles=globalThis.webpackChunkwordpress_particles||[]).push([[8570],{8570:(t,a,e)=>{e.r(a),e.d(a,{loadTextShape:()=>o});var s=e(4684);const n=["text","character","char"];class i{draw(t,a,e,n){const i=a.shapeData;if(void 0===i)return;const o=i.value;if(void 0===o)return;void 0===a.text&&(a.text=(0,s.wA)(o,a.randomIndexData));const r=a.text,l=i.style??"",c=i.weight??"400",p=2*Math.round(e),d=i.font??"Verdana",h=a.fill,u=r.length*e/2;t.font=`${l} ${c} ${p}px "${d}"`;const x={x:-u,y:e/2};t.globalAlpha=n,h?t.fillText(r,x.x,x.y):t.strokeText(r,x.x,x.y),t.globalAlpha=1}getSidesCount(){return 12}async init(t){const a=t.actualOptions;if(n.find((t=>(0,s.dB)(t,a.particles.shape.type)))){const t=n.map((t=>a.particles.shape.options[t])).find((t=>!!t)),e=[];(0,s.KH)(t,(t=>{e.push((0,s.mx)(t.font,t.weight))})),await Promise.all(e)}}particleInit(t,a){if(!a.shape||!n.includes(a.shape))return;const e=a.shapeData;if(void 0===e)return;const i=e.value;void 0!==i&&(a.text=(0,s.wA)(i,a.randomIndexData))}}async function o(t,a=!0){await t.addShape(n,new i,a)}}}]);