////////////////////////////////////////////////////////////////////// // Pano2VR 6.1.2/17873 HTML5/CSS3 & WebGL Panorama Player // // License: Serge Coudert // // (c) 2019, Garden Gnome Software, http://ggnome.com // ////////////////////////////////////////////////////////////////////// var jh="function"==typeof Object.defineProperties?Object.defineProperty:function(r,n,m){r!=Array.prototype&&r!=Object.prototype&&(r[n]=m.value)},lh="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function mh(r,n){if(n){var m=lh;r=r.split(".");for(var d=0;dm&&(m=Math.max(0,c+m));if(null==d||d>c)d=c;d=Number(d);0>d&&(d=Math.max(0,c+d));for(m=Number(m||0);mm&&(m=Math.max(m+c,0));mf;)f+=360;for(;180h&&(h=a.fov.m);this.ac||(this.ac=new r.Ha,this.ac.Nl(this.pan,this.A));0!=this.mode&& 1!=this.mode||!b||this.ic&&this.ic.gain.setValueAtTime(this.level*a.ca*this.ua,b.currentTime);if(2==this.mode&&b){var l=.5*Math.cos(f*Math.PI/180)+.5;this.Qc=Math.sqrt(l)*this.ua*this.level*a.ca;this.Tc=Math.sqrt(l)*this.ua*this.level*a.ca;this.Rc=Math.sqrt(1-l)*this.ua*this.level*a.ca;this.Sc=Math.sqrt(1-l)*this.ua*this.level*a.ca;this.th()}if(3==this.mode){f=0>f?f<-this.Bb?f+this.Bb:0:f>this.Bb?f-this.Bb:0;var k=this.level;e=Math.abs(e);e=eh||0>q)l= k*g*a.ca,b?(this.Qc=l*this.ua,this.Tc=l*this.ua,this.Sc=this.Rc=0,this.th()):this.j.volume=k*g*a.ca;else if(l=1-Math.abs(f/h),b){var p=k*(g+(1-g)*q*l)*a.ca;l=k*g*a.ca;0<=f?(this.Qc=p*this.ua,this.Tc=l*this.ua):(this.Qc=l*this.ua,this.Tc=p*this.ua);2*Math.abs(f)f?f>-this.Bb?0:f+this.Bb:f no audio buffer -> playWhenReady"),this.Vq=!0)};c.prototype.uj=function(){var a=this.u.wa.currentTime-this.wh;this.mf();this.Re=a};c.prototype.mf=function(){this.fc&&this.Nf&&(this.stopped=!0,this.fc.disconnect(),this.fc.stop(0),this.fc=null);this.wh=this.Re= 0;this.Nf=!1};c.prototype.Ho=function(){var a=this.u.wa;return this.Re?this.Re:this.wh?a.currentTime-this.wh:0};c.prototype.Io=function(a){this.mf();this.Re=a;this.Wd()};c.prototype.addElement=function(){var a=-1,b=this,e=this.u,f=this.u.wa;try{for(var g=!1,h=0;ha.loop&&(a.j.preload="none"));a.j.volume=a.level*b.ca;1<=a.loop&&(a.wb=a.loop-1);e&&(this.se=!0);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&& 0<=a.loop&&(a.j.autoplay=!0,a.isRunning=!0,a.autoplay=!0,a.Sk());b.T.push(this);b.Hh?b.aa.appendChild(a.j):(a.j.style.position="absolute",a.xc&&(a.j.width=a.xc),a.$c&&(a.j.height=a.$c),b.L.appendChild(a.j));a.j.addEventListener("ended",function(){a.ms()},!1)}catch(h){b.O(h)}};c.prototype.registerElement=function(a,b){this.cd=!0;this.j=b;this.id=a;this.level=1;this.u.T.push(this)};c.prototype.Te=function(){var a=this.u;a.Hh&&(a.S.deleteTexture(this.texture),this.texture=0,a.aa.removeChild(this.j)); a.Wn&&a.L.removeChild(this.j);this.j=null};return c}(m);r.fl=m;m=function(d){function c(a){a=d.call(this,a)||this;a.url="";a.Ga=0;a.La=0;a.lb=0;a.fov=50;a.hb=0;a.Ng=!1;a.xc=100;a.$c=100;a.Gc=1;return a}__extends(c,d);c.prototype.Yb=function(a){d.prototype.Yb.call(this,a);var b;if(b=a.getAttributeNode("url"))this.url=b.nodeValue.toString();if(b=a.getAttributeNode("rotx"))this.Ga=Number(b.nodeValue);if(b=a.getAttributeNode("roty"))this.La=Number(b.nodeValue);if(b=a.getAttributeNode("rotz"))this.lb= Number(b.nodeValue);if(b=a.getAttributeNode("fov"))this.fov=Number(b.nodeValue);if(b=a.getAttributeNode("width"))this.xc=Number(b.nodeValue);if(b=a.getAttributeNode("height"))this.$c=Number(b.nodeValue);this.Gc=(b=a.getAttributeNode("stretch"))?Number(b.nodeValue):1;if(b=a.getAttributeNode("clickmode"))this.hb=Number(b.nodeValue);if(b=a.getAttributeNode("handcursor"))this.Ng=1==Number(b.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(b=a.getAttributeNode("url"))&&(this.url=b.nodeValue.toString()), a=a.nextSibling};c.prototype.Lg=function(){this.Ig=!1;this.j.style[this.u.Xc]="none"};c.prototype.Ie=function(){1!==this.hb&&4!==this.hb||this.Kg(!this.pb)};c.prototype.Kg=function(a){var b=this.u;if(1===this.hb||4===this.hb)this.pb=a,this.u.Nb?(a=this.u.ra)&&a.activateSound(this.id,this.pb?1:0):(this.pb?(this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(b.Lh+8E4).toString()):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=b.Lh.toString()), this.j.style[b.Xc]="all 1s ease 0s",this.Ig=!0,b.Rn())};c.prototype.addElement=function(){var a=this,b=this.u;try{a.j=document.createElement("img");a.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.j.setAttribute("class","ggmedia");a.j.hidden=!0;a.j.addEventListener("click",function(e){e.stopPropagation()});b.Cf&&a.j.setAttribute("id",b.Cf+a.id);a.j.ondragstart=function(){return!1};if(1===a.hb||4===a.hb)a.j.addEventListener(b.eo(),function(){a.Lg()},!1),a.j.addEventListener("transitionend", function(){a.Lg()},!1);a.j.setAttribute("src",b.Pb(a.url));a.xc&&(a.j.width=a.xc);a.$c&&(a.j.height=a.$c);b.fb.push(a);a.j.style.position="absolute";b.L.appendChild(a.j)}catch(e){b.O("Error addimage:"+e)}};c.prototype.Te=function(){this.u.L.removeChild(this.j);this.j=null};return c}(n);r.po=m;n=function(d){function c(a){a=d.call(this,a)||this;a.nl=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(c,d);c.prototype.Yb=function(a){d.prototype.Yb.call(this,a);var b;if(b=a.getAttributeNode("blinding"))this.nl= Number(b.nodeValue);if(b=a.getAttributeNode("alpha"))this.alpha=Number(b.nodeValue);if(b=a.getAttributeNode("type"))this.type=Number(b.nodeValue);if(b=a.getAttributeNode("color"))this.color=1*Number(b.nodeValue)};return c}(n);r.qo=n;n=function(){function d(c){this.u=c;this.type="empty";this.Kk=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.nj=!1;this.j=null;this.Cb=this.Xb=this.nb=this.Ba=this.distance=this.A=this.pan=0;this.visible=!0;this.ec=c.I.ec;this.cc= c.I.cc;this.dc=c.I.dc;this.bc=c.I.bc;this.zf=c.I.zf;this.Wc="";this.Bd=this.Ae=0;this.bg=!1;this.$h=0;this.vertices=[]}d.prototype.tf=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.A;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.Kk;this.obj=this.j;this.customimage=this.Wc;this.customimagewidth=this.Ae;this.customimageheight=this.Bd;this.use3D=this.bg;this.distance3D=this.$h;this.j&&this.j.__div&& (this.div=this.j.__div)};d.prototype.Qr=function(){var c=this.url;return"{"==c.charAt(0)?c.substr(1,c.length-2):!1};d.prototype.Yb=function(c){var a;if(a=c.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=c.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=c.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=c.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=c.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=c.getAttributeNode("skinid"))this.Kk= a.nodeValue.toString();if(a=c.getAttributeNode("width"))this.w=Number(a.nodeValue);if(a=c.getAttributeNode("height"))this.h=Number(a.nodeValue);if(a=c.getAttributeNode("wordwrap"))this.nj=1==Number(a.nodeValue);a=c.getAttributeNode("pan");this.pan=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("tilt");this.A=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("fov");this.fov=1*(a?Number(a.nodeValue):0);a=c.getAttributeNode("distance");this.distance=1*(a?Number(a.nodeValue):0);if(a=c.getAttributeNode("bordercolor"))this.ec= 1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundcolor"))this.cc=1*Number(a.nodeValue);if(a=c.getAttributeNode("borderalpha"))this.dc=1*Number(a.nodeValue);if(a=c.getAttributeNode("backgroundalpha"))this.bc=1*Number(a.nodeValue);if(a=c.getAttributeNode("handcursor"))this.zf=1==Number(a.nodeValue);if(a=c.getAttributeNode("customimage"))this.Wc=this.u.Xl()+a.nodeValue;if(a=c.getAttributeNode("customimagewidth"))this.Ae=Number(a.nodeValue);if(a=c.getAttributeNode("customimageheight"))this.Bd= Number(a.nodeValue);if(a=c.getAttributeNode("use3D"))this.bg=1==Number(a.nodeValue);if(a=c.getAttributeNode("distance3D"))this.$h=Number(a.nodeValue);for(c=c.firstChild;c;){if("polystring"==c.nodeName){a=c.textContent.toString().split("|");for(var b=0;bc;c++)2>c%3&&(f[c]*=d);e.bufferData(e.ARRAY_BUFFER,new Float32Array(f),e.STATIC_DRAW);this.ze=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,this.ze);var g=[1,0,0,0,0,1,1,1];e.bufferData(e.ARRAY_BUFFER,new Float32Array(g),e.STATIC_DRAW);this.md=e.createBuffer();e.bindBuffer(e.ELEMENT_ARRAY_BUFFER, this.md);var h=[0,1,2,0,2,3];e.bufferData(e.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),e.STATIC_DRAW);f=[];h=[];g=[];var l=new r.Ha;for(d=0;6>d;d++){var k=d%3;var q=3>d?1:0;for(a=0;4>a;a++){l.x=-1;l.y=-1;l.z=1;for(c=0;cl.x?.33:0)+.33*k,(0>l.y?0:.5)+.5*q);if(4>d)for(c=0;ca;a++){var b=c.createTexture();this.qd++; b.Of=null;b.Ne=null;b.qm=!1;c.bindTexture(c.TEXTURE_2D,b);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);if(d.qf[a]){var e=new Image;e.crossOrigin=d.crossOrigin;e.src=d.Pb(d.qf[a]);b.Of=e;e.addEventListener&&e.addEventListener("load",this.$j(b),!1);d.gc.push(e)}this.ib.push(b)}for(a=0;6>a;a++)d.sg[a]&& (e=new Image,e.crossOrigin=d.crossOrigin,e.src=d.Pb(d.sg[a]),e.addEventListener?e.addEventListener("load",this.$j(this.ib[a]),!1):e.onload=this.$j(this.ib[a]),this.ib[a].Ne=e,d.gc.push(e));for(a=0;ad;d++)this.Xf(d),c.bindBuffer(c.ARRAY_BUFFER,this.Gj),c.vertexAttribPointer(this.P.ja,3,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.ze),c.vertexAttribPointer(this.P.Ma,2,c.FLOAT,!1,0,0),6<=this.ib.length&&this.ib[d].loaded&&(c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.ib[d]),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.md),c.uniform1i(this.P.Tf,0),c.uniformMatrix4fv(this.P.jh, !1,this.ya),c.uniformMatrix4fv(this.P.ee,!1,this.Ab),c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0))}};m.prototype.ij=function(){var d=this.u;if(d.v.Pf&&6>16&255)/255,(c>>8&255)/255,(c>>0&255)/255,1)}};m.prototype.Xf=function(d,c){void 0===c&&(c=1);var a=this.u;r.ka.identity(this.ya);r.ka.rotate(this.ya,c*-a.V.m*Math.PI/180,[0,0,1]);r.ka.rotate(this.ya,c*-a.A.m*Math.PI/180,[1,0,0]);-1==c?r.ka.rotate(this.ya,-a.pan.m*Math.PI/180,[0,1,0]):r.ka.rotate(this.ya, (180-a.pan.m)*Math.PI/180,[0,1,0]);a.Oa&&(r.ka.rotate(this.ya,-a.Oa.pitch*Math.PI/180,[1,0,0]),r.ka.rotate(this.ya,a.Oa.V*Math.PI/180,[0,0,1]));4>d?r.ka.rotate(this.ya,-Math.PI/2*d,[0,1,0]):r.ka.rotate(this.ya,Math.PI/2*(5==d?1:-1),[1,0,0])};m.prototype.Tr=function(d){var c=this;return function(){c.Lj.push(d)}};m.prototype.Zo=function(d){this.u.Na=!0;this.u.nd=!0;d.loaded=!0;d.Bk=0;d.ie=0;var c=this.u.S;this.Dl();c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);if(null!=d.v&&d.v.complete){d.rb=c.createTexture(); this.u.qd++;c.bindTexture(c.TEXTURE_2D,d.rb);try{c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,d.v)}catch(a){c.texImage2D(c.TEXTURE_2D,0,c.RGBA,1,1,0,c.RGBA,c.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.u.O(a)}}this.u.update(2)};m.prototype.Dl=function(){this.u.$b&&this.u.$b--};m.prototype.$o=function(){if(0f;f++){var g=new r.Sd;g.W=document.createElement("canvas");c.u.ia?(g.W.width=b.width+2*e,g.W.height=b.height+2*e):(g.W.width=a.N+2*e,g.W.height=a.N+2*e);g.cb=g.W.getContext("2d");g.W.style[c.u.Va+"Origin"]="0% 0%";g.W.style.overflow="hidden";g.W.style.position="absolute";g.v=d;var h=b.width+2*e,l=b.height+2*e;g.cb&&g.cb.drawImage(d,0,f*l,h,l,0,0,h,l);if(c.u.ia&&c.u.S){var k=c.u.S;k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL, 1);g.rb=k.createTexture();c.u.qd++;k.bindTexture(k.TEXTURE_2D,g.rb);try{k.texImage2D(k.TEXTURE_2D,0,k.RGBA,k.RGBA,k.UNSIGNED_BYTE,g.W)}catch(q){c.u.O(q)}k.bindTexture(k.TEXTURE_2D,null);k.pixelStorei(k.UNPACK_FLIP_Y_WEBGL,0)}c.u.hd&&(g.W.$d=-1,c.u.L.insertBefore(g.W,c.u.L.firstChild));b.ba[f]=g}b.loaded=!0}}catch(q){c.u.O(q)}c.u.update(2)}};m.prototype.Mn=function(d){var c=this;return function(){c.u.Na=!0;c.u.nd=!0;c.Dl();d.v=null}};m.prototype.rs=function(){var d=this.u,c=d.v,a=d.v.levels;d.Ee&& (d.ad(0),d.Pc());if(d.S){var b=d.S;b.useProgram(this.P);this.ij();b.clear(b.DEPTH_BUFFER_BIT);b.enable(b.DEPTH_TEST);r.ka.identity(this.Ab);r.ka.perspective(d.Tb(),d.zb.width/d.zb.height,.1,100,this.Ab);b.uniformMatrix4fv(this.P.ee,!1,this.Ab);d.Tn();d.pk();var e=d.Qj();var f=a.length-1;for(d.Cc=0;f>=e;){var g=a[f],h=1;f==a.length-1&&0==c.Ea&&(h=c.N/(c.N-.5));for(var l=0;6>l;l++){var k=d.cube.faces[l];var q=k.Mf;if(k.qb&&0la;la++)fa[la]=0==la%3?h*y*(-2*fa[la]/g.width+1):1==la%3?h*y*(-2*fa[la]/g.height+1):y;b.bufferData(b.ARRAY_BUFFER,new Float32Array(fa),b.STATIC_DRAW)}}else q=!1;z.visible=k.qb}p.lk=q}}f--}for(l=0;6>l;l++)if(k=d.cube.faces[l],k.qb)for(q=k.Mf,this.Xf(l),b.uniform1i(this.P.Tf,0),b.uniformMatrix4fv(this.P.ee,!1,this.Ab),b.uniformMatrix4fv(this.P.jh,!1,this.ya),b.enableVertexAttribArray(this.P.ja),b.enableVertexAttribArray(this.P.Ma), b.bindBuffer(b.ARRAY_BUFFER,this.ze),b.vertexAttribPointer(this.P.Ma,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.md),b.useProgram(this.P),f=e;f<=a.length-1;){g=a[f];if(k.qb&&0f?la.Ue(-90*f):la.Od(5==f?90:-90);h.Oa&&(la.Ve(h.Oa.V),la.Od(-h.Oa.pitch));la.Ue(-h.pan.m);la.Od(h.A.m);la.Ve(h.V.m);for(f=0;f<=e;f++)for(var B=0;B<=e;B++){var db=2*(q+B*p)-1;var ja=2*(a+f*w)-1;fa.x=1*db;fa.y=1*ja;fa.z=-1;fa.normalize();la.yq(fa);db=this.hm(fa,l,h.Sa());0!=h.Bc&&1>z&&(db=db&&this.hm(fa,x,h.Bc),l.x=l.x*z+x.x*(1-z),l.y=l.y*z+x.y*(1-z));db?-1E10l.x&&-1E10l.y?-2l.x&&-2l.y&&(c+=l.x,b+=l.y, y++):l.x=NaN:l.x=NaN;d.rd[d.ki++]=l.x;d.rd[d.ki++]=l.y}0h;h++)isNaN(d.rd[2*b[0]])&&(e=!1);if(e){var l=!1,k=!1,q=!1,p=!1;for(h=0;4>h;h++){var w=d.rd[2*b[h]];ww;w++)for(var x=0;x=f;){var fa={};k=a[h];var la=null;0>q-h), w,-(0!=d.Bc)?.3:.1);ja.visible=0d.fov.m&&hd.Oe){d.O("Excided painted tiles");this.Zi=!1; break}ja.rb&&(l=w=c.N,y==k.U-1&&(w=k.width-c.N*y),x==k.ea-1&&(l=k.height-c.N*x),w=(w+2*c.Ea)/c.N,l=(l+2*c.Ea)/c.N,b.bindTexture(b.TEXTURE_2D,ja.rb),b.uniform2f(b.getUniformLocation(e,"uCanvasDimensions"),d.D.width,d.D.height),q=b.getUniformLocation(e,"srcScale"),b.uniform2f(q,.5*k.width/c.N/w,.5*k.height/c.N/l),q=b.getUniformLocation(e,"srcOffset"),b.uniform2f(q,(.5*k.width+c.Ea-c.N*y)/c.N/w,-(.5*k.height+c.Ea-c.N*x)/c.N/l+1),q=b.getUniformLocation(e,"zOffset"),b.uniform1f(q,(h+1)/(a.length+5)),w= b.getAttribLocation(e,"aVertexPosition"),b.disableVertexAttribArray(0),b.disableVertexAttribArray(1),b.disableVertexAttribArray(2),b.enableVertexAttribArray(w),b.activeTexture(b.TEXTURE0),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.bindBuffer(b.ARRAY_BUFFER,this.eq),b.vertexAttribPointer(w,2,b.FLOAT, !1,0,0),b.bufferData(b.ARRAY_BUFFER,new Float32Array(ja.rd),b.DYNAMIC_DRAW),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.cq),b.bufferData(b.ELEMENT_ARRAY_BUFFER,new Uint16Array(ja.Je),b.DYNAMIC_DRAW),b.drawElements(b.TRIANGLES,ja.Fd,b.UNSIGNED_SHORT,0),g++)}h++}b.disable(b.CULL_FACE);b.cullFace(b.FRONT_AND_BACK);d.nd=!1}};m.prototype.jj=function(d,c){var a=this.u.S;r.ka.identity(this.ya);this.Xf(d,-1);a.uniformMatrix4fv(a.getUniformLocation(c,"matRotate"),!1,this.ya)};m.prototype.Nq=function(){var d= this.u;if(d.S){var c=d.S,a=this.hn;c.useProgram(a);this.jj(0,a);c.uniform2f(c.getUniformLocation(a,"uCanvasDimensions"),d.D.width,d.D.height);var b=c.getUniformLocation(a,"srcOffset");c.uniform2f(b,.5,.5);1==d.F.format&&(b=c.getUniformLocation(a,"srcScale"),d.Jd?(c.uniform2f(b,-.5/Math.PI,(d.F.flipY?-.5:.5)/Math.PI),b=c.getUniformLocation(a,"srcOffset"),d.yh?c.uniform2f(b,.5,.75):c.uniform2f(b,.5,.25)):c.uniform2f(b,-.5/Math.PI,(d.F.flipY?-1:1)/Math.PI));14==d.F.format&&(b=c.getUniformLocation(a, "srcScale"),c.uniform2f(b,1-2*d.F.kf/(d.F.width/3),1-2*d.F.kf/(d.F.height/2)));this.Uk(a);b=c.getUniformLocation(a,"cubeTexture");c.uniform1i(b,0);b=c.getAttribLocation(a,"aVertexPosition");c.disableVertexAttribArray(0);c.disableVertexAttribArray(1);c.disableVertexAttribArray(2);c.enableVertexAttribArray(b);c.bindBuffer(c.ARRAY_BUFFER,this.Oi);c.vertexAttribPointer(b,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,d.F.texture);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S, c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.md);c.drawElements(c.TRIANGLES,6,c.UNSIGNED_SHORT,0)}};m.prototype.Uk=function(d){var c=this.u,a=c.S,b=this.u.D,e=b.width/b.height;switch(c.fov.mode){case 1:e=1;break;case 2:e=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3g;g++)this.ib[g].Ne.complete?this.Xh[g]||(f=!0):b=!1,this.ib[g].Of.complete||(e=!1);if(e||b)if(!e||b||!this.Hc||f){g=Math.round(d.Dc/d.bf);e=(d.Dc-g)/2;d.O("paint cube single - isMain: "+b+" overlap: "+e);this.pf=0;this.Hc||(this.Hc=c.createTexture());d.qd++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.Hc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_T, c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);f=document.createElement("canvas");f.width=g;f.height=g;var h=f.getContext("2d");for(g=0;6>g;g++){var l=a[g];this.ib[l].Ne.complete?this.Xh[l]||(h.drawImage(this.ib[l].Ne,-e,-e),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f),this.Xh[l]=!0):(h.drawImage(this.ib[l].Of,-e,-e,d.Dc,d.Dc),c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+g,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,f))}this.Tg=!b}};m.prototype.Xo=function(){var d=this.u, c=this.u.v,a=d.v.levels,b=d.S,e;var f=a.length-1;if(!(0>f)){a[f].Se&&f--;var g=512;d.Sg&&(g=256);!d.Sf&&2<=d.devicePixelRatio&&(g=512);for((e=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&ef){g=a[f];d.O("paint cube level "+f);this.pf=f;a=d.v.Ea;f=0g.width&&(1500k;k++){for(var q=0;qe;e++)for(var f= 0;fc;c++)for(var a=0;a1.1*d.Kn)for(this.Yd.sort(function(l,k){return k.Xg-l.Xg});this.Yd.length>d.Kn;)h=this.Yd.pop(),h.rb&&(a.deleteTexture(h.rb),d.qd--,h.rb=0),h.v=null,h.yf&&(a.deleteBuffer(h.yf),h.yf= 0),g=h.level.ba.indexOf(h),d.O("delete "+g+" "+(b-h.Xg)),delete h.level.ba[g]};m.prototype.ks=function(){var d=this.u;if(d.S){var c=this.u.S;c.disable(c.DEPTH_TEST);var a;for(a=0;ac;c++)this.Xf(0),a.bindBuffer(a.ARRAY_BUFFER,d.F.Zk),a.vertexAttribPointer(this.P.ja,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,d.F.aj),a.vertexAttribPointer(this.P.Ma,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0), a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,d.F.fk),a.uniform1i(this.P.Tf,0),a.uniformMatrix4fv(this.P.jh,!1,this.ya),a.uniformMatrix4fv(this.P.ee,!1,this.Ab),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};m.prototype.hs=function(){var d=this.u,c=d.S,a=d.F;if(0=a.I.mode&&(e=0);3==a.I.mode&&(e=a.I.Ba);for(d=0;d>16&255)/255,(c>>8&255)/255,(c&255)/255);var k=b.getUniformLocation(this.Md,"uAlpha");b.uniform1f(k,f.dc*h);b.vertexAttribPointer(this.Md.ja,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,l.length/3); c=f.cc;b.uniform3f(g,(c>>16&255)/255,(c>>8&255)/255,(c&255)/255);b.uniform1f(k,f.bc*h);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,l.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.P)}}}}}; m.prototype.Tk=function(){var d=this.u,c=d.v;if(d.D.width!=d.L.offsetWidth||d.D.height!=d.L.offsetHeight)d.D.width=d.L.offsetWidth,d.D.height=d.L.offsetHeight;d.Ee&&(d.ad(0),d.Pc());if(d.S){var a=d.S;this.ij();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.zg);var b=a.getUniformLocation(this.zg,"uRect");a.uniform2f(a.getUniformLocation(this.zg,"uCanvasDimensions"),d.D.width,d.D.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER, this.md);var e=a.getAttribLocation(this.zg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(e);a.bindBuffer(a.ARRAY_BUFFER,this.ze);a.vertexAttribPointer(e,2,a.FLOAT,!1,0,0);d.Cc=0;var f=100/d.fov.m;var g=c.width/c.height;e=d.D.height*f*g;f*=d.D.height;g=(d.pan.m/100/g-.5)*e+d.D.width/2;for(var h=(d.A.m/100-.5)*f+d.D.height/2,l,k,q,p=0;c.levels.length>=p+2&&c.levels[p+1].width>e;)p++;var w;var x=[];for(w=c.levels.length- 1;w>=p;){var y=c.levels[w];if(y.cache){var z={jb:0,Gb:0};z.Ib=y.U-1;z.Jb=y.ea-1}else{z={};l=-h/f*(y.height/d.v.N);k=(-g+d.D.width)/e*(y.width/d.v.N);var fa=(-h+d.D.height)/f*(y.height/d.v.N);z.jb=Math.min(Math.max(0,Math.floor(-g/e*(y.width/d.v.N))),y.U-1);z.Gb=Math.min(Math.max(0,Math.floor(l)),y.ea-1);z.Ib=Math.min(Math.max(0,Math.floor(k)),y.U-1);z.Jb=Math.min(Math.max(0,Math.floor(fa)),y.ea-1)}x[w]=z;var la=!0;for(k=z.Gb;k<=z.Jb;k++)for(l=z.jb;l<=z.Ib;l++)q=l+k*y.U,fa=y.ba[q],fa||(fa=new r.Sd, y.ba[q]=fa),this.ai()?fa.v||(this.Ai(fa,y,d.ne(0,w,l,k)),d.Na=!0):this.u.Cc++,fa.v&&fa.v.complete||(la=!1),fa.visible=!0;z.lk=la;w--}for(w=c.levels.length-1;w>=p;){y=c.levels[w];if(x[w]&&0<=x[w].jb)for(z=x[w],k=z.Gb;k<=z.Jb;k++)for(l=z.jb;l<=z.Ib;l++)q=l+k*y.U,(fa=y.ba[q])&&fa.v&&fa.v.complete&&(d=g+(-c.Ea+c.N*l)*e/y.width,a.uniform4f(b,d,h+(-c.Ea+c.N*k)*f/y.height,fa.v.width*e/y.width,fa.v.height*f/y.height),fa&&fa.rb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.md),a.bindTexture(a.TEXTURE_2D,fa.rb), a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)));w--}this.Ck()}};m.prototype.je=function(){var d=this.u.S;if(d&&this.ib)for(;0c;c++)this.faces[c]=new n}d.prototype.Ro=function(c,a,b,e){for(var f=0;6>f;f++){var g;if(g=this.faces[f]){var h=[];h.push(new r.Ha(-1,-1,-1,0,0));h.push(new r.Ha(1,-1,-1,1,0));h.push(new r.Ha(1,1,-1,1,1));h.push(new r.Ha(-1,1,-1,0,1));for(var l=0;lf?h[l].La(-Math.PI/2*f):h[l].Ga(Math.PI/2*(4===f? -1:1)),e&&(h[l].lb(e.V*Math.PI/180),h[l].Ga(-e.pitch*Math.PI/180)),h[l].La(-c*Math.PI/180),h[l].Ga(a*Math.PI/180),h[l].lb(b*Math.PI/180);g.qb=0 uRadius) {\n alpha = 1.0;\n } else {\n alpha = 1.0 - ((uRadius - distFromCenter) / uSoftEdge);\n };\n }\n else {\n float alphaFromLeft = 1.0 - ((gl_FragCoord.x -(uIrisCenter.x - uRectDim.x)) / uSoftEdge);\n float alphaFromRight = 1.0 - (((uIrisCenter.x + uRectDim.x) - gl_FragCoord.x) / uSoftEdge);\n float alphaFromTop = 1.0 - ((gl_FragCoord.y -(uIrisCenter.y - uRectDim.y)) / uSoftEdge);\n float alphaFromBottom = 1.0 - (((uIrisCenter.y + uRectDim.y) - gl_FragCoord.y) / uSoftEdge);\n alpha = max(max(alphaFromLeft, alphaFromRight), max(alphaFromTop, alphaFromBottom));\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Ua=d.createProgram();d.attachShader(this.Ua,c);d.attachShader(this.Ua,a);d.linkProgram(this.Ua);d.getProgramParameter(this.Ua,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ua.ja=d.getAttribLocation(this.Ua,"aVertexPosition");d.enableVertexAttribArray(this.Ua.ja);this.Ua.Ma=d.getAttribLocation(this.Ua,"aTextureCoord");d.enableVertexAttribArray(this.Ua.Ma);a=d.createShader(d.FRAGMENT_SHADER); d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uPercent;\nuniform int uDirection;\nuniform vec2 uCanvasDimensions;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n float alpha = 0.0;\n if (uDirection == 1) {\n\t if (gl_FragCoord.x > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.x) / uSoftEdge);\n }\n }\n if (uDirection == 2) {\n\t if (gl_FragCoord.x < uCanvasDimensions.x - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.x - (uCanvasDimensions.x - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 3) {\n\t if (gl_FragCoord.y < uCanvasDimensions.y - uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((gl_FragCoord.y - (uCanvasDimensions.y - uPercent)) / uSoftEdge);\n }\n }\n if (uDirection == 4) {\n\t if (gl_FragCoord.y > uPercent) {\n alpha = 1.0; \n } else {\n alpha = 1.0 - ((uPercent - gl_FragCoord.y) / uSoftEdge);\n }\n }\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, alpha);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.$a=d.createProgram();d.attachShader(this.$a,c);d.attachShader(this.$a,a);d.linkProgram(this.$a);d.getProgramParameter(this.$a,d.LINK_STATUS)||alert("Could not initialise shaders");this.$a.ja=d.getAttribLocation(this.$a,"aVertexPosition");d.enableVertexAttribArray(this.$a.ja);this.$a.Ma=d.getAttribLocation(this.$a,"aTextureCoord");d.enableVertexAttribArray(this.$a.Ma)};m.prototype.ad=function(){var d= this.u.S;if(!d)return!1;if(this.rc=d.createFramebuffer()){d.bindFramebuffer(d.FRAMEBUFFER,this.rc);this.rc.width=1024;this.rc.height=1024;this.cf=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.cf);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,this.rc.width,this.rc.height,0,d.RGBA,d.UNSIGNED_BYTE,null);var c=d.createRenderbuffer();d.bindRenderbuffer(d.RENDERBUFFER,c);d.renderbufferStorage(d.RENDERBUFFER, d.DEPTH_COMPONENT16,this.rc.width,this.rc.height);d.framebufferTexture2D(d.FRAMEBUFFER,d.COLOR_ATTACHMENT0,d.TEXTURE_2D,this.cf,0);d.framebufferRenderbuffer(d.FRAMEBUFFER,d.DEPTH_ATTACHMENT,d.RENDERBUFFER,c);d.bindTexture(d.TEXTURE_2D,null);d.bindRenderbuffer(d.RENDERBUFFER,null);d.bindFramebuffer(d.FRAMEBUFFER,null);this.sb=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.sb);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),d.STATIC_DRAW);this.sb.itemSize=3;this.sb.de= 4;this.Qf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Qf);d.bufferData(d.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),d.STATIC_DRAW);return!0}return!1};m.prototype.Ym=function(d){var c=this.u.S,a=this.u.zb;if(this.xd){c.useProgram(this.Aa);c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.Aa.ja,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Qf);c.vertexAttribPointer(this.Aa.Ma,2,c.FLOAT,!1,0,0);c.enableVertexAttribArray(this.Aa.ja);c.enableVertexAttribArray(this.Aa.Ma); c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.cf);a=1+(this.Fb-1)*d;var b=c.getUniformLocation(this.Aa,"uAlpha");c.uniform1f(b,1);b=c.getUniformLocation(this.Aa,"uZoomIn");c.uniform1i(b,1);b=c.getUniformLocation(this.Aa,"uZoomCenter");var e=.5+(this.Mh-.5)*Math.sqrt(d),f=.5+(this.Nh-.5)*Math.sqrt(d);0>e-.5/a&&(e=.5/a);0>f-.5/a&&(f=.5/a);1e-.5/this.Fb&&(e=.5/this.Fb);0>f-.5/this.Fb&&(f=.5/this.Fb);1>16&255)/255,(this.lf>>8&255)/255,(this.lf&255)/255),b=c.getUniformLocation(this.gb,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.gb,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.gb,"uZoomFactor"),c.uniform1f(e,this.Fb),c.uniform1i(c.getUniformLocation(this.gb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){c.useProgram(this.Ua); c.bindBuffer(c.ARRAY_BUFFER,this.sb);c.vertexAttribPointer(this.Ua.ja,this.sb.itemSize,c.FLOAT,!1,0,0);c.bindBuffer(c.ARRAY_BUFFER,this.Qf);c.vertexAttribPointer(this.Ua.Ma,2,c.FLOAT,!1,0,0);c.activeTexture(c.TEXTURE0);c.bindTexture(c.TEXTURE_2D,this.cf);if(1==this.sa||2==this.sa||6==this.sa||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var g=b=.5;else b=this.Mh,g=this.Nh;var h=b*a.width,l=g*a.height;h=Math.max(h,a.width-h);l=Math.max(l,a.height-l);"irisround"==this.type||"irisroundcenter"== this.type?c.uniform1f(c.getUniformLocation(this.Ua,"uRadius"),(Math.sqrt(h*h+l*l)+this.Oc)*d):(h>l?(l=a.height/a.width*h+this.Oc,h+=this.Oc):(h=a.width/a.height*l+this.Oc,l+=this.Oc),c.uniform2f(c.getUniformLocation(this.Ua,"uRectDim"),h*d,l*d));d=c.getUniformLocation(this.Ua,"uSoftEdge");c.uniform1f(d,this.Oc);c.uniform1i(c.getUniformLocation(this.Ua,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);c.uniform2f(c.getUniformLocation(this.Ua,"uIrisCenter"),b*a.width,g*a.height);b= c.getUniformLocation(this.Ua,"uZoomIn");c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0);b=c.getUniformLocation(this.Ua,"uZoomCenter");c.uniform2f(b,e,f);e=c.getUniformLocation(this.Ua,"uZoomFactor");c.uniform1f(e,this.Fb);c.uniform1i(c.getUniformLocation(this.Ua,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)c.useProgram(this.$a),c.bindBuffer(c.ARRAY_BUFFER,this.sb),c.vertexAttribPointer(this.$a.ja, this.sb.itemSize,c.FLOAT,!1,0,0),c.bindBuffer(c.ARRAY_BUFFER,this.Qf),c.vertexAttribPointer(this.$a.Ma,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D,this.cf),c.uniform1f(c.getUniformLocation(this.$a,"uPercent"),3>this.Jj?d*(a.width+this.Oc):d*(a.height+this.Oc)),d=c.getUniformLocation(this.$a,"uSoftEdge"),c.uniform1f(d,this.Oc),c.uniform1i(c.getUniformLocation(this.$a,"uDirection"),this.Jj),c.uniform2f(c.getUniformLocation(this.$a,"uCanvasDimensions"),a.width,a.height), b=c.getUniformLocation(this.$a,"uZoomIn"),c.uniform1i(b,1==this.sa||2==this.sa||6==this.sa?1:0),b=c.getUniformLocation(this.$a,"uZoomCenter"),c.uniform2f(b,e,f),e=c.getUniformLocation(this.$a,"uZoomFactor"),c.uniform1f(e,this.Fb),c.uniform1i(c.getUniformLocation(this.$a,"uSampler"),0);c.drawArrays(c.TRIANGLE_STRIP,0,this.sb.de);c.useProgram(this.u.za.P);c.disable(c.BLEND);c.enable(c.DEPTH_TEST)}};return m}();r.lo=n})(ggP2VR||(ggP2VR={})); (function(r){var n=function(){function m(d){this.Ch=[];this.u=d;this.enabled=!1;this.Eb=2;this.yl=!1}m.prototype.Il=function(d){if(2==d.mode||3==d.mode||5==d.mode){var c=this.u.wa.currentTime;if(d.Hb&&d.Hb.gain&&d.Sb&&d.Qb&&d.Rb){var a=d.Sb.gain.value,b=d.Qb.gain.value,e=d.Rb.gain.value;d.Hb.gain.linearRampToValueAtTime(d.Hb.gain.value,c);d.Hb.gain.linearRampToValueAtTime(0,c+this.Eb);d.Sb.gain.linearRampToValueAtTime(a,c);d.Sb.gain.linearRampToValueAtTime(0,c+this.Eb);d.Qb.gain.linearRampToValueAtTime(b, c);d.Qb.gain.linearRampToValueAtTime(0,c+this.Eb);d.Rb.gain.linearRampToValueAtTime(e,c);d.Rb.gain.linearRampToValueAtTime(0,c+this.Eb)}}else c=this.u.wa.currentTime,d.ic&&d.ic.gain&&(d.ic.gain.linearRampToValueAtTime(d.ic.gain.value,c),d.ic.gain.linearRampToValueAtTime(0,c+this.Eb));d.Pj=!0;setTimeout(function(){d.Te()},1E3*this.Eb+5)};m.prototype.Nr=function(){for(var d=0;da.ua&&(a.ua=d)}1==d&&clearInterval(this.Ir)};return m}();r.mo=n})(ggP2VR||(ggP2VR={})); (function(r){var n=function(){function m(d){this.ah=[];this.kd=null;this.pc=[];this.hc=[];this.qc=[];this.Ik=!0;this.u=d;this.Vo()}m.prototype.Pg=function(){var d=this.u.S,c=d.createShader(d.VERTEX_SHADER);d.shaderSource(c,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),c=null);var a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCanvasDimensions;\nuniform vec2 uFlareCenterPosition;\nuniform float uBlindingValue;\nuniform float uAspectRatio;\nvoid main(void) {\n float canvasDiag = sqrt( (uCanvasDimensions.x * uCanvasDimensions.x) + (uCanvasDimensions.y * uCanvasDimensions.y) );\n vec2 diff = uFlareCenterPosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromFlarePoint = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = (distFromFlarePoint / canvasDiag) / 10.0;\n gl_FragColor = vec4(1.0, 1.0, 1.0, pow(((1.0 - factor) * 0.8) * uBlindingValue, 2.0));\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.uc=d.createProgram();d.attachShader(this.uc,c);d.attachShader(this.uc,a);d.linkProgram(this.uc);d.getProgramParameter(this.uc,d.LINK_STATUS)||alert("Could not initialise shaders");this.uc.ja=d.getAttribLocation(this.uc,"aVertexPosition");d.enableVertexAttribArray(this.uc.ja);a=d.createShader(d.VERTEX_SHADER);c=d.createShader(d.VERTEX_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);d.shaderSource(c,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\nvarying vec4 vColor;\nuniform vec2 uCirclePosition;\nuniform float uCircleRadius;\nuniform vec2 uCanvasDimensions2;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 circleOnScreen = aVertexPosition.xy * uCircleRadius + uCirclePosition;\n circleOnScreen.y = circleOnScreen.y / uAspectRatio;\n vec2 circleNorm = (circleOnScreen / uCanvasDimensions2) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(circleNorm.x, circleNorm.y, 0.0, 1.0);\n}\n"); d.compileShader(c);d.getShaderParameter(c,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(c)),a=null);var b=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t float factor = distFromCircleCenter / softnessDistance;\n\t gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n"); d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(b)),b=null);this.Ca=d.createProgram();d.attachShader(this.Ca,a);d.attachShader(this.Ca,b);d.linkProgram(this.Ca);d.getProgramParameter(this.Ca,d.LINK_STATUS)||alert("Could not initialise shaders");this.Ca.ja=d.getAttribLocation(this.Ca,"aVertexPosition");d.enableVertexAttribArray(this.Ca.ja);a=d.createShader(d.FRAGMENT_SHADER);d.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uRingTexturePosition;\nuniform float uRingRadius;\nuniform float uRingAlpha;\nuniform float uAspectRatio;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec2 diff = uRingTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromRingCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float factor = distFromRingCenter / uRingRadius;\n if (distFromRingCenter > uRingRadius)\n {\n\t gl_FragColor = vec4(1.0, 1.0, 1.0, 0.0);\n }\n else\n {\n vec4 textureColor = texture2D(uSampler, vec2(factor / uAspectRatio, 0.5));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uRingAlpha);\n }\n}\n"); d.compileShader(a);d.getShaderParameter(a,d.COMPILE_STATUS)||(alert(d.getShaderInfoLog(a)),a=null);this.Db=d.createProgram();d.attachShader(this.Db,c);d.attachShader(this.Db,a);d.linkProgram(this.Db);d.getProgramParameter(this.Db,d.LINK_STATUS)||alert("Could not initialise shaders");this.Db.ja=d.getAttribLocation(this.Db,"aVertexPosition")};m.prototype.ad=function(){var d=this.u.S;this.Dd=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.Dd);d.bufferData(d.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),d.STATIC_DRAW);this.Dd.itemSize=3;this.Dd.de=4;this.wf=d.createBuffer();d.bindBuffer(d.ARRAY_BUFFER,this.wf);for(var c=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,e=1,f=b;f<=b+2*Math.PI;f+=a)c.push(Math.sin(f)),c.push(-Math.cos(f)),c.push(0),e++;d.bufferData(d.ARRAY_BUFFER,new Float32Array(c),d.STATIC_DRAW);this.wf.itemSize=3;this.wf.de=e;this.mn=d.createTexture();d.bindTexture(d.TEXTURE_2D,this.mn);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D, d.TEXTURE_MAG_FILTER,d.LINEAR);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE);d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE);c=document.createElement("canvas");c.width=100;c.height=1;a=c.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.u.fa(16777215,0));b.addColorStop(.88,this.u.fa(0,0));b.addColorStop(.9,this.u.fa(16654848,1));b.addColorStop(.92,this.u.fa(16776448,1));b.addColorStop(.94,this.u.fa(4849466,1));b.addColorStop(.96, this.u.fa(131071,1));b.addColorStop(.98,this.u.fa(8190,1));b.addColorStop(1,this.u.fa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,c)};m.prototype.Yq=function(){for(;0a.z){f=-b/a.z;e=a.x*f;f*=a.y;var w=Math.max(h,l);Math.abs(e)l?h:l;w=p.nl/100*((z-y)/z);0>w&&(w=0);if(this.u.ia){d.useProgram(this.uc);d.bindBuffer(d.ARRAY_BUFFER,this.u.K.sb);d.vertexAttribPointer(this.uc.ja,this.u.K.sb.itemSize,d.FLOAT,!1,0,0);var fa=d.getUniformLocation(this.uc,"uCanvasDimensions");d.uniform2f(fa,d.drawingBufferWidth,d.drawingBufferHeight);d.uniform2f(d.getUniformLocation(this.uc, "uFlareCenterPosition"),d.drawingBufferWidth/h*e,l-d.drawingBufferHeight/l*f);d.uniform1f(d.getUniformLocation(this.uc,"uBlindingValue"),w);fa=d.getUniformLocation(this.uc,"uAspectRatio");d.uniform1f(fa,this.u.K.Bh?d.drawingBufferWidth/d.drawingBufferHeight:d.drawingBufferWidth/d.drawingBufferHeight/(h/l));d.drawArrays(d.TRIANGLE_STRIP,0,this.u.K.sb.de)}else fa=this.$.createRadialGradient(e,f,1,e,f,x),fa.addColorStop(0,"rgba(255, 255, 255, "+w+")"),fa.addColorStop(.5,"rgba(255, 255, 255, "+.8*w+")"), fa.addColorStop(1,"rgba(255, 255, 255, "+.6*w+")"),this.$.fillStyle=fa,this.$.fillRect(0,0,this.$.width,this.$.height);if(0!=Number(p.type)&&!this.u.K.Bh){w=h/2-e;x=l/2-f;var la=1,B=Number(p.type)-1;y<.35*z&&(la=y/(.35*z),la*=la);y>.7*z&&(la=(z-y)/(.3*z));la*=p.alpha/100;if(0ja&&(ja=0);var id=db.color;if(8==B||9==B||10==B)id=p.color;if(this.u.ia)d.useProgram(this.Ca),d.bindBuffer(d.ARRAY_BUFFER, this.wf),d.vertexAttribPointer(this.Ca.ja,this.wf.itemSize,d.FLOAT,!1,0,0),fa=d.getUniformLocation(this.Ca,"uCanvasDimensions2"),d.uniform2f(fa,d.drawingBufferWidth,d.drawingBufferHeight),d.uniform2f(d.getUniformLocation(this.Ca,"uCirclePosition"),d.drawingBufferWidth/h*(e+w*db.B),d.drawingBufferWidth/h*(l-(f+x*db.B))),d.uniform2f(d.getUniformLocation(this.Ca,"uCircleTexturePosition"),d.drawingBufferWidth/h*(e+w*db.B),l-(f+x*db.B)),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleRadius"),z),d.uniform3f(d.getUniformLocation(this.Ca, "uCircleColor"),(id>>16&255)/255,(id>>8&255)/255,(id&255)/255),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleAlpha"),ja),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleSoftness"),.1),fa=d.getUniformLocation(this.Ca,"uAspectRatio"),d.uniform1f(fa,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.wf.de);else{this.$.save();this.$.translate(e+w*db.B,f+x*db.B);fa=this.$.createRadialGradient(0,0,1,0,0,1.1*z);fa.addColorStop(0,this.u.fa(id,ja));fa.addColorStop(.65, this.u.fa(id,.9*ja));fa.addColorStop(.8,this.u.fa(id,.7*ja));fa.addColorStop(1,this.u.fa(id,.2*ja));this.$.beginPath();id=2*Math.PI/6;db=Math.PI/180*35;var tf=!0;for(ja=db;ja<=db+2*Math.PI;ja+=id)tf?(this.$.moveTo(z*Math.sin(ja),z*Math.cos(ja)),tf=!1):this.$.lineTo(z*Math.sin(ja),z*Math.cos(ja));this.$.closePath();this.$.fillStyle=fa;this.$.fill();this.$.restore()}}if(0ja&&(ja=0);id=db.color;if(8== B||9==B||10==B)id=p.color;this.u.ia?(d.useProgram(this.Ca),d.bindBuffer(d.ARRAY_BUFFER,this.Dd),d.vertexAttribPointer(this.Ca.ja,this.Dd.itemSize,d.FLOAT,!1,0,0),fa=d.getUniformLocation(this.Ca,"uCanvasDimensions2"),d.uniform2f(fa,d.drawingBufferWidth,d.drawingBufferHeight),fa=d.getUniformLocation(this.Ca,"uCirclePosition"),d.uniform2f(fa,d.drawingBufferWidth/h*(e+w*db.B),d.drawingBufferWidth/h*(l-(f+x*db.B))),fa=d.getUniformLocation(this.Ca,"uCircleTexturePosition"),d.uniform2f(fa,d.drawingBufferWidth/ h*(e+w*db.B),l-(f+x*db.B)),fa=d.getUniformLocation(this.Ca,"uCircleRadius"),d.uniform1f(fa,z),d.uniform3f(d.getUniformLocation(this.Ca,"uCircleColor"),(id>>16&255)/255,(id>>8&255)/255,(id&255)/255),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleAlpha"),ja),d.uniform1f(d.getUniformLocation(this.Ca,"uCircleSoftness"),db.H),fa=d.getUniformLocation(this.Ca,"uAspectRatio"),d.uniform1f(fa,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.drawArrays(d.TRIANGLE_FAN,0,this.Dd.de)):(this.$.save(),this.$.translate(e+ w*db.B,f+x*db.B),fa=this.$.createRadialGradient(0,0,1,0,0,z),fa.addColorStop(0,this.u.fa(id,ja)),fa.addColorStop(1-db.H,this.u.fa(id,.8*ja)),fa.addColorStop(1,this.u.fa(id,0)),this.$.beginPath(),this.$.arc(0,0,z,0,2*Math.PI,!1),this.$.closePath(),this.$.fillStyle=fa,this.$.fill(),this.$.restore())}if(0ja&&(ja=0),this.u.ia?(d.useProgram(this.Db),d.activeTexture(d.TEXTURE0),d.bindTexture(d.TEXTURE_2D,this.mn), d.bindBuffer(d.ARRAY_BUFFER,this.Dd),d.vertexAttribPointer(this.Db.ja,this.Dd.itemSize,d.FLOAT,!1,0,0),fa=d.getUniformLocation(this.Db,"uCanvasDimensions2"),d.uniform2f(fa,h,l),fa=d.getUniformLocation(this.Db,"uCirclePosition"),d.uniform2f(fa,e+w*p.B,l-(f+x*p.B)),fa=d.getUniformLocation(this.Db,"uRingTexturePosition"),d.uniform2f(fa,d.drawingBufferWidth/h*(e+w*p.B),l-(f+x*p.B)),fa=d.getUniformLocation(this.Db,"uCircleRadius"),d.uniform1f(fa,z),d.uniform2f(d.getUniformLocation(this.Db,"uRingPosition"), e+w*p.B,l-(f+x*p.B)),d.uniform1f(d.getUniformLocation(this.Db,"uRingRadius"),z),d.uniform1f(d.getUniformLocation(this.Db,"uRingAlpha"),ja),fa=d.getUniformLocation(this.Db,"uAspectRatio"),d.uniform1f(fa,d.drawingBufferWidth/d.drawingBufferHeight/(h/l)),d.uniform1i(d.getUniformLocation(this.Db,"uSampler"),0),d.drawArrays(d.TRIANGLE_FAN,0,this.Dd.de)):(this.$.save(),this.$.translate(e+w*p.B,f+x*p.B),fa=this.$.createRadialGradient(0,0,0,0,0,z),fa.addColorStop(0,this.u.fa(16777215,0)),fa.addColorStop(.88, this.u.fa(0,0)),fa.addColorStop(.9,this.u.fa(16654848,ja)),fa.addColorStop(.92,this.u.fa(16776448,ja)),fa.addColorStop(.94,this.u.fa(4849466,ja)),fa.addColorStop(.96,this.u.fa(131071,ja)),fa.addColorStop(.98,this.u.fa(8190,ja)),fa.addColorStop(1,this.u.fa(0,0)),this.$.beginPath(),this.$.arc(0,0,z,0,2*Math.PI,!1),this.$.closePath(),this.$.fillStyle=fa,this.$.fill(),this.$.restore())}this.u.ia&&(d.useProgram(this.u.za.P),d.disable(d.BLEND),d.enable(d.DEPTH_TEST))}}}};return m}();r.ko=n})(ggP2VR||(ggP2VR= {}));var THREE; (function(r){var n=function(){function m(d){this.sd=[];this.pa={x:0,y:0};this.Lc={x:0,y:0};this.hh=0;this.ci=!1;this.$k=this.Qe=0;this.Xk=!1;this.u=null;this.Dk=!0;this.Ed=1;this.mi=[];this.vj=this.ao=this.frustumCulled=!1;this.Hf=[-1,-1,-1,-1];this.xi=[];this.Me=[];this.rm=180;this.u=d;var c=this;setTimeout(function(){if(window.WebVRPolyfill&&window.Promise){var a={BUFFER_SCALE:1};try{new window.WebVRPolyfill(a),d.O("WebVR Polyfill loaded!")}catch(b){}}c.gq()},0);THREE?this.ml():console.log("Three.js not available!")}m.prototype.Wo= function(){this.init();this.animate()};m.prototype.ml=function(){this.Rk=new THREE.Matrix4;this.Um=new THREE.Euler};m.prototype.init=function(){"getVRDisplays"in navigator||console.log("no vr support");if(THREE)if(this.renderer)console.log("already set up!");else{this.Rk||this.ml();var d=this,c=this.ld=this.u.ld,a=this.dr=new THREE.Scene,b=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);108>THREE.REVISION&&(this.frustumCulled=!0);b.position.z=-.01;b.position.y= 0;b.position.x=0;this.renderer=b=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!0});b.setClearColor(new THREE.Color(0),1);b.setPixelRatio(window.devicePixelRatio);b.setSize(window.innerWidth,window.innerHeight);b.gammaInput=!0;b.gammaOutput=!0;b.shadowMap.enabled=!1;c.appendChild(b.domElement);"getVRDisplays"in navigator&&(b.vr.enabled=!0,b.vr.setFrameOfReferenceType("head-model"));var e=this.ul=new THREE.Group;c=this.Cj=b.vr.getController(0);c.addEventListener("selectstart", function(g){d.Vm(g)});c.addEventListener("selectend",function(){});c.visible=!1;e.add(c);b=this.Dj=b.vr.getController(1);b.addEventListener("selectstart",function(g){d.Vm(g)});b.addEventListener("selectend",function(){});b.visible=!1;e.add(b);e.visible=!1;a.add(e);e=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);var f=new THREE.LineBasicMaterial({color:14737632});e=new THREE.Line(e,f);e.name="line";e.scale.z=5;c.add(e.clone());b.add(e.clone());this.qh= new THREE.Raycaster;this.pa=new THREE.Vector2;this.Lf=new THREE.Group;this.Df=new THREE.Group;this.Ke=new THREE.Group;this.Oj=new THREE.Group;this.wj=new THREE.Group;this.Lf.add(this.Ke);this.Lf.add(this.Oj);this.Lf.add(this.Df);a.add(this.Lf);a.add(this.wj);a=document.createElement("canvas");a.width=64;a.height=64;c=a.getContext("2d");c.fillStyle="black";c.lineWidth=3;c.beginPath();c.arc(32,32,10,0,2*Math.PI);c.stroke();a=new THREE.Texture(a);a.needsUpdate=!0;e=new THREE.PlaneBufferGeometry(2,2, 8);a=new THREE.MeshBasicMaterial({map:a});a.transparent=!0;a=new THREE.Mesh(e,a);a.position.z=-50;this.wj.add(a);window.addEventListener("resize",function(){d.Iq()},!1);document.addEventListener("mouseup",function(){d.Gq()},!1);document.addEventListener("mousedown",function(g){d.Eq(g)},!1);document.addEventListener("mousemove",function(g){d.Fq(g)},!1);this.display||this.ig()}else console.log("Three.js not available!")};m.prototype.Jk=function(){var d=this.u;this.display=null;d.O("VR not found");d.R("vrchanged", {});d.R("playerstatechanged",{})};m.prototype.An=function(d){var c=this.u;this.display=d;this.renderer&&this.renderer.vr.setDevice(d);c.O("VR found");c.R("vrchanged",{});c.R("playerstatechanged",{})};m.prototype.gq=function(){if(!this.ao){this.ao=!0;var d=this;"getVRDisplays"in navigator?(window.addEventListener("vrdisplayconnect",function(c){d.An(c.display)},!1),window.addEventListener("vrdisplaydisconnect",function(){d.Jk()},!1),window.addEventListener("vrdisplaypresentchange",function(){d.ci=d.display? d.display.isPresenting:!1;d.u.O("VR Presenting: "+d.ci);d.ci?(d.Wm(),d.ig()):(d.tl(),d.je())},!1),window.addEventListener("vrdisplayactivate",function(c){d.renderer&&d.renderer.domElement&&c.display.requestPresent([{source:d.renderer.domElement}])},!1),navigator.getVRDisplays().then(function(c){0e&&(b/=Math.tan(e/2*Math.PI/180))),10=d+2&&!c.v.levels[d+1].Se&&c.v.levels[d+1].width>a;)d++;c.O("Level "+d+" - width: "+c.v.levels[d].width);c.O(c.v.levels)}return d}; m.prototype.gm=function(d){var c=this.u,a=c.pe[d];d="";if(a){a=a.firstChild;for(var b;a;)"input"==a.nodeName&&(b=a)&&(b=0a;a++)d=c.Mb(d,"c","vr"),d=c.Mb(d,"s","vr"),d=c.Mb(d,"r",0),d=c.Mb(d,"l",0),d=c.Mb(d,"x",0),d=c.Mb(d,"y",0),d=c.Mb(d,"v",0),d=c.Mb(d,"h",0);return c.Pb(d)};m.prototype.ceilPowerOfTwo=function(d){return Math.pow(2, Math.ceil(Math.log(d)/Math.LN2))};m.prototype.loadTexture=function(d,c,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.u.crossOrigin);var e=this;b.load(c,function(f){var g=e.ceilPowerOfTwo(f.width),h=e.ceilPowerOfTwo(f.height);d.format=THREE.RGBFormat;d.needsUpdate=!0;if(g==f.width&&h==f.height||!a)d.image=f;else{e.u.O("resizing "+f.width+"/"+f.height+" -> "+g+"/"+h);var l=document.createElement("canvas");l.width=g;l.height=h;l.getContext("2d").drawImage(f,0,0,g,h);d.image=l}d.pm=!0;d.ae&&d.ae.pm&& (d.Jg.visible=!0,d.ae.Jg.visible=!0)});this.mi.push(d)};m.prototype.ig=function(){if(THREE){var d=this.u;if(this.vj)d.O("vr panorama aleady added!");else{this.Ll();var c=this.Df,a=this;d.O("add vr panorama");this.je();this.camera.layers.enable(1);c.setRotationFromEuler(this.Um);c.rotateX(d.Oa.pitch*Math.PI/180);c.rotateZ(-d.Oa.V*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),e=(new THREE.TextureLoader).load(this.gm(d.Uj()));e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide}); b=new THREE.Mesh(b,e);b.scale.x=-1;b.rotateZ(d.Oa.V*Math.PI/180);b.rotateX(-d.Oa.pitch*Math.PI/180);b.rotateY(-90*Math.PI/180);c.add(b);a.Li=b;a.vj=!0;setTimeout(function(){d.O("Adding Main Pano");a.vj=!1;a.xo();d.F.j?a.Ao():a.yo();a.vo()});this.$q();this.Dk=!0}}};m.prototype.Ao=function(){var d=this.u,c=this.Df,a=2E4/3;if(d.Jd){var b=new THREE.VideoTexture(d.F.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;var e=new THREE.SphereBufferGeometry(a, 60,40);e.scale(-1,1,1);for(var f=e.attributes.uv.array,g=1;ga)for(var g=d.v.levels[a],h=0;6>h;h++){c[h]=new THREE.Group;for(var l=0;lh?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2;b.add(c[h])}else for(a=d.bf,h=0;6>h;h++)for(c[h]=new THREE.Group,q=0;qh?c[h].rotation.y=-h*Math.PI/2:c[h].rotation.x=(4==h?1:-1)*Math.PI/2,b.add(c[h])};m.prototype.xo=function(){var d=this.u,c=this.Ke; new r.Ha(0,0,-100);for(var a=d.I.cj,b=0;b=e.distance?5:1>e.distance?1:5>e.distance?e.distance:5;if(e.Wc){var l=.005,k=(new THREE.TextureLoader).load(e.Wc),q=new THREE.MeshBasicMaterial({map:k});if(e.bg){h=100;g=2*h*Math.tan(e.fov/2*Math.PI/180);var p=new THREE.PlaneBufferGeometry(g,g*e.Bd/e.Ae,1,1);q.transparent=!0;q.opacity=1}else p=new THREE.PlaneBufferGeometry(l*e.Ae,l*e.Bd,1,1),q.transparent=!0,q.opacity=.25;g=l*e.Bd/ 2;q.side=THREE.DoubleSide}else p=new THREE.SphereBufferGeometry(.2,16,16),k=(new THREE.TextureLoader).load(this.gm(f)),q=new THREE.MeshBasicMaterial({map:k}),q.transparent=!0,q.opacity=.25;f=new THREE.Mesh(p,q);l=e.title;if(a.enabled&&""!=l){p=document.createElement("canvas");p.width=256;p.height=32;k=p.getContext("2d");this.Ah||(this.Ah=document.createElement("canvas"),this.Ah.width=p.width,this.Ah.height=p.height);var w=this.Ah.getContext("2d");w.clearRect(0,0,p.width,p.height);w.font="16px Helvetica"; w.textAlign="center";w.textBaseline="top";q=w.measureText(l);var x=q.width;0d.clientX&&50>d.clientY&&this.u.sf();0this.mq+1E3){var a=this.ik.userData;a&&a.url&&this.u.dd(a.url,a.target)}}else this.ik=null;var b=navigator.getGamepads&&navigator.getGamepads();a=!1;if(!d.ul.visible&&0g&&(this.sh(20),this.Hf[f]=e),.3e?(a=!0,-1!=this.Me[f]&&(this.Me[f]=-1,this.xi[f]=Date.now()-1E4)):this.Me[f]=0,0!=this.Me[f]&&(e=Date.now()-this.xi[f],console.log(e),400>";this.cube=new r.oo;this.Vk=!1;this.qg=function(f,g){if(0==f.length)return f;var h;var l=[];var k=g.Mi(f[0])-0;for(h=0;hx&&(x=0);1k||l.push(f[q]);l.push(y)}k=w}return l};this.bn=new n;this.Lk=0;this.oc=!1;this.yi=-1;this.Fg=function(f){return f?f.pageX||f.pageY?{x:f.pageX,y:f.pageY}:f.clientX||f.clientY?{x:f.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:f.clientY+document.body.scrollTop+document.documentElement.scrollTop}:f.touches&&f.touches[0]?{x:f.touches[0].pageX,y:f.touches[0].pageY}:{x:0, y:0}:{x:0,y:0}};this.Fi=1;this.ep=this.fi=this.Fm=this.Nj=this.zk=this.Ni=0;this.Gm=!1;this.Zd=!0;this.ob=new r.Oh(this);this.ob.zf=!1;this.El();if(7=b&&(this.qa.blendtime= b));a.hasOwnProperty("waitfortransition")&&(this.qa.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.qa.zoomfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.qa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.qa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.qa.softedge=a));this.ng||this.Fj()};c.prototype.Nc=function(a,b,e){var f=b?Number(b):0;if(0!=a&& 4!=a&&12!=a&&9!=a)this.Jc("Unsupported projection type: "+a);else if(b&&0!==f&&4!==f&&12!==f&&9!==f)this.Jc("Unsupported projection2 type: "+f);else if(a==f&&(f=0),this.kh=e?Number(e):1,this.Wa!=a||this.Bc!=f)this.Wa=a,this.Bc=f,this.za.oi()};c.prototype.Sa=function(){return 0==this.Wa?4:this.Wa};c.prototype.zj=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Jc("Unsupported projection type: "+a);else if(this.ia||0==a||4==a||this.Jc("Projection changes require WebGL!"),this.Sa()!=a){var e={};e.pan=this.pan.m; e.tilt=this.A.m;e.fov=this.fov.m;e.projection=a;e.timingFunction=3;e.speed=b;a=this.Eg(a);e.fov=Math.min(a,e.fov);this.Ei(e)}};c.prototype.addListener=function(a,b){(this.xg[a]=this.xg[a]||[]).push(b)};c.prototype.R=function(a,b){if(a=this.xg[a])for(var e=a.length,f=0;f>4;g=(g&15)<<4|h>>2;var k=(h&3)<<6|l;b+=String.fromCharCode(f);64!=h&&(b+=String.fromCharCode(g));64!=l&&(b+=String.fromCharCode(k))}while(e>3&7];if(!(h&64&&l)||g+l>e)return null;for(h&=63>>l;0Number(this.ed))&&(this.wa=null);this.yc&&!this.Id&&12<=Number(this.ed)&&13>Number(this.ed)&&(this.wa=null);this.yc&&this.Id&&13==Number(this.Og[0])&&(1==Number(this.Og[1])||2<=Number(this.Og[1]))&&(this.wa=null); this.Gh=this.zm?this.yc&&this.Fk&&10<=Number(this.ed)?!0:!1:!0};c.prototype.O=function(a){if(Gh){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"
");window.console&&window.console.log(a)}};c.prototype.qs=function(a){if(Gh){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"
");window.console&&window.console.warn(a)}};c.prototype.Jc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"
");window.console&&window.console.log(a)}; c.prototype.xn=function(a){this.Oe=a};c.prototype.setCrossOrigin=function(a){this.crossOrigin=a};c.prototype.hr=function(a){this.Cf=a};c.prototype.Lp=function(){return this.mh};c.prototype.fr=function(a){this.Vd=a};c.prototype.Xl=function(){return this.Vd};c.prototype.sp=function(){return this.Sg};c.prototype.np=function(){return this.li};c.prototype.tp=function(){return this.Ef};c.prototype.pp=function(){return this.C.active};c.prototype.ir=function(a){this.Sg=!!a};c.prototype.gi=function(){return this.isLoaded}; c.prototype.rp=function(){return!this.isLoaded};c.prototype.pd=function(){return Number(this.D.height)/(2*Math.tan(Math.PI/180*(this.Tb()/2)))};c.prototype.zn=function(a,b){this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var e=a-this.margin.left-this.margin.right,f=b-this.margin.top-this.margin.bottom;if(!(10>e||10>f)){var g=window.devicePixelRatio||1;this.Sf&&(g=1);this.L.style.width=e+"px";this.L.style.height=f+"px";this.L.style.left=this.margin.left+"px";this.L.style.top=this.margin.top+ "px";if(this.ia)try{this.ab&&(this.ab.style.position="absolute",this.ab.style.display="inline",this.ab.style.width=e+"px",this.ab.style.height=f+"px",this.ab.width=e*g,this.ab.height=f*g),this.S&&(this.zb.width=e*g,this.zb.height=f*g,this.S.viewport(0,0,this.S.drawingBufferWidth,this.S.drawingBufferHeight))}catch(h){alert(h)}this.vc&&(this.vc.style.width=a+"px",this.vc.style.height=b+"px",this.vc.width=a,this.vc.height=b);this.Ra&&(this.Ra.style.width=a+"px",this.Ra.style.height=b+"px",this.Ja.style.width= a+"px",this.Ja.style.height=b+"px",this.Ja.width=a,this.Ja.height=b,this.Ja.style.left=this.margin.left+"px",this.Ja.style.top=this.margin.top+"px",this.ta&&this.ta!=this.Ra&&(this.ta.style.width=a+"px",this.ta.style.height=b+"px"));this.Ta&&(e=this.Ta.kd,e.style.width=a+"px",e.style.height=b+"px",e.width=a,e.height=b,e.style.left=this.margin.left+"px",e.style.top=this.margin.top+"px");this.Af&&(this.Na=!0);e=this.L.offsetWidth;f=this.L.offsetHeight;if(this.D.width!=e||this.D.height!=f)this.D.width= e,this.D.height=f;this.ls();this.ta&&this.ta.ggUpdateSize&&this.ta.ggUpdateSize(a,b);this.R("sizechanged",{w:a,h:b});this.R("playerstatechanged",{})}};c.prototype.df=function(){this.Vk=!0};c.prototype.Pc=function(){this.zn(this.ld.offsetWidth,this.ld.offsetHeight)};c.prototype.Zp=function(){var a={width:0,height:0};a.width=this.D.width;a.height=this.D.height;return a};c.prototype.He=function(){var a={x:0,y:0},b=this.L;if(b.offsetParent){do a.x+=b.offsetLeft,a.y+=b.offsetTop,b=b.offsetParent;while(b) }return a};c.prototype.wr=function(a){this.la=a};c.prototype.jr=function(a,b,e,f){this.margin.left=a;this.margin.top=b;this.margin.right=e;this.margin.bottom=f;this.la=this.skinObj;this.df()};c.prototype.No=function(a){0==a&&(this.M.Hd=!1);1==a&&(this.M.Hd=!0);2==a&&(this.M.Hd=!this.M.Hd);this.R("viewmodechanged",{});this.R("playerstatechanged",{})};c.prototype.Xp=function(){return 1==this.M.Hd?1:0};c.prototype.rl=function(a,b){this.I.mode=1==b&&0a.z?(w=-b/a.z,p=a.x*w,w*=a.y,Math.abs(p)a.z?(w=-b/a.z,p=this.D.width/2+ a.x*w,w=this.D.height/2+a.y*w):w=p=0,a.Xb=p,a.Cb=w;k.ge=x}}}};c.prototype.jp=function(){for(var a=[],b=0;bb&&(b=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};c.prototype.Lq=function(){var a;if(this.Ja&&(this.I.Vg!=this.I.mode&&(this.I.Vg=this.I.mode,this.Ja.style.visibility=0=this.I.mode&&(b=0);3==this.I.mode&&(b=this.I.Ba);for(a=0;ae!=f.Cb>e&&b<(f.Xb-l.Xb)*(e-l.Cb)/(f.Cb-l.Cb)+l.Xb&&(g=!g)}return g};c.prototype.Vh=function(a,b){var e=-1;if((0<=this.I.mode||0e.width?this.fov.m/2:4==b?180*Math.atan(4*e.height/(3*e.width)*Math.tan(this.fov.m/2*Math.PI/180))/Math.PI:4*e.height/(3*e.width)*(this.fov.m/2)}return 2*a};c.prototype.mp=function(a,b){a||(a=this.Tb());b||(b=this.Sa());return 4==b?180*Math.atan(this.aspect()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.aspect()};c.prototype.aspect=function(){return this.D.width/ this.D.height};c.prototype.ol=function(a){var b=this.fov.m;a/=2;var e=this.Sa();switch(this.fov.mode){case 0:b=2*a;break;case 1:a=4==e?180*Math.atan(this.D.width/this.D.height*Math.tan(a*Math.PI/180))/Math.PI:this.D.width/this.D.height*a;b=2*a;break;case 2:b=Math.sqrt(this.D.width*this.D.width+this.D.height*this.D.height);a=4==e?180*Math.atan(b/this.D.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.D.height*a;b=2*a;break;case 3:4*this.D.height/3>this.D.width?b=2*a:(b=3*this.D.width/(4*this.D.height), a=4==e?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,b=2*a)}return b};c.prototype.Wi=function(a){this.fov.m=this.ol(a)};c.prototype.pg=function(){if(!this.ef){var a=this.bn;a.pan=this.pan.m;a.A=this.A.m;a.fov=this.fov.m;this.nf(a);this.nf(a);this.nf(a);this.pan.m=a.pan;this.A.m=a.A;this.fov.m=a.fov}};c.prototype.nf=function(a){var b=this.D.width/this.D.height;if(2==this.Xa){if(0b&&(a.fov=b);50a.A-f&&(a.A=-50+f));e>g?a.pan=0:(a.pan+e>g&&(a.pan=g-e,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0)),a.pan-e<-g&&(a.pan=-g+e,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0)))}else{0g&&(a.fov=g);12==this.Sa()&&(2*e>h&&(a.fov=h/b),f=this.Tb()/2,2*f>h&&(a.fov=h),f=this.Tb()/2,e=b*f);2*f>this.A.max-this.A.min&&180>this.A.max-this.A.min&&(f=(this.A.max-this.A.min)/ 2,a.fov=this.ol(2*f));90>this.A.max?a.A+f>this.A.max&&(a.A=this.A.max-f):a.A>this.A.max&&(a.A=this.A.max);-90b){g=90;h=Math.tan(f*Math.PI/180);var l=Math.tan((Math.abs(a.A)+f)*Math.PI/180);l=Math.sqrt(l*l+1)/Math.sqrt(h*h+1);f=180*Math.atan(l*Math.tan(e*Math.PI/180))/Math.PI;2*f>b&&(l=Math.tan(b*Math.PI/360)/Math.tan(e*Math.PI/180),b=l*Math.sqrt(h*h+1),l=Math.sqrt(b*b-1),g=180/Math.PI* Math.atan(l));a.pan+f>this.pan.max&&(a.pan=this.pan.max-f,this.C.active&&(this.C.speed=-this.C.speed,this.pan.d=0));a.pan-fg&&(a.A=g-e);a.A-e<-g&&(a.A=-g+e)}}};c.prototype.update=function(a){void 0===a&&(a=0);this.Na=!0;a&&(this.ug=Math.max(1*a,this.ug))};c.prototype.$l=function(){return this.ra?!!this.ra.isTileLoading:0a;a++){var e;if(e=this.cube.faces[a]){var f="";this.Mc?(f+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,0px) ",f+="perspective("+b+"px) ",f+="translate3d(0px,0px,"+b+"px) "):f+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,"+b+"px) ";f+="rotateZ("+Number(this.V.m).toFixed(10)+ "deg) ";f+="rotateX("+Number(this.A.m).toFixed(10)+"deg) ";f+="rotateY("+Number(-this.pan.m).toFixed(10)+"deg) ";e.nm&&(f+=e.nm,e.qb||(f="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),e.W.style[this.Va]=f)}}};c.prototype.bs=function(){this.pg();var a;this.vc&&(a=this.vc.getContext("2d"));if(this.D.width!==this.L.offsetWidth||this.D.height!==this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight;if(a){var b=a.canvas.width/2,e=a.canvas.height/2,f=a.createRadialGradient(b, e,5,b,e,Math.max(b,e));f.addColorStop(0,"#333");f.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=f;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.m.toFixed(1),b,e-60);a.fillText("Tilt: "+this.A.m.toFixed(1),b,e-30);a.fillText("Fov: "+this.fov.m.toFixed(1),b,e+0);a.fillText("Node: "+this.Uj(),b,e+30);a.fillText("Title: "+this.eg.title,b,e+60)}};c.prototype.cs=function(){this.pg();if(this.D.width!==this.L.offsetWidth|| this.D.height!==this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight;this.ra&&this.ra.setPan&&(this.ra.setPan(this.pan.m),this.ra.setTilt(this.A.m),this.ra.setFov(this.fov.m))};c.prototype.Tk=function(){this.Ja.style.visibility="inherit";this.ma||(this.ma=this.Ja.getContext("2d"));if(this.ma.width!=this.D.width||this.ma.height!=this.D.height)this.ma.width=this.D.width,this.ma.height=this.D.height;this.ma.clear?this.ma.clear():this.ma.clearRect(0,0,this.Ja.width,this.Ja.height); this.Cc=0;var a=100/this.fov.m;var b=this.v.width/this.v.height;var e=this.D.height*a*b;a*=this.D.height;var f=(this.pan.m/100/b-.5)*e+this.D.width/2;for(var g=(this.A.m/100-.5)*a+this.D.height/2,h,l,k,q,p=0;this.v.levels.length>=p+2&&this.v.levels[p+1].width>e;)p++;var w;var x=[];for(w=this.v.levels.length-1;w>=p;){b=this.v.levels[w];if(b.cache){var y={jb:0,Gb:0};y.Ib=b.U-1;y.Jb=b.ea-1}else{y={};var z=-g/a*(b.height/this.v.N);h=(-f+this.D.width)/e*(b.width/this.v.N);l=(-g+this.D.height)/a*(b.height/ this.v.N);y.jb=Math.min(Math.max(0,Math.floor(-f/e*(b.width/this.v.N))),b.U-1);y.Gb=Math.min(Math.max(0,Math.floor(z)),b.ea-1);y.Ib=Math.min(Math.max(0,Math.floor(h)),b.U-1);y.Jb=Math.min(Math.max(0,Math.floor(l)),b.ea-1)}x[w]=y;var fa=!0;for(l=y.Gb;l<=y.Jb;l++)for(h=y.jb;h<=y.Ib;h++)q=h+l*b.U,z=b.ba[q],z||(z=new r.Sd,b.ba[q]=z),this.$b=p;){b=this.v.levels[w];if(x[w]&&0<=x[w].jb)for(y=x[w],l=y.Gb;l<=y.Jb;l++)for(h=y.jb;h<=y.Ib;h++)q=h+l*b.U,(z=b.ba[q])||(z=b.ba[q]=new r.Sd),z.v&&z.v.complete&&(q=f+(-this.v.Ea+this.v.N*h)*e/b.width,this.ma.drawImage(z.v,q,g+(-this.v.Ea+this.v.N*l)*a/b.height,z.v.width*e/b.width,z.v.height*a/b.height)),z.visible=!0;w--}for(e=0;e=this.I.mode&&(e=0),3==this.I.mode&&(e=this.I.Ba),k=0;kthis.cube.faces.length))for(var a=0;6>a;a++){var b=this.cube.faces[a];var e=[];e.push(new r.Ha(-1,-1,-1,0,0));e.push(new r.Ha(1,-1,-1,1,0));e.push(new r.Ha(1,1,-1,1,1));e.push(new r.Ha(-1,1,-1,0,1));for(var f=0;4>f;f++)4>a?e[f].La(-Math.PI/2*a):e[f].Ga(Math.PI/2*(4==a?-1:1)),this.Oa&&(e[f].lb(this.Oa.V*Math.PI/180),e[f].Ga(-this.Oa.pitch* Math.PI/180)),e[f].Ue(-this.pan.m),e[f].Od(this.A.m),e[f].Ve(this.V.m);e=this.Bj(e);b.qb=0=a+2&&!this.v.levels[a+1].Se&&this.v.levels[a+1].width>e;)a++;return a};c.prototype.gs=function(){var a=!1,b,e,f;if(this.D.width!==this.L.offsetWidth||this.D.height!==this.L.offsetHeight)this.D.width=this.L.offsetWidth,this.D.height=this.L.offsetHeight,this.L.style[this.Va+ "OriginX"]=this.D.width/2+"px",this.L.style[this.Va+"OriginY"]=this.D.height/2+"px",a=!0;var g=Math.round(this.pd());if(this.Wg!=g||a)this.Wg=g,this.Mc||(this.L.style[this.Cd]=g+"px",this.L.style[this.Cd+"Origin"]="50% 50%");this.Cc=0;if(0b;b++){var l=this.cube.faces[b];l.qb&&(h=h+b+",")}h=this.Qj();var k;for(k=this.v.levels.length-1;k>=h;){a=this.v.levels[k];var q=1;k==this.v.levels.length-1&&0==this.v.Ea&&(q=this.v.N/(this.v.N-2));for(b= 0;6>b;b++){l=this.cube.faces[b];var p=l.Mf;if(l.qb&&0=k);)x=x.nextSibling;this.L.insertBefore(p.W,x);p.cb=p.W.getContext("2d")}else if(this.Ln=k);)x=x.nextSibling;this.L.insertBefore(p.W,x)}p.W&&(this.ek++,p.v=new Image,p.v.crossOrigin=this.crossOrigin,p.v.style[this.Va+"Origin"]="0% 0%",p.v.style.position="absolute",p.v.style.overflow="hidden",p.W.$d=k,p.v.onload=this.Rr(p), p.v.onerror=this.ej(p),p.v.onabort=this.ej(p),p.v.setAttribute("src",this.ne(b,k,e,f)),a.cache&&this.gc.push(p.v),this.$b++,this.Na=!0)}else this.Cc++;if(p.W){x="";this.Mc?(x+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,0px) ",x+=" perspective("+g+"px) ",x+="translate3d(0px,0px,"+g+"px) "):x+="translate3d("+this.D.width/2+"px,"+this.D.height/2+"px,"+g+"px) ";x+="rotateZ("+Number(this.V.m).toFixed(10)+"deg) ";x+="rotateX("+Number(this.A.m).toFixed(10)+"deg) ";x+="rotateY("+Number(-this.pan.m).toFixed(10)+ "deg) ";this.Oa&&(x+="rotateX("+Number(-this.Oa.pitch).toFixed(10)+"deg) ",x+="rotateZ("+Number(this.Oa.V).toFixed(10)+"deg) ");x=4>b?x+("rotateY("+-90*b+"deg) "):x+("rotateX("+(4==b?-90:90)+"deg) ");if(this.Rf){var y=this.v.N/a.width*(2*k+1)*(this.mg/this.v.N);y=this.yc?2/Math.tan(this.fov.m*Math.PI/360)*y:2*y;x+=" scale("+y*q*q+")"}else y=1/(q*q);x+=" translate3d("+(1/q*e*this.v.N-this.v.Ea-a.width/2)+"px,";x+=1/q*f*this.v.N-this.v.Ea-a.width/2+"px,";x+=-a.width*y/2+"px)";l.qb&&(p.visible=!0,p.W? p.W.style[this.Va]=x:p.v&&(p.v.style[this.Va]=x))}}}}k--}for(g=0;gb||100>e)e=b=100;var f=window.devicePixelRatio||1;this.Sf&&(f=1);this.L.style.width=b+"px";this.L.style.height=e+"px";this.ab.style.width=b+"px";this.ab.style.height=e+"px";this.ab.width= b*f;this.ab.height=e*f;this.ab.style.display="none";this.ab.style.touchAction="none";this.L.insertBefore(this.ab,this.L.firstChild);var g=this.bo;g.stencil=!0;g.depth=!0;g.powerPreference="high-performance";g.alpha=this.yc?!0:!1;this.Id&&10<=this.Og[0]&&(g.antialias=!1,g.alpha=!1);a={};a.flags=g;a.canvas=this.ab;this.R("beforewebglcontext",a);this.S=this.ab.getContext("webgl",g);this.S||(this.S=this.ab.getContext("experimental-webgl",g));if(this.S){var h=this.S;this.zb.width=b*f;this.zb.height=e* f;h.clearColor(0,0,0,0);h.enable(this.S.DEPTH_TEST);h.viewport(0,0,500,500);h.clear(h.COLOR_BUFFER_BIT|h.DEPTH_BUFFER_BIT);4096<=h.getParameter(h.MAX_TEXTURE_SIZE)&&!this.Sg&&(this.Oe=1g;g++)l=this.Mb(l,"c",a),l=this.Mb(l,"s",k),l=this.Mb(l,"r",b),l=this.Mb(l,"l",h),l=this.Mb(l,"x",e),l=this.Mb(l,"y",f),l=this.Mb(l,"v",f),l=this.Mb(l,"h",e);return this.Pb(l)};c.prototype.Hg=function(){return this.pan.m};c.prototype.Kp=function(){return this.G.pan};c.prototype.em=function(){for(var a=this.pan.m;-180>a;)a+=360;for(;180 a;)a+=360;for(;180a&&-1E7b&&-1E7e&&-1E7e?Number(e):this.fov.m;this.G.speed=!isNaN(f)&&0=l?(this.Ti(b,e,f),this.Nc(g)):(a=new r.al,a.bb="__AutoMove",a.le=this.em(),a.vh=this.A.m,a.Pd=this.fov.m,a.uh=this.Wa,a.Qd=b,a.me=e,a.Yf=f,a.wd=g,a.rf=!1,a.Be=!1,a.Ce=!1,0==h&& (a.Be=!0),1==h&&(a.rf=!0,a.Be=!0),2==h&&(a.Ce=!0),a.speed=l,this.G.il=this.J,this.J=this.Tl(a),this.G.jl=(new Date).getTime(),this.G.Wk=!0,this.G.active=!0,this.G.aborted=!1,this.G.pan=b,this.G.A=e,this.G.fov=f,this.Td=!1)};c.prototype.vq=function(a){this.moveTo(this.pan.eb,this.A.eb,this.fov.eb,a)};c.prototype.wq=function(a,b){var e={};e.pan=this.pan.eb;e.tilt=this.A.eb;e.fov=this.fov.eb;e.projection=this.Ki;e.timingFunction=b;e.speed=a;this.Ei(e)};c.prototype.wo=function(a,b,e,f){var g=new r.Oh(this); g.type="point";g.pan=b;g.A=e;g.id=a;g.j={};g.j.player=this;g.tf();g.j.hotspot=g;g.j.__div=document.createElement("div");g.j.__div.appendChild(f);this.X.push(g);g.j.__div.style.position="absolute";g.j.__div.style.left="-1000px";g.j.__div.style.top="-1000px";this.Ra.insertBefore(g.j.__div,this.Ra.firstChild);this.Na=!0};c.prototype.ds=function(a,b,e){for(var f=0;fa;)a+=360;b=e.Do()}e={};e.pan=a;e.tilt=b;return e};c.prototype.Ic=function(a){return a==this.control||a&&void 0!==a.ggPermeableMap&&1==a.ggPermeableMap?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};c.prototype.Aj=function(a,b){var e=this.pd(),f,g;for(f=0;fq;q++){switch(q){case 0:k.init(-g,-p,0);break;case 1:k.init(g,-p,0);break;case 2:k.init(g,p,0);break;case 3:k.init(-g,p,0)}k.Ga(h.Ga*Math.PI/180);k.La(-h.La*Math.PI/180);k.lb(h.lb*Math.PI/180);--k.z;k.Ga(-h.A*Math.PI/180);k.La(h.pan*Math.PI/ 180);k.La(-this.pan.m*Math.PI/180);k.Ga(this.A.m*Math.PI/180);k.lb(this.V.m*Math.PI/180);l.push(k.clone())}l=this.Bj(l);if(0k.z?(p=-e/k.z,g=this.D.width/2+k.x*p,p=this.D.height/2+k.y*p):p=g=0,k.Xb=g,k.Cb=p;if(this.tm(l,a,b))return h}}return null};c.prototype.ti=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};c.prototype.uq=function(a){this.Sn(a); if(this.od)this.od.onclick();(this.uf||this.vf&&this.Le)&&this.di();this.Ob=null;if(!this.M.jc&&!this.oc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.he){this.Ob=this.he;this.Z.Lc=!0;this.Z.startTime=b;a.stopPropagation();return}if(this.Ic(a.target)){var e;(e=this.Aj(this.pa.x,this.pa.y))&&e.Ie&&(this.Ob=e);this.$n(a.pageX,a.pageY);this.Z.Lc=!0;this.Z.startTime=b;a.preventDefault();this.Fa()}}this.ga.na.x=0;this.ga.na.y=0}};c.prototype.ag=function(a,b){var e= this.I.cj;e.enabled&&(this.Da!=this.ob&&0<=a&&0<=b&&""!=this.Da.title?(this.Ia.innerHTML=this.Da.title,this.Ia.style.color=this.fa(e.dj,e.bj),this.Ia.style.backgroundColor=e.background?this.fa(e.cc,e.bc):"transparent",this.Ia.style.border="solid "+this.fa(e.ec,e.dc)+" "+e.Uh+"px",this.Ia.style.borderRadius=e.tj+"px",this.Ia.style.textAlign="center",0a-this.Z.startTime&&0<=b&&20>b){var e=this.Vh(this.pa.x,this.pa.y);e&&this.On(e);b=Math.abs(this.ga.Ld.x-this.ga.oa.x)+Math.abs(this.ga.Ld.y-this.ga.oa.y);700>a-this.Ug&&0<=b&&20>b?(e?this.Pn(e):this.M.Kj&&this.gj(),this.Ug=0):this.Ug=a;this.ga.Ld.x=this.ga.oa.x;this.ga.Ld.y=this.ga.oa.y}}};c.prototype.Nm=function(a){if(!this.M.be&&!this.oc&&(a=a?a:window.event,this.Ic(a.target))){var b=a.detail?-1*a.detail: a.wheelDelta/40;this.M.xm&&(b=-b);a.axis&&(-1==this.yi?this.yi=a.axis:this.yi!=a.axis&&(b=0));var e=0Math.abs(a.wheelDeltaY)&&(b=0);0!=b&&(this.yj(e*this.M.Dn,!0),this.update());a.preventDefault();this.Fa()}};c.prototype.Zr=function(a){a||(a=window.event);var b=a.touches,e=this.He();this.pa.x=b[0].pageX-e.x;this.pa.y=b[0].pageY-e.y;this.oe=this.Ob=null;this.li||(this.li=!0,this.R("hastouch",{}));(this.uf||this.vf&&this.Le)&&this.di();if(!this.M.jc&& !this.oc){var f=(new Date).getTime();if(this.he)this.Ob=this.he,this.Z.Yc=!0,this.Z.startTime=f,a.preventDefault(),this.Z.nh=!0;else{if(!this.Z.Yc&&b[0]){this.Z.startTime=f;this.Z.start.x=b[0].pageX;this.Z.start.y=b[0].pageY;this.Z.oa.x=b[0].pageX;this.Z.oa.y=b[0].pageY;this.vb=b[0].target;if(this.Ic(this.vb)){(f=this.Aj(this.pa.x,this.pa.y))&&f.Ie&&(this.Ob=f);if(f=this.Vh(this.pa.x,this.pa.y))this.O(f),this.oe=f,this.Qi(f),f=this.Fg(a),this.ag(f.x-e.x,f.y-e.y);this.$n(b[0].pageX,b[0].pageY);this.Z.Ml= b[0].identifier;this.Z.Yc=!0;a.preventDefault();this.Z.nh=!0;this.Fa()}if(this.vb){e=this.vb;for(f=!1;e&&e!=this.control;){if(e.onmouseover)e.onmouseover();e.onmousedown&&!f&&(e.onmousedown(),f=!0);e=e.parentNode}f&&(a.preventDefault(),this.Z.nh=!0)}}1this.fov.max&&(this.Ka.fov.wc=this.fov.max),this.Ka.fov.wcg){e=!0;this.Ic(this.vb)&&(a.preventDefault(),this.Ob&&(this.Ob.Ie(),this.he=this.Ob.pb?this.Ob:null));if(this.vb){for(g=this.vb;g&&g!=this.control;)g.onclick&&(g.onclick(),h=!0,e=!1),g=g.parentNode;h&&a.preventDefault()}g=Math.abs(this.Z.Ld.x-this.Z.oa.x)+Math.abs(this.Z.Ld.y-this.Z.oa.y);if(700>f-this.Ug&&0<=g&&20>g){if(this.Ic(this.vb))if(a.preventDefault(),this.oe)this.Pn(this.oe);else if(this.M.Kj){var l= this;setTimeout(function(){l.gj()},1)}if(this.vb){for(g=this.vb;g&&g!=this.control;)g.ondblclick&&(g.ondblclick(),h=!0,e=!1),g=g.parentNode;h&&a.preventDefault()}this.Ug=0}else this.Ug=f;this.Z.Ld.x=this.Z.oa.x;this.Z.Ld.y=this.Z.oa.y}if(this.vb)for(g=this.vb;g&&g!=this.control;){if(g.onmouseout)g.onmouseout();if(g.onmouseup)g.onmouseup();g=g.parentNode}a=this.Fg(a);this.ag(a.x-b.x,a.y-b.y);this.oe&&e&&this.On(this.oe);this.vb=null;this.Z.Yc=!1;this.Qi(this.ob);this.oe=null}};c.prototype.Wr=function(a){var b= this.He();this.M.jc||this.oc||(this.Z.Yc=!1);this.oe=null;this.Qi(this.ob);a=this.Fg(a);this.ag(a.x-b.x,a.y-b.y)};c.prototype.Cm=function(){return null!=this.vb||this.Z.Yc||this.Z.Lc};c.prototype.Om=function(a){!this.Pe&&window.MSGesture&&(this.O("setup gesture"),this.Pe=new MSGesture,this.Pe.target=this.control);this.Pe&&this.Pe.addPointer(a.pointerId)};c.prototype.Vl=function(a){this.ak=!0;this.Fi=1;this.M.jc||this.M.be||this.oc||(a.touches?(this.vb=a.touches.target,this.Ic(a.target)&&(a.preventDefault(), this.fov.prev=this.fov.m,this.Fa())):(a.preventDefault(),this.fov.prev=this.fov.m,this.Fa()))};c.prototype.gp=function(a){this.M.jc||this.M.be||this.oc||!this.Ic(a.target)||(a.preventDefault(),this.Ka.fov.active=!0,this.Ka.fov.wc=this.fov.prev/Math.sqrt(a.scale),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.wc>this.fov.max&&(this.Ka.fov.wc=this.fov.max),this.update(),this.Fa())};c.prototype.xq=function(a){this.M.jc||this.M.be||this.oc||(a.preventDefault(),1!=a.scale&&(this.Ka.fov.active=!0,this.Fi*=a.scale, this.Ka.fov.wc=this.fov.prev/Math.sqrt(this.Fi),4==this.Sa()&&2!=this.Xa&&this.Ka.fov.wc>this.fov.max&&(this.Ka.fov.wc=this.fov.max),this.update(),this.Fa()))};c.prototype.Ul=function(a){this.M.jc||this.M.be||this.oc||(this.Ka.fov.active=!1,a.preventDefault(),this.Fa(),this.Pe&&this.Pe.reset&&this.Pe.reset())};c.prototype.kq=function(a){this.M.bh||this.oc||(this.isFullscreen&&a.preventDefault(),this.wi=a.keyCode,this.Fa())};c.prototype.lq=function(a){this.wi&&(this.wi=0,a.preventDefault())};c.prototype.Dq= function(){this.wi=0};c.prototype.Ji=function(){this.isFullscreen&&(this.ti()||this.exitFullscreen(),this.ti()&&(this.aa.style.left="0px",this.aa.style.top="0px"))};c.prototype.Hq=function(a,b,e,f){f?(this.Mg.alpha=a,this.Mg.beta=b,this.Mg.gamma=e,this.Mg.gamma+=90):(this.kb.alpha=a,this.kb.beta=b,this.kb.gamma=e,this.kb.gamma+=90);this.kb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;e=new r.cl;a=this.kb;e.Ue(-a.alpha);e.Ve(-a.beta);e.Od(-a.gamma);e.Ve(90-a.orientation);1> e.Kb?-1this.kb.fadeIn&&(this.kb.fadeIn+=1,g=.1*this.kb.fadeIn);e=-e+this.kb.Qe;this.Xe(g*e+(1-g)*this.Hg());this.Ye(g*a+(1-g)*this.ii());this.Xn?this.Ui(g*b+(1- g)*this.im()):this.Ui(0);this.pg();this.G.active=f}};c.prototype.On=function(a){this.la&&this.la.hotspotProxyClick&&this.la.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.uk(a.url,a.target),this.ag(-1,-1))};c.prototype.Pn=function(a){this.la&&this.la.hotspotProxyDoubleClick&&this.la.hotspotProxyDoubleClick(a.id,a.url)};c.prototype.ei=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};c.prototype.Zm=function(){var a=this;setTimeout(function(){a.Zm()},100);9!=a.Ni||a.pi|| window.requestAnimationFrame(function(){a.lh();a.Jc("restart recover timer")});10k;)k+=360}e=k-l;2!=this.Xa&&(180e&&(e+=360));this.pan.m+=e*this.zd}else this.pan.m= k;this.C.Zg=this.pan.m;break;case 1:l=this.A.m;this.Td&&3!=q.type?(f=k-l,this.A.m+=f*this.zd):this.A.m=k;this.C.$g=this.A.m;break;case 2:l=this.fov.m,this.Td&&3!=q.type?(g=k-l,this.fov.m+=g*this.zd):this.fov.m=k,this.C.Yg=this.fov.m}}b=this.Sa();for(h=Math.floor(a);!this.xf(h,3)&&0a?(b=this.Eg(this.kg),this.fov.m>b?this.Rh=a:(q=(a-this.Rh)/this.pj,q=Math.min(1,q),this.Nc(this.Wa,this.kg,1-q))):(0==h.Eb||q>h.Eb-.3?this.Nc(h.value): (q/=h.Eb,this.Nc(b,h.value,1-q)),this.C.Jm=h.value);this.Td&&(e=Math.sqrt(e*e+f*f+g*g),.3>e&&(this.Td=!1,this.zd=.02,this.jg=0),0this.jg&&(this.zd+=.01,this.zd=Math.min(this.zd,1)),this.jg=e);h=Math.floor(a);if(h!=this.kl)for(this.kl=h,a=this.hp(h),e=0;e=this.Za.length&&(b=0),a=this.Za[b];while(""!=this.C.Kf&&!this.Gg(a).tags.includes(this.C.Kf)&&a!=this.Qa);return a};c.prototype.Oq=function(a){var b=this.G.speed;this.G.jk&&(b=b*(a.getTime()-this.G.jk)/60,5b&&(b=.2));this.G.jk=a.getTime();this.C.Ag&&(this.za.ready()||4==this.Wa)&&this.gi()&&(this.C.Ag= !1,this.C.active=!0,this.yb.running=!0,this.yb.Rj=!1);if(this.G.active||0!=this.G.Lb&&this.za.ready()){if(this.G.Wk&&"__AutoMove"==this.J.bb){var e=a.getTime()-this.G.jl;b=e/100;if(b>=this.J.length){if(this.Xi(this.J.length),this.xa.splice(this.xa.indexOf(this.J),1),this.G.active=!1,this.J=this.G.il,this.G.Lb=0,this.Ti(this.G.pan,this.G.A,this.G.fov),this.pan.Vc=this.G.pan,this.A.Vc=this.G.A,this.G.ih&&(this.G.ih=!1,this.C.Di=!0,this.C.active=!0,this.R("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.Xi(b)}else{this.pan.d= this.G.pan-this.pan.m;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;1805*e?e/f:.2,this.pan.d*=f,this.A.d*=f,this.fov.d*=f;this.pan.m+=this.pan.d;this.A.m+=this.A.d;this.V.m+=this.V.d;this.fov.m+=this.fov.d;0!=this.G.Lb&&(this.G.Lb!=this.Wa?(b=this.Eg(this.G.Lb),this.Vj()> b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.A.d*this.A.d+this.V.d*this.V.d)/e,1))*e,this.fov.d)-this.fov.d,this.G.fov=this.fov.m):(this.Bc=this.Wa,this.Wa=this.G.Lb,this.O("New projection from Target:"+this.Wa),this.kh=this.G.ph=0,this.za.oi())):1>this.G.ph?(this.G.ph=Math.min(1,this.G.ph+.05*b),this.kh=this.G.ph):(this.Bc=0,this.G.Lb=0,this.za.oi()))}this.Ff=a.getTime();this.update()}else if(this.C.active){e=a.getTime()-this.C.startTime;this.C.zithis.F.j.duration-this.F.j.currentTime&&(this.rj=!0);f>=10*this.ff;)f-=10*this.ff;if(!g&&b>=this.J.length||g&&!e&&b>=this.J.length||g&&e&&(this.J.bb!=this.J.Pm||this.J.Gi!=this.Qa)&&b>=this.J.length){this.Xi(this.J.length);this.C.Kd=0;this.gf=!1;if(this.yb.running){this.sn();return}this.Wb=this.J.Pm;this.Wb==this.J.bb&&this.Qa==this.J.Gi?1< this.Za.length&&0e.pan;)e.pan+=360;e.tilt=f.value;e.fov=g.value;e.projection=h? h.value:4}e.timingFunction=3;e.speed=1;this.G.ih=!0;this.Ei(e);this.C.active=!0}}else 0=1E3*this.C.Hi?11E3*this.C.timeout&&!this.C.Ag&&(this.C.xh&&this.gi()||!this.C.xh)&&(this.C.active=!0,this.C.startTime=a.getTime(),this.C.ud=0,this.R("autorotatechanged", {}),this.pan.d=0,this.A.d=0,this.fov.d=0),!this.Ka.enabled||this.Z.ri()||0==this.pan.d&&0==this.A.d&&0==this.fov.d||(this.G.ni=!0,this.pan.d*=.9,this.A.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.A.m+=this.A.d,this.yj(this.fov.d),1E-4>this.pan.d*this.pan.d+this.A.d*this.A.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.A.d=0,this.fov.d=0),this.update())};c.prototype.Qq=function(a){var b=this.K;if(b.xd){var e=a.getTime()-b.ho;e/=1E3*b.fo;1<=e?(b.xd=!1,this.Jl(),b.Nk=a.getTime(),this.Hn(),b.qe=!0, 0==b.sc||b.hg||(4==b.sc?(this.J=this.Dg(!0,b.$e,b.af,b.Rd),this.Wb=this.J.bb,this.C.active=!0,this.yb.running=!0):this.moveTo(b.$e,b.af,b.Rd,b.te,0,b.wd))):b.Ym(e)}else b.qe&&(e=a.getTime()-b.Nk,e/=1E3*b.lg,1<=e?(b.qe=!1,this.Ff=a.getTime(),this.update(),0!=b.sc&&b.hg&&(4==b.sc?(this.J=this.Dg(!0,b.$e,b.af,b.Rd),this.Wb=this.J.bb,this.C.active=!0,this.yb.running=!0):this.moveTo(b.$e,b.af,b.Rd,b.te,0,b.wd)),4!=b.sc&&(this.Ri(!1),this.C.active=b.ue,this.R("autorotatechanged",{}),b.ue=!1),this.C.ud= 0,this.qa&&this.Fj(),this.ng=!1):b.Ym(e));b=this.Jq;b.Fo&&(b.Zh?a.getTime()-b.Mj>=1E3*b.delay&&(b.Zh=!1):(b.current+=b.jd,0>b.current&&(b.current=0,b.jd=-b.jd,b.Zh=!0,b.Mj=a.getTime()),1b.Zb[a]?(b.Zb[a]+=.05,b.fd[a]b.Zb[a]&&(b.Zb[a]=b.fd[a],-1!=b.Yi.indexOf(b.ub[a])&&(b.Yi.splice(b.Yi.indexOf(b.ub[a]), 1),b.ub.splice(a,1),b.fd.splice(a,1),b.Zb.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;ae.Ba?(e.Ba+=b.jd,e.nbe.Ba&&(e.Ba=e.nb)),this.update())}3==b.mode&&b.nb!=b.Ba&&(b.nb>b.Ba?(b.Ba+=b.jd,b.nbb.Ba&&(b.Ba=b.nb)),this.update())};c.prototype.Sq=function(){var a=this.Ka;this.Z.ri()&&(this.M.Hd?(a.na.x=.4*(this.ga.oa.x-a.oa.x),a.na.y=.4*(this.ga.oa.y-a.oa.y), a.oa.x+=a.na.x,a.oa.y+=a.na.y):(a.na.x=.1*-this.ga.na.x*this.M.sensitivity/8,a.na.y=.1*-this.ga.na.y*this.M.sensitivity/8),this.Yn(a.na.x,a.na.y),this.update());a.fov.active&&(this.pl(.4*(a.fov.wc-this.fov.m)),.001>Math.abs(a.fov.wc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.na.x||0!=a.na.y)&&!this.Z.ri()){var b=.9*(1-a.Ek);a.na.x*=b;a.na.y*=b;this.G.ni=!0;.01>a.na.x*a.na.x+a.na.y*a.na.y?(a.na.x=0,a.na.y=0):(this.Yn(a.na.x,a.na.y),this.update())}};c.prototype.Pq= function(){if(this.M.pn&&this.M.Hd){var a=this.bn;a.pan=this.pan.m;a.A=this.A.m;a.fov=this.fov.m;this.nf(a);this.nf(a);this.nf(a);var b=a.pan-this.pan.m,e=a.A-this.A.m;a=a.fov-this.fov.m;if(0!=b||0!=e||0!=a){var f=.2+.9*Math.min((Math.abs(b)+Math.abs(e)+Math.abs(a))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=b*f;this.A.m+=e*f;this.fov.m+=a*f;this.Ka.Ek=.3;this.update()}else this.Ka.Ek=0}else this.pg();if(isNaN(this.pan.m)||1E7this.pan.m)this.pan.m=0;if(isNaN(this.A.m)|| 1E7this.A.m)this.A.m=0;if(isNaN(this.V.m)||1E7this.V.m)this.V.m=0;if(2!=this.Xa){for(;360this.pan.m;)this.pan.m+=360}};c.prototype.Rq=function(){if(!this.gi()&&this.Af&&5"+c.Cl(this.Bi).replace(/./gm,function(k){return"&#"+k.charCodeAt(0)+";"})),f.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(f),g.appendChild(a));e.aa.insertBefore(e.od,e.aa.firstChild);g.onclick=function(){e.od&&(e.aa.removeChild(e.od), e.od=null)};g.oncontextmenu=g.onclick}};c.prototype.Eo=function(){var a=this;var b=a.Ra;a.control=b;a.control=b;a.es();setTimeout(function(){a.lh()},10);setTimeout(function(){a.Zm()},200);setTimeout(function(){a.df();a.Eh()},10);b.addEventListener&&(b.addEventListener("touchstart",function(e){a.Zr(e)},!1),b.addEventListener("touchmove",function(e){a.Yr(e)},!1),b.addEventListener("touchend",function(e){a.Xr(e)},!1),b.addEventListener("touchcancel",function(e){a.Wr(e)},!1),b.addEventListener("pointerdown", function(e){a.Om(e)},!1),b.addEventListener("MSPointerDown",function(e){a.Om(e)},!1),b.addEventListener("MSGestureStart",function(e){a.Vl(e)},!1),b.addEventListener("MSGestureEnd",function(e){a.Ul(e)},!1),b.addEventListener("MSGestureChange",function(e){a.xq(e)},!1),b.addEventListener("gesturestart",function(e){a.Vl(e)},!1),b.addEventListener("gesturechange",function(e){a.gp(e)},!1),b.addEventListener("gestureend",function(e){a.Ul(e)},!1),b.addEventListener("mousedown",function(e){a.uq(e)},!1),b.addEventListener("mousemove", function(e){a.tq(e)},!1),document.addEventListener("mouseup",function(e){a.sq(e)},!1),b.addEventListener("mousewheel",function(e){a.Nm(e)},!1),b.addEventListener("DOMMouseScroll",function(e){a.Nm(e)},!1),document.addEventListener("keydown",function(e){a.kq(e)},!1),document.addEventListener("keyup",function(e){a.lq(e)},!1),window.addEventListener("resize",function(){a.df()},!1),window.addEventListener("blur",function(){a.Dq()},!1),a.aa.addEventListener("webkitfullscreenchange",function(){a.Ji()},!1), document.addEventListener("mozfullscreenchange",function(){a.Ji()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Ji()},!1),document.addEventListener("MSFullscreenChange",function(){a.Ji()},!1));b.oncontextmenu=function(e){void 0===e&&(e=window.event);if(e.target&&!a.Ic(e.target))return!0;if(!e.ctrlKey){e=a.Fg(e);var f=a.He();a.Fr(e.x-f.x,e.y-f.y);return!1}return!0};window.addEventListener("deviceorientation",function(e){a.Hq(e.alpha,e.beta,e.gamma,e.absolute);null!=e.alpha&&null!= e.beta&&null!=e.gamma&&0==a.Zj&&(a.Zj=!0,a.R("gyroavailable",{available:!0}),a.R("playerstatechanged",{}))})};c.prototype.hl=function(){for(var a=0;ab&&(b=0),b> a.Th.duration&&(b=a.Th.duration-.1),a.Io(b)):a.j&&(0>b&&(b=0),b>a.j.duration&&(b=a.j.duration-.1),a.j.currentTime=b))};c.prototype.setVolume=function(a,b){if(this.Nb){var e=this.ra;e&&e.setVolume(a,b)}else try{e=void 0;var f=Number(b);1f&&(f=0);"_videopanorama"===a&&this.F.j&&(this.F.j.volume=f);if("_main"===a){this.ca=f;for(e=0;ee&&(e=0);this.ca=e;for(f=0;fe&&(e=0);h.level=e;h.j&&null!=h.j.volume&&(h.j.volume=e*this.ca)}}}catch(l){this.O(l)}};c.prototype.Si=function(a,b,e){a.j.style.opacity=0==b?1:0;a.j.style[this.Xc]="opacity "+e+"ms";a.j.style.opacity=0==b?0:1};c.prototype.kr=function(a,b,e){function f(){var k=g[l];if(!k.j)return"continue";0==b?(h.Si(k,b,e),setTimeout(function(){0==k.j.style.opacity&& k.Wf(!1)},e+10),k.qb=!1):1==b?(h.Si(k,b,e),k.Wf(!0),k.qb=!0):2==b&&("visible"==k.j.style.visibility?(h.Si(k,0,e),setTimeout(function(){0==k.j.style.opacity&&k.Wf(!1)},e+10),k.qb=!1):(h.Si(k,1,e),k.Wf(!0),k.qb=!0))}for(var g=this.xb(a),h=this,l=0;le&&(e=this.Dc);for(b=0;6>b;b++){var f=this.cube.faces[b];a?(f.width=this.mg,f.height=this.mg):(f.W=document.createElement("canvas"),f.W.width=this.Dc,f.W.height=this.Dc,f.width=this.Dc,f.height=this.Dc,f.cb=f.W.getContext("2d"));var g="position:absolute;"; g+="left: 0px;";g+="top: 0px;";g+="width: "+e+"px;";g+="height: "+e+"px;";a&&(g+="outline: 1px solid transparent;");g+=this.Pa+"transform-origin: 0% 0%;";g+="-webkit-user-select: none;";g+=this.Pa+"transform: ";var h="";var l=1;this.Rf&&(l=100);h=4>b?h+("rotateY("+-90*b+"deg)"):h+("rotateX("+(4==b?-90:90)+"deg)");this.Rf&&(h+=" scale("+l+")");h+=" translate3d("+-e/2+"px,"+-e/2+"px,"+-e*l/(2*this.bf)+"px)";g+=h+";";f.nm=h;a||(f.W.setAttribute("style",g),this.L.insertBefore(f.W,this.L.firstChild))}if(!a){for(b= 0;6>b;b++)f=this.cube.faces[b],""!=this.qf[b]&&(f.Nd=new Image,f.Nd.crossOrigin=this.crossOrigin,f.Nd.onload=this.Al(f),f.Nd.setAttribute("src",this.Pb(this.qf[b])),this.gc.push(f.Nd));for(b=0;6>b;b++)f=this.cube.faces[b],f.loaded=!1,f.v=new Image,f.v.crossOrigin=this.crossOrigin,f.v.onload=this.Al(f),f.v.setAttribute("src",this.Pb(this.sg[b])),this.gc.push(f.v)}};c.prototype.je=function(){var a;this.Ka.na.x=0;this.Ka.na.y=0;if(this.hd){for(a=0;aa.h?a.w:a.h};c.prototype.yk=function(a,b){var e=(new DOMParser).parseFromString(a,"text/xml");this.Ij=a;this.dn(e,b);this.ra&&(this.O("Apply to Flash player"),this.ra.readConfigString(this.Ij),this.ra.setLocked(!0),this.ra.setSlaveMode(!0))};c.prototype.cn=function(a,b,e){try{var f=void 0;f=new XMLHttpRequest;f.open("GET",a,!1);f.send(null);if(f.responseXML){var g=a.lastIndexOf("/");0<=g&&(this.Vd=a.substr(0, g+1));2<=arguments.length&&null!=b&&(this.Vd=b);this.yk(f.responseText,e)}else alert("Error loading panorama XML")}catch(h){alert("Error:"+h)}};c.prototype.Wq=function(a,b,e,f){var g=new XMLHttpRequest;var h=this;g.onload=function(l){if(4<=g.readyState)if(g.responseXML){var k=a.lastIndexOf("/");0<=k&&(h.Vd=a.substr(0,k+1));3<=arguments.length&&null!=e&&(h.Vd=e);h.yk(g.responseText,f);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+g.statusText)};g.onerror= function(){console.error("Error loading XML:"+g.statusText)};g.open("GET",a,!0);g.send(null)};c.prototype.xj=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.Xd[b])&&(b=a);a={oldNodeId:this.Qa,nodeId:b};this.R("beforechangenodeid",a);this.Yj?this.Yj=!1:this.sk.push(this.Qa);""!=this.Qa&&-1==this.mj.indexOf(this.Qa)&&(this.mj.push(this.Qa),this.R("changevisitednodes",{}));this.Im=this.Qa;this.Qa=b;this.O("change active node: "+b);this.la&&this.la.changeActiveNode&&this.la.changeActiveNode("{"+ b+"}");this.R("changenodeid",a);this.vf=!0};c.prototype.Uj=function(){return this.Qa};c.prototype.Dp=function(){if(0=this.Za.length&&(a=0);return this.Za[a]}return""};c.prototype.Pp=function(){if(0a&&(a=this.Za.length-1);return this.Za[a]}return""};c.prototype.wp=function(){return this.Im};c.prototype.Bq=function(a){return-1!=this.mj.indexOf(a)};c.prototype.To=function(){this.mj=[];this.R("changevisitednodes", {})};c.prototype.dn=function(a,b){var e=a.firstChild;this.pe=[];this.Za=[];this.Xd=[];for(a=e.firstChild;a;){if("map"==a.nodeName){var f={},g=a.getAttributeNode("title");g&&(f.title=g.nodeValue.toString());g=a.getAttributeNode("type");f.type=g.nodeValue.toString();"web"==f.type?(g=a.getAttributeNode("mapprovider"),f.mapprovider=g.nodeValue.toString(),(g=a.getAttributeNode("mapstyle"))&&(f.mapstyle=g.nodeValue.toString()),(g=a.getAttributeNode("googlecustomstylecode"))&&(f.googlecustomstylecode=g.nodeValue.toString()), (g=a.getAttributeNode("mapurltemplate"))&&(f.mapurltemplate=g.nodeValue.toString()),(g=a.getAttributeNode("mapmaxzoom"))&&(f.mapmaxzoom=Number(g.nodeValue)),(g=a.getAttributeNode("mapkey"))&&(f.mapkey=g.nodeValue.toString()),(g=a.getAttributeNode("styleurl"))&&(f.styleurl=g.nodeValue.toString())):(g=a.getAttributeNode("width"),f.width=Number(g.nodeValue),g=a.getAttributeNode("height"),f.height=Number(g.nodeValue),g=a.getAttributeNode("zoomlevels"),f.zoomlevels=Number(g.nodeValue),g=a.getAttributeNode("tileformat"), f.tileformat=g.nodeValue.toString(),g=a.getAttributeNode("bgcolor"),f.bgcolor=g.nodeValue.toString(),g=a.getAttributeNode("transparent"),f.transparent=1==g.nodeValue,g=a.getAttributeNode("floorplannorth"),f.floorplannorth=Number(g.nodeValue));g=a.getAttributeNode("id");this.Ci[g.nodeValue.toString()]=f}a=a.nextSibling}if("tour"==e.nodeName){this.Ef=!0;a="";(g=e.getAttributeNode("start"))&&(a=g.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(a=String(this.startNode),this.startNode= "");this.hasOwnProperty("startView")&&this.startView&&("object"===typeof this.startView&&null!==this.startView?b=this.startView:""!=this.startView&&(b=String(this.startView)),this.startView="");f=e.firstChild;var h="";for(e="";f;){if("panorama"==f.nodeName){if(g=f.getAttributeNode("id"))h=g.nodeValue.toString(),""==a&&(a=h),""==e&&(e=h),this.pe[h]=f,this.Za.push(h);for(g=f.firstChild;g;){if("userdata"==g.nodeName){var l=this.yg(g);this.Jh[h]=l;h==a&&(this.Jh._first=l);l.customnodeid&&(this.Xd[l.customnodeid]= h);this.Kc[h]=this.Gl(g);this.Jf[h]=this.Hl(g)}g=g.nextSibling}}if("masternode"==f.nodeName)for(g=f.firstChild;g;)"userdata"==g.nodeName&&(l=this.yg(g),this.Jh._master=l),g=g.nextSibling;f=f.nextSibling}this.pe.hasOwnProperty(a)||(g=this.Xd[a])&&(a=g);this.pe.hasOwnProperty(a)||(this.Jc("Start node "+a+" not found!"),a=e);this.xk(this.pe[a],b);this.xj("{"+a+"}");this.Qa=a}else this.Ef=!1,this.xk(e,b),this.xj(""),this.Za.push("");this.ef&&(this.O("add pano vr config"),this.mb.ig());this.R("configloaded", {});this.R("changenode",{});this.R("playerstatechanged",{})};c.prototype.xk=function(a,b){var e=this;this.jn();this.Ta&&this.Ta.Yq();this.Uf(this.ob);this.je();this.Wg=0;for(var f=a.firstChild,g,h,l=0;f;){if("view"==f.nodeName){if(g=f.getAttributeNode("fovmode"))this.fov.mode=Number(g.nodeValue);g=f.getAttributeNode("pannorth");this.pan.tk=1*(g?g.nodeValue:0);for(var k=f.firstChild;k;){"start"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.m=Number(g?g.nodeValue:0),this.pan.eb=this.pan.m,g=k.getAttributeNode("tilt"), this.A.m=Number(g?g.nodeValue:0),this.A.eb=this.A.m,g=k.getAttributeNode("roll"),this.V.m=Number(g?g.nodeValue:0),this.V.eb=this.V.m,g=k.getAttributeNode("fov"),this.fov.m=Number(g?g.nodeValue:70),this.fov.eb=this.fov.m,g=k.getAttributeNode("projection"),this.Ki=Number(g?g.nodeValue:4),this.Nc(this.Ki));"min"==k.nodeName&&(g=k.getAttributeNode("pan"),this.pan.min=1*(g?g.nodeValue:0),g=k.getAttributeNode("tilt"),this.A.min=1*(g?g.nodeValue:-90),g=k.getAttributeNode("fov"),this.fov.min=1*(g?g.nodeValue: 5),1E-20>this.fov.min&&(this.fov.min=1E-20),g=k.getAttributeNode("fovpixel"),this.fov.gh=1*(g?g.nodeValue:0));if("max"==k.nodeName){g=k.getAttributeNode("pan");this.pan.max=1*(g?g.nodeValue:0);g=k.getAttributeNode("tilt");this.A.max=1*(g?g.nodeValue:90);g=k.getAttributeNode("fov");this.fov.max=1*(g?g.nodeValue:120);180<=this.fov.max&&(this.fov.max=179.9);if(g=k.getAttributeNode("fovstereographic"))this.fov.rk=1*g.nodeValue;if(g=k.getAttributeNode("fovfisheye"))this.fov.qk=1*g.nodeValue;if(g=k.getAttributeNode("scaletofit"))this.M.qn= 1==g.nodeValue}if("flyin"==k.nodeName){if(g=k.getAttributeNode("projection"))this.Fc.Lb=Number(g.nodeValue);if(g=k.getAttributeNode("pan"))this.Fc.pan=parseFloat(g.nodeValue);if(g=k.getAttributeNode("tilt"))this.Fc.A=parseFloat(g.nodeValue);if(g=k.getAttributeNode("fov"))this.Fc.fov=parseFloat(g.nodeValue)}k=k.nextSibling}}if("autorotate"==f.nodeName){if(g=f.getAttributeNode("speed"))this.C.speed=1*g.nodeValue;if(g=f.getAttributeNode("delay"))this.C.timeout=1*g.nodeValue;if(g=f.getAttributeNode("returntohorizon"))this.C.fj= 1*g.nodeValue;if(g=f.getAttributeNode("nodedelay"))this.C.Hi=1*g.nodeValue;if(g=f.getAttributeNode("noderandom"))this.C.Tm=1==g.nodeValue;(g=f.getAttributeNode("nodefilter"))&&!this.C.Sm&&(this.C.Kf=g.nodeValue);this.Zd&&(this.C.enabled=!0,this.C.jf=!0,this.C.active=!1);this.C.Kd=0;if(g=f.getAttributeNode("startloaded"))this.C.xh=1==g.nodeValue,this.C.xh&&(this.C.active=!1);if(g=f.getAttributeNode("useanimation"))this.C.Ih=1==g.nodeValue,this.C.dg=this.C.Ih;if(g=f.getAttributeNode("syncanimationwithvideo"))this.C.Pk= 1==g.nodeValue}if("animation"==f.nodeName){if(g=f.getAttributeNode("syncanimationwithvideo"))this.C.Pk=1==g.nodeValue;if(g=f.getAttributeNode("useinautorotation"))this.C.Ih=1==g.nodeValue;if(g=f.getAttributeNode("animsequence"))this.C.Sh=g.nodeValue,this.Zd&&(this.C.Ud=this.C.Sh);this.xa=[];for(k=f.firstChild;k;){if("clip"==k.nodeName){this.J=new r.bl;if(g=k.getAttributeNode("animtitle"))this.J.hf=g.nodeValue.toString();if(g=k.getAttributeNode("cliptitle"))this.J.bb=g.nodeValue.toString();if(g=k.getAttributeNode("nodeid"))this.J.As= g.nodeValue.toString();if(g=k.getAttributeNode("length"))this.J.length=Number(g.nodeValue);if(g=k.getAttributeNode("animtype"))this.J.Bo=Number(g.nodeValue);if(g=k.getAttributeNode("nextcliptitle"))this.J.Pm=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipnodeid"))this.J.Gi=g.nodeValue.toString();if(g=k.getAttributeNode("nextclipstartview"))this.J.Aq=g.nodeValue.toString();if(g=k.getAttributeNode("transitiontype"))this.J.$r=Number(g.nodeValue);var q=k.firstChild;for(this.J.da=[];q;){if("keyframe"== q.nodeName){var p=new r.Uc;if(g=q.getAttributeNode("time"))p.time=Number(g.nodeValue);if(g=q.getAttributeNode("value"))p.value=Number(g.nodeValue);if(g=q.getAttributeNode("valuestring"))p.Yk=g.nodeValue.toString();if(g=q.getAttributeNode("transitiontime"))p.Eb=Number(g.nodeValue);g=q.getAttributeNode("type");var w=0;g&&(p.type=Number(g.nodeValue),w=Number(g.nodeValue));if(g=q.getAttributeNode("property"))p.tb=Number(g.nodeValue);if(g=q.getAttributeNode("additionaltrackid"))p.Qh=g.nodeValue.toString(); if(1==w||2==w){if(g=q.getAttributeNode("bezierintime"))p.ve=Number(g.nodeValue);if(g=q.getAttributeNode("bezierinvalue"))p.we=Number(g.nodeValue);if(g=q.getAttributeNode("bezierouttime"))p.xe=Number(g.nodeValue);if(g=q.getAttributeNode("bezieroutvalue"))p.ye=Number(g.nodeValue)}this.J.da.push(p)}q=q.nextSibling}this.xa.push(this.J)}k=k.nextSibling}}"input"==f.nodeName&&(h||(h=f));if(h)for(q=0;6>q;q++)g=h.getAttributeNode("prev"+q+"url"),this.qf[q]=g?String(g.nodeValue):"";"altinput"==f.nodeName&& (k=0,(g=f.getAttributeNode("screensize"))&&(k=1*g.nodeValue),0l&&(l=k,h=f));if("control"==f.nodeName&&this.Zd){if(g=f.getAttributeNode("simulatemass"))this.Ka.enabled=1==g.nodeValue;if(g=f.getAttributeNode("rubberband"))this.M.pn=1==g.nodeValue;if(g=f.getAttributeNode("locked"))this.M.jc=1==g.nodeValue;g&&(this.M.bh=1==g.nodeValue);if(g=f.getAttributeNode("lockedmouse"))this.M.jc=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboard"))this.M.bh=1==g.nodeValue;if(g=f.getAttributeNode("lockedkeyboardzoom"))this.M.pq= 1==g.nodeValue;if(g=f.getAttributeNode("lockedwheel"))this.M.be=1==g.nodeValue;if(g=f.getAttributeNode("invertwheel"))this.M.xm=1==g.nodeValue;if(g=f.getAttributeNode("speedwheel"))this.M.Dn=1*g.nodeValue;if(g=f.getAttributeNode("invertcontrol"))this.M.Hd=1==g.nodeValue;if(g=f.getAttributeNode("sensitivity"))this.M.sensitivity=1*g.nodeValue,1>this.M.sensitivity&&(this.M.sensitivity=1);if(g=f.getAttributeNode("dblclickfullscreen"))this.M.Kj=1==g.nodeValue;if(g=f.getAttributeNode("contextfullscreen"))this.M.rg= 1==g.nodeValue;if(g=f.getAttributeNode("contextprojections"))this.M.Wh=1==g.nodeValue;if(g=f.getAttributeNode("hideabout"))this.M.Bf=1==g.nodeValue;for(k=f.firstChild;k;)"menulink"==k.nodeName&&(q={text:"",url:""},g=k.getAttributeNode("text"),q.text=g.nodeValue,g=k.getAttributeNode("url"),q.url=g.nodeValue,this.fh.push(q)),k=k.nextSibling}if("transition"==f.nodeName&&this.Zd){if(g=f.getAttributeNode("enabled"))this.K.enabled=1==g.nodeValue;if(g=f.getAttributeNode("blendtime"))this.K.lg=1*g.nodeValue; if(g=f.getAttributeNode("blendcolor"))this.K.lf=g.nodeValue.toString();if(g=f.getAttributeNode("type"))this.K.type=g.nodeValue.toString();if(g=f.getAttributeNode("softedge"))this.K.Oc=1*g.nodeValue;if(g=f.getAttributeNode("zoomin"))this.K.sa=1*g.nodeValue;if(g=f.getAttributeNode("zoomout"))this.K.sc=1*g.nodeValue;if(g=f.getAttributeNode("zoomfov"))this.K.gg=1*g.nodeValue;if(g=f.getAttributeNode("zoomspeed"))this.K.te=1*g.nodeValue;if(g=f.getAttributeNode("zoomoutpause"))this.K.hg=1==g.nodeValue;"cut"== this.K.type&&(this.K.lg=0)}if("soundstransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.Ya.enabled=1==g.nodeValue;if(g=f.getAttributeNode("transitiontime"))this.Ya.Eb=1*g.nodeValue;if(g=f.getAttributeNode("crossfade"))this.Ya.yl=1==g.nodeValue}if("flyintransition"==f.nodeName){if(g=f.getAttributeNode("enabled"))this.yb.enabled=1==g.nodeValue&&this.ia;if(g=f.getAttributeNode("speed"))this.yb.speed=1*g.nodeValue}"userdata"==f.nodeName&&(this.userdata=this.eg=this.yg(f),this.Kc[a.id]|| (this.Kc[a.id]=this.Gl(f),this.Jf[a.id]=this.Hl(f)));if("hotspots"==f.nodeName)for(k=f.firstChild;k;){if("label"==k.nodeName&&this.Zd){q=this.I.cj;if(g=k.getAttributeNode("enabled"))q.enabled=1==g.nodeValue;if(g=k.getAttributeNode("width"))q.width=1*g.nodeValue;if(g=k.getAttributeNode("height"))q.height=1*g.nodeValue;if(g=k.getAttributeNode("textcolor"))q.dj=1*g.nodeValue;if(g=k.getAttributeNode("textalpha"))q.bj=1*g.nodeValue;if(g=k.getAttributeNode("background"))q.background=1==g.nodeValue;if(g= k.getAttributeNode("backgroundalpha"))q.bc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))q.cc=1*g.nodeValue;if(g=k.getAttributeNode("border"))q.Uh=1*g.nodeValue;if(g=k.getAttributeNode("bordercolor"))q.ec=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))q.dc=1*g.nodeValue;if(g=k.getAttributeNode("borderradius"))q.tj=1*g.nodeValue;if(g=k.getAttributeNode("wordwrap"))q.nj=1==g.nodeValue}if("polystyle"==k.nodeName&&this.Zd){if(g=k.getAttributeNode("mode"))this.I.mode=1*g.nodeValue;if(g= k.getAttributeNode("bordercolor"))this.I.ec=1*g.nodeValue;if(g=k.getAttributeNode("backgroundcolor"))this.I.cc=1*g.nodeValue;if(g=k.getAttributeNode("borderalpha"))this.I.dc=1*g.nodeValue;if(g=k.getAttributeNode("backgroundalpha"))this.I.bc=1*g.nodeValue;if(g=k.getAttributeNode("handcursor"))this.I.zf=1==g.nodeValue}g=void 0;"hotspot"==k.nodeName&&(g=new r.Oh(this),g.type="point",g.Yb(k),this.X.push(g));"polyhotspot"==k.nodeName&&(g=new r.Oh(this),g.type="poly",g.Yb(k),this.X.push(g));k=k.nextSibling}if("sounds"== f.nodeName||"media"==f.nodeName)for(k=f.firstChild;k;){if("sound"==k.nodeName&&!this.Qm)for(g=new r.ro(this),g.Yb(k),this.Nb||g.addElement(),q=0;qq;q++)(g=h.getAttributeNode("prev"+q+"url"))&&(this.qf[q]=String(g.nodeValue));if(g=h.getAttributeNode("tilevrurl"))this.zl=String(g.nodeValue);if(g=h.getAttributeNode("tilesize"))this.Dc=1*g.nodeValue;if(g=h.getAttributeNode("canvassize"))this.mg=Number(g.nodeValue);if(g=h.getAttributeNode("tilescale"))this.bf=1*g.nodeValue;if(g=h.getAttributeNode("leveltileurl"))this.v.mk=g.nodeValue;if(g=h.getAttributeNode("leveltilesize"))this.v.N=Number(g.nodeValue);if(g=h.getAttributeNode("levelbias"))this.v.Lm= Number(g.nodeValue);if(g=h.getAttributeNode("levelbiashidpi"))this.v.Mm=Number(g.nodeValue);g=h.getAttributeNode("overlap");this.Oa.V=0;this.Oa.pitch=0;g&&(this.v.Ea=Number(g.nodeValue));if(g=h.getAttributeNode("levelingroll"))this.Oa.V=Number(g.nodeValue);if(g=h.getAttributeNode("levelingpitch"))this.Oa.pitch=Number(g.nodeValue);this.Xa=0;(g=h.getAttributeNode("flat"))&&1==g.nodeValue&&(this.Xa=2);g=h.getAttributeNode("width");this.v.width=1*(g?g.nodeValue:1);g=h.getAttributeNode("height");this.v.height= 1*(g?g.nodeValue:this.v.width);this.F.src=[];this.v.levels=[];for(k=h.firstChild;k;){if("preview"==k.nodeName){if(g=k.getAttributeNode("color"))this.v.Pf=g.nodeValue;if(g=k.getAttributeNode("strip"))this.v.an=1==g.nodeValue}if("video"==k.nodeName){if(g=k.getAttributeNode("format"))"3x2"==g.nodeValue&&(this.F.format=14),"equirectangular"==g.nodeValue&&(this.F.format=1);if(g=k.getAttributeNode("flipy"))this.F.flipY=Number(g.nodeValue);if(g=k.getAttributeNode("startonload"))this.F.Mk=1==g.nodeValue; if(g=k.getAttributeNode("startmutedmobile"))this.F.Fn=1==g.nodeValue;if(g=k.getAttributeNode("bleed"))this.F.kf=Number(g.nodeValue);if(g=k.getAttributeNode("endaction"))this.F.De=String(g.nodeValue);if(g=k.getAttributeNode("targetview"))this.F.Qk=String(g.nodeValue);if(g=k.getAttributeNode("width"))this.F.width=Number(g.nodeValue);if(g=k.getAttributeNode("height"))this.F.height=Number(g.nodeValue);for(q=k.firstChild;q;)"source"==q.nodeName&&(g=q.getAttributeNode("url"))&&this.F.src.push(g.nodeValue.toString()), q=q.nextSibling}if("level"==k.nodeName){h=new r.el;g=k.getAttributeNode("width");h.width=1*(g?g.nodeValue:1);g=k.getAttributeNode("height");h.height=1*(g?g.nodeValue:h.width);if(g=k.getAttributeNode("preload"))h.cache=1==g.nodeValue;if(g=k.getAttributeNode("preview"))h.Se=1==g.nodeValue;h.U=Math.floor((h.width+this.v.N-1)/this.v.N);h.ea=Math.floor((h.height+this.v.N-1)/this.v.N);this.v.levels.push(h)}k=k.nextSibling}this.v.kk=this.v.levels.length}this.Af=!0;this.Fh&&(this.ia=this.hd=!1,this.vc||(this.O("dummy rendering"), this.vc=document.createElement("canvas"),this.vc.width=100,this.vc.height=100,this.vc.id="dummycanvas",this.L.appendChild(this.vc)),this.Pc());this.ia&&this.S&&(this.za.vm(this.bf),this.za.wm());this.hd&&(0y;y++){var ja=y%3*db+x.F.kf;var id=ja+db-2*x.F.kf;var tf=4;3>y&&(tf+=db);var ih=tf+db-2*x.F.kf;for(z=0;4>z;z++){la.x=-1;la.y=-1;la.z=1;for(var hh=0;hha.time&&this.J.da[b].timea.Qd;)a.Qd+=360;for(;180f;)f+=360;for(;180fa)for(;x<=l&&z>fa;)z=new r.Ec,z.sj(B,db,id,ja,x),z=z.y,x++;else x=1;x>=.8*l&&(w=x=Math.round(.8*l));0==x&&(x=1);fa=4==a.uh?120:this.Eg(a.uh);z=a.Yf;if(z>fa)for(;y>x&&z>fa;)z=new r.Ec,z.sj(B, db,id,ja,y),z=z.y,y--}B=new r.Uc;B.time=0;B.tb=0;B.value=a.le;B.type=1;B.xe=l/3;B.ye=a.rf?a.le:a.le+f/3;b.da.push(B);B=new r.Uc;B.time=0;B.tb=1;B.value=a.vh;B.type=1;B.xe=l/3;B.ye=a.rf?a.vh:a.vh+g/3;b.da.push(B);B=new r.Uc;B.time=0;B.tb=2;B.value=a.Pd;B.type=1;B.xe=l/3;B.ye=a.rf?a.Pd:a.Pd+h/3;b.da.push(B);B=new r.Uc;B.time=0;B.tb=3;B.value=a.uh;B.type=0;B.Eb=0;b.da.push(B);e&&(B=new r.Uc,B.time=x,B.tb=3,B.value=a.wd,B.type=0,B.Eb=y-x,b.da.push(B));B=new r.Uc;B.time=l;B.tb=0;B.value=a.le+f;B.type= 1;B.ve=2*l/3;B.we=a.Be&&!a.Ce?B.value:B.value-f/3;a.Ce&&(B.xe=l+q,B.ye=B.value+q/l*f);b.da.push(B);B=new r.Uc;B.time=l;B.tb=1;B.value=a.me;B.type=1;B.ve=2*l/3;B.we=a.Be&&!a.Ce?a.me:a.me-g/3;a.Ce&&(B.xe=l+q,B.ye=B.value+q/l*g);b.da.push(B);B=new r.Uc;B.time=w;B.tb=2;B.value=p;B.type=1;B.ve=2*w/3;B.we=a.Be?p:p-h/3;b.da.push(B);a.Ce&&(B=new r.Uc,B.time=l+k,B.tb=0,B.value=a.le+f,B.type=1,B.ve=l+k-q,B.we=a.le+f,b.da.push(B),B=new r.Uc,B.time=l+k,B.tb=1,B.value=a.me,B.type=1,B.ve=l+k-q,B.we=a.me,b.da.push(B)); this.xa.push(b);return b};c.prototype.os=function(){this.F.j&&this.F.j.play()};c.prototype.ps=function(){this.F.j&&(this.F.j.pause(),this.F.j.currentTime=0)};c.prototype.ns=function(){this.F.j&&this.F.j.pause()};c.prototype.Cr=function(a){this.F.j&&(0>a&&(a=0),a>this.F.j.duration&&(a=this.F.j.duration-.1),this.F.j.currentTime=a,this.update())};c.prototype.Wp=function(){return this.F.j?this.F.j.currentTime:0};c.prototype.Vp=function(){if(this.F.j)return this.F.j};c.prototype.Br=function(a){if(this.F.j){var b= !this.F.j.paused&&!this.F.j.ended,e=this.F.j.currentTime;this.F.j.pause();this.F.j.src=isNaN(parseInt(a,10))?String(a):this.F.src[parseInt(a,10)];b&&(this.F.j.onloadedmetadata=function(){this.currentTime=e;this.play();this.onloadedmetadata=null});this.F.j.currentTime=e}};c.prototype.ap=function(){this.Qm=!0};return c}();r.f=d})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=Eh;window.ggHasWebGL=Fh;window.pano2vrPlayer=ggP2VR.f;ggP2VR.f.prototype.getVersion=ggP2VR.f.prototype.mm; ggP2VR.f.prototype.readConfigString=ggP2VR.f.prototype.yk;ggP2VR.f.prototype.readConfigUrl=ggP2VR.f.prototype.cn;ggP2VR.f.prototype.readConfigUrlAsync=ggP2VR.f.prototype.Wq;ggP2VR.f.prototype.readConfigXml=ggP2VR.f.prototype.dn;ggP2VR.f.prototype.openUrl=ggP2VR.f.prototype.uk;ggP2VR.f.prototype.openNext=ggP2VR.f.prototype.dd;ggP2VR.f.prototype.goBack=ggP2VR.f.prototype.bq;ggP2VR.f.prototype.setMargins=ggP2VR.f.prototype.jr;ggP2VR.f.prototype.addListener=ggP2VR.f.prototype.addListener; ggP2VR.f.prototype.on=ggP2VR.f.prototype.addListener;ggP2VR.f.prototype.removeEventListener=ggP2VR.f.prototype.removeEventListener;ggP2VR.f.prototype.off=ggP2VR.f.prototype.removeEventListener;ggP2VR.f.prototype.detectBrowser=ggP2VR.f.prototype.El;ggP2VR.f.prototype.initWebGL=ggP2VR.f.prototype.ad;ggP2VR.f.prototype.getPercentLoaded=ggP2VR.f.prototype.Lp;ggP2VR.f.prototype.setBasePath=ggP2VR.f.prototype.fr;ggP2VR.f.prototype.getBasePath=ggP2VR.f.prototype.Xl;ggP2VR.f.prototype.setViewerSize=ggP2VR.f.prototype.zn; ggP2VR.f.prototype.getViewerSize=ggP2VR.f.prototype.Zp;ggP2VR.f.prototype.setSkinObject=ggP2VR.f.prototype.wr;ggP2VR.f.prototype.changeViewMode=ggP2VR.f.prototype.No;ggP2VR.f.prototype.getViewMode=ggP2VR.f.prototype.Xp;ggP2VR.f.prototype.changePolygonMode=ggP2VR.f.prototype.rl;ggP2VR.f.prototype.setPolygonMode=ggP2VR.f.prototype.rl;ggP2VR.f.prototype.getPolygonMode=ggP2VR.f.prototype.Np;ggP2VR.f.prototype.showOnePolyHotspot=ggP2VR.f.prototype.Bn;ggP2VR.f.prototype.hideOnePolyHotspot=ggP2VR.f.prototype.sm; ggP2VR.f.prototype.changePolyHotspotColor=ggP2VR.f.prototype.Lo;ggP2VR.f.prototype.toggleOnePolyHotspot=ggP2VR.f.prototype.Vr;ggP2VR.f.prototype.changeViewState=ggP2VR.f.prototype.Oo;ggP2VR.f.prototype.getViewState=ggP2VR.f.prototype.Yp;ggP2VR.f.prototype.setRenderFlags=ggP2VR.f.prototype.nr;ggP2VR.f.prototype.getRenderFlags=ggP2VR.f.prototype.Qp;ggP2VR.f.prototype.setMaxTileCount=ggP2VR.f.prototype.xn;ggP2VR.f.prototype.getVFov=ggP2VR.f.prototype.Tb;ggP2VR.f.prototype.setVFov=ggP2VR.f.prototype.Wi; ggP2VR.f.prototype.getHFov=ggP2VR.f.prototype.mp;ggP2VR.f.prototype.updatePanorama=ggP2VR.f.prototype.Eh;ggP2VR.f.prototype.isTouching=ggP2VR.f.prototype.Cm;ggP2VR.f.prototype.getIsMobile=ggP2VR.f.prototype.sp;ggP2VR.f.prototype.setIsMobile=ggP2VR.f.prototype.ir;ggP2VR.f.prototype.getIsTour=ggP2VR.f.prototype.tp;ggP2VR.f.prototype.getIsAutorotating=ggP2VR.f.prototype.pp;ggP2VR.f.prototype.getIsLoading=ggP2VR.f.prototype.rp;ggP2VR.f.prototype.getIsLoaded=ggP2VR.f.prototype.gi; ggP2VR.f.prototype.getIsTileLoading=ggP2VR.f.prototype.$l;ggP2VR.f.prototype.getLastActivity=ggP2VR.f.prototype.vp;ggP2VR.f.prototype.getPan=ggP2VR.f.prototype.Hg;ggP2VR.f.prototype.getPanNorth=ggP2VR.f.prototype.Ge;ggP2VR.f.prototype.getPanDest=ggP2VR.f.prototype.Kp;ggP2VR.f.prototype.getPanN=ggP2VR.f.prototype.em;ggP2VR.f.prototype.setPan=ggP2VR.f.prototype.Xe;ggP2VR.f.prototype.setPanNorth=ggP2VR.f.prototype.Gk;ggP2VR.f.prototype.changePan=ggP2VR.f.prototype.ql; ggP2VR.f.prototype.changePanLog=ggP2VR.f.prototype.Ko;ggP2VR.f.prototype.getTilt=ggP2VR.f.prototype.ii;ggP2VR.f.prototype.getTiltDest=ggP2VR.f.prototype.Rp;ggP2VR.f.prototype.setTilt=ggP2VR.f.prototype.Ye;ggP2VR.f.prototype.changeTilt=ggP2VR.f.prototype.sl;ggP2VR.f.prototype.changeTiltLog=ggP2VR.f.prototype.Mo;ggP2VR.f.prototype.getFov=ggP2VR.f.prototype.Vj;ggP2VR.f.prototype.getFovDest=ggP2VR.f.prototype.kp;ggP2VR.f.prototype.setFov=ggP2VR.f.prototype.We;ggP2VR.f.prototype.changeFov=ggP2VR.f.prototype.pl; ggP2VR.f.prototype.changeFovLog=ggP2VR.f.prototype.yj;ggP2VR.f.prototype.getRoll=ggP2VR.f.prototype.im;ggP2VR.f.prototype.setRoll=ggP2VR.f.prototype.Ui;ggP2VR.f.prototype.setPanTilt=ggP2VR.f.prototype.lr;ggP2VR.f.prototype.setPanTiltFov=ggP2VR.f.prototype.Ti;ggP2VR.f.prototype.setDefaultView=ggP2VR.f.prototype.gr;ggP2VR.f.prototype.setLocked=ggP2VR.f.prototype.setLocked;ggP2VR.f.prototype.setLockedMouse=ggP2VR.f.prototype.vn;ggP2VR.f.prototype.setLockedKeyboard=ggP2VR.f.prototype.un; ggP2VR.f.prototype.getLockedKeyboard=ggP2VR.f.prototype.xp;ggP2VR.f.prototype.setLockedWheel=ggP2VR.f.prototype.wn;ggP2VR.f.prototype.moveTo=ggP2VR.f.prototype.moveTo;ggP2VR.f.prototype.moveToEx=ggP2VR.f.prototype.Ei;ggP2VR.f.prototype.moveToDefaultView=ggP2VR.f.prototype.vq;ggP2VR.f.prototype.moveToDefaultViewEx=ggP2VR.f.prototype.wq;ggP2VR.f.prototype.addHotspotElements=ggP2VR.f.prototype.hl;ggP2VR.f.prototype.playSound=ggP2VR.f.prototype.fe;ggP2VR.f.prototype.playPauseSound=ggP2VR.f.prototype.$m; ggP2VR.f.prototype.playStopSound=ggP2VR.f.prototype.Uq;ggP2VR.f.prototype.pauseSound=ggP2VR.f.prototype.vk;ggP2VR.f.prototype.activateSound=ggP2VR.f.prototype.uo;ggP2VR.f.prototype.soundGetTime=ggP2VR.f.prototype.Gr;ggP2VR.f.prototype.soundSetTime=ggP2VR.f.prototype.Hr;ggP2VR.f.prototype.setMediaVisibility=ggP2VR.f.prototype.kr;ggP2VR.f.prototype.isPlaying=ggP2VR.f.prototype.isPlaying;ggP2VR.f.prototype.stopSound=ggP2VR.f.prototype.$i;ggP2VR.f.prototype.setVolume=ggP2VR.f.prototype.setVolume; ggP2VR.f.prototype.changeVolume=ggP2VR.f.prototype.Po;ggP2VR.f.prototype.removeHotspots=ggP2VR.f.prototype.jn;ggP2VR.f.prototype.getHotspotsVisible=ggP2VR.f.prototype.Yl;ggP2VR.f.prototype.getCurrentPerspective=ggP2VR.f.prototype.pd;ggP2VR.f.prototype.addHotspot=ggP2VR.f.prototype.wo;ggP2VR.f.prototype.updateHotspot=ggP2VR.f.prototype.ds;ggP2VR.f.prototype.removeHotspot=ggP2VR.f.prototype.Xq;ggP2VR.f.prototype.setActiveHotspot=ggP2VR.f.prototype.Uf;ggP2VR.f.prototype.getPointHotspotIds=ggP2VR.f.prototype.Mp; ggP2VR.f.prototype.getHotspot=ggP2VR.f.prototype.op;ggP2VR.f.prototype.setFullscreen=ggP2VR.f.prototype.Vf;ggP2VR.f.prototype.toggleFullscreen=ggP2VR.f.prototype.gj;ggP2VR.f.prototype.enterFullscreen=ggP2VR.f.prototype.bp;ggP2VR.f.prototype.exitFullscreen=ggP2VR.f.prototype.exitFullscreen;ggP2VR.f.prototype.getIsFullscreen=ggP2VR.f.prototype.qp;ggP2VR.f.prototype.startAutorotate=ggP2VR.f.prototype.Lr;ggP2VR.f.prototype.stopAutorotate=ggP2VR.f.prototype.Or;ggP2VR.f.prototype.toggleAutorotate=ggP2VR.f.prototype.Ur; ggP2VR.f.prototype.setAutorotateNodeFilter=ggP2VR.f.prototype.er;ggP2VR.f.prototype.startAnimation=ggP2VR.f.prototype.Kr;ggP2VR.f.prototype.createLayers=ggP2VR.f.prototype.xl;ggP2VR.f.prototype.removePanorama=ggP2VR.f.prototype.je;ggP2VR.f.prototype.getScreenResolution=ggP2VR.f.prototype.jm;ggP2VR.f.prototype.getMaxScreenResolution=ggP2VR.f.prototype.cm;ggP2VR.f.prototype.getNodeIds=ggP2VR.f.prototype.Fp;ggP2VR.f.prototype.getNodeUserdata=ggP2VR.f.prototype.Gg;ggP2VR.f.prototype.getNodeLatLng=ggP2VR.f.prototype.Wj; ggP2VR.f.prototype.getNodeTitle=ggP2VR.f.prototype.Ip;ggP2VR.f.prototype.getNodeDistance=ggP2VR.f.prototype.Ep;ggP2VR.f.prototype.getCurrentNode=ggP2VR.f.prototype.Uj;ggP2VR.f.prototype.getNextNode=ggP2VR.f.prototype.Dp;ggP2VR.f.prototype.getPrevNode=ggP2VR.f.prototype.Pp;ggP2VR.f.prototype.getLastVisitedNode=ggP2VR.f.prototype.wp;ggP2VR.f.prototype.getNodesWithTag=ggP2VR.f.prototype.dm;ggP2VR.f.prototype.getCurrentPointHotspots=ggP2VR.f.prototype.jp;ggP2VR.f.prototype.getPositionAngles=ggP2VR.f.prototype.Op; ggP2VR.f.prototype.getPositionRawAngles=ggP2VR.f.prototype.fm;ggP2VR.f.prototype.nodeVisited=ggP2VR.f.prototype.Bq;ggP2VR.f.prototype.clearVisitedNodes=ggP2VR.f.prototype.To;ggP2VR.f.prototype.setElementIdPrefix=ggP2VR.f.prototype.hr;ggP2VR.f.prototype.videoPanoPlay=ggP2VR.f.prototype.os;ggP2VR.f.prototype.videoPanoStop=ggP2VR.f.prototype.ps;ggP2VR.f.prototype.videoPanoPause=ggP2VR.f.prototype.ns;ggP2VR.f.prototype.getVideoPanoTime=ggP2VR.f.prototype.Wp;ggP2VR.f.prototype.setVideoPanoTime=ggP2VR.f.prototype.Cr; ggP2VR.f.prototype.getVideoPanoObject=ggP2VR.f.prototype.Vp;ggP2VR.f.prototype.setVideoPanoSource=ggP2VR.f.prototype.Br;ggP2VR.f.prototype.getMediaObject=ggP2VR.f.prototype.Bp;ggP2VR.f.prototype.registerVideoElement=ggP2VR.f.prototype.en;ggP2VR.f.prototype.disableSoundLoading=ggP2VR.f.prototype.ap;ggP2VR.f.prototype.setCrossOrigin=ggP2VR.f.prototype.setCrossOrigin;ggP2VR.f.prototype.setProjection=ggP2VR.f.prototype.Nc;ggP2VR.f.prototype.getProjection=ggP2VR.f.prototype.Sa; ggP2VR.f.prototype.changeProjection=ggP2VR.f.prototype.zj;ggP2VR.f.prototype.changeProjectionEx=ggP2VR.f.prototype.zj;ggP2VR.f.prototype.changeLensflares=ggP2VR.f.prototype.Jo;ggP2VR.f.prototype.setTransition=ggP2VR.f.prototype.yr;ggP2VR.f.prototype.getMapType=ggP2VR.f.prototype.Ap;ggP2VR.f.prototype.getMapDetails=ggP2VR.f.prototype.zp;ggP2VR.f.prototype.getNodeMapCoords=ggP2VR.f.prototype.Gp;ggP2VR.f.prototype.getNodeMapCoordsInPercent=ggP2VR.f.prototype.Hp; ggP2VR.f.prototype.getMapContainingNode=ggP2VR.f.prototype.yp;ggP2VR.f.prototype.getMapsContainingNode=ggP2VR.f.prototype.bm;ggP2VR.f.prototype.getMapIDs=ggP2VR.f.prototype.am;ggP2VR.f.prototype.addVariable=ggP2VR.f.prototype.zo;ggP2VR.f.prototype.setVariableOptions=ggP2VR.f.prototype.yn;ggP2VR.f.prototype.setVariableValue=ggP2VR.f.prototype.ke;ggP2VR.f.prototype.getVariableValue=ggP2VR.f.prototype.Up;ggP2VR.f.prototype.getGyroAvailable=ggP2VR.f.prototype.lp;ggP2VR.f.prototype.setUseGyro=ggP2VR.f.prototype.zr; ggP2VR.f.prototype.getUseGyro=ggP2VR.f.prototype.Sp;ggP2VR.f.prototype.getOS=ggP2VR.f.prototype.Jp;ggP2VR.f.prototype.getBrowser=ggP2VR.f.prototype.ip;ggP2VR.f.prototype.triggerEvent=ggP2VR.f.prototype.R;ggP2VR.f.prototype.requestRedraw=ggP2VR.f.prototype.Zq;ggP2VR.f.prototype.getWebGlContext=ggP2VR.f.prototype.$p;ggP2VR.f.prototype.getHasTouch=ggP2VR.f.prototype.np;ggP2VR.f.prototype.enterVR=ggP2VR.f.prototype.wg;ggP2VR.f.prototype.exitVR=ggP2VR.f.prototype.sf;ggP2VR.f.prototype.toggleVR=ggP2VR.f.prototype.Nn; ggP2VR.f.prototype.isInVR=ggP2VR.f.prototype.Rg;ggP2VR.f.prototype.hasVR=ggP2VR.f.prototype.dk;ggP2VR.f.prototype.getVRDisplayName=ggP2VR.f.prototype.Tp;ggP2VR.f.prototype.setVRFrameBufferScaleFactor=ggP2VR.f.prototype.Ar;