/** * * SmartEarth WebSDK - https://websdk.terra-it.cn * Version 5.4.1 * **/ (()=>{var Ie;(function(){Ie=function(){var U,h,M,D,B,k,V,J;S.load=function(e,t,o){var f,n=this;return typeof t=="function"&&(o=t),f=new XMLHttpRequest,f.open("GET",e,!0),f.responseType="arraybuffer",f.onload=function(){var s,b;return s=new Uint8Array(f.response||f.mozResponseArrayBuffer),b=new S(s),typeof t?.getContext=="function"&&b.render(t),typeof o=="function"?o(b):void 0},f.send(null)},D=0,M=1,B=2,h=0,U=1;function S(e){var t,o,f,n,s,b,g,d,Z,X,re,O,G,K;for(this.data=e,this.pos=8,this.palette=[],this.imgData=[],this.transparency={},this.animation=null,this.text={},s=null;;){switch(t=this.readUInt32(),Z=function(){var a,u;for(u=[],b=a=0;a<4;b=++a)u.push(String.fromCharCode(this.data[this.pos++]));return u}.call(this).join(""),Z){case"IHDR":this.width=this.readUInt32(),this.height=this.readUInt32(),this.bits=this.data[this.pos++],this.colorType=this.data[this.pos++],this.compressionMethod=this.data[this.pos++],this.filterMethod=this.data[this.pos++],this.interlaceMethod=this.data[this.pos++];break;case"acTL":this.animation={numFrames:this.readUInt32(),numPlays:this.readUInt32()||1/0,frames:[]};break;case"PLTE":this.palette=this.read(t);break;case"fcTL":s&&this.animation.frames.push(s),this.pos+=4,s={width:this.readUInt32(),height:this.readUInt32(),xOffset:this.readUInt32(),yOffset:this.readUInt32()},n=this.readUInt16(),f=this.readUInt16()||100,s.delay=1e3*n/f,s.disposeOp=this.data[this.pos++],s.blendOp=this.data[this.pos++],s.data=[];break;case"IDAT":case"fdAT":for(Z==="fdAT"&&(this.pos+=4,t-=4),e=s?.data||this.imgData,b=O=0;0<=t?Ot;b=0<=t?++O:--O)e.push(this.data[this.pos++]);break;case"tRNS":switch(this.transparency={},this.colorType){case 3:if(this.transparency.indexed=this.read(t),X=255-this.transparency.indexed.length,X>0)for(b=G=0;0<=X?GX;b=0<=X?++G:--G)this.transparency.indexed.push(255);break;case 0:this.transparency.grayscale=this.read(t)[0];break;case 2:this.transparency.rgb=this.read(t)}break;case"tEXt":re=this.read(t),g=re.indexOf(0),d=String.fromCharCode.apply(String,re.slice(0,g)),this.text[d]=String.fromCharCode.apply(String,re.slice(g+1));break;case"IEND":s&&this.animation.frames.push(s),this.colors=function(){switch(this.colorType){case 0:case 3:case 4:return 1;case 2:case 6:return 3}}.call(this),this.hasAlphaChannel=(K=this.colorType)===4||K===6,o=this.colors+(this.hasAlphaChannel?1:0),this.pixelBitlength=this.bits*o,this.colorSpace=function(){switch(this.colors){case 1:return"DeviceGray";case 3:return"DeviceRGB"}}.call(this),this.imgData=new Uint8Array(this.imgData);return;default:this.pos+=t}if(this.pos+=4,this.pos>this.data.length)throw new Error("Incomplete or corrupt PNG file")}}return S.prototype.read=function(e){var t,o,f;for(f=[],t=o=0;0<=e?oe;t=0<=e?++o:--o)f.push(this.data[this.pos++]);return f},S.prototype.readUInt32=function(){var e,t,o,f;return e=this.data[this.pos++]<<24,t=this.data[this.pos++]<<16,o=this.data[this.pos++]<<8,f=this.data[this.pos++],e|t|o|f},S.prototype.readUInt16=function(){var e,t;return e=this.data[this.pos++]<<8,t=this.data[this.pos++],e|t},S.prototype.decodePixels=function(e){var t,o,f,n,s,b,g,d,Z,X,re,O,G,K,a,u,r,y,c,P,v,C,T;if(e==null&&(e=this.imgData),e.length===0)return new Uint8Array(0);for(e=new FlateStream(e),e=e.getBytes(),O=this.pixelBitlength/8,u=O*this.width,G=new Uint8Array(u*this.height),b=e.length,a=0,K=0,o=0;K1&&o/n>4}else aPRE_MINBITS<=8&&aPRE_MAXBITS<=8?(S=M[J++],e=M[J++]):console.error("Error - jpeg decompression");var s=D+o*S,b=(B-s)/(1<<2*aPRE_MAXBITS);this.m_arrfmin[f]=s;var g=s+b*((e+1)*(e+1));this.m_arrfmax[f]=g,f++}for(f=0,V=0;V0&&(s+=Math.fmod(Math.abs(s),d));for(var Z=s,X=k*aPRE_BLOCKSIZE+V*aPRE_BLOCKSIZE*256,re=0;re0&&!K[P-1];)P--;r.push({children:[],index:0});var v=r[0],C;for(y=0;y0;)v=r.pop();for(v.index++,r.push(v);r.length<=y;)r.push(C={children:[],index:0}),v.children[v.index]=C.children,v=C;u++}y+10)return ne--,Q>>ne&1;if(Q=K[a++],Q==255){var N=K[a++];if(N)throw"unexpected marker: "+(Q<<8|N).toString(16)}return ne=7,Q>>>7}function xe(N){for(var E=N,Y;(Y=se())!==null;){if(E=E[Y],typeof E=="number")return E;if(typeof E!="object")throw"invalid huffman sequence"}return null}function H(N){for(var E=0;N>0;){var Y=se();if(Y===null)return;E=E<<1|Y,N--}return E}function m(N){var E=H(N);return E>=1<>4;if(he===0){if(fe<15)break;ee+=16;continue}ee+=fe;var ae=e[ee];E[ae]=m(he),ee++}}function W(N,E){var Y=xe(N.huffmanTableDC),ce=Y===0?0:m(Y)<0){L--;return}for(var Y=c,ce=P;Y<=ce;){var ee=xe(N.huffmanTableAC),ie=ee&15,he=ee>>4;if(ie===0){if(he<15){L=H(he)+(1<>4;if(fe===0)ee<15?(L=H(ee)+(1<=65488&&me<=65495)a+=2;else break}return a-q}function O(K,a){var u=[],r=a.blocksPerLine,y=a.blocksPerColumn,c=r<<3,P=new Int32Array(64),v=new Uint8Array(64);function C(Q,ne,se){var xe=a.quantizationTable,H,m,p,W,l,L,$,w,x,i=se,z;for(z=0;z<64;z++)i[z]=Q[z]*xe[z];for(z=0;z<8;++z){var A=8*z;if(i[1+A]==0&&i[2+A]==0&&i[3+A]==0&&i[4+A]==0&&i[5+A]==0&&i[6+A]==0&&i[7+A]==0){x=g*i[0+A]+512>>10,i[0+A]=x,i[1+A]=x,i[2+A]=x,i[3+A]=x,i[4+A]=x,i[5+A]=x,i[6+A]=x,i[7+A]=x;continue}H=g*i[0+A]+128>>8,m=g*i[4+A]+128>>8,p=i[2+A],W=i[6+A],l=d*(i[1+A]-i[7+A])+128>>8,w=d*(i[1+A]+i[7+A])+128>>8,L=i[3+A]<<4,$=i[5+A]<<4,x=H-m+1>>1,H=H+m+1>>1,m=x,x=p*b+W*s+128>>8,p=p*s-W*b+128>>8,W=x,x=l-$+1>>1,l=l+$+1>>1,$=x,x=w+L+1>>1,L=w-L+1>>1,w=x,x=H-W+1>>1,H=H+W+1>>1,W=x,x=m-p+1>>1,m=m+p+1>>1,p=x,x=l*n+w*f+2048>>12,l=l*f-w*n+2048>>12,w=x,x=L*o+$*t+2048>>12,L=L*t-$*o+2048>>12,$=x,i[0+A]=H+w,i[7+A]=H-w,i[1+A]=m+$,i[6+A]=m-$,i[2+A]=p+L,i[5+A]=p-L,i[3+A]=W+l,i[4+A]=W-l}for(z=0;z<8;++z){var I=z;if(i[8+I]==0&&i[16+I]==0&&i[24+I]==0&&i[32+I]==0&&i[40+I]==0&&i[48+I]==0&&i[56+I]==0){x=g*se[z+0]+8192>>14,i[0+I]=x,i[8+I]=x,i[16+I]=x,i[24+I]=x,i[32+I]=x,i[40+I]=x,i[48+I]=x,i[56+I]=x;continue}H=g*i[0+I]+2048>>12,m=g*i[32+I]+2048>>12,p=i[16+I],W=i[48+I],l=d*(i[8+I]-i[56+I])+2048>>12,w=d*(i[8+I]+i[56+I])+2048>>12,L=i[24+I],$=i[40+I],x=H-m+1>>1,H=H+m+1>>1,m=x,x=p*b+W*s+2048>>12,p=p*s-W*b+2048>>12,W=x,x=l-$+1>>1,l=l+$+1>>1,$=x,x=w+L+1>>1,L=w-L+1>>1,w=x,x=H-W+1>>1,H=H+W+1>>1,W=x,x=m-p+1>>1,m=m+p+1>>1,p=x,x=l*n+w*f+2048>>12,l=l*f-w*n+2048>>12,w=x,x=L*o+$*t+2048>>12,L=L*t-$*o+2048>>12,$=x,i[0+I]=H+w,i[56+I]=H-w,i[8+I]=m+$,i[48+I]=m-$,i[16+I]=p+L,i[40+I]=p-L,i[24+I]=W+l,i[32+I]=W-l}for(z=0;z<64;++z){var ue=128+(i[z]+8>>4);ne[z]=ue<0?0:ue>255?255:ue}}for(var T,te,_=0;_255?255:K}return Z.prototype={load:function(a){var u=new XMLHttpRequest;u.open("GET",a,!0),u.responseType="arraybuffer",u.onload=function(){var r=new Uint8Array(u.response||u.mozResponseArrayBuffer);this.parse(r),this.onload&&this.onload()}.bind(this),u.send(null)},parse:function(a,u){var r=0,y=a.length;function c(){var ae=a[r]<<8|a[r+1];return r+=2,ae}function P(){var ae=c(),ye=a.subarray(r,r+ae-2);return r+=ye.length,ye}function v(ae){var ye=0,Ee=0,le,_e;for(_e in ae.components)ae.components.hasOwnProperty(_e)&&(le=ae.components[_e],ye100)&&(ne=90);var se=0;se=a[4];var xe,H;for(ne>=0&&(xe=Me(ne,0),H=Me(ne,1)),u&&(a[2]=255,a[3]=224,a[4]=0,a[5]=16,a[6]=74,a[7]=70,a[8]=73,a[9]=70,se&1&&(F[0]=xe,F[1]=H),se&2&&(q[0]=X(h,M),j[0]=X(k,V),q[1]=X(D,B),j[1]=X(J,S))),Q=c();Q!=65497;){var m,p,W;switch(Q){case 65280:break;case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:var l=P();Q===65504&&l[0]===74&&l[1]===70&&l[2]===73&&l[3]===70&&l[4]===0&&(C={version:{major:l[5],minor:l[6]},densityUnits:l[7],xDensity:l[8]<<8|l[9],yDensity:l[10]<<8|l[11],thumbWidth:l[12],thumbHeight:l[13],thumbData:l.subarray(14,14+3*l[12]*l[13])}),Q===65518&&l[0]===65&&l[1]===100&&l[2]===111&&l[3]===98&&l[4]===101&&l[5]===0&&(T={version:l[6],flags0:l[7]<<8|l[8],flags1:l[9]<<8|l[10],transformCode:l[11]});break;case 65499:for(var L=c(),$=L+r-2;r<$;){var w=a[r++],x=new Int32Array(64);if(w>>4===0)for(p=0;p<64;p++){var i=e[p];x[i]=a[r++]}else if(w>>4===1)for(p=0;p<64;p++){var i=e[p];x[i]=c()}else throw"DQT: invalid table spec";F[w&15]=x}break;case 65472:case 65473:case 65474:c(),_={},_.extended=Q===65473,_.progressive=Q===65474,_.precision=a[r++],_.scanLines=c(),_.samplesPerLine=c(),_.components={},_.componentsOrder=[];var z=a[r++],A,I=0,ue=0;for(m=0;m>4,Fe=a[r+1]&15,we=a[r+2];_.componentsOrder.push(A),_.components[A]={h:ve,v:Fe,quantizationIdx:we},r+=3}v(_),R.push(_);break;case 65476:var pe=c();for(m=2;m>4===0?q:j)[be&15]=X(de,ge)}break;case 65501:c(),oe=c();break;case 65498:var Ce=c(),Ae=a[r++],N=[],E;for(m=0;m>4],E.huffmanTableAC=j[Y&15],N.push(E)}var ce=a[r++],ee=a[r++],ie=a[r++],he=re(a,r,_,N,oe,ce,ee,ie>>4,ie&15);r+=he;break;default:if(a[r-3]==255&&a[r-2]>=192&&a[r-2]<=254){r-=3;break}throw"unknown JPEG marker "+Q.toString(16)}Q=c()}if(R.length!=1)throw"only single frame JPEGs supported";for(var m=0;m100&&(U=100),U<50?U=5e3/U:U=200-U*2;var k;k=[M,D][h];for(var V=0;V<64;V++)temp=parseInt((k[V]*U+50)/100),temp<=0&&(temp=1),temp>32767&&(temp=32767),temp>255&&(temp=255),B[V]=temp;return B}self.addEventListener("message",function(U){var h=U.data;if(h.rejected=!1,Ye(h)){for(var M=new Pe(new Uint8Array(h.buffer)),D=M.decodePixels(),B=new Int16Array(D.length/2),k=0;k>24),Z=s+b,X=Z+n;if(d=="N"){var re=qe(h.buffer.slice(Z,X));h.buffer=re,postMessage(h)}else if(d=="B"){for(var re=Je(h.buffer.slice(Z,X)),B=new Float32Array(256*256),k=0;k<256*256;k++)B[k]=re[k];h.buffer=B,postMessage(h)}else if(d=="A"){var B=Ze(h.buffer.slice(Z,X));h.buffer=B,postMessage(h)}else h.rejected=!0,postMessage(h)}else h.rejected=!0,postMessage(h)});function Ye(U){if(U.buffer.byteLength>2){var h=new Uint8Array(U.buffer.byteLength>0?U.buffer.slice(1,4):0),M=h.length==0||h[0]=="P".charCodeAt()&&h[1]=="N".charCodeAt()&&h[2]=="G".charCodeAt();return M}return!1}function He(U){if(U.buffer.byteLength>80){var h=96,M=new DataView(U.buffer),D=M.getUint32(64,!0),B=M.getUint32(68,!0),k=M.getUint32(72,!0),V=M.getUint32(76,!0);return V==1}return!1}Math.fmod=function(U,h){return Number((U-Math.floor(U/h)*h).toPrecision(8))};function Je(U){var h=0,M=0,D,B=new Uint8Array(U),k=new DataView(B.buffer);h=k.getFloat32(0,!0),M=k.getFloat32(4,!0),D=B.slice(8,8+256);var V=B.slice(256+8,B.byteLength),J=De(V,!0,1);if(isNaN(J.data[0]))console.error("Error while JPEG Decompressing");else{var S=new Re,e=S.ElevDecompress(J,D,h,M);return e}}function Ze(U){for(var h=new Uint8Array(U),M=new DataView(U),D=M.getFloat32(0,!0),B=M.getFloat32(4,!0),k=B-D,V=h.slice(8,h.buffer.byteLength),J=new Pe(new Uint8Array(V)),S=J.decodePixels(),e=new Float32Array(S.length/2),t=new DataView(S.buffer),o=0;o