@car-cutter/wc-webplayer 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2446 -2440
- package/dist/index.umd.cjs +4 -4
- package/package.json +5 -5
package/dist/index.umd.cjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(We,ut){typeof exports=="object"&&typeof module<"u"?ut(exports):typeof define=="function"&&define.amd?define(["exports"],ut):(We=typeof globalThis<"u"?globalThis:We||self,ut(We.CarCutterWebplayerWC={}))})(this,function(We){"use strict";const ut="cc-webplayer",Ut="cc-webplayer-custom-media",Vt="cc-webplayer-icon",zn="composition-loading",On="composition-loaded",Hn="composition-load-error",Fn="item-change",Un="extend-mode-on",Vn="extend-mode-off",an="hotspots-on",sn="hotspots-off",Wn="gallery-open",Bn="gallery-close",Cr="quality",Mr="*",Lr="full_screen",Yn="cc-webplayer:",kr="cc-analytics:",Ir="",Tr="";function ln(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Sr(e,t){return`https://cdn.car-cutter.com/gallery/${e}/${t}/composition_v3.json`}function Nr(e,t){const n=e.split("/"),r=n.pop();return[n.join("/"),t,r].join("/")}function Pr(){const e="car-cutter-webplayer-browser-id",t=typeof window<"u"?window.localStorage.getItem(e):null;if(t)return t;const n=ln();return typeof window<"u"&&window.localStorage.setItem(e,n),n}function Rr(){const e="car-cutter-webplayer-session-id",t=typeof window<"u"?window.sessionStorage.getItem(e):null;if(t)return t;const n=ln();return typeof window<"u"&&window.sessionStorage.setItem(e,n),n}function Ar(){return ln()}function Xn(){return!!customElements.get(ut)&&!!customElements.get(Ut)&&!!customElements.get(Vt)}var Tt,be,Gn,_t,Zn,$n,jn,qn,cn,un,dn,Kn,St={},Jn=[],Dr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Nt=Array.isArray;function lt(e,t){for(var n in t)e[n]=t[n];return e}function pn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function dt(e,t,n){var r,s,i,d={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:d[i]=t[i];if(arguments.length>2&&(d.children=arguments.length>3?Tt.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)d[i]===void 0&&(d[i]=e.defaultProps[i]);return Pt(e,d,r,s,null)}function Pt(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Gn,__i:-1,__u:0};return s==null&&be.vnode!=null&&be.vnode(i),i}function zr(){return{current:null}}function Ke(e){return e.children}function ct(e,t){this.props=e,this.context=t}function Ct(e,t){if(t==null)return e.__?Ct(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ct(e):null}function Qn(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return Qn(e)}}function fn(e){(!e.__d&&(e.__d=!0)&&_t.push(e)&&!Wt.__r++||Zn!=be.debounceRendering)&&((Zn=be.debounceRendering)||$n)(Wt)}function Wt(){for(var e,t,n,r,s,i,d,o=1;_t.length;)_t.length>o&&_t.sort(jn),e=_t.shift(),o=_t.length,e.__d&&(n=void 0,r=void 0,s=(r=(t=e).__v).__e,i=[],d=[],t.__P&&((n=lt({},r)).__v=r.__v+1,be.vnode&&be.vnode(n),hn(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[s]:null,i,s??Ct(r),!!(32&r.__u),d),n.__v=r.__v,n.__.__k[n.__i]=n,ro(i,n,d),r.__e=r.__=null,n.__e!=s&&Qn(n)));Wt.__r=0}function eo(e,t,n,r,s,i,d,o,v,h,k){var f,p,a,E,T,w,g,M=r&&r.__k||Jn,C=t.length;for(v=Or(n,t,M,v,C),f=0;f<C;f++)(a=n.__k[f])!=null&&(p=a.__i==-1?St:M[a.__i]||St,a.__i=f,w=hn(e,a,p,s,i,d,o,v,h,k),E=a.__e,a.ref&&p.ref!=a.ref&&(p.ref&&gn(p.ref,null,a),k.push(a.ref,a.__c||E,a)),T==null&&E!=null&&(T=E),(g=!!(4&a.__u))||p.__k===a.__k?v=to(a,v,e,g):typeof a.type=="function"&&w!==void 0?v=w:E&&(v=E.nextSibling),a.__u&=-7);return n.__e=T,v}function Or(e,t,n,r,s){var i,d,o,v,h,k=n.length,f=k,p=0;for(e.__k=new Array(s),i=0;i<s;i++)(d=t[i])!=null&&typeof d!="boolean"&&typeof d!="function"?(typeof d=="string"||typeof d=="number"||typeof d=="bigint"||d.constructor==String?d=e.__k[i]=Pt(null,d,null,null,null):Nt(d)?d=e.__k[i]=Pt(Ke,{children:d},null,null,null):d.constructor===void 0&&d.__b>0?d=e.__k[i]=Pt(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):e.__k[i]=d,v=i+p,d.__=e,d.__b=e.__b+1,o=null,(h=d.__i=Hr(d,n,v,f))!=-1&&(f--,(o=n[h])&&(o.__u|=2)),o==null||o.__v==null?(h==-1&&(s>k?p--:s<k&&p++),typeof d.type!="function"&&(d.__u|=4)):h!=v&&(h==v-1?p--:h==v+1?p++:(h>v?p--:p++,d.__u|=4))):e.__k[i]=null;if(f)for(i=0;i<k;i++)(o=n[i])!=null&&!(2&o.__u)&&(o.__e==r&&(r=Ct(o)),io(o,o));return r}function to(e,t,n,r){var s,i;if(typeof e.type=="function"){for(s=e.__k,i=0;s&&i<s.length;i++)s[i]&&(s[i].__=e,t=to(s[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Ct(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function pt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Nt(e)?e.some(function(n){pt(n,t)}):t.push(e)),t}function Hr(e,t,n,r){var s,i,d,o=e.key,v=e.type,h=t[n],k=h!=null&&(2&h.__u)==0;if(h===null&&o==null||k&&o==h.key&&v==h.type)return n;if(r>(k?1:0)){for(s=n-1,i=n+1;s>=0||i<t.length;)if((h=t[d=s>=0?s--:i++])!=null&&!(2&h.__u)&&o==h.key&&v==h.type)return d}return-1}function no(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||Dr.test(t)?n:n+"px"}function Bt(e,t,n,r,s){var i,d;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||no(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||no(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(qn,"$1")),d=t.toLowerCase(),t=d in e||t=="onFocusOut"||t=="onFocusIn"?d.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=cn,e.addEventListener(t,i?dn:un,i)):e.removeEventListener(t,i?dn:un,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function oo(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=cn++;else if(t.t<n.u)return;return n(be.event?be.event(t):t)}}}function hn(e,t,n,r,s,i,d,o,v,h){var k,f,p,a,E,T,w,g,M,C,m,L,S,Q,I,q,K,H=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(v=!!(32&n.__u),i=[o=t.__e=n.__e]),(k=be.__b)&&k(t);e:if(typeof H=="function")try{if(g=t.props,M="prototype"in H&&H.prototype.render,C=(k=H.contextType)&&r[k.__c],m=k?C?C.props.value:k.__:r,n.__c?w=(f=t.__c=n.__c).__=f.__E:(M?t.__c=f=new H(g,m):(t.__c=f=new ct(g,m),f.constructor=H,f.render=Ur),C&&C.sub(f),f.state||(f.state={}),f.__n=r,p=f.__d=!0,f.__h=[],f._sb=[]),M&&f.__s==null&&(f.__s=f.state),M&&H.getDerivedStateFromProps!=null&&(f.__s==f.state&&(f.__s=lt({},f.__s)),lt(f.__s,H.getDerivedStateFromProps(g,f.__s))),a=f.props,E=f.state,f.__v=t,p)M&&H.getDerivedStateFromProps==null&&f.componentWillMount!=null&&f.componentWillMount(),M&&f.componentDidMount!=null&&f.__h.push(f.componentDidMount);else{if(M&&H.getDerivedStateFromProps==null&&g!==a&&f.componentWillReceiveProps!=null&&f.componentWillReceiveProps(g,m),t.__v==n.__v||!f.__e&&f.shouldComponentUpdate!=null&&f.shouldComponentUpdate(g,f.__s,m)===!1){for(t.__v!=n.__v&&(f.props=g,f.state=f.__s,f.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(oe){oe&&(oe.__=t)}),L=0;L<f._sb.length;L++)f.__h.push(f._sb[L]);f._sb=[],f.__h.length&&d.push(f);break e}f.componentWillUpdate!=null&&f.componentWillUpdate(g,f.__s,m),M&&f.componentDidUpdate!=null&&f.__h.push(function(){f.componentDidUpdate(a,E,T)})}if(f.context=m,f.props=g,f.__P=e,f.__e=!1,S=be.__r,Q=0,M){for(f.state=f.__s,f.__d=!1,S&&S(t),k=f.render(f.props,f.state,f.context),I=0;I<f._sb.length;I++)f.__h.push(f._sb[I]);f._sb=[]}else do f.__d=!1,S&&S(t),k=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++Q<25);f.state=f.__s,f.getChildContext!=null&&(r=lt(lt({},r),f.getChildContext())),M&&!p&&f.getSnapshotBeforeUpdate!=null&&(T=f.getSnapshotBeforeUpdate(a,E)),q=k,k!=null&&k.type===Ke&&k.key==null&&(q=ao(k.props.children)),o=eo(e,Nt(q)?q:[q],t,n,r,s,i,d,o,v,h),f.base=t.__e,t.__u&=-161,f.__h.length&&d.push(f),w&&(f.__E=f.__=null)}catch(oe){if(t.__v=null,v||i!=null)if(oe.then){for(t.__u|=v?160:128;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;i[i.indexOf(o)]=null,t.__e=o}else{for(K=i.length;K--;)pn(i[K]);mn(t)}else t.__e=n.__e,t.__k=n.__k,oe.then||mn(t);be.__e(oe,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):o=t.__e=Fr(n.__e,t,n,r,s,i,d,v,h);return(k=be.diffed)&&k(t),128&t.__u?void 0:o}function mn(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(mn)}function ro(e,t,n){for(var r=0;r<n.length;r++)gn(n[r],n[++r],n[++r]);be.__c&&be.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){be.__e(i,s.__v)}})}function ao(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Nt(e)?e.map(ao):lt({},e)}function Fr(e,t,n,r,s,i,d,o,v){var h,k,f,p,a,E,T,w=n.props||St,g=t.props,M=t.type;if(M=="svg"?s="http://www.w3.org/2000/svg":M=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(h=0;h<i.length;h++)if((a=i[h])&&"setAttribute"in a==!!M&&(M?a.localName==M:a.nodeType==3)){e=a,i[h]=null;break}}if(e==null){if(M==null)return document.createTextNode(g);e=document.createElementNS(s,M,g.is&&g),o&&(be.__m&&be.__m(t,i),o=!1),i=null}if(M==null)w===g||o&&e.data==g||(e.data=g);else{if(i=i&&Tt.call(e.childNodes),!o&&i!=null)for(w={},h=0;h<e.attributes.length;h++)w[(a=e.attributes[h]).name]=a.value;for(h in w)if(a=w[h],h!="children"){if(h=="dangerouslySetInnerHTML")f=a;else if(!(h in g)){if(h=="value"&&"defaultValue"in g||h=="checked"&&"defaultChecked"in g)continue;Bt(e,h,null,a,s)}}for(h in g)a=g[h],h=="children"?p=a:h=="dangerouslySetInnerHTML"?k=a:h=="value"?E=a:h=="checked"?T=a:o&&typeof a!="function"||w[h]===a||Bt(e,h,a,w[h],s);if(k)o||f&&(k.__html==f.__html||k.__html==e.innerHTML)||(e.innerHTML=k.__html),t.__k=[];else if(f&&(e.innerHTML=""),eo(t.type=="template"?e.content:e,Nt(p)?p:[p],t,n,r,M=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,d,i?i[0]:n.__k&&Ct(n,0),o,v),i!=null)for(h=i.length;h--;)pn(i[h]);o||(h="value",M=="progress"&&E==null?e.removeAttribute("value"):E!=null&&(E!==e[h]||M=="progress"&&!E||M=="option"&&E!=w[h])&&Bt(e,h,E,w[h],s),h="checked",T!=null&&T!=e[h]&&Bt(e,h,T,w[h],s))}return e}function gn(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(s){be.__e(s,n)}}function io(e,t,n){var r,s;if(be.unmount&&be.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||gn(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){be.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&io(r[s],t,n||typeof e.type!="function");n||pn(e.__e),e.__c=e.__=e.__e=void 0}function Ur(e,t,n){return this.constructor(e,n)}function Rt(e,t,n){var r,s,i,d;t==document&&(t=document.documentElement),be.__&&be.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],d=[],hn(t,e=(!r&&n||t).__k=dt(Ke,null,[e]),s||St,St,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?Tt.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,d),ro(i,e,d)}function so(e,t){Rt(e,t,so)}function Vr(e,t,n){var r,s,i,d,o=lt({},e.props);for(i in e.type&&e.type.defaultProps&&(d=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i]===void 0&&d!=null?d[i]:t[i];return arguments.length>2&&(o.children=arguments.length>3?Tt.call(arguments,2):n),Pt(e.type,o,r||e.key,s||e.ref,null)}function At(e){function t(n){var r,s;return this.getChildContext||(r=new Set,(s={})[t.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(d){d.__e=!0,fn(d)})},this.sub=function(i){r.add(i);var d=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),d&&d.call(i)}}),n.children}return t.__c="__cC"+Kn++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Tt=Jn.slice,be={__e:function(e,t,n,r){for(var s,i,d;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),d=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),d=s.__d),d)return s.__E=s}catch(o){e=o}throw e}},Gn=0,ct.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=lt({},this.state),typeof e=="function"&&(e=e(lt({},n),this.props)),e&<(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),fn(this))},ct.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),fn(this))},ct.prototype.render=Ke,_t=[],$n=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,jn=function(e,t){return e.__v.__b-t.__v.__b},Wt.__r=0,qn=/(PointerCapture)$|Capture$/i,cn=0,un=oo(!1),dn=oo(!0),Kn=0;var Wr=0;function c(e,t,n,r,s,i){t||(t={});var d,o,v=t;if("ref"in v)for(o in v={},t)o=="ref"?d=t[o]:v[o]=t[o];var h={type:e,props:v,key:n,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Wr,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(d=e.defaultProps))for(o in d)v[o]===void 0&&(v[o]=d[o]);return be.vnode&&be.vnode(h),h}var mt,Be,vn,lo,Mt=0,co=[],Ge=be,uo=Ge.__b,po=Ge.__r,fo=Ge.diffed,ho=Ge.__c,mo=Ge.unmount,go=Ge.__;function Lt(e,t){Ge.__h&&Ge.__h(Be,e,Mt||t),Mt=0;var n=Be.__H||(Be.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function xe(e){return Mt=1,_n(bo,e)}function _n(e,t,n){var r=Lt(mt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):bo(void 0,t),function(o){var v=r.__N?r.__N[0]:r.__[0],h=r.t(v,o);v!==h&&(r.__N=[h,r.__[1]],r.__c.setState({}))}],r.__c=Be,!Be.__f)){var s=function(o,v,h){if(!r.__c.__H)return!0;var k=r.__c.__H.__.filter(function(p){return!!p.__c});if(k.every(function(p){return!p.__N}))return!i||i.call(this,o,v,h);var f=r.__c.props!==o;return k.forEach(function(p){if(p.__N){var a=p.__[0];p.__=p.__N,p.__N=void 0,a!==p.__[0]&&(f=!0)}}),i&&i.call(this,o,v,h)||f};Be.__f=!0;var i=Be.shouldComponentUpdate,d=Be.componentWillUpdate;Be.componentWillUpdate=function(o,v,h){if(this.__e){var k=i;i=void 0,s(o,v,h),i=k}d&&d.call(this,o,v,h)},Be.shouldComponentUpdate=s}return r.__N||r.__}function fe(e,t){var n=Lt(mt++,3);!Ge.__s&&yn(n.__H,t)&&(n.__=e,n.u=t,Be.__H.__h.push(n))}function Dt(e,t){var n=Lt(mt++,4);!Ge.__s&&yn(n.__H,t)&&(n.__=e,n.u=t,Be.__h.push(n))}function ve(e){return Mt=5,De(function(){return{current:e}},[])}function vo(e,t,n){Mt=6,Dt(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function De(e,t){var n=Lt(mt++,7);return yn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function X(e,t){return Mt=8,De(function(){return e},t)}function kt(e){var t=Be.context[e.__c],n=Lt(mt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Be)),t.props.value):e.__}function _o(e,t){Ge.useDebugValue&&Ge.useDebugValue(t?t(e):e)}function wo(){var e=Lt(mt++,11);if(!e.__){for(var t=Be.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Br(){for(var e;e=co.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Yt),e.__H.__h.forEach(wn),e.__H.__h=[]}catch(t){e.__H.__h=[],Ge.__e(t,e.__v)}}Ge.__b=function(e){Be=null,uo&&uo(e)},Ge.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),go&&go(e,t)},Ge.__r=function(e){po&&po(e),mt=0;var t=(Be=e.__c).__H;t&&(vn===Be?(t.__h=[],Be.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Yt),t.__h.forEach(wn),t.__h=[],mt=0)),vn=Be},Ge.diffed=function(e){fo&&fo(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(co.push(t)!==1&&lo===Ge.requestAnimationFrame||((lo=Ge.requestAnimationFrame)||Yr)(Br)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),vn=Be=null},Ge.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Yt),n.__h=n.__h.filter(function(r){return!r.__||wn(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],Ge.__e(r,n.__v)}}),ho&&ho(e,t)},Ge.unmount=function(e){mo&&mo(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Yt(r)}catch(s){t=s}}),n.__H=void 0,t&&Ge.__e(t,n.__v))};var yo=typeof requestAnimationFrame=="function";function Yr(e){var t,n=function(){clearTimeout(r),yo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yo&&(t=requestAnimationFrame(n))}function Yt(e){var t=Be,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Be=t}function wn(e){var t=Be;e.__c=e.__(),Be=t}function yn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function bo(e,t){return typeof t=="function"?t(e):t}function xo(e,t){for(var n in t)e[n]=t[n];return e}function bn(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Eo(e,t){var n=t(),r=xe({t:{__:n,u:t}}),s=r[0].t,i=r[1];return Dt(function(){s.__=n,s.u=t,xn(s)&&i({t:s})},[e,n,t]),fe(function(){return xn(s)&&i({t:s}),e(function(){xn(s)&&i({t:s})})},[e]),n}function xn(e){var t,n,r=e.u,s=e.__;try{var i=r();return!((t=s)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Co(e){e()}function Mo(e){return e}function Lo(){return[!1,Co]}var ko=Dt;function Xt(e,t){this.props=e,this.context=t}function Xr(e,t){function n(s){var i=this.props.ref,d=i==s.ref;return!d&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!d:bn(this.props,s)}function r(s){return this.shouldComponentUpdate=n,dt(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Xt.prototype=new ct).isPureReactComponent=!0,Xt.prototype.shouldComponentUpdate=function(e,t){return bn(this.props,e)||bn(this.state,t)};var Io=be.__b;be.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Io&&Io(e)};var Gr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function To(e){function t(n){var r=xo({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Gr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var So=function(e,t){return e==null?null:pt(pt(e).map(t))},Zr={map:So,forEach:So,count:function(e){return e?pt(e).length:0},only:function(e){var t=pt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:pt},$r=be.__e;be.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}$r(e,t,n,r)};var No=be.unmount;function Po(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=xo({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Po(r,t,n)})),e}function Ro(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ro(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Gt(){this.__u=0,this.o=null,this.__b=null}function Ao(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function jr(e){var t,n,r,s=null;function i(d){if(t||(t=e()).then(function(o){o&&(s=o.default||o),r=!0},function(o){n=o,r=!0}),n)throw n;if(!r)throw t;return s?dt(s,d):null}return i.displayName="Lazy",i.__f=!0,i}function zt(){this.i=null,this.l=null}be.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),No&&No(e)},(Gt.prototype=new ct).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var s=Ao(r.__v),i=!1,d=function(){i||r.__z||(i=!0,n.__R=null,s?s(v):v())};n.__R=d;var o=n.__P;n.__P=null;var v=function(){if(!--r.__u){if(r.state.__a){var h=r.state.__a;r.__v.__k[0]=Ro(h,h.__c.__P,h.__c.__O)}var k;for(r.setState({__a:r.__b=null});k=r.o.pop();)k.__P=o,k.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(d,d)},Gt.prototype.componentWillUnmount=function(){this.o=[]},Gt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Po(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&dt(Ke,null,e.fallback);return s&&(s.__u&=-33),[dt(Ke,null,t.__a?null:e.children),s]};var Do=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function qr(e){return this.getChildContext=function(){return e.context},e.children}function Kr(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Rt(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(s,i){this.childNodes.push(s),t.h.insertBefore(s,i)},removeChild:function(s){this.childNodes.splice(this.childNodes.indexOf(s)>>>1,1),t.h.removeChild(s)}}}Rt(dt(qr,{context:t.context},e.__v),t.v)}function Jr(e,t){var n=dt(Kr,{__v:e,h:t});return n.containerInfo=t,n}(zt.prototype=new ct).__a=function(e){var t=this,n=Ao(t.__v),r=t.l.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),Do(t,e,r)):s()};n?n(i):i()}},zt.prototype.render=function(e){this.i=null,this.l=new Map;var t=pt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},zt.prototype.componentDidUpdate=zt.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Do(e,n,t)})};var zo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Qr=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ea=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,ta=/[A-Z0-9]/g,na=typeof document<"u",oa=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Oo(e,t,n){return t.__k==null&&(t.textContent=""),Rt(e,t),typeof n=="function"&&n(),e?e.__c:null}function ra(e,t,n){return so(e,t),typeof n=="function"&&n(),e?e.__c:null}ct.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ct.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ho=be.event;function aa(){}function ia(){return this.cancelBubble}function sa(){return this.defaultPrevented}be.event=function(e){return Ho&&(e=Ho(e)),e.persist=aa,e.isPropagationStopped=ia,e.isDefaultPrevented=sa,e.nativeEvent=e};var En,la={enumerable:!1,configurable:!0,get:function(){return this.class}},Fo=be.vnode;be.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={},i=r.indexOf("-")===-1;for(var d in n){var o=n[d];if(!(d==="value"&&"defaultValue"in n&&o==null||na&&d==="children"&&r==="noscript"||d==="class"||d==="className")){var v=d.toLowerCase();d==="defaultValue"&&"value"in n&&n.value==null?d="value":d==="download"&&o===!0?o="":v==="translate"&&o==="no"?o=!1:v[0]==="o"&&v[1]==="n"?v==="ondoubleclick"?d="ondblclick":v!=="onchange"||r!=="input"&&r!=="textarea"||oa(n.type)?v==="onfocus"?d="onfocusin":v==="onblur"?d="onfocusout":ea.test(d)&&(d=v):v=d="oninput":i&&Qr.test(d)?d=d.replace(ta,"-$&").toLowerCase():o===null&&(o=void 0),v==="oninput"&&s[d=v]&&(d="oninputCapture"),s[d]=o}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=pt(n.children).forEach(function(h){h.props.selected=s.value.indexOf(h.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=pt(n.children).forEach(function(h){h.props.selected=s.multiple?s.defaultValue.indexOf(h.props.value)!=-1:s.defaultValue==h.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",la)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=zo,Fo&&Fo(e)};var Uo=be.__r;be.__r=function(e){Uo&&Uo(e),En=e.__c};var Vo=be.diffed;be.diffed=function(e){Vo&&Vo(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),En=null};var ca={ReactCurrentDispatcher:{current:{readContext:function(e){return En.__n[e.__c].props.value},useCallback:X,useContext:kt,useDebugValue:_o,useDeferredValue:Mo,useEffect:fe,useId:wo,useImperativeHandle:vo,useInsertionEffect:ko,useLayoutEffect:Dt,useMemo:De,useReducer:_n,useRef:ve,useState:xe,useSyncExternalStore:Eo,useTransition:Lo}}};function ua(e){return dt.bind(null,e)}function Zt(e){return!!e&&e.$$typeof===zo}function da(e){return Zt(e)&&e.type===Ke}function pa(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function fa(e){return Zt(e)?Vr.apply(null,arguments):e}function Wo(e){return!!e.__k&&(Rt(null,e),!0)}function ha(e){return e&&(e.base||e.nodeType===1&&e)||null}var ma=function(e,t){return e(t)},ga=function(e,t){return e(t)},va=Ke,_a=Zt,Cn={useState:xe,useId:wo,useReducer:_n,useEffect:fe,useLayoutEffect:Dt,useInsertionEffect:ko,useTransition:Lo,useDeferredValue:Mo,useSyncExternalStore:Eo,startTransition:Co,useRef:ve,useImperativeHandle:vo,useMemo:De,useCallback:X,useContext:kt,useDebugValue:_o,version:"18.3.1",Children:Zr,render:Oo,hydrate:ra,unmountComponentAtNode:Wo,createPortal:Jr,createElement:dt,createContext:At,createFactory:ua,cloneElement:fa,createRef:zr,Fragment:Ke,isValidElement:Zt,isElement:_a,isFragment:da,isMemo:pa,findDOMNode:ha,Component:ct,PureComponent:Xt,memo:Xr,forwardRef:To,flushSync:ga,unstable_batchedUpdates:ma,StrictMode:va,Suspense:Gt,SuspenseList:zt,lazy:jr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ca};async function wa(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch composition: ${t.statusText}`);return await t.json()}const Mn=new Map,ya=e=>{const[t,n]=xe({status:"pending",isSuccess:!1});return fe(()=>{const r=i=>n({status:"success",data:i,isSuccess:!0}),s=Mn.get(e);if(s&&!(s instanceof Promise)){r(s);return}n({status:"fetching",isSuccess:!1}),async function(){try{let i;if(s)i=await s;else{const d=wa(e);Mn.set(e,d),i=await d,Mn.set(e,i)}r(i)}catch(i){n({status:"error",isSuccess:!1,error:i})}}()},[e]),t},Bo=At(null),Je=()=>{const e=kt(Bo);if(!e)throw new Error("useGlobalContext must be used within a GlobalContextProvider");return e},ba=({children:e,...t})=>c(Bo.Provider,{value:t,children:e}),Yo=At(null),gt=()=>{const e=kt(Yo);if(!e)throw new Error("useCompositionContext must be used within a CompositionContextProvider");return e},xa=({composition:e,children:t})=>{const{aspectRatio:n,categories:r,imageHdWidth:s,imageSubWidths:i}=e,{minMediaWidth:d,maxMediaWidth:o,categoriesFilter:v}=Je(),h=De(()=>{if(v==="*")return r;function a(E){return v.split("|").some(T=>new RegExp(`^${T.replace(/\*/g,".*")}$`).test(E))}return r.filter(({id:E})=>a(E))},[r,v]),k=De(()=>h.flatMap(({items:a})=>a),[h]),f={aspectRatio:n.replace(":"," / ")},p=De(()=>{const a=i.concat(s),E=a.sort((w,g)=>w-g),T=E.filter(w=>w>=d&&w<=o);if(T.length===0){const w=(d+o)/2,g=a.reduce((M,C)=>Math.abs(C-w)<Math.abs(M-w)?C:M,s);return console.warn(`None of available media widths (${E.join("|")}) match the given constraints (${d>0?`${d} ≤ `:""}width${o<1/0?` ≤ ${o}`:""}).`,`Using the closest width instead (${g}).`),[g]}return T},[i,s,d,o]);return c(Yo.Provider,{value:{...e,categories:h,items:k,aspectRatioStyle:f,usedMediaWidths:p},children:t})},Xo=500,wt=.75,yt=1+wt*2,Go=()=>{const{isFullScreen:e,maxItemsShown:t,integration:n}=Je();return{effectiveMaxItemsShown:n&&e?1:t}};function it(e,t,n){return Math.min(Math.max(e,t),n)}const $t=(e,t,n)=>e+(t-e)*n,Zo=(e,t,n,r,s,i=!1)=>{const d=it(e,t,n);if(d===(i?n:t))return r;if(d===(i?t:n))return 1;const o=(d-t)/(n-t),h=1+(i?o:1-o)*(r-1),f=1+Math.round((h-1)/s)*s;return it(f,1,r)},Ea=(e,t)=>{if(t.includes(e))return e;let n=t[0],r=Math.abs(e-n);for(let s=1;s<t.length;s++){const i=Math.abs(e-t[s]);i<r&&(r=i,n=t[s])}return n},$o=At(null),Ln=()=>kt($o),Ot=()=>{const e=Ln();if(!e)throw new Error("useCustomizationContext must be used within a CustomizationContextProvider");return e},jo="*:size-full",qo="*:object-cover *:size-full",Ca=({children:e})=>{const{compositionUrl:t}=Je(),n=X(()=>document.querySelector(`${ut}[composition-url="${t}"]`),[t]),r=X(E=>{const T=E.querySelectorAll(Vt),w=new Map;for(const g of T){const M=g.getAttribute("name");if(!M){console.warn("Icon element is missing a name attribute");continue}const C=g.innerHTML,m=C?c("div",{className:jo,dangerouslySetInnerHTML:{__html:C}}):void 0;if(!m){console.warn(`Icon "${M}" customization is empty.`);continue}w.set(M,{Icon:m})}return w},[]),[s,i]=xe(()=>{const E=n();return E?r(E):new Map});fe(()=>{const E=n();if(!E)return;const T=new MutationObserver(()=>{i(r(E))});return T.observe(E,{childList:!0,subtree:!0}),()=>T.disconnect()},[r,n]);const d=X(E=>s.get(E),[s]),o=X((E,T)=>{i(w=>{const{Icon:g,...M}=T;return new Map(w.set(E,{...M,Icon:c("div",{className:jo,children:g})}))})},[]),v=X(E=>{i(T=>(T.delete(E),new Map(T)))},[]),h=X(E=>{const T=E.querySelectorAll(Ut),w=new Array;for(const g of T){const M=g.innerHTML;if(!M){console.warn("Custom media element is empty");continue}const C=Number(g.getAttribute("index"));if(Number.isNaN(C)){console.warn("Custom media element is missing the 'index' attribute");continue}const m=g.getAttribute("thumbnail-src")??void 0,L=JSON.stringify({index:C,thumbnailSrc:m});w.push({id:L,Media:c("div",{className:qo,dangerouslySetInnerHTML:{__html:M}}),index:C,thumbnailSrc:m})}return w},[]),[k,f]=xe(()=>{const E=n();return E?h(E):[]});fe(()=>{const E=n();if(!E)return;const T=new MutationObserver(()=>{f(h(E))});return T.observe(E,{childList:!0,subtree:!0}),()=>T.disconnect()},[h,n]);const p=X(E=>{const{Media:T,...w}=E,g=c("div",{className:qo,children:T}),M=JSON.stringify(w);return f(C=>[...C,{id:M,Media:g,...w}]),M},[]),a=X(E=>{f(T=>T.filter(w=>w.id!==E))},[]);return c($o.Provider,{value:{getIconConfig:d,registerIconConfig:o,unregisterIconConfig:v,customMediaList:k,registerCustomMedia:p,unregisterCustomMedia:a},children:e})},Ko=At(null),Qe=()=>{const e=kt(Ko);if(!e)throw new Error("useControlsContext must be used within a ControlsContextProvider");return e},Ma=({children:e})=>{const{infiniteCarrousel:t,extendBehavior:n,integration:r,emitEvent:s,emitAnalyticsEvent:i,isFullScreen:d,requestFullscreen:o,exitFullscreen:v}=Je(),{customMediaList:h}=Ot(),{categories:k,items:f}=gt(),p=De(()=>{const Y=new Array(...f),se=h.slice().sort((R,pe)=>R.index<0&&pe.index<0?pe.index-R.index:R.index<0?1:pe.index<0?-1:R.index-pe.index);for(const R of se){let pe=R.index;pe<0&&(pe=Y.length+pe+1),Y.splice(pe,0,{type:"custom",...R})}return Y},[f,h]),[a,E]=xe(p.map(()=>null));fe(()=>{E(p.map(()=>null))},[p]);const T=X((Y,se)=>{E(R=>R.map((pe,Ee)=>Ee===Y?se:pe))},[]),[w,g]=xe(0),[M,C]=xe(null),m=M??w,L=p[m],S=a[m],[Q,I]=xe(null),q=!!Q,K=X(()=>I(null),[]),{effectiveMaxItemsShown:H}=Go(),oe=X(Y=>{const se=Math.min(w,Y),R=Math.max(w,Y);a.slice(se,R+1).filter(Ee=>Ee===null).length>2&&I("instant"),C(Y)},[w,a]),N=De(()=>{let Y;if(L.type==="custom"){const se=p.slice(0,m).reverse().find(R=>R.type!=="custom")??p.slice(m+1).find(R=>R.type!=="custom");if(!se)throw new Error("No non-custom item found");Y=se}else Y=L;for(const se of k)if(se.items.includes(Y))return se.id;throw new Error("Current item not found in any category")},[k,L,p,m]),U=De(()=>k.find(({id:Y})=>Y===N)?.title??"Unnamed Category",[k,N]),me=De(()=>p.length,[p]),O=X(Y=>{const se=k.find(({id:pe})=>pe===Y)?.items[0];if(se===void 0)throw new Error("Failed to find target category");const R=p.findIndex(pe=>pe===se);oe(R)},[k,p,oe]),A=X(()=>{if(q||M!==null)return;const Y=w-1;if(Y>=0)C(Y);else if(t){I("first_to_last");const se=Math.ceil(H),R=p.length+(r&&!t&&H%1!==0?1:0),pe=H>1?Math.max(0,R-se):p.length-1;C(pe)}i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Item Navigation",action_field:"item_navigation",action_value:"prev"}})},[q,M,w,t,i,N,U,L.type,H,p.length,r]),ee=X(()=>{if(q||M!==null)return;const Y=w+1,se=Math.ceil(H),R=p.length+(r&&!t&&H%1!==0?1:0),pe=H>1?Math.max(0,R-se):p.length-1;Y<=pe?C(Y):t&&(I("last_to_first"),C(0)),i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Item Navigation",action_field:"item_navigation",action_value:"next"}})},[q,M,w,H,p.length,r,t,i,N,U,L.type]);fe(()=>{s(Fn,{index:m,item:L})},[L,s,m]),fe(()=>{if(q||M!==null)return;const Y={type:"page",category_id:N,category_name:U,items_count:me,page_properties:{item_type:L.type,item_position:w}},se=setTimeout(()=>i(Y),0);return()=>clearTimeout(se)},[N,U,me,L.type,w,i,q,M]);const P=De(()=>{if(r&&!d)return p.some(Y=>{switch(Y.type){case"image":return!!Y.hotspots?.length;case"360":return Y.images.some(se=>!!se.hotspots?.length);default:return!1}});switch(L.type){case"image":return!!L.hotspots?.length;case"360":return S==="running"&&L.images.some(Y=>!!Y.hotspots?.length);default:return!1}},[L,S,r,p,d]),[Z,te]=xe(!0),[D,$]=xe({}),J=De(()=>r&&d?D[m]??!0:Z,[r,d,D,m,Z]),ue=X(()=>{if(r&&d){const se=!(D[m]??!0);$(R=>({...R,[m]:se})),s(se?an:sn),i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Hotspots Toggled",action_field:"hotspots_toggle_state",action_value:se}})}else{const Y=!Z;te(Y),s(Y?an:sn),i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Hotspots Toggled",action_field:"hotspots_toggle_state",action_value:Y}})}},[r,d,D,m,s,i,N,U,L.type,w,Z]),z=De(()=>{switch(L.type){case"video":return S!=="running";default:return!0}},[L,S]),[ye,ne]=xe(!1),Ce=X(()=>{const Y=!ye;ne(Y),s(Y?Wn:Bn),i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Gallery Toggled",action_field:"gallery_toggle_state",action_value:Y}})},[ye,s,i,N,U,L.type,w]),[He,je]=xe(null),Ze=X(()=>je(null),[]),_=!!He,x=De(()=>{switch(L.type){case"image":return!0;case"interior-360":return S==="running";case"360":return S==="running";default:return!1}},[L.type,S]),[V,G]=xe(1),W=X(Y=>{const se=typeof Y=="function"?Y(V):Y;V!==se&&(G(se),i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Zoom Changed",action_field:"zoom_level",action_value:se}}))},[V,i,N,U,L.type,w]),b=V!==1,ae=V<yt,ie=V>1,he=X(Y=>{W(se=>it(se+Y,1,yt))},[W]),re=X(()=>W(1),[W]),Ne=X(()=>he(wt),[he]),Pe=X(()=>he(-wt),[he]),Fe=X(()=>{re(),Ze()},[re,Ze]),[ze,Ue]=xe(!1),[Oe,Me]=xe(),[Re,qe]=xe(!1),Ae=X(async Y=>{Fe(),Ue(Y),s(Y?Un:Vn),i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Fake Fullscreen Toggled",action_field:"fake_fullscreen_toggle_state",action_value:Y}})},[Fe,s,i,N,U,L.type,w]),ke=X(()=>{clearTimeout(Oe);const Y=setTimeout(()=>{Me(void 0)},Xo);Me(Y)},[Oe]),Ye=X(async()=>{const Y=await o();return Y&&i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Fullscreen Toggled",action_field:"fullscreen_toggle_state",action_value:!0}}),Y},[o,i,N,U,L.type,w]),Ve=X(async()=>{const Y=await v();return Y&&i({type:"track",category_id:N,category_name:U,item_type:L.type,item_position:w,action_properties:{action_name:"Fullscreen Toggled",action_field:"fullscreen_toggle_state",action_value:!1}}),Y},[v,i,N,U,L.type,w]),et=X(async()=>{if(ke(),n==="full_screen"){const Y=await Ye();if(qe(!Y),Y)return}Ae(!0)},[n,Ae,Ye,ke]),Xe=X(async()=>{ke(),!(n==="full_screen"&&(qe(!1),await Ve()))&&Ae(!1)},[n,Ae,Ve,ke]),Se=X(()=>{ze?Xe():et()},[Xe,et,ze]);return fe(()=>{n==="full_screen"&&(Re&&ze||d!==ze&&(ke(),Ae(d)))},[n,Ae,ze,Re,d,ke]),c(Ko.Provider,{value:{items:p,setItemInteraction:T,slidable:p.length>1,carrouselItemIndex:w,setCarrouselItemIndex:g,itemIndexCommand:M,setItemIndexCommand:C,masterItemIndex:m,specialCommand:Q,isRunningSpecialCommand:q,finishSpecialCommand:K,prevItem:A,nextItem:ee,scrollToItemIndex:oe,displayedCategoryId:N,displayedCategoryName:U,changeCategory:O,enableHotspotsControl:P,showHotspots:Z,currentItemHotspotsVisible:J,toggleHotspots:ue,showGalleryControls:z,showGallery:ye,toggleGallery:Ce,shownDetails:He,isShowingDetails:_,setShownDetails:je,resetShownDetails:Ze,showZoomControls:x,zoom:V,isZooming:b,setZoom:W,resetZoom:re,canZoomIn:ae,zoomIn:Ne,canZoomOut:ie,zoomOut:Pe,resetView:Fe,extendMode:ze,enableExtendMode:et,disableExtendMode:Xe,toggleExtendMode:Se,extendTransition:!!Oe,fakeFullScreen:Re},children:e})},Jo=["left","center","right","fullW"],Qo=["top","middle","bottom","fullH"],La=[...Jo,...Qo,"top-left","top-center","top-right","top-fullW","middle-left","middle-center","middle-right","middle-fullW","bottom-left","bottom-center","bottom-right","bottom-fullW","fullH-left","fullH-center","fullH-right","fullW-fullW"];function ka(e){return Jo.includes(e)}function Ia(e){return Qo.includes(e)}function Ta(e){return La.includes(e)}function Sa(e){if(!Ta(e))throw new Error(`Invalid position: ${e}`);return Ia(e)?[e,void 0]:ka(e)?[void 0,e]:e.split("-")}function ce(...e){return e.filter(t=>!!t).map(t=>t.trim()).join(" ")}function Na(e){switch(e){case"left":return"left-1 small:left-2";case"right":return"right-1 small:right-2";case"center":return"left-1/2 -translate-x-1/2";case"fullW":return"inset-x-1 small:inset-x-2"}}function er(e){switch(e){case"top":return"top-1 small:top-2";case"bottom":return"bottom-1 small:bottom-2";case"middle":return"top-1/2 -translate-y-1/2";case"fullH":return"inset-y-1 small:inset-y-2"}}function Pa({positionX:e,positionY:t}){const n=new Array;return e&&n.push(Na(e)),t&&n.push(er(t)),n.join(" ")}function It(e){const[t,n]=Sa(e);return Pa({positionX:n,positionY:t})}const $e=({customizationKey:e,className:t,children:n})=>{const{getIconConfig:r}=Ot(),i=r(e)?.Icon;return i?t?c("div",{className:t,children:i}):i:n},Ra=({className:e})=>c($e,{className:e,customizationKey:"UI_CLOSE",children:c("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})})}),Aa={fill:{primary:"bg-primary text-primary-foreground hover:opacity-80",neutral:"bg-background text-neutral-foreground hover:opacity-80"},ghost:{primary:"bg-transparent text-foreground hover:bg-primary/25",neutral:"bg-transparent text-background hover:bg-foreground/25"}},Da={button:"h-8 px-2",icon:"size-8 p-2"},ot=({variant:e="fill",shape:t="button",color:n="primary",className:r,children:s,...i})=>{const d=Aa[e][n],o=Da[t];return c("button",{className:ce("flex items-center justify-center rounded-ui text-sm transition-all disabled:opacity-60",d,o,r),...i,children:s})},kn=e=>c(ot,{color:"neutral",shape:"icon",...e,children:c(Ra,{className:"size-full"})}),jt=({text:e,className:t})=>c("div",{className:ce("flex size-full flex-col items-center justify-center gap-y-4",t),children:[c("img",{className:"h-20 small:h-28",src:"https://cdn.car-cutter.com/libs/web-player/v3/assets/car_placeholder.png"}),c("div",{className:"text-2xl font-bold",children:e})]}),za={primary:"border-primary",foreground:"border-foreground",background:"border-background"},Oa={sm:"size-4 border",md:"size-8 border-2",lg:"size-12 border-4"},tr=({color:e="foreground",size:t="md"})=>{const n=za[e],r=Oa[t];return c("div",{className:ce("inline-block animate-rotation rounded-full border-b-transparent",r,n)})},st=To(({src:e,className:t,onLoad:n,imgInPlayerWidthRatio:r=1,onlyThumbnail:s,fadeIn:i,...d},o)=>{const{mediaLoadStrategy:v,playerInViewportWidthRatio:h}=Je(),{imageHdWidth:k,usedMediaWidths:f}=gt(),[p,a]=De(()=>{const w=f.map(M=>`${M!==k?Nr(e,M):e} ${M}w`);let g;if(s)g=[`${f[0]}px`];else{const M=1/(r*h);switch(v){case"quality":{const C=[...f],m=C.pop();g=C.map(L=>`(max-width: ${M*L}px) ${L}px`),g.push(`${m}px`);break}case"balanced":{g=[];for(let C=0;C<f.length-1;C++){const m=f[C],L=f[C+1],S=Math.round((m+L)/2);g.push(`(max-width: ${M*S}px) ${m}px`)}g.push(`${f[f.length-1]}px`);break}case"speed":{const C=[...f],m=C.shift();g=C.reverse().map(L=>`(min-width: ${M*L}px) ${L}px`),g.push(`${m}px`);break}}}return[w.join(", "),g.join(", ")]},[k,r,v,s,h,e,f]),[E,T]=xe();return fe(()=>{if(E===!0)return;const w=setTimeout(()=>{T(g=>g??!1)},30);return()=>clearTimeout(w)},[E]),c("img",{ref:o,src:e,srcSet:p,sizes:a,className:ce(t,i&&ce(E!==void 0&&"transition-opacity duration-200",E===!1&&"opacity-0",E===!0&&"opacity-100")),onLoad:w=>{T(!0),n?.(w)},...d})});st.displayName="CdnImage";const nr=({className:e})=>c($e,{className:e,customizationKey:"UI_IMAGE",children:c("svg",{className:e,viewBox:"0 0 12 12",fill:"none",children:c("path",{d:"M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",fill:"currentColor"})})}),or=({className:e})=>c($e,{className:e,customizationKey:"INTERIOR_UI_360",children:c("svg",{className:e,viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M30.9343 48C26.8559 48 24.3496 46.2454 23.3411 44.1517C23.1038 43.6651 23 43.1933 23 42.7509C23 41.6008 23.7415 40.8784 24.9725 40.8784C25.8623 40.8784 26.4259 41.2322 26.8708 42.0432C27.6271 43.5324 28.7839 44.4171 31.0085 44.4171C33.2034 44.4171 34.7161 43.149 34.7161 41.3797C34.731 39.3154 33.2034 38.1653 30.6081 38.1653H29.6737C28.5911 38.1653 27.9682 37.5313 27.9682 36.5729C27.9682 35.644 28.5911 34.9952 29.6737 34.9952H30.5488C32.7882 34.9952 34.2416 33.7862 34.2416 32.0463C34.2416 30.336 33.0848 29.2006 30.9195 29.2006C29.1102 29.2006 28.0127 29.9526 27.3157 31.4565C26.8263 32.4592 26.3072 32.8278 25.2987 32.8278C24.053 32.8278 23.4153 32.1053 23.4153 31.0289C23.4153 30.5276 23.5191 30.1 23.7415 29.5987C24.6907 27.5197 27.1229 25.7799 30.9047 25.7799C35.428 25.7799 38.4831 28.0063 38.4831 31.4123C38.4831 34.1106 36.5403 35.8799 34.0191 36.396V36.4845C37.2077 36.7793 39.2691 38.6372 39.2691 41.5713C39.2691 45.4344 35.9026 48 30.9343 48Z",fill:"white"}),c("path",{d:"M50.5032 48C47.107 48 44.4079 46.4223 42.8358 43.2965C42.0201 41.6451 41.5752 39.5366 41.5752 37.0595C41.5752 30.0116 44.9566 25.7651 50.5181 25.7651C54.0626 25.7651 56.6134 27.2543 57.6219 29.2448C57.8295 29.6577 57.9333 30.0411 57.9333 30.4392C57.9333 31.4271 57.2363 32.1938 56.0647 32.1938C55.1749 32.1938 54.641 31.8104 53.9884 31.0584C53.0096 29.8346 51.9715 29.2891 50.5032 29.2891C47.4481 29.2891 45.8909 32.179 45.8613 36.7204V36.9415H45.9502C46.7808 34.9658 48.8867 33.5208 51.7787 33.5208C55.9164 33.5208 58.749 36.455 58.749 40.4508C58.749 44.8594 55.2787 48 50.5032 48ZM50.4439 44.4613C52.6388 44.4613 54.374 42.7804 54.3888 40.6424C54.3888 38.4013 52.7426 36.8088 50.4884 36.8088C48.2193 36.8088 46.5286 38.3865 46.5286 40.554C46.5286 42.7509 48.249 44.4613 50.4439 44.4613Z",fill:"white"}),c("path",{d:"M68.9374 48C63.5094 48 60.2022 43.7388 60.2022 36.8531C60.2022 29.9821 63.5391 25.7651 68.9374 25.7651C74.3357 25.7651 77.6577 29.9673 77.6577 36.8383C77.6577 43.7093 74.3654 48 68.9374 48ZM68.9374 44.4318C71.5772 44.4318 73.1048 41.7335 73.1048 36.8531C73.1048 32.0021 71.5624 29.3333 68.9374 29.3333C66.3272 29.3333 64.7552 32.0168 64.7552 36.8531C64.7552 41.7335 66.2975 44.4318 68.9374 44.4318Z",fill:"white"}),c("path",{d:"M81.6758 28.4244C78.6504 28.4244 76.3665 26.1685 76.3665 23.2048C76.3665 20.2559 78.6504 18 81.6758 18C84.6864 18 87 20.2559 87 23.2048C87 26.1685 84.6864 28.4244 81.6758 28.4244ZM81.6758 25.4755C82.9364 25.4755 83.9152 24.4581 83.9152 23.2048C83.9152 21.9368 82.9216 20.9489 81.6758 20.9489C80.4597 20.9489 79.4364 21.9368 79.4364 23.2048C79.4364 24.4581 80.4449 25.4755 81.6758 25.4755Z",fill:"white"}),c("path",{d:"M37.3915 79.7285C36.5538 79.7285 36.0601 79.2171 36.0601 78.3442V68.0541C36.0601 67.1724 36.5538 66.661 37.3915 66.661C38.2292 66.661 38.7229 67.1724 38.7229 68.0541V78.3442C38.7229 79.2171 38.2292 79.7285 37.3915 79.7285Z",fill:"white"}),c("path",{d:"M43.7429 79.7285C42.9405 79.7285 42.4644 79.2436 42.4644 78.3971V67.9924C42.4644 67.1459 42.9582 66.661 43.8047 66.661C44.3513 66.661 44.7217 66.8814 45.1273 67.4369L50.6294 75.1258H50.6999V68.0012C50.6999 67.1459 51.1761 66.661 51.9785 66.661C52.7809 66.661 53.2482 67.1459 53.2482 68.0012V78.4324C53.2482 79.2612 52.7809 79.7285 51.9432 79.7285C51.3701 79.7285 51.0174 79.5257 50.6118 78.9614L45.092 71.2284H45.0126V78.3971C45.0126 79.2436 44.5365 79.7285 43.7429 79.7285Z",fill:"white"}),c("path",{d:"M61.3719 79.7285C60.5343 79.7285 60.0405 79.2171 60.0405 78.3442V69.0417H57.4129C56.6898 69.0417 56.2049 68.6273 56.2049 67.9395C56.2049 67.2518 56.681 66.8373 57.4129 66.8373H65.3398C66.0629 66.8373 66.539 67.2518 66.539 67.9395C66.539 68.6273 66.054 69.0417 65.3398 69.0417H62.7034V78.3442C62.7034 79.2171 62.2096 79.7285 61.3719 79.7285Z",fill:"white"}),c("path",{d:"M11.5291 40.7269C5.85358 44.3944 2.5 48.9252 2.5 53.8286C2.5 62.4095 12.77 69.8493 27.7816 73.5179M86.4709 40.7269C92.1464 44.3944 95.5 48.9252 95.5 53.8286C95.5 61.8751 86.4695 68.9181 72.967 72.7891M27.7816 73.5179L23.267 65.1144M27.7816 73.5179L19.6553 77.7552",stroke:"currentColor",strokeWidth:"4.51456",strokeLinecap:"round"})]})}),rr=({className:e})=>c($e,{className:e,customizationKey:"UI_PLAY",children:c("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c("polygon",{points:"6 3 20 12 6 21 6 3"})})}),In=({className:e})=>c($e,{className:e,customizationKey:"UI_360",children:c("svg",{className:e,viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M30.9343 48C26.8559 48 24.3496 46.2454 23.3411 44.1517C23.1038 43.6651 23 43.1933 23 42.7509C23 41.6008 23.7415 40.8784 24.9725 40.8784C25.8623 40.8784 26.4259 41.2322 26.8708 42.0432C27.6271 43.5324 28.7839 44.4171 31.0085 44.4171C33.2034 44.4171 34.7161 43.149 34.7161 41.3797C34.731 39.3154 33.2034 38.1653 30.6081 38.1653H29.6737C28.5911 38.1653 27.9682 37.5313 27.9682 36.5729C27.9682 35.644 28.5911 34.9952 29.6737 34.9952H30.5488C32.7882 34.9952 34.2416 33.7862 34.2416 32.0463C34.2416 30.336 33.0848 29.2006 30.9195 29.2006C29.1102 29.2006 28.0127 29.9526 27.3157 31.4565C26.8263 32.4592 26.3072 32.8278 25.2987 32.8278C24.053 32.8278 23.4153 32.1053 23.4153 31.0289C23.4153 30.5276 23.5191 30.1 23.7415 29.5987C24.6907 27.5197 27.1229 25.7799 30.9047 25.7799C35.428 25.7799 38.4831 28.0063 38.4831 31.4123C38.4831 34.1106 36.5403 35.8799 34.0191 36.396V36.4845C37.2077 36.7793 39.2691 38.6372 39.2691 41.5713C39.2691 45.4344 35.9026 48 30.9343 48Z",fill:"white"}),c("path",{d:"M50.5032 48C47.107 48 44.4079 46.4223 42.8358 43.2965C42.0201 41.6451 41.5752 39.5366 41.5752 37.0595C41.5752 30.0116 44.9566 25.7651 50.5181 25.7651C54.0626 25.7651 56.6134 27.2543 57.6219 29.2448C57.8295 29.6577 57.9333 30.0411 57.9333 30.4392C57.9333 31.4271 57.2363 32.1938 56.0647 32.1938C55.1749 32.1938 54.641 31.8104 53.9884 31.0584C53.0096 29.8346 51.9715 29.2891 50.5032 29.2891C47.4481 29.2891 45.8909 32.179 45.8613 36.7204V36.9415H45.9502C46.7808 34.9658 48.8867 33.5208 51.7787 33.5208C55.9164 33.5208 58.749 36.455 58.749 40.4508C58.749 44.8594 55.2787 48 50.5032 48ZM50.4439 44.4613C52.6388 44.4613 54.374 42.7804 54.3888 40.6424C54.3888 38.4013 52.7426 36.8088 50.4884 36.8088C48.2193 36.8088 46.5286 38.3865 46.5286 40.554C46.5286 42.7509 48.249 44.4613 50.4439 44.4613Z",fill:"white"}),c("path",{d:"M68.9374 48C63.5094 48 60.2022 43.7388 60.2022 36.8531C60.2022 29.9821 63.5391 25.7651 68.9374 25.7651C74.3357 25.7651 77.6577 29.9673 77.6577 36.8383C77.6577 43.7093 74.3654 48 68.9374 48ZM68.9374 44.4318C71.5772 44.4318 73.1048 41.7335 73.1048 36.8531C73.1048 32.0021 71.5624 29.3333 68.9374 29.3333C66.3272 29.3333 64.7552 32.0168 64.7552 36.8531C64.7552 41.7335 66.2975 44.4318 68.9374 44.4318Z",fill:"white"}),c("path",{d:"M81.6758 28.4244C78.6504 28.4244 76.3665 26.1685 76.3665 23.2048C76.3665 20.2559 78.6504 18 81.6758 18C84.6864 18 87 20.2559 87 23.2048C87 26.1685 84.6864 28.4244 81.6758 28.4244ZM81.6758 25.4755C82.9364 25.4755 83.9152 24.4581 83.9152 23.2048C83.9152 21.9368 82.9216 20.9489 81.6758 20.9489C80.4597 20.9489 79.4364 21.9368 79.4364 23.2048C79.4364 24.4581 80.4449 25.4755 81.6758 25.4755Z",fill:"white"}),c("path",{d:"M34.6814 79.561C33.8438 79.561 33.35 79.0496 33.35 78.1678V68.2217C33.35 67.3487 33.8438 66.8373 34.6814 66.8373H40.7302C41.4621 66.8373 41.9382 67.2518 41.9382 67.9395C41.9382 68.6273 41.4533 69.0417 40.7302 69.0417H36.0129V72.1014H40.501C41.1623 72.1014 41.612 72.4894 41.612 73.1242C41.612 73.7591 41.1711 74.147 40.501 74.147H36.0129V77.3566H40.7302C41.4533 77.3566 41.9382 77.771 41.9382 78.4588C41.9382 79.1466 41.4621 79.561 40.7302 79.561H34.6814Z",fill:"white"}),c("path",{d:"M46.4115 79.7285C45.7061 79.7285 45.1506 79.2171 45.1506 78.5734C45.1506 78.2472 45.2564 77.965 45.5121 77.6123L48.6864 73.1859V73.1154L45.6179 68.9359C45.327 68.5479 45.23 68.2569 45.23 67.9131C45.23 67.19 45.8031 66.661 46.5791 66.661C47.0817 66.661 47.4344 66.8814 47.7782 67.4017L50.5028 71.4224H50.5734L53.3862 67.3135C53.6948 66.855 53.9593 66.661 54.4707 66.661C55.1673 66.661 55.7669 67.1636 55.7669 67.7984C55.7669 68.1423 55.6699 68.4245 55.4142 68.7507L52.1076 73.1683V73.23L55.3172 77.5594C55.5641 77.8768 55.6699 78.1766 55.6699 78.5293C55.6699 79.2259 55.132 79.7285 54.3914 79.7285C53.9064 79.7285 53.5802 79.5345 53.2363 79.0672L50.397 75.1082H50.3265L47.5313 79.076C47.1963 79.561 46.9141 79.7285 46.4115 79.7285Z",fill:"white"}),c("path",{d:"M63.7055 79.7285C62.8678 79.7285 62.374 79.2171 62.374 78.3442V69.0417H59.7464C59.0234 69.0417 58.5384 68.6273 58.5384 67.9395C58.5384 67.2518 59.0146 66.8373 59.7464 66.8373H67.6734C68.3964 66.8373 68.8725 67.2518 68.8725 67.9395C68.8725 68.6273 68.3876 69.0417 67.6734 69.0417H65.0369V78.3442C65.0369 79.2171 64.5431 79.7285 63.7055 79.7285Z",fill:"white"}),c("path",{d:"M11.5291 40.7263C5.85358 44.3937 2.5 48.9245 2.5 53.828C2.5 62.4089 12.77 69.8486 27.7816 73.5172M86.4709 40.7263C92.1464 44.3937 95.5 48.9245 95.5 53.828C95.5 61.8744 86.4695 68.9174 72.967 72.7885M27.7816 73.5172L23.267 65.1137M27.7816 73.5172L19.6553 77.7545",stroke:"currentColor",strokeWidth:"4.51456",strokeLinecap:"round"})]})}),Ha=({src:e,withCdn:t})=>{const{permanentGallery:n}=Je();if(!e)return null;const r="size-full object-cover";return t?c(st,{className:r,src:e,onlyThumbnail:!0,fadeIn:!n}):c("img",{className:r,src:e})},qt=({children:e})=>{const{extendMode:t}=Qe();return c("div",{className:ce("flex aspect-square h-3/4 items-center justify-center rounded-full bg-foreground/50 p-1",t&&"large:h-3/5 large:p-2"),children:e})},Fa=({item:e})=>{const{aspectRatioStyle:t}=gt(),{type:n}=e;let r,s;switch(n){case"360":r=e.images[0].src,s=!0;break;case"interior-360":r=e.poster,s=!0;break;case"image":r=e.src,s=!0;break;case"video":r=e.poster,s=!0;break;case"custom":r=e.thumbnailSrc,s=!1;break;default:s=!1}const i=c(Ha,{src:r,withCdn:s});let d;switch(n){case"360":d=c(qt,{children:c(In,{className:"size-full"})});break;case"interior-360":d=c(qt,{children:c(or,{className:"size-full"})});break;case"video":d=c(qt,{children:c(rr,{className:"size-full p-0.5 text-background"})});break;case"custom":d=r?null:c(qt,{children:c(nr,{className:"size-full p-0.5 text-background"})});break}return c("div",{className:"relative bg-foreground/30",style:t,children:[i,d&&c("div",{className:"absolute inset-0 flex items-center justify-center bg-foreground/25",children:d})]})},Ua={primary:"bg-primary/50",neutral:"bg-neutral/50",background:"bg-background/50",foreground:"bg-foreground/50"},ar=({color:e="neutral",orientation:t="horizontal"})=>{const n=Ua[e];return c("div",{className:ce(n,t==="horizontal"?"h-px w-full":"w-px h-full")})},ir=({className:e="",containerClassName:t=""})=>{const{hideCategoriesNav:n,infiniteCarrousel:r,permanentGallery:s,isFullScreen:i,maxItemsShown:d}=Je(),{categories:o,aspectRatioStyle:v}=gt(),{emitAnalyticsEvent:h}=Je(),{items:k,extendMode:f,extendTransition:p,masterItemIndex:a,prevItem:E,nextItem:T,scrollToItemIndex:w,resetView:g,displayedCategoryId:M,displayedCategoryName:C}=Qe(),m=De(()=>k[a].type,[k,a]),L=De(()=>{if(n)return[];const A=new Array;let ee=o[0];const P=Z=>o.find(te=>te.items.some(D=>D===Z));for(let Z=0;Z<k.length;Z++){const te=k[Z],D=P(te);D&&D!==ee&&(A.push(Z),ee=D)}return A},[o,n,k]),S=ve(null),Q=X(()=>{if(!S.current)throw new Error("slider.current is null");return S.current},[]),I=ve(!1),q=ve(null),[K,H]=xe(!1),oe=X((A,ee)=>{const P=Q(),Z=P.clientWidth,te=P.scrollWidth/k.length,D=(A+1/2)*te-Z/2,$=P.scrollWidth-P.clientWidth;P.scrollTo({left:it(D,0,$),behavior:ee})},[k.length,Q]);fe(()=>{const A=S.current;if(!A)return;const ee=te=>{te.preventDefault(),I.current=!0,q.current={x:te.pageX-A.offsetLeft,scrollLeft:A.scrollLeft}},P=te=>{if(!I.current)return;if(q.current===null)throw new Error("[onMouseMove] scrollStart is null");const $=te.pageX-A.offsetLeft-q.current.x;if(!K&&Math.abs($)<5)return;const J=q.current.scrollLeft-$;H(!0),requestAnimationFrame(()=>{A.scrollLeft=J})},Z=()=>{I.current&&(I.current=!1,requestAnimationFrame(()=>{H(!1)}))};return A.addEventListener("mousedown",ee),document.addEventListener("mousemove",P),document.addEventListener("mouseleave",Z),document.addEventListener("mouseup",Z),document.addEventListener("contextmenu",Z),()=>{A.removeEventListener("mousedown",ee),document.removeEventListener("mousemove",P),document.removeEventListener("mouseleave",Z),document.removeEventListener("mouseup",Z),document.removeEventListener("contextmenu",Z)}},[K]);const N=ve(a);fe(()=>{S.current&&(oe(a,"smooth"),N.current=a)},[a,oe]),fe(()=>{S.current&&oe(N.current,"instant")},[oe,i,f,p]);const U=X(A=>{h({type:"track",category_id:M,category_name:C,item_type:m,item_position:a,action_properties:{action_name:"Gallery Item Clicked",action_field:"gallery_item_clicked",action_value:A}})},[h,M,C,m,a]),me=X(A=>{if(!K){if(U(A),r&&A===k.length-1&&a===0)E();else if(r&&A===0&&a===k.length-1)T();else if(!i&&d!==1&&A===k.length-1){const ee=Math.ceil(d),P=k.length+1,Z=Math.max(0,P-ee);w(Z)}else w(A);g()}},[K,U,r,k.length,a,g,E,T,i,d,w]),O=X((A,ee)=>d!==1?"after:opacity-0 hover:after:opacity-70":A===ee?"after:opacity-100":"after:opacity-0 hover:after:opacity-70",[d]);return c("div",{ref:S,className:ce("relative w-full overflow-x-auto no-scrollbar",K?"cursor-grab":"cursor-grabbing",e),children:c("div",{className:ce("flex h-10 w-fit gap-1 small:h-12 small:gap-2",f&&"large:h-20 large:gap-4",t),children:k.map((A,ee)=>c(Ke,{children:[L.includes(ee)&&c("div",{className:"my-2",children:c(ar,{color:s&&!i?"neutral":"background",orientation:"vertical"})}),c("div",{className:ce("relative h-full overflow-hidden rounded-gallery transition-radius",!K&&"cursor-pointer","after:absolute after:inset-0 after:rounded-gallery after:border-2 after:border-primary after:transition-all",O(ee,a)),style:v,onClick:()=>me(ee),children:c(Fa,{item:A})})]},ee))})})},sr=e=>1-Math.pow(1-e,2),Va=({Media:e,itemIndex:t})=>{const{setItemInteraction:n}=Qe();return fe(()=>{n(t,"ready")},[t,n]),e},lr=(e,t)=>Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2),Wa=({onlyPreload:e,...t})=>{const{zoom:n,isZooming:r,setZoom:s}=Qe(),i=ve(null),d=ve(null),o=X(C=>{if(!d.current)throw new Error(`[${C??"getTransformElementOrThrow"}] transformElementRef.current is null`);return d.current},[]),v=ve(!1),h=ve(null),k=ve(new Map),f=ve({x:0,y:0,scale:1}),p=ve(null),a=X(C=>{const m=o("setTransformStyle"),{x:L,y:S,scale:Q}={...f.current,...C},I=it(Q,1,yt),q=m.clientWidth,K=m.clientHeight,H=q*I,oe=K*I,N=it(L,-(H-q),0),U=it(S,-(oe-K),0);f.current={x:N,y:U,scale:I},m.style.transform=`translate(${N}px, ${U}px) scale(${I})`},[o]),E=X((C,m)=>{const{x:L,y:S,scale:Q}=f.current,{x:I,y:q,scale:K}={...f.current,...C};p.current&&(cancelAnimationFrame(p.current),p.current=null);const H=()=>{a({x:I,y:q,scale:K}),s(K)},oe=Math.abs(I-L)<1&&Math.abs(q-S)<1&&Math.abs(K-Q)<.005;if(!m||oe){H();return}const N=new Date().getTime(),U=()=>{const me=()=>{const A=new Date().getTime()-N;if(A>=m){H(),p.current=null;return}const ee=Math.min(A/m,1),P=sr(ee),Z=$t(L,I,P),te=$t(S,q,P),D=$t(Q,K,P);a({x:Z,y:te,scale:D}),U()};p.current=requestAnimationFrame(me)};U()},[a,s]),T=X((C,m)=>{let{x:L,y:S}=f.current;C.x&&(L+=C.x),C.y&&(S+=C.y),E({x:L,y:S},m)},[E]),w=X((C,m,L)=>{const S=f.current.scale,Q=it(C,1,yt),I=Q/S,{x:q,y:K}=f.current,{x:H,y:oe}=m,N=-q+H,U=-K+oe,me=N*I,O=U*I,A=me-H,ee=O-oe,P=-A,Z=-ee;E({x:P,y:Z,scale:Q},L)},[E]),g=X(C=>{const m=o("shiftZoomFromButton"),L=m.clientWidth,S=m.clientHeight;w(C,{x:L/2,y:S/2},200)},[o,w]),M=X((C,m,L)=>{const{scale:S}=f.current;w(S+C,m,L)},[w]);return fe(()=>{e||d.current&&g(n)},[e,g,n]),fe(()=>{if(e||!r)return;const C=d.current;if(!C)return;const m=Q=>{Q.preventDefault(),Q.stopPropagation(),v.current=!0,h.current={x:Q.clientX,y:Q.clientY}},L=Q=>{if(!v.current)return;if(!h.current)throw new Error("mouseStartXY.current is null");Q.stopPropagation();const I=Q.clientX-h.current.x,q=Q.clientY-h.current.y;T({x:I,y:q}),h.current={x:Q.clientX,y:Q.clientY}},S=()=>{v.current=!1};return C.addEventListener("mousedown",m),document.addEventListener("mousemove",L),document.addEventListener("mouseleave",S),document.addEventListener("mouseup",S),document.addEventListener("contextmenu",S),()=>{C.removeEventListener("mousedown",m),document.removeEventListener("mousemove",L),document.removeEventListener("mouseleave",S),document.removeEventListener("mouseup",S),document.removeEventListener("contextmenu",S)}},[r,T,e]),fe(()=>{if(e)return;const C=i.current;if(!C)return;const m=L=>{const{ctrlKey:S,clientX:Q,clientY:I,deltaX:q,deltaY:K}=L;if(S){if(!r&&K>=0)return;const{left:H,top:oe}=C.getBoundingClientRect(),N=Q-H,U=I-oe;M(-.01*K,{x:N,y:U})}else{if(!r)return;T({x:-2*q,y:-2*K})}L.preventDefault()};return C.addEventListener("wheel",m),()=>{C.removeEventListener("wheel",m)}},[r,T,M,e]),fe(()=>{const C=i.current,m=d.current;if(!C||!m)return;const L=k.current,S=q=>{for(let K=0;K<q.changedTouches.length;K++){const H=q.changedTouches[K];L.set(H.identifier,H)}},Q=q=>{for(let K=0;K<q.changedTouches.length;K++){const H=q.changedTouches[K];L.delete(H.identifier)}},I=q=>{const K=q.touches.length;if(K===1){if(!r)return;q.preventDefault();const H=q.touches[0],oe=L.get(H.identifier);if(!oe)throw new Error("touchStart is null");const N=H.clientX-oe.clientX,U=H.clientY-oe.clientY;T({x:N,y:U}),L.set(H.identifier,H)}else if(K===2){q.preventDefault();const[H,oe]=q.touches,N=L.get(H.identifier),U=L.get(oe.identifier);if(!N||!U)throw new Error("initialTouch1 or initialTouch2 is null");const me=lr(N,U),A=lr(H,oe)/me,{left:ee,top:P}=C.getBoundingClientRect();M(A-1,{x:(H.clientX+oe.clientX)/2-ee,y:(H.clientY+oe.clientY)/2-P}),L.set(H.identifier,H),L.set(oe.identifier,oe)}};return m.addEventListener("touchstart",S),m.addEventListener("touchmove",I),m.addEventListener("touchend",Q),m.addEventListener("touchcancel",Q),()=>{m.removeEventListener("touchstart",S),m.removeEventListener("touchmove",I),m.removeEventListener("touchend",Q),m.removeEventListener("touchcancel",Q)}},[r,T,M]),c("div",{ref:i,className:`relative size-full overflow-hidden ${r?"z-zoomed-image cursor-move":""}`,children:c("div",{ref:d,className:"origin-top-left",children:c(st,{...t,imgInPlayerWidthRatio:e?1:n})})})},Ba=({className:e})=>c($e,{className:e,customizationKey:"UI_WARNING",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"10"}),c("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),c("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}),Ya=({hotspot:e,item:t,analyticsValue:n})=>{const{title:r,icon:s,description:i,position:d,detail:o,type:v}=e,{emitAnalyticsEvent:h}=Je(),{extendMode:k,setShownDetails:f,displayedCategoryId:p,displayedCategoryName:a}=Qe(),E=X(U=>{const me=U==="click"?"Hotspot Clicked":"Hotspot Hovered",O=U==="click"?"hotspot_clicked":"hotspot_hovered";h({type:"track",category_id:p,category_name:a,item_type:t.item_type,item_position:t.item_position,action_properties:{action_name:me,action_field:O,action_value:n}})},[h,p,a,t,n]),T=X(()=>{E("click")},[E]),w=X(()=>{E("hover")},[E]),{getIconConfig:g}=Ot(),M=s?g(s):void 0,C=!!o,m=o?.type==="image",L=!!r||!!i,S=m?v==="damage"?c(Ba,{className:"size-4"}):c(nr,{className:"size-4"}):c("div",{className:"size-1"}),Q=()=>{T(),m&&f({src:o.src,title:r,text:i})},[I,q]=xe(!1),K=X(()=>{I||(q(!0),w())},[I,q,w]),H=X(()=>{I&&q(!1)},[I,q]),N=X(()=>v==="damage"?"var(--hotspot-damage-color)":"var(--hotspot-feature-color)",[v])();return c("div",{className:ce("group absolute z-hotspot -translate-x-1/2 -translate-y-1/2 hover:z-hotspot-hover",C?"cursor-pointer":"cursor-help"),style:{top:`${100*e.position.y}%`,left:`${100*e.position.x}%`},onClick:Q,onMouseEnter:K,onMouseLeave:H,children:[c("div",{className:"relative flex items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground",style:{backgroundColor:N},children:[c("div",{className:"pointer-events-none absolute -z-20 size-8 animate-hotspot-ping rounded-full border-2 border-background bg-primary",style:{backgroundColor:N}}),c("div",{className:"p-1",children:M?.Icon?c("div",{className:"size-4",children:M.Icon}):S})]}),!m&&L&&c("div",{className:ce("absolute -z-10 w-max max-w-40 text-pretty rounded-ui bg-background p-2 small:max-w-48",k&&"large:max-w-56",d.y<.55?"-top-1":"-bottom-1",d.x<.55?"-left-1 pl-6 small:pl-8":"-right-1 pr-4 small:pr-6","pointer-events-none opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100"),children:c("div",{className:"space-y-1 text-pretty",children:[r&&c("div",{className:"text-sm font-semibold small:text-base small:font-bold",children:r}),i&&c("div",{className:"text-xs text-foreground/65 small:text-sm",children:i})]})})]})},Xa=({hotspot:e,item:t})=>{const{detail:n,title:r,description:s,position:i}=e,d=De(()=>r||s?{...r?{title:r}:{},...s?{description:s}:{}}:void 0,[r,s]),o=De(()=>d||i?{...d?{text:d}:{},...i?{position:i}:{}}:void 0,[d,i]),v=De(()=>({...o?{hotspot:o}:{},...n?{detail:n}:{}}),[o,n]),h=c(Ya,{hotspot:e,item:t,analyticsValue:v});switch(n?.type){case"link":case"pdf":return c("a",{href:n.src,target:"_blank",rel:"noreferrer",children:h});default:return h}},cr=({hotspots:e,itemIndex:t,className:n,onLoad:r,...s})=>{const{isShowingDetails:i,currentItemHotspotsVisible:d,setItemInteraction:o}=Qe();return c("div",{className:ce("relative size-full overflow-hidden",n),children:c("div",{className:ce("size-full duration-details",i?"scale-105":"scale-100"),children:[c(Wa,{className:"size-full object-cover",onLoad:v=>{t!==void 0&&t>=0&&o(t,"ready"),r?.(v)},...s}),d&&e?.map((v,h)=>c(Xa,{hotspot:v,item:{item_type:"image",item_position:t}},h))]})})};window.libpannellum=function(e,t,n){function r(k){var f=t.createElement("canvas");f.style.width=f.style.height="100%",k.appendChild(f);var p,a,E,T,w,g,M,C,m,L,S,Q,I,q,K,H;this.init=function(_,x,V,G,W,b,ae,ie){if(x===n&&(x="equirectangular"),x!="equirectangular"&&x!="cubemap"&&x!="multires")throw console.log("Error: invalid image type specified!"),{type:"config error"};if(L=x,m=_,S=V,H=ie||{},p){if(E&&(a.detachShader(p,E),a.deleteShader(E)),T&&(a.detachShader(p,T),a.deleteShader(T)),a.bindBuffer(a.ARRAY_BUFFER,null),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null),p.texture&&a.deleteTexture(p.texture),p.nodeCache)for(var he=0;he<p.nodeCache.length;he++)a.deleteTexture(p.nodeCache[he].texture);a.deleteProgram(p),p=n}C=n;var re,Ne=!1,Pe;if(L=="cubemap")for(re=0;re<6;re++)m[re].width>0?(Pe===n&&(Pe=m[re].width),Pe!=m[re].width&&console.log("Cube faces have inconsistent widths: "+Pe+" vs. "+m[re].width)):Ne=!0;function Fe(se){if(Ne){var R=se*se*4,pe=new Uint8ClampedArray(R),Ee=ie.backgroundColor?ie.backgroundColor:[0,0,0];Ee[0]*=255,Ee[1]*=255,Ee[2]*=255;for(var _e=0;_e<R;_e++)pe[_e++]=Ee[0],pe[_e++]=Ee[1],pe[_e++]=Ee[2];var Ie=new ImageData(pe,se,se);for(re=0;re<6;re++)m[re].width==0&&(m[re]=Ie)}}if(L=="cubemap"&&Pe&Pe-1&&(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 10_/)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))||(a||(a=f.getContext("experimental-webgl",{alpha:!1,depth:!1})),a&&a.getError()==1286&&Ze()),!a&&(L=="multires"&&m.hasOwnProperty("fallbackPath")||L=="cubemap")&&("WebkitAppearance"in t.documentElement.style||navigator.userAgent.match(/Trident.*rv[ :]*11\./)||navigator.appVersion.indexOf("MSIE 10")!==-1)){g&&k.removeChild(g),g=t.createElement("div"),g.className="pnlm-world";var ze;m.basePath?ze=m.basePath+m.fallbackPath:ze=m.fallbackPath;var Ue=["f","r","b","l","u","d"],Oe=0,Me=function(){var R=t.createElement("canvas");R.className="pnlm-face pnlm-"+Ue[this.side]+"face",g.appendChild(R);var pe=R.getContext("2d");R.style.width=this.width+4+"px",R.style.height=this.height+4+"px",R.width=this.width+4,R.height=this.height+4,pe.drawImage(this,2,2);var Ee=pe.getImageData(0,0,R.width,R.height),_e=Ee.data,Ie,le;for(Ie=2;Ie<R.width-2;Ie++)for(le=0;le<4;le++)_e[(Ie+R.width)*4+le]=_e[(Ie+R.width*2)*4+le],_e[(Ie+R.width*(R.height-2))*4+le]=_e[(Ie+R.width*(R.height-3))*4+le];for(Ie=2;Ie<R.height-2;Ie++)for(le=0;le<4;le++)_e[(Ie*R.width+1)*4+le]=_e[(Ie*R.width+2)*4+le],_e[((Ie+1)*R.width-2)*4+le]=_e[((Ie+1)*R.width-3)*4+le];for(le=0;le<4;le++)_e[(R.width+1)*4+le]=_e[(R.width*2+2)*4+le],_e[(R.width*2-2)*4+le]=_e[(R.width*3-3)*4+le],_e[(R.width*(R.height-2)+1)*4+le]=_e[(R.width*(R.height-3)+2)*4+le],_e[(R.width*(R.height-1)-2)*4+le]=_e[(R.width*(R.height-2)-3)*4+le];for(Ie=1;Ie<R.width-1;Ie++)for(le=0;le<4;le++)_e[Ie*4+le]=_e[(Ie+R.width)*4+le],_e[(Ie+R.width*(R.height-1))*4+le]=_e[(Ie+R.width*(R.height-2))*4+le];for(Ie=1;Ie<R.height-1;Ie++)for(le=0;le<4;le++)_e[Ie*R.width*4+le]=_e[(Ie*R.width+1)*4+le],_e[((Ie+1)*R.width-1)*4+le]=_e[((Ie+1)*R.width-2)*4+le];for(le=0;le<4;le++)_e[le]=_e[(R.width+1)*4+le],_e[(R.width-1)*4+le]=_e[(R.width*2-2)*4+le],_e[R.width*(R.height-1)*4+le]=_e[(R.width*(R.height-2)+1)*4+le],_e[(R.width*R.height-1)*4+le]=_e[(R.width*(R.height-1)-2)*4+le];pe.putImageData(Ee,0,0),Re.call(this)},Re=function(){this.width>0?(w===n&&(w=this.width),w!=this.width&&console.log("Fallback faces have inconsistent widths: "+w+" vs. "+this.width)):Ne=!0,Oe++,Oe==6&&(w=this.width,k.appendChild(g),ae())};for(Ne=!1,re=0;re<6;re++){var qe=new Image;qe.crossOrigin=H.crossOrigin?H.crossOrigin:"anonymous",qe.side=re,qe.onload=Me,qe.onerror=Re,L=="multires"?qe.src=encodeURI(ze.replace("%s",Ue[re])+"."+m.extension):qe.src=encodeURI(m[re].src)}Fe(w);return}else if(!a)throw console.log("Error: no WebGL support detected!"),{type:"no webgl"};L=="cubemap"&&Fe(Pe),m.basePath?m.fullpath=m.basePath+m.path:m.fullpath=m.path,m.invTileResolution=1/m.tileResolution;var Ae=A();for(M=[],re=0;re<6;re++)M[re]=Ae.slice(re*12,re*12+12),Ae=A();var ke=0,Ye=0;if(L=="equirectangular"?(ke=Math.max(m.width,m.height),Ye=a.getParameter(a.MAX_TEXTURE_SIZE)):L=="cubemap"&&(ke=Pe,Ye=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE)),ke>Ye)throw console.log("Error: The image is too big; it's "+ke+"px wide, but this device's maximum supported size is "+Ye+"px."),{type:"webgl size error",width:ke,maxWidth:Ye};ie!==n&&(ie.horizonPitch!==n||ie.horizonRoll!==n)&&(C=[ie.horizonPitch==n?0:ie.horizonPitch,ie.horizonRoll==n?0:ie.horizonRoll]);var Ve=a.TEXTURE_2D;a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),E=a.createShader(a.VERTEX_SHADER);var et=s;L=="multires"&&(et=i),a.shaderSource(E,et),a.compileShader(E),T=a.createShader(a.FRAGMENT_SHADER);var Xe=v;L=="cubemap"?(Ve=a.TEXTURE_CUBE_MAP,Xe=o):L=="multires"&&(Xe=h),a.shaderSource(T,Xe),a.compileShader(T),p=a.createProgram(),a.attachShader(p,E),a.attachShader(p,T),a.linkProgram(p),a.getShaderParameter(E,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(E)),a.getShaderParameter(T,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(T)),a.getProgramParameter(p,a.LINK_STATUS)||console.log(a.getProgramInfoLog(p)),a.useProgram(p),p.drawInProgress=!1;var Se=ie.backgroundColor?ie.backgroundColor:[0,0,0];a.clearColor(Se[0],Se[1],Se[2],1),a.clear(a.COLOR_BUFFER_BIT),p.texCoordLocation=a.getAttribLocation(p,"a_texCoord"),a.enableVertexAttribArray(p.texCoordLocation),L!="multires"?(Q||(Q=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,Q),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),a.STATIC_DRAW),a.vertexAttribPointer(p.texCoordLocation,2,a.FLOAT,!1,0,0),p.aspectRatio=a.getUniformLocation(p,"u_aspectRatio"),a.uniform1f(p.aspectRatio,a.drawingBufferWidth/a.drawingBufferHeight),p.psi=a.getUniformLocation(p,"u_psi"),p.theta=a.getUniformLocation(p,"u_theta"),p.f=a.getUniformLocation(p,"u_f"),p.h=a.getUniformLocation(p,"u_h"),p.v=a.getUniformLocation(p,"u_v"),p.vo=a.getUniformLocation(p,"u_vo"),p.rot=a.getUniformLocation(p,"u_rot"),a.uniform1f(p.h,G/(Math.PI*2)),a.uniform1f(p.v,W/Math.PI),a.uniform1f(p.vo,b/Math.PI*2),L=="equirectangular"&&(p.backgroundColor=a.getUniformLocation(p,"u_backgroundColor"),a.uniform4fv(p.backgroundColor,Se.concat([1]))),p.texture=a.createTexture(),a.bindTexture(Ve,p.texture),L=="cubemap"?(a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[1]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[3]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[4]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[5]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[0]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m[2])):a.texImage2D(Ve,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m),a.texParameteri(Ve,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(Ve,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(Ve,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(Ve,a.TEXTURE_MAG_FILTER,a.LINEAR)):(p.vertPosLocation=a.getAttribLocation(p,"a_vertCoord"),a.enableVertexAttribArray(p.vertPosLocation),I||(I=a.createBuffer()),q||(q=a.createBuffer()),K||(K=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,q),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,1]),a.STATIC_DRAW),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,K),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),a.STATIC_DRAW),p.perspUniform=a.getUniformLocation(p,"u_perspMatrix"),p.cubeUniform=a.getUniformLocation(p,"u_cubeMatrix"),p.level=-1,p.currentNodes=[],p.nodeCache=[],p.nodeCacheTimestamp=0);var Y=a.getError();if(Y!==0)throw console.log("Error: Something went wrong with WebGL!",Y),{type:"webgl error"};ae()},this.destroy=function(){if(k!==n&&(f!==n&&k.contains(f)&&k.removeChild(f),g!==n&&k.contains(g)&&k.removeChild(g)),a){var _=a.getExtension("WEBGL_lose_context");_&&_.loseContext()}},this.resize=function(){var _=e.devicePixelRatio||1;f.width=f.clientWidth*_,f.height=f.clientHeight*_,a&&(a.getError()==1286&&Ze(),a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),L!="multires"&&a.uniform1f(p.aspectRatio,f.clientWidth/f.clientHeight))},this.resize(),this.setPose=function(_,x){C=[_,x]},this.render=function(_,x,V,G){var W,b,ae,ie=0;if(G===n&&(G={}),G.roll&&(ie=G.roll),C!==n){var he=C[0],re=C[1],Ne=_,Pe=x,Fe=Math.cos(re)*Math.sin(_)*Math.sin(he)+Math.cos(_)*(Math.cos(he)*Math.cos(x)+Math.sin(re)*Math.sin(he)*Math.sin(x)),ze=-Math.sin(_)*Math.sin(re)+Math.cos(_)*Math.cos(re)*Math.sin(x),Ue=Math.cos(re)*Math.cos(he)*Math.sin(_)+Math.cos(_)*(-Math.cos(x)*Math.sin(he)+Math.cos(he)*Math.sin(re)*Math.sin(x));_=Math.asin(Math.max(Math.min(Ue,1),-1)),x=Math.atan2(ze,Fe);var Oe=[Math.cos(Ne)*(Math.sin(re)*Math.sin(he)*Math.cos(Pe)-Math.cos(he)*Math.sin(Pe)),Math.cos(Ne)*Math.cos(re)*Math.cos(Pe),Math.cos(Ne)*(Math.cos(he)*Math.sin(re)*Math.cos(Pe)+Math.sin(Pe)*Math.sin(he))],Me=[-Math.cos(_)*Math.sin(x),Math.cos(_)*Math.cos(x)],Re=Math.acos(Math.max(Math.min((Oe[0]*Me[0]+Oe[1]*Me[1])/(Math.sqrt(Oe[0]*Oe[0]+Oe[1]*Oe[1]+Oe[2]*Oe[2])*Math.sqrt(Me[0]*Me[0]+Me[1]*Me[1])),1),-1));Oe[2]<0&&(Re=2*Math.PI-Re),ie+=Re}if(!a&&(L=="multires"||L=="cubemap")){ae=w/2;var qe={f:"translate3d(-"+(ae+2)+"px, -"+(ae+2)+"px, -"+ae+"px)",b:"translate3d("+(ae+2)+"px, -"+(ae+2)+"px, "+ae+"px) rotateX(180deg) rotateZ(180deg)",u:"translate3d(-"+(ae+2)+"px, -"+ae+"px, "+(ae+2)+"px) rotateX(270deg)",d:"translate3d(-"+(ae+2)+"px, "+ae+"px, -"+(ae+2)+"px) rotateX(90deg)",l:"translate3d(-"+ae+"px, -"+(ae+2)+"px, "+(ae+2)+"px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",r:"translate3d("+ae+"px, -"+(ae+2)+"px, -"+(ae+2)+"px) rotateY(270deg)"};W=1/Math.tan(V/2);var Ae=W*f.clientWidth/2+"px",ke="perspective("+Ae+") translateZ("+Ae+") rotateX("+_+"rad) rotateY("+x+"rad) ",Ye=Object.keys(qe);for(b=0;b<6;b++){var Ve=g.querySelector(".pnlm-"+Ye[b]+"face");Ve&&(Ve.style.webkitTransform=ke+qe[Ye[b]],Ve.style.transform=ke+qe[Ye[b]])}return}if(L!="multires"){var et=2*Math.atan(Math.tan(V*.5)/(a.drawingBufferWidth/a.drawingBufferHeight));W=1/Math.tan(et*.5),a.uniform1f(p.psi,x),a.uniform1f(p.theta,_),a.uniform1f(p.rot,ie),a.uniform1f(p.f,W),S===!0&&L=="equirectangular"&&(a.bindTexture(a.TEXTURE_2D,p.texture),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,m)),a.drawArrays(a.TRIANGLES,0,6)}else{var Xe=D(V,a.drawingBufferWidth/a.drawingBufferHeight,.1,100);ye(V);var Se=ee();Se=P(Se,-ie,"z"),Se=P(Se,-_,"x"),Se=P(Se,x,"y"),Se=Z(Se),a.uniformMatrix4fv(p.perspUniform,!1,new Float32Array(te(Xe))),a.uniformMatrix4fv(p.cubeUniform,!1,new Float32Array(te(Se)));var Y=ne(Xe,Se);if(p.nodeCache.sort(oe),p.nodeCache.length>200&&p.nodeCache.length>p.currentNodes.length+50)for(var se=p.nodeCache.splice(200,p.nodeCache.length-200),b=0;b<se.length;b++)a.deleteTexture(se[b].texture);p.currentNodes=[];var R=["f","b","u","d","l","r"];for(ae=0;ae<6;ae++){var pe=new me(M[ae],R[ae],1,0,0,m.fullpath);O(Y,pe,_,x)}for(p.currentNodes.sort(N),b=J.length-1;b>=0;b--)p.currentNodes.indexOf(J[b].node)===-1&&(J[b].node.textureLoad=!1,J.splice(b,1));if(J.length===0)for(b=0;b<p.currentNodes.length;b++){var Ee=p.currentNodes[b];if(!Ee.texture&&!Ee.textureLoad){Ee.textureLoad=!0,setTimeout(z,0,Ee);break}}U()}if(G.returnImage!==n)return f.toDataURL("image/png")},this.isLoading=function(){if(a&&L=="multires"){for(var _=0;_<p.currentNodes.length;_++)if(!p.currentNodes[_].textureLoaded)return!0}return!1},this.getCanvas=function(){return f};function oe(_,x){return _.level==1&&x.level!=1?-1:x.level==1&&_.level!=1?1:x.timestamp-_.timestamp}function N(_,x){return _.level!=x.level?_.level-x.level:_.diff-x.diff}function U(){if(!p.drawInProgress){p.drawInProgress=!0,a.clear(a.COLOR_BUFFER_BIT);for(var _=0;_<p.currentNodes.length;_++)p.currentNodes[_].textureLoaded>1&&(a.bindBuffer(a.ARRAY_BUFFER,I),a.bufferData(a.ARRAY_BUFFER,new Float32Array(p.currentNodes[_].vertices),a.STATIC_DRAW),a.vertexAttribPointer(p.vertPosLocation,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,q),a.vertexAttribPointer(p.texCoordLocation,2,a.FLOAT,!1,0,0),a.bindTexture(a.TEXTURE_2D,p.currentNodes[_].texture),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0));p.drawInProgress=!1}}function me(_,x,V,G,W,b){this.vertices=_,this.side=x,this.level=V,this.x=G,this.y=W,this.path=b.replace("%s",x).replace("%l",V).replace("%x",G).replace("%y",W)}function O(_,x,V,G,W){if(je(_,x.vertices)){var b=x.vertices,ae=b[0]+b[3]+b[6]+b[9],ie=b[1]+b[4]+b[7]+b[10],he=b[2]+b[5]+b[8]+b[11],re=Math.sqrt(ae*ae+ie*ie+he*he),Ne=Math.asin(he/re),Pe=Math.atan2(ie,ae),Fe=Pe-G;Fe+=Fe>Math.PI?-2*Math.PI:Fe<-Math.PI?2*Math.PI:0,Fe=Math.abs(Fe),x.diff=Math.acos(Math.sin(V)*Math.sin(Ne)+Math.cos(V)*Math.cos(Ne)*Math.cos(Fe));for(var ze=!1,Ue=0;Ue<p.nodeCache.length;Ue++)if(p.nodeCache[Ue].path==x.path){ze=!0,p.nodeCache[Ue].timestamp=p.nodeCacheTimestamp++,p.nodeCache[Ue].diff=x.diff,p.currentNodes.push(p.nodeCache[Ue]);break}if(ze||(x.timestamp=p.nodeCacheTimestamp++,p.currentNodes.push(x),p.nodeCache.push(x)),x.level<p.level){var Oe=m.cubeResolution*Math.pow(2,x.level-m.maxLevel),Me=Math.ceil(Oe*m.invTileResolution)-1,Re=Oe%m.tileResolution*2,qe=Oe*2%m.tileResolution;qe===0&&(qe=m.tileResolution),Re===0&&(Re=m.tileResolution*2);var Ae=.5;(x.x==Me||x.y==Me)&&(Ae=1-m.tileResolution/(m.tileResolution+qe));var ke=1-Ae,Ye=[],Ve,et,Xe=Ae,Se=Ae,Y=Ae,se=ke,R=ke,pe=ke;qe<m.tileResolution&&(x.x==Me&&x.y!=Me?(Se=.5,R=.5,(x.side=="d"||x.side=="u")&&(Y=.5,pe=.5)):x.x!=Me&&x.y==Me&&(Xe=.5,se=.5,(x.side=="l"||x.side=="r")&&(Y=.5,pe=.5))),Re<=m.tileResolution&&(x.x==Me&&(Xe=0,se=1,(x.side=="l"||x.side=="r")&&(Y=0,pe=1)),x.y==Me&&(Se=0,R=1,(x.side=="d"||x.side=="u")&&(Y=0,pe=1))),Ve=[b[0],b[1],b[2],b[0]*Xe+b[3]*se,b[1]*Ae+b[4]*ke,b[2]*Y+b[5]*pe,b[0]*Xe+b[6]*se,b[1]*Se+b[7]*R,b[2]*Y+b[8]*pe,b[0]*Ae+b[9]*ke,b[1]*Se+b[10]*R,b[2]*Y+b[11]*pe],et=new me(Ve,x.side,x.level+1,x.x*2,x.y*2,m.fullpath),Ye.push(et),x.x==Me&&Re<=m.tileResolution||(Ve=[b[0]*Xe+b[3]*se,b[1]*Ae+b[4]*ke,b[2]*Y+b[5]*pe,b[3],b[4],b[5],b[3]*Ae+b[6]*ke,b[4]*Se+b[7]*R,b[5]*Y+b[8]*pe,b[0]*Xe+b[6]*se,b[1]*Se+b[7]*R,b[2]*Y+b[8]*pe],et=new me(Ve,x.side,x.level+1,x.x*2+1,x.y*2,m.fullpath),Ye.push(et)),!(x.x==Me&&Re<=m.tileResolution)&&!(x.y==Me&&Re<=m.tileResolution)&&(Ve=[b[0]*Xe+b[6]*se,b[1]*Se+b[7]*R,b[2]*Y+b[8]*pe,b[3]*Ae+b[6]*ke,b[4]*Se+b[7]*R,b[5]*Y+b[8]*pe,b[6],b[7],b[8],b[9]*Xe+b[6]*se,b[10]*Ae+b[7]*ke,b[11]*Y+b[8]*pe],et=new me(Ve,x.side,x.level+1,x.x*2+1,x.y*2+1,m.fullpath),Ye.push(et)),x.y==Me&&Re<=m.tileResolution||(Ve=[b[0]*Ae+b[9]*ke,b[1]*Se+b[10]*R,b[2]*Y+b[11]*pe,b[0]*Xe+b[6]*se,b[1]*Se+b[7]*R,b[2]*Y+b[8]*pe,b[9]*Xe+b[6]*se,b[10]*Ae+b[7]*ke,b[11]*Y+b[8]*pe,b[9],b[10],b[11]],et=new me(Ve,x.side,x.level+1,x.x*2,x.y*2+1,m.fullpath),Ye.push(et));for(var Ee=0;Ee<Ye.length;Ee++)O(_,Ye[Ee],V,G)}}}function A(){return[-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1]}function ee(){return[1,0,0,0,1,0,0,0,1]}function P(_,x,V){var G=Math.sin(x),W=Math.cos(x);if(V=="x")return[_[0],W*_[1]+G*_[2],W*_[2]-G*_[1],_[3],W*_[4]+G*_[5],W*_[5]-G*_[4],_[6],W*_[7]+G*_[8],W*_[8]-G*_[7]];if(V=="y")return[W*_[0]-G*_[2],_[1],W*_[2]+G*_[0],W*_[3]-G*_[5],_[4],W*_[5]+G*_[3],W*_[6]-G*_[8],_[7],W*_[8]+G*_[6]];if(V=="z")return[W*_[0]+G*_[1],W*_[1]-G*_[0],_[2],W*_[3]+G*_[4],W*_[4]-G*_[3],_[5],W*_[6]+G*_[7],W*_[7]-G*_[6],_[8]]}function Z(_){return[_[0],_[1],_[2],0,_[3],_[4],_[5],0,_[6],_[7],_[8],0,0,0,0,1]}function te(_){return[_[0],_[4],_[8],_[12],_[1],_[5],_[9],_[13],_[2],_[6],_[10],_[14],_[3],_[7],_[11],_[15]]}function D(_,x,V,G){var W=2*Math.atan(Math.tan(_/2)*a.drawingBufferHeight/a.drawingBufferWidth),b=1/Math.tan(W/2);return[b/x,0,0,0,0,b,0,0,0,0,(G+V)/(V-G),2*G*V/(V-G),0,0,-1,0]}function $(_,x){a.bindTexture(a.TEXTURE_2D,x),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.bindTexture(a.TEXTURE_2D,null)}var J=[],ue=function(){var _=4,x={},V;function G(){var ie=this;this.texture=this.callback=null,this.image=new Image,this.image.crossOrigin=V||"anonymous";var he=function(){ie.image.width>0&&ie.image.height>0?($(ie.image,ie.texture),ie.callback(ie.texture,!0)):ie.callback(ie.texture,!1),b(ie)};this.image.addEventListener("load",he),this.image.addEventListener("error",he)}G.prototype.loadTexture=function(ie,he,re){this.texture=he,this.callback=re,this.image.src=ie};function W(ie,he,re,Ne){this.node=ie,this.src=he,this.texture=re,this.callback=Ne}function b(ie){if(J.length){var he=J.shift();ie.loadTexture(he.src,he.texture,he.callback)}else x[_++]=ie}for(var ae=0;ae<_;ae++)x[ae]=new G;return function(ie,he,re,Ne){V=Ne;var Pe=a.createTexture();return _?x[--_].loadTexture(he,Pe,re):J.push(new W(ie,he,Pe,re)),Pe}}();function z(_){ue(_,encodeURI(_.path+"."+m.extension),function(x,V){_.texture=x,_.textureLoaded=V?2:1},H.crossOrigin)}function ye(_){for(var x=1;x<m.maxLevel&&a.drawingBufferWidth>m.tileResolution*Math.pow(2,x-1)*Math.tan(_/2)*.707;)x++;p.level=x}function ne(_,x){return[_[0]*x[0],_[0]*x[1],_[0]*x[2],0,_[5]*x[4],_[5]*x[5],_[5]*x[6],0,_[10]*x[8],_[10]*x[9],_[10]*x[10],_[11],-x[8],-x[9],-x[10],0]}function Ce(_,x){return[_[0]*x[0]+_[1]*x[1]+_[2]*x[2],_[4]*x[0]+_[5]*x[1]+_[6]*x[2],_[11]+_[8]*x[0]+_[9]*x[1]+_[10]*x[2],1/(_[12]*x[0]+_[13]*x[1]+_[14]*x[2])]}function He(_,x){var V=Ce(_,x),G=V[0]*V[3],W=V[1]*V[3],b=V[2]*V[3],ae=[0,0,0];return G<-1&&(ae[0]=-1),G>1&&(ae[0]=1),W<-1&&(ae[1]=-1),W>1&&(ae[1]=1),(b<-1||b>1)&&(ae[2]=1),ae}function je(_,x){var V=He(_,x.slice(0,3)),G=He(_,x.slice(3,6)),W=He(_,x.slice(6,9)),b=He(_,x.slice(9,12)),ae=V[0]+G[0]+W[0]+b[0];if(ae==-4||ae==4)return!1;var ie=V[1]+G[1]+W[1]+b[1];if(ie==-4||ie==4)return!1;var he=V[2]+G[2]+W[2]+b[2];return he!=4}function Ze(){console.log("Reducing canvas size due to error 1286!"),f.width=Math.round(f.width/2),f.height=Math.round(f.height/2)}}var s=["attribute vec2 a_texCoord;","varying vec2 v_texCoord;","void main() {","gl_Position = vec4(a_texCoord, 0.0, 1.0);","v_texCoord = a_texCoord;","}"].join(""),i=["attribute vec3 a_vertCoord;","attribute vec2 a_texCoord;","uniform mat4 u_cubeMatrix;","uniform mat4 u_perspMatrix;","varying mediump vec2 v_texCoord;","void main(void) {","gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);","v_texCoord = a_texCoord;","}"].join(""),d=["precision mediump float;","uniform float u_aspectRatio;","uniform float u_psi;","uniform float u_theta;","uniform float u_f;","uniform float u_h;","uniform float u_v;","uniform float u_vo;","uniform float u_rot;","const float PI = 3.14159265358979323846264;","uniform sampler2D u_image;","uniform samplerCube u_imageCube;","varying vec2 v_texCoord;","uniform vec4 u_backgroundColor;","void main() {","float x = v_texCoord.x * u_aspectRatio;","float y = v_texCoord.y;","float sinrot = sin(u_rot);","float cosrot = cos(u_rot);","float rot_x = x * cosrot - y * sinrot;","float rot_y = x * sinrot + y * cosrot;","float sintheta = sin(u_theta);","float costheta = cos(u_theta);","float a = u_f * costheta - rot_y * sintheta;","float root = sqrt(rot_x * rot_x + a * a);","float lambda = atan(rot_x / root, a / root) + u_psi;","float phi = atan((rot_y * costheta + u_f * sintheta) / root);"].join(`
|
|
1
|
+
(function(Ue,ut){typeof exports=="object"&&typeof module<"u"?ut(exports):typeof define=="function"&&define.amd?define(["exports"],ut):(Ue=typeof globalThis<"u"?globalThis:Ue||self,ut(Ue.CarCutterWebplayerWC={}))})(this,function(Ue){"use strict";const ut="cc-webplayer",Ut="cc-webplayer-custom-media",Vt="cc-webplayer-icon",On="composition-loading",Hn="composition-loaded",Fn="composition-load-error",Un="item-change",Vn="extend-mode-on",Wn="extend-mode-off",an="hotspots-on",sn="hotspots-off",Bn="gallery-open",Yn="gallery-close",Cr="quality",Mr="*",Lr="full_screen",Xn="cc-webplayer:",kr="ew-resize",Ir="cc-analytics:",Tr="",Sr="";function ln(){if(typeof crypto<"u"&&typeof crypto.randomUUID=="function")return crypto.randomUUID();if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"){const e=new Uint8Array(16);crypto.getRandomValues(e),e[6]=e[6]&15|64,e[8]=e[8]&63|128;const t=Array.from(e,n=>n.toString(16).padStart(2,"0")).join("");return`${t.slice(0,8)}-${t.slice(8,12)}-${t.slice(12,16)}-${t.slice(16,20)}-${t.slice(20)}`}return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=Math.random()*16|0;return(e==="x"?t:t&3|8).toString(16)})}function Nr(e,t){return`https://cdn.car-cutter.com/gallery/${e}/${t}/composition_v3.json`}function Pr(e,t){const n=e.split("/"),r=n.pop();return[n.join("/"),t,r].join("/")}function Rr(){const e="car-cutter-webplayer-browser-id",t=typeof window<"u"?window.localStorage.getItem(e):null;if(t)return t;const n=ln();return typeof window<"u"&&window.localStorage.setItem(e,n),n}function Ar(){const e="car-cutter-webplayer-session-id",t=typeof window<"u"?window.sessionStorage.getItem(e):null;if(t)return t;const n=ln();return typeof window<"u"&&window.sessionStorage.setItem(e,n),n}function Dr(){return ln()}function Gn(){return!!customElements.get(ut)&&!!customElements.get(Ut)&&!!customElements.get(Vt)}var Tt,be,Zn,_t,$n,jn,qn,Kn,cn,un,dn,Jn,St={},Qn=[],zr=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,Nt=Array.isArray;function lt(e,t){for(var n in t)e[n]=t[n];return e}function pn(e){e&&e.parentNode&&e.parentNode.removeChild(e)}function dt(e,t,n){var r,s,i,d={};for(i in t)i=="key"?r=t[i]:i=="ref"?s=t[i]:d[i]=t[i];if(arguments.length>2&&(d.children=arguments.length>3?Tt.call(arguments,2):n),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)d[i]===void 0&&(d[i]=e.defaultProps[i]);return Pt(e,d,r,s,null)}function Pt(e,t,n,r,s){var i={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:s??++Zn,__i:-1,__u:0};return s==null&&be.vnode!=null&&be.vnode(i),i}function Or(){return{current:null}}function Ke(e){return e.children}function ct(e,t){this.props=e,this.context=t}function Ct(e,t){if(t==null)return e.__?Ct(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type=="function"?Ct(e):null}function eo(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=e.__c.base=n.__e;break}return eo(e)}}function fn(e){(!e.__d&&(e.__d=!0)&&_t.push(e)&&!Wt.__r++||$n!=be.debounceRendering)&&(($n=be.debounceRendering)||jn)(Wt)}function Wt(){for(var e,t,n,r,s,i,d,o=1;_t.length;)_t.length>o&&_t.sort(qn),e=_t.shift(),o=_t.length,e.__d&&(n=void 0,r=void 0,s=(r=(t=e).__v).__e,i=[],d=[],t.__P&&((n=lt({},r)).__v=r.__v+1,be.vnode&&be.vnode(n),hn(t.__P,n,r,t.__n,t.__P.namespaceURI,32&r.__u?[s]:null,i,s??Ct(r),!!(32&r.__u),d),n.__v=r.__v,n.__.__k[n.__i]=n,ao(i,n,d),r.__e=r.__=null,n.__e!=s&&eo(n)));Wt.__r=0}function to(e,t,n,r,s,i,d,o,v,f,L){var h,p,a,E,T,b,m,M=r&&r.__k||Qn,k=t.length;for(v=Hr(n,t,M,v,k),h=0;h<k;h++)(a=n.__k[h])!=null&&(p=a.__i==-1?St:M[a.__i]||St,a.__i=h,b=hn(e,a,p,s,i,d,o,v,f,L),E=a.__e,a.ref&&p.ref!=a.ref&&(p.ref&&gn(p.ref,null,a),L.push(a.ref,a.__c||E,a)),T==null&&E!=null&&(T=E),(m=!!(4&a.__u))||p.__k===a.__k?v=no(a,v,e,m):typeof a.type=="function"&&b!==void 0?v=b:E&&(v=E.nextSibling),a.__u&=-7);return n.__e=T,v}function Hr(e,t,n,r,s){var i,d,o,v,f,L=n.length,h=L,p=0;for(e.__k=new Array(s),i=0;i<s;i++)(d=t[i])!=null&&typeof d!="boolean"&&typeof d!="function"?(typeof d=="string"||typeof d=="number"||typeof d=="bigint"||d.constructor==String?d=e.__k[i]=Pt(null,d,null,null,null):Nt(d)?d=e.__k[i]=Pt(Ke,{children:d},null,null,null):d.constructor===void 0&&d.__b>0?d=e.__k[i]=Pt(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):e.__k[i]=d,v=i+p,d.__=e,d.__b=e.__b+1,o=null,(f=d.__i=Fr(d,n,v,h))!=-1&&(h--,(o=n[f])&&(o.__u|=2)),o==null||o.__v==null?(f==-1&&(s>L?p--:s<L&&p++),typeof d.type!="function"&&(d.__u|=4)):f!=v&&(f==v-1?p--:f==v+1?p++:(f>v?p--:p++,d.__u|=4))):e.__k[i]=null;if(h)for(i=0;i<L;i++)(o=n[i])!=null&&!(2&o.__u)&&(o.__e==r&&(r=Ct(o)),so(o,o));return r}function no(e,t,n,r){var s,i;if(typeof e.type=="function"){for(s=e.__k,i=0;s&&i<s.length;i++)s[i]&&(s[i].__=e,t=no(s[i],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=Ct(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType==8);return t}function pt(e,t){return t=t||[],e==null||typeof e=="boolean"||(Nt(e)?e.some(function(n){pt(n,t)}):t.push(e)),t}function Fr(e,t,n,r){var s,i,d,o=e.key,v=e.type,f=t[n],L=f!=null&&(2&f.__u)==0;if(f===null&&o==null||L&&o==f.key&&v==f.type)return n;if(r>(L?1:0)){for(s=n-1,i=n+1;s>=0||i<t.length;)if((f=t[d=s>=0?s--:i++])!=null&&!(2&f.__u)&&o==f.key&&v==f.type)return d}return-1}function oo(e,t,n){t[0]=="-"?e.setProperty(t,n??""):e[t]=n==null?"":typeof n!="number"||zr.test(t)?n:n+"px"}function Bt(e,t,n,r,s){var i,d;e:if(t=="style")if(typeof n=="string")e.style.cssText=n;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||oo(e.style,t,"");if(n)for(t in n)r&&n[t]==r[t]||oo(e.style,t,n[t])}else if(t[0]=="o"&&t[1]=="n")i=t!=(t=t.replace(Kn,"$1")),d=t.toLowerCase(),t=d in e||t=="onFocusOut"||t=="onFocusIn"?d.slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=n,n?r?n.u=r.u:(n.u=cn,e.addEventListener(t,i?dn:un,i)):e.removeEventListener(t,i?dn:un,i);else{if(s=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=n??"";break e}catch{}typeof n=="function"||(n==null||n===!1&&t[4]!="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&n==1?"":n))}}function ro(e){return function(t){if(this.l){var n=this.l[t.type+e];if(t.t==null)t.t=cn++;else if(t.t<n.u)return;return n(be.event?be.event(t):t)}}}function hn(e,t,n,r,s,i,d,o,v,f){var L,h,p,a,E,T,b,m,M,k,_,C,D,G,I,S,J,O=t.type;if(t.constructor!==void 0)return null;128&n.__u&&(v=!!(32&n.__u),i=[o=t.__e=n.__e]),(L=be.__b)&&L(t);e:if(typeof O=="function")try{if(m=t.props,M="prototype"in O&&O.prototype.render,k=(L=O.contextType)&&r[L.__c],_=L?k?k.props.value:L.__:r,n.__c?b=(h=t.__c=n.__c).__=h.__E:(M?t.__c=h=new O(m,_):(t.__c=h=new ct(m,_),h.constructor=O,h.render=Vr),k&&k.sub(h),h.state||(h.state={}),h.__n=r,p=h.__d=!0,h.__h=[],h._sb=[]),M&&h.__s==null&&(h.__s=h.state),M&&O.getDerivedStateFromProps!=null&&(h.__s==h.state&&(h.__s=lt({},h.__s)),lt(h.__s,O.getDerivedStateFromProps(m,h.__s))),a=h.props,E=h.state,h.__v=t,p)M&&O.getDerivedStateFromProps==null&&h.componentWillMount!=null&&h.componentWillMount(),M&&h.componentDidMount!=null&&h.__h.push(h.componentDidMount);else{if(M&&O.getDerivedStateFromProps==null&&m!==a&&h.componentWillReceiveProps!=null&&h.componentWillReceiveProps(m,_),t.__v==n.__v||!h.__e&&h.shouldComponentUpdate!=null&&h.shouldComponentUpdate(m,h.__s,_)===!1){for(t.__v!=n.__v&&(h.props=m,h.state=h.__s,h.__d=!1),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(ee){ee&&(ee.__=t)}),C=0;C<h._sb.length;C++)h.__h.push(h._sb[C]);h._sb=[],h.__h.length&&d.push(h);break e}h.componentWillUpdate!=null&&h.componentWillUpdate(m,h.__s,_),M&&h.componentDidUpdate!=null&&h.__h.push(function(){h.componentDidUpdate(a,E,T)})}if(h.context=_,h.props=m,h.__P=e,h.__e=!1,D=be.__r,G=0,M){for(h.state=h.__s,h.__d=!1,D&&D(t),L=h.render(h.props,h.state,h.context),I=0;I<h._sb.length;I++)h.__h.push(h._sb[I]);h._sb=[]}else do h.__d=!1,D&&D(t),L=h.render(h.props,h.state,h.context),h.state=h.__s;while(h.__d&&++G<25);h.state=h.__s,h.getChildContext!=null&&(r=lt(lt({},r),h.getChildContext())),M&&!p&&h.getSnapshotBeforeUpdate!=null&&(T=h.getSnapshotBeforeUpdate(a,E)),S=L,L!=null&&L.type===Ke&&L.key==null&&(S=io(L.props.children)),o=to(e,Nt(S)?S:[S],t,n,r,s,i,d,o,v,f),h.base=t.__e,t.__u&=-161,h.__h.length&&d.push(h),b&&(h.__E=h.__=null)}catch(ee){if(t.__v=null,v||i!=null)if(ee.then){for(t.__u|=v?160:128;o&&o.nodeType==8&&o.nextSibling;)o=o.nextSibling;i[i.indexOf(o)]=null,t.__e=o}else{for(J=i.length;J--;)pn(i[J]);mn(t)}else t.__e=n.__e,t.__k=n.__k,ee.then||mn(t);be.__e(ee,t,n)}else i==null&&t.__v==n.__v?(t.__k=n.__k,t.__e=n.__e):o=t.__e=Ur(n.__e,t,n,r,s,i,d,v,f);return(L=be.diffed)&&L(t),128&t.__u?void 0:o}function mn(e){e&&e.__c&&(e.__c.__e=!0),e&&e.__k&&e.__k.forEach(mn)}function ao(e,t,n){for(var r=0;r<n.length;r++)gn(n[r],n[++r],n[++r]);be.__c&&be.__c(t,e),e.some(function(s){try{e=s.__h,s.__h=[],e.some(function(i){i.call(s)})}catch(i){be.__e(i,s.__v)}})}function io(e){return typeof e!="object"||e==null||e.__b&&e.__b>0?e:Nt(e)?e.map(io):lt({},e)}function Ur(e,t,n,r,s,i,d,o,v){var f,L,h,p,a,E,T,b=n.props||St,m=t.props,M=t.type;if(M=="svg"?s="http://www.w3.org/2000/svg":M=="math"?s="http://www.w3.org/1998/Math/MathML":s||(s="http://www.w3.org/1999/xhtml"),i!=null){for(f=0;f<i.length;f++)if((a=i[f])&&"setAttribute"in a==!!M&&(M?a.localName==M:a.nodeType==3)){e=a,i[f]=null;break}}if(e==null){if(M==null)return document.createTextNode(m);e=document.createElementNS(s,M,m.is&&m),o&&(be.__m&&be.__m(t,i),o=!1),i=null}if(M==null)b===m||o&&e.data==m||(e.data=m);else{if(i=i&&Tt.call(e.childNodes),!o&&i!=null)for(b={},f=0;f<e.attributes.length;f++)b[(a=e.attributes[f]).name]=a.value;for(f in b)if(a=b[f],f!="children"){if(f=="dangerouslySetInnerHTML")h=a;else if(!(f in m)){if(f=="value"&&"defaultValue"in m||f=="checked"&&"defaultChecked"in m)continue;Bt(e,f,null,a,s)}}for(f in m)a=m[f],f=="children"?p=a:f=="dangerouslySetInnerHTML"?L=a:f=="value"?E=a:f=="checked"?T=a:o&&typeof a!="function"||b[f]===a||Bt(e,f,a,b[f],s);if(L)o||h&&(L.__html==h.__html||L.__html==e.innerHTML)||(e.innerHTML=L.__html),t.__k=[];else if(h&&(e.innerHTML=""),to(t.type=="template"?e.content:e,Nt(p)?p:[p],t,n,r,M=="foreignObject"?"http://www.w3.org/1999/xhtml":s,i,d,i?i[0]:n.__k&&Ct(n,0),o,v),i!=null)for(f=i.length;f--;)pn(i[f]);o||(f="value",M=="progress"&&E==null?e.removeAttribute("value"):E!=null&&(E!==e[f]||M=="progress"&&!E||M=="option"&&E!=b[f])&&Bt(e,f,E,b[f],s),f="checked",T!=null&&T!=e[f]&&Bt(e,f,T,b[f],s))}return e}function gn(e,t,n){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(s){be.__e(s,n)}}function so(e,t,n){var r,s;if(be.unmount&&be.unmount(e),(r=e.ref)&&(r.current&&r.current!=e.__e||gn(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){be.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(s=0;s<r.length;s++)r[s]&&so(r[s],t,n||typeof e.type!="function");n||pn(e.__e),e.__c=e.__=e.__e=void 0}function Vr(e,t,n){return this.constructor(e,n)}function Rt(e,t,n){var r,s,i,d;t==document&&(t=document.documentElement),be.__&&be.__(e,t),s=(r=typeof n=="function")?null:n&&n.__k||t.__k,i=[],d=[],hn(t,e=(!r&&n||t).__k=dt(Ke,null,[e]),s||St,St,t.namespaceURI,!r&&n?[n]:s?null:t.firstChild?Tt.call(t.childNodes):null,i,!r&&n?n:s?s.__e:t.firstChild,r,d),ao(i,e,d)}function lo(e,t){Rt(e,t,lo)}function Wr(e,t,n){var r,s,i,d,o=lt({},e.props);for(i in e.type&&e.type.defaultProps&&(d=e.type.defaultProps),t)i=="key"?r=t[i]:i=="ref"?s=t[i]:o[i]=t[i]===void 0&&d!=null?d[i]:t[i];return arguments.length>2&&(o.children=arguments.length>3?Tt.call(arguments,2):n),Pt(e.type,o,r||e.key,s||e.ref,null)}function At(e){function t(n){var r,s;return this.getChildContext||(r=new Set,(s={})[t.__c]=this,this.getChildContext=function(){return s},this.componentWillUnmount=function(){r=null},this.shouldComponentUpdate=function(i){this.props.value!=i.value&&r.forEach(function(d){d.__e=!0,fn(d)})},this.sub=function(i){r.add(i);var d=i.componentWillUnmount;i.componentWillUnmount=function(){r&&r.delete(i),d&&d.call(i)}}),n.children}return t.__c="__cC"+Jn++,t.__=e,t.Provider=t.__l=(t.Consumer=function(n,r){return n.children(r)}).contextType=t,t}Tt=Qn.slice,be={__e:function(e,t,n,r){for(var s,i,d;t=t.__;)if((s=t.__c)&&!s.__)try{if((i=s.constructor)&&i.getDerivedStateFromError!=null&&(s.setState(i.getDerivedStateFromError(e)),d=s.__d),s.componentDidCatch!=null&&(s.componentDidCatch(e,r||{}),d=s.__d),d)return s.__E=s}catch(o){e=o}throw e}},Zn=0,ct.prototype.setState=function(e,t){var n;n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=lt({},this.state),typeof e=="function"&&(e=e(lt({},n),this.props)),e&<(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),fn(this))},ct.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),fn(this))},ct.prototype.render=Ke,_t=[],jn=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,qn=function(e,t){return e.__v.__b-t.__v.__b},Wt.__r=0,Kn=/(PointerCapture)$|Capture$/i,cn=0,un=ro(!1),dn=ro(!0),Jn=0;var Br=0;function c(e,t,n,r,s,i){t||(t={});var d,o,v=t;if("ref"in v)for(o in v={},t)o=="ref"?d=t[o]:v[o]=t[o];var f={type:e,props:v,key:n,ref:d,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Br,__i:-1,__u:0,__source:s,__self:i};if(typeof e=="function"&&(d=e.defaultProps))for(o in d)v[o]===void 0&&(v[o]=d[o]);return be.vnode&&be.vnode(f),f}var mt,Ve,vn,co,Mt=0,uo=[],$e=be,po=$e.__b,fo=$e.__r,ho=$e.diffed,mo=$e.__c,go=$e.unmount,vo=$e.__;function Lt(e,t){$e.__h&&$e.__h(Ve,e,Mt||t),Mt=0;var n=Ve.__H||(Ve.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function ye(e){return Mt=1,_n(bo,e)}function _n(e,t,n){var r=Lt(mt++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):bo(void 0,t),function(o){var v=r.__N?r.__N[0]:r.__[0],f=r.t(v,o);v!==f&&(r.__N=[f,r.__[1]],r.__c.setState({}))}],r.__c=Ve,!Ve.__f)){var s=function(o,v,f){if(!r.__c.__H)return!0;var L=r.__c.__H.__.filter(function(p){return!!p.__c});if(L.every(function(p){return!p.__N}))return!i||i.call(this,o,v,f);var h=r.__c.props!==o;return L.forEach(function(p){if(p.__N){var a=p.__[0];p.__=p.__N,p.__N=void 0,a!==p.__[0]&&(h=!0)}}),i&&i.call(this,o,v,f)||h};Ve.__f=!0;var i=Ve.shouldComponentUpdate,d=Ve.componentWillUpdate;Ve.componentWillUpdate=function(o,v,f){if(this.__e){var L=i;i=void 0,s(o,v,f),i=L}d&&d.call(this,o,v,f)},Ve.shouldComponentUpdate=s}return r.__N||r.__}function he(e,t){var n=Lt(mt++,3);!$e.__s&&bn(n.__H,t)&&(n.__=e,n.u=t,Ve.__H.__h.push(n))}function Dt(e,t){var n=Lt(mt++,4);!$e.__s&&bn(n.__H,t)&&(n.__=e,n.u=t,Ve.__h.push(n))}function ve(e){return Mt=5,ze(function(){return{current:e}},[])}function _o(e,t,n){Mt=6,Dt(function(){if(typeof e=="function"){var r=e(t());return function(){e(null),r&&typeof r=="function"&&r()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function ze(e,t){var n=Lt(mt++,7);return bn(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function X(e,t){return Mt=8,ze(function(){return e},t)}function kt(e){var t=Ve.context[e.__c],n=Lt(mt++,9);return n.c=e,t?(n.__==null&&(n.__=!0,t.sub(Ve)),t.props.value):e.__}function wo(e,t){$e.useDebugValue&&$e.useDebugValue(t?t(e):e)}function wn(){var e=Lt(mt++,11);if(!e.__){for(var t=Ve.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__="P"+n[0]+"-"+n[1]++}return e.__}function Yr(){for(var e;e=uo.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(Yt),e.__H.__h.forEach(yn),e.__H.__h=[]}catch(t){e.__H.__h=[],$e.__e(t,e.__v)}}$e.__b=function(e){Ve=null,po&&po(e)},$e.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),vo&&vo(e,t)},$e.__r=function(e){fo&&fo(e),mt=0;var t=(Ve=e.__c).__H;t&&(vn===Ve?(t.__h=[],Ve.__h=[],t.__.forEach(function(n){n.__N&&(n.__=n.__N),n.u=n.__N=void 0})):(t.__h.forEach(Yt),t.__h.forEach(yn),t.__h=[],mt=0)),vn=Ve},$e.diffed=function(e){ho&&ho(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(uo.push(t)!==1&&co===$e.requestAnimationFrame||((co=$e.requestAnimationFrame)||Xr)(Yr)),t.__H.__.forEach(function(n){n.u&&(n.__H=n.u),n.u=void 0})),vn=Ve=null},$e.__c=function(e,t){t.some(function(n){try{n.__h.forEach(Yt),n.__h=n.__h.filter(function(r){return!r.__||yn(r)})}catch(r){t.some(function(s){s.__h&&(s.__h=[])}),t=[],$e.__e(r,n.__v)}}),mo&&mo(e,t)},$e.unmount=function(e){go&&go(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(r){try{Yt(r)}catch(s){t=s}}),n.__H=void 0,t&&$e.__e(t,n.__v))};var yo=typeof requestAnimationFrame=="function";function Xr(e){var t,n=function(){clearTimeout(r),yo&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);yo&&(t=requestAnimationFrame(n))}function Yt(e){var t=Ve,n=e.__c;typeof n=="function"&&(e.__c=void 0,n()),Ve=t}function yn(e){var t=Ve;e.__c=e.__(),Ve=t}function bn(e,t){return!e||e.length!==t.length||t.some(function(n,r){return n!==e[r]})}function bo(e,t){return typeof t=="function"?t(e):t}function xo(e,t){for(var n in t)e[n]=t[n];return e}function xn(e,t){for(var n in e)if(n!=="__source"&&!(n in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}function Eo(e,t){var n=t(),r=ye({t:{__:n,u:t}}),s=r[0].t,i=r[1];return Dt(function(){s.__=n,s.u=t,En(s)&&i({t:s})},[e,n,t]),he(function(){return En(s)&&i({t:s}),e(function(){En(s)&&i({t:s})})},[e]),n}function En(e){var t,n,r=e.u,s=e.__;try{var i=r();return!((t=s)===(n=i)&&(t!==0||1/t==1/n)||t!=t&&n!=n)}catch{return!0}}function Co(e){e()}function Mo(e){return e}function Lo(){return[!1,Co]}var ko=Dt;function Xt(e,t){this.props=e,this.context=t}function Gr(e,t){function n(s){var i=this.props.ref,d=i==s.ref;return!d&&i&&(i.call?i(null):i.current=null),t?!t(this.props,s)||!d:xn(this.props,s)}function r(s){return this.shouldComponentUpdate=n,dt(e,s)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r.type=e,r}(Xt.prototype=new ct).isPureReactComponent=!0,Xt.prototype.shouldComponentUpdate=function(e,t){return xn(this.props,e)||xn(this.state,t)};var Io=be.__b;be.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),Io&&Io(e)};var Zr=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function To(e){function t(n){var r=xo({},n);return delete r.ref,e(r,n.ref||null)}return t.$$typeof=Zr,t.render=e,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var So=function(e,t){return e==null?null:pt(pt(e).map(t))},$r={map:So,forEach:So,count:function(e){return e?pt(e).length:0},only:function(e){var t=pt(e);if(t.length!==1)throw"Children.only";return t[0]},toArray:pt},jr=be.__e;be.__e=function(e,t,n,r){if(e.then){for(var s,i=t;i=i.__;)if((s=i.__c)&&s.__c)return t.__e==null&&(t.__e=n.__e,t.__k=n.__k),s.__c(e,t)}jr(e,t,n,r)};var No=be.unmount;function Po(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=xo({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__e=!0,e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Po(r,t,n)})),e}function Ro(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Ro(r,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=n)),e}function Gt(){this.__u=0,this.o=null,this.__b=null}function Ao(e){if(!e.__)return null;var t=e.__.__c;return t&&t.__a&&t.__a(e)}function qr(e){var t,n,r,s=null;function i(d){if(t||(t=e()).then(function(o){o&&(s=o.default||o),r=!0},function(o){n=o,r=!0}),n)throw n;if(!r)throw t;return s?dt(s,d):null}return i.displayName="Lazy",i.__f=!0,i}function zt(){this.i=null,this.l=null}be.unmount=function(e){var t=e.__c;t&&(t.__z=!0),t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),No&&No(e)},(Gt.prototype=new ct).__c=function(e,t){var n=t.__c,r=this;r.o==null&&(r.o=[]),r.o.push(n);var s=Ao(r.__v),i=!1,d=function(){i||r.__z||(i=!0,n.__R=null,s?s(v):v())};n.__R=d;var o=n.__P;n.__P=null;var v=function(){if(!--r.__u){if(r.state.__a){var f=r.state.__a;r.__v.__k[0]=Ro(f,f.__c.__P,f.__c.__O)}var L;for(r.setState({__a:r.__b=null});L=r.o.pop();)L.__P=o,L.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(d,d)},Gt.prototype.componentWillUnmount=function(){this.o=[]},Gt.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Po(this.__b,n,r.__O=r.__P)}this.__b=null}var s=t.__a&&dt(Ke,null,e.fallback);return s&&(s.__u&=-33),[dt(Ke,null,t.__a?null:e.children),s]};var Do=function(e,t,n){if(++n[1]===n[0]&&e.l.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.l.size))for(n=e.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.i=n=n[2]}};function Kr(e){return this.getChildContext=function(){return e.context},e.children}function Jr(e){var t=this,n=e.h;if(t.componentWillUnmount=function(){Rt(null,t.v),t.v=null,t.h=null},t.h&&t.h!==n&&t.componentWillUnmount(),!t.v){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.h=n,t.v={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},contains:function(){return!0},namespaceURI:n.namespaceURI,insertBefore:function(s,i){this.childNodes.push(s),t.h.insertBefore(s,i)},removeChild:function(s){this.childNodes.splice(this.childNodes.indexOf(s)>>>1,1),t.h.removeChild(s)}}}Rt(dt(Kr,{context:t.context},e.__v),t.v)}function Qr(e,t){var n=dt(Jr,{__v:e,h:t});return n.containerInfo=t,n}(zt.prototype=new ct).__a=function(e){var t=this,n=Ao(t.__v),r=t.l.get(e);return r[0]++,function(s){var i=function(){t.props.revealOrder?(r.push(s),Do(t,e,r)):s()};n?n(i):i()}},zt.prototype.render=function(e){this.i=null,this.l=new Map;var t=pt(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var n=t.length;n--;)this.l.set(t[n],this.i=[1,0,this.i]);return e.children},zt.prototype.componentDidUpdate=zt.prototype.componentDidMount=function(){var e=this;this.l.forEach(function(t,n){Do(e,n,t)})};var zo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,ea=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,ta=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,na=/[A-Z0-9]/g,oa=typeof document<"u",ra=function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)};function Oo(e,t,n){return t.__k==null&&(t.textContent=""),Rt(e,t),typeof n=="function"&&n(),e?e.__c:null}function aa(e,t,n){return lo(e,t),typeof n=="function"&&n(),e?e.__c:null}ct.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(ct.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var Ho=be.event;function ia(){}function sa(){return this.cancelBubble}function la(){return this.defaultPrevented}be.event=function(e){return Ho&&(e=Ho(e)),e.persist=ia,e.isPropagationStopped=sa,e.isDefaultPrevented=la,e.nativeEvent=e};var Cn,ca={enumerable:!1,configurable:!0,get:function(){return this.class}},Fo=be.vnode;be.vnode=function(e){typeof e.type=="string"&&function(t){var n=t.props,r=t.type,s={},i=r.indexOf("-")===-1;for(var d in n){var o=n[d];if(!(d==="value"&&"defaultValue"in n&&o==null||oa&&d==="children"&&r==="noscript"||d==="class"||d==="className")){var v=d.toLowerCase();d==="defaultValue"&&"value"in n&&n.value==null?d="value":d==="download"&&o===!0?o="":v==="translate"&&o==="no"?o=!1:v[0]==="o"&&v[1]==="n"?v==="ondoubleclick"?d="ondblclick":v!=="onchange"||r!=="input"&&r!=="textarea"||ra(n.type)?v==="onfocus"?d="onfocusin":v==="onblur"?d="onfocusout":ta.test(d)&&(d=v):v=d="oninput":i&&ea.test(d)?d=d.replace(na,"-$&").toLowerCase():o===null&&(o=void 0),v==="oninput"&&s[d=v]&&(d="oninputCapture"),s[d]=o}}r=="select"&&s.multiple&&Array.isArray(s.value)&&(s.value=pt(n.children).forEach(function(f){f.props.selected=s.value.indexOf(f.props.value)!=-1})),r=="select"&&s.defaultValue!=null&&(s.value=pt(n.children).forEach(function(f){f.props.selected=s.multiple?s.defaultValue.indexOf(f.props.value)!=-1:s.defaultValue==f.props.value})),n.class&&!n.className?(s.class=n.class,Object.defineProperty(s,"className",ca)):(n.className&&!n.class||n.class&&n.className)&&(s.class=s.className=n.className),t.props=s}(e),e.$$typeof=zo,Fo&&Fo(e)};var Uo=be.__r;be.__r=function(e){Uo&&Uo(e),Cn=e.__c};var Vo=be.diffed;be.diffed=function(e){Vo&&Vo(e);var t=e.props,n=e.__e;n!=null&&e.type==="textarea"&&"value"in t&&t.value!==n.value&&(n.value=t.value==null?"":t.value),Cn=null};var ua={ReactCurrentDispatcher:{current:{readContext:function(e){return Cn.__n[e.__c].props.value},useCallback:X,useContext:kt,useDebugValue:wo,useDeferredValue:Mo,useEffect:he,useId:wn,useImperativeHandle:_o,useInsertionEffect:ko,useLayoutEffect:Dt,useMemo:ze,useReducer:_n,useRef:ve,useState:ye,useSyncExternalStore:Eo,useTransition:Lo}}};function da(e){return dt.bind(null,e)}function Zt(e){return!!e&&e.$$typeof===zo}function pa(e){return Zt(e)&&e.type===Ke}function fa(e){return!!e&&!!e.displayName&&(typeof e.displayName=="string"||e.displayName instanceof String)&&e.displayName.startsWith("Memo(")}function ha(e){return Zt(e)?Wr.apply(null,arguments):e}function Wo(e){return!!e.__k&&(Rt(null,e),!0)}function ma(e){return e&&(e.base||e.nodeType===1&&e)||null}var ga=function(e,t){return e(t)},va=function(e,t){return e(t)},_a=Ke,wa=Zt,Mn={useState:ye,useId:wn,useReducer:_n,useEffect:he,useLayoutEffect:Dt,useInsertionEffect:ko,useTransition:Lo,useDeferredValue:Mo,useSyncExternalStore:Eo,startTransition:Co,useRef:ve,useImperativeHandle:_o,useMemo:ze,useCallback:X,useContext:kt,useDebugValue:wo,version:"18.3.1",Children:$r,render:Oo,hydrate:aa,unmountComponentAtNode:Wo,createPortal:Qr,createElement:dt,createContext:At,createFactory:da,cloneElement:ha,createRef:Or,Fragment:Ke,isValidElement:Zt,isElement:wa,isFragment:pa,isMemo:fa,findDOMNode:ma,Component:ct,PureComponent:Xt,memo:Gr,forwardRef:To,flushSync:va,unstable_batchedUpdates:ga,StrictMode:_a,Suspense:Gt,SuspenseList:zt,lazy:qr,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ua};async function ya(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch composition: ${t.statusText}`);return await t.json()}const Ln=new Map,ba=e=>{const[t,n]=ye({status:"pending",isSuccess:!1});return he(()=>{const r=i=>n({status:"success",data:i,isSuccess:!0}),s=Ln.get(e);if(s&&!(s instanceof Promise)){r(s);return}n({status:"fetching",isSuccess:!1}),async function(){try{let i;if(s)i=await s;else{const d=ya(e);Ln.set(e,d),i=await d,Ln.set(e,i)}r(i)}catch(i){n({status:"error",isSuccess:!1,error:i})}}()},[e]),t},Bo=At(null),Je=()=>{const e=kt(Bo);if(!e)throw new Error("useGlobalContext must be used within a GlobalContextProvider");return e},xa=({children:e,...t})=>c(Bo.Provider,{value:t,children:e}),Yo=At(null),gt=()=>{const e=kt(Yo);if(!e)throw new Error("useCompositionContext must be used within a CompositionContextProvider");return e},Ea=({composition:e,children:t})=>{const{aspectRatio:n,categories:r,imageHdWidth:s,imageSubWidths:i}=e,{minMediaWidth:d,maxMediaWidth:o,categoriesFilter:v}=Je(),f=ze(()=>{if(v==="*")return r;function a(E){return v.split("|").some(T=>new RegExp(`^${T.replace(/\*/g,".*")}$`).test(E))}return r.filter(({id:E})=>a(E))},[r,v]),L=ze(()=>f.flatMap(({items:a})=>a),[f]),h={aspectRatio:n.replace(":"," / ")},p=ze(()=>{const a=i.concat(s),E=a.sort((b,m)=>b-m),T=E.filter(b=>b>=d&&b<=o);if(T.length===0){const b=(d+o)/2,m=a.reduce((M,k)=>Math.abs(k-b)<Math.abs(M-b)?k:M,s);return console.warn(`None of available media widths (${E.join("|")}) match the given constraints (${d>0?`${d} ≤ `:""}width${o<1/0?` ≤ ${o}`:""}).`,`Using the closest width instead (${m}).`),[m]}return T},[i,s,d,o]);return c(Yo.Provider,{value:{...e,categories:f,items:L,aspectRatioStyle:h,usedMediaWidths:p},children:t})},Xo=500,wt=.75,yt=1+wt*2,Go=()=>{const{isFullScreen:e,maxItemsShown:t,integration:n}=Je();return{effectiveMaxItemsShown:n&&e?1:t}};function it(e,t,n){return Math.min(Math.max(e,t),n)}const $t=(e,t,n)=>e+(t-e)*n,Zo=(e,t,n,r,s,i=!1)=>{const d=it(e,t,n);if(d===(i?n:t))return r;if(d===(i?t:n))return 1;const o=(d-t)/(n-t),f=1+(i?o:1-o)*(r-1),h=1+Math.round((f-1)/s)*s;return it(h,1,r)},Ca=(e,t)=>{if(t.includes(e))return e;let n=t[0],r=Math.abs(e-n);for(let s=1;s<t.length;s++){const i=Math.abs(e-t[s]);i<r&&(r=i,n=t[s])}return n},$o=At(null),kn=()=>kt($o),Ot=()=>{const e=kn();if(!e)throw new Error("useCustomizationContext must be used within a CustomizationContextProvider");return e},jo="*:size-full",qo="*:object-cover *:size-full",Ma=({children:e})=>{const{compositionUrl:t}=Je(),n=X(()=>document.querySelector(`${ut}[composition-url="${t}"]`),[t]),r=X(E=>{const T=E.querySelectorAll(Vt),b=new Map;for(const m of T){const M=m.getAttribute("name");if(!M){console.warn("Icon element is missing a name attribute");continue}const k=m.innerHTML,_=k?c("div",{className:jo,dangerouslySetInnerHTML:{__html:k}}):void 0;if(!_){console.warn(`Icon "${M}" customization is empty.`);continue}b.set(M,{Icon:_})}return b},[]),[s,i]=ye(()=>{const E=n();return E?r(E):new Map});he(()=>{const E=n();if(!E)return;const T=new MutationObserver(()=>{i(r(E))});return T.observe(E,{childList:!0,subtree:!0}),()=>T.disconnect()},[r,n]);const d=X(E=>s.get(E),[s]),o=X((E,T)=>{i(b=>{const{Icon:m,...M}=T;return new Map(b.set(E,{...M,Icon:c("div",{className:jo,children:m})}))})},[]),v=X(E=>{i(T=>(T.delete(E),new Map(T)))},[]),f=X(E=>{const T=E.querySelectorAll(Ut),b=new Array;for(const m of T){const M=m.innerHTML;if(!M){console.warn("Custom media element is empty");continue}const k=Number(m.getAttribute("index"));if(Number.isNaN(k)){console.warn("Custom media element is missing the 'index' attribute");continue}const _=m.getAttribute("thumbnail-src")??void 0,C=JSON.stringify({index:k,thumbnailSrc:_});b.push({id:C,Media:c("div",{className:qo,dangerouslySetInnerHTML:{__html:M}}),index:k,thumbnailSrc:_})}return b},[]),[L,h]=ye(()=>{const E=n();return E?f(E):[]});he(()=>{const E=n();if(!E)return;const T=new MutationObserver(()=>{h(f(E))});return T.observe(E,{childList:!0,subtree:!0}),()=>T.disconnect()},[f,n]);const p=X(E=>{const{Media:T,...b}=E,m=c("div",{className:qo,children:T}),M=JSON.stringify(b);return h(k=>[...k,{id:M,Media:m,...b}]),M},[]),a=X(E=>{h(T=>T.filter(b=>b.id!==E))},[]);return c($o.Provider,{value:{getIconConfig:d,registerIconConfig:o,unregisterIconConfig:v,customMediaList:L,registerCustomMedia:p,unregisterCustomMedia:a},children:e})},Ko=At(null),Qe=()=>{const e=kt(Ko);if(!e)throw new Error("useControlsContext must be used within a ControlsContextProvider");return e},La=({children:e})=>{const{infiniteCarrousel:t,extendBehavior:n,integration:r,emitEvent:s,emitAnalyticsEvent:i,isFullScreen:d,requestFullscreen:o,exitFullscreen:v}=Je(),{customMediaList:f}=Ot(),{categories:L,items:h}=gt(),p=ze(()=>{const $=new Array(...h),se=f.slice().sort((A,fe)=>A.index<0&&fe.index<0?fe.index-A.index:A.index<0?1:fe.index<0?-1:A.index-fe.index);for(const A of se){let fe=A.index;fe<0&&(fe=$.length+fe+1),$.splice(fe,0,{type:"custom",...A})}return $},[h,f]),[a,E]=ye(p.map(()=>null));he(()=>{E(p.map(()=>null))},[p]);const T=X(($,se)=>{E(A=>A.map((fe,xe)=>xe===$?se:fe))},[]),[b,m]=ye(0),[M,k]=ye(null),_=M??b,C=p[_],D=a[_],[G,I]=ye(null),S=!!G,J=X(()=>I(null),[]),{effectiveMaxItemsShown:O}=Go(),ee=X($=>{const se=Math.min(b,$),A=Math.max(b,$);a.slice(se,A+1).filter(xe=>xe===null).length>2&&I("instant"),k($)},[b,a]),K=ze(()=>{let $;if(C.type==="custom"){const se=p.slice(0,_).reverse().find(A=>A.type!=="custom")??p.slice(_+1).find(A=>A.type!=="custom");if(!se)throw new Error("No non-custom item found");$=se}else $=C;for(const se of L)if(se.items.includes($))return se.id;throw new Error("Current item not found in any category")},[L,C,p,_]),j=ze(()=>L.find(({id:$})=>$===K)?.title??"Unnamed Category",[L,K]),ce=ze(()=>p.length,[p]),U=X($=>{const se=L.find(({id:fe})=>fe===$)?.items[0];if(se===void 0)throw new Error("Failed to find target category");const A=p.findIndex(fe=>fe===se);ee(A)},[L,p,ee]),P=X(()=>{if(S||M!==null)return;const $=b-1;if($>=0)k($);else if(t){I("first_to_last");const se=Math.ceil(O),A=p.length+(r&&!t&&O%1!==0?1:0),fe=O>1?Math.max(0,A-se):p.length-1;k(fe)}i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Item Navigation",action_field:"item_navigation",action_value:"prev"}})},[S,M,b,t,i,K,j,C.type,O,p.length,r]),Z=X(()=>{if(S||M!==null)return;const $=b+1,se=Math.ceil(O),A=p.length+(r&&!t&&O%1!==0?1:0),fe=O>1?Math.max(0,A-se):p.length-1;$<=fe?k($):t&&(I("last_to_first"),k(0)),i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Item Navigation",action_field:"item_navigation",action_value:"next"}})},[S,M,b,O,p.length,r,t,i,K,j,C.type]);he(()=>{s(Un,{index:_,item:C})},[C,s,_]),he(()=>{if(S||M!==null)return;const $={type:"page",category_id:K,category_name:j,items_count:ce,page_properties:{item_type:C.type,item_position:b}},se=setTimeout(()=>i($),0);return()=>clearTimeout(se)},[K,j,ce,C.type,b,i,S,M]);const z=ze(()=>{if(r&&!d)return p.some($=>{switch($.type){case"image":return!!$.hotspots?.length;case"360":return $.images.some(se=>!!se.hotspots?.length);default:return!1}});switch(C.type){case"image":return!!C.hotspots?.length;case"360":return D==="running"&&C.images.some($=>!!$.hotspots?.length);default:return!1}},[C,D,r,p,d]),[H,ue]=ye(!0),[R,ne]=ye({}),W=ze(()=>r&&d?R[_]??!0:H,[r,d,R,_,H]),oe=X(()=>{if(r&&d){const se=!(R[_]??!0);ne(A=>({...A,[_]:se})),s(se?an:sn),i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Hotspots Toggled",action_field:"hotspots_toggle_state",action_value:se}})}else{const $=!H;ue($),s($?an:sn),i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Hotspots Toggled",action_field:"hotspots_toggle_state",action_value:$}})}},[r,d,R,_,s,i,K,j,C.type,b,H]),N=ze(()=>{switch(C.type){case"video":return D!=="running";default:return!0}},[C,D]),[Ee,Q]=ye(!1),Me=X(()=>{const $=!Ee;Q($),s($?Bn:Yn),i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Gallery Toggled",action_field:"gallery_toggle_state",action_value:$}})},[Ee,s,i,K,j,C.type,b]),[Oe,je]=ye(null),He=X(()=>je(null),[]),g=!!Oe,x=ze(()=>{switch(C.type){case"image":return!0;case"interior-360":return D==="running";case"360":return D==="running";default:return!1}},[C.type,D]),[re,Y]=ye(1),V=X($=>{const se=typeof $=="function"?$(re):$;re!==se&&(Y(se),i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Zoom Changed",action_field:"zoom_level",action_value:se}}))},[re,i,K,j,C.type,b]),w=re!==1,te=re<yt,ae=re>1,ge=X($=>{V(se=>it(se+$,1,yt))},[V]),ie=X(()=>V(1),[V]),ke=X(()=>ge(wt),[ge]),Ie=X(()=>ge(-wt),[ge]),Xe=X(()=>{ie(),He()},[ie,He]),[We,Be]=ye(!1),[Te,Ce]=ye(),[Ae,Ye]=ye(!1),De=X(async $=>{Xe(),Be($),s($?Vn:Wn),i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Fake Fullscreen Toggled",action_field:"fake_fullscreen_toggle_state",action_value:$}})},[Xe,s,i,K,j,C.type,b]),Se=X(()=>{clearTimeout(Te);const $=setTimeout(()=>{Ce(void 0)},Xo);Ce($)},[Te]),Ge=X(async()=>{const $=await o();return $&&i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Fullscreen Toggled",action_field:"fullscreen_toggle_state",action_value:!0}}),$},[o,i,K,j,C.type,b]),Fe=X(async()=>{const $=await v();return $&&i({type:"track",category_id:K,category_name:j,item_type:C.type,item_position:b,action_properties:{action_name:"Fullscreen Toggled",action_field:"fullscreen_toggle_state",action_value:!1}}),$},[v,i,K,j,C.type,b]),et=X(async()=>{if(Se(),n==="full_screen"){const $=await Ge();if(Ye(!$),$)return}De(!0)},[n,De,Ge,Se]),Ze=X(async()=>{Se(),!(n==="full_screen"&&(Ye(!1),await Fe()))&&De(!1)},[n,De,Fe,Se]),Re=X(()=>{We?Ze():et()},[Ze,et,We]);return he(()=>{n==="full_screen"&&(Ae&&We||d!==We&&(Se(),De(d)))},[n,De,We,Ae,d,Se]),c(Ko.Provider,{value:{items:p,setItemInteraction:T,slidable:p.length>1,carrouselItemIndex:b,setCarrouselItemIndex:m,itemIndexCommand:M,setItemIndexCommand:k,masterItemIndex:_,specialCommand:G,isRunningSpecialCommand:S,finishSpecialCommand:J,prevItem:P,nextItem:Z,scrollToItemIndex:ee,displayedCategoryId:K,displayedCategoryName:j,changeCategory:U,enableHotspotsControl:z,showHotspots:H,currentItemHotspotsVisible:W,toggleHotspots:oe,showGalleryControls:N,showGallery:Ee,toggleGallery:Me,shownDetails:Oe,isShowingDetails:g,setShownDetails:je,resetShownDetails:He,showZoomControls:x,zoom:re,isZooming:w,setZoom:V,resetZoom:ie,canZoomIn:te,zoomIn:ke,canZoomOut:ae,zoomOut:Ie,resetView:Xe,extendMode:We,enableExtendMode:et,disableExtendMode:Ze,toggleExtendMode:Re,extendTransition:!!Te,fakeFullScreen:Ae},children:e})},Jo=["left","center","right","fullW"],Qo=["top","middle","bottom","fullH"],ka=[...Jo,...Qo,"top-left","top-center","top-right","top-fullW","middle-left","middle-center","middle-right","middle-fullW","bottom-left","bottom-center","bottom-right","bottom-fullW","fullH-left","fullH-center","fullH-right","fullW-fullW"];function Ia(e){return Jo.includes(e)}function Ta(e){return Qo.includes(e)}function Sa(e){return ka.includes(e)}function Na(e){if(!Sa(e))throw new Error(`Invalid position: ${e}`);return Ta(e)?[e,void 0]:Ia(e)?[void 0,e]:e.split("-")}function de(...e){return e.filter(t=>!!t).map(t=>t.trim()).join(" ")}function Pa(e){switch(e){case"left":return"left-1 small:left-2";case"right":return"right-1 small:right-2";case"center":return"left-1/2 -translate-x-1/2";case"fullW":return"inset-x-1 small:inset-x-2"}}function er(e){switch(e){case"top":return"top-1 small:top-2";case"bottom":return"bottom-1 small:bottom-2";case"middle":return"top-1/2 -translate-y-1/2";case"fullH":return"inset-y-1 small:inset-y-2"}}function Ra({positionX:e,positionY:t}){const n=new Array;return e&&n.push(Pa(e)),t&&n.push(er(t)),n.join(" ")}function It(e){const[t,n]=Na(e);return Ra({positionX:n,positionY:t})}const qe=({customizationKey:e,className:t,children:n})=>{const{getIconConfig:r}=Ot(),i=r(e)?.Icon;return i?t?c("div",{className:t,children:i}):i:n},Aa=({className:e})=>c(qe,{className:e,customizationKey:"UI_CLOSE",children:c("svg",{className:e,width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",fill:"currentColor"})})}),Da={fill:{primary:"bg-primary text-primary-foreground hover:opacity-80",neutral:"bg-background text-neutral-foreground hover:opacity-80"},ghost:{primary:"bg-transparent text-foreground hover:bg-primary/25",neutral:"bg-transparent text-background hover:bg-foreground/25"}},za={button:"h-8 px-2",icon:"size-8 p-2"},ot=({variant:e="fill",shape:t="button",color:n="primary",className:r,children:s,...i})=>{const d=Da[e][n],o=za[t];return c("button",{className:de("flex items-center justify-center rounded-ui text-sm transition-all disabled:opacity-60",d,o,r),...i,children:s})},In=e=>c(ot,{color:"neutral",shape:"icon",...e,children:c(Aa,{className:"size-full"})}),jt=({text:e,className:t})=>c("div",{className:de("flex size-full flex-col items-center justify-center gap-y-4",t),children:[c("img",{className:"h-20 small:h-28",src:"https://cdn.car-cutter.com/libs/web-player/v3/assets/car_placeholder.png"}),c("div",{className:"text-2xl font-bold",children:e})]}),Oa={primary:"border-primary",foreground:"border-foreground",background:"border-background"},Ha={sm:"size-4 border",md:"size-8 border-2",lg:"size-12 border-4"},tr=({color:e="foreground",size:t="md"})=>{const n=Oa[e],r=Ha[t];return c("div",{className:de("inline-block animate-rotation rounded-full border-b-transparent",r,n)})},st=To(({src:e,className:t,onLoad:n,imgInPlayerWidthRatio:r=1,onlyThumbnail:s,fadeIn:i,...d},o)=>{const{mediaLoadStrategy:v,playerInViewportWidthRatio:f}=Je(),{imageHdWidth:L,usedMediaWidths:h}=gt(),[p,a]=ze(()=>{const b=h.map(M=>`${M!==L?Pr(e,M):e} ${M}w`);let m;if(s)m=[`${h[0]}px`];else{const M=1/(r*f);switch(v){case"quality":{const k=[...h],_=k.pop();m=k.map(C=>`(max-width: ${M*C}px) ${C}px`),m.push(`${_}px`);break}case"balanced":{m=[];for(let k=0;k<h.length-1;k++){const _=h[k],C=h[k+1],D=Math.round((_+C)/2);m.push(`(max-width: ${M*D}px) ${_}px`)}m.push(`${h[h.length-1]}px`);break}case"speed":{const k=[...h],_=k.shift();m=k.reverse().map(C=>`(min-width: ${M*C}px) ${C}px`),m.push(`${_}px`);break}}}return[b.join(", "),m.join(", ")]},[L,r,v,s,f,e,h]),[E,T]=ye();return he(()=>{if(E===!0)return;const b=setTimeout(()=>{T(m=>m??!1)},30);return()=>clearTimeout(b)},[E]),c("img",{ref:o,src:e,srcSet:p,sizes:a,className:de(t,i&&de(E!==void 0&&"transition-opacity duration-200",E===!1&&"opacity-0",E===!0&&"opacity-100")),onLoad:b=>{T(!0),n?.(b)},...d})});st.displayName="CdnImage";const nr=({className:e})=>c(qe,{className:e,customizationKey:"UI_IMAGE",children:c("svg",{className:e,viewBox:"0 0 12 12",fill:"none",children:c("path",{d:"M9.5 2.5V9.5H2.5V2.5H9.5ZM9.5 1.5H2.5C1.95 1.5 1.5 1.95 1.5 2.5V9.5C1.5 10.05 1.95 10.5 2.5 10.5H9.5C10.05 10.5 10.5 10.05 10.5 9.5V2.5C10.5 1.95 10.05 1.5 9.5 1.5ZM7.07 5.93L5.57 7.865L4.5 6.57L3 8.5H9L7.07 5.93Z",fill:"currentColor"})})}),or=({className:e})=>c(qe,{className:e,customizationKey:"INTERIOR_UI_360",children:c("svg",{className:e,viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M30.9343 48C26.8559 48 24.3496 46.2454 23.3411 44.1517C23.1038 43.6651 23 43.1933 23 42.7509C23 41.6008 23.7415 40.8784 24.9725 40.8784C25.8623 40.8784 26.4259 41.2322 26.8708 42.0432C27.6271 43.5324 28.7839 44.4171 31.0085 44.4171C33.2034 44.4171 34.7161 43.149 34.7161 41.3797C34.731 39.3154 33.2034 38.1653 30.6081 38.1653H29.6737C28.5911 38.1653 27.9682 37.5313 27.9682 36.5729C27.9682 35.644 28.5911 34.9952 29.6737 34.9952H30.5488C32.7882 34.9952 34.2416 33.7862 34.2416 32.0463C34.2416 30.336 33.0848 29.2006 30.9195 29.2006C29.1102 29.2006 28.0127 29.9526 27.3157 31.4565C26.8263 32.4592 26.3072 32.8278 25.2987 32.8278C24.053 32.8278 23.4153 32.1053 23.4153 31.0289C23.4153 30.5276 23.5191 30.1 23.7415 29.5987C24.6907 27.5197 27.1229 25.7799 30.9047 25.7799C35.428 25.7799 38.4831 28.0063 38.4831 31.4123C38.4831 34.1106 36.5403 35.8799 34.0191 36.396V36.4845C37.2077 36.7793 39.2691 38.6372 39.2691 41.5713C39.2691 45.4344 35.9026 48 30.9343 48Z",fill:"white"}),c("path",{d:"M50.5032 48C47.107 48 44.4079 46.4223 42.8358 43.2965C42.0201 41.6451 41.5752 39.5366 41.5752 37.0595C41.5752 30.0116 44.9566 25.7651 50.5181 25.7651C54.0626 25.7651 56.6134 27.2543 57.6219 29.2448C57.8295 29.6577 57.9333 30.0411 57.9333 30.4392C57.9333 31.4271 57.2363 32.1938 56.0647 32.1938C55.1749 32.1938 54.641 31.8104 53.9884 31.0584C53.0096 29.8346 51.9715 29.2891 50.5032 29.2891C47.4481 29.2891 45.8909 32.179 45.8613 36.7204V36.9415H45.9502C46.7808 34.9658 48.8867 33.5208 51.7787 33.5208C55.9164 33.5208 58.749 36.455 58.749 40.4508C58.749 44.8594 55.2787 48 50.5032 48ZM50.4439 44.4613C52.6388 44.4613 54.374 42.7804 54.3888 40.6424C54.3888 38.4013 52.7426 36.8088 50.4884 36.8088C48.2193 36.8088 46.5286 38.3865 46.5286 40.554C46.5286 42.7509 48.249 44.4613 50.4439 44.4613Z",fill:"white"}),c("path",{d:"M68.9374 48C63.5094 48 60.2022 43.7388 60.2022 36.8531C60.2022 29.9821 63.5391 25.7651 68.9374 25.7651C74.3357 25.7651 77.6577 29.9673 77.6577 36.8383C77.6577 43.7093 74.3654 48 68.9374 48ZM68.9374 44.4318C71.5772 44.4318 73.1048 41.7335 73.1048 36.8531C73.1048 32.0021 71.5624 29.3333 68.9374 29.3333C66.3272 29.3333 64.7552 32.0168 64.7552 36.8531C64.7552 41.7335 66.2975 44.4318 68.9374 44.4318Z",fill:"white"}),c("path",{d:"M81.6758 28.4244C78.6504 28.4244 76.3665 26.1685 76.3665 23.2048C76.3665 20.2559 78.6504 18 81.6758 18C84.6864 18 87 20.2559 87 23.2048C87 26.1685 84.6864 28.4244 81.6758 28.4244ZM81.6758 25.4755C82.9364 25.4755 83.9152 24.4581 83.9152 23.2048C83.9152 21.9368 82.9216 20.9489 81.6758 20.9489C80.4597 20.9489 79.4364 21.9368 79.4364 23.2048C79.4364 24.4581 80.4449 25.4755 81.6758 25.4755Z",fill:"white"}),c("path",{d:"M37.3915 79.7285C36.5538 79.7285 36.0601 79.2171 36.0601 78.3442V68.0541C36.0601 67.1724 36.5538 66.661 37.3915 66.661C38.2292 66.661 38.7229 67.1724 38.7229 68.0541V78.3442C38.7229 79.2171 38.2292 79.7285 37.3915 79.7285Z",fill:"white"}),c("path",{d:"M43.7429 79.7285C42.9405 79.7285 42.4644 79.2436 42.4644 78.3971V67.9924C42.4644 67.1459 42.9582 66.661 43.8047 66.661C44.3513 66.661 44.7217 66.8814 45.1273 67.4369L50.6294 75.1258H50.6999V68.0012C50.6999 67.1459 51.1761 66.661 51.9785 66.661C52.7809 66.661 53.2482 67.1459 53.2482 68.0012V78.4324C53.2482 79.2612 52.7809 79.7285 51.9432 79.7285C51.3701 79.7285 51.0174 79.5257 50.6118 78.9614L45.092 71.2284H45.0126V78.3971C45.0126 79.2436 44.5365 79.7285 43.7429 79.7285Z",fill:"white"}),c("path",{d:"M61.3719 79.7285C60.5343 79.7285 60.0405 79.2171 60.0405 78.3442V69.0417H57.4129C56.6898 69.0417 56.2049 68.6273 56.2049 67.9395C56.2049 67.2518 56.681 66.8373 57.4129 66.8373H65.3398C66.0629 66.8373 66.539 67.2518 66.539 67.9395C66.539 68.6273 66.054 69.0417 65.3398 69.0417H62.7034V78.3442C62.7034 79.2171 62.2096 79.7285 61.3719 79.7285Z",fill:"white"}),c("path",{d:"M11.5291 40.7269C5.85358 44.3944 2.5 48.9252 2.5 53.8286C2.5 62.4095 12.77 69.8493 27.7816 73.5179M86.4709 40.7269C92.1464 44.3944 95.5 48.9252 95.5 53.8286C95.5 61.8751 86.4695 68.9181 72.967 72.7891M27.7816 73.5179L23.267 65.1144M27.7816 73.5179L19.6553 77.7552",stroke:"currentColor",strokeWidth:"4.51456",strokeLinecap:"round"})]})}),rr=({className:e})=>c(qe,{className:e,customizationKey:"UI_PLAY",children:c("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c("polygon",{points:"6 3 20 12 6 21 6 3"})})}),Tn=({className:e})=>c(qe,{className:e,customizationKey:"UI_360",children:c("svg",{className:e,viewBox:"0 0 98 98",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("path",{d:"M30.9343 48C26.8559 48 24.3496 46.2454 23.3411 44.1517C23.1038 43.6651 23 43.1933 23 42.7509C23 41.6008 23.7415 40.8784 24.9725 40.8784C25.8623 40.8784 26.4259 41.2322 26.8708 42.0432C27.6271 43.5324 28.7839 44.4171 31.0085 44.4171C33.2034 44.4171 34.7161 43.149 34.7161 41.3797C34.731 39.3154 33.2034 38.1653 30.6081 38.1653H29.6737C28.5911 38.1653 27.9682 37.5313 27.9682 36.5729C27.9682 35.644 28.5911 34.9952 29.6737 34.9952H30.5488C32.7882 34.9952 34.2416 33.7862 34.2416 32.0463C34.2416 30.336 33.0848 29.2006 30.9195 29.2006C29.1102 29.2006 28.0127 29.9526 27.3157 31.4565C26.8263 32.4592 26.3072 32.8278 25.2987 32.8278C24.053 32.8278 23.4153 32.1053 23.4153 31.0289C23.4153 30.5276 23.5191 30.1 23.7415 29.5987C24.6907 27.5197 27.1229 25.7799 30.9047 25.7799C35.428 25.7799 38.4831 28.0063 38.4831 31.4123C38.4831 34.1106 36.5403 35.8799 34.0191 36.396V36.4845C37.2077 36.7793 39.2691 38.6372 39.2691 41.5713C39.2691 45.4344 35.9026 48 30.9343 48Z",fill:"white"}),c("path",{d:"M50.5032 48C47.107 48 44.4079 46.4223 42.8358 43.2965C42.0201 41.6451 41.5752 39.5366 41.5752 37.0595C41.5752 30.0116 44.9566 25.7651 50.5181 25.7651C54.0626 25.7651 56.6134 27.2543 57.6219 29.2448C57.8295 29.6577 57.9333 30.0411 57.9333 30.4392C57.9333 31.4271 57.2363 32.1938 56.0647 32.1938C55.1749 32.1938 54.641 31.8104 53.9884 31.0584C53.0096 29.8346 51.9715 29.2891 50.5032 29.2891C47.4481 29.2891 45.8909 32.179 45.8613 36.7204V36.9415H45.9502C46.7808 34.9658 48.8867 33.5208 51.7787 33.5208C55.9164 33.5208 58.749 36.455 58.749 40.4508C58.749 44.8594 55.2787 48 50.5032 48ZM50.4439 44.4613C52.6388 44.4613 54.374 42.7804 54.3888 40.6424C54.3888 38.4013 52.7426 36.8088 50.4884 36.8088C48.2193 36.8088 46.5286 38.3865 46.5286 40.554C46.5286 42.7509 48.249 44.4613 50.4439 44.4613Z",fill:"white"}),c("path",{d:"M68.9374 48C63.5094 48 60.2022 43.7388 60.2022 36.8531C60.2022 29.9821 63.5391 25.7651 68.9374 25.7651C74.3357 25.7651 77.6577 29.9673 77.6577 36.8383C77.6577 43.7093 74.3654 48 68.9374 48ZM68.9374 44.4318C71.5772 44.4318 73.1048 41.7335 73.1048 36.8531C73.1048 32.0021 71.5624 29.3333 68.9374 29.3333C66.3272 29.3333 64.7552 32.0168 64.7552 36.8531C64.7552 41.7335 66.2975 44.4318 68.9374 44.4318Z",fill:"white"}),c("path",{d:"M81.6758 28.4244C78.6504 28.4244 76.3665 26.1685 76.3665 23.2048C76.3665 20.2559 78.6504 18 81.6758 18C84.6864 18 87 20.2559 87 23.2048C87 26.1685 84.6864 28.4244 81.6758 28.4244ZM81.6758 25.4755C82.9364 25.4755 83.9152 24.4581 83.9152 23.2048C83.9152 21.9368 82.9216 20.9489 81.6758 20.9489C80.4597 20.9489 79.4364 21.9368 79.4364 23.2048C79.4364 24.4581 80.4449 25.4755 81.6758 25.4755Z",fill:"white"}),c("path",{d:"M34.6814 79.561C33.8438 79.561 33.35 79.0496 33.35 78.1678V68.2217C33.35 67.3487 33.8438 66.8373 34.6814 66.8373H40.7302C41.4621 66.8373 41.9382 67.2518 41.9382 67.9395C41.9382 68.6273 41.4533 69.0417 40.7302 69.0417H36.0129V72.1014H40.501C41.1623 72.1014 41.612 72.4894 41.612 73.1242C41.612 73.7591 41.1711 74.147 40.501 74.147H36.0129V77.3566H40.7302C41.4533 77.3566 41.9382 77.771 41.9382 78.4588C41.9382 79.1466 41.4621 79.561 40.7302 79.561H34.6814Z",fill:"white"}),c("path",{d:"M46.4115 79.7285C45.7061 79.7285 45.1506 79.2171 45.1506 78.5734C45.1506 78.2472 45.2564 77.965 45.5121 77.6123L48.6864 73.1859V73.1154L45.6179 68.9359C45.327 68.5479 45.23 68.2569 45.23 67.9131C45.23 67.19 45.8031 66.661 46.5791 66.661C47.0817 66.661 47.4344 66.8814 47.7782 67.4017L50.5028 71.4224H50.5734L53.3862 67.3135C53.6948 66.855 53.9593 66.661 54.4707 66.661C55.1673 66.661 55.7669 67.1636 55.7669 67.7984C55.7669 68.1423 55.6699 68.4245 55.4142 68.7507L52.1076 73.1683V73.23L55.3172 77.5594C55.5641 77.8768 55.6699 78.1766 55.6699 78.5293C55.6699 79.2259 55.132 79.7285 54.3914 79.7285C53.9064 79.7285 53.5802 79.5345 53.2363 79.0672L50.397 75.1082H50.3265L47.5313 79.076C47.1963 79.561 46.9141 79.7285 46.4115 79.7285Z",fill:"white"}),c("path",{d:"M63.7055 79.7285C62.8678 79.7285 62.374 79.2171 62.374 78.3442V69.0417H59.7464C59.0234 69.0417 58.5384 68.6273 58.5384 67.9395C58.5384 67.2518 59.0146 66.8373 59.7464 66.8373H67.6734C68.3964 66.8373 68.8725 67.2518 68.8725 67.9395C68.8725 68.6273 68.3876 69.0417 67.6734 69.0417H65.0369V78.3442C65.0369 79.2171 64.5431 79.7285 63.7055 79.7285Z",fill:"white"}),c("path",{d:"M11.5291 40.7263C5.85358 44.3937 2.5 48.9245 2.5 53.828C2.5 62.4089 12.77 69.8486 27.7816 73.5172M86.4709 40.7263C92.1464 44.3937 95.5 48.9245 95.5 53.828C95.5 61.8744 86.4695 68.9174 72.967 72.7885M27.7816 73.5172L23.267 65.1137M27.7816 73.5172L19.6553 77.7545",stroke:"currentColor",strokeWidth:"4.51456",strokeLinecap:"round"})]})}),Fa=({src:e,withCdn:t})=>{const{permanentGallery:n}=Je();if(!e)return null;const r="size-full object-cover";return t?c(st,{className:r,src:e,onlyThumbnail:!0,fadeIn:!n}):c("img",{className:r,src:e})},qt=({children:e})=>{const{extendMode:t}=Qe();return c("div",{className:de("flex aspect-square h-3/4 items-center justify-center rounded-full bg-foreground/50 p-1",t&&"large:h-3/5 large:p-2"),children:e})},Ua=({item:e})=>{const{aspectRatioStyle:t}=gt(),{type:n}=e;let r,s;switch(n){case"360":r=e.images[0].src,s=!0;break;case"interior-360":r=e.poster,s=!0;break;case"image":r=e.src,s=!0;break;case"video":r=e.poster,s=!0;break;case"custom":r=e.thumbnailSrc,s=!1;break;default:s=!1}const i=c(Fa,{src:r,withCdn:s});let d;switch(n){case"360":d=c(qt,{children:c(Tn,{className:"size-full"})});break;case"interior-360":d=c(qt,{children:c(or,{className:"size-full"})});break;case"video":d=c(qt,{children:c(rr,{className:"size-full p-0.5 text-background"})});break;case"custom":d=r?null:c(qt,{children:c(nr,{className:"size-full p-0.5 text-background"})});break}return c("div",{className:"relative bg-foreground/30",style:t,children:[i,d&&c("div",{className:"absolute inset-0 flex items-center justify-center bg-foreground/25",children:d})]})},Va={primary:"bg-primary/50",neutral:"bg-neutral/50",background:"bg-background/50",foreground:"bg-foreground/50"},ar=({color:e="neutral",orientation:t="horizontal"})=>{const n=Va[e];return c("div",{className:de(n,t==="horizontal"?"h-px w-full":"w-px h-full")})},ir=({className:e="",containerClassName:t=""})=>{const{hideCategoriesNav:n,infiniteCarrousel:r,permanentGallery:s,isFullScreen:i,maxItemsShown:d}=Je(),{categories:o,aspectRatioStyle:v}=gt(),{emitAnalyticsEvent:f}=Je(),{items:L,extendMode:h,extendTransition:p,masterItemIndex:a,prevItem:E,nextItem:T,scrollToItemIndex:b,resetView:m,displayedCategoryId:M,displayedCategoryName:k}=Qe(),_=ze(()=>L[a].type,[L,a]),C=ze(()=>{if(n)return[];const P=new Array;let Z=o[0];const z=H=>o.find(ue=>ue.items.some(R=>R===H));for(let H=0;H<L.length;H++){const ue=L[H],R=z(ue);R&&R!==Z&&(P.push(H),Z=R)}return P},[o,n,L]),D=ve(null),G=X(()=>{if(!D.current)throw new Error("slider.current is null");return D.current},[]),I=ve(!1),S=ve(null),[J,O]=ye(!1),ee=X((P,Z)=>{const z=G(),H=z.clientWidth,ue=z.scrollWidth/L.length,R=(P+1/2)*ue-H/2,ne=z.scrollWidth-z.clientWidth;z.scrollTo({left:it(R,0,ne),behavior:Z})},[L.length,G]);he(()=>{const P=D.current;if(!P)return;const Z=ue=>{ue.preventDefault(),I.current=!0,S.current={x:ue.pageX-P.offsetLeft,scrollLeft:P.scrollLeft}},z=ue=>{if(!I.current)return;if(S.current===null)throw new Error("[onMouseMove] scrollStart is null");const ne=ue.pageX-P.offsetLeft-S.current.x;if(!J&&Math.abs(ne)<5)return;const W=S.current.scrollLeft-ne;O(!0),requestAnimationFrame(()=>{P.scrollLeft=W})},H=()=>{I.current&&(I.current=!1,requestAnimationFrame(()=>{O(!1)}))};return P.addEventListener("mousedown",Z),document.addEventListener("mousemove",z),document.addEventListener("mouseleave",H),document.addEventListener("mouseup",H),document.addEventListener("contextmenu",H),()=>{P.removeEventListener("mousedown",Z),document.removeEventListener("mousemove",z),document.removeEventListener("mouseleave",H),document.removeEventListener("mouseup",H),document.removeEventListener("contextmenu",H)}},[J]);const K=ve(a);he(()=>{D.current&&(ee(a,"smooth"),K.current=a)},[a,ee]),he(()=>{D.current&&ee(K.current,"instant")},[ee,i,h,p]);const j=X(P=>{f({type:"track",category_id:M,category_name:k,item_type:_,item_position:a,action_properties:{action_name:"Gallery Item Clicked",action_field:"gallery_item_clicked",action_value:P}})},[f,M,k,_,a]),ce=X(P=>{if(!J){if(j(P),r&&P===L.length-1&&a===0)E();else if(r&&P===0&&a===L.length-1)T();else if(!i&&d!==1&&P===L.length-1){const Z=Math.ceil(d),z=L.length+1,H=Math.max(0,z-Z);b(H)}else b(P);m()}},[J,j,r,L.length,a,m,E,T,i,d,b]),U=X((P,Z)=>d!==1?"after:opacity-0 hover:after:opacity-70":P===Z?"after:opacity-100":"after:opacity-0 hover:after:opacity-70",[d]);return c("div",{ref:D,className:de("relative w-full overflow-x-auto no-scrollbar",J?"cursor-grab":"cursor-grabbing",e),children:c("div",{className:de("flex h-10 w-fit gap-1 small:h-12 small:gap-2",h&&"large:h-20 large:gap-4",t),children:L.map((P,Z)=>c(Ke,{children:[C.includes(Z)&&c("div",{className:"my-2",children:c(ar,{color:s&&!i?"neutral":"background",orientation:"vertical"})}),c("div",{className:de("relative h-full overflow-hidden rounded-gallery transition-radius",!J&&"cursor-pointer","after:absolute after:inset-0 after:rounded-gallery after:border-2 after:border-primary after:transition-all",U(Z,a)),style:v,onClick:()=>ce(Z),children:c(Ua,{item:P})})]},Z))})})},sr=e=>1-Math.pow(1-e,2),Wa=({Media:e,itemIndex:t})=>{const{setItemInteraction:n}=Qe();return he(()=>{n(t,"ready")},[t,n]),e},lr=(e,t)=>Math.sqrt((e.clientX-t.clientX)**2+(e.clientY-t.clientY)**2),Ba=({onlyPreload:e,...t})=>{const{zoom:n,isZooming:r,setZoom:s}=Qe(),i=ve(null),d=ve(null),o=X(k=>{if(!d.current)throw new Error(`[${k??"getTransformElementOrThrow"}] transformElementRef.current is null`);return d.current},[]),v=ve(!1),f=ve(null),L=ve(new Map),h=ve({x:0,y:0,scale:1}),p=ve(null),a=X(k=>{const _=o("setTransformStyle"),{x:C,y:D,scale:G}={...h.current,...k},I=it(G,1,yt),S=_.clientWidth,J=_.clientHeight,O=S*I,ee=J*I,K=it(C,-(O-S),0),j=it(D,-(ee-J),0);h.current={x:K,y:j,scale:I},_.style.transform=`translate(${K}px, ${j}px) scale(${I})`},[o]),E=X((k,_)=>{const{x:C,y:D,scale:G}=h.current,{x:I,y:S,scale:J}={...h.current,...k};p.current&&(cancelAnimationFrame(p.current),p.current=null);const O=()=>{a({x:I,y:S,scale:J}),s(J)},ee=Math.abs(I-C)<1&&Math.abs(S-D)<1&&Math.abs(J-G)<.005;if(!_||ee){O();return}const K=new Date().getTime(),j=()=>{const ce=()=>{const P=new Date().getTime()-K;if(P>=_){O(),p.current=null;return}const Z=Math.min(P/_,1),z=sr(Z),H=$t(C,I,z),ue=$t(D,S,z),R=$t(G,J,z);a({x:H,y:ue,scale:R}),j()};p.current=requestAnimationFrame(ce)};j()},[a,s]),T=X((k,_)=>{let{x:C,y:D}=h.current;k.x&&(C+=k.x),k.y&&(D+=k.y),E({x:C,y:D},_)},[E]),b=X((k,_,C)=>{const D=h.current.scale,G=it(k,1,yt),I=G/D,{x:S,y:J}=h.current,{x:O,y:ee}=_,K=-S+O,j=-J+ee,ce=K*I,U=j*I,P=ce-O,Z=U-ee,z=-P,H=-Z;E({x:z,y:H,scale:G},C)},[E]),m=X(k=>{const _=o("shiftZoomFromButton"),C=_.clientWidth,D=_.clientHeight;b(k,{x:C/2,y:D/2},200)},[o,b]),M=X((k,_,C)=>{const{scale:D}=h.current;b(D+k,_,C)},[b]);return he(()=>{e||d.current&&m(n)},[e,m,n]),he(()=>{if(e||!r)return;const k=d.current;if(!k)return;const _=G=>{G.preventDefault(),G.stopPropagation(),v.current=!0,f.current={x:G.clientX,y:G.clientY}},C=G=>{if(!v.current)return;if(!f.current)throw new Error("mouseStartXY.current is null");G.stopPropagation();const I=G.clientX-f.current.x,S=G.clientY-f.current.y;T({x:I,y:S}),f.current={x:G.clientX,y:G.clientY}},D=()=>{v.current=!1};return k.addEventListener("mousedown",_),document.addEventListener("mousemove",C),document.addEventListener("mouseleave",D),document.addEventListener("mouseup",D),document.addEventListener("contextmenu",D),()=>{k.removeEventListener("mousedown",_),document.removeEventListener("mousemove",C),document.removeEventListener("mouseleave",D),document.removeEventListener("mouseup",D),document.removeEventListener("contextmenu",D)}},[r,T,e]),he(()=>{if(e)return;const k=i.current;if(!k)return;const _=C=>{const{ctrlKey:D,clientX:G,clientY:I,deltaX:S,deltaY:J}=C;if(D){if(!r&&J>=0)return;const{left:O,top:ee}=k.getBoundingClientRect(),K=G-O,j=I-ee;M(-.01*J,{x:K,y:j})}else{if(!r)return;T({x:-2*S,y:-2*J})}C.preventDefault()};return k.addEventListener("wheel",_),()=>{k.removeEventListener("wheel",_)}},[r,T,M,e]),he(()=>{const k=i.current,_=d.current;if(!k||!_)return;const C=L.current,D=S=>{for(let J=0;J<S.changedTouches.length;J++){const O=S.changedTouches[J];C.set(O.identifier,O)}},G=S=>{for(let J=0;J<S.changedTouches.length;J++){const O=S.changedTouches[J];C.delete(O.identifier)}},I=S=>{const J=S.touches.length;if(J===1){if(!r)return;S.preventDefault();const O=S.touches[0],ee=C.get(O.identifier);if(!ee)throw new Error("touchStart is null");const K=O.clientX-ee.clientX,j=O.clientY-ee.clientY;T({x:K,y:j}),C.set(O.identifier,O)}else if(J===2){S.preventDefault();const[O,ee]=S.touches,K=C.get(O.identifier),j=C.get(ee.identifier);if(!K||!j)throw new Error("initialTouch1 or initialTouch2 is null");const ce=lr(K,j),P=lr(O,ee)/ce,{left:Z,top:z}=k.getBoundingClientRect();M(P-1,{x:(O.clientX+ee.clientX)/2-Z,y:(O.clientY+ee.clientY)/2-z}),C.set(O.identifier,O),C.set(ee.identifier,ee)}};return _.addEventListener("touchstart",D),_.addEventListener("touchmove",I),_.addEventListener("touchend",G),_.addEventListener("touchcancel",G),()=>{_.removeEventListener("touchstart",D),_.removeEventListener("touchmove",I),_.removeEventListener("touchend",G),_.removeEventListener("touchcancel",G)}},[r,T,M]),c("div",{ref:i,className:`relative size-full overflow-hidden ${r?"z-zoomed-image cursor-move":""}`,children:c("div",{ref:d,className:"origin-top-left",children:c(st,{...t,imgInPlayerWidthRatio:e?1:n})})})},Ya=({className:e})=>c(qe,{className:e,customizationKey:"UI_WARNING",children:c("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[c("circle",{cx:"12",cy:"12",r:"10"}),c("line",{x1:"12",x2:"12",y1:"8",y2:"12"}),c("line",{x1:"12",x2:"12.01",y1:"16",y2:"16"})]})}),Xa=({hotspot:e,item:t,analyticsValue:n})=>{const{title:r,icon:s,description:i,position:d,detail:o,type:v}=e,{emitAnalyticsEvent:f}=Je(),{extendMode:L,setShownDetails:h,displayedCategoryId:p,displayedCategoryName:a}=Qe(),E=X(j=>{const ce=j==="click"?"Hotspot Clicked":"Hotspot Hovered",U=j==="click"?"hotspot_clicked":"hotspot_hovered";f({type:"track",category_id:p,category_name:a,item_type:t.item_type,item_position:t.item_position,action_properties:{action_name:ce,action_field:U,action_value:n}})},[f,p,a,t,n]),T=X(()=>{E("click")},[E]),b=X(()=>{E("hover")},[E]),{getIconConfig:m}=Ot(),M=s?m(s):void 0,k=!!o,_=o?.type==="image",C=!!r||!!i,D=_?v==="damage"?c(Ya,{className:"size-4"}):c(nr,{className:"size-4"}):c("div",{className:"size-1"}),G=()=>{T(),_&&h({src:o.src,title:r,text:i})},[I,S]=ye(!1),J=X(()=>{I||(S(!0),b())},[I,S,b]),O=X(()=>{I&&S(!1)},[I,S]),K=X(()=>v==="damage"?"var(--hotspot-damage-color)":"var(--hotspot-feature-color)",[v])();return c("div",{className:de("group absolute z-hotspot -translate-x-1/2 -translate-y-1/2 hover:z-hotspot-hover",k?"cursor-pointer":"cursor-help"),style:{top:`${100*e.position.y}%`,left:`${100*e.position.x}%`},onClick:G,onMouseEnter:J,onMouseLeave:O,children:[c("div",{className:"relative flex items-center justify-center rounded-full border-2 border-background bg-primary text-primary-foreground",style:{backgroundColor:K},children:[c("div",{className:"pointer-events-none absolute -z-20 size-8 animate-hotspot-ping rounded-full border-2 border-background bg-primary",style:{backgroundColor:K}}),c("div",{className:"p-1",children:M?.Icon?c("div",{className:"size-4",children:M.Icon}):D})]}),!_&&C&&c("div",{className:de("absolute -z-10 w-max max-w-40 text-pretty rounded-ui bg-background p-2 small:max-w-48",L&&"large:max-w-56",d.y<.55?"-top-1":"-bottom-1",d.x<.55?"-left-1 pl-6 small:pl-8":"-right-1 pr-4 small:pr-6","pointer-events-none opacity-0 transition-opacity duration-200 group-hover:pointer-events-auto group-hover:opacity-100"),children:c("div",{className:"space-y-1 text-pretty",children:[r&&c("div",{className:"text-sm font-semibold small:text-base small:font-bold",children:r}),i&&c("div",{className:"text-xs text-foreground/65 small:text-sm",children:i})]})})]})},Ga=({hotspot:e,item:t})=>{const{detail:n,title:r,description:s,position:i}=e,d=ze(()=>r||s?{...r?{title:r}:{},...s?{description:s}:{}}:void 0,[r,s]),o=ze(()=>d||i?{...d?{text:d}:{},...i?{position:i}:{}}:void 0,[d,i]),v=ze(()=>({...o?{hotspot:o}:{},...n?{detail:n}:{}}),[o,n]),f=c(Xa,{hotspot:e,item:t,analyticsValue:v});switch(n?.type){case"link":case"pdf":return c("a",{href:n.src,target:"_blank",rel:"noreferrer",children:f});default:return f}},cr=({hotspots:e,itemIndex:t,className:n,onLoad:r,...s})=>{const{isShowingDetails:i,currentItemHotspotsVisible:d,setItemInteraction:o}=Qe();return c("div",{className:de("relative size-full overflow-hidden",n),children:c("div",{className:de("size-full duration-details",i?"scale-105":"scale-100"),children:[c(Ba,{className:"size-full object-cover",onLoad:v=>{t!==void 0&&t>=0&&o(t,"ready"),r?.(v)},...s}),d&&e?.map((v,f)=>c(Ga,{hotspot:v,item:{item_type:"image",item_position:t}},f))]})})};window.libpannellum=function(e,t,n){function r(L){var h=t.createElement("canvas");h.style.width=h.style.height="100%",L.appendChild(h);var p,a,E,T,b,m,M,k,_,C,D,G,I,S,J,O;this.init=function(g,x,re,Y,V,w,te,ae){if(x===n&&(x="equirectangular"),x!="equirectangular"&&x!="cubemap"&&x!="multires")throw console.log("Error: invalid image type specified!"),{type:"config error"};if(C=x,_=g,D=re,O=ae||{},p){if(E&&(a.detachShader(p,E),a.deleteShader(E)),T&&(a.detachShader(p,T),a.deleteShader(T)),a.bindBuffer(a.ARRAY_BUFFER,null),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,null),p.texture&&a.deleteTexture(p.texture),p.nodeCache)for(var ge=0;ge<p.nodeCache.length;ge++)a.deleteTexture(p.nodeCache[ge].texture);a.deleteProgram(p),p=n}k=n;var ie,ke=!1,Ie;if(C=="cubemap")for(ie=0;ie<6;ie++)_[ie].width>0?(Ie===n&&(Ie=_[ie].width),Ie!=_[ie].width&&console.log("Cube faces have inconsistent widths: "+Ie+" vs. "+_[ie].width)):ke=!0;function Xe(se){if(ke){var A=se*se*4,fe=new Uint8ClampedArray(A),xe=ae.backgroundColor?ae.backgroundColor:[0,0,0];xe[0]*=255,xe[1]*=255,xe[2]*=255;for(var _e=0;_e<A;_e++)fe[_e++]=xe[0],fe[_e++]=xe[1],fe[_e++]=xe[2];var Ne=new ImageData(fe,se,se);for(ie=0;ie<6;ie++)_[ie].width==0&&(_[ie]=Ne)}}if(C=="cubemap"&&Ie&Ie-1&&(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 9_/)||navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 10_/)||navigator.userAgent.match(/Trident.*rv[ :]*11\./))||(a||(a=h.getContext("experimental-webgl",{alpha:!1,depth:!1})),a&&a.getError()==1286&&He()),!a&&(C=="multires"&&_.hasOwnProperty("fallbackPath")||C=="cubemap")&&("WebkitAppearance"in t.documentElement.style||navigator.userAgent.match(/Trident.*rv[ :]*11\./)||navigator.appVersion.indexOf("MSIE 10")!==-1)){m&&L.removeChild(m),m=t.createElement("div"),m.className="pnlm-world";var We;_.basePath?We=_.basePath+_.fallbackPath:We=_.fallbackPath;var Be=["f","r","b","l","u","d"],Te=0,Ce=function(){var A=t.createElement("canvas");A.className="pnlm-face pnlm-"+Be[this.side]+"face",m.appendChild(A);var fe=A.getContext("2d");A.style.width=this.width+4+"px",A.style.height=this.height+4+"px",A.width=this.width+4,A.height=this.height+4,fe.drawImage(this,2,2);var xe=fe.getImageData(0,0,A.width,A.height),_e=xe.data,Ne,le;for(Ne=2;Ne<A.width-2;Ne++)for(le=0;le<4;le++)_e[(Ne+A.width)*4+le]=_e[(Ne+A.width*2)*4+le],_e[(Ne+A.width*(A.height-2))*4+le]=_e[(Ne+A.width*(A.height-3))*4+le];for(Ne=2;Ne<A.height-2;Ne++)for(le=0;le<4;le++)_e[(Ne*A.width+1)*4+le]=_e[(Ne*A.width+2)*4+le],_e[((Ne+1)*A.width-2)*4+le]=_e[((Ne+1)*A.width-3)*4+le];for(le=0;le<4;le++)_e[(A.width+1)*4+le]=_e[(A.width*2+2)*4+le],_e[(A.width*2-2)*4+le]=_e[(A.width*3-3)*4+le],_e[(A.width*(A.height-2)+1)*4+le]=_e[(A.width*(A.height-3)+2)*4+le],_e[(A.width*(A.height-1)-2)*4+le]=_e[(A.width*(A.height-2)-3)*4+le];for(Ne=1;Ne<A.width-1;Ne++)for(le=0;le<4;le++)_e[Ne*4+le]=_e[(Ne+A.width)*4+le],_e[(Ne+A.width*(A.height-1))*4+le]=_e[(Ne+A.width*(A.height-2))*4+le];for(Ne=1;Ne<A.height-1;Ne++)for(le=0;le<4;le++)_e[Ne*A.width*4+le]=_e[(Ne*A.width+1)*4+le],_e[((Ne+1)*A.width-1)*4+le]=_e[((Ne+1)*A.width-2)*4+le];for(le=0;le<4;le++)_e[le]=_e[(A.width+1)*4+le],_e[(A.width-1)*4+le]=_e[(A.width*2-2)*4+le],_e[A.width*(A.height-1)*4+le]=_e[(A.width*(A.height-2)+1)*4+le],_e[(A.width*A.height-1)*4+le]=_e[(A.width*(A.height-1)-2)*4+le];fe.putImageData(xe,0,0),Ae.call(this)},Ae=function(){this.width>0?(b===n&&(b=this.width),b!=this.width&&console.log("Fallback faces have inconsistent widths: "+b+" vs. "+this.width)):ke=!0,Te++,Te==6&&(b=this.width,L.appendChild(m),te())};for(ke=!1,ie=0;ie<6;ie++){var Ye=new Image;Ye.crossOrigin=O.crossOrigin?O.crossOrigin:"anonymous",Ye.side=ie,Ye.onload=Ce,Ye.onerror=Ae,C=="multires"?Ye.src=encodeURI(We.replace("%s",Be[ie])+"."+_.extension):Ye.src=encodeURI(_[ie].src)}Xe(b);return}else if(!a)throw console.log("Error: no WebGL support detected!"),{type:"no webgl"};C=="cubemap"&&Xe(Ie),_.basePath?_.fullpath=_.basePath+_.path:_.fullpath=_.path,_.invTileResolution=1/_.tileResolution;var De=P();for(M=[],ie=0;ie<6;ie++)M[ie]=De.slice(ie*12,ie*12+12),De=P();var Se=0,Ge=0;if(C=="equirectangular"?(Se=Math.max(_.width,_.height),Ge=a.getParameter(a.MAX_TEXTURE_SIZE)):C=="cubemap"&&(Se=Ie,Ge=a.getParameter(a.MAX_CUBE_MAP_TEXTURE_SIZE)),Se>Ge)throw console.log("Error: The image is too big; it's "+Se+"px wide, but this device's maximum supported size is "+Ge+"px."),{type:"webgl size error",width:Se,maxWidth:Ge};ae!==n&&(ae.horizonPitch!==n||ae.horizonRoll!==n)&&(k=[ae.horizonPitch==n?0:ae.horizonPitch,ae.horizonRoll==n?0:ae.horizonRoll]);var Fe=a.TEXTURE_2D;a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),E=a.createShader(a.VERTEX_SHADER);var et=s;C=="multires"&&(et=i),a.shaderSource(E,et),a.compileShader(E),T=a.createShader(a.FRAGMENT_SHADER);var Ze=v;C=="cubemap"?(Fe=a.TEXTURE_CUBE_MAP,Ze=o):C=="multires"&&(Ze=f),a.shaderSource(T,Ze),a.compileShader(T),p=a.createProgram(),a.attachShader(p,E),a.attachShader(p,T),a.linkProgram(p),a.getShaderParameter(E,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(E)),a.getShaderParameter(T,a.COMPILE_STATUS)||console.log(a.getShaderInfoLog(T)),a.getProgramParameter(p,a.LINK_STATUS)||console.log(a.getProgramInfoLog(p)),a.useProgram(p),p.drawInProgress=!1;var Re=ae.backgroundColor?ae.backgroundColor:[0,0,0];a.clearColor(Re[0],Re[1],Re[2],1),a.clear(a.COLOR_BUFFER_BIT),p.texCoordLocation=a.getAttribLocation(p,"a_texCoord"),a.enableVertexAttribArray(p.texCoordLocation),C!="multires"?(G||(G=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,G),a.bufferData(a.ARRAY_BUFFER,new Float32Array([-1,1,1,1,1,-1,-1,1,1,-1,-1,-1]),a.STATIC_DRAW),a.vertexAttribPointer(p.texCoordLocation,2,a.FLOAT,!1,0,0),p.aspectRatio=a.getUniformLocation(p,"u_aspectRatio"),a.uniform1f(p.aspectRatio,a.drawingBufferWidth/a.drawingBufferHeight),p.psi=a.getUniformLocation(p,"u_psi"),p.theta=a.getUniformLocation(p,"u_theta"),p.f=a.getUniformLocation(p,"u_f"),p.h=a.getUniformLocation(p,"u_h"),p.v=a.getUniformLocation(p,"u_v"),p.vo=a.getUniformLocation(p,"u_vo"),p.rot=a.getUniformLocation(p,"u_rot"),a.uniform1f(p.h,Y/(Math.PI*2)),a.uniform1f(p.v,V/Math.PI),a.uniform1f(p.vo,w/Math.PI*2),C=="equirectangular"&&(p.backgroundColor=a.getUniformLocation(p,"u_backgroundColor"),a.uniform4fv(p.backgroundColor,Re.concat([1]))),p.texture=a.createTexture(),a.bindTexture(Fe,p.texture),C=="cubemap"?(a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_[1]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_X,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_[3]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_[4]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Y,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_[5]),a.texImage2D(a.TEXTURE_CUBE_MAP_POSITIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_[0]),a.texImage2D(a.TEXTURE_CUBE_MAP_NEGATIVE_Z,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_[2])):a.texImage2D(Fe,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_),a.texParameteri(Fe,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(Fe,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texParameteri(Fe,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(Fe,a.TEXTURE_MAG_FILTER,a.LINEAR)):(p.vertPosLocation=a.getAttribLocation(p,"a_vertCoord"),a.enableVertexAttribArray(p.vertPosLocation),I||(I=a.createBuffer()),S||(S=a.createBuffer()),J||(J=a.createBuffer()),a.bindBuffer(a.ARRAY_BUFFER,S),a.bufferData(a.ARRAY_BUFFER,new Float32Array([0,0,1,0,1,1,0,1]),a.STATIC_DRAW),a.bindBuffer(a.ELEMENT_ARRAY_BUFFER,J),a.bufferData(a.ELEMENT_ARRAY_BUFFER,new Uint16Array([0,1,2,0,2,3]),a.STATIC_DRAW),p.perspUniform=a.getUniformLocation(p,"u_perspMatrix"),p.cubeUniform=a.getUniformLocation(p,"u_cubeMatrix"),p.level=-1,p.currentNodes=[],p.nodeCache=[],p.nodeCacheTimestamp=0);var $=a.getError();if($!==0)throw console.log("Error: Something went wrong with WebGL!",$),{type:"webgl error"};te()},this.destroy=function(){if(L!==n&&(h!==n&&L.contains(h)&&L.removeChild(h),m!==n&&L.contains(m)&&L.removeChild(m)),a){var g=a.getExtension("WEBGL_lose_context");g&&g.loseContext()}},this.resize=function(){var g=e.devicePixelRatio||1;h.width=h.clientWidth*g,h.height=h.clientHeight*g,a&&(a.getError()==1286&&He(),a.viewport(0,0,a.drawingBufferWidth,a.drawingBufferHeight),C!="multires"&&a.uniform1f(p.aspectRatio,h.clientWidth/h.clientHeight))},this.resize(),this.setPose=function(g,x){k=[g,x]},this.render=function(g,x,re,Y){var V,w,te,ae=0;if(Y===n&&(Y={}),Y.roll&&(ae=Y.roll),k!==n){var ge=k[0],ie=k[1],ke=g,Ie=x,Xe=Math.cos(ie)*Math.sin(g)*Math.sin(ge)+Math.cos(g)*(Math.cos(ge)*Math.cos(x)+Math.sin(ie)*Math.sin(ge)*Math.sin(x)),We=-Math.sin(g)*Math.sin(ie)+Math.cos(g)*Math.cos(ie)*Math.sin(x),Be=Math.cos(ie)*Math.cos(ge)*Math.sin(g)+Math.cos(g)*(-Math.cos(x)*Math.sin(ge)+Math.cos(ge)*Math.sin(ie)*Math.sin(x));g=Math.asin(Math.max(Math.min(Be,1),-1)),x=Math.atan2(We,Xe);var Te=[Math.cos(ke)*(Math.sin(ie)*Math.sin(ge)*Math.cos(Ie)-Math.cos(ge)*Math.sin(Ie)),Math.cos(ke)*Math.cos(ie)*Math.cos(Ie),Math.cos(ke)*(Math.cos(ge)*Math.sin(ie)*Math.cos(Ie)+Math.sin(Ie)*Math.sin(ge))],Ce=[-Math.cos(g)*Math.sin(x),Math.cos(g)*Math.cos(x)],Ae=Math.acos(Math.max(Math.min((Te[0]*Ce[0]+Te[1]*Ce[1])/(Math.sqrt(Te[0]*Te[0]+Te[1]*Te[1]+Te[2]*Te[2])*Math.sqrt(Ce[0]*Ce[0]+Ce[1]*Ce[1])),1),-1));Te[2]<0&&(Ae=2*Math.PI-Ae),ae+=Ae}if(!a&&(C=="multires"||C=="cubemap")){te=b/2;var Ye={f:"translate3d(-"+(te+2)+"px, -"+(te+2)+"px, -"+te+"px)",b:"translate3d("+(te+2)+"px, -"+(te+2)+"px, "+te+"px) rotateX(180deg) rotateZ(180deg)",u:"translate3d(-"+(te+2)+"px, -"+te+"px, "+(te+2)+"px) rotateX(270deg)",d:"translate3d(-"+(te+2)+"px, "+te+"px, -"+(te+2)+"px) rotateX(90deg)",l:"translate3d(-"+te+"px, -"+(te+2)+"px, "+(te+2)+"px) rotateX(180deg) rotateY(90deg) rotateZ(180deg)",r:"translate3d("+te+"px, -"+(te+2)+"px, -"+(te+2)+"px) rotateY(270deg)"};V=1/Math.tan(re/2);var De=V*h.clientWidth/2+"px",Se="perspective("+De+") translateZ("+De+") rotateX("+g+"rad) rotateY("+x+"rad) ",Ge=Object.keys(Ye);for(w=0;w<6;w++){var Fe=m.querySelector(".pnlm-"+Ge[w]+"face");Fe&&(Fe.style.webkitTransform=Se+Ye[Ge[w]],Fe.style.transform=Se+Ye[Ge[w]])}return}if(C!="multires"){var et=2*Math.atan(Math.tan(re*.5)/(a.drawingBufferWidth/a.drawingBufferHeight));V=1/Math.tan(et*.5),a.uniform1f(p.psi,x),a.uniform1f(p.theta,g),a.uniform1f(p.rot,ae),a.uniform1f(p.f,V),D===!0&&C=="equirectangular"&&(a.bindTexture(a.TEXTURE_2D,p.texture),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,_)),a.drawArrays(a.TRIANGLES,0,6)}else{var Ze=R(re,a.drawingBufferWidth/a.drawingBufferHeight,.1,100);Ee(re);var Re=Z();Re=z(Re,-ae,"z"),Re=z(Re,-g,"x"),Re=z(Re,x,"y"),Re=H(Re),a.uniformMatrix4fv(p.perspUniform,!1,new Float32Array(ue(Ze))),a.uniformMatrix4fv(p.cubeUniform,!1,new Float32Array(ue(Re)));var $=Q(Ze,Re);if(p.nodeCache.sort(ee),p.nodeCache.length>200&&p.nodeCache.length>p.currentNodes.length+50)for(var se=p.nodeCache.splice(200,p.nodeCache.length-200),w=0;w<se.length;w++)a.deleteTexture(se[w].texture);p.currentNodes=[];var A=["f","b","u","d","l","r"];for(te=0;te<6;te++){var fe=new ce(M[te],A[te],1,0,0,_.fullpath);U($,fe,g,x)}for(p.currentNodes.sort(K),w=W.length-1;w>=0;w--)p.currentNodes.indexOf(W[w].node)===-1&&(W[w].node.textureLoad=!1,W.splice(w,1));if(W.length===0)for(w=0;w<p.currentNodes.length;w++){var xe=p.currentNodes[w];if(!xe.texture&&!xe.textureLoad){xe.textureLoad=!0,setTimeout(N,0,xe);break}}j()}if(Y.returnImage!==n)return h.toDataURL("image/png")},this.isLoading=function(){if(a&&C=="multires"){for(var g=0;g<p.currentNodes.length;g++)if(!p.currentNodes[g].textureLoaded)return!0}return!1},this.getCanvas=function(){return h};function ee(g,x){return g.level==1&&x.level!=1?-1:x.level==1&&g.level!=1?1:x.timestamp-g.timestamp}function K(g,x){return g.level!=x.level?g.level-x.level:g.diff-x.diff}function j(){if(!p.drawInProgress){p.drawInProgress=!0,a.clear(a.COLOR_BUFFER_BIT);for(var g=0;g<p.currentNodes.length;g++)p.currentNodes[g].textureLoaded>1&&(a.bindBuffer(a.ARRAY_BUFFER,I),a.bufferData(a.ARRAY_BUFFER,new Float32Array(p.currentNodes[g].vertices),a.STATIC_DRAW),a.vertexAttribPointer(p.vertPosLocation,3,a.FLOAT,!1,0,0),a.bindBuffer(a.ARRAY_BUFFER,S),a.vertexAttribPointer(p.texCoordLocation,2,a.FLOAT,!1,0,0),a.bindTexture(a.TEXTURE_2D,p.currentNodes[g].texture),a.drawElements(a.TRIANGLES,6,a.UNSIGNED_SHORT,0));p.drawInProgress=!1}}function ce(g,x,re,Y,V,w){this.vertices=g,this.side=x,this.level=re,this.x=Y,this.y=V,this.path=w.replace("%s",x).replace("%l",re).replace("%x",Y).replace("%y",V)}function U(g,x,re,Y,V){if(je(g,x.vertices)){var w=x.vertices,te=w[0]+w[3]+w[6]+w[9],ae=w[1]+w[4]+w[7]+w[10],ge=w[2]+w[5]+w[8]+w[11],ie=Math.sqrt(te*te+ae*ae+ge*ge),ke=Math.asin(ge/ie),Ie=Math.atan2(ae,te),Xe=Ie-Y;Xe+=Xe>Math.PI?-2*Math.PI:Xe<-Math.PI?2*Math.PI:0,Xe=Math.abs(Xe),x.diff=Math.acos(Math.sin(re)*Math.sin(ke)+Math.cos(re)*Math.cos(ke)*Math.cos(Xe));for(var We=!1,Be=0;Be<p.nodeCache.length;Be++)if(p.nodeCache[Be].path==x.path){We=!0,p.nodeCache[Be].timestamp=p.nodeCacheTimestamp++,p.nodeCache[Be].diff=x.diff,p.currentNodes.push(p.nodeCache[Be]);break}if(We||(x.timestamp=p.nodeCacheTimestamp++,p.currentNodes.push(x),p.nodeCache.push(x)),x.level<p.level){var Te=_.cubeResolution*Math.pow(2,x.level-_.maxLevel),Ce=Math.ceil(Te*_.invTileResolution)-1,Ae=Te%_.tileResolution*2,Ye=Te*2%_.tileResolution;Ye===0&&(Ye=_.tileResolution),Ae===0&&(Ae=_.tileResolution*2);var De=.5;(x.x==Ce||x.y==Ce)&&(De=1-_.tileResolution/(_.tileResolution+Ye));var Se=1-De,Ge=[],Fe,et,Ze=De,Re=De,$=De,se=Se,A=Se,fe=Se;Ye<_.tileResolution&&(x.x==Ce&&x.y!=Ce?(Re=.5,A=.5,(x.side=="d"||x.side=="u")&&($=.5,fe=.5)):x.x!=Ce&&x.y==Ce&&(Ze=.5,se=.5,(x.side=="l"||x.side=="r")&&($=.5,fe=.5))),Ae<=_.tileResolution&&(x.x==Ce&&(Ze=0,se=1,(x.side=="l"||x.side=="r")&&($=0,fe=1)),x.y==Ce&&(Re=0,A=1,(x.side=="d"||x.side=="u")&&($=0,fe=1))),Fe=[w[0],w[1],w[2],w[0]*Ze+w[3]*se,w[1]*De+w[4]*Se,w[2]*$+w[5]*fe,w[0]*Ze+w[6]*se,w[1]*Re+w[7]*A,w[2]*$+w[8]*fe,w[0]*De+w[9]*Se,w[1]*Re+w[10]*A,w[2]*$+w[11]*fe],et=new ce(Fe,x.side,x.level+1,x.x*2,x.y*2,_.fullpath),Ge.push(et),x.x==Ce&&Ae<=_.tileResolution||(Fe=[w[0]*Ze+w[3]*se,w[1]*De+w[4]*Se,w[2]*$+w[5]*fe,w[3],w[4],w[5],w[3]*De+w[6]*Se,w[4]*Re+w[7]*A,w[5]*$+w[8]*fe,w[0]*Ze+w[6]*se,w[1]*Re+w[7]*A,w[2]*$+w[8]*fe],et=new ce(Fe,x.side,x.level+1,x.x*2+1,x.y*2,_.fullpath),Ge.push(et)),!(x.x==Ce&&Ae<=_.tileResolution)&&!(x.y==Ce&&Ae<=_.tileResolution)&&(Fe=[w[0]*Ze+w[6]*se,w[1]*Re+w[7]*A,w[2]*$+w[8]*fe,w[3]*De+w[6]*Se,w[4]*Re+w[7]*A,w[5]*$+w[8]*fe,w[6],w[7],w[8],w[9]*Ze+w[6]*se,w[10]*De+w[7]*Se,w[11]*$+w[8]*fe],et=new ce(Fe,x.side,x.level+1,x.x*2+1,x.y*2+1,_.fullpath),Ge.push(et)),x.y==Ce&&Ae<=_.tileResolution||(Fe=[w[0]*De+w[9]*Se,w[1]*Re+w[10]*A,w[2]*$+w[11]*fe,w[0]*Ze+w[6]*se,w[1]*Re+w[7]*A,w[2]*$+w[8]*fe,w[9]*Ze+w[6]*se,w[10]*De+w[7]*Se,w[11]*$+w[8]*fe,w[9],w[10],w[11]],et=new ce(Fe,x.side,x.level+1,x.x*2,x.y*2+1,_.fullpath),Ge.push(et));for(var xe=0;xe<Ge.length;xe++)U(g,Ge[xe],re,Y)}}}function P(){return[-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,-1,-1,1,1,-1,1,-1,1,1,1,1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1,1,-1,1,-1,-1,1,-1,1,1,-1,1,-1,-1,-1,-1,-1,-1,1,1,1,-1,1,1,1,1,-1,1,1,-1,-1]}function Z(){return[1,0,0,0,1,0,0,0,1]}function z(g,x,re){var Y=Math.sin(x),V=Math.cos(x);if(re=="x")return[g[0],V*g[1]+Y*g[2],V*g[2]-Y*g[1],g[3],V*g[4]+Y*g[5],V*g[5]-Y*g[4],g[6],V*g[7]+Y*g[8],V*g[8]-Y*g[7]];if(re=="y")return[V*g[0]-Y*g[2],g[1],V*g[2]+Y*g[0],V*g[3]-Y*g[5],g[4],V*g[5]+Y*g[3],V*g[6]-Y*g[8],g[7],V*g[8]+Y*g[6]];if(re=="z")return[V*g[0]+Y*g[1],V*g[1]-Y*g[0],g[2],V*g[3]+Y*g[4],V*g[4]-Y*g[3],g[5],V*g[6]+Y*g[7],V*g[7]-Y*g[6],g[8]]}function H(g){return[g[0],g[1],g[2],0,g[3],g[4],g[5],0,g[6],g[7],g[8],0,0,0,0,1]}function ue(g){return[g[0],g[4],g[8],g[12],g[1],g[5],g[9],g[13],g[2],g[6],g[10],g[14],g[3],g[7],g[11],g[15]]}function R(g,x,re,Y){var V=2*Math.atan(Math.tan(g/2)*a.drawingBufferHeight/a.drawingBufferWidth),w=1/Math.tan(V/2);return[w/x,0,0,0,0,w,0,0,0,0,(Y+re)/(re-Y),2*Y*re/(re-Y),0,0,-1,0]}function ne(g,x){a.bindTexture(a.TEXTURE_2D,x),a.texImage2D(a.TEXTURE_2D,0,a.RGB,a.RGB,a.UNSIGNED_BYTE,g),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.bindTexture(a.TEXTURE_2D,null)}var W=[],oe=function(){var g=4,x={},re;function Y(){var ae=this;this.texture=this.callback=null,this.image=new Image,this.image.crossOrigin=re||"anonymous";var ge=function(){ae.image.width>0&&ae.image.height>0?(ne(ae.image,ae.texture),ae.callback(ae.texture,!0)):ae.callback(ae.texture,!1),w(ae)};this.image.addEventListener("load",ge),this.image.addEventListener("error",ge)}Y.prototype.loadTexture=function(ae,ge,ie){this.texture=ge,this.callback=ie,this.image.src=ae};function V(ae,ge,ie,ke){this.node=ae,this.src=ge,this.texture=ie,this.callback=ke}function w(ae){if(W.length){var ge=W.shift();ae.loadTexture(ge.src,ge.texture,ge.callback)}else x[g++]=ae}for(var te=0;te<g;te++)x[te]=new Y;return function(ae,ge,ie,ke){re=ke;var Ie=a.createTexture();return g?x[--g].loadTexture(ge,Ie,ie):W.push(new V(ae,ge,Ie,ie)),Ie}}();function N(g){oe(g,encodeURI(g.path+"."+_.extension),function(x,re){g.texture=x,g.textureLoaded=re?2:1},O.crossOrigin)}function Ee(g){for(var x=1;x<_.maxLevel&&a.drawingBufferWidth>_.tileResolution*Math.pow(2,x-1)*Math.tan(g/2)*.707;)x++;p.level=x}function Q(g,x){return[g[0]*x[0],g[0]*x[1],g[0]*x[2],0,g[5]*x[4],g[5]*x[5],g[5]*x[6],0,g[10]*x[8],g[10]*x[9],g[10]*x[10],g[11],-x[8],-x[9],-x[10],0]}function Me(g,x){return[g[0]*x[0]+g[1]*x[1]+g[2]*x[2],g[4]*x[0]+g[5]*x[1]+g[6]*x[2],g[11]+g[8]*x[0]+g[9]*x[1]+g[10]*x[2],1/(g[12]*x[0]+g[13]*x[1]+g[14]*x[2])]}function Oe(g,x){var re=Me(g,x),Y=re[0]*re[3],V=re[1]*re[3],w=re[2]*re[3],te=[0,0,0];return Y<-1&&(te[0]=-1),Y>1&&(te[0]=1),V<-1&&(te[1]=-1),V>1&&(te[1]=1),(w<-1||w>1)&&(te[2]=1),te}function je(g,x){var re=Oe(g,x.slice(0,3)),Y=Oe(g,x.slice(3,6)),V=Oe(g,x.slice(6,9)),w=Oe(g,x.slice(9,12)),te=re[0]+Y[0]+V[0]+w[0];if(te==-4||te==4)return!1;var ae=re[1]+Y[1]+V[1]+w[1];if(ae==-4||ae==4)return!1;var ge=re[2]+Y[2]+V[2]+w[2];return ge!=4}function He(){console.log("Reducing canvas size due to error 1286!"),h.width=Math.round(h.width/2),h.height=Math.round(h.height/2)}}var s=["attribute vec2 a_texCoord;","varying vec2 v_texCoord;","void main() {","gl_Position = vec4(a_texCoord, 0.0, 1.0);","v_texCoord = a_texCoord;","}"].join(""),i=["attribute vec3 a_vertCoord;","attribute vec2 a_texCoord;","uniform mat4 u_cubeMatrix;","uniform mat4 u_perspMatrix;","varying mediump vec2 v_texCoord;","void main(void) {","gl_Position = u_perspMatrix * u_cubeMatrix * vec4(a_vertCoord, 1.0);","v_texCoord = a_texCoord;","}"].join(""),d=["precision mediump float;","uniform float u_aspectRatio;","uniform float u_psi;","uniform float u_theta;","uniform float u_f;","uniform float u_h;","uniform float u_v;","uniform float u_vo;","uniform float u_rot;","const float PI = 3.14159265358979323846264;","uniform sampler2D u_image;","uniform samplerCube u_imageCube;","varying vec2 v_texCoord;","uniform vec4 u_backgroundColor;","void main() {","float x = v_texCoord.x * u_aspectRatio;","float y = v_texCoord.y;","float sinrot = sin(u_rot);","float cosrot = cos(u_rot);","float rot_x = x * cosrot - y * sinrot;","float rot_y = x * sinrot + y * cosrot;","float sintheta = sin(u_theta);","float costheta = cos(u_theta);","float a = u_f * costheta - rot_y * sintheta;","float root = sqrt(rot_x * rot_x + a * a);","float lambda = atan(rot_x / root, a / root) + u_psi;","float phi = atan((rot_y * costheta + u_f * sintheta) / root);"].join(`
|
|
2
2
|
`),o=d+["float cosphi = cos(phi);","gl_FragColor = textureCube(u_imageCube, vec3(cosphi*sin(lambda), sin(phi), cosphi*cos(lambda)));","}"].join(`
|
|
3
3
|
`),v=d+["lambda = mod(lambda + PI, PI * 2.0) - PI;","vec2 coord = vec2(lambda / PI, phi / (PI / 2.0));","if(coord.x < -u_h || coord.x > u_h || coord.y < -u_v + u_vo || coord.y > u_v + u_vo)","gl_FragColor = u_backgroundColor;","else","gl_FragColor = texture2D(u_image, vec2((coord.x + u_h) / (u_h * 2.0), (-coord.y + u_v + u_vo) / (u_v * 2.0)));","}"].join(`
|
|
4
|
-
`),h=["varying mediump vec2 v_texCoord;","uniform sampler2D u_sampler;","void main(void) {","gl_FragColor = texture2D(u_sampler, v_texCoord);","}"].join("");return{renderer:function(f,p,a,E){return new r(f)}}}(window,document),window.pannellum=function(e,t,n){function r(s,i){var d=this,o,v,h,k=!1,f=Date.now(),p=0,a=0,E=-1,T=0,w=0,g=new Array(10),M=!1,C,m=!1,L=!1,S,Q,I={yaw:0,pitch:0,hfov:0},q=!1,K=!1,H=0,oe,N=0,U,me,O={},A={},ee=[],P=!1,Z=!1,te={hfov:100,minHfov:50,maxHfov:120,pitch:0,minPitch:n,maxPitch:n,yaw:0,minYaw:-180,maxYaw:180,roll:0,haov:360,vaov:180,vOffset:0,autoRotate:!1,autoRotateInactivityDelay:-1,autoRotateStopDelay:n,type:"equirectangular",northOffset:0,showFullscreenCtrl:!0,dynamic:!1,doubleClickZoom:!0,keyboardZoom:!0,mouseZoom:!0,showZoomCtrl:!0,autoLoad:!1,showControls:!0,orientationOnByDefault:!1,hotSpotDebug:!1,backgroundColor:[0,0,0],avoidShowingBackground:!1,animationTimingFunction:R,draggable:!0,disableKeyboardCtrl:!1,crossOrigin:"anonymous",touchPanSpeedCoeffFactor:1,capturedKeyNumbers:[16,17,27,37,38,39,40,61,65,68,83,87,107,109,173,187,189]};te.strings={loadButtonLabel:"Click to<br>Load<br>Panorama",loadingLabel:"Loading...",bylineLabel:"by %s",noPanoramaError:"No panorama image was specified.",fileAccessError:"The file %s could not be accessed.",malformedURLError:"There is something wrong with the panorama URL.",iOS8WebGLError:"Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding).",genericWebGLError:"Your browser does not have the necessary WebGL support to display this panorama.",textureSizeError:"This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",unknownError:"Unknown error. Check developer console."},s=typeof s=="string"?t.getElementById(s):s,s.classList.add("pnlm-container"),s.tabIndex=0;var D=t.createElement("div");D.className="pnlm-ui",s.appendChild(D);var $=t.createElement("div");$.className="pnlm-render-container",s.appendChild($);var J=t.createElement("div");J.className="pnlm-dragfix",D.appendChild(J);var ue=t.createElement("span");ue.className="pnlm-about-msg",ue.innerHTML='<a href="https://pannellum.org/" target="_blank">Pannellum</a>',D.appendChild(ue),J.addEventListener("contextmenu",ae);var z={},ye=t.createElement("div");ye.className="pnlm-sprite pnlm-hot-spot-debug-indicator",D.appendChild(ye),z.container=t.createElement("div"),z.container.className="pnlm-panorama-info",z.title=t.createElement("div"),z.title.className="pnlm-title-box",z.container.appendChild(z.title),z.author=t.createElement("div"),z.author.className="pnlm-author-box",z.container.appendChild(z.author),D.appendChild(z.container),z.load={},z.load.box=t.createElement("div"),z.load.box.className="pnlm-load-box",z.load.boxp=t.createElement("p"),z.load.box.appendChild(z.load.boxp),z.load.lbox=t.createElement("div"),z.load.lbox.className="pnlm-lbox",z.load.lbox.innerHTML='<div class="pnlm-loading"></div>',z.load.box.appendChild(z.load.lbox),z.load.lbar=t.createElement("div"),z.load.lbar.className="pnlm-lbar",z.load.lbarFill=t.createElement("div"),z.load.lbarFill.className="pnlm-lbar-fill",z.load.lbar.appendChild(z.load.lbarFill),z.load.box.appendChild(z.load.lbar),z.load.msg=t.createElement("p"),z.load.msg.className="pnlm-lmsg",z.load.box.appendChild(z.load.msg),D.appendChild(z.load.box),z.errorMsg=t.createElement("div"),z.errorMsg.className="pnlm-error-msg pnlm-info-box",D.appendChild(z.errorMsg);var ne={};ne.container=t.createElement("div"),ne.container.className="pnlm-controls-container",D.appendChild(ne.container),ne.load=t.createElement("div"),ne.load.className="pnlm-load-button",ne.load.addEventListener("click",function(){Pn(),xr()}),D.appendChild(ne.load),ne.zoom=t.createElement("div"),ne.zoom.className="pnlm-zoom-controls pnlm-controls",ne.zoomIn=t.createElement("div"),ne.zoomIn.className="pnlm-zoom-in pnlm-sprite pnlm-control",ne.zoomIn.addEventListener("click",Is),ne.zoom.appendChild(ne.zoomIn),ne.zoomOut=t.createElement("div"),ne.zoomOut.className="pnlm-zoom-out pnlm-sprite pnlm-control",ne.zoomOut.addEventListener("click",Ts),ne.zoom.appendChild(ne.zoomOut),ne.container.appendChild(ne.zoom),ne.fullscreen=t.createElement("div"),ne.fullscreen.addEventListener("click",Rn),ne.fullscreen.className="pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control",(t.fullscreenEnabled||t.mozFullScreenEnabled||t.webkitFullscreenEnabled||t.msFullscreenEnabled)&&ne.container.appendChild(ne.fullscreen),ne.orientation=t.createElement("div"),ne.orientation.addEventListener("click",function(l){K?Ft():rn()}),ne.orientation.addEventListener("mousedown",function(l){l.stopPropagation()}),ne.orientation.addEventListener("touchstart",function(l){l.stopPropagation()}),ne.orientation.addEventListener("pointerdown",function(l){l.stopPropagation()}),ne.orientation.className="pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control";var Ce,He=!1;function je(l){e.removeEventListener("deviceorientation",je),l&&l.alpha!==null&&l.beta!==null&&l.gamma!==null?(ne.container.appendChild(ne.orientation),Ce=!0,He&&rn()):Ce=!1}e.DeviceOrientationEvent?e.addEventListener("deviceorientation",je):Ce=!1;var Ze=t.createElement("div");Ze.className="pnlm-compass pnlm-controls pnlm-control",D.appendChild(Ze),i.firstScene?nn(i.firstScene):i.default&&i.default.firstScene?nn(i.default.firstScene):nn(null),Pn(!0);function _(){var l=t.createElement("div");if(l.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",l.getElementsByTagName("i").length==1){W();return}U=o.hfov,me=o.pitch;var u,y;if(o.type=="cubemap"){for(S=[],u=0;u<6;u++)S.push(new Image),S[u].crossOrigin=o.crossOrigin;z.load.lbox.style.display="block",z.load.lbar.style.display="none"}else if(o.type=="multires"){var F=JSON.parse(JSON.stringify(o.multiRes));o.basePath&&o.multiRes.basePath&&!/^(?:[a-z]+:)?\/\//i.test(o.multiRes.basePath)?F.basePath=o.basePath+o.multiRes.basePath:o.multiRes.basePath?F.basePath=o.multiRes.basePath:o.basePath&&(F.basePath=o.basePath),S=F}else if(o.dynamic===!0)S=o.panorama;else{if(o.panorama===n){W(o.strings.noPanoramaError);return}S=new Image}if(o.type=="cubemap"){var j=6,B=function(){j--,j===0&&V()},ge=function(Te){var Le=t.createElement("a");Le.href=Te.target.src,Le.textContent=Le.href,W(o.strings.fileAccessError.replace("%s",Le.outerHTML))};for(u=0;u<S.length;u++)y=o.cubeMap[u],y=="null"?(console.log("Will use background instead of missing cubemap face "+u),B()):(o.basePath&&!x(y)&&(y=o.basePath+y),S[u].onload=B,S[u].onerror=ge,S[u].src=Et(y))}else if(o.type=="multires")V();else if(y="",o.basePath&&(y=o.basePath),o.dynamic!==!0){y=x(o.panorama)?o.panorama:y+o.panorama,S.onload=function(){e.URL.revokeObjectURL(this.src),V()};var de=new XMLHttpRequest;de.onloadend=function(){if(de.status!=200){var we=t.createElement("a");we.href=y,we.textContent=we.href,W(o.strings.fileAccessError.replace("%s",we.outerHTML))}var Te=this.response;G(Te),z.load.msg.innerHTML=""},de.onprogress=function(we){if(we.lengthComputable){var Te=we.loaded/we.total*100;z.load.lbarFill.style.width=Te+"%";var Le,nt,tt;we.total>1e6?(Le="MB",nt=(we.loaded/1e6).toFixed(2),tt=(we.total/1e6).toFixed(2)):we.total>1e3?(Le="kB",nt=(we.loaded/1e3).toFixed(1),tt=(we.total/1e3).toFixed(1)):(Le="B",nt=we.loaded,tt=we.total),z.load.msg.innerHTML=nt+" / "+tt+" "+Le}else z.load.lbox.style.display="block",z.load.lbar.style.display="none"};try{de.open("GET",y,!0)}catch{W(o.strings.malformedURLError)}de.responseType="blob",de.setRequestHeader("Accept","image/*,*/*;q=0.9"),de.withCredentials=o.crossOrigin==="use-credentials",de.send()}o.draggable&&D.classList.add("pnlm-grab"),D.classList.remove("pnlm-grabbing")}function x(l){return new RegExp("^(?:[a-z]+:)?//","i").test(l)||l[0]=="/"||l.slice(0,5)=="blob:"}function V(){v||(v=new libpannellum.renderer($)),L||(L=!0,J.addEventListener("mousedown",he,!1),t.addEventListener("mousemove",Pe,!1),t.addEventListener("mouseup",Fe,!1),o.mouseZoom&&(D.addEventListener("mousewheel",Ye,!1),D.addEventListener("DOMMouseScroll",Ye,!1)),o.doubleClickZoom&&J.addEventListener("dblclick",re,!1),D.addEventListener("mozfullscreenchange",ft,!1),D.addEventListener("webkitfullscreenchange",ft,!1),D.addEventListener("msfullscreenchange",ft,!1),D.addEventListener("fullscreenchange",ft,!1),e.addEventListener("resize",pe,!1),e.addEventListener("orientationchange",pe,!1),o.disableKeyboardCtrl||(s.addEventListener("keydown",Ve,!1),s.addEventListener("keyup",Xe,!1),s.addEventListener("blur",et,!1)),t.addEventListener("mouseleave",Fe,!1),t.documentElement.style.pointerAction===""&&t.documentElement.style.touchAction===""?(J.addEventListener("pointerdown",qe,!1),J.addEventListener("pointermove",Ae,!1),J.addEventListener("pointerup",ke,!1),J.addEventListener("pointerleave",ke,!1)):(J.addEventListener("touchstart",ze,!1),J.addEventListener("touchmove",Ue,!1),J.addEventListener("touchend",Oe,!1)),e.navigator.pointerEnabled&&(s.style.touchAction="none")),Cs(),at(o.hfov),setTimeout(function(){},500)}function G(l){var u=new FileReader;u.addEventListener("loadend",function(){var y=u.result;if(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)){var F=y.indexOf("ÿÂ");(F<0||F>65536)&&W(o.strings.iOS8WebGLError)}var j=y.indexOf("<x:xmpmeta");if(j>-1&&o.ignoreGPanoXMP!==!0){var B=y.substring(j,y.indexOf("</x:xmpmeta>")+12),ge=function(Te){var Le;return B.indexOf(Te+'="')>=0?(Le=B.substring(B.indexOf(Te+'="')+Te.length+2),Le=Le.substring(0,Le.indexOf('"'))):B.indexOf(Te+">")>=0&&(Le=B.substring(B.indexOf(Te+">")+Te.length+1),Le=Le.substring(0,Le.indexOf("<"))),Le!==n?Number(Le):null},de={fullWidth:ge("GPano:FullPanoWidthPixels"),croppedWidth:ge("GPano:CroppedAreaImageWidthPixels"),fullHeight:ge("GPano:FullPanoHeightPixels"),croppedHeight:ge("GPano:CroppedAreaImageHeightPixels"),topPixels:ge("GPano:CroppedAreaTopPixels"),heading:ge("GPano:PoseHeadingDegrees"),horizonPitch:ge("GPano:PosePitchDegrees"),horizonRoll:ge("GPano:PoseRollDegrees")};de.fullWidth!==null&&de.croppedWidth!==null&&de.fullHeight!==null&&de.croppedHeight!==null&&de.topPixels!==null&&(ee.indexOf("haov")<0&&(o.haov=de.croppedWidth/de.fullWidth*360),ee.indexOf("vaov")<0&&(o.vaov=de.croppedHeight/de.fullHeight*180),ee.indexOf("vOffset")<0&&(o.vOffset=((de.topPixels+de.croppedHeight/2)/de.fullHeight-.5)*-180),de.heading!==null&&ee.indexOf("northOffset")<0&&(o.northOffset=de.heading,o.compass!==!1&&(o.compass=!0)),de.horizonPitch!==null&&de.horizonRoll!==null&&(ee.indexOf("horizonPitch")<0&&(o.horizonPitch=de.horizonPitch),ee.indexOf("horizonRoll")<0&&(o.horizonRoll=de.horizonRoll)))}S.src=e.URL.createObjectURL(l)}),u.readAsBinaryString!==n?u.readAsBinaryString(l):u.readAsText(l)}function W(l){l===n&&(l=o.strings.genericWebGLError),z.errorMsg.innerHTML="<p>"+l+"</p>",ne.load.style.display="none",z.load.box.style.display="none",z.errorMsg.style.display="table",m=!0,$.style.display="none",ht("error",l)}function b(){m&&(z.load.box.style.display="none",z.errorMsg.style.display="none",m=!1,ht("errorcleared"))}function ae(l){var u=ie(l);ue.style.left=u.x+"px",ue.style.top=u.y+"px",clearTimeout(ae.t1),clearTimeout(ae.t2),ue.style.display="block",ue.style.opacity=1,ae.t1=setTimeout(function(){ue.style.opacity=0},2e3),ae.t2=setTimeout(function(){ue.style.display="none"},2500),l.preventDefault()}function ie(l){var u=s.getBoundingClientRect(),y={};return y.x=l.clientX-u.left,y.y=l.clientY-u.top,y}function he(l){if(l.preventDefault(),s.focus(),!(!C||!o.draggable)){var u=ie(l);if(o.hotSpotDebug){var y=Ne(l);console.log("Pitch: "+y[0]+", Yaw: "+y[1]+", Center Pitch: "+o.pitch+", Center Yaw: "+o.yaw+", HFOV: "+o.hfov)}on(),Ft(),o.roll=0,I.hfov=0,k=!0,f=Date.now(),p=u.x,a=u.y,T=o.yaw,w=o.pitch,D.classList.add("pnlm-grabbing"),D.classList.remove("pnlm-grab"),ht("mousedown",l),Ee()}}function re(l){if(o.minHfov===o.hfov)d.setHfov(U,1e3);else{var u=Ne(l);d.lookAt(u[0],u[1],o.minHfov,1e3)}}function Ne(l){var u=ie(l),y=v.getCanvas(),F=y.clientWidth,j=y.clientHeight,B=u.x/F*2-1,ge=(1-u.y/j*2)*j/F,de=1/Math.tan(o.hfov*Math.PI/360),we=Math.sin(o.pitch*Math.PI/180),Te=Math.cos(o.pitch*Math.PI/180),Le=de*Te-ge*we,nt=Math.sqrt(B*B+Le*Le),tt=Math.atan((ge*Te+de*we)/nt)*180/Math.PI,vt=Math.atan2(B/nt,Le/nt)*180/Math.PI+o.yaw;return vt<-180&&(vt+=360),vt>180&&(vt-=360),[tt,vt]}function Pe(l){if(k&&C){f=Date.now();var u=v.getCanvas(),y=u.clientWidth,F=u.clientHeight,j=ie(l),B=(Math.atan(p/y*2-1)-Math.atan(j.x/y*2-1))*180/Math.PI*o.hfov/90+T;I.yaw=(B-o.yaw)%360*.2,o.yaw=B;var ge=2*Math.atan(Math.tan(o.hfov/360*Math.PI)*F/y)*180/Math.PI,de=(Math.atan(j.y/F*2-1)-Math.atan(a/F*2-1))*180/Math.PI*ge/90+w;I.pitch=(de-o.pitch)*.2,o.pitch=de}}function Fe(l){k&&(k=!1,Date.now()-f>15&&(I.pitch=I.yaw=0),D.classList.add("pnlm-grab"),D.classList.remove("pnlm-grabbing"),f=Date.now(),ht("mouseup",l))}function ze(l){if(!(!C||!o.draggable)){on(),Ft(),o.roll=0,I.hfov=0;var u=ie(l.targetTouches[0]);if(p=u.x,a=u.y,l.targetTouches.length==2){var y=ie(l.targetTouches[1]);p+=(y.x-u.x)*.5,a+=(y.y-u.y)*.5,E=Math.sqrt((u.x-y.x)*(u.x-y.x)+(u.y-y.y)*(u.y-y.y))}k=!0,f=Date.now(),T=o.yaw,w=o.pitch,ht("touchstart",l),Ee()}}function Ue(l){if(o.draggable&&(l.preventDefault(),C&&(f=Date.now()),k&&C)){var u=ie(l.targetTouches[0]),y=u.x,F=u.y;if(l.targetTouches.length==2&&E!=-1){var j=ie(l.targetTouches[1]);y+=(j.x-u.x)*.5,F+=(j.y-u.y)*.5;var B=Math.sqrt((u.x-j.x)*(u.x-j.x)+(u.y-j.y)*(u.y-j.y));at(o.hfov+(E-B)*.1),E=B}var ge=o.hfov/360*o.touchPanSpeedCoeffFactor,de=(p-y)*ge+T;I.yaw=(de-o.yaw)%360*.2,o.yaw=de;var we=(F-a)*ge+w;I.pitch=(we-o.pitch)*.2,o.pitch=we}}function Oe(){k=!1,Date.now()-f>150&&(I.pitch=I.yaw=0),E=-1,f=Date.now(),ht("touchend",event)}var Me=[],Re=[];function qe(l){l.pointerType=="touch"&&(Me.push(l.pointerId),Re.push({clientX:l.clientX,clientY:l.clientY}),l.targetTouches=Re,ze(l),l.preventDefault())}function Ae(l){if(l.pointerType=="touch"){for(var u=0;u<Me.length;u++)if(l.pointerId==Me[u]){Re[u].clientX=l.clientX,Re[u].clientY=l.clientY,l.targetTouches=Re,Ue(l),l.preventDefault();return}}}function ke(l){if(l.pointerType=="touch"){for(var u=!1,y=0;y<Me.length;y++)l.pointerId==Me[y]&&(Me[y]=n),Me[y]&&(u=!0);u||(Me=[],Re=[],Oe()),l.preventDefault()}}function Ye(l){!C||o.mouseZoom=="fullscreenonly"&&!M||(l.preventDefault(),on(),f=Date.now(),l.wheelDeltaY?(at(o.hfov-l.wheelDeltaY*.05),I.hfov=l.wheelDelta<0?1:-1):l.wheelDelta?(at(o.hfov-l.wheelDelta*.05),I.hfov=l.wheelDelta<0?1:-1):l.detail&&(at(o.hfov+l.detail*1.5),I.hfov=l.detail>0?1:-1),Ee())}function Ve(l){on(),f=Date.now(),Ft(),o.roll=0;var u=l.which||l.keycode;o.capturedKeyNumbers.indexOf(u)<0||(l.preventDefault(),u==27?M&&Rn():Se(u,!0))}function et(){for(var l=0;l<10;l++)g[l]=!1}function Xe(l){var u=l.which||l.keycode;o.capturedKeyNumbers.indexOf(u)<0||(l.preventDefault(),Se(u,!1))}function Se(l,u){var y=!1;switch(l){case 109:case 189:case 17:case 173:g[0]!=u&&(y=!0),g[0]=u;break;case 107:case 187:case 16:case 61:g[1]!=u&&(y=!0),g[1]=u;break;case 38:g[2]!=u&&(y=!0),g[2]=u;break;case 87:g[6]!=u&&(y=!0),g[6]=u;break;case 40:g[3]!=u&&(y=!0),g[3]=u;break;case 83:g[7]!=u&&(y=!0),g[7]=u;break;case 37:g[4]!=u&&(y=!0),g[4]=u;break;case 65:g[8]!=u&&(y=!0),g[8]=u;break;case 39:g[5]!=u&&(y=!0),g[5]=u;break;case 68:g[9]!=u&&(y=!0),g[9]=u}y&&u&&(typeof performance<"u"&&performance.now()?Q=performance.now():Q=Date.now(),Ee())}function Y(){if(C){var l=!1,u=o.pitch,y=o.yaw,F=o.hfov,j;typeof performance<"u"&&performance.now()?j=performance.now():j=Date.now(),Q===n&&(Q=j);var B=(j-Q)*o.hfov/1700;if(B=Math.min(B,1),g[0]&&o.keyboardZoom===!0&&(at(o.hfov+(I.hfov*.8+.5)*B),l=!0),g[1]&&o.keyboardZoom===!0&&(at(o.hfov+(I.hfov*.8-.2)*B),l=!0),(g[2]||g[6])&&(o.pitch+=(I.pitch*.8+.2)*B,l=!0),(g[3]||g[7])&&(o.pitch+=(I.pitch*.8-.2)*B,l=!0),(g[4]||g[8])&&(o.yaw+=(I.yaw*.8-.2)*B,l=!0),(g[5]||g[9])&&(o.yaw+=(I.yaw*.8+.2)*B,l=!0),l&&(f=Date.now()),o.autoRotate){if(j-Q>.001){var ge=(j-Q)/1e3,de=(I.yaw/ge*B-o.autoRotate*.2)*ge;de=(-o.autoRotate>0?1:-1)*Math.min(Math.abs(o.autoRotate*ge),Math.abs(de)),o.yaw+=de}o.autoRotateStopDelay&&(o.autoRotateStopDelay-=j-Q,o.autoRotateStopDelay<=0&&(o.autoRotateStopDelay=!1,N=o.autoRotate,o.autoRotate=0))}if(O.pitch&&(se("pitch"),u=o.pitch),O.yaw&&(se("yaw"),y=o.yaw),O.hfov&&(se("hfov"),F=o.hfov),B>0&&!o.autoRotate){var we=.85;!g[4]&&!g[5]&&!g[8]&&!g[9]&&!O.yaw&&(o.yaw+=I.yaw*B*we),!g[2]&&!g[3]&&!g[6]&&!g[7]&&!O.pitch&&(o.pitch+=I.pitch*B*we),!g[0]&&!g[1]&&!O.hfov&&at(o.hfov+I.hfov*B*we)}if(Q=j,B>0){I.yaw=I.yaw*.8+(o.yaw-y)/B*.2,I.pitch=I.pitch*.8+(o.pitch-u)/B*.2,I.hfov=I.hfov*.8+(o.hfov-F)/B*.2;var Te=o.autoRotate?Math.abs(o.autoRotate):5;I.yaw=Math.min(Te,Math.max(I.yaw,-Te)),I.pitch=Math.min(Te,Math.max(I.pitch,-Te)),I.hfov=Math.min(Te,Math.max(I.hfov,-Te))}g[0]&&g[1]&&(I.hfov=0),(g[2]||g[6])&&(g[3]||g[7])&&(I.pitch=0),(g[4]||g[8])&&(g[5]||g[9])&&(I.yaw=0)}}function se(l){var u=O[l],y=Math.min(1,Math.max((Date.now()-u.startTime)/1e3/(u.duration/1e3),0)),F=u.startPosition+o.animationTimingFunction(y)*(u.endPosition-u.startPosition);if(u.endPosition>u.startPosition&&F>=u.endPosition||u.endPosition<u.startPosition&&F<=u.endPosition||u.endPosition===u.startPosition){F=u.endPosition,I[l]=0;var j=O[l].callback,B=O[l].callbackArgs;delete O[l],typeof j=="function"&&j(B)}o[l]=F}function R(l){return l<.5?2*l*l:-1+(4-2*l)*l}function pe(){ft()}function Ee(){q||(q=!0,_e())}function _e(){if(Ie(),oe&&clearTimeout(oe),k||K===!0)requestAnimationFrame(_e);else if(g[0]||g[1]||g[2]||g[3]||g[4]||g[5]||g[6]||g[7]||g[8]||g[9]||o.autoRotate||O.pitch||O.yaw||O.hfov||Math.abs(I.yaw)>.01||Math.abs(I.pitch)>.01||Math.abs(I.hfov)>.01)Y(),o.autoRotateInactivityDelay>=0&&N&&Date.now()-f>o.autoRotateInactivityDelay&&!o.autoRotate&&(o.autoRotate=N,d.lookAt(me,n,U,3e3)),requestAnimationFrame(_e);else if(v&&(v.isLoading()||o.dynamic===!0&&P))requestAnimationFrame(_e);else{q=!1,Q=n;var l=o.autoRotateInactivityDelay-(Date.now()-f);l>0?oe=setTimeout(function(){o.autoRotate=N,d.lookAt(me,n,U,3e3),Ee()},l):o.autoRotateInactivityDelay>=0&&N&&(o.autoRotate=N,d.lookAt(me,n,U,3e3),Ee())}}function Ie(){var l;if(C){o.yaw>180?o.yaw-=360:o.yaw<-180&&(o.yaw+=360),l=o.yaw;var u=0;if(o.avoidShowingBackground){var we=v.getCanvas(),y=o.hfov/2,F=Math.atan2(Math.tan(y/180*Math.PI),we.width/we.height)*180/Math.PI,j=o.vaov>o.haov;j?F*(1-Math.min(Math.cos((o.pitch-y)/180*Math.PI),Math.cos((o.pitch+y)/180*Math.PI))):u=y*(1-Math.min(Math.cos((o.pitch-F)/180*Math.PI),Math.cos((o.pitch+F)/180*Math.PI)))}var B=o.maxYaw-o.minYaw,ge=-180,de=180;B<360&&(ge=o.minYaw+o.hfov/2+u,de=o.maxYaw-o.hfov/2-u,B<o.hfov&&(ge=de=(ge+de)/2),o.yaw=Math.max(ge,Math.min(de,o.yaw))),o.autoRotate!==!1&&l!=o.yaw&&Q!==n&&(o.autoRotate*=-1);var we=v.getCanvas(),Te=2*Math.atan(Math.tan(o.hfov/180*Math.PI*.5)/(we.width/we.height))/Math.PI*180,Le=o.minPitch+Te/2,nt=o.maxPitch-Te/2,tt=o.maxPitch-o.minPitch;tt<Te&&(Le=nt=(Le+nt)/2),isNaN(Le)&&(Le=-90),isNaN(nt)&&(nt=90),o.pitch=Math.max(Le,Math.min(nt,o.pitch)),v.render(o.pitch*Math.PI/180,o.yaw*Math.PI/180,o.hfov*Math.PI/180,{roll:o.roll*Math.PI/180}),yr(),o.compass&&(Ze.style.transform="rotate("+(-o.yaw-o.northOffset)+"deg)",Ze.style.webkitTransform="rotate("+(-o.yaw-o.northOffset)+"deg)"),o.onRender&&o.onRender()}}function le(l,u,y,F){this.w=l,this.x=u,this.y=y,this.z=F}le.prototype.multiply=function(l){return new le(this.w*l.w-this.x*l.x-this.y*l.y-this.z*l.z,this.x*l.w+this.w*l.x+this.y*l.z-this.z*l.y,this.y*l.w+this.w*l.y+this.z*l.x-this.x*l.z,this.z*l.w+this.w*l.z+this.x*l.y-this.y*l.x)},le.prototype.toEulerAngles=function(){var l=Math.atan2(2*(this.w*this.x+this.y*this.z),1-2*(this.x*this.x+this.y*this.y)),u=Math.asin(2*(this.w*this.y-this.z*this.x)),y=Math.atan2(2*(this.w*this.z+this.x*this.y),1-2*(this.y*this.y+this.z*this.z));return[l,u,y]};function xs(l,u,y){var F=[u?u*Math.PI/180/2:0,y?y*Math.PI/180/2:0,l?l*Math.PI/180/2:0],j=[Math.cos(F[0]),Math.cos(F[1]),Math.cos(F[2])],B=[Math.sin(F[0]),Math.sin(F[1]),Math.sin(F[2])];return new le(j[0]*j[1]*j[2]-B[0]*B[1]*B[2],B[0]*j[1]*j[2]-j[0]*B[1]*B[2],j[0]*B[1]*j[2]+B[0]*j[1]*B[2],j[0]*j[1]*B[2]+B[0]*B[1]*j[2])}function Es(l,u,y){var F=xs(l,u,y);F=F.multiply(new le(Math.sqrt(.5),-Math.sqrt(.5),0,0));var j=e.orientation?-e.orientation*Math.PI/180/2:0;return F.multiply(new le(Math.cos(j),0,-Math.sin(j),0))}function vr(l){var u=Es(l.alpha,l.beta,l.gamma).toEulerAngles();typeof K=="number"&&K<10?K+=1:K===10?(H=u[2]/Math.PI*180+o.yaw,K=!0,requestAnimationFrame(_e)):(o.pitch=u[0]/Math.PI*180,o.roll=-u[1]/Math.PI*180,o.yaw=-u[2]/Math.PI*180+H)}function Cs(){try{var l={};o.horizonPitch!==n&&(l.horizonPitch=o.horizonPitch*Math.PI/180),o.horizonRoll!==n&&(l.horizonRoll=o.horizonRoll*Math.PI/180),o.backgroundColor!==n&&(l.backgroundColor=o.backgroundColor),v.init(S,o.type,o.dynamic,o.haov*Math.PI/180,o.vaov*Math.PI/180,o.vOffset*Math.PI/180,Ms,l),o.dynamic!==!0&&(S=n)}catch(u){if(u.type=="webgl error"||u.type=="no webgl")W();else if(u.type=="webgl size error")W(o.strings.textureSizeError.replace("%s",u.width).replace("%s",u.maxWidth));else throw W(o.strings.unknownError),u}}function Ms(){if(o.sceneFadeDuration&&v.fadeImg!==n){v.fadeImg.style.opacity=0;var l=v.fadeImg;delete v.fadeImg,setTimeout(function(){$.removeChild(l),ht("scenechangefadedone")},o.sceneFadeDuration)}o.compass?Ze.style.display="inline":Ze.style.display="none",Ls(),z.load.box.style.display="none",h!==n&&($.removeChild(h),h=n),C=!0,ht("load"),Ee()}function _r(l){l.pitch=Number(l.pitch)||0,l.yaw=Number(l.yaw)||0;var u=t.createElement("div");u.className="pnlm-hotspot-base",l.cssClass?u.className+=" "+l.cssClass:u.className+=" pnlm-hotspot pnlm-sprite pnlm-"+xt(l.type);var y=t.createElement("span");l.text&&(y.innerHTML=xt(l.text));var F;if(l.video){var j=t.createElement("video"),B=l.video;o.basePath&&!x(B)&&(B=o.basePath+B),j.src=Et(B),j.controls=!0,j.style.width=l.width+"px",$.appendChild(u),y.appendChild(j)}else if(l.image){var B=l.image;o.basePath&&!x(B)&&(B=o.basePath+B),F=t.createElement("a"),F.href=Et(l.URL?l.URL:B),F.target="_blank",y.appendChild(F);var ge=t.createElement("img");ge.src=Et(B),ge.style.width=l.width+"px",ge.style.paddingTop="5px",$.appendChild(u),F.appendChild(ge),y.style.maxWidth="initial"}else l.URL?(F=t.createElement("a"),F.href=Et(l.URL),F.target="_blank",$.appendChild(F),u.className+=" pnlm-pointer",y.className+=" pnlm-pointer",F.appendChild(u)):(l.sceneId&&(u.onclick=u.ontouchend=function(){return u.clicked||(u.clicked=!0,An(l.sceneId,l.targetPitch,l.targetYaw,l.targetHfov)),!1},u.className+=" pnlm-pointer",y.className+=" pnlm-pointer"),$.appendChild(u));l.createTooltipFunc?l.createTooltipFunc(u,l.createTooltipArgs):(l.text||l.video||l.image)&&(u.classList.add("pnlm-tooltip"),u.appendChild(y),y.style.width=y.scrollWidth-20+"px",y.style.marginLeft=-(y.scrollWidth-u.offsetWidth)/2+"px",y.style.marginTop=-y.scrollHeight-12+"px"),l.clickHandlerFunc&&(u.addEventListener("click",function(de){l.clickHandlerFunc(de,l.clickHandlerArgs)},"false"),u.className+=" pnlm-pointer",y.className+=" pnlm-pointer"),l.div=u}function Ls(){Z||(o.hotSpots?(o.hotSpots=o.hotSpots.sort(function(l,u){return l.pitch<u.pitch}),o.hotSpots.forEach(_r)):o.hotSpots=[],Z=!0,yr())}function ks(){var l=o.hotSpots;if(Z=!1,delete o.hotSpots,l)for(var u=0;u<l.length;u++){for(var y=l[u].div;y.parentNode!=$;)y=y.parentNode;$.removeChild(y),delete l[u].div}}function wr(l){var u=Math.sin(l.pitch*Math.PI/180),y=Math.cos(l.pitch*Math.PI/180),F=Math.sin(o.pitch*Math.PI/180),j=Math.cos(o.pitch*Math.PI/180),B=Math.cos((-l.yaw+o.yaw)*Math.PI/180),ge=u*F+y*B*j;if(l.yaw<=90&&l.yaw>-90&&ge<=0||(l.yaw>90||l.yaw<=-90)&&ge<=0)l.div.style.visibility="hidden";else{var de=Math.sin((-l.yaw+o.yaw)*Math.PI/180),we=Math.tan(o.hfov*Math.PI/360);l.div.style.visibility="visible";var Te=v.getCanvas(),Le=Te.clientWidth,nt=Te.clientHeight,tt=[-Le/we*de*y/ge/2,-Le/we*(u*j-y*B*F)/ge/2],vt=Math.sin(o.roll*Math.PI/180),Er=Math.cos(o.roll*Math.PI/180);tt=[tt[0]*Er-tt[1]*vt,tt[0]*vt+tt[1]*Er],tt[0]+=(Le-l.div.offsetWidth)/2,tt[1]+=(nt-l.div.offsetHeight)/2;var Dn="translate("+tt[0]+"px, "+tt[1]+"px) translateZ(9999px) rotate("+o.roll+"deg)";l.div.style.webkitTransform=Dn,l.div.style.MozTransform=Dn,l.div.style.transform=Dn}}function yr(){o.hotSpots.forEach(wr)}function nn(l){o={};var u,y,F=["haov","vaov","vOffset","northOffset","horizonPitch","horizonRoll"];ee=[];for(u in te)te.hasOwnProperty(u)&&(o[u]=te[u]);for(u in i.default)if(i.default.hasOwnProperty(u))if(u=="strings")for(y in i.default.strings)i.default.strings.hasOwnProperty(y)&&(o.strings[y]=xt(i.default.strings[y]));else o[u]=i.default[u],F.indexOf(u)>=0&&ee.push(u);if(l!==null&&l!==""&&i.scenes&&i.scenes[l]){var j=i.scenes[l];for(u in j)if(j.hasOwnProperty(u))if(u=="strings")for(y in j.strings)j.strings.hasOwnProperty(y)&&(o.strings[y]=xt(j.strings[y]));else o[u]=j[u],F.indexOf(u)>=0&&ee.push(u);o.scene=l}for(u in i)if(i.hasOwnProperty(u))if(u=="strings")for(y in i.strings)i.strings.hasOwnProperty(y)&&(o.strings[y]=xt(i.strings[y]));else o[u]=i[u],F.indexOf(u)>=0&&ee.push(u)}function Pn(l){if(l=l||!1,l&&"preview"in o){var u=o.preview;o.basePath&&!x(u)&&(u=o.basePath+u),h=t.createElement("div"),h.className="pnlm-preview-img",h.style.backgroundImage="url('"+Ss(u)+"')",$.appendChild(h)}var y=o.title,F=o.author;l&&("previewTitle"in o&&(o.title=o.previewTitle),"previewAuthor"in o&&(o.author=o.previewAuthor)),o.hasOwnProperty("title")||(z.title.innerHTML=""),o.hasOwnProperty("author")||(z.author.innerHTML=""),!o.hasOwnProperty("title")&&!o.hasOwnProperty("author")&&(z.container.style.display="none"),ne.load.innerHTML="<p>"+o.strings.loadButtonLabel+"</p>",z.load.boxp.innerHTML=o.strings.loadingLabel;for(var j in o)if(o.hasOwnProperty(j))switch(j){case"title":z.title.innerHTML=xt(o[j]),z.container.style.display="inline";break;case"author":z.author.innerHTML=o.strings.bylineLabel.replace("%s",xt(o[j])),z.container.style.display="inline";break;case"fallback":var B=t.createElement("a");B.href=Et(o[j]),B.target="_blank",B.textContent="Click here to view this panorama in an alternative viewer.";var ge=t.createElement("p");ge.textContent="Your browser does not support WebGL.",ge.appendChild(t.createElement("br")),ge.appendChild(B),z.errorMsg.innerHTML="",z.errorMsg.appendChild(ge);break;case"hfov":at(Number(o[j]));break;case"autoLoad":o[j]===!0&&v===n&&(z.load.box.style.display="inline",ne.load.style.display="none",_());break;case"showZoomCtrl":o[j]&&o.showControls!=!1?ne.zoom.style.display="block":ne.zoom.style.display="none";break;case"showFullscreenCtrl":o[j]&&o.showControls!=!1&&("fullscreen"in t||"mozFullScreen"in t||"webkitIsFullScreen"in t||"msFullscreenElement"in t)?ne.fullscreen.style.display="block":ne.fullscreen.style.display="none";break;case"hotSpotDebug":o[j]?ye.style.display="block":ye.style.display="none";break;case"showControls":o[j]||(ne.orientation.style.display="none",ne.zoom.style.display="none",ne.fullscreen.style.display="none");break;case"orientationOnByDefault":o[j]&&(Ce===n?He=!0:Ce===!0&&rn());break}l&&(y?o.title=y:delete o.title,F?o.author=F:delete o.author)}function Rn(){if(C&&!m)if(M)t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitCancelFullScreen?t.webkitCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen();else try{s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.msRequestFullscreen?s.msRequestFullscreen():s.webkitRequestFullScreen()}catch{}}function ft(){var l=e.innerWidth==screen.width&&e.innerHeight==screen.height;t.fullscreen||t.mozFullScreen||t.webkitIsFullScreen||t.msFullscreenElement||l?(ne.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"),M=!0):(ne.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"),M=!1),v.resize(),at(o.hfov),Ee()}function Is(){C&&(at(o.hfov-5),Ee())}function Ts(){C&&(at(o.hfov+5),Ee())}function br(l){var u=o.minHfov;if(o.type=="multires"&&v&&(u=Math.min(u,v.getCanvas().width/(o.multiRes.cubeResolution/90*.9))),u>o.maxHfov)return console.log("HFOV bounds do not make sense (minHfov > maxHfov)."),o.hfov;var y=o.hfov;if(l<u?y=u:l>o.maxHfov?y=o.maxHfov:y=l,o.avoidShowingBackground&&v){var F=v.getCanvas();y=Math.min(y,Math.atan(Math.tan((o.maxPitch-o.minPitch)/360*Math.PI)/F.height*F.width)*360/Math.PI)}return y}function at(l){o.hfov=br(l)}function on(){O={},N=o.autoRotate?o.autoRotate:N,o.autoRotate=!1}function xr(){b(),C=!1,ne.load.style.display="none",z.load.box.style.display="inline",_()}function An(l,u,y,F,j){C=!1,O={};var B,ge,de,we;if(o.sceneFadeDuration&&!j){var Te=v.render(o.pitch*Math.PI/180,o.yaw*Math.PI/180,o.hfov*Math.PI/180,{returnImage:!0});if(Te!==n){B=new Image,B.className="pnlm-fade-img",B.style.transition="opacity "+o.sceneFadeDuration/1e3+"s",B.style.width="100%",B.style.height="100%",B.onload=function(){An(l,u,y,F,!0)},B.src=Te,$.appendChild(B),v.fadeImg=B;return}}u==="same"?ge=o.pitch:ge=u,y==="same"?de=o.yaw:y==="sameAzimuth"?de=o.yaw+(o.northOffset||0)-(i.scenes[l].northOffset||0):de=y,F==="same"?we=o.hfov:we=F,ks(),nn(l),I.yaw=I.pitch=I.hfov=0,Pn(),ge!==n&&(o.pitch=ge),de!==n&&(o.yaw=de),we!==n&&(o.hfov=we),ht("scenechange",l),xr()}function Ft(){e.removeEventListener("deviceorientation",vr),ne.orientation.classList.remove("pnlm-orientation-button-active"),K=!1}function rn(){K=1,e.addEventListener("deviceorientation",vr),ne.orientation.classList.add("pnlm-orientation-button-active")}function xt(l){return i.escapeHTML?String(l).split(/&/g).join("&").split('"').join(""").split("'").join("'").split("<").join("<").split(">").join(">").split("/").join("/").split(`
|
|
4
|
+
`),f=["varying mediump vec2 v_texCoord;","uniform sampler2D u_sampler;","void main(void) {","gl_FragColor = texture2D(u_sampler, v_texCoord);","}"].join("");return{renderer:function(h,p,a,E){return new r(h)}}}(window,document),window.pannellum=function(e,t,n){function r(s,i){var d=this,o,v,f,L=!1,h=Date.now(),p=0,a=0,E=-1,T=0,b=0,m=new Array(10),M=!1,k,_=!1,C=!1,D,G,I={yaw:0,pitch:0,hfov:0},S=!1,J=!1,O=0,ee,K=0,j,ce,U={},P={},Z=[],z=!1,H=!1,ue={hfov:100,minHfov:50,maxHfov:120,pitch:0,minPitch:n,maxPitch:n,yaw:0,minYaw:-180,maxYaw:180,roll:0,haov:360,vaov:180,vOffset:0,autoRotate:!1,autoRotateInactivityDelay:-1,autoRotateStopDelay:n,type:"equirectangular",northOffset:0,showFullscreenCtrl:!0,dynamic:!1,doubleClickZoom:!0,keyboardZoom:!0,mouseZoom:!0,showZoomCtrl:!0,autoLoad:!1,showControls:!0,orientationOnByDefault:!1,hotSpotDebug:!1,backgroundColor:[0,0,0],avoidShowingBackground:!1,animationTimingFunction:A,draggable:!0,disableKeyboardCtrl:!1,crossOrigin:"anonymous",touchPanSpeedCoeffFactor:1,capturedKeyNumbers:[16,17,27,37,38,39,40,61,65,68,83,87,107,109,173,187,189]};ue.strings={loadButtonLabel:"Click to<br>Load<br>Panorama",loadingLabel:"Loading...",bylineLabel:"by %s",noPanoramaError:"No panorama image was specified.",fileAccessError:"The file %s could not be accessed.",malformedURLError:"There is something wrong with the panorama URL.",iOS8WebGLError:"Due to iOS 8's broken WebGL implementation, only progressive encoded JPEGs work for your device (this panorama uses standard encoding).",genericWebGLError:"Your browser does not have the necessary WebGL support to display this panorama.",textureSizeError:"This panorama is too big for your device! It's %spx wide, but your device only supports images up to %spx wide. Try another device. (If you're the author, try scaling down the image.)",unknownError:"Unknown error. Check developer console."},s=typeof s=="string"?t.getElementById(s):s,s.classList.add("pnlm-container"),s.tabIndex=0;var R=t.createElement("div");R.className="pnlm-ui",s.appendChild(R);var ne=t.createElement("div");ne.className="pnlm-render-container",s.appendChild(ne);var W=t.createElement("div");W.className="pnlm-dragfix",R.appendChild(W);var oe=t.createElement("span");oe.className="pnlm-about-msg",oe.innerHTML='<a href="https://pannellum.org/" target="_blank">Pannellum</a>',R.appendChild(oe),W.addEventListener("contextmenu",te);var N={},Ee=t.createElement("div");Ee.className="pnlm-sprite pnlm-hot-spot-debug-indicator",R.appendChild(Ee),N.container=t.createElement("div"),N.container.className="pnlm-panorama-info",N.title=t.createElement("div"),N.title.className="pnlm-title-box",N.container.appendChild(N.title),N.author=t.createElement("div"),N.author.className="pnlm-author-box",N.container.appendChild(N.author),R.appendChild(N.container),N.load={},N.load.box=t.createElement("div"),N.load.box.className="pnlm-load-box",N.load.boxp=t.createElement("p"),N.load.box.appendChild(N.load.boxp),N.load.lbox=t.createElement("div"),N.load.lbox.className="pnlm-lbox",N.load.lbox.innerHTML='<div class="pnlm-loading"></div>',N.load.box.appendChild(N.load.lbox),N.load.lbar=t.createElement("div"),N.load.lbar.className="pnlm-lbar",N.load.lbarFill=t.createElement("div"),N.load.lbarFill.className="pnlm-lbar-fill",N.load.lbar.appendChild(N.load.lbarFill),N.load.box.appendChild(N.load.lbar),N.load.msg=t.createElement("p"),N.load.msg.className="pnlm-lmsg",N.load.box.appendChild(N.load.msg),R.appendChild(N.load.box),N.errorMsg=t.createElement("div"),N.errorMsg.className="pnlm-error-msg pnlm-info-box",R.appendChild(N.errorMsg);var Q={};Q.container=t.createElement("div"),Q.container.className="pnlm-controls-container",R.appendChild(Q.container),Q.load=t.createElement("div"),Q.load.className="pnlm-load-button",Q.load.addEventListener("click",function(){Rn(),xr()}),R.appendChild(Q.load),Q.zoom=t.createElement("div"),Q.zoom.className="pnlm-zoom-controls pnlm-controls",Q.zoomIn=t.createElement("div"),Q.zoomIn.className="pnlm-zoom-in pnlm-sprite pnlm-control",Q.zoomIn.addEventListener("click",Ts),Q.zoom.appendChild(Q.zoomIn),Q.zoomOut=t.createElement("div"),Q.zoomOut.className="pnlm-zoom-out pnlm-sprite pnlm-control",Q.zoomOut.addEventListener("click",Ss),Q.zoom.appendChild(Q.zoomOut),Q.container.appendChild(Q.zoom),Q.fullscreen=t.createElement("div"),Q.fullscreen.addEventListener("click",An),Q.fullscreen.className="pnlm-fullscreen-toggle-button pnlm-sprite pnlm-fullscreen-toggle-button-inactive pnlm-controls pnlm-control",(t.fullscreenEnabled||t.mozFullScreenEnabled||t.webkitFullscreenEnabled||t.msFullscreenEnabled)&&Q.container.appendChild(Q.fullscreen),Q.orientation=t.createElement("div"),Q.orientation.addEventListener("click",function(l){J?Ft():rn()}),Q.orientation.addEventListener("mousedown",function(l){l.stopPropagation()}),Q.orientation.addEventListener("touchstart",function(l){l.stopPropagation()}),Q.orientation.addEventListener("pointerdown",function(l){l.stopPropagation()}),Q.orientation.className="pnlm-orientation-button pnlm-orientation-button-inactive pnlm-sprite pnlm-controls pnlm-control";var Me,Oe=!1;function je(l){e.removeEventListener("deviceorientation",je),l&&l.alpha!==null&&l.beta!==null&&l.gamma!==null?(Q.container.appendChild(Q.orientation),Me=!0,Oe&&rn()):Me=!1}e.DeviceOrientationEvent?e.addEventListener("deviceorientation",je):Me=!1;var He=t.createElement("div");He.className="pnlm-compass pnlm-controls pnlm-control",R.appendChild(He),i.firstScene?nn(i.firstScene):i.default&&i.default.firstScene?nn(i.default.firstScene):nn(null),Rn(!0);function g(){var l=t.createElement("div");if(l.innerHTML="<!--[if lte IE 9]><i></i><![endif]-->",l.getElementsByTagName("i").length==1){V();return}j=o.hfov,ce=o.pitch;var u,y;if(o.type=="cubemap"){for(D=[],u=0;u<6;u++)D.push(new Image),D[u].crossOrigin=o.crossOrigin;N.load.lbox.style.display="block",N.load.lbar.style.display="none"}else if(o.type=="multires"){var F=JSON.parse(JSON.stringify(o.multiRes));o.basePath&&o.multiRes.basePath&&!/^(?:[a-z]+:)?\/\//i.test(o.multiRes.basePath)?F.basePath=o.basePath+o.multiRes.basePath:o.multiRes.basePath?F.basePath=o.multiRes.basePath:o.basePath&&(F.basePath=o.basePath),D=F}else if(o.dynamic===!0)D=o.panorama;else{if(o.panorama===n){V(o.strings.noPanoramaError);return}D=new Image}if(o.type=="cubemap"){var q=6,B=function(){q--,q===0&&re()},me=function(Pe){var Le=t.createElement("a");Le.href=Pe.target.src,Le.textContent=Le.href,V(o.strings.fileAccessError.replace("%s",Le.outerHTML))};for(u=0;u<D.length;u++)y=o.cubeMap[u],y=="null"?(console.log("Will use background instead of missing cubemap face "+u),B()):(o.basePath&&!x(y)&&(y=o.basePath+y),D[u].onload=B,D[u].onerror=me,D[u].src=Et(y))}else if(o.type=="multires")re();else if(y="",o.basePath&&(y=o.basePath),o.dynamic!==!0){y=x(o.panorama)?o.panorama:y+o.panorama,D.onload=function(){e.URL.revokeObjectURL(this.src),re()};var pe=new XMLHttpRequest;pe.onloadend=function(){if(pe.status!=200){var we=t.createElement("a");we.href=y,we.textContent=we.href,V(o.strings.fileAccessError.replace("%s",we.outerHTML))}var Pe=this.response;Y(Pe),N.load.msg.innerHTML=""},pe.onprogress=function(we){if(we.lengthComputable){var Pe=we.loaded/we.total*100;N.load.lbarFill.style.width=Pe+"%";var Le,nt,tt;we.total>1e6?(Le="MB",nt=(we.loaded/1e6).toFixed(2),tt=(we.total/1e6).toFixed(2)):we.total>1e3?(Le="kB",nt=(we.loaded/1e3).toFixed(1),tt=(we.total/1e3).toFixed(1)):(Le="B",nt=we.loaded,tt=we.total),N.load.msg.innerHTML=nt+" / "+tt+" "+Le}else N.load.lbox.style.display="block",N.load.lbar.style.display="none"};try{pe.open("GET",y,!0)}catch{V(o.strings.malformedURLError)}pe.responseType="blob",pe.setRequestHeader("Accept","image/*,*/*;q=0.9"),pe.withCredentials=o.crossOrigin==="use-credentials",pe.send()}o.draggable&&R.classList.add("pnlm-grab"),R.classList.remove("pnlm-grabbing")}function x(l){return new RegExp("^(?:[a-z]+:)?//","i").test(l)||l[0]=="/"||l.slice(0,5)=="blob:"}function re(){v||(v=new libpannellum.renderer(ne)),C||(C=!0,W.addEventListener("mousedown",ge,!1),t.addEventListener("mousemove",Ie,!1),t.addEventListener("mouseup",Xe,!1),o.mouseZoom&&(R.addEventListener("mousewheel",Ge,!1),R.addEventListener("DOMMouseScroll",Ge,!1)),o.doubleClickZoom&&W.addEventListener("dblclick",ie,!1),R.addEventListener("mozfullscreenchange",ft,!1),R.addEventListener("webkitfullscreenchange",ft,!1),R.addEventListener("msfullscreenchange",ft,!1),R.addEventListener("fullscreenchange",ft,!1),e.addEventListener("resize",fe,!1),e.addEventListener("orientationchange",fe,!1),o.disableKeyboardCtrl||(s.addEventListener("keydown",Fe,!1),s.addEventListener("keyup",Ze,!1),s.addEventListener("blur",et,!1)),t.addEventListener("mouseleave",Xe,!1),t.documentElement.style.pointerAction===""&&t.documentElement.style.touchAction===""?(W.addEventListener("pointerdown",Ye,!1),W.addEventListener("pointermove",De,!1),W.addEventListener("pointerup",Se,!1),W.addEventListener("pointerleave",Se,!1)):(W.addEventListener("touchstart",We,!1),W.addEventListener("touchmove",Be,!1),W.addEventListener("touchend",Te,!1)),e.navigator.pointerEnabled&&(s.style.touchAction="none")),Ms(),at(o.hfov),setTimeout(function(){},500)}function Y(l){var u=new FileReader;u.addEventListener("loadend",function(){var y=u.result;if(navigator.userAgent.toLowerCase().match(/(iphone|ipod|ipad).* os 8_/)){var F=y.indexOf("ÿÂ");(F<0||F>65536)&&V(o.strings.iOS8WebGLError)}var q=y.indexOf("<x:xmpmeta");if(q>-1&&o.ignoreGPanoXMP!==!0){var B=y.substring(q,y.indexOf("</x:xmpmeta>")+12),me=function(Pe){var Le;return B.indexOf(Pe+'="')>=0?(Le=B.substring(B.indexOf(Pe+'="')+Pe.length+2),Le=Le.substring(0,Le.indexOf('"'))):B.indexOf(Pe+">")>=0&&(Le=B.substring(B.indexOf(Pe+">")+Pe.length+1),Le=Le.substring(0,Le.indexOf("<"))),Le!==n?Number(Le):null},pe={fullWidth:me("GPano:FullPanoWidthPixels"),croppedWidth:me("GPano:CroppedAreaImageWidthPixels"),fullHeight:me("GPano:FullPanoHeightPixels"),croppedHeight:me("GPano:CroppedAreaImageHeightPixels"),topPixels:me("GPano:CroppedAreaTopPixels"),heading:me("GPano:PoseHeadingDegrees"),horizonPitch:me("GPano:PosePitchDegrees"),horizonRoll:me("GPano:PoseRollDegrees")};pe.fullWidth!==null&&pe.croppedWidth!==null&&pe.fullHeight!==null&&pe.croppedHeight!==null&&pe.topPixels!==null&&(Z.indexOf("haov")<0&&(o.haov=pe.croppedWidth/pe.fullWidth*360),Z.indexOf("vaov")<0&&(o.vaov=pe.croppedHeight/pe.fullHeight*180),Z.indexOf("vOffset")<0&&(o.vOffset=((pe.topPixels+pe.croppedHeight/2)/pe.fullHeight-.5)*-180),pe.heading!==null&&Z.indexOf("northOffset")<0&&(o.northOffset=pe.heading,o.compass!==!1&&(o.compass=!0)),pe.horizonPitch!==null&&pe.horizonRoll!==null&&(Z.indexOf("horizonPitch")<0&&(o.horizonPitch=pe.horizonPitch),Z.indexOf("horizonRoll")<0&&(o.horizonRoll=pe.horizonRoll)))}D.src=e.URL.createObjectURL(l)}),u.readAsBinaryString!==n?u.readAsBinaryString(l):u.readAsText(l)}function V(l){l===n&&(l=o.strings.genericWebGLError),N.errorMsg.innerHTML="<p>"+l+"</p>",Q.load.style.display="none",N.load.box.style.display="none",N.errorMsg.style.display="table",_=!0,ne.style.display="none",ht("error",l)}function w(){_&&(N.load.box.style.display="none",N.errorMsg.style.display="none",_=!1,ht("errorcleared"))}function te(l){var u=ae(l);oe.style.left=u.x+"px",oe.style.top=u.y+"px",clearTimeout(te.t1),clearTimeout(te.t2),oe.style.display="block",oe.style.opacity=1,te.t1=setTimeout(function(){oe.style.opacity=0},2e3),te.t2=setTimeout(function(){oe.style.display="none"},2500),l.preventDefault()}function ae(l){var u=s.getBoundingClientRect(),y={};return y.x=l.clientX-u.left,y.y=l.clientY-u.top,y}function ge(l){if(l.preventDefault(),s.focus(),!(!k||!o.draggable)){var u=ae(l);if(o.hotSpotDebug){var y=ke(l);console.log("Pitch: "+y[0]+", Yaw: "+y[1]+", Center Pitch: "+o.pitch+", Center Yaw: "+o.yaw+", HFOV: "+o.hfov)}on(),Ft(),o.roll=0,I.hfov=0,L=!0,h=Date.now(),p=u.x,a=u.y,T=o.yaw,b=o.pitch,R.classList.add("pnlm-grabbing"),R.classList.remove("pnlm-grab"),ht("mousedown",l),xe()}}function ie(l){if(o.minHfov===o.hfov)d.setHfov(j,1e3);else{var u=ke(l);d.lookAt(u[0],u[1],o.minHfov,1e3)}}function ke(l){var u=ae(l),y=v.getCanvas(),F=y.clientWidth,q=y.clientHeight,B=u.x/F*2-1,me=(1-u.y/q*2)*q/F,pe=1/Math.tan(o.hfov*Math.PI/360),we=Math.sin(o.pitch*Math.PI/180),Pe=Math.cos(o.pitch*Math.PI/180),Le=pe*Pe-me*we,nt=Math.sqrt(B*B+Le*Le),tt=Math.atan((me*Pe+pe*we)/nt)*180/Math.PI,vt=Math.atan2(B/nt,Le/nt)*180/Math.PI+o.yaw;return vt<-180&&(vt+=360),vt>180&&(vt-=360),[tt,vt]}function Ie(l){if(L&&k){h=Date.now();var u=v.getCanvas(),y=u.clientWidth,F=u.clientHeight,q=ae(l),B=(Math.atan(p/y*2-1)-Math.atan(q.x/y*2-1))*180/Math.PI*o.hfov/90+T;I.yaw=(B-o.yaw)%360*.2,o.yaw=B;var me=2*Math.atan(Math.tan(o.hfov/360*Math.PI)*F/y)*180/Math.PI,pe=(Math.atan(q.y/F*2-1)-Math.atan(a/F*2-1))*180/Math.PI*me/90+b;I.pitch=(pe-o.pitch)*.2,o.pitch=pe}}function Xe(l){L&&(L=!1,Date.now()-h>15&&(I.pitch=I.yaw=0),R.classList.add("pnlm-grab"),R.classList.remove("pnlm-grabbing"),h=Date.now(),ht("mouseup",l))}function We(l){if(!(!k||!o.draggable)){on(),Ft(),o.roll=0,I.hfov=0;var u=ae(l.targetTouches[0]);if(p=u.x,a=u.y,l.targetTouches.length==2){var y=ae(l.targetTouches[1]);p+=(y.x-u.x)*.5,a+=(y.y-u.y)*.5,E=Math.sqrt((u.x-y.x)*(u.x-y.x)+(u.y-y.y)*(u.y-y.y))}L=!0,h=Date.now(),T=o.yaw,b=o.pitch,ht("touchstart",l),xe()}}function Be(l){if(o.draggable&&(l.preventDefault(),k&&(h=Date.now()),L&&k)){var u=ae(l.targetTouches[0]),y=u.x,F=u.y;if(l.targetTouches.length==2&&E!=-1){var q=ae(l.targetTouches[1]);y+=(q.x-u.x)*.5,F+=(q.y-u.y)*.5;var B=Math.sqrt((u.x-q.x)*(u.x-q.x)+(u.y-q.y)*(u.y-q.y));at(o.hfov+(E-B)*.1),E=B}var me=o.hfov/360*o.touchPanSpeedCoeffFactor,pe=(p-y)*me+T;I.yaw=(pe-o.yaw)%360*.2,o.yaw=pe;var we=(F-a)*me+b;I.pitch=(we-o.pitch)*.2,o.pitch=we}}function Te(){L=!1,Date.now()-h>150&&(I.pitch=I.yaw=0),E=-1,h=Date.now(),ht("touchend",event)}var Ce=[],Ae=[];function Ye(l){l.pointerType=="touch"&&(Ce.push(l.pointerId),Ae.push({clientX:l.clientX,clientY:l.clientY}),l.targetTouches=Ae,We(l),l.preventDefault())}function De(l){if(l.pointerType=="touch"){for(var u=0;u<Ce.length;u++)if(l.pointerId==Ce[u]){Ae[u].clientX=l.clientX,Ae[u].clientY=l.clientY,l.targetTouches=Ae,Be(l),l.preventDefault();return}}}function Se(l){if(l.pointerType=="touch"){for(var u=!1,y=0;y<Ce.length;y++)l.pointerId==Ce[y]&&(Ce[y]=n),Ce[y]&&(u=!0);u||(Ce=[],Ae=[],Te()),l.preventDefault()}}function Ge(l){!k||o.mouseZoom=="fullscreenonly"&&!M||(l.preventDefault(),on(),h=Date.now(),l.wheelDeltaY?(at(o.hfov-l.wheelDeltaY*.05),I.hfov=l.wheelDelta<0?1:-1):l.wheelDelta?(at(o.hfov-l.wheelDelta*.05),I.hfov=l.wheelDelta<0?1:-1):l.detail&&(at(o.hfov+l.detail*1.5),I.hfov=l.detail>0?1:-1),xe())}function Fe(l){on(),h=Date.now(),Ft(),o.roll=0;var u=l.which||l.keycode;o.capturedKeyNumbers.indexOf(u)<0||(l.preventDefault(),u==27?M&&An():Re(u,!0))}function et(){for(var l=0;l<10;l++)m[l]=!1}function Ze(l){var u=l.which||l.keycode;o.capturedKeyNumbers.indexOf(u)<0||(l.preventDefault(),Re(u,!1))}function Re(l,u){var y=!1;switch(l){case 109:case 189:case 17:case 173:m[0]!=u&&(y=!0),m[0]=u;break;case 107:case 187:case 16:case 61:m[1]!=u&&(y=!0),m[1]=u;break;case 38:m[2]!=u&&(y=!0),m[2]=u;break;case 87:m[6]!=u&&(y=!0),m[6]=u;break;case 40:m[3]!=u&&(y=!0),m[3]=u;break;case 83:m[7]!=u&&(y=!0),m[7]=u;break;case 37:m[4]!=u&&(y=!0),m[4]=u;break;case 65:m[8]!=u&&(y=!0),m[8]=u;break;case 39:m[5]!=u&&(y=!0),m[5]=u;break;case 68:m[9]!=u&&(y=!0),m[9]=u}y&&u&&(typeof performance<"u"&&performance.now()?G=performance.now():G=Date.now(),xe())}function $(){if(k){var l=!1,u=o.pitch,y=o.yaw,F=o.hfov,q;typeof performance<"u"&&performance.now()?q=performance.now():q=Date.now(),G===n&&(G=q);var B=(q-G)*o.hfov/1700;if(B=Math.min(B,1),m[0]&&o.keyboardZoom===!0&&(at(o.hfov+(I.hfov*.8+.5)*B),l=!0),m[1]&&o.keyboardZoom===!0&&(at(o.hfov+(I.hfov*.8-.2)*B),l=!0),(m[2]||m[6])&&(o.pitch+=(I.pitch*.8+.2)*B,l=!0),(m[3]||m[7])&&(o.pitch+=(I.pitch*.8-.2)*B,l=!0),(m[4]||m[8])&&(o.yaw+=(I.yaw*.8-.2)*B,l=!0),(m[5]||m[9])&&(o.yaw+=(I.yaw*.8+.2)*B,l=!0),l&&(h=Date.now()),o.autoRotate){if(q-G>.001){var me=(q-G)/1e3,pe=(I.yaw/me*B-o.autoRotate*.2)*me;pe=(-o.autoRotate>0?1:-1)*Math.min(Math.abs(o.autoRotate*me),Math.abs(pe)),o.yaw+=pe}o.autoRotateStopDelay&&(o.autoRotateStopDelay-=q-G,o.autoRotateStopDelay<=0&&(o.autoRotateStopDelay=!1,K=o.autoRotate,o.autoRotate=0))}if(U.pitch&&(se("pitch"),u=o.pitch),U.yaw&&(se("yaw"),y=o.yaw),U.hfov&&(se("hfov"),F=o.hfov),B>0&&!o.autoRotate){var we=.85;!m[4]&&!m[5]&&!m[8]&&!m[9]&&!U.yaw&&(o.yaw+=I.yaw*B*we),!m[2]&&!m[3]&&!m[6]&&!m[7]&&!U.pitch&&(o.pitch+=I.pitch*B*we),!m[0]&&!m[1]&&!U.hfov&&at(o.hfov+I.hfov*B*we)}if(G=q,B>0){I.yaw=I.yaw*.8+(o.yaw-y)/B*.2,I.pitch=I.pitch*.8+(o.pitch-u)/B*.2,I.hfov=I.hfov*.8+(o.hfov-F)/B*.2;var Pe=o.autoRotate?Math.abs(o.autoRotate):5;I.yaw=Math.min(Pe,Math.max(I.yaw,-Pe)),I.pitch=Math.min(Pe,Math.max(I.pitch,-Pe)),I.hfov=Math.min(Pe,Math.max(I.hfov,-Pe))}m[0]&&m[1]&&(I.hfov=0),(m[2]||m[6])&&(m[3]||m[7])&&(I.pitch=0),(m[4]||m[8])&&(m[5]||m[9])&&(I.yaw=0)}}function se(l){var u=U[l],y=Math.min(1,Math.max((Date.now()-u.startTime)/1e3/(u.duration/1e3),0)),F=u.startPosition+o.animationTimingFunction(y)*(u.endPosition-u.startPosition);if(u.endPosition>u.startPosition&&F>=u.endPosition||u.endPosition<u.startPosition&&F<=u.endPosition||u.endPosition===u.startPosition){F=u.endPosition,I[l]=0;var q=U[l].callback,B=U[l].callbackArgs;delete U[l],typeof q=="function"&&q(B)}o[l]=F}function A(l){return l<.5?2*l*l:-1+(4-2*l)*l}function fe(){ft()}function xe(){S||(S=!0,_e())}function _e(){if(Ne(),ee&&clearTimeout(ee),L||J===!0)requestAnimationFrame(_e);else if(m[0]||m[1]||m[2]||m[3]||m[4]||m[5]||m[6]||m[7]||m[8]||m[9]||o.autoRotate||U.pitch||U.yaw||U.hfov||Math.abs(I.yaw)>.01||Math.abs(I.pitch)>.01||Math.abs(I.hfov)>.01)$(),o.autoRotateInactivityDelay>=0&&K&&Date.now()-h>o.autoRotateInactivityDelay&&!o.autoRotate&&(o.autoRotate=K,d.lookAt(ce,n,j,3e3)),requestAnimationFrame(_e);else if(v&&(v.isLoading()||o.dynamic===!0&&z))requestAnimationFrame(_e);else{S=!1,G=n;var l=o.autoRotateInactivityDelay-(Date.now()-h);l>0?ee=setTimeout(function(){o.autoRotate=K,d.lookAt(ce,n,j,3e3),xe()},l):o.autoRotateInactivityDelay>=0&&K&&(o.autoRotate=K,d.lookAt(ce,n,j,3e3),xe())}}function Ne(){var l;if(k){o.yaw>180?o.yaw-=360:o.yaw<-180&&(o.yaw+=360),l=o.yaw;var u=0;if(o.avoidShowingBackground){var we=v.getCanvas(),y=o.hfov/2,F=Math.atan2(Math.tan(y/180*Math.PI),we.width/we.height)*180/Math.PI,q=o.vaov>o.haov;q?F*(1-Math.min(Math.cos((o.pitch-y)/180*Math.PI),Math.cos((o.pitch+y)/180*Math.PI))):u=y*(1-Math.min(Math.cos((o.pitch-F)/180*Math.PI),Math.cos((o.pitch+F)/180*Math.PI)))}var B=o.maxYaw-o.minYaw,me=-180,pe=180;B<360&&(me=o.minYaw+o.hfov/2+u,pe=o.maxYaw-o.hfov/2-u,B<o.hfov&&(me=pe=(me+pe)/2),o.yaw=Math.max(me,Math.min(pe,o.yaw))),o.autoRotate!==!1&&l!=o.yaw&&G!==n&&(o.autoRotate*=-1);var we=v.getCanvas(),Pe=2*Math.atan(Math.tan(o.hfov/180*Math.PI*.5)/(we.width/we.height))/Math.PI*180,Le=o.minPitch+Pe/2,nt=o.maxPitch-Pe/2,tt=o.maxPitch-o.minPitch;tt<Pe&&(Le=nt=(Le+nt)/2),isNaN(Le)&&(Le=-90),isNaN(nt)&&(nt=90),o.pitch=Math.max(Le,Math.min(nt,o.pitch)),v.render(o.pitch*Math.PI/180,o.yaw*Math.PI/180,o.hfov*Math.PI/180,{roll:o.roll*Math.PI/180}),yr(),o.compass&&(He.style.transform="rotate("+(-o.yaw-o.northOffset)+"deg)",He.style.webkitTransform="rotate("+(-o.yaw-o.northOffset)+"deg)"),o.onRender&&o.onRender()}}function le(l,u,y,F){this.w=l,this.x=u,this.y=y,this.z=F}le.prototype.multiply=function(l){return new le(this.w*l.w-this.x*l.x-this.y*l.y-this.z*l.z,this.x*l.w+this.w*l.x+this.y*l.z-this.z*l.y,this.y*l.w+this.w*l.y+this.z*l.x-this.x*l.z,this.z*l.w+this.w*l.z+this.x*l.y-this.y*l.x)},le.prototype.toEulerAngles=function(){var l=Math.atan2(2*(this.w*this.x+this.y*this.z),1-2*(this.x*this.x+this.y*this.y)),u=Math.asin(2*(this.w*this.y-this.z*this.x)),y=Math.atan2(2*(this.w*this.z+this.x*this.y),1-2*(this.y*this.y+this.z*this.z));return[l,u,y]};function Es(l,u,y){var F=[u?u*Math.PI/180/2:0,y?y*Math.PI/180/2:0,l?l*Math.PI/180/2:0],q=[Math.cos(F[0]),Math.cos(F[1]),Math.cos(F[2])],B=[Math.sin(F[0]),Math.sin(F[1]),Math.sin(F[2])];return new le(q[0]*q[1]*q[2]-B[0]*B[1]*B[2],B[0]*q[1]*q[2]-q[0]*B[1]*B[2],q[0]*B[1]*q[2]+B[0]*q[1]*B[2],q[0]*q[1]*B[2]+B[0]*B[1]*q[2])}function Cs(l,u,y){var F=Es(l,u,y);F=F.multiply(new le(Math.sqrt(.5),-Math.sqrt(.5),0,0));var q=e.orientation?-e.orientation*Math.PI/180/2:0;return F.multiply(new le(Math.cos(q),0,-Math.sin(q),0))}function vr(l){var u=Cs(l.alpha,l.beta,l.gamma).toEulerAngles();typeof J=="number"&&J<10?J+=1:J===10?(O=u[2]/Math.PI*180+o.yaw,J=!0,requestAnimationFrame(_e)):(o.pitch=u[0]/Math.PI*180,o.roll=-u[1]/Math.PI*180,o.yaw=-u[2]/Math.PI*180+O)}function Ms(){try{var l={};o.horizonPitch!==n&&(l.horizonPitch=o.horizonPitch*Math.PI/180),o.horizonRoll!==n&&(l.horizonRoll=o.horizonRoll*Math.PI/180),o.backgroundColor!==n&&(l.backgroundColor=o.backgroundColor),v.init(D,o.type,o.dynamic,o.haov*Math.PI/180,o.vaov*Math.PI/180,o.vOffset*Math.PI/180,Ls,l),o.dynamic!==!0&&(D=n)}catch(u){if(u.type=="webgl error"||u.type=="no webgl")V();else if(u.type=="webgl size error")V(o.strings.textureSizeError.replace("%s",u.width).replace("%s",u.maxWidth));else throw V(o.strings.unknownError),u}}function Ls(){if(o.sceneFadeDuration&&v.fadeImg!==n){v.fadeImg.style.opacity=0;var l=v.fadeImg;delete v.fadeImg,setTimeout(function(){ne.removeChild(l),ht("scenechangefadedone")},o.sceneFadeDuration)}o.compass?He.style.display="inline":He.style.display="none",ks(),N.load.box.style.display="none",f!==n&&(ne.removeChild(f),f=n),k=!0,ht("load"),xe()}function _r(l){l.pitch=Number(l.pitch)||0,l.yaw=Number(l.yaw)||0;var u=t.createElement("div");u.className="pnlm-hotspot-base",l.cssClass?u.className+=" "+l.cssClass:u.className+=" pnlm-hotspot pnlm-sprite pnlm-"+xt(l.type);var y=t.createElement("span");l.text&&(y.innerHTML=xt(l.text));var F;if(l.video){var q=t.createElement("video"),B=l.video;o.basePath&&!x(B)&&(B=o.basePath+B),q.src=Et(B),q.controls=!0,q.style.width=l.width+"px",ne.appendChild(u),y.appendChild(q)}else if(l.image){var B=l.image;o.basePath&&!x(B)&&(B=o.basePath+B),F=t.createElement("a"),F.href=Et(l.URL?l.URL:B),F.target="_blank",y.appendChild(F);var me=t.createElement("img");me.src=Et(B),me.style.width=l.width+"px",me.style.paddingTop="5px",ne.appendChild(u),F.appendChild(me),y.style.maxWidth="initial"}else l.URL?(F=t.createElement("a"),F.href=Et(l.URL),F.target="_blank",ne.appendChild(F),u.className+=" pnlm-pointer",y.className+=" pnlm-pointer",F.appendChild(u)):(l.sceneId&&(u.onclick=u.ontouchend=function(){return u.clicked||(u.clicked=!0,Dn(l.sceneId,l.targetPitch,l.targetYaw,l.targetHfov)),!1},u.className+=" pnlm-pointer",y.className+=" pnlm-pointer"),ne.appendChild(u));l.createTooltipFunc?l.createTooltipFunc(u,l.createTooltipArgs):(l.text||l.video||l.image)&&(u.classList.add("pnlm-tooltip"),u.appendChild(y),y.style.width=y.scrollWidth-20+"px",y.style.marginLeft=-(y.scrollWidth-u.offsetWidth)/2+"px",y.style.marginTop=-y.scrollHeight-12+"px"),l.clickHandlerFunc&&(u.addEventListener("click",function(pe){l.clickHandlerFunc(pe,l.clickHandlerArgs)},"false"),u.className+=" pnlm-pointer",y.className+=" pnlm-pointer"),l.div=u}function ks(){H||(o.hotSpots?(o.hotSpots=o.hotSpots.sort(function(l,u){return l.pitch<u.pitch}),o.hotSpots.forEach(_r)):o.hotSpots=[],H=!0,yr())}function Is(){var l=o.hotSpots;if(H=!1,delete o.hotSpots,l)for(var u=0;u<l.length;u++){for(var y=l[u].div;y.parentNode!=ne;)y=y.parentNode;ne.removeChild(y),delete l[u].div}}function wr(l){var u=Math.sin(l.pitch*Math.PI/180),y=Math.cos(l.pitch*Math.PI/180),F=Math.sin(o.pitch*Math.PI/180),q=Math.cos(o.pitch*Math.PI/180),B=Math.cos((-l.yaw+o.yaw)*Math.PI/180),me=u*F+y*B*q;if(l.yaw<=90&&l.yaw>-90&&me<=0||(l.yaw>90||l.yaw<=-90)&&me<=0)l.div.style.visibility="hidden";else{var pe=Math.sin((-l.yaw+o.yaw)*Math.PI/180),we=Math.tan(o.hfov*Math.PI/360);l.div.style.visibility="visible";var Pe=v.getCanvas(),Le=Pe.clientWidth,nt=Pe.clientHeight,tt=[-Le/we*pe*y/me/2,-Le/we*(u*q-y*B*F)/me/2],vt=Math.sin(o.roll*Math.PI/180),Er=Math.cos(o.roll*Math.PI/180);tt=[tt[0]*Er-tt[1]*vt,tt[0]*vt+tt[1]*Er],tt[0]+=(Le-l.div.offsetWidth)/2,tt[1]+=(nt-l.div.offsetHeight)/2;var zn="translate("+tt[0]+"px, "+tt[1]+"px) translateZ(9999px) rotate("+o.roll+"deg)";l.div.style.webkitTransform=zn,l.div.style.MozTransform=zn,l.div.style.transform=zn}}function yr(){o.hotSpots.forEach(wr)}function nn(l){o={};var u,y,F=["haov","vaov","vOffset","northOffset","horizonPitch","horizonRoll"];Z=[];for(u in ue)ue.hasOwnProperty(u)&&(o[u]=ue[u]);for(u in i.default)if(i.default.hasOwnProperty(u))if(u=="strings")for(y in i.default.strings)i.default.strings.hasOwnProperty(y)&&(o.strings[y]=xt(i.default.strings[y]));else o[u]=i.default[u],F.indexOf(u)>=0&&Z.push(u);if(l!==null&&l!==""&&i.scenes&&i.scenes[l]){var q=i.scenes[l];for(u in q)if(q.hasOwnProperty(u))if(u=="strings")for(y in q.strings)q.strings.hasOwnProperty(y)&&(o.strings[y]=xt(q.strings[y]));else o[u]=q[u],F.indexOf(u)>=0&&Z.push(u);o.scene=l}for(u in i)if(i.hasOwnProperty(u))if(u=="strings")for(y in i.strings)i.strings.hasOwnProperty(y)&&(o.strings[y]=xt(i.strings[y]));else o[u]=i[u],F.indexOf(u)>=0&&Z.push(u)}function Rn(l){if(l=l||!1,l&&"preview"in o){var u=o.preview;o.basePath&&!x(u)&&(u=o.basePath+u),f=t.createElement("div"),f.className="pnlm-preview-img",f.style.backgroundImage="url('"+Ns(u)+"')",ne.appendChild(f)}var y=o.title,F=o.author;l&&("previewTitle"in o&&(o.title=o.previewTitle),"previewAuthor"in o&&(o.author=o.previewAuthor)),o.hasOwnProperty("title")||(N.title.innerHTML=""),o.hasOwnProperty("author")||(N.author.innerHTML=""),!o.hasOwnProperty("title")&&!o.hasOwnProperty("author")&&(N.container.style.display="none"),Q.load.innerHTML="<p>"+o.strings.loadButtonLabel+"</p>",N.load.boxp.innerHTML=o.strings.loadingLabel;for(var q in o)if(o.hasOwnProperty(q))switch(q){case"title":N.title.innerHTML=xt(o[q]),N.container.style.display="inline";break;case"author":N.author.innerHTML=o.strings.bylineLabel.replace("%s",xt(o[q])),N.container.style.display="inline";break;case"fallback":var B=t.createElement("a");B.href=Et(o[q]),B.target="_blank",B.textContent="Click here to view this panorama in an alternative viewer.";var me=t.createElement("p");me.textContent="Your browser does not support WebGL.",me.appendChild(t.createElement("br")),me.appendChild(B),N.errorMsg.innerHTML="",N.errorMsg.appendChild(me);break;case"hfov":at(Number(o[q]));break;case"autoLoad":o[q]===!0&&v===n&&(N.load.box.style.display="inline",Q.load.style.display="none",g());break;case"showZoomCtrl":o[q]&&o.showControls!=!1?Q.zoom.style.display="block":Q.zoom.style.display="none";break;case"showFullscreenCtrl":o[q]&&o.showControls!=!1&&("fullscreen"in t||"mozFullScreen"in t||"webkitIsFullScreen"in t||"msFullscreenElement"in t)?Q.fullscreen.style.display="block":Q.fullscreen.style.display="none";break;case"hotSpotDebug":o[q]?Ee.style.display="block":Ee.style.display="none";break;case"showControls":o[q]||(Q.orientation.style.display="none",Q.zoom.style.display="none",Q.fullscreen.style.display="none");break;case"orientationOnByDefault":o[q]&&(Me===n?Oe=!0:Me===!0&&rn());break}l&&(y?o.title=y:delete o.title,F?o.author=F:delete o.author)}function An(){if(k&&!_)if(M)t.exitFullscreen?t.exitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.webkitCancelFullScreen?t.webkitCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen();else try{s.requestFullscreen?s.requestFullscreen():s.mozRequestFullScreen?s.mozRequestFullScreen():s.msRequestFullscreen?s.msRequestFullscreen():s.webkitRequestFullScreen()}catch{}}function ft(){var l=e.innerWidth==screen.width&&e.innerHeight==screen.height;t.fullscreen||t.mozFullScreen||t.webkitIsFullScreen||t.msFullscreenElement||l?(Q.fullscreen.classList.add("pnlm-fullscreen-toggle-button-active"),M=!0):(Q.fullscreen.classList.remove("pnlm-fullscreen-toggle-button-active"),M=!1),v.resize(),at(o.hfov),xe()}function Ts(){k&&(at(o.hfov-5),xe())}function Ss(){k&&(at(o.hfov+5),xe())}function br(l){var u=o.minHfov;if(o.type=="multires"&&v&&(u=Math.min(u,v.getCanvas().width/(o.multiRes.cubeResolution/90*.9))),u>o.maxHfov)return console.log("HFOV bounds do not make sense (minHfov > maxHfov)."),o.hfov;var y=o.hfov;if(l<u?y=u:l>o.maxHfov?y=o.maxHfov:y=l,o.avoidShowingBackground&&v){var F=v.getCanvas();y=Math.min(y,Math.atan(Math.tan((o.maxPitch-o.minPitch)/360*Math.PI)/F.height*F.width)*360/Math.PI)}return y}function at(l){o.hfov=br(l)}function on(){U={},K=o.autoRotate?o.autoRotate:K,o.autoRotate=!1}function xr(){w(),k=!1,Q.load.style.display="none",N.load.box.style.display="inline",g()}function Dn(l,u,y,F,q){k=!1,U={};var B,me,pe,we;if(o.sceneFadeDuration&&!q){var Pe=v.render(o.pitch*Math.PI/180,o.yaw*Math.PI/180,o.hfov*Math.PI/180,{returnImage:!0});if(Pe!==n){B=new Image,B.className="pnlm-fade-img",B.style.transition="opacity "+o.sceneFadeDuration/1e3+"s",B.style.width="100%",B.style.height="100%",B.onload=function(){Dn(l,u,y,F,!0)},B.src=Pe,ne.appendChild(B),v.fadeImg=B;return}}u==="same"?me=o.pitch:me=u,y==="same"?pe=o.yaw:y==="sameAzimuth"?pe=o.yaw+(o.northOffset||0)-(i.scenes[l].northOffset||0):pe=y,F==="same"?we=o.hfov:we=F,Is(),nn(l),I.yaw=I.pitch=I.hfov=0,Rn(),me!==n&&(o.pitch=me),pe!==n&&(o.yaw=pe),we!==n&&(o.hfov=we),ht("scenechange",l),xr()}function Ft(){e.removeEventListener("deviceorientation",vr),Q.orientation.classList.remove("pnlm-orientation-button-active"),J=!1}function rn(){J=1,e.addEventListener("deviceorientation",vr),Q.orientation.classList.add("pnlm-orientation-button-active")}function xt(l){return i.escapeHTML?String(l).split(/&/g).join("&").split('"').join(""").split("'").join("'").split("<").join("<").split(">").join(">").split("/").join("/").split(`
|
|
5
5
|
`).join("<br>"):String(l).split(`
|
|
6
|
-
`).join("<br>")}function Et(l){return l.trim().toLowerCase().indexOf("javascript:")===0?"about:blank":l}function Ss(l){return Et(l).replace(/"/g,"%22").replace(/'/g,"%27")}this.isLoaded=function(){return!!C},this.getPitch=function(){return o.pitch},this.setPitch=function(l,u,y,F){return u=u==n?1e3:Number(u),u?O.pitch={startTime:Date.now(),startPosition:o.pitch,endPosition:l,duration:u,callback:y,callbackArgs:F}:o.pitch=l,Ee(),this},this.getPitchBounds=function(){return[o.minPitch,o.maxPitch]},this.setPitchBounds=function(l){return o.minPitch=Math.max(-90,Math.min(l[0],90)),o.maxPitch=Math.max(-90,Math.min(l[1],90)),this},this.getYaw=function(){return o.yaw},this.setYaw=function(l,u,y,F){return u=u==n?1e3:Number(u),l=(l+180)%360-180,u?(o.yaw-l>180?l+=360:l-o.yaw>180&&(l-=360),O.yaw={startTime:Date.now(),startPosition:o.yaw,endPosition:l,duration:u,callback:y,callbackArgs:F}):o.yaw=l,Ee(),this},this.getYawBounds=function(){return[o.minYaw,o.maxYaw]},this.setYawBounds=function(l){return o.minYaw=Math.max(-180,Math.min(l[0],180)),o.maxYaw=Math.max(-180,Math.min(l[1],180)),this},this.getHfov=function(){return o.hfov},this.setHfov=function(l,u,y,F){return u=u==n?1e3:Number(u),u?O.hfov={startTime:Date.now(),startPosition:o.hfov,endPosition:br(l),duration:u,callback:y,callbackArgs:F}:at(l),Ee(),this},this.getHfovBounds=function(){return[o.minHfov,o.maxHfov]},this.setHfovBounds=function(l){return o.minHfov=Math.max(0,l[0]),o.maxHfov=Math.max(0,l[1]),this},this.lookAt=function(l,u,y,F,j,B){return F=F==n?1e3:Number(F),l!==n&&(this.setPitch(l,F,j,B),j=n),u!==n&&(this.setYaw(u,F,j,B),j=n),y!==n&&this.setHfov(y,F,j,B),this},this.getNorthOffset=function(){return o.northOffset},this.setNorthOffset=function(l){return o.northOffset=Math.min(360,Math.max(0,l)),Ee(),this},this.getHorizonRoll=function(){return o.horizonRoll},this.setHorizonRoll=function(l){return o.horizonRoll=Math.min(90,Math.max(-90,l)),v.setPose(o.horizonPitch*Math.PI/180,o.horizonRoll*Math.PI/180),Ee(),this},this.getHorizonPitch=function(){return o.horizonPitch},this.setHorizonPitch=function(l){return o.horizonPitch=Math.min(90,Math.max(-90,l)),v.setPose(o.horizonPitch*Math.PI/180,o.horizonRoll*Math.PI/180),Ee(),this},this.startAutoRotate=function(l){return l=l||N||1,o.autoRotate=l,d.lookAt(me,n,U,3e3),Ee(),this},this.stopAutoRotate=function(){return N=o.autoRotate?o.autoRotate:N,o.autoRotate=!1,o.autoRotateInactivityDelay=-1,this},this.getRenderer=function(){return v},this.setUpdate=function(l){return P=l===!0,v===n?V():Ee(),this},this.mouseEventToCoords=function(l){return Ne(l)},this.loadScene=function(l,u,y,F){return C!==!1&&An(l,u,y,F),this},this.getScene=function(){return o.scene},this.addScene=function(l,u){return i.scenes[l]=u,this},this.removeScene=function(l){return o.scene===l||!i.scenes.hasOwnProperty(l)?!1:(delete i.scenes[l],!0)},this.toggleFullscreen=function(){return Rn(),this},this.getConfig=function(){return o},this.getContainer=function(){return s},this.addHotSpot=function(l,u){if(u===n&&o.scene===n)o.hotSpots.push(l);else{var y=u!==n?u:o.scene;if(i.scenes.hasOwnProperty(y))i.scenes[y].hasOwnProperty("hotSpots")||(i.scenes[y].hotSpots=[],y==o.scene&&(o.hotSpots=i.scenes[y].hotSpots)),i.scenes[y].hotSpots.push(l);else throw"Invalid scene ID!"}return(u===n||o.scene==u)&&(_r(l),C&&wr(l)),this},this.removeHotSpot=function(l,u){if(u===n||o.scene==u){if(!o.hotSpots)return!1;for(var y=0;y<o.hotSpots.length;y++)if(o.hotSpots[y].hasOwnProperty("id")&&o.hotSpots[y].id===l){for(var F=o.hotSpots[y].div;F.parentNode!=$;)F=F.parentNode;return $.removeChild(F),delete o.hotSpots[y].div,o.hotSpots.splice(y,1),!0}}else if(i.scenes.hasOwnProperty(u)){if(!i.scenes[u].hasOwnProperty("hotSpots"))return!1;for(var y=0;y<i.scenes[u].hotSpots.length;y++)if(i.scenes[u].hotSpots[y].hasOwnProperty("id")&&i.scenes[u].hotSpots[y].id===l)return i.scenes[u].hotSpots.splice(y,1),!0}else return!1},this.resize=function(){v&&pe()},this.isLoaded=function(){return C},this.isOrientationSupported=function(){return Ce||!1},this.stopOrientation=function(){Ft()},this.startOrientation=function(){Ce&&rn()},this.isOrientationActive=function(){return!!K},this.on=function(l,u){return A[l]=A[l]||[],A[l].push(u),this},this.off=function(l,u){if(!l)return A={},this;if(u){var y=A[l].indexOf(u);y>=0&&A[l].splice(y,1),A[l].length==0&&delete A[l]}else delete A[l];return this};function ht(l){if(l in A)for(var u=A[l].length;u>0;u--)A[l][A[l].length-u].apply(null,[].slice.call(arguments,1))}this.destroy=function(){v&&v.destroy(),L&&(J.removeEventListener("mousedown",he,!1),J.removeEventListener("dblclick",re,!1),t.removeEventListener("mousemove",Pe,!1),t.removeEventListener("mouseup",Fe,!1),s.removeEventListener("mousewheel",Ye,!1),s.removeEventListener("DOMMouseScroll",Ye,!1),s.removeEventListener("mozfullscreenchange",ft,!1),s.removeEventListener("webkitfullscreenchange",ft,!1),s.removeEventListener("msfullscreenchange",ft,!1),s.removeEventListener("fullscreenchange",ft,!1),e.removeEventListener("resize",pe,!1),e.removeEventListener("orientationchange",pe,!1),s.removeEventListener("keydown",Ve,!1),s.removeEventListener("keyup",Xe,!1),s.removeEventListener("blur",et,!1),t.removeEventListener("mouseleave",Fe,!1),J.removeEventListener("touchstart",ze,!1),J.removeEventListener("touchmove",Ue,!1),J.removeEventListener("touchend",Oe,!1),J.removeEventListener("pointerdown",qe,!1),J.removeEventListener("pointermove",Ae,!1),J.removeEventListener("pointerup",ke,!1),J.removeEventListener("pointerleave",ke,!1)),s.innerHTML="",s.classList.remove("pnlm-container"),D.classList.remove("pnlm-grab"),D.classList.remove("pnlm-grabbing")}}return{viewer:function(i,d){return new r(i,d)}}}(window,document),window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)}}());var ur,dr;function Ga(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Za(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function $a(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Kt=(dr=ur=function(e){$a(t,e);function t(n){Ga(this,t);var r=Za(this,e.call(this,n));return r.renderImage=function(s){var i=r.props.children,d=[].concat(i),o=[];Array.isArray(d)&&d.map(function(h){switch(h.props.type){case"info":return o.push({id:Math.random().toString(36).substr(2,9),type:h.props.type,pitch:h.props.pitch?h.props.pitch:10,yaw:h.props.yaw?h.props.yaw:10,text:h.props.text?h.props.text:"",URL:h.props.URL?h.props.URL:""});case"custom":return o.push({id:Math.random().toString(36).substr(2,9),pitch:h.props.pitch?h.props.pitch:10,yaw:h.props.yaw?h.props.yaw:10,cssClass:h.props.cssClass?h.props.cssClass:"tooltipcss",createTooltipFunc:h.props.tooltip?h.props.tooltip:r.hotspotTooltip,createTooltipArgs:h.props.tooltipArg?h.props.tooltipArg:{},clickHandlerFunc:h.props.handleClick?h.props.handleClick:r.handleClickHotspot,clickHandlerArgs:h.props.handleClickArg?h.props.handleClickArg:{name:"test"}});default:return[]}});var v={type:"equirectangular",panorama:r.props.image,haov:r.props.haov,vaov:r.props.vaov,vOffset:r.props.vOffset,yaw:r.props.yaw,pitch:r.props.pitch,hfov:r.props.hfov,minHfov:r.props.minHfov,maxHfov:r.props.maxHfov,minPitch:r.props.minPitch,maxPitch:r.props.maxPitch,minYaw:r.props.minYaw,maxYaw:r.props.maxYaw,autoRotate:r.props.autoRotate,compass:r.props.compass,preview:r.props.preview,previewTitle:r.props.previewTitle,previewAuthor:r.props.previewAuthor,author:r.props.author,title:r.props.title,autoLoad:r.props.autoLoad,orientationOnByDefault:r.props.orientationOnByDefault,showZoomCtrl:r.props.showZoomCtrl,keyboardZoom:r.props.keyboardZoom,mouseZoom:r.props.mouseZoom,draggable:r.props.draggable,disableKeyboardCtrl:r.props.disableKeyboardCtrl,showFullscreenCtrl:r.props.showFullscreenCtrl,showControls:r.props.showControls,hotSpotDebug:r.props.hotspotDebug,hotSpots:o,onRender:r.props.onRender};Object.keys(v).forEach(function(h){return v[h]===""&&delete v[h]}),s==="update"&&r.panorama.destroy(),r.panorama=pannellum.viewer(r.props.id?r.props.id:r.state.id,v),r.panorama.on("load",r.props.onLoad),r.panorama.on("scenechange",r.props.onScenechange),r.panorama.on("scenechangefadedone",r.props.onScenechangefadedone),r.panorama.on("error",r.props.onError),r.panorama.on("errorcleared",r.props.onErrorcleared),r.panorama.on("mousedown",r.props.onMousedown),r.panorama.on("mouseup",r.props.onMouseup),r.panorama.on("touchstart",r.props.onTouchstart),r.panorama.on("touchend",r.props.onTouchend)},r.componentDidMount=function(){r.renderImage("mount")},r.handleClickHotspot=function(s,i){console.log("hotspot clicked",i.name)},r.hotspotTooltip=function(s,i){s.setAttribute("id","textInfo");var d=document.createElement("div");d.classList.add("hotspot");var o=document.createElement("div");o.classList.add("out");var v=document.createElement("div");v.classList.add("in");var h=document.createElement("div");h.classList.add("image"),s.appendChild(d),d.appendChild(v),d.appendChild(o)},r.getViewer=function(){return r.panorama},r.forceRender=function(){r.renderImage("update")},r.state={id:Math.random().toString(36).substr(2,9)},r}return t.prototype.componentDidUpdate=function(r,s,i){(r.image!==this.props.image||r.width!==this.props.width||r.height!==this.props.height||r.compass!==this.props.compass||r.title!==this.props.title||r.author!==this.props.author||r.preview!==this.props.preview||r.previewTitle!==this.props.previewTitle||r.previewAuthor!==this.props.previewAuthor||r.showZoomCtrl!==this.props.showZoomCtrl||r.showFullscreenCtrl!==this.props.showFullscreenCtrl||r.showControls!==this.props.showControls||r.children.length!==this.props.children.length)&&this.renderImage("update"),(r.maxYaw!==this.props.maxYaw||r.minYaw!==this.props.minYaw||r.maxPitch!==this.props.maxPitch||r.minPitch!==this.props.minPitch||r.maxHfov!==this.props.maxHfov||r.minHfov!==this.props.minHfov)&&(this.panorama.setYawBounds([this.props.minYaw,this.props.maxYaw]),this.panorama.setPitchBounds([this.props.minPitch,this.props.maxPitch]),this.panorama.setHfovBounds([this.props.minHfov,this.props.maxHfov])),r.yaw!==this.props.yaw&&this.panorama.setYaw(this.props.yaw),r.pitch!==this.props.pitch&&this.panorama.setPitch(this.props.pitch),r.hfov!==this.props.hfov&&this.panorama.setHfov(this.props.hfov)},t.prototype.render=function(){var r=this,s=this.props,i=s.width,d=s.height,o={width:i,height:d};return Cn.createElement("div",{id:this.props.id?this.props.id:this.state.id,style:o,ref:function(h){return r.imageNode=h}})},t}(Xt),ur.defaultProps={children:[],width:"100%",height:"400px",image:"",haov:360,vaov:180,vOffset:0,yaw:0,pitch:0,hfov:100,minHfov:50,maxHfov:150,minPitch:-90,maxPitch:90,minYaw:-180,maxYaw:180,autoRotate:0,compass:!1,preview:"",previewTitle:"",previewAuthor:"",title:"",author:"",autoLoad:!1,orientationOnByDefault:!1,showZoomCtrl:!0,keyboardZoom:!0,mouseZoom:!0,draggable:!0,disableKeyboardCtrl:!1,showFullscreenCtrl:!0,showControls:!0,onLoad:function(){},onScenechange:function(){},onScenechangefadedone:function(){},onError:function(){},onErrorcleared:function(){},onMousedown:function(){},onMouseup:function(){},onTouchstart:function(){},onTouchend:function(){},hotspotDebug:!1,onRender:null},dr);Kt.propTypes={},Kt.Hotspot=function(){},Kt.Hotspot=function(){};const pr=100,Jt=100,Qt=50,ja=0,qa=0,Ka=e=>{const[t,n]=xe(0),[r,s]=xe(!1);return fe(()=>{const i=XMLHttpRequest.prototype.open,d=XMLHttpRequest.prototype.send;let o=!1;return XMLHttpRequest.prototype.open=function(v,h,k=!0,f,p){return h.toString().includes(e)&&(o=!0,s(!0)),i.call(this,v,h,k,f||null,p||null)},XMLHttpRequest.prototype.send=function(v){return o&&(this.addEventListener("progress",h=>{if(h.lengthComputable){const k=Math.round(h.loaded/h.total*100);n(k)}}),this.addEventListener("loadend",()=>{o=!1,n(100),s(!1)})),d.call(this,v)},()=>{XMLHttpRequest.prototype.open=i,XMLHttpRequest.prototype.send=d}},[e]),[t,r]};function Ja(e,t=50,n=200){let r=null,s=0;return(...i)=>{const d=Date.now();r&&(clearTimeout(r),r=null),d-s>=t&&(e(...i),s=d),r=setTimeout(()=>{e(...i)},n)}}const Qa=({className:e})=>c($e,{className:e,customizationKey:"UI_INTERIOR_360_PLAY",children:c("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c("polygon",{points:"6 3 20 12 6 21 6 3"})})}),ei=({itemIndex:e,isPannellumLoaded:t,isLoading:n,progress:r,autoloadInterior360:s,loadScene:i})=>{const{emitAnalyticsEvent:d}=Je(),{displayedCategoryId:o,displayedCategoryName:v}=Qe(),h=X(f=>{d({type:"track",category_id:o,category_name:v,item_type:"interior-360",item_position:e,action_properties:{action_name:"Interior 360 Play",action_field:"interior_360_play",action_value:f}})},[d,o,v,e]),k=X(()=>{i(),h("click")},[i,h]);return fe(()=>{s&&(i(),h("auto"))},[s,i,h]),t?null:c("div",{className:"pointer-events-auto absolute inset-0 flex flex-col items-center justify-center gap-y-4",children:c("div",{className:"pointer-events-auto absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[c(or,{className:"size-20"}),c(ot,{color:"neutral",shape:"icon",onClick:k,children:c(Qa,{className:"size-full"})}),c("div",{className:ce("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",!n&&"invisible"),children:c("div",{className:"h-full bg-primary transition-[width]",style:{width:`${r}%`}})})]})})},ti=e=>{const{itemIndex:t,src:n,poster:r,onLoaded:s,onError:i}=e,{autoLoadInterior360:d}=Je(),{isShowingDetails:o,setItemInteraction:v,zoom:h,isZooming:k,setZoom:f}=Qe(),[p,a]=Ka(n),E=ve(null),T=ve(null),[w,g]=xe(!1),M=X(()=>{t!==void 0&&v(t,"ready"),s?.(),g(!0)},[t,v,s]),C=X(L=>{L instanceof MouseEvent&&L.button!==0||(L.preventDefault(),L.stopPropagation(),L.stopImmediatePropagation())},[]),m=X(()=>{const L=E.current?.getViewer();L&&L.loadScene()},[]);return fe(()=>{if(E.current&&w&&T.current){const L=E.current.getViewer(),S=T.current;if(L){const Q=N=>{N.preventDefault();const U=Zo(L.getHfov(),Qt,Jt,yt,wt),O=(N.deltaY<0?"zoom-in":"zoom-out")==="zoom-in"?Math.min(U+wt,yt):Math.max(U-wt,1);f(O)},I=Ja(Q,100,150),q=N=>{N.preventDefault();const U=Zo(L.getHfov(),Qt,Jt,yt,wt,!0);f(U)};S.addEventListener("wheel",I),S.addEventListener("dblclick",q);const K=Math.abs(1-Math.abs(h)),H=Jt-Qt,oe=pr-K*H;return L.setHfov(oe),()=>{S.removeEventListener("wheel",Q),S.removeEventListener("dblclick",q)}}}},[h,w,k,f]),c(Ke,{children:c("div",{className:ce("relative aspect-[4/3] w-full overflow-hidden bg-transparent"),children:c("div",{className:ce("size-full",o?"scale-105":"scale-100"),children:[c("div",{ref:T,children:[c("style",{children:`
|
|
6
|
+
`).join("<br>")}function Et(l){return l.trim().toLowerCase().indexOf("javascript:")===0?"about:blank":l}function Ns(l){return Et(l).replace(/"/g,"%22").replace(/'/g,"%27")}this.isLoaded=function(){return!!k},this.getPitch=function(){return o.pitch},this.setPitch=function(l,u,y,F){return u=u==n?1e3:Number(u),u?U.pitch={startTime:Date.now(),startPosition:o.pitch,endPosition:l,duration:u,callback:y,callbackArgs:F}:o.pitch=l,xe(),this},this.getPitchBounds=function(){return[o.minPitch,o.maxPitch]},this.setPitchBounds=function(l){return o.minPitch=Math.max(-90,Math.min(l[0],90)),o.maxPitch=Math.max(-90,Math.min(l[1],90)),this},this.getYaw=function(){return o.yaw},this.setYaw=function(l,u,y,F){return u=u==n?1e3:Number(u),l=(l+180)%360-180,u?(o.yaw-l>180?l+=360:l-o.yaw>180&&(l-=360),U.yaw={startTime:Date.now(),startPosition:o.yaw,endPosition:l,duration:u,callback:y,callbackArgs:F}):o.yaw=l,xe(),this},this.getYawBounds=function(){return[o.minYaw,o.maxYaw]},this.setYawBounds=function(l){return o.minYaw=Math.max(-180,Math.min(l[0],180)),o.maxYaw=Math.max(-180,Math.min(l[1],180)),this},this.getHfov=function(){return o.hfov},this.setHfov=function(l,u,y,F){return u=u==n?1e3:Number(u),u?U.hfov={startTime:Date.now(),startPosition:o.hfov,endPosition:br(l),duration:u,callback:y,callbackArgs:F}:at(l),xe(),this},this.getHfovBounds=function(){return[o.minHfov,o.maxHfov]},this.setHfovBounds=function(l){return o.minHfov=Math.max(0,l[0]),o.maxHfov=Math.max(0,l[1]),this},this.lookAt=function(l,u,y,F,q,B){return F=F==n?1e3:Number(F),l!==n&&(this.setPitch(l,F,q,B),q=n),u!==n&&(this.setYaw(u,F,q,B),q=n),y!==n&&this.setHfov(y,F,q,B),this},this.getNorthOffset=function(){return o.northOffset},this.setNorthOffset=function(l){return o.northOffset=Math.min(360,Math.max(0,l)),xe(),this},this.getHorizonRoll=function(){return o.horizonRoll},this.setHorizonRoll=function(l){return o.horizonRoll=Math.min(90,Math.max(-90,l)),v.setPose(o.horizonPitch*Math.PI/180,o.horizonRoll*Math.PI/180),xe(),this},this.getHorizonPitch=function(){return o.horizonPitch},this.setHorizonPitch=function(l){return o.horizonPitch=Math.min(90,Math.max(-90,l)),v.setPose(o.horizonPitch*Math.PI/180,o.horizonRoll*Math.PI/180),xe(),this},this.startAutoRotate=function(l){return l=l||K||1,o.autoRotate=l,d.lookAt(ce,n,j,3e3),xe(),this},this.stopAutoRotate=function(){return K=o.autoRotate?o.autoRotate:K,o.autoRotate=!1,o.autoRotateInactivityDelay=-1,this},this.getRenderer=function(){return v},this.setUpdate=function(l){return z=l===!0,v===n?re():xe(),this},this.mouseEventToCoords=function(l){return ke(l)},this.loadScene=function(l,u,y,F){return k!==!1&&Dn(l,u,y,F),this},this.getScene=function(){return o.scene},this.addScene=function(l,u){return i.scenes[l]=u,this},this.removeScene=function(l){return o.scene===l||!i.scenes.hasOwnProperty(l)?!1:(delete i.scenes[l],!0)},this.toggleFullscreen=function(){return An(),this},this.getConfig=function(){return o},this.getContainer=function(){return s},this.addHotSpot=function(l,u){if(u===n&&o.scene===n)o.hotSpots.push(l);else{var y=u!==n?u:o.scene;if(i.scenes.hasOwnProperty(y))i.scenes[y].hasOwnProperty("hotSpots")||(i.scenes[y].hotSpots=[],y==o.scene&&(o.hotSpots=i.scenes[y].hotSpots)),i.scenes[y].hotSpots.push(l);else throw"Invalid scene ID!"}return(u===n||o.scene==u)&&(_r(l),k&&wr(l)),this},this.removeHotSpot=function(l,u){if(u===n||o.scene==u){if(!o.hotSpots)return!1;for(var y=0;y<o.hotSpots.length;y++)if(o.hotSpots[y].hasOwnProperty("id")&&o.hotSpots[y].id===l){for(var F=o.hotSpots[y].div;F.parentNode!=ne;)F=F.parentNode;return ne.removeChild(F),delete o.hotSpots[y].div,o.hotSpots.splice(y,1),!0}}else if(i.scenes.hasOwnProperty(u)){if(!i.scenes[u].hasOwnProperty("hotSpots"))return!1;for(var y=0;y<i.scenes[u].hotSpots.length;y++)if(i.scenes[u].hotSpots[y].hasOwnProperty("id")&&i.scenes[u].hotSpots[y].id===l)return i.scenes[u].hotSpots.splice(y,1),!0}else return!1},this.resize=function(){v&&fe()},this.isLoaded=function(){return k},this.isOrientationSupported=function(){return Me||!1},this.stopOrientation=function(){Ft()},this.startOrientation=function(){Me&&rn()},this.isOrientationActive=function(){return!!J},this.on=function(l,u){return P[l]=P[l]||[],P[l].push(u),this},this.off=function(l,u){if(!l)return P={},this;if(u){var y=P[l].indexOf(u);y>=0&&P[l].splice(y,1),P[l].length==0&&delete P[l]}else delete P[l];return this};function ht(l){if(l in P)for(var u=P[l].length;u>0;u--)P[l][P[l].length-u].apply(null,[].slice.call(arguments,1))}this.destroy=function(){v&&v.destroy(),C&&(W.removeEventListener("mousedown",ge,!1),W.removeEventListener("dblclick",ie,!1),t.removeEventListener("mousemove",Ie,!1),t.removeEventListener("mouseup",Xe,!1),s.removeEventListener("mousewheel",Ge,!1),s.removeEventListener("DOMMouseScroll",Ge,!1),s.removeEventListener("mozfullscreenchange",ft,!1),s.removeEventListener("webkitfullscreenchange",ft,!1),s.removeEventListener("msfullscreenchange",ft,!1),s.removeEventListener("fullscreenchange",ft,!1),e.removeEventListener("resize",fe,!1),e.removeEventListener("orientationchange",fe,!1),s.removeEventListener("keydown",Fe,!1),s.removeEventListener("keyup",Ze,!1),s.removeEventListener("blur",et,!1),t.removeEventListener("mouseleave",Xe,!1),W.removeEventListener("touchstart",We,!1),W.removeEventListener("touchmove",Be,!1),W.removeEventListener("touchend",Te,!1),W.removeEventListener("pointerdown",Ye,!1),W.removeEventListener("pointermove",De,!1),W.removeEventListener("pointerup",Se,!1),W.removeEventListener("pointerleave",Se,!1)),s.innerHTML="",s.classList.remove("pnlm-container"),R.classList.remove("pnlm-grab"),R.classList.remove("pnlm-grabbing")}}return{viewer:function(i,d){return new r(i,d)}}}(window,document),window.requestAnimationFrame||(window.requestAnimationFrame=function(){return window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e,t){window.setTimeout(e,1e3/60)}}());var ur,dr;function Za(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function $a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t&&(typeof t=="object"||typeof t=="function")?t:e}function ja(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var Kt=(dr=ur=function(e){ja(t,e);function t(n){Za(this,t);var r=$a(this,e.call(this,n));return r.renderImage=function(s){var i=r.props.children,d=[].concat(i),o=[];Array.isArray(d)&&d.map(function(f){switch(f.props.type){case"info":return o.push({id:Math.random().toString(36).substr(2,9),type:f.props.type,pitch:f.props.pitch?f.props.pitch:10,yaw:f.props.yaw?f.props.yaw:10,text:f.props.text?f.props.text:"",URL:f.props.URL?f.props.URL:""});case"custom":return o.push({id:Math.random().toString(36).substr(2,9),pitch:f.props.pitch?f.props.pitch:10,yaw:f.props.yaw?f.props.yaw:10,cssClass:f.props.cssClass?f.props.cssClass:"tooltipcss",createTooltipFunc:f.props.tooltip?f.props.tooltip:r.hotspotTooltip,createTooltipArgs:f.props.tooltipArg?f.props.tooltipArg:{},clickHandlerFunc:f.props.handleClick?f.props.handleClick:r.handleClickHotspot,clickHandlerArgs:f.props.handleClickArg?f.props.handleClickArg:{name:"test"}});default:return[]}});var v={type:"equirectangular",panorama:r.props.image,haov:r.props.haov,vaov:r.props.vaov,vOffset:r.props.vOffset,yaw:r.props.yaw,pitch:r.props.pitch,hfov:r.props.hfov,minHfov:r.props.minHfov,maxHfov:r.props.maxHfov,minPitch:r.props.minPitch,maxPitch:r.props.maxPitch,minYaw:r.props.minYaw,maxYaw:r.props.maxYaw,autoRotate:r.props.autoRotate,compass:r.props.compass,preview:r.props.preview,previewTitle:r.props.previewTitle,previewAuthor:r.props.previewAuthor,author:r.props.author,title:r.props.title,autoLoad:r.props.autoLoad,orientationOnByDefault:r.props.orientationOnByDefault,showZoomCtrl:r.props.showZoomCtrl,keyboardZoom:r.props.keyboardZoom,mouseZoom:r.props.mouseZoom,draggable:r.props.draggable,disableKeyboardCtrl:r.props.disableKeyboardCtrl,showFullscreenCtrl:r.props.showFullscreenCtrl,showControls:r.props.showControls,hotSpotDebug:r.props.hotspotDebug,hotSpots:o,onRender:r.props.onRender};Object.keys(v).forEach(function(f){return v[f]===""&&delete v[f]}),s==="update"&&r.panorama.destroy(),r.panorama=pannellum.viewer(r.props.id?r.props.id:r.state.id,v),r.panorama.on("load",r.props.onLoad),r.panorama.on("scenechange",r.props.onScenechange),r.panorama.on("scenechangefadedone",r.props.onScenechangefadedone),r.panorama.on("error",r.props.onError),r.panorama.on("errorcleared",r.props.onErrorcleared),r.panorama.on("mousedown",r.props.onMousedown),r.panorama.on("mouseup",r.props.onMouseup),r.panorama.on("touchstart",r.props.onTouchstart),r.panorama.on("touchend",r.props.onTouchend)},r.componentDidMount=function(){r.renderImage("mount")},r.handleClickHotspot=function(s,i){console.log("hotspot clicked",i.name)},r.hotspotTooltip=function(s,i){s.setAttribute("id","textInfo");var d=document.createElement("div");d.classList.add("hotspot");var o=document.createElement("div");o.classList.add("out");var v=document.createElement("div");v.classList.add("in");var f=document.createElement("div");f.classList.add("image"),s.appendChild(d),d.appendChild(v),d.appendChild(o)},r.getViewer=function(){return r.panorama},r.forceRender=function(){r.renderImage("update")},r.state={id:Math.random().toString(36).substr(2,9)},r}return t.prototype.componentDidUpdate=function(r,s,i){(r.image!==this.props.image||r.width!==this.props.width||r.height!==this.props.height||r.compass!==this.props.compass||r.title!==this.props.title||r.author!==this.props.author||r.preview!==this.props.preview||r.previewTitle!==this.props.previewTitle||r.previewAuthor!==this.props.previewAuthor||r.showZoomCtrl!==this.props.showZoomCtrl||r.showFullscreenCtrl!==this.props.showFullscreenCtrl||r.showControls!==this.props.showControls||r.children.length!==this.props.children.length)&&this.renderImage("update"),(r.maxYaw!==this.props.maxYaw||r.minYaw!==this.props.minYaw||r.maxPitch!==this.props.maxPitch||r.minPitch!==this.props.minPitch||r.maxHfov!==this.props.maxHfov||r.minHfov!==this.props.minHfov)&&(this.panorama.setYawBounds([this.props.minYaw,this.props.maxYaw]),this.panorama.setPitchBounds([this.props.minPitch,this.props.maxPitch]),this.panorama.setHfovBounds([this.props.minHfov,this.props.maxHfov])),r.yaw!==this.props.yaw&&this.panorama.setYaw(this.props.yaw),r.pitch!==this.props.pitch&&this.panorama.setPitch(this.props.pitch),r.hfov!==this.props.hfov&&this.panorama.setHfov(this.props.hfov)},t.prototype.render=function(){var r=this,s=this.props,i=s.width,d=s.height,o={width:i,height:d};return Mn.createElement("div",{id:this.props.id?this.props.id:this.state.id,style:o,ref:function(f){return r.imageNode=f}})},t}(Xt),ur.defaultProps={children:[],width:"100%",height:"400px",image:"",haov:360,vaov:180,vOffset:0,yaw:0,pitch:0,hfov:100,minHfov:50,maxHfov:150,minPitch:-90,maxPitch:90,minYaw:-180,maxYaw:180,autoRotate:0,compass:!1,preview:"",previewTitle:"",previewAuthor:"",title:"",author:"",autoLoad:!1,orientationOnByDefault:!1,showZoomCtrl:!0,keyboardZoom:!0,mouseZoom:!0,draggable:!0,disableKeyboardCtrl:!1,showFullscreenCtrl:!0,showControls:!0,onLoad:function(){},onScenechange:function(){},onScenechangefadedone:function(){},onError:function(){},onErrorcleared:function(){},onMousedown:function(){},onMouseup:function(){},onTouchstart:function(){},onTouchend:function(){},hotspotDebug:!1,onRender:null},dr);Kt.propTypes={},Kt.Hotspot=function(){},Kt.Hotspot=function(){};const pr=100,Jt=100,Qt=50,qa=0,Ka=0,Ja=e=>{const[t,n]=ye(0),[r,s]=ye(!1);return he(()=>{const i=XMLHttpRequest.prototype.open,d=XMLHttpRequest.prototype.send;let o=!1;return XMLHttpRequest.prototype.open=function(v,f,L=!0,h,p){return f.toString().includes(e)&&(o=!0,s(!0)),i.call(this,v,f,L,h||null,p||null)},XMLHttpRequest.prototype.send=function(v){return o&&(this.addEventListener("progress",f=>{if(f.lengthComputable){const L=Math.round(f.loaded/f.total*100);n(L)}}),this.addEventListener("loadend",()=>{o=!1,n(100),s(!1)})),d.call(this,v)},()=>{XMLHttpRequest.prototype.open=i,XMLHttpRequest.prototype.send=d}},[e]),[t,r]};function Qa(e,t=50,n=200){let r=null,s=0;return(...i)=>{const d=Date.now();r&&(clearTimeout(r),r=null),d-s>=t&&(e(...i),s=d),r=setTimeout(()=>{e(...i)},n)}}const ei=({className:e})=>c(qe,{className:e,customizationKey:"UI_INTERIOR_360_PLAY",children:c("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c("polygon",{points:"6 3 20 12 6 21 6 3"})})}),ti=({itemIndex:e,isPannellumLoaded:t,isLoading:n,progress:r,autoloadInterior360:s,loadScene:i})=>{const{emitAnalyticsEvent:d}=Je(),{displayedCategoryId:o,displayedCategoryName:v}=Qe(),f=X(h=>{d({type:"track",category_id:o,category_name:v,item_type:"interior-360",item_position:e,action_properties:{action_name:"Interior 360 Play",action_field:"interior_360_play",action_value:h}})},[d,o,v,e]),L=X(()=>{i(),f("click")},[i,f]);return he(()=>{s&&(i(),f("auto"))},[s,i,f]),t?null:c("div",{className:"pointer-events-auto absolute inset-0 flex flex-col items-center justify-center gap-y-4",children:c("div",{className:"pointer-events-auto absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[c(or,{className:"size-20"}),c(ot,{color:"neutral",shape:"icon",onClick:L,children:c(ei,{className:"size-full"})}),c("div",{className:de("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",!n&&"invisible"),children:c("div",{className:"h-full bg-primary transition-[width]",style:{width:`${r}%`}})})]})})},ni=e=>{const{itemIndex:t,src:n,poster:r,onLoaded:s,onError:i}=e,{autoLoadInterior360:d}=Je(),{isShowingDetails:o,setItemInteraction:v,zoom:f,isZooming:L,setZoom:h}=Qe(),[p,a]=Ja(n),E=ve(null),T=wn(),b=ve(null),[m,M]=ye(!1),k=X(S=>{b.current=S,M(!!S)},[]),[_,C]=ye(!1),D=X(()=>{t!==void 0&&v(t,"ready"),s?.(),C(!0)},[t,v,s]),G=X(S=>{S instanceof MouseEvent&&S.button!==0||(S.preventDefault(),S.stopPropagation(),S.stopImmediatePropagation())},[]),I=X(()=>{const S=E.current?.getViewer();S&&S.loadScene()},[]);return he(()=>{if(E.current&&_&&b.current){const S=E.current.getViewer(),J=b.current;if(S){const O=P=>{P.preventDefault();const Z=Zo(S.getHfov(),Qt,Jt,yt,wt),H=(P.deltaY<0?"zoom-in":"zoom-out")==="zoom-in"?Math.min(Z+wt,yt):Math.max(Z-wt,1);h(H)},ee=Qa(O,100,150),K=P=>{P.preventDefault();const Z=Zo(S.getHfov(),Qt,Jt,yt,wt,!0);h(Z)};J.addEventListener("wheel",ee),J.addEventListener("dblclick",K);const j=Math.abs(1-Math.abs(f)),ce=Jt-Qt,U=pr-j*ce;return S.setHfov(U),()=>{J.removeEventListener("wheel",O),J.removeEventListener("dblclick",K)}}}},[f,_,L,h]),c(Ke,{children:c("div",{className:de("relative aspect-[4/3] w-full overflow-hidden bg-transparent"),children:c("div",{className:de("size-full",o?"scale-105":"scale-100"),children:[c("div",{ref:k,className:"size-full",children:[c("style",{children:`
|
|
7
7
|
.pnlm-load-button {
|
|
8
8
|
display: none !important;
|
|
9
9
|
}
|
|
@@ -24,4 +24,4 @@
|
|
|
24
24
|
display: none;
|
|
25
25
|
visibility: hidden;
|
|
26
26
|
}
|
|
27
|
-
`}),T.current&&c(Kt,{ref:E,id:T.current,panorama:n,preview:r,width:"0",height:"0",image:n,pitch:ja,yaw:qa,hfov:pr,maxHfov:Jt,minHfov:Qt,compass:!1,showControls:!1,keyboardZoom:!1,onLoad:M,onError:i,onMousedown:C,onTouchstart:C,onTouchend:C,onMouseup:C,autoLoad:!1})]}),c(ei,{isPannellumLoaded:w,isLoading:a,progress:p,autoloadInterior360:d,loadScene:m,itemIndex:t})]})})})},ni=e=>{const{itemIndex:t}=e,{setItemInteraction:n}=Qe(),[r,s]=xe();return fe(()=>{r===null||r==="error"||n(t,r==="spin"?"running":"ready")},[t,n,r]),r==="error"?c(jt,{className:"text-background",text:"Interior Spin could not be loaded"}):c(ti,{...e,onLoaded:()=>s("spin"),onError:()=>s("error")})},fr=({className:e})=>c($e,{className:e,customizationKey:"UI_360_PLAY",children:c("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c("polygon",{points:"6 3 20 12 6 21 6 3"})})}),oi=750,ri=1250,ai=360,ii=480,si=({images:e,onlyPreload:t})=>{const{demoSpin:n,reverse360:r}=Je(),{isShowingDetails:s,isZooming:i}=Qe(),d=i||s,o=ve(null),v=ve(null),h=ve(0),k=ve(null),f=ve(null),p=ve(null),a=ve(null),E=ve(0),T=16,w=ve({timestamps:new Float64Array(10),values:new Float64Array(10),index:0,count:0}),g=ve(n),M=ve(null),C=X(()=>{M.current&&(clearTimeout(M.current),M.current=null)},[]),m=ve(null),L=()=>{m.current&&(cancelAnimationFrame(m.current),m.current=null)},[S,Q]=xe(0);fe(()=>{h.current=S},[S]);const I=e.length,q=X(N=>{if(h.current===N)return;const me=k.current;me&&(me.src=e[N].src),h.current=N},[e]),K=X(()=>{const N=(h.current+1)%I;q(N)},[I,q]),H=X(()=>{const N=(h.current-1+I)%I;q(N)},[I,q]),oe=X(()=>{Q(h.current)},[]);return fe(()=>{if(d){C();return}const N=o.current,U=v.current;if(!N||!U)return;g.current&&(g.current=!1,M.current=setTimeout(()=>{const V=Date.now(),G=()=>{const W=()=>{const ae=(Date.now()-V)/ri,he=Math.round((Ne=>Ne*(2-Ne))(ae)*I),re=it(he%I,0,I-1);Q(re),!(he>=I)&&G()};m.current=requestAnimationFrame(W)};G()},oi));const me=ai/I;let O=null;const A=w.current,ee=()=>{A.index=0,A.count=0},P=(V,G)=>{const W=A.index;A.timestamps[W]=V,A.values[W]=G,A.index=(W+1)%10,A.count<10&&A.count++},Z=()=>{const V=(()=>{const he=Date.now(),{timestamps:re,values:Ne,index:Pe,count:Fe}=A;if(Fe<2)return 0;let ze=-1,Ue=-1;for(let Me=0;Me<Fe;Me++){const Re=(Pe-1-Me+10)%10;he-re[Re]<50&&(Ue===-1&&(Ue=Re),ze=Re)}if(ze===-1||Ue===-1||ze===Ue)return 0;const Oe=re[Ue]-re[ze];return Oe<=0?0:(Ne[Ue]-Ne[ze])/(Oe/1e3)})(),G=Date.now();let W=0,b=G,ae=G;const ie=()=>{const he=()=>{const re=Date.now(),Ne=(re-G)/1e3,Pe=Math.pow(.05,Ne),Fe=V*Pe,ze=(re-b)/1e3;if(W+=Fe*ze,Math.abs(Fe)<5*me&&Math.abs(W)<me){m.current=null,oe();return}const Ue=re-ae;Math.abs(W)>=me&&Ue>=T&&(W>0!==r?K():H(),W=0,ae=re),b=re,ie()};m.current=requestAnimationFrame(he)};ie()},te=()=>{C(),L()},D=V=>{if(V.button!==0)return;V.preventDefault(),V.stopPropagation(),te();const G=V.clientX;O=G,ee(),P(Date.now(),G)},$=V=>{if(O===null)return;V.stopPropagation();const{clientX:G}=V;P(Date.now(),G);const W=G-O;Math.abs(W)<me||(W>0!==r?K():H(),O=G)},J=()=>{O!==null&&(O=null,Z())};N.addEventListener("mousedown",D),document.addEventListener("mousemove",$),document.addEventListener("mouseleave",J),document.addEventListener("mouseup",J),document.addEventListener("contextmenu",J);const ue=ii/I,z=()=>U.getBoundingClientRect().width,ye=()=>U.scrollWidth/2-z()/2,ne=()=>{const V=ye();U.scrollLeft=V};ne();const Ce=()=>{const V=U.scrollLeft-ye();Math.abs(V)<ue||(V<0!==r?K():H(),ne())};U.addEventListener("scroll",Ce);let He=null;const je=()=>{f.current=null;const V=performance.now();if(V-E.current<T){f.current=requestAnimationFrame(je);return}E.current=V;const G=p.current,W=a.current;if(G===null||W===null)return;const b=G-W;Math.abs(b)<me||(b>0!==r?K():H(),a.current=G,O=G)},Ze=V=>{if(He!==null||V.changedTouches.length!==1)return;te(),f.current!==null&&(cancelAnimationFrame(f.current),f.current=null);const G=V.changedTouches[0];He=G.identifier;const W=G.clientX;O=W,a.current=W,p.current=W,ee(),P(Date.now(),W)},_=V=>{if(O===null)return;let G=null;for(let b=0;b<V.changedTouches.length;b++)if(V.changedTouches[b].identifier===He){G=V.changedTouches[b];break}if(!G)return;V.preventDefault();const W=G.clientX;P(Date.now(),W),p.current=W,f.current===null&&(f.current=requestAnimationFrame(je))},x=V=>{if(O===null)return;let G=!1;for(let W=0;W<V.changedTouches.length;W++)if(V.changedTouches[W].identifier===He){G=!0;break}G&&(f.current!==null&&(cancelAnimationFrame(f.current),f.current=null),He=null,O=null,a.current=null,p.current=null,Z())};return U.addEventListener("touchstart",Ze,{passive:!1}),U.addEventListener("touchmove",_,{passive:!1}),U.addEventListener("touchend",x),U.addEventListener("touchcancel",x),()=>{L(),f.current!==null&&(cancelAnimationFrame(f.current),f.current=null),N.removeEventListener("mousedown",D),document.removeEventListener("mousemove",$),document.removeEventListener("mouseleave",J),document.removeEventListener("mouseup",J),document.removeEventListener("contextmenu",J),U.removeEventListener("scroll",Ce),U.removeEventListener("touchstart",Ze),U.removeEventListener("touchmove",_),U.removeEventListener("touchend",x),U.removeEventListener("touchcancel",x)}},[C,K,H,oe,d,r,I]),c("div",{ref:o,className:"cursor-ew-resize",children:c("div",{ref:v,className:" overflow-x-scroll",children:[c("div",{className:"sticky left-0 top-0",children:c("img",{ref:k,src:e[S].src,className:"pointer-events-none size-full object-cover",alt:""})}),c("div",{className:"pointer-events-none -mt-px h-px w-[calc(100%+1024px)]"})]})})},li=({itemIndex:e,images:t,onPlaceholderImageLoaded:n,onSpinImagesLoaded:r,onError:s})=>{const{autoLoad360:i,emitAnalyticsEvent:d}=Je(),{displayedCategoryId:o,displayedCategoryName:v}=Qe(),h=De(()=>t.map(({src:w})=>w),[t]),[k,f]=xe(null),p=k?[...k.values()].filter(w=>w).length/t.length*100:null,a=X(w=>{p===null&&(f(new Map(h.map(g=>[g,!1]))),d({type:"track",category_id:o,category_name:v,item_type:"next360",item_position:e,action_properties:{action_name:"Next 360 Play",action_field:"next360_play",action_value:w}}))},[p,h,d,o,v,e]),E=X(()=>{a("click")},[a]),T=X(w=>{f(g=>{const M=new Map(g);return M.set(w,!0),M})},[]);return fe(()=>{i&&a("auto")},[i,a]),fe(()=>{p===100&&r()},[p,r]),c("div",{className:"relative aspect-[4/3] w-full",children:[p!==null&&p!==100&&c("div",{className:"hidden",children:h.map(w=>c(st,{src:w,onLoad:()=>T(w),onError:s},w))}),c(st,{className:"size-full",src:h[0],onLoad:n}),c("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[c(In,{className:"size-20"}),c(ot,{color:"neutral",shape:"icon",onClick:E,children:c(fr,{className:"size-full"})}),c("div",{className:ce("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",p===null&&"invisible"),children:c("div",{className:"h-full bg-primary transition-[width]",style:{width:`${p??0}%`}})})]})]})},ci=e=>{const{itemIndex:t}=e,{setItemInteraction:n}=Qe(),[r,s]=xe(null);return fe(()=>{r===null||r==="error"||n(t,r==="spin"?"running":"ready")},[t,n,r]),r==="error"?c(jt,{className:"text-background",text:"Spin could not be loaded"}):r!=="spin"?c(li,{...e,onPlaceholderImageLoaded:()=>s(i=>i===null?"placeholder":i),onSpinImagesLoaded:()=>s("spin"),onError:()=>s("error")}):c(si,{...e})},ui=750,di=1250,pi=360,fi=480,hi=({images:e,onlyPreload:t})=>{const{demoSpin:n,reverse360:r}=Je(),{isShowingDetails:s,isZooming:i}=Qe(),d=i||s,o=ve(null),v=ve(null),h=ve(n),k=ve(null),f=X(()=>{k.current&&(clearTimeout(k.current),k.current=null)},[]),p=ve(null),a=()=>{p.current&&(cancelAnimationFrame(p.current),p.current=null)},[E,T]=xe(0),w=e.length,g=X(()=>{T(C=>(C-1+w)%w)},[w]),M=X(()=>{T(C=>(C+1)%w)},[w]);return fe(()=>{if(d){f();return}const C=o.current,m=v.current;if(!C||!m)return;h.current&&(h.current=!1,k.current=setTimeout(()=>{const $=Date.now(),J=()=>{const ue=()=>{const ye=(Date.now()-$)/di,Ce=Math.round((je=>je*(2-je))(ye)*w),He=it(Ce%w,0,w-1);T(He),!(Ce>=w)&&J()};p.current=requestAnimationFrame(ue)};J()},ui));const L=pi/w;let S=null,Q=[];const I=$=>{Q.push($),Q.length>20&&Q.shift()},q=()=>{const $=(()=>{const ne=Date.now(),Ce=Q.filter(Ze=>ne-Ze.timestamp<50);if(Ce.length<2)return 0;const He=Ce[0],je=Ce[Ce.length-1];return(je.value-He.value)/(.001*Math.max(je.timestamp-He.timestamp,1))})(),J=Date.now();let ue=0,z=J;const ye=()=>{const ne=()=>{const Ce=Date.now(),He=(Ce-J)/1e3,je=Math.pow(.05,He),Ze=$*je,_=(Ce-z)/1e3;if(ue+=Ze*_,Math.abs(Ze)<5*L&&Math.abs(ue)<L){p.current=null;return}Math.abs(ue)>=L&&(ue>0!==r?M():g(),ue=0),z=Ce,ye()};p.current=requestAnimationFrame(ne)};ye()},K=()=>{f(),a()},H=$=>{if($.button!==0)return;$.preventDefault(),$.stopPropagation(),K();const J=$.clientX;S=J,Q=[{timestamp:Date.now(),value:J}]},oe=$=>{if(S===null)return;$.stopPropagation();const{clientX:J}=$;I({timestamp:Date.now(),value:J});const ue=J-S;Math.abs(ue)<L||(ue>0!==r?M():g(),S=J)},N=()=>{S!==null&&(S=null,q())};C.addEventListener("mousedown",H),document.addEventListener("mousemove",oe),document.addEventListener("mouseleave",N),document.addEventListener("mouseup",N),document.addEventListener("contextmenu",N);const U=fi/w,me=()=>m.getBoundingClientRect().width,O=()=>m.scrollWidth/2-me()/2,A=()=>{const $=O();m.scrollLeft=$};A();const ee=()=>{const $=m.scrollLeft-O();Math.abs($)<U||($<0!==r?M():g(),A())};m.addEventListener("scroll",ee);let P=null;const Z=$=>{if(P!==null||$.changedTouches.length!==1)return;K();const{identifier:J,clientX:ue}=$.changedTouches[0];P=J,S=ue,Q=[{timestamp:Date.now(),value:ue}]},te=$=>{if(!S)return;const J=Array.from($.changedTouches).find(({identifier:ye})=>ye===P);if(!J)return;$.preventDefault();const{clientX:ue}=J;I({timestamp:Date.now(),value:ue});const z=ue-S;Math.abs(z)<L||(z>0!==r?M():g(),S=ue)},D=$=>{!S||!Array.from($.changedTouches).some(({identifier:ue})=>ue===P)||(P=null,S=null,q())};return m.addEventListener("touchstart",Z),m.addEventListener("touchmove",te),m.addEventListener("touchend",D),m.addEventListener("touchcancel",D),()=>{C.removeEventListener("mousedown",H),document.removeEventListener("mousemove",oe),document.removeEventListener("mouseleave",N),document.removeEventListener("mouseup",N),document.removeEventListener("contextmenu",N),m.removeEventListener("scroll",ee),m.removeEventListener("touchstart",Z),m.removeEventListener("touchmove",te),m.removeEventListener("touchend",D),m.removeEventListener("touchcancel",D)}},[f,M,g,d,r,w]),c("div",{ref:o,className:"cursor-ew-resize",children:c("div",{ref:v,className:"overflow-x-scroll",children:[c("div",{className:"sticky left-0 top-0",children:[e.map(C=>c(st,{src:C.src,className:"pointer-events-none !absolute left-0 top-0 -z-10"},C.src)),c(cr,{...e[E],onlyPreload:t,itemIndex:-1})]}),c("div",{className:"pointer-events-none -mt-px h-px w-[calc(100%+1024px)]"})]})})},mi=({itemIndex:e,images:t,onPlaceholderImageLoaded:n,onSpinImagesLoaded:r,onError:s})=>{const{autoLoad360:i,emitAnalyticsEvent:d}=Je(),{displayedCategoryId:o,displayedCategoryName:v}=Qe(),h=De(()=>t.map(({src:w})=>w),[t]),[k,f]=xe(null),p=k?[...k.values()].filter(w=>w).length/t.length*100:null,a=X(w=>{p===null&&(f(new Map(h.map(g=>[g,!1]))),d({type:"track",category_id:o,category_name:v,item_type:"exterior-360",item_position:e,action_properties:{action_name:"Exterior 360 Play",action_field:"exterior_360_play",action_value:w}}))},[p,h,d,o,v,e]),E=X(()=>{a("click")},[a]),T=X(w=>{f(g=>{const M=new Map(g);return M.set(w,!0),M})},[]);return fe(()=>{i&&a("auto")},[i,a]),fe(()=>{p===100&&r()},[p,r]),c("div",{className:"relative aspect-[4/3] w-full",children:[p!==null&&p!==100&&c("div",{className:"hidden",children:h.map(w=>c(st,{src:w,onLoad:()=>T(w),onError:s},w))}),c(st,{className:"size-full",src:h[0],onLoad:n}),c("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[c(In,{className:"size-20"}),c(ot,{color:"neutral",shape:"icon",onClick:E,children:c(fr,{className:"size-full"})}),c("div",{className:ce("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",p===null&&"invisible"),children:c("div",{className:"h-full bg-primary transition-[width]",style:{width:`${p??0}%`}})})]})]})},gi=e=>{const{itemIndex:t}=e,{setItemInteraction:n}=Qe(),[r,s]=xe();return fe(()=>{r===null||r==="error"||n(t,r==="spin"?"running":"ready")},[t,n,r]),r==="error"?c(jt,{className:"text-background",text:"Spin could not be loaded"}):r!=="spin"?c(mi,{...e,onPlaceholderImageLoaded:()=>s(i=>i===null?"placeholder":i),onSpinImagesLoaded:()=>s("spin"),onError:()=>s("error")}):c(hi,{...e})},vi=e=>c(ot,{color:"neutral",shape:"icon",...e,children:c(rr,{className:"size-full"})}),_i=({className:e})=>c($e,{className:e,customizationKey:"UI_PAUSE",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 12.6667H6.66667V3.33333H4V12.6667ZM9.33333 3.33333V12.6667H12V3.33333H9.33333Z",fill:"currentColor"})})}),wi=({className:e})=>c($e,{className:e,customizationKey:"UI_VOLUME",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M2 6V10H4.66667L8 13.3333V2.66667L4.66667 6H2ZM11 8C11 6.82 10.32 5.80667 9.33333 5.31334V10.68C10.32 10.1933 11 9.18 11 8ZM9.33333 2.15334V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8C12.6667 10.1133 11.26 11.9 9.33333 12.4733V13.8467C12.0067 13.24 14 10.8533 14 8C14 5.14667 12.0067 2.76 9.33333 2.15334Z",fill:"currentColor"})})}),yi=({className:e})=>c($e,{className:e,customizationKey:"UI_VOLUME_OFF",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M11 8C11 6.82 10.32 5.80667 9.33333 5.31333V6.78667L10.9667 8.42C10.9867 8.28667 11 8.14667 11 8ZM12.6667 8C12.6667 8.62667 12.5333 9.21333 12.3067 9.76L13.3133 10.7667C13.7533 9.94 14 9 14 8C14 5.14667 12.0067 2.76 9.33333 2.15333V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8ZM2.84667 2L2 2.84667L5.15333 6H2V10H4.66667L8 13.3333V8.84667L10.8333 11.68C10.3867 12.0267 9.88667 12.3 9.33333 12.4667V13.84C10.2533 13.6333 11.0867 13.2067 11.7933 12.6333L13.1533 14L14 13.1533L2.84667 2ZM8 2.66667L6.60667 4.06L8 5.45333V2.66667Z",fill:"currentColor"})})}),hr=({progress:e})=>c("div",{className:"h-1 w-full overflow-hidden rounded-ui-sm bg-background/25",children:c("div",{className:"size-full rounded-ui-sm bg-background transition-transform",style:{transform:`translateX(-${100*(1-e)}%)`}})}),bi=3e3,xi=({src:e,poster:t,itemIndex:n})=>{const{carrouselItemIndex:r,setItemInteraction:s}=Qe(),i=ve(null),d=ve(null),o=X(()=>{if(!d.current)throw new Error("videoRef.current is null");return d.current},[]);fe(()=>{s(n,"ready")},[n,s]);const v=X(()=>{o().play()},[o]),h=X(()=>{o().pause()},[o]);fe(()=>{r===n||h()},[r,n,h]);const[k,f]=xe(!1),[p,a]=xe(!0),E=()=>{f(!0),s(n,"running")},T=()=>{f(!1),s(n,"ready")},w=()=>{a(!1)},g=()=>{a(!0)},[M,C]=xe(null),m=O=>{const A=o(),ee=O.currentTarget.getBoundingClientRect(),Z=(O.clientX-ee.left)/ee.width,te=Math.min(1,Math.max(0,Z));A.volume=te,A.muted=!1},L=O=>{const A=o();A.muted=O};fe(()=>{const O=d.current;if(!O)return;const A=()=>{C({volume:O.volume,isMuted:O.muted})};return A(),O.addEventListener("volumechange",A),()=>{O.removeEventListener("volumechange",A)}},[]);const[S,Q]=xe(null),I=S?S.currentTime/S.duration:0;fe(()=>{const O=d.current;if(!O)return;const A=()=>{const ee=O.currentTime,P=O.duration;isNaN(ee)||isNaN(P)||Q({currentTime:ee,duration:P})};return A(),O.addEventListener("timeupdate",A),()=>{O.removeEventListener("timeupdate",A)}},[]);const q=O=>{const A=o(),ee=O.currentTarget.getBoundingClientRect(),Z=(O.clientX-ee.left)/ee.width,te=A.duration*Z;A.currentTime=te},K=O=>{const A=Math.floor(O%3600/60),ee=Math.floor(O%60);return`${A}:${ee.toString().padStart(2,"0")}`},[H,oe]=xe(!1),N=ve(void 0),U=X(()=>clearTimeout(N.current),[]),me=X(()=>{U(),N.current=setTimeout(()=>{oe(!1)},bi)},[U]);return fe(()=>{const O=i.current,A=d.current;if(!O||!A)return;const ee=()=>{me(),oe(!0)},P=()=>{U(),oe(!1)};let Z=!1;const te=()=>{Z=!0},D=()=>{Z&&(Z=!1,h())},$=()=>{Z=!1,ee()},J=ue=>{ue.preventDefault(),ue.touches.length===1&&(me(),oe(ye=>!ye))};return O.addEventListener("mousedown",te),O.addEventListener("mouseup",D),O.addEventListener("mouseenter",ee),O.addEventListener("mousemove",$),O.addEventListener("mouseleave",P),A.addEventListener("touchstart",J,{passive:!0}),()=>{O.removeEventListener("mousedown",te),O.removeEventListener("mouseup",D),O.removeEventListener("mouseenter",ee),O.removeEventListener("mousemove",ee),O.removeEventListener("mouseleave",P),A.removeEventListener("touchstart",J)}},[U,h,me]),c("div",{ref:i,className:"relative aspect-[4/3] w-full",children:[c("video",{ref:d,className:"size-full",src:e,poster:t,disablePictureInPicture:!0,playsInline:!0,onPlay:E,onPause:T,onEnded:T,onCanPlay:w,onWaiting:g}),k?c(Ke,{children:[c("div",{className:ce("absolute inset-x-0 bottom-0 cursor-auto space-y-2 bg-gradient-to-t from-foreground to-transparent p-4 pr-12 pt-8 transition-opacity duration-300",H?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),onMouseDownCapture:O=>O.stopPropagation(),children:[c("div",{className:"flex items-center justify-between text-background",children:[c("div",{className:"flex items-center gap-x-4",children:[c(ot,{shape:"icon",variant:"ghost",color:"neutral",onClick:h,children:c(_i,{className:"size-full"})}),S&&c("span",{className:"text-sm",children:[K(S.currentTime)," /"," ",K(S.duration)]})]}),M&&c("div",{className:"group/volume flex items-center gap-x-4 rounded-ui-md p-2 transition-colors hover:bg-foreground/25",children:[c("div",{className:`w-12 cursor-pointer py-1 opacity-0 transition-opacity ${M.isMuted?"group-hover/volume:opacity-50":"group-hover/volume:opacity-100"}`,onClick:m,children:c(hr,{progress:M.volume})}),c("div",{className:"size-5 cursor-pointer",onClick:()=>L(!M.isMuted),children:M.isMuted?c(yi,{className:"size-full"}):c(wi,{className:"size-full"})})]})]}),c("div",{className:"cursor-pointer py-1",onClick:q,children:c(hr,{progress:I})})]}),p&&c("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-foreground/25",children:c(tr,{size:"lg",color:"background"})})]}):c("div",{className:"absolute inset-0 flex items-center justify-center bg-foreground/25",children:c(vi,{onClick:v})})]})},Ei=({index:e,item:t,isShown:n})=>{const{type:r}=t;let s;switch(r){case"image":s=c(cr,{itemIndex:e,onlyPreload:!n,...t});break;case"video":s=c(xi,{itemIndex:e,...t});break;case"360":s=c(gi,{itemIndex:e,onlyPreload:!n,...t});break;case"next360":s=c(ci,{itemIndex:e,onlyPreload:!n,...t});break;case"interior-360":s=c(ni,{itemIndex:e,onlyPreload:!n,...t});break;case"custom":s=c(Va,{itemIndex:e,...t})}return s=c("div",{className:"grid grid-cols-[repeat(var(--max-items),1fr)]",children:s}),s},Ci=e=>{fe(()=>{const t=n=>{n.key==="Escape"&&e()};return addEventListener("keydown",t),()=>{removeEventListener("keydown",t)}},[e])};function Mi(e){return e.target===e.currentTarget}const Li=({className:e,children:t,isVisible:n,url:r,title:s,description:i,clickHandler:d,extendMode:o,variant:v,aspectRatioStyle:h,maxItemsShown:k=1})=>{const{isFullScreen:f,integration:p}=Je(),a=()=>v||(!p||f?"centered":"aside"),E=()=>!!(s||i),T=a(),w=g=>{if(!h)return{};switch(g){case"centered":return{...h,maxHeight:E()?"50%":"100%"};case"aside":return{...h,minHeight:0,flex:"1 1 auto"};case"fullwidth":return{...h,height:"85%"};default:return h}};return T==="centered"?c("div",{className:ce(e,"absolute inset-0 z-overlay flex justify-end overflow-hidden bg-foreground/60 transition-opacity duration-details",n?"opacity-100":"pointer-events-none opacity-0"),onClick:d,children:c("div",{className:ce("flex h-full flex-col bg-background transition-transform duration-details",n?"translate-x-0":"translate-x-full",E()?"max-w-[60%]":"w-full"),children:[t,n&&c(Ke,{children:[c(st,{className:ce(E()?"max-h-[50%]":"h-full","w-full bg-foreground/65 object-contain"),src:r||"",style:w("centered"),imgInPlayerWidthRatio:.6}),E()&&c("div",{className:ce("flex-1 space-y-1 overflow-y-auto px-2 py-1 small:p-3",o&&"large:p-4"),children:[s&&c("span",{className:ce("text-sm font-semibold small:text-base small:font-bold",o&&"large:text-lg"),children:s}),i&&c("p",{className:ce("text-xs text-foreground/65 small:text-sm",o&&"large:text-base"),children:i})]})]})]})}):T==="aside"?c("div",{className:ce(e,"absolute inset-0 z-overlay flex items-center justify-center overflow-hidden bg-foreground/60 transition-opacity duration-details",n?"opacity-100":"pointer-events-none opacity-0"),onClick:d,children:c("div",{className:ce("relative flex h-full flex-col bg-background transition-transform duration-details",n?"translate-y-0":"translate-y-full"),style:{width:p?`${100/(f?1:k)}%`:`${100/k}%`},children:[t,n&&c(Ke,{children:[c(st,{className:"min-h-0 w-full flex-1 bg-foreground/65 object-contain",src:r||"",style:w("aside"),imgInPlayerWidthRatio:.6}),c("div",{className:"min-h-[15%] shrink-0 space-y-1 p-2 small:p-3",children:[s&&c("span",{className:ce("block text-xs font-semibold leading-tight small:text-base small:font-bold",o&&"large:text-lg"),children:s}),i&&c("p",{className:ce("text-[10px] leading-tight text-foreground/65 small:text-sm",o&&"large:text-base"),children:i})]})]})]})}):c("div",{className:ce(e,"absolute inset-0 z-overlay flex items-center justify-center overflow-hidden bg-foreground/60 transition-opacity duration-details",n?"opacity-100":"pointer-events-none opacity-0"),onClick:d,children:c("div",{className:ce("relative flex aspect-[4/3] flex-col bg-background transition-transform duration-details",n?"translate-y-0":"translate-y-full"),style:{width:p?`${100/(f?1:k)}%`:`${100/k}%`},children:[t,n&&r&&c(Ke,{children:[c(st,{className:"h-[85%] w-full bg-foreground/65 object-contain",src:r,style:w("fullwidth"),imgInPlayerWidthRatio:.6}),c("div",{className:"h-[15%] space-y-1 overflow-y-auto px-2 py-1 small:p-3",children:[s&&c("span",{className:ce("text-sm font-semibold small:text-base small:font-bold",o&&"large:text-lg"),children:s}),i&&c("p",{className:ce("text-xs text-foreground/65 small:text-sm",o&&"large:text-base"),children:i})]})]})]})})},ki=({currentIndex:e,maxIndex:t})=>c("div",{className:"space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm",children:[c("span",{children:e+1}),c("span",{children:"/"}),c("span",{children:t+1})]}),mr=({className:e})=>c($e,{className:e,customizationKey:"UI_ARROW_RIGHT",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M4.07666 13.4868L5.25666 14.6668L11.9233 8.00016L5.25666 1.3335L4.07666 2.5135L9.56333 8.00016L4.07666 13.4868Z",fill:"currentColor"})})}),Ii=({className:e})=>c($e,{className:e,customizationKey:"UI_EXTEND",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M4.66683 9.3335H3.3335V12.6668H6.66683V11.3335H4.66683V9.3335ZM3.3335 6.66683H4.66683V4.66683H6.66683V3.3335H3.3335V6.66683ZM11.3335 11.3335H9.3335V12.6668H12.6668V9.3335H11.3335V11.3335ZM9.3335 3.3335V4.66683H11.3335V6.66683H12.6668V3.3335H9.3335Z",fill:"currentColor"})})}),Ti=({className:e})=>c($e,{className:e,customizationKey:"UI_GALLERY",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M13.3334 2.66683V10.6668H5.33337V2.66683H13.3334ZM13.3334 1.3335H5.33337C4.60004 1.3335 4.00004 1.9335 4.00004 2.66683V10.6668C4.00004 11.4002 4.60004 12.0002 5.33337 12.0002H13.3334C14.0667 12.0002 14.6667 11.4002 14.6667 10.6668V2.66683C14.6667 1.9335 14.0667 1.3335 13.3334 1.3335ZM7.66671 7.78016L8.79337 9.28683L10.4467 7.22016L12.6667 10.0002H6.00004L7.66671 7.78016ZM1.33337 4.00016V13.3335C1.33337 14.0668 1.93337 14.6668 2.66671 14.6668H12V13.3335H2.66671V4.00016H1.33337Z",fill:"currentColor"})})}),Si=({className:e})=>c($e,{className:e,customizationKey:"UI_HOTSPOTS",children:c("svg",{className:e,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{clipPath:"url(#clip0_418_982)",children:c("path",{d:"M6 4C4.895 4 4 4.895 4 6C4 7.105 4.895 8 6 8C7.105 8 8 7.105 8 6C8 4.895 7.105 4 6 4ZM10.47 5.5C10.24 3.415 8.585 1.76 6.5 1.53V0.5H5.5V1.53C3.415 1.76 1.76 3.415 1.53 5.5H0.5V6.5H1.53C1.76 8.585 3.415 10.24 5.5 10.47V11.5H6.5V10.47C8.585 10.24 10.24 8.585 10.47 6.5H11.5V5.5H10.47ZM6 9.5C4.065 9.5 2.5 7.935 2.5 6C2.5 4.065 4.065 2.5 6 2.5C7.935 2.5 9.5 4.065 9.5 6C9.5 7.935 7.935 9.5 6 9.5Z",fill:"currentColor"})}),c("defs",{children:c("clipPath",{id:"clip0_418_982",children:c("rect",{width:"12",height:"12",fill:"white"})})})]})}),Ni=({className:e})=>c($e,{className:e,customizationKey:"UI_MINUS",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M12.6666 8.66634H3.33325V7.33301H12.6666V8.66634Z",fill:"currentColor"})})}),Pi=({className:e})=>c($e,{className:e,customizationKey:"UI_PLUS",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M12.6666 8.66634H8.66659V12.6663H7.33325V8.66634H3.33325V7.33301H7.33325V3.33301H8.66659V7.33301H12.6666V8.66634Z",fill:"currentColor"})})}),Ri=({className:e})=>c($e,{className:e,customizationKey:"UI_REDUCE",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M3.33325 10.6668H5.33325V12.6668H6.66659V9.3335H3.33325V10.6668ZM5.33325 5.3335H3.33325V6.66683H6.66659V3.3335H5.33325V5.3335ZM9.33325 12.6668H10.6666V10.6668H12.6666V9.3335H9.33325V12.6668ZM10.6666 5.3335V3.3335H9.33325V6.66683H12.6666V5.3335H10.6666Z",fill:"currentColor"})})}),Ai=({enabled:e,onToggle:t,label:n,className:r,children:s})=>c("label",{className:ce("flex cursor-pointer items-center justify-center gap-x-2",r),children:[c("input",{type:"checkbox",className:"sr-only",checked:e,onChange:t}),n&&c("div",{className:"text-xs text-background",children:n}),c("div",{className:ce("flex h-5 w-8 items-center justify-center rounded-full transition-colors",e?"bg-primary":"bg-background/60"),children:c("div",{className:ce("flex size-4 items-center justify-center rounded-full p-0.5 transition",e?"translate-x-1.5 bg-primary-foreground text-primary":"-translate-x-1.5 bg-background text-foreground"),children:s})})]}),Di=({className:e})=>c($e,{className:e,customizationKey:"UI_BURGER",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M2 12H14V10.6667H2V12ZM2 8.66667H14V7.33333H2V8.66667ZM2 4V5.33333H14V4H2Z",fill:"currentColor"})})}),zi=({sharedClassName:e})=>{const{categories:t}=gt(),{displayedCategoryId:n,changeCategory:r}=Qe(),[s,i]=xe(!1),d=()=>{i(!s)},o=()=>{i(!1)};return c(Ke,{children:[s&&c("div",{className:ce(e,"inset-0 small:hidden"),onClick:o}),c("div",{className:ce(e,It("top-left"),"flex gap-x-2 small:hidden"),children:[c(ot,{shape:"icon",color:s?"primary":"neutral",onClick:d,children:c(Di,{})}),s&&c("div",{className:"rounded-ui-md bg-background transition-radius",children:c("ul",{className:"space-y-0.5 p-1",children:t.map(({id:v,title:h})=>c("li",{className:ce("cursor-pointer rounded-ui px-2 py-1 text-sm font-bold transition-all hover:bg-primary/30",v===n&&"bg-primary/50"),onClick:()=>{r(v),i(!1)},children:h},v))})})]}),c("div",{className:ce(e,er("top"),"w-full overflow-x-auto max-small:hidden"),children:c("div",{className:"mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow",children:t.map(({id:v,title:h})=>c(ot,{variant:v===n?"fill":"ghost",onClick:()=>r(v),children:h},v))})})]})},Oi=()=>{const{hideCategoriesNav:e,infiniteCarrousel:t,permanentGallery:n,extendBehavior:r,maxItemsShown:s,isFullScreen:i,integration:d}=Je(),{aspectRatioStyle:o,categories:{length:v}}=gt(),{items:{length:h},slidable:k,carrouselItemIndex:f,masterItemIndex:p,prevItem:a,nextItem:E,showGalleryControls:T,enableHotspotsControl:w,currentItemHotspotsVisible:g,toggleHotspots:M,showGallery:C,toggleGallery:m,extendMode:L,toggleExtendMode:S,shownDetails:Q,isShowingDetails:I,resetShownDetails:q,showZoomControls:K,isZooming:H,canZoomIn:oe,zoomIn:N,canZoomOut:U,zoomOut:me,resetView:O}=Qe(),A=X(te=>{Mi(te)&&q()},[q]);Ci(q);const ee="absolute z-overlay",P=()=>{if(s===1)return f;const D=Math.floor(s)-1;return f+D},Z=()=>{if(!d)return p;const D=Math.floor(s)-1;return p+D};return c(Ke,{children:[!e&&v>1&&c(zi,{sharedClassName:ce(ee,"transition-opacity",H?"!pointer-events-none opacity-0":"opacity-100")}),k&&!H&&c("div",{className:ce(ee,It("top-right")),children:c(ki,{currentIndex:!d||i?f:P(),maxIndex:h-1})}),k&&c(Ke,{children:[c(ot,{shape:"icon",color:"neutral",className:ce(ee,It("middle-left"),H?"!pointer-events-none opacity-0":"opacity-100"),onClick:a,disabled:!t&&p<=0,children:c($e,{customizationKey:"CONTROLS_PREV",children:c(mr,{className:"size-full -scale-x-100"})})}),c(ot,{shape:"icon",color:"neutral",className:ce(ee,It("middle-right"),H?"!pointer-events-none opacity-0":"opacity-100"),onClick:E,disabled:!t&&Z()>=h-1,children:c($e,{customizationKey:"CONTROLS_NEXT",children:c(mr,{className:"size-full"})})})]}),c("div",{className:ce(ee,It("bottom-fullW"),"pointer-events-none grid grid-cols-[auto,1fr,auto] items-end *:pointer-events-auto small:gap-x-2"),children:[!n&&k&&c(Ke,{children:[c(ot,{className:T&&!H?"opacity-100":"!pointer-events-none opacity-0",variant:"fill",color:C?"primary":"neutral",shape:"icon",onClick:m,children:c(Ti,{className:"size-full"})}),C&&c(ir,{className:ce("transition-opacity",T&&!H?"opacity-100":"!pointer-events-none opacity-0","[mask-image:linear-gradient(to_left,transparent_0px,black_4px,black_calc(100%-4px),transparent_100%)]"),containerClassName:"mx-1"})]}),c("div",{className:"col-start-3 flex flex-col items-end gap-y-1 small:gap-y-2",children:[w&&c(Ai,{className:ce("transition-opacity",H?"!pointer-events-none opacity-0":"opacity-100"),enabled:g,onToggle:M,children:c(Si,{className:"size-full"})}),K&&(!d||i)&&c("div",{className:"max-small:hidden",children:[c(ot,{className:"rounded-b-none",color:"neutral",shape:"icon",disabled:!oe,onClick:N,children:c(Pi,{className:"size-full"})}),c(ar,{color:"background"}),c(ot,{className:"rounded-t-none",color:"neutral",shape:"icon",disabled:!U,onClick:me,children:c(Ni,{className:"size-full"})})]}),r!=="none"&&c(ot,{variant:"fill",color:L?"primary":"neutral",shape:"icon",onClick:S,children:L?c(Ri,{className:"size-full"}):c(Ii,{className:"size-full"})})]})]}),c(Li,{isVisible:I,className:ee,url:Q?.src,title:Q?.title,description:Q?.text,clickHandler:A,extendMode:L,maxItemsShown:s,aspectRatioStyle:o,children:c(kn,{className:"absolute right-2 top-2 z-10",onClick:q})}),H&&c(kn,{className:ce(ee,It("top-right")),onClick:O})]})},Hi=({className:e=""})=>{const{infiniteCarrousel:t,preloadRange:n,isFullScreen:r,maxItemsShown:s,integration:i}=Je(),{aspectRatioStyle:d}=gt(),{items:o,slidable:v,carrouselItemIndex:h,setCarrouselItemIndex:k,itemIndexCommand:f,setItemIndexCommand:p,specialCommand:a,isRunningSpecialCommand:E,finishSpecialCommand:T,extendMode:w,extendTransition:g}=Qe(),{effectiveMaxItemsShown:M}=Go(),C=ve(null),m=X(P=>{if(!C.current)throw new Error(`[${P??"sliderOrThrow"}] slider.current is null`);return C.current},[]),L=ve(!1),S=ve(null),Q=ve(null),I=ve(null),q=X(()=>{I.current&&cancelAnimationFrame(I.current)},[]),K=X(()=>{const P=m("computeClosestSnapIndex"),Z=Array.from(P.children),te=P.scrollLeft;let D=0,$=1/0;if(Z.forEach((J,ue)=>{const z=J.offsetLeft,ye=Math.abs(z-te);ye<$&&($=ye,D=ue)}),M>1){const J=Math.ceil(M),ue=o.length+(i&&!t&&M%1!==0?1:0),z=Math.max(0,ue-J);if(D=Math.min(D,z),i&&!t&&M%1!==0){const ye=o.length-1;D=Math.min(D,ye)}}return D},[m,M,o.length,t,i]),H=X(P=>{const Z=m("setStyleCursor");Z.style.cursor=P},[m]),oe=X(P=>{const Z=m("setStyleSnapState");P==="mandatory"?Z.style.scrollSnapType="x mandatory":Z.style.scrollSnapType="none"},[m]),N=X((P,Z,te)=>{q();const D=m("scrollToIndex"),$=Array.from(D.children),J=D.scrollLeft;let ue=$[P].offsetLeft;const z=D.clientWidth,ye=D.scrollWidth-z;if(M>1){const x=Math.ceil(M),V=o.length+(i&&!t&&M%1!==0?1:0);P>=V-x&&(ue=Math.min(ue,ye))}const ne=x=>{D.scrollTo({left:x,behavior:"instant"})},Ce=()=>{ne(ue),oe("mandatory"),te?.()},He=Math.abs(J-ue);if(He<1||Z==="instant"){Ce();return}const je=it(He/2.5,300,1e3),Ze=new Date().getTime();oe("none");const _=()=>{const x=()=>{const G=new Date().getTime()-Ze;if(G>=je){Ce();return}const W=Math.min(G/je,1),b=sr(W),ae=$t(J,ue,b);ne(ae),_()};I.current=requestAnimationFrame(x)};_()},[q,m,M,oe,o.length,i,t]),[U,me]=xe(),O=!!U;fe(()=>{const P=()=>{clearTimeout(U);const Z=setTimeout(()=>{me(void 0)},Xo);me(Z)};return addEventListener("resize",P),document.addEventListener("fullscreenchange",P),()=>{removeEventListener("resize",P),document.removeEventListener("fullscreenchange",P)}},[U]),fe(()=>{if(a)return;const P=K();Number.isNaN(P)||P!==h&&N(h,"instant")},[h,K,N,a,o,U,r,w,g]),fe(()=>{if(!v||E){H("auto");return}const P=C.current;if(!P)return;H("grab"),oe("mandatory");const Z=$=>{$.button===0&&($.preventDefault(),$.stopPropagation(),q(),L.current=!0,S.current=$.pageX-P.offsetLeft,Q.current=P.scrollLeft,H("grabbing"))},te=$=>{if(!L.current)return;if(S.current===null)throw new Error("[onMouseMove] startX is null");oe("none");const ue=$.pageX-P.offsetLeft-S.current;requestAnimationFrame(()=>{if(Q.current===null)throw new Error("[onMouseMove] scrollLeft is null");let z=Q.current-ue;if(!t){const ye=P.scrollWidth-P.clientWidth;z>ye&&(z=ye)}P.scrollLeft=z})},D=()=>{if(!L.current)return;L.current=!1,H("grab");const $=K();N($,"smooth")};return P.addEventListener("mousedown",Z),document.addEventListener("mousemove",te),document.addEventListener("mouseleave",D),document.addEventListener("mouseup",D),document.addEventListener("contextmenu",D),()=>{P.removeEventListener("mousedown",Z),document.removeEventListener("mousemove",te),document.removeEventListener("mouseleave",D),document.removeEventListener("mouseup",D),document.removeEventListener("contextmenu",D)}},[q,K,t,E,N,H,oe,v]),fe(()=>{if(g||O)return;const P=C.current;if(!P)return;const Z=()=>{const te=K();Number.isNaN(te)||(k(te),te===f&&p(null))};return P.addEventListener("scroll",Z),()=>{P.removeEventListener("scroll",Z)}},[K,g,O,f,s,k,p]),fe(()=>{if(f===null)return;const P=()=>{setTimeout(()=>{p(null),T()},75)};switch(a){case"first_to_last":{const Z=Math.ceil(M),te=o.length+(i&&!t&&M%1!==0?1:0),D=M>1?Math.max(0,te-Z):o.length-1;N(D,"instant",P);break}case"last_to_first":N(0,"instant",P);break;case"instant":N(f,"instant",P);break;default:N(f,"smooth");break}},[a,T,f,o.length,N,p,M,t,i]);const A=De(()=>!i||r?d:{aspectRatio:"auto"},[i,r,d]),ee=De(()=>({...d,minWidth:`${100/M}%`,width:`${100/M}%`,flexShrink:0}),[d,M]);return c("div",{className:ce("relative overflow-hidden rounded-carrousel transition-radius",e),style:A,children:[c("div",{ref:C,className:`flex size-full ${v?"overflow-x-auto no-scrollbar *:snap-start *:snap-always":"justify-center"}`,children:[o.map((P,Z)=>{const te=Z===h,D=Z===0,$=Z===o.length-1,J=(()=>{const Ce=Math.ceil(M);if(a==="first_to_last"&&D)return{transform:`translateX(${100*o.length/Ce}%)`};if(a==="last_to_first"&&$)return{transform:`translateX(-${100*o.length/Ce}%)`}})(),ue=Math.ceil(M),z=Math.max(n,ue);let ye=Math.abs(Z-h)<=z;ye||=Z===f,ye||=Z>=h&&Z<h+ue,t&&(ye||=h<z&&o.length-Z<=z-h,ye||=h>=o.length-z&&Z<=z-(o.length-h));const ne=(()=>{let Ce;switch(P.type){case"360":Ce=P.images[0].src;break;case"interior-360":Ce=P.poster??"interior-360";break;case"image":Ce=P.src;break;case"video":Ce=P.poster??"video";break;case"custom":Ce="custom";break;default:Ce="unknown"}return`${Z}_${Ce}`})();return c("div",{className:ce("h-full bg-foreground/35",h===Z&&"z-1"),style:{...ee,...J},children:ye&&c(Ei,{index:Z,item:P,isShown:te})},ne)}),i&&!t&&!r&&s%1!==0&&c("div",{className:"h-full",style:ee},"empty-slide")]}),c(Oi,{})]})},Fi=()=>{const{permanentGallery:e,integration:t}=Je(),{aspectRatioStyle:n}=gt(),{isShowingDetails:r,resetShownDetails:s,extendMode:i,disableExtendMode:d,isZooming:o,resetZoom:v,fakeFullScreen:h}=Qe(),k=ve(null),f=ve(null),p=ve(null);return fe(()=>{if(!i)return;const a=k.current,E=f.current,T=p.current;if(!a||!E||!T)return;let w=!1;const g=m=>[a,E,T].includes(m.target),M=m=>{w=g(m)},C=m=>{w&&(g(m)&&d(),w=!1)};return a.addEventListener("mousedown",M),a.addEventListener("mouseup",C),()=>{a.removeEventListener("mousedown",M),a.removeEventListener("mouseup",C)}},[d,i]),fe(()=>{const a=E=>{E.key==="Escape"&&(o?v():r?s():d())};return addEventListener("keydown",a),()=>{removeEventListener("keydown",a)}},[d,r,o,s,v]),c("div",{ref:k,className:ce("relative",i&&"flex size-full items-center justify-center",h&&"fixed inset-0 z-overlay bg-foreground/75"),children:[c("div",{ref:f,className:i?"flex size-full flex-col justify-center gap-y-2 small:gap-y-4":"space-y-2",children:[c("div",{ref:p,className:ce(i&&"mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"),style:t?{}:n,children:c(Hi,{className:ce(i&&"h-full min-w-0")})}),e&&c(ir,{className:ce(i&&"my-2 shrink-0 small:my-4")})]}),i&&c(kn,{className:"absolute right-2 top-2 small:right-4 small:top-4",onClick:d})]})},Ui=()=>{const{emitEvent:e,compositionUrl:t}=Je(),{data:n,status:r,isSuccess:s,error:i}=ya(t);return fe(()=>{i?e(Hn,i):r==="fetching"?e(zn,t):s&&e(On,n)},[n,t,e,i,s,r]),i?c(jt,{className:"aspect-square text-foreground/70",text:"Player could not be loaded"}):s?c(xa,{composition:n,children:c(Ma,{children:c(Fi,{})})}):c("div",{className:"flex aspect-square size-full flex-col items-center justify-center gap-y-4",children:[c("div",{className:"animate-pulse text-xl",children:"Loading Player"}),c(tr,{color:"foreground"})]})},Vi={hideCategoriesNav:!0,infiniteCarrousel:!1,permanentGallery:!1},Wi=[1,1.5,2,2.5],Bi=()=>De(()=>Pr(),[]),Yi=()=>De(()=>Rr(),[]),Xi=()=>De(()=>Ar(),[]),Gi=({compositionUrl:e,integration:t=!1,maxItemsShown:n=1,hideCategoriesNav:r=!1,infiniteCarrousel:s=!1,permanentGallery:i=!1,mediaLoadStrategy:d=Cr,minMediaWidth:o=0,maxMediaWidth:v=1/0,preloadRange:h=1,autoLoad360:k=!1,autoLoadInterior360:f=!1,categoriesFilter:p=Mr,extendBehavior:a=Lr,eventPrefix:E=Yn,demoSpin:T=!1,reverse360:w=!1,analyticsEventPrefix:g=kr,analyticsUrl:M=Ir,analyticsBearer:C=Tr,analyticsSimpleRequestsOnly:m=!1,analyticsDryRun:L=!1,analyticsDebug:S=!1,children:Q})=>{n=Ea(n,Wi);const I=ve(null),[q,K]=xe(.5),[H,oe]=xe(!1),N=X((te,D)=>{const $=E+te,J=new CustomEvent($,{detail:D});document.dispatchEvent(J)},[E]),U=Bi(),me=Yi(),O=Xi(),A=X(async te=>{try{const $={...{type:te.type,timestamp:new Date().toISOString(),instance_id:O},...te};if(L){console.log("[DRY RUN] AnalyticsEvent:",$);return}const J=g+te.type,ue=new CustomEvent(J,{detail:$});if(document.dispatchEvent(ue),M){const z="POST",ye=new Headers;m||(ye.append("Content-Type","application/json"),ye.append("Cache-Control","no-cache"),C&&ye.append("Authorization",`Bearer ${C}`));const ne=JSON.stringify($);await fetch(M,{method:z,headers:ye,body:ne})}}catch(D){if(!S)return;console.error("Error while sending analytics event:",D)}},[g,M,C,m,L,S,O]),[ee]=xe({type:"identify",browser_id:U,session_id:me,referrer:document.referrer,origin:window.location.origin,page_url:window.location.href,user_agent:navigator.userAgent,wp_properties:{composition_url:e,integration:t,max_items_shown:n,hide_categories_nav:r,infinite_carrousel:s,permanent_gallery:i,media_load_strategy:d,min_media_width:o,max_media_width:v,preload_range:h,auto_load_360:k,auto_load_interior_360:f,categories_filter:p,extend_behavior:a,event_prefix:E,demo_spin:T,reverse_360:w}});fe(()=>{const te=setTimeout(()=>A(ee),0);return()=>clearTimeout(te)},[A,ee]),fe(()=>{if(H){K(1);return}if(!I.current)return;const te=I.current,D=()=>{const $=window.innerWidth,J=te.clientWidth;K(J/$)};return D(),addEventListener("resize",D),()=>{removeEventListener("resize",D)}},[H]),fe(()=>{if(a!=="full_screen")return;const te=I.current;if(!te)throw new Error("Wrapper not found");const D=()=>{const{fullscreenElement:$}=document;oe($===te||$?.localName===ut)};return document.addEventListener("fullscreenchange",D),()=>{document.removeEventListener("fullscreenchange",D)}},[a]);const P=X(async()=>{const te=I.current;if(!te)throw new Error("Wrapper not found");try{return await te.requestFullscreen(),!0}catch{return!1}},[]),Z=X(async()=>{try{return await document.exitFullscreen(),!0}catch{return!1}},[]);return c(ba,{compositionUrl:e,integration:t,hideCategoriesNav:r,infiniteCarrousel:s,permanentGallery:i,maxItemsShown:n,mediaLoadStrategy:d,minMediaWidth:o,maxMediaWidth:v,preloadRange:h,categoriesFilter:p,autoLoad360:k,autoLoadInterior360:f,extendBehavior:a,demoSpin:T,reverse360:w,emitEvent:N,emitAnalyticsEvent:A,playerInViewportWidthRatio:q,isFullScreen:H,requestFullscreen:P,exitFullscreen:Z,...t?Vi:{},children:c(Ca,{children:[c("div",{ref:I,className:"select-none text-foreground",style:{"--background":"var(--cc-webplayer-background, 0 0% 100%)","--foreground":"var(--cc-webplayer-foreground, 240 10% 3.9%)","--primary":"var(--cc-webplayer-primary, 216 100% 52%)","--primary-foreground":"var(--cc-webplayer-primary-foreground, var(--background))","--primary-light":"var(--cc-webplayer-primary-light, var(--primary))","--neutral":"var(--cc-webplayer-neutral, 0 0% 39%)","--neutral-foreground":"var(--cc-webplayer-neutral-foreground, var(--foreground))","--radius-ui":"var(--cc-webplayer-radius-ui, 16px)","--radius-carrousel":"var(--cc-webplayer-radius-carrousel, 0)","--radius-gallery":"var(--cc-webplayer-radius-gallery, 0)","--hotspot-damage-color":"hsl(var(--cc-webplayer-hotspot-damage-color, 37 89% 52%))","--hotspot-feature-color":"hsl(var(--cc-webplayer-hotspot-feature-color, var(--primary)))"},children:c(Ui,{})}),Q]})})},Zi=({children:e,index:t,thumbnailSrc:n})=>{const{registerCustomMedia:r,unregisterCustomMedia:s}=Ot();return fe(()=>{if(!e)return;const i=r({Media:e,index:t,thumbnailSrc:n});return()=>{s(i)}},[e,s,t,r,n]),null},$i=e=>Ln()?c(Zi,{...e}):c("slot",{}),ji=({name:e,children:t})=>{const{registerIconConfig:n,unregisterIconConfig:r}=Ot();return fe(()=>{if(t)return n(e,{Icon:t}),()=>{r(e)}},[t,e,n,r]),null},qi=e=>Ln()?c(ji,{...e}):c("slot",{}),Ki=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:4px;right:4px}.inset-y-1{top:4px;bottom:4px}.-bottom-1{bottom:-4px}.-left-1{left:-4px}.-right-1{right:-4px}.-top-1{top:-4px}.bottom-0{bottom:0}.bottom-1{bottom:4px}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.right-1{right:4px}.right-2{right:8px}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-2{top:8px}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-10,.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:8px;margin-bottom:8px}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.aspect-square{aspect-ratio:1 / 1}.size-1{width:4px;height:4px}.size-12{width:48px;height:48px}.size-20{width:80px;height:80px}.size-4{width:16px;height:16px}.size-5{width:20px;height:20px}.size-8{width:32px;height:32px}.size-full{width:100%;height:100%}.h-1{height:4px}.h-10{height:40px}.h-20{height:80px}.h-3\\/4{height:75%}.h-5{height:20px}.h-8{height:32px}.h-\\[15\\%\\]{height:15%}.h-\\[85\\%\\]{height:85%}.h-full{height:100%}.h-px{height:1px}.max-h-\\[50\\%\\]{max-height:50%}.min-h-0{min-height:0}.min-h-\\[15\\%\\]{min-height:15%}.w-12{width:48px}.w-3\\/5{width:60%}.w-8{width:32px}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0}.max-w-40{max-width:160px}.max-w-\\[1600px\\]{max-width:1600px}.max-w-\\[60\\%\\]{max-width:60%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -6px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: 6px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-ew-resize{cursor:ew-resize}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.grid-cols-\\[repeat\\(var\\(--max-items\\)\\,1fr\\)\\]{grid-template-columns:repeat(var(--max-items),1fr)}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-x-1{-moz-column-gap:4px;column-gap:4px}.gap-x-2{-moz-column-gap:8px;column-gap:8px}.gap-x-4{-moz-column-gap:16px;column-gap:16px}.gap-y-1{row-gap:4px}.gap-y-2{row-gap:8px}.gap-y-4{row-gap:16px}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2px * var(--tw-space-x-reverse));margin-left:calc(2px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + 2px)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - 2px)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.pl-6{padding-left:24px}.pr-12{padding-right:48px}.pr-4{padding-right:16px}.pt-8{padding-top:32px}.text-2xl{font-size:24px;line-height:32px}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.text-xs{font-size:12px;line-height:16px}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:size-full>*{width:100%;height:100%}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.\\*\\:object-cover>*{-o-object-fit:cover;object-fit:cover}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:8px;right:8px}.small\\:inset-y-2{top:8px;bottom:8px}.small\\:bottom-2{bottom:8px}.small\\:left-2{left:8px}.small\\:right-2{right:8px}.small\\:right-4{right:16px}.small\\:top-2{top:8px}.small\\:top-4{top:16px}.small\\:my-4{margin-top:16px;margin-bottom:16px}.small\\:hidden{display:none}.small\\:h-12{height:48px}.small\\:h-28{height:112px}.small\\:max-w-48{max-width:192px}.small\\:gap-2{gap:8px}.small\\:gap-x-2{-moz-column-gap:8px;column-gap:8px}.small\\:gap-y-2{row-gap:8px}.small\\:gap-y-4{row-gap:16px}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:12px}.small\\:px-2{padding-left:8px;padding-right:8px}.small\\:py-1{padding-top:4px;padding-bottom:4px}.small\\:pl-8{padding-left:32px}.small\\:pr-6{padding-right:24px}.small\\:text-base{font-size:16px;line-height:24px}.small\\:text-sm{font-size:14px;line-height:20px}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:80px}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:224px}.large\\:gap-4{gap:16px}.large\\:p-2{padding:8px}.large\\:p-4{padding:16px}.large\\:text-base{font-size:16px;line-height:24px}.large\\:text-lg{font-size:18px;line-height:28px}}.pnlm-container{margin:0;padding:0;overflow:hidden;position:relative;cursor:default;width:100%;height:100%;font-family:Helvetica,Nimbus Sans L,Liberation Sans,Arial,sans-serif;background:#f4f4f4 url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='67'%20height='100'%20viewBox='0%200%2067%20100'%3e%3cpath%20stroke='%23ccc'%20fill='none'%20d='M33.5,50,0,63,33.5,75,67,63,33.5,50m-33.5-50,67,25m-0.5,0,0,75m-66.5-75,67-25m-33.5,75,0,25m0-100,0,50'/%3e%3c/svg%3e") repeat;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;outline:0;line-height:1.4;contain:content;touch-action:none}.pnlm-container *{box-sizing:content-box}.pnlm-ui{position:absolute;width:100%;height:100%;z-index:1}.pnlm-grab{cursor:grab;cursor:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='26'%20width='26'%3e%3cpath%20stroke='%23000'%20stroke-width='1px'%20fill='%23fff'%20d='m15.3%2020.5s6.38-6.73%204.64-8.24-3.47%201.01-3.47%201.01%203.61-5.72%201.41-6.49c-2.2-0.769-3.33%204.36-3.33%204.36s0.873-5.76-1.06-5.76-1.58%205.39-1.58%205.39-0.574-4.59-2.18-4.12c-1.61%200.468-0.572%205.51-0.572%205.51s-1.58-4.89-2.93-3.79c-1.35%201.11%200.258%205.25%200.572%206.62%200.836%202.43%202.03%202.94%202.17%205.55'/%3e%3c/svg%3e") 12 8,default}.pnlm-grabbing{cursor:grabbing;cursor:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='26'%20width='26'%3e%3cpath%20stroke='%23000'%20stroke-width='1px'%20fill='%23fff'%20d='m15.3%2020.5s5.07-5.29%203.77-6.74c-1.31-1.45-2.53%200.14-2.53%200.14s2.74-3.29%200.535-4.06c-2.2-0.769-2.52%201.3-2.52%201.3s0.81-2.13-1.12-2.13-1.52%201.77-1.52%201.77-0.261-1.59-1.87-1.12c-1.61%200.468-0.874%202.17-0.874%202.17s-0.651-1.55-2-0.445c-1.35%201.11-0.68%202.25-0.365%203.62%200.836%202.43%202.03%202.94%202.17%205.55'/%3e%3c/svg%3e") 12 8,default}.pnlm-sprite{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='26'%20height='208'%3e%3ccircle%20fill-opacity='.78'%20cy='117'%20cx='13'%20r='11'%20fill='%23fff'/%3e%3ccircle%20fill-opacity='.78'%20cy='143'%20cx='13'%20r='11'%20fill='%23fff'/%3e%3ccircle%20cy='169'%20cx='13'%20r='7'%20fill='none'%20stroke='%23000'%20stroke-width='2'/%3e%3ccircle%20cy='195'%20cx='13'%20r='7'%20fill='none'%20stroke='%23000'%20stroke-width='2'/%3e%3ccircle%20cx='13'%20cy='195'%20r='2.5'/%3e%3cpath%20d='m5%2083v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-5%205v6h6v-6zm-5%205v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z'/%3e%3cpath%20d='m13%20110a7%207%200%200%200%20-7%207%207%207%200%200%200%207%207%207%207%200%200%200%207%20-7%207%207%200%200%200%20-7%20-7zm-1%203h2v2h-2zm0%203h2v5h-2z'/%3e%3cpath%20d='m5%2057v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-10%2010v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z'/%3e%3cpath%20d='m17%2038v2h-8v-2z'/%3e%3cpath%20d='m12%209v3h-3v2h3v3h2v-3h3v-2h-3v-3z'/%3e%3cpath%20d='m13%20136-6.125%206.125h4.375v7.875h3.5v-7.875h4.375z'/%3e%3cpath%20d='m10.428%20173.33v-5.77l5-2.89v5.77zm1-1.73%203-1.73-3.001-1.74z'/%3e%3c/svg%3e")}.pnlm-container:fullscreen{height:100%!important;width:100%!important;position:static!important}.pnlm-render-container{cursor:inherit;position:absolute;height:100%;width:100%}.pnlm-controls{margin-top:4px;background-color:#fff;border:1px solid #999;border-color:#0006;border-radius:3px;cursor:pointer;z-index:2;transform:translateZ(9999px)}.pnlm-control:hover{background-color:#f8f8f8}.pnlm-controls-container{position:absolute;top:0;left:4px;z-index:1}.pnlm-zoom-controls{width:26px;height:52px}.pnlm-zoom-in{width:100%;height:50%;position:absolute;top:0;border-radius:3px 3px 0 0}.pnlm-zoom-out{width:100%;height:50%;position:absolute;bottom:0;background-position:0 -26px;border-top:1px solid #ddd;border-top-color:#0000001a;border-radius:0 0 3px 3px}.pnlm-fullscreen-toggle-button,.pnlm-orientation-button,.pnlm-hot-spot-debug-indicator{width:26px;height:26px}.pnlm-hot-spot-debug-indicator{position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px 0 0 -13px;background-color:#ffffff80;border-radius:13px;display:none}.pnlm-orientation-button-inactive{background-position:0 -156px}.pnlm-orientation-button-active{background-position:0 -182px}.pnlm-fullscreen-toggle-button-inactive{background-position:0 -52px}.pnlm-fullscreen-toggle-button-active{background-position:0 -78px}.pnlm-panorama-info{position:absolute;bottom:4px;background-color:#000000b3;border-radius:0 3px 3px 0;padding-right:10px;color:#fff;text-align:left;display:none;z-index:2;transform:translateZ(9999px)}.pnlm-title-box{position:relative;font-size:20px;display:table;padding-left:5px;margin-bottom:3px}.pnlm-author-box{position:relative;font-size:12px;display:table;padding-left:5px}.pnlm-load-box{position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:none;color:#fff}.pnlm-load-box p{margin:20px 0}.pnlm-lbox{position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px 0 0 -10px;display:none}.pnlm-loading{animation-duration:1.5s;-webkit-animation-duration:1.5s;animation-name:pnlm-mv;-webkit-animation-name:pnlm-mv;animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;animation-timing-function:linear;-webkit-animation-timing-function:linear;height:10px;width:10px;background-color:#fff;position:relative}@keyframes pnlm-mv{0%{left:0;top:0}25%{left:10px;top:0}50%{left:10px;top:10px}75%{left:0;top:10px}to{left:0;top:0}}.pnlm-load-button{position:absolute;top:50%;left:50%;width:200px;height:100px;margin:-50px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:table;color:#fff;cursor:pointer}.pnlm-load-button:hover{background-color:#000c}.pnlm-load-button p{display:table-cell;vertical-align:middle}.pnlm-info-box{font-size:15px;position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000;border-radius:3px;display:table;text-align:center;color:#fff;table-layout:fixed}.pnlm-info-box a{color:#fff;word-wrap:break-word;overflow-wrap:break-word}.pnlm-info-box p{display:table-cell;vertical-align:middle;padding:0 5px}.pnlm-error-msg{display:none}.pnlm-about-msg{font-size:11px;line-height:11px;color:#fff;padding:5px 8px;background:#000000b3;border-radius:3px;position:absolute;top:50px;left:50px;display:none;opacity:0;transition:opacity .3s ease-in-out;z-index:1}.pnlm-about-msg a:link,.pnlm-about-msg a:visited{color:#fff}.pnlm-about-msg a:hover,.pnlm-about-msg a:active{color:#eee}.pnlm-hotspot-base{position:absolute;visibility:hidden;cursor:default;vertical-align:middle;top:0;z-index:1}.pnlm-hotspot{height:26px;width:26px;border-radius:13px}.pnlm-hotspot:hover{background-color:#fff3}.pnlm-hotspot.pnlm-info{background-position:0 -104px}.pnlm-hotspot.pnlm-scene{background-position:0 -130px}div.pnlm-tooltip span{visibility:hidden;position:absolute;border-radius:3px;background-color:#000000b3;color:#fff;text-align:center;max-width:200px;padding:5px 10px;margin-left:-220px;cursor:default}div.pnlm-tooltip:hover span{visibility:visible}div.pnlm-tooltip:hover span:after{content:"";position:absolute;width:0;height:0;border-width:10px;border-style:solid;border-color:rgba(0,0,0,.7) transparent transparent transparent;bottom:-20px;left:-10px;margin:0 50%}.pnlm-compass{position:absolute;width:50px;height:50px;right:4px;bottom:4px;border-radius:25px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='50'%20width='50'%3e%3cpath%20d='m24.5078%206-3.2578%2018h7.5l-3.25781-18h-0.984376zm-3.2578%2020%203.2578%2018h0.9844l3.2578-18h-7.5zm1.19531%200.9941h5.10938l-2.5547%2014.1075-2.5547-14.1075z'/%3e%3c/svg%3e");cursor:default;display:none}.pnlm-world{position:absolute;left:50%;top:50%}.pnlm-face{position:absolute;transform-origin:0 0 0}.pnlm-dragfix,.pnlm-preview-img{position:absolute;height:100%;width:100%}.pnlm-preview-img{background-size:cover;background-position:center}.pnlm-lbar{width:150px;margin:0 auto;border:#fff 1px solid;height:6px}.pnlm-lbar-fill{background:#fff;height:100%;width:0}.pnlm-lmsg{font-size:12px}.pnlm-fade-img{position:absolute;top:0;left:0}.pnlm-pointer{cursor:pointer}#textInfo .tooltip-content{font-size:1.6em;position:absolute;left:-70px;bottom:80px;width:200px;pointer-events:none;background-color:#333;color:#fff;line-height:1.2em;padding:.8em;opacity:0;transform-origin:50% calc(100% + 6em);transform:rotate3d(0,0,1,15deg);transition:opacity .5s,transform .5s;transition-timing-function:ease,cubic-bezier(.17,.67,.4,1.39)}#textInfo:hover{z-index:3}#textInfo:hover .tooltip-content{opacity:1;pointer-events:all;transform:translateZ(0) rotate3d(0,0,0,0)}#textInfo .hotspot{cursor:pointer;box-sizing:border-box}#textInfo .hotspot .out:before{speak:none;font-size:48px;line-height:90px;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;display:block;-webkit-font-smoothing:antialiased}#textInfo .hotspot .out{width:60px;height:60px;border-radius:50%;border:5px solid rgba(255,255,255,.8);transition:transform ease-out .1s,border .2s;box-sizing:border-box}#textInfo .hotspot .in{width:40px;height:40px;position:absolute;top:10px;left:10px;background-color:#fffc;border-radius:50%;transition:transform ease-out .1s,background .2s}#textInfo .hotspot .out:after{top:0;left:0;padding:0;z-index:-1;box-shadow:0 0 0 2px #ffffff1a;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%;border-radius:50%;content:"";box-sizing:content-box;transform:scale(.9)}#textInfo .hotspot:hover .out{border:5px solid rgba(255,255,255,1);transform:scale(.9);color:#fff}#textInfo .hotspot:hover .in{background-color:#fff;transform:scale(.8)}#textInfo .hotspot:hover .out:after{animation:sonarEffect 1.2s ease-out}@keyframes sonarEffect{0%{opacity:.5}20%{opacity:.8;box-shadow:0 0 0 2px #ffffff1a,0 0 10px 10px #25aae1cc,0 0 0 10px #ffffff80}to{box-shadow:0 0 0 2px #ffffff1a,0 0 10px 10px #25aae1cc,0 0 0 10px #ffffff80;transform:scale(1.5);opacity:0}}`;function Ji(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,n,r)=>`${n}-${r.toLowerCase()}`)}function Tn(e){return Object.entries(e).reduce((t,[n,r])=>{if(r!==void 0){const s=Ji(n);t[s]=r.toString()}return t},{})}const Qi=e=>c(Ke,{children:[c("style",{children:Ki}),c(Gi,{...e})]}),es=e=>Tn(e),ts=e=>Tn(e),ns=e=>Tn(e);function os(e){return{render:function(t){Oo(t,e)},unmount:function(){Wo(e)}}}var rs=Object.defineProperty,as=(e,t,n)=>t in e?rs(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,en=(e,t,n)=>as(e,typeof t!="symbol"?t+"":t,n);const is={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},ss={stringify:e=>e.name,parse:(e,t,n)=>{const r=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof r=="function"?r.bind(n):void 0}},ls={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function cs(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,n,r)=>`${n}-${r.toLowerCase()}`)}function gr(e){return e.replace(/[-:]([a-z])/g,(t,n)=>`${n.toUpperCase()}`)}const us={stringify:e=>e.name,parse:(e,t,n)=>{const r=(()=>{const s=gr(t);if(typeof n<"u"&&s in n.container)return n.container[s]})();return typeof r=="function"?r.bind(n):void 0}},ds={stringify:e=>`${e}`,parse:e=>parseFloat(e)},ps={stringify:e=>e,parse:e=>e},Sn={string:ps,number:ds,boolean:is,function:ss,method:us,json:ls},Ht=Symbol.for("r2wc.render"),tn=Symbol.for("r2wc.connected"),bt=Symbol.for("r2wc.context"),rt=Symbol.for("r2wc.props");function fs(e,t,n){var r,s,i;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const d=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),o=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),v={},h={},k={},f={};for(const a of d){v[a]=Array.isArray(t.props)?"string":t.props[a];const E=cs(a);k[a]=E,f[E]=a}for(const a of o)h[a]=Array.isArray(t.events)?{}:t.events[a];class p extends HTMLElement{constructor(){super(),en(this,i,!0),en(this,s),en(this,r,{}),en(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[rt].container=this.container;for(const E of d){const T=k[E],w=this.getAttribute(T),g=v[E],M=g?Sn[g]:null;if(g==="method"){const C=gr(T);Object.defineProperty(this[rt].container,C,{enumerable:!0,configurable:!0,get(){return this[rt][C]},set(m){this[rt][C]=m,this[Ht]()}}),this[rt][E]=M.parse(w,T,this)}M!=null&&M.parse&&w&&(this[rt][E]=M.parse(w,T,this))}for(const E of o)this[rt][E]=T=>{const w=E.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(w,{detail:T,...h[E]}))}}static get observedAttributes(){return Object.keys(f)}connectedCallback(){this[tn]=!0,this[Ht]()}disconnectedCallback(){this[tn]=!1,this[bt]&&n.unmount(this[bt]),delete this[bt]}attributeChangedCallback(E,T,w){const g=f[E],M=v[g],C=M?Sn[M]:null;g in v&&C!=null&&C.parse&&w&&(this[rt][g]=C.parse(w,E,this),this[Ht]())}[(i=tn,s=bt,r=rt,Ht)](){this[tn]&&(this[bt]?n.update(this[bt],this[rt]):this[bt]=n.mount(this.container,e,this[rt]))}}for(const a of d){const E=k[a],T=v[a];Object.defineProperty(p.prototype,a,{enumerable:!0,configurable:!0,get(){return this[rt][a]},set(w){this[rt][a]=w;const g=T?Sn[T]:null;if(g!=null&&g.stringify){const M=g.stringify(w,E,this);this.getAttribute(E)!==M&&this.setAttribute(E,M)}else this[Ht]()}})}return p}function hs(e,t,n){const r=os(e),s=Cn.createElement(t,n);return r.render(s),{root:r,ReactComponent:t}}function ms({root:e,ReactComponent:t},n){const r=Cn.createElement(t,n);e.render(r)}function gs({root:e}){setTimeout(()=>{e.unmount()},0)}function Nn(e,t={}){return fs(e,t,{mount:hs,update:ms,unmount:gs})}const vs=Nn(Qi,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",integration:"boolean",maxItemsShown:"number",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean"}}),_s=Nn($i,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),ws=Nn(qi,{shadow:"closed",props:{name:"string"}});function ys(){customElements.define(ut,vs),customElements.define(Ut,_s),customElements.define(Vt,ws)}function bs(){Xn()||ys()}We.DEFAULT_EVENT_PREFIX=Yn,We.EVENT_COMPOSITION_LOADED=On,We.EVENT_COMPOSITION_LOADING=zn,We.EVENT_COMPOSITION_LOAD_ERROR=Hn,We.EVENT_EXTEND_MODE_OFF=Vn,We.EVENT_EXTEND_MODE_ON=Un,We.EVENT_GALLERY_CLOSE=Bn,We.EVENT_GALLERY_OPEN=Wn,We.EVENT_HOTSPOTS_OFF=sn,We.EVENT_HOTSPOTS_ON=an,We.EVENT_ITEM_CHANGE=Fn,We.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=Ut,We.WEB_PLAYER_ICON_WC_TAG=Vt,We.WEB_PLAYER_WC_TAG=ut,We.checkCustomElementsDefinition=Xn,We.ensureCustomElementsDefinition=bs,We.generateCompositionUrl=Sr,We.webPlayerCustomMediaPropsToAttributes=ts,We.webPlayerIconPropsToAttributes=ns,We.webPlayerPropsToAttributes=es,Object.defineProperty(We,Symbol.toStringTag,{value:"Module"})});
|
|
27
|
+
`}),m&&c(Kt,{ref:E,id:T,panorama:n,preview:r,width:"100%",height:"100%",image:n,pitch:qa,yaw:Ka,hfov:pr,maxHfov:Jt,minHfov:Qt,compass:!1,showControls:!1,keyboardZoom:!1,onLoad:D,onError:i,onMousedown:G,onTouchstart:G,onTouchend:G,onMouseup:G,autoLoad:!1})]}),c(ti,{isPannellumLoaded:_,isLoading:a,progress:p,autoloadInterior360:d,loadScene:I,itemIndex:t})]})})})},oi=e=>{const{itemIndex:t}=e,{setItemInteraction:n}=Qe(),[r,s]=ye();return he(()=>{r===null||r==="error"||n(t,r==="spin"?"running":"ready")},[t,n,r]),r==="error"?c(jt,{className:"text-background",text:"Interior Spin could not be loaded"}):c(ni,{...e,onLoaded:()=>s("spin"),onError:()=>s("error")})},fr=({className:e})=>c(qe,{className:e,customizationKey:"UI_360_PLAY",children:c("svg",{className:e,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round",children:c("polygon",{points:"6 3 20 12 6 21 6 3"})})}),ri=750,ai=1250,ii=360,si=480,li=({images:e,onlyPreload:t})=>{const{demoSpin:n,reverse360:r,spinCursor:s}=Je(),{isShowingDetails:i,isZooming:d}=Qe(),o=d||i,v=ve(null),f=ve(null),L=ve(0),h=ve(null),p=ve(null),a=ve(null),E=ve(null),T=ve(0),b=16,m=ve({timestamps:new Float64Array(10),values:new Float64Array(10),index:0,count:0}),M=ve(n),k=ve(null),_=X(()=>{k.current&&(clearTimeout(k.current),k.current=null)},[]),C=ve(null),D=()=>{C.current&&(cancelAnimationFrame(C.current),C.current=null)},[G,I]=ye(0);he(()=>{L.current=G},[G]);const S=e.length,J=X(j=>{if(L.current===j)return;const U=h.current;U&&(U.src=e[j].src),L.current=j},[e]),O=X(()=>{const j=(L.current+1)%S;J(j)},[S,J]),ee=X(()=>{const j=(L.current-1+S)%S;J(j)},[S,J]),K=X(()=>{I(L.current)},[]);return he(()=>{if(o){_();return}const j=v.current,ce=f.current;if(!j||!ce)return;M.current&&(M.current=!1,k.current=setTimeout(()=>{const Y=Date.now(),V=()=>{const w=()=>{const ae=(Date.now()-Y)/ai,ie=Math.round((Ie=>Ie*(2-Ie))(ae)*S),ke=it(ie%S,0,S-1);I(ke),!(ie>=S)&&V()};C.current=requestAnimationFrame(w)};V()},ri));const U=ii/S;let P=null;const Z=m.current,z=()=>{Z.index=0,Z.count=0},H=(Y,V)=>{const w=Z.index;Z.timestamps[w]=Y,Z.values[w]=V,Z.index=(w+1)%10,Z.count<10&&Z.count++},ue=()=>{const Y=(()=>{const ie=Date.now(),{timestamps:ke,values:Ie,index:Xe,count:We}=Z;if(We<2)return 0;let Be=-1,Te=-1;for(let Ae=0;Ae<We;Ae++){const Ye=(Xe-1-Ae+10)%10;ie-ke[Ye]<50&&(Te===-1&&(Te=Ye),Be=Ye)}if(Be===-1||Te===-1||Be===Te)return 0;const Ce=ke[Te]-ke[Be];return Ce<=0?0:(Ie[Te]-Ie[Be])/(Ce/1e3)})(),V=Date.now();let w=0,te=V,ae=V;const ge=()=>{const ie=()=>{const ke=Date.now(),Ie=(ke-V)/1e3,Xe=Math.pow(.05,Ie),We=Y*Xe,Be=(ke-te)/1e3;if(w+=We*Be,Math.abs(We)<5*U&&Math.abs(w)<U){C.current=null,K();return}const Te=ke-ae;Math.abs(w)>=U&&Te>=b&&(w>0!==r?O():ee(),w=0,ae=ke),te=ke,ge()};C.current=requestAnimationFrame(ie)};ge()},R=()=>{_(),D()},ne=Y=>{if(Y.button!==0)return;Y.preventDefault(),Y.stopPropagation(),R();const V=Y.clientX;P=V,z(),H(Date.now(),V)},W=Y=>{if(P===null)return;Y.stopPropagation();const{clientX:V}=Y;H(Date.now(),V);const w=V-P;Math.abs(w)<U||(w>0!==r?O():ee(),P=V)},oe=()=>{P!==null&&(P=null,ue())};j.addEventListener("mousedown",ne),document.addEventListener("mousemove",W),document.addEventListener("mouseleave",oe),document.addEventListener("mouseup",oe),document.addEventListener("contextmenu",oe);const N=si/S,Ee=()=>ce.getBoundingClientRect().width,Q=()=>ce.scrollWidth/2-Ee()/2,Me=()=>{const Y=Q();ce.scrollLeft=Y};Me();const Oe=()=>{const Y=ce.scrollLeft-Q();Math.abs(Y)<N||(Y<0!==r?O():ee(),Me())};ce.addEventListener("scroll",Oe);let je=null;const He=()=>{p.current=null;const Y=performance.now();if(Y-T.current<b){p.current=requestAnimationFrame(He);return}T.current=Y;const V=a.current,w=E.current;if(V===null||w===null)return;const te=V-w;Math.abs(te)<U||(te>0!==r?O():ee(),E.current=V,P=V)},g=Y=>{if(je!==null||Y.changedTouches.length!==1)return;R(),p.current!==null&&(cancelAnimationFrame(p.current),p.current=null);const V=Y.changedTouches[0];je=V.identifier;const w=V.clientX;P=w,E.current=w,a.current=w,z(),H(Date.now(),w)},x=Y=>{if(P===null)return;let V=null;for(let te=0;te<Y.changedTouches.length;te++)if(Y.changedTouches[te].identifier===je){V=Y.changedTouches[te];break}if(!V)return;Y.preventDefault();const w=V.clientX;H(Date.now(),w),a.current=w,p.current===null&&(p.current=requestAnimationFrame(He))},re=Y=>{if(P===null)return;let V=!1;for(let w=0;w<Y.changedTouches.length;w++)if(Y.changedTouches[w].identifier===je){V=!0;break}V&&(p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),je=null,P=null,E.current=null,a.current=null,ue())};return ce.addEventListener("touchstart",g,{passive:!1}),ce.addEventListener("touchmove",x,{passive:!1}),ce.addEventListener("touchend",re),ce.addEventListener("touchcancel",re),()=>{D(),p.current!==null&&(cancelAnimationFrame(p.current),p.current=null),j.removeEventListener("mousedown",ne),document.removeEventListener("mousemove",W),document.removeEventListener("mouseleave",oe),document.removeEventListener("mouseup",oe),document.removeEventListener("contextmenu",oe),ce.removeEventListener("scroll",Oe),ce.removeEventListener("touchstart",g),ce.removeEventListener("touchmove",x),ce.removeEventListener("touchend",re),ce.removeEventListener("touchcancel",re)}},[_,O,ee,K,o,r,S]),c("div",{ref:v,style:{cursor:s},children:c("div",{ref:f,className:" overflow-x-scroll",children:[c("div",{className:"sticky left-0 top-0",children:c("img",{ref:h,src:e[G].src,className:"pointer-events-none size-full object-cover",alt:""})}),c("div",{className:"pointer-events-none -mt-px h-px w-[calc(100%+1024px)]"})]})})},ci=({itemIndex:e,images:t,onPlaceholderImageLoaded:n,onSpinImagesLoaded:r,onError:s})=>{const{autoLoad360:i,emitAnalyticsEvent:d}=Je(),{displayedCategoryId:o,displayedCategoryName:v}=Qe(),f=ze(()=>t.map(({src:b})=>b),[t]),[L,h]=ye(null),p=L?[...L.values()].filter(b=>b).length/t.length*100:null,a=X(b=>{p===null&&(h(new Map(f.map(m=>[m,!1]))),d({type:"track",category_id:o,category_name:v,item_type:"next360",item_position:e,action_properties:{action_name:"Next 360 Play",action_field:"next360_play",action_value:b}}))},[p,f,d,o,v,e]),E=X(()=>{a("click")},[a]),T=X(b=>{h(m=>{const M=new Map(m);return M.set(b,!0),M})},[]);return he(()=>{i&&a("auto")},[i,a]),he(()=>{p===100&&r()},[p,r]),c("div",{className:"relative aspect-[4/3] w-full",children:[p!==null&&p!==100&&c("div",{className:"hidden",children:f.map(b=>c(st,{src:b,onLoad:()=>T(b),onError:s},b))}),c(st,{className:"size-full",src:f[0],onLoad:n}),c("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[c(Tn,{className:"size-20"}),c(ot,{color:"neutral",shape:"icon",onClick:E,children:c(fr,{className:"size-full"})}),c("div",{className:de("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",p===null&&"invisible"),children:c("div",{className:"h-full bg-primary transition-[width]",style:{width:`${p??0}%`}})})]})]})},ui=e=>{const{itemIndex:t}=e,{setItemInteraction:n}=Qe(),[r,s]=ye(null);return he(()=>{r===null||r==="error"||n(t,r==="spin"?"running":"ready")},[t,n,r]),r==="error"?c(jt,{className:"text-background",text:"Spin could not be loaded"}):r!=="spin"?c(ci,{...e,onPlaceholderImageLoaded:()=>s(i=>i===null?"placeholder":i),onSpinImagesLoaded:()=>s("spin"),onError:()=>s("error")}):c(li,{...e})},di=750,pi=1250,fi=360,hi=480,mi=({images:e,onlyPreload:t})=>{const{demoSpin:n,reverse360:r,spinCursor:s}=Je(),{isShowingDetails:i,isZooming:d}=Qe(),o=d||i,v=ve(null),f=ve(null),L=ve(n),h=ve(null),p=X(()=>{h.current&&(clearTimeout(h.current),h.current=null)},[]),a=ve(null),E=()=>{a.current&&(cancelAnimationFrame(a.current),a.current=null)},[T,b]=ye(0),m=e.length,M=X(()=>{b(_=>(_-1+m)%m)},[m]),k=X(()=>{b(_=>(_+1)%m)},[m]);return he(()=>{if(o){p();return}const _=v.current,C=f.current;if(!_||!C)return;L.current&&(L.current=!1,h.current=setTimeout(()=>{const W=Date.now(),oe=()=>{const N=()=>{const Q=(Date.now()-W)/pi,Oe=Math.round((He=>He*(2-He))(Q)*m),je=it(Oe%m,0,m-1);b(je),!(Oe>=m)&&oe()};a.current=requestAnimationFrame(N)};oe()},di));const D=fi/m;let G=null,I=[];const S=W=>{I.push(W),I.length>20&&I.shift()},J=()=>{const W=(()=>{const Me=Date.now(),Oe=I.filter(g=>Me-g.timestamp<50);if(Oe.length<2)return 0;const je=Oe[0],He=Oe[Oe.length-1];return(He.value-je.value)/(.001*Math.max(He.timestamp-je.timestamp,1))})(),oe=Date.now();let N=0,Ee=oe;const Q=()=>{const Me=()=>{const Oe=Date.now(),je=(Oe-oe)/1e3,He=Math.pow(.05,je),g=W*He,x=(Oe-Ee)/1e3;if(N+=g*x,Math.abs(g)<5*D&&Math.abs(N)<D){a.current=null;return}Math.abs(N)>=D&&(N>0!==r?k():M(),N=0),Ee=Oe,Q()};a.current=requestAnimationFrame(Me)};Q()},O=()=>{p(),E()},ee=W=>{if(W.button!==0)return;W.preventDefault(),W.stopPropagation(),O();const oe=W.clientX;G=oe,I=[{timestamp:Date.now(),value:oe}]},K=W=>{if(G===null)return;W.stopPropagation();const{clientX:oe}=W;S({timestamp:Date.now(),value:oe});const N=oe-G;Math.abs(N)<D||(N>0!==r?k():M(),G=oe)},j=()=>{G!==null&&(G=null,J())};_.addEventListener("mousedown",ee),document.addEventListener("mousemove",K),document.addEventListener("mouseleave",j),document.addEventListener("mouseup",j),document.addEventListener("contextmenu",j);const ce=hi/m,U=()=>C.getBoundingClientRect().width,P=()=>C.scrollWidth/2-U()/2,Z=()=>{const W=P();C.scrollLeft=W};Z();const z=()=>{const W=C.scrollLeft-P();Math.abs(W)<ce||(W<0!==r?k():M(),Z())};C.addEventListener("scroll",z);let H=null;const ue=W=>{if(H!==null||W.changedTouches.length!==1)return;O();const{identifier:oe,clientX:N}=W.changedTouches[0];H=oe,G=N,I=[{timestamp:Date.now(),value:N}]},R=W=>{if(!G)return;const oe=Array.from(W.changedTouches).find(({identifier:Q})=>Q===H);if(!oe)return;W.preventDefault();const{clientX:N}=oe;S({timestamp:Date.now(),value:N});const Ee=N-G;Math.abs(Ee)<D||(Ee>0!==r?k():M(),G=N)},ne=W=>{!G||!Array.from(W.changedTouches).some(({identifier:N})=>N===H)||(H=null,G=null,J())};return C.addEventListener("touchstart",ue),C.addEventListener("touchmove",R),C.addEventListener("touchend",ne),C.addEventListener("touchcancel",ne),()=>{_.removeEventListener("mousedown",ee),document.removeEventListener("mousemove",K),document.removeEventListener("mouseleave",j),document.removeEventListener("mouseup",j),document.removeEventListener("contextmenu",j),C.removeEventListener("scroll",z),C.removeEventListener("touchstart",ue),C.removeEventListener("touchmove",R),C.removeEventListener("touchend",ne),C.removeEventListener("touchcancel",ne)}},[p,k,M,o,r,m]),c("div",{ref:v,style:{cursor:s},children:c("div",{ref:f,className:"overflow-x-scroll",children:[c("div",{className:"sticky left-0 top-0",children:[e.map(_=>c(st,{src:_.src,className:"pointer-events-none !absolute left-0 top-0 -z-10"},_.src)),c(cr,{...e[T],onlyPreload:t,itemIndex:-1})]}),c("div",{className:"pointer-events-none -mt-px h-px w-[calc(100%+1024px)]"})]})})},gi=({itemIndex:e,images:t,onPlaceholderImageLoaded:n,onSpinImagesLoaded:r,onError:s})=>{const{autoLoad360:i,emitAnalyticsEvent:d}=Je(),{displayedCategoryId:o,displayedCategoryName:v}=Qe(),f=ze(()=>t.map(({src:b})=>b),[t]),[L,h]=ye(null),p=L?[...L.values()].filter(b=>b).length/t.length*100:null,a=X(b=>{p===null&&(h(new Map(f.map(m=>[m,!1]))),d({type:"track",category_id:o,category_name:v,item_type:"exterior-360",item_position:e,action_properties:{action_name:"Exterior 360 Play",action_field:"exterior_360_play",action_value:b}}))},[p,f,d,o,v,e]),E=X(()=>{a("click")},[a]),T=X(b=>{h(m=>{const M=new Map(m);return M.set(b,!0),M})},[]);return he(()=>{i&&a("auto")},[i,a]),he(()=>{p===100&&r()},[p,r]),c("div",{className:"relative aspect-[4/3] w-full",children:[p!==null&&p!==100&&c("div",{className:"hidden",children:f.map(b=>c(st,{src:b,onLoad:()=>T(b),onError:s},b))}),c(st,{className:"size-full",src:f[0],onLoad:n}),c("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-y-4 bg-foreground/35",children:[c(Tn,{className:"size-20"}),c(ot,{color:"neutral",shape:"icon",onClick:E,children:c(fr,{className:"size-full"})}),c("div",{className:de("relative h-1 w-3/5 overflow-hidden rounded-full bg-background",p===null&&"invisible"),children:c("div",{className:"h-full bg-primary transition-[width]",style:{width:`${p??0}%`}})})]})]})},vi=e=>{const{itemIndex:t}=e,{setItemInteraction:n}=Qe(),[r,s]=ye();return he(()=>{r===null||r==="error"||n(t,r==="spin"?"running":"ready")},[t,n,r]),r==="error"?c(jt,{className:"text-background",text:"Spin could not be loaded"}):r!=="spin"?c(gi,{...e,onPlaceholderImageLoaded:()=>s(i=>i===null?"placeholder":i),onSpinImagesLoaded:()=>s("spin"),onError:()=>s("error")}):c(mi,{...e})},_i=e=>c(ot,{color:"neutral",shape:"icon",...e,children:c(rr,{className:"size-full"})}),wi=({className:e})=>c(qe,{className:e,customizationKey:"UI_PAUSE",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M4 12.6667H6.66667V3.33333H4V12.6667ZM9.33333 3.33333V12.6667H12V3.33333H9.33333Z",fill:"currentColor"})})}),yi=({className:e})=>c(qe,{className:e,customizationKey:"UI_VOLUME",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M2 6V10H4.66667L8 13.3333V2.66667L4.66667 6H2ZM11 8C11 6.82 10.32 5.80667 9.33333 5.31334V10.68C10.32 10.1933 11 9.18 11 8ZM9.33333 2.15334V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8C12.6667 10.1133 11.26 11.9 9.33333 12.4733V13.8467C12.0067 13.24 14 10.8533 14 8C14 5.14667 12.0067 2.76 9.33333 2.15334Z",fill:"currentColor"})})}),bi=({className:e})=>c(qe,{className:e,customizationKey:"UI_VOLUME_OFF",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M11 8C11 6.82 10.32 5.80667 9.33333 5.31333V6.78667L10.9667 8.42C10.9867 8.28667 11 8.14667 11 8ZM12.6667 8C12.6667 8.62667 12.5333 9.21333 12.3067 9.76L13.3133 10.7667C13.7533 9.94 14 9 14 8C14 5.14667 12.0067 2.76 9.33333 2.15333V3.52667C11.26 4.1 12.6667 5.88667 12.6667 8ZM2.84667 2L2 2.84667L5.15333 6H2V10H4.66667L8 13.3333V8.84667L10.8333 11.68C10.3867 12.0267 9.88667 12.3 9.33333 12.4667V13.84C10.2533 13.6333 11.0867 13.2067 11.7933 12.6333L13.1533 14L14 13.1533L2.84667 2ZM8 2.66667L6.60667 4.06L8 5.45333V2.66667Z",fill:"currentColor"})})}),hr=({progress:e})=>c("div",{className:"h-1 w-full overflow-hidden rounded-ui-sm bg-background/25",children:c("div",{className:"size-full rounded-ui-sm bg-background transition-transform",style:{transform:`translateX(-${100*(1-e)}%)`}})}),xi=3e3,Ei=({src:e,poster:t,itemIndex:n})=>{const{carrouselItemIndex:r,setItemInteraction:s}=Qe(),i=ve(null),d=ve(null),o=X(()=>{if(!d.current)throw new Error("videoRef.current is null");return d.current},[]);he(()=>{s(n,"ready")},[n,s]);const v=X(()=>{o().play()},[o]),f=X(()=>{o().pause()},[o]);he(()=>{r===n||f()},[r,n,f]);const[L,h]=ye(!1),[p,a]=ye(!0),E=()=>{h(!0),s(n,"running")},T=()=>{h(!1),s(n,"ready")},b=()=>{a(!1)},m=()=>{a(!0)},[M,k]=ye(null),_=U=>{const P=o(),Z=U.currentTarget.getBoundingClientRect(),H=(U.clientX-Z.left)/Z.width,ue=Math.min(1,Math.max(0,H));P.volume=ue,P.muted=!1},C=U=>{const P=o();P.muted=U};he(()=>{const U=d.current;if(!U)return;const P=()=>{k({volume:U.volume,isMuted:U.muted})};return P(),U.addEventListener("volumechange",P),()=>{U.removeEventListener("volumechange",P)}},[]);const[D,G]=ye(null),I=D?D.currentTime/D.duration:0;he(()=>{const U=d.current;if(!U)return;const P=()=>{const Z=U.currentTime,z=U.duration;isNaN(Z)||isNaN(z)||G({currentTime:Z,duration:z})};return P(),U.addEventListener("timeupdate",P),()=>{U.removeEventListener("timeupdate",P)}},[]);const S=U=>{const P=o(),Z=U.currentTarget.getBoundingClientRect(),H=(U.clientX-Z.left)/Z.width,ue=P.duration*H;P.currentTime=ue},J=U=>{const P=Math.floor(U%3600/60),Z=Math.floor(U%60);return`${P}:${Z.toString().padStart(2,"0")}`},[O,ee]=ye(!1),K=ve(void 0),j=X(()=>clearTimeout(K.current),[]),ce=X(()=>{j(),K.current=setTimeout(()=>{ee(!1)},xi)},[j]);return he(()=>{const U=i.current,P=d.current;if(!U||!P)return;const Z=()=>{ce(),ee(!0)},z=()=>{j(),ee(!1)};let H=!1;const ue=()=>{H=!0},R=()=>{H&&(H=!1,f())},ne=()=>{H=!1,Z()},W=oe=>{oe.preventDefault(),oe.touches.length===1&&(ce(),ee(Ee=>!Ee))};return U.addEventListener("mousedown",ue),U.addEventListener("mouseup",R),U.addEventListener("mouseenter",Z),U.addEventListener("mousemove",ne),U.addEventListener("mouseleave",z),P.addEventListener("touchstart",W,{passive:!0}),()=>{U.removeEventListener("mousedown",ue),U.removeEventListener("mouseup",R),U.removeEventListener("mouseenter",Z),U.removeEventListener("mousemove",Z),U.removeEventListener("mouseleave",z),P.removeEventListener("touchstart",W)}},[j,f,ce]),c("div",{ref:i,className:"relative aspect-[4/3] w-full",children:[c("video",{ref:d,className:"size-full",src:e,poster:t,disablePictureInPicture:!0,playsInline:!0,onPlay:E,onPause:T,onEnded:T,onCanPlay:b,onWaiting:m}),L?c(Ke,{children:[c("div",{className:de("absolute inset-x-0 bottom-0 cursor-auto space-y-2 bg-gradient-to-t from-foreground to-transparent p-4 pr-12 pt-8 transition-opacity duration-300",O?"pointer-events-auto opacity-100":"pointer-events-none opacity-0"),onMouseDownCapture:U=>U.stopPropagation(),children:[c("div",{className:"flex items-center justify-between text-background",children:[c("div",{className:"flex items-center gap-x-4",children:[c(ot,{shape:"icon",variant:"ghost",color:"neutral",onClick:f,children:c(wi,{className:"size-full"})}),D&&c("span",{className:"text-sm",children:[J(D.currentTime)," /"," ",J(D.duration)]})]}),M&&c("div",{className:"group/volume flex items-center gap-x-4 rounded-ui-md p-2 transition-colors hover:bg-foreground/25",children:[c("div",{className:`w-12 cursor-pointer py-1 opacity-0 transition-opacity ${M.isMuted?"group-hover/volume:opacity-50":"group-hover/volume:opacity-100"}`,onClick:_,children:c(hr,{progress:M.volume})}),c("div",{className:"size-5 cursor-pointer",onClick:()=>C(!M.isMuted),children:M.isMuted?c(bi,{className:"size-full"}):c(yi,{className:"size-full"})})]})]}),c("div",{className:"cursor-pointer py-1",onClick:S,children:c(hr,{progress:I})})]}),p&&c("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center bg-foreground/25",children:c(tr,{size:"lg",color:"background"})})]}):c("div",{className:"absolute inset-0 flex items-center justify-center bg-foreground/25",children:c(_i,{onClick:v})})]})},Ci=({index:e,item:t,isShown:n})=>{const{type:r}=t;let s;switch(r){case"image":s=c(cr,{itemIndex:e,onlyPreload:!n,...t});break;case"video":s=c(Ei,{itemIndex:e,...t});break;case"360":s=c(vi,{itemIndex:e,onlyPreload:!n,...t});break;case"next360":s=c(ui,{itemIndex:e,onlyPreload:!n,...t});break;case"interior-360":s=c(oi,{itemIndex:e,onlyPreload:!n,...t});break;case"custom":s=c(Wa,{itemIndex:e,...t})}return s=c("div",{className:"grid grid-cols-[repeat(var(--max-items),1fr)]",children:s}),s},Mi=e=>{he(()=>{const t=n=>{n.key==="Escape"&&e()};return addEventListener("keydown",t),()=>{removeEventListener("keydown",t)}},[e])};function Li(e){return e.target===e.currentTarget}const ki=({className:e,children:t,isVisible:n,url:r,title:s,description:i,clickHandler:d,extendMode:o,variant:v,aspectRatioStyle:f,maxItemsShown:L=1})=>{const{isFullScreen:h,integration:p}=Je(),a=()=>v||(!p||h?"centered":"aside"),E=()=>!!(s||i),T=a(),b=m=>{if(!f)return{};switch(m){case"centered":return{...f,maxHeight:E()?"50%":"100%"};case"aside":return{...f,minHeight:0,flex:"1 1 auto"};case"fullwidth":return{...f,height:"85%"};default:return f}};return T==="centered"?c("div",{className:de(e,"absolute inset-0 z-overlay flex justify-end overflow-hidden bg-foreground/60 transition-opacity duration-details",n?"opacity-100":"pointer-events-none opacity-0"),onClick:d,children:c("div",{className:de("flex h-full flex-col bg-background transition-transform duration-details",n?"translate-x-0":"translate-x-full",E()?"max-w-[60%]":"w-full"),children:[t,n&&c(Ke,{children:[c(st,{className:de(E()?"max-h-[50%]":"h-full","w-full bg-foreground/65 object-contain"),src:r||"",style:b("centered"),imgInPlayerWidthRatio:.6}),E()&&c("div",{className:de("flex-1 space-y-1 overflow-y-auto px-2 py-1 small:p-3",o&&"large:p-4"),children:[s&&c("span",{className:de("text-sm font-semibold small:text-base small:font-bold",o&&"large:text-lg"),children:s}),i&&c("p",{className:de("text-xs text-foreground/65 small:text-sm",o&&"large:text-base"),children:i})]})]})]})}):T==="aside"?c("div",{className:de(e,"absolute inset-0 z-overlay flex items-center justify-center overflow-hidden bg-foreground/60 transition-opacity duration-details",n?"opacity-100":"pointer-events-none opacity-0"),onClick:d,children:c("div",{className:de("relative flex h-full flex-col bg-background transition-transform duration-details",n?"translate-y-0":"translate-y-full"),style:{width:p?`${100/(h?1:L)}%`:`${100/L}%`},children:[t,n&&c(Ke,{children:[c(st,{className:"min-h-0 w-full flex-1 bg-foreground/65 object-contain",src:r||"",style:b("aside"),imgInPlayerWidthRatio:.6}),c("div",{className:"min-h-[15%] shrink-0 space-y-1 p-2 small:p-3",children:[s&&c("span",{className:de("block text-xs font-semibold leading-tight small:text-base small:font-bold",o&&"large:text-lg"),children:s}),i&&c("p",{className:de("text-[10px] leading-tight text-foreground/65 small:text-sm",o&&"large:text-base"),children:i})]})]})]})}):c("div",{className:de(e,"absolute inset-0 z-overlay flex items-center justify-center overflow-hidden bg-foreground/60 transition-opacity duration-details",n?"opacity-100":"pointer-events-none opacity-0"),onClick:d,children:c("div",{className:de("relative flex aspect-[4/3] flex-col bg-background transition-transform duration-details",n?"translate-y-0":"translate-y-full"),style:{width:p?`${100/(h?1:L)}%`:`${100/L}%`},children:[t,n&&r&&c(Ke,{children:[c(st,{className:"h-[85%] w-full bg-foreground/65 object-contain",src:r,style:b("fullwidth"),imgInPlayerWidthRatio:.6}),c("div",{className:"h-[15%] space-y-1 overflow-y-auto px-2 py-1 small:p-3",children:[s&&c("span",{className:de("text-sm font-semibold small:text-base small:font-bold",o&&"large:text-lg"),children:s}),i&&c("p",{className:de("text-xs text-foreground/65 small:text-sm",o&&"large:text-base"),children:i})]})]})]})})},Ii=({currentIndex:e,maxIndex:t})=>c("div",{className:"space-x-0.5 rounded-ui bg-foreground/40 px-1.5 py-0.5 text-xs text-background/75 transition-radius small:space-x-1 small:px-2 small:py-1 small:text-sm",children:[c("span",{children:e+1}),c("span",{children:"/"}),c("span",{children:t+1})]}),mr=({className:e})=>c(qe,{className:e,customizationKey:"UI_ARROW_RIGHT",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M4.07666 13.4868L5.25666 14.6668L11.9233 8.00016L5.25666 1.3335L4.07666 2.5135L9.56333 8.00016L4.07666 13.4868Z",fill:"currentColor"})})}),Ti=({className:e})=>c(qe,{className:e,customizationKey:"UI_EXTEND",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M4.66683 9.3335H3.3335V12.6668H6.66683V11.3335H4.66683V9.3335ZM3.3335 6.66683H4.66683V4.66683H6.66683V3.3335H3.3335V6.66683ZM11.3335 11.3335H9.3335V12.6668H12.6668V9.3335H11.3335V11.3335ZM9.3335 3.3335V4.66683H11.3335V6.66683H12.6668V3.3335H9.3335Z",fill:"currentColor"})})}),Si=({className:e})=>c(qe,{className:e,customizationKey:"UI_GALLERY",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M13.3334 2.66683V10.6668H5.33337V2.66683H13.3334ZM13.3334 1.3335H5.33337C4.60004 1.3335 4.00004 1.9335 4.00004 2.66683V10.6668C4.00004 11.4002 4.60004 12.0002 5.33337 12.0002H13.3334C14.0667 12.0002 14.6667 11.4002 14.6667 10.6668V2.66683C14.6667 1.9335 14.0667 1.3335 13.3334 1.3335ZM7.66671 7.78016L8.79337 9.28683L10.4467 7.22016L12.6667 10.0002H6.00004L7.66671 7.78016ZM1.33337 4.00016V13.3335C1.33337 14.0668 1.93337 14.6668 2.66671 14.6668H12V13.3335H2.66671V4.00016H1.33337Z",fill:"currentColor"})})}),Ni=({className:e})=>c(qe,{className:e,customizationKey:"UI_HOTSPOTS",children:c("svg",{className:e,width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[c("g",{clipPath:"url(#clip0_418_982)",children:c("path",{d:"M6 4C4.895 4 4 4.895 4 6C4 7.105 4.895 8 6 8C7.105 8 8 7.105 8 6C8 4.895 7.105 4 6 4ZM10.47 5.5C10.24 3.415 8.585 1.76 6.5 1.53V0.5H5.5V1.53C3.415 1.76 1.76 3.415 1.53 5.5H0.5V6.5H1.53C1.76 8.585 3.415 10.24 5.5 10.47V11.5H6.5V10.47C8.585 10.24 10.24 8.585 10.47 6.5H11.5V5.5H10.47ZM6 9.5C4.065 9.5 2.5 7.935 2.5 6C2.5 4.065 4.065 2.5 6 2.5C7.935 2.5 9.5 4.065 9.5 6C9.5 7.935 7.935 9.5 6 9.5Z",fill:"currentColor"})}),c("defs",{children:c("clipPath",{id:"clip0_418_982",children:c("rect",{width:"12",height:"12",fill:"white"})})})]})}),Pi=({className:e})=>c(qe,{className:e,customizationKey:"UI_MINUS",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M12.6666 8.66634H3.33325V7.33301H12.6666V8.66634Z",fill:"currentColor"})})}),Ri=({className:e})=>c(qe,{className:e,customizationKey:"UI_PLUS",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M12.6666 8.66634H8.66659V12.6663H7.33325V8.66634H3.33325V7.33301H7.33325V3.33301H8.66659V7.33301H12.6666V8.66634Z",fill:"currentColor"})})}),Ai=({className:e})=>c(qe,{className:e,customizationKey:"UI_REDUCE",children:c("svg",{className:e,viewBox:"0 0 16 16",fill:"none",children:c("path",{d:"M3.33325 10.6668H5.33325V12.6668H6.66659V9.3335H3.33325V10.6668ZM5.33325 5.3335H3.33325V6.66683H6.66659V3.3335H5.33325V5.3335ZM9.33325 12.6668H10.6666V10.6668H12.6666V9.3335H9.33325V12.6668ZM10.6666 5.3335V3.3335H9.33325V6.66683H12.6666V5.3335H10.6666Z",fill:"currentColor"})})}),Di=({enabled:e,onToggle:t,label:n,className:r,children:s})=>c("label",{className:de("flex cursor-pointer items-center justify-center gap-x-2",r),children:[c("input",{type:"checkbox",className:"sr-only",checked:e,onChange:t}),n&&c("div",{className:"text-xs text-background",children:n}),c("div",{className:de("flex h-5 w-8 items-center justify-center rounded-full transition-colors",e?"bg-primary":"bg-background/60"),children:c("div",{className:de("flex size-4 items-center justify-center rounded-full p-0.5 transition",e?"translate-x-1.5 bg-primary-foreground text-primary":"-translate-x-1.5 bg-background text-foreground"),children:s})})]}),zi=({className:e})=>c(qe,{className:e,customizationKey:"UI_BURGER",children:c("svg",{className:e,width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:c("path",{d:"M2 12H14V10.6667H2V12ZM2 8.66667H14V7.33333H2V8.66667ZM2 4V5.33333H14V4H2Z",fill:"currentColor"})})}),Oi=({sharedClassName:e})=>{const{categories:t}=gt(),{displayedCategoryId:n,changeCategory:r}=Qe(),[s,i]=ye(!1),d=()=>{i(!s)},o=()=>{i(!1)};return c(Ke,{children:[s&&c("div",{className:de(e,"inset-0 small:hidden"),onClick:o}),c("div",{className:de(e,It("top-left"),"flex gap-x-2 small:hidden"),children:[c(ot,{shape:"icon",color:s?"primary":"neutral",onClick:d,children:c(zi,{})}),s&&c("div",{className:"rounded-ui-md bg-background transition-radius",children:c("ul",{className:"space-y-0.5 p-1",children:t.map(({id:v,title:f})=>c("li",{className:de("cursor-pointer rounded-ui px-2 py-1 text-sm font-bold transition-all hover:bg-primary/30",v===n&&"bg-primary/50"),onClick:()=>{r(v),i(!1)},children:f},v))})})]}),c("div",{className:de(e,er("top"),"w-full overflow-x-auto max-small:hidden"),children:c("div",{className:"mx-auto flex w-fit gap-x-1 rounded-ui-md bg-background p-1 shadow",children:t.map(({id:v,title:f})=>c(ot,{variant:v===n?"fill":"ghost",onClick:()=>r(v),children:f},v))})})]})},Hi=()=>{const{hideCategoriesNav:e,infiniteCarrousel:t,permanentGallery:n,extendBehavior:r,maxItemsShown:s,isFullScreen:i,integration:d}=Je(),{aspectRatioStyle:o,categories:{length:v}}=gt(),{items:{length:f},slidable:L,carrouselItemIndex:h,masterItemIndex:p,prevItem:a,nextItem:E,showGalleryControls:T,enableHotspotsControl:b,currentItemHotspotsVisible:m,toggleHotspots:M,showGallery:k,toggleGallery:_,extendMode:C,toggleExtendMode:D,shownDetails:G,isShowingDetails:I,resetShownDetails:S,showZoomControls:J,isZooming:O,canZoomIn:ee,zoomIn:K,canZoomOut:j,zoomOut:ce,resetView:U}=Qe(),P=X(ue=>{Li(ue)&&S()},[S]);Mi(S);const Z="absolute z-overlay",z=()=>{if(s===1)return h;const R=Math.floor(s)-1;return h+R},H=()=>{if(!d)return p;const R=Math.floor(s)-1;return p+R};return c(Ke,{children:[!e&&v>1&&c(Oi,{sharedClassName:de(Z,"transition-opacity",O?"!pointer-events-none opacity-0":"opacity-100")}),L&&!O&&c("div",{className:de(Z,It("top-right")),children:c(Ii,{currentIndex:!d||i?h:z(),maxIndex:f-1})}),L&&c(Ke,{children:[c(ot,{shape:"icon",color:"neutral",className:de(Z,It("middle-left"),O?"!pointer-events-none opacity-0":"opacity-100"),onClick:a,disabled:!t&&p<=0,children:c(qe,{customizationKey:"CONTROLS_PREV",children:c(mr,{className:"size-full -scale-x-100"})})}),c(ot,{shape:"icon",color:"neutral",className:de(Z,It("middle-right"),O?"!pointer-events-none opacity-0":"opacity-100"),onClick:E,disabled:!t&&H()>=f-1,children:c(qe,{customizationKey:"CONTROLS_NEXT",children:c(mr,{className:"size-full"})})})]}),c("div",{className:de(Z,It("bottom-fullW"),"pointer-events-none grid grid-cols-[auto,1fr,auto] items-end *:pointer-events-auto small:gap-x-2"),children:[!n&&L&&c(Ke,{children:[c(ot,{className:T&&!O?"opacity-100":"!pointer-events-none opacity-0",variant:"fill",color:k?"primary":"neutral",shape:"icon",onClick:_,children:c(Si,{className:"size-full"})}),k&&c(ir,{className:de("transition-opacity",T&&!O?"opacity-100":"!pointer-events-none opacity-0","[mask-image:linear-gradient(to_left,transparent_0px,black_4px,black_calc(100%-4px),transparent_100%)]"),containerClassName:"mx-1"})]}),c("div",{className:"col-start-3 flex flex-col items-end gap-y-1 small:gap-y-2",children:[b&&c(Di,{className:de("transition-opacity",O?"!pointer-events-none opacity-0":"opacity-100"),enabled:m,onToggle:M,children:c(Ni,{className:"size-full"})}),J&&(!d||i)&&c("div",{className:"max-small:hidden",children:[c(ot,{className:"rounded-b-none",color:"neutral",shape:"icon",disabled:!ee,onClick:K,children:c(Ri,{className:"size-full"})}),c(ar,{color:"background"}),c(ot,{className:"rounded-t-none",color:"neutral",shape:"icon",disabled:!j,onClick:ce,children:c(Pi,{className:"size-full"})})]}),r!=="none"&&c(ot,{variant:"fill",color:C?"primary":"neutral",shape:"icon",onClick:D,children:C?c(Ai,{className:"size-full"}):c(Ti,{className:"size-full"})})]})]}),c(ki,{isVisible:I,className:Z,url:G?.src,title:G?.title,description:G?.text,clickHandler:P,extendMode:C,maxItemsShown:s,aspectRatioStyle:o,children:c(In,{className:"absolute right-2 top-2 z-10",onClick:S})}),O&&c(In,{className:de(Z,It("top-right")),onClick:U})]})},Fi=({className:e=""})=>{const{infiniteCarrousel:t,preloadRange:n,isFullScreen:r,maxItemsShown:s,integration:i}=Je(),{aspectRatioStyle:d}=gt(),{items:o,slidable:v,carrouselItemIndex:f,setCarrouselItemIndex:L,itemIndexCommand:h,setItemIndexCommand:p,specialCommand:a,isRunningSpecialCommand:E,finishSpecialCommand:T,extendMode:b,extendTransition:m}=Qe(),{effectiveMaxItemsShown:M}=Go(),k=ve(null),_=X(z=>{if(!k.current)throw new Error(`[${z??"sliderOrThrow"}] slider.current is null`);return k.current},[]),C=ve(!1),D=ve(null),G=ve(null),I=ve(null),S=X(()=>{I.current&&cancelAnimationFrame(I.current)},[]),J=X(()=>{const z=_("computeClosestSnapIndex"),H=Array.from(z.children),ue=z.scrollLeft;let R=0,ne=1/0;if(H.forEach((W,oe)=>{const N=W.offsetLeft,Ee=Math.abs(N-ue);Ee<ne&&(ne=Ee,R=oe)}),M>1){const W=Math.ceil(M),oe=o.length+(i&&!t&&M%1!==0?1:0),N=Math.max(0,oe-W);if(R=Math.min(R,N),i&&!t&&M%1!==0){const Ee=o.length-1;R=Math.min(R,Ee)}}return R},[_,M,o.length,t,i]),O=X(z=>{const H=_("setStyleCursor");H.style.cursor=z},[_]),ee=X(z=>{const H=_("setStyleSnapState");z==="mandatory"?H.style.scrollSnapType="x mandatory":H.style.scrollSnapType="none"},[_]),K=X((z,H,ue)=>{S();const R=_("scrollToIndex"),ne=Array.from(R.children),W=R.scrollLeft;let oe=ne[z].offsetLeft;const N=R.clientWidth,Ee=R.scrollWidth-N;if(M>1){const x=Math.ceil(M),re=o.length+(i&&!t&&M%1!==0?1:0);z>=re-x&&(oe=Math.min(oe,Ee))}const Q=x=>{R.scrollTo({left:x,behavior:"instant"})},Me=()=>{Q(oe),ee("mandatory"),ue?.()},Oe=Math.abs(W-oe);if(Oe<1||H==="instant"){Me();return}const je=it(Oe/2.5,300,1e3),He=new Date().getTime();ee("none");const g=()=>{const x=()=>{const Y=new Date().getTime()-He;if(Y>=je){Me();return}const V=Math.min(Y/je,1),w=sr(V),te=$t(W,oe,w);Q(te),g()};I.current=requestAnimationFrame(x)};g()},[S,_,M,ee,o.length,i,t]),[j,ce]=ye(),U=!!j;he(()=>{const z=()=>{clearTimeout(j);const H=setTimeout(()=>{ce(void 0)},Xo);ce(H)};return addEventListener("resize",z),document.addEventListener("fullscreenchange",z),()=>{removeEventListener("resize",z),document.removeEventListener("fullscreenchange",z)}},[j]),he(()=>{if(a)return;const z=J();Number.isNaN(z)||z!==f&&K(f,"instant")},[f,J,K,a,o,j,r,b,m]),he(()=>{if(!v||E){O("auto");return}const z=k.current;if(!z)return;O("grab"),ee("mandatory");const H=ne=>{ne.button===0&&(ne.preventDefault(),ne.stopPropagation(),S(),C.current=!0,D.current=ne.pageX-z.offsetLeft,G.current=z.scrollLeft,O("grabbing"))},ue=ne=>{if(!C.current)return;if(D.current===null)throw new Error("[onMouseMove] startX is null");ee("none");const oe=ne.pageX-z.offsetLeft-D.current;requestAnimationFrame(()=>{if(G.current===null)throw new Error("[onMouseMove] scrollLeft is null");let N=G.current-oe;if(!t){const Ee=z.scrollWidth-z.clientWidth;N>Ee&&(N=Ee)}z.scrollLeft=N})},R=()=>{if(!C.current)return;C.current=!1,O("grab");const ne=J();K(ne,"smooth")};return z.addEventListener("mousedown",H),document.addEventListener("mousemove",ue),document.addEventListener("mouseleave",R),document.addEventListener("mouseup",R),document.addEventListener("contextmenu",R),()=>{z.removeEventListener("mousedown",H),document.removeEventListener("mousemove",ue),document.removeEventListener("mouseleave",R),document.removeEventListener("mouseup",R),document.removeEventListener("contextmenu",R)}},[S,J,t,E,K,O,ee,v]),he(()=>{if(m||U)return;const z=k.current;if(!z)return;const H=()=>{const ue=J();Number.isNaN(ue)||(L(ue),ue===h&&p(null))};return z.addEventListener("scroll",H),()=>{z.removeEventListener("scroll",H)}},[J,m,U,h,s,L,p]),he(()=>{if(h===null)return;const z=()=>{setTimeout(()=>{p(null),T()},75)};switch(a){case"first_to_last":{const H=Math.ceil(M),ue=o.length+(i&&!t&&M%1!==0?1:0),R=M>1?Math.max(0,ue-H):o.length-1;K(R,"instant",z);break}case"last_to_first":K(0,"instant",z);break;case"instant":K(h,"instant",z);break;default:K(h,"smooth");break}},[a,T,h,o.length,K,p,M,t,i]);const P=ze(()=>!i||r?d:{aspectRatio:"auto"},[i,r,d]),Z=ze(()=>({...d,minWidth:`${100/M}%`,width:`${100/M}%`,flexShrink:0}),[d,M]);return c("div",{className:de("relative overflow-hidden rounded-carrousel transition-radius",e),style:P,children:[c("div",{ref:k,className:`flex size-full ${v?"overflow-x-auto no-scrollbar *:snap-start *:snap-always":"justify-center"}`,children:[o.map((z,H)=>{const ue=H===f,R=H===0,ne=H===o.length-1,W=(()=>{const Me=Math.ceil(M);if(a==="first_to_last"&&R)return{transform:`translateX(${100*o.length/Me}%)`};if(a==="last_to_first"&&ne)return{transform:`translateX(-${100*o.length/Me}%)`}})(),oe=Math.ceil(M),N=Math.max(n,oe);let Ee=Math.abs(H-f)<=N;Ee||=H===h,Ee||=H>=f&&H<f+oe,t&&(Ee||=f<N&&o.length-H<=N-f,Ee||=f>=o.length-N&&H<=N-(o.length-f));const Q=(()=>{let Me;switch(z.type){case"360":Me=z.images[0].src;break;case"interior-360":Me=z.poster??"interior-360";break;case"image":Me=z.src;break;case"video":Me=z.poster??"video";break;case"custom":Me="custom";break;default:Me="unknown"}return`${H}_${Me}`})();return c("div",{className:de("h-full bg-foreground/35",f===H&&"z-1"),style:{...Z,...W},children:Ee&&c(Ci,{index:H,item:z,isShown:ue})},Q)}),i&&!t&&!r&&s%1!==0&&c("div",{className:"h-full",style:Z},"empty-slide")]}),c(Hi,{})]})},Ui=()=>{const{permanentGallery:e,integration:t}=Je(),{aspectRatioStyle:n}=gt(),{isShowingDetails:r,resetShownDetails:s,extendMode:i,disableExtendMode:d,isZooming:o,resetZoom:v,fakeFullScreen:f}=Qe(),L=ve(null),h=ve(null),p=ve(null);return he(()=>{if(!i)return;const a=L.current,E=h.current,T=p.current;if(!a||!E||!T)return;let b=!1;const m=_=>[a,E,T].includes(_.target),M=_=>{b=m(_)},k=_=>{b&&(m(_)&&d(),b=!1)};return a.addEventListener("mousedown",M),a.addEventListener("mouseup",k),()=>{a.removeEventListener("mousedown",M),a.removeEventListener("mouseup",k)}},[d,i]),he(()=>{const a=E=>{E.key==="Escape"&&(o?v():r?s():d())};return addEventListener("keydown",a),()=>{removeEventListener("keydown",a)}},[d,r,o,s,v]),c("div",{ref:L,className:de("relative",i&&"flex size-full items-center justify-center",f&&"fixed inset-0 z-overlay bg-foreground/75"),children:[c("div",{ref:h,className:i?"flex size-full flex-col justify-center gap-y-2 small:gap-y-4":"space-y-2",children:[c("div",{ref:p,className:de(i&&"mx-auto flex min-h-0 w-full max-w-[1600px] justify-center"),style:t?{}:n,children:c(Fi,{className:de(i&&"h-full min-w-0")})}),e&&c(ir,{className:de(i&&"my-2 shrink-0 small:my-4")})]}),i&&c(In,{className:"absolute right-2 top-2 small:right-4 small:top-4",onClick:d})]})},Vi=()=>{const{emitEvent:e,compositionUrl:t}=Je(),{data:n,status:r,isSuccess:s,error:i}=ba(t);return he(()=>{i?e(Fn,i):r==="fetching"?e(On,t):s&&e(Hn,n)},[n,t,e,i,s,r]),i?c(jt,{className:"aspect-square text-foreground/70",text:"Player could not be loaded"}):s?c(Ea,{composition:n,children:c(La,{children:c(Ui,{})})}):c("div",{className:"flex aspect-square size-full flex-col items-center justify-center gap-y-4",children:[c("div",{className:"animate-pulse text-xl",children:"Loading Player"}),c(tr,{color:"foreground"})]})},Wi={hideCategoriesNav:!0,infiniteCarrousel:!1,permanentGallery:!1},Bi=[1,1.5,2,2.5],Yi=()=>ze(()=>Rr(),[]),Xi=()=>ze(()=>Ar(),[]),Gi=()=>ze(()=>Dr(),[]),Zi=({compositionUrl:e,integration:t=!1,maxItemsShown:n=1,hideCategoriesNav:r=!1,infiniteCarrousel:s=!1,permanentGallery:i=!1,mediaLoadStrategy:d=Cr,minMediaWidth:o=0,maxMediaWidth:v=1/0,preloadRange:f=1,autoLoad360:L=!1,autoLoadInterior360:h=!1,categoriesFilter:p=Mr,extendBehavior:a=Lr,eventPrefix:E=Xn,demoSpin:T=!1,reverse360:b=!1,analyticsEventPrefix:m=Ir,analyticsUrl:M=Tr,analyticsBearer:k=Sr,analyticsSimpleRequestsOnly:_=!1,analyticsDryRun:C=!1,analyticsDebug:D=!1,spinCursor:G=kr,children:I})=>{n=Ca(n,Bi);const S=ve(null),[J,O]=ye(.5),[ee,K]=ye(!1),j=X((R,ne)=>{const W=E+R,oe=new CustomEvent(W,{detail:ne});document.dispatchEvent(oe)},[E]),ce=Yi(),U=Xi(),P=Gi(),Z=X(async R=>{try{const W={...{type:R.type,timestamp:new Date().toISOString(),instance_id:P},...R};if(C){console.log("[DRY RUN] AnalyticsEvent:",W);return}const oe=m+R.type,N=new CustomEvent(oe,{detail:W});if(document.dispatchEvent(N),M){const Ee="POST",Q=new Headers;_||(Q.append("Content-Type","application/json"),Q.append("Cache-Control","no-cache"),k&&Q.append("Authorization",`Bearer ${k}`));const Me=JSON.stringify(W);await fetch(M,{method:Ee,headers:Q,body:Me})}}catch(ne){if(!D)return;console.error("Error while sending analytics event:",ne)}},[m,M,k,_,C,D,P]),[z]=ye({type:"identify",browser_id:ce,session_id:U,referrer:document.referrer,origin:window.location.origin,page_url:window.location.href,user_agent:navigator.userAgent,wp_properties:{composition_url:e,integration:t,max_items_shown:n,hide_categories_nav:r,infinite_carrousel:s,permanent_gallery:i,media_load_strategy:d,min_media_width:o,max_media_width:v,preload_range:f,auto_load_360:L,auto_load_interior_360:h,categories_filter:p,extend_behavior:a,event_prefix:E,demo_spin:T,reverse_360:b}});he(()=>{const R=setTimeout(()=>Z(z),0);return()=>clearTimeout(R)},[Z,z]),he(()=>{if(ee){O(1);return}if(!S.current)return;const R=S.current,ne=()=>{const W=window.innerWidth,oe=R.clientWidth;O(oe/W)};return ne(),addEventListener("resize",ne),()=>{removeEventListener("resize",ne)}},[ee]),he(()=>{if(a!=="full_screen")return;const R=S.current;if(!R)throw new Error("Wrapper not found");const ne=()=>{const{fullscreenElement:W}=document;K(W===R||W?.localName===ut)};return document.addEventListener("fullscreenchange",ne),()=>{document.removeEventListener("fullscreenchange",ne)}},[a]);const H=X(async()=>{const R=S.current;if(!R)throw new Error("Wrapper not found");try{return await R.requestFullscreen(),!0}catch{return!1}},[]),ue=X(async()=>{try{return await document.exitFullscreen(),!0}catch{return!1}},[]);return c(xa,{compositionUrl:e,integration:t,hideCategoriesNav:r,infiniteCarrousel:s,permanentGallery:i,maxItemsShown:n,mediaLoadStrategy:d,minMediaWidth:o,maxMediaWidth:v,preloadRange:f,categoriesFilter:p,autoLoad360:L,autoLoadInterior360:h,extendBehavior:a,demoSpin:T,reverse360:b,spinCursor:G,emitEvent:j,emitAnalyticsEvent:Z,playerInViewportWidthRatio:J,isFullScreen:ee,requestFullscreen:H,exitFullscreen:ue,...t?Wi:{},children:c(Ma,{children:[c("div",{ref:S,className:"select-none text-foreground",style:{"--background":"var(--cc-webplayer-background, 0 0% 100%)","--foreground":"var(--cc-webplayer-foreground, 240 10% 3.9%)","--primary":"var(--cc-webplayer-primary, 216 100% 52%)","--primary-foreground":"var(--cc-webplayer-primary-foreground, var(--background))","--primary-light":"var(--cc-webplayer-primary-light, var(--primary))","--neutral":"var(--cc-webplayer-neutral, 0 0% 39%)","--neutral-foreground":"var(--cc-webplayer-neutral-foreground, var(--foreground))","--radius-ui":"var(--cc-webplayer-radius-ui, 16px)","--radius-carrousel":"var(--cc-webplayer-radius-carrousel, 0)","--radius-gallery":"var(--cc-webplayer-radius-gallery, 0)","--hotspot-damage-color":"hsl(var(--cc-webplayer-hotspot-damage-color, 37 89% 52%))","--hotspot-feature-color":"hsl(var(--cc-webplayer-hotspot-feature-color, var(--primary)))"},children:c(Vi,{})}),I]})})},$i=({children:e,index:t,thumbnailSrc:n})=>{const{registerCustomMedia:r,unregisterCustomMedia:s}=Ot();return he(()=>{if(!e)return;const i=r({Media:e,index:t,thumbnailSrc:n});return()=>{s(i)}},[e,s,t,r,n]),null},ji=e=>kn()?c($i,{...e}):c("slot",{}),qi=({name:e,children:t})=>{const{registerIconConfig:n,unregisterIconConfig:r}=Ot();return he(()=>{if(t)return n(e,{Icon:t}),()=>{r(e)}},[t,e,n,r]),null},Ki=e=>kn()?c(qi,{...e}):c("slot",{}),Ji=`*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.\\!container{width:100%!important}.container{width:100%}@media (min-width: 1280px){.\\!container{max-width:1280px!important}.container{max-width:1280px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.\\!pointer-events-none{pointer-events:none!important}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.visible{visibility:visible}.invisible{visibility:hidden}.fixed{position:fixed}.\\!absolute{position:absolute!important}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{inset:0}.inset-x-0{left:0;right:0}.inset-x-1{left:4px;right:4px}.inset-y-1{top:4px;bottom:4px}.-bottom-1{bottom:-4px}.-left-1{left:-4px}.-right-1{right:-4px}.-top-1{top:-4px}.bottom-0{bottom:0}.bottom-1{bottom:4px}.left-0{left:0}.left-1{left:4px}.left-1\\/2{left:50%}.right-1{right:4px}.right-2{right:8px}.top-0{top:0}.top-1{top:4px}.top-1\\/2{top:50%}.top-2{top:8px}.-z-10{z-index:-10}.-z-20{z-index:-20}.z-1{z-index:1}.z-10,.z-hotspot{z-index:10}.z-overlay{z-index:30}.z-zoomed-image{z-index:20}.col-start-3{grid-column-start:3}.mx-1{margin-left:4px;margin-right:4px}.mx-auto{margin-left:auto;margin-right:auto}.my-2{margin-top:8px;margin-bottom:8px}.-ml-px{margin-left:-1px}.-mt-px{margin-top:-1px}.block{display:block}.inline-block{display:inline-block}.flex{display:flex}.grid{display:grid}.hidden{display:none}.aspect-\\[4\\/3\\]{aspect-ratio:4/3}.aspect-square{aspect-ratio:1 / 1}.size-1{width:4px;height:4px}.size-12{width:48px;height:48px}.size-20{width:80px;height:80px}.size-4{width:16px;height:16px}.size-5{width:20px;height:20px}.size-8{width:32px;height:32px}.size-full{width:100%;height:100%}.h-1{height:4px}.h-10{height:40px}.h-20{height:80px}.h-3\\/4{height:75%}.h-5{height:20px}.h-8{height:32px}.h-\\[15\\%\\]{height:15%}.h-\\[85\\%\\]{height:85%}.h-full{height:100%}.h-px{height:1px}.max-h-\\[50\\%\\]{max-height:50%}.min-h-0{min-height:0}.min-h-\\[15\\%\\]{min-height:15%}.w-12{width:48px}.w-3\\/5{width:60%}.w-8{width:32px}.w-\\[calc\\(100\\%\\+1024px\\)\\]{width:calc(100% + 1024px)}.w-\\[calc\\(100\\%\\+2px\\)\\]{width:calc(100% + 2px)}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-max{width:-moz-max-content;width:max-content}.w-px{width:1px}.min-w-0{min-width:0}.max-w-40{max-width:160px}.max-w-\\[1600px\\]{max-width:1600px}.max-w-\\[60\\%\\]{max-width:60%}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.origin-top-left{transform-origin:top left}.-translate-x-1\\.5{--tw-translate-x: -6px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-0{--tw-translate-x: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-1\\.5{--tw-translate-x: 6px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-x-full{--tw-translate-x: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-0{--tw-translate-y: 0;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.translate-y-full{--tw-translate-y: 100%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-100{--tw-scale-x: 1;--tw-scale-y: 1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.scale-105{--tw-scale-x: 1.05;--tw-scale-y: 1.05;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-scale-x-100{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes hotspot-ping{0%{transform:scale(0)}25%{opacity:1}75%,to{transform:scale(1.5);opacity:0}}.animate-hotspot-ping{animation:hotspot-ping 3s cubic-bezier(0,0,.2,1) infinite}@keyframes pulse{50%{opacity:1}0%,to{opacity:0}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}@keyframes rotation{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.animate-rotation{animation:rotation 1s linear infinite}.cursor-auto{cursor:auto}.cursor-grab{cursor:grab}.cursor-grabbing{cursor:grabbing}.cursor-help{cursor:help}.cursor-move{cursor:move}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-\\[auto\\,1fr\\,auto\\]{grid-template-columns:auto 1fr auto}.grid-cols-\\[repeat\\(var\\(--max-items\\)\\,1fr\\)\\]{grid-template-columns:repeat(var(--max-items),1fr)}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:4px}.gap-x-1{-moz-column-gap:4px;column-gap:4px}.gap-x-2{-moz-column-gap:8px;column-gap:8px}.gap-x-4{-moz-column-gap:16px;column-gap:16px}.gap-y-1{row-gap:4px}.gap-y-2{row-gap:8px}.gap-y-4{row-gap:16px}.space-x-0\\.5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(2px * var(--tw-space-x-reverse));margin-left:calc(2px * calc(1 - var(--tw-space-x-reverse)))}.space-y-0\\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2px * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(4px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(4px * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(8px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(8px * var(--tw-space-y-reverse))}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overflow-x-scroll{overflow-x:scroll}.text-pretty{text-wrap:pretty}.rounded-carrousel{border-radius:var(--radius-carrousel)}.rounded-full{border-radius:9999px}.rounded-gallery{border-radius:var(--radius-gallery)}.rounded-ui{border-radius:var(--radius-ui)}.rounded-ui-md{border-radius:calc(var(--radius-ui) + 2px)}.rounded-ui-sm{border-radius:calc(var(--radius-ui) - 2px)}.rounded-b-none{border-bottom-right-radius:0;border-bottom-left-radius:0}.rounded-t-none{border-top-left-radius:0;border-top-right-radius:0}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-background{border-color:hsl(var(--background))}.border-foreground{border-color:hsl(var(--foreground))}.border-primary{border-color:hsl(var(--primary))}.border-b-transparent{border-bottom-color:transparent}.bg-background{background-color:hsl(var(--background))}.bg-background\\/25{background-color:hsl(var(--background) / .25)}.bg-background\\/50{background-color:hsl(var(--background) / .5)}.bg-background\\/60{background-color:hsl(var(--background) / .6)}.bg-foreground\\/25{background-color:hsl(var(--foreground) / .25)}.bg-foreground\\/30{background-color:hsl(var(--foreground) / .3)}.bg-foreground\\/35{background-color:hsl(var(--foreground) / .35)}.bg-foreground\\/40{background-color:hsl(var(--foreground) / .4)}.bg-foreground\\/50{background-color:hsl(var(--foreground) / .5)}.bg-foreground\\/60{background-color:hsl(var(--foreground) / .6)}.bg-foreground\\/65{background-color:hsl(var(--foreground) / .65)}.bg-foreground\\/75{background-color:hsl(var(--foreground) / .75)}.bg-neutral\\/50{background-color:hsl(var(--neutral) / .5)}.bg-primary{background-color:hsl(var(--primary))}.bg-primary-foreground{background-color:hsl(var(--primary-foreground))}.bg-primary\\/50{background-color:hsl(var(--primary) / .5)}.bg-transparent{background-color:transparent}.bg-gradient-to-t{background-image:linear-gradient(to top,var(--tw-gradient-stops))}.from-foreground{--tw-gradient-from: hsl(var(--foreground)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--foreground) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-0\\.5{padding:2px}.p-1{padding:4px}.p-2{padding:8px}.p-4{padding:16px}.px-1\\.5{padding-left:6px;padding-right:6px}.px-2{padding-left:8px;padding-right:8px}.py-0\\.5{padding-top:2px;padding-bottom:2px}.py-1{padding-top:4px;padding-bottom:4px}.pl-6{padding-left:24px}.pr-12{padding-right:48px}.pr-4{padding-right:16px}.pt-8{padding-top:32px}.text-2xl{font-size:24px;line-height:32px}.text-\\[10px\\]{font-size:10px}.text-sm{font-size:14px;line-height:20px}.text-xl{font-size:20px;line-height:28px}.text-xs{font-size:12px;line-height:16px}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.text-background{color:hsl(var(--background))}.text-background\\/75{color:hsl(var(--background) / .75)}.text-foreground{color:hsl(var(--foreground))}.text-foreground\\/65{color:hsl(var(--foreground) / .65)}.text-foreground\\/70{color:hsl(var(--foreground) / .7)}.text-neutral-foreground{color:hsl(var(--neutral-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-\\[width\\]{transition-property:width;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-radius{transition-property:border-radius;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}.duration-details{transition-duration:.35s}.no-scrollbar{scrollbar-width:none;-ms-overflow-style:none}.no-scrollbar::-webkit-scrollbar{display:none}.\\[mask-image\\:linear-gradient\\(to_left\\,transparent_0px\\,black_4px\\,black_calc\\(100\\%-4px\\)\\,transparent_100\\%\\)\\]{-webkit-mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%);mask-image:linear-gradient(to left,transparent 0px,black 4px,black calc(100% - 4px),transparent 100%)}.\\*\\:pointer-events-auto>*{pointer-events:auto}.\\*\\:size-full>*{width:100%;height:100%}.\\*\\:snap-start>*{scroll-snap-align:start}.\\*\\:snap-always>*{scroll-snap-stop:always}.\\*\\:object-cover>*{-o-object-fit:cover;object-fit:cover}.after\\:absolute:after{content:var(--tw-content);position:absolute}.after\\:inset-0:after{content:var(--tw-content);inset:0}.after\\:rounded-gallery:after{content:var(--tw-content);border-radius:var(--radius-gallery)}.after\\:border-2:after{content:var(--tw-content);border-width:2px}.after\\:border-primary:after{content:var(--tw-content);border-color:hsl(var(--primary))}.after\\:opacity-0:after{content:var(--tw-content);opacity:0}.after\\:opacity-100:after{content:var(--tw-content);opacity:1}.after\\:transition-all:after{content:var(--tw-content);transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.hover\\:z-hotspot-hover:hover{z-index:11}.hover\\:bg-foreground\\/25:hover{background-color:hsl(var(--foreground) / .25)}.hover\\:bg-primary\\/25:hover{background-color:hsl(var(--primary) / .25)}.hover\\:bg-primary\\/30:hover{background-color:hsl(var(--primary) / .3)}.hover\\:opacity-80:hover{opacity:.8}.hover\\:after\\:opacity-70:hover:after{content:var(--tw-content);opacity:.7}.disabled\\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\\:pointer-events-auto{pointer-events:auto}.group\\/volume:hover .group-hover\\/volume\\:opacity-100{opacity:1}.group\\/volume:hover .group-hover\\/volume\\:opacity-50{opacity:.5}.group:hover .group-hover\\:opacity-100{opacity:1}@media ((orientation: portrait) and (max-width: 767px)) or ((orientation: landscape) and (max-width: 1023px)){.max-small\\:hidden{display:none}}@media ((orientation: portrait) and (min-width: 768px)) or ((orientation: landscape) and (min-width: 1024px)){.small\\:inset-x-2{left:8px;right:8px}.small\\:inset-y-2{top:8px;bottom:8px}.small\\:bottom-2{bottom:8px}.small\\:left-2{left:8px}.small\\:right-2{right:8px}.small\\:right-4{right:16px}.small\\:top-2{top:8px}.small\\:top-4{top:16px}.small\\:my-4{margin-top:16px;margin-bottom:16px}.small\\:hidden{display:none}.small\\:h-12{height:48px}.small\\:h-28{height:112px}.small\\:max-w-48{max-width:192px}.small\\:gap-2{gap:8px}.small\\:gap-x-2{-moz-column-gap:8px;column-gap:8px}.small\\:gap-y-2{row-gap:8px}.small\\:gap-y-4{row-gap:16px}.small\\:space-x-1>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(4px * var(--tw-space-x-reverse));margin-left:calc(4px * calc(1 - var(--tw-space-x-reverse)))}.small\\:p-3{padding:12px}.small\\:px-2{padding-left:8px;padding-right:8px}.small\\:py-1{padding-top:4px;padding-bottom:4px}.small\\:pl-8{padding-left:32px}.small\\:pr-6{padding-right:24px}.small\\:text-base{font-size:16px;line-height:24px}.small\\:text-sm{font-size:14px;line-height:20px}.small\\:font-bold{font-weight:700}}@media (min-width: 1280px){.large\\:h-20{height:80px}.large\\:h-3\\/5{height:60%}.large\\:max-w-56{max-width:224px}.large\\:gap-4{gap:16px}.large\\:p-2{padding:8px}.large\\:p-4{padding:16px}.large\\:text-base{font-size:16px;line-height:24px}.large\\:text-lg{font-size:18px;line-height:28px}}.pnlm-container{margin:0;padding:0;overflow:hidden;position:relative;cursor:default;width:100%;height:100%;font-family:Helvetica,Nimbus Sans L,Liberation Sans,Arial,sans-serif;background:#f4f4f4 url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='67'%20height='100'%20viewBox='0%200%2067%20100'%3e%3cpath%20stroke='%23ccc'%20fill='none'%20d='M33.5,50,0,63,33.5,75,67,63,33.5,50m-33.5-50,67,25m-0.5,0,0,75m-66.5-75,67-25m-33.5,75,0,25m0-100,0,50'/%3e%3c/svg%3e") repeat;-webkit-user-select:none;-moz-user-select:none;-o-user-select:none;user-select:none;outline:0;line-height:1.4;contain:content;touch-action:none}.pnlm-container *{box-sizing:content-box}.pnlm-ui{position:absolute;width:100%;height:100%;z-index:1}.pnlm-grab{cursor:grab;cursor:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='26'%20width='26'%3e%3cpath%20stroke='%23000'%20stroke-width='1px'%20fill='%23fff'%20d='m15.3%2020.5s6.38-6.73%204.64-8.24-3.47%201.01-3.47%201.01%203.61-5.72%201.41-6.49c-2.2-0.769-3.33%204.36-3.33%204.36s0.873-5.76-1.06-5.76-1.58%205.39-1.58%205.39-0.574-4.59-2.18-4.12c-1.61%200.468-0.572%205.51-0.572%205.51s-1.58-4.89-2.93-3.79c-1.35%201.11%200.258%205.25%200.572%206.62%200.836%202.43%202.03%202.94%202.17%205.55'/%3e%3c/svg%3e") 12 8,default}.pnlm-grabbing{cursor:grabbing;cursor:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='26'%20width='26'%3e%3cpath%20stroke='%23000'%20stroke-width='1px'%20fill='%23fff'%20d='m15.3%2020.5s5.07-5.29%203.77-6.74c-1.31-1.45-2.53%200.14-2.53%200.14s2.74-3.29%200.535-4.06c-2.2-0.769-2.52%201.3-2.52%201.3s0.81-2.13-1.12-2.13-1.52%201.77-1.52%201.77-0.261-1.59-1.87-1.12c-1.61%200.468-0.874%202.17-0.874%202.17s-0.651-1.55-2-0.445c-1.35%201.11-0.68%202.25-0.365%203.62%200.836%202.43%202.03%202.94%202.17%205.55'/%3e%3c/svg%3e") 12 8,default}.pnlm-sprite{background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='26'%20height='208'%3e%3ccircle%20fill-opacity='.78'%20cy='117'%20cx='13'%20r='11'%20fill='%23fff'/%3e%3ccircle%20fill-opacity='.78'%20cy='143'%20cx='13'%20r='11'%20fill='%23fff'/%3e%3ccircle%20cy='169'%20cx='13'%20r='7'%20fill='none'%20stroke='%23000'%20stroke-width='2'/%3e%3ccircle%20cy='195'%20cx='13'%20r='7'%20fill='none'%20stroke='%23000'%20stroke-width='2'/%3e%3ccircle%20cx='13'%20cy='195'%20r='2.5'/%3e%3cpath%20d='m5%2083v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-5%205v6h6v-6zm-5%205v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z'/%3e%3cpath%20d='m13%20110a7%207%200%200%200%20-7%207%207%207%200%200%200%207%207%207%207%200%200%200%207%20-7%207%207%200%200%200%20-7%20-7zm-1%203h2v2h-2zm0%203h2v5h-2z'/%3e%3cpath%20d='m5%2057v6h2v-4h4v-2zm10%200v2h4v4h2v-6zm-10%2010v6h6v-2h-4v-4zm14%200v4h-4v2h6v-6z'/%3e%3cpath%20d='m17%2038v2h-8v-2z'/%3e%3cpath%20d='m12%209v3h-3v2h3v3h2v-3h3v-2h-3v-3z'/%3e%3cpath%20d='m13%20136-6.125%206.125h4.375v7.875h3.5v-7.875h4.375z'/%3e%3cpath%20d='m10.428%20173.33v-5.77l5-2.89v5.77zm1-1.73%203-1.73-3.001-1.74z'/%3e%3c/svg%3e")}.pnlm-container:fullscreen{height:100%!important;width:100%!important;position:static!important}.pnlm-render-container{cursor:inherit;position:absolute;height:100%;width:100%}.pnlm-controls{margin-top:4px;background-color:#fff;border:1px solid #999;border-color:#0006;border-radius:3px;cursor:pointer;z-index:2;transform:translateZ(9999px)}.pnlm-control:hover{background-color:#f8f8f8}.pnlm-controls-container{position:absolute;top:0;left:4px;z-index:1}.pnlm-zoom-controls{width:26px;height:52px}.pnlm-zoom-in{width:100%;height:50%;position:absolute;top:0;border-radius:3px 3px 0 0}.pnlm-zoom-out{width:100%;height:50%;position:absolute;bottom:0;background-position:0 -26px;border-top:1px solid #ddd;border-top-color:#0000001a;border-radius:0 0 3px 3px}.pnlm-fullscreen-toggle-button,.pnlm-orientation-button,.pnlm-hot-spot-debug-indicator{width:26px;height:26px}.pnlm-hot-spot-debug-indicator{position:absolute;top:50%;left:50%;width:26px;height:26px;margin:-13px 0 0 -13px;background-color:#ffffff80;border-radius:13px;display:none}.pnlm-orientation-button-inactive{background-position:0 -156px}.pnlm-orientation-button-active{background-position:0 -182px}.pnlm-fullscreen-toggle-button-inactive{background-position:0 -52px}.pnlm-fullscreen-toggle-button-active{background-position:0 -78px}.pnlm-panorama-info{position:absolute;bottom:4px;background-color:#000000b3;border-radius:0 3px 3px 0;padding-right:10px;color:#fff;text-align:left;display:none;z-index:2;transform:translateZ(9999px)}.pnlm-title-box{position:relative;font-size:20px;display:table;padding-left:5px;margin-bottom:3px}.pnlm-author-box{position:relative;font-size:12px;display:table;padding-left:5px}.pnlm-load-box{position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:none;color:#fff}.pnlm-load-box p{margin:20px 0}.pnlm-lbox{position:absolute;top:50%;left:50%;width:20px;height:20px;margin:-10px 0 0 -10px;display:none}.pnlm-loading{animation-duration:1.5s;-webkit-animation-duration:1.5s;animation-name:pnlm-mv;-webkit-animation-name:pnlm-mv;animation-iteration-count:infinite;-webkit-animation-iteration-count:infinite;animation-timing-function:linear;-webkit-animation-timing-function:linear;height:10px;width:10px;background-color:#fff;position:relative}@keyframes pnlm-mv{0%{left:0;top:0}25%{left:10px;top:0}50%{left:10px;top:10px}75%{left:0;top:10px}to{left:0;top:0}}.pnlm-load-button{position:absolute;top:50%;left:50%;width:200px;height:100px;margin:-50px 0 0 -100px;background-color:#000000b3;border-radius:3px;text-align:center;font-size:20px;display:table;color:#fff;cursor:pointer}.pnlm-load-button:hover{background-color:#000c}.pnlm-load-button p{display:table-cell;vertical-align:middle}.pnlm-info-box{font-size:15px;position:absolute;top:50%;left:50%;width:200px;height:150px;margin:-75px 0 0 -100px;background-color:#000;border-radius:3px;display:table;text-align:center;color:#fff;table-layout:fixed}.pnlm-info-box a{color:#fff;word-wrap:break-word;overflow-wrap:break-word}.pnlm-info-box p{display:table-cell;vertical-align:middle;padding:0 5px}.pnlm-error-msg{display:none}.pnlm-about-msg{font-size:11px;line-height:11px;color:#fff;padding:5px 8px;background:#000000b3;border-radius:3px;position:absolute;top:50px;left:50px;display:none;opacity:0;transition:opacity .3s ease-in-out;z-index:1}.pnlm-about-msg a:link,.pnlm-about-msg a:visited{color:#fff}.pnlm-about-msg a:hover,.pnlm-about-msg a:active{color:#eee}.pnlm-hotspot-base{position:absolute;visibility:hidden;cursor:default;vertical-align:middle;top:0;z-index:1}.pnlm-hotspot{height:26px;width:26px;border-radius:13px}.pnlm-hotspot:hover{background-color:#fff3}.pnlm-hotspot.pnlm-info{background-position:0 -104px}.pnlm-hotspot.pnlm-scene{background-position:0 -130px}div.pnlm-tooltip span{visibility:hidden;position:absolute;border-radius:3px;background-color:#000000b3;color:#fff;text-align:center;max-width:200px;padding:5px 10px;margin-left:-220px;cursor:default}div.pnlm-tooltip:hover span{visibility:visible}div.pnlm-tooltip:hover span:after{content:"";position:absolute;width:0;height:0;border-width:10px;border-style:solid;border-color:rgba(0,0,0,.7) transparent transparent transparent;bottom:-20px;left:-10px;margin:0 50%}.pnlm-compass{position:absolute;width:50px;height:50px;right:4px;bottom:4px;border-radius:25px;background-image:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20height='50'%20width='50'%3e%3cpath%20d='m24.5078%206-3.2578%2018h7.5l-3.25781-18h-0.984376zm-3.2578%2020%203.2578%2018h0.9844l3.2578-18h-7.5zm1.19531%200.9941h5.10938l-2.5547%2014.1075-2.5547-14.1075z'/%3e%3c/svg%3e");cursor:default;display:none}.pnlm-world{position:absolute;left:50%;top:50%}.pnlm-face{position:absolute;transform-origin:0 0 0}.pnlm-dragfix,.pnlm-preview-img{position:absolute;height:100%;width:100%}.pnlm-preview-img{background-size:cover;background-position:center}.pnlm-lbar{width:150px;margin:0 auto;border:#fff 1px solid;height:6px}.pnlm-lbar-fill{background:#fff;height:100%;width:0}.pnlm-lmsg{font-size:12px}.pnlm-fade-img{position:absolute;top:0;left:0}.pnlm-pointer{cursor:pointer}#textInfo .tooltip-content{font-size:1.6em;position:absolute;left:-70px;bottom:80px;width:200px;pointer-events:none;background-color:#333;color:#fff;line-height:1.2em;padding:.8em;opacity:0;transform-origin:50% calc(100% + 6em);transform:rotate3d(0,0,1,15deg);transition:opacity .5s,transform .5s;transition-timing-function:ease,cubic-bezier(.17,.67,.4,1.39)}#textInfo:hover{z-index:3}#textInfo:hover .tooltip-content{opacity:1;pointer-events:all;transform:translateZ(0) rotate3d(0,0,0,0)}#textInfo .hotspot{cursor:pointer;box-sizing:border-box}#textInfo .hotspot .out:before{speak:none;font-size:48px;line-height:90px;font-style:normal;font-weight:400;font-variant:normal;text-transform:none;display:block;-webkit-font-smoothing:antialiased}#textInfo .hotspot .out{width:60px;height:60px;border-radius:50%;border:5px solid rgba(255,255,255,.8);transition:transform ease-out .1s,border .2s;box-sizing:border-box}#textInfo .hotspot .in{width:40px;height:40px;position:absolute;top:10px;left:10px;background-color:#fffc;border-radius:50%;transition:transform ease-out .1s,background .2s}#textInfo .hotspot .out:after{top:0;left:0;padding:0;z-index:-1;box-shadow:0 0 0 2px #ffffff1a;opacity:0;pointer-events:none;position:absolute;width:100%;height:100%;border-radius:50%;content:"";box-sizing:content-box;transform:scale(.9)}#textInfo .hotspot:hover .out{border:5px solid rgba(255,255,255,1);transform:scale(.9);color:#fff}#textInfo .hotspot:hover .in{background-color:#fff;transform:scale(.8)}#textInfo .hotspot:hover .out:after{animation:sonarEffect 1.2s ease-out}@keyframes sonarEffect{0%{opacity:.5}20%{opacity:.8;box-shadow:0 0 0 2px #ffffff1a,0 0 10px 10px #25aae1cc,0 0 0 10px #ffffff80}to{box-shadow:0 0 0 2px #ffffff1a,0 0 10px 10px #25aae1cc,0 0 0 10px #ffffff80;transform:scale(1.5);opacity:0}}`;function Qi(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,n,r)=>`${n}-${r.toLowerCase()}`)}function Sn(e){return Object.entries(e).reduce((t,[n,r])=>{if(r!==void 0){const s=Qi(n);t[s]=r.toString()}return t},{})}const es=e=>c(Ke,{children:[c("style",{children:Ji}),c(Zi,{...e})]}),ts=e=>Sn(e),ns=e=>Sn(e),os=e=>Sn(e);function rs(e){return{render:function(t){Oo(t,e)},unmount:function(){Wo(e)}}}var as=Object.defineProperty,is=(e,t,n)=>t in e?as(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,en=(e,t,n)=>is(e,typeof t!="symbol"?t+"":t,n);const ss={stringify:e=>e?"true":"false",parse:e=>/^[ty1-9]/i.test(e)},ls={stringify:e=>e.name,parse:(e,t,n)=>{const r=(()=>{if(typeof window<"u"&&e in window)return window[e];if(typeof global<"u"&&e in global)return global[e]})();return typeof r=="function"?r.bind(n):void 0}},cs={stringify:e=>JSON.stringify(e),parse:e=>JSON.parse(e)};function us(e){return e.replace(/([a-z0-9])([A-Z])/g,(t,n,r)=>`${n}-${r.toLowerCase()}`)}function gr(e){return e.replace(/[-:]([a-z])/g,(t,n)=>`${n.toUpperCase()}`)}const ds={stringify:e=>e.name,parse:(e,t,n)=>{const r=(()=>{const s=gr(t);if(typeof n<"u"&&s in n.container)return n.container[s]})();return typeof r=="function"?r.bind(n):void 0}},ps={stringify:e=>`${e}`,parse:e=>parseFloat(e)},fs={stringify:e=>e,parse:e=>e},Nn={string:fs,number:ps,boolean:ss,function:ls,method:ds,json:cs},Ht=Symbol.for("r2wc.render"),tn=Symbol.for("r2wc.connected"),bt=Symbol.for("r2wc.context"),rt=Symbol.for("r2wc.props");function hs(e,t,n){var r,s,i;t.props||(t.props=e.propTypes?Object.keys(e.propTypes):[]),t.events||(t.events=[]);const d=Array.isArray(t.props)?t.props.slice():Object.keys(t.props),o=Array.isArray(t.events)?t.events.slice():Object.keys(t.events),v={},f={},L={},h={};for(const a of d){v[a]=Array.isArray(t.props)?"string":t.props[a];const E=us(a);L[a]=E,h[E]=a}for(const a of o)f[a]=Array.isArray(t.events)?{}:t.events[a];class p extends HTMLElement{constructor(){super(),en(this,i,!0),en(this,s),en(this,r,{}),en(this,"container"),t.shadow?this.container=this.attachShadow({mode:t.shadow}):this.container=this,this[rt].container=this.container;for(const E of d){const T=L[E],b=this.getAttribute(T),m=v[E],M=m?Nn[m]:null;if(m==="method"){const k=gr(T);Object.defineProperty(this[rt].container,k,{enumerable:!0,configurable:!0,get(){return this[rt][k]},set(_){this[rt][k]=_,this[Ht]()}}),this[rt][E]=M.parse(b,T,this)}M!=null&&M.parse&&b&&(this[rt][E]=M.parse(b,T,this))}for(const E of o)this[rt][E]=T=>{const b=E.replace(/^on/,"").toLowerCase();this.dispatchEvent(new CustomEvent(b,{detail:T,...f[E]}))}}static get observedAttributes(){return Object.keys(h)}connectedCallback(){this[tn]=!0,this[Ht]()}disconnectedCallback(){this[tn]=!1,this[bt]&&n.unmount(this[bt]),delete this[bt]}attributeChangedCallback(E,T,b){const m=h[E],M=v[m],k=M?Nn[M]:null;m in v&&k!=null&&k.parse&&b&&(this[rt][m]=k.parse(b,E,this),this[Ht]())}[(i=tn,s=bt,r=rt,Ht)](){this[tn]&&(this[bt]?n.update(this[bt],this[rt]):this[bt]=n.mount(this.container,e,this[rt]))}}for(const a of d){const E=L[a],T=v[a];Object.defineProperty(p.prototype,a,{enumerable:!0,configurable:!0,get(){return this[rt][a]},set(b){this[rt][a]=b;const m=T?Nn[T]:null;if(m!=null&&m.stringify){const M=m.stringify(b,E,this);this.getAttribute(E)!==M&&this.setAttribute(E,M)}else this[Ht]()}})}return p}function ms(e,t,n){const r=rs(e),s=Mn.createElement(t,n);return r.render(s),{root:r,ReactComponent:t}}function gs({root:e,ReactComponent:t},n){const r=Mn.createElement(t,n);e.render(r)}function vs({root:e}){setTimeout(()=>{e.unmount()},0)}function Pn(e,t={}){return hs(e,t,{mount:ms,update:gs,unmount:vs})}const _s=Pn(es,{shadow:"closed",props:{compositionUrl:"string",hideCategoriesNav:"boolean",infiniteCarrousel:"boolean",permanentGallery:"boolean",integration:"boolean",maxItemsShown:"number",minMediaWidth:"number",maxMediaWidth:"number",mediaLoadStrategy:"string",preloadRange:"number",autoLoad360:"boolean",autoLoadInterior360:"boolean",categoriesFilter:"string",extendBehavior:"string",eventPrefix:"string",demoSpin:"boolean",reverse360:"boolean",spinCursor:"string",analyticsEventPrefix:"string",analyticsUrl:"string",analyticsBearer:"string",analyticsSimpleRequestsOnly:"boolean",analyticsDryRun:"boolean",analyticsDebug:"boolean"}}),ws=Pn(ji,{shadow:"closed",props:{index:"number",thumbnailSrc:"string"}}),ys=Pn(Ki,{shadow:"closed",props:{name:"string"}});function bs(){customElements.define(ut,_s),customElements.define(Ut,ws),customElements.define(Vt,ys)}function xs(){Gn()||bs()}Ue.DEFAULT_EVENT_PREFIX=Xn,Ue.EVENT_COMPOSITION_LOADED=Hn,Ue.EVENT_COMPOSITION_LOADING=On,Ue.EVENT_COMPOSITION_LOAD_ERROR=Fn,Ue.EVENT_EXTEND_MODE_OFF=Wn,Ue.EVENT_EXTEND_MODE_ON=Vn,Ue.EVENT_GALLERY_CLOSE=Yn,Ue.EVENT_GALLERY_OPEN=Bn,Ue.EVENT_HOTSPOTS_OFF=sn,Ue.EVENT_HOTSPOTS_ON=an,Ue.EVENT_ITEM_CHANGE=Un,Ue.WEB_PLAYER_CUSTOM_MEDIA_WC_TAG=Ut,Ue.WEB_PLAYER_ICON_WC_TAG=Vt,Ue.WEB_PLAYER_WC_TAG=ut,Ue.checkCustomElementsDefinition=Gn,Ue.ensureCustomElementsDefinition=xs,Ue.generateCompositionUrl=Nr,Ue.webPlayerCustomMediaPropsToAttributes=ns,Ue.webPlayerIconPropsToAttributes=os,Ue.webPlayerPropsToAttributes=ts,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"})});
|