"use strict";(globalThis.webpackChunk_tsparticles_wordpress=globalThis.webpackChunk_tsparticles_wordpress||[]).push([[3176],{3176(a,s,r){r.d(s,{loadLabColorPlugin:()=>v});var i=r(3199);const n=216/24389,e=24389/27,l=3.2404542,t=-1.5371385,o=-.4985314,c=-.969266,u=1.8760108,d=.041556,b=.0556434,p=-.2040259,A=1.0572252;function h(a){const s=a.l,r=(s+16)/116,h=r+a.aAxis/500,x=r-a.bAxis/200,g=h**3,v=x**3,w=.95047*(g>n?g:(116*h-16)/e),C=1*(s>8?r**3:s/e),M=1.08883*(v>n?v:(116*x-16)/e),f=c*w+u*C+d*M,k=b*w+p*C+A*M,V=a=>{return Math.round(255*(0,i.qE8)((s=a)<=.0031308?12.92*s:1.055*Math.pow(s,i.hBr/2.4)-.055,0,1));var s};return{r:V(l*w+t*C+o*M),g:V(f),b:V(k)}}const x=/lab\(\s*(\d+(\.\d+)?)%\s+(\d+(\.\d+)?)\s+(\d+(\.\d+)?)(?:\s*\/\s*(0|1|0?\.\d+|\d{1,3}%))?\s*\)/i;class g{accepts(a){return a.startsWith("lab")}handleColor(a){const s=a.value.lab??a.value;if("l"in s&&"aAxis"in s&&"bAxis"in s)return h(s)}handleRangeColor(a){const s=a.value.lab??a.value;if("l"in s&&"aAxis"in s&&"bAxis"in s)return h({l:(0,i.VGA)(s.l),aAxis:(0,i.VGA)(s.aAxis),bAxis:(0,i.VGA)(s.bAxis)})}parseString(a){if(!this.accepts(a))return;const s=x.exec(a);return s?{a:(r={a:s[7]?(0,i.M3Y)(s[7]):1,aAxis:parseFloat(s[3]??"0"),bAxis:parseFloat(s[5]??"0"),l:parseFloat(s[1]??"0")}).a,...h(r)}:void 0;var r}}async function v(a){a.checkVersion("4.1.3"),await a.pluginManager.register(a=>{a.pluginManager.addColorManager("lab",new g)})}}}]);