1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4601],{67567:function(e,t,i){i.d(t,{$N:function(){return eA},AE:function(){return iH},Il:function(){return et},KI:function(){return ic},Of:function(){return ii},P6:function(){return T},T9:function(){return tZ},U3:function(){return eH},Yc:function(){return ie},tl:function(){return h}});var s,o=i(74250),n=i(99477),r=Object.defineProperty,a=(e,t)=>{for(var i in t)r(e,i,{get:t[i],enumerable:!0})},h={};a(h,{ACTIONS:()=>y,ANIMATION_MIN_DURATION:()=>c,CAPTURE_EVENTS_CLASS:()=>g,CTRLZOOM_TIMEOUT:()=>m,DBLCLICK_DELAY:()=>u,EASINGS:()=>M,ICONS:()=>_,IDS:()=>b,KEY_CODES:()=>E,LONGTOUCH_DELAY:()=>p,MOVE_THRESHOLD:()=>d,SPHERE_RADIUS:()=>w,TWOFINGERSOVERLAY_DELAY:()=>v,VIEWER_DATA:()=>f});var l,c=500,d=4,u=300,p=500,v=100,m=2e3,w=10,f="photoSphereViewer",g="psv--capture-event",y=((l=y||{}).ROTATE_UP="ROTATE_UP",l.ROTATE_DOWN="ROTATE_DOWN",l.ROTATE_RIGHT="ROTATE_RIGHT",l.ROTATE_LEFT="ROTATE_LEFT",l.ZOOM_IN="ZOOM_IN",l.ZOOM_OUT="ZOOM_OUT",l),b={MENU:"menu",TWO_FINGERS:"twoFingers",CTRL_ZOOM:"ctrlZoom",ERROR:"error",DESCRIPTION:"description"},E={Enter:"Enter",Control:"Control",Escape:"Escape",Space:" ",PageUp:"PageUp",PageDown:"PageDown",ArrowLeft:"ArrowLeft",ArrowUp:"ArrowUp",ArrowRight:"ArrowRight",ArrowDown:"ArrowDown",Delete:"Delete",Plus:"+",Minus:"-"},_={arrow:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="40 40 432 432"><g transform="rotate(0, 256, 256)"><path fill="currentColor" d="M425.23 210.55H227.39a5 5 0 01-3.53-8.53l56.56-56.57a45.5 45.5 0 000-64.28 45.15 45.15 0 00-32.13-13.3 45.15 45.15 0 00-32.14 13.3L41.32 256l174.83 174.83a45.15 45.15 0 0032.14 13.3 45.15 45.15 0 0032.13-13.3 45.5 45.5 0 000-64.28l-56.57-56.57a5 5 0 013.54-8.53h197.84c25.06 0 45.45-20.39 45.45-45.45s-20.4-45.45-45.45-45.45z"/></g><!-- Created by Flatart from the Noun Project --></svg>\n',close:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><g fill="currentColor" transform=" translate(50, 50) rotate(45)"><rect x="-5" y="-65" width="10" height="130"/><rect x="-65" y="-5" width="130" height="10"/></g></svg>',download:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M83.3 35.6h-17V3H32.2v32.6H16.6l33.6 32.7 33-32.7z"/><path fill="currentColor" d="M83.3 64.2v16.3H16.6V64.2H-.1v32.6H100V64.2H83.3z"/><!--Created by Michael Zenaty from the Noun Project--></svg>\n',fullscreenIn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M100 40H87.1V18.8h-21V6H100zM100 93.2H66V80.3h21.1v-21H100zM34 93.2H0v-34h12.9v21.1h21zM12.9 40H0V6h34v12.9H12.8z"/><!--Created by Garrett Knoll from the Noun Project--></svg>\n',fullscreenOut:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><path fill="currentColor" d="M66 7h13v21h21v13H66zM66 60.3h34v12.9H79v21H66zM0 60.3h34v34H21V73.1H0zM21 7h13v34H0V28h21z"/><!--Created by Garrett Knoll from the Noun Project--></svg>\n',info:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><path fill="currentColor" d="M28.3 26.1c-1 2.6-1.9 4.8-2.6 7-2.5 7.4-5 14.7-7.2 22-1.3 4.4.5 7.2 4.3 7.8 1.3.2 2.8.2 4.2-.1 8.2-2 11.9-8.6 15.7-15.2l-2.2 2a18.8 18.8 0 0 1-7.4 5.2 2 2 0 0 1-1.6-.2c-.2-.1 0-1 0-1.4l.8-1.8L41.9 28c.5-1.4.9-3 .7-4.4-.2-2.6-3-4.4-6.3-4.4-8.8.2-15 4.5-19.5 11.8-.2.3-.2.6-.3 1.3 3.7-2.8 6.8-6.1 11.8-6.2z"/><circle fill="currentColor" cx="39.3" cy="9.2" r="8.2"/><!--Created by Arafat Uddin from the Noun Project--></svg>\n',menu:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 10 80 80"><g fill="currentColor"><circle r="10" cx="20" cy="20"/><circle r="10" cx="50" cy="20"/><circle r="10" cx="80" cy="20"/><circle r="10" cx="20" cy="50"/><circle r="10" cx="50" cy="50"/><circle r="10" cx="80" cy="50"/><circle r="10" cx="20" cy="80"/><circle r="10" cx="50" cy="80"/><circle r="10" cx="80" cy="80"/></g><!-- Created by Richard Kun\xe1k from the Noun Project--></svg>\n',zoomIn:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/>
1<path fill="currentColor" d="M8.728 4.009H6.744v2.737H4.006V8.73h2.738v2.736h1.984V8.73h2.737V6.746H8.728z"/><!--Created by Ryan Canning from the Noun Project--></svg>\n',zoomOut:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path fill="currentColor" d="M14.043 12.22a7.738 7.738 0 1 0-1.823 1.822l4.985 4.985c.503.504 1.32.504 1.822 0a1.285 1.285 0 0 0 0-1.822l-4.984-4.985zm-6.305 1.043a5.527 5.527 0 1 1 0-11.053 5.527 5.527 0 0 1 0 11.053z"/><path fill="currentColor" d="M4.006 6.746h7.459V8.73H4.006z"/><!--Created by Ryan Canning from the Noun Project--></svg>\n'},M={linear:e=>e,inQuad:e=>e*e,outQuad:e=>e*(2-e),inOutQuad:e=>e<.5?2*e*e:-1+(4-2*e)*e,inCubic:e=>e*e*e,outCubic:e=>--e*e*e+1,inOutCubic:e=>e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1,inQuart:e=>e*e*e*e,outQuart:e=>1- --e*e*e*e,inOutQuart:e=>e<.5?8*e*e*e*e:1-8*--e*e*e*e,inQuint:e=>e*e*e*e*e,outQuint:e=>1+--e*e*e*e*e,inOutQuint:e=>e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e,inSine:e=>1-Math.cos(e*(Math.PI/2)),outSine:e=>Math.sin(e*(Math.PI/2)),inOutSine:e=>.5-.5*Math.cos(Math.PI*e),inExpo:e=>Math.pow(2,10*(e-1)),outExpo:e=>1-Math.pow(2,-10*e),inOutExpo:e=>(e=2*e-1)<0?.5*Math.pow(2,10*e):1-.5*Math.pow(2,-10*e),inCirc:e=>1-Math.sqrt(1-e*e),outCirc:e=>Math.sqrt(1-(e-1)*(e-1)),inOutCirc:e=>(e*=2)<1?.5-.5*Math.sqrt(1-e*e):.5+.5*Math.sqrt(1-(e-=2)*e)},T={};function x(e,t){let i=e%t;return i<0&&(i+=t),i}function C(e){return e.reduce((e,t)=>e+t,0)}function L(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function O(e,t){return Math.atan2(t.y-e.y,t.x-e.x)}function P(e,t){return[0,2*Math.PI,-(2*Math.PI)].reduce((i,s)=>{let o=t-e+s;return Math.abs(o)<Math.abs(i)?o:i},1/0)}function I(e,t){return Math.acos(Math.cos(e.pitch)*Math.cos(t.pitch)*Math.cos(e.yaw-t.yaw)+Math.sin(e.pitch)*Math.sin(t.pitch))}function k([e,t],[i,s]){e-i>Math.PI?e-=2*Math.PI:e-i<-Math.PI&&(e+=2*Math.PI);let o=(i-e)*Math.cos((t+s)/2),n=s-t;return Math.sqrt(o*o+n*n)}function S(e){return"string"==typeof e?e.match(/^[a-z]/i)?document.getElementById(e):document.querySelector(e):e}function z(e,t,i){void 0===i?e.classList.toggle(t):i?e.classList.add(t):i||e.classList.remove(t)}function D(e,t){e.classList.add(...t.split(" ").filter(e=>!!e))}function H(e,t){e.classList.remove(...t.split(" ").filter(e=>!!e))}function A(e,t){let i=e;do{if(i===t)return!0;i=i.parentElement}while(i);return!1}function N(e,t){if(!e?.matches)return null;let i=e;do{if(i.matches(t))return i;i=i.parentElement}while(i);return null}function R(e){return e?.composedPath()[0]||null}function F(e,t){return e?e.composedPath().find(e=>!!(e instanceof HTMLElement||e instanceof SVGElement)&&e.matches(t)):null}function V(e){let t=0,i=0,s=e;for(;s;)t+=s.offsetLeft-s.scrollLeft+s.clientLeft,i+=s.offsetTop-s.scrollTop+s.clientTop,s=s.offsetParent;return t-=window.scrollX,i-=window.scrollY,{x:t,y:i}}function j(e,t){return window.getComputedStyle(e).getPropertyValue(t)}function U(e){if(e.touches.length<2)return null;let t={x:e.touches[0].clientX,y:e.touches[0].clientY},i={x:e.touches[1].clientX,y:e.touches[1].clientY};return{distance:L(t,i),angle:O(t,i),center:{x:(t.x+i.x)/2,y:(t.y+i.y)/2}}}function W(e,t=!1){return t?e===s:document.fullscreenElement===e}function $(e,t=!1){t?(s=e,e.classList.add("psv-fullscreen-emulation"),document.dispatchEvent(new Event("fullscreenchange"))):e.requestFullscreen()}function Y(e=!1){e?(s.classList.remove("psv-fullscreen-emulation"),s=null,document.dispatchEvent(new Event("fullscreenchange"))):document.exitFullscreen()}function X(e){return e.replace(/[A-Z](?:(?=[^A-Z])|[A-Z]*(?=[A-Z][^A-Z]|$))/g,(e,t)=>(t>0?"-":"")+e.toLowerCase())}function Z(e,t){let i=!1;return function(...s){i||(i=!0,setTimeout(()=>{e.apply(this,s),i=!1},t))}}function B(e){if("object"!=typeof e||null===e||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function K(e,t){return function e(i,s){return Array.isArray(s)?(i&&Array.isArray(i)?i.length=0:i=[],s.forEach((t,s)=>{i[s]=e(null,t)})):"object"==typeof s?((!i||Array.isArray(i))&&(i={}
1),Object.keys(s).forEach(o=>{"__proto__"!==o&&("object"==typeof s[o]&&s[o]&&B(s[o])?s[o]!==t&&(i[o]?e(i[o],s[o]):i[o]=e(null,s[o])):i[o]=s[o])})):i=s,i}(e,t)}function q(e){return K(null,e)}function G(e){return!e||0===Object.keys(e).length&&e.constructor===Object}function Q(e){return null==e}function J(...e){for(let t of e)if(!Q(t))return t;return null}function ee(e){return"object"==typeof e&&null!==e}a(T,{Animation:()=>eP,Dynamic:()=>eI,MultiDynamic:()=>ek,PressHandler:()=>eS,Slider:()=>eD,SliderDirection:()=>ez,addClasses:()=>D,angle:()=>O,applyEulerInverse:()=>e_,checkClosedShadowDom:()=>eC,checkStylesheet:()=>eT,checkVersion:()=>ex,cleanCssPosition:()=>em,clone:()=>q,createTexture:()=>eb,cssPositionIsOrdered:()=>ew,dasherize:()=>X,deepEqual:()=>function e(t,i){if(t===i)return!0;if(!(ee(t)&&ee(i))||Object.keys(t).length!==Object.keys(i).length)return!1;for(let s of Object.keys(t))if(!e(t[s],i[s]))return!1;return!0},deepmerge:()=>K,distance:()=>L,exitFullscreen:()=>Y,firstNonNull:()=>J,getAbortError:()=>eo,getAngle:()=>I,getClosest:()=>N,getConfigParser:()=>eM,getElement:()=>S,getEventTarget:()=>R,getMatchingTarget:()=>F,getPosition:()=>V,getShortestArc:()=>P,getStyleProperty:()=>j,getTouchData:()=>U,getXMPValue:()=>eh,greatArcDistance:()=>k,hasParent:()=>A,invertResolvableBoolean:()=>es,isAbortError:()=>en,isEmpty:()=>G,isExtendedPosition:()=>ea,isFullscreenEnabled:()=>W,isNil:()=>Q,isPlainObject:()=>B,logWarn:()=>er,mergePanoData:()=>eL,parseAngle:()=>ey,parsePoint:()=>ev,parseSpeed:()=>ef,removeClasses:()=>H,requestFullscreen:()=>$,resolveBoolean:()=>ei,speedToDuration:()=>eg,sum:()=>C,throttle:()=>Z,toggleClass:()=>z,wrap:()=>x});var et=class e extends Error{constructor(t,i){super(i&&i instanceof Error?`${t}: ${i.message}`:t),this.name="PSVError",Error.captureStackTrace?.(this,e)}};function ei(e,t){B(e)?(t(e.initial,!0),e.promise.then(e=>t(e,!1))):t(e,!0)}function es(e){return{initial:!e.initial,promise:e.promise.then(e=>!e)}}function eo(){let e=Error("Loading was aborted.");return e.name="AbortError",e}function en(e){return e?.name==="AbortError"}function er(e){console.warn(`PhotoSphereViewer: ${e}`)}function ea(e){return!(!e||Array.isArray(e))&&[["textureX","textureY"],["yaw","pitch"]].some(([t,i])=>void 0!==e[t]&&void 0!==e[i])}function eh(e,t,i=!0){let s=e.match("<GPano:"+t+">(.*)</GPano:"+t+">");if(null!==s){let o=i?parseInt(s[1],10):parseFloat(s[1]);return isNaN(o)?null:o}if(null!==(s=e.match("GPano:"+t+'="(.*?)"'))){let n=i?parseInt(s[1],10):parseFloat(s[1]);return isNaN(n)?null:n}return null}var el={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},ec=["left","center","right"],ed=["top","center","bottom"],eu=[...ec,...ed],ep="center";function ev(e){if(!e)return{x:.5,y:.5};if("object"==typeof e)return e;let t=e.toLocaleLowerCase().split(" ").slice(0,2);1===t.length&&(t=el[t[0]]?[t[0],ep]:[t[0],t[0]]);let i="left"!==t[1]&&"right"!==t[1]&&"top"!==t[0]&&"bottom"!==t[0];t=t.map(e=>el[e]||e),i||t.reverse();let s=t.join(" ").match(/^([0-9.]+)% ([0-9.]+)%$/);return s?{x:parseFloat(s[1])/100,y:parseFloat(s[2])/100}:{x:.5,y:.5}}function em(e,{allowCenter:t,cssOrder:i}={allowCenter:!0,cssOrder:!0}){return e?("string"==typeof e&&(e=e.split(" ")),1===e.length&&(e[0]===ep?e=[ep,ep]:-1!==ec.indexOf(e[0])?e=[ep,e[0]]:-1!==ed.indexOf(e[0])&&(e=[e[0],ep])),2!==e.length||-1===eu.indexOf(e[0])||-1===eu.indexOf(e[1]))?(er(`Unparsable position ${e}`),null):t||e[0]!==ep||e[1]!==ep?(i&&!ew(e)&&(e=[e[1],e[0]]),e[1]===ep&&-1!==ec.indexOf(e[0])&&(e=[ep,e[0]]),e[0]===ep&&-1!==ed.indexOf(e[1])&&(e=[e[1],ep]),e):(er("Invalid position center center"),null):null}function ew(e){return -1!==ed.indexOf(e[0])&&-1!==ec.indexOf(e[1])}function ef(e){let t;if("string"==typeof e){let i=e.toString().trim(),s=parseFloat(i.replace(/^(-?[0-9]+(?:\.[0-9]*)?).*$/,"$1")),n=i.replace(/^-?[0-9]+(?:\.[0-9]*)?(.*)$/,"$1").trim();switch(n.match(/(pm|per minute)$/)&&(s/=60),n){case"dpm":case"degrees per minute":case"dps":case"degrees per second":t=o.M8C.degToRad(s);break;case"rdpm":case"radians per minute":case"rdps":case"radians per second":t=s;break;case"rpm":case"revolutions per minute":case"rps":case"revolutions per second":t=s*Math.PI*2;break;default:throw new et(`Unknown speed unit "${n}"`)}}else t=e;return t}function eg(e,t){if("number"==typeof e)return Math.abs(e);{let i=ef(e);return t/Math.abs(i)*1e3}}function ey(e,t=!1,i=t){let s;if("string"==typeof e){let n=e.toLowerCase().trim().match(/^(-?[0-9]+(?:\.[0-9]*)?)(.*)$/);if(!n)throw new et(`Unknown angle "${e}"`);let r=parseFloat(n[1]),a=n[2];if(a)switch(a){case"deg":case"degs":s=o.M8C.degToRad(r);break;case"rad":case"rads":s=r;break;default:throw new et(`Unknown angle unit "${a}"`)}else s=r}else if("number"!=typeof e||isNaN(e))throw new et(`Unknown angle "${e}"`);else s=e;return s=x(t?s+Math.PI:s,2*Math.PI),t?o.M8C.clamp(s-Math.PI,-Math.PI/(i?2:1),Math.PI/(i?2:1)):s}function eb(e,t=!1){let i=new o.xEZ(e);return i.needsUpdate=!0,i.minFilter=t?o.D1R:o.wem,i.generateMipmaps=t,i.anisotropy=t?2:1,i}var eE=new o._fP;function e_(e,t){eE.setFromEuler(t).invert(),e.applyQuaternion(eE)}function eM(e,t){let i=function(i){let s=q({...e,...i}),o={};for(let[n,r]of Object.entries(s)){if(t&&n in t)r=t[n](r,{rawConfig:s,defValue:e[n]});else if(!(n in e)){er(`Unknown option ${n}`);continue}o[n]=r}return o};return i.defaults=e,i.parsers=t||{},i}function eT(e,t){"true"!==j(e,`--psv-${t}-loaded`)&&console.error(`PhotoSphereViewer: stylesheet "@photo-sphere-viewer/${t}/index.css" is not loaded`)}function ex(e,t,i){t&&t!==i&&console.error(`PhotoSphereViewer: @photo-sphere-viewer/${e} is in version ${t} but @photo-sphere-viewer/core is in version ${i}`)}function eC(e){do{if(e instanceof ShadowRoot&&"closed"===e.mode){console.error("PhotoSphereViewer: closed shadow DOM detected, the viewer might not work as expected");return}e=e.parentNode}while(e)}function eL(e,t,i,s){let o={isEquirectangular:!0,fullWidth:J(i?.fullWidth,s?.fullWidth),fullHeight:J(i?.fullHeight,s?.fullHeight),croppedWidth:e,croppedHeight:t,croppedX:J(i?.croppedX,s?.croppedX),croppedY:J(i?.croppedY,s?.croppedY),poseHeading:J(i?.poseHeading,s?.poseHeading,0),posePitch:J(i?.posePitch,s?.posePitch,0),poseRoll:J(i?.poseRoll,s?.poseRoll,0),initialHeading:s?.initialHeading,initialPitch:s?.initialPitch,initialFov:s?.initialFov};return o.fullWidth||o.fullHeight||(o.fullWidth=Math.max(e,2*t),o.fullHeight=Math.round(o.fullWidth/2)),o.fullWidth||(o.fullWidth=2*o.fullHeight),o.fullHeight||(o.fullHeight=Math.round(o.fullWidth/2)),null===o.croppedX&&(o.croppedX=Math.round((o.fullWidth-e)/2)),null===o.croppedY&&(o.croppedY=Math.round((o.fullHeight-t)/2)),Math.abs(o.fullWidth-2*o.fullHeight)>1&&(er("Invalid panoData, fullWidth should be twice fullHeight"),o.fullHeight=Math.round(o.fullWidth/2)),o.croppedX+o.croppedWidth>o.fullWidth&&(er("Invalid panoData, croppedX + croppedWidth > fullWidth"),o.croppedX=o.fullWidth-o.croppedWidth),o.croppedY+o.croppedHeight>o.fullHeight&&(er("Invalid panoData, croppedY + croppedHeight > fullHeight"),o.croppedY=o.fullHeight-o.croppedHeight),o.croppedX<0&&(er("Invalid panoData, croppedX < 0"),o.croppedX=0),o.croppedY<0&&(er("Invalid panoData, croppedY < 0"),o.croppedY=0),o}var eO,eP=class{constructor(e){this.easing=M.linear,this.callbacks=[],this.resolved=!1,this.cancelled=!1,this.options=e,e?(e.easing&&(this.easing="function"==typeof e.easing?e.easing:M[e.easing]||M.linear),this.delayTimeout=setTimeout(()=>{this.delayTimeout=void 0,this.animationFrame=window.requestAnimationFrame(e=>this.__run(e))},e.delay||0)):this.resolved=!0}__run(e){if(this.cancelled)return;this.start||(this.start=e);let t=(e-this.start)/this.options.duration,i={};if(t<1){for(let[s,o]of Object.entries(this.options.properties))if(o){let n=o.start+(o.end-o.start)*this.easing(t);i[s]=n}
vendor: 6,838 bytes, line 1
1this.options.onTick(i,t),this.animationFrame=window.requestAnimationFrame(e=>this.__run(e))}else{for(let[r,a]of Object.entries(this.options.properties))a&&(i[r]=a.end);this.options.onTick(i,1),this.__resolve(!0),this.animationFrame=void 0}}__resolve(e){e?this.resolved=!0:this.cancelled=!0,this.callbacks.forEach(t=>t(e)),this.callbacks.length=0}then(e){return this.resolved||this.cancelled?Promise.resolve(this.resolved).then(e):new Promise(e=>{this.callbacks.push(e)}).then(e)}cancel(){this.cancelled||this.resolved||(this.__resolve(!1),this.delayTimeout&&(window.clearTimeout(this.delayTimeout),this.delayTimeout=void 0),this.animationFrame&&(window.cancelAnimationFrame(this.animationFrame),this.animationFrame=void 0))}},eI=class{constructor(e,t){if(this.fn=e,this.mode=0,this.speed=0,this.speedMult=0,this.currentSpeed=0,this.target=0,this.__current=0,this.min=t.min,this.max=t.max,this.wrap=t.wrap,this.current=t.defaultValue,this.wrap&&0!==this.min)throw new et("invalid config");this.fn&&this.fn(this.current)}get current(){return this.__current}set current(e){this.__current=e}setSpeed(e){this.speed=e}goto(e,t=1){this.mode=2,this.target=this.wrap?x(e,this.max):o.M8C.clamp(e,this.min,this.max),this.speedMult=t}step(e,t=1){0===t?this.setValue(this.current+e):(2!==this.mode&&(this.target=this.current),this.goto(this.target+e,t))}roll(e=!1,t=1){this.mode=1,this.target=e?-1/0:1/0,this.speedMult=t}stop(){this.mode=0}setValue(e){return this.target=this.wrap?x(e,this.max):o.M8C.clamp(e,this.min,this.max),this.mode=0,this.currentSpeed=0,this.target!==this.current&&(this.current=this.target,this.fn&&this.fn(this.current),!0)}update(e){if(2===this.mode){this.wrap&&Math.abs(this.target-this.current)>this.max/2&&(this.current=this.current<this.target?this.current+this.max:this.current-this.max);let t=this.currentSpeed*this.currentSpeed/(this.speed*this.speedMult*4);Math.abs(this.target-this.current)<=t&&(this.mode=0)}let i=0===this.mode?0:this.speed*this.speedMult;this.target<this.current&&(i=-i),this.currentSpeed<i?this.currentSpeed=Math.min(i,this.currentSpeed+e/1e3*this.speed*this.speedMult*2):this.currentSpeed>i&&(this.currentSpeed=Math.max(i,this.currentSpeed-e/1e3*this.speed*this.speedMult*2));let s=null;return this.current>this.target&&this.currentSpeed?s=Math.max(this.target,this.current+this.currentSpeed*e/1e3):this.current<this.target&&this.currentSpeed&&(s=Math.min(this.target,this.current+this.currentSpeed*e/1e3)),null!==s&&(s=this.wrap?x(s,this.max):o.M8C.clamp(s,this.min,this.max))!==this.current&&(this.current=s,this.fn&&this.fn(this.current),!0)}},ek=class{constructor(e,t){this.fn=e,this.dynamics=t,this.fn&&this.fn(this.current)}get current(){return Object.entries(this.dynamics).reduce((e,[t,i])=>(e[t]=i.current,e),{})}setSpeed(e){for(let t of Object.values(this.dynamics))t.setSpeed(e)}goto(e,t=1){for(let[i,s]of Object.entries(e))this.dynamics[i].goto(s,t)}step(e,t=1){if(0===t)this.setValue(Object.keys(e).reduce((t,i)=>(t[i]=e[i]+this.dynamics[i].current,t),{}));else for(let[i,s]of Object.entries(e))this.dynamics[i].step(s,t)}roll(e,t=1){for(let[i,s]of Object.entries(e))this.dynamics[i].roll(s,t)}stop(){for(let e of Object.values(this.dynamics))e.stop()}setValue(e){let t=!1;for(let[i,s]of Object.entries(e))t=this.dynamics[i].setValue(s)||t;return t&&this.fn&&this.fn(this.current),t}update(e){let t=!1;for(let i of Object.values(this.dynamics))t=i.update(e)||t;return t&&this.fn&&this.fn(this.current),t}},eS=class{constructor(e=200){this.delay=e,this.time=0,this.delay=e}get pending(){return 0!==this.time}down(e){this.timeout&&(clearTimeout(this.timeout),this.timeout=void 0),this.time=new Date().getTime(),this.data=e}up(e){if(!this.time)return;let t=Date.now()-this.time;t<this.delay?this.timeout=setTimeout(()=>{e(this.data),this.timeout=void 0,this.time=0,this.data=void 0},this.delay):(e(this.data),this.time=0,this.data=void 0)}},ez=((eO=ez||{}).VERTICAL="VERTICAL",eO.HORIZONTAL="HORIZONTAL",eO),eD=class{constructor(e,t,i){this.container=e,this.direction=t,this.listener=i,this.mousedown=!1,this.mouseover=!1,this.container.addEventListener("click",this),this.container.addEventListener("mousedown",this),this.container.addEventListener("mouseenter",this),this.container.addEventListener("mouseleave",this),this.container.addEventListener("touchstart",this),this.container.addEventListener("mousemove",this,!0),this.container.addEventListener("touchmove",this,!0),window.addEventListener("mouseup",this),window.addEventListener("touchend",this)}get isVertical(){return"VERTICAL"===this.direction}get isHorizontal(){return"HORIZONTAL"===this.direction}destroy(){window.removeEventListener("mouseup",this),window.removeEventListener("touchend",this)}handleEvent(e){switch(e.type){case"click":e.stopPropagation();break;case"mousedown":this.__onMouseDown(e);break;case"mouseenter":this.__onMouseEnter(e);break;case"mouseleave":this.__onMouseLeave(e);break;case"touchstart":this.__onTouchStart(e);break;case"mousemove":this.__onMouseMove(e);break;case"touchmove":this.__onTouchMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchend":this.__onTouchEnd(e)}}__onMouseDown(e){this.mousedown=!0,this.__update(e.clientX,e.clientY,!0)}__onMouseEnter(e){this.mouseover=!0,this.__update(e.clientX,e.clientY,!0)}__onTouchStart(e){this.mouseover=!0,this.mousedown=!0;let t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!0)}__onMouseMove(e){(this.mousedown||this.mouseover)&&(e.stopPropagation(),this.__update(e.clientX,e.clientY,!0))}__onTouchMove(e){if(this.mousedown||this.mouseover){e.stopPropagation();let t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!0)}}__onMouseUp(e){this.mousedown&&(this.mousedown=!1,this.__update(e.clientX,e.clientY,!1))}__onMouseLeave(e){this.mouseover&&(this.mouseover=!1,this.__update(e.clientX,e.clientY,!0))}__onTouchEnd(e){if(this.mousedown){this.mouseover=!1,this.mousedown=!1;let t=e.changedTouches[0];this.__update(t.clientX,t.clientY,!1)}}__update(e,t,i){let s=this.container.getBoundingClientRect(),n;n=this.isVertical?o.M8C.clamp((s.bottom-t)/s.height,0,1):o.M8C.clamp((e-s.left)/s.width,0,1),this.listener({value:n,click:!i,mousedown:this.mousedown,mouseover:this.mouseover,cursor:{clientX:e,clientY:t}})}},eH={};a(eH,{BeforeAnimateEvent:()=>eV,BeforeRenderEvent:()=>eU,BeforeRotateEvent:()=>e$,ClickEvent:()=>eX,ConfigChangedEvent:()=>eB,DoubleClickEvent:()=>eq,FullscreenEvent:()=>eQ,HideNotificationEvent:()=>e0,HideOverlayEvent:()=>e2,HidePanelEvent:()=>e5,HideTooltipEvent:()=>e8,KeypressEvent:()=>e6,LoadProgressEvent:()=>te,ObjectEnterEvent:()=>tz,ObjectEvent:()=>tk,ObjectHoverEvent:()=>tN,ObjectLeaveEvent:()=>tH,PanoramaErrorEvent:()=>tr,PanoramaLoadEvent:()=>ti,PanoramaLoadedEvent:()=>to,PositionUpdatedEvent:()=>tc,ReadyEvent:()=>tv,RenderEvent:()=>tw,RollUpdatedEvent:()=>tu,ShowNotificationEvent:()=>
1tg,ShowOverlayEvent:()=>tb,ShowPanelEvent:()=>t_,ShowTooltipEvent:()=>tT,SizeUpdatedEvent:()=>tC,StopAllEvent:()=>tO,TransitionDoneEvent:()=>th,ViewerEvent:()=>eR,ZoomUpdatedEvent:()=>tI});var eA=class extends Event{constructor(e,t=!1){super(e,{cancelable:t})}},eN=class extends EventTarget{dispatchEvent(e){return super.dispatchEvent(e)}addEventListener(e,t,i){super.addEventListener(e,t,i)}removeEventListener(e,t,i){super.removeEventListener(e,t,i)}},eR=class extends eA{},eF=class e extends eR{constructor(t,i){super(e.type,!0),this.position=t,this.zoomLevel=i}};eF.type="before-animate";var eV=eF,ej=class e extends eR{constructor(t,i){super(e.type),this.timestamp=t,this.elapsed=i}};ej.type="before-render";var eU=ej,eW=class e extends eR{constructor(t){super(e.type,!0),this.position=t}};eW.type="before-rotate";var e$=eW,eY=class e extends eR{constructor(t){super(e.type),this.data=t}};eY.type="click";var eX=eY,eZ=class e extends eR{constructor(t){super(e.type),this.options=t}containsOptions(...e){return e.some(e=>this.options.includes(e))}};eZ.type="config-changed";var eB=eZ,eK=class e extends eR{constructor(t){super(e.type),this.data=t}};eK.type="dblclick";var eq=eK,eG=class e extends eR{constructor(t){super(e.type),this.fullscreenEnabled=t}};eG.type="fullscreen";var eQ=eG,eJ=class e extends eR{constructor(t){super(e.type),this.notificationId=t}};eJ.type="hide-notification";var e0=eJ,e1=class e extends eR{constructor(t){super(e.type),this.overlayId=t}};e1.type="hide-overlay";var e2=e1,e3=class e extends eR{constructor(t){super(e.type),this.panelId=t}};e3.type="hide-panel";var e5=e3,e4=class e extends eR{constructor(t){super(e.type),this.tooltipData=t}};e4.type="hide-tooltip";var e8=e4,e7=class e extends eR{constructor(t,i){super(e.type,!0),this.key=t,this.originalEvent=i}};e7.type="key-press";var e6=e7,e9=class e extends eR{constructor(t){super(e.type),this.progress=t}};e9.type="load-progress";var te=e9,tt=class e extends eR{constructor(t){super(e.type),this.panorama=t}};tt.type="panorama-load";var ti=tt,ts=class e extends eR{constructor(t){super(e.type),this.data=t}};ts.type="panorama-loaded";var to=ts,tn=class e extends eR{constructor(t,i){super(e.type),this.panorama=t,this.error=i}};tn.type="panorama-error";var tr=tn,ta=class e extends eR{constructor(t){super(e.type),this.completed=t}};ta.type="transition-done";var th=ta,tl=class e extends eR{constructor(t){super(e.type),this.position=t}};tl.type="position-updated";var tc=tl,td=class e extends eR{constructor(t){super(e.type),this.roll=t}};td.type="roll-updated";var tu=td,tp=class e extends eR{constructor(){super(e.type)}};tp.type="ready";var tv=tp,tm=class e extends eR{constructor(){super(e.type)}};tm.type="render";var tw=tm,tf=class e extends eR{constructor(t){super(e.type),this.notificationId=t}};tf.type="show-notification";var tg=tf,ty=class e extends eR{constructor(t){super(e.type),this.overlayId=t}};ty.type="show-overlay";var tb=ty,tE=class e extends eR{constructor(t){super(e.type),this.panelId=t}};tE.type="show-panel";var t_=tE,tM=class e extends eR{constructor(t,i){super(e.type),this.tooltip=t,this.tooltipData=i}};tM.type="show-tooltip";var tT=tM,tx=class e extends eR{constructor(t){super(e.type),this.size=t}};tx.type="size-updated";var tC=tx,tL=class e extends eR{constructor(){super(e.type)}};tL.type="stop-all";var tO=tL,tP=class e extends eR{constructor(t){super(e.type),this.zoomLevel=t}};tP.type="zoom-updated";var tI=tP,tk=class extends eR{constructor(e,t,i,s,o){super(e),this.originalEvent=t,this.object=i,this.viewerPoint=s,this.userDataKey=o}},tS=class e extends tk{constructor(t,i,s,o){super(e.type,t,i,s,o)}};tS.type="enter-object";var tz=tS,tD=class e extends tk{constructor(t,i,s,o){super(e.type,t,i,s,o)}};tD.type="leave-object";var tH=tD,tA=class e extends tk{constructor(t,i,s,o){super(e.type,t,i,s,o)}};tA.type="hover-object";var tN=tA,tR=class{constructor(e){this.viewer=e}init(){}destroy(){}supportsTransition(e){return!1}supportsPreload(e){return!1}textureCoordsToSphericalCoords(e,t){throw new et("Current adapter does not support texture coordinates.")}sphericalCoordsToTextureCoords(e,t){throw new et("Current adapter does not support texture coordinates.")}};function tF(e){if(e){for(let[,t]of[["_",e],...Object.entries(e)])if(t.prototype instanceof tR)return ex(t.id,t.VERSION,"5.13.2"),t}return null}tR.supportsDownload=!1;var tV=`${f}
1_touchSupport`,tj={loaded:!1,pixelRatio:1,isWebGLSupported:!1,maxTextureWidth:0,isTouchEnabled:null,__maxCanvasWidth:null,isIphone:!1,get maxCanvasWidth(){return null===this.__maxCanvasWidth&&(this.__maxCanvasWidth=function(e){let t=e,i=!1,s=document.createElement("canvas"),o=s.getContext("2d");for(s.width=1,s.height=1;t>1024&&!i;){let n=document.createElement("canvas"),r=n.getContext("2d");n.width=t,n.height=t/2;try{r.fillStyle="white",r.fillRect(t-1,t/2-1,1,1),o.drawImage(n,t-1,t/2-1,1,1,0,0,1,1),o.getImageData(0,0,1,1).data[0]>0&&(i=!0)}catch{}n.width=0,n.height=0,i||(t/=2)}if(i)return t;throw new et("Unable to detect system capabilities")}(this.maxTextureWidth)),this.__maxCanvasWidth},load(){if(!this.loaded){let e=function(){try{let e=document.createElement("canvas");return e.getContext("webgl2")}catch{return null}}();this.pixelRatio=window.devicePixelRatio||1,this.isWebGLSupported=!!e,this.maxTextureWidth=e?e.getParameter(e.MAX_TEXTURE_SIZE):0,this.isTouchEnabled=function(){let e="ontouchstart"in window||navigator.maxTouchPoints>0;tV in localStorage&&(e="true"===localStorage[tV]);let t=new Promise(t=>{let i=()=>{window.removeEventListener("mousedown",s),window.removeEventListener("touchstart",o),clearTimeout(r)},s=()=>{i(),localStorage[tV]=!1,t(!1)},o=()=>{i(),localStorage[tV]=!0,t(!0)},n=()=>{i(),localStorage[tV]=e,t(e)};window.addEventListener("mousedown",s,!1),window.addEventListener("touchstart",o,!1);let r=setTimeout(n,1e4)}
1);return{initial:e,promise:t}}(),this.isIphone=/iPhone/i.test(navigator.userAgent),this.loaded=!0}if(!tj.isWebGLSupported)throw new et("WebGL 2 is not supported.");if(0===tj.maxTextureWidth)throw new et("Unable to detect system capabilities")}},tU=eM({resolution:64,useXmpData:!0,blur:!1},{resolution(e){if(!e||!o.M8C.isPowerOfTwo(e))throw new et("EquirectangularAdapter resolution must be power of two.");return e}}),tW=class extends tR{constructor(e,t){super(e),this.config=tU(t),this.SPHERE_SEGMENTS=this.config.resolution,this.SPHERE_HORIZONTAL_SEGMENTS=this.SPHERE_SEGMENTS/2}supportsTransition(){return!0}supportsPreload(){return!0}textureCoordsToSphericalCoords(e,t){if(Q(e.textureX)||Q(e.textureY))throw new et("Texture position is missing 'textureX' or 'textureY'");let i=(e.textureX+t.croppedX)/t.fullWidth*Math.PI*2,s=(e.textureY+t.croppedY)/t.fullHeight*Math.PI;return{yaw:i>=Math.PI?i-Math.PI:i+Math.PI,pitch:Math.PI/2-s}}sphericalCoordsToTextureCoords(e,t){let i=e.yaw/Math.PI/2*t.fullWidth,s=e.pitch/Math.PI*t.fullHeight,o=Math.round(e.yaw<Math.PI?i+t.fullWidth/2:i-t.fullWidth/2)-t.croppedX,n=Math.round(t.fullHeight/2-s)-t.croppedY;return(o<0||o>t.croppedWidth||n<0||n>t.croppedHeight)&&(o=n=void 0),{textureX:o,textureY:n}}async loadTexture(e,t=!0,i,s=this.config.useXmpData){if("string"!=typeof e&&("object"!=typeof e||!e.path))return Promise.reject(new et("Invalid panorama url, are you using the right adapter?"));let o;o="string"==typeof e?{path:e,data:i}:{data:i,...e};let n=await this.viewer.textureLoader.loadFile(o.path,t?e=>this.viewer.textureLoader.dispatchProgress(e):null,o.path),r=s?await this.loadXMP(n):null,a=await this.viewer.textureLoader.blobToImage(n);"function"==typeof o.data&&(o.data=o.data(a,r));let h=eL(a.width,a.height,o.data,r),l=this.createEquirectangularTexture(a);return{panorama:e,texture:l,panoData:h,cacheKey:o.path}}async loadXMP(e){let t=await this.loadBlobAsString(e),i=t.indexOf("<x:xmpmeta");if(-1===i)return null;let s=t.indexOf("</x:xmpmeta>",i);if(-1===s)return null;let o=t.substring(i,s);return o.includes("GPano:")?{fullWidth:eh(o,"FullPanoWidthPixels"),fullHeight:eh(o,"FullPanoHeightPixels"),croppedWidth:eh(o,"CroppedAreaImageWidthPixels"),croppedHeight:eh(o,"CroppedAreaImageHeightPixels"),croppedX:eh(o,"CroppedAreaLeftPixels"),croppedY:eh(o,"CroppedAreaTopPixels"),poseHeading:eh(o,"PoseHeadingDegrees",!1),posePitch:eh(o,"PosePitchDegrees",!1),poseRoll:eh(o,"PoseRollDegrees",!1),initialHeading:eh(o,"InitialViewHeadingDegrees",!1),initialPitch:eh(o,"InitialViewPitchDegrees",!1),initialFov:eh(o,"InitialHorizontalFOVDegrees",!1)}:null}loadBlobAsString(e){return new Promise((t,i)=>{let s=new FileReader;s.onload=()=>t(s.result),s.onerror=i,s.readAsText(e)})}createEquirectangularTexture(e){if(this.config.blur||e.width>tj.maxTextureWidth){let t=Math.min(1,tj.maxCanvasWidth/e.width),i=new OffscreenCanvas(Math.floor(e.width*t),Math.floor(e.height*t)),s=i.getContext("2d");return this.config.blur&&(s.filter=`blur(${i.width/2048}px)`),s.drawImage(e,0,0,i.width,i.height),eb(i)}return eb(e)}createMesh(e){let t=e.croppedX/e.fullWidth*2*Math.PI,i=e.croppedWidth/e.fullWidth*2*Math.PI,s=e.croppedY/e.fullHeight*Math.PI,n=e.croppedHeight/e.fullHeight*Math.PI,r=new o.xo$(w,Math.round(this.SPHERE_SEGMENTS/(2*Math.PI)*i),Math.round(this.SPHERE_HORIZONTAL_SEGMENTS/Math.PI*n),-Math.PI/2+t,i,s,n).scale(-1,1,1),a=new o.vBJ({depthTest:!1,depthWrite:!1});return new o.Kj0(r,a)}setTexture(e,t){e.material.map=t.texture}setTextureOpacity(e,t){e.material.opacity=t,e.material.transparent=t<1}disposeTexture({texture:e}){e.dispose()}disposeMesh(e){e.geometry.dispose(),e.material.dispose()}};tW.id="equirectangular",tW.VERSION="5.13.2",tW.supportsDownload=!0;var t$=class extends tW{constructor(e,t){super(e,{resolution:t?.resolution??64,useXmpData:!1})}async loadTexture(e,t){let i=await super.loadTexture(e,t,null,!1);return i.panoData=null,i}createMesh(){let e=new o.xo$(w,this.SPHERE_SEGMENTS,this.SPHERE_HORIZONTAL_SEGMENTS).scale(-1,1,1).toNonIndexed(),t=e.getAttribute("uv"),i=e.getAttribute("normal");for(let s=0;s<t.count;s++)for(let n=0;n<3;n++){let r=3*s+n,a=i.getX(r),h=i.getY(r),l=i.getZ(r);if(s<t.count/6){let c=0===a&&0===l?1:Math.acos(h)/Math.sqrt(a*a+l*l)*(2/Math.PI);t.setXY(r,.23675*a*c+1/4,.4735*l*c+.5)}else{let d=0===a&&0===l?1:Math.acos(-h)/Math.sqrt(a*a+l*l)*(2/Math.PI);t.setXY(r,-(.23675*a)*d+3/4,.4735*l*d+.5)}}e.rotateX(-Math.PI/2),e.rotateY(Math.PI);let u=new o.vBJ({depthTest:!1,depthWrite:!1});return new o.Kj0(e,u)}};t$.id="dual-fisheye",t$.VERSION="5.13.2";var tY=class e{constructor(t,i){this.parent=t,this.children=[],this.state={visible:!0},this.viewer=t instanceof e?t.viewer:t,this.container=document.createElement(i.tagName??"div"),this.container.className=i.className||"",this.parent.children.push(this),this.parent.container.appendChild(this.container)}destroy(){this.parent.container.removeChild(this.container);let e=this.parent.children.indexOf(this);-1!==e&&this.parent.children.splice(e,1),this.children.slice().forEac
vendor: 5,034 bytes, line 1
1h(e=>e.destroy()),this.children.length=0}toggle(e=!this.isVisible()){e?this.show():this.hide()}hide(e){this.container.style.display="none",this.state.visible=!1}show(e){this.container.style.display="",this.state.visible=!0}isVisible(){return this.state.visible}},tX=eM({id:null,tagName:null,className:null,title:null,hoverScale:!1,collapsable:!1,tabbable:!0,icon:null,iconActive:null}),tZ=class extends tY{constructor(e,t){super(e,{tagName:t.tagName,className:`psv-button ${t.hoverScale?"psv-button--hover-scale":""} ${t.className||""}`}),this.state={visible:!0,enabled:!0,supported:!0,collapsed:!1,active:!1,width:0},this.config=tX(t),t.id||(this.config.id=this.constructor.id),t.icon&&this.__setIcon(t.icon),this.state.width=this.container.offsetWidth,this.config.title?this.container.title=this.viewer.config.lang[this.config.title]??this.config.title:this.id&&this.id in this.viewer.config.lang&&(this.container.title=this.viewer.config.lang[this.id]),t.tabbable&&(this.container.tabIndex=0),this.container.addEventListener("click",e=>{this.state.enabled&&this.onClick(),e.stopPropagation()}),this.container.addEventListener("keydown",e=>{e.key===E.Enter&&this.state.enabled&&(this.onClick(),e.stopPropagation())})}get id(){return this.config.id}get title(){return this.container.title}get content(){return this.container.innerHTML}get width(){return this.state.width}get collapsable(){return this.config.collapsable}show(e=!0){!this.isVisible()&&(this.state.visible=!0,this.state.collapsed||(this.container.style.display=""),e&&this.viewer.navbar.autoSize())}hide(e=!0){this.isVisible()&&(this.state.visible=!1,this.container.style.display="none",e&&this.viewer.navbar.autoSize())}checkSupported(){ei(this.isSupported(),(e,t)=>{this.state&&(this.state.supported=e,t?e||this.hide():this.toggle(e))})}autoSize(){}isSupported(){return!0}toggleActive(e=!this.state.active){e!==this.state.active&&(this.state.active=e,z(this.container,"psv-button--active",this.state.active),this.config.iconActive&&this.__setIcon(this.state.active?this.config.iconActive:this.config.icon))}disable(){this.container.classList.add("psv-button--disabled"),this.state.enabled=!1}enable(){this.container.classList.remove("psv-button--disabled"),this.state.enabled=!0}collapse(){this.state.collapsed=!0,this.container.style.display="none"}uncollapse(){this.state.collapsed=!1,this.state.visible&&(this.container.style.display="")}__setIcon(e){this.container.innerHTML=e,D(this.container.querySelector("svg"),"psv-button-svg")}},tB=class extends tZ{constructor(e,t){super(e,{id:t.id??`psvButton-${Math.random().toString(36).substring(2)}`,className:`psv-custom-button ${t.className||""}`,hoverScale:!1,collapsable:!1!==t.collapsable,tabbable:!1!==t.tabbable,title:t.title}),this.customOnClick=t.onClick,t.content&&("string"==typeof t.content?this.container.innerHTML=t.content:(this.container.classList.add("psv-custom-button--no-padding"),t.content.style.height="100%",t.content.attachViewer?.(this.viewer),this.container.appendChild(t.content))),this.state.width=this.container.offsetWidth,t.disabled&&this.disable(),!1===t.visible&&this.hide()}onClick(){this.customOnClick?.(this.viewer)}},tK=class extends tZ{constructor(e){super(e,{className:"psv-description-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:_.info}),this.mode=0,this.viewer.addEventListener(e0.type,this),this.viewer.addEventListener(tg.type,this),this.viewer.addEventListener(e5.type,this),this.viewer.addEventListener(t_.type,this),this.viewer.addEventListener(eB.type,this)}destroy(){this.viewer.removeEventListener(e0.type,this),this.viewer.removeEventListener(tg.type,this),this.viewer.removeEventListener(e5.type,this),this.viewer.removeEventListener(t_.type,this),this.viewer.removeEventListener(eB.type,this),super.destroy()}handleEvent(e){if(e instanceof eB){e.containsOptions("description")&&this.autoSize(!0);return}if(!this.mode)return;let t=!1;e instanceof e0?t=1===this.mode:e instanceof tg?t=1===this.mode&&e.notificationId!==b.DESCRIPTION:e instanceof e5?t=2===this.mode:e instanceof t_&&(t=2===this.mode&&e.panelId!==b.DESCRIPTION),t&&(this.toggleActive(!1),this.mode=0)}onClick(){this.mode?this.__close():this.__open()}hide(e){super.hide(e),this.mode&&this.__close()}autoSize(e=!1){if(e){let t=this.viewer.navbar.getButton("caption",!1),i=t&&!t.isVisible(),s=!!this.viewer.config.description;i||s?this.show(!1):this.hide(!1)}}__close(){switch(this.mode){case 1:this.viewer.notification.hide(b.DESCRIPTION);break;case 2:this.viewer.panel.hide(b.DESCRIPTION)}}__open(){this.toggleActive(!0),this.viewer.config.description?(this.mode=2,this.viewer.panel.show({id:b.DESCRIPTION,content:`${this.viewer.config.caption?`<p>${this.viewer.config.caption}</p>`:""}${this.viewer.config.description}`})):(this.mode=1,this.viewer.notification.show({id:b.DESCRIPTION,content:this.viewer.config.caption}))}};tK.id="description";var tq=class extends tZ{constructor(e){super(e,{tagName:"a",className:"psv-download-button",hoverScale:!0,collapsable:!0,tabbable:!0,icon:_.download}
1),this.viewer.addEventListener(eB.type,this),this.viewer.addEventListener(to.type,this)}destroy(){this.viewer.removeEventListener(eB.type,this),this.viewer.removeEventListener(to.type,this),super.destroy()}handleEvent(e){e instanceof eB?(e.containsOptions("downloadUrl")&&this.checkSupported(),e.containsOptions("downloadUrl","downloadName")&&this.__update()):e instanceof to&&this.__update()}onClick(){}checkSupported(){let e=this.viewer.adapter.constructor,t=e.supportsDownload||this.viewer.config.downloadUrl;t?this.show():this.hide()}__update(){let e=this.container;e.href=this.viewer.config.downloadUrl||this.viewer.config.panorama,e.target="_blank",e.href.startsWith("data:")&&!this.viewer.config.downloadName?e.download="panorama."+e.href.substring(0,e.href.indexOf(";")).split("/").pop():e.download=this.viewer.config.downloadName||e.href.split("/").pop()}};tq.id="download";var tG=class extends tZ{constructor(e){super(e,{className:"psv-fullscreen-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:_.fullscreenIn,iconActive:_.fullscreenOut}),this.viewer.addEventListener(eQ.type,this)}destroy(){this.viewer.removeEventListener(eQ.type,this),super.destroy()}handleEvent(e){e instanceof eQ&&this.toggleActive(e.fullscreenEnabled)}onClick(){this.viewer.toggleFullscreen()}};tG.id="fullscreen";var tQ=(e,t)=>` 2<div class="psv-panel-menu psv-panel-menu--stripped"> 3 <h1 class="psv-panel-menu-title">${_.menu} ${t}</h1> 4 <ul class="psv-panel-menu-list"> 5 ${e.map(e=>` 6 <li data-psv-button="${e.id}" class="psv-panel-menu-item" tabindex="0"> 7 <span class="psv-panel-menu-item-icon">${e.content}</span> 8 <span class="psv-panel-menu-item-label">${e.title}</span> 9 </li> 10 `).join("")} 11 </ul> 12</div> 13`,tJ=class extends tZ{constructor(e){super(e,{className:"psv-menu-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:_.menu}),this.viewer.addEventListener(t_.type,this),this.viewer.addEventListener(e5.type,this),super.hide()}destroy(){this.viewer.removeEventListener(t_.type,this),this.viewer.removeEventListener(e5.type,this),super.destroy()}handleEvent(e){e instanceof t_?this.toggleActive(e.panelId===b.MENU):e instanceof e5&&this.toggleActive(!1)}onClick(){this.state.active?this.__hideMenu():this.__showMenu()}hide(e){super.hide(e),this.__hideMenu()}show(e){super.show(e),this.state.active&&this.__showMenu()}__showMenu(){this.viewer.panel.show({id:b.MENU,content:tQ(this.viewer.navbar.collapsed,this.viewer.config.lang.menu),noMargin:!0,clickHandler:e=>{let t=e?N(e,".psv-panel-menu-item"):void 0,i=t?t.dataset.psvButton:void 0;i&&(this.viewer.navbar.getButton(i).onClick(),this.__hideMenu())}})}__hideMenu(){this.viewer.panel.hide(b.MENU)}};tJ.id="menu";var t0=class extends tZ{constructor(e,t){super(e,{className:"psv-move-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:function(e){let t=0;switch(e){case 0:t=90;break;case 1:t=-90;break;case 3:t=180;break;default:t=0}return _.arrow.replace("rotate(0",`rotate(${t}`)}(t)}),this.direction=t,this.handler=new eS,this.container.addEventListener("mousedown",this),this.container.addEventListener("keydown",this),this.container.addEventListener("keyup",this),this.viewer.container.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchend",this)}destroy(){this.__onMouseUp(),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),super.destroy()}handleEvent(e){switch(e.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":e.key===E.Enter&&this.__onMouseDown();break;case"keyup":e.key===E.Enter&&this.__onMouseUp()}}onClick(){}isSupported(){return es(tj.isTouchEnabled)}__onMouseDown(){if(!this.state.enabled)return;let e={};switch(this.direction){case 0:e.pitch=!1;break;case 1:e.pitch=!0;break;case 3:e.yaw=!1;break;default:e.yaw=!0}this.viewer.stopAll(),this.viewer.dynamics.position.roll(e),this.handler.down()}__onMouseUp(){this.state.enabled&&this.handler.up(()=>{this.viewer.dynamics.position.stop(),this.viewer.resetIdleTimer()})}};t0.groupId="move";var t1=class extends t0{constructor(e){super(e,1)}};t1.id="moveDown";var t2=class extends t0{constructor(e){super(e,2)}};t2.id="moveLeft";var t3=class extends t0{constructor(e){super(e,3)}};t3.id="moveRight";var t5=class extends t0{constructor(e){super(e,0)}};t5.id="moveUp";var t4=class extends tZ{constructor(e,t,i){super(e,{className:"psv-zoom-button",hoverScale:!0,collapsable:!1,tabbable:!0,icon:t}),this.direction=i,this.handler=new eS,this.container.addEventListener("mousedown",this),this.container.addEventListener("keydown",this),this.container.addEventListener("keyup",this),this.viewer.container.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchend",this)}destroy(){this.__onMouseUp(),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),super.destroy()}handleEvent(e){switch(e.type){case"mousedown":this.__onMouseDown();break;case"mouseup":case"touchend":this.__onMouseUp();break;case"keydown":e.key===E.Enter&&this.__onMouseDown();break;case"keyup":e.key===E.Enter&&this.__onMouseUp()}}onClick(){}isSupported(){return es(tj.isTouchEnabled)}__onMouseDown(){this.state.enabled&&(this.viewer.dynamics.zoom.roll(1===this.direction),this.handler.down())}__onMouseUp(){this.state.enabled&&this.handler.up(()=>this.viewer.dynamics.zoom.stop())}};t4.groupId="zoom";var t8=class extends t4{constructor(e){super(e,_.zoomIn,0)}};t8.id="zoomIn";var t7=class extends t4{constructor(e){super(e,_.zoomOut,1)}};t7.id="zoomOut";var t6=class extends tZ{constructor(e){super(e,{className:"psv-zoom-range",hoverScale:!1,collapsable:!1,tabbable:!1}),this.zoomRange=document.createElement("div"),this.zoomRange.className="psv-zoom-range-line",this.container.appendChild(this.zoomRange),this.zoomValue=document.createElement("div"),this.zoomValue.className="psv-zoom-range-handle",this.zoomRange.appendChild(this.zoomValue),this.slider=new eD(this.container,"HORIZONTAL",e=>
13this.__onSliderUpdate(e)),this.mediaMinWidth=parseInt(j(this.container,"max-width"),10),this.viewer.addEventListener(tI.type,this),this.viewer.state.ready?this.__moveZoomValue(this.viewer.getZoomLevel()):this.viewer.addEventListener(tv.type,this)}destroy(){this.slider.destroy(),this.viewer.removeEventListener(tI.type,this),this.viewer.removeEventListener(tv.type,this),super.destroy()}handleEvent(e){e instanceof tI?this.__moveZoomValue(e.zoomLevel):e instanceof tv&&this.__moveZoomValue(this.viewer.getZoomLevel())}onClick(){}isSupported(){return es(tj.isTouchEnabled)}autoSize(){this.state.supported&&(this.viewer.state.size.width<=this.mediaMinWidth&&this.state.visible?this.hide(!1):this.viewer.state.size.width>this.mediaMinWidth&&!this.state.visible&&this.show(!1))}__moveZoomValue(e){this.zoomValue.style.left=e/100*this.zoomRange.offsetWidth-this.zoomValue.offsetWidth/2+"px"}__onSliderUpdate(e){e.mousedown&&this.viewer.zoom(100*e.value)}};t6.id="zoomRange",t6.groupId="zoom";var t9=class extends eN{constructor(e){super(),this.viewer=e}init(){}destroy(){}},ie=class extends t9{constructor(e,t){super(e),this.config=this.constructor.configParser(t)}setOption(e,t){this.setOptions({[e]:t})}setOptions(e){let t={...this.config,...e},i=this.constructor,s=i.configParser,o=i.readonlyOptions,n=i.id;for(let[r,a]of Object.entries(e)){if(!(r in s.defaults)){er(`${n}: Unknown option "${r}"`);continue}if(o.includes(r)){er(`${n}: Option "${r}" cannot be updated`);continue}r in s.parsers&&(a=s.parsers[r](a,{rawConfig:t,defValue:s.defaults[r]})),this.config[r]=a}}};function it(e){if(e){for(let[,t]of[["_",e],...Object.entries(e)])if(t.prototype instanceof t9)return ex(t.id,t.VERSION,"5.13.2"),t}return null}ie.readonlyOptions=[];var ii={panorama:null,container:null,adapter:[tW,null],plugins:[],caption:null,description:null,downloadUrl:null,downloadName:null,loadingImg:null,loadingTxt:"",size:null,fisheye:0,minFov:30,maxFov:90,defaultZoomLvl:50,defaultYaw:0,defaultPitch:0,sphereCorrection:null,moveSpeed:1,zoomSpeed:1,moveInertia:.8,mousewheel:!0,mousemove:!0,mousewheelCtrlKey:!1,touchmoveTwoFingers:!1,panoData:null,requestHeaders:null,canvasBackground:"#000",defaultTransition:{speed:1500,rotation:!0,effect:"fade"},rendererParameters:{alpha:!0,antialias:!0},withCredentials:!1,navbar:["zoom","move","download","description","caption","fullscreen"],lang:{zoom:"Zoom",zoomOut:"Zoom out",zoomIn:"Zoom in",moveUp:"Move up",moveDown:"Move down",moveLeft:"Move left",moveRight:"Move right",description:"Description",download:"Download",fullscreen:"Fullscreen",loading:"Loading...",menu:"Menu",close:"Close",twoFingers:"Use two fingers to navigate",ctrlZoom:"Use ctrl + scroll to zoom the image",loadError:"The panorama cannot be loaded",webglError:"Your browser does not seem to support WebGL"},keyboard:"fullscreen",keyboardActions:{[E.ArrowUp]:"ROTATE_UP",[E.ArrowDown]:"ROTATE_DOWN",[E.ArrowRight]:"ROTATE_RIGHT",[E.ArrowLeft]:"ROTATE_LEFT",[E.PageUp]:"ZOOM_IN",[E.PageDown]:"ZOOM_OUT",[E.Plus]:"ZOOM_IN",[E.Minus]:"ZOOM_OUT"}},is={panorama:"Use setPanorama method to change the panorama",panoData:"Use setPanorama method to change the panorama",container:"Cannot change viewer container",adapter:"Cannot change adapter",plugins:"Cannot change plugins"},io={container(e){if(!e)throw new et("No value given for container.");return e},adapter(e,{defValue:t}){if(!(e=e?Array.isArray(e)?[tF(e[0]),e[1]]:[tF(e),null]:t)[0])throw new et("An undefined value was given for adapter.");if(!e[0].id)throw new et("Adapter has no id.");return e},defaultYaw:e=>ey(e),defaultPitch:e=>ey(e,!0),defaultZoomLvl:e=>o.M8C.clamp(e,0,100),minFov:(e,{rawConfig:t})=>(t.maxFov<e&&(er("maxFov cannot be lower than minFov"),e=t.maxFov),o.M8C.clamp(e,1,179)),maxFov:(e,{rawConfig:t})=>(e<t.minFov&&(e=t.minFov),o.M8C.clamp(e,1,179)),moveInertia:(e,{defValue:t})=>!0===e?t:!1===e?0:e,lang:e=>({...ii.lang,...e}),keyboardActions:(e,{rawConfig:t})=>t.keyboard&&"object"==typeof t.keyboard?t.keyboard:e,fisheye:e=>!0===e?1:!1===e?0:e,requestHeaders:e=>e&&"object"==typeof e?()=>e:"function"==typeof e?e:null,defaultTransition:(e,{defValue:t})=>null===e||0===e.speed?null:{...t,...e},rendererParameters:(e,{defValue:t})=>({...e,...t}),plugins:e=>e.map((e,t)=>
vendor: 1,110 bytes, line 13
13{if(!(e=Array.isArray(e)?[it(e[0]),e[1]]:[it(e),null])[0])throw new et(`An undefined value was given for plugin ${t}.`);if(!e[0].id)throw new et(`Plugin ${t} has no id.`);return e}),navbar:e=>!1===e?null:!0===e?q(ii.navbar):"string"==typeof e?e.split(/[ ,]/):e},ir=eM(ii,io),ia=class extends tZ{constructor(e){super(e,{className:"psv-caption",hoverScale:!1,collapsable:!1,tabbable:!0}),this.contentWidth=0,this.state.width=0,this.contentElt=document.createElement("div"),this.contentElt.className="psv-caption-content",this.container.appendChild(this.contentElt),this.setCaption(this.viewer.config.caption)}hide(){this.contentElt.style.display="none",this.state.visible=!1}show(){this.contentElt.style.display="",this.state.visible=!0}onClick(){}setCaption(e){this.show(),this.contentElt.innerHTML=e??"",this.contentElt.innerHTML?this.contentWidth=this.contentElt.offsetWidth:this.contentWidth=0,this.autoSize()}autoSize(){this.toggle(this.container.offsetWidth>=this.contentWidth),this.__refreshButton()}__refreshButton(){this.viewer.navbar.getButton(tK.id,!1)?.autoSize(!0)}};ia.id="caption";var ih={},il={};
13function ic(e,t){if(!e.id)throw new et("Button id is required");if(ih[e.id]=e,e.groupId&&(il[e.groupId]=il[e.groupId]||[]).push(e),t){let i=ii.navbar;switch(t){case"start":i.unshift(e.id);break;case"end":i.push(e.id);break;default:{let[s,o]=t.split(":"),n=i.indexOf(s);if(!s||!o||-1===n)throw new et(`Invalid defaultPosition ${t}`);i.splice(n+("right"===o?1:0),0,e.id)}}}}[t7,t6,t8,tK,ia,tq,tG,t2,t3,t5,t1].forEach(e=>ic(e));var id=class extends tY{constructor(e){super(e,{className:`psv-navbar ${g}`}),this.collapsed=[],this.state.visible=!1}show(){this.viewer.container.classList.add("psv--has-navbar"),this.container.classList.add("psv-navbar--open"),this.state.visible=!0}hide(){this.viewer.container.classList.remove("psv--has-navbar"),this.container.classList.remove("psv-navbar--open"),this.state.visible=!1}setButtons(e){this.children.slice().forEach(e=>e.destroy()),this.children.length=0,-1!==e.indexOf(ia.id)&&-1===e.indexOf(tK.id)&&e.splice(e.indexOf(ia.id),0,tK.id),e.forEach(e=>{"object"==typeof e?new tB(this,e):ih[e]?new ih[e](this):il[e]?il[e].forEach(e=>{new e(this)}):er(`Unknown button ${e}`)}),new tJ(this),this.children.forEach(e=>{e instanceof tZ&&e.checkSupported()}),this.autoSize()}setCaption(e){this.children.some(t=>t instanceof ia&&(t.setCaption(e),!0))}getButton(e,t=!0){let i=this.children.find(t=>t instanceof tZ&&t.id===e);return!i&&t&&er(`button "${e}" not found in the navbar`),i}focusButton(e){this.isVisible()&&(this.getButton(e,!1)?.container||this.container.firstElementChild)?.focus()}autoSize(){this.children.forEach(e=>{e instanceof tZ&&e.autoSize()});let e=this.container.offsetWidth,t=0,i=[];this.children.forEach(e=>{e.isVisible()&&e instanceof tZ&&(t+=e.width,e.collapsable&&i.push(e))}),0!==t&&(e<t&&i.length>0?(i.forEach(e=>e.collapse()),this.collapsed=i,this.getButton(tJ.id).show(!1)):e>=t&&this.collapsed.length>0&&(this.collapsed.forEach(e=>e.uncollapse()),this.collapsed=[],this.getButton(tJ.id).hide(!1)),this.getButton(ia.id,!1)?.autoSize())}};o.CtF.enabled=!1;var iu={enabled:!0,maxItems:10,ttl:600,items:{},purgeInterval:null,init(){o.CtF.enabled&&(er("ThreeJS cache should be disabled"),o.CtF.enabled=!1),!this.purgeInterval&&this.enabled&&(this.purgeInterval=setInterval(()=>this.purge(),6e4))},add(e,t,i){this.enabled&&t&&(this.items[t]=this.items[t]??{files:{},lastAccess:null},this.items[t].files[e]=i,this.items[t].lastAccess=Date.now())},get(e,t){if(this.enabled&&t&&this.items[t])return this.items[t].lastAccess=Date.now(),this.items[t].files[e]},remove(e,t){this.enabled&&t&&this.items[t]&&(delete this.items[t].files[e],0===Object.keys(this.items[t].files).length&&delete this.items[t])},purge(){Object.entries(this.items).sort(([,e],[,t])=>t.lastAccess-e.lastAccess).forEach(([e,{lastAccess:t}],i)=>{i>0&&(Date.now()-t>=1e3*this.ttl||i>=this.maxItems)&&delete this.items[e]})}},ip=class extends tY{constructor(e){super(e,{className:"psv-loader-container"}),this.loader=document.createElement("div"),this.loader.className="psv-loader",this.container.appendChild(this.loader),this.size=this.loader.offsetWidth,this.canvas=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.canvas.setAttribute("class","psv-loader-canvas"),this.canvas.setAttribute("viewBox",`0 0 ${this.size} ${this.size}`),this.loader.appendChild(this.canvas),this.textColor=j(this.loader,"color"),this.color=j(this.canvas,"color"),this.border=parseInt(j(this.loader,"--psv-loader-border"),10),this.thickness=parseInt(j(this.loader,"--psv-loader-tickness"),10);let t=this.size/2;this.canvas.innerHTML=` 14 <circle cx="${t}" cy="${t}" r="${t}" fill="${this.color}"/> 15 <path d="" fill="none" stroke="${this.textColor}" stroke-width="${this.thickness}" stroke-linecap="round"/> 16 `,this.viewer.addEventListener(eB.type,this),this.__updateContent(),this.hide()}destroy(){this.viewer.removeEventListener(eB.type,this),super.destroy()}handleEvent(e){e instanceof eB&&e.containsOptions("loadingImg","loadingTxt","lang")&&this.__updateContent()}setProgress(e){this.container.classList.remove("psv-loader--undefined");let t=o.M8C.clamp(e,0,99.999)/100*Math.PI*2,i=this.size/2,s=this.thickness/2+this.border,n=(this.size-this.thickness)/2-this.border;this.canvas.querySelector("path").setAttributeNS(null,"d",`M ${i} ${s} A ${n} ${n} 0 ${e>50?"1":"0"} 1 ${Math.sin(t)*n+i} ${-Math.cos(t)*n+i}`)}showUndefined(){this.show(),this.setProgress(25),this.container.classList.add("psv-loader--undefined")}__updateContent(){let e=this.loader.querySelector(".psv-loader-image, .psv-loader-text");e&&this.loader.removeChild(e);let t;if(this.viewer.config.loadingImg?((t=document.createElement("img")).className="psv-loader-image",t.src=this.viewer.config.loadingImg):null!==this.viewer.config.loadingTxt&&((t=document.createElement("div")).className="psv-loader-text",t.innerHTML=this.viewer.config.loadingTxt||this.viewer.config.lang.loading),t){let i=Math.round(Math.sqrt(2*Math.pow(this.size/2-this.thickness/2-this.border,2)));t.style.maxWidth=i+"px",t.style.maxHeight=i+"px",this.loader.appendChild(t)}}},iv=class extends tY{constructor(e){super(e,{className:"psv-notification"}
vendor: 11,028 bytes, line 16
16),this.state={visible:!1,contentId:null,timeout:null},this.content=document.createElement("div"),this.content.className="psv-notification-content",this.container.appendChild(this.content),this.content.addEventListener("click",()=>this.hide())}isVisible(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}toggle(){throw new et("Notification cannot be toggled")}show(e){this.state.timeout&&(clearTimeout(this.state.timeout),this.state.timeout=null),"string"==typeof e&&(e={content:e}),this.state.contentId=e.id||null,this.content.innerHTML=e.content,this.container.classList.add("psv-notification--visible"),this.state.visible=!0,this.viewer.dispatchEvent(new tg(this.state.contentId)),e.timeout&&(this.state.timeout=setTimeout(()=>this.hide(this.state.contentId),e.timeout))}hide(e){if(this.isVisible(e)){let t=this.state.contentId;this.container.classList.remove("psv-notification--visible"),this.state.visible=!1,this.state.contentId=null,this.viewer.dispatchEvent(new e0(t))}}},im=class extends tY{constructor(e){super(e,{className:`psv-overlay ${g}`}),this.state={visible:!1,contentId:null,dismissible:!0},this.image=document.createElement("div"),this.image.className="psv-overlay-image",this.container.appendChild(this.image),this.title=document.createElement("div"),this.title.className="psv-overlay-title",this.container.appendChild(this.title),this.text=document.createElement("div"),this.text.className="psv-overlay-text",this.container.appendChild(this.text),this.container.addEventListener("click",this),this.viewer.addEventListener(e6.type,this),super.hide()}destroy(){this.viewer.removeEventListener(e6.type,this),super.destroy()}handleEvent(e){"click"===e.type?this.isVisible()&&this.state.dismissible&&(this.hide(),e.stopPropagation()):e instanceof e6&&this.isVisible()&&this.state.dismissible&&e.key===E.Escape&&(this.hide(),e.preventDefault())}isVisible(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}toggle(){throw new et("Overlay cannot be toggled")}show(e){"string"==typeof e&&(e={title:e}),this.state.contentId=e.id||null,this.state.dismissible=!1!==e.dismissible,this.image.innerHTML=e.image||"",this.title.innerHTML=e.title||"",this.text.innerHTML=e.text||"",super.show(),this.viewer.dispatchEvent(new tb(this.state.contentId))}hide(e){if(this.isVisible(e)){let t=this.state.contentId;super.hide(),this.state.contentId=null,this.viewer.dispatchEvent(new e2(t))}}},iw="psv-panel-content--no-interaction",ig=class extends tY{constructor(e){super(e,{className:`psv-panel ${g}`}),this.state={visible:!1,contentId:null,mouseX:0,mouseY:0,mousedown:!1,clickHandler:null,keyHandler:null,width:{}};let t=document.createElement("div");t.className="psv-panel-resizer",this.container.appendChild(t);let i=document.createElement("div");i.className="psv-panel-close-button",i.innerHTML=_.close,i.title=e.config.lang.close,this.container.appendChild(i),this.content=document.createElement("div"),this.content.className="psv-panel-content",this.container.appendChild(this.content),i.addEventListener("click",()=>this.hide()),t.addEventListener("mousedown",this),t.addEventListener("touchstart",this),this.viewer.container.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchend",this),this.viewer.container.addEventListener("mousemove",this),this.viewer.container.addEventListener("touchmove",this),this.viewer.addEventListener(e6.type,this)}destroy(){this.viewer.removeEventListener(e6.type,this),this.viewer.container.removeEventListener("mousemove",this),this.viewer.container.removeEventListener("touchmove",this),this.viewer.container.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchend",this),super.destroy()}handleEvent(e){switch(e.type){case"mousedown":this.__onMouseDown(e);break;case"touchstart":this.__onTouchStart(e);break;case"mousemove":this.__onMouseMove(e);break;case"touchmove":this.__onTouchMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchend":this.__onTouchEnd(e);break;case e6.type:this.__onKeyPress(e)}}isVisible(e){return this.state.visible&&(!e||!this.state.contentId||this.state.contentId===e)}toggle(){throw new et("Panel cannot be toggled")}show(e){"string"==typeof e&&(e={content:e});let t=this.isVisible(e.id);this.state.contentId=e.id||null,this.state.visible=!0,this.state.clickHandler&&(this.content.removeEventListener("click",this.state.clickHandler),this.content.removeEventListener("keydown",this.state.keyHandler),this.state.clickHandler=null,this.state.keyHandler=null),e.id&&this.state.width[e.id]?this.container.style.width=this.state.width[e.id]:e.width?this.container.style.width=e.width:this.container.style.width=null,this.content.innerHTML=e.content,this.content.scrollTop=0,this.container.classList.add("psv-panel--open"),z(this.content,"psv-panel-content--no-margin",!0===e.noMargin),e.clickHandler&&(this.state.clickHandler=t=>{e.clickHandler(R(t))},this.state.keyHandler=t=>{t.key===E.Enter&&e.clickHandler(R(t))},this.content.addEventListener("click",this.state.clickHandler),this.content.addEventListener("keydown",this.state.keyHandler),t||setTimeout(()=>{this.content.querySelector("a,button,[tabindex]")?.focus()},300)),this.viewer.dispatchEvent(new t_(this.state.contentId))}hide(e){if(this.isVisible(e)){let t=this.state.contentId;this.state.visible=!1,this.state.contentId=null,this.content.innerHTML=null,this.container.classList.remove("psv-panel--open"),this.state.clickHandler&&(this.content.removeEventListener("click",this.state.clickHandler),this.content.removeEventListener("keydown",this.state.keyHandler),this.state.clickHandler=null,this.state.keyHandler=null),this.viewer.dispatchEvent(new e5(t))}}__onMouseDown(e){e.stopPropagation(),this.__startResize(e.clientX,e.clientY)}__onTouchStart(e){if(e.stopPropagation(),1===e.touches.length){let t=e.touches[0];this.__startResize(t.clientX,t.clientY)}}__onMouseUp(e){this.state.mousedown&&(e.stopPropagation(),this.state.mousedown=!1,this.content.classList.remove(iw))}__onTouchEnd(e){this.state.mousedown&&(e.stopPropagation(),0===e.touches.length&&(this.state.mousedown=!1,this.content.classList.remove(iw)))}__onMouseMove(e){this.state.mousedown&&(e.stopPropagation(),this.__resize(e.clientX,e.clientY))}__onTouchMove(e){if(this.state.mousedown){let t=e.touches[0];this.__resize(t.clientX,t.clientY)}}__onKeyPress(e){this.isVisible()&&e.key===E.Escape&&(this.hide(),e.preventDefault())}__startResize(e,t){this.state.mouseX=e,this.state.mouseY=t,this.state.mousedown=!0,this.content.classList.add(iw)}__resize(e,t){let i=Math.max(200,this.container.offsetWidth-(e-this.state.mouseX))+"px";this.state.contentId&&(this.state.width[this.state.contentId]=i),this.container.style.width=i,this.state.mouseX=e,this.state.mouseY=t}},iy=class extends tY{constructor(e,t){super(e,{className:"psv-tooltip"}),this.state={visible:!0,arrow:0,border:0,state:0,width:0,height:0,pos:"",config:null,data:null,hideTimeout:null},this.content=document.createElement("div"),this.content.className="psv-tooltip-content",this.container.appendChild(this.content),this.arrow=document.createElement("div"),this.arrow.className="psv-tooltip-arrow",this.container.appendChild(this.arrow),this.container.addEventListener("transitionend",this),this.container.addEventListener("touchdown",e=>e.stopPropagation()),this.container.addEventListener("mousedown",e=>e.stopPropagation()),this.container.style.top="-1000px",this.container.style.left="-1000px",this.show(t)}handleEvent(e){"transitionend"===e.type&&this.__onTransitionEnd(e)}destroy(){clearTimeout(this.state.hideTimeout),delete this.state.data,super.destroy()}toggle(){throw new et("Tooltip cannot be toggled")}show(e){if(0!==this.state.state)throw new et("Initialized tooltip cannot be re-initialized");e.className&&D(this.container,e.className),e.style&&Object.assign(this.container.style,e.style),this.state.state=3,this.update(e.content,e),this.state.data=e.data,this.state.state=1,this.viewer.dispatchEvent(new tT(this,this.state.data)),this.__waitImages()}update(e,t){this.content.innerHTML=e;let i=this.container.getBoundingClientRect();this.state.width=i.right-i.left,this.state.height=i.bottom-i.top,this.state.arrow=parseInt(j(this.arrow,"border-top-width"),10),this.state.border=parseInt(j(this.container,"border-top-left-radius"),10),this.move(t??this.state.config),this.__waitImages()}move(e){if(1!==this.state.state&&3!==this.state.state)throw new et("Uninitialized tooltip cannot be moved");e.box=e.box??this.state.config?.box??{width:0,height:0},this.state.config=e;let t=this.container,i=this.arrow,s={posClass:em(e.position,{allowCenter:!1,cssOrder:!1})||["top","center"],width:this.state.width,height:this.state.height,top:0,left:0,arrowTop:0,arrowLeft:0};this.__computeTooltipPosition(s,e);let o=null,n=null;if(s.top<0?o="bottom":s.top+s.height>this.viewer.state.size.height&&(o="top"),s.left<0?n="right":s.left+s.width>this.viewer.state.size.width&&(n="left"),n||o){let r=ew(s.posClass);o&&(s.posClass[r?0:1]=o),n&&(s.posClass[r?1:0]=n),this.__computeTooltipPosition(s,e)}t.style.top=s.top+"px",t.style.left=s.left+"px",i.style.top=s.arrowTop+"px",i.style.left=s.arrowLeft+"px";let a=s.posClass.join("-");a!==this.state.pos&&(t.classList.remove(`psv-tooltip--${this.state.pos}`),this.state.pos=a,t.classList.add(`psv-tooltip--${this.state.pos}`))}hide(){this.container.classList.remove("psv-tooltip--visible"),this.state.state=2,this.viewer.dispatchEvent(new e8(this.state.data));let e=parseFloat(j(this.container,"transition-duration"));this.state.hideTimeout=setTimeout(()=>{this.destroy()},2*e)}__onTransitionEnd(e){if("transform"===e.propertyName)switch(this.state.state){case 1:this.container.classList.add("psv-tooltip--visible"),this.state.state=3;break;case 2:this.state.state=0,this.destroy()}}__computeTooltipPosition(e,t){let i=this.state.arrow,s=t.top,o=e.height,n=t.left,r=e.width,a=i+this.state.border,h=t.box.width/2+2*i,l=t.box.height/2+2*i;switch(e.posClass.join("-")){case"top-left":e.top=s-l-o,e.left=n+a-r,e.arrowTop=o,e.arrowLeft=r-a-i;break;case"top-center":e.top=s-l-o,e.left=n-r/2,e.arrowTop=o,e.arrowLeft=r/2-i;break;case"top-right":e.top=s-l-o,e.left=n-a,e.arrowTop=o,e.arrowLeft=i;break;case"bottom-left":e.top=s+l,e.left=n+a-r,e.arrowTop=-(2*i),e.arrowLeft=r-a-i;break;case"bottom-center":e.top=s+l,e.left=n-r/2,e.arrowTop=-(2*i),e.arrowLeft=r/2-i;break;case"bottom-right":e.top=s+l,e.left=n-a,e.arrowTop=-(2*i),e.arrowLeft=i;break;case"left-top":e.top=s+a-o,e.left=n-h-r,e.arrowTop=o-a-i,e.arrowLeft=r;break;case"center-left":e.top=s-o/2,e.left=n-h-r,e.arrowTop=o/2-i,e.arrowLeft=r;break;case"left-bottom":e.top=s-a,e.left=n-h-r,e.arrowTop=i,e.arrowLeft=r;break;case"right-top":e.top=s+a-o,e.left=n+h,e.arrowTop=o-a-i,e.arrowLeft=-(2*i);break;case"center-right":e.top=s-o/2,e.left=n+h,e.arrowTop=o/2-i,e.arrowLeft=-(2*i);break;case"right-bottom":e.top=s-a,e.left=n+h,e.arrowTop=i,e.arrowLeft=-(2*i)}}__waitImages(){let e=this.content.querySelectorAll("img");if(e.length>0){let t=[];
16e.forEach(e=>{e.complete||t.push(new Promise(t=>{e.onload=t,e.onerror=t}))}),t.length&&Promise.all(t).then(()=>{if(1===this.state.state||3===this.state.state){let e=this.container.getBoundingClientRect();this.state.width=e.right-e.left,this.state.height=e.bottom-e.top,this.move(this.state.config)}})}}},ib=class{constructor(e){this.viewer=e,this.config=e.config,this.state=e.state}destroy(){}},iE=new o.Pa4,i_=new o.USm(0,0,0,"ZXY"),iM=class extends ib{constructor(e){super(e)}fovToZoomLevel(e){let t=Math.round((e-this.config.minFov)/(this.config.maxFov-this.config.minFov)*100);return o.M8C.clamp(t-2*(t-50),0,100)}zoomLevelToFov(e){return this.config.maxFov+e/100*(this.config.minFov-this.config.maxFov)}vFovToHFov(e){return o.M8C.radToDeg(2*Math.atan(Math.tan(o.M8C.degToRad(e)/2)*this.state.aspect))}hFovToVFov(e){return o.M8C.radToDeg(2*Math.atan(Math.tan(o.M8C.degToRad(e)/2)/this.state.aspect))}getAnimationProperties(e,t,i){let s=!Q(t),o=!Q(i),n={},r=null;if(s){let a=this.viewer.getPosition(),h=P(a.yaw,t.yaw);n.yaw={start:a.yaw,end:a.yaw+h},n.pitch={start:a.pitch,end:t.pitch},r=eg(e,I(a,t))}if(o){let l=this.viewer.getZoomLevel();n.zoom={start:l,end:i},null===r&&(r=eg(e,Math.PI/4*Math.abs(i-l)/100))}return r=null===r?"number"==typeof e?e:c:Math.max(c,r),{duration:r,properties:n}}getTransitionOptions(e){let t,i=this.config.defaultTransition??ii.defaultTransition;return!1===e.transition||null===e.transition?null:!0===e.transition?{...i}:"object"==typeof e.transition?{...i,...e.transition}:this.config.defaultTransition}textureCoordsToSphericalCoords(e){if(!this.state.textureData?.panoData)throw new et("Current adapter does not support texture coordinates or no texture has been loaded");let t=this.viewer.adapter.textureCoordsToSphericalCoords(e,this.state.textureData.panoData);return i_.equals(this.viewer.renderer.panoramaPose)&&i_.equals(this.viewer.renderer.sphereCorrection)?t:(this.sphericalCoordsToVector3(t,iE),iE.applyEuler(this.viewer.renderer.panoramaPose),iE.applyEuler(this.viewer.renderer.sphereCorrection),this.vector3ToSphericalCoords(iE))}sphericalCoordsToTextureCoords(e){if(!this.state.textureData?.panoData)throw new et("Current adapter does not support texture coordinates or no texture has been loaded");return i_.equals(this.viewer.renderer.panoramaPose)&&i_.equals(this.viewer.renderer.sphereCorrection)||(this.sphericalCoordsToVector3(e,iE),e_(iE,this.viewer.renderer.sphereCorrection),e_(iE,this.viewer.renderer.panoramaPose),e=this.vector3ToSphericalCoords(iE)),this.viewer.adapter.sphericalCoordsToTextureCoords(e,this.state.textureData.panoData)}sphericalCoordsToVector3(e,t,i=w){return t||(t=new o.Pa4),t.x=-(i*Math.cos(e.pitch))*Math.sin(e.yaw),t.y=i*Math.sin(e.pitch),t.z=i*Math.cos(e.pitch)*Math.cos(e.yaw),t}vector3ToSphericalCoords(e){let t=Math.acos(e.y/Math.sqrt(e.x*e.x+e.y*e.y+e.z*e.z)),i=Math.atan2(e.x,e.z);return{yaw:i<0?-i:2*Math.PI-i,pitch:Math.PI/2-t}}viewerCoordsToVector3(e){let t=this.viewer.renderer.getIntersections(e).filter(e=>e.object.userData[f]);return t.length?t[0].point:null}viewerCoordsToSphericalCoords(e){let t=this.viewerCoordsToVector3(e);return t?this.vector3ToSphericalCoords(t):null}vector3ToViewerCoords(e){let t=e.clone();return t.project(this.viewer.renderer.camera),{x:Math.round((t.x+1)/2*this.state.size.width),y:Math.round((1-t.y)/2*this.state.size.height)}}sphericalCoordsToViewerCoords(e){return this.sphericalCoordsToVector3(e,iE),this.vector3ToViewerCoords(iE)}isPointVisible(e){let t,i;if(e instanceof o.Pa4)t=e,i=this.vector3ToViewerCoords(e);else{if(!ea(e))return!1;t=this.sphericalCoordsToVector3(e,iE),i=this.vector3ToViewerCoords(t)}return t.dot(this.viewer.state.direction)>0&&i.x>=0&&i.x<=this.viewer.state.size.width&&i.y>=0&&i.y<=this.viewer.state.size.height}cleanPosition(e){if(!("yaw"in e)&&!("pitch"in e))return this.textureCoordsToSphericalCoords(e);if(!("yaw"in e)||!("pitch"in e))throw new et("Position is missing 'yaw' or 'pitch'");return{yaw:ey(e.yaw),pitch:ey(e.pitch,!0)}}cleanSphereCorrection(e){return{pan:ey(e?.pan||0),tilt:ey(e?.tilt||0,!0),roll:ey(e?.roll||0,!0,!1)}}cleanPanoramaPose(e){return{pan:o.M8C.degToRad(e?.poseHeading||0),tilt:o.M8C.degToRad(e?.posePitch||0),roll:o.M8C.degToRad(e?.poseRoll||0)}}cleanPanoramaOptions(e,t){return t?.isEquirectangular&&(Q(e.zoom)&&!Q(t.initialFov)&&(e={...e,zoom:this.fovToZoomLevel(this.hFovToV
16Fov(t.initialFov))}),!Q(e.position)||Q(t.initialHeading)||Q(t.initialPitch)||(e={...e,position:{yaw:ey(t.initialHeading),pitch:ey(t.initialPitch,!0)}})),e}},iT=class e{constructor(){this.$=e.IDLE}is(...e){return e.some(e=>this.$&e)}set(e){this.$=e}add(e){this.$|=e}remove(e){this.$&=~e}};iT.IDLE=0,iT.CLICK=1,iT.MOVING=2;var ix=class extends ib{constructor(e){super(e),this.data={startMouseX:0,startMouseY:0,mouseX:0,mouseY:0,pinchDist:0,moveDelta:{yaw:0,pitch:0,zoom:0},accumulatorFactor:0,ctrlKeyDown:!1,dblclickData:null,dblclickTimeout:null,longtouchTimeout:null,twofingersTimeout:null,ctrlZoomTimeout:null},this.step=new iT,this.keyHandler=new eS,this.resizeObserver=new ResizeObserver(Z(()=>this.viewer.autoSize(),50)),this.moveThreshold=d*tj.pixelRatio}init(){window.addEventListener("keydown",this,{passive:!1}),window.addEventListener("keyup",this),this.viewer.container.addEventListener("mousedown",this),window.addEventListener("mousemove",this,{passive:!1}),window.addEventListener("mouseup",this),this.viewer.container.addEventListener("touchstart",this,{passive:!1}),window.addEventListener("touchmove",this,{passive:!1}),window.addEventListener("touchend",this,{passive:!1}),this.viewer.container.addEventListener("wheel",this,{passive:!1}),document.addEventListener("fullscreenchange",this),this.resizeObserver.observe(this.viewer.container),this.viewer.addEventListener(eU.type,this),this.viewer.addEventListener(tO.type,this)}destroy(){window.removeEventListener("keydown",this),window.removeEventListener("keyup",this),this.viewer.container.removeEventListener("mousedown",this),window.removeEventListener("mousemove",this),window.removeEventListener("mouseup",this),this.viewer.container.removeEventListener("touchstart",this),window.removeEventListener("touchmove",this),window.removeEventListener("touchend",this),this.viewer.container.removeEventListener("wheel",this),document.removeEventListener("fullscreenchange",this),this.resizeObserver.disconnect(),this.viewer.removeEventListener(eU.type,this),this.viewer.removeEventListener(tO.type,this),clearTimeout(this.data.dblclickTimeout),clearTimeout(this.data.longtouchTimeout),clearTimeout(this.data.twofingersTimeout),clearTimeout(this.data.ctrlZoomTimeout),super.destroy()}handleEvent(e){switch(e.type){case"keydown":this.__onKeyDown(e);break;case"keyup":this.__onKeyUp();break;case"mousemove":this.__onMouseMove(e);break;case"mouseup":this.__onMouseUp(e);break;case"touchmove":this.__onTouchMove(e);break;case"touchend":this.__onTouchEnd(e);break;case"fullscreenchange":this.__onFullscreenChange();break;case eU.type:this.__applyMoveDelta();break;case tO.type:this.__clearMoveDelta()}if(!F(e,"."+g))switch(e.type){case"mousedown":this.__onMouseDown(e);break;case"touchstart":this.__onTouchStart(e);break;case"wheel":this.__onMouseWheel(e)}}__onKeyDown(e){if(this.config.mousewheelCtrlKey&&(this.data.ctrlKeyDown=e.key===E.Control,this.data.ctrlKeyDown&&(clearTimeout(this.data.ctrlZoomTimeout),this.viewer.overlay.hide(b.CTRL_ZOOM))),!this.viewer.dispatchEvent(new e6(e.key,e))||!this.state.keyboardEnabled)return;let t=this.config.keyboardActions?.[e.key];if("function"==typeof t){t(this.viewer,e),e.preventDefault();return}if(!e.ctrlKey&&!e.altKey&&!e.shiftKey&&!e.metaKey&&t&&!this.keyHandler.pending){switch("ZOOM_IN"!==t&&"ZOOM_OUT"!==t&&this.viewer.stopAll(),t){case"ROTATE_UP":this.viewer.dynamics.position.roll({pitch:!1});break;case"ROTATE_DOWN":this.viewer.dynamics.position.roll({pitch:!0});break;case"ROTATE_RIGHT":this.viewer.dynamics.position.roll({yaw:!1});break;case"ROTATE_LEFT":this.viewer.dynamics.position.roll({yaw:!0});break;case"ZOOM_IN":this.viewer.dynamics.zoom.roll(!1);break;case"ZOOM_OUT":this.viewer.dynamics.zoom.roll(!0)}this.keyHandler.down(t),e.preventDefault()}}__onKeyUp(){this.data.ctrlKeyDown=!1,this.state.keyboardEnabled&&this.keyHandler.up(e=>{"ZOOM_IN"===e||"ZOOM_OUT"===e?this.viewer.dynamics.zoom.stop():(this.viewer.dynamics.position.stop(),this.viewer.resetIdleTimer())})}__onMouseDown(e){this.step.add(iT.CLICK),this.data.startMouseX=e.clientX,this.data.startMouseY=e.clientY}__onMouseUp(e){this.step.is(iT.CLICK,iT.MOVING)&&this.__stopMove(e.clientX,e.clientY,e,2===e.button)}__onMouseMove(e){this.config.mousemove&&this.step.is(iT.CLICK,iT.MOVING)&&(e.preventDefault(),this.__doMove(e.clientX,e.clientY)),this.__handleObjectsEvents(e)}__onTouchStart(e){1===e.touches.length?(this.step.add(iT.CLICK),this.data.startMouseX=e.touches[0].clientX,this.data.startMouseY=e.touches[0].clientY,this.data.longtouchTimeout||(this.data.longtouchTimeout=setTimeout(()=>{let t=e.touches[0];this.__stopMove(t.clientX,t.clientY,e,!0),this.data.longtouchTimeout=null},p))):2===e.touches.length&&(this.step.set(iT.IDLE),this.__cancelLongTouch(),this.config.mousemove&&(this.__cancelTwoFingersOverlay(),this.__startMoveZoom(e),e.preventDefault()))}__onTouchEnd(e){if(this.__cancelLongTouch(),this.step.is(iT.CLICK,iT.MOVING)){if(e.preventDefault(),this.__cancelTwoFingersOverlay(),1===e.touches.length)this.__stopMove(this.data.mouseX,this.data.mouseY);else if(0===e.touches.length){let t=e.changedTouches[0];this.__stopMove(t.clientX,t.clientY,e)}}}__onTouchMove(e){if(this.__cancelLongTouch(),this.config.mousemove){if(1===e.touches.length){if(this.config.touchmoveTwoFingers)this.step.is(iT.CLICK)&&!this.data.twofingersTimeout&&(this.data.twofingersTimeout=setTimeout(()=>{this.viewer.overlay.show({id:b.TWO_FINGERS,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
16<path fill="currentColor" d="M33.38 33.2a1.96 1.96 0 0 0 1.5-3.23 10.61 10.61 0 0 1 7.18-17.51c.7-.06 1.31-.49 1.61-1.12a13.02 13.02 0 0 1 11.74-7.43c7.14 0 12.96 5.8 12.96 12.9 0 3.07-1.1 6.05-3.1 8.38-.7.82-.61 2.05.21 2.76.83.7 2.07.6 2.78-.22a16.77 16.77 0 0 0 4.04-10.91C72.3 7.54 64.72 0 55.4 0a16.98 16.98 0 0 0-14.79 8.7 14.6 14.6 0 0 0-12.23 14.36c0 3.46 1.25 6.82 3.5 9.45.4.45.94.69 1.5.69m45.74 43.55a22.13 22.13 0 0 1-5.23 12.4c-4 4.55-9.53 6.86-16.42 6.86-12.6 0-20.1-10.8-20.17-10.91a1.82 1.82 0 0 0-.08-.1c-5.3-6.83-14.55-23.82-17.27-28.87-.05-.1 0-.21.02-.23a6.3 6.3 0 0 1 8.24 1.85l9.38 12.59a1.97 1.97 0 0 0 3.54-1.17V25.34a4 4 0 0 1 1.19-2.87 3.32 3.32 0 0 1 2.4-.95c1.88.05 3.4 1.82 3.4 3.94v24.32a1.96 1.96 0 0 0 3.93 0v-33.1a3.5 3.5 0 0 1 7 0v35.39a1.96 1.96 0 0 0 3.93 0v-.44c.05-2.05 1.6-3.7 3.49-3.7 1.93 0 3.5 1.7 3.5 3.82v5.63c0 .24.04.48.13.71l.1.26a1.97 1.97 0 0 0 3.76-.37c.33-1.78 1.77-3.07 3.43-3.07 1.9 0 3.45 1.67 3.5 3.74l-1.77 18.1zM77.39 51c-1.25 0-2.45.32-3.5.9v-.15c0-4.27-3.33-7.74-7.42-7.74-1.26 0-2.45.33-3.5.9V16.69a7.42 7.42 0 0 0-14.85 0v1.86a7 7 0 0 0-3.28-.94 7.21 7.21 0 0 0-5.26 2.07 7.92 7.92 0 0 0-2.38 5.67v37.9l-5.83-7.82a10.2 10.2 0 0 0-13.35-2.92 4.1 4.1 0 0 0-1.53 5.48C20 64.52 28.74 80.45 34.07 87.34c.72 1.04 9.02 12.59 23.4 12.59 7.96 0 14.66-2.84 19.38-8.2a26.06 26.06 0 0 0 6.18-14.6l1.78-18.2v-.2c0-4.26-3.32-7.73-7.42-7.73z"/><!--Created by AomAm from the Noun Project--></svg>\n',title:this.config.lang.twoFingers})},v));else if(this.step.is(iT.CLICK,iT.MOVING)){e.preventDefault();let t=e.touches[0];this.__doMove(t.clientX,t.clientY)}}else this.__doMoveZoom(e),this.__cancelTwoFingersOverlay()}}__cancelLongTouch(){this.data.longtouchTimeout&&(clearTimeout(this.data.longtouchTimeout),this.data.longtouchTimeout=null)}__cancelTwoFingersOverlay(){this.config.touchmoveTwoFingers&&(this.data.twofingersTimeout&&(clearTimeout(this.data.twofingersTimeout),this.data.twofingersTimeout=null),this.viewer.overlay.hide(b.TWO_FINGERS))}__onMouseWheel(e){if(!this.config.mousewheel||!e.deltaY)return;if(this.config.mousewheelCtrlKey&&!this.data.ctrlKeyDown){this.viewer.overlay.show({id:b.CTRL_ZOOM,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="10 17 79 79"><path fill="currentColor" d="M38.1 29.27c-.24 0-.44.2-.44.45v10.7a.45.45 0 00.9 0v-10.7c0-.25-.2-.45-.45-.45zm10.2 26.66a11.54 11.54 0 01-8.48-6.14.45.45 0 10-.8.41 12.45 12.45 0 009.22 6.62.45.45 0 00.07-.9zm24.55-13.08a23.04 23.04 0 00-22.56-23v7.07l-.01.05a2.83 2.83 0 012.39 2.78v14.03l.09-.02h8.84v-9.22a.45.45 0 11.9 0v9.22h10.35v-.9zm0 27.33V44.66H62.5c-.02 2.01-.52 4-1.47 5.76a.45.45 0 01-.61.18.45.45 0 01-.19-.61 11.54 11.54 0 001.36-5.33h-8.83l-.1-.01a2.83 2.83 0 01-2.83 2.84h-.04-.04a2.83 2.83 0 01-2.83-2.83v-14.9a2.82 2.82 0 012.47-2.8v-7.11a23.04 23.04 0 00-22.57 23v.91h14.72V29.88a8.2 8.2 0 015.02-7.57c.22-.1.5.01.59.24.1.23-.01.5-.24.6a7.3 7.3 0 00-4.47 6.73v13.88h3.9a.45.45 0 110 .9h-3.9v.15a7.32 7.32 0 0011.23 6.17.45.45 0 01.49.76 8.22 8.22 0 01-12.62-6.93v-.15H26.82v25.52a23.04 23.04 0 0023.01 23.01 23.04 23.04 0 0023.02-23.01zm1.8-27.33v27.33A24.85 24.85 0 0149.84 95a24.85 24.85 0 01-24.82-24.82V42.85a24.85 24.85 0 0124.82-24.82 24.85 24.85 0 0124.83 24.82zM57.98 29.88v9.36a.45.45 0 11-.9 0v-9.36a7.28 7.28 0 00-3.4-6.17.45.45 0 01.49-.76 8.18 8.18 0 013.8 6.93z"/><!-- Created by Icon Island from the Noun Project --></svg>\n',title:this.config.lang.ctrlZoom}),clearTimeout(this.data.ctrlZoomTimeout),this.data.ctrlZoomTimeout=setTimeout(()=>this.viewer.overlay.hide(b.CTRL_ZOOM),m);return}e.preventDefault(),e.stopPropagation();let t=e.deltaY/Math.abs(e.deltaY)*5*this.config.zoomSpeed;0!==t&&this.viewer.dynamics.zoom.step(-t,5)}__onFullscreenChange(){let e=this.viewer.isFullscreenEnabled();"fullscreen"===this.config.keyboard&&(e?this.viewer.startKeyboardControl():this.viewer.stopKeyboardControl()),this.viewer.dispatchEvent(new eQ(e))}__resetMove(){this.step.set(iT.IDLE),this.data.mouseX=0,this.data.mouseY=0,this.data.startMouseX=0,this.data.startMouseY=0}__startMoveZoom(e){this.viewer.stopAll(),this.__resetMove();let t=U(e);this.step.set(iT.MOVING),this.data.accumulatorFactor=this.config.moveInertia,{distance:this.data.pinchDist,center:{x:this.data.mouseX,y:this.data.mouseY}}=t}
16__stopMove(e,t,i,s=!1){this.step.is(iT.CLICK)&&!this.__moveThresholdReached(e,t)&&this.__doClick(e,t,i,s),this.config.moveInertia&&(this.data.accumulatorFactor=Math.pow(this.config.moveInertia,.5)),this.__resetMove(),this.viewer.resetIdleTimer()}__doClick(e,t,i,s=!1){let o=this.viewer.container.getBoundingClientRect(),n=e-o.left,r=t-o.top,a=this.viewer.renderer.getIntersections({x:n,y:r}),h=a.find(e=>e.object.userData[f]);if(h){let l=this.viewer.dataHelper.vector3ToSphericalCoords(h.point),c={rightclick:s,originalEvent:i,target:R(i),clientX:e,clientY:t,viewerX:n,viewerY:r,yaw:l.yaw,pitch:l.pitch,objects:a.map(e=>e.object).filter(e=>!e.userData[f])};try{let d=this.viewer.dataHelper.sphericalCoordsToTextureCoords(c);Object.assign(c,d)}catch{}this.data.dblclickTimeout?(Math.abs(this.data.dblclickData.clientX-c.clientX)<this.moveThreshold&&Math.abs(this.data.dblclickData.clientY-c.clientY)<this.moveThreshold&&this.viewer.dispatchEvent(new eq(this.data.dblclickData)),clearTimeout(this.data.dblclickTimeout),this.data.dblclickTimeout=null,this.data.dblclickData=null):(this.viewer.dispatchEvent(new eX(c)),this.data.dblclickData=q(c),this.data.dblclickTimeout=setTimeout(()=>{this.data.dblclickTimeout=null,this.data.dblclickData=null},u))}}__handleObjectsEvents(e){if(!G(this.state.objectsObservers)&&e.composedPath().includes(this.viewer.container)){let t=V(this.viewer.container),i={x:e.clientX-t.x,y:e.clientY-t.y},s=this.viewer.renderer.getIntersections(i),o=(t,s,o)=>{this.viewer.dispatchEvent(new o(e,t,i,s))};for(let[n,r]of Object.entries(this.state.objectsObservers)){let a=s.find(e=>e.object.userData[n]);a?(r&&a.object!==r&&(o(r,n,tH),this.state.objectsObservers[n]=null),r?o(a.object,n,tN):(this.state.objectsObservers[n]=a.object,o(a.object,n,tz))):r&&(o(r,n,tH),this.state.objectsObservers[n]=null)}}}__doMove(e,t){if(this.step.is(iT.CLICK)&&this.__moveThresholdReached(e,t))this.viewer.stopAll(),this.__resetMove(),this.step.set(iT.MOVING),this.data.mouseX=e,this.data.mouseY=t,this.data.accumulatorFactor=this.config.moveInertia;else if(this.step.is(iT.MOVING)){let i=(e-this.data.mouseX)*Math.cos(this.state.roll)-(t-this.data.mouseY)*Math.sin(this.state.roll),s=(t-this.data.mouseY)*Math.cos(this.state.roll)+(e-this.data.mouseX)*Math.sin(this.state.roll),n={yaw:this.config.moveSpeed*(i/this.state.size.width)*o.M8C.degToRad(this.state.hFov),pitch:this.config.moveSpeed*(s/this.state.size.height)*o.M8C.degToRad(this.state.vFov)};this.data.moveDelta.yaw+=n.yaw,this.data.moveDelta.pitch+=n.pitch,this.data.mouseX=e,this.data.mouseY=t}}__moveThresholdReached(e,t){return Math.abs(e-this.data.startMouseX)>=this.moveThreshold||Math.abs(t-this.data.startMouseY)>=this.moveThreshold}__doMoveZoom(e){if(this.step.is(iT.MOVING)){e.preventDefault();let t=U(e);this.__doMove(t.center.x,t.center.y),this.data.moveDelta.zoom+=this.config.zoomSpeed*((t.distance-this.data.pinchDist)/tj.pixelRatio),this.data.pinchDist=t.distance}}__applyMoveDelta(){if(Math.abs(this.data.moveDelta.yaw)>0||Math.abs(this.data.moveDelta.pitch)>0){let e=this.viewer.getPosition();this.viewer.rotate({yaw:e.yaw-this.data.moveDelta.yaw*(1-this.config.moveInertia),pitch:e.pitch+this.data.moveDelta.pitch*(1-this.config.moveInertia)}),this.data.moveDelta.yaw*=this.data.accumulatorFactor,this.data.moveDelta.pitch*=this.data.accumulatorFactor,.001>=Math.abs(this.data.moveDelta.yaw)&&(this.data.moveDelta.yaw=0),.001>=Math.abs(this.data.moveDelta.pitch)&&(this.data.moveDelta.pitch=0)}if(Math.abs(this.data.moveDelta.zoom)>0){let t=this.viewer.getZoomLevel();this.viewer.zoom(t+this.data.moveDelta.zoom*(1-this.config.moveInertia)),this.data.moveDelta.zoom*=this.config.moveInertia,.001>=Math.abs(this.data.moveDelta.zoom)&&(this.data.moveDelta.zoom=0)}}__clearMoveDelta(){this.data.moveDelta.yaw=0,this.data.moveDelta.pitch=0,this.data.moveDelta.zoom=0}};o.epp.enabled=!1;var iC=new o.FM8,iL=new o.yGw,iO=new o.ZzF,iP=class extends ib{constructor(e){super(e),this.frustumNeedsUpdate=!0,this.renderer=new n.CP7(this.config.rendererParameters),this.renderer.setPixelRatio(tj.pixelRatio),this.renderer.outputColorSpace
16=o.GUF,this.renderer.toneMapping=o.EoG,this.renderer.domElement.className="psv-canvas",this.renderer.domElement.style.background=this.config.canvasBackground,this.scene=new o.xsS,this.camera=new o.cPb(50,16/9,.1,2*w),this.camera.matrixAutoUpdate=!1;let t=new o.Kj0(new o.xo$(w).scale(-1,1,1),new o.vBJ({opacity:0,transparent:!0,depthTest:!1,depthWrite:!1}));t.userData={[f]:!0},this.scene.add(t),this.raycaster=new o.iMs,this.frustum=new o.iWj,this.container=document.createElement("div"),this.container.className="psv-canvas-container",this.container.appendChild(this.renderer.domElement),this.viewer.container.appendChild(this.container),this.container.addEventListener("contextmenu",e=>e.preventDefault()),this.viewer.addEventListener(tC.type,this),this.viewer.addEventListener(tI.type,this),this.viewer.addEventListener(tc.type,this),this.viewer.addEventListener(tu.type,this),this.viewer.addEventListener(eB.type,this),this.hide()}get panoramaPose(){return this.mesh.rotation}get sphereCorrection(){return this.meshContainer.rotation}init(){this.show(),this.renderer.setAnimationLoop(e=>this.__renderLoop(e))}destroy(){this.renderer.setAnimationLoop(null),this.cleanScene(this.scene),this.renderer.dispose(),this.viewer.container.removeChild(this.container),this.viewer.removeEventListener(tC.type,this),this.viewer.removeEventListener(tI.type,this),this.viewer.removeEventListener(tc.type,this),this.viewer.removeEventListener(tu.type,this),this.viewer.removeEventListener(eB.type,this),super.destroy()}handleEvent(e){switch(e.type){case tC.type:this.__onSizeUpdated();break;case tI.type:this.__onZoomUpdated();break;case tc.type:case tu.type:this.__onPositionUpdated();break;case eB.type:e.containsOptions("fisheye")&&this.__onPositionUpdated(),e.containsOptions("canvasBackground")&&(this.renderer.domElement.style.background=this.config.canvasBackground)}}hide(){this.container.style.opacity="0"}show(){this.container.style.opacity="1"}setCustomRenderer(e){e?this.customRenderer=e(this.renderer):this.customRenderer=null,this.viewer.needsUpdate()}__onSizeUpdated(){this.renderer.setSize(this.state.size.width,this.state.size.height),this.camera.aspect=this.state.aspect,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__onZoomUpdated(){this.camera.fov=this.state.vFov,this.camera.updateProjectionMatrix(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__onPositionUpdated(){this.camera.position.set(0,0,0),this.camera.lookAt(this.state.direction),this.config.fisheye&&this.camera.position.copy(this.state.direction).multiplyScalar(this.config.fisheye/2).negate(),this.camera.rotateZ(-this.state.roll),this.camera.updateMatrix(),this.camera.updateMatrixWorld(),this.viewer.needsUpdate(),this.frustumNeedsUpdate=!0}__renderLoop(e){let t=this.timestamp?e-this.timestamp:0;this.timestamp=e,this.viewer.dispatchEvent(new eU(e,t)),this.viewer.dynamics.update(t),(this.state.needsUpdate||this.state.continuousUpdateCount>0)&&(this.state.needsUpdate=!1,(this.customRenderer||this.renderer).render(this.scene,this.camera),this.viewer.dispatchEvent(new tw))}setTexture(e){this.meshContainer||(this.meshContainer=new o.ZAu,this.scene.add(this.meshContainer)),this.state.textureData&&this.viewer.adapter.disposeTexture(this.state.textureData),this.mesh&&(this.meshContainer.remove(this.mesh),this.viewer.adapter.disposeMesh(this.mesh)),this.mesh=this.viewer.adapter.createMesh(e.panoData),this.viewer.adapter.setTexture(this.mesh,e,!1),this.meshContainer.add(this.mesh),this.state.textureData=e,this.viewer.needsUpdate()}setPanoramaPose(e,t=this.mesh){let i=this.viewer.dataHelper.cleanPanoramaPose(e);t.rotation.set(i.tilt,i.pan,i.roll,"YXZ")}setSphereCorrection(e,t=this.meshContainer){let i=this.viewer.dataHelper.cleanSphereCorrection(e);t.rotation.set(i.tilt,i.pan,i.roll,"YXZ")}transition(e,t,i){let s="fade"===i.effect||i.rotation,n=!Q(t.position),r=!Q(t.zoom),a=new eV(n?this.viewer.dataHelper.cleanPosition(t.position):void 0,t.zoom);this.viewer.dispatchEvent(a);let h=new o.ZAu,l=this.viewer.adapter.createMesh(e.panoData);if(this.viewer.adapter.setTexture(l,e,!0),this.viewer.adapter.setTextureOpacity(l,0),this.setPanoramaPose(e.panoData,l),this.setSphereCorrection(t.sphereCorrection,h),n&&!i.rotation){let c=this.viewer.getPosition(),d=new o.Pa4(0,1,0);h.rotateOnWorldAxis(d,a.position.yaw-c.yaw);let u=new o.Pa4(0,1,0).cross(this.camera.getWorldDirection(new o.Pa4)).normalize();h.rotateOnWorldAxis(u,a.position.pitch-c.pitch)}h.add(l),this.scene.add(h),this.renderer.setRenderTarget(new o.dd2),this.renderer.render(this.scene,this.camera),this.renderer.setRenderTarget(null);let{duration:p,properties:v}=this.viewer.dataHelper.getAnimationProperties(i.speed,i.rotation?a.position:null,s?a.zoomLevel:null),m=new eP({properties:{...v,opacity:{start:0,end:1}},duration:p,easing:"inOutCubic",onTick:e=>{switch(i.effect){case"fade":this.viewer.adapter.setTextureOpacity(l,e.opacity);break;case"black":case"white":e.opacity<.5?this.renderer.toneMappingExposure="black"===i.effect?o.M8C.mapLinear(e.opacity,0,.5,1,0):o.M8C.mapLinear(e.opacity,0,.5,1,4):(this.renderer.toneMappingExposure="black"===i.effect?o.M8C.mapLinear(e.opacity,.5,1,0,1):o.M8C.mapLinear(e.opacity,.5,1,4,1),this.mesh.visible=!1,this.viewer.adapter.setTextureOpacity(l,1),r&&!s&&this.viewer.dynamics.zoom.setValue(a.zoomLevel))}
16n&&i.rotation&&this.viewer.dynamics.position.setValue({yaw:e.yaw,pitch:e.pitch}),r&&s&&this.viewer.dynamics.zoom.setValue(e.zoom),this.viewer.needsUpdate()}});return m.then(s=>{h.remove(l),this.scene.remove(h),s?(this.viewer.adapter.disposeTexture(this.state.textureData),this.meshContainer.remove(this.mesh),this.viewer.adapter.disposeMesh(this.mesh),this.mesh=l,this.meshContainer.add(l),this.state.textureData=e,this.setPanoramaPose(e.panoData),this.setSphereCorrection(t.sphereCorrection),n&&!i.rotation&&this.viewer.rotate(t.position)):(this.viewer.adapter.disposeTexture(e),this.viewer.adapter.disposeMesh(l))}),m}getIntersections(e){iC.x=2*e.x/this.state.size.width-1,iC.y=-2*e.y/this.state.size.height+1,this.raycaster.setFromCamera(iC,this.camera);let t=this.raycaster.intersectObjects(this.scene.children,!0).filter(e=>e.object.visible).filter(e=>e.object.isMesh&&!!e.object.userData);return this.customRenderer?.getIntersections&&t.push(...this.customRenderer.getIntersections(this.raycaster,iC)),t}isObjectVisible(e){return!!e&&((this.frustumNeedsUpdate&&(iL.multiplyMatrices(this.camera.projectionMatrix,this.camera.matrixWorldInverse),this.frustum.setFromProjectionMatrix(iL),this.frustumNeedsUpdate=!1),e.isVector3)?this.frustum.containsPoint(e):e.isMesh&&e.geometry?(e.geometry.boundingBox||e.geometry.computeBoundingBox(),iO.copy(e.geometry.boundingBox).applyMatrix4(e.matrixWorld),this.frustum.intersectsBox(iO)):!!e.isObject3D&&this.frustum.intersectsObject(e))}addObject(e){this.scene.add(e)}removeObject(e){this.scene.remove(e)}cleanScene(e){let t=e=>{e.map?.dispose(),e.uniforms&&Object.values(e.uniforms).forEach(e=>{e.value?.dispose?.()}),e.dispose()};e.traverse(i=>{i.geometry?.dispose(),i.material&&(Array.isArray(i.material)?i.material.forEach(e=>{t(e)}):t(i.material)),i instanceof o.xsS||i.dispose?.(),i!==e&&this.cleanScene(i)})}},iI=class extends o.aNw{load(e,t,i,s,o){let n=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(n,{signal:o}).then(e=>{if(200===e.status||0===e.status){let t=e.body.getReader(),o=e.headers.get("Content-Length")||e.headers.get("X-File-Size"),n=o?parseInt(o):0,r=0!==n,a=0,h=new ReadableStream({start(e){!function o(){t.read().then(({done:t,value:s})=>{if(t)e.close();else{a+=s.byteLength;let h=new ProgressEvent("progress",{lengthComputable:r,loaded:a,total:n});i(h),e.enqueue(s),o()}}).catch(e=>{s(e)})}()}});return new Response(h)}throw Error(`fetch for "${e.url}" responded with ${e.status}: ${e.statusText}`)}).then(e=>e.blob()).then(e=>{t(e)}).catch(e=>{s(e)})}},ik=class extends o.aNw{load(e,t,i,s){let o=document.createElement("img");function n(){h(),t(this)}function r(e){if(h(),s?.aborted){let t=Error();t.name="AbortError",t.message="The operation was aborted.",i(t)}else i(e)}function a(){o.src=""}function h(){o.removeEventListener("load",n,!1),o.removeEventListener("error",r,!1),s?.removeEventListener("abort",a,!1)}return o.addEventListener("load",n,!1),o.addEventListener("error",r,!1),s?.addEventListener("abort",a,!1),e.startsWith("data:")||void 0===this.crossOrigin||(o.crossOrigin=this.crossOrigin),o.src=e,o}},iS=class extends ib{constructor(e){super(e),this.abortCtrl={},this.fileLoader=new iI,this.imageLoader=new ik,this.config.withCredentials&&(this.fileLoader.setWithCredentials(!0),this.imageLoader.setCrossOrigin("use-credentials"))}destroy(){this.abortLoading(),super.destroy()}abortLoading(){Object.values(this.abortCtrl).forEach(e=>e.abort()),this.abortCtrl={}}loadFile(e,t,i){let s=iu.get(e,i);if(s){if(s instanceof Blob)return t?.(100),Promise.resolve(s);iu.remove(e,i)}return this.config.requestHeaders&&this.fileLoader.setRequestHeader(this.config.requestHeaders(e)),new Promise((s,o)=>{let n=0;t?.(n),this.fileLoader.load(e,o=>{t?.(n=100),iu.add(e,i,o),s(o)},e=>{if(e.lengthComputable){let i=e.loaded/e.total*100;i>n&&t?.(n=i)}},e=>{o(e)},this.__getAbortSignal(i))})}loadImage(e,t,i){let s=iu.get(e,i);return s?(t?.(100),s instanceof Blob)?this.blobToImage(s):Promise.resolve(s):t||this.config.requestHeaders?this.loadFile(e,t,i).then(e=>this.blobToImage(e)):new Promise((t,s)=>{this.imageLoader.load(e,s=>{iu.add(e,i,s),t(s)},e=>{s(e)},this.__getAbortSignal(i))})}blobToImage(e){return new Promise((t,i)=>{let s=document.createElement("img");s.onload=()=>{URL.revokeObjectURL(s.src),t(s)},s.onerror=i,s.src=URL.createObjectURL(e)})}preloadPanorama(e){return this.viewer.adapter.supportsPreload(e)?this.viewer.adapter.loadTexture(e,!1):Promise.reject(new et("Current adapter does not support preload"))}dispatchProgress(e){this.viewer.loader.setProgress(e),this.viewer.dispatchEvent(new te(Math.round(e)))}__getAbortSignal(e){return e?(this.abortCtrl[e]?.signal.aborted&&delete this.abortCtrl[e],this.abortCtrl[e]||(this.abortCtrl[e]=new AbortController),this.abortCtrl[e].signal):null}},iz=class extends ib{constructor(e){super(e),this.zoom=new eI(e=>{this.viewer.state.vFov=this.viewer.dataHelper.zoomLevelToFov(e),this.viewer.state.hFov=this.viewer.dataHelper.vFovToHFov(this.viewer.state.vFov),this.viewer.dispatchEvent(new tI(e))},{defaultValue:this.viewer.config.defaultZoomLvl,min:0,max:100,wrap:!1}),this.position=new ek(e=>{this.viewer.dataHelper.sphericalCoordsToVector3(e,this.viewer.state.direction),this.viewer.dispatchEvent(new tc(e))},{yaw:new eI(null,{defaultValue:this.config.defaultYaw,min:0,max:2*Math.PI,wrap:!0}),pitch:new eI(null,{defaultValue:this.config.defaultPitch,min:-Math.PI/2,max:Math.PI/2,wrap:!1})}),this.roll=new eI(e=>{this.viewer.state.roll=e,this.viewer.dispatchEvent(new tu(e))},{defaultValue:0,min:-Math.PI,max:Math.PI,wrap:!1}),this.updateSpeeds()}updateSpeeds(){this.zoom.setSpeed(50*this.config.zoomSpeed),this.position.setSpeed(o.M8C.degToRad(50*this.config.moveSpeed)),this.roll.setSpeed(o.M8C.degToRad(50*this.config.moveSpeed))}update(e){this.zoom.update(e),this.position.update(e),this.roll.update(e)}},iD=class{constructor(){this.ready=!1,this.needsUpdate=!1,this.continuousUpdateCount=0,this.keyboardEnabled=!1,this.direction=new o.Pa4(0,0,w),this.roll=0,this.vFov=60,this.hFov=60,this.aspect=1,this.animation=null,this.transitionAnimation=null,this.loadingPromise=null,this.idleTime=-1,this.objectsObservers={}
16,this.size={width:0,height:0}}},iH=class extends eN{constructor(e){if(super(),this.plugins={},this.children=[],this.parent=S(e.container),!this.parent)throw new et('"container" element not found.');this.parent[f]=this,this.container=document.createElement("div"),this.container.classList.add("psv-container"),this.parent.appendChild(this.container),eC(this.parent),eT(this.container,"core"),this.state=new iD,this.config=ir(e),this.__setSize(this.config.size),this.overlay=new im(this);try{tj.load()}catch(t){console.error(t),this.showError(this.config.lang.webglError);return}for(let i of(iu.init(),this.adapter=new this.config.adapter[0](this,this.config.adapter[1]),this.renderer=new iP(this),this.textureLoader=new iS(this),this.eventsHandler=new ix(this),this.dataHelper=new iM(this),this.dynamics=new iz(this),this.adapter.init?.(),this.loader=new ip(this),this.navbar=new id(this),this.panel=new ig(this),this.notification=new iv(this),this.autoSize(),this.setCursor(null),ei(tj.isTouchEnabled,e=>{z(this.container,"psv--is-touch",e)}),this.config.plugins.forEach(([e,t])=>{this.plugins[e.id]=new e(this,t)}),Object.values(this.plugins)))i.init?.();this.config.navbar&&this.navbar.setButtons(this.config.navbar),this.state.loadingPromise||(this.config.panorama?this.setPanorama(this.config.panorama,{sphereCorrection:this.config.sphereCorrection,panoData:this.config.panoData}):this.loader.show())}destroy(){for(let[e,t]of(this.stopAll(),this.stopKeyboardControl(),this.exitFullscreen(),Object.entries(this.plugins)))t.destroy(),delete this.plugins[e];this.children.slice().forEach(e=>e.destroy()),this.children.length=0,this.eventsHandler?.destroy(),this.renderer?.destroy(),this.textureLoader?.destroy(),this.dataHelper?.destroy(),this.adapter?.destroy(),this.dynamics?.destroy(),this.parent.removeChild(this.container),delete this.parent[f]}init(){this.eventsHandler.init(),this.renderer.init(),this.config.navbar&&this.navbar.show(),"always"===this.config.keyboard&&this.startKeyboardControl(),this.resetIdleTimer(),this.state.ready=!0,this.dispatchEvent(new tv)}resetIdleTimer(){this.state.idleTime=performance.now()}disableIdleTimer(){this.state.idleTime=-1}getPlugin(e){if("string"==typeof e)return this.plugins[e];{let t=it(e);return t?this.plugins[t.id]:null}}getPosition(){return this.dataHelper.cleanPosition(this.dynamics.position.current)}getZoomLevel(){return this.dynamics.zoom.current}getSize(){return{...this.state.size}}isFullscreenEnabled(){return W(this.parent,tj.isIphone)}needsUpdate(){this.state.needsUpdate=!0}needsContinuousUpdate(e){e?this.state.continuousUpdateCount++:this.state.continuousUpdateCount>0&&this.state.continuousUpdateCount--}autoSize(){(this.container.clientWidth!==this.state.size.width||this.container.clientHeight!==this.state.size.height)&&(this.state.size.width=Math.round(this.container.clientWidth),this.state.size.height=Math.round(this.container.clientHeight),this.state.aspect=this.state.size.width/this.state.size.height,this.state.hFov=this.dataHelper.vFovToHFov(this.state.vFov),this.dispatchEvent(new tC(this.getSize())),this.navbar.autoSize())}setPanorama(e,t={}){this.textureLoader.abortLoading(),this.state.transitionAnimation?.cancel();let i=this.dataHelper.getTransitionOptions(t);void 0===t.showLoader&&(t.showLoader=!0),void 0===t.caption&&(t.caption=this.config.caption),void 0===t.description&&(t.description=this.config.description),t.panoData||"function"!=typeof this.config.panoData||(t.panoData=this.config.panoData),this.hideError(),this.resetIdleTimer(),this.config.panorama=e,this.config.caption=t.caption,this.config.description=t.description,this.config.sphereCorrection=t.sphereCorrection;let s=t=>{if(en(t))return!1;if(this.loader.hide(),this.state.loadingPromise=null,!t)return this.navbar.setCaption(this.config.caption),!0;throw this.navbar.setCaption(null),this.showError(this.config.lang.loadError),console.error(t),this.dispatchEvent(new tr(e,t)),t};this.navbar.setCaption(`<em>${this.config.lang.loading}</em>`),(t.showLoader||!this.state.ready)&&this.loader.show(),this.dispatchEvent(new ti(e));let o=this.adapter.loadTexture(this.config.panorama,!0,t.panoData).then(e=>{if(e.panorama!==this.config.panorama)throw this.adapter.disposeTexture(e),eo();let i=this.dataHelper.cleanPanoramaOptions(t,e.panoData);return Q(i.zoom)&&Q(i.position)||this.stopAll(),{textureData:e,cleanOptions:i}});return i&&this.state.ready&&this.adapter.supportsTransition(this.config.panorama)?this.state.loadingPromise=o.then(({textureData:e,cleanOptions:t})=>(this.loader.hide(),this.dispatchEvent(new to(e)),this.state.transitionAnimation=this.renderer.transition(e,t,i),this.state.transitionAnimation)).then(e=>{if(this.state.transitionAnimation=null,this.dispatchEvent(new th(e)),!e)throw eo()}).then(()=>s(),e=>s(e)):this.state.loadingPromise=o.then(({textureData:e,cleanOptions:i})=>{this.renderer.show(),this.renderer.setTexture(e),this.renderer.setPanoramaPose(e.panoData),this.renderer.setSphereCorrection(t.sphereCorrection),this.state.ready||this.init(),this.dispatchEvent(new to(e)),Q(i.zoom)||this.zoom(i.zoom),Q(i.position)||this.rotate(i.position)}).then(()=>s(),e=>s(e)),this.state.loadingPromise}setOptions(e){let t={...this.config,...e};for(let[i,s]of Object.entries(e)){if(!(i in ii)){er(`Unknown option ${i}`);continue}if(i in is){er(is[i]);continue}switch(i in io&&(s=io[i](s,{rawConfig:t,defValue:ii[i]})),this.config[i]=s,i){case"mousemove":this.state.cursorOverride||this.setCursor(null);break;case"caption":this.navbar.setCaption(this.config.caption);break;case"size":this.resize(this.config.size);break;case"sphereCorrection":this.renderer.setSphereCorrection(this.config.sphereCorrection);break;case"navbar":case"lang":this.navbar.setButtons(this.config.navbar);break;case"moveSpeed":case"zoomSpeed":this.dynamics.updateSpeeds();break;case"minFov":case"maxFov":this.dynamics.zoom.setValue(this.dataHelper.fovToZoomLevel(this.state.vFov)),this.dispatchEvent(new tI(this.getZoomLevel()));break;case"keyboard":"always"===this.config.keyboard?this.startKeyboardControl():this.stopKeyboardControl()}}this.needsUpdate(),this.dispatchEvent(new eB(Object.keys(e)))}setOption(e,t){this.setOptions({[e]:t})}showError(e){this.overlay.show({id:b.ERROR,image:'<svg xmlns="http://www.w3.org/2000/svg" viewBox="15 15 70 70">
16<path fill="currentColor" d="M50,16.2c-18.6,0-33.8,15.1-33.8,33.8S31.4,83.7,50,83.7S83.8,68.6,83.8,50S68.6,16.2,50,16.2z M50,80.2c-16.7,0-30.2-13.6-30.2-30.2S33.3,19.7,50,19.7S80.3,33.3,80.3,50S66.7,80.2,50,80.2z"/><rect fill="currentColor" x="48" y="31.7" width="4" height="28"/><rect fill="currentColor" x="48" y="63.2" width="4" height="5"/><!--Created by Shastry from the Noun Project--></svg>\n',title:e,dismissible:!1})}hideError(){this.overlay.hide(b.ERROR)}rotate(e){let t=new e$(this.dataHelper.cleanPosition(e));this.dispatchEvent(t),!t.defaultPrevented&&this.dynamics.position.setValue(t.position)}zoom(e){this.dynamics.zoom.setValue(e)}zoomIn(e=1){this.dynamics.zoom.step(e)}zoomOut(e=1){this.dynamics.zoom.step(-e)}animate(e){let t=ea(e),i=!Q(e.zoom),s=new eV(t?this.dataHelper.cleanPosition(e):void 0,e.zoom);if(this.dispatchEvent(s),s.defaultPrevented)return;this.stopAll();let{duration:o,properties:n}=this.dataHelper.getAnimationProperties(e.speed,s.position,s.zoomLevel);return o?(this.state.animation=new eP({properties:n,duration:o,easing:e.easing||"inOutSine",onTick:e=>{t&&this.dynamics.position.setValue({yaw:e.yaw,pitch:e.pitch}),i&&this.dynamics.zoom.setValue(e.zoom)}}),this.state.animation.then(()=>{this.state.animation=null,this.resetIdleTimer()}),this.state.animation):(t&&this.rotate(s.position),i&&this.zoom(s.zoomLevel),new eP(null))}stopAnimation(){return this.state.animation?(this.state.animation.cancel(),this.state.animation):Promise.resolve()}resize(e){this.__setSize(e),this.autoSize()}__setSize(e){["width","height"].forEach(t=>{e?.[t]&&(/^[0-9.]+$/.test(e[t])&&(e[t]+="px"),this.parent.style[t]=e[t])})}enterFullscreen(){this.isFullscreenEnabled()||$(this.parent,tj.isIphone)}exitFullscreen(){this.isFullscreenEnabled()&&Y(tj.isIphone)}toggleFullscreen(){this.isFullscreenEnabled()?this.exitFullscreen():this.enterFullscreen()}startKeyboardControl(){this.state.keyboardEnabled=!0}stopKeyboardControl(){this.state.keyboardEnabled=!1}createTooltip(e){return new iy(this,e)}setCursor(e){this.state.cursorOverride=e,e?this.container.style.cursor=e:this.container.style.cursor=this.config.mousemove?"move":"default"}observeObjects(e){this.state.objectsObservers[e]||(this.state.objectsObservers[e]=null)}unobserveObjects(e){delete this.state.objectsObservers[e]}stopAll(){return this.dispatchEvent(new tO),this.disableIdleTimer(),this.stopAnimation()}}}}]);
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.