"use strict";(self["webpackChunkaida"]=self["webpackChunkaida"]||[]).push([[3882,7230],{37230:function(t,a){a["Z"]={id:1,testUrl:"http://192.168.1.5:10086",zIndex:2,setColor:(t,a,e)=>new Promise((i=>{var r=void 0==e?.min?5:e.min,d=void 0==e?.max?5:e.max,n=new Image;n.src=a;n.onload=()=>{const a=n.width,e=n.height,o=document.createElement("canvas");o.width=a,o.height=e;var h=o.getContext("2d");h.drawImage(n,0,0);var s=h.getImageData(0,0,a,e),g=[];for(let i=0;i<t.length;i++){var l=0;for(let a=0;a<s.data.length;a+=4){var m=s.data[a],c=s.data[a+1],v=s.data[a+2];s.data[a+3];m-r<t[i][0]&&m+d>t[i][0]&&c-r<t[i][1]&&c+d>t[i][1]&&v-r<t[i][2]&&v+d>t[i][2]&&l++}let o={rgb:t[i],ratio:parseInt(String((l/(a*e)*100).toFixed(6)))};g.push(o),n.remove()}i({width:a,height:e,ratio:g})}}))}}}]);