////////////////////////////////////////////////////////////////////// // Pano2VR 6.0/17213 HTML5/CSS3 & WebGL Panorama Player // // License: BKYM.COM // // (c) 2018, Garden Gnome Software, http://ggnome.com // ////////////////////////////////////////////////////////////////////// var G="function"==typeof Object.defineProperties?Object.defineProperty:function(n,e,g){n!=Array.prototype&&n!=Object.prototype&&(n[e]=g.value)},N="undefined"!=typeof window&&window===this?this:"undefined"!=typeof global&&null!=global?global:this;function O(n,e){if(e){var g=N;n=n.split(".");for(var c=0;cg&&(g=Math.max(0,b+g));if(null==c||c>b)c=b;c=Number(c);0>c&&(c=Math.max(0,b+c));for(g=Number(g||0);gc;)c+= 360;for(;180r&&(r=a.f.c);this.Rb||(this.Rb=new n.wa,this.Rb.Ik(this.pan,this.i));0!=this.mode&&1!=this.mode||!d||this.ed&&this.ed.gain.setValueAtTime(this.level*a.V*this.la,d.currentTime);if(2==this.mode&&d){var f=.5*Math.cos(c*Math.PI/180)+.5;this.Vc=Math.sqrt(f)*this.la*this.level*a.V;this.Wc=Math.sqrt(f)*this.la*this.level*a.V;this.Ec=Math.sqrt(1-f)*this.la*this.level*a.V;this.Fc=Math.sqrt(1-f)*this.la*this.level*a.V;this.Rg()}if(3==this.mode){0> c?c<-this.tb?c+=this.tb:c=0:c=c>this.tb?c-this.tb:0;var m=this.level;b=Math.abs(b);b=br||0>g)f=m*k*a.V,d?(this.Vc=f*this.la,this.Wc=f*this.la,this.Fc=this.Ec=0,this.Rg()):this.b.volume=m*k*a.V;else if(f=1-Math.abs(c/r),d){var e=m*(k+(1-k)*g*f)*a.V;f=m*k*a.V;0<=c?(this.Vc=e*this.la,this.Wc=f*this.la):(this.Vc=f*this.la,this.Wc=e*this.la);2*Math.abs(c)c?c=c>-this.tb?0:c+this.tb:c=c no audio buffer -> playWhenReady"),this.xj=!0)};b.prototype.Hi=function(){var a=this.g.xa.currentTime-this.Vg;this.Te();this.ze=a};b.prototype.Te=function(){this.Gb&&this.Be&&(this.stopped=!0,this.Gb.disconnect(),this.Gb.stop(0),this.Gb=null);this.Vg=this.ze=0;this.Be=!1};b.prototype.cn=function(){var a=this.g.xa;return this.ze?this.ze:this.Vg?a.currentTime-this.Vg:0};b.prototype.dn=function(a){this.Te();this.ze=a;this.Zc()};b.prototype.addElement=function(){var a= -1,d=this,b=this.g,c=this.g.xa;try{for(var k=!1,r=0;ra.loop&&(a.b.preload="none"));a.b.volume=a.level*d.V;1<=a.loop&&(a.sc=a.loop-1);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.b.autoplay=!0,a.sl=!0,a.autoplay=!0,(this.g.Ac||this.g.Td)&&this.g.eg&&this.Nj&&a.b.setAttribute("muted","muted"));d.I.push(this);d.fh?d.T.appendChild(a.b):(a.b.style.position="absolute",a.Jc&&(a.b.width=a.Jc),a.gd&&(a.b.height=a.gd),d.D.appendChild(a.b),(this.g.Ac||this.g.Td)&&this.g.eg&&this.Nj?this.ak=!0:a.nh());a.b.addEventListener("ended", function(){a.mq()},!1)}catch(k){d.M(k)}};b.prototype.registerElement=function(a,d){this.nd=!0;this.b=d;this.id=a;this.level=1;this.g.I.push(this)};b.prototype.Fd=function(){var a=this.g;a.fh&&(a.H.deleteTexture(this.oc),this.oc=0,a.T.removeChild(this.b));a.Am&&a.D.removeChild(this.b);this.b=null};return b}(g);n.gk=g;g=function(c){function b(a){a=c.call(this,a)||this;a.url="";a.va=0;a.Da=0;a.kb=0;a.f=50;a.Ua=0;a.sg=!1;a.Jc=100;a.gd=100;a.xd=1;return a}__extends(b,c);b.prototype.Ob=function(a){c.prototype.Ob.call(this, a);var d;if(d=a.getAttributeNode("url"))this.url=d.nodeValue.toString();if(d=a.getAttributeNode("rotx"))this.va=Number(d.nodeValue);if(d=a.getAttributeNode("roty"))this.Da=Number(d.nodeValue);if(d=a.getAttributeNode("rotz"))this.kb=Number(d.nodeValue);if(d=a.getAttributeNode("fov"))this.f=Number(d.nodeValue);if(d=a.getAttributeNode("width"))this.Jc=Number(d.nodeValue);if(d=a.getAttributeNode("height"))this.gd=Number(d.nodeValue);this.xd=(d=a.getAttributeNode("stretch"))?Number(d.nodeValue):1;if(d= a.getAttributeNode("clickmode"))this.Ua=Number(d.nodeValue);if(d=a.getAttributeNode("handcursor"))this.sg=1==Number(d.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(d=a.getAttributeNode("url"))&&(this.url=d.nodeValue.toString()),a=a.nextSibling};b.prototype.pg=function(){this.ng=!1;this.b.style[this.g.dd]="none"};b.prototype.re=function(){1!==this.Ua&&4!==this.Ua||this.og(!this.eb)};b.prototype.og=function(a){var d=this.g;if(1===this.Ua||4===this.Ua)this.eb=a,this.g.Fb?(a=this.g.ia)&&a.activateSound(this.id, this.eb?1:0):(this.eb?(this.b.style.pointerEvents="auto",this.b.style.cursor="pointer",this.b.style.zIndex=(d.jh+8E4).toString()):(this.b.style.pointerEvents="none",this.b.style.cursor="default",this.b.style.zIndex=d.jh.toString()),this.b.style[d.dd]="all 1s ease 0s",this.ng=!0,d.um())};b.prototype.addElement=function(){var a=this,d=this.g;try{a.b=document.createElement("img");a.b.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.b.setAttribute("class","ggmedia"); a.b.hidden=!0;a.b.addEventListener("click",function(a){a.stopPropagation()});d.ff&&a.b.setAttribute("id",d.ff+a.id);a.b.ondragstart=function(){return!1};if(1===a.Ua||4===a.Ua)a.b.addEventListener(d.Gm(),function(){a.pg()},!1),a.b.addEventListener("transitionend",function(){a.pg()},!1);a.b.setAttribute("src",d.kc(a.url));a.Jc&&(a.b.width=a.Jc);a.gd&&(a.b.height=a.gd);d.Sa.push(a);a.b.style.position="absolute";d.D.appendChild(a.b)}catch(h){d.M("Error addimage:"+h)}};b.prototype.Fd=function(){this.g.D.removeChild(this.b); this.b=null};return b}(e);n.Pm=g;e=function(c){function b(a){a=c.call(this,a)||this;a.mk=50;a.alpha=50;a.type=0;a.color=16777215;return a}__extends(b,c);b.prototype.Ob=function(a){c.prototype.Ob.call(this,a);var d;if(d=a.getAttributeNode("blinding"))this.mk=Number(d.nodeValue);if(d=a.getAttributeNode("alpha"))this.alpha=Number(d.nodeValue);if(d=a.getAttributeNode("type"))this.type=Number(d.nodeValue);if(d=a.getAttributeNode("color"))this.color=Number(d.nodeValue)};return b}(e);n.Qm=e;e=function(){function c(b){this.type= "empty";this.Lj=this.id=this.target=this.description=this.title=this.url="";this.ih=100;this.rg=20;this.zi=!1;this.b=null;this.vb=this.Nb=this.nb=this.pa=this.i=this.pan=0;this.visible=!0;this.hc=b.A.hc;this.ec=b.A.ec;this.gc=b.A.gc;this.dc=b.A.dc;this.cf=b.A.cf;this.Nf=[]}c.prototype.Ze=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.i;this.url=this.url;this.target=this.target;this.title=this.title;this.description=this.description;this.skinid=this.Lj;this.obj=this.b};c.prototype.Ob= function(b){var a;if(a=b.getAttributeNode("url"))this.url=a.nodeValue.toString();if(a=b.getAttributeNode("target"))this.target=a.nodeValue.toString();if(a=b.getAttributeNode("title"))this.title=a.nodeValue.toString();if(a=b.getAttributeNode("description"))this.description=a.nodeValue.toString();if(a=b.getAttributeNode("id"))this.id=a.nodeValue.toString();if(a=b.getAttributeNode("skinid"))this.Lj=a.nodeValue.toString();if(a=b.getAttributeNode("width"))this.ih=Number(a.nodeValue);if(a=b.getAttributeNode("height"))this.rg= Number(a.nodeValue);if(a=b.getAttributeNode("wordwrap"))this.zi=1==Number(a.nodeValue);this.pan=(a=b.getAttributeNode("pan"))?Number(a.nodeValue):0;this.i=(a=b.getAttributeNode("tilt"))?Number(a.nodeValue):0;if(a=b.getAttributeNode("bordercolor"))this.hc=Number(a.nodeValue);if(a=b.getAttributeNode("backgroundcolor"))this.ec=Number(a.nodeValue);if(a=b.getAttributeNode("borderalpha"))this.gc=Number(a.nodeValue);if(a=b.getAttributeNode("backgroundalpha"))this.dc=Number(a.nodeValue);if(a=b.getAttributeNode("handcursor"))this.cf= 1==Number(a.nodeValue);for(b=b.firstChild;b;){if("polystring"==b.nodeName){a=b.textContent.toString().split("|");for(var d=0;db;b++)2>b%3&&(l[b]*=c);h.bufferData(h.ARRAY_BUFFER,new Float32Array(l),h.STATIC_DRAW);this.je=h.createBuffer();h.bindBuffer(h.ARRAY_BUFFER,this.je);var k=[1,0,0,0,0,1,1,1];h.bufferData(h.ARRAY_BUFFER,new Float32Array(k),h.STATIC_DRAW);this.ad=h.createBuffer();h.bindBuffer(h.ELEMENT_ARRAY_BUFFER, this.ad);var r=[0,1,2,0,2,3];h.bufferData(h.ELEMENT_ARRAY_BUFFER,new Uint16Array(r),h.STATIC_DRAW);l=[];r=[];k=[];var f=new n.wa;for(c=0;6>c;c++){var e=c%3;var g=3>c?1:0;for(a=0;4>a;a++){f.x=-1;f.y=-1;f.z=1;for(b=0;bf.x?.33:0)+.33*e,(0>f.y?0:.5)+.5*g);if(4>c)for(b=0;ba;a++){var d=b.createTexture();this.hd++; d.qf=null;d.ve=null;d.fl=!1;b.bindTexture(b.TEXTURE_2D,d);b.texImage2D(b.TEXTURE_2D,0,b.RGB,1,1,0,b.RGB,b.UNSIGNED_BYTE,null);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);if(c.Xe[a]){var h=new Image;h.crossOrigin=c.crossOrigin;h.src=c.kc(c.Xe[a]);d.qf=h;h.addEventListener&&h.addEventListener("load",this.fj(d),!1);c.Sb.push(h)}this.Va.push(d)}for(a=0;6>a;a++)c.th[a]&& (h=new Image,h.crossOrigin=c.crossOrigin,h.src=c.kc(c.th[a]),h.addEventListener?h.addEventListener("load",this.fj(this.Va[a]),!1):h.onload=this.fj(this.Va[a]),this.Va[a].ve=h,c.Sb.push(h));for(a=0;ac;c++)this.Df(c),b.bindBuffer(b.ARRAY_BUFFER,this.Qi),b.vertexAttribPointer(this.F.Z,3,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER,this.je),b.vertexAttribPointer(this.F.Ca,2,b.FLOAT,!1,0,0),6<=this.Va.length&&this.Va[c].loaded&&(b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Va[c]),b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.ad),b.uniform1i(this.F.wf,0),b.uniformMatrix4fv(this.F.Jg,!1,this.ma),b.uniformMatrix4fv(this.F.Wd, !1,this.sb),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0))}};e.prototype.ti=function(){var c=this.g;if(c.h.sf&&6>16&255)/255,(b>>8&255)/255,(b>>0&255)/255,1)}};e.prototype.Df=function(c,b){void 0===b&&(b=1);var a=this.g;n.$.te(this.ma);n.$.rotate(this.ma,b*-a.O.c*Math.PI/180,[0,0,1]);n.$.rotate(this.ma,b*-a.i.c*Math.PI/180,[1,0,0]);-1==b?n.$.rotate(this.ma,-a.pan.c*Math.PI/180,[0,1,0]):n.$.rotate(this.ma,(180-a.pan.c)*Math.PI/180,[0,1,0]); a.$a&&(n.$.rotate(this.ma,-a.$a.pitch*Math.PI/180,[1,0,0]),n.$.rotate(this.ma,a.$a.O*Math.PI/180,[0,0,1]));4>c?n.$.rotate(this.ma,-Math.PI/2*c,[0,1,0]):n.$.rotate(this.ma,Math.PI/2*(5==c?1:-1),[1,0,0])};e.prototype.Vp=function(c){var b=this;return function(){b.Vi.push(c)}};e.prototype.sn=function(c){this.g.Ea=!0;this.g.bd=!0;c.loaded=!0;c.Dj=0;c.Yd=0;var b=this.g.H;this.Ak();b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1);if(null!=c.h&&c.h.complete){c.gb=b.createTexture();this.g.hd++;b.bindTexture(b.TEXTURE_2D, c.gb);try{b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,c.h)}catch(a){b.texImage2D(b.TEXTURE_2D,0,b.RGBA,1,1,0,b.RGBA,b.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.g.M(a)}}this.g.update(2)};e.prototype.Ak=function(){this.g.Qb&&this.g.Qb--};e.prototype.tn=function(){if(0l;l++){var k=new n.Kd;k.K=document.createElement("canvas");b.g.Y?(k.K.width=d.width+2*h,k.K.height=d.height+2*h):(k.K.width=a.G+2*h,k.K.height=a.G+2*h);k.Pa=k.K.getContext("2d");k.K.style[b.g.Ra+"Origin"]="0% 0%";k.K.style.overflow="hidden";k.K.style.position="absolute";k.h=c;var r=d.width+2*h,f=d.height+2*h;k.Pa&&k.Pa.drawImage(c,0,l*f,r,f,0,0,r,f);if(b.g.Y&&b.g.H){var e=b.g.H;e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);k.gb=e.createTexture();b.g.hd++;e.bindTexture(e.TEXTURE_2D, k.gb);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,k.K)}catch(y){b.g.M(y)}e.bindTexture(e.TEXTURE_2D,null);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,0)}b.g.Uc&&(k.K.Sd=-1,b.g.D.insertBefore(k.K,b.g.D.firstChild));d.U[l]=k}d.loaded=!0}}catch(y){b.g.M(y)}b.g.update(2)}};e.prototype.qm=function(c){var b=this;return function(){b.g.Ea=!0;b.g.bd=!0;b.Ak();c.h=null}};e.prototype.qq=function(){var c=this.g,b=c.h,a=c.h.J;c.ne&&(c.Kc(0),c.Tc());if(c.H){var d=c.H;d.useProgram(this.F);this.ti();d.clear(d.DEPTH_BUFFER_BIT); d.enable(d.DEPTH_TEST);n.$.te(this.sb);n.$.perspective(c.Jb(),c.rb.width/c.rb.height,.1,100,this.sb);d.uniformMatrix4fv(this.F.Wd,!1,this.sb);c.wm();c.qj();var h=c.Yi();var l=a.length-1;for(c.pc=0;l>=h;){var k=a[l],r=1;l==a.length-1&&0==b.Ja&&(r=b.G/(b.G-.5));for(var f=0;6>f;f++){var e=c.ob.cb[f];var g=e.nf;if(e.fb&&0A;A++)x[A]=0==A%3?r*v*(-2*x[A]/k.width+1):1==A%3?r*v*(-2*x[A]/k.height+ 1):v;d.bufferData(d.ARRAY_BUFFER,new Float32Array(x),d.STATIC_DRAW)}}else g=!1;u.visible=e.fb}p.oj=g}}l--}for(f=0;6>f;f++)if(e=c.ob.cb[f],e.fb)for(g=e.nf,this.Df(f),d.uniform1i(this.F.wf,0),d.uniformMatrix4fv(this.F.Wd,!1,this.sb),d.uniformMatrix4fv(this.F.Jg,!1,this.ma),d.enableVertexAttribArray(this.F.Z),d.enableVertexAttribArray(this.F.Ca),d.bindBuffer(d.ARRAY_BUFFER,this.je),d.vertexAttribPointer(this.F.Ca,2,d.FLOAT,!1,0,0),d.activeTexture(d.TEXTURE0),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,this.ad), d.useProgram(this.F),l=h;l<=a.length-1;){k=a[l];if(e.fb&&0l?A.Ce(-90*l):A.Gd(5==l?90:-90);r.$a&&(A.De(r.$a.O),A.Gd(-r.$a.pitch));A.Ce(-r.pan.c);A.Gd(r.i.c);A.De(r.O.c);for(l=0;l<=h;l++)for(var w= 0;w<=h;w++){var B=2*(g+w*p)-1;var z=2*(a+l*q)-1;x.x=1*B;x.y=1*z;x.z=-1;x.normalize();A.Ko(x);B=this.Yk(x,f,r.ra());0!=r.nc&&1>u&&(B=B&&this.Yk(x,t,r.nc),f.x=f.x*u+t.x*(1-u),f.y=f.y*u+t.y*(1-u));B?-1E10f.x&&-1E10f.y?-2f.x&&-2f.y&&(b+=f.x,d+=f.y,v++):f.x=NaN:f.x=NaN;c.jd[c.Eh++]=f.x;c.jd[c.Eh++]=f.y}0r;r++)isNaN(c.jd[2*d[0]])&&(h=!1);if(h){var f=!1,e=!1,g=!1,p=!1;for(r=0;4>r;r++){var n=c.jd[2*d[r]];nq;q++)for(var t=0;t=l;){var x={};e=a[r];var A=null;0>g-r),q,-(0!=c.nc)?.3:.1);z.visible=0c.f.c&&rc.we){c.M("Excided painted tiles");this.li=!1;break}z.gb&&(f=q=b.G,v==e.L-1&&(q=e.width-b.G*v),t==e.ea-1&&(f=e.height-b.G*t),q=(q+2*b.Ja)/b.G,f=(f+2*b.Ja)/b.G,d.bindTexture(d.TEXTURE_2D,z.gb),d.uniform2f(d.getUniformLocation(h,"uCanvasDimensions"),c.o.width,c.o.height),g=d.getUniformLocation(h,"srcScale"),d.uniform2f(g,.5*e.width/b.G/q,.5*e.height/b.G/f), g=d.getUniformLocation(h,"srcOffset"),d.uniform2f(g,(.5*e.width+b.Ja-b.G*v)/b.G/q,-(.5*e.height+b.Ja-b.G*t)/b.G/f+1),g=d.getUniformLocation(h,"zOffset"),d.uniform1f(g,(r+1)/(a.length+5)),q=d.getAttribLocation(h,"aVertexPosition"),d.disableVertexAttribArray(0),d.disableVertexAttribArray(1),d.disableVertexAttribArray(2),d.enableVertexAttribArray(q),d.activeTexture(d.TEXTURE0),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_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),d.bindBuffer(d.ARRAY_BUFFER,this.vo),d.vertexAttribPointer(q,2,d.FLOAT,!1,0,0),d.bufferData(d.ARRAY_BUFFER,new Float32Array(z.jd),d.DYNAMIC_DRAW),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,this.uo),d.bufferData(d.ELEMENT_ARRAY_BUFFER,new Uint16Array(z.se),d.DYNAMIC_DRAW),d.drawElements(d.TRIANGLES,z.yd,d.UNSIGNED_SHORT,0),k++)}r++}d.disable(d.CULL_FACE);d.cullFace(d.FRONT_AND_BACK);c.bd=!1}};e.prototype.ui=function(c, b){var a=this.g.H;n.$.te(this.ma);this.Df(c,-1);a.uniformMatrix4fv(a.getUniformLocation(b,"matRotate"),!1,this.ma)};e.prototype.Vo=function(){var c=this.g;if(c.H){var b=c.H,a=this.Wl;b.useProgram(a);this.ui(0,a);b.uniform2f(b.getUniformLocation(a,"uCanvasDimensions"),c.o.width,c.o.height);if(1==c.s.format){var d=b.getUniformLocation(a,"srcScale");b.uniform2f(d,-.5/Math.PI,(c.s.bj?-1:1)/Math.PI)}14==c.s.format&&(d=b.getUniformLocation(a,"srcScale"),b.uniform2f(d,1-2*c.s.Qe/(c.s.width/3),1-2*c.s.Qe/ (c.s.height/2)));d=b.getUniformLocation(a,"srcOffset");b.uniform2f(d,.5,.5);this.Vj(a);d=b.getUniformLocation(a,"cubeTexture");b.uniform1i(d,0);d=b.getAttribLocation(a,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(d);b.bindBuffer(b.ARRAY_BUFFER,this.ci);b.vertexAttribPointer(d,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,c.s.oc);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.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.ad);b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)}};e.prototype.Vj=function(c){var b=this.g,a=b.H,d=this.g.o,h=d.width/d.height;switch(b.f.mode){case 1:h=1;break;case 2:h=d.width/Math.sqrt(d.width*d.width+d.height*d.height);break;case 3:4*d.height/3k;k++)this.Va[k].ve.complete?this.sh[k]||(l=!0):d=!1,this.Va[k].qf.complete||(h=!1);if(h||d)if(!h||d||!this.yc||l){k=Math.round(c.qc/c.Gf);h=(c.qc-k)/2;c.M("paint cube single - isMain: "+d+" overlap: "+h);this.We=0;this.yc||(this.yc=b.createTexture());c.hd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.yc);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE);b.texParameteri(b.TEXTURE_CUBE_MAP,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE);b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL, 1);l=document.createElement("canvas");l.width=k;l.height=k;var e=l.getContext("2d");for(k=0;6>k;k++){var f=a[k];this.Va[f].ve.complete?this.sh[f]||(e.drawImage(this.Va[f].ve,-h,-h),b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,l),this.sh[f]=!0):(e.drawImage(this.Va[f].qf,-h,-h,c.qc,c.qc),b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+k,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,l))}this.vg=!d}};e.prototype.qn=function(){var c=this.g,b=this.g.h,a=c.h.J,d=c.H,h;var l=a.length-1;if(!(0> l)){a[l].rf&&l--;var k=512;c.ug&&(k=256);!c.vf&&2<=c.devicePixelRatio&&(k=512);for((h=d.getParameter(d.MAX_CUBE_MAP_TEXTURE_SIZE))&&hl){k=a[l];c.M("paint cube level "+l);this.We=l;a=c.h.Ja;l=0k.width&&(1500m;m++){for(var g=0;gh;h++)for(var l=0;lb;b++)for(var a=0;a1.1*c.om)for(this.Qd.sort(function(a,d){return d.zg-a.zg});this.Qd.length>c.om;)e=this.Qd.pop(),e.gb&&(a.deleteTexture(e.gb),c.hd--,e.gb=0),e.h=null,e.bf&&(a.deleteBuffer(e.bf),e.bf=0),k=e.level.U.indexOf(e),c.M("delete "+k+" "+(d-e.zg)),delete e.level.U[k]}; e.prototype.kq=function(){var c=this.g;if(c.H){var b=this.g.H;b.disable(b.DEPTH_TEST);var a;for(a=0;ab;b++)this.Df(0),a.bindBuffer(a.ARRAY_BUFFER,c.s.Zj),a.vertexAttribPointer(this.F.Z,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,c.s.ni),a.vertexAttribPointer(this.F.Ca,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,c.s.jj),a.uniform1i(this.F.wf,0),a.uniformMatrix4fv(this.F.Jg,!1,this.ma),a.uniformMatrix4fv(this.F.Wd, !1,this.sb),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};e.prototype.iq=function(){var c=this.g,b=c.H,a=c.s;if(0=a.A.mode&&(h=0);3==a.A.mode&& (h=a.A.pa);for(c=0;c>16&255)/255,(b>>8&255)/255,(b&255)/255);var m=d.getUniformLocation(this.Dd,"uAlpha");d.uniform1f(m,l.gc*e);d.vertexAttribPointer(this.Dd.Z,3,d.FLOAT,!1,0,0);d.drawArrays(d.LINE_LOOP,0,f.length/3);b=l.ec;d.uniform3f(k,(b>>16&255)/255,(b>>8&255)/255,(b&255)/255);d.uniform1f(m,l.dc*e);d.enable(d.STENCIL_TEST);d.clearStencil(0);d.clear(d.STENCIL_BUFFER_BIT);d.colorMask(!1,!1,!1,!1);d.stencilFunc(d.ALWAYS, 1,1);d.stencilOp(d.INCR,d.INCR,d.INCR);d.drawArrays(d.TRIANGLE_FAN,0,f.length/3);d.colorMask(!0,!0,!0,!0);d.stencilFunc(d.EQUAL,1,1);d.stencilOp(d.ZERO,d.ZERO,d.ZERO);d.drawArrays(d.TRIANGLE_FAN,0,f.length/3);d.disable(d.BLEND);d.enable(d.DEPTH_TEST);d.disable(d.STENCIL_TEST);d.useProgram(this.F)}}}}};e.prototype.Uj=function(){var c=this.g,b=c.h;if(c.o.width!=c.D.offsetWidth||c.o.height!=c.D.offsetHeight)c.o.width=c.D.offsetWidth,c.o.height=c.D.offsetHeight;c.ne&&(c.Kc(0),c.Tc());if(c.H){var a=c.H; this.ti();a.clear(a.COLOR_BUFFER_BIT|a.DEPTH_BUFFER_BIT);a.disable(a.DEPTH_TEST);a.disable(a.CULL_FACE);a.useProgram(this.fg);var d=a.getUniformLocation(this.fg,"uRect");a.uniform2f(a.getUniformLocation(this.fg,"uCanvasDimensions"),c.o.width,c.o.height);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.ad);var h=a.getAttribLocation(this.fg,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(h);a.bindBuffer(a.ARRAY_BUFFER, this.je);a.vertexAttribPointer(h,2,a.FLOAT,!1,0,0);c.pc=0;var l=100/c.f.c;var k=b.width/b.height;h=c.o.height*l*k;l*=c.o.height;k=(c.pan.c/100/k-.5)*h+c.o.width/2;for(var e=(c.i.c/100-.5)*l+c.o.height/2,f,m,g,p=0;b.J.length>=p+2&&b.J[p+1].width>h;)p++;var q;var t=[];for(q=b.J.length-1;q>=p;){var v=b.J[q];if(v.cache){var u={Ya:0,zb:0};u.Bb=v.L-1;u.Cb=v.ea-1}else{u={};f=-e/l*(v.height/c.h.G);m=(-k+c.o.width)/h*(v.width/c.h.G);var x=(-e+c.o.height)/l*(v.height/c.h.G);u.Ya=Math.min(Math.max(0,Math.floor(-k/ h*(v.width/c.h.G))),v.L-1);u.zb=Math.min(Math.max(0,Math.floor(f)),v.ea-1);u.Bb=Math.min(Math.max(0,Math.floor(m)),v.L-1);u.Cb=Math.min(Math.max(0,Math.floor(x)),v.ea-1)}t[q]=u;var A=!0;for(m=u.zb;m<=u.Cb;m++)for(f=u.Ya;f<=u.Bb;f++)g=f+m*v.L,x=v.U[g],x||(x=new n.Kd,v.U[g]=x),this.wh()?x.h||(this.Ph(x,v,c.He(0,q,f,m)),c.Ea=!0):this.g.pc++,x.h&&x.h.complete||(A=!1),x.visible=!0;u.oj=A;q--}for(q=b.J.length-1;q>=p;){v=b.J[q];if(t[q]&&0<=t[q].Ya)for(u=t[q],m=u.zb;m<=u.Cb;m++)for(f=u.Ya;f<=u.Bb;f++)g=f+ m*v.L,(x=v.U[g])&&x.h&&x.h.complete&&(c=k+(-b.Ja+b.G*f)*h/v.width,a.uniform4f(d,c,e+(-b.Ja+b.G*m)*l/v.height,x.h.width*h/v.width,x.h.height*l/v.height),x&&x.gb&&(a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.ad),a.bindTexture(a.TEXTURE_2D,x.gb),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)));q--}this.Ej()}};e.prototype.di=function(){var c=this.g.H;if(c&&this.Va)for(;0b;b++)this.cb[b]=new e}c.prototype.nn=function(b,a,d,c){for(var h=0;6>h;h++){var k;if(k=this.cb[h]){var e=[];e.push(new n.wa(-1,-1,-1,0,0));e.push(new n.wa(1,-1,-1,1,0));e.push(new n.wa(1,1,-1,1,1));e.push(new n.wa(-1,1,-1,0,1));for(var f=0;fh?e[f].Da(-Math.PI/2*h):e[f].va(Math.PI/2*(4===h?-1:1)),c&&(e[f].kb(c.O* Math.PI/180),e[f].va(-c.pitch*Math.PI/180)),e[f].Da(-b*Math.PI/180),e[f].va(a*Math.PI/180),e[f].kb(d*Math.PI/180);k.fb=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"); c.compileShader(a);c.getShaderParameter(a,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(a)),a=null);this.Ha=c.createProgram();c.attachShader(this.Ha,b);c.attachShader(this.Ha,a);c.linkProgram(this.Ha);c.getProgramParameter(this.Ha,c.LINK_STATUS)||alert("Could not initialise shaders");this.Ha.Z=c.getAttribLocation(this.Ha,"aVertexPosition");c.enableVertexAttribArray(this.Ha.Z);this.Ha.Ca=c.getAttribLocation(this.Ha,"aTextureCoord");c.enableVertexAttribArray(this.Ha.Ca);a=c.createShader(c.FRAGMENT_SHADER); c.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"); c.compileShader(a);c.getShaderParameter(a,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(a)),a=null);this.Na=c.createProgram();c.attachShader(this.Na,b);c.attachShader(this.Na,a);c.linkProgram(this.Na);c.getProgramParameter(this.Na,c.LINK_STATUS)||alert("Could not initialise shaders");this.Na.Z=c.getAttribLocation(this.Na,"aVertexPosition");c.enableVertexAttribArray(this.Na.Z);this.Na.Ca=c.getAttribLocation(this.Na,"aTextureCoord");c.enableVertexAttribArray(this.Na.Ca)};e.prototype.Kc=function(){var c= this.g.H;if(!c)return!1;if(this.ac=c.createFramebuffer()){c.bindFramebuffer(c.FRAMEBUFFER,this.ac);this.ac.width=1024;this.ac.height=1024;this.Ke=c.createTexture();c.bindTexture(c.TEXTURE_2D,this.Ke);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR);c.texImage2D(c.TEXTURE_2D,0,c.RGBA,this.ac.width,this.ac.height,0,c.RGBA,c.UNSIGNED_BYTE,null);var b=c.createRenderbuffer();c.bindRenderbuffer(c.RENDERBUFFER,b);c.renderbufferStorage(c.RENDERBUFFER, c.DEPTH_COMPONENT16,this.ac.width,this.ac.height);c.framebufferTexture2D(c.FRAMEBUFFER,c.COLOR_ATTACHMENT0,c.TEXTURE_2D,this.Ke,0);c.framebufferRenderbuffer(c.FRAMEBUFFER,c.DEPTH_ATTACHMENT,c.RENDERBUFFER,b);c.bindTexture(c.TEXTURE_2D,null);c.bindRenderbuffer(c.RENDERBUFFER,null);c.bindFramebuffer(c.FRAMEBUFFER,null);this.jb=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.jb);c.bufferData(c.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),c.STATIC_DRAW);this.jb.Mc=3;this.jb.Vd=4;this.tf= c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.tf);c.bufferData(c.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),c.STATIC_DRAW);return!0}return!1};e.prototype.Ll=function(c){var b=this.g.H,a=this.g.rb;if(this.Jd){b.useProgram(this.oa);b.bindBuffer(b.ARRAY_BUFFER,this.jb);b.vertexAttribPointer(this.oa.Z,this.jb.Mc,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.tf);b.vertexAttribPointer(this.oa.Ca,2,b.FLOAT,!1,0,0);b.enableVertexAttribArray(this.oa.Z);b.enableVertexAttribArray(this.oa.Ca);b.activeTexture(b.TEXTURE0); b.bindTexture(b.TEXTURE_2D,this.Ke);a=1+(this.yb-1)*c;var d=b.getUniformLocation(this.oa,"uAlpha");b.uniform1f(d,1);d=b.getUniformLocation(this.oa,"uZoomIn");b.uniform1i(d,1);d=b.getUniformLocation(this.oa,"uZoomCenter");var h=.5+(this.kh-.5)*Math.sqrt(c),l=.5+(this.lh-.5)*Math.sqrt(c);0>h-.5/a&&(h=.5/a);0>l-.5/a&&(l=.5/a);1h-.5/this.yb&&(h=.5/this.yb);0>l-.5/this.yb&&(l=.5/this.yb);1>16&255)/255,(this.Re>>8&255)/255,(this.Re&255)/255),d=b.getUniformLocation(this.Ta,"uZoomIn"),b.uniform1i(d,1==this.Oa||2==this.Oa?1:0),d=b.getUniformLocation(this.Ta,"uZoomCenter"),b.uniform2f(d,h,l),h=b.getUniformLocation(this.Ta,"uZoomFactor"),b.uniform1f(h,this.yb),b.uniform1i(b.getUniformLocation(this.Ta,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){b.useProgram(this.Ha);b.bindBuffer(b.ARRAY_BUFFER, this.jb);b.vertexAttribPointer(this.Ha.Z,this.jb.Mc,b.FLOAT,!1,0,0);b.bindBuffer(b.ARRAY_BUFFER,this.tf);b.vertexAttribPointer(this.Ha.Ca,2,b.FLOAT,!1,0,0);b.activeTexture(b.TEXTURE0);b.bindTexture(b.TEXTURE_2D,this.Ke);if(1==this.Oa||2==this.Oa||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var k=d=.5;else d=this.kh,k=this.lh;var e=d*a.width,f=k*a.height;e=Math.max(e,a.width-e);f=Math.max(f,a.height-f);"irisround"==this.type||"irisroundcenter"==this.type?b.uniform1f(b.getUniformLocation(this.Ha, "uRadius"),(Math.sqrt(e*e+f*f)+this.Dc)*c):(e>f?(f=a.height/a.width*e+this.Dc,e+=this.Dc):(e=a.width/a.height*f+this.Dc,f+=this.Dc),b.uniform2f(b.getUniformLocation(this.Ha,"uRectDim"),e*c,f*c));c=b.getUniformLocation(this.Ha,"uSoftEdge");b.uniform1f(c,this.Dc);b.uniform1i(b.getUniformLocation(this.Ha,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);b.uniform2f(b.getUniformLocation(this.Ha,"uIrisCenter"),d*a.width,k*a.height);d=b.getUniformLocation(this.Ha,"uZoomIn");b.uniform1i(d, 1==this.Oa||2==this.Oa?1:0);d=b.getUniformLocation(this.Ha,"uZoomCenter");b.uniform2f(d,h,l);h=b.getUniformLocation(this.Ha,"uZoomFactor");b.uniform1f(h,this.yb);b.uniform1i(b.getUniformLocation(this.Ha,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)b.useProgram(this.Na),b.bindBuffer(b.ARRAY_BUFFER,this.jb),b.vertexAttribPointer(this.Na.Z,this.jb.Mc,b.FLOAT,!1,0,0),b.bindBuffer(b.ARRAY_BUFFER, this.tf),b.vertexAttribPointer(this.Na.Ca,2,b.FLOAT,!1,0,0),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,this.Ke),b.uniform1f(b.getUniformLocation(this.Na,"uPercent"),3>this.Ti?c*(a.width+this.Dc):c*(a.height+this.Dc)),c=b.getUniformLocation(this.Na,"uSoftEdge"),b.uniform1f(c,this.Dc),b.uniform1i(b.getUniformLocation(this.Na,"uDirection"),this.Ti),b.uniform2f(b.getUniformLocation(this.Na,"uCanvasDimensions"),a.width,a.height),d=b.getUniformLocation(this.Na,"uZoomIn"),b.uniform1i(d,1==this.Oa|| 2==this.Oa?1:0),d=b.getUniformLocation(this.Na,"uZoomCenter"),b.uniform2f(d,h,l),h=b.getUniformLocation(this.Na,"uZoomFactor"),b.uniform1f(h,this.yb),b.uniform1i(b.getUniformLocation(this.Na,"uSampler"),0);b.drawArrays(b.TRIANGLE_STRIP,0,this.jb.Vd);b.useProgram(this.g.na.F);b.disable(b.BLEND);b.enable(b.DEPTH_TEST)}};return e}();n.Lm=e})(ggP2VR||(ggP2VR={})); (function(n){var e=function(){function e(c){this.Zg=[];this.g=c;this.enabled=!1;this.xb=2;this.xk=!1}e.prototype.Fk=function(c){if(2==c.mode||3==c.mode||5==c.mode){var b=this.g.xa.currentTime,a=c.xc.gain.value,d=c.vc.gain.value,h=c.wc.gain.value;c.uc.gain.linearRampToValueAtTime(c.uc.gain.value,b);c.uc.gain.linearRampToValueAtTime(0,b+this.xb);c.xc.gain.linearRampToValueAtTime(a,b);c.xc.gain.linearRampToValueAtTime(0,b+this.xb);c.vc.gain.linearRampToValueAtTime(d,b);c.vc.gain.linearRampToValueAtTime(0, b+this.xb);c.wc.gain.linearRampToValueAtTime(h,b);c.wc.gain.linearRampToValueAtTime(0,b+this.xb)}else b=this.g.xa.currentTime,c.ed.gain.linearRampToValueAtTime(c.ed.gain.value,b),c.ed.gain.linearRampToValueAtTime(0,b+this.xb);c.xh=!0;setTimeout(function(){c.Fd()},1E3*this.xb+5)};e.prototype.Rp=function(){for(var c=0;ca.la&&(a.la=c)}1==c&&clearInterval(this.Mp)};return e}();n.Mm=e})(ggP2VR||(ggP2VR={})); (function(n){var e=function(){function e(c){this.Dg=[];this.$c=null;this.Zb=[];this.Tb=[];this.$b=[];this.Kj=!0;this.g=c;this.pn()}e.prototype.tg=function(){var c=this.g.H,b=c.createShader(c.VERTEX_SHADER);c.shaderSource(b,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");c.compileShader(b);c.getShaderParameter(b,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(b)),b=null);var a=c.createShader(c.FRAGMENT_SHADER);c.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"); c.compileShader(a);c.getShaderParameter(a,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(a)),a=null);this.fc=c.createProgram();c.attachShader(this.fc,b);c.attachShader(this.fc,a);c.linkProgram(this.fc);c.getProgramParameter(this.fc,c.LINK_STATUS)||alert("Could not initialise shaders");this.fc.Z=c.getAttribLocation(this.fc,"aVertexPosition");c.enableVertexAttribArray(this.fc.Z);a=c.createShader(c.VERTEX_SHADER);b=c.createShader(c.VERTEX_SHADER);c.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"); c.compileShader(a);c.getShaderParameter(a,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(a)),a=null);c.shaderSource(b,"#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"); c.compileShader(b);c.getShaderParameter(b,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(b)),a=null);var d=c.createShader(c.FRAGMENT_SHADER);c.shaderSource(d,"#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"); c.compileShader(d);c.getShaderParameter(d,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(d)),d=null);this.qa=c.createProgram();c.attachShader(this.qa,a);c.attachShader(this.qa,d);c.linkProgram(this.qa);c.getProgramParameter(this.qa,c.LINK_STATUS)||alert("Could not initialise shaders");this.qa.Z=c.getAttribLocation(this.qa,"aVertexPosition");c.enableVertexAttribArray(this.qa.Z);a=c.createShader(c.FRAGMENT_SHADER);c.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"); c.compileShader(a);c.getShaderParameter(a,c.COMPILE_STATUS)||(alert(c.getShaderInfoLog(a)),a=null);this.wb=c.createProgram();c.attachShader(this.wb,b);c.attachShader(this.wb,a);c.linkProgram(this.wb);c.getProgramParameter(this.wb,c.LINK_STATUS)||alert("Could not initialise shaders");this.wb.Z=c.getAttribLocation(this.wb,"aVertexPosition")};e.prototype.Kc=function(){var c=this.g.H;this.wd=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.wd);c.bufferData(c.ARRAY_BUFFER,new Float32Array([-1,-1,0,1, -1,0,1,1,0,-1,1,0]),c.STATIC_DRAW);this.wd.Mc=3;this.wd.Vd=4;this.$e=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.$e);for(var b=[0,0,0],a=2*Math.PI/6,d=Math.PI/180*35,h=1,l=d;l<=d+2*Math.PI;l+=a)b.push(Math.sin(l)),b.push(-Math.cos(l)),b.push(0),h++;c.bufferData(c.ARRAY_BUFFER,new Float32Array(b),c.STATIC_DRAW);this.$e.Mc=3;this.$e.Vd=h;this.Zl=c.createTexture();c.bindTexture(c.TEXTURE_2D,this.Zl);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_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);b=document.createElement("canvas");b.width=100;b.height=1;a=b.getContext("2d");a.width=100;a.height=1;d=a.createLinearGradient(0,0,100,0);d.addColorStop(0,this.g.fa(16777215,0));d.addColorStop(.88,this.g.fa(0,0));d.addColorStop(.9,this.g.fa(16654848,1));d.addColorStop(.92,this.g.fa(16776448,1));d.addColorStop(.94,this.g.fa(4849466,1));d.addColorStop(.96,this.g.fa(131071, 1));d.addColorStop(.98,this.g.fa(8190,1));d.addColorStop(1,this.g.fa(0,0));a.fillStyle=d;a.fillRect(0,0,100,1);c.texImage2D(c.TEXTURE_2D,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,b)};e.prototype.gp=function(){for(;0a.z){l=-d/a.z;h=a.x*l;l*=a.y;var q=Math.max(e,f);Math.abs(h)f?e:f;q=p.mk/100*((u-v)/u);0>q&&(q=0);if(this.g.Y){c.useProgram(this.fc);c.bindBuffer(c.ARRAY_BUFFER,this.g.C.jb);c.vertexAttribPointer(this.fc.Z,this.g.C.jb.Mc, c.FLOAT,!1,0,0);var x=c.getUniformLocation(this.fc,"uCanvasDimensions");c.uniform2f(x,c.drawingBufferWidth,c.drawingBufferHeight);c.uniform2f(c.getUniformLocation(this.fc,"uFlareCenterPosition"),c.drawingBufferWidth/e*h,f-c.drawingBufferHeight/f*l);c.uniform1f(c.getUniformLocation(this.fc,"uBlindingValue"),q);x=c.getUniformLocation(this.fc,"uAspectRatio");c.uniform1f(x,this.g.C.Yg?c.drawingBufferWidth/c.drawingBufferHeight:c.drawingBufferWidth/c.drawingBufferHeight/(e/f));c.drawArrays(c.TRIANGLE_STRIP, 0,this.g.C.jb.Vd)}else x=this.S.createRadialGradient(h,l,1,h,l,t),x.addColorStop(0,"rgba(255, 255, 255, "+q+")"),x.addColorStop(.5,"rgba(255, 255, 255, "+.8*q+")"),x.addColorStop(1,"rgba(255, 255, 255, "+.6*q+")"),this.S.fillStyle=x,this.S.fillRect(0,0,this.S.width,this.S.height);if(0!=Number(p.type)&&!this.g.C.Yg){q=e/2-h;t=f/2-l;var A=1,w=Number(p.type)-1;v<.35*u&&(A=v/(.35*u),A*=A);v>.7*u&&(A=(u-v)/(.3*u));A*=p.alpha/100;if(0z&&(z=0);var C=B.color;if(8==w||9==w||10==w)C=p.color;if(this.g.Y)c.useProgram(this.qa),c.bindBuffer(c.ARRAY_BUFFER,this.$e),c.vertexAttribPointer(this.qa.Z,this.$e.Mc,c.FLOAT,!1,0,0),x=c.getUniformLocation(this.qa,"uCanvasDimensions2"),c.uniform2f(x,c.drawingBufferWidth,c.drawingBufferHeight),c.uniform2f(c.getUniformLocation(this.qa,"uCirclePosition"),c.drawingBufferWidth/e*(h+q*B.j),c.drawingBufferWidth/e*(f-(l+t*B.j))),c.uniform2f(c.getUniformLocation(this.qa,"uCircleTexturePosition"), c.drawingBufferWidth/e*(h+q*B.j),f-(l+t*B.j)),c.uniform1f(c.getUniformLocation(this.qa,"uCircleRadius"),u),c.uniform3f(c.getUniformLocation(this.qa,"uCircleColor"),(C>>16&255)/255,(C>>8&255)/255,(C&255)/255),c.uniform1f(c.getUniformLocation(this.qa,"uCircleAlpha"),z),c.uniform1f(c.getUniformLocation(this.qa,"uCircleSoftness"),.1),x=c.getUniformLocation(this.qa,"uAspectRatio"),c.uniform1f(x,c.drawingBufferWidth/c.drawingBufferHeight/(e/f)),c.drawArrays(c.TRIANGLE_FAN,0,this.$e.Vd);else{this.S.save(); this.S.translate(h+q*B.j,l+t*B.j);x=this.S.createRadialGradient(0,0,1,0,0,1.1*u);x.addColorStop(0,this.g.fa(C,z));x.addColorStop(.65,this.g.fa(C,.9*z));x.addColorStop(.8,this.g.fa(C,.7*z));x.addColorStop(1,this.g.fa(C,.2*z));this.S.beginPath();C=2*Math.PI/6;B=Math.PI/180*35;var D=!0;for(z=B;z<=B+2*Math.PI;z+=C)D?(this.S.moveTo(u*Math.sin(z),u*Math.cos(z)),D=!1):this.S.lineTo(u*Math.sin(z),u*Math.cos(z));this.S.closePath();this.S.fillStyle=x;this.S.fill();this.S.restore()}}if(0z&&(z=0);C=B.color;if(8==w||9==w||10==w)C=p.color;this.g.Y?(c.useProgram(this.qa),c.bindBuffer(c.ARRAY_BUFFER,this.wd),c.vertexAttribPointer(this.qa.Z,this.wd.Mc,c.FLOAT,!1,0,0),x=c.getUniformLocation(this.qa,"uCanvasDimensions2"),c.uniform2f(x,c.drawingBufferWidth,c.drawingBufferHeight),x=c.getUniformLocation(this.qa,"uCirclePosition"),c.uniform2f(x,c.drawingBufferWidth/e*(h+q*B.j),c.drawingBufferWidth/e*(f-(l+t*B.j))),x=c.getUniformLocation(this.qa, "uCircleTexturePosition"),c.uniform2f(x,c.drawingBufferWidth/e*(h+q*B.j),f-(l+t*B.j)),x=c.getUniformLocation(this.qa,"uCircleRadius"),c.uniform1f(x,u),c.uniform3f(c.getUniformLocation(this.qa,"uCircleColor"),(C>>16&255)/255,(C>>8&255)/255,(C&255)/255),c.uniform1f(c.getUniformLocation(this.qa,"uCircleAlpha"),z),c.uniform1f(c.getUniformLocation(this.qa,"uCircleSoftness"),B.v),x=c.getUniformLocation(this.qa,"uAspectRatio"),c.uniform1f(x,c.drawingBufferWidth/c.drawingBufferHeight/(e/f)),c.drawArrays(c.TRIANGLE_FAN, 0,this.wd.Vd)):(this.S.save(),this.S.translate(h+q*B.j,l+t*B.j),x=this.S.createRadialGradient(0,0,1,0,0,u),x.addColorStop(0,this.g.fa(C,z)),x.addColorStop(1-B.v,this.g.fa(C,.8*z)),x.addColorStop(1,this.g.fa(C,0)),this.S.beginPath(),this.S.arc(0,0,u,0,2*Math.PI,!1),this.S.closePath(),this.S.fillStyle=x,this.S.fill(),this.S.restore())}if(0z&&(z=0),this.g.Y?(c.useProgram(this.wb),c.activeTexture(c.TEXTURE0),c.bindTexture(c.TEXTURE_2D, this.Zl),c.bindBuffer(c.ARRAY_BUFFER,this.wd),c.vertexAttribPointer(this.wb.Z,this.wd.Mc,c.FLOAT,!1,0,0),x=c.getUniformLocation(this.wb,"uCanvasDimensions2"),c.uniform2f(x,e,f),x=c.getUniformLocation(this.wb,"uCirclePosition"),c.uniform2f(x,h+q*p.j,f-(l+t*p.j)),x=c.getUniformLocation(this.wb,"uRingTexturePosition"),c.uniform2f(x,c.drawingBufferWidth/e*(h+q*p.j),f-(l+t*p.j)),x=c.getUniformLocation(this.wb,"uCircleRadius"),c.uniform1f(x,u),c.uniform2f(c.getUniformLocation(this.wb,"uRingPosition"),h+ q*p.j,f-(l+t*p.j)),c.uniform1f(c.getUniformLocation(this.wb,"uRingRadius"),u),c.uniform1f(c.getUniformLocation(this.wb,"uRingAlpha"),z),x=c.getUniformLocation(this.wb,"uAspectRatio"),c.uniform1f(x,c.drawingBufferWidth/c.drawingBufferHeight/(e/f)),c.uniform1i(c.getUniformLocation(this.wb,"uSampler"),0),c.drawArrays(c.TRIANGLE_FAN,0,this.wd.Vd)):(this.S.save(),this.S.translate(h+q*p.j,l+t*p.j),x=this.S.createRadialGradient(0,0,0,0,0,u),x.addColorStop(0,this.g.fa(16777215,0)),x.addColorStop(.88,this.g.fa(0, 0)),x.addColorStop(.9,this.g.fa(16654848,z)),x.addColorStop(.92,this.g.fa(16776448,z)),x.addColorStop(.94,this.g.fa(4849466,z)),x.addColorStop(.96,this.g.fa(131071,z)),x.addColorStop(.98,this.g.fa(8190,z)),x.addColorStop(1,this.g.fa(0,0)),this.S.beginPath(),this.S.arc(0,0,u,0,2*Math.PI,!1),this.S.closePath(),this.S.fillStyle=x,this.S.fill(),this.S.restore())}this.g.Y&&(c.useProgram(this.g.na.F),c.disable(c.BLEND),c.enable(c.DEPTH_TEST))}}}};return e}();n.Km=e})(ggP2VR||(ggP2VR={}));var W=!1; (function(n){var e=function(){return function(){this.f=this.i=this.pan=0}}(),g=function(){return function(){this.Oi=-1E7}}(),c=function(){function b(a,d){this.Bo="TGljZW5zZTogQktZTS5DT00=";this.pan={c:0,Qa:0,min:0,max:360,d:0,uj:0,Hc:0};this.i={c:0,Qa:0,min:-90,max:90,d:0,Hc:0};this.O={c:0,Qa:0,min:-180,max:180,d:0};this.tc={pan:0,i:-90,O:0,f:170,Eb:9};this.f={c:70,Qa:70,min:1,Hg:0,max:170,rj:360,sj:270,pf:0,d:0,mode:0,km:0,zk:0};this.$a={O:0,pitch:0};this.o={width:10,height:10};this.ib=0;this.Ri=new n.wa;this.crossOrigin= "anonymous";this.Ka=this.Zh=4;this.hd=this.jh=this.Kg=this.nc=0;this.X={start:{x:0,y:0},da:{x:0,y:0},Cd:{x:0,y:0},c:{x:0,y:0},ca:{x:0,y:0}};this.R={Xa:!1,Hk:0,startTime:0,start:{x:0,y:0},da:{x:0,y:0},Cd:{x:0,y:0},c:{x:0,y:0},ca:{x:0,y:0}};this.eg=!0;this.Ba={enabled:!0,da:{x:0,y:0},ca:{x:0,y:0},Fj:0,f:{active:!1,jc:0}};this.hb={alpha:0,beta:0,gamma:0,orientation:0,Ml:0,fi:!0,dg:0};this.qg={alpha:0,beta:0,gamma:0,orientation:0};this.s={src:[],Qe:4,width:640,height:480,kd:!1,Jh:!1,lm:!1,me:"loop",b:HTMLVideoElement= null,nm:!1,oc:WebGLTexture=null,Zj:WebGLBuffer=null,ni:WebGLBuffer=null,jj:WebGLBuffer=null,format:1,Dh:0,bj:1};this.Mh=0;this.ia=this.ya=this.Fa=this.T=this.ic=this.ab=this.D=null;this.oe="pano";this.aj="flashcontainer";this.Si="";this.control=null;this.Sb=[];this.Ea=!1;this.ag=1;this.ka=null;this.Ld=this.Ne=this.df=!1;this.Qf=0;this.ud=.02;this.Ci=0;this.Di=!1;this.Bi=this.ph=this.Rf=this.Me=this.lk=0;this.kk=-1;this.Mb="";this.uf=this.Cc=!1;this.$h=0;this.th=[];this.Xe=[];this.Gf=this.qc=1;this.Vf= 1024;this.vf=!1;this.we=200;this.Qb=0;this.Xg=5;this.pc=0;this.om=50;this.ij=this.pm=0;this.l={enabled:!1,timeout:5,active:!1,Wg:!1,speed:.4,pi:0,Xh:0,tj:!0,gh:!1,Kf:!1,qh:"",Md:"Animation01",Pe:!1,Th:!1,Qj:!1,startTime:0,ld:0,gg:!1,uh:!1,Oh:0,Bd:0,Bg:0,Cg:0,Ag:0,Al:0};this.u={active:!1,aborted:!1,speed:.1,pan:0,i:0,O:0,f:70,Id:70,Bg:0,Cg:0,Bl:0,Ag:0,Eb:0,Ng:0,mj:0,Xj:!1,Ig:!1,jk:0,ik:0,Fh:!1};this.kf={pan:-1,i:-1,f:-1};this.yl=0;this.aa=null;this.Lf={};this.xi={};this.Pd=[];this.Rh={};this.Bc={}; this.mf={};this.A={mode:1,xg:-1,pa:0,nb:0,Yc:.05,hc:255,gc:1,ec:255,dc:.3,cf:!0,Sj:{enabled:!0,width:180,height:20,Tj:0,Rj:1,background:!0,ec:16777215,dc:1,hc:0,gc:1,Fi:3,Gi:1,zi:!0},lb:[],Pb:[],Qc:[],ki:[]};this.Aa=null;this.P=[];this.N=[];this.I=[];this.Sa=[];this.Ie=[];this.Ma=[];this.za=[];this.Rc=[];this.ce=[];this.Ee=[];this.V=1;this.na=this.od=this.Hb=this.Od=null;this.bg={};this.rd={};this.h=new n.Nm;this.Ro={target:0,current:0,Yc:.01,un:2,Wi:0,vh:!1,an:!1};this.margin={left:0,top:0,right:0, bottom:0};this.B={ue:!1,Co:!1,Ab:!1,md:!1,Ad:!0,ml:!1,jm:1,am:!1,Ui:!0,$f:!0,rh:!1,ef:!1,bm:!0,sensitivity:8};this.Gg=[];this.bd=!0;this.ta={x:0,y:0};this.fh=this.Fb=this.bh=this.Uc=this.Y=!1;this.wi=this.Am=!0;this.hj=!1;this.ne=!0;this.dh=this.gj=!1;this.Bm=!0;this.Ia=this.Nd="";this.dd="transition";this.Ra="transform";this.vd="perspective";this.Ck="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC"; this.rb={width:0,height:0};this.Lk=new n.wa;this.Kk=new n.wa;this.Mk=new n.wa;this.Nk=new n.wa;this.Jk=new n.wa;this.hf=!1;this.zl=this.Wa="";this.$j=[];this.si=[];this.ug=this.ol=this.Td=this.pl=this.Ac=this.kj=this.Gj=this.Lc=this.gf=this.nl=this.lj=this.ql=this.rl=this.ul=!1;this.eh=!0;this.ei=this.Hh=!1;this.il=[];this.devicePixelRatio=1;this.ga=this.C=null;this.Wf=!1;this.La=null;this.qb={enabled:!1,speed:1,pd:!1,Zi:!0};this.Il=!1;this.Qh="<>";this.ob=new n.Om;this.Wj=!1;this.Zf=function(a, d){if(0==a.length)return a;var b;var c=[];var h=d.ai(a[0])-0;for(b=0;bg&&(g=0);1h||c.push(a[l]);c.push(v)}h=e}return c};this.Ql=new e;this.Mj=0;this.Nh=-1;this.lg=function(a){return a?a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:a.clientX||a.clientY?{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+ document.body.scrollTop+document.documentElement.scrollTop}:a.touches&&a.touches[0]?{x:a.touches[0].pageX,y:a.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Vh=1;this.zn=this.Ah=this.wl=this.Xi=this.Bj=this.bi=0;this.xl=!1;this.Rd=!0;this.pb=new n.mh(this);this.pb.cf=!1;this.Bk();if(7=d&&(this.ga.blendtime= d));a.hasOwnProperty("waitfortransition")&&(this.ga.zoomoutpause=1==a.waitfortransition);a.hasOwnProperty("zoomedfov")&&(d=Number(a.zoomedfov),.01<=d&&50>=d&&(this.ga.zoomfov=d));a.hasOwnProperty("zoomspeed")&&(d=Number(a.zoomspeed),.01<=d&&99>=d&&(this.ga.zoomspeed=d));a.hasOwnProperty("dipcolor")&&(this.ga.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),0<=a&&1E3>=a&&(this.ga.softedge=a));this.Wf||this.Pi()};b.prototype.Pc=function(a,d,b){var c=d?Number(d):0;if(0!=a&& 4!=a&&12!=a&&9!=a)this.Nc("Unsupported projection type: "+a);else if(d&&0!==c&&4!==c&&12!==c&&9!==c)this.Nc("Unsupported projection2 type: "+c);else if(a==c&&(c=0),this.Kg=b?Number(b):1,this.Ka!=a||this.nc!=c)this.Ka=a,this.nc=c,this.na.Gh()};b.prototype.ra=function(){return 0==this.Ka?4:this.Ka};b.prototype.Ki=function(a,d){if(0!=a&&4!=a&&12!=a&&9!=a)this.Nc("Unsupported projection type: "+a);else if(this.Y||0==a||4==a||this.Nc("Projection changes require WebGL!"),this.ra()!=a){var b={};b.pan=this.pan.c; b.tilt=this.i.c;b.fov=this.f.c;b.projection=a;b.timingFunction=3;b.speed=d;a=this.kg(a);b.fov=Math.min(a,b.fov);this.Uh(b)}};b.prototype.addListener=function(a,d){(this.bg[a]=this.bg[a]||[]).push(d)};b.prototype.ha=function(a,d){if(a=this.bg[a])for(var b=a.length,c=0;c>4;k=(k&15)<<4|e>>2;var m=(e&3)<<6|f;d+=String.fromCharCode(c);64!=e&&(d+=String.fromCharCode(k));64!=f&&(d+=String.fromCharCode(m))}while(b>3&7];if(!(e&64&&f)||k+ f>b)return null;for(e&=63>>f;0Number(this.qd))&&(this.xa=null);this.Lc&&!this.Ac&&12<=Number(this.qd)&&(this.xa=null);this.eh=this.pl?this.Lc&&this.Gj&&10<=Number(this.qd)?!0:!1:!0};b.prototype.M=function(a){if(W){var d=document.getElementById("gg_debug");d&&(d.innerHTML=a.toString()+"
");window.console&&window.console.log(a)}};b.prototype.Nc=function(a){var d= document.getElementById("gg_debug");d&&(d.innerHTML=a+"
");window.console&&window.console.log(a)};b.prototype.em=function(a){this.we=a};b.prototype.lp=function(a){this.crossOrigin=a};b.prototype.np=function(a){this.ff=a};b.prototype.eo=function(){return this.$h};b.prototype.kp=function(a){this.Nd=a};b.prototype.En=function(){return this.Nd};b.prototype.Nn=function(){return this.ug};b.prototype.On=function(){return this.hf};b.prototype.Kn=function(){return this.l.active};b.prototype.op=function(a){this.ug= !!a};b.prototype.Bh=function(){return this.isLoaded};b.prototype.Mn=function(){return!this.isLoaded};b.prototype.fd=function(){return Number(this.o.height)/(2*Math.tan(Math.PI/180*(this.Jb()/2)))};b.prototype.gm=function(a,d){this.isFullscreen&&(a=window.innerWidth,d=window.innerHeight);var b=a-this.margin.left-this.margin.right,c=d-this.margin.top-this.margin.bottom;if(!(10>b||10>c)){var k=window.devicePixelRatio||1;this.vf&&(k=1);this.D.style.width=b+"px";this.D.style.height=c+"px";this.D.style.left= this.margin.left+"px";this.D.style.top=this.margin.top+"px";if(this.Y)try{this.ab&&(this.ab.style.position="absolute",this.ab.style.display="inline",this.ab.style.width=b+"px",this.ab.style.height=c+"px",this.ab.width=b*k,this.ab.height=c*k),this.H&&(this.rb.width=b*k,this.rb.height=c*k,this.H.viewport(0,0,this.H.drawingBufferWidth,this.H.drawingBufferHeight))}catch(r){alert(r)}this.ic&&(this.ic.style.width=a+"px",this.ic.style.height=d+"px",this.ic.width=a,this.ic.height=d);this.Fa&&(this.Fa.style.width= a+"px",this.Fa.style.height=d+"px",this.ya.style.width=a+"px",this.ya.style.height=d+"px",this.ya.width=a,this.ya.height=d,this.ya.style.left=this.margin.left+"px",this.ya.style.top=this.margin.top+"px",this.ka&&this.ka!=this.Fa&&(this.ka.style.width=a+"px",this.ka.style.height=d+"px"));this.Ga&&(b=this.Ga.$c,b.style.width=a+"px",b.style.height=d+"px",b.width=a,b.height=d,b.style.left=this.margin.left+"px",b.style.top=this.margin.top+"px");this.df&&(this.Ea=!0);b=this.D.offsetWidth;c=this.D.offsetHeight; if(this.o.width!=b||this.o.height!=c)this.o.width=b,this.o.height=c;this.lq();this.ka&&this.ka.ggUpdateSize&&this.ka.ggUpdateSize(a,d);this.ha("sizechanged",{ih:a,rg:d})}};b.prototype.Le=function(){this.Wj=!0};b.prototype.Tc=function(){this.gm(this.Od.offsetWidth,this.Od.offsetHeight)};b.prototype.so=function(){var a={width:0,height:0};a.width=this.o.width;a.height=this.o.height;return a};b.prototype.qe=function(){var a={x:0,y:0},d=this.D;if(d.offsetParent){do a.x+=d.offsetLeft,a.y+=d.offsetTop,d= d.offsetParent;while(d)}return a};b.prototype.Ap=function(a){this.aa=a};b.prototype.qp=function(a,d,b,c){this.margin.left=a;this.margin.top=d;this.margin.right=b;this.margin.bottom=c;this.aa=this.skinObj;this.Le()};b.prototype.jn=function(a){0==a&&(this.B.Ad=!1);1==a&&(this.B.Ad=!0);2==a&&(this.B.Ad=!this.B.Ad);this.ha("viewmodechanged",{})};b.prototype.qo=function(){return 1==this.B.Ad?1:0};b.prototype.rk=function(a,d){this.A.mode=1==d&&0a.z?(q=-d/a.z,p=a.x*q,q*=a.y,Math.abs(p)a.z?(q=-d/a.z,p=this.o.width/2+a.x*q,q=this.o.height/2+a.y*q):q=p=0,a.Nb=p,a.vb=q;m.Xd=t}}}};b.prototype.Gn=function(){for(var a=[],d=0;dd&&(d=0);1>16&255)+","+(a>>8&255)+","+(a&255)+","+d+")"};b.prototype.To=function(){var a;if(this.ya&&(this.A.xg!=this.A.mode&&(this.A.xg=this.A.mode,this.ya.style.visibility=0=this.A.mode&&(d=0);3==this.A.mode&&(d=this.A.pa);for(a=0;ab!=c.vb>b&&d<(c.Nb-f.Nb)*(b-f.vb)/(c.vb-f.vb)+f.Nb&&(h=!h)}return h};b.prototype.Mi=function(a,d){var b=-1;if((0<=this.A.mode||0b.width?this.f.c/2:4==d?180*Math.atan(4*b.height/(3*b.width)*Math.tan(this.f.c/ 2*Math.PI/180))/Math.PI:4*b.height/(3*b.width)*(this.f.c/2)}return 2*a};b.prototype.In=function(a,d){a||(a=this.Jb());d||(d=this.ra());return 4==d?180*Math.atan(this.ee()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.ee()};b.prototype.ee=function(){return this.o.width/this.o.height};b.prototype.Sg=function(a){a/=2;var d=this.ra();switch(this.f.mode){case 0:this.f.c=2*a;break;case 1:a=4==d?180*Math.atan(this.o.width/this.o.height*Math.tan(a*Math.PI/180))/Math.PI:this.o.width/this.o.height*a;this.f.c=2* a;break;case 2:var b=Math.sqrt(this.o.width*this.o.width+this.o.height*this.o.height);a=4==d?180*Math.atan(b/this.o.height*Math.tan(a*Math.PI/180))/Math.PI:b/this.o.height*a;this.f.c=2*a;break;case 3:4*this.o.height/3>this.o.width?this.f.c=2*a:(b=3*this.o.width/(4*this.o.height),a=4==d?180*Math.atan(b*Math.tan(a*Math.PI/180))/Math.PI:b*a,this.f.c=2*a)}};b.prototype.Yf=function(){var a=this.Ql;a.pan=this.pan.c;a.i=this.i.c;a.f=this.f.c;this.Ve(a);this.Ve(a);this.Ve(a);this.pan.c=a.pan;this.i.c=a.i; this.f.c=a.f};b.prototype.Ve=function(a){var d=this.o.width/this.o.height;if(2==this.ib){if(0d&&(a.f=d);50a.i-c&&(a.i=-50+c));b>k?a.pan=0:(a.pan+b>k&&(a.pan=k-b,this.l.active&&(this.l.speed=-this.l.speed, this.pan.d=0)),a.pan-b<-k&&(a.pan=-k+b,this.l.active&&(this.l.speed=-this.l.speed,this.pan.d=0)))}else{0k&&(a.f=k);12==this.ra()&& (2*b>e&&(a.f=e/d),c=this.Jb()/2,2*c>e&&(a.f=e),c=this.Jb()/2,b=d*c);2*c>this.i.max-this.i.min&&180>this.i.max-this.i.min&&(c=(this.i.max-this.i.min)/2,this.Sg(2*c));90>this.i.max?a.i+c>this.i.max&&(a.i=this.i.max-c):a.i>this.i.max&&(a.i=this.i.max);-90d){k=90;e=Math.tan(c*Math.PI/180);var f=Math.tan((Math.abs(a.i)+c)*Math.PI/180);f=Math.sqrt(f*f+1)/Math.sqrt(e*e+1);c=180*Math.atan(f* Math.tan(b*Math.PI/180))/Math.PI;2*c>d&&(f=Math.tan(d*Math.PI/360)/Math.tan(b*Math.PI/180),d=f*Math.sqrt(e*e+1),f=Math.sqrt(d*d-1),k=180/Math.PI*Math.atan(f));a.pan+c>this.pan.max&&(a.pan=this.pan.max-c,this.l.active&&(this.l.speed=-this.l.speed,this.pan.d=0));a.pan-ck&&(a.i=k-b);a.i-b<-k&&(a.i=-k+b)}}};b.prototype.update=function(a){void 0===a&&(a=0);this.Ea=!0;a&&(this.ag=Math.max(1*a,this.ag))}; b.prototype.Tk=function(){return this.ia?!!this.ia.isTileLoading:0a;a++){var b;if(b=this.ob.cb[a]){var c="";this.Cc?(c+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,0px) ", c+="perspective("+d+"px) ",c+="translate3d(0px,0px,"+d+"px) "):c+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,"+d+"px) ";c+="rotateZ("+Number(this.O.c).toFixed(10)+"deg) ";c+="rotateX("+Number(this.i.c).toFixed(10)+"deg) ";c+="rotateY("+Number(-this.pan.c).toFixed(10)+"deg) ";b.dl&&(c+=b.dl,b.fb||(c="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),b.K.style[this.Ra]=c)}}};b.prototype.cq=function(){this.Yf();var a;this.ic&&(a=this.ic.getContext("2d"));if(this.o.width!==this.D.offsetWidth|| this.o.height!==this.D.offsetHeight)this.o.width=this.D.offsetWidth,this.o.height=this.D.offsetHeight;if(a){var d=a.canvas.width/2,b=a.canvas.height/2,c=a.createRadialGradient(d,b,5,d,b,Math.max(d,b));c.addColorStop(0,"#333");c.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=c;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.c.toFixed(1),d,b-60);a.fillText("Tilt: "+this.i.c.toFixed(1),d,b-30);a.fillText("Fov: "+this.f.c.toFixed(1), d,b);a.fillText("Node: "+this.Rk(),d,b+30);a.fillText("Title: "+this.Lf.title,d,b+60)}};b.prototype.eq=function(){this.Yf();if(this.o.width!==this.D.offsetWidth||this.o.height!==this.D.offsetHeight)this.o.width=this.D.offsetWidth,this.o.height=this.D.offsetHeight;this.ia&&this.ia.setPan&&(this.ia.setPan(this.pan.c),this.ia.setTilt(this.i.c),this.ia.setFov(this.f.c))};b.prototype.Uj=function(){this.ya.style.visibility="inherit";this.ba||(this.ba=this.ya.getContext("2d"));if(this.ba.width!=this.o.width|| this.ba.height!=this.o.height)this.ba.width=this.o.width,this.ba.height=this.o.height;this.ba.clear?this.ba.clear():this.ba.clearRect(0,0,this.ya.width,this.ya.height);this.pc=0;var a=100/this.f.c;var d=this.h.width/this.h.height;var b=this.o.height*a*d;a*=this.o.height;var c=(this.pan.c/100/d-.5)*b+this.o.width/2;for(var k=(this.i.c/100-.5)*a+this.o.height/2,e,f,m,g,p=0;this.h.J.length>=p+2&&this.h.J[p+1].width>b;)p++;var q;var t=[];for(q=this.h.J.length-1;q>=p;){d=this.h.J[q];if(d.cache){var v= {Ya:0,zb:0};v.Bb=d.L-1;v.Cb=d.ea-1}else{v={};var u=-k/a*(d.height/this.h.G);e=(-c+this.o.width)/b*(d.width/this.h.G);f=(-k+this.o.height)/a*(d.height/this.h.G);v.Ya=Math.min(Math.max(0,Math.floor(-c/b*(d.width/this.h.G))),d.L-1);v.zb=Math.min(Math.max(0,Math.floor(u)),d.ea-1);v.Bb=Math.min(Math.max(0,Math.floor(e)),d.L-1);v.Cb=Math.min(Math.max(0,Math.floor(f)),d.ea-1)}t[q]=v;var x=!0;for(f=v.zb;f<=v.Cb;f++)for(e=v.Ya;e<=v.Bb;e++)g=e+f*d.L,u=d.U[g],u||(u=new n.Kd,d.U[g]=u),this.Qb=p;){d=this.h.J[q];if(t[q]&&0<=t[q].Ya)for(v=t[q],f=v.zb;f<=v.Cb;f++)for(e=v.Ya;e<=v.Bb;e++)g=e+f*d.L,(u=d.U[g])||(u=d.U[g]=new n.Kd),u.h&&u.h.complete&&(g=c+(-this.h.Ja+this.h.G*e)*b/d.width,this.ba.drawImage(u.h, g,k+(-this.h.Ja+this.h.G*f)*a/d.height,u.h.width*b/d.width,u.h.height*a/d.height)),u.visible=!0;q--}for(b=0;b=this.A.mode&&(b=0),3==this.A.mode&&(b=this.A.pa),m=0;mthis.ob.cb.length))for(var a=0;6>a;a++){var d=this.ob.cb[a];var b=[];b.push(new n.wa(-1,-1,-1,0,0));b.push(new n.wa(1,-1,-1,1,0));b.push(new n.wa(1,1,-1,1,1));b.push(new n.wa(-1,1,-1,0,1));for(var c=0;4>c;c++)4>a?b[c].Da(-Math.PI/ 2*a):b[c].va(Math.PI/2*(4==a?-1:1)),this.$a&&(b[c].kb(this.$a.O*Math.PI/180),b[c].va(-this.$a.pitch*Math.PI/180)),b[c].Ce(-this.pan.c),b[c].Gd(this.i.c),b[c].De(this.O.c);b=this.Ni(b);d.fb=0=a+2&&!this.h.J[a+1].rf&&this.h.J[a+1].width>b;)a++;return a};b.prototype.hq=function(){var a=!1,d,b,c;if(this.o.width!==this.D.offsetWidth||this.o.height!==this.D.offsetHeight)this.o.width= this.D.offsetWidth,this.o.height=this.D.offsetHeight,this.D.style[this.Ra+"OriginX"]=this.o.width/2+"px",this.D.style[this.Ra+"OriginY"]=this.o.height/2+"px",a=!0;var k=Math.round(this.fd());if(this.yg!=k||a)this.yg=k,this.Cc||(this.D.style[this.vd]=k+"px",this.D.style[this.vd+"Origin"]="50% 50%");this.pc=0;if(0d;d++){var f=this.ob.cb[d];f.fb&&(e=e+d+",")}e=this.Yi();var m;for(m=this.h.J.length-1;m>=e;){a=this.h.J[m];var g=1;m==this.h.J.length- 1&&0==this.h.Ja&&(g=this.h.G/(this.h.G-2));for(d=0;6>d;d++){f=this.ob.cb[d];var p=f.nf;if(f.fb&&0=m);)t=t.nextSibling;this.D.insertBefore(p.K,t);p.Pa=p.K.getContext("2d")}else if(this.pm< this.we){this.pm++;p.K=document.createElement("canvas");p.K.width=this.h.G+2*this.h.Ja;p.K.height=this.h.G+2*this.h.Ja;p.Pa=p.K.getContext("2d");p.K.style[this.Ra+"Origin"]="0% 0%";p.K.style.overflow="hidden";p.K.style.position="absolute";for(t=this.D.firstChild;t&&t.Sd&&(-1==t.Sd||t.Sd>=m);)t=t.nextSibling;this.D.insertBefore(p.K,t)}p.K&&(this.ij++,p.h=new Image,p.h.crossOrigin=this.crossOrigin,p.h.style[this.Ra+"Origin"]="0% 0%",p.h.style.position="absolute",p.h.style.overflow="hidden",p.K.Sd=m, p.h.onload=this.Tp(p),p.h.onerror=this.oi(p),p.h.onabort=this.oi(p),p.h.setAttribute("src",this.He(d,m,b,c)),a.cache&&this.Sb.push(p.h),this.Qb++,this.Ea=!0)}else this.pc++;if(p.K){t="";this.Cc?(t+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,0px) ",t+=" perspective("+k+"px) ",t+="translate3d(0px,0px,"+k+"px) "):t+="translate3d("+this.o.width/2+"px,"+this.o.height/2+"px,"+k+"px) ";t+="rotateZ("+Number(this.O.c).toFixed(10)+"deg) ";t+="rotateX("+Number(this.i.c).toFixed(10)+"deg) ";t+="rotateY("+ Number(-this.pan.c).toFixed(10)+"deg) ";this.$a&&(t+="rotateX("+Number(-this.$a.pitch).toFixed(10)+"deg) ",t+="rotateZ("+Number(this.$a.O).toFixed(10)+"deg) ");t=4>d?t+("rotateY("+-90*d+"deg) "):t+("rotateX("+(4==d?-90:90)+"deg) ");if(this.uf){var v=this.h.G/a.width*(2*m+1)*(this.Vf/this.h.G);v=this.Lc?2/Math.tan(this.f.c*Math.PI/360)*v:2*v;t+=" scale("+v*g*g+")"}else v=1/(g*g);t+=" translate3d("+(1/g*b*this.h.G-this.h.Ja-a.width/2)+"px,";t+=1/g*c*this.h.G-this.h.Ja-a.width/2+"px,";t+=-a.width*v/ 2+"px)";f.fb&&(p.visible=!0,p.K?p.K.style[this.Ra]=t:p.h&&(p.h.style[this.Ra]=t))}}}}m--}for(k=0;kd||100>b)b=d=100;var c=window.devicePixelRatio||1;this.vf&&(c=1);this.D.style.width=d+"px";this.D.style.height=b+"px";this.ab.style.width=d+"px";this.ab.style.height=b+"px";this.ab.width= d*c;this.ab.height=b*c;this.ab.style.display="none";this.ab.style.touchAction="none";this.D.insertBefore(this.ab,this.D.firstChild);a={stencil:!0,depth:!0};a.alpha=this.Lc?!0:!1;this.Ac&&10<=this.il[0]&&(a.antialias=!1,a.alpha=!1);this.H=this.ab.getContext("webgl",a);this.H||(this.H=this.ab.getContext("experimental-webgl",a));if(this.H){var k=this.H;this.rb.width=d*c;this.rb.height=b*c;k.clearColor(0,0,0,0);k.enable(this.H.DEPTH_TEST);k.viewport(0,0,500,500);k.clear(k.COLOR_BUFFER_BIT|k.DEPTH_BUFFER_BIT); 4096<=k.getParameter(k.MAX_TEXTURE_SIZE)&&!this.ug&&(this.we=1m;m++)l=this.Zd(l,"c",a),l=this.Zd(l,"s",e),l=this.Zd(l,"r",d),l=this.Zd(l,"l",h),l=this.Zd(l,"x",b),l=this.Zd(l, "y",c),l=this.Zd(l,"v",c),l=this.Zd(l,"h",b);return this.kc(l)};b.prototype.mg=function(){return this.pan.c};b.prototype.co=function(){return this.u.pan};b.prototype.Wk=function(){for(var a=this.pan.c;-180>a;)a+=360;for(;180a;)a+=360;for(;180b?this.u.f=Number(b):this.u.f=this.f.c;this.u.speed=!isNaN(c)&&0=f?(this.hi(d,b,c),this.Pc(k)):(a=new n.bk,a.bb="__AutoMove",a.Ef=this.Wk(),a.Ug=this.i.c,a.Hd=this.f.c, a.Tg=this.Ka,a.Sc=d,a.ae=b,a.Ff=c,a.sd=k,a.Ye=!1,a.ke=!1,a.le=!1,0==e&&(a.ke=!0),1==e&&(a.Ye=!0,a.ke=!0),2==e&&(a.le=!0),a.speed=f,this.u.ik=this.w,this.w=this.Ok(a),this.u.jk=(new Date).getTime(),this.u.Xj=!0,this.u.active=!0,this.u.aborted=!1,this.u.pan=d,this.u.i=b,this.u.f=c,this.Ld=!1)};b.prototype.Ho=function(a){this.moveTo(this.pan.Qa,this.i.Qa,this.f.Qa,a)};b.prototype.Io=function(a,d){var b={};b.pan=this.pan.Qa;b.tilt=this.i.Qa;b.fov=this.f.Qa;b.projection=this.Zh;b.timingFunction=d;b.speed= a;this.Uh(b)};b.prototype.Vm=function(a,d,b,c){var h=new n.mh(this);h.type="point";h.pan=d;h.i=b;h.id=a;h.b={};h.b.player=this;h.Ze();h.b.hotspot=h;h.b.__div=document.createElement("div");h.b.__div.appendChild(c);this.P.push(h);h.b.__div.style.position="absolute";h.b.__div.style.left="-1000px";h.b.__div.style.top="-1000px";this.Fa.insertBefore(h.b.__div,this.Fa.firstChild);this.Ea=!0};b.prototype.fq=function(a,d,b){for(var c=0;c a;)a+=360;d=b.Zm()}b={};b.pan=a;b.tilt=d;return b};b.prototype.zc=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};b.prototype.Li=function(a,d){var b=this.fd(),c,e;for(c=0;cy;y++){switch(y){case 0:m.Za(-e,-p,0);break;case 1:m.Za(e,-p,0);break;case 2:m.Za(e,p,0);break;case 3:m.Za(-e,p,0)}m.va(g.va*Math.PI/180);m.Da(-g.Da*Math.PI/180);m.kb(g.kb*Math.PI/180);m.z=m.z-1;m.va(-g.i*Math.PI/180);m.Da(g.pan*Math.PI/180);m.Da(-this.pan.c*Math.PI/180);m.va(this.i.c*Math.PI/180);m.kb(this.O.c* Math.PI/180);f.push(m.clone())}f=this.Ni(f);if(0m.z?(p=-b/m.z,e=this.o.width/2+m.x*p,p=this.o.height/2+m.y*p):p=e=0,m.Nb=e,m.vb=p;if(this.hl(f,a,d))return g}}return null};b.prototype.Ih=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};b.prototype.Go=function(a){this.vm(a);if(this.cd)this.cd.onclick();this.Hb=null;if(!this.B.Ab){a=a?a:window.event; if(a.which||0==a.which||1==a.which){var d=(new Date).getTime();if(this.od){this.Hb=this.od;this.R.Xa=!0;this.R.startTime=d;a.stopPropagation();return}if(this.zc(a.target)){var b;(b=this.Li(this.ta.x,this.ta.y))&&b.re&&(this.Hb=b);this.Em(a.pageX,a.pageY);this.R.Xa=!0;this.R.startTime=d;a.preventDefault();this.ua()}}this.X.ca.x=0;this.X.ca.y=0}};b.prototype.Jf=function(a,d){var b=this.A.Sj;b.enabled&&(this.sa!=this.pb&&0<=a&&0<=d&&""!=this.sa.title?(this.Aa.innerHTML=this.sa.title,this.Aa.style.color= this.fa(b.Tj,b.Rj),b.background?this.Aa.style.backgroundColor=this.fa(b.ec,b.dc):this.Aa.style.backgroundColor="transparent",this.Aa.style.border="solid "+this.fa(b.hc,b.gc)+" "+b.Gi+"px",this.Aa.style.borderRadius=b.Fi+"px",this.Aa.style.textAlign="center",0a-this.R.startTime&&0<=d&&20>d){var b=this.Mi(this.ta.x,this.ta.y);b&&this.rm(b);d=Math.abs(this.X.Cd.x-this.X.da.x)+Math.abs(this.X.Cd.y-this.X.da.y);700>a-this.wg&&0<=d&&20>d?(b?this.sm(b):this.B.Ui&& this.ri(),this.wg=0):this.wg=a;this.X.Cd.x=this.X.da.x;this.X.Cd.y=this.X.da.y}}};b.prototype.Fl=function(a){if(!this.B.md&&(a=a?a:window.event,this.zc(a.target))){var d=a.detail?-1*a.detail:a.wheelDelta/40;this.B.ml&&(d=-d);a.axis&&(-1==this.Nh?this.Nh=a.axis:this.Nh!=a.axis&&(d=0));var b=0Math.abs(a.wheelDeltaY)&&(d=0);0!=d&&(this.Ji(b*this.B.jm,!0),this.update());a.preventDefault();this.ua()}};b.prototype.aq=function(a){a||(a=window.event); var d=a.touches,b=this.qe();this.ta.x=d[0].pageX-b.x;this.ta.y=d[0].pageY-b.y;this.be=this.Hb=null;this.eg&&(this.eg=!1,this.An());if(!this.B.Ab){var c=(new Date).getTime();if(this.od)this.Hb=this.od,this.R.Xa=!0,this.R.startTime=c,a.preventDefault();else{if(!this.R.Xa&&d[0]){this.R.startTime=c;this.R.start.x=d[0].pageX;this.R.start.y=d[0].pageY;this.R.da.x=d[0].pageX;this.R.da.y=d[0].pageY;this.mb=d[0].target;if(this.zc(this.mb)){(c=this.Li(this.ta.x,this.ta.y))&&c.re&&(this.Hb=c);if(c=this.Mi(this.ta.x, this.ta.y))this.M(c),this.be=c,this.gi(c),c=this.lg(a),this.Jf(c.x-b.x,c.y-b.y);this.Em(d[0].pageX,d[0].pageY);this.R.Hk=d[0].identifier;this.R.Xa=!0;a.preventDefault();this.ua()}if(this.mb){b=this.mb;for(c=!1;b&&b!=this.control;){if(b.onmouseover)b.onmouseover();b.onmousedown&&!c&&(b.onmousedown(),c=!0);b=b.parentNode}c&&a.preventDefault()}}1this.f.max&&(this.Ba.f.jc= this.f.max),this.Ba.f.jce){b=!0;this.zc(this.mb)&&(a.preventDefault(),this.Hb&&(this.Hb.re(),this.Hb.eb?this.od=this.Hb:this.od=null));if(this.mb){for(e=this.mb;e&&e!=this.control;)e.onclick&& (e.onclick(),g=!0,b=!1),e=e.parentNode;g&&a.preventDefault()}e=Math.abs(this.R.Cd.x-this.R.da.x)+Math.abs(this.R.Cd.y-this.R.da.y);if(700>c-this.wg&&0<=e&&20>e){if(this.zc(this.mb))if(a.preventDefault(),this.be)this.sm(this.be);else if(this.B.Ui){var f=this;setTimeout(function(){f.ri()},1)}if(this.mb){for(e=this.mb;e&&e!=this.control;)e.ondblclick&&(e.ondblclick(),g=!0,b=!1),e=e.parentNode;g&&a.preventDefault()}this.wg=0}else this.wg=c;this.R.Cd.x=this.R.da.x;this.R.Cd.y=this.R.da.y}if(this.mb)for(e= this.mb;e&&e!=this.control;){if(e.onmouseout)e.onmouseout();if(e.onmouseup)e.onmouseup();e=e.parentNode}a=this.lg(a);this.Jf(a.x-d.x,a.y-d.y);this.be&&b&&this.rm(this.be);this.mb=null;this.R.Xa=!1;this.gi(this.pb);this.be=null}};b.prototype.Yp=function(a){var d=this.qe();this.B.Ab||(this.R.Xa=!1);this.be=null;this.gi(this.pb);a=this.lg(a);this.Jf(a.x-d.x,a.y-d.y)};b.prototype.tl=function(){return null!=this.mb||this.R.Xa};b.prototype.Gl=function(a){!this.xe&&window.MSGesture&&(this.M("setup gesture"), this.xe=new MSGesture,this.xe.target=this.control);this.xe&&this.xe.addPointer(a.pointerId)};b.prototype.Qk=function(a){this.gj=!0;this.Vh=1;this.B.Ab||this.B.md||(a.touches?(this.mb=a.touches.target,this.zc(a.target)&&(a.preventDefault(),this.f.pf=this.f.c,this.ua())):(a.preventDefault(),this.f.pf=this.f.c,this.ua()))};b.prototype.Cn=function(a){this.B.Ab||this.B.md||!this.zc(a.target)||(a.preventDefault(),this.Ba.f.active=!0,this.Ba.f.jc=this.f.pf/Math.sqrt(a.scale),4==this.ra()&&this.Ba.f.jc>this.f.max&& (this.Ba.f.jc=this.f.max),this.update(),this.ua())};b.prototype.Jo=function(a){this.B.Ab||this.B.md||(a.preventDefault(),1!=a.scale&&(this.Ba.f.active=!0,this.Vh*=a.scale,this.Ba.f.jc=this.f.pf/Math.sqrt(this.Vh),4==this.ra()&&this.Ba.f.jc>this.f.max&&(this.Ba.f.jc=this.f.max),this.update(),this.ua()))};b.prototype.Pk=function(a){this.B.Ab||this.B.md||(this.Ba.f.active=!1,a.preventDefault(),this.ua(),this.xe&&this.xe.reset&&this.xe.reset())};b.prototype.yo=function(a){this.B.ue||(this.isFullscreen&& a.preventDefault(),this.Mh=a.keyCode,this.ua())};b.prototype.zo=function(a){this.Mh&&(this.Mh=0,a.preventDefault())};b.prototype.Po=function(){this.Mh=0};b.prototype.Yh=function(){this.isFullscreen&&(this.Ih()||this.exitFullscreen(),this.Ih()&&(this.T.style.left="0px",this.T.style.top="0px"))};b.prototype.Qo=function(a,d,b,c){c?(this.qg.alpha=a,this.qg.beta=d,this.qg.gamma=b,this.qg.gamma+=90):(this.hb.alpha=a,this.hb.beta=d,this.hb.gamma=b,this.hb.gamma+=90);this.hb.orientation=window.orientation? parseInt(""+window.orientation,10):0;b=new n.dk;a=this.hb;b.Ce(-a.alpha);b.De(-a.beta);b.Gd(-a.gamma);b.De(90-a.orientation);1>b.Db?-1this.hb.dg&&(this.hb.dg+=1,h= .1*this.hb.dg);b=-b+this.hb.Ml;this.Af(h*b+(1-h)*this.mg());this.Bf(h*a+(1-h)*this.Ch());this.Bm?this.Ij(h*d+(1-h)*this.Zk()):this.Ij(0);this.Yf();this.u.active=c}};b.prototype.rm=function(a){this.aa&&this.aa.hotspotProxyClick&&this.aa.hotspotProxyClick(a.id,a.url);""!=a.url&&(this.vj(a.url,a.target),this.Jf(-1,-1))};b.prototype.sm=function(a){this.aa&&this.aa.hotspotProxyDoubleClick&&this.aa.hotspotProxyDoubleClick(a.id,a.url)};b.prototype.zh=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.f.c, 90)/360))};b.prototype.Nl=function(){var a=this;setTimeout(function(){a.Nl()},100);9!=a.bi||a.Hh||window.requestAnimationFrame(function(){a.Lg();a.Nc("restart recover timer")});10m;)m+= 360}b=m-f;2!=this.ib&&(180b&&(b+=360));this.pan.c=this.pan.c+b*this.ud}else this.pan.c=m;this.l.Bg=this.pan.c;break;case 1:f=this.i.c;this.Ld&&3!=y.type?(c=m-f,this.i.c=this.i.c+c*this.ud):this.i.c=m;this.l.Cg=this.i.c;break;case 2:f=this.f.c,this.Ld&&3!=y.type?(e=m-f,this.f.c=this.f.c+e*this.ud):this.f.c=m,this.l.Ag=this.f.c}}d=this.ra();for(g=Math.floor(a);!this.af(g,3)&&0a?(d=this.kg(this.Rf),this.f.c>d?this.ph= a:(y=(a-this.ph)/this.Bi,y=Math.min(1,y),this.Pc(this.Ka,this.Rf,1-y))):(0==g.xb||y>g.xb-.3?this.Pc(g.value):(y/=g.xb,this.Pc(d,g.value,1-y)),this.l.Al=g.value);this.Ld&&(b=Math.sqrt(b*b+c*c+e*e),.3>b&&(this.Ld=!1,this.ud=.02,this.Qf=0),0this.Qf&&(this.ud+=.01,this.ud=Math.min(this.ud,1)),this.Qf=b);g=Math.floor(a);if(g!=this.kk)for(this.kk=g,a=this.Dn(g),b=0;bd&&(d=.2));this.u.mj=a.getTime();this.l.gg&&(this.na.ready()||4==this.Ka)&&this.Bh()&&(this.l.gg=!1,this.l.active=!0,this.qb.pd=!0,this.qb.Zi=!1);if(this.u.active||0!=this.u.Eb&&this.na.ready()){if(this.u.Xj&&"__AutoMove"==this.w.bb){var b=a.getTime()-this.u.jk;d=b/100;if(d>=this.w.length){if(this.ji(this.w.length),this.za.splice(this.za.indexOf(this.w),1),this.u.active= !1,this.w=this.u.ik,this.u.Eb=0,this.hi(this.u.pan,this.u.i,this.u.f),this.pan.Hc=this.u.pan,this.i.Hc=this.u.i,this.u.Ig&&(this.u.Ig=!1,this.l.Th=!0,this.l.active=!0,this.ha("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.ji(d)}else{this.pan.d=this.u.pan-this.pan.c;if(360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;1805*b?b/c:.2,this.pan.d*=c,this.i.d*=c,this.f.d*=c;this.pan.c+=this.pan.d;this.i.c+=this.i.d;this.O.c+=this.O.d;this.f.c+=this.f.d;0!=this.u.Eb&&(this.u.Eb!=this.Ka?(d=this.kg(this.u.Eb),this.cj()>d?(this.f.c+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.i.d*this.i.d+this.O.d*this.O.d)/b,1))*b,this.f.d)-this.f.d,this.u.f=this.f.c):(this.nc=this.Ka,this.Ka=this.u.Eb,this.M("New projection from Target:"+this.Ka),this.Kg= this.u.Ng=0,this.na.Gh())):1>this.u.Ng?(this.u.Ng=Math.min(1,this.u.Ng+.05*d),this.Kg=this.u.Ng):(this.nc=0,this.u.Eb=0,this.na.Gh()))}this.jf=a.getTime();this.update()}else if(this.l.active){b=a.getTime()-this.l.startTime;this.l.Ohthis.s.b.duration-this.s.b.currentTime&&(this.Di=!0);c>=10*this.Me;)c-=10*this.Me;if(!e&&d>=this.w.length|| e&&!b&&d>=this.w.length||e&&b&&(this.w.bb!=this.w.Hl||this.w.Wh!=this.Wa)&&d>=this.w.length){this.ji(this.w.length);this.l.Bd=0;this.Ne=!1;if(this.qb.pd){this.cm();return}this.Mb=this.w.Hl;if(this.Mb==this.w.bb&&this.Wa==this.w.Wh){if(1b.pan;)b.pan+=360;b.tilt=c.value;b.fov=e.value;b.projection=g?g.value:4}b.timingFunction=3;b.speed=1;this.u.Ig=!0;this.Uh(b);this.l.active=!0}}else if(0=1E3*this.l.Xh){if(1=this.Ma.length&&(b=0),d=this.Ma[b];this.l.startTime=a.getTime();this.l.ld=a.getTime();this.l.timeout=0;this.ye("{"+d+"}");this.l.active=!0;this.C.fe=!0}}else b=a.getTime(),c=d=1E3/60,0!=this.l.ld&&(c=b-this.l.ld),this.i.d=this.l.pi*(0-this.i.c)/100,this.f.d=this.l.pi*(this.f.Qa-this.f.c)/100,this.pan.d=.95*this.pan.d+-this.l.speed*this.zh()*.05,d=c/d,this.pan.c+=this.pan.d*d,this.i.c+= this.i.d*d,this.f.c+=this.f.d*d,this.l.ld=b,this.update();3E31E3*this.l.timeout&&!this.l.gg&&(this.l.Wg&&this.Bh()||!this.l.Wg)&&(this.l.active=!0,this.l.startTime=a.getTime(),this.l.ld=0,this.ha("autorotatechanged",{}),this.pan.d= 0,this.i.d=0,this.f.d=0),!this.Ba.enabled||this.R.Xa||0==this.pan.d&&0==this.i.d&&0==this.f.d||(this.u.Fh=!0,this.pan.d*=.9,this.i.d*=.9,this.f.d*=.9,this.pan.c+=this.pan.d,this.i.c+=this.i.d,this.Ji(this.f.d),1E-4>this.pan.d*this.pan.d+this.i.d*this.i.d+this.f.d*this.f.d&&(this.pan.d=0,this.i.d=0,this.f.d=0),this.update())};b.prototype.Yo=function(a){var d=this.C;if(d.Jd){var b=a.getTime()-d.Im;b/=1E3*d.Hm;1<=b?(d.Jd=!1,this.Gk(),d.Oj=a.getTime(),this.mm(),d.Je=!0,0==d.bc||d.Pf||(4==d.bc?(this.w= this.jg(!0,d.Fe,d.Ge,d.Id),this.Mb=this.w.bb,this.l.active=!0,this.qb.pd=!0):this.moveTo(d.Fe,d.Ge,d.Id,d.de,0,d.sd))):d.Ll(b)}else d.Je&&(b=a.getTime()-d.Oj,b/=1E3*d.Uf,1<=b?(d.Je=!1,this.jf=a.getTime(),this.update(),0!=d.bc&&d.Pf&&(4==d.bc?(this.w=this.jg(!0,d.Fe,d.Ge,d.Id),this.Mb=this.w.bb,this.l.active=!0,this.qb.pd=!0):this.moveTo(d.Fe,d.Ge,d.Id,d.de,0,d.sd)),4!=d.bc&&(this.Pg(d.Sh),this.Qg(d.yi),this.Og(d.Kh),this.l.active=d.fe,this.ha("autorotatechanged",{}),d.fe=!1),this.l.ld=0,this.ga&& this.Pi(),this.Wf=!1):d.Ll(b));d=this.Ro;d.an&&(d.vh?a.getTime()-d.Wi>=1E3*d.un&&(d.vh=!1):(d.current+=d.Yc,0>d.current&&(d.current=0,d.Yc=-d.Yc,d.vh=!0,d.Wi=a.getTime()),1d.Pb[a]?(d.Pb[a]+=.05,d.Qc[a]d.Pb[a]&&(d.Pb[a]=d.Qc[a],-1!=d.ki.indexOf(d.lb[a])&&(d.ki.splice(d.ki.indexOf(d.lb[a]), 1),d.lb.splice(a,1),d.Qc.splice(a,1),d.Pb.splice(a,1)))));this.update()}if(2==d.mode)for(a=0;ab.pa?(b.pa+=d.Yc,b.nbb.pa&&(b.pa=b.nb)),this.update())}3==d.mode&&d.nb!=d.pa&&(d.nb>d.pa?(d.pa+=d.Yc,d.nbd.pa&&(d.pa=d.nb)),this.update())};b.prototype.$o=function(){var a=this.Ba;this.R.Xa&&(this.B.Ad?(a.ca.x=.4*(this.X.da.x-a.da.x),a.ca.y=.4*(this.X.da.y-a.da.y), a.da.x+=a.ca.x,a.da.y+=a.ca.y):(a.ca.x=.1*-this.X.ca.x*this.B.sensitivity/8,a.ca.y=.1*-this.X.ca.y*this.B.sensitivity/8),this.Cm(a.ca.x,a.ca.y),this.update());a.f.active&&(this.pk(.4*(a.f.jc-this.f.c)),.001>Math.abs(a.f.jc-this.f.c)/this.f.c&&(a.f.active=!1),this.update());if(a.enabled&&(0!=a.ca.x||0!=a.ca.y)&&!this.R.Xa){var d=.9*(1-a.Fj);a.ca.x=d*a.ca.x;a.ca.y=d*a.ca.y;this.u.Fh=!0;.01>a.ca.x*a.ca.x+a.ca.y*a.ca.y?(a.ca.x=0,a.ca.y=0):(this.Cm(a.ca.x,a.ca.y),this.update())}};b.prototype.Xo=function(){if(this.B.am&& this.B.Ad){var a=this.Ql;a.pan=this.pan.c;a.i=this.i.c;a.f=this.f.c;this.Ve(a);this.Ve(a);this.Ve(a);var d=a.pan-this.pan.c,b=a.i-this.i.c;a=a.f-this.f.c;if(0!=d||0!=b||0!=a){var c=.2+.9*Math.min((Math.abs(d)+Math.abs(b)+Math.abs(a))/Math.abs(Math.min(this.f.c,90))*.3,1);this.pan.c+=d*c;this.i.c+=b*c;this.f.c+=a*c;this.Ba.Fj=.3;this.update()}else this.Ba.Fj=0}else this.Yf();if(2!=this.ib){for(;360this.pan.c;)this.pan.c+=360}};b.prototype.Zo=function(){if(!this.Bh()&& this.df&&5"+b.nk(this.Qh).replace(/./gm,function(a){return"&#"+a.charCodeAt(0)+";"})),l.setAttribute("style","color: black; text-decoration: none;"), a.appendChild(l),e.appendChild(a));c.T.insertBefore(c.cd,c.T.firstChild);e.onclick=function(){c.cd&&(c.T.removeChild(c.cd),c.cd=null)};e.oncontextmenu=e.onclick}};b.prototype.$m=function(){var a=this;var d=a.Fa;a.control=d;a.control=d;a.xm();setTimeout(function(){a.Lg()},10);setTimeout(function(){a.Nl()},200);setTimeout(function(){a.Le();a.ah()},10);d.addEventListener&&(d.addEventListener("touchstart",function(d){a.aq(d)},!1),d.addEventListener("touchmove",function(d){a.$p(d)},!1),d.addEventListener("touchend", function(d){a.Zp(d)},!1),d.addEventListener("touchcancel",function(d){a.Yp(d)},!1),d.addEventListener("pointerdown",function(d){a.Gl(d)},!1),d.addEventListener("MSPointerDown",function(d){a.Gl(d)},!1),d.addEventListener("MSGestureStart",function(d){a.Qk(d)},!1),d.addEventListener("MSGestureEnd",function(d){a.Pk(d)},!1),d.addEventListener("MSGestureChange",function(d){a.Jo(d)},!1),d.addEventListener("gesturestart",function(d){a.Qk(d)},!1),d.addEventListener("gesturechange",function(d){a.Cn(d)},!1), d.addEventListener("gestureend",function(d){a.Pk(d)},!1),d.addEventListener("mousedown",function(d){a.Go(d)},!1),d.addEventListener("mousemove",function(d){a.Fo(d)},!1),document.addEventListener("mouseup",function(d){a.Eo(d)},!1),d.addEventListener("mousewheel",function(d){a.Fl(d)},!1),d.addEventListener("DOMMouseScroll",function(d){a.Fl(d)},!1),document.addEventListener("keydown",function(d){a.yo(d)},!1),document.addEventListener("keyup",function(d){a.zo(d)},!1),window.addEventListener("orientationchange", function(){a.xm()},!1),window.addEventListener("resize",function(){a.Le()},!1),window.addEventListener("blur",function(){a.Po()},!1),a.T.addEventListener("webkitfullscreenchange",function(){a.Yh()},!1),document.addEventListener("mozfullscreenchange",function(){a.Yh()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Yh()},!1),document.addEventListener("MSFullscreenChange",function(){a.Yh()},!1));d.oncontextmenu=function(d){void 0===d&&(d=window.event);if(d.target&&!a.zc(d.target))return!0; if(!d.ctrlKey){d=a.lg(d);var b=a.qe();a.Jp(d.x-b.x,d.y-b.y);return!1}return!0};window.addEventListener("deviceorientation",function(d){a.Qo(d.alpha,d.beta,d.gamma,d.absolute)})};b.prototype.hk=function(){for(var a=0;ad&&(d=0),d>a.Sf.duration&&(d=a.Sf.duration-.1),a.dn(d)):a.b&&(0>d&&(d=0),d>a.b.duration&&(d=a.b.duration- .1),a.b.currentTime=d))};b.prototype.Gp=function(a,d){if(this.Fb){var b=this.ia;b&&b.setVolume(a,d)}else try{b=void 0;var c=Number(d);1c&&(c=0);"_videopanorama"===a&&this.s.b&&(this.s.b.volume=c);if("_main"===a){this.V=c;for(b=0;bb&&(b=0);this.V=b;for(c=0;cb&&(b=0);g.level=b;g.b&&null!=g.b.volume&&(g.b.volume=b*this.V)}}}catch(f){this.M(f)}};b.prototype.rp=function(a,d){a=this.Ib(a);for(var b=0;bb&&(b=this.qc);for(d=0;6>d;d++){var c=this.ob.cb[d];a?(c.width=this.Vf,c.height=this.Vf):(c.K=document.createElement("canvas"),c.K.width=this.qc,c.K.height=this.qc,c.width=this.qc,c.height=this.qc,c.Pa=c.K.getContext("2d"));var e="position:absolute;";e+="left: 0px;";e+="top: 0px;";e+="width: "+b+"px;";e+="height: "+b+"px;";a&&(e+="outline: 1px solid transparent;");e+=this.Ia+"transform-origin: 0% 0%;";e+="-webkit-user-select: none;";e+=this.Ia+"transform: ";var g="";var f=1;this.uf&& (f=100);g=4>d?g+("rotateY("+-90*d+"deg)"):g+("rotateX("+(4==d?-90:90)+"deg)");this.uf&&(g+=" scale("+f+")");g+=" translate3d("+-b/2+"px,"+-b/2+"px,"+-b*f/(2*this.Gf)+"px)";e+=g+";";c.dl=g;a||(c.K.setAttribute("style",e),this.D.insertBefore(c.K,this.D.firstChild))}if(!a){for(d=0;6>d;d++)c=this.ob.cb[d],""!=this.Xe[d]&&(c.Ed=new Image,c.Ed.crossOrigin=this.crossOrigin,c.Ed.onload=this.yk(c),c.Ed.setAttribute("src",this.kc(this.Xe[d])),this.Sb.push(c.Ed));for(d=0;6>d;d++)c=this.ob.cb[d],c.loaded=!1, c.h=new Image,c.h.crossOrigin=this.crossOrigin,c.h.onload=this.yk(c),c.h.setAttribute("src",this.kc(this.th[d])),this.Sb.push(c.h)}};b.prototype.di=function(){var a;this.Ba.ca.x=0;this.Ba.ca.y=0;if(this.Uc){for(a=0;aa.rg?a.ih:a.rg};b.prototype.Aj=function(a,b){var d=(new DOMParser).parseFromString(a,"text/xml");this.Si=a;this.Sl(d,b);this.ia&&(this.M("Apply to Flash player"), this.ia.readConfigString(this.Si),this.ia.setLocked(!0),this.ia.setSlaveMode(!0))};b.prototype.Rl=function(a,b,c){try{var d=void 0;d=new XMLHttpRequest;d.open("GET",a,!1);d.send(null);if(d.responseXML){var e=a.lastIndexOf("/");0<=e&&(this.Nd=a.substr(0,e+1));2<=arguments.length&&null!=b&&(this.Nd=b);this.Aj(d.responseText,c)}else alert("Error loading panorama XML")}catch(r){alert("Error:"+r)}};b.prototype.ep=function(a,b,c,e){var d=new XMLHttpRequest;var l=this;d.onload=function(h){if(4<=d.readyState)if(d.responseXML){var k= a.lastIndexOf("/");0<=k&&(l.Nd=a.substr(0,k+1));3<=arguments.length&&null!=c&&(l.Nd=c);l.Aj(d.responseText,e);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+d.statusText)};d.onerror=function(){console.error("Error loading XML:"+d.statusText)};d.open("GET",a,!0);d.send(null)};b.prototype.Ii=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));(a=this.Pd[b])&&(b=a);a={oldNodeId:this.Wa,nodeId:b};this.ha("beforechangenodeid",a);""!=this.Wa&& -1==this.$j.indexOf(this.Wa)&&this.$j.push(this.Wa);this.zl=this.Wa;this.Wa=b;this.M("change active node: "+b);this.aa&&this.aa.changeActiveNode&&this.aa.changeActiveNode("{"+b+"}");this.ha("changenodeid",a)};b.prototype.Rk=function(){return this.Wa};b.prototype.Vk=function(){if(0=this.Ma.length&&(a=0);return this.Ma[a]}return""};b.prototype.jo=function(){if(0a&&(a=this.Ma.length-1);return this.Ma[a]}return""}; b.prototype.Qn=function(){return this.zl};b.prototype.No=function(a){return-1!=this.$j.indexOf(a)};b.prototype.Sl=function(a,b){var d=a.firstChild;this.Ie=[];this.Ma=[];this.Pd=[];for(a=d.firstChild;a;){if("map"==a.nodeName){var c={},e=a.getAttributeNode("title");e&&(c.title=e.nodeValue.toString());e=a.getAttributeNode("type");c.type=e.nodeValue.toString();"web"==c.type?(e=a.getAttributeNode("mapprovider"),c.mapprovider=e.nodeValue.toString(),(e=a.getAttributeNode("mapstyle"))&&(c.mapstyle=e.nodeValue.toString()), (e=a.getAttributeNode("googlecustomstylecode"))&&(c.googlecustomstylecode=e.nodeValue.toString()),(e=a.getAttributeNode("mapurltemplate"))&&(c.mapurltemplate=e.nodeValue.toString()),(e=a.getAttributeNode("mapmaxzoom"))&&(c.mapmaxzoom=Number(e.nodeValue)),(e=a.getAttributeNode("mapkey"))&&(c.mapkey=e.nodeValue.toString()),(e=a.getAttributeNode("styleurl"))&&(c.styleurl=e.nodeValue.toString())):(e=a.getAttributeNode("width"),c.width=Number(e.nodeValue),e=a.getAttributeNode("height"),c.height=Number(e.nodeValue), e=a.getAttributeNode("zoomlevels"),c.zoomlevels=Number(e.nodeValue),e=a.getAttributeNode("tileformat"),c.tileformat=e.nodeValue.toString(),e=a.getAttributeNode("bgcolor"),c.bgcolor=e.nodeValue.toString(),e=a.getAttributeNode("transparent"),c.transparent=1==e.nodeValue,e=a.getAttributeNode("floorplannorth"),c.floorplannorth=Number(e.nodeValue));e=a.getAttributeNode("id");this.Rh[e.nodeValue.toString()]=c}a=a.nextSibling}if("tour"==d.nodeName){this.hf=!0;a="";(e=d.getAttributeNode("start"))&&(a=e.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="");c=d.firstChild;var g="";for(d="";c;){if("panorama"==c.nodeName){if(e=c.getAttributeNode("id"))g=e.nodeValue.toString(),""==a&&(a=g),""==d&&(d=g),this.Ie[g]=c,this.Ma.push(g);for(e=c.firstChild;e;){if("userdata"==e.nodeName){var f= this.cg(e);this.xi[g]=f;f.customnodeid&&(this.Pd[f.customnodeid]=g);this.Bc[g]=this.Dk(e);this.mf[g]=this.Ek(e)}e=e.nextSibling}}if("masternode"==c.nodeName)for(e=c.firstChild;e;)"userdata"==e.nodeName&&(f=this.cg(e),this.xi._master=f),e=e.nextSibling;c=c.nextSibling}this.Ie.hasOwnProperty(a)||(e=this.Pd[a])&&(a=e);this.Ie.hasOwnProperty(a)||(this.Nc("Start node "+a+" not found!"),a=d);this.zj(this.Ie[a],b);this.Ii("{"+a+"}");this.Wa=a}else this.hf=!1,this.zj(d,b),this.Ii(""),this.Ma.push("");this.ha("configloaded", {})};b.prototype.zj=function(a,b){this.Xl();this.Ga&&this.Ga.gp();this.xf(this.pb);this.di();this.yg=0;for(var d=a.firstChild,c,e,g=0;d;){if("view"==d.nodeName){if(c=d.getAttributeNode("fovmode"))this.f.mode=Number(c.nodeValue);c=d.getAttributeNode("pannorth");this.pan.uj=1*(c?c.nodeValue:0);for(var f=d.firstChild;f;){"start"==f.nodeName&&(c=f.getAttributeNode("pan"),this.pan.c=Number(c?c.nodeValue:0),this.pan.Qa=this.pan.c,c=f.getAttributeNode("tilt"),this.i.c=Number(c?c.nodeValue:0),this.i.Qa=this.i.c, c=f.getAttributeNode("roll"),this.O.c=Number(c?c.nodeValue:0),this.O.Qa=this.O.c,c=f.getAttributeNode("fov"),this.f.c=Number(c?c.nodeValue:70),this.f.Qa=this.f.c,c=f.getAttributeNode("projection"),this.Zh=Number(c?c.nodeValue:4),this.Pc(this.Zh));"min"==f.nodeName&&(c=f.getAttributeNode("pan"),this.pan.min=1*(c?c.nodeValue:0),c=f.getAttributeNode("tilt"),this.i.min=1*(c?c.nodeValue:-90),c=f.getAttributeNode("fov"),this.f.min=1*(c?c.nodeValue:5),1E-20>this.f.min&&(this.f.min=1E-20),c=f.getAttributeNode("fovpixel"), this.f.Hg=1*(c?c.nodeValue:0));if("max"==f.nodeName){c=f.getAttributeNode("pan");this.pan.max=1*(c?c.nodeValue:0);c=f.getAttributeNode("tilt");this.i.max=1*(c?c.nodeValue:90);c=f.getAttributeNode("fov");this.f.max=1*(c?c.nodeValue:120);180<=this.f.max&&(this.f.max=179.9);if(c=f.getAttributeNode("fovstereographic"))this.f.sj=1*c.nodeValue;if(c=f.getAttributeNode("fovfisheye"))this.f.rj=1*c.nodeValue;if(c=f.getAttributeNode("scaletofit"))this.B.bm=1==c.nodeValue}if("flyin"==f.nodeName){if(c=f.getAttributeNode("projection"))this.tc.Eb= Number(c.nodeValue);if(c=f.getAttributeNode("pan"))this.tc.pan=parseFloat(c.nodeValue);if(c=f.getAttributeNode("tilt"))this.tc.i=parseFloat(c.nodeValue);if(c=f.getAttributeNode("fov"))this.tc.f=parseFloat(c.nodeValue)}f=f.nextSibling}}if("autorotate"==d.nodeName){if(c=d.getAttributeNode("speed"))this.l.speed=1*c.nodeValue;if(c=d.getAttributeNode("delay"))this.l.timeout=1*c.nodeValue;if(c=d.getAttributeNode("returntohorizon"))this.l.pi=1*c.nodeValue;if(c=d.getAttributeNode("nodedelay"))this.l.Xh=1* c.nodeValue;if(c=d.getAttributeNode("noderandom"))this.l.tj=1==c.nodeValue;this.Rd&&(this.l.enabled=!0,this.l.Pe=!0,this.l.active=!1);this.l.Bd=0;if(c=d.getAttributeNode("startloaded"))this.l.Wg=1==c.nodeValue,this.l.Wg&&(this.l.active=!1);if(c=d.getAttributeNode("useanimation"))this.l.gh=1==c.nodeValue,this.l.Kf=this.l.gh;if(c=d.getAttributeNode("syncanimationwithvideo"))this.l.Qj=1==c.nodeValue}if("animation"==d.nodeName){if(c=d.getAttributeNode("syncanimationwithvideo"))this.l.Qj=1==c.nodeValue; if(c=d.getAttributeNode("useinautorotation"))this.l.gh=1==c.nodeValue;if(c=d.getAttributeNode("animsequence"))this.l.qh=c.nodeValue,this.Rd&&(this.l.Md=this.l.qh);this.za=[];for(f=d.firstChild;f;){if("clip"==f.nodeName){this.w=new n.ck;if(c=f.getAttributeNode("animtitle"))this.w.Oe=c.nodeValue.toString();if(c=f.getAttributeNode("cliptitle"))this.w.bb=c.nodeValue.toString();if(c=f.getAttributeNode("nodeid"))this.w.xq=c.nodeValue.toString();if(c=f.getAttributeNode("length"))this.w.length=Number(c.nodeValue); if(c=f.getAttributeNode("animtype"))this.w.Xm=Number(c.nodeValue);if(c=f.getAttributeNode("nextcliptitle"))this.w.Hl=c.nodeValue.toString();if(c=f.getAttributeNode("nextclipnodeid"))this.w.Wh=c.nodeValue.toString();if(c=f.getAttributeNode("nextclipstartview"))this.w.Mo=c.nodeValue.toString();if(c=f.getAttributeNode("transitiontype"))this.w.bq=Number(c.nodeValue);var m=f.firstChild;for(this.w.W=[];m;){if("keyframe"==m.nodeName){var y=new n.Gc;if(c=m.getAttributeNode("time"))y.time=Number(c.nodeValue); if(c=m.getAttributeNode("value"))y.value=Number(c.nodeValue);if(c=m.getAttributeNode("valuestring"))y.Yj=c.nodeValue.toString();if(c=m.getAttributeNode("transitiontime"))y.xb=Number(c.nodeValue);c=m.getAttributeNode("type");var p=0;c&&(y.type=Number(c.nodeValue),p=Number(c.nodeValue));if(c=m.getAttributeNode("property"))y.ub=Number(c.nodeValue);if(c=m.getAttributeNode("additionaltrackid"))y.oh=c.nodeValue.toString();if(1==p||2==p){if(c=m.getAttributeNode("bezierintime"))y.ge=Number(c.nodeValue);if(c= m.getAttributeNode("bezierinvalue"))y.Xc=Number(c.nodeValue);if(c=m.getAttributeNode("bezierouttime"))y.he=Number(c.nodeValue);if(c=m.getAttributeNode("bezieroutvalue"))y.ie=Number(c.nodeValue)}this.w.W.push(y)}m=m.nextSibling}this.za.push(this.w)}f=f.nextSibling}}"input"==d.nodeName&&(e||(e=d));if(e)for(m=0;6>m;m++)c=e.getAttributeNode("prev"+m+"url"),this.Xe[m]=c?String(c.nodeValue):"";"altinput"==d.nodeName&&(f=0,(c=d.getAttributeNode("screensize"))&&(f=1*c.nodeValue),0g&&(g= f,e=d));if("control"==d.nodeName&&this.Rd){if(c=d.getAttributeNode("simulatemass"))this.Ba.enabled=1==c.nodeValue;if(c=d.getAttributeNode("rubberband"))this.B.am=1==c.nodeValue;if(c=d.getAttributeNode("locked"))this.B.Ab=1==c.nodeValue;c&&(this.B.ue=1==c.nodeValue);if(c=d.getAttributeNode("lockedmouse"))this.B.Ab=1==c.nodeValue;if(c=d.getAttributeNode("lockedkeyboard"))this.B.ue=1==c.nodeValue;if(c=d.getAttributeNode("lockedkeyboardzoom"))this.B.Co=1==c.nodeValue;if(c=d.getAttributeNode("lockedwheel"))this.B.md= 1==c.nodeValue;if(c=d.getAttributeNode("invertwheel"))this.B.ml=1==c.nodeValue;if(c=d.getAttributeNode("speedwheel"))this.B.jm=1*c.nodeValue;if(c=d.getAttributeNode("invertcontrol"))this.B.Ad=1==c.nodeValue;if(c=d.getAttributeNode("sensitivity"))this.B.sensitivity=1*c.nodeValue,1>this.B.sensitivity&&(this.B.sensitivity=1);if(c=d.getAttributeNode("dblclickfullscreen"))this.B.Ui=1==c.nodeValue;if(c=d.getAttributeNode("contextfullscreen"))this.B.$f=1==c.nodeValue;if(c=d.getAttributeNode("contextprojections"))this.B.rh= 1==c.nodeValue;if(c=d.getAttributeNode("hideabout"))this.B.ef=1==c.nodeValue;for(f=d.firstChild;f;)"menulink"==f.nodeName&&(m={text:"",url:""},c=f.getAttributeNode("text"),m.text=c.nodeValue,c=f.getAttributeNode("url"),m.url=c.nodeValue,this.Gg.push(m)),f=f.nextSibling}if("transition"==d.nodeName&&this.Rd){if(c=d.getAttributeNode("enabled"))this.C.enabled=1==c.nodeValue;if(c=d.getAttributeNode("blendtime"))this.C.Uf=1*c.nodeValue;if(c=d.getAttributeNode("blendcolor"))this.C.Re=c.nodeValue.toString(); if(c=d.getAttributeNode("type"))this.C.type=c.nodeValue.toString();if(c=d.getAttributeNode("softedge"))this.C.Dc=1*c.nodeValue;if(c=d.getAttributeNode("zoomin"))this.C.Oa=1*c.nodeValue;if(c=d.getAttributeNode("zoomout"))this.C.bc=1*c.nodeValue;if(c=d.getAttributeNode("zoomfov"))this.C.Of=1*c.nodeValue;if(c=d.getAttributeNode("zoomspeed"))this.C.de=1*c.nodeValue;if(c=d.getAttributeNode("zoomoutpause"))this.C.Pf=1==c.nodeValue;"cut"==this.C.type&&(this.C.Uf=0)}if("soundstransition"==d.nodeName){if(c= d.getAttributeNode("enabled"))this.La.enabled=1==c.nodeValue;if(c=d.getAttributeNode("transitiontime"))this.La.xb=1*c.nodeValue;if(c=d.getAttributeNode("crossfade"))this.La.xk=1==c.nodeValue}if("flyintransition"==d.nodeName){if(c=d.getAttributeNode("enabled"))this.qb.enabled=1==c.nodeValue&&this.Y;if(c=d.getAttributeNode("speed"))this.qb.speed=1*c.nodeValue}"userdata"==d.nodeName&&(this.userdata=this.Lf=this.cg(d),this.Bc[a.id]||(this.Bc[a.id]=this.Dk(d),this.mf[a.id]=this.Ek(d)));if("hotspots"== d.nodeName)for(f=d.firstChild;f;){if("label"==f.nodeName&&this.Rd){m=this.A.Sj;if(c=f.getAttributeNode("enabled"))m.enabled=1==c.nodeValue;if(c=f.getAttributeNode("width"))m.width=1*c.nodeValue;if(c=f.getAttributeNode("height"))m.height=1*c.nodeValue;if(c=f.getAttributeNode("textcolor"))m.Tj=1*c.nodeValue;if(c=f.getAttributeNode("textalpha"))m.Rj=1*c.nodeValue;if(c=f.getAttributeNode("background"))m.background=1==c.nodeValue;if(c=f.getAttributeNode("backgroundalpha"))m.dc=1*c.nodeValue;if(c=f.getAttributeNode("backgroundcolor"))m.ec= 1*c.nodeValue;if(c=f.getAttributeNode("border"))m.Gi=1*c.nodeValue;if(c=f.getAttributeNode("bordercolor"))m.hc=1*c.nodeValue;if(c=f.getAttributeNode("borderalpha"))m.gc=1*c.nodeValue;if(c=f.getAttributeNode("borderradius"))m.Fi=1*c.nodeValue;if(c=f.getAttributeNode("wordwrap"))m.zi=1==c.nodeValue}if("polystyle"==f.nodeName&&this.Rd){if(c=f.getAttributeNode("mode"))this.A.mode=1*c.nodeValue;if(c=f.getAttributeNode("bordercolor"))this.A.hc=1*c.nodeValue;if(c=f.getAttributeNode("backgroundcolor"))this.A.ec= 1*c.nodeValue;if(c=f.getAttributeNode("borderalpha"))this.A.gc=1*c.nodeValue;if(c=f.getAttributeNode("backgroundalpha"))this.A.dc=1*c.nodeValue;if(c=f.getAttributeNode("handcursor"))this.A.cf=1==c.nodeValue}c=void 0;"hotspot"==f.nodeName&&(c=new n.mh(this),c.type="point",c.Ob(f),this.P.push(c));"polyhotspot"==f.nodeName&&(c=new n.mh(this),c.type="poly",c.Ob(f),this.P.push(c));f=f.nextSibling}if("sounds"==d.nodeName||"media"==d.nodeName)for(f=d.firstChild;f;){if("sound"==f.nodeName&&!this.Il)for(c= new n.Rm(this),c.Ob(f),this.Fb||c.addElement(),m=0;mm;m++)(c=e.getAttributeNode("tile"+m+"url"))&&(this.th[m]=String(c.nodeValue)),c=e.getAttributeNode("tile"+m+"url1");for(m=0;6>m;m++)(c=e.getAttributeNode("prev"+m+"url"))&&(this.Xe[m]=String(c.nodeValue));if(c=e.getAttributeNode("tilesize"))this.qc=1*c.nodeValue;if(c=e.getAttributeNode("canvassize"))this.Vf=Number(c.nodeValue);if(c=e.getAttributeNode("tilescale"))this.Gf= 1*c.nodeValue;if(c=e.getAttributeNode("leveltileurl"))this.h.El=c.nodeValue;if(c=e.getAttributeNode("leveltilesize"))this.h.G=Number(c.nodeValue);if(c=e.getAttributeNode("levelbias"))this.h.Cl=Number(c.nodeValue);if(c=e.getAttributeNode("levelbiashidpi"))this.h.Dl=Number(c.nodeValue);c=e.getAttributeNode("overlap");this.$a.O=0;this.$a.pitch=0;c&&(this.h.Ja=Number(c.nodeValue));if(c=e.getAttributeNode("levelingroll"))this.$a.O=Number(c.nodeValue);if(c=e.getAttributeNode("levelingpitch"))this.$a.pitch= Number(c.nodeValue);this.ib=0;(c=e.getAttributeNode("flat"))&&1==c.nodeValue&&(this.ib=2);c=e.getAttributeNode("width");this.h.width=1*(c?c.nodeValue:1);c=e.getAttributeNode("height");this.h.height=1*(c?c.nodeValue:this.h.width);this.s.src=[];this.h.J=[];for(f=e.firstChild;f;){if("preview"==f.nodeName){if(c=f.getAttributeNode("color"))this.h.sf=c.nodeValue;if(c=f.getAttributeNode("strip"))this.h.Pl=1==c.nodeValue}if("video"==f.nodeName){if(c=f.getAttributeNode("format"))"3x2"==c.nodeValue&&(this.s.format= 14),"equirectangular"==c.nodeValue&&(this.s.format=1);if(c=f.getAttributeNode("flipy"))this.s.bj=Number(c.nodeValue);if(c=f.getAttributeNode("startmutedmobile"))this.s.lm=1==c.nodeValue;if(c=f.getAttributeNode("bleed"))this.s.Qe=Number(c.nodeValue);if(c=f.getAttributeNode("endaction"))this.s.me=String(c.nodeValue);if(c=f.getAttributeNode("width"))this.s.width=Number(c.nodeValue);if(c=f.getAttributeNode("height"))this.s.height=Number(c.nodeValue);for(m=f.firstChild;m;)"source"==m.nodeName&&(c=m.getAttributeNode("url"))&& this.s.src.push(c.nodeValue.toString()),m=m.nextSibling}if("level"==f.nodeName){e=new n.fk;c=f.getAttributeNode("width");e.width=1*(c?c.nodeValue:1);c=f.getAttributeNode("height");e.height=1*(c?c.nodeValue:e.width);if(c=f.getAttributeNode("preload"))e.cache=1==c.nodeValue;if(c=f.getAttributeNode("preview"))e.rf=1==c.nodeValue;e.L=Math.floor((e.width+this.h.G-1)/this.h.G);e.ea=Math.floor((e.height+this.h.G-1)/this.h.G);this.h.J.push(e)}f=f.nextSibling}this.h.nj=this.h.J.length}this.df=!0;this.bh&& (this.Y=this.Uc=!1,this.ic||(this.M("dummy rendering"),this.ic=document.createElement("canvas"),this.ic.width=100,this.ic.height=100,this.ic.id="dummycanvas",this.D.appendChild(this.ic)),this.Tc());this.Y&&this.H&&(this.na.kl(this.Gf),this.na.ll());this.Uc&&(0a;a++){var h=a%3*f+q.s.Qe;var k=h+f-2*q.s.Qe;var g=4;3>a&&(g+=f);var l=g+f-2*q.s.Qe;for(b=0;4>b;b++){c.x=-1;c.y=-1;c.z=1;for(var m=0;ma.time&&this.w.W[b].timea.Sc;)a.Sc=a.Sc+360;for(;180e;)e+=360;for(;180x)for(;t<=f&&u>x;)u=new n.rc,u.Ei(w,B,C,z,t),u=u.y,t++;else t=1;t>=.8*f&&(q=t=Math.round(.8*f));0==t&&(t=1);x=void 0;4==a.Tg?x=120:x=this.kg(a.Tg);u=a.Ff;if(u>x)for(;v>t&&u>x;)u=new n.rc,u.Ei(w,B,C,z,v),u=u.y,v--}w=new n.Gc;w.time=0;w.ub=0;w.value=a.Ef;w.type=1;w.he=f/3;w.ie=a.Ye?a.Ef:a.Ef+e/3; b.W.push(w);w=new n.Gc;w.time=0;w.ub=1;w.value=a.Ug;w.type=1;w.he=f/3;w.ie=a.Ye?a.Ug:a.Ug+g/3;b.W.push(w);w=new n.Gc;w.time=0;w.ub=2;w.value=a.Hd;w.type=1;w.he=f/3;w.ie=a.Ye?a.Hd:a.Hd+r/3;b.W.push(w);w=new n.Gc;w.time=0;w.ub=3;w.value=a.Tg;w.type=0;w.xb=0;b.W.push(w);c&&(w=new n.Gc,w.time=t,w.ub=3,w.value=a.sd,w.type=0,w.xb=v-t,b.W.push(w));w=new n.Gc;w.time=f;w.ub=0;w.value=a.Ef+e;w.type=1;w.ge=2*f/3;a.ke&&!a.le?w.Xc=w.value:w.Xc=w.value-e/3;a.le&&(w.he=f+y,w.ie=w.value+y/f*e);b.W.push(w);w=new n.Gc; w.time=f;w.ub=1;w.value=a.ae;w.type=1;w.ge=2*f/3;a.ke&&!a.le?w.Xc=a.ae:w.Xc=a.ae-g/3;a.le&&(w.he=f+y,w.ie=w.value+y/f*g);b.W.push(w);w=new n.Gc;w.time=q;w.ub=2;w.value=p;w.type=1;w.ge=2*q/3;a.ke?w.Xc=p:w.Xc=p-r/3;b.W.push(w);a.le&&(w=new n.Gc,w.time=f+m,w.ub=0,w.value=a.Sc,w.type=1,w.ge=f+m-y,w.Xc=a.Sc,b.W.push(w),w=new n.Gc,w.time=f+m,w.ub=1,w.value=a.ae,w.type=1,w.ge=f+m-y,w.Xc=a.ae,b.W.push(w));this.za.push(b);return b};b.prototype.oq=function(){this.s.b&&this.s.b.play()};b.prototype.pq=function(){this.s.b&& (this.s.b.pause(),this.s.b.currentTime=0)};b.prototype.nq=function(){this.s.b&&this.s.b.pause()};b.prototype.Fp=function(a){this.s.b&&(0>a&&(a=0),a>this.s.b.duration&&(a=this.s.b.duration-.1),this.s.b.currentTime=a,this.update())};b.prototype.po=function(){return this.s.b?this.s.b.currentTime:0};b.prototype.oo=function(){if(this.s.b)return this.s.b};b.prototype.Ep=function(a){if(this.s.b){var b=!this.s.b.paused&&!this.s.b.ended,c=this.s.b.currentTime;this.s.b.pause();isNaN(parseInt(a,10))?this.s.b.src= String(a):this.s.b.src=this.s.src[parseInt(a,10)];b&&(this.s.b.onloadedmetadata=function(){this.currentTime=c;this.play();this.onloadedmetadata=null});this.s.b.currentTime=c}};b.prototype.vn=function(){this.Il=!0};return b}();n.a=c})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=U;window.ggHasWebGL=V;window.pano2vrPlayer=ggP2VR.a;ggP2VR.a.prototype.getVersion=ggP2VR.a.prototype.cl;ggP2VR.a.prototype.readConfigString=ggP2VR.a.prototype.Aj;ggP2VR.a.prototype.readConfigUrl=ggP2VR.a.prototype.Rl; ggP2VR.a.prototype.readConfigUrlAsync=ggP2VR.a.prototype.ep;ggP2VR.a.prototype.readConfigXml=ggP2VR.a.prototype.Sl;ggP2VR.a.prototype.openUrl=ggP2VR.a.prototype.vj;ggP2VR.a.prototype.openNext=ggP2VR.a.prototype.ye;ggP2VR.a.prototype.setMargins=ggP2VR.a.prototype.qp;ggP2VR.a.prototype.addListener=ggP2VR.a.prototype.addListener;ggP2VR.a.prototype.on=ggP2VR.a.prototype.addListener;ggP2VR.a.prototype.removeEventListener=ggP2VR.a.prototype.removeEventListener;ggP2VR.a.prototype.detectBrowser=ggP2VR.a.prototype.Bk; ggP2VR.a.prototype.initWebGL=ggP2VR.a.prototype.Kc;ggP2VR.a.prototype.getPercentLoaded=ggP2VR.a.prototype.eo;ggP2VR.a.prototype.setBasePath=ggP2VR.a.prototype.kp;ggP2VR.a.prototype.getBasePath=ggP2VR.a.prototype.En;ggP2VR.a.prototype.setViewerSize=ggP2VR.a.prototype.gm;ggP2VR.a.prototype.getViewerSize=ggP2VR.a.prototype.so;ggP2VR.a.prototype.setSkinObject=ggP2VR.a.prototype.Ap;ggP2VR.a.prototype.changeViewMode=ggP2VR.a.prototype.jn;ggP2VR.a.prototype.getViewMode=ggP2VR.a.prototype.qo; ggP2VR.a.prototype.changePolygonMode=ggP2VR.a.prototype.rk;ggP2VR.a.prototype.setPolygonMode=ggP2VR.a.prototype.rk;ggP2VR.a.prototype.getPolygonMode=ggP2VR.a.prototype.ho;ggP2VR.a.prototype.showOnePolyHotspot=ggP2VR.a.prototype.hm;ggP2VR.a.prototype.hideOnePolyHotspot=ggP2VR.a.prototype.gl;ggP2VR.a.prototype.changePolyHotspotColor=ggP2VR.a.prototype.gn;ggP2VR.a.prototype.toggleOnePolyHotspot=ggP2VR.a.prototype.Xp;ggP2VR.a.prototype.changeViewState=ggP2VR.a.prototype.kn; ggP2VR.a.prototype.getViewState=ggP2VR.a.prototype.ro;ggP2VR.a.prototype.setRenderFlags=ggP2VR.a.prototype.tp;ggP2VR.a.prototype.getRenderFlags=ggP2VR.a.prototype.ko;ggP2VR.a.prototype.setMaxTileCount=ggP2VR.a.prototype.em;ggP2VR.a.prototype.getVFov=ggP2VR.a.prototype.Jb;ggP2VR.a.prototype.setVFov=ggP2VR.a.prototype.Sg;ggP2VR.a.prototype.getHFov=ggP2VR.a.prototype.In;ggP2VR.a.prototype.updatePanorama=ggP2VR.a.prototype.ah;ggP2VR.a.prototype.isTouching=ggP2VR.a.prototype.tl; ggP2VR.a.prototype.getIsMobile=ggP2VR.a.prototype.Nn;ggP2VR.a.prototype.setIsMobile=ggP2VR.a.prototype.op;ggP2VR.a.prototype.getIsTour=ggP2VR.a.prototype.On;ggP2VR.a.prototype.getIsAutorotating=ggP2VR.a.prototype.Kn;ggP2VR.a.prototype.getIsLoading=ggP2VR.a.prototype.Mn;ggP2VR.a.prototype.getIsLoaded=ggP2VR.a.prototype.Bh;ggP2VR.a.prototype.getIsTileLoading=ggP2VR.a.prototype.Tk;ggP2VR.a.prototype.getLastActivity=ggP2VR.a.prototype.Pn;ggP2VR.a.prototype.getPan=ggP2VR.a.prototype.mg; ggP2VR.a.prototype.getPanNorth=ggP2VR.a.prototype.pe;ggP2VR.a.prototype.getPanDest=ggP2VR.a.prototype.co;ggP2VR.a.prototype.getPanN=ggP2VR.a.prototype.Wk;ggP2VR.a.prototype.setPan=ggP2VR.a.prototype.Af;ggP2VR.a.prototype.setPanNorth=ggP2VR.a.prototype.Hj;ggP2VR.a.prototype.changePan=ggP2VR.a.prototype.qk;ggP2VR.a.prototype.changePanLog=ggP2VR.a.prototype.fn;ggP2VR.a.prototype.getTilt=ggP2VR.a.prototype.Ch;ggP2VR.a.prototype.getTiltDest=ggP2VR.a.prototype.lo;ggP2VR.a.prototype.setTilt=ggP2VR.a.prototype.Bf; ggP2VR.a.prototype.changeTilt=ggP2VR.a.prototype.sk;ggP2VR.a.prototype.changeTiltLog=ggP2VR.a.prototype.hn;ggP2VR.a.prototype.getFov=ggP2VR.a.prototype.cj;ggP2VR.a.prototype.getFovDest=ggP2VR.a.prototype.Hn;ggP2VR.a.prototype.setFov=ggP2VR.a.prototype.yf;ggP2VR.a.prototype.changeFov=ggP2VR.a.prototype.pk;ggP2VR.a.prototype.changeFovLog=ggP2VR.a.prototype.Ji;ggP2VR.a.prototype.getRoll=ggP2VR.a.prototype.Zk;ggP2VR.a.prototype.setRoll=ggP2VR.a.prototype.Ij;ggP2VR.a.prototype.setPanTilt=ggP2VR.a.prototype.sp; ggP2VR.a.prototype.setPanTiltFov=ggP2VR.a.prototype.hi;ggP2VR.a.prototype.setDefaultView=ggP2VR.a.prototype.mp;ggP2VR.a.prototype.setLocked=ggP2VR.a.prototype.pp;ggP2VR.a.prototype.setLockedMouse=ggP2VR.a.prototype.Pg;ggP2VR.a.prototype.setLockedKeyboard=ggP2VR.a.prototype.Og;ggP2VR.a.prototype.getLockedKeyboard=ggP2VR.a.prototype.Rn;ggP2VR.a.prototype.setLockedWheel=ggP2VR.a.prototype.Qg;ggP2VR.a.prototype.moveTo=ggP2VR.a.prototype.moveTo;ggP2VR.a.prototype.moveToEx=ggP2VR.a.prototype.Uh; ggP2VR.a.prototype.moveToDefaultView=ggP2VR.a.prototype.Ho;ggP2VR.a.prototype.moveToDefaultViewEx=ggP2VR.a.prototype.Io;ggP2VR.a.prototype.addHotspotElements=ggP2VR.a.prototype.hk;ggP2VR.a.prototype.playSound=ggP2VR.a.prototype.Ae;ggP2VR.a.prototype.playPauseSound=ggP2VR.a.prototype.Ol;ggP2VR.a.prototype.playStopSound=ggP2VR.a.prototype.bp;ggP2VR.a.prototype.pauseSound=ggP2VR.a.prototype.wj;ggP2VR.a.prototype.activateSound=ggP2VR.a.prototype.Um;ggP2VR.a.prototype.soundGetTime=ggP2VR.a.prototype.Kp; ggP2VR.a.prototype.soundSetTime=ggP2VR.a.prototype.Lp;ggP2VR.a.prototype.setMediaVisibility=ggP2VR.a.prototype.rp;ggP2VR.a.prototype.isPlaying=ggP2VR.a.prototype.Ub;ggP2VR.a.prototype.stopSound=ggP2VR.a.prototype.mi;ggP2VR.a.prototype.setVolume=ggP2VR.a.prototype.Gp;ggP2VR.a.prototype.changeVolume=ggP2VR.a.prototype.ln;ggP2VR.a.prototype.removeHotspots=ggP2VR.a.prototype.Xl;ggP2VR.a.prototype.getHotspotsVisible=ggP2VR.a.prototype.Sk;ggP2VR.a.prototype.getCurrentPerspective=ggP2VR.a.prototype.fd; ggP2VR.a.prototype.addHotspot=ggP2VR.a.prototype.Vm;ggP2VR.a.prototype.updateHotspot=ggP2VR.a.prototype.fq;ggP2VR.a.prototype.removeHotspot=ggP2VR.a.prototype.fp;ggP2VR.a.prototype.setActiveHotspot=ggP2VR.a.prototype.xf;ggP2VR.a.prototype.getPointHotspotIds=ggP2VR.a.prototype.fo;ggP2VR.a.prototype.getHotspot=ggP2VR.a.prototype.Jn;ggP2VR.a.prototype.setFullscreen=ggP2VR.a.prototype.zf;ggP2VR.a.prototype.toggleFullscreen=ggP2VR.a.prototype.ri;ggP2VR.a.prototype.enterFullscreen=ggP2VR.a.prototype.wn; ggP2VR.a.prototype.exitFullscreen=ggP2VR.a.prototype.exitFullscreen;ggP2VR.a.prototype.getIsFullscreen=ggP2VR.a.prototype.Ln;ggP2VR.a.prototype.startAutorotate=ggP2VR.a.prototype.Pp;ggP2VR.a.prototype.stopAutorotate=ggP2VR.a.prototype.Sp;ggP2VR.a.prototype.toggleAutorotate=ggP2VR.a.prototype.Wp;ggP2VR.a.prototype.startAnimation=ggP2VR.a.prototype.Op;ggP2VR.a.prototype.createLayers=ggP2VR.a.prototype.wk;ggP2VR.a.prototype.removePanorama=ggP2VR.a.prototype.di; ggP2VR.a.prototype.getScreenResolution=ggP2VR.a.prototype.$k;ggP2VR.a.prototype.getMaxScreenResolution=ggP2VR.a.prototype.Uk;ggP2VR.a.prototype.getNodeIds=ggP2VR.a.prototype.Xn;ggP2VR.a.prototype.getNodeUserdata=ggP2VR.a.prototype.dj;ggP2VR.a.prototype.getNodeLatLng=ggP2VR.a.prototype.Yn;ggP2VR.a.prototype.getNodeTitle=ggP2VR.a.prototype.ao;ggP2VR.a.prototype.getCurrentNode=ggP2VR.a.prototype.Rk;ggP2VR.a.prototype.getNextNode=ggP2VR.a.prototype.Vk;ggP2VR.a.prototype.getPrevNode=ggP2VR.a.prototype.jo; ggP2VR.a.prototype.getLastVisitedNode=ggP2VR.a.prototype.Qn;ggP2VR.a.prototype.getCurrentPointHotspots=ggP2VR.a.prototype.Gn;ggP2VR.a.prototype.getPositionAngles=ggP2VR.a.prototype.io;ggP2VR.a.prototype.getPositionRawAngles=ggP2VR.a.prototype.Xk;ggP2VR.a.prototype.nodeVisited=ggP2VR.a.prototype.No;ggP2VR.a.prototype.setElementIdPrefix=ggP2VR.a.prototype.np;ggP2VR.a.prototype.videoPanoPlay=ggP2VR.a.prototype.oq;ggP2VR.a.prototype.videoPanoStop=ggP2VR.a.prototype.pq; ggP2VR.a.prototype.videoPanoPause=ggP2VR.a.prototype.nq;ggP2VR.a.prototype.getVideoPanoTime=ggP2VR.a.prototype.po;ggP2VR.a.prototype.setVideoPanoTime=ggP2VR.a.prototype.Fp;ggP2VR.a.prototype.getVideoPanoObject=ggP2VR.a.prototype.oo;ggP2VR.a.prototype.setVideoPanoSource=ggP2VR.a.prototype.Ep;ggP2VR.a.prototype.getMediaObject=ggP2VR.a.prototype.Vn;ggP2VR.a.prototype.registerVideoElement=ggP2VR.a.prototype.Tl;ggP2VR.a.prototype.disableSoundLoading=ggP2VR.a.prototype.vn; ggP2VR.a.prototype.setCrossOrigin=ggP2VR.a.prototype.lp;ggP2VR.a.prototype.setProjection=ggP2VR.a.prototype.Pc;ggP2VR.a.prototype.getProjection=ggP2VR.a.prototype.ra;ggP2VR.a.prototype.changeProjection=ggP2VR.a.prototype.Ki;ggP2VR.a.prototype.changeProjectionEx=ggP2VR.a.prototype.Ki;ggP2VR.a.prototype.changeLensflares=ggP2VR.a.prototype.en;ggP2VR.a.prototype.setTransition=ggP2VR.a.prototype.Cp;ggP2VR.a.prototype.getMapType=ggP2VR.a.prototype.Un;ggP2VR.a.prototype.getMapDetails=ggP2VR.a.prototype.Tn; ggP2VR.a.prototype.getNodeMapCoords=ggP2VR.a.prototype.Zn;ggP2VR.a.prototype.getNodeMapCoordsInPercent=ggP2VR.a.prototype.$n;ggP2VR.a.prototype.getMapContainingNode=ggP2VR.a.prototype.Sn;ggP2VR.a.prototype.addVariable=ggP2VR.a.prototype.Wm;ggP2VR.a.prototype.setVariableOptions=ggP2VR.a.prototype.fm;ggP2VR.a.prototype.setVariableValue=ggP2VR.a.prototype.$d;ggP2VR.a.prototype.getVariableValue=ggP2VR.a.prototype.no;ggP2VR.a.prototype.setUseGyro=ggP2VR.a.prototype.Dp;ggP2VR.a.prototype.getUseGyro=ggP2VR.a.prototype.mo; ggP2VR.a.prototype.getOS=ggP2VR.a.prototype.bo;ggP2VR.a.prototype.getBrowser=ggP2VR.a.prototype.Fn;ggP2VR.a.prototype.triggerEvent=ggP2VR.a.prototype.ha;