HEX
Server: Apache
System: Linux web2036c1.megawebservers.com 5.14.0-570.37.1.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 28 10:41:06 UTC 2025 x86_64
User: absolutespace.ca (53202)
PHP: 7.4.33
Disabled: apache_get_modules,apache_get_version,disk_free_space,phpinfo,exec,shell_exec,passthru,system,proc_nice
Upload Files
File: /services/webpages/a/b/absolutespace.ca/public/Pano2VR/House/pano2vr_player.js
//////////////////////////////////////////////////////////////////////
// Pano2VR 5.1/15722 HTML5/CSS3 & WebGL Panorama Player             //
// Trial License: For evaluation only!                              //
// (c) 2017, Garden Gnome Software, http://ggnome.com               //
//////////////////////////////////////////////////////////////////////

function G(){var m="perspective",g=["Webkit","Moz","O","ms","Ms"],h;for(h=0;h<g.length;h++)"undefined"!==typeof document.documentElement.style[g[h]+"Perspective"]&&(m=g[h]+"Perspective");"undefined"!==typeof document.documentElement.style[m]?"webkitPerspective"in document.documentElement.style?(m=document.createElement("style"),g=document.createElement("div"),h=document.head||document.getElementsByTagName("head")[0],m.textContent="@media (-webkit-transform-3d) {#ggswhtml5{height:5px}}",h.appendChild(m),
g.id="ggswhtml5",document.documentElement.appendChild(g),h=5===g.offsetHeight,m.parentNode.removeChild(m),g.parentNode.removeChild(g)):h=!0:h=!1;return h}function N(){var m;if(m=!!window.WebGLRenderingContext)try{var g=document.createElement("canvas");g.width=100;g.height=100;var h=g.getContext("webgl");h||(h=g.getContext("experimental-webgl"));m=!!h}catch(b){m=!1}return m}
var __extends=this&&this.__extends||function(m,g){function h(){this.constructor=m}for(var b in g)g.hasOwnProperty(b)&&(m[b]=g[b]);m.prototype=null===g?Object.create(g):(h.prototype=g.prototype,new h)},ggP2VR;
(function(m){var g=function(){function b(a){this.h=null;this.sf=this.Qj=this.wb=!1;this.kb=this.Da=this.va=0;this.f=70;this.Qa=0;this.autoplay=this.wf=!1;this.id="";this.j=this.pan=0;this.h=a;this.Pc=this.yc=100;this.gd=1}b.prototype.Cb=function(a){var d;if(d=a.getAttributeNode("id"))this.id=d.nodeValue.toString();if(d=a.getAttributeNode("pan"))this.pan=Number(d.nodeValue);if(d=a.getAttributeNode("tilt"))this.j=Number(d.nodeValue)};b.prototype.ll=function(a){var d="",c=this.h,b=!0;if(c.Lg){var f=
new m.ra(0,0,-100);f.va(-this.j*Math.PI/180);f.Da(this.pan*Math.PI/180);f.Da(-c.pan.c*Math.PI/180);f.va(c.j.c*Math.PI/180);f.kb(c.L.c*Math.PI/180);.01<=f.z&&(b=!1)}c.rc&&(d+="perspective("+a+"px) ");d=d+("translate3d(0px,0px,"+a+"px) ")+("rotateZ("+c.L.c.toFixed(10)+"deg) ");d+="rotateX("+c.j.c.toFixed(10)+"deg) ";d+="rotateY("+(-c.pan.c).toFixed(10)+"deg) ";d+="rotateY("+this.pan.toFixed(10)+"deg) ";d+="rotateX("+(-this.j).toFixed(10)+"deg) ";a=1E4;var f=this.a.videoWidth,l=this.a.videoHeight;if(0==
f||0==l)f=640,l=480;0<this.yc&&(f=this.yc);0<this.Pc&&(l=this.Pc);0<f&&0<l&&(this.a.width=f,this.a.height=l,this.a.style.width=f+"px",this.a.style.height=l+"px");0<this.f&&(a=f/(2*Math.tan(this.f/2*Math.PI/180)));d+="translate3d(0px,0px,"+(-a).toFixed(10)+"px) ";d+="rotateZ("+this.kb.toFixed(10)+"deg) ";d+="rotateY("+(-this.Da).toFixed(10)+"deg) ";d+="rotateX("+this.va.toFixed(10)+"deg) ";this.gd&&1!=this.gd&&(d+="scaleY("+this.gd+") ");d+="translate3d("+-f/2+"px,"+-l/2+"px,0px) ";this.a.style[c.Ta+
"Origin"]="0% 0%";this.wb&&(d="",1==this.Qa&&(d+="scale("+Math.min(c.m.width/f,c.m.height/l)+") "),d+="translate3d("+-f/2+"px,"+-l/2+"px,0px) ");this.Om!=d&&(this.Om=d,this.a.style[c.Ta]=d,this.a.style.visibility=b?"visible":"hidden",this.sf&&this.Qj==this.wb&&(this.a.style[c.Nc]="all 0s linear 0s"),this.Qj=this.wb)};b.prototype.Sk=function(){this.a&&(this.a.style.visibility="hidden")};b.prototype.me=function(){var a=this.h;this.a.style.left=a.margin.left+a.m.width/2+"px";this.a.style.top=a.margin.top+
a.m.height/2+"px"};return b}();m.Mo=g;var h=function(b){function a(a){b.call(this,a);this.Di=this.Bg=this.Ve=this.ha=!1;this.cf=this.vb=null;this.ee=this.bg=0;this.kh=this.Ci=this.ge=!1;this.url=[];this.loop=0;this.level=1;this.vc=0;this.mode=1;this.wj=10;this.oh=this.zb=0;this.ja=1;this.Ec=this.tc=this.sc=this.Dc=0}__extends(a,b);a.prototype.Vk=function(){this.ha&&this.kh?this.kh=!1:(!this.ha&&this.h.Lg&&(this.rd(),this.addElement()),0==this.loop?this.ha?(this.vb=null,this.Hc()):this.a.play():0<
this.Kc?(this.Kc--,this.ha||(this.a.currentTime=0),this.Bg&&(this.Oc&&0==this.Oc.gain.value||0==this.lc.gain.value&&0==this.oc.gain.value&&0==this.mc.gain.value&&0==this.nc.gain.value)||(this.ha?(this.vb=null,this.Hc()):this.a.play())):this.ha&&(this.vb=null,this.ge=!1))};a.prototype.Bh=function(){var a=this.h.Ga;a&&(this.ha||(this.source=a.createMediaElementSource(this.a)),2==this.mode||3==this.mode||5==this.mode?(this.se=a.createChannelSplitter(2),this.lc=a.createGain(),this.mc=a.createGain(),this.nc=
a.createGain(),this.oc=a.createGain(),this.ff=a.createChannelMerger(2),this.ha||this.source.connect(this.se),this.se.connect(this.lc,0),this.se.connect(this.mc,0),this.se.connect(this.nc,1),this.se.connect(this.oc,1),this.lc.connect(this.ff,0,0),this.mc.connect(this.ff,0,1),this.nc.connect(this.ff,0,0),this.oc.connect(this.ff,0,1),this.ff.connect(a.destination)):(this.Oc=a.createGain(),this.ha||this.source.connect(this.Oc),this.Oc.connect(a.destination)))};a.prototype.Wf=function(){var a=this.h.Ga;
this.wb||this.Di||(this.lc.gain.setValueAtTime(this.Dc,a.currentTime),this.oc.gain.setValueAtTime(this.Ec,a.currentTime),this.mc.gain.setValueAtTime(this.sc,a.currentTime),this.nc.gain.setValueAtTime(this.tc,a.currentTime))};a.prototype.th=function(){var a=this.h,c=this.h.Ga;if(this.a||this.ha){var b,f=this.pan-a.pan.c;for(b=this.j-a.j.c;-180>f;)f+=360;for(;180<f;)f-=360;var l=this.vc,k=this.wj;0==k&&(k=.01);0>k&&(k=a.f.c);this.Fb||(this.Fb=new m.ra,this.Fb.yj(this.pan,this.j));0!=this.mode&&1!=this.mode||
!c||this.Oc&&this.Oc.gain.setValueAtTime(this.level*a.V*this.ja,c.currentTime);if(2==this.mode&&c){var w=.5*Math.cos(f*Math.PI/180)+.5;this.Dc=Math.sqrt(w)*this.ja*this.level*a.V;this.Ec=Math.sqrt(w)*this.ja*this.level*a.V;this.sc=Math.sqrt(1-w)*this.ja*this.level*a.V;this.tc=Math.sqrt(1-w)*this.ja*this.level*a.V;this.Wf()}if(3==this.mode){0>f?f<-this.zb?f+=this.zb:f=0:f=f>this.zb?f-this.zb:0;w=this.level;b=Math.abs(b);b=b<this.oh?0:b-this.oh;var y=1-b/k;if(Math.abs(f)>k||0>y){var h=w*l*a.V;c?(this.Dc=
h*this.ja,this.Ec=h*this.ja,this.tc=this.sc=0,this.Wf()):this.a.volume=w*l*a.V}else if(h=1-Math.abs(f/k),c){var g=w*(l+(1-l)*y*h)*a.V,h=w*l*a.V;0<=f?(this.Dc=g*this.ja,this.Ec=h*this.ja):(this.Dc=h*this.ja,this.Ec=g*this.ja);2*Math.abs(f)<k?(h=1-Math.abs(2*f)/k,g=w*(l+(1-l)*y*h)*a.V,h=.5*w*(1-l)*y*(1-h)*a.V,0<=f?(this.Ec=g*this.ja,this.tc=h*this.ja,this.sc=0):(this.Dc=g*this.ja,this.sc=h*this.ja,this.tc=0)):(h=1-(Math.abs(2*f)-k)/k,g=.5*w*(1-l)*y*h*a.V,0<=f?(this.tc=g*this.ja,this.sc=0):(this.sc=
g*this.ja,this.tc=0));this.Wf()}else this.a.volume=w*(l+(1-l)*y*h)*a.V}4==this.mode&&(Math.abs(f)<this.zb&&Math.abs(b)<this.oh?this.Ve||(this.Ve=!0,this.Kc=this.loop-1,this.ha?this.ge||this.Hc():this.a.play()):this.Ve=!1);5==this.mode&&(b=180*Math.acos(a.Ph.$g(this.Fb))/Math.PI,b<this.zb?c?(this.Dc=this.level*a.V*this.ja,this.Ec=this.level*a.V*this.ja,this.tc=this.sc=0,this.Wf()):this.a.volume=this.level*a.V:c?b<this.zb+k?(0>f?f=f>-this.zb?0:f+this.zb:f=f<this.zb?0:f-this.zb,g=1-Math.max(b-this.zb,
0)/k,h=Math.max(1-Math.abs(f)*Math.cos(this.j*Math.PI/180)/k,0),0<f?(this.Dc=this.level*(g*(1-this.vc)+this.vc)*a.V*this.ja,this.Ec=this.level*(g*h*(1-this.vc)+this.vc)*a.V*this.ja,this.sc=0,this.tc=this.level*g*(1-h)*a.V*this.ja):(this.Dc=this.level*(g*h*(1-this.vc)+this.vc)*a.V*this.ja,this.Ec=this.level*(g*(1-this.vc)+this.vc)*a.V*this.ja,this.sc=this.level*g*(1-h)*a.V*this.ja,this.tc=0),this.Wf()):(g=this.level*this.vc*a.V,this.Dc=g*this.ja,this.Ec=g*this.ja,this.tc=this.sc=0):(b-=this.zb,this.a.volume=
b<k&&0<k?this.level*(l+(1-l)*(1-Math.abs(b/k)))*a.V:l*a.V));6==this.mode&&(b=180*Math.acos(a.Ph.$g(this.Fb))/Math.PI,Math.abs(b)<this.zb?this.Ve||(this.Ve=!0,this.Kc=this.loop-1,this.ha?this.ge||this.Hc():this.a.play()):this.Ve=!1)}};a.prototype.nj=function(){var a=this;a.vb=this.h.Ga.createBufferSource();a.vb.addEventListener("ended",function(){a.Vk()},!1);2==a.mode||3==a.mode||5==a.mode?a.vb.connect(a.se):a.vb.connect(a.Oc)};a.prototype.vn=function(a){var c=this,b=this.h.Ga;c.nj();this.h.O("createBufferSoundSource()");
b.decodeAudioData(a,function(a){c.cf=a;c.vb.buffer=a;c.h.O("audio Data decoded");c.Ci&&(c.Hc(),c.Ci=!1)})};a.prototype.Hc=function(){var a=this.h.Ga,c=this.ee;this.cf?(null==this.vb&&(this.nj(),this.vb.buffer=this.cf),this.bg=a.currentTime-c,this.ee=0,this.ge=!0,this.kh=!1,this.vb.start(0,c),this.h.O("buffer Source started")):(this.h.O("bufferSoundPlay() -> no audio buffer -> playWhenReady"),this.Ci=!0)};a.prototype.Ih=function(){var a=this.h.Ga.currentTime-this.bg;this.re();this.ee=a};a.prototype.re=
function(){this.vb&&this.ge&&(this.kh=!0,this.vb.disconnect(),this.vb.stop(0),this.vb=null);this.bg=this.ee=0;this.ge=!1};a.prototype.Ol=function(){var a=this.h.Ga;return this.ee?this.ee:this.bg?a.currentTime-this.bg:0};a.prototype.Pl=function(a){this.re();this.ee=a;this.Hc()};a.prototype.addElement=function(){var a=-1,c=this,b=this.h,f=this.h.Ga;try{for(var l=!1,k=0;k<b.S.length;k++)b.S[k].id==c.id&&(a=k,null==b.S[k].a&&!b.S[k].ha||b.S[k].url.join()!=c.url.join()||b.S[k].loop!=c.loop||b.S[k].mode!=
c.mode||(l=!0));if(l)b.O("Keep playing "+c.id);else{if(0<=a){var w=b.S[a];if(null!=w.a||w.ha)if(f&&b.Ea.enabled)b.Ea.eg.push(w),1!=b.N.Ya&&2!=b.N.Ya&&b.Ea.Vh(w);else{try{w.ha?w.Ih():w.a.pause()}catch(h){b.O(h)}try{w.rd()}catch(h){b.O(h)}}}if(!f||2!=this.mode&&3!=this.mode&&5!=this.mode){c.a=document.createElement("audio");c.a.crossOrigin=b.crossOrigin;c.a.setAttribute("class","ggmedia");b.De&&c.a.setAttribute("id",b.De+c.id);for(k=0;k<c.url.length;k++)l=void 0,l=document.createElement("source"),""!=
c.url[k]&&"#"!=c.url[k]&&(l.crossOrigin=b.crossOrigin,l.setAttribute("src",b.Vb(c.url[k])),c.a.appendChild(l));c.a.volume=c.level*b.V;0<c.a.childNodes.length&&(b.U.appendChild(c.a),c.a.addEventListener("ended",function(){c.Vk()},!1),f&&(c.Bh(),c.Bg=!1,0==c.loop&&c.source.mediaElement&&(c.source.mediaElement.loop=!0)))}else if(0<c.url.length){c.ha=!0;c.Bh();var g=new XMLHttpRequest;g.open("GET",b.Vb(c.url[0]),!0);g.responseType="arraybuffer";g.onload=function(){c.vn(g.response)};g.send();c.Bg=!1}1<=
c.loop&&(c.Kc=c.loop-1);0<=a?b.S[a]=c:b.S.push(c);1!=c.mode&&2!=c.mode&&3!=c.mode&&5!=c.mode||!(0<=c.loop)||f&&b.Ea.enabled||(c.ha||(c.a.autoplay=!0),c.autoplay=!0);0==c.mode&&0<=c.loop&&(c.autoplay=!0);c.th()}}catch(h){this.h.O(h)}};a.prototype.rd=function(){try{this.h.O("Remove Snd:"+this.id),this.ha||(this.h.U.removeChild(this.a),this.a=null)}catch(a){this.h.O(a)}};a.prototype.Cb=function(a){b.prototype.Cb.call(this,a);var c;(c=a.getAttributeNode("url"))&&this.url.push(c.nodeValue.toString());
if(c=a.getAttributeNode("level"))this.level=Number(c.nodeValue);if(c=a.getAttributeNode("loop"))this.loop=Number(c.nodeValue);if(c=a.getAttributeNode("mode"))this.mode=Number(c.nodeValue);if(c=a.getAttributeNode("field"))this.wj=Number(c.nodeValue);if(c=a.getAttributeNode("ambientlevel"))this.vc=Number(c.nodeValue);if(c=a.getAttributeNode("pansize"))this.zb=Number(c.nodeValue);if(c=a.getAttributeNode("tiltsize"))this.oh=Number(c.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(c=a.getAttributeNode("url"))&&
this.url.push(c.nodeValue.toString()),a=a.nextSibling};return a}(g);m.El=h;h=function(b){function a(a){b.call(this,a);this.poster="";this.kb=this.Da=this.va=0;this.f=50;this.Qa=0;this.Vc=this.wf=!1}__extends(a,b);a.prototype.Qc=function(){1!=this.Qa&&4!=this.Qa||this.tf(!this.wb);2==this.Qa&&this.h.Ak(this.id)};a.prototype.tf=function(a){var c=this.h,b=c.Ga;if(1==this.Qa||4==this.Qa)if(this.wb=a,this.h.ub)(c=c.ga)&&c.activateSound(this.id,this.wb?1:0);else{if(this.wb)this.a.play(),this.a.style.zIndex=
(c.mg+8E4).toString(),this.a.style[this.h.Nc]="all 1s ease 0s",c.fe(this.id);else{this.a.style.zIndex=c.mg.toString();this.a.style[this.h.Nc]="all 1s ease 0s";this.Di=!0;var f=this;setTimeout(function(){f.Di=!1},1E3)}if(b&&(2==this.mode||3==this.mode||5==this.mode)){var b=b.currentTime,l=this.lc.gain.value,k=this.oc.gain.value,w=this.mc.gain.value,h=this.nc.gain.value;this.wb?(this.lc.gain.linearRampToValueAtTime(l,b),this.lc.gain.linearRampToValueAtTime(this.level*c.V,b+1),this.oc.gain.linearRampToValueAtTime(k,
b),this.oc.gain.linearRampToValueAtTime(this.level*c.V,b+1),this.mc.gain.linearRampToValueAtTime(w,b),this.mc.gain.linearRampToValueAtTime(0,b+1),this.nc.gain.linearRampToValueAtTime(h,b),this.nc.gain.linearRampToValueAtTime(0,b+1)):(this.lc.gain.linearRampToValueAtTime(l,b),this.lc.gain.linearRampToValueAtTime(this.Dc,b+1),this.oc.gain.linearRampToValueAtTime(k,b),this.oc.gain.linearRampToValueAtTime(this.Ec,b+1),this.mc.gain.linearRampToValueAtTime(w,b),this.mc.gain.linearRampToValueAtTime(this.sc,
b+1),this.nc.gain.linearRampToValueAtTime(h,b),this.nc.gain.linearRampToValueAtTime(this.tc,b+1))}this.sf=!0;this.h.ml()}2==this.Qa&&(a?this.h.fe(this.id):this.h.Bi(this.id))};a.prototype.uf=function(){this.sf=!1;this.a.style[this.h.Nc]="none"};a.prototype.Eo=function(){0==this.loop?this.a.play():0<this.Kc?(this.Kc--,this.a.currentTime=0,this.a.play()):this.dk=!1};a.prototype.Cb=function(a){b.prototype.Cb.call(this,a);var c;if(c=a.getAttributeNode("poster"))this.poster=String(c.nodeValue);if(c=a.getAttributeNode("rotx"))this.va=
Number(c.nodeValue);if(c=a.getAttributeNode("roty"))this.Da=Number(c.nodeValue);if(c=a.getAttributeNode("rotz"))this.kb=Number(c.nodeValue);if(c=a.getAttributeNode("fov"))this.f=Number(c.nodeValue);if(c=a.getAttributeNode("width"))this.yc=Number(c.nodeValue);if(c=a.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.gd=(c=a.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=a.getAttributeNode("clickmode"))this.Qa=Number(c.nodeValue);if(c=a.getAttributeNode("handcursor"))this.wf=1==Number(c.nodeValue)};
a.prototype.addElement=function(){var a=this,c=this.h;try{a.a=document.createElement("video");a.a.setAttribute("class","ggmedia");a.a.crossOrigin=c.crossOrigin;a.a.hidden=!0;c.De&&a.a.setAttribute("id",c.De+a.id);if(c.ig)a.a.setAttribute("webkit-playsinline","webkit-playsinline"),a.a.setAttribute("style","display: none; max-width:none;");else if(a.a.setAttribute("style","max-width:none;pointer-events:none;"),a.a.setAttribute("webkit-playsinline","webkit-playsinline"),1==a.Qa||4==a.Qa)a.a.addEventListener(c.sl(),
function(){a.uf()},!1),a.a.addEventListener("transitionend",function(){a.uf()},!1);var b;for(b=0;b<a.url.length;b++){var f;f=document.createElement("source");f.crossOrigin=c.crossOrigin;f.setAttribute("src",c.Vb(a.url[b]));a.a.appendChild(f)}""!=a.poster&&(a.a.poster=c.Vb(a.poster),0>a.loop&&(a.a.b="none"));a.a.volume=a.level*c.V;1<=a.loop&&(a.Kc=a.loop-1);(1==a.mode||2==a.mode||3==a.mode||5==a.mode)&&0<=a.loop&&(a.a.autoplay=!0,a.dk=!0,a.autoplay=!0);c.I.push(this);c.ig?c.U.appendChild(a.a):(a.a.style.position=
"absolute",a.yc&&(a.a.width=a.yc),a.Pc&&(a.a.height=a.Pc),c.A.appendChild(a.a),a.Bh());a.a.onclick=function(){a.Qc()};a.a.addEventListener("ended",function(){a.Eo()},!1)}catch(l){c.O(l)}};a.prototype.registerElement=function(a,c){this.Vc=!0;this.a=c;this.id=a;this.level=1;this.h.I.push(this)};a.prototype.rd=function(){var a=this.h;a.ig&&(a.G.deleteTexture(this.gc),this.gc=0,a.U.removeChild(this.a));a.nl&&a.A.removeChild(this.a);this.a=null};return a}(h);m.Nk=h;h=function(b){function a(a){b.call(this,
a);this.url="";this.kb=this.Da=this.va=0;this.f=50;this.Qa=0;this.wf=!1;this.Pc=this.yc=100;this.gd=1}__extends(a,b);a.prototype.Cb=function(a){b.prototype.Cb.call(this,a);var c;if(c=a.getAttributeNode("url"))this.url=c.nodeValue.toString();if(c=a.getAttributeNode("rotx"))this.va=Number(c.nodeValue);if(c=a.getAttributeNode("roty"))this.Da=Number(c.nodeValue);if(c=a.getAttributeNode("rotz"))this.kb=Number(c.nodeValue);if(c=a.getAttributeNode("fov"))this.f=Number(c.nodeValue);if(c=a.getAttributeNode("width"))this.yc=
Number(c.nodeValue);if(c=a.getAttributeNode("height"))this.Pc=Number(c.nodeValue);this.gd=(c=a.getAttributeNode("stretch"))?Number(c.nodeValue):1;if(c=a.getAttributeNode("clickmode"))this.Qa=Number(c.nodeValue);if(c=a.getAttributeNode("handcursor"))this.wf=1==Number(c.nodeValue);for(a=a.firstChild;a;)"source"==a.nodeName&&(c=a.getAttributeNode("url"))&&(this.url=c.nodeValue.toString()),a=a.nextSibling};a.prototype.uf=function(){this.sf=!1;this.a.style[this.h.Nc]="none"};a.prototype.Qc=function(){1!==
this.Qa&&4!==this.Qa||this.tf(!this.wb)};a.prototype.tf=function(a){var c=this.h;if(1===this.Qa||4===this.Qa)this.wb=a,this.h.ub?(a=this.h.ga)&&a.activateSound(this.id,this.wb?1:0):(this.a.style.zIndex=this.wb?(c.mg+8E4).toString():c.mg.toString(),this.a.style[c.Nc]="all 1s ease 0s",this.sf=!0,c.hl())};a.prototype.addElement=function(){var a=this,c=this.h;try{a.a=document.createElement("img");a.a.setAttribute("style","-webkit-user-drag:none; max-width:none; pointer-events:none;");a.a.setAttribute("class",
"ggmedia");a.a.hidden=!0;c.De&&a.a.setAttribute("id",c.De+a.id);a.a.ondragstart=function(){return!1};if(1===a.Qa||4===a.Qa)a.a.addEventListener(c.sl(),function(){a.uf()},!1),a.a.addEventListener("transitionend",function(){a.uf()},!1);a.a.setAttribute("src",c.Vb(a.url));a.yc&&(a.a.width=a.yc);a.Pc&&(a.a.height=a.Pc);c.Va.push(a);a.a.style.position="absolute";a.Qc&&(a.a.onclick=function(){a.Qc()});c.A.appendChild(a.a)}catch(b){c.O("Error addimage:"+b)}};a.prototype.rd=function(){this.h.A.removeChild(this.a);
this.a=null};return a}(g);m.Cl=h;g=function(b){function a(a){b.call(this,a);this.alpha=this.kj=50;this.type=0;this.color=16777215}__extends(a,b);a.prototype.Cb=function(a){b.prototype.Cb.call(this,a);var c;if(c=a.getAttributeNode("blinding"))this.kj=Number(c.nodeValue);if(c=a.getAttributeNode("alpha"))this.alpha=Number(c.nodeValue);if(c=a.getAttributeNode("type"))this.type=Number(c.nodeValue);if(c=a.getAttributeNode("color"))this.color=1*Number(c.nodeValue)};return a}(g);m.Dl=g;g=function(){function b(a){this.type=
"empty";this.Uk=this.id=this.target=this.description=this.title=this.url="";this.wh=100;this.Ig=20;this.xh=!1;this.a=null;this.cb=this.na=this.j=this.pan=0;this.Rb=a.w.Rb;this.Ob=a.w.Ob;this.Qb=a.w.Qb;this.Nb=a.w.Nb;this.Ce=a.w.Ce;this.kg=[]}b.prototype.ye=function(){this.id=this.id;this.pan=this.pan;this.tilt=this.j;this.url=this.url;this.target=this.target;this.title=this.title;this.description=this.description;this.skinid=this.Uk;this.obj=this.a};b.prototype.Cb=function(a){var d;if(d=a.getAttributeNode("url"))this.url=
d.nodeValue.toString();if(d=a.getAttributeNode("target"))this.target=d.nodeValue.toString();if(d=a.getAttributeNode("title"))this.title=d.nodeValue.toString();if(d=a.getAttributeNode("description"))this.description=d.nodeValue.toString();if(d=a.getAttributeNode("id"))this.id=d.nodeValue.toString();if(d=a.getAttributeNode("skinid"))this.Uk=d.nodeValue.toString();if(d=a.getAttributeNode("width"))this.wh=Number(d.nodeValue);if(d=a.getAttributeNode("height"))this.Ig=Number(d.nodeValue);if(d=a.getAttributeNode("wordwrap"))this.xh=
1==Number(d.nodeValue);d=a.getAttributeNode("pan");this.pan=1*(d?Number(d.nodeValue):0);d=a.getAttributeNode("tilt");this.j=1*(d?Number(d.nodeValue):0);if(d=a.getAttributeNode("bordercolor"))this.Rb=1*Number(d.nodeValue);if(d=a.getAttributeNode("backgroundcolor"))this.Ob=1*Number(d.nodeValue);if(d=a.getAttributeNode("borderalpha"))this.Qb=1*Number(d.nodeValue);if(d=a.getAttributeNode("backgroundalpha"))this.Nb=1*Number(d.nodeValue);if(d=a.getAttributeNode("handcursor"))this.Ce=1==Number(d.nodeValue);
for(a=a.firstChild;a;){if("vertex"==a.nodeName){var c={pan:0,j:0};d=a.getAttributeNode("pan");c.pan=1*(d?Number(d.nodeValue):0);d=a.getAttributeNode("tilt");c.j=1*(d?Number(d.nodeValue):0);this.kg.push(c)}a=a.nextSibling}this.ye()};return b}();m.Pg=g})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function h(b,a){this.x=b;this.y=a}h.prototype.Wa=function(b,a){this.x=b;this.y=a};h.prototype.jd=function(b,a,d){var c=a.y-b.y;this.x=b.x+(a.x-b.x)*d;this.y=b.y+c*d};h.prototype.Nl=function(b,a,d,c,e){var f;f=new h;f.jd(b,d,e);b=new h;b.jd(d,c,e);d=new h;d.jd(c,a,e);a=new h;a.jd(f,b,e);f=new h;f.jd(b,d,e);b=new h;b.jd(a,f,e);this.x=b.x;this.y=b.y};h.prototype.Fh=function(b,a,d,c,e){var f=new h,l=.5,k=.25;do{f.Nl(b,a,d,c,l);var w=f.x-e,l=0<w?l-k:l+k,k=k/2}while(.01<Math.abs(w));
this.x=f.x;this.y=f.y};return h}();m.jc=g})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function h(b,a,d,c,e){this.x=b;this.y=a;this.z=d;this.Zc=c;this.Fb=e}h.prototype.Wa=function(b,a,d,c,e){this.x=b;this.y=a;this.z=d;this.Zc=c;this.Fb=e};h.prototype.toString=function(){return"("+this.x+","+this.y+","+this.z+") - ("+this.Zc+","+this.Fb+")"};h.prototype.va=function(b){var a=Math.sin(b);b=Math.cos(b);var d=this.y,c=this.z;this.y=b*d-a*c;this.z=a*d+b*c};h.prototype.Bn=function(){var b=this.y;this.y=-this.z;this.z=b};h.prototype.An=function(){var b=this.y;
this.y=this.z;this.z=-b};h.prototype.Da=function(b){var a=Math.sin(b);b=Math.cos(b);var d=this.x,c=this.z;this.x=b*d+a*c;this.z=-a*d+b*c};h.prototype.Cn=function(){var b=this.x;this.x=-this.z;this.z=b};h.prototype.kb=function(b){var a=Math.sin(b);b=Math.cos(b);var d=this.x,c=this.y;this.x=b*d-a*c;this.y=a*d+b*c};h.prototype.Lk=function(){var b=this.x;this.x=-this.y;this.y=b};h.prototype.he=function(b){return this.va(b*Math.PI/180)};h.prototype.Qf=function(b){return this.Da(b*Math.PI/180)};h.prototype.eh=
function(b){return this.kb(b*Math.PI/180)};h.prototype.clone=function(){return new h(this.x,this.y,this.z,this.Zc,this.Fb)};h.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)};h.prototype.normalize=function(){var b=this.length();0<b&&(b=1/b,this.x*=b,this.y*=b,this.z*=b)};h.prototype.$g=function(b){return this.x*b.x+this.y*b.y+this.z*b.z};h.prototype.yj=function(b,a){var d;d=Math.cos(a*Math.PI/180);this.x=d*Math.sin(b*Math.PI/180);this.y=Math.sin(a*Math.PI/180);
this.z=d*Math.cos(b*Math.PI/180)};h.prototype.Jl=function(){return 180*Math.atan2(-this.x,-this.z)/Math.PI};h.prototype.Kl=function(){return 180*Math.asin(this.y/this.length())/Math.PI};h.prototype.jd=function(b,a,d){this.x=b.x*d+a.x*(1-d);this.y=b.y*d+a.y*(1-d);this.z=b.z*d+a.z*(1-d);this.Zc=b.Zc*d+a.Zc*(1-d);this.Fb=b.Fb*d+a.Fb*(1-d)};return h}();m.ra=g})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function h(){this.Hn()}h.prototype.Hn=function(){this.Wb=1;this.Zb=this.Yb=this.Xb=0;this.$b=1;this.cc=this.bc=this.ac=0;this.dc=1};h.prototype.clone=function(b){this.Wb=b.Wb;this.Xb=b.Xb;this.Yb=b.Yb;this.Zb=b.Zb;this.$b=b.$b;this.ac=b.ac;this.bc=b.bc;this.cc=b.cc;this.dc=b.dc};h.prototype.Rn=function(b){var a=Math.cos(b);b=Math.sin(b);this.Wb=1;this.Zb=this.Yb=this.Xb=0;this.$b=a;this.ac=-b;this.bc=0;this.cc=b;this.dc=a};h.prototype.Sn=function(b){var a=Math.cos(b);
b=Math.sin(b);this.Wb=a;this.Xb=0;this.Yb=b;this.Zb=0;this.$b=1;this.ac=0;this.bc=-b;this.cc=0;this.dc=a};h.prototype.Tn=function(b){var a=Math.cos(b);b=Math.sin(b);this.Wb=a;this.Xb=-b;this.Yb=0;this.Zb=b;this.$b=a;this.cc=this.bc=this.ac=0;this.dc=1};h.prototype.On=function(b){this.Rn(b*Math.PI/180)};h.prototype.Pn=function(b){this.Sn(b*Math.PI/180)};h.prototype.Qn=function(b){this.Tn(b*Math.PI/180)};h.prototype.he=function(b){var a,d;a=new h;d=new h;a.On(b);d.clone(this);this.multiply(a,d)};h.prototype.Qf=
function(b){var a,d;a=new h;d=new h;a.Pn(b);d.clone(this);this.multiply(a,d)};h.prototype.eh=function(b){var a,d;a=new h;d=new h;a.Qn(b);d.clone(this);this.multiply(a,d)};h.prototype.multiply=function(b,a){this.Wb=b.Wb*a.Wb+b.Xb*a.Zb+b.Yb*a.bc;this.Xb=b.Wb*a.Xb+b.Xb*a.$b+b.Yb*a.cc;this.Yb=b.Wb*a.Yb+b.Xb*a.ac+b.Yb*a.dc;this.Zb=b.Zb*a.Wb+b.$b*a.Zb+b.ac*a.bc;this.$b=b.Zb*a.Xb+b.$b*a.$b+b.ac*a.cc;this.ac=b.Zb*a.Yb+b.$b*a.ac+b.ac*a.dc;this.bc=b.bc*a.Wb+b.cc*a.Zb+b.dc*a.bc;this.cc=b.bc*a.Xb+b.cc*a.$b+b.dc*
a.cc;this.dc=b.bc*a.Yb+b.cc*a.ac+b.dc*a.dc};h.prototype.cn=function(b){var a,d,c;a=b.x;d=b.y;c=b.z;b.x=a*this.Wb+d*this.Xb+c*this.Yb;b.y=a*this.Zb+d*this.$b+c*this.ac;b.z=a*this.bc+d*this.cc+c*this.dc};return h}();m.xl=g})(ggP2VR||(ggP2VR={}));
(function(m){m.T={create:function(g){var h;"undefined"!=typeof Float32Array?h=new Float32Array(16):h=Array(16);g&&(h[0]=g[0],h[1]=g[1],h[2]=g[2],h[3]=g[3],h[4]=g[4],h[5]=g[5],h[6]=g[6],h[7]=g[7],h[8]=g[8],h[9]=g[9],h[10]=g[10],h[11]=g[11],h[12]=g[12],h[13]=g[13],h[14]=g[14],h[15]=g[15]);return h},set:function(g,h){h[0]=g[0];h[1]=g[1];h[2]=g[2];h[3]=g[3];h[4]=g[4];h[5]=g[5];h[6]=g[6];h[7]=g[7];h[8]=g[8];h[9]=g[9];h[10]=g[10];h[11]=g[11];h[12]=g[12];h[13]=g[13];h[14]=g[14];h[15]=g[15];return h},Cd:function(g){g[0]=
1;g[1]=0;g[2]=0;g[3]=0;g[4]=0;g[5]=1;g[6]=0;g[7]=0;g[8]=0;g[9]=0;g[10]=1;g[11]=0;g[12]=0;g[13]=0;g[14]=0;g[15]=1;return g},multiply:function(g,h,b){b||(b=g);var a=g[0],d=g[1],c=g[2],e=g[3],f=g[4],l=g[5],k=g[6],w=g[7],y=g[8],n=g[9],m=g[10],p=g[11],u=g[12],t=g[13],v=g[14];g=g[15];var q=h[0],x=h[1],B=h[2],A=h[3],z=h[4],C=h[5],D=h[6],E=h[7],F=h[8],H=h[9],I=h[10],J=h[11],K=h[12],L=h[13],M=h[14];h=h[15];b[0]=q*a+x*f+B*y+A*u;b[1]=q*d+x*l+B*n+A*t;b[2]=q*c+x*k+B*m+A*v;b[3]=q*e+x*w+B*p+A*g;b[4]=z*a+C*f+D*y+
E*u;b[5]=z*d+C*l+D*n+E*t;b[6]=z*c+C*k+D*m+E*v;b[7]=z*e+C*w+D*p+E*g;b[8]=F*a+H*f+I*y+J*u;b[9]=F*d+H*l+I*n+J*t;b[10]=F*c+H*k+I*m+J*v;b[11]=F*e+H*w+I*p+J*g;b[12]=K*a+L*f+M*y+h*u;b[13]=K*d+L*l+M*n+h*t;b[14]=K*c+L*k+M*m+h*v;b[15]=K*e+L*w+M*p+h*g;return b},translate:function(g,h,b){var a=h[0],d=h[1];h=h[2];if(!b||g==b)return g[12]=g[0]*a+g[4]*d+g[8]*h+g[12],g[13]=g[1]*a+g[5]*d+g[9]*h+g[13],g[14]=g[2]*a+g[6]*d+g[10]*h+g[14],g[15]=g[3]*a+g[7]*d+g[11]*h+g[15],g;var c=g[0],e=g[1],f=g[2],l=g[3],k=g[4],w=g[5],
y=g[6],n=g[7],m=g[8],p=g[9],u=g[10],t=g[11];b[0]=c;b[1]=e;b[2]=f;b[3]=l;b[4]=k;b[5]=w;b[6]=y;b[7]=n;b[8]=m;b[9]=p;b[10]=u;b[11]=t;b[12]=c*a+k*d+m*h+g[12];b[13]=e*a+w*d+p*h+g[13];b[14]=f*a+y*d+u*h+g[14];b[15]=l*a+n*d+t*h+g[15];return b},scale:function(g,h,b){var a=h[0],d=h[1];h=h[2];if(!b||g==b)return g[0]*=a,g[1]*=a,g[2]*=a,g[3]*=a,g[4]*=d,g[5]*=d,g[6]*=d,g[7]*=d,g[8]*=h,g[9]*=h,g[10]*=h,g[11]*=h,g;b[0]=g[0]*a;b[1]=g[1]*a;b[2]=g[2]*a;b[3]=g[3]*a;b[4]=g[4]*d;b[5]=g[5]*d;b[6]=g[6]*d;b[7]=g[7]*d;b[8]=
g[8]*h;b[9]=g[9]*h;b[10]=g[10]*h;b[11]=g[11]*h;b[12]=g[12];b[13]=g[13];b[14]=g[14];b[15]=g[15];return b},rotate:function(g,h,b,a){var d=b[0],c=b[1];b=b[2];var e=Math.sqrt(d*d+c*c+b*b);if(!e)return null;1!=e&&(e=1/e,d*=e,c*=e,b*=e);var f=Math.sin(h),l=Math.cos(h),k=1-l;h=g[0];var e=g[1],w=g[2],y=g[3],n=g[4],m=g[5],p=g[6],u=g[7],t=g[8],v=g[9],q=g[10],x=g[11],B=d*d*k+l,A=c*d*k+b*f,z=b*d*k-c*f,C=d*c*k-b*f,D=c*c*k+l,E=b*c*k+d*f,F=d*b*k+c*f,d=c*b*k-d*f,c=b*b*k+l;a?g!=a&&(a[12]=g[12],a[13]=g[13],a[14]=g[14],
a[15]=g[15]):a=g;a[0]=h*B+n*A+t*z;a[1]=e*B+m*A+v*z;a[2]=w*B+p*A+q*z;a[3]=y*B+u*A+x*z;a[4]=h*C+n*D+t*E;a[5]=e*C+m*D+v*E;a[6]=w*C+p*D+q*E;a[7]=y*C+u*D+x*E;a[8]=h*F+n*d+t*c;a[9]=e*F+m*d+v*c;a[10]=w*F+p*d+q*c;a[11]=y*F+u*d+x*c;return a},hm:function(g,h,b,a,d,c,e){e||(e=m.T.create());var f=h-g,l=a-b,k=c-d;e[0]=2*d/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2*d/l;e[6]=0;e[7]=0;e[8]=(h+g)/f;e[9]=(a+b)/l;e[10]=-(c+d)/k;e[11]=-1;e[12]=0;e[13]=0;e[14]=-(c*d*2)/k;e[15]=0;return e},perspective:function(g,h,b,a,d){g=
b*Math.tan(g*Math.PI/360);h=g*h;return m.T.hm(-h,h,-g,g,b,a,d)},Ro:function(g,h,b,a,d,c,e){e||(e=m.T.create());var f=h-g,l=a-b,k=c-d;e[0]=2/f;e[1]=0;e[2]=0;e[3]=0;e[4]=0;e[5]=2/l;e[6]=0;e[7]=0;e[8]=0;e[9]=0;e[10]=-2/k;e[11]=0;e[12]=-(g+h)/f;e[13]=-(a+b)/l;e[14]=-(c+d)/k;e[15]=1;return e}}})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function h(b){this.ca=m.T.create();this.$a=m.T.create();this.ka=this.Rc=0;this.wd=5;this.Eb=0;this.Sa=[];this.Af=!1;this.Ri=this.Zh=this.Hi=1;this.ve=1E6;this.vg=[!1,!1,!1,!1,!1,!1];this.jh=!1;this.dj=8;this.h=b;if(b.$d||b.Kg)b.wd=2}h.prototype.zf=function(){var b=this.h.G;if(b){var a=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(a,"#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}");
b.compileShader(a);b.getShaderParameter(a,b.COMPILE_STATUS)||(console&&console.log(b.getShaderInfoLog(a)),alert(b.getShaderInfoLog(a)),a=null);var d=b.createShader(b.VERTEX_SHADER);this.xc(d,"#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.D=b.createProgram();this.Fe(this.D,d,a);this.D.Z=b.getAttribLocation(this.D,"aVertexPosition");b.enableVertexAttribArray(this.D.Z);this.D.wa=b.getAttribLocation(this.D,"aTextureCoord");b.enableVertexAttribArray(this.D.wa);this.D.Fd=b.getUniformLocation(this.D,"uPMatrix");this.D.Lf=b.getUniformLocation(this.D,"uMVMatrix");this.D.Ne=b.getUniformLocation(this.D,"uSampler");this.D.Ah=b.getUniformLocation(this.D,"uZoffset");a=b.createShader(b.VERTEX_SHADER);this.xc(a,"#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}");
d=b.createShader(b.FRAGMENT_SHADER);this.xc(d,"#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.pd=b.createProgram();this.Fe(this.pd,a,d);this.pd.Z=b.getAttribLocation(this.pd,"aVertexPosition");b.enableVertexAttribArray(this.pd.Z);d=b.createShader(b.VERTEX_SHADER);this.xc(d,"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}");
a=b.createShader(b.FRAGMENT_SHADER);this.xc(a,"#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.kf=b.createProgram();this.Fe(this.kf,d,a)}};h.prototype.Jg=function(){var b=this.h,a=b.G,d,c;a?(d=a.createShader(a.FRAGMENT_SHADER),c=this.di(13),this.xc(d,c),c=a.createShader(a.VERTEX_SHADER),
this.xc(c,"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.Fk=a.createProgram(),this.Fe(this.Fk,c,d),d=a.createShader(a.FRAGMENT_SHADER),c=this.di(4),this.xc(d,c),c=a.createShader(a.VERTEX_SHADER),this.xc(c,"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.Gk=a.createProgram(),this.Fe(this.Gk,c,d),d=a.createShader(a.FRAGMENT_SHADER),c=this.di(b.o.format),this.xc(d,c),c=a.createShader(a.VERTEX_SHADER),this.xc(c,"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.Hk=a.createProgram(),this.Fe(this.Hk,c,d),this.bh||(this.bh=a.createBuffer())):this.h.O("No WebGL to initRemapShader!")};h.prototype.xc=function(b,a){var d=this.h.G;d.shaderSource(b,a);d.compileShader(b);d.getShaderParameter(b,d.COMPILE_STATUS)||(console&&console.log(d.getShaderInfoLog(b)),O&&alert(d.getShaderInfoLog(b)))};h.prototype.Fe=function(b,a,d){var c=this.h.G;c.attachShader(b,a);c.attachShader(b,d);c.linkProgram(b);c.getProgramParameter(b,c.LINK_STATUS)||(alert("Could not initialise shader program"),
console&&console.log(c.getError()));c.useProgram(b)};h.prototype.di=function(b){var a=this.h,d;d="#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";
d=(13==b?d+"uniform samplerCube cubeTexture;":d+"uniform sampler2D tileTexture;\n")+"void main()\n{\n";d+="vec4 direction;\n";d+="vec2 src;\n";d+="vec2 srcCord;\n";d+="vec2 texc;\n";var c=this.Nj(a.ya());a.ya()!=a.ec&&0!=a.ec?(a=this.Nj(a.ec),d+="vec4 direction1,direction2;\n",d+=c.replace("direction=","direction1="),d+=a.replace("direction=","direction2="),d+="direction=normalize(mix(direction1, direction2,1.0-directionBlend));\n"):d+=c;d+="direction=direction*matRotate;\n";13==b&&(d+="direction.z=-direction.z;",
d+="gl_FragColor = textureCube(cubeTexture, direction.xyz);");4==b&&(d+="float iz=1.0/(direction.z * rectSrcDistance);\n",d+="src.x=-direction.x*iz;\n",d+="src.y= direction.y*iz;\n",d+="texc=src * srcScale + srcOffset;\n",d+="if (",d+="(direction.z<0.0) && ",d+="(texc.x>=0.0) && (texc.x<=1.0) && (texc.y>=0.0) && (texc.y<=1.0)) {\n",d+="  gl_FragColor = texture2D(tileTexture, texc);\n",d+="} else {\n",d+="  discard;\n",d+="}\n");1==b&&(d+="src.x=atan(float(-direction.x), float(-direction.z));",d+=
"src.y=asin(direction.y);\n",d+="texc=src * srcScale + srcOffset;\n",d+="gl_FragColor = texture2D(tileTexture, texc);\n");14==b&&(d+="vec2 cf;\n",d+="if ((direction.z<0.0) && (direction.z<=-abs(direction.x)) && (direction.z<=-abs(direction.y))) {\n",d+="  src.x=-direction.x/direction.z;\n",d+="  src.y=+direction.y/direction.z;\n",d+="  cf.x=1.0;cf.y=3.0;\n",d+="}\n",d+="if ((direction.x>=0.0) && (direction.x>=abs(direction.y)) && (direction.x>=abs(direction.z))) {\n",d+="  src.x=+direction.z/direction.x;\n",
d+="  src.y=-direction.y/direction.x;\n",d+="  cf.x=3.0;cf.y=3.0;\n",d+="}\n",d+="if ((direction.z>=0.0) && (direction.z>=abs(direction.x)) && (direction.z>=abs(direction.y))) {\n",d+="  src.x=-direction.x/direction.z;\n",d+="  src.y=-direction.y/direction.z;\n",d+="  cf.x=5.0;cf.y=3.0;\n",d+="}\n",d+="if ((direction.x<=0.0) && (direction.x<=-abs(direction.y)) && (direction.x<=-abs(direction.z))) {\n",d+="  src.x=+direction.z/direction.x;\n",d+="  src.y=+direction.y/direction.x;\n",d+="  cf.x=1.0;cf.y=1.0;\n",
d+="}\n",d+="if ((direction.y>=0.0) && (direction.y>=abs(direction.x)) && (direction.y>=abs(direction.z))) {\n",d+="  src.x=+direction.x/direction.y;\n",d+="  src.y=-direction.z/direction.y;\n",d+="  cf.x=5.0;cf.y=1.0;\n",d+="}\n",d+="if ((direction.y<=0.0) && (direction.y<=-abs(direction.x)) && (direction.y<=-abs(direction.z))) {\n",d+="  src.x=-direction.x/direction.y;\n",d+="  src.y=-direction.z/direction.y;\n",d+="  cf.x=3.0;cf.y=1.0;\n",d+="}\n",d+="texc.x=(cf.x+src.x*srcScale.x) / 6.0;\n",d+=
"texc.y=(cf.y+src.y*srcScale.y) / 4.0;\n",d+="gl_FragColor = texture2D(tileTexture, texc);\n");return d+="}\n"};h.prototype.Nj=function(b){var a="";switch(b){case 4:a+="direction.x=dst.x*rectDstDistance;\ndirection.y=dst.y*rectDstDistance;\ndirection.z=-1.0;\n";break;case 12:a+="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:a+="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 a+
"direction.w=0.0;\ndirection=normalize(direction);\n"};h.prototype.Wj=function(b){var a,d,c,e,f=this.h,l=this.h.G;this.Oh=l.createBuffer();l.bindBuffer(l.ARRAY_BUFFER,this.Oh);var k=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];for(a=0;12>a;a++)2>a%3&&(k[a]*=b);l.bufferData(l.ARRAY_BUFFER,new Float32Array(k),l.STATIC_DRAW);this.Sd=l.createBuffer();l.bindBuffer(l.ARRAY_BUFFER,this.Sd);var w=[1,0,0,0,0,1,1,1];l.bufferData(l.ARRAY_BUFFER,new Float32Array(w),l.STATIC_DRAW);this.Jc=l.createBuffer();l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,
this.Jc);var h=[0,1,2,0,2,3];l.bufferData(l.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),l.STATIC_DRAW);var k=[],h=[],w=[],g=new m.ra;for(b=0;6>b;b++){c=b%3;e=3>b?1:0;for(d=0;4>d;d++){g.x=-1;g.y=-1;g.z=1;for(a=0;a<d;a++)g.Lk();w.push((0>g.x?.33:0)+.33*c,(0>g.y?0:.5)+.5*e);if(4>b)for(a=0;a<b;a++)g.Cn();else 5==b?g.Bn():g.An();k.push(g.x,g.y,g.z)}a=4*b;h.push(0+a,1+a,2+a,0+a,2+a,3+a)}f.o.aj=l.createBuffer();l.bindBuffer(l.ARRAY_BUFFER,f.o.aj);l.bufferData(l.ARRAY_BUFFER,new Float32Array(k),l.STATIC_DRAW);
f.o.lh=l.createBuffer();l.bindBuffer(l.ARRAY_BUFFER,f.o.lh);l.bufferData(l.ARRAY_BUFFER,new Float32Array(w),l.STATIC_DRAW);f.o.ji=l.createBuffer();l.bindBuffer(l.ELEMENT_ARRAY_BUFFER,f.o.ji);l.bufferData(l.ELEMENT_ARRAY_BUFFER,new Uint16Array(h),l.STATIC_DRAW);this.Qm=l.createBuffer();this.Pm=l.createBuffer()};h.prototype.fi=function(b){var a=this;return function(){try{if(b.fn)return;var d=a.h.G;d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,1);var c=!1;null!=b.be&&b.be.complete?b.Rj||(d.bindTexture(d.TEXTURE_2D,
b),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,b.be),c=b.Rj=!0):null!=b.Ie&&b.Ie.complete&&(d.bindTexture(d.TEXTURE_2D,b),d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,b.Ie),c=!0);c&&(b.loaded=!0);d.bindTexture(d.TEXTURE_2D,null);d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,0)}catch(e){a.h.O(e)}a.h.update()}};h.prototype.Xj=function(){var b,a,d=this.h,c=d.G;if(this.Sa)for(;0<this.Sa.length;)c.deleteTexture(this.Sa.pop());this.Sa=[];for(var e=0;6>e;e++)a=c.createTexture(),this.Rc++,
a.Ie=null,a.be=null,a.Rj=!1,c.bindTexture(c.TEXTURE_2D,a),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE),d.we[e]&&(b=new Image,b.crossOrigin=d.crossOrigin,b.src=d.Vb(d.we[e]),a.Ie=b,b.addEventListener&&b.addEventListener("load",this.fi(a),!1),d.Gb.push(b)),this.Sa.push(a);for(e=0;6>e;e++)d.wg[e]&&
(b=new Image,b.crossOrigin=d.crossOrigin,b.src=d.Vb(d.wg[e]),b.addEventListener?b.addEventListener("load",this.fi(this.Sa[e]),!1):b.onload=this.fi(this.Sa[e]),this.Sa[e].be=b,d.Gb.push(b));for(e=0;e<d.I.length;e++)d.I[e].Vc||(d.I[e].gc=c.createTexture(),d.Rc++,c.bindTexture(c.TEXTURE_2D,d.I[e].gc),c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR),c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE),c.texParameteri(c.TEXTURE_2D,
c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE));d.o.gc=c.createTexture();d.Rc++;c.bindTexture(c.TEXTURE_2D,d.o.gc);c.texImage2D(c.TEXTURE_2D,0,c.RGB,1,1,0,c.RGB,c.UNSIGNED_BYTE,null);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_MIN_FILTER,c.LINEAR);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_2D,c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.bindTexture(c.TEXTURE_2D,null)};h.prototype.Ko=function(){var b=this.h;if(b.m.width!=b.A.offsetWidth||b.m.height!=b.A.offsetHeight)b.m.width=b.A.offsetWidth,
b.m.height=b.A.offsetHeight;b.Wd&&(b.zc(0),b.$c());if(b.G){var a=b.G;this.rh();a.clear(a.DEPTH_BUFFER_BIT);a.useProgram(this.D);this.Yf(0);a.uniform1i(this.D.Ne,0);a.enableVertexAttribArray(this.D.Z);a.enableVertexAttribArray(this.D.wa);a.bindBuffer(a.ARRAY_BUFFER,this.Sd);a.vertexAttribPointer(this.D.wa,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc);a.uniform1f(this.D.Ah,1E-4);a.vertexAttribPointer(this.D.Z,3,a.FLOAT,!1,0,0);m.T.Cd(this.$a);m.T.perspective(b.Jb(),
b.hb.width/b.hb.height,.1,100,this.$a);a.uniformMatrix4fv(this.D.Fd,!1,this.$a);for(b=0;6>b;b++)this.Yf(b),a.bindBuffer(a.ARRAY_BUFFER,this.Oh),a.vertexAttribPointer(this.D.Z,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.Sd),a.vertexAttribPointer(this.D.wa,2,a.FLOAT,!1,0,0),6<=this.Sa.length&&this.Sa[b].loaded&&(a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.Sa[b]),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc),a.uniform1i(this.D.Ne,0),a.uniformMatrix4fv(this.D.Lf,!1,this.ca),a.uniformMatrix4fv(this.D.Fd,
!1,this.$a),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0))}};h.prototype.rh=function(){var b=this.h;if(b.g.Ke&&6<b.g.Ke.length){var a=parseInt(b.g.Ke);b.G.clearColor((a>>16&255)/255,(a>>8&255)/255,(a>>0&255)/255,1)}};h.prototype.Yf=function(b){var a=this.h;m.T.Cd(this.ca);m.T.rotate(this.ca,-a.L.c*Math.PI/180,[0,0,1]);m.T.rotate(this.ca,-a.j.c*Math.PI/180,[1,0,0]);m.T.rotate(this.ca,(180-a.pan.c)*Math.PI/180,[0,1,0]);a.Ca&&(m.T.rotate(this.ca,-a.Ca.pitch*Math.PI/180,[1,0,0]),m.T.rotate(this.ca,
a.Ca.L*Math.PI/180,[0,0,1]));4>b?m.T.rotate(this.ca,-Math.PI/2*b,[0,1,0]):m.T.rotate(this.ca,Math.PI/2*(5==b?1:-1),[1,0,0])};h.prototype.no=function(b){var a=this;return function(){a.h.xa=!0;a.h.Lc=!0;b.loaded=!0;b.Ii=0;b.Hd=0;var d=a.h.G;a.ka&&a.ka--;0==a.ka&&a.h.M&&a.h.M.ggLoadedLevels&&a.h.M.ggLoadedLevels();d.pixelStorei(d.UNPACK_FLIP_Y_WEBGL,1);if(null!=b.g&&b.g.complete){b.gb=d.createTexture();a.h.Rc++;d.bindTexture(d.TEXTURE_2D,b.gb);try{d.texImage2D(d.TEXTURE_2D,0,d.RGBA,d.RGBA,d.UNSIGNED_BYTE,
b.g)}catch(c){d.texImage2D(d.TEXTURE_2D,0,d.RGBA,1,1,0,d.RGBA,d.UNSIGNED_BYTE,new Uint8Array([128,128,128,250])),a.h.O(c)}}a.h.update()}};h.prototype.dn=function(b){var a=this;return function(){a.h.xa=!0;a.h.Lc=!0;var d=a.h.g;try{if(null!=b&&b.complete){var c=d.H[d.H.length-1],e=d.Ja;c.height=c.width=b.width-2*e;c.K=c.da=1;for(var f=0;6>f;f++){var l=new m.Bd;l.J=document.createElement("canvas");a.h.ea?(l.J.width=c.width+2*e,l.J.height=c.height+2*e):(l.J.width=d.F+2*e,l.J.height=d.F+2*e);l.Ma=l.J.getContext("2d");
l.J.style[a.h.Ta+"Origin"]="0% 0%";l.J.style.overflow="hidden";l.J.style.position="absolute";l.g=b;var k=c.width+2*e,w=c.height+2*e;l.Ma&&l.Ma.drawImage(b,0,f*w,k,w,0,0,k,w);if(a.h.ea&&a.h.G){var g=a.h.G;g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,1);l.gb=g.createTexture();a.h.Rc++;g.bindTexture(g.TEXTURE_2D,l.gb);try{g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,l.J)}catch(h){a.h.O(h)}g.bindTexture(g.TEXTURE_2D,null);g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,0)}a.h.Cc&&(l.J.Ad=-1,a.h.A.insertBefore(l.J,
a.h.A.firstChild));c.W[f]=l}c.loaded=!0}}catch(h){a.h.O(h)}a.h.update()}};h.prototype.dl=function(b){var a=this;return function(){a.h.xa=!0;a.h.Lc=!0;a.ka&&a.ka--;0==a.ka&&a.h.M&&a.h.M.ggLoadedLevels&&a.h.M.ggLoadedLevels();b.g=null}};h.prototype.Io=function(){var b=this.h,a=b.g,d=b.g.H;b.Wd&&(b.zc(0),b.$c());if(b.G){var c=b.G;c.useProgram(this.D);this.rh();c.clear(c.DEPTH_BUFFER_BIT);c.enable(c.DEPTH_TEST);m.T.Cd(this.$a);m.T.perspective(b.Jb(),b.hb.width/b.hb.height,.1,100,this.$a);c.uniformMatrix4fv(this.D.Fd,
!1,this.$a);this.Eb=0;b.jl();b.ri();var e=b.Wh(),f;for(f=d.length-1;f>=e;){var l=d[f],k=1;f==d.length-1&&0==a.Ja&&(k=a.F/(a.F-.5));for(var w=0;6>w;w++){var g;g=this.h.eb.Za[w];var h=g.Ge;if(g.pc&&0<h.Ye&&0<h.lg&&0<h.scale||l.cache){g.xa=!1;var r;g.qe[f]||(g.qe[f]={Ua:0,qb:0,rb:0,sb:0});r=g.qe[f];l.cache?(r.Ua=0,r.qb=0,r.rb=l.K-1,r.sb=l.da-1):b.Oj(l,h,r);for(var h=!0,p=r.qb;p<=r.sb;p++)for(var u=r.Ua;u<=r.rb;u++){var t=u+p*l.K+w*l.K*l.da,v=l.W[t];v||(v=l.W[t]=new m.Bd);this.ka<this.wd?v.g||(v.Hd?v.Hd--:
(this.Sg(v,l,b.ke(w,f,u,p)),b.xa=!0)):this.Eb++;if(v.gb){if(!v.vf){t=.5*f+1;v.vf=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,v.vf);var q=[-1,-1,1,1,-1,1,1,1,1,-1,1,1];q[3]=u*a.F-a.Ja;q[0]=Math.min((u+1)*a.F,l.width)+a.Ja;q[7]=p*a.F-a.Ja;q[1]=Math.min((p+1)*a.F,l.height)+a.Ja;q[4]=q[1];q[6]=q[3];q[9]=q[0];q[10]=q[7];for(var x=0;12>x;x++)q[x]=0==x%3?k*t*(-2*q[x]/l.width+1):1==x%3?k*t*(-2*q[x]/l.height+1):t;c.bufferData(c.ARRAY_BUFFER,new Float32Array(q),c.STATIC_DRAW)}}else h=!1;v.visible=g.pc}r.ni=
h}}f--}for(w=0;6>w;w++)if(g=b.eb.Za[w],g.pc)for(h=g.Ge,this.Yf(w),c.uniform1i(this.D.Ne,0),c.uniformMatrix4fv(this.D.Fd,!1,this.$a),c.uniformMatrix4fv(this.D.Lf,!1,this.ca),c.enableVertexAttribArray(this.D.Z),c.enableVertexAttribArray(this.D.wa),c.bindBuffer(c.ARRAY_BUFFER,this.Sd),c.vertexAttribPointer(this.D.wa,2,c.FLOAT,!1,0,0),c.activeTexture(c.TEXTURE0),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Jc),c.useProgram(this.D),f=e;f<=d.length-1;){l=d[f];if(g.pc&&0<h.Ye&&g.qe[f]&&0<=g.qe[f].Ua){r=g.qe[f];
for(p=r.qb;p<=r.sb;p++)for(u=r.Ua;u<=r.rb;u++)t=u+p*l.K+w*l.K*l.da,(v=l.W[t])&&v.gb&&(c.uniform1f(this.D.Ah,1E-4*(u%2+p%2*2)),c.bindBuffer(c.ARRAY_BUFFER,v.vf),c.vertexAttribPointer(this.D.Z,3,c.FLOAT,!1,0,0),c.bindTexture(c.TEXTURE_2D,v.gb),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)),v.visible=g.pc;r.ni&&(f=d.length)}f++}this.Ji();b.Lc=!1}};h.prototype.Sg=function(b,a,d){var c=this.h;c.ii++;b.g=new Image;b.Ii++;b.Hd=1<<b.Ii;b.g.onload=this.no(b);b.g.onerror=this.dl(b);b.g.onabort=this.dl(b);b.g.crossOrigin=c.crossOrigin;b.g.setAttribute("src",d);a.cache&&c.Gb.push(b.g);0==this.ka&&c.M&&c.M.ggReLoadedLevels&&c.M.ggReLoadedLevels();this.ka++};h.prototype.rl=function(){var b=this.h,a=b.g;b.Wd&&(b.zc(0),b.$c());if(b.G){var d=b.G;this.rh();O&&d.clearColor(.2,
0,0,1);d.clear(d.DEPTH_BUFFER_BIT);d.disable(d.DEPTH_TEST);d.disable(d.CULL_FACE);d.bindBuffer(d.ARRAY_BUFFER,this.bh);var c=[0,0];c[2]=b.m.width;c[3]=0;c[4]=b.m.width;c[5]=b.m.height;c[6]=0;c[7]=b.m.height;d.bufferData(d.ARRAY_BUFFER,new Float32Array(c),d.STATIC_DRAW);this.Eb=0;if(!this.qc||this.Af)0<a.H.length?this.$l():this.am();b.o.md?this.mn():(d.enable(d.DEPTH_TEST),d.depthRange(0,1),d.depthFunc(d.LESS),this.jh=!1,0<a.H.length&&this.Jo(),this.qc&&!this.jh&&this.ln())}};h.prototype.Yn=function(b,
a,d,c,e,f,l){var k=this.h,g=k.g,h=k.m,n=d*g.F/a.width,r=(d+1)*g.F/a.width;d=c*g.F/a.height;a=(c+1)*g.F/a.height;1<r&&(e*=2,r=1);1<a&&(e*=2,a=1);e=Math.min(this.dj,e);var r=(r-n)/e,p=(a-d)/e;c=a=0;var u,t,g={x:0,y:0},v={x:0,y:0},q=0;b.Hg=0;var x=k.Mf,B=new m.ra,A=new m.xl;4>f?A.Qf(-90*f):A.he(5==f?90:-90);k.Ca&&(A.eh(k.Ca.L),A.he(-k.Ca.pitch));A.Qf(-k.pan.c);A.he(k.j.c);A.eh(k.L.c);for(f=0;f<=e;f++)for(var z=0;z<=e;z++)u=2*(n+z*r)-1,t=2*(d+f*p)-1,B.x=1*u,B.y=1*t,B.z=-1,B.normalize(),A.cn(B),u=this.Lj(B,
g,k.ya()),0!=k.ec&&1>x&&(u=u&&this.Lj(B,v,k.ec),g.x=g.x*x+v.x*(1-x),g.y=g.y*x+v.y*(1-x)),u?-1E10<g.x&&1E10>g.x&&-1E10<g.y&&1E10>g.y?-2<g.x&&2>g.x&&-2<g.y&&2>g.y&&(a+=g.x,c+=g.y,q++):g.x=NaN:g.x=NaN,b.Sc[b.Hg++]=g.x,b.Sc[b.Hg++]=g.y;0<q?(a/=q,c/=q):l=0;for(d=0;d<b.Hg;d+=2)g.x=b.Sc[d],g.y=b.Sc[d+1],k=g.x-a,n=g.y-c,g.x+=k*l,g.y+=n*l,b.Sc[d]=h.width/2+g.x*h.width/2,b.Sc[d+1]=h.height/2-g.y*h.width/2;this.Zn(b,e)};h.prototype.Lj=function(b,a,d){var c=!0;switch(d){case 0:case 4:d=1/(b.z*this.Hi);a.x=-b.x*
d;a.y=b.y*d;0<b.z&&(c=!1);break;case 9:1==b.z&&(c=!1);d=1/((1-b.z)*this.Ri);a.x=b.x*d;a.y=-b.y*d;break;case 12:if(d=Math.sqrt(b.x*b.x+b.y*b.y),0==d)a.x=0,a.y=0;else{var e=2*this.Zh*Math.acos(-b.z)/d;if(2<d)return!1;a.x=e*b.x;a.y=-e*b.y}}return c};h.prototype.Zn=function(b,a){for(var d=this.h,c=[],e,f=b.hd=0;f<a;f++)for(var l=0;l<a;l++){c[0]=f+l*(a+1);c[1]=f+1+l*(a+1);c[2]=f+(l+1)*(a+1);c[3]=f+1+(l+1)*(a+1);e=!0;for(var k=0;4>k;k++)isNaN(b.Sc[2*c[0]])&&(e=!1);if(e){for(var g=!1,h=!1,n=!1,m=!1,k=0;4>
k;k++){var p=b.Sc[2*c[k]];p<d.m.width&&(h=!0);0<=p&&(g=!0);p=b.Sc[2*c[k]+1];p<d.m.height&&(n=!0);0<=p&&(m=!0)}if(e=e&&h&&g&&n&&m)b.Zd[b.hd++]=c[0],b.Zd[b.hd++]=c[3],b.Zd[b.hd++]=c[2],b.Zd[b.hd++]=c[0],b.Zd[b.hd++]=c[1],b.Zd[b.hd++]=c[3]}}};h.prototype.Jo=function(){var b=this.h,a=b.g,d=b.g.H;b.Wd&&(b.zc(0),b.$c());if(b.G){var c=b.G,e=this.Gk;c.useProgram(e);this.Xi(e);c.enable(c.CULL_FACE);c.cullFace(c.FRONT);c.enable(c.DEPTH_TEST);m.T.Cd(this.$a);m.T.perspective(b.Jb(),b.hb.width/b.hb.height,.1,
100,this.$a);c.uniformMatrix4fv(c.getUniformLocation(e,"uPMatrix"),!1,this.$a);this.Eb=0;b.ri();var f=b.Wh(),l,k=0;l=d.length-1;for(var g={},h=d[l];h.Je&&0<l;)l--,h=d[l];for(var n=l,r=n,p=0;6>p;p++)for(var u=0;u<h.da;u++)for(var t=0;t<h.K;t++){var v=t+u*h.K+p*h.K*h.da;g[v]=1}for(;l>=f;){var q={},h=d[l],x=null;0<l&&(x=d[l-1]);var B;B=!0;for(var A in g)if(g.hasOwnProperty(A)){var v=Number(A),z=h.W[v],p=Number(Math.floor(v/(h.K*h.da))),u=Math.floor((v-p*h.K*h.da)/h.K),t=Math.floor(v-(u*h.K+p*h.K*h.da)),
C;if(6<=p)console.log("Grrr...");else if(C=this.h.eb.Za[p],C.xa=!1,z||(z=h.W[v]=new m.Bd),this.Yn(z,h,t,u,Math.max(1,this.dj>>n-l),p,-(0!=b.ec)?.3:.1),z.visible=0<z.hd||h.cache,z.visible&&!z.gb&&(B=!1,this.ka<this.wd?z.g||(z.Hd?z.Hd--:(this.Sg(z,h,b.ke(p,l,t,u)),b.xa=!0)):this.Eb++),x&&(z.visible||x.cache)){var z=(t*a.F+1)/h.width,t=Math.min(1,(t+1)*a.F-1/h.width),D=(u*a.F+1)/h.height,u=Math.min(1,(u+1)*a.F-1/h.height),v=a.F/x.width;C=a.F/x.height;var E=D,D=Math.floor(D*x.height/a.F);do{var F=z,H=
Math.floor(z*x.width/a.F);do{var I=H+D*x.K+p*x.K*x.da;H<x.K&&D<x.da?q[I]=1:console.log("Grrrr");H++;F+=v}while(F<t);D++;E+=C}while(E<u)}}B&&(r=l,20>b.f.c&&l<this.ve&&(this.jh=!0));g=q;l--}this.Ji();c.uniform1i(c.getUniformLocation(e,"tileTexture"),0);c.activeTexture(c.TEXTURE0);l=f;for(f=-1;l<=Math.min(r,this.ve-1);){h=d[l];for(A in h.W)if(h.W.hasOwnProperty(A)){g=Number(A);z=h.W[g];p=Math.floor(g/(h.K*h.da));u=Math.floor((g-p*h.K*h.da)/h.K);t=Math.floor(g-(u*h.K+p*h.K*h.da));f!=p&&(f=p,this.sh(p,
e));if(200<k){this.jh=!1;break}z.gb&&(g=p=a.F,t==h.K-1&&(p=h.width-a.F*t),u==h.da-1&&(g=h.height-a.F*u),p=(p+2*a.Ja)/a.F,g=(g+2*a.Ja)/a.F,c.bindTexture(c.TEXTURE_2D,z.gb),c.uniform2f(c.getUniformLocation(e,"uCanvasDimensions"),b.m.width,b.m.height),n=c.getUniformLocation(e,"srcScale"),c.uniform2f(n,.5*h.width/a.F/p,.5*h.height/a.F/g),n=c.getUniformLocation(e,"srcOffset"),c.uniform2f(n,(.5*h.width+a.Ja-a.F*t)/a.F/p,-(.5*h.height+a.Ja-a.F*u)/a.F/g+1),n=c.getUniformLocation(e,"zOffset"),c.uniform1f(n,
(l+1)/(d.length+5)),p=c.getAttribLocation(e,"aVertexPosition"),c.disableVertexAttribArray(0),c.disableVertexAttribArray(1),c.disableVertexAttribArray(2),c.enableVertexAttribArray(p),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.Qm),c.vertexAttribPointer(p,
2,c.FLOAT,!1,0,0),c.bufferData(c.ARRAY_BUFFER,new Float32Array(z.Sc),c.DYNAMIC_DRAW),c.bindBuffer(c.ELEMENT_ARRAY_BUFFER,this.Pm),c.bufferData(c.ELEMENT_ARRAY_BUFFER,new Uint16Array(z.Zd),c.DYNAMIC_DRAW),c.drawElements(c.TRIANGLES,z.hd,c.UNSIGNED_SHORT,0),k++)}l++}c.disable(c.CULL_FACE);c.cullFace(c.FRONT_AND_BACK);b.Lc=!1}};h.prototype.sh=function(b,a){var d=this.h,c=d.G;m.T.Cd(this.$a);m.T.Cd(this.ca);m.T.rotate(this.ca,d.L.c*Math.PI/180,[0,0,1]);m.T.rotate(this.ca,d.j.c*Math.PI/180,[1,0,0]);m.T.rotate(this.ca,
-d.pan.c*Math.PI/180,[0,1,0]);d.Ca&&(m.T.rotate(this.ca,-d.Ca.pitch*Math.PI/180,[1,0,0]),m.T.rotate(this.ca,d.Ca.L*Math.PI/180,[0,0,1]));4>b?m.T.rotate(this.ca,-Math.PI/2*b,[0,1,0]):m.T.rotate(this.ca,Math.PI/2*(5==b?1:-1),[1,0,0]);c.uniformMatrix4fv(c.getUniformLocation(a,"matRotate"),!1,this.ca)};h.prototype.mn=function(){var b=this.h;if(b.G){var a=b.G,d,c=this.Hk;a.useProgram(c);this.sh(0,c);a.uniform2f(a.getUniformLocation(c,"uCanvasDimensions"),b.m.width,b.m.height);1==b.o.format&&(d=a.getUniformLocation(c,
"srcScale"),a.uniform2f(d,-.5/Math.PI,(b.o.ai?-1:1)/Math.PI));14==b.o.format&&(d=a.getUniformLocation(c,"srcScale"),a.uniform2f(d,1-2*b.o.pe/(b.o.width/3),1-2*b.o.pe/(b.o.height/2)));d=a.getUniformLocation(c,"srcOffset");a.uniform2f(d,.5,.5);this.Xi(c);d=a.getUniformLocation(c,"cubeTexture");a.uniform1i(d,0);d=a.getAttribLocation(c,"aVertexPosition");a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(d);a.bindBuffer(a.ARRAY_BUFFER,this.bh);
a.vertexAttribPointer(d,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,b.o.gc);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc);a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)}};h.prototype.Xi=function(b){var a=this.h,d=a.G,c=this.h.m,
e=c.width/c.height;switch(a.f.mode){case 1:e=1;break;case 2:e=c.width/Math.sqrt(c.width*c.width+c.height*c.height);break;case 3:4*c.height/3<c.width&&(e=4/3)}c=d.getUniformLocation(b,"rectDstDistance");this.Hi=Math.tan(Math.min(a.f.c,179)/2*Math.PI/180)*e;d.uniform1f(c,this.Hi);c=d.getUniformLocation(b,"fisheyeDistance");this.Zh=180/(a.f.c*Math.PI*e);d.uniform1f(c,this.Zh);c=d.getUniformLocation(b,"stereoDistance");this.Ri=Math.tan(Math.min(a.f.c,359)/4*Math.PI/180)*e;d.uniform1f(c,this.Ri);c=d.getUniformLocation(b,
"directionBlend");d.uniform1f(c,a.Mf)};h.prototype.ln=function(){var b=this.h,a=b.G,d=this.Fk;a.useProgram(d);a.enable(a.DEPTH_TEST);this.sh(0,d);a.uniform2f(a.getUniformLocation(d,"uCanvasDimensions"),b.m.width,b.m.height);b=a.getUniformLocation(d,"srcScale");a.uniform2f(b,1,1);b=a.getUniformLocation(d,"srcOffset");a.uniform2f(b,0,0);b=a.getUniformLocation(d,"zOffset");a.uniform1f(b,.9999);this.Xi(d);this.sh(0,d);b=a.getUniformLocation(d,"cubeTexture");a.uniform1i(b,0);d=a.getAttribLocation(d,"aVertexPosition");
a.disableVertexAttribArray(0);a.disableVertexAttribArray(1);a.disableVertexAttribArray(2);a.enableVertexAttribArray(d);a.bindBuffer(a.ARRAY_BUFFER,this.bh);a.vertexAttribPointer(d,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_CUBE_MAP,this.qc);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_CUBE_MAP,
a.TEXTURE_MAG_FILTER,a.LINEAR);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc);a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)};h.prototype.am=function(){for(var b=this.h,a=b.G,d=[1,3,5,4,0,2],c=!0,e=!0,f=!1,l=0;6>l;l++)this.Sa[l].be.complete?this.vg[l]||(f=!0):c=!1,this.Sa[l].Ie.complete||(e=!1);if(e||c)if(!e||c||!this.qc||f){l=Math.round(b.hc/b.Re);e=(b.hc-l)/2;b.O("paint cube single - isMain: "+c+" overlap: "+e);this.ve=0;this.qc||(this.qc=a.createTexture());b.Rc++;a.bindTexture(a.TEXTURE_CUBE_MAP,
this.qc);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_CUBE_MAP,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1);f=document.createElement("canvas");f.width=l;f.height=l;for(var k=f.getContext("2d"),l=0;6>l;l++){var g=d[l];this.Sa[g].be.complete?this.vg[g]||(k.drawImage(this.Sa[g].be,-e,-e),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+l,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f),this.vg[g]=!0):(k.drawImage(this.Sa[g].Ie,-e,-e,b.hc,b.hc),
a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X+l,0,a.RGBA,a.RGBA,a.UNSIGNED_BYTE,f))}this.Af=!c}};h.prototype.$l=function(){var b=this.h,a=this.h.g,d=b.g.H,c=b.G,e,f;e=d.length-1;if(!(0>e)){d[e].Je&&e--;var l=512;b.Og&&(l=256);!b.Pf&&2<=b.devicePixelRatio&&(l=512);for((f=c.getParameter(c.MAX_CUBE_MAP_TEXTURE_SIZE))&&f<l&&(l=f);0<e&&d[e-1].width<=l;)e--;var k,l=d[e];if(0!=l.K&&(f=e,k=this.Xl(e),this.Af&&k&&(this.Af=!1),k||(e=d.length-1,l=d[e],k||(l.Je?(k=l.loaded,this.oi(e-1)&&(--e,k=!0)):k=this.oi(e)),
this.Af=!0),this.oi(f),k&&this.ve>e)){l=d[e];b.O("paint cube level "+e);this.ve=e;d=b.g.Ja;e=0<d||1<l.K||1<l.da;var g;if(e){var h=document.createElement("canvas");h.width=l.width;h.height=l.height;2048>l.width&&(1500<l.width?(h.width=2048,h.height=2048):700<l.width?(h.width=1024,h.height=1024):(h.width=512,h.height=512));g=h.getContext("2d")}this.qc=c.createTexture();b.Rc++;c.bindTexture(c.TEXTURE_CUBE_MAP,this.qc);c.texParameteri(c.TEXTURE_CUBE_MAP,c.TEXTURE_WRAP_S,c.CLAMP_TO_EDGE);c.texParameteri(c.TEXTURE_CUBE_MAP,
c.TEXTURE_WRAP_T,c.CLAMP_TO_EDGE);c.pixelStorei(c.UNPACK_FLIP_Y_WEBGL,1);f=[1,3,5,4,0,2];k=h.width/l.width;for(var a=a.F,n=0;6>n;n++){for(var m=0;m<l.da;m++)for(var p=0;p<l.K;p++){var u=p+m*l.K+f[n]*l.K*l.da,t=l.W[u],v=t.g;t.J&&(v=t.J);v?e?g.drawImage(v,k*(p*a-d),k*(m*a-d),k*v.width,k*v.height):c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,v):(b.O("WTF?!"),b.O(u),b.O(t))}e&&c.texImage2D(c.TEXTURE_CUBE_MAP_POSITIVE_X+n,0,c.RGBA,c.RGBA,c.UNSIGNED_BYTE,h)}}}};h.prototype.oi=
function(b){var a=this.h,d=a.g.H[b];if(0==d.K)return!1;var c=!0;d.cache=!0;for(var e=0;6>e;e++)for(var f=0;f<d.da;f++)for(var l=0;l<d.K;l++){var k=l+f*d.K+e*d.K*d.da,g=d.W[k];g||(g=d.W[k]=new m.Bd);this.ka<this.wd?g.g||(g.Hd?g.Hd--:(this.Sg(g,d,a.ke(e,b,l,f)),a.xa=!0)):this.Eb++;g.gb||(c=!1,a.xa=!0)}c&&(d.loaded=!0);return c};h.prototype.Xl=function(b){b=this.h.g.H[b];if(0==b.K)return!1;for(var a=0;6>a;a++)for(var d=0;d<b.da;d++)for(var c=0;c<b.K;c++){var e=b.W[c+d*b.K+a*b.K*b.da];if(!e||!e.gb)return!1}return b.loaded=
!0};h.prototype.ready=function(){return null!=this.qc};h.prototype.Ji=function(){for(var b=this.h,a=b.g.H,d=b.G,c=0;c<a.length;c++){var e=a[c];if(!e.cache)for(var f in e.W)if(e.W.hasOwnProperty(f)){var l=e.W[f];l.visible||(l.gb&&(d.deleteTexture(l.gb),b.Rc--),l.g=null,l.vf&&d.deleteBuffer(l.vf),delete e.W[f])}}};h.prototype.Co=function(){var b=this.h;if(b.G){var a=this.h.G;a.disable(a.DEPTH_TEST);var d;for(d=0;d<b.I.length;d++){var c=b.I[d];if(!c.Vc){m.T.Cd(this.ca);m.T.rotate(this.ca,-b.L.c*Math.PI/
180,[0,0,1]);m.T.rotate(this.ca,-b.j.c*Math.PI/180,[1,0,0]);m.T.rotate(this.ca,(180-b.pan.c)*Math.PI/180,[0,1,0]);m.T.rotate(this.ca,c.pan*Math.PI/180,[0,1,0]);m.T.rotate(this.ca,-c.j*Math.PI/180,[1,0,0]);m.T.translate(this.ca,[0,0,1]);m.T.rotate(this.ca,c.kb*Math.PI/180,[0,0,1]);m.T.rotate(this.ca,-c.Da*Math.PI/180,[0,1,0]);m.T.rotate(this.ca,c.va*Math.PI/180,[1,0,0]);var e=Math.tan(c.f/2*Math.PI/180),f=c.Nd;f||(f=16/9);m.T.scale(this.ca,[e,e/f,1]);m.T.translate(this.ca,[0,0,-1]);a.bindBuffer(a.ARRAY_BUFFER,
this.Oh);a.vertexAttribPointer(this.D.Z,3,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Sd);a.vertexAttribPointer(this.D.wa,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,c.gc);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE);a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE);a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,this.Jc);a.uniform1i(this.D.Ne,
0);a.uniformMatrix4fv(this.D.Lf,!1,this.ca);a.uniformMatrix4fv(this.D.Fd,!1,this.$a);a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0)}}a.enable(a.DEPTH_TEST)}};h.prototype.Bo=function(){var b=this.h,a;if(b.m.width!=b.A.offsetWidth||b.m.height!=b.A.offsetHeight)b.m.width=b.A.offsetWidth,b.m.height=b.A.offsetHeight;b.Wd&&(b.zc(0),b.$c());if(b.G){var d=b.G;d.useProgram(this.D);m.T.Cd(this.$a);m.T.perspective(b.Jb(),b.hb.width/b.hb.height,.1,100,this.$a);d.uniformMatrix4fv(this.D.Fd,!1,this.$a);this.Yf(0);
d.uniform1i(this.D.Ne,0);d.uniformMatrix4fv(this.D.Fd,!1,this.$a);d.uniformMatrix4fv(this.D.Lf,!1,this.ca);d.enableVertexAttribArray(this.D.Z);d.enableVertexAttribArray(this.D.wa);d.bindBuffer(d.ARRAY_BUFFER,this.Sd);d.vertexAttribPointer(this.D.wa,2,d.FLOAT,!1,0,0);d.activeTexture(d.TEXTURE0);d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,this.Jc);d.uniform1f(this.D.Ah,1E-4);d.vertexAttribPointer(this.D.Z,3,d.FLOAT,!1,0,0);d.bindTexture(d.TEXTURE_2D,b.o.gc);for(a=0;1>a;a++)this.Yf(0),d.bindBuffer(d.ARRAY_BUFFER,
b.o.aj),d.vertexAttribPointer(this.D.Z,3,d.FLOAT,!1,0,0),d.bindBuffer(d.ARRAY_BUFFER,b.o.lh),d.vertexAttribPointer(this.D.wa,2,d.FLOAT,!1,0,0),d.activeTexture(d.TEXTURE0),d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,b.o.ji),d.uniform1i(this.D.Ne,0),d.uniformMatrix4fv(this.D.Lf,!1,this.ca),d.uniformMatrix4fv(this.D.Fd,!1,this.$a),d.drawElements(d.TRIANGLES,36,d.UNSIGNED_SHORT,0)}};h.prototype.Ao=function(){var b=this.h,a=b.G,d=b.o;if(0<b.I.length)for(var c=0;c<b.I.length;c++){var e=b.I[c];if(!e.Vc&&e.dk&&e.Gg!=
e.a.currentTime&&(e.Gg=e.a.currentTime,!e.Nd&&0<e.a.videoHeight&&(e.Nd=e.a.videoWidth/e.a.videoHeight),b.ig))try{e.gc&&(a.bindTexture(a.TEXTURE_2D,e.gc),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,e.a),b.update())}catch(f){b.O(f)}}if(d.a&&(c=Number(d.a.currentTime),d.Gg!=c)){d.Gg=c;try{d.gc&&d.Ng&&0<d.a.readyState&&(d.md=!0,d.width=d.a.videoWidth,d.height=d.a.videoHeight,a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,b.o.ai),a.bindTexture(a.TEXTURE_2D,d.gc),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,
a.UNSIGNED_BYTE,d.a),d.bl=!0,b.update())}catch(f){b.O(f)}}};h.prototype.xk=function(){var b,a,d=this.h,c=this.h.G;d.sa.style.visibility="hidden";d.w.Df!=d.w.mode&&(d.w.Df=d.w.mode);if((0<=d.w.mode||0<d.w.bb.length)&&!d.N.dg){var e=1;0>=d.w.mode&&(e=0);3==d.w.mode&&(e=d.w.na);for(b=0;b<d.P.length;b++){var f=d.P[b];if("poly"==f.type){var l=f.Gd,k=e;2==d.w.mode&&(k=f.na);var g=d.w.bb.indexOf(f.id);-1!=g&&(k=d.w.Db[g]);if(0<l.length){g=[];for(a=0;a<l.length;a++)g.push(l[a].fc),g.push(l[a].Bb),g.push(0);
c.useProgram(this.pd);c.enable(c.BLEND);c.blendFuncSeparate(c.SRC_ALPHA,c.ONE_MINUS_SRC_ALPHA,c.SRC_ALPHA,c.ONE);c.disable(c.DEPTH_TEST);l=c.createBuffer();c.bindBuffer(c.ARRAY_BUFFER,l);c.bufferData(c.ARRAY_BUFFER,new Float32Array(g),c.STATIC_DRAW);c.uniform2f(c.getUniformLocation(this.pd,"uCanvasDimensions"),d.m.width,d.m.height);l=c.getUniformLocation(this.pd,"uColor");a=f.Rb;c.uniform3f(l,(a>>16&255)/255,(a>>8&255)/255,(a&255)/255);var h=c.getUniformLocation(this.pd,"uAlpha");c.uniform1f(h,f.Qb*
k);c.vertexAttribPointer(this.pd.Z,3,c.FLOAT,!1,0,0);c.drawArrays(c.LINE_LOOP,0,g.length/3);a=f.Ob;c.uniform3f(l,(a>>16&255)/255,(a>>8&255)/255,(a&255)/255);c.uniform1f(h,f.Nb*k);c.enable(c.STENCIL_TEST);c.clearStencil(0);c.clear(c.STENCIL_BUFFER_BIT);c.colorMask(!1,!1,!1,!1);c.stencilFunc(c.ALWAYS,1,1);c.stencilOp(c.INCR,c.INCR,c.INCR);c.drawArrays(c.TRIANGLE_FAN,0,g.length/3);c.colorMask(!0,!0,!0,!0);c.stencilFunc(c.EQUAL,1,1);c.stencilOp(c.ZERO,c.ZERO,c.ZERO);c.drawArrays(c.TRIANGLE_FAN,0,g.length/
3);c.disable(c.BLEND);c.enable(c.DEPTH_TEST);c.disable(c.STENCIL_TEST);c.useProgram(this.D)}}}}};h.prototype.Wi=function(){var b=this.h,a=b.g;if(b.m.width!=b.A.offsetWidth||b.m.height!=b.A.offsetHeight)b.m.width=b.A.offsetWidth,b.m.height=b.A.offsetHeight;b.Wd&&(b.zc(0),b.$c());if(b.G){var d=b.G;this.rh();d.clear(d.COLOR_BUFFER_BIT|d.DEPTH_BUFFER_BIT);d.disable(d.DEPTH_TEST);d.disable(d.CULL_FACE);d.useProgram(this.kf);var c=d.getUniformLocation(this.kf,"uRect");d.uniform2f(d.getUniformLocation(this.kf,
"uCanvasDimensions"),b.m.width,b.m.height);d.activeTexture(d.TEXTURE0);var e;d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,this.Jc);e=d.getAttribLocation(this.kf,"aVertexPosition");d.disableVertexAttribArray(0);d.disableVertexAttribArray(1);d.disableVertexAttribArray(2);d.enableVertexAttribArray(e);d.bindBuffer(d.ARRAY_BUFFER,this.Sd);d.vertexAttribPointer(e,2,d.FLOAT,!1,0,0);b.Eb=0;var f,l;l=100/b.f.c;f=a.width/a.height;e=b.m.height*l*f;l*=b.m.height;f=(b.pan.c/100/f-.5)*e+b.m.width/2;for(var k=(b.j.c/100-
.5)*l+b.m.height/2,g,h,n,r=0;a.H.length>=r+2&&a.H[r+1].width>e;)r++;var p,u;u=[];for(p=a.H.length-1;p>=r;){var t=a.H[p],v;t.cache?(v={Ua:0,qb:0},v.rb=t.K-1,v.sb=t.da-1):(v={},g=-k/l*(t.height/b.g.F),h=(-f+b.m.width)/e*(t.width/b.g.F),n=(-k+b.m.height)/l*(t.height/b.g.F),v.Ua=Math.min(Math.max(0,Math.floor(-f/e*(t.width/b.g.F))),t.K-1),v.qb=Math.min(Math.max(0,Math.floor(g)),t.da-1),v.rb=Math.min(Math.max(0,Math.floor(h)),t.K-1),v.sb=Math.min(Math.max(0,Math.floor(n)),t.da-1));u[p]=v;var q=!0;for(h=
v.qb;h<=v.sb;h++)for(g=v.Ua;g<=v.rb;g++){n=g+h*t.K;var x=t.W[n];x||(x=new m.Bd,t.W[n]=x);this.ka<this.wd?x.g||(this.Sg(x,t,b.ke(0,p,g,h)),b.xa=!0):this.Eb++;x.g&&x.g.complete||(q=!1);x.visible=!0}v.ni=q;p--}for(p=a.H.length-1;p>=r;){t=a.H[p];if(u[p]&&0<=u[p].Ua)for(v=u[p],h=v.qb;h<=v.sb;h++)for(g=v.Ua;g<=v.rb;g++)n=g+h*t.K,(x=t.W[n])&&x.g&&x.g.complete&&(d.uniform4f(c,f+(-a.Ja+a.F*g)*e/t.width,k+(-a.Ja+a.F*h)*l/t.height,x.g.width*e/t.width,x.g.height*l/t.height),x&&x.gb&&(d.bindBuffer(d.ELEMENT_ARRAY_BUFFER,
this.Jc),d.bindTexture(d.TEXTURE_2D,x.gb),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MAG_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_MIN_FILTER,d.LINEAR),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_S,d.CLAMP_TO_EDGE),d.texParameteri(d.TEXTURE_2D,d.TEXTURE_WRAP_T,d.CLAMP_TO_EDGE),d.drawElements(d.TRIANGLES,6,d.UNSIGNED_SHORT,0)));p--}this.Ji()}};h.prototype.dh=function(){var b=this.h.G;if(b&&this.Sa)for(;0<this.Sa.length;){var a=this.Sa.pop();a.fn=!0;b.deleteTexture(a)}this.qc&&(b.deleteTexture(this.qc),
this.qc=null);this.ve=1E6;this.vg=[!1,!1,!1,!1,!1,!1]};return h}();m.Fl=g})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){return function(){this.Ge={lf:1,mf:1,Hf:0,If:0,Ye:0,lg:0,scale:1};this.pc=!0;this.qe=[]}}(),h=function(){function b(){var a;this.Za=Array(6);for(a=0;6>a;a++)this.Za[a]=new g}b.prototype.Yl=function(a,d,c,b){for(var f=0;6>f;f++){var l;if(l=this.Za[f]){var k;k=[];k.push(new m.ra(-1,-1,-1,0,0));k.push(new m.ra(1,-1,-1,1,0));k.push(new m.ra(1,1,-1,1,1));k.push(new m.ra(-1,1,-1,0,1));for(var g=0;g<k.length;g++)4>f?k[g].Da(-Math.PI/2*f):k[g].va(Math.PI/2*(4===f?-1:1)),b&&(k[g].kb(b.L*
Math.PI/180),k[g].va(-b.pitch*Math.PI/180)),k[g].Da(-a*Math.PI/180),k[g].va(d*Math.PI/180),k[g].kb(c*Math.PI/180);l.pc=0<k.length}}};return b}();m.Bl=h})(ggP2VR||(ggP2VR={}));
(function(m){m.Al=function(){return function(){this.H=[];this.Ke="0x000000";this.Bk=!1;this.mk=this.lk=.4;this.F=512;this.Ja=1;this.mi=0;this.nk="";this.Jk=this.height=this.width=0}}();m.wk=function(){return function(){this.height=this.width=0;this.Je=this.cache=!1;this.da=this.K=0;this.loaded=!1;this.W=[]}}();m.Bd=function(){return function(){this.loaded=this.visible=!1;this.Hd=this.Ii=0;this.Sc=[];this.Hg=0;this.Zd=[];this.hd=0}}()})(ggP2VR||(ggP2VR={}));
(function(m){m.vl=function(){return function(g,h){this.h=g;this.za=h;var b,a,d=this.__div=document.createElement("div");b=document.createElement("img");b.setAttribute("src","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; "+g.Ia+"user-select: none;");b.ondragstart=function(){return!1};d.appendChild(b);b="position:absolute;"+(g.Ia+"user-select: none;");b+=g.Ia+"touch-callout: none;";b+=g.Ia+"tap-highlight-color: rgba(0,0,0,0);";g.Dd&&!g.ea&&(b+=g.Ia+"transform: translateZ(9999999px);");d.setAttribute("style",b);d.onclick=function(){g.Oe(h);g.zi(h.url,h.target)};var c=g.w.Ui;c.enabled&&(a=document.createElement("div"),b="position:absolute;top:\t 20px;",
b=c.xh?b+"white-space: pre-wrap;":b+"white-space: nowrap;",b+=g.Ia+"transform-origin: 50% 50%;",a.setAttribute("style",b+"visibility: hidden;overflow: hidden;padding: 0px 1px 0px 1px;font-size: 13px;"),a.style.color=this.h.fa(c.Vi,c.Ti),c.background?a.style.backgroundColor=this.h.fa(c.Ob,c.Nb):a.style.backgroundColor="transparent",a.style.border="solid "+this.h.fa(c.Rb,c.Qb)+" "+c.Hh+"px",a.style.borderRadius=c.Gh+"px",a.style.textAlign="center",0<c.width?(a.style.left=-c.width/2+"px",a.style.width=
c.width+"px"):a.style.width="auto",a.style.height=0<c.height?c.height+"px":"auto",a.style.overflow="hidden",a.innerHTML=h.title,d.onmouseover=function(){0==c.width&&(a.style.left=-a.offsetWidth/2+"px");a.style.visibility="inherit"},d.onmouseout=function(){a.style.visibility="hidden"},d.appendChild(a))}}()})(ggP2VR||(ggP2VR={}));
(function(m){m.wc=function(){return function(){this.Rd=this.Qd=this.Fc=this.Pd=this.tb=this.type=this.lb=this.value=this.time=0}}();m.pk=function(){return function(){this.uo=this.Il=this.length=0}}();m.ek=function(){return function(){}}()})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function g(b){this.h=b;this.enabled=!1;this.jj=1;this.qg=0;this.type="crossdissolve";this.uc=this.Ya=this.Xc=0;this.yh=5;this.Ze=1;this.zh=!1;this.je=this.ie=this.Qi=0;this.vd=70;this.ul=0;this.mb=this.tl=1;this.og=this.ng=.5;this.Od=this.cj=this.ui=this.ki=!1;this.Rh=1}g.prototype.zf=function(){var b=this.h.G,a=b.createShader(b.VERTEX_SHADER);b.shaderSource(a,"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");
b.compileShader(a);b.getShaderParameter(a,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(a)),a=null);var d=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.ma=b.createProgram();b.attachShader(this.ma,a);b.attachShader(this.ma,d);b.linkProgram(this.ma);b.getProgramParameter(this.ma,b.LINK_STATUS)||alert("Could not initialise shaders");this.ma.Z=b.getAttribLocation(this.ma,"aVertexPosition");b.enableVertexAttribArray(this.ma.Z);this.ma.wa=b.getAttribLocation(this.ma,"aTextureCoord");b.enableVertexAttribArray(this.ma.wa);d=b.createShader(b.FRAGMENT_SHADER);
b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.Pa=b.createProgram();b.attachShader(this.Pa,a);b.attachShader(this.Pa,d);b.linkProgram(this.Pa);b.getProgramParameter(this.Pa,b.LINK_STATUS)||alert("Could not initialise shaders");this.Pa.Z=b.getAttribLocation(this.Pa,"aVertexPosition");b.enableVertexAttribArray(this.Pa.Z);this.Pa.wa=b.getAttribLocation(this.Pa,"aTextureCoord");b.enableVertexAttribArray(this.Pa.wa);d=b.createShader(b.FRAGMENT_SHADER);
b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.Fa=b.createProgram();b.attachShader(this.Fa,a);b.attachShader(this.Fa,d);b.linkProgram(this.Fa);b.getProgramParameter(this.Fa,b.LINK_STATUS)||alert("Could not initialise shaders");this.Fa.Z=b.getAttribLocation(this.Fa,"aVertexPosition");b.enableVertexAttribArray(this.Fa.Z);this.Fa.wa=b.getAttribLocation(this.Fa,"aTextureCoord");b.enableVertexAttribArray(this.Fa.wa);d=b.createShader(b.FRAGMENT_SHADER);
b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.La=b.createProgram();b.attachShader(this.La,a);b.attachShader(this.La,d);b.linkProgram(this.La);b.getProgramParameter(this.La,b.LINK_STATUS)||alert("Could not initialise shaders");this.La.Z=b.getAttribLocation(this.La,"aVertexPosition");b.enableVertexAttribArray(this.La.Z);this.La.wa=b.getAttribLocation(this.La,"aTextureCoord");b.enableVertexAttribArray(this.La.wa)};g.prototype.zc=function(){var b=
this.h.G;if(!b)return!1;if(this.Mb=b.createFramebuffer()){b.bindFramebuffer(b.FRAMEBUFFER,this.Mb);this.Mb.width=1024;this.Mb.height=1024;this.le=b.createTexture();b.bindTexture(b.TEXTURE_2D,this.le);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,this.Mb.width,this.Mb.height,0,b.RGBA,b.UNSIGNED_BYTE,null);var a=b.createRenderbuffer();b.bindRenderbuffer(b.RENDERBUFFER,a);b.renderbufferStorage(b.RENDERBUFFER,
b.DEPTH_COMPONENT16,this.Mb.width,this.Mb.height);b.framebufferTexture2D(b.FRAMEBUFFER,b.COLOR_ATTACHMENT0,b.TEXTURE_2D,this.le,0);b.framebufferRenderbuffer(b.FRAMEBUFFER,b.DEPTH_ATTACHMENT,b.RENDERBUFFER,a);b.bindTexture(b.TEXTURE_2D,null);b.bindRenderbuffer(b.RENDERBUFFER,null);b.bindFramebuffer(b.FRAMEBUFFER,null);this.ab=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.ab);b.bufferData(b.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,-1,0,-1,1,0,1,1,0]),b.STATIC_DRAW);this.ab.Ac=3;this.ab.Ed=4;this.Le=
b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.Le);b.bufferData(b.ARRAY_BUFFER,new Float32Array([0,0,1,0,0,1,1,1]),b.STATIC_DRAW);return!0}return!1};g.prototype.yk=function(b){var a=this.h.G,d=this.h.hb;if(this.Ld){a.useProgram(this.ma);a.bindBuffer(a.ARRAY_BUFFER,this.ab);a.vertexAttribPointer(this.ma.Z,this.ab.Ac,a.FLOAT,!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Le);a.vertexAttribPointer(this.ma.wa,2,a.FLOAT,!1,0,0);a.enableVertexAttribArray(this.ma.Z);a.enableVertexAttribArray(this.ma.wa);a.activeTexture(a.TEXTURE0);
a.bindTexture(a.TEXTURE_2D,this.le);var d=1+(this.mb-1)*b,c=a.getUniformLocation(this.ma,"uAlpha");a.uniform1f(c,1);c=a.getUniformLocation(this.ma,"uZoomIn");a.uniform1i(c,1);var c=a.getUniformLocation(this.ma,"uZoomCenter"),e=.5+(this.ng-.5)*Math.sqrt(b),f=.5+(this.og-.5)*Math.sqrt(b);0>e-.5/d&&(e=.5/d);0>f-.5/d&&(f=.5/d);1<e+.5/d&&(e=1-.5/d);1<f+.5/d&&(f=1-.5/d);a.uniform2f(c,e,f);e=a.getUniformLocation(this.ma,"uZoomFactor");a.uniform1f(e,d);a.uniform1i(a.getUniformLocation(this.ma,"uSampler"),
0);a.drawArrays(a.TRIANGLE_STRIP,0,this.ab.Ed);a.useProgram(this.h.la.D)}else{this.h.gg();a.blendFuncSeparate(a.SRC_ALPHA,a.ONE_MINUS_SRC_ALPHA,a.SRC_ALPHA,a.ONE);a.enable(a.BLEND);a.disable(a.DEPTH_TEST);e=.5+(this.ng-.5);f=.5+(this.og-.5);0>e-.5/this.mb&&(e=.5/this.mb);0>f-.5/this.mb&&(f=.5/this.mb);1<e+.5/this.mb&&(e=1-.5/this.mb);1<f+.5/this.mb&&(f=1-.5/this.mb);if("crossdissolve"==this.type)a.useProgram(this.ma),a.bindBuffer(a.ARRAY_BUFFER,this.ab),a.vertexAttribPointer(this.ma.Z,this.ab.Ac,
a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.Le),a.vertexAttribPointer(this.ma.wa,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.le),c=a.getUniformLocation(this.ma,"uAlpha"),a.uniform1f(c,1-b),c=a.getUniformLocation(this.ma,"uZoomIn"),a.uniform1i(c,1==this.Ya||2==this.Ya?1:0),c=a.getUniformLocation(this.ma,"uZoomCenter"),a.uniform2f(c,e,f),e=a.getUniformLocation(this.ma,"uZoomFactor"),a.uniform1f(e,this.mb),a.uniform1i(a.getUniformLocation(this.ma,"uSampler"),0);
else if("diptocolor"==this.type)a.useProgram(this.Pa),a.bindBuffer(a.ARRAY_BUFFER,this.ab),a.vertexAttribPointer(this.Pa.Z,this.ab.Ac,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.Le),a.vertexAttribPointer(this.Pa.wa,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.le),a.uniform1f(a.getUniformLocation(this.Pa,"uColorPercent"),Math.min(2*b,1)),c=a.getUniformLocation(this.Pa,"uAlpha"),a.uniform1f(c,1-Math.max(2*(b-.5),0)),a.uniform3f(a.getUniformLocation(this.Pa,"uDipColor"),
(this.qg>>16&255)/255,(this.qg>>8&255)/255,(this.qg&255)/255),c=a.getUniformLocation(this.Pa,"uZoomIn"),a.uniform1i(c,1==this.Ya||2==this.Ya?1:0),c=a.getUniformLocation(this.Pa,"uZoomCenter"),a.uniform2f(c,e,f),e=a.getUniformLocation(this.Pa,"uZoomFactor"),a.uniform1f(e,this.mb),a.uniform1i(a.getUniformLocation(this.Pa,"uSampler"),0);else if("irisround"==this.type||"irisrectangular"==this.type){a.useProgram(this.Fa);a.bindBuffer(a.ARRAY_BUFFER,this.ab);a.vertexAttribPointer(this.Fa.Z,this.ab.Ac,a.FLOAT,
!1,0,0);a.bindBuffer(a.ARRAY_BUFFER,this.Le);a.vertexAttribPointer(this.Fa.wa,2,a.FLOAT,!1,0,0);a.activeTexture(a.TEXTURE0);a.bindTexture(a.TEXTURE_2D,this.le);var l;1==this.Ya||2==this.Ya?l=c=.5:(c=this.ng,l=this.og);var k=c*d.width,g=l*d.height,k=Math.max(k,d.width-k),g=Math.max(g,d.height-g);"irisround"==this.type?a.uniform1f(a.getUniformLocation(this.Fa,"uRadius"),(Math.sqrt(k*k+g*g)+this.Xc)*b):(k>g?(g=d.height/d.width*k+this.Xc,k+=this.Xc):(k=d.width/d.height*g+this.Xc,g+=this.Xc),a.uniform2f(a.getUniformLocation(this.Fa,
"uRectDim"),k*b,g*b));b=a.getUniformLocation(this.Fa,"uSoftEdge");a.uniform1f(b,this.Xc);a.uniform1i(a.getUniformLocation(this.Fa,"uRound"),"irisround"==this.type?1:0);a.uniform2f(a.getUniformLocation(this.Fa,"uIrisCenter"),c*d.width,l*d.height);c=a.getUniformLocation(this.Fa,"uZoomIn");a.uniform1i(c,1==this.Ya||2==this.Ya?1:0);c=a.getUniformLocation(this.Fa,"uZoomCenter");a.uniform2f(c,e,f);e=a.getUniformLocation(this.Fa,"uZoomFactor");a.uniform1f(e,this.mb);a.uniform1i(a.getUniformLocation(this.Fa,
"uSampler"),0)}else if("wipeleftright"==this.type||"wiperightleft"==this.type||"wipetopbottom"==this.type||"wipebottomtop"==this.type||"wiperandom"==this.type)a.useProgram(this.La),a.bindBuffer(a.ARRAY_BUFFER,this.ab),a.vertexAttribPointer(this.La.Z,this.ab.Ac,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,this.Le),a.vertexAttribPointer(this.La.wa,2,a.FLOAT,!1,0,0),a.activeTexture(a.TEXTURE0),a.bindTexture(a.TEXTURE_2D,this.le),a.uniform1f(a.getUniformLocation(this.La,"uPercent"),3>this.Rh?b*(d.width+
this.Xc):b*(d.height+this.Xc)),b=a.getUniformLocation(this.La,"uSoftEdge"),a.uniform1f(b,this.Xc),a.uniform1i(a.getUniformLocation(this.La,"uDirection"),this.Rh),a.uniform2f(a.getUniformLocation(this.La,"uCanvasDimensions"),d.width,d.height),c=a.getUniformLocation(this.La,"uZoomIn"),a.uniform1i(c,1==this.Ya||2==this.Ya?1:0),c=a.getUniformLocation(this.La,"uZoomCenter"),a.uniform2f(c,e,f),e=a.getUniformLocation(this.La,"uZoomFactor"),a.uniform1f(e,this.mb),a.uniform1i(a.getUniformLocation(this.La,
"uSampler"),0);a.drawArrays(a.TRIANGLE_STRIP,0,this.ab.Ed);a.useProgram(this.h.la.D);a.disable(a.BLEND);a.enable(a.DEPTH_TEST)}};return g}();m.yl=g})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function g(b){this.eg=[];this.h=b;this.enabled=!1;this.lb=2;this.qj=!1}g.prototype.Vh=function(b){if(2==b.mode||3==b.mode||5==b.mode){var a=this.h.Ga.currentTime,d=b.oc.gain.value,c=b.mc.gain.value,e=b.nc.gain.value;b.lc.gain.linearRampToValueAtTime(b.lc.gain.value,a);b.lc.gain.linearRampToValueAtTime(0,a+this.lb);b.oc.gain.linearRampToValueAtTime(d,a);b.oc.gain.linearRampToValueAtTime(0,a+this.lb);b.mc.gain.linearRampToValueAtTime(c,a);b.mc.gain.linearRampToValueAtTime(0,
a+this.lb);b.nc.gain.linearRampToValueAtTime(e,a);b.nc.gain.linearRampToValueAtTime(0,a+this.lb)}else a=this.h.Ga.currentTime,b.Oc.gain.linearRampToValueAtTime(b.Oc.gain.value,a),b.Oc.gain.linearRampToValueAtTime(0,a+this.lb);b.Bg=!0;setTimeout(function(){b.rd()},1E3*this.lb+5)};g.prototype.jo=function(){for(var b=0;b<this.h.S.length;b++){var a=this.h.S[b];this.h.Tc(a.id)||4==a.mode||6==a.mode||(a.ha?a.Hc():(a.a.play(),a.a.currentTime=0))}};g.prototype.em=function(){for(var b=(this.h.Ga.currentTime-
this.fo)/this.lb,b=Math.min(1,b),a=0;a<this.h.S.length;a++){var d=this.h.S[a];this.h.Tc(d.id)&&1>d.ja&&(d.ja=b)}1==b&&clearInterval(this.eo)};return g}();m.zl=g})(ggP2VR||(ggP2VR={}));
(function(m){var g=function(){function g(b){this.Ff=[];this.Ic=null;this.Kb=[];this.Hb=[];this.Lb=[];this.Oi=!0;this.h=b;this.Zl()}g.prototype.zf=function(){var b=this.h.G,a=b.createShader(b.VERTEX_SHADER);b.shaderSource(a,"attribute vec3 aVertexPosition;\nvoid main(void) {\n gl_Position = vec4(aVertexPosition, 1.0);\n}\n");b.compileShader(a);b.getShaderParameter(a,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(a)),a=null);var d=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.Pb=b.createProgram();b.attachShader(this.Pb,a);b.attachShader(this.Pb,d);b.linkProgram(this.Pb);b.getProgramParameter(this.Pb,b.LINK_STATUS)||alert("Could not initialise shaders");this.Pb.Z=b.getAttribLocation(this.Pb,"aVertexPosition");b.enableVertexAttribArray(this.Pb.Z);d=b.createShader(b.VERTEX_SHADER);a=b.createShader(b.VERTEX_SHADER);b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);b.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");
b.compileShader(a);b.getShaderParameter(a,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(a)),d=null);var c=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(c,"#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");
b.compileShader(c);b.getShaderParameter(c,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(c)),c=null);this.oa=b.createProgram();b.attachShader(this.oa,d);b.attachShader(this.oa,c);b.linkProgram(this.oa);b.getProgramParameter(this.oa,b.LINK_STATUS)||alert("Could not initialise shaders");this.oa.Z=b.getAttribLocation(this.oa,"aVertexPosition");b.enableVertexAttribArray(this.oa.Z);d=b.createShader(b.FRAGMENT_SHADER);b.shaderSource(d,"#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");
b.compileShader(d);b.getShaderParameter(d,b.COMPILE_STATUS)||(alert(b.getShaderInfoLog(d)),d=null);this.jb=b.createProgram();b.attachShader(this.jb,a);b.attachShader(this.jb,d);b.linkProgram(this.jb);b.getProgramParameter(this.jb,b.LINK_STATUS)||alert("Could not initialise shaders");this.jb.Z=b.getAttribLocation(this.jb,"aVertexPosition")};g.prototype.zc=function(){var b=this.h.G;this.fd=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.fd);b.bufferData(b.ARRAY_BUFFER,new Float32Array([-1,-1,0,1,
-1,0,1,1,0,-1,1,0]),b.STATIC_DRAW);this.fd.Ac=3;this.fd.Ed=4;this.Ae=b.createBuffer();b.bindBuffer(b.ARRAY_BUFFER,this.Ae);for(var a=[0,0,0],d=2*Math.PI/6,c=Math.PI/180*35,e=1,f=c;f<=c+2*Math.PI;f+=d)a.push(Math.sin(f)),a.push(-Math.cos(f)),a.push(0),e++;b.bufferData(b.ARRAY_BUFFER,new Float32Array(a),b.STATIC_DRAW);this.Ae.Ac=3;this.Ae.Ed=e;this.Kk=b.createTexture();b.bindTexture(b.TEXTURE_2D,this.Kk);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR);b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_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);a=document.createElement("canvas");a.width=100;a.height=1;d=a.getContext("2d");d.width=100;d.height=1;c=d.createLinearGradient(0,0,100,0);c.addColorStop(0,this.h.fa(16777215,0));c.addColorStop(.88,this.h.fa(0,0));c.addColorStop(.9,this.h.fa(16654848,1));c.addColorStop(.92,this.h.fa(16776448,1));c.addColorStop(.94,this.h.fa(4849466,1));c.addColorStop(.96,this.h.fa(131071,
1));c.addColorStop(.98,this.h.fa(8190,1));c.addColorStop(1,this.h.fa(0,0));d.fillStyle=c;d.fillRect(0,0,100,1);b.texImage2D(b.TEXTURE_2D,0,b.RGBA,b.RGBA,b.UNSIGNED_BYTE,a)};g.prototype.yn=function(){for(;0<this.Ff.length;)this.Ff.pop()};g.prototype.Zl=function(){var b=[],a=[],d=[],c={l:14,alpha:.2,color:11390415,i:.27};b.push(c);c={l:20,alpha:.25,color:11390415,i:.4};b.push(c);c={l:10,alpha:.2,color:12442332,i:.6};b.push(c);c={l:15,alpha:.2,color:11390415,i:.8};b.push(c);c={l:10,alpha:.2,color:12442332,
i:1.5};b.push(c);c={l:15,alpha:.2,color:11390415,i:1.8};b.push(c);c={l:8,alpha:.2,color:12575203,u:.8,i:.7};a.push(c);c={l:7,alpha:.4,color:12575203,u:.5,i:1.6};a.push(c);c={l:5,alpha:.4,color:12575203,u:.6,i:.9};a.push(c);c={l:8,alpha:.3,color:12575203,u:.4,i:1.1};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:30,alpha:.3,color:11390415,i:.5};b.push(c);c={l:10,alpha:.3,color:11390415,i:1};b.push(c);c={l:20,alpha:.3,color:11390415,i:1.3};b.push(c);c={l:10,alpha:.3,color:11390415,
i:1.5};b.push(c);c={l:15,alpha:.3,color:11390415,i:1.8};b.push(c);c={l:10,alpha:.3,color:15506856,u:.8,i:.7};a.push(c);c={l:20,alpha:.5,color:15506856,u:.5,i:1.6};a.push(c);c={l:5,alpha:.5,color:15506856,u:.6,i:.9};a.push(c);c={l:60,alpha:.4,color:15506856,u:.2,i:1.1};a.push(c);d.push({l:220,alpha:.035,i:2});this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:30,alpha:.5,color:15465727,i:.5};b.push(c);c={l:40,alpha:.28,color:15726842,i:.8};b.push(c);c={l:25,alpha:.32,color:15726842,
i:1.1};b.push(c);c={l:15,alpha:.25,color:15726842,i:1.35};b.push(c);c={l:10,alpha:.28,color:15465727,i:1.65};b.push(c);c={l:10,alpha:.45,color:15465727,u:.8,i:.7};a.push(c);c={l:7,alpha:.5,color:15465727,u:.4,i:.9};a.push(c);c={l:40,alpha:.4,color:15465727,u:.3,i:.38};a.push(c);c={l:50,alpha:.4,color:15465727,u:.5,i:1.25};a.push(c);c={l:18,alpha:.2,color:15465727,u:.5,i:1.25};a.push(c);c={l:10,alpha:.34,color:15726842,u:.8,i:1.5};a.push(c);c={l:38,alpha:.37,color:15465727,u:.3,i:-.5};a.push(c);this.Kb.push(b);
this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:16,alpha:.5,color:16363159,i:.1};b.push(c);c={l:26,alpha:.3,color:16091819,i:.32};b.push(c);c={l:29,alpha:.2,color:16091819,i:1.32};b.push(c);c={l:20,alpha:.18,color:16363159,i:1.53};b.push(c);c={l:27,alpha:.13,color:16425092,i:1.6};b.push(c);c={l:20,alpha:.1,color:16091819,i:1.75};b.push(c);c={l:12,alpha:.45,color:16312238,u:.45,i:.2};a.push(c);c={l:8,alpha:.25,color:16434209,u:.7,i:.33};a.push(c);c={l:9,alpha:.25,color:16091819,u:.4,i:.7};a.push(c);
c={l:7,alpha:.2,color:16091819,u:.4,i:.85};a.push(c);c={l:60,alpha:.23,color:16091819,u:.55,i:1.05};a.push(c);c={l:37,alpha:.1,color:16091819,u:.55,i:1.22};a.push(c);c={l:10,alpha:.25,color:16363159,u:.65,i:1.38};a.push(c);c={l:7,alpha:.2,color:16434209,u:.5,i:1.45};a.push(c);c={l:3,alpha:.2,color:16416033,u:.5,i:1.78};a.push(c);c={l:6,alpha:.18,color:16434209,u:.45,i:1.9};a.push(c);c={l:4,alpha:.14,color:16766514,u:.45,i:2.04};a.push(c);c={l:30,alpha:.14,color:16766514,u:.8,i:.04};a.push(c);this.Kb.push(b);
this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:9,alpha:.3,color:14346999,u:.3,i:.3};a.push(c);c={l:5,alpha:.5,color:14148072,u:.8,i:.6};a.push(c);c={l:3,alpha:.37,color:14346999,u:.66,i:.8};a.push(c);c={l:45,alpha:.2,color:14346999,u:.36,i:1.2};a.push(c);c={l:13,alpha:.2,color:14346999,u:.36,i:1.23};a.push(c);c={l:11,alpha:.2,color:14148072,u:.36,i:1.28};a.push(c);c={l:27,alpha:.16,color:14346999,u:.36,i:1.55};a.push(c);c={l:6,alpha:.36,color:14148072,u:.8,i:1.7};a.push(c);this.Kb.push(b);this.Hb.push(a);
this.Lb.push(d);b=[];a=[];d=[];c={l:24,alpha:.2,color:15186464,i:.2};b.push(c);c={l:7,alpha:.26,color:15186464,i:.35};b.push(c);c={l:23,alpha:.18,color:15186464,i:.65};b.push(c);c={l:13,alpha:.2,color:15186464,i:.8};b.push(c);c={l:11,alpha:.15,color:15186464,i:1.4};b.push(c);c={l:15,alpha:.11,color:15451904,i:1.6};b.push(c);c={l:6,alpha:.45,color:15579138,u:.45,i:.22};a.push(c);c={l:3,alpha:.3,color:15451904,u:.25,i:.4};a.push(c);c={l:4,alpha:.2,color:15451904,u:.25,i:.45};a.push(c);c={l:65,alpha:.17,
color:15186464,u:.25,i:.5};a.push(c);c={l:5,alpha:.45,color:15579138,u:.45,i:.88};a.push(c);c={l:140,alpha:.18,color:15579138,u:.32,i:.95};a.push(c);c={l:12,alpha:.22,color:15579138,u:.32,i:1.1};a.push(c);c={l:8,alpha:.32,color:15451904,u:.72,i:1.2};a.push(c);c={l:55,alpha:.2,color:15451904,u:.45,i:1.33};a.push(c);c={l:4,alpha:.3,color:15451904,u:.25,i:1.42};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:16,alpha:.4,color:10933495,i:.32};b.push(c);c={l:14,alpha:.3,color:11007484,
i:.36};b.push(c);c={l:10,alpha:.3,color:4037331,i:.58};b.push(c);c={l:14,alpha:.22,color:8835068,i:.68};b.push(c);c={l:10,alpha:.27,color:11007484,i:.82};b.push(c);c={l:11,alpha:.27,color:10867450,i:1};b.push(c);c={l:9,alpha:.2,color:6158332,i:1.05};b.push(c);c={l:10,alpha:.17,color:10867450,i:1.78};b.push(c);c={l:10,alpha:.3,color:4037331,i:-.23};b.push(c);c={l:8,alpha:.45,color:8835068,u:.45,i:.175};a.push(c);c={l:7,alpha:.4,color:12574715,u:.55,i:.46};a.push(c);c={l:3,alpha:.3,color:10867450,u:.35,
i:.5};a.push(c);c={l:60,alpha:.37,color:4031699,u:.75,i:.75};a.push(c);c={l:3,alpha:.25,color:4031699,u:.25,i:.75};a.push(c);c={l:3,alpha:.2,color:6158332,u:.25,i:.9};a.push(c);c={l:7,alpha:.45,color:8835068,u:.45,i:1.3};a.push(c);c={l:32,alpha:.22,color:8835068,u:.75,i:1.62};a.push(c);c={l:9,alpha:.45,color:4031699,u:.65,i:1.6};a.push(c);c={l:8,alpha:.25,color:4031699,u:.65,i:1.83};a.push(c);c={l:7,alpha:.4,color:12574715,u:.55,i:-.18};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=
[];a=[];d=[];c={l:16,alpha:.4,color:16389120,i:.32};b.push(c);c={l:26,alpha:.22,color:16389120,i:.4};b.push(c);c={l:26,alpha:.25,color:16389120,i:.65};b.push(c);c={l:18,alpha:.3,color:16389120,i:1.23};b.push(c);c={l:14,alpha:.26,color:16389120,i:1.33};b.push(c);c={l:17,alpha:.18,color:16389120,i:1.7};b.push(c);c={l:30,alpha:.16,color:16389120,i:2.15};b.push(c);c={l:100,alpha:.25,color:16389120,u:.22,i:1.45};a.push(c);c={l:7,alpha:.5,color:15628151,u:.3,i:1.5};a.push(c);c={l:3,alpha:.5,color:15628151,
u:.3,i:1.52};a.push(c);c={l:4,alpha:.5,color:16389120,u:.3,i:1.745};a.push(c);c={l:9,alpha:.22,color:16389120,u:.3,i:1.8};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:16,alpha:.4,color:10933495,i:.32};b.push(c);c={l:14,alpha:.3,color:11007484,i:.36};b.push(c);c={l:10,alpha:.3,color:4037331,i:.58};b.push(c);c={l:14,alpha:.22,color:8835068,i:.68};b.push(c);c={l:10,alpha:.27,color:11007484,i:.82};b.push(c);c={l:11,alpha:.27,color:10867450,i:1};b.push(c);c={l:9,alpha:.2,
color:6158332,i:1.05};b.push(c);c={l:10,alpha:.17,color:10867450,i:1.78};b.push(c);c={l:10,alpha:.3,color:4037331,i:-.23};b.push(c);c={l:8,alpha:.45,color:8835068,u:.45,i:.175};a.push(c);c={l:7,alpha:.4,color:12574715,u:.55,i:.46};a.push(c);c={l:3,alpha:.3,color:10867450,u:.35,i:.5};a.push(c);c={l:60,alpha:.37,color:4031699,u:.75,i:.75};a.push(c);c={l:3,alpha:.25,color:4031699,u:.25,i:.75};a.push(c);c={l:3,alpha:.2,color:6158332,u:.25,i:.9};a.push(c);c={l:7,alpha:.45,color:8835068,u:.45,i:1.3};a.push(c);
c={l:32,alpha:.22,color:8835068,u:.75,i:1.62};a.push(c);c={l:9,alpha:.45,color:4031699,u:.65,i:1.6};a.push(c);c={l:8,alpha:.25,color:4031699,u:.65,i:1.83};a.push(c);c={l:7,alpha:.4,color:12574715,u:.55,i:-.18};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:16,alpha:.4,color:16389120,i:.32};b.push(c);c={l:26,alpha:.22,color:16389120,i:.4};b.push(c);c={l:26,alpha:.25,color:16389120,i:.65};b.push(c);c={l:18,alpha:.3,color:16389120,i:1.23};b.push(c);c={l:14,alpha:.26,color:16389120,
i:1.33};b.push(c);c={l:17,alpha:.18,color:16389120,i:1.7};b.push(c);c={l:30,alpha:.16,color:16389120,i:2.15};b.push(c);c={l:100,alpha:.25,color:16389120,u:.22,i:1.45};a.push(c);c={l:7,alpha:.5,color:15628151,u:.3,i:1.5};a.push(c);c={l:3,alpha:.5,color:15628151,u:.3,i:1.52};a.push(c);c={l:4,alpha:.5,color:16389120,u:.3,i:1.745};a.push(c);c={l:9,alpha:.22,color:16389120,u:.3,i:1.8};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d);b=[];a=[];d=[];c={l:24,alpha:.2,color:15186464,i:.2};b.push(c);
c={l:7,alpha:.26,color:15186464,i:.35};b.push(c);c={l:23,alpha:.18,color:15186464,i:.65};b.push(c);c={l:13,alpha:.2,color:15186464,i:.8};b.push(c);c={l:11,alpha:.15,color:15186464,i:1.4};b.push(c);c={l:15,alpha:.11,color:15451904,i:1.6};b.push(c);c={l:6,alpha:.45,color:15579138,u:.45,i:.22};a.push(c);c={l:3,alpha:.3,color:15451904,u:.25,i:.4};a.push(c);c={l:4,alpha:.2,color:15451904,u:.25,i:.45};a.push(c);c={l:65,alpha:.17,color:15186464,u:.25,i:.5};a.push(c);c={l:5,alpha:.45,color:15579138,u:.45,
i:.88};a.push(c);c={l:140,alpha:.18,color:15579138,u:.32,i:.95};a.push(c);c={l:12,alpha:.22,color:15579138,u:.32,i:1.1};a.push(c);c={l:8,alpha:.32,color:15451904,u:.72,i:1.2};a.push(c);c={l:55,alpha:.2,color:15451904,u:.45,i:1.33};a.push(c);c={l:4,alpha:.3,color:15451904,u:.25,i:1.42};a.push(c);this.Kb.push(b);this.Hb.push(a);this.Lb.push(d)};g.prototype.jn=function(){if(this.Oi){var b=this.h.G,a,d,c,e=new m.ra(0,0,-100),f=this.h.dd(),l,k;if(this.h.ea)l=this.h.hb.width,k=this.h.hb.height,this.h.N.dg&&
(l=this.h.N.Mb.width,k=this.h.N.Mb.height);else{this.R||(this.R=this.Ic.getContext("2d"));if(this.R.width!==this.h.m.width||this.R.height!==this.h.m.height)this.R.width=this.h.m.width,this.R.height=this.h.m.height;this.R.clear?this.R.clear():this.R.clearRect(0,0,this.Ic.width,this.Ic.height);l=this.R.width;k=this.R.height}var g=Math.sqrt(l*l+k*k),h=g/800;for(d=0;d<this.Ff.length;d++){var n=this.Ff[d];e.Wa(0,0,-100);e.va(-n.j*Math.PI/180);e.Da(n.pan*Math.PI/180);e.Da(-this.h.pan.c*Math.PI/180);e.va(this.h.j.c*
Math.PI/180);e.kb(this.h.L.c*Math.PI/180);var r=!1;if(-.01>e.z){var p,u;u=-f/e.z;p=e.x*u;u*=e.y;Math.abs(p)<l/2+100&&Math.abs(u)<k/2+100&&(r=!0,p+=l/2,u+=k/2)}if(r){this.h.ea&&(b.blendFunc(b.SRC_ALPHA,b.DST_ALPHA),b.enable(b.BLEND),b.disable(b.DEPTH_TEST));var r=l/2,t=k/2;c=Math.sqrt((r-p)*(r-p)+(t-u)*(t-u));var v=g/2,t=l>k?l:k,r=n.kj/100*((v-c)/v);0>r&&(r=0);if(this.h.ea){b.useProgram(this.Pb);b.bindBuffer(b.ARRAY_BUFFER,this.h.N.ab);b.vertexAttribPointer(this.Pb.Z,this.h.N.ab.Ac,b.FLOAT,!1,0,0);
var q=b.getUniformLocation(this.Pb,"uCanvasDimensions");b.uniform2f(q,b.drawingBufferWidth,b.drawingBufferHeight);b.uniform2f(b.getUniformLocation(this.Pb,"uFlareCenterPosition"),b.drawingBufferWidth/l*p,k-b.drawingBufferHeight/k*u);b.uniform1f(b.getUniformLocation(this.Pb,"uBlindingValue"),r);q=b.getUniformLocation(this.Pb,"uAspectRatio");b.uniform1f(q,this.h.N.dg?b.drawingBufferWidth/b.drawingBufferHeight:b.drawingBufferWidth/b.drawingBufferHeight/(l/k));b.drawArrays(b.TRIANGLE_STRIP,0,this.h.N.ab.Ed)}else q=
this.R.createRadialGradient(p,u,1,p,u,t),q.addColorStop(0,"rgba(255, 255, 255, "+r+")"),q.addColorStop(.5,"rgba(255, 255, 255, "+.8*r+")"),q.addColorStop(1,"rgba(255, 255, 255, "+.6*r+")"),this.R.fillStyle=q,this.R.fillRect(0,0,this.R.width,this.R.height);if(0!=Number(n.type)&&!this.h.N.dg){var r=l/2-p,t=k/2-u,x=1,B=Number(n.type)-1;c<.35*v&&(x=c/(.35*v),x*=x);c>.7*v&&(x=(v-c)/(.3*v));x*=n.alpha/100;if(0<this.Kb[B].length)for(c=0;c<this.Kb[B].length;c++){var A=this.Kb[B][c],v=A.l*h;a=A.alpha*x;0>
a&&(a=0);var z=A.color;if(8==B||9==B||10==B)z=n.color;if(this.h.ea)b.useProgram(this.oa),b.bindBuffer(b.ARRAY_BUFFER,this.Ae),b.vertexAttribPointer(this.oa.Z,this.Ae.Ac,b.FLOAT,!1,0,0),q=b.getUniformLocation(this.oa,"uCanvasDimensions2"),b.uniform2f(q,b.drawingBufferWidth,b.drawingBufferHeight),b.uniform2f(b.getUniformLocation(this.oa,"uCirclePosition"),b.drawingBufferWidth/l*(p+r*A.i),b.drawingBufferWidth/l*(k-(u+t*A.i))),b.uniform2f(b.getUniformLocation(this.oa,"uCircleTexturePosition"),b.drawingBufferWidth/
l*(p+r*A.i),k-(u+t*A.i)),b.uniform1f(b.getUniformLocation(this.oa,"uCircleRadius"),v),b.uniform3f(b.getUniformLocation(this.oa,"uCircleColor"),(z>>16&255)/255,(z>>8&255)/255,(z&255)/255),b.uniform1f(b.getUniformLocation(this.oa,"uCircleAlpha"),a),b.uniform1f(b.getUniformLocation(this.oa,"uCircleSoftness"),.1),q=b.getUniformLocation(this.oa,"uAspectRatio"),b.uniform1f(q,b.drawingBufferWidth/b.drawingBufferHeight/(l/k)),b.drawArrays(b.TRIANGLE_FAN,0,this.Ae.Ed);else{this.R.save();this.R.translate(p+
r*A.i,u+t*A.i);q=this.R.createRadialGradient(0,0,1,0,0,1.1*v);q.addColorStop(0,this.h.fa(z,a));q.addColorStop(.65,this.h.fa(z,.9*a));q.addColorStop(.8,this.h.fa(z,.7*a));q.addColorStop(1,this.h.fa(z,.2*a));this.R.beginPath();var z=2*Math.PI/6,A=Math.PI/180*35,C=!0;for(a=A;a<=A+2*Math.PI;a+=z)C?(this.R.moveTo(v*Math.sin(a),v*Math.cos(a)),C=!1):this.R.lineTo(v*Math.sin(a),v*Math.cos(a));this.R.closePath();this.R.fillStyle=q;this.R.fill();this.R.restore()}}if(0<this.Hb[B].length)for(c=0;c<this.Hb[B].length;c++){A=
this.Hb[B][c];v=A.l*h;a=A.alpha*x;0>a&&(a=0);z=A.color;if(8==B||9==B||10==B)z=n.color;this.h.ea?(b.useProgram(this.oa),b.bindBuffer(b.ARRAY_BUFFER,this.fd),b.vertexAttribPointer(this.oa.Z,this.fd.Ac,b.FLOAT,!1,0,0),q=b.getUniformLocation(this.oa,"uCanvasDimensions2"),b.uniform2f(q,b.drawingBufferWidth,b.drawingBufferHeight),q=b.getUniformLocation(this.oa,"uCirclePosition"),b.uniform2f(q,b.drawingBufferWidth/l*(p+r*A.i),b.drawingBufferWidth/l*(k-(u+t*A.i))),q=b.getUniformLocation(this.oa,"uCircleTexturePosition"),
b.uniform2f(q,b.drawingBufferWidth/l*(p+r*A.i),k-(u+t*A.i)),q=b.getUniformLocation(this.oa,"uCircleRadius"),b.uniform1f(q,v),b.uniform3f(b.getUniformLocation(this.oa,"uCircleColor"),(z>>16&255)/255,(z>>8&255)/255,(z&255)/255),b.uniform1f(b.getUniformLocation(this.oa,"uCircleAlpha"),a),b.uniform1f(b.getUniformLocation(this.oa,"uCircleSoftness"),A.u),q=b.getUniformLocation(this.oa,"uAspectRatio"),b.uniform1f(q,b.drawingBufferWidth/b.drawingBufferHeight/(l/k)),b.drawArrays(b.TRIANGLE_FAN,0,this.fd.Ed)):
(this.R.save(),this.R.translate(p+r*A.i,u+t*A.i),q=this.R.createRadialGradient(0,0,1,0,0,v),q.addColorStop(0,this.h.fa(z,a)),q.addColorStop(1-A.u,this.h.fa(z,.8*a)),q.addColorStop(1,this.h.fa(z,0)),this.R.beginPath(),this.R.arc(0,0,v,0,2*Math.PI,!1),this.R.closePath(),this.R.fillStyle=q,this.R.fill(),this.R.restore())}if(0<this.Lb[B].length)for(c=0;c<this.Lb[B].length;c++)n=this.Lb[B][c],v=n.l*h,a=n.alpha*x,0>a&&(a=0),this.h.ea?(b.useProgram(this.jb),b.activeTexture(b.TEXTURE0),b.bindTexture(b.TEXTURE_2D,
this.Kk),b.bindBuffer(b.ARRAY_BUFFER,this.fd),b.vertexAttribPointer(this.jb.Z,this.fd.Ac,b.FLOAT,!1,0,0),q=b.getUniformLocation(this.jb,"uCanvasDimensions2"),b.uniform2f(q,l,k),q=b.getUniformLocation(this.jb,"uCirclePosition"),b.uniform2f(q,p+r*n.i,k-(u+t*n.i)),q=b.getUniformLocation(this.jb,"uRingTexturePosition"),b.uniform2f(q,b.drawingBufferWidth/l*(p+r*n.i),k-(u+t*n.i)),q=b.getUniformLocation(this.jb,"uCircleRadius"),b.uniform1f(q,v),b.uniform2f(b.getUniformLocation(this.jb,"uRingPosition"),p+
r*n.i,k-(u+t*n.i)),b.uniform1f(b.getUniformLocation(this.jb,"uRingRadius"),v),b.uniform1f(b.getUniformLocation(this.jb,"uRingAlpha"),a),q=b.getUniformLocation(this.jb,"uAspectRatio"),b.uniform1f(q,b.drawingBufferWidth/b.drawingBufferHeight/(l/k)),b.uniform1i(b.getUniformLocation(this.jb,"uSampler"),0),b.drawArrays(b.TRIANGLE_FAN,0,this.fd.Ed)):(this.R.save(),this.R.translate(p+r*n.i,u+t*n.i),q=this.R.createRadialGradient(0,0,0,0,0,v),q.addColorStop(0,this.h.fa(16777215,0)),q.addColorStop(.88,this.h.fa(0,
0)),q.addColorStop(.9,this.h.fa(16654848,a)),q.addColorStop(.92,this.h.fa(16776448,a)),q.addColorStop(.94,this.h.fa(4849466,a)),q.addColorStop(.96,this.h.fa(131071,a)),q.addColorStop(.98,this.h.fa(8190,a)),q.addColorStop(1,this.h.fa(0,0)),this.R.beginPath(),this.R.arc(0,0,v,0,2*Math.PI,!1),this.R.closePath(),this.R.fillStyle=q,this.R.fill(),this.R.restore())}this.h.ea&&(b.useProgram(this.h.la.D),b.disable(b.BLEND),b.enable(b.DEPTH_TEST))}}}};return g}();m.wl=g})(ggP2VR||(ggP2VR={}));var O=!1;
(function(m){var g=function(){return function(){this.f=this.j=this.pan=0}}(),h=function(){function b(a,d){this.pan={c:0,Na:0,min:0,max:360,d:0,yi:0,cd:0};this.j={c:0,Na:0,min:-90,max:90,d:0,cd:0};this.L={c:0,Na:0,min:-180,max:180,d:0};this.kc={pan:0,j:-90,L:0,f:170,Ab:9};this.f={c:70,Na:70,min:1,Kf:0,max:170,si:360,ti:270,He:0,d:0,mode:0,Yk:0,sj:0};this.Ca={L:0,pitch:0};this.m={width:10,height:10};this.ib=0;this.Ph=new m.ra;this.crossOrigin="anonymous";this.Xa=this.Yg=4;this.Rc=this.mg=this.Mf=this.ec=
0;this.Y={start:{x:0,y:0},ba:{x:0,y:0},od:{x:0,y:0},c:{x:0,y:0},aa:{x:0,y:0}};this.X={fb:!1,xj:0,startTime:0,start:{x:0,y:0},ba:{x:0,y:0},od:{x:0,y:0},c:{x:0,y:0},aa:{x:0,y:0}};this.Yh=!0;this.ua={enabled:!0,ba:{x:0,y:0},aa:{x:0,y:0},Ki:0,f:{active:!1,Ub:0}};this.o={src:[],pe:4,width:640,height:480,md:!1,Ng:!1,Zk:!1,Vd:"loop",a:HTMLVideoElement=null,bl:!1,gc:WebGLTexture=null,aj:WebGLBuffer=null,lh:WebGLBuffer=null,ji:WebGLBuffer=null,format:1,Gg:0,ai:1};this.ae=0;this.ga=this.sa=this.Aa=this.U=this.Sb=
this.nb=this.A=null;this.Xd="pano";this.$h="flashcontainer";this.Qh="";this.control=null;this.Gb=[];this.xa=!1;this.zg=1;this.M=null;this.Md=this.bf=this.xf=!1;this.$e=0;this.bd=.02;this.Dh=0;this.Eh=!1;this.Ch=this.pg=this.af=this.oe=this.hj=0;this.yb="";this.Me=this.rc=!1;this.Zg=0;this.wg=[];this.we=[];this.Re=this.hc=1;this.df=1024;this.Pf=!1;this.qk=200;this.ka=0;this.wd=5;this.ii=this.cl=this.Eb=0;this.s={enabled:!1,timeout:5,active:!1,cg:!1,speed:.4,nh:0,Wg:0,xi:!0,$i:!1,ad:!1,ij:!1,vi:!1,
Si:!1,startTime:0,nd:0,Cg:!1,xg:!1,Rg:0};this.v={active:!1,ne:!1,speed:.1,pan:0,j:0,L:0,f:70,vd:70,ik:0,kk:0,jk:0,hk:0,Ab:0,Of:0,li:0,Zi:!1,wi:!1,gj:0,fj:0};this.Oa=null;this.Xe={};this.jg={};this.w={mode:1,Df:-1,na:0,cb:0,Gc:.05,Rb:255,Qb:1,Ob:255,Nb:.3,Ce:!0,Ui:{enabled:!0,width:180,height:20,Vi:0,Ti:1,background:!0,Ob:16777215,Nb:1,Rb:0,Qb:1,Gh:3,Hh:1,xh:!0},bb:[],Db:[],Bc:[],ih:[]};this.ta=null;this.P=[];this.S=[];this.I=[];this.Va=[];this.Te=[];this.Ka=[];this.Ha=[];this.V=1;this.la=this.yd=
this.ue=null;this.jf={};this.addListener=function(a,d){(this.jf[a]=this.jf[a]||[]).push(d)};this.el=function(a,d){var b=this.jf[a],l,k;if(b)for(k=0,l=b.length;k<l;k++)b[k].apply(null,d)};this.removeEventListener=function(a,d){var b=this.jf[a];if(b){var l,k;k=0;for(l=b.length;k<l;k++)if(b[k]===d){1===l?delete this.jf[a]:b.splice(k,1);break}}};this.g=new m.Al;this.hn={target:0,current:0,Gc:.01,bm:2,Th:0,yg:!1,Ml:!1};this.margin={left:0,top:0,right:0,bottom:0};this.B={Gf:!1,pi:!1,xb:!1,Tg:!1,kd:!0,Yj:!1,
Wk:1,Mk:!1,Sh:!0,hf:!0,ug:!1,yf:!1,Ok:!0,sensitivity:8};this.Jf=[];this.Lc=!0;this.qa={x:0,y:0};this.ig=this.ub=this.hg=this.Cc=this.ea=!1;this.uh=this.nl=!0;this.hi=!1;this.Wd=!0;this.gi=!1;this.Ia=this.xd="";this.Nc="transition";this.Ta="transform";this.ed="perspective";this.vj="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAIAAABLbSncAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAA5JREFUeNpiYBgeACDAAADIAAE3iTbkAAAAAElFTkSuQmCC";this.hb={width:0,height:0};this.Bj=new m.ra;this.Aj=
new m.ra;this.Cj=new m.ra;this.Dj=new m.ra;this.zj=new m.ra;this.Bf=!1;this.gk=this.Tb="";this.bj=[];this.qh=[];this.Og=this.bk=this.Kg=this.ck=this.$d=this.$j=this.Li=this.Dd=this.Lg=this.ak=!1;this.vh=!0;this.Zj=!1;this.Uj=[];this.devicePixelRatio=1;this.Ea=this.N=null;this.pb={enabled:!1,speed:1,sd:!1,Xh:!0};this.vk=!1;this.eb=new m.Bl;this.Yi=!1;this.gf=function(a,d){if(0==a.length)return a;var b,l,k,g,h,n,r,p;p=[];b=d.$g(a[0])-0;for(g=0;g<a.length;g++){n=g;r=g+1;r==a.length&&(r=0);l=d.$g(a[r])-
0;if(0<=b&&0<=l)p.push(a[n]);else if(0<=b||0<=l)k=l/(l-b),0>k&&(k=0),1<k&&(k=1),h=new m.ra,h.jd(a[n],a[r],k),0>b||p.push(a[n]),p.push(h);b=l}return p};this.Pi=0;this.Qg=-1;this.rf=function(a){return a?a.pageX||a.pageY?{x:a.pageX,y:a.pageY}:a.clientX||a.clientY?{x:a.clientX+document.body.scrollLeft+document.documentElement.scrollLeft,y:a.clientY+document.body.scrollTop+document.documentElement.scrollTop}:a.touches&&a.touches[0]?{x:a.touches[0].pageX,y:a.touches[0].pageY}:{x:0,y:0}:{x:0,y:0}};this.Vg=
1;this.fm=this.Dg=this.fk=this.Uh=this.Gi=this.ah=0;this.ze=!0;this.ob=new m.Pg(this);this.ob.Ce=!1;this.uj();this.Oe(this.ob);this.checkLoaded=this.Gb;this.isLoaded=!1;d&&d.hasOwnProperty("useFlash")&&d.useFlash&&(this.ub=!0,this.ea=this.Cc=!1,d.hasOwnProperty("flashPlayerId")?this.Xd=d.flashPlayerId:this.Xd="pano",d.hasOwnProperty("flashContainerId")?this.$h=d.flashContainerId:this.$h=a+"flash");this.pa();this.ub||(this.Ba=new m.wl(this));this.pj(a);this.Ll();this.userdata=this.Xe=this.Ag();this.emptyHotspot=
this.ob;this.mouse=this.qa;this.zn();this.N=new m.yl(this);this.Ea=new m.zl(this);this.la=new m.Fl(this)}b.prototype.Wc=function(a,d,c){var b=d?Number(d):0;if(0!=a&&4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(d&&0!==b&&4!==b&&12!==b&&9!==b)this.Uc("Unsupported projection2 type: "+b);else if(a==b&&(b=0),this.Mf=c?Number(c):1,this.Xa!=a||this.ec!=b)this.Xa=a,this.ec=b,this.la.Jg()};b.prototype.ya=function(){return 0==this.Xa?4:this.Xa};b.prototype.Kh=function(a,d){if(0!=a&&
4!=a&&12!=a&&9!=a)this.Uc("Unsupported projection type: "+a);else if(this.ea||0==a||4==a||this.Uc("Projection changes require WebGL!"),this.ya()!=a){var c={};c.pan=this.pan.c;c.tilt=this.j.c;c.fov=this.f.c;c.projection=a;c.timingFunction=3;c.speed=d;var b=this.qf(a);c.fov=Math.min(b,c.fov);this.Ug(c)}};b.prototype.uj=function(){var a;this.devicePixelRatio=window.devicePixelRatio||1;this.ak=navigator.userAgent.match(/(MSIE)/g)?!0:!1;this.Lg=navigator.userAgent.match(/(Firefox)/g)?!0:!1;if(this.Dd=
navigator.userAgent.match(/(Safari)/g)?!0:!1)a=navigator.userAgent.indexOf("Safari"),this.td=navigator.userAgent.substring(a+7),a=navigator.userAgent.indexOf("Version"),-1!=a&&(this.td=navigator.userAgent.substring(a+8)),this.td=this.td.substring(0,this.td.indexOf(" ")),this.td=this.td.substring(0,this.td.indexOf(".")),this.Li=!0;if(this.$j=navigator.userAgent.match(/(Chrome)/g)?!0:!1)this.Dd=!1;this.$d=navigator.userAgent.match(/(iPad|iPhone|iPod)/g)?!0:!1;this.ck=navigator.userAgent.match(/(iPhone|iPod)/g)?
!0:!1;this.Kg=navigator.userAgent.match(/(android)/i)?!0:!1;this.bk=navigator.userAgent.match(/(IEMobile)/i)?!0:!1;this.Og=this.$d||this.Kg||this.bk;/iP(hone|od|ad)/.test(navigator.platform)&&(a=navigator.appVersion.match(/OS (\d+)_(\d+)_?(\d+)?/),this.Uj=[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3]||"0",10)]);a=["Webkit","Moz","O","ms","Ms"];var d;this.Ia="";this.Nc="transition";this.Ta="transform";this.ed="perspective";for(d=0;d<a.length;d++)"undefined"!==typeof document.documentElement.style[a[d]+
"Transform"]&&(this.Ia="-"+a[d].toLowerCase()+"-",this.Nc=a[d]+"Transition",this.Ta=a[d]+"Transform",this.ed=a[d]+"Perspective");this.hi=G();this.ea=N();this.Cc=this.hi;this.ea&&(this.Cc=!1);this.rc=!0;this.Me=!1;if(this.$d||this.Kg)this.Pk(80),this.wd=2;this.Uc("Pano2VR player - Prefix:"+this.Ia+", "+(this.hi?"CSS 3D available":"CSS 3D not available")+", "+(this.ea?"WebGL available":"WebGL not available"));try{window.AudioContext=window.AudioContext||window.webkitAudioContext,this.Ga=new AudioContext}catch(c){this.Ga=
null}this.Dd&&(!this.Li||9>Number(this.td))&&(this.Ga=null);this.vh=this.ck?this.Dd&&this.Li&&10<=Number(this.td)?!0:!1:!0};b.prototype.O=function(a){if(O){var d=document.getElementById("debug");d&&(d.innerHTML=a.toString()+"<br />");window.console&&window.console.log(a)}};b.prototype.Uc=function(a){var d=document.getElementById("debug");d&&(d.innerHTML=a+"<br />");window.console&&window.console.log(a)};b.prototype.zn=function(){this.requestAnimationFrame=function(){var a=window.requestAnimationFrame||
window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame;return a?a:function(a){window.setTimeout(a,10)}}()};b.prototype.Pk=function(a){this.qk=a};b.prototype.En=function(a){this.crossOrigin=a};b.prototype.Gn=function(a){this.De=a};b.prototype.Bm=function(){return this.Zg};b.prototype.Dn=function(a){this.xd=a};b.prototype.jm=function(){return this.xd};b.prototype.qm=function(){return this.Og};b.prototype.om=function(){return this.s.active};
b.prototype.In=function(a){this.Og=!!a};b.prototype.Eg=function(){return this.isLoaded};b.prototype.dd=function(){return 1*this.m.height/(2*Math.tan(Math.PI/180*(this.Jb()/2)))};b.prototype.Rk=function(a,d){this.isFullscreen&&(a=window.innerWidth,d=window.innerHeight);var c=a-this.margin.left-this.margin.right,b=d-this.margin.top-this.margin.bottom;if(!(10>c||10>b)){var f=window.devicePixelRatio||1;this.Pf&&(f=1);this.A.style.width=c+"px";this.A.style.height=b+"px";this.A.style.left=this.margin.left+
"px";this.A.style.top=this.margin.top+"px";if(this.ea)try{this.nb&&(this.nb.style.position="absolute",this.nb.style.display="inline",this.nb.style.width=c+"px",this.nb.style.height=b+"px",this.nb.width=c*f,this.nb.height=b*f),this.G&&(this.hb.width=c*f,this.hb.height=b*f,this.G.viewport(0,0,this.G.drawingBufferWidth,this.G.drawingBufferHeight))}catch(l){alert(l)}this.Sb&&(this.Sb.style.width=a+"px",this.Sb.style.height=d+"px",this.Sb.width=a,this.Sb.height=d);this.Aa&&(this.Aa.style.width=a+"px",
this.Aa.style.height=d+"px",this.sa.style.width=a+"px",this.sa.style.height=d+"px",this.sa.width=a,this.sa.height=d,this.sa.style.left=this.margin.left+"px",this.sa.style.top=this.margin.top+"px",this.M&&this.M!=this.Aa&&(this.M.style.width=a+"px",this.M.style.height=d+"px"));this.Ba&&(c=this.Ba.Ic,c.style.width=a+"px",c.style.height=d+"px",c.width=a,c.height=d,c.style.left=this.margin.left+"px",c.style.top=this.margin.top+"px");this.xf&&(this.xa=!0);c=this.A.offsetWidth;b=this.A.offsetHeight;if(this.m.width!=
c||this.m.height!=b)this.m.width=c,this.m.height=b;this.Do();this.M&&this.M.ggUpdateSize&&this.M.ggUpdateSize(a,d)}};b.prototype.me=function(){this.Yi=!0};b.prototype.$c=function(){this.Rk(this.ue.offsetWidth,this.ue.offsetHeight)};b.prototype.Nm=function(){var a={width:0,height:0};a.width=this.m.width;a.height=this.m.height;return a};b.prototype.Yd=function(){var a={x:0,y:0},d=this.A;if(d.offsetParent){do a.x+=d.offsetLeft,a.y+=d.offsetTop,d=d.offsetParent;while(d)}return a};b.prototype.Un=function(a){this.Oa=
a};b.prototype.Kn=function(a,d,c,b){this.margin.left=a;this.margin.top=d;this.margin.right=c;this.margin.bottom=b;this.Oa=this.skinObj;this.me()};b.prototype.Ul=function(a){0==a&&(this.B.kd=!1);1==a&&(this.B.kd=!0);2==a&&(this.B.kd=this.B.kd?!1:!0)};b.prototype.Lm=function(){return 1==this.B.kd?1:0};b.prototype.mj=function(a,d){this.w.mode=1==d&&0<this.w.mode?0:Math.round(a);this.update();this.ga&&(this.ga.changePolygonMode(a,d),this.ga.update())};b.prototype.Tk=function(a){var d=this.w.bb.indexOf(a);
-1==d?(this.w.bb.push(a),this.w.Db.push(0),this.w.Bc.push(1)):this.w.Bc[d]=1;this.update()};b.prototype.Sj=function(a){var d=this.w.bb.indexOf(a);-1!=d&&(this.w.Bc[d]=0,this.w.ih.push(a),this.update())};b.prototype.po=function(a){var d=this.w.bb.indexOf(a);-1==d||-1!=d&&0==this.w.Bc[d]?this.Tk(a):this.Sj(a);this.update()};b.prototype.Sl=function(a,d,c,b,f){for(var l=0;l<this.P.length;l++){var k=this.P[l];"poly"!=k.type||k.id!=a&&""!=a||(k.Ob=d,k.Nb=c,k.Rb=b,k.Qb=f)}""==a&&(this.w.Ob=d,this.w.Nb=c,
this.w.Rb=b,this.w.Qb=f);this.update()};b.prototype.Ql=function(a){this.Ba&&(this.Ba.Oi=0==a?!0:1==a?!1:!this.Ba.Oi,this.update())};b.prototype.Dm=function(){return this.w.mode};b.prototype.Vl=function(){};b.prototype.Mm=function(){return 0};b.prototype.Vj=function(a,d,c){a=Math.atan2(a+1,c);var b=Math.atan2(d+1,c);d=Math.sin(a);c=Math.sin(b);a=Math.cos(a);b=Math.cos(b);this.Bj.Wa(0,0,-1);this.Aj.Wa(a,0,-d);this.Cj.Wa(-a,0,-d);this.Dj.Wa(0,b,-c);this.zj.Wa(0,-b,-c)};b.prototype.Nh=function(a){a=this.gf(a,
this.Bj);a=this.gf(a,this.Aj);a=this.gf(a,this.Cj);a=this.gf(a,this.Dj);return a=this.gf(a,this.zj)};b.prototype.gl=function(a){if(!this.rc&&this.Wm!=a){this.Wm=a;var d;d=this.margin.left+this.m.width/2+"px ";d+=this.margin.top+this.m.height/2+"px ";this.Aa.style[this.ed]=a+"px";this.Aa.style[this.ed+"Origin"]=d;this.A.style[this.ed]=a+"px";this.A.style[this.ed+"Origin"]=d}};b.prototype.ao=function(){return this.N.Ue||this.N.Ld||this.ea&&(4!=this.Xa||0!=this.ec)?!1:!0};b.prototype.fg=function(){var a,
d=new m.ra(0,0,-100),c=this.dd(),b,f,l;f=100/this.f.c;l=this.g.width/this.g.height;b=this.m.height*f*l;f*=this.m.height;for(var k=this.ao(),g=0;g<this.P.length;g++){var h=this.P[g],n,r;"point"==h.type&&(r=!1,2==this.ib?(a=(this.pan.c-h.pan)/100/l*b,n=(this.j.c-h.j)/100*f,Math.abs(a)<this.m.width/2+500&&Math.abs(n)<this.m.height/2+500&&(r=!0)):(d.Wa(0,0,-100),d.va(-h.j*Math.PI/180),d.Da(h.pan*Math.PI/180),d.Da(-this.pan.c*Math.PI/180),d.va(this.j.c*Math.PI/180),d.kb(this.L.c*Math.PI/180),.01>d.z?(n=
-c/d.z,a=d.x*n,n*=d.y,Math.abs(a)<this.m.width/2+500&&Math.abs(n)<this.m.height/2+500&&(r=!0)):n=a=0),h.fc=a+this.m.width/2,h.Bb=n+this.m.height/2,h.a&&h.a.__div&&("none"!=h.a.__div.style[this.Nc]&&(h.a.__div.style[this.Nc]="none"),h.a.ggUse3d?(this.rc||this.gl(c),h.a.__div.style.width="1px",h.a.__div.style.height="1px",a="",this.rc&&(a+="perspective("+c+"px) "),a+="translate3d(0px,0px,"+c+"px) ",a+="rotateZ("+this.L.c.toFixed(10)+"deg) ",a+="rotateX("+this.j.c.toFixed(10)+"deg) ",a+="rotateY("+(-this.pan.c).toFixed(10)+
"deg) ",a+="rotateY("+h.pan.toFixed(10)+"deg) ",a+="rotateX("+(-h.j).toFixed(10)+"deg) ",a+="translate3d(0px,0px,"+(-1*h.a.gg3dDistance).toFixed(10)+"px) ",h.a.__div.style[this.Ta+"Origin"]="0% 0%",h.a.__div.style[this.Ta]=a,h.a.__div.style.left=this.margin.left+this.m.width/2+"px",h.a.__div.style.top=this.margin.top+this.m.height/2+"px"):r&&k?(h.a.__div.style.left=this.margin.left+a+this.m.width/2+"px",h.a.__div.style.top=this.margin.top+n+this.m.height/2+"px"):(h.a.__div.style.left="-1000px",h.a.__div.style.top=
"-1000px")));if("poly"==h.type){var p=[];if(2==this.ib)for(h.Gd=[],r=0;r<h.kg.length;r++)n=h.kg[r],a=(this.pan.c-n.pan)/100/l*b,n=(this.j.c-n.j)/100*f,a+=this.margin.left+this.m.width/2,n+=this.margin.top+this.m.height/2,h.Gd.push({fc:a,Bb:n});else{for(r=0;r<h.kg.length;r++)n=h.kg[r],d.Wa(0,0,-100),d.va(-n.j*Math.PI/180),d.Da(n.pan*Math.PI/180),d.Da(-this.pan.c*Math.PI/180),d.va(this.j.c*Math.PI/180),d.kb(this.L.c*Math.PI/180),p.push(d.clone());p=this.Nh(p);if(0<p.length)for(r=0;r<p.length;r++)d=
p[r],.1>d.z?(n=-c/d.z,a=this.m.width/2+d.x*n,n=this.m.height/2+d.y*n):n=a=0,d.fc=a,d.Bb=n;h.Gd=p}}}};b.prototype.km=function(){for(var a=[],d=0;d<this.P.length;d++){var c=this.P[d];"point"==c.type&&c.a&&c.a.__div&&a.push(c.a.__div)}return a};b.prototype.fa=function(a,d){a=Number(a);isNaN(d)&&(d=0);0>d&&(d=0);1<d&&(d=1);return"rgba("+(a>>16&255)+","+(a>>8&255)+","+(a&255)+","+d+")"};b.prototype.kn=function(){var a,d;if(this.sa&&(this.w.Df!=this.w.mode&&(this.w.Df=this.w.mode,this.sa.style.visibility=
0<this.w.mode?"inherit":"hidden"),0<=this.w.mode||0<this.w.bb.length)){this.$||(this.$=this.sa.getContext("2d"));if(this.$.width!=this.m.width||this.$.height!=this.m.height)this.$.width=this.m.width,this.$.height=this.m.height;this.$.clear?this.$.clear():this.$.clearRect(0,0,this.sa.width,this.sa.height);var c=1;0>=this.w.mode&&(c=0);3==this.w.mode&&(c=this.w.na);for(a=0;a<this.P.length;a++){d=this.P[a];var b=c;if("poly"==d.type){var f=d.Gd;2==this.w.mode&&(b=d.na);var l=this.w.bb.indexOf(d.id);-1!=
l&&(b=this.w.Db[l]);this.$.fillStyle=this.fa(d.Ob,d.Nb*b);this.$.strokeStyle=this.fa(d.Rb,d.Qb*b);if(0<f.length){this.$.beginPath();for(d=0;d<f.length;d++)b=f[d],0==d?this.$.moveTo(b.fc,b.Bb):this.$.lineTo(b.fc,b.Bb);this.$.closePath();this.$.stroke();this.$.fill()}}}}};b.prototype.Tj=function(a,d,c){var b,f,l=!1;b=0;for(f=a.length-1;b<a.length;f=b++){var k=a[b];f=a[f];k.Bb>c!=f.Bb>c&&d<(f.fc-k.fc)*(c-k.Bb)/(f.Bb-k.Bb)+k.fc&&(l=!l)}return l};b.prototype.Mh=function(a,d){var c=-1;if((0<=this.w.mode||
0<this.w.bb.length)&&this.Sm())for(var b=0;b<this.P.length;b++){var f=this.P[b];"poly"==f.type&&f.Gd&&0<f.Gd.length&&(-1!=this.w.mode||-1!=this.w.bb.indexOf(f.id))&&this.Tj(f.Gd,a,d)&&(c=b,f.fc=a,f.Bb=d)}return 0<=c?this.P[c]:!1};b.prototype.Sm=function(){return 4==this.ya()&&0==this.ec};b.prototype.Jb=function(){var a=0,d=this.ya(),c=this.m;switch(this.f.mode){case 0:a=this.f.c/2;break;case 1:a=4==d?180*Math.atan(c.height/c.width*Math.tan(this.f.c/2*Math.PI/180))/Math.PI:c.height/c.width*this.f.c/
2;break;case 2:a=Math.sqrt(c.width*c.width+c.height*c.height);a=4==d?180*Math.atan(c.height/a*Math.tan(this.f.c/2*Math.PI/180))/Math.PI:c.height/a*this.f.c/2;break;case 3:a=4*c.height/3>c.width?this.f.c/2:4==d?180*Math.atan(4*c.height/(3*c.width)*Math.tan(this.f.c/2*Math.PI/180))/Math.PI:4*c.height/(3*c.width)*(this.f.c/2)}return 2*a};b.prototype.mm=function(a,d){a||(a=this.Jb());d||(d=this.ya());return 4==d?180*Math.atan(this.Nd()*Math.tan(a/2*Math.PI/180))/Math.PI:a*this.Nd()};b.prototype.Nd=function(){return this.m.width/
this.m.height};b.prototype.Xf=function(a){a/=2;var d,c=this.ya();switch(this.f.mode){case 0:this.f.c=2*a;break;case 1:a=4==c?180*Math.atan(this.m.width/this.m.height*Math.tan(a*Math.PI/180))/Math.PI:this.m.width/this.m.height*a;this.f.c=2*a;break;case 2:d=Math.sqrt(this.m.width*this.m.width+this.m.height*this.m.height);a=4==c?180*Math.atan(d/this.m.height*Math.tan(a*Math.PI/180))/Math.PI:d/this.m.height*a;this.f.c=2*a;break;case 3:4*this.m.height/3>this.m.width||(d=3*this.m.width/(4*this.m.height),
a=4==c?180*Math.atan(d*Math.tan(a*Math.PI/180))/Math.PI:d*a),this.f.c=2*a}};b.prototype.tg=function(){var a=new g;a.pan=this.pan.c;a.j=this.j.c;a.f=this.f.c;this.te(a);this.te(a);this.te(a);this.pan.c=a.pan;this.j.c=a.j;this.f.c=a.f};b.prototype.te=function(a){var d,c,b=this.m.width/this.m.height;if(2==this.ib){0<this.f.Kf&&(d=this.hc,this.g.H&&0<this.g.H.length&&(d=this.g.H[0].height),this.f.min=100*this.m.height/(d*this.f.Kf));c=a.f/2;d=c*b;var f=this.g.width/this.g.height*50,b=this.B.Ok?2*Math.min(50,
f/b):2*Math.max(50,f/b);a.f<this.f.min&&(a.f=this.f.min);a.f>b&&(a.f=b);50<c?a.j=0:(50<a.j+c&&(a.j=50-c),-50>a.j-c&&(a.j=-50+c));d>f?a.pan=0:(a.pan+d>f&&(a.pan=f-d,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0)),a.pan-d<-f&&(a.pan=-f+d,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0)))}else{0<this.f.Kf&&(d=this.hc,this.g.H&&0<this.g.H.length&&(d=this.g.H[0].height),this.f.min=360*Math.atan2(this.m.height/2,d/2*this.f.Kf)/Math.PI);a.f<this.f.min&&(a.f=this.f.min);var f=this.f.max,
l=179;c=this.Jb()/2;d=b*c;4==this.ya()?d=180*Math.atan(b*Math.tan(c*Math.PI/180))/Math.PI:9==this.ya()?(f=this.f.ti,l=355):12==this.ya()&&(f=this.f.si,l=360);this.ea||(f=Math.max(160,f));a.f>f&&(a.f=f);12==this.ya()&&(2*d>l&&(a.f=l/b),c=this.Jb()/2,2*c>l&&(a.f=l),c=this.Jb()/2,d=b*c);2*c>this.j.max-this.j.min&&180>this.j.max-this.j.min&&(c=(this.j.max-this.j.min)/2,this.Xf(2*c));90>this.j.max?a.j+c>this.j.max&&(a.j=this.j.max-c):a.j>this.j.max&&(a.j=this.j.max);-90<this.j.min?a.j-c<this.j.min&&(a.j=
this.j.min+c):a.j<this.j.min&&(a.j=this.j.min);b=this.pan.max-this.pan.min;if(359.99>b){var f=90,l=Math.tan(c*Math.PI/180),k=Math.tan((Math.abs(a.j)+c)*Math.PI/180),k=Math.sqrt(k*k+1)/Math.sqrt(l*l+1);c=180*Math.atan(k*Math.tan(d*Math.PI/180))/Math.PI;2*c>b&&(k=Math.tan(b*Math.PI/360)/Math.tan(d*Math.PI/180),b=k*Math.sqrt(l*l+1),k=Math.sqrt(b*b-1),f=180/Math.PI*Math.atan(k));a.pan+c>this.pan.max&&(a.pan=this.pan.max-c,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0));a.pan-c<this.pan.min&&
(a.pan=this.pan.min+c,this.s.active&&(this.s.speed=-this.s.speed,this.pan.d=0));a.j+d>f&&(a.j=f-d);a.j-d<-f&&(a.j=-f+d)}}};b.prototype.update=function(a){void 0===a&&(a=0);this.xa=!0;a&&(this.zg=a)};b.prototype.rm=function(){return this.ga?!!this.ga.isTileLoading:0<this.ka||0<this.Eb||0<this.la.ka||0<this.la.Eb};b.prototype.gg=function(){var a=Date.now(),d;this.ub?this.ga&&(this.wo(),2===this.ib?(this.tg(),this.fg()):0===this.ib&&(d=this.dd(),this.Vj(this.m.width/2,this.m.height/2,d),this.fg())):
2===this.ib?(this.fg(),this.ea?(this.la.Wi(),this.la.xk()):this.Wi()):0===this.ib&&(!this.ea||4==this.Xa&&0==this.ec?(d=this.dd(),this.Vj(this.m.width/2,this.m.height/2,d),this.fg(),this.ig?this.la.Co():this.nl&&this.ml(),this.hl(),this.ea?(this.o.md?14==this.o.format?this.la.Bo():this.la.rl():0<this.g.H.length?this.la.Io():this.la.Ko(),this.la.xk()):(this.Cc?0<this.g.H.length?this.zo():this.yo():this.hg&&this.vo(),this.kn()),this.Ba&&this.Ba.jn()):(this.la.rl(),this.fg(),this.Rm()));d=Date.now();
50<d-a?(this.O("Time between frames: "+(d-a)),this.Pf||(2<this.Pi?(this.Pf=!0,this.O("disabling HighDPI rendering"),this.$c()):this.Pi++)):this.Pi=0;this.xf&&this.g.Jk++};b.prototype.yo=function(){var a=!1;if(this.m.width!=this.A.offsetWidth||this.m.height!=this.A.offsetHeight)this.m.width=this.A.offsetWidth,this.m.height=this.A.offsetHeight,this.A.style[this.Ta+"OriginX"]=this.m.width/2+"px",this.A.style[this.Ta+"OriginY"]=this.m.height/2+"px",a=!0;var d=Math.round(this.dd());this.Ef==d&&!a||this.rc||
(this.Ef=d,this.A.style[this.ed]=d+"px");this.eb.Yl(this.pan.c,this.j.c,this.L.c,this.Ca);for(a=0;6>a;a++){var c,b;if(c=this.eb.Za[a])b="",this.rc?(b+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,0px) ",b+="perspective("+d+"px) ",b+="translate3d(0px,0px,"+d+"px) "):b+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,"+d+"px) ",b+="rotateZ("+Number(this.L.c).toFixed(10)+"deg) ",b+="rotateX("+Number(this.j.c).toFixed(10)+"deg) ",b+="rotateY("+Number(-this.pan.c).toFixed(10)+"deg) ",
c.Pj&&(b+=c.Pj,c.pc||(b="translate3d(-10px,-10px,0px) scale(0.001,0.001)"),c.J.style[this.Ta]=b)}};b.prototype.vo=function(){this.tg();var a;this.Sb&&(a=this.Sb.getContext("2d"));if(this.m.width!==this.A.offsetWidth||this.m.height!==this.A.offsetHeight)this.m.width=this.A.offsetWidth,this.m.height=this.A.offsetHeight;if(a){var d=a.canvas.width/2,c=a.canvas.height/2,b=a.createRadialGradient(d,c,5,d,c,Math.max(d,c));b.addColorStop(0,"#333");b.addColorStop(1,"#fff");a.rect(0,0,a.canvas.width,a.canvas.height);
a.fillStyle=b;a.fill();a.fillStyle="#f00";a.font="20px Helvetica";a.textAlign="center";a.fillText("Pan: "+this.pan.c.toFixed(1),d,c-60);a.fillText("Tilt: "+this.j.c.toFixed(1),d,c-30);a.fillText("Fov: "+this.f.c.toFixed(1),d,c+0);a.fillText("Node: "+this.Hj(),d,c+30);a.fillText("Title: "+this.Xe.title,d,c+60)}};b.prototype.wo=function(){this.tg();if(this.m.width!==this.A.offsetWidth||this.m.height!==this.A.offsetHeight)this.m.width=this.A.offsetWidth,this.m.height=this.A.offsetHeight;this.ga&&this.ga.setPan&&
(this.ga.setPan(this.pan.c),this.ga.setTilt(this.j.c),this.ga.setFov(this.f.c))};b.prototype.Wi=function(){this.sa.style.visibility="inherit";this.$||(this.$=this.sa.getContext("2d"));if(this.$.width!=this.m.width||this.$.height!=this.m.height)this.$.width=this.m.width,this.$.height=this.m.height;this.$.clear?this.$.clear():this.$.clearRect(0,0,this.sa.width,this.sa.height);this.Eb=0;var a,d,c;d=100/this.f.c;c=this.g.width/this.g.height;var b=this.m.height*d*c;d*=this.m.height;a=(this.pan.c/100/c-
.5)*b+this.m.width/2;for(var f=(this.j.c/100-.5)*d+this.m.height/2,l,k,g,h,n=0;this.g.H.length>=n+2&&this.g.H[n+1].width>b;)n++;var r,p;p=[];for(r=this.g.H.length-1;r>=n;){c=this.g.H[r];var u;if(c.cache)u={Ua:0,qb:0},u.rb=c.K-1,u.sb=c.da-1;else{u={};var t=-f/d*(c.height/this.g.F);l=(-a+this.m.width)/b*(c.width/this.g.F);k=(-f+this.m.height)/d*(c.height/this.g.F);u.Ua=Math.min(Math.max(0,Math.floor(-a/b*(c.width/this.g.F))),c.K-1);u.qb=Math.min(Math.max(0,Math.floor(t)),c.da-1);u.rb=Math.min(Math.max(0,
Math.floor(l)),c.K-1);u.sb=Math.min(Math.max(0,Math.floor(k)),c.da-1)}p[r]=u;var v=!0;for(k=u.qb;k<=u.sb;k++)for(l=u.Ua;l<=u.rb;l++)h=l+k*c.K,t=c.W[h],t||(t=new m.Bd,c.W[h]=t),this.ka<this.wd?t.g||(this.ii++,t.g=new Image,t.g.onload=this.mo(),t.g.onerror=this.mh(t),t.g.onabort=this.mh(t),t.g.crossOrigin=this.crossOrigin,t.g.setAttribute("src",this.ke(0,r,l,k)),c.cache&&this.Gb.push(t.g),0==this.ka&&this.M&&this.M.ggReLoadedLevels&&this.M.ggReLoadedLevels(),this.ka++,this.xa=!0):this.Eb++,t.g&&t.g.complete||
(v=!1),t.visible=!0;u.ni=v;r--}for(r=this.g.H.length-1;r>=n;){c=this.g.H[r];if(p[r]&&0<=p[r].Ua)for(u=p[r],k=u.qb;k<=u.sb;k++)for(l=u.Ua;l<=u.rb;l++)h=l+k*c.K,(t=c.W[h])||(t=c.W[h]=new m.Bd),t.g&&t.g.complete&&this.$.drawImage(t.g,a+(-this.g.Ja+this.g.F*l)*b/c.width,f+(-this.g.Ja+this.g.F*k)*d/c.height,t.g.width*b/c.width,t.g.height*d/c.height),t.visible=!0;r--}for(b=0;b<this.g.H.length;b++)if(c=this.g.H[b],!c.cache)for(g in c.W)c.W.hasOwnProperty(g)&&(t=c.W[g],t.visible||(t.g=null,delete c.W[g]));
if(0<=this.w.mode||0<this.w.bb.length)for(b=1,0>=this.w.mode&&(b=0),3==this.w.mode&&(b=this.w.na),g=0;g<this.P.length;g++)if(c=this.P[g],a=b,"poly"==c.type&&(d=c.Gd,2==this.w.mode&&(a=c.na),f=this.w.bb.indexOf(c.id),-1!=f&&(a=this.w.Db[f]),0<d.length)){this.$.fillStyle=this.fa(c.Ob,c.Nb*a);this.$.strokeStyle=this.fa(c.Rb,c.Qb*a);this.$.beginPath();for(c=0;c<d.length;c++)a=d[c],0==c?this.$.moveTo(a.fc,a.Bb):this.$.lineTo(a.fc,a.Bb);this.$.closePath();this.$.stroke();this.$.fill()}this.Lc=!1};b.prototype.lo=
function(a){var d=this;return function(){d.xa=!0;d.Lc=!0;a.loaded=!0;a.g&&!a.J&&d.A.appendChild(a.g);d.ka&&d.ka--;0==d.ka&&d.M&&d.M.ggLoadedLevels&&d.M.ggLoadedLevels();a.g&&a.Ma&&(a.Ma.drawImage(a.g,0,0),a.g=null)}};b.prototype.mo=function(){var a=this;return function(){a.xa=!0;a.Lc=!0;a.ka&&a.ka--;0==a.ka&&a.M&&a.M.ggLoadedLevels&&a.M.ggLoadedLevels()}};b.prototype.mh=function(a){var d=this;return function(){d.xa=!0;d.Lc=!0;d.ka&&d.ka--;0==d.ka&&d.M&&d.M.ggLoadedLevels&&d.M.ggLoadedLevels();a.g=
null}};b.prototype.Oj=function(a,d,c){c.Ua=a.width/this.g.F*d.lf;c.qb=a.height/this.g.F*d.mf;c.rb=a.width/this.g.F*d.Hf;c.sb=a.height/this.g.F*d.If;c.Ua=Math.min(Math.max(0,Math.floor(c.Ua)),a.K-1);c.qb=Math.min(Math.max(0,Math.floor(c.qb)),a.da-1);c.rb=Math.min(Math.max(0,Math.floor(c.rb)),a.K-1);c.sb=Math.min(Math.max(0,Math.floor(c.sb)),a.da-1)};b.prototype.Mn=function(a){a=Math.round(a);this.rc=0<(a&1);this.Me=0<(a&2);this.uh=0<(a&4);this.Pf=0<(a&8);4096<=a&&(this.Cc=0<(a&4096),this.ea=0<(a&8192),
this.hg=0<(a&32768))};b.prototype.Gm=function(){var a=0;this.rc&&(a|=1);this.Me&&(a|=2);this.uh&&(a|=4);this.Cc&&(a|=4096);this.ea&&(a|=8192);this.hg&&(a|=32768);return a};b.prototype.jl=function(){if(!(6>this.eb.Za.length))for(var a=0;6>a;a++){var d;d=this.eb.Za[a];var c;c=[];c.push(new m.ra(-1,-1,-1,0,0));c.push(new m.ra(1,-1,-1,1,0));c.push(new m.ra(1,1,-1,1,1));c.push(new m.ra(-1,1,-1,0,1));for(var b=0;4>b;b++)4>a?c[b].Da(-Math.PI/2*a):c[b].va(Math.PI/2*(4==a?-1:1)),this.Ca&&(c[b].kb(this.Ca.L*
Math.PI/180),c[b].va(-this.Ca.pitch*Math.PI/180)),c[b].Da(-this.pan.c*Math.PI/180),c[b].va(this.j.c*Math.PI/180),c[b].kb(this.L.c*Math.PI/180);c=this.Nh(c);d.pc=0<c.length;if(d.pc){d=d.Ge;d.lf=c[0].Zc;d.Hf=c[0].Zc;d.mf=c[0].Fb;d.If=c[0].Fb;for(b=1;b<c.length;b++)d.lf=Math.min(d.lf,c[b].Zc),d.Hf=Math.max(d.Hf,c[b].Zc),d.mf=Math.min(d.mf,c[b].Fb),d.If=Math.max(d.If,c[b].Fb);d.Ye=d.Hf-d.lf;d.lg=d.If-d.mf;d.scale=Math.max(d.Ye,d.lg)}else d.Ge.Ye=-1,d.Ge.lg=-1}};b.prototype.ri=function(){for(var a=0;a<
this.g.H.length;a++){var d=this.g.H[a],c;for(c in d.W)d.W.hasOwnProperty(c)&&(d.W[c].visible=!1)}};b.prototype.Wh=function(){for(var a=0,d=Math.tan(Math.min(this.Jb(),175)*Math.PI/360),c=this.m.height/(2*d),c=c*(1+this.m.width/this.m.height*d/2),c=c*Math.pow(2,1<this.devicePixelRatio?this.g.mk:this.g.lk);this.g.H.length>=a+2&&!this.g.H[a+1].Je&&this.g.H[a+1].width>c;)a++;return a};b.prototype.zo=function(){var a=!1,d,c,b;if(this.m.width!==this.A.offsetWidth||this.m.height!==this.A.offsetHeight)this.m.width=
this.A.offsetWidth,this.m.height=this.A.offsetHeight,this.A.style[this.Ta+"OriginX"]=this.m.width/2+"px",this.A.style[this.Ta+"OriginY"]=this.m.height/2+"px",a=!0;var f=Math.round(this.dd());if(this.Ef!=f||a)this.Ef=f,this.rc||(this.A.style[this.ed]=f+"px",this.A.style[this.ed+"Origin"]="50% 50%");this.Eb=0;if(0<this.g.H.length){this.jl();this.ri();var l;l="";for(d=0;6>d;d++){var k;k=this.eb.Za[d];k.pc&&(l=l+d+",")}l=this.Wh();var g;for(g=this.g.H.length-1;g>=l;){var a=this.g.H[g],h=1;g==this.g.H.length-
1&&0==this.g.Ja&&(h=this.g.F/(this.g.F-2));for(d=0;6>d;d++){k=this.eb.Za[d];var n=k.Ge;if(k.pc&&0<n.Ye&&0<n.lg&&0<n.scale||a.cache){k.xa=!1;var r;r={};a.cache?(r.Ua=0,r.qb=0,r.rb=a.K-1,r.sb=a.da-1):this.Oj(a,n,r);for(b=r.qb;b<=r.sb;b++)for(c=r.Ua;c<=r.rb;c++){var p=c+b*a.K+d*a.K*a.da;(n=a.W[p])||(n=a.W[p]=new m.Bd);if(!n.J&&this.ka<this.wd){if(0<this.qh.length){n.J=this.qh.shift();for(p=this.A.firstChild;p&&p.Ad&&(-1==p.Ad||p.Ad>=g);)p=p.nextSibling;this.A.insertBefore(n.J,p);n.Ma=n.J.getContext("2d")}else if(this.cl<
this.qk){this.cl++;n.J=document.createElement("canvas");n.J.width=this.g.F+2*this.g.Ja;n.J.height=this.g.F+2*this.g.Ja;n.Ma=n.J.getContext("2d");n.J.style[this.Ta+"Origin"]="0% 0%";n.J.style.overflow="hidden";n.J.style.position="absolute";for(p=this.A.firstChild;p&&p.Ad&&(-1==p.Ad||p.Ad>=g);)p=p.nextSibling;this.A.insertBefore(n.J,p)}n.J&&(this.ii++,n.g=new Image,n.g.crossOrigin=this.crossOrigin,n.g.style[this.Ta+"Origin"]="0% 0%",n.g.style.position="absolute",n.g.style.overflow="hidden",n.J.Ad=g,
n.g.onload=this.lo(n),n.g.onerror=this.mh(n),n.g.onabort=this.mh(n),n.g.setAttribute("src",this.ke(d,g,c,b)),a.cache&&this.Gb.push(n.g),0==this.ka&&this.M&&this.M.ggReLoadedLevels&&this.M.ggReLoadedLevels(),this.ka++,this.xa=!0)}else this.Eb++;if(n.J){p="";this.rc?(p+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,0px) ",p+=" perspective("+f+"px) ",p+="translate3d(0px,0px,"+f+"px) "):p+="translate3d("+this.m.width/2+"px,"+this.m.height/2+"px,"+f+"px) ";p+="rotateZ("+Number(this.L.c).toFixed(10)+
"deg) ";p+="rotateX("+Number(this.j.c).toFixed(10)+"deg) ";p+="rotateY("+Number(-this.pan.c).toFixed(10)+"deg) ";this.Ca&&(p+="rotateX("+Number(-this.Ca.pitch).toFixed(10)+"deg) ",p+="rotateZ("+Number(this.Ca.L).toFixed(10)+"deg) ");var p=4>d?p+("rotateY("+-90*d+"deg) "):p+("rotateX("+(4==d?-90:90)+"deg) "),u;this.Me?(u=this.df/this.g.F*(this.g.F/a.width)*(2*g+1),u=this.Dd?2/Math.tan(this.f.c*Math.PI/360)*u:2*u,p+=" scale("+u*h*h+")"):u=1/(h*h);p+=" translate3d("+(1/h*c*this.g.F-this.g.Ja-a.width/
2)+"px,";p+=1/h*b*this.g.F-this.g.Ja-a.width/2+"px,";p+=-a.width*u/2+"px)";k.pc&&(n.visible=!0,n.J?n.J.style[this.Ta]=p:n.g&&(n.g.style[this.Ta]=p))}}}}g--}for(f=0;f<this.g.H.length;f++){var a=this.g.H[f],t;for(t in a.W)a.W.hasOwnProperty(t)&&(n=a.W[t],!n.visible&&n.J&&(a.cache?(l="translate3d(-10px,-10px,0px) scale(0.001,0.001)",n.J?n.J.style[this.Ta]=l:n.g&&(n.g.style[this.Ta]="")):(n.Ma&&n.Ma.clearRect(0,0,n.Ma.canvas.width,n.Ma.canvas.height),this.qh.push(n.J),n.J?(l="translate3d(-10px,-10px,0px) scale(0.001,0.001)",
n.J.style[this.Ta]=l,n.J.Ad=-1):n.loaded&&this.A.removeChild(n.g),n.J=null,n.g=null,n.Ma=null,delete a.W[t])))}this.Lc=!1}};b.prototype.hl=function(){var a=Math.round(this.dd());this.rc||this.gl(a);for(var d=0;d<this.Va.length;d++){var c;c=this.Va[d];c.ll(a);c.a.hidden=!1}};b.prototype.ml=function(){for(var a=Math.round(this.dd()),d=0;d<this.I.length;d++){var c;c=this.I[d];c.Vc||(c.ll(a),c.a.hidden=!1)}};b.prototype.Rm=function(){for(var a=0;a<this.Va.length;a++){var d;d=this.Va[a];d.Sk()}for(a=0;a<
this.I.length;a++)d=this.I[a],d.Vc||d.Sk()};b.prototype.Do=function(){for(var a=0;a<this.I.length;a++){var d;d=this.I[a];d.Vc||d.me()}for(a=0;a<this.Va.length;a++)d=this.Va[a],d.me()};b.prototype.zc=function(a){this.Wd=!1;try{if(a?this.nb=a:this.nb=document.createElement("canvas"),this.nb.width=100,this.nb.height=100,this.nb.style.display="none",this.nb.style.So="none",this.A.insertBefore(this.nb,this.A.firstChild),a={stencil:!0,depth:!0,alpha:!1},this.$d&&10<=this.Uj[0]&&(a.antialias=!1),this.G=
this.nb.getContext("webgl",a),this.G||(this.G=this.nb.getContext("experimental-webgl",a)),this.G){var d=this.G;this.hb.width=500;this.hb.height=500;d.clearColor(0,0,0,0);d.enable(this.G.DEPTH_TEST);d.viewport(0,0,500,500);d.clear(d.COLOR_BUFFER_BIT|d.DEPTH_BUFFER_BIT);this.la.zf();this.la.Jg();this.la.Wj(this.Re);this.la.Xj();this.N&&(this.N.zf(),this.N.zc());this.Ba&&(this.Ba.zf(),this.Ba.zc())}}catch(c){this.O(c)}this.G?this.ea=!0:alert("Could not initialise WebGL!")};b.prototype.Vb=function(a){return a?
"{"==a.charAt(0)||"/"==a.charAt(0)||0<a.indexOf("://")||0==a.indexOf("javascript:")?a:this.xd+a:this.xd};b.prototype.Id=function(a,d,c){var b=(new RegExp("%0*"+d,"i")).exec(a.toString());if(b){var b=b.toString(),f=c.toString();for(b.charAt(b.length-1)!=d&&(f=(1+c).toString());f.length<b.length-1;)f="0"+f;a=a.replace(b,f)}return a};b.prototype.ke=function(a,d,c,b){var f=this.g.mi-1-d,l=this.g.nk,k="x";switch(a){case 0:k="f";break;case 1:k="r";break;case 2:k="b";break;case 3:k="l";break;case 4:k="u";
break;case 5:k="d"}for(var g=0;3>g;g++)l=this.Id(l,"c",a),l=this.Id(l,"s",k),l=this.Id(l,"r",d),l=this.Id(l,"l",f),l=this.Id(l,"x",c),l=this.Id(l,"y",b),l=this.Id(l,"v",b),l=this.Id(l,"h",c);return this.Vb(l)};b.prototype.ci=function(){return this.pan.c};b.prototype.zm=function(){return this.v.pan};b.prototype.Am=function(){for(var a=this.pan.c;-180>a;)a+=360;for(;180<a;)a-=360;return a};b.prototype.Fg=function(){for(var a=this.pan.c-this.pan.yi;-180>a;)a+=360;for(;180<a;)a-=360;return a};b.prototype.gh=
function(a){this.pa();isNaN(a)||(this.pan.c=Number(a));this.update()};b.prototype.Mi=function(a){this.pa();isNaN(a)||(this.pan.c=Number(a)+this.pan.yi);this.update()};b.prototype.rg=function(a,d){isNaN(a)||(this.gh(this.ci()+a),d&&(this.pan.d=a))};b.prototype.Rl=function(a,d){this.rg(a*this.zd(),d)};b.prototype.ei=function(){return this.j.c};b.prototype.Im=function(){return this.v.j};b.prototype.hh=function(a){this.pa();isNaN(a)||(this.j.c=Number(a));this.update()};b.prototype.sg=function(a,d){this.hh(this.ei()+
a);d&&(this.j.d=a)};b.prototype.Tl=function(a,d){this.sg(a*this.zd(),d)};b.prototype.Nn=function(a){this.pa();isNaN(a)||(this.L.c=Number(a));this.update()};b.prototype.Hm=function(){return this.L.c};b.prototype.pf=function(){return this.f.c};b.prototype.lm=function(){return this.v.vd};b.prototype.Rf=function(a){this.pa();var d;switch(this.ya()){case 4:d=170;break;case 12:d=360;break;case 9:d=355;break;default:d=170}2==this.ib&&(d=9999999999);!isNaN(a)&&0<a&&a<d&&(d=this.f.c,this.f.c=Number(a),d!=
this.f.c&&this.update())};b.prototype.lj=function(a,d){this.Rf(this.pf()+a);d&&(this.f.d=a)};b.prototype.ef=function(a,d){if(!isNaN(a)){var c;c=a/90*Math.cos(Math.min(this.f.c,90)*Math.PI/360);c=this.f.c*Math.exp(c);this.Rf(c);d&&(this.f.d=a)}};b.prototype.Ln=function(a,d){this.pa();isNaN(a)||(this.pan.c=a);isNaN(d)||(this.j.c=d);this.update()};b.prototype.Vf=function(a,d,c){this.pa();isNaN(a)||(this.pan.c=a);isNaN(d)||(this.j.c=d);isNaN(c)||this.Rf(c);this.update()};b.prototype.Fn=function(){this.Vf(this.pan.Na,
this.j.Na,this.f.Na)};b.prototype.Jn=function(a){this.Tf(a);this.Uf(a);this.Sf(a)};b.prototype.Tf=function(a){this.B.xb=a};b.prototype.Sf=function(a){this.B.Gf=a};b.prototype.Uf=function(a){this.B.Tg=a};b.prototype.moveTo=function(a,d,c,b,f,l){this.pa();if("_blank"!==a&&""!==a){this.v.active=!0;this.v.ne=!1;this.v.Zi=!1;var k=a.toString().split("/");1<k.length&&(a=Number(k[0]),b=Number(d),d=Number(k[1]),2<k.length&&(c=Number(k[2])));isNaN(a)?this.v.pan=this.pan.c:this.v.pan=Number(a);isNaN(d)?this.v.j=
this.j.c:this.v.j=Number(d);!isNaN(c)&&0<c&&180>c?this.v.f=Number(c):this.v.f=this.f.c;this.v.speed=!isNaN(b)&&0<b?Number(b):1;isNaN(f)?this.v.L=this.L.c:this.v.L=Number(f);void 0!==l?!a||4!=l&&12!=l&&9!=l||(this.v.Ab=l):this.v.Ab=this.Xa}};b.prototype.Ug=function(a){this.pa();var d=0,c=0,b=70,f=4,l=0,k=1;a.hasOwnProperty("pan")&&(d=Number(a.pan),this.v.pan=d);a.hasOwnProperty("tilt")&&(c=Number(a.tilt),this.v.j=c);a.hasOwnProperty("fov")&&(b=Number(a.fov),this.v.f=b);a.hasOwnProperty("projection")&&
(f=Number(a.projection),this.v.Ab=f);a.hasOwnProperty("timingFunction")&&(l=Number(a.timingFunction));a.hasOwnProperty("speed")&&(k=Number(a.speed));0>=k?(this.Vf(d,c,b),this.Wc(f)):(a=new m.ek,a.Ra="__AutoMove",a.Zf=this.pan.c,a.ag=this.j.c,a.ud=this.f.c,a.$f=this.Xa,a.Jd=d,a.Kd=c,a.Qe=b,a.Yc=f,a.xe=!1,a.Td=!1,a.Ud=!1,0==l&&(a.Td=!0),1==l&&(a.xe=!0,a.Td=!0),2==l&&(a.Ud=!0),a.speed=k,this.v.fj=this.C,this.C=this.Ej(a),this.v.gj=(new Date).getTime(),this.v.Zi=!0,this.v.active=!0,this.v.ne=!1,this.v.pan=
d,this.v.j=c,this.v.f=b)};b.prototype.$m=function(a){this.moveTo(this.pan.Na,this.j.Na,this.f.Na,a)};b.prototype.an=function(a,d){var c={};c.pan=this.pan.Na;c.tilt=this.j.Na;c.fov=this.f.Na;c.projection=this.Yg;c.timingFunction=d;c.speed=a;this.Ug(c)};b.prototype.Hl=function(a,d,c,b){var f=new m.Pg(this);f.type="point";f.pan=d;f.j=c;f.id=a;f.a={};f.a.player=this;f.ye();f.a.hotspot=f;f.a.__div=document.createElement("div");f.a.__div.appendChild(b);this.P.push(f);f.a.__div.style.position="absolute";
f.a.__div.style.left="-1000px";f.a.__div.style.top="-1000px";this.Aa.insertBefore(f.a.__div,this.Aa.firstChild);this.xa=!0};b.prototype.xo=function(a,d,c){for(var b=0;b<this.P.length;b++){var f=this.P[b];f.id==a&&(f.pan=d,f.j=c,f.ye())}this.xa=!0};b.prototype.xn=function(a){for(var d=-1,c,b=0;b<this.P.length;b++)c=this.P[b],c.id==a&&(d=b);-1<d&&(c=this.P.splice(d,1).pop(),c.a&&c.a.__div&&this.Aa.removeChild(c.a.__div))};b.prototype.Cm=function(){for(var a=[],b=0;b<this.P.length;b++){var c=this.P[b];
"point"==c.type&&a.push(String(c.id))}return a};b.prototype.nm=function(a){for(var b=0;b<this.P.length;b++){var c=this.P[b];if(c.id==a)return b={},b.id=a,b.pan=c.pan,b.tilt=c.j,c.a&&c.a.__div&&(b.div=c.a.__div),b}};b.prototype.ql=function(a,b){this.Y.start.x=a;this.Y.start.y=b;this.Y.ba.x=a;this.Y.ba.y=b;this.ua.ba.x=a;this.ua.ba.y=b;this.Gi++;this.pan.cd=this.pan.c;this.j.cd=this.j.c};b.prototype.ol=function(a,b){var c=this.Jb();this.pan.cd+=a*c/this.m.height;this.j.cd+=b*c/this.m.height;this.pan.c=
this.pan.cd;this.j.c=this.j.cd};b.prototype.pl=function(a,b){this.Y.c.x=a;this.Y.c.y=b;this.Y.aa.x=this.Y.c.x-this.Y.ba.x;this.Y.aa.y=this.Y.c.y-this.Y.ba.y;this.B.kd&&(this.Y.ba.x=this.Y.c.x,this.Y.ba.y=this.Y.c.y,this.update())};b.prototype.pa=function(){this.s.active&&(this.s.active=!1,this.pan.d=0,this.j.d=0,this.f.d=0);this.v.active&&(this.v.active=!1,this.pan.d=0,this.j.d=0,this.f.d=0);this.bf=this.v.ne=!1;this.s.vi=!1;this.bd=.02;this.$e=0;this.s.ad&&(this.s.ad=!1,this.s.enabled=this.s.ij);
this.Ee=(new Date).getTime()};b.prototype.sm=function(){return this.Ee};b.prototype.Kj=function(a,b){a||(a=this.qa.x,b=this.qa.y);var c=this.m.height/(2*Math.tan(this.f.c*Math.PI/360)),e=a-this.m.width/2,f=b-this.m.height/2,l={};l.pan=180*Math.atan(e/c)/Math.PI;l.tilt=180*Math.atan(-f/Math.sqrt(e*e+c*c))/Math.PI;return l};b.prototype.Em=function(a,b){var c,e;a||(a=this.qa.x,b=this.qa.y);if(2===this.ib)e=this.f.c/this.m.height,c=-(a-this.m.width/2)*e+this.pan.c,e=-(b-this.m.height/2)*e+this.j.c;else{e=
new m.ra(0,0,1);c=this.Kj(a,b);e.he(-c.tilt);e.Qf(c.pan);e.he(-this.j.c);e.Qf(-this.pan.c);e.he(-this.Ca.pitch);e.eh(this.Ca.L);for(c=e.Jl()-180;-180>c;)c+=360;e=e.Kl()}var f={};f.pan=c;f.tilt=e;return f};b.prototype.ld=function(a){return a==this.control?!0:a&&void 0!==a.ggPermeable&&0==a.ggPermeable?!1:a&&a.ggType&&("container"==a.ggType||"cloner"==a.ggType||"timer"==a.ggType)?!0:!1};b.prototype.Lh=function(a,b){var c=this.dd(),e,f,l;for(e=0;e<this.I.length+this.Va.length;e++){var k;k=e<this.I.length?
this.I[e]:this.Va[e-this.I.length];if(k.wb)return k}for(e=0;e<this.I.length+this.Va.length;e++)if(k=e<this.I.length?this.I[e]:this.Va[e-this.I.length],!k.Vc){var g=[],h=new m.ra,n,r,p;0<k.f&&(r=Math.tan(k.f/2*Math.PI/180),p=0<k.yc?r*k.Pc/k.yc:r,k.gd&&1!=k.gd&&(p*=k.gd));for(n=0;4>n;n++){switch(n){case 0:h.Wa(-r,-p,-1);break;case 1:h.Wa(r,-p,-1);break;case 2:h.Wa(r,p,-1);break;case 3:h.Wa(-r,p,-1)}h.va(-k.j*Math.PI/180);h.Da(k.pan*Math.PI/180);h.Da(-this.pan.c*Math.PI/180);h.va(this.j.c*Math.PI/180);
h.kb(this.L.c*Math.PI/180);g.push(h.clone())}g=this.Nh(g);if(0<g.length){for(n=0;n<g.length;n++)h=g[n],.1>h.z?(l=-c/h.z,f=this.m.width/2+h.x*l,l=this.m.height/2+h.y*l):l=f=0,h.fc=f,h.Bb=l;if(this.Tj(g,a,b))return k}}return null};b.prototype.Mg=function(){return document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement&&null!=document.msFullscreenElement||document.fullScreen};b.prototype.Zm=function(a){this.il(a);if(this.Mc)this.Mc.onclick();this.yd=null;if(!this.B.xb){a=a?
a:window.event;if((a.which||0==a.which||1==a.which)&&this.ld(a.target)){var b;(b=this.Lh(this.qa.x,this.qa.y))&&b.Qc&&(this.yd=b);this.ql(a.pageX,a.pageY);this.X.fb=!0;this.X.startTime=(new Date).getTime();a.preventDefault();this.pa()}this.Y.aa.x=0;this.Y.aa.y=0}};b.prototype.We=function(a,b){var c=this.w.Ui;c.enabled&&(this.za!=this.ob&&0<=a&&0<=b&&""!=this.za.title?(this.ta.innerHTML=this.za.title,this.ta.style.color=this.fa(c.Vi,c.Ti),c.background?this.ta.style.backgroundColor=this.fa(c.Ob,c.Nb):
this.ta.style.backgroundColor="transparent",this.ta.style.border="solid "+this.fa(c.Rb,c.Qb)+" "+c.Hh+"px",this.ta.style.borderRadius=c.Gh+"px",this.ta.style.textAlign="center",0<c.width?(this.ta.style.left=a-c.width/2+this.margin.left+"px",this.ta.style.width=c.width+"px"):(this.ta.style.width="auto",this.ta.style.left=a-this.ta.offsetWidth/2+this.margin.left+"px"),this.ta.style.height=0<c.height?c.height+"px":"auto",this.ta.style.top=b+25+ +this.margin.top+"px",this.ta.style.visibility="inherit",
this.ta.style.overflow="hidden"):(this.ta.style.visibility="hidden",this.ta.innerHTML=""))};b.prototype.il=function(a){var b=this.Yd();this.Mg()?(this.qa.x=a.pageX-this.margin.left,this.qa.y=a.pageY-this.margin.top):(this.qa.x=a.pageX-b.x,this.qa.y=a.pageY-b.y);return b};b.prototype.Oe=function(a){a&&null!==a&&"object"==typeof a?this.za=a:this.za=this.ob;this.za.ye&&this.za.ye();this.hotspot=this.za};b.prototype.Ym=function(a){a=a?a:window.event;var b=this.il(a);if(!this.B.xb){this.s.active&&(this.s.Rg=
(new Date).getTime());this.X.fb&&(a.preventDefault(),(a.which||0==a.which||1==a.which)&&this.pl(a.pageX,a.pageY),this.pa());var c=!1;if(this.za==this.ob||"poly"==this.za.type){var e=this.ob;0<this.P.length&&this.ld(a.target)&&(e=this.Mh(this.qa.x,this.qa.y));this.fh(e);this.We(a.pageX-b.x,a.pageY-b.y);0!=e&&(c=!0)}a=null;c||(a=this.Lh(this.qa.x,this.qa.y));this.s.xg&&(this.s.xg=!1);this.Aa.style.cursor=this.za!=this.ob&&this.za.Ce&&c||a&&a.wf?"pointer":"default"}};b.prototype.fh=function(a){!1===
a&&(a=this.ob);this.za!=a&&(this.za!=this.ob&&(0<this.w.mode&&(this.za.cb=0),this.Oa&&this.Oa.hotspotProxyOut&&this.Oa.hotspotProxyOut(this.za.id)),a!=this.ob?(this.Oe(a),this.Oa&&this.Oa.hotspotProxyOver&&this.Oa.hotspotProxyOver(this.za.id),0<this.w.mode&&(this.w.cb=1,this.za.cb=1)):(this.Oe(this.ob),0<this.w.mode&&(this.w.cb=0)),this.ga&&this.ga.changeCurrentHotspot(this.za.id))};b.prototype.Xm=function(a){a=a?a:window.event;this.Qg=-1;if(!this.B.xb&&this.X.fb){this.pa();a.preventDefault();this.X.fb=
!1;a=(new Date).getTime();var b;b=Math.abs(this.Y.start.x-this.Y.ba.x)+Math.abs(this.Y.start.y-this.Y.ba.y);400>a-this.X.startTime&&0<=b&&20>b&&(this.yd&&this.yd.Qc(),(b=this.Mh(this.qa.x,this.qa.y))&&this.fl(b),b=Math.abs(this.Y.od.x-this.Y.ba.x)+Math.abs(this.Y.od.y-this.Y.ba.y),700>a-this.Cf&&0<=b&&20>b?(this.B.Sh&&this.ph(),this.Cf=0):this.Cf=a,this.Y.od.x=this.Y.ba.x,this.Y.od.y=this.Y.ba.y)}};b.prototype.rk=function(a){if(!this.B.Tg&&(a=a?a:window.event,this.ld(a.target))){var b=a.detail?-1*
a.detail:a.wheelDelta/40;this.B.Yj&&(b=-b);a.axis&&(-1==this.Qg?this.Qg=a.axis:this.Qg!=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.ef(c*this.B.Wk,!0),this.update());a.preventDefault();this.pa()}};b.prototype.to=function(a){a||(a=window.event);var b=a.touches,c=this.Yd();this.qa.x=b[0].pageX-c.x;this.qa.y=b[0].pageY-c.y;this.Se=this.yd=null;this.Yh&&(this.Yh=!1,this.gm());if(!this.B.xb){if(!this.X.fb&&b[0]){this.X.startTime=
(new Date).getTime();this.X.start.x=b[0].pageX;this.X.start.y=b[0].pageY;this.X.ba.x=b[0].pageX;this.X.ba.y=b[0].pageY;this.ic=b[0].target;if(this.ld(a.target)){var e;(e=this.Lh(this.qa.x,this.qa.y))&&e.Qc&&(this.yd=e);if(e=this.Mh(this.qa.x,this.qa.y))this.O(e),this.Se=e,this.fh(e),e=this.rf(a),this.We(e.x-c.x,e.y-c.y);this.ql(b[0].pageX,b[0].pageY);this.X.xj=b[0].identifier;this.X.fb=!0;a.preventDefault();this.pa()}if(this.ic){c=this.ic;for(e=!1;c&&c!=this.control;){if(c.onmouseover)c.onmouseover();
c.onmousedown&&!e&&(c.onmousedown(),e=!0);c=c.parentNode}e&&a.preventDefault()}}1<b.length&&(this.X.fb=!1);!this.gi&&2==b.length&&b[0]&&b[1]&&(a=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.f.Yk=Math.sqrt(a*a+b*b),this.f.He=this.f.c);this.Y.aa.x=0;this.Y.aa.y=0}};b.prototype.gm=function(){this.vh&&this.o.a&&(this.o.md||this.o.a.play(),this.o.a.muted=!1);if(this.$d){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.S.length;b++){var c=this.S[b];(!this.Tc(c.id)||c.ha)&&0<=c.loop&&c.autoplay&&(c.ha&&c.re(),this.fe(c.id,c.loop))}for(b=0;b<this.I.length;b++)c=this.I[b],!this.Tc(c.id)&&c.autoplay&&this.vh&&this.fe(c.id,c.loop)};b.prototype.so=function(a){a||(a=window.event);var b=a.touches,c=this.Yd();this.qa.x=b[0].pageX-c.x;this.qa.y=b[0].pageY-c.y;if(!this.B.xb){b[0]&&(this.X.ba.x=b[0].pageX,this.X.ba.y=b[0].pageY);if(this.X.fb){a.preventDefault();
for(var e=0;e<b.length;e++)if(b[e].identifier==this.X.xj){this.pl(b[e].pageX,b[e].pageY);break}this.Se&&(e=this.rf(a),this.We(e.x-c.x,e.y-c.y));this.pa()}2==b.length&&b[0]&&b[1]&&(this.X.fb=!1,this.gi||(c=b[0].pageX-b[1].pageX,b=b[0].pageY-b[1].pageY,this.f.sj=Math.sqrt(c*c+b*b),this.ua.f.active=!0,this.ua.f.Ub=this.f.He*Math.sqrt(this.f.Yk/this.f.sj),4==this.ya()&&this.ua.f.Ub>this.f.max&&(this.ua.f.Ub=this.f.max),this.ua.f.Ub<this.f.min&&(this.ua.f.Ub=this.f.min),this.pa(),a.preventDefault()))}};
b.prototype.ro=function(a){var b,c=this.Yd(),e=!1;if(!this.B.xb){this.X.fb&&this.pa();var f=(new Date).getTime(),g;b=Math.abs(this.X.start.x-this.X.ba.x)+Math.abs(this.X.start.y-this.X.ba.y);if(0<=b&&20>b){a.preventDefault();e=!0;this.ld(this.ic)&&this.yd&&this.yd.Qc();if(this.ic)for(b=this.ic,g=!1;b&&b!=this.control;)b.onclick&&!g&&(b.onclick(),g=!0,e=!1),b=b.parentNode;b=Math.abs(this.X.od.x-this.X.ba.x)+Math.abs(this.X.od.y-this.X.ba.y);if(700>f-this.Cf&&0<=b&&20>b){a.preventDefault();if(this.ld(this.ic)&&
this.B.Sh){var k=this;setTimeout(function(){k.ph()},1)}if(this.ic)for(b=this.ic,g=!1;b&&b!=this.control;)b.ondblclick&&!g&&(b.ondblclick(),g=!0,e=!1),b=b.parentNode;this.Cf=0}else this.Cf=f;this.X.od.x=this.X.ba.x;this.X.od.y=this.X.ba.y}if(this.ic)for(a.preventDefault(),b=this.ic,g=!1;b&&b!=this.control;){if(b.onmouseout)b.onmouseout();b.onmouseup&&!g&&(b.onmouseup(),g=!0);b=b.parentNode}a=this.rf(a);this.We(a.x-c.x,a.y-c.y);this.Se&&e&&this.fl(this.Se);this.ic=null;this.X.fb=!1;this.fh(this.ob);
this.Se=null}};b.prototype.qo=function(a){var b=this.Yd();this.B.xb||(this.X.fb=!1);this.Se=null;this.fh(this.ob);a=this.rf(a);this.We(a.x-b.x,a.y-b.y)};b.prototype.Tm=function(){return null!=this.ic||this.X.fb};b.prototype.sk=function(a){!this.ce&&window.MSGesture&&(this.O("setup gesture"),this.ce=new MSGesture,this.ce.target=this.control);this.ce&&this.ce.addPointer(a.pointerId)};b.prototype.Gj=function(a){this.gi=!0;this.Vg=1;this.B.xb||(a.touches?(this.ic=a.touches.target,this.ld(a.target)&&(a.preventDefault(),
this.f.He=this.f.c,this.pa())):(a.preventDefault(),this.f.He=this.f.c,this.pa()))};b.prototype.im=function(a){!this.B.xb&&this.ld(a.target)&&(a.preventDefault(),this.ua.f.active=!0,this.ua.f.Ub=this.f.He/Math.sqrt(a.scale),4==this.ya()&&this.ua.f.Ub>this.f.max&&(this.ua.f.Ub=this.f.max),this.update(),this.pa())};b.prototype.bn=function(a){this.B.xb||(a.preventDefault(),1!=a.scale&&(this.ua.f.active=!0,this.Vg*=a.scale,this.ua.f.Ub=this.f.He/Math.sqrt(this.Vg),4==this.ya()&&this.ua.f.Ub>this.f.max&&
(this.ua.f.Ub=this.f.max),this.update(),this.pa()))};b.prototype.Fj=function(a){this.B.xb||(this.ua.f.active=!1,a.preventDefault(),this.pa(),this.ce&&this.ce.reset&&this.ce.reset())};b.prototype.Um=function(a){this.B.Gf||(this.isFullscreen&&a.preventDefault(),this.ae=a.keyCode,this.pa())};b.prototype.Vm=function(a){this.ae&&(this.ae=0,a.preventDefault(),this.pa())};b.prototype.gn=function(){this.ae=0};b.prototype.Xg=function(){this.isFullscreen&&(this.Mg()||this.exitFullscreen(),this.Mg()&&(this.U.style.left=
"0px",this.U.style.top="0px"))};b.prototype.fl=function(a){this.Oa&&this.Oa.hotspotProxyClick&&this.Oa.hotspotProxyClick(a.id);""!=a.url&&(this.zi(a.url,a.target),this.We(-1,-1))};b.prototype.zd=function(){return Math.min(1,2*Math.tan(Math.PI*Math.min(this.f.c,90)/360))};b.prototype.zk=function(){var a=this;setTimeout(function(){a.zk()},100);9!=a.ah||a.Zj||requestAnimationFrame(function(){a.Uc("restart recover timer")});10<a.ah&&1<a.Gi&&(a.Uc("recover timer - disabling requestAnimationFrame"),a.Zj=
!0,a.Ai());a.ah++};b.prototype.Qk=function(a){var b={No:{value:0,name:"pan"},Oo:{value:1,name:"tilt"},Lo:{value:2,name:"fov"}},c=0,e=0,f=0,g;for(g in b){var k=b[g],h;for(h=Math.floor(a);!this.Be(h,k.value)&&0<h;)h--;var y=this.Be(h,k.value),n=this.vm(y);if(n){h=new m.jc(y.time,y.value);var r=new m.jc(n.time,n.value),p=(a-y.time)/(n.time-y.time);if(0!=y.type||0!=n.type&&3!=n.type)if(3==y.type)h=y.value;else{var p=new m.jc,u=new m.jc,t=n.time-y.time;0==y.type?u.Wa(y.time+.3*t,y.value):u.Wa(y.Qd,y.Rd);
0==n.type||3==n.type?p.Wa(n.time-.3*t,n.value):p.Wa(n.Pd,n.Fc);y=new m.jc;y.Fh(h,r,u,p,a);h=y.y}else y=new m.jc,y.jd(h,r,p),h=y.y}else h=y.value;switch(k.value){case 0:k=this.pan.c;if(this.Md){if(2!=this.ib){for(;360<h;)h-=360;for(;-360>h;)h+=360}c=h-k;2!=this.ib&&(180<c&&(c-=360),-180>c&&(c+=360));this.pan.c=this.pan.c+c*this.bd}else this.pan.c=h;break;case 1:k=this.j.c;this.Md?(e=h-k,this.j.c=this.j.c+e*this.bd):this.j.c=h;break;case 2:k=this.f.c,this.Md?(f=h-k,this.f.c=this.f.c+f*this.bd):this.f.c=
h}}b=this.ya();for(g=Math.floor(a);!this.Be(g,3)&&0<g;)g--;g=this.Be(g,3);k=a-g.time;this.Md&&-1!=this.af&&this.pg+this.Ch>a?(b=this.qf(this.af),this.f.c>b?this.pg=a:(a=(a-this.pg)/this.Ch,a=Math.min(1,a),this.Wc(this.Xa,this.af,1-a))):0==g.lb||k>g.lb-.3?this.Wc(g.value):(a=k/g.lb,this.Wc(b,g.value,1-a));this.Md&&(c=Math.sqrt(c*c+e*e+f*f),.3>c&&(this.Md=!1,this.bd=.02,this.$e=0),0<this.$e&&c>this.$e&&(this.bd+=.01,this.bd=Math.min(this.bd,1)),this.$e=c);this.update()};b.prototype.nn=function(a){var b,
c=this.v.speed;this.v.li&&(c=c*(a.getTime()-this.v.li)/60,5<c&&(c=5),.2>c&&(c=.2));this.v.li=a.getTime();this.s.Cg&&(this.la.ready()||4==this.Xa)&&this.Eg()&&(this.s.Cg=!1,this.s.active=!0,this.pb.sd=!0,this.pb.Xh=!1);if(this.v.active||0!=this.v.Ab&&this.la.ready()){if(this.v.Zi&&"__AutoMove"==this.C.Ra)if(b=a.getTime()-this.v.gj,c=b/100,c>=this.C.length){if(this.Ha.splice(this.Ha.indexOf(this.C),1),this.v.active=!1,this.C=this.v.fj,this.v.Ab=0,b=this.s.ad,this.Vf(this.v.pan,this.v.j,this.v.f),this.v.wi&&
(this.v.wi=!1,this.s.vi=!0,this.s.active=!0,this.s.ad=b),this.onMoveComplete)this.onMoveComplete()}else this.Qk(c);else{this.pan.d=this.v.pan-this.pan.c;if(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.j.d=this.v.j-this.j.c;this.L.d=this.v.L-this.L.c;this.f.d=this.v.f-this.f.c;b=c*this.zd();var e=Math.sqrt(this.pan.d*this.pan.d+this.j.d*this.j.d+this.L.d*this.L.d+this.f.d*this.f.d),f=this.pan.c-this.v.ik,g=this.j.c-this.v.kk,k=this.L.c-
this.v.jk,h=this.f.c-this.v.hk;100*Math.sqrt(f*f+g*g+k*k+h*h)<b&&0==this.v.Ab&&(this.v.ne=!0);this.v.ik=this.pan.c;this.v.kk=this.j.c;this.v.jk=this.L.c;this.v.hk=this.f.c;if(100*e<b||this.v.ne){if(this.pan.d=0,this.j.d=0,this.L.d=0,this.f.d=0,this.v.active&&(this.v.active=!1,this.pan.c=this.v.pan,this.j.c=this.v.j,this.L.c=this.v.L,this.f.c=this.v.f,this.onMoveComplete))this.onMoveComplete()}else e=e>5*b?b/e:.2,this.pan.d*=e,this.j.d*=e,this.f.d*=e;this.pan.c+=this.pan.d;this.j.c+=this.j.d;this.L.c+=
this.L.d;this.f.c+=this.f.d;0!=this.v.Ab&&(this.v.Ab!=this.Xa?(c=this.qf(this.v.Ab),this.pf()>c?(this.f.c+=-Math.max((2.5-1.7*Math.min(Math.sqrt(this.pan.d*this.pan.d+this.j.d*this.j.d+this.L.d*this.L.d)/b,1))*b,this.f.d)-this.f.d,this.v.f=this.f.c):(this.ec=this.Xa,this.Xa=this.v.Ab,this.O("New projection from Target:"+this.Xa),this.Mf=this.v.Of=0,this.la.Jg())):1>this.v.Of?(this.v.Of=Math.min(1,this.v.Of+.05*c),this.Mf=this.v.Of):(this.ec=0,this.v.Ab=0,this.la.Jg()))}this.Ee=a.getTime();this.update()}else if(this.s.active){b=
a.getTime()-this.s.startTime;this.s.Rg<this.s.startTime&&(this.s.Rg=this.s.startTime);if((this.s.$i||this.s.ad||this.pb.sd)&&0<this.Ha.length){c=b/100;e=!1;if(this.yb!=this.C.Ra){for(b=0;b<this.Ha.length;b++)if(""==this.yb||""!=this.yb&&this.Ha[b].Ra==this.yb){e=!0;this.C=this.Ha[b];this.yb=this.C.Ra;break}!e&&0<this.Ha.length&&(e=!0,this.C=this.Ha[0],this.yb=this.C.Ra)}else e=!0;if(e)if(b=(f=this.o.a&&this.o.md)&&this.s.Si&&!this.pb.sd,this.bf){e=c;if(b)for(this.o.a.currentTime<this.hj&&this.Eh&&
(this.Dh++,this.Eh=!1),e=10*(this.Dh*this.o.a.duration+this.o.a.currentTime),this.hj=this.o.a.currentTime,.05>this.o.a.duration-this.o.a.currentTime&&(this.Eh=!0);e>=10*this.oe;)e-=10*this.oe;if(!f&&c>=this.C.length||f&&!b&&c>=this.C.length||f&&b&&this.C.Ra!=this.C.uk&&c>=this.C.length){this.bf=!1;if(this.pb.sd){this.pb.sd=!1;this.pb.Xh=!0;this.s.active=this.N.Od;this.Ha.splice(this.Ha.indexOf(this.C),1);0<this.Ha.length&&(this.C=this.Ha[0]);this.yb="";this.Tf(this.N.ui);this.Uf(this.N.cj);this.Sf(this.N.ki);
this.N.Od=!1;this.Ee=a.getTime();return}this.yb=this.C.uk;if(this.yb==this.C.Ra){if(1<this.Ka.length&&0<this.s.Wg){if(this.s.xi){b=1E3;do c=this.Ka[Math.floor(Math.random()*this.Ka.length)];while(b--&&c==this.Tb)}else c=this.Jj();this.de("{"+c+"}");this.s.startTime=a.getTime();this.bf=!1;this.s.active=!0;this.N.Od=!0}}else this.Bf&&this.C.tk!=this.Tb&&(this.de("{"+this.C.tk+"}"),this.N.enabled?(this.s.active=!1,this.N.Od=!0):this.s.active=!0),this.s.startTime=a.getTime()}else this.Qk(e)}else if(c=
this.C.ia[0],e=this.C.ia[1],f=this.C.ia[2],g=this.C.ia[3],3!=g.tb&&(g=0),this.s.vi||this.v.ne||this.pb.sd||b){if(this.bf=!0,this.s.startTime=a.getTime(),this.Md=b){for(this.oe=this.Dh=0;this.oe<this.C.length/10;)this.oe+=this.o.a.duration;e=10*this.o.a.currentTime;for(b=Math.floor(e);!this.Be(b,3)&&0<b;)b--;b=this.Be(b,3);b.value==this.Xa?this.af=-1:(this.af=b.value,this.pg=e,this.Ch=Math.max(5,b.time+b.lb-e))}}else{b=this.s.ad;k={};for(k.pan=c.value;360<k.pan;)k.pan-=360;for(;-360>k.pan;)k.pan+=
360;k.tilt=e.value;k.fov=f.value;k.projection=g?g.value:4;k.timingFunction=3;k.speed=1;this.v.wi=!0;this.Ug(k);this.s.active=!0;this.s.ad=b}}else if(0<this.s.Wg&&this.Bf&&b>=1E3*this.s.Wg){if(1<this.Ka.length){if(this.s.xi){b=1E3;do c=this.Ka[Math.floor(Math.random()*this.Ka.length)];while(b--&&c==this.Tb)}else b=this.Ka.indexOf(this.Tb),b++,b>=this.Ka.length&&(b=0),c=this.Ka[b];this.s.startTime=a.getTime();this.s.nd=a.getTime();this.s.timeout=0;this.de("{"+c+"}");this.s.active=!0;this.N.Od=!0}}else b=
a.getTime(),e=c=1E3/60,0!=this.s.nd&&(e=b-this.s.nd),this.j.d=this.s.nh*(0-this.j.c)/100,this.f.d=this.s.nh*(this.f.Na-this.f.c)/100,this.pan.d=.95*this.pan.d+-this.s.speed*this.zd()*.05,c=e/c,this.pan.c+=this.pan.d*c,this.j.c+=this.j.d*c,this.f.c+=this.f.d*c,this.s.nd=b,this.update();3E3<a.getTime()-this.s.Rg&&!this.s.xg&&(this.Aa.style.cursor="none",this.s.xg=!0)}else!this.pb.Xh&&1E3<a.getTime()-this.Ee&&(this.Ha.splice(this.Ha.indexOf(this.C),1),this.C=this.nf(!1),this.yb=this.C.Ra,this.s.active=
!1,this.s.Cg=!0),this.s.enabled&&!this.X.fb&&a.getTime()-this.Ee>1E3*this.s.timeout&&(this.s.cg&&this.Eg()||!this.s.cg)&&(this.s.active=!0,this.s.startTime=a.getTime(),this.s.nd=0,this.pan.d=0,this.j.d=0,this.f.d=0),!this.ua.enabled||0!=this.ae||this.X.fb||0==this.pan.d&&0==this.j.d&&0==this.f.d||(this.pan.d*=.9,this.j.d*=.9,this.f.d*=.9,this.pan.c+=this.pan.d,this.j.c+=this.j.d,this.ef(this.f.d),1E-4>this.pan.d*this.pan.d+this.j.d*this.j.d+this.f.d*this.f.d&&(this.pan.d=0,this.j.d=0,this.f.d=0),
this.update())};b.prototype.pn=function(a){var b=this.N;if(b.Ld){var c=a.getTime()-b.ul,c=c/(1E3*b.tl);if(1<=c){b.Ld=!1;for(c=0;c<this.Ea.eg.length;c++)this.Ea.Vh(this.Ea.eg[c]);b.Qi=a.getTime();this.$k();b.Ue=!0;0==b.uc||b.zh||(4==b.uc?(this.C=this.nf(!0,b.ie,b.je,b.vd),this.yb=this.C.Ra,this.s.active=!0,this.pb.sd=!0):this.moveTo(b.ie,b.je,b.vd,b.Ze,0,b.Yc))}else b.yk(c)}else b.Ue&&(c=a.getTime()-b.Qi,c/=1E3*b.jj,1<=c?(b.Ue=!1,this.Ee=a.getTime(),this.update(),0!=b.uc&&b.zh&&(4==b.uc?(this.C=this.nf(!0,
b.ie,b.je,b.vd),this.yb=this.C.Ra,this.s.active=!0,this.pb.sd=!0):this.moveTo(b.ie,b.je,b.vd,b.Ze,0,b.Yc)),4!=b.uc&&(this.Tf(b.ui),this.Uf(b.cj),this.Sf(b.ki),this.s.active=b.Od,b.Od=!1),this.s.nd=0):b.yk(c));b=this.hn;b.Ml&&(b.yg?a.getTime()-b.Th>=1E3*b.bm&&(b.yg=!1):(b.current+=b.Gc,0>b.current&&(b.current=0,b.Gc=-b.Gc,b.yg=!0,b.Th=a.getTime()),1<b.current&&(b.current=1,b.Gc=-b.Gc,b.yg=!0,b.Th=a.getTime())))};b.prototype.tn=function(){var a,b=this.w;if(0<b.bb.length){for(a=0;a<b.bb.length;a++)b.Bc[a]!=
b.Db[a]&&(b.Bc[a]>b.Db[a]?(b.Db[a]+=.05,b.Bc[a]<b.Db[a]&&(b.Db[a]=b.Bc[a])):(b.Db[a]-=.05,b.Bc[a]>b.Db[a]&&(b.Db[a]=b.Bc[a],-1!=b.ih.indexOf(b.bb[a])&&(b.ih.splice(b.ih.indexOf(b.bb[a]),1),b.bb.splice(a,1),b.Bc.splice(a,1),b.Db.splice(a,1)))));this.update()}if(2==b.mode)for(a=0;a<this.P.length;a++){var c=this.P[a];"poly"==c.type&&c.cb!=c.na&&(c.cb>c.na?(c.na+=b.Gc,c.cb<c.na&&(c.na=c.cb)):(c.na-=b.Gc,c.cb>c.na&&(c.na=c.cb)),this.update())}3==b.mode&&b.cb!=b.na&&(b.cb>b.na?(b.na+=b.Gc,b.cb<b.na&&(b.na=
b.cb)):(b.na-=b.Gc,b.cb>b.na&&(b.na=b.cb)),this.update())};b.prototype.sn=function(){var a=this.ua;this.X.fb&&(this.B.kd?(a.aa.x=.4*(this.Y.ba.x-a.ba.x),a.aa.y=.4*(this.Y.ba.y-a.ba.y),a.ba.x+=a.aa.x,a.ba.y+=a.aa.y):(a.aa.x=.1*-this.Y.aa.x*this.B.sensitivity/8,a.aa.y=.1*-this.Y.aa.y*this.B.sensitivity/8),this.ol(a.aa.x,a.aa.y),this.update());a.f.active&&(this.lj(.4*(a.f.Ub-this.f.c)),.001>Math.abs(a.f.Ub-this.f.c)/this.f.c&&(a.f.active=!1),this.update());if(a.enabled&&(0!=a.aa.x||0!=a.aa.y)&&!this.X.fb){var b=
.9*(1-a.Ki);a.aa.x=b*a.aa.x;a.aa.y=b*a.aa.y;.01>a.aa.x*a.aa.x+a.aa.y*a.aa.y?(a.aa.x=0,a.aa.y=0):(this.ol(a.aa.x,a.aa.y),this.update())}};b.prototype.on=function(){if(this.B.Mk&&this.B.kd){var a=new g;a.pan=this.pan.c;a.j=this.j.c;a.f=this.f.c;this.te(a);this.te(a);this.te(a);var b=a.pan-this.pan.c,c=a.j-this.j.c,a=a.f-this.f.c;if(0!=b||0!=c||0!=a){var e;e=.2+.9*Math.min((Math.abs(b)+Math.abs(c)+Math.abs(a))/Math.abs(Math.min(this.f.c,100))*.3,1);this.pan.c+=b*e;this.j.c+=c*e;this.f.c+=a*e;this.ua.Ki=
.3;this.update()}else this.ua.Ki=0}else this.tg();if(2!=this.ib){for(;360<this.pan.c;)this.pan.c-=360;for(;-360>this.pan.c;)this.pan.c+=360}};b.prototype.qn=function(){if(0!=this.ae){var a=this.B.sensitivity/8;switch(this.ae){case 37:case 65:this.rg(a*this.zd(),!0);break;case 38:case 87:this.sg(a*this.zd(),!0);break;case 39:case 68:this.rg(-a*this.zd(),!0);break;case 40:case 83:this.sg(-a*this.zd(),!0);break;case 43:case 107:case 16:case 81:this.B.pi||this.ef(-a,!0);break;case 17:case 18:case 109:case 45:case 91:case 69:this.B.pi||
this.ef(a,!0)}this.update()}};b.prototype.rn=function(){if(!this.Eg()&&this.xf&&5<this.g.Jk){var a,b=0,c=this.Gb.length;if(this.hg)c=50,this.Uh<c&&this.Uh++,b=this.Uh;else for(a=0;a<c;a++)(this.Gb[a].complete&&this.Gb[a].src!=this.vj||""==this.Gb[a].src)&&b++;b==c?(this.Zg=1,this.isLoaded=!0,this.M&&this.M.ggLoaded&&this.M.ggLoaded(),this.s.cg&&this.s.enabled&&!this.v.active&&!this.N.Ld&&(this.s.active=!0,this.s.startTime=(new Date).getTime(),this.s.nd=0)):this.Zg=b/(1*c)}};b.prototype.Ai=function(){var a=
new Date;this.ub&&""!==this.Xd&&!this.ga&&document.hasOwnProperty(this.Xd)&&document[this.Xd].setPan&&0==this.fm--&&(this.ga=document[this.Xd],this.Cc=this.ea=!1,this.sa&&(this.sa.style.visibility="hidden"),this.ga.setLocked(!0),this.ga.setSlaveMode(!0),this.ga.readConfigString(this.Qh),this.Uc("Flash player '"+this.Xd+"' connected."));this.Dg++;120<=this.Dg&&(this.O("Fps: "+1E3*this.Dg/(a.getTime()-this.fk)),this.fk=a.getTime(),this.Dg=0);this.Gi=this.ah=0;this.Yi&&(this.$c(),this.Yi=!1);this.sn();
this.qn();this.rn();this.nn(a);this.on();this.pn(a);this.la.Ao();(0<=this.w.mode||0<this.w.bb.length)&&this.tn();this.th();this.xa&&(0<this.zg?this.zg--:(this.xa=!1,this.zg=0),this.N.Ue||this.N.Ld||this.gg());var b=this;setTimeout(function(){b.Ai()},1E3/60)};b.prototype.qf=function(a){switch(a){case 4:a=Math.min(110,this.f.max);break;case 12:a=Math.min(270,this.f.si);a=Math.min(360*this.Nd(),a);a=Math.min(360/this.Nd(),a);break;case 9:a=Math.min(270,this.f.ti);break;default:a=90}return a};b.prototype.kl=
function(){var a=this;setTimeout(function(){a.Pe(!1)},10);setTimeout(function(){a.Pe(!1)},100)};b.prototype.th=function(){this.Ph.yj(this.pan.c,this.j.c);for(var a=0;a<this.S.length+this.I.length;a++){var b;if(a<this.S.length)b=this.S[a];else if(b=this.I[a-this.S.length],b.Vc)continue;b.th()}};b.prototype.tj=function(a){var b="",c,e,f,g,k,h=0;a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");do c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)),
g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)),k="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=".indexOf(a.charAt(h++)),c=c<<2|e>>4,e=(e&15)<<4|g>>2,f=(g&3)<<6|k,b+=String.fromCharCode(c),64!=g&&(b+=String.fromCharCode(e)),64!=k&&(b+=String.fromCharCode(f));while(h<a.length);return b};b.prototype.$n=function(a,b){var c,e,f=this;if(0!=f.Jf.length||!f.B.yf||f.B.hf||f.B.ug)if(f.Mc)f.Mc=null,f.U.removeChild(f.Mc);else{f.Mc=document.createElement("div");
var g=f.Mc;c="left: "+a+"px;"+("top:\t "+b+"px;")+"z-index: 32000;";c+="position:relative;";c+="display: table;";c+="background-color: white;";c+="border: 1px solid lightgray;";c+="box-shadow: 1px 1px 3px #333;";c+="font-family: Verdana, Arial, Helvetica, sans-serif;";c+="font-size: 9pt;";c+="opacity : 0.95;";g.setAttribute("style",c);g.setAttribute("class","gg_contextmenu");c=document.createElement("style");e=document.createTextNode(".gg_context_row:hover { background-color: #3399FF }");c.type="text/css";
c.styleSheet?c.styleSheet.cssText=e.nodeValue:c.appendChild(e);g.appendChild(c);for(e=0;e<f.Jf.length;e++){var k=f.Jf[e],h=document.createElement("div");c="text-align: left;";c+="margin: 0;";c+="padding: 5px 20px;";c+="vertical-align: left;";h.setAttribute("style",c);h.setAttribute("class","gg_context_row");c=document.createElement("a");c.href=k.url;c.target="_blank";c.innerHTML=k.text;c.setAttribute("style","color: black; text-decoration: none;");h.appendChild(c);g.appendChild(h)}0<f.Jf.length&&
(!f.B.yf||f.B.hf||f.B.ug)&&g.appendChild(document.createElement("hr"));if(f.B.ug&&f.ea){k=[];k.push({text:"Rectilinear Projection",Nf:4});k.push({text:"Stereographic Projection",Nf:9});k.push({text:"Fisheye Projection",Nf:12});for(e=0;e<k.length;e++){var h=k[e],m=document.createElement("div");m.setAttribute("class","gg_context_row");c="text-align: left;";c+="margin: 0;";c=f.Xa==h.Nf?c+"padding: 5px 20px 5px 7px;":c+"padding: 5px 20px;";c+="vertical-align: left;";c+="cursor: pointer;";m.setAttribute("style",
c);m.onclick=function(a){return function(){f.Kh(a,1);f.update()}}(h.Nf);f.Xa==h.Nf?m.innerHTML="&#10687; "+h.text:m.innerHTML=h.text;g.appendChild(m)}f.B.yf&&!f.B.hf||g.appendChild(document.createElement("hr"))}f.B.hf&&(e=document.createElement("div"),e.setAttribute("class","gg_context_row"),c="text-align: left;margin: 0;padding: 5px 20px;",c+="vertical-align: left;",c+="cursor: pointer;",e.setAttribute("style",c),e.onclick=function(){f.ph()},e.innerHTML=f.Mg()?"Exit Fullscreen":"Enter Fullscreen",
g.appendChild(e));c="<<L>>"+String(f.Ia);c=c.toUpperCase();f.B.yf&&"U"==c.charAt(2)||(e=document.createElement("div"),c="text-align: left;margin: 0;padding: 5px 20px;",c+="vertical-align: left;",e.setAttribute("style",c),e.setAttribute("class","gg_context_row"),c=document.createElement("a"),c.href=f.tj("aHR0cDovL3Bhbm8ydnIuY29tLw=="),c.target="_blank",c.innerHTML=f.tj("Q3JlYXRlZCB3aXRoIFBhbm8yVlI="),c.setAttribute("style","color: black; text-decoration: none;"),e.appendChild(c),g.appendChild(e));
f.U.insertBefore(f.Mc,f.U.firstChild);g.onclick=function(){f.Mc&&(f.U.removeChild(f.Mc),f.Mc=null)};g.oncontextmenu=g.onclick}};b.prototype.Ll=function(){var a=this,b;b=a.Aa;a.control=b;a.control=b;a.kl();setTimeout(function(){a.Ai()},10);setTimeout(function(){a.zk()},200);setTimeout(function(){a.me();a.gg()},10);b.addEventListener&&(b.addEventListener("touchstart",function(b){a.to(b)},!1),b.addEventListener("touchmove",function(b){a.so(b)},!1),b.addEventListener("touchend",function(b){a.ro(b)},!1),
b.addEventListener("touchcancel",function(b){a.qo(b)},!1),b.addEventListener("pointerdown",function(b){a.sk(b)},!1),b.addEventListener("MSPointerDown",function(b){a.sk(b)},!1),b.addEventListener("MSGestureStart",function(b){a.Gj(b)},!1),b.addEventListener("MSGestureEnd",function(b){a.Fj(b)},!1),b.addEventListener("MSGestureChange",function(b){a.bn(b)},!1),b.addEventListener("gesturestart",function(b){a.Gj(b)},!1),b.addEventListener("gesturechange",function(b){a.im(b)},!1),b.addEventListener("gestureend",
function(b){a.Fj(b)},!1),b.addEventListener("mousedown",function(b){a.Zm(b)},!1),b.addEventListener("mousemove",function(b){a.Ym(b)},!1),document.addEventListener("mouseup",function(b){a.Xm(b)},!1),b.addEventListener("mousewheel",function(b){a.rk(b)},!1),b.addEventListener("DOMMouseScroll",function(b){a.rk(b)},!1),document.addEventListener("keydown",function(b){a.Um(b)},!1),document.addEventListener("keyup",function(b){a.Vm(b)},!1),window.addEventListener("orientationchange",function(){a.kl()},!1),
window.addEventListener("resize",function(){a.me()},!1),window.addEventListener("blur",function(){a.gn()},!1),a.U.addEventListener("webkitfullscreenchange",function(){a.Xg()},!1),document.addEventListener("mozfullscreenchange",function(){a.Xg()},!1),window.addEventListener("webkitfullscreenchange",function(){a.Xg()},!1),document.addEventListener("MSFullscreenChange",function(){a.Xg()},!1));b.oncontextmenu=function(b){void 0===b&&(b=window.event);if(b.target&&!a.ld(b.target))return!0;if(!b.ctrlKey){b=
a.rf(b);var d=a.Yd();a.$n(b.x-d.x,b.y-d.y);return!1}return!0}};b.prototype.ej=function(){for(var a=0;a<this.P.length;a++)if("point"==this.P[a].type&&(this.Oa&&this.Oa.addSkinHotspot?(this.P[a].ye(),this.P[a].a=new this.Oa.addSkinHotspot(this.P[a])):this.P[a].a=new m.vl(this,this.P[a]),this.P[a].a.__div.style.left="-1000px",this.P[a].a.__div.style.top="-1000px",this.P[a].a&&this.P[a].a.__div)){var b=this.Aa.firstChild;b?this.Aa.insertBefore(this.P[a].a.__div,b):this.Aa.appendChild(this.P[a].a.__div)}};
b.prototype.sl=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]};b.prototype.Ib=function(a){var b=[];a=new RegExp(a,"");for(var c=0;c<this.S.length;c++)a.test(this.S[c].id)&&b.push(this.S[c]);for(c=0;c<this.I.length;c++)a.test(this.I[c].id)&&b.push(this.I[c]);for(c=0;c<this.Va.length;c++)a.test(this.Va[c].id)&&
b.push(this.Va[c]);return b};b.prototype.um=function(a){if("_videopanorama"==a)return this.o.a;a=this.Ib(a);return 0<a.length?a[0].a:null};b.prototype.Ek=function(a,b){for(var c=0;c<this.I.length;c++)if(this.I[c].id==a)return this.I[c].a=b,this.I[c];c=new m.Nk(this);c.registerElement(a,b);return c};b.prototype.Tc=function(a){if(this.ub){var b=this.ga;if(b)return b.isPlaying(a)}else{if("_main"===a)return!0;a=this.Ib(a);if(0<a.length)return a[0].ha?a[0].ge:!a[0].a.ended&&!a[0].a.paused}return!1};b.prototype.fe=
function(a,b){if(this.ub){var c=this.ga;c&&c.playSound(a,b)}else try{for(var c=this.Ib(a),e=0;e<c.length;e++){var f=c[e];f.Kc=b&&!isNaN(Number(b))?Number(b)-1:f.loop-1;-1==f.Kc&&(f.Kc=1E7);this.O(f.a);f.ha?f.Hc():f.a.play()}}catch(g){this.O(g)}};b.prototype.Ak=function(a,b){for(var c=this.Ib(a),e=0;e<c.length;e++){var f=c[e];this.Tc(f.id)?this.Bi(f.id):this.fe(f.id,b)}};b.prototype.un=function(a,b){for(var c=this.Ib(a),e=0;e<c.length;e++){var f=c[e];this.Tc(f.id)?this.al(f.id):this.fe(f.id,b)}};b.prototype.Bi=
function(a){if(this.ub){var b=this.ga;b&&b.pauseSound(a)}else try{if("_main"==a){for(b=0;b<this.S.length;b++)this.S[b].ha?this.S[b].Ih():this.S[b].a.pause();for(b=0;b<this.I.length;b++)this.I[b].a.pause()}else for(var c=this.Ib(a),b=0;b<c.length;b++){var e=c[b];e.ha?e.Ih():e.a.pause()}}catch(f){this.O(f)}};b.prototype.Gl=function(a,b){for(var c=this.Ib(a),e=0;e<c.length;e++){var f=c[e];0==b||1==b?f.tf&&f.tf(1==b):2==b&&f.Qc&&f.Qc()}};b.prototype.al=function(a){var b;if(this.ub)(b=this.ga)&&b.stopSound(a);
else try{if("_main"===a){for(b=0;b<this.S.length;b++)this.S[b].ha?this.S[b].re():(this.S[b].a.pause(),this.S[b].a.currentTime=0);for(b=0;b<this.I.length;b++)this.I[b].a.pause(),this.I[b].a.currentTime=0}else{var c=this.Ib(a);for(b=0;b<c.length;b++){var e=c[b];e.ha?e.re():e.a&&e.a.pause&&(e.a.pause(),e.a.currentTime=0,this.Lg&&(e.rd(),e.addElement()))}}}catch(f){this.O(f)}};b.prototype.bo=function(a){a=this.Ib(a);return 0<a.length?(a=a[0],a.ha?a.Ol():a.a?a.a.currentTime:0):0};b.prototype.co=function(a,
b){var c=this.Ib(a);0<c.length&&(c=c[0],c.ha?(0>b&&(b=0),b>c.cf.duration&&(b=c.cf.duration-.1),c.Pl(b)):c.a&&(0>b&&(b=0),b>c.a.duration&&(b=c.a.duration-.1),c.a.currentTime=b))};b.prototype.Xn=function(a,b){if(this.ub){var c=this.ga;c&&c.setVolume(a,b)}else try{var e=Number(b);1<e&&(e=1);0>e&&(e=0);"_videopanorama"===a&&this.o.a&&(this.o.a.volume=e);if("_main"===a){this.V=e;for(c=0;c<this.S.length;c++)this.S[c].a.volume=this.S[c].level*this.V;for(c=0;c<this.I.length;c++)this.I[c].a.volume=this.I[c].level*
this.V;this.o.a&&(this.o.a.volume=this.V)}else{var f=this.Ib(a);this.O(f);for(c=0;c<f.length;c++){var g=f[c];g.a&&null!=g.a.volume&&(g.a.volume=e*this.V);g.level=e}}}catch(k){this.O(k)}};b.prototype.Wl=function(a,b){if(this.ub){var c=this.ga;c&&c.changeVolume(a,b)}else try{var e;"_videopanorama"===a&&this.o.a&&(this.o.a.volume=this.o.a.volume+Number(b));if("_main"===a){c=this.V;c+=Number(b);1<c&&(c=1);0>c&&(c=0);this.V=c;for(e=0;e<this.S.length;e++)this.S[e].a.volume=this.S[e].level*this.V;for(e=
0;e<this.I.length;e++)this.I[e].a.volume=this.I[e].level*this.V;this.o.a&&(this.o.a.volume=this.V)}else{var f=this.Ib(a);for(e=0;e<f.length;e++){var g=f[e],c=g.level,c=c+Number(b);1<c&&(c=1);0>c&&(c=0);g.level=c;g.a&&null!=g.a.volume&&(g.a.volume=c*this.V)}}}catch(k){this.O(k)}};b.prototype.$k=function(){try{for(var a=this,b=!1,c=!1,e=0;e<this.S.length;e++){var f=this.S[e];-1==f.loop||this.Tc(f.id)||(this.Ga&&this.Ea.enabled&&4!=f.mode&&6!=f.mode?this.Ea.qj?(f.ha?f.Hc():(f.a.play(),f.a.currentTime=
0),f.ja=0,c=!0):b=!0:4==f.mode||6==f.mode||"_background"==f.id&&this.Tc(f.id)||(f.ha?f.Hc():(f.a.play(),f.a.currentTime&&(f.a.currentTime=0))))}b&&setTimeout(function(){a.Ea.jo()},1E3*this.Ea.lb);c&&(this.Ea.fo=this.Ga.currentTime,this.Ea.eo=setInterval(function(){a.Ea.em()},10))}catch(g){this.O(g)}};b.prototype.Ik=function(){for(var a;0<this.P.length;)a=this.P.pop(),a.a&&(this.Aa.removeChild(a.a.__div),delete a.a),a.a=null};b.prototype.Ni=function(a){this.mg=a;0!=a?this.U.style.zIndex=a.toString():
this.U.style.zIndex="auto";this.Ba&&this.Ba.Ic&&(this.Ba.Ic.zIndex=(a+4).toString());this.Aa.style.zIndex=(a+4).toString();this.sa.style.zIndex=(a+3).toString();this.ta.style.zIndex=(a+5).toString();for(var b=0;b<this.I.length+this.Va.length;b++){var c;c=b<this.I.length?this.I[b]:this.Va[b-this.I.length];c.a&&(c.a.style.zIndex=(a+(c.wb?8E4:0)).toString())}};b.prototype.Pe=function(a){var b=this.isFullscreen!==a;this.isFullscreen!==a&&(this.isFullscreen=a,this.update(100));if(this.isFullscreen){if(this.uh)try{this.U.webkitRequestFullScreen?
this.U.webkitRequestFullScreen():this.U.mozRequestFullScreen?this.U.mozRequestFullScreen():this.U.msRequestFullscreen?this.U.msRequestFullscreen():this.U.requestFullScreen?this.U.requestFullScreen():this.U.requestFullscreen&&this.U.requestFullscreen()}catch(c){this.O(c)}this.U.style.position="absolute";a=this.Yd();this.U.style.left=window.pageXOffset-a.x+this.margin.left+"px";this.U.style.top=window.pageYOffset-a.y+this.margin.top+"px";this.Ni(10);document.body.style.overflow="hidden";b&&this.M&&
this.M.ggEnterFullscreen&&this.M.ggEnterFullscreen()}else{if(this.uh)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.O(c)}this.U.style.position="relative";this.U.style.left="0px";this.U.style.top="0px";this.Ni(0);document.body.style.overflow=
"";b&&this.M&&this.M.ggExitFullscreen&&this.M.ggExitFullscreen()}this.me()};b.prototype.ph=function(){this.Pe(!this.isFullscreen)};b.prototype.dm=function(){this.Pe(!0)};b.prototype.exitFullscreen=function(){this.Pe(!1)};b.prototype.pm=function(){return this.isFullscreen};b.prototype.Xk=function(a,b,c){this.s.enabled=!0;this.s.active=!0;this.s.nd=0;this.s.startTime=(new Date).getTime();a&&0!=a&&(this.s.speed=a);b&&(this.s.timeout=b);c&&(this.s.nh=c)};b.prototype.ko=function(){this.s.active=!1;this.s.enabled=
!1;this.s.ad=!1};b.prototype.oo=function(){this.s.enabled=!this.s.active;this.s.active=this.s.enabled;this.s.nd=0;this.s.enabled&&(this.s.startTime=(new Date).getTime())};b.prototype.ho=function(){this.s.ad||(this.s.ad=!0,this.s.ij=this.s.enabled,this.Xk())};b.prototype.pj=function(a){if(this.ue=document.getElementById(a)){this.ue.innerHTML="";this.U=document.createElement("div");this.U.onselectstart=function(){return!1};O&&this.U.setAttribute("id","viewport");a="top:\t0px;left: 0px;position:relative;-ms-touch-action: none;touch-action: none;text-align: left;"+
(this.Ia+"user-select: none;");this.U.setAttribute("style",a);this.ue.appendChild(this.U);this.A=document.createElement("div");a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+(this.Ia+"user-select: none;");O&&this.A.setAttribute("id","viewer");this.A.setAttribute("style",a);this.U.appendChild(this.A);if(this.ub){var b=document.createElement("div");a="top:\t0px;left: 0px;width:  100%;height: 100%;overflow: hidden;position:absolute;-ms-touch-action: none;touch-action: none;"+
(this.Ia+"user-select: none;");b.setAttribute("id",this.$h);b.setAttribute("style",a);this.A.appendChild(b)}this.Ba&&(this.Ba.Ic=document.createElement("canvas"),O&&this.Ba.Ic.setAttribute("id","lensflarecanvas"),a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+(this.Ia+"user-select: none;"),a+=this.Ia+"pointer-events: none;",this.Ba.Ic.setAttribute("style",a),this.U.appendChild(this.Ba.Ic));this.Aa=document.createElement("div");O&&this.Aa.setAttribute("id",
"hotspots");a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;";this.ak&&(a+="background-image: url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7);");this.Dd&&!this.ea&&(a+=this.Ia+"transform: translateZ(9999999px);");a+=this.Ia+"user-select: none;";this.Aa.setAttribute("style",a);this.U.appendChild(this.Aa);this.sa=document.createElement("canvas");O&&this.sa.setAttribute("id","hotspotcanvas");a="top:\t0px;left: 0px;width:  100px;height: 100px;overflow: hidden;position:absolute;"+
(this.Ia+"user-select: none;");a+=this.Ia+"pointer-events: none;";this.sa.setAttribute("style",a);this.U.appendChild(this.sa);this.ta=document.createElement("div");O&&this.ta.setAttribute("id","hotspottext");this.ta.setAttribute("style","top:\t0px;left: 0px;position:absolute;padding: 3px;visibility: hidden;");this.ta.innerHTML=" Hotspot text!";this.U.appendChild(this.ta);this.divSkin=this.M=this.Aa;this.Ni(0)}else alert("container not found!")};b.prototype.rj=function(a){this.xa=!0;return function(){a.Ma&&
(a.g&&a.g.complete?(a.loaded=!0,a.Ma.drawImage(a.g,0,0,a.width,a.height),a.g=null,a.qd=null):a.qd&&a.qd.complete&&!a.loaded&&(a.Ma.drawImage(a.qd,0,0,a.width,a.height),a.qd=null))}};b.prototype.oj=function(a){var b,c,e,f=128;this.g.Ke&&(this.A.style.backgroundColor=this.g.Ke.replace("0x","#"));a?(f=this.df,this.Re=1):this.hc>f&&(f=this.hc);for(e=0;6>e;e++){c=this.eb.Za[e];a?(c.width=this.df,c.height=this.df):(c.J=document.createElement("canvas"),c.J.width=this.hc,c.J.height=this.hc,c.width=this.hc,
c.height=this.hc,c.Ma=c.J.getContext("2d"));b="position:absolute;";b+="left: 0px;";b+="top: 0px;";b+="width: "+f+"px;";b+="height: "+f+"px;";a&&(b+="outline: 1px solid transparent;");b+=this.Ia+"transform-origin: 0% 0%;";b+="-webkit-user-select: none;";b+=this.Ia+"transform: ";var g;g="";var k=1;this.Me&&(k=100);g=4>e?g+("rotateY("+-90*e+"deg)"):g+("rotateX("+(4==e?-90:90)+"deg)");this.Me&&(g+=" scale("+k+")");g+=" translate3d("+-f/2+"px,"+-f/2+"px,"+-f*k/(2*this.Re)+"px)";b+=g+";";c.Pj=g;a||(c.J.setAttribute("style",
b),this.A.insertBefore(c.J,this.A.firstChild))}if(!a){for(e=0;6>e;e++)c=this.eb.Za[e],""!=this.we[e]&&(c.qd=new Image,c.qd.crossOrigin=this.crossOrigin,c.qd.onload=this.rj(c),c.qd.setAttribute("src",this.Vb(this.we[e])),this.Gb.push(c.qd));for(e=0;6>e;e++)c=this.eb.Za[e],c.loaded=!1,c.g=new Image,c.g.crossOrigin=this.crossOrigin,c.g.onload=this.rj(c),c.g.setAttribute("src",this.Vb(this.wg[e])),this.Gb.push(c.g)}};b.prototype.dh=function(){var a;this.ua.aa.x=0;this.ua.aa.y=0;if(this.Cc){for(a=0;a<
this.eb.Za.length;a++)this.eb.Za[a].J&&this.eb.Za[a].J.setAttribute&&(this.eb.Za[a].J.setAttribute("src",this.vj),this.A.removeChild(this.eb.Za[a].J));if(this.g.H){for(a=0;a<this.g.H.length;a++){var b=this.g.H[a],c;for(c in b.W)if(b.W.hasOwnProperty(c)){var e=b.W[c];e.visible=!1;e.J&&(e.Ma&&e.Ma.clearRect(0,0,e.Ma.canvas.width,e.Ma.canvas.height),this.qh.push(e.J));e.g&&delete e.g;e.gb&&(this.G.deleteTexture(e.gb),this.Rc--);e.Ma=null;e.J=null;e.g=null}delete b.W}delete this.g.H;this.g.H=null}}this.la.dh();
c=[];for(a=0;a<this.I.length;a++)b=this.I[a],b.Vc?c.push(b):b.rd();for(a=0;a<this.Va.length;a++)this.Va[a].rd();this.w.Df=-1;this.sa.style.visibility="hidden";this.ib=0;b=[];this.Ea.eg=[];for(a=0;a<this.S.length;a++)if(e=this.S[a],0==e.mode||1==e.mode)b.push(e),this.O("Keep in list "+e.id);else if(this.Ga&&this.Ea.enabled&&this.Tc(e.id))this.Ea.eg.push(e),1!=this.N.Ya&&2!=this.N.Ya&&this.Ea.Vh(e);else{try{e.ha?e.re():e.a.pause()}catch(f){this.O(f)}e.rd()}this.S=b;this.I=c;this.Va=[];this.o.a&&(this.U.removeChild(this.o.a),
this.o.a=null,a=this.Ib("_videopanorama"),0<a.length&&(a[0].a=null));this.o.md=!1;this.o.Ng=!1};b.prototype.Mj=function(){var a=1,b=-1!=navigator.userAgent.indexOf("Mac");window.devicePixelRatio&&b&&(a=window.devicePixelRatio);return{wh:screen.width*a,Ig:screen.height*a}};b.prototype.Ij=function(){var a=this.Mj();return a.wh>a.Ig?a.wh:a.Ig};b.prototype.Fi=function(a,b){var c=(new DOMParser).parseFromString(a,"text/xml");this.Qh=a;this.Dk(c,b);this.ga&&(this.O("Apply to Flash player"),this.ga.readConfigString(this.Qh),
this.ga.setLocked(!0),this.ga.setSlaveMode(!0))};b.prototype.Ck=function(a,b,c){try{var e;e=new XMLHttpRequest;e.open("GET",a,!1);e.send(null);if(e.responseXML){var f=a.lastIndexOf("/");0<=f&&(this.xd=a.substr(0,f+1));2<=arguments.length&&null!=b&&(this.xd=b);this.Fi(e.responseText,c)}else alert("Error loading panorama XML")}catch(g){alert("Error:"+g)}};b.prototype.wn=function(a,b,c,e){var f;f=new XMLHttpRequest;var g=this;f.onload=function(k){if(4<=f.readyState)if(f.responseXML){var h=a.lastIndexOf("/");
0<=h&&(g.xd=a.substr(0,h+1));3<=arguments.length&&null!=c&&(g.xd=c);g.Fi(f.responseText,e);b&&b()}else alert("Error loading panorama XML");else console.error("Wrong state loading XML:"+f.statusText)};f.onerror=function(){console.error("Error loading XML:"+f.statusText)};f.open("GET",a,!0);f.send(null)};b.prototype.Jh=function(a){var b="";"{"==a.charAt(0)&&(b=a.substr(1,a.length-2));a={oldNodeId:this.Tb,nodeId:b};this.el("beforechangenodeid",a);""!=this.Tb&&-1==this.bj.indexOf(this.Tb)&&this.bj.push(this.Tb);
this.gk=this.Tb;this.Tb=b;this.O("change active node: "+b);this.Oa&&this.Oa.changeActiveNode&&this.Oa.changeActiveNode("{"+b+"}");this.el("changenodeid",a)};b.prototype.Hj=function(){return this.Tb};b.prototype.Jj=function(){if(0<this.Ka.length){var a;a=this.Ka.indexOf(this.Tb);a++;a>=this.Ka.length&&(a=0);return this.Ka[a]}return""};b.prototype.Fm=function(){if(0<this.Ka.length){var a;a=this.Ka.indexOf(this.Tb);a--;0>a&&(a=this.Ka.length-1);return this.Ka[a]}return""};b.prototype.tm=function(){return this.gk};
b.prototype.en=function(a){return-1!=this.bj.indexOf(a)};b.prototype.Dk=function(a,b){var c=a.firstChild;this.Te=[];this.Ka=[];if("tour"==c.nodeName){this.Bf=!0;var e="",f;(f=c.getAttributeNode("start"))&&(e=f.nodeValue.toString());this.hasOwnProperty("startNode")&&this.startNode&&(e=String(this.startNode),this.startNode="");for(var c=c.firstChild,g="",k="";c;){if("panorama"==c.nodeName){if(f=c.getAttributeNode("id"))g=f.nodeValue.toString(),""==e&&(e=g),""==k&&(k=g),this.Te[g]=c,this.Ka.push(g);
for(f=c.firstChild;f;)"userdata"==f.nodeName&&(this.jg[g]=this.Ag(f)),f=f.nextSibling}c=c.nextSibling}this.Te.hasOwnProperty(e)||(this.Uc("Start node "+e+" not found!"),e=k);this.Ei(this.Te[e],b);this.Jh("{"+e+"}")}else this.Bf=!1,this.Ei(c,b),this.Jh(""),this.Ka.push("")};b.prototype.Ei=function(a,b){this.Ik();this.Ba&&this.Ba.yn();this.Oe(this.ob);this.dh();this.Ef=0;for(var c=a.firstChild,e,f,g=0;c;){if("view"==c.nodeName){if(e=c.getAttributeNode("fovmode"))this.f.mode=Number(e.nodeValue);e=c.getAttributeNode("pannorth");
this.pan.yi=1*(e?e.nodeValue:0);for(var k=c.firstChild;k;){"start"==k.nodeName&&(e=k.getAttributeNode("pan"),this.pan.c=Number(e?e.nodeValue:0),this.pan.Na=this.pan.c,e=k.getAttributeNode("tilt"),this.j.c=Number(e?e.nodeValue:0),this.j.Na=this.j.c,e=k.getAttributeNode("roll"),this.L.c=Number(e?e.nodeValue:0),this.L.Na=this.L.c,e=k.getAttributeNode("fov"),this.f.c=Number(e?e.nodeValue:70),this.f.Na=this.f.c,e=k.getAttributeNode("projection"),this.Yg=Number(e?e.nodeValue:4),this.Wc(this.Yg));"min"==
k.nodeName&&(e=k.getAttributeNode("pan"),this.pan.min=1*(e?e.nodeValue:0),e=k.getAttributeNode("tilt"),this.j.min=1*(e?e.nodeValue:-90),e=k.getAttributeNode("fov"),this.f.min=1*(e?e.nodeValue:5),1E-20>this.f.min&&(this.f.min=1E-20),e=k.getAttributeNode("fovpixel"),this.f.Kf=1*(e?e.nodeValue:0));if("max"==k.nodeName){e=k.getAttributeNode("pan");this.pan.max=1*(e?e.nodeValue:0);e=k.getAttributeNode("tilt");this.j.max=1*(e?e.nodeValue:90);e=k.getAttributeNode("fov");this.f.max=1*(e?e.nodeValue:120);
180<=this.f.max&&(this.f.max=179.9);if(e=k.getAttributeNode("fovstereographic"))this.f.ti=1*e.nodeValue;if(e=k.getAttributeNode("fovfisheye"))this.f.si=1*e.nodeValue;if(e=k.getAttributeNode("scaletofit"))this.B.Ok=1==e.nodeValue}if("flyin"==k.nodeName){if(e=k.getAttributeNode("projection"))this.kc.Ab=Number(e.nodeValue);if(e=k.getAttributeNode("pan"))this.kc.pan=parseFloat(e.nodeValue);if(e=k.getAttributeNode("tilt"))this.kc.j=parseFloat(e.nodeValue);if(e=k.getAttributeNode("fov"))this.kc.f=parseFloat(e.nodeValue)}k=
k.nextSibling}}if("autorotate"==c.nodeName){if(e=c.getAttributeNode("speed"))this.s.speed=1*e.nodeValue;if(e=c.getAttributeNode("delay"))this.s.timeout=1*e.nodeValue;if(e=c.getAttributeNode("returntohorizon"))this.s.nh=1*e.nodeValue;if(e=c.getAttributeNode("nodedelay"))this.s.Wg=1*e.nodeValue;if(e=c.getAttributeNode("noderandom"))this.s.xi=1==e.nodeValue;this.ze&&(this.s.enabled=!0,this.s.active=!1);if(e=c.getAttributeNode("startloaded"))this.s.cg=1==e.nodeValue,this.s.cg&&(this.s.active=!1);if(e=
c.getAttributeNode("useanimation"))this.s.$i=1==e.nodeValue;if(e=c.getAttributeNode("syncanimationwithvideo"))this.s.Si=1==e.nodeValue}if("animation"==c.nodeName){if(e=c.getAttributeNode("syncanimationwithvideo"))this.s.Si=1==e.nodeValue;if(e=c.getAttributeNode("useinautorotation"))this.s.$i=1==e.nodeValue;this.Ha=[];for(k=c.firstChild;k;){if("clip"==k.nodeName){this.C=new m.pk;if(e=k.getAttributeNode("animtitle"))this.C.Po=e.nodeValue.toString();if(e=k.getAttributeNode("cliptitle"))this.C.Ra=e.nodeValue.toString();
if(e=k.getAttributeNode("nodeid"))this.C.Qo=e.nodeValue.toString();if(e=k.getAttributeNode("length"))this.C.length=Number(e.nodeValue);if(e=k.getAttributeNode("animtype"))this.C.Il=Number(e.nodeValue);if(e=k.getAttributeNode("nextcliptitle"))this.C.uk=e.nodeValue.toString();if(e=k.getAttributeNode("nextclipnodeid"))this.C.tk=e.nodeValue.toString();if(e=k.getAttributeNode("transitiontype"))this.C.uo=Number(e.nodeValue);var h=k.firstChild;for(this.C.ia=[];h;){if("keyframe"==h.nodeName){var y=new m.wc;
if(e=h.getAttributeNode("time"))y.time=Number(e.nodeValue);if(e=h.getAttributeNode("value"))y.value=Number(e.nodeValue);if(e=h.getAttributeNode("transitiontime"))y.lb=Number(e.nodeValue);e=h.getAttributeNode("type");var n=0;e&&(y.type=Number(e.nodeValue),n=Number(e.nodeValue));if(e=h.getAttributeNode("property"))y.tb=Number(e.nodeValue);if(1==n||2==n){if(e=h.getAttributeNode("bezierintime"))y.Pd=Number(e.nodeValue);if(e=h.getAttributeNode("bezierinvalue"))y.Fc=Number(e.nodeValue);if(e=h.getAttributeNode("bezierouttime"))y.Qd=
Number(e.nodeValue);if(e=h.getAttributeNode("bezieroutvalue"))y.Rd=Number(e.nodeValue)}this.C.ia.push(y)}h=h.nextSibling}this.yb==this.C.Ra&&(e=this.C.ia,this.Vf(e[0].value,e[1].value,e[2].value));this.Ha.push(this.C)}k=k.nextSibling}}"input"==c.nodeName&&(f||(f=c));if(f)for(k=0;6>k;k++)e=f.getAttributeNode("prev"+k+"url"),this.we[k]=e?String(e.nodeValue):"";"altinput"==c.nodeName&&(k=0,(e=c.getAttributeNode("screensize"))&&(k=1*e.nodeValue),0<k&&k<=this.Ij()&&k>g&&(g=k,f=c));if("control"==c.nodeName&&
this.ze){if(e=c.getAttributeNode("simulatemass"))this.ua.enabled=1==e.nodeValue;if(e=c.getAttributeNode("rubberband"))this.B.Mk=1==e.nodeValue;if(e=c.getAttributeNode("locked"))this.B.xb=1==e.nodeValue;e&&(this.B.Gf=1==e.nodeValue);if(e=c.getAttributeNode("lockedmouse"))this.B.xb=1==e.nodeValue;if(e=c.getAttributeNode("lockedkeyboard"))this.B.Gf=1==e.nodeValue;if(e=c.getAttributeNode("lockedkeyboardzoom"))this.B.pi=1==e.nodeValue;if(e=c.getAttributeNode("lockedwheel"))this.B.Tg=1==e.nodeValue;if(e=
c.getAttributeNode("invertwheel"))this.B.Yj=1==e.nodeValue;if(e=c.getAttributeNode("speedwheel"))this.B.Wk=1*e.nodeValue;if(e=c.getAttributeNode("invertcontrol"))this.B.kd=1==e.nodeValue;if(e=c.getAttributeNode("sensitivity"))this.B.sensitivity=1*e.nodeValue,1>this.B.sensitivity&&(this.B.sensitivity=1);if(e=c.getAttributeNode("dblclickfullscreen"))this.B.Sh=1==e.nodeValue;if(e=c.getAttributeNode("contextfullscreen"))this.B.hf=1==e.nodeValue;if(e=c.getAttributeNode("contextprojections"))this.B.ug=
1==e.nodeValue;if(e=c.getAttributeNode("hideabout"))this.B.yf=1==e.nodeValue;for(k=c.firstChild;k;)"menulink"==k.nodeName&&(h={text:"",url:""},e=k.getAttributeNode("text"),h.text=e.nodeValue,e=k.getAttributeNode("url"),h.url=e.nodeValue,this.Jf.push(h)),k=k.nextSibling}if("transition"==c.nodeName){if(e=c.getAttributeNode("enabled"))this.N.enabled=1==e.nodeValue;if(e=c.getAttributeNode("blendtime"))this.N.jj=e.nodeValue;if(e=c.getAttributeNode("blendcolor"))this.N.qg=e.nodeValue.toString();if(e=c.getAttributeNode("type"))this.N.type=
e.nodeValue.toString();if(e=c.getAttributeNode("softedge"))this.N.Xc=1*e.nodeValue;if(e=c.getAttributeNode("zoomin"))this.N.Ya=e.nodeValue;if(e=c.getAttributeNode("zoomout"))this.N.uc=e.nodeValue;if(e=c.getAttributeNode("zoomfov"))this.N.yh=e.nodeValue;if(e=c.getAttributeNode("zoomspeed"))this.N.Ze=e.nodeValue;if(e=c.getAttributeNode("zoomoutpause"))this.N.zh=1==e.nodeValue}if("soundstransition"==c.nodeName){if(e=c.getAttributeNode("enabled"))this.Ea.enabled=1==e.nodeValue;if(e=c.getAttributeNode("transitiontime"))this.Ea.lb=
1*e.nodeValue;if(e=c.getAttributeNode("crossfade"))this.Ea.qj=1==e.nodeValue}if("flyintransition"==c.nodeName){if(e=c.getAttributeNode("enabled"))this.pb.enabled=1==e.nodeValue&&this.ea;if(e=c.getAttributeNode("speed"))this.pb.speed=1*e.nodeValue}"userdata"==c.nodeName&&(this.userdata=this.Xe=this.Ag(c));if("hotspots"==c.nodeName)for(k=c.firstChild;k;){if("label"==k.nodeName&&this.ze){h=this.w.Ui;if(e=k.getAttributeNode("enabled"))h.enabled=1==e.nodeValue;if(e=k.getAttributeNode("width"))h.width=
1*e.nodeValue;if(e=k.getAttributeNode("height"))h.height=1*e.nodeValue;if(e=k.getAttributeNode("textcolor"))h.Vi=1*e.nodeValue;if(e=k.getAttributeNode("textalpha"))h.Ti=1*e.nodeValue;if(e=k.getAttributeNode("background"))h.background=1==e.nodeValue;if(e=k.getAttributeNode("backgroundalpha"))h.Nb=1*e.nodeValue;if(e=k.getAttributeNode("backgroundcolor"))h.Ob=1*e.nodeValue;if(e=k.getAttributeNode("border"))h.Hh=1*e.nodeValue;if(e=k.getAttributeNode("bordercolor"))h.Rb=1*e.nodeValue;if(e=k.getAttributeNode("borderalpha"))h.Qb=
1*e.nodeValue;if(e=k.getAttributeNode("borderradius"))h.Gh=1*e.nodeValue;if(e=k.getAttributeNode("wordwrap"))h.xh=1==e.nodeValue}if("polystyle"==k.nodeName&&this.ze){if(e=k.getAttributeNode("mode"))this.w.mode=1*e.nodeValue;if(e=k.getAttributeNode("bordercolor"))this.w.Rb=1*e.nodeValue;if(e=k.getAttributeNode("backgroundcolor"))this.w.Ob=1*e.nodeValue;if(e=k.getAttributeNode("borderalpha"))this.w.Qb=1*e.nodeValue;if(e=k.getAttributeNode("backgroundalpha"))this.w.Nb=1*e.nodeValue;if(e=k.getAttributeNode("handcursor"))this.w.Ce=
1==e.nodeValue}e=void 0;"hotspot"==k.nodeName&&(e=new m.Pg(this),e.type="point",e.Cb(k),this.P.push(e));"polyhotspot"==k.nodeName&&(e=new m.Pg(this),e.type="poly",e.Cb(k),this.P.push(e));k=k.nextSibling}if("sounds"==c.nodeName||"media"==c.nodeName)for(k=c.firstChild;k;)"sound"!=k.nodeName||this.vk||(e=new m.El(this),e.Cb(k),this.ub||e.addElement()),"video"==k.nodeName&&(e=new m.Nk(this),e.Cb(k),this.ub||e.addElement()),"image"==k.nodeName&&(e=new m.Cl(this),e.Cb(k),this.ub||e.addElement()),"lensflare"==
k.nodeName&&this.Ba&&(e=new m.Dl(this),e.Cb(k),this.Ba.Ff.push(e)),k=k.nextSibling;c=c.nextSibling}b&&""!=b&&(c=b.toString().split("/"),4<c.length&&this.Wc(Number(c[4])),0<c.length&&(e=String(c[0]),"N"==e.charAt(0)?this.Mi(Number(e.substr(1))):"S"==e.charAt(0)?this.Mi(-180+Number(e.substr(1))):this.gh(Number(e))),1<c.length&&this.hh(Number(c[1])),2<c.length&&this.Rf(Number(c[2])));if(f){for(k=0;6>k;k++)(e=f.getAttributeNode("tile"+k+"url"))&&(this.wg[k]=String(e.nodeValue)),e=f.getAttributeNode("tile"+
k+"url1");for(k=0;6>k;k++)(e=f.getAttributeNode("prev"+k+"url"))&&(this.we[k]=String(e.nodeValue));if(e=f.getAttributeNode("tilesize"))this.hc=1*e.nodeValue;if(e=f.getAttributeNode("canvassize"))this.df=Number(e.nodeValue);if(e=f.getAttributeNode("tilescale"))this.Re=1*e.nodeValue;if(e=f.getAttributeNode("leveltileurl"))this.g.nk=e.nodeValue;if(e=f.getAttributeNode("leveltilesize"))this.g.F=Number(e.nodeValue);if(e=f.getAttributeNode("levelbias"))this.g.lk=Number(e.nodeValue);if(e=f.getAttributeNode("levelbiashidpi"))this.g.mk=
Number(e.nodeValue);e=f.getAttributeNode("overlap");this.Ca.L=0;this.Ca.pitch=0;e&&(this.g.Ja=Number(e.nodeValue));if(e=f.getAttributeNode("levelingroll"))this.Ca.L=Number(e.nodeValue);if(e=f.getAttributeNode("levelingpitch"))this.Ca.pitch=Number(e.nodeValue);this.ib=0;(e=f.getAttributeNode("flat"))&&1==e.nodeValue&&(this.ib=2);e=f.getAttributeNode("width");this.g.width=1*(e?e.nodeValue:1);e=f.getAttributeNode("height");this.g.height=1*(e?e.nodeValue:this.g.width);this.o.src=[];this.g.H=[];for(k=
f.firstChild;k;){if("preview"==k.nodeName){if(e=k.getAttributeNode("color"))this.g.Ke=e.nodeValue;if(e=k.getAttributeNode("strip"))this.g.Bk=1==e.nodeValue}if("video"==k.nodeName){if(e=k.getAttributeNode("format"))"3x2"==e.nodeValue&&(this.o.format=14),"equirectangular"==e.nodeValue&&(this.o.format=1);if(e=k.getAttributeNode("flipy"))this.o.ai=Number(e.nodeValue);if(e=k.getAttributeNode("startmuted"))this.o.Zk=1==e.nodeValue;if(e=k.getAttributeNode("bleed"))this.o.pe=Number(e.nodeValue);if(e=k.getAttributeNode("endaction"))this.o.Vd=
String(e.nodeValue);if(e=k.getAttributeNode("width"))this.o.width=Number(e.nodeValue);if(e=k.getAttributeNode("height"))this.o.height=Number(e.nodeValue);for(f=k.firstChild;f;)"source"==f.nodeName&&(e=f.getAttributeNode("url"))&&this.o.src.push(e.nodeValue.toString()),f=f.nextSibling}if("level"==k.nodeName){f=new m.wk;e=k.getAttributeNode("width");f.width=1*(e?e.nodeValue:1);e=k.getAttributeNode("height");f.height=1*(e?e.nodeValue:f.width);if(e=k.getAttributeNode("preload"))f.cache=1==e.nodeValue;
if(e=k.getAttributeNode("preview"))f.Je=1==e.nodeValue;f.K=Math.floor((f.width+this.g.F-1)/this.g.F);f.da=Math.floor((f.height+this.g.F-1)/this.g.F);this.g.H.push(f)}k=k.nextSibling}this.g.mi=this.g.H.length}this.hg&&(this.ea=this.Cc=!1,this.Sb||(this.O("dummy rendering"),this.Sb=document.createElement("canvas"),this.Sb.width=100,this.Sb.height=100,this.Sb.id="dummycanvas",this.A.appendChild(this.Sb)),this.$c());this.ea&&this.G&&(this.la.Wj(this.Re),this.la.Xj());this.Cc&&(0<this.g.H.length?this.oj(!0):
this.oj(!1),this.Ef=0);var r=this;0<this.g.H.length&&this.g.Bk&&0==this.ib&&(c=new Image,f=new m.wk,f.Je=!0,f.cache=!0,f.K=f.da=0,f.height=f.width=0,this.g.H.push(f),c.crossOrigin=this.crossOrigin,c.onload=this.la.dn(c),c.setAttribute("src",this.ke(6,this.g.mi-1,0,0)));if(0<this.o.src.length&&this.ea)if(this.vh){this.o.a=document.createElement("video");this.o.a.crossOrigin=this.crossOrigin;this.o.a.setAttribute("style","display:none; max-width:none;");this.o.a.setAttribute("playsinline","playsinline");
this.$d&&this.Yh&&this.o.Zk&&this.o.a.setAttribute("muted","muted");this.o.a.b=!0;this.o.a.volume=this.V;this.U.appendChild(this.o.a);this.o.md=!1;this.o.bl=!1;this.o.a.oncanplay=function(){if(!r.o.md){r.o.Ng=!0;var a,b,c,d,e,f,g=[],h=new m.ra,k=r.G,l=r.o.a.videoWidth/3;r.o.width=r.o.a.videoWidth;r.o.height=r.o.a.videoHeight;for(a=0;6>a;a++)for(c=a%3*l+r.o.pe,e=c+l-2*r.o.pe,f=4,3>a&&(f+=l),d=f+l-2*r.o.pe,b=0;4>b;b++){h.x=-1;h.y=-1;h.z=1;for(var n=0;n<b;n++)h.Lk();g.push((0<h.x?c:e)/(3*l),(0<h.y?d:
f)/(2*l))}k.bindBuffer(k.ARRAY_BUFFER,r.o.lh);k.bufferData(k.ARRAY_BUFFER,new Float32Array(g),k.STATIC_DRAW)}};"exit"==this.o.Vd?this.o.a.onended=function(){r.o.Ng=!1;r.o.md=!1;r.U.removeChild(r.o.a);r.o.a=null;r.update()}:"stop"==this.o.Vd?r.o.a.onended=function(){r.update()}:"{"==this.o.Vd.charAt(0)?this.o.a.onended=function(){r.de(r.o.Vd,"$fwd")}:this.o.a.loop=!0;for(k=0;k<this.o.src.length;k++)f=document.createElement("source"),f.setAttribute("src",this.Vb(this.o.src[k])),this.o.a.appendChild(f);
f=this.Ib("_videopanorama");0<f.length?f[0].a=this.o.a:this.Ek("_videopanorama",this.o.a);this.o.a.play()}else"{"==this.o.Vd.charAt(0)&&r.de(r.o.Vd,"$fwd");this.ej();this.N.Ld||this.$k();this.update();this.ze&&(this.M&&this.M.ggViewerInit&&this.M.ggViewerInit(),this.pb.enabled&&0==this.ib&&this.ea&&(this.Wc(9),this.pan.c=this.kc.pan,this.j.c=this.kc.j,this.f.c=this.kc.f,this.Xa=this.kc.Ab,this.C=this.nf(!1),this.pan.c=this.C.ia[0].value,this.j.c=this.C.ia[1].value,this.f.c=this.C.ia[2].value,3==this.C.ia[3].tb&&
this.Wc(this.C.ia[3].value),this.yb=this.C.Ra,this.s.active=!1,this.s.Cg=!0));this.ze=!1;this.xf=!0;this.$c()};b.prototype.zi=function(a,b){0<a.length&&(".xml"==a.substr(a.length-4)||".swf"==a.substr(a.length-4)||"{"==a.charAt(0)?this.de(this.Vb(a),b):window.open(this.Vb(a),b))};b.prototype.io=function(){this.xf=this.isLoaded=!1;this.checkLoaded=this.Gb=[];this.Zg=0;this.M&&this.M.ggReLoaded&&this.M.ggReLoaded()};b.prototype.de=function(a,b){if(""!=a&&"{}"!=a){this.io();this.Oa&&this.Oa.hotspotProxyOut&&
this.Oa.hotspotProxyOut(this.za.id);".swf"==a.substr(a.length-4)&&(a=a.substr(0,a.length-4)+".xml");var c="";b&&(c=b.toString());c=c.replace("$cur",this.pan.c+"/"+this.j.c+"/"+this.f.c+"//"+this.ya());c=c.replace("$fwd","N"+this.Fg()+"/"+this.j.c+"/"+this.f.c+"//"+this.ya());c=c.replace("$bwd","S"+this.Fg()+"/"+this.j.c+"/"+this.f.c+"//"+this.ya());c=c.replace("$ap",String(this.pan.c));c=c.replace("$an",String(this.Fg()));c=c.replace("$at",String(this.j.c));c=c.replace("$af",String(this.f.c));c=c.replace("$ar",
String(this.ya()));if(""!=c){var e=c.split("/");3<e.length&&""!=e[3]&&(this.startNode=e[3])}this.pa();if("{"==a.charAt(0)){var e=a.substr(1,a.length-2),f;for(f in this.jg)if(this.jg[f].customnodeid==e){e=f;break}f=this.N;var g=this.G;if(this.Te[e]){if(this.N.enabled&&this.ea&&this.N.Mb){f.Ue||f.Ld||(f.ui=this.B.xb,f.cj=this.B.Tg,f.ki=this.B.Gf,this.Tf(!0),this.Uf(!0),this.Sf(!0));var h;"wipeleftright"==f.type?h=1:"wiperightleft"==f.type?h=2:"wipetopbottom"==f.type?h=3:"wipebottomtop"==f.type?h=4:
"wiperandom"==f.type&&(h=Math.ceil(4*Math.random()));f.Rh=h;g.bindFramebuffer(g.FRAMEBUFFER,f.Mb);g.viewport(0,0,f.Mb.width,f.Mb.height);g.clear(g.COLOR_BUFFER_BIT|g.DEPTH_BUFFER_BIT);f.dg=!0;this.gg();f.dg=!1;g.bindFramebuffer(g.FRAMEBUFFER,null);g.viewport(0,0,this.hb.width,this.hb.height);h=new Date;this.za!=this.ob?(f.ng=this.za.fc/this.m.width,f.og=1-this.za.Bb/this.m.height):(f.ng=.5,f.og=.5);1!=f.Ya&&2!=f.Ya?(f.Qi=h.getTime(),f.Ue=!0):(f.ul=h.getTime(),f.Ld=!0,f.mb=Math.sin(this.Jb()/2*Math.PI/
180)/Math.sin(f.yh/2*Math.PI/180),f.mb=Math.max(f.mb,1),f.tl=1/f.Ze*f.mb*.3)}this.Ei(this.Te[e],c);this.Jh(a);f.enabled&&this.ea&&0!=f.uc&&(f.ie=this.ci(),f.je=this.ei(),f.vd=this.Jb(),f.Yc=this.ya(),1==f.uc||3==f.uc?this.Xf(f.yh):2==f.uc?this.Xf(this.pf()+(this.pf()-f.yh)):4==f.uc&&(this.Wc(this.kc.Ab),this.gh(this.kc.pan),this.hh(this.kc.j),this.Xf(this.kc.f)),f.zh||1==f.Ya||2==f.Ya||(4==f.uc?(this.C=this.nf(!0,f.ie,f.je,f.vd),this.yb=this.C.Ra,this.s.active=!0,this.pb.sd=!0):this.moveTo(f.ie,f.je,
f.vd,f.Ze,0,f.Yc)));this.ga&&this.ga.openNext(a,c)}else{this.Uc("invalid node id: "+e);return}}else this.Ck(a,null,c);this.update(5)}};b.prototype.wm=function(){return this.Bf?this.Ka.slice(0):[""]};b.prototype.Ag=function(a){var b,c;c=[];c.title="";c.description="";c.author="";c.datetime="";c.copyright="";c.source="";c.information="";c.comment="";c.latitude=0;c.longitude=0;c.customnodeid="";c.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("customnodeid"))&&(c.customnodeid=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};b.prototype.bi=function(a){return a?this.jg[a]?this.jg[a]:this.Ag():this.Xe};b.prototype.xm=function(a){a=this.bi(a);var b=[];""!=a.latitude&&0!=a.latitude&&0!=a.longitude&&(b.push(a.latitude),
b.push(a.longitude));return b};b.prototype.ym=function(a){return this.bi(a).title};b.prototype.Be=function(a,b){var c;for(c=0;c<this.C.ia.length;c++)if(this.C.ia[c].time==a&&this.C.ia[c].tb==b)return this.C.ia[c];return!1};b.prototype.vm=function(a){var b,c=1E5,e=a,f=!1;for(b=0;b<this.C.ia.length;b++)this.C.ia[b].tb==a.tb&&this.C.ia[b].time>a.time&&this.C.ia[b].time<c&&(e=this.C.ia[b],c=e.time,f=!0);return f?e:!1};b.prototype.nf=function(a,b,c,e){for(var f=0;f<this.Ha.length;f++)if(this.Ha[f].Ra&&
0==this.Ha[f].Ra.indexOf("__FlyIn"))return this.Ha[f];f=new m.ek;f.Ra="__FlyIn";f.Zf=this.pan.c;f.ag=this.j.c;f.ud=this.f.c;f.$f=this.Xa;f.Yc=this.Yg;a?(f.xe=!1,f.Td=!1,f.speed=this.N.Ze,f.Jd=b,f.Kd=c,f.Qe=e):(f.xe=!0,f.Td=!0,f.speed=this.pb.speed,f.Jd=this.pan.Na,f.Kd=this.j.Na,f.Qe=this.f.Na);return this.Ej(f)};b.prototype.Ej=function(a){var b=new m.pk;b.Ra=a.Ra;b.ia=[];var c=a.$f!=a.Yc&&-1!=a.Yc,e=a.Jd-a.Zf;if(360==this.pan.max-this.pan.min){for(;-360>e;)e+=360;for(;360<e;)e-=360}var f=a.Kd-a.ag,
g=a.Qe-a.ud,h=Math.round(Math.sqrt(e*e+f*f+g*g)/a.speed*.33);c&&(h=Math.max(10,h));b.length=h;var w,y;a.Ud&&(w=Math.ceil(.7*h),w=Math.min(15,w),w=Math.max(5,w),b.length=h+w,y=.33*w);var n=a.Qe,r=h,p=0,u=h-1;if(c){var t=a.ud,v;4==a.Yc?v=120:v=this.qf(a.Yc);var n=a.Qe,g=n-a.ud,q=new m.jc(0,a.ud),x=new m.jc(h,n),B=new m.jc,A=new m.jc;A.Wa(h/3,a.ud+g/3);B.Wa(2*h/3,n-g/3);if(t>v)for(;p<=h&&t>v;)t=new m.jc,t.Fh(q,x,A,B,p),t=t.y,p++;else p=1;p>=.8*h&&(r=p=Math.round(.8*h));0==p&&(p=1);var z;4==a.$f?z=120:
z=this.qf(a.$f);v=a.Qe;if(v>z)for(;u>p&&v>z;)t=new m.jc,t.Fh(q,x,A,B,u),v=t.y,u--}q=new m.wc;q.time=0;q.tb=0;q.value=a.Zf;q.type=1;q.Qd=h/3;q.Rd=a.xe?a.Zf:a.Zf+e/3;b.ia.push(q);q=new m.wc;q.time=0;q.tb=1;q.value=a.ag;q.type=1;q.Qd=h/3;q.Rd=a.xe?a.ag:a.ag+f/3;b.ia.push(q);q=new m.wc;q.time=0;q.tb=2;q.value=a.ud;q.type=1;q.Qd=h/3;q.Rd=a.xe?a.ud:a.ud+g/3;b.ia.push(q);q=new m.wc;q.time=0;q.tb=3;q.value=a.$f;q.type=0;q.lb=0;b.ia.push(q);c&&(q=new m.wc,q.time=p,q.tb=3,q.value=a.Yc,q.type=0,q.lb=u-p,b.ia.push(q));
q=new m.wc;q.time=h;q.tb=0;q.value=a.Jd;q.type=1;q.Pd=2*h/3;a.Td&&!a.Ud?q.Fc=a.Jd:q.Fc=a.Jd-e/3;a.Ud&&(q.Qd=h+y,q.Rd=q.value+y/h*e);b.ia.push(q);q=new m.wc;q.time=h;q.tb=1;q.value=a.Kd;q.type=1;q.Pd=2*h/3;a.Td&&!a.Ud?q.Fc=a.Kd:q.Fc=a.Kd-f/3;a.Ud&&(q.Qd=h+y,q.Rd=q.value+y/h*f);b.ia.push(q);q=new m.wc;q.time=r;q.tb=2;q.value=n;q.type=1;q.Pd=2*r/3;a.Td?q.Fc=n:q.Fc=n-g/3;b.ia.push(q);a.Ud&&(q=new m.wc,q.time=h+w,q.tb=0,q.value=a.Jd,q.type=1,q.Pd=h+w-y,q.Fc=a.Jd,b.ia.push(q),q=new m.wc,q.time=h+w,q.tb=
1,q.value=a.Kd,q.type=1,q.Pd=h+w-y,q.Fc=a.Kd,b.ia.push(q));this.Ha.push(b);return b};b.prototype.Go=function(){this.o.a&&this.o.a.play()};b.prototype.Ho=function(){this.o.a&&(this.o.a.pause(),this.o.a.currentTime=0)};b.prototype.Fo=function(){this.o.a&&this.o.a.pause()};b.prototype.Wn=function(a){this.o.a&&(0>a&&(a=0),a>this.o.a.duration&&(a=this.o.a.duration-.1),this.o.a.currentTime=a,this.update())};b.prototype.Km=function(){return this.o.a?this.o.a.currentTime:0};b.prototype.Jm=function(){if(this.o.a)return this.o.a};
b.prototype.Vn=function(a){if(this.o.a){var b=!this.o.a.paused&&!this.o.a.ended,c=this.o.a.currentTime;this.o.a.pause();isNaN(parseInt(a,10))?this.o.a.src=String(a):this.o.a.src=this.o.src[parseInt(a,10)];b&&(this.o.a.onloadedmetadata=function(){this.currentTime=c;this.play();this.onloadedmetadata=null});this.o.a.currentTime=c}};b.prototype.cm=function(){this.vk=!0};return b}();m.b=h})(ggP2VR||(ggP2VR={}));window.ggHasHtml5Css3D=G;window.ggHasWebGL=N;window.pano2vrPlayer=ggP2VR.b;
ggP2VR.b.prototype.readConfigString=ggP2VR.b.prototype.Fi;ggP2VR.b.prototype.readConfigUrl=ggP2VR.b.prototype.Ck;ggP2VR.b.prototype.readConfigUrlAsync=ggP2VR.b.prototype.wn;ggP2VR.b.prototype.readConfigXml=ggP2VR.b.prototype.Dk;ggP2VR.b.prototype.openUrl=ggP2VR.b.prototype.zi;ggP2VR.b.prototype.openNext=ggP2VR.b.prototype.de;ggP2VR.b.prototype.setMargins=ggP2VR.b.prototype.Kn;ggP2VR.b.prototype.addListener=ggP2VR.b.prototype.addListener;ggP2VR.b.prototype.removeEventListener=ggP2VR.b.prototype.removeEventListener;
ggP2VR.b.prototype.detectBrowser=ggP2VR.b.prototype.uj;ggP2VR.b.prototype.initWebGL=ggP2VR.b.prototype.zc;ggP2VR.b.prototype.getPercentLoaded=ggP2VR.b.prototype.Bm;ggP2VR.b.prototype.setBasePath=ggP2VR.b.prototype.Dn;ggP2VR.b.prototype.getBasePath=ggP2VR.b.prototype.jm;ggP2VR.b.prototype.setViewerSize=ggP2VR.b.prototype.Rk;ggP2VR.b.prototype.getViewerSize=ggP2VR.b.prototype.Nm;ggP2VR.b.prototype.setSkinObject=ggP2VR.b.prototype.Un;ggP2VR.b.prototype.changeViewMode=ggP2VR.b.prototype.Ul;
ggP2VR.b.prototype.getViewMode=ggP2VR.b.prototype.Lm;ggP2VR.b.prototype.changePolygonMode=ggP2VR.b.prototype.mj;ggP2VR.b.prototype.setPolygonMode=ggP2VR.b.prototype.mj;ggP2VR.b.prototype.getPolygonMode=ggP2VR.b.prototype.Dm;ggP2VR.b.prototype.showOnePolyHotspot=ggP2VR.b.prototype.Tk;ggP2VR.b.prototype.hideOnePolyHotspot=ggP2VR.b.prototype.Sj;ggP2VR.b.prototype.changePolyHotspotColor=ggP2VR.b.prototype.Sl;ggP2VR.b.prototype.toggleOnePolyHotspot=ggP2VR.b.prototype.po;
ggP2VR.b.prototype.changeViewState=ggP2VR.b.prototype.Vl;ggP2VR.b.prototype.getViewState=ggP2VR.b.prototype.Mm;ggP2VR.b.prototype.setRenderFlags=ggP2VR.b.prototype.Mn;ggP2VR.b.prototype.getRenderFlags=ggP2VR.b.prototype.Gm;ggP2VR.b.prototype.setMaxTileCount=ggP2VR.b.prototype.Pk;ggP2VR.b.prototype.getVFov=ggP2VR.b.prototype.Jb;ggP2VR.b.prototype.setVFov=ggP2VR.b.prototype.Xf;ggP2VR.b.prototype.getHFov=ggP2VR.b.prototype.mm;ggP2VR.b.prototype.updatePanorama=ggP2VR.b.prototype.gg;
ggP2VR.b.prototype.isTouching=ggP2VR.b.prototype.Tm;ggP2VR.b.prototype.getIsMobile=ggP2VR.b.prototype.qm;ggP2VR.b.prototype.setIsMobile=ggP2VR.b.prototype.In;ggP2VR.b.prototype.getIsAutorotating=ggP2VR.b.prototype.om;ggP2VR.b.prototype.getIsLoaded=ggP2VR.b.prototype.Eg;ggP2VR.b.prototype.getIsTileLoading=ggP2VR.b.prototype.rm;ggP2VR.b.prototype.getLastActivity=ggP2VR.b.prototype.sm;ggP2VR.b.prototype.getPan=ggP2VR.b.prototype.ci;ggP2VR.b.prototype.getPanNorth=ggP2VR.b.prototype.Fg;
ggP2VR.b.prototype.getPanDest=ggP2VR.b.prototype.zm;ggP2VR.b.prototype.getPanN=ggP2VR.b.prototype.Am;ggP2VR.b.prototype.setPan=ggP2VR.b.prototype.gh;ggP2VR.b.prototype.setPanNorth=ggP2VR.b.prototype.Mi;ggP2VR.b.prototype.changePan=ggP2VR.b.prototype.rg;ggP2VR.b.prototype.changePanLog=ggP2VR.b.prototype.Rl;ggP2VR.b.prototype.getTilt=ggP2VR.b.prototype.ei;ggP2VR.b.prototype.getTiltDest=ggP2VR.b.prototype.Im;ggP2VR.b.prototype.setTilt=ggP2VR.b.prototype.hh;ggP2VR.b.prototype.changeTilt=ggP2VR.b.prototype.sg;
ggP2VR.b.prototype.changeTiltLog=ggP2VR.b.prototype.Tl;ggP2VR.b.prototype.getFov=ggP2VR.b.prototype.pf;ggP2VR.b.prototype.getFovDest=ggP2VR.b.prototype.lm;ggP2VR.b.prototype.setFov=ggP2VR.b.prototype.Rf;ggP2VR.b.prototype.changeFov=ggP2VR.b.prototype.lj;ggP2VR.b.prototype.changeFovLog=ggP2VR.b.prototype.ef;ggP2VR.b.prototype.getRoll=ggP2VR.b.prototype.Hm;ggP2VR.b.prototype.setRoll=ggP2VR.b.prototype.Nn;ggP2VR.b.prototype.setPanTilt=ggP2VR.b.prototype.Ln;ggP2VR.b.prototype.setPanTiltFov=ggP2VR.b.prototype.Vf;
ggP2VR.b.prototype.setDefaultView=ggP2VR.b.prototype.Fn;ggP2VR.b.prototype.setLocked=ggP2VR.b.prototype.Jn;ggP2VR.b.prototype.setLockedMouse=ggP2VR.b.prototype.Tf;ggP2VR.b.prototype.setLockedKeyboard=ggP2VR.b.prototype.Sf;ggP2VR.b.prototype.setLockedWheel=ggP2VR.b.prototype.Uf;ggP2VR.b.prototype.moveTo=ggP2VR.b.prototype.moveTo;ggP2VR.b.prototype.moveToEx=ggP2VR.b.prototype.Ug;ggP2VR.b.prototype.moveToDefaultView=ggP2VR.b.prototype.$m;ggP2VR.b.prototype.moveToDefaultViewEx=ggP2VR.b.prototype.an;
ggP2VR.b.prototype.addHotspotElements=ggP2VR.b.prototype.ej;ggP2VR.b.prototype.playSound=ggP2VR.b.prototype.fe;ggP2VR.b.prototype.playPauseSound=ggP2VR.b.prototype.Ak;ggP2VR.b.prototype.playStopSound=ggP2VR.b.prototype.un;ggP2VR.b.prototype.pauseSound=ggP2VR.b.prototype.Bi;ggP2VR.b.prototype.activateSound=ggP2VR.b.prototype.Gl;ggP2VR.b.prototype.soundGetTime=ggP2VR.b.prototype.bo;ggP2VR.b.prototype.soundSetTime=ggP2VR.b.prototype.co;ggP2VR.b.prototype.isPlaying=ggP2VR.b.prototype.Tc;
ggP2VR.b.prototype.stopSound=ggP2VR.b.prototype.al;ggP2VR.b.prototype.setVolume=ggP2VR.b.prototype.Xn;ggP2VR.b.prototype.changeVolume=ggP2VR.b.prototype.Wl;ggP2VR.b.prototype.removeHotspots=ggP2VR.b.prototype.Ik;ggP2VR.b.prototype.addHotspot=ggP2VR.b.prototype.Hl;ggP2VR.b.prototype.updateHotspot=ggP2VR.b.prototype.xo;ggP2VR.b.prototype.removeHotspot=ggP2VR.b.prototype.xn;ggP2VR.b.prototype.setActiveHotspot=ggP2VR.b.prototype.Oe;ggP2VR.b.prototype.getPointHotspotIds=ggP2VR.b.prototype.Cm;
ggP2VR.b.prototype.getHotspot=ggP2VR.b.prototype.nm;ggP2VR.b.prototype.setFullscreen=ggP2VR.b.prototype.Pe;ggP2VR.b.prototype.toggleFullscreen=ggP2VR.b.prototype.ph;ggP2VR.b.prototype.enterFullscreen=ggP2VR.b.prototype.dm;ggP2VR.b.prototype.exitFullscreen=ggP2VR.b.prototype.exitFullscreen;ggP2VR.b.prototype.getIsFullscreen=ggP2VR.b.prototype.pm;ggP2VR.b.prototype.startAutorotate=ggP2VR.b.prototype.Xk;ggP2VR.b.prototype.stopAutorotate=ggP2VR.b.prototype.ko;ggP2VR.b.prototype.toggleAutorotate=ggP2VR.b.prototype.oo;
ggP2VR.b.prototype.startAnimation=ggP2VR.b.prototype.ho;ggP2VR.b.prototype.createLayers=ggP2VR.b.prototype.pj;ggP2VR.b.prototype.removePanorama=ggP2VR.b.prototype.dh;ggP2VR.b.prototype.getScreenResolution=ggP2VR.b.prototype.Mj;ggP2VR.b.prototype.getMaxScreenResolution=ggP2VR.b.prototype.Ij;ggP2VR.b.prototype.getNodeIds=ggP2VR.b.prototype.wm;ggP2VR.b.prototype.getNodeUserdata=ggP2VR.b.prototype.bi;ggP2VR.b.prototype.getNodeLatLng=ggP2VR.b.prototype.xm;ggP2VR.b.prototype.getNodeTitle=ggP2VR.b.prototype.ym;
ggP2VR.b.prototype.getCurrentNode=ggP2VR.b.prototype.Hj;ggP2VR.b.prototype.getNextNode=ggP2VR.b.prototype.Jj;ggP2VR.b.prototype.getPrevNode=ggP2VR.b.prototype.Fm;ggP2VR.b.prototype.getLastVisitedNode=ggP2VR.b.prototype.tm;ggP2VR.b.prototype.getCurrentPointHotspots=ggP2VR.b.prototype.km;ggP2VR.b.prototype.getPositionAngles=ggP2VR.b.prototype.Em;ggP2VR.b.prototype.getPositionRawAngles=ggP2VR.b.prototype.Kj;ggP2VR.b.prototype.nodeVisited=ggP2VR.b.prototype.en;ggP2VR.b.prototype.setElementIdPrefix=ggP2VR.b.prototype.Gn;
ggP2VR.b.prototype.videoPanoPlay=ggP2VR.b.prototype.Go;ggP2VR.b.prototype.videoPanoStop=ggP2VR.b.prototype.Ho;ggP2VR.b.prototype.videoPanoPause=ggP2VR.b.prototype.Fo;ggP2VR.b.prototype.getVideoPanoTime=ggP2VR.b.prototype.Km;ggP2VR.b.prototype.setVideoPanoTime=ggP2VR.b.prototype.Wn;ggP2VR.b.prototype.getVideoPanoObject=ggP2VR.b.prototype.Jm;ggP2VR.b.prototype.setVideoPanoSource=ggP2VR.b.prototype.Vn;ggP2VR.b.prototype.getMediaObject=ggP2VR.b.prototype.um;ggP2VR.b.prototype.registerVideoElement=ggP2VR.b.prototype.Ek;
ggP2VR.b.prototype.disableSoundLoading=ggP2VR.b.prototype.cm;ggP2VR.b.prototype.setCrossOrigin=ggP2VR.b.prototype.En;ggP2VR.b.prototype.setProjection=ggP2VR.b.prototype.Wc;ggP2VR.b.prototype.getProjection=ggP2VR.b.prototype.ya;ggP2VR.b.prototype.changeProjection=ggP2VR.b.prototype.Kh;ggP2VR.b.prototype.changeProjectionEx=ggP2VR.b.prototype.Kh;ggP2VR.b.prototype.changeLensflares=ggP2VR.b.prototype.Ql;