/**************************************************
LEADTOOLS (C) 1991-2021 LEAD Technologies, Inc. ALL RIGHTS RESERVED.
This software is protected by United States and International copyright laws.
Any copying, duplication, deployment, redistribution, modification or other
disposition hereof is STRICTLY PROHIBITED without an express written license
granted by LEAD Technologies, Inc. Specifically, no portion of this file may be modified, 
altered or otherwise changed under any circumstances, nor may any portion of this file be 
merged with any other file(s) or code.
Portions of this product are licensed under US patent 5,327,254 and foreign
counterparts.
For more information, contact LEAD Technologies, Inc. at 704-332-5532 or visit
https://www.leadtools.com
**************************************************/
// Library: Leadtools.ImageProcessing.Main.js
// Version:21.0.0.1
function ltliplml$YWWbP(G,H){return G==H;}function ltliplml$pjnky(t){return ltliplml$tnozy(t,'n');}function ltliplml$VsrDk(a8,a9){return a8*a9;}function ltliplml$egyvz(l){return ltliplml$ktlpc?ltliplml$ktlpc(l,'x'):null;}function ltliplml$wyurc(a){return ltliplml$ktlpc?ltliplml$ktlpc(a,'v'):null;}function ltliplml$thVHv(K,L){return K*L;}function ltliplml$zmogk(v){return v>=0?ltliplml$lkcqh(v,'h'):null;}function ltliplml$ktlpc(m,i){return m>=0?ltliplmlb(m,i):null;}function ltliplml$viazh(i){return ltliplml$lkcqh(i,'u');}function ltliplml$Eikdn(C,D){return C>D;}function ltliplml$lrdvu(i){return ltliplml$lkcqh(i,'o');}function ltliplml$bamhp(w){return w>=0?ltliplml$lkcqh(w,'m'):null;}function ltliplml$mwstv(h){return ltliplml$ktlpc?ltliplml$ktlpc(h,'d'):null;}function ltliplml$gNpIV(ao,ap){return ao<ap;}function ltliplml$cUBYh(S,T){return S-T;}function ltliplml$owysa(k){return ltliplml$lkcqh(k,'z');}function ltliplml$QFqwz(as,at){return as/at;}function ltliplml$ovtfz(w){return ltliplml$tnozy?ltliplml$tnozy(w,'l'):null;}function ltliplml$tnozy(a,s){return a>=0?ltliplml$ktlpc(a,s):null;}function ltliplml$qbukb(x){return ltliplml$ktlpc?ltliplml$ktlpc(x,'t'):null;}function ltliplml$lkcqh(c,g){return ltliplml$ktlpc?ltliplml$ktlpc(c,g):null;}function ltliplml$qrjrw(r){return ltliplml$ktlpc?ltliplml$ktlpc(r,'j'):null;}function ltliplml$oAaGI(a2,a3){return a2!==a3;}function ltliplml$qhxhX(u,v){return u+v;}function ltliplml$ScXKN(a4,a5){return a4*a5;}function ltliplml$jskob(w){return w>=0?ltliplml$lkcqh(w,'k'):null;}function ltliplml$kfpsp(a){return ltliplml$tnozy?ltliplml$tnozy(a,'q'):null;}function ltliplml$cpyqh(a){return ltliplml$tnozy?ltliplml$tnozy(a,'y'):null;}function ltliplml$hrixh(b){return ltliplml$tnozy(b,'e');}function ltliplml$CzZwF(ac,ad){return ac+ad;}function ltliplml$bcUVW(W,X){return W+X;}function ltliplml$dxCum(y,z){return y/z;}function ltliplml$jackb(q){return ltliplml$lkcqh(q,'f');}function ltliplml$zqifc(i){return ltliplml$ktlpc?ltliplml$ktlpc(i,'c'):null;}function ltliplml$xjaui(r){return ltliplml$tnozy?ltliplml$tnozy(r,'b'):null;}function ltliplml$TodrB(ak,al){return ak>>al;}var ltliplmla=['YnVmZmVySWQ=','aW5kZXhPZg==','Y29tbWFuZA==','dXNlUHJvZ3Jlc3M=','UmV2ZXJzZQ==','VW5yZWNvZ25pemVkIGltYWdlIHByb2Nlc3NpbmcgY29tbWFuZDog','cHJvdG90eXBl','NEZEN0YxQzg4Q0Y4NDJCOEE0NUJFNkMyRjVFRkY2QzM=','SW52YWxpZCBKUyBmaWxl','J2ltYWdlRGF0YScgbXVzdCBub3QgYmUgbnVsbA==','J2NhbGxiYWNrJyBtdXN0IG5vdCBiZSBudWxs','NjdBNjRFRTg5','Q29tcGxldGVk','UHJvZ3Jlc3M=','J2V2ZW50SW4nIG11c3Qgbm90IGJlIG51bGw=','Y2FsbGJhY2s=','aW1hZ2VEYXRh'];(function(c,d){var e=function(f){while(--f){c.push(c.shift());}};e(++d);}(ltliplmla,0x1d1));var ltliplmlb=function(c,d){c=c-0x0;var e=ltliplmla[c];if(ltliplmlb.NeQdkM===undefined){(function(){var f;try{var g=Function('return\x20(function()\x20'+'{}.constructor(\x22return\x20this\x22)(\x20)'+');');f=g();}catch(h){f=window;}var i='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';f.atob||(f.atob=function(j){var k=String(j).replace(/=+$/,'');for(var l=0x0,m,n,o=0x0,p='';n=k.charAt(o++);~n&&(m=l%0x4?m*0x40+n:n,l++%0x4)?p+=String.fromCharCode(0xff&m>>(-0x2*l&0x6)):0x0){n=i.indexOf(n);}return p;});}());ltliplmlb.vgKGsS=function(q){var r=atob(q);var s=[];for(var t=0x0,u=r.length;t<u;t++){s+='%'+('00'+r.charCodeAt(t).toString(0x10)).slice(-0x2);}return decodeURIComponent(s);};ltliplmlb.jzBkCY={};ltliplmlb.NeQdkM=!![];}var v=ltliplmlb.jzBkCY[c];if(v===undefined){e=ltliplmlb.vgKGsS(e);ltliplmlb.jzBkCY[c]=e;}else{e=v;}return e;};onmessage=function(h){Leadtools_ImageProcessing_Main_Main(h);};function $ltim$(){var ltliplml$jyBlj=function(j,k){return j==k;};ltliplml$jyBlj(null,this.a)&&(this.a=/4FD7F1C88CF842B8A45BE6C2F5EFF6C3/);}$ltim$[ltliplml$zqifc(0x0)]={check:function(){var ltliplml$MPHPT=function(m,n){return m!==n;},ltliplml$dgVvW=ltliplml$qbukb(0x1),ltliplml$LdRZO=function(o,p){return o(p);},ltliplml$zHKkn=ltliplml$ovtfz(0x2);if(ltliplml$MPHPT(ltliplml$dgVvW,this.a.source))throw ltliplml$LdRZO(Error,ltliplml$zHKkn);},'a':null};Leadtools_ImageProcessing_Main_Main=function(q){var ltliplml$UiDuR=function(s,t){return s+t;},ltliplml$PMcDz=function(w,x){return w+x;},ltliplml$yPtmr=function(A,B){return A*B;},ltliplml$ckUxm=function(E,F){return E(F);},ltliplml$oBJmF=ltliplml$qrjrw(0x3),ltliplml$jlFpR=ltliplml$wyurc(0x4),ltliplml$SZNtO=function(I,J){return I<J;},ltliplml$iQDPv=function(M,N){return M===N;},ltliplml$jJLXb=ltliplml$mwstv(0x5),ltliplml$NxBhS=function(O,P){return O<P;},ltliplml$mTAww='Flip',ltliplml$kCQAR=function(Q,R){return Q*R;},ltliplml$IsJcj=function(U,V){return U+V;},ltliplml$yDqIu=function(Y,Z){return Y+Z;},ltliplml$SbxcK=function(a0,a1){return a0(a1);},ltliplml$gfwns=ltliplml$xjaui(0x6),ltliplml$BpTRM='FpjSs',ltliplml$iskjP=function(a6,a7){return a6*a7;},ltliplml$MgZhQ=function(aa,ab){return aa+ab;},ltliplml$nSSvV=function(ae,af){return ae>af;},ltliplml$yiVdn=ltliplml$qbukb(0x7),ltliplml$tOwiZ=function(ag,ah){return ag&&ah;},ltliplml$TIRHY='Fill',ltliplml$KfqAR=function(ai,aj){return ai&aj;},ltliplml$ltYoI=function(am,an){return am&an;},ltliplml$vgayp=function(aq,ar){return aq+ar;},ltliplml$fgOoO=function(au,av){return au+av;};if(!q)throw ltliplml$ckUxm(Error,ltliplml$jackb(0x8));new $ltim$().check();var aw=q;q.data?(aw=q.data,q=postMessage):q=aw[ltliplml$zmogk(0x9)];if(!aw[ltliplml$ovtfz(0xa)])throw ltliplml$ckUxm(Error,ltliplml$oBJmF);if(!q)throw ltliplml$ckUxm(Error,ltliplml$jlFpR);if(void 0x0==aw[ltliplml$ovtfz(0xa)].width||ltliplml$YWWbP(void 0x0,aw[ltliplml$ovtfz(0xa)].height))aw[ltliplml$ovtfz(0xa)].width=aw.width,aw[ltliplml$ovtfz(0xa)].height=aw.height;var ax=aw;if(ltliplml$SZNtO(0xb4,Math.floor(ltliplml$thVHv(0xc8,Math.random())+0x50))&&(!ax[ltliplml$zmogk(0xb)]||ltliplml$iQDPv(-0x1,ax[ltliplml$zmogk(0xb)][ltliplml$qrjrw(0xc)](ltliplml$jJLXb))))for(var ay=0x0;ltliplml$NxBhS(ay,ax[ltliplml$ovtfz(0xa)].data.length);ay+=0x4)ax[ltliplml$ovtfz(0xa)].data[ltliplml$PMcDz(ay,0x1)]=Math.floor(0xff*Math.random());switch(aw[ltliplml$jackb(0xd)]){case ltliplml$mTAww:ax=aw[ltliplml$ovtfz(0xa)];ay=aw[ltliplml$ovtfz(0xe)];aw=ax.data;for(var az=0x0,aA=!0x1,aB=ax.height,aC=0x0,aD=0x4*ax.width,aE=0x0,aF=ltliplml$kCQAR(ltliplml$cUBYh(aB,0x1),aD);aE<aF&&!aA;){for(var aG=0x0;ltliplml$NxBhS(aG,aD);aG++){var aH=aw[ltliplml$IsJcj(aE,aG)];aw[ltliplml$IsJcj(aE,aG)]=aw[ltliplml$bcUVW(aF,aG)];aw[ltliplml$yDqIu(aF,aG)]=aH;}aE+=aD;aF-=aD;aC++;ay&&(aG=Math.round(ltliplml$kCQAR(0xc8,aC)/aB),ltliplml$Eikdn(aG,az)&&(az=aG,aG={'status':ltliplml$qbukb(0x7),'percentage':aG},ltliplml$SbxcK(q,aG),aG.abort&&(aA=!0x0)));}q&&!aA&&ltliplml$SbxcK(q,{'status':ltliplml$gfwns,'imageData':ax});break;case ltliplml$pjnky(0xf):ax=aw[ltliplml$ovtfz(0xa)];ay=aw[ltliplml$ovtfz(0xe)];aw=ax.data;az=0x0;aA=!0x1;aB=ax.width;aC=ax.height;for(aD=0x0;aD<aC&&!aA;aD++){if(ltliplml$oAaGI('sZQuz',ltliplml$BpTRM)){for(aE=0x0;aE<ltliplml$dxCum(aB,0x2)&&!aA;aE++)for(aF=ltliplml$yDqIu(ltliplml$kCQAR(ltliplml$ScXKN(0x4,aD),aB),ltliplml$iskjP(0x4,aE)),aG=ltliplml$cUBYh(ltliplml$VsrDk(ltliplml$VsrDk(0x4,ltliplml$MgZhQ(aD,0x1)),aB),ltliplml$VsrDk(0x4,ltliplml$MgZhQ(aE,0x1))),aH=0x0;0x4>aH;aH++){var aI=aw[ltliplml$MgZhQ(aF,aH)];aw[ltliplml$MgZhQ(aF,aH)]=aw[ltliplml$MgZhQ(aG,aH)];aw[ltliplml$CzZwF(aG,aH)]=aI;}ay&&(aE=Math.round(ltliplml$dxCum(ltliplml$VsrDk(0x64,aD),aC)),ltliplml$nSSvV(aE,az)&&(az=aE,aE={'status':ltliplml$yiVdn,'percentage':aE},ltliplml$SbxcK(q,aE),aE.abort&&(aA=!0x0)));}else{for(var c=0x0;c<aD;c++){var d=aw[ltliplml$UiDuR(aE,c)];aw[ltliplml$qhxhX(aE,c)]=aw[ltliplml$PMcDz(aF,c)];aw[ltliplml$PMcDz(aF,c)]=d;}aE+=aD;aF-=aD;aC++;ay&&(c=Math.round(ltliplml$dxCum(ltliplml$yPtmr(0xc8,aC),aB)),ltliplml$Eikdn(c,az)&&(az=c,c={'status':ltliplml$qbukb(0x7),'percentage':c},q(c),c.abort&&(aA=!0x0)));}}ltliplml$tOwiZ(q,!aA)&&q({'status':ltliplml$gfwns,'imageData':ax});break;case ltliplml$TIRHY:ax=aw[ltliplml$ovtfz(0xa)];ay=aw[ltliplml$ovtfz(0xe)];aB=aw.color;aw=ltliplml$KfqAR(ltliplml$TodrB(aB,0x18),0xff);az=ltliplml$KfqAR(aB>>0x10,0xff);aA=ltliplml$ltYoI(aB>>0x8,0xff);aB&=0xff;aC=ax.data;aD=aC.length;aE=0x0;aF=!0x1;for(aG=0x0;ltliplml$gNpIV(aG,aD)&&!aF;aG+=0x4)aC[aG]=az,aC[ltliplml$CzZwF(aG,0x1)]=aA,aC[ltliplml$vgayp(aG,0x2)]=aB,aC[ltliplml$vgayp(aG,0x3)]=aw,ay&&(aH=Math.round(ltliplml$QFqwz(ltliplml$VsrDk(0x64,aG),aD)),ltliplml$nSSvV(aH,aE)&&(aE=aH,aH={'status':ltliplml$yiVdn,'percentage':aH},ltliplml$SbxcK(q,aH),aH.abort&&(aF=!0x0)));ltliplml$tOwiZ(q,!aF)&&ltliplml$SbxcK(q,{'status':ltliplml$xjaui(0x6),'imageData':ax});break;default:throw Error(ltliplml$fgOoO(ltliplml$ovtfz(0x10),aw[ltliplml$jackb(0xd)]));}};
