//////////////////////////////////////////////////////////////////////
// Pano2VR 7.0.8/20017 HTML5/CSS3 & WebGL Panorama Player           //
// License: David G Mehas                                           //
// (c) 2023, Garden Gnome Software, https://ggnome.com              //
//////////////////////////////////////////////////////////////////////

var p="function"==typeof Object.defineProperties?Object.defineProperty:function(y,x,v){if(y==Array.prototype||y==Object.prototype)return y;y[x]=v.value;return y};function aa(y){y=["object"==typeof globalThis&&globalThis,y,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var x=0;x<y.length;++x){var v=y[x];if(v&&v.Math==Math)return v}throw Error("Cannot find global object");}var ba=aa(this);
function ca(y,x){if(x)a:{var v=ba;y=y.split(".");for(var f=0;f<y.length-1;f++){var e=y[f];if(!(e in v))break a;v=v[e]}y=y[y.length-1];f=v[y];x=x(f);x!=f&&null!=x&&p(v,y,{configurable:!0,writable:!0,value:x})}}ca("Array.prototype.includes",function(y){return y?y:function(x,v){var f=this;f instanceof String&&(f=String(f));var e=f.length;v=v||0;for(0>v&&(v=Math.max(v+e,0));v<e;v++){var a=f[v];if(a===x||Object.is(a,x))return!0}return!1}});
var __extends=this&&this.__extends||function(){function y(x,v){y=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,e){f.__proto__=e}||function(f,e){for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(f[a]=e[a])};return y(x,v)}return function(x,v){function f(){this.constructor=x}if("function"!==typeof v&&null!==v)throw new TypeError("Class extends value "+String(v)+" is not a constructor or null");y(x,v);x.prototype=null===v?Object.create(v):(f.prototype=v.prototype,new f)}}();
function O(){var y="perspective",x=["Webkit","Moz","O","ms","Ms"],v;for(v=0;v<x.length;v++)"undefined"!==typeof document.documentElement.style[x[v]+"Perspective"]&&(y=x[v]+"Perspective");"undefined"!==typeof document.documentElement.style[y]?"webkitPerspective"in document.documentElement.style?(y=document.createElement("style"),x=document.createElement("div"),v=document.head||document.getElementsByTagName("head")[0],y.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",v.appendChild(y),
x.id="ggswhtml5",document.documentElement.appendChild(x),v=5===x.offsetHeight,y.parentNode.removeChild(y),x.parentNode.removeChild(x)):v=!0:v=!1;return v}function X(){var y;if(y=!!window.WebGLRenderingContext)try{var x=document.createElement("canvas");x.width=100;x.height=100;var v=x.getContext("webgl");v||(v=x.getContext("experimental-webgl"));y=!!v}catch(f){y=!1}return y}var ggP2VR;
(function(y){var x=function(){function a(b){this.o=null;this.ye=this.wo=this.Na=!1;this.pc=!0;this.pd=!1;this.zb=this.Oa=this.Ka=0;this.fov=70;this.Kj=this.Ba=0;this.autoplay=this.jg=this.sf=!1;this.id="";this.u=this.pan=0;this.o=b;this.Pc=this.qc=100;this.Jc=1}a.prototype.yb=function(b){var c;if(c=b.getAttributeNode("id"))this.id=c.nodeValue.toString();if(c=b.getAttributeNode("pan"))this.pan=Number(c.nodeValue);if(c=b.getAttributeNode("tilt"))this.u=Number(c.nodeValue)};a.prototype.Im=function(b){var c=
"",h=this.o,m=!0;if(h.uj){var n=new y.Ua(0,0,-100);n.Ka(-this.u*Math.PI/180);n.Oa(this.pan*Math.PI/180);n.Oa(-h.pan.m*Math.PI/180);n.Ka(h.u.m*Math.PI/180);n.zb(h.W.m*Math.PI/180);.01<=n.z&&(m=!1)}h.Ne&&(c+="perspective("+b+"px) ");c=c+("translate3d(0px,0px,"+b+"px) rotateZ(")+(h.W.m.toFixed(10)+"deg) ");c+="rotateX("+h.u.m.toFixed(10)+"deg) ";c+="rotateY("+(-h.pan.m).toFixed(10)+"deg) ";c+="rotateY("+this.pan.toFixed(10)+"deg) ";c+="rotateX("+(-this.u).toFixed(10)+"deg) ";b=1E4;n=this.j.videoWidth;
var q=this.j.videoHeight;if(0==n||0==q)n=640,q=480;0<this.qc&&(n=this.qc);0<this.Pc&&(q=this.Pc);0<n&&0<q&&(this.j.width=n,this.j.height=q,this.j.style.width=n+"px",this.j.style.height=q+"px");0<this.fov&&(b=n/(2*Math.tan(this.fov/2*Math.PI/180)));c+="translate3d(0px,0px,"+(-b).toFixed(10)+"px) ";c+="rotateZ("+this.zb.toFixed(10)+"deg) ";c+="rotateY("+(-this.Oa).toFixed(10)+"deg) ";c+="rotateX("+this.Ka.toFixed(10)+"deg) ";this.Jc&&1!=this.Jc&&(c+="scaleY("+this.Jc+") ");c+="translate3d("+-n/2+"px,"+
-q/2+"px,0px) ";this.j.style[h.Bd+"Origin"]="0% 0%";this.Na&&(c="",1==this.Ba&&(c+="scale("+Math.min(h.C.width/n,h.C.height/q)+") "),c+="translate3d("+-n/2+"px,"+-q/2+"px,0px) ");this.Gs!=c&&(this.Gs=c,this.j.style[h.Bd]=c,this.j.style.visibility=m&&this.pc&&(!this.sf||this.ye||this.Na)?"visible":"hidden",this.ye&&this.wo==this.Na&&(this.j.style[h.bc]="all 0s linear 0s"),this.wo=this.Na)};a.prototype.Hf=function(b){this.j&&(this.j.style.visibility=b?"visible":"hidden")};a.prototype.le=function(){var b=
this.o;b.oa?(this.j.style.left=b.C.width/2+"px",this.j.style.top=b.C.height/2+"px"):(this.j.style.left=b.margin.left+b.C.width/2+"px",this.j.style.top=b.margin.top+b.C.height/2+"px")};a.prototype.Me=function(){this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=null};a.prototype.Td=function(){};return a}();y.wv=x;var v;(function(a){a[a.background=0]="background";a[a["static"]=1]="static";a[a.surround=2]="surround";a[a.directionalRectangular=3]="directionalRectangular";a[a.effectRectangular=
4]="effectRectangular";a[a.directionalCircular=5]="directionalCircular";a[a.effectCircular=6]="effectCircular";a[a.skinSound=7]="skinSound"})(v||(v={}));var f=function(a){function b(c){c=a.call(this,c)||this;c.ua=!1;c.jk=[];c.Zp=!1;c.stopped=!1;c.muted=!1;c.ap=!1;c.Mg=!1;c.Yk=!1;c.Ql=!1;c.Pd=!1;c.Zb=null;c.eh=null;c.Ai=0;c.Af=0;c.vg=!1;c.Pl=!1;c.j=null;c.url=[];c.loop=0;c.level=1;c.Dc=0;c.mode=1;c.cj=10;c.Eb=0;c.Lg=0;c.wa=1;c.ad=0;c.bd=0;c.cd=0;c.dd=0;c.ug=-1;return c}__extends(b,a);b.prototype.Fm=
function(){var c=this,h=c.j.play();if(void 0!==h)h.then(function(){c.Ve()})["catch"](function(){c.j.pause();c.Zp&&(c.j.muted=!0,c.j.play())})};b.prototype.Up=function(){this.ua&&this.stopped?this.stopped=!1:0==this.loop?this.ua?(this.Zb=null,this.Sd()):this.j.play():0<this.tb?(this.tb--,this.ua||(this.j.currentTime=0),this.Yk&&(this.Jb&&0==this.Jb.gain.value||0==this.vb.gain.value&&0==this.Mb.gain.value&&0==this.Kb.gain.value&&0==this.Lb.gain.value)||(this.ua?(this.Zb=null,this.Sd()):this.j.play())):
this.ua&&(this.Zb=null,this.vg=!1)};b.prototype.Ve=function(){var c=this.o;c.G("Sound: Add WebAudio "+this.id);this.Pd=!1;var h=c.ga;h&&(this.ua||this.mode==v.Fu||(c.G("Sound: Create source element "+this.id),this.source=h.createMediaElementSource(this.j),console.log(this.j.error,this.j.paused),this.j.pause(),this.j.play().then(function(m){return console.log("yeah: ",m)})["catch"](function(m){return console.log("nop ",m)})),this.mode==v.Gv||this.mode==v.zv||this.mode==v.yv?(c.G("Sound: Create directional "+
this.id),this.Ud=h.createChannelSplitter(2),this.vb=h.createGain(),this.Kb=h.createGain(),this.Lb=h.createGain(),this.Mb=h.createGain(),this.ih=h.createChannelMerger(2),this.ua||this.source.connect(this.Ud),this.Ud.connect(this.vb,0),this.Ud.connect(this.Kb,0),this.Ud.connect(this.Lb,1),this.Ud.connect(this.Mb,1),this.vb.connect(this.ih,0,0),this.Kb.connect(this.ih,0,1),this.Lb.connect(this.ih,0,0),this.Mb.connect(this.ih,0,1),this.ih.connect(h.destination),1==this.ug&&(c.G("Sound: Switch to Mono"+
this.id),this.wm())):this.mode!=v.Fu&&(c.G("Create gain Node "+this.id),this.Jb=h.createGain(),this.ua||this.source.connect(this.Jb),this.Jb.connect(h.destination)))};b.prototype.wm=function(){1!=this.ug||this.Pd||!this.Ud||2!=this.mode&&3!=this.mode&&5!=this.mode||(this.Ud.connect(this.Lb,0),this.Ud.connect(this.Mb,0))};b.prototype.si=function(){var c=this.o.ga;this.Na||this.Ql||(this.vb?(this.vb.gain.setValueAtTime(this.ad,c.currentTime),this.Mb.gain.setValueAtTime(this.dd,c.currentTime),this.Kb.gain.setValueAtTime(this.bd,
c.currentTime),this.Lb.gain.setValueAtTime(this.cd,c.currentTime)):this.Jb&&this.Jb.gain.setValueAtTime((this.ad+this.dd)/2,c.currentTime+1))};b.prototype.Lp=function(c){var h=this.o.ga;(-1==c?this.muted:1!=c)?this.muted&&(this.muted=this.j.muted=!1,this instanceof e||this.o.be(this.id)):(this.muted=this.j.muted=!0,this.o.isPlaying(this.id)&&(this.vb?(this.vb.gain.setValueAtTime(0,h.currentTime+1),this.Mb.gain.setValueAtTime(0,h.currentTime+1),this.Kb.gain.setValueAtTime(0,h.currentTime+1),this.Lb.gain.setValueAtTime(0,
h.currentTime+1)):this.Jb&&this.Jb.gain.setValueAtTime(0,h.currentTime+1),this instanceof e||this.o.ei(this.id)))};b.prototype.ik=function(){if(!this.Pd||4==this.mode||6==this.mode){var c=this.o,h=this.o.ga;if((this.j||this.ua)&&!this.muted){var m,n=this.pan-c.pan.m;for(m=this.u-c.u.m;-180>n;)n+=360;for(;180<n;)n-=360;var q=this.Dc,r=this.cj;0==r&&(r=.01);0>r&&(r=c.fov.m);this.jc||(this.jc=new y.Ua,this.jc.Pn(this.pan,this.u));0!=this.mode&&1!=this.mode||!h||this.Jb&&this.Jb.gain.setValueAtTime(this.level*
c.ba*this.wa,h.currentTime);if(2==this.mode&&h){var t=.5*Math.cos(n*Math.PI/180)+.5;this.ad=Math.sqrt(t)*this.wa*this.level*c.ba;this.dd=Math.sqrt(t)*this.wa*this.level*c.ba;this.bd=Math.sqrt(1-t)*this.wa*this.level*c.ba;this.cd=Math.sqrt(1-t)*this.wa*this.level*c.ba;this.si()}if(3==this.mode){n=0>n?n<-this.Eb?n+this.Eb:0:n>this.Eb?n-this.Eb:0;var w=this.level;m=Math.abs(m);m=m<this.Lg?0:m-this.Lg;var z=1-m/r;if(Math.abs(n)>r||0>z)t=w*q*c.ba,h?(this.ad=t*this.wa,this.dd=t*this.wa,this.cd=this.bd=
0,this.si()):this.j.volume=w*q*c.ba;else if(t=1-Math.abs(n/r),h){var A=w*(q+(1-q)*z*t)*c.ba;t=w*q*c.ba;0<=n?(this.ad=A*this.wa,this.dd=t*this.wa):(this.ad=t*this.wa,this.dd=A*this.wa);2*Math.abs(n)<r?(t=1-Math.abs(2*n)/r,A=w*(q+(1-q)*z*t)*c.ba,t=.5*w*(1-q)*z*(1-t)*c.ba,0<=n?(this.dd=A*this.wa,this.cd=t*this.wa,this.bd=0):(this.ad=A*this.wa,this.bd=t*this.wa,this.cd=0)):(t=1-(Math.abs(2*n)-r)/r,A=.5*w*(1-q)*z*t*c.ba,0<=n?(this.cd=A*this.wa,this.bd=0):(this.bd=A*this.wa,this.cd=0));this.si()}else this.j.volume=
w*(q+(1-q)*z*t)*c.ba}this.mode==v.Av&&(Math.abs(n)<this.Eb&&Math.abs(m)<this.Lg?this.Mg||(this.Mg=!0,this.tb=this.loop-1,c.ve||(this.j.play(),this.Pd&&this.Ve())):this.Mg=!1);5==this.mode&&(m=180*Math.acos(c.Pk.Nj(this.jc))/Math.PI,m<this.Eb?h?(this.ad=this.level*c.ba*this.wa,this.dd=this.level*c.ba*this.wa,this.cd=this.bd=0,this.si()):this.j.volume=this.level*c.ba:h?(m<this.Eb+r?(n=0>n?n>-this.Eb?0:n+this.Eb:n<this.Eb?0:n-this.Eb,A=1-Math.max(m-this.Eb,0)/r,t=Math.max(1-Math.abs(n)*Math.cos(this.u*
Math.PI/180)/r,0),0<n?(this.ad=this.level*(A*(1-this.Dc)+this.Dc)*c.ba*this.wa,this.dd=this.level*(A*t*(1-this.Dc)+this.Dc)*c.ba*this.wa,this.bd=0,this.cd=this.level*A*(1-t)*c.ba*this.wa):(this.ad=this.level*(A*t*(1-this.Dc)+this.Dc)*c.ba*this.wa,this.dd=this.level*(A*(1-this.Dc)+this.Dc)*c.ba*this.wa,this.bd=this.level*A*(1-t)*c.ba*this.wa,this.cd=0)):(A=this.level*this.Dc*c.ba,this.ad=A*this.wa,this.dd=A*this.wa,this.cd=this.bd=0),this.si()):(m-=this.Eb,m<r&&0<r?(t=1-Math.abs(m/r),this.j.volume=
this.level*(q+(1-q)*t)*c.ba):this.j.volume=q*c.ba));6==this.mode&&(m=180*Math.acos(c.Pk.Nj(this.jc))/Math.PI,Math.abs(m)<this.Eb?this.Mg||(this.Mg=!0,this.tb=this.loop-1,this.ua?this.vg||this.Sd():this.j.play()):this.Mg=!1)}}};b.prototype.xn=function(){var c=this;c.Zb=this.o.ga.createBufferSource();c.Zb.addEventListener("ended",function(){c.Up()},!1);2==c.mode||3==c.mode||5==c.mode?c.Zb.connect(c.Ud):c.Zb.connect(c.Jb)};b.prototype.Nt=function(c){var h=this,m=this.o.ga;h.xn();this.o.G("createBufferSoundSource()");
m.decodeAudioData(c,function(n){h.ug=n.numberOfChannels;1==h.ug&&h.wm();h.eh=n;h.Zb.buffer=n;h.o.G("audio Data decoded");h.Pl&&(h.Sd(),h.Pl=!1)})};b.prototype.Sd=function(){this.o.G("play buffer sound: "+this.id);var c=this.o.ga,h=this.Af;this.eh?(null==this.Zb&&(this.xn(),this.Zb.buffer=this.eh),this.Ai=c.currentTime-h,this.Af=0,this.vg=!0,this.stopped=!1,this.Zb.start(0,h),this.o.G("buffer Source started")):(this.o.G("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.Pl=!0)};b.prototype.Ak=
function(){var c=this.o.ga.currentTime-this.Ai;this.Rf();this.Af=c};b.prototype.Rf=function(){this.Zb&&this.vg&&(this.stopped=!0,this.Zb.disconnect(),this.Zb.stop(0),this.Zb=null);this.Ai=this.Af=0;this.vg=!1};b.prototype.Yq=function(){var c=this.o.ga;return this.Af?this.Af:this.Ai?c.currentTime-this.Ai:0};b.prototype.Zq=function(c){this.Rf();this.Af=c;this.Sd()};b.prototype.addElement=function(){var c=-1,h=this,m=this.o,n=this.o.ga;try{for(var q=!1,r=0;r<m.X.length;r++)m.X[r].id==h.id&&(c=r,null==
m.X[r].j&&!m.X[r].ua||m.X[r].url.join()!=h.url.join()||m.X[r].loop!=h.loop||m.X[r].mode!=h.mode||(q=!0,m.X[r].pan=h.pan,m.X[r].u=h.u,m.X[r].level=h.level,m.X[r].Dc=h.Dc,m.X[r].cj=h.cj,m.X[r].Eb=h.Eb,m.X[r].Lg=h.Lg));if(q)m.G("Keep playing "+h.id);else{if(0<=c){var t=m.X[c];if(null!=t.j||t.ua)if(n&&m.Za.enabled)m.Za.Gi.push(t),1!=m.D.da&&2!=m.D.da&&6!=m.D.da&&m.Za.Kn(t);else{try{t.ua?t.Ak():t.j.pause()}catch(A){m.G(A)}try{t.Me()}catch(A){m.G(A)}}}n&&(this.Pd=!0);h.j=document.createElement("audio");
h.j.crossOrigin=m.crossOrigin;h.j.setAttribute("class","ggmedia");m.De&&h.j.setAttribute("id",m.De+h.id);for(r=0;r<h.url.length;r++)if(q=void 0,q=document.createElement("source"),""!=h.url[r]&&"#"!=h.url[r]){q.crossOrigin=m.crossOrigin;var w=m.gb(m.Va(h.url[r]));q.setAttribute("src",w);h.j.appendChild(q);h.jk.push(w)}h.j.volume=h.level*m.ba;if(0<h.j.childNodes.length&&(m.$.appendChild(h.j),h.j.addEventListener("ended",function(){h.Up()},!1),n&&(h.Yk=!1,0==h.loop&&h.source&&h.source.mediaElement&&
(h.source.mediaElement.loop=!0),m.lv))){var z=new XMLHttpRequest;z.open("GET",m.gb(h.url[0]),!0);z.responseType="arraybuffer";z.onload=function(){var A=z.response;n.decodeAudioData(A,function(F){h.ug=F.numberOfChannels;h.ua=!0;h.Ve();h.Nt(A);1==h.ug&&h.wm()})};z.send()}1<=h.loop&&(h.tb=h.loop-1);0<=c?m.X[c]=h:m.X.push(h);h.ik();this.o.Xc||(1!=h.mode&&2!=h.mode&&3!=h.mode&&5!=h.mode||!(0<=h.loop)||n&&m.Za.enabled||(h.ua||(h.j.autoplay=!0,h.Fm()),h.autoplay=!0),0==h.mode&&0<=h.loop&&(h.autoplay=!0,
h.Fm()))}}catch(A){this.o.G(A)}};b.prototype.Td=function(){for(var c=this.o.isPlaying(this.id),h=0,m=!1,n=0;n<this.j.children.length&&!(this.url.length<=h);n++){var q=this.j.children[n];if("SOURCE"==q.nodeName){var r=this.o.gb(this.o.Va(this.url[h]));this.jk[h]!=r&&(c&&!m&&this.o.ei(this.id),q.setAttribute("src",r),this.jk[h]=r,m=!0);h++}}m&&(this.j.load(),c&&this.o.be(this.id))};b.prototype.Me=function(){try{this.o.G("Remove Snd:"+this.id),this.ua||(this.o.$.removeChild(this.j),this.j=null)}catch(c){this.o.G(c)}};
b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;(h=c.getAttributeNode("url"))&&this.url.push(h.nodeValue.toString());if(h=c.getAttributeNode("level"))this.level=Number(h.nodeValue);if(h=c.getAttributeNode("loop"))this.loop=Number(h.nodeValue);if(h=c.getAttributeNode("mode"))this.mode=Number(h.nodeValue);if(h=c.getAttributeNode("nodechangekeep"))this.ap=1==Number(h.nodeValue);if(h=c.getAttributeNode("field"))this.cj=Number(h.nodeValue);if(h=c.getAttributeNode("ambientlevel"))this.Dc=Number(h.nodeValue);
if(h=c.getAttributeNode("pansize"))this.Eb=Number(h.nodeValue);if(h=c.getAttributeNode("tiltsize"))this.Lg=Number(h.nodeValue);for(c=c.firstChild;c;)"source"==c.nodeName&&(h=c.getAttributeNode("url"))&&this.url.push(h.nodeValue.toString()),c=c.nextSibling};return b}(x);y.ne=f;var e=function(a){function b(c){c=a.call(this,c)||this;c.poster="";c.Ka=0;c.Oa=0;c.zb=0;c.fov=50;c.Ba=0;c.Kj=0;c.sf=!1;c.jg=!1;return c}__extends(b,a);b.prototype.Ae=function(){1!=this.Ba&&4!=this.Ba||this.pf(!this.Na);2==this.Ba&&
this.o.mp(this.id)};b.prototype.pf=function(c){var h=this.o,m=h.ga;if(1==this.Ba||4==this.Ba){if(this.Na=c)this.j.style.pointerEvents="auto",this.j.style.cursor="pointer",this.j.style.zIndex=(h.Mf+8E4).toString(),this.j.style[this.o.bc]="all 1s ease 0s",this.j.muted=!1,this.o.isPlaying(this.id)||h.be(this.id);else{this.j.style.pointerEvents="none";this.j.style.cursor="default";this.j.style.zIndex=h.Mf.toString();this.j.style[this.o.bc]="all 1s ease 0s";this.o.isPlaying(this.id)&&(0==this.Kj?h.$j(this.id):
2==this.Kj&&(this.j.muted=!0));this.Ql=!0;var n=this;setTimeout(function(){n.Ql=!1},1E3)}if(m&&(2==this.mode||3==this.mode||5==this.mode)&&(m=m.currentTime,this.vb&&this.Mb&&this.Kb.gain&&this.Kb&&this.Lb)){var q=this.vb.gain.value,r=this.Mb.gain.value,t=this.Kb.gain.value,w=this.Lb.gain.value;this.Na?(this.vb.gain.linearRampToValueAtTime(q,m),this.vb.gain.linearRampToValueAtTime(this.level*h.ba,m+1),this.Mb.gain.linearRampToValueAtTime(r,m),this.Mb.gain.linearRampToValueAtTime(this.level*h.ba,m+
1),this.Kb.gain.linearRampToValueAtTime(t,m),this.Kb.gain.linearRampToValueAtTime(0,m+1),this.Lb.gain.linearRampToValueAtTime(w,m),this.Lb.gain.linearRampToValueAtTime(0,m+1)):(this.vb.gain.linearRampToValueAtTime(q,m),this.vb.gain.linearRampToValueAtTime(this.ad,m+1),this.Mb.gain.linearRampToValueAtTime(r,m),this.Mb.gain.linearRampToValueAtTime(this.dd,m+1),this.Kb.gain.linearRampToValueAtTime(t,m),this.Kb.gain.linearRampToValueAtTime(this.bd,m+1),this.Lb.gain.linearRampToValueAtTime(w,m),this.Lb.gain.linearRampToValueAtTime(this.cd,
m+1))}this.ye=!0;this.o.oq()}2==this.Ba&&(c?this.o.be(this.id):this.o.ei(this.id))};b.prototype.Be=function(){this.ye=!1;this.j.style[this.o.bc]="none"};b.prototype.mv=function(){0==this.loop?this.j.play():0<this.tb?(this.tb--,this.j.currentTime=0,this.j.play()):this.isRunning=!1};b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("poster"))this.poster=String(h.nodeValue);if(h=c.getAttributeNode("maskimage"))this.od=String(h.nodeValue);if(h=c.getAttributeNode("rotx"))this.Ka=
Number(h.nodeValue);if(h=c.getAttributeNode("roty"))this.Oa=Number(h.nodeValue);if(h=c.getAttributeNode("rotz"))this.zb=Number(h.nodeValue);if(h=c.getAttributeNode("fov"))this.fov=Number(h.nodeValue);if(h=c.getAttributeNode("width"))this.qc=Number(h.nodeValue);if(h=c.getAttributeNode("height"))this.Pc=Number(h.nodeValue);this.Jc=(h=c.getAttributeNode("stretch"))?Number(h.nodeValue):1;if(h=c.getAttributeNode("clickmode"))this.Ba=Number(h.nodeValue);if(h=c.getAttributeNode("popbackmode"))this.Kj=Number(h.nodeValue);
if(h=c.getAttributeNode("handcursor"))this.jg=1==Number(h.nodeValue);if(h=c.getAttributeNode("startmutedmobile"))this.Zp=1==Number(h.nodeValue)};b.prototype.addElement=function(){var c=this,h=this.o,m=this.o.ga;try{c.j=document.createElement("video");c.j.setAttribute("class","ggmedia");c.j.crossOrigin=h.crossOrigin;c.j.hidden=!0;c.j.addEventListener("click",function(t){t.stopPropagation()});h.De&&c.j.setAttribute("id",h.De+c.id);if(h.Ji)c.j.setAttribute("playsinline","playsinline"),c.j.setAttribute("style",
"display: none; max-width:none;");else if(c.j.setAttribute("style","max-width:none;pointer-events:none;"),c.j.setAttribute("playsinline","playsinline"),1==c.Ba||4==c.Ba)c.j.addEventListener(h.Sm(),function(){c.Be()},!1),c.j.addEventListener("transitionend",function(){c.Be()},!1);var n=void 0;for(n=0;n<c.url.length;n++){var q=void 0;q=document.createElement("source");q.crossOrigin=h.crossOrigin;var r=h.gb(h.Va(c.url[n]));q.setAttribute("src",r);c.j.appendChild(q);c.jk.push(r)}""!=c.poster&&(c.j.poster=
h.gb(h.Va(c.poster)),0>c.loop&&(c.j.preload="none"));c.od&&""!=c.od&&(c.j.style.od="url('"+h.gb(c.od)+"')",c.j.style.webkitMaskImage="url('"+h.gb(c.od)+"')",c.j.style.maskSize="100% 100%",c.j.style.webkitMaskSize="100% 100%");c.j.volume=c.level*h.ba;1<=c.loop&&(c.tb=c.loop-1);m&&(this.Pd=!0);(1==c.mode||2==c.mode||3==c.mode||5==c.mode)&&0<=c.loop&&(c.j.autoplay=!0,c.isRunning=!0,c.autoplay=!0,this.o.Xc&&(c.j.muted=!0),c.Fm());h.U.push(this);h.Ji?h.$.appendChild(c.j):(c.j.style.position="absolute",
c.qc&&(c.j.width=c.qc),c.Pc&&(c.j.height=c.Pc),h.ea.appendChild(c.j));c.j.addEventListener("ended",function(){c.mv()},!1)}catch(t){h.G(t)}};b.prototype.Td=function(){this.j.poster=this.o.gb(this.o.Va(this.poster));a.prototype.Td.call(this)};b.prototype.registerElement=function(c,h){this.pd=!0;this.j=h;this.id=c;this.level=1;this.o.U.push(this)};b.prototype.Me=function(){var c=this.o;c.Ji&&(c.S.deleteTexture(this.texture),this.texture=0);this.j.parentNode&&this.j.parentNode.removeChild(this.j);this.j=
null};return b}(f);y.Ym=e;f=function(a){function b(c){c=a.call(this,c)||this;c.url="";c.Ka=0;c.Oa=0;c.zb=0;c.fov=50;c.Ba=0;c.jg=!1;c.qc=100;c.Pc=100;c.Jc=1;return c}__extends(b,a);b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("url"))this.url=h.nodeValue.toString();if(h=c.getAttributeNode("maskimage"))this.od=String(h.nodeValue);if(h=c.getAttributeNode("rotx"))this.Ka=Number(h.nodeValue);if(h=c.getAttributeNode("roty"))this.Oa=Number(h.nodeValue);if(h=c.getAttributeNode("rotz"))this.zb=
Number(h.nodeValue);if(h=c.getAttributeNode("fov"))this.fov=Number(h.nodeValue);if(h=c.getAttributeNode("width"))this.qc=Number(h.nodeValue);if(h=c.getAttributeNode("height"))this.Pc=Number(h.nodeValue);this.Jc=(h=c.getAttributeNode("stretch"))?Number(h.nodeValue):1;if(h=c.getAttributeNode("clickmode"))this.Ba=Number(h.nodeValue);if(h=c.getAttributeNode("hidepinned"))this.sf=1==Number(h.nodeValue);if(h=c.getAttributeNode("handcursor"))this.jg=1==Number(h.nodeValue);for(c=c.firstChild;c;)"source"==
c.nodeName&&(h=c.getAttributeNode("url"))&&(this.url=h.nodeValue.toString()),c=c.nextSibling};b.prototype.Be=function(){this.ye=!1;this.j.style[this.o.bc]="none";this.sf&&!this.Na&&(this.j.style.visibility="hidden")};b.prototype.Ae=function(){1!==this.Ba&&4!==this.Ba||this.pf(!this.Na)};b.prototype.pf=function(c){var h=this.o;if(1===this.Ba||4===this.Ba)this.Na=c,this.sf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.pointerEvents="auto",this.j.style.cursor=
"pointer",this.j.style.zIndex=(h.Mf+8E4).toString(),this.j.style[h.bc]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.pointerEvents="none",this.j.style.cursor="default",this.j.style.zIndex=h.Mf.toString(),this.j.style[h.bc]="all 1s ease 0s",this.sf&&(this.j.style.opacity="0.0")),this.ye=!0,h.Hm()};b.prototype.addElement=function(){var c=this,h=this.o;try{c.j=document.createElement("img");c.j.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");c.j.setAttribute("class",
"ggmedia");c.j.hidden=!0;c.j.addEventListener("click",function(m){m.stopPropagation()});h.De&&c.j.setAttribute("id",h.De+c.id);c.j.ondragstart=function(){return!1};if(1===c.Ba||4===c.Ba)c.j.addEventListener(h.Sm(),function(){c.Be()},!1),c.j.addEventListener("transitionend",function(){c.Be()},!1);c.j.setAttribute("src",h.gb(h.Va(c.url)));c.qc&&(c.j.width=c.qc);c.Pc&&(c.j.height=c.Pc);h.Xa.push(c);c.j.style.position="absolute";c.od&&""!=c.od&&(c.j.style.od="url('"+h.gb(c.od)+"')",c.j.style.webkitMaskImage=
"url('"+h.gb(c.od)+"')",c.j.style.maskSize="100% 100%",c.j.style.webkitMaskSize="100% 100%");h.ea.appendChild(c.j)}catch(m){h.G("Error addimage:"+m)}};b.prototype.Td=function(){this.j.setAttribute("src",this.o.gb(this.o.Va(this.url)))};return b}(x);y.Gq=f;f=function(a){function b(c){c=a.call(this,c)||this;c.code="";return c}__extends(b,a);b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("rotx"))this.Ka=Number(h.nodeValue);if(h=c.getAttributeNode("roty"))this.Oa=
Number(h.nodeValue);if(h=c.getAttributeNode("rotz"))this.zb=Number(h.nodeValue);if(h=c.getAttributeNode("fov"))this.fov=Number(h.nodeValue);if(h=c.getAttributeNode("width"))this.qc=Number(h.nodeValue);if(h=c.getAttributeNode("height"))this.Pc=Number(h.nodeValue);this.Jc=(h=c.getAttributeNode("stretch"))?Number(h.nodeValue):1;if(h=c.getAttributeNode("clickmode"))this.Ba=Number(h.nodeValue);if(h=c.getAttributeNode("handcursor"))this.jg=1==Number(h.nodeValue);if(h=c.getAttributeNode("code"))this.code=
h.nodeValue.toString()};b.prototype.Be=function(){this.ye=!1;this.j.style[this.o.bc]="none"};b.prototype.Ae=function(){1!==this.Ba&&4!==this.Ba||this.pf(!this.Na)};b.prototype.pf=function(c){var h=this.o;if(1===this.Ba||4===this.Ba)this.Na=c,this.sf&&(this.j.style.visibility="visible",this.j.style.opacity=this.Na?"0.0":"1.0"),this.Na?(this.j.style.cursor="pointer",this.j.style.zIndex=(h.Mf+8E4).toString(),this.j.style[h.bc]="all 1s ease 0s",this.j.style.opacity="1.0"):(this.j.style.cursor="default",
this.j.style.zIndex=h.Mf.toString(),this.j.style[h.bc]="all 1s ease 0s"),this.ye=!0,h.Hm()};b.prototype.addElement=function(){var c=this,h=this.o;try{c.j=document.createElement("div");this.lq();c.j.setAttribute("style","max-width:none;");c.j.setAttribute("class","ggmedia");h.De&&c.j.setAttribute("id",h.De+c.id);if(1===c.Ba||4===c.Ba)c.j.addEventListener(h.Sm(),function(){c.Be()},!1),c.j.addEventListener("transitionend",function(){c.Be()},!1);h.Ub.push(c);c.j.style.position="absolute";c.j.style.visibility=
"hidden";0==c.Ba?h.Ia.insertBefore(c.j,h.Ia.firstChild):h.ea.appendChild(c.j)}catch(m){h.G("Error addwebelement:"+m)}};b.prototype.lq=function(){var c=this.j.innerHTML,h=this.o.Va(this.code);h!=c&&(this.j.innerHTML=h)};b.prototype.Td=function(){this.lq()};return b}(x);y.Iq=f;x=function(a){function b(c){c=a.call(this,c)||this;c.jn=50;c.alpha=50;c.type=0;c.color=16777215;return c}__extends(b,a);b.prototype.yb=function(c){a.prototype.yb.call(this,c);var h;if(h=c.getAttributeNode("blinding"))this.jn=
Number(h.nodeValue);if(h=c.getAttributeNode("alpha"))this.alpha=Number(h.nodeValue);if(h=c.getAttributeNode("type"))this.type=Number(h.nodeValue);if(h=c.getAttributeNode("color"))this.color=1*Number(h.nodeValue)};return b}(x);y.Hq=x;x=function(){function a(b){this.o=b;this.type="empty";this.qm=this.id=this.target=this.description=this.title=this.url="";this.w=100;this.h=20;this.qk=!1;this.j=null;this.Ul=this.Tl=this.Qb=this.fc=this.kb=this.Ca=this.distance=this.u=this.pan=0;this.visible=!0;this.Yb=
b.L.Yb;this.Wb=b.L.Wb;this.Xb=b.L.Xb;this.Vb=b.L.Vb;this.Ce=b.L.Ce;this.hd="";this.yd=this.gf=0;this.Kf=!1;this.Zi=0;this.vertices=[]}a.prototype.$f=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.u;this.url=this.url;this.target=this.target;this.title=this.title;this.distance=this.distance;this.description=this.description;this.skinid=this.qm;this.obj=this.j;this.customimage=this.hd;this.customimagewidth=this.gf;this.customimageheight=this.yd;this.use3D=this.Kf;this.distance3D=this.Zi;
this.j&&this.j.__div&&(this.div=this.j.__div)};a.prototype.Ru=function(){var b=this.url;return"{"==b.charAt(0)?b.substr(1,b.length-2):!1};a.prototype.yb=function(b){var c;if(c=b.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=b.getAttributeNode("target"))this.target=c.nodeValue.toString();if(c=b.getAttributeNode("title"))this.title=c.nodeValue.toString();if(c=b.getAttributeNode("description"))this.description=c.nodeValue.toString();if(c=b.getAttributeNode("id"))this.id=c.nodeValue.toString();
if(c=b.getAttributeNode("skinid"))this.qm=c.nodeValue.toString();if(c=b.getAttributeNode("width"))this.w=Number(c.nodeValue);if(c=b.getAttributeNode("height"))this.h=Number(c.nodeValue);if(c=b.getAttributeNode("wordwrap"))this.qk=1==Number(c.nodeValue);c=b.getAttributeNode("pan");this.pan=1*(c?Number(c.nodeValue):0);c=b.getAttributeNode("tilt");this.u=1*(c?Number(c.nodeValue):0);c=b.getAttributeNode("fov");this.fov=1*(c?Number(c.nodeValue):0);c=b.getAttributeNode("distance");this.distance=1*(c?Number(c.nodeValue):
0);if(c=b.getAttributeNode("bordercolor"))this.Yb=1*Number(c.nodeValue);if(c=b.getAttributeNode("backgroundcolor"))this.Wb=1*Number(c.nodeValue);if(c=b.getAttributeNode("borderalpha"))this.Xb=1*Number(c.nodeValue);if(c=b.getAttributeNode("backgroundalpha"))this.Vb=1*Number(c.nodeValue);if(c=b.getAttributeNode("handcursor"))this.Ce=1==Number(c.nodeValue);if(c=b.getAttributeNode("customimage"))this.hd=this.o.$n()+c.nodeValue;if(c=b.getAttributeNode("customimagewidth"))this.gf=Number(c.nodeValue);if(c=
b.getAttributeNode("customimageheight"))this.yd=Number(c.nodeValue);if(c=b.getAttributeNode("use3D"))this.Kf=1==Number(c.nodeValue);if(c=b.getAttributeNode("distance3D"))this.Zi=Number(c.nodeValue);for(b=b.firstChild;b;){if("polystring"==b.nodeName){c=b.textContent.toString().split("|");for(var h=0;h<c.length;h++){var m=c[h].split("/");if(2==m.length){var n={pan:0,u:0};n.pan=Number(m[0]);n.u=Number(m[1]);this.vertices.push(n)}}}"vertex"==b.nodeName&&(n={pan:0,u:0},c=b.getAttributeNode("pan"),n.pan=
1*(c?Number(c.nodeValue):0),c=b.getAttributeNode("tilt"),n.u=1*(c?Number(c.nodeValue):0),this.vertices.push(n));b=b.nextSibling}this.$f()};return a}();y.Mi=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f,e){this.x=f;this.y=e}v.prototype.init=function(f,e){this.x=f;this.y=e};v.prototype.Zd=function(f,e,a){var b=e.y-f.y;this.x=f.x+(e.x-f.x)*a;this.y=f.y+b*a};v.prototype.Xq=function(f,e,a,b,c){var h=new v;h.Zd(f,a,c);f=new v;f.Zd(a,b,c);a=new v;a.Zd(b,e,c);e=new v;e.Zd(h,f,c);h=new v;h.Zd(f,a,c);f=new v;f.Zd(e,h,c);this.x=f.x;this.y=f.y};v.prototype.yk=function(f,e,a,b,c){var h=new v,m=.5,n=.25;do{h.Xq(f,e,a,b,m);var q=h.x-c;m=0<q?m-n:m+n;n/=2}while(.01<Math.abs(q));
this.x=h.x;this.y=h.y};return v}();y.Nc=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Nd=b;this.jc=c}v.prototype.init=function(f,e,a,b,c){this.x=f;this.y=e;this.z=a;this.Nd=b;this.jc=c};v.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Nd+","+this.jc+")"};v.prototype.Ka=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.y,b=this.z;this.y=f*a-e*b;this.z=e*a+f*b};v.prototype.Wt=function(){var f=this.y;this.y=-this.z;this.z=f};v.prototype.Vt=function(){var f=this.y;
this.y=this.z;this.z=-f};v.prototype.Oa=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.z;this.x=f*a+e*b;this.z=-e*a+f*b};v.prototype.Xt=function(){var f=this.x;this.x=-this.z;this.z=f};v.prototype.zb=function(f){var e=Math.sin(f);f=Math.cos(f);var a=this.x,b=this.y;this.x=f*a-e*b;this.y=e*a+f*b};v.prototype.Bp=function(){var f=this.x;this.x=-this.y;this.y=f};v.prototype.de=function(f){this.Ka(f*Math.PI/180)};v.prototype.Ff=function(f){this.Oa(f*Math.PI/180)};v.prototype.Gf=function(f){this.zb(f*
Math.PI/180)};v.prototype.clone=function(){return new v(this.x,this.y,this.z,this.Nd,this.jc)};v.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};v.prototype.normalize=function(){var f=this.length();0<f&&(f=1/f,this.x*=f,this.y*=f,this.z*=f)};v.prototype.Nj=function(f){return this.x*f.x+this.y*f.y+this.z*f.z};v.prototype.Pn=function(f,e){var a=Math.cos(e*Math.PI/180);this.x=a*Math.sin(f*Math.PI/180);this.y=Math.sin(e*Math.PI/180);this.z=a*Math.cos(f*Math.PI/
180)};v.prototype.Tq=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};v.prototype.Uq=function(){return 180*Math.asin(this.y/this.length())/Math.PI};v.prototype.Zd=function(f,e,a){this.x=f.x*a+e.x*(1-a);this.y=f.y*a+e.y*(1-a);this.z=f.z*a+e.z*(1-a);this.Nd=f.Nd*a+e.Nd*(1-a);this.jc=f.jc*a+e.jc*(1-a)};return v}();y.Ua=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(){this.Gp()}v.prototype.Gp=function(){this.tc=1;this.Lc=this.uc=this.Pb=0;this.vc=1;this.wc=this.dc=this.Mc=0;this.ec=1};v.prototype.clone=function(f){this.tc=f.tc;this.Pb=f.Pb;this.uc=f.uc;this.Lc=f.Lc;this.vc=f.vc;this.Mc=f.Mc;this.dc=f.dc;this.wc=f.wc;this.ec=f.ec};v.prototype.ou=function(f){var e=Math.cos(f);f=Math.sin(f);this.tc=1;this.Lc=this.uc=this.Pb=0;this.vc=e;this.Mc=-f;this.dc=0;this.wc=f;this.ec=e};v.prototype.pu=function(f){var e=Math.cos(f);
f=Math.sin(f);this.tc=e;this.Pb=0;this.uc=f;this.Lc=0;this.vc=1;this.Mc=0;this.dc=-f;this.wc=0;this.ec=e};v.prototype.qu=function(f){var e=Math.cos(f);f=Math.sin(f);this.tc=e;this.Pb=-f;this.uc=0;this.Lc=f;this.vc=e;this.wc=this.dc=this.Mc=0;this.ec=1};v.prototype.lu=function(f){this.ou(f*Math.PI/180)};v.prototype.mu=function(f){this.pu(f*Math.PI/180)};v.prototype.nu=function(f){this.qu(f*Math.PI/180)};v.prototype.de=function(f){this.nd||(this.nd=new v,this.He=new v);this.nd.lu(f);this.He.clone(this);
this.multiply(this.nd,this.He)};v.prototype.Ff=function(f){this.nd||(this.nd=new v,this.He=new v);this.nd.mu(f);this.He.clone(this);this.multiply(this.nd,this.He)};v.prototype.Gf=function(f){this.nd||(this.nd=new v,this.He=new v);this.nd.nu(f);this.He.clone(this);this.multiply(this.nd,this.He)};v.prototype.multiply=function(f,e){this.tc=f.tc*e.tc+f.Pb*e.Lc+f.uc*e.dc;this.Pb=f.tc*e.Pb+f.Pb*e.vc+f.uc*e.wc;this.uc=f.tc*e.uc+f.Pb*e.Mc+f.uc*e.ec;this.Lc=f.Lc*e.tc+f.vc*e.Lc+f.Mc*e.dc;this.vc=f.Lc*e.Pb+
f.vc*e.vc+f.Mc*e.wc;this.Mc=f.Lc*e.uc+f.vc*e.Mc+f.Mc*e.ec;this.dc=f.dc*e.tc+f.wc*e.Lc+f.ec*e.dc;this.wc=f.dc*e.Pb+f.wc*e.vc+f.ec*e.wc;this.ec=f.dc*e.uc+f.wc*e.Mc+f.ec*e.ec};v.prototype.lt=function(f){var e=f.x;var a=f.y;var b=f.z;f.x=e*this.tc+a*this.Pb+b*this.uc;f.y=e*this.Lc+a*this.vc+b*this.Mc;f.z=e*this.dc+a*this.wc+b*this.ec};return v}();y.Vm=x})(ggP2VR||(ggP2VR={}));
(function(y){y.ma={create:function(x){var v="undefined"!=typeof Float32Array?new Float32Array(16):Array(16);x&&(v[0]=x[0],v[1]=x[1],v[2]=x[2],v[3]=x[3],v[4]=x[4],v[5]=x[5],v[6]=x[6],v[7]=x[7],v[8]=x[8],v[9]=x[9],v[10]=x[10],v[11]=x[11],v[12]=x[12],v[13]=x[13],v[14]=x[14],v[15]=x[15]);return v},set:function(x,v){v[0]=x[0];v[1]=x[1];v[2]=x[2];v[3]=x[3];v[4]=x[4];v[5]=x[5];v[6]=x[6];v[7]=x[7];v[8]=x[8];v[9]=x[9];v[10]=x[10];v[11]=x[11];v[12]=x[12];v[13]=x[13];v[14]=x[14];v[15]=x[15];return v},identity:function(x){x[0]=
1;x[1]=0;x[2]=0;x[3]=0;x[4]=0;x[5]=1;x[6]=0;x[7]=0;x[8]=0;x[9]=0;x[10]=1;x[11]=0;x[12]=0;x[13]=0;x[14]=0;x[15]=1;return x},multiply:function(x,v,f){f||(f=x);var e=x[0],a=x[1],b=x[2],c=x[3],h=x[4],m=x[5],n=x[6],q=x[7],r=x[8],t=x[9],w=x[10],z=x[11],A=x[12],F=x[13],E=x[14];x=x[15];var D=v[0],C=v[1],G=v[2],J=v[3],H=v[4],I=v[5],L=v[6],K=v[7],M=v[8],Q=v[9],R=v[10],S=v[11],U=v[12],V=v[13],W=v[14];v=v[15];f[0]=D*e+C*h+G*r+J*A;f[1]=D*a+C*m+G*t+J*F;f[2]=D*b+C*n+G*w+J*E;f[3]=D*c+C*q+G*z+J*x;f[4]=H*e+I*h+L*r+
K*A;f[5]=H*a+I*m+L*t+K*F;f[6]=H*b+I*n+L*w+K*E;f[7]=H*c+I*q+L*z+K*x;f[8]=M*e+Q*h+R*r+S*A;f[9]=M*a+Q*m+R*t+S*F;f[10]=M*b+Q*n+R*w+S*E;f[11]=M*c+Q*q+R*z+S*x;f[12]=U*e+V*h+W*r+v*A;f[13]=U*a+V*m+W*t+v*F;f[14]=U*b+V*n+W*w+v*E;f[15]=U*c+V*q+W*z+v*x;return f},translate:function(x,v,f){var e=v[0],a=v[1];v=v[2];if(!f||x==f)return x[12]=x[0]*e+x[4]*a+x[8]*v+x[12],x[13]=x[1]*e+x[5]*a+x[9]*v+x[13],x[14]=x[2]*e+x[6]*a+x[10]*v+x[14],x[15]=x[3]*e+x[7]*a+x[11]*v+x[15],x;var b=x[0],c=x[1],h=x[2],m=x[3],n=x[4],q=x[5],
r=x[6],t=x[7],w=x[8],z=x[9],A=x[10],F=x[11];f[0]=b;f[1]=c;f[2]=h;f[3]=m;f[4]=n;f[5]=q;f[6]=r;f[7]=t;f[8]=w;f[9]=z;f[10]=A;f[11]=F;f[12]=b*e+n*a+w*v+x[12];f[13]=c*e+q*a+z*v+x[13];f[14]=h*e+r*a+A*v+x[14];f[15]=m*e+t*a+F*v+x[15];return f},scale:function(x,v,f){var e=v[0],a=v[1];v=v[2];if(!f||x==f)return x[0]*=e,x[1]*=e,x[2]*=e,x[3]*=e,x[4]*=a,x[5]*=a,x[6]*=a,x[7]*=a,x[8]*=v,x[9]*=v,x[10]*=v,x[11]*=v,x;f[0]=x[0]*e;f[1]=x[1]*e;f[2]=x[2]*e;f[3]=x[3]*e;f[4]=x[4]*a;f[5]=x[5]*a;f[6]=x[6]*a;f[7]=x[7]*a;f[8]=
x[8]*v;f[9]=x[9]*v;f[10]=x[10]*v;f[11]=x[11]*v;f[12]=x[12];f[13]=x[13];f[14]=x[14];f[15]=x[15];return f},rotate:function(x,v,f,e){var a=f[0],b=f[1];f=f[2];var c=Math.sqrt(a*a+b*b+f*f);if(!c)return null;1!=c&&(c=1/c,a*=c,b*=c,f*=c);var h=Math.sin(v),m=Math.cos(v),n=1-m;v=x[0];c=x[1];var q=x[2],r=x[3],t=x[4],w=x[5],z=x[6],A=x[7],F=x[8],E=x[9],D=x[10],C=x[11],G=a*a*n+m,J=b*a*n+f*h,H=f*a*n-b*h,I=a*b*n-f*h,L=b*b*n+m,K=f*b*n+a*h,M=a*f*n+b*h;a=b*f*n-a*h;b=f*f*n+m;e?x!=e&&(e[12]=x[12],e[13]=x[13],e[14]=x[14],
e[15]=x[15]):e=x;e[0]=v*G+t*J+F*H;e[1]=c*G+w*J+E*H;e[2]=q*G+z*J+D*H;e[3]=r*G+A*J+C*H;e[4]=v*I+t*L+F*K;e[5]=c*I+w*L+E*K;e[6]=q*I+z*L+D*K;e[7]=r*I+A*L+C*K;e[8]=v*M+t*a+F*b;e[9]=c*M+w*a+E*b;e[10]=q*M+z*a+D*b;e[11]=r*M+A*a+C*b;return e},zr:function(x,v,f,e,a,b,c){c||(c=y.ma.create());var h=v-x,m=e-f,n=b-a;c[0]=2*a/h;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2*a/m;c[6]=0;c[7]=0;c[8]=(v+x)/h;c[9]=(e+f)/m;c[10]=-(b+a)/n;c[11]=-1;c[12]=0;c[13]=0;c[14]=-(b*a*2)/n;c[15]=0;return c},perspective:function(x,v,f,e,a){x=
f*Math.tan(x*Math.PI/360);v*=x;return y.ma.zr(-v,v,-x,x,f,e,a)},Fv:function(x,v,f,e,a,b,c){c||(c=y.ma.create());var h=v-x,m=e-f,n=b-a;c[0]=2/h;c[1]=0;c[2]=0;c[3]=0;c[4]=0;c[5]=2/m;c[6]=0;c[7]=0;c[8]=0;c[9]=0;c[10]=-2/n;c[11]=0;c[12]=-(x+v)/h;c[13]=-(e+f)/m;c[14]=-(b+a)/n;c[15]=1;return c}}})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.ya=y.ma.create();this.Db=y.ma.create();this.Xd=0;this.eb=[];this.Oh=!1;this.vm=this.Zk=this.Yl=1;this.Vf=1E6;this.Wi=[!1,!1,!1,!1,!1,!1];this.Xj=!1;this.Sk=[];this.uh=!1;this.Wm=8;this.ct=new y.Vm;this.te=[];this.Nm=null;this.o=f;this.M=f.M;if(f.ld||f.Lh)f.M.Cm=2}v.prototype.Kh=function(){var f=this.o.S;if(f){var e=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\t\tvoid main(void) {\n\t\t\t\t\t\tgl_FragColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n\t\t\t\t\t}");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(console&&console.log(f.getShaderInfoLog(e)),alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.VERTEX_SHADER);this.kd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tattribute vec2 aTextureCoord;\n\t\t\t\tuniform mat4 uMVMatrix;\n\t\t\t\tuniform mat4 uPMatrix;\n\t\t\t\tuniform float uZoffset;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_Position = uPMatrix * uMVMatrix * vec4(aVertexPosition, 1.0);\n\t\t\t\t\tgl_Position.z += uZoffset;\n\t\t\t\t\tvTextureCoord = aTextureCoord;\n\t\t\t\t}");
this.O=f.createProgram();this.pg(this.O,a,e);this.O.ka=f.getAttribLocation(this.O,"aVertexPosition");f.enableVertexAttribArray(this.O.ka);this.O.La=f.getAttribLocation(this.O,"aTextureCoord");f.enableVertexAttribArray(this.O.La);this.O.Ie=f.getUniformLocation(this.O,"uPMatrix");this.O.bi=f.getUniformLocation(this.O,"uMVMatrix");this.O.yg=f.getUniformLocation(this.O,"uSampler");this.O.uk=f.getUniformLocation(this.O,"uZoffset");e=f.createShader(f.VERTEX_SHADER);this.kd(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nattribute vec3 aVertexPosition;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n\t\t\t\t}");
a=f.createShader(f.FRAGMENT_SHADER);this.kd(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nuniform vec3 uColor;\n\t\t\t\tuniform float uAlpha;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = vec4(uColor, uAlpha);\n\t\t\t\t}");this.ce=f.createProgram();this.pg(this.ce,e,a);this.ce.ka=f.getAttribLocation(this.ce,"aVertexPosition");f.enableVertexAttribArray(this.ce.ka);a=f.createShader(f.VERTEX_SHADER);this.kd(a,"precision highp float;\n\t\t\t\tattribute vec3 aVertexPosition;\n\t\t\t\tvarying vec2 vTextureCoord;\n\t\t\t\tuniform vec2 uCanvasDimensions;\n\t\t\t\tuniform vec4 uRect;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tvec2 pos = vec2(uRect.x + uRect.z*aVertexPosition.x,uRect.y + uRect.w*aVertexPosition.y);\n\t\t\t\t\tvec2 pointNorm = (pos / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n\t\t\t\t\tgl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 1.0, 1.0);\n\t\t\t\t\tvTextureCoord.s=aVertexPosition.x;\n\t\t\t\t\tvTextureCoord.t=1.0-aVertexPosition.y;\n\t\t\t\t}");
e=f.createShader(f.FRAGMENT_SHADER);this.kd(e,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\n\t\t\t\tuniform sampler2D uSampler;\n\t\t\t\tvoid main(void) {\n\t\t\t\t\tgl_FragColor = texture2D(uSampler,vTextureCoord);\n\t\t\t\t}");this.xh=f.createProgram();this.pg(this.xh,a,e)}};v.prototype.rj=function(){var f=this.o,e=f.S;if(e){var a=e.createShader(e.FRAGMENT_SHADER);var b=this.jl(13);this.kd(a,b);b=e.createShader(e.VERTEX_SHADER);
this.kd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.sp=e.createProgram();this.pg(this.sp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.jl(4);this.kd(a,b);b=e.createShader(e.VERTEX_SHADER);this.kd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nuniform float zOffset;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, zOffset, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.tp=e.createProgram();this.pg(this.tp,b,a);a=e.createShader(e.FRAGMENT_SHADER);b=this.jl(f.A.format);this.kd(a,b);b=e.createShader(e.VERTEX_SHADER);this.kd(b,"precision highp float;\nattribute vec3 aVertexPosition;\nuniform vec2 uCanvasDimensions;\nvarying vec2 dst;\nuniform vec2 dstSize;\nvoid main(void) {\n vec2 pointNorm = (aVertexPosition.xy / uCanvasDimensions) * 2.0 - vec2(1.0, 1.0);\n gl_Position = vec4(pointNorm.x, pointNorm.y * -1.0, 0.0, 1.0);\n dst.x= -1.0 + 2.0*((aVertexPosition.x + 0.5) / uCanvasDimensions.x);\n dst.y= (-1.0 * uCanvasDimensions.y + 2.0*(aVertexPosition.y + 0.5)) / uCanvasDimensions.x;\n}\n");
this.vp=e.createProgram();this.pg(this.vp,b,a);this.Pj||(this.Pj=e.createBuffer())}else this.o.G("No WebGL to initRemapShader!")};v.prototype.kd=function(f,e){var a=this.o.S;a.shaderSource(f,e);a.compileShader(f);a.getShaderParameter(f,a.COMPILE_STATUS)||(console&&console.log(a.getShaderInfoLog(f)),Y&&alert(a.getShaderInfoLog(f)))};v.prototype.pg=function(f,e,a){var b=this.o.S;b.attachShader(f,e);b.attachShader(f,a);b.linkProgram(f);b.getProgramParameter(f,b.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(b.getError()));b.useProgram(f)};v.prototype.jl=function(f){var e=this.o;var a="#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\n#define M_PI 3.14159265358979323846\nvarying vec2 dst;\nuniform vec2 srcScale;\nuniform vec2 srcOffset;\nuniform float rectDstDistance;\nuniform float fisheyeDistance;\nuniform float stereoDistance;\nuniform float directionBlend;\nuniform mat4 matRotate; // = mat4( 1.0,0.0,0.0,0.0, 0.0,1.0,0.0,0.0, 0.0,0.0,1.0,0.0, 0.0,0.0,0.0,1.0 );\nconst float rectSrcDistance = 1.0;\nuniform vec2 tonemap;\n";
a=(13==f?a+"uniform samplerCube cubeTexture;":a+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";a+="vec4 direction;\n";a+="vec2 src;\n";a+="vec2 srcCord;\n";a+="vec2 texc;\n";var b=this.uo(e.Z());e.Z()!=e.Ic()&&0!=e.Ic()?(e=this.uo(e.Ic()),a+="vec4 direction1,direction2;\n",a+=b.replace("direction=","direction1="),a+=e.replace("direction=","direction2="),a+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):a+=b;a+="direction=direction*matRotate;\n";13==f&&(a+="direction.z=-direction.z;",
a+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==f&&(a+="float iz=1.0/(direction.z * rectSrcDistance);\n",a+="src.x=-direction.x*iz;\n",a+="src.y= direction.y*iz;\n",a+="texc=src * srcScale + srcOffset;\n",a+="if (",a+="(direction.z<0.0) && ",a+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",a=this.uh?a+" gl_FragColor = vec4(0.5,0.5,0,1);\n":a+"  gl_FragColor = texture2D(tileTexture, texc);\n",a+="} else {\n",a=this.uh?a+" gl_FragColor = vec4(0.5,0,0,0.3);\n":
a+"  discard;\n",a+="}\n");1==f&&(a+="src.x=atan(float(-direction.x), float(-direction.z));",a+="src.y=asin(direction.y);\n",a+="texc=src * srcScale + srcOffset;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");14==f&&(a+="vec2 cf;\n",a+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",a+="  src.x=-direction.x/direction.z;\n",a+="  src.y=+direction.y/direction.z;\n",a+="  cf.x=1.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",
a+="  src.x=+direction.z/direction.x;\n",a+="  src.y=-direction.y/direction.x;\n",a+="  cf.x=3.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",a+="  src.x=-direction.x/direction.z;\n",a+="  src.y=-direction.y/direction.z;\n",a+="  cf.x=5.0;cf.y=3.0;\n",a+="}\n",a+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",a+="  src.x=+direction.z/direction.x;\n",a+="  src.y=+direction.y/direction.x;\n",
a+="  cf.x=1.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",a+="  src.x=+direction.x/direction.y;\n",a+="  src.y=-direction.z/direction.y;\n",a+="  cf.x=5.0;cf.y=1.0;\n",a+="}\n",a+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",a+="  src.x=-direction.x/direction.y;\n",a+="  src.y=-direction.z/direction.y;\n",a+="  cf.x=3.0;cf.y=1.0;\n",a+="}\n",a+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",
a+="texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",a+="gl_FragColor = texture2D(tileTexture, texc);\n");return a+="}\n"};v.prototype.uo=function(f){var e="";switch(f){case 4:e+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:e+="float r,ph,ro;\nr=length(dst.xy)*0.5;\nro=atan(float(dst.x),float(-dst.y));\nph=r / fisheyeDistance;\ndirection.x= sin(ph) * sin(ro);\ndirection.y=-sin(ph) * cos(ro);\ndirection.z=-cos(ph);\n";break;case 9:e+="float n;\nvec2 ind;\nind=dst*stereoDistance;\nn=1.0 + ind.x*ind.x + ind.y*ind.y;\ndirection.x=2.0*ind.x/n;\ndirection.y=2.0*ind.y/n;\ndirection.z=(n-2.0)/n;\n"}return e+
"direction.w=0.0;\ndirection=normalize(direction);\n"};v.prototype.Do=function(f){var e,a,b=this.o,c=this.o.S;this.Ok=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.Ok);var h=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(e=0;12>e;e++)2>e%3&&(h[e]*=f);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);this.ff=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,this.ff);var m=[1,0,0,0,0,1,1,1];c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);this.xd=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,
this.xd);var n=[0,1,2,0,2,3];c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);h=[];n=[];m=[];var q=new y.Ua;for(f=0;6>f;f++){var r=f%3;var t=3>f?1:0;for(a=0;4>a;a++){q.x=-1;q.y=-1;q.z=1;for(e=0;e<a;e++)q.Bp();m.push((0>q.x?.33:0)+.33*r,(0>q.y?0:.5)+.5*t);if(4>f)for(e=0;e<f;e++)q.Xt();else 5==f?q.Wt():q.Vt();h.push(q.x,q.y,q.z)}e=4*f;n.push(0+e,1+e,2+e,0+e,2+e,3+e)}b.A.lk=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.A.lk);c.bufferData(c.ARRAY_BUFFER,new Float32Array(h),c.STATIC_DRAW);
b.A.Ci=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,b.A.Ci);c.bufferData(c.ARRAY_BUFFER,new Float32Array(m),c.STATIC_DRAW);b.A.qj=c.createBuffer();c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,b.A.qj);c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(n),c.STATIC_DRAW);this.Ks=c.createBuffer();this.Js=c.createBuffer()};v.prototype.ql=function(f){var e=this;return function(){try{if(f.qt)return;var a=e.o.S;a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);var b=!1;null!=f.xf&&f.xf.complete?f.yo||(a.bindTexture(a.TEXTURE_2D,
f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.xf),b=f.yo=!0):null!=f.Cf&&f.Cf.complete&&(a.bindTexture(a.TEXTURE_2D,f),a.texImage2D(a.TEXTURE_2D,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f.Cf),b=!0);b&&(f.loaded=!0,e.o.D.$c&&("previewtrack"==e.o.D.delay||"videopano"==e.o.D.delay&&!e.o.A.j)&&e.np()&&e.o.Zj(null));a.bindTexture(a.TEXTURE_2D,null);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0)}catch(c){e.o.G(c)}e.o.update(2)}};v.prototype.Eo=function(){var f=this.o,e=f.S;if(this.eb)for(;0<this.eb.length;)e.deleteTexture(this.eb.pop());
this.eb=[];for(var a=0;6>a;a++){var b=e.createTexture();this.Xd++;b.Cf=null;b.xf=null;b.yo=!1;e.bindTexture(e.TEXTURE_2D,b);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);if(f.nh[a]){var c=new Image;c.crossOrigin=f.crossOrigin;c.src=f.gb(f.nh[a]);b.Cf=c;c.addEventListener&&c.addEventListener("load",
this.ql(b),!1);f.wd.push(c)}this.eb.push(b)}for(a=0;6>a;a++)f.mh[a]&&(c=new Image,c.crossOrigin=f.crossOrigin,c.src=f.gb(f.mh[a]),c.addEventListener?c.addEventListener("load",this.ql(this.eb[a]),!1):c.onload=this.ql(this.eb[a]),this.eb[a].xf=c,f.wd.push(c));for(a=0;a<f.U.length;a++)f.U[a].pd||(f.U[a].texture=e.createTexture(),f.Xd++,e.bindTexture(e.TEXTURE_2D,f.U[a].texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),
e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE));f.A.texture=e.createTexture();f.Xd++;e.bindTexture(e.TEXTURE_2D,f.A.texture);e.texImage2D(e.TEXTURE_2D,0,e.RGB,1,1,0,e.RGB,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.bindTexture(e.TEXTURE_2D,null)};v.prototype.sv=
function(){var f=this.o;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.ic());if(f.S){var e=f.S;this.gk();e.clear(e.DEPTH_BUFFER_BIT);e.useProgram(this.O);this.Cg(0);e.uniform1i(this.O.yg,0);e.enableVertexAttribArray(this.O.ka);e.enableVertexAttribArray(this.O.La);e.bindBuffer(e.ARRAY_BUFFER,this.ff);e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,
this.xd);e.uniform1f(this.O.uk,1E-4);e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0);y.ma.identity(this.Db);y.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);e.uniformMatrix4fv(this.O.Ie,!1,this.Db);for(f=0;6>f;f++)this.Cg(f),e.bindBuffer(e.ARRAY_BUFFER,this.Ok),e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.ff),e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0),6<=this.eb.length&&this.eb[f].loaded&&(e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,
this.eb[f]),e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd),e.uniform1i(this.O.yg,0),e.uniformMatrix4fv(this.O.bi,!1,this.ya),e.uniformMatrix4fv(this.O.Ie,!1,this.Db),e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0))}};v.prototype.gk=function(){var f=this.o,e=this.M;e.N.Lj&&6<e.N.Lj.length&&(e=parseInt(e.N.Lj),f.S.clearColor((e>>16&255)/255,(e>>8&255)/255,(e>>0&255)/255,1))};v.prototype.Cg=function(f,e){void 0===e&&(e=1);var a=this.o;y.ma.identity(this.ya);y.ma.rotate(this.ya,e*-a.W.m*Math.PI/180,[0,
0,1]);y.ma.rotate(this.ya,e*-a.u.m*Math.PI/180,[1,0,0]);-1==e?y.ma.rotate(this.ya,-a.pan.m*Math.PI/180,[0,1,0]):y.ma.rotate(this.ya,(180-a.pan.m)*Math.PI/180,[0,1,0]);a.Ya&&(y.ma.rotate(this.ya,-a.Ya.pitch*Math.PI/180,[1,0,0]),y.ma.rotate(this.ya,a.Ya.W*Math.PI/180,[0,0,1]));4>f?y.ma.rotate(this.ya,-Math.PI/2*f,[0,1,0]):y.ma.rotate(this.ya,Math.PI/2*(5==f?1:-1),[1,0,0])};v.prototype.Su=function(f){var e=this;return function(){e.Sk.push(f)}};v.prototype.pr=function(f){this.o.ub=!0;this.o.rh=!0;f.loaded=
!0;f.Zl=0;f.Le=0;var e=this.o.S;this.Dn();e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);if(null!=f.N&&f.N.complete){f.Ob=e.createTexture();this.o.Xd++;e.bindTexture(e.TEXTURE_2D,f.Ob);try{e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,f.N)}catch(a){e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),this.o.G(a)}}this.o.update(2)};v.prototype.Dn=function(){this.o.M.Di&&this.o.M.Di--};v.prototype.qr=function(){if(0<this.Sk.length){var f=this.Sk.shift();
this.pr(f)}};v.prototype.mt=function(f){var e=this;return function(){e.o.ub=!0;e.o.rh=!0;var a=e.M.N;try{if(null!=f&&f.complete){var b=a.levels[a.levels.length-1],c=a.ib;b.height=b.width=f.width-2*c;b.Y=b.ta=1;for(var h=0;6>h;h++){var m=new y.Zg;m.Fc=document.createElement("canvas");e.o.oa?(m.Fc.width=b.width+2*c,m.Fc.height=b.height+2*c):(m.Fc.width=a.V+2*c,m.Fc.height=a.V+2*c);m.An=m.Fc.getContext("2d");m.Fc.style[e.o.Bd+"Origin"]="0% 0%";m.Fc.style.overflow="hidden";m.Fc.style.position="absolute";
m.N=f;var n=b.width+2*c,q=b.height+2*c;m.An&&m.An.drawImage(f,0,h*q,n,q,0,0,n,q);if(e.o.oa&&e.o.S){var r=e.o.S;r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,1);m.Ob=r.createTexture();e.o.Xd++;r.bindTexture(r.TEXTURE_2D,m.Ob);try{r.texImage2D(r.TEXTURE_2D,0,r.RGBA,r.RGBA,r.UNSIGNED_BYTE,m.Fc)}catch(t){e.o.G(t)}r.bindTexture(r.TEXTURE_2D,null);r.pixelStorei(r.UNPACK_FLIP_Y_WEBGL,0)}e.o.Og&&(m.Fc.Bv=-1,e.o.ea.insertBefore(m.Fc,e.o.ea.firstChild));b.Ma[h]=m}b.loaded=!0;e.o.D.$c&&("previewtrack"==e.o.D.delay||"videopano"==
e.o.D.delay&&!e.o.A.j)&&e.o.Zj(null)}}catch(t){e.o.G(t)}e.o.update(2)}};v.prototype.fq=function(f){var e=this;return function(){e.o.ub=!0;e.o.rh=!0;e.Dn();f.N=null}};v.prototype.qv=function(){var f=this.o,e=this.M,a=e.N,b=a.levels;f.we&&(f.Rc(0),f.ic());if(f.S){var c=f.S;c.useProgram(this.O);this.gk();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);y.ma.identity(this.Db);y.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(this.O.Ie,!1,this.Db);e.dv();e.Vo();var h=
e.Mn();var m=b.length-1;for(e.je=0;m>=h;){var n=b[m],q=1;m==b.length-1&&0==a.ib&&(q=a.V/(a.V-.5));for(var r=0;6>r;r++){var t=e.cube.bg[r];var w=t.gi;if(t.pc&&0<w.Ki&&0<w.pk&&0<w.scale||n.cache){t.ub=!1;t.Qf[m]||(t.Qf[m]={fx:0,fy:0,Id:0,Jd:0});var z=t.Qf[m];n.cache?(z.fx=0,z.fy=0,z.Id=n.Y-1,z.Jd=n.ta-1):e.ts(n,w,z);w=!0;for(var A=z.fy;A<=z.Jd;A++)for(var F=z.fx;F<=z.Id;F++){var E=F+A*n.Y+r*n.Y*n.ta,D=n.Ma[E];D||(D=n.Ma[E]=new y.Zg,f.G("create simple "+m+", <"+E+">"));this.$i()?D.N||(D.Le?D.Le--:(this.Aj(D,
n,e.Jg(r,m,F,A)),f.ub=!0)):e.je++;if(D.Ob){if(!D.hg){E=.5*m+1;D.hg=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,D.hg);var C=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];C[3]=F*a.V-a.ib;C[0]=Math.min((F+1)*a.V,n.width)+a.ib;C[7]=A*a.V-a.ib;C[1]=Math.min((A+1)*a.V,n.height)+a.ib;C[4]=C[1];C[6]=C[3];C[9]=C[0];C[10]=C[7];for(var G=0;12>G;G++)C[G]=0==G%3?q*E*(-2*C[G]/n.width+1):1==G%3?q*E*(-2*C[G]/n.height+1):E;c.bufferData(c.ARRAY_BUFFER,new Float32Array(C),c.STATIC_DRAW)}}else w=!1;D.visible=t.pc}z.So=w}}m--}for(r=
0;6>r;r++)if(t=e.cube.bg[r],t.pc)for(w=t.gi,this.Cg(r),c.uniform1i(this.O.yg,0),c.uniformMatrix4fv(this.O.Ie,!1,this.Db),c.uniformMatrix4fv(this.O.bi,!1,this.ya),c.enableVertexAttribArray(this.O.ka),c.enableVertexAttribArray(this.O.La),c.bindBuffer(c.ARRAY_BUFFER,this.ff),c.vertexAttribPointer(this.O.La,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.xd),c.useProgram(this.O),m=h;m<=b.length-1;){n=b[m];if(t.pc&&0<w.Ki&&t.Qf[m]&&0<=t.Qf[m].fx){z=t.Qf[m];for(A=
z.fy;A<=z.Jd;A++)for(F=z.fx;F<=z.Id;F++)E=F+A*n.Y+r*n.Y*n.ta,(D=n.Ma[E])&&D.Ob&&(c.uniform1f(this.O.uk,1E-4*(F%2+A%2*2)),c.bindBuffer(c.ARRAY_BUFFER,D.hg),c.vertexAttribPointer(this.O.ka,3,c.FLOAT,!1,0,0),c.bindTexture(c.TEXTURE_2D,D.Ob),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.drawElements(c.TRIANGLES,
6,c.UNSIGNED_SHORT,0)),D.visible=t.pc;z.So&&(m=b.length)}m++}this.$l();f.rh=!1}};v.prototype.$i=function(){return this.M.Di<this.M.Cm};v.prototype.Aj=function(f,e,a){var b=this.M,c=this.o;b.Qs++;f.N=new Image;f.Zl++;f.Le=1<<f.Zl;f.N.onload=this.Su(f);f.N.onerror=this.fq(f);f.N.onabort=this.fq(f);f.N.crossOrigin=c.crossOrigin;f.N.setAttribute("src",a);c.G("load "+a);e.cache&&c.wd.push(f.N);b.Di++};v.prototype.wq=function(){var f=this.o,e=this.M,a=e.N;f.we&&(f.Rc(0),f.ic());if(f.S){var b=f.S;this.gk();
b.clear(b.DEPTH_BUFFER_BIT);b.disable(b.CULL_FACE);b.bindBuffer(b.ARRAY_BUFFER,this.Pj);var c=[0,0];c[2]=f.C.width;c[3]=0;c[4]=f.C.width;c[5]=f.C.height;c[6]=0;c[7]=f.C.height;b.bufferData(b.ARRAY_BUFFER,new Float32Array(c),b.STATIC_DRAW);e.je=0;if(!this.Qc||this.Oh)0<a.levels.length?this.mr():this.nr();f.A.Tc?this.Et():(b.enable(b.DEPTH_TEST),b.depthRange(0,1),b.depthFunc(b.LESS),this.Xj=!1,0<a.levels.length&&this.rv(),this.Qc&&!this.Xj&&this.Dt())}};v.prototype.Au=function(f,e,a,b,c,h,m){var n=
this.o;c=this.M.N;var q=n.C,r=a*c.V/e.width,t=(a+1)*c.V/e.width;a=b*c.V/e.height;e=(b+1)*c.V/e.height;c=.1;m&&(c=.2);this.uh&&(c=0);b=(t-r)*c;1<t&&(t=1);1<e&&(e=1);r-=b;a-=b;c=this.Wm;m=(t+b-r)/c;t=(e+b-a)/c;e={x:0,y:0};b={x:0,y:0};f.ol=0;var w=n.kj(),z=new y.Ua,A=this.ct;A.Gp();4>h?A.Ff(-90*h):A.de(5==h?90:-90);n.Ya&&(A.Gf(n.Ya.W),A.de(-n.Ya.pitch));A.Ff(-n.pan.m);A.de(n.u.m);A.Gf(n.W.m);for(h=0;h<=c;h++)for(var F=0;F<=c;F++){var E=2*(r+F*m)-1;var D=2*(a+h*t)-1;z.x=1*E;z.y=1*D;z.z=-1;z.normalize();
A.lt(z);E=this.so(z,e,n.Z());0!=n.Ic()&&1>w&&(D=this.so(z,b,n.Ic()),E&&D?(e.x=e.x*w+b.x*(1-w),e.y=e.y*w+b.y*(1-w)):!E&&D&&(E=!0,e.x=b.x,e.y=b.y));E||(e.x=NaN);f.ig[f.ol++]=q.width/2+e.x*q.width/2;f.ig[f.ol++]=q.height/2-e.y*q.width/2}this.Bu(f,c)};v.prototype.so=function(f,e,a){var b=!0;switch(a){case 0:case 4:a=1/(f.z*this.Yl);e.x=-f.x*a;e.y=f.y*a;0<f.z&&(b=!1);break;case 9:1==f.z&&(b=!1);a=1/((1-f.z)*this.vm);e.x=f.x*a;e.y=-f.y*a;break;case 12:if(a=Math.sqrt(f.x*f.x+f.y*f.y),0==a)e.x=0,e.y=0;else{var c=
2*this.Zk*Math.acos(-f.z)/a;if(2<a)return!1;e.x=c*f.x;e.y=-c*f.y}}return b};v.prototype.Bu=function(f,e){for(var a=this.o,b=[],c,h=f.Pa=0;h<e;h++)for(var m=0;m<e;m++){b[0]=h+m*(e+1);b[1]=h+1+m*(e+1);b[2]=h+(m+1)*(e+1);b[3]=h+1+(m+1)*(e+1);c=!0;for(var n=0;4>n;n++)isNaN(f.ig[2*b[0]])&&(c=!1);if(c){var q=!1,r=!1,t=!1,w=!1;for(n=0;4>n;n++){var z=f.ig[2*b[n]];z<a.C.width&&(r=!0);0<=z&&(q=!0);z=f.ig[2*b[n]+1];z<a.C.height&&(t=!0);0<=z&&(w=!0)}if(c=c&&r&&q&&t&&w)this.uh?(f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=
b[1],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[2]):(f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[3],f.mb[f.Pa++]=b[2],f.mb[f.Pa++]=b[0],f.mb[f.Pa++]=b[1],f.mb[f.Pa++]=b[3])}}};v.prototype.rv=function(){var f=this.o,e=this.M,a=e.N,b=a.levels;f.we&&(f.Rc(0),f.ic());if(f.S){var c=f.S,h=this.tp;c.useProgram(h);this.Jm(h);c.enable(c.CULL_FACE);c.cullFace(c.FRONT);c.enable(c.STENCIL_TEST);
c.stencilOp(c.KEEP,c.INCR,c.INCR);c.stencilFunc(c.EQUAL,0,255);y.ma.identity(this.Db);y.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);c.uniformMatrix4fv(c.getUniformLocation(h,"uPMatrix"),!1,this.Db);e.je=0;e.Vo();var m=e.Mn(),n=0;var q=b.length-1;for(var r={},t=b[q];t.Df&&0<q;)q--,t=b[q];for(var w=q,z=w,A=0;6>A;A++)for(var F=0;F<t.ta;F++)for(var E=0;E<t.Y;E++){var D=E+F*t.Y+A*t.Y*t.ta;r[D]=1}for(;q>=m;){var C={};t=b[q];var G=null;0<q&&(G=b[q-1]);var J=!0;for(var H in r)if(r.hasOwnProperty(H)){D=
Number(H);var I=t.Ma[D];A=Number(Math.floor(D/(t.Y*t.ta)));F=Math.floor((D-A*t.Y*t.ta)/t.Y);E=Math.floor(D-(F*t.Y+A*t.Y*t.ta));if(6<=A)console.log("Grrr...");else{var L=e.cube.bg[A];L.ub=!1;I||(I=t.Ma[D]=new y.Zg,f.G("create "+ +q+", <"+D+">"));this.Au(I,t,E,F,Math.max(1,this.Wm>>w-q),A,0!=f.Ic());I.visible=0<I.Pa||t.cache;I.vj=3;I.Rh=Date.now();I.visible&&!I.Ob&&(J=!1,this.$i()?I.N||(I.Le?I.Le--:(this.Aj(I,t,e.Jg(A,q,E,F)),f.ub=!0)):this.M.je++);if(G&&(I.visible||G.cache)){I=(E*a.V+1)/t.width;E=
Math.min(1,((E+1)*a.V-1)/t.width);var K=(F*a.V+1)/t.height;F=Math.min(1,((F+1)*a.V-1)/t.height);D=a.V/G.width;L=a.V/G.height;var M=K;K=Math.floor(K*G.height/a.V);do{var Q=I,R=Math.floor(I*G.width/a.V);do{var S=R+K*G.Y+A*G.Y*G.ta;R<G.Y&&K<G.ta?C[S]=1:f.G("Grrrr");R++;Q+=D}while(Q<E);K++;M+=L}while(M<F)}}}J&&(z=q,20>f.fov.m&&q<this.Vf&&(this.Xj=!0));r=C;q--}this.$l();c.uniform1i(c.getUniformLocation(h,"tileTexture"),0);c.activeTexture(c.TEXTURE0);q=m;for(m=-1;q<=Math.min(z,this.Vf-1);){t=b[q];for(H in t.Ma)if(t.Ma.hasOwnProperty(H)){r=
Number(H);I=t.Ma[r];A=Math.floor(r/(t.Y*t.ta));F=Math.floor((r-A*t.Y*t.ta)/t.Y);E=Math.floor(r-(F*t.Y+A*t.Y*t.ta));m!=A&&(m=A,this.hk(A,h));if(n>e.rg){f.G("Exceeded painted tiles");this.Xj=!1;break}I.Ob&&(w=r=a.V,E==t.Y-1&&(r=t.width-a.V*E),F==t.ta-1&&(w=t.height-a.V*F),r=(r+2*a.ib)/a.V,w=(w+2*a.ib)/a.V,c.bindTexture(c.TEXTURE_2D,I.Ob),c.uniform2f(c.getUniformLocation(h,"uCanvasDimensions"),f.C.width,f.C.height),C=c.getUniformLocation(h,"srcScale"),c.uniform2f(C,.5*t.width/a.V/r,.5*t.height/a.V/w),
C=c.getUniformLocation(h,"srcOffset"),c.uniform2f(C,(.5*t.width+a.ib-a.V*E)/a.V/r,-(.5*t.height+a.ib-a.V*F)/a.V/w+1),C=c.getUniformLocation(h,"zOffset"),c.uniform1f(C,(q+1)/(b.length+5)),r=c.getAttribLocation(h,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(r),c.activeTexture(c.TEXTURE0),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MAG_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),c.bindBuffer(c.ARRAY_BUFFER,this.Ks),c.vertexAttribPointer(r,2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(I.ig),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Js),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(I.mb),c.DYNAMIC_DRAW),this.uh?0==q&&0==A&&c.drawElements(c.LINES,I.Pa,c.UNSIGNED_SHORT,0):c.drawElements(c.TRIANGLES,I.Pa,c.UNSIGNED_SHORT,0),n++)}q++}c.disable(c.CULL_FACE);
c.cullFace(c.FRONT_AND_BACK);f.rh=!1;c.disable(c.STENCIL_TEST)}};v.prototype.hk=function(f,e){var a=this.o.S;y.ma.identity(this.ya);this.Cg(f,-1);a.uniformMatrix4fv(a.getUniformLocation(e,"matRotate"),!1,this.ya)};v.prototype.Et=function(){var f=this.o;if(f.S){var e=f.S,a=this.vp;e.useProgram(a);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);var b=e.getUniformLocation(a,"srcOffset");e.uniform2f(b,.5,.5);1==f.A.format&&(b=e.getUniformLocation(a,"srcScale"),
f.Fd?(e.uniform2f(b,-.5/Math.PI,(f.A.flipY?-.5:.5)/Math.PI),b=e.getUniformLocation(a,"srcOffset"),f.Fg?e.uniform2f(b,.5,.75):e.uniform2f(b,.5,.25)):e.uniform2f(b,-.5/Math.PI,(f.A.flipY?-1:1)/Math.PI));14==f.A.format&&(b=e.getUniformLocation(a,"srcScale"),e.uniform2f(b,1-2*f.A.df/(f.A.width/3),1-2*f.A.df/(f.A.height/2)));this.Jm(a);b=e.getUniformLocation(a,"cubeTexture");e.uniform1i(b,0);b=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);
e.enableVertexAttribArray(b);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(b,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,f.A.texture);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,
0)}};v.prototype.Jm=function(f){var e=this.o,a=e.S,b=this.o.C,c=1;switch(e.fov.mode){case 0:c=b.width/b.height;break;case 1:c=1;break;case 2:c=b.width/Math.sqrt(b.width*b.width+b.height*b.height);break;case 3:4*b.height/3<b.width&&(c=4/3)}b=a.getUniformLocation(f,"rectDstDistance");this.Yl=Math.tan(Math.min(e.fov.m,179)/2*Math.PI/180)*c;a.uniform1f(b,this.Yl);b=a.getUniformLocation(f,"fisheyeDistance");this.Zk=180/(e.fov.m*Math.PI*c);a.uniform1f(b,this.Zk);b=a.getUniformLocation(f,"stereoDistance");
this.vm=Math.tan(Math.min(e.fov.m,359)/4*Math.PI/180)*c;a.uniform1f(b,this.vm);b=a.getUniformLocation(f,"directionBlend");a.uniform1f(b,e.kj())};v.prototype.Dt=function(){var f=this.o,e=f.S,a=this.sp;e.useProgram(a);e.enable(e.STENCIL_TEST);e.stencilOp(e.KEEP,e.INCR,e.INCR);e.stencilFunc(e.EQUAL,0,255);this.hk(0,a);e.uniform2f(e.getUniformLocation(a,"uCanvasDimensions"),f.C.width,f.C.height);f=e.getUniformLocation(a,"srcScale");e.uniform2f(f,1,1);f=e.getUniformLocation(a,"srcOffset");e.uniform2f(f,
0,0);f=e.getUniformLocation(a,"zOffset");e.uniform1f(f,.9999);this.Jm(a);this.hk(0,a);f=e.getUniformLocation(a,"cubeTexture");e.uniform1i(f,0);a=e.getAttribLocation(a,"aVertexPosition");e.disableVertexAttribArray(0);e.disableVertexAttribArray(1);e.disableVertexAttribArray(2);e.enableVertexAttribArray(a);e.bindBuffer(e.ARRAY_BUFFER,this.Pj);e.vertexAttribPointer(a,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,
e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0);e.disable(e.STENCIL_TEST)};v.prototype.nr=function(){var f=this.o,e=f.S;e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE);for(var a=[1,3,5,4,0,2],b=!0,c=!0,h=!1,m=0;6>m;m++)this.eb[m].xf.complete?
this.Wi[m]||(h=!0):b=!1,this.eb[m].Cf.complete||(c=!1);if(c||b)if(!c||b||!this.Qc||h){m=Math.round(f.Se/f.Kg);c=(f.Se-m)/2;f.G("paint cube single - isMain: "+b+" overlap: "+c);this.Vf=0;this.Qc||(this.Qc=e.createTexture());f.Xd++;e.bindTexture(e.TEXTURE_CUBE_MAP,this.Qc);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,1);h=document.createElement("canvas");h.width=m;h.height=
m;var n=h.getContext("2d");for(m=0;6>m;m++){var q=a[m];this.eb[q].xf.complete?this.Wi[q]||(n.drawImage(this.eb[q].xf,-c,-c),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h),this.Wi[q]=!0):(n.drawImage(this.eb[q].Cf,-c,-c,f.Se,f.Se),e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+m,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,h))}this.Oh=!b}};v.prototype.mr=function(){var f=this.o,e=this.M.N,a=e.levels,b=f.S,c;var h=a.length-1;if(!(0>h)){a[h].Df&&h--;var m=512;f.Nh&&(m=256);!f.xg&&2<=
f.devicePixelRatio&&(m=512);for((c=b.getParameter(b.MAX_CUBE_MAP_TEXTURE_SIZE))&&c<m&&(m=c);0<h&&a[h-1].width<=m;)h--;m=a[h];if(0!=m.Y){c=h;var n=this.hr(h);this.Oh&&n&&(this.Oh=!1);n||(h=a.length-1,m=a[h],n||(m.Df?(n=m.loaded,this.Hl(h-1)&&(--h,n=!0)):n=this.Hl(h)),this.Oh=!0);this.Hl(c);if(n&&this.Vf>h){m=a[h];f.G("paint cube level "+h);this.Vf=h;a=e.ib;h=0<a||1<m.Y||1<m.ta;n=c=void 0;h&&(n=document.createElement("canvas"),n.width=m.width,n.height=m.height,2048>m.width&&(1500<m.width?(n.width=2048,
n.height=2048):700<m.width?(n.width=1024,n.height=1024):(n.width=512,n.height=512)),c=n.getContext("2d"));this.Qc=b.createTexture();f.Xd++;b.bindTexture(b.TEXTURE_CUBE_MAP,this.Qc);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);var q=[1,3,5,4,0,2];e=e.V;for(var r=0;6>r;r++){for(var t=0;t<m.ta;t++)for(var w=0;w<m.Y;w++){var z=w+t*m.Y+q[r]*m.Y*m.ta,A=m.Ma[z],F=A.N;A.Fc&&
(F=A.Fc);F?h?(z=n.width/m.width,c.drawImage(F,z*(w*e-a),z*(t*e-a),z*F.width,z*F.height)):b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,F):(f.G("WTF?!"),f.G(z),f.G(A))}h&&b.texImage2D(b.TEXTURE_CUBE_MAP_POSITIVE_X+r,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,n)}}}}};v.prototype.Hl=function(f){var e=this.o,a=this.M,b=a.N.levels[f];if(0==b.Y)return!1;var c=!0;b.cache=!0;for(var h=0;6>h;h++)for(var m=0;m<b.ta;m++)for(var n=0;n<b.Y;n++){var q=n+m*b.Y+h*b.Y*b.ta,r=b.Ma[q];r||(r=b.Ma[q]=
new y.Zg);this.$i()?r.N||(r.Le?r.Le--:(this.Aj(r,b,a.Jg(h,f,n,m)),e.ub=!0)):a.je++;r.Ob||(c=!1,e.ub=!0)}c&&(b.loaded=!0);return c};v.prototype.hr=function(f){f=this.M.N.levels[f];if(0==f.Y)return!1;for(var e=0;6>e;e++)for(var a=0;a<f.ta;a++)for(var b=0;b<f.Y;b++){var c=f.Ma[b+a*f.Y+e*f.Y*f.ta];if(!c||!c.Ob)return!1}return f.loaded=!0};v.prototype.ready=function(){return null!=this.Qc};v.prototype.np=function(){for(var f=0;6>f;f++)if(!this.eb[f].Cf.complete)return!1;return!0};v.prototype.$l=function(){for(var f=
this.o,e=this.M,a=e.N.levels,b=f.S,c=Date.now(),h=a.length-1;0<=h;h--){var m=a[h];if(!m.cache)for(var n in m.Ma)if(m.Ma.hasOwnProperty(n)){var q=m.Ma[n];0<q.vj&&q.vj--;q.visible||0<q.vj?(q.visible&&(q.Rh=c),q=this.te.indexOf(q),-1!==q&&this.te.splice(q,1)):-1===this.te.indexOf(q)&&(q.level=m,this.te.push(q))}}if(this.te.length>1.1*e.eq)for(this.te.sort(function(r,t){return t.Rh-r.Rh});this.te.length>e.eq;)q=this.te.pop(),q.Ob&&(b.deleteTexture(q.Ob),f.Xd--,q.Ob=0),q.N=null,q.hg&&(b.deleteBuffer(q.hg),
q.hg=0),n=q.level.Ma.indexOf(q),f.G("delete <"+n+"> "+(c-q.Rh)),delete q.level.Ma[n]};v.prototype.hv=function(){var f=this.o;if(f.S){var e=this.o.S,a;for(a=0;a<f.U.length;a++){var b=f.U[a];if(!b.pd){y.ma.identity(this.ya);y.ma.rotate(this.ya,-f.W.m*Math.PI/180,[0,0,1]);y.ma.rotate(this.ya,-f.u.m*Math.PI/180,[1,0,0]);y.ma.rotate(this.ya,(180-f.pan.m)*Math.PI/180,[0,1,0]);y.ma.rotate(this.ya,b.pan*Math.PI/180,[0,1,0]);y.ma.rotate(this.ya,-b.u*Math.PI/180,[1,0,0]);y.ma.translate(this.ya,[0,0,1]);y.ma.rotate(this.ya,
b.zb*Math.PI/180,[0,0,1]);y.ma.rotate(this.ya,-b.Oa*Math.PI/180,[0,1,0]);y.ma.rotate(this.ya,b.Ka*Math.PI/180,[1,0,0]);var c=Math.tan(b.fov/2*Math.PI/180),h=b.aspect;h||(h=16/9);y.ma.scale(this.ya,[c,c/h,1]);y.ma.translate(this.ya,[0,0,-1]);e.bindBuffer(e.ARRAY_BUFFER,this.Ok);e.vertexAttribPointer(this.O.ka,3,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.ff);e.vertexAttribPointer(this.O.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,b.texture);e.texParameteri(e.TEXTURE_2D,
e.TEXTURE_MAG_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE);e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE);e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.xd);e.uniform1i(this.O.yg,0);e.uniformMatrix4fv(this.O.bi,!1,this.ya);e.uniformMatrix4fv(this.O.Ie,!1,this.Db);e.drawElements(e.TRIANGLES,6,e.UNSIGNED_SHORT,0)}}}};v.prototype.gv=function(){var f=this.o,e;if(f.C.width!=f.ea.offsetWidth||f.C.height!=
f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.ic());if(f.S){var a=f.S;a.useProgram(this.O);y.ma.identity(this.Db);y.ma.perspective(f.Nb(),f.Cb.width/f.Cb.height,.1,100,this.Db);a.uniformMatrix4fv(this.O.Ie,!1,this.Db);this.Cg(0);a.uniform1i(this.O.yg,0);a.uniformMatrix4fv(this.O.Ie,!1,this.Db);a.uniformMatrix4fv(this.O.bi,!1,this.ya);a.enableVertexAttribArray(this.O.ka);a.enableVertexAttribArray(this.O.La);a.bindBuffer(a.ARRAY_BUFFER,this.ff);a.vertexAttribPointer(this.O.La,
2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.xd);a.uniform1f(this.O.uk,1E-4);a.vertexAttribPointer(this.O.ka,3,a.FLOAT,!1,0,0);a.bindTexture(a.TEXTURE_2D,f.A.texture);for(e=0;1>e;e++)this.Cg(0),a.bindBuffer(a.ARRAY_BUFFER,f.A.lk),a.vertexAttribPointer(this.O.ka,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,f.A.Ci),a.vertexAttribPointer(this.O.La,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,f.A.qj),a.uniform1i(this.O.yg,
0),a.uniformMatrix4fv(this.O.bi,!1,this.ya),a.uniformMatrix4fv(this.O.Ie,!1,this.Db),a.drawElements(a.TRIANGLES,36,a.UNSIGNED_SHORT,0)}};v.prototype.fv=function(){var f=this.o,e=f.S,a=f.A;if(0<f.U.length)for(var b=0;b<f.U.length;b++){var c=f.U[b];if(!c.pd&&c.isRunning&&c.Gh!=c.j.currentTime&&(c.Gh=c.j.currentTime,!c.aspect&&0<c.j.videoHeight&&(c.aspect=c.j.videoWidth/c.j.videoHeight),f.Ji))try{c.texture&&(e.bindTexture(e.TEXTURE_2D,c.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,
c.j),f.update())}catch(m){f.G(m)}}if(a.j&&(b=Number(a.j.currentTime),a.Gh!=b)){a.Gh=b;try{var h=0<a.j.readyState;f.uj&&a.Tc&&(h=h&&0<a.j.currentTime);a.texture&&a.ng&&h&&(a.Tc=!0,a.width=a.j.videoWidth,a.height=a.j.videoHeight,e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,f.A.flipY),e.bindTexture(e.TEXTURE_2D,a.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGB,e.RGB,e.UNSIGNED_BYTE,a.j),a.Bm=!0,f.update())}catch(m){f.G(m)}}};v.prototype.jp=function(){var f,e,a=this.o,b=this.o.S;a.sb.style.visibility="hidden";a.L.Qh!=
a.L.mode&&(a.L.Qh=a.L.mode);if((0<=a.L.mode||0<a.L.Rb.length)&&!a.D.Fi){var c=1;0>=a.L.mode&&(c=0);3==a.L.mode&&(c=a.L.Ca);for(f=0;f<a.K.length;f++){var h=a.K[f];if("poly"==h.type){var m=h.Bf,n=c;2==a.L.mode&&(n=h.Ca);var q=a.L.Rb.indexOf(h.id);-1!=q&&(n=a.L.Bc[q]);if(0<m.length){q=[];for(e=0;e<m.length;e++)q.push(m[e].fc),q.push(m[e].Qb),q.push(0);b.useProgram(this.ce);b.enable(b.BLEND);b.blendFuncSeparate(b.SRC_ALPHA,b.ONE_MINUS_SRC_ALPHA,b.SRC_ALPHA,b.ONE);b.disable(b.DEPTH_TEST);this.Nm||(this.Nm=
b.createBuffer());b.bindBuffer(b.ARRAY_BUFFER,this.Nm);b.bufferData(b.ARRAY_BUFFER,new Float32Array(q),b.STATIC_DRAW);b.uniform2f(b.getUniformLocation(this.ce,"uCanvasDimensions"),a.C.width,a.C.height);m=b.getUniformLocation(this.ce,"uColor");e=h.Yb;b.uniform3f(m,(e>>16&255)/255,(e>>8&255)/255,(e&255)/255);var r=b.getUniformLocation(this.ce,"uAlpha");b.uniform1f(r,h.Xb*n);b.vertexAttribPointer(this.ce.ka,3,b.FLOAT,!1,0,0);b.drawArrays(b.LINE_LOOP,0,q.length/3);e=h.Wb;b.uniform3f(m,(e>>16&255)/255,
(e>>8&255)/255,(e&255)/255);b.uniform1f(r,h.Vb*n);b.enable(b.STENCIL_TEST);b.clearStencil(0);b.clear(b.STENCIL_BUFFER_BIT);b.colorMask(!1,!1,!1,!1);b.stencilFunc(b.ALWAYS,1,1);b.stencilOp(b.INCR,b.INCR,b.INCR);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.colorMask(!0,!0,!0,!0);b.stencilFunc(b.EQUAL,1,1);b.stencilOp(b.ZERO,b.ZERO,b.ZERO);b.drawArrays(b.TRIANGLE_FAN,0,q.length/3);b.disable(b.BLEND);b.enable(b.DEPTH_TEST);b.disable(b.STENCIL_TEST);b.useProgram(this.O)}}}}};v.prototype.ev=function(){var f=
this.o,e=this.M,a=e.N;if(f.C.width!=f.ea.offsetWidth||f.C.height!=f.ea.offsetHeight)f.C.width=f.ea.offsetWidth,f.C.height=f.ea.offsetHeight;f.we&&(f.Rc(0),f.ic());if(f.S){var b=f.S;this.gk();b.clear(b.COLOR_BUFFER_BIT|b.DEPTH_BUFFER_BIT|b.STENCIL_BUFFER_BIT);b.disable(b.DEPTH_TEST);b.disable(b.CULL_FACE);b.useProgram(this.xh);var c=b.getUniformLocation(this.xh,"uRect");b.uniform2f(b.getUniformLocation(this.xh,"uCanvasDimensions"),f.C.width,f.C.height);b.activeTexture(b.TEXTURE0);b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,
this.xd);var h=b.getAttribLocation(this.xh,"aVertexPosition");b.disableVertexAttribArray(0);b.disableVertexAttribArray(1);b.disableVertexAttribArray(2);b.enableVertexAttribArray(h);b.bindBuffer(b.ARRAY_BUFFER,this.ff);b.vertexAttribPointer(h,2,b.FLOAT,!1,0,0);e.je=0;var m=100/f.fov.m;var n=a.width/a.height;h=f.C.height*m*n;m*=f.C.height;n=(f.pan.m/100/n-.5)*h+f.C.width/2;for(var q=(f.u.m/100-.5)*m+f.C.height/2,r,t,w,z=0;a.levels.length>=z+2&&a.levels[z+1].width>h;)z++;var A;var F=[];for(A=a.levels.length-
1;A>=z;){var E=a.levels[A];if(E.cache){var D={fx:0,fy:0};D.Id=E.Y-1;D.Jd=E.ta-1}else{D={};r=-q/m*(E.height/a.V);t=(-n+f.C.width)/h*(E.width/a.V);var C=(-q+f.C.height)/m*(E.height/a.V);D.fx=Math.min(Math.max(0,Math.floor(-n/h*(E.width/a.V))),E.Y-1);D.fy=Math.min(Math.max(0,Math.floor(r)),E.ta-1);D.Id=Math.min(Math.max(0,Math.floor(t)),E.Y-1);D.Jd=Math.min(Math.max(0,Math.floor(C)),E.ta-1)}F[A]=D;var G=!0;for(t=D.fy;t<=D.Jd;t++)for(r=D.fx;r<=D.Id;r++)w=r+t*E.Y,C=E.Ma[w],C||(C=new y.Zg,E.Ma[w]=C),this.$i()?
C.N||(this.Aj(C,E,e.Jg(0,A,r,t)),f.ub=!0):e.je++,C.N&&C.N.complete||(G=!1),C.visible=!0;D.So=G;A--}for(A=a.levels.length-1;A>=z;){E=a.levels[A];if(F[A]&&0<=F[A].fx)for(D=F[A],t=D.fy;t<=D.Jd;t++)for(r=D.fx;r<=D.Id;r++)w=r+t*E.Y,(C=E.Ma[w])&&C.N&&C.N.complete&&(f=n+(-a.ib+a.V*r)*h/E.width,b.uniform4f(c,f,q+(-a.ib+a.V*t)*m/E.height,C.N.width*h/E.width,C.N.height*m/E.height),C&&C.Ob&&(b.bindBuffer(b.ELEMENT_ARRAY_BUFFER,this.xd),b.bindTexture(b.TEXTURE_2D,C.Ob),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,
b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.drawElements(b.TRIANGLES,6,b.UNSIGNED_SHORT,0)));A--}this.$l()}};v.prototype.Ef=function(){var f=this.o.S;if(f&&this.eb)for(;0<this.eb.length;){var e=this.eb.pop();e.qt=!0;f.deleteTexture(e)}this.Qc&&(f.deleteTexture(this.Qc),this.Qc=null);this.Vf=1E6;this.Wi=[!1,!1,!1,!1,!1,!1]};return v}();y.Jq=x})(ggP2VR||
(ggP2VR={}));(function(y){var x=function(){return function(){this.gi={zh:1,Ah:1,Xh:0,Yh:0,Ki:0,pk:0,scale:1};this.pc=!0;this.Qf=[]}}();y.Fq=function(){return function(){var v;this.bg=Array(6);for(v=0;6>v;v++)this.bg[v]=new x}}()})(ggP2VR||(ggP2VR={}));
(function(y){y.Dq=function(){return function(){this.levels=[];this.Lj="0x000000";this.op=!1;this.Uo=this.To=.4;this.V=512;this.ib=1;this.Fl=0;this.Gl="";this.xp=this.height=this.width=0}}();y.Xm=function(){return function(){this.height=this.width=0;this.Df=this.cache=!1;this.ta=this.Y=0;this.loaded=!1;this.Ma=[]}}();y.Zg=function(){return function(){this.loaded=this.visible=!1;this.Le=this.Zl=0;this.ig=[];this.ol=0;this.mb=[];this.vj=this.Rh=this.Pa=0}}()})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f,e){this.o=f;this.P=e;var a=this.__div=document.createElement("div");a.ggVisible=!0;var b=document.createElement("img");if(e.hd){var c=e.hd;b.setAttribute("style","position: absolute; width: "+e.gf+"px; height: "+e.yd+"px; top: -"+e.yd/2+"px; left: -"+e.gf/2+"px; cursor: pointer; "+f.lb+"user-select: none; max-width: none;")}else c="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABwAAAAcCAYAAAByDd+UAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA5xJREFUeNqclmlIVFEUx997TjrplFQW2WKBBSYtRFlpWUILSSsRZRQIBdGHCFqIoKIvQRsUFRJC9LEgaSFbMMpcWi1pLzOLsjItKms0U5t5/c/wH7nc5o2jF374xrv87z33nHOPaRsRtbFgDpgJxoD+wATfwDNQDK6CyrCr5OcbhgiGIRsUAZt4QTWoIFXgp9JfAhY7rgdBl8NeBoLDYBloA+dBOagFTcDHcVEgDgwBGWA+OAcugvXgvb5wKMGJoAAMp9BpUA96EBf/Btsf8BI8AWfAErAcpHHDZeriliY2AVwDg8AucAQ0Ag+I4XhTm2Oxz8PT46KMbTx5EZjuJDgAnAVusJUm9DhYwalFcc59sIXXIaceFkowDySBPTRPL20xm+b7zYXa+N3CPrWJ6GuwGySA40HLBHc/GywFhbS5R1lEBrZy7FQwiSaX9pmnqeAYt+KUcew7BVZw/QKTq0ocpYPVvDOXItZCk2xgDIZqL8BR8Ab0VDbr4yZOgLeIwzQx6WiQxcCt1+6sld66L4yYtFSwF4yg2dU7/cEwGW9YVkAwmycp1dzdpvgm0DcCh4kHmxWzBls0uBX4qqmZJ4KzePm1IeJLgjmlC16aDKZpp5Q168B3o6wsSwTHgU+MIUs74RSj6y1d+212HKimJlUE+tFRfJpYtOKNXWmJTASqWf2Bu/R6+4TKHOrOzG4IhptjWgHbGkZvepQ6SQK7oRuCXzjX1DJavBEX1ygfT8FgBqpfm1zRDcEKbR2bsZlkJCdXieB1ZhZ5YtqVgXIPN+m9kbY6hpdb+d9fPncJRmZmqQheZkemJmgxyxykl3XWJEkcAl7N21s7PDcl5ZJ0PAa3wVwmWtVbZafPwQ7wLozYB7ATPNJO56d/LAikP9u+66KNJS1d4IOZp7wU0hfLukUyzgwm70T2N/DOxIy/eFdqawa5DL2NEGwP5k15Ja4woz9glvcomd9NzyvkFcQo5gomaLfm5c0svnKZ2k7q7+FauvR2MJKZR3+sY5WgtvkdG6JyELGhNHMTXyGfLviRJ5Tcd4Dlhle7086Sgp8CqVxDkn4OqHaqacr5ekjy3Q/W0FRNNGmoMtamdzdxsytZC0lqXKhEgWPVVgImg2NgFT1MHOoOk3yLEtgWN5TEOYvoIFI1rGM19//2wpAD7imF7lfwENwAxaASNCj90pcLLKdC2Iyw1M9gnEplMEp5kOU1f8WwKGJm8oUr9f8JMAAVMDM6HSDa9QAAAABJRU5ErkJggg%3D%3D",
b.setAttribute("style","position: absolute; width: 28px; height: 28px; top: -14px; left: -14px; cursor: pointer; "+f.lb+"user-select: none; max-width: none;");b.setAttribute("src",c);b.ondragstart=function(){return!1};a.appendChild(b);c="position:absolute;"+(f.lb+"user-select: none;");c+=f.lb+"touch-callout: none;";c+=f.lb+"tap-highlight-color: rgba(0,0,0,0);";f.Sc&&!f.oa&&(c+=f.lb+"transform: translateZ(9999999px);");a.setAttribute("style",c);a.onclick=function(){f.Oe(e);f.Ml(f.Va(e.url),e.target);
f.ha&&f.ha.hotspotProxyClick&&f.ha.hotspotProxyClick(e.id,e.url);f.I("hsproxyclick",{id:e.id,url:e.url})};a.ondblclick=function(){f.ha&&f.ha.hotspotProxyDoubleClick&&f.ha.hotspotProxyDoubleClick(e.id,e.url);f.I("hsproxydblclick",{id:e.id,url:e.url})};var h=f.L.ck;if(h.enabled&&""!=e.title){var m=document.createElement("div");c="position:absolute;";c=e.hd?f.hl()?c+("top: -"+(e.yd/2+20)+"px;"):c+("top: "+e.yd/2+"px;"):f.hl()?c+"top:\t -50px;":c+"top:\t 20px;";c=h.qk?c+"white-space: pre-wrap;":c+"white-space: nowrap;";
c+=f.lb+"transform-origin: 50% 50%;";m.setAttribute("style",c+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;");m.style.color=this.o.pa(h.dk,h.bk);m.style.backgroundColor=h.background?this.o.pa(h.Wb,h.Vb):"transparent";m.style.border="solid "+this.o.pa(h.Yb,h.Xb)+" "+h.Qi+"px";m.style.borderRadius=h.zk+"px";m.style.textAlign="center";0<h.width?(m.style.left=-h.width/2+"px",m.style.width=h.width+"px"):m.style.width="auto";m.style.height=0<h.height?h.height+"px":"auto";m.style.overflow=
"hidden";m.innerHTML=f.Va(e.title);m.classList.add("ggskin");m.classList.add("ggdefaulthotspot");a.addEventListener("mouseover",function(){0==h.width&&(m.style.left=-m.offsetWidth/2+"px");m.style.visibility="inherit";f.ha&&f.ha.hotspotProxyOver&&f.ha.hotspotProxyOver(e.id,e.url);f.I("hsproxyover",{id:e.id,url:e.url})});a.addEventListener("mouseout",function(){m.style.visibility="hidden";f.ha&&f.ha.hotspotProxyOut&&f.ha.hotspotProxyOut(e.id,e.url);f.I("hsproxyout",{id:e.id,url:e.url})});a.appendChild(m);
this.hq=m}a.addEventListener("mouseover",function(){f.Oe(e)});a.addEventListener("mouseout",function(){f.Oe(null)})}v.prototype.Hs=function(){this.hq&&(this.hq.innerHTML=this.o.Va(this.P.title))};return v}();y.zq=x})(ggP2VR||(ggP2VR={}));
(function(y){y.fd=function(){return function(){this.value=this.time=0;this.Mm="";this.cf=this.bf=this.af=this.$e=this.qb=this.type=this.Gb=0;this.td="";this.$m=0}}();y.Um=function(){return function(){this.$u=this.Sq=this.length=0}}();y.Tm=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.o=f;this.enabled=!1;this.fh=1;this.Pf=0;this.type="crossdissolve";this.ed=this.da=this.Zc=0;this.tk=20;this.rk=90;this.sk=20;this.Yg=1;this.Xg=!1;this.zm=this.ym=this.aq=0;this.Bi=70;this.yq=0;this.Hb=this.xq=1;this.Wg=this.Vg=.5;this.Ze=this.pe=!1;this.Qk=1}v.prototype.Kh=function(){var f=this.o.S,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nattribute vec2 aTextureCoord;\nvarying vec2 vTextureCoord;\nuniform bool uZoomIn;\nuniform float uZoomFactor;\nuniform vec2 uZoomCenter;\nvoid main(void) {\n\t gl_Position = vec4(aVertexPosition, 1.0);\n\t if(!uZoomIn) {\n\t \n\t   vTextureCoord = aTextureCoord;\n\t }\n\t else {\n\t   vTextureCoord = (aTextureCoord - vec2(0.5, 0.5)) * (1.0/uZoomFactor) + uZoomCenter;\n\t }\n}\n");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uAlpha;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x, textureColor.y, textureColor.z, uAlpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.za=f.createProgram();f.attachShader(this.za,e);f.attachShader(this.za,a);f.linkProgram(this.za);f.getProgramParameter(this.za,f.LINK_STATUS)||alert("Could not initialise shaders");this.za.ka=f.getAttribLocation(this.za,"aVertexPosition");f.enableVertexAttribArray(this.za.ka);this.za.La=f.getAttribLocation(this.za,"aTextureCoord");f.enableVertexAttribArray(this.za.La);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform float uColorPercent;\nuniform float uAlpha;\nuniform vec3 uDipColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n gl_FragColor = vec4(textureColor.x * (1.0 - uColorPercent) + uDipColor.x * uColorPercent, textureColor.y * (1.0 - uColorPercent) + uDipColor.y * uColorPercent, textureColor.z * (1.0 - uColorPercent) + uDipColor.z * uColorPercent, uAlpha);\n}\n");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.jb=f.createProgram();f.attachShader(this.jb,e);f.attachShader(this.jb,a);f.linkProgram(this.jb);f.getProgramParameter(this.jb,f.LINK_STATUS)||alert("Could not initialise shaders");this.jb.ka=f.getAttribLocation(this.jb,"aVertexPosition");f.enableVertexAttribArray(this.jb.ka);this.jb.La=f.getAttribLocation(this.jb,"aTextureCoord");f.enableVertexAttribArray(this.jb.La);a=f.createShader(f.FRAGMENT_SHADER);
f.shaderSource(a,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec2 vTextureCoord;\nuniform bool uRound;\nuniform float uRadius;\nuniform vec2 uRectDim;\nuniform vec2 uIrisCenter;\nuniform float uSoftEdge;\nuniform sampler2D uSampler;\nvoid main(void) {\n float alpha = 0.0;\n vec4 textureColor = texture2D(uSampler, vec2(vTextureCoord.s, vTextureCoord.t));\n if (uRound) {\n\t  vec2 diff = uIrisCenter - gl_FragCoord.xy;\n\t   float distFromCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n\t   if (distFromCenter > 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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Ta=f.createProgram();f.attachShader(this.Ta,e);f.attachShader(this.Ta,a);f.linkProgram(this.Ta);f.getProgramParameter(this.Ta,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ta.ka=f.getAttribLocation(this.Ta,"aVertexPosition");f.enableVertexAttribArray(this.Ta.ka);this.Ta.La=f.getAttribLocation(this.Ta,"aTextureCoord");f.enableVertexAttribArray(this.Ta.La);a=f.createShader(f.FRAGMENT_SHADER);
f.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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.ab=f.createProgram();f.attachShader(this.ab,e);f.attachShader(this.ab,a);f.linkProgram(this.ab);f.getProgramParameter(this.ab,f.LINK_STATUS)||alert("Could not initialise shaders");this.ab.ka=f.getAttribLocation(this.ab,"aVertexPosition");f.enableVertexAttribArray(this.ab.ka);this.ab.La=f.getAttribLocation(this.ab,"aTextureCoord");f.enableVertexAttribArray(this.ab.La)};v.prototype.Rc=function(){var f=
this.o.S;if(!f)return!1;if(this.Cc=f.createFramebuffer()){f.bindFramebuffer(f.FRAMEBUFFER,this.Cc);this.Cc.width=1024;this.Cc.height=1024;this.Jf=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Jf);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MAG_FILTER,f.LINEAR);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,this.Cc.width,this.Cc.height,0,f.RGBA,f.UNSIGNED_BYTE,null);var e=f.createRenderbuffer();f.bindRenderbuffer(f.RENDERBUFFER,e);f.renderbufferStorage(f.RENDERBUFFER,
f.DEPTH_COMPONENT16,this.Cc.width,this.Cc.height);f.framebufferTexture2D(f.FRAMEBUFFER,f.COLOR_ATTACHMENT0,f.TEXTURE_2D,this.Jf,0);f.framebufferRenderbuffer(f.FRAMEBUFFER,f.DEPTH_ATTACHMENT,f.RENDERBUFFER,e);f.bindTexture(f.TEXTURE_2D,null);f.bindRenderbuffer(f.RENDERBUFFER,null);f.bindFramebuffer(f.FRAMEBUFFER,null);this.xb=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.xb);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),f.STATIC_DRAW);this.xb.itemSize=3;this.xb.numberOfItems=
4;this.wg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.wg);f.bufferData(f.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),f.STATIC_DRAW);return!0}return!1};v.prototype.Ol=function(f){var e=this.o.S,a=this.o.Cb;if(this.Md){e.useProgram(this.za);e.bindBuffer(e.ARRAY_BUFFER,this.xb);e.vertexAttribPointer(this.za.ka,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0);e.enableVertexAttribArray(this.za.ka);e.enableVertexAttribArray(this.za.La);
e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Jf);a=1+(this.Hb-1)*f;var b=e.getUniformLocation(this.za,"uAlpha");e.uniform1f(b,1);b=e.getUniformLocation(this.za,"uZoomIn");e.uniform1i(b,1);b=e.getUniformLocation(this.za,"uZoomCenter");var c=.5+(this.Vg-.5)*Math.sqrt(f),h=.5+(this.Wg-.5)*Math.sqrt(f);0>c-.5/a&&(c=.5/a);0>h-.5/a&&(h=.5/a);1<c+.5/a&&(c=1-.5/a);1<h+.5/a&&(h=1-.5/a);e.uniform2f(b,c,h);c=e.getUniformLocation(this.za,"uZoomFactor");e.uniform1f(c,a);e.uniform1i(e.getUniformLocation(this.za,
"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.xb.numberOfItems);e.useProgram(this.o.sa.O)}else{this.o.Hi();e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.SRC_ALPHA,e.ONE);e.enable(e.BLEND);e.disable(e.DEPTH_TEST);c=.5+(this.Vg-.5);h=.5+(this.Wg-.5);0>c-.5/this.Hb&&(c=.5/this.Hb);0>h-.5/this.Hb&&(h=.5/this.Hb);1<c+.5/this.Hb&&(c=1-.5/this.Hb);1<h+.5/this.Hb&&(h=1-.5/this.Hb);if("crossdissolve"==this.type)e.useProgram(this.za),e.bindBuffer(e.ARRAY_BUFFER,this.xb),e.vertexAttribPointer(this.za.ka,
this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.za.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),b=e.getUniformLocation(this.za,"uAlpha"),e.uniform1f(b,1-f),b=e.getUniformLocation(this.za,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.za,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.za,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.za,
"uSampler"),0);else if("diptocolor"==this.type)e.useProgram(this.jb),e.bindBuffer(e.ARRAY_BUFFER,this.xb),e.vertexAttribPointer(this.jb.ka,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.jb.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),e.uniform1f(e.getUniformLocation(this.jb,"uColorPercent"),Math.min(2*f,1)),b=e.getUniformLocation(this.jb,"uAlpha"),e.uniform1f(b,1-Math.max(2*(f-.5),0)),e.uniform3f(e.getUniformLocation(this.jb,
"uDipColor"),(this.Pf>>16&255)/255,(this.Pf>>8&255)/255,(this.Pf&255)/255),b=e.getUniformLocation(this.jb,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.jb,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.jb,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.jb,"uSampler"),0);else if("irisround"==this.type||"irisroundcenter"==this.type||"irisrectangular"==this.type||"irisrectangularcenter"==this.type){e.useProgram(this.Ta);
e.bindBuffer(e.ARRAY_BUFFER,this.xb);e.vertexAttribPointer(this.Ta.ka,this.xb.itemSize,e.FLOAT,!1,0,0);e.bindBuffer(e.ARRAY_BUFFER,this.wg);e.vertexAttribPointer(this.Ta.La,2,e.FLOAT,!1,0,0);e.activeTexture(e.TEXTURE0);e.bindTexture(e.TEXTURE_2D,this.Jf);if(1==this.da||2==this.da||6==this.da||7==this.da||"irisroundcenter"==this.type||"irisrectangularcenter"==this.type)var m=b=.5;else b=this.Vg,m=this.Wg;var n=b*a.width,q=m*a.height;n=Math.max(n,a.width-n);q=Math.max(q,a.height-q);"irisround"==this.type||
"irisroundcenter"==this.type?e.uniform1f(e.getUniformLocation(this.Ta,"uRadius"),(Math.sqrt(n*n+q*q)+this.Zc)*f):(n>q?(q=a.height/a.width*n+this.Zc,n+=this.Zc):(n=a.width/a.height*q+this.Zc,q+=this.Zc),e.uniform2f(e.getUniformLocation(this.Ta,"uRectDim"),n*f,q*f));f=e.getUniformLocation(this.Ta,"uSoftEdge");e.uniform1f(f,this.Zc);e.uniform1i(e.getUniformLocation(this.Ta,"uRound"),"irisround"==this.type||"irisroundcenter"==this.type?1:0);e.uniform2f(e.getUniformLocation(this.Ta,"uIrisCenter"),b*a.width,
m*a.height);b=e.getUniformLocation(this.Ta,"uZoomIn");e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0);b=e.getUniformLocation(this.Ta,"uZoomCenter");e.uniform2f(b,c,h);c=e.getUniformLocation(this.Ta,"uZoomFactor");e.uniform1f(c,this.Hb);e.uniform1i(e.getUniformLocation(this.Ta,"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)e.useProgram(this.ab),e.bindBuffer(e.ARRAY_BUFFER,
this.xb),e.vertexAttribPointer(this.ab.ka,this.xb.itemSize,e.FLOAT,!1,0,0),e.bindBuffer(e.ARRAY_BUFFER,this.wg),e.vertexAttribPointer(this.ab.La,2,e.FLOAT,!1,0,0),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,this.Jf),e.uniform1f(e.getUniformLocation(this.ab,"uPercent"),3>this.Qk?f*(a.width+this.Zc):f*(a.height+this.Zc)),f=e.getUniformLocation(this.ab,"uSoftEdge"),e.uniform1f(f,this.Zc),e.uniform1i(e.getUniformLocation(this.ab,"uDirection"),this.Qk),e.uniform2f(e.getUniformLocation(this.ab,
"uCanvasDimensions"),a.width,a.height),b=e.getUniformLocation(this.ab,"uZoomIn"),e.uniform1i(b,1==this.da||2==this.da||6==this.da||7==this.da?1:0),b=e.getUniformLocation(this.ab,"uZoomCenter"),e.uniform2f(b,c,h),c=e.getUniformLocation(this.ab,"uZoomFactor"),e.uniform1f(c,this.Hb),e.uniform1i(e.getUniformLocation(this.ab,"uSampler"),0);e.drawArrays(e.TRIANGLE_STRIP,0,this.xb.numberOfItems);e.useProgram(this.o.sa.O);e.disable(e.BLEND);e.enable(e.DEPTH_TEST)}};return v}();y.Bq=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.Gi=[];this.o=f;this.enabled=!1;this.Gb=2;this.zn=!1}v.prototype.Kn=function(f){if(2==f.mode||3==f.mode||5==f.mode){var e=this.o.ga.currentTime;if(f.vb&&f.vb.gain&&f.Mb&&f.Kb&&f.Lb){var a=f.Mb.gain.value,b=f.Kb.gain.value,c=f.Lb.gain.value;f.vb.gain.linearRampToValueAtTime(f.vb.gain.value,e);f.vb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Mb.gain.linearRampToValueAtTime(a,e);f.Mb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Kb.gain.linearRampToValueAtTime(b,
e);f.Kb.gain.linearRampToValueAtTime(0,e+this.Gb);f.Lb.gain.linearRampToValueAtTime(c,e);f.Lb.gain.linearRampToValueAtTime(0,e+this.Gb)}}else e=this.o.ga.currentTime,f.Jb&&f.Jb.gain&&(f.Jb.gain.linearRampToValueAtTime(f.Jb.gain.value,e),f.Jb.gain.linearRampToValueAtTime(0,e+this.Gb));f.Yk=!0;setTimeout(function(){f.Me()},1E3*this.Gb+5)};v.prototype.Ou=function(){for(var f=0;f<this.o.X.length;f++){var e=this.o.X[f];!e.stopped&&!this.o.isPlaying(e.id)&&-1<e.loop&&4!=e.mode&&6!=e.mode&&(e.ua?e.Sd():
(e.Pd&&e.Ve(),e.j.play(),e.j.currentTime=0))}};v.prototype.wr=function(){var f=(this.o.ga.currentTime-this.Ku)/this.Gb;f=Math.min(1,f);for(var e=0;e<this.o.X.length;e++){var a=this.o.X[e];this.o.isPlaying(a.id)&&1>a.wa&&(a.wa=f)}1==f&&clearInterval(this.Ju)};return v}();y.Cq=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){function v(f){this.Vh=[];this.vd=null;this.zc=[];this.lc=[];this.Ac=[];this.om=!0;this.o=f;this.kr()}v.prototype.Kh=function(){var f=this.o.S,e=f.createShader(f.VERTEX_SHADER);f.shaderSource(e,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),e=null);var a=f.createShader(f.FRAGMENT_SHADER);f.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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Ec=f.createProgram();f.attachShader(this.Ec,e);f.attachShader(this.Ec,a);f.linkProgram(this.Ec);f.getProgramParameter(this.Ec,f.LINK_STATUS)||alert("Could not initialise shaders");this.Ec.ka=f.getAttribLocation(this.Ec,"aVertexPosition");f.enableVertexAttribArray(this.Ec.ka);a=f.createShader(f.VERTEX_SHADER);e=f.createShader(f.VERTEX_SHADER);f.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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);f.shaderSource(e,"#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");
f.compileShader(e);f.getShaderParameter(e,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(e)),a=null);var b=f.createShader(f.FRAGMENT_SHADER);f.shaderSource(b,"#ifdef GL_FRAGMENT_PRECISION_HIGH\nprecision highp float;\n#else\nprecision mediump float;\n#endif\nvarying vec4 vColor;\nuniform vec2 uCircleTexturePosition;\nuniform vec3 uCircleColor;\nuniform float uCircleRadius;\nuniform float uCircleAlpha;\nuniform float uCircleSoftness;\nuniform float uAspectRatio;\nvoid main(void) {\n vec2 diff = uCircleTexturePosition - gl_FragCoord.xy;\n diff.y = diff.y * uAspectRatio;\n float distFromCircleCenter = sqrt( (diff.x * diff.x) + (diff.y * diff.y) );\n float softnessDistance = uCircleRadius * (1.0 - uCircleSoftness);\n if (distFromCircleCenter > uCircleRadius)\n {\n\t  gl_FragColor = vec4(uCircleColor, 0.0);\n }\n else if (distFromCircleCenter <= (softnessDistance))\n {\n\t  float factor = distFromCircleCenter / softnessDistance;\n\t  gl_FragColor = vec4(uCircleColor, pow((1.0 - (0.2 * factor)) * uCircleAlpha, 1.8));\n }\n else\n {\n\t  float factor = (distFromCircleCenter - softnessDistance) / (uCircleRadius - softnessDistance);\n\t  gl_FragColor = vec4(uCircleColor, pow((0.8 - (0.8 * factor)) * uCircleAlpha, 1.8));\n }\n}\n");
f.compileShader(b);f.getShaderParameter(b,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(b)),b=null);this.Aa=f.createProgram();f.attachShader(this.Aa,a);f.attachShader(this.Aa,b);f.linkProgram(this.Aa);f.getProgramParameter(this.Aa,f.LINK_STATUS)||alert("Could not initialise shaders");this.Aa.ka=f.getAttribLocation(this.Aa,"aVertexPosition");f.enableVertexAttribArray(this.Aa.ka);a=f.createShader(f.FRAGMENT_SHADER);f.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");
f.compileShader(a);f.getShaderParameter(a,f.COMPILE_STATUS)||(alert(f.getShaderInfoLog(a)),a=null);this.Fb=f.createProgram();f.attachShader(this.Fb,e);f.attachShader(this.Fb,a);f.linkProgram(this.Fb);f.getProgramParameter(this.Fb,f.LINK_STATUS)||alert("Could not initialise shaders");this.Fb.ka=f.getAttribLocation(this.Fb,"aVertexPosition")};v.prototype.Rc=function(){var f=this.o.S;this.Vd=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.Vd);f.bufferData(f.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),f.STATIC_DRAW);this.Vd.itemSize=3;this.Vd.numberOfItems=4;this.dg=f.createBuffer();f.bindBuffer(f.ARRAY_BUFFER,this.dg);for(var e=[0,0,0],a=2*Math.PI/6,b=Math.PI/180*35,c=1,h=b;h<=b+2*Math.PI;h+=a)e.push(Math.sin(h)),e.push(-Math.cos(h)),e.push(0),c++;f.bufferData(f.ARRAY_BUFFER,new Float32Array(e),f.STATIC_DRAW);this.dg.itemSize=3;this.dg.numberOfItems=c;this.Ap=f.createTexture();f.bindTexture(f.TEXTURE_2D,this.Ap);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_MIN_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,
f.TEXTURE_MAG_FILTER,f.LINEAR);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_S,f.CLAMP_TO_EDGE);f.texParameteri(f.TEXTURE_2D,f.TEXTURE_WRAP_T,f.CLAMP_TO_EDGE);e=document.createElement("canvas");e.width=100;e.height=1;a=e.getContext("2d");a.width=100;a.height=1;b=a.createLinearGradient(0,0,100,0);b.addColorStop(0,this.o.pa(0,0));b.addColorStop(.88,this.o.pa(0,0));b.addColorStop(.9,this.o.pa(16654848,1));b.addColorStop(.92,this.o.pa(16776448,1));b.addColorStop(.94,this.o.pa(4849466,1));b.addColorStop(.96,
this.o.pa(131071,1));b.addColorStop(.98,this.o.pa(8190,1));b.addColorStop(1,this.o.pa(0,0));a.fillStyle=b;a.fillRect(0,0,100,1);f.texImage2D(f.TEXTURE_2D,0,f.RGBA,f.RGBA,f.UNSIGNED_BYTE,e)};v.prototype.Qt=function(){for(;0<this.Vh.length;)this.Vh.pop()};v.prototype.kr=function(){var f=[],e=[],a=[];var b={radius:14,alpha:.2,color:11390415,B:.27};f.push(b);b={radius:20,alpha:.25,color:11390415,B:.4};f.push(b);b={radius:10,alpha:.2,color:12442332,B:.6};f.push(b);b={radius:15,alpha:.2,color:11390415,
B:.8};f.push(b);b={radius:10,alpha:.2,color:12442332,B:1.5};f.push(b);b={radius:15,alpha:.2,color:11390415,B:1.8};f.push(b);b={radius:8,alpha:.2,color:12575203,H:.8,B:.7};e.push(b);b={radius:7,alpha:.4,color:12575203,H:.5,B:1.6};e.push(b);b={radius:5,alpha:.4,color:12575203,H:.6,B:.9};e.push(b);b={radius:8,alpha:.3,color:12575203,H:.4,B:1.1};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:30,alpha:.3,color:11390415,B:.5};f.push(b);b={radius:10,alpha:.3,color:11390415,
B:1};f.push(b);b={radius:20,alpha:.3,color:11390415,B:1.3};f.push(b);b={radius:10,alpha:.3,color:11390415,B:1.5};f.push(b);b={radius:15,alpha:.3,color:11390415,B:1.8};f.push(b);b={radius:10,alpha:.3,color:15506856,H:.8,B:.7};e.push(b);b={radius:20,alpha:.5,color:15506856,H:.5,B:1.6};e.push(b);b={radius:5,alpha:.5,color:15506856,H:.6,B:.9};e.push(b);b={radius:60,alpha:.4,color:15506856,H:.2,B:1.1};e.push(b);a.push({radius:220,alpha:.035,B:2});this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=
[];a=[];b={radius:30,alpha:.5,color:15465727,B:.5};f.push(b);b={radius:40,alpha:.28,color:15726842,B:.8};f.push(b);b={radius:25,alpha:.32,color:15726842,B:1.1};f.push(b);b={radius:15,alpha:.25,color:15726842,B:1.35};f.push(b);b={radius:10,alpha:.28,color:15465727,B:1.65};f.push(b);b={radius:10,alpha:.45,color:15465727,H:.8,B:.7};e.push(b);b={radius:7,alpha:.5,color:15465727,H:.4,B:.9};e.push(b);b={radius:40,alpha:.4,color:15465727,H:.3,B:.38};e.push(b);b={radius:50,alpha:.4,color:15465727,H:.5,B:1.25};
e.push(b);b={radius:18,alpha:.2,color:15465727,H:.5,B:1.25};e.push(b);b={radius:10,alpha:.34,color:15726842,H:.8,B:1.5};e.push(b);b={radius:38,alpha:.37,color:15465727,H:.3,B:-.5};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.5,color:16363159,B:.1};f.push(b);b={radius:26,alpha:.3,color:16091819,B:.32};f.push(b);b={radius:29,alpha:.2,color:16091819,B:1.32};f.push(b);b={radius:20,alpha:.18,color:16363159,B:1.53};f.push(b);b={radius:27,alpha:.13,color:16425092,
B:1.6};f.push(b);b={radius:20,alpha:.1,color:16091819,B:1.75};f.push(b);b={radius:12,alpha:.45,color:16312238,H:.45,B:.2};e.push(b);b={radius:8,alpha:.25,color:16434209,H:.7,B:.33};e.push(b);b={radius:9,alpha:.25,color:16091819,H:.4,B:.7};e.push(b);b={radius:7,alpha:.2,color:16091819,H:.4,B:.85};e.push(b);b={radius:60,alpha:.23,color:16091819,H:.55,B:1.05};e.push(b);b={radius:37,alpha:.1,color:16091819,H:.55,B:1.22};e.push(b);b={radius:10,alpha:.25,color:16363159,H:.65,B:1.38};e.push(b);b={radius:7,
alpha:.2,color:16434209,H:.5,B:1.45};e.push(b);b={radius:3,alpha:.2,color:16416033,H:.5,B:1.78};e.push(b);b={radius:6,alpha:.18,color:16434209,H:.45,B:1.9};e.push(b);b={radius:4,alpha:.14,color:16766514,H:.45,B:2.04};e.push(b);b={radius:30,alpha:.14,color:16766514,H:.8,B:.04};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:9,alpha:.3,color:14346999,H:.3,B:.3};e.push(b);b={radius:5,alpha:.5,color:14148072,H:.8,B:.6};e.push(b);b={radius:3,alpha:.37,color:14346999,
H:.66,B:.8};e.push(b);b={radius:45,alpha:.2,color:14346999,H:.36,B:1.2};e.push(b);b={radius:13,alpha:.2,color:14346999,H:.36,B:1.23};e.push(b);b={radius:11,alpha:.2,color:14148072,H:.36,B:1.28};e.push(b);b={radius:27,alpha:.16,color:14346999,H:.36,B:1.55};e.push(b);b={radius:6,alpha:.36,color:14148072,H:.8,B:1.7};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};f.push(b);b={radius:23,
alpha:.18,color:15186464,B:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,B:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,H:.45,B:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};e.push(b);
b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};e.push(b);b={radius:55,alpha:.2,color:15451904,H:.45,B:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,
B:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};f.push(b);b={radius:10,alpha:.27,color:11007484,B:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,B:1};f.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,H:.45,B:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,
B:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};e.push(b);b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:-.18};e.push(b);this.zc.push(f);
this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,B:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,H:.22,B:1.45};e.push(b);b={radius:7,
alpha:.5,color:15628151,H:.3,B:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,H:.3,B:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,H:.3,B:1.8};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:10933495,B:.32};f.push(b);b={radius:14,alpha:.3,color:11007484,B:.36};f.push(b);b={radius:10,alpha:.3,color:4037331,B:.58};f.push(b);b={radius:14,alpha:.22,color:8835068,B:.68};f.push(b);
b={radius:10,alpha:.27,color:11007484,B:.82};f.push(b);b={radius:11,alpha:.27,color:10867450,B:1};f.push(b);b={radius:9,alpha:.2,color:6158332,B:1.05};f.push(b);b={radius:10,alpha:.17,color:10867450,B:1.78};f.push(b);b={radius:10,alpha:.3,color:4037331,B:-.23};f.push(b);b={radius:8,alpha:.45,color:8835068,H:.45,B:.175};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:.46};e.push(b);b={radius:3,alpha:.3,color:10867450,H:.35,B:.5};e.push(b);b={radius:60,alpha:.37,color:4031699,H:.75,B:.75};e.push(b);
b={radius:3,alpha:.25,color:4031699,H:.25,B:.75};e.push(b);b={radius:3,alpha:.2,color:6158332,H:.25,B:.9};e.push(b);b={radius:7,alpha:.45,color:8835068,H:.45,B:1.3};e.push(b);b={radius:32,alpha:.22,color:8835068,H:.75,B:1.62};e.push(b);b={radius:9,alpha:.45,color:4031699,H:.65,B:1.6};e.push(b);b={radius:8,alpha:.25,color:4031699,H:.65,B:1.83};e.push(b);b={radius:7,alpha:.4,color:12574715,H:.55,B:-.18};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:16,alpha:.4,color:16389120,
B:.32};f.push(b);b={radius:26,alpha:.22,color:16389120,B:.4};f.push(b);b={radius:26,alpha:.25,color:16389120,B:.65};f.push(b);b={radius:18,alpha:.3,color:16389120,B:1.23};f.push(b);b={radius:14,alpha:.26,color:16389120,B:1.33};f.push(b);b={radius:17,alpha:.18,color:16389120,B:1.7};f.push(b);b={radius:30,alpha:.16,color:16389120,B:2.15};f.push(b);b={radius:100,alpha:.25,color:16389120,H:.22,B:1.45};e.push(b);b={radius:7,alpha:.5,color:15628151,H:.3,B:1.5};e.push(b);b={radius:3,alpha:.5,color:15628151,
H:.3,B:1.52};e.push(b);b={radius:4,alpha:.5,color:16389120,H:.3,B:1.745};e.push(b);b={radius:9,alpha:.22,color:16389120,H:.3,B:1.8};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a);f=[];e=[];a=[];b={radius:24,alpha:.2,color:15186464,B:.2};f.push(b);b={radius:7,alpha:.26,color:15186464,B:.35};f.push(b);b={radius:23,alpha:.18,color:15186464,B:.65};f.push(b);b={radius:13,alpha:.2,color:15186464,B:.8};f.push(b);b={radius:11,alpha:.15,color:15186464,B:1.4};f.push(b);b={radius:15,alpha:.11,color:15451904,
B:1.6};f.push(b);b={radius:6,alpha:.45,color:15579138,H:.45,B:.22};e.push(b);b={radius:3,alpha:.3,color:15451904,H:.25,B:.4};e.push(b);b={radius:4,alpha:.2,color:15451904,H:.25,B:.45};e.push(b);b={radius:65,alpha:.17,color:15186464,H:.25,B:.5};e.push(b);b={radius:5,alpha:.45,color:15579138,H:.45,B:.88};e.push(b);b={radius:140,alpha:.18,color:15579138,H:.32,B:.95};e.push(b);b={radius:12,alpha:.22,color:15579138,H:.32,B:1.1};e.push(b);b={radius:8,alpha:.32,color:15451904,H:.72,B:1.2};e.push(b);b={radius:55,
alpha:.2,color:15451904,H:.45,B:1.33};e.push(b);b={radius:4,alpha:.3,color:15451904,H:.25,B:1.42};e.push(b);this.zc.push(f);this.lc.push(e);this.Ac.push(a)};v.prototype.Bt=function(){if(this.om){var f=this.o.S,e,a=new y.Ua(0,0,-100),b=this.o.mf(),c=0,h=0,m=!1;if(this.o.oa){var n=this.o.Cb.width;var q=this.o.Cb.height;this.o.D.Fi&&(n=this.o.D.Cc.width,q=this.o.D.Cc.height)}else{this.aa||(this.aa=this.vd.getContext("2d"));if(this.aa.width!==this.o.C.width||this.aa.height!==this.o.C.height)this.aa.width=
this.o.C.width,this.aa.height=this.o.C.height;this.aa.clear?this.aa.clear():this.aa.clearRect(0,0,this.vd.width,this.vd.height);n=this.aa.width;q=this.aa.height}var r=Math.sqrt(n*n+q*q),t=r/800;for(e=0;e<this.Vh.length;e++){var w=this.Vh[e];a.init(0,0,-100);a.Ka(-w.u*Math.PI/180);a.Oa(w.pan*Math.PI/180);a.Oa(-this.o.pan.m*Math.PI/180);a.Ka(this.o.u.m*Math.PI/180);a.zb(this.o.W.m*Math.PI/180);if(-.01>a.z){h=-b/a.z;c=a.x*h;h*=a.y;var z=Math.max(n,q);Math.abs(c)<z/2+100&&Math.abs(h)<z/2+100&&(m=!0,c+=
n/2,h+=q/2)}if(m){this.o.oa&&(f.blendFunc(f.SRC_ALPHA,f.ONE),f.enable(f.BLEND),f.disable(f.DEPTH_TEST));z=n/2;var A=q/2;var F=Math.sqrt((z-c)*(z-c)+(A-h)*(A-h));var E=r/2;A=n>q?n:q;z=w.jn/100*((E-F)/E);0>z&&(z=0);if(this.o.oa){f.useProgram(this.Ec);f.bindBuffer(f.ARRAY_BUFFER,this.o.D.xb);f.vertexAttribPointer(this.Ec.ka,this.o.D.xb.itemSize,f.FLOAT,!1,0,0);var D=f.getUniformLocation(this.Ec,"uCanvasDimensions");f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight);f.uniform2f(f.getUniformLocation(this.Ec,
"uFlareCenterPosition"),f.drawingBufferWidth/n*c,q-f.drawingBufferHeight/q*h);f.uniform1f(f.getUniformLocation(this.Ec,"uBlindingValue"),z);D=f.getUniformLocation(this.Ec,"uAspectRatio");f.uniform1f(D,this.o.D.Fi?f.drawingBufferWidth/f.drawingBufferHeight:f.drawingBufferWidth/f.drawingBufferHeight/(n/q));f.drawArrays(f.TRIANGLE_STRIP,0,this.o.D.xb.numberOfItems)}else D=this.aa.createRadialGradient(c,h,1,c,h,A),D.addColorStop(0,"rgba(255, 255, 255, "+z+")"),D.addColorStop(.5,"rgba(255, 255, 255, "+
.8*z+")"),D.addColorStop(1,"rgba(255, 255, 255, "+.6*z+")"),this.aa.fillStyle=D,this.aa.fillRect(0,0,this.aa.width,this.aa.height);if(0!=Number(w.type)&&!this.o.D.Fi){z=n/2-c;A=q/2-h;var C=1,G=Number(w.type)-1;F<.35*E&&(C=F/(.35*E),C*=C);F>.7*E&&(C=(E-F)/(.3*E));C*=w.alpha/100;if(0<this.zc[G].length)for(F=0;F<this.zc[G].length;F++){var J=this.zc[G][F];E=J.radius*t;var H=J.alpha*C;0>H&&(H=0);var I=J.color;if(8==G||9==G||10==G)I=w.color;if(this.o.oa)f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,
this.dg),f.vertexAttribPointer(this.Aa.ka,this.dg.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Aa,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),f.uniform2f(f.getUniformLocation(this.Aa,"uCirclePosition"),f.drawingBufferWidth/n*(c+z*J.B),f.drawingBufferWidth/n*(q-(h+A*J.B))),f.uniform2f(f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.drawingBufferWidth/n*(c+z*J.B),q-(h+A*J.B)),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleRadius"),E),f.uniform3f(f.getUniformLocation(this.Aa,
"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleSoftness"),.1),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.dg.numberOfItems);else{this.aa.save();this.aa.translate(c+z*J.B,h+A*J.B);D=this.aa.createRadialGradient(0,0,1,0,0,1.1*E);D.addColorStop(0,this.o.pa(I,H));D.addColorStop(.65,
this.o.pa(I,.9*H));D.addColorStop(.8,this.o.pa(I,.7*H));D.addColorStop(1,this.o.pa(I,.2*H));this.aa.beginPath();I=2*Math.PI/6;J=Math.PI/180*35;var L=!0;for(H=J;H<=J+2*Math.PI;H+=I)L?(this.aa.moveTo(E*Math.sin(H),E*Math.cos(H)),L=!1):this.aa.lineTo(E*Math.sin(H),E*Math.cos(H));this.aa.closePath();this.aa.fillStyle=D;this.aa.fill();this.aa.restore()}}if(0<this.lc[G].length)for(F=0;F<this.lc[G].length;F++){J=this.lc[G][F];E=J.radius*t;H=J.alpha*C;0>H&&(H=0);I=J.color;if(8==G||9==G||10==G)I=w.color;this.o.oa?
(f.useProgram(this.Aa),f.bindBuffer(f.ARRAY_BUFFER,this.Vd),f.vertexAttribPointer(this.Aa.ka,this.Vd.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Aa,"uCanvasDimensions2"),f.uniform2f(D,f.drawingBufferWidth,f.drawingBufferHeight),D=f.getUniformLocation(this.Aa,"uCirclePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.B),f.drawingBufferWidth/n*(q-(h+A*J.B))),D=f.getUniformLocation(this.Aa,"uCircleTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*J.B),q-(h+A*J.B)),D=f.getUniformLocation(this.Aa,
"uCircleRadius"),f.uniform1f(D,E),f.uniform3f(f.getUniformLocation(this.Aa,"uCircleColor"),(I>>16&255)/255,(I>>8&255)/255,(I&255)/255),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleAlpha"),H),f.uniform1f(f.getUniformLocation(this.Aa,"uCircleSoftness"),J.H),D=f.getUniformLocation(this.Aa,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.drawArrays(f.TRIANGLE_FAN,0,this.Vd.numberOfItems)):(this.aa.save(),this.aa.translate(c+z*J.B,h+A*J.B),D=this.aa.createRadialGradient(0,
0,1,0,0,E),D.addColorStop(0,this.o.pa(I,H)),D.addColorStop(1-J.H,this.o.pa(I,.8*H)),D.addColorStop(1,this.o.pa(I,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}if(0<this.Ac[G].length)for(F=0;F<this.Ac[G].length;F++)w=this.Ac[G][F],E=w.radius*t,H=w.alpha*C,0>H&&(H=0),this.o.oa?(f.useProgram(this.Fb),f.activeTexture(f.TEXTURE0),f.bindTexture(f.TEXTURE_2D,this.Ap),f.bindBuffer(f.ARRAY_BUFFER,this.Vd),f.vertexAttribPointer(this.Fb.ka,
this.Vd.itemSize,f.FLOAT,!1,0,0),D=f.getUniformLocation(this.Fb,"uCanvasDimensions2"),f.uniform2f(D,n,q),D=f.getUniformLocation(this.Fb,"uCirclePosition"),f.uniform2f(D,c+z*w.B,q-(h+A*w.B)),D=f.getUniformLocation(this.Fb,"uRingTexturePosition"),f.uniform2f(D,f.drawingBufferWidth/n*(c+z*w.B),q-(h+A*w.B)),D=f.getUniformLocation(this.Fb,"uCircleRadius"),f.uniform1f(D,E),f.uniform2f(f.getUniformLocation(this.Fb,"uRingPosition"),c+z*w.B,q-(h+A*w.B)),f.uniform1f(f.getUniformLocation(this.Fb,"uRingRadius"),
E),f.uniform1f(f.getUniformLocation(this.Fb,"uRingAlpha"),H),D=f.getUniformLocation(this.Fb,"uAspectRatio"),f.uniform1f(D,f.drawingBufferWidth/f.drawingBufferHeight/(n/q)),f.uniform1i(f.getUniformLocation(this.Fb,"uSampler"),0),f.drawArrays(f.TRIANGLE_FAN,0,this.Vd.numberOfItems)):(this.aa.save(),this.aa.translate(c+z*w.B,h+A*w.B),D=this.aa.createRadialGradient(0,0,0,0,0,E),D.addColorStop(0,this.o.pa(16777215,0)),D.addColorStop(.88,this.o.pa(0,0)),D.addColorStop(.9,this.o.pa(16654848,H)),D.addColorStop(.92,
this.o.pa(16776448,H)),D.addColorStop(.94,this.o.pa(4849466,H)),D.addColorStop(.96,this.o.pa(131071,H)),D.addColorStop(.98,this.o.pa(8190,H)),D.addColorStop(1,this.o.pa(0,0)),this.aa.beginPath(),this.aa.arc(0,0,E,0,2*Math.PI,!1),this.aa.closePath(),this.aa.fillStyle=D,this.aa.fill(),this.aa.restore())}this.o.oa&&(f.useProgram(this.o.sa.O),f.disable(f.BLEND),f.enable(f.DEPTH_TEST))}}}};return v}();y.Aq=x})(ggP2VR||(ggP2VR={}));var THREE;
(function(y){var x=function(){function v(f){this.wb=[];this.Ij=[];this.ca={x:0,y:0};this.Wc={x:0,y:0};this.ai=0;this.session=null;this.$k=!1;this.Qm=this.Pm=this.zf=0;this.vl=this.Rg=!1;this.pm=0;this.Dg=-5;this.Em=0;this.bj=this.cg=this.Cj=!1;this.o=null;this.bm=!0;this.fg=1;this.oj=[];this.frustumCulled=!1;this.Ih=0;this.Om=null;this.Fn=!0;this.Bk=this.uq=!1;this.Ee=[-1,-1,-1,-1];this.Fe=[-1,-1,-1,-1];this.vf=[!1,!1,!1,!1];this.Hc=[];this.xj=[];this.uf=[];this.o=f;var e=this;setTimeout(function(){if(window.WebXRPolyfill&&
window.Promise){var a={cardboardConfig:{BUFFER_SCALE:1}};try{new window.WebXRPolyfill(a),f.G("WebXR Polyfill loaded!")}catch(b){f.Uc(b)}}e.Ts()},0);THREE?this.hn():console.log("Three.js not available!")}v.prototype.lr=function(){this.init();this.animate()};v.prototype.hn=function(){this.Am=new THREE.Matrix4;this.ep=new THREE.Euler};v.prototype.init=function(){"xr"in navigator||console.log("no WebXR support");if(THREE)if(this.Sa)console.log("already set up!");else{this.Am||this.hn();var f=this,e=this.o,
a=this.mc=e.mc,b=this.Yt=new THREE.Scene,c=this.Eu=new THREE.Scene,h=this.camera=new THREE.PerspectiveCamera(100,window.innerWidth/window.innerHeight,.001,2E4);b.add(h);108>THREE.REVISION&&(this.frustumCulled=!0);h.position.z=-.01;h.position.y=0;h.position.x=0;this.Sa=h=new THREE.WebGLRenderer({depth:!0,logarithmicDepthBuffer:!0,alpha:!0,antialias:!0,stencil:!1});h.setClearColor(new THREE.Color(0),1);h.setPixelRatio(window.devicePixelRatio);h.setSize(window.innerWidth,window.innerHeight);h.outputEncoding=
THREE.sRGBEncoding;h.shadowMap.enabled=!1;a.appendChild(h.domElement);"xr"in navigator&&(h.xr.enabled=!0,h.xr.setReferenceSpaceType("local"));var m=this.Lk=new THREE.Group;m.name="controllerGroup";m.renderOrder=3E3;a=this.Jk=h.xr.getController(0);a.addEventListener("selectstart",function(z){f.gp(z)});a.addEventListener("selectend",function(z){f.fp(z)});a.visible=!0;a.userData.Tf=0;m.add(a);var n=this.Kk=h.xr.getController(1);n.addEventListener("selectstart",function(z){f.gp(z)});n.addEventListener("selectend",
function(z){f.fp(z)});n.visible=!0;n.userData.Tf=1;m.add(n);m.visible=!1;var q=this.Qe=new THREE.Group;q.name="skinGroup";q.translateZ(this.Dg);q.visible=!1;q.renderOrder=1E3;c.add(q);q=this.Dm=new THREE.Group;q.name="toggleSkinGroup";q.translateZ(this.Dg+.1);q.renderOrder=1100;c.add(q);c.add(m);q=(new THREE.TextureLoader).load("webxr/vrSkinShow.svg");var r=(new THREE.TextureLoader).load("webxr/vrSkinHide.svg");m=new THREE.PlaneBufferGeometry(.3,.3);q=new THREE.MeshBasicMaterial({map:q});q.transparent=
!0;r=new THREE.MeshBasicMaterial({map:r});r.transparent=!0;m=new THREE.Mesh(m,q);m.name="SkinToggleButton";m.position.y=3.12;m.Hv=!1;m.userData.et=q;m.userData.dt=r;m.userData.onclick=function(){f.ri()};this.Tb=m;this.Tb.visible=!1;this.Dm.add(m);m=(new THREE.BufferGeometry).setFromPoints([new THREE.Vector3(0,0,0),new THREE.Vector3(0,0,-1)]);q=new THREE.LineBasicMaterial({color:14737632});m=new THREE.Line(m,q);m.name="line";m.scale.z=5;a.add(m.clone());n.add(m.clone());this.ni=new THREE.Raycaster;
this.ca=new THREE.Vector2;this.Je=new THREE.Group;this.Je.name="panoGroup";e.ld||(this.Je.renderOrder=1);this.tf=new THREE.Group;this.tf.name="imageGroup";this.Ed=new THREE.Group;this.Ed.name="hotspotGroup";this.aj=new THREE.Group;this.aj.name="elementGroup";this.gh=new THREE.Group;this.gh.name="centerGroup";e.ld||(this.gh.renderOrder=2E3);this.Je.add(this.aj);this.Je.add(this.Ed);this.Je.add(this.tf);b.add(this.Je);b.add(this.gh);m=new THREE.BufferGeometry;e=[];a=[];for(n=0;20>n;n++)q=2*n*Math.PI/
20,r=Math.cos(q),q=Math.sin(q),a.push(.03*r,.03*q,0),a.push(.05*r,.05*q,0);for(n=0;20>n;n++){q=2*n;r=2*n+1;var t=(n+1)%20*2+1,w=(n+1)%20*2;e.push(q,r,w);e.push(r,t,w)}m.setIndex(e);m.setAttribute("position",new THREE.Float32BufferAttribute(a,3));e=new THREE.MeshBasicMaterial({color:"black",side:THREE.DoubleSide});e=new THREE.Mesh(m,e);e.position.z=-5;this.gh.add(e);window.addEventListener("resize",function(){f.yt()},!1);document.addEventListener("mouseup",function(){f.ut()},!1);document.addEventListener("mousedown",
function(z){f.st(z)},!1);document.addEventListener("mousemove",function(z){f.tt(z)},!1);Y&&"undefined"!==typeof __THREE_DEVTOOLS__&&(__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:b})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:c})),__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:h})))}else console.log("Three.js not available!")};v.prototype.Sp=function(){var f=this.o;f.G("VR not found");f.I("vrchanged",{});f.I("playerstatechanged",{})};
v.prototype.Du=function(){this.vl=!0;var f=this.o;f.G("XR found");f.I("vrchanged",{});f.I("playerstatechanged",{})};v.prototype.Ts=function(){if(!this.uq){this.uq=!0;var f=this;if("xr"in navigator)navigator.xr.isSessionSupported("immersive-vr").then(function(e){e?f.Du():f.Sp()})["catch"](f.Sp)}};v.prototype.kl=function(){return this.Qe};v.prototype.mg=function(){return null!=this.session?this.Sa.xr.isPresenting:this.o.me?!0:!1};v.prototype.rf=function(){return this.vl&&THREE};v.prototype.wt=function(f){var e=
this;this.Ni();f.addEventListener("end",function(){e.vt()});console.log("XR Session started.");this.Sa.xr.setSession(f);this.$k=!0;this.session=f;e.o.I("entervr",{session:f})};v.prototype.vt=function(){console.log("XR Session ended.");this.$k=!1;this.session=null;this.Ik()};v.prototype.Yf=function(){var f=this.o;if(this.vl){if(null===this.session){var e=this;navigator.xr.requestSession("immersive-vr",{optionalFeatures:["local-floor","bounded-floor"]}).then(function(b){e.wt(b)})["catch"](function(b){console.log(b);
console.warn("'immersive-vr' isn't supported, or an error occurred activating VR!");e.Ik()})}this.Ed&&this.Ed.translateY(-this.Ih);this.Ih=0;if(1==this.fg){var a=navigator.userAgent;0<=a.indexOf("OculusBrowser")&&(0<=a.indexOf("Pacific")&&(this.fg=1.7),0<=a.indexOf("Quest")&&(this.fg=1.5))}this.Sa.xr.setFramebufferScaleFactor(this.fg);f.Uc("Enter VR - scaled "+this.fg)}else this.Ni(),this.o.I("entervr",{session:null})};v.prototype.zt=function(){if(THREE&&this.Sa){var f=this.o;f.me=!0;f.$.style.display=
"none";f.bb.style.display="none";this.Sa.domElement.style.display="inline";f.I("vrchanged",{});f.I("playerstatechanged",{})}};v.prototype.Ik=function(){if(THREE&&this.Sa){var f=this.o;f.me=!1;f.$.style.display="inline";f.bb.style.display="inline";this.Sa.domElement.style.display="none";f.Ag(0);f.ic();f.update();f.I("vrchanged",{});f.I("playerstatechanged",{});this.o.I("exitvr",{session:null});this.Gk()}};v.prototype.Zf=function(){null!=this.session&&this.session.end()};v.prototype.gq=function(){this.mg()?
this.Zf():this.Yf()};v.prototype.yr=function(){var f=0,e=this.o,a=e.M.N;var b=1536;this.Sa&&e.G("Canvas: "+b);b*=Math.pow(2,0);if(0<a.levels.length){for(;a.levels.length>=f+2&&!a.levels[f+1].Df&&a.levels[f+1].width>b;)f++;e.G("Level "+f+" - width: "+a.levels[f].width);e.G(a.levels)}return f};v.prototype.ro=function(f){var e=this.o,a=e.M.N,b=e.Ue[f];f="";if(b){b=b.firstChild;for(var c;b;)"input"==b.nodeName&&(c=b)&&(c=0<a.levels.length?c.getAttributeNode("leveltileurl"):c.getAttributeNode("tilevrurl"))&&
(f=c.nodeValue),b=b.nextSibling}else f=0<a.levels.length?a.Gl:e.Nk;a=f;f=e.yp;for(b=0;3>b;b++)a=f(a,"c","vr"),a=f(a,"s","vr"),a=f(a,"r",0),a=f(a,"l",0),a=f(a,"x",0),a=f(a,"y",0),a=f(a,"v",0),a=f(a,"h",0);return e.gb(a)};v.prototype.ceilPowerOfTwo=function(f){return Math.pow(2,Math.ceil(Math.log(f)/Math.LN2))};v.prototype.loadTexture=function(f,e,a){var b=new THREE.ImageLoader;b.setCrossOrigin(this.o.crossOrigin);var c=this;b.load(e,function(h){var m=c.ceilPowerOfTwo(h.width),n=c.ceilPowerOfTwo(h.height);
f.encoding=THREE.sRGBEncoding;if(m==h.width&&n==h.height||!a)f.image=h;else{c.o.G("resizing "+h.width+"/"+h.height+" -> "+m+"/"+n);var q=document.createElement("canvas");q.width=m;q.height=n;q.getContext("2d").drawImage(h,0,0,m,n);f.image=q}f.needsUpdate=!0;f.xo=!0;f.ze&&f.ze.xo&&(f.Fh.visible=!0,f.ze.Fh.visible=!0)});this.oj.push(f)};v.prototype.Ni=function(){if(THREE){var f=this.o;if(this.Bk)f.G("vr panorama aleady added!");else{var e=this.tf,a=this;f.G("add vr panorama");this.Ef();this.camera.layers.enable(1);
e.setRotationFromEuler(this.ep);e.rotateX(f.Ya.pitch*Math.PI/180);e.rotateZ(-f.Ya.W*Math.PI/180);var b=new THREE.SphereBufferGeometry(2E4/3*1.5,16,16),c=new THREE.Texture,h=new THREE.ImageLoader;h.setCrossOrigin(this.o.crossOrigin);h.load(this.ro(f.ej()),function(m){c.encoding=THREE.sRGBEncoding;c.image=m;c.needsUpdate=!0});h=new THREE.MeshBasicMaterial({map:c,side:THREE.DoubleSide});b=new THREE.Mesh(b,h);b.scale.x=-1;b.rotateZ(f.Ya.W*Math.PI/180);b.rotateX(-f.Ya.pitch*Math.PI/180);b.rotateY(-90*
Math.PI/180);e.add(b);a.Mj=b;a.Bk=!0;setTimeout(function(){f.G("Adding Main Pano");a.Bk=!1;a.Oq();f.A.j?a.Rq():a.Pq();a.Mq()});this.St();this.bm=!0}}};v.prototype.Rq=function(){var f=this.o,e=this.tf,a=2E4/3;if(f.Fd){var b=new THREE.VideoTexture(f.A.j);b.wrapS=THREE.ClampToEdgeWrapping;b.wrapT=THREE.ClampToEdgeWrapping;b.minFilter=THREE.LinearFilter;b.encoding=THREE.sRGBEncoding;var c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);for(var h=c.attributes.uv.array,m=1;m<h.length;m+=2)h[m]*=
.5;h=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,h);c.rotateY(-90*Math.PI/180);c.layers.set(f.Fg?1:2);e.add(c);c=new THREE.SphereBufferGeometry(a,60,40);c.scale(-1,1,1);h=c.attributes.uv.array;for(m=1;m<h.length;m+=2)h[m]*=.5,h[m]+=.5;h=new THREE.MeshBasicMaterial({map:b});c=new THREE.Mesh(c,h);c.rotateY(-90*Math.PI/180);c.layers.set(f.Fg?2:1)}else c=new THREE.SphereBufferGeometry(a,60,40),c.scale(-1,1,1),b=new THREE.VideoTexture(f.A.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,
b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,h=new THREE.MeshBasicMaterial({map:b}),c=new THREE.Mesh(c,h),c.rotateY(-90*Math.PI/180);e.add(c);try{f.A.j.play()}catch(n){f.Uc(n)}};v.prototype.Pq=function(){var f=this.o,e=this.o.M.N,a=[],b=this.yr(),c=this.tf,h=2E4/3,m=f.Fd?2:1;if(e.levels.length>b)for(var n=e.levels[b],q=0;6>q;q++){a[q]=new THREE.Group;for(var r=0;r<n.ta;r++)for(var t=0;t<n.Y;t++)for(var w=0;w<m;w++){var z=new THREE.Texture;z.encoding=THREE.sRGBEncoding;this.loadTexture(z,
f.M.Jg(q,b,t,r,1==w),!0);z.wrapS=THREE.ClampToEdgeWrapping;z.wrapT=THREE.ClampToEdgeWrapping;z.minFilter=THREE.LinearMipMapLinearFilter;z.anisotropy=1;var A=e.V+2*e.ib,F=e.V+2*e.ib;t==n.Y-1&&(A=n.width-e.V*(n.Y-1)+2*e.ib);r==n.ta-1&&(F=n.width-e.V*(n.ta-1)+2*e.ib);var E=new THREE.PlaneBufferGeometry(h*A/n.width,h*F/n.width,8),D=new THREE.MeshBasicMaterial({map:z});E=new THREE.Mesh(E,D);D.transparent=!0;D.side=THREE.FrontSide;D=1*e.V;E.position.x=h*(t*D+A/2-e.ib-n.width/2)/n.width;E.position.y=h*-(r*
D+F/2-e.ib-n.width/2)/n.width;E.position.z=-.5*h;if(f.Fd)if(E.visible=!1,E.layers.set(1==w?1:2),z.Fh=E,0==w)var C=E;else A=C.material.map,z.ze=A,A.ze=z;a[q].add(E);E.frustumCulled=this.frustumCulled}4>q?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2;c.add(a[q])}else for(e=f.Kg,q=0;6>q;q++)for(a[q]=new THREE.Group,w=0;w<m;w++)b=q,f.Fd&&(b=q+(1==w?6:0)),z=new THREE.Texture,z.encoding=THREE.sRGBEncoding,this.loadTexture(z,f.gb(f.mh[b]),!1),z.wrapS=THREE.ClampToEdgeWrapping,z.wrapT=
THREE.ClampToEdgeWrapping,z.minFilter=THREE.LinearFilter,E=new THREE.PlaneBufferGeometry(e*h/2,e*h/2,64),D=new THREE.MeshBasicMaterial({map:z}),E=new THREE.Mesh(E,D),D.transparent=!0,D.side=THREE.FrontSide,E.position.x=0,E.position.y=0,E.position.z=-.25*h,f.Fd&&(E.layers.set(1==w?1:2),E.visible=!1,z.Fh=E,0==w?C=E:(A=C.material.map,z.ze=A,A.ze=z)),a[q].add(E),4>q?a[q].rotation.y=-q*Math.PI/2:a[q].rotation.x=(4==q?1:-1)*Math.PI/2,c.add(a[q])};v.prototype.Oq=function(){var f=this.o,e=this.Ed;new y.Ua(0,
0,-100);for(var a=f.L.ck,b=0;b<f.K.length;b++){var c=f.K[b];if("poly"!=c.type){var h=null,m=c.Ru(),n=c.Kf?100:5;if(f.Li&&f.Li.addSkinHotspot)(h=f.Li.addSkinHotspot(c))&&h.userData.Dv&&(n=100);else{var q=.2;if(!1!==m){n=!c.distance||0>=c.distance?5:1>c.distance?1:5>c.distance?c.distance:5;if(c.hd){m=.005;var r=(new THREE.TextureLoader).load(c.hd);r.encoding=THREE.sRGBEncoding;var t=new THREE.MeshBasicMaterial({map:r});if(c.Kf){h=2*n*Math.tan(c.fov/2*Math.PI/180);var w=new THREE.PlaneBufferGeometry(h,
h*c.yd/c.gf,1,1);t.transparent=!0;t.opacity=1}else w=new THREE.PlaneBufferGeometry(m*c.gf,m*c.yd,1,1),t.transparent=!0,t.opacity=.25;q=m*c.yd/2;t.side=THREE.DoubleSide}else w=new THREE.SphereBufferGeometry(.2,16,16),r=(new THREE.TextureLoader).load(this.ro(m)),r.encoding=THREE.sRGBEncoding,t=new THREE.MeshBasicMaterial({map:r}),t.transparent=!0,t.opacity=.25;h=new THREE.Mesh(w,t);m=c.title;if(a.enabled&&""!=m){w=document.createElement("canvas");w.width=256;w.height=32;r=w.getContext("2d");this.Ei||
(this.Ei=document.createElement("canvas"),this.Ei.width=w.width,this.Ei.height=w.height);var z=this.Ei.getContext("2d");z.clearRect(0,0,w.width,w.height);z.font="16px Helvetica";z.textAlign="center";z.textBaseline="top";t=z.measureText(m);var A=t.width;0<a.height&&(A=Math.min(a.width,w.width-6),A=Math.max(A,t.width));t=A+6;a.background&&(z.fillStyle=this.o.pa(a.Wb,a.Vb),z.fillRect((w.width-A)/2-3,2,A+6,24));0<a.Qi&&(z.strokeStyle=this.o.pa(a.Yb,a.Xb),z.strokeRect((w.width-A)/2-3,2,A+6,24));z.fillStyle=
this.o.pa(a.dk,a.bk);z.fillText(m,w.width/2,5,w.width-6);r.drawImage(this.Ei,(w.width-t)/2,2,t,24,0,0,w.width,w.height);r=new THREE.Texture(w);r.encoding=THREE.sRGBEncoding;r.needsUpdate=!0;m=1.5;w=new THREE.PlaneBufferGeometry(1*m*t/w.width,3*m/w.height,1,1);t=new THREE.MeshBasicMaterial({map:r,side:THREE.DoubleSide});w=new THREE.Mesh(w,t);w.translateY(-q-.125*m/2);w.frustumCulled=this.frustumCulled;h.add(w);t.transparent=!0;t.opacity=.5}h.userData={P:c}}}h&&(h.rotateY(c.pan*Math.PI/180),h.rotateX(c.u*
Math.PI/180),h.translateZ(-n),h.castShadow=!1,h.receiveShadow=!1,h.frustumCulled=this.frustumCulled,e.add(h))}}};v.prototype.Mq=function(){for(var f=this.o,e=0;e<f.Xa.length;e++){var a=f.Xa[e];if(a.j){var b=(new THREE.TextureLoader).load(a.j.src);this.wn(a,b)}}for(e=0;e<f.U.length;e++)a=f.U[e],a.j&&"_videopanorama"!=a.id&&!a.pd&&(a.j.play(),b=new THREE.VideoTexture(a.j),b.encoding=THREE.sRGBEncoding,b.wrapS=THREE.ClampToEdgeWrapping,b.wrapT=THREE.ClampToEdgeWrapping,b.minFilter=THREE.LinearFilter,
this.wn(a,b))};v.prototype.wn=function(f,e){var a=this.aj,b=5E3*Math.tan(f.fov*Math.PI/360);var c=0<f.qc?b*f.Pc/f.qc:b;f.Jc&&1!=f.Jc&&(c*=f.Jc);b=new THREE.PlaneBufferGeometry(b,c,5,5);e=new THREE.MeshBasicMaterial({map:e,side:THREE.DoubleSide,transparent:!0});e=new THREE.Mesh(b,e);e.rotateY(f.pan*Math.PI/180);e.rotateX(f.u*Math.PI/180);e.translateY(-0);e.translateZ(-2500);e.rotateZ(-f.zb*Math.PI/180);e.rotateY(-f.Oa*Math.PI/180);e.rotateX(-f.Ka*Math.PI/180);e.userData=f;e.castShadow=!1;e.receiveShadow=
!1;a.add(e)};v.prototype.th=function(f){for(var e=f.children.length-1;0<=e;e--){var a=f.children[e];this.th(a);f.remove(a)}f.geometry&&f.geometry.dispose();f.material&&(f.material.texture&&(f.material.texture.dispose(),f.material.texture.ze=null,f.material.texture.Fh=null),f.material.map&&(f.material.map.dispose(),f.material.map.ze=null,f.material.map.Fh=null),f.material.dispose())};v.prototype.Ef=function(){THREE&&(this.oj=[],this.th(this.tf),this.th(this.Ed),this.th(this.aj),10<this.Sa.info.memory.textures&&
this.o.Rm(this.Sa.info.memory))};v.prototype.yt=function(){if(THREE){var f=this.camera;f.aspect=window.innerWidth/window.innerHeight;f.updateProjectionMatrix();this.Sa.setSize(window.innerWidth,window.innerHeight)}};v.prototype.gp=function(f){if(THREE){f=f.target;this.Gk();var e=this.fl(f);0<e.length&&(this.ah(e,f.userData.Tf),0<this.wb.length&&(f=this.wb[0],e=f.userData,e.P&&!e.fromSkin?(f=e.P,this.o.qd(f.url,f.target)):(this.re(f,"onclick"),this.re(f,"onmousedown"))))}};v.prototype.fp=function(f){if(THREE){f=
f.target;var e=this.fl(f);0<e.length&&this.ah(e,f.userData.Tf)}};v.prototype.fl=function(f){this.Am.identity().extractRotation(f.matrixWorld);this.ni.ray.origin.setFromMatrixPosition(f.matrixWorld);this.ni.ray.direction.set(0,0,-1).applyMatrix4(this.Am);return this.wl(this.ni)};v.prototype.wl=function(f){var e=[];if(this.Ed.visible){var a=f.intersectObjects(this.Ed.children,!0);e=e.concat(a)}this.Qe.visible&&(a=f.intersectObjects(this.Qe.children,!0),e=e.concat(a));a=f.intersectObjects(this.Dm.children,
!0);return e=e.concat(a)};v.prototype.ah=function(f,e){void 0===e&&(e=-1);for(var a=0;a<f.length;a++){var b=f[a].object;if(void 0!==b.userData.isVisible&&b.userData.isVisible()||void 0===b.userData.isVisible&&b.visible||b.userData.clickInvisible)b.selected=!0,b.distance=f[a].distance,b.Tf=e,this.wb.push(b)}};v.prototype.intersectObjects=function(f){var e=f.getObjectByName("line"),a=this.fl(f);0<a.length&&this.ah(a,f.userData.Tf);e.scale.z=0<this.wb.length?this.wb[0].distance:5};v.prototype.Gk=function(){for(;this.wb.length;)this.wb.pop().selected=
!1};v.prototype.tt=function(f){f.preventDefault();var e=this.ca,a=this.Sa;e.x=f.clientX/a.domElement.clientWidth*2-1;e.y=2*-(f.clientY/a.domElement.clientHeight)+1;1==f.buttons&&(this.ai=this.Wc.x-e.x)};v.prototype.Us=function(){var f=this.ni;f.setFromCamera(this.ca,this.camera);f=this.wl(f);0<f.length&&this.ah(f)};v.prototype.Vs=function(){var f=this.ni;f.setFromCamera({x:0,y:0},this.camera);f=this.wl(f);0<f.length&&this.ah(f)};v.prototype.ut=function(){this.ai=0;if(0<this.wb.length){var f=this.wb[0];
f.userData.P||this.re(f,"onmouseup")}};v.prototype.re=function(f,e,a){void 0===a&&(a=!1);var b=f;do if(b.userData[e])if(a){var c=f.Tf;0<=c&&this.Hc&&this.Hc[c]&&(c=this.Hc[c],c.hapticActuators&&0<c.hapticActuators.length&&c.hapticActuators[0].pulse(.8,5))}else b.userData[e]();while(!b.userData.stopPropagation&&(b=b.parent))};v.prototype.kn=function(f,e){do if(f.userData.onclick||f.userData.P&&!f.userData.fromSkin)e?f.userData.xi=-1:f.userData.xi&&-1!=f.userData.xi?Date.now()>f.userData.xi+1E3&&(f.userData.onclick?
(f.userData.onclick(),f.userData.xi=-1):f.userData.P&&f.userData.P.url&&this.o.qd(f.userData.P.url,f.userData.P.target)):f.userData.xi=Date.now();while(!f.userData.stopPropagation&&(f=f.parent))};v.prototype.st=function(f){50>f.clientX&&50>f.clientY&&this.o.Zf();if(0<this.wb.length){f=this.wb[0];for(var e=1;e<this.wb.length;e++)this.wb[e].position.z>f.position.z&&(f=this.wb[e]);e=f.userData;e.P?(f=e.P,this.o.qd(f.url,f.target)):(this.re(f,"onclick"),this.re(f,"onmousedown"))}else this.Wc.x=this.ca.x,
this.Wc.y=this.ca.y};v.prototype.animate=function(){var f=this.Wo=this;this.Sa&&this.Sa.setAnimationLoop(function(){f.render()})};v.prototype.render=function(){if(THREE){var f=null;try{f=this.Sa.xr.getCamera(this.camera)}catch(t){}this.Om=f;0==this.Ih&&f&&(this.Ih=f.position.y,this.Ed.translateY(this.Ih));var e=this.Wo,a=e.o;if(a.me){e.Rg=e.Jk.visible||e.Kk.visible?!1:!0;var b=this.Ls();this.Ms();this.Mj&&0<this.oj.length&&this.oj.every(function(t){return t.xo})&&(this.th(this.Mj),this.tf.remove(this.Mj),
this.Mj=null,a.G("unload Preview Sphere"));for(var c=this.Ed,h=c.children.length-1;0<=h;h--){var m=c.children[h],n=1,q=1;m.selected?(n=1.5,q=1):b?(n=.6,q=.7):(n=.4,q=.5);var r=m.scale.x;r+=.1*(n-r);m.userData.fromSkin?m.userData.ggUse3d&&(r=10):(m.material.opacity+=.1*(q-m.material.opacity),m.userData&&m.userData.P&&m.userData.P.hd?(m.userData.P.Kf&&(r=1,m.material.opacity=1),0<m.children.length&&(m.children[0].material.opacity=m.material.opacity)):(m.rotateY(1*Math.PI/180),0<m.children.length&&(m.children[0].rotateY(-1*
Math.PI/180),m.children[0].material.opacity=m.material.opacity)));m.scale.x=m.scale.y=m.scale.z=r}b=e.camera.rotation.clone();b.reorder("YXZ");this.Pm=180*b.y/Math.PI;this.Qm=180*b.x/Math.PI;a.Li&&!this.Qe.visible&&this.Fn&&(10<this.Qm?this.Cj||(this.Cj=!0,this.bt=new Date):(this.Cj=!1,!this.cg&&!this.Tb.visible||this.bj||(this.bj=!0,this.Xk=new Date),this.cg=!1),!this.Cj||this.cg||this.Tb.visible||(c=new Date,500<c.getTime()-this.bt.getTime()&&(this.cg=!0,this.Xk=new Date)),this.cg?(this.Tb.visible=
!0,c=new Date,c=(c.getTime()-this.Xk.getTime())/5,100<=c?(this.Tb.material.opacity=1,this.cg=!1):this.Tb.material.opacity=c/100):this.bj&&(c=new Date,c=(c.getTime()-this.Xk.getTime())/5,100<=c?(this.Tb.material.opacity=0,this.bj=this.Tb.visible=!1):this.Tb.material.opacity=1-c/100));this.bm&&(this.pi(this.Pm-a.pan.m),this.bm=!1);a.Np(this.Pm-this.zf,this.Qm,180*b.z/Math.PI);a=this.gh;e.Rg?f&&(a.setRotationFromEuler(f.rotation),a.visible=!0):a.visible=!1;a=this.Dm;f&&!this.Qe.visible&&(a.translateZ(-(this.Dg+
.1)),a.rotateY(-this.Em),b=new THREE.Vector3(0,0,1),b.applyEuler(f.rotation),this.Em=Math.atan2(b.x,b.z),a.rotateY(this.Em),a.translateZ(this.Dg+.1));e.Sa.autoClear=!0;e.Sa.render(e.Yt,e.camera);e.Sa.autoClear=!1;e.Sa.clearDepth();e.Sa.render(e.Eu,e.camera);0==this.ai||isNaN(this.ai)||this.pi(this.ai)}}};v.prototype.Ls=function(){var f=this,e=this;this.Hc=[];var a=!0;this.session?this.session.inputSources.forEach(function(q){var r=q.profiles;"gaze"==q.targetRayMode?e.Rg=!0:(f.Hc.push(q.gamepad),0<=
r.indexOf("oculus-go")&&(a=!1),0<=r.indexOf("generic-trigger-squeeze-thumbstick")&&(a=!0),0<=r.indexOf("oculus-touch")&&(a=!0))}):this.Hc=navigator.getGamepads&&navigator.getGamepads();var b=!1;if(this.Hc)for(var c=0;c<this.Hc.length;c++){var h=this.Hc[c];if(h&&0<h.buttons.length)if(2<=h.axes.length&&2<h.buttons.length&&!a)if(h.buttons[2].pressed)this.vf[c]||(this.vf[c]=!0,this.ri());else if(h.buttons[2].touched){b=!0;this.vf[c]=!1;var m=h.axes[0],n=h.axes[1];-1==this.Ee[c]?this.Ee[c]=m:(h=this.Ee[c]-
m,-.3>h&&(this.pi(20),this.Ee[c]=m,this.Fe[c]=n),.3<h&&(this.pi(-20),this.Ee[c]=m,this.Fe[c]=n));-1==this.Fe[c]?this.Fe[c]=n:(h=this.Fe[c]-n,-.5>h&&(this.ri(!0),this.Fe[c]=n,this.Ee[c]=m),.5<h&&(this.ri(!1),this.Fe[c]=n,this.Ee[c]=m))}else this.Ee[c]=-1,this.Fe[c]=-1,this.vf[c]=!1;else 4<=h.axes.length&&(m=h.axes[2],n=h.axes[3],.8<m?(b=!0,1!=this.uf[c]&&(this.uf[c]=1,this.xj[c]=Date.now()-1E4)):-.8>m?(b=!0,-1!=this.uf[c]&&(this.uf[c]=-1,this.xj[c]=Date.now()-1E4)):this.uf[c]=0,0!=this.uf[c]&&400<
Date.now()-this.xj[c]&&(this.xj[c]=Date.now(),this.pi(20*this.uf[c])),h.buttons[1].pressed?this.vf[c]||(this.vf[c]=!0,this.ri()):this.vf[c]=!1)}e.Lk.visible==(!this.Hc||0==this.Hc.length)&&(e.Lk.visible=!e.Lk.visible);return b};v.prototype.lp=function(f){for(f=f.parent;f;){if(f.selected)return!0;f=f.parent}return!1};v.prototype.Ms=function(){var f=this.Wo;f.Ij=f.wb.slice();f.Gk();f.Jk.visible&&f.intersectObjects(f.Jk);f.Kk.visible&&f.intersectObjects(f.Kk);f.$k||f.Us();f.Rg&&f.Vs();for(var e=0;e<
f.wb.length;e++){var a=f.wb[e];f.Rg&&this.kn(a,!1);-1!=f.Ij.indexOf(a)||this.lp(a)||(this.re(a,"onmouseover"),this.Hc&&0<this.Hc.length&&this.re(a,"onclick",!0))}for(e=0;e<f.Ij.length;e++)a=f.Ij[e],-1==f.wb.indexOf(a)&&(this.lp(a)||this.re(a,"onmouseout"),f.Rg&&this.kn(a,!0))};v.prototype.ri=function(f){var e=this.Qe;void 0===f&&(f=!e.visible);var a=this.Om;f?(e.translateZ(-this.Dg),e.rotateY(-this.pm),a&&(f=new THREE.Vector3(0,0,1),f.applyEuler(a.rotation),this.pm=Math.atan2(f.x,f.z)),e.rotateY(this.pm),
e.translateZ(this.Dg),this.Qe.visible=!0,this.Tb.material=this.Tb.userData.dt,this.Tb.visible=!0,this.Tb.material.opacity=1):(this.Qe.visible=!1,this.Tb.material=this.Tb.userData.et,this.Tb.visible=!1)};v.prototype.St=function(){this.zf=0;this.Je.setRotationFromEuler(this.ep)};v.prototype.pi=function(f){this.zf+=f;this.Je.rotateY(f*Math.PI/180)};return v}();y.Kq=x})(ggP2VR||(ggP2VR={}));
(function(y){var x=function(){return function(){this.fov=this.u=this.pan=0}}();y.vv=x;var v=function(){function f(e){this.pan={m:0,Ha:0,min:0,max:360,d:0,Hj:0,ac:0,open:0};this.u={m:0,Ha:0,min:-90,max:90,d:0,ac:0,open:0};this.W={m:0,Ha:0,min:-180,max:180,d:0,open:0};this.oc={pan:0,u:-90,W:0,fov:170,pb:9};this.fov={m:70,Ha:70,min:1,$h:0,max:170,Il:360,Jl:270,prev:0,d:0,Oc:{enabled:!1,x:0,y:0},mode:0,Yp:0,Bn:0,open:0};this.cube=new y.Fq;this.sa=null;this.Ya={W:0,pitch:0};this.Fg=this.Fd=!1;this.Jj=
this.ip=4;this.hp=this.Nl=0;this.N=new y.Dq;this.rg=200;this.Di=0;this.Cm=5;this.je=0;this.eq=50;this.Qs=0;this.A={src:[],df:4,width:640,height:480,Tc:!1,ng:!1,Yj:!0,tm:!1,ue:"loop",ak:"",j:null,Bm:!1,texture:null,lk:null,Ci:null,qj:null,format:1,Gh:0,flipY:1,tb:function(){return 0},em:function(){},loop:function(){return!1}};this.wf={pan:-1,u:-1,fov:-1};this.Dl=0;this.mh=[];this.Nk="";this.nh=[];this.Kg=this.Se=1;this.Rl=new x;this.o=e}f.prototype.na=function(){this.o.na(!1)};f.prototype.update=function(){this.o.update()};
f.prototype.nf=function(){return this.pan.m};f.prototype.ij=function(){var e=this.pan.m;if(!this.hb()){for(;-180>e;)e+=360;for(;180<e;)e-=360}return e};f.prototype.Wd=function(){var e=this.pan.m-this.pan.Hj;if(!this.hb()){for(;-180>e;)e+=360;for(;180<e;)e-=360}return e};f.prototype.ee=function(e){this.na();isNaN(e)||(this.pan.m=Number(e));this.update()};f.prototype.Vj=function(e){this.na();isNaN(e)||(this.pan.m=Number(e)+this.pan.Hj);this.update()};f.prototype.Si=function(e,a){isNaN(e)||(this.ee(this.nf()+
e),a&&(this.pan.d=e))};f.prototype.nn=function(e,a){this.Si(e*this.lf(),a)};f.prototype.lf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};f.prototype.gg=function(){return this.u.m};f.prototype.fe=function(e){this.na();isNaN(e)||(this.u.m=Number(e));this.update()};f.prototype.Ti=function(e,a){this.fe(this.gg()+e);a&&(this.u.d=e)};f.prototype.qn=function(e,a){this.Ti(e*this.lf(),a)};f.prototype.Ag=function(e){this.na();isNaN(e)||(this.W.m=Number(e));this.update()};f.prototype.lj=
function(){return this.W.m};f.prototype.Dd=function(){return this.fov.m};f.prototype.Ab=function(e){this.na();switch(this.Z()){case 4:var a=170;break;case 12:a=360;break;case 9:a=355;break;default:a=170}this.hb()&&(a=9999999999);return!isNaN(e)&&0<e&&e<a&&(a=this.fov.m,this.fov.m=1*e,this.ef(),a!=this.fov.m)?(this.update(),!0):!1};f.prototype.hm=function(e){0<=e&&4>e&&(this.fov.mode=Number(e),this.ef(),this.update())};f.prototype.hb=function(){return 2==this.o.Kd};f.prototype.Dk=function(e,a){this.Ab(this.Dd()+
e);a&&(this.fov.d=e)};f.prototype.Ri=function(e,a){if(!isNaN(e)){var b=e/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);b=this.fov.m*Math.exp(b);this.Ab(b);a&&(this.fov.d=e)}};f.prototype.mm=function(e,a){this.na();isNaN(e)||(this.pan.m=e);isNaN(a)||(this.u.m=a);this.update()};f.prototype.Np=function(e,a,b){this.na();!isNaN(e)&&1E7>e&&-1E7<e&&(this.pan.m=e);!isNaN(a)&&1E7>a&&-1E7<a&&(this.u.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.W.m=b);this.update()};f.prototype.zg=function(e,a,b){this.na();isNaN(e)||
(this.pan.m=e);isNaN(a)||(this.u.m=a);isNaN(b)||this.Ab(b);this.update()};f.prototype.Ep=function(){this.zg(this.pan.Ha,this.u.Ha,this.fov.Ha)};f.prototype.rb=function(e,a,b){var c=a?Number(a):0;if(0!=e&&4!=e&&12!=e&&9!=e)this.o.Uc("Unsupported projection type: "+e);else if(a&&0!==c&&4!==c&&12!==c&&9!==c)this.o.Uc("Unsupported projection2 type: "+c);else if(e==c&&(c=0),this.hp=b?Number(b):1,this.Jj!=e||this.Nl!=c)this.Jj=e,this.Nl=c,this.sa.rj()};f.prototype.Z=function(){return 0==this.Jj?4:this.Jj};
f.prototype.Ic=function(){return this.Nl};f.prototype.Dh=function(){return this.ip};f.prototype.kj=function(){return this.hp};f.prototype.aspect=function(){return this.o.C.width/this.o.C.height};f.prototype.Jo=function(){return 4==this.Z()&&0==this.Ic()};f.prototype.Nb=function(e,a){e||(e=this.fov.m);a||(a=this.Z());return this.Uf(a,1/this.On(this.o.C),e)};f.prototype.Uf=function(e,a,b){return this.hb()?a*b:4==e?360*Math.atan(a*Math.tan(b/2*Math.PI/180))/Math.PI:9==e?720*Math.atan(a*Math.tan(b/4*
Math.PI/180))/Math.PI:a*b};f.prototype.dl=function(e,a){e||(e=this.Nb());a||(a=this.Z());return this.Uf(a,this.aspect(),e)};f.prototype.cl=function(e,a){e||(e=this.Nb());a||(a=this.Z());var b=this.aspect();b=Math.sqrt(1+b*b);return this.Uf(a,b,e)};f.prototype.ln=function(e){var a;a||(a=this.Z());return this.Uf(a,this.On(this.o.C),e)};f.prototype.On=function(e){var a=1;switch(this.fov.mode){case 0:a=1;break;case 1:a=e.width/e.height;break;case 2:a=Math.sqrt(e.width*e.width+e.height*e.height)/e.height;
break;case 3:a=4*e.height/3>e.width?1:3*e.width/(4*e.height)}return a};f.prototype.ui=function(e){this.Ab(this.ln(e))};f.prototype.im=function(e){var a=this.Z(),b=1/this.aspect();this.ui(this.Uf(a,b,e))};f.prototype.fm=function(e){var a=this.Z(),b=this.aspect();b=1/Math.sqrt(1+b*b);this.ui(this.Uf(a,b,e))};f.prototype.ef=function(){if(!this.o.me){var e=this.Rl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Sf(e);this.Sf(e);this.Sf(e);this.pan.m=e.pan;this.u.m=e.u;this.fov.m!=e.fov&&(this.fov.m=
e.fov)}};f.prototype.Sf=function(e){var a=this.aspect();var b=this.o.C;var c=this.o,h=c.v;if(this.hb()){if(0<this.fov.$h){var m=this.Se;this.N.levels&&0<this.N.levels.length&&(m=this.N.levels[0].height);10<m&&(this.fov.min=100*b.height/(m*this.fov.$h))}m=e.fov/2;b=m*a;var n=this.N.width/this.N.height*50;a=c.J.Dp?2*Math.min(50,n/a):2*Math.max(50,n/a);e.fov<this.fov.min&&(e.fov=this.fov.min);e.fov>a&&(e.fov=a);50<m?e.u=0:(50<e.u+m&&(e.u=50-m),-50>e.u-m&&(e.u=-50+m));b>n?e.pan=0:(e.pan+b>n&&(e.pan=n-
b,c.v.active&&(c.v.speed=-c.v.speed,this.pan.d=0)),e.pan-b<-n&&(e.pan=-n+b,h.active&&(h.speed=-h.speed,this.pan.d=0)))}else{0<this.fov.$h&&(m=this.Se,this.N.levels&&0<this.N.levels.length&&(m=this.N.levels[0].height),10<m&&(this.fov.min=360*Math.atan2(b.height/2,m/2*this.fov.$h)/Math.PI));e.fov<this.fov.min&&(e.fov=this.fov.min);n=this.fov.max;var q=179;m=this.Nb()/2;b=a*m;4==this.Z()?b=180*Math.atan(a*Math.tan(m*Math.PI/180))/Math.PI:9==this.Z()?(n=this.fov.Jl,q=355):12==this.Z()&&(n=this.fov.Il,
q=360);c.oa||(n=Math.max(160,n));e.fov>n&&(e.fov=n);12==this.Z()&&(2*b>q&&(e.fov=q/a),m=this.Nb()/2,2*m>q&&(e.fov=q),m=this.Nb()/2,b=a*m);2*m>this.u.max-this.u.min&&180>this.u.max-this.u.min&&(m=(this.u.max-this.u.min)/2,e.fov=this.ln(2*m));90>this.u.max?e.u+m>this.u.max&&(e.u=this.u.max-m):e.u>this.u.max&&(e.u=this.u.max);-90<this.u.min?e.u-m<this.u.min&&(e.u=this.u.min+m):e.u<this.u.min&&(e.u=this.u.min);c=this.pan.max-this.pan.min;359.99>c&&(e.pan<this.pan.min&&e.pan+360<this.pan.max&&(e.pan+=
360),this.pan.m>this.pan.max&&e.pan-360>this.pan.min&&(e.pan-=360),a=90,n=Math.tan(m*Math.PI/180),q=Math.tan((Math.abs(e.u)+m)*Math.PI/180),q=Math.sqrt(q*q+1)/Math.sqrt(n*n+1),m=180*Math.atan(q*Math.tan(b*Math.PI/180))/Math.PI,2*m>c&&(q=Math.tan(c*Math.PI/360)/Math.tan(b*Math.PI/180),c=q*Math.sqrt(n*n+1),q=Math.sqrt(c*c-1),a=180/Math.PI*Math.atan(q)),e.pan+m>this.pan.max&&(e.pan=this.pan.max-m,h.active&&(h.speed=-h.speed,this.pan.d=0)),e.pan-m<this.pan.min&&(e.pan=this.pan.min+m,h.active&&(h.speed=
-h.speed,this.pan.d=0)),e.u+b>a&&(e.u=a-b),e.u-b<-a&&(e.u=-a+b))}};f.prototype.Jg=function(e,a,b,c,h){var m=this.N.Fl-1-a,n=this.N.Gl,q="x";switch(e){case 0:q="f";break;case 1:q="r";break;case 2:q="b";break;case 3:q="l";break;case 4:q="u";break;case 5:q="d";break;case "vr":q="vr"}h&&(e+="l",q+="l");h=this.o.yp;for(var r=0;3>r;r++)n=h(n,"c",e),n=h(n,"s",q),n=h(n,"r",a),n=h(n,"l",m),n=h(n,"x",b),n=h(n,"y",c),n=h(n,"v",c),n=h(n,"h",b);return this.o.gb(n)};f.prototype.ts=function(e,a,b){b.fx=e.width/
this.N.V*a.zh;b.fy=e.height/this.N.V*a.Ah;b.Id=e.width/this.N.V*a.Xh;b.Jd=e.height/this.N.V*a.Yh;b.fx=Math.min(Math.max(0,Math.floor(b.fx)),e.Y-1);b.fy=Math.min(Math.max(0,Math.floor(b.fy)),e.ta-1);b.Id=Math.min(Math.max(0,Math.floor(b.Id)),e.Y-1);b.Jd=Math.min(Math.max(0,Math.floor(b.Jd)),e.ta-1)};f.prototype.dv=function(){if(!(6>this.cube.bg.length))for(var e=0;6>e;e++){var a=this.cube.bg[e];var b=[];b.push(new y.Ua(-1,-1,-1,0,0));b.push(new y.Ua(1,-1,-1,1,0));b.push(new y.Ua(1,1,-1,1,1));b.push(new y.Ua(-1,
1,-1,0,1));for(var c=0;4>c;c++)4>e?b[c].Oa(-Math.PI/2*e):b[c].Ka(Math.PI/2*(4==e?-1:1)),this.Ya&&(b[c].zb(this.Ya.W*Math.PI/180),b[c].Ka(-this.Ya.pitch*Math.PI/180)),b[c].Ff(-this.pan.m),b[c].de(this.u.m),b[c].Gf(this.W.m);b=this.o.Hk(b);a.pc=0<b.length;if(a.pc){a=a.gi;a.zh=b[0].Nd;a.Xh=b[0].Nd;a.Ah=b[0].jc;a.Yh=b[0].jc;for(c=1;c<b.length;c++)a.zh=Math.min(a.zh,b[c].Nd),a.Xh=Math.max(a.Xh,b[c].Nd),a.Ah=Math.min(a.Ah,b[c].jc),a.Yh=Math.max(a.Yh,b[c].jc);a.Ki=a.Xh-a.zh;a.pk=a.Yh-a.Ah;a.scale=Math.max(a.Ki,
a.pk)}else a.gi.Ki=-1,a.gi.pk=-1}};f.prototype.Vo=function(){for(var e=0;e<this.N.levels.length;e++){var a=this.N.levels[e],b;for(b in a.Ma)a.Ma.hasOwnProperty(b)&&(a.Ma[b].visible=!1)}};f.prototype.Mn=function(){var e=0,a=this.o.C,b=Math.tan(Math.min(this.Nb(),175)*Math.PI/360),c=a.height/(2*b);c*=1+a.width/a.height*b/2;for(c*=Math.pow(2,1<this.o.devicePixelRatio?this.N.Uo:this.N.To);this.N.levels.length>=e+2&&!this.N.levels[e+1].Df&&this.N.levels[e+1].width>c;)e++;return e};f.prototype.Gt=function(){if(this.o.J.Cp&&
this.o.J.$d){var e=this.Rl;e.pan=this.pan.m;e.u=this.u.m;e.fov=this.fov.m;this.Sf(e);this.Sf(e);this.Sf(e);var a=e.pan-this.pan.m,b=e.u-this.u.m;e=e.fov-this.fov.m;if(0!=a||0!=b||0!=e){var c=.2+.9*Math.min((Math.abs(a)+Math.abs(b)+Math.abs(e))/Math.abs(Math.min(this.fov.m,90))*.3,1);this.pan.m+=a*c;this.u.m+=b*c;this.fov.m+=e*c;this.o.la.cm=.3;this.update()}else this.o.la.cm=0}else this.ef();if(isNaN(this.pan.m)||1E7<this.pan.m||-1E7>this.pan.m)this.pan.m=0;if(isNaN(this.u.m)||1E7<this.u.m||-1E7>
this.u.m)this.u.m=0;if(isNaN(this.W.m)||1E7<this.W.m||-1E7>this.W.m)this.W.m=0;if(!this.hb()){for(;360<this.pan.m;)this.pan.m-=360;for(;-360>this.pan.m;)this.pan.m+=360}};return f}();y.Eq=v})(ggP2VR||(ggP2VR={}));var Y=!1;
(function(y){var x=function(){return function(){this.fov=this.u=this.pan=0}}(),v=function(){return function(){this.un=-1E7;this.Co=!1}}(),f=function(){function e(a,b){this.Zs="TGljZW5zZTogRGF2aWQgRyBNZWhhcw==";this.M=new y.Eq(this);this.pan=this.M.pan;this.u=this.M.u;this.W=this.M.W;this.oc=this.M.oc;this.fov=this.M.fov;this.Kd=0;this.Ya=this.M.Ya;this.C={width:10,height:10};this.Pk=new y.Ua;this.crossOrigin="anonymous";this.Xd=this.Mf=0;this.gd=1;this.vq={};this.Fg=this.Fd=!1;this.Ra={};this.ji=this.oh="";this.Sl=[];this.Cl=
!1;this.ja={start:{x:0,y:0},qa:{x:0,y:0},ae:{x:0,y:0},m:{x:0,y:0},ia:{x:0,y:0}};this.T={Wc:!1,jd:!1,tj:function(){return this.jd||this.Wc},Nn:0,startTime:0,start:{x:0,y:0},qa:{x:0,y:0},ae:{x:0,y:0},m:{x:0,y:0},ia:{x:0,y:0},hi:!1,Gg:null};this.kf=this.ve=!0;this.la={enabled:!0,qa:{x:0,y:0},ia:{x:0,y:0},cm:0,fov:{active:!1,nc:0,center:{enabled:!1,x:0,y:0}}};this.nb={alpha:0,beta:0,gamma:0,orientation:0,zf:0,oi:!0,fadeIn:0};this.Hh={alpha:0,beta:0,gamma:0,orientation:0};this.A={src:[],df:4,width:640,
height:480,Tc:!1,ng:!1,Yj:!0,tm:!1,level:1,ue:"loop",ak:"",j:null,Bm:!1,texture:null,lk:null,Ci:null,qj:null,format:1,Gh:0,flipY:1,tb:function(){return 0},em:function(){},loop:function(){return!1}};this.wj=0;this.control=this.sb=this.Ia=this.$=this.Gc=this.bb=this.ea=null;this.wd=[];this.ub=!1;this.qh=1;this.va=null;this.oe=this.Xe=this.qf=!1;this.bh=0;this.Qd=.02;this.wk=0;this.xk=!1;this.vk=this.Oi=this.dh=this.We=this.en=0;this.cn=-1;this.xc="";this.am=this.Ne=!1;this.fi=0;this.mh=[];this.Nk="";
this.nh=[];this.Kg=this.Se=1;this.xg=!1;this.v={enabled:!1,timeout:5,active:!1,Eg:!1,speed:.4,ek:0,Bo:!1,Gj:0,cp:!0,tg:"",bp:!1,Sg:!1,sd:!1,Pi:"",sn:!1,Rd:"Animation01",Of:!1,Dj:!1,xm:!1,startTime:0,md:0,yh:!1,Xi:!1,zj:0,Hd:0,Th:0,Uh:0,Sh:0,Qo:0};this.F={active:!1,aborted:!1,speed:.1,pan:0,u:0,W:0,fov:70,Bi:70,Th:0,Uh:0,Ro:0,Sh:0,pb:0,ki:0,El:0,Lm:!1,sg:!1,bn:0,an:0,pj:!1};this.mk=null;this.wf={pan:-1,u:-1,fov:-1};this.Dl=0;this.Li=this.ha=null;this.Tg={};this.Ug={};this.Lf={};this.ob={};this.Ga=
{};this.se=[];this.dn={};this.sc={};this.Vc={};this.qg={};this.L={mode:1,Qh:-1,Ca:0,kb:0,ud:.05,Yb:255,Xb:1,Wb:255,Vb:.3,Ce:!0,ck:{enabled:!0,width:180,height:20,dk:0,bk:1,background:!0,Wb:16777215,Vb:1,Yb:0,Xb:1,zk:3,Qi:1,qk:!0},Rb:[],Bc:[],rd:[],Wj:[]};this.Fa=null;this.K=[];this.Tp=!1;this.X=[];this.U=[];this.Xa=[];this.Ub=[];this.Ue=[];this.$a=[];this.xa=[];this.If=[];this.Yd=this.Xc=!1;this.wi=-1;this.ba=1;this.sa=this.Ke=this.$b=this.mc=null;this.vh={};this.Sb={};this.cq=this.Hg="";this.bq=
-1;this.ga=null;this.At={target:0,current:0,ud:.01,delay:2,Uk:0,Yi:!1,Wq:!1};this.margin={left:0,top:0,right:0,bottom:0};this.J={Wh:!1,$s:!1,rc:!1,Ge:!1,$d:!0,Fo:!1,sm:1,Cp:!1,Nf:!0,Rk:!0,kh:!0,lh:!0,Vi:!1,kg:!1,Dp:!0,sensitivity:8};this.Zh=[];this.rh=!0;this.ca={x:0,y:0};this.Ji=this.Pg=this.Og=this.me=this.oa=!1;this.kk=this.kv=!0;this.sl=this.lv=!1;this.we=!0;this.Qg=this.pl=this.rl=!1;this.qq=!0;this.ul=!1;this.lb=this.qe="";this.bc="transition";this.Bd="transform";this.Wf="perspective";this.sr=
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.Cb={width:0,height:0};this.Sn=new y.Ua;this.Rn=new y.Ua;this.Tn=new y.Ua;this.Un=new y.Ua;this.Qn=new y.Ua;this.Gd=!1;this.hc=this.Po=this.ra="";this.nk=[];this.Ll=[];this.Nh=this.Go=this.Lh=this.Ho=this.zl=this.ld=this.Ko=this.xl=this.dm=this.Sc=this.uj=this.lg=this.yl=this.Io=this.Al=this.Mo=this.nl=!1;this.Ii=!0;this.Qj=this.sj=
!1;this.Jh=[15,0,0];this.devicePixelRatio=1;this.fa=this.D=null;this.hh=!1;this.Za=null;this.Ea={enabled:!1,speed:1,running:!1,finished:!0,Ad:{pan:0,u:0,fov:0,pb:0,pq:!1}};this.Kl=!1;this.Bj="<<LOG>>";this.Km=!1;this.jh=function(h,m){if(0==h.length)return h;var n;var q=[];var r=m.Nj(h[0])-0;for(n=0;n<h.length;n++){var t=n;var w=n+1;w==h.length&&(w=0);var z=m.Nj(h[w])-0;if(0<=r&&0<=z)q.push(h[t]);else if(0<=r||0<=z){var A=z/(z-r);0>A&&(A=0);1<A&&(A=1);var F=new y.Ua;F.Zd(h[t],h[w],A);0>r||q.push(h[t]);
q.push(F)}r=z}return q};this.Rl=new x;this.rm=0;this.mi="";this.yc=!1;this.yj=-1;this.$r=function(h){return h?this.Mh()&&(h.clientX||h.clientY)?{x:h.clientX,y:h.clientY}:h.pageX||h.pageY?{x:h.pageX,y:h.pageY}:h.clientX||h.clientY?{x:h.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:h.clientY+document.body.scrollTop+document.documentElement.scrollTop}:h.touches&&h.touches[0]?{x:h.touches[0].pageX,y:h.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.xe=function(h){h=this.$r(h);var m=
this.Eh();return{x:h.x-m.x,y:h.y-m.y}};this.Fj=1;this.dj=this.No=this.Vk=this.Xl=this.Oj=0;this.Oo=!1;this.Cd=!0;this.tn=[5,0,0];this.fb=new y.Mi(this);this.fb.Ce=!1;this.En();if(7<this.Bj.length){var c=e.ph("bG9n");window[e.ph("Y29uc29sZQ==")][c](e.Cn(this.Bj))}this.Oe(this.fb);this.checkLoaded=this.wd;this.isLoaded=!1;b&&b.hasOwnProperty("webGLFlags")&&b.webGLFlags&&(this.vq=b.webGLFlags);this.na(!1);this.Qa=new y.Aq(this);this.yn(a);this.Vq();this.userdata=this.Tg=this.ag();this.emptyHotspot=this.fb;
this.mouse=this.ca;this.D=new y.Bq(this);this.Za=new y.Cq(this);this.sa=new y.Jq(this);this.M.sa=this.sa;this.Da=new y.Kq(this);this.ic()}e.prototype.vo=function(a){return-99991===a?this.Zs:"7.0.8/20017"};e.prototype.Cr=function(){return this.gd};e.prototype.Zt=function(a){0<a&&(this.gd=a)};e.prototype.$g=function(a){if(""!=a)try{var b=void 0;b="object"===typeof a?a:JSON.parse(a);if("object"===typeof b)for(var c in b)if("translations"==c&&this.Ra.hasOwnProperty("translations")){var h=b[c],
m;for(m in h)if(this.Ra.translations.hasOwnProperty(m))for(a=0;a<h[m].length-1;a++)""!=h[m][a]&&(this.Ra.translations[m][a]=h[m][a]);else this.Ra.translations[m]=h[m]}else this.Ra[c]=b[c];this.Ra.hasOwnProperty("projectLanguage")&&(this.ji=this.Ra.projectLanguage);this.I("languagechanged",{language:this.oh})}catch(n){console.error(n)}};e.prototype.Va=function(a,b){var c=a;if(""!=c&&"object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")){var h=this.Ra.languages.indexOf(this.oh);
-1!=h&&this.Ra.translations.hasOwnProperty(a)&&(a=this.Ra.translations[a],Array.isArray(a)&&a.length>h&&""!=a[h]&&(c=a[h]))}if(b&&0<b.length)for(h=b.length-1;0<=h;h--)c=c.replace(new RegExp("%"+String(h+1),"g"),b[h]);return c};e.prototype.km=function(a){this.Cl=!0;a=a.replace("_","-");if("object"===typeof this.Ra&&this.Ra.hasOwnProperty("languages")&&this.Ra.hasOwnProperty("translations")&&this.ji!=a){for(var b=-1,c=-1,h="",m=-1,n=-1,q=a.substring(0,2).toUpperCase(),r=0;r<this.Ra.languages.length;r++)if(this.Ra.languages[r].toUpperCase()==
a.toUpperCase()){b=r;break}else if(!this.ji.toUpperCase().startsWith(q)&&this.Ra.languages[r].toUpperCase().startsWith(q)){if(""==h||-1!=h.indexOf("-"))c=r,h=this.Ra.languages[r]}else for(var t=window.navigator.languages,w=0;w<t.length;w++)!this.ji.toUpperCase().startsWith(q)&&this.Ra.languages[r].toUpperCase().startsWith(t[w].substring(0,2).toUpperCase())&&(-1==n||w<n)&&(m=r,n=w);a=-1!=b?b:-1!=c?c:m;a=-1!=a?this.Ra.languages[a]:this.ji}this.oh!=a&&(this.oh=a,this.ar(),this.br(),this.$.setAttribute("lang",
a),this.I("languagechanged",{language:a}))};e.prototype.Rr=function(){return this.oh};e.prototype.ps=function(){return this.Sl};e.prototype.Mk=function(){this.D.enabled=this.fa.enabled;this.D.type=this.fa.type;this.D.da=this.fa.zoomin;this.D.ed=this.fa.zoomout;this.D.fh=this.fa.blendtime;this.D.Xg=this.fa.zoomoutpause;this.D.tk=this.fa.zoomfov;this.D.rk=this.fa.zoomafterinfov;this.D.sk=this.fa.zoomafteroutfov;this.D.Yg=this.fa.zoomspeed;this.D.Pf=this.fa.blendcolor;this.D.Zc=this.fa.softedge;this.fa=
null};e.prototype.tu=function(a){this.fa={};this.fa.enabled=!0;this.fa.type=this.D.type;this.fa.zoomin=this.D.da;this.fa.zoomout=this.D.ed;this.fa.blendtime=this.D.fh;this.fa.zoomoutpause=this.D.Xg;this.fa.zoomfov=this.D.tk;this.fa.zoomafterinfov=this.D.rk;this.fa.zoomafteroutfov=this.D.sk;this.fa.zoomspeed=this.D.Yg;this.fa.blendcolor=this.D.Pf;this.fa.softedge=this.D.Zc;if(a.hasOwnProperty("type")){var b=a.type;if("cut"==b||"crossdissolve"==b||"diptocolor"==b||"irisround"==b||"irisroundcenter"==
b||"irisrectangular"==b||"irisrectangularcenter"==b||"wipeleftright"==b||"wiperightleft"==b||"wipetopbottom"==b||"wipebottomtop"==b||"wiperandom"==b)this.fa.type=b}a.hasOwnProperty("before")&&(b=Number(a.before),0==b||2==b)&&(this.fa.zoomin=b);a.hasOwnProperty("after")&&(b=Number(a.after),0==b||2==b||3==b||4==b)&&(this.fa.zoomout=b);a.hasOwnProperty("transitiontime")&&(b=Number(a.transitiontime),0<=b&&50>=b&&(this.fa.blendtime=b));a.hasOwnProperty("waitfortransition")&&(this.fa.zoomoutpause=1==a.waitfortransition);
a.hasOwnProperty("zoomedfov")&&(b=Number(a.zoomedfov),.01<=b&&50>=b&&(this.fa.zoomfov=b));a.hasOwnProperty("zoomafterinfov")&&(b=Number(a.zoomafterinfov),70<=b&&120>=b&&(this.fa.zoomafterinfov=b));a.hasOwnProperty("zoomafteroutoutfov")&&(b=Number(a.zoomafteroutfov),.01<=b&&70>=b&&(this.fa.zoomafteroutfov=b));a.hasOwnProperty("zoomspeed")&&(b=Number(a.zoomspeed),.01<=b&&99>=b&&(this.fa.zoomspeed=b));a.hasOwnProperty("dipcolor")&&(this.fa.blendcolor=a.dipcolor);a.hasOwnProperty("softedge")&&(a=Number(a.softedge),
0<=a&&1E3>=a&&(this.fa.softedge=a));this.hh||this.Mk()};e.prototype.rb=function(a,b,c){this.M.rb(a,b,c)};e.prototype.Z=function(){return this.M.Z()};e.prototype.Dh=function(){return this.M.Dh()};e.prototype.Ic=function(){return this.M.Ic()};e.prototype.kj=function(){return this.M.kj()};e.prototype.Ek=function(a,b){if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.oa||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.Z()!=a){var c={};c.pan=this.pan.m;c.tilt=
this.u.m;c.fov=this.fov.m;c.projection=a;c.timingFunction=3;c.speed=b;a=this.Bh(a);c.fov=Math.min(a,c.fov);this.Ej(c)}};e.prototype.addListener=function(a,b){(this.vh[a]=this.vh[a]||[]).push(b)};e.prototype.I=function(a,b){if(a=this.vh[a])for(var c=a.length,h=0;h<c;h++)try{a[h].apply(null,[b])}catch(m){this.Uc(m)}};e.prototype.removeEventListener=function(a,b){var c=this.vh[a];if(c){var h;var m=0;for(h=c.length;m<h;m++)if(c[m]===b){1===h?delete this.vh[a]:c.splice(m,1);break}}};e.prototype.Rt=function(){this.ub=
!0};e.prototype.Es=function(){return this.S};e.prototype.Qq=function(a,b,c,h){if(!this.Sb.hasOwnProperty(a)){var m=new v;this.Sb[a]=m;m.type=b;"undefined"!==typeof c&&this.Pe(a,c);"object"===typeof h&&this.Op(a,h);return!0}return!1};e.ao=function(a){var b=document.cookie.indexOf(a+"="),c="";-1!=b&&(b=b+a.length+1,a=document.cookie.indexOf(";",b),-1==a&&(a=document.cookie.length),c=decodeURIComponent(document.cookie.substring(b,a)));return c};e.wu=function(a,b){0==a.type?a.value="string"===typeof b?
b:b.toString():1==a.type?a.value="string"===typeof b?parseFloat(b):"number"===typeof b?b:b?1:0:2==a.type&&(a.value="string"===typeof b?"false"!==b&&""!==b&&"0"!==b:"number"===typeof b?0!=b:!!b)};e.prototype.Op=function(a,b){if(this.Sb.hasOwnProperty(a)&&"object"===typeof b){var c=this.Sb[a];b.hasOwnProperty("cookiePath")&&(c.vn=String(b.cookiePath));b.hasOwnProperty("cookieExpireDays")&&(c.un=parseFloat(b.cookieExpireDays));if(b.hasOwnProperty("keep")&&(c.Bl=!!b.keep,c.Bl&&0<document.cookie.length))if(""!=
this.Hg){if(-1!=document.cookie.indexOf(this.Hg+"=")){var h=JSON.parse(y.kc.ao(this.Hg));h.hasOwnProperty(a)&&this.Pe(a,h[a])}}else h="ggvar_"+a,-1!=document.cookie.indexOf(h+"=")&&(h=y.kc.ao(h),this.Pe(a,h));b.hasOwnProperty("ignoreInState")&&(c.Co=b.ignoreInState);b.hasOwnProperty("customProperty")&&"object"===typeof b.customProperty&&(b=b.customProperty,this.Ga.hasOwnProperty(a)?(this.Ga[a].variabletype!=b.variableType||this.Ga[a].propertytype!=b.propertyType)&&console.log("Custom property added as variable has different types than custom property from project."):
this.Ga[a]={Od:b.variableType,li:b.propertyType,Tk:b.defaultValue});return!0}return!1};e.prototype.su=function(a,b){this.Hg=a;b&&"object"===typeof b&&(b.hasOwnProperty("cookiePath")&&(this.cq=String(b.cookiePath)),b.hasOwnProperty("cookieExpireDays")&&(this.bq=parseFloat(b.cookieExpireDays)))};e.fn=function(a,b,c){-1<=b&&(a+="; max-age="+86400*b);""!=c&&(a+="; path="+c);return a};e.bo=function(a,b){switch(b){case 0:return a;case 1:return a.toString();case 2:return a?"true":"false"}};e.bl=function(a,
b){switch(b){case 0:return a;case 1:return Number(a);case 2:return"true"==a}};e.prototype.Pe=function(a,b,c){void 0===c&&(c=!0);if(void 0===b)return!1;var h=!1;this.Ga.hasOwnProperty(a)&&(0==this.Ga[a].li?(this.Mp(this.ra,a,b),h=!0):1==this.Ga[a].li&&this.P&&(this.jm(this.ra,this.P.id,a,b),h=!0));if(this.Sb.hasOwnProperty(a)){var m=this.Sb[a];if(m.value!=b){y.kc.wu(m,b);if(m.Bl&&c){if(""!=this.Hg){m={};for(var n=0,q=Object.keys(this.Sb);n<q.length;n++)c=q[n],this.Sb[c].Bl&&(m[c]=encodeURIComponent(this.Sb[c].value.toString()));
c=this.Hg+"="+JSON.stringify(m);c=y.kc.fn(c,this.bq,this.cq)}else c="ggvar_"+a+"="+encodeURIComponent(b.toString()),c=y.kc.fn(c,m.un,m.vn?m.vn:"");document.cookie=c}h||this.I("varchanged_"+a,{value:b})}return!0}return!1};e.prototype.mj=function(a,b){return 0==b?this.Va(a):a};e.prototype.ll=function(a,b){void 0===b&&(b="");if(this.Ga.hasOwnProperty(a)){if(0==this.Ga[a].li)return this.no(this.ra,a);if(1==this.Ga[a].li){if(""!=b||this.P&&this.P!=this.fb)return this.el(this.ra,""!=b?b:this.P.id,a);switch(this.Ga[a].Od){case 0:return"";
case 1:return 0;case 2:return!1}}}if(this.Sb.hasOwnProperty(a))return this.mj(this.Sb[a].value,this.Sb[a].type)};e.ph=function(a){var b="",c=0;a=a.replace(/[^A-Za-z0-9+\/=]/g,"");do{var h="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var m="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));var q="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(c++));
h=h<<2|m>>4;m=(m&15)<<4|n>>2;var r=(n&3)<<6|q;b+=String.fromCharCode(h);64!=n&&(b+=String.fromCharCode(m));64!=q&&(b+=String.fromCharCode(r))}while(c<a.length);return b};e.Qu=function(a){for(var b=[1,1,1,1,2,2,3,0],c=a.length,h="",m=0;m<c;){var n=a.charCodeAt(m++);if(n&128){var q=b[n>>3&7];if(!(n&64&&q)||m+q>c)return null;for(n&=63>>q;0<q;--q){var r=a.charCodeAt(m++);if(128!=(r&192))return null;n=n<<6|r&63}}h+=String.fromCharCode(n)}return h};e.Cn=function(a){return e.Qu(e.ph(a))};e.prototype.En=
function(){this.devicePixelRatio=window.devicePixelRatio||1;this.Mo=!!navigator.userAgent.match(/(Windows|Win)/g);this.Al=!!navigator.userAgent.match(/(Mac|Macintosh|Mac_powerpc)/g)&&!navigator.userAgent.match(/(like Mac)/g);this.Io=!!navigator.userAgent.match(/(Linux|Ubuntu)/g);this.yl=!!navigator.userAgent.match(/(MSIE)/g);this.lg=!!navigator.userAgent.match(/(Edge|EdgA|Edg)/g);this.uj=!!navigator.userAgent.match(/(Firefox)/g);if(this.Sc=!!navigator.userAgent.match(/(Safari)/g)){var a=navigator.userAgent.indexOf("Safari");
this.Yc=navigator.userAgent.substring(a+7);a=navigator.userAgent.indexOf("Version");-1!=a&&(this.Yc=navigator.userAgent.substring(a+8));this.Yc=this.Yc.substring(0,this.Yc.indexOf(" "));this.Yc=this.Yc.substring(0,this.Yc.indexOf("."));this.dm=!0}this.Ko=!!navigator.userAgent.match(/(SamsungBrowser)/g);if(this.xl=!!navigator.userAgent.match(/(Chrome|CriOS)/g))this.Sc=!1;this.ld=!!navigator.userAgent.match(/(iPad|iPhone|iPod)/g);this.zl=!!navigator.userAgent.match(/(iPad)/g)||this.Al&&2<navigator.maxTouchPoints;
this.Ho=!!navigator.userAgent.match(/(iPhone|iPod)/g);this.Lh=!!navigator.userAgent.match(/(android)/i);this.Go=!!navigator.userAgent.match(/(IEMobile)/i);this.Nh=this.ld||this.Lh||this.Go||this.zl;navigator.platform&&/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion)&&(a=a.match(/OS (\d+)_(\d+)_?(\d+)?/))&&3<a.length&&(this.Jh=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);this.sj=!window.requestAnimationFrame;a=["Webkit","Moz","O","ms","Ms"];this.lb="";this.bc="transition";
this.Bd="transform";this.Wf="perspective";for(var b=0;b<a.length;b++)"undefined"!==typeof document.documentElement.style[a[b]+"Transform"]&&(this.lb="-"+a[b].toLowerCase()+"-",this.bc=a[b]+"Transition",this.Bd=a[b]+"Transform",this.Wf=a[b]+"Perspective");this.sl=O();this.oa=X();this.Og=this.sl;this.oa&&(this.Og=!1);this.Ne=!0;this.am=!1;if(this.ld||this.Lh)this.Kp(80),this.M.Cm=2;this.Uc("Pano2VR player "+this.vo()+" - Prefix:  "+this.lb+", "+(this.sl?"CSS 3D available":"CSS 3D not available")+", "+
(this.oa?"WebGL available":"WebGL not available"));Y&&this.G("Pano2VR Debug version!");this.jr();this.Ii=this.Ho?this.Sc&&this.dm&&10<=Number(this.Yc)?!0:!1:!0};e.prototype.jr=function(){if(!this.ga){this.G("Create Audio Context!");try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.ga=new AudioContext}catch(a){this.ga=null}this.Sc&&(!this.dm||9>Number(this.Yc))&&(this.ga=null);this.Sc&&!this.ld&&12<=Number(this.Yc)&&13>Number(this.Yc)&&(this.ga=null);this.Sc&&this.ld&&13==
Number(this.Jh[0])&&(1==Number(this.Jh[1])||2<=Number(this.Jh[1]))&&(this.ga=null)}};e.prototype.G=function(a){if(Y){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};e.prototype.Rm=function(a){if(Y){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a.toString()+"<br />");window.console&&window.console.warn(a)}};e.prototype.Uc=function(a){var b=document.getElementById("gg_debug");b&&(b.innerHTML=a+"<br />");window.console&&
window.console.log(a)};e.prototype.Kp=function(a){this.M.rg=a};e.prototype.setCrossOrigin=function(a){this.crossOrigin=a};e.prototype.cu=function(a){this.De=a};e.prototype.ks=function(){return this.fi};e.prototype.au=function(a){this.qe=a};e.prototype.$n=function(){return this.qe};e.prototype.hl=function(){return this.Nh};e.prototype.eo=function(){return this.ul};e.prototype.Qr=function(){return this.Gd};e.prototype.gs=function(){return this.Gd?this.mo().length:1};e.prototype.Nr=function(){return this.v.active};
e.prototype.eu=function(a){this.Nh=!!a};e.prototype.gj=function(){return this.isLoaded};e.prototype.Pr=function(){return!this.isLoaded};e.prototype.mf=function(){return Number(this.C.height)/(2*Math.tan(Math.PI/180*(this.Nb()/2)))};e.prototype.Pp=function(a,b){try{this.isFullscreen&&(a=window.innerWidth,b=window.innerHeight);var c=a-this.margin.left-this.margin.right,h=b-this.margin.top-this.margin.bottom;if(!(10>c||10>h)){var m=window.devicePixelRatio||1;this.xg&&(m=1);this.ea.style.width=c+"px";
this.ea.style.height=h+"px";this.ea.style.left=this.margin.left+"px";this.ea.style.top=this.margin.top+"px";if(this.oa)try{this.bb&&(this.bb.style.position="absolute",this.bb.style.display="inline",this.bb.style.width=c+"px",this.bb.style.height=h+"px",this.bb.width=c*m,this.bb.height=h*m),this.S&&(this.Cb.width=c*m,this.Cb.height=h*m,this.S.viewport(0,0,this.S.drawingBufferWidth,this.S.drawingBufferHeight))}catch(t){alert(t)}this.Gc&&(this.Gc.style.width=a+"px",this.Gc.style.height=b+"px",this.Gc.width=
a,this.Gc.height=b);this.Ia&&(this.Ia.style.width=a+"px",this.Ia.style.height=b+"px",this.sb.style.width=a+"px",this.sb.style.height=b+"px",this.sb.width=a,this.sb.height=b,this.sb.style.left=this.margin.left+"px",this.sb.style.top=this.margin.top+"px",this.va&&this.va!=this.Ia&&(this.va.style.width=a+"px",this.va.style.height=b+"px"));if(this.Qa){var n=this.Qa.vd;n.style.width=a+"px";n.style.height=b+"px";n.width=a;n.height=b;n.style.left=this.margin.left+"px";n.style.top=this.margin.top+"px"}this.qf&&
(this.ub=!0);var q=this.ea.offsetWidth,r=this.ea.offsetHeight;if(this.C.width!=q||this.C.height!=r)this.C.width=q,this.C.height=r;this.jv();this.va&&this.va.ggUpdateSize&&this.va.ggUpdateSize(a,b);this.I("sizechanged",{w:a,h:b});this.I("playerstatechanged",{})}}catch(t){this.Rm(t)}};e.prototype.le=function(){this.Km=!0};e.prototype.ic=function(){this.Pp(this.mc.offsetWidth,this.mc.offsetHeight)};e.prototype.Ds=function(){var a={width:0,height:0};a.width=this.C.width;a.height=this.C.height;return a};
e.prototype.Eh=function(){var a={x:0,y:0},b=this.ea.getBoundingClientRect();a.x=b.left;a.y=b.top;this.Sc&&14>Number(this.Yc)&&(a.x=b.left+window.scrollX,a.y=b.top+window.scrollY);return a};e.prototype.ru=function(a){this.ha=a};e.prototype.fu=function(a,b,c,h){this.margin.left=a;this.margin.top=b;this.margin.right=c;this.margin.bottom=h;this.ha=this.skinObj;this.Li=this.vrSkinObj;this.le()};e.prototype.er=function(a){0==a&&(this.J.$d=!1);1==a&&(this.J.$d=!0);2==a&&(this.J.$d=!this.J.$d);this.I("viewmodechanged",
{});this.I("playerstatechanged",{})};e.prototype.Bs=function(){return 1==this.J.$d?1:0};e.prototype.pn=function(a,b){this.L.mode=1==b&&0<this.L.mode?0:Math.round(a);this.update();this.I("polymodechanged",{})};e.prototype.wh=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.K.length;c++)"poly"==this.K[c].type&&a.test(this.K[c].id)&&b.push(this.K[c]);return b};e.prototype.Rp=function(a){a=this.wh(a);for(var b=0;b<a.length;b++){var c=this.L.Rb.indexOf(a[b].id);
-1==c?(this.L.Rb.push(a[b].id),this.L.Bc.push(0),this.L.rd.push(1)):this.L.rd[c]=1}this.update()};e.prototype.zo=function(a){a=this.wh(a);for(var b=0;b<a.length;b++){var c=this.L.Rb.indexOf(a[b].id);-1!=c&&(this.L.rd[c]=0,this.L.Wj.push(a[b].id),this.update())}};e.prototype.Vu=function(a){a=this.wh(a);for(var b=0;b<a.length;b++){var c=this.L.Rb.indexOf(a[b].id);-1==c||-1!=c&&0==this.L.rd[c]?this.Rp(a[b].id):this.zo(a[b].id);this.update()}};e.prototype.dr=function(a,b,c,h,m){var n=""==a?this.K:this.wh(a);
for(var q=0;q<n.length;q++){var r=n[q];"poly"==r.type&&(r.Wb=b,r.Vb=c,r.Yb=h,r.Xb=m)}""==a&&(this.L.Wb=b,this.L.Vb=c,this.L.Yb=h,this.L.Xb=m);this.update()};e.prototype.iu=function(a,b){var c=""==a?this.K:this.wh(a);for(var h=0;h<c.length;h++){var m=c[h];"poly"==m.type&&(m.Ce=b)}""==a&&(this.L.Ce=b);this.update()};e.prototype.cr=function(a){this.Qa&&(this.Qa.om=0==a?!0:1==a?!1:!this.Qa.om,this.update())};e.prototype.ns=function(){return this.L.mode};e.prototype.fr=function(){this.I("viewstatechanged",
{})};e.prototype.Cs=function(){return 0};e.prototype.Xr=function(a){return"_firstmap"==a?"web":"_firstfloorplan"==a?"file":(a=this.sc[a])?a.type:"web"};e.prototype.Wr=function(a){"_firstmap"==a?a=this.co():"_firstfloorplan"==a&&(a=this.fj());return(a=this.sc[a])?a:{}};e.prototype.co=function(){var a="",b;for(b in this.sc){var c=this.sc[b];"web"==c.type&&1E4>c.index&&(a=b)}return a};e.prototype.fj=function(){var a="",b;for(b in this.sc){var c=this.sc[b];"file"==c.type&&1E4>c.index&&(a=b)}return a};
e.prototype.ds=function(a,b){"_firstfloorplan"==b&&(b=this.fj());var c=[];a||(a=this.ra);var h=this.se[a];h&&(a=h);""===a&&0<Object.keys(this.Vc).length&&(a=Object.keys(this.Vc)[0]);this.Vc[a]&&this.Vc[a][b]&&(c.push(this.Vc[a][b].y),c.push(this.Vc[a][b].x));return c};e.prototype.es=function(a,b){"_firstfloorplan"==b&&(b=this.fj());var c=[];a||(a=this.ra);var h=this.se[a];h&&(a=h);""===a&&0<Object.keys(this.Vc).length&&(a=Object.keys(this.Vc)[0]);this.qg[a]&&this.qg[a][b]&&(c.push(this.qg[a][b].x),
c.push(this.qg[a][b].y));return c};e.prototype.jo=function(a){var b=this.se[a];b&&(a=b);b=this.io();for(var c=[],h=0;h<b.length;h++)this.Vc[a][b[h]]&&c.push(b[h]);return c};e.prototype.Vr=function(a){a=this.jo(a);return 0<a.length?a[0]:""};e.prototype.io=function(){var a=[],b;for(b in this.sc)a.push(b);return a};e.prototype.Hr=function(){var a=[],b;for(b in this.sc)"file"==this.sc[b].type&&a.push(b);return a};e.prototype.Os=function(){for(var a in this.sc)if("web"==this.sc[a].type)return!0;return!1};
e.prototype.Ns=function(){for(var a in this.sc)if("file"==this.sc[a].type)return!0;return!1};e.prototype.yp=function(a,b,c){var h=(new RegExp("%0*"+b,"i")).exec(a.toString());if(h){h=h.toString();var m=c.toString();h.charAt(h.length-1)!=b&&(m=(1+c).toString());if(!isNaN(parseFloat(c)))for(;m.length<h.length-1;)m="0"+m;a=a.replace(h,m)}return a};e.prototype.Ss=function(a,b,c){a=Math.atan2(a+1,c);var h=Math.atan2(b+1,c);b=Math.sin(a);c=Math.sin(h);a=Math.cos(a);h=Math.cos(h);this.Sn.init(0,0,-1);this.Rn.init(a,
0,-b);this.Tn.init(-a,0,-b);this.Un.init(0,h,-c);this.Qn.init(0,-h,-c)};e.prototype.Hk=function(a){a=this.jh(a,this.Sn);a=this.jh(a,this.Rn);a=this.jh(a,this.Tn);a=this.jh(a,this.Un);return a=this.jh(a,this.Qn)};e.prototype.mq=function(a){if(!this.Ne&&this.Ys!=a){this.Ys=a;var b=this.margin.left+this.C.width/2+"px ";b+=this.margin.top+this.C.height/2+"px ";this.Ia.style[this.Wf]=a+"px";this.Ia.style[this.Wf+"Origin"]=b;this.ea.style[this.Wf]=a+"px";this.ea.style[this.Wf+"Origin"]=b}};e.prototype.el=
function(a,b,c){""!==a||this.Gd||(a="node1");a||(a=this.ra);return this.ob.hasOwnProperty(a)&&this.ob[a].hasOwnProperty(b)&&this.ob[a][b].hasOwnProperty(c)?this.mj(y.kc.bl(this.ob[a][b][c],this.Ga[c].Od),this.Ga[c].Od):this.Ga.hasOwnProperty(c)?this.mj(y.kc.bl(this.Ga[c].Tk,this.Ga[c].Od),this.Ga[c].Od):null};e.prototype.jm=function(a,b,c,h){""!==a||this.Gd||(a="node1");a||(a=this.ra);h="string"===typeof h?h:y.kc.bo(h,this.Ga[c].Od);this.ob.hasOwnProperty(a)||(this.ob[a]={});this.ob[a].hasOwnProperty(b)||
(this.ob[a][b]={});this.ob[a][b].hasOwnProperty(c)&&this.ob[a][b][c]==h||(this.ob[a][b][c]=h,this.I("varchanged_"+c,{}))};e.prototype.Gr=function(a){return this.Ga.hasOwnProperty(a)?this.Ga[a].Tk:null};e.prototype.fo=function(){return this.D.ke||this.D.Md||this.oa&&(4!=this.Z()||0!=this.Ic())?!1:!0};e.prototype.Gm=function(){var a=new y.Ua(0,0,-100),b=this.mf(),c=this.M.N;var h=100/this.fov.m;var m=c.width/c.height;c=this.C.height*h*m;h*=this.C.height;for(var n=this.fo(),q=0;q<this.K.length;q++){var r=
this.K[q];if("point"==r.type){var t=!1;if(this.hb()){var w=(this.pan.m-r.pan)/100/m*c;var z=(this.u.m-r.u)/100*h;Math.abs(w)<this.C.width/2+500&&Math.abs(z)<this.C.height/2+500&&(t=!0)}else a.init(0,0,-100),a.Ka(-r.u*Math.PI/180),a.Oa(r.pan*Math.PI/180),a.Oa(-this.pan.m*Math.PI/180),a.Ka(this.u.m*Math.PI/180),a.zb(this.W.m*Math.PI/180),.01>a.z?(z=-b/a.z,w=a.x*z,z*=a.y,Math.abs(w)<this.C.width/2+5E3&&Math.abs(z)<this.C.height/2+5E3&&(t=!0)):z=w=-1E4;r.fc=w+this.C.width/2;r.Qb=z+this.C.height/2;r.Tl=
r.fc/this.C.width*100;r.Ul=r.Qb/this.C.height*100;r.visible=t;r.px=r.fc;r.py=r.Qb;r.pxp=r.Tl;r.pyp=r.Ul;r.visible=r.visible;if(r.j&&r.j.onUpdatePosition)r.j.onUpdatePosition(this,r);else r.j&&r.j.__div&&("none"!=r.j.__div.style[this.bc]&&(r.j.__div.style[this.bc]="none"),t&&n?(r.j.ggUse3d?(this.Ne||this.mq(b),this.hb()?(r.j.__div.style[this.Bd]="scale("+(100/this.fov.m*500/r.j.gg3dDistance).toFixed(10)+")",r.j.__div.style.left=this.margin.left+w+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+
z+this.C.height/2+"px"):(r.j.__div.style.width="1px",r.j.__div.style.height="1px",w="",this.Ne&&(w+="perspective("+b+"px) "),w+="translate3d(0px,0px,"+b+"px) ",w+="rotateZ("+this.W.m.toFixed(10)+"deg) ",w+="rotateX("+this.u.m.toFixed(10)+"deg) ",w+="rotateY("+(-this.pan.m).toFixed(10)+"deg) ",w+="rotateY("+r.pan.toFixed(10)+"deg) ",w+="rotateX("+(-r.u).toFixed(10)+"deg) ",w+="translate3d(0px,0px,"+(-1*r.j.gg3dDistance).toFixed(10)+"px) ",r.j.__div.style[this.Bd+"Origin"]="0% 0%",r.j.__div.style[this.Bd]=
w,r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px")):this.Tp?(r.j.__div.style.left=this.margin.left+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+this.C.height/2+"px",r.j.__div.style[this.Bd]="translate3d(0px,0px,-1000px) rotateY(0.1deg) translate3d("+w+"px,"+z+"px, 0.5px)",r.j.__div.style["transform-style"]="preserve-3d"):(r.j.__div.style.left=this.margin.left+w+this.C.width/2+"px",r.j.__div.style.top=this.margin.top+z+this.C.height/
2+"px"),r.j.__div.ggVisible&&(r.j.__div.style.visibility="visible")):(r.j.ggUse3d&&(r.j.__div.style[this.Bd]=""),r.j.__div.style.left="-1000px",r.j.__div.style.top="-1000px",r.j.__div.style.visibility="hidden"))}if("poly"==r.type){var A=[];if(this.hb())for(r.Bf=[],t=0;t<r.vertices.length;t++)z=r.vertices[t],w=(this.pan.m-z.pan)/100/m*c,z=(this.u.m-z.u)/100*h,w+=this.margin.left+this.C.width/2,z+=this.margin.top+this.C.height/2,r.Bf.push({fc:w,Qb:z});else{for(t=0;t<r.vertices.length;t++)z=r.vertices[t],
a.init(0,0,-100),a.Ka(-z.u*Math.PI/180),a.Oa(z.pan*Math.PI/180),a.Oa(-this.pan.m*Math.PI/180),a.Ka(this.u.m*Math.PI/180),a.zb(this.W.m*Math.PI/180),A.push(a.clone());A=this.Hk(A);if(0<A.length)for(t=0;t<A.length;t++)a=A[t],.1>a.z?(z=-b/a.z,w=this.C.width/2+a.x*z,z=this.C.height/2+a.y*z):z=w=0,a.fc=w,a.Qb=z;r.Bf=A}}}this.I("hotspotsupdated",{})};e.prototype.Fr=function(){for(var a=[],b=0;b<this.K.length;b++){var c=this.K[b];"point"==c.type&&c.j&&c.j.__div&&a.push(c.j.__div)}return a};e.prototype.pa=
function(a,b){a=Number(a);isNaN(b)&&(b=0);0>b&&(b=0);1<b&&(b=1);return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+b+")"};e.prototype.Ct=function(){var a;if(this.sb&&(this.L.Qh!=this.L.mode&&(this.L.Qh=this.L.mode,this.sb.style.visibility=0<this.L.mode?"inherit":"hidden"),0<=this.L.mode||0<this.L.Rb.length)){this.Ib||(this.Ib=this.sb.getContext("2d"));if(this.Ib.width!=this.C.width||this.Ib.height!=this.C.height)this.Ib.width=this.C.width,this.Ib.height=this.C.height;this.Ib.clear?this.Ib.clear():
this.Ib.clearRect(0,0,this.sb.width,this.sb.height);var b=1;0>=this.L.mode&&(b=0);3==this.L.mode&&(b=this.L.Ca);for(a=0;a<this.K.length;a++){var c=this.K[a];var h=b;if("poly"==c.type){var m=c.Bf;2==this.L.mode&&(h=c.Ca);var n=this.L.Rb.indexOf(c.id);-1!=n&&(h=this.L.Bc[n]);this.Ib.fillStyle=this.pa(c.Wb,c.Vb*h);this.Ib.strokeStyle=this.pa(c.Yb,c.Xb*h);if(0<m.length){this.Ib.beginPath();for(c=0;c<m.length;c++)h=m[c],0==c?this.Ib.moveTo(h.fc,h.Qb):this.Ib.lineTo(h.fc,h.Qb);this.Ib.closePath();this.Ib.stroke();
this.Ib.fill()}}}}};e.Ao=function(a,b,c){var h,m=!1;var n=0;for(h=a.length-1;n<a.length;h=n++){var q=a[n];h=a[h];q.Qb>c!=h.Qb>c&&b<(h.fc-q.fc)*(c-q.Qb)/(h.Qb-q.Qb)+q.fc&&(m=!m)}return m};e.prototype.Ui=function(a,b){var c=-1;if((0<=this.L.mode||0<this.L.Rb.length)&&this.Jo())for(var h=0;h<this.K.length;h++){var m=this.K[h];"poly"==m.type&&m.Bf&&0<m.Bf.length&&(-1!=this.L.mode||-1!=this.L.Rb.indexOf(m.id))&&y.kc.Ao(m.Bf,a,b)&&(c=h,m.fc=a,m.Qb=b)}return 0<=c?this.K[c]:!1};e.prototype.Jo=function(){return 4==
this.Z()&&0==this.Ic()};e.prototype.aspect=function(){return this.C.width/this.C.height};e.prototype.ef=function(){this.M.ef()};e.prototype.update=function(a){void 0===a&&(a=0);this.ub=!0;a&&(this.qh=Math.max(1*a,this.qh))};e.prototype.ho=function(){return 0<this.M.Di||0<this.M.je};e.prototype.Hi=function(){var a=Date.now();if(this.hb())this.Gm(),this.oa&&(this.sa.ev(),this.sa.jp());else if(0===this.Kd)if(!this.oa||4==this.Z()&&0==this.Ic()){var b=this.mf();this.Ss(this.C.width/2,this.C.height/2,
b);this.Gm();this.Ji?this.sa.hv():this.kv&&this.oq();this.Hm();this.oa?(this.A.Tc?14==this.A.format?this.sa.gv():this.sa.wq():0<this.M.N.levels.length?this.sa.qv():this.sa.sv(),this.sa.jp()):(this.Pg&&this.bv(),this.Ct());this.Qa&&this.Qa.Bt()}else this.sa.wq(),this.Gm(),this.Ps();b=Date.now();50<b-a?(this.G("Time between frames: "+(b-a)),this.xg||(2<this.rm?(this.xg=!0,this.G("disabling HighDPI rendering"),this.ic()):this.rm++)):this.rm=0;this.qf&&this.M.N.xp++;this.oa&&(a=this.S,a.disable(a.BLEND),
a.disable(a.STENCIL_TEST),a.disable(a.DEPTH_TEST),a.disable(a.CULL_FACE))};e.prototype.bv=function(){this.ef();var a;this.Gc&&(a=this.Gc.getContext("2d"));if(this.C.width!==this.ea.offsetWidth||this.C.height!==this.ea.offsetHeight)this.C.width=this.ea.offsetWidth,this.C.height=this.ea.offsetHeight;if(a){var b=a.canvas.width/2,c=a.canvas.height/2,h=a.createRadialGradient(b,c,5,b,c,Math.max(b,c));h.addColorStop(0,"#333");h.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);a.fillStyle=
h;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.m.toFixed(1),b,c-60);a.fillText("Tilt: "+this.u.m.toFixed(1),b,c-30);a.fillText("Fov: "+this.fov.m.toFixed(1),b,c+0);a.fillText("Node: "+this.ej(),b,c+30);a.fillText("Title: "+this.Tg.title,b,c+60)}};e.prototype.ku=function(a){a=Math.round(a);this.Ne=0<(a&1);this.am=0<(a&2);this.kk=0<(a&4);this.xg=0<(a&8);4096<=a&&(this.Og=0<(a&4096),this.oa=0<(a&8192),this.Pg=0<(a&32768))};e.prototype.qs=function(){var a=
0;this.Ne&&(a|=1);this.am&&(a|=2);this.kk&&(a|=4);this.Og&&(a|=4096);this.oa&&(a|=8192);this.Pg&&(a|=32768);return a};e.prototype.Hm=function(){var a=Math.round(this.mf());this.Ne||this.mq(a);for(var b=0;b<this.Xa.length;b++){var c=this.Xa[b];c.Im(a);c.j.hidden=!1}for(b=0;b<this.Ub.length;b++)c=this.Ub[b],c.Im(a),c.j.hidden=!1};e.prototype.oq=function(){for(var a=Math.round(this.mf()),b=0;b<this.U.length;b++){var c=this.U[b];c.pd||(c.Im(a),c.j.hidden=!1)}};e.prototype.Ps=function(){for(var a=0;a<
this.Xa.length;a++){var b=this.Xa[a];b.Hf(!1)}for(a=0;a<this.U.length;a++)b=this.U[a],b.pd||b.Hf(!1);for(a=0;a<this.Ub.length;a++)b=this.Ub[a],b.Hf(!1)};e.prototype.jv=function(){try{for(var a=0;a<this.nj();a++){var b=this.ml(a);b.pd||b.le()}}catch(c){this.Rm(c)}};e.prototype.Rc=function(a){this.we=!1;try{this.bb=a?a:document.createElement("canvas");var b=this.mc.offsetWidth-this.margin.left-this.margin.right,c=this.mc.offsetHeight-this.margin.top-this.margin.bottom;if(100>b||100>c)c=b=100;var h=
window.devicePixelRatio||1;this.xg&&(h=1);this.ea.style.width=b+"px";this.ea.style.height=c+"px";this.bb.style.width=b+"px";this.bb.style.height=c+"px";this.bb.width=b*h;this.bb.height=c*h;this.bb.style.display="none";this.bb.style.touchAction="none";this.ea.insertBefore(this.bb,this.ea.firstChild);var m=this.vq;m.stencil=!0;m.depth=!0;m.powerPreference="high-performance";m.alpha=this.Sc?!0:!1;this.ld&&10<=this.Jh[0]&&(m.antialias=!1,m.alpha=!1);a={};a.flags=m;a.canvas=this.bb;this.I("beforewebglcontext",
a);this.S=this.bb.getContext("webgl",m);this.S||(this.S=this.bb.getContext("experimental-webgl",m));if(this.S){var n=this.S;this.Cb.width=b*h;this.Cb.height=c*h;n.clearColor(0,0,0,0);n.enable(this.S.DEPTH_TEST);n.viewport(0,0,500,500);n.clear(n.COLOR_BUFFER_BIT|n.DEPTH_BUFFER_BIT);4096<=n.getParameter(n.MAX_TEXTURE_SIZE)&&!this.Nh&&(this.M.rg=1<h?4*this.M.rg:2*this.M.rg);this.G("Max tile cnt: "+this.M.rg);this.sa.Kh();this.sa.rj();this.sa.Do(this.Kg);this.sa.Eo();this.D&&(this.D.Kh(),this.D.Rc());
this.Qa&&(this.Qa.Kh(),this.Qa.Rc())}}catch(q){this.G(q)}this.S?(this.oa=!0,this.I("webglready",{gl:this.S})):alert("Could not initialise WebGL!")};e.prototype.ju=function(a){this.mi=a};e.prototype.getQueryParameter=function(){return this.mi};e.prototype.gb=function(a){if(a){if("{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:"))return a;""!=this.mi&&(a=-1==a.indexOf("?")?a+("?"+this.mi):a+("&"+this.mi));return this.qe+a}return this.qe};e.prototype.nf=function(){return this.pan.m};
e.prototype.js=function(){return this.F.pan};e.prototype.ij=function(){return this.M.ij()};e.prototype.Wd=function(){return this.M.Wd()};e.prototype.hb=function(){return this.M.hb()};e.prototype.ee=function(a){this.na(!1);isNaN(a)||(this.pan.m=Number(a));this.update()};e.prototype.Vj=function(a){this.na(!1);isNaN(a)||(this.pan.m=Number(a)+this.pan.Hj);this.update()};e.prototype.Si=function(a,b){isNaN(a)||(this.ee(this.nf()+a),b&&(this.pan.d=a))};e.prototype.nn=function(a,b){this.Si(a*this.lf(),b)};
e.prototype.gg=function(){return this.u.m};e.prototype.us=function(){return this.F.u};e.prototype.fe=function(a){this.na(!1);isNaN(a)||(this.u.m=Number(a));this.update()};e.prototype.Ti=function(a,b){this.fe(this.gg()+a);b&&(this.u.d=a)};e.prototype.qn=function(a,b){this.Ti(a*this.lf(),b)};e.prototype.Ag=function(a){this.M.Ag(a)};e.prototype.lj=function(){return this.M.lj()};e.prototype.Dd=function(){return this.M.Dd()};e.prototype.Nb=function(){return this.M.Nb()};e.prototype.dl=function(a,b){return this.M.dl(a,
b)};e.prototype.cl=function(a,b){return this.M.cl(a,b)};e.prototype.Ir=function(){return this.F.Bi};e.prototype.Ab=function(a){return this.M.Ab(a)};e.prototype.hm=function(a){this.M.hm(a)};e.prototype.ui=function(a){this.M.ui(a)};e.prototype.im=function(a){this.M.im(a)};e.prototype.fm=function(a){this.M.fm(a)};e.prototype.gm=function(a,b){if(120<this.Dd())this.Ab(a);else{var c=this.jj(b.x,b.y,!0);if(this.Ab(a)){b=this.jj(b.x,b.y,!0);a=c.pan-b.pan;b=c.tilt-b.tilt;if(15<Math.abs(a)||10<Math.abs(b))b=
a=0;a=this.hb()?-a:a*Math.cos(c.tilt*Math.PI/180);this.pan.ac-=a;this.u.ac+=b;this.mm(this.pan.m-a,this.u.m+b)}}};e.prototype.Dk=function(a,b){return this.Ab(this.Dd()+a)?(b&&(this.fov.d=a),!0):!1};e.prototype.$q=function(a,b){this.gm(this.Dd()+a,b)};e.prototype.Ri=function(a,b){if(!isNaN(a)){var c=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/360);c=this.fov.m*Math.exp(c);this.Ab(c);b&&(this.fov.d=a)}};e.prototype.mn=function(a,b,c){if(!isNaN(a)){var h=a/90*Math.cos(Math.min(this.fov.m,90)*Math.PI/
360);h=this.fov.m*Math.exp(h);this.gm(h,b);c&&(this.fov.d=a,this.fov.Oc.enabled=!0,this.fov.Oc.x=b.x,this.fov.Oc.y=b.y)}};e.prototype.mm=function(a,b){this.na(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);this.update()};e.prototype.Np=function(a,b,c){this.na(!1);!isNaN(a)&&1E7>a&&-1E7<a&&(this.pan.m=a);!isNaN(b)&&1E7>b&&-1E7<b&&(this.u.m=b);!isNaN(c)&&1E7>c&&-1E7<c&&(this.W.m=c);this.update()};e.prototype.zg=function(a,b,c){this.na(!1);isNaN(a)||(this.pan.m=a);isNaN(b)||(this.u.m=b);isNaN(c)||
this.Ab(c);this.update()};e.prototype.Ep=function(){this.zg(this.pan.Ha,this.u.Ha,this.fov.Ha)};e.prototype.setLocked=function(a){this.Ip(a);this.Jp(a);this.Hp(a)};e.prototype.Ip=function(a){this.J.rc=!!a};e.prototype.Hp=function(a){this.J.Wh=!!a};e.prototype.Ur=function(){return this.J.Wh};e.prototype.Jp=function(a){this.J.Ge=!!a};e.prototype.Mr=function(){return this.la.enabled};e.prototype.du=function(a){var b=this.la;a&&(b.ia.x=0,b.ia.y=0);b.enabled=!!a};e.prototype.Fs=function(){return this.J.Nf};
e.prototype.zu=function(a){this.J.Nf=a};e.prototype.Tj=function(a){this.yc=!!a};e.prototype.Jr=function(){return this.tl()?!0:this.pl};e.prototype.uu=function(a,b){void 0===b&&(b=!0);this.qq=b;this.Qg==!a&&(a&&this.tl()?this.zp():((this.Qg=!!a)?this.nb.oi=!0:this.W.m=0,this.I("gyrochanged",{}),this.I("playerstatechanged",{})))};e.prototype.tl=function(){return window.hasOwnProperty("DeviceOrientationEvent")&&DeviceOrientationEvent.hasOwnProperty("requestPermission")&&"function"===typeof DeviceOrientationEvent.requestPermission?
!0:!1};e.prototype.zp=function(){var a=this;if(this.tl())try{DeviceOrientationEvent.requestPermission().then(function(b){"granted"===b&&(a.nb.oi=!0,a.Qg=!0,a.I("gyrochanged",{}),a.I("playerstatechanged",{}))})["catch"](console.error)}catch(b){console.log(b)}};e.prototype.vs=function(){return this.Qg};e.prototype.hs=function(){return this.Lh?5:this.zl?6:this.ld?4:this.Mo?1:this.Al?2:this.Io?3:0};e.prototype.Dr=function(){return this.yl?5:this.lg?4:this.uj?2:this.Sc?3:this.xl?1:0};e.prototype.Er=function(){return window.matchMedia&&
window.matchMedia("(prefers-color-scheme: dark)").matches?1:0};e.prototype.moveTo=function(a,b,c,h,m,n){this.na(!1);if("_blank"!==a&&""!==a){this.F.active=!0;this.F.aborted=!1;this.F.Lm=!1;var q=a.toString().split("/");1<q.length&&(a=Number(q[0]),h=Number(b),b=Number(q[1]),2<q.length&&(c=Number(q[2])));this.F.pan=isNaN(a)?this.pan.m:Number(a);this.F.u=isNaN(b)?this.u.m:Number(b);this.F.fov=!isNaN(c)&&0<c&&180>c?Number(c):this.fov.m;this.F.speed=!isNaN(h)&&0<h?Number(h):1;this.F.W=isNaN(m)?this.W.m:
Number(m);void 0!==n?!a||4!=n&&12!=n&&9!=n||(this.F.pb=n):this.F.pb=this.Z()}};e.prototype.Ej=function(a){this.na(!1);var b=0,c=0,h=70,m=4,n=0,q=1;a.hasOwnProperty("pan")&&(b=Number(a.pan),this.F.pan=b);a.hasOwnProperty("tilt")&&(c=Number(a.tilt),this.F.u=c);a.hasOwnProperty("fov")&&(h=Number(a.fov),this.F.fov=h);a.hasOwnProperty("projection")&&(m=Number(a.projection),this.F.pb=m);a.hasOwnProperty("timingFunction")&&(n=Number(a.timingFunction));a.hasOwnProperty("speed")&&(q=Number(a.speed));0>=q?
(this.zg(b,c,h),this.rb(m)):(a=new y.Tm,a.cb="__AutoMove",a.Re=this.ij(),a.zi=this.u.m,a.ge=this.fov.m,a.yi=this.Z(),a.Ld=b,a.ie=c,a.Ig=h,a.he=m,a.Xf=!1,a.hf=!1,a.jf=!1,0==n&&(a.hf=!0),1==n&&(a.Xf=!0,a.hf=!0),2==n&&(a.jf=!0),a.speed=q,this.F.an=this.R,this.R=this.Vn(a),this.F.bn=(new Date).getTime(),this.F.Lm=!0,this.F.active=!0,this.F.aborted=!1,this.F.pan=b,this.F.u=c,this.F.fov=h,this.oe=!1)};e.prototype.it=function(a){this.moveTo(this.pan.Ha,this.u.Ha,this.fov.Ha,a)};e.prototype.jt=function(a,
b){var c={};c.pan=this.pan.Ha;c.tilt=this.u.Ha;c.fov=this.fov.Ha;c.projection=this.Dh();c.timingFunction=b;c.speed=a;this.Ej(c)};e.prototype.Nq=function(a,b,c,h){var m=new y.Mi(this);m.type="point";m.pan=b;m.u=c;m.id=a;m.j={};m.j.player=this;m.$f();m.j.hotspot=m;m.j.__div=document.createElement("div");m.j.__div.appendChild(h);this.K.push(m);m.j.__div.style.position="absolute";m.j.__div.style.left="-1000px";m.j.__div.style.top="-1000px";m.j.__div.ggVisible=!0;this.Ia.insertBefore(m.j.__div,this.Ia.firstChild);
this.ub=!0};e.prototype.cv=function(a,b,c){for(var h=0;h<this.K.length;h++){var m=this.K[h];m.id==a&&(m.pan=b,m.u=c,m.$f())}this.ub=!0};e.prototype.Pt=function(a){for(var b=-1,c,h=0;h<this.K.length;h++)c=this.K[h],c.id==a&&(b=h);-1<b&&(c=this.K.splice(b,1).pop(),c.j&&c.j.__div&&this.Ia.removeChild(c.j.__div))};e.prototype.ms=function(){for(var a=[],b=0;b<this.K.length;b++){var c=this.K[b];"point"==c.type&&a.push(String(c.id))}return a};e.prototype.Lr=function(a){for(var b=0;b<this.K.length;b++){var c=
this.K[b];if(c.id==a)return b={},b.id=a,b.pan=c.pan,b.tilt=c.u,b.pxp=c.Tl,b.pyp=c.Ul,b.url=c.url,b.target=c.target,b.distance=c.distance,b.title=c.title,b.description=c.description,b.skinid=c.qm,c.hd&&(b.customimage=c.hd,b.customimagewidth=c.gf,b.customimageheight=c.yd,b.use3D=c.Kf,b.distance3D=c.Zi),c.j&&c.j.__div&&(b.div=c.j.__div),b}};e.prototype.tq=function(a,b){this.ja.start.x=a;this.ja.start.y=b;this.ja.qa.x=a;this.ja.qa.y=b;this.la.qa.x=a;this.la.qa.y=b;this.Xl++;this.pan.ac=this.pan.m;this.u.ac=
this.u.m};e.prototype.rq=function(a,b){var c=this.Nb();this.pan.ac+=a*c/this.C.height;this.u.ac+=b*c/this.C.height;this.pan.m=this.pan.ac;this.u.m=this.u.ac};e.prototype.sq=function(a,b){this.ja.m.x=a;this.ja.m.y=b;this.ja.ia.x=this.ja.m.x-this.ja.qa.x;this.ja.ia.y=this.ja.m.y-this.ja.qa.y;this.J.$d&&(this.ja.qa.x=this.ja.m.x,this.ja.qa.y=this.ja.m.y,this.update())};e.prototype.na=function(a){this.v.active&&(this.v.active=!1,this.I("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=
!1);this.F.active&&(this.F.active=!1,this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1);this.Xe=this.F.aborted=!1;this.v.Dj=!1;this.Qd=.02;this.bh=0;this.v.sd&&(this.v.enabled=this.v.Of,a&&(this.v.sd=this.v.Sg));this.og=(new Date).getTime()};e.prototype.Sr=function(){return this.og};e.prototype.po=function(a,b){a||(a=this.ca.x,b=this.ca.y);var c=this.C.height/(2*Math.tan(this.Nb()*Math.PI/360));a-=this.C.width/2;b-=this.C.height/2;var h={};h.pan=180*Math.atan(a/c)/Math.PI;h.tilt=180*Math.atan(-b/
Math.sqrt(a*a+c*c))/Math.PI;return h};e.prototype.jj=function(a,b,c){a||(a=this.ca.x,b=this.ca.y);if(this.hb()){var h=this.fov.m/this.C.height;a=-(a-this.C.width/2)*h+this.pan.m;b=-(b-this.C.height/2)*h+this.u.m}else{h=new y.Ua(0,0,1);b=this.po(a,b);h.de(-b.tilt);h.Ff(b.pan);h.de(-this.u.m);h.Ff(-this.pan.m);c||(h.de(-this.Ya.pitch),h.Gf(this.Ya.W));for(a=h.Tq()-180;-180>a;)a+=360;b=h.Uq()}h={};h.pan=a;h.tilt=b;return h};e.prototype.Kc=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};e.prototype.Fk=function(a,b){var c=this.mf(),h,m;for(h=0;h<this.nj();h++){var n=this.ml(h);if(n.Na)return n}for(h=0;h<this.nj();h++)if(n=this.ml(h),!n.pd){var q=[],r=new y.Ua,t;var w=m=void 0;0<n.fov&&(m=Math.tan(n.fov/2*Math.PI/180),w=0<n.qc?m*n.Pc/n.qc:m,n.Jc&&1!=n.Jc&&(w*=n.Jc));for(t=0;4>t;t++){switch(t){case 0:r.init(-m,-w,0);break;case 1:r.init(m,
-w,0);break;case 2:r.init(m,w,0);break;case 3:r.init(-m,w,0)}r.Ka(n.Ka*Math.PI/180);r.Oa(-n.Oa*Math.PI/180);r.zb(n.zb*Math.PI/180);--r.z;r.Ka(-n.u*Math.PI/180);r.Oa(n.pan*Math.PI/180);r.Oa(-this.pan.m*Math.PI/180);r.Ka(this.u.m*Math.PI/180);r.zb(this.W.m*Math.PI/180);q.push(r.clone())}q=this.Hk(q);if(0<q.length){for(t=0;t<q.length;t++)r=q[t],.1>r.z?(w=-c/r.z,m=this.C.width/2+r.x*w,w=this.C.height/2+r.y*w):w=m=0,r.fc=m,r.Qb=w;if(y.kc.Ao(q,a,b))return n}}return null};e.prototype.nj=function(){return this.U.length+
this.Xa.length+this.Ub.length};e.prototype.ml=function(a){return a<this.U.length?this.U[a]:a<this.U.length+this.Xa.length?this.Xa[a-this.U.length]:this.Ub[a-(this.U.length+this.Xa.length)]};e.prototype.Mh=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};e.prototype.ht=function(a){this.nq(a);window.focus();if(this.zd)this.zd.onclick();(this.ve||this.kf&&this.lg)&&7>this.gd&&this.eg();this.$b=
null;if(!this.J.rc&&!this.yc){a=a?a:window.event;if(a.which||0==a.which||1==a.which){var b=(new Date).getTime();if(this.Ke){this.$b=this.Ke;this.T.Wc=!0;this.T.startTime=b;a.stopPropagation();return}if(this.Kc(a.target)){var c;if((c=this.Fk(this.ca.x,this.ca.y))&&c.Ae&&(this.$b=c,void 0!==c.code&&""!==c.code&&c.pc))return;this.tq(a.pageX,a.pageY);this.T.Wc=!0;this.T.startTime=b;a.preventDefault();this.na(!0)}}this.ja.ia.x=0;this.ja.ia.y=0}};e.prototype.Ng=function(a,b,c){var h=this.L.ck;h.enabled&&
(this.P!=this.fb&&0<=a&&0<=b&&""!=this.P.title?(this.Fa.innerHTML=this.Va(this.P.title),this.Fa.style.color=this.pa(h.dk,h.bk),this.Fa.style.backgroundColor=h.background?this.pa(h.Wb,h.Vb):"transparent",this.Fa.style.border="solid "+this.pa(h.Yb,h.Xb)+" "+h.Qi+"px",this.Fa.style.borderRadius=h.zk+"px",this.Fa.style.textAlign="center",0<h.width?(this.Fa.style.left=a-h.width/2+this.margin.left+"px",this.Fa.style.width=h.width+"px"):(this.Fa.style.width="auto",this.Fa.style.left=a-this.Fa.offsetWidth/
2+this.margin.left+"px"),this.Fa.style.height=0<h.height?h.height+"px":"auto",this.Fa.style.top=b+(c?-60:25)+this.margin.top+"px",this.Fa.style.visibility="inherit",this.Fa.style.overflow="hidden"):(this.Fa.style.visibility="hidden",this.Fa.innerHTML=""))};e.prototype.nq=function(a){var b=this.Eh();this.Mh()?(this.ca.x=a.clientX-this.margin.left,this.ca.y=a.clientY-this.margin.top):(this.ca.x=a.clientX-b.x,this.ca.y=a.clientY-b.y)};e.prototype.Oe=function(a){if("string"==typeof a)for(var b=0;b<this.K.length;b++)if(this.K[b].id==
a){a=this.K[b];break}this.P=a&&null!==a&&"object"==typeof a?a:this.fb;this.P==this.fb&&(a=this.Ui(this.ca.x,this.ca.y))&&(a.kb=0);this.P.$f&&this.P.$f();this.hotspot=this.P;this.I("activehotspotchanged",{hotspot:this.P})};e.prototype.gt=function(a){a=a?a:window.event;this.nq(a);if(!this.J.rc&&!this.yc&&!this.Ke){this.v.active&&(this.v.zj=(new Date).getTime());0==a.buttons&&(this.T.Wc=!1);this.T.Wc&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.sq(a.pageX,a.pageY),this.na(!0));var b=
!1;if(this.P==this.fb||"poly"==this.P.type){var c=this.fb;0<this.K.length&&this.Kc(a.target)&&(c=this.Ui(this.ca.x,this.ca.y));this.Rj(c);this.Ng(this.ca.x,this.ca.y,!1);0!=c&&c!=this.fb&&(b=!0)}c=null;!b&&this.Kc(a.target)&&(c=this.Fk(this.ca.x,this.ca.y));this.v.Xi&&(this.v.Xi=!1);this.Ia.style.cursor=this.P!=this.fb&&this.P.Ce&&b||c&&c.jg?"pointer":"default"}};e.prototype.Rj=function(a){!1===a&&(a=this.fb);this.P!=a&&(this.P!=this.fb&&(0<this.L.mode&&(this.P.kb=0),this.ha&&this.ha.hotspotProxyOut&&
this.ha.hotspotProxyOut(this.P.id,this.P.url),this.I("hsproxyout",{id:this.P.id,url:this.P.url})),a!=this.fb?(this.Oe(a),this.ha&&this.ha.hotspotProxyOver&&this.ha.hotspotProxyOver(this.P.id,this.P.url),this.I("hsproxyover",{id:this.P.id,url:this.P.url}),0<this.L.mode&&(this.L.kb=1,this.P.kb=1)):(this.Oe(this.fb),0<this.L.mode&&(this.L.kb=0)))};e.prototype.ft=function(a){a=a?a:window.event;this.yj=-1;if(this.ve||this.kf&&this.lg)7<=this.gd?this.Xp():this.eg();if(!this.J.rc&&!this.yc&&(this.$b&&(this.$b.Ae(),
this.Ke=this.$b.Na?this.$b:null),this.T.Wc)){this.na(!0);a.preventDefault();this.T.Wc=!1;a=(new Date).getTime();var b=Math.abs(this.ja.start.x-this.ja.qa.x)+Math.abs(this.ja.start.y-this.ja.qa.y);if(400>a-this.T.startTime&&0<=b&&20>b){var c=this.Ui(this.ca.x,this.ca.y);c&&this.iq(c);b=Math.abs(this.ja.ae.x-this.ja.qa.x)+Math.abs(this.ja.ae.y-this.ja.qa.y);var h=this.jj(this.ca.x,this.ca.y,!0);700>a-this.Ph&&0<=b&&20>b?(c?this.jq(c):this.J.Rk&&this.fk(),this.I("doubleclick",{pan:-Math.round(100*h.pan)/
100,tilt:Math.round(100*h.tilt)/100}),this.Ph=0):(this.I("panoclick",{pan:-Math.round(100*h.pan)/100,tilt:Math.round(100*h.tilt)/100}),this.Ph=a);this.ja.ae.x=this.ja.qa.x;this.ja.ae.y=this.ja.qa.y}}};e.prototype.Xo=function(a){if(!this.J.Ge&&!this.yc&&(a=a?a:window.event,this.Kc(a.target))){var b=a.detail?-1*a.detail:a.wheelDelta/40;this.J.Fo&&(b=-b);a.axis&&(-1==this.yj?this.yj=a.axis:this.yj!=a.axis&&(b=0));var c=0<b?1:-1;a.wheelDeltaX&&a.wheelDeltaY&&Math.abs(a.wheelDeltaX)>Math.abs(a.wheelDeltaY)&&
(b=0);0!=b&&(this.J.Nf?this.mn(c*this.J.sm,this.xe(a),!0):this.Ri(c*this.J.sm,!0),this.update());a.preventDefault();this.na(!0)}};e.prototype.Zu=function(a){a||(a=window.event);var b=a.touches,c=this.Eh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;this.Te=this.$b=null;window.focus();this.ul||(this.ul=!0,this.I("hastouch",{}),this.I("playerstatechanged",{}));!this.Ko&&(this.ve||this.kf&&this.lg)&&7>this.gd&&this.eg();if(!this.J.rc&&!this.yc)if(c=(new Date).getTime(),this.Ke)this.$b=this.Ke,
this.T.jd=!0,this.T.startTime=c,a.preventDefault(),this.T.hi=!0,b[0]&&(this.Bb=b[0].target);else{if(!this.T.jd&&b[0]){this.T.startTime=c;this.T.start.x=b[0].pageX;this.T.start.y=b[0].pageY;this.T.qa.x=b[0].pageX;this.T.qa.y=b[0].pageY;c=this.Bb=b[0].target;if(this.Kc(c)){var h;(h=this.Fk(this.ca.x,this.ca.y))&&h.Ae&&(this.$b=h);if(h=this.Ui(this.ca.x,this.ca.y))this.G(h),this.Te=h,this.Rj(h),this.xe(a),this.Ng(this.ca.x,this.ca.y,!0);this.tq(b[0].pageX,b[0].pageY);this.T.Nn=b[0].identifier;this.T.jd=
!0;a.preventDefault();this.T.hi=!0;this.na(!0)}if(c){h=!1;if(null!=this.T.Gg)for(var m=this.T.Gg;m&&m!=this.control;){if(m.onmouseout)m.onmouseout(a);m=m.parentNode}m=c;for(var n=!0;m&&m!=this.control;)c!=this.T.Gg&&m.onmouseover&&(m.onmouseover(a),7<=this.gd&&this.Kc(a)&&(h=!0)),m.onmousedown&&(m.onmousedown(a),n=!1,h=!0),m.onclick&&(n=!1),m=m.parentNode;this.T.Gg=n&&7<=this.gd&&c!=this.T.Gg?c:null;h&&(a.preventDefault(),this.T.hi=!0)}}1<b.length&&(this.T.jd=!1);!this.rl&&2==b.length&&b[0]&&b[1]&&
this.Kc(this.Bb)&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.fov.Yp=Math.sqrt(a*a+b*b),this.fov.prev=this.fov.m);this.ja.ia.x=0;this.ja.ia.y=0}};e.prototype.eg=function(){this.G("froce start sound!");try{this.Ii&&this.A.j&&(!this.A.Tc&&this.A.Yj&&this.A.j.play(),this.A.j.muted=!1);if(this.ga&&(this.G("resume!"),this.G(this.ga.state),this.ga.resume(),"suspended"==this.ga.state)){this.G("audio context suspended");return}if(this.ld&&this.ga&&this.ga.createOscillator){var a=this.ga.createOscillator(),
b=this.ga.createGain();a.frequency.value=30;a.type="sine";a.connect(b);b.connect(this.ga.destination);b.gain.value=.01;a.start(0);setTimeout(function(){a.stop()},1E4)}for(b=0;b<this.X.length;b++){var c=this.X[b];this.G(c);(!this.isPlaying(c.id)||c.ua)&&0<=c.loop&&c.autoplay&&!this.Xc&&(this.G("start "+c.id),c.ua&&(this.G("from buffer"),c.Rf()),this.be(c.id,c.loop))}for(b=0;b<this.U.length;b++){var h=this.U[b];!this.isPlaying(h.id)&&h.autoplay&&this.Ii&&!this.Xc&&this.be(h.id,h.loop);this.isPlaying(h.id)&&
h.autoplay&&this.Ii&&!this.Xc&&(h.Pd&&h.Ve(),h.j.muted=!1)}this.kf=this.ve=!1}catch(m){this.G(m)}};e.prototype.Yu=function(a){a||(a=window.event);var b=a.touches,c=this.Eh();this.ca.x=b[0].clientX-c.x;this.ca.y=b[0].clientY-c.y;if(this.J.rc||this.yc)(this.D.Md||this.D.ke||this.D.$c)&&a.preventDefault();else{b[0]&&(this.T.qa.x=b[0].pageX,this.T.qa.y=b[0].pageY);if(this.Bb){c=this.Bb;for(var h=!1;c&&c!=this.control&&!h;)"scrollarea"==c.ggType&&(h=!0),"map"==c.ggType&&(h=!0),"text"==c.ggType&&(h=!0),
c=c.parentNode;h||a.preventDefault()}if(this.T.jd){a.preventDefault();for(c=0;c<b.length;c++)if(b[c].identifier==this.T.Nn){this.sq(b[c].pageX,b[c].pageY);break}this.Te&&(this.xe(a),this.Ng(this.ca.x,this.ca.y,!0));this.na(!0)}2==b.length&&b[0]&&b[1]&&(this.T.jd=!1,!this.rl&&this.Kc(this.Bb)&&(this.J.Ge||(c=b[0].pageX-b[1].pageX,h=b[0].pageY-b[1].pageY,this.fov.Bn=Math.sqrt(c*c+h*h),this.la.fov.active=!0,this.la.fov.center.enabled=!0,this.la.fov.center.x=(b[0].pageX+b[1].pageX)/2,this.la.fov.center.y=
(b[0].pageY+b[1].pageY)/2,this.la.fov.nc=this.fov.prev*Math.sqrt(this.fov.Yp/this.fov.Bn),4==this.Z()&&!this.hb()&&this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max),this.la.fov.nc<this.fov.min&&(this.la.fov.nc=this.fov.min)),this.na(!0),a.preventDefault()))}};e.prototype.Xu=function(a){this.T.hi&&(this.T.hi=!1,a.preventDefault());var b=!1;if(this.ve||this.kf&&this.lg)7<=this.gd?this.Xp():this.eg();if(!this.J.rc&&!this.yc){this.T.jd&&(a.preventDefault(),this.na(!0));var c=(new Date).getTime(),
h=void 0,m=!1;this.Kc(this.Bb)&&(a.preventDefault(),this.$b&&(this.$b.Ae(),this.Ke=this.$b.Na?this.$b:null));h=Math.abs(this.T.start.x-this.T.qa.x)+Math.abs(this.T.start.y-this.T.qa.y);if(0<=h&&20>h){b=!0;if(this.Bb){var n=this.Bb;for(h=function(){if(n.onclick){var r=n;setTimeout(function(){r.onclick(a)},0);"hotspot"!=n.Cv&&(m=!0);b=!1}n=n.parentNode};n&&n!=this.control;)h()}h=Math.abs(this.T.ae.x-this.T.qa.x)+Math.abs(this.T.ae.y-this.T.qa.y);if(700>c-this.Ph&&0<=h&&20>h){if(this.Kc(this.Bb))if(a.preventDefault(),
this.Te)this.jq(this.Te);else if(this.J.Rk){var q=this;setTimeout(function(){q.fk()},1)}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)n.ondblclick&&(n.ondblclick(),m=!0,b=!1),n=n.parentNode;this.Ph=0}else this.Ph=c;this.T.ae.x=this.T.qa.x;this.T.ae.y=this.T.qa.y}if(this.Bb)for(n=this.Bb;n&&n!=this.control;)this.T.Gg!=this.Bb&&n.onmouseout&&(n.onmouseout(a),7<=this.gd&&(m=!0)),n.onmouseup&&(n.onmouseup(a),7<=this.gd&&(m=!0)),n=n.parentNode;m&&a.preventDefault();this.xe(a);this.Te&&(this.Ng(-1,-1,!0),
b&&this.iq(this.Te));this.Bb=null;this.T.jd=!1;this.Rj(this.fb);this.Te=null}};e.prototype.Wu=function(a){this.J.rc||this.yc||(this.T.jd=!1);this.Te=null;this.Rj(this.fb);this.xe(a);this.Ng(-1,-1,!0)};e.prototype.Lo=function(){return null!=this.Bb||this.T.jd||this.T.Wc};e.prototype.Yo=function(a){if(!this.yf&&window.MSGesture){var b=window.MSGesture;this.G("setup gesture");this.yf=new b;this.yf.target=this.control}this.yf&&this.yf.addPointer(a.pointerId)};e.prototype.Xn=function(a){this.rl=!0;this.Fj=
1;this.J.rc||this.J.Ge||this.yc||(a.touches?(this.Bb=a.touches.target,this.Kc(a.target)&&(a.preventDefault(),this.fov.prev=this.fov.m,this.na(!0))):(a.preventDefault(),this.fov.prev=this.fov.m,this.na(!0)))};e.prototype.Ar=function(a){if(!this.J.rc&&!this.J.Ge&&!this.yc&&this.Kc(a.target)){a.preventDefault();this.la.fov.active=!0;this.la.fov.center.enabled=!0;var b=this.xe(a);this.la.fov.center.x=b.x;this.la.fov.center.y=b.y;this.la.fov.nc=this.fov.prev/Math.sqrt(a.scale);4==this.Z()&&2!=this.Kd&&
this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max);this.update();this.na(!0)}};e.prototype.kt=function(a){this.J.rc||this.J.Ge||this.yc||(a.preventDefault(),1!=a.scale&&(this.la.fov.active=!0,this.Fj*=a.scale,this.la.fov.center.enabled=!0,a=this.xe(a),this.la.fov.center.x=a.x,this.la.fov.center.y=a.y,this.la.fov.nc=this.fov.prev/Math.sqrt(this.Fj),4==this.Z()&&2!=this.Kd&&this.la.fov.nc>this.fov.max&&(this.la.fov.nc=this.fov.max),this.update(),this.na(!0)))};e.prototype.Wn=function(a){this.J.rc||
this.J.Ge||this.yc||(this.la.fov.active=!1,a.preventDefault(),this.na(!0),this.yf&&this.yf.reset&&this.yf.reset())};e.prototype.Ws=function(a){this.J.Wh||this.yc||(this.isFullscreen&&a.preventDefault(),this.wj=a.keyCode,this.na(!0))};e.prototype.Xs=function(a){this.wj&&(this.wj=0,a.preventDefault())};e.prototype.rt=function(){this.wj=0};e.prototype.ci=function(){this.isFullscreen&&(this.Mh()||this.exitFullscreen(),this.Mh()&&(this.$.style.left="0px",this.$.style.top="0px"))};e.prototype.xt=function(a,
b,c,h){h?(this.Hh.alpha=a,this.Hh.beta=b,this.Hh.gamma=c,this.Hh.gamma+=90):(this.nb.alpha=a,this.nb.beta=b,this.nb.gamma=c,this.nb.gamma+=90);this.nb.orientation=window.orientation?1*parseInt(""+window.orientation,10):0;c=new y.Vm;a=this.nb;c.Ff(-a.alpha);c.Gf(-a.beta);c.de(-a.gamma);c.Gf(90-a.orientation);1>c.Pb?-1<c.Pb?(b=180/Math.PI*Math.asin(-c.Pb),a=180/Math.PI*Math.atan2(c.wc,c.vc),c=180/Math.PI*Math.atan2(c.uc,c.tc)):(b=0,a=90,c=-180/Math.PI*Math.atan2(-c.dc,c.ec)):(b=0,a=-90,c=180/Math.PI*
Math.atan2(-c.dc,c.ec));if(this.Qg)if(this.Lo()||this.F.pj||this.nb.oi)this.nb.zf=this.nf()+c,this.nb.fadeIn=0,this.nb.oi=!1;else{h=this.F.active;var m=1;10>this.nb.fadeIn&&(this.nb.fadeIn+=1,m=.1*this.nb.fadeIn);c=-c+this.nb.zf;this.ee(m*c+(1-m)*this.nf());this.fe(m*a+(1-m)*this.gg());this.qq?this.Ag(m*b+(1-m)*this.lj()):this.Ag(0);this.ef();this.F.active=h}};e.prototype.iq=function(a){this.ha&&this.ha.hotspotProxyClick&&this.ha.hotspotProxyClick(a.id,a.url);this.I("hsproxyclick",{id:this.P.id,url:this.P.url});
""!=a.url&&(this.Ml(a.url,a.target),this.Ng(-1,-1,!1))};e.prototype.jq=function(a){this.ha&&this.ha.hotspotProxyDoubleClick&&this.ha.hotspotProxyDoubleClick(a.id,a.url);this.I("hsproxydblclick",{id:this.P.id,url:this.P.url})};e.prototype.lf=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.fov.m,90)/360))};e.prototype.kp=function(){var a=this;setTimeout(function(){a.kp()},100);9!=a.Oj||a.sj||window.requestAnimationFrame(function(){a.di();a.G("restart recover timer")});10<a.Oj&&1<a.Xl&&
(a.Uc("recover timer - disabling requestAnimationFrame"),a.sj=!0,a.di());a.Oj++};e.prototype.vi=function(a){if("__VideoPano"!=this.R.cb){var b={PAN:{value:0,name:"pan"},xv:{value:1,name:"tilt"},tv:{value:2,name:"fov"}},c=0,h=0,m=0;a=Math.max(a,0);for(var n in b){var q=b[n],r=this.cc(this.qo(a,q.value,""),q.value,"");var t=(t=this.lo(r))?this.Yn(r,t,a):r.value;switch(q.value){case 0:q=this.pan.m;if(this.oe&&3!=r.type){if(!this.hb()){for(;360<t;)t-=360;for(;-360>t;)t+=360}c=t-q;this.hb()||(180<c&&(c-=
360),-180>c&&(c+=360));this.pan.m+=c*this.Qd}else this.pan.m=t;this.v.Th=this.pan.m;break;case 1:q=this.u.m;this.oe&&3!=r.type?(h=t-q,this.u.m+=h*this.Qd):this.u.m=t;this.v.Uh=this.u.m;break;case 2:q=this.fov.m,this.oe&&3!=r.type?(m=t-q,this.fov.m+=m*this.Qd):this.fov.m=t,this.v.Sh=this.fov.m}}t=this.Z();for(b=Math.floor(a);!this.cc(b,3)&&0<b;)b--;b=this.cc(b,3);n=a-b.time;this.oe&&-1!=this.dh&&this.Oi+this.vk>a?(t=this.Bh(this.dh),this.fov.m>t?this.Oi=a:(n=(a-this.Oi)/this.vk,n=Math.min(1,n),this.rb(this.Z(),
this.dh,1-n))):(0==b.Gb||n>b.Gb-.3?this.rb(b.value):(n/=b.Gb,this.rb(t,b.value,1-n)),this.v.Qo=b.value);this.oe&&(t=Math.sqrt(c*c+h*h+m*m),.3>t&&(this.oe=!1,this.Qd=.02,this.bh=0),0<this.bh&&t>this.bh&&(this.Qd+=.01,this.Qd=Math.min(this.Qd,1)),this.bh=t)}c=Math.floor(a);h=this.Br(c);for(m=0;m<h.length;m++)if(n=h[m],3>n.$m)c!=this.cn&&(t=n.td,this.Sb.hasOwnProperty(t)&&(b=this.Sb[t].type,0==b?this.Pe(t,n.Mm):1==b?this.Pe(t,n.value):2==b&&this.Pe(t,"true"==n.Mm)));else if(b=this.cc(this.qo(a,n.qb,
n.td),n.qb,n.td),t=(t=this.lo(b))?this.Yn(b,t,a):b.value,n=n.td.split("|"),2==n.length)for(b=n[0],n=n[1],r=0;r<this.K.length;r++)q=this.K[r],q.id==b&&("pan"==n?q.pan=t:"tilt"==n&&(q.u=t));this.cn=c;this.update()};e.prototype.Zn=function(){if(""!=this.v.tg){var a=this.oo(this.v.tg);if(0==a.length||1==a.length&&a[0]==this.ra)return this.ra}a=this.ra;do if(this.v.cp){var b=1E3;do a=this.$a[Math.floor(Math.random()*this.$a.length)];while(b--&&a==this.ra)}else b=this.$a.indexOf(a),b++,b>=this.$a.length&&
(b=0),a=this.$a[b];while(""!=this.v.tg&&!this.Ch(a).tags.includes(this.v.tg)&&a!=this.ra);return a};e.prototype.Ft=function(a){var b=this.F.speed;this.F.El&&(b=b*(a.getTime()-this.F.El)/60);this.F.El=a.getTime();this.v.yh&&(this.sa.ready()||4==this.Z())&&this.gj()&&(this.v.yh=!1,this.v.active=!0,this.Ea.running=!0,this.Ea.finished=!1);if(this.F.active||0!=this.F.pb&&this.sa.ready()){if(this.F.Lm&&"__AutoMove"==this.R.cb){var c=a.getTime()-this.F.bn;b=c/100;if(b>=this.R.length){if(this.vi(this.R.length),
this.xa.splice(this.xa.indexOf(this.R),1),this.F.active=!1,this.R=this.F.an,this.F.pb=0,this.zg(this.F.pan,this.F.u,this.F.fov),this.pan.ac=this.F.pan,this.u.ac=this.F.u,this.F.sg&&(this.F.sg=!1,this.v.Dj=!0,this.v.sd=!0,this.v.active=!0,this.I("autorotatechanged",{})),this.onMoveComplete)this.onMoveComplete()}else this.vi(b)}else{this.pan.d=this.F.pan-this.pan.m;if(!this.hb()&&360==this.pan.max-this.pan.min){for(;-180>this.pan.d;)this.pan.d+=360;for(;180<this.pan.d;)this.pan.d-=360}this.u.d=this.F.u-
this.u.m;this.W.d=this.F.W-this.W.m;this.fov.d=this.F.fov-this.fov.m;c=b*this.lf();var h=Math.sqrt(this.pan.d*this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d+this.fov.d*this.fov.d),m=this.pan.m-this.F.Th,n=this.u.m-this.F.Uh,q=this.W.m-this.F.Ro,r=this.fov.m-this.F.Sh;100*Math.sqrt(m*m+n*n+q*q+r*r)<c&&0==this.F.pb&&(this.F.aborted=!0);this.F.Th=this.pan.m;this.F.Uh=this.u.m;this.F.Ro=this.W.m;this.F.Sh=this.fov.m;if(100*h<c||this.F.aborted){if(this.pan.d=0,this.u.d=0,this.W.d=0,this.fov.d=0,this.fov.Oc.enabled=
!1,this.F.active&&(this.F.active=!1,this.pan.m=this.F.pan,this.u.m=this.F.u,this.W.m=this.F.W,this.fov.m=this.F.fov,this.onMoveComplete))this.onMoveComplete()}else h=h>5*c?c/h:.2,this.pan.d*=h,this.u.d*=h,this.fov.d*=h;this.pan.m+=this.pan.d;this.u.m+=this.u.d;this.W.m+=this.W.d;this.J.Nf&&this.fov.Oc.enabled?this.gm(this.fov.m+this.fov.d,this.fov.Oc):this.fov.m+=this.fov.d;0!=this.F.pb&&(this.F.pb!=this.Z()?(b=this.Bh(this.F.pb),this.Dd()>b?(this.fov.m+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*
this.pan.d+this.u.d*this.u.d+this.W.d*this.W.d)/c,1))*c,this.fov.d)-this.fov.d,this.F.fov=this.fov.m):(this.rb(this.F.pb,this.Z(),0),this.G("New projection from Target:"+this.Z()),this.F.ki=0,this.sa.rj())):1>this.F.ki?(this.F.ki=Math.min(1,this.F.ki+.05*b),this.rb(this.Z(),this.Ic(),this.F.ki)):(this.rb(this.Z(),0,0),this.F.pb=0,this.sa.rj()))}this.og=a.getTime();this.update()}else if(this.v.active&&!this.D.ke){c=a.getTime()-this.v.startTime;this.v.zj<this.v.startTime&&(this.v.zj=this.v.startTime);
if((this.v.sd||this.Ea.running)&&0<this.xa.length){b=c/100;h=!1;if(this.xc!=this.R.cb||""!=this.R.Ye&&this.v.Rd!=this.R.Ye){for(c=0;c<this.xa.length;c++)if(""==this.xc&&this.xa[c].Ye==this.v.Rd||""!=this.xc&&this.xa[c].cb==this.xc&&this.xa[c].Ye==this.v.Rd){h=!0;this.R=this.xa[c];this.xc=this.R.cb;break}!h&&0<this.xa.length&&this.xa[0].Ye==this.v.Rd&&(h=!0,this.R=this.xa[0],this.xc=this.R.cb)}else h=!0;if(h)if(c=(m=this.A.j&&this.A.Tc)&&this.v.xm&&!this.Ea.running,this.Xe){h=b;if(c){if(0==this.We&&
0!=this.A.j.duration)for(;this.We<this.R.length/10;)this.We+=this.A.j.duration;this.A.j.currentTime<this.en&&this.xk&&(this.wk++,this.xk=!1);h=10*(this.wk*this.A.j.duration+this.A.j.currentTime);this.en=this.A.j.currentTime;.05>this.A.j.duration-this.A.j.currentTime&&(this.xk=!0);for(;h>=10*this.We;)h-=10*this.We}if(!m&&b>=this.R.length||m&&!c&&b>=this.R.length||m&&c&&(this.R.cb!=this.R.$o||this.R.Zo!=this.ra)&&b>=this.R.length){this.vi(this.R.length);this.v.Hd=0;this.Xe=!1;if(this.Ea.running){this.Fp();
return}if(this.v.sn){c=0;do b=this.dn[this.R.Ye],h=Math.floor(Math.random()*Object.keys(b).length),h=b[h],this.xc=h.cliptitle,b=h.nodeid,h=h.startview,c++;while(b==this.ra&&10>c)}else this.xc=this.R.$o,b=this.R.Zo,h=this.R.ot;this.xc==this.R.cb&&this.ra==b?1<this.$a.length&&0<this.v.Gj&&(this.v.startTime=a.getTime(),(c=this.Zn())&&c!=this.ra&&(this.qd("{"+c+"}"),this.Xe=!1,this.v.active=!0,this.D.pe=!0,this.D.Ze=!0)):(this.Gd&&b!=this.ra&&(this.qd("{"+b+"}",h),this.D.enabled?(this.v.active=!1,this.D.pe=
!0,this.D.Ze=!0):this.v.active=!0),this.v.startTime=a.getTime())}else this.vi(h),this.v.Hd=h}else if(b=this.cc(0,0),h=this.cc(0,1),m=this.cc(0,2),n=this.cc(0,3),3!=n.qb&&(n=0),this.v.Dj||this.F.aborted||this.Ea.running||c){if(this.Xe=!0,this.v.startTime=0<this.v.Hd?a.getTime()-100*this.v.Hd:a.getTime(),this.oe=c){this.We=this.wk=0;h=10*this.A.j.currentTime;for(c=Math.floor(h);!this.cc(c,3)&&0<c;)c--;c=this.cc(c,3);c.value==this.Z()?this.dh=-1:(this.dh=c.value,this.Oi=h,this.vk=Math.max(5,c.time+c.Gb-
h))}}else{c={};if(0<this.v.Hd)c.pan=this.v.Th,c.tilt=this.v.Uh,c.fov=this.v.Sh,c.projection=this.v.Qo;else{c.pan=b.value;if(!this.hb()){for(;360<c.pan;)c.pan-=360;for(;-360>c.pan;)c.pan+=360}c.tilt=h.value;c.fov=m.value;c.projection=n?n.value:4}c.timingFunction=3;c.speed=1;this.F.sg=!0;this.Ej(c);this.v.active=!0}}else 0<this.v.Gj&&this.Gd&&c>=1E3*this.v.Gj?1<this.$a.length&&(this.v.startTime=a.getTime(),(c=this.Zn())&&c!=this.ra&&(this.v.md=a.getTime(),this.v.timeout=0,this.qd("{"+c+"}"),this.v.active=
!0,this.D.pe=!0)):(c=a.getTime(),h=b=1E3/60,0!=this.v.md&&(h=c-this.v.md),this.u.d=this.v.ek*((this.v.Bo?this.u.Ha:0)-this.u.m)/100,this.fov.d=this.v.ek*(this.fov.Ha-this.fov.m)/100,this.pan.d=.95*this.pan.d+-this.v.speed*this.lf()*.05,b=h/b,this.pan.m+=this.pan.d*b,this.u.m+=this.u.d*b,this.fov.m+=this.fov.d*b,this.v.md=c,this.update());3E3<a.getTime()-this.v.zj&&!this.v.Xi&&(this.Ia.style.cursor="none",this.v.Xi=!0)}else!this.Ea.finished&&1E3<a.getTime()-this.og&&(this.xa.splice(this.xa.indexOf(this.R),
1),this.R=this.al(!1),this.xc=this.R.cb,this.v.active=!1,this.v.yh=!0),this.v.enabled&&!this.T.tj()&&a.getTime()-this.og>1E3*this.v.timeout&&!this.v.yh&&(this.v.Eg&&this.gj()||!this.v.Eg)&&(this.v.active=!0,this.v.startTime=a.getTime(),this.v.md=0,this.I("autorotatechanged",{}),this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1),!this.la.enabled||this.T.tj()||0==this.pan.d&&0==this.u.d&&0==this.fov.d||(this.F.pj=!0,this.pan.d*=.9,this.u.d*=.9,this.fov.d*=.9,this.pan.m+=this.pan.d,this.u.m+=
this.u.d,this.J.Nf&&this.fov.Oc.enabled?this.mn(this.fov.d,this.fov.Oc):this.Ri(this.fov.d),1E-4>this.pan.d*this.pan.d+this.u.d*this.u.d+this.fov.d*this.fov.d&&(this.pan.d=0,this.u.d=0,this.fov.d=0,this.fov.Oc.enabled=!1),this.update())};e.prototype.kq=function(a){var b=this.D;b.$c=!1;"previewtrack"==b.delay&&2!=this.Kd||"videopano"==b.delay&&!this.A.j?0<this.M.N.levels.length?this.M.N.levels[this.M.N.levels.length-1].loaded||(b.$c=!0):this.sa.np()||(b.$c=!0):"videopano"==b.delay&&this.A.j&&!this.A.ng&&
(b.$c=!0);b.$c||this.Zj(a)};e.prototype.Zj=function(a){a||(a=new Date);var b=this.D;b.$c=!1;b.ke=!0;b.aq=a.getTime()+100;0==b.ed||b.Xg||this.um()};e.prototype.um=function(){var a=this.D;4==a.ed?(this.R=this.al(!0,a.ym,a.zm,a.Bi),this.xc=this.R.cb,this.v.active=!0,this.Ea.running=!0):this.moveTo(a.ym,a.zm,a.Bi,a.Yg,0,a.he)};e.prototype.Ht=function(a){var b=this.D;if(!b.Qp){if(b.Md){var c=a.getTime()-b.yq;c/=1E3*b.xq;1<=c?(b.Ol(1),b.Md=!1,this.Ln(),this.$p(),this.kq(a)):0<=c&&b.Ol(c)}else b.ke&&(c=
a.getTime()-b.aq,c/=1E3*b.fh,1<=c?(b.ke=!1,this.og=a.getTime(),this.update(),0!=b.ed&&b.Xg&&this.um(),4!=b.ed&&(this.Tj(!1),this.v.active=b.pe,this.v.sd=b.Ze,this.I("autorotatechanged",{}),b.pe=!1,b.Ze=!1),this.v.md=0,this.fa&&this.Mk(),this.hh=!1):0<=c&&b.Ol(c));b=this.At;b.Wq&&(b.Yi?a.getTime()-b.Uk>=1E3*b.delay&&(b.Yi=!1):(b.current+=b.ud,0>b.current&&(b.current=0,b.ud=-b.ud,b.Yi=!0,b.Uk=a.getTime()),1<b.current&&(b.current=1,b.ud=-b.ud,b.Yi=!0,b.Uk=a.getTime())))}};e.prototype.Kt=function(){var a,
b=this.L;if(0<b.Rb.length){for(a=0;a<b.Rb.length;a++)b.rd[a]!=b.Bc[a]&&(b.rd[a]>b.Bc[a]?(b.Bc[a]+=.05,b.rd[a]<b.Bc[a]&&(b.Bc[a]=b.rd[a])):(b.Bc[a]-=.05,b.rd[a]>b.Bc[a]&&(b.Bc[a]=b.rd[a],-1!=b.Wj.indexOf(b.Rb[a])&&(b.Wj.splice(b.Wj.indexOf(b.Rb[a]),1),b.Rb.splice(a,1),b.rd.splice(a,1),b.Bc.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.K.length;a++){var c=this.K[a];"poly"==c.type&&c.kb!=c.Ca&&(c.kb>c.Ca?(c.Ca+=b.ud,c.kb<c.Ca&&(c.Ca=c.kb)):(c.Ca-=b.ud,c.kb>c.Ca&&(c.Ca=c.kb)),this.update())}3==
b.mode&&b.kb!=b.Ca&&(b.kb>b.Ca?(b.Ca+=b.ud,b.kb<b.Ca&&(b.Ca=b.kb)):(b.Ca-=b.ud,b.kb>b.Ca&&(b.Ca=b.kb)),this.update())};e.prototype.Jt=function(){var a=this.la;this.T.tj()&&(this.J.$d?(a.ia.x=.4*(this.ja.qa.x-a.qa.x),a.ia.y=.4*(this.ja.qa.y-a.qa.y),a.qa.x+=a.ia.x,a.qa.y+=a.ia.y):(a.ia.x=.1*-this.ja.ia.x*this.J.sensitivity/8,a.ia.y=.1*-this.ja.ia.y*this.J.sensitivity/8),this.rq(a.ia.x,a.ia.y),this.update());a.fov.active&&(this.J.Nf&&a.fov.center.enabled?this.$q(.4*(a.fov.nc-this.fov.m),a.fov.center):
this.Dk(.4*(a.fov.nc-this.fov.m)),.001>Math.abs(a.fov.nc-this.fov.m)/this.fov.m&&(a.fov.active=!1),this.update());if(a.enabled&&(0!=a.ia.x||0!=a.ia.y)&&!this.T.tj()){var b=.9*(1-a.cm);a.ia.x*=b;a.ia.y*=b;this.F.pj=!0;.01>a.ia.x*a.ia.x+a.ia.y*a.ia.y?(a.ia.x=0,a.ia.y=0):(this.rq(a.ia.x,a.ia.y),this.update())}};e.prototype.It=function(){if(!this.gj()&&this.qf&&5<this.M.N.xp){var a,b=0,c=this.wd.length;if(this.Pg)c=50,this.Vk<c&&this.Vk++,b=this.Vk;else for(a=0;a<c;a++)(this.wd[a].complete&&this.wd[a].src!=
this.sr||""==this.wd[a].src)&&b++;b==c?(this.fi=1,this.isLoaded=!0,this.va&&this.va.ggLoaded&&this.va.ggLoaded(),this.I("imagesready",{}),this.v.Eg&&this.v.enabled&&!this.F.active&&!this.D.Md&&(this.v.active=!0,this.v.Eg=!1,this.v.startTime=(new Date).getTime(),this.v.md=0)):this.fi=b/(1*c);this.I("downloadprogress",{percentLoaded:this.fi})}};e.prototype.di=function(){var a=this;a.Qj||(a.sj?setTimeout(function(){a.Qj=!1;a.di()},1E3/60):window.requestAnimationFrame(function(){a.Qj=!1;a.di()}));a.Qj=
!0;this.Xl=this.Oj=0;a.F.pj=!1;var b=new Date;this.dj++;120<=this.dj&&(this.G("F/s: "+Math.round(1E3*this.dj/(b.getTime()-this.No))),this.No=b.getTime(),this.dj=0);this.I("timer",{});this.oa&&this.sa.qr();this.Km&&(this.ic(),this.Km=!1);this.Jt();this.It();this.A.j&&this.A.Tc&&!this.Xe&&!this.F.sg&&this.mk&&(this.R=this.mk,this.vi(10*this.A.j.currentTime));this.Ft(b);this.M.Gt();this.Ht(b);this.sa.fv();(0<=this.L.mode||0<this.L.Rb.length)&&this.Kt();this.ik();if(this.wf.pan!=this.pan.m||this.wf.u!=
this.u.m||this.wf.fov!=this.fov.m)this.wf.pan=this.pan.m,this.wf.u=this.u.m,this.wf.fov=this.fov.m,this.I("positionchanged",{});this.Dl!=this.Z()&&(this.Dl=this.Z(),this.I("projectionchanged",{}));this.ub&&(0<this.qh?this.qh--:(this.ub=!1,this.qh=0),this.D.ke||this.D.Md||this.D.$c||this.me||(this.Hi(),this.I("renderframe",{})),this.I("repaint",{}));b=this.ho();b!=this.Oo&&(b?(this.va&&this.va.ggReLoadedLevels&&this.va.ggReLoadedLevels(),this.I("tilesrequested",{})):(a.va&&a.va.ggLoadedLevels&&a.va.ggLoadedLevels(),
this.I("tilesready",{})),this.Oo=b)};e.prototype.Bh=function(a){switch(a){case 4:a=Math.min(110,this.fov.max);break;case 12:a=Math.min(270,this.fov.Il);a=Math.min(360*this.aspect(),a);a=Math.min(360/this.aspect(),a);break;case 9:a=Math.min(270,this.fov.Jl);break;default:a=90}return a};e.prototype.ik=function(){this.Pk.Pn(this.pan.m,this.u.m);for(var a=0;a<this.X.length+this.U.length;a++){if(a<this.X.length)var b=this.X[a];else if(b=this.U[a-this.X.length],b.pd)continue;b.ik()}};e.prototype.Cu=function(a,
b){var c=this;var h="<<U>>"+String(c.lb);h=h.toUpperCase();"U"!=h.charAt(2)&&(c.J.kg=!1);if(0!=c.Zh.length||!c.J.kg||c.J.kh||c.J.lh&&c.rf()||c.J.Vi)if(c.zd)c.$.removeChild(c.zd),c.zd=null;else{c.zd=document.createElement("div");var m=c.zd;h="left: "+a+"px;top:\t "+(b+"px;z-index: 32000;");h+="position:relative;";h+="display: table;";h+="color: black;";h+="background-color: white;";h+="border: 1px solid lightgray;";h+="box-shadow: 1px 1px 3px #333;";h+="font-family: Verdana, Arial, Helvetica, sans-serif;";
h+="font-size: 9pt;";h+="opacity : 0.95;";m.setAttribute("style",h);m.setAttribute("class","gg_contextmenu");h=document.createElement("style");a=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");h.type="text/css";h.styleSheet?h.styleSheet.cssText=a.nodeValue:h.appendChild(a);m.appendChild(h);for(a=0;a<c.Zh.length;a++)if(b=c.Zh[a],""!=b.text){var n=document.createElement("div");h="text-align: left;";h+="margin: 0;";h+="padding: 5px 20px;";h+="vertical-align: left;";n.setAttribute("style",
h);n.setAttribute("class","gg_context_row");""!=b.url?(h=document.createElement("a"),h.href=b.url,h.target="_blank",h.innerHTML=this.Va(b.text),h.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(h)):(h=document.createElement("span"),h.innerHTML=this.Va(b.text),h.setAttribute("style","color: black; text-decoration: none;"),n.appendChild(h));m.appendChild(n)}0<c.Zh.length&&(!c.J.kg||c.J.kh||c.J.lh&&c.rf()||c.J.Vi)&&m.appendChild(document.createElement("hr"));if(c.J.Vi&&c.oa){b=
[];b.push({text:this.Va("Rectilinear Projection"),ii:4});b.push({text:this.Va("Stereographic Projection"),ii:9});b.push({text:this.Va("Fisheye Projection"),ii:12});for(a=0;a<b.length;a++){n=b[a];var q=document.createElement("div");q.setAttribute("class","gg_context_row");h="text-align: left;";h+="margin: 0;";h=c.Z()==n.ii?h+"padding: 5px 20px 5px 7px;":h+"padding: 5px 20px;";h+="vertical-align: left;";h+="cursor: pointer;";q.setAttribute("style",h);q.onclick=function(r){return function(){c.Ek(r,1);
c.update()}}(n.ii);q.innerHTML=c.Z()==n.ii?"&#10687; "+n.text:n.text;m.appendChild(q)}(!c.J.kg||c.J.kh||c.J.lh&&c.rf())&&m.appendChild(document.createElement("hr"))}c.J.kh&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",h+="cursor: pointer;",a.setAttribute("style",h),a.onclick=function(){c.fk()},a.innerHTML=c.Mh()?this.Va("Exit Fullscreen"):this.Va("Enter Fullscreen"),m.appendChild(a));c.J.lh&&
c.rf()&&(a=document.createElement("div"),a.setAttribute("class","gg_context_row"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",h+="cursor: pointer;",a.setAttribute("style",h),a.onclick=function(){c.Yf()},a.innerHTML="Enter VR",m.appendChild(a));c.J.kg||(a=document.createElement("div"),h="text-align: left;margin: 0;padding: 5px 20px;",h+="vertical-align: left;",a.setAttribute("style",h),a.setAttribute("class","gg_context_row"),h=document.createElement("a"),h.href=e.ph("aHR0cDovL3Bhbm8ydnIuY29tLw=="),
h.target="_blank",h.innerHTML=e.ph("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),7<this.Bj.length&&(h.innerHTML+="<br/>"+e.Cn(this.Bj).replace(/./gm,function(r){return"&#"+r.charCodeAt(0)+";"})),h.setAttribute("style","color: black; text-decoration: none;"),a.appendChild(h),m.appendChild(a));c.$.insertBefore(c.zd,c.$.firstChild);m.onclick=function(){c.zd&&(c.$.removeChild(c.zd),c.zd=null)};m.oncontextmenu=m.onclick}};e.prototype.Vq=function(){var a=this;var b=a.Ia;a.control=b;a.control=b;setTimeout(function(){a.di()},
10);setTimeout(function(){a.kp()},200);setTimeout(function(){a.le();a.Hi()},10);b.addEventListener&&(b.addEventListener("touchstart",function(c){a.Zu(c)},!1),b.addEventListener("touchmove",function(c){a.Yu(c)},!1),b.addEventListener("touchend",function(c){a.Xu(c)},!1),b.addEventListener("touchcancel",function(c){a.Wu(c)},!1),b.addEventListener("pointerdown",function(c){a.Yo(c)},!1),b.addEventListener("MSPointerDown",function(c){a.Yo(c)},!1),b.addEventListener("MSGestureStart",function(c){a.Xn(c)},
!1),b.addEventListener("MSGestureEnd",function(c){a.Wn(c)},!1),b.addEventListener("MSGestureChange",function(c){a.kt(c)},!1),b.addEventListener("gesturestart",function(c){a.Xn(c)},!1),b.addEventListener("gesturechange",function(c){a.Ar(c)},!1),b.addEventListener("gestureend",function(c){a.Wn(c)},!1),b.addEventListener("mousedown",function(c){a.ht(c)},!1),b.addEventListener("mousemove",function(c){a.gt(c)},!1),document.addEventListener("mouseup",function(c){a.ft(c)},!1),b.addEventListener("mousewheel",
function(c){a.Xo(c)},!1),b.addEventListener("DOMMouseScroll",function(c){a.Xo(c)},!1),document.addEventListener("keydown",function(c){a.Ws(c)},!1),document.addEventListener("keyup",function(c){a.Xs(c)},!1),window.addEventListener("resize",function(){a.le()},!1),a.mc.addEventListener("resize",function(){a.le()},!1),window.addEventListener("blur",function(){a.rt()},!1),a.$.addEventListener("webkitfullscreenchange",function(){a.ci()},!1),document.addEventListener("mozfullscreenchange",function(){a.ci()},
!1),window.addEventListener("webkitfullscreenchange",function(){a.ci()},!1),document.addEventListener("MSFullscreenChange",function(){a.ci()},!1),document.addEventListener("fullscreenchange",function(){a.ci()},!1));b.oncontextmenu=function(c){void 0===c&&(c=window.event);return c.target&&!a.Kc(c.target)?!0:c.ctrlKey?!0:(c=a.xe(c),a.Cu(c.x,c.y),!1)};window.addEventListener("deviceorientation",function(c){a.xt(c.alpha,c.beta,c.gamma,c.absolute);null!=c.alpha&&null!=c.beta&&null!=c.gamma&&0==a.pl&&(a.pl=
!0,a.I("gyroavailable",{available:!0}),a.I("playerstatechanged",{}))})};e.prototype.Zm=function(){for(var a=0;a<this.K.length;a++)if("point"==this.K[a].type&&(this.ha&&this.ha.addSkinHotspot?(this.K[a].$f(),this.K[a].j=this.ha.addSkinHotspot(this.K[a])):(this.K[a].j=new y.zq(this,this.K[a]),this.K[a].hd&&this.K[a].Kf&&(this.K[a].j.ggUse3d=!0,this.K[a].j.gg3dDistance=this.K[a].Zi)),this.K[a].j.__div.style.left="-1000px",this.K[a].j.__div.style.top="-1000px",this.K[a].j&&this.K[a].j.__div)){var b=this.Ia.firstChild;
b?this.Ia.insertBefore(this.K[a].j.__div,b):this.Ia.appendChild(this.K[a].j.__div)}};e.prototype.ar=function(){if(!this.ha||!this.ha.addSkinHotspot)for(var a=0;a<this.K.length;a++)"point"==this.K[a].type&&this.K[a].j&&this.K[a].j.Hs()};e.prototype.br=function(){for(var a=0;a<this.Xa.length;a++)this.Xa[a].Td();for(a=0;a<this.Ub.length;a++)this.Ub[a].Td();for(a=0;a<this.X.length;a++)this.X[a].Td();for(a=0;a<this.U.length;a++)this.U[a].Td()};e.prototype.Sm=function(){var a,b=document.createElement("fakeelement"),
c={OTransition:"oTransitionEnd",MSTransition:"msTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd",transition:"transitionEnd"};for(a in c)if(void 0!==b.style[a])return c[a]};e.prototype.Wa=function(a){var b=[];a="#"==a.substr(0,1)?a.substr(1):"^"+a+"$";a=new RegExp(a,"");for(var c=0;c<this.X.length;c++)a.test(this.X[c].id)&&b.push(this.X[c]);for(c=0;c<this.U.length;c++)a.test(this.U[c].id)&&b.push(this.U[c]);for(c=0;c<this.Xa.length;c++)a.test(this.Xa[c].id)&&b.push(this.Xa[c]);
for(c=0;c<this.Ub.length;c++)a.test(this.Ub[c].id)&&b.push(this.Ub[c]);return b};e.prototype.Zr=function(a){if("_videopanorama"==a)return this.A.j;a=this.Wa(a);return 0<a.length?a[0].j:null};e.prototype.Yr=function(a){a=this.Wa(a);return 0<a.length&&a[0].ua?a[0]:null};e.prototype.rp=function(a,b){var c=this;b.addEventListener("ended",function(m){c.I("videoended",{video:m.target})});b.addEventListener("pause",function(m){c.I("videopaused",{video:m.target})});b.addEventListener("play",function(m){c.I("videostarted",
{video:m.target})});for(var h=0;h<this.U.length;h++)if(this.U[h].id==a)return this.U[h].j=b,this.U[h];h=new y.Ym(this);h.registerElement(a,b);return h};e.prototype.isPlaying=function(a){if("_main"===a)return!0;a=this.Wa(a);return 0<a.length?a[0].ua?a[0].vg:!a[0].j.ended&&!a[0].j.paused:!1};e.prototype.be=function(a,b){var c=this,h=null,m=this;this.G("Play Sound: "+a+" loop:"+b);this.G("playerMuted: "+this.Xc);if(!this.Xc)try{for(var n=this.Wa(a),q=0;q<n.length;q++){var r=n[q];if(r instanceof y.ne){r.tb=
b&&!isNaN(Number(b))?Number(b)-1:r.loop-1;-1==r.tb&&(r.tb=1E7);this.G(r.j);this.isPlaying(a)&&this.$j(a);if(r.ua)r.Sd();else{h=r.j.play();if(void 0!==h)h.then(function(){c.Bg(!0);c.G("Sound permitted! "+m.ga.state)})["catch"](function(t){c.G(t);c.Bg(!1)});r.Pd&&(this.G("waitingForWebAudioNodesToBeAdded?"),r.Ve())}this.ti(r.id,!1)}}}catch(t){this.G(t)}return h};e.prototype.mp=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];this.isPlaying(h.id)?this.ei(h.id):this.be(h.id,b)}};e.prototype.Mt=
function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];h instanceof y.ne&&(this.isPlaying(h.id)?this.$j(h.id):this.be(h.id,b))}};e.prototype.ei=function(a){try{var b=void 0;if("_main"==a){this.ti(a,!0);for(b=0;b<this.X.length;b++)this.X[b].ua?this.X[b].Ak():this.X[b].j.pause();for(b=0;b<this.U.length;b++)this.U[b].j.pause()}else{var c=this.Wa(a);for(b=0;b<c.length;b++){var h=c[b];h instanceof y.ne&&(this.ti(h.id,!0),h.ua?h.Ak():h.j.pause())}}}catch(m){this.G(m)}};e.prototype.Lq=function(a,
b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];0==b||1==b?h.pf&&h.pf(1==b):2==b&&h.Ae&&h.Ae();!h.Na||-1==this.Xa.indexOf(h)&&-1==this.U.indexOf(h)&&-1==this.Ub.indexOf(h)||(this.$b=this.Ke=h)}};e.prototype.$j=function(a){var b;this.G("Stop Sound: "+a);try{if("_main"===a){this.ti(a,!0);for(b=0;b<this.X.length;b++)this.X[b].ua?this.X[b].Rf():(this.X[b].j.pause(),this.X[b].j.currentTime=0);for(b=0;b<this.U.length;b++)this.U[b].j.pause(),this.U[b].j.currentTime=0}else{var c=this.Wa(a);for(b=0;b<
c.length;b++){var h=c[b];h instanceof y.ne&&(this.ti(h.id,!0),h.ua?h.Rf():h.j&&h.j.pause&&(h.j.pause(),h.j.currentTime=0))}}}catch(m){this.G(m)}};e.prototype.ti=function(a,b){a=this.Wa("_main"===a?".*":a);for(var c=0;c<a.length;c++)a[c].stopped=b};e.prototype.Gu=function(a){a=this.Wa(a);return 0<a.length?(a=a[0],a instanceof y.ne?a.ua?a.Yq():a.j?a.j.currentTime:0:0):0};e.prototype.Iu=function(a,b){a=this.Wa(a);for(var c=0;c<a.length;c++){var h=a[c];h instanceof y.ne&&(h.ua?(0>b&&(b=0),b>h.eh.duration&&
(b=h.eh.duration-.1),h.Zq(b)):h.j&&(0>b&&(b=0),b>h.j.duration&&(b=h.j.duration-.1),h.j.currentTime=b))}};e.prototype.Hu=function(a,b){a=this.Wa(a);0<a.length&&(a=a[0],a.j&&(a.j.playbackRate=b))};e.prototype.setVolume=function(a,b){try{var c=void 0,h=Number(b);1<h&&(h=1);0>h&&(h=0);"_videopanorama"===a&&this.A.j&&(this.A.j.volume=h,this.A.level=h);if("_main"===a){this.ba=h;for(c=0;c<this.X.length;c++)this.X[c].j.volume=this.X[c].level*this.ba;for(c=0;c<this.U.length;c++)this.U[c].j.volume=this.U[c].level*
this.ba;this.A.j&&(this.A.j.volume=this.ba*this.A.level)}else{var m=this.Wa(a);this.G(m);for(c=0;c<m.length;c++){var n=m[c];n.j&&null!=n.j.volume&&(n.j.volume=h*this.ba);n.level=h}}}catch(q){this.G(q)}};e.prototype.gr=function(a,b){try{var c=void 0,h=void 0;"_videopanorama"===a&&this.A.j&&(this.A.j.volume+=Number(b));if("_main"===a){c=this.ba;c+=Number(b);1<c&&(c=1);0>c&&(c=0);this.ba=c;for(h=0;h<this.X.length;h++)this.X[h].j.volume=this.X[h].level*this.ba;for(h=0;h<this.U.length;h++)this.U[h].j.volume=
this.U[h].level*this.ba;this.A.j&&(this.A.j.volume=this.ba*this.A.level)}else{var m=this.Wa(a);for(h=0;h<m.length;h++){var n=m[h];n instanceof y.ne&&(c=n.level,c+=Number(b),1<c&&(c=1),0>c&&(c=0),n.level=c,n.j&&null!=n.j.volume&&(n.j.volume=c*this.ba))}}}catch(q){this.G(q)}};e.prototype.lm=function(a,b){if("_main"===a||"_all"===a||"_videopanorama"===a)"_all"===a&&(b=(this.Xc=1==b||-1==b&&!this.Xc?!0:!1)?1:0),this.A.j&&(this.A.j.muted=-1==b?!this.A.j.muted:1==b);a=this.Wa("_main"===a||"_all"===a?".*":
a);for(var c=0;c<a.length;c++){var h=a[c];h.Lp&&h.Lp(b)}};e.prototype.nt=function(a){this.lm(a,1)};e.prototype.av=function(a){this.lm(a,0)};e.prototype.Uu=function(a){this.lm(a,-1)};e.prototype.Kr=function(){return this.Yd};e.prototype.Rs=function(){this.gn=document.createElement("audio");this.gn.src="./media/testsound.mp3"};e.prototype.Wp=function(){var a=this;this.ga&&"suspended"===this.ga.state&&this.ga.resume();var b=a.gn.play();if(void 0!==b)b.then(function(){a.Bg(!0)})["catch"](function(){a.Bg(!1)})};
e.prototype.Xp=function(){this.Yd&&1!=this.wi?this.Wp():this.ve=this.kf=!1};e.prototype.rs=function(){return this.wi};e.prototype.Bg=function(a){if(1!=this.wi){var b=a?1:0;this.wi!=b&&(this.wi=b,this.I("soundspermittedchanged",{permitted:a}))}};e.prototype.Lu=function(){var a=this;this.eg();this.ve&&setTimeout(function(){a.eg()},500)};e.prototype.Uj=function(a,b,c){a.j.style.opacity=0==b?1:0;a.j.style[this.bc]="opacity "+c+"ms";a.j.style.opacity=0==b?0:1};e.prototype.gu=function(a,b,c){function h(){var r=
m[q];if(!r.j)return"continue";0==b?(n.Uj(r,b,c),setTimeout(function(){0==r.j.style.opacity&&r.Hf(!1)},c+10),r.pc=!1):1==b?(n.Uj(r,b,c),r.Hf(!0),r.pc=!0):2==b&&("visible"==r.j.style.visibility?(n.Uj(r,0,c),setTimeout(function(){0==r.j.style.opacity&&r.Hf(!1)},c+10),r.pc=!1):(n.Uj(r,1,c),r.Hf(!0),r.pc=!0))}for(var m=this.Wa(a),n=this,q=0;q<m.length;q++)h()};e.prototype.$p=function(){var a=this;try{for(var b=this,c=!1,h=!1,m=0;m<this.X.length;m++){var n=this.X[m];if(-1!=n.loop&&!this.isPlaying(n.id)&&
!n.stopped){var q=void 0;this.ga&&this.Za.enabled&&4!=n.mode&&6!=n.mode&&!this.Xc?this.Za.zn?(n.ua?n.Sd():(q=n.j.play(),n.Pd&&n.Ve(),n.j.currentTime=0),n.wa=0,h=!0):c=!0:4==n.mode||6==n.mode||"_background"==n.id&&this.isPlaying(n.id)||this.Xc||(n.ua?n.Sd():(q=n.j.play(),n.j.currentTime&&(n.j.currentTime=0)));if(void 0!==q)q.then(function(){a.Bg(!0)})["catch"](function(){a.Bg(!1)})}}c&&setTimeout(function(){b.Za.Ou()},1E3*this.Za.Gb);h&&(this.Za.Ku=this.ga.currentTime,this.Za.Ju=setInterval(function(){b.Za.wr()},
10))}catch(r){this.G(r)}};e.prototype.Ln=function(){for(var a=0;a<this.Za.Gi.length;a++)this.Za.Kn(this.Za.Gi[a])};e.prototype.wp=function(){if(this.P&&this.P!=this.fb&&this.P.div&&this.P.div.onmouseout)this.P.div.onmouseout();for(var a;0<this.K.length;)a=this.K.pop(),a.j&&(this.Ia.removeChild(a.j.__div),delete a.j),a.j=null;this.L.Ca=0;this.L.kb=0;this.I("hotspotsremoved",{})};e.prototype.nm=function(a){this.Mf=a;this.$.style.zIndex=0!=a?a.toString():"auto";this.Qa&&this.Qa.vd&&(this.Qa.vd.zIndex=
(a+4).toString());this.Ia.style.zIndex=(a+4).toString();this.sb.style.zIndex=(a+3).toString();this.Fa.style.zIndex=(a+5).toString();for(var b=0;b<this.nj();b++){var c=b<this.U.length?this.U[b]:this.Xa[b-this.U.length];c.j&&(c.j.style.zIndex=(a+(c.Na?8E4:0)).toString())}};e.prototype.Sj=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.kk)try{this.$.webkitRequestFullScreen?this.$.webkitRequestFullScreen():this.$.mozRequestFullScreen?
this.$.mozRequestFullScreen():this.$.msRequestFullscreen?this.$.msRequestFullscreen():this.$.requestFullScreen?this.$.requestFullScreen():this.$.requestFullscreen&&this.$.requestFullscreen()}catch(c){this.G(c)}this.$.style.position="absolute";a=this.Eh();this.$.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.$.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.nm(10);document.body.style.overflow="hidden";b&&(this.va&&this.va.ggEnterFullscreen&&this.va.ggEnterFullscreen(),this.I("fullscreenenter",
{}),this.I("playerstatechanged",{}))}else{if(this.kk)try{document.webkitIsFullScreen?document.webkitCancelFullScreen():document.mozFullScreen?document.mozCancelFullScreen():document.msExitFullscreen?document.msExitFullscreen():document.fullScreen&&(document.cancelFullScreen?document.cancelFullScreen():document.exitFullscreen&&document.exitFullscreen())}catch(c){this.G(c)}this.$.style.position="relative";this.$.style.left="0px";this.$.style.top="0px";this.nm(0);document.body.style.overflow="";b&&(this.va&&
this.va.ggExitFullscreen&&this.va.ggExitFullscreen(),this.I("fullscreenexit",{}),this.I("playerstatechanged",{}))}this.le()};e.prototype.fk=function(){this.Sj(!this.isFullscreen)};e.prototype.tr=function(){this.Sj(!0)};e.prototype.exitFullscreen=function(){this.Sj(!1)};e.prototype.Or=function(){return this.isFullscreen};e.prototype.Yf=function(){this.Da.lr();this.zp();this.Da.Yf();this.Da.zt();return!0};e.prototype.xs=function(){return"N/A"};e.prototype.ws=function(){if(this.Da)return this.Da.mg()?
this.Da.Om:this.Da.camera};e.prototype.ys=function(){if(this.Da)return this.Da.Sa};e.prototype.vu=function(a){this.Da&&(this.Da.fg=a)};e.prototype.Zf=function(){this.Da&&(this.Da.Zf(),this.Da.Ef(),this.Da.Ik());return!0};e.prototype.gq=function(){this.Da&&(this.Da.mg()?this.Zf():this.Yf());return!0};e.prototype.mg=function(){return this.Da&&this.Da.mg()?!0:!1};e.prototype.rf=function(){return this.Da&&this.Da.rf()?!0:!1};e.prototype.kl=function(){return this.Da?this.Da.kl():!1};e.prototype.Mu=function(a,
b,c){this.v.Rd=this.v.Pi;this.v.sd=this.v.Sg;this.v.enabled=!0;this.v.Of=this.v.enabled;this.v.active=!0;this.v.md=0;var h=new Date;this.v.Hd=0;this.v.startTime=h.getTime();void 0!==a&&0!=a&&(this.v.speed=a);void 0!==b&&(this.v.timeout=b);void 0!==c&&(this.v.ek=c);this.I("autorotatechanged",{})};e.prototype.Pu=function(){this.v.active=!1;this.v.enabled=!1;this.v.Of=this.v.enabled;this.Xe=this.v.Dj=!1;this.F.active&&this.F.sg&&(this.F.active=!1,this.F.sg=!1,this.F.pb=0);this.I("autorotatechanged",
{})};e.prototype.Tu=function(){this.v.enabled=!this.v.active;this.v.Of=this.v.enabled;this.v.active=this.v.enabled;this.v.md=0;if(this.v.enabled){var a=new Date;this.v.Hd=0;this.v.startTime=a.getTime();this.v.Rd=this.v.Pi;this.v.sd=this.v.Sg}this.I("autorotatechanged",{})};e.prototype.Lt=function(){this.na(!1)};e.prototype.Ut=function(){this.v.enabled&&(this.v.active=!0,this.v.md=0)};e.prototype.$t=function(a){this.v.tg=a;this.v.bp=!0};e.prototype.Vp=function(a){this.Ea.running&&this.Fp();this.xc=
"";a&&""!=a&&(this.v.Rd=a);this.v.Of=this.v.enabled;this.v.sd=!0;this.v.enabled=!0;this.v.active=!0;this.v.md=0;this.D.ke&&(this.D.Ze=!0,this.D.pe=!0);a=new Date;this.v.Hd=0;this.v.startTime=a.getTime();this.I("autorotatechanged",{})};e.prototype.Tt=function(a){a&&""!=a&&this.v.Rd!=a||0==this.v.Hd?this.Vp(a):(this.v.sd=!0,this.v.enabled=!0,this.v.active=!0,this.I("autorotatechanged",{}))};e.prototype.Fp=function(){this.Ea.running=!1;this.Ea.finished=!0;this.v.active=this.D.pe;this.v.sd=this.D.Ze;
this.xa.splice(this.xa.indexOf(this.R),1);0<this.xa.length&&(this.R=this.xa[0]);this.xc="";this.Tj(!1);this.D.pe=!1;this.D.Ze=!1;this.og=(new Date).getTime()};e.prototype.rn=function(a){if(this.mc=document.getElementById(a))return this.mc.innerHTML="",!0;alert("container not found!");return!1};e.prototype.bu=function(a){var b=this;b.mc.removeEventListener("resize",function(){b.le()});b.rn(a)&&(b.mc.appendChild(b.$),b.mc.addEventListener("resize",function(){b.le()},!1))};e.prototype.yn=function(a){this.rn(a)&&
(this.$=document.createElement("div"),this.$.onselectstart=function(){return!1},Y&&this.$.setAttribute("id","viewport"),this.$.setAttribute("role","application"),a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+(this.lb+"user-select: none;"),this.$.setAttribute("style",a),this.mc.appendChild(this.$),this.ea=document.createElement("div"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+
(this.lb+"user-select: none;"),Y&&this.ea.setAttribute("id","viewer"),this.ea.setAttribute("style",a),this.$.appendChild(this.ea),this.Qa&&(this.Qa.vd=document.createElement("canvas"),Y&&this.Qa.vd.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.lb+"user-select: none;"),a+=this.lb+"pointer-events: none;",this.Qa.vd.setAttribute("style",a),this.$.appendChild(this.Qa.vd)),this.Ia=document.createElement("div"),Y&&this.Ia.setAttribute("id",
"hotspots"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;",this.yl&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);"),this.Sc&&!this.oa&&(a+=this.lb+"transform: translateZ(9999999px);"),a+=this.lb+"user-select: none;",this.Ia.setAttribute("style",a),this.$.appendChild(this.Ia),this.sb=document.createElement("canvas"),Y&&this.sb.setAttribute("id","hotspotcanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+
(this.lb+"user-select: none;"),a+=this.lb+"pointer-events: none;",this.sb.setAttribute("style",a),this.$.appendChild(this.sb),this.Fa=document.createElement("div"),Y&&this.Fa.setAttribute("id","hotspottext"),this.Fa.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;"),this.Fa.classList.add("ggskin"),this.Fa.classList.add("ggdefaulthotspot"),this.Fa.innerHTML=" Hotspot text!",this.$.appendChild(this.Fa),this.divSkin=this.va=this.Ia,this.nm(0))};e.prototype.Ef=
function(){var a;this.la.ia.x=0;this.la.ia.y=0;this.sa.Ef();var b=[];for(a=0;a<this.U.length;a++){var c=this.U[a];c.pd?b.push(c):c.Me()}for(a=0;a<this.Xa.length;a++)this.Xa[a].Me();for(a=0;a<this.Ub.length;a++)this.Ub[a].Me();this.L.Qh=-1;this.sb.style.visibility="hidden";this.Kd=0;this.If=[];this.Za.Gi=[];for(a=0;a<this.X.length;a++)c=this.X[a],c.ap||7>this.gd&&0==c.mode||this.If.push(c);this.U=b;this.Xa=[];this.Ub=[];this.A.j&&(this.$.removeChild(this.A.j),this.A.j=null,a=this.Wa("_videopanorama"),
0<a.length&&(a[0].j=null));this.A.Tc=!1;this.A.ng=!1};e.prototype.to=function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{w:screen.width*a,h:screen.height*a}};e.prototype.ko=function(){var a=this.to();return a.w>a.h?a.w:a.h};e.prototype.Wl=function(a,b){a=(new DOMParser).parseFromString(a,"text/xml");this.qp(a,b)};e.prototype.pp=function(a,b,c){try{var h=void 0;h=new XMLHttpRequest;h.open("GET",a,!1);h.send(null);if(h.responseXML){var m=
a.lastIndexOf("/");0<=m&&(this.qe=a.slice(0,m+1));2<=arguments.length&&null!=b&&(this.qe=b);this.Wl(h.responseText,c)}else alert("Error loading panorama XML")}catch(n){alert("Error:"+n)}};e.prototype.Ot=function(a,b,c,h){var m=new XMLHttpRequest;var n=this;m.onload=function(q){if(4<=m.readyState)if(m.responseXML){var r=a.lastIndexOf("/");0<=r&&(n.qe=a.slice(0,r+1));3<=arguments.length&&null!=c&&(n.qe=c);n.Wl(m.responseText,h);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+
m.statusText)};m.onerror=function(){console.error("Error loading XML:"+m.statusText)};m.open("GET",a,!0);m.send(null)};e.prototype.Ck=function(a){var b="";"{"==a.charAt(0)&&(b=a.slice(1,a.length-1));(a=this.se[b])&&(b=a);a={oldNodeId:this.ra,nodeId:b};this.I("beforechangenodeid",a);this.nl?this.nl=!1:this.Ll.push(this.ra);""!=this.ra&&-1==this.nk.indexOf(this.ra)&&(this.nk.push(this.ra),this.I("changevisitednodes",{}));this.Po=this.ra;this.ra=b;this.G("change active node: "+b);this.ha&&this.ha.changeActiveNode&&
this.ha.changeActiveNode("{"+b+"}");this.I("changenodeid",a);this.kf=!0};e.prototype.ej=function(){return this.ra};e.prototype.bs=function(a){return 0<this.$a.length?(a||(a=this.ra),a=this.$a.indexOf(a),a++,a>=this.$a.length&&(a=0),this.$a[a]):""};e.prototype.os=function(a){return 0<this.$a.length?(a||(a=this.ra),a=this.$a.indexOf(a),a--,0>a&&(a=this.$a.length-1),this.$a[a]):""};e.prototype.Tr=function(){return this.Po};e.prototype.ss=function(){return this.hc};e.prototype.pt=function(a){return-1!=
this.nk.indexOf(a)};e.prototype.ir=function(){this.nk=[];this.I("changevisitednodes",{})};e.prototype.qp=function(a,b){a=a.firstChild;this.Ue=[];this.$a=[];this.se=[];this.Yd=!1;var c;if(c=a.getAttributeNode("appversion")){if(c=c.nodeValue.toString().match(/(\d+)\.(\d+)\.?(\d+)?/))this.tn=[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3]||"0",10)];this.G(this.tn)}for(var h=a.firstChild;h;){if("map"==h.nodeName){var m={};(c=h.getAttributeNode("index"))&&(m.index=Number(c.nodeValue));(c=h.getAttributeNode("title"))&&
(m.title=c.nodeValue.toString());c=h.getAttributeNode("type");m.type=c.nodeValue.toString();"web"==m.type?(c=h.getAttributeNode("mapprovider"),m.mapprovider=c.nodeValue.toString(),(c=h.getAttributeNode("mapstyle"))&&(m.mapstyle=c.nodeValue.toString()),(c=h.getAttributeNode("googlecustomstylecode"))&&(m.googlecustomstylecode=c.nodeValue.toString()),(c=h.getAttributeNode("mapurltemplate"))&&(m.mapurltemplate=c.nodeValue.toString()),(c=h.getAttributeNode("mapmaxzoom"))&&(m.mapmaxzoom=Number(c.nodeValue)),
(c=h.getAttributeNode("customlayernames"))&&(m.customlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayerurltemplates"))&&(m.customlayerurltemplates=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("customlayermaxzooms"))&&(m.customlayermaxzooms=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapkey"))&&(m.mapkey=c.nodeValue.toString()),(c=h.getAttributeNode("styleurl"))&&(m.styleurl=c.nodeValue.toString()),(c=h.getAttributeNode("mapboxlayernames"))&&
(m.mapboxlayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("mapboxlayerstyleurls"))&&(m.mapboxlayerstyleurls=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayernames"))&&(m.googlelayernames=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("googlelayerstyles"))&&(m.googlelayerstyles=c.nodeValue.toString().split("|")),(c=h.getAttributeNode("maplimits"))&&(m.maplimits=c.nodeValue.toString().split("|"))):(c=h.getAttributeNode("width"),m.width=Number(c.nodeValue),
c=h.getAttributeNode("height"),m.height=Number(c.nodeValue),c=h.getAttributeNode("zoomlevels"),m.zoomlevels=Number(c.nodeValue),c=h.getAttributeNode("tileformat"),m.tileformat=c.nodeValue.toString(),c=h.getAttributeNode("bgcolor"),m.bgcolor=c.nodeValue.toString(),c=h.getAttributeNode("crispedges"),m.crispedges=1==c.nodeValue,c=h.getAttributeNode("transparent"),m.transparent=1==c.nodeValue,c=h.getAttributeNode("floorplannorth"),m.floorplannorth=Number(c.nodeValue));c=h.getAttributeNode("id");this.sc[c.nodeValue.toString()]=
m}h=h.nextSibling}if("tour"==a.nodeName){this.Gd=!0;if(c=a.getAttributeNode("start"))this.hc=c.nodeValue.toString();this.hasOwnProperty("startNode")&&this.startNode&&(this.hc=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="");h=a.firstChild;for(a=m="";h;){if("panorama"==h.nodeName){if(c=h.getAttributeNode("id"))m=c.nodeValue.toString(),
""==this.hc&&(this.hc=m),""==a&&(a=m),this.Ue[m]=h,this.$a.push(m);for(c=h.firstChild;c;){if("userdata"==c.nodeName){var n=this.ag(c);this.Ug[m]=n;m==this.hc&&(this.Ug._first=n);n.customnodeid&&(this.se[n.customnodeid]=m);this.Vc[m]=this.Hn(c);this.qg[m]=this.In(c);this.Lf[m]=this.Jn(c)}if("hotspots"==c.nodeName)for(n=c.firstChild;n;)"hotspot"!=n.nodeName&&"polyhotspot"!=n.nodeName||this.Wk(m,c),n=n.nextSibling;if("sounds"==c.nodeName||"media"==c.nodeName)for(n=c.firstChild;n;){"sound"!=n.nodeName||
this.Kl||(this.Yd=!0);if("video"==n.nodeName){var q;(q=n.getAttributeNode("level"))&&0<Number(q.nodeValue)&&(this.Yd=!0)}n=n.nextSibling}c=c.nextSibling}}if("masternode"==h.nodeName)for(c=h.firstChild;c;){"userdata"==c.nodeName&&(n=this.ag(c),this.Ug._master=n);"animationsequences"==c.nodeName&&this.ur(c);if("translations"==c.nodeName){(q=c.getAttributeNode("json"))&&this.$g(q.nodeValue.toString());for(n=c.firstChild;n;){"json"==n.nodeName&&this.$g(n.textContent);if("projecttranslation"==n.nodeName){var r=
{};if(q=n.getAttributeNode("langcode"))r.langCode=q.nodeValue;if(q=n.getAttributeNode("langname"))r.langName=q.nodeValue;this.Sl.push(r)}n=n.nextSibling}this.Cl||this.km(window.navigator.language)}c=c.nextSibling}"customproperty"==h.nodeName&&this.Gn(h);h=h.nextSibling}!this.Ue.hasOwnProperty(this.hc)&&(h=this.se[this.hc])&&(this.hc=h);this.Ue.hasOwnProperty(this.hc)||(this.Uc("Start node "+this.hc+" not found!"),this.hc=a);this.Vl(this.Ue[this.hc],b);this.Ck("{"+this.hc+"}");this.ra=this.hc}else this.Gd=
!1,this.Vl(a,b),this.Ck(""),this.$a.push("");this.me&&(this.G("add pano vr config"),this.Da.Ni());this.Yd&&(this.Rs(),this.Wp());this.I("configloaded",{});this.I("changenode",{});this.I("playerstatechanged",{})};e.prototype.Vl=function(a,b){var c=this;this.wp();this.Qa&&this.Qa.Qt();this.Oe(this.fb);this.Ef();this.mk=0;for(var h=a.firstChild,m,n,q=0,r=this.M.N;h;){if("view"==h.nodeName){if(m=h.getAttributeNode("fovmode"))this.fov.mode=Number(m.nodeValue);m=h.getAttributeNode("pannorth");this.pan.Hj=
1*(m?m.nodeValue:0);for(var t=h.firstChild;t;){"start"==t.nodeName&&(m=t.getAttributeNode("pan"),this.pan.m=Number(m?m.nodeValue:0),this.pan.Ha=this.pan.m,m=t.getAttributeNode("tilt"),this.u.m=Number(m?m.nodeValue:0),this.u.Ha=this.u.m,m=t.getAttributeNode("roll"),this.W.m=Number(m?m.nodeValue:0),this.W.Ha=this.W.m,m=t.getAttributeNode("fov"),this.fov.m=Number(m?m.nodeValue:70),this.fov.Ha=this.fov.m,m=t.getAttributeNode("projection"),this.M.ip=Number(m?m.nodeValue:4),this.rb(this.Dh()));"min"==t.nodeName&&
(m=t.getAttributeNode("pan"),this.pan.min=1*(m?m.nodeValue:0),m=t.getAttributeNode("tilt"),this.u.min=1*(m?m.nodeValue:-90),m=t.getAttributeNode("fov"),this.fov.min=1*(m?m.nodeValue:5),1E-20>this.fov.min&&(this.fov.min=1E-20),m=t.getAttributeNode("fovpixel"),this.fov.$h=1*(m?m.nodeValue:0));if("max"==t.nodeName){m=t.getAttributeNode("pan");this.pan.max=1*(m?m.nodeValue:0);m=t.getAttributeNode("tilt");this.u.max=1*(m?m.nodeValue:90);m=t.getAttributeNode("fov");this.fov.max=1*(m?m.nodeValue:120);180<=
this.fov.max&&(this.fov.max=179.9);if(m=t.getAttributeNode("fovstereographic"))this.fov.Jl=1*m.nodeValue;if(m=t.getAttributeNode("fovfisheye"))this.fov.Il=1*m.nodeValue;if(m=t.getAttributeNode("scaletofit"))this.J.Dp=1==m.nodeValue}if("flyin"==t.nodeName){if(m=t.getAttributeNode("projection"))this.oc.pb=Number(m.nodeValue);if(m=t.getAttributeNode("pan"))this.oc.pan=parseFloat(m.nodeValue);if(m=t.getAttributeNode("tilt"))this.oc.u=parseFloat(m.nodeValue);if(m=t.getAttributeNode("fov"))this.oc.fov=
parseFloat(m.nodeValue)}t=t.nextSibling}}if("autorotate"==h.nodeName){if(m=h.getAttributeNode("speed"))this.v.speed=1*m.nodeValue;if(m=h.getAttributeNode("delay"))this.v.timeout=1*m.nodeValue;if(m=h.getAttributeNode("returntohorizon"))this.v.ek=1*m.nodeValue;if(m=h.getAttributeNode("horizonfromdefview"))this.v.Bo=1==m.nodeValue;if(m=h.getAttributeNode("nodedelay"))this.v.Gj=1*m.nodeValue;if(m=h.getAttributeNode("noderandom"))this.v.cp=1==m.nodeValue;(m=h.getAttributeNode("nodefilter"))&&!this.v.bp&&
(this.v.tg=m.nodeValue);this.Cd&&(this.v.enabled=!0,this.v.Of=!0,this.v.active=!1);(m=h.getAttributeNode("startloaded"))&&this.Cd&&(this.v.Eg=1==m.nodeValue,this.v.Eg&&(this.v.active=!1));if(m=h.getAttributeNode("useanimation"))this.v.Sg=1==m.nodeValue,this.v.sd=this.v.Sg;if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.xm=1==m.nodeValue}if("animation"==h.nodeName){if(m=h.getAttributeNode("syncanimationwithvideo"))this.v.xm=1==m.nodeValue;if(m=h.getAttributeNode("useinautorotation"))this.v.Sg=
1==m.nodeValue;if(m=h.getAttributeNode("animsequence"))this.v.Pi=m.nodeValue,this.Cd&&(this.v.Rd=this.v.Pi);if(m=h.getAttributeNode("clipsrandom"))this.v.sn=1==m.nodeValue;this.xa=[];for(t=h.firstChild;t;){if("clip"==t.nodeName){this.R=new y.Um;if(m=t.getAttributeNode("animtitle"))this.R.Ye=m.nodeValue.toString();if(m=t.getAttributeNode("cliptitle"))this.R.cb=m.nodeValue.toString();if(m=t.getAttributeNode("nodeid"))this.R.Ev=m.nodeValue.toString();if(m=t.getAttributeNode("length"))this.R.length=Number(m.nodeValue);
if(m=t.getAttributeNode("animtype"))this.R.Sq=Number(m.nodeValue);if(m=t.getAttributeNode("nextcliptitle"))this.R.$o=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipnodeid"))this.R.Zo=m.nodeValue.toString();if(m=t.getAttributeNode("nextclipstartview"))this.R.ot=m.nodeValue.toString();if(m=t.getAttributeNode("transitiontype"))this.R.$u=Number(m.nodeValue);var w=t.firstChild;for(this.R.Ja=[];w;){if("keyframe"==w.nodeName){var z=new y.fd;if(m=w.getAttributeNode("time"))z.time=Number(m.nodeValue);
if(m=w.getAttributeNode("value"))z.value=Number(m.nodeValue);if(m=w.getAttributeNode("valuestring"))z.Mm=m.nodeValue.toString();if(m=w.getAttributeNode("transitiontime"))z.Gb=Number(m.nodeValue);m=w.getAttributeNode("type");var A=0;m&&(z.type=Number(m.nodeValue),A=Number(m.nodeValue));if(m=w.getAttributeNode("property"))z.qb=Number(m.nodeValue);if(m=w.getAttributeNode("additionaltrackid"))z.td=m.nodeValue.toString();if(m=w.getAttributeNode("additionaltracktype"))z.$m=Number(m.nodeValue);if(1==A||
2==A){if(m=w.getAttributeNode("bezierintime"))z.$e=Number(m.nodeValue);if(m=w.getAttributeNode("bezierinvalue"))z.af=Number(m.nodeValue);if(m=w.getAttributeNode("bezierouttime"))z.bf=Number(m.nodeValue);if(m=w.getAttributeNode("bezieroutvalue"))z.cf=Number(m.nodeValue)}this.R.Ja.push(z)}w=w.nextSibling}this.xa.push(this.R);"__VideoPano"==this.R.cb&&(this.mk=this.R)}t=t.nextSibling}}"input"==h.nodeName&&(n||(n=h));if(n)for(w=0;6>w;w++)m=n.getAttributeNode("prev"+w+"url"),this.nh[w]=m?String(m.nodeValue):
"";"altinput"==h.nodeName&&(t=0,(m=h.getAttributeNode("screensize"))&&(t=1*m.nodeValue),0<t&&t<=this.ko()&&t>q&&(q=t,n=h));if("control"==h.nodeName&&this.Cd){if(m=h.getAttributeNode("simulatemass"))this.la.enabled=1==m.nodeValue;if(m=h.getAttributeNode("rubberband"))this.J.Cp=1==m.nodeValue;if(m=h.getAttributeNode("zoomcentercursor"))this.J.Nf=1==m.nodeValue;if(m=h.getAttributeNode("locked"))this.J.rc=1==m.nodeValue;m&&(this.J.Wh=1==m.nodeValue);if(m=h.getAttributeNode("lockedmouse"))this.J.rc=1==
m.nodeValue;if(m=h.getAttributeNode("lockedkeyboard"))this.J.Wh=1==m.nodeValue;if(m=h.getAttributeNode("lockedkeyboardzoom"))this.J.$s=1==m.nodeValue;if(m=h.getAttributeNode("lockedwheel"))this.J.Ge=1==m.nodeValue;if(m=h.getAttributeNode("invertwheel"))this.J.Fo=1==m.nodeValue;if(m=h.getAttributeNode("speedwheel"))this.J.sm=1*m.nodeValue;if(m=h.getAttributeNode("invertcontrol"))this.J.$d=1==m.nodeValue;if(m=h.getAttributeNode("sensitivity"))this.J.sensitivity=1*m.nodeValue,1>this.J.sensitivity&&(this.J.sensitivity=
1);if(m=h.getAttributeNode("dblclickfullscreen"))this.J.Rk=1==m.nodeValue;if(m=h.getAttributeNode("contextfullscreen"))this.J.kh=1==m.nodeValue;if(m=h.getAttributeNode("contextvr"))this.J.lh=1==m.nodeValue;if(m=h.getAttributeNode("contextprojections"))this.J.Vi=1==m.nodeValue;if(m=h.getAttributeNode("hideabout"))this.J.kg=1==m.nodeValue;for(t=h.firstChild;t;)"menulink"==t.nodeName&&(w={text:"",url:""},m=t.getAttributeNode("text"),w.text=m.nodeValue,m=t.getAttributeNode("url"),w.url=m.nodeValue,this.Zh.push(w)),
t=t.nextSibling}"vr"==h.nodeName&&this.Cd&&(m=h.getAttributeNode("toggleskinbutton"))&&(this.Da.Fn=1==m.nodeValue);if("transition"==h.nodeName&&this.Cd){if(m=h.getAttributeNode("enabled"))this.D.enabled=1==m.nodeValue;if(m=h.getAttributeNode("blendtime"))this.D.fh=1*m.nodeValue;if(m=h.getAttributeNode("blendcolor"))this.D.Pf=m.nodeValue.toString();if(m=h.getAttributeNode("type"))this.D.type=m.nodeValue.toString();if(m=h.getAttributeNode("delay"))this.D.delay=m.nodeValue.toString();if(m=h.getAttributeNode("softedge"))this.D.Zc=
1*m.nodeValue;if(m=h.getAttributeNode("zoomin"))this.D.da=1*m.nodeValue;if(m=h.getAttributeNode("zoomout"))this.D.ed=1*m.nodeValue;if(m=h.getAttributeNode("zoomfov"))this.D.tk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafterinfov"))this.D.rk=1*m.nodeValue;if(m=h.getAttributeNode("zoomafteroutfov"))this.D.sk=1*m.nodeValue;if(m=h.getAttributeNode("zoomspeed"))this.D.Yg=1*m.nodeValue;if(m=h.getAttributeNode("zoomoutpause"))this.D.Xg=1==m.nodeValue;"cut"==this.D.type&&(this.D.fh=0)}if("soundstransition"==
h.nodeName){if(m=h.getAttributeNode("enabled"))this.Za.enabled=1==m.nodeValue;if(m=h.getAttributeNode("transitiontime"))this.Za.Gb=1*m.nodeValue;if(m=h.getAttributeNode("crossfade"))this.Za.zn=1==m.nodeValue}if("flyintransition"==h.nodeName){if(m=h.getAttributeNode("enabled"))this.Ea.enabled=1==m.nodeValue&&this.oa;if(m=h.getAttributeNode("speed"))this.Ea.speed=1*m.nodeValue}"userdata"==h.nodeName&&(this.userdata=this.Tg=this.ag(h),this.Vc[a.id]||(this.Vc[a.id]=this.Hn(h),this.qg[a.id]=this.In(h),
this.Lf[a.id]=this.Jn(h)));"projectuserdata"==h.nodeName&&(this.Ug._master=this.ag(h));"customproperty"==h.nodeName&&this.Gn(h);if("translations"==h.nodeName)for((m=h.getAttributeNode("json"))&&this.$g(m.nodeValue.toString()),this.Cl||this.km(window.navigator.language),t=h.firstChild;t;){"json"==t.nodeName&&this.$g(t.textContent);if("projecttranslation"==t.nodeName){w={};if(m=t.getAttributeNode("langcode"))w.langCode=m.nodeValue;if(m=t.getAttributeNode("langname"))w.langName=m.nodeValue;this.Sl.push(w)}t=
t.nextSibling}if("hotspots"==h.nodeName){if(m=h.getAttributeNode("smoothmovement"))this.Tp=1==m.nodeValue;for(t=h.firstChild;t;){if("label"==t.nodeName&&this.Cd){w=this.L.ck;if(m=t.getAttributeNode("enabled"))w.enabled=1==m.nodeValue;if(m=t.getAttributeNode("width"))w.width=1*m.nodeValue;if(m=t.getAttributeNode("height"))w.height=1*m.nodeValue;if(m=t.getAttributeNode("textcolor"))w.dk=1*m.nodeValue;if(m=t.getAttributeNode("textalpha"))w.bk=1*m.nodeValue;if(m=t.getAttributeNode("background"))w.background=
1==m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))w.Vb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))w.Wb=1*m.nodeValue;if(m=t.getAttributeNode("border"))w.Qi=1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))w.Yb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))w.Xb=1*m.nodeValue;if(m=t.getAttributeNode("borderradius"))w.zk=1*m.nodeValue;if(m=t.getAttributeNode("wordwrap"))w.qk=1==m.nodeValue}if("polystyle"==t.nodeName&&this.Cd){if(m=t.getAttributeNode("mode"))this.L.mode=
1*m.nodeValue;if(m=t.getAttributeNode("bordercolor"))this.L.Yb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundcolor"))this.L.Wb=1*m.nodeValue;if(m=t.getAttributeNode("borderalpha"))this.L.Xb=1*m.nodeValue;if(m=t.getAttributeNode("backgroundalpha"))this.L.Vb=1*m.nodeValue;if(m=t.getAttributeNode("handcursor"))this.L.Ce=1==m.nodeValue}m=void 0;"hotspot"==t.nodeName&&(m=new y.Mi(this),m.type="point",m.yb(t),this.K.push(m),this.Wk(a.id,t));"polyhotspot"==t.nodeName&&(m=new y.Mi(this),m.type="poly",
m.yb(t),this.K.push(m),this.Wk(a.id,t));t=t.nextSibling}}if("sounds"==h.nodeName||"media"==h.nodeName)for(t=h.firstChild;t;){if("sound"==t.nodeName&&!this.Kl)for(this.Yd=!0,m=new y.ne(this),m.yb(t),m.addElement(),w=0;w<this.If.length;w++)m.id==this.If[w].id&&(this.If.splice(w,1),w--);"video"==t.nodeName&&(m=new y.Ym(this),m.yb(t),m.addElement(),0<m.level&&(this.Yd=!0));"image"==t.nodeName&&(m=new y.Gq(this),m.yb(t),m.addElement());"webelement"==t.nodeName&&(m=new y.Iq(this),m.yb(t),m.addElement());
"lensflare"==t.nodeName&&this.Qa&&(m=new y.Hq(this),m.yb(t),this.Qa.Vh.push(m));t=t.nextSibling}h=h.nextSibling}for(w=this.v.Hd=0;w<this.If.length;w++){a=this.If[w];if(this.ga&&this.Za.enabled&&this.isPlaying(a.id))this.Za.Gi.push(a);else{try{a.ua?a.Rf():a.j.pause()}catch(E){this.G(E)}a.Me()}this.X.splice(this.X.indexOf(a),1)}1!=this.D.da&&2!=this.D.da&&6!=this.D.da&&7!=this.D.da&&this.Ln();this.me||(this.nb.oi=!0);b&&("object"===typeof b&&null!==b?(b.hasOwnProperty("pan")&&this.ee(Number(b.pan)),
b.hasOwnProperty("tilt")&&this.fe(Number(b.tilt)),b.hasOwnProperty("projection")&&this.rb(Number(b.projection)),b.hasOwnProperty("fov")&&this.Ab(Number(b.fov))):""!=b&&(b=b.toString().split("/"),4<b.length&&this.rb(Number(b[4])),0<b.length&&(m=String(b[0]),"N"==m.charAt(0)?this.Vj(Number(m.substr(1))):"S"==m.charAt(0)?this.Vj(-180+Number(m.substr(1))):this.ee(Number(m))),1<b.length&&this.fe(Number(b[1])),2<b.length&&this.Ab(Number(b[2]))),this.pan.open=this.pan.m,this.Ea.Ad.pan=this.pan.m,this.Ea.Ad.u=
this.u.m,this.Ea.Ad.fov=this.fov.m,this.Ea.Ad.pb=this.Z(),this.Ea.Ad.pq=!0);if(n){m=n.getAttributeNode("stereo");this.Fd=!1;m&&1==m.nodeValue&&(this.Fd=!0);m=n.getAttributeNode("fliplr");this.Fg=!1;m&&1==m.nodeValue&&(this.Fg=!0);for(w=0;w<(this.Fd?12:6);w++)(m=n.getAttributeNode("tile"+w+"url"))&&(this.mh[w]=String(m.nodeValue));for(w=0;6>w;w++)(m=n.getAttributeNode("prev"+w+"url"))&&(this.nh[w]=String(m.nodeValue));if(m=n.getAttributeNode("tilevrurl"))this.Nk=String(m.nodeValue);if(m=n.getAttributeNode("tilesize"))this.Se=
1*m.nodeValue;m=n.getAttributeNode("canvassize");if(m=n.getAttributeNode("tilescale"))this.Kg=1*m.nodeValue;if(m=n.getAttributeNode("leveltileurl"))r.Gl=m.nodeValue;if(m=n.getAttributeNode("leveltilesize"))r.V=Number(m.nodeValue);if(m=n.getAttributeNode("levelbias"))r.To=Number(m.nodeValue);if(m=n.getAttributeNode("levelbiashidpi"))r.Uo=Number(m.nodeValue);m=n.getAttributeNode("overlap");this.Ya.W=0;this.Ya.pitch=0;m&&(r.ib=Number(m.nodeValue));if(m=n.getAttributeNode("levelingroll"))this.Ya.W=Number(m.nodeValue);
if(m=n.getAttributeNode("levelingpitch"))this.Ya.pitch=Number(m.nodeValue);this.Kd=0;(m=n.getAttributeNode("flat"))&&1==m.nodeValue&&(this.Kd=2);m=n.getAttributeNode("width");r.width=1*(m?m.nodeValue:1);m=n.getAttributeNode("height");r.height=1*(m?m.nodeValue:r.width);this.A.src=[];r.levels=[];for(t=n.firstChild;t;){if("preview"==t.nodeName){if(m=t.getAttributeNode("color"))r.Lj=m.nodeValue;if(m=t.getAttributeNode("strip"))r.op=1==m.nodeValue}if("video"==t.nodeName){if(m=t.getAttributeNode("format"))"3x2"==
m.nodeValue&&(this.A.format=14),"equirectangular"==m.nodeValue&&(this.A.format=1);if(m=t.getAttributeNode("flipy"))this.A.flipY=Number(m.nodeValue);if(m=t.getAttributeNode("startonload"))this.A.Yj=1==m.nodeValue;if(m=t.getAttributeNode("startmutedmobile"))this.A.tm=1==m.nodeValue;if(m=t.getAttributeNode("level"))this.A.level=Number(m.nodeValue);if(m=t.getAttributeNode("bleed"))this.A.df=Number(m.nodeValue);if(m=t.getAttributeNode("endaction"))this.A.ue=String(m.nodeValue);if(m=t.getAttributeNode("targetview"))this.A.ak=
String(m.nodeValue);if(m=t.getAttributeNode("width"))this.A.width=Number(m.nodeValue);if(m=t.getAttributeNode("height"))this.A.height=Number(m.nodeValue);for(w=t.firstChild;w;)"source"==w.nodeName&&(m=w.getAttributeNode("url"))&&this.A.src.push(m.nodeValue.toString()),w=w.nextSibling;0<this.A.src.length&&""!=this.A.src[0]&&0<this.A.level&&(this.Yd=!0)}if("level"==t.nodeName){n=new y.Xm;m=t.getAttributeNode("width");n.width=1*(m?m.nodeValue:1);m=t.getAttributeNode("height");n.height=1*(m?m.nodeValue:
n.width);if(m=t.getAttributeNode("preload"))n.cache=1==m.nodeValue;if(m=t.getAttributeNode("preview"))n.Df=1==m.nodeValue;n.Y=Math.floor((n.width+r.V-1)/r.V);n.ta=Math.floor((n.height+r.V-1)/r.V);r.levels.push(n)}t=t.nextSibling}r.Fl=r.levels.length}this.qf=!0;this.Pg&&(this.oa=this.Og=!1,this.Gc||(this.G("dummy rendering"),this.Gc=document.createElement("canvas"),this.Gc.width=100,this.Gc.height=100,this.Gc.id="dummycanvas",this.ea.appendChild(this.Gc)),this.ic());this.oa&&this.S&&(this.sa.Do(this.Kg),
this.sa.Eo());var F=this;0<r.levels.length&&r.op&&0==this.Kd&&(b=new Image,n=new y.Xm,n.Df=!0,n.cache=!0,n.Y=n.ta=0,n.height=n.width=0,r.levels.push(n),b.crossOrigin=this.crossOrigin,b.onload=this.sa.mt(b),b.setAttribute("src",this.M.Jg(6,r.Fl-1,0,0)));if(0<this.A.src.length&&this.oa)if(this.Ii){this.A.j=document.createElement("video");this.A.j.crossOrigin=this.crossOrigin;this.A.j.setAttribute("style","display:none; max-width:none;");this.A.j.setAttribute("playsinline","playsinline");this.A.j.preload=
!0;this.A.j.volume=this.ba*this.A.level;this.$.appendChild(this.A.j);this.A.Tc=!1;this.A.Bm=!1;this.A.j.oncanplay=function(){if(!F.A.Tc){F.A.ng=!0;var E,D,C=[],G=new y.Ua,J=F.S,H=F.A.j.videoWidth/3;F.A.width=F.A.j.videoWidth;F.A.height=F.A.j.videoHeight;for(E=0;6>E;E++){var I=E%3*H+F.A.df;var L=I+H-2*F.A.df;var K=4;3>E&&(K+=H);var M=K+H-2*F.A.df;for(D=0;4>D;D++){G.x=-1;G.y=-1;G.z=1;for(var Q=0;Q<D;Q++)G.Bp();C.push((0<G.x?I:L)/(3*H),(0<G.y?M:K)/(2*H))}}J.bindBuffer(J.ARRAY_BUFFER,F.A.Ci);J.bufferData(J.ARRAY_BUFFER,
new Float32Array(C),J.STATIC_DRAW);F.D.$c&&"videopano"==F.D.delay&&F.Zj(null)}};this.A.tb=function(){var E=F.Wa("_videopanorama");return 0<E.length&&E[0].tb?E[0].tb:0};this.A.em=function(E){var D=F.Wa("_videopanorama");0<D.length&&(D[0].tb=E)};this.A.loop=function(){return 0<F.A.tb()?(F.A.em(F.A.tb()-1),F.A.j.play(),!0):!1};"exit"==this.A.ue?this.A.j.onended=function(){F.A.ng=!1;F.A.Tc=!1;F.$.removeChild(F.A.j);F.A.j=null;F.update()}:"stop"==this.A.ue?F.A.j.onended=function(){F.A.loop()||F.update()}:
"{"==this.A.ue.charAt(0)?this.A.j.onended=function(){F.qd(F.A.ue,F.A.ak)}:this.A.j.loop=!0;for(w=0;w<this.A.src.length;w++)r=document.createElement("source"),r.setAttribute("src",this.gb(this.A.src[w])),this.A.j.appendChild(r);r=this.Wa("_videopanorama");0<r.length?r[0].j=this.A.j:this.rp("_videopanorama",this.A.j);if(this.A.Yj&&(r=this.A.j.play(),void 0!==r))r.then(function(){})["catch"](function(){c.A.tm&&(c.A.j.muted=!0,c.A.j.play())})}else"{"==this.A.ue.charAt(0)&&F.qd(F.A.ue,F.A.ak);this.Zm();
this.D.Md||this.$p();this.update();this.Cd&&(this.Cd=!1,this.I("viewerinit",{}),this.va&&this.va.ggViewerInit&&this.va.ggViewerInit(),this.Ea.enabled&&0==this.Kd&&this.oa&&(this.rb(9),this.pan.m=this.oc.pan,this.u.m=this.oc.u,this.fov.m=this.oc.fov,this.rb(this.oc.pb),this.R=this.al(!1),this.pan.m=this.cc(0,0).value,this.u.m=this.cc(0,1).value,this.fov.m=this.cc(0,2).value,r=this.cc(0,3).value,3==r&&this.rb(r),this.xc=this.R.cb,this.Tj(!0),this.v.active=!1,this.v.yh=!0));this.ic()};e.prototype.Ml=
function(a,b){0<a.length&&(".xml"==a.slice(-4)||".swf"==a.slice(-4)||"{"==a.charAt(0)?this.qd(this.gb(a),b):window.open(this.gb(a),b))};e.prototype.Nu=function(){this.qf=this.isLoaded=!1;this.checkLoaded=this.wd=[];this.fi=0;this.va&&this.va.ggReLoaded&&this.va.ggReLoaded();this.I("beforechangenode",{})};e.prototype.Is=function(a){var b="";0<this.Ll.length&&(b=this.Ll.pop());""!=b&&(this.nl=!0);this.qd("{"+b+"}",a)};e.prototype.qd=function(a,b){if(""!=a&&"{}"!=a){this.Nu();this.we&&!this.Pg&&(this.Rc(0),
this.ic());this.ha&&this.ha.hotspotProxyOut&&this.ha.hotspotProxyOut(this.P.id,this.P.url);this.I("hsproxyout",{id:this.P.id,url:this.P.url});".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var c="",h=null;"object"===typeof b&&null!==b?h=b:b&&(c=b.toString());b="/"+this.u.m+"/"+this.fov.m+"//"+this.Z();c=c.replace("$cur",this.pan.m+b);c=c.replace("$(cur)",this.pan.m+b);c=c.replace("$fwd","N"+this.Wd()+b);c=c.replace("$(fwd)","N"+this.Wd()+b);c=c.replace("$bwd","S"+this.Wd()+b);c=c.replace("$(bwd)",
"S"+this.Wd()+b);c=c.replace("$ap",String(this.pan.m));c=c.replace("$(ap)",String(this.pan.m));c=c.replace("$an",String(this.Wd()));c=c.replace("$(an)",String(this.Wd()));c=c.replace("$at",String(this.u.m));c=c.replace("$(at)",String(this.u.m));c=c.replace("$af",String(this.fov.m));c=c.replace("$(af)",String(this.fov.m));c=c.replace("$ar",String(this.Z()));c=c.replace("$(ar)",String(this.Z()));""!=c&&(b=c.split("/"),3<b.length&&""!=b[3]&&(this.startNode=b[3]));h=null!==h?h:c;this.na(!1);if("{"==a.charAt(0)){b=
a.substr(1,a.length-2);if(this.ra==b&&this.hh){this.qf=this.isLoaded=!0;return}(c=this.se[b])&&(b=c);c=this.D;var m=this.S;if(this.Ue[b]){this.hh=!0;if(this.D.enabled&&this.oa&&this.D.Cc){c.Qp=!0;c.ke||c.Md||c.$c||this.Tj(!0);var n=void 0;"wipeleftright"==c.type?n=1:"wiperightleft"==c.type?n=2:"wipetopbottom"==c.type?n=3:"wipebottomtop"==c.type?n=4:"wiperandom"==c.type&&(n=Math.ceil(4*Math.random()));c.Qk=n;m.bindFramebuffer(m.FRAMEBUFFER,c.Cc);m.viewport(0,0,c.Cc.width,c.Cc.height);m.clear(m.COLOR_BUFFER_BIT|
m.DEPTH_BUFFER_BIT);c.Fi=!0;this.Hi();c.Fi=!1;m.bindFramebuffer(m.FRAMEBUFFER,null);m.viewport(0,0,this.Cb.width,this.Cb.height);m=new Date;this.P!=this.fb&&6!=c.da?7==c.da?(c.Vg=this.P.fc/this.C.width,c.Wg=.5):(c.Vg=this.P.fc/this.C.width,c.Wg=1-this.P.Qb/this.C.height):(c.Vg=.5,c.Wg=.5);if(1==c.da||2==c.da||6==c.da||7==c.da)c.yq=m.getTime()+100,c.Md=!0,c.Hb=Math.sin(this.Dd()/2*Math.PI/180)/Math.sin(c.tk/2*Math.PI/180),c.Hb=Math.max(c.Hb,1),c.xq=1/c.Yg*c.Hb*.3}this.Vl(this.Ue[b],h);this.Ck(a);if(c.enabled&&
this.oa&&(this.kq(null),0!=c.ed)){c.ym=this.nf();c.zm=this.gg();c.Bi=this.Dd();c.he=this.Z();if(1==c.ed||3==c.ed)this.Ab(c.sk);else if(2==c.ed)this.Ab(c.rk);else if(4==c.ed){for(h=a=0;h<this.xa.length;h++)this.xa[h].cb&&0==this.xa[h].cb.indexOf("__FlyIn")&&(a=this.xa[h]);0!=a?(this.rb(this.hj(3,a).value),this.ee(this.hj(0,a).value),this.fe(this.hj(1,a).value),this.Ab(this.hj(2,a).value)):(this.rb(this.oc.pb),this.ee(this.oc.pan),this.fe(this.oc.u),this.Ab(this.oc.fov))}c.Xg||1==c.da||2==c.da||6==
c.da||7==c.da||this.um()}c.Qp=!1;this.me&&(this.G("add pano opennext"),this.Da.Ni());this.D.Md||this.D.ke||this.D.$c||(this.fa&&this.Mk(),this.hh=!1)}else{this.Uc("invalid node id: "+b);return}}else this.pp(a,null,h);this.I("changenode",{});this.update(5)}};e.prototype.mo=function(){return this.qf?this.Gd?this.$a.slice(0):[""]:[]};e.prototype.ag=function(a){var b;var c={title:"",description:"",author:"",datetime:"",copyright:"",source:"",information:"",comment:"",latitude:0,longitude:0,altitude:-1E4,
heading:0,customnodeid:"",streetviewlink:"",tags:[]};if(a&&((b=a.getAttributeNode("title"))&&(c.title=b.nodeValue.toString()),(b=a.getAttributeNode("description"))&&(c.description=b.nodeValue.toString()),(b=a.getAttributeNode("author"))&&(c.author=b.nodeValue.toString()),(b=a.getAttributeNode("datetime"))&&(c.datetime=b.nodeValue.toString()),(b=a.getAttributeNode("copyright"))&&(c.copyright=b.nodeValue.toString()),(b=a.getAttributeNode("source"))&&(c.source=b.nodeValue.toString()),(b=a.getAttributeNode("info"))&&
(c.information=b.nodeValue.toString()),(b=a.getAttributeNode("comment"))&&(c.comment=b.nodeValue.toString()),(b=a.getAttributeNode("latitude"))&&(c.latitude=Number(b.nodeValue)),(b=a.getAttributeNode("longitude"))&&(c.longitude=Number(b.nodeValue)),(b=a.getAttributeNode("nodeid"))&&(c.nodeid=b.nodeValue.toString()),(b=a.getAttributeNode("altitude"))&&(c.altitude=Number(b.nodeValue)),(b=a.getAttributeNode("heading"))&&(c.heading=Number(b.nodeValue)),(b=a.getAttributeNode("customnodeid"))&&(c.customnodeid=
b.nodeValue.toString()),(b=a.getAttributeNode("streetviewlink"))&&(c.streetviewlink=b.nodeValue.toString()),b=a.getAttributeNode("tags"))){a=b.nodeValue.toString().split("|");for(b=0;b<a.length;b++)""==a[b]&&(a.splice(b,1),b--);c.tags=a}return c};e.prototype.ur=function(a){for(var b="",c=a.firstChild;c;){if("sequence"==c.nodeName){if(a=c.getAttributeNode("title"))b=a.nodeValue;for(var h=[],m=c.firstChild;m;){if("sequenceelement"==m.nodeName){var n={};if(a=m.getAttributeNode("index"))n.index=a.nodeValue;
if(a=m.getAttributeNode("nodeid"))n.nodeid=a.nodeValue;if(a=m.getAttributeNode("cliptitle"))n.cliptitle=a.nodeValue;if(a=m.getAttributeNode("startview"))n.startview=a.nodeValue;h.push(n)}m=m.nextSibling}this.dn[b]=h}c=c.nextSibling}};e.prototype.Hn=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var h={x:0,y:0};a=c.getAttributeNode("x");h.x=Number(a.nodeValue);a=c.getAttributeNode("y");h.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};
e.prototype.In=function(a){for(var b={},c=a.firstChild;c;){if("mapcoords"==c.nodeName){var h={x:0,y:0};a=c.getAttributeNode("x_floorplan_percent");h.x=Number(a.nodeValue);a=c.getAttributeNode("y_floorplan_percent");h.y=Number(a.nodeValue);a=c.getAttributeNode("mapid");b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.Jn=function(a){for(var b={},c=a.firstChild;c;){if("custompropertyvalue"==c.nodeName){a=c.getAttributeNode("value");var h=a.nodeValue.toString();a=c.getAttributeNode("variablename");
b[a.nodeValue.toString()]=h}c=c.nextSibling}return b};e.prototype.Wk=function(a,b){var c,h="";(c=b.getAttributeNode("id"))&&(h=c.nodeValue.toString());if(!this.ob.hasOwnProperty(a)||!this.ob[a].hasOwnProperty(h)){var m={};for(b=b.firstChild;b;){if("custompropertyvalue"==b.nodeName){c=b.getAttributeNode("variablename");var n=c.nodeValue;c=b.getAttributeNode("value");m[n]=c.nodeValue}b=b.nextSibling}this.ob[a]||(this.ob[a]={});this.ob[a][h]=m}};e.prototype.Gn=function(a){var b=a.getAttributeNode("variablename"),
c=b.nodeValue.toString();b=a.getAttributeNode("variabletype");var h=Number(b.nodeValue);b=a.getAttributeNode("propertytype");var m=Number(b.nodeValue);b=a.getAttributeNode("defaultvalue");var n;b&&(n=b.nodeValue.toString());this.Ga[c]={Od:h,li:m,Tk:n}};e.prototype.Ch=function(a){return a?this.Ug[a]?this.Ug[a]:this.ag():this.Tg};e.prototype.no=function(a,b){""!==a||this.Gd||(a="node1");a||(a=this.ra);return this.Lf.hasOwnProperty(a)&&this.Lf[a].hasOwnProperty(b)?this.mj(y.kc.bl(this.Lf[a][b],this.Ga[b].Od),
this.Ga[b].Od):null};e.prototype.Mp=function(a,b,c){c="string"===typeof c?c:y.kc.bo(c,this.Ga[b].Od);this.Lf[a][b]!=c&&(this.Lf[a][b]=c,this.I("varchanged_"+b,{}))};e.prototype.il=function(a){a=this.Ch(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),b.push(a.longitude));return b};e.prototype.oo=function(a){for(var b=[],c=0;c<this.$a.length;c++){var h=this.$a[c],m=this.Ch(h);m&&m.tags.includes(a)&&b.push(h)}return b};e.prototype.fs=function(a){return this.Ch(a).title};
e.prototype.cs=function(a,b){var c=-1;a=this.il(a);b=this.il(b);if(2==a.length&&2==b.length){c=Math.PI/180*(b[0]-a[0]);var h=Math.PI/180*(b[1]-a[1]);a=Math.sin(c/2)*Math.sin(c/2)+Math.sin(h/2)*Math.sin(h/2)*Math.cos(Math.PI/180*a[0])*Math.cos(Math.PI/180*b[0]);c=12742E3*Math.atan2(Math.sqrt(a),Math.sqrt(1-a))}return c};e.prototype.cc=function(a,b,c){var h;for(h=0;h<this.R.Ja.length;h++){var m=this.R.Ja[h];if(m.time==a&&m.qb==b&&(!c||m.td==c))return m}return!1};e.prototype.hj=function(a,b){var c;for(c=
0;c<b.Ja.length;c++)if(0==b.Ja[c].time&&b.Ja[c].qb==a)return b.Ja[c];return!1};e.prototype.qo=function(a,b,c){for(a=Math.floor(a);!this.cc(a,b,c)&&0<a;)a--;return a};e.prototype.lo=function(a){var b,c=1E5,h=a,m=!1;for(b=0;b<this.R.Ja.length;b++){var n=this.R.Ja[b];n.qb==a.qb&&n.td==a.td&&n.time>a.time&&n.time<c&&(h=this.R.Ja[b],c=h.time,m=!0)}return m?h:!1};e.prototype.Br=function(a){for(var b=[],c=0;c<this.R.Ja.length;c++){var h=this.R.Ja[c];if(h.time<=a&&4==h.qb){for(var m=!1,n=0;n<b.length;n++)if(b[n].td==
this.R.Ja[c].td){b[n].time<h.time?b.splice(n,1):m=!0;break}m||b.push(h)}}return b};e.prototype.Yn=function(a,b,c){var h=new y.Nc(a.time,a.value),m=new y.Nc(b.time,b.value),n=(c-a.time)/(b.time-a.time);if(0!=a.type||0!=b.type&&3!=b.type)if(3==a.type)c=a.value;else{n=new y.Nc;var q=new y.Nc,r=b.time-a.time;0==a.type?q.init(a.time+.3*r,a.value):q.init(a.bf,a.cf);0==b.type||3==b.type?n.init(b.time-.3*r,b.value):n.init(b.$e,b.af);a=new y.Nc;a.yk(h,m,q,n,c);c=a.y}else a=new y.Nc,a.Zd(h,m,n),c=a.y;return c};
e.prototype.al=function(a,b,c,h){for(var m=0;m<this.xa.length;m++)if(this.xa[m].cb&&0==this.xa[m].cb.indexOf("__FlyIn"))return this.xa[m];m=new y.Tm;m.cb="__FlyIn";m.Re=this.pan.m;m.zi=this.u.m;m.ge=this.fov.m;m.yi=this.Z();m.he=this.Dh();a?(m.Xf=!1,m.hf=!1,m.speed=this.D.Yg,m.Ld=b,m.ie=c,m.Ig=h):(m.Xf=!0,m.hf=!0,m.speed=this.Ea.speed,this.Ea.Ad.pq?(m.Ld=this.Ea.Ad.pan,m.ie=this.Ea.Ad.u,m.Ig=this.Ea.Ad.fov,m.he=this.Ea.Ad.pb):(m.Ld=this.pan.Ha,m.ie=this.u.Ha,m.Ig=this.fov.Ha));return this.Vn(m)};
e.prototype.Vn=function(a){var b=new y.Um;b.cb=a.cb;b.Ye="";b.Ja=[];for(var c=a.yi!=a.he&&-1!=a.he;-180>a.Ld;)a.Ld+=360;for(;180<a.Ld;)a.Ld-=360;var h=a.Ld-a.Re;if(360==this.pan.max-this.pan.min&&!this.hb()){for(;-180>h;)h+=360;for(;180<h;)h-=360}var m=a.ie-a.zi,n=a.Ig-a.ge,q=Math.round(Math.sqrt(h*h+m*m+n*n)/a.speed*.33);c&&(q=Math.max(10,q));b.length=q;if(a.jf){var r=Math.ceil(.7*q);r=Math.min(15,r);r=Math.max(5,r);b.length=q+r;var t=.33*r}var w=a.Ig,z=q,A=0,F=q-1;if(c){var E=a.ge;var D=4==a.he?
120:this.Bh(a.he);n=w-a.ge;var C=new y.Nc(0,a.ge),G=new y.Nc(q,w),J=new y.Nc,H=new y.Nc;H.init(q/3,a.ge+n/3);J.init(2*q/3,w-n/3);if(E>D)for(;A<=q&&E>D;)E=new y.Nc,E.yk(C,G,H,J,A),E=E.y,A++;else A=1;A>=.8*q&&(z=A=Math.round(.8*q));0==A&&(A=1);D=4==a.yi?120:this.Bh(a.yi);E=a.Ig;if(E>D)for(;F>A&&E>D;)E=new y.Nc,E.yk(C,G,H,J,F),E=E.y,F--}C=new y.fd;C.time=0;C.qb=0;C.value=a.Re;C.type=1;C.bf=q/3;C.cf=a.Xf?a.Re:a.Re+h/3;b.Ja.push(C);C=new y.fd;C.time=0;C.qb=1;C.value=a.zi;C.type=1;C.bf=q/3;C.cf=a.Xf?a.zi:
a.zi+m/3;b.Ja.push(C);C=new y.fd;C.time=0;C.qb=2;C.value=a.ge;C.type=1;C.bf=q/3;C.cf=a.Xf?a.ge:a.ge+n/3;b.Ja.push(C);C=new y.fd;C.time=0;C.qb=3;C.value=a.yi;C.type=0;C.Gb=0;b.Ja.push(C);c&&(C=new y.fd,C.time=A,C.qb=3,C.value=a.he,C.type=0,C.Gb=F-A,b.Ja.push(C));C=new y.fd;C.time=q;C.qb=0;C.value=a.Re+h;C.type=1;C.$e=2*q/3;C.af=a.hf&&!a.jf?C.value:C.value-h/3;a.jf&&(C.bf=q+t,C.cf=C.value+t/q*h);b.Ja.push(C);C=new y.fd;C.time=q;C.qb=1;C.value=a.ie;C.type=1;C.$e=2*q/3;C.af=a.hf&&!a.jf?a.ie:a.ie-m/3;
a.jf&&(C.bf=q+t,C.cf=C.value+t/q*m);b.Ja.push(C);C=new y.fd;C.time=z;C.qb=2;C.value=w;C.type=1;C.$e=2*z/3;C.af=a.hf?w:w-n/3;b.Ja.push(C);a.jf&&(C=new y.fd,C.time=q+r,C.qb=0,C.value=a.Re+h,C.type=1,C.$e=q+r-t,C.af=a.Re+h,b.Ja.push(C),C=new y.fd,C.time=q+r,C.qb=1,C.value=a.ie,C.type=1,C.$e=q+r-t,C.af=a.ie,b.Ja.push(C));this.xa.push(b);return b};e.prototype.ov=function(){this.A.j&&this.A.j.play()};e.prototype.pv=function(){this.A.j&&(this.A.j.pause(),this.A.j.currentTime=0)};e.prototype.nv=function(){this.A.j&&
this.A.j.pause()};e.prototype.yu=function(a){this.A.j&&(0>a&&(a=0),a>this.A.j.duration&&(a=this.A.j.duration-.1),this.A.j.currentTime=a,this.update())};e.prototype.As=function(){return this.A.j?this.A.j.currentTime:0};e.prototype.zs=function(){if(this.A.j)return this.A.j};e.prototype.xu=function(a){if(this.A.j){var b=!this.A.j.paused&&!this.A.j.ended,c=this.A.j.currentTime;this.A.j.pause();this.A.j.src=isNaN(parseInt(a,10))?String(a):this.A.src[parseInt(a,10)];b&&(this.A.j.onloadedmetadata=function(){this.currentTime=
c;this.play();this.onloadedmetadata=null});this.A.j.currentTime=c}};e.prototype.rr=function(){this.Kl=!0};e.prototype.ls=function(){var a={};a.currentNode=this.ej();a.position={pan:this.pan.m,tilt:this.u.m,fov:this.fov.m,projection:this.Z()};for(var b=a.variables={},c=0,h=Object.keys(this.Sb);c<h.length;c++){var m=h[c];this.Sb[m].Co||"undefined"!==this.ll(m)&&((b[m]={}).value=this.ll(m))}b=a.hsprops={};c=0;for(h=Object.keys(this.ob);c<h.length;c++){m=h[c];for(var n=b[m]={},q=0,r=Object.keys(this.ob[m]);q<
r.length;q++)for(var t=r[q],w=n[t]={},z=0,A=Object.keys(this.ob[m][t]);z<A.length;z++){var F=A[z];w[F]=this.el(m,t,F)}}b=a.polyhotspots=[];for(c=0;c<this.K.length;c++)"poly"==this.K[c].type&&(h=this.K[c],m={},m.id=h.id,m.bordercolor=h.Yb,m.borderalpha=h.Xb,m.backgroundcolor=h.Wb,m.backgroundalpha=h.Vb,b.push(m));return a};e.prototype.hu=function(a){if(a.hasOwnProperty("position")){var b=a.position;this.pan.m=b.pan;this.u.m=b.tilt;this.fov.m=b.fov;this.rb(b.projection)}b=0;for(var c=Object.keys(a.variables);b<
c.length;b++){var h=c[b];this.Pe(h,a.variables[h].value)}b=0;for(c=Object.keys(a.hsprops);b<c.length;b++){h=c[b];for(var m=a.hsprops[h],n=0,q=Object.keys(m);n<q.length;n++)for(var r=q[n],t=m[r],w=0,z=Object.keys(t);w<z.length;w++){var A=z[w];this.jm(h,r,A,t[A])}}for(b=0;b<a.polyhotspots.length;b++)for(c=a.polyhotspots[b],h=0;h<this.K.length;h++)"poly"==this.K[h].type&&this.K[h].id==c.id&&(this.K[h].Yb=c.bordercolor,this.K[h].Xb=c.borderalpha,this.K[h].Vb=c.backgroundalpha,this.K[h].Wb=c.backgroundcolor);
return this.ub=!0};return e}();y.kc=f})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=O;window.ggHasWebGL=X;window.pano2vrPlayer=ggP2VR.kc;var Z=ggP2VR.kc.prototype;Z._=Z.Va;Z.setContainer=Z.bu;Z.setLanguage=Z.km;Z.getLanguage=Z.Rr;Z.addTranslations=Z.$g;Z.getProjectTranslations=Z.ps;Z.getVersion=Z.vo;Z.readConfigString=Z.Wl;Z.readConfigUrl=Z.pp;Z.readConfigUrlAsync=Z.Ot;Z.readConfigXml=Z.qp;Z.openUrl=Z.Ml;Z.openNext=Z.qd;Z.goBack=Z.Is;Z.setMargins=Z.fu;Z.addListener=Z.addListener;Z.on=Z.addListener;
Z.removeEventListener=Z.removeEventListener;Z.off=Z.removeEventListener;Z.detectBrowser=Z.En;Z.initWebGL=Z.Rc;Z.getPercentLoaded=Z.ks;Z.setBasePath=Z.au;Z.getBasePath=Z.$n;Z.setViewerSize=Z.Pp;Z.getViewerSize=Z.Ds;Z.updateViewerSizeNow=Z.ic;Z.setSkinObject=Z.ru;Z.changeViewMode=Z.er;Z.getViewMode=Z.Bs;Z.changePolygonMode=Z.pn;Z.setPolygonMode=Z.pn;Z.getPolygonMode=Z.ns;Z.showOnePolyHotspot=Z.Rp;Z.hideOnePolyHotspot=Z.zo;Z.changePolyHotspotColor=Z.dr;Z.setPolyHotspotHandcursor=Z.iu;
Z.toggleOnePolyHotspot=Z.Vu;Z.changeViewState=Z.fr;Z.getViewState=Z.Cs;Z.setRenderFlags=Z.ku;Z.getRenderFlags=Z.qs;Z.setMaxTileCount=Z.Kp;Z.updatePanorama=Z.Hi;Z.isTouching=Z.Lo;Z.getIsMobile=Z.hl;Z.setIsMobile=Z.eu;Z.getHasTouch=Z.eo;Z.getIsTour=Z.Qr;Z.getNodesCount=Z.gs;Z.getIsAutorotating=Z.Nr;Z.getIsLoading=Z.Pr;Z.getIsLoaded=Z.gj;Z.getIsTileLoading=Z.ho;Z.getLastActivity=Z.Sr;Z.getPan=Z.nf;Z.getPanNorth=Z.Wd;Z.getPanDest=Z.js;Z.getPanN=Z.ij;Z.setPan=Z.ee;Z.setPanNorth=Z.Vj;Z.changePan=Z.Si;
Z.changePanLog=Z.nn;Z.getTilt=Z.gg;Z.getTiltDest=Z.us;Z.setTilt=Z.fe;Z.changeTilt=Z.Ti;Z.changeTiltLog=Z.qn;Z.getFov=Z.Dd;Z.getFovDest=Z.Ir;Z.setFov=Z.Ab;Z.setFovMode=Z.hm;Z.changeFov=Z.Dk;Z.changeFovLog=Z.Ri;Z.getVFov=Z.Nb;Z.setVFov=Z.ui;Z.getHFov=Z.dl;Z.setHFov=Z.im;Z.getDFov=Z.cl;Z.setDFov=Z.fm;Z.getRoll=Z.lj;Z.setRoll=Z.Ag;Z.setPanTilt=Z.mm;Z.setPanTiltFov=Z.zg;Z.setDefaultView=Z.Ep;Z.setLocked=Z.setLocked;Z.setLockedMouse=Z.Ip;Z.setLockedKeyboard=Z.Hp;Z.getLockedKeyboard=Z.Ur;
Z.setLockedWheel=Z.Jp;Z.moveTo=Z.moveTo;Z.moveToEx=Z.Ej;Z.moveToDefaultView=Z.it;Z.moveToDefaultViewEx=Z.jt;Z.addHotspotElements=Z.Zm;Z.playSound=Z.be;Z.playPauseSound=Z.mp;Z.playStopSound=Z.Mt;Z.pauseSound=Z.ei;Z.activateSound=Z.Lq;Z.soundGetTime=Z.Gu;Z.soundSetTime=Z.Iu;Z.soundSetPlaybackRate=Z.Hu;Z.setMediaVisibility=Z.gu;Z.isPlaying=Z.isPlaying;Z.stopSound=Z.$j;Z.setVolume=Z.setVolume;Z.changeVolume=Z.gr;Z.mute=Z.nt;Z.unmute=Z.av;Z.toggleMuted=Z.Uu;Z.getHasSounds=Z.Kr;Z.getSoundsPermitted=Z.rs;
Z.startAutoplayMedia=Z.Lu;Z.removeHotspots=Z.wp;Z.getHotspotsVisible=Z.fo;Z.getHotspotPropValue=Z.el;Z.setHotspotPropValue=Z.jm;Z.getCustomPropertyDefaultValue=Z.Gr;Z.getCurrentPerspective=Z.mf;Z.addHotspot=Z.Nq;Z.updateHotspot=Z.cv;Z.removeHotspot=Z.Pt;Z.setActiveHotspot=Z.Oe;Z.getPointHotspotIds=Z.ms;Z.getHotspot=Z.Lr;Z.setFullscreen=Z.Sj;Z.toggleFullscreen=Z.fk;Z.enterFullscreen=Z.tr;Z.exitFullscreen=Z.exitFullscreen;Z.getIsFullscreen=Z.Or;Z.startAutorotate=Z.Mu;Z.stopAutorotate=Z.Pu;
Z.toggleAutorotate=Z.Tu;Z.pauseAutorotate=Z.Lt;Z.resumeAutorotate=Z.Ut;Z.setAutorotateNodeFilter=Z.$t;Z.startAnimation=Z.Vp;Z.resumeAnimation=Z.Tt;Z.createLayers=Z.yn;Z.removePanorama=Z.Ef;Z.getScreenResolution=Z.to;Z.getMaxScreenResolution=Z.ko;Z.getNodeIds=Z.mo;Z.getNodeUserdata=Z.Ch;Z.getNodeUserdataPropValue=Z.no;Z.setNodeUserdataPropValue=Z.Mp;Z.getNodeLatLng=Z.il;Z.getNodeTitle=Z.fs;Z.getNodeDistance=Z.cs;Z.getCurrentNode=Z.ej;Z.getNextNode=Z.bs;Z.getPrevNode=Z.os;Z.getLastVisitedNode=Z.Tr;
Z.getStartNode=Z.ss;Z.getNodesWithTag=Z.oo;Z.getCurrentPointHotspots=Z.Fr;Z.getPositionAngles=Z.jj;Z.getPositionRawAngles=Z.po;Z.nodeVisited=Z.pt;Z.clearVisitedNodes=Z.ir;Z.setElementIdPrefix=Z.cu;Z.videoPanoPlay=Z.ov;Z.videoPanoStop=Z.pv;Z.videoPanoPause=Z.nv;Z.getVideoPanoTime=Z.As;Z.setVideoPanoTime=Z.yu;Z.getVideoPanoObject=Z.zs;Z.setVideoPanoSource=Z.xu;Z.getMediaObject=Z.Zr;Z.getMediaBufferSourceObject=Z.Yr;Z.registerVideoElement=Z.rp;Z.disableSoundLoading=Z.rr;Z.setCrossOrigin=Z.setCrossOrigin;
Z.setProjection=Z.rb;Z.getProjection=Z.Z;Z.changeProjection=Z.Ek;Z.changeProjectionEx=Z.Ek;Z.changeLensflares=Z.cr;Z.setTransition=Z.tu;Z.getMapType=Z.Xr;Z.getMapDetails=Z.Wr;Z.getNodeMapCoords=Z.ds;Z.getNodeMapCoordsInPercent=Z.es;Z.getMapContainingNode=Z.Vr;Z.getMapsContainingNode=Z.jo;Z.getMapIDs=Z.io;Z.getFloorplanIDs=Z.Hr;Z.getFirstMap=Z.co;Z.getFirstFloorplan=Z.fj;Z.hasMap=Z.Os;Z.hasFloorplan=Z.Ns;Z.addVariable=Z.Qq;Z.setVariableOptions=Z.Op;Z.setVariableValue=Z.Pe;Z.getVariableValue=Z.ll;
Z.setSuperCookie=Z.su;Z.getGyroAvailable=Z.Jr;Z.setUseGyro=Z.uu;Z.getUseGyro=Z.vs;Z.getOS=Z.hs;Z.getBrowser=Z.Dr;Z.getBrowserTheme=Z.Er;Z.triggerEvent=Z.I;Z.requestRedraw=Z.Rt;Z.getWebGlContext=Z.Es;Z.getHasTouch=Z.eo;Z.updateViewerSizeNow=Z.ic;Z.getApiVersion=Z.Cr;Z.setApiVersion=Z.Zt;Z.getInertia=Z.Mr;Z.setInertia=Z.du;Z.getZoomCenterCursor=Z.Fs;Z.setZoomCenterCursor=Z.zu;Z.getPlayerState=Z.ls;Z.setPlayerState=Z.hu;Z.getQueryParameter=Z.getQueryParameter;Z.setQueryParameter=Z.ju;Z.enterVR=Z.Yf;
Z.exitVR=Z.Zf;Z.toggleVR=Z.gq;Z.isInVR=Z.mg;Z.hasVR=Z.rf;Z.getVRDisplayName=Z.xs;Z.getVRCamera=Z.ws;Z.getVRRenderer=Z.ys;Z.setVRFrameBufferScaleFactor=Z.vu;Z.getSkinGroup=Z.kl;
