/*
 * Copyright CADMAI Software GmbH.
 * All rights reserved.
 *
 * Redistribution (includes making available on a web location) is permitted 
 * provided that the following conditions are met:
 *
 * The redistributor must hold one of these licenses:
 * a valid CADMAI WebGl-Publisher license (SingleWebGlPubLic)
 * a valid CADMAI WebGl-Publisher Revit export license (SingleWebGlRevitExportLic)
 * a valid CADMAI WebGl-Publisher Inventor export license (SingleWebGlInventorExportLic)
 * or a written permission of CADMAI Software GmbH 
 *
 * The redistributor / user does not have the right to change, translate,
 * back-develop, decompile or disassemble the software.
 * 
 * Redistributions must retain the above copyright notice, 
 * this list of conditions and the following disclaimer.
 *   
 * Neither the name of CADMAI Software GmbH nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 "\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74";var Dl=function(){this.yR=0;};var zU=function(zf,BZ,dc){this.name=zf;this.message=BZ;this.context=dc;};if(JSON&&JSON.stringify&&JSON.parse)var hb=hb||(function(){var DN=window.top||window;var yg;try{yg=(DN.name?JSON.parse(DN.name):{});}catch(N){yg={};}function Lj(){DN.name=JSON.stringify(yg);};return{set:function(name,value){yg[name]=value;},get:function(name){return(yg[name]?yg[name]:undefined);},clear:function(){yg={};},dump:function(){return JSON.stringify(yg);}};})();var CmiHelpers=new function(){this.B6=new Uint32Array([23,20,21,20,23,22,3,1,0,0,2,3,17,18,19,18,17,16,5,7,6,6,4,5,14,13,15,13,14,12,10,11,9,9,8,10]);this.JC=new Float32Array([1,1,1,1,1,0,1,0,1,1,0,0,1,1,1,1,1,0,0,1,1,0,1,0,1,1,1,1,0,1,0,1,1,0,0,1,1,1,0,1,0,0,0,1,0,0,0,0,1,0,1,1,0,0,0,0,1,0,0,0,0,1,1,0,1,0,0,0,1,0,0,0]);this.Dn=new Float32Array(72);this.iL=new Float32Array(96);this.tK=new Float32Array(32);this.f2=new Float32Array(8);this.c_=0.0000001;this.generateGuid=function(){return(Date.now().toString(36)+Math.random().toString(36).substring(2));};this.AY=function(a){if(Math.abs(a)<=this.c_)return true;else return false;};this.bh=function(a){if(a<-this.c_)return true;else return false;};this.qe=function(a){if(a>this.c_)return true;else return false;};this.fm=function(a){if(a<=this.c_)return true;else return false;};this.Fz=function(a){if(a>=-this.c_)return true;else return false;};this.uN=function(a){if(Math.abs(a)>this.c_)return true;else return false;};this.isEqual=function(a,b){if(Math.abs(a-b)<=(this.c_+this.c_*Math.abs(b)))return true;else return false;};this.x4=function(a,b){if((a<(b-(this.c_+this.c_*Math.abs(b)))))return true;else return false;};this.AX=function(a,b){if((a>(b+(this.c_+this.c_*Math.abs(b)))))return true;else return false;};this.eb=function(a,b){if((a<=(b+(this.c_+this.c_*Math.abs(b)))))return true;else return false;};this.ld=function(a,b){if((a>=(b-(this.c_+this.c_*Math.abs(b)))))return true;else return false;};this.qO=function(a,b){if((Math.abs(a-b)>(this.c_+this.c_*Math.abs(b))))return true;else return false;};this.isBetween=function(a,b,val){return(val>=a&&val<=b);};this.isMobile=function(){var em=false;em=/Macintosh/.test(navigator.userAgent)&&"\x6f\x6e\x74\x6f\x75\x63\x68\x65\x6e\x64" in document;if(em==false)em=/iPhone|iPad|iPod|Android/i.test(navigator.userAgent);return em;};this.wE=function(line,s_){var dx=0.0;var dy=0.0;var Fs=0.0;var iY=0.0;dx=line.cw-line.Ym;dy=line.gk-line.w6;if(this.AY(dx)){if(this.AY(dy)){if(this.isEqual(line.Ym,s_.x)&&this.isEqual(line.w6,s_.y))return(true);else return(false);};}else if(this.AY(dy)){if((this.ld(s_.x,line.Ym)&&this.eb(s_.x,line.cw))||(this.ld(s_.x,line.cw)&&this.eb(s_.x,line.Ym))){if(this.isEqual(s_.y,line.w6))return(true);else return(false);}else return(false);}else{if((this.ld(s_.y,line.w6)&&this.eb(s_.y,line.gk))||(this.ld(s_.y,line.gk)&&this.eb(s_.y,line.w6))){if(this.isEqual(s_.x,line.Ym))return(true);else return(false);}else return(false);}var D2=Math.min(line.Ym,line.cw);var yj=Math.min(line.w6,line.gk);var GB=Math.max(line.Ym,line.cw);var pH=Math.max(line.w6,line.gk);if(this.ld(s_.x,D2)&&this.eb(s_.x,GB)&&this.ld(s_.y,yj)&&this.eb(s_.y,pH)){if(this.isEqual(s_.x,D2)&&this.isEqual(s_.y,yj))return(true);if(this.isEqual(s_.x,pH)&&this.isEqual(s_.y,pH))return(true);Fs=dy/dx;dx=s_.x-line.Ym;if(this.AY(dx))return(false);iY=(s_.y-line.w6)/(s_.x-line.Ym);if(this.isEqual(Fs,iY))return(true);}};this.Z4=function(C5,uL){if(C5<0||C5>16777215){uL[0]=0.0;uL[1]=0.0;uL[2]=0.0;}else{uL[0]=((C5>>16)&0xff)/255;uL[1]=((C5>>8)&0xff)/255;uL[2]=(C5&0xff)/255;}};this.JB=function(uL,selectionTolerance){if(uL.length!==3){return 0;}let Jy=uL[0]*255;let th=uL[1]*255;let OW=uL[2]*255;return(Jy<<16)|(th<<8)|OW;};this.pX=function(name,value,F5){var EA;if(F5){var n6=new Date();n6.setTime(n6.getTime()+(F5*24*60*60*1000));EA="\x3b\x20\x65\x78\x70\x69\x72\x65\x73\x3d"+n6.toGMTString();}else EA="";document.cookie=name+"\x3d"+value+EA+"\x3b\x20\x70\x61\x74\x68\x3d\x2f";};this.UU=function(name){var Yl=name+"\x3d";var Ce=document.cookie.split("\x3b");for(var G=0;G<Ce.length;G++){var c=Ce[G];while(c.charAt(0)=="\x20")c=c.substring(1,c.length);if(c.indexOf(Yl)==0)return c.substring(Yl.length,c.length);}return null;};this.yP=function(name){pX(name,"",-1);};this.KK=function(Wl,IA){var n_;var hn="";if(Wl.search("\x22\x63\x6d\x69\x44\x61\x74\x61\x22\x3a\x22\x7b")!=-1)hn=Wl.replace(/\\\n/g,"").replace(/\n/g,"");else hn=Wl.replace(/\r\n|\n|\r|\\/gm,"");if((hn[0]=="\x22")&&(hn[hn.length-1]=="\x22")){hn=hn.slice(1,hn.length-1)}if((typeof(JSON)!="\x75\x6e\x64\x65\x66\x69\x6e\x65\x64")&&(JSON.parse)){try{n_=JSON.parse(hn);if(typeof(n_)=="\x73\x74\x72\x69\x6e\x67"){n_=JSON.parse(n_);}}catch(N){try{n_=eval("\x28"+hn+"\x29");if(typeof(n_)=="\x73\x74\x72\x69\x6e\x67"){n_=eval("\x28"+n_+"\x29");}}catch(N){if(IA)IA.s("\x74\x65\x78\x74\x54\x6f\x4f\x62\x6a\x65\x63\x74",N.message,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return null;}}}else{try{n_=eval("\x28"+hn+"\x29");if(typeof(n_)=="\x73\x74\x72\x69\x6e\x67")n_=eval("\x28"+n_+"\x29");}catch(N){if(IA)IA.s("\x74\x65\x78\x74\x54\x6f\x4f\x62\x6a\x65\x63\x74",N.message,"\x53\x43\x52\x49\x50\x54\x5f\x45\x52\x52\x4f\x52");return null;}}return n_;};this.addEventListener=function(element,Bu,pe,scope){var Ay=scope?function(e){pe.apply(scope,[e]);}:pe;if(document.addEventListener)element.addEventListener(Bu,Ay,false);else if(document.attachEvent)element.attachEvent("\x6f\x6e"+Bu,Ay);};this.FT=function(k,Aq){var DX=null;if(typeof(MessageEvent)!="\x75\x6e\x64\x65\x66\x69\x6e\x65\x64"){var origin=window.location.protocol+"\x2f\x2f"+window.location.host;try{DX=new MessageEvent("\x6d\x65\x73\x73\x61\x67\x65",{"\x62\x75\x62\x62\x6c\x65\x73":true,"\x63\x61\x6e\x63\x65\x6c\x61\x62\x6c\x65":true,"\x64\x61\x74\x61":k,"\x6f\x72\x69\x67\x69\x6e":origin,"\x6c\x61\x73\x74\x45\x76\x65\x6e\x74\x49\x64":Aq,"\x76\x69\x65\x77":window});return DX;}catch(e){}}if(document.createEvent){try{DX=document.createEvent("\x4d\x65\x73\x73\x61\x67\x65\x45\x76\x65\x6e\x74");}catch(e){return null;}if(DX.initMessageEvent){var origin=window.location.protocol+"\x2f\x2f"+window.location.host;DX.initMessageEvent("\x6d\x65\x73\x73\x61\x67\x65",true,true,k,origin,Aq,window,null);return DX;}else{return null;}}return null;};this.l9=function(s5){if(!s5)return "";var aS=s5.substring(0,(s5.indexOf("\x23")==-1)?s5.length:s5.indexOf("\x23"));aS=aS.substring(0,(aS.indexOf("\x3f")==-1)?aS.length:aS.indexOf("\x3f"));aS=aS.substring(aS.lastIndexOf("\x2f")+1,aS.length);return(aS.split("\x2e")[0])};this.calculateProjectedDistance=function(fl,nz,Ii){let _=[0,0,0];let mw=[0,0,0];var qV=new mat4.createIdent();var eD=new mat4.createIdent();mat4.AddXRotation(qV,Ii[0]*Math.PI/180.0);mat4.AddYRotation(qV,Ii[1]*Math.PI/180.0);mat4.AddZRotation(qV,Ii[2]*Math.PI/180.0);mat4.inverse(qV,eD);_=CmiHelpers.projectPointToCs(fl,eD);mw=CmiHelpers.projectPointToCs(nz,eD);mw[2]=_[2];mw=CmiHelpers.projectPointToCs(mw,qV);return CmiHelpers.calculate3dDistance(fl,mw)};this.calculate3dDistance=function(fl,nz){var m2,_H,B8;m2=nz[0]-fl[0];_H=nz[1]-fl[1];B8=nz[2]-fl[2];if((m2==0.0)&&(_H==0.0)&&(B8==0.0)){return 0.0;}else{return Math.sqrt((m2*m2)+(_H*_H)+(B8*B8));}};this.nW=function(fl,nz,HT,result){var u=new Array(0.0,0.0,0.0);var Mx=new Array(0.0,0.0,0.0);var n=new Array(0.0,0.0,0.0);var hf=0.0;u[0]=nz[0]-fl[0];u[1]=nz[1]-fl[1];u[2]=nz[2]-fl[2];Mx[0]=HT[0]-fl[0];Mx[1]=HT[1]-fl[1];Mx[2]=HT[2]-fl[2];n[0]=u[1]*Mx[2]-u[2]*Mx[1];n[1]=u[2]*Mx[0]-u[0]*Mx[2];n[2]=u[0]*Mx[1]-u[1]*Mx[0];hf=Math.sqrt(n[0]*n[0]+n[1]*n[1]+n[2]*n[2]);result[0]=n[0]/hf;result[1]=n[1]/hf;result[2]=n[2]/hf;};this.mv=function(m,V){var m2,_H,B8;var Lm=new Array(0.0,0.0,0.0);if((!m)||(!V))return Lm;m2=V[0]-m[0];_H=V[1]-m[1];B8=V[2]-m[2];if((m2==0.0)&&(_H==0.0)&&(B8==0.0)){Lm[0]=0.0;Lm[1]=0.0;Lm[2]=0.0;}else{Lm[0]=m[0]+m2*0.5;Lm[1]=m[1]+_H*0.5;Lm[2]=m[2]+B8*0.5;}return Lm;};this.rN=function(angle){if(this.AY(angle))return 0.0;return((Math.sqrt(1.0+((angle)*(angle)))-1.0)/(angle));};this.Ft=function(YJ){var bC=YJ;var a=0.0;var FR=0.0;var a6=0.0;var Wz=0.0;if(this.fm(bC)){if(this.AY(bC))return(0.0);else return(0.0);}else{if(this.isEqual(bC,1.0))return(90.0);else if(this.isEqual(bC,2.0))return(180.0);else if(this.isEqual(bC,3.0))return(270.0);while(this.ld(bC,4.0))bC=bC-4.0;if(this.x4(bC,1.0)){a6=bC;}else{Wz=parseInt(bC);a6=bC%Wz;}FR=Math.atan(a6)*2;if(this.AY(a6)){if(this.isEqual(bC,1.0))return(90.0);if(this.isEqual(bC,2.0))return(180.0);if(this.isEqual(bC,3.0))return(270.0);return(0.0);}else{a=this.fA(FR);if(this.eb(bC,1.0))return(a);if(this.AX(bC,1.0)&&this.x4(bC,2.0))return(90.0+a);if(this.ld(bC,2.0)&&this.x4(bC,3.0))return(180.0+a);if(this.ld(bC,3.0)&&this.x4(bC,4.0))return(270.0+a);return(0.0);}}};this.getCorrectedAngle=function(angle){while(angle<0.0)angle=angle+360.0;while(angle>360.0)angle=angle-360.0;return(angle);};this.projectPointToCs=function(Kk,At){var hM=[Kk[0],Kk[1],Kk[2]];if(At!=undefined){hM[0]=At[0]*Kk[0]+At[4]*Kk[1]+At[8]*Kk[2]+At[12];hM[1]=At[1]*Kk[0]+At[5]*Kk[1]+At[9]*Kk[2]+At[13];hM[2]=At[2]*Kk[0]+At[6]*Kk[1]+At[10]*Kk[2]+At[14];}return hM;};this.jc=function(Kk,gd,At){var hM=[Kk[0],Kk[1],Kk[2]];var B_=[gd[0],gd[1],gd[2]];if(At!=undefined){hM[0]=At[0]*Kk[0]+At[4]*Kk[1]+At[8]*Kk[2]+At[12];hM[1]=At[1]*Kk[0]+At[5]*Kk[1]+At[9]*Kk[2]+At[13];hM[2]=At[2]*Kk[0]+At[6]*Kk[1]+At[10]*Kk[2]+At[14];B_[0]=At[0]*gd[0]+At[4]*gd[1]+At[8]*gd[2]+At[12];B_[1]=At[1]*gd[0]+At[5]*gd[1]+At[9]*gd[2]+At[13];B_[2]=At[2]*gd[0]+At[6]*gd[1]+At[10]*gd[2]+At[14];}var hc=B_[0]-hM[0];var sM=B_[1]-hM[1];if(this.AY(hc)&&this.AY(sM))return 0.0;var Uo=[hc,sM];var bo=0.0;var YJ=0.0;if(this.Fz(Uo[0])&&this.Fz(Uo[1])){if(this.qe(hc)){bo=sM/hc;YJ=this.rN(bo);}else YJ=1.0;}else if(this.bh(Uo[0])&&this.Fz(Uo[1])){if(this.qe(sM)){bo=-hc/sM;YJ=1.0+this.rN(bo);}else YJ=2.0;}else if(this.bh(Uo[0])&&this.bh(Uo[1])){if(this.bh(hc)){bo=sM/hc;YJ=2.0+this.rN(bo);}else YJ=3.0;}else{if(this.bh(sM)){bo=-hc/sM;YJ=3.0+this.rN(bo);}else YJ=0.0;}return this.Ft(YJ);};this.sign=function(x){return x>0?1:x<0?-1:0;};this.fA=function(angle){return(angle*180/Math.PI);};this.rad=function(angle){return(angle*Math.PI/180);};this.VK=function(po){return new Array(po[12],po[13],po[14]);};this.qR=function(po){var alpha=0.0,beta=0.0,gamma=0.0;var xL=new mat4.create();mat4.identity(xL);mat4.multiply(xL,po);var d=Math.sqrt(xL[0]*xL[0]+xL[1]*xL[1]);if(d!=0.0){beta=Math.atan2(-xL[2],d);var oX=this.sign(Math.cos(beta));gamma=Math.atan2(xL[1]*oX,xL[0]*oX);alpha=Math.atan2(xL[6]*oX,xL[10]*oX);}else{if(xL[2]<0){beta=1.57079632679489661923;gamma=0;alpha=Math.atan2(xL[4],xL[5]);}else{beta=-1.57079632679489661923;gamma=0;alpha=-Math.atan2(xL[4],xL[5]);}}return new Array(alpha,beta,gamma);};this.gU=function(UJ){var mg=new Array(0,0,0);var rgbColor=new Array(0,0,0);rgbColor[0]=parseInt(UJ[0]*255);rgbColor[1]=parseInt(UJ[1]*255);rgbColor[2]=parseInt(UJ[2]*255);if((UJ[0]==0.0)&&(UJ[1]==0.0)&&(UJ[2]==0.0)){mg[0]=rgbColor[0]+1;mg[1]=rgbColor[1]+1;mg[2]=rgbColor[2]+1;}else{mg[0]=rgbColor[0]-1;mg[1]=rgbColor[1]-1;mg[2]=rgbColor[2]-1;}return mg;};this.hX=function(UJ){var mg=new Array(0,0,0);var rgbColor=new Array(0,0,0);var YO=new Array(0.0,0.0,0.0);rgbColor[0]=parseInt(UJ[0]*255);rgbColor[1]=parseInt(UJ[1]*255);rgbColor[2]=parseInt(UJ[2]*255);if((UJ[0]==0.0)&&(UJ[1]==0.0)&&(UJ[2]==0.0)){mg[0]=rgbColor[0]+1;mg[1]=rgbColor[1]+1;mg[2]=rgbColor[2]+1;}else{mg[0]=rgbColor[0]-1;mg[1]=rgbColor[1]-1;mg[2]=rgbColor[2]-1;}YO[0]=mg[0]/255;YO[1]=mg[2]/255;YO[2]=mg[3]/255;return YO;};this.AA=function(length,width,o_,_,mw){var fl=new Float32Array([length,-width*0.5,0.0]);var nz=new Float32Array([length,width*0.5,0.0]);if(o_!=0.0){var qV=new mat4.create();mat4.identity(qV);mat4.rotateZ(qV,o_*Math.PI/180.0);mat4.multiplyVec3(qV,fl);mat4.multiplyVec3(qV,nz);}_[0]=fl[0];_[1]=fl[1];_[2]=fl[2];mw[0]=nz[0];mw[1]=nz[1];mw[2]=nz[2];};this.Di=function(Ox,NW,qi,EU,vJ,vX){var EN=2.0;var KS=10;var FM=0;var ue;var O1=EN*NW+KS;var Ph=parseInt((O1*((EU-qi)/360)));if(Ph<3)Ph=3;var T5=Math.PI*qi/180;var angle=(EU-qi)/Ph;var EM=0.0;if(vX)ue=new Float32Array(Ph*2*4);else ue=new Float32Array(Ph*2*3);var mt=new Float32Array(3);var Uo=new Float32Array(3);var pU=0;var IM=0.0;for(var G=0;G<Ph;G++){if(G==0){mt[0]=Math.cos(T5)*NW+Ox[0];mt[1]=Math.sin(T5)*NW+Ox[1];mt[2]=0.0+Ox[2];}else{mt[0]=Uo[0];mt[1]=Uo[1];mt[2]=Uo[2];}EM=T5+((G+1)*Math.PI*angle/180);Uo[0]=Math.cos(EM)*NW+Ox[0];Uo[1]=Math.sin(EM)*NW+Ox[1];Uo[2]=0.0+Ox[2];if(G==0){var dx=mt[0]-Uo[0];var dy=mt[1]-Uo[1];var LQ=mt[2]-Uo[2];IM=Math.max(1.0,Math.sqrt((dx*dx)+(dy*dy)+(LQ*LQ)));}if(vX){ue[pU+0]=mt[0];ue[pU+1]=mt[1];ue[pU+2]=mt[2];ue[pU+3]=0.0;ue[pU+4]=Uo[0];ue[pU+5]=Uo[1];ue[pU+6]=Uo[2];ue[pU+7]=IM;pU=pU+8;}else{ue[pU+0]=mt[0];ue[pU+1]=mt[1];ue[pU+2]=mt[2];ue[pU+3]=Uo[0];ue[pU+4]=Uo[1];ue[pU+5]=Uo[2];pU=pU+6;}}var Fj=new vec3.create();var uh=6;if(vX){FM=ue.length/4;uh=4;}else{FM=ue.length/3;uh=3;}for(var G=0;G<FM;G++){Fj[0]=ue[uh*G+0];Fj[1]=ue[uh*G+1];Fj[2]=ue[uh*G+2];mat4.multiplyVec3(vJ,Fj);ue[uh*G]=Fj[0];ue[uh*G+1]=Fj[1];ue[uh*G+2]=Fj[2];}return(ue);};this.LM=function(Mc){var FM=Mc.length;var dW;var ao=new Yv();for(var G=0;G<FM;G++){dW=Mc.charCodeAt(G);switch(dW){case 33:ao.append("\x2e\x30");break;case 35:ao.append("\x2e\x34");break;case 36:ao.append("\x2e\x35");break;case 37:ao.append("\x2e\x36");break;case 38:ao.append("\x2e\x37");break;case 40:ao.append("\x2e\x38");break;case 41:ao.append("\x2e\x39");break;case 42:ao.append("\x30\x2e");break;case 43:ao.append("\x30\x30");break;case 45:ao.append("\x30\x34");break;case 46:ao.append("\x30\x35");break;case 47:ao.append("\x30\x36");break;case 48:ao.append("\x30\x37");break;case 49:ao.append("\x30\x38");break;case 50:ao.append("\x30\x39");break;case 51:ao.append("\x34\x2e");break;case 52:ao.append("\x34\x30");break;case 53:ao.append("\x34\x34");break;case 54:ao.append("\x34\x35");break;case 55:ao.append("\x34\x36");break;case 56:ao.append("\x34\x37");break;case 57:ao.append("\x34\x38");break;case 58:ao.append("\x34\x39");break;case 59:ao.append("\x35\x2e");break;case 60:ao.append("\x35\x30");break;case 61:ao.append("\x35\x34");break;case 62:ao.append("\x35\x35");break;case 63:ao.append("\x35\x36");break;case 64:ao.append("\x35\x37");break;case 65:ao.append("\x35\x38");break;case 66:ao.append("\x35\x39");break;case 67:ao.append("\x36\x2e");break;case 68:ao.append("\x36\x30");break;case 69:ao.append("\x36\x34");break;case 70:ao.append("\x36\x35");break;case 71:ao.append("\x36\x36");break;case 72:ao.append("\x36\x37");break;case 73:ao.append("\x36\x38");break;case 74:ao.append("\x36\x39");break;case 75:ao.append("\x37\x2e");break;case 76:ao.append("\x37\x30");break;case 77:ao.append("\x37\x34");break;case 78:ao.append("\x37\x35");break;case 79:ao.append("\x37\x36");break;case 80:ao.append("\x37\x37");break;case 81:ao.append("\x37\x38");break;case 82:ao.append("\x37\x39");break;case 83:ao.append("\x38\x2e");break;case 84:ao.append("\x38\x30");break;case 85:ao.append("\x38\x34");break;case 86:ao.append("\x38\x35");break;case 87:ao.append("\x38\x36");break;case 88:ao.append("\x38\x37");break;case 89:ao.append("\x38\x38");break;case 90:ao.append("\x38\x39");break;case 91:ao.append("\x39\x2e");break;case 93:ao.append("\x39\x30");break;case 94:ao.append("\x39\x31");break;case 95:ao.append("\x39\x32");break;case 96:ao.append("\x39\x33");break;case 97:ao.append("\x39\x34");break;case 98:ao.append("\x39\x35");break;case 99:ao.append("\x39\x36");break;case 100:ao.append("\x39\x37");break;case 101:ao.append("\x39\x38");break;case 102:ao.append("\x39\x39");break;case 103:ao.append("\x2d\x31");break;case 104:ao.append("\x2d\x32");break;case 105:ao.append("\x2d\x33");break;case 106:ao.append("\x2d\x34");break;case 107:ao.append("\x2d\x35");break;case 108:ao.append("\x2d\x36");break;case 109:ao.append("\x2d\x37");break;case 110:ao.append("\x2d\x38");break;case 111:ao.append("\x2d\x39");break;case 112:ao.append("\x2d");break;case 113:ao.append("\x2c");break;case 114:ao.append("\x2e");break;case 115:ao.append("\x65");break;case 116:ao.append("\x30");break;case 117:ao.append("\x31");break;case 118:ao.append("\x32");break;case 119:ao.append("\x33");break;case 121:ao.append("\x34");break;case 122:ao.append("\x35");break;case 123:ao.append("\x36");break;case 124:ao.append("\x37");break;case 125:ao.append("\x38");break;case 126:ao.append("\x39");break;}}return(ao.toString());};this.Uh=function(Rt){var O3=Rt.split("\x2c");var ao=new Yv();var FM=O3.length;ao.append("\x5b");for(var G=0;G<FM;G++){if(O3[G].indexOf("\x78")==-1){ao.append(this.LM(O3[G]));if(G<FM-1)ao.append("\x2c");}else{var jd=O3[G].split("\x78");var HI=parseInt(jd[0]);var content=this.LM(jd[1]);for(var Ep=0;Ep<HI;Ep++){ao.append(content);if(G<FM-1){ao.append("\x2c");}else{if(Ep<HI-1)ao.append("\x2c");}}}}ao.append("\x5d");var Sf=this.KK(ao.toString());return Sf;};this.xi=function(EG,zT){var FM=EG.length;var fV=0;for(var G=0;G<FM;G++){if(isNaN(EG[G])){var jd=EG[G].split("\x78");var HI=parseInt(jd[0]);var content=jd[1];var LP=jd[1].split("\x2c");var zX=LP.length;for(var Ep=0;Ep<HI;Ep++){for(var M=0;M<zX;M++){zT[fV]=parseFloat(LP[M]);fV++;}}}else{zT[fV]=EG[G];fV++;}}return 0;};this.bJ=function(Rt,zT){var O3=Rt.split("\x2c");var FM=O3.length;var x0=new Yv(50);var Sf;var cursor=0;for(var G=0;G<FM;G++){if(O3[G].indexOf("\x78")==-1){Sf=this.KK("\x5b"+this.LM(O3[G])+"\x5d");for(var M=0;M<Sf.length;M++){zT[cursor]=Sf[M];cursor++;}}else{var jd=O3[G].split("\x78");var HI=parseInt(jd[0]);Sf=this.KK("\x5b"+this.LM(jd[1])+"\x5d");for(var Ep=0;Ep<HI;Ep++){for(var M=0;M<Sf.length;M++){zT[cursor]=Sf[M];cursor++;}}}}};this.gCi=function(){var Bm="\x34\x33\x36\x46\x37\x30\x37\x39\x37\x32\x36\x39\x36\x37\x36\x38\x37\x34\x32\x30\x34\x33\x34\x31\x34\x34\x34\x44\x34\x31\x34\x39\x32\x30\x35\x33\x36\x46\x36\x36\x37\x34\x37\x37\x36\x31\x37\x32\x36\x35\x32\x30\x34\x37\x36\x44\x36\x32\x34\x38";var B4='';for(var G=0;G<Bm.length;G+=2)B4+=String.fromCharCode(parseInt(Bm.substr(G,2),16));return B4;};this.nx=function(A1){var lf=-1;var G=0;var SX=[];var Gz=A1.length;for(G=0;G<Gz;G++){if(A1[G]!=lf){SX.push(A1[G]);lf=A1[G];}}return SX;};this._k=function(str){var pattern=new RegExp("\x5e\x28\x68\x74\x74\x70\x73\x3f\x3a\x5c\x2f\x5c\x2f\x29\x3f"+"\x28\x28\x28\x5b\x61\x2d\x7a\x5c\x64\x5d\x28\x5b\x61\x2d\x7a\x5c\x64\x2d\x5d\x2a\x5b\x61\x2d\x7a\x5c\x64\x5d\x29\x2a\x29\x5c\x2e\x29\x2b\x5b\x61\x2d\x7a\x5d\x7b\x32\x2c\x7d\x7c"+"\x28\x28\x5c\x64\x7b\x31\x2c\x33\x7d\x5c\x2e\x29\x7b\x33\x7d\x5c\x64\x7b\x31\x2c\x33\x7d\x29\x29"+"\x28\x5c\x3a\x5c\x64\x2b\x29\x3f\x28\x5c\x2f\x5b\x2d\x61\x2d\x7a\x5c\x64\x25\x5f\x2e\x7e\x2b\x5d\x2a\x29\x2a"+"\x28\x5c\x3f\x5b\x3b\x26\x61\x2d\x7a\x5c\x64\x25\x5f\x2e\x7e\x2b\x3d\x2d\x5d\x2a\x29\x3f"+"\x28\x5c\x23\x5b\x2d\x61\x2d\x7a\x5c\x64\x5f\x5d\x2a\x29\x3f\x24","\x69");if(!pattern.test(str)){return false;}else{return true;}};this.drawBoundingBox=function(c1,size,color,shaderObject,h){var qr=null;this.iL[0]=c1[0][0];this.iL[1]=c1[0][1];this.iL[2]=c1[0][2];this.iL[3]=0.0;this.iL[4]=c1[1][0];this.iL[5]=c1[1][1];this.iL[6]=c1[1][2];this.iL[7]=size;this.iL[8]=c1[1][0];this.iL[9]=c1[1][1];this.iL[10]=c1[1][2];this.iL[11]=0.0;this.iL[12]=c1[2][0];this.iL[13]=c1[2][1];this.iL[14]=c1[2][2];this.iL[15]=size;this.iL[16]=c1[2][0];this.iL[17]=c1[2][1];this.iL[18]=c1[2][2];this.iL[19]=0.0;this.iL[20]=c1[3][0];this.iL[21]=c1[3][1];this.iL[22]=c1[3][2];this.iL[23]=size;this.iL[24]=c1[3][0];this.iL[25]=c1[3][1];this.iL[26]=c1[3][2];this.iL[27]=0.0;this.iL[28]=c1[0][0];this.iL[29]=c1[0][1];this.iL[30]=c1[0][2];this.iL[31]=size;this.iL[32]=c1[4][0];this.iL[33]=c1[4][1];this.iL[34]=c1[4][2];this.iL[35]=0.0;this.iL[36]=c1[5][0];this.iL[37]=c1[5][1];this.iL[38]=c1[5][2];this.iL[39]=size;this.iL[40]=c1[5][0];this.iL[41]=c1[5][1];this.iL[42]=c1[5][2];this.iL[43]=0.0;this.iL[44]=c1[6][0];this.iL[45]=c1[6][1];this.iL[46]=c1[6][2];this.iL[47]=size;this.iL[48]=c1[6][0];this.iL[49]=c1[6][1];this.iL[50]=c1[6][2];this.iL[51]=0.0;this.iL[52]=c1[7][0];this.iL[53]=c1[7][1];this.iL[54]=c1[7][2];this.iL[55]=size;this.iL[56]=c1[7][0];this.iL[57]=c1[7][1];this.iL[58]=c1[7][2];this.iL[59]=0.0;this.iL[60]=c1[4][0];this.iL[61]=c1[4][1];this.iL[62]=c1[4][2];this.iL[63]=size;this.iL[64]=c1[1][0];this.iL[65]=c1[1][1];this.iL[66]=c1[1][2];this.iL[67]=0.0;this.iL[68]=c1[5][0];this.iL[69]=c1[5][1];this.iL[70]=c1[5][2];this.iL[71]=size;this.iL[72]=c1[2][0];this.iL[73]=c1[2][1];this.iL[74]=c1[2][2];this.iL[75]=0.0;this.iL[76]=c1[6][0];this.iL[77]=c1[6][1];this.iL[78]=c1[6][2];this.iL[79]=size;this.iL[80]=c1[3][0];this.iL[81]=c1[3][1];this.iL[82]=c1[3][2];this.iL[83]=0.0;this.iL[84]=c1[7][0];this.iL[85]=c1[7][1];this.iL[86]=c1[7][2];this.iL[87]=size;this.iL[88]=c1[0][0];this.iL[89]=c1[0][1];this.iL[90]=c1[0][2];this.iL[91]=0.0;this.iL[92]=c1[4][0];this.iL[93]=c1[4][1];this.iL[94]=c1[4][2];this.iL[95]=size;qr=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,qr);h.bufferData(h.ARRAY_BUFFER,this.iL,h.STATIC_DRAW);qr.itemSize=4;qr.numItems=this.iL.length/4;shaderObject.Np(color,0,0);h.bindBuffer(h.ARRAY_BUFFER,qr);h.vertexAttribPointer(shaderObject.W,4,h.FLOAT,false,0,0);h.drawArrays(h.LINES,0,24);shaderObject.PL(0);};this.Cn=function(cP,size,color,shaderObject,h){var llP=new Array(0.0,0.0,0.0);var urP=new Array(0.0,0.0,0.0);var ns=size*0.5*0.57735;var qr=null;llP[0]=cP[0]-ns;llP[1]=cP[1]-ns;llP[2]=cP[2]-ns;urP[0]=cP[0]+ns;urP[1]=cP[1]+ns;urP[2]=cP[2]+ns;this.tK[0]=llP[0];this.tK[1]=llP[1];this.tK[2]=llP[2];this.tK[3]=0.0;this.tK[4]=urP[0];this.tK[5]=urP[1];this.tK[6]=urP[2];this.tK[7]=size;this.tK[8]=urP[0];this.tK[9]=llP[1];this.tK[10]=llP[2];this.tK[11]=0.0;this.tK[12]=llP[0];this.tK[13]=urP[1];this.tK[14]=urP[2];this.tK[15]=size;this.tK[16]=llP[0];this.tK[17]=urP[1];this.tK[18]=llP[2];this.tK[19]=0.0;this.tK[20]=urP[0];this.tK[21]=llP[1];this.tK[22]=urP[2];this.tK[23]=size;this.tK[24]=urP[0];this.tK[25]=urP[1];this.tK[26]=llP[2];this.tK[27]=0.0;this.tK[28]=llP[0];this.tK[29]=llP[1];this.tK[30]=urP[2];this.tK[31]=size;qr=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,qr);h.bufferData(h.ARRAY_BUFFER,this.tK,h.STATIC_DRAW);qr.itemSize=4;qr.numItems=this.tK.length/4;shaderObject.Np(color,0,0);h.bindBuffer(h.ARRAY_BUFFER,qr);h.vertexAttribPointer(shaderObject.W,4,h.FLOAT,false,0,0);h.drawArrays(h.LINES,0,8);shaderObject.PL(0);};this.vj=function(LB,Wq,color,gj,hg,h){var qr=null;var TW=this.calculate3dDistance(LB,Wq);this.f2[0]=Wq[0];this.f2[1]=Wq[1];this.f2[2]=Wq[2];this.f2[3]=0.0;this.f2[4]=LB[0];this.f2[5]=LB[1];this.f2[6]=LB[2];this.f2[7]=TW;qr=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,qr);h.bufferData(h.ARRAY_BUFFER,this.f2,h.STATIC_DRAW);qr.itemSize=4;qr.numItems=this.f2.length/4;gj.Np(color,0,0);h.bindBuffer(h.ARRAY_BUFFER,qr);h.vertexAttribPointer(gj.W,4,h.FLOAT,false,0,0);h.drawArrays(h.LINES,0,2);gj.PL(0);hg.Np(color,10.0,0);h.bindBuffer(h.ARRAY_BUFFER,qr);h.vertexAttribPointer(hg.W,3,h.FLOAT,false,0,0);h.drawArrays(h.POINTS,0,1);hg.PL(0);};this.Er=function(a,b){return b.color[3]-a.color[3];};this.pE=function(a,b){if((a.a9==null)&&(b.a9==null))return b.color[3]-a.color[3];else if((a.a9==null)&&(b.a9!=null))return b.a9[3]-a.color[3];else if((a.a9!=null)&&(b.a9==null))return b.color[3]-a.a9[3];else return b.a9[3]-a.a9[3];};};
