1window.libpannellum=function(e,t,a){function o(o){function h(e,t){return 1==e.level&&1!=t.level?-1:1==t.level&&1!=e.level?1:t.timestamp-e.timestamp}function c(e,t){return e.level!=t.level?e.level-t.level:e.diff-t.diff}function u(e,t,a,o,n,i){this.vertices=e,this.side=t,this.level=a,this.x=o,this.y=n,this.path=i.replace("%s",t).replace("%l",a).replace("%x",o).replace("%y",n)}function d(e,t,a,o,n){var i;i=v(e,(l=t.vertices).slice(0,3));var r=v(e,l.slice(3,6)),s=v(e,l.slice(6,9)),l=v(e,l.slice(9,12)),h=i[0]+r[0]+s[0]+l[0];if(-4==h||4==h?i=!1:i=-4!=(h=i[1]+r[1]+s[1]+l[1])&&4!=h&&4!=i[2]+r[2]+s[2]+l[2],i){for(r=(i=t.vertices)[0]+i[3]+i[6]+i[9],s=i[1]+i[4]+i[7]+i[10],l=i[2]+i[5]+i[8]+i[11],h=Math.sqrt(r*r+s*s+l*l),l=Math.asin(l/h),r=Math.atan2(s,r)-o,r+=r>Math.PI?-2*Math.PI:r<-Math.PI?2*Math.PI:0,r=Math.abs(r),t.diff=Math.acos(Math.sin(a)*Math.sin(l)+Math.cos(a)*Math.cos(l)*Math.cos(r)),r=!1,s=0;s<g.nodeCache.length;s++)if(g.nodeCache[s].path==t.path){r=!0,g.nodeCache[s].timestamp=g.nodeCacheTimestamp++,g.nodeCache[s].diff=t.diff,g.currentNodes.push(g.nodeCache[s]);break}if(r||(t.timestamp=g.nodeCacheTimestamp++,g.currentNodes.push(t),g.nodeCache.push(t)),t.level<g.level){l=R.cubeResolution*Math.pow(2,t.level-R.maxLevel),r=Math.ceil(l*R.invTileResolution)-1,s=l%R.tileResolution*2;var c=2*l%R.tileResolution;0===c&&(c=R.tileResolution),0===s&&(s=2*R.tileResolution),h=.5,t.x!=r&&t.y!=r||(h=1-R.tileResolution/(R.tileResolution+c));var f=1-h,m=(l=[],h),p=h,y=h,w=f,x=f,b=f;for(c<R.tileResolution&&(t.x==r&&t.y!=r?(x=p=.5,("d"==t.side||"u"==t.side)&&(b=y=.5)):t.x!=r&&t.y==r&&(w=m=.5,"l"==t.side||"r"==t.side)&&(b=y=.5)),s<=R.tileResolution&&(t.x==r&&(m=0,w=1,"l"==t.side||"r"==t.side)&&(y=0,b=1),t.y==r&&(p=0,x=1,"d"==t.side||"u"==t.side)&&(y=0,b=1)),c=new u(c=[i[0],i[1],i[2],i[0]*m+i[3]*w,i[1]*h+i[4]*f,i[2]*y+i[5]*b,i[0]*m+i[6]*w,i[1]*p+i[7]*x,i[2]*y+i[8]*b,i[0]*h+i[9]*f,i[1]*p+i[10]*x,i[2]*y+i[11]*b],t.side,t.level+1,2*t.x,2*t.y,R.fullpath),l.push(c),t.x==r&&s<=R.tileResolution||(c=new u(c=[i[0]*m+i[3]*w,i[1]*h+i[4]*f,i[2]*y+i[5]*b,i[3],i[4],i[5],i[3]*h+i[6]*f,i[4]*p+i[7]*x,i[5]*y+i[8]*b,i[0]*m+i[6]*w,i[1]*p+i[7]*x,i[2]*y+i[8]*b],t.side,t.level+1,2*t.x+1,2*t.y,R.fullpath),l.push(c)),t.x==r&&s<=R.tileResolution||t.y==r&&s<=R.tileResolution||(c=new u(c=[i[0]*m+i[6]*w,i[1]*p+i[7]*x,i[2]*y+i[8]*b,i[3]*h+i[6]*f,i[4]*p+i[7]*x,i[5]*y+i[8]*b,i[6],i[7],i[8],i[9]*m+i[6]*w,i[10]*h+i[7]*f,i[11]*y+i[8]*b],t.side,t.level+1,2*t.x+1,2*t.y+1,R.fullpath),l.push(c)),t.y==r&&s<=R.tileResolution||(c=new u(c=[i[0]*h+i[9]*f,i[1]*p+i[10]*x,i[2]*y+i[11]*b,i[0]*m+i[6]*w,i[1]*p+i[7]*x,i[2]*y+i[8]*b,i[9]*m+i[6]*w,i[10]*h+i[7]*f,i[11]*y+i[8]*b,i[9],i[10],i[11]],t.side,t.level+1,2*t.x,2*t.y+1,R.fullpath),l.push(c)),t=0;t<l.length;t++)d(e,l[t],a,o,n)}}}function f(e,t,a){var o=Math.sin(t);return t=Math.cos(t),"x"==a?[e[0],t*e[1]+o*e[2],t*e[2]-o*e[1],e[3],t*e[4]+o*e[5],t*e[5]-o*e[4],e[6],t*e[7]+o*e[8],t*e[8]-o*e[7]]:"y"==a?[t*e[0]-o*e[2],e[1],t*e[2]+o*e[0],t*e[3]-o*e[5],e[4],t*e[5]+o*e[3],t*e[6]-o*e[8],e[7],t*e[8]+o*e[6]]:"z"==a?[t*e[0]+o*e[1],t*e[1]-o*e[0],e[2],t*e[3]+o*e[4],t*e[4]-o*e[3],e[5],t*e[6]+o*e[7],t*e[7]-o*e[6],e[8]]:void 0}function m(e){return[e[0],e[4],e[8],e[12],e[1],e[5],e[9],e[13],e[2],e[6],e[10],e[14],e[3],e[7],e[11],e[15]]}function p(e){e.textureLoad||(e.textureLoad=!0,S(encodeURI(e.path+"."+R.extension),(function(t){e.texture=t,e.textureLoaded=!0})))}function v(e,t){var a=(n=[e[0]*t[0]+e[1]*t[1]+e[2]*t[2],e[4]*t[0]+e[5]*t[1]+e[6]*t[2],e[11]+e[8]*t[0]+e[9]*t[1]+e[10]*t[2],1/(e[12]*t[0]+e[13]*t[1]+e[14]*t[2])])[0]*n[3],o=n[1]*n[3],n=n[2]*n[3],i=[0,0,0];return-1>a&&(i[0]=-1),1<a&&(i[0]=1),-1>o&&(i[1]=-1),1<o&&(i[1]=1),(-1>n||1<n)&&(i[2]=1),i}var g,y,w,x,b,E,M,P,R,_,T,L,I,C,A,D=t.createElement("canvas");D.style.width=D.style.height="100%",o.appendChild(D),this.init=function(e,h,c,u,d,f,m,p){if(typeof h===a&&(h="equirectangular"),_=h,R=e,T=c,g){if(w&&(y.detachShader(g,w),y.deleteShader(w)),x&&(y.detachShader(g,x),y.deleteShader(x)),y.bindBuffer(y.ARRAY_BUFFER,null),y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,null),g.texture&&y.deleteTexture(g.texture),g.nodeCache)for(e=0;
1e<g.nodeCache.length;e++)y.deleteTexture(g.nodeCache[e].texture);y.deleteProgram(g),g=a}if(P=a,"cubemap"==_&&0!=(R[0].width&R[0].width-1)&&(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))||y||(y=D.getContext("experimental-webgl",{alpha:!1,depth:!1})),!y&&("multires"==_&&R.hasOwnProperty("fallbackPath")||"cubemap"==_)&&("WebkitAppearance"in t.documentElement.style||navigator.userAgent.match(/Trident.*rv[ :]*11\./)||-1!==navigator.appVersion.indexOf("MSIE 10"))){E&&o.removeChild(E),(E=t.createElement("div")).className="pnlm-world",u=R.basePath?R.basePath+R.fallbackPath:R.fallbackPath;var v="frblud".split(""),S=0;for(d=function(){var e=t.createElement("canvas");e.className="pnlm-face pnlm-"+v[this.side]+"face",E.appendChild(e);var a=e.getContext("2d");e.style.width=this.width+4+"px",e.style.height=this.height+4+"px",e.width=this.width+4,e.height=this.height+4,a.drawImage(this,2,2);var n,i,r=a.getImageData(0,0,e.width,e.height),s=r.data;for(n=2;n<e.width-2;n++)for(i=0;4>i;i++)s[4*(n+e.width)+i]=s[4*(n+2*e.width)+i],s[4*(n+e.width*(e.height-2))+i]=s[4*(n+e.width*(e.height-3))+i];for(n=2;n<e.height-2;n++)for(i=0;4>i;i++)s[4*(n*e.width+1)+i]=s[4*(n*e.width+2)+i],s[4*((n+1)*e.width-2)+i]=s[4*((n+1)*e.width-3)+i];for(i=0;4>i;i++)s[4*(e.width+1)+i]=s[4*(2*e.width+2)+i],s[4*(2*e.width-2)+i]=s[4*(3*e.width-3)+i],s[4*(e.width*(e.height-2)+1)+i]=s[4*(e.width*(e.height-3)+2)+i],s[4*(e.width*(e.height-1)-2)+i]=s[4*(e.width*(e.height-2)-3)+i];for(n=1;n<e.width-1;n++)for(i=0;4>i;i++)s[4*n+i]=s[4*(n+e.width)+i],s[4*(n+e.width*(e.height-1))+i]=s[4*(n+e.width*(e.height-2))+i];for(n=1;n<e.height-1;n++)for(i=0;4>i;i++)s[n*e.width*4+i]=s[4*(n*e.width+1)+i],s[4*((n+1)*e.width-1)+i]=s[4*((n+1)*e.width-2)+i];for(i=0;4>i;i++)s[i]=s[4*(e.width+1)+i],s[4*(e.width-1)+i]=s[4*(2*e.width-2)+i],s[e.width*(e.height-1)*4+i]=s[4*(e.width*(e.height-2)+1)+i],s[4*(e.width*e.height-1)+i]=s[4*(e.width*(e.height-1)-2)+i];a.putImageData(r,0,0),6==++S&&(b=this.width,o.appendChild(E),m())},e=0;6>e;e++)(f=new Image).crossOrigin="anonymous",f.side=e,f.onload=d,f.src="multires"==_?encodeURI(u.replace("%s",v[e])+"."+R.extension):encodeURI(R[e].src)}else{if(!y)throw console.log("Error: no WebGL support detected!"),{type:"no webgl"};for(R.fullpath=R.basePath?R.basePath+R.path:R.path,R.invTileResolution=1/R.tileResolution,h=[-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1],M=[],e=0;6>e;e++)M[e]=h.slice(12*e,12*e+12),h=[-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1];if("equirectangular"==_){if((e=Math.max(R.width,R.height))>(h=y.getParameter(y.MAX_TEXTURE_SIZE)))throw console.log("Error: The image is too big; it's "+e+"px wide, but this device's maximum supported width is "+h+"px."),{type:"webgl size error",width:e,maxWidth:h}}else if("cubemap"==_&&(e=R[0].width)>(h=y.getParameter(y.MAX_CUBE_MAP_TEXTURE_SIZE)))throw console.log("Error: The cube face image is too big; it's "+e+"px wide, but this device's maximum supported width is "+h+"px."),{type:"webgl size error",width:e,maxWidth:h};if(p===a||p.horizonPitch===a&&p.horizonRoll===a||(P=[p.horizonPitch==a?0:p.horizonPitch,p.horizonRoll==a?0:p.horizonRoll]),e=y.TEXTURE_2D,y.viewport(0,0,D.width,D.height),w=y.createShader(y.VERTEX_SHADER),h=n,"multires"==_&&(h=i),y.shaderSource(w,h),y.compileShader(w),x=y.createShader(y.FRAGMENT_SHADER),h=s,"cubemap"==_?(e=y.TEXTURE_CUBE_MAP,h=r):"multires"==_&&(h=l),y.shaderSource(x,h),y.compileShader(x),g=y.createProgram(),y.attachShader(g,w),y.attachShader(g,x),y.linkProgram(g),y.getShaderParameter(w,y.COMPILE_STATUS)||console.log(y.getShaderInfoLog(w)),y.getShaderParameter(x,y.COMPILE_STATUS)||console.log(y.getShaderInfoLog(x)),y.getProgramParameter(g,y.LINK_STATUS)||console.log(y.getProgramInfoLog(g)),y.useProgram(g),g.drawInProgress=!1,g.texCoordLocation=y.getAttribLocation(g,"a_texCoord"),y.enableVertexAttribArray(g.texCoordLocation),"multires"!=_?(L||(L=y.createBuffer()),y.bindBuffer(y.ARRAY_BUFFER,L),y.bufferData(y.ARRAY_BUFFER,new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),y.STATIC_DRAW),y.vertexAttribPointer(g.texCoordLocation,2,y.FLOAT,!1,0,0),g.aspectRatio=y.getUniformLocation(g,"u_aspectRatio"),y.uniform1f(g.aspectRatio,D.width/D.height),g.psi=y.getUniformLocation(g,"u_psi"),g.theta=y.getUniformLocation(g,"u_theta"),g.f=y.getUniformLocation(g,"u_f"),g.h=y.getUniformLocation(g,"u_h"),g.v=y.getUniformLocation(g,"u_v"),g.vo=y.getUniformLocation(g,"u_vo"),g.rot=y.getUniformLocation(g,"u_rot"),y.uniform1f(g.h,u/(2*Math.PI)),y.uniform1f(g.v,d/Math.PI),y.uniform1f(g.vo,f/Math.PI*2),"equirectangular"==_&&(g.backgroundColor=y.getUniformLocation(g,"u_backgroundColor"),y.uniform4fv(g.backgroundColor,(p.backgroundColor?p.backgroundColor:[0,0,0]).concat([1]))),g.texture=y.createTexture(),y.bindTexture(e,g.texture),"cubemap"==_?(y.texImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_X,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R[1]),y.texImage2D(y.TEXTURE_CUBE_MAP_NEGATIVE_X,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R[3]),y.texImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_Y,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R[4]),y.texImage2D(y.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R[5]),y.texImage2D(y.TEXTURE_CUBE_MAP_POSITIVE_Z,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R[0]),y.texImage2D(y.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R[2])):y.texImage2D(e,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R),y.texParameteri(e,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(e,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),y.texParameteri(e,y.TEXTURE_MIN_FILTER,y.LINEAR),y.texParameteri(e,y.TEXTURE_MAG_FILTER,y.LINEAR)):(g.vertPosLocation=y.getAttribLocation(g,"a_vertCoord"),y.enableVertexAttribArray(g.vertPosLocation),I||(I=y.createBuffer()),C||(C=y.createBuffer()),A||(A=y.createBuffer()),y.bindBuffer(y.ARRAY_BUFFER,C),y.bufferData(y.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,1]),y.STATIC_DRAW),y.bindBuffer(y.ELEMENT_ARRAY_BUFFER,A),y.bufferData(y.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),y.STATIC_DRAW),g.perspUniform=y.getUniformLocation(g,"u_perspMatrix"),g.cubeUniform=y.getUniformLocation(g,"u_cubeMatrix"),g.level=-1,g.currentNodes=[],g.nodeCache=[],g.nodeCacheTimestamp=0),0!==y.getError())throw console.log("Error: Something went wrong with WebGL!"),{type:"webgl error"};m()}},this.destroy=function(){if(o!==a&&(D!==a&&o.removeChild(D),E!==a&&o.removeChild(E)),y){var e=y.getExtension("WEBGL_lose_context");e&&e.loseContext()}},this.resize=function(){var t=e.devicePixelRatio||1;D.width=D.clientWidth*t,D.height=D.clientHeight*t,y&&(y.viewport(0,0,D.width,D.height),"multires"!=_&&y.uniform1f(g.aspectRatio,D.width/D.height))},this.resize(),this.render=function(t,o,n,i){var r;if(r=0,i===a&&(i={}),i.roll&&(r=i.roll),P!==a){var s=P[0],l=P[1],v=t,w=o,x=Math.cos(l)*Math.sin(t)*Math.sin(s)+Math.cos(t)*(Math.cos(s)*Math.cos(o)+Math.sin(l)*Math.sin(s)*Math.sin(o)),L=-Math.sin(t)*Math.sin(l)+Math.cos(t)*Math.cos(l)*Math.sin(o);
1t=Math.cos(l)*Math.cos(s)*Math.sin(t)+Math.cos(t)*(-Math.cos(o)*Math.sin(s)+Math.cos(s)*Math.sin(l)*Math.sin(o)),t=Math.asin(Math.max(Math.min(t,1),-1)),o=Math.atan2(L,x),s=[Math.cos(v)*(Math.sin(l)*Math.sin(s)*Math.cos(w)-Math.cos(s)*Math.sin(w)),Math.cos(v)*Math.cos(l)*Math.cos(w),Math.cos(v)*(Math.cos(s)*Math.sin(l)*Math.cos(w)+Math.sin(w)*Math.sin(s))],l=[-Math.cos(t)*Math.sin(o),Math.cos(t)*Math.cos(o)],l=Math.acos(Math.max(Math.min((s[0]*l[0]+s[1]*l[1])/(Math.sqrt(s[0]*s[0]+s[1]*s[1]+s[2]*s[2])*Math.sqrt(l[0]*l[0]+l[1]*l[1])),1),-1)),0>s[2]&&(l=2*Math.PI-l),r+=l}if(y||"multires"!=_&&"cubemap"!=_){if("multires"!=_)n=2*Math.atan(Math.tan(.5*n)/(D.width/D.height)),n=1/Math.tan(.5*n),y.uniform1f(g.psi,o),y.uniform1f(g.theta,t),y.uniform1f(g.rot,r),y.uniform1f(g.f,n),!0===T&&"equirectangular"==_&&(y.bindTexture(y.TEXTURE_2D,g.texture),y.texImage2D(y.TEXTURE_2D,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,R)),y.drawArrays(y.TRIANGLES,0,6);else{for(s=D.width/D.height,l=2*Math.atan(Math.tan(n/2)*D.height/D.width),s=[(l=1/Math.tan(l/2))/s,0,0,0,0,l,0,0,0,0,100.1/-99.9,20/-99.9,0,0,-1,0],l=1;l<R.maxLevel&&D.width>R.tileResolution*Math.pow(2,l-1)*Math.tan(n/2)*.707;)l++;if(g.level=l,l=f(l=[1,0,0,0,1,0,0,0,1],-r,"z"),l=f(l,-t,"x"),l=[(l=f(l,o,"y"))[0],l[1],l[2],0,l[3],l[4],l[5],0,l[6],l[7],l[8],0,0,0,0,1],y.uniformMatrix4fv(g.perspUniform,!1,new Float32Array(m(s))),y.uniformMatrix4fv(g.cubeUniform,!1,new Float32Array(m(l))),s=[s[0]*l[0],s[0]*l[1],s[0]*l[2],0,s[5]*l[4],s[5]*l[5],s[5]*l[6],0,s[10]*l[8],s[10]*l[9],s[10]*l[10],s[11],-l[8],-l[9],-l[10],0],g.nodeCache.sort(h),200<g.nodeCache.length&&g.nodeCache.length>g.currentNodes.length+50)for(l=g.nodeCache.splice(200,g.nodeCache.length-200),r=0;r<l.length;r++)y.deleteTexture(l[r].texture);for(g.currentNodes=[],l="fbudlr".split(""),r=0;6>r;r++)d(s,v=new u(M[r],l[r],1,0,0,R.fullpath),t,o,n);for(g.currentNodes.sort(c),r=0;r<g.currentNodes.length;r++)if(!g.currentNodes[r].texture){setTimeout(p(g.currentNodes[r]),0);break}if(!g.drawInProgress){for(g.drawInProgress=!0,t=0;t<g.currentNodes.length;t++)g.currentNodes[t].textureLoaded&&(y.bindBuffer(y.ARRAY_BUFFER,I),y.bufferData(y.ARRAY_BUFFER,new Float32Array(g.currentNodes[t].vertices),y.STATIC_DRAW),y.vertexAttribPointer(g.vertPosLocation,3,y.FLOAT,!1,0,0),y.bindBuffer(y.ARRAY_BUFFER,C),y.vertexAttribPointer(g.texCoordLocation,2,y.FLOAT,!1,0,0),y.bindTexture(y.TEXTURE_2D,g.currentNodes[t].texture),y.drawElements(y.TRIANGLES,6,y.UNSIGNED_SHORT,0));g.drawInProgress=!1}}if(i.returnImage!==a)return D.toDataURL("image/png")}else for(i={f:"translate3d(-"+((r=b/2)+2)+"px, -"+(r+2)+"px, -"+r+"px)",b:"translate3d("+(r+2)+"px, -"+(r+2)+"px, "+r+"px) rotateX(180deg) rotateZ(180deg)",u:"translate3d(-"+(r+2)+"px, -"+r+"px, "+(r+2)+"px) rotateX(270deg)",d:"translate3d(-"+(r+2)+"px, "+r+"px, -"+(r+2)+"px) rotateX(90deg)",l:"translate3d(-"+r+"px, -"+(r+2)+"px, "+(r+2)+"px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",r:"translate3d("+r+"px, -"+(r+2)+"px, -"+(r+2)+"px) rotateY(270deg)"},t="perspective("+(n=(n=1/Math.tan(n/2))*D.width/(e.devicePixelRatio||1)/2+"px")+") translateZ("+n+") rotateX("+t+"rad) rotateY("+o+"rad) ",o=Object.keys(i),r=0;6>r;r++)(n=E.querySelector(".pnlm-"+o[r]+"face").style).webkitTransform=t+i[o[r]],n.transform=t+i[o[r]]},this.isLoading=function(){if(y&&"multires"==_)for(var e=0;e<g.currentNodes.length;e++)if(!g.currentNodes[e].textureLoaded)return!0;return!1},this.getCanvas=function(){return D};var S=function(){function e(){var e=this;this.texture=this.callback=null,this.image=new Image,this.image.crossOrigin="anonymous",this.image.addEventListener("load",(function(){var t=e.image;y.bindTexture(y.TEXTURE_2D,e.texture),y.texImage2D(y.TEXTURE_2D,0,y.RGB,y.RGB,y.UNSIGNED_BYTE,t),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MAG_FILTER,y.LINEAR),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_MIN_FILTER,y.LINEAR),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_S,y.CLAMP_TO_EDGE),y.texParameteri(y.TEXTURE_2D,y.TEXTURE_WRAP_T,y.CLAMP_TO_EDGE),y.bindTexture(y.TEXTURE_2D,null),e.callback(e.texture),n.length?(t=n.shift(),e.loadTexture(t.src,t.texture,t.callback)):o[a++]=e}))}function t(e,t,a){this.src=e,this.texture=t,this.callback=a}var a=4,o={},n=[];e.prototype.loadTexture=function(e,t,a){this.texture=t,this.callback=a,this.image.src=e};for(var i=0;i<a;i++)o[i]=new e;return function(e,i){var r=y.createTexture();return a?o[--a].loadTexture(e,r,i):n.push(new t(e,r,i)),r}}()}var n="attribute vec2 a_texCoord;varying vec2 v_texCoord;void main() {gl_Position = vec4(a_texCoord, 0.0, 1.0);v_texCoord = a_texCoord;}",i="attribute vec3 a_vertCoord;attribute vec2 a_texCoord;uniform mat4 u_cubeMatrix;uniform mat4 u_perspMatrix;varying mediump vec2 v_texCoord;void main(void) {gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);v_texCoord = a_texCoord;}",r="precision mediump float;\nuniform float u_aspectRatio;\nuniform float u_psi;\nuniform float u_theta;\nuniform float u_f;\nuniform float u_h;\nuniform float u_v;\nuniform float u_vo;\nuniform float u_rot;\nconst float PI = 3.14159265358979323846264;\nuniform sampler2D u_image;\nuniform samplerCube u_imageCube;\nvarying vec2 v_texCoord;\nuniform vec4 u_backgroundColor;\nvoid main() {\nfloat x = v_texCoord.x * u_aspectRatio;\nfloat y = v_texCoord.y;\nfloat sinrot = sin(u_rot);
1\nfloat cosrot = cos(u_rot);\nfloat rot_x = x * cosrot - y * sinrot;\nfloat rot_y = x * sinrot + y * cosrot;\nfloat sintheta = sin(u_theta);\nfloat costheta = cos(u_theta);\nfloat a = u_f * costheta - rot_y * sintheta;\nfloat root = sqrt(rot_x * rot_x + a * a);\nfloat lambda = atan(rot_x / root, a / root) + u_psi;\nfloat phi = atan((rot_y * costheta + u_f * sintheta) / root);float cosphi = cos(phi);\ngl_FragColor = textureCube(u_imageCube, vec3(cosphi*sin(lambda), sin(phi), cosphi*cos(lambda)));\n}",s="precision mediump float;\nuniform float u_aspectRatio;\nuniform float u_psi;\nuniform float u_theta;\nuniform float u_f;\nuniform float u_h;\nuniform float u_v;\nuniform float u_vo;\nuniform float u_rot;\nconst float PI = 3.14159265358979323846264;\nuniform sampler2D u_image;\nuniform samplerCube u_imageCube;\nvarying vec2 v_texCoord;\nuniform vec4 u_backgroundColor;\nvoid main() {\nfloat x = v_texCoord.x * u_aspectRatio;\nfloat y = v_texCoord.y;\nfloat sinrot = sin(u_rot);\nfloat cosrot = cos(u_rot);\nfloat rot_x = x * cosrot - y * sinrot;\nfloat rot_y = x * sinrot + y * cosrot;\nfloat sintheta = sin(u_theta);\nfloat costheta = cos(u_theta);\nfloat a = u_f * costheta - rot_y * sintheta;\nfloat root = sqrt(rot_x * rot_x + a * a);\nfloat lambda = atan(rot_x / root, a / root) + u_psi;\nfloat phi = atan((rot_y * costheta + u_f * sintheta) / root);lambda = mod(lambda + PI, PI * 2.0) - PI;\nvec2 coord = vec2(lambda / PI, phi / (PI / 2.0));\nif(coord.x < -u_h || coord.x > u_h || coord.y < -u_v + u_vo || coord.y > u_v + u_vo)\ngl_FragColor = u_backgroundColor;\nelse\ngl_FragColor = texture2D(u_image, vec2((coord.x + u_h) / (u_h * 2.0), (-coord.y + u_v + u_vo) / (u_v * 2.0)));\n}",l="varying mediump vec2 v_texCoord;uniform sampler2D u_sampler;void main(void) {gl_FragColor = texture2D(u_sampler, v_texCoord);}";return{renderer:function(e,t,a,n){return new o(e,t,a,n)}}}(window,document),window.requestAnimationFrame||(window.requestAnimationFrame=window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)}),window.pannellum=function(e,t,a){function o(o,n){function i(){if((u=t.createElement("div")).innerHTML="\x3c!--[if lte IE 9]><i></i><![endif]--\x3e",1==u.getElementsByTagName("i").length)l();else{var n;if($=Z.hfov,ee=Z.pitch,"cubemap"==Z.type){for(J=[],u=0;6>u;u++)J.push(new Image),J[u].crossOrigin="anonymous";Te.load.lbox.style.display="block",Te.load.lbar.style.display="none"}else if("multires"==Z.type)u=JSON.parse(JSON.stringify(Z.multiRes)),Z.basePath&&Z.multiRes.basePath&&!/^(?:[a-z]+:)?\/\//i.test(Z.multiRes.basePath)?u.basePath=Z.basePath+Z.multiRes.basePath:Z.multiRes.basePath?u.basePath=Z.multiRes.basePath:Z.basePath&&(u.basePath=Z.basePath),J=u;else if(!0===Z.dynamic)J=Z.panorama;else{if(Z.panorama===a)return void l("No panorama image was specified.");J=new Image}if("cubemap"==Z.type)for(var i=6,h=function(){0===--i&&s()},c=function(e){var a=t.createElement("a");a.href=e.target.src,a.innerHTML=a.href,l("The file "+a.outerHTML+" could not be accessed.")},u=0;u<J.length;u++)J[u].onload=h,J[u].onerror=c,n=Z.cubeMap[u],Z.basePath&&!r(n)&&(n=Z.basePath+n),J[u].src=encodeURI(n);else if("multires"==Z.type)s();else if(n="",Z.basePath&&(n=Z.basePath),!0!==Z.dynamic){n=r(Z.panorama)?Z.panorama:n+Z.panorama,J.onload=function(){e.URL.revokeObjectURL(this.src),s()};var d=new XMLHttpRequest;d.onloadend=function(){if(200!=d.status){var o=t.createElement("a");o.href=encodeURI(n),o.innerHTML=o.href,l("The file "+o.outerHTML+" could not be accessed.")}!function(t){var o=new FileReader;o.addEventListener("loadend",(function(){var n=o.result;navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)&&((0>(r=n.indexOf("ÿÃ"))||65536<r)&&l("Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding)."));if(-1<(r=n.indexOf("<x:xmpmeta"))&&!0!==Z.ignoreGPanoXMP){var i=n.substring(r,n.indexOf("</x:xmpmeta>")+12),r=(n=(f=function(e){var t;return 0<=i.indexOf(e+'="')?t=(t=i.substring(i.indexOf(e+'="')+e.length+2)).substring(0,t.indexOf('"')):0<=i.indexOf(e+">")&&(t=(t=i.substring(i.indexOf(e+">")+e.length+1)).substring(0,t.indexOf("<"))),t!==a?Number(t):null})("GPano:FullPanoWidthPixels"),f("GPano:CroppedAreaImageWidthPixels")),s=f("GPano:FullPanoHeightPixels"),h=f("GPano:CroppedAreaImageHeightPixels"),c=f("GPano:CroppedAreaTopPixels"),u=f("GPano:PoseHeadingDegrees"),d=f("GPano:PosePitchDegrees"),f=f("GPano:PoseRollDegrees");null!==n&&null!==r&&null!==s&&null!==h&&null!==c&&(0>xe.indexOf("haov")&&(Z.haov=r/n*360),0>xe.indexOf("vaov")&&(Z.vaov=h/s*180),0>xe.indexOf("vOffset")&&(Z.vOffset=-180*((c+h/2)/s-.5)),null!==u&&0>xe.indexOf("northOffset")&&(Z.northOffset=u,!1!==Z.compass&&(Z.compass=!0)),null!==d&&null!==f&&(0>xe.indexOf("horizonPitch")&&(Z.horizonPitch=d),0>xe.indexOf("horizonRoll")&&(Z.horizonRoll=f)))}J.src=e.URL.createObjectURL(t)})),o.readAsBinaryString!==a?o.readAsBinaryString(t):o.readAsText(t)}(this.response),Te.load.msg.innerHTML=""},d.onprogress=function(e){var t,a;e.lengthComputable?(Te.load.lbarFill.style.width=e.loaded/e.total*100+"%",1e6<e.total?(t="MB",a=(e.loaded/1e6).toFixed(2),e=(e.total/1e6).toFixed(2)):1e3<e.total?(t="kB",a=(e.loaded/1e3).toFixed(1),e=(e.total/1e3).toFixed(1)):(t="B",a=e.loaded,e=e.total),Te.load.msg.innerHTML=a+" / "+e+" "+t):(Te.load.lbox.style.display="block",Te.load.lbar.style.display="none")};try{d.open("GET",n,!0)}catch(e){l("There is something wrong with the panorama URL.")}d.responseType="blob",d.setRequestHeader("Accept","image/*,*/*;q=0.9"),d.send()}o.classList.add("pnlm-grab"),o.classList.remove("pnlm-grabbing")}}function r(e){return/^(?:[a-z]+:)?\/\//i.test(e)||"/"==e[0]||"blob:"==e.slice(0,5)}function s(){V||(V=new libpannellum.renderer(Pe)),fe||(fe=!0,Re.addEventListener("mousedown",c,!1),t.addEventListener("mousemove",d,!1),t.addEventListener("mouseup",f,!1),Z.mouseZoom&&(o.addEventListener("mousewheel",x,!1),o.addEventListener("DOMMouseScroll",x,!1)),o.addEventListener("mozfullscreenchange",F,!1),o.addEventListener("webkitfullscreenchange",F,!1),o.addEventListener("msfullscreenchange",F,!1),o.addEventListener("fullscreenchange",F,!1),e.addEventListener("resize",_,!1),e.addEventListener("orientationchange",_,!1),o.addEventListener("keydown",b,!1),o.addEventListener("keyup",M,!1),o.addEventListener("blur",E,!1),t.addEventListener("mouseleave",f,!1),Re.addEventListener("touchstart",m,!1),Re.addEventListener("touchmove",p,!1),Re.addEventListener("touchend",v,!1),Re.addEventListener("pointerdown",g,!1),Re.addEventListener("pointermove",y,!1),Re.addEventListener("pointerup",w,!1),Re.addEventListener("pointerleave",w,!1),e.navigator.pointerEnabled&&(o.style.touchAction="none")),function(){try{var e={};
1Z.horizonPitch!==a&&(e.horizonPitch=Z.horizonPitch*Math.PI/180),Z.horizonRoll!==a&&(e.horizonRoll=Z.horizonRoll*Math.PI/180),Z.backgroundColor!==a&&(e.backgroundColor=Z.backgroundColor),V.init(J,Z.type,Z.dynamic,Z.haov*Math.PI/180,Z.vaov*Math.PI/180,Z.vOffset*Math.PI/180,A,e),!0!==Z.dynamic&&(J=a)}catch(e){if("webgl error"==e.type||"no webgl"==e.type)l();else{if("webgl size error"!=e.type)throw l("Unknown error. Check developer console."),e;l("This panorama is too big for your device! It's "+e.width+"px wide, but your device only supports images up to "+e.maxWidth+"px wide. Try another device. (If you're the author, try scaling down the image.)")}}}(),setTimeout((function(){}),500)}function l(e){e===a&&(e="Your browser does not have the necessary WebGL support to display this panorama."),Te.errorMsg.innerHTML="<p>"+e+"</p>",Ie.load.style.display="none",Te.load.box.style.display="none",Te.errorMsg.style.display="table",de=!0,Pe.style.display="none",W("error",e)}function h(e){var t=o.getBoundingClientRect(),a={};return a.x=e.clientX-t.left,a.y=e.clientY-t.top,a}function c(e){if(e.preventDefault(),o.focus(),ue){var t=h(e);if(Z.hotSpotDebug){var a=u(e);console.log("Pitch: "+a[0]+", Yaw: "+a[1]+", Center Pitch: "+Z.pitch+", Center Yaw: "+Z.yaw+", HFOV: "+Z.hfov)}B(),Y(),Z.roll=0,me.hfov=0,ae=!0,oe=Date.now(),ne=t.x,ie=t.y,se=Z.yaw,le=Z.pitch,o.classList.add("pnlm-grabbing"),o.classList.remove("pnlm-grab"),W("mousedown",e),T()}}function u(t){var a=h(t),o=(t=V.getCanvas()).width/(e.devicePixelRatio||1),n=t.height/(e.devicePixelRatio||1);t=a.x/o*2-1;n=(1-a.y/n*2)*n/o;var i=1/Math.tan(Z.hfov*Math.PI/360),r=Math.sin(Z.pitch*Math.PI/180),s=Math.cos(Z.pitch*Math.PI/180);a=i*s-n*r,o=Math.sqrt(t*t+a*a);return[n=180*Math.atan((n*s+i*r)/o)/Math.PI,t=180*Math.atan2(t/o,a/o)/Math.PI+Z.yaw]}function d(t){if(ae&&ue){oe=Date.now();var a=(o=V.getCanvas()).width/(e.devicePixelRatio||1),o=o.height/(e.devicePixelRatio||1);t=h(t);var n=180*(Math.atan(ne/a*2-1)-Math.atan(t.x/a*2-1))/Math.PI*Z.hfov/90+se;me.yaw=(n-Z.yaw)%360*.2,Z.yaw=n,a=360*Math.atan(Math.tan(Z.hfov/360*Math.PI)*o/a)/Math.PI,a=180*(Math.atan(t.y/o*2-1)-Math.atan(ie/o*2-1))/Math.PI*a/90+le,me.pitch=.2*(a-Z.pitch),Z.pitch=a}}function f(e){ae&&(ae=!1,15<Date.now()-oe&&(me.pitch=me.yaw=0),o.classList.add("pnlm-grab"),o.classList.remove("pnlm-grabbing"),oe=Date.now(),W("mouseup",e))}function m(e){if(ue){B(),Y(),Z.roll=0,me.hfov=0;var t=h(e.targetTouches[0]);ne=t.x,ie=t.y,2==e.targetTouches.length&&(e=h(e.targetTouches[1]),ne+=.5*(e.x-t.x),ie+=.5*(e.y-t.y),re=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y))),ae=!0,oe=Date.now(),se=Z.yaw,le=Z.pitch,T()}}function p(e){if(e.preventDefault(),ue&&(oe=Date.now()),ae&&ue){var t=h(e.targetTouches[0]),a=t.x,o=t.y;2==e.targetTouches.length&&-1!=re&&(a+=.5*((e=h(e.targetTouches[1])).x-t.x),o+=.5*(e.y-t.y),t=Math.sqrt((t.x-e.x)*(t.x-e.x)+(t.y-e.y)*(t.y-e.y)),z(Z.hfov+.1*(re-t)),re=t),t=Z.hfov/360,a=(ne-a)*t+se,me.yaw=(a-Z.yaw)%360*.2,Z.yaw=a,o=(o-ie)*t+le,me.pitch=.2*(o-Z.pitch),Z.pitch=o}}function v(){ae=!1,150<Date.now()-oe&&(me.pitch=me.yaw=0),re=-1,oe=Date.now()}function g(e){"touch"==e.pointerType&&(Ae.push(e.pointerId),De.push({clientX:e.clientX,clientY:e.clientY}),e.targetTouches=De,m(e),e.preventDefault())}function y(e){if("touch"==e.pointerType)for(var t=0;t<Ae.length;t++)if(e.pointerId==Ae[t]){De[t]={clientX:e.clientX,clientY:e.clientY},e.targetTouches=De,p(e);break}}function w(e){if("touch"==e.pointerType){for(var t=!1,o=0;o<Ae.length;o++)e.pointerId==Ae[o]&&(Ae[o]=a),Ae[o]&&(t=!0);t||(Ae=[],De=[],v()),e.preventDefault()}}function x(e){e.preventDefault(),ue&&(B(),oe=Date.now(),e.wheelDeltaY?(z(Z.hfov-.05*e.wheelDeltaY),me.hfov=0>e.wheelDelta?1:-1):e.wheelDelta?(z(Z.hfov-.05*e.wheelDelta),me.hfov=0>e.wheelDelta?1:-1):e.detail&&(z(Z.hfov+1.5*e.detail),me.hfov=0<e.detail?1:-1),T())}function b(e){e.preventDefault(),B(),oe=Date.now(),Y(),Z.roll=0;var t=e.keycode;e.which&&(t=e.which),27==t?ce&&U():P(t,!0)}function E(){for(var e=0;10>e;e++)he[e]=!1}function M(e){e.preventDefault();var t=e.keycode;e.which&&(t=e.which),P(t,!1)}function P(e,t){var a=!1;switch(e){case 109:case 189:case 17:he[0]!=t&&(a=!0),he[0]=t;break;case 107:case 187:case 16:he[1]!=t&&(a=!0),he[1]=t;break;case 38:he[2]!=t&&(a=!0),he[2]=t;break;case 87:he[6]!=t&&(a=!0),he[6]=t;break;
1case 40:he[3]!=t&&(a=!0),he[3]=t;break;case 83:he[7]!=t&&(a=!0),he[7]=t;break;case 37:he[4]!=t&&(a=!0),he[4]=t;break;case 65:he[8]!=t&&(a=!0),he[8]=t;break;case 39:he[5]!=t&&(a=!0),he[5]=t;break;case 68:he[9]!=t&&(a=!0),he[9]=t}a&&t&&(K="undefined"!=typeof performance&&performance.now()?performance.now():Date.now(),T())}function R(e){var t=ye[e],a=Math.min(1,Math.max((Date.now()-t.startTime)/1e3/(t.duration/1e3),0));a=t.startPosition+(.5>a?2*a*a:(4-2*a)*a-1)*(t.endPosition-t.startPosition);(t.endPosition>t.startPosition&&a>=t.endPosition||t.endPosition<t.startPosition&&a<=t.endPosition)&&(a=t.endPosition,me[e]=0,delete ye[e]),Z[e]=a}function _(){F()}function T(){pe||(pe=!0,L())}function L(){if(function(){var e;if(ue){180<Z.yaw?Z.yaw-=360:-180>Z.yaw&&(Z.yaw+=360),e=Z.yaw;var t=Z.maxYaw-Z.minYaw,a=-180,o=180;360>t&&(a=Z.minYaw+Z.hfov/2,o=Z.maxYaw-Z.hfov/2,t<Z.hfov&&(a=o=(a+o)/2)),Z.yaw=Math.max(a,Math.min(o,Z.yaw)),!1!==Z.autoRotate&&e!=Z.yaw&&(Z.autoRotate*=-1),e=V.getCanvas(),e=2*Math.atan(Math.tan(Z.hfov/180*Math.PI*.5)/(e.width/e.height))/Math.PI*180,t=Z.minPitch+e/2,a=Z.maxPitch-e/2,Z.maxPitch-Z.minPitch<e&&(t=a=(t+a)/2),isNaN(t)&&(t=-90),isNaN(a)&&(a=90),Z.pitch=Math.max(t,Math.min(a,Z.pitch)),V.render(Z.pitch*Math.PI/180,Z.yaw*Math.PI/180,Z.hfov*Math.PI/180,{roll:Z.roll*Math.PI/180}),Z.hotSpots.forEach(S),Z.compass&&(Ce.style.transform="rotate("+(-Z.yaw-Z.northOffset)+"deg)",Ce.style.webkitTransform="rotate("+(-Z.yaw-Z.northOffset)+"deg)")}}(),Q&&clearTimeout(Q),ae||ve)requestAnimationFrame(L);else if(he[0]||he[1]||he[2]||he[3]||he[4]||he[5]||he[6]||he[7]||he[8]||he[9]||Z.autoRotate||ye.pitch||ye.yaw||ye.hfov||.01<Math.abs(me.yaw)||.01<Math.abs(me.pitch)||.01<Math.abs(me.hfov))(function(){if(ue){var e,t=!1,o=Z.pitch,n=Z.yaw,i=Z.hfov;e="undefined"!=typeof performance&&performance.now()?performance.now():Date.now(),K===a&&(K=e);var r=(e-K)*Z.hfov/1700;if(r=Math.min(r,1),he[0]&&!0===Z.keyboardZoom&&(z(Z.hfov+(.8*me.hfov+.5)*r),t=!0),he[1]&&!0===Z.keyboardZoom&&(z(Z.hfov+(.8*me.hfov-.2)*r),t=!0),(he[2]||he[6])&&(Z.pitch+=(.8*me.pitch+.2)*r,t=!0),(he[3]||he[7])&&(Z.pitch+=(.8*me.pitch-.2)*r,t=!0),(he[4]||he[8])&&(Z.yaw+=(.8*me.yaw-.2)*r,t=!0),(he[5]||he[9])&&(Z.yaw+=(.8*me.yaw+.2)*r,t=!0),t&&(oe=Date.now()),Date.now(),Z.autoRotate){if(.001<e-K){t=(e-K)/1e3;var s=(me.yaw/t*r-.2*Z.autoRotate)*t;s=(0<-Z.autoRotate?1:-1)*Math.min(Math.abs(Z.autoRotate*t),Math.abs(s)),Z.yaw+=s}Z.autoRotateStopDelay&&(Z.autoRotateStopDelay-=e-K,0>=Z.autoRotateStopDelay&&(Z.autoRotateStopDelay=!1,ge=Z.autoRotate,Z.autoRotate=0))}ye.pitch&&(R("pitch"),o=Z.pitch),ye.yaw&&(R("yaw"),n=Z.yaw),ye.hfov&&(R("hfov"),i=Z.hfov),0<r&&!Z.autoRotate&&(he[4]||he[5]||he[8]||he[9]||ye.yaw||(Z.yaw+=me.yaw*r*.85),he[2]||he[3]||he[6]||he[7]||ye.pitch||(Z.pitch+=me.pitch*r*.85),he[0]||he[1]||ye.hfov||z(Z.hfov+me.hfov*r*.85)),K=e,0<r&&(me.yaw=.8*me.yaw+(Z.yaw-n)/r*.2,me.pitch=.8*me.pitch+(Z.pitch-o)/r*.2,me.hfov=.8*me.hfov+(Z.hfov-i)/r*.2,o=Z.autoRotate?Math.abs(Z.autoRotate):5,me.yaw=Math.min(o,Math.max(me.yaw,-o)),me.pitch=Math.min(o,Math.max(me.pitch,-o)),me.hfov=Math.min(o,Math.max(me.hfov,-o))),he[0]&&he[0]&&(me.hfov=0),(he[2]||he[6])&&(he[3]||he[7])&&(me.pitch=0),(he[4]||he[8])&&(he[5]||he[9])&&(me.yaw=0)}})(),0<=Z.autoRotateInactivityDelay&&ge&&Date.now()-oe>Z.autoRotateInactivityDelay&&!Z.autoRotate&&(Z.autoRotate=ge,te.lookAt(ee,a,$,3e3)),requestAnimationFrame(L);else if(V&&(V.isLoading()||!0===Z.dynamic&&be))requestAnimationFrame(L);else{pe=!1,K=a;var e=Z.autoRotateInactivityDelay-(Date.now()-oe);0<e?Q=setTimeout((function(){Z.autoRotate=ge,te.lookAt(ee,a,$,3e3),T()}),e):0<=Z.autoRotateInactivityDelay&&ge&&(Z.autoRotate=ge,te.lookAt(ee,a,$,3e3),T())}}function I(e,t,a,o){this.w=e,this.x=t,this.y=a,this.z=o}function C(t){var a;a=t.alpha;var o=t.beta;t=t.gamma,o=[o?o*Math.PI/180/2:0,t?t*Math.PI/180/2:0,a?a*Math.PI/180/2:0],a=[Math.cos(o[0]),Math.cos(o[1]),Math.cos(o[2])],o=[Math.sin(o[0]),Math.sin(o[1]),Math.sin(o[2])],a=(a=new I(a[0]*a[1]*a[2]-o[0]*o[1]*o[2],o[0]*a[1]*a[2]-a[0]*o[1]*o[2],a[0]*o[1]*a[2]+o[0]*a[1]*o[2],a[0]*a[1]*o[2]+o[0]*o[1]*a[2])).multiply(new I(Math.sqrt(.5),-Math.sqrt(.5),0,0)),o=e.orientation?-e.orientation*Math.PI/180/2:0,a=a.multiply(new I(Math.cos(o),0,-Math.sin(o),0)).toEulerAngles(),Z.pitch=a[0]/Math.PI*180,Z.roll=-a[1]/Math.PI*180,Z.yaw=-a[2]/Math.PI*180+Z.northOffset}function A(){if(Z.sceneFadeDuration&&V.fadeImg!==a){V.fadeImg.style.opacity=0;var e=V.fadeImg;delete V.fadeImg,setTimeout((function(){Pe.removeChild(e)}),Z.sceneFadeDuration)}Ce.style.display=Z.compass?"inline":"none",Ee||(Z.hotSpots?(Z.hotSpots=Z.hotSpots.sort((function(e,t){return e.pitch<t.pitch}
1)),Z.hotSpots.forEach(D)):Z.hotSpots=[],Ee=!0,Z.hotSpots.forEach(S)),Te.load.box.style.display="none",j!==a&&(Pe.removeChild(j),j=a),ue=!0,W("load"),T()}function D(e){e.pitch=Number(e.pitch)||0,e.yaw=Number(e.yaw)||0;var a=t.createElement("div");a.className="pnlm-hotspot-base",a.className=e.cssClass?a.className+" "+e.cssClass:a.className+" pnlm-hotspot pnlm-sprite pnlm-"+q(e.type);var o,n=t.createElement("span");if(e.text&&(n.innerHTML=q(e.text)),e.video){o=t.createElement("video");var i=e.video;Z.basePath&&!r(i)&&(i=Z.basePath+i),o.src=encodeURI(i),o.controls=!0,o.style.width=e.width+"px",Pe.appendChild(a),n.appendChild(o)}else if(e.image){i=e.image,Z.basePath&&!r(i)&&(i=Z.basePath+i),(o=t.createElement("a")).href=encodeURI(e.URL?e.URL:i),o.target="_blank",n.appendChild(o);var s=t.createElement("img");s.src=encodeURI(i),s.style.width=e.width+"px",s.style.paddingTop="5px",Pe.appendChild(a),o.appendChild(s),n.style.maxWidth="initial"}else e.URL?((o=t.createElement("a")).href=encodeURI(e.URL),o.target="_blank",Pe.appendChild(o),a.style.cursor="pointer",n.style.cursor="pointer",o.appendChild(a)):(e.sceneId&&(a.onclick=function(){return H(e.sceneId,e.targetPitch,e.targetYaw,e.targetHfov),!1},a.ontouchend=function(){return H(e.sceneId,e.targetPitch,e.targetYaw,e.targetHfov),!1},a.style.cursor="pointer",n.style.cursor="pointer"),Pe.appendChild(a));e.createTooltipFunc?e.createTooltipFunc(a,e.createTooltipArgs):(e.text||e.video||e.image)&&(a.classList.add("pnlm-tooltip"),a.appendChild(n),n.style.width=n.scrollWidth-20+"px",n.style.marginLeft=-(n.scrollWidth-a.offsetWidth)/2+"px",n.style.marginTop=-n.scrollHeight-12+"px"),e.clickHandlerFunc&&(a.addEventListener("click",(function(t){e.clickHandlerFunc(t,e.clickHandlerArgs)}),"false"),a.style.cursor="pointer",n.style.cursor="pointer"),e.div=a}function S(t){var a=Math.sin(t.pitch*Math.PI/180),o=Math.cos(t.pitch*Math.PI/180),n=Math.sin(Z.pitch*Math.PI/180),i=Math.cos(Z.pitch*Math.PI/180),r=Math.cos((-t.yaw+Z.yaw)*Math.PI/180),s=a*n+o*r*i;if(90>=t.yaw&&-90<t.yaw&&0>=s||(90<t.yaw||-90>=t.yaw)&&0>=s)t.div.style.visibility="hidden";else{var l=Math.sin((-t.yaw+Z.yaw)*Math.PI/180),h=Math.tan(Z.hfov*Math.PI/360);t.div.style.visibility="visible";var c=(u=V.getCanvas()).width/(e.devicePixelRatio||1),u=u.height/(e.devicePixelRatio||1);a=[-c/h*l*o/s/2,-c/h*(a*i-o*r*n)/s/2],o=Math.sin(Z.roll*Math.PI/180),n=Math.cos(Z.roll*Math.PI/180);(a=[a[0]*n-a[1]*o,a[0]*o+a[1]*n])[0]+=(c-t.div.offsetWidth)/2,a[1]+=(u-t.div.offsetHeight)/2,c="translate("+a[0]+"px, "+a[1]+"px) translateZ(9999px) rotate("+Z.roll+"deg)",t.div.style.webkitTransform=c,t.div.style.MozTransform=c,t.div.style.transform=c}}function N(e){Z={};var t,a="haov vaov vOffset northOffset horizonPitch horizonRoll".split(" ");for(t in xe=[],Me)Me.hasOwnProperty(t)&&(Z[t]=Me[t]);for(t in n.default)n.default.hasOwnProperty(t)&&(Z[t]=n.default[t],0<=a.indexOf(t)&&xe.push(t));if(null!==e&&""!==e&&n.scenes&&n.scenes[e]){var o=n.scenes[e];for(t in o)o.hasOwnProperty(t)&&(Z[t]=o[t],0<=a.indexOf(t)&&xe.push(t));Z.scene=e}for(t in n)n.hasOwnProperty(t)&&(Z[t]=n[t],0<=a.indexOf(t)&&xe.push(t))}function k(){if("preview"in Z){var e=Z.preview;Z.basePath&&(e=Z.basePath+e),(j=t.createElement("div")).className="pnlm-preview-img",j.style.backgroundImage="url('"+encodeURI(e)+"')",Pe.appendChild(j)}for(var o in Z.hasOwnProperty("title")||(Te.title.innerHTML=""),Z.hasOwnProperty("author")||(Te.author.innerHTML=""),Z.hasOwnProperty("title")||Z.hasOwnProperty("author")||(Te.container.style.display="none"),Z)if(Z.hasOwnProperty(o))switch(o){case"title":Te.title.innerHTML=q(Z[o]),Te.container.style.display="inline";break;case"author":Te.author.innerHTML="by "+q(Z[o]),Te.container.style.display="inline";break;case"fallback":Te.errorMsg.innerHTML='<p>Your browser does not support WebGL.<br><a href="'+encodeURI(Z[o])+'" target="_blank">Click here to view this panorama in an alternative viewer.</a></p>';break;case"hfov":z(Number(Z[o]));break;case"autoLoad":!0===Z[o]&&V===a&&(Te.load.box.style.display="inline",Ie.load.style.display="none",i());break;case"showZoomCtrl":Ie.zoom.style.display=Z[o]&&0!=Z.showControls?"block":"none";break;case"showFullscreenCtrl":Ie.fullscreen.style.display=Z[o]&&0!=Z.showControls&&("fullscreen"in t||"mozFullScreen"in t||"webkitIsFullScreen"in t||"msFullscreenElement"in t)?"block":"none";break;case"hotSpotDebug":Le.style.display=Z[o]?"block":"none";break;case"showControls":Z[o]||(Ie.orientation.style.display="none",Ie.zoom.style.display="none",Ie.fullscreen.style.display="none");break;case"orientationOnByDefault":Z[o]&&X()}}function U(){if(ue&&!de)if(ce)t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitCancelFullScreen?t.webkitCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen();else try{o.requestFullscreen?o.requestFullscreen():o.mozRequestFullScreen?o.mozRequestFullScreen():o.msRequestFullscreen?o.msRequestFullscreen():o.webkitRequestFullScreen()}catch(e){}}function F(){t.fullscreen||t.mozFullScreen||t.webkitIsFullScreen||t.msFullscreenElement?(Ie.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"),ce=!0):(Ie.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"),ce=!1),V.resize(),z(Z.hfov),T()}function O(e){var t=Z.minHfov;return"multires"==Z.type&&V&&(t=Math.min(t,V.getCanvas().width/(Z.multiRes.cubeResolution/90*.9))),t>
1Z.maxHfov?(console.log("HFOV bounds do not make sense (minHfov > maxHfov)."),Z.hfov):e<t?t:e>Z.maxHfov?Z.maxHfov:e}function z(e){Z.hfov=O(e)}function B(){ye={},ge=Z.autoRotate?Z.autoRotate:ge,Z.autoRotate=!1}function G(){de&&(Te.load.box.style.display="none",Te.errorMsg.style.display="none",de=!1,W("errorcleared")),Ie.load.style.display="none",Te.load.box.style.display="inline",i()}function H(e,t,o,i,r){var s,l;ue=!1,ye={},Z.sceneFadeDuration&&!r?((r=new Image).className="pnlm-fade-img",r.style.transition="opacity "+Z.sceneFadeDuration/1e3+"s",r.style.width="100%",r.style.height="100%",r.onload=function(){H(e,t,o,i,!0)},(s=V.render(Z.pitch*Math.PI/180,Z.yaw*Math.PI/180,Z.hfov*Math.PI/180,{returnImage:!0}))!==a&&(r.src=s),Pe.appendChild(r),V.fadeImg=r):(r="same"===t?Z.pitch:t,s="same"===o?Z.yaw:"sameAzimuth"===o?Z.yaw+Z.northOffset-n.scenes[e].northOffset:o,l="same"===i?Z.hfov:i,function(){if(Z.hotSpots)for(var e=0;e<Z.hotSpots.length;e++){for(var t=Z.hotSpots[e].div;t.parentNode!=Pe;)t=t.parentNode;Pe.removeChild(t),delete Z.hotSpots[e].div}Ee=!1,delete Z.hotSpots}(),N(e),me.yaw=me.pitch=me.hfov=0,k(),r!==a&&(Z.pitch=r),s!==a&&(Z.yaw=s),l!==a&&(Z.hfov=l),W("scenechange",e),G())}function Y(){e.removeEventListener("deviceorientation",C),Ie.orientation.classList.remove("pnlm-orientation-button-active"),ve=!1}function X(){ve=!0,e.addEventListener("deviceorientation",C),Ie.orientation.classList.add("pnlm-orientation-button-active"),requestAnimationFrame(L)}function q(e){return String(e).replace(/&/g,"&").replace('"',""").replace("'","'").replace("<","<").replace(">",">").replace("/","/")}function W(e){if(e in we)for(var t=0;t<we[e].length;t++)we[e][t].apply(null,[].slice.call(arguments,1))}var Z,V,j,J,K,Q,$,ee,te=this,ae=!1,oe=Date.now(),ne=0,ie=0,re=-1,se=0,le=0,he=Array(10),ce=!1,ue=!1,de=!1,fe=!1,me={yaw:0,pitch:0,hfov:0},pe=!1,ve=!1,ge=0,ye={},we={},xe=[],be=!1,Ee=!1,Me={hfov:100,minHfov:50,maxHfov:120,pitch:0,minPitch:a,maxPitch:a,yaw:0,minYaw:-180,maxYaw:180,roll:0,haov:360,vaov:180,vOffset:0,autoRotate:!1,autoRotateInactivityDelay:-1,autoRotateStopDelay:a,type:"equirectangular",northOffset:0,showFullscreenCtrl:!0,dynamic:!1,keyboardZoom:!0,mouseZoom:!0,showZoomCtrl:!0,autoLoad:!1,showControls:!0,orientationOnByDefault:!1,hotSpotDebug:!1,backgroundColor:[0,0,0]};(o="string"==typeof o?t.getElementById(o):o).classList.add("pnlm-container"),o.tabIndex=0;var Pe=t.createElement("div");Pe.className="pnlm-render-container",o.appendChild(Pe);var Re=t.createElement("div");Re.className="pnlm-dragfix",o.appendChild(Re);var _e=t.createElement("span");_e.className="pnlm-about-msg",_e.innerHTML='<a href="https://pannellum.org/" target="_blank">Pannellum</a> 2.3.2',o.appendChild(_e),Re.addEventListener("contextmenu",(function e(t){var a=h(t);_e.style.left=a.x+"px",_e.style.top=a.y+"px",clearTimeout(e.t1),clearTimeout(e.t2),_e.style.display="block",_e.style.opacity=1,e.t1=setTimeout((function(){_e.style.opacity=0}),2e3),e.t2=setTimeout((function(){_e.style.display="none"}),2500),t.preventDefault()}));var Te={},Le=t.createElement("div");Le.className="pnlm-sprite pnlm-hot-spot-debug-indicator",o.appendChild(Le),Te.container=t.createElement("div"),Te.container.className="pnlm-panorama-info",Te.title=t.createElement("div"),Te.title.className="pnlm-title-box",Te.container.appendChild(Te.title),Te.author=t.createElement("div"),Te.author.className="pnlm-author-box",Te.container.appendChild(Te.author),o.appendChild(Te.container),Te.load={},Te.load.box=t.createElement("div"),Te.load.box.className="pnlm-load-box",Te.load.box.innerHTML="<p>Loading...</p>",Te.load.lbox=t.createElement("div"),Te.load.lbox.className="pnlm-lbox",Te.load.lbox.innerHTML='<div class="pnlm-loading"></div>',Te.load.box.appendChild(Te.load.lbox),Te.load.lbar=t.createElement("div"),Te.load.lbar.className="pnlm-lbar",Te.load.lbarFill=t.createElement("div"),Te.load.lbarFill.className="pnlm-lbar-fill",Te.load.lbar.appendChild(Te.load.lbarFill),Te.load.box.appendChild(Te.load.lbar),Te.load.msg=t.createElement("p"),Te.load.msg.className="pnlm-lmsg",Te.load.box.appendChild(Te.load.msg),o.appendChild(Te.load.box),Te.errorMsg=t.createElement("div"),Te.errorMsg.className="pnlm-error-msg pnlm-info-box",o.appendChild(Te.errorMsg);var Ie={};Ie.container=t.createElement("div"),Ie.container.className="pnlm-control
1s-container",o.appendChild(Ie.container),Ie.load=t.createElement("div"),Ie.load.className="pnlm-load-button",Ie.load.innerHTML='<img src="/sites/all/themes/responsive/images/btn_start.png" alt="Start">',Ie.load.addEventListener("click",G),o.appendChild(Ie.load),Ie.zoom=t.createElement("div"),Ie.zoom.className="pnlm-zoom-controls pnlm-controls",Ie.zoomIn=t.createElement("div"),Ie.zoomIn.className="pnlm-zoom-in pnlm-sprite pnlm-control",Ie.zoomIn.addEventListener("click",(function(){ue&&(z(Z.hfov-5),T())})),Ie.zoom.appendChild(Ie.zoomIn),Ie.zoomOut=t.createElement("div"),Ie.zoomOut.className="pnlm-zoom-out pnlm-sprite pnlm-control",Ie.zoomOut.addEventListener("click",(function(){ue&&(z(Z.hfov+5),T())})),Ie.zoom.appendChild(Ie.zoomOut),Ie.container.appendChild(Ie.zoom),Ie.fullscreen=t.createElement("div"),Ie.fullscreen.addEventListener("click",U),Ie.fullscreen.className="pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control",(t.fullscreenEnabled||t.mozFullScreenEnabled||t.webkitFullscreenEnabled||t.msFullscreenEnabled)&&Ie.container.appendChild(Ie.fullscreen),Ie.orientation=t.createElement("div"),Ie.orientation.addEventListener("click",(function(e){ve?Y():X()})),Ie.orientation.addEventListener("mousedown",(function(e){e.stopPropagation()})),Ie.orientation.addEventListener("touchstart",(function(e){e.stopPropagation()})),Ie.orientation.addEventListener("pointerdown",(function(e){e.stopPropagation()})),Ie.orientation.className="pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control",e.DeviceOrientationEvent&&e.addEventListener("deviceorientation",(function(t){e.removeEventListener("deviceorientation",this),t&&null!==t.alpha&&null!==t.beta&&null!==t.gamma&&Ie.container.appendChild(Ie.orientation)}));var Ce=t.createElement("div");Ce.className="pnlm-compass pnlm-controls pnlm-control",o.appendChild(Ce),n.firstScene?N(n.firstScene):n.default&&n.default.firstScene?N(n.default.firstScene):N(null),k();var Ae=[],De=[];I.prototype.multiply=function(e){return new I(this.w*e.w-this.x*e.x-this.y*e.y-this.z*e.z,this.x*e.w+this.w*e.x+this.y*e.z-this.z*e.y,this.y*e.w+this.w*e.y+this.z*e.x-this.x*e.z,this.z*e.w+this.w*e.z+this.x*e.y-this.y*e.x)},I.prototype.toEulerAngles=function(){return[Math.atan2(2*(this.w*this.x+this.y*this.z),1-2*(this.x*this.x+this.y*this.y)),Math.asin(2*(this.w*this.y-this.z*this.x)),Math.atan2(2*(this.w*this.z+this.x*this.y),1-2*(this.y*this.y+this.z*this.z))]},this.getPitch=function(){return Z.pitch},this.setPitch=function(e,t){return(t=t==a?1e3:Number(t))?ye.pitch={startTime:Date.now(),startPosition:Z.pitch,endPosition:e,duration:t}:Z.pitch=e,T(),this},this.getPitchBounds=function(){return[Z.minPitch,Z.maxPitch]},this.setPitchBounds=function(e){return Z.minPitch=Math.max(-90,Math.min(e[0],90)),Z.maxPitch=Math.max(-90,Math.min(e[1],90)),this},this.getYaw=function(){return Z.yaw},this.setYaw=function(e,t){for(;180<e;)e-=360;for(;-180>e;)e+=360;return(t=t==a?1e3:Number(t))?ye.yaw={startTime:Date.now(),startPosition:Z.yaw,endPosition:e,duration:t}:Z.yaw=e,T(),this},this.getYawBounds=function(){return[Z.minYaw,Z.maxYaw]},this.setYawBounds=function(e){return Z.minYaw=Math.max(-180,Math.min(e[0],180)),Z.maxYaw=Math.max(-180,Math.min(e[1],180)),this},this.getHfov=function(){return Z.hfov},this.setHfov=function(e,t){return(t=t==a?1e3:Number(t))?ye.hfov={startTime:Date.now(),startPosition:Z.hfov,endPosition:O(e),duration:t}:z(e),T(),this},this.getHfovBounds=function(){return[Z.minHfov,Z.maxHfov]},this.setHfovBounds=function(e){return Z.minHfov=Math.max(0,e[0]),Z.maxHfov=Math.max(0,e[1]),this},this.lookAt=function(e,t,o,n){return n=n==a?1e3:Number(n),e!==a&&this.setPitch(e,n),t!==a&&this.setYaw(t,n),o!==a&&this.setHfov(o,n),this},this.getNorthOffset=function(){return Z.northOffset},this.setNorthOffset=function(e){return Z.northOffset=Math.min(360,Math.max(0,e)),T(),this},this.startAutoRotate=function(e){return e=e||ge||1,Z.autoRotate=e,te.lookAt(ee,a,$,3e3),T(),this},this.stopAutoRotate=function(){return ge=Z.autoRotate?Z.autoRotate:ge,Z.autoRotate=!1,Z.autoRotateInactivityDelay=-1,this},this.getRenderer=function(){return V},this.setUpdate=function(e){return be=!0===e,V===a?s():T(),this},this.mouseEventToCoords=function(e){return u(e)},this.loadScene=function(e,t,a,o){return ue&&H(e,t,a,o),this}
1,this.getScene=function(){return Z.scene},this.addScene=function(e,t){return n.scenes[e]=t,this},this.removeScene=function(e){return!(Z.scene===e||!n.scenes.hasOwnProperty(e))&&(delete n.scenes[e],!0)},this.toggleFullscreen=function(){return U(),this},this.getConfig=function(){return Z},this.addHotSpot=function(e,t){if(t===a||Z.scene==t)D(e),Z.hotSpots.push(e),S(e);else{if(!n.scenes.hasOwnProperty(t))throw"Invalid scene ID!";n.scenes[t].hotSpots.push(e)}return this},this.removeHotSpot=function(e){if(!Z.hotSpots)return!1;for(var t=0;t<Z.hotSpots.length;t++)if(Z.hotSpots[t].hasOwnProperty("id")&&Z.hotSpots[t].id===e){for(e=Z.hotSpots[t].div;e.parentNode!=Pe;)e=e.parentNode;return Pe.removeChild(e),delete Z.hotSpots[t].div,Z.hotSpots.splice(t,1),!0}return!1},this.on=function(e,t){return we[e]=we[e]||[],we[e].push(t),this},this.off=function(e,t){if(!e)return we={},this;if(t){var a=we[e].indexOf(t);0<=a&&we[e].splice(a,1),we[e].length=0}else delete we[e];return this},this.destroy=function(){V&&V.destroy(),fe&&(Re.removeEventListener("mousedown",c,!1),t.removeEventListener("mousemove",d,!1),t.removeEventListener("mouseup",f,!1),o.removeEventListener("mousewheel",x,!1),o.removeEventListener("DOMMouseScroll",x,!1),o.removeEventListener("mozfullscreenchange",F,!1),o.removeEventListener("webkitfullscreenchange",F,!1),o.removeEventListener("msfullscreenchange",F,!1),o.removeEventListener("fullscreenchange",F,!1),e.removeEventListener("resize",_,!1),e.removeEventListener("orientationchange",_,!1),o.removeEventListener("keydown",b,!1),o.removeEventListener("keyup",M,!1),o.removeEventListener("blur",E,!1),t.removeEventListener("mouseleave",f,!1),Re.removeEventListener("touchstart",m,!1),Re.removeEventListener("touchmove",p,!1),Re.removeEventListener("touchend",v,!1),Re.removeEventListener("pointerdown",g,!1),Re.removeEventListener("pointermove",y,!1),Re.removeEventListener("pointerup",w,!1),Re.removeEventListener("pointerleave",w,!1)),o.innerHTML="",o.classList.remove("pnlm-container"),o.classList.remove("pnlm-grab"),o.classList.remove("pnlm-grabbing")}}return{viewer:function(e,t){return new o(e,t)}}}(window,document);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.